@evoscientist/webui 0.2.9 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.next/BUILD_ID +1 -1
- package/dist/.next/build-manifest.json +6 -6
- package/dist/.next/prerender-manifest.json +6 -6
- package/dist/.next/server/app/_global-error/page/build-manifest.json +3 -3
- package/dist/.next/server/app/_global-error/page.js +3 -3
- package/dist/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/dist/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/_global-error.html +1 -1
- package/dist/.next/server/app/_global-error.meta +8 -0
- package/dist/.next/server/app/_global-error.rsc +1 -1
- package/dist/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/dist/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/.next/server/app/_not-found/page/build-manifest.json +3 -3
- package/dist/.next/server/app/_not-found/page.js +3 -3
- package/dist/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/dist/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/_not-found.html +1 -1
- package/dist/.next/server/app/_not-found.meta +8 -0
- package/dist/.next/server/app/_not-found.rsc +2 -2
- package/dist/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/dist/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/dist/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/dist/.next/server/app/api/evosci-config/route.js +1 -1
- package/dist/.next/server/app/api/evosci-config/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/evosci-config/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/memory/executions/route.js +1 -1
- package/dist/.next/server/app/api/memory/executions/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/memory/executions/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/memory/observations/route.js +1 -1
- package/dist/.next/server/app/api/memory/observations/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/memory/observations/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/memory/route.js +1 -1
- package/dist/.next/server/app/api/memory/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/memory/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/skills/catalog/route.js +1 -1
- package/dist/.next/server/app/api/skills/catalog/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/skills/catalog/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/skills/detail/route.js +1 -1
- package/dist/.next/server/app/api/skills/detail/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/skills/detail/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/skills/install/route.js +1 -1
- package/dist/.next/server/app/api/skills/install/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/skills/install/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/skills/route.js +1 -1
- package/dist/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/workspace/download/route.js +1 -1
- package/dist/.next/server/app/api/workspace/download/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/workspace/download/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/workspace/file/route.js +1 -1
- package/dist/.next/server/app/api/workspace/file/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/workspace/file/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/workspace/route.js +1 -1
- package/dist/.next/server/app/api/workspace/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/workspace/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/workspace/upload/route.js +1 -1
- package/dist/.next/server/app/api/workspace/upload/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/workspace/upload/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/icon.png/route.js +1 -1
- package/dist/.next/server/app/icon.png/route.js.nft.json +1 -1
- package/dist/.next/server/app/icon.png.meta +1 -1
- package/dist/.next/server/app/index.html +1 -1
- package/dist/.next/server/app/index.meta +8 -0
- package/dist/.next/server/app/index.rsc +3 -3
- package/dist/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
- package/dist/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/dist/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/dist/.next/server/app/page/build-manifest.json +3 -3
- package/dist/.next/server/app/page.js +3 -3
- package/dist/.next/server/app/page.js.nft.json +1 -1
- package/dist/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/chunks/{[externals]__0l8ei7u._.js → [externals]__12s2uxr._.js} +2 -2
- package/dist/.next/server/chunks/[root-of-the-server]__0239a1s._.js +1 -1
- package/dist/.next/server/chunks/[root-of-the-server]__0l3yhx4._.js +2 -2
- package/dist/.next/server/chunks/{[root-of-the-server]__0c_9zoh._.js → [root-of-the-server]__0lmbd-x._.js} +1 -1
- package/dist/.next/server/chunks/{[root-of-the-server]__08gtyud._.js → [root-of-the-server]__0o8rrlw._.js} +1 -1
- package/dist/.next/server/chunks/{[root-of-the-server]__0dsauq5._.js → [root-of-the-server]__0tsmn4o._.js} +1 -1
- package/dist/.next/server/chunks/[root-of-the-server]__1301wm3._.js +6 -0
- package/dist/.next/server/chunks/[root-of-the-server]__13z7yld._.js +3 -0
- package/dist/.next/server/chunks/[root-of-the-server]__1csj9d7._.js +6 -0
- package/dist/.next/server/chunks/[root-of-the-server]__1lhglnn._.js +6 -0
- package/dist/.next/server/chunks/[root-of-the-server]__21ai51o._.js +6 -0
- package/dist/.next/server/chunks/_00r_7g_._.js +1 -1
- package/dist/.next/server/chunks/_042sj8j._.js +1 -1
- package/dist/.next/server/chunks/_0lp3ten._.js +1 -1
- package/dist/.next/server/chunks/_0m7b81h._.js +1 -1
- package/dist/.next/server/chunks/_13lro7d._.js +1 -1
- package/dist/.next/server/chunks/_154zcbx._.js +1 -1
- package/dist/.next/server/chunks/_1_oz68h._.js +1 -1
- package/dist/.next/server/chunks/_1lqtgjk._.js +1 -1
- package/dist/.next/server/chunks/ssr/{[root-of-the-server]__0xpcv9w._.js → [root-of-the-server]__0gz0l81._.js} +4 -4
- package/dist/.next/server/chunks/ssr/{[root-of-the-server]__0o0ct70._.js → [root-of-the-server]__0ofckpb._.js} +2 -2
- package/dist/.next/server/chunks/ssr/[root-of-the-server]__1q-wcrf._.js +4 -4
- package/dist/.next/server/chunks/ssr/{node_modules_1rsc-gt._.js → node_modules_0-5losv._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_1i5ml3x._.js → node_modules_0-uwdov._.js} +2 -2
- package/dist/.next/server/chunks/ssr/{node_modules_0zzr3iv._.js → node_modules_003l9s_._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_1xgltz7._.js → node_modules_01lxr8w._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_0u5o24a._.js → node_modules_06d96_7._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_0gmj-7m._.js → node_modules_078ku58._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_0z53q9t._.js → node_modules_0b_h7uo._.js} +2 -2
- package/dist/.next/server/chunks/ssr/{node_modules_0s436hr._.js → node_modules_0f8ss6x._.js} +2 -2
- package/dist/.next/server/chunks/ssr/{node_modules_042csl2._.js → node_modules_0gorpj1._.js} +2 -2
- package/dist/.next/server/chunks/ssr/{node_modules_0_n1n9u._.js → node_modules_0ibftfb._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_1wvft2t._.js → node_modules_0if76xt._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_0j6b-p5._.js → node_modules_0kim9kf._.js} +2 -2
- package/dist/.next/server/chunks/ssr/{node_modules_0bnt8d5._.js → node_modules_0na2xfw._.js} +2 -2
- package/dist/.next/server/chunks/ssr/{node_modules_1bompw4._.js → node_modules_0rrx3v9._.js} +2 -2
- package/dist/.next/server/chunks/ssr/{node_modules_03mz3d2._.js → node_modules_0svpaox._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_1y4f8cf._.js → node_modules_0t_f7hd._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_0mhroki._.js → node_modules_0ygb0yl._.js} +2 -2
- package/dist/.next/server/chunks/ssr/{node_modules_14j-r2i._.js → node_modules_15h3mt3._.js} +2 -2
- package/dist/.next/server/chunks/ssr/{node_modules_16ih6qm._.js → node_modules_15sdrja._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_18frml9._.js → node_modules_16u9hvv._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_14_5zct._.js → node_modules_19nwszm._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_1z39zs4._.js → node_modules_1fe5i2w._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_1wn8qu0._.js → node_modules_1i7ymbt._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_1jpkt5_._.js → node_modules_1peqwpp._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_0-3gk4n._.js → node_modules_1qo98iu._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_0_3n1hi._.js → node_modules_1yd27ha._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_1ti62ba._.js → node_modules_1z-i33h._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_1b08rf0._.js → node_modules_207k920._.js} +2 -2
- package/dist/.next/server/chunks/ssr/{node_modules_1bddg7x._.js → node_modules_20f84v9._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_0pimgwq._.js → node_modules_20mk7cs._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_katex_dist_katex_mjs_16enqn_._.js → node_modules_katex_dist_katex_mjs_1zkqvut._.js} +1 -1
- package/dist/.next/server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_chunk-DU6HZSFF_mjs_20hsuk9._.js +2 -2
- package/dist/.next/server/chunks/ssr/node_modules_next_dist_0nkkbfv._.js +6 -0
- package/dist/.next/server/middleware-build-manifest.js +6 -6
- package/dist/.next/server/pages/404.html +1 -1
- package/dist/.next/server/pages/500.html +1 -1
- package/dist/.next/server/server-reference-manifest.js +1 -1
- package/dist/.next/server/server-reference-manifest.json +1 -1
- package/dist/.next/static/chunks/04hyl-myn66lr.css +3 -0
- package/dist/.next/static/chunks/13ss71zqoc3if.js +122 -0
- package/dist/.next/static/chunks/1pp43a1pyu2lp.js +13 -0
- package/dist/.next/static/chunks/{02g89o135esk3.js → 36z02g61bmnkq.js} +1 -1
- package/dist/.next/static/chunks/{2zf625u-tcwdn.js → 3gwb465dhjxo9.js} +1 -1
- package/dist/.next/static/chunks/{3fg_vuz1xt14w.js → 45asonyfr0kfy.js} +1 -1
- package/dist/.next/static/chunks/{turbopack-3cm-eevva8ksw.js → turbopack-3it-vrv5uq3no.js} +1 -1
- package/dist/node_modules/@next/env/package.json +1 -1
- package/dist/node_modules/next/dist/build/swc/index.js +1 -1
- package/dist/node_modules/next/dist/compiled/hash.js/sha256/256.js +1 -0
- package/dist/node_modules/next/dist/compiled/hash.js/sha256/package.json +1 -0
- package/dist/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +17 -17
- package/dist/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +18 -18
- package/dist/node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js +3 -3
- package/dist/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +13 -13
- package/dist/node_modules/next/dist/experimental/testmode/fetch.js +10 -2
- package/dist/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
- package/dist/node_modules/next/dist/lib/typescript/runTypeScriptCli.js +2 -2
- package/dist/node_modules/next/dist/lib/verify-typescript-setup.js +3 -1
- package/dist/node_modules/next/dist/server/app-render/create-component-styles-and-scripts.js +2 -1
- package/dist/node_modules/next/dist/server/base-server.js +1 -2
- package/dist/node_modules/next/dist/server/config.js +1 -1
- package/dist/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +2 -2
- package/dist/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
- package/dist/node_modules/next/dist/server/image-optimizer.js +281 -55
- package/dist/node_modules/next/dist/server/lib/app-info-log.js +1 -1
- package/dist/node_modules/next/dist/server/lib/disk-lru-cache.external.js +7 -1
- package/dist/node_modules/next/dist/server/lib/incremental-cache/file-system-cache.js +177 -19
- package/dist/node_modules/next/dist/server/lib/incremental-cache/index.js +36 -17
- package/dist/node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js +14 -6
- package/dist/node_modules/next/dist/server/lib/match-next-data-pathname.js +3 -1
- package/dist/node_modules/next/dist/server/lib/node-fs-methods.js +14 -0
- package/dist/node_modules/next/dist/server/lib/route-cache-key.js +77 -0
- package/dist/node_modules/next/dist/server/lib/router-utils/block-cross-site-dev.js +9 -11
- package/dist/node_modules/next/dist/server/lib/start-server.js +1 -1
- package/dist/node_modules/next/dist/server/mcp/get-mcp-middleware.js +4 -2
- package/dist/node_modules/next/dist/server/next-server.js +7 -3
- package/dist/node_modules/next/dist/server/response-cache/index.js +32 -16
- package/dist/node_modules/next/dist/server/route-matcher-providers/app-page-route-matcher-provider.js +2 -2
- package/dist/node_modules/next/dist/server/route-modules/pages/pages-handler.js +6 -1
- package/dist/node_modules/next/dist/server/route-modules/route-module.js +9 -2
- package/dist/node_modules/next/dist/server/use-cache/use-cache-wrapper.js +36 -30
- package/dist/node_modules/next/dist/shared/lib/router/utils/app-paths.js +18 -1
- package/dist/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
- package/dist/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
- package/dist/node_modules/next/dist/telemetry/events/version.js +2 -2
- package/dist/node_modules/next/package.json +11 -11
- package/dist/package.json +3 -2
- package/package.json +3 -2
- package/dist/.next/server/chunks/[root-of-the-server]__01e0ekn._.js +0 -6
- package/dist/.next/server/chunks/[root-of-the-server]__0d2jr7j._.js +0 -3
- package/dist/.next/server/chunks/[root-of-the-server]__0om1fsa._.js +0 -6
- package/dist/.next/server/chunks/[root-of-the-server]__19l67fj._.js +0 -6
- package/dist/.next/server/chunks/[root-of-the-server]__1nb3ezt._.js +0 -6
- package/dist/.next/server/chunks/ssr/node_modules_next_dist_1n3w9lb._.js +0 -6
- package/dist/.next/static/chunks/2dmr54jagfdwa.css +0 -3
- package/dist/.next/static/chunks/3r4zv-ypmltqz.js +0 -13
- package/dist/.next/static/chunks/3zgnmu3cnahk0.js +0 -122
- /package/dist/.next/static/{jymT8vIg_gKraNQQCXVtL → wE9WfZ70fPpTyIBVT_vgk}/_buildManifest.js +0 -0
- /package/dist/.next/static/{jymT8vIg_gKraNQQCXVtL → wE9WfZ70fPpTyIBVT_vgk}/_clientMiddlewareManifest.js +0 -0
- /package/dist/.next/static/{jymT8vIg_gKraNQQCXVtL → wE9WfZ70fPpTyIBVT_vgk}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,126568,(e,t,n)=>{"use strict";var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,a=/\n/g,i=/^\s*/,s=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,u=/^\s+|\s+$/g;function d(e){return e?e.replace(u,""):""}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,u=1;function p(e){var t=e.match(a);t&&(n+=t.length);var r=e.lastIndexOf("\n");u=~r?e.length-r:u+e.length}function m(){var e={line:n,column:u};return function(t){return t.position=new f(e),g(i),t}}function f(e){this.start=e,this.end={line:n,column:u},this.source=t.source}function h(r){var a=Error(t.source+":"+n+":"+u+": "+r);if(a.reason=r,a.filename=t.source,a.line=n,a.column=u,a.source=e,t.silent);else throw a}function g(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function b(e){var t;for(e=e||[];t=y();)!1!==t&&e.push(t);return e}function y(){var t=m();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 h("End of comment missing");var r=e.slice(2,n-2);return u+=2,p(r),e=e.slice(n),u+=2,t({type:"comment",comment:r})}}f.prototype.content=e,g(i);var E,x=[];for(b(x);E=function(){var e=m(),t=g(s);if(t){if(y(),!g(o))return h("property missing ':'");var n=g(l),a=e({type:"declaration",property:d(t[0].replace(r,"")),value:n?d(n[0].replace(r,"")):""});return g(c),a}}();)!1!==E&&(x.push(E),b(x));return x}},270454,(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,a.default)(e),i="function"==typeof t;return r.forEach(e=>{if("declaration"!==e.type)return;let{property:r,value:a}=e;i?t(r,a,e):a&&((n=n||{})[r]=a)}),n};let a=r(e.r(126568))},965185,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.camelCase=void 0;var r=/^--[a-zA-Z0-9_-]+$/,a=/-([a-z])/g,i=/^[^-]+$/,s=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,l=function(e,t){return t.toUpperCase()},c=function(e,t){return"".concat(t,"-")};n.camelCase=function(e,t){var n;return(void 0===t&&(t={}),!(n=e)||i.test(n)||r.test(n))?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(o,c):e.replace(s,c)).replace(a,l))}},515511,(e,t,n)=>{"use strict";var r=(e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(e.r(270454)),a=e.r(965185);function i(e,t){var n={};return e&&"string"==typeof e&&(0,r.default)(e,function(e,r){e&&r&&(n[(0,a.camelCase)(e,t)]=r)}),n}i.default=i,t.exports=i},104100,(e,t,n)=>{"use strict";var r=Object.prototype.hasOwnProperty,a=Object.prototype.toString,i=Object.defineProperty,s=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===a.call(e)},l=function(e){if(!e||"[object Object]"!==a.call(e))return!1;var t,n=r.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!i)return!1;for(t in e);return void 0===t||r.call(e,t)},c=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;else if(s)return s(e,t).value}return e[t]};t.exports=function e(){var t,n,r,a,i,s,d=arguments[0],p=1,m=arguments.length,f=!1;for("boolean"==typeof d&&(f=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<m;++p)if(t=arguments[p],null!=t)for(n in t)r=u(d,n),d!==(a=u(t,n))&&(f&&a&&(l(a)||(i=o(a)))?(i?(i=!1,s=r&&o(r)?r:[]):s=r&&l(r)?r:{},c(d,{name:n,newValue:e(f,s,a)})):void 0!==a&&c(d,{name:n,newValue:a}));return d}},325633,(e,t,n)=>{"use strict";e.i(247167),Object.defineProperty(n,"__esModule",{value:!0});var r={default:function(){return h},defaultHead:function(){return d}};for(var a in r)Object.defineProperty(n,a,{enumerable:!0,get:r[a]});let i=e.r(555682),s=e.r(190809),o=e.r(843476),l=s._(e.r(271645)),c=i._(e.r(898879)),u=e.r(742732);function d(){return[(0,o.jsx)("meta",{charSet:"utf-8"},"charset"),(0,o.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function p(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===l.default.Fragment?e.concat(l.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}let m=["name","httpEquiv","charSet","itemProp"];function f(e){let t,n,r,a;return e.reduce(p,[]).reverse().concat(d().reverse()).filter((t=new Set,n=new Set,r=new Set,a={},e=>{let i=!0,s=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){s=!0;let n=e.key.slice(e.key.indexOf("$")+1);t.has(n)?i=!1:t.add(n)}switch(e.type){case"title":case"base":n.has(e.type)?i=!1:n.add(e.type);break;case"meta":for(let t=0,n=m.length;t<n;t++){let n=m[t];if(e.props.hasOwnProperty(n))if("charSet"===n)r.has(n)?i=!1:r.add(n);else{let t=e.props[n],r=a[n]||new Set;("name"!==n||!s)&&r.has(t)?i=!1:(r.add(t),a[n]=r)}}}return i})).reverse().map((e,t)=>{let n=e.key||t;return l.default.cloneElement(e,{key:n})})}let h=function({children:e}){let t=(0,l.useContext)(u.HeadManagerContext);return(0,o.jsx)(c.default,{reduceComponentsToState:f,headManager:t,children:e})};("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},918556,(e,t,n)=>{"use strict";e.i(247167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ImageConfigContext",{enumerable:!0,get:function(){return i}});let r=e.r(555682)._(e.r(271645)),a=e.r(987690),i=r.default.createContext(a.imageConfigDefault)},65856,(e,t,n)=>{"use strict";e.i(247167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"RouterContext",{enumerable:!0,get:function(){return r}});let r=e.r(555682)._(e.r(271645)).default.createContext(null)},670965,(e,t,n)=>{"use strict";function r(e,t){let n=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-n)<Math.abs(e-n)?t:e,t.qualities[0]):n}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"findClosestQuality",{enumerable:!0,get:function(){return r}})},1948,(e,t,n)=>{"use strict";e.i(247167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return s}});let r=e.r(670965),a=e.r(543369);function i({config:e,src:t,width:n,quality:s}){let o=(0,a.getDeploymentId)();if(t.startsWith("/")&&!t.startsWith("//"))if(t.includes("/_next/static/immutable")&&!(0,a.getAssetToken)())o=void 0;else{let e=t.indexOf("?");if(-1!==e){let n=new URLSearchParams(t.slice(e+1)),r=n.get("dpl");if(r){o=r,n.delete("dpl");let a=n.toString();t=t.slice(0,e)+(a?"?"+a:"")}}}if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns.
|
|
2
|
+
Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let l=(0,r.findClosestQuality)(s,e);return`${e.path}?url=${encodeURIComponent(t)}&w=${n}&q=${l}${t.startsWith("/")&&o?`&dpl=${o}`:""}`}i.__next_img_default=!0;let s=i},818581,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"useMergedRef",{enumerable:!0,get:function(){return a}});let r=e.r(271645);function a(e,t){let n=(0,r.useRef)(null),a=(0,r.useRef)(null);return(0,r.useCallback)(r=>{if(null===r){let e=n.current;e&&(n.current=null,e());let t=a.current;t&&(a.current=null,t())}else e&&(n.current=i(e,r)),t&&(a.current=i(t,r))},[e,t])}function i(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let n=e(t);return"function"==typeof n?n:()=>e(null)}}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},605500,(e,t,n)=>{"use strict";e.i(247167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Image",{enumerable:!0,get:function(){return v}});let r=e.r(555682),a=e.r(190809),i=e.r(843476),s=a._(e.r(271645)),o=r._(e.r(174080)),l=r._(e.r(325633)),c=e.r(908927),u=e.r(987690),d=e.r(918556),p=e.r(65856),m=r._(e.r(1948)),f=e.r(818581),h={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function g(e,t,n,r,a,i,s){let o=e?.src;e&&e["data-loaded-src"]!==o&&(e["data-loaded-src"]=o,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&a(!0),n?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let r=!1,a=!1;n.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>r,isPropagationStopped:()=>a,persist:()=>{},preventDefault:()=>{r=!0,t.preventDefault()},stopPropagation:()=>{a=!0,t.stopPropagation()}})}r?.current&&r.current(e)}}))}function b(e){return s.use?{fetchPriority:e}:{fetchpriority:e}}"u"<typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let y="u"<typeof window?s.useEffect:s.useLayoutEffect,E=(0,s.forwardRef)(({src:e,srcSet:t,sizes:n,height:r,width:a,decoding:o,className:l,style:c,fetchPriority:u,placeholder:d,loading:p,unoptimized:m,fill:h,onLoadRef:E,onLoadingCompleteRef:x,setBlurComplete:v,setShowAltText:T,sizesInput:S,onLoad:_,onError:k,...w},A)=>{let N=(0,s.useRef)(!1),I=(0,s.useRef)(null);y(()=>{let{current:e}=N,{current:t}=I;e||null===t||(k&&(t.src=t.src),t.complete&&g(t,d,E,x,v,m,S),N.current=!0)},[e,d,E,x,k,m,S]);let C=(0,f.useMergedRef)(A,I);return(0,i.jsx)("img",{...w,...b(u),loading:p,width:a,height:r,decoding:o,"data-nimg":h?"fill":"1",className:l,style:c,sizes:n,srcSet:t,src:e,ref:C,onLoad:e=>{g(e.currentTarget,d,E,x,v,m,S)},onError:e=>{T(!0),"empty"!==d&&v(!0),k&&k(e)}})});function x({isAppRouter:e,imgAttributes:t}){let n={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...b(t.fetchPriority)};return e&&o.default.preload?(o.default.preload(t.src,n),null):(0,i.jsx)(l.default,{children:(0,i.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...n},"__nimg-"+t.src+t.srcSet+t.sizes)})}let v=(0,s.forwardRef)((e,t)=>{let n=(0,s.useContext)(p.RouterContext),r=(0,s.useContext)(d.ImageConfigContext),a=(0,s.useMemo)(()=>{let e=h||r||u.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),n=e.deviceSizes.sort((e,t)=>e-t),a=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:n,qualities:a,localPatterns:"u"<typeof window?r?.localPatterns:e.localPatterns}},[r]),{onLoad:o,onLoadingComplete:l}=e,f=(0,s.useRef)(o);(0,s.useEffect)(()=>{f.current=o},[o]);let g=(0,s.useRef)(l);(0,s.useEffect)(()=>{g.current=l},[l]);let[b,y]=(0,s.useState)(!1),[v,T]=(0,s.useState)(!1),{props:S,meta:_}=(0,c.getImgProps)(e,{defaultLoader:m.default,imgConf:a,blurComplete:b,showAltText:v});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(E,{...S,unoptimized:_.unoptimized,placeholder:_.placeholder,fill:_.fill,onLoadRef:f,onLoadingCompleteRef:g,setBlurComplete:y,setShowAltText:T,sizesInput:e.sizes,ref:t}),_.preload?(0,i.jsx)(x,{isAppRouter:!n,imgAttributes:S}):null]})});("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},794909,(e,t,n)=>{"use strict";e.i(247167),Object.defineProperty(n,"__esModule",{value:!0});var r={default:function(){return u},getImageProps:function(){return c}};for(var a in r)Object.defineProperty(n,a,{enumerable:!0,get:r[a]});let i=e.r(555682),s=e.r(908927),o=e.r(605500),l=i._(e.r(1948));function c(e){let{props:t}=(0,s.getImgProps)(e,{defaultLoader:l.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,n]of Object.entries(t))void 0===n&&delete t[e];return{props:t}}let u=o.Image},657688,(e,t,n)=>{t.exports=e.r(794909)},488143,(e,t,n)=>{"use strict";function r({widthInt:e,heightInt:t,blurWidth:n,blurHeight:a,blurDataURL:i,objectFit:s}){let o=n?40*n:e,l=a?40*a:t,c=o&&l?`viewBox='0 0 ${o} ${l}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${c}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${c?"none":"contain"===s?"xMidYMid":"cover"===s?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${i}'/%3E%3C/svg%3E`}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"getImageBlurSvg",{enumerable:!0,get:function(){return r}})},987690,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={VALID_LOADERS:function(){return i},imageConfigDefault:function(){return s}};for(var a in r)Object.defineProperty(n,a,{enumerable:!0,get:r[a]});let i=["default","imgix","cloudinary","akamai","custom"],s={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumDiskCacheSize:void 0,maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1,customCacheHandler:!1}},908927,(e,t,n)=>{"use strict";e.i(247167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"getImgProps",{enumerable:!0,get:function(){return c}});let r=e.r(543369),a=e.r(488143),i=e.r(987690),s=["-moz-initial","fill","none","scale-down",void 0];function o(e){return void 0!==e.default}function l(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function c({src:e,sizes:t,unoptimized:n=!1,priority:u=!1,preload:d=!1,loading:p,className:m,quality:f,width:h,height:g,fill:b=!1,style:y,overrideSrc:E,onLoad:x,onLoadingComplete:v,placeholder:T="empty",blurDataURL:S,fetchPriority:_,decoding:k="async",layout:w,objectFit:A,objectPosition:N,lazyBoundary:I,lazyRoot:C,...R},O){var D;let L,M,P,{imgConf:j,showAltText:F,blurComplete:U,defaultLoader:B}=O,z=j||i.imageConfigDefault;if("allSizes"in z)L=z;else{let e=[...z.deviceSizes,...z.imageSizes].sort((e,t)=>e-t),t=z.deviceSizes.sort((e,t)=>e-t),n=z.qualities?.sort((e,t)=>e-t);L={...z,allSizes:e,deviceSizes:t,qualities:n}}if(void 0===B)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let H=R.loader||B;delete R.loader,delete R.srcSet;let $="__next_img_default"in H;if($){if("custom"===L.loader)throw Object.defineProperty(Error(`Image with src "${e}" is missing "loader" prop.
|
|
3
|
+
Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=H;H=t=>{let{config:n,...r}=t;return e(r)}}if(w){"fill"===w&&(b=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[w];e&&(y={...y,...e});let n={responsive:"100vw",fill:"100vw"}[w];n&&!t&&(t=n)}let G="",q=l(h),W=l(g);if((D=e)&&"object"==typeof D&&(o(D)||void 0!==D.src)){let t=o(e)?e.default:e;if(!t.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!t.height||!t.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(M=t.blurWidth,P=t.blurHeight,S=S||t.blurDataURL,G=t.src,!b)if(q||W){if(q&&!W){let e=q/t.width;W=Math.round(t.height*e)}else if(!q&&W){let e=W/t.height;q=Math.round(t.width*e)}}else q=t.width,W=t.height}let V=!u&&!d&&("lazy"===p||void 0===p);(!(e="string"==typeof e?e:G)||e.startsWith("data:")||e.startsWith("blob:"))&&(n=!0,V=!1),L.unoptimized&&(n=!0),$&&!L.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(n=!0);let Y=l(f),K=Object.assign(b?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:A,objectPosition:N}:{},F?{}:{color:"transparent"},y),X=U||"empty"===T?null:"blur"===T?`url("data:image/svg+xml;charset=utf-8,${(0,a.getImageBlurSvg)({widthInt:q,heightInt:W,blurWidth:M,blurHeight:P,blurDataURL:S||"",objectFit:K.objectFit})}")`:`url("${T}")`,Z=s.includes(K.objectFit)?"fill"===K.objectFit?"100% 100%":"cover":K.objectFit,Q=X?{backgroundSize:Z,backgroundPosition:K.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:X}:{},J=function({config:e,src:t,unoptimized:n,width:a,quality:i,sizes:s,loader:o}){if(n){if(t.startsWith("/")&&!t.startsWith("//")){let e=(0,r.getDeploymentId)();if(t.includes("/_next/static/immutable")&&!(0,r.getAssetToken)())e=void 0;else if(e){let n=t.indexOf("?");if(-1!==n){let r=new URLSearchParams(t.slice(n+1));r.get("dpl")||(r.append("dpl",e),t=t.slice(0,n)+"?"+r.toString())}else t+=`?dpl=${e}`}}return{src:t,srcSet:void 0,sizes:void 0}}let{widths:l,kind:c}=function({deviceSizes:e,allSizes:t},n,r){if(r){let n=/(^|\s)(1?\d?\d)vw/g,a=[];for(let e;e=n.exec(r);)a.push(parseInt(e[2]));if(a.length){let n=.01*Math.min(...a);return{widths:t.filter(t=>t>=e[0]*n),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof n?{widths:e,kind:"w"}:{widths:[...new Set([n,2*n].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,a,s),u=l.length-1;return{sizes:s||"w"!==c?s:"100vw",srcSet:l.map((n,r)=>`${o({config:e,src:t,quality:i,width:n})} ${"w"===c?n:r+1}${c}`).join(", "),src:o({config:e,src:t,quality:i,width:l[u]})}}({config:L,src:e,unoptimized:n,width:q,quality:Y,sizes:t,loader:H}),ee=V?"lazy":p;return{props:{...R,loading:ee,fetchPriority:_,width:q,height:W,decoding:k,className:m,style:{...K,...Q},sizes:J.sizes,srcSet:J.srcSet,src:E||J.src},meta:{unoptimized:n,preload:d||u,placeholder:T,fill:b}}}},898879,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o}});let r=e.r(271645),a="u"<typeof window,i=a?()=>{}:r.useLayoutEffect,s=a?()=>{}:r.useEffect;function o(e){let{headManager:t,reduceComponentsToState:n}=e;function o(){if(t&&t.mountedInstances){let e=r.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(n(e))}}return a&&(t?.mountedInstances?.add(e.children),o()),i(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),i(()=>(t&&(t._pendingUpdate=o),()=>{t&&(t._pendingUpdate=o)})),s(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},755838,(e,t,n)=>{"use strict";var r=e.r(271645),a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,s=r.useEffect,o=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!a(e,n)}catch(e){return!0}}var u="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),a=r[0].inst,u=r[1];return o(function(){a.value=n,a.getSnapshot=t,c(a)&&u({inst:a})},[e,n,t]),s(function(){return c(a)&&u({inst:a}),e(function(){c(a)&&u({inst:a})})},[e]),l(n),n};n.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},802239,(e,t,n)=>{"use strict";e.i(247167),t.exports=e.r(755838)},952683,e=>{"use strict";let t,n,r,a,i,s,o,l,c,u,d,p,m,f,h,g,b,y,E,x;var v,T,S,_,k,w,A,N,I,C,R,O,D,L,M,P,j,F,U,B,z,H,$,G,q,W,V,Y,K,X,Z,Q,J,ee,et,en,er,ea,ei,es,eo,el=e.i(247167),ec=e.i(843476),eu=e.i(271645),ed=e.i(657688),ep=e.i(680902),em=e.i(622289);function ef(e,t,n){try{return e(t)}catch(e){return(0,em.l)("[nuqs] Error while parsing value `%s`: %O"+(n?" (for key `%s`)":""),t,e,n),null}}function eh(e){function t(t){if(void 0===t)return null;let n="";if(Array.isArray(t)){if(void 0===t[0])return null;n=t[0]}return"string"==typeof t&&(n=t),ef(e.parse,n)}return{type:"single",eq:(e,t)=>e===t,...e,parseServerSide:t,withDefault(e){return{...this,defaultValue:e,parseServerSide:n=>t(n)??e}},withOptions(e){return{...this,...e}}}}function eg(e,t){return e.valueOf()===t.valueOf()}eh({parse:e=>e,serialize:String}),eh({parse:e=>{let t=parseInt(e);return t==t?t:null},serialize:e=>""+Math.round(e)}),eh({parse:e=>{let t=parseInt(e);return t==t?t-1:null},serialize:e=>""+Math.round(e+1)}),eh({parse:e=>{let t=parseInt(e,16);return t==t?t:null},serialize:e=>{let t=Math.round(e).toString(16);return(1&t.length?"0":"")+t}}),eh({parse:e=>{let t=parseFloat(e);return t==t?t:null},serialize:String}),eh({parse:e=>"true"===e.toLowerCase(),serialize:String}),eh({parse:e=>{let t=parseInt(e);return t==t?new Date(t):null},serialize:e=>""+e.valueOf(),eq:eg}),eh({parse:e=>{let t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:eg}),eh({parse:e=>{let t=new Date(e.slice(0,10));return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString().slice(0,10),eq:eg});let eb=(0,ep.r)(),ey={};function eE(e,t,n,r,a,i){let s=!1,o=Object.entries(e).reduce((e,[o,l])=>{var c;let u=t?.[o]??o,d=r[u],p="multi"===l.type?[]:null,m=void 0===d?("multi"===l.type?n?.getAll(u):n?.get(u))??p:d;return a&&i&&((c=a[u]??p)===m||null!==c&&null!==m&&"string"!=typeof c&&"string"!=typeof m&&c.length===m.length&&c.every((e,t)=>e===m[t]))?e[o]=i[o]??null:(s=!0,e[o]=((0,ep.i)(m)?null:ef(l.parse,m,u))??null,a&&(a[u]=m)),e},{});if(!s){let t=Object.keys(e),n=Object.keys(i??{});s=t.length!==n.length||t.some(e=>!n.includes(e))}return{state:o,hasChanged:s}}function ex(e,t){return Object.fromEntries(Object.keys(e).map(n=>[n,e[n]??t[n]??null]))}function ev(e,t={}){let{parse:n,type:r,serialize:a,eq:i,defaultValue:s,...o}=t,[{[e]:l},c]=function(e,t={}){let n=(0,eu.useId)(),r=(0,em.i)(),a=(0,em.a)(),{history:i="replace",scroll:s=r?.scroll??!1,shallow:o=r?.shallow??!0,throttleMs:l=ep.s.timeMs,limitUrlUpdates:c=r?.limitUrlUpdates,clearOnDefault:u=r?.clearOnDefault??!0,startTransition:d,urlKeys:p=ey}=t,m=Object.keys(e).join(","),f=(0,eu.useMemo)(()=>Object.fromEntries(Object.keys(e).map(e=>[e,p[e]??e])),[m,JSON.stringify(p)]),h=(0,em.r)(Object.values(f)),g=h.searchParams,b=(0,eu.useRef)({}),y=(0,eu.useMemo)(()=>Object.fromEntries(Object.keys(e).map(t=>[t,e[t].defaultValue??null])),[Object.values(e).map(({defaultValue:e})=>e).join(",")]),E=ep.t.useQueuedQueries(Object.values(f)),[x,v]=(0,eu.useState)(()=>eE(e,p,g??new URLSearchParams,E).state),T=(0,eu.useRef)(x);if((0,em.c)("[nuq+ %s `%s`] render - state: %O, iSP: %s",n,m,x,g),Object.keys(b.current).join("&")!==Object.values(f).join("&")){let{state:t,hasChanged:r}=eE(e,p,g,E,b.current,T.current);r&&((0,em.c)("[nuq+ %s `%s`] State changed: %O",n,m,{state:t,initialSearchParams:g,queuedQueries:E,queryRef:b.current,stateRef:T.current}),T.current=t,v(t)),b.current=Object.fromEntries(Object.entries(f).map(([t,n])=>[n,e[t]?.type==="multi"?g?.getAll(n):g?.get(n)??null]))}(0,eu.useEffect)(()=>{let{state:t,hasChanged:r}=eE(e,p,g,E,b.current,T.current);r&&((0,em.c)("[nuq+ %s `%s`] State changed: %O",n,m,{state:t,initialSearchParams:g,queuedQueries:E,queryRef:b.current,stateRef:T.current}),T.current=t,v(t))},[Object.values(f).map(e=>`${e}=${g?.getAll(e)}`).join("&"),JSON.stringify(E)]),(0,eu.useEffect)(()=>{let t=Object.keys(e).reduce((t,r)=>(t[r]=({state:t,query:a})=>{v(i=>{let{defaultValue:s}=e[r],o=f[r],l=t??s??null;return Object.is(i[r]??s??null,l)?((0,em.c)("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). no change, skipping, resolved: %O",n,m,o,t,s,T.current),i):(T.current={...T.current,[r]:l},b.current[o]=a,(0,em.c)("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). updateInternalState, resolved: %O",n,m,o,t,s,T.current),T.current)})},t),{});for(let r of Object.keys(e)){let e=f[r];(0,em.c)("[nuq+ %s `%s`] Subscribing to sync for `%s`",n,e,m),eb.on(e,t[r])}return()=>{for(let r of Object.keys(e)){let e=f[r];(0,em.c)("[nuq+ %s `%s`] Unsubscribing to sync for `%s`",n,e,m),eb.off(e,t[r])}}},[m,f]);let S=(0,eu.useCallback)((t,r={})=>{let p,g=Object.fromEntries(Object.keys(e).map(e=>[e,null])),b="function"==typeof t?t(ex(T.current,y))??g:t??g;(0,em.c)("[nuq+ %s `%s`] setState: %O",n,m,b);let E=0,x=!1,v=[];for(let[t,n]of Object.entries(b)){let m=e[t],g=f[t];if(!m||void 0===n)continue;(r.clearOnDefault??m.clearOnDefault??u)&&null!==n&&void 0!==m.defaultValue&&(m.eq??((e,t)=>e===t))(n,m.defaultValue)&&(n=null);let b=null===n?null:(m.serialize??String)(n);eb.emit(g,{state:n,query:b});let y={key:g,query:b,options:{history:r.history??m.history??i,shallow:r.shallow??m.shallow??o,scroll:r.scroll??m.scroll??s,startTransition:r.startTransition??m.startTransition??d}};if(r?.limitUrlUpdates?.method==="debounce"||c?.method==="debounce"||m.limitUrlUpdates?.method==="debounce"){!0===y.options.shallow&&console.warn((0,em.s)(422));let e=r?.limitUrlUpdates?.timeMs??c?.timeMs??m.limitUrlUpdates?.timeMs??ep.s.timeMs,t=ep.t.push(y,e,h,a);E<e&&(p=t,E=e)}else{let e=r?.limitUrlUpdates?.timeMs??m?.limitUrlUpdates?.timeMs??c?.timeMs??r.throttleMs??m.throttleMs??l;v.push(ep.t.abort(g)),ep.n.push(y,e),x=!0}}let S=v.reduce((e,t)=>t(e),x?ep.n.flush(h,a):ep.n.getPendingPromise(h));return p??S},[m,i,o,s,l,c?.method,c?.timeMs,d,f,h.updateUrl,h.getSearchParamsSnapshot,h.rateLimitFactor,a,y]);return[(0,eu.useMemo)(()=>ex(x,y),[x,y]),S]}({[e]:{parse:n??(e=>e),type:r,serialize:a,eq:i,defaultValue:s}},o);return[l,(0,eu.useCallback)((t,n={})=>c(n=>({[e]:"function"==typeof t?t(n[e]):t}),n),[e,c])]}let eT="EvoScientist",eS="evoscientist-config";function e_(){let e=localStorage.getItem(eS);if(!e)return null;try{let t=JSON.parse(e);if(!t.deploymentUrl?.trim())return null;return{...t,assistantId:eT}}catch{return null}}function ek(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function ew(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function eA(...e){return t=>{let n=!1,r=e.map(e=>{let r=ew(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():ew(e[t],null)}}}}function eN(...e){return eu.useCallback(eA(...e),e)}function eI(e,t=[]){let n=[],r=()=>{let t=n.map(e=>eu.createContext(e));return function(n){let r=n?.[e]||t;return eu.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return r.scopeName=e,[function(t,r){let a=eu.createContext(r),i=n.length;n=[...n,r];let s=t=>{let{scope:n,children:r,...s}=t,o=n?.[e]?.[i]||a,l=eu.useMemo(()=>s,Object.values(s));return(0,ec.jsx)(o.Provider,{value:l,children:r})};return s.displayName=t+"Provider",[s,function(n,s){let o=s?.[e]?.[i]||a,l=eu.useContext(o);if(l)return l;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 a=n(e)[`__scope${r}`];return{...t,...a}},{});return eu.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}(r,...t)]}"u">typeof window&&window.document&&window.document.createElement;var eC=globalThis?.document?eu.useLayoutEffect:()=>{},eR=eu[" useId ".trim().toString()]||(()=>void 0),eO=0;function eD(e){let[t,n]=eu.useState(eR());return eC(()=>{e||n(e=>e??String(eO++))},[e]),e||(t?`radix-${t}`:"")}eu[" useEffectEvent ".trim().toString()],eu[" useInsertionEffect ".trim().toString()];var eL=eu[" useInsertionEffect ".trim().toString()]||eC;function eM({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[a,i,s]=function({defaultProp:e,onChange:t}){let[n,r]=eu.useState(e),a=eu.useRef(n),i=eu.useRef(t);return eL(()=>{i.current=t},[t]),eu.useEffect(()=>{a.current!==n&&(i.current?.(n),a.current=n)},[n,a]),[n,r,i]}({defaultProp:t,onChange:n}),o=void 0!==e,l=o?e:a;{let t=eu.useRef(void 0!==e);eu.useEffect(()=>{let e=t.current;if(e!==o){let t=o?"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=o},[o,r])}return[l,eu.useCallback(t=>{if(o){let n="function"==typeof t?t(e):t;n!==e&&s.current?.(n)}else i(t)},[o,e,i,s])]}Symbol("RADIX:SYNC_STATE");var eP=e.i(174080),ej=Symbol("radix.slottable");function eF(e){return eu.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===ej}var eU=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{var n,r;let a,i,s,o=(r=n=`Primitive.${t}`,(a=eu.forwardRef((e,t)=>{let{children:n,...r}=e;if(eu.isValidElement(n)){var a;let e,i,s=(a=n,(i=(e=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.ref:(i=(e=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.props.ref:a.props.ref||a.ref),o=function(e,t){let n={...t};for(let r in t){let a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...e)=>{let t=i(...e);return a(...e),t}:a&&(n[r]=a):"style"===r?n[r]={...a,...i}:"className"===r&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==eu.Fragment&&(o.ref=t?eA(t,s):s),eu.cloneElement(n,o)}return eu.Children.count(n)>1?eu.Children.only(null):null})).displayName=`${r}.SlotClone`,i=a,(s=eu.forwardRef((e,t)=>{let{children:n,...r}=e,a=eu.Children.toArray(n),s=a.find(eF);if(s){let e=s.props.children,n=a.map(t=>t!==s?t:eu.Children.count(e)>1?eu.Children.only(null):eu.isValidElement(e)?e.props.children:null);return(0,ec.jsx)(i,{...r,ref:t,children:eu.isValidElement(e)?eu.cloneElement(e,void 0,n):null})}return(0,ec.jsx)(i,{...r,ref:t,children:n})})).displayName=`${n}.Slot`,s),l=eu.forwardRef((e,n)=>{let{asChild:r,...a}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,ec.jsx)(r?o:t,{...a,ref:n})});return l.displayName=`Primitive.${t}`,{...e,[t]:l}},{});function eB(e,t){e&&eP.flushSync(()=>e.dispatchEvent(t))}function ez(e){let t=eu.useRef(e);return eu.useEffect(()=>{t.current=e}),eu.useMemo(()=>(...e)=>t.current?.(...e),[])}var eH="dismissableLayer.update",e$=eu.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),eG=eu.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:s,onDismiss:o,...l}=e,c=eu.useContext(e$),[u,d]=eu.useState(null),p=u?.ownerDocument??globalThis?.document,[,m]=eu.useState({}),f=eN(t,e=>d(e)),h=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=h.indexOf(g),y=u?h.indexOf(u):-1,E=c.layersWithOutsidePointerEventsDisabled.size>0,x=y>=b,v=function(e,t=globalThis?.document){let n=ez(e),r=eu.useRef(!1),a=eu.useRef(()=>{});return eu.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){eW("dismissableLayer.pointerDownOutside",n,i,{discrete:!0})},i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=r,t.addEventListener("click",a.current,{once:!0})):r()}else t.removeEventListener("click",a.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{let t=e.target,n=[...c.branches].some(e=>e.contains(t));x&&!n&&(a?.(e),s?.(e),e.defaultPrevented||o?.())},p),T=function(e,t=globalThis?.document){let n=ez(e),r=eu.useRef(!1);return eu.useEffect(()=>{let e=e=>{e.target&&!r.current&&eW("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;![...c.branches].some(e=>e.contains(t))&&(i?.(e),s?.(e),e.defaultPrevented||o?.())},p);return!function(e,t=globalThis?.document){let n=ez(e);eu.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=>{y===c.layers.size-1&&(r?.(e),!e.defaultPrevented&&o&&(e.preventDefault(),o()))},p),eu.useEffect(()=>{if(u)return n&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(G=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),eq(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=G)}},[u,p,n,c]),eu.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),eq())},[u,c]),eu.useEffect(()=>{let e=()=>m({});return document.addEventListener(eH,e),()=>document.removeEventListener(eH,e)},[]),(0,ec.jsx)(eU.div,{...l,ref:f,style:{pointerEvents:E?x?"auto":"none":void 0,...e.style},onFocusCapture:ek(e.onFocusCapture,T.onFocusCapture),onBlurCapture:ek(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:ek(e.onPointerDownCapture,v.onPointerDownCapture)})});function eq(){let e=new CustomEvent(eH);document.dispatchEvent(e)}function eW(e,t,n,{discrete:r}){let a=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?eB(a,i):a.dispatchEvent(i)}eG.displayName="DismissableLayer",eu.forwardRef((e,t)=>{let n=eu.useContext(e$),r=eu.useRef(null),a=eN(t,r);return eu.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,ec.jsx)(eU.div,{...e,ref:a})}).displayName="DismissableLayerBranch";var eV="focusScope.autoFocusOnMount",eY="focusScope.autoFocusOnUnmount",eK={bubbles:!1,cancelable:!0},eX=eu.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...s}=e,[o,l]=eu.useState(null),c=ez(a),u=ez(i),d=eu.useRef(null),p=eN(t,e=>l(e)),m=eu.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;eu.useEffect(()=>{if(r){let e=function(e){if(m.paused||!o)return;let t=e.target;o.contains(t)?d.current=t:eJ(d.current,{select:!0})},t=function(e){if(m.paused||!o)return;let t=e.relatedTarget;null!==t&&(o.contains(t)||eJ(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&&eJ(o)});return o&&n.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[r,o,m.paused]),eu.useEffect(()=>{if(o){e0.add(m);let e=document.activeElement;if(!o.contains(e)){let t=new CustomEvent(eV,eK);o.addEventListener(eV,c),o.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(eJ(r,{select:t}),document.activeElement!==n)return}(eZ(o).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&eJ(o))}return()=>{o.removeEventListener(eV,c),setTimeout(()=>{let t=new CustomEvent(eY,eK);o.addEventListener(eY,u),o.dispatchEvent(t),t.defaultPrevented||eJ(e??document.body,{select:!0}),o.removeEventListener(eY,u),e0.remove(m)},0)}}},[o,c,u,m]);let f=eu.useCallback(e=>{if(!n&&!r||m.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,a=document.activeElement;if(t&&a){var i;let t,r=e.currentTarget,[s,o]=[eQ(t=eZ(i=r),i),eQ(t.reverse(),i)];s&&o?e.shiftKey||a!==o?e.shiftKey&&a===s&&(e.preventDefault(),n&&eJ(o,{select:!0})):(e.preventDefault(),n&&eJ(s,{select:!0})):a===r&&e.preventDefault()}},[n,r,m.paused]);return(0,ec.jsx)(eU.div,{tabIndex:-1,...s,ref:p,onKeyDown:f})});function eZ(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 eQ(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 eJ(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()}}eX.displayName="FocusScope";var e0=(b=[],{add(e){let t=b[0];e!==t&&t?.pause(),(b=e1(b,e)).unshift(e)},remove(e){b=e1(b,e),b[0]?.resume()}});function e1(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}var e2=eu.forwardRef((e,t)=>{let{container:n,...r}=e,[a,i]=eu.useState(!1);eC(()=>i(!0),[]);let s=n||a&&globalThis?.document?.body;return s?eP.default.createPortal((0,ec.jsx)(eU.div,{...r,ref:t}),s):null});e2.displayName="Portal";var e3=e=>{var t;let n,r,{present:a,children:i}=e,s=function(e){var t,n;let[r,a]=eu.useState(),i=eu.useRef(null),s=eu.useRef(e),o=eu.useRef("none"),[l,c]=(t=e?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},eu.useReducer((e,t)=>n[e][t]??e,t));return eu.useEffect(()=>{let e=e4(i.current);o.current="mounted"===l?e:"none"},[l]),eC(()=>{let t=i.current,n=s.current;if(n!==e){let r=o.current,a=e4(t);e?c("MOUNT"):"none"===a||t?.display==="none"?c("UNMOUNT"):n&&r!==a?c("ANIMATION_OUT"):c("UNMOUNT"),s.current=e}},[e,c]),eC(()=>{if(r){let e,t=r.ownerDocument.defaultView??window,n=n=>{let a=e4(i.current).includes(CSS.escape(n.animationName));if(n.target===r&&a&&(c("ANIMATION_END"),!s.current)){let n=r.style.animationFillMode;r.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=n)})}},a=e=>{e.target===r&&(o.current=e4(i.current))};return r.addEventListener("animationstart",a),r.addEventListener("animationcancel",n),r.addEventListener("animationend",n),()=>{t.clearTimeout(e),r.removeEventListener("animationstart",a),r.removeEventListener("animationcancel",n),r.removeEventListener("animationend",n)}}c("ANIMATION_END")},[r,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:eu.useCallback(e=>{i.current=e?getComputedStyle(e):null,a(e)},[])}}(a),o="function"==typeof i?i({present:s.isPresent}):eu.Children.only(i),l=eN(s.ref,(t=o,(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 i||s.isPresent?eu.cloneElement(o,{ref:l}):null};function e4(e){return e?.animationName||"none"}e3.displayName="Presence";var e5=0;function e6(){eu.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??e9()),document.body.insertAdjacentElement("beforeend",e[1]??e9()),e5++,()=>{1===e5&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),e5--}},[])}function e9(){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 e8=function(){return(e8=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function e7(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 a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)0>t.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}var te=("function"==typeof SuppressedError&&SuppressedError,"right-scroll-bar-position"),tt="width-before-scroll-bar";function tn(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var tr="u">typeof window?eu.useLayoutEffect:eu.useEffect,ta=new WeakMap,ti=(void 0===v&&(v={}),(void 0===T&&(T=function(e){return e}),S=[],_=!1,k={read:function(){if(_)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return S.length?S[S.length-1]:null},useMedium:function(e){var t=T(e,_);return S.push(t),function(){S=S.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(_=!0;S.length;){var t=S;S=[],t.forEach(e)}S={push:function(t){return e(t)},filter:function(){return S}}},assignMedium:function(e){_=!0;var t=[];if(S.length){var n=S;S=[],n.forEach(e),t=S}var r=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(r)};a(),S={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),S}}}}).options=e8({async:!0,ssr:!1},v),k),ts=function(){},to=eu.forwardRef(function(e,t){var n,r,a,i,s=eu.useRef(null),o=eu.useState({onScrollCapture:ts,onWheelCapture:ts,onTouchMoveCapture:ts}),l=o[0],c=o[1],u=e.forwardProps,d=e.children,p=e.className,m=e.removeScrollBar,f=e.enabled,h=e.shards,g=e.sideCar,b=e.noRelative,y=e.noIsolation,E=e.inert,x=e.allowPinchZoom,v=e.as,T=e.gapMode,S=e7(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=(n=[s,t],r=function(e){return n.forEach(function(t){return tn(t,e)})},(a=(0,eu.useState)(function(){return{value:null,callback:r,facade:{get current(){return a.value},set current(value){var e=a.value;e!==value&&(a.value=value,a.callback(value,e))}}}})[0]).callback=r,i=a.facade,tr(function(){var e=ta.get(i);if(e){var t=new Set(e),r=new Set(n),a=i.current;t.forEach(function(e){r.has(e)||tn(e,null)}),r.forEach(function(e){t.has(e)||tn(e,a)})}ta.set(i,n)},[n]),i),k=e8(e8({},S),l);return eu.createElement(eu.Fragment,null,f&&eu.createElement(g,{sideCar:ti,removeScrollBar:m,shards:h,noRelative:b,noIsolation:y,inert:E,setCallbacks:c,allowPinchZoom:!!x,lockRef:s,gapMode:T}),u?eu.cloneElement(eu.Children.only(d),e8(e8({},k),{ref:_})):eu.createElement(void 0===v?"div":v,e8({},k,{className:p,ref:_}),d))});to.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},to.classNames={fullWidth:tt,zeroRight:te};var tl=function(e){var t=e.sideCar,n=e7(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 eu.createElement(r,e8({},n))};tl.isSideCarExport=!0;var tc=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=q||("u">typeof __webpack_nonce__?__webpack_nonce__:void 0);return t&&e.setAttribute("nonce",t),e}())){var r,a;(r=t).styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),a=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(a)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},tu=function(){var e=tc();return function(t,n){eu.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},td=function(){var e=tu();return function(t){return e(t.styles,t.dynamic),null}},tp={left:0,top:0,right:0,gap:0},tm=function(e){return parseInt(e||"",10)||0},tf=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],a=t["padding"===e?"paddingRight":"marginRight"];return[tm(n),tm(r),tm(a)]},th=function(e){if(void 0===e&&(e="margin"),"u"<typeof window)return tp;var t=tf(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])}},tg=td(),tb="data-scroll-locked",ty=function(e,t,n,r){var a=e.left,i=e.top,s=e.right,o=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(o,"px ").concat(r,";\n }\n body[").concat(tb,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(a,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(s,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(o,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(o,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(te," {\n right: ").concat(o,"px ").concat(r,";\n }\n \n .").concat(tt," {\n margin-right: ").concat(o,"px ").concat(r,";\n }\n \n .").concat(te," .").concat(te," {\n right: 0 ").concat(r,";\n }\n \n .").concat(tt," .").concat(tt," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(tb,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(o,"px;\n }\n")},tE=function(){var e=parseInt(document.body.getAttribute(tb)||"0",10);return isFinite(e)?e:0},tx=function(){eu.useEffect(function(){return document.body.setAttribute(tb,(tE()+1).toString()),function(){var e=tE()-1;e<=0?document.body.removeAttribute(tb):document.body.setAttribute(tb,e.toString())}},[])},tv=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=void 0===r?"margin":r;tx();var i=eu.useMemo(function(){return th(a)},[a]);return eu.createElement(tg,{styles:ty(i,!t,a,n?"":"!important")})},tT=!1;if("u">typeof window)try{var tS=Object.defineProperty({},"passive",{get:function(){return tT=!0,!0}});window.addEventListener("test",tS,tS),window.removeEventListener("test",tS,tS)}catch(e){tT=!1}var t_=!!tT&&{passive:!1},tk=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])},tw=function(e,t){var n=t.ownerDocument,r=t;do{if("u">typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),tA(e,r)){var a=tN(e,r);if(a[1]>a[2])return!0}r=r.parentNode}while(r&&r!==n.body)return!1},tA=function(e,t){return"v"===e?tk(t,"overflowY"):tk(t,"overflowX")},tN=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},tI=function(e,t,n,r,a){var i,s=(i=window.getComputedStyle(t).direction,"h"===e&&"rtl"===i?-1:1),o=s*r,l=n.target,c=t.contains(l),u=!1,d=o>0,p=0,m=0;do{if(!l)break;var f=tN(e,l),h=f[0],g=f[1]-f[2]-s*h;(h||g)&&tA(e,l)&&(p+=g,m+=h);var b=l.parentNode;l=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!c&&l!==document.body||c&&(t.contains(l)||t===l))return d&&(a&&1>Math.abs(p)||!a&&o>p)?u=!0:!d&&(a&&1>Math.abs(m)||!a&&-o>m)&&(u=!0),u},tC=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},tR=function(e){return[e.deltaX,e.deltaY]},tO=function(e){return e&&"current"in e?e.current:e},tD=0,tL=[];let tM=(w=function(e){var t=eu.useRef([]),n=eu.useRef([0,0]),r=eu.useRef(),a=eu.useState(tD++)[0],i=eu.useState(td)[0],s=eu.useRef(e);eu.useEffect(function(){s.current=e},[e]),eu.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var t=(function(e,t,n){if(n||2==arguments.length)for(var r,a=0,i=t.length;a<i;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))})([e.lockRef.current],(e.shards||[]).map(tO),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var o=eu.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!s.current.allowPinchZoom;var a,i=tC(e),o=n.current,l="deltaX"in e?e.deltaX:o[0]-i[0],c="deltaY"in e?e.deltaY:o[1]-i[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var p=window.getSelection(),m=p&&p.anchorNode;if(m&&(m===u||m.contains(u)))return!1;var f=tw(d,u);if(!f)return!0;if(f?a=d:(a="v"===d?"h":"v",f=tw(d,u)),!f)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=a),!a)return!0;var h=r.current||a;return tI(h,t,e,"h"===h?l:c,!0)},[]),l=eu.useCallback(function(e){if(tL.length&&tL[tL.length-1]===i){var n="deltaY"in e?tR(e):tC(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 a=(s.current.shards||[]).map(tO).filter(Boolean).filter(function(t){return t.contains(e.target)});(a.length>0?o(e,a[0]):!s.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),c=eu.useCallback(function(e,n,r,a){var i={name:e,delta:n,target:r,should:a,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(i),setTimeout(function(){t.current=t.current.filter(function(e){return e!==i})},1)},[]),u=eu.useCallback(function(e){n.current=tC(e),r.current=void 0},[]),d=eu.useCallback(function(t){c(t.type,tR(t),t.target,o(t,e.lockRef.current))},[]),p=eu.useCallback(function(t){c(t.type,tC(t),t.target,o(t,e.lockRef.current))},[]);eu.useEffect(function(){return tL.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,t_),document.addEventListener("touchmove",l,t_),document.addEventListener("touchstart",u,t_),function(){tL=tL.filter(function(e){return e!==i}),document.removeEventListener("wheel",l,t_),document.removeEventListener("touchmove",l,t_),document.removeEventListener("touchstart",u,t_)}},[]);var m=e.removeScrollBar,f=e.inert;return eu.createElement(eu.Fragment,null,f?eu.createElement(i,{styles:"\n .block-interactivity-".concat(a," {pointer-events: none;}\n .allow-interactivity-").concat(a," {pointer-events: all;}\n")}):null,m?eu.createElement(tv,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},ti.useMedium(w),tl);var tP=eu.forwardRef(function(e,t){return eu.createElement(to,e8({},e,{ref:t,sideCar:tM}))});tP.classNames=to.classNames;var tj=new WeakMap,tF=new WeakMap,tU={},tB=0,tz=function(e){return e&&(e.host||tz(e.parentNode))},tH=function(e,t,n,r){var a=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var n=tz(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});tU[n]||(tU[n]=new WeakMap);var i=tU[n],s=[],o=new Set,l=new Set(a),c=function(e){!e||o.has(e)||(o.add(e),c(e.parentNode))};a.forEach(c);var u=function(e){!e||l.has(e)||Array.prototype.forEach.call(e.children,function(e){if(o.has(e))u(e);else try{var t=e.getAttribute(r),a=null!==t&&"false"!==t,l=(tj.get(e)||0)+1,c=(i.get(e)||0)+1;tj.set(e,l),i.set(e,c),s.push(e),1===l&&a&&tF.set(e,!0),1===c&&e.setAttribute(n,"true"),a||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return u(t),o.clear(),tB++,function(){s.forEach(function(e){var t=tj.get(e)-1,a=i.get(e)-1;tj.set(e,t),i.set(e,a),t||(tF.has(e)||e.removeAttribute(r),tF.delete(e)),a||e.removeAttribute(n)}),--tB||(tj=new WeakMap,tj=new WeakMap,tF=new WeakMap,tU={})}},t$=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=t||("u"<typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),tH(r,a,n,"aria-hidden")):function(){return null}},tG=Symbol("radix.slottable");function tq(e){return eu.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===tG}var tW="Dialog",[tV,tY]=eI(tW),[tK,tX]=tV(tW),tZ=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,o=eu.useRef(null),l=eu.useRef(null),[c,u]=eM({prop:r,defaultProp:a??!1,onChange:i,caller:tW});return(0,ec.jsx)(tK,{scope:t,triggerRef:o,contentRef:l,contentId:eD(),titleId:eD(),descriptionId:eD(),open:c,onOpenChange:u,onOpenToggle:eu.useCallback(()=>u(e=>!e),[u]),modal:s,children:n})};tZ.displayName=tW;var tQ="DialogTrigger";eu.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,a=tX(tQ,n),i=eN(t,a.triggerRef);return(0,ec.jsx)(eU.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":nl(a.open),...r,ref:i,onClick:ek(e.onClick,a.onOpenToggle)})}).displayName=tQ;var tJ="DialogPortal",[t0,t1]=tV(tJ,{forceMount:void 0}),t2=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:a}=e,i=tX(tJ,t);return(0,ec.jsx)(t0,{scope:t,forceMount:n,children:eu.Children.map(r,e=>(0,ec.jsx)(e3,{present:n||i.open,children:(0,ec.jsx)(e2,{asChild:!0,container:a,children:e})}))})};t2.displayName=tJ;var t3="DialogOverlay",t4=eu.forwardRef((e,t)=>{let n=t1(t3,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=tX(t3,e.__scopeDialog);return i.modal?(0,ec.jsx)(e3,{present:r||i.open,children:(0,ec.jsx)(t6,{...a,ref:t})}):null});t4.displayName=t3;var t5=((y=eu.forwardRef((e,t)=>{let{children:n,...r}=e;if(eu.isValidElement(n)){var a;let e,i,s=(a=n,(i=(e=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.ref:(i=(e=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.props.ref:a.props.ref||a.ref),o=function(e,t){let n={...t};for(let r in t){let a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...e)=>{let t=i(...e);return a(...e),t}:a&&(n[r]=a):"style"===r?n[r]={...a,...i}:"className"===r&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==eu.Fragment&&(o.ref=t?eA(t,s):s),eu.cloneElement(n,o)}return eu.Children.count(n)>1?eu.Children.only(null):null})).displayName="DialogOverlay.RemoveScroll.SlotClone",a=y,(i=eu.forwardRef((e,t)=>{let{children:n,...r}=e,i=eu.Children.toArray(n),s=i.find(tq);if(s){let e=s.props.children,n=i.map(t=>t!==s?t:eu.Children.count(e)>1?eu.Children.only(null):eu.isValidElement(e)?e.props.children:null);return(0,ec.jsx)(a,{...r,ref:t,children:eu.isValidElement(e)?eu.cloneElement(e,void 0,n):null})}return(0,ec.jsx)(a,{...r,ref:t,children:n})})).displayName="DialogOverlay.RemoveScroll.Slot",i),t6=eu.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,a=tX(t3,n);return(0,ec.jsx)(tP,{as:t5,allowPinchZoom:!0,shards:[a.contentRef],children:(0,ec.jsx)(eU.div,{"data-state":nl(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),t9="DialogContent",t8=eu.forwardRef((e,t)=>{let n=t1(t9,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=tX(t9,e.__scopeDialog);return(0,ec.jsx)(e3,{present:r||i.open,children:i.modal?(0,ec.jsx)(t7,{...a,ref:t}):(0,ec.jsx)(ne,{...a,ref:t})})});t8.displayName=t9;var t7=eu.forwardRef((e,t)=>{let n=tX(t9,e.__scopeDialog),r=eu.useRef(null),a=eN(t,n.contentRef,r);return eu.useEffect(()=>{let e=r.current;if(e)return t$(e)},[]),(0,ec.jsx)(nt,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ek(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:ek(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:ek(e.onFocusOutside,e=>e.preventDefault())})}),ne=eu.forwardRef((e,t)=>{let n=tX(t9,e.__scopeDialog),r=eu.useRef(!1),a=eu.useRef(!1);return(0,ec.jsx)(nt,{...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,a.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));let i=t.target;n.triggerRef.current?.contains(i)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})}),nt=eu.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,...s}=e,o=tX(t9,n),l=eu.useRef(null),c=eN(t,l);return e6(),(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)(eX,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:i,children:(0,ec.jsx)(eG,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":nl(o.open),...s,ref:c,onDismiss:()=>o.onOpenChange(!1)})}),(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)(np,{titleId:o.titleId}),(0,ec.jsx)(nm,{contentRef:l,descriptionId:o.descriptionId})]})]})}),nn="DialogTitle",nr=eu.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,a=tX(nn,n);return(0,ec.jsx)(eU.h2,{id:a.titleId,...r,ref:t})});nr.displayName=nn;var na="DialogDescription",ni=eu.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,a=tX(na,n);return(0,ec.jsx)(eU.p,{id:a.descriptionId,...r,ref:t})});ni.displayName=na;var ns="DialogClose",no=eu.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,a=tX(ns,n);return(0,ec.jsx)(eU.button,{type:"button",...r,ref:t,onClick:ek(e.onClick,()=>a.onOpenChange(!1))})});function nl(e){return e?"open":"closed"}no.displayName=ns;var nc="DialogTitleWarning",[nu,nd]=(A={contentName:t9,titleName:nn,docsSlug:"dialog"},s=eu.createContext(A),(o=e=>{let{children:t,...n}=e,r=eu.useMemo(()=>n,Object.values(n));return(0,ec.jsx)(s.Provider,{value:r,children:t})}).displayName=nc+"Provider",[o,function(e){let t=eu.useContext(s);if(t)return t;if(void 0!==A)return A;throw Error(`\`${e}\` must be used within \`${nc}\``)}]),np=({titleId:e})=>{let t=nd(nc),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
4
|
+
|
|
5
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
6
|
+
|
|
7
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return eu.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},nm=({contentRef:e,descriptionId:t})=>{let n=nd("DialogDescriptionWarning"),r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${n.contentName}}.`;return eu.useEffect(()=>{let n=e.current?.getAttribute("aria-describedby");t&&n&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null};let nf=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},nh=(...e)=>e.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim();var ng={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let nb=(0,eu.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:i,iconNode:s,...o},l)=>(0,eu.createElement)("svg",{ref:l,...ng,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:nh("lucide",a),...!i&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(o)&&{"aria-hidden":"true"},...o},[...s.map(([e,t])=>(0,eu.createElement)(e,t)),...Array.isArray(i)?i:[i]])),ny=(e,t)=>{let n=(0,eu.forwardRef)(({className:n,...r},a)=>(0,eu.createElement)(nb,{ref:a,iconNode:t,className:nh(`lucide-${nf(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...r}));return n.displayName=nf(e),n},nE=ny("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),nx=(e,t)=>{if(0===e.length)return t.classGroupId;let n=e[0],r=t.nextPart.get(n),a=r?nx(e.slice(1),r):void 0;if(a)return a;if(0===t.validators.length)return;let i=e.join("-");return t.validators.find(({validator:e})=>e(i))?.classGroupId},nv=/^\[(.+)\]$/,nT=(e,t,n,r)=>{e.forEach(e=>{if("string"==typeof e){(""===e?t:nS(t,e)).classGroupId=n;return}"function"==typeof e?n_(e)?nT(e(r),t,n,r):t.validators.push({validator:e,classGroupId:n}):Object.entries(e).forEach(([e,a])=>{nT(a,nS(t,e),n,r)})})},nS=(e,t)=>{let n=e;return t.split("-").forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},n_=e=>e.isThemeGetter,nk=(e,t)=>t?e.map(([e,n])=>[e,n.map(e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e)]):e,nw=e=>{if(e.length<=1)return e;let t=[],n=[];return e.forEach(e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},nA=/\s+/;function nN(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=nI(e))&&(r&&(r+=" "),r+=t);return r}let nI=e=>{let t;if("string"==typeof e)return e;let n="";for(let r=0;r<e.length;r++)e[r]&&(t=nI(e[r]))&&(n&&(n+=" "),n+=t);return n},nC=e=>{let t=t=>t[e]||[];return t.isThemeGetter=!0,t},nR=/^\[(?:([a-z-]+):)?(.+)\]$/i,nO=/^\d+\/\d+$/,nD=new Set(["px","full","screen"]),nL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,nM=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,nP=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,nj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,nF=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,nU=e=>nz(e)||nD.has(e)||nO.test(e),nB=e=>n0(e,"length",n1),nz=e=>!!e&&!Number.isNaN(Number(e)),nH=e=>n0(e,"number",nz),n$=e=>!!e&&Number.isInteger(Number(e)),nG=e=>e.endsWith("%")&&nz(e.slice(0,-1)),nq=e=>nR.test(e),nW=e=>nL.test(e),nV=new Set(["length","size","percentage"]),nY=e=>n0(e,nV,n2),nK=e=>n0(e,"position",n2),nX=new Set(["image","url"]),nZ=e=>n0(e,nX,n4),nQ=e=>n0(e,"",n3),nJ=()=>!0,n0=(e,t,n)=>{let r=nR.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},n1=e=>nM.test(e)&&!nP.test(e),n2=()=>!1,n3=e=>nj.test(e),n4=e=>nF.test(e),n5=function(e){let t,n,r,a=function(s){let o;return n=(t={cache:(e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=new Map,r=new Map,a=(a,i)=>{n.set(a,i),++t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(a(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):a(e,t)}}})((o=[].reduce((e,t)=>t(e),e())).cacheSize),parseClassName:(e=>{let{separator:t,experimentalParseClassName:n}=e,r=1===t.length,a=t[0],i=t.length,s=e=>{let n,s=[],o=0,l=0;for(let c=0;c<e.length;c++){let u=e[c];if(0===o){if(u===a&&(r||e.slice(c,c+i)===t)){s.push(e.slice(l,c)),l=c+i;continue}if("/"===u){n=c;continue}}"["===u?o++:"]"===u&&o--}let c=0===s.length?e:e.substring(l),u=c.startsWith("!"),d=u?c.substring(1):c;return{modifiers:s,hasImportantModifier:u,baseClassName:d,maybePostfixModifierPosition:n&&n>l?n-l:void 0}};return n?e=>n({className:e,parseClassName:s}):s})(o),...(e=>{let t=(e=>{let{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return nk(Object.entries(e.classGroups),n).forEach(([e,n])=>{nT(n,r,e,t)}),r})(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{let n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),nx(n,t)||(e=>{if(nv.test(e)){let t=nv.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}})(e)},getConflictingClassGroupIds:(e,t)=>{let a=n[e]||[];return t&&r[e]?[...a,...r[e]]:a}}})(o)}).cache.get,r=t.cache.set,a=i,i(s)};function i(e){let a=n(e);if(a)return a;let i=((e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a}=t,i=[],s=e.trim().split(nA),o="";for(let e=s.length-1;e>=0;e-=1){let t=s[e],{modifiers:l,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:d}=n(t),p=!!d,m=r(p?u.substring(0,d):u);if(!m){if(!p||!(m=r(u))){o=t+(o.length>0?" "+o:o);continue}p=!1}let f=nw(l).join(":"),h=c?f+"!":f,g=h+m;if(i.includes(g))continue;i.push(g);let b=a(m,p);for(let e=0;e<b.length;++e){let t=b[e];i.push(h+t)}o=t+(o.length>0?" "+o:o)}return o})(e,t);return r(e,i),i}return function(){return a(nN.apply(null,arguments))}}(()=>{let e=nC("colors"),t=nC("spacing"),n=nC("blur"),r=nC("brightness"),a=nC("borderColor"),i=nC("borderRadius"),s=nC("borderSpacing"),o=nC("borderWidth"),l=nC("contrast"),c=nC("grayscale"),u=nC("hueRotate"),d=nC("invert"),p=nC("gap"),m=nC("gradientColorStops"),f=nC("gradientColorStopPositions"),h=nC("inset"),g=nC("margin"),b=nC("opacity"),y=nC("padding"),E=nC("saturate"),x=nC("scale"),v=nC("sepia"),T=nC("skew"),S=nC("space"),_=nC("translate"),k=()=>["auto","contain","none"],w=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto",nq,t],N=()=>[nq,t],I=()=>["",nU,nB],C=()=>["auto",nz,nq],R=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],O=()=>["solid","dashed","dotted","double","none"],D=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],L=()=>["start","end","center","between","around","evenly","stretch"],M=()=>["","0",nq],P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>[nz,nq];return{cacheSize:500,separator:":",theme:{colors:[nJ],spacing:[nU,nB],blur:["none","",nW,nq],brightness:j(),borderColor:[e],borderRadius:["none","","full",nW,nq],borderSpacing:N(),borderWidth:I(),contrast:j(),grayscale:M(),hueRotate:j(),invert:M(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[nG,nB],inset:A(),margin:A(),opacity:j(),padding:N(),saturate:j(),scale:j(),sepia:M(),skew:j(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",nq]}],container:["container"],columns:[{columns:[nW]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...R(),nq]}],overflow:[{overflow:w()}],"overflow-x":[{"overflow-x":w()}],"overflow-y":[{"overflow-y":w()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",n$,nq]}],basis:[{basis:A()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",nq]}],grow:[{grow:M()}],shrink:[{shrink:M()}],order:[{order:["first","last","none",n$,nq]}],"grid-cols":[{"grid-cols":[nJ]}],"col-start-end":[{col:["auto",{span:["full",n$,nq]},nq]}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":[nJ]}],"row-start-end":[{row:["auto",{span:[n$,nq]},nq]}],"row-start":[{"row-start":C()}],"row-end":[{"row-end":C()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",nq]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",nq]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...L()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...L(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...L(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",nq,t]}],"min-w":[{"min-w":[nq,t,"min","max","fit"]}],"max-w":[{"max-w":[nq,t,"none","full","min","max","fit","prose",{screen:[nW]},nW]}],h:[{h:[nq,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[nq,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[nq,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[nq,t,"auto","min","max","fit"]}],"font-size":[{text:["base",nW,nB]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",nH]}],"font-family":[{font:[nJ]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",nq]}],"line-clamp":[{"line-clamp":["none",nz,nH]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",nU,nq]}],"list-image":[{"list-image":["none",nq]}],"list-style-type":[{list:["none","disc","decimal",nq]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",nU,nB]}],"underline-offset":[{"underline-offset":["auto",nU,nq]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",nq]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",nq]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...R(),nK]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",nY]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},nZ]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[f]}],"gradient-via-pos":[{via:[f]}],"gradient-to-pos":[{to:[f]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[o]}],"border-w-x":[{"border-x":[o]}],"border-w-y":[{"border-y":[o]}],"border-w-s":[{"border-s":[o]}],"border-w-e":[{"border-e":[o]}],"border-w-t":[{"border-t":[o]}],"border-w-r":[{"border-r":[o]}],"border-w-b":[{"border-b":[o]}],"border-w-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...O(),"hidden"]}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:O()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...O()]}],"outline-offset":[{"outline-offset":[nU,nq]}],"outline-w":[{outline:[nU,nB]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[nU,nB]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",nW,nQ]}],"shadow-color":[{shadow:[nJ]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...D(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":D()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",nW,nq]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[E]}],sepia:[{sepia:[v]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[E]}],"backdrop-sepia":[{"backdrop-sepia":[v]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",nq]}],duration:[{duration:j()}],ease:[{ease:["linear","in","out","in-out",nq]}],delay:[{delay:j()}],animate:[{animate:["none","spin","ping","pulse","bounce",nq]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[n$,nq]}],"translate-x":[{"translate-x":[_]}],"translate-y":[{"translate-y":[_]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",nq]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",nq]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",nq]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[nU,nB,nH]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function n6(...e){return n5(function(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=function e(t){var n,r,a="";if("string"==typeof t||"number"==typeof t)a+=t;else if("object"==typeof t)if(Array.isArray(t))for(n=0;n<t.length;n++)t[n]&&(r=e(t[n]))&&(a&&(a+=" "),a+=r);else for(n in t)t[n]&&(a&&(a+=" "),a+=n);return a}(e))&&(r&&(r+=" "),r+=t);return r}(e))}function n9({...e}){return(0,ec.jsx)(tZ,{"data-slot":"dialog",...e})}function n8({...e}){return(0,ec.jsx)(t2,{"data-slot":"dialog-portal",...e})}function n7({className:e,...t}){return(0,ec.jsx)(t4,{"data-slot":"dialog-overlay",className:n6("fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t})}function re({className:e,children:t,showCloseButton:n=!0,...r}){return(0,ec.jsxs)(n8,{"data-slot":"dialog-portal",children:[(0,ec.jsx)(n7,{}),(0,ec.jsxs)(t8,{"data-slot":"dialog-content",className:n6("fixed left-[50%] top-[50%] z-50 grid max-h-[calc(100dvh-2rem)] w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 overflow-y-auto overscroll-contain rounded-lg border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 motion-reduce:transition-none motion-reduce:data-[state=closed]:animate-none motion-reduce:data-[state=open]:animate-none sm:max-w-lg",e),...r,children:[t,n&&(0,ec.jsxs)(no,{"data-slot":"dialog-close",className:"focus:outline-hidden absolute right-4 top-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground max-sm:right-1 max-sm:top-1 max-sm:flex max-sm:size-11 max-sm:items-center max-sm:justify-center [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",children:[(0,ec.jsx)(nE,{}),(0,ec.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function rt({className:e,...t}){return(0,ec.jsx)("div",{"data-slot":"dialog-header",className:n6("flex flex-col gap-2 text-center max-sm:pr-6 sm:text-left",e),...t})}function rn({className:e,...t}){return(0,ec.jsx)("div",{"data-slot":"dialog-footer",className:n6("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function rr({className:e,...t}){return(0,ec.jsx)(nr,{"data-slot":"dialog-title",className:n6("text-lg font-semibold leading-none",e),...t})}function ra({className:e,...t}){return(0,ec.jsx)(ni,{"data-slot":"dialog-description",className:n6("text-sm text-muted-foreground",e),...t})}var ri=Symbol.for("react.lazy"),rs=eu[" use ".trim().toString()];function ro(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===ri&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}function rl(e){var t;let n,r=(t=e,(n=eu.forwardRef((e,t)=>{let{children:n,...r}=e;if(ro(n)&&"function"==typeof rs&&(n=rs(n._payload)),eu.isValidElement(n)){var a;let e,i,s=(a=n,(i=(e=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.ref:(i=(e=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.props.ref:a.props.ref||a.ref),o=function(e,t){let n={...t};for(let r in t){let a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...e)=>{let t=i(...e);return a(...e),t}:a&&(n[r]=a):"style"===r?n[r]={...a,...i}:"className"===r&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==eu.Fragment&&(o.ref=t?eA(t,s):s),eu.cloneElement(n,o)}return eu.Children.count(n)>1?eu.Children.only(null):null})).displayName=`${t}.SlotClone`,n),a=eu.forwardRef((e,t)=>{let{children:n,...a}=e;ro(n)&&"function"==typeof rs&&(n=rs(n._payload));let i=eu.Children.toArray(n),s=i.find(rd);if(s){let e=s.props.children,n=i.map(t=>t!==s?t:eu.Children.count(e)>1?eu.Children.only(null):eu.isValidElement(e)?e.props.children:null);return(0,ec.jsx)(r,{...a,ref:t,children:eu.isValidElement(e)?eu.cloneElement(e,void 0,n):null})}return(0,ec.jsx)(r,{...a,ref:t,children:n})});return a.displayName=`${e}.Slot`,a}var rc=rl("Slot"),ru=Symbol("radix.slottable");function rd(e){return eu.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===ru}let rp=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,rm=function(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=function e(t){var n,r,a="";if("string"==typeof t||"number"==typeof t)a+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(n=0;n<i;n++)t[n]&&(r=e(t[n]))&&(a&&(a+=" "),a+=r)}else for(r in t)t[r]&&(a&&(a+=" "),a+=r);return a}(e))&&(r&&(r+=" "),r+=t);return r},rf=(e,t)=>n=>{var r;if((null==t?void 0:t.variants)==null)return rm(e,null==n?void 0:n.class,null==n?void 0:n.className);let{variants:a,defaultVariants:i}=t,s=Object.keys(a).map(e=>{let t=null==n?void 0:n[e],r=null==i?void 0:i[e];if(null===t)return null;let s=rp(t)||rp(r);return a[e][s]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{});return rm(e,s,null==t||null==(r=t.compoundVariants)?void 0:r.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):({...i,...o})[t]===n})?[...e,n,r]:e},[]),null==n?void 0:n.class,null==n?void 0:n.className)},rh=rf("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-[var(--brand-solid)] text-[var(--brand-foreground)] shadow-xs hover:opacity-90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:opacity-90",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-[var(--brand)] underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function rg({className:e,variant:t,size:n,asChild:r=!1,...a}){return(0,ec.jsx)(r?rc:"button",{"data-slot":"button",className:n6(rh({variant:t,size:n,className:e})),...a})}var rb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=rl(`Primitive.${t}`),r=eu.forwardRef((e,r)=>{let{asChild:a,...i}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,ec.jsx)(a?n:t,{...i,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),ry=eu.forwardRef((e,t)=>(0,ec.jsx)(rb.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));ry.displayName="Label";let rE=rf("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),rx=eu.forwardRef(({className:e,...t},n)=>(0,ec.jsx)(ry,{ref:n,className:n6(rE(),e),...t}));function rv({className:e,type:t,...n}){return(0,ec.jsx)("input",{type:t,"data-slot":"input",className:n6("flex h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs outline-none transition-[color,box-shadow] selection:bg-blue-200 selection:text-gray-900 file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 dark:bg-input/30 dark:selection:bg-blue-600 dark:selection:text-white md:text-sm","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}rx.displayName=ry.displayName;let rT="evosci.ui.collapseAgentActions";function rS(){let e=window.localStorage.getItem(rT);return null===e||"true"===e}function r_(){let[e,t]=(0,eu.useState)(rS);return(0,eu.useEffect)(()=>{let e=e=>{e.key===rT&&t(rS())};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[]),{value:e,setValue:(0,eu.useCallback)(e=>{t(e),window.localStorage.setItem(rT,String(e))},[])}}function rk({open:e,onOpenChange:t,onSave:n,initialConfig:r}){let[a,i]=(0,eu.useState)(r?.deploymentUrl||"http://127.0.0.1:6174"),[s,o]=(0,eu.useState)(null),l=(0,eu.useRef)(null),{value:c,setValue:u}=r_();(0,eu.useEffect)(()=>{if(e){if(o(null),r?.deploymentUrl)return void i(r.deploymentUrl);fetch("/api/evosci-config").then(e=>e.json()).then(e=>{e?.deploymentUrl&&i(e.deploymentUrl)}).catch(()=>{})}},[e,r]);let d=()=>{let e=a.trim();if(!e){o("Enter your deployment URL to continue."),l.current?.focus();return}try{new URL(e)}catch{o("Enter a valid URL, e.g. http://127.0.0.1:6174"),l.current?.focus();return}n({deploymentUrl:e,assistantId:eT}),t(!1)};return(0,ec.jsx)(n9,{open:e,onOpenChange:t,children:(0,ec.jsxs)(re,{className:"sm:max-w-[525px]",children:[(0,ec.jsxs)(rt,{children:[(0,ec.jsx)(rr,{children:"Configuration"}),(0,ec.jsxs)(ra,{children:["The URL of your EvoScientist deployment. By default this is your local deployment (detected automatically) — or a public URL from"," ",(0,ec.jsx)("code",{children:"EvoSci deploy"}),". Saved in your browser's local storage."]})]}),(0,ec.jsxs)("div",{className:"grid gap-4 py-4",children:[(0,ec.jsxs)("div",{className:"grid gap-2",children:[(0,ec.jsx)(rx,{htmlFor:"deploymentUrl",children:"Deployment URL"}),(0,ec.jsx)(rv,{ref:l,id:"deploymentUrl",name:"deploymentUrl",type:"url",inputMode:"url",autoComplete:"off",spellCheck:!1,autoFocus:!0,placeholder:"http://127.0.0.1:6174",value:a,onChange:e=>{i(e.target.value),s&&o(null)},onKeyDown:e=>{"Enter"!==e.key||e.nativeEvent.isComposing||d()},"aria-invalid":!!s||void 0,"aria-describedby":s?"deploymentUrl-error":void 0}),s&&(0,ec.jsx)("p",{id:"deploymentUrl-error",role:"alert","aria-live":"polite",className:"text-sm text-destructive",children:s})]}),(0,ec.jsxs)("div",{className:"flex items-start gap-2",children:[(0,ec.jsx)("input",{id:"collapseAgentActions",type:"checkbox",checked:c,onChange:e=>u(e.target.checked),"aria-label":"Collapse agent actions by default","aria-describedby":"collapseAgentActions-description",className:"mt-1 size-4 rounded border-border accent-[var(--brand)]"}),(0,ec.jsxs)(rx,{htmlFor:"collapseAgentActions",className:"text-sm font-normal leading-snug",children:["Collapse agent actions by default",(0,ec.jsx)("span",{id:"collapseAgentActions-description",className:"block text-xs text-muted-foreground",children:"Keeps tool-call sequences folded while running and after completion. Approval controls remain visible."})]})]})]}),(0,ec.jsxs)(rn,{children:[(0,ec.jsx)(rg,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),(0,ec.jsx)(rg,{onClick:d,children:"Save"})]})]})})}let rw=(...e)=>fetch(...e),rA=Symbol.for("lg:fetch_implementation"),rN=Object.prototype.toString,rI=new Set(["network error","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed","terminated"," A network error occurred.","Network connection lost"]);function rC(e,t,{min:n=0,allowInfinity:r=!1}={}){if(void 0!==t){if("number"!=typeof t||Number.isNaN(t))throw TypeError(`Expected \`${e}\` to be a number${r?" or Infinity":""}.`);if(!r&&!Number.isFinite(t))throw TypeError(`Expected \`${e}\` to be a finite number.`);if(t<n)throw TypeError(`Expected \`${e}\` to be \u2265 ${n}.`)}}var rR=class extends Error{constructor(e){super(),e instanceof Error?(this.originalError=e,{message:e}=e):(this.originalError=Error(e),this.originalError.stack=this.stack),this.name="AbortError",this.message=e}};function rO(e,t){return Number.isFinite(t)?t-(performance.now()-e):t}async function rD({error:e,attemptNumber:t,retriesConsumed:n,startTime:r,options:a}){let i,s=e instanceof Error?e:TypeError(`Non-error was thrown: "${e}". You should only throw errors.`);if(s instanceof rR)throw s.originalError;let o=Number.isFinite(a.retries)?Math.max(0,a.retries-n):a.retries,l=a.maxRetryTime??1/0,c=Object.freeze({error:s,attemptNumber:t,retriesLeft:o,retriesConsumed:n});if(await a.onFailedAttempt(c),0>=rO(r,l))throw s;let u=await a.shouldConsumeRetry(c),d=rO(r,l);if(d<=0||o<=0)throw s;if(s instanceof TypeError&&!function(e){if(!(e&&"[object Error]"===rN.call(e)&&"TypeError"===e.name&&"string"==typeof e.message))return!1;let{message:t,stack:n}=e;return"Load failed"===t?void 0===n||"__sentry_captured__"in e:!!(t.startsWith("error sending request for url")||"Failed to fetch"===t||t.startsWith("Failed to fetch (")&&t.endsWith(")"))||rI.has(t)}(s)){if(u)throw s;return a.signal?.throwIfAborted(),!1}if(!await a.shouldRetry(c))throw s;if(!u)return a.signal?.throwIfAborted(),!1;let p=Math.min((i=Math.max(1,n+1),Math.min(Math.round((a.randomize?Math.random()+1:1)*a.minTimeout*a.factor**(i-1)),a.maxTimeout)),d);return a.signal?.throwIfAborted(),p>0&&await new Promise((e,t)=>{let n=()=>{clearTimeout(r),a.signal?.removeEventListener("abort",n),t(a.signal.reason)},r=setTimeout(()=>{a.signal?.removeEventListener("abort",n),e()},p);a.unref&&r.unref?.(),a.signal?.addEventListener("abort",n,{once:!0})}),a.signal?.throwIfAborted(),!0}async function rL(e,t={}){var n=(t={...t}).retries;if("number"==typeof n){if(n<0)throw TypeError("Expected `retries` to be a non-negative number.");if(Number.isNaN(n))throw TypeError("Expected `retries` to be a valid number or Infinity, got NaN.")}else if(void 0!==n)throw TypeError("Expected `retries` to be a number or Infinity.");if(Object.hasOwn(t,"forever"))throw Error("The `forever` option is no longer supported. For many use-cases, you can set `retries: Infinity` instead.");t.retries??=10,t.factor??=2,t.minTimeout??=1e3,t.maxTimeout??=1/0,t.maxRetryTime??=1/0,t.randomize??=!1,t.onFailedAttempt??=()=>{},t.shouldRetry??=()=>!0,t.shouldConsumeRetry??=()=>!0,rC("factor",t.factor,{min:0,allowInfinity:!1}),rC("minTimeout",t.minTimeout,{min:0,allowInfinity:!1}),rC("maxTimeout",t.maxTimeout,{min:0,allowInfinity:!0}),rC("maxRetryTime",t.maxRetryTime,{min:0,allowInfinity:!0}),t.factor>0||(t.factor=1),t.signal?.throwIfAborted();let r=0,a=0,i=performance.now();for(;!Number.isFinite(t.retries)||a<=t.retries;){r++;try{t.signal?.throwIfAborted();let n=await e(r);return t.signal?.throwIfAborted(),n}catch(e){await rD({error:e,attemptNumber:r,retriesConsumed:a,startTime:i,options:t})&&a++}}throw Error("Retry attempts exhausted without throwing an error.")}var rM=Object.create,rP=Object.defineProperty,rj=Object.getOwnPropertyDescriptor,rF=Object.getOwnPropertyNames,rU=Object.getPrototypeOf,rB=Object.prototype.hasOwnProperty,rz=(l=(e,t)=>{var n=Object.prototype.hasOwnProperty,r="~";function a(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,n,a,s){if("function"!=typeof n)throw TypeError("The listener must be a function");var o=new i(n,a||e,s),l=r?r+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],o]:e._events[l].push(o):(e._events[l]=o,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new a:delete e._events[t]}function l(){this._events=new a,this._eventsCount=0}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(r=!1)),l.prototype.eventNames=function(){var e,t,a=[];if(0===this._eventsCount)return a;for(t in e=this._events)n.call(e,t)&&a.push(r?t.slice(1):t);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(e)):a},l.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var a=0,i=n.length,s=Array(i);a<i;a++)s[a]=n[a].fn;return s},l.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},l.prototype.emit=function(e,t,n,a,i,s){var o=r?r+e:e;if(!this._events[o])return!1;var l,c,u=this._events[o],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,n),!0;case 4:return u.fn.call(u.context,t,n,a),!0;case 5:return u.fn.call(u.context,t,n,a,i),!0;case 6:return u.fn.call(u.context,t,n,a,i,s),!0}for(c=1,l=Array(d-1);c<d;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var p,m=u.length;for(c=0;c<m;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),d){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,n);break;case 4:u[c].fn.call(u[c].context,t,n,a);break;default:if(!l)for(p=1,l=Array(d-1);p<d;p++)l[p-1]=arguments[p];u[c].fn.apply(u[c].context,l)}}return!0},l.prototype.on=function(e,t,n){return s(this,e,t,n,!1)},l.prototype.once=function(e,t,n){return s(this,e,t,n,!0)},l.prototype.removeListener=function(e,t,n,a){var i=r?r+e:e;if(!this._events[i])return this;if(!t)return o(this,i),this;var s=this._events[i];if(s.fn)s.fn!==t||a&&!s.once||n&&s.context!==n||o(this,i);else{for(var l=0,c=[],u=s.length;l<u;l++)(s[l].fn!==t||a&&!s[l].once||n&&s[l].context!==n)&&c.push(s[l]);c.length?this._events[i]=1===c.length?c[0]:c:o(this,i)}return this},l.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&o(this,t)):(this._events=new a,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,void 0!==t&&(t.exports=l)},()=>(c||l((c={exports:{}}).exports,c),c.exports));rz();var rH=((e,t,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var r,a=rF(t),i=0,s=a.length;i<s;i++)r=a[i],rB.call(e,r)||void 0===r||rP(e,r,{get:(e=>t[e]).bind(null,r),enumerable:!(n=rj(t,r))||n.enumerable});return e})(rP(null!=(u=rz())?rM(rU(u)):{},"default",{value:u,enumerable:!0}),u),r$=class e extends Error{name="TimeoutError";constructor(t,n){super(t,n),Error.captureStackTrace?.(this,e)}};let rG=e=>e.reason??new DOMException("This operation was aborted.","AbortError");var rq=class{#e=[];enqueue(e,t){let{priority:n=0,id:r}=t??{},a={priority:n,id:r,run:e};if(0===this.size||this.#e[this.size-1].priority>=n)return void this.#e.push(a);let i=function(e,t,n){let r=0,a=e.length;for(;a>0;){let i=Math.trunc(a/2),s=r+i;0>=n(e[s],t)?(r=++s,a-=i+1):a=i}return r}(this.#e,a,(e,t)=>t.priority-e.priority);this.#e.splice(i,0,a)}setPriority(e,t){let n=this.#e.findIndex(t=>t.id===e);if(-1===n)throw ReferenceError(`No promise function with the id "${e}" exists in the queue.`);let[r]=this.#e.splice(n,1);this.enqueue(r.run,{priority:t,id:e})}dequeue(){return this.#e.shift()?.run}filter(e){return this.#e.filter(t=>t.priority===e.priority).map(e=>e.run)}get size(){return this.#e.length}},rW=class extends rH.default{#t;#n;#r=0;#a;#i=!1;#s=!1;#o;#l=0;#c=0;#u;#d;#p;#m=[];#f=0;#e;#h;#g=0;#b;#y;#E=1n;#x=new Map;timeout;constructor(e){if(super(),!("number"==typeof(e={carryoverIntervalCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:rq,strict:!1,...e}).intervalCap&&e.intervalCap>=1))throw TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${e.intervalCap?.toString()??""}\` (${typeof e.intervalCap})`);if(void 0===e.interval||!(Number.isFinite(e.interval)&&e.interval>=0))throw TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${e.interval?.toString()??""}\` (${typeof e.interval})`);if(e.strict&&0===e.interval)throw TypeError("The `strict` option requires a non-zero `interval`");if(e.strict&&e.intervalCap===1/0)throw TypeError("The `strict` option requires a finite `intervalCap`");if(this.#t=e.carryoverIntervalCount??e.carryoverConcurrencyCount??!1,this.#n=e.intervalCap===1/0||0===e.interval,this.#a=e.intervalCap,this.#o=e.interval,this.#p=e.strict,this.#e=new e.queueClass,this.#h=e.queueClass,this.concurrency=e.concurrency,void 0!==e.timeout&&!(Number.isFinite(e.timeout)&&e.timeout>0))throw TypeError(`Expected \`timeout\` to be a positive finite number, got \`${e.timeout}\` (${typeof e.timeout})`);this.timeout=e.timeout,this.#y=!1===e.autoStart,this.#v()}#T(e){for(;this.#f<this.#m.length;){let t=this.#m[this.#f];if(void 0!==t&&e-t>=this.#o)this.#f++;else break}(this.#f>100&&this.#f>this.#m.length/2||this.#f===this.#m.length)&&(this.#m=this.#m.slice(this.#f),this.#f=0)}#S(e){this.#p?this.#m.push(e):this.#r++}#_(){this.#p?this.#m.length>this.#f&&this.#m.pop():this.#r>0&&this.#r--}#k(){return this.#m.length-this.#f}get #w(){return!!this.#n||(this.#p?this.#k()<this.#a:this.#r<this.#a)}get #A(){return this.#g<this.#b}#N(){this.#g--,0===this.#g&&this.emit("pendingZero"),this.#I(),this.emit("next")}#C(){this.#d=void 0,this.#R(),this.#O()}#D(e){if(this.#p){if(this.#T(e),this.#k()>=this.#a){let t=this.#m[this.#f],n=this.#o-(e-t);return this.#L(n),!0}return!1}if(void 0===this.#u){let t=this.#l-e;if(!(t<0))return this.#L(t),!0;if(this.#c>0){let t=e-this.#c;if(t<this.#o)return this.#L(this.#o-t),!0}this.#r=this.#t?this.#g:0}return!1}#L(e){void 0===this.#d&&(this.#d=setTimeout(()=>{this.#C()},e))}#M(){this.#u&&(clearInterval(this.#u),this.#u=void 0)}#P(){this.#d&&(clearTimeout(this.#d),this.#d=void 0)}#I(){if(0===this.#e.size){if(this.#M(),this.emit("empty"),0===this.#g){if(this.#P(),this.#p&&this.#f>0){let e=Date.now();this.#T(e)}this.emit("idle")}return!1}let e=!1;if(!this.#y){let t=Date.now(),n=!this.#D(t);if(this.#w&&this.#A){let r=this.#e.dequeue();this.#n||(this.#S(t),this.#j()),this.emit("active"),r(),n&&this.#O(),e=!0}}return e}#O(){this.#n||void 0!==this.#u||this.#p||(this.#u=setInterval(()=>{this.#R()},this.#o),this.#l=Date.now()+this.#o)}#R(){this.#p||(0===this.#r&&0===this.#g&&this.#u&&this.#M(),this.#r=this.#t?this.#g:0),this.#F(),this.#j()}#F(){for(;this.#I(););}get concurrency(){return this.#b}set concurrency(e){if(!("number"==typeof e&&e>=1))throw TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this.#b=e,this.#F()}setPriority(e,t){if("number"!=typeof t||!Number.isFinite(t))throw TypeError(`Expected \`priority\` to be a finite number, got \`${t}\` (${typeof t})`);this.#e.setPriority(e,t)}async add(e,t={}){return t={timeout:this.timeout,...t,id:t.id??(this.#E++).toString()},new Promise((n,r)=>{let a=Symbol(`task-${t.id}`);this.#e.enqueue(async()=>{let i;this.#g++,this.#x.set(a,{id:t.id,priority:t.priority??0,startTime:Date.now(),timeout:t.timeout});try{try{t.signal?.throwIfAborted()}catch(e){throw this.#U(),this.#x.delete(a),e}this.#c=Date.now();let r=e({signal:t.signal});if(t.timeout&&(r=function(e,t){let n,r,{milliseconds:a,fallback:i,message:s,customTimers:o={setTimeout,clearTimeout},signal:l}=t,c=new Promise((t,c)=>{if("number"!=typeof a||1!==Math.sign(a))throw TypeError(`Expected \`milliseconds\` to be a positive number, got \`${a}\``);if(l?.aborted)return void c(rG(l));if(l&&(r=()=>{c(rG(l))},l.addEventListener("abort",r,{once:!0})),e.then(t,c),a===1/0)return;let u=new r$;n=o.setTimeout.call(void 0,()=>{if(i){try{t(i())}catch(e){c(e)}return}"function"==typeof e.cancel&&e.cancel(),!1===s?t():s instanceof Error?c(s):(u.message=s??`Promise timed out after ${a} milliseconds`,c(u))},a)}).finally(()=>{c.clear(),r&&l&&l.removeEventListener("abort",r)});return c.clear=()=>{o.clearTimeout.call(void 0,n),n=void 0},c}(Promise.resolve(r),{milliseconds:t.timeout,message:`Task timed out after ${t.timeout}ms (queue has ${this.#g} running, ${this.#e.size} waiting)`})),t.signal){let{signal:e}=t;r=Promise.race([r,new Promise((t,n)=>{i=()=>{n(e.reason)},e.addEventListener("abort",i,{once:!0})})])}let s=await r;n(s),this.emit("completed",s)}catch(e){r(e),this.emit("error",e)}finally{i&&t.signal?.removeEventListener("abort",i),this.#x.delete(a),queueMicrotask(()=>{this.#N()})}},t),this.emit("add"),this.#I()})}async addAll(e,t){return Promise.all(e.map(async e=>this.add(e,t)))}start(){return this.#y&&(this.#y=!1,this.#F()),this}pause(){this.#y=!0}clear(){this.#e=new this.#h,this.#M(),this.#B(),this.emit("empty"),0===this.#g&&(this.#P(),this.emit("idle")),this.emit("next")}async onEmpty(){0!==this.#e.size&&await this.#z("empty")}async onSizeLessThan(e){this.#e.size<e||await this.#z("next",()=>this.#e.size<e)}async onIdle(){(0!==this.#g||0!==this.#e.size)&&await this.#z("idle")}async onPendingZero(){0!==this.#g&&await this.#z("pendingZero")}async onRateLimit(){this.isRateLimited||await this.#z("rateLimit")}async onRateLimitCleared(){this.isRateLimited&&await this.#z("rateLimitCleared")}onError(){return new Promise((e,t)=>{let n=e=>{this.off("error",n),t(e)};this.on("error",n)})}async #z(e,t){return new Promise(n=>{let r=()=>{(!t||t())&&(this.off(e,r),n())};this.on(e,r)})}get size(){return this.#e.size}sizeBy(e){return this.#e.filter(e).length}get pending(){return this.#g}get isPaused(){return this.#y}#v(){this.#n||(this.on("add",()=>{this.#e.size>0&&this.#j()}),this.on("next",()=>{this.#j()}))}#j(){this.#n||this.#s||(this.#s=!0,queueMicrotask(()=>{this.#s=!1,this.#B()}))}#U(){this.#n||(this.#_(),this.#j())}#B(){let e,t=this.#i;if(this.#n||0===this.#e.size){t&&(this.#i=!1,this.emit("rateLimitCleared"));return}if(this.#p){let t=Date.now();this.#T(t),e=this.#k()}else e=this.#r;let n=e>=this.#a;n!==t&&(this.#i=n,this.emit(n?"rateLimit":"rateLimitCleared"))}get isRateLimited(){return this.#i}get isSaturated(){return this.#g===this.#b&&this.#e.size>0||this.isRateLimited&&this.#e.size>0}get runningTasks(){return[...this.#x.values()].map(e=>({...e}))}};let rV=[400,401,402,403,404,405,406,407,408,409,422];var rY=class e extends Error{status;text;response;constructor(e,t,n){super(`HTTP ${e}: ${t}`),this.status=e,this.text=t,this.response=n}static async fromResponse(t,n){try{return new e(t.status,await t.text(),n?.includeResponse?t:void 0)}catch{return new e(t.status,t.statusText,n?.includeResponse?t:void 0)}}},rK=class{maxConcurrency;maxRetries;queue;onFailedResponseHook;customFetch;constructor(e){this.maxConcurrency=e.maxConcurrency??1/0,this.maxRetries=e.maxRetries??4,"default"in rW?this.queue=new rW.default({concurrency:this.maxConcurrency}):this.queue=new rW({concurrency:this.maxConcurrency}),this.onFailedResponseHook=e?.onFailedResponseHook,this.customFetch=e.fetch}call(e,...t){let{onFailedResponseHook:n}=this;return this.queue.add(()=>rL(()=>e(...t).catch(async e=>{if(e instanceof Error)throw e;if(null!=e&&"object"==typeof e&&"status"in e&&"statusText"in e&&"text"in e)throw await rY.fromResponse(e,{includeResponse:!!n});throw Error(e)}),{async onFailedAttempt({error:e,retriesLeft:t}){let r=e.message??"";if(r.startsWith("Cancel")||r.startsWith("TimeoutError")||r.startsWith("AbortError")||e?.code==="ECONNABORTED")throw e;if(r.includes("ECONNREFUSED")||r.includes("fetch failed")||r.includes("Failed to fetch")||r.includes("NetworkError")){if(t>0)return;let e=Error(`Unable to connect to LangGraph server. Please ensure the server is running and accessible. Original error: ${r}`);throw e.name="ConnectionError",e}if(e instanceof rY){if(rV.includes(e.status))throw e;n&&e.response&&await n(e.response)}},retries:this.maxRetries,randomize:!0}),{throwOnTimeout:!0})}callWithOptions(e,t,...n){return e.signal?Promise.race([this.call(t,...n),new Promise((t,n)=>{e.signal?.addEventListener("abort",()=>{n(Error("AbortError"))})})]):this.call(t,...n)}fetch(...e){let t=this.customFetch??globalThis[rA]??rw;return this.call(()=>t(...e).then(e=>e.ok?e:Promise.reject(e)))}};let rX=[13,10];function rZ(){let e=[],t=!1;return new TransformStream({start(){e=[],t=!1},transform(n,r){let a=n;if(t&&(a=rJ([[13],a]),t=!1),a.length>0&&13===a.at(-1)&&(t=!0,a=a.subarray(0,-1)),!a.length)return;let i=rX.includes(a.at(-1)),s=a.length-1,{lines:o}=a.reduce((e,t,n)=>(e.from>n||((13===t||10===t)&&(e.lines.push(a.subarray(e.from,n)),13===t&&10===a[n+1]?e.from=n+2:e.from=n+1),n===s&&e.from<=s&&e.lines.push(a.subarray(e.from))),e),{lines:[],from:0});if(1===o.length&&!i)return void e.push(o[0]);for(let t of(e.length&&(e.push(o[0]),o[0]=rJ(e),e=[]),!i&&o.length&&(e=[o.pop()]),o))r.enqueue(t)},flush(t){e.length&&t.enqueue(rJ(e))}})}function rQ(){let e="",t=[],n="",r=null,a=new TextDecoder;return new TransformStream({transform(i,s){if(!i.length){if(!e&&!t.length&&!n&&null==r)return;let i={id:n||void 0,event:e,data:t.length?r0(a,t):null};e="",t=[],r=null,s.enqueue(i);return}if(58===i[0])return;let o=i.indexOf(58);if(-1===o)return;let l=a.decode(i.subarray(0,o)),c=i.subarray(o+1);if(32===c[0]&&(c=c.subarray(1)),"event"===l)e=a.decode(c);else if("data"===l)t.push(c);else if("id"===l)-1===c.indexOf(0)&&(n=a.decode(c));else if("retry"===l){let e=Number.parseInt(a.decode(c),10);Number.isNaN(e)||(r=e)}},flush(r){e&&r.enqueue({id:n||void 0,event:e,data:t.length?r0(a,t):null})}})}function rJ(e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),n=0;for(let r of e)t.set(r,n),n+=r.length;return t}function r0(e,t){return JSON.parse(e.decode(rJ(t)))}let r1=e=>{if("isError"in Error&&"function"==typeof Error.isError)return Error.isError(e);let t=Object.prototype.toString.call(e);return"[object Error]"===t||"[object DOMException]"===t||"[object DOMError]"===t||"[object Exception]"===t},r2=e=>{if(!r1(e)||"TypeError"!==e.name||"string"!=typeof e.message)return!1;let t=e.message.toLowerCase(),n=(e=>{let{cause:t}=e;return"object"==typeof t&&null!=t&&r1(t)?t:null})(e)?.message?.toLowerCase()??"";return t.includes("fetch")||t.includes("network")||t.includes("connection")||t.includes("error sending request")||t.includes("load failed")||t.includes("terminated")||n.includes("other side closed")||n.includes("socket")};var r3=class extends Error{constructor(e,t){super(`Exceeded maximum SSE reconnection attempts (${e})`),this.name="MaxReconnectAttemptsError",this.cause=t}},r4=class extends Error{idleTimeoutMs;constructor(e){super(`No SSE bytes received for ${e}ms; assuming the connection is half-open and reconnecting.`),this.name="StreamIdleTimeoutError",this.idleTimeoutMs=e}};function r5(e){let t,n,r,a=e.timeoutFactor??3,i=e.minTimeoutMs??6e3,s=e.maxTimeoutMs??3e4,o="number"==typeof e.mode?e.mode:null,l=o,c=()=>{null!=t&&(clearTimeout(t),t=void 0)},u=()=>{c();let r=l;null==r||r<=0||(t=setTimeout(()=>{e.onIdle?.({timeoutMs:r,source:null!=o?"fixed":"heartbeat"});try{n?.error(new r4(r))}catch{}},r),t.unref?.())};return new TransformStream({start(e){n=e,u()},transform(e,t){e.length>0&&58===e[0]&&(()=>{if(null!=o)return;let e=Date.now();if(null!=r){let t=e-r;if(t>0){let e=Math.min(Math.max(t*a,i),s);l=null==l?e:Math.max(l,e)}}r=e})(),u(),t.enqueue(e)},flush(){c()}})}async function*r6(e,t={}){let n,r,a=t.maxRetries??5,i=0;for(;;){let s,o,l=!1;try{if(t.signal?.aborted)return;let{response:a,stream:i}=await e(r?{lastEventId:n,reconnectPath:r}:void 0),s=a.headers.get("location");s&&(r=s);let c=a.headers.get("content-type")?.split(";")[0];if(c&&!c.includes("text/event-stream"))throw Error(`Expected response header Content-Type to contain 'text/event-stream', got '${c}'`);o=i.getReader();try{for(;;){if(t.signal?.aborted)return void await o.cancel();let{done:e,value:r}=await o.read();if(e)break;r.id&&(n=r.id),yield r}break}catch(e){if(r&&!t.signal?.aborted)l=!0;else throw e}finally{if(o)try{o.releaseLock()}catch{}}}catch(e){if(s=e,r2(e)&&r&&!t.signal?.aborted)l=!0;else throw e}if(l){if((i+=1)>a)throw new r3(a,s);t.onReconnect?.({attempt:i,lastEventId:n,cause:s});let e=Math.min(1e3*2**(i-1),5e3)+1e3*Math.random();await new Promise(t=>{setTimeout(t,e)});continue}break}}var r9=class e extends ReadableStream{reader;ensureReader(){this.reader||(this.reader=this.getReader())}async next(){this.ensureReader();try{let e=await this.reader.read();if(e.done)return this.reader.releaseLock(),{done:!0,value:void 0};return{done:!1,value:e.value}}catch(e){throw this.reader.releaseLock(),e}}async return(){if(this.ensureReader(),this.locked){let e=this.reader.cancel();this.reader.releaseLock(),await e}return{done:!0,value:void 0}}async throw(e){if(this.ensureReader(),this.locked){let e=this.reader.cancel();this.reader.releaseLock(),await e}throw e}async [Symbol.asyncDispose](){await this.return()}[Symbol.asyncIterator](){return this}static fromReadableStream(t){let n=t.getReader();return new e({start:e=>(function t(){return n.read().then(({done:n,value:r})=>n?void e.close():(e.enqueue(r),t()))})(),cancel(){n.releaseLock()}})}static fromAsyncGenerator(t){return new e({async pull(e){let{value:n,done:r}=await t.next();r&&e.close(),e.enqueue(n)},async cancel(e){await t.return(e)}})}};function r8(...e){let t=new Headers;for(let n of e)if(n)for(let[e,r]of function*(e){let t,n=!1;if(e instanceof Headers){let n=[];e.forEach((e,t)=>{n.push([t,e])}),t=n}else Array.isArray(e)?t=e:(n=!0,t=Object.entries(e??{}));for(let e of t){let t=e[0];if("string"!=typeof t)throw TypeError(`Expected header name to be a string, got ${typeof t}`);let r=Array.isArray(e[1])?e[1]:[e[1]],a=!1;for(let e of r)void 0!==e&&(n&&!a&&(a=!0,yield[t,null]),yield[t,e])}}(n))null===r?t.delete(e):t.append(e,r);let n=[];return t.forEach((e,t)=>{n.push([t,e])}),Object.fromEntries(n)}var r7=class{asyncCaller;timeoutMs;apiUrl;defaultHeaders;onRequest;streamProtocol;constructor(e){const t={maxRetries:4,maxConcurrency:4,...e?.callerOptions};let n="http://localhost:8123";if(!e?.apiUrl&&"object"==typeof globalThis&&null!=globalThis){const e=Symbol.for("langgraph_api:fetch"),r=Symbol.for("langgraph_api:url"),a=globalThis;a[e]&&(t.fetch??=a[e]),a[r]&&(n=a[r])}this.asyncCaller=new rK(t),this.timeoutMs=e?.timeoutMs,this.apiUrl=e?.apiUrl?.replace(/\/$/,"")||n,this.defaultHeaders=e?.defaultHeaders||{},this.onRequest=e?.onRequest,this.streamProtocol=e?.streamProtocol??"legacy";const r=function(e){if(null!==e){if(e)return e;for(let e of["LANGGRAPH","LANGSMITH","LANGCHAIN"]){let t=function(e){try{return void 0!==el.default?el.default.env?.[e]:void 0}catch{return}}(`${e}_API_KEY`);if(t)return t.trim().replace(/^["']|["']$/g,"")}}}(e?.apiKey);r&&(this.defaultHeaders["x-api-key"]=r)}prepareFetchOptions(e,t){let n={...t,headers:r8(this.defaultHeaders,t?.headers)};n.json&&(n.body=JSON.stringify(n.json),n.headers=r8(n.headers,{"content-type":"application/json"}),delete n.json),n.withResponse&&delete n.withResponse,"dedupe"in n&&delete n.dedupe;let r=null;void 0!==t?.timeoutMs?null!=t.timeoutMs&&(r=AbortSignal.timeout(t.timeoutMs)):null!=this.timeoutMs&&(r=AbortSignal.timeout(this.timeoutMs)),n.signal=function(...e){let t=e.filter(e=>null!=e);if(0===t.length)return;if(1===t.length)return t[0];let n=new AbortController;for(let t of e){if(t?.aborted){n.abort(t.reason);break}t?.addEventListener("abort",()=>n.abort(t.reason),{once:!0})}return n.signal}(r,n.signal);let a=new URL(`${this.apiUrl}${e}`);if(n.params){for(let[e,t]of Object.entries(n.params)){if(null==t)continue;let n="string"==typeof t||"number"==typeof t?t.toString():JSON.stringify(t);a.searchParams.append(e,n)}delete n.params}return[a,n]}async fetch(e,t){let[n,r]=this.prepareFetchOptions(e,t);if(t?.dedupe===!0&&t?.withResponse!==!0&&t?.signal==null&&null==this.onRequest){let e,t="string"==typeof r.body?r.body:"",a=Object.keys(e=r8(r.headers)).sort().map(t=>`${t}:${e[t]}`).join("\n"),i=`${r.method??"GET"} ${n.toString()} ${t} ${a}`,s=an.get(i);if(null!=s)return s;let o=this.#H(n,r);an.set(i,o);let l=()=>{an.get(i)===o&&an.delete(i)};return o.then(l,l),o}let[a,i]=await this.#$(n,r);return t?.withResponse?[a,i]:a}async #H(e,t){let[n]=await this.#$(e,t);return n}async #$(e,t){let n=t;this.onRequest&&(n=await this.onRequest(e,t));let r=await this.asyncCaller.fetch(e.toString(),n);return[await (async()=>{if(202!==r.status&&204!==r.status)return r.json()})(),r]}async *streamWithRetry(e){let t=async t=>{let n=t?.reconnectPath||e.endpoint,r=!!t?.reconnectPath,a=r?"GET":e.method||"GET",i=r&&t?.lastEventId?{...e.headers,"Last-Event-ID":t.lastEventId}:e.headers,[s,o]=this.prepareFetchOptions(n,{method:a,timeoutMs:null,signal:e.signal,headers:i,params:e.params,json:r?void 0:e.json});null!=this.onRequest&&(o=await this.onRequest(s,o));let l=await this.asyncCaller.fetch(s.toString(),o);if(!l.body)throw Error("Expected response body from stream endpoint");!r&&e.onInitialResponse&&await e.onInitialResponse(l);let c=e.idleReconnect??"auto",u="auto"===c||c>0,d=l.body.pipeThrough(rZ());return{response:l,stream:(u?d.pipeThrough(r5({mode:c})):d).pipeThrough(rQ())}};yield*r6(t,{maxRetries:e.maxRetries??5,signal:e.signal,onReconnect:e.onReconnect})}};let ae=/(\/threads\/(?<thread_id>.+))?\/runs\/(?<run_id>.+)/;function at(e){let t=e.headers.get("Content-Location");if(!t)return;let n=ae.exec(t);if(n?.groups?.run_id)return{run_id:n.groups.run_id,thread_id:n.groups.thread_id||void 0}}let an=new Map;var ar=e.i(846001),aa=e.i(41348),ai=class extends Error{code;response;constructor(e){super(e.message),this.name="ProtocolError",this.code=e.error,this.response=e}},as=class extends Error{maxAttempts;constructor(e,t){super(`Exceeded maximum WebSocket reconnection attempts (${e})`),this.name="MaxWebSocketReconnectAttemptsError",this.maxAttempts=e,this.cause=t}};function ao(e){if("object"!=typeof e||null==e||"tool"!==e.type)return null;let t=e.toolCall??e.tool_call;return"object"!=typeof t||null==t||"string"!=typeof t.name?null:{type:"tool",toolCall:{id:"string"==typeof t.id?t.id:void 0,name:t.name,args:t.args}}}function al(e){return e.filter(e=>null==e.value||null==ao(e.value))}async function ac(e,t,n){let r=Date.now();n?.({phase:"start",name:e.tool.name,args:t});try{let a=await e.execute(t),i=Date.now()-r;return n?.({phase:"success",name:e.tool.name,args:t,result:a,duration:i}),{success:!0,result:a}}catch(s){let a=s instanceof Error?s:Error(String(s)),i=Date.now()-r;return n?.({phase:"error",name:e.tool.name,args:t,error:a,duration:i}),{success:!1,error:a}}}async function au(e,t,n){var r;let{toolCall:a}=e,i=(r=a.name,t.find(e=>e.tool.name===r));if(!i){let e=Error(`Headless tool "${a.name}" is not registered. Available tools: ${t.map(e=>e.tool.name).join(", ")||"none"}`);return n?.({phase:"error",name:a.name,args:a.args,error:e,duration:0}),{toolCallId:a.id,value:{error:e.message}}}let s=await ac(i,a.args,n);return s.success?{toolCallId:a.id,value:s.result}:{toolCallId:a.id,value:{error:s.error.message}}}function ad(e,t,n,r){if(!t?.length||!e)return;let a=e.__interrupt__;if(!Array.isArray(a)||0===a.length)return;let i=r.defer??(e=>e()),s=[],o=new Set;for(let e of a){let t=ao(e.value);if(!t)continue;let r=e.id??t.toolCall.id??"",a=t.toolCall.id??"";!(n.has(r)||a&&n.has(a))&&(a&&o.has(a)||(a&&o.add(a),n.add(r),a&&n.add(a),s.push({interruptId:r,headlessInterrupt:t,toolCallId:a})))}0!==s.length&&i(()=>{(async()=>{let e=await Promise.all(s.map(async({interruptId:e,headlessInterrupt:n,toolCallId:a})=>{let i=await au(n,t,r.onTool);return{interruptId:e,toolCallId:i.toolCallId??a,value:i.value}}));await Promise.resolve(r.resumeSubmit(function(e){if(0===e.length)return{resume:{},keyedByInterruptId:!1};if(!e.every(e=>e.interruptId.length>0)&&1===e.length){var t;let[n]=e;return{resume:(t={toolCallId:n.toolCallId,value:n.value}).toolCallId?{[t.toolCallId]:t.value}:t.value,keyedByInterruptId:!1}}let n={};for(let t of e)0!==t.interruptId.length&&(n[t.interruptId]=null!=t.toolCallId&&t.toolCallId.length>0?{[t.toolCallId]:t.value}:t.value);return{resume:n,keyedByInterruptId:!0}}(e)))})()})}var ap=e.i(43073);e.i(833953);var am=e.i(641290),af=e.i(165161),ah=e.i(795529),ag=e.i(265898),ab=e.i(399855),ay=e.i(457933);function aE(e){let t=ax(e);return"human"===t.type||"user"===t.type?new af.HumanMessage(t):"ai"===t.type||"assistant"===t.type?new am.AIMessage(t):"system"===t.type?new ag.SystemMessage(t):"tool"===t.type&&"tool_call_id"in t?new ab.ToolMessage({...t,tool_call_id:t.tool_call_id}):"remove"===t.type&&null!=t.id?new ah.RemoveMessage({...t,id:t.id}):(0,ay.coerceMessageLikeToMessage)(t)}function ax(e){var t;let n=function(e){var t;let n=e.contentBlocks??e.content_blocks;if(!Array.isArray(n)||0===n.length)return e;let r=null==(t=e.content)||""===t||Array.isArray(t)&&0===t.length||!av(e.content)&&av(n);return r||e.contentBlocks!==n?{...e,content:r?n:e.content,contentBlocks:n}:e}(e);if(Array.isArray(n.tool_calls)&&n.tool_calls.length>0)return n;let r=Array.isArray(t=n.content)?t.flatMap(e=>null==e||"object"!=typeof e||"tool_call"!==e.type&&"tool_use"!==e.type?[]:[{id:e.id??"",name:e.name??"",args:function(e){if(null!=e&&"object"==typeof e&&!Array.isArray(e))return e;if("string"==typeof e&&e.length>0)try{let t=JSON.parse(e);if(null!=t&&"object"==typeof t&&!Array.isArray(t))return t}catch{}return{}}(e.args??e.input),type:"tool_call"}]):[];return 0===r.length?n:{...n,tool_calls:r}}function av(e){return"string"==typeof e?e.length>0:!!Array.isArray(e)&&e.some(e=>"string"==typeof e?e.length>0:null!=e&&"object"==typeof e&&"text"===e.type&&"string"==typeof e.text&&e.text.length>0)}var aT=e.i(44649),aS=class{chunks={};constructor(){this.chunks={}}add(e,t){e.type.endsWith("MessageChunk")&&(e.type=e.type.slice(0,-12).toLowerCase());let n="human"===e.type||"user"===e.type?new af.HumanMessageChunk(e):"ai"===e.type||"assistant"===e.type?new am.AIMessageChunk(ax(e)):"system"===e.type?new ag.SystemMessageChunk(e):"tool"===e.type&&"tool_call_id"in e?new ab.ToolMessageChunk({...e,tool_call_id:e.tool_call_id}):aE(e),r=function(e){try{if(aT.BaseMessageChunk.isInstance(e))return e;return(0,ay.convertToChunk)(e)}catch{return null}}(n),{id:a}=r??n;if(!a)return console.warn("No message ID found for chunk, ignoring in state",e),null;if(this.chunks[a]??={},this.chunks[a].metadata=t??this.chunks[a].metadata,r){let e=this.chunks[a].chunk;this.chunks[a].chunk=(aT.BaseMessageChunk.isInstance(e)?e:null)?.concat(r)??r}else this.chunks[a].chunk=n;return a}clear(){this.chunks={}}get(e,t){return null==e||null==this.chunks[e]?null:(null!=t&&(this.chunks[e].index??=t),this.chunks[e])}};let a_=e=>{let{type:t,data:n}=e.toDict();return{...n,type:t}};var ak=e.i(827179),aw=e.i(364964),aA=e.i(88906);let aN=new Set(["human","user","ai","assistant","tool","system","function","remove"]);function aI(e){return e.join("\0")}function aC(e,t){return null==t?e:null==e?t:Math.max(e,t)}let aR=new Set(["completed","failed","interrupted"]);function aO(e,t){if(e===t)return!0;if(null==e||null==t||e.channels.length!==t.channels.length)return!1;let n=new Set(e.channels);for(let e of t.channels)if(!n.has(e))return!1;return!!function(e,t){if(e===t)return!0;if(void 0===e||void 0===t||e.length!==t.length)return!1;let n=new Set;for(let t of e)n.add(aI(t));for(let e of t)if(!n.has(aI(e)))return!1;return!0}(e.namespaces,t.namespaces)&&(e.depth??null)===(t.depth??null)}function aD(e,t){let n=new Set(e.channels);for(let e of t.channels)if(!n.has(e))return!1;let r=e.depth,a=t.depth;if(null==e.namespaces)return null==r||null!=a&&a<=r;if(null==t.namespaces)return!1;for(let n of t.namespaces)if(!e.namespaces.some(e=>!!function(e,t){if(e.length>t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}(e,n)&&(null==r||null!=a&&n.length-e.length+a<=r)))return!1;return!0}function aL(e){let{forkFrom:t,...n}=e;if("string"!=typeof t||0===t.length)return n;let r=null!=n.config&&"object"==typeof n.config?n.config:{},a=null!=r.configurable&&"object"==typeof r.configurable?r.configurable:{};return{...n,config:{...r,configurable:{...a,checkpoint_id:t}}}}var aM=class{subscriptionId;params;queue=[];waiters=[];closed=!1;paused=!1;resumeResolve;onUnsubscribe;transform;constructor(e,t,n,r){this.subscriptionId=e,this.params=t,this.onUnsubscribe=n,this.transform=r??(e=>e)}push(e){if(this.closed)return;let t=this.transform(e),n=this.waiters.shift();n?n({done:!1,value:t}):this.queue.push(t)}pause(){if(!this.closed)for(this.paused=!0;this.waiters.length>0;)this.waiters.shift()?.({done:!0,value:void 0})}resume(){this.paused=!1,this.resumeResolve?.(),this.resumeResolve=void 0}waitForResume(){return this.paused?new Promise(e=>{this.resumeResolve=e}):Promise.resolve()}get isPaused(){return this.paused}close(){for(this.closed=!0,this.paused=!1;this.waiters.length>0;)this.waiters.shift()?.({done:!0,value:void 0});this.resumeResolve?.(),this.resumeResolve=void 0}async unsubscribe(){this.closed||(this.close(),await this.onUnsubscribe(this.subscriptionId))}[Symbol.asyncIterator](){return{next:async()=>this.queue.length>0?{done:!1,value:this.queue.shift()}:this.closed||this.paused?{done:!0,value:void 0}:await new Promise(e=>{this.waiters.push(e)}),return:async()=>(this.close(),{done:!0,value:void 0})}}},aP=class{threadId;ordering={};run;agent;input;state;interrupted=!1;interrupts=[];assistantId;#G;#q;#g=new Map;#W=new Map;#V=new Set;#Y=new Set;#K=!1;#X=!1;#Z;#Q=null;#J=null;#ee="idle";#et=[];#en;#er;#ea=null;#ei;#es=null;#eo=null;#el;#ec=new Set;#eu;#ed;#ep;#em;#ef;#eh;#eg;#eb=new Map;#ey=!1;#eE=!1;#ex=[];#ev=[];#eT=[];#eS=!1;#e_;#ek=new Set;#ew=new ap.MultiCursorBuffer;#eA=new ap.MultiCursorBuffer;#eN=new ap.MultiCursorBuffer;#eI=new ap.MultiCursorBuffer;#eC;constructor(e,t){if(!t?.assistantId)throw Error("ThreadStream requires an assistantId option.");this.#q=e,this.threadId=e.threadId,this.assistantId=t.assistantId,this.#G=t.startingCommandId??1,this.#eC=t.fetch,this.run={start:async e=>(this.#eR(),await this.#eO(()=>(this.#eD(),this.values,this.#eL("run.start",{...aL(e),assistant_id:this.assistantId}))))},this.agent={getTree:async(e={})=>await this.#eL("agent.getTree",e)},this.input={respond:async e=>{this.#eR(),this.#eD(),this.values,await this.#eL("input.respond",e)},inject:async e=>{await this.#eL("input.inject",e)}},this.state={get:async e=>await this.#eL("state.get",e),listCheckpoints:async e=>await this.#eL("state.listCheckpoints",e),fork:async e=>await this.#eL("state.fork",e)},null==this.#q.openEventStream&&(this.#q.setOnReconnected?.(()=>this.#eM()),this.#eP())}async #ej(){this.#X||(null==this.#Z&&(this.#Z=this.#q.open().then(()=>{this.#X=!0})),await this.#Z)}#eF(){return["lifecycle","input"]}#eD(){null==this.#ei&&(this.#ei=(async()=>{this.#ea=(await this.#eU({channels:this.#eF()})).subscriptionId})().catch(()=>void 0))}async #eO(e){let t,n,r=new Promise((e,r)=>{t=e,n=r});this.#es=r,r.catch(()=>void 0);try{let n=await e();return t(),n}catch(e){throw n(e),e}finally{this.#es===r&&(this.#es=null)}}#eR(e){if(this.interrupted=!1,null!=e){let t=new Set(Array.isArray(e)?e:[e]);for(let e=this.interrupts.length-1;e>=0;e-=1)t.has(this.interrupts[e].interruptId)&&this.interrupts.splice(e,1)}else this.interrupts.length=0;for(let[e,t]of(null!=this.#en&&(clearTimeout(this.#en),this.#en=void 0),this.#er=void 0,this.#W))e!==this.#ea&&t.resume()}get messages(){if(this.#eu)return this.#eu;let e=new ap.MultiCursorBuffer;this.#eu=e;let t=new ar.StreamingMessageAssembler;return this.#eB(["messages",...this.#eF()],n=>{if("messages"!==n.method)return;let r=t.consume(n);r&&e.push((0,ar.toStreamingMessageHandle)(r))},()=>e.close()),e}get values(){let e,t;if(this.#ed)return this.#ed;let n=new ap.MultiCursorBuffer,r=new Promise(e=>{t=e});this.#eh=r;let a=Object.assign(n,{then:(e,t)=>r.then(e,t)});return this.#ed=a,this.#eB(["values",...this.#eF()],t=>{if("values"!==t.method)return;let r=function(e){if(null==e||"object"!=typeof e||Array.isArray(e))return e;let t=e.messages;return Array.isArray(t)&&0!==t.length&&t.some(e=>{if(null==e||"object"!=typeof e||"function"==typeof e.getType)return!1;let t=e.type;return"string"==typeof t&&aN.has(t)})?{...e,messages:t.map(e=>"function"==typeof e.getType?e:aE(e))}:e}(t.params.data);e=r,n.push(r)},()=>{t(e),n.close()}),a}get toolCalls(){if(this.#ep)return this.#ep;let e=new ap.MultiCursorBuffer;this.#ep=e;let t=new ak.ToolCallAssembler;return this.#eB(["tools",...this.#eF()],n=>{if("tools"!==n.method)return;let r=t.consume(n);r&&e.push((0,ak.toClientAssembledToolCall)(r))},()=>e.close()),e}get subgraphs(){if(this.#em)return this.#em;let e=new ap.MultiCursorBuffer;return this.#em=e,(async()=>{for await(let t of new aw.SubgraphDiscoveryHandle(await this.#eU({channels:["tools",...this.#eF()]}),this,[]))e.push(t);e.close()})(),e}get subagents(){if(this.#ef)return this.#ef;let e=new ap.MultiCursorBuffer;return this.#ef=e,(async()=>{for await(let t of new aA.SubagentDiscoveryHandle(await this.#eU({channels:["tools",...this.#eF()]}),this))e.push(t);e.close()})(),e}get audio(){return this.#ez(),this.#ew}get images(){return this.#ez(),this.#eA}get video(){return this.#ez(),this.#eN}get files(){return this.#ez(),this.#eI}get output(){return this.values,this.#eh}get extensions(){if(this.#eg)return this.#eg;let e=this.#eb,t=e=>this.#eH(e);return this.#eg=new Proxy(Object.create(null),{get:(n,r)=>{if("string"!=typeof r)return;let a=e.get(r);if(a)return a;let i=t(r);return e.set(r,i),i},has:(e,t)=>"string"==typeof t}),this.#eg}#e$(){this.#ey||(this.#ey=!0,this.#eB(["custom",...this.#eF()],e=>{if("custom"===e.method)for(let t of(this.#ex.push(e),this.#ev))t(e)},()=>{for(let e of(this.#eE=!0,this.#eT.splice(0)))e()},{endOnRootTerminal:!0}))}#ez(){if(this.#eS)return;this.#eS=!0;let e=new aa.MediaAssembler({fetch:this.#eC,onAudio:e=>{this.#ek.add(e),this.#ew.push(e)},onImage:e=>{this.#ek.add(e),this.#eA.push(e)},onVideo:e=>{this.#ek.add(e),this.#eN.push(e)},onFile:e=>{this.#ek.add(e),this.#eI.push(e)}});this.#e_=e,this.#eB(["messages",...this.#eF()],t=>{"messages"===t.method&&e.consume(t)},()=>{e.close(),this.#ew.close(),this.#eA.close(),this.#eN.close(),this.#eI.close()})}#eH(e){let t,n;this.#e$();let r=new ap.MultiCursorBuffer,a=new Promise(e=>{n=e}),i=n=>{let a=n.params.data;a?.name===e&&(t=a.payload,r.push(a.payload))};for(let e of this.#ex)i(e);this.#ev.push(i);let s=()=>{n(t),r.close()};return this.#eE?s():this.#eT.push(s),Object.assign(r,{then:(e,t)=>a.then(e,t)})}async #eB(e,t,n,r={}){let a,i;try{for await(let n of i=await this.#eU({channels:e}))t(n),r.endOnRootTerminal&&null==a&&function(e){if("lifecycle"!==e.method||0!==e.params.namespace.length)return!1;let t=e.params.data;return t?.event!=null&&aR.has(t.event)}(n)&&(a=setTimeout(()=>{a=void 0,i.unsubscribe().catch(()=>void 0)},0))}catch{}finally{null!=a&&clearTimeout(a),n()}}async submitRun(e){return this.#eR(),await this.#eO(()=>(this.#eG(),this.#eL("run.start",{...aL(e),assistant_id:this.assistantId})))}async respondInput(e){let t="responses"in e?e.responses.map(e=>e.interrupt_id):e.interrupt_id;this.#eR(t),this.#eG(),await this.#eL("input.respond",e)}onEvent(e){return this.#ec.add(e),()=>{this.#ec.delete(e)}}#eG(){if(null==this.#el){if(null!=this.#q.openEventStream){this.#el=this.#eq();return}this.#el=this.#eW()}}startLifecycleWatcher(){this.#eG()}async #eq(){let e;if(null!=this.#es)try{await this.#es}catch{return}try{e=this.#q.openEventStream({channels:["lifecycle","input"]})}catch{return}try{await e.ready}catch{try{e.close()}catch{}return}if(this.#K){try{e.close()}catch{}return}this.#eo=e;try{for await(let t of e.events){if(this.#K)break;this.#eV(t)}}catch{}}async #eW(){let e;try{e=await this.#eU({channels:["lifecycle","input"]})}catch{return}if(this.#K){try{e.close()}catch{}return}try{for await(let t of e)if(this.#K)break}catch{}}#eV(e){if("event"!==e.type)return;"number"==typeof e.seq&&(this.ordering.lastSeenSeq=aC(this.ordering.lastSeenSeq,e.seq)),e.event_id&&(this.ordering.lastEventId=e.event_id);let t=e.event_id??void 0,n=null!=t&&this.#V.has(t);null!=t&&this.#V.add(t),n||(this.#eY(e),this.#eK(e))}#eY(e){if("lifecycle"===e.method&&"interrupted"===e.params.data.event&&(this.interrupted=!0),"input.requested"===e.method){let t=e.params.data,n=t.interrupt_id??`interrupt_${this.interrupts.length}`;this.interrupts.push({interruptId:n,payload:t.payload,namespace:[...e.params.namespace]}),null!=ao(t.payload)&&this.#Y.add(n)}}#eK(e){if(0!==this.#ec.size)for(let t of this.#ec)try{t(e)}catch{}}async close(){if(this.#K)return;for(let e of(this.#K=!0,null!=this.#en&&(clearTimeout(this.#en),this.#en=void 0),this.#er=void 0,this.#et))e.reject(Error("ThreadStream closed"));if(this.#et.length=0,null!=this.#Q){try{this.#Q.close()}catch{}this.#Q=null,this.#J=null}if(null!=this.#eo){try{this.#eo.close()}catch{}this.#eo=null}let e=this.#el;for(let e of(this.#el=void 0,this.#ec.clear(),this.#W.values()))e.close();this.#W.clear();try{await e}catch{}for(let e of this.#ek)try{e.revoke()}catch{}this.#ek.clear(),this.#e_?.close(),this.#ew.close(),this.#eA.close(),this.#eN.close(),this.#eI.close(),await this.#q.close()}async subscribe(e,t={}){let n="object"==typeof e&&!Array.isArray(e)&&"channels"in e,r=function(e,t={}){if("object"==typeof e&&!Array.isArray(e)&&"channels"in e)return e;let n=Array.isArray(e)?[...e]:[e];return{...t,channels:n}}(e,t);return await this.#eU(r,{unwrapNamedCustom:!n})}async #eU(e,t={}){await this.#ej();let{unwrapNamedCustom:n=!0}=t,r=e.channels.length>0&&e.channels.every(e=>e.startsWith("custom:")),a=n&&r?e=>e.params.data?.payload??e:void 0;return null!=this.#q.openEventStream?this.#eX(e,a):this.#eZ(e,a)}async #eX(e,t){let n=`sse-${this.#G++}`,r=new aM(n,e,async e=>{this.#W.delete(e),this.#eQ()},t),a=Object.assign(r,{filter:e,registeredAfterSeq:this.ordering.lastSeenSeq,seenEventIds:new Set});this.#W.set(n,a);let i=new Promise((t,n)=>{this.#et.push({filter:e,resolve:t,reject:n})});this.#eQ();try{await i}catch(e){throw this.#W.delete(n),e}return r}#eJ(){if(0===this.#W.size)return null;let e=new Set,t=!1,n=new Map,r=!1,a=0;for(let i of this.#W.values()){for(let t of i.filter.channels)e.add(t);if(null==i.filter.namespaces)t=!0;else if(!t)for(let e of i.filter.namespaces)n.set(aI(e),e);null==i.filter.depth?r=!0:!r&&i.filter.depth>a&&(a=i.filter.depth)}let i={channels:[...e]};return t||(i.namespaces=[...n.values()]),r||(i.depth=a),i}#eQ(){this.#K||"idle"===this.#ee&&(this.#ee="scheduled",queueMicrotask(()=>{if(this.#K){this.#ee="idle";return}this.#ee="idle",this.#e0().catch(()=>{this.#ee="idle"})}))}async #e0(){let e;if(this.#K||"rotating"===this.#ee)return;let t=this.#eJ();if(null==t)return;if(null!=this.#es){try{await this.#es}catch(t){let e=t instanceof Error?t:Error("run.start failed");this.#e1(e);return}if(this.#K||"rotating"===this.#ee)return}if(null!=this.#J&&aO(t,this.#J)&&0===this.#et.length)return void this.#e2();this.#ee="rotating";try{e=this.#q.openEventStream(t)}catch(e){this.#ee="idle",this.#e1(e);return}try{await e.ready}catch(t){this.#ee="idle";try{e.close()}catch{}this.#e1(t);return}if(this.#K){try{e.close()}catch{}this.#ee="idle";return}this.#e3(e);let n=this.#Q;if(this.#Q=e,this.#J=t,null!=n)try{n.close()}catch{}this.#ee="idle",this.#e2();let r=this.#eJ();null==r||aO(r,this.#J)||this.#eQ()}async #e3(e){try{for await(let t of e.events){if(this.#K)break;this.#e4(t)}}catch(t){e!==this.#Q||this.#K||this.#e5(t)}}#e2(){if(null==this.#J)return;let e=this.#J;if(0===this.#et.length)return;let t=[];for(let n of this.#et)aD(e,n.filter)?n.resolve():t.push(n);this.#et.length=0,this.#et.push(...t)}#e1(e){if(0===this.#et.length)return;let t=this.#J,n=[];for(let e of this.#et)null!=t&&aD(t,e.filter)?e.resolve():n.push(e);for(let t of(this.#et.length=0,n))t.reject(e)}#e5(e){let t=e instanceof Error?e:Error(String(e));for(let e of this.#g.values())e.reject(t);for(let e of(this.#g.clear(),this.#et))e.reject(t);for(let e of(this.#et.length=0,this.#W.values()))e.close()}async #eZ(e,t){let n,r=`pending:${this.#G}:${Math.random().toString(36).slice(2,10)}`,a=r,i=new aM(r,e,async()=>{this.#W.delete(a),this.#K||a===r||await this.#eL("subscription.unsubscribe",{subscription_id:a}).catch(e=>{if(!(e instanceof ai)||"no_such_subscription"!==e.code)throw e})},t),s=Object.assign(i,{filter:e,registeredAfterSeq:this.ordering.lastSeenSeq,seenEventIds:new Set});if(this.#W.set(r,s),null!=this.#es)try{await this.#es}catch(e){throw this.#W.delete(r),e}try{n=await this.#eL("subscription.subscribe",e)}catch(e){throw this.#W.delete(r),e}return this.#W.delete(r),i.subscriptionId=a=n.subscription_id,this.#W.set(a,s),i}async #eM(){if(null!=this.#q.openEventStream||this.#K)return;let e=[...this.#W.entries()];await Promise.all(e.map(async([e,t])=>{if(!e.startsWith("pending:"))try{let n=(await this.#eL("subscription.subscribe",t.filter)).subscription_id;if(n===e)return;this.#W.delete(e),t.subscriptionId=n,this.#W.set(n,t),this.#ea===e&&(this.#ea=n)}catch{}}))}async #eP(){try{for await(let e of this.#q.events())this.#e4(e);for(let e of this.#W.values())e.close()}catch(t){let e=t instanceof Error?t:Error(String(t));for(let t of this.#g.values())t.reject(e);for(let e of this.#W.values())e.close();this.#g.clear()}}#e6(e){null!=this.#en&&clearTimeout(this.#en),this.#er=e??null,this.#en=setTimeout(()=>{if(this.#en=void 0,!this.#K)for(let[t,n]of this.#W)t!==this.#ea&&(null!=e&&null!=n.registeredAfterSeq&&n.registeredAfterSeq>=e||n.pause())},0)}#e4(e){if("event"===e.type){"number"==typeof e.seq&&(this.ordering.lastSeenSeq=aC(this.ordering.lastSeenSeq,e.seq)),e.event_id&&(this.ordering.lastEventId=e.event_id);let t=e.event_id??void 0,n=null!=t&&this.#V.has(t);null!=t&&this.#V.add(t);let r=new Set(["interrupted","completed","failed"]);n||(this.#eY(e),this.#eK(e));let a=!1;for(let n of this.#W.values())if(function(e,t){var n,r,a;let i=function(e){switch(e.method){case"values":return"values";case"checkpoints":return"checkpoints";case"updates":return"updates";case"messages":return"messages";case"tools":return"tools";case"custom":{let t=e.params.data;return t?.name!=null?`custom:${t.name}`:"custom"}case"lifecycle":return"lifecycle";case"input.requested":return"input";case"tasks":return"tasks";default:return}}(e);if(void 0===i)return!1;let s=t.channels;return!!(s.includes(i)||i.startsWith("custom:")&&s.includes("custom"))&&(n=e.params.namespace,r=t.namespaces,a=t.depth,!r||0===r.length||r.some(e=>!!function(e,t){if(t.length>e.length)return!1;for(let n=0;n<t.length;n+=1){let r=t[n],a=e[n];if(a!==r&&(r.includes(":")||function(e){let t=e.indexOf(":");return -1===t?e:e.slice(0,t)}(a)!==r))return!1}return!0}(n,e)&&(void 0===a||n.length-e.length<=a)))}(e,n.filter)){if(null!=t){if(n.seenEventIds.has(t))continue;n.seenEventIds.add(t)}n.push(e),a=!0}if(a&&void 0!==this.#er&&("lifecycle"!==e.method||0!==e.params.namespace.length)){let t="number"==typeof e.seq?e.seq:void 0,n=this.#er;if(null===n||null==t||t>n){for(let[e,t]of(null!=this.#en&&(clearTimeout(this.#en),this.#en=void 0),this.#W))e!==this.#ea&&t.resume();this.#e6(null===n?void 0:n)}}if(a&&"lifecycle"===e.method&&0===e.params.namespace.length&&r.has(e.params.data.event)){if("interrupted"===e.params.data.event&&this.#Y.size>0)return void this.#Y.clear();this.#e6("number"==typeof e.seq?e.seq:void 0)}return}let t="number"==typeof e.id?e.id:void 0,n=void 0===t?void 0:this.#g.get(t);if(n){if(void 0!==t&&this.#g.delete(t),"error"===e.type)return void n.reject(new ai(e));"number"==typeof e.meta?.applied_through_seq&&(this.ordering.lastAppliedThroughSeq=e.meta.applied_through_seq),n.resolve(e)}}async #eL(e,t){await this.#ej();let n=this.#G++,r=new Promise((e,t)=>{this.#g.set(n,{resolve:e,reject:t})}),a=await this.#q.send({id:n,method:e,params:t});if(a){if(this.#g.delete(n),"error"===a.type)throw new ai(a);return"number"==typeof a.meta?.applied_through_seq&&(this.ordering.lastAppliedThroughSeq=a.meta.applied_through_seq),a.result}return(await r).result}},aj=class{values=[];waiters=[];rejecters=[];closed=!1;error=null;push(e){if(this.closed)return;let t=this.waiters.shift();(this.rejecters.shift(),t)?t({done:!1,value:e}):this.values.push(e)}close(e){if(!this.closed){if(this.closed=!0,this.error=null==e?null:e instanceof Error?e:Error(String(e)),this.error){for(let e of this.rejecters.splice(0))e(this.error);this.waiters.length=0;return}for(let e of this.waiters.splice(0))e({done:!0,value:void 0});this.rejecters.length=0}}async shift(){if(this.values.length>0)return{done:!1,value:this.values.shift()};if(this.error)throw this.error;return this.closed?{done:!0,value:void 0}:await new Promise((e,t)=>{this.waiters.push(e),this.rejecters.push(t)})}};let aF=e=>"object"==typeof e&&null!==e;function aU(e,t,n){if("string"==typeof e)return e;if(!t)throw Error("Protocol transport has no bound threadId. Bind one — the framework calls client.threads.stream(threadId, { transport }) / transport.setThreadId(threadId) — before issuing requests.");return e?e(t):n(t)}let aB=(e,t)=>new URL(`${e.replace(/\/$/,"")}${t}`),az=e=>e instanceof Error?e:Error(String(e));function aH(...e){let t=new Headers;for(let n of e)if(n){if(n instanceof Headers){n.forEach((e,n)=>{t.set(n,e)});continue}if(Array.isArray(n)){for(let[e,r]of n)null==r?t.delete(e):t.set(e,r);continue}for(let[e,r]of Object.entries(n))null==r?t.delete(e):t.set(e,r)}return t}function a$(e){return Math.min(1e3*2**(e-1),5e3)+1e3*Math.random()}var aG=class{threadId;queue=new aj;apiUrl;defaultHeaders;onRequest;webSocketFactory;paths;maxReconnectAttempts;onReconnect;reconnectDelayMs;onReconnected;pending=new Map;socket=null;closed=!1;intentionalClose=!1;reconnectInFlight=null;constructor(e){this.apiUrl=e.apiUrl,this.threadId=e.threadId??"",this.defaultHeaders=e.defaultHeaders,this.onRequest=e.onRequest,this.webSocketFactory=e.webSocketFactory??(e=>new WebSocket(e)),this.paths=e.paths,this.maxReconnectAttempts=e.maxReconnectAttempts??5,this.onReconnect=e.onReconnect,this.onReconnected=e.onReconnected,this.reconnectDelayMs=e.reconnectDelayMs??a$}setThreadId(e){if(e!==this.threadId){if(null!=this.reconnectInFlight||null!=this.socket&&3!==this.socket.readyState)throw Error("Protocol WebSocket transport cannot be rebound to a different thread while the socket is open. Close the current stream and create a new WebSocket transport for the new thread.");this.threadId=e}}get streamUrl(){return aU(this.paths?.stream,this.threadId,e=>`/threads/${e}/stream/events`)}setOnReconnected(e){this.onReconnected=e}async open(){let e;if(this.closed)throw Error("Protocol WebSocket transport is closed.");if(this.socket?.readyState===1)return;null!=this.socket&&(this.#e9(this.socket),this.socket=null),this.assertBrowserSafeTransportConfig();let t=((e=new URL(aB(this.apiUrl,this.streamUrl).toString())).protocol="https:"===e.protocol?"wss:":"ws:",e.search="",e.hash="",e.toString()),n=this.webSocketFactory(t);this.socket=n,this.intentionalClose=!1,this.#e8(n),await new Promise((e,t)=>{let r=()=>{i(),e()},a=()=>{i(),t(Error("Failed to open protocol WebSocket."))},i=()=>{n.removeEventListener("open",r),n.removeEventListener("error",a)};n.addEventListener("open",r,{once:!0}),n.addEventListener("error",a,{once:!0})})}async send(e){return await this.sendCommand(e)}events(){let e=this.queue;return{[Symbol.asyncIterator]:()=>({next:async()=>await e.shift(),return:async()=>(e.close(),{done:!0,value:void 0})})}}async close(){if(this.closed)return;for(let{reject:e}of(this.closed=!0,this.intentionalClose=!0,this.pending.values()))e(Error("Protocol WebSocket connection closed."));this.pending.clear(),this.queue.close();let e=this.socket;this.socket=null,e&&(this.#e9(e),await new Promise(t=>{if(3===e.readyState)return void t();let n=()=>{e.removeEventListener("close",n),t()};e.addEventListener("close",n,{once:!0}),1===e.readyState||0===e.readyState?e.close():t()}))}assertBrowserSafeTransportConfig(){if(Object.values(this.defaultHeaders??{}).some(e=>null!=e)||null!=this.onRequest)throw Error("Browser WebSocket protocol transport does not support defaultHeaders or onRequest hooks. Supply a custom protocolWebSocketFactory if you need custom WebSocket setup.")}async sendCommand(e){let t=this.socket;if(null!=this.reconnectInFlight&&(null==t||1!==t.readyState)&&(await this.reconnectInFlight.catch(()=>void 0),t=this.socket),null==t||1!==t.readyState)throw Error("Protocol WebSocket is not open.");return await new Promise((n,r)=>{this.pending.set(e.id,{resolve:n,reject:r});try{t.send(JSON.stringify(e))}catch(t){this.pending.delete(e.id),r(az(t))}})}#e8(e){e.addEventListener("message",this.handleMessage),e.addEventListener("close",this.handleClose),e.addEventListener("error",this.handleSocketError)}#e9(e){e.removeEventListener("message",this.handleMessage),e.removeEventListener("close",this.handleClose),e.removeEventListener("error",this.handleSocketError)}handleMessage=e=>{let t;try{t=JSON.parse(String(e.data))}catch{return}if(aF(t)&&"number"==typeof t.id&&("success"===t.type||"error"===t.type)){let e=this.pending.get(t.id);e&&(this.pending.delete(t.id),e.resolve(t));return}aF(t)&&"event"===t.type&&this.queue.push(t)};handleClose=()=>{let e=this.socket;(null!=e&&this.#e9(e),this.socket=null,this.intentionalClose||this.closed)?this.queue.close():this.#e7(Error("Protocol WebSocket closed unexpectedly."))};handleSocketError=()=>{this.closed||this.intentionalClose||this.#e7(Error("Protocol WebSocket encountered an error."))};#e7(e){let t=az(e);for(let{reject:e}of this.pending.values())e(t);(this.pending.clear(),this.maxReconnectAttempts<=0)?this.queue.close(t):this.#te(e)}#te(e){this.closed||this.intentionalClose||null==this.reconnectInFlight&&(this.reconnectInFlight=this.#tt(e).finally(()=>{this.reconnectInFlight=null}))}async #tt(e){let t=e;for(let e=1;e<=this.maxReconnectAttempts;e+=1){if(this.closed||this.intentionalClose)return;this.onReconnect?.({attempt:e,cause:t});let n=this.reconnectDelayMs(e);if(n>0&&await new Promise(e=>{setTimeout(e,n)}),this.closed||this.intentionalClose)return;try{await this.open(),this.onReconnected&&await this.onReconnected();return}catch(e){t=e}}this.queue.close(new as(this.maxReconnectAttempts,t))}},aq=class{threadId;apiUrl;queue=new aj;fetchImpl;defaultHeaders;onRequest;fetchFactory;asyncCaller;maxReconnectAttempts;idleReconnect;onReconnect;reconnectDelayMs;paths;sessionAbortController=new AbortController;eventStreams=new Set;closed=!1;constructor(e){this.fetchImpl=e.fetch??fetch,this.apiUrl=e.apiUrl,this.defaultHeaders=e.defaultHeaders??{},this.onRequest=e.onRequest,this.fetchFactory=e.fetchFactory,this.asyncCaller=e.asyncCaller,this.maxReconnectAttempts=null!=e.fetch?0:e.maxReconnectAttempts??5,this.idleReconnect=null!=e.fetch?null:e.idleReconnect??"auto",this.onReconnect=e.onReconnect,this.reconnectDelayMs=e.reconnectDelayMs??a$,this.threadId=e.threadId??"",this.paths=e.paths}setThreadId(e){this.threadId=e}get commandsUrl(){return aU(this.paths?.commands,this.threadId,e=>`/threads/${e}/commands`)}get streamUrl(){return aU(this.paths?.stream,this.threadId,e=>`/threads/${e}/stream/events`)}get stateUrl(){return aU(this.paths?.state,this.threadId,e=>`/threads/${e}/state`)}async getState(){let e=aB(this.apiUrl,this.stateUrl),t={method:"GET",headers:aH(this.defaultHeaders,{})};this.onRequest&&(t=await this.onRequest(e,t));let n=await (await this.resolveFetch())(e.toString(),t);if(404===n.status)return null;if(!n.ok){let e=az(Error(`Thread state request failed: ${n.status} ${n.statusText}`));throw e.status=n.status,e}return await n.json()}async resolveFetch(){return this.fetchFactory?await this.fetchFactory():this.fetchImpl}async open(){}async send(e){let t=await this.request(this.commandsUrl,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e),signal:this.sessionAbortController.signal});if(202===t.status||204===t.status)return;let n=await t.json();if(!(aF(n)&&"string"==typeof n.type&&("success"===n.type||"error"===n.type)))throw Error("Protocol command did not return a valid response.");return n}events(){let e=this.queue;return{[Symbol.asyncIterator]:()=>({next:async()=>await e.shift(),return:async()=>(e.close(),{done:!0,value:void 0})})}}openEventStream(e){let t,n;if(this.closed)throw Error("Protocol transport is closed.");let r=new AbortController;this.eventStreams.add(r);let a=new aj,i=this.streamUrl,s=new Promise((e,r)=>{t=e,n=r}),o="number"==typeof e.since?e.since:void 0,l=!1;(async()=>{let s=0;for(;!r.signal.aborted&&!this.closed;)try{let n=await this.request(i,{method:"POST",headers:{"content-type":"application/json",accept:"text/event-stream"},body:JSON.stringify({channels:e.channels,...e.namespaces?{namespaces:e.namespaces}:{},...null!=e.depth?{depth:e.depth}:{},...null!=o?{since:o}:{}}),signal:r.signal},{stream:!0});l||(l=!0,t());let s=n.body??new ReadableStream({start(e){e.close()}}),c="auto"===this.idleReconnect||"number"==typeof this.idleReconnect&&this.idleReconnect>0,u=s.pipeThrough(rZ()),d=(c?u.pipeThrough(r5({mode:this.idleReconnect})):u).pipeThrough(rQ());for await(let e of r9.fromReadableStream(d)){if(r.signal.aborted||this.closed)break;if(aF(e.data)){let t=e.data;"number"==typeof t.seq&&(o=t.seq),a.push(t)}}a.close();return}catch(t){if(r.signal.aborted||this.closed){l||n(t),a.close();return}if(this.maxReconnectAttempts<=0||(s+=1)>this.maxReconnectAttempts){l||n(t),a.close(az(t));return}this.onReconnect?.({attempt:s,cause:t});let e=this.reconnectDelayMs(s);e>0&&await new Promise(t=>{setTimeout(t,e)})}})();let c=()=>{this.eventStreams.delete(r),r.abort(),a.close()};return{events:{[Symbol.asyncIterator]:()=>({next:async()=>await a.shift(),return:async()=>(c(),{done:!0,value:void 0})})},ready:s,close:c}}async close(){if(!this.closed){for(let e of(this.closed=!0,this.sessionAbortController.abort(),this.eventStreams))e.abort();this.eventStreams.clear(),this.queue.close()}}async request(e,t,n){let r=aB(this.apiUrl,e),a={...t,headers:aH(this.defaultHeaders,t.headers)};this.onRequest&&(a=await this.onRequest(r,a));let i=null!=this.asyncCaller&&!n?.stream,s=async()=>{let e=await (await this.resolveFetch())(r.toString(),a);if(!e.ok){if(i)throw e;let t="";try{let n=await e.text(),r=JSON.parse(n);"object"==typeof r&&null!=r&&(t=r.message??r.error??""),t||(t=n)}catch{}throw Error(t?`Protocol request failed: ${e.status} ${e.statusText} — ${t}`:`Protocol request failed: ${e.status} ${e.statusText}`)}return e};try{return i?await this.asyncCaller.call(s):await s()}catch(e){throw az(e)}}},aW=class extends r7{async get(e,t){return this.fetch(`/assistants/${e}`,{signal:t?.signal})}async getGraph(e,t){return this.fetch(`/assistants/${e}/graph`,{params:{xray:t?.xray},signal:t?.signal})}async getSchemas(e,t){return this.fetch(`/assistants/${e}/schemas`,{signal:t?.signal})}async getSubgraphs(e,t){return t?.namespace?this.fetch(`/assistants/${e}/subgraphs/${t.namespace}`,{params:{recurse:t?.recurse},signal:t?.signal}):this.fetch(`/assistants/${e}/subgraphs`,{params:{recurse:t?.recurse},signal:t?.signal})}async create(e){return this.fetch("/assistants",{method:"POST",json:{graph_id:e.graphId,config:e.config,context:e.context,metadata:e.metadata,assistant_id:e.assistantId,if_exists:e.ifExists,name:e.name,description:e.description},signal:e.signal})}async update(e,t){return this.fetch(`/assistants/${e}`,{method:"PATCH",json:{graph_id:t.graphId,config:t.config,context:t.context,metadata:t.metadata,name:t.name,description:t.description},signal:t.signal})}async delete(e,t){return this.fetch(`/assistants/${e}?delete_threads=${t?.deleteThreads??!1}`,{method:"DELETE",signal:t?.signal})}async search(e){let t={graph_id:e?.graphId??void 0,name:e?.name??void 0,metadata:e?.metadata??void 0,limit:e?.limit??10,offset:e?.offset??0,sort_by:e?.sortBy??void 0,sort_order:e?.sortOrder??void 0,select:e?.select??void 0},[n,r]=await this.fetch("/assistants/search",{method:"POST",json:t,withResponse:!0,signal:e?.signal});return e?.includePagination?{assistants:n,next:r.headers.get("X-Pagination-Next")}:n}async count(e){return this.fetch("/assistants/count",{method:"POST",json:{metadata:e?.metadata??void 0,graph_id:e?.graphId??void 0,name:e?.name??void 0},signal:e?.signal})}async getVersions(e,t){return this.fetch(`/assistants/${e}/versions`,{method:"POST",json:{metadata:t?.metadata??void 0,limit:t?.limit??10,offset:t?.offset??0},signal:t?.signal})}async setLatest(e,t,n){return this.fetch(`/assistants/${e}/latest`,{method:"POST",json:{version:t},signal:n?.signal})}},aV=e.i(230125),aY=class extends r7{async get(e,t){return this.fetch(`/threads/${e}`,{params:{include:t?.include??void 0},signal:t?.signal})}async create(e){let t="number"==typeof e?.ttl?{ttl:e.ttl,strategy:"delete"}:e?.ttl;return this.fetch("/threads",{method:"POST",json:{metadata:{...e?.metadata,graph_id:e?.graphId},thread_id:e?.threadId,if_exists:e?.ifExists,supersteps:e?.supersteps?.map(e=>({updates:e.updates.map(e=>({values:e.values,command:e.command,as_node:e.asNode}))})),ttl:t},signal:e?.signal})}async copy(e,t){return this.fetch(`/threads/${e}/copy`,{method:"POST",signal:t?.signal})}async update(e,t){let n="number"==typeof t?.ttl?{ttl:t.ttl,strategy:"delete"}:t?.ttl;return this.fetch(`/threads/${e}`,{method:"PATCH",headers:t?.returnMinimal?{Prefer:"return=minimal"}:void 0,json:{metadata:t?.metadata,ttl:n},signal:t?.signal})}async delete(e,t){return this.fetch(`/threads/${e}`,{method:"DELETE",signal:t?.signal})}async prune(e,t){return this.fetch("/threads/prune",{method:"POST",json:{thread_ids:e,strategy:t?.strategy??"delete"},signal:t?.signal})}async search(e){return this.fetch("/threads/search",{method:"POST",json:{metadata:e?.metadata??void 0,ids:e?.ids??void 0,limit:e?.limit??10,offset:e?.offset??0,status:e?.status,sort_by:e?.sortBy,sort_order:e?.sortOrder,select:e?.select??void 0,values:e?.values??void 0,extract:e?.extract??void 0},signal:e?.signal})}async count(e){return this.fetch("/threads/count",{method:"POST",json:{metadata:e?.metadata??void 0,values:e?.values??void 0,status:e?.status??void 0},signal:e?.signal})}async getState(e,t,n){return null!=t?"string"!=typeof t?this.fetch(`/threads/${e}/state/checkpoint`,{method:"POST",json:{checkpoint:t,subgraphs:n?.subgraphs},signal:n?.signal}):this.fetch(`/threads/${e}/state/${t}`,{params:{subgraphs:n?.subgraphs},signal:n?.signal}):this.fetch(`/threads/${e}/state`,{params:{subgraphs:n?.subgraphs},signal:n?.signal,dedupe:!0})}async updateState(e,t){return this.fetch(`/threads/${e}/state`,{method:"POST",json:{values:t.values,checkpoint:t.checkpoint,checkpoint_id:t.checkpointId,as_node:t?.asNode},signal:t?.signal})}async patchState(e,t,n){let r;if("string"!=typeof e){if("string"!=typeof e.configurable?.thread_id)throw Error("Thread ID is required when updating state with a config.");r=e.configurable.thread_id}else r=e;return this.fetch(`/threads/${r}/state`,{method:"PATCH",json:{metadata:t},signal:n?.signal})}async getHistory(e,t){return this.fetch(`/threads/${e}/history`,{method:"POST",json:{limit:t?.limit??10,before:t?.before,metadata:t?.metadata,checkpoint:t?.checkpoint},signal:t?.signal,dedupe:!0})}async *joinStream(e,t){yield*this.streamWithRetry({endpoint:`/threads/${e}/stream`,method:"GET",signal:t?.signal,headers:t?.lastEventId?{"Last-Event-ID":t.lastEventId}:void 0,params:t?.streamMode?{stream_mode:t.streamMode}:void 0})}stream(e,t){let n,{threadId:r,options:a}="string"==typeof e?{threadId:e,options:t}:{threadId:(0,aV.v7)(),options:e},i=a.fetch,s=i??this.asyncCaller.fetch.bind(this.asyncCaller);if(null!=a.transport&&"string"!=typeof a.transport)n=a.transport,n.setThreadId?.(r);else{let e=a.transport??("v2-websocket"===this.streamProtocol?"websocket":"sse"),t=a.maxReconnectAttempts??5,s={apiUrl:this.apiUrl,threadId:r,defaultHeaders:this.defaultHeaders,onRequest:this.onRequest,maxReconnectAttempts:t,reconnectDelayMs:a.reconnectDelayMs,onReconnect:a.onReconnect};n="websocket"===e?new aG({...s,webSocketFactory:a.webSocketFactory}):new aq({...s,idleReconnect:a.streamIdleReconnect,fetch:i,asyncCaller:i?void 0:this.asyncCaller})}return new aP(n,{...a,fetch:s})}},aK=class extends r7{async *stream(e,t,n){let r={input:n?.input,command:n?.command,config:n?.config,context:n?.context,metadata:n?.metadata,stream_mode:n?.streamMode,stream_subgraphs:n?.streamSubgraphs,stream_resumable:n?.streamResumable,feedback_keys:n?.feedbackKeys,assistant_id:t,interrupt_before:n?.interruptBefore,interrupt_after:n?.interruptAfter,checkpoint:n?.checkpoint,webhook:n?.webhook,multitask_strategy:n?.multitaskStrategy,on_completion:n?.onCompletion,on_disconnect:n?.onDisconnect,after_seconds:n?.afterSeconds,if_not_exists:n?.ifNotExists,checkpoint_during:n?.checkpointDuring,durability:n?.durability};yield*this.streamWithRetry({endpoint:null==e?"/runs/stream":`/threads/${e}/runs/stream`,method:"POST",json:r,signal:n?.signal,idleReconnect:n?.streamIdleReconnect,onInitialResponse:e=>{let t=at(e);t&&n?.onRunCreated?.(t)}})}async create(e,t,n){let r={input:n?.input,command:n?.command,config:n?.config,context:n?.context,metadata:n?.metadata,stream_mode:n?.streamMode,stream_subgraphs:n?.streamSubgraphs,stream_resumable:n?.streamResumable,feedback_keys:n?.feedbackKeys,assistant_id:t,interrupt_before:n?.interruptBefore,interrupt_after:n?.interruptAfter,webhook:n?.webhook,checkpoint:n?.checkpoint,checkpoint_id:n?.checkpointId,multitask_strategy:n?.multitaskStrategy,after_seconds:n?.afterSeconds,if_not_exists:n?.ifNotExists,checkpoint_during:n?.checkpointDuring,durability:n?.durability,on_completion:n?.onCompletion,langsmith_tracer:n?._langsmithTracer?{project_name:n?._langsmithTracer?.projectName,example_id:n?._langsmithTracer?.exampleId}:void 0},a=null===e?"/runs":`/threads/${e}/runs`,[i,s]=await this.fetch(a,{method:"POST",json:r,signal:n?.signal,withResponse:!0}),o=at(s);return o&&n?.onRunCreated?.(o),i}async createBatch(e,t){let n=e.map(e=>({...e,assistant_id:e.assistantId})).map(e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>void 0!==t)));return this.fetch("/runs/batch",{method:"POST",json:n,signal:t?.signal})}async wait(e,t,n){let r={input:n?.input,command:n?.command,config:n?.config,context:n?.context,metadata:n?.metadata,assistant_id:t,interrupt_before:n?.interruptBefore,interrupt_after:n?.interruptAfter,checkpoint:n?.checkpoint,checkpoint_id:n?.checkpointId,webhook:n?.webhook,multitask_strategy:n?.multitaskStrategy,on_completion:n?.onCompletion,on_disconnect:n?.onDisconnect,after_seconds:n?.afterSeconds,if_not_exists:n?.ifNotExists,checkpoint_during:n?.checkpointDuring,durability:n?.durability,langsmith_tracer:n?._langsmithTracer?{project_name:n?._langsmithTracer?.projectName,example_id:n?._langsmithTracer?.exampleId}:void 0},a=null==e?"/runs/wait":`/threads/${e}/runs/wait`,[i,s]=await this.fetch(a,{method:"POST",json:r,timeoutMs:null,signal:n?.signal,withResponse:!0}),o=at(s);if(o&&n?.onRunCreated?.(o),(n?.raiseError===void 0||n.raiseError)&&"__error__"in i&&"object"==typeof i.__error__&&i.__error__&&"error"in i.__error__&&"message"in i.__error__)throw Error(`${i.__error__?.error}: ${i.__error__?.message}`);return i}async list(e,t){return this.fetch(`/threads/${e}/runs`,{params:{limit:t?.limit??10,offset:t?.offset??0,status:t?.status??void 0,select:t?.select??void 0},signal:t?.signal})}async get(e,t,n){return this.fetch(`/threads/${e}/runs/${t}`,{signal:n?.signal})}async cancel(e,t,n=!1,r="interrupt",a={}){return this.fetch(`/threads/${e}/runs/${t}/cancel`,{method:"POST",params:{wait:n?"1":"0",action:r},signal:a?.signal})}async cancelMany(e){return this.fetch("/runs/cancel",{method:"POST",json:{thread_id:e.threadId,run_ids:e.runIds,status:e.status},params:{action:e.action},signal:e.signal})}async join(e,t,n){return this.fetch(`/threads/${e}/runs/${t}/join`,{timeoutMs:null,params:{cancel_on_disconnect:n?.cancelOnDisconnect?"1":"0"},signal:n?.signal})}async *joinStream(e,t,n){let r="object"==typeof n&&null!=n&&n instanceof AbortSignal?{signal:n}:n;yield*this.streamWithRetry({endpoint:null!=e?`/threads/${e}/runs/${t}/stream`:`/runs/${t}/stream`,method:"GET",signal:r?.signal,idleReconnect:r?.streamIdleReconnect,headers:r?.lastEventId?{"Last-Event-ID":r.lastEventId}:void 0,params:{cancel_on_disconnect:r?.cancelOnDisconnect?"1":"0",stream_mode:r?.streamMode}})}async delete(e,t,n){return this.fetch(`/threads/${e}/runs/${t}`,{method:"DELETE",signal:n?.signal})}},aX=class extends r7{async createForThread(e,t,n){let r={schedule:n?.schedule,input:n?.input,config:n?.config,context:n?.context,metadata:n?.metadata,assistant_id:t,interrupt_before:n?.interruptBefore,interrupt_after:n?.interruptAfter,webhook:n?.webhook,multitask_strategy:n?.multitaskStrategy,checkpoint_during:n?.checkpointDuring,durability:n?.durability,enabled:n?.enabled,timezone:n?.timezone,stream_mode:n?.streamMode,stream_subgraphs:n?.streamSubgraphs,stream_resumable:n?.streamResumable,end_time:n?.endTime,on_run_completed:n?.onRunCompleted};return this.fetch(`/threads/${e}/runs/crons`,{method:"POST",json:r,signal:n?.signal})}async create(e,t){let n={schedule:t?.schedule,input:t?.input,config:t?.config,context:t?.context,metadata:t?.metadata,assistant_id:e,interrupt_before:t?.interruptBefore,interrupt_after:t?.interruptAfter,webhook:t?.webhook,on_run_completed:t?.onRunCompleted,multitask_strategy:t?.multitaskStrategy,checkpoint_during:t?.checkpointDuring,durability:t?.durability,enabled:t?.enabled,timezone:t?.timezone,stream_mode:t?.streamMode,stream_subgraphs:t?.streamSubgraphs,stream_resumable:t?.streamResumable,end_time:t?.endTime};return this.fetch("/runs/crons",{method:"POST",json:n,signal:t?.signal})}async update(e,t){let n={};return t?.schedule!==void 0&&(n.schedule=t.schedule),t?.timezone!==void 0&&(n.timezone=t.timezone),t?.endTime!==void 0&&(n.end_time=t.endTime),t?.input!==void 0&&(n.input=t.input),t?.metadata!==void 0&&(n.metadata=t.metadata),t?.config!==void 0&&(n.config=t.config),t?.context!==void 0&&(n.context=t.context),t?.webhook!==void 0&&(n.webhook=t.webhook),t?.interruptBefore!==void 0&&(n.interrupt_before=t.interruptBefore),t?.interruptAfter!==void 0&&(n.interrupt_after=t.interruptAfter),t?.onRunCompleted!==void 0&&(n.on_run_completed=t.onRunCompleted),t?.enabled!==void 0&&(n.enabled=t.enabled),t?.streamMode!==void 0&&(n.stream_mode=t.streamMode),t?.streamSubgraphs!==void 0&&(n.stream_subgraphs=t.streamSubgraphs),t?.streamResumable!==void 0&&(n.stream_resumable=t.streamResumable),t?.durability!==void 0&&(n.durability=t.durability),this.fetch(`/runs/crons/${e}`,{method:"PATCH",json:n,signal:t?.signal})}async delete(e,t){await this.fetch(`/runs/crons/${e}`,{method:"DELETE",signal:t?.signal})}async search(e){return this.fetch("/runs/crons/search",{method:"POST",json:{assistant_id:e?.assistantId??void 0,thread_id:e?.threadId??void 0,enabled:e?.enabled??void 0,limit:e?.limit??10,offset:e?.offset??0,sort_by:e?.sortBy??void 0,sort_order:e?.sortOrder??void 0,select:e?.select??void 0,metadata:e?.metadata??void 0},signal:e?.signal})}async count(e){return this.fetch("/runs/crons/count",{method:"POST",json:{assistant_id:e?.assistantId??void 0,thread_id:e?.threadId??void 0,metadata:e?.metadata??void 0},signal:e?.signal})}},aZ=class extends r7{async putItem(e,t,n,r){e.forEach(e=>{if(e.includes("."))throw Error(`Invalid namespace label '${e}'. Namespace labels cannot contain periods ('.')`)});let a={namespace:e,key:t,value:n,index:r?.index,ttl:r?.ttl};return this.fetch("/store/items",{method:"PUT",json:a,signal:r?.signal})}async getItem(e,t,n){e.forEach(e=>{if(e.includes("."))throw Error(`Invalid namespace label '${e}'. Namespace labels cannot contain periods ('.')`)});let r={namespace:e.join("."),key:t};n?.refreshTtl!==void 0&&(r.refresh_ttl=n.refreshTtl);let a=await this.fetch("/store/items",{params:r,signal:n?.signal});return a?{...a,createdAt:a.created_at,updatedAt:a.updated_at}:null}async deleteItem(e,t,n){return e.forEach(e=>{if(e.includes("."))throw Error(`Invalid namespace label '${e}'. Namespace labels cannot contain periods ('.')`)}),this.fetch("/store/items",{method:"DELETE",json:{namespace:e,key:t},signal:n?.signal})}async searchItems(e,t){let n={namespace_prefix:e,filter:t?.filter,limit:t?.limit??10,offset:t?.offset??0,query:t?.query,refresh_ttl:t?.refreshTtl};return{items:(await this.fetch("/store/items/search",{method:"POST",json:n,signal:t?.signal})).items.map(e=>({...e,createdAt:e.created_at,updatedAt:e.updated_at}))}}async listNamespaces(e){let t={prefix:e?.prefix,suffix:e?.suffix,max_depth:e?.maxDepth,limit:e?.limit??100,offset:e?.offset??0};return this.fetch("/store/namespaces",{method:"POST",json:t,signal:e?.signal})}},aQ=class e extends r7{static promiseCache={};static getOrCached(t,n){if(null!=e.promiseCache[t])return e.promiseCache[t];let r=n();return e.promiseCache[t]=r,r}async getComponent(t,n){return e.getOrCached(`${this.apiUrl}-${t}-${n}`,async()=>{let[e,r]=this.prepareFetchOptions(`/ui/${t}`,{headers:{Accept:"text/html","Content-Type":"application/json"},method:"POST",json:{name:n}});return null!=this.onRequest&&(r=await this.onRequest(e,r)),(await this.asyncCaller.fetch(e.toString(),r)).text()})}},aJ=class{assistants;threads;runs;crons;store;"~ui";"~configHash";constructor(e){this["~configHash"]=JSON.stringify({apiUrl:e?.apiUrl,apiKey:e?.apiKey,timeoutMs:e?.timeoutMs,defaultHeaders:e?.defaultHeaders,streamProtocol:e?.streamProtocol,maxConcurrency:e?.callerOptions?.maxConcurrency,maxRetries:e?.callerOptions?.maxRetries,callbacks:{onFailedResponseHook:e?.callerOptions?.onFailedResponseHook!=null,onRequest:e?.onRequest!=null,fetch:e?.callerOptions?.fetch!=null}}),this.assistants=new aW(e),this.threads=new aY(e),this.runs=new aK(e),this.crons=new aX(e),this.store=new aZ(e),this["~ui"]=new aQ(e)}},a0=class{#tn;#tr=new Set;constructor(e){this.#tn=e}subscribe=e=>(this.#tr.add(e),()=>{this.#tr.delete(e)});getSnapshot=()=>this.#tn;setValue=e=>{if(!Object.is(e,this.#tn))for(let t of(this.#tn=e,this.#tr))t()};setState=e=>{this.setValue(e(this.#tn))}};function a1(e,t,n){return Array.isArray(e)?e.map(e=>(function(e,t,n){if(null===e||"object"!=typeof e||Array.isArray(e))return e;let r=e[t]??e[n],a={...e};return void 0!==r&&(a[t]=r,a[n]=r),a})(e,t,n)):e}function a2(e){return e.map(e=>{var t;return void 0===(t=e).value?t:{...t,value:function e(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>e(t));if(!("action_requests"in t||"actionRequests"in t||"review_configs"in t||"reviewConfigs"in t))return t;let n={...t},r=t.actionRequests??t.action_requests;if(void 0!==r){let e=a1(r,"name","action_name");n.actionRequests=e,n.action_requests=e}let a=t.reviewConfigs??t.review_configs;if(void 0!==a){let e=a1(a,"allowedDecisions","allowed_decisions");n.reviewConfigs=e,n.review_configs=e}return n}(t.value)}})}function a3(e){if(0===e.length)return[{when:"breakpoint"}];let t=al(e);return 0===t.length?[]:a2(t)}Object.freeze([]);var a4=class extends Error{constructor(e){super(e.message),this.name=e.name??e.error??"StreamError"}static isStructuredError(e){return"object"==typeof e&&null!=e&&"message"in e}};let a5=new Set(["values","messages","messages-tuple","updates","events","debug","tasks","checkpoints","custom"]),a6=new Set;function a9(e){for(let t of e)a6.has(t)||(a6.add(t),console.warn(`[stream-mode] dropped unsupported mode "${t}" — backend does not accept it. See src/lib/streamMode.ts for the current allowlist.`))}function a8(e){return!(!e||"object"!=typeof e||e instanceof AbortSignal)&&"streamMode"in e?{...e,streamMode:function(e){if(Array.isArray(e)){let t=[],n=[];for(let r of e)"string"==typeof r&&a5.has(r)?t.push(r):"string"==typeof r&&n.push(r);return n.length>0&&a9(n),t}return"string"!=typeof e||a5.has(e)?e:void a9([e])}(e.streamMode)}:e}let a7=Symbol.for("evoscientist.streamModePatched");function ie(e){let t=e.runs;if(t[a7])return e;t[a7]=!0;let n=e.runs.stream.bind(e.runs),r=e.runs.joinStream.bind(e.runs);return e.runs.stream=(e,t,r)=>n(e,t,a8(r)),e.runs.joinStream=(e,t,n)=>r(e,t,a8(n)),e}let it=(0,eu.createContext)(null);function ir({children:e,deploymentUrl:t,apiKey:n}){let r=(0,eu.useMemo)(()=>ie(new aJ({apiUrl:t,defaultHeaders:{"Content-Type":"application/json","X-Api-Key":n}})),[t,n]),a=(0,eu.useMemo)(()=>({client:r,deploymentUrl:t,apiKey:n}),[r,t,n]);return(0,ec.jsx)(it.Provider,{value:a,children:e})}function ia(){let e=(0,eu.useContext)(it);if(!e)throw Error("useClient must be used within a ClientProvider");return e.client}let ii=ny("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),is=ny("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]),io=ny("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]),il=ny("panel-left-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]),ic=ny("panel-right",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]]),iu=ny("panel-right-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]]),id=ny("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]),ip=(0,eu.createContext)(null);ip.displayName="PanelGroupContext";let im="data-panel-group-direction",ih="data-panel-group-id",ig="data-resize-handle",ib="data-panel-resize-handle-id",iy=eu.useLayoutEffect,iE=eu["useId".toString()],ix="function"==typeof iE?iE:()=>null,iv=0;function iT(e=null){let t=ix(),n=(0,eu.useRef)(e||t||null);return null===n.current&&(n.current=""+iv++),null!=e?e:n.current}function iS({children:e,className:t="",collapsedSize:n,collapsible:r,defaultSize:a,forwardedRef:i,id:s,maxSize:o,minSize:l,onCollapse:c,onExpand:u,onResize:d,order:p,style:m,tagName:f="div",...h}){let g=(0,eu.useContext)(ip);if(null===g)throw Error("Panel components must be rendered within a PanelGroup container");let{collapsePanel:b,expandPanel:y,getPanelSize:E,getPanelStyle:x,groupId:v,isPanelCollapsed:T,reevaluatePanelConstraints:S,registerPanel:_,resizePanel:k,unregisterPanel:w}=g,A=iT(s),N=(0,eu.useRef)({callbacks:{onCollapse:c,onExpand:u,onResize:d},constraints:{collapsedSize:n,collapsible:r,defaultSize:a,maxSize:o,minSize:l},id:A,idIsFromProps:void 0!==s,order:p});(0,eu.useRef)({didLogMissingDefaultSizeWarning:!1}),iy(()=>{let{callbacks:e,constraints:t}=N.current,i={...t};N.current.id=A,N.current.idIsFromProps=void 0!==s,N.current.order=p,e.onCollapse=c,e.onExpand=u,e.onResize=d,t.collapsedSize=n,t.collapsible=r,t.defaultSize=a,t.maxSize=o,t.minSize=l,(i.collapsedSize!==t.collapsedSize||i.collapsible!==t.collapsible||i.maxSize!==t.maxSize||i.minSize!==t.minSize)&&S(N.current,i)}),iy(()=>{let e=N.current;return _(e),()=>{w(e)}},[p,A,_,w]),(0,eu.useImperativeHandle)(i,()=>({collapse:()=>{b(N.current)},expand:e=>{y(N.current,e)},getId:()=>A,getSize:()=>E(N.current),isCollapsed:()=>T(N.current),isExpanded:()=>!T(N.current),resize:e=>{k(N.current,e)}}),[b,y,E,T,A,k]);let I=x(N.current,a);return(0,eu.createElement)(f,{...h,children:e,className:t,id:A,style:{...I,...m},[ih]:v,"data-panel":"","data-panel-collapsible":r||void 0,"data-panel-id":A,"data-panel-size":parseFloat(""+I.flexGrow).toFixed(1)})}let i_=(0,eu.forwardRef)((e,t)=>(0,eu.createElement)(iS,{...e,forwardedRef:t}));iS.displayName="Panel",i_.displayName="forwardRef(Panel)";let ik=null,iw=-1,iA=null;function iN(e,n,r){var a,i,s;let o=function(e,t){let n=(t&iF)!=0,r=(t&iU)!=0,a=(t&iB)!=0,i=(t&iz)!=0;if(t){if(n)if(a)return"se-resize";else if(i)return"ne-resize";else return"e-resize";else if(r)if(a)return"sw-resize";else if(i)return"nw-resize";else return"w-resize";else if(a)return"s-resize";else if(i)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}(e,n);ik!==o&&(ik=o,null===iA&&(iA=document.createElement("style"),t&&iA.setAttribute("nonce",t),document.head.appendChild(iA)),iw>=0&&(null==(s=iA.sheet)||s.removeRule(iw)),iw=null!=(a=null==(i=iA.sheet)?void 0:i.insertRule(`*{cursor: ${o} !important;}`))?a:-1)}function iI(e){return"keydown"===e.type}function iC(e){return e.type.startsWith("pointer")}function iR(e){return e.type.startsWith("mouse")}function iO(e){if(iC(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(iR(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}let iD=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function iL(e){let t=e.length;for(;t--;){let n=e[t];if(i2(n,"Missing node"),function(e){var t;let n,r=getComputedStyle(e);return"fixed"===r.position||!!("auto"!==r.zIndex&&("static"!==r.position||"flex"===(n=getComputedStyle(null!=(t=ij(e))?t:e).display)||"inline-flex"===n)||1>+r.opacity||"transform"in r&&"none"!==r.transform||"webkitTransform"in r&&"none"!==r.webkitTransform||"mixBlendMode"in r&&"normal"!==r.mixBlendMode||"filter"in r&&"none"!==r.filter||"webkitFilter"in r&&"none"!==r.webkitFilter||"isolation"in r&&"isolate"===r.isolation||iD.test(r.willChange))||"touch"===r.webkitOverflowScrolling}(n))return n}return null}function iM(e){return e&&Number(getComputedStyle(e).zIndex)||0}function iP(e){let t=[];for(;e;)t.push(e),e=ij(e);return t}function ij(e){let{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}let iF=1,iU=2,iB=4,iz=8,iH="coarse"===function(){if("function"==typeof matchMedia)return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}(),i$=[],iG=!1,iq=new Map,iW=new Map,iV=new Set;function iY(e){let{target:t}=e,{x:n,y:r}=iO(e);iG=!0,iQ({target:t,x:n,y:r}),i0(),i$.length>0&&(i1("down",e),iJ(),e.preventDefault(),iZ(t)||e.stopImmediatePropagation())}function iK(e){let{x:t,y:n}=iO(e);if(iG&&"pointerleave"!==e.type&&0===e.buttons&&(iG=!1,i1("up",e)),!iG){let{target:r}=e;iQ({target:r,x:t,y:n})}i1("move",e),iJ(),i$.length>0&&e.preventDefault()}function iX(e){let{target:t}=e,{x:n,y:r}=iO(e);iW.clear(),iG=!1,i$.length>0&&(e.preventDefault(),iZ(t)||e.stopImmediatePropagation()),i1("up",e),iQ({target:t,x:n,y:r}),iJ(),i0()}function iZ(e){let t=e;for(;t;){if(t.hasAttribute(ig))return!0;t=t.parentElement}return!1}function iQ({target:e,x:t,y:n}){i$.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),iV.forEach(e=>{let{element:a,hitAreaMargins:i}=e,s=a.getBoundingClientRect(),{bottom:o,left:l,right:c,top:u}=s,d=iH?i.coarse:i.fine;if(t>=l-d&&t<=c+d&&n>=u-d&&n<=o+d){if(null!==r&&document.contains(r)&&a!==r&&!a.contains(r)&&!r.contains(a)&&function(e,t){let n;if(e===t)throw Error("Cannot compare node with itself");let r={a:iP(e),b:iP(t)};for(;r.a.at(-1)===r.b.at(-1);)e=r.a.pop(),t=r.b.pop(),n=e;i2(n,"Stacking order can only be calculated for elements with a common ancestor");let a={a:iM(iL(r.a)),b:iM(iL(r.b))};if(a.a===a.b){let e=n.childNodes,t={a:r.a.at(-1),b:r.b.at(-1)},a=e.length;for(;a--;){let n=e[a];if(n===t.a)return 1;if(n===t.b)return -1}}return Math.sign(a.a-a.b)}(r,a)>0){let e=r,t=!1;for(;e;){var p;if(e.contains(a))break;if(p=e.getBoundingClientRect(),p.x<s.x+s.width&&p.x+p.width>s.x&&p.y<s.y+s.height&&p.y+p.height>s.y){t=!0;break}e=e.parentElement}if(t)return}i$.push(e)}})}function iJ(){let e=!1,t=!1;i$.forEach(n=>{let{direction:r}=n;"horizontal"===r?e=!0:t=!0});let n=0;iW.forEach(e=>{n|=e}),e&&t?iN("intersection",n,iG):e?iN("horizontal",n,iG):t?iN("vertical",n,iG):null!==iA&&(document.head.removeChild(iA),ik=null,iA=null,iw=-1)}function i0(){var e;null==(e=n)||e.abort();let t={capture:!0,signal:(n=new AbortController).signal};iV.size&&(iG?(i$.length>0&&iq.forEach((e,n)=>{let{body:r}=n;e>0&&(r.addEventListener("contextmenu",iX,t),r.addEventListener("pointerleave",iK,t),r.addEventListener("pointermove",iK,t))}),iq.forEach((e,n)=>{let{body:r}=n;r.addEventListener("pointerup",iX,t),r.addEventListener("pointercancel",iX,t)})):iq.forEach((e,n)=>{let{body:r}=n;e>0&&(r.addEventListener("pointerdown",iY,t),r.addEventListener("pointermove",iK,t))}))}function i1(e,t){iV.forEach(n=>{let{setResizeHandlerState:r}=n;r(e,i$.includes(n),t)})}function i2(e,t){if(!e)throw console.error(t),Error(t)}function i3(e,t,n=10){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function i4(e,t,n=10){return 0===i3(e,t,n)}function i5(e,t,n){return 0===i3(e,t,n)}function i6({panelConstraints:e,panelIndex:t,size:n}){let r=e[t];i2(null!=r,`Panel constraints not found for index ${t}`);let{collapsedSize:a=0,collapsible:i,maxSize:s=100,minSize:o=0}=r;return 0>i3(n,o)&&(n=i&&0>i3(n,(a+o)/2)?a:o),n=parseFloat((n=Math.min(s,n)).toFixed(10))}function i9({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:a,trigger:i}){if(i5(e,0))return t;let s=[...t],[o,l]=r;i2(null!=o,"Invalid first pivot index"),i2(null!=l,"Invalid second pivot index");let c=0;if("keyboard"===i){{let r=e<0?l:o,a=n[r];i2(a,`Panel constraints not found for index ${r}`);let{collapsedSize:i=0,collapsible:s,minSize:c=0}=a;if(s){let n=t[r];if(i2(null!=n,`Previous layout not found for panel index ${r}`),i5(n,i)){let t=c-n;i3(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let r=e<0?o:l,a=n[r];i2(a,`No panel constraints found for index ${r}`);let{collapsedSize:i=0,collapsible:s,minSize:c=0}=a;if(s){let n=t[r];if(i2(null!=n,`Previous layout not found for panel index ${r}`),i5(n,c)){let t=n-i;i3(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}}{let r=e<0?1:-1,a=e<0?l:o,i=0;for(;;){let e=t[a];if(i2(null!=e,`Previous layout not found for panel index ${a}`),i+=i6({panelConstraints:n,panelIndex:a,size:100})-e,(a+=r)<0||a>=n.length)break}let s=Math.min(Math.abs(e),Math.abs(i));e=e<0?0-s:s}{let r=e<0?o:l;for(;r>=0&&r<n.length;){let a=Math.abs(e)-Math.abs(c),i=t[r];i2(null!=i,`Previous layout not found for panel index ${r}`);let o=i6({panelConstraints:n,panelIndex:r,size:i-a});if(!i5(i,o)&&(c+=i-o,s[r]=o,c.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?r--:r++}}if(function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!i5(e[n],t[n],void 0))return!1;return!0}(a,s))return a;{let r=e<0?l:o,a=t[r];i2(null!=a,`Previous layout not found for panel index ${r}`);let i=a+c,u=i6({panelConstraints:n,panelIndex:r,size:i});if(s[r]=u,!i5(u,i)){let t=i-u,r=e<0?l:o;for(;r>=0&&r<n.length;){let a=s[r];i2(null!=a,`Previous layout not found for panel index ${r}`);let i=i6({panelConstraints:n,panelIndex:r,size:a+t});if(i5(a,i)||(t-=i-a,s[r]=i),i5(t,0))break;e>0?r--:r++}}}return i5(s.reduce((e,t)=>t+e,0),100)?s:a}function i8(e,t=document){return Array.from(t.querySelectorAll(`[${ib}][data-panel-group-id="${e}"]`))}function i7(e,t,n=document){let r=i8(e,n).findIndex(e=>e.getAttribute(ib)===t);return null!=r?r:null}function se(e,t,n){let r=i7(e,t,n);return null!=r?[r,r+1]:[-1,-1]}function st(e,t=document){if((t instanceof HTMLElement||"object"==typeof t&&null!==t&&"tagName"in t&&"getAttribute"in t)&&t.dataset.panelGroupId==e)return t;let n=t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return n||null}function sn(e,t=document){let n=t.querySelector(`[${ib}="${e}"]`);return n||null}function sr(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function sa(e,t){let{x:n,y:r}=iO(t);return"horizontal"===e?n:r}function si(e,t,n){t.forEach((t,r)=>{let a=e[r];i2(a,`Panel data not found for index ${r}`);let{callbacks:i,constraints:s,id:o}=a,{collapsedSize:l=0,collapsible:c}=s,u=n[o];if(null==u||t!==u){n[o]=t;let{onCollapse:e,onExpand:r,onResize:a}=i;a&&a(t,u),c&&(e||r)&&(r&&(null==u||i4(u,l))&&!i4(t,l)&&r(),e&&(null==u||!i4(u,l))&&i4(t,l)&&e())}})}function ss(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function so(e){try{if("u">typeof localStorage)e.getItem=e=>localStorage.getItem(e),e.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw Error("localStorage not supported in this environment")}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function sl(e){return`react-resizable-panels:${e}`}function sc(e){return e.map(e=>{let{constraints:t,id:n,idIsFromProps:r,order:a}=e;return r?n:a?`${a}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function su(e,t){try{let n=sl(e),r=t.getItem(n);if(r){let e=JSON.parse(r);if("object"==typeof e&&null!=e)return e}}catch(e){}return null}function sd(e,t,n,r,a){var i;let s=sl(e),o=sc(t),l=null!=(i=su(e,a))?i:{};l[o]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{a.setItem(s,JSON.stringify(l))}catch(e){console.error(e)}}function sp({layout:e,panelConstraints:t}){let n=[...e],r=n.reduce((e,t)=>e+t,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(e=>`${e}%`).join(", ")}`);if(!i5(r,100)&&n.length>0)for(let e=0;e<t.length;e++){let t=n[e];i2(null!=t,`No layout data found for index ${e}`);let a=100/r*t;n[e]=a}let a=0;for(let e=0;e<t.length;e++){let r=n[e];i2(null!=r,`No layout data found for index ${e}`);let i=i6({panelConstraints:t,panelIndex:e,size:r});r!=i&&(a+=r-i,n[e]=i)}if(!i5(a,0))for(let e=0;e<t.length;e++){let r=n[e];i2(null!=r,`No layout data found for index ${e}`);let i=i6({panelConstraints:t,panelIndex:e,size:r+a});if(r!==i&&(a-=i-r,n[e]=i,i5(a,0)))break}return n}let sm={getItem:e=>(so(sm),sm.getItem(e)),setItem:(e,t)=>{so(sm),sm.setItem(e,t)}},sf={};function sh({autoSaveId:e=null,children:t,className:n="",direction:r,forwardedRef:a,id:i=null,onLayout:s=null,keyboardResizeBy:o=null,storage:l=sm,style:c,tagName:u="div",...d}){let p=iT(i),m=(0,eu.useRef)(null),[f,h]=(0,eu.useState)(null),[g,b]=(0,eu.useState)([]),y=function(){let[e,t]=(0,eu.useState)(0);return(0,eu.useCallback)(()=>t(e=>e+1),[])}(),E=(0,eu.useRef)({}),x=(0,eu.useRef)(new Map),v=(0,eu.useRef)(0),T=(0,eu.useRef)({autoSaveId:e,direction:r,dragState:f,id:p,keyboardResizeBy:o,onLayout:s,storage:l}),S=(0,eu.useRef)({layout:g,panelDataArray:[],panelDataArrayChanged:!1});(0,eu.useRef)({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),(0,eu.useImperativeHandle)(a,()=>({getId:()=>T.current.id,getLayout:()=>{let{layout:e}=S.current;return e},setLayout:e=>{let{onLayout:t}=T.current,{layout:n,panelDataArray:r}=S.current,a=sp({layout:e,panelConstraints:r.map(e=>e.constraints)});sr(n,a)||(b(a),S.current.layout=a,t&&t(a),si(r,a,E.current))}}),[]),iy(()=>{T.current.autoSaveId=e,T.current.direction=r,T.current.dragState=f,T.current.id=p,T.current.onLayout=s,T.current.storage=l}),function({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:r,panelDataArray:a,panelGroupElement:i,setLayout:s}){(0,eu.useRef)({didWarnAboutMissingResizeHandle:!1}),iy(()=>{if(!i)return;let e=i8(n,i);for(let t=0;t<a.length-1;t++){let{valueMax:n,valueMin:i,valueNow:s}=function({layout:e,panelsArray:t,pivotIndices:n}){let r=0,a=100,i=0,s=0,o=n[0];return i2(null!=o,"No pivot index found"),t.forEach((e,t)=>{let{constraints:n}=e,{maxSize:l=100,minSize:c=0}=n;t===o?(r=c,a=l):(i+=c,s+=l)}),{valueMax:Math.min(a,100-i),valueMin:Math.max(r,100-s),valueNow:e[o]}}({layout:r,panelsArray:a,pivotIndices:[t,t+1]}),o=e[t];if(null==o);else{let e=a[t];i2(e,`No panel data found for index "${t}"`),o.setAttribute("aria-controls",e.id),o.setAttribute("aria-valuemax",""+Math.round(n)),o.setAttribute("aria-valuemin",""+Math.round(i)),o.setAttribute("aria-valuenow",null!=s?""+Math.round(s):"")}}return()=>{e.forEach((e,t)=>{e.removeAttribute("aria-controls"),e.removeAttribute("aria-valuemax"),e.removeAttribute("aria-valuemin"),e.removeAttribute("aria-valuenow")})}},[n,r,a,i]),(0,eu.useEffect)(()=>{if(!i)return;let e=t.current;i2(e,"Eager values not found");let{panelDataArray:a}=e;i2(null!=st(n,i),`No group found for id "${n}"`);let o=i8(n,i);i2(o,`No resize handles found for group id "${n}"`);let l=o.map(e=>{let t=e.getAttribute(ib);i2(t,"Resize handle element has no handle id attribute");let[o,l]=function(e,t,n,r=document){var a,i,s,o;let l=sn(t,r),c=i8(e,r),u=l?c.indexOf(l):-1;return[null!=(a=null==(i=n[u])?void 0:i.id)?a:null,null!=(s=null==(o=n[u+1])?void 0:o.id)?s:null]}(n,t,a,i);if(null==o||null==l)return()=>{};let c=e=>{if(!e.defaultPrevented&&"Enter"===e.key){e.preventDefault();let l=a.findIndex(e=>e.id===o);if(l>=0){let e=a[l];i2(e,`No panel data found for index ${l}`);let o=r[l],{collapsedSize:c=0,collapsible:u,minSize:d=0}=e.constraints;if(null!=o&&u){let e=i9({delta:i5(o,c)?d-c:c-o,initialLayout:r,panelConstraints:a.map(e=>e.constraints),pivotIndices:se(n,t,i),prevLayout:r,trigger:"keyboard"});r!==e&&s(e)}}}};return e.addEventListener("keydown",c),()=>{e.removeEventListener("keydown",c)}});return()=>{l.forEach(e=>e())}},[i,e,t,n,r,a,s])}({committedValuesRef:T,eagerValuesRef:S,groupId:p,layout:g,panelDataArray:S.current.panelDataArray,setLayout:b,panelGroupElement:m.current}),(0,eu.useEffect)(()=>{let{panelDataArray:t}=S.current;if(e){if(0===g.length||g.length!==t.length)return;let n=sf[e];null==n&&(n=function(e,t=10){let n=null;return(...r)=>{null!==n&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}(sd,100),sf[e]=n),n(e,[...t],new Map(x.current),g,l)}},[e,g,l]),(0,eu.useEffect)(()=>{});let _=(0,eu.useCallback)(e=>{let{onLayout:t}=T.current,{layout:n,panelDataArray:r}=S.current;if(e.constraints.collapsible){let a=r.map(e=>e.constraints),{collapsedSize:i=0,panelSize:s,pivotIndices:o}=sy(r,e,n);if(i2(null!=s,`Panel size not found for panel "${e.id}"`),!i4(s,i)){x.current.set(e.id,s);let l=i9({delta:sb(r,e)===r.length-1?s-i:i-s,initialLayout:n,panelConstraints:a,pivotIndices:o,prevLayout:n,trigger:"imperative-api"});ss(n,l)||(b(l),S.current.layout=l,t&&t(l),si(r,l,E.current))}}},[]),k=(0,eu.useCallback)((e,t)=>{let{onLayout:n}=T.current,{layout:r,panelDataArray:a}=S.current;if(e.constraints.collapsible){let i=a.map(e=>e.constraints),{collapsedSize:s=0,panelSize:o=0,minSize:l=0,pivotIndices:c}=sy(a,e,r),u=null!=t?t:l;if(i4(o,s)){let t=x.current.get(e.id),s=null!=t&&t>=u?t:u,l=i9({delta:sb(a,e)===a.length-1?o-s:s-o,initialLayout:r,panelConstraints:i,pivotIndices:c,prevLayout:r,trigger:"imperative-api"});ss(r,l)||(b(l),S.current.layout=l,n&&n(l),si(a,l,E.current))}}},[]),w=(0,eu.useCallback)(e=>{let{layout:t,panelDataArray:n}=S.current,{panelSize:r}=sy(n,e,t);return i2(null!=r,`Panel size not found for panel "${e.id}"`),r},[]),A=(0,eu.useCallback)((e,t)=>{let{panelDataArray:n}=S.current,r=sb(n,e);return function({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:a,precision:i=3}){let s=n[a];return{flexBasis:0,flexGrow:null==s?void 0!=e?e.toFixed(i):"1":1===r.length?"1":s.toFixed(i),flexShrink:1,overflow:"hidden",pointerEvents:null!==t?"none":void 0}}({defaultSize:t,dragState:f,layout:g,panelData:n,panelIndex:r})},[f,g]),N=(0,eu.useCallback)(e=>{let{layout:t,panelDataArray:n}=S.current,{collapsedSize:r=0,collapsible:a,panelSize:i}=sy(n,e,t);return i2(null!=i,`Panel size not found for panel "${e.id}"`),!0===a&&i4(i,r)},[]),I=(0,eu.useCallback)(e=>{let{layout:t,panelDataArray:n}=S.current,{collapsedSize:r=0,collapsible:a,panelSize:i}=sy(n,e,t);return i2(null!=i,`Panel size not found for panel "${e.id}"`),!a||i3(i,r)>0},[]),C=(0,eu.useCallback)(e=>{let{panelDataArray:t}=S.current;t.push(e),t.sort((e,t)=>{let n=e.order,r=t.order;return null==n&&null==r?0:null==n?-1:null==r?1:n-r}),S.current.panelDataArrayChanged=!0,y()},[y]);iy(()=>{if(S.current.panelDataArrayChanged){S.current.panelDataArrayChanged=!1;let{autoSaveId:n,onLayout:r,storage:a}=T.current,{layout:i,panelDataArray:s}=S.current,o=null;if(n){var e,t;let r=null!=(t=(null!=(e=su(n,a))?e:{})[sc(s)])?t:null;r&&(x.current=new Map(Object.entries(r.expandToSizes)),o=r.layout)}null==o&&(o=function({panelDataArray:e}){let t=Array(e.length),n=e.map(e=>e.constraints),r=0,a=100;for(let i=0;i<e.length;i++){let e=n[i];i2(e,`Panel constraints not found for index ${i}`);let{defaultSize:s}=e;null!=s&&(r++,t[i]=s,a-=s)}for(let i=0;i<e.length;i++){let s=n[i];i2(s,`Panel constraints not found for index ${i}`);let{defaultSize:o}=s;if(null!=o)continue;let l=a/(e.length-r);r++,t[i]=l,a-=l}return t}({panelDataArray:s}));let l=sp({layout:o,panelConstraints:s.map(e=>e.constraints)});sr(i,l)||(b(l),S.current.layout=l,r&&r(l),si(s,l,E.current))}}),iy(()=>{let e=S.current;return()=>{e.layout=[]}},[]);let R=(0,eu.useCallback)(e=>{let t=!1,n=m.current;return n&&"rtl"===window.getComputedStyle(n,null).getPropertyValue("direction")&&(t=!0),function(n){var r,a;n.preventDefault();let i=m.current;if(!i)return()=>null;let{direction:s,dragState:o,id:l,keyboardResizeBy:c,onLayout:u}=T.current,{layout:d,panelDataArray:p}=S.current,{initialLayout:f}=null!=o?o:{},h=se(l,e,i),g=function(e,t,n,r,a,i){if(iI(e)){let t="horizontal"===n,r=0;r=e.shiftKey?100:null!=a?a:10;let i=0;switch(e.key){case"ArrowDown":i=t?0:r;break;case"ArrowLeft":i=t?-r:0;break;case"ArrowRight":i=t?r:0;break;case"ArrowUp":i=t?0:-r;break;case"End":i=100;break;case"Home":i=-100}return i}return null==r?0:function(e,t,n,r,a){let i="horizontal"===n,s=sn(t,a);i2(s,`No resize handle element found for id "${t}"`);let o=s.getAttribute(ih);i2(o,"Resize handle element has no group id attribute");let{initialCursorPosition:l}=r,c=sa(n,e),u=st(o,a);i2(u,`No group element found for id "${o}"`);let d=u.getBoundingClientRect();return(c-l)/(i?d.width:d.height)*100}(e,t,n,r,i)}(n,e,s,o,c,i),y="horizontal"===s;y&&t&&(g=-g);let x=i9({delta:g,initialLayout:null!=f?f:d,panelConstraints:p.map(e=>e.constraints),pivotIndices:h,prevLayout:d,trigger:iI(n)?"keyboard":"mouse-or-touch"}),_=!ss(d,x);(iC(n)||iR(n))&&v.current!=g&&((v.current=g,_||0===g)?iW.set(e,0):y?(r=g<0?iF:iU,iW.set(e,r)):(a=g<0?iB:iz,iW.set(e,a))),_&&(b(x),S.current.layout=x,u&&u(x),si(p,x,E.current))}},[]),O=(0,eu.useCallback)((e,t)=>{let{onLayout:n}=T.current,{layout:r,panelDataArray:a}=S.current,i=a.map(e=>e.constraints),{panelSize:s,pivotIndices:o}=sy(a,e,r);i2(null!=s,`Panel size not found for panel "${e.id}"`);let l=i9({delta:sb(a,e)===a.length-1?s-t:t-s,initialLayout:r,panelConstraints:i,pivotIndices:o,prevLayout:r,trigger:"imperative-api"});ss(r,l)||(b(l),S.current.layout=l,n&&n(l),si(a,l,E.current))},[]),D=(0,eu.useCallback)((e,t)=>{let{layout:n,panelDataArray:r}=S.current,{collapsedSize:a=0,collapsible:i}=t,{collapsedSize:s=0,collapsible:o,maxSize:l=100,minSize:c=0}=e.constraints,{panelSize:u}=sy(r,e,n);null!=u&&(i&&o&&i4(u,a)?i4(a,s)||O(e,s):u<c?O(e,c):u>l&&O(e,l))},[O]),L=(0,eu.useCallback)((e,t)=>{let{direction:n}=T.current,{layout:r}=S.current;if(!m.current)return;let a=sn(e,m.current);i2(a,`Drag handle element not found for id "${e}"`);let i=sa(n,t);h({dragHandleId:e,dragHandleRect:a.getBoundingClientRect(),initialCursorPosition:i,initialLayout:r})},[]),M=(0,eu.useCallback)(()=>{h(null)},[]),P=(0,eu.useCallback)(e=>{let{panelDataArray:t}=S.current,n=sb(t,e);n>=0&&(t.splice(n,1),delete E.current[e.id],S.current.panelDataArrayChanged=!0,y())},[y]),j=(0,eu.useMemo)(()=>({collapsePanel:_,direction:r,dragState:f,expandPanel:k,getPanelSize:w,getPanelStyle:A,groupId:p,isPanelCollapsed:N,isPanelExpanded:I,reevaluatePanelConstraints:D,registerPanel:C,registerResizeHandle:R,resizePanel:O,startDragging:L,stopDragging:M,unregisterPanel:P,panelGroupElement:m.current}),[_,f,r,k,w,A,p,N,I,D,C,R,O,L,M,P]);return(0,eu.createElement)(ip.Provider,{value:j},(0,eu.createElement)(u,{...d,children:t,className:n,id:i,ref:m,style:{display:"flex",flexDirection:"horizontal"===r?"row":"column",height:"100%",overflow:"hidden",width:"100%",...c},"data-panel-group":"",[im]:r,[ih]:p}))}let sg=(0,eu.forwardRef)((e,t)=>(0,eu.createElement)(sh,{...e,forwardedRef:t}));function sb(e,t){return e.findIndex(e=>e===t||e.id===t.id)}function sy(e,t,n){let r=sb(e,t),a=r===e.length-1,i=n[r];return{...t.constraints,panelSize:i,pivotIndices:a?[r-1,r]:[r,r+1]}}function sE({children:e=null,className:t="",disabled:n=!1,hitAreaMargins:r,id:a,onBlur:i,onClick:s,onDragging:o,onFocus:l,onPointerDown:c,onPointerUp:u,style:d={},tabIndex:p=0,tagName:m="div",...f}){var h,g;let b=(0,eu.useRef)(null),y=(0,eu.useRef)({onClick:s,onDragging:o,onPointerDown:c,onPointerUp:u});(0,eu.useEffect)(()=>{y.current.onClick=s,y.current.onDragging=o,y.current.onPointerDown=c,y.current.onPointerUp=u});let E=(0,eu.useContext)(ip);if(null===E)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");let{direction:x,groupId:v,registerResizeHandle:T,startDragging:S,stopDragging:_,panelGroupElement:k}=E,w=iT(a),[A,N]=(0,eu.useState)("inactive"),[I,C]=(0,eu.useState)(!1),[R,O]=(0,eu.useState)(null),D=(0,eu.useRef)({state:A});iy(()=>{D.current.state=A}),(0,eu.useEffect)(()=>{if(n)O(null);else{let e=T(w);O(()=>e)}},[n,w,T]);let L=null!=(h=null==r?void 0:r.coarse)?h:15,M=null!=(g=null==r?void 0:r.fine)?g:5;return(0,eu.useEffect)(()=>{if(n||null==R)return;let e=b.current;i2(e,"Element ref not attached");let t=!1;return function(e,t,n,r,a){var i;let{ownerDocument:s}=t,o={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:a},l=null!=(i=iq.get(s))?i:0;return iq.set(s,l+1),iV.add(o),i0(),function(){var t;iW.delete(e),iV.delete(o);let n=null!=(t=iq.get(s))?t:1;if(iq.set(s,n-1),i0(),1===n&&iq.delete(s),i$.includes(o)){let e=i$.indexOf(o);e>=0&&i$.splice(e,1),iJ(),a("up",!0,null)}}}(w,e,x,{coarse:L,fine:M},(e,n,r)=>{if(!n)return void N("inactive");switch(e){case"down":{N("drag"),t=!1,i2(r,'Expected event to be defined for "down" action'),S(w,r);let{onDragging:e,onPointerDown:n}=y.current;null==e||e(!0),null==n||n();break}case"move":{let{state:e}=D.current;t=!0,"drag"!==e&&N("hover"),i2(r,'Expected event to be defined for "move" action'),R(r);break}case"up":{N("hover"),_();let{onClick:e,onDragging:n,onPointerUp:r}=y.current;null==n||n(!1),null==r||r(),t||null==e||e()}}})},[L,x,n,M,T,w,R,S,_]),!function({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:r}){(0,eu.useEffect)(()=>{if(e||null==n||null==r)return;let a=sn(t,r);if(null==a)return;let i=e=>{if(!e.defaultPrevented)switch(e.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":e.preventDefault(),n(e);break;case"F6":{e.preventDefault();let n=a.getAttribute(ih);i2(n,`No group element found for id "${n}"`);let i=i8(n,r),s=i7(n,t,r);i2(null!==s,`No resize element found for id "${t}"`);let o=e.shiftKey?s>0?s-1:i.length-1:s+1<i.length?s+1:0;i[o].focus()}}};return a.addEventListener("keydown",i),()=>{a.removeEventListener("keydown",i)}},[r,e,t,n])}({disabled:n,handleId:w,resizeHandler:R,panelGroupElement:k}),(0,eu.createElement)(m,{...f,children:e,className:t,id:a,onBlur:()=>{C(!1),null==i||i()},onFocus:()=>{C(!0),null==l||l()},ref:b,role:"separator",style:{touchAction:"none",userSelect:"none",...d},tabIndex:p,[im]:x,[ih]:v,[ig]:"","data-resize-handle-active":"drag"===A?"pointer":I?"keyboard":void 0,"data-panel-resize-handle-enabled":!n,[ib]:w,"data-resize-handle-state":A})}sh.displayName="PanelGroup",sg.displayName="forwardRef(PanelGroup)",sE.displayName="PanelResizeHandle";let sx=({className:e,...t})=>(0,ec.jsx)(sg,{className:n6("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t}),sv=({withHandle:e,className:t,...n})=>(0,ec.jsx)(sE,{className:n6("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),...n,children:e&&(0,ec.jsx)("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",children:(0,ec.jsx)(id,{className:"h-2.5 w-2.5"})})}),sT=ny("brain-circuit",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]]),sS=ny("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),s_=ny("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]),sk=ny("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),sw=ny("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"}]]),sA=ny("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]),sN=ny("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]),sI=ny("pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]),sC=ny("pin-off",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]),sR=ny("puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]),sO=ny("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]),sD=ny("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),sL=ny("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);var sM=eu.createContext(void 0);function sP(e){let t=eu.useContext(sM);return e||t||"ltr"}function sj(e,[t,n]){return Math.min(n,Math.max(t,e))}var sF="ScrollArea",[sU,sB]=eI(sF),[sz,sH]=sU(sF),s$=eu.forwardRef((e,t)=>{let{__scopeScrollArea:n,type:r="hover",dir:a,scrollHideDelay:i=600,...s}=e,[o,l]=eu.useState(null),[c,u]=eu.useState(null),[d,p]=eu.useState(null),[m,f]=eu.useState(null),[h,g]=eu.useState(null),[b,y]=eu.useState(0),[E,x]=eu.useState(0),[v,T]=eu.useState(!1),[S,_]=eu.useState(!1),k=eN(t,e=>l(e)),w=sP(a);return(0,ec.jsx)(sz,{scope:n,type:r,dir:w,scrollHideDelay:i,scrollArea:o,viewport:c,onViewportChange:u,content:d,onContentChange:p,scrollbarX:m,onScrollbarXChange:f,scrollbarXEnabled:v,onScrollbarXEnabledChange:T,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:S,onScrollbarYEnabledChange:_,onCornerWidthChange:y,onCornerHeightChange:x,children:(0,ec.jsx)(eU.div,{dir:w,...s,ref:k,style:{position:"relative","--radix-scroll-area-corner-width":b+"px","--radix-scroll-area-corner-height":E+"px",...e.style}})})});s$.displayName=sF;var sG="ScrollAreaViewport",sq=eu.forwardRef((e,t)=>{let{__scopeScrollArea:n,children:r,nonce:a,...i}=e,s=sH(sG,n),o=eN(t,eu.useRef(null),s.onViewportChange);return(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),(0,ec.jsx)(eU.div,{"data-radix-scroll-area-viewport":"",...i,ref:o,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,ec.jsx)("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});sq.displayName=sG;var sW="ScrollAreaScrollbar",sV=eu.forwardRef((e,t)=>{let{forceMount:n,...r}=e,a=sH(sW,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:s}=a,o="horizontal"===e.orientation;return eu.useEffect(()=>(o?i(!0):s(!0),()=>{o?i(!1):s(!1)}),[o,i,s]),"hover"===a.type?(0,ec.jsx)(sY,{...r,ref:t,forceMount:n}):"scroll"===a.type?(0,ec.jsx)(sK,{...r,ref:t,forceMount:n}):"auto"===a.type?(0,ec.jsx)(sX,{...r,ref:t,forceMount:n}):"always"===a.type?(0,ec.jsx)(sZ,{...r,ref:t}):null});sV.displayName=sW;var sY=eu.forwardRef((e,t)=>{let{forceMount:n,...r}=e,a=sH(sW,e.__scopeScrollArea),[i,s]=eu.useState(!1);return eu.useEffect(()=>{let e=a.scrollArea,t=0;if(e){let n=()=>{window.clearTimeout(t),s(!0)},r=()=>{t=window.setTimeout(()=>s(!1),a.scrollHideDelay)};return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",r),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",r)}}},[a.scrollArea,a.scrollHideDelay]),(0,ec.jsx)(e3,{present:n||i,children:(0,ec.jsx)(sX,{"data-state":i?"visible":"hidden",...r,ref:t})})}),sK=eu.forwardRef((e,t)=>{var n;let{forceMount:r,...a}=e,i=sH(sW,e.__scopeScrollArea),s="horizontal"===e.orientation,o=oi(()=>c("SCROLL_END"),100),[l,c]=(n={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},eu.useReducer((e,t)=>n[e][t]??e,"hidden"));return eu.useEffect(()=>{if("idle"===l){let e=window.setTimeout(()=>c("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(e)}},[l,i.scrollHideDelay,c]),eu.useEffect(()=>{let e=i.viewport,t=s?"scrollLeft":"scrollTop";if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(c("SCROLL"),o()),n=r};return e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}},[i.viewport,s,c,o]),(0,ec.jsx)(e3,{present:r||"hidden"!==l,children:(0,ec.jsx)(sZ,{"data-state":"hidden"===l?"hidden":"visible",...a,ref:t,onPointerEnter:ek(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:ek(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),sX=eu.forwardRef((e,t)=>{let n=sH(sW,e.__scopeScrollArea),{forceMount:r,...a}=e,[i,s]=eu.useState(!1),o="horizontal"===e.orientation,l=oi(()=>{if(n.viewport){let e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;s(o?e:t)}},10);return os(n.viewport,l),os(n.content,l),(0,ec.jsx)(e3,{present:r||i,children:(0,ec.jsx)(sZ,{"data-state":i?"visible":"hidden",...a,ref:t})})}),sZ=eu.forwardRef((e,t)=>{let{orientation:n="vertical",...r}=e,a=sH(sW,e.__scopeScrollArea),i=eu.useRef(null),s=eu.useRef(0),[o,l]=eu.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=oe(o.viewport,o.content),u={...r,sizes:o,onSizesChange:l,hasThumb:!!(c>0&&c<1),onThumbChange:e=>i.current=e,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:e=>s.current=e};function d(e,t){return function(e,t,n,r="ltr"){let a=ot(n),i=t||a/2,s=n.scrollbar.paddingStart+i,o=n.scrollbar.size-n.scrollbar.paddingEnd-(a-i),l=n.content-n.viewport;return or([s,o],"ltr"===r?[0,l]:[-1*l,0])(e)}(e,s.current,o,t)}return"horizontal"===n?(0,ec.jsx)(sQ,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&i.current){let e=on(a.viewport.scrollLeft,o,a.dir);i.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollLeft=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollLeft=d(e,a.dir))}}):"vertical"===n?(0,ec.jsx)(sJ,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&i.current){let e=on(a.viewport.scrollTop,o);i.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollTop=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollTop=d(e))}}):null}),sQ=eu.forwardRef((e,t)=>{let{sizes:n,onSizesChange:r,...a}=e,i=sH(sW,e.__scopeScrollArea),[s,o]=eu.useState(),l=eu.useRef(null),c=eN(t,l,i.onScrollbarXChange);return eu.useEffect(()=>{l.current&&o(getComputedStyle(l.current))},[l]),(0,ec.jsx)(s2,{"data-orientation":"horizontal",...a,ref:c,sizes:n,style:{bottom:0,left:"rtl"===i.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===i.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":ot(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(i.viewport){var r,a;let s=i.viewport.scrollLeft+t.deltaX;e.onWheelScroll(s),r=s,a=n,r>0&&r<a&&t.preventDefault()}},onResize:()=>{l.current&&i.viewport&&s&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:s7(s.paddingLeft),paddingEnd:s7(s.paddingRight)}})}})}),sJ=eu.forwardRef((e,t)=>{let{sizes:n,onSizesChange:r,...a}=e,i=sH(sW,e.__scopeScrollArea),[s,o]=eu.useState(),l=eu.useRef(null),c=eN(t,l,i.onScrollbarYChange);return eu.useEffect(()=>{l.current&&o(getComputedStyle(l.current))},[l]),(0,ec.jsx)(s2,{"data-orientation":"vertical",...a,ref:c,sizes:n,style:{top:0,right:"ltr"===i.dir?0:void 0,left:"rtl"===i.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":ot(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(i.viewport){var r,a;let s=i.viewport.scrollTop+t.deltaY;e.onWheelScroll(s),r=s,a=n,r>0&&r<a&&t.preventDefault()}},onResize:()=>{l.current&&i.viewport&&s&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:s7(s.paddingTop),paddingEnd:s7(s.paddingBottom)}})}})}),[s0,s1]=sU(sW),s2=eu.forwardRef((e,t)=>{let{__scopeScrollArea:n,sizes:r,hasThumb:a,onThumbChange:i,onThumbPointerUp:s,onThumbPointerDown:o,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:d,...p}=e,m=sH(sW,n),[f,h]=eu.useState(null),g=eN(t,e=>h(e)),b=eu.useRef(null),y=eu.useRef(""),E=m.viewport,x=r.content-r.viewport,v=ez(u),T=ez(l),S=oi(d,10);function _(e){b.current&&c({x:e.clientX-b.current.left,y:e.clientY-b.current.top})}return eu.useEffect(()=>{let e=e=>{let t=e.target;f?.contains(t)&&v(e,x)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[E,f,x,v]),eu.useEffect(T,[r,T]),os(f,S),os(m.content,S),(0,ec.jsx)(s0,{scope:n,scrollbar:f,hasThumb:a,onThumbChange:ez(i),onThumbPointerUp:ez(s),onThumbPositionChange:T,onThumbPointerDown:ez(o),children:(0,ec.jsx)(eU.div,{...p,ref:g,style:{position:"absolute",...p.style},onPointerDown:ek(e.onPointerDown,e=>{0===e.button&&(e.target.setPointerCapture(e.pointerId),b.current=f.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),_(e))}),onPointerMove:ek(e.onPointerMove,_),onPointerUp:ek(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=y.current,m.viewport&&(m.viewport.style.scrollBehavior=""),b.current=null})})})}),s3="ScrollAreaThumb",s4=eu.forwardRef((e,t)=>{let{forceMount:n,...r}=e,a=s1(s3,e.__scopeScrollArea);return(0,ec.jsx)(e3,{present:n||a.hasThumb,children:(0,ec.jsx)(s5,{ref:t,...r})})}),s5=eu.forwardRef((e,t)=>{let{__scopeScrollArea:n,style:r,...a}=e,i=sH(s3,n),s=s1(s3,n),{onThumbPositionChange:o}=s,l=eN(t,e=>s.onThumbChange(e)),c=eu.useRef(void 0),u=oi(()=>{c.current&&(c.current(),c.current=void 0)},100);return eu.useEffect(()=>{let e=i.viewport;if(e){let t=()=>{u(),c.current||(c.current=oa(e,o),o())};return o(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}},[i.viewport,u,o]),(0,ec.jsx)(eU.div,{"data-state":s.hasThumb?"visible":"hidden",...a,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ek(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;s.onThumbPointerDown({x:n,y:r})}),onPointerUp:ek(e.onPointerUp,s.onThumbPointerUp)})});s4.displayName=s3;var s6="ScrollAreaCorner",s9=eu.forwardRef((e,t)=>{let n=sH(s6,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return"scroll"!==n.type&&r?(0,ec.jsx)(s8,{...e,ref:t}):null});s9.displayName=s6;var s8=eu.forwardRef((e,t)=>{let{__scopeScrollArea:n,...r}=e,a=sH(s6,n),[i,s]=eu.useState(0),[o,l]=eu.useState(0),c=!!(i&&o);return os(a.scrollbarX,()=>{let e=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(e),l(e)}),os(a.scrollbarY,()=>{let e=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(e),s(e)}),c?(0,ec.jsx)(eU.div,{...r,ref:t,style:{width:i,height:o,position:"absolute",right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:0,...e.style}}):null});function s7(e){return e?parseInt(e,10):0}function oe(e,t){let n=e/t;return isNaN(n)?0:n}function ot(e){let t=oe(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd;return Math.max((e.scrollbar.size-n)*t,18)}function on(e,t,n="ltr"){let r=ot(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-a,s=t.content-t.viewport,o=sj(e,"ltr"===n?[0,s]:[-1*s,0]);return or([0,s],[0,i-r])(o)}function or(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}var oa=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return!function a(){let i={left:e.scrollLeft,top:e.scrollTop},s=n.left!==i.left,o=n.top!==i.top;(s||o)&&t(),n=i,r=window.requestAnimationFrame(a)}(),()=>window.cancelAnimationFrame(r)};function oi(e,t){let n=ez(e),r=eu.useRef(0);return eu.useEffect(()=>()=>window.clearTimeout(r.current),[]),eu.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function os(e,t){let n=ez(t);eC(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}function oo({className:e,children:t,...n}){return(0,ec.jsxs)(s$,{"data-slot":"scroll-area",className:n6("relative",e),...n,children:[(0,ec.jsx)(sq,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:outline-1 focus-visible:ring-[3px] focus-visible:ring-ring/50",children:t}),(0,ec.jsx)(ol,{}),(0,ec.jsx)(s9,{})]})}function ol({className:e,orientation:t="vertical",...n}){return(0,ec.jsx)(sV,{"data-slot":"scroll-area-scrollbar",orientation:t,className:n6("flex touch-none select-none p-px transition-colors","vertical"===t&&"h-full w-2.5 border-l border-l-transparent","horizontal"===t&&"h-2.5 flex-col border-t border-t-transparent",e),...n,children:(0,ec.jsx)(s4,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}function oc({className:e,...t}){return(0,ec.jsx)("div",{className:n6("animate-pulse rounded-md bg-muted",e),...t})}function ou(e){var t;let n,r=(t=e,(n=eu.forwardRef((e,t)=>{let{children:n,...r}=e;if(eu.isValidElement(n)){var a;let e,i,s=(a=n,(i=(e=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.ref:(i=(e=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.props.ref:a.props.ref||a.ref),o=function(e,t){let n={...t};for(let r in t){let a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...e)=>{let t=i(...e);return a(...e),t}:a&&(n[r]=a):"style"===r?n[r]={...a,...i}:"className"===r&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==eu.Fragment&&(o.ref=t?eA(t,s):s),eu.cloneElement(n,o)}return eu.Children.count(n)>1?eu.Children.only(null):null})).displayName=`${t}.SlotClone`,n),a=eu.forwardRef((e,t)=>{let{children:n,...a}=e,i=eu.Children.toArray(n),s=i.find(op);if(s){let e=s.props.children,n=i.map(t=>t!==s?t:eu.Children.count(e)>1?eu.Children.only(null):eu.isValidElement(e)?e.props.children:null);return(0,ec.jsx)(r,{...a,ref:t,children:eu.isValidElement(e)?eu.cloneElement(e,void 0,n):null})}return(0,ec.jsx)(r,{...a,ref:t,children:n})});return a.displayName=`${e}.Slot`,a}var od=Symbol("radix.slottable");function op(e){return eu.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===od}function om(e){let t=e+"CollectionProvider",[n,r]=eI(t),[a,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=e=>{let{scope:t,children:n}=e,r=eu.default.useRef(null),i=eu.default.useRef(new Map).current;return(0,ec.jsx)(a,{scope:t,itemMap:i,collectionRef:r,children:n})};s.displayName=t;let o=e+"CollectionSlot",l=ou(o),c=eu.default.forwardRef((e,t)=>{let{scope:n,children:r}=e,a=eN(t,i(o,n).collectionRef);return(0,ec.jsx)(l,{ref:a,children:r})});c.displayName=o;let u=e+"CollectionItemSlot",d="data-radix-collection-item",p=ou(u),m=eu.default.forwardRef((e,t)=>{let{scope:n,children:r,...a}=e,s=eu.default.useRef(null),o=eN(t,s),l=i(u,n);return eu.default.useEffect(()=>(l.itemMap.set(s,{ref:s,...a}),()=>void l.itemMap.delete(s))),(0,ec.jsx)(p,{...{[d]:""},ref:o,children:r})});return m.displayName=u,[{Provider:s,Slot:c,ItemSlot:m},function(t){let n=i(e+"CollectionConsumer",t);return eu.default.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])},r]}let of=["top","right","bottom","left"],oh=Math.min,og=Math.max,ob=Math.round,oy=Math.floor,oE=e=>({x:e,y:e}),ox={left:"right",right:"left",bottom:"top",top:"bottom"};function ov(e,t){return"function"==typeof e?e(t):e}function oT(e){return e.split("-")[0]}function oS(e){return e.split("-")[1]}function o_(e){return"x"===e?"y":"x"}function ok(e){return"y"===e?"height":"width"}function ow(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function oA(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let oN=["left","right"],oI=["right","left"],oC=["top","bottom"],oR=["bottom","top"];function oO(e){let t=oT(e);return ox[t]+e.slice(t.length)}function oD(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function oL(e){let{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function oM(e,t,n){let r,{reference:a,floating:i}=e,s=ow(t),o=o_(ow(t)),l=ok(o),c=oT(t),u="y"===s,d=a.x+a.width/2-i.width/2,p=a.y+a.height/2-i.height/2,m=a[l]/2-i[l]/2;switch(c){case"top":r={x:d,y:a.y-i.height};break;case"bottom":r={x:d,y:a.y+a.height};break;case"right":r={x:a.x+a.width,y:p};break;case"left":r={x:a.x-i.width,y:p};break;default:r={x:a.x,y:a.y}}switch(oS(t)){case"start":r[o]-=m*(n&&u?-1:1);break;case"end":r[o]+=m*(n&&u?-1:1)}return r}async function oP(e,t){var n;void 0===t&&(t={});let{x:r,y:a,platform:i,rects:s,elements:o,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:m=0}=ov(t,e),f=oD(m),h=o[p?"floating"===d?"reference":"floating":d],g=oL(await i.getClippingRect({element:null==(n=await (null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await (null==i.getDocumentElement?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:u,strategy:l})),b="floating"===d?{x:r,y:a,width:s.floating.width,height:s.floating.height}:s.reference,y=await (null==i.getOffsetParent?void 0:i.getOffsetParent(o.floating)),E=await (null==i.isElement?void 0:i.isElement(y))&&await (null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},x=oL(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:b,offsetParent:y,strategy:l}):b);return{top:(g.top-x.top+f.top)/E.y,bottom:(x.bottom-g.bottom+f.bottom)/E.y,left:(g.left-x.left+f.left)/E.x,right:(x.right-g.right+f.right)/E.x}}let oj=async(e,t,n)=>{let{placement:r="bottom",strategy:a="absolute",middleware:i=[],platform:s}=n,o=s.detectOverflow?s:{...s,detectOverflow:oP},l=await (null==s.isRTL?void 0:s.isRTL(t)),c=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:d}=oM(c,r,l),p=r,m=0,f={};for(let n=0;n<i.length;n++){let h=i[n];if(!h)continue;let{name:g,fn:b}=h,{x:y,y:E,data:x,reset:v}=await b({x:u,y:d,initialPlacement:r,placement:p,strategy:a,middlewareData:f,rects:c,platform:o,elements:{reference:e,floating:t}});u=null!=y?y:u,d=null!=E?E:d,f[g]={...f[g],...x},v&&m<50&&(m++,"object"==typeof v&&(v.placement&&(p=v.placement),v.rects&&(c=!0===v.rects?await s.getElementRects({reference:e,floating:t,strategy:a}):v.rects),{x:u,y:d}=oM(c,p,l)),n=-1)}return{x:u,y:d,placement:p,strategy:a,middlewareData:f}};function oF(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function oU(e){return of.some(t=>e[t]>=0)}let oB=new Set(["left","top"]);async function oz(e,t){let{placement:n,platform:r,elements:a}=e,i=await (null==r.isRTL?void 0:r.isRTL(a.floating)),s=oT(n),o=oS(n),l="y"===ow(n),c=oB.has(s)?-1:1,u=i&&l?-1:1,d=ov(t,e),{mainAxis:p,crossAxis:m,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return o&&"number"==typeof f&&(m="end"===o?-1*f:f),l?{x:m*u,y:p*c}:{x:p*c,y:m*u}}function oH(){return"u">typeof window}function o$(e){return oW(e)?(e.nodeName||"").toLowerCase():"#document"}function oG(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function oq(e){var t;return null==(t=(oW(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function oW(e){return!!oH()&&(e instanceof Node||e instanceof oG(e).Node)}function oV(e){return!!oH()&&(e instanceof Element||e instanceof oG(e).Element)}function oY(e){return!!oH()&&(e instanceof HTMLElement||e instanceof oG(e).HTMLElement)}function oK(e){return!(!oH()||"u"<typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof oG(e).ShadowRoot)}function oX(e){let{overflow:t,overflowX:n,overflowY:r,display:a}=o4(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==a&&"contents"!==a}function oZ(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}let oQ=/transform|translate|scale|rotate|perspective|filter/,oJ=/paint|layout|strict|content/,o0=e=>!!e&&"none"!==e;function o1(e){let t=oV(e)?o4(e):e;return o0(t.transform)||o0(t.translate)||o0(t.scale)||o0(t.rotate)||o0(t.perspective)||!o2()&&(o0(t.backdropFilter)||o0(t.filter))||oQ.test(t.willChange||"")||oJ.test(t.contain||"")}function o2(){return null==r&&(r="u">typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),r}function o3(e){return/^(html|body|#document)$/.test(o$(e))}function o4(e){return oG(e).getComputedStyle(e)}function o5(e){return oV(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function o6(e){if("html"===o$(e))return e;let t=e.assignedSlot||e.parentNode||oK(e)&&e.host||oq(e);return oK(t)?t.host:t}function o9(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let a=function e(t){let n=o6(t);return o3(n)?t.ownerDocument?t.ownerDocument.body:t.body:oY(n)&&oX(n)?n:e(n)}(e),i=a===(null==(r=e.ownerDocument)?void 0:r.body),s=oG(a);if(!i)return t.concat(a,o9(a,[],n));{let e=o8(s);return t.concat(s,s.visualViewport||[],oX(a)?a:[],e&&n?o9(e):[])}}function o8(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function o7(e){let t=o4(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,a=oY(e),i=a?e.offsetWidth:n,s=a?e.offsetHeight:r,o=ob(n)!==i||ob(r)!==s;return o&&(n=i,r=s),{width:n,height:r,$:o}}function le(e){return oV(e)?e:e.contextElement}function lt(e){let t=le(e);if(!oY(t))return oE(1);let n=t.getBoundingClientRect(),{width:r,height:a,$:i}=o7(t),s=(i?ob(n.width):n.width)/r,o=(i?ob(n.height):n.height)/a;return s&&Number.isFinite(s)||(s=1),o&&Number.isFinite(o)||(o=1),{x:s,y:o}}let ln=oE(0);function lr(e){let t=oG(e);return o2()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ln}function la(e,t,n,r){var a;void 0===t&&(t=!1),void 0===n&&(n=!1);let i=e.getBoundingClientRect(),s=le(e),o=oE(1);t&&(r?oV(r)&&(o=lt(r)):o=lt(e));let l=(void 0===(a=n)&&(a=!1),r&&(!a||r===oG(s))&&a)?lr(s):oE(0),c=(i.left+l.x)/o.x,u=(i.top+l.y)/o.y,d=i.width/o.x,p=i.height/o.y;if(s){let e=oG(s),t=r&&oV(r)?oG(r):r,n=e,a=o8(n);for(;a&&r&&t!==n;){let e=lt(a),t=a.getBoundingClientRect(),r=o4(a),i=t.left+(a.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(a.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,u*=e.y,d*=e.x,p*=e.y,c+=i,u+=s,a=o8(n=oG(a))}}return oL({width:d,height:p,x:c,y:u})}function li(e,t){let n=o5(e).scrollLeft;return t?t.left+n:la(oq(e)).left+n}function ls(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-li(e,n),y:n.top+t.scrollTop}}function lo(e,t,n){var r;let a;if("viewport"===t)a=function(e,t){let n=oG(e),r=oq(e),a=n.visualViewport,i=r.clientWidth,s=r.clientHeight,o=0,l=0;if(a){i=a.width,s=a.height;let e=o2();(!e||e&&"fixed"===t)&&(o=a.offsetLeft,l=a.offsetTop)}let c=li(r);if(c<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),a="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,s=Math.abs(r.clientWidth-t.clientWidth-a);s<=25&&(i-=s)}else c<=25&&(i+=c);return{width:i,height:s,x:o,y:l}}(e,n);else if("document"===t){let t,n,i,s,o,l,c;r=oq(e),t=oq(r),n=o5(r),i=r.ownerDocument.body,s=og(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),o=og(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight),l=-n.scrollLeft+li(r),c=-n.scrollTop,"rtl"===o4(i).direction&&(l+=og(t.clientWidth,i.clientWidth)-s),a={width:s,height:o,x:l,y:c}}else if(oV(t)){let e,r,i,s,o,l;r=(e=la(t,!0,"fixed"===n)).top+t.clientTop,i=e.left+t.clientLeft,s=oY(t)?lt(t):oE(1),o=t.clientWidth*s.x,l=t.clientHeight*s.y,a={width:o,height:l,x:i*s.x,y:r*s.y}}else{let n=lr(e);a={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return oL(a)}function ll(e){return"static"===o4(e).position}function lc(e,t){if(!oY(e)||"fixed"===o4(e).position)return null;if(t)return t(e);let n=e.offsetParent;return oq(e)===n&&(n=n.ownerDocument.body),n}function lu(e,t){var n;let r=oG(e);if(oZ(e))return r;if(!oY(e)){let t=o6(e);for(;t&&!o3(t);){if(oV(t)&&!ll(t))return t;t=o6(t)}return r}let a=lc(e,t);for(;a&&(n=a,/^(table|td|th)$/.test(o$(n)))&&ll(a);)a=lc(a,t);return a&&o3(a)&&ll(a)&&!o1(a)?r:a||function(e){let t=o6(e);for(;oY(t)&&!o3(t);){if(o1(t))return t;if(oZ(t))break;t=o6(t)}return null}(e)||r}let ld=async function(e){let t=this.getOffsetParent||lu,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=oY(t),a=oq(t),i="fixed"===n,s=la(e,!0,i,t),o={scrollLeft:0,scrollTop:0},l=oE(0);if(r||!r&&!i)if(("body"!==o$(t)||oX(a))&&(o=o5(t)),r){let e=la(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else a&&(l.x=li(a));i&&!r&&a&&(l.x=li(a));let c=!a||r||i?oE(0):ls(a,o);return{x:s.left+o.scrollLeft-l.x-c.x,y:s.top+o.scrollTop-l.y-c.y,width:s.width,height:s.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},lp={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e,i="fixed"===a,s=oq(r),o=!!t&&oZ(t.floating);if(r===s||o&&i)return n;let l={scrollLeft:0,scrollTop:0},c=oE(1),u=oE(0),d=oY(r);if((d||!d&&!i)&&(("body"!==o$(r)||oX(s))&&(l=o5(r)),d)){let e=la(r);c=lt(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let p=!s||d||i?oE(0):ls(s,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}},getDocumentElement:oq,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e,i=[..."clippingAncestors"===n?oZ(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=o9(e,[],!1).filter(e=>oV(e)&&"body"!==o$(e)),a=null,i="fixed"===o4(e).position,s=i?o6(e):e;for(;oV(s)&&!o3(s);){let t=o4(s),n=o1(s);n||"fixed"!==t.position||(a=null),(i?n||a:!(!n&&"static"===t.position&&a&&("absolute"===a.position||"fixed"===a.position)||oX(s)&&!n&&function e(t,n){let r=o6(t);return!(r===n||!oV(r)||o3(r))&&("fixed"===o4(r).position||e(r,n))}(e,s)))?a=t:r=r.filter(e=>e!==s),s=o6(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=lo(t,i[0],a),o=s.top,l=s.right,c=s.bottom,u=s.left;for(let e=1;e<i.length;e++){let n=lo(t,i[e],a);o=og(n.top,o),l=oh(n.right,l),c=oh(n.bottom,c),u=og(n.left,u)}return{width:l-u,height:c-o,x:u,y:o}},getOffsetParent:lu,getElementRects:ld,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=o7(e);return{width:t,height:n}},getScale:lt,isElement:oV,isRTL:function(e){return"rtl"===o4(e).direction}};function lm(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let lf=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:a,rects:i,platform:s,elements:o,middlewareData:l}=t,{element:c,padding:u=0}=ov(e,t)||{};if(null==c)return{};let d=oD(u),p={x:n,y:r},m=o_(ow(a)),f=ok(m),h=await s.getDimensions(c),g="y"===m,b=g?"clientHeight":"clientWidth",y=i.reference[f]+i.reference[m]-p[m]-i.floating[f],E=p[m]-i.reference[m],x=await (null==s.getOffsetParent?void 0:s.getOffsetParent(c)),v=x?x[b]:0;v&&await (null==s.isElement?void 0:s.isElement(x))||(v=o.floating[b]||i.floating[f]);let T=v/2-h[f]/2-1,S=oh(d[g?"top":"left"],T),_=oh(d[g?"bottom":"right"],T),k=v-h[f]-_,w=v/2-h[f]/2+(y/2-E/2),A=og(S,oh(w,k)),N=!l.arrow&&null!=oS(a)&&w!==A&&i.reference[f]/2-(w<S?S:_)-h[f]/2<0,I=N?w<S?w-S:w-k:0;return{[m]:p[m]+I,data:{[m]:A,centerOffset:w-A-I,...N&&{alignmentOffset:I}},reset:N}}});var lh="u">typeof document?eu.useLayoutEffect:function(){};function lg(e,t){let n,r,a;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(!lg(e[r],t[r]))return!1;return!0}if((n=(a=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,a[r]))return!1;for(r=n;0!=r--;){let n=a[r];if(("_owner"!==n||!e.$$typeof)&&!lg(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function lb(e){return"u"<typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ly(e,t){let n=lb(e);return Math.round(t*n)/n}function lE(e){let t=eu.useRef(e);return lh(()=>{t.current=e}),t}var lx=eu.forwardRef((e,t)=>{let{children:n,width:r=10,height:a=5,...i}=e;return(0,ec.jsx)(eU.svg,{...i,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,ec.jsx)("polygon",{points:"0,0 30,0 15,10"})})});lx.displayName="Arrow";var lv="Popper",[lT,lS]=eI(lv),[l_,lk]=lT(lv),lw=e=>{let{__scopePopper:t,children:n}=e,[r,a]=eu.useState(null);return(0,ec.jsx)(l_,{scope:t,anchor:r,onAnchorChange:a,children:n})};lw.displayName=lv;var lA="PopperAnchor",lN=eu.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...a}=e,i=lk(lA,n),s=eu.useRef(null),o=eN(t,s),l=eu.useRef(null);return eu.useEffect(()=>{let e=l.current;l.current=r?.current||s.current,e!==l.current&&i.onAnchorChange(l.current)}),r?null:(0,ec.jsx)(eU.div,{...a,ref:o})});lN.displayName=lA;var lI="PopperContent",[lC,lR]=lT(lI),lO=eu.forwardRef((e,t)=>{var n,r,a,i,s,o,l,c,u,d,p,m,f;let h,g,b,y,E,x,{__scopePopper:v,side:T="bottom",sideOffset:S=0,align:_="center",alignOffset:k=0,arrowPadding:w=0,avoidCollisions:A=!0,collisionBoundary:N=[],collisionPadding:I=0,sticky:C="partial",hideWhenDetached:R=!1,updatePositionStrategy:O="optimized",onPlaced:D,...L}=e,M=lk(lI,v),[P,j]=eu.useState(null),F=eN(t,e=>j(e)),[U,B]=eu.useState(null),z=function(e){let[t,n]=eu.useState(void 0);return eC(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,a;if(!Array.isArray(t)||!t.length)return;let i=t[0];if("borderBoxSize"in i){let e=i.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,a=t.blockSize}else r=e.offsetWidth,a=e.offsetHeight;n({width:r,height:a})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}(U),H=z?.width??0,$=z?.height??0,G="number"==typeof I?I:{top:0,right:0,bottom:0,left:0,...I},q=Array.isArray(N)?N:[N],W=q.length>0,V={padding:G,boundary:q.filter(lP),altBoundary:W},{refs:Y,floatingStyles:K,placement:X,isPositioned:Z,middlewareData:Q}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:i,floating:s}={},transform:o=!0,whileElementsMounted:l,open:c}=e,[u,d]=eu.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=eu.useState(r);lg(p,r)||m(r);let[f,h]=eu.useState(null),[g,b]=eu.useState(null),y=eu.useCallback(e=>{e!==T.current&&(T.current=e,h(e))},[]),E=eu.useCallback(e=>{e!==S.current&&(S.current=e,b(e))},[]),x=i||f,v=s||g,T=eu.useRef(null),S=eu.useRef(null),_=eu.useRef(u),k=null!=l,w=lE(l),A=lE(a),N=lE(c),I=eu.useCallback(()=>{var e,r;let a,i,s;if(!T.current||!S.current)return;let o={placement:t,strategy:n,middleware:p};A.current&&(o.platform=A.current),(e=T.current,r=S.current,a=new Map,s={...(i={platform:lp,...o}).platform,_c:a},oj(e,r,{...i,platform:s})).then(e=>{let t={...e,isPositioned:!1!==N.current};C.current&&!lg(_.current,t)&&(_.current=t,eP.flushSync(()=>{d(t)}))})},[p,t,n,A,N]);lh(()=>{!1===c&&_.current.isPositioned&&(_.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[c]);let C=eu.useRef(!1);lh(()=>(C.current=!0,()=>{C.current=!1}),[]),lh(()=>{if(x&&(T.current=x),v&&(S.current=v),x&&v){if(w.current)return w.current(x,v,I);I()}},[x,v,I,w,k]);let R=eu.useMemo(()=>({reference:T,floating:S,setReference:y,setFloating:E}),[y,E]),O=eu.useMemo(()=>({reference:x,floating:v}),[x,v]),D=eu.useMemo(()=>{let e={position:n,left:0,top:0};if(!O.floating)return e;let t=ly(O.floating,u.x),r=ly(O.floating,u.y);return o?{...e,transform:"translate("+t+"px, "+r+"px)",...lb(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,o,O.floating,u.x,u.y]);return eu.useMemo(()=>({...u,update:I,refs:R,elements:O,floatingStyles:D}),[u,I,R,O,D])}({strategy:"fixed",placement:T+("center"!==_?"-"+_:""),whileElementsMounted:(...e)=>(function(e,t,n,r){let a;void 0===r&&(r={});let{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,u=le(e),d=i||s?[...u?o9(u):[],...t?o9(t):[]]:[];d.forEach(e=>{i&&e.addEventListener("scroll",n,{passive:!0}),s&&e.addEventListener("resize",n)});let p=u&&l?function(e,t){let n,r=null,a=oq(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function s(o,l){void 0===o&&(o=!1),void 0===l&&(l=1),i();let c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:m}=c;if(o||t(),!p||!m)return;let f={rootMargin:-oy(d)+"px "+-oy(a.clientWidth-(u+p))+"px "+-oy(a.clientHeight-(d+m))+"px "+-oy(u)+"px",threshold:og(0,oh(1,l))||1},h=!0;function g(t){let r=t[0].intersectionRatio;if(r!==l){if(!h)return s();r?s(!1,r):n=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==r||lm(c,e.getBoundingClientRect())||s(),h=!1}try{r=new IntersectionObserver(g,{...f,root:a.ownerDocument})}catch(e){r=new IntersectionObserver(g,f)}r.observe(e)}(!0),i}(u,n):null,m=-1,f=null;o&&(f=new ResizeObserver(e=>{let[r]=e;r&&r.target===u&&f&&t&&(f.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var e;null==(e=f)||e.observe(t)})),n()}),u&&!c&&f.observe(u),t&&f.observe(t));let h=c?la(e):null;return c&&function t(){let r=la(e);h&&!lm(h,r)&&n(),h=r,a=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach(e=>{i&&e.removeEventListener("scroll",n),s&&e.removeEventListener("resize",n)}),null==p||p(),null==(e=f)||e.disconnect(),f=null,c&&cancelAnimationFrame(a)}})(...e,{animationFrame:"always"===O}),elements:{reference:M.anchor},middleware:[{name:(h={name:"offset",options:r=n={mainAxis:S+$,alignmentAxis:k},async fn(e){var t,n;let{x:a,y:i,placement:s,middlewareData:o}=e,l=await oz(e,r);return s===(null==(t=o.offset)?void 0:t.placement)&&null!=(n=o.arrow)&&n.alignmentOffset?{}:{x:a+l.x,y:i+l.y,data:{...l,placement:s}}}}).name,fn:h.fn,options:[n,void 0]},A&&{name:(g={name:"shift",options:s=i={mainAxis:!0,crossAxis:!1,limiter:"partial"===C?{fn:(a=void 0,{options:a={},fn(e){let{x:t,y:n,placement:r,rects:i,middlewareData:s}=e,{offset:o=0,mainAxis:l=!0,crossAxis:c=!0}=ov(a,e),u={x:t,y:n},d=ow(r),p=o_(d),m=u[p],f=u[d],h=ov(o,e),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){let e="y"===p?"height":"width",t=i.reference[p]-i.floating[e]+g.mainAxis,n=i.reference[p]+i.reference[e]-g.mainAxis;m<t?m=t:m>n&&(m=n)}if(c){var b,y;let e="y"===p?"width":"height",t=oB.has(oT(r)),n=i.reference[d]-i.floating[e]+(t&&(null==(b=s.offset)?void 0:b[d])||0)+(t?0:g.crossAxis),a=i.reference[d]+i.reference[e]+(t?0:(null==(y=s.offset)?void 0:y[d])||0)-(t?g.crossAxis:0);f<n?f=n:f>a&&(f=a)}return{[p]:m,[d]:f}}}).fn,options:[void 0,void 0]}:void 0,...V},async fn(e){let{x:t,y:n,placement:r,platform:a}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=ov(s,e),u={x:t,y:n},d=await a.detectOverflow(e,c),p=ow(oT(r)),m=o_(p),f=u[m],h=u[p];if(i){let e="y"===m?"top":"left",t="y"===m?"bottom":"right",n=f+d[e],r=f-d[t];f=og(n,oh(f,r))}if(o){let e="y"===p?"top":"left",t="y"===p?"bottom":"right",n=h+d[e],r=h-d[t];h=og(n,oh(h,r))}let g=l.fn({...e,[m]:f,[p]:h});return{...g,data:{x:g.x-t,y:g.y-n,enabled:{[m]:i,[p]:o}}}}}).name,fn:g.fn,options:[i,void 0]},A&&{name:(b={name:"flip",options:l=o={...V},async fn(e){var t,n,r,a,i,s,o,c;let u,d,p,{placement:m,middlewareData:f,rects:h,initialPlacement:g,platform:b,elements:y}=e,{mainAxis:E=!0,crossAxis:x=!0,fallbackPlacements:v,fallbackStrategy:T="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:_=!0,...k}=ov(l,e);if(null!=(t=f.arrow)&&t.alignmentOffset)return{};let w=oT(m),A=ow(g),N=oT(g)===g,I=await (null==b.isRTL?void 0:b.isRTL(y.floating)),C=v||(N||!_?[oO(g)]:(u=oO(g),[oA(g),u,oA(u)])),R="none"!==S;!v&&R&&C.push(...(d=oS(g),p=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?oI:oN;return t?oN:oI;case"left":case"right":return t?oC:oR;default:return[]}}(oT(g),"start"===S,I),d&&(p=p.map(e=>e+"-"+d),_&&(p=p.concat(p.map(oA)))),p));let O=[g,...C],D=await b.detectOverflow(e,k),L=[],M=(null==(n=f.flip)?void 0:n.overflows)||[];if(E&&L.push(D[w]),x){let e,t,n,r,a=(s=m,o=h,void 0===(c=I)&&(c=!1),e=oS(s),n=ok(t=o_(ow(s))),r="x"===t?e===(c?"end":"start")?"right":"left":"start"===e?"bottom":"top",o.reference[n]>o.floating[n]&&(r=oO(r)),[r,oO(r)]);L.push(D[a[0]],D[a[1]])}if(M=[...M,{placement:m,overflows:L}],!L.every(e=>e<=0)){let e=((null==(r=f.flip)?void 0:r.index)||0)+1,t=O[e];if(t&&("alignment"!==x||A===ow(t)||M.every(e=>ow(e.placement)!==A||e.overflows[0]>0)))return{data:{index:e,overflows:M},reset:{placement:t}};let n=null==(a=M.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:a.placement;if(!n)switch(T){case"bestFit":{let e=null==(i=M.filter(e=>{if(R){let t=ow(e.placement);return t===A||"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:i[0];e&&(n=e);break}case"initialPlacement":n=g}if(m!==n)return{reset:{placement:n}}}return{}}}).name,fn:b.fn,options:[o,void 0]},{name:(y={name:"size",options:u=c={...V,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:a,height:i}=t.reference,s=e.floating.style;s.setProperty("--radix-popper-available-width",`${n}px`),s.setProperty("--radix-popper-available-height",`${r}px`),s.setProperty("--radix-popper-anchor-width",`${a}px`),s.setProperty("--radix-popper-anchor-height",`${i}px`)}},async fn(e){var t,n;let r,a,{placement:i,rects:s,platform:o,elements:l}=e,{apply:c=()=>{},...d}=ov(u,e),p=await o.detectOverflow(e,d),m=oT(i),f=oS(i),h="y"===ow(i),{width:g,height:b}=s.floating;"top"===m||"bottom"===m?(r=m,a=f===(await (null==o.isRTL?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(a=m,r="end"===f?"top":"bottom");let y=b-p.top-p.bottom,E=g-p.left-p.right,x=oh(b-p[r],y),v=oh(g-p[a],E),T=!e.middlewareData.shift,S=x,_=v;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(_=E),null!=(n=e.middlewareData.shift)&&n.enabled.y&&(S=y),T&&!f){let e=og(p.left,0),t=og(p.right,0),n=og(p.top,0),r=og(p.bottom,0);h?_=g-2*(0!==e||0!==t?e+t:og(p.left,p.right)):S=b-2*(0!==n||0!==r?n+r:og(p.top,p.bottom))}await c({...e,availableWidth:_,availableHeight:S});let k=await o.getDimensions(l.floating);return g!==k.width||b!==k.height?{reset:{rects:!0}}:{}}}).name,fn:y.fn,options:[c,void 0]},U&&{name:(E={name:"arrow",options:p=d={element:U,padding:w},fn(e){let{element:t,padding:n}="function"==typeof p?p(e):p;return t&&({}).hasOwnProperty.call(t,"current")?null!=t.current?lf({element:t.current,padding:n}).fn(e):{}:t?lf({element:t,padding:n}).fn(e):{}}}).name,fn:E.fn,options:[d,void 0]},lj({arrowWidth:H,arrowHeight:$}),R&&{name:(x={name:"hide",options:f=m={strategy:"referenceHidden",...V},async fn(e){let{rects:t,platform:n}=e,{strategy:r="referenceHidden",...a}=ov(f,e);switch(r){case"referenceHidden":{let r=oF(await n.detectOverflow(e,{...a,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:oU(r)}}}case"escaped":{let r=oF(await n.detectOverflow(e,{...a,altBoundary:!0}),t.floating);return{data:{escapedOffsets:r,escaped:oU(r)}}}default:return{}}}}).name,fn:x.fn,options:[m,void 0]}]}),[J,ee]=lF(X),et=ez(D);eC(()=>{Z&&et?.()},[Z,et]);let en=Q.arrow?.x,er=Q.arrow?.y,ea=Q.arrow?.centerOffset!==0,[ei,es]=eu.useState();return eC(()=>{P&&es(window.getComputedStyle(P).zIndex)},[P]),(0,ec.jsx)("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:Z?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ei,"--radix-popper-transform-origin":[Q.transformOrigin?.x,Q.transformOrigin?.y].join(" "),...Q.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,ec.jsx)(lC,{scope:v,placedSide:J,onArrowChange:B,arrowX:en,arrowY:er,shouldHideArrow:ea,children:(0,ec.jsx)(eU.div,{"data-side":J,"data-align":ee,...L,ref:F,style:{...L.style,animation:Z?void 0:"none"}})})})});lO.displayName=lI;var lD="PopperArrow",lL={top:"bottom",right:"left",bottom:"top",left:"right"},lM=eu.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,a=lR(lD,n),i=lL[a.placedSide];return(0,ec.jsx)("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:(0,ec.jsx)(lx,{...r,ref:t,style:{...r.style,display:"block"}})})});function lP(e){return null!==e}lM.displayName=lD;var lj=e=>({name:"transformOrigin",options:e,fn(t){let{placement:n,rects:r,middlewareData:a}=t,i=a.arrow?.centerOffset!==0,s=i?0:e.arrowWidth,o=i?0:e.arrowHeight,[l,c]=lF(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(a.arrow?.x??0)+s/2,p=(a.arrow?.y??0)+o/2,m="",f="";return"bottom"===l?(m=i?u:`${d}px`,f=`${-o}px`):"top"===l?(m=i?u:`${d}px`,f=`${r.floating.height+o}px`):"right"===l?(m=`${-o}px`,f=i?u:`${p}px`):"left"===l&&(m=`${r.floating.width+o}px`,f=i?u:`${p}px`),{data:{x:m,y:f}}}});function lF(e){let[t,n="center"]=e.split("-");return[t,n]}var lU=Symbol("radix.slottable");function lB(e){return eu.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===lU}var lz=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"});eu.forwardRef((e,t)=>(0,ec.jsx)(eU.span,{...e,ref:t,style:{...lz,...e.style}})).displayName="VisuallyHidden";var lH=[" ","Enter","ArrowUp","ArrowDown"],l$=[" ","Enter"],lG="Select",[lq,lW,lV]=om(lG),[lY,lK]=eI(lG,[lV,lS]),lX=lS(),[lZ,lQ]=lY(lG),[lJ,l0]=lY(lG),l1=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:i,value:s,defaultValue:o,onValueChange:l,dir:c,name:u,autoComplete:d,disabled:p,required:m,form:f}=e,h=lX(t),[g,b]=eu.useState(null),[y,E]=eu.useState(null),[x,v]=eu.useState(!1),T=sP(c),[S,_]=eM({prop:r,defaultProp:a??!1,onChange:i,caller:lG}),[k,w]=eM({prop:s,defaultProp:o,onChange:l,caller:lG}),A=eu.useRef(null),N=!g||f||!!g.closest("form"),[I,C]=eu.useState(new Set),R=Array.from(I).map(e=>e.props.value).join(";");return(0,ec.jsx)(lw,{...h,children:(0,ec.jsxs)(lZ,{required:m,scope:t,trigger:g,onTriggerChange:b,valueNode:y,onValueNodeChange:E,valueNodeHasChildren:x,onValueNodeHasChildrenChange:v,contentId:eD(),value:k,onValueChange:w,open:S,onOpenChange:_,dir:T,triggerPointerDownPosRef:A,disabled:p,children:[(0,ec.jsx)(lq.Provider,{scope:t,children:(0,ec.jsx)(lJ,{scope:e.__scopeSelect,onNativeOptionAdd:eu.useCallback(e=>{C(t=>new Set(t).add(e))},[]),onNativeOptionRemove:eu.useCallback(e=>{C(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),N?(0,ec.jsxs)(cR,{"aria-hidden":!0,required:m,tabIndex:-1,name:u,autoComplete:d,value:k,onChange:e=>w(e.target.value),disabled:p,form:f,children:[void 0===k?(0,ec.jsx)("option",{value:""}):null,Array.from(I)]},R):null]})})};l1.displayName=lG;var l2="SelectTrigger",l3=eu.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...a}=e,i=lX(n),s=lQ(l2,n),o=s.disabled||r,l=eN(t,s.onTriggerChange),c=lW(n),u=eu.useRef("touch"),[d,p,m]=cD(e=>{let t=c().filter(e=>!e.disabled),n=t.find(e=>e.value===s.value),r=cL(t,e,n);void 0!==r&&s.onValueChange(r.value)}),f=e=>{o||(s.onOpenChange(!0),m()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,ec.jsx)(lN,{asChild:!0,...i,children:(0,ec.jsx)(eU.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:o,"data-disabled":o?"":void 0,"data-placeholder":cO(s.value)?"":void 0,...a,ref:l,onClick:ek(a.onClick,e=>{e.currentTarget.focus(),"mouse"!==u.current&&f(e)}),onPointerDown:ek(a.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(f(e),e.preventDefault())}),onKeyDown:ek(a.onKeyDown,e=>{let t=""!==d.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||p(e.key),(!t||" "!==e.key)&&lH.includes(e.key)&&(f(),e.preventDefault())})})})});l3.displayName=l2;var l4="SelectValue",l5=eu.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:a,children:i,placeholder:s="",...o}=e,l=lQ(l4,n),{onValueNodeHasChildrenChange:c}=l,u=void 0!==i,d=eN(t,l.onValueNodeChange);return eC(()=>{c(u)},[c,u]),(0,ec.jsx)(eU.span,{...o,ref:d,style:{pointerEvents:"none"},children:cO(l.value)?(0,ec.jsx)(ec.Fragment,{children:s}):i})});l5.displayName=l4;var l6=eu.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...a}=e;return(0,ec.jsx)(eU.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})});l6.displayName="SelectIcon";var l9=e=>(0,ec.jsx)(e2,{asChild:!0,...e});l9.displayName="SelectPortal";var l8="SelectContent",l7=eu.forwardRef((e,t)=>{let n=lQ(l8,e.__scopeSelect),[r,a]=eu.useState();return(eC(()=>{a(new DocumentFragment)},[]),n.open)?(0,ec.jsx)(cr,{...e,ref:t}):r?eP.createPortal((0,ec.jsx)(ce,{scope:e.__scopeSelect,children:(0,ec.jsx)(lq.Slot,{scope:e.__scopeSelect,children:(0,ec.jsx)("div",{children:e.children})})}),r):null});l7.displayName=l8;var[ce,ct]=lY(l8),cn=((E=eu.forwardRef((e,t)=>{let{children:n,...r}=e;if(eu.isValidElement(n)){var a;let e,i,s=(a=n,(i=(e=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.ref:(i=(e=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.props.ref:a.props.ref||a.ref),o=function(e,t){let n={...t};for(let r in t){let a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...e)=>{let t=i(...e);return a(...e),t}:a&&(n[r]=a):"style"===r?n[r]={...a,...i}:"className"===r&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==eu.Fragment&&(o.ref=t?eA(t,s):s),eu.cloneElement(n,o)}return eu.Children.count(n)>1?eu.Children.only(null):null})).displayName="SelectContent.RemoveScroll.SlotClone",d=E,(p=eu.forwardRef((e,t)=>{let{children:n,...r}=e,a=eu.Children.toArray(n),i=a.find(lB);if(i){let e=i.props.children,n=a.map(t=>t!==i?t:eu.Children.count(e)>1?eu.Children.only(null):eu.isValidElement(e)?e.props.children:null);return(0,ec.jsx)(d,{...r,ref:t,children:eu.isValidElement(e)?eu.cloneElement(e,void 0,n):null})}return(0,ec.jsx)(d,{...r,ref:t,children:n})})).displayName="SelectContent.RemoveScroll.Slot",p),cr=eu.forwardRef((e,t)=>{let{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:i,onPointerDownOutside:s,side:o,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:p,collisionPadding:m,sticky:f,hideWhenDetached:h,avoidCollisions:g,...b}=e,y=lQ(l8,n),[E,x]=eu.useState(null),[v,T]=eu.useState(null),S=eN(t,e=>x(e)),[_,k]=eu.useState(null),[w,A]=eu.useState(null),N=lW(n),[I,C]=eu.useState(!1),R=eu.useRef(!1);eu.useEffect(()=>{if(E)return t$(E)},[E]),e6();let O=eu.useCallback(e=>{let[t,...n]=N().map(e=>e.ref.current),[r]=n.slice(-1),a=document.activeElement;for(let n of e)if(n===a||(n?.scrollIntoView({block:"nearest"}),n===t&&v&&(v.scrollTop=0),n===r&&v&&(v.scrollTop=v.scrollHeight),n?.focus(),document.activeElement!==a))return},[N,v]),D=eu.useCallback(()=>O([_,E]),[O,_,E]);eu.useEffect(()=>{I&&D()},[I,D]);let{onOpenChange:L,triggerPointerDownPosRef:M}=y;eu.useEffect(()=>{if(E){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(M.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(M.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():E.contains(n.target)||L(!1),document.removeEventListener("pointermove",t),M.current=null};return null!==M.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[E,L,M]),eu.useEffect(()=>{let e=()=>L(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[L]);let[P,j]=cD(e=>{let t=N().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=cL(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),F=eu.useCallback((e,t,n)=>{let r=!R.current&&!n;(void 0!==y.value&&y.value===t||r)&&(k(e),r&&(R.current=!0))},[y.value]),U=eu.useCallback(()=>E?.focus(),[E]),B=eu.useCallback((e,t,n)=>{let r=!R.current&&!n;(void 0!==y.value&&y.value===t||r)&&A(e)},[y.value]),z="popper"===r?ci:ca,H=z===ci?{side:o,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:p,collisionPadding:m,sticky:f,hideWhenDetached:h,avoidCollisions:g}:{};return(0,ec.jsx)(ce,{scope:n,content:E,viewport:v,onViewportChange:T,itemRefCallback:F,selectedItem:_,onItemLeave:U,itemTextRefCallback:B,focusSelectedItem:D,selectedItemText:w,position:r,isPositioned:I,searchRef:P,children:(0,ec.jsx)(tP,{as:cn,allowPinchZoom:!0,children:(0,ec.jsx)(eX,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:ek(a,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,ec.jsx)(eG,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:(0,ec.jsx)(z,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:e=>e.preventDefault(),...b,...H,onPlaced:()=>C(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:ek(b.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||j(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=N().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>O(t)),e.preventDefault()}})})})})})})});cr.displayName="SelectContentImpl";var ca=eu.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...a}=e,i=lQ(l8,n),s=ct(l8,n),[o,l]=eu.useState(null),[c,u]=eu.useState(null),d=eN(t,e=>u(e)),p=lW(n),m=eu.useRef(!1),f=eu.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:b,focusSelectedItem:y}=s,E=eu.useCallback(()=>{if(i.trigger&&i.valueNode&&o&&c&&h&&g&&b){let e=i.trigger.getBoundingClientRect(),t=c.getBoundingClientRect(),n=i.valueNode.getBoundingClientRect(),a=b.getBoundingClientRect();if("rtl"!==i.dir){let r=a.left-t.left,i=n.left-r,s=e.left-i,l=e.width+s,c=Math.max(l,t.width),u=sj(i,[10,Math.max(10,window.innerWidth-10-c)]);o.style.minWidth=l+"px",o.style.left=u+"px"}else{let r=t.right-a.right,i=window.innerWidth-n.right-r,s=window.innerWidth-e.right-i,l=e.width+s,c=Math.max(l,t.width),u=sj(i,[10,Math.max(10,window.innerWidth-10-c)]);o.style.minWidth=l+"px",o.style.right=u+"px"}let s=p(),l=window.innerHeight-20,u=h.scrollHeight,d=window.getComputedStyle(c),f=parseInt(d.borderTopWidth,10),y=parseInt(d.paddingTop,10),E=parseInt(d.borderBottomWidth,10),x=f+y+u+parseInt(d.paddingBottom,10)+E,v=Math.min(5*g.offsetHeight,x),T=window.getComputedStyle(h),S=parseInt(T.paddingTop,10),_=parseInt(T.paddingBottom,10),k=e.top+e.height/2-10,w=g.offsetHeight/2,A=f+y+(g.offsetTop+w);if(A<=k){let e=s.length>0&&g===s[s.length-1].ref.current;o.style.bottom="0px";let t=Math.max(l-k,w+(e?_:0)+(c.clientHeight-h.offsetTop-h.offsetHeight)+E);o.style.height=A+t+"px"}else{let e=s.length>0&&g===s[0].ref.current;o.style.top="0px";let t=Math.max(k,f+h.offsetTop+(e?S:0)+w);o.style.height=t+(x-A)+"px",h.scrollTop=A-k+h.offsetTop}o.style.margin="10px 0",o.style.minHeight=v+"px",o.style.maxHeight=l+"px",r?.(),requestAnimationFrame(()=>m.current=!0)}},[p,i.trigger,i.valueNode,o,c,h,g,b,i.dir,r]);eC(()=>E(),[E]);let[x,v]=eu.useState();eC(()=>{c&&v(window.getComputedStyle(c).zIndex)},[c]);let T=eu.useCallback(e=>{e&&!0===f.current&&(E(),y?.(),f.current=!1)},[E,y]);return(0,ec.jsx)(cs,{scope:n,contentWrapper:o,shouldExpandOnScrollRef:m,onScrollButtonChange:T,children:(0,ec.jsx)("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:x},children:(0,ec.jsx)(eU.div,{...a,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});ca.displayName="SelectItemAlignedPosition";var ci=eu.forwardRef((e,t)=>{let{__scopeSelect:n,align:r="start",collisionPadding:a=10,...i}=e,s=lX(n);return(0,ec.jsx)(lO,{...s,...i,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});ci.displayName="SelectPopperPosition";var[cs,co]=lY(l8,{}),cl="SelectViewport",cc=eu.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...a}=e,i=ct(cl,n),s=co(cl,n),o=eN(t,i.onViewportChange),l=eu.useRef(0);return(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),(0,ec.jsx)(lq.Slot,{scope:n,children:(0,ec.jsx)(eU.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:o,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:ek(a.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=s;if(r?.current&&n){let e=Math.abs(l.current-t.scrollTop);if(e>0){let r=window.innerHeight-20,a=Math.max(parseFloat(n.style.minHeight),parseFloat(n.style.height));if(a<r){let i=a+e,s=Math.min(r,i),o=i-s;n.style.height=s+"px","0px"===n.style.bottom&&(t.scrollTop=o>0?o:0,n.style.justifyContent="flex-end")}}}l.current=t.scrollTop})})})]})});cc.displayName=cl;var cu="SelectGroup",[cd,cp]=lY(cu),cm=eu.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,a=eD();return(0,ec.jsx)(cd,{scope:n,id:a,children:(0,ec.jsx)(eU.div,{role:"group","aria-labelledby":a,...r,ref:t})})});cm.displayName=cu;var cf="SelectLabel",ch=eu.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,a=cp(cf,n);return(0,ec.jsx)(eU.div,{id:a.id,...r,ref:t})});ch.displayName=cf;var cg="SelectItem",[cb,cy]=lY(cg),cE=eu.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:a=!1,textValue:i,...s}=e,o=lQ(cg,n),l=ct(cg,n),c=o.value===r,[u,d]=eu.useState(i??""),[p,m]=eu.useState(!1),f=eN(t,e=>l.itemRefCallback?.(e,r,a)),h=eD(),g=eu.useRef("touch"),b=()=>{a||(o.onValueChange(r),o.onOpenChange(!1))};if(""===r)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,ec.jsx)(cb,{scope:n,value:r,disabled:a,textId:h,isSelected:c,onItemTextChange:eu.useCallback(e=>{d(t=>t||(e?.textContent??"").trim())},[]),children:(0,ec.jsx)(lq.ItemSlot,{scope:n,value:r,disabled:a,textValue:u,children:(0,ec.jsx)(eU.div,{role:"option","aria-labelledby":h,"data-highlighted":p?"":void 0,"aria-selected":c&&p,"data-state":c?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...s,ref:f,onFocus:ek(s.onFocus,()=>m(!0)),onBlur:ek(s.onBlur,()=>m(!1)),onClick:ek(s.onClick,()=>{"mouse"!==g.current&&b()}),onPointerUp:ek(s.onPointerUp,()=>{"mouse"===g.current&&b()}),onPointerDown:ek(s.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:ek(s.onPointerMove,e=>{g.current=e.pointerType,a?l.onItemLeave?.():"mouse"===g.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ek(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:ek(s.onKeyDown,e=>{(l.searchRef?.current===""||" "!==e.key)&&(l$.includes(e.key)&&b()," "===e.key&&e.preventDefault())})})})})});cE.displayName=cg;var cx="SelectItemText",cv=eu.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:a,...i}=e,s=lQ(cx,n),o=ct(cx,n),l=cy(cx,n),c=l0(cx,n),[u,d]=eu.useState(null),p=eN(t,e=>d(e),l.onItemTextChange,e=>o.itemTextRefCallback?.(e,l.value,l.disabled)),m=u?.textContent,f=eu.useMemo(()=>(0,ec.jsx)("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=c;return eC(()=>(h(f),()=>g(f)),[h,g,f]),(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)(eU.span,{id:l.textId,...i,ref:p}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?eP.createPortal(i.children,s.valueNode):null]})});cv.displayName=cx;var cT="SelectItemIndicator",cS=eu.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return cy(cT,n).isSelected?(0,ec.jsx)(eU.span,{"aria-hidden":!0,...r,ref:t}):null});cS.displayName=cT;var c_="SelectScrollUpButton",ck=eu.forwardRef((e,t)=>{let n=ct(c_,e.__scopeSelect),r=co(c_,e.__scopeSelect),[a,i]=eu.useState(!1),s=eN(t,r.onScrollButtonChange);return eC(()=>{if(n.viewport&&n.isPositioned){let e=function(){i(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),a?(0,ec.jsx)(cN,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});ck.displayName=c_;var cw="SelectScrollDownButton",cA=eu.forwardRef((e,t)=>{let n=ct(cw,e.__scopeSelect),r=co(cw,e.__scopeSelect),[a,i]=eu.useState(!1),s=eN(t,r.onScrollButtonChange);return eC(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;i(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),a?(0,ec.jsx)(cN,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});cA.displayName=cw;var cN=eu.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...a}=e,i=ct("SelectScrollButton",n),s=eu.useRef(null),o=lW(n),l=eu.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return eu.useEffect(()=>()=>l(),[l]),eC(()=>{let e=o().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[o]),(0,ec.jsx)(eU.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:ek(a.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(r,50))}),onPointerMove:ek(a.onPointerMove,()=>{i.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(r,50))}),onPointerLeave:ek(a.onPointerLeave,()=>{l()})})}),cI=eu.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,ec.jsx)(eU.div,{"aria-hidden":!0,...r,ref:t})});cI.displayName="SelectSeparator";var cC="SelectArrow";eu.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,a=lX(n),i=lQ(cC,n),s=ct(cC,n);return i.open&&"popper"===s.position?(0,ec.jsx)(lM,{...a,...r,ref:t}):null}).displayName=cC;var cR=eu.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let a,i=eu.useRef(null),s=eN(r,i),o=(a=eu.useRef({value:t,previous:t}),eu.useMemo(()=>(a.current.value!==t&&(a.current.previous=a.current.value,a.current.value=t),a.current.previous),[t]));return eu.useEffect(()=>{let e=i.current;if(!e)return;let n=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(o!==t&&n){let r=new Event("change",{bubbles:!0});n.call(e,t),e.dispatchEvent(r)}},[o,t]),(0,ec.jsx)(eU.select,{...n,style:{...lz,...n.style},ref:s,defaultValue:t})});function cO(e){return""===e||void 0===e}function cD(e){let t=ez(e),n=eu.useRef(""),r=eu.useRef(0),a=eu.useCallback(e=>{let a=n.current+e;t(a),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout(()=>e(""),1e3))}(a)},[t]),i=eu.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return eu.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,i]}function cL(e,t,n){var r,a;let i=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,s=n?e.indexOf(n):-1,o=(r=e,a=Math.max(s,0),r.map((e,t)=>r[(a+t)%r.length]));1===i.length&&(o=o.filter(e=>e!==n));let l=o.find(e=>e.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}cR.displayName="SelectBubbleInput";let cM=ny("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),cP=ny("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),cj=ny("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),cF=eu.forwardRef(({className:e,children:t,...n},r)=>(0,ec.jsxs)(l3,{ref:r,className:n6("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-muted-foreground [&>span]:line-clamp-1",e),...n,children:[t,(0,ec.jsx)(l6,{asChild:!0,children:(0,ec.jsx)(cP,{className:"h-4 w-4 opacity-50"})})]}));cF.displayName=l3.displayName;let cU=eu.forwardRef(({className:e,...t},n)=>(0,ec.jsx)(ck,{ref:n,className:n6("flex cursor-default items-center justify-center py-1",e),...t,children:(0,ec.jsx)(cj,{className:"h-4 w-4"})}));cU.displayName=ck.displayName;let cB=eu.forwardRef(({className:e,...t},n)=>(0,ec.jsx)(cA,{ref:n,className:n6("flex cursor-default items-center justify-center py-1",e),...t,children:(0,ec.jsx)(cP,{className:"h-4 w-4"})}));cB.displayName=cA.displayName;let cz=eu.forwardRef(({className:e,children:t,position:n="popper",...r},a)=>(0,ec.jsx)(l9,{children:(0,ec.jsxs)(l7,{ref:a,className:n6("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] origin-[--radix-select-content-transform-origin] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[(0,ec.jsx)(cU,{}),(0,ec.jsx)(cc,{className:n6("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),(0,ec.jsx)(cB,{})]})}));cz.displayName=l7.displayName;let cH=eu.forwardRef(({className:e,...t},n)=>(0,ec.jsx)(ch,{ref:n,className:n6("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));cH.displayName=ch.displayName;let c$=eu.forwardRef(({className:e,children:t,...n},r)=>(0,ec.jsxs)(cE,{ref:r,className:n6("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[(0,ec.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,ec.jsx)(cS,{children:(0,ec.jsx)(cM,{className:"h-4 w-4"})})}),(0,ec.jsx)(cv,{children:t})]}));c$.displayName=cE.displayName;let cG=eu.forwardRef(({className:e,...t},n)=>(0,ec.jsx)(cI,{ref:n,className:n6("-mx-1 my-1 h-px bg-muted",e),...t}));function cq(e,t=new Date){if(!Number.isFinite(e.getTime()))return"—";let n=cW(e,t);return"today"===n?new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).format(e):"yesterday"===n?"Yesterday":"week"===n?new Intl.DateTimeFormat(void 0,{weekday:"long"}).format(e):new Intl.DateTimeFormat(void 0,{month:"2-digit",day:"2-digit"}).format(e)}function cW(e,t){if(!Number.isFinite(e.getTime())||!Number.isFinite(t.getTime()))return"older";let n=e=>Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),r=Math.floor((n(t)-n(e))/864e5);return r<=0?"today":1===r?"yesterday":r<7?"week":"older"}cG.displayName=cI.displayName;var cV=e.i(802239);e.s(["ERROR_REVALIDATE_EVENT",0,3,"FOCUS_EVENT",0,0,"MUTATE_EVENT",0,2,"RECONNECT_EVENT",0,1],211671);var cY=Object.prototype.hasOwnProperty;let cK=new WeakMap,cX=()=>{},cZ=cX(),cQ=Object,cJ=e=>e===cZ,c0=(e,t)=>({...e,...t}),c1={},c2={},c3="undefined",c4=typeof window!=c3,c5=typeof document!=c3,c6=c4&&"Deno"in window,c9=(e,t)=>{let n=cK.get(e);return[()=>!cJ(t)&&e.get(t)||c1,r=>{if(!cJ(t)){let a=e.get(t);t in c2||(c2[t]=a),n[5](t,c0(a,r),a||c1)}},n[6],()=>!cJ(t)&&t in c2?c2[t]:!cJ(t)&&e.get(t)||c1]},c8=!0,[c7,ue]=c4&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[cX,cX],ut={initFocus:e=>(c5&&document.addEventListener("visibilitychange",e),c7("focus",e),()=>{c5&&document.removeEventListener("visibilitychange",e),ue("focus",e)}),initReconnect:e=>{let t=()=>{c8=!0,e()},n=()=>{c8=!1};return c7("online",t),c7("offline",n),()=>{ue("online",t),ue("offline",n)}}},un=!eu.default.useId,ur=!c4||c6,ua=ur?eu.useEffect:eu.useLayoutEffect,ui="u">typeof navigator&&navigator.connection,us=!ur&&ui&&(["slow-2g","2g"].includes(ui.effectiveType)||ui.saveData),uo=new WeakMap,ul=(e,t)=>e===`[object ${t}]`,uc=0,uu=e=>{let t,n,r=typeof e,a=cQ.prototype.toString.call(e),i=ul(a,"Date"),s=ul(a,"RegExp"),o=ul(a,"Object");if(cQ(e)!==e||i||s)t=i?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=uo.get(e))return t;if(t=++uc+"~",uo.set(e,t),Array.isArray(e)){for(n=0,t="@";n<e.length;n++)t+=uu(e[n])+",";uo.set(e,t)}if(o){t="#";let r=cQ.keys(e).sort();for(;!cJ(n=r.pop());)cJ(e[n])||(t+=n+":"+uu(e[n])+",");uo.set(e,t)}}return t},ud=e=>{if("function"==typeof e)try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?uu(e):"",t]},up=0,um=()=>++up;async function uf(...e){let[t,n,r,a]=e,i=c0({populateCache:!0,throwOnError:!0},"boolean"==typeof a?{revalidate:a}:a||{}),s=i.populateCache,o=i.rollbackOnError,l=i.optimisticData,c=i.throwOnError;if("function"==typeof n){let e=[];for(let r of t.keys())!/^\$(inf|sub)\$/.test(r)&&n(t.get(r)._k)&&e.push(r);return Promise.all(e.map(u))}return u(n);async function u(n){let a,[u]=ud(n);if(!u)return;let[d,p]=c9(t,u),[m,f,h,g]=cK.get(t),b=()=>{let e=m[u];return("function"==typeof i.revalidate?i.revalidate(d().data,n):!1!==i.revalidate)&&(delete h[u],delete g[u],e&&e[0])?e[0](2).then(()=>d().data):d().data};if(e.length<3)return b();let y=r,E=!1,x=um();f[u]=[x,0];let v=!cJ(l),T=d(),S=T.data,_=T._c,k=cJ(_)?S:_;if(v&&p({data:l="function"==typeof l?l(k,S):l,_c:k}),"function"==typeof y)try{y=y(k)}catch(e){a=e,E=!0}if(y&&"function"==typeof y.then){let e;if(y=await y.catch(e=>{a=e,E=!0}),x!==f[u][0]){if(E)throw a;return y}E&&v&&(e=a,"function"==typeof o?o(e):!1!==o)&&(s=!0,p({data:k,_c:cZ}))}if(s&&!E&&("function"==typeof s?p({data:s(y,k),error:cZ,_c:cZ}):p({data:y,error:cZ,_c:cZ})),f[u][1]=um(),Promise.resolve(b()).then(()=>{p({_c:cZ})}),E){if(c)throw a;return}return y}}let uh=(e,t)=>{for(let n in e)e[n][0]&&e[n][0](t)},ug=(e,t)=>{if(!cK.has(e)){let n=c0(ut,t),r=Object.create(null),a=uf.bind(cZ,e),i=cX,s=Object.create(null),o=(e,t)=>{let n=s[e]||[];return s[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},l=(t,n,r)=>{e.set(t,n);let a=s[t];if(a)for(let e of a)e(n,r)},c=()=>{if(!cK.has(e)&&(cK.set(e,[r,Object.create(null),Object.create(null),Object.create(null),a,l,o]),!ur)){let t=n.initFocus(setTimeout.bind(cZ,uh.bind(cZ,r,0))),a=n.initReconnect(setTimeout.bind(cZ,uh.bind(cZ,r,1)));i=()=>{t&&t(),a&&a(),cK.delete(e)}}};return c(),[e,a,c,i]}return[e,cK.get(e)[4]]},[ub,uy]=ug(new Map),uE=c0({onLoadingSlow:cX,onSuccess:cX,onError:cX,onErrorRetry:(e,t,n,r,a)=>{let i=n.errorRetryCount,s=a.retryCount,o=~~((Math.random()+.5)*(1<<(s<8?s:8)))*n.errorRetryInterval;(cJ(i)||!(s>i))&&setTimeout(r,o,a)},onDiscarded:cX,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:us?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:us?5e3:3e3,compare:function e(t,n){var r,a;if(t===n)return!0;if(t&&n&&(r=t.constructor)===n.constructor){if(r===Date)return t.getTime()===n.getTime();if(r===RegExp)return t.toString()===n.toString();if(r===Array){if((a=t.length)===n.length)for(;a--&&e(t[a],n[a]););return -1===a}if(!r||"object"==typeof t){for(r in a=0,t)if(cY.call(t,r)&&++a&&!cY.call(n,r)||!(r in n)||!e(t[r],n[r]))return!1;return Object.keys(n).length===a}}return t!=t&&n!=n},isPaused:()=>!1,cache:ub,mutate:uy,fallback:{}},{isOnline:()=>c8,isVisible:()=>{let e=c5&&document.visibilityState;return cJ(e)||"hidden"!==e}}),ux=(e,t)=>{let n=c0(e,t);if(t){let{use:r,fallback:a}=e,{use:i,fallback:s}=t;r&&i&&(n.use=r.concat(i)),a&&s&&(n.fallback=c0(a,s))}return n},uv=(0,eu.createContext)({});var uT=e.i(211671);let uS="$inf$",u_=c4&&window.__SWR_DEVTOOLS_USE__,uk=u_?window.__SWR_DEVTOOLS_USE__:[],uw=e=>"function"==typeof e[1]?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],uA=uk.concat(e=>(t,n,r)=>{let a=n&&((...e)=>{let[r]=ud(t),[,,,a]=cK.get(ub);if(r.startsWith(uS))return n(...e);let i=a[r];return cJ(i)?n(...e):(delete a[r],i)});return e(t,a,r)});u_&&(window.__SWR_DEVTOOLS_REACT__=eu.default);let uN=()=>{},uI=uN(),uC=(new WeakMap,eu.default.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}})),uR={dedupe:!0},uO=Promise.resolve(cZ),uD=()=>cX;cQ.defineProperty(e=>{let{value:t}=e,n=(0,eu.useContext)(uv),r="function"==typeof t,a=(0,eu.useMemo)(()=>r?t(n):t,[r,n,t]),i=(0,eu.useMemo)(()=>r?a:ux(n,a),[r,n,a]),s=a&&a.provider,o=(0,eu.useRef)(cZ);s&&!o.current&&(o.current=ug(s(i.cache||ub),a));let l=o.current;return l&&(i.cache=l[0],i.mutate=l[1]),ua(()=>{if(l)return l[2]&&l[2](),l[3]},[]),(0,eu.createElement)(uv.Provider,c0(e,{value:i}))},"defaultValue",{value:uE});let uL=(m=(e,t,n)=>{let{cache:r,compare:a,suspense:i,fallbackData:s,revalidateOnMount:o,revalidateIfStale:l,refreshInterval:c,refreshWhenHidden:u,refreshWhenOffline:d,keepPreviousData:p,strictServerPrefetchWarning:m}=n,[f,h,g,b]=cK.get(r),[y,E]=ud(e),x=(0,eu.useRef)(!1),v=(0,eu.useRef)(!1),T=(0,eu.useRef)(y),S=(0,eu.useRef)(t),_=(0,eu.useRef)(n),k=()=>_.current.isVisible()&&_.current.isOnline(),[w,A,N,I]=c9(r,y),C=(0,eu.useRef)({}).current,R=cJ(s)?cJ(n.fallback)?cZ:n.fallback[y]:s,O=(e,t)=>{for(let n in C)if("data"===n){if(!a(e[n],t[n])&&(!cJ(e[n])||!a(z,t[n])))return!1}else if(t[n]!==e[n])return!1;return!0},D=!x.current,L=(0,eu.useMemo)(()=>{let e=w(),n=I(),r=e=>{let n=c0(e);return(delete n._k,(()=>{if(!y||!t||_.current.isPaused())return!1;if(D&&!cJ(o))return o;let e=cJ(R)?n.data:R;return cJ(e)||l})())?{isValidating:!0,isLoading:!0,...n}:n},a=r(e),i=e===n?a:r(n),s=a;return[()=>{let e=r(w());return O(e,s)?(s.data=e.data,s.isLoading=e.isLoading,s.isValidating=e.isValidating,s.error=e.error,s):(s=e,e)},()=>i]},[r,y]),M=(0,cV.useSyncExternalStore)((0,eu.useCallback)(e=>N(y,(t,n)=>{O(n,t)||e()}),[r,y]),L[0],L[1]),P=f[y]&&f[y].length>0,j=M.data,F=cJ(j)?R&&"function"==typeof R.then?uC(R):R:j,U=M.error,B=(0,eu.useRef)(F),z=p?cJ(j)?cJ(B.current)?F:B.current:j:F,H=y&&cJ(F),$=(0,eu.useRef)(null);ur||(0,cV.useSyncExternalStore)(uD,()=>($.current=!1,$),()=>($.current=!0,$));let G=$.current;m&&G&&!i&&H&&console.warn(`Missing pre-initiated data for serialized key "${y}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);let q=!(!y||!t||_.current.isPaused())&&(!P||!!cJ(U))&&(D&&!cJ(o)?o:i?!cJ(F)&&l:cJ(F)||l),W=D&&q,V=cJ(M.isValidating)?W:M.isValidating,Y=cJ(M.isLoading)?W:M.isLoading,K=(0,eu.useCallback)(async e=>{let t,r,i=S.current;if(!y||!i||v.current||_.current.isPaused())return!1;let s=!0,o=e||{},l=!g[y]||!o.dedupe,c=()=>un?!v.current&&y===T.current&&x.current:y===T.current,u={isValidating:!1,isLoading:!1},d=()=>{A(u)},p=()=>{let e=g[y];e&&e[1]===r&&delete g[y]},m={isValidating:!0};cJ(w().data)&&(m.isLoading=!0);try{if(l&&(A(m),n.loadingTimeout&&cJ(w().data)&&setTimeout(()=>{s&&c()&&_.current.onLoadingSlow(y,n)},n.loadingTimeout),g[y]=[i(E),um()]),[t,r]=g[y],t=await t,l&&setTimeout(p,n.dedupingInterval),!g[y]||g[y][1]!==r)return l&&c()&&_.current.onDiscarded(y),!1;u.error=cZ;let e=h[y];if(!cJ(e)&&(r<=e[0]||r<=e[1]||0===e[1]))return d(),l&&c()&&_.current.onDiscarded(y),!1;let o=w().data;u.data=a(o,t)?o:t,l&&c()&&_.current.onSuccess(t,y,n)}catch(n){p();let e=_.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(u.error=n,l&&c())&&(e.onError(n,y,e),(!0===t||"function"==typeof t&&t(n))&&(!_.current.revalidateOnFocus||!_.current.revalidateOnReconnect||k())&&e.onErrorRetry(n,y,e,e=>{let t=f[y];t&&t[0]&&t[0](uT.ERROR_REVALIDATE_EVENT,e)},{retryCount:(o.retryCount||0)+1,dedupe:!0}))}return s=!1,d(),!0},[y,r]),X=(0,eu.useCallback)((...e)=>uf(r,T.current,...e),[]);if(ua(()=>{S.current=t,_.current=n,cJ(j)||(B.current=j)}),ua(()=>{var e;let t;if(!y)return;let n=K.bind(cZ,uR),r=0;_.current.revalidateOnFocus&&(r=Date.now()+_.current.focusThrottleInterval);let a=(e=(e,t={})=>{if(e==uT.FOCUS_EVENT){let e=Date.now();_.current.revalidateOnFocus&&e>r&&k()&&(r=e+_.current.focusThrottleInterval,n())}else if(e==uT.RECONNECT_EVENT)_.current.revalidateOnReconnect&&k()&&n();else if(e==uT.MUTATE_EVENT)return K();else if(e==uT.ERROR_REVALIDATE_EVENT)return K(t)},(t=f[y]||(f[y]=[])).push(e),()=>{let n=t.indexOf(e);n>=0&&(t[n]=t[t.length-1],t.pop())});if(v.current=!1,T.current=y,x.current=!0,A({_k:E}),q&&!g[y])if(cJ(F)||ur)n();else c4&&typeof window.requestAnimationFrame!=c3?window.requestAnimationFrame(n):setTimeout(n,1);return()=>{v.current=!0,a()}},[y]),ua(()=>{let e;function t(){let t="function"==typeof c?c(w().data):c;t&&-1!==e&&(e=setTimeout(n,t))}function n(){!w().error&&(u||_.current.isVisible())&&(d||_.current.isOnline())?K(uR).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[c,u,d,y]),(0,eu.useDebugValue)(z),i){if(!un&&ur&&H)throw Error("Fallback data is required when using Suspense in SSR.");H&&(S.current=t,_.current=n,v.current=!1);let e=b[y];if(uC(!cJ(e)&&H?X(e):uO),!cJ(U)&&H)throw U;let r=H?K(uR):uO;!cJ(z)&&H&&(r.status="fulfilled",r.value=!0),uC(r)}return{mutate:X,get data(){return C.data=!0,z},get error(){return C.error=!0,U},get isValidating(){return C.isValidating=!0,V},get isLoading(){return C.isLoading=!0,Y}}},function(...e){let t,n=(t=(0,eu.useContext)(uv),(0,eu.useMemo)(()=>c0(uE,t),[t])),[r,a,i]=uw(e),s=ux(n,i),o=m,{use:l}=s,c=(l||[]).concat(uA);for(let e=c.length;e--;)o=c[e](o);return o(r,a||s.fetcher||null,s)}),uM=()=>{},uP=uM(),uj=Object,uF=e=>e===uP,uU=new WeakMap,uB=(e,t)=>e===`[object ${t}]`,uz=0,uH=e=>{let t,n,r=typeof e,a=uj.prototype.toString.call(e),i=uB(a,"Date"),s=uB(a,"RegExp"),o=uB(a,"Object");if(uj(e)!==e||i||s)t=i?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=uU.get(e))return t;if(t=++uz+"~",uU.set(e,t),Array.isArray(e)){for(n=0,t="@";n<e.length;n++)t+=uH(e[n])+",";uU.set(e,t)}if(o){t="#";let r=uj.keys(e).sort();for(;!uF(n=r.pop());)uF(e[n])||(t+=n+":"+uH(e[n])+",");uU.set(e,t)}}return t},u$=Promise.resolve(),uG=(f=e=>(t,n,r)=>{let a,i=(0,eu.useRef)(!1),{cache:s,initialSize:o=1,revalidateAll:l=!1,persistSize:c=!1,revalidateFirstPage:u=!0,revalidateOnMount:d=!1,parallel:p=!1}=r,[,,,m]=cK.get(ub);try{(a=(e=>{if("function"==typeof e)try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?uH(e):"",t]})(t?t(0,null):null)[0])&&(a=uS+a)}catch(e){}let[f,h,g]=c9(s,a),b=(0,eu.useCallback)(()=>cJ(f()._l)?o:f()._l,[s,a,o]);(0,cV.useSyncExternalStore)((0,eu.useCallback)(e=>a?g(a,()=>{e()}):()=>{},[s,a]),b,b);let y=(0,eu.useCallback)(()=>{let e=f()._l;return cJ(e)?o:e},[a,o]),E=(0,eu.useRef)(y());ua(()=>{if(!i.current){i.current=!0;return}a&&h({_l:c?E.current:y()})},[a,s]);let x=d&&!i.current,v=e(a,async e=>{let a=f()._i,i=f()._r;h({_r:cZ});let o=[],c=y(),[d]=c9(s,e),g=d().data,b=[],E=null;for(let e=0;e<c;++e){let[c,d]=ud(t(e,p?null:E));if(!c)break;let[f,h]=c9(s,c),y=f().data,v=l||a||cJ(y)||u&&!e&&!cJ(g)||x||g&&!cJ(g[e])&&!r.compare(g[e],y);if(n&&("function"==typeof i?i(y,d):v)){let t=async()=>{if(c in m){let e=m[c];delete m[c],y=await e}else y=await n(d);h({data:y,_k:d}),o[e]=y};p?b.push(t):await t()}else o[e]=y;p||(E=y)}return p&&await Promise.all(b.map(e=>e())),h({_i:cZ}),o},r),T=(0,eu.useCallback)(function(e,t){let n="boolean"==typeof t?{revalidate:t}:t||{},r=!1!==n.revalidate;return a?(r&&(cJ(e)?h({_i:!0,_r:n.revalidate}):h({_i:!1,_r:n.revalidate})),arguments.length?v.mutate(e,{...n,revalidate:r}):v.mutate()):u$},[a,s]),S=(0,eu.useCallback)(e=>{let n;if(!a)return u$;let[,r]=c9(s,a);if("function"==typeof e?n=e(y()):"number"==typeof e&&(n=e),"number"!=typeof n)return u$;r({_l:n}),E.current=n;let i=[],[o]=c9(s,a),l=null;for(let e=0;e<n;++e){let[n]=ud(t(e,l)),[r]=c9(s,n),a=n?r().data:cZ;if(cJ(a))return T(o().data);i.push(a),l=a}return T(i)},[a,s,T,y]);return{size:y(),setSize:S,mutate:T,get data(){return v.data},get error(){return v.error},get isValidating(){return v.isValidating},get isLoading(){return v.isLoading}}},(...e)=>{let[t,n,r]=uw(e),a=(r.use||[]).concat(f);return uL(t,n,{...r,use:a})});function uq(e){return"string"==typeof e&&e.trim().length>0}let uW="labels_state_updated_at";function uV(e,t,n){let r={};return t.autoTitle&&e.auto_title!==t.autoTitle&&(r.auto_title=t.autoTitle),t.preview&&e.preview!==t.preview&&(r.preview=t.preview),n&&e[uW]!==n&&(r[uW]=n),r}let uY=["pending","running"];async function uK(e,t){let n=(await Promise.allSettled(uY.map(n=>e.runs.list(t,{status:n,limit:100})))).flatMap(e=>"fulfilled"===e.status?e.value:[]).map(e=>e.run_id);await Promise.allSettled(n.map(n=>e.runs.cancel(t,n)))}let uX=new Map;async function uZ(e,t,n,r){try{let n=await e.threads.get(t),r=n.values,a=u5(r?.messages),i=n.metadata??{},s=n.state_updated_at||n.updated_at,o=uV(i,a,s);return Object.keys(o).length>0&&await e.threads.update(t,{metadata:{...i,...o}}),a}catch{return uX.get(n)===r&&uX.delete(n),null}}function uQ(e){let t=e.limit||20;return uG((n,r)=>{let a=e_(),i=a?.langsmithApiKey||el.default.env.NEXT_PUBLIC_LANGSMITH_API_KEY||"";return!a||r&&0===r.length?null:{kind:"threads",pageIndex:n,pageSize:t,deploymentUrl:a.deploymentUrl,assistantId:a.assistantId,apiKey:i,status:e?.status}},async({deploymentUrl:e,assistantId:t,apiKey:n,status:r,pageIndex:a,pageSize:i})=>{let s,o=ie(new aJ({apiUrl:e,defaultHeaders:n?{"X-Api-Key":n}:{}})),l={limit:i,offset:a*i,sortOrder:"desc",status:r,metadata:/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t)?{assistant_id:t}:{graph_id:t}},c=!1;try{s=await o.threads.search({...l,sortBy:"state_updated_at",select:["thread_id","updated_at","state_updated_at","status","metadata","interrupts"]})}catch{c=!0,s=await o.threads.search({...l,sortBy:"updated_at"})}return await Promise.all(s.map(async n=>{let r,a=n.metadata??{},i="string"==typeof a.title?a.title.trim():"",s="string"==typeof a.auto_title?a.auto_title.trim():"",l="string"==typeof a.preview?a.preview.trim():"",u=n.state_updated_at||n.updated_at;if(!(uq((r=a??{}).auto_title)&&uq(r.preview))&&(!u||r[uW]!==u))if(c){let e=u5(n.values?.messages);s=s||(e.autoTitle??""),l=l||(e.preview??"")}else{let t=`${e}\u0000${n.thread_id}`;if(uX.get(t)!==u){uX.set(t,u);let e=await uZ(o,n.thread_id,t,u);e&&(s=s||(e.autoTitle??""),l=l||(e.preview??""))}}let d=i||s;!d&&l&&(d=l),d||(d=`Thread ${n.thread_id.slice(0,8)}`),d.length>50&&(d=d.slice(0,50)+"…");let p=l.length>100?l.slice(0,100):l,m=!0===a.pinned,f=!1,h=n.interrupts;if(h&&"object"==typeof h){for(let e of Object.values(h))if(Array.isArray(e)){for(let t of e){let e=t?.value;if(e&&"ask_user"===e.type){f=!0;break}}if(f)break}}return{id:n.thread_id,updatedAt:new Date(u),status:n.status,title:d,description:p,assistantId:t,pinned:m,needsUserInput:f}}))},{revalidateFirstPage:!0,revalidateOnFocus:!0})}function uJ(){let e=e_();if(!e)return null;let t=e.langsmithApiKey||el.default.env.NEXT_PUBLIC_LANGSMITH_API_KEY||"";return ie(new aJ({apiUrl:e.deploymentUrl,defaultHeaders:t?{"X-Api-Key":t}:{}}))}async function u0(e){let t=uJ();if(!t)throw Error("No EvoScientist deployment configured.");await uK(t,e),await t.threads.delete(e)}async function u1(e,t,n){let r={...(await e.threads.get(t)).metadata??{},...n};await e.threads.update(t,{metadata:r})}async function u2(e,t){let n=uJ();if(!n)throw Error("No EvoScientist deployment configured.");await u1(n,e,{title:t})}async function u3(e,t){let n=uJ();if(!n)throw Error("No EvoScientist deployment configured.");await u1(n,e,{pinned:t})}async function u4(e,t){let n=uJ();if(!n)throw Error("No EvoScientist deployment configured.");await u1(n,e,{model_override:t})}function u5(e){let t=e=>"string"==typeof e?e:Array.isArray(e)?e.map(e=>{if(e&&"object"==typeof e){let t=e.text;return"string"==typeof t?t:""}return""}).join(""):"",n=Array.isArray(e)?e:[],r=null,a=null;for(let e of n)if(e&&"object"==typeof e){if(null===r&&"human"===e.type){let n=t(e.content).trim();n&&(r=n.slice(0,100))}if(null===a&&"ai"===e.type){let n=t(e.content).trim();n&&(a=n.slice(0,200))}if(null!==r&&null!==a)break}return{autoTitle:r,preview:a}}async function u6(e,t){let n=uJ();if(!n)return;let r=await n.threads.get(e),a=r.metadata??{},i=uV(a,t,r.state_updated_at||r.updated_at);0!==Object.keys(i).length&&await n.threads.update(e,{metadata:{...a,...i}})}async function u9(e,t){let n=uJ();if(!n)throw Error("No EvoScientist deployment configured.");let r=new Blob([JSON.stringify(await n.threads.get(e),null,2)],{type:"application/json"}),a=URL.createObjectURL(r),i=t&&t.replace(/[\\/:*?"<>|\u0000-\u001F]+/g,"").trim().replace(/\s+/g,"-").slice(0,80)||`thread-${e.slice(0,8)}`,s=document.createElement("a");s.href=a,s.download=`${i}.json`,document.body.appendChild(s),s.click(),s.remove(),setTimeout(()=>URL.revokeObjectURL(a),0)}let u8="evoscientist-memory-seen-at";function u7(e){try{localStorage.setItem(u8,String(e))}catch{}}let de="evoscientist-auto-approve",dt="__new__",dn="evo-auto-approve-change";function dr(){try{let e=localStorage.getItem(de);if(!e)return{};let t=JSON.parse(e);if(t&&"object"==typeof t&&!Array.isArray(t))return t}catch{}return{}}function da(e){try{localStorage.setItem(de,JSON.stringify(e))}catch{return}di+=1,window.dispatchEvent(new Event(dn))}let di=0;function ds(e){let t=t=>{(null===t.key||t.key===de)&&(di+=1,e())};return window.addEventListener(dn,e),window.addEventListener("storage",t),()=>{window.removeEventListener(dn,e),window.removeEventListener("storage",t)}}function dl(e){return!0===dr()[e??dt]}function dc(e,t){let n=dr(),r=e??dt;t?n[r]=!0:delete n[r],da(n)}var du="rovingFocusGroup.onEntryFocus",dd={bubbles:!1,cancelable:!0},dp="RovingFocusGroup",[dm,df,dh]=om(dp),[dg,db]=eI(dp,[dh]),[dy,dE]=dg(dp),dx=eu.forwardRef((e,t)=>(0,ec.jsx)(dm.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,ec.jsx)(dm.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,ec.jsx)(dv,{...e,ref:t})})}));dx.displayName=dp;var dv=eu.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:o,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...d}=e,p=eu.useRef(null),m=eN(t,p),f=sP(i),[h,g]=eM({prop:s,defaultProp:o??null,onChange:l,caller:dp}),[b,y]=eu.useState(!1),E=ez(c),x=df(n),v=eu.useRef(!1),[T,S]=eu.useState(0);return eu.useEffect(()=>{let e=p.current;if(e)return e.addEventListener(du,E),()=>e.removeEventListener(du,E)},[E]),(0,ec.jsx)(dy,{scope:n,orientation:r,dir:f,loop:a,currentTabStopId:h,onItemFocus:eu.useCallback(e=>g(e),[g]),onItemShiftTab:eu.useCallback(()=>y(!0),[]),onFocusableItemAdd:eu.useCallback(()=>S(e=>e+1),[]),onFocusableItemRemove:eu.useCallback(()=>S(e=>e-1),[]),children:(0,ec.jsx)(eU.div,{tabIndex:b||0===T?-1:0,"data-orientation":r,...d,ref:m,style:{outline:"none",...e.style},onMouseDown:ek(e.onMouseDown,()=>{v.current=!0}),onFocus:ek(e.onFocus,e=>{let t=!v.current;if(e.target===e.currentTarget&&t&&!b){let t=new CustomEvent(du,dd);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);dk([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}v.current=!1}),onBlur:ek(e.onBlur,()=>y(!1))})})}),dT="RovingFocusGroupItem",dS=eu.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:i,children:s,...o}=e,l=eD(),c=i||l,u=dE(dT,n),d=u.currentTabStopId===c,p=df(n),{onFocusableItemAdd:m,onFocusableItemRemove:f,currentTabStopId:h}=u;return eu.useEffect(()=>{if(r)return m(),()=>f()},[r,m,f]),(0,ec.jsx)(dm.ItemSlot,{scope:n,id:c,focusable:r,active:a,children:(0,ec.jsx)(eU.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...o,ref:t,onMouseDown:ek(e.onMouseDown,e=>{r?u.onItemFocus(c):e.preventDefault()}),onFocus:ek(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:ek(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,n){var r;let a=(r=e.key,"rtl"!==n?r:"ArrowLeft"===r?"ArrowRight":"ArrowRight"===r?"ArrowLeft":r);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(a))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(a)))return d_[a]}(e,u.orientation,u.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let a=p().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)a.reverse();else if("prev"===t||"next"===t){var n,r;"prev"===t&&a.reverse();let i=a.indexOf(e.currentTarget);a=u.loop?(n=a,r=i+1,n.map((e,t)=>n[(r+t)%n.length])):a.slice(i+1)}setTimeout(()=>dk(a))}}),children:"function"==typeof s?s({isCurrentTabStop:d,hasTabStop:null!=h}):s})})});dS.displayName=dT;var d_={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function dk(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}var dw=Symbol("radix.slottable");function dA(e){return eu.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===dw}var dN=["Enter"," "],dI=["ArrowUp","PageDown","End"],dC=["ArrowDown","PageUp","Home",...dI],dR={ltr:[...dN,"ArrowRight"],rtl:[...dN,"ArrowLeft"]},dO={ltr:["ArrowLeft"],rtl:["ArrowRight"]},dD="Menu",[dL,dM,dP]=om(dD),[dj,dF]=eI(dD,[dP,lS,db]),dU=lS(),dB=db(),[dz,dH]=dj(dD),[d$,dG]=dj(dD),dq=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:i,modal:s=!0}=e,o=dU(t),[l,c]=eu.useState(null),u=eu.useRef(!1),d=ez(i),p=sP(a);return eu.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),(0,ec.jsx)(lw,{...o,children:(0,ec.jsx)(dz,{scope:t,open:n,onOpenChange:d,content:l,onContentChange:c,children:(0,ec.jsx)(d$,{scope:t,onClose:eu.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:p,modal:s,children:r})})})};dq.displayName=dD;var dW=eu.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,a=dU(n);return(0,ec.jsx)(lN,{...a,...r,ref:t})});dW.displayName="MenuAnchor";var dV="MenuPortal",[dY,dK]=dj(dV,{forceMount:void 0}),dX=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:a}=e,i=dH(dV,t);return(0,ec.jsx)(dY,{scope:t,forceMount:n,children:(0,ec.jsx)(e3,{present:n||i.open,children:(0,ec.jsx)(e2,{asChild:!0,container:a,children:r})})})};dX.displayName=dV;var dZ="MenuContent",[dQ,dJ]=dj(dZ),d0=eu.forwardRef((e,t)=>{let n=dK(dZ,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,i=dH(dZ,e.__scopeMenu),s=dG(dZ,e.__scopeMenu);return(0,ec.jsx)(dL.Provider,{scope:e.__scopeMenu,children:(0,ec.jsx)(e3,{present:r||i.open,children:(0,ec.jsx)(dL.Slot,{scope:e.__scopeMenu,children:s.modal?(0,ec.jsx)(d1,{...a,ref:t}):(0,ec.jsx)(d2,{...a,ref:t})})})})}),d1=eu.forwardRef((e,t)=>{let n=dH(dZ,e.__scopeMenu),r=eu.useRef(null),a=eN(t,r);return eu.useEffect(()=>{let e=r.current;if(e)return t$(e)},[]),(0,ec.jsx)(d4,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ek(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),d2=eu.forwardRef((e,t)=>{let n=dH(dZ,e.__scopeMenu);return(0,ec.jsx)(d4,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),d3=((x=eu.forwardRef((e,t)=>{let{children:n,...r}=e;if(eu.isValidElement(n)){var a;let e,i,s=(a=n,(i=(e=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.ref:(i=(e=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.props.ref:a.props.ref||a.ref),o=function(e,t){let n={...t};for(let r in t){let a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...e)=>{let t=i(...e);return a(...e),t}:a&&(n[r]=a):"style"===r?n[r]={...a,...i}:"className"===r&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==eu.Fragment&&(o.ref=t?eA(t,s):s),eu.cloneElement(n,o)}return eu.Children.count(n)>1?eu.Children.only(null):null})).displayName="MenuContent.ScrollLock.SlotClone",h=x,(g=eu.forwardRef((e,t)=>{let{children:n,...r}=e,a=eu.Children.toArray(n),i=a.find(dA);if(i){let e=i.props.children,n=a.map(t=>t!==i?t:eu.Children.count(e)>1?eu.Children.only(null):eu.isValidElement(e)?e.props.children:null);return(0,ec.jsx)(h,{...r,ref:t,children:eu.isValidElement(e)?eu.cloneElement(e,void 0,n):null})}return(0,ec.jsx)(h,{...r,ref:t,children:n})})).displayName="MenuContent.ScrollLock.Slot",g),d4=eu.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:o,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:p,onDismiss:m,disableOutsideScroll:f,...h}=e,g=dH(dZ,n),b=dG(dZ,n),y=dU(n),E=dB(n),x=dM(n),[v,T]=eu.useState(null),S=eu.useRef(null),_=eN(t,S,g.onContentChange),k=eu.useRef(0),w=eu.useRef(""),A=eu.useRef(0),N=eu.useRef(null),I=eu.useRef("right"),C=eu.useRef(0),R=f?tP:eu.Fragment;eu.useEffect(()=>()=>window.clearTimeout(k.current),[]),e6();let O=eu.useCallback(e=>{var t,n;return I.current===N.current?.side&&(t=e,!!(n=N.current?.area)&&function(e,t){let{x:n,y:r}=e,a=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){let s=t[e],o=t[i],l=s.x,c=s.y,u=o.x,d=o.y;c>r!=d>r&&n<(u-l)*(r-c)/(d-c)+l&&(a=!a)}return a}({x:t.clientX,y:t.clientY},n))},[]);return(0,ec.jsx)(dQ,{scope:n,searchRef:w,onItemEnter:eu.useCallback(e=>{O(e)&&e.preventDefault()},[O]),onItemLeave:eu.useCallback(e=>{O(e)||(S.current?.focus(),T(null))},[O]),onTriggerLeave:eu.useCallback(e=>{O(e)&&e.preventDefault()},[O]),pointerGraceTimerRef:A,onPointerGraceIntentChange:eu.useCallback(e=>{N.current=e},[]),children:(0,ec.jsx)(R,{...f?{as:d3,allowPinchZoom:!0}:void 0,children:(0,ec.jsx)(eX,{asChild:!0,trapped:a,onMountAutoFocus:ek(i,e=>{e.preventDefault(),S.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:(0,ec.jsx)(eG,{asChild:!0,disableOutsidePointerEvents:o,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:p,onDismiss:m,children:(0,ec.jsx)(dx,{asChild:!0,...E,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:v,onCurrentTabStopIdChange:T,onEntryFocus:ek(l,e=>{b.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,ec.jsx)(lO,{role:"menu","aria-orientation":"vertical","data-state":px(g.open),"data-radix-menu-content":"",dir:b.dir,...y,...h,ref:_,style:{outline:"none",...h.style},onKeyDown:ek(h.onKeyDown,e=>{let t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;if(t){var a;let t,i,s,o,l,c;"Tab"===e.key&&e.preventDefault(),!n&&r&&(a=e.key,t=w.current+a,i=x().filter(e=>!e.disabled),s=document.activeElement,o=i.find(e=>e.ref.current===s)?.textValue,l=function(e,t,n){var r;let a=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,s=(r=Math.max(i,0),e.map((t,n)=>e[(r+n)%e.length]));1===a.length&&(s=s.filter(e=>e!==n));let o=s.find(e=>e.toLowerCase().startsWith(a.toLowerCase()));return o!==n?o:void 0}(i.map(e=>e.textValue),t,o),c=i.find(e=>e.textValue===l)?.ref.current,function e(t){w.current=t,window.clearTimeout(k.current),""!==t&&(k.current=window.setTimeout(()=>e(""),1e3))}(t),c&&setTimeout(()=>c.focus()))}let i=S.current;if(e.target!==i||!dC.includes(e.key))return;e.preventDefault();let s=x().filter(e=>!e.disabled).map(e=>e.ref.current);dI.includes(e.key)&&s.reverse(),function(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}(s)}),onBlur:ek(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(k.current),w.current="")}),onPointerMove:ek(e.onPointerMove,pS(e=>{let t=e.target,n=C.current!==e.clientX;e.currentTarget.contains(t)&&n&&(I.current=e.clientX>C.current?"right":"left",C.current=e.clientX)}))})})})})})})});d0.displayName=dZ;var d5=eu.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,ec.jsx)(eU.div,{role:"group",...r,ref:t})});d5.displayName="MenuGroup";var d6=eu.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,ec.jsx)(eU.div,{...r,ref:t})});d6.displayName="MenuLabel";var d9="MenuItem",d8="menu.itemSelect",d7=eu.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...a}=e,i=eu.useRef(null),s=dG(d9,e.__scopeMenu),o=dJ(d9,e.__scopeMenu),l=eN(t,i),c=eu.useRef(!1);return(0,ec.jsx)(pe,{...a,ref:l,disabled:n,onClick:ek(e.onClick,()=>{let e=i.current;if(!n&&e){let t=new CustomEvent(d8,{bubbles:!0,cancelable:!0});e.addEventListener(d8,e=>r?.(e),{once:!0}),eB(e,t),t.defaultPrevented?c.current=!1:s.onClose()}}),onPointerDown:t=>{e.onPointerDown?.(t),c.current=!0},onPointerUp:ek(e.onPointerUp,e=>{c.current||e.currentTarget?.click()}),onKeyDown:ek(e.onKeyDown,e=>{let t=""!==o.searchRef.current;n||t&&" "===e.key||dN.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});d7.displayName=d9;var pe=eu.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:a,...i}=e,s=dJ(d9,n),o=dB(n),l=eu.useRef(null),c=eN(t,l),[u,d]=eu.useState(!1),[p,m]=eu.useState("");return eu.useEffect(()=>{let e=l.current;e&&m((e.textContent??"").trim())},[i.children]),(0,ec.jsx)(dL.ItemSlot,{scope:n,disabled:r,textValue:a??p,children:(0,ec.jsx)(dS,{asChild:!0,...o,focusable:!r,children:(0,ec.jsx)(eU.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:c,onPointerMove:ek(e.onPointerMove,pS(e=>{r?s.onItemLeave(e):(s.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ek(e.onPointerLeave,pS(e=>s.onItemLeave(e))),onFocus:ek(e.onFocus,()=>d(!0)),onBlur:ek(e.onBlur,()=>d(!1))})})})}),pt=eu.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...a}=e;return(0,ec.jsx)(pc,{scope:e.__scopeMenu,checked:n,children:(0,ec.jsx)(d7,{role:"menuitemcheckbox","aria-checked":pv(n)?"mixed":n,...a,ref:t,"data-state":pT(n),onSelect:ek(a.onSelect,()=>r?.(!!pv(n)||!n),{checkForDefaultPrevented:!1})})})});pt.displayName="MenuCheckboxItem";var pn="MenuRadioGroup",[pr,pa]=dj(pn,{value:void 0,onValueChange:()=>{}}),pi=eu.forwardRef((e,t)=>{let{value:n,onValueChange:r,...a}=e,i=ez(r);return(0,ec.jsx)(pr,{scope:e.__scopeMenu,value:n,onValueChange:i,children:(0,ec.jsx)(d5,{...a,ref:t})})});pi.displayName=pn;var ps="MenuRadioItem",po=eu.forwardRef((e,t)=>{let{value:n,...r}=e,a=pa(ps,e.__scopeMenu),i=n===a.value;return(0,ec.jsx)(pc,{scope:e.__scopeMenu,checked:i,children:(0,ec.jsx)(d7,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":pT(i),onSelect:ek(r.onSelect,()=>a.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});po.displayName=ps;var pl="MenuItemIndicator",[pc,pu]=dj(pl,{checked:!1}),pd=eu.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...a}=e,i=pu(pl,n);return(0,ec.jsx)(e3,{present:r||pv(i.checked)||!0===i.checked,children:(0,ec.jsx)(eU.span,{...a,ref:t,"data-state":pT(i.checked)})})});pd.displayName=pl;var pp=eu.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,ec.jsx)(eU.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});pp.displayName="MenuSeparator";var pm=eu.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,a=dU(n);return(0,ec.jsx)(lM,{...a,...r,ref:t})});pm.displayName="MenuArrow";var[pf,ph]=dj("MenuSub"),pg="MenuSubTrigger",pb=eu.forwardRef((e,t)=>{let n=dH(pg,e.__scopeMenu),r=dG(pg,e.__scopeMenu),a=ph(pg,e.__scopeMenu),i=dJ(pg,e.__scopeMenu),s=eu.useRef(null),{pointerGraceTimerRef:o,onPointerGraceIntentChange:l}=i,c={__scopeMenu:e.__scopeMenu},u=eu.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return eu.useEffect(()=>u,[u]),eu.useEffect(()=>{let e=o.current;return()=>{window.clearTimeout(e),l(null)}},[o,l]),(0,ec.jsx)(dW,{asChild:!0,...c,children:(0,ec.jsx)(pe,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":px(n.open),...e,ref:eA(t,a.onTriggerChange),onClick:t=>{e.onClick?.(t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ek(e.onPointerMove,pS(t=>{i.onItemEnter(t),!t.defaultPrevented&&(e.disabled||n.open||s.current||(i.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100)))})),onPointerLeave:ek(e.onPointerLeave,pS(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,a="right"===r,s=t[a?"left":"right"],l=t[a?"right":"left"];i.onPointerGraceIntentChange({area:[{x:e.clientX+(a?-5:5),y:e.clientY},{x:s,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:s,y:t.bottom}],side:r}),window.clearTimeout(o.current),o.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(e),e.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:ek(e.onKeyDown,t=>{let a=""!==i.searchRef.current;e.disabled||a&&" "===t.key||dR[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});pb.displayName=pg;var py="MenuSubContent",pE=eu.forwardRef((e,t)=>{let n=dK(dZ,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,i=dH(dZ,e.__scopeMenu),s=dG(dZ,e.__scopeMenu),o=ph(py,e.__scopeMenu),l=eu.useRef(null),c=eN(t,l);return(0,ec.jsx)(dL.Provider,{scope:e.__scopeMenu,children:(0,ec.jsx)(e3,{present:r||i.open,children:(0,ec.jsx)(dL.Slot,{scope:e.__scopeMenu,children:(0,ec.jsx)(d4,{id:o.contentId,"aria-labelledby":o.triggerId,...a,ref:c,align:"start",side:"rtl"===s.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&l.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:ek(e.onFocusOutside,e=>{e.target!==o.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:ek(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:ek(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=dO[s.dir].includes(e.key);t&&n&&(i.onOpenChange(!1),o.trigger?.focus(),e.preventDefault())})})})})})});function px(e){return e?"open":"closed"}function pv(e){return"indeterminate"===e}function pT(e){return pv(e)?"indeterminate":e?"checked":"unchecked"}function pS(e){return t=>"mouse"===t.pointerType?e(t):void 0}pE.displayName=py;var p_="DropdownMenu",[pk,pw]=eI(p_,[dF]),pA=dF(),[pN,pI]=pk(p_),pC=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:a,defaultOpen:i,onOpenChange:s,modal:o=!0}=e,l=pA(t),c=eu.useRef(null),[u,d]=eM({prop:a,defaultProp:i??!1,onChange:s,caller:p_});return(0,ec.jsx)(pN,{scope:t,triggerId:eD(),triggerRef:c,contentId:eD(),open:u,onOpenChange:d,onOpenToggle:eu.useCallback(()=>d(e=>!e),[d]),modal:o,children:(0,ec.jsx)(dq,{...l,open:u,onOpenChange:d,dir:r,modal:o,children:n})})};pC.displayName=p_;var pR="DropdownMenuTrigger",pO=eu.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,i=pI(pR,n),s=pA(n);return(0,ec.jsx)(dW,{asChild:!0,...s,children:(0,ec.jsx)(eU.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:eA(t,i.triggerRef),onPointerDown:ek(e.onPointerDown,e=>{!r&&0===e.button&&!1===e.ctrlKey&&(i.onOpenToggle(),i.open||e.preventDefault())}),onKeyDown:ek(e.onKeyDown,e=>{!r&&(["Enter"," "].includes(e.key)&&i.onOpenToggle(),"ArrowDown"===e.key&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});pO.displayName=pR;var pD=e=>{let{__scopeDropdownMenu:t,...n}=e,r=pA(t);return(0,ec.jsx)(dX,{...r,...n})};pD.displayName="DropdownMenuPortal";var pL="DropdownMenuContent",pM=eu.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,a=pI(pL,n),i=pA(n),s=eu.useRef(!1);return(0,ec.jsx)(d0,{id:a.contentId,"aria-labelledby":a.triggerId,...i,...r,ref:t,onCloseAutoFocus:ek(e.onCloseAutoFocus,e=>{s.current||a.triggerRef.current?.focus(),s.current=!1,e.preventDefault()}),onInteractOutside:ek(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;(!a.modal||r)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});pM.displayName=pL,eu.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,a=pA(n);return(0,ec.jsx)(d5,{...a,...r,ref:t})}).displayName="DropdownMenuGroup",eu.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,a=pA(n);return(0,ec.jsx)(d6,{...a,...r,ref:t})}).displayName="DropdownMenuLabel";var pP=eu.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,a=pA(n);return(0,ec.jsx)(d7,{...a,...r,ref:t})});pP.displayName="DropdownMenuItem",eu.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,a=pA(n);return(0,ec.jsx)(pt,{...a,...r,ref:t})}).displayName="DropdownMenuCheckboxItem",eu.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,a=pA(n);return(0,ec.jsx)(pi,{...a,...r,ref:t})}).displayName="DropdownMenuRadioGroup",eu.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,a=pA(n);return(0,ec.jsx)(po,{...a,...r,ref:t})}).displayName="DropdownMenuRadioItem",eu.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,a=pA(n);return(0,ec.jsx)(pd,{...a,...r,ref:t})}).displayName="DropdownMenuItemIndicator";var pj=eu.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,a=pA(n);return(0,ec.jsx)(pp,{...a,...r,ref:t})});pj.displayName="DropdownMenuSeparator",eu.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,a=pA(n);return(0,ec.jsx)(pm,{...a,...r,ref:t})}).displayName="DropdownMenuArrow",eu.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,a=pA(n);return(0,ec.jsx)(pb,{...a,...r,ref:t})}).displayName="DropdownMenuSubTrigger",eu.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,a=pA(n);return(0,ec.jsx)(pE,{...a,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})}).displayName="DropdownMenuSubContent";let pF=eu.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,ec.jsx)(pD,{children:(0,ec.jsx)(pM,{ref:r,sideOffset:t,className:n6("z-50 max-h-[--radix-dropdown-menu-content-available-height] min-w-[10rem] origin-[--radix-dropdown-menu-content-transform-origin] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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",e),...n})}));pF.displayName=pM.displayName;let pU=eu.forwardRef(({className:e,...t},n)=>(0,ec.jsx)(pP,{ref:n,className:n6("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));pU.displayName=pP.displayName;let pB=eu.forwardRef(({className:e,...t},n)=>(0,ec.jsx)(pj,{ref:n,className:n6("-mx-1 my-1 h-px bg-border",e),...t}));pB.displayName=pj.displayName;var pz=e.i(846696);let pH={interrupted:"Requiring Attention",today:"Today",yesterday:"Yesterday",week:"This Week",older:"Older"},p$={idle:"bg-green-500",busy:"bg-blue-500",interrupted:"bg-orange-500",error:"bg-red-600"},pG={idle:"Idle",busy:"Busy",interrupted:"Interrupted",error:"Error"};function pq(e){return p$[e]??"bg-gray-400"}function pW({status:e,label:t,badge:n}){return(0,ec.jsxs)("span",{className:"inline-flex items-center gap-2",children:[(0,ec.jsx)("span",{className:n6("inline-block size-2 rounded-full",pq(e))}),t,void 0!==n&&n>0&&(0,ec.jsx)("span",{className:"ml-1 inline-flex items-center justify-center rounded-full bg-red-600 px-1.5 py-0.5 text-xs font-bold leading-none text-white",children:n})]})}function pV({message:e}){return(0,ec.jsxs)("div",{className:"flex flex-col items-center justify-center p-8 text-center",children:[(0,ec.jsx)("p",{className:"text-sm text-red-600",children:"Failed to load research"}),(0,ec.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:e})]})}function pY(){return(0,ec.jsx)("div",{className:"space-y-2 p-4",children:Array.from({length:5}).map((e,t)=>(0,ec.jsx)(oc,{className:"h-16 w-full"},t))})}function pK(){return(0,ec.jsxs)("div",{className:"flex flex-col items-center justify-center p-8 text-center",children:[(0,ec.jsx)(sw,{className:"mb-2 h-12 w-12 text-gray-300"}),(0,ec.jsx)("p",{className:"text-sm text-muted-foreground",children:"No research yet"})]})}function pX({onThreadSelect:e,onClose:t,onNewChat:n,onMutateReady:r,onInterruptCountChange:a}){let[i,s]=ev("threadId"),[o,l]=ev("view"),{unseenCount:c,markSeen:u}=function(){let e=(void 0)??!0,t=(void 0)??15e3,[n,r]=(0,eu.useState)(0),[a,i]=(0,eu.useState)(0),s=(0,eu.useRef)(!0),o=(0,eu.useCallback)(async()=>{try{let e,t=await fetch("/api/memory",{cache:"no-store"});if(!t.ok)return;let n=await t.json();if(!s.current)return;let a=(n.entries??[]).map(e=>"number"==typeof e.mtime?e.mtime:0).filter(e=>e>0),o=a.length?Math.max(...a):0,l=(e=Number(localStorage.getItem(u8)),Number.isFinite(e)?e:0);0===l&&o>0&&(u7(o),l=o),r(o),i(a.filter(e=>e>l).length)}catch{}},[]),l=(0,eu.useCallback)(()=>{u7(n>0?n:Date.now()),i(0)},[n]);return(0,eu.useEffect)(()=>{if(s.current=!0,!e)return()=>{s.current=!1};o();let n=setInterval(()=>{document.hidden||o()},t);return()=>{s.current=!1,clearInterval(n)}},[o,e,t]),{unseenCount:a,latestMtime:n,markSeen:l,refresh:o}}(),[d,p]=(0,eu.useState)("all"),[m,f]=(0,eu.useState)(""),[h,g]=(0,eu.useState)(null),[b,y]=(0,eu.useState)(""),[E,x]=(0,eu.useState)(null),[v,T]=(0,eu.useState)(!1),[S,_]=(0,eu.useState)(()=>new Date),[k,w]=(0,eu.useState)(()=>new Set),[A,N]=(0,eu.useState)(()=>new Set),I=uQ({status:"all"===d?void 0:d,limit:20}),C=(0,eu.useMemo)(()=>{let e=new Set,t=[];for(let n of I.data?.flat()??[])e.has(n.id)||(e.add(n.id),t.push(n));return t},[I.data]),R=(0,eu.useMemo)(()=>{let e=m.trim().toLowerCase();return e?C.filter(t=>t.title.toLowerCase().includes(e)):C},[C,m]);(0,eu.useEffect)(()=>{let e=()=>_(new Date),t=window.setInterval(e,6e4);return window.addEventListener("focus",e),document.addEventListener("visibilitychange",e),()=>{window.clearInterval(t),window.removeEventListener("focus",e),document.removeEventListener("visibilitychange",e)}},[]);let O=I.size>0&&I.data?.[I.size-1]==null,D=I.data?.at(0)?.length===0,L=D||(I.data?.at(-1)?.length??0)<20,M=(0,eu.useMemo)(()=>R.filter(e=>e.pinned),[R]),P=(0,eu.useSyncExternalStore)(ds,()=>di,()=>0),j=(0,eu.useCallback)(e=>!!e.needsUserInput||"interrupted"===e.status&&!(e.id===i&&dl(e.id)),[i,P]),F=(0,eu.useMemo)(()=>{let e={interrupted:[],today:[],yesterday:[],week:[],older:[]};return R.forEach(t=>{if(!t.pinned){if(j(t))return void e.interrupted.push(t);e[cW(t.updatedAt,S)].push(t)}}),e},[R,S,j]),U=(0,eu.useMemo)(()=>C.filter(j).length,[C,j]),B=(0,eu.useRef)(r),z=(0,eu.useRef)(I.mutate);(0,eu.useEffect)(()=>{B.current=r},[r]),(0,eu.useEffect)(()=>{z.current=I.mutate},[I.mutate]);let H=(0,eu.useCallback)(()=>{z.current()},[]);(0,eu.useEffect)(()=>{B.current?.(H)},[]),(0,eu.useEffect)(()=>{a?.(U)},[U,a]);let $=(0,eu.useRef)(!1),G=(0,eu.useRef)(new Set),q=(0,eu.useRef)(new Set),W=(0,eu.useRef)(null),V=(0,eu.useRef)(!1),Y=(0,eu.useRef)(null),K=e=>{let t=Y.current;if(Y.current=null,null===t)return;let n=Array.from(document.querySelectorAll("[data-thread-actions]")).find(e=>e.dataset.threadActions===t);if(!n)return;let r="none"===getComputedStyle(n).display?n.parentElement?.querySelector("button"):n;r&&(e.preventDefault(),r.focus())},X=async()=>{if(!h||$.current)return;let e=b.trim();if(!e||e===h.title)return void g(null);$.current=!0,T(!0);try{await u2(h.id,e),g(null),H()}catch{pz.toast.error("Couldn't rename — try again.")}finally{$.current=!1,T(!1)}},Z=async()=>{if(E&&!$.current){$.current=!0,T(!0);try{await u0(E.id),i===E.id&&(n?n():(s(null),l(null))),V.current=!0,x(null),H()}catch{pz.toast.error("Couldn't delete — try again.")}finally{$.current=!1,T(!1)}}},Q=async e=>{if(!G.current.has(e.id)){G.current.add(e.id),w(t=>{let n=new Set(t);return n.add(e.id),n});try{await u3(e.id,!e.pinned),H()}catch{pz.toast.error(e.pinned?"Couldn't unpin — try again.":"Couldn't pin — try again.")}finally{G.current.delete(e.id),w(t=>{let n=new Set(t);return n.delete(e.id),n})}}},J=async e=>{if(!q.current.has(e.id)){q.current.add(e.id),N(t=>{let n=new Set(t);return n.add(e.id),n});try{await u9(e.id,e.title)}catch{pz.toast.error("Couldn't export — try again.")}finally{q.current.delete(e.id),N(t=>{let n=new Set(t);return n.delete(e.id),n})}}},ee=t=>{var n;let r=k.has(t.id),a=A.has(t.id);return(0,ec.jsxs)("div",{className:"group relative",children:[(0,ec.jsx)("button",{type:"button",onClick:()=>e(t.id),className:n6("grid w-full cursor-pointer items-center gap-2 rounded-md py-2 pl-2.5 pr-12 text-left transition-colors duration-200 md:pr-2.5 md:group-focus-within:pr-28 md:group-hover:pr-28","hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",i===t.id?"border border-primary bg-accent hover:bg-accent":"border border-transparent bg-transparent"),"aria-current":i===t.id,children:(0,ec.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,ec.jsxs)("div",{className:"mb-0.5 flex items-center justify-between gap-2",children:[(0,ec.jsxs)("h3",{className:"flex min-w-0 items-center gap-1.5 text-sm font-semibold",children:[t.pinned&&(0,ec.jsx)(sI,{className:"size-3 flex-shrink-0 text-[var(--brand)]","aria-hidden":"true"}),(0,ec.jsx)("span",{className:"truncate",children:t.title})]}),(0,ec.jsx)("span",{className:"ml-2 flex-shrink-0 text-xs tabular-nums text-muted-foreground",children:(0,ec.jsx)("time",{dateTime:t.updatedAt.toISOString(),title:Number.isFinite((n=t.updatedAt).getTime())?new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short",hourCycle:"h23"}).format(n):"Unknown time",children:cq(t.updatedAt,S)})})]}),(0,ec.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ec.jsx)("p",{className:"flex-1 truncate text-[13px] text-muted-foreground",children:t.description}),(0,ec.jsx)("div",{className:"ml-2 flex-shrink-0",children:(0,ec.jsx)("span",{role:"img","aria-label":`Status: ${pG[t.status]}`,title:`Status: ${pG[t.status]}`,className:n6("block h-2 w-2 rounded-full",pq(t.status))})})]})]})}),(0,ec.jsxs)(pC,{modal:!1,children:[(0,ec.jsx)(pO,{asChild:!0,children:(0,ec.jsx)("button",{type:"button","aria-label":`Actions for "${t.title}"`,"data-thread-actions":t.id,className:"absolute right-0.5 top-1/2 inline-flex size-11 -translate-y-1/2 items-center justify-center rounded-md text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring data-[state=open]:text-foreground md:hidden",children:(0,ec.jsx)(sA,{className:"size-4","aria-hidden":"true"})})}),(0,ec.jsxs)(pF,{align:"end",children:[(0,ec.jsxs)(pU,{className:"min-h-11",disabled:r,onSelect:()=>Q(t),children:[t.pinned?(0,ec.jsx)(sC,{"aria-hidden":"true"}):(0,ec.jsx)(sI,{"aria-hidden":"true"}),t.pinned?"Unpin":"Pin"]}),(0,ec.jsxs)(pU,{className:"min-h-11",onSelect:()=>{Y.current=t.id,g(t),y(t.title)},children:[(0,ec.jsx)(sN,{"aria-hidden":"true"}),"Rename"]}),(0,ec.jsxs)(pU,{className:"min-h-11",disabled:a,onSelect:()=>J(t),children:[(0,ec.jsx)(s_,{"aria-hidden":"true"}),"Export JSON"]}),(0,ec.jsx)(pB,{}),(0,ec.jsxs)(pU,{className:"min-h-11 text-destructive focus:bg-destructive/10 focus:text-destructive",onSelect:()=>{Y.current=t.id,x(t)},children:[(0,ec.jsx)(sL,{"aria-hidden":"true"}),"Delete"]})]})]}),(0,ec.jsxs)("div",{className:"absolute right-1.5 top-1.5 hidden items-center gap-0.5 rounded-md bg-accent/95 p-0.5 opacity-0 shadow-sm backdrop-blur-sm transition-opacity group-focus-within:opacity-100 group-hover:opacity-100 md:flex",children:[(0,ec.jsx)("button",{type:"button","aria-label":t.pinned?`Unpin "${t.title}"`:`Pin "${t.title}"`,title:t.pinned?"Unpin":"Pin",onClick:()=>Q(t),disabled:r,className:n6("rounded p-1 transition-colors hover:bg-background focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t.pinned?"text-[var(--brand)] hover:text-[var(--brand)]":"text-muted-foreground hover:text-foreground"),children:t.pinned?(0,ec.jsx)(sC,{className:"size-3.5","aria-hidden":"true"}):(0,ec.jsx)(sI,{className:"size-3.5","aria-hidden":"true"})}),(0,ec.jsx)("button",{type:"button","aria-label":`Rename "${t.title}"`,title:"Rename",onClick:()=>{g(t),y(t.title)},className:"rounded p-1 text-muted-foreground transition-colors hover:bg-background hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",children:(0,ec.jsx)(sN,{className:"size-3.5","aria-hidden":"true"})}),(0,ec.jsx)("button",{type:"button","aria-label":`Export "${t.title}" as JSON`,title:"Export JSON",onClick:()=>J(t),disabled:a,className:"rounded p-1 text-muted-foreground transition-colors hover:bg-background hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",children:a?(0,ec.jsx)(sk,{className:"size-3.5 animate-spin","aria-hidden":"true"}):(0,ec.jsx)(s_,{className:"size-3.5","aria-hidden":"true"})}),(0,ec.jsx)("button",{type:"button","aria-label":`Delete "${t.title}"`,title:"Delete",onClick:()=>x(t),className:"rounded p-1 text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive focus-visible:ring-2 focus-visible:ring-ring",children:(0,ec.jsx)(sL,{className:"size-3.5","aria-hidden":"true"})})]})]},t.id)};return(0,ec.jsxs)("div",{className:"absolute inset-0 flex flex-col",children:[(0,ec.jsxs)("button",{ref:W,type:"button",onClick:()=>{n?n():(s(null),l(null)),t?.()},className:"flex flex-shrink-0 items-center gap-2.5 border-b border-border px-3 py-3 text-left text-sm font-medium transition-colors hover:bg-accent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",children:[(0,ec.jsx)(is,{className:"size-4","aria-hidden":"true"}),"New Chat"]}),(0,ec.jsxs)("button",{type:"button",onClick:()=>{if("skills"===o){l(null),t?.();return}l("skills"),t?.()},className:n6("flex flex-shrink-0 items-center gap-2.5 border-b border-border px-3 py-3 text-left text-sm font-medium transition-colors hover:bg-accent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring","skills"===o&&"bg-accent"),children:[(0,ec.jsx)(sR,{className:"size-4","aria-hidden":"true"}),"Research Skills"]}),(0,ec.jsxs)("button",{type:"button",onClick:()=>{if("experts"===o){l(null),t?.();return}l("experts"),t?.()},className:n6("flex flex-shrink-0 items-center gap-2.5 border-b border-border px-3 py-3 text-left text-sm font-medium transition-colors hover:bg-accent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring","experts"===o&&"bg-accent"),children:[(0,ec.jsx)(sO,{className:"size-4","aria-hidden":"true"}),"Experts"]}),(0,ec.jsxs)("button",{type:"button",onClick:()=>{if("memory"===o){l(null),t?.();return}u(),l("memory"),t?.()},className:n6("flex flex-shrink-0 items-center gap-2.5 border-b border-border px-3 py-3 text-left text-sm font-medium transition-colors hover:bg-accent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring","memory"===o&&"bg-accent"),children:[(0,ec.jsx)(sT,{className:"size-4","aria-hidden":"true"}),"EvoMemory","memory"!==o&&c>0&&(0,ec.jsx)("span",{className:"ml-auto inline-flex min-w-4 items-center justify-center rounded-full bg-[var(--brand-solid)] px-1 text-[10px] font-bold leading-none text-[var(--brand-foreground)]",title:`${c} memory file${1===c?"":"s"} updated since you last looked`,"aria-label":`${c} memory updates`,children:c})]}),(0,ec.jsxs)("button",{type:"button",onClick:()=>{if("schedule"===o){l(null),t?.();return}l("schedule"),t?.()},className:n6("flex flex-shrink-0 items-center gap-2.5 border-b border-border px-3 py-3 text-left text-sm font-medium transition-colors hover:bg-accent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring","schedule"===o&&"bg-accent"),children:[(0,ec.jsx)(sS,{className:"size-4","aria-hidden":"true"}),"Scheduled"]}),(0,ec.jsx)("div",{className:"flex-shrink-0 border-b border-border p-2.5",children:(0,ec.jsxs)("div",{className:"relative",children:[(0,ec.jsx)(sD,{className:"pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"}),(0,ec.jsx)("input",{type:"search",name:"research-search",value:m,onChange:e=>f(e.target.value),placeholder:"Search research…","aria-label":"Search research",autoComplete:"off",spellCheck:!1,className:"w-full rounded-md border border-border bg-background py-1.5 pl-8 pr-8 text-sm outline-none placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring"}),m&&(0,ec.jsx)("button",{type:"button","aria-label":"Clear research search",onClick:()=>f(""),className:"absolute right-1 top-1/2 -translate-y-1/2 rounded p-1 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",children:(0,ec.jsx)(nE,{className:"size-3.5","aria-hidden":"true"})})]})}),(0,ec.jsxs)("div",{className:"grid flex-shrink-0 grid-cols-[1fr_auto] items-center gap-2 border-b border-border px-3 py-2.5",children:[(0,ec.jsx)("h2",{className:"text-base font-semibold tracking-tight",children:"Recents"}),(0,ec.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ec.jsxs)(l1,{value:d,onValueChange:e=>p(e),children:[(0,ec.jsx)(cF,{className:"w-fit",children:(0,ec.jsx)(l5,{})}),(0,ec.jsxs)(cz,{align:"end",children:[(0,ec.jsx)(c$,{value:"all",children:"All"}),(0,ec.jsx)(cG,{}),(0,ec.jsxs)(cm,{children:[(0,ec.jsx)(cH,{children:"Active"}),(0,ec.jsx)(c$,{value:"idle",children:(0,ec.jsx)(pW,{status:"idle",label:"Idle"})}),(0,ec.jsx)(c$,{value:"busy",children:(0,ec.jsx)(pW,{status:"busy",label:"Busy"})})]}),(0,ec.jsx)(cG,{}),(0,ec.jsxs)(cm,{children:[(0,ec.jsx)(cH,{children:"Attention"}),(0,ec.jsx)(c$,{value:"interrupted",children:(0,ec.jsx)(pW,{status:"interrupted",label:"Interrupted",badge:U})}),(0,ec.jsx)(c$,{value:"error",children:(0,ec.jsx)(pW,{status:"error",label:"Error"})})]})]})]}),t&&(0,ec.jsx)("button",{type:"button","aria-label":o?"Close navigation":"Close research",onClick:t,className:"rounded-md p-2 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",children:(0,ec.jsx)(nE,{className:"size-4","aria-hidden":"true"})})]})]}),(0,ec.jsxs)(oo,{className:"h-0 flex-1",children:[I.error&&(0,ec.jsx)(pV,{message:I.error.message}),!I.error&&!I.data&&I.isLoading&&(0,ec.jsx)("div",{"aria-live":"polite",children:(0,ec.jsx)(pY,{})}),!I.error&&!I.isLoading&&D&&(0,ec.jsx)(pK,{}),!I.error&&!D&&m.trim()&&0===R.length&&(0,ec.jsx)("div",{className:"flex flex-col items-center justify-center p-8 text-center",children:(0,ec.jsx)("p",{className:"text-sm text-muted-foreground",children:"No research matches your search."})}),!I.error&&!D&&R.length>0&&(0,ec.jsxs)("div",{className:"box-border w-full max-w-full overflow-hidden p-1.5",children:[M.length>0&&(0,ec.jsxs)("div",{className:"mb-3",children:[(0,ec.jsx)("h4",{className:"m-0 px-2.5 py-1.5 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Research"}),(0,ec.jsx)("div",{className:"flex flex-col gap-1",children:M.map(e=>ee(e))})]}),Object.keys(pH).map(e=>{let t=F[e];return 0===t.length?null:(0,ec.jsxs)("div",{className:"mb-3",children:[(0,ec.jsx)("h4",{className:"m-0 px-2.5 py-1.5 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:pH[e]}),(0,ec.jsx)("div",{className:"flex flex-col gap-1",children:t.map(e=>ee(e))})]},e)}),!L&&(0,ec.jsx)("div",{className:"flex justify-center py-4",children:(0,ec.jsx)(rg,{variant:"outline",size:"sm",onClick:()=>I.setSize(I.size+1),disabled:O,children:O?(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)(sk,{className:"mr-2 h-4 w-4 animate-spin"}),"Loading…"]}):"Load More"})})]})]}),(0,ec.jsx)(n9,{open:null!==h,onOpenChange:e=>{e||v||g(null)},children:(0,ec.jsxs)(re,{className:"sm:max-w-md",onCloseAutoFocus:K,children:[(0,ec.jsxs)(rt,{children:[(0,ec.jsx)(rr,{children:"Rename research"}),(0,ec.jsx)(ra,{children:"Give this conversation a custom title."})]}),(0,ec.jsx)(rv,{autoFocus:!0,value:b,onChange:e=>y(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),X())},placeholder:"Enter a title…",maxLength:100,disabled:v}),(0,ec.jsxs)(rn,{children:[(0,ec.jsx)(rg,{variant:"outline",onClick:()=>g(null),disabled:v,children:"Cancel"}),(0,ec.jsx)(rg,{onClick:X,disabled:v||!b.trim(),children:v?"Saving…":"Save"})]})]})}),(0,ec.jsx)(n9,{open:null!==E,onOpenChange:e=>{e||v||x(null)},children:(0,ec.jsxs)(re,{className:"sm:max-w-md",onCloseAutoFocus:e=>{if(V.current){e.preventDefault(),V.current=!1,Y.current=null,W.current?.focus();return}K(e)},children:[(0,ec.jsxs)(rt,{children:[(0,ec.jsx)(rr,{children:"Delete this research?"}),(0,ec.jsxs)(ra,{children:["“",E?.title,"” will be permanently deleted. This can’t be undone."]})]}),(0,ec.jsxs)(rn,{children:[(0,ec.jsx)(rg,{variant:"outline",onClick:()=>x(null),disabled:v,children:"Cancel"}),(0,ec.jsx)(rg,{onClick:Z,disabled:v,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:v?"Deleting…":"Delete"})]})]})})]})}function pZ(e){let t=[],n=new Map;for(let t of e)"tool"===t.type&&n.set(t.tool_call_id,t);for(let a=0;a<e.length;a+=1){let i=e[a];if("ai"===i.type&&i.tool_calls&&i.tool_calls.length>0){let s=!1;for(let t=a+1;t<e.length;t+=1)if("ai"===e[t].type){s=!0;break}for(let e=0;e<i.tool_calls.length;e+=1){var r;let a=i.tool_calls[e],o=a.id,l=o?n.get(o):void 0;t.push({id:o??`${i.id??"unknown"}-${e}`,call:a,result:l,aiMessage:i,index:e,state:(r=s,l?"error"===l.status?"error":"completed":r?"completed":"pending")})}}}return t}let pQ=["task"];function pJ(e){return!!e&&("string"==typeof e?e.includes("tools:"):e.some(e=>e.startsWith("tools:")))}function p0(e){if(e&&0!==e.length){for(let t of e)if(t.startsWith("tools:"))return t.slice(6)}}var p1=class{subagents=new Map;namespaceToToolCallId=new Map;pendingMatches=new Map;pendingMessages=new Map;messageManagers=new Map;subagentToolNames;onSubagentChange;toMessage;constructor(e){this.subagentToolNames=new Set(e?.subagentToolNames??pQ),this.onSubagentChange=e?.onSubagentChange,this.toMessage=e?.toMessage??a_}getMessageManager(e){let t=this.messageManagers.get(e);return t||(t=new aS,this.messageManagers.set(e,t)),t}getMessagesForSubagent(e){let t=this.messageManagers.get(e);if(!t)return[];let n=[];for(let e of Object.values(t.chunks))e.chunk&&n.push(this.toMessage(e.chunk));return n}queuePendingMessage(e,t,n){let r=this.pendingMessages.get(e)??[];r.push({serialized:t,metadata:n}),this.pendingMessages.set(e,r)}flushPendingMessages(e){let t=this.pendingMessages.get(e);t?.length&&(this.pendingMessages.delete(e),t.forEach(({serialized:t,metadata:n})=>{this.addMessageToSubagent(e,t,n)}))}createSubagentStream(e){let{messages:t}=e,n=pZ(t);return{...e,isLoading:"running"===e.status,toolCalls:n,getToolCalls:e=>n.filter(t=>t.aiMessage.id===e.id),interrupt:void 0,interrupts:[],switchThread:()=>{},subagents:new Map,activeSubagents:[],getSubagent:()=>void 0,getSubagentsByType:()=>[],getSubagentsByMessage:()=>[]}}getToolCallIdFromNamespace(e){return this.namespaceToToolCallId.get(e)??e}matchSubgraphToSubagent(e,t){if(this.namespaceToToolCallId.has(e))return this.namespaceToToolCallId.get(e);let n=new Set(this.namespaceToToolCallId.values()),r=t=>{this.namespaceToToolCallId.set(e,t);let n=this.subagents.get(t);return n&&"pending"===n.status&&(this.subagents.set(t,{...n,status:"running",namespace:[e],startedAt:new Date}),this.onSubagentChange?.()),this.flushPendingMessages(e),t};for(let[e,a]of this.subagents)if(("pending"===a.status||"running"===a.status)&&!n.has(e)&&a.toolCall.args.description===t)return r(e);for(let[e,a]of this.subagents)if(("pending"===a.status||"running"===a.status)&&!n.has(e)){let n=a.toolCall.args.description||"";if(n&&t.includes(n)||n&&n.includes(t))return t.length>n.length&&this.subagents.set(e,{...a,toolCall:{...a.toolCall,args:{...a.toolCall.args,description:t}}}),r(e)}t&&this.pendingMatches.set(e,t)}isSubagentToolCall(e){return this.subagentToolNames.has(e)}isValidSubagentType(e){return!!e&&"string"==typeof e&&!(e.length<3)&&!!/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(e)&&!(e.length>50)}isValidSubagent(e){return this.isValidSubagentType(e.toolCall.args.subagent_type)}buildExecution(e){let t=this.getMessagesForSubagent(e.id),n=t.length>0?t:e.messages;return this.createSubagentStream({...e,messages:n})}getSubagents(){let e=new Map;for(let[t,n]of this.subagents)this.isValidSubagent(n)&&e.set(t,this.buildExecution(n));return e}getActiveSubagents(){return[...this.subagents.values()].filter(e=>"running"===e.status&&this.isValidSubagent(e)).map(e=>this.buildExecution(e))}getSubagent(e){let t=this.subagents.get(e);return t?this.buildExecution(t):void 0}getSubagentsByType(e){return[...this.subagents.values()].filter(t=>t.toolCall.args.subagent_type===e).map(e=>this.buildExecution(e))}getSubagentsByMessage(e){return[...this.subagents.values()].filter(t=>t.aiMessageId===e&&this.isValidSubagent(t)).map(e=>this.buildExecution(e))}parseArgs(e){if(!e)return{};if("string"==typeof e)try{return JSON.parse(e)}catch{return{}}return e}registerFromToolCalls(e,t){let n=!1;for(let r of e){if(!r.id||!this.isSubagentToolCall(r.name))continue;let e=this.parseArgs(r.args),a=this.isValidSubagentType(e.subagent_type),i=this.subagents.get(r.id);if(i){let a=e.subagent_type||"",s=i.toolCall.args.subagent_type||"",o=e.description||"",l=i.toolCall.args.description||"",c=this.isValidSubagentType(a)&&a.length>s.length,u=o.length>l.length,d=null!=t&&t!==i.aiMessageId;(c||u||d)&&(this.subagents.set(r.id,{...i,...d?{aiMessageId:t}:{},toolCall:{...i.toolCall,args:{...i.toolCall.args,...e,description:u?o:l,subagent_type:c?a:s}}}),n=!0);continue}if(!a)continue;let s={id:r.id,name:r.name,args:{description:e.description,subagent_type:e.subagent_type,...e}},o={id:r.id,toolCall:s,status:"pending",values:{},result:null,error:null,namespace:[],messages:[],aiMessageId:t??null,parentId:null,depth:0,startedAt:null,completedAt:null};this.subagents.set(r.id,o),this.getMessageManager(r.id),this.flushPendingMessages(r.id),n=!0}n&&(this.retryPendingMatches(),this.onSubagentChange?.())}retryPendingMatches(){if(0!==this.pendingMatches.size)for(let[e,t]of this.pendingMatches){if(this.namespaceToToolCallId.has(e)){this.pendingMatches.delete(e);continue}this.matchSubgraphToSubagent(e,t)&&this.pendingMatches.delete(e)}}markRunning(e,t){let n=this.subagents.get(e);if(!n)return;let r=t?.namespace??n.namespace;this.subagents.set(e,{...n,status:"running",namespace:r,parentId:n.parentId??function(e){if(!e||e.length<2)return null;let t=e.filter(e=>e.startsWith("tools:"));return t.length<2?null:t[t.length-2]?.slice(6)??null}(r)??null,depth:n.depth||(r?r.filter(e=>e.startsWith("tools:")).length:0),startedAt:n.startedAt??new Date}),this.onSubagentChange?.()}markRunningFromNamespace(e,t){let n=this.getToolCallIdFromNamespace(e);this.markRunning(n,{namespace:t})}addMessageToSubagent(e,t,n){"human"===t.type&&"string"==typeof t.content&&this.matchSubgraphToSubagent(e,t.content);let r=this.getToolCallIdFromNamespace(e),a=this.subagents.get(r);a?(this.getMessageManager(r).add(t,n)&&("ai"===t.type?this.subagents.set(r,{...a,status:"running",startedAt:a.startedAt??new Date,messages:this.getMessagesForSubagent(r)}):this.subagents.set(r,{...a,messages:this.getMessagesForSubagent(r)})),this.onSubagentChange?.()):this.queuePendingMessage(e,t,n)}updateSubagentValues(e,t){let n=this.getToolCallIdFromNamespace(e),r=this.subagents.get(n);r&&(this.subagents.set(n,{...r,values:t,status:"pending"===r.status?"running":r.status,startedAt:r.startedAt??new Date}),this.onSubagentChange?.())}complete(e,t,n="complete"){let r=this.subagents.get(e);r&&(this.subagents.set(e,{...r,status:n,result:"complete"===n?t:null,error:"error"===n?t:null,completedAt:new Date}),this.onSubagentChange?.())}clear(){this.subagents.clear(),this.namespaceToToolCallId.clear(),this.messageManagers.clear(),this.pendingMatches.clear(),this.pendingMessages.clear(),this.onSubagentChange?.()}processToolMessage(e,t,n="success"){this.subagents.get(e)&&this.complete(e,t,"success"===n?"complete":"error")}reconstructFromMessages(e,t){if(t?.skipIfPopulated&&this.subagents.size>0)return;let n=new Map;for(let t of e)if("tool"===t.type&&"tool_call_id"in t){let e=t.tool_call_id,r="string"==typeof t.content?t.content:JSON.stringify(t.content),a="status"in t&&"error"===t.status?"error":"success";n.set(e,{content:r,status:a})}let r=!1;for(let t of e)if("ai"===t.type&&"tool_calls"in t&&Array.isArray(t.tool_calls))for(let e of t.tool_calls){if(!e.id||!this.isSubagentToolCall(e.name)||this.subagents.has(e.id))continue;let a=this.parseArgs(e.args);if(!this.isValidSubagentType(a.subagent_type))continue;let i={id:e.id,name:e.name,args:{description:a.description,subagent_type:a.subagent_type,...a}},s=n.get(e.id),o=!!s,l=o?"error"===s.status?"error":"complete":"running",c={id:e.id,toolCall:i,status:l,values:{},result:o&&"complete"===l?s.content:null,error:o&&"error"===l?s.content:null,namespace:[],messages:[],aiMessageId:t.id??null,parentId:null,depth:0,startedAt:null,completedAt:o?new Date:null};this.subagents.set(e.id,c),r=!0}r&&this.onSubagentChange?.()}updateSubagentFromSubgraphState(e,t,n){let r=this.subagents.get(e);return!!r&&!(r.messages.length>0)&&0!==t.length&&(r.messages=t,null!=n&&(r.values=n),this.onSubagentChange?.(),!0)}hasSubagents(){return this.subagents.size>0}},p2=class{abortRef=new AbortController;messages;subagentManager;listeners=new Set;throttle;filterSubagentMessages;toMessage;queue=Promise.resolve();queueSize=0;state;constructor(e,t){this.messages=e,this.state={isLoading:!1,values:null,error:void 0,version:0},this.throttle=t.throttle,this.filterSubagentMessages=t.filterSubagentMessages??!1,this.toMessage=t.toMessage??a_,this.subagentManager=new p1({subagentToolNames:t.subagentToolNames,onSubagentChange:()=>this.bumpVersion(),toMessage:this.toMessage})}bumpVersion=()=>{this.state={...this.state,version:this.state.version+1},this.notifyListeners()};getSubagents(){return this.subagentManager.getSubagents()}getActiveSubagents(){return this.subagentManager.getActiveSubagents()}getSubagent(e){return this.subagentManager.getSubagent(e)}getSubagentsByType(e){return this.subagentManager.getSubagentsByType(e)}getSubagentsByMessage(e){return this.subagentManager.getSubagentsByMessage(e)}reconstructSubagents(e,t){this.subagentManager.reconstructFromMessages(e,t)}async fetchSubagentHistory(e,t,n){let r=n?.messagesKey??"messages",a=n?.signal;if(a?.aborted)return;let i=[...this.subagentManager.getSubagents().entries()].filter(([,e])=>0===e.messages.length);if(0===i.length)return;let s=new Map;try{let o=await e.getHistory(t,{limit:n?.historyLimit??20,signal:a});for(let e of o){let{tasks:t}=e;if(t&&0!==t.length)for(let e of t){if(!Array.isArray(e.path)||"__pregel_push"!==e.path[0]||"string"!=typeof e.id||"string"!=typeof e.name)continue;let t=e.result?.messages;if(Array.isArray(t))for(let n of t){let t=n;"tool"===t.type&&"string"==typeof t.tool_call_id&&i.some(([e])=>e===t.tool_call_id)&&!s.has(t.tool_call_id)&&s.set(t.tool_call_id,`${e.name}:${e.id}`)}}}let l=()=>i.some(([e])=>!s.has(e));if(l())for(let e of o){let t;if(!l())break;let{tasks:n}=e;if(!n||0===n.length)continue;let a=n.filter(e=>Array.isArray(e.path)&&"__pregel_push"===e.path[0]&&"number"==typeof e.path[1]&&"string"==typeof e.id&&"string"==typeof e.name);if(0===a.length)continue;let o=e.values[r];if(!Array.isArray(o))continue;for(let e=o.length-1;e>=0;e-=1){let n=o[e];if("ai"===n.type&&Array.isArray(n.tool_calls)&&n.tool_calls.length>0&&n.tool_calls.some(e=>this.subagentManager.isSubagentToolCall(e.name))){t=n;break}}if(!t)continue;let c=t.tool_calls.filter(e=>this.subagentManager.isSubagentToolCall(e.name));if(0===c.length)continue;let u=[...a].sort((e,t)=>(Array.isArray(e.path)?e.path[1]:0)-(Array.isArray(t.path)?t.path[1]:0));for(let e=0;e<u.length&&e<c.length;e+=1){let t=c[e],n=u[e];t?.id&&n.id&&n.name&&i.some(([e])=>e===t.id)&&!s.has(t.id)&&s.set(t.id,`${n.name}:${n.id}`)}}}catch{}await Promise.all(i.map(async([n,i])=>{let o=s.get(n)??(i.namespace.length>0?i.namespace.join("|"):void 0);if(o)try{let i=(await e.getHistory(t,{checkpoint:{checkpoint_ns:o},limit:1,signal:a}))[0];if(!i?.values)return;let s=i.values[r];if(!Array.isArray(s)||0===s.length)return;let l=s.map(e=>{if("ai"===e.type&&(!e.tool_calls||0===e.tool_calls.length)){let t=e.additional_kwargs?.tool_calls;if(Array.isArray(t)&&t.length>0)return{...e,tool_calls:t}}return e});this.subagentManager.updateSubagentFromSubgraphState(n,l,i.values)}catch{}}))}hasSubagents(){return this.subagentManager.hasSubagents()}setState=e=>{this.state={...this.state,...e},this.notifyListeners()};notifyListeners=()=>{this.listeners.forEach(e=>e())};subscribe=e=>{let t;if(!1===this.throttle)return this.listeners.add(e),()=>this.listeners.delete(e);let n=!0===this.throttle?0:this.throttle,r=()=>{clearTimeout(t),t=setTimeout(()=>{clearTimeout(t),e()},n)};return this.listeners.add(r),()=>{clearTimeout(t),this.listeners.delete(r)}};getSnapshot=()=>this.state;get isLoading(){return this.state.isLoading}get values(){return this.state.values?.[0]??null}get error(){return this.state.error}setStreamValues=(e,t="stream")=>{if("function"==typeof e){let[n,r]=this.state.values??[null,"stream"],a=e(n,r);this.setState({values:null!=a?[a,t]:null})}else this.setState({values:null!=e?[e,t]:null})};getMutateFn=(e,t)=>n=>{let r=(this.state.values??[null,"stream"])[0],a={...t,...r},i="function"==typeof n?n(a):n;this.setStreamValues({...a,...i},e)};matchEventType=(e,t,n)=>e===t||t.startsWith(`${e}|`);enqueue=async(e,t)=>{try{let n;this.queueSize=Math.max(0,this.queueSize-1),this.setState({isLoading:!0,error:void 0}),this.abortRef=new AbortController;let r=await e(this.abortRef.signal),a=!1;for await(let{event:e,data:i}of r){if("error"===e){n=new a4(i);break}let r=e.includes("|")?e.split("|").slice(1):void 0,s=this.getMutateFn("stream",t.initialValues);if("metadata"===e&&t.callbacks.onMetadataEvent?.(i),"events"===e&&t.callbacks.onLangChainEvent?.(i),this.matchEventType("updates",e,i)){if(t.callbacks.onUpdateEvent?.(i,{namespace:r,mutate:s}),r&&pJ(r)){let e=p0(r);e&&this.filterSubagentMessages&&this.subagentManager.markRunningFromNamespace(e,r)}if(!r||!pJ(r)){for(let e of Object.values(i))if(e&&"object"==typeof e&&"messages"in e){let{messages:t}=e;if(Array.isArray(t)){for(let e of t)if(e&&"object"==typeof e&&("ai"===e.type&&"tool_calls"in e&&Array.isArray(e.tool_calls)&&this.subagentManager.registerFromToolCalls(e.tool_calls,e.id),"tool"===e.type&&"tool_call_id"in e&&"string"==typeof e.tool_call_id)){let t="string"==typeof e.content?e.content:JSON.stringify(e.content),n="status"in e&&"error"===e.status?"error":"success";this.subagentManager.processToolMessage(e.tool_call_id,t,n)}}}}}if(this.matchEventType("custom",e,i)&&t.callbacks.onCustomEvent?.(i,{namespace:r,mutate:s}),this.matchEventType("checkpoints",e,i)&&t.callbacks.onCheckpointEvent?.(i,{namespace:r}),this.matchEventType("tasks",e,i)&&t.callbacks.onTaskEvent?.(i,{namespace:r}),this.matchEventType("debug",e,i)&&t.callbacks.onDebugEvent?.(i,{namespace:r}),this.matchEventType("tools",e,i)&&t.callbacks.onToolEvent?.(i,{namespace:r,mutate:s}),"values"===e||e.startsWith("values|"))if(r&&pJ(r)){let e=p0(r);if(e&&this.filterSubagentMessages){let t=i.messages;if(Array.isArray(t)&&t.length>0){let n=t[0];n?.type==="human"&&"string"==typeof n?.content&&this.subagentManager.matchSubgraphToSubagent(e,n.content)}this.subagentManager.updateSubagentValues(e,i)}}else if(a||(this.setStreamValues(e=>{if(e&&"__interrupt__"in e){let{__interrupt__:t,...n}=e;return n}return e}),a=!0),i&&"object"==typeof i&&"__interrupt__"in i){let e=i;this.setStreamValues(t=>{let n=t?.__interrupt__,r=e.__interrupt__;if(Array.isArray(r)){if(0===r.length)r=[];else if(Array.isArray(n)){let e=[...n],t=new Set(n.map(e=>e.id).filter(e=>null!=e));for(let n of r){if(null!=n.id){if(t.has(n.id))continue;t.add(n.id)}e.push(n)}r=e}}return{...t,__interrupt__:r}})}else this.setStreamValues(e=>e&&"__interrupt__"in e&&Array.isArray(e.__interrupt__)?{...i,__interrupt__:e.__interrupt__}:i);if(this.matchEventType("messages",e,i)){let[e,n]=i,a=r&&pJ(r)?r:void 0,s=n?.langgraph_checkpoint_ns||n?.checkpoint_ns,o=a??("string"==typeof s?s.split("|"):void 0),l=pJ(o),c=l?p0(o):void 0;if(this.filterSubagentMessages&&l&&c){this.subagentManager.addMessageToSubagent(c,e,n);continue}let u=this.messages.add(e,n);if(!u){console.warn("Failed to add message to manager, no message ID found");continue}this.setStreamValues(e=>{let n={...t.initialValues,...e},r=t.getMessages(n).slice(),{chunk:a,index:i}=this.messages.get(u,r.length)??{};if(!a||null==i)return n;if("remove"===a.getType())"__remove_all__"===a.id?r=[]:r.splice(i,1);else{let e=this.toMessage(a);if(r[i]=e,!l&&"ai"===e.type&&"tool_calls"in e&&Array.isArray(e.tool_calls)&&this.subagentManager.registerFromToolCalls(e.tool_calls,e.id),!l&&"tool"===e.type&&"tool_call_id"in e){let t=e.tool_call_id,n="string"==typeof e.content?e.content:JSON.stringify(e.content),r="status"in e&&"error"===e.status?"error":"success";this.subagentManager.processToolMessage(t,n,r)}}return t.setMessages(n,r)})}}if(null!=n)throw n;if(!this.abortRef.signal.aborted){let e=await t.onSuccess?.();void 0!==e&&0===this.queueSize&&this.setStreamValues(e)}}catch(e){e instanceof Error&&("AbortError"===e.name||"TimeoutError"===e.name)||(console.error(e),this.setState({error:e}),await t.onError?.(e))}finally{this.setState({isLoading:!1}),this.abortRef=new AbortController,t.onFinish?.()}};start=async(e,t,n)=>{n?.abortPrevious&&this.abortRef.abort(),this.queueSize+=1;let r=this.queue.then(()=>this.enqueue(e,t));this.queue=r,await r};stop=async(e,t)=>{this.abortRef.abort(),this.abortRef=new AbortController,t.onStop?.({mutate:this.getMutateFn("stop",e)})};clear=()=>{this.abortRef.abort(),this.abortRef=new AbortController,this.setState({error:void 0,values:null,isLoading:!1}),this.messages.clear(),this.subagentManager.clear()}};let p3=e=>{let[t,n]=(0,eu.useState)(e?.threadId??null),r=(0,eu.useRef)(e?.onThreadId);r.current=e?.onThreadId;let a=(0,eu.useCallback)(e=>{n(e),r.current?.(e)},[]);return e&&"threadId"in e?[e.threadId??null,a]:[t,a]};function p4(e){return"function"==typeof e&&e.length>0}async function*p5(e,t){for(;;){let{value:n,done:r}=await e.next();if(r)return n;t(n)&&(yield n)}}function p6(e,t,n){return[e["~configHash"],t,n].join(":")}function p9(e){let[t]=(0,eu.useState)("transport"in e);return t?function(e){let[t]=(0,eu.useState)(()=>new aS),[n]=(0,eu.useState)(()=>new p2(t,{throttle:e.throttle??!1,subagentToolNames:e.subagentToolNames,filterSubagentMessages:e.filterSubagentMessages}));(0,eu.useSyncExternalStore)(n.subscribe,n.getSnapshot,n.getSnapshot);let[r,a]=p3(e),i=(0,eu.useRef)(r);(0,eu.useEffect)(()=>{i.current!==r&&(i.current=r,n.clear())},[r,n]);let s=t=>{let n=e.messagesKey??"messages";return Array.isArray(t[n])?t[n]:[]},o=(t,n)=>{let r=e.messagesKey??"messages";return{...t,[r]:n}},l=e.initialValues??{},c=s(l),u=e.filterSubagentMessages&&!n.isLoading&&c.length>0;(0,eu.useEffect)(()=>{u&&n.reconstructSubagents(c,{skipIfPopulated:!0})},[u,c.length]);let d=async(t,c)=>{let u=r;n.setStreamValues(()=>c?.optimisticValues!=null?{...l,..."function"==typeof c.optimisticValues?c.optimisticValues(l):c.optimisticValues}:{...l}),await n.start(async n=>{if(u||(i.current=u=crypto.randomUUID(),a(u)),!u)throw Error("Failed to obtain valid thread ID.");return e.transport.stream({input:t,context:c?.context,command:c?.command,signal:n,config:{...c?.config,configurable:{thread_id:u,...c?.config?.configurable}}})},{getMessages:s,setMessages:o,initialValues:{},callbacks:e,onSuccess:()=>{if(!u)return;let t=n.values??l;e.onFinish?.({values:t,next:[],tasks:[],metadata:void 0,created_at:null,checkpoint:{thread_id:u,checkpoint_id:null,checkpoint_ns:"",checkpoint_map:null},parent_checkpoint:null},void 0)},onError(t){e.onError?.(t,void 0)}})},p=(0,eu.useRef)(new Set);return(0,eu.useEffect)(()=>{p.current.clear()},[r]),(0,eu.useEffect)(()=>{ad(n.values,e.tools,p.current,{onTool:e.onTool,defer:e=>{Promise.resolve().then(e)},resumeSubmit:e=>d(null,{command:e})})},[e.onTool,e.tools,n.values,d]),{get values(){return n.values??{}},error:n.error,isLoading:n.isLoading,stop:()=>n.stop(l,{onStop:e.onStop}),submit:d,get interrupts(){if(null!=n.values&&"__interrupt__"in n.values&&Array.isArray(n.values.__interrupt__))return a3(n.values.__interrupt__);return[]},get interrupt(){let e=this.interrupts;if(0===e.length)return;if(1===e.length)return e[0];return e},get messages(){if(!n.values)return[];return s(n.values)},get toolCalls(){if(!n.values)return[];return pZ(s(n.values))},getToolCalls:e=>n.values?pZ(s(n.values)).filter(t=>t.aiMessage.id===e.id):[],get subagents(){return n.getSubagents()},get activeSubagents(){return n.getActiveSubagents()},getSubagent:e=>n.getSubagent(e),getSubagentsByType:e=>n.getSubagentsByType(e),getSubagentsByMessage:e=>n.getSubagentsByMessage(e)}}(e):function(e){let t,n=(0,eu.useRef)(e.reconnectOnMount),r=(0,eu.useMemo)(()=>{if("u"<typeof window)return null;let e=n.current;return!0===e?window.sessionStorage:"function"==typeof e?e():null},[]),a=(0,eu.useMemo)(()=>e.client??new aJ({apiUrl:e.apiUrl,apiKey:e.apiKey,callerOptions:e.callerOptions,defaultHeaders:e.defaultHeaders}),[e.client,e.apiKey,e.apiUrl,e.callerOptions,e.defaultHeaders]),[i]=(0,eu.useState)(()=>new aS),[s]=(0,eu.useState)(()=>new p2(i,{throttle:e.throttle??!1,subagentToolNames:e.subagentToolNames,filterSubagentMessages:e.filterSubagentMessages}));(0,eu.useSyncExternalStore)(s.subscribe,s.getSnapshot,s.getSnapshot);let[o,l]=p3(e),c=(0,eu.useRef)([]),u=(0,eu.useCallback)((...e)=>{let t=c.current;for(let n of e)t.includes(n)||t.push(n)},[]),d=null!=e.onUpdateEvent,p=null!=e.onCustomEvent,m=null!=e.onLangChainEvent,f=null!=e.onDebugEvent,h=null!=e.onCheckpointEvent,g=null!=e.onTaskEvent,b=null!=e.onToolEvent,y=(0,eu.useMemo)(()=>{let e=[];return d&&e.push("updates"),p&&e.push("custom"),m&&e.push("events"),f&&e.push("debug"),h&&e.push("checkpoints"),g&&e.push("tasks"),b&&e.push("tools"),e},[d,p,m,f,h,g,b]),E=(0,eu.useRef)(o),x=(0,eu.useRef)(null);(0,eu.useEffect)(()=>{E.current!==o&&(E.current=o,s.clear())},[o,s]);let v=(0,eu.useCallback)(e=>{e!==E.current&&(E.current=e,s.clear(),l(e))},[s,l]),T="object"==typeof e.fetchStateHistory&&null!=e.fetchStateHistory?e.fetchStateHistory.limit??!1:e.fetchStateHistory??!1,S=function(e,t,n,r){let a=p6(e,t,n),[i,s]=(0,eu.useState)(()=>({key:void 0,data:void 0,error:void 0,isLoading:null!=t})),o=(0,eu.useRef)(e);o.current=e;let l=(0,eu.useRef)(r?.onError);l.current=r?.onError;let c=(0,eu.useCallback)((e,t)=>{if(r.passthrough)return Promise.resolve([]);let n=o.current,a=p6(n,e,t);return null!=e?(s(e=>e.key===a?{...e,isLoading:!0}:{key:a,data:void 0,error:void 0,isLoading:!0}),(function(e,t,n){if(n?.limit===!1)return e.threads.getState(t).then(e=>null==e.checkpoint?[]:[e]);let r="number"==typeof n?.limit?n.limit:10;return e.threads.getHistory(t,{limit:r})})(n,e,{limit:t}).then(e=>(s(t=>t.key!==a?t:{key:a,data:e,error:void 0,isLoading:!1}),e),e=>(s(t=>t.key!==a?t:{key:a,data:t.data,error:e,isLoading:!1}),l.current?.(e),Promise.reject(e)))):(s({key:a,data:void 0,error:void 0,isLoading:!1}),Promise.resolve([]))},[r.passthrough]);return(0,eu.useEffect)(()=>{(null==r.submittingRef.current||r.submittingRef.current!==t)&&c(t,n)},[c,a]),{data:i.data,error:i.error,isLoading:i.isLoading,mutate:e=>c(e??t,n)}}(a,o,T,{passthrough:null!=e.thread,submittingRef:x,onError:e.onError}),_=e.thread??S,k=t=>{let n=e.messagesKey??"messages";return Array.isArray(t[n])?t[n]:[]},w=(t,n)=>{let r=e.messagesKey??"messages";return{...t,[r]:n}},[A,N]=(0,eu.useState)(""),I=function(e,t){let{rootSequence:n,paths:r}=function(e){let t=new Set,n={};if(e.length<=1)return{rootSequence:{type:"sequence",items:e.map(e=>({type:"node",value:e,path:[]}))},paths:[]};e.forEach(e=>{let r=e.parent_checkpoint?.checkpoint_id??"$";n[r]??=[],n[r].push(e),e.checkpoint?.checkpoint_id!=null&&t.add(e.checkpoint.checkpoint_id)});let r=(...e)=>e.filter(e=>null!=e).sort((e,t)=>e.localeCompare(t)).at(-1),a=null==n.$?Object.keys(n).filter(e=>!t.has(e)).map(e=>{let t=[e],a=new Set,i=e;for(;t.length>0;){let e=t.shift();if(a.has(e))continue;a.add(e);let s=(n[e]??[]).flatMap(e=>e.checkpoint?.checkpoint_id??[]);i=r(i,...s),t.push(...s)}return{parentId:e,lastId:i}}).sort((e,t)=>e.lastId.localeCompare(t.lastId)).at(-1)?.parentId:void 0;null!=a&&(n.$=n[a]);let i={type:"sequence",items:[]},s=[{id:"$",sequence:i,path:[]}],o=[],l=new Set;for(;s.length>0;){let e,t=s.shift();if(l.has(t.id))continue;l.add(t.id);let r=n[t.id];if(null!=r&&0!==r.length)for(let n of(r.length>1&&(e={type:"fork",items:[]},t.sequence.items.push(e)),r)){let r=n.checkpoint?.checkpoint_id;if(null==r)continue;let{sequence:a}=t,{path:i}=t;null!=e&&(a={type:"sequence",items:[]},e.items.unshift(a),(i=i.slice()).push(r),o.push(i)),a.items.push({type:"node",value:n,path:i}),s.push({id:r,sequence:a,path:i})}}return{rootSequence:i,paths:o}}(t??[]),{history:a,branchByCheckpoint:i}=function(e,t,n){let r=n.split(">"),a={};for(let e of t){let t=e.at(-2)??"$";a[t]??=[],a[t].unshift(e)}let i=[],s={},o=r.slice(),l=[...e.items];for(;l.length>0;){let e=l.shift();if("node"===e.type){i.push(e.value);let t=e.value.checkpoint?.checkpoint_id;if(null==t)continue;s[t]={branch:e.path.join(">"),branchOptions:(e.path.length>0?a[e.path.at(-2)??"$"]??[]:[]).map(e=>e.join(">"))}}if("fork"===e.type){let t=o.shift(),n=null!=t?e.items.findIndex(e=>{let n=e.items.at(0);return!!n&&"node"===n.type&&n.value.checkpoint?.checkpoint_id===t}):-1,r=e.items.at(n)?.items??[];l.push(...r)}}return{history:i,branchByCheckpoint:s}}(n,r,e);return{branchTree:n,flatHistory:a,branchByCheckpoint:i,threadHead:a.at(-1)}}(A,_.data??void 0),[C,R]=(0,eu.useState)(new Map),O=(0,eu.useCallback)(e=>{R(t=>{let n=new Map(t),r=e.toolCallId??e.name,a=n.get(r);switch(e.event){case"on_tool_start":n.set(r,{toolCallId:e.toolCallId,name:e.name,state:"starting",input:e.input});break;case"on_tool_event":a&&n.set(r,{...a,state:"running",data:e.data});break;case"on_tool_end":a&&n.set(r,{...a,state:"completed",result:e.output});break;case"on_tool_error":a&&n.set(r,{...a,state:"error",error:e.error});break;default:throw Error(`Unexpected tool event: ${e.event}`)}return n})},[]),D=I.threadHead?.values??e.initialValues??{},L=k(D),M=e.filterSubagentMessages&&!s.isLoading&&!_.isLoading&&L.length>0;(0,eu.useEffect)(()=>{if(M&&(s.reconstructSubagents(L,{skipIfPopulated:!0}),!1!==T&&o)){let t=new AbortController;return s.fetchSubagentHistory(a.threads,o,{messagesKey:e.messagesKey??"messages",historyLimit:"number"==typeof T?T:void 0,signal:t.signal}),()=>t.abort()}},[M,L.length]);let P=(()=>{let e=I.threadHead?.tasks?.at(-1)?.error;if(null!=e){try{let t=JSON.parse(e);if(a4.isStructuredError(t))return new a4(t);return t}catch{}return e}})(),j=(t=new Set,k(D).map((e,n)=>{let r=e.id??n,a=function(e,t){for(let n=e.length-1;n>=0;n-=1)if(t(e[n]))return e[n]}(_.data??[],e=>null!=e.values&&k(e.values).map((e,t)=>e.id??t).includes(r)),i=a?.checkpoint?.checkpoint_id,s=null!=i?I.branchByCheckpoint[i]:void 0;s?.branch?.length||(s=void 0);let o=s?.branchOptions?.flat(2).join(",");return o&&(t.has(o)&&(s=void 0),t.add(o)),{messageId:r.toString(),firstSeenState:a,branch:s?.branch,branchOptions:s?.branchOptions}})),F=async(t,n)=>{let i,u;R(new Map);let d=n?.checkpoint?.checkpoint_id;N(null!=d?I.branchByCheckpoint[d]?.branch??"":"");let p=!0===T||"number"==typeof T,m=p||p4(e.onFinish),f=o,h=(n?.multitaskStrategy==="interrupt"||n?.multitaskStrategy==="rollback")&&s.isLoading;await s.start(async o=>{if(s.setStreamValues(e=>{let t={...D,...e};return n?.optimisticValues!=null?{...t,..."function"==typeof n.optimisticValues?n.optimisticValues(t):n.optimisticValues}:{...t}}),f||(E.current=f=(await a.threads.create({threadId:n?.threadId,metadata:n?.metadata,signal:o})).thread_id,x.current=f,l(f)),!f)throw Error("Failed to obtain valid thread ID.");x.current=f;let d=[...new Set([...n?.streamMode??[],...c.current,...y])],m=n?.checkpoint??(p?I.threadHead?.checkpoint:void 0)??void 0;n?.checkpoint===null&&(m=void 0),null!=m&&delete m.thread_id;let h=n?.streamResumable??!!r;return a.runs.stream(f,e.assistantId,{input:t,config:n?.config,context:n?.context,command:n?.command,interruptBefore:n?.interruptBefore,interruptAfter:n?.interruptAfter,metadata:n?.metadata,multitaskStrategy:n?.multitaskStrategy,onCompletion:n?.onCompletion,onDisconnect:n?.onDisconnect??(h?"continue":"cancel"),signal:o,checkpoint:m,streamMode:d,streamSubgraphs:n?.streamSubgraphs,streamResumable:h,durability:n?.durability,onRunCreated(t){i={run_id:t.run_id,thread_id:t.thread_id??f},r&&(u=`lg:stream:${f}`,r.setItem(u,i.run_id)),e.onCreated?.(i)}})},{getMessages:k,setMessages:w,initialValues:D,callbacks:{...e,onToolEvent:(t,n)=>{O(t),e.onToolEvent?.(t,n)}},async onSuccess(){if(u&&r?.removeItem(u),m){let t=(await _.mutate(f))?.at(0);if(t)return e.onFinish?.(t,i),null}else null==e.onFinish||p4(e.onFinish)||e.onFinish(void 0,i)},onError(t){e.onError?.(t,i)},onFinish(){x.current=null}},{abortPrevious:h})},U=async(t,n,i)=>{if(R(new Map),n??="-1",!o)return;let l={thread_id:o,run_id:t},c=!0===T||"number"==typeof T||p4(e.onFinish);await s.start(async e=>{x.current=o;let r=a.runs.joinStream(o,t,{signal:e,lastEventId:n,streamMode:i?.streamMode});return i?.filter!=null?p5(r,i.filter):r},{getMessages:k,setMessages:w,initialValues:D,callbacks:{...e,onToolEvent:(t,n)=>{O(t),e.onToolEvent?.(t,n)}},async onSuccess(){if(r?.removeItem(`lg:stream:${o}`),!c){null==e.onFinish||p4(e.onFinish)||e.onFinish(void 0,l);return}let t=(await _.mutate(o))?.at(0);t&&e.onFinish?.(t,l)},onError(t){e.onError?.(t,l)},onFinish(){x.current=null}})},B=(0,eu.useMemo)(()=>{if(!r||s.isLoading||"u"<typeof window)return;let e=r?.getItem(`lg:stream:${o}`);if(e)return{runId:e,threadId:o}},[r,s.isLoading,o]),z=!!r,H=(0,eu.useRef)({threadId:o,shouldReconnect:z}),$=(0,eu.useRef)(U);$.current=U,(0,eu.useEffect)(()=>{H.current.threadId!==o&&(H.current={threadId:o,shouldReconnect:z})},[o,z]),(0,eu.useEffect)(()=>{B&&H.current.shouldReconnect&&(H.current.shouldReconnect=!1,$.current?.(B.runId))},[B]);let G=s.error??P??_.error,q=s.values??D,W=(0,eu.useRef)(new Set);(0,eu.useEffect)(()=>{W.current.clear()},[o]),(0,eu.useEffect)(()=>{ad(q,e.tools,W.current,{onTool:e.onTool,defer:e=>{Promise.resolve().then(e)},resumeSubmit:e=>F(null,{multitaskStrategy:"interrupt",command:e})})},[e.onTool,e.tools,F,q]);let V={get values(){return u("values"),q},client:a,assistantId:e.assistantId,error:G,isLoading:s.isLoading,stop:()=>s.stop(D,{onStop:t=>{if(r&&o){let e=r.getItem(`lg:stream:${o}`);e&&a.runs.cancel(o,e),r.removeItem(`lg:stream:${o}`)}e.onStop?.(t)}}),submit:F,switchThread:v,joinStream:U,branch:A,setBranch:N,get history(){if(!1===T)throw Error("`fetchStateHistory` must be set to `true` to use `history`");return I.flatHistory},isThreadLoading:_.isLoading&&null==_.data,get experimental_branchTree(){if(!1===T)throw Error("`fetchStateHistory` must be set to `true` to use `experimental_branchTree`");return I.branchTree},get interrupts(){if(null!=q&&"__interrupt__"in q&&Array.isArray(q.__interrupt__))return a3(q.__interrupt__);if(s.isLoading)return[];let e=function(e){if(0===e.length)return null;let t=al(e);return 0===t.length?[]:a2(t)}((I.threadHead?.tasks??[]).flatMap(e=>e.interrupts??[]));if(null!=e)return e;if(!(I.threadHead?.next??[]).length||null!=G)return[];return[{when:"breakpoint"}]},get interrupt(){let e=this.interrupts;if(0===e.length)return;if(1===e.length)return e[0];return e},get messages(){return u("messages-tuple","values"),k(q)},get toolCalls(){return u("messages-tuple","values"),pZ(k(q))},get toolProgress(){return u("tools"),Array.from(C.values())},getToolCalls:e=>(u("messages-tuple","values"),pZ(k(q)).filter(t=>t.aiMessage.id===e.id)),getMessagesMetadata(e,t){u("values");let n=i.get(e.id)?.metadata,r=j?.find(n=>n.messageId===(e.id??t));if(null!=n||null!=r)return{...r,streamMetadata:n}},get subagents(){return u("updates","messages-tuple"),s.getSubagents()},get activeSubagents(){return u("updates","messages-tuple"),s.getActiveSubagents()},getSubagent:e=>(u("updates","messages-tuple"),s.getSubagent(e)),getSubagentsByType:e=>(u("updates","messages-tuple"),s.getSubagentsByType(e)),getSubagentsByMessage:e=>(u("updates","messages-tuple"),s.getSubagentsByMessage(e))};for(let e of["history","experimental_branchTree","toolProgress","subagents","activeSubagents"]){let t=Object.getOwnPropertyDescriptor(V,e);t?.get&&Object.defineProperty(V,e,{...t,enumerable:!1})}return V}(e)}var p8=e.i(614677);function p7(e,t=2){if("string"==typeof e)return e;if(void 0===e)return"undefined";try{let n=[];return JSON.stringify(e,function(e,t){if("bigint"==typeof t)return t.toString();if(t&&"object"==typeof t){for(;n.length>0&&n[n.length-1]!==this;)n.pop();if(n.includes(t))return"[Circular]";n.push(t)}return t},t)??String(e)}catch{return String(e)}}function me(e){return"string"==typeof e.content?e.content:Array.isArray(e.content)?e.content.filter(e=>"object"==typeof e&&null!==e&&"type"in e&&"text"===e.type||"string"==typeof e).map(e=>"string"==typeof e?e:"object"==typeof e&&null!==e&&"text"in e&&e.text||"").join(""):""}function mt(e){if("string"==typeof e)return e;if(e&&"object"==typeof e){let t=t=>{let n=e[t];return"string"==typeof n&&""!==n.trim()?n:null},n=t("description");if(null!==n)return n;let r=t("prompt");if(null!==r)return r;let a=t("result");if(null!==a)return a}return p7(e)}let mn=/[\p{Cc}\p{Bidi_Control}]/gu;function mr(e,t){return e.replace(mn," ").replace(/\s+/g," ").trim().slice(0,t)}function ma(e){return"running"!==e}function mi(e,t,n,r){let a=e[t];return{...e,[t]:{evalId:a?.evalId??t,dispatches:r,updatedAt:n}}}function ms(e){let t={total:0,finished:0,failed:0,cancelled:0,running:0};for(let n of e.dispatches)t.total+=1,"running"===n.status?t.running+=1:t.finished+=1,"error"===n.status&&(t.failed+=1),"cancelled"===n.status&&(t.cancelled+=1);return t}function mo(e,t){return e.durationMs??Math.max(0,t-e.startedAt)}function ml(e,t){if(0===e.dispatches.length)return 0;let n=Math.min(...e.dispatches.map(e=>e.startedAt));return e.dispatches.some(e=>"running"===e.status)?Math.max(0,t-n):Math.max(0,Math.max(...e.dispatches.map(e=>e.startedAt+mo(e,t)))-n)}function mc(e){let t=e/1e3;if(t<60)return`${t.toFixed(1)}s`;let n=Math.floor(t/60),r=Math.round(t%60);return`${n}m ${r}s`}function mu(e){let t={phaseCount:0,total:0,finished:0,failed:0,cancelled:0,running:0,runningLabel:null,activeEvalId:null},n=-1,r=-1,a=null;for(let[i,s]of Object.entries(e)){if(0===s.dispatches.length)continue;t.phaseCount+=1,s.updatedAt>r&&(r=s.updatedAt,a=i);let e=ms(s);for(let r of(t.total+=e.total,t.finished+=e.finished,t.failed+=e.failed,t.cancelled+=e.cancelled,t.running+=e.running,s.dispatches))"running"===r.status&&r.startedAt>n&&(n=r.startedAt,t.runningLabel=r.label,t.activeEvalId=i)}return t.activeEvalId||(t.activeEvalId=a),t}let md="evoscientist-dynamic-workflows",mp=new Set(["running","done","error","cancelled"]);function mm(){try{let e=localStorage.getItem(md);if(!e)return{};let t=JSON.parse(e);if(t&&"object"==typeof t&&!Array.isArray(t))return t}catch{try{localStorage.removeItem(md)}catch{}}return{}}function mf(e){try{localStorage.setItem(md,JSON.stringify(e))}catch{return}}function mh(e){return!!e&&"object"==typeof e&&"string"==typeof e.id&&"string"==typeof e.label&&"string"==typeof e.subagentType&&"string"==typeof e.description&&"number"==typeof e.startedAt&&Number.isFinite(e.startedAt)&&"string"==typeof e.status&&mp.has(e.status)&&(void 0===e.durationMs||"number"==typeof e.durationMs&&Number.isFinite(e.durationMs)&&e.durationMs>=0)&&(void 0===e.error||"string"==typeof e.error)}function mg(e,t){let n={};for(let[e,r]of Object.entries(t)){let t=r.dispatches.filter(e=>"running"!==e.status);0!==t.length&&(n[e]={...r,dispatches:t.slice(-200)})}let r=mm();if(0===Object.keys(n).length){if(!r[e])return;delete r[e],mf(r);return}r[e]={updatedAt:Date.now(),evals:n};let a=Object.keys(r);if(a.length>20){let t=a.filter(t=>t!==e);for(let e of(t.sort((e,t)=>(r[e]?.updatedAt??0)-(r[t]?.updatedAt??0)),t.slice(0,a.length-20)))delete r[e]}mf(r)}function mb(e){return"string"==typeof e?e:Array.isArray(e)?e.map(e=>e&&"object"==typeof e&&"text"in e?String(e.text??""):"").join(""):""}function my(e){let t=[];for(let n of e)if(n&&"object"==typeof n)if("ai"===n.type){let e=mb(n.content).trim();e&&t.push({kind:"text",text:e});let r=new Map;for(let e of function(e){let t=[];if(Array.isArray(e.tool_calls)&&e.tool_calls.length>0){for(let n of e.tool_calls)t.push({id:n.id??"",name:n.name??"tool",args:n.args&&"object"==typeof n.args?n.args:{}});return t}let n=e.additional_kwargs?.tool_calls;if(Array.isArray(n))for(let e of n){let n={},r=e.function?.arguments;if(r&&"object"==typeof r)n=r;else if("string"==typeof r)try{let e=JSON.parse(r);e&&"object"==typeof e&&(n=e)}catch{n={input:r}}t.push({id:e.id??"",name:e.function?.name??"tool",args:n})}return t}(n)){let n=e.id?r.get(e.id):void 0;if(n){0===Object.keys(n.args).length&&Object.keys(e.args).length>0&&(n.args=e.args);continue}let a={kind:"tool_call",id:e.id,name:e.name,args:e.args};e.id&&r.set(e.id,a),t.push(a)}}else"tool"===n.type&&t.push({kind:"tool_result",toolCallId:n.tool_call_id??"",name:n.name??"tool",text:mb(n.content).trim()});return t}let mE={yellow:"warning",green:"success",red:"error"},mx=[{model:"claude-sonnet-4-6",model_provider:"anthropic"},{model:"claude-haiku-4-5",model_provider:"anthropic"},{model:"claude-opus-4-8",model_provider:"anthropic"},{model:"gpt-5.5-pro",model_provider:"openai"},{model:"gpt-5.5",model_provider:"openai"},{model:"gpt-5-mini",model_provider:"openai"},{model:"gemini-2.5-pro",model_provider:"google-genai"},{model:"gemini-3.5-flash",model_provider:"google-genai"},{model:"deepseek-v3.2",model_provider:"deepseek"}];function mv(e){let t=0;for(let n of e){let e=n.content;if("string"==typeof e)t+=e.length;else if(Array.isArray(e))for(let n of e){let e=n?.text;"string"==typeof e&&(t+=e.length)}}return t}function mT(e){return Array.isArray(e)?e[e.length-1]:e}function mS(e){if(!e||"object"!=typeof e)return null;if("string"==typeof e.id&&e.id.length>0)return`id:${e.id}`;try{return`v:${JSON.stringify(e.value??null)}`}catch{return null}}let m_=new Set(["idle","interrupted","error"]);function mk(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n?.type==="human")return"string"==typeof n.id?n.id:null}return null}function mw(e){let t=e=>e.length>300?e.slice(0,297)+"...":e;if("string"==typeof e&&e.trim())return t(e.trim());if(e&&"object"==typeof e){let n="string"==typeof e.message?e.message.trim():null;if("string"==typeof e.provider&&e.provider&&n){let r="string"==typeof e.error&&e.error.trim()?e.error.trim():null,a=[e.provider,"number"==typeof e.status_code?String(e.status_code):null,"string"==typeof e.code&&e.code?e.code:null].filter(Boolean).join(" · "),i="string"==typeof e.request_id&&e.request_id?` [${e.request_id}]`:"",s=r?`${r}: ${n}`:n;return t(`${s} (${a})${i}`)}let r="string"==typeof e.name?e.name.trim():null,a=null;if("string"==typeof e.error&&e.error.trim())a=e.error.trim();else if(e.error&&"object"==typeof e.error)try{a=JSON.stringify(e.error)}catch{a=null}let i=n??a,s=r&&i?`${r}: ${i}`:r??i??"";if(s)return t(s)}return"Run failed."}function mA(e){let t=mw(e).toLowerCase();return!!(404===function(e){if(e&&"object"==typeof e)for(let t of[e.status,e.statusCode,e.status_code,e.response?.status]){if("number"==typeof t)return t;if("string"==typeof t&&/^\d{3}$/.test(t))return Number(t)}}(e)||/\bhttp\s*404\b/.test(t))&&(t.includes("thread or assistant not found")||t.includes("thread with id")&&t.includes("not found")||t.includes("assistant with id")&&t.includes("not found"))}function mN({children:e,activeAssistant:t,onHistoryRevalidate:n,onThreadUnavailable:r,thread:a}){let i=function({activeAssistant:e,onHistoryRevalidate:t,onThreadUnavailable:n,thread:r}){let[a,i]=ev("threadId"),s=ia(),o=(0,eu.useRef)(null),[l,c]=(0,eu.useState)({}),u=(0,eu.useRef)(a),d=(0,eu.useRef)(!0);(0,eu.useEffect)(()=>(d.current=!0,()=>{d.current=!1}),[]);let p=p9({assistantId:e?.assistant_id||eT,client:s??void 0,reconnectOnMount:!0,threadId:a??null,onThreadId:i,defaultHeaders:{"x-auth-scheme":"langsmith"},fetchStateHistory:!0,filterSubagentMessages:!0,onFinish:()=>{o.current=null,t?.()},onError:e=>{if(d.current&&(t?.(),!(mA(e)&&!a&&/thread with id/i.test(mw(e))))){if(a&&mA(e)){let t,r=(t=/thread with id '?([0-9a-f-]{8,})'?/i.exec(mw(e)))?t[1]:null;if(r&&r!==a)return;let s=f.current.messages.at(-1),l=s&&"human"===s.type&&null!=s.id&&s.id===o.current&&me(s).trim()||null;if(o.current=null,n){if(!1===n({threadId:a,unsentMessage:l}))return}else i(null);pz.toast.error(l?n?"This conversation is no longer available. Started a new chat; your unsent message is back in the composer.":"This conversation is no longer available. Started a new chat; your last message was not sent.":"This conversation is no longer available. Started a new chat.");return}o.current=null,pz.toast.error(mw(e))}},onCreated:t,onCustomEvent:(e,t)=>{let n=function(e){if(!e||"object"!=typeof e)return null;let t=e.evoscientist;if(!t||"object"!=typeof t)return null;let{kind:n,text:r,style:a}=t;if("fallback_notice"!==n||"string"!=typeof r)return null;let i=r.trim();return i?{text:i.length>240?`${i.slice(0,239)}…`:i,level:("string"==typeof a?mE[a]:void 0)??"warning"}:null}(e);if(n)return void pz.toast[n.level](n.text,{id:"model-fallback"});if(t?.namespace&&t.namespace.length>0)return;let r=function(e){if(!e||"object"!=typeof e||"subagent"!==e.type||"string"!=typeof e.id||0===e.id.length)return null;let t=e.id,n="string"==typeof e.eval_id?e.eval_id:"",r="number"==typeof e.duration_ms&&Number.isFinite(e.duration_ms)?Math.max(0,Math.round(e.duration_ms)):0;if("start"===e.phase){let r="string"==typeof e.description?mr(e.description,200):"",a="string"==typeof e.label?mr(e.label,200):"";return{phase:"start",id:t,evalId:n,subagentType:"string"==typeof e.subagent_type&&e.subagent_type?mr(e.subagent_type,60):"subagent",label:a||r.slice(0,60)||t,description:r}}return"complete"===e.phase?{phase:"complete",id:t,evalId:n,durationMs:r}:"error"===e.phase?{phase:"error",id:t,evalId:n,durationMs:r,error:"string"==typeof e.error?mr(e.error,2e3):""}:null}(e);r&&c(e=>(function(e,t,n){let r=function(e,t){for(let[n,r]of Object.entries(e)){let e=r.dispatches.findIndex(e=>e.id===t);if(-1!==e)return{evalKey:n,index:e}}return null}(e,t.id);if("start"===t.phase){if(r){let a=e[r.evalKey],i=a.dispatches[r.index];if(ma(i.status))return e;let s=[...a.dispatches];return s[r.index]={...i,label:t.label,subagentType:t.subagentType,description:t.description},mi(e,r.evalKey,n,s)}let a=e[t.evalId],i={id:t.id,label:t.label,subagentType:t.subagentType,description:t.description,status:"running",startedAt:n};return mi(e,t.evalId,n,[...a?.dispatches??[],i])}if(!r){if("complete"===t.phase)return e;let r=e[t.evalId],a={id:t.id,label:t.id,subagentType:"subagent",description:"",status:"error",startedAt:n-t.durationMs,durationMs:t.durationMs,error:t.error};return mi(e,t.evalId,n,[...r?.dispatches??[],a])}let a=e[r.evalKey],i=a.dispatches[r.index];if(ma(i.status))return e;let s=[...a.dispatches];return s[r.index]={...i,status:"complete"===t.phase?"done":"error",durationMs:t.durationMs,error:"error"===t.phase?t.error:void 0},mi(e,r.evalKey,n,s)})(e,r,Date.now()))},thread:r}),m=function(e){let t={};for(let[n,r]of e){if(!Array.isArray(r.messages))continue;let e=my(r.messages);e.length>0&&(t[n]=e)}return t}(p.subagents??new Map),f=(0,eu.useRef)(p);f.current=p,(0,eu.useEffect)(()=>{let e=u.current;if(u.current=a,!a)return void c({});let t=function(e){let t=mm()[e];if(!t||"object"!=typeof t)return{};let n=t.evals;if(!n||"object"!=typeof n||Array.isArray(n))return{};let r={};for(let[e,t]of Object.entries(n))t&&"object"==typeof t&&"string"==typeof t.evalId&&"number"==typeof t.updatedAt&&Number.isFinite(t.updatedAt)&&Array.isArray(t.dispatches)&&t.dispatches.every(mh)&&(r[e]={...t,dispatches:t.dispatches.slice(-200)});return r}(a);c(n=>null!==e&&e!==a?t:function(e,t){let n={...e};for(let[e,r]of Object.entries(t)){let t=n[e];if(!t){n[e]=r;continue}let a=new Map(t.dispatches.map(e=>[e.id,e]));for(let e of r.dispatches){let t=a.get(e.id);(!t||ma(e.status)||!ma(t.status))&&a.set(e.id,e)}let i=[],s=new Set;for(let e of t.dispatches)i.push(a.get(e.id)),s.add(e.id);for(let e of r.dispatches)s.has(e.id)||i.push(a.get(e.id));n[e]={evalId:t.evalId||r.evalId,dispatches:i,updatedAt:Math.max(t.updatedAt,r.updatedAt)}}return n}(t,n))},[a]);let h=(0,eu.useRef)(p.isLoading);(0,eu.useEffect)(()=>{let e=h.current;h.current=p.isLoading,e&&!p.isLoading&&c(e=>(function(e,t){let n=!1,r={};for(let[a,i]of Object.entries(e)){if(!i.dispatches.some(e=>"running"===e.status)){r[a]=i;continue}n=!0,r[a]={...i,updatedAt:t,dispatches:i.dispatches.map(e=>"running"===e.status?{...e,status:"cancelled",durationMs:Math.max(0,t-e.startedAt)}:e)}}return n?r:e})(e,Date.now()))},[p.isLoading]),(0,eu.useEffect)(()=>{if(!a||0===Object.keys(l).length)return;let e=setTimeout(()=>{mg(a,l)},1e3);return()=>clearTimeout(e)},[a,l]);let g=(0,eu.useRef)({threadId:null,map:{}});g.current={threadId:a,map:l},(0,eu.useEffect)(()=>()=>{let{threadId:e,map:t}=g.current;e&&Object.keys(t).length>0&&mg(e,t)},[]);let[b,y]=(0,eu.useState)(void 0),[E,x]=(0,eu.useState)(null),[v,T]=(0,eu.useState)(null),[S,_]=(0,eu.useState)(null),k=(0,eu.useRef)(0),w=(0,eu.useRef)(!1),[A,N]=(0,eu.useState)(!1),I=(0,eu.useRef)(null),[C,R]=(0,eu.useState)(null);(0,eu.useEffect)(()=>{w.current=!1,I.current=null,N(!1),x(null)},[a]);let[O,D]=(0,eu.useState)(null),L=(0,eu.useRef)(null);(0,eu.useEffect)(()=>{if(!a){L.current||D(null);return}if(L.current){let e=L.current;L.current=null,(async()=>{try{await u4(a,e)}catch{}})();return}let e=!1;return(async()=>{try{let t=await s.threads.get(a);if(e)return;let n=(t.metadata??{}).model_override;n&&"object"==typeof n&&"string"==typeof n.model?D({model:n.model,model_provider:"string"==typeof n.model_provider?n.model_provider:void 0}):D(null)}catch{e||D(null)}})(),()=>{e=!0}},[s,a]);let M=(0,eu.useCallback)(async e=>{if(D(e),!a){L.current=e;return}L.current=null,await u4(a,e)},[a]),P=mS(mT(p.interrupt));(0,eu.useEffect)(()=>{let e;if(!a){y(void 0),T(null),_(null),x(null),R(null);return}if(p.isLoading){k.current+=1,y(void 0),x(null),R(null);return}let t=p.messages.length,n=++k.current,r=!1,i=0,o=async()=>{i+=1;try{let[l,c]=await Promise.all([s.threads.getState(a),s.threads.get(a)]);if(r||k.current!==n)return;let u=function(e,t){let n=Array.isArray(e)?e:null,r=Array.isArray(t)?t:null;if(!r||0===r.length)return n&&n.length>0?n:null;if(!n||0===n.length)return r;let a=n[0]?.id;return a?r.some(e=>e.id===a)?r:n:r}(l.values?.messages,c.values?.messages),d=function(e){if(Array.isArray(e))for(let t=e.length-1;t>=0;t--){let n=e[t];if(!n||null!=n.result||null!=n.error)continue;let r=n.interrupts;if(Array.isArray(r)&&r.length>0)return r[r.length-1]}}(l.tasks),m=Array.isArray(l.next)&&l.next.length>0,f=function(e){if(!e||"object"!=typeof e)return;let t=e.value;if(!t||"object"!=typeof t)return;let n={...t};return"action_requests"in t&&!Array.isArray(t.action_requests)&&(n.action_requests=[]),"review_configs"in t&&!Array.isArray(t.review_configs)&&(n.review_configs=[]),{...e,value:n}}(d);if(w.current&&null!==I.current&&Array.isArray(u)){let e=mk(u);null!==e&&e!==I.current&&(w.current=!1,I.current=null,N(!1))}if(f&&function(e){if(!e||"object"!=typeof e)return!1;let t=e.value;return!!t&&"object"==typeof t&&("ask_user"===t.type||Array.isArray(t.action_requests)&&t.action_requests.length>0)}(f)){if(R(null),w.current){y(void 0),x(mS(mT(f))),Array.isArray(u)&&(_(a),T(u));return}y(f),x(null),Array.isArray(u)&&(_(a),T(u));return}let h=m_.has(c.status??"");if(R(h?a:null),Array.isArray(u)&&u.length>t&&(_(a),T(u)),(!m||h)&&(y(void 0),x(mS(mT(p.interrupt))),Array.isArray(u)&&(_(a),T(u)),!m))return;m&&i<15&&!r&&(e=setTimeout(o,1e3))}catch{!r&&k.current===n&&i<15&&(e=setTimeout(o,1e3))}};return o(),()=>{r=!0,e&&clearTimeout(e)}},[a,P,p.isLoading,s]);let j=mT(p.interrupt),F=A?void 0:S===a&&b?b:j&&(null===E||mS(j)!==E)?j:void 0,U=v&&S===a&&(b||!p.isLoading||v.length>p.messages.length||v.length===p.messages.length&&mv(v)>mv(p.messages))?v:p.messages,B=(0,eu.useDeferredValue)(U),z=(0,eu.useCallback)(()=>{let t=e?.config??{},n={...t.configurable??{}};return O&&(n.model=O.model,O.model_provider&&(n.model_provider=O.model_provider)),{...t,configurable:n}},[e?.config,O]),H=(0,eu.useCallback)(e=>{y(void 0),T(null),_(null),x(null),w.current=!1,I.current=null,N(!1),k.current+=1;let n={id:(0,p8.v4)(),type:"human",content:e};o.current=n.id??null,f.current.submit({messages:[n]},{optimisticValues:e=>({messages:[...e.messages??[],n]}),config:z(),streamSubgraphs:!0,streamMode:["updates"],streamResumable:!0,onDisconnect:"continue"}),t?.()},[z,t]),$=(0,eu.useCallback)(async e=>{a&&await s.threads.updateState(a,{values:{files:e}})},[s,a]),G=(0,eu.useCallback)(e=>{y(void 0),T(null),_(null),x(null),w.current=!1,I.current=null,N(!1),k.current+=1,o.current=null,f.current.submit(null,{command:{resume:e},config:z(),streamSubgraphs:!0,streamMode:["updates"],streamResumable:!0,onDisconnect:"continue"}),t?.()},[z,t]),q=(0,eu.useCallback)(()=>{w.current=!0,I.current=mk(f.current.messages),N(!0),o.current=null,f.current.stop()},[]),W=(0,eu.useRef)(!1),V=(0,eu.useRef)(null),Y=(0,eu.useRef)(null);return(0,eu.useEffect)(()=>{p.isLoading&&!W.current&&(Y.current=a);let e=W.current;if(W.current=p.isLoading,!e||p.isLoading||!a)return;let n=Y.current;if(null!==n&&n!==a)return;let r=u5(B);if(!r.autoTitle&&!r.preview)return;let i=V.current;i&&i.threadId===a&&i.autoTitle===r.autoTitle&&i.preview===r.preview||u6(a,r).then(()=>{V.current={threadId:a,...r},t?.()}).catch(()=>{})},[p.isLoading,a,B,t]),{stream:p,todos:p.values.todos??[],files:p.values.files??{},email:p.values.email,asyncTasks:p.values.async_tasks??{},summarizationEvent:function(e){if(!e||"object"!=typeof e)return null;let t=e.summary_message,n="string"==typeof t?.content?t.content:"";if(!n)return null;let r=e.cutoff_index,a=e.file_path;return{cutoffIndex:"number"==typeof r&&r>=0?r:0,content:n,filePath:"string"==typeof a?a:null}}(p.values._summarization_event),ui:p.values.ui,setFiles:$,messages:B,isLoading:p.isLoading,runSettled:!!a&&!p.isLoading&&(A||C===a),isThreadLoading:p.isThreadLoading,interrupt:F,sendMessage:H,abortRun:q,resumeInterrupt:G,subAgentActivity:m,dynamicWorkflows:l,modelOverride:O,setModelOverride:M}}({activeAssistant:t,onHistoryRevalidate:n,onThreadUnavailable:r,thread:a});return(0,ec.jsx)(mI.Provider,{value:i,children:e})}let mI=(0,eu.createContext)(void 0),mC=ny("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]),mR=ny("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]),mO=ny("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]),mD=ny("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),mL=ny("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]),mM=ny("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]),mP=ny("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),mj=ny("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]),mF=ny("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),mU=ny("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]),mB=ny("corner-down-right",[["path",{d:"m15 10 5 5-5 5",key:"qqa56n"}],["path",{d:"M4 4v7a4 4 0 0 0 4 4h12",key:"z08zvw"}]]),mz=ny("list-x",[["path",{d:"M11 12H3",key:"51ecnj"}],["path",{d:"M16 6H3",key:"1wxfjs"}],["path",{d:"M16 18H3",key:"12xzn7"}],["path",{d:"m19 10-4 4",key:"1tz659"}],["path",{d:"m15 10 4 4",key:"1n7nei"}]]),mH=ny("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]),m$=eu.default.memo(({subAgent:e,onToggle:t,isExpanded:n=!1})=>{let r="pending"===e.status||"active"===e.status,a="error"===e.status?"failed":"stopped"===e.status?"stopped":r?"running":"finished";return(0,ec.jsx)("div",{className:"w-fit max-w-[70vw] overflow-hidden rounded-lg bg-card",children:(0,ec.jsxs)(rg,{variant:"ghost",size:"sm",onClick:()=>t(e.id),"aria-expanded":n,"aria-label":`${e.subAgentName} subagent ${a}`,className:"flex w-full items-center justify-between gap-2 px-3 py-2 text-left",children:[(0,ec.jsx)("span",{className:"bg-[var(--brand)]/10 flex size-5 shrink-0 items-center justify-center rounded-md text-[var(--brand)]",children:r?(0,ec.jsx)(sk,{className:"size-3.5 animate-spin","aria-hidden":"true"}):(0,ec.jsx)(mH,{className:"size-3.5","aria-hidden":"true"})}),(0,ec.jsx)("span",{className:"truncate text-sm font-semibold text-foreground",children:e.subAgentName}),(0,ec.jsx)("span",{className:"text-xs font-normal text-muted-foreground",children:"subagent"}),n?(0,ec.jsx)(cj,{size:14,className:"ml-auto shrink-0 text-muted-foreground","aria-hidden":"true"}):(0,ec.jsx)(cP,{size:14,className:"ml-auto shrink-0 text-muted-foreground","aria-hidden":"true"})]})})});m$.displayName="SubAgentIndicator";let mG=ny("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]),mq=ny("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),mW=ny("circle-slash",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]]),mV=ny("circle-stop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]),mY=eu.createContext(null);function mK(){let e=eu.useContext(mY);if(!e)throw Error("useStreamContext must be used within a LoadExternalComponent");return new Proxy(e,{get:(e,t)=>"meta"===t?e.meta:e.stream[t]})}let mX=new class{cache={};boundCache={};callbacks={};respond(e,t,n){this.cache[e]={comp:t,target:n},this.callbacks[e]?.forEach(e=>e(t,n))}getBoundStore(e){return this.boundCache[e]??={subscribe:t=>(this.callbacks[e]??=[],this.callbacks[e].push(t),()=>{this.callbacks[e]=this.callbacks[e].filter(e=>e!==t)}),getSnapshot:()=>this.cache[e]},this.boundCache[e]}},mZ=Symbol.for("LGUI_EXT_STORE"),mQ=Symbol.for("LGUI_REQUIRE"),mJ=Symbol.for("LGUI_REQUIRE_EXTRA");function m0({stream:e,namespace:t,message:n,meta:r,fallback:a,components:i,...s}){let o=eu.useRef(null),l=`child-shadow-${eu.useId()}`,c=eu.useMemo(()=>mX.getBoundStore(l),[l]),u=eu.useSyncExternalStore(c.subscribe,c.getSnapshot),d=i?.[n.name],p=null!=d,m=null;(e=>!!eu.isValidElement(e)||null==e||"string"==typeof e||"number"==typeof e||"bigint"==typeof e||"boolean"==typeof e||null!=e&&"object"==typeof e&&Symbol.iterator in e||null!=e&&"object"==typeof e&&"then"in e&&"function"==typeof e.then)(a)?m=a:"object"==typeof a&&null!=a&&(m=a?.[n.name]);let f=t??e.assistantId,h=e.client["~ui"];return(eu.useEffect(()=>{p||h.getComponent(f,n.name).then(e=>{let t=o.current;if(!t)return;let n=t.shadowRoot??t.attachShadow({mode:"open"}),r=document.createRange().createContextualFragment(e.replace("{{shadowRootId}}",l));n.appendChild(r)})},[h,f,n.name,l,p]),p)?(0,ec.jsx)(mY.Provider,{value:{stream:e,meta:r},children:eu.createElement(d,n.props)}):(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)("div",{id:l,ref:o,...s}),(0,ec.jsx)(mY.Provider,{value:{stream:e,meta:r},children:u?.target!=null?eP.createPortal(eu.createElement(u.comp,n.props),u.target):m})]})}"u">typeof window&&(window[mZ]=mX,window[mQ]=e=>{if("react"===e)return eu;if("react-dom"===e)return eP;if("react/jsx-runtime"===e)return ec;if("@langchain/langgraph-sdk/react"===e)return{useStream:p9};if("@langchain/langgraph-sdk/react-ui"===e)return{useStreamContext:mK,LoadExternalComponent:()=>{throw Error("Nesting LoadExternalComponent is not supported")}};if(null!=window[mJ]&&"object"==typeof window[mJ]&&e in window[mJ])return window[mJ][e];throw Error(`Unknown module...: ${e}`)});let m1=eu.forwardRef(({className:e,...t},n)=>(0,ec.jsx)("textarea",{className:n6("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));m1.displayName="Textarea";function m2({actionRequest:e,reviewConfig:t,onResume:n,isLoading:r,onSubmitted:a}){let i=(0,eu.useId)(),s=`Approval required for ${e.name}`,[o,l]=(0,eu.useState)(""),[c,u]=(0,eu.useState)(!1),[d,p]=(0,eu.useState)({}),[m,f]=(0,eu.useState)({}),[h,g]=(0,eu.useState)(!1),[b,y]=(0,eu.useState)(!1),E=(0,eu.useMemo)(()=>{var t;return(t=e.args)&&"object"==typeof t?t:{}},[e.args]),x=e.description?.toLowerCase()??"",v=x.includes(`tool: ${e.name.toLowerCase()}`)&&x.includes("args:"),T=t?.allowedDecisions??t?.allowed_decisions??["approve","reject","edit"],S=e=>{(0,eP.flushSync)(()=>{y(!0),a&&a()}),n(e)};return b?null:(0,ec.jsxs)("section",{"aria-label":s,className:"w-full rounded-md border border-border bg-muted/30 p-3 sm:p-4",children:[(0,ec.jsxs)("div",{className:"mb-3 flex items-center gap-2 text-foreground",children:[(0,ec.jsx)(mq,{size:16,className:"text-yellow-600 dark:text-yellow-400","aria-hidden":"true"}),(0,ec.jsx)("span",{className:"text-xs font-semibold uppercase tracking-wider",children:"Approval Required"})]}),e.description&&!v&&(0,ec.jsx)("p",{className:"mb-3 text-sm text-muted-foreground",children:e.description}),"delete"===e.name&&(0,ec.jsx)("p",{className:"mb-3 text-sm font-medium text-destructive",children:"Recursive filesystem delete. Review the target carefully."}),"schedule_task"===e.name&&(0,ec.jsx)("p",{className:"mb-3 text-sm text-muted-foreground",children:"Creates a scheduled task that runs on its own later. Never auto-approved."}),(0,ec.jsxs)("div",{className:"mb-4 rounded-sm border border-border bg-background p-2.5 sm:p-3",children:[(0,ec.jsxs)("div",{className:"mb-2",children:[(0,ec.jsx)("span",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Tool"}),(0,ec.jsx)("p",{className:"mt-1 font-mono text-sm font-medium text-foreground",children:e.name})]}),c?(0,ec.jsxs)("div",{children:[(0,ec.jsx)("span",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Edit Arguments"}),(0,ec.jsx)("div",{className:"mt-2 space-y-3",children:Object.entries(E).map(([e,t])=>(0,ec.jsxs)("div",{children:[(0,ec.jsx)("label",{htmlFor:`${i}-edit-arg-${e}`,className:"mb-1 block text-xs font-medium text-foreground",children:e}),(0,ec.jsx)(m1,{id:`${i}-edit-arg-${e}`,value:void 0!==d[e]?"string"==typeof d[e]?d[e]:p7(d[e]):"string"==typeof t?t:p7(t),onChange:n=>((e,t,n)=>{if("string"==typeof n){p(n=>({...n,[e]:t})),f(t=>{let n={...t};return delete n[e],n});return}try{let n=JSON.parse(t);p(t=>({...t,[e]:n})),f(t=>{let n={...t};return delete n[e],n})}catch{p(n=>({...n,[e]:t})),f(t=>({...t,[e]:"Enter valid JSON to preserve this argument's value type."}))}})(e,n.target.value,t),className:"font-mono text-xs",rows:"string"==typeof t&&t.length<100?2:4,disabled:r,"aria-invalid":!!m[e]||void 0,"aria-describedby":m[e]?`${i}-edit-arg-${e}-error`:void 0}),m[e]&&(0,ec.jsx)("p",{id:`${i}-edit-arg-${e}-error`,className:"mt-1 text-xs text-destructive",children:m[e]})]},e))})]}):(0,ec.jsxs)("div",{children:[(0,ec.jsx)("span",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Arguments"}),(0,ec.jsx)("pre",{className:"mt-2 overflow-x-auto whitespace-pre-wrap break-all rounded-sm border border-border bg-muted/40 p-2 font-mono text-xs text-foreground",children:p7(E)})]})]}),h&&!c&&(0,ec.jsxs)("div",{className:"mb-4",children:[(0,ec.jsx)("label",{className:"mb-2 block text-xs font-medium text-foreground",children:"Rejection Message (optional)"}),(0,ec.jsx)(m1,{"aria-label":"Rejection message",value:o,onChange:e=>l(e.target.value),placeholder:"Explain why you're rejecting this action…",className:"text-sm",rows:2,disabled:r})]}),(0,ec.jsx)("div",{className:"mobile-approval-actions flex flex-wrap gap-2",children:c?(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)(rg,{type:"button",variant:"outline",size:"sm",onClick:()=>{u(!1),p({}),f({})},disabled:r,children:"Cancel"}),(0,ec.jsxs)(rg,{type:"button",size:"sm",onClick:()=>{c&&(S({decisions:[{type:"edit",edited_action:{name:e.name,args:d}}]}),u(!1),p({}))},disabled:r||Object.keys(m).length>0,className:"bg-green-600 text-white hover:bg-green-700 dark:bg-green-600 dark:hover:bg-green-700",children:[(0,ec.jsx)(cM,{size:14,"aria-hidden":"true"}),r?"Saving…":"Save & Approve"]})]}):h?(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)(rg,{type:"button",variant:"outline",size:"sm",onClick:()=>{g(!1),l("")},disabled:r,children:"Cancel"}),(0,ec.jsx)(rg,{type:"button",variant:"destructive",size:"sm",onClick:()=>{S({decisions:[{type:"reject",message:o.trim()}]})},disabled:r,children:r?"Rejecting…":"Confirm Reject"})]}):(0,ec.jsxs)(ec.Fragment,{children:[T.includes("reject")&&(0,ec.jsxs)(rg,{type:"button",variant:"outline",size:"sm",onClick:()=>{h?S({decisions:[{type:"reject",message:o.trim()}]}):g(!0)},disabled:r,className:"text-destructive hover:bg-destructive/10",children:[(0,ec.jsx)(nE,{size:14,"aria-hidden":"true"}),"Reject"]}),T.includes("edit")&&(0,ec.jsxs)(rg,{type:"button",variant:"outline",size:"sm",onClick:()=>{u(!0),p(function(e){try{return JSON.parse(p7(e))}catch{return{...e}}}(E)),f({}),g(!1)},disabled:r,children:[(0,ec.jsx)(sN,{size:14,"aria-hidden":"true"}),"Edit"]}),T.includes("approve")&&(0,ec.jsxs)(rg,{type:"button",size:"sm",onClick:()=>{S({decisions:[{type:"approve"}]})},disabled:r,className:n6("bg-green-600 text-white hover:bg-green-700","dark:bg-green-600 dark:hover:bg-green-700"),children:[(0,ec.jsx)(cM,{size:14,"aria-hidden":"true"}),r?"Waiting for run…":"Approve"]})]})})]})}let m3=["execute","run_in_background"],m4=["schedule_task"],m5=new Set(["nc","ncat","netcat","ssh","curl","wget","telnet","socat","scp","sftp","rsync","ftp"]),m6=new Set(["sh","bash","zsh","dash","ash","ksh","fish","python","python2","python3","node","bun","deno","ruby","perl","php","lua","iex","elixir"]);function m9(e){if(0===e.length)return null;let t=[];for(let n of e){if(m4.includes(n.name))return null;if(!m3.includes(n.name)){t.push({type:"approve"});continue}let e=function(e){let t=!1,n=!1,r=0;for(;r<e.length;){let a=e[r];if(t){"'"===a&&(t=!1),r+=1;continue}if(n){"\\"===a?r+=1:'"'===a&&(n=!1),r+=1;continue}if("'"===a){t=!0,r+=1;continue}if('"'===a){n=!0,r+=1;continue}if("\\"===a){r+=2;continue}if("|"===a){if("|"===e[r+1]){r+=2;continue}for("&"===e[r+=1]&&(r+=1);r<e.length&&/\s/.test(e[r]);)r+=1;let t=r,n="",a=!1;for(;t<e.length&&!a;){let r=e[t];if("'"===r){for(t+=1;t<e.length&&"'"!==e[t];)n+=e[t],t+=1;t+=1}else if('"'===r){for(t+=1;t<e.length&&'"'!==e[t];)"\\"===e[t]&&t+1<e.length?(n+=e[t+1],t+=2):(n+=e[t],t+=1);t+=1}else"\\"===r?(t+1<e.length&&(n+=e[t+1]),t+=2):/[\s|;&<>]/.test(r)?a=!0:(n+=r,t+=1)}if(n){let e=function(e){let t=e.split("/").pop()??e,n=t.replace(/[0-9.]+$/,"")||t,r=m5.has(t)||m5.has(n),a=m6.has(t)||m6.has(n);return r||a?`pipes output into ${r?"networking tool":"interpreter"} '${t}'`:null}(n);if(e)return e}r=t;continue}r+=1}return null}(n.args&&"string"==typeof n.args.command?n.args.command:"");e?t.push({type:"reject",message:e}):t.push({type:"approve"})}return t}function m8(e,t,n){return null!==t?t:n?m9(e):null}function m7(e,t){return p7(e,2*!!t?.pretty)}let fe=eu.default.memo(({toolCall:e,uiComponent:t,stream:n,graphId:r,actionRequest:a,actionRequestKey:i,actionRequestSubmitted:s,onActionRequestSubmitted:o,reviewConfig:l,onResume:c,isLoading:u,autoApprove:d,approvalAutoResolves:p,compact:m=!1})=>{let f=!!a&&null===m9([a]),h=!!a&&!(p??(!!d&&!f)),[g,b]=(0,eu.useState)(()=>!!t||h),[y,E]=(0,eu.useState)({}),x=(0,eu.useMemo)(()=>a?`${e.id}:${a.name}:${m7(a.args,{pretty:!1})}`:null,[a,e.id]),v=i??x,[T,S]=(0,eu.useState)(null);(0,eu.useEffect)(()=>{v?S(e=>e&&e!==v?null:e):S(null)},[v]),(0,eu.useEffect)(()=>{t&&b(!0)},[t]);let _=(0,eu.useRef)(a),k=(0,eu.useRef)(h);(0,eu.useEffect)(()=>{let e=!!_.current,t=!!a;h&&!k.current?b(!0):!t&&e&&b(!1),_.current=a,k.current=h},[a,h]);let{name:w,args:A,result:N,status:I}=(0,eu.useMemo)(()=>{let t=e.args;return{name:function(e,t){if(!e)return"Unknown Tool";if("ToolSelectionResponse"===e)return"Adaptive tool selection";let n=e.toLowerCase();if("think_tool"===n)return"Reflection";if("read_file"===n||"write_file"===n||"edit_file"===n){let e,r=function(e){if(e&&"object"==typeof e)return e;if("string"==typeof e)try{let t=JSON.parse(e);if(t&&"object"==typeof t)return t}catch{}return{}}(t),a=String(r.path??r.file_path??"");if("/memories"===(e=(a||"").trim())||e.startsWith("/memories/"))return"read_file"===n?"Reading memory":"Updating memory";if("read_file"===n){let e=function(e){let t=(e||"").trim();if(!t.startsWith("/skills/"))return"";let[n]=t.slice(8).split("/");return n||""}(a);if(e)return`Skill: ${e}`}}return e}(e.name,t),args:t&&"object"==typeof t?t:{},result:e.result,status:e.status||"completed"}},[e]),C=(0,eu.useMemo)(()=>{switch(I){case"completed":return(0,ec.jsx)(mO,{});case"error":return(0,ec.jsx)(mq,{size:14,className:"text-destructive"});case"pending":return(0,ec.jsx)(sk,{size:14,className:"animate-spin"});case"interrupted":return(0,ec.jsx)(mV,{size:14,className:"text-orange-500"});case"stopped":return(0,ec.jsx)(mW,{size:14,className:"text-muted-foreground","aria-label":"Did not finish"});default:return(0,ec.jsx)(mG,{size:14,className:"text-muted-foreground"})}},[I]),R=(0,eu.useCallback)(()=>{b(e=>!e)},[]),O=(0,eu.useCallback)(e=>{E(t=>({...t,[e]:!t[e]}))},[]),D=null!=N,L=D||Object.keys(A).length>0,M=s??T===v,P=a&&c&&(!v||!M);return(0,ec.jsxs)("div",{className:n6("w-full overflow-hidden rounded-lg border-none shadow-none outline-none transition-colors duration-200 focus-within:ring-2 focus-within:ring-ring hover:bg-accent",m&&"rounded-md",g&&L&&"bg-accent"),children:[(0,ec.jsx)(rg,{variant:"ghost",size:"sm",onClick:R,className:n6("flex w-full items-center justify-between gap-2 border-none px-2 py-2 text-left shadow-none outline-none disabled:cursor-default",m&&"h-auto min-h-8 py-1.5"),disabled:!L,children:(0,ec.jsxs)("div",{className:"flex w-full items-center justify-between gap-2",children:[(0,ec.jsxs)("div",{className:"flex items-center gap-2",children:[C,(0,ec.jsx)("span",{className:n6("text-[15px] font-medium tracking-[-0.6px] text-foreground",m&&"text-xs tracking-normal"),children:w})]}),L&&(g?(0,ec.jsx)(cj,{size:14,className:"shrink-0 text-muted-foreground"}):(0,ec.jsx)(cP,{size:14,className:"shrink-0 text-muted-foreground"}))]})}),g&&L&&(0,ec.jsx)("div",{className:n6("px-4 pb-4",m&&"px-2 pb-2"),children:t&&n&&r?(0,ec.jsx)("div",{className:"mt-4",children:(0,ec.jsx)(m0,{stream:n,message:t,namespace:r,meta:{status:I,args:A,result:N??"No Result Yet"}},t.id)}):P?(0,ec.jsx)("div",{className:"mt-4",children:(0,ec.jsx)(m2,{actionRequest:a,reviewConfig:l,onResume:c,isLoading:u,onSubmitted:()=>{S(v),v&&o?.(v),b(!1)}})}):(0,ec.jsxs)(ec.Fragment,{children:[Object.keys(A).length>0&&(0,ec.jsxs)("div",{className:n6("mt-4",m&&"mt-2"),children:[(0,ec.jsx)("h4",{className:"mb-1 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Arguments"}),(0,ec.jsx)("div",{className:"space-y-2",children:Object.entries(A).map(([e,t])=>{let n,r=(n=m7(t,{pretty:!1}).replace(/\s+/g," ").trim()).length>80?n.slice(0,79)+"…":n,a=m7(t,{pretty:!0}),i=r!==a,s=i&&!!y[e],o=(0,ec.jsxs)("span",{className:"flex min-w-0 flex-1 items-baseline gap-2",children:[(0,ec.jsxs)("span",{className:"shrink-0 font-mono",children:[e,":"]}),(0,ec.jsx)("span",{className:"truncate font-mono font-normal text-muted-foreground",children:r})]});return(0,ec.jsxs)("div",{className:"rounded-sm border border-border",children:[i?(0,ec.jsxs)("button",{type:"button",onClick:()=>O(e),className:"flex w-full items-center justify-between gap-2 bg-muted/30 p-2 text-left text-xs font-medium transition-colors hover:bg-muted/50 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",children:[o,s?(0,ec.jsx)(cj,{size:12,className:"shrink-0 text-muted-foreground"}):(0,ec.jsx)(cP,{size:12,className:"shrink-0 text-muted-foreground"})]}):(0,ec.jsx)("div",{className:"flex items-center gap-2 bg-muted/30 p-2 text-xs font-medium",children:o}),s&&(0,ec.jsx)("div",{className:n6("border-t border-border bg-muted/20 p-2",m&&"p-1.5"),children:(0,ec.jsx)("pre",{className:n6("m-0 overflow-x-auto whitespace-pre-wrap break-all font-mono text-xs leading-6 text-foreground",m&&"text-[11px] leading-5"),children:a})})]},e)})})]}),D&&(0,ec.jsxs)("div",{className:n6("mt-4",m&&"mt-2"),children:[(0,ec.jsx)("h4",{className:"mb-1 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Result"}),(0,ec.jsx)("pre",{className:n6("m-0 overflow-x-auto whitespace-pre-wrap break-all rounded-sm border border-border bg-muted/40 p-2 font-mono text-xs leading-7 text-foreground",m&&"p-1.5 text-[11px] leading-5"),children:m7(N,{pretty:!0})})]})]})})]})});function ft(){}function fn(){}function fr(e){let t=[],n=String(e||""),r=n.indexOf(","),a=0,i=!1;for(;!i;){-1===r&&(r=n.length,i=!0);let e=n.slice(a,r).trim();(e||!i)&&t.push(e),a=r+1,r=n.indexOf(",",a)}return t}function fa(e,t){let n=t||{};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}fe.displayName="ToolCallBox";let fi=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fs=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fo={};function fl(e,t){return((t||fo).jsx?fs:fi).test(e)}let fc=/[ \t\n\f\r]/g;function fu(e){return""===e.replace(fc,"")}class fd{constructor(e,t){this.attribute=t,this.property=e}}fd.prototype.attribute="",fd.prototype.booleanish=!1,fd.prototype.boolean=!1,fd.prototype.commaOrSpaceSeparated=!1,fd.prototype.commaSeparated=!1,fd.prototype.defined=!1,fd.prototype.mustUseProperty=!1,fd.prototype.number=!1,fd.prototype.overloadedBoolean=!1,fd.prototype.property="",fd.prototype.spaceSeparated=!1,fd.prototype.space=void 0;let fp=0,fm=fx(),ff=fx(),fh=fx(),fg=fx(),fb=fx(),fy=fx(),fE=fx();function fx(){return 2**++fp}e.s(["boolean",0,fm,"booleanish",0,ff,"commaOrSpaceSeparated",0,fE,"commaSeparated",0,fy,"number",0,fg,"overloadedBoolean",0,fh,"spaceSeparated",0,fb],400744);var fv=e.i(400744);let fT=Object.keys(fv);class fS extends fd{constructor(e,t,n,r){let a=-1;if(super(e,t),function(e,t,n){n&&(e[t]=n)}(this,"space",r),"number"==typeof n)for(;++a<fT.length;){const e=fT[a];!function(e,t,n){n&&(e[t]=n)}(this,fT[a],(n&fv[e])===fv[e])}}}function f_(e){return e.toLowerCase()}fS.prototype.defined=!0;let fk=/[A-Z]/g,fw=/-[a-z]/g,fA=/^data[-\w.:]+$/i;function fN(e,t){let n=f_(t),r=t,a=fd;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&fA.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(fw,fC);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!fw.test(e)){let n=e.replace(fk,fI);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}a=fS}return new a(r,t)}function fI(e){return"-"+e.toLowerCase()}function fC(e){return e.charAt(1).toUpperCase()}let fR={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 fO{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function fD(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new fO(n,r,t)}function fL(e){let t={},n={};for(let[r,a]of Object.entries(e.properties)){let i=new fS(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[f_(r)]=r,n[f_(i.attribute)]=r}return new fO(t,n,e.space)}fO.prototype.normal={},fO.prototype.property={},fO.prototype.space=void 0;let fM=fL({properties:{ariaActiveDescendant:null,ariaAtomic:ff,ariaAutoComplete:null,ariaBusy:ff,ariaChecked:ff,ariaColCount:fg,ariaColIndex:fg,ariaColSpan:fg,ariaControls:fb,ariaCurrent:null,ariaDescribedBy:fb,ariaDetails:null,ariaDisabled:ff,ariaDropEffect:fb,ariaErrorMessage:null,ariaExpanded:ff,ariaFlowTo:fb,ariaGrabbed:ff,ariaHasPopup:null,ariaHidden:ff,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:fb,ariaLevel:fg,ariaLive:null,ariaModal:ff,ariaMultiLine:ff,ariaMultiSelectable:ff,ariaOrientation:null,ariaOwns:fb,ariaPlaceholder:null,ariaPosInSet:fg,ariaPressed:ff,ariaReadOnly:ff,ariaRelevant:null,ariaRequired:ff,ariaRoleDescription:fb,ariaRowCount:fg,ariaRowIndex:fg,ariaRowSpan:fg,ariaSelected:ff,ariaSetSize:fg,ariaSort:null,ariaValueMax:fg,ariaValueMin:fg,ariaValueNow:fg,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function fP(e,t){return t in e?e[t]:t}function fj(e,t){return fP(e,t.toLowerCase())}let fF=fL({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:fy,acceptCharset:fb,accessKey:fb,action:null,allow:null,allowFullScreen:fm,allowPaymentRequest:fm,allowUserMedia:fm,alt:null,as:null,async:fm,autoCapitalize:null,autoComplete:fb,autoFocus:fm,autoPlay:fm,blocking:fb,capture:null,charSet:null,checked:fm,cite:null,className:fb,cols:fg,colSpan:null,content:null,contentEditable:ff,controls:fm,controlsList:fb,coords:fg|fy,crossOrigin:null,data:null,dateTime:null,decoding:null,default:fm,defer:fm,dir:null,dirName:null,disabled:fm,download:fh,draggable:ff,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:fm,formTarget:null,headers:fb,height:fg,hidden:fh,high:fg,href:null,hrefLang:null,htmlFor:fb,httpEquiv:fb,id:null,imageSizes:null,imageSrcSet:null,inert:fm,inputMode:null,integrity:null,is:null,isMap:fm,itemId:null,itemProp:fb,itemRef:fb,itemScope:fm,itemType:fb,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:fm,low:fg,manifest:null,max:null,maxLength:fg,media:null,method:null,min:null,minLength:fg,multiple:fm,muted:fm,name:null,nonce:null,noModule:fm,noValidate:fm,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:fm,optimum:fg,pattern:null,ping:fb,placeholder:null,playsInline:fm,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:fm,referrerPolicy:null,rel:fb,required:fm,reversed:fm,rows:fg,rowSpan:fg,sandbox:fb,scope:null,scoped:fm,seamless:fm,selected:fm,shadowRootClonable:fm,shadowRootDelegatesFocus:fm,shadowRootMode:null,shape:null,size:fg,sizes:null,slot:null,span:fg,spellCheck:ff,src:null,srcDoc:null,srcLang:null,srcSet:null,start:fg,step:null,style:null,tabIndex:fg,target:null,title:null,translate:null,type:null,typeMustMatch:fm,useMap:null,value:ff,width:fg,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:fb,axis:null,background:null,bgColor:null,border:fg,borderColor:null,bottomMargin:fg,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:fm,declare:fm,event:null,face:null,frame:null,frameBorder:null,hSpace:fg,leftMargin:fg,link:null,longDesc:null,lowSrc:null,marginHeight:fg,marginWidth:fg,noResize:fm,noHref:fm,noShade:fm,noWrap:fm,object:null,profile:null,prompt:null,rev:null,rightMargin:fg,rules:null,scheme:null,scrolling:ff,standby:null,summary:null,text:null,topMargin:fg,valueType:null,version:null,vAlign:null,vLink:null,vSpace:fg,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:fm,disableRemotePlayback:fm,prefix:null,property:null,results:fg,security:null,unselectable:null},space:"html",transform:fj}),fU=fL({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:fE,accentHeight:fg,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:fg,amplitude:fg,arabicForm:null,ascent:fg,attributeName:null,attributeType:null,azimuth:fg,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:fg,by:null,calcMode:null,capHeight:fg,className:fb,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:fg,diffuseConstant:fg,direction:null,display:null,dur:null,divisor:fg,dominantBaseline:null,download:fm,dx:null,dy:null,edgeMode:null,editable:null,elevation:fg,enableBackground:null,end:null,event:null,exponent:fg,externalResourcesRequired:null,fill:null,fillOpacity:fg,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:fy,g2:fy,glyphName:fy,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:fg,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:fg,horizOriginX:fg,horizOriginY:fg,id:null,ideographic:fg,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:fg,k:fg,k1:fg,k2:fg,k3:fg,k4:fg,kernelMatrix:fE,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:fg,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:fg,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:fg,overlineThickness:fg,paintOrder:null,panose1:null,path:null,pathLength:fg,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:fb,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:fg,pointsAtY:fg,pointsAtZ:fg,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:fE,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:fE,rev:fE,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:fE,requiredFeatures:fE,requiredFonts:fE,requiredFormats:fE,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:fg,specularExponent:fg,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:fg,strikethroughThickness:fg,string:null,stroke:null,strokeDashArray:fE,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:fg,strokeOpacity:fg,strokeWidth:null,style:null,surfaceScale:fg,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:fE,tabIndex:fg,tableValues:null,target:null,targetX:fg,targetY:fg,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:fE,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:fg,underlineThickness:fg,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:fg,values:null,vAlphabetic:fg,vMathematical:fg,vectorEffect:null,vHanging:fg,vIdeographic:fg,version:null,vertAdvY:fg,vertOriginX:fg,vertOriginY:fg,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:fg,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:fP}),fB=fL({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()}),fz=fL({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:fj}),fH=fL({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),f$=fD([fM,fF,fB,fz,fH],"html"),fG=fD([fM,fU,fB,fz,fH],"svg");function fq(e){let t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function fW(e){return e.join(" ").trim()}var fV=e.i(515511);let fY=fX("end"),fK=fX("start");function fX(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 fZ(e){let t=fK(e),n=fY(e);if(t&&n)return{start:t,end:n}}function fQ(e){return e&&"object"==typeof e?"position"in e||"type"in e?f0(e.position):"start"in e||"end"in e?f0(e):"line"in e||"column"in e?fJ(e):"":""}function fJ(e){return f1(e&&e.line)+":"+f1(e&&e.column)}function f0(e){return fJ(e&&e.start)+"-"+fJ(e&&e.end)}function f1(e){return e&&"number"==typeof e?e:1}class f2 extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",a={},i=!1;if(t&&(a="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:!a.cause&&e&&(i=!0,r=e.message,a.cause=e),!a.ruleId&&!a.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?a.ruleId=n:(a.source=n.slice(0,e),a.ruleId=n.slice(e+1))}if(!a.place&&a.ancestors&&a.ancestors){const e=a.ancestors[a.ancestors.length-1];e&&(a.place=e.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=s?s.line:void 0,this.name=fQ(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=i&&a.cause&&"string"==typeof a.cause.stack?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}f2.prototype.file="",f2.prototype.name="",f2.prototype.reason="",f2.prototype.message="",f2.prototype.stack="",f2.prototype.column=void 0,f2.prototype.line=void 0,f2.prototype.ancestors=void 0,f2.prototype.cause=void 0,f2.prototype.fatal=void 0,f2.prototype.place=void 0,f2.prototype.ruleId=void 0,f2.prototype.source=void 0;let f3={}.hasOwnProperty,f4=new Map,f5=/[A-Z]/g,f6=new Set(["table","tbody","thead","tfoot","tr"]),f9=new Set(["td","th"]),f8="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function f7(e,t,n){var r,a,i,s,o,l,c,u,d;let p,m,f,h,g,b,y,E,x,v,T;return"element"===t.type?(r=e,a=t,i=n,m=p=r.schema,"svg"===a.tagName.toLowerCase()&&"html"===p.space&&(r.schema=fG),r.ancestors.push(a),f=hr(r,a.tagName,!1),h=function(e,t){let n,r,a={};for(r in t.properties)if("children"!==r&&f3.call(t.properties,r)){let i=function(e,t,n){let r=fN(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?fa(n):fW(n)),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return(0,fV.default)(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};let t=new f2("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=f8+"#cannot-parse-style-attribute",t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){let t,n={};for(t in e)f3.call(e,t)&&(n[function(e){let t=e.replace(f5,hi);return"ms-"===t.slice(0,3)&&(t="-"+t),t}(t)]=e[t]);return n}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?fR[r.property]||r.property:r.attribute,n]}}(e,r,t.properties[r]);if(i){let[r,s]=i;e.tableCellAlignToStyle&&"align"===r&&"string"==typeof s&&f9.has(t.tagName)?n=s:a[r]=s}}return n&&((a.style||(a.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=n),a}(r,a),g=hn(r,a),f6.has(a.tagName)&&(g=g.filter(function(e){return"string"!=typeof e||!("object"==typeof e?"text"===e.type&&fu(e.value):fu(e))})),he(r,h,f,a),ht(h,g),r.ancestors.pop(),r.schema=p,r.create(a,f,h,i)):"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 ft(n.type),e.evaluater.evaluateExpression(n.expression)}ha(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?(s=e,o=t,l=n,y=b=s.schema,"svg"===o.name&&"html"===b.space&&(s.schema=fG),s.ancestors.push(o),E=null===o.name?s.Fragment:hr(s,o.name,!0),x=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];ft(t.type);let a=t.expression;ft(a.type);let i=a.properties[0];ft(i.type),Object.assign(n,e.evaluater.evaluateExpression(i.argument))}else ha(e,t.position);else{let a,i=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];ft(t.type),a=e.evaluater.evaluateExpression(t.expression)}else ha(e,t.position);else a=null===r.value||r.value;n[i]=a}return n}(s,o),v=hn(s,o),he(s,x,E,o),ht(x,v),s.ancestors.pop(),s.schema=b,s.create(o,E,x,l)):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ha(e,t.position)}(e,t):"root"===t.type?(c=e,u=t,d=n,ht(T={},hn(c,u)),c.create(u,c.Fragment,T,d)):"text"===t.type?t.value:void 0}function he(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ht(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function hn(e,t){let n=[],r=-1,a=e.passKeys?new Map:f4;for(;++r<t.children.length;){let i,s=t.children[r];if(e.passKeys){let e="element"===s.type?s.tagName:"mdxJsxFlowElement"===s.type||"mdxJsxTextElement"===s.type?s.name:void 0;if(e){let t=a.get(e)||0;i=e+"-"+t,a.set(e,t+1)}}let o=f7(e,s,i);void 0!==o&&n.push(o)}return n}function hr(e,t,n){let r;if(n)if(t.includes(".")){let e,n=t.split("."),a=-1;for(;++a<n.length;){let t=fl(n[a])?{type:"Identifier",name:n[a]}:{type:"Literal",value:n[a]};e=e?{type:"MemberExpression",object:e,property:t,computed:!!(a&&"Literal"===t.type),optional:!1}:t}ft(),r=e}else r=fl(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 f3.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);ha(e)}function ha(e,t){let n=new f2("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=f8+"#cannot-handle-mdx-estrees-without-createevaluater",n}function hi(e){return"-"+e.toLowerCase()}let hs={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"]},ho={};function hl(e,t){let n=t||ho;return hc(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}function hc(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 hu(e.children,t,n)}return Array.isArray(e)?hu(e,t,n):""}function hu(e,t,n){let r=[],a=-1;for(;++a<e.length;)r[a]=hc(e[a],t,n);return r.join("")}function hd(e,t,n,r){let a,i=e.length,s=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)(a=Array.from(r)).unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);s<r.length;)(a=r.slice(s,s+1e4)).unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function hp(e,t){return e.length>0?(hd(e,e.length,0,t),e):t}let hm={}.hasOwnProperty;function hf(e){let t={},n=-1;for(;++n<e.length;)!function(e,t){let n;for(n in t){let r,a=(hm.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];if(i)for(r in i){hm.call(a,r)||(a[r]=[]);let e=i[r];!function(e,t){let n=-1,r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);hd(e,0,0,r)}(a[r],Array.isArray(e)?e:e?[e]:[])}}}(t,e[n]);return t}let hh=hA(/[A-Za-z]/),hg=hA(/[\dA-Za-z]/),hb=hA(/[#-'*+\--9=?A-Z^-~]/);function hy(e){return null!==e&&(e<32||127===e)}let hE=hA(/\d/),hx=hA(/[\dA-Fa-f]/),hv=hA(/[!-/:-@[-`{-~]/);function hT(e){return null!==e&&e<-2}function hS(e){return null!==e&&(e<0||32===e)}function h_(e){return -2===e||-1===e||32===e}let hk=hA(/\p{P}|\p{S}/u),hw=hA(/\s/);function hA(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function hN(e,t,n,r){let a=r?r-1:1/0,i=0;return function(r){return h_(r)?(e.enter(n),function r(s){return h_(s)&&i++<a?(e.consume(s),r):(e.exit(n),t(s))}(r)):t(r)}}let hI={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"),hN(e,n,"linePrefix"))},function(n){return e.enter("paragraph"),function n(r){let a=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=a),t=a,function t(r){if(null===r){e.exit("chunkText"),e.exit("paragraph"),e.consume(r);return}return hT(r)?(e.consume(r),e.exit("chunkText"),n):(e.consume(r),t)}(r)}(n)});return n}},hC={tokenize:function(e){let t,n,r,a=this,i=[],s=0;return o;function o(t){if(s<i.length){let n=i[s];return a.containerState=n[1],e.attempt(n[0].continuation,l,c)(t)}return c(t)}function l(e){if(s++,a.containerState._closeFlow){let n;a.containerState._closeFlow=void 0,t&&b();let r=a.events.length,i=r;for(;i--;)if("exit"===a.events[i][0]&&"chunkFlow"===a.events[i][1].type){n=a.events[i][1].end;break}g(s);let o=r;for(;o<a.events.length;)a.events[o][1].end={...n},o++;return hd(a.events,i+1,0,a.events.slice(r)),a.events.length=o,c(e)}return o(e)}function c(n){if(s===i.length){if(!t)return p(n);if(t.currentConstruct&&t.currentConstruct.concrete)return f(n);a.interrupt=!!(t.currentConstruct&&!t._gfmTableDynamicInterruptHack)}return a.containerState={},e.check(hR,u,d)(n)}function u(e){return t&&b(),g(s),p(e)}function d(e){return a.parser.lazy[a.now().line]=s!==i.length,r=a.now().offset,f(e)}function p(t){return a.containerState={},e.attempt(hR,m,f)(t)}function m(e){return s++,i.push([a.currentConstruct,a.containerState]),p(e)}function f(r){if(null===r){t&&b(),g(0),e.consume(r);return}return t=t||a.parser.flow(a.now()),e.enter("chunkFlow",{_tokenizer:t,contentType:"flow",previous:n}),function t(n){if(null===n){h(e.exit("chunkFlow"),!0),g(0),e.consume(n);return}return hT(n)?(e.consume(n),h(e.exit("chunkFlow")),s=0,a.interrupt=void 0,o):(e.consume(n),t)}(r)}function h(e,i){let o=a.sliceStream(e);if(i&&o.push(null),e.previous=n,n&&(n.next=e),n=e,t.defineSkip(e.start),t.write(o),a.parser.lazy[e.start.line]){let e,n,i=t.events.length;for(;i--;)if(t.events[i][1].start.offset<r&&(!t.events[i][1].end||t.events[i][1].end.offset>r))return;let o=a.events.length,l=o;for(;l--;)if("exit"===a.events[l][0]&&"chunkFlow"===a.events[l][1].type){if(e){n=a.events[l][1].end;break}e=!0}for(g(s),i=o;i<a.events.length;)a.events[i][1].end={...n},i++;hd(a.events,l+1,0,a.events.slice(o)),a.events.length=i}}function g(t){let n=i.length;for(;n-- >t;){let t=i[n];a.containerState=t[1],t[0].exit.call(a,e)}i.length=t}function b(){t.write([null]),n=void 0,t=void 0,a.containerState._closeFlow=void 0}}},hR={tokenize:function(e,t,n){return hN(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},hO={partial:!0,tokenize:function(e,t,n){return function(t){return h_(t)?hN(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||hT(e)?t(e):n(e)}}};class hD{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&&hL(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),hL(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),hL(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);hL(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);hL(this.left,t.reverse())}}}function hL(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 hM(e){let t,n,r,a,i,s,o,l={},c=-1,u=new hD(e);for(;++c<u.length;){for(;c in l;)c=l[c];if(t=u.get(c),c&&"chunkFlow"===t[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&((r=0)<(s=t[1]._tokenizer.events).length&&"lineEndingBlank"===s[r][1].type&&(r+=2),r<s.length&&"content"===s[r][1].type))for(;++r<s.length&&"content"!==s[r][1].type;)"chunkText"===s[r][1].type&&(s[r][1]._isInFirstContentOfListItem=!0,r++);if("enter"===t[0])t[1].contentType&&(Object.assign(l,function(e,t){let n,r,a=e.get(t)[1],i=e.get(t)[2],s=t-1,o=[],l=a._tokenizer;!l&&(l=i.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));let c=l.events,u=[],d={},p=-1,m=a,f=0,h=0,g=[0];for(;m;){for(;e.get(++s)[1]!==m;);o.push(s),!m._tokenizer&&(n=i.sliceStream(m),m.next||n.push(null),r&&l.defineSkip(m.start),m._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(n),m._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),r=m,m=m.next}for(m=a;++p<c.length;)"exit"===c[p][0]&&"enter"===c[p-1][0]&&c[p][1].type===c[p-1][1].type&&c[p][1].start.line!==c[p][1].end.line&&(h=p+1,g.push(h),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(l.events=[],m?(m._tokenizer=void 0,m.previous=void 0):g.pop(),p=g.length;p--;){let t=c.slice(g[p],g[p+1]),n=o.pop();u.push([n,n+t.length-1]),e.splice(n,2,t)}for(u.reverse(),p=-1;++p<u.length;)d[f+u[p][0]]=f+u[p][1],f+=u[p][1]-u[p][0]-1;return d}(u,c)),c=l[c],o=!0);else if(t[1]._container){for(r=c,n=void 0;r--;)if("lineEnding"===(a=u.get(r))[1].type||"lineEndingBlank"===a[1].type)"enter"===a[0]&&(n&&(u.get(n)[1].type="lineEndingBlank"),a[1].type="lineEnding",n=r);else if("linePrefix"===a[1].type||"listItemIndent"===a[1].type);else break;n&&(t[1].end={...u.get(n)[1].start},(i=u.slice(n,c)).unshift(t),u.splice(n,c-n+1,i))}}return hd(e,0,1/0,u.slice(0)),!o}let hP={resolve:function(e){return hM(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?a(t):hT(t)?e.check(hj,i,a)(t):(e.consume(t),r)}function a(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function i(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},hj={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"),hN(e,a,"linePrefix")};function a(a){if(null===a||hT(a))return n(a);let i=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}},hF={tokenize:function(e){let t=this,n=e.attempt(hO,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,hN(e,e.attempt(this.parser.constructs.flow,r,e.attempt(hP,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)}}},hU={resolveAll:h$()},hB=hH("string"),hz=hH("text");function hH(e){return{resolveAll:h$("text"===e?hG:void 0),tokenize:function(t){let n=this,r=this.parser.constructs[e],a=t.attempt(r,i,s);return i;function i(e){return l(e)?a(e):s(e)}function s(e){return null===e?void t.consume(e):(t.enter("data"),t.consume(e),o)}function o(e){return l(e)?(t.exit("data"),a(e)):(t.consume(e),o)}function l(e){if(null===e)return!0;let t=r[e],a=-1;if(t)for(;++a<t.length;){let e=t[a];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function h$(e){return function(t,n){let r,a=-1;for(;++a<=t.length;)void 0===r?t[a]&&"data"===t[a][1].type&&(r=a,a++):t[a]&&"data"===t[a][1].type||(a!==r+2&&(t[r][1].end=t[a-1][1].end,t.splice(r+2,a-r-2),a=r+2),r=void 0);return e?e(t,n):t}}function hG(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,a=e[n-1][1],i=t.sliceStream(a),s=i.length,o=-1,l=0;for(;s--;){let e=i[s];if("string"==typeof e){for(o=e.length;32===e.charCodeAt(o-1);)l++,o--;if(o)break;o=-1}else if(-2===e)r=!0,l++;else if(-1===e);else{s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){let i={type:n===e.length||r||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?o:a.start._bufferIndex+o,_index:a.start._index+s,line:a.end.line,column:a.end.column-l,offset:a.end.offset-l},end:{...a.end}};a.end={...i.start},a.start.offset===a.end.offset?Object.assign(a,i):(e.splice(n,0,["enter",i,t],["exit",i,t]),n+=2)}n++}return e}function hq(e){return null===e||hS(e)||hw(e)?1:hk(e)?2:void 0}function hW(e,t,n){let r=[],a=-1;for(;++a<e.length;){let i=e[a].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}let hV={name:"attention",resolveAll:function(e,t){let n,r,a,i,s,o,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close){for(n=u;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[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;o=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;let d={...e[n][1].end},p={...e[u][1].start};hY(d,-o),hY(p,o),i={type:o>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},s={type:o>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:p},a={type:o>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:o>1?"strong":"emphasis",start:{...i.start},end:{...s.end}},e[n][1].end={...i.start},e[u][1].start={...s.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=hp(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=hp(l,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",a,t]]),l=hp(l,hW(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=hp(l,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=hp(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,hd(e,n-1,u-n+3,l),u=n+l.length-c-2;break}}for(u=-1;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){let n,r=this.parser.constructs.attentionMarkers.null,a=this.previous,i=hq(a);return function(s){return n=s,e.enter("attentionSequence"),function s(o){if(o===n)return e.consume(o),s;let l=e.exit("attentionSequence"),c=hq(o),u=!c||2===c&&i||r.includes(o),d=!i||2===i&&c||r.includes(a);return l._open=!!(42===n?u:u&&(i||!d)),l._close=!!(42===n?d:d&&(c||!u)),t(o)}(s)}}};function hY(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}let hK={continuation:{tokenize:function(e,t,n){let r=this;return function(t){return h_(t)?hN(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):a(t)};function a(r){return e.attempt(hK,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"),a}return n(t)};function a(n){return h_(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}},hX={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 hv(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},hZ=document.createElement("i");function hQ(e){let t="&"+e+";";hZ.innerHTML=t;let n=hZ.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}let hJ={name:"characterReference",tokenize:function(e,t,n){let r,a,i=this,s=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),o};function o(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),r=31,a=hg,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,a=hx,c):(e.enter("characterReferenceValue"),r=7,a=hE,c(t))}function c(o){if(59===o&&s){let r=e.exit("characterReferenceValue");return a!==hg||hQ(i.sliceSerialize(r))?(e.enter("characterReferenceMarker"),e.consume(o),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(o)}return a(o)&&s++<r?(e.consume(o),c):n(o)}}},h0={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"),a)};function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},h1={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){let r,a=this,i={partial:!0,tokenize:function(e,t,n){let i=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s};function s(t){return e.enter("codeFencedFence"),h_(t)?hN(e,l,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)}function l(t){return t===r?(e.enter("codeFencedFenceSequence"),function t(a){return a===r?(i++,e.consume(a),t):i>=o?(e.exit("codeFencedFenceSequence"),h_(a)?hN(e,c,"whitespace")(a):c(a)):n(a)}(t)):n(t)}function c(r){return null===r||hT(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}},s=0,o=0;return function(t){var i;let c;return i=t,s=(c=a.events[a.events.length-1])&&"linePrefix"===c[1].type?c[2].sliceSerialize(c[1],!0).length:0,r=i,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),function t(a){return a===r?(o++,e.consume(a),t):o<3?n(a):(e.exit("codeFencedFenceSequence"),h_(a)?hN(e,l,"whitespace")(a):l(a))}(i)};function l(i){return null===i||hT(i)?(e.exit("codeFencedFence"),a.interrupt?t(i):e.check(h0,u,f)(i)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),function t(a){return null===a||hT(a)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),l(a)):h_(a)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),hN(e,c,"whitespace")(a)):96===a&&a===r?n(a):(e.consume(a),t)}(i))}function c(t){return null===t||hT(t)?l(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),function t(a){return null===a||hT(a)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),l(a)):96===a&&a===r?n(a):(e.consume(a),t)}(t))}function u(t){return e.attempt(i,f,d)(t)}function d(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),p}function p(t){return s>0&&h_(t)?hN(e,m,"linePrefix",s+1)(t):m(t)}function m(t){return null===t||hT(t)?e.check(h0,u,f)(t):(e.enter("codeFlowValue"),function t(n){return null===n||hT(n)?(e.exit("codeFlowValue"),m(n)):(e.consume(n),t)}(t))}function f(n){return e.exit("codeFenced"),t(n)}}},h2={name:"codeIndented",tokenize:function(e,t,n){let r=this;return function(t){return e.enter("codeIndented"),hN(e,a,"linePrefix",5)(t)};function a(t){let a=r.events[r.events.length-1];return a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?function t(n){return null===n?i(n):hT(n)?e.attempt(h3,t,i)(n):(e.enter("codeFlowValue"),function n(r){return null===r||hT(r)?(e.exit("codeFlowValue"),t(r)):(e.consume(r),n)}(n))}(t):n(t)}function i(n){return e.exit("codeIndented"),t(n)}}},h3={partial:!0,tokenize:function(e,t,n){let r=this;return a;function a(t){return r.parser.lazy[r.now().line]?n(t):hT(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):hN(e,i,"linePrefix",5)(t)}function i(e){let i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(e):hT(e)?a(e):n(e)}}};function h4(e,t,n,r,a,i,s,o,l){let c=l||1/0,u=0;return function(t){return 60===t?(e.enter(r),e.enter(a),e.enter(i),e.consume(t),e.exit(i),d):null===t||32===t||41===t||hy(t)?n(t):(e.enter(r),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),f(t))};function d(n){return 62===n?(e.enter(i),e.consume(n),e.exit(i),e.exit(a),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(o),d(t)):null===t||60===t||hT(t)?n(t):(e.consume(t),92===t?m:p)}function m(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function f(a){return!u&&(null===a||41===a||hS(a))?(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(r),t(a)):u<c&&40===a?(e.consume(a),u++,f):41===a?(e.consume(a),u--,f):null===a||32===a||40===a||hy(a)?n(a):(e.consume(a),92===a?h:f)}function h(t){return 40===t||41===t||92===t?(e.consume(t),f):f(t)}}function h5(e,t,n,r,a,i){let s,o=this,l=0;return function(t){return e.enter(r),e.enter(a),e.consume(t),e.exit(a),e.enter(i),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?n(d):93===d?(e.exit(i),e.enter(a),e.consume(d),e.exit(a),e.exit(r),t):hT(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||hT(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!h_(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function h6(e,t,n,r,a,i){let s;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(a),e.consume(t),e.exit(a),s=40===t?41:t,o):n(t)};function o(n){return n===s?(e.enter(a),e.consume(n),e.exit(a),e.exit(r),t):(e.enter(i),l(n))}function l(t){return t===s?(e.exit(i),o(s)):null===t?n(t):hT(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),hN(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===s||null===t||hT(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===s||92===t?(e.consume(t),c):c(t)}}function h9(e,t){let n;return function r(a){return hT(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r):h_(a)?hN(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}function h8(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}let h7={partial:!0,tokenize:function(e,t,n){return function(t){return hS(t)?h9(e,r)(t):n(t)};function r(t){return h6(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function a(t){return h_(t)?hN(e,i,"whitespace")(t):i(t)}function i(e){return null===e||hT(e)?t(e):n(e)}}},ge=["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"],gt=["pre","script","style","textarea"],gn={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(hO,t,n)}}},gr={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return hT(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):n(t)};function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},ga={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&&hd(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,a,i,s=e.length,o=0;for(;s--;)if(n=e[s][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[s][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(a){if("enter"===e[s][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=s,"labelLink"!==n.type)){o=2;break}}else"labelEnd"===n.type&&(a=s);let l={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[a][1].end}},u={type:"labelText",start:{...e[r+o+2][1].end},end:{...e[a-2][1].start}};return i=hp(i=[["enter",l,t],["enter",c,t]],e.slice(r+1,r+o+3)),i=hp(i,[["enter",u,t]]),i=hp(i,hW(t.parser.constructs.insideSpan.null,e.slice(r+o+4,a-3),t)),i=hp(i,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),i=hp(i,e.slice(a+1)),i=hp(i,[["exit",l,t]]),hd(e,r,e.length,i),e},tokenize:function(e,t,n){let r,a,i=this,s=i.events.length;for(;s--;)if(("labelImage"===i.events[s][1].type||"labelLink"===i.events[s][1].type)&&!i.events[s][1]._balanced){r=i.events[s][1];break}return function(t){return r?r._inactive?u(t):(a=i.parser.defined.includes(h8(i.sliceSerialize({start:r.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),o):n(t)};function o(t){return 40===t?e.attempt(gi,c,a?c:u)(t):91===t?e.attempt(gs,c,a?l:u)(t):a?c(t):u(t)}function l(t){return e.attempt(go,c,u)(t)}function c(e){return t(e)}function u(e){return r._balanced=!0,n(e)}}},gi={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 hS(t)?h9(e,a)(t):a(t)}function a(t){return 41===t?c(t):h4(e,i,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return hS(t)?h9(e,o)(t):c(t)}function s(e){return n(e)}function o(t){return 34===t||39===t||40===t?h6(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return hS(t)?h9(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},gs={tokenize:function(e,t,n){let r=this;return function(t){return h5.call(r,e,a,i,"reference","referenceMarker","referenceString")(t)};function a(e){return r.parser.defined.includes(h8(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},go={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)}}},gl={name:"labelStartImage",resolveAll:ga.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"),a};function a(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):n(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}},gc={name:"labelStartLink",resolveAll:ga.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"),a};function a(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}},gu={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),hN(e,t,"linePrefix")}}},gd={name:"thematicBreak",tokenize:function(e,t,n){let r,a=0;return function(i){var s;return e.enter("thematicBreak"),r=s=i,function i(s){return s===r?(e.enter("thematicBreakSequence"),function t(n){return n===r?(e.consume(n),a++,t):(e.exit("thematicBreakSequence"),h_(n)?hN(e,i,"whitespace")(n):i(n))}(s)):a>=3&&(null===s||hT(s))?(e.exit("thematicBreak"),t(s)):n(s)}(s)}}},gp={continuation:{tokenize:function(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(hO,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,hN(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!h_(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(gf,t,a)(n))});function a(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,hN(e,e.attempt(gp,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){let r=this,a=r.events[r.events.length-1],i=a&&"linePrefix"===a[1].type?a[2].sliceSerialize(a[1],!0).length:0,s=0;return function(t){let a=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===a?!r.containerState.marker||t===r.containerState.marker:hE(t)){if(r.containerState.type||(r.containerState.type=a,e.enter(a,{_container:!0})),"listUnordered"===a)return e.enter("listItemPrefix"),42===t||45===t?e.check(gd,n,o)(t):o(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),function t(a){return hE(a)&&++s<10?(e.consume(a),t):(!r.interrupt||s<2)&&(r.containerState.marker?a===r.containerState.marker:41===a||46===a)?(e.exit("listItemValue"),o(a)):n(a)}(t)}return n(t)};function o(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(hO,r.interrupt?n:l,e.attempt(gm,u,c))}function l(e){return r.containerState.initialBlankLine=!0,i++,u(e)}function c(t){return h_(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),u):n(t)}function u(n){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},gm={partial:!0,tokenize:function(e,t,n){let r=this;return hN(e,function(e){let a=r.events[r.events.length-1];return!h_(e)&&a&&"listItemPrefixWhitespace"===a[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},gf={partial:!0,tokenize:function(e,t,n){let r=this;return hN(e,function(e){let a=r.events[r.events.length-1];return a&&"listItemIndent"===a[1].type&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}},gh={name:"setextUnderline",resolveTo:function(e,t){let n,r,a,i=e.length;for(;i--;)if("enter"===e[i][0]){if("content"===e[i][1].type){n=i;break}"paragraph"===e[i][1].type&&(r=i)}else"content"===e[i][1].type&&e.splice(i,1),a||"definition"!==e[i][1].type||(a=i);let s={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",a?(e.splice(r,0,["enter",s,t]),e.splice(a+1,0,["exit",e[n][1],t]),e[n][1].end={...e[a][1].end}):e[n][1]=s,e.push(["exit",s,t]),e},tokenize:function(e,t,n){let r,a=this;return function(t){var s;let o,l=a.events.length;for(;l--;)if("lineEnding"!==a.events[l][1].type&&"linePrefix"!==a.events[l][1].type&&"content"!==a.events[l][1].type){o="paragraph"===a.events[l][1].type;break}return!a.parser.lazy[a.now().line]&&(a.interrupt||o)?(e.enter("setextHeadingLine"),r=t,s=t,e.enter("setextHeadingLineSequence"),function t(n){return n===r?(e.consume(n),t):(e.exit("setextHeadingLineSequence"),h_(n)?hN(e,i,"lineSuffix")(n):i(n))}(s)):n(t)};function i(r){return null===r||hT(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,a=this;return function(t){var r;return e.enter("definition"),r=t,h5.call(a,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(r)};function i(t){return(r=h8(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),58===t)?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),s):n(t)}function s(t){return hS(t)?h9(e,o)(t):o(t)}function o(t){return h4(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(h7,c,c)(t)}function c(t){return h_(t)?hN(e,u,"whitespace")(t):u(t)}function u(i){return null===i||hT(i)?(e.exit("definition"),a.parser.defined.push(r),t(i)):n(i)}}}},"disable",0,{null:[]},"document",0,{42:gp,43:gp,45:gp,48:gp,49:gp,50:gp,51:gp,52:gp,53:gp,54:gp,55:gp,56:gp,57:gp,62:hK},"flow",0,{35:{name:"headingAtx",resolve:function(e,t){let n,r,a=e.length-2,i=3;return"whitespace"===e[3][1].type&&(i+=2),a-2>i&&"whitespace"===e[a][1].type&&(a-=2),"atxHeadingSequence"===e[a][1].type&&(i===a-1||a-4>i&&"whitespace"===e[a-2][1].type)&&(a-=i+1===a?2:4),a>i&&(n={type:"atxHeadingText",start:e[i][1].start,end:e[a][1].end},r={type:"chunkText",start:e[i][1].start,end:e[a][1].end,contentType:"text"},hd(e,i,a-i+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e},tokenize:function(e,t,n){let r=0;return function(a){var i;return e.enter("atxHeading"),i=a,e.enter("atxHeadingSequence"),function a(i){return 35===i&&r++<6?(e.consume(i),a):null===i||hS(i)?(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||hT(r)?(e.exit("atxHeading"),t(r)):h_(r)?hN(e,n,"whitespace")(r):(e.enter("atxHeadingText"),function t(r){return null===r||35===r||hS(r)?(e.exit("atxHeadingText"),n(r)):(e.consume(r),t)}(r))}(i)):n(i)}(i)}}},42:gd,45:[gh,gd],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,a,i,s,o,l=this;return function(t){var n;return n=t,e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(n),c};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),a=!0,m):63===s?(e.consume(s),r=3,l.interrupt?t:O):hh(s)?(e.consume(s),i=String.fromCharCode(s),f):n(s)}function u(a){return 45===a?(e.consume(a),r=2,d):91===a?(e.consume(a),r=5,s=0,p):hh(a)?(e.consume(a),r=4,l.interrupt?t:O):n(a)}function d(r){return 45===r?(e.consume(r),l.interrupt?t:O):n(r)}function p(r){let a="CDATA[";return r===a.charCodeAt(s++)?(e.consume(r),s===a.length)?l.interrupt?t:_:p:n(r)}function m(t){return hh(t)?(e.consume(t),i=String.fromCharCode(t),f):n(t)}function f(s){if(null===s||47===s||62===s||hS(s)){let o=47===s,c=i.toLowerCase();return!o&&!a&>.includes(c)?(r=1,l.interrupt?t(s):_(s)):ge.includes(i.toLowerCase())?(r=6,o)?(e.consume(s),h):l.interrupt?t(s):_(s):(r=7,l.interrupt&&!l.parser.lazy[l.now().line]?n(s):a?function t(n){return h_(n)?(e.consume(n),t):T(n)}(s):g(s))}return 45===s||hg(s)?(e.consume(s),i+=String.fromCharCode(s),f):n(s)}function h(r){return 62===r?(e.consume(r),l.interrupt?t:_):n(r)}function g(t){return 47===t?(e.consume(t),T):58===t||95===t||hh(t)?(e.consume(t),b):h_(t)?(e.consume(t),g):T(t)}function b(t){return 45===t||46===t||58===t||95===t||hg(t)?(e.consume(t),b):y(t)}function y(t){return 61===t?(e.consume(t),E):h_(t)?(e.consume(t),y):g(t)}function E(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,x):h_(t)?(e.consume(t),E):function t(n){return null===n||34===n||39===n||47===n||60===n||61===n||62===n||96===n||hS(n)?y(n):(e.consume(n),t)}(t)}function x(t){return t===o?(e.consume(t),o=null,v):null===t||hT(t)?n(t):(e.consume(t),x)}function v(e){return 47===e||62===e||h_(e)?g(e):n(e)}function T(t){return 62===t?(e.consume(t),S):n(t)}function S(t){return null===t||hT(t)?_(t):h_(t)?(e.consume(t),S):n(t)}function _(t){return 45===t&&2===r?(e.consume(t),N):60===t&&1===r?(e.consume(t),I):62===t&&4===r?(e.consume(t),D):63===t&&3===r?(e.consume(t),O):93===t&&5===r?(e.consume(t),R):hT(t)&&(6===r||7===r)?(e.exit("htmlFlowData"),e.check(gn,L,k)(t)):null===t||hT(t)?(e.exit("htmlFlowData"),k(t)):(e.consume(t),_)}function k(t){return e.check(gr,w,L)(t)}function w(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),A}function A(t){return null===t||hT(t)?k(t):(e.enter("htmlFlowData"),_(t))}function N(t){return 45===t?(e.consume(t),O):_(t)}function I(t){return 47===t?(e.consume(t),i="",C):_(t)}function C(t){if(62===t){let n=i.toLowerCase();return gt.includes(n)?(e.consume(t),D):_(t)}return hh(t)&&i.length<8?(e.consume(t),i+=String.fromCharCode(t),C):_(t)}function R(t){return 93===t?(e.consume(t),O):_(t)}function O(t){return 62===t?(e.consume(t),D):45===t&&2===r?(e.consume(t),O):_(t)}function D(t){return null===t||hT(t)?(e.exit("htmlFlowData"),L(t)):(e.consume(t),D)}function L(n){return e.exit("htmlFlow"),t(n)}}},61:gh,95:gd,96:h1,126:h1},"flowInitial",0,{[-2]:h2,[-1]:h2,32:h2},"insideSpan",0,{null:[hV,hU]},"string",0,{38:hJ,92:hX},"text",0,{[-5]:gu,[-4]:gu,[-3]:gu,33:gl,38:hJ,42:hV,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"),a};function a(t){return hh(t)?(e.consume(t),i):64===t?n(t):o(t)}function i(t){return 43===t||45===t||46===t||hg(t)?(r=1,function t(n){return 58===n?(e.consume(n),r=0,s):(43===n||45===n||46===n||hg(n))&&r++<32?(e.consume(n),t):(r=0,o(n))}(t)):o(t)}function s(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||hy(r)?n(r):(e.consume(r),s)}function o(t){return 64===t?(e.consume(t),l):hb(t)?(e.consume(t),o):n(t)}function l(a){return hg(a)?function a(i){return 46===i?(e.consume(i),r=0,l):62===i?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(i),e.exit("autolinkMarker"),e.exit("autolink"),t):function t(i){if((45===i||hg(i))&&r++<63){let n=45===i?t:a;return e.consume(i),n}return n(i)}(i)}(a):n(a)}}},{name:"htmlText",tokenize:function(e,t,n){let r,a,i,s=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),o};function o(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),x):63===t?(e.consume(t),y):hh(t)?(e.consume(t),T):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),a=0,m):hh(t)?(e.consume(t),b):n(t)}function c(t){return 45===t?(e.consume(t),p):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):hT(t)?(i=u,C(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?I(e):45===e?d(e):u(e)}function m(t){let r="CDATA[";return t===r.charCodeAt(a++)?(e.consume(t),a===r.length?f:m):n(t)}function f(t){return null===t?n(t):93===t?(e.consume(t),h):hT(t)?(i=f,C(t)):(e.consume(t),f)}function h(t){return 93===t?(e.consume(t),g):f(t)}function g(t){return 62===t?I(t):93===t?(e.consume(t),g):f(t)}function b(t){return null===t||62===t?I(t):hT(t)?(i=b,C(t)):(e.consume(t),b)}function y(t){return null===t?n(t):63===t?(e.consume(t),E):hT(t)?(i=y,C(t)):(e.consume(t),y)}function E(e){return 62===e?I(e):y(e)}function x(t){return hh(t)?(e.consume(t),v):n(t)}function v(t){return 45===t||hg(t)?(e.consume(t),v):function t(n){return hT(n)?(i=t,C(n)):h_(n)?(e.consume(n),t):I(n)}(t)}function T(t){return 45===t||hg(t)?(e.consume(t),T):47===t||62===t||hS(t)?S(t):n(t)}function S(t){return 47===t?(e.consume(t),I):58===t||95===t||hh(t)?(e.consume(t),_):hT(t)?(i=S,C(t)):h_(t)?(e.consume(t),S):I(t)}function _(t){return 45===t||46===t||58===t||95===t||hg(t)?(e.consume(t),_):function t(n){return 61===n?(e.consume(n),k):hT(n)?(i=t,C(n)):h_(n)?(e.consume(n),t):S(n)}(t)}function k(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),r=t,w):hT(t)?(i=k,C(t)):h_(t)?(e.consume(t),k):(e.consume(t),A)}function w(t){return t===r?(e.consume(t),r=void 0,N):null===t?n(t):hT(t)?(i=w,C(t)):(e.consume(t),w)}function A(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||hS(t)?S(t):(e.consume(t),A)}function N(e){return 47===e||62===e||hS(e)?S(e):n(e)}function I(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function C(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),R}function R(t){return h_(t)?hN(e,O,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):O(t)}function O(t){return e.enter("htmlTextData"),i(t)}}}],91:gc,92:[{name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return hT(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}},hX],93:ga,95:hV,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,a=3;if(("lineEnding"===e[3][1].type||"space"===e[a][1].type)&&("lineEnding"===e[r][1].type||"space"===e[r][1].type)){for(t=a;++t<r;)if("codeTextData"===e[t][1].type){e[a][1].type="codeTextPadding",e[r][1].type="codeTextPadding",a+=2,r-=2;break}}for(t=a-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,a,i=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),function t(n){return 96===n?(e.consume(n),i++,t):(e.exit("codeTextSequence"),s(n))}(t)};function s(l){return null===l?n(l):32===l?(e.enter("space"),e.consume(l),e.exit("space"),s):96===l?(a=e.enter("codeTextSequence"),r=0,function n(s){return 96===s?(e.consume(s),r++,n):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(s)):(a.type="codeTextData",o(s))}(l)):hT(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s):(e.enter("codeTextData"),o(l))}function o(t){return null===t||32===t||96===t||hT(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),o)}}}}],304127);var gg=e.i(304127);let gb=/[\0\t\n\r]/g;function gy(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 gE=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function gx(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){let e=n.charCodeAt(1),t=120===e||88===e;return gy(n.slice(t?2:1),t?16:10)}return hQ(n)||e}let gv={}.hasOwnProperty;function gT(e){return{line:e.line,column:e.column,offset:e.offset}}function gS(e,t){if(e)throw Error("Cannot close `"+e.type+"` ("+fQ({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+fQ({start:t.start,end:t.end})+") is open");throw Error("Cannot close document, a token (`"+t.type+"`, "+fQ({start:t.start,end:t.end})+") is still open")}function g_(e){let t=this;t.parser=function(n){var r,a;let i,s,o,l;return"object"==typeof(r={...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})&&(a=r,r=void 0),(function(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:r(b),autolinkProtocol:c,autolinkEmail:c,atxHeading:r(f),blockQuote:r(function(){return{type:"blockquote",children:[]}}),characterEscape:c,characterReference:c,codeFenced:r(m),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:r(m,a),codeText:r(function(){return{type:"inlineCode",value:""}},a),codeTextData:c,data:c,codeFlowValue:c,definition:r(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:r(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:r(h),hardBreakTrailing:r(h),htmlFlow:r(g,a),htmlFlowData:c,htmlText:r(g,a),htmlTextData:c,image:r(function(){return{type:"image",title:null,url:"",alt:null}}),label:a,link:r(b),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(y,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:r(y),paragraph:r(function(){return{type:"paragraph",children:[]}}),reference:function(){this.data.referenceType="collapsed"},referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:r(f),strong:r(function(){return{type:"strong",children:[]}}),thematicBreak:r(function(){return{type:"thematicBreak"}})},exit:{atxHeading:s(),atxHeadingSequence:function(e){let t=this.stack[this.stack.length-1];t.depth||(t.depth=this.sliceSerialize(e).length)},autolink:s(),autolinkEmail:function(e){u.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){u.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:s(),characterEscapeValue:u,characterReferenceMarkerHexadecimal:p,characterReferenceMarkerNumeric:p,characterReferenceValue:function(e){let t,n=this.sliceSerialize(e),r=this.data.characterReferenceType;r?(t=gy(n,"characterReferenceMarkerNumeric"===r?10:16),this.data.characterReferenceType=void 0):t=hQ(n);let a=this.stack[this.stack.length-1];a.value+=t},characterReference:function(e){this.stack.pop().position.end=gT(e.end)},codeFenced:s(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:u,codeIndented:s(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:s(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:u,data:u,definition:s(),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=h8(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:s(),hardBreakEscape:s(d),hardBreakTrailing:s(d),htmlFlow:s(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:u,htmlText:s(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:u,image:s(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(gE,gx),n.identifier=h8(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=gT(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(c.call(this,e),u.call(this,e))},link:s(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:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=h8(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:s(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:s(),thematicBreak:s()}};!function e(t,n){let r=-1;for(;++r<n.length;){let a=n[r];Array.isArray(a)?e(t,a):function(e,t){let n;for(n in t)if(gv.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,a)}}(t,(e||{}).mdastExtensions||[]);let n={};return function(e){let r={type:"root",children:[]},s={stack:[r],tokenStack:[],config:t,enter:i,exit:o,buffer:a,resume:l,data:n},c=[],u=-1;for(;++u<e.length;)("listOrdered"===e[u][1].type||"listUnordered"===e[u][1].type)&&("enter"===e[u][0]?c.push(u):u=function(e,t,n){let r,a,i,s,o=t-1,l=-1,c=!1;for(;++o<=n;){let t=e[o];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,s=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||s||l||i||(i=o),s=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:s=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let s=o;for(a=void 0;s--;){let t=e[s];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;a&&(e[a][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",a=s}else if("linePrefix"===t[1].type||"blockQuotePrefix"===t[1].type||"blockQuotePrefixWhitespace"===t[1].type||"blockQuoteMarker"===t[1].type||"listItemIndent"===t[1].type);else break}i&&(!a||i<a)&&(r._spread=!0),r.end=Object.assign({},a?e[a][1].start:t[1].end),e.splice(a||o,0,["exit",r,t[2]]),o++,n++}if("listItemPrefix"===t[1].type){let a={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=a,e.splice(o,0,["enter",a,t[2]]),o++,n++,i=void 0,s=!0}}}return e[t][1]._spread=c,n}(e,c.pop(),u));for(u=-1;++u<e.length;){let n=t[e[u][0]];gv.call(n,e[u][1].type)&&n[e[u][1].type].call(Object.assign({sliceSerialize:e[u][2].sliceSerialize},s),e[u][1])}if(s.tokenStack.length>0){let e=s.tokenStack[s.tokenStack.length-1];(e[1]||gS).call(s,void 0,e[0])}for(r.position={start:gT(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:gT(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},u=-1;++u<t.transforms.length;)r=t.transforms[u](r)||r;return r};function r(e,t){return function(n){i.call(this,e(n),n),t&&t.call(this,n)}}function a(){this.stack.push({type:"fragment",children:[]})}function i(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:gT(t.start),end:void 0}}function s(e){return function(t){e&&e.call(this,t),o.call(this,t)}}function o(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]||gS).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+fQ({start:e.start,end:e.end})+"): it’s not open");n.position.end=gT(e.end)}function l(){return hl(this.stack.pop())}function c(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:gT(e.start),end:void 0},t.push(n)),this.stack.push(n)}function u(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=gT(e.end)}function d(){this.data.atHardBreak=!0}function p(e){this.data.characterReferenceType=e.type}function m(){return{type:"code",lang:null,meta:null,value:""}}function f(){return{type:"heading",depth:0,children:[]}}function h(){return{type:"break"}}function g(){return{type:"html",value:""}}function b(){return{type:"link",title:null,url:"",children:[]}}function y(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}})(a)(function(e){for(;!hM(e););return e}((function(e){let t={constructs:hf([gg,...(e||{}).extensions||[]]),content:n(hI),defined:[],document:n(hC),flow:n(hF),lazy:{},string:n(hB),text:n(hz)};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},a={},i=[],s=[],o=[],l={attempt:f(function(e,t){h(e,t.from)}),check:f(m),consume:function(e){hT(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===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=e},enter:function(e,t){let n=t||{};return n.type=e,n.start=p(),c.events.push(["enter",n,c]),o.push(n),n},exit:function(e){let t=o.pop();return t.end=p(),c.events.push(["exit",t,c]),t},interrupt:f(m,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){a[e.line]=e.column,g()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n,r=-1,a=[];for(;++r<e.length;){let i,s=e[r];if("string"==typeof s)i=s;else switch(s){case -5:i="\r";break;case -4:i="\n";break;case -3:i="\r\n";break;case -2:i=t?" ":" ";break;case -1:if(!t&&n)continue;i=" ";break;default:i=String.fromCharCode(s)}n=-2===s,a.push(i)}return a.join("")}(d(e),t)},sliceStream:d,write:function(e){return(s=hp(s,e),function(){let e;for(;r._index<s.length;){let n=s[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),u=u(t)}else u=u(n)}}(),null!==s[s.length-1])?[]:(h(t,0),c.events=hW(i,c.events,c),c.events)}},u=t.tokenize.call(c,l);return t.resolveAll&&i.push(t),c;function d(e){return function(e,t){let n,r=t.start._index,a=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;if(r===i)n=[e[r].slice(a,s)];else{if(n=e.slice(r,i),a>-1){let e=n[0];"string"==typeof e?n[0]=e.slice(a):n.shift()}s>0&&n.push(e[i].slice(0,s))}return n}(s,e)}function p(){let{_bufferIndex:e,_index:t,line:n,column:a,offset:i}=r;return{_bufferIndex:e,_index:t,line:n,column:a,offset:i}}function m(e,t){t.restore()}function f(e,t){return function(n,a,i){var s;let u,d,m,f;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):(s=n,function(e){let t=null!==e&&s[e],n=null!==e&&s.null;return h([...Array.isArray(t)?t:t?[t]:[],...Array.isArray(n)?n:n?[n]:[]])(e)});function h(e){return(u=e,d=0,0===e.length)?i:b(e[d])}function b(e){return function(n){let a,i,s,u,d;return(a=p(),i=c.previous,s=c.currentConstruct,u=c.events.length,d=Array.from(o),f={from:u,restore:function(){r=a,c.previous=i,c.currentConstruct=s,c.events.length=u,o=d,g()}},m=e,e.partial||(c.currentConstruct=e),e.name&&c.parser.constructs.disable.null.includes(e.name))?E(n):e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,y,E)(n)}}function y(t){return e(m,f),a}function E(e){return(f.restore(),++d<u.length)?b(u[d]):i}}}function h(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&hd(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function g(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}(t,e,n)}}})(a).document().write((s=1,o="",l=!0,function(e,t,n){let r,a,c,u,d,p=[];for(e=o+("string"==typeof e?e.toString():new TextDecoder(t||void 0).decode(e)),c=0,o="",l&&(65279===e.charCodeAt(0)&&c++,l=void 0);c<e.length;){if(gb.lastIndex=c,u=(r=gb.exec(e))&&void 0!==r.index?r.index:e.length,d=e.charCodeAt(u),!r){o=e.slice(c);break}if(10===d&&c===u&&i)p.push(-3),i=void 0;else switch(i&&(p.push(-5),i=void 0),c<u&&(p.push(e.slice(c,u)),s+=u-c),d){case 0:p.push(65533),s++;break;case 9:for(a=4*Math.ceil(s/4),p.push(-2);s++<a;)p.push(-1);break;case 10:p.push(-4),s=1;break;default:i=!0,s=1}c=u+1}return n&&(i&&p.push(-5),o&&p.push(o),p.push(null)),p})(n,r,!0))))}}let gk="object"==typeof self?self:globalThis,gw=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw TypeError("unable to deserialize "+e)}return new gk[e](t)},gA=e=>{var t;let n,r;return(t=new Map,n=(e,n)=>(t.set(n,e),e),r=a=>{if(t.has(a))return t.get(a);let[i,s]=e[a];switch(i){case 0:case -1:return n(s,a);case 1:{let e=n([],a);for(let t of s)e.push(r(t));return e}case 2:{let e=n({},a);for(let[t,n]of s)e[r(t)]=r(n);return e}case 3:return n(new Date(s),a);case 4:{let{source:e,flags:t}=s;return n(new RegExp(e,t),a)}case 5:{let e=n(new Map,a);for(let[t,n]of s)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,a);for(let t of s)e.add(r(t));return e}case 7:{let{name:e,message:t}=s;return n(gw(e,t),a)}case 8:return n(BigInt(s),a);case"BigInt":return n(Object(BigInt(s)),a);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{let{buffer:e}=new Uint8Array(s);return n(new DataView(e),s)}}return n(gw(i,s),a)})(0)},{toString:gN}={},{keys:gI}=Object,gC=e=>{let t=typeof e;if("object"!==t||!e)return[0,t];let n=gN.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]},gR=([e,t])=>0===e&&("function"===t||"symbol"===t),gO=(e,{json:t,lossy:n}={})=>{var r,a,i;let s,o,l=[];return(r=!(t||n),a=!!t,i=new Map,s=(e,t)=>{let n=l.push(e)-1;return i.set(t,n),n},o=e=>{if(i.has(e))return i.get(e);let[t,n]=gC(e);switch(t){case 0:{let a=e;switch(n){case"bigint":t=8,a=e.toString();break;case"function":case"symbol":if(r)throw TypeError("unable to serialize "+n);a=null;break;case"undefined":return s([-1],e)}return s([t,a],e)}case 1:{if(n){let t=e;return"DataView"===n?t=new Uint8Array(e.buffer):"ArrayBuffer"===n&&(t=new Uint8Array(e)),s([n,[...t]],e)}let r=[],a=s([t,r],e);for(let t of e)r.push(o(t));return a}case 2:{if(n)switch(n){case"BigInt":return s([n,e.toString()],e);case"Boolean":case"Number":case"String":return s([n,e.valueOf()],e)}if(a&&"toJSON"in e)return o(e.toJSON());let i=[],l=s([t,i],e);for(let t of gI(e))(r||!gR(gC(e[t])))&&i.push([o(t),o(e[t])]);return l}case 3:return s([t,e.toISOString()],e);case 4:{let{source:n,flags:r}=e;return s([t,{source:n,flags:r}],e)}case 5:{let n=[],a=s([t,n],e);for(let[t,a]of e)(r||!(gR(gC(t))||gR(gC(a))))&&n.push([o(t),o(a)]);return a}case 6:{let n=[],a=s([t,n],e);for(let t of e)(r||!gR(gC(t)))&&n.push(o(t));return a}}let{message:l}=e;return s([t,{name:n,message:l}],e)})(e),l},gD="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?gA(gO(e,t)):structuredClone(e):(e,t)=>gA(gO(e,t));function gL(e){let t=[],n=-1,r=0,a=0;for(;++n<e.length;){let i=e.charCodeAt(n),s="";if(37===i&&hg(e.charCodeAt(n+1))&&hg(e.charCodeAt(n+2)))a=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(s=String.fromCharCode(i));else if(i>55295&&i<57344){let t=e.charCodeAt(n+1);i<56320&&t>56319&&t<57344?(s=String.fromCharCode(i,t),a=1):s="�"}else s=String.fromCharCode(i);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+a+1,s=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function gM(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 gP(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}let gj=function(e){var t,n;if(null==e)return gU;if("function"==typeof e)return gF(e);if("object"==typeof e){return Array.isArray(e)?function(e){let t=[],n=-1;for(;++n<e.length;)t[n]=gj(e[n]);return gF(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}(e):(t=e,gF(function(e){let n;for(n in t)if(e[n]!==t[n])return!1;return!0}))}if("string"==typeof e){return n=e,gF(function(e){return e&&e.type===n})}throw Error("Expected function, string, or object as test")};function gF(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 gU(){return!0}let gB=[],gz="skip";function gH(e,t,n,r){let a;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):a=t;let i=gj(a),s=r?-1:1;(function e(a,o,l){let c=a&&"object"==typeof a?a:{};if("string"==typeof c.type){let e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+a.type+(e?"<"+e+">":"")+")"})}return u;function u(){var c;let u,d,p,m=gB;if((!t||i(a,o,l[l.length-1]||void 0))&&!1===(m=Array.isArray(c=n(a,l))?c:"number"==typeof c?[!0,c]:null==c?gB:[c])[0])return m;if("children"in a&&a.children&&a.children&&m[0]!==gz)for(d=(r?a.children.length:-1)+s,p=l.concat(a);d>-1&&d<a.children.length;){if(!1===(u=e(a.children[d],d,p)())[0])return u;d="number"==typeof u[1]?u[1]:d+s}return m}})(e,void 0,[])()}function g$(e,t,n,r){let a,i,s;"function"==typeof t&&"function"!=typeof n?(i=void 0,s=t,a=n):(i=t,s=n,a=r),gH(e,i,function(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return s(e,r,n)},a)}function gG(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 a=e.all(t),i=a[0];i&&"text"===i.type?i.value="["+i.value:a.unshift({type:"text",value:"["});let s=a[a.length-1];return s&&"text"===s.type?s.value+=r:a.push({type:"text",value:r}),a}function gq(e){let t=e.spread;return null==t?e.children.length>1:t}function gW(e,t,n){let r=0,a=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(a-1);for(;9===t||32===t;)a--,t=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}let gV={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={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(r.className=["language-"+a[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i={type:"element",tagName:"pre",properties:{},children:[i=e.applyData(t,i)]},e.patch(t,i),i},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-",a=String(t.identifier).toUpperCase(),i=gL(a.toLowerCase()),s=e.footnoteOrder.indexOf(a),o=e.footnoteCounts.get(a);void 0===o?(o=0,e.footnoteOrder.push(a),n=e.footnoteOrder.length):n=s+1,o+=1,e.footnoteCounts.set(a,o);let l={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+i,id:r+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(n)}]};e.patch(t,l);let c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},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 gG(e,t);let a={src:gL(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(a.title=r.title);let i={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){let n={src:gL(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 gG(e,t);let a={href:gL(r.url||"")};null!==r.title&&void 0!==r.title&&(a.title=r.title);let i={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){let n={href:gL(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),a=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=gq(n[r])}return t}(n):gq(t),i={},s=[];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:[]}),i.className=["task-list-item"]}let o=-1;for(;++o<r.length;){let e=r[o];(a||0!==o||"element"!==e.type||"p"!==e.tagName)&&s.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||a?s.push(e):s.push(...e.children)}let l=r[r.length-1];l&&(a||"element"!==l.type||"p"!==l.tagName)&&s.push({type:"text",value:"\n"});let c={type:"element",tagName:"li",properties:i,children:s};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){let n={},r=e.all(t),a=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++a<r.length;){let e=r[a];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 i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)},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(),a=[];if(r){let n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),a.push(n)}if(n.length>0){let r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},i=fK(t.children[1]),s=fY(t.children[t.children.length-1]);i&&s&&(r.position={start:i,end:s}),a.push(r)}let i={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,i),e.applyData(t,i)},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,a=0===(r?r.indexOf(t):1)?"th":"td",i=n&&"table"===n.type?n.align:void 0,s=i?i.length:t.children.length,o=-1,l=[];for(;++o<s;){let n=t.children[o],r={},s=i?i[o]:void 0;s&&(r.align=s);let c={type:"element",tagName:a,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}let c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){let n={type:"text",value:function(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),a=0,i=[];for(;r;)i.push(gW(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return i.push(gW(t.slice(a),a>0,!1)),i.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:gY,yaml:gY,definition:gY,footnoteDefinition:gY};function gY(){}let gK={}.hasOwnProperty,gX={};function gZ(e,t){e.position&&(t.position=fZ(e))}function gQ(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,a=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&&a&&Object.assign(n.properties,gD(a)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function gJ(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 g0(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function g1(e,t){let n,r,a,i,s=(n=t||gX,r=new Map,a=new Map,i={all:function(e){let t=[];if("children"in e){let n=e.children,r=-1;for(;++r<n.length;){let a=i.one(n[r],e);if(a){if(r&&"break"===n[r-1].type&&(Array.isArray(a)||"text"!==a.type||(a.value=g0(a.value)),!Array.isArray(a)&&"element"===a.type)){let e=a.children[0];e&&"text"===e.type&&(e.value=g0(e.value))}Array.isArray(a)?t.push(...a):t.push(a)}}}return t},applyData:gQ,definitionById:r,footnoteById:a,footnoteCounts:new Map,footnoteOrder:[],handlers:{...gV,...n.handlers},one:function(e,t){let n=e.type,r=i.handlers[n];if(gK.call(i.handlers,n)&&r)return r(i,e,t);if(i.options.passThrough&&i.options.passThrough.includes(n)){if("children"in e){let{children:t,...n}=e,r=gD(n);return r.children=i.all(e),r}return gD(e)}return(i.options.unknownHandler||function(e,t){let n=t.data||{},r="value"in t&&!(gK.call(n,"hProperties")||gK.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)})(i,e,t)},options:n,patch:gZ,wrap:gJ},g$(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){let t="definition"===e.type?r:a,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),i),o=s.one(e,void 0),l=function(e){let t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||gM,r=e.options.footnoteBackLabel||gP,a=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[],l=-1;for(;++l<e.footnoteOrder.length;){let a=e.footnoteById.get(e.footnoteOrder[l]);if(!a)continue;let i=e.all(a),s=String(a.identifier).toUpperCase(),c=gL(s.toLowerCase()),u=0,d=[],p=e.footnoteCounts.get(s);for(;void 0!==p&&++u<=p;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}let m=i[i.length-1];if(m&&"element"===m.type&&"p"===m.tagName){let e=m.children[m.children.length-1];e&&"text"===e.type?e.value+=" ":m.children.push({type:"text",value:" "}),m.children.push(...d)}else i.push(...d);let f={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(i,!0)};e.patch(a,f),o.push(f)}if(0!==o.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...gD(s),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:"\n"}]}}(s),c=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return l&&(ft(),c.children.push({type:"text",value:"\n"},l)),c}function g2(e,t){return e&&"run"in e?async function(n,r){let a=g1(n,{file:r,...t});await e.run(a,r)}:function(n,r){return g1(n,{file:r,...e||t})}}function g3(e){if(e)throw e}var g4=e.i(104100);function g5(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 g6=function(e,t){let n;if(void 0!==t&&"string"!=typeof t)throw TypeError('"ext" argument must be a string');be(e);let r=0,a=-1,i=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else a<0&&(n=!0,a=i+1);return a<0?"":e.slice(r,a)}if(t===e)return"";let s=-1,o=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else s<0&&(n=!0,s=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(a=i):(o=-1,a=s));return r===a?a=s:a<0&&(a=e.length),e.slice(r,a)},g9=function(e){let t;if(be(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)},g8=function(e){let t;be(e);let n=e.length,r=-1,a=0,i=-1,s=0;for(;n--;){let o=e.codePointAt(n);if(47===o){if(t){a=n+1;break}continue}r<0&&(t=!0,r=n+1),46===o?i<0?i=n:1!==s&&(s=1):i>-1&&(s=-1)}return i<0||r<0||0===s||1===s&&i===r-1&&i===a+1?"":e.slice(i,r)},g7=function(...e){var t;let n,r,a,i=-1;for(;++i<e.length;)be(e[i]),e[i]&&(a=void 0===a?e[i]:a+"/"+e[i]);return void 0===a?".":(be(t=a),n=47===t.codePointAt(0),0!==(r=function(e,t){let n,r,a="",i=0,s=-1,o=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else if(47===n)break;else n=47;if(47===n){if(s===l-1||1===o);else if(s!==l-1&&2===o){if(a.length<2||2!==i||46!==a.codePointAt(a.length-1)||46!==a.codePointAt(a.length-2)){if(a.length>2){if((r=a.lastIndexOf("/"))!==a.length-1){r<0?(a="",i=0):i=(a=a.slice(0,r)).length-1-a.lastIndexOf("/"),s=l,o=0;continue}}else if(a.length>0){a="",i=0,s=l,o=0;continue}}t&&(a=a.length>0?a+"/..":"..",i=2)}else a.length>0?a+="/"+e.slice(s+1,l):a=e.slice(s+1,l),i=l-s-1;s=l,o=0}else 46===n&&o>-1?o++:o=-1}return a}(t,!n)).length||n||(r="."),r.length>0&&47===t.codePointAt(t.length-1)&&(r+="/"),n?"/"+r:r)};function be(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}function bt(e){return!!(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}let bn=["history","path","basename","stem","extname","dirname"];class br{constructor(e){let t,n;t=e?bt(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<bn.length;){const e=bn[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)bn.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?g6(this.path):void 0}set basename(e){bi(e,"basename"),ba(e,"basename"),this.path=g7(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?g9(this.path):void 0}set dirname(e){bs(this.basename,"dirname"),this.path=g7(e||"",this.basename)}get extname(){return"string"==typeof this.path?g8(this.path):void 0}set extname(e){if(ba(e,"extname"),bs(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=g7(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){bt(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!bt(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)),bi(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?g6(this.path,this.extname):void 0}set stem(e){bi(e,"stem"),ba(e,"stem"),this.path=g7(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 f2(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 ba(e,t){if(e&&e.includes("/"))throw Error("`"+t+"` cannot be a path: did not expect `/`")}function bi(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function bs(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}let bo=function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},bl={}.hasOwnProperty,bc=new class e extends bo{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 a(i,...s){let o=e[++n],l=-1;if(i)return void r(i);for(;++l<t.length;)(null===s[l]||void 0===s[l])&&(s[l]=t[l]);t=s,o?(function(e,t){let n;return function(...t){let i,s=e.length>t.length;s&&t.push(r);try{i=e.apply(this,t)}catch(e){if(s&&n)throw e;return r(e)}s||(i&&i.then&&"function"==typeof i.then?i.then(a,r):i instanceof Error?r(i):a(i))};function r(e,...a){n||(n=!0,t(e,...a))}function a(e){r(null,e)}})(o,a)(...s):r(null,...s)}(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 t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,g4.default)(!0,{},this.namespace)),t}data(e,t){return"string"==typeof e?2==arguments.length?(bp("data",this.frozen),this.namespace[e]=t,this):bl.call(this.namespace,e)&&this.namespace[e]||void 0:e?(bp("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=bh(e),n=this.parser||this.Parser;return bu("parse",n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),bu("process",this.parser||this.Parser),bd("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,a){let i=bh(e),s=n.parse(i);function o(e,n){e||!n?a(e):r?r(n):(ft(),t(void 0,n))}n.run(s,i,function(e,t,r){var a,i;if(e||!t||!r)return o(e);let s=n.stringify(t,r);"string"==typeof(a=s)||(i=a)&&"object"==typeof i&&"byteLength"in i&&"byteOffset"in i?r.value=s:r.result=s,o(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),bu("processSync",this.parser||this.Parser),bd("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,g3(e),t=r}),bf("processSync","process",n),ft(),t}run(e,t,n){bm(e),this.freeze();let r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?a(void 0,n):new Promise(a);function a(a,i){ft();let s=bh(t);r.run(e,s,function(t,r,s){let o=r||e;t?i(t):a?a(o):(ft(),n(void 0,o,s))})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){g3(e),n=t,r=!0}),bf("runSync","run",r),ft(),n}stringify(e,t){this.freeze();let n=bh(t),r=this.compiler||this.Compiler;return bd("stringify",r),bm(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(bp("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else if("object"==typeof e)Array.isArray(e)?i(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function a(e){if(!("plugins"in e)&&!("settings"in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");i(e.plugins),e.settings&&(r.settings=(0,g4.default)(!0,r.settings,e.settings))}function i(e){let t=-1;if(null==e);else if(Array.isArray(e))for(;++t<e.length;)!function(e){if("function"==typeof e)s(e,[]);else if("object"==typeof e)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}(e[t]);else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,a=-1;for(;++r<n.length;)if(n[r][0]===e){a=r;break}if(-1===a)n.push([e,...t]);else if(t.length>0){let[r,...i]=t,s=n[a][1];g5(s)&&g5(r)&&(r=(0,g4.default)(!0,s,r)),n[a]=[e,r,...i]}}}}().freeze();function bu(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `parser`")}function bd(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `compiler`")}function bp(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 bm(e){if(!g5(e)||"string"!=typeof e.type)throw TypeError("Expected node, got `"+e+"`")}function bf(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function bh(e){var t;return(t=e)&&"object"==typeof t&&"message"in t&&"messages"in t?e:new br(e)}let bg=[],bb={allowDangerousHtml:!0},by=/^(https?|ircs?|mailto|xmpp)$/i,bE=[{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:"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 bx(e){var t;let n,r,a,i,s,o=(n=(t=e).rehypePlugins||bg,r=t.remarkPlugins||bg,a=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...bb}:bb,bc().use(g_).use(r).use(g2,a).use(n)),l=(i=e.children||"",s=new br,"string"==typeof i?s.value=i:fn(),s);return function(e,t){let n=t.allowedElements,r=t.allowElement,a=t.components,i=t.disallowedElements,s=t.skipHtml,o=t.unwrapDisallowed,l=t.urlTransform||bv;for(let e of bE)Object.hasOwn(t,e.from)&&fn((e.from,e.to&&e.to,e.id));return n&&i&&fn(),t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:"root"===e.type?e.children:[e]}),g$(e,function(e,t,a){if("raw"===e.type&&a&&"number"==typeof t)return s?a.children.splice(t,1):a.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in hs)if(Object.hasOwn(hs,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=hs[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=l(String(n||""),t,e))}}if("element"===e.type){let s=n?!n.includes(e.tagName):!!i&&i.includes(e.tagName);if(!s&&r&&"number"==typeof t&&(s=!r(e,t,a)),s&&a&&"number"==typeof t)return o&&e.children?a.children.splice(t,1,...e.children):a.children.splice(t,1),t}}),function(e,t){var n,r,a,i;let s;if(!t||void 0===t.Fragment)throw TypeError("Expected `Fragment` in options");let o=t.filePath||void 0;if(t.development){if("function"!=typeof t.jsxDEV)throw TypeError("Expected `jsxDEV` in options when `development: true`");n=o,r=t.jsxDEV,s=function(e,t,a,i){let s=Array.isArray(a.children),o=fK(e);return r(t,a,i,s,{columnNumber:o?o.column-1:void 0,fileName:n,lineNumber:o?o.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");a=t.jsx,i=t.jsxs,s=function(e,t,n,r){let s=Array.isArray(n.children)?i:a;return r?s(t,n,r):s(t,n)}}let l={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:s,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:o,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?fG:f$,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},c=f7(l,e,void 0);return c&&"string"!=typeof c?c:l.create(e,l.Fragment,{children:c||void 0},void 0)}(e,{Fragment:ec.Fragment,components:a,ignoreInvalidStyle:!0,jsx:ec.jsx,jsxs:ec.jsxs,passKeys:!0,passNode:!0})}(o.runSync(o.parse(l),l),e)}function bv(e){let t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),a=e.indexOf("/");return -1===t||-1!==a&&t>a||-1!==n&&t>n||-1!==r&&t>r||by.test(e.slice(0,t))?e:""}function bT(e,t){let n=String(e);if("string"!=typeof t)throw TypeError("Expected character");let r=0,a=n.indexOf(t);for(;-1!==a;)r++,a=n.indexOf(t,a+t.length);return r}let bS="phrasing",b_=["autolink","link","image","label"];function bk(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function bw(e){this.config.enter.autolinkProtocol.call(this,e)}function bA(e){this.config.exit.autolinkProtocol.call(this,e)}function bN(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];ft(t.type),t.url="http://"+this.sliceSerialize(e)}function bI(e){this.config.exit.autolinkEmail.call(this,e)}function bC(e){this.exit(e)}function bR(e){!function(e,t,n){let r=gj((n||{}).ignore||[]),a=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 a;let e=n[r];t.push(["string"==typeof(a=e[0])?RegExp(function(e){if("string"!=typeof e)throw TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(a),"g"):a,function(e){return"function"==typeof e?e:function(){return e}}(e[1])])}return t}(t),i=-1;for(;++i<a.length;)gH(e,"text",s);function s(e,t){let n,s=-1;for(;++s<t.length;){let e=t[s],a=n?n.children:void 0;if(r(e,a?a.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){let n=t[t.length-1],r=a[i][0],s=a[i][1],o=0,l=n.children.indexOf(e),c=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,a={index:d.index,input:d.input,stack:[...t,e]},i=s(...d,a);if("string"==typeof i&&(i=i.length>0?{type:"text",value:i}:void 0),!1===i?r.lastIndex=n+1:(o!==n&&u.push({type:"text",value:e.value.slice(o,n)}),Array.isArray(i)?u.push(...i):i&&u.push(i),o=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}return c?(o<e.value.length&&u.push({type:"text",value:e.value.slice(o)}),n.children.splice(l,1,...u)):u=[e],l+u.length}(e,t)}}(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,bO],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,bD]],{ignore:["link","linkReference"]})}function bO(e,t,n,r,a){let i,s="";if(!bL(a))return!1;if(/^w/i.test(t)&&(n=t+n,t="",s="http://"),(i=n.split(".")).length<2||i[i.length-1]&&(/_/.test(i[i.length-1])||!/[a-zA-Z\d]/.test(i[i.length-1]))||i[i.length-2]&&(/_/.test(i[i.length-2])||!/[a-zA-Z\d]/.test(i[i.length-2])))return!1;let o=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(")"),a=bT(e,"("),i=bT(e,")");for(;-1!==r&&a>i;)e+=n.slice(0,r+1),r=(n=n.slice(r+1)).indexOf(")"),i++;return[e,n]}(n+r);if(!o[0])return!1;let l={type:"link",title:null,url:s+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[l,{type:"text",value:o[1]}]:l}function bD(e,t,n,r){return!(!bL(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function bL(e,t){let n=e.input.charCodeAt(e.index-1);return(0===e.index||hw(n)||hk(n))&&(!t||47!==n)}function bM(){this.buffer()}function bP(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function bj(){this.buffer()}function bF(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function bU(e){let t=this.resume(),n=this.stack[this.stack.length-1];ft(n.type),n.identifier=h8(this.sliceSerialize(e)).toLowerCase(),n.label=t}function bB(e){this.exit(e)}function bz(e){let t=this.resume(),n=this.stack[this.stack.length-1];ft(n.type),n.identifier=h8(this.sliceSerialize(e)).toLowerCase(),n.label=t}function bH(e){this.exit(e)}function b$(e,t,n,r){let a=n.createTracker(r),i=a.move("[^"),s=n.enter("footnoteReference"),o=n.enter("reference");return i+=a.move(n.safe(n.associationId(e),{after:"]",before:i})),o(),s(),i+=a.move("]")}function bG(e,t,n){return 0===t?e:bq(e,t,n)}function bq(e,t,n){return(n?"":" ")+e}b$.peek=function(){return"["};let bW=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function bV(e){this.enter({type:"delete",children:[]},e)}function bY(e){this.exit(e)}function bK(e,t,n,r){let a=n.createTracker(r),i=n.enter("strikethrough"),s=a.move("~~");return s+=n.containerPhrasing(e,{...a.current(),before:s,after:"~"}),s+=a.move("~~"),i(),s}function bX(e){return e.length}function bZ(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)}bK.peek=function(){return"~"};function bQ(e,t,n){let r=e.value||"",a="`",i=-1;for(;RegExp("(^|[^`])"+a+"([^`]|$)").test(r);)a+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){let e,t=n.unsafe[i],a=n.compilePattern(t);if(t.atBreak)for(;e=a.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 a+r+a}bQ.peek=function(){return"`"};gj(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);let bJ=function(e,t,n,r){let a=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),i=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&&(i=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+i);let s=i.length+1;("tab"===a||"mixed"===a&&(t&&"list"===t.type&&t.spread||e.spread))&&(s=4*Math.ceil(s/4));let o=n.createTracker(r);o.move(i+" ".repeat(s-i.length)),o.shift(s);let l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,o.current()),function(e,t,n){return t?(n?"":" ".repeat(s))+e:(n?i:i+" ".repeat(s-i.length))+e});return l(),c};function b0(e){let t=e._align;ft(),this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function b1(e){this.exit(e),this.data.inTable=void 0}function b2(e){this.enter({type:"tableRow",children:[]},e)}function b3(e){this.exit(e)}function b4(e){this.enter({type:"tableCell",children:[]},e)}function b5(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,b6));let n=this.stack[this.stack.length-1];ft(n.type),n.value=t,this.exit(e)}function b6(e,t){return"|"===t?t:e}function b9(e){let t=this.stack[this.stack.length-2];ft(t.type),t.checked="taskListCheckValueChecked"===e.type}function b8(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];ft(e.type);let n=e.children[0];if(n&&"text"===n.type){let r,a=t.children,i=-1;for(;++i<a.length;){let e=a[i];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 b7(e,t,n,r){let a=e.children[0],i="boolean"==typeof e.checked&&a&&"paragraph"===a.type,s="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);i&&o.move(s);let l=bJ(e,t,n,{...r,...o.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+s})),l}let ye={tokenize:function(e,t,n){let r=0;return function t(i){return(87===i||119===i)&&r<3?(r++,e.consume(i),t):46===i&&3===r?(e.consume(i),a):n(i)};function a(e){return null===e?n(e):t(e)}},partial:!0},yt={tokenize:function(e,t,n){let r,a,i;return s;function s(t){return 46===t||95===t?e.check(yr,l,o)(t):null===t||hS(t)||hw(t)||45!==t&&hk(t)?l(t):(i=!0,e.consume(t),s)}function o(t){return 95===t?r=!0:(a=r,r=void 0),e.consume(t),s}function l(e){return a||r||!i?n(e):t(e)}},partial:!0},yn={tokenize:function(e,t){let n=0,r=0;return a;function a(s){return 40===s?(n++,e.consume(s),a):41===s&&r<n?i(s):33===s||34===s||38===s||39===s||41===s||42===s||44===s||46===s||58===s||59===s||60===s||63===s||93===s||95===s||126===s?e.check(yr,t,i)(s):null===s||hS(s)||hw(s)?t(s):(e.consume(s),a)}function i(t){return 41===t&&r++,e.consume(t),a}},partial:!0},yr={tokenize:function(e,t,n){return r;function r(s){return 33===s||34===s||39===s||41===s||42===s||44===s||46===s||58===s||59===s||63===s||95===s||126===s?(e.consume(s),r):38===s?(e.consume(s),i):93===s?(e.consume(s),a):60===s||null===s||hS(s)||hw(s)?t(s):n(s)}function a(e){return null===e||40===e||91===e||hS(e)||hw(e)?t(e):r(e)}function i(t){return hh(t)?function t(a){return 59===a?(e.consume(a),r):hh(a)?(e.consume(a),t):n(a)}(t):n(t)}},partial:!0},ya={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return hg(e)?n(e):t(e)}},partial:!0},yi={name:"wwwAutolink",tokenize:function(e,t,n){let r=this;return function(t){return 87!==t&&119!==t||!yu.call(r,r.previous)||yf(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(ye,e.attempt(yt,e.attempt(yn,a),n),n)(t))};function a(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:yu},ys={name:"protocolAutolink",tokenize:function(e,t,n){let r=this,a="",i=!1;return function(t){return(72===t||104===t)&&yd.call(r,r.previous)&&!yf(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(t),e.consume(t),s):n(t)};function s(t){if(hh(t)&&a.length<5)return a+=String.fromCodePoint(t),e.consume(t),s;if(58===t){let n=a.toLowerCase();if("http"===n||"https"===n)return e.consume(t),o}return n(t)}function o(t){return 47===t?(e.consume(t),i)?l:(i=!0,o):n(t)}function l(t){return null===t||hy(t)||hS(t)||hw(t)||hk(t)?n(t):e.attempt(yt,e.attempt(yn,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:yd},yo={name:"emailAutolink",tokenize:function(e,t,n){let r,a,i=this;return function(t){return!ym(t)||!yp.call(i,i.previous)||yf(i.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),function t(r){return ym(r)?(e.consume(r),t):64===r?(e.consume(r),s):n(r)}(t))};function s(t){return 46===t?e.check(ya,l,o)(t):45===t||95===t||hg(t)?(a=!0,e.consume(t),s):l(t)}function o(t){return e.consume(t),r=!0,s}function l(s){return a&&r&&hh(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(s)):n(s)}},previous:yp},yl={},yc=48;for(;yc<123;)yl[yc]=yo,58==++yc?yc=65:91===yc&&(yc=97);function yu(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||hS(e)}function yd(e){return!hh(e)}function yp(e){return!(47===e||ym(e))}function ym(e){return 43===e||45===e||46===e||95===e||hg(e)}function yf(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}yl[43]=yo,yl[45]=yo,yl[46]=yo,yl[95]=yo,yl[72]=[yo,ys],yl[104]=[yo,ys],yl[87]=[yo,yi],yl[119]=[yo,yi];let yh={tokenize:function(e,t,n){let r=this;return hN(e,function(e){let a=r.events[r.events.length-1];return a&&"gfmFootnoteDefinitionIndent"===a[1].type&&4===a[2].sliceSerialize(a[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function yg(e,t,n){let r,a=this,i=a.events.length,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);for(;i--;){let e=a.events[i][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(i){if(!r||!r._balanced)return n(i);let o=h8(a.sliceSerialize({start:r.end,end:a.now()}));return 94===o.codePointAt(0)&&s.includes(o.slice(1))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(i),e.exit("gfmFootnoteCallLabelMarker"),t(i)):n(i)}}function yb(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)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;let i={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function yy(e,t,n){let r,a=this,i=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]),s=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),o};function o(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(o){if(s>999||93===o&&!r||null===o||91===o||hS(o))return n(o);if(93===o){e.exit("chunkString");let r=e.exit("gfmFootnoteCallString");return i.includes(h8(a.sliceSerialize(r)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(o)}return hS(o)||(r=!0),s++,e.consume(o),92===o?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),s++,l):l(t)}}function yE(e,t,n){let r,a,i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]),o=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(o>999||93===t&&!a||null===t||91===t||hS(t))return n(t);if(93===t){e.exit("chunkString");let n=e.exit("gfmFootnoteDefinitionLabelString");return r=h8(i.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return hS(t)||(a=!0),o++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),o++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),s.includes(r)||s.push(r),hN(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function yx(e,t,n){return e.check(hO,t,e.attempt(yh,t,n))}function yv(e){e.exit("gfmFootnoteDefinition")}class yT{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let a=0;if(0!==n||0!==r.length){for(;a<e.map.length;){if(e.map[a][0]===t){e.map[a][1]+=n,e.map[a][2].push(...r);return}a+=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 yS(e,t,n){let r,a=this,i=0,s=0;return function(e){let t=a.events.length-1;for(;t>-1;){let e=a.events[t][1].type;if("lineEnding"===e||"linePrefix"===e)t--;else break}let r=t>-1?a.events[t][1].type:null,i="tableHead"===r||"tableRow"===r?y:o;return i===y&&a.parser.lazy[a.now().line]?n(e):i(e)};function o(t){var n;return e.enter("tableHead"),e.enter("tableRow"),124===(n=t)||(r=!0,s+=1),l(n)}function l(t){return null===t?n(t):hT(t)?s>1?(s=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):h_(t)?hN(e,l,"whitespace")(t):(s+=1,r&&(r=!1,i+=1),124===t)?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),r=!0,l):(e.enter("data"),c(t))}function c(t){return null===t||124===t||hS(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return(a.interrupt=!1,a.parser.lazy[a.now().line])?n(t):(e.enter("tableDelimiterRow"),r=!1,h_(t))?hN(e,p,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t)}function p(t){return 45===t||58===t?f(t):124===t?(r=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),m):n(t)}function m(t){return h_(t)?hN(e,f,"whitespace")(t):f(t)}function f(t){return 58===t?(s+=1,r=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),h):45===t?(s+=1,h(t)):null===t||hT(t)?b(t):n(t)}function h(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 h_(t)?hN(e,b,"whitespace")(t):b(t)}function b(a){if(124===a)return p(a);if(null===a||hT(a))return r&&i===s?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(a)):n(a);return n(a)}function y(t){return e.enter("tableRow"),E(t)}function E(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),E):null===n||hT(n)?(e.exit("tableRow"),t(n)):h_(n)?hN(e,E,"whitespace")(n):(e.enter("data"),x(n))}function x(t){return null===t||124===t||hS(t)?(e.exit("data"),E(t)):(e.consume(t),92===t?v:x)}function v(t){return 92===t||124===t?(e.consume(t),x):x(t)}}function y_(e,t){let n,r,a,i=-1,s=!0,o=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0,p=new yT;for(;++i<e.length;){let m=e[i],f=m[1];"enter"===m[0]?"tableHead"===f.type?(u=!1,0!==d&&(yw(p,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},f.start),end:Object.assign({},f.end)},p.add(i,0,[["enter",n,t]])):"tableRow"===f.type||"tableDelimiterRow"===f.type?(s=!0,a=void 0,l=[0,0,0,0],c=[0,i+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},f.start),end:Object.assign({},f.end)},p.add(i,0,[["enter",r,t]])),o="tableDelimiterRow"===f.type?2:r?3:1):o&&("data"===f.type||"tableDelimiterMarker"===f.type||"tableDelimiterFiller"===f.type)?(s=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],a=yk(p,t,l,o,void 0,a),l=[0,0,0,0]),c[2]=i)):"tableCellDivider"===f.type&&(s?s=!1:(0!==l[1]&&(c[0]=c[1],a=yk(p,t,l,o,void 0,a)),c=[(l=c)[1],i,0,0])):"tableHead"===f.type?(u=!0,d=i):"tableRow"===f.type||"tableDelimiterRow"===f.type?(d=i,0!==l[1]?(c[0]=c[1],a=yk(p,t,l,o,i,a)):0!==c[1]&&(a=yk(p,t,c,o,i,a)),o=0):o&&("data"===f.type||"tableDelimiterMarker"===f.type||"tableDelimiterFiller"===f.type)&&(c[3]=i)}for(0!==d&&yw(p,t,d,n,r),p.consume(t.events),i=-1;++i<t.events.length;){let e=t.events[i];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=function(e,t){let n=!1,r=[];for(;t<e.length;){let a=e[t];if(n){if("enter"===a[0])"tableContent"===a[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===a[1].type){if("tableDelimiterMarker"===e[t-1][1].type){let e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===a[1].type)break}else"enter"===a[0]&&"tableDelimiterRow"===a[1].type&&(n=!0);t+=1}return r}(t.events,i))}return e}function yk(e,t,n,r,a,i){0!==n[0]&&(i.end=Object.assign({},yA(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));let s=yA(t.events,n[1]);if(i={type:1===r?"tableHeader":2===r?"tableDelimiter":"tableData",start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",i,t]]),0!==n[2]){let a=yA(t.events,n[2]),i=yA(t.events,n[3]),s={type:"tableContent",start:Object.assign({},a),end:Object.assign({},i)};if(e.add(n[2],0,[["enter",s,t]]),2!==r){let r=t.events[n[2]],a=t.events[n[3]];if(r[1].end=Object.assign({},a[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",s,t]])}return void 0!==a&&(i.end=Object.assign({},yA(t.events,a)),e.add(a,0,[["exit",i,t]]),i=void 0),i}function yw(e,t,n,r,a){let i=[],s=yA(t.events,n);a&&(a.end=Object.assign({},s),i.push(["exit",a,t])),r.end=Object.assign({},s),i.push(["exit",r,t]),e.add(n+1,0,i)}function yA(e,t){let n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}let yN={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"),a):n(t)};function a(t){return hS(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),i):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),i):n(t)}function i(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(t)}function s(r){return hT(r)?t(r):h_(r)?e.check({tokenize:yI},t,n)(r):n(r)}}};function yI(e,t,n){return hN(e,function(e){return null===e?n(e):t(e)},"whitespace")}let yC={};function yR(e){let t,n,r,a=e||yC,i=this.data(),s=i.micromarkExtensions||(i.micromarkExtensions=[]),o=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),l=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);s.push(hf([{text:yl},{document:{91:{name:"gfmFootnoteDefinition",tokenize:yE,continuation:{tokenize:yx},exit:yv}},text:{91:{name:"gfmFootnoteCall",tokenize:yy},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:yg,resolveTo:yb}}},(t=(a||{}).singleTilde,n={name:"strikethrough",tokenize:function(e,n,r){let a=this.previous,i=this.events,s=0;return function(o){return 126===a&&"characterEscape"!==i[i.length-1][1].type?r(o):(e.enter("strikethroughSequenceTemporary"),function i(o){let l=hq(a);if(126===o)return s>1?r(o):(e.consume(o),s++,i);if(s<2&&!t)return r(o);let c=e.exit("strikethroughSequenceTemporary"),u=hq(o);return c._open=!u||2===u&&!!l,c._close=!l||2===l&&!!u,n(o)}(o))}},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 a={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},i={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},s=[["enter",a,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",i,t]],o=t.parser.constructs.insideSpan.null;o&&hd(s,s.length,0,hW(o,e.slice(r+1,n),t)),hd(s,s.length,0,[["exit",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",a,t]]),hd(e,r-1,n-r+3,s),n=r+s.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:yS,resolveAll:y_}}},{text:{91:yN}}])),o.push([{transforms:[bR],enter:{literalAutolink:bk,literalAutolinkEmail:bw,literalAutolinkHttp:bw,literalAutolinkWww:bw},exit:{literalAutolink:bC,literalAutolinkEmail:bI,literalAutolinkHttp:bA,literalAutolinkWww:bN}},{enter:{gfmFootnoteCallString:bM,gfmFootnoteCall:bP,gfmFootnoteDefinitionLabelString:bj,gfmFootnoteDefinition:bF},exit:{gfmFootnoteCallString:bU,gfmFootnoteCall:bB,gfmFootnoteDefinitionLabelString:bz,gfmFootnoteDefinition:bH}},{canContainEols:["delete"],enter:{strikethrough:bV},exit:{strikethrough:bY}},{enter:{table:b0,tableData:b4,tableHeader:b4,tableRow:b2},exit:{codeText:b5,table:b1,tableData:b3,tableHeader:b3,tableRow:b3}},{exit:{taskListCheckValueChecked:b9,taskListCheckValueUnchecked:b9,paragraph:b8}}]),l.push({extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:bS,notInConstruct:b_},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:bS,notInConstruct:b_},{character:":",before:"[ps]",after:"\\/",inConstruct:bS,notInConstruct:b_}]},(r=!1,a&&a.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:function(e,t,n,a){let i=n.createTracker(a),s=i.move("[^"),o=n.enter("footnoteDefinition"),l=n.enter("label");return s+=i.move(n.safe(n.associationId(e),{before:s,after:"]"})),l(),s+=i.move("]:"),e.children&&e.children.length>0&&(i.shift(4),s+=i.move((r?"\n":" ")+n.indentLines(n.containerFlow(e,i.current()),r?bq:bG))),o(),s},footnoteReference:b$},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:bW}],handlers:{delete:bK}},function(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,a=t.stringLength,i=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=bQ(e,t,n);return n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&")),r},table:function(e,t,n,r){return o(function(e,t,n){let r=e.children,a=-1,i=[],s=t.enter("table");for(;++a<r.length;)i[a]=l(r[a],t,n);return s(),i}(e,n,r),e.align)},tableCell:s,tableRow:function(e,t,n,r){let a=o([l(e,n,r)]);return a.slice(0,a.indexOf("\n"))}}};function s(e,t,n,r){let a=n.enter("tableCell"),s=n.enter("phrasing"),o=n.containerPhrasing(e,{...r,before:i,after:i});return s(),a(),o}function o(e,t){return function(e,t){let n=t||{},r=(n.align||[]).concat(),a=n.stringLength||bX,i=[],s=[],o=[],l=[],c=0,u=-1;for(;++u<e.length;){let t=[],r=[],i=-1;for(e[u].length>c&&(c=e[u].length);++i<e[u].length;){var d;let s=null==(d=e[u][i])?"":String(d);if(!1!==n.alignDelimiters){let e=a(s);r[i]=e,(void 0===l[i]||e>l[i])&&(l[i]=e)}t.push(s)}s[u]=t,o[u]=r}let p=-1;if("object"==typeof r&&"length"in r)for(;++p<c;)i[p]=bZ(r[p]);else{let e=bZ(r);for(;++p<c;)i[p]=e}p=-1;let m=[],f=[];for(;++p<c;){let e=i[p],t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let a=!1===n.alignDelimiters?1:Math.max(1,l[p]-t.length-r.length),s=t+"-".repeat(a)+r;!1!==n.alignDelimiters&&((a=t.length+a+r.length)>l[p]&&(l[p]=a),f[p]=a),m[p]=s}s.splice(1,0,m),o.splice(1,0,f),u=-1;let h=[];for(;++u<s.length;){let e=s[u],t=o[u];p=-1;let r=[];for(;++p<c;){let a=e[p]||"",s="",o="";if(!1!==n.alignDelimiters){let e=l[p]-(t[p]||0),n=i[p];114===n?s=" ".repeat(e):99===n?e%2?(s=" ".repeat(e/2+.5),o=" ".repeat(e/2-.5)):o=s=" ".repeat(e/2):o=" ".repeat(e)}!1===n.delimiterStart||p||r.push("|"),!1!==n.padding&&(!1!==n.alignDelimiters||""!==a)&&(!1!==n.delimiterStart||p)&&r.push(" "),!1!==n.alignDelimiters&&r.push(s),r.push(a),!1!==n.alignDelimiters&&r.push(o),!1!==n.padding&&r.push(" "),(!1!==n.delimiterEnd||p!==c-1)&&r.push("|")}h.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return h.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:a})}function l(e,t,n){let r=e.children,a=-1,i=[],o=t.enter("tableRow");for(;++a<r.length;)i[a]=s(r[a],e,t,n);return o(),i}}(a),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:b7}}]})}let yO={tokenize:function(e,t,n){let r=this,a=r.events[r.events.length-1],i=a&&"linePrefix"===a[1].type?a[2].sliceSerialize(a[1],!0).length:0,s=0;return function(t){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),function t(r){return 36===r?(e.consume(r),s++,t):s<2?n(r):(e.exit("mathFlowFenceSequence"),hN(e,o,"whitespace")(r))}(t)};function o(t){return null===t||hT(t)?l(t):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),function t(r){return null===r||hT(r)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),l(r)):36===r?n(r):(e.consume(r),t)}(t))}function l(n){return(e.exit("mathFlowFence"),r.interrupt)?t(n):e.attempt(yD,c,p)(n)}function c(t){return e.attempt({tokenize:m,partial:!0},p,u)(t)}function u(t){return(i?hN(e,d,"linePrefix",i+1):d)(t)}function d(t){return null===t?p(t):hT(t)?e.attempt(yD,c,p)(t):(e.enter("mathFlowValue"),function t(n){return null===n||hT(n)?(e.exit("mathFlowValue"),d(n)):(e.consume(n),t)}(t))}function p(n){return e.exit("mathFlow"),t(n)}function m(e,t,n){let a=0;return hN(e,function(t){return e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),function t(r){return 36===r?(a++,e.consume(r),t):a<s?n(r):(e.exit("mathFlowFenceSequence"),hN(e,i,"whitespace")(r))}(t)},"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function i(r){return null===r||hT(r)?(e.exit("mathFlowFence"),t(r)):n(r)}}},concrete:!0,name:"mathFlow"},yD={tokenize:function(e,t,n){let r=this;return function(n){return null===n?t(n):(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),a)};function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0};function yL(e){let t,n,r=e.length-4,a=3;if(("lineEnding"===e[3][1].type||"space"===e[a][1].type)&&("lineEnding"===e[r][1].type||"space"===e[r][1].type)){for(t=a;++t<r;)if("mathTextData"===e[t][1].type){e[r][1].type="mathTextPadding",e[a][1].type="mathTextPadding",a+=2,r-=2;break}}for(t=a-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="mathTextData",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}function yM(e){return 36!==e||"characterEscape"===this.events[this.events.length-1][1].type}let yP={};function yj(e){let t,n=e||yP,r=this.data(),a=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);a.push({flow:{36:yO},text:{36:(null==(t=(n||{}).singleDollarTextMath)&&(t=!0),{tokenize:function(e,n,r){let a,i,s=0;return function(n){return e.enter("mathText"),e.enter("mathTextSequence"),function n(a){return 36===a?(e.consume(a),s++,n):s<2&&!t?r(a):(e.exit("mathTextSequence"),o(a))}(n)};function o(t){return null===t?r(t):36===t?(i=e.enter("mathTextSequence"),a=0,function t(r){return 36===r?(e.consume(r),a++,t):a===s?(e.exit("mathTextSequence"),e.exit("mathText"),n(r)):(i.type="mathTextData",l(r))}(t)):32===t?(e.enter("space"),e.consume(t),e.exit("space"),o):hT(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):(e.enter("mathTextData"),l(t))}function l(t){return null===t||32===t||36===t||hT(t)?(e.exit("mathTextData"),o(t)):(e.consume(t),l)}},resolve:yL,previous:yM,name:"mathText"})}}),i.push(function(){return{enter:{mathFlow:function(e){this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[{type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]}]}},e)},mathFlowFenceMeta:function(){this.buffer()},mathText:function(e){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},e),this.buffer()}},exit:{mathFlow:function(e){let t=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),n=this.stack[this.stack.length-1];ft(n.type),this.exit(e),n.value=t;let r=n.data.hChildren[0];ft(r.type),ft(r.tagName),r.children.push({type:"text",value:t}),this.data.mathFlowInside=void 0},mathFlowFence:function(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)},mathFlowFenceMeta:function(){let e=this.resume(),t=this.stack[this.stack.length-1];ft(t.type),t.meta=e},mathFlowValue:e,mathText:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];ft(n.type),this.exit(e),n.value=t,n.data.hChildren.push({type:"text",value:t})},mathTextData:e}};function e(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}}()),s.push(function(e){let t=(e||{}).singleDollarTextMath;return null==t&&(t=!0),n.peek=function(){return"$"},{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:"\n",inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:function(e,t,n,r){let a=e.value||"",i=n.createTracker(r),s="$".repeat(Math.max(function(e){let t=String(e),n=t.indexOf("$"),r=n,a=0,i=0;!1;for(;-1!==n;)n===r?++a>i&&(i=a):a=1,r=n+1,n=t.indexOf("$",r);return i}(a)+1,2)),o=n.enter("mathFlow"),l=i.move(s);if(e.meta){let t=n.enter("mathFlowMeta");l+=i.move(n.safe(e.meta,{after:"\n",before:l,encode:["$"],...i.current()})),t()}return l+=i.move("\n"),a&&(l+=i.move(a+"\n")),l+=i.move(s),o(),l},inlineMath:n}};function n(e,n,r){let a=e.value||"",i=1;for(!t&&i++;RegExp("(^|[^$])"+"\\$".repeat(i)+"([^$]|$)").test(a);)i++;let s="$".repeat(i);/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^\$|\$$/.test(a))&&(a=" "+a+" ");let o=-1;for(;++o<r.unsafe.length;){let e,t=r.unsafe[o];if(!t.atBreak)continue;let n=r.compilePattern(t);for(;e=n.exec(a);){let t=e.index;10===a.codePointAt(t)&&13===a.codePointAt(t-1)&&t--,a=a.slice(0,t)+" "+a.slice(e.index+1)}}return s+a+s}}(n))}let yF=/[#.]/g;function yU(e,t,n){let r=n?function(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}(n):void 0;return function(n,a,...i){let s;if(null==n)s={type:"root",children:[]},i.unshift(a);else{let o=(s=function(e,t){let n,r,a=e||"",i={},s=0;for(;s<a.length;){yF.lastIndex=s;let e=yF.exec(a),t=a.slice(s,e?e.index:a.length);t&&(n?"#"===n?i.id=t:Array.isArray(i.className)?i.className.push(t):i.className=[t]:r=t,s+=t.length),e&&(n=e[0],s++)}return{type:"element",tagName:r||t||"div",properties:i,children:[]}}(n,t)).tagName.toLowerCase(),l=r?r.get(o):void 0;if(s.tagName=l||o,function(e){if(null===e||"object"!=typeof e||Array.isArray(e))return!0;if("string"!=typeof e.type)return!1;for(let t of Object.keys(e)){let n=e[t];if(n&&"object"==typeof n){if(!Array.isArray(n))return!0;for(let e of n)if("number"!=typeof e&&"string"!=typeof e)return!0}}return!!("children"in e&&Array.isArray(e.children))}(a))i.unshift(a);else for(let[t,n]of Object.entries(a))!function(e,t,n,r){let a,i=fN(e,n);if(null!=r){if("number"==typeof r){if(Number.isNaN(r))return;a=r}else a="boolean"==typeof r?r:"string"==typeof r?i.spaceSeparated?fq(r):i.commaSeparated?fr(r):i.commaOrSpaceSeparated?fq(fr(r).join(" ")):yB(i,i.property,r):Array.isArray(r)?[...r]:"style"===i.property?function(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(yB(i,i.property,t));a=e}"className"===i.property&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}(e,s.properties,t,n)}for(let e of i)!function e(t,n){if(null==n);else if("number"==typeof n||"string"==typeof n)t.push({type:"text",value:String(n)});else if(Array.isArray(n))for(let r of n)e(t,r);else if("object"==typeof n&&"type"in n)"root"===n.type?e(t,n.children):t.push(n);else throw Error("Expected node, nodes, or string, got `"+n+"`")}(s.children,e);return"element"===s.type&&"template"===s.tagName&&(s.content={type:"root",children:s.children},s.children=[]),s}}function yB(e,t,n){if("string"==typeof n){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(""===n||f_(n)===f_(t)))return!0}return n}let yz=yU(f$,"div"),yH=yU(fG,"g",["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"]);function y$(e,t){let n=e.indexOf("\r",t),r=e.indexOf("\n",t);return -1===r?n:-1===n||n+1===r?r:n<r?n:r}let yG={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},yq={}.hasOwnProperty,yW=Object.prototype;function yV(e,t){let n;switch(t.nodeName){case"#comment":return n={type:"comment",value:t.data},yK(e,t,n),n;case"#document":case"#document-fragment":{let r="mode"in t&&("quirks"===t.mode||"limited-quirks"===t.mode);if(n={type:"root",children:yY(e,t.childNodes),data:{quirksMode:r}},e.file&&e.location){let t,r,a=String(e.file),i=(t=String(a),r=[],{toOffset:function(e){if(e&&"number"==typeof e.line&&"number"==typeof e.column&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;r.length<e.line;){let e=r[r.length-1],n=y$(t,e),a=-1===n?t.length+1:n+1;if(e===a)break;r.push(a)}let n=(e.line>1?r[e.line-2]:0)+e.column-1;if(n<r[e.line-1])return n}},toPoint:function(e){if("number"==typeof e&&e>-1&&e<=t.length){let n=0;for(;;){let a=r[n];if(void 0===a){let e=y$(t,r[n-1]);a=-1===e?t.length+1:e+1,r[n]=a}if(a>e)return{line:n+1,column:e-(n>0?r[n-1]:0)+1,offset:e};n++}}}}),s=i.toPoint(0),o=i.toPoint(a.length);ft(),ft(),n.position={start:s,end:o}}return n}case"#documentType":return yK(e,t,n={type:"doctype"}),n;case"#text":return n={type:"text",value:t.value},yK(e,t,n),n;default:return function(e,t){let n=e.schema;e.schema=t.namespaceURI===yG.svg?fG:f$;let r=-1,a={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+":":"")+e.name;yq.call(yW,n)||(a[n]=e.value)}let i=("svg"===e.schema.space?yH:yz)(t.tagName,a,yY(e,t.childNodes));if(yK(e,t,i),"template"===i.tagName){let n=t.sourceCodeLocation,r=n&&n.startTag&&yX(n.startTag),a=n&&n.endTag&&yX(n.endTag),s=yV(e,t.content);r&&a&&e.file&&(s.position={start:r.end,end:a.start}),i.content=s}return e.schema=n,i}(e,t)}}function yY(e,t){let n=-1,r=[];for(;++n<t.length;){let a=yV(e,t[n]);r.push(a)}return r}function yK(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){let r=function(e,t,n){let r=yX(n);if("element"===t.type){let a=t.children[t.children.length-1];if(r&&!n.endTag&&a&&a.position&&a.position.end&&(r.end=Object.assign({},a.position.end)),e.verbose){let r,a={};if(n.attrs)for(r in n.attrs)yq.call(n.attrs,r)&&(a[fN(e.schema,r).property]=yX(n.attrs[r]));ft(n.startTag);let i=yX(n.startTag),s=n.endTag?yX(n.endTag):void 0,o={opening:i};s&&(o.closing=s),o.properties=a,t.data={position:o}}}return r}(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function yX(e){let t=yZ({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=yZ({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function yZ(e){return e.line&&e.column?e:void 0}let yQ={}.hasOwnProperty;function yJ(e,t){let n=t||{};function r(t,...n){let a=r.invalid,i=r.handlers;if(t&&yQ.call(t,e)){let n=String(t[e]);a=yQ.call(i,n)?i[n]:r.unknown}if(a)return a.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}let y0={}.hasOwnProperty,y1=yJ("type",{handlers:{root:function(e,t){let n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=y2(e.children,n,t),y3(e,n),n},element:function(e,t){var n,r;let a,i,s=t;"element"===e.type&&"svg"===e.tagName.toLowerCase()&&"html"===t.space&&(s=fG);let o=[];if(e.properties){for(a in e.properties)if("children"!==a&&y0.call(e.properties,a)){let t=function(e,t,n){let r=fN(e,t);if(!1===n||null==n||"number"==typeof n&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?fa(n):fW(n));let a={name:r.attribute,value:!0===n?"":String(n)};if(r.space&&"html"!==r.space&&"svg"!==r.space){let e=a.name.indexOf(":");e<0?a.prefix="":(a.name=a.name.slice(e+1),a.prefix=r.attribute.slice(0,e)),a.namespace=yG[r.space]}return a}(s,a,e.properties[a]);t&&o.push(t)}}let l=s.space;ft();let c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:yG[l],childNodes:[],parentNode:null};return c.childNodes=y2(e.children,c,s),y3(e,c),"template"===e.tagName&&e.content&&(n=e.content,r=s,(i={nodeName:"#document-fragment",childNodes:[]}).childNodes=y2(n.children,i,r),y3(n,i),c.content=i),c},text:function(e){let t={nodeName:"#text",value:e.value,parentNode:null};return y3(e,t),t},comment:function(e){let t={nodeName:"#comment",data:e.value,parentNode:null};return y3(e,t),t},doctype:function(e){let t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return y3(e,t),t}}});function y2(e,t,n){let r=-1,a=[];if(e)for(;++r<e.length;){let i=y1(e[r],n);i.parentNode=t,a.push(i)}return a}function y3(e,t){let n=e.position;n&&n.start&&n.end&&(ft(n.start.offset),ft(n.end.offset),t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}let y4=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],y5=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]);(N=W||(W={}))[N.EOF=-1]="EOF",N[N.NULL=0]="NULL",N[N.TABULATION=9]="TABULATION",N[N.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",N[N.LINE_FEED=10]="LINE_FEED",N[N.FORM_FEED=12]="FORM_FEED",N[N.SPACE=32]="SPACE",N[N.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",N[N.QUOTATION_MARK=34]="QUOTATION_MARK",N[N.AMPERSAND=38]="AMPERSAND",N[N.APOSTROPHE=39]="APOSTROPHE",N[N.HYPHEN_MINUS=45]="HYPHEN_MINUS",N[N.SOLIDUS=47]="SOLIDUS",N[N.DIGIT_0=48]="DIGIT_0",N[N.DIGIT_9=57]="DIGIT_9",N[N.SEMICOLON=59]="SEMICOLON",N[N.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",N[N.EQUALS_SIGN=61]="EQUALS_SIGN",N[N.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",N[N.QUESTION_MARK=63]="QUESTION_MARK",N[N.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",N[N.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",N[N.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",N[N.GRAVE_ACCENT=96]="GRAVE_ACCENT",N[N.LATIN_SMALL_A=97]="LATIN_SMALL_A",N[N.LATIN_SMALL_Z=122]="LATIN_SMALL_Z";let y6="[CDATA[",y9="doctype",y8="script";function y7(e){return e>=55296&&e<=57343}function Ee(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159}function Et(e){return e>=64976&&e<=65007||y5.has(e)}(I=V||(V={})).controlCharacterInInputStream="control-character-in-input-stream",I.noncharacterInInputStream="noncharacter-in-input-stream",I.surrogateInInputStream="surrogate-in-input-stream",I.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",I.endTagWithAttributes="end-tag-with-attributes",I.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",I.unexpectedSolidusInTag="unexpected-solidus-in-tag",I.unexpectedNullCharacter="unexpected-null-character",I.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",I.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",I.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",I.missingEndTagName="missing-end-tag-name",I.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",I.unknownNamedCharacterReference="unknown-named-character-reference",I.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",I.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",I.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",I.eofBeforeTagName="eof-before-tag-name",I.eofInTag="eof-in-tag",I.missingAttributeValue="missing-attribute-value",I.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",I.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",I.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",I.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",I.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",I.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",I.missingDoctypePublicIdentifier="missing-doctype-public-identifier",I.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",I.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",I.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",I.cdataInHtmlContent="cdata-in-html-content",I.incorrectlyOpenedComment="incorrectly-opened-comment",I.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",I.eofInDoctype="eof-in-doctype",I.nestedComment="nested-comment",I.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",I.eofInComment="eof-in-comment",I.incorrectlyClosedComment="incorrectly-closed-comment",I.eofInCdata="eof-in-cdata",I.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",I.nullCharacterReference="null-character-reference",I.surrogateCharacterReference="surrogate-character-reference",I.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",I.controlCharacterReference="control-character-reference",I.noncharacterCharacterReference="noncharacter-character-reference",I.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",I.missingDoctypeName="missing-doctype-name",I.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",I.duplicateAttribute="duplicate-attribute",I.nonConformingDoctype="non-conforming-doctype",I.missingDoctype="missing-doctype",I.misplacedDoctype="misplaced-doctype",I.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",I.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",I.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",I.openElementsLeftAfterEof="open-elements-left-after-eof",I.abandonedHeadElementChild="abandoned-head-element-child",I.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",I.nestedNoscriptInHead="nested-noscript-in-head",I.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text";class En{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:a}=this,i=r+t,s=a+t;return{code:e,startLine:n,endLine:n,startCol:i,endCol:i,startOffset:s,endOffset:s}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(t>=56320&&t<=57343)return this.pos++,this._addGap(),(e-55296)*1024+9216+t}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,W.EOF;return this._err(V.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((32|this.html.charCodeAt(this.pos+t))!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,W.EOF;let n=this.html.charCodeAt(t);return n===W.CARRIAGE_RETURN?W.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,W.EOF;let e=this.html.charCodeAt(this.pos);return e===W.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,W.LINE_FEED):e===W.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,y7(e)&&(e=this._processSurrogate(e)),null===this.handler.onParseError||e>31&&e<127||e===W.LINE_FEED||e===W.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){Ee(e)?this._err(V.controlCharacterInInputStream):Et(e)&&this._err(V.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}function Er(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}(C=Y||(Y={}))[C.CHARACTER=0]="CHARACTER",C[C.NULL_CHARACTER=1]="NULL_CHARACTER",C[C.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",C[C.START_TAG=3]="START_TAG",C[C.END_TAG=4]="END_TAG",C[C.COMMENT=5]="COMMENT",C[C.DOCTYPE=6]="DOCTYPE",C[C.EOF=7]="EOF",C[C.HIBERNATION=8]="HIBERNATION",e.s(["TokenType",0,Y,"getTokenAttr",0,Er],382698);let Ea=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),Ei=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function Es(e){return e>=X.ZERO&&e<=X.NINE}K=String.fromCodePoint,(R=X||(X={}))[R.NUM=35]="NUM",R[R.SEMI=59]="SEMI",R[R.EQUALS=61]="EQUALS",R[R.ZERO=48]="ZERO",R[R.NINE=57]="NINE",R[R.LOWER_A=97]="LOWER_A",R[R.LOWER_F=102]="LOWER_F",R[R.LOWER_X=120]="LOWER_X",R[R.LOWER_Z=122]="LOWER_Z",R[R.UPPER_A=65]="UPPER_A",R[R.UPPER_F=70]="UPPER_F",R[R.UPPER_Z=90]="UPPER_Z",(O=Z||(Z={}))[O.VALUE_LENGTH=49152]="VALUE_LENGTH",O[O.BRANCH_LENGTH=16256]="BRANCH_LENGTH",O[O.JUMP_TABLE=127]="JUMP_TABLE",(D=Q||(Q={}))[D.EntityStart=0]="EntityStart",D[D.NumericStart=1]="NumericStart",D[D.NumericDecimal=2]="NumericDecimal",D[D.NumericHex=3]="NumericHex",D[D.NamedEntity=4]="NamedEntity",(L=J||(J={}))[L.Legacy=0]="Legacy",L[L.Strict=1]="Strict",L[L.Attribute=2]="Attribute";class Eo{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=Q.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=J.Strict}startEntity(e){this.decodeMode=e,this.state=Q.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case Q.EntityStart:if(e.charCodeAt(t)===X.NUM)return this.state=Q.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1);return this.state=Q.NamedEntity,this.stateNamedEntity(e,t);case Q.NumericStart:return this.stateNumericStart(e,t);case Q.NumericDecimal:return this.stateNumericDecimal(e,t);case Q.NumericHex:return this.stateNumericHex(e,t);case Q.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===X.LOWER_X?(this.state=Q.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Q.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let a=n-t;this.result=this.result*Math.pow(r,a)+Number.parseInt(e.substr(t,a),r),this.consumed+=a}}stateNumericHex(e,t){let n=t;for(;t<e.length;){var r;let a=e.charCodeAt(t);if(!Es(a)&&(!((r=a)>=X.UPPER_A)||!(r<=X.UPPER_F))&&(!(r>=X.LOWER_A)||!(r<=X.LOWER_F)))return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(a,3);t+=1}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(!Es(r))return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2);t+=1}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n,r,a;if(this.consumed<=t)return null==(n=this.errors)||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===X.SEMI)this.consumed+=1;else if(this.decodeMode===J.Strict)return 0;return this.emitCodePoint((r=this.result)>=55296&&r<=57343||r>1114111?65533:null!=(a=Ei.get(r))?a:r,this.consumed),this.errors&&(e!==X.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],a=(r&Z.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let i=e.charCodeAt(t);if(this.treeIndex=function(e,t,n,r){let a=(t&Z.BRANCH_LENGTH)>>7,i=t&Z.JUMP_TABLE;if(0===a)return 0!==i&&r===i?n:-1;if(i){let t=r-i;return t<0||t>=a?-1:e[n+t]-1}let s=n,o=s+a-1;for(;s<=o;){let t=s+o>>>1,n=e[t];if(n<r)s=t+1;else{if(!(n>r))return e[t+a];o=t-1}}return -1}(n,r,this.treeIndex+Math.max(1,a),i),this.treeIndex<0)return 0===this.result||this.decodeMode===J.Attribute&&(0===a||function(e){var t;return e===X.EQUALS||(t=e)>=X.UPPER_A&&t<=X.UPPER_Z||t>=X.LOWER_A&&t<=X.LOWER_Z||Es(t)}(i))?0:this.emitNotTerminatedNamedEntity();if(0!=(a=((r=n[this.treeIndex])&Z.VALUE_LENGTH)>>14)){if(i===X.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==J.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return -1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&Z.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null==(e=this.errors)||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(1===t?r[e]&~Z.VALUE_LENGTH:r[e+1],n),3===t&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case Q.NamedEntity:return 0!==this.result&&(this.decodeMode!==J.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Q.NumericDecimal:return this.emitNumericEntity(0,2);case Q.NumericHex:return this.emitNumericEntity(0,3);case Q.NumericStart:return null==(e=this.errors)||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Q.EntityStart:return 0}}}(M=ee||(ee={})).HTML="http://www.w3.org/1999/xhtml",M.MATHML="http://www.w3.org/1998/Math/MathML",M.SVG="http://www.w3.org/2000/svg",M.XLINK="http://www.w3.org/1999/xlink",M.XML="http://www.w3.org/XML/1998/namespace",M.XMLNS="http://www.w3.org/2000/xmlns/",(P=et||(et={})).TYPE="type",P.ACTION="action",P.ENCODING="encoding",P.PROMPT="prompt",P.NAME="name",P.COLOR="color",P.FACE="face",P.SIZE="size",(j=en||(en={})).NO_QUIRKS="no-quirks",j.QUIRKS="quirks",j.LIMITED_QUIRKS="limited-quirks",(F=er||(er={})).A="a",F.ADDRESS="address",F.ANNOTATION_XML="annotation-xml",F.APPLET="applet",F.AREA="area",F.ARTICLE="article",F.ASIDE="aside",F.B="b",F.BASE="base",F.BASEFONT="basefont",F.BGSOUND="bgsound",F.BIG="big",F.BLOCKQUOTE="blockquote",F.BODY="body",F.BR="br",F.BUTTON="button",F.CAPTION="caption",F.CENTER="center",F.CODE="code",F.COL="col",F.COLGROUP="colgroup",F.DD="dd",F.DESC="desc",F.DETAILS="details",F.DIALOG="dialog",F.DIR="dir",F.DIV="div",F.DL="dl",F.DT="dt",F.EM="em",F.EMBED="embed",F.FIELDSET="fieldset",F.FIGCAPTION="figcaption",F.FIGURE="figure",F.FONT="font",F.FOOTER="footer",F.FOREIGN_OBJECT="foreignObject",F.FORM="form",F.FRAME="frame",F.FRAMESET="frameset",F.H1="h1",F.H2="h2",F.H3="h3",F.H4="h4",F.H5="h5",F.H6="h6",F.HEAD="head",F.HEADER="header",F.HGROUP="hgroup",F.HR="hr",F.HTML="html",F.I="i",F.IMG="img",F.IMAGE="image",F.INPUT="input",F.IFRAME="iframe",F.KEYGEN="keygen",F.LABEL="label",F.LI="li",F.LINK="link",F.LISTING="listing",F.MAIN="main",F.MALIGNMARK="malignmark",F.MARQUEE="marquee",F.MATH="math",F.MENU="menu",F.META="meta",F.MGLYPH="mglyph",F.MI="mi",F.MO="mo",F.MN="mn",F.MS="ms",F.MTEXT="mtext",F.NAV="nav",F.NOBR="nobr",F.NOFRAMES="noframes",F.NOEMBED="noembed",F.NOSCRIPT="noscript",F.OBJECT="object",F.OL="ol",F.OPTGROUP="optgroup",F.OPTION="option",F.P="p",F.PARAM="param",F.PLAINTEXT="plaintext",F.PRE="pre",F.RB="rb",F.RP="rp",F.RT="rt",F.RTC="rtc",F.RUBY="ruby",F.S="s",F.SCRIPT="script",F.SEARCH="search",F.SECTION="section",F.SELECT="select",F.SOURCE="source",F.SMALL="small",F.SPAN="span",F.STRIKE="strike",F.STRONG="strong",F.STYLE="style",F.SUB="sub",F.SUMMARY="summary",F.SUP="sup",F.TABLE="table",F.TBODY="tbody",F.TEMPLATE="template",F.TEXTAREA="textarea",F.TFOOT="tfoot",F.TD="td",F.TH="th",F.THEAD="thead",F.TITLE="title",F.TR="tr",F.TRACK="track",F.TT="tt",F.U="u",F.UL="ul",F.SVG="svg",F.VAR="var",F.WBR="wbr",F.XMP="xmp",(U=ea||(ea={}))[U.UNKNOWN=0]="UNKNOWN",U[U.A=1]="A",U[U.ADDRESS=2]="ADDRESS",U[U.ANNOTATION_XML=3]="ANNOTATION_XML",U[U.APPLET=4]="APPLET",U[U.AREA=5]="AREA",U[U.ARTICLE=6]="ARTICLE",U[U.ASIDE=7]="ASIDE",U[U.B=8]="B",U[U.BASE=9]="BASE",U[U.BASEFONT=10]="BASEFONT",U[U.BGSOUND=11]="BGSOUND",U[U.BIG=12]="BIG",U[U.BLOCKQUOTE=13]="BLOCKQUOTE",U[U.BODY=14]="BODY",U[U.BR=15]="BR",U[U.BUTTON=16]="BUTTON",U[U.CAPTION=17]="CAPTION",U[U.CENTER=18]="CENTER",U[U.CODE=19]="CODE",U[U.COL=20]="COL",U[U.COLGROUP=21]="COLGROUP",U[U.DD=22]="DD",U[U.DESC=23]="DESC",U[U.DETAILS=24]="DETAILS",U[U.DIALOG=25]="DIALOG",U[U.DIR=26]="DIR",U[U.DIV=27]="DIV",U[U.DL=28]="DL",U[U.DT=29]="DT",U[U.EM=30]="EM",U[U.EMBED=31]="EMBED",U[U.FIELDSET=32]="FIELDSET",U[U.FIGCAPTION=33]="FIGCAPTION",U[U.FIGURE=34]="FIGURE",U[U.FONT=35]="FONT",U[U.FOOTER=36]="FOOTER",U[U.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",U[U.FORM=38]="FORM",U[U.FRAME=39]="FRAME",U[U.FRAMESET=40]="FRAMESET",U[U.H1=41]="H1",U[U.H2=42]="H2",U[U.H3=43]="H3",U[U.H4=44]="H4",U[U.H5=45]="H5",U[U.H6=46]="H6",U[U.HEAD=47]="HEAD",U[U.HEADER=48]="HEADER",U[U.HGROUP=49]="HGROUP",U[U.HR=50]="HR",U[U.HTML=51]="HTML",U[U.I=52]="I",U[U.IMG=53]="IMG",U[U.IMAGE=54]="IMAGE",U[U.INPUT=55]="INPUT",U[U.IFRAME=56]="IFRAME",U[U.KEYGEN=57]="KEYGEN",U[U.LABEL=58]="LABEL",U[U.LI=59]="LI",U[U.LINK=60]="LINK",U[U.LISTING=61]="LISTING",U[U.MAIN=62]="MAIN",U[U.MALIGNMARK=63]="MALIGNMARK",U[U.MARQUEE=64]="MARQUEE",U[U.MATH=65]="MATH",U[U.MENU=66]="MENU",U[U.META=67]="META",U[U.MGLYPH=68]="MGLYPH",U[U.MI=69]="MI",U[U.MO=70]="MO",U[U.MN=71]="MN",U[U.MS=72]="MS",U[U.MTEXT=73]="MTEXT",U[U.NAV=74]="NAV",U[U.NOBR=75]="NOBR",U[U.NOFRAMES=76]="NOFRAMES",U[U.NOEMBED=77]="NOEMBED",U[U.NOSCRIPT=78]="NOSCRIPT",U[U.OBJECT=79]="OBJECT",U[U.OL=80]="OL",U[U.OPTGROUP=81]="OPTGROUP",U[U.OPTION=82]="OPTION",U[U.P=83]="P",U[U.PARAM=84]="PARAM",U[U.PLAINTEXT=85]="PLAINTEXT",U[U.PRE=86]="PRE",U[U.RB=87]="RB",U[U.RP=88]="RP",U[U.RT=89]="RT",U[U.RTC=90]="RTC",U[U.RUBY=91]="RUBY",U[U.S=92]="S",U[U.SCRIPT=93]="SCRIPT",U[U.SEARCH=94]="SEARCH",U[U.SECTION=95]="SECTION",U[U.SELECT=96]="SELECT",U[U.SOURCE=97]="SOURCE",U[U.SMALL=98]="SMALL",U[U.SPAN=99]="SPAN",U[U.STRIKE=100]="STRIKE",U[U.STRONG=101]="STRONG",U[U.STYLE=102]="STYLE",U[U.SUB=103]="SUB",U[U.SUMMARY=104]="SUMMARY",U[U.SUP=105]="SUP",U[U.TABLE=106]="TABLE",U[U.TBODY=107]="TBODY",U[U.TEMPLATE=108]="TEMPLATE",U[U.TEXTAREA=109]="TEXTAREA",U[U.TFOOT=110]="TFOOT",U[U.TD=111]="TD",U[U.TH=112]="TH",U[U.THEAD=113]="THEAD",U[U.TITLE=114]="TITLE",U[U.TR=115]="TR",U[U.TRACK=116]="TRACK",U[U.TT=117]="TT",U[U.U=118]="U",U[U.UL=119]="UL",U[U.SVG=120]="SVG",U[U.VAR=121]="VAR",U[U.WBR=122]="WBR",U[U.XMP=123]="XMP";let El=new Map([[er.A,ea.A],[er.ADDRESS,ea.ADDRESS],[er.ANNOTATION_XML,ea.ANNOTATION_XML],[er.APPLET,ea.APPLET],[er.AREA,ea.AREA],[er.ARTICLE,ea.ARTICLE],[er.ASIDE,ea.ASIDE],[er.B,ea.B],[er.BASE,ea.BASE],[er.BASEFONT,ea.BASEFONT],[er.BGSOUND,ea.BGSOUND],[er.BIG,ea.BIG],[er.BLOCKQUOTE,ea.BLOCKQUOTE],[er.BODY,ea.BODY],[er.BR,ea.BR],[er.BUTTON,ea.BUTTON],[er.CAPTION,ea.CAPTION],[er.CENTER,ea.CENTER],[er.CODE,ea.CODE],[er.COL,ea.COL],[er.COLGROUP,ea.COLGROUP],[er.DD,ea.DD],[er.DESC,ea.DESC],[er.DETAILS,ea.DETAILS],[er.DIALOG,ea.DIALOG],[er.DIR,ea.DIR],[er.DIV,ea.DIV],[er.DL,ea.DL],[er.DT,ea.DT],[er.EM,ea.EM],[er.EMBED,ea.EMBED],[er.FIELDSET,ea.FIELDSET],[er.FIGCAPTION,ea.FIGCAPTION],[er.FIGURE,ea.FIGURE],[er.FONT,ea.FONT],[er.FOOTER,ea.FOOTER],[er.FOREIGN_OBJECT,ea.FOREIGN_OBJECT],[er.FORM,ea.FORM],[er.FRAME,ea.FRAME],[er.FRAMESET,ea.FRAMESET],[er.H1,ea.H1],[er.H2,ea.H2],[er.H3,ea.H3],[er.H4,ea.H4],[er.H5,ea.H5],[er.H6,ea.H6],[er.HEAD,ea.HEAD],[er.HEADER,ea.HEADER],[er.HGROUP,ea.HGROUP],[er.HR,ea.HR],[er.HTML,ea.HTML],[er.I,ea.I],[er.IMG,ea.IMG],[er.IMAGE,ea.IMAGE],[er.INPUT,ea.INPUT],[er.IFRAME,ea.IFRAME],[er.KEYGEN,ea.KEYGEN],[er.LABEL,ea.LABEL],[er.LI,ea.LI],[er.LINK,ea.LINK],[er.LISTING,ea.LISTING],[er.MAIN,ea.MAIN],[er.MALIGNMARK,ea.MALIGNMARK],[er.MARQUEE,ea.MARQUEE],[er.MATH,ea.MATH],[er.MENU,ea.MENU],[er.META,ea.META],[er.MGLYPH,ea.MGLYPH],[er.MI,ea.MI],[er.MO,ea.MO],[er.MN,ea.MN],[er.MS,ea.MS],[er.MTEXT,ea.MTEXT],[er.NAV,ea.NAV],[er.NOBR,ea.NOBR],[er.NOFRAMES,ea.NOFRAMES],[er.NOEMBED,ea.NOEMBED],[er.NOSCRIPT,ea.NOSCRIPT],[er.OBJECT,ea.OBJECT],[er.OL,ea.OL],[er.OPTGROUP,ea.OPTGROUP],[er.OPTION,ea.OPTION],[er.P,ea.P],[er.PARAM,ea.PARAM],[er.PLAINTEXT,ea.PLAINTEXT],[er.PRE,ea.PRE],[er.RB,ea.RB],[er.RP,ea.RP],[er.RT,ea.RT],[er.RTC,ea.RTC],[er.RUBY,ea.RUBY],[er.S,ea.S],[er.SCRIPT,ea.SCRIPT],[er.SEARCH,ea.SEARCH],[er.SECTION,ea.SECTION],[er.SELECT,ea.SELECT],[er.SOURCE,ea.SOURCE],[er.SMALL,ea.SMALL],[er.SPAN,ea.SPAN],[er.STRIKE,ea.STRIKE],[er.STRONG,ea.STRONG],[er.STYLE,ea.STYLE],[er.SUB,ea.SUB],[er.SUMMARY,ea.SUMMARY],[er.SUP,ea.SUP],[er.TABLE,ea.TABLE],[er.TBODY,ea.TBODY],[er.TEMPLATE,ea.TEMPLATE],[er.TEXTAREA,ea.TEXTAREA],[er.TFOOT,ea.TFOOT],[er.TD,ea.TD],[er.TH,ea.TH],[er.THEAD,ea.THEAD],[er.TITLE,ea.TITLE],[er.TR,ea.TR],[er.TRACK,ea.TRACK],[er.TT,ea.TT],[er.U,ea.U],[er.UL,ea.UL],[er.SVG,ea.SVG],[er.VAR,ea.VAR],[er.WBR,ea.WBR],[er.XMP,ea.XMP]]);function Ec(e){var t;return null!=(t=El.get(e))?t:ea.UNKNOWN}let Eu=ea,Ed={[ee.HTML]:new Set([Eu.ADDRESS,Eu.APPLET,Eu.AREA,Eu.ARTICLE,Eu.ASIDE,Eu.BASE,Eu.BASEFONT,Eu.BGSOUND,Eu.BLOCKQUOTE,Eu.BODY,Eu.BR,Eu.BUTTON,Eu.CAPTION,Eu.CENTER,Eu.COL,Eu.COLGROUP,Eu.DD,Eu.DETAILS,Eu.DIR,Eu.DIV,Eu.DL,Eu.DT,Eu.EMBED,Eu.FIELDSET,Eu.FIGCAPTION,Eu.FIGURE,Eu.FOOTER,Eu.FORM,Eu.FRAME,Eu.FRAMESET,Eu.H1,Eu.H2,Eu.H3,Eu.H4,Eu.H5,Eu.H6,Eu.HEAD,Eu.HEADER,Eu.HGROUP,Eu.HR,Eu.HTML,Eu.IFRAME,Eu.IMG,Eu.INPUT,Eu.LI,Eu.LINK,Eu.LISTING,Eu.MAIN,Eu.MARQUEE,Eu.MENU,Eu.META,Eu.NAV,Eu.NOEMBED,Eu.NOFRAMES,Eu.NOSCRIPT,Eu.OBJECT,Eu.OL,Eu.P,Eu.PARAM,Eu.PLAINTEXT,Eu.PRE,Eu.SCRIPT,Eu.SECTION,Eu.SELECT,Eu.SOURCE,Eu.STYLE,Eu.SUMMARY,Eu.TABLE,Eu.TBODY,Eu.TD,Eu.TEMPLATE,Eu.TEXTAREA,Eu.TFOOT,Eu.TH,Eu.THEAD,Eu.TITLE,Eu.TR,Eu.TRACK,Eu.UL,Eu.WBR,Eu.XMP]),[ee.MATHML]:new Set([Eu.MI,Eu.MO,Eu.MN,Eu.MS,Eu.MTEXT,Eu.ANNOTATION_XML]),[ee.SVG]:new Set([Eu.TITLE,Eu.FOREIGN_OBJECT,Eu.DESC]),[ee.XLINK]:new Set,[ee.XML]:new Set,[ee.XMLNS]:new Set},Ep=new Set([Eu.H1,Eu.H2,Eu.H3,Eu.H4,Eu.H5,Eu.H6]),Em=new Set([er.STYLE,er.SCRIPT,er.XMP,er.IFRAME,er.NOEMBED,er.NOFRAMES,er.PLAINTEXT]);e.s(["ATTRS",0,et,"DOCUMENT_MODE",0,en,"NS",0,ee,"NUMBERED_HEADERS",0,Ep,"SPECIAL_ELEMENTS",0,Ed,"TAG_ID",0,ea,"TAG_NAMES",0,er,"getTagID",0,Ec,"hasUnescapedText",0,function(e,t){return Em.has(e)||t&&e===er.NOSCRIPT}],615473),(B=ei||(ei={}))[B.DATA=0]="DATA",B[B.RCDATA=1]="RCDATA",B[B.RAWTEXT=2]="RAWTEXT",B[B.SCRIPT_DATA=3]="SCRIPT_DATA",B[B.PLAINTEXT=4]="PLAINTEXT",B[B.TAG_OPEN=5]="TAG_OPEN",B[B.END_TAG_OPEN=6]="END_TAG_OPEN",B[B.TAG_NAME=7]="TAG_NAME",B[B.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",B[B.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",B[B.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",B[B.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",B[B.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",B[B.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",B[B.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",B[B.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",B[B.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",B[B.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",B[B.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",B[B.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",B[B.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",B[B.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",B[B.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",B[B.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",B[B.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",B[B.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",B[B.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",B[B.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",B[B.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",B[B.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",B[B.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",B[B.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",B[B.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",B[B.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",B[B.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",B[B.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",B[B.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",B[B.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",B[B.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",B[B.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",B[B.BOGUS_COMMENT=40]="BOGUS_COMMENT",B[B.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",B[B.COMMENT_START=42]="COMMENT_START",B[B.COMMENT_START_DASH=43]="COMMENT_START_DASH",B[B.COMMENT=44]="COMMENT",B[B.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",B[B.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",B[B.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",B[B.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",B[B.COMMENT_END_DASH=49]="COMMENT_END_DASH",B[B.COMMENT_END=50]="COMMENT_END",B[B.COMMENT_END_BANG=51]="COMMENT_END_BANG",B[B.DOCTYPE=52]="DOCTYPE",B[B.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",B[B.DOCTYPE_NAME=54]="DOCTYPE_NAME",B[B.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",B[B.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",B[B.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",B[B.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",B[B.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",B[B.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",B[B.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",B[B.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",B[B.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",B[B.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",B[B.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",B[B.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",B[B.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",B[B.CDATA_SECTION=68]="CDATA_SECTION",B[B.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",B[B.CDATA_SECTION_END=70]="CDATA_SECTION_END",B[B.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",B[B.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND";let Ef={DATA:ei.DATA,RCDATA:ei.RCDATA,RAWTEXT:ei.RAWTEXT,SCRIPT_DATA:ei.SCRIPT_DATA,PLAINTEXT:ei.PLAINTEXT,CDATA_SECTION:ei.CDATA_SECTION};function Eh(e){return e>=W.LATIN_CAPITAL_A&&e<=W.LATIN_CAPITAL_Z}function Eg(e){return e>=W.LATIN_SMALL_A&&e<=W.LATIN_SMALL_Z||Eh(e)}function Eb(e){return Eg(e)||e>=W.DIGIT_0&&e<=W.DIGIT_9}function Ey(e){return e===W.SPACE||e===W.LINE_FEED||e===W.TABULATION||e===W.FORM_FEED}function EE(e){return Ey(e)||e===W.SOLIDUS||e===W.GREATER_THAN_SIGN}class Ex{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=ei.DATA,this.returnState=ei.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new En(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Eo(Ea,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(V.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(V.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=function(e){if(e===W.NULL)return V.nullCharacterReference;if(e>1114111)return V.characterReferenceOutsideUnicodeRange;if(y7(e))return V.surrogateCharacterReference;if(Et(e))return V.noncharacterCharacterReference;if(Ee(e)||e===W.CARRIAGE_RETURN)return V.controlCharacterReference;return null}(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;null==(r=(n=this.handler).onParseError)||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||null==e||e())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||null==n||n()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return!!this.preprocessor.endOfChunkHit&&(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0)}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return!!this.preprocessor.startsWith(e,t)&&(this._advanceBy(e.length-1),!0)}_createStartTagToken(){this.currentToken={type:Y.START_TAG,tagName:"",tagID:ea.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Y.END_TAG,tagName:"",tagID:ea.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:Y.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:Y.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e,t;let n=this.currentToken;null===Er(n,this.currentAttr.name)?(n.attrs.push(this.currentAttr),n.location&&this.currentLocation&&((null!=(e=(t=n.location).attrs)?e:t.attrs=Object.create(null))[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue())):this._err(V.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.prepareToken(e),e.tagID=Ec(e.tagName),e.type===Y.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(V.endTagWithAttributes),e.selfClosing&&this._err(V.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case Y.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case Y.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case Y.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:Y.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){let t=Ey(e)?Y.WHITESPACE_CHARACTER:e===W.NULL?Y.NULL_CHARACTER:Y.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(Y.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=ei.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?J.Attribute:J.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===ei.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===ei.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===ei.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case ei.DATA:this._stateData(e);break;case ei.RCDATA:this._stateRcdata(e);break;case ei.RAWTEXT:this._stateRawtext(e);break;case ei.SCRIPT_DATA:this._stateScriptData(e);break;case ei.PLAINTEXT:this._statePlaintext(e);break;case ei.TAG_OPEN:this._stateTagOpen(e);break;case ei.END_TAG_OPEN:this._stateEndTagOpen(e);break;case ei.TAG_NAME:this._stateTagName(e);break;case ei.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case ei.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case ei.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case ei.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case ei.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case ei.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case ei.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case ei.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case ei.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case ei.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case ei.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case ei.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case ei.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case ei.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case ei.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case ei.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case ei.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case ei.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case ei.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case ei.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case ei.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case ei.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case ei.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case ei.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case ei.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case ei.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case ei.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case ei.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case ei.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case ei.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case ei.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case ei.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case ei.BOGUS_COMMENT:this._stateBogusComment(e);break;case ei.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case ei.COMMENT_START:this._stateCommentStart(e);break;case ei.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case ei.COMMENT:this._stateComment(e);break;case ei.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case ei.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case ei.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case ei.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case ei.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case ei.COMMENT_END:this._stateCommentEnd(e);break;case ei.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case ei.DOCTYPE:this._stateDoctype(e);break;case ei.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case ei.DOCTYPE_NAME:this._stateDoctypeName(e);break;case ei.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case ei.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case ei.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case ei.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case ei.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case ei.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case ei.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case ei.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case ei.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case ei.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case ei.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case ei.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case ei.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case ei.CDATA_SECTION:this._stateCdataSection(e);break;case ei.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case ei.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case ei.CHARACTER_REFERENCE:this._stateCharacterReference();break;case ei.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error("Unknown state")}}_stateData(e){switch(e){case W.LESS_THAN_SIGN:this.state=ei.TAG_OPEN;break;case W.AMPERSAND:this._startCharacterReference();break;case W.NULL:this._err(V.unexpectedNullCharacter),this._emitCodePoint(e);break;case W.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case W.AMPERSAND:this._startCharacterReference();break;case W.LESS_THAN_SIGN:this.state=ei.RCDATA_LESS_THAN_SIGN;break;case W.NULL:this._err(V.unexpectedNullCharacter),this._emitChars("�");break;case W.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case W.LESS_THAN_SIGN:this.state=ei.RAWTEXT_LESS_THAN_SIGN;break;case W.NULL:this._err(V.unexpectedNullCharacter),this._emitChars("�");break;case W.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case W.LESS_THAN_SIGN:this.state=ei.SCRIPT_DATA_LESS_THAN_SIGN;break;case W.NULL:this._err(V.unexpectedNullCharacter),this._emitChars("�");break;case W.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case W.NULL:this._err(V.unexpectedNullCharacter),this._emitChars("�");break;case W.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(Eg(e))this._createStartTagToken(),this.state=ei.TAG_NAME,this._stateTagName(e);else switch(e){case W.EXCLAMATION_MARK:this.state=ei.MARKUP_DECLARATION_OPEN;break;case W.SOLIDUS:this.state=ei.END_TAG_OPEN;break;case W.QUESTION_MARK:this._err(V.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=ei.BOGUS_COMMENT,this._stateBogusComment(e);break;case W.EOF:this._err(V.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err(V.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=ei.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(Eg(e))this._createEndTagToken(),this.state=ei.TAG_NAME,this._stateTagName(e);else switch(e){case W.GREATER_THAN_SIGN:this._err(V.missingEndTagName),this.state=ei.DATA;break;case W.EOF:this._err(V.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break;default:this._err(V.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=ei.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=ei.BEFORE_ATTRIBUTE_NAME;break;case W.SOLIDUS:this.state=ei.SELF_CLOSING_START_TAG;break;case W.GREATER_THAN_SIGN:this.state=ei.DATA,this.emitCurrentTagToken();break;case W.NULL:this._err(V.unexpectedNullCharacter),t.tagName+="�";break;case W.EOF:this._err(V.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(Eh(e)?e+32:e)}}_stateRcdataLessThanSign(e){e===W.SOLIDUS?this.state=ei.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=ei.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){Eg(e)?(this.state=ei.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=ei.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();switch(this._createEndTagToken(),this.currentToken.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=ei.BEFORE_ATTRIBUTE_NAME,!1;case W.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=ei.SELF_CLOSING_START_TAG,!1;case W.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=ei.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=ei.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===W.SOLIDUS?this.state=ei.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=ei.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){Eg(e)?(this.state=ei.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=ei.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=ei.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case W.SOLIDUS:this.state=ei.SCRIPT_DATA_END_TAG_OPEN;break;case W.EXCLAMATION_MARK:this.state=ei.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break;default:this._emitChars("<"),this.state=ei.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){Eg(e)?(this.state=ei.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=ei.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=ei.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===W.HYPHEN_MINUS?(this.state=ei.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=ei.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===W.HYPHEN_MINUS?(this.state=ei.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=ei.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case W.HYPHEN_MINUS:this.state=ei.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break;case W.LESS_THAN_SIGN:this.state=ei.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case W.NULL:this._err(V.unexpectedNullCharacter),this._emitChars("�");break;case W.EOF:this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case W.HYPHEN_MINUS:this.state=ei.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break;case W.LESS_THAN_SIGN:this.state=ei.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case W.NULL:this._err(V.unexpectedNullCharacter),this.state=ei.SCRIPT_DATA_ESCAPED,this._emitChars("�");break;case W.EOF:this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=ei.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case W.HYPHEN_MINUS:this._emitChars("-");break;case W.LESS_THAN_SIGN:this.state=ei.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case W.GREATER_THAN_SIGN:this.state=ei.SCRIPT_DATA,this._emitChars(">");break;case W.NULL:this._err(V.unexpectedNullCharacter),this.state=ei.SCRIPT_DATA_ESCAPED,this._emitChars("�");break;case W.EOF:this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=ei.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===W.SOLIDUS?this.state=ei.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Eg(e)?(this._emitChars("<"),this.state=ei.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=ei.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){Eg(e)?(this.state=ei.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=ei.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=ei.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(y8,!1)&&EE(this.preprocessor.peek(y8.length))){this._emitCodePoint(e);for(let e=0;e<y8.length;e++)this._emitCodePoint(this._consume());this.state=ei.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=ei.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case W.HYPHEN_MINUS:this.state=ei.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break;case W.LESS_THAN_SIGN:this.state=ei.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case W.NULL:this._err(V.unexpectedNullCharacter),this._emitChars("�");break;case W.EOF:this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case W.HYPHEN_MINUS:this.state=ei.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break;case W.LESS_THAN_SIGN:this.state=ei.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case W.NULL:this._err(V.unexpectedNullCharacter),this.state=ei.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars("�");break;case W.EOF:this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=ei.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case W.HYPHEN_MINUS:this._emitChars("-");break;case W.LESS_THAN_SIGN:this.state=ei.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case W.GREATER_THAN_SIGN:this.state=ei.SCRIPT_DATA,this._emitChars(">");break;case W.NULL:this._err(V.unexpectedNullCharacter),this.state=ei.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars("�");break;case W.EOF:this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=ei.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===W.SOLIDUS?(this.state=ei.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=ei.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(y8,!1)&&EE(this.preprocessor.peek(y8.length))){this._emitCodePoint(e);for(let e=0;e<y8.length;e++)this._emitCodePoint(this._consume());this.state=ei.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=ei.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.SOLIDUS:case W.GREATER_THAN_SIGN:case W.EOF:this.state=ei.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case W.EQUALS_SIGN:this._err(V.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=ei.ATTRIBUTE_NAME;break;default:this._createAttr(""),this.state=ei.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:case W.SOLIDUS:case W.GREATER_THAN_SIGN:case W.EOF:this._leaveAttrName(),this.state=ei.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case W.EQUALS_SIGN:this._leaveAttrName(),this.state=ei.BEFORE_ATTRIBUTE_VALUE;break;case W.QUOTATION_MARK:case W.APOSTROPHE:case W.LESS_THAN_SIGN:this._err(V.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case W.NULL:this._err(V.unexpectedNullCharacter),this.currentAttr.name+="�";break;default:this.currentAttr.name+=String.fromCodePoint(Eh(e)?e+32:e)}}_stateAfterAttributeName(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.SOLIDUS:this.state=ei.SELF_CLOSING_START_TAG;break;case W.EQUALS_SIGN:this.state=ei.BEFORE_ATTRIBUTE_VALUE;break;case W.GREATER_THAN_SIGN:this.state=ei.DATA,this.emitCurrentTagToken();break;case W.EOF:this._err(V.eofInTag),this._emitEOFToken();break;default:this._createAttr(""),this.state=ei.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.QUOTATION_MARK:this.state=ei.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case W.APOSTROPHE:this.state=ei.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case W.GREATER_THAN_SIGN:this._err(V.missingAttributeValue),this.state=ei.DATA,this.emitCurrentTagToken();break;default:this.state=ei.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case W.QUOTATION_MARK:this.state=ei.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case W.AMPERSAND:this._startCharacterReference();break;case W.NULL:this._err(V.unexpectedNullCharacter),this.currentAttr.value+="�";break;case W.EOF:this._err(V.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case W.APOSTROPHE:this.state=ei.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case W.AMPERSAND:this._startCharacterReference();break;case W.NULL:this._err(V.unexpectedNullCharacter),this.currentAttr.value+="�";break;case W.EOF:this._err(V.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this._leaveAttrValue(),this.state=ei.BEFORE_ATTRIBUTE_NAME;break;case W.AMPERSAND:this._startCharacterReference();break;case W.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=ei.DATA,this.emitCurrentTagToken();break;case W.NULL:this._err(V.unexpectedNullCharacter),this.currentAttr.value+="�";break;case W.QUOTATION_MARK:case W.APOSTROPHE:case W.LESS_THAN_SIGN:case W.EQUALS_SIGN:case W.GRAVE_ACCENT:this._err(V.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case W.EOF:this._err(V.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this._leaveAttrValue(),this.state=ei.BEFORE_ATTRIBUTE_NAME;break;case W.SOLIDUS:this._leaveAttrValue(),this.state=ei.SELF_CLOSING_START_TAG;break;case W.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=ei.DATA,this.emitCurrentTagToken();break;case W.EOF:this._err(V.eofInTag),this._emitEOFToken();break;default:this._err(V.missingWhitespaceBetweenAttributes),this.state=ei.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case W.GREATER_THAN_SIGN:this.currentToken.selfClosing=!0,this.state=ei.DATA,this.emitCurrentTagToken();break;case W.EOF:this._err(V.eofInTag),this._emitEOFToken();break;default:this._err(V.unexpectedSolidusInTag),this.state=ei.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case W.GREATER_THAN_SIGN:this.state=ei.DATA,this.emitCurrentComment(t);break;case W.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case W.NULL:this._err(V.unexpectedNullCharacter),t.data+="�";break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch("--",!0)?(this._createCommentToken(3),this.state=ei.COMMENT_START):this._consumeSequenceIfMatch(y9,!1)?(this.currentLocation=this.getCurrentLocation(y9.length+1),this.state=ei.DOCTYPE):this._consumeSequenceIfMatch(y6,!0)?this.inForeignNode?this.state=ei.CDATA_SECTION:(this._err(V.cdataInHtmlContent),this._createCommentToken(y6.length+1),this.currentToken.data="[CDATA[",this.state=ei.BOGUS_COMMENT):this._ensureHibernation()||(this._err(V.incorrectlyOpenedComment),this._createCommentToken(2),this.state=ei.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case W.HYPHEN_MINUS:this.state=ei.COMMENT_START_DASH;break;case W.GREATER_THAN_SIGN:{this._err(V.abruptClosingOfEmptyComment),this.state=ei.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=ei.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case W.HYPHEN_MINUS:this.state=ei.COMMENT_END;break;case W.GREATER_THAN_SIGN:this._err(V.abruptClosingOfEmptyComment),this.state=ei.DATA,this.emitCurrentComment(t);break;case W.EOF:this._err(V.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=ei.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case W.HYPHEN_MINUS:this.state=ei.COMMENT_END_DASH;break;case W.LESS_THAN_SIGN:t.data+="<",this.state=ei.COMMENT_LESS_THAN_SIGN;break;case W.NULL:this._err(V.unexpectedNullCharacter),t.data+="�";break;case W.EOF:this._err(V.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case W.EXCLAMATION_MARK:t.data+="!",this.state=ei.COMMENT_LESS_THAN_SIGN_BANG;break;case W.LESS_THAN_SIGN:t.data+="<";break;default:this.state=ei.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===W.HYPHEN_MINUS?this.state=ei.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=ei.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===W.HYPHEN_MINUS?this.state=ei.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=ei.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==W.GREATER_THAN_SIGN&&e!==W.EOF&&this._err(V.nestedComment),this.state=ei.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case W.HYPHEN_MINUS:this.state=ei.COMMENT_END;break;case W.EOF:this._err(V.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=ei.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case W.GREATER_THAN_SIGN:this.state=ei.DATA,this.emitCurrentComment(t);break;case W.EXCLAMATION_MARK:this.state=ei.COMMENT_END_BANG;break;case W.HYPHEN_MINUS:t.data+="-";break;case W.EOF:this._err(V.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--",this.state=ei.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case W.HYPHEN_MINUS:t.data+="--!",this.state=ei.COMMENT_END_DASH;break;case W.GREATER_THAN_SIGN:this._err(V.incorrectlyClosedComment),this.state=ei.DATA,this.emitCurrentComment(t);break;case W.EOF:this._err(V.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--!",this.state=ei.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=ei.BEFORE_DOCTYPE_NAME;break;case W.GREATER_THAN_SIGN:this.state=ei.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case W.EOF:{this._err(V.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(V.missingWhitespaceBeforeDoctypeName),this.state=ei.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(Eh(e))this._createDoctypeToken(String.fromCharCode(e+32)),this.state=ei.DOCTYPE_NAME;else switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.NULL:this._err(V.unexpectedNullCharacter),this._createDoctypeToken("�"),this.state=ei.DOCTYPE_NAME;break;case W.GREATER_THAN_SIGN:{this._err(V.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=ei.DATA;break}case W.EOF:{this._err(V.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=ei.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=ei.AFTER_DOCTYPE_NAME;break;case W.GREATER_THAN_SIGN:this.state=ei.DATA,this.emitCurrentDoctype(t);break;case W.NULL:this._err(V.unexpectedNullCharacter),t.name+="�";break;case W.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(Eh(e)?e+32:e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.GREATER_THAN_SIGN:this.state=ei.DATA,this.emitCurrentDoctype(t);break;case W.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch("public",!1)?this.state=ei.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch("system",!1)?this.state=ei.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(V.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=ei.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=ei.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case W.QUOTATION_MARK:this._err(V.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=ei.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:this._err(V.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=ei.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case W.GREATER_THAN_SIGN:this._err(V.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=ei.DATA,this.emitCurrentDoctype(t);break;case W.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(V.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=ei.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.QUOTATION_MARK:t.publicId="",this.state=ei.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:t.publicId="",this.state=ei.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case W.GREATER_THAN_SIGN:this._err(V.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=ei.DATA,this.emitCurrentDoctype(t);break;case W.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(V.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=ei.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case W.QUOTATION_MARK:this.state=ei.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case W.NULL:this._err(V.unexpectedNullCharacter),t.publicId+="�";break;case W.GREATER_THAN_SIGN:this._err(V.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=ei.DATA;break;case W.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case W.APOSTROPHE:this.state=ei.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case W.NULL:this._err(V.unexpectedNullCharacter),t.publicId+="�";break;case W.GREATER_THAN_SIGN:this._err(V.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=ei.DATA;break;case W.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=ei.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case W.GREATER_THAN_SIGN:this.state=ei.DATA,this.emitCurrentDoctype(t);break;case W.QUOTATION_MARK:this._err(V.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=ei.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:this._err(V.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=ei.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case W.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=ei.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=ei.DATA;break;case W.QUOTATION_MARK:t.systemId="",this.state=ei.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:t.systemId="",this.state=ei.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case W.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=ei.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=ei.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case W.QUOTATION_MARK:this._err(V.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=ei.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:this._err(V.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=ei.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case W.GREATER_THAN_SIGN:this._err(V.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=ei.DATA,this.emitCurrentDoctype(t);break;case W.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=ei.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.QUOTATION_MARK:t.systemId="",this.state=ei.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:t.systemId="",this.state=ei.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case W.GREATER_THAN_SIGN:this._err(V.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=ei.DATA,this.emitCurrentDoctype(t);break;case W.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=ei.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case W.QUOTATION_MARK:this.state=ei.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case W.NULL:this._err(V.unexpectedNullCharacter),t.systemId+="�";break;case W.GREATER_THAN_SIGN:this._err(V.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=ei.DATA;break;case W.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case W.APOSTROPHE:this.state=ei.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case W.NULL:this._err(V.unexpectedNullCharacter),t.systemId+="�";break;case W.GREATER_THAN_SIGN:this._err(V.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=ei.DATA;break;case W.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=ei.DATA;break;case W.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(V.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=ei.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case W.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=ei.DATA;break;case W.NULL:this._err(V.unexpectedNullCharacter);break;case W.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case W.RIGHT_SQUARE_BRACKET:this.state=ei.CDATA_SECTION_BRACKET;break;case W.EOF:this._err(V.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===W.RIGHT_SQUARE_BRACKET?this.state=ei.CDATA_SECTION_END:(this._emitChars("]"),this.state=ei.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case W.GREATER_THAN_SIGN:this.state=ei.DATA;break;case W.RIGHT_SQUARE_BRACKET:this._emitChars("]");break;default:this._emitChars("]]"),this.state=ei.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0)if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}0===e?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(W.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Eb(this.preprocessor.peek(1))?ei.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){Eb(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===W.SEMICOLON&&this._err(V.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}}let Ev=new Set([ea.DD,ea.DT,ea.LI,ea.OPTGROUP,ea.OPTION,ea.P,ea.RB,ea.RP,ea.RT,ea.RTC]),ET=new Set([...Ev,ea.CAPTION,ea.COLGROUP,ea.TBODY,ea.TD,ea.TFOOT,ea.TH,ea.THEAD,ea.TR]),ES=new Set([ea.APPLET,ea.CAPTION,ea.HTML,ea.MARQUEE,ea.OBJECT,ea.TABLE,ea.TD,ea.TEMPLATE,ea.TH]),E_=new Set([...ES,ea.OL,ea.UL]),Ek=new Set([...ES,ea.BUTTON]),Ew=new Set([ea.ANNOTATION_XML,ea.MI,ea.MN,ea.MO,ea.MS,ea.MTEXT]),EA=new Set([ea.DESC,ea.FOREIGN_OBJECT,ea.TITLE]),EN=new Set([ea.TR,ea.TEMPLATE,ea.HTML]),EI=new Set([ea.TBODY,ea.TFOOT,ea.THEAD,ea.TEMPLATE,ea.HTML]),EC=new Set([ea.TABLE,ea.TEMPLATE,ea.HTML]),ER=new Set([ea.TD,ea.TH]);class EO{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=ea.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===ea.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===ee.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&void 0!==this.currentTagId&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==ee.HTML)this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Ep,ee.HTML)}popUntilTableCellPopped(){this.popUntilPopped(ER,ee.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return -1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(EC,ee.HTML)}clearBackToTableBodyContext(){this.clearBackTo(EI,ee.HTML)}clearBackToTableRowContext(){this.clearBackTo(EN,ee.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===ea.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return 0===this.stackTop&&this.tagIDs[0]===ea.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case ee.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case ee.SVG:if(EA.has(r))return!1;break;case ee.MATHML:if(Ew.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,ES)}hasInListItemScope(e){return this.hasInDynamicScope(e,E_)}hasInButtonScope(e){return this.hasInDynamicScope(e,Ek)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case ee.HTML:if(Ep.has(t))return!0;if(ES.has(t))return!1;break;case ee.SVG:if(EA.has(t))return!1;break;case ee.MATHML:if(Ew.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ee.HTML)switch(this.tagIDs[t]){case e:return!0;case ea.TABLE:case ea.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===ee.HTML)switch(this.tagIDs[e]){case ea.TBODY:case ea.THEAD:case ea.TFOOT:return!0;case ea.TABLE:case ea.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ee.HTML)switch(this.tagIDs[t]){case e:return!0;case ea.OPTION:case ea.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;void 0!==this.currentTagId&&Ev.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;void 0!==this.currentTagId&&ET.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;void 0!==this.currentTagId&&this.currentTagId!==e&&ET.has(this.currentTagId);)this.pop()}}(z=es||(es={}))[z.Marker=0]="Marker",z[z.Element=1]="Element";let ED={type:es.Marker};class EL{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,a=this.treeAdapter.getTagName(e),i=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===es.Marker)break;let{element:s}=t;if(this.treeAdapter.getTagName(s)===a&&this.treeAdapter.getNamespaceURI(s)===i){let t=this.treeAdapter.getAttrList(s);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<3)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<3)return;let r=new Map(t.map(e=>[e.name,e.value])),a=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(a+=1)>=3&&this.entries.splice(t.idx,1)}}insertMarker(){this.entries.unshift(ED)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:es.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:es.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);-1!==t&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(ED);-1===e?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===es.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===es.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===es.Element&&t.element===e)}}let EM={createDocument:()=>({nodeName:"#document",mode:en.NO_QUIRKS,childNodes:[]}),createDocumentFragment:()=>({nodeName:"#document-fragment",childNodes:[]}),createElement:(e,t,n)=>({nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}),createCommentNode:e=>({nodeName:"#comment",data:e,parentNode:null}),createTextNode:e=>({nodeName:"#text",value:e,parentNode:null}),appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent:e=>e.content,setDocumentType(e,t,n,r){let a=e.childNodes.find(e=>"#documentType"===e.nodeName);a?(a.name=t,a.publicId=n,a.systemId=r):EM.appendChild(e,{nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null})},setDocumentMode(e,t){e.mode=t},getDocumentMode:e=>e.mode,detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(EM.isTextNode(n)){n.value+=t;return}}EM.appendChild(e,EM.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&EM.isTextNode(r)?r.value+=t:EM.insertBefore(e,EM.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild:e=>e.childNodes[0],getChildNodes:e=>e.childNodes,getParentNode:e=>e.parentNode,getAttrList:e=>e.attrs,getTagName:e=>e.tagName,getNamespaceURI:e=>e.namespaceURI,getTextNodeContent:e=>e.value,getCommentNodeContent:e=>e.data,getDocumentTypeNodeName:e=>e.name,getDocumentTypeNodePublicId:e=>e.publicId,getDocumentTypeNodeSystemId:e=>e.systemId,isTextNode:e=>"#text"===e.nodeName,isCommentNode:e=>"#comment"===e.nodeName,isDocumentTypeNode:e=>"#documentType"===e.nodeName,isElementNode:e=>Object.prototype.hasOwnProperty.call(e,"tagName"),setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation:e=>e.sourceCodeLocation,updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},EP="html",Ej=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],EF=[...Ej,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],EU=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),EB=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Ez=[...EB,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function EH(e,t){return t.some(t=>e.startsWith(t))}let E$=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),EG=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ee.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ee.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ee.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ee.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ee.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ee.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ee.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ee.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ee.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ee.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ee.XMLNS}]]),Eq=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),EW=new Set([ea.B,ea.BIG,ea.BLOCKQUOTE,ea.BODY,ea.BR,ea.CENTER,ea.CODE,ea.DD,ea.DIV,ea.DL,ea.DT,ea.EM,ea.EMBED,ea.H1,ea.H2,ea.H3,ea.H4,ea.H5,ea.H6,ea.HEAD,ea.HR,ea.I,ea.IMG,ea.LI,ea.LISTING,ea.MENU,ea.META,ea.NOBR,ea.OL,ea.P,ea.PRE,ea.RUBY,ea.S,ea.SMALL,ea.SPAN,ea.STRONG,ea.STRIKE,ea.SUB,ea.SUP,ea.TABLE,ea.TT,ea.U,ea.UL,ea.VAR]);function EV(e){for(let t=0;t<e.attrs.length;t++)if("definitionurl"===e.attrs[t].name){e.attrs[t].name="definitionURL";break}}function EY(e){for(let t=0;t<e.attrs.length;t++){let n=E$.get(e.attrs[t].name);null!=n&&(e.attrs[t].name=n)}}function EK(e){for(let t=0;t<e.attrs.length;t++){let n=EG.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}(H=eo||(eo={}))[H.INITIAL=0]="INITIAL",H[H.BEFORE_HTML=1]="BEFORE_HTML",H[H.BEFORE_HEAD=2]="BEFORE_HEAD",H[H.IN_HEAD=3]="IN_HEAD",H[H.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",H[H.AFTER_HEAD=5]="AFTER_HEAD",H[H.IN_BODY=6]="IN_BODY",H[H.TEXT=7]="TEXT",H[H.IN_TABLE=8]="IN_TABLE",H[H.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",H[H.IN_CAPTION=10]="IN_CAPTION",H[H.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",H[H.IN_TABLE_BODY=12]="IN_TABLE_BODY",H[H.IN_ROW=13]="IN_ROW",H[H.IN_CELL=14]="IN_CELL",H[H.IN_SELECT=15]="IN_SELECT",H[H.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",H[H.IN_TEMPLATE=17]="IN_TEMPLATE",H[H.AFTER_BODY=18]="AFTER_BODY",H[H.IN_FRAMESET=19]="IN_FRAMESET",H[H.AFTER_FRAMESET=20]="AFTER_FRAMESET",H[H.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",H[H.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET";let EX={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},EZ=new Set([ea.TABLE,ea.TBODY,ea.TFOOT,ea.THEAD,ea.TR]),EQ={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:EM,onParseError:null};class EJ{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=eo.INITIAL,this.originalInsertionMode=eo.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...EQ,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=null!=t?t:this.treeAdapter.createDocument(),this.tokenizer=new Ex(this.options,this),this.activeFormattingElements=new EL(this.treeAdapter),this.fragmentContextID=n?Ec(this.treeAdapter.getTagName(n)):ea.UNKNOWN,this._setContextModes(null!=n?n:this.document,this.fragmentContextID),this.openElements=new EO(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...EQ,...t};null!=e||(e=n.treeAdapter.createElement(er.TEMPLATE,ee.HTML,[]));let r=n.treeAdapter.createElement("documentmock",ee.HTML,[]),a=new this(n,r,e);return a.fragmentContextID===ea.TEMPLATE&&a.tmplInsertionModeStack.unshift(eo.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){var r;if(!this.onParseError)return;let a=null!=(r=e.location)?r:EX,i={code:t,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:n?a.startLine:a.endLine,endCol:n?a.startCol:a.endCol,endOffset:n?a.startOffset:a.endOffset};this.onParseError(i)}onItemPush(e,t,n){var r,a;null==(a=(r=this.treeAdapter).onItemPush)||a.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),null==(r=(n=this.treeAdapter).onItemPop)||r.call(n,e,this.openElements.current),t){let e,t;0===this.openElements.stackTop&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===ee.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&void 0!==e&&void 0!==t&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,ee.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=eo.TEXT}switchToPlaintextParsing(){this.insertionMode=eo.TEXT,this.originalInsertionMode=eo.IN_BODY,this.tokenizer.state=Ef.PLAINTEXT}_getAdjustedCurrentElement(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===er.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===ee.HTML)switch(this.fragmentContextID){case ea.TITLE:case ea.TEXTAREA:this.tokenizer.state=Ef.RCDATA;break;case ea.STYLE:case ea.XMP:case ea.IFRAME:case ea.NOEMBED:case ea.NOFRAMES:case ea.NOSCRIPT:this.tokenizer.state=Ef.RAWTEXT;break;case ea.SCRIPT:this.tokenizer.state=Ef.SCRIPT_DATA;break;case ea.PLAINTEXT:this.tokenizer.state=Ef.PLAINTEXT}}_setDocumentType(e){let t=e.name||"",n=e.publicId||"",r=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(null!=t?t:this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,ee.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,ee.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(er.HTML,ee.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,ea.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),a=n?r.lastIndexOf(n):r.length,i=r[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),a=t.type===Y.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,a)}}shouldProcessStartTagTokenInForeignContent(e){let t,n;return!!this.currentNotInHTML&&(0===this.openElements.stackTop&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,(e.tagID!==ea.SVG||this.treeAdapter.getTagName(t)!==er.ANNOTATION_XML||this.treeAdapter.getNamespaceURI(t)!==ee.MATHML)&&(this.tokenizer.inForeignNode||(e.tagID===ea.MGLYPH||e.tagID===ea.MALIGNMARK)&&void 0!==n&&!this._isIntegrationPoint(n,t,ee.HTML)))}_processToken(e){switch(e.type){case Y.CHARACTER:this.onCharacter(e);break;case Y.NULL_CHARACTER:this.onNullCharacter(e);break;case Y.COMMENT:this.onComment(e);break;case Y.DOCTYPE:this.onDoctype(e);break;case Y.START_TAG:this._processStartTag(e);break;case Y.END_TAG:this.onEndTag(e);break;case Y.EOF:this.onEof(e);break;case Y.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){let r=this.treeAdapter.getNamespaceURI(t),a=this.treeAdapter.getAttrList(t);return(!n||n===ee.HTML)&&function(e,t,n){if(t===ee.MATHML&&e===ea.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===et.ENCODING){let t=n[e].value.toLowerCase();return"text/html"===t||"application/xhtml+xml"===t}}return t===ee.SVG&&(e===ea.FOREIGN_OBJECT||e===ea.DESC||e===ea.TITLE)}(e,r,a)||(!n||n===ee.MATHML)&&r===ee.MATHML&&(e===ea.MI||e===ea.MO||e===ea.MN||e===ea.MS||e===ea.MTEXT)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===es.Marker||this.openElements.contains(e.element)),n=-1===t?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=eo.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(ea.P),this.openElements.popUntilTagNamePopped(ea.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(0===e&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case ea.TR:this.insertionMode=eo.IN_ROW;return;case ea.TBODY:case ea.THEAD:case ea.TFOOT:this.insertionMode=eo.IN_TABLE_BODY;return;case ea.CAPTION:this.insertionMode=eo.IN_CAPTION;return;case ea.COLGROUP:this.insertionMode=eo.IN_COLUMN_GROUP;return;case ea.TABLE:this.insertionMode=eo.IN_TABLE;return;case ea.BODY:this.insertionMode=eo.IN_BODY;return;case ea.FRAMESET:this.insertionMode=eo.IN_FRAMESET;return;case ea.SELECT:return void this._resetInsertionModeForSelect(e);case ea.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case ea.HTML:this.insertionMode=this.headElement?eo.AFTER_HEAD:eo.BEFORE_HEAD;return;case ea.TD:case ea.TH:if(e>0){this.insertionMode=eo.IN_CELL;return}break;case ea.HEAD:if(e>0){this.insertionMode=eo.IN_HEAD;return}}this.insertionMode=eo.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===ea.TEMPLATE)break;if(e===ea.TABLE){this.insertionMode=eo.IN_SELECT_IN_TABLE;return}}this.insertionMode=eo.IN_SELECT}_isElementCausesFosterParenting(e){return EZ.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&void 0!==this.openElements.currentTagId&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case ea.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===ee.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case ea.TABLE:{let n=this.treeAdapter.getParentNode(t);if(n)return{parent:n,beforeElement:t};return{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return Ed[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){var t,n;return void(t=this,n=e,t._insertCharacters(n),t.framesetOk=!1)}switch(this.insertionMode){case eo.INITIAL:E3(this,e);break;case eo.BEFORE_HTML:E4(this,e);break;case eo.BEFORE_HEAD:E5(this,e);break;case eo.IN_HEAD:E8(this,e);break;case eo.IN_HEAD_NO_SCRIPT:E7(this,e);break;case eo.AFTER_HEAD:xe(this,e);break;case eo.IN_BODY:case eo.IN_CAPTION:case eo.IN_CELL:case eo.IN_TEMPLATE:xr(this,e);break;case eo.TEXT:case eo.IN_SELECT:case eo.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case eo.IN_TABLE:case eo.IN_TABLE_BODY:case eo.IN_ROW:xp(this,e);break;case eo.IN_TABLE_TEXT:xb(this,e);break;case eo.IN_COLUMN_GROUP:xv(this,e);break;case eo.AFTER_BODY:xC(this,e);break;case eo.AFTER_AFTER_BODY:xR(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){var t,n;return void(t=this,(n=e).chars="�",t._insertCharacters(n))}switch(this.insertionMode){case eo.INITIAL:E3(this,e);break;case eo.BEFORE_HTML:E4(this,e);break;case eo.BEFORE_HEAD:E5(this,e);break;case eo.IN_HEAD:E8(this,e);break;case eo.IN_HEAD_NO_SCRIPT:E7(this,e);break;case eo.AFTER_HEAD:xe(this,e);break;case eo.TEXT:this._insertCharacters(e);break;case eo.IN_TABLE:case eo.IN_TABLE_BODY:case eo.IN_ROW:xp(this,e);break;case eo.IN_COLUMN_GROUP:xv(this,e);break;case eo.AFTER_BODY:xC(this,e);break;case eo.AFTER_AFTER_BODY:xR(this,e)}}onComment(e){var t,n,r,a;if(this.skipNextNewLine=!1,this.currentNotInHTML)return void E1(this,e);switch(this.insertionMode){case eo.INITIAL:case eo.BEFORE_HTML:case eo.BEFORE_HEAD:case eo.IN_HEAD:case eo.IN_HEAD_NO_SCRIPT:case eo.AFTER_HEAD:case eo.IN_BODY:case eo.IN_TABLE:case eo.IN_CAPTION:case eo.IN_COLUMN_GROUP:case eo.IN_TABLE_BODY:case eo.IN_ROW:case eo.IN_CELL:case eo.IN_SELECT:case eo.IN_SELECT_IN_TABLE:case eo.IN_TEMPLATE:case eo.IN_FRAMESET:case eo.AFTER_FRAMESET:E1(this,e);break;case eo.IN_TABLE_TEXT:xy(this,e);break;case eo.AFTER_BODY:t=this,n=e,t._appendCommentNode(n,t.openElements.items[0]);break;case eo.AFTER_AFTER_BODY:case eo.AFTER_AFTER_FRAMESET:r=this,a=e,r._appendCommentNode(a,r.document)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case eo.INITIAL:!function(e,t){e._setDocumentType(t);let n=t.forceQuirks?en.QUIRKS:function(e){if(e.name!==EP)return en.QUIRKS;let{systemId:t}=e;if(t&&"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"===t.toLowerCase())return en.QUIRKS;let{publicId:n}=e;if(null!==n){if(n=n.toLowerCase(),EU.has(n))return en.QUIRKS;let e=null===t?EF:Ej;if(EH(n,e))return en.QUIRKS;if(EH(n,e=null===t?EB:Ez))return en.LIMITED_QUIRKS}return en.NO_QUIRKS}(t);(t.name!==EP||null!==t.publicId||null!==t.systemId&&"about:legacy-compat"!==t.systemId)&&e._err(t,V.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=eo.BEFORE_HTML}(this,e);break;case eo.BEFORE_HEAD:case eo.IN_HEAD:case eo.IN_HEAD_NO_SCRIPT:case eo.AFTER_HEAD:this._err(e,V.misplacedDoctype);break;case eo.IN_TABLE_TEXT:xy(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,V.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?function(e,t){let n;if((n=t.tagID)===ea.FONT&&t.attrs.some(({name:e})=>e===et.COLOR||e===et.SIZE||e===et.FACE)||EW.has(n))xO(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);if(r===ee.MATHML)EV(t);else if(r===ee.SVG){let e;null!=(e=Eq.get(t.tagName))&&(t.tagName=e,t.tagID=Ec(t.tagName)),EY(t)}EK(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case eo.INITIAL:E3(this,e);break;case eo.BEFORE_HTML:t=this,(n=e).tagID===ea.HTML?(t._insertElement(n,ee.HTML),t.insertionMode=eo.BEFORE_HEAD):E4(t,n);break;case eo.BEFORE_HEAD:var t,n,r,a,i,s,o,l,c,u,d,p,m=this,f=e;switch(f.tagID){case ea.HTML:xl(m,f);break;case ea.HEAD:m._insertElement(f,ee.HTML),m.headElement=m.openElements.current,m.insertionMode=eo.IN_HEAD;break;default:E5(m,f)}break;case eo.IN_HEAD:E6(this,e);break;case eo.IN_HEAD_NO_SCRIPT:var h=this,g=e;switch(g.tagID){case ea.HTML:xl(h,g);break;case ea.BASEFONT:case ea.BGSOUND:case ea.HEAD:case ea.LINK:case ea.META:case ea.NOFRAMES:case ea.STYLE:E6(h,g);break;case ea.NOSCRIPT:h._err(g,V.nestedNoscriptInHead);break;default:E7(h,g)}break;case eo.AFTER_HEAD:var b=this,y=e;switch(y.tagID){case ea.HTML:xl(b,y);break;case ea.BODY:b._insertElement(y,ee.HTML),b.framesetOk=!1,b.insertionMode=eo.IN_BODY;break;case ea.FRAMESET:b._insertElement(y,ee.HTML),b.insertionMode=eo.IN_FRAMESET;break;case ea.BASE:case ea.BASEFONT:case ea.BGSOUND:case ea.LINK:case ea.META:case ea.NOFRAMES:case ea.SCRIPT:case ea.STYLE:case ea.TEMPLATE:case ea.TITLE:b._err(y,V.abandonedHeadElementChild),b.openElements.push(b.headElement,ea.HEAD),E6(b,y),b.openElements.remove(b.headElement);break;case ea.HEAD:b._err(y,V.misplacedStartTagForHeadElement);break;default:xe(b,y)}break;case eo.IN_BODY:xl(this,e);break;case eo.IN_TABLE:xm(this,e);break;case eo.IN_TABLE_TEXT:xy(this,e);break;case eo.IN_CAPTION:let E;r=this,E=(a=e).tagID,xE.has(E)?r.openElements.hasInTableScope(ea.CAPTION)&&(r.openElements.generateImpliedEndTags(),r.openElements.popUntilTagNamePopped(ea.CAPTION),r.activeFormattingElements.clearToLastMarker(),r.insertionMode=eo.IN_TABLE,xm(r,a)):xl(r,a);break;case eo.IN_COLUMN_GROUP:xx(this,e);break;case eo.IN_TABLE_BODY:xT(this,e);break;case eo.IN_ROW:x_(this,e);break;case eo.IN_CELL:let x;i=this,x=(s=e).tagID,xE.has(x)?(i.openElements.hasInTableScope(ea.TD)||i.openElements.hasInTableScope(ea.TH))&&(i._closeTableCell(),x_(i,s)):xl(i,s);break;case eo.IN_SELECT:xw(this,e);break;case eo.IN_SELECT_IN_TABLE:let v;o=this,(v=(l=e).tagID)===ea.CAPTION||v===ea.TABLE||v===ea.TBODY||v===ea.TFOOT||v===ea.THEAD||v===ea.TR||v===ea.TD||v===ea.TH?(o.openElements.popUntilTagNamePopped(ea.SELECT),o._resetInsertionMode(),o._processStartTag(l)):xw(o,l);break;case eo.IN_TEMPLATE:var T=this,S=e;switch(S.tagID){case ea.BASE:case ea.BASEFONT:case ea.BGSOUND:case ea.LINK:case ea.META:case ea.NOFRAMES:case ea.SCRIPT:case ea.STYLE:case ea.TEMPLATE:case ea.TITLE:E6(T,S);break;case ea.CAPTION:case ea.COLGROUP:case ea.TBODY:case ea.TFOOT:case ea.THEAD:T.tmplInsertionModeStack[0]=eo.IN_TABLE,T.insertionMode=eo.IN_TABLE,xm(T,S);break;case ea.COL:T.tmplInsertionModeStack[0]=eo.IN_COLUMN_GROUP,T.insertionMode=eo.IN_COLUMN_GROUP,xx(T,S);break;case ea.TR:T.tmplInsertionModeStack[0]=eo.IN_TABLE_BODY,T.insertionMode=eo.IN_TABLE_BODY,xT(T,S);break;case ea.TD:case ea.TH:T.tmplInsertionModeStack[0]=eo.IN_ROW,T.insertionMode=eo.IN_ROW,x_(T,S);break;default:T.tmplInsertionModeStack[0]=eo.IN_BODY,T.insertionMode=eo.IN_BODY,xl(T,S)}break;case eo.AFTER_BODY:c=this,(u=e).tagID===ea.HTML?xl(c,u):xC(c,u);break;case eo.IN_FRAMESET:var _=this,k=e;switch(k.tagID){case ea.HTML:xl(_,k);break;case ea.FRAMESET:_._insertElement(k,ee.HTML);break;case ea.FRAME:_._appendElement(k,ee.HTML),k.ackSelfClosing=!0;break;case ea.NOFRAMES:E6(_,k)}break;case eo.AFTER_FRAMESET:var w=this,A=e;switch(A.tagID){case ea.HTML:xl(w,A);break;case ea.NOFRAMES:E6(w,A)}break;case eo.AFTER_AFTER_BODY:d=this,(p=e).tagID===ea.HTML?xl(d,p):xR(d,p);break;case eo.AFTER_AFTER_FRAMESET:var N=this,I=e;switch(I.tagID){case ea.HTML:xl(N,I);break;case ea.NOFRAMES:E6(N,I)}}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?function(e,t){if(t.tagID===ea.P||t.tagID===ea.BR){xO(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===ee.HTML){e._endTagOutsideForeignContent(t);break}let a=e.treeAdapter.getTagName(r);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(n);break}}}(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case eo.INITIAL:E3(this,e);break;case eo.BEFORE_HTML:let t;r=this,((t=(a=e).tagID)===ea.HTML||t===ea.HEAD||t===ea.BODY||t===ea.BR)&&E4(r,a);break;case eo.BEFORE_HEAD:let n;i=this,(n=(s=e).tagID)===ea.HEAD||n===ea.BODY||n===ea.HTML||n===ea.BR?E5(i,s):i._err(s,V.endTagWithoutMatchingOpenElement);break;case eo.IN_HEAD:var r,a,i,s,o,l,c,u,d,p,m,f,h=this,g=e;switch(g.tagID){case ea.HEAD:h.openElements.pop(),h.insertionMode=eo.AFTER_HEAD;break;case ea.BODY:case ea.BR:case ea.HTML:E8(h,g);break;case ea.TEMPLATE:E9(h,g);break;default:h._err(g,V.endTagWithoutMatchingOpenElement)}break;case eo.IN_HEAD_NO_SCRIPT:var b=this,y=e;switch(y.tagID){case ea.NOSCRIPT:b.openElements.pop(),b.insertionMode=eo.IN_HEAD;break;case ea.BR:E7(b,y);break;default:b._err(y,V.endTagWithoutMatchingOpenElement)}break;case eo.AFTER_HEAD:var E=this,x=e;switch(x.tagID){case ea.BODY:case ea.HTML:case ea.BR:xe(E,x);break;case ea.TEMPLATE:E9(E,x);break;default:E._err(x,V.endTagWithoutMatchingOpenElement)}break;case eo.IN_BODY:xu(this,e);break;case eo.TEXT:o=this,e.tagID===ea.SCRIPT&&(null==(l=o.scriptHandler)||l.call(o,o.openElements.current)),o.openElements.pop(),o.insertionMode=o.originalInsertionMode;break;case eo.IN_TABLE:xf(this,e);break;case eo.IN_TABLE_TEXT:xy(this,e);break;case eo.IN_CAPTION:var v=this,T=e;let S=T.tagID;switch(S){case ea.CAPTION:case ea.TABLE:v.openElements.hasInTableScope(ea.CAPTION)&&(v.openElements.generateImpliedEndTags(),v.openElements.popUntilTagNamePopped(ea.CAPTION),v.activeFormattingElements.clearToLastMarker(),v.insertionMode=eo.IN_TABLE,S===ea.TABLE&&xf(v,T));break;case ea.BODY:case ea.COL:case ea.COLGROUP:case ea.HTML:case ea.TBODY:case ea.TD:case ea.TFOOT:case ea.TH:case ea.THEAD:case ea.TR:break;default:xu(v,T)}break;case eo.IN_COLUMN_GROUP:var _=this,k=e;switch(k.tagID){case ea.COLGROUP:_.openElements.currentTagId===ea.COLGROUP&&(_.openElements.pop(),_.insertionMode=eo.IN_TABLE);break;case ea.TEMPLATE:E9(_,k);break;case ea.COL:break;default:xv(_,k)}break;case eo.IN_TABLE_BODY:xS(this,e);break;case eo.IN_ROW:xk(this,e);break;case eo.IN_CELL:var w=this,A=e;let N=A.tagID;switch(N){case ea.TD:case ea.TH:w.openElements.hasInTableScope(N)&&(w.openElements.generateImpliedEndTags(),w.openElements.popUntilTagNamePopped(N),w.activeFormattingElements.clearToLastMarker(),w.insertionMode=eo.IN_ROW);break;case ea.TABLE:case ea.TBODY:case ea.TFOOT:case ea.THEAD:case ea.TR:w.openElements.hasInTableScope(N)&&(w._closeTableCell(),xk(w,A));break;case ea.BODY:case ea.CAPTION:case ea.COL:case ea.COLGROUP:case ea.HTML:break;default:xu(w,A)}break;case eo.IN_SELECT:xA(this,e);break;case eo.IN_SELECT_IN_TABLE:let I;c=this,(I=(u=e).tagID)===ea.CAPTION||I===ea.TABLE||I===ea.TBODY||I===ea.TFOOT||I===ea.THEAD||I===ea.TR||I===ea.TD||I===ea.TH?c.openElements.hasInTableScope(I)&&(c.openElements.popUntilTagNamePopped(ea.SELECT),c._resetInsertionMode(),c.onEndTag(u)):xA(c,u);break;case eo.IN_TEMPLATE:d=this,(p=e).tagID===ea.TEMPLATE&&E9(d,p);break;case eo.AFTER_BODY:xI(this,e);break;case eo.IN_FRAMESET:m=this,e.tagID===ea.FRAMESET&&!m.openElements.isRootHtmlElementCurrent()&&(m.openElements.pop(),m.fragmentContext||m.openElements.currentTagId===ea.FRAMESET||(m.insertionMode=eo.AFTER_FRAMESET));break;case eo.AFTER_FRAMESET:f=this,e.tagID===ea.HTML&&(f.insertionMode=eo.AFTER_AFTER_FRAMESET);break;case eo.AFTER_AFTER_BODY:xR(this,e)}}onEof(e){switch(this.insertionMode){case eo.INITIAL:E3(this,e);break;case eo.BEFORE_HTML:E4(this,e);break;case eo.BEFORE_HEAD:E5(this,e);break;case eo.IN_HEAD:E8(this,e);break;case eo.IN_HEAD_NO_SCRIPT:E7(this,e);break;case eo.AFTER_HEAD:xe(this,e);break;case eo.IN_BODY:case eo.IN_TABLE:case eo.IN_CAPTION:case eo.IN_COLUMN_GROUP:case eo.IN_TABLE_BODY:case eo.IN_ROW:case eo.IN_CELL:case eo.IN_SELECT:case eo.IN_SELECT_IN_TABLE:xd(this,e);break;case eo.TEXT:var t,n;t=this,n=e,t._err(n,V.eofInElementThatCanContainOnlyText),t.openElements.pop(),t.insertionMode=t.originalInsertionMode,t.onEof(n);break;case eo.IN_TABLE_TEXT:xy(this,e);break;case eo.IN_TEMPLATE:xN(this,e);break;case eo.AFTER_BODY:case eo.IN_FRAMESET:case eo.AFTER_FRAMESET:case eo.AFTER_AFTER_BODY:case eo.AFTER_AFTER_FRAMESET:E2(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===W.LINE_FEED)){if(1===e.chars.length)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode)return void this._insertCharacters(e);switch(this.insertionMode){case eo.IN_HEAD:case eo.IN_HEAD_NO_SCRIPT:case eo.AFTER_HEAD:case eo.TEXT:case eo.IN_COLUMN_GROUP:case eo.IN_SELECT:case eo.IN_SELECT_IN_TABLE:case eo.IN_FRAMESET:case eo.AFTER_FRAMESET:this._insertCharacters(e);break;case eo.IN_BODY:case eo.IN_CAPTION:case eo.IN_CELL:case eo.IN_TEMPLATE:case eo.AFTER_BODY:case eo.AFTER_AFTER_BODY:case eo.AFTER_AFTER_FRAMESET:xn(this,e);break;case eo.IN_TABLE:case eo.IN_TABLE_BODY:case eo.IN_ROW:xp(this,e);break;case eo.IN_TABLE_TEXT:xg(this,e)}}}function E0(e,t){for(let n=0;n<8;n++){let n=function(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):xc(e,t),n}(e,t);if(!n)break;let r=function(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let a=e.openElements.items[r];if(a===t.element)break;e._isSpecialElement(a,e.openElements.tagIDs[r])&&(n=a)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let a=function(e,t,n){let r=t,a=e.openElements.getCommonAncestor(t);for(let i=0,s=a;s!==n;i++,s=a){a=e.openElements.getCommonAncestor(s);let n=e.activeFormattingElements.getElementEntry(s),o=n&&i>=3;!n||o?(o&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(s)):(s=function(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}(e,r,n.element),i=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(a),i&&function(e,t,n){let r=Ec(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let a=e.treeAdapter.getNamespaceURI(t);r===ea.TEMPLATE&&a===ee.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}(e,i,a),function(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:a}=n,i=e.treeAdapter.createElement(a.tagName,r,a.attrs);e._adoptNodes(t,i),e.treeAdapter.appendChild(t,i),e.activeFormattingElements.insertElementAfterBookmark(i,a),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,i,a.tagID)}(e,r,n)}}function E1(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function E2(e,t){if(e.stopped=!0,t.location){let n=2*!e.fragmentContext;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function E3(e,t){e._err(t,V.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,en.QUIRKS),e.insertionMode=eo.BEFORE_HTML,e._processToken(t)}function E4(e,t){e._insertFakeRootElement(),e.insertionMode=eo.BEFORE_HEAD,e._processToken(t)}function E5(e,t){e._insertFakeElement(er.HEAD,ea.HEAD),e.headElement=e.openElements.current,e.insertionMode=eo.IN_HEAD,e._processToken(t)}function E6(e,t){switch(t.tagID){case ea.HTML:xl(e,t);break;case ea.BASE:case ea.BASEFONT:case ea.BGSOUND:case ea.LINK:case ea.META:e._appendElement(t,ee.HTML),t.ackSelfClosing=!0;break;case ea.TITLE:e._switchToTextParsing(t,Ef.RCDATA);break;case ea.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,Ef.RAWTEXT):(e._insertElement(t,ee.HTML),e.insertionMode=eo.IN_HEAD_NO_SCRIPT);break;case ea.NOFRAMES:case ea.STYLE:e._switchToTextParsing(t,Ef.RAWTEXT);break;case ea.SCRIPT:e._switchToTextParsing(t,Ef.SCRIPT_DATA);break;case ea.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=eo.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(eo.IN_TEMPLATE);break;case ea.HEAD:e._err(t,V.misplacedStartTagForHeadElement);break;default:E8(e,t)}}function E9(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==ea.TEMPLATE&&e._err(t,V.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(ea.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,V.endTagWithoutMatchingOpenElement)}function E8(e,t){e.openElements.pop(),e.insertionMode=eo.AFTER_HEAD,e._processToken(t)}function E7(e,t){let n=t.type===Y.EOF?V.openElementsLeftAfterEof:V.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=eo.IN_HEAD,e._processToken(t)}function xe(e,t){e._insertFakeElement(er.BODY,ea.BODY),e.insertionMode=eo.IN_BODY,xt(e,t)}function xt(e,t){switch(t.type){case Y.CHARACTER:xr(e,t);break;case Y.WHITESPACE_CHARACTER:xn(e,t);break;case Y.COMMENT:E1(e,t);break;case Y.START_TAG:xl(e,t);break;case Y.END_TAG:xu(e,t);break;case Y.EOF:xd(e,t)}}function xn(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function xr(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function xa(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ee.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function xi(e){let t=Er(e,et.TYPE);return null!=t&&"hidden"===t.toLowerCase()}function xs(e,t){e._switchToTextParsing(t,Ef.RAWTEXT)}function xo(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ee.HTML)}function xl(e,t){switch(t.tagID){case ea.I:case ea.S:case ea.B:case ea.U:case ea.EM:case ea.TT:case ea.BIG:case ea.CODE:case ea.FONT:case ea.SMALL:case ea.STRIKE:case ea.STRONG:e._reconstructActiveFormattingElements(),e._insertElement(t,ee.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t);break;case ea.A:let n;(n=e.activeFormattingElements.getElementEntryInScopeWithTagName(er.A))&&(E0(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ee.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t);break;case ea.H1:case ea.H2:case ea.H3:case ea.H4:case ea.H5:case ea.H6:e.openElements.hasInButtonScope(ea.P)&&e._closePElement(),void 0!==e.openElements.currentTagId&&Ep.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ee.HTML);break;case ea.P:case ea.DL:case ea.OL:case ea.UL:case ea.DIV:case ea.DIR:case ea.NAV:case ea.MAIN:case ea.MENU:case ea.ASIDE:case ea.CENTER:case ea.FIGURE:case ea.FOOTER:case ea.HEADER:case ea.HGROUP:case ea.DIALOG:case ea.DETAILS:case ea.ADDRESS:case ea.ARTICLE:case ea.SEARCH:case ea.SECTION:case ea.SUMMARY:case ea.FIELDSET:case ea.BLOCKQUOTE:case ea.FIGCAPTION:e.openElements.hasInButtonScope(ea.P)&&e._closePElement(),e._insertElement(t,ee.HTML);break;case ea.LI:case ea.DD:case ea.DT:e.framesetOk=!1;let r=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let n=e.openElements.tagIDs[t];if(r===ea.LI&&n===ea.LI||(r===ea.DD||r===ea.DT)&&(n===ea.DD||n===ea.DT)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n);break}if(n!==ea.ADDRESS&&n!==ea.DIV&&n!==ea.P&&e._isSpecialElement(e.openElements.items[t],n))break}e.openElements.hasInButtonScope(ea.P)&&e._closePElement(),e._insertElement(t,ee.HTML);break;case ea.BR:case ea.IMG:case ea.WBR:case ea.AREA:case ea.EMBED:case ea.KEYGEN:xa(e,t);break;case ea.HR:e.openElements.hasInButtonScope(ea.P)&&e._closePElement(),e._appendElement(t,ee.HTML),e.framesetOk=!1,t.ackSelfClosing=!0;break;case ea.RB:case ea.RTC:e.openElements.hasInScope(ea.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ee.HTML);break;case ea.RT:case ea.RP:e.openElements.hasInScope(ea.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(ea.RTC),e._insertElement(t,ee.HTML);break;case ea.PRE:case ea.LISTING:e.openElements.hasInButtonScope(ea.P)&&e._closePElement(),e._insertElement(t,ee.HTML),e.skipNextNewLine=!0,e.framesetOk=!1;break;case ea.XMP:e.openElements.hasInButtonScope(ea.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ef.RAWTEXT);break;case ea.SVG:e._reconstructActiveFormattingElements(),EY(t),EK(t),t.selfClosing?e._appendElement(t,ee.SVG):e._insertElement(t,ee.SVG),t.ackSelfClosing=!0;break;case ea.HTML:0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs);break;case ea.BASE:case ea.LINK:case ea.META:case ea.STYLE:case ea.TITLE:case ea.SCRIPT:case ea.BGSOUND:case ea.BASEFONT:case ea.TEMPLATE:E6(e,t);break;case ea.BODY:let a;(a=e.openElements.tryPeekProperlyNestedBodyElement())&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(a,t.attrs));break;case ea.FORM:let i;i=e.openElements.tmplCount>0,(!e.formElement||i)&&(e.openElements.hasInButtonScope(ea.P)&&e._closePElement(),e._insertElement(t,ee.HTML),i||(e.formElement=e.openElements.current));break;case ea.NOBR:e._reconstructActiveFormattingElements(),e.openElements.hasInScope(ea.NOBR)&&(E0(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ee.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t);break;case ea.MATH:e._reconstructActiveFormattingElements(),EV(t),EK(t),t.selfClosing?e._appendElement(t,ee.MATHML):e._insertElement(t,ee.MATHML),t.ackSelfClosing=!0;break;case ea.TABLE:e.treeAdapter.getDocumentMode(e.document)!==en.QUIRKS&&e.openElements.hasInButtonScope(ea.P)&&e._closePElement(),e._insertElement(t,ee.HTML),e.framesetOk=!1,e.insertionMode=eo.IN_TABLE;break;case ea.INPUT:e._reconstructActiveFormattingElements(),e._appendElement(t,ee.HTML),xi(t)||(e.framesetOk=!1),t.ackSelfClosing=!0;break;case ea.PARAM:case ea.TRACK:case ea.SOURCE:e._appendElement(t,ee.HTML),t.ackSelfClosing=!0;break;case ea.IMAGE:t.tagName=er.IMG,t.tagID=ea.IMG,xa(e,t);break;case ea.BUTTON:e.openElements.hasInScope(ea.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(ea.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ee.HTML),e.framesetOk=!1;break;case ea.APPLET:case ea.OBJECT:case ea.MARQUEE:e._reconstructActiveFormattingElements(),e._insertElement(t,ee.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1;break;case ea.IFRAME:e.framesetOk=!1,e._switchToTextParsing(t,Ef.RAWTEXT);break;case ea.SELECT:e._reconstructActiveFormattingElements(),e._insertElement(t,ee.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===eo.IN_TABLE||e.insertionMode===eo.IN_CAPTION||e.insertionMode===eo.IN_TABLE_BODY||e.insertionMode===eo.IN_ROW||e.insertionMode===eo.IN_CELL?eo.IN_SELECT_IN_TABLE:eo.IN_SELECT;break;case ea.OPTION:case ea.OPTGROUP:e.openElements.currentTagId===ea.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ee.HTML);break;case ea.NOEMBED:case ea.NOFRAMES:xs(e,t);break;case ea.FRAMESET:let s;s=e.openElements.tryPeekProperlyNestedBodyElement(),e.framesetOk&&s&&(e.treeAdapter.detachNode(s),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ee.HTML),e.insertionMode=eo.IN_FRAMESET);break;case ea.TEXTAREA:e._insertElement(t,ee.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ef.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=eo.TEXT;break;case ea.NOSCRIPT:e.options.scriptingEnabled?xs(e,t):xo(e,t);break;case ea.PLAINTEXT:e.openElements.hasInButtonScope(ea.P)&&e._closePElement(),e._insertElement(t,ee.HTML),e.tokenizer.state=Ef.PLAINTEXT;break;case ea.COL:case ea.TH:case ea.TD:case ea.TR:case ea.HEAD:case ea.FRAME:case ea.TBODY:case ea.TFOOT:case ea.THEAD:case ea.CAPTION:case ea.COLGROUP:break;default:xo(e,t)}}function xc(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let a=e.openElements.items[t],i=e.openElements.tagIDs[t];if(r===i&&(r!==ea.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(a,i))break}}function xu(e,t){switch(t.tagID){case ea.A:case ea.B:case ea.I:case ea.S:case ea.U:case ea.EM:case ea.TT:case ea.BIG:case ea.CODE:case ea.FONT:case ea.NOBR:case ea.SMALL:case ea.STRIKE:case ea.STRONG:E0(e,t);break;case ea.P:e.openElements.hasInButtonScope(ea.P)||e._insertFakeElement(er.P,ea.P),e._closePElement();break;case ea.DL:case ea.UL:case ea.OL:case ea.DIR:case ea.DIV:case ea.NAV:case ea.PRE:case ea.MAIN:case ea.MENU:case ea.ASIDE:case ea.BUTTON:case ea.CENTER:case ea.FIGURE:case ea.FOOTER:case ea.HEADER:case ea.HGROUP:case ea.DIALOG:case ea.ADDRESS:case ea.ARTICLE:case ea.DETAILS:case ea.SEARCH:case ea.SECTION:case ea.SUMMARY:case ea.LISTING:case ea.FIELDSET:case ea.BLOCKQUOTE:case ea.FIGCAPTION:let n;n=t.tagID,e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n));break;case ea.LI:e.openElements.hasInListItemScope(ea.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(ea.LI),e.openElements.popUntilTagNamePopped(ea.LI));break;case ea.DD:case ea.DT:let r;r=t.tagID,e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r));break;case ea.H1:case ea.H2:case ea.H3:case ea.H4:case ea.H5:case ea.H6:e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped());break;case ea.BR:e._reconstructActiveFormattingElements(),e._insertFakeElement(er.BR,ea.BR),e.openElements.pop(),e.framesetOk=!1;break;case ea.BODY:if(e.openElements.hasInScope(ea.BODY)&&(e.insertionMode=eo.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}break;case ea.HTML:e.openElements.hasInScope(ea.BODY)&&(e.insertionMode=eo.AFTER_BODY,xI(e,t));break;case ea.FORM:!function(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(ea.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(ea.FORM):n&&e.openElements.remove(n))}(e);break;case ea.APPLET:case ea.OBJECT:case ea.MARQUEE:let a;a=t.tagID,e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a),e.activeFormattingElements.clearToLastMarker());break;case ea.TEMPLATE:E9(e,t);break;default:xc(e,t)}}function xd(e,t){e.tmplInsertionModeStack.length>0?xN(e,t):E2(e,t)}function xp(e,t){if(void 0!==e.openElements.currentTagId&&EZ.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=eo.IN_TABLE_TEXT,t.type){case Y.CHARACTER:xb(e,t);break;case Y.WHITESPACE_CHARACTER:xg(e,t)}else xh(e,t)}function xm(e,t){switch(t.tagID){case ea.TD:case ea.TH:case ea.TR:e.openElements.clearBackToTableContext(),e._insertFakeElement(er.TBODY,ea.TBODY),e.insertionMode=eo.IN_TABLE_BODY,xT(e,t);break;case ea.STYLE:case ea.SCRIPT:case ea.TEMPLATE:E6(e,t);break;case ea.COL:e.openElements.clearBackToTableContext(),e._insertFakeElement(er.COLGROUP,ea.COLGROUP),e.insertionMode=eo.IN_COLUMN_GROUP,xx(e,t);break;case ea.FORM:e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,ee.HTML),e.formElement=e.openElements.current,e.openElements.pop());break;case ea.TABLE:e.openElements.hasInTableScope(ea.TABLE)&&(e.openElements.popUntilTagNamePopped(ea.TABLE),e._resetInsertionMode(),e._processStartTag(t));break;case ea.TBODY:case ea.TFOOT:case ea.THEAD:e.openElements.clearBackToTableContext(),e._insertElement(t,ee.HTML),e.insertionMode=eo.IN_TABLE_BODY;break;case ea.INPUT:xi(t)?e._appendElement(t,ee.HTML):xh(e,t),t.ackSelfClosing=!0;break;case ea.CAPTION:e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ee.HTML),e.insertionMode=eo.IN_CAPTION;break;case ea.COLGROUP:e.openElements.clearBackToTableContext(),e._insertElement(t,ee.HTML),e.insertionMode=eo.IN_COLUMN_GROUP;break;default:xh(e,t)}}function xf(e,t){switch(t.tagID){case ea.TABLE:e.openElements.hasInTableScope(ea.TABLE)&&(e.openElements.popUntilTagNamePopped(ea.TABLE),e._resetInsertionMode());break;case ea.TEMPLATE:E9(e,t);break;case ea.BODY:case ea.CAPTION:case ea.COL:case ea.COLGROUP:case ea.HTML:case ea.TBODY:case ea.TD:case ea.TFOOT:case ea.TH:case ea.THEAD:case ea.TR:break;default:xh(e,t)}}function xh(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,xt(e,t),e.fosterParentingEnabled=n}function xg(e,t){e.pendingCharacterTokens.push(t)}function xb(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function xy(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)xh(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}let xE=new Set([ea.CAPTION,ea.COL,ea.COLGROUP,ea.TBODY,ea.TD,ea.TFOOT,ea.TH,ea.THEAD,ea.TR]);function xx(e,t){switch(t.tagID){case ea.HTML:xl(e,t);break;case ea.COL:e._appendElement(t,ee.HTML),t.ackSelfClosing=!0;break;case ea.TEMPLATE:E6(e,t);break;default:xv(e,t)}}function xv(e,t){e.openElements.currentTagId===ea.COLGROUP&&(e.openElements.pop(),e.insertionMode=eo.IN_TABLE,e._processToken(t))}function xT(e,t){switch(t.tagID){case ea.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ee.HTML),e.insertionMode=eo.IN_ROW;break;case ea.TH:case ea.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(er.TR,ea.TR),e.insertionMode=eo.IN_ROW,x_(e,t);break;case ea.CAPTION:case ea.COL:case ea.COLGROUP:case ea.TBODY:case ea.TFOOT:case ea.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=eo.IN_TABLE,xm(e,t));break;default:xm(e,t)}}function xS(e,t){let n=t.tagID;switch(t.tagID){case ea.TBODY:case ea.TFOOT:case ea.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=eo.IN_TABLE);break;case ea.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=eo.IN_TABLE,xf(e,t));break;case ea.BODY:case ea.CAPTION:case ea.COL:case ea.COLGROUP:case ea.HTML:case ea.TD:case ea.TH:case ea.TR:break;default:xf(e,t)}}function x_(e,t){switch(t.tagID){case ea.TH:case ea.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,ee.HTML),e.insertionMode=eo.IN_CELL,e.activeFormattingElements.insertMarker();break;case ea.CAPTION:case ea.COL:case ea.COLGROUP:case ea.TBODY:case ea.TFOOT:case ea.THEAD:case ea.TR:e.openElements.hasInTableScope(ea.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=eo.IN_TABLE_BODY,xT(e,t));break;default:xm(e,t)}}function xk(e,t){switch(t.tagID){case ea.TR:e.openElements.hasInTableScope(ea.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=eo.IN_TABLE_BODY);break;case ea.TABLE:e.openElements.hasInTableScope(ea.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=eo.IN_TABLE_BODY,xS(e,t));break;case ea.TBODY:case ea.TFOOT:case ea.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(ea.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=eo.IN_TABLE_BODY,xS(e,t));break;case ea.BODY:case ea.CAPTION:case ea.COL:case ea.COLGROUP:case ea.HTML:case ea.TD:case ea.TH:break;default:xf(e,t)}}function xw(e,t){switch(t.tagID){case ea.HTML:xl(e,t);break;case ea.OPTION:e.openElements.currentTagId===ea.OPTION&&e.openElements.pop(),e._insertElement(t,ee.HTML);break;case ea.OPTGROUP:e.openElements.currentTagId===ea.OPTION&&e.openElements.pop(),e.openElements.currentTagId===ea.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ee.HTML);break;case ea.HR:e.openElements.currentTagId===ea.OPTION&&e.openElements.pop(),e.openElements.currentTagId===ea.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ee.HTML),t.ackSelfClosing=!0;break;case ea.INPUT:case ea.KEYGEN:case ea.TEXTAREA:case ea.SELECT:e.openElements.hasInSelectScope(ea.SELECT)&&(e.openElements.popUntilTagNamePopped(ea.SELECT),e._resetInsertionMode(),t.tagID!==ea.SELECT&&e._processStartTag(t));break;case ea.SCRIPT:case ea.TEMPLATE:E6(e,t)}}function xA(e,t){switch(t.tagID){case ea.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===ea.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===ea.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===ea.OPTGROUP&&e.openElements.pop();break;case ea.OPTION:e.openElements.currentTagId===ea.OPTION&&e.openElements.pop();break;case ea.SELECT:e.openElements.hasInSelectScope(ea.SELECT)&&(e.openElements.popUntilTagNamePopped(ea.SELECT),e._resetInsertionMode());break;case ea.TEMPLATE:E9(e,t)}}function xN(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(ea.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):E2(e,t)}function xI(e,t){var n;if(t.tagID===ea.HTML){if(e.fragmentContext||(e.insertionMode=eo.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===ea.HTML){e._setEndLocation(e.openElements.items[0],t);let r=e.openElements.items[1];!r||(null==(n=e.treeAdapter.getNodeSourceCodeLocation(r))?void 0:n.endTag)||e._setEndLocation(r,t)}}else xC(e,t)}function xC(e,t){e.insertionMode=eo.IN_BODY,xt(e,t)}function xR(e,t){e.insertionMode=eo.IN_BODY,xt(e,t)}function xO(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ee.HTML&&void 0!==e.openElements.currentTagId&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}er.AREA,er.BASE,er.BASEFONT,er.BGSOUND,er.BR,er.COL,er.EMBED,er.FRAME,er.HR,er.IMG,er.INPUT,er.KEYGEN,er.LINK,er.META,er.PARAM,er.SOURCE,er.TRACK,er.WBR;var xD=e.i(382698),xD=xD,xL=e.i(615473),xL=xL;let xM=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,xP=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),xj={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function xF(e,t){var n,r;let a,i,s=!!((a="root"===(r=e).type?r.children[0]:r)&&("doctype"===a.type||"element"===a.type&&"html"===a.tagName.toLowerCase())),o=yJ("type",{handlers:{root:xB,element:xz,text:xH,comment:xG,doctype:x$,raw:xq},unknown:xW}),l={parser:s?new EJ(xj):EJ.getFragmentParser(void 0,xj),handle(e){o(e,l)},stitches:!1,options:t||{}};o(e,l),xV(l,fK());let c=(n=s?l.parser.document:l.parser.getFragment(),yV({file:(i={file:l.options.file}).file||void 0,location:!1,schema:"svg"===i.space?fG:f$,verbose:i.verbose||!1},n));return(l.stitches&&g$(c,"comment",function(e,t,n){if(e.value.stitch&&n&&void 0!==t)return n.children[t]=e.value.stitch,t}),"root"===c.type&&1===c.children.length&&c.children[0].type===e.type)?c.children[0]:c}function xU(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function xB(e,t){xU(e.children,t)}function xz(e,t){(function(e,t){let n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ef.PLAINTEXT)return;xV(t,fK(e));let r=t.parser.openElements.current,a="namespaceURI"in r?r.namespaceURI:yG.html;a===yG.html&&"svg"===n&&(a=yG.svg);let i=y1({...e,children:[]},"svg"===({space:a===yG.svg?"svg":"html"}).space?fG:f$),s={type:xD.TokenType.START_TAG,tagName:n,tagID:xL.getTagID(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in i?i.attrs:[],location:xK(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n})(e,t),xU(e.children,t),function(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&y4.includes(n)||t.parser.tokenizer.state===Ef.PLAINTEXT)return;xV(t,fY(e));let r={type:xD.TokenType.END_TAG,tagName:n,tagID:xL.getTagID(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:xK(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ef.RCDATA||t.parser.tokenizer.state===Ef.RAWTEXT||t.parser.tokenizer.state===Ef.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ef.DATA)}(e,t)}function xH(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);let n={type:xD.TokenType.CHARACTER,chars:e.value,location:xK(e)};xV(t,fK(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function x$(e,t){let n={type:xD.TokenType.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:xK(e)};xV(t,fK(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function xG(e,t){let n=e.value,r={type:xD.TokenType.COMMENT,data:n,location:xK(e)};xV(t,fK(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function xq(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,xY(t,fK(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(xM,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),72===t.parser.tokenizer.state||78===t.parser.tokenizer.state){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;let e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function xW(e,t){if(t.options.passThrough&&t.options.passThrough.includes(e.type)){var n;let r;t.stitches=!0,r="children"in(n=e)?gD({...n,children:[]}):gD(n),"children"in e&&"children"in r&&(r.children=xF({type:"root",children:e.children},t.options).children),xG({type:"comment",value:{stitch:r}},t)}else{let t="";throw xP.has(e.type)&&(t=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),Error("Cannot compile `"+e.type+"` node"+t)}}function xV(e,t){xY(e,t);let n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Ef.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function xY(e,t){if(t&&void 0!==t.offset){let n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function xK(e){let t=fK(e)||{line:void 0,column:void 0,offset:void 0},n=fY(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function xX(e){return function(t,n){return xF(t,{...e,file:n})}}function xZ(e,t){let n=function(e,t){switch(e.nodeType){case 1:return function(e,t){let n=e.namespaceURI,r=n===yG.svg?yH:yz,a=n===yG.html?e.tagName.toLowerCase():e.tagName,i=n===yG.html&&"template"===a?e.content:e,s=e.getAttributeNames(),o={},l=-1;for(;++l<s.length;)o[s[l]]=e.getAttribute(s[l])||"";return r(a,o,xQ(i,t))}(e,t);case 3:return{type:"text",value:e.nodeValue||""};case 8:return{type:"comment",value:e.nodeValue||""};case 9:case 11:return function(e,t){return{type:"root",children:xQ(e,t)}}(e,t);case 10:return{type:"doctype"};default:return}}(e,t);return n&&t.afterTransform&&t.afterTransform(e,n),n}function xQ(e,t){let n=e.childNodes,r=[],a=-1;for(;++a<n.length;){let e=xZ(n[a],t);void 0!==e&&r.push(e)}return r}let xJ=new DOMParser,x0=function(e,t,n){let r=gj(n);if(!e||!e.type||!e.children)throw Error("Expected parent node");if("number"==typeof t){if(t<0||t===1/0)throw Error("Expected positive finite number as index")}else if((t=e.children.indexOf(t))<0)throw Error("Expected child node or index");for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]},x1=function(e){if(null==e)return x3;if("string"==typeof e){var t;return t=e,x2(function(e){return e.tagName===t})}if("object"==typeof e){var n=e;let t=[],r=-1;for(;++r<n.length;)t[r]=x1(n[r]);return x2(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}if("function"==typeof e)return x2(e);throw Error("Expected function, string, or array as `test`")};function x2(e){return function(t,n,r){var a;return!!(null!==(a=t)&&"object"==typeof a&&"type"in a&&"tagName"in a&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function x3(e){return!!(e&&"object"==typeof e&&"type"in e&&"element"===e.type&&"tagName"in e&&"string"==typeof e.tagName)}let x4=/\n/g,x5=/[\t ]+/g,x6=x1("br"),x9=x1(function(e){return"td"===e.tagName||"th"===e.tagName}),x8=x1("p"),x7=x1("tr"),ve=x1(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",function(e){return!!(e.properties||{}).hidden},function(e){return"dialog"===e.tagName&&!(e.properties||{}).open}]),vt=x1(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function vn(e,t){let n,r=String(e.value),a=[],i=[],s=0;for(;s<=r.length;){x4.lastIndex=s;let e=x4.exec(r),n=e&&"index"in e?e.index:r.length;a.push(function(e,t,n){let r,a=[],i=0;for(;i<e.length;){x5.lastIndex=i;let n=x5.exec(e);r=n?n.index:e.length,i||r||!n||t||a.push(""),i!==r&&a.push(e.slice(i,r)),i=n?r+n[0].length:r}return i===r||n||a.push(""),a.join(" ")}(r.slice(s,n).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),0!==s||t.breakBefore,n!==r.length||t.breakAfter)),s=n+1}let o=-1;for(;++o<a.length;)8203===a[o].charCodeAt(a[o].length-1)||o<a.length-1&&8203===a[o+1].charCodeAt(0)?(i.push(a[o]),n=void 0):a[o]?("number"==typeof n&&i.push(n),i.push(a[o]),n=0):(0===o||o===a.length-1)&&i.push(0);return i}function vr(e,t){if("element"===e.type){let n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}var va=e.i(716400);let vi={},vs=[];function vo(e){let t=e||vi;return function(e,n){gH(e,"element",function(e,r){var a,i,s;let o,l,c=Array.isArray(e.properties.className)?e.properties.className:vs,u=c.includes("language-math"),d=c.includes("math-display"),p=c.includes("math-inline"),m=d;if(!u&&!d&&!p)return;let f=r[r.length-1],h=e;if("code"===e.tagName&&u&&f&&"element"===f.type&&"pre"===f.tagName&&(h=f,f=r[r.length-2],m=!0),!f)return;let g=function(e,t){let n,r="children"in e?e.children:[],a=vt(e),i=vr(e,{whitespace:(t||{}).whitespace||"normal",breakBefore:!1,breakAfter:!1}),s=[];("text"===e.type||"comment"===e.type)&&s.push(...vn(e,{whitespace:i,breakBefore:!0,breakAfter:!0}));let o=-1;for(;++o<r.length;)s.push(...function e(t,n,r){return"element"===t.type?function(t,n,r){let a,i,s=vr(t,r),o=t.children||[],l=-1,c=[];if(ve(t))return c;for(x6(t)||x7(t)&&x0(n,t,x7)?i="\n":x8(t)?(a=2,i=2):vt(t)&&(a=1,i=1);++l<o.length;)c=c.concat(e(o[l],t,{whitespace:s,breakBefore:l?void 0:a,breakAfter:l<o.length-1?x6(o[l+1]):i}));return x9(t)&&x0(n,t,x9)&&c.push(" "),a&&c.unshift(a),i&&c.push(i),c}(t,n,r):"text"===t.type?"normal"===r.whitespace?vn(t,r):[String(t.value)]:[]}(r[o],e,{whitespace:i,breakBefore:o?void 0:a,breakAfter:o<r.length-1?x6(r[o+1]):a}));let l=[];for(o=-1;++o<s.length;){let e=s[o];"number"==typeof e?void 0!==n&&e>n&&(n=e):e&&(void 0!==n&&n>-1&&l.push("\n".repeat(n)||" "),n=-1,l.push(e))}return l.join("")}(h,{whitespace:"pre"});try{l=va.default.renderToString(g,{...t,displayMode:m,throwOnError:!0})}catch(i){let a=i.name.toLowerCase();n.message("Could not render math with KaTeX",{ancestors:[...r,e],cause:i,place:e.position,ruleId:a,source:"rehype-katex"});try{l=va.default.renderToString(g,{...t,displayMode:m,strict:"ignore",throwOnError:!1})}catch{l=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(t.errorColor||"#cc0000"),title:String(i)},children:[{type:"text",value:g}]}]}}"string"==typeof l&&(l=(a=l,i={fragment:!0},xZ(i?.fragment?(s=a,(o=document.createElement("template")).innerHTML=s,o.content):xJ.parseFromString(a,"text/html"),{})||{type:"root",children:[]}).children);let b=f.children.indexOf(h);return f.children.splice(b,1,...l),gz})}}let vl=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],vc={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...vl,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...vl],h2:[["className","sr-only"]],img:[...vl,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...vl,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...vl],table:[...vl],ul:[...vl,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},vu={}.hasOwnProperty;function vd(e,t){if(t&&"object"==typeof t)switch("string"==typeof t.type?t.type:""){case"comment":var n,r,a=e,i=t;if(a.schema.allowComments){let e="string"==typeof i.value?i.value:"",t=e.indexOf("-->"),n={type:"comment",value:t<0?e:e.slice(0,t)};return vh(n,i),n}return;case"doctype":var s=e,o=t;if(s.schema.allowDoctypes){let e={type:"doctype"};return vh(e,o),e}return;case"element":return function(e,t){let n="string"==typeof t.tagName?t.tagName:"";e.stack.push(n);let r=vp(e,t.children),a=function(e,t){let n,r=e.stack[e.stack.length-1],a=e.schema.attributes,i=e.schema.required,s=a&&vu.call(a,r)?a[r]:void 0,o=a&&vu.call(a,"*")?a["*"]:void 0,l=t&&"object"==typeof t?t:{},c={};for(n in l)if(vu.call(l,n)){let t=l[n],r=vm(e,vg(s,n),n,t);null==r&&(r=vm(e,vg(o,n),n,t)),null!=r&&(c[n]=r)}if(i&&vu.call(i,r)){let e=i[r];for(n in e)vu.call(e,n)&&!vu.call(c,n)&&(c[n]=e[n])}return c}(e,t.properties);e.stack.pop();let i=!1;if(n&&"*"!==n&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(i=!0,e.schema.ancestors&&vu.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(i=!1;++r<t.length;)e.stack.includes(t[r])&&(i=!0)}if(!i)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let s={type:"element",tagName:n,properties:a,children:r};return vh(s,t),s}(e,t);case"root":let l;return vh(l={type:"root",children:vp(e,(n=t).children)},n),l;case"text":let c;return vh(c={type:"text",value:"string"==typeof(r=t).value?r.value:""},r),c}}function vp(e,t){let n=[];if(Array.isArray(t)){let r=-1;for(;++r<t.length;){let a=vd(e,t[r]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function vm(e,t,n,r){return t?Array.isArray(r)?function(e,t,n,r){let a=-1,i=[];for(;++a<r.length;){let s=vf(e,t,n,r[a]);("number"==typeof s||"string"==typeof s)&&i.push(s)}return i}(e,t,n,r):vf(e,t,n,r):void 0}function vf(e,t,n,r){if(("boolean"==typeof r||"number"==typeof r||"string"==typeof r)&&function(e,t,n){let r=e.schema.protocols&&vu.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||0===r.length)return!0;let a=String(n),i=a.indexOf(":"),s=a.indexOf("?"),o=a.indexOf("#"),l=a.indexOf("/");if(i<0||l>-1&&i>l||s>-1&&i>s||o>-1&&i>o)return!0;let c=-1;for(;++c<r.length;){let e=r[c];if(i===e.length&&a.slice(0,e.length)===e)return!0}return!1}(e,n,r)){if("object"==typeof t&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let a=t[n];if(a&&"object"==typeof a&&"flags"in a){if(a.test(String(r))){e=!0;break}}else if(a===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function vh(e,t){let n=fZ(t);t.data&&(e.data=gD(t.data)),n&&(e.position=n)}function vg(e,t){let n,r=-1;if(e)for(;++r<e.length;){let a=e[r],i="string"==typeof a?a:a[0];if(i===t)return a;"data*"===i&&(n=a)}if(t.length>4&&"data"===t.slice(0,4).toLowerCase())return n}function vb(e){return function(t){let n,r;return n={type:"root",children:[]},(r=vd({schema:e?{...vc,...e}:vc,stack:[]},t))&&(Array.isArray(r)?1===r.length?n=r[0]:n.children=r:n=r),n}}function vy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function vE(e){return function(e){if(Array.isArray(e))return vy(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return vy(e,void 0);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?vy(e,void 0):void 0}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vx(e){return(vx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vv(e,t,n){var r;return(r=function(e,t){if("object"!=vx(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=vx(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==vx(r)?r:r+"")in e)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vT(){return(vT=Object.assign.bind()).apply(null,arguments)}function vS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function v_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vS(Object(n),!0).forEach(function(t){vv(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var vk={},vw=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function vA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function vN(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vA(Object(n),!0).forEach(function(t){vv(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var vI=/\n/g;function vC(e){var t,n,r,a,i=e.codeString,s=e.codeStyle,o=e.containerStyle,l=e.numberStyle,c=e.startingLineNumber;return eu.default.createElement("code",{style:Object.assign({},s,void 0===o?{float:"left",paddingRight:"10px"}:o)},(n=(t={lines:i.replace(/\n$/,"").split("\n"),style:void 0===l?{}:l,startingLineNumber:c}).lines,r=t.startingLineNumber,a=t.style,n.map(function(e,t){var n=t+r;return eu.default.createElement("span",{key:"line-".concat(t),className:"react-syntax-highlighter-line-number",style:"function"==typeof a?a(n):a},"".concat(n,"\n"))})))}function vR(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function vO(e,t,n){var r={display:"inline-block",minWidth:"".concat(n.toString().length,".25em"),paddingRight:"1em",textAlign:"right",userSelect:"none"},a="function"==typeof e?e(t):e;return vN(vN({},r),a)}function vD(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,a=e.largestLineNumber,i=e.showInlineLineNumbers,s=e.lineProps,o=void 0===s?{}:s,l=e.className,c=void 0===l?[]:l,u=e.showLineNumbers,d=e.wrapLongLines,p=e.wrapLines,m=void 0!==p&&p?vN({},"function"==typeof o?o(n):o):{};if(m.className=m.className?[].concat(vE(m.className.trim().split(/\s+/)),vE(c)):c,n&&i){var f=vO(r,n,a);t.unshift(vR(n,f))}return d&u&&(m.style=vN({display:"flex"},m.style)),{type:"element",tagName:"span",properties:m,children:t}}function vL(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map(function(e,t){return function e(t){var n=t.node,r=t.stylesheet,a=t.style,i=t.useInlineStyles,s=t.key,o=n.properties,l=n.type,c=n.tagName,u=n.value;if("text"===l)return u;if(c){var d,p,m=(d=0,function(t){return d+=1,t.map(function(t,n){return e({node:t,stylesheet:r,useInlineStyles:i,key:"code-segment-".concat(d,"-").concat(n)})})});if(i){var f=Object.keys(r).reduce(function(e,t){return t.split(".").forEach(function(t){e.includes(t)||e.push(t)}),e},[]),h=o.className&&o.className.includes("token")?["token"]:[],g=o.className&&h.concat(o.className.filter(function(e){return!f.includes(e)}));p=v_(v_({},o),{},{className:g.join(" ")||void 0,style:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return(function(e){if(0===e.length||1===e.length)return e;var t,n=e.join(".");return vk[n]||(vk[n]=0===(t=e.length)||1===t?e:2===t?[e[0],e[1],"".concat(e[0],".").concat(e[1]),"".concat(e[1],".").concat(e[0])]:3===t?[e[0],e[1],e[2],"".concat(e[0],".").concat(e[1]),"".concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[0]),"".concat(e[1],".").concat(e[2]),"".concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[1],".").concat(e[0])]:t>=4?[e[0],e[1],e[2],e[3],"".concat(e[0],".").concat(e[1]),"".concat(e[0],".").concat(e[2]),"".concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[0]),"".concat(e[1],".").concat(e[2]),"".concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[1]),"".concat(e[2],".").concat(e[3]),"".concat(e[3],".").concat(e[0]),"".concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[0]),"".concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[1],".").concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[2],".").concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[3],".").concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[2],".").concat(e[1],".").concat(e[0])]:void 0),vk[n]})(e.filter(function(e){return"token"!==e})).reduce(function(e,t){return v_(v_({},e),n[t])},t)}(o.className,Object.assign({},o.style,void 0===a?{}:a),r)})}else p=v_(v_({},o),{},{className:o.className.join(" ")});var b=m(n.children);return eu.default.createElement(c,vT({key:s},p),b)}}({node:e,stylesheet:n,useInlineStyles:r,key:"code-segment-".concat(t)})})}function vM(e){return e&&void 0!==e.highlightAuto}function vP(e){e.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.value.replace(/&/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(t,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:e.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var a={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};a["language-"+n]={pattern:/[\s\S]+/,inside:e.languages[n]};var i={};i[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:a},e.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(t,n){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:e.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}function vj(e){var t,n;t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,(n=e.languages.markup)&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}function vF(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}function vU(e){var t,n,r,a,i;t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},a=RegExp((r="(?:[^\\\\-]|"+(n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/).source+")")+"-"+r),i={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"},e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:a,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":t,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":i}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":i}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}}function vB(e){e.register(vF),e.languages.javascript=e.languages.extend("clike",{"class-name":[e.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source)+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}function vz(e){e.languages.abap={comment:/^\*.*/m,string:/(`|')(?:\\.|(?!\1)[^\\\r\n])*\1/,"string-template":{pattern:/([|}])(?:\\.|[^\\|{\r\n])*(?=[|{])/,lookbehind:!0,alias:"string"},"eol-comment":{pattern:/(^|\s)".*/m,lookbehind:!0,alias:"comment"},keyword:{pattern:/(\s|\.|^)(?:\*-INPUT|\?TO|ABAP-SOURCE|ABBREVIATED|ABS|ABSTRACT|ACCEPT|ACCEPTING|ACCESSPOLICY|ACCORDING|ACOS|ACTIVATION|ACTUAL|ADD|ADD-CORRESPONDING|ADJACENT|AFTER|ALIAS|ALIASES|ALIGN|ALL|ALLOCATE|ALPHA|ANALYSIS|ANALYZER|AND|ANY|APPEND|APPENDAGE|APPENDING|APPLICATION|ARCHIVE|AREA|ARITHMETIC|AS|ASCENDING|ASIN|ASPECT|ASSERT|ASSIGN|ASSIGNED|ASSIGNING|ASSOCIATION|ASYNCHRONOUS|AT|ATAN|ATTRIBUTES|AUTHORITY|AUTHORITY-CHECK|AVG|BACK|BACKGROUND|BACKUP|BACKWARD|BADI|BASE|BEFORE|BEGIN|BETWEEN|BIG|BINARY|BINDING|BIT|BIT-AND|BIT-NOT|BIT-OR|BIT-XOR|BLACK|BLANK|BLANKS|BLOB|BLOCK|BLOCKS|BLUE|BOUND|BOUNDARIES|BOUNDS|BOXED|BREAK-POINT|BT|BUFFER|BY|BYPASSING|BYTE|BYTE-CA|BYTE-CN|BYTE-CO|BYTE-CS|BYTE-NA|BYTE-NS|BYTE-ORDER|C|CA|CALL|CALLING|CASE|CAST|CASTING|CATCH|CEIL|CENTER|CENTERED|CHAIN|CHAIN-INPUT|CHAIN-REQUEST|CHANGE|CHANGING|CHANNELS|CHAR-TO-HEX|CHARACTER|CHARLEN|CHECK|CHECKBOX|CIRCULAR|CI_|CLASS|CLASS-CODING|CLASS-DATA|CLASS-EVENTS|CLASS-METHODS|CLASS-POOL|CLEANUP|CLEAR|CLIENT|CLOB|CLOCK|CLOSE|CN|CNT|CO|COALESCE|CODE|CODING|COLLECT|COLOR|COLUMN|COLUMNS|COL_BACKGROUND|COL_GROUP|COL_HEADING|COL_KEY|COL_NEGATIVE|COL_NORMAL|COL_POSITIVE|COL_TOTAL|COMMENT|COMMENTS|COMMIT|COMMON|COMMUNICATION|COMPARING|COMPONENT|COMPONENTS|COMPRESSION|COMPUTE|CONCAT|CONCATENATE|COND|CONDENSE|CONDITION|CONNECT|CONNECTION|CONSTANTS|CONTEXT|CONTEXTS|CONTINUE|CONTROL|CONTROLS|CONV|CONVERSION|CONVERT|COPIES|COPY|CORRESPONDING|COS|COSH|COUNT|COUNTRY|COVER|CP|CPI|CREATE|CREATING|CRITICAL|CS|CURRENCY|CURRENCY_CONVERSION|CURRENT|CURSOR|CURSOR-SELECTION|CUSTOMER|CUSTOMER-FUNCTION|DANGEROUS|DATA|DATABASE|DATAINFO|DATASET|DATE|DAYLIGHT|DBMAXLEN|DD\/MM\/YY|DD\/MM\/YYYY|DDMMYY|DEALLOCATE|DECIMALS|DECIMAL_SHIFT|DECLARATIONS|DEEP|DEFAULT|DEFERRED|DEFINE|DEFINING|DEFINITION|DELETE|DELETING|DEMAND|DEPARTMENT|DESCENDING|DESCRIBE|DESTINATION|DETAIL|DIALOG|DIRECTORY|DISCONNECT|DISPLAY|DISPLAY-MODE|DISTANCE|DISTINCT|DIV|DIVIDE|DIVIDE-CORRESPONDING|DIVISION|DO|DUMMY|DUPLICATE|DUPLICATES|DURATION|DURING|DYNAMIC|DYNPRO|E|EACH|EDIT|EDITOR-CALL|ELSE|ELSEIF|EMPTY|ENABLED|ENABLING|ENCODING|END|END-ENHANCEMENT-SECTION|END-LINES|END-OF-DEFINITION|END-OF-FILE|END-OF-PAGE|END-OF-SELECTION|ENDAT|ENDCASE|ENDCATCH|ENDCHAIN|ENDCLASS|ENDDO|ENDENHANCEMENT|ENDEXEC|ENDFOR|ENDFORM|ENDFUNCTION|ENDIAN|ENDIF|ENDING|ENDINTERFACE|ENDLOOP|ENDMETHOD|ENDMODULE|ENDON|ENDPROVIDE|ENDSELECT|ENDTRY|ENDWHILE|ENGINEERING|ENHANCEMENT|ENHANCEMENT-POINT|ENHANCEMENT-SECTION|ENHANCEMENTS|ENTRIES|ENTRY|ENVIRONMENT|EQ|EQUAL|EQUIV|ERRORMESSAGE|ERRORS|ESCAPE|ESCAPING|EVENT|EVENTS|EXACT|EXCEPT|EXCEPTION|EXCEPTION-TABLE|EXCEPTIONS|EXCLUDE|EXCLUDING|EXEC|EXECUTE|EXISTS|EXIT|EXIT-COMMAND|EXP|EXPAND|EXPANDING|EXPIRATION|EXPLICIT|EXPONENT|EXPORT|EXPORTING|EXTEND|EXTENDED|EXTENSION|EXTRACT|FAIL|FETCH|FIELD|FIELD-GROUPS|FIELD-SYMBOL|FIELD-SYMBOLS|FIELDS|FILE|FILTER|FILTER-TABLE|FILTERS|FINAL|FIND|FIRST|FIRST-LINE|FIXED-POINT|FKEQ|FKGE|FLOOR|FLUSH|FONT|FOR|FORM|FORMAT|FORWARD|FOUND|FRAC|FRAME|FRAMES|FREE|FRIENDS|FROM|FUNCTION|FUNCTION-POOL|FUNCTIONALITY|FURTHER|GAPS|GE|GENERATE|GET|GIVING|GKEQ|GKGE|GLOBAL|GRANT|GREATER|GREEN|GROUP|GROUPS|GT|HANDLE|HANDLER|HARMLESS|HASHED|HAVING|HDB|HEAD-LINES|HEADER|HEADERS|HEADING|HELP-ID|HELP-REQUEST|HIDE|HIGH|HINT|HOLD|HOTSPOT|I|ICON|ID|IDENTIFICATION|IDENTIFIER|IDS|IF|IGNORE|IGNORING|IMMEDIATELY|IMPLEMENTATION|IMPLEMENTATIONS|IMPLEMENTED|IMPLICIT|IMPORT|IMPORTING|IN|INACTIVE|INCL|INCLUDE|INCLUDES|INCLUDING|INCREMENT|INDEX|INDEX-LINE|INFOTYPES|INHERITING|INIT|INITIAL|INITIALIZATION|INNER|INOUT|INPUT|INSERT|INSTANCES|INTENSIFIED|INTERFACE|INTERFACE-POOL|INTERFACES|INTERNAL|INTERVALS|INTO|INVERSE|INVERTED-DATE|IS|ISO|ITERATOR|ITNO|JOB|JOIN|KEEP|KEEPING|KERNEL|KEY|KEYS|KEYWORDS|KIND|LANGUAGE|LAST|LATE|LAYOUT|LE|LEADING|LEAVE|LEFT|LEFT-JUSTIFIED|LEFTPLUS|LEFTSPACE|LEGACY|LENGTH|LESS|LET|LEVEL|LEVELS|LIKE|LINE|LINE-COUNT|LINE-SELECTION|LINE-SIZE|LINEFEED|LINES|LIST|LIST-PROCESSING|LISTBOX|LITTLE|LLANG|LOAD|LOAD-OF-PROGRAM|LOB|LOCAL|LOCALE|LOCATOR|LOG|LOG-POINT|LOG10|LOGFILE|LOGICAL|LONG|LOOP|LOW|LOWER|LPAD|LPI|LT|M|MAIL|MAIN|MAJOR-ID|MAPPING|MARGIN|MARK|MASK|MATCH|MATCHCODE|MAX|MAXIMUM|MEDIUM|MEMBERS|MEMORY|MESH|MESSAGE|MESSAGE-ID|MESSAGES|MESSAGING|METHOD|METHODS|MIN|MINIMUM|MINOR-ID|MM\/DD\/YY|MM\/DD\/YYYY|MMDDYY|MOD|MODE|MODIF|MODIFIER|MODIFY|MODULE|MOVE|MOVE-CORRESPONDING|MULTIPLY|MULTIPLY-CORRESPONDING|NA|NAME|NAMETAB|NATIVE|NB|NE|NESTED|NESTING|NEW|NEW-LINE|NEW-PAGE|NEW-SECTION|NEXT|NO|NO-DISPLAY|NO-EXTENSION|NO-GAP|NO-GAPS|NO-GROUPING|NO-HEADING|NO-SCROLLING|NO-SIGN|NO-TITLE|NO-TOPOFPAGE|NO-ZERO|NODE|NODES|NON-UNICODE|NON-UNIQUE|NOT|NP|NS|NULL|NUMBER|NUMOFCHAR|O|OBJECT|OBJECTS|OBLIGATORY|OCCURRENCE|OCCURRENCES|OCCURS|OF|OFF|OFFSET|OLE|ON|ONLY|OPEN|OPTION|OPTIONAL|OPTIONS|OR|ORDER|OTHER|OTHERS|OUT|OUTER|OUTPUT|OUTPUT-LENGTH|OVERFLOW|OVERLAY|PACK|PACKAGE|PAD|PADDING|PAGE|PAGES|PARAMETER|PARAMETER-TABLE|PARAMETERS|PART|PARTIALLY|PATTERN|PERCENTAGE|PERFORM|PERFORMING|PERSON|PF|PF-STATUS|PINK|PLACES|POOL|POSITION|POS_HIGH|POS_LOW|PRAGMAS|PRECOMPILED|PREFERRED|PRESERVING|PRIMARY|PRINT|PRINT-CONTROL|PRIORITY|PRIVATE|PROCEDURE|PROCESS|PROGRAM|PROPERTY|PROTECTED|PROVIDE|PUBLIC|PUSHBUTTON|PUT|QUEUE-ONLY|QUICKINFO|RADIOBUTTON|RAISE|RAISING|RANGE|RANGES|RAW|READ|READ-ONLY|READER|RECEIVE|RECEIVED|RECEIVER|RECEIVING|RED|REDEFINITION|REDUCE|REDUCED|REF|REFERENCE|REFRESH|REGEX|REJECT|REMOTE|RENAMING|REPLACE|REPLACEMENT|REPLACING|REPORT|REQUEST|REQUESTED|RESERVE|RESET|RESOLUTION|RESPECTING|RESPONSIBLE|RESULT|RESULTS|RESUMABLE|RESUME|RETRY|RETURN|RETURNCODE|RETURNING|RIGHT|RIGHT-JUSTIFIED|RIGHTPLUS|RIGHTSPACE|RISK|RMC_COMMUNICATION_FAILURE|RMC_INVALID_STATUS|RMC_SYSTEM_FAILURE|ROLE|ROLLBACK|ROUND|ROWS|RTTI|RUN|SAP|SAP-SPOOL|SAVING|SCALE_PRESERVING|SCALE_PRESERVING_SCIENTIFIC|SCAN|SCIENTIFIC|SCIENTIFIC_WITH_LEADING_ZERO|SCREEN|SCROLL|SCROLL-BOUNDARY|SCROLLING|SEARCH|SECONDARY|SECONDS|SECTION|SELECT|SELECT-OPTIONS|SELECTION|SELECTION-SCREEN|SELECTION-SET|SELECTION-SETS|SELECTION-TABLE|SELECTIONS|SELECTOR|SEND|SEPARATE|SEPARATED|SET|SHARED|SHIFT|SHORT|SHORTDUMP-ID|SIGN|SIGN_AS_POSTFIX|SIMPLE|SIN|SINGLE|SINH|SIZE|SKIP|SKIPPING|SMART|SOME|SORT|SORTABLE|SORTED|SOURCE|SPACE|SPECIFIED|SPLIT|SPOOL|SPOTS|SQL|SQLSCRIPT|SQRT|STABLE|STAMP|STANDARD|START-OF-SELECTION|STARTING|STATE|STATEMENT|STATEMENTS|STATIC|STATICS|STATUSINFO|STEP-LOOP|STOP|STRLEN|STRUCTURE|STRUCTURES|STYLE|SUBKEY|SUBMATCHES|SUBMIT|SUBROUTINE|SUBSCREEN|SUBSTRING|SUBTRACT|SUBTRACT-CORRESPONDING|SUFFIX|SUM|SUMMARY|SUMMING|SUPPLIED|SUPPLY|SUPPRESS|SWITCH|SWITCHSTATES|SYMBOL|SYNCPOINTS|SYNTAX|SYNTAX-CHECK|SYNTAX-TRACE|SYSTEM-CALL|SYSTEM-EXCEPTIONS|SYSTEM-EXIT|TAB|TABBED|TABLE|TABLES|TABLEVIEW|TABSTRIP|TAN|TANH|TARGET|TASK|TASKS|TEST|TESTING|TEXT|TEXTPOOL|THEN|THROW|TIME|TIMES|TIMESTAMP|TIMEZONE|TITLE|TITLE-LINES|TITLEBAR|TO|TOKENIZATION|TOKENS|TOP-LINES|TOP-OF-PAGE|TRACE-FILE|TRACE-TABLE|TRAILING|TRANSACTION|TRANSFER|TRANSFORMATION|TRANSLATE|TRANSPORTING|TRMAC|TRUNC|TRUNCATE|TRUNCATION|TRY|TYPE|TYPE-POOL|TYPE-POOLS|TYPES|ULINE|UNASSIGN|UNDER|UNICODE|UNION|UNIQUE|UNIT|UNIT_CONVERSION|UNIX|UNPACK|UNTIL|UNWIND|UP|UPDATE|UPPER|USER|USER-COMMAND|USING|UTF-8|VALID|VALUE|VALUE-REQUEST|VALUES|VARY|VARYING|VERIFICATION-MESSAGE|VERSION|VIA|VIEW|VISIBLE|WAIT|WARNING|WHEN|WHENEVER|WHERE|WHILE|WIDTH|WINDOW|WINDOWS|WITH|WITH-HEADING|WITH-TITLE|WITHOUT|WORD|WORK|WRITE|WRITER|X|XML|XOR|XSD|XSTRLEN|YELLOW|YES|YYMMDD|Z|ZERO|ZONE)(?![\w-])/i,lookbehind:!0},number:/\b\d+\b/,operator:{pattern:/(\s)(?:\*\*?|<[=>]?|>=?|\?=|[-+\/=])(?=\s)/,lookbehind:!0},"string-operator":{pattern:/(\s)&&?(?=\s)/,lookbehind:!0,alias:"keyword"},"token-operator":[{pattern:/(\w)(?:->?|=>|[~|{}])(?=\w)/,lookbehind:!0,alias:"punctuation"},{pattern:/[|{}]/,alias:"punctuation"}],punctuation:/[,.:()]/}}function vH(e){e.languages.abnf={comment:/;.*/,string:{pattern:/(?:%[is])?"[^"\n\r]*"/,greedy:!0,inside:{punctuation:/^%[is]/}},range:{pattern:/%(?:b[01]+-[01]+|d\d+-\d+|x[A-F\d]+-[A-F\d]+)/i,alias:"number"},terminal:{pattern:/%(?:b[01]+(?:\.[01]+)*|d\d+(?:\.\d+)*|x[A-F\d]+(?:\.[A-F\d]+)*)/i,alias:"number"},repetition:{pattern:/(^|[^\w-])(?:\d*\*\d*|\d+)/,lookbehind:!0,alias:"operator"},definition:{pattern:/(^[ \t]*)(?:[a-z][\w-]*|<[^<>\r\n]*>)(?=\s*=)/m,lookbehind:!0,alias:"keyword",inside:{punctuation:/<|>/}},"core-rule":{pattern:RegExp("(?:(^|[^<\\w-])(?:ALPHA|BIT|CHAR|CR|CRLF|CTL|DIGIT|DQUOTE|HEXDIG|HTAB|LF|LWSP|OCTET|SP|VCHAR|WSP)|<(?:ALPHA|BIT|CHAR|CR|CRLF|CTL|DIGIT|DQUOTE|HEXDIG|HTAB|LF|LWSP|OCTET|SP|VCHAR|WSP)>)(?![\\w-])","i"),lookbehind:!0,alias:["rule","constant"],inside:{punctuation:/<|>/}},rule:{pattern:/(^|[^<\w-])[a-z][\w-]*|<[^<>\r\n]*>/i,lookbehind:!0,inside:{punctuation:/<|>/}},operator:/=\/?|\//,punctuation:/[()\[\]]/}}function v$(e){e.register(vB),e.languages.actionscript=e.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),e.languages.actionscript["class-name"].alias="function",delete e.languages.actionscript.parameter,delete e.languages.actionscript["literal-property"],e.languages.markup&&e.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:e.languages.markup}})}function vG(e){e.languages.ada={comment:/--.*/,string:/"(?:""|[^"\r\f\n])*"/,number:[{pattern:/\b\d(?:_?\d)*#[\dA-F](?:_?[\dA-F])*(?:\.[\dA-F](?:_?[\dA-F])*)?#(?:E[+-]?\d(?:_?\d)*)?/i},{pattern:/\b\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:E[+-]?\d(?:_?\d)*)?\b/i}],attribute:{pattern:/\b'\w+/,alias:"attr-name"},keyword:/\b(?:abort|abs|abstract|accept|access|aliased|all|and|array|at|begin|body|case|constant|declare|delay|delta|digits|do|else|elsif|end|entry|exception|exit|for|function|generic|goto|if|in|interface|is|limited|loop|mod|new|not|null|of|or|others|out|overriding|package|pragma|private|procedure|protected|raise|range|record|rem|renames|requeue|return|reverse|select|separate|some|subtype|synchronized|tagged|task|terminate|then|type|until|use|when|while|with|xor)\b/i,boolean:/\b(?:false|true)\b/i,operator:/<[=>]?|>=?|=>?|:=|\/=?|\*\*?|[&+-]/,punctuation:/\.\.?|[,;():]/,char:/'.'/,variable:/\b[a-z](?:\w)*\b/i}}function vq(e){e.languages.agda={comment:/\{-[\s\S]*?(?:-\}|$)|--.*/,string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},punctuation:/[(){}⦃⦄.;@]/,"class-name":{pattern:/((?:data|record) +)\S+/,lookbehind:!0},function:{pattern:/(^[ \t]*)(?!\s)[^:\r\n]+(?=:)/m,lookbehind:!0},operator:{pattern:/(^\s*|\s)(?:[=|:∀→λ\\?_]|->)(?=\s)/,lookbehind:!0},keyword:/\b(?:Set|abstract|constructor|data|eta-equality|field|forall|hiding|import|in|inductive|infix|infixl|infixr|instance|let|macro|module|mutual|no-eta-equality|open|overlap|pattern|postulate|primitive|private|public|quote|quoteContext|quoteGoal|quoteTerm|record|renaming|rewrite|syntax|tactic|unquote|unquoteDecl|unquoteDef|using|variable|where|with)\b/}}function vW(e){e.languages.al={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/'(?:''|[^'\r\n])*'(?!')|"(?:""|[^"\r\n])*"(?!")/,greedy:!0},function:{pattern:/(\b(?:event|procedure|trigger)\s+|(?:^|[^.])\.\s*)[a-z_]\w*(?=\s*\()/i,lookbehind:!0},keyword:[/\b(?:array|asserterror|begin|break|case|do|downto|else|end|event|exit|for|foreach|function|if|implements|in|indataset|interface|internal|local|of|procedure|program|protected|repeat|runonclient|securityfiltering|suppressdispose|temporary|then|to|trigger|until|var|while|with|withevents)\b/i,/\b(?:action|actions|addafter|addbefore|addfirst|addlast|area|assembly|chartpart|codeunit|column|controladdin|cuegroup|customizes|dataitem|dataset|dotnet|elements|enum|enumextension|extends|field|fieldattribute|fieldelement|fieldgroup|fieldgroups|fields|filter|fixed|grid|group|key|keys|label|labels|layout|modify|moveafter|movebefore|movefirst|movelast|page|pagecustomization|pageextension|part|profile|query|repeater|report|requestpage|schema|separator|systempart|table|tableelement|tableextension|textattribute|textelement|type|usercontrol|value|xmlport)\b/i],number:/\b(?:0x[\da-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)(?:F|LL?|U(?:LL?)?)?\b/i,boolean:/\b(?:false|true)\b/i,variable:/\b(?:Curr(?:FieldNo|Page|Report)|x?Rec|RequestOptionsPage)\b/,"class-name":/\b(?:automation|biginteger|bigtext|blob|boolean|byte|char|clienttype|code|completiontriggererrorlevel|connectiontype|database|dataclassification|datascope|date|dateformula|datetime|decimal|defaultlayout|dialog|dictionary|dotnetassembly|dotnettypedeclaration|duration|errorinfo|errortype|executioncontext|executionmode|fieldclass|fieldref|fieldtype|file|filterpagebuilder|guid|httpclient|httpcontent|httpheaders|httprequestmessage|httpresponsemessage|instream|integer|joker|jsonarray|jsonobject|jsontoken|jsonvalue|keyref|list|moduledependencyinfo|moduleinfo|none|notification|notificationscope|objecttype|option|outstream|pageresult|record|recordid|recordref|reportformat|securityfilter|sessionsettings|tableconnectiontype|tablefilter|testaction|testfield|testfilterfield|testpage|testpermissions|testrequestpage|text|textbuilder|textconst|textencoding|time|transactionmodel|transactiontype|variant|verbosity|version|view|views|webserviceactioncontext|webserviceactionresultcode|xmlattribute|xmlattributecollection|xmlcdata|xmlcomment|xmldeclaration|xmldocument|xmldocumenttype|xmlelement|xmlnamespacemanager|xmlnametable|xmlnode|xmlnodelist|xmlprocessinginstruction|xmlreadoptions|xmltext|xmlwriteoptions)\b/i,operator:/\.\.|:[=:]|[-+*/]=?|<>|[<>]=?|=|\b(?:and|div|mod|not|or|xor)\b/i,punctuation:/[()\[\]{}:.;,]/}}function vV(e){e.languages.antlr4={comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,string:{pattern:/'(?:\\.|[^\\'\r\n])*'/,greedy:!0},"character-class":{pattern:/\[(?:\\.|[^\\\]\r\n])*\]/,greedy:!0,alias:"regex",inside:{range:{pattern:/([^[]|(?:^|[^\\])(?:\\\\)*\\\[)-(?!\])/,lookbehind:!0,alias:"punctuation"},escape:/\\(?:u(?:[a-fA-F\d]{4}|\{[a-fA-F\d]+\})|[pP]\{[=\w-]+\}|[^\r\nupP])/,punctuation:/[\[\]]/}},action:{pattern:/\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*\}/,greedy:!0,inside:{content:{pattern:/(\{)[\s\S]+(?=\})/,lookbehind:!0},punctuation:/[{}]/}},command:{pattern:/(->\s*(?!\s))(?:\s*(?:,\s*)?\b[a-z]\w*(?:\s*\([^()\r\n]*\))?)+(?=\s*;)/i,lookbehind:!0,inside:{function:/\b\w+(?=\s*(?:[,(]|$))/,punctuation:/[,()]/}},annotation:{pattern:/@\w+(?:::\w+)*/,alias:"keyword"},label:{pattern:/#[ \t]*\w+/,alias:"punctuation"},keyword:/\b(?:catch|channels|finally|fragment|grammar|import|lexer|locals|mode|options|parser|returns|throws|tokens)\b/,definition:[{pattern:/\b[a-z]\w*(?=\s*:)/,alias:["rule","class-name"]},{pattern:/\b[A-Z]\w*(?=\s*:)/,alias:["token","constant"]}],constant:/\b[A-Z][A-Z_]*\b/,operator:/\.\.|->|[|~]|[*+?]\??/,punctuation:/[;:()=]/},e.languages.g4=e.languages.antlr4}function vY(e){e.languages.apacheconf={comment:/#.*/,"directive-inline":{pattern:/(^[\t ]*)\b(?:AcceptFilter|AcceptPathInfo|AccessFileName|Action|Add(?:Alt|AltByEncoding|AltByType|Charset|DefaultCharset|Description|Encoding|Handler|Icon|IconByEncoding|IconByType|InputFilter|Language|ModuleInfo|OutputFilter|OutputFilterByType|Type)|Alias|AliasMatch|Allow(?:CONNECT|EncodedSlashes|Methods|Override|OverrideList)?|Anonymous(?:_LogEmail|_MustGiveEmail|_NoUserID|_VerifyEmail)?|AsyncRequestWorkerFactor|Auth(?:BasicAuthoritative|BasicFake|BasicProvider|BasicUseDigestAlgorithm|DBDUserPWQuery|DBDUserRealmQuery|DBMGroupFile|DBMType|DBMUserFile|Digest(?:Algorithm|Domain|NonceLifetime|Provider|Qop|ShmemSize)|Form(?:Authoritative|Body|DisableNoStore|FakeBasicAuth|Location|LoginRequiredLocation|LoginSuccessLocation|LogoutLocation|Method|Mimetype|Password|Provider|SitePassphrase|Size|Username)|GroupFile|LDAP(?:AuthorizePrefix|BindAuthoritative|BindDN|BindPassword|CharsetConfig|CompareAsUser|CompareDNOnServer|DereferenceAliases|GroupAttribute|GroupAttributeIsDN|InitialBindAsUser|InitialBindPattern|MaxSubGroupDepth|RemoteUserAttribute|RemoteUserIsDN|SearchAsUser|SubGroupAttribute|SubGroupClass|Url)|Merging|Name|nCache(?:Context|Enable|ProvideFor|SOCache|Timeout)|nzFcgiCheckAuthnProvider|nzFcgiDefineProvider|Type|UserFile|zDBDLoginToReferer|zDBDQuery|zDBDRedirectQuery|zDBMType|zSendForbiddenOnFailure)|BalancerGrowth|BalancerInherit|BalancerMember|BalancerPersist|BrowserMatch|BrowserMatchNoCase|BufferedLogs|BufferSize|Cache(?:DefaultExpire|DetailHeader|DirLength|DirLevels|Disable|Enable|File|Header|IgnoreCacheControl|IgnoreHeaders|IgnoreNoLastMod|IgnoreQueryString|IgnoreURLSessionIdentifiers|KeyBaseURL|LastModifiedFactor|Lock|LockMaxAge|LockPath|MaxExpire|MaxFileSize|MinExpire|MinFileSize|NegotiatedDocs|QuickHandler|ReadSize|ReadTime|Root|Socache(?:MaxSize|MaxTime|MinTime|ReadSize|ReadTime)?|StaleOnError|StoreExpired|StoreNoStore|StorePrivate)|CGIDScriptTimeout|CGIMapExtension|CharsetDefault|CharsetOptions|CharsetSourceEnc|CheckCaseOnly|CheckSpelling|ChrootDir|ContentDigest|CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking|CoreDumpDirectory|CustomLog|Dav|DavDepthInfinity|DavGenericLockDB|DavLockDB|DavMinTimeout|DBDExptime|DBDInitSQL|DBDKeep|DBDMax|DBDMin|DBDParams|DBDPersist|DBDPrepareSQL|DBDriver|DefaultIcon|DefaultLanguage|DefaultRuntimeDir|DefaultType|Define|Deflate(?:BufferSize|CompressionLevel|FilterNote|InflateLimitRequestBody|InflateRatio(?:Burst|Limit)|MemLevel|WindowSize)|Deny|DirectoryCheckHandler|DirectoryIndex|DirectoryIndexRedirect|DirectorySlash|DocumentRoot|DTracePrivileges|DumpIOInput|DumpIOOutput|EnableExceptionHook|EnableMMAP|EnableSendfile|Error|ErrorDocument|ErrorLog|ErrorLogFormat|Example|ExpiresActive|ExpiresByType|ExpiresDefault|ExtendedStatus|ExtFilterDefine|ExtFilterOptions|FallbackResource|FileETag|FilterChain|FilterDeclare|FilterProtocol|FilterProvider|FilterTrace|ForceLanguagePriority|ForceType|ForensicLog|GprofDir|GracefulShutdownTimeout|Group|Header|HeaderName|Heartbeat(?:Address|Listen|MaxServers|Storage)|HostnameLookups|IdentityCheck|IdentityCheckTimeout|ImapBase|ImapDefault|ImapMenu|Include|IncludeOptional|Index(?:HeadInsert|Ignore|IgnoreReset|Options|OrderDefault|StyleSheet)|InputSed|ISAPI(?:AppendLogToErrors|AppendLogToQuery|CacheFile|FakeAsync|LogNotSupported|ReadAheadBuffer)|KeepAlive|KeepAliveTimeout|KeptBodySize|LanguagePriority|LDAP(?:CacheEntries|CacheTTL|ConnectionPoolTTL|ConnectionTimeout|LibraryDebug|OpCacheEntries|OpCacheTTL|ReferralHopLimit|Referrals|Retries|RetryDelay|SharedCacheFile|SharedCacheSize|Timeout|TrustedClientCert|TrustedGlobalCert|TrustedMode|VerifyServerCert)|Limit(?:InternalRecursion|Request(?:Body|Fields|FieldSize|Line)|XMLRequestBody)|Listen|ListenBackLog|LoadFile|LoadModule|LogFormat|LogLevel|LogMessage|LuaAuthzProvider|LuaCodeCache|Lua(?:Hook(?:AccessChecker|AuthChecker|CheckUserID|Fixups|InsertFilter|Log|MapToStorage|TranslateName|TypeChecker)|Inherit|InputFilter|MapHandler|OutputFilter|PackageCPath|PackagePath|QuickHandler|Root|Scope)|Max(?:ConnectionsPerChild|KeepAliveRequests|MemFree|RangeOverlaps|RangeReversals|Ranges|RequestWorkers|SpareServers|SpareThreads|Threads)|MergeTrailers|MetaDir|MetaFiles|MetaSuffix|MimeMagicFile|MinSpareServers|MinSpareThreads|MMapFile|ModemStandard|ModMimeUsePathInfo|MultiviewsMatch|Mutex|NameVirtualHost|NoProxy|NWSSLTrustedCerts|NWSSLUpgradeable|Options|Order|OutputSed|PassEnv|PidFile|PrivilegesMode|Protocol|ProtocolEcho|Proxy(?:AddHeaders|BadHeader|Block|Domain|ErrorOverride|ExpressDBMFile|ExpressDBMType|ExpressEnable|FtpDirCharset|FtpEscapeWildcards|FtpListOnWildcard|HTML(?:BufSize|CharsetOut|DocType|Enable|Events|Extended|Fixups|Interp|Links|Meta|StripComments|URLMap)|IOBufferSize|MaxForwards|Pass(?:Inherit|InterpolateEnv|Match|Reverse|ReverseCookieDomain|ReverseCookiePath)?|PreserveHost|ReceiveBufferSize|Remote|RemoteMatch|Requests|SCGIInternalRedirect|SCGISendfile|Set|SourceAddress|Status|Timeout|Via)|ReadmeName|ReceiveBufferSize|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ReflectorHeader|RemoteIP(?:Header|InternalProxy|InternalProxyList|ProxiesHeader|TrustedProxy|TrustedProxyList)|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|RequestHeader|RequestReadTimeout|Require|Rewrite(?:Base|Cond|Engine|Map|Options|Rule)|RLimitCPU|RLimitMEM|RLimitNPROC|Satisfy|ScoreBoardFile|Script(?:Alias|AliasMatch|InterpreterSource|Log|LogBuffer|LogLength|Sock)?|SecureListen|SeeRequestTail|SendBufferSize|Server(?:Admin|Alias|Limit|Name|Path|Root|Signature|Tokens)|Session(?:Cookie(?:Name|Name2|Remove)|Crypto(?:Cipher|Driver|Passphrase|PassphraseFile)|DBD(?:CookieName|CookieName2|CookieRemove|DeleteLabel|InsertLabel|PerUser|SelectLabel|UpdateLabel)|Env|Exclude|Header|Include|MaxAge)?|SetEnv|SetEnvIf|SetEnvIfExpr|SetEnvIfNoCase|SetHandler|SetInputFilter|SetOutputFilter|SSIEndTag|SSIErrorMsg|SSIETag|SSILastModified|SSILegacyExprParser|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|SSL(?:CACertificateFile|CACertificatePath|CADNRequestFile|CADNRequestPath|CARevocationCheck|CARevocationFile|CARevocationPath|CertificateChainFile|CertificateFile|CertificateKeyFile|CipherSuite|Compression|CryptoDevice|Engine|FIPS|HonorCipherOrder|InsecureRenegotiation|OCSP(?:DefaultResponder|Enable|OverrideResponder|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|UseRequestNonce)|OpenSSLConfCmd|Options|PassPhraseDialog|Protocol|Proxy(?:CACertificateFile|CACertificatePath|CARevocation(?:Check|File|Path)|CheckPeer(?:CN|Expire|Name)|CipherSuite|Engine|MachineCertificate(?:ChainFile|File|Path)|Protocol|Verify|VerifyDepth)|RandomSeed|RenegBufferSize|Require|RequireSSL|Session(?:Cache|CacheTimeout|TicketKeyFile|Tickets)|SRPUnknownUserSeed|SRPVerifierFile|Stapling(?:Cache|ErrorCacheTimeout|FakeTryLater|ForceURL|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|ReturnResponderErrors|StandardCacheTimeout)|StrictSNIVHostCheck|UserName|UseStapling|VerifyClient|VerifyDepth)|StartServers|StartThreads|Substitute|Suexec|SuexecUserGroup|ThreadLimit|ThreadsPerChild|ThreadStackSize|TimeOut|TraceEnable|TransferLog|TypesConfig|UnDefine|UndefMacro|UnsetEnv|Use|UseCanonicalName|UseCanonicalPhysicalPort|User|UserDir|VHostCGIMode|VHostCGIPrivs|VHostGroup|VHostPrivs|VHostSecure|VHostUser|Virtual(?:DocumentRoot|ScriptAlias)(?:IP)?|WatchdogInterval|XBitHack|xml2EncAlias|xml2EncDefault|xml2StartParse)\b/im,lookbehind:!0,alias:"property"},"directive-block":{pattern:/<\/?\b(?:Auth[nz]ProviderAlias|Directory|DirectoryMatch|Else|ElseIf|Files|FilesMatch|If|IfDefine|IfModule|IfVersion|Limit|LimitExcept|Location|LocationMatch|Macro|Proxy|Require(?:All|Any|None)|VirtualHost)\b.*>/i,inside:{"directive-block":{pattern:/^<\/?\w+/,inside:{punctuation:/^<\/?/},alias:"tag"},"directive-block-parameter":{pattern:/.*[^>]/,inside:{punctuation:/:/,string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}}},alias:"attr-value"},punctuation:/>/},alias:"tag"},"directive-flags":{pattern:/\[(?:[\w=],?)+\]/,alias:"keyword"},string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}},variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/,regex:/\^?.*\$|\^.*\$?/}}function vK(e){e.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}}function vX(e){e.register(vF),e.register(vK);var t=/\b(?:(?:after|before)(?=\s+[a-z])|abstract|activate|and|any|array|as|asc|autonomous|begin|bigdecimal|blob|boolean|break|bulk|by|byte|case|cast|catch|char|class|collect|commit|const|continue|currency|date|datetime|decimal|default|delete|desc|do|double|else|end|enum|exception|exit|export|extends|final|finally|float|for|from|get(?=\s*[{};])|global|goto|group|having|hint|if|implements|import|in|inner|insert|instanceof|int|integer|interface|into|join|like|limit|list|long|loop|map|merge|new|not|null|nulls|number|object|of|on|or|outer|override|package|parallel|pragma|private|protected|public|retrieve|return|rollback|select|set|short|sObject|sort|static|string|super|switch|synchronized|system|testmethod|then|this|throw|time|transaction|transient|trigger|try|undelete|update|upsert|using|virtual|void|webservice|when|where|while|(?:inherited|with|without)\s+sharing)\b/i,n=/\b(?:(?=[a-z_]\w*\s*[<\[])|(?!<keyword>))[A-Z_]\w*(?:\s*\.\s*[A-Z_]\w*)*\b(?:\s*(?:\[\s*\]|<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>))*/.source.replace(/<keyword>/g,function(){return t.source});function r(e){return RegExp(e.replace(/<CLASS-NAME>/g,function(){return n}),"i")}var a={keyword:t,punctuation:/[()\[\]{};,:.<>]/};e.languages.apex={comment:e.languages.clike.comment,string:e.languages.clike.string,sql:{pattern:/((?:[=,({:]|\breturn)\s*)\[[^\[\]]*\]/i,lookbehind:!0,greedy:!0,alias:"language-sql",inside:e.languages.sql},annotation:{pattern:/@\w+\b/,alias:"punctuation"},"class-name":[{pattern:r(/(\b(?:class|enum|extends|implements|instanceof|interface|new|trigger\s+\w+\s+on)\s+)<CLASS-NAME>/.source),lookbehind:!0,inside:a},{pattern:r(/(\(\s*)<CLASS-NAME>(?=\s*\)\s*[\w(])/.source),lookbehind:!0,inside:a},{pattern:r(/<CLASS-NAME>(?=\s*\w+\s*[;=,(){:])/.source),inside:a}],trigger:{pattern:/(\btrigger\s+)\w+\b/i,lookbehind:!0,alias:"class-name"},keyword:t,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/i,number:/(?:\B\.\d+|\b\d+(?:\.\d+|L)?)\b/i,operator:/[!=](?:==?)?|\?\.?|&&|\|\||--|\+\+|[-+*/^&|]=?|:|<<?=?|>{1,3}=?/,punctuation:/[()\[\]{};,.]/}}function vZ(e){e.languages.apl={comment:/(?:⍝|#[! ]).*$/m,string:{pattern:/'(?:[^'\r\n]|'')*'/,greedy:!0},number:/¯?(?:\d*\.?\b\d+(?:e[+¯]?\d+)?|¯|∞)(?:j¯?(?:(?:\d+(?:\.\d+)?|\.\d+)(?:e[+¯]?\d+)?|¯|∞))?/i,statement:/:[A-Z][a-z][A-Za-z]*\b/,"system-function":{pattern:/⎕[A-Z]+/i,alias:"function"},constant:/[⍬⌾#⎕⍞]/,function:/[-+×÷⌈⌊∣|⍳⍸?*⍟○!⌹<≤=>≥≠≡≢∊⍷∪∩~∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⊆⊇⌷⍋⍒⊤⊥⍕⍎⊣⊢⍁⍂≈⍯↗¤→]/,"monadic-operator":{pattern:/[\\\/⌿⍀¨⍨⌶&∥]/,alias:"operator"},"dyadic-operator":{pattern:/[.⍣⍠⍤∘⌸@⌺⍥]/,alias:"operator"},assignment:{pattern:/←/,alias:"keyword"},punctuation:/[\[;\]()◇⋄]/,dfn:{pattern:/[{}⍺⍵⍶⍹∇⍫:]/,alias:"builtin"}}}function vQ(e){e.languages.applescript={comment:[/\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,/--.+/,/#.+/],string:/"(?:\\.|[^"\\\r\n])*"/,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e-?\d+)?\b/i,operator:[/[&=≠≤≥*+\-\/÷^]|[<>]=?/,/\b(?:(?:begin|end|start)s? with|(?:contains?|(?:does not|doesn't) contain)|(?:is|isn't|is not) (?:contained by|in)|(?:(?:is|isn't|is not) )?(?:greater|less) than(?: or equal)?(?: to)?|(?:comes|(?:does not|doesn't) come) (?:after|before)|(?:is|isn't|is not) equal(?: to)?|(?:(?:does not|doesn't) equal|equal to|equals|is not|isn't)|(?:a )?(?:ref(?: to)?|reference to)|(?:and|as|div|mod|not|or))\b/],keyword:/\b(?:about|above|after|against|apart from|around|aside from|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|continue|copy|does|eighth|else|end|equal|error|every|exit|false|fifth|first|for|fourth|from|front|get|given|global|if|ignoring|in|instead of|into|is|it|its|last|local|me|middle|my|ninth|of|on|onto|out of|over|prop|property|put|repeat|return|returning|second|set|seventh|since|sixth|some|tell|tenth|that|the|then|third|through|thru|timeout|times|to|transaction|true|try|until|where|while|whose|with|without)\b/,"class-name":/\b(?:POSIX file|RGB color|alias|application|boolean|centimeters|centimetres|class|constant|cubic centimeters|cubic centimetres|cubic feet|cubic inches|cubic meters|cubic metres|cubic yards|date|degrees Celsius|degrees Fahrenheit|degrees Kelvin|feet|file|gallons|grams|inches|integer|kilograms|kilometers|kilometres|list|liters|litres|meters|metres|miles|number|ounces|pounds|quarts|real|record|reference|script|square feet|square kilometers|square kilometres|square meters|square metres|square miles|square yards|text|yards)\b/,punctuation:/[{}():,¬«»《》]/}}function vJ(e){e.languages.aql={comment:/\/\/.*|\/\*[\s\S]*?\*\//,property:{pattern:/([{,]\s*)(?:(?!\d)\w+|(["'´`])(?:(?!\2)[^\\\r\n]|\\.)*\2)(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},identifier:{pattern:/([´`])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},variable:/@@?\w+/,keyword:[{pattern:/(\bWITH\s+)COUNT(?=\s+INTO\b)/i,lookbehind:!0},/\b(?:AGGREGATE|ALL|AND|ANY|ASC|COLLECT|DESC|DISTINCT|FILTER|FOR|GRAPH|IN|INBOUND|INSERT|INTO|K_PATHS|K_SHORTEST_PATHS|LET|LIKE|LIMIT|NONE|NOT|NULL|OR|OUTBOUND|REMOVE|REPLACE|RETURN|SHORTEST_PATH|SORT|UPDATE|UPSERT|WINDOW|WITH)\b/i,{pattern:/(^|[^\w.[])(?:KEEP|PRUNE|SEARCH|TO)\b/i,lookbehind:!0},{pattern:/(^|[^\w.[])(?:CURRENT|NEW|OLD)\b/,lookbehind:!0},{pattern:/\bOPTIONS(?=\s*\{)/i}],function:/\b(?!\d)\w+(?=\s*\()/,boolean:/\b(?:false|true)\b/i,range:{pattern:/\.\./,alias:"operator"},number:[/\b0b[01]+/i,/\b0x[0-9a-f]+/i,/(?:\B\.\d+|\b(?:0|[1-9]\d*)(?:\.\d+)?)(?:e[+-]?\d+)?/i],operator:/\*{2,}|[=!]~|[!=<>]=?|&&|\|\||[-+*/%]/,punctuation:/::|[?.:,;()[\]{}]/}}function v0(e){e.register(vF),e.languages.c=e.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),e.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),e.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},e.languages.c.string],char:e.languages.c.char,comment:e.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:e.languages.c}}}}),e.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete e.languages.c.boolean}function v1(e){var t,n;e.register(v0),t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source}),e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}function v2(e){e.register(v1),e.languages.arduino=e.languages.extend("cpp",{keyword:/\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,constant:/\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,builtin:/\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/}),e.languages.ino=e.languages.arduino}function v3(e){e.languages.arff={comment:/%.*/,string:{pattern:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:/@(?:attribute|data|end|relation)\b/i,number:/\b\d+(?:\.\d+)?\b/,punctuation:/[{},]/}}function v4(e){e.languages.armasm={comment:{pattern:/;.*/,greedy:!0},string:{pattern:/"(?:[^"\r\n]|"")*"/,greedy:!0,inside:{variable:{pattern:/((?:^|[^$])(?:\${2})*)\$\w+/,lookbehind:!0}}},char:{pattern:/'(?:[^'\r\n]{0,4}|'')'/,greedy:!0},"version-symbol":{pattern:/\|[\w@]+\|/,greedy:!0,alias:"property"},boolean:/\b(?:FALSE|TRUE)\b/,directive:{pattern:/\b(?:ALIAS|ALIGN|AREA|ARM|ASSERT|ATTR|CN|CODE|CODE16|CODE32|COMMON|CP|DATA|DCB|DCD|DCDO|DCDU|DCFD|DCFDU|DCI|DCQ|DCQU|DCW|DCWU|DN|ELIF|ELSE|END|ENDFUNC|ENDIF|ENDP|ENTRY|EQU|EXPORT|EXPORTAS|EXTERN|FIELD|FILL|FN|FUNCTION|GBLA|GBLL|GBLS|GET|GLOBAL|IF|IMPORT|INCBIN|INCLUDE|INFO|KEEP|LCLA|LCLL|LCLS|LTORG|MACRO|MAP|MEND|MEXIT|NOFP|OPT|PRESERVE8|PROC|QN|READONLY|RELOC|REQUIRE|REQUIRE8|RLIST|ROUT|SETA|SETL|SETS|SN|SPACE|SUBT|THUMB|THUMBX|TTL|WEND|WHILE)\b/,alias:"property"},instruction:{pattern:/((?:^|(?:^|[^\\])(?:\r\n?|\n))[ \t]*(?:(?:[A-Z][A-Z0-9_]*[a-z]\w*|[a-z]\w*|\d+)[ \t]+)?)\b[A-Z.]+\b/,lookbehind:!0,alias:"keyword"},variable:/\$\w+/,number:/(?:\b[2-9]_\d+|(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e-?\d+)?|\b0(?:[fd]_|x)[0-9a-f]+|&[0-9a-f]+)\b/i,register:{pattern:/\b(?:r\d|lr)\b/,alias:"symbol"},operator:/<>|<<|>>|&&|\|\||[=!<>/]=?|[+\-*%#?&|^]|:[A-Z]+:/,punctuation:/[()[\],]/},e.languages["arm-asm"]=e.languages.armasm}function v5(e){!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var a=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=r.variable[1].inside,s=0;s<a.length;s++)i[a[s]]=e.languages.bash[a[s]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash}(e)}function v6(e){!function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+n.source+")?)",a=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),i=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function s(e,t){return t=(t||"").replace(/m/g,"")+"m",RegExp(/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<value>>/g,function(){return e}),t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return r})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<key>>/g,function(){return"(?:"+a+"|"+i+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:s(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:s(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:s(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:s(i),lookbehind:!0,greedy:!0},number:{pattern:s(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(e)}function v9(e){e.register(vP),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),i=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+i+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+i+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(t){["url","bold","italic","strike","code-snippet"].forEach(function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])})}),e.hooks.add("after-tokenize",function(e){("markdown"===e.language||"md"===e.language)&&function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var a=t[n];if("code"!==a.type){e(a.content);continue}var i=a.content[1],s=a.content[3];if(i&&s&&"code-language"===i.type&&"code-block"===s.type&&"string"==typeof i.content){var o=i.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),l="language-"+(o=(/[a-z][\w-]*/i.exec(o)||[""])[0].toLowerCase());s.alias?"string"==typeof s.alias?s.alias=[s.alias,l]:s.alias.push(l):s.alias=[l]}}}(e.tokens)}),e.hooks.add("wrap",function(t){if("code-block"===t.type){for(var n="",r=0,a=t.classes.length;r<a;r++){var i=t.classes[r],s=/language-(.+)/.exec(i);if(s){n=s[1];break}}var o=e.languages[n];if(o)t.content=e.highlight(t.content.value,o,n);else if(n&&"none"!==n&&e.plugins.autoloader){var l="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random());t.attributes.id=l,e.plugins.autoloader.loadLanguages(n,function(){var t=document.getElementById(l);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))})}}}),RegExp(e.languages.markup.tag.pattern.source,"gi"),e.languages.md=e.languages.markdown}(e)}function v8(e){var t;t=function(t,n){return{pattern:RegExp(/\{!/.source+"(?:"+(n||t)+")"+/$[\s\S]*\}/.source,"m"),greedy:!0,inside:{embedded:{pattern:/(^\{!\w+\b)[\s\S]+(?=\}$)/,lookbehind:!0,alias:"language-"+t,inside:e.languages[t]},string:/[\s\S]+/}}},e.languages.arturo={comment:{pattern:/;.*/,greedy:!0},character:{pattern:/`.`/,alias:"char",greedy:!0},number:{pattern:/\b\d+(?:\.\d+(?:\.\d+(?:-[\w+-]+)?)?)?\b/},string:{pattern:/"(?:[^"\\\r\n]|\\.)*"/,greedy:!0},regex:{pattern:/\{\/.*?\/\}/,greedy:!0},"html-string":t("html"),"css-string":t("css"),"js-string":t("js"),"md-string":t("md"),"sql-string":t("sql"),"sh-string":t("shell","sh"),multistring:{pattern:/».*|\{:[\s\S]*?:\}|\{[\s\S]*?\}|^-{6}$[\s\S]*/m,alias:"string",greedy:!0},label:{pattern:/\w+\b\??:/,alias:"property"},literal:{pattern:/'(?:\w+\b\??:?)/,alias:"constant"},type:{pattern:/:(?:\w+\b\??:?)/,alias:"class-name"},color:/#\w+/,predicate:{pattern:/\b(?:all|and|any|ascii|attr|attribute|attributeLabel|binary|block|char|contains|database|date|dictionary|empty|equal|even|every|exists|false|floating|function|greater|greaterOrEqual|if|in|inline|integer|is|key|label|leap|less|lessOrEqual|literal|logical|lower|nand|negative|nor|not|notEqual|null|numeric|odd|or|path|pathLabel|positive|prefix|prime|regex|same|set|some|sorted|standalone|string|subset|suffix|superset|symbol|symbolLiteral|true|try|type|unless|upper|when|whitespace|word|xnor|xor|zero)\?/,alias:"keyword"},"builtin-function":{pattern:/\b(?:abs|acos|acosh|acsec|acsech|actan|actanh|add|after|alert|alias|and|angle|append|arg|args|arity|array|as|asec|asech|asin|asinh|atan|atan2|atanh|attr|attrs|average|before|benchmark|blend|break|call|capitalize|case|ceil|chop|clear|clip|close|color|combine|conj|continue|copy|cos|cosh|crc|csec|csech|ctan|ctanh|cursor|darken|dec|decode|define|delete|desaturate|deviation|dialog|dictionary|difference|digest|digits|div|do|download|drop|dup|e|else|empty|encode|ensure|env|escape|execute|exit|exp|extend|extract|factors|fdiv|filter|first|flatten|floor|fold|from|function|gamma|gcd|get|goto|hash|hypot|if|inc|indent|index|infinity|info|input|insert|inspect|intersection|invert|jaro|join|keys|kurtosis|last|let|levenshtein|lighten|list|ln|log|loop|lower|mail|map|match|max|median|min|mod|module|mul|nand|neg|new|nor|normalize|not|now|null|open|or|outdent|pad|palette|panic|path|pause|permissions|permutate|pi|pop|popup|pow|powerset|powmod|prefix|print|prints|process|product|query|random|range|read|relative|remove|rename|render|repeat|replace|request|return|reverse|round|sample|saturate|script|sec|sech|select|serve|set|shl|shr|shuffle|sin|sinh|size|skewness|slice|sort|spin|split|sqrt|squeeze|stack|strip|sub|suffix|sum|switch|symbols|symlink|sys|take|tan|tanh|terminal|terminate|to|truncate|try|type|unclip|union|unique|unless|until|unzip|upper|values|var|variance|volume|webview|while|with|wordwrap|write|xnor|xor|zip)\b/,alias:"keyword"},sugar:{pattern:/->|=>|\||::/,alias:"operator"},punctuation:/[()[\],]/,symbol:{pattern:/<:|-:|ø|@|#|\+|\||\*|\$|---|-|%|\/|\.\.|\^|~|=|<|>|\\/},boolean:{pattern:/\b(?:false|maybe|true)\b/}},e.languages.art=e.languages.arturo}function v7(e){var t={pattern:/(^[ \t]*)\[(?!\[)(?:(["'$`])(?:(?!\2)[^\\]|\\.)*\2|\[(?:[^\[\]\\]|\\.)*\]|[^\[\]\\"'$`]|\\.)*\]/m,lookbehind:!0,inside:{quoted:{pattern:/([$`])(?:(?!\1)[^\\]|\\.)*\1/,inside:{punctuation:/^[$`]|[$`]$/}},interpreted:{pattern:/'(?:[^'\\]|\\.)*'/,inside:{punctuation:/^'|'$/}},string:/"(?:[^"\\]|\\.)*"/,variable:/\w+(?==)/,punctuation:/^\[|\]$|,/,operator:/=/,"attr-value":/(?!^\s+$).+/}},n=e.languages.asciidoc={"comment-block":{pattern:/^(\/{4,})$[\s\S]*?^\1/m,alias:"comment"},table:{pattern:/^\|={3,}(?:(?:\r?\n|\r(?!\n)).*)*?(?:\r?\n|\r)\|={3,}$/m,inside:{specifiers:{pattern:/(?:(?:(?:\d+(?:\.\d+)?|\.\d+)[+*](?:[<^>](?:\.[<^>])?|\.[<^>])?|[<^>](?:\.[<^>])?|\.[<^>])[a-z]*|[a-z]+)(?=\|)/,alias:"attr-value"},punctuation:{pattern:/(^|[^\\])[|!]=*/,lookbehind:!0}}},"passthrough-block":{pattern:/^(\+{4,})$[\s\S]*?^\1$/m,inside:{punctuation:/^\++|\++$/}},"literal-block":{pattern:/^(-{4,}|\.{4,})$[\s\S]*?^\1$/m,inside:{punctuation:/^(?:-+|\.+)|(?:-+|\.+)$/}},"other-block":{pattern:/^(--|\*{4,}|_{4,}|={4,})$[\s\S]*?^\1$/m,inside:{punctuation:/^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/}},"list-punctuation":{pattern:/(^[ \t]*)(?:-|\*{1,5}|\.{1,5}|(?:[a-z]|\d+)\.|[xvi]+\))(?= )/im,lookbehind:!0,alias:"punctuation"},"list-label":{pattern:/(^[ \t]*)[a-z\d].+(?::{2,4}|;;)(?=\s)/im,lookbehind:!0,alias:"symbol"},"indented-block":{pattern:/((\r?\n|\r)\2)([ \t]+)\S.*(?:(?:\r?\n|\r)\3.+)*(?=\2{2}|$)/,lookbehind:!0},comment:/^\/\/.*/m,title:{pattern:/^.+(?:\r?\n|\r)(?:={3,}|-{3,}|~{3,}|\^{3,}|\+{3,})$|^={1,5} .+|^\.(?![\s.]).*/m,alias:"important",inside:{punctuation:/^(?:\.|=+)|(?:=+|-+|~+|\^+|\++)$/}},"attribute-entry":{pattern:/^:[^:\r\n]+:(?: .*?(?: \+(?:\r?\n|\r).*?)*)?$/m,alias:"tag"},attributes:t,hr:{pattern:/^'{3,}$/m,alias:"punctuation"},"page-break":{pattern:/^<{3,}$/m,alias:"punctuation"},admonition:{pattern:/^(?:CAUTION|IMPORTANT|NOTE|TIP|WARNING):/m,alias:"keyword"},callout:[{pattern:/(^[ \t]*)<?\d*>/m,lookbehind:!0,alias:"symbol"},{pattern:/<\d+>/,alias:"symbol"}],macro:{pattern:/\b[a-z\d][a-z\d-]*::?(?:[^\s\[\]]*\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:{function:/^[a-z\d-]+(?=:)/,punctuation:/^::?/,attributes:{pattern:/(?:\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:t.inside}}},inline:{pattern:/(^|[^\\])(?:(?:\B\[(?:[^\]\\"']|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?:[^`'\s]|\s+\S)+['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"']|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m,lookbehind:!0,inside:{attributes:t,url:{pattern:/^(?:\[\[\[?.+?\]?\]\]|<<.+?>>)$/,inside:{punctuation:/^(?:\[\[\[?|<<)|(?:\]\]\]?|>>)$/}},"attribute-ref":{pattern:/^\{.+\}$/,inside:{variable:{pattern:/(^\{)[a-z\d,+_-]+/,lookbehind:!0},operator:/^[=?!#%@$]|!(?=[:}])/,punctuation:/^\{|\}$|::?/}},italic:{pattern:/^(['_])[\s\S]+\1$/,inside:{punctuation:/^(?:''?|__?)|(?:''?|__?)$/}},bold:{pattern:/^\*[\s\S]+\*$/,inside:{punctuation:/^\*\*?|\*\*?$/}},punctuation:/^(?:``?|\+{1,3}|##?|\$\$|[~^]|\(\(\(?)|(?:''?|\+{1,3}|##?|\$\$|[~^`]|\)?\)\))$/}},replacement:{pattern:/\((?:C|R|TM)\)/,alias:"builtin"},entity:/&#?[\da-z]{1,8};/i,"line-continuation":{pattern:/(^| )\+$/m,lookbehind:!0,alias:"punctuation"}};function r(e){e=e.split(" ");for(var t={},r=0,a=e.length;r<a;r++)t[e[r]]=n[e[r]];return t}t.inside.interpreted.inside.rest=r("macro inline replacement entity"),n["passthrough-block"].inside.rest=r("macro"),n["literal-block"].inside.rest=r("callout"),n.table.inside.rest=r("comment-block passthrough-block literal-block other-block list-punctuation indented-block comment title attribute-entry attributes hr page-break admonition list-label callout macro inline replacement entity line-continuation"),n["other-block"].inside.rest=r("table list-punctuation indented-block comment attribute-entry attributes hr page-break admonition list-label macro inline replacement entity line-continuation"),n.title.inside.rest=r("macro inline replacement entity"),e.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.value.replace(/&/,"&"))}),e.languages.adoc=e.languages.asciidoc}function Te(e){e.register(vF),function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+t[+n]+")"})}function n(e,n,r){return RegExp(t(e,n),r||"")}function r(e,t){for(var n=0;n<t;n++)e=e.replace(/<<self>>/g,function(){return"(?:"+e+")"});return e.replace(/<<self>>/g,"[^\\s\\S]")}var a="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface record struct",s="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var c=l(i),u=RegExp(l(a+" "+i+" "+s+" "+o)),d=l(i+" "+s+" "+o),p=l(a+" "+i+" "+o),m=r(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),f=r(/\((?:[^()]|<<self>>)*\)/.source,2),h=/@?\b[A-Za-z_]\w*\b/.source,g=t(/<<0>>(?:\s*<<1>>)?/.source,[h,m]),b=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[d,g]),y=/\[\s*(?:,\s*)*\]/.source,E=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[b,y]),x=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[m,f,y]),v=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[x]),T=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[v,b,y]),S={keyword:u,punctuation:/[<>()?,.:[\]]/},_=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,k=/"(?:\\.|[^\\"\r\n])*"/.source,w=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[w]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[k]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[b]),lookbehind:!0,inside:S},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[h,T]),lookbehind:!0,inside:S},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[h]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[c,g]),lookbehind:!0,inside:S},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[b]),lookbehind:!0,inside:S},{pattern:n(/(\bwhere\s+)<<0>>/.source,[h]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[E]),lookbehind:!0,inside:S},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[T,p,h]),inside:S}],keyword:u,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[h]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[f]),lookbehind:!0,alias:"class-name",inside:S},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[T,b]),inside:S,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[T]),lookbehind:!0,inside:S,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[h,m]),inside:{function:n(/^<<0>>/.source,[h]),generic:{pattern:RegExp(m),alias:"class-name",inside:S}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[c,g,h,T,u.source,f,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[g,f]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:u,"class-name":{pattern:RegExp(T),greedy:!0,inside:S},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var A=k+"|"+_,N=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[A]),I=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[N]),2),C=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,R=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[b,I]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[C,R]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[C]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[I]),inside:e.languages.csharp},"class-name":{pattern:RegExp(b),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var O=/:[^}\r\n]+/.source,D=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[N]),2),L=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[D,O]),M=r(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[A]),2),P=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[M,O]);function j(t,r){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[t]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[r,O]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[L]),lookbehind:!0,greedy:!0,inside:j(L,D)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[P]),lookbehind:!0,greedy:!0,inside:j(P,M)}],char:{pattern:RegExp(_),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(e)}function Tt(e){e.register(Te),e.register(vP),e.languages.aspnet=e.languages.extend("markup",{"page-directive":{pattern:/<%\s*@.*%>/,alias:"tag",inside:{"page-directive":{pattern:/<%\s*@\s*(?:Assembly|Control|Implements|Import|Master(?:Type)?|OutputCache|Page|PreviousPageType|Reference|Register)?|%>/i,alias:"tag"},rest:e.languages.markup.tag.inside}},directive:{pattern:/<%.*%>/,alias:"tag",inside:{directive:{pattern:/<%\s*?[$=%#:]{0,2}|%>/,alias:"tag"},rest:e.languages.csharp}}}),e.languages.aspnet.tag.pattern=/<(?!%)\/?[^\s>\/]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/,e.languages.insertBefore("inside","punctuation",{directive:e.languages.aspnet.directive},e.languages.aspnet.tag.inside["attr-value"]),e.languages.insertBefore("aspnet","comment",{"asp-comment":{pattern:/<%--[\s\S]*?--%>/,alias:["asp","comment"]}}),e.languages.insertBefore("aspnet",e.languages.javascript?"script":"tag",{"asp-script":{pattern:/(<script(?=.*runat=['"]?server\b)[^>]*>)[\s\S]*?(?=<\/script>)/i,lookbehind:!0,alias:["asp","script"],inside:e.languages.csharp||{}}})}function Tn(e){e.languages.asm6502={comment:/;.*/,directive:{pattern:/\.\w+(?= )/,alias:"property"},string:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,"op-code":{pattern:/\b(?:ADC|AND|ASL|BCC|BCS|BEQ|BIT|BMI|BNE|BPL|BRK|BVC|BVS|CLC|CLD|CLI|CLV|CMP|CPX|CPY|DEC|DEX|DEY|EOR|INC|INX|INY|JMP|JSR|LDA|LDX|LDY|LSR|NOP|ORA|PHA|PHP|PLA|PLP|ROL|ROR|RTI|RTS|SBC|SEC|SED|SEI|STA|STX|STY|TAX|TAY|TSX|TXA|TXS|TYA|adc|and|asl|bcc|bcs|beq|bit|bmi|bne|bpl|brk|bvc|bvs|clc|cld|cli|clv|cmp|cpx|cpy|dec|dex|dey|eor|inc|inx|iny|jmp|jsr|lda|ldx|ldy|lsr|nop|ora|pha|php|pla|plp|rol|ror|rti|rts|sbc|sec|sed|sei|sta|stx|sty|tax|tay|tsx|txa|txs|tya)\b/,alias:"keyword"},"hex-number":{pattern:/#?\$[\da-f]{1,4}\b/i,alias:"number"},"binary-number":{pattern:/#?%[01]+\b/,alias:"number"},"decimal-number":{pattern:/#?\b\d+\b/,alias:"number"},register:{pattern:/\b[xya]\b/i,alias:"variable"},punctuation:/[(),:]/}}function Tr(e){e.languages.asmatmel={comment:{pattern:/;.*/,greedy:!0},string:{pattern:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},constant:/\b(?:PORT[A-Z]|DDR[A-Z]|(?:DD|P)[A-Z](?:\d|[0-2]\d|3[01]))\b/,directive:{pattern:/\.\w+(?= )/,alias:"property"},"r-register":{pattern:/\br(?:\d|[12]\d|3[01])\b/,alias:"variable"},"op-code":{pattern:/\b(?:ADC|ADD|ADIW|AND|ANDI|ASR|BCLR|BLD|BRBC|BRBS|BRCC|BRCS|BREAK|BREQ|BRGE|BRHC|BRHS|BRID|BRIE|BRLO|BRLT|BRMI|BRNE|BRPL|BRSH|BRTC|BRTS|BRVC|BRVS|BSET|BST|CALL|CBI|CBR|CLC|CLH|CLI|CLN|CLR|CLS|CLT|CLV|CLZ|COM|CP|CPC|CPI|CPSE|DEC|DES|EICALL|EIJMP|ELPM|EOR|FMUL|FMULS|FMULSU|ICALL|IJMP|IN|INC|JMP|LAC|LAS|LAT|LD|LD[A-Za-z0-9]|LPM|LSL|LSR|MOV|MOVW|MUL|MULS|MULSU|NEG|NOP|OR|ORI|OUT|POP|PUSH|RCALL|RET|RETI|RJMP|ROL|ROR|SBC|SBCI|SBI|SBIC|SBIS|SBIW|SBR|SBRC|SBRS|SEC|SEH|SEI|SEN|SER|SES|SET|SEV|SEZ|SLEEP|SPM|ST|ST[A-Z0-9]|SUB|SUBI|SWAP|TST|WDR|XCH|adc|add|adiw|and|andi|asr|bclr|bld|brbc|brbs|brcc|brcs|break|breq|brge|brhc|brhs|brid|brie|brlo|brlt|brmi|brne|brpl|brsh|brtc|brts|brvc|brvs|bset|bst|call|cbi|cbr|clc|clh|cli|cln|clr|cls|clt|clv|clz|com|cp|cpc|cpi|cpse|dec|des|eicall|eijmp|elpm|eor|fmul|fmuls|fmulsu|icall|ijmp|in|inc|jmp|lac|las|lat|ld|ld[a-z0-9]|lpm|lsl|lsr|mov|movw|mul|muls|mulsu|neg|nop|or|ori|out|pop|push|rcall|ret|reti|rjmp|rol|ror|sbc|sbci|sbi|sbic|sbis|sbiw|sbr|sbrc|sbrs|sec|seh|sei|sen|ser|ses|set|sev|sez|sleep|spm|st|st[a-zA-Z0-9]|sub|subi|swap|tst|wdr|xch)\b/,alias:"keyword"},"hex-number":{pattern:/#?\$[\da-f]{2,4}\b/i,alias:"number"},"binary-number":{pattern:/#?%[01]+\b/,alias:"number"},"decimal-number":{pattern:/#?\b\d+\b/,alias:"number"},register:{pattern:/\b[acznvshtixy]\b/i,alias:"variable"},operator:/>>=?|<<=?|&[&=]?|\|[\|=]?|[-+*/%^!=<>?]=?/,punctuation:/[(),:]/}}function Ta(e){e.languages.autohotkey={comment:[{pattern:/(^|\s);.*/,lookbehind:!0},{pattern:/(^[\t ]*)\/\*(?:[\r\n](?![ \t]*\*\/)|[^\r\n])*(?:[\r\n][ \t]*\*\/)?/m,lookbehind:!0,greedy:!0}],tag:{pattern:/^([ \t]*)[^\s,`":]+(?=:[ \t]*$)/m,lookbehind:!0},string:/"(?:[^"\n\r]|"")*"/,variable:/%\w+%/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/\?|\/\/?=?|:=|\|[=|]?|&[=&]?|\+[=+]?|-[=-]?|\*[=*]?|<(?:<=?|>|=)?|>>?=?|[.^!=~]=?|\b(?:AND|NOT|OR)\b/,boolean:/\b(?:false|true)\b/,command:{pattern:/\b(?:AutoTrim|BlockInput|Break|Click|ClipWait|Continue|Control|ControlClick|ControlFocus|ControlGet|ControlGetFocus|ControlGetPos|ControlGetText|ControlMove|ControlSend|ControlSendRaw|ControlSetText|CoordMode|Critical|DetectHiddenText|DetectHiddenWindows|Drive|DriveGet|DriveSpaceFree|EnvAdd|EnvDiv|EnvGet|EnvMult|EnvSet|EnvSub|EnvUpdate|Exit|ExitApp|FileAppend|FileCopy|FileCopyDir|FileCreateDir|FileCreateShortcut|FileDelete|FileEncoding|FileGetAttrib|FileGetShortcut|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileMoveDir|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileRemoveDir|FileSelectFile|FileSelectFolder|FileSetAttrib|FileSetTime|FormatTime|GetKeyState|Gosub|Goto|GroupActivate|GroupAdd|GroupClose|GroupDeactivate|Gui|GuiControl|GuiControlGet|Hotkey|ImageSearch|IniDelete|IniRead|IniWrite|Input|InputBox|KeyWait|ListHotkeys|ListLines|ListVars|Loop|Menu|MouseClick|MouseClickDrag|MouseGetPos|MouseMove|MsgBox|OnExit|OutputDebug|Pause|PixelGetColor|PixelSearch|PostMessage|Process|Progress|Random|RegDelete|RegRead|RegWrite|Reload|Repeat|Return|Run|RunAs|RunWait|Send|SendEvent|SendInput|SendMessage|SendMode|SendPlay|SendRaw|SetBatchLines|SetCapslockState|SetControlDelay|SetDefaultMouseSpeed|SetEnv|SetFormat|SetKeyDelay|SetMouseDelay|SetNumlockState|SetRegView|SetScrollLockState|SetStoreCapslockMode|SetTimer|SetTitleMatchMode|SetWinDelay|SetWorkingDir|Shutdown|Sleep|Sort|SoundBeep|SoundGet|SoundGetWaveVolume|SoundPlay|SoundSet|SoundSetWaveVolume|SplashImage|SplashTextOff|SplashTextOn|SplitPath|StatusBarGetText|StatusBarWait|StringCaseSense|StringGetPos|StringLeft|StringLen|StringLower|StringMid|StringReplace|StringRight|StringSplit|StringTrimLeft|StringTrimRight|StringUpper|Suspend|SysGet|Thread|ToolTip|Transform|TrayTip|URLDownloadToFile|WinActivate|WinActivateBottom|WinClose|WinGet|WinGetActiveStats|WinGetActiveTitle|WinGetClass|WinGetPos|WinGetText|WinGetTitle|WinHide|WinKill|WinMaximize|WinMenuSelectItem|WinMinimize|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinRestore|WinSet|WinSetTitle|WinShow|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive)\b/i,alias:"selector"},constant:/\b(?:a_ahkpath|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_fileencoding|a_formatfloat|a_formatinteger|a_gui|a_guicontrol|a_guicontrolevent|a_guievent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_is64bitos|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_isunicode|a_keydelay|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|a_priorkey|a_programfiles|a_programs|a_programscommon|a_ptrsize|a_regview|a_screendpi|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scripthwnd|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel|programfiles)\b/i,builtin:/\b(?:abs|acos|asc|asin|atan|ceil|chr|class|comobjactive|comobjarray|comobjconnect|comobjcreate|comobjerror|comobjflags|comobjget|comobjquery|comobjtype|comobjvalue|cos|dllcall|exp|fileexist|Fileopen|floor|format|il_add|il_create|il_destroy|instr|isfunc|islabel|IsObject|ln|log|ltrim|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modify|lv_modifycol|lv_setimagelist|mod|numget|numput|onmessage|regexmatch|regexreplace|registercallback|round|rtrim|sb_seticon|sb_setparts|sb_settext|sin|sqrt|strlen|strreplace|strsplit|substr|tan|tv_add|tv_delete|tv_get|tv_getchild|tv_getcount|tv_getnext|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist|__Call|__Get|__New|__Set)\b/i,symbol:/\b(?:alt|altdown|altup|appskey|backspace|browser_back|browser_favorites|browser_forward|browser_home|browser_refresh|browser_search|browser_stop|bs|capslock|ctrl|ctrlbreak|ctrldown|ctrlup|del|delete|down|end|enter|esc|escape|f1|f10|f11|f12|f13|f14|f15|f16|f17|f18|f19|f2|f20|f21|f22|f23|f24|f3|f4|f5|f6|f7|f8|f9|home|ins|insert|joy1|joy10|joy11|joy12|joy13|joy14|joy15|joy16|joy17|joy18|joy19|joy2|joy20|joy21|joy22|joy23|joy24|joy25|joy26|joy27|joy28|joy29|joy3|joy30|joy31|joy32|joy4|joy5|joy6|joy7|joy8|joy9|joyaxes|joybuttons|joyinfo|joyname|joypov|joyr|joyu|joyv|joyx|joyy|joyz|lalt|launch_app1|launch_app2|launch_mail|launch_media|lbutton|lcontrol|lctrl|left|lshift|lwin|lwindown|lwinup|mbutton|media_next|media_play_pause|media_prev|media_stop|numlock|numpad0|numpad1|numpad2|numpad3|numpad4|numpad5|numpad6|numpad7|numpad8|numpad9|numpadadd|numpadclear|numpaddel|numpaddiv|numpaddot|numpaddown|numpadend|numpadenter|numpadhome|numpadins|numpadleft|numpadmult|numpadpgdn|numpadpgup|numpadright|numpadsub|numpadup|pgdn|pgup|printscreen|ralt|rbutton|rcontrol|rctrl|right|rshift|rwin|rwindown|rwinup|scrolllock|shift|shiftdown|shiftup|space|tab|up|volume_down|volume_mute|volume_up|wheeldown|wheelleft|wheelright|wheelup|xbutton1|xbutton2)\b/i,directive:{pattern:/#[a-z]+\b/i,alias:"important"},keyword:/\b(?:Abort|AboveNormal|Add|ahk_class|ahk_exe|ahk_group|ahk_id|ahk_pid|All|Alnum|Alpha|AltSubmit|AltTab|AltTabAndMenu|AltTabMenu|AltTabMenuDismiss|AlwaysOnTop|AutoSize|Background|BackgroundTrans|BelowNormal|between|BitAnd|BitNot|BitOr|BitShiftLeft|BitShiftRight|BitXOr|Bold|Border|Button|ByRef|Catch|Checkbox|Checked|CheckedGray|Choose|ChooseString|Close|Color|ComboBox|Contains|ControlList|Count|Date|DateTime|Days|DDL|Default|DeleteAll|Delimiter|Deref|Destroy|Digit|Disable|Disabled|DropDownList|Edit|Eject|Else|Enable|Enabled|Error|Exist|Expand|ExStyle|FileSystem|Finally|First|Flash|Float|FloatFast|Focus|Font|for|global|Grid|Group|GroupBox|GuiClose|GuiContextMenu|GuiDropFiles|GuiEscape|GuiSize|Hdr|Hidden|Hide|High|HKCC|HKCR|HKCU|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_LOCAL_MACHINE|HKEY_USERS|HKLM|HKU|Hours|HScroll|Icon|IconSmall|ID|IDLast|If|IfEqual|IfExist|IfGreater|IfGreaterOrEqual|IfInString|IfLess|IfLessOrEqual|IfMsgBox|IfNotEqual|IfNotExist|IfNotInString|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Ignore|ImageList|in|Integer|IntegerFast|Interrupt|is|italic|Join|Label|LastFound|LastFoundExist|Limit|Lines|List|ListBox|ListView|local|Lock|Logoff|Low|Lower|Lowercase|MainWindow|Margin|Maximize|MaximizeBox|MaxSize|Minimize|MinimizeBox|MinMax|MinSize|Minutes|MonthCal|Mouse|Move|Multi|NA|No|NoActivate|NoDefault|NoHide|NoIcon|NoMainWindow|norm|Normal|NoSort|NoSortHdr|NoStandard|Not|NoTab|NoTimers|Number|Off|Ok|On|OwnDialogs|Owner|Parse|Password|Picture|Pixel|Pos|Pow|Priority|ProcessName|Radio|Range|Read|ReadOnly|Realtime|Redraw|Region|REG_BINARY|REG_DWORD|REG_EXPAND_SZ|REG_MULTI_SZ|REG_SZ|Relative|Rename|Report|Resize|Restore|Retry|RGB|Screen|Seconds|Section|Serial|SetLabel|ShiftAltTab|Show|Single|Slider|SortDesc|Standard|static|Status|StatusBar|StatusCD|strike|Style|Submit|SysMenu|Tab2|TabStop|Text|Theme|Throw|Tile|ToggleCheck|ToggleEnable|ToolWindow|Top|Topmost|TransColor|Transparent|Tray|TreeView|Try|TryAgain|Type|UnCheck|underline|Unicode|Unlock|Until|UpDown|Upper|Uppercase|UseErrorLevel|Vis|VisFirst|Visible|VScroll|Wait|WaitClose|WantCtrlA|WantF2|WantReturn|While|Wrap|Xdigit|xm|xp|xs|Yes|ym|yp|ys)\b/i,function:/[^(); \t,\n+*\-=?>:\\\/<&%\[\]]+(?=\()/,punctuation:/[{}[\]():,]/}}function Ti(e){e.languages.autoit={comment:[/;.*/,{pattern:/(^[\t ]*)#(?:comments-start|cs)[\s\S]*?^[ \t]*#(?:ce|comments-end)/m,lookbehind:!0}],url:{pattern:/(^[\t ]*#include\s+)(?:<[^\r\n>]+>|"[^\r\n"]+")/m,lookbehind:!0},string:{pattern:/(["'])(?:\1\1|(?!\1)[^\r\n])*\1/,greedy:!0,inside:{variable:/([%$@])\w+\1/}},directive:{pattern:/(^[\t ]*)#[\w-]+/m,lookbehind:!0,alias:"keyword"},function:/\b\w+(?=\()/,variable:/[$@]\w+/,keyword:/\b(?:Case|Const|Continue(?:Case|Loop)|Default|Dim|Do|Else(?:If)?|End(?:Func|If|Select|Switch|With)|Enum|Exit(?:Loop)?|For|Func|Global|If|In|Local|Next|Null|ReDim|Select|Static|Step|Switch|Then|To|Until|Volatile|WEnd|While|With)\b/i,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,boolean:/\b(?:False|True)\b/i,operator:/<[=>]?|[-+*\/=&>]=?|[?^]|\b(?:And|Not|Or)\b/i,punctuation:/[\[\]().,:]/}}function Ts(e){function t(e,t,n){return RegExp(e.replace(/<<(\d+)>>/g,function(e,n){return t[+n]}),n||"")}var n=/bool|clip|float|int|string|val/.source,r=[[/is(?:bool|clip|float|int|string)|defined|(?:(?:internal)?function|var)?exists?/.source,/apply|assert|default|eval|import|nop|select|undefined/.source,/opt_(?:allowfloataudio|avipadscanlines|dwchannelmask|enable_(?:b64a|planartopackedrgb|v210|y3_10_10|y3_10_16)|usewaveextensible|vdubplanarhack)|set(?:cachemode|maxcpu|memorymax|planarlegacyalignment|workingdir)/.source,/hex(?:value)?|value/.source,/abs|ceil|continued(?:denominator|numerator)?|exp|floor|fmod|frac|log(?:10)?|max|min|muldiv|pi|pow|rand|round|sign|spline|sqrt/.source,/a?sinh?|a?cosh?|a?tan[2h]?/.source,/(?:bit(?:and|not|x?or|[lr]?shift[aslu]?|sh[lr]|sa[lr]|[lr]rotatel?|ro[rl]|te?st|set(?:count)?|cl(?:ea)?r|ch(?:an)?ge?))/.source,/average(?:[bgr]|chroma[uv]|luma)|(?:[rgb]|chroma[uv]|luma|rgb|[yuv](?=difference(?:fromprevious|tonext)))difference(?:fromprevious|tonext)?|[yuvrgb]plane(?:median|min|max|minmaxdifference)/.source,/getprocessinfo|logmsg|script(?:dir(?:utf8)?|file(?:utf8)?|name(?:utf8)?)|setlogparams/.source,/chr|(?:fill|find|left|mid|replace|rev|right)str|format|[lu]case|ord|str(?:cmpi?|fromutf8|len|toutf8)|time|trim(?:all|left|right)/.source,/isversionorgreater|version(?:number|string)/.source,/buildpixeltype|colorspacenametopixeltype/.source,/addautoloaddir|on(?:cpu|cuda)|prefetch|setfiltermtmode/.source].join("|"),[/has(?:audio|video)/.source,/height|width/.source,/frame(?:count|rate)|framerate(?:denominator|numerator)/.source,/getparity|is(?:field|frame)based/.source,/bitspercomponent|componentsize|hasalpha|is(?:planar(?:rgba?)?|interleaved|rgb(?:24|32|48|64)?|y(?:8|u(?:va?|y2))?|yv(?:12|16|24|411)|420|422|444|packedrgb)|numcomponents|pixeltype/.source,/audio(?:bits|channels|duration|length(?:[fs]|hi|lo)?|rate)|isaudio(?:float|int)/.source].join("|"),[/avi(?:file)?source|directshowsource|image(?:reader|source|sourceanim)|opendmlsource|segmented(?:avisource|directshowsource)|wavsource/.source,/coloryuv|convertbacktoyuy2|convertto(?:RGB(?:24|32|48|64)|(?:planar)?RGBA?|Y8?|YV(?:12|16|24|411)|YUVA?(?:411|420|422|444)|YUY2)|fixluminance|gr[ae]yscale|invert|levels|limiter|mergea?rgb|merge(?:chroma|luma)|rgbadjust|show(?:alpha|blue|green|red)|swapuv|tweak|[uv]toy8?|ytouv/.source,/(?:colorkey|reset)mask|layer|mask(?:hs)?|merge|overlay|subtract/.source,/addborders|(?:bicubic|bilinear|blackman|gauss|lanczos4|lanczos|point|sinc|spline(?:16|36|64))resize|crop(?:bottom)?|flip(?:horizontal|vertical)|(?:horizontal|vertical)?reduceby2|letterbox|skewrows|turn(?:180|left|right)/.source,/blur|fixbrokenchromaupsampling|generalconvolution|(?:spatial|temporal)soften|sharpen/.source,/trim|(?:un)?alignedsplice|(?:assume|assumescaled|change|convert)FPS|(?:delete|duplicate)frame|dissolve|fade(?:in|io|out)[02]?|freezeframe|interleave|loop|reverse|select(?:even|odd|(?:range)?every)/.source,/assume[bt]ff|assume(?:field|frame)based|bob|complementparity|doubleweave|peculiarblend|pulldown|separate(?:columns|fields|rows)|swapfields|weave(?:columns|rows)?/.source,/amplify(?:db)?|assumesamplerate|audiodub(?:ex)?|audiotrim|convertaudioto(?:(?:8|16|24|32)bit|float)|converttomono|delayaudio|ensurevbrmp3sync|get(?:left|right)?channel|kill(?:audio|video)|mergechannels|mixaudio|monotostereo|normalize|resampleaudio|ssrc|supereq|timestretch/.source,/animate|applyrange|conditional(?:filter|reader|select)|frameevaluate|scriptclip|tcp(?:server|source)|writefile(?:end|if|start)?/.source,/imagewriter/.source,/blackness|blankclip|colorbars(?:hd)?|compare|dumpfiltergraph|echo|histogram|info|messageclip|preroll|setgraphanalysis|show(?:framenumber|smpte|time)|showfiveversions|stack(?:horizontal|vertical)|subtitle|tone|version/.source].join("|")].join("|");e.languages.avisynth={comment:[{pattern:/(^|[^\\])\[\*(?:[^\[*]|\[(?!\*)|\*(?!\])|\[\*(?:[^\[*]|\[(?!\*)|\*(?!\]))*\*\])*\*\]/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],argument:{pattern:t(/\b(?:<<0>>)\s+("?)\w+\1/.source,[n],"i"),inside:{keyword:/^\w+/}},"argument-label":{pattern:/([,(][\s\\]*)\w+\s*=(?!=)/,lookbehind:!0,inside:{"argument-name":{pattern:/^\w+/,alias:"punctuation"},punctuation:/=$/}},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0,inside:{constant:{pattern:/\b(?:DEFAULT_MT_MODE|(?:MAINSCRIPT|PROGRAM|SCRIPT)DIR|(?:MACHINE|USER)_(?:CLASSIC|PLUS)_PLUGINS)\b/}}}],variable:/\b(?:last)\b/i,boolean:/\b(?:false|no|true|yes)\b/i,keyword:/\b(?:catch|else|for|function|global|if|return|try|while|__END__)\b/i,constant:/\bMT_(?:MULTI_INSTANCE|NICE_FILTER|SERIALIZED|SPECIAL_MT)\b/,"builtin-function":{pattern:t(/\b(?:<<0>>)\b/.source,[r],"i"),alias:"function"},"type-cast":{pattern:t(/\b(?:<<0>>)(?=\s*\()/.source,[n],"i"),alias:"keyword"},function:{pattern:/\b[a-z_]\w*(?=\s*\()|(\.)[a-z_]\w*\b/i,lookbehind:!0},"line-continuation":{pattern:/(^[ \t]*)\\|\\(?=[ \t]*$)/m,lookbehind:!0,alias:"punctuation"},number:/\B\$(?:[\da-f]{6}|[\da-f]{8})\b|(?:(?:\b|\B-)\d+(?:\.\d*)?\b|\B\.\d+\b)/i,operator:/\+\+?|[!=<>]=?|&&|\|\||[?:*/%-]/,punctuation:/[{}\[\]();,.]/},e.languages.avs=e.languages.avisynth}function To(e){e.languages["avro-idl"]={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/(^|[^\\])"(?:[^\r\n"\\]|\\.)*"/,lookbehind:!0,greedy:!0},annotation:{pattern:/@(?:[$\w.-]|`[^\r\n`]+`)+/,greedy:!0,alias:"function"},"function-identifier":{pattern:/`[^\r\n`]+`(?=\s*\()/,greedy:!0,alias:"function"},identifier:{pattern:/`[^\r\n`]+`/,greedy:!0},"class-name":{pattern:/(\b(?:enum|error|protocol|record|throws)\b\s+)[$\w]+/,lookbehind:!0,greedy:!0},keyword:/\b(?:array|boolean|bytes|date|decimal|double|enum|error|false|fixed|float|idl|import|int|local_timestamp_ms|long|map|null|oneway|protocol|record|schema|string|throws|time_ms|timestamp_ms|true|union|uuid|void)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:[{pattern:/(^|[^\w.])-?(?:(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|0x(?:[a-f0-9]+(?:\.[a-f0-9]*)?|\.[a-f0-9]+)(?:p[+-]?\d+)?)[dfl]?(?![\w.])/i,lookbehind:!0},/-?\b(?:Infinity|NaN)\b/],operator:/=/,punctuation:/[()\[\]{}<>.:,;-]/},e.languages.avdl=e.languages["avro-idl"]}function Tl(e){e.languages.awk={hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},comment:{pattern:/#.*/,greedy:!0},string:{pattern:/(^|[^\\])"(?:[^\\"\r\n]|\\.)*"/,lookbehind:!0,greedy:!0},regex:{pattern:/((?:^|[^\w\s)])\s*)\/(?:[^\/\\\r\n]|\\.)*\//,lookbehind:!0,greedy:!0},variable:/\$\w+/,keyword:/\b(?:BEGIN|BEGINFILE|END|ENDFILE|break|case|continue|default|delete|do|else|exit|for|function|getline|if|in|next|nextfile|printf?|return|switch|while)\b|@(?:include|load)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[a-fA-F0-9]+)\b/,operator:/--|\+\+|!?~|>&|>>|<<|(?:\*\*|[<>!=+\-*/%^])=?|&&|\|[|&]|[?:]/,punctuation:/[()[\]{},;]/},e.languages.gawk=e.languages.awk}function Tc(e){e.languages.basic={comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/}}function Tu(e){var t,n,r,a;t=/%%?[~:\w]+%?|!\S+!/,n={pattern:/\/[a-z?]+(?=[ :]|$):?|-[a-z]\b|--[a-z-]+\b/im,alias:"attr-name",inside:{punctuation:/:/}},r=/"(?:[\\"]"|[^"])*"(?!")/,a=/(?:\b|-)\d+\b/,e.languages.batch={comment:[/^::.*/m,{pattern:/((?:^|[&(])[ \t]*)rem\b(?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0}],label:{pattern:/^:.*/m,alias:"property"},command:[{pattern:/((?:^|[&(])[ \t]*)for(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* \S+ in \([^)]+\) do/im,lookbehind:!0,inside:{keyword:/\b(?:do|in)\b|^for\b/i,string:r,parameter:n,variable:t,number:a,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*)if(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:not )?(?:cmdextversion \d+|defined \w+|errorlevel \d+|exist \S+|(?:"[^"]*"|(?!")(?:(?!==)\S)+)?(?:==| (?:equ|geq|gtr|leq|lss|neq) )(?:"[^"]*"|[^\s"]\S*))/im,lookbehind:!0,inside:{keyword:/\b(?:cmdextversion|defined|errorlevel|exist|not)\b|^if\b/i,string:r,parameter:n,variable:t,number:a,operator:/\^|==|\b(?:equ|geq|gtr|leq|lss|neq)\b/i}},{pattern:/((?:^|[&()])[ \t]*)else\b/im,lookbehind:!0,inside:{keyword:/^else\b/i}},{pattern:/((?:^|[&(])[ \t]*)set(?: \/[a-z](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0,inside:{keyword:/^set\b/i,string:r,parameter:n,variable:[t,/\w+(?=(?:[*\/%+\-&^|]|<<|>>)?=)/],number:a,operator:/[*\/%+\-&^|]=?|<<=?|>>=?|[!~_=]/,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*@?)\w+\b(?:"(?:[\\"]"|[^"])*"(?!")|[^"^&)\r\n]|\^(?:\r\n|[\s\S]))*/m,lookbehind:!0,inside:{keyword:/^\w+\b/,string:r,parameter:n,label:{pattern:/(^\s*):\S+/m,lookbehind:!0,alias:"property"},variable:t,number:a,operator:/\^/}}],operator:/[&@]/,punctuation:/[()']/}}function Td(e){e.languages.bbcode={tag:{pattern:/\[\/?[^\s=\]]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+))?(?:\s+[^\s=\]]+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+))*\s*\]/,inside:{tag:{pattern:/^\[\/?[^\s=\]]+/,inside:{punctuation:/^\[\/?/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+)/,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\]/,"attr-name":/[^\s=\]]+/}}},e.languages.shortcode=e.languages.bbcode}function Tp(e){e.languages.bbj={comment:{pattern:/(^|[^\\:])rem\s+.*/i,lookbehind:!0,greedy:!0},string:{pattern:/(['"])(?:(?!\1|\\).|\\.)*\1/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:abstract|all|argc|begin|bye|callback|case|chn|class|classend|ctl|day|declare|delete|dim|dom|dread|dsz|else|end|endif|err|exitto|extends|fi|field|for|from|gosub|goto|if|implements|interface|interfaceend|iol|iolist|let|list|load|method|methodend|methodret|on|opts|pfx|print|private|process_events|protected|psz|public|read|read_resource|release|remove_callback|repeat|restore|return|rev|seterr|setesc|sqlchn|sqlunt|ssn|start|static|swend|switch|sys|then|tim|unt|until|use|void|wend|where|while)\b/i,function:/\b\w+(?=\()/,boolean:/\b(?:BBjAPI\.TRUE|BBjAPI\.FALSE)\b/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:and|not|or|xor)\b/i,punctuation:/[.,;:()]/}}function Tm(e){e.languages.bicep={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],property:[{pattern:/([\r\n][ \t]*)[a-z_]\w*(?=[ \t]*:)/i,lookbehind:!0},{pattern:/([\r\n][ \t]*)'(?:\\.|\$(?!\{)|[^'\\\r\n$])*'(?=[ \t]*:)/,lookbehind:!0,greedy:!0}],string:[{pattern:/'''[^'][\s\S]*?'''/,greedy:!0},{pattern:/(^|[^\\'])'(?:\\.|\$(?!\{)|[^'\\\r\n$])*'/,lookbehind:!0,greedy:!0}],"interpolated-string":{pattern:/(^|[^\\'])'(?:\\.|\$(?:(?!\{)|\{[^{}\r\n]*\})|[^'\\\r\n$])*'/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/\$\{[^{}\r\n]*\}/,inside:{expression:{pattern:/(^\$\{)[\s\S]+(?=\}$)/,lookbehind:!0},punctuation:/^\$\{|\}$/}},string:/[\s\S]+/}},datatype:{pattern:/(\b(?:output|param)\b[ \t]+\w+[ \t]+)\w+\b/,lookbehind:!0,alias:"class-name"},boolean:/\b(?:false|true)\b/,keyword:/\b(?:existing|for|if|in|module|null|output|param|resource|targetScope|var)\b/,decorator:/@\w+\b/,function:/\b[a-z_]\w*(?=[ \t]*\()/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/,punctuation:/[{}[\];(),.:]/},e.languages.bicep["interpolated-string"].inside.interpolation.inside.expression.inside=e.languages.bicep}function Tf(e){e.register(vF),e.languages.birb=e.languages.extend("clike",{string:{pattern:/r?("|')(?:\\.|(?!\1)[^\\])*\1/,greedy:!0},"class-name":[/\b[A-Z](?:[\d_]*[a-zA-Z]\w*)?\b/,/\b(?:[A-Z]\w*|(?!(?:var|void)\b)[a-z]\w*)(?=\s+\w+\s*[;,=()])/],keyword:/\b(?:assert|break|case|class|const|default|else|enum|final|follows|for|grab|if|nest|new|next|noSeeb|return|static|switch|throw|var|void|while)\b/,operator:/\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?|:/,variable:/\b[a-z_]\w*\b/}),e.languages.insertBefore("birb","function",{metadata:{pattern:/<\w+>/,greedy:!0,alias:"symbol"}})}function Th(e){e.register(v0),e.languages.bison=e.languages.extend("c",{}),e.languages.insertBefore("bison","comment",{bison:{pattern:/^(?:[^%]|%(?!%))*%%[\s\S]*?%%/,inside:{c:{pattern:/%\{[\s\S]*?%\}|\{(?:\{[^}]*\}|[^{}])*\}/,inside:{delimiter:{pattern:/^%?\{|%?\}$/,alias:"punctuation"},"bison-variable":{pattern:/[$@](?:<[^\s>]+>)?[\w$]+/,alias:"variable",inside:{punctuation:/<|>/}},rest:e.languages.c}},comment:e.languages.c.comment,string:e.languages.c.string,property:/\S+(?=:)/,keyword:/%\w+/,number:{pattern:/(^|[^@])\b(?:0x[\da-f]+|\d+)/i,lookbehind:!0},punctuation:/%[%?]|[|:;\[\]<>]/}}})}function Tg(e){e.languages.bnf={string:{pattern:/"[^\r\n"]*"|'[^\r\n']*'/},definition:{pattern:/<[^<>\r\n\t]+>(?=\s*::=)/,alias:["rule","keyword"],inside:{punctuation:/^<|>$/}},rule:{pattern:/<[^<>\r\n\t]+>/,inside:{punctuation:/^<|>$/}},operator:/::=|[|()[\]{}*+?]|\.{3}/},e.languages.rbnf=e.languages.bnf}function Tb(e){e.languages.bqn={shebang:{pattern:/^#![ \t]*\/.*/,alias:"important",greedy:!0},comment:{pattern:/#.*/,greedy:!0},"string-literal":{pattern:/"(?:[^"]|"")*"/,greedy:!0,alias:"string"},"character-literal":{pattern:/'(?:[\s\S]|[\uD800-\uDBFF][\uDC00-\uDFFF])'/,greedy:!0,alias:"char"},function:/•[\w¯.∞π]+[\w¯.∞π]*/,"dot-notation-on-brackets":{pattern:/\{(?=.*\}\.)|\}\./,alias:"namespace"},"special-name":{pattern:/(?:𝕨|𝕩|𝕗|𝕘|𝕤|𝕣|𝕎|𝕏|𝔽|𝔾|𝕊|_𝕣_|_𝕣)/,alias:"keyword"},"dot-notation-on-name":{pattern:/[A-Za-z_][\w¯∞π]*\./,alias:"namespace"},"word-number-scientific":{pattern:/\d+(?:\.\d+)?[eE]¯?\d+/,alias:"number"},"word-name":{pattern:/[A-Za-z_][\w¯∞π]*/,alias:"symbol"},"word-number":{pattern:/[¯∞π]?(?:\d*\.?\b\d+(?:e[+¯]?\d+|E[+¯]?\d+)?|¯|∞|π)(?:j¯?(?:(?:\d+(?:\.\d+)?|\.\d+)(?:e[+¯]?\d+|E[+¯]?\d+)?|¯|∞|π))?/,alias:"number"},"null-literal":{pattern:/@/,alias:"char"},"primitive-functions":{pattern:/[-+×÷⋆√⌊⌈|¬∧∨<>≠=≤≥≡≢⊣⊢⥊∾≍⋈↑↓↕«»⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔!]/,alias:"operator"},"primitive-1-operators":{pattern:/[`˜˘¨⁼⌜´˝˙]/,alias:"operator"},"primitive-2-operators":{pattern:/[∘⊸⟜○⌾⎉⚇⍟⊘◶⎊]/,alias:"operator"},punctuation:/[←⇐↩(){}⟨⟩[\]‿·⋄,.;:?]/}}function Ty(e){e.languages.brainfuck={pointer:{pattern:/<|>/,alias:"keyword"},increment:{pattern:/\+/,alias:"inserted"},decrement:{pattern:/-/,alias:"deleted"},branching:{pattern:/\[|\]/,alias:"important"},operator:/[.,]/,comment:/\S+/}}function TE(e){e.languages.brightscript={comment:/(?:\brem|').*/i,"directive-statement":{pattern:/(^[\t ]*)#(?:const|else(?:[\t ]+if)?|end[\t ]+if|error|if).*/im,lookbehind:!0,alias:"property",inside:{"error-message":{pattern:/(^#error).+/,lookbehind:!0},directive:{pattern:/^#(?:const|else(?:[\t ]+if)?|end[\t ]+if|error|if)/,alias:"keyword"},expression:{pattern:/[\s\S]+/,inside:null}}},property:{pattern:/([\r\n{,][\t ]*)(?:(?!\d)\w+|"(?:[^"\r\n]|"")*"(?!"))(?=[ \t]*:)/,lookbehind:!0,greedy:!0},string:{pattern:/"(?:[^"\r\n]|"")*"(?!")/,greedy:!0},"class-name":{pattern:/(\bAs[\t ]+)\w+/i,lookbehind:!0},keyword:/\b(?:As|Dim|Each|Else|Elseif|End|Exit|For|Function|Goto|If|In|Print|Return|Step|Stop|Sub|Then|To|While)\b/i,boolean:/\b(?:false|true)\b/i,function:/\b(?!\d)\w+(?=[\t ]*\()/,number:/(?:\b\d+(?:\.\d+)?(?:[ed][+-]\d+)?|&h[a-f\d]+)\b[%&!#]?/i,operator:/--|\+\+|>>=?|<<=?|<>|[-+*/\\<>]=?|[:^=?]|\b(?:and|mod|not|or)\b/i,punctuation:/[.,;()[\]{}]/,constant:/\b(?:LINE_NUM)\b/i},e.languages.brightscript["directive-statement"].inside.expression.inside=e.languages.brightscript}function Tx(e){e.languages.bro={comment:{pattern:/(^|[^\\$])#.*/,lookbehind:!0,inside:{italic:/\b(?:FIXME|TODO|XXX)\b/}},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},boolean:/\b[TF]\b/,function:{pattern:/(\b(?:event|function|hook)[ \t]+)\w+(?:::\w+)?/,lookbehind:!0},builtin:/(?:@(?:load(?:-(?:plugin|sigs))?|unload|prefixes|ifn?def|else|(?:end)?if|DIR|FILENAME))|(?:&?(?:add_func|create_expire|default|delete_func|encrypt|error_handler|expire_func|group|log|mergeable|optional|persistent|priority|raw_output|read_expire|redef|rotate_interval|rotate_size|synchronized|type_column|write_expire))/,constant:{pattern:/(\bconst[ \t]+)\w+/i,lookbehind:!0},keyword:/\b(?:add|addr|alarm|any|bool|break|const|continue|count|delete|double|else|enum|event|export|file|for|function|global|hook|if|in|int|interval|local|module|next|of|opaque|pattern|port|print|record|return|schedule|set|string|subnet|table|time|timeout|using|vector|when)\b/,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&|\|\|?|\?|\*|\/|~|\^|%/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,punctuation:/[{}[\];(),.:]/}}function Tv(e){e.languages.bsl={comment:/\/\/.*/,string:[{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},{pattern:/'(?:[^'\r\n\\]|\\.)*'/}],keyword:[{pattern:/(^|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:пока|для|новый|прервать|попытка|исключение|вызватьисключение|иначе|конецпопытки|неопределено|функция|перем|возврат|конецфункции|если|иначеесли|процедура|конецпроцедуры|тогда|знач|экспорт|конецесли|из|каждого|истина|ложь|по|цикл|конеццикла|выполнить)(?![\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])/i,lookbehind:!0},{pattern:/\b(?:break|do|each|else|elseif|enddo|endfunction|endif|endprocedure|endtry|except|execute|export|false|for|function|if|in|new|null|procedure|raise|return|then|to|true|try|undefined|val|var|while)\b/i}],number:{pattern:/(^(?=\d)|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:\d+(?:\.\d*)?|\.\d+)(?:E[+-]?\d+)?/i,lookbehind:!0},operator:[/[<>+\-*/]=?|[%=]/,{pattern:/(^|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:и|или|не)(?![\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])/i,lookbehind:!0},{pattern:/\b(?:and|not|or)\b/i}],punctuation:/\(\.|\.\)|[()\[\]:;,.]/,directive:[{pattern:/^([ \t]*)&.*/m,lookbehind:!0,greedy:!0,alias:"important"},{pattern:/^([ \t]*)#.*/gm,lookbehind:!0,greedy:!0,alias:"important"}]},e.languages.oscript=e.languages.bsl}function TT(e){e.register(vF),e.languages.cfscript=e.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,inside:{annotation:{pattern:/(?:^|[^.])@[\w\.]+/,alias:"punctuation"}}},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],keyword:/\b(?:abstract|break|catch|component|continue|default|do|else|extends|final|finally|for|function|if|in|include|package|private|property|public|remote|required|rethrow|return|static|switch|throw|try|var|while|xml)\b(?!\s*=)/,operator:[/\+\+|--|&&|\|\||::|=>|[!=]==|[-+*/%&|^!=<>]=?|\?(?:\.|:)?|:/,/\b(?:and|contains|eq|equal|eqv|gt|gte|imp|is|lt|lte|mod|not|or|xor)\b/],scope:{pattern:/\b(?:application|arguments|cgi|client|cookie|local|session|super|this|variables)\b/,alias:"global"},type:{pattern:/\b(?:any|array|binary|boolean|date|guid|numeric|query|string|struct|uuid|void|xml)\b/,alias:"builtin"}}),e.languages.insertBefore("cfscript","keyword",{"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"}}),delete e.languages.cfscript["class-name"],e.languages.cfc=e.languages.cfscript}function TS(e){e.register(vF),e.register(v1),e.languages.chaiscript=e.languages.extend("clike",{string:{pattern:/(^|[^\\])'(?:[^'\\]|\\[\s\S])*'/,lookbehind:!0,greedy:!0},"class-name":[{pattern:/(\bclass\s+)\w+/,lookbehind:!0},{pattern:/(\b(?:attr|def)\s+)\w+(?=\s*::)/,lookbehind:!0}],keyword:/\b(?:attr|auto|break|case|catch|class|continue|def|default|else|finally|for|fun|global|if|return|switch|this|try|var|while)\b/,number:[e.languages.cpp.number,/\b(?:Infinity|NaN)\b/],operator:/>>=?|<<=?|\|\||&&|:[:=]?|--|\+\+|[=!<>+\-*/%|&^]=?|[?~]|`[^`\r\n]{1,4}`/}),e.languages.insertBefore("chaiscript","operator",{"parameter-type":{pattern:/([,(]\s*)\w+(?=\s+\w)/,lookbehind:!0,alias:"class-name"}}),e.languages.insertBefore("chaiscript","string",{"string-interpolation":{pattern:/(^|[^\\])"(?:[^"$\\]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*"/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\}/,lookbehind:!0,inside:{"interpolation-expression":{pattern:/(^\$\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.chaiscript},"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"}}},string:/[\s\S]+/}}})}function T_(e){e.languages.cil={comment:/\/\/.*/,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},directive:{pattern:/(^|\W)\.[a-z]+(?=\s)/,lookbehind:!0,alias:"class-name"},variable:/\[[\w\.]+\]/,keyword:/\b(?:abstract|ansi|assembly|auto|autochar|beforefieldinit|bool|bstr|byvalstr|catch|char|cil|class|currency|date|decimal|default|enum|error|explicit|extends|extern|famandassem|family|famorassem|final(?:ly)?|float32|float64|hidebysig|u?int(?:8|16|32|64)?|iant|idispatch|implements|import|initonly|instance|interface|iunknown|literal|lpstr|lpstruct|lptstr|lpwstr|managed|method|native(?:Type)?|nested|newslot|object(?:ref)?|pinvokeimpl|private|privatescope|public|reqsecobj|rtspecialname|runtime|sealed|sequential|serializable|specialname|static|string|struct|syschar|tbstr|unicode|unmanagedexp|unsigned|value(?:type)?|variant|virtual|void)\b/,function:/\b(?:(?:constrained|no|readonly|tail|unaligned|volatile)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.\d+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(?:i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.\d+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|castclass|ldvirtftn|beq(?:\.s)?|ckfinite|ldsflda|ldtoken|localloc|mkrefany|rethrow|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|cgt|ceq|box|and|or|br)\b/,boolean:/\b(?:false|true)\b/,number:/\b-?(?:0x[0-9a-f]+|\d+)(?:\.[0-9a-f]+)?\b/i,punctuation:/[{}[\];(),:=]|IL_[0-9A-Za-z]+/}}function Tk(e){e.register(v0),e.languages.cilkc=e.languages.insertBefore("c","function",{"parallel-keyword":{pattern:/\bcilk_(?:for|reducer|s(?:cope|pawn|ync))\b/,alias:"keyword"}}),e.languages["cilk-c"]=e.languages.cilkc}function Tw(e){e.register(v1),e.languages.cilkcpp=e.languages.insertBefore("cpp","function",{"parallel-keyword":{pattern:/\bcilk_(?:for|reducer|s(?:cope|pawn|ync))\b/,alias:"keyword"}}),e.languages["cilk-cpp"]=e.languages.cilkcpp,e.languages.cilk=e.languages.cilkcpp}function TA(e){e.languages.clojure={comment:{pattern:/;.*/,greedy:!0},string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},char:/\\\w+/,symbol:{pattern:/(^|[\s()\[\]{},])::?[\w*+!?'<>=/.-]+/,lookbehind:!0},keyword:{pattern:/(\()(?:-|->|->>|\.|\.\.|\*|\/|\+|<|<=|=|==|>|>=|accessor|agent|agent-errors|aget|alength|all-ns|alter|and|append-child|apply|array-map|aset|aset-boolean|aset-byte|aset-char|aset-double|aset-float|aset-int|aset-long|aset-short|assert|assoc|await|await-for|bean|binding|bit-and|bit-not|bit-or|bit-shift-left|bit-shift-right|bit-xor|boolean|branch\?|butlast|byte|cast|char|children|class|clear-agent-errors|comment|commute|comp|comparator|complement|concat|cond|conj|cons|constantly|construct-proxy|contains\?|count|create-ns|create-struct|cycle|dec|declare|def|def-|definline|definterface|defmacro|defmethod|defmulti|defn|defn-|defonce|defproject|defprotocol|defrecord|defstruct|deftype|deref|difference|disj|dissoc|distinct|do|doall|doc|dorun|doseq|dosync|dotimes|doto|double|down|drop|drop-while|edit|end\?|ensure|eval|every\?|false\?|ffirst|file-seq|filter|find|find-doc|find-ns|find-var|first|float|flush|fn|fnseq|for|frest|gensym|get|get-proxy-class|hash-map|hash-set|identical\?|identity|if|if-let|if-not|import|in-ns|inc|index|insert-child|insert-left|insert-right|inspect-table|inspect-tree|instance\?|int|interleave|intersection|into|into-array|iterate|join|key|keys|keyword|keyword\?|last|lazy-cat|lazy-cons|left|lefts|let|line-seq|list|list\*|load|load-file|locking|long|loop|macroexpand|macroexpand-1|make-array|make-node|map|map-invert|map\?|mapcat|max|max-key|memfn|merge|merge-with|meta|min|min-key|monitor-enter|name|namespace|neg\?|new|newline|next|nil\?|node|not|not-any\?|not-every\?|not=|ns|ns-imports|ns-interns|ns-map|ns-name|ns-publics|ns-refers|ns-resolve|ns-unmap|nth|nthrest|or|parse|partial|path|peek|pop|pos\?|pr|pr-str|print|print-str|println|println-str|prn|prn-str|project|proxy|proxy-mappings|quot|quote|rand|rand-int|range|re-find|re-groups|re-matcher|re-matches|re-pattern|re-seq|read|read-line|recur|reduce|ref|ref-set|refer|rem|remove|remove-method|remove-ns|rename|rename-keys|repeat|replace|replicate|resolve|rest|resultset-seq|reverse|rfirst|right|rights|root|rrest|rseq|second|select|select-keys|send|send-off|seq|seq-zip|seq\?|set|set!|short|slurp|some|sort|sort-by|sorted-map|sorted-map-by|sorted-set|special-symbol\?|split-at|split-with|str|string\?|struct|struct-map|subs|subvec|symbol|symbol\?|sync|take|take-nth|take-while|test|throw|time|to-array|to-array-2d|tree-seq|true\?|try|union|up|update-proxy|val|vals|var|var-get|var-set|var\?|vector|vector-zip|vector\?|when|when-first|when-let|when-not|with-local-vars|with-meta|with-open|with-out-str|xml-seq|xml-zip|zero\?|zipmap|zipper)(?=[\s)]|$)/,lookbehind:!0},boolean:/\b(?:false|nil|true)\b/,number:{pattern:/(^|[^\w$@])(?:\d+(?:[/.]\d+)?(?:e[+-]?\d+)?|0x[a-f0-9]+|[1-9]\d?r[a-z0-9]+)[lmn]?(?![\w$@])/i,lookbehind:!0},function:{pattern:/((?:^|[^'])\()[\w*+!?'<>=/.-]+(?=[\s)]|$)/,lookbehind:!0},operator:/[#@^`~]/,punctuation:/[{}\[\](),]/}}function TN(e){e.languages.cmake={comment:/#.*/,string:{pattern:/"(?:[^\\"]|\\.)*"/,greedy:!0,inside:{interpolation:{pattern:/\$\{(?:[^{}$]|\$\{[^{}$]*\})*\}/,inside:{punctuation:/\$\{|\}/,variable:/\w+/}}}},variable:/\b(?:CMAKE_\w+|\w+_(?:(?:BINARY|SOURCE)_DIR|DESCRIPTION|HOMEPAGE_URL|ROOT|VERSION(?:_MAJOR|_MINOR|_PATCH|_TWEAK)?)|(?:ANDROID|APPLE|BORLAND|BUILD_SHARED_LIBS|CACHE|CPACK_(?:ABSOLUTE_DESTINATION_FILES|COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY|ERROR_ON_ABSOLUTE_INSTALL_DESTINATION|INCLUDE_TOPLEVEL_DIRECTORY|INSTALL_DEFAULT_DIRECTORY_PERMISSIONS|INSTALL_SCRIPT|PACKAGING_INSTALL_PREFIX|SET_DESTDIR|WARN_ON_ABSOLUTE_INSTALL_DESTINATION)|CTEST_(?:BINARY_DIRECTORY|BUILD_COMMAND|BUILD_NAME|BZR_COMMAND|BZR_UPDATE_OPTIONS|CHANGE_ID|CHECKOUT_COMMAND|CONFIGURATION_TYPE|CONFIGURE_COMMAND|COVERAGE_COMMAND|COVERAGE_EXTRA_FLAGS|CURL_OPTIONS|CUSTOM_(?:COVERAGE_EXCLUDE|ERROR_EXCEPTION|ERROR_MATCH|ERROR_POST_CONTEXT|ERROR_PRE_CONTEXT|MAXIMUM_FAILED_TEST_OUTPUT_SIZE|MAXIMUM_NUMBER_OF_(?:ERRORS|WARNINGS)|MAXIMUM_PASSED_TEST_OUTPUT_SIZE|MEMCHECK_IGNORE|POST_MEMCHECK|POST_TEST|PRE_MEMCHECK|PRE_TEST|TESTS_IGNORE|WARNING_EXCEPTION|WARNING_MATCH)|CVS_CHECKOUT|CVS_COMMAND|CVS_UPDATE_OPTIONS|DROP_LOCATION|DROP_METHOD|DROP_SITE|DROP_SITE_CDASH|DROP_SITE_PASSWORD|DROP_SITE_USER|EXTRA_COVERAGE_GLOB|GIT_COMMAND|GIT_INIT_SUBMODULES|GIT_UPDATE_CUSTOM|GIT_UPDATE_OPTIONS|HG_COMMAND|HG_UPDATE_OPTIONS|LABELS_FOR_SUBPROJECTS|MEMORYCHECK_(?:COMMAND|COMMAND_OPTIONS|SANITIZER_OPTIONS|SUPPRESSIONS_FILE|TYPE)|NIGHTLY_START_TIME|P4_CLIENT|P4_COMMAND|P4_OPTIONS|P4_UPDATE_OPTIONS|RUN_CURRENT_SCRIPT|SCP_COMMAND|SITE|SOURCE_DIRECTORY|SUBMIT_URL|SVN_COMMAND|SVN_OPTIONS|SVN_UPDATE_OPTIONS|TEST_LOAD|TEST_TIMEOUT|TRIGGER_SITE|UPDATE_COMMAND|UPDATE_OPTIONS|UPDATE_VERSION_ONLY|USE_LAUNCHERS)|CYGWIN|ENV|EXECUTABLE_OUTPUT_PATH|GHS-MULTI|IOS|LIBRARY_OUTPUT_PATH|MINGW|MSVC(?:10|11|12|14|60|70|71|80|90|_IDE|_TOOLSET_VERSION|_VERSION)?|MSYS|PROJECT_NAME|UNIX|WIN32|WINCE|WINDOWS_PHONE|WINDOWS_STORE|XCODE))\b/,property:/\b(?:cxx_\w+|(?:ARCHIVE_OUTPUT_(?:DIRECTORY|NAME)|COMPILE_DEFINITIONS|COMPILE_PDB_NAME|COMPILE_PDB_OUTPUT_DIRECTORY|EXCLUDE_FROM_DEFAULT_BUILD|IMPORTED_(?:IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_LANGUAGES|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|NO_SONAME|OBJECTS|SONAME)|INTERPROCEDURAL_OPTIMIZATION|LIBRARY_OUTPUT_DIRECTORY|LIBRARY_OUTPUT_NAME|LINK_FLAGS|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|MAP_IMPORTED_CONFIG|OSX_ARCHITECTURES|OUTPUT_NAME|PDB_NAME|PDB_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_NAME|STATIC_LIBRARY_FLAGS|VS_CSHARP|VS_DOTNET_REFERENCEPROP|VS_DOTNET_REFERENCE|VS_GLOBAL_SECTION_POST|VS_GLOBAL_SECTION_PRE|VS_GLOBAL|XCODE_ATTRIBUTE)_\w+|\w+_(?:CLANG_TIDY|COMPILER_LAUNCHER|CPPCHECK|CPPLINT|INCLUDE_WHAT_YOU_USE|OUTPUT_NAME|POSTFIX|VISIBILITY_PRESET)|ABSTRACT|ADDITIONAL_MAKE_CLEAN_FILES|ADVANCED|ALIASED_TARGET|ALLOW_DUPLICATE_CUSTOM_TARGETS|ANDROID_(?:ANT_ADDITIONAL_OPTIONS|API|API_MIN|ARCH|ASSETS_DIRECTORIES|GUI|JAR_DEPENDENCIES|NATIVE_LIB_DEPENDENCIES|NATIVE_LIB_DIRECTORIES|PROCESS_MAX|PROGUARD|PROGUARD_CONFIG_PATH|SECURE_PROPS_PATH|SKIP_ANT_STEP|STL_TYPE)|ARCHIVE_OUTPUT_DIRECTORY|ATTACHED_FILES|ATTACHED_FILES_ON_FAIL|AUTOGEN_(?:BUILD_DIR|ORIGIN_DEPENDS|PARALLEL|SOURCE_GROUP|TARGETS_FOLDER|TARGET_DEPENDS)|AUTOMOC|AUTOMOC_(?:COMPILER_PREDEFINES|DEPEND_FILTERS|EXECUTABLE|MACRO_NAMES|MOC_OPTIONS|SOURCE_GROUP|TARGETS_FOLDER)|AUTORCC|AUTORCC_EXECUTABLE|AUTORCC_OPTIONS|AUTORCC_SOURCE_GROUP|AUTOUIC|AUTOUIC_EXECUTABLE|AUTOUIC_OPTIONS|AUTOUIC_SEARCH_PATHS|BINARY_DIR|BUILDSYSTEM_TARGETS|BUILD_RPATH|BUILD_RPATH_USE_ORIGIN|BUILD_WITH_INSTALL_NAME_DIR|BUILD_WITH_INSTALL_RPATH|BUNDLE|BUNDLE_EXTENSION|CACHE_VARIABLES|CLEAN_NO_CUSTOM|COMMON_LANGUAGE_RUNTIME|COMPATIBLE_INTERFACE_(?:BOOL|NUMBER_MAX|NUMBER_MIN|STRING)|COMPILE_(?:DEFINITIONS|FEATURES|FLAGS|OPTIONS|PDB_NAME|PDB_OUTPUT_DIRECTORY)|COST|CPACK_DESKTOP_SHORTCUTS|CPACK_NEVER_OVERWRITE|CPACK_PERMANENT|CPACK_STARTUP_SHORTCUTS|CPACK_START_MENU_SHORTCUTS|CPACK_WIX_ACL|CROSSCOMPILING_EMULATOR|CUDA_EXTENSIONS|CUDA_PTX_COMPILATION|CUDA_RESOLVE_DEVICE_SYMBOLS|CUDA_SEPARABLE_COMPILATION|CUDA_STANDARD|CUDA_STANDARD_REQUIRED|CXX_EXTENSIONS|CXX_STANDARD|CXX_STANDARD_REQUIRED|C_EXTENSIONS|C_STANDARD|C_STANDARD_REQUIRED|DEBUG_CONFIGURATIONS|DEFINE_SYMBOL|DEFINITIONS|DEPENDS|DEPLOYMENT_ADDITIONAL_FILES|DEPLOYMENT_REMOTE_DIRECTORY|DISABLED|DISABLED_FEATURES|ECLIPSE_EXTRA_CPROJECT_CONTENTS|ECLIPSE_EXTRA_NATURES|ENABLED_FEATURES|ENABLED_LANGUAGES|ENABLE_EXPORTS|ENVIRONMENT|EXCLUDE_FROM_ALL|EXCLUDE_FROM_DEFAULT_BUILD|EXPORT_NAME|EXPORT_PROPERTIES|EXTERNAL_OBJECT|EchoString|FAIL_REGULAR_EXPRESSION|FIND_LIBRARY_USE_LIB32_PATHS|FIND_LIBRARY_USE_LIB64_PATHS|FIND_LIBRARY_USE_LIBX32_PATHS|FIND_LIBRARY_USE_OPENBSD_VERSIONING|FIXTURES_CLEANUP|FIXTURES_REQUIRED|FIXTURES_SETUP|FOLDER|FRAMEWORK|Fortran_FORMAT|Fortran_MODULE_DIRECTORY|GENERATED|GENERATOR_FILE_NAME|GENERATOR_IS_MULTI_CONFIG|GHS_INTEGRITY_APP|GHS_NO_SOURCE_GROUP_FILE|GLOBAL_DEPENDS_DEBUG_MODE|GLOBAL_DEPENDS_NO_CYCLES|GNUtoMS|HAS_CXX|HEADER_FILE_ONLY|HELPSTRING|IMPLICIT_DEPENDS_INCLUDE_TRANSFORM|IMPORTED|IMPORTED_(?:COMMON_LANGUAGE_RUNTIME|CONFIGURATIONS|GLOBAL|IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_(?:LANGUAGES|LIBRARIES|MULTIPLICITY)|LOCATION|NO_SONAME|OBJECTS|SONAME)|IMPORT_PREFIX|IMPORT_SUFFIX|INCLUDE_DIRECTORIES|INCLUDE_REGULAR_EXPRESSION|INSTALL_NAME_DIR|INSTALL_RPATH|INSTALL_RPATH_USE_LINK_PATH|INTERFACE_(?:AUTOUIC_OPTIONS|COMPILE_DEFINITIONS|COMPILE_FEATURES|COMPILE_OPTIONS|INCLUDE_DIRECTORIES|LINK_DEPENDS|LINK_DIRECTORIES|LINK_LIBRARIES|LINK_OPTIONS|POSITION_INDEPENDENT_CODE|SOURCES|SYSTEM_INCLUDE_DIRECTORIES)|INTERPROCEDURAL_OPTIMIZATION|IN_TRY_COMPILE|IOS_INSTALL_COMBINED|JOB_POOLS|JOB_POOL_COMPILE|JOB_POOL_LINK|KEEP_EXTENSION|LABELS|LANGUAGE|LIBRARY_OUTPUT_DIRECTORY|LINKER_LANGUAGE|LINK_(?:DEPENDS|DEPENDS_NO_SHARED|DIRECTORIES|FLAGS|INTERFACE_LIBRARIES|INTERFACE_MULTIPLICITY|LIBRARIES|OPTIONS|SEARCH_END_STATIC|SEARCH_START_STATIC|WHAT_YOU_USE)|LISTFILE_STACK|LOCATION|MACOSX_BUNDLE|MACOSX_BUNDLE_INFO_PLIST|MACOSX_FRAMEWORK_INFO_PLIST|MACOSX_PACKAGE_LOCATION|MACOSX_RPATH|MACROS|MANUALLY_ADDED_DEPENDENCIES|MEASUREMENT|MODIFIED|NAME|NO_SONAME|NO_SYSTEM_FROM_IMPORTED|OBJECT_DEPENDS|OBJECT_OUTPUTS|OSX_ARCHITECTURES|OUTPUT_NAME|PACKAGES_FOUND|PACKAGES_NOT_FOUND|PARENT_DIRECTORY|PASS_REGULAR_EXPRESSION|PDB_NAME|PDB_OUTPUT_DIRECTORY|POSITION_INDEPENDENT_CODE|POST_INSTALL_SCRIPT|PREDEFINED_TARGETS_FOLDER|PREFIX|PRE_INSTALL_SCRIPT|PRIVATE_HEADER|PROCESSORS|PROCESSOR_AFFINITY|PROJECT_LABEL|PUBLIC_HEADER|REPORT_UNDEFINED_PROPERTIES|REQUIRED_FILES|RESOURCE|RESOURCE_LOCK|RULE_LAUNCH_COMPILE|RULE_LAUNCH_CUSTOM|RULE_LAUNCH_LINK|RULE_MESSAGES|RUNTIME_OUTPUT_DIRECTORY|RUN_SERIAL|SKIP_AUTOGEN|SKIP_AUTOMOC|SKIP_AUTORCC|SKIP_AUTOUIC|SKIP_BUILD_RPATH|SKIP_RETURN_CODE|SOURCES|SOURCE_DIR|SOVERSION|STATIC_LIBRARY_FLAGS|STATIC_LIBRARY_OPTIONS|STRINGS|SUBDIRECTORIES|SUFFIX|SYMBOLIC|TARGET_ARCHIVES_MAY_BE_SHARED_LIBS|TARGET_MESSAGES|TARGET_SUPPORTS_SHARED_LIBS|TESTS|TEST_INCLUDE_FILE|TEST_INCLUDE_FILES|TIMEOUT|TIMEOUT_AFTER_MATCH|TYPE|USE_FOLDERS|VALUE|VARIABLES|VERSION|VISIBILITY_INLINES_HIDDEN|VS_(?:CONFIGURATION_TYPE|COPY_TO_OUT_DIR|DEBUGGER_(?:COMMAND|COMMAND_ARGUMENTS|ENVIRONMENT|WORKING_DIRECTORY)|DEPLOYMENT_CONTENT|DEPLOYMENT_LOCATION|DOTNET_REFERENCES|DOTNET_REFERENCES_COPY_LOCAL|INCLUDE_IN_VSIX|IOT_STARTUP_TASK|KEYWORD|RESOURCE_GENERATOR|SCC_AUXPATH|SCC_LOCALPATH|SCC_PROJECTNAME|SCC_PROVIDER|SDK_REFERENCES|SHADER_(?:DISABLE_OPTIMIZATIONS|ENABLE_DEBUG|ENTRYPOINT|FLAGS|MODEL|OBJECT_FILE_NAME|OUTPUT_HEADER_FILE|TYPE|VARIABLE_NAME)|STARTUP_PROJECT|TOOL_OVERRIDE|USER_PROPS|WINRT_COMPONENT|WINRT_EXTENSIONS|WINRT_REFERENCES|XAML_TYPE)|WILL_FAIL|WIN32_EXECUTABLE|WINDOWS_EXPORT_ALL_SYMBOLS|WORKING_DIRECTORY|WRAP_EXCLUDE|XCODE_(?:EMIT_EFFECTIVE_PLATFORM_NAME|EXPLICIT_FILE_TYPE|FILE_ATTRIBUTES|LAST_KNOWN_FILE_TYPE|PRODUCT_TYPE|SCHEME_(?:ADDRESS_SANITIZER|ADDRESS_SANITIZER_USE_AFTER_RETURN|ARGUMENTS|DISABLE_MAIN_THREAD_CHECKER|DYNAMIC_LIBRARY_LOADS|DYNAMIC_LINKER_API_USAGE|ENVIRONMENT|EXECUTABLE|GUARD_MALLOC|MAIN_THREAD_CHECKER_STOP|MALLOC_GUARD_EDGES|MALLOC_SCRIBBLE|MALLOC_STACK|THREAD_SANITIZER(?:_STOP)?|UNDEFINED_BEHAVIOUR_SANITIZER(?:_STOP)?|ZOMBIE_OBJECTS))|XCTEST)\b/,keyword:/\b(?:add_compile_definitions|add_compile_options|add_custom_command|add_custom_target|add_definitions|add_dependencies|add_executable|add_library|add_link_options|add_subdirectory|add_test|aux_source_directory|break|build_command|build_name|cmake_host_system_information|cmake_minimum_required|cmake_parse_arguments|cmake_policy|configure_file|continue|create_test_sourcelist|ctest_build|ctest_configure|ctest_coverage|ctest_empty_binary_directory|ctest_memcheck|ctest_read_custom_files|ctest_run_script|ctest_sleep|ctest_start|ctest_submit|ctest_test|ctest_update|ctest_upload|define_property|else|elseif|enable_language|enable_testing|endforeach|endfunction|endif|endmacro|endwhile|exec_program|execute_process|export|export_library_dependencies|file|find_file|find_library|find_package|find_path|find_program|fltk_wrap_ui|foreach|function|get_cmake_property|get_directory_property|get_filename_component|get_property|get_source_file_property|get_target_property|get_test_property|if|include|include_directories|include_external_msproject|include_guard|include_regular_expression|install|install_files|install_programs|install_targets|link_directories|link_libraries|list|load_cache|load_command|macro|make_directory|mark_as_advanced|math|message|option|output_required_files|project|qt_wrap_cpp|qt_wrap_ui|remove|remove_definitions|return|separate_arguments|set|set_directory_properties|set_property|set_source_files_properties|set_target_properties|set_tests_properties|site_name|source_group|string|subdir_depends|subdirs|target_compile_definitions|target_compile_features|target_compile_options|target_include_directories|target_link_directories|target_link_libraries|target_link_options|target_sources|try_compile|try_run|unset|use_mangled_mesa|utility_source|variable_requires|variable_watch|while|write_file)(?=\s*\()\b/,boolean:/\b(?:FALSE|OFF|ON|TRUE)\b/,namespace:/\b(?:INTERFACE|PRIVATE|PROPERTIES|PUBLIC|SHARED|STATIC|TARGET_OBJECTS)\b/,operator:/\b(?:AND|DEFINED|EQUAL|GREATER|LESS|MATCHES|NOT|OR|STREQUAL|STRGREATER|STRLESS|VERSION_EQUAL|VERSION_GREATER|VERSION_LESS)\b/,inserted:{pattern:/\b\w+::\w+\b/,alias:"class-name"},number:/\b\d+(?:\.\d+)*\b/,function:/\b[a-z_]\w*(?=\s*\()\b/i,punctuation:/[()>}]|\$[<{]/}}function TI(e){e.languages.cobol={comment:{pattern:/\*>.*|(^[ \t]*)\*.*/m,lookbehind:!0,greedy:!0},string:{pattern:/[xzgn]?(?:"(?:[^\r\n"]|"")*"(?!")|'(?:[^\r\n']|'')*'(?!'))/i,greedy:!0},level:{pattern:/(^[ \t]*)\d+\b/m,lookbehind:!0,greedy:!0,alias:"number"},"class-name":{pattern:/(\bpic(?:ture)?\s+)(?:(?:[-\w$/,:*+<>]|\.(?!\s|$))(?:\(\d+\))?)+/i,lookbehind:!0,inside:{number:{pattern:/(\()\d+/,lookbehind:!0},punctuation:/[()]/}},keyword:{pattern:/(^|[^\w-])(?:ABORT|ACCEPT|ACCESS|ADD|ADDRESS|ADVANCING|AFTER|ALIGNED|ALL|ALPHABET|ALPHABETIC|ALPHABETIC-LOWER|ALPHABETIC-UPPER|ALPHANUMERIC|ALPHANUMERIC-EDITED|ALSO|ALTER|ALTERNATE|ANY|ARE|AREA|AREAS|AS|ASCENDING|ASCII|ASSIGN|ASSOCIATED-DATA|ASSOCIATED-DATA-LENGTH|AT|ATTRIBUTE|AUTHOR|AUTO|AUTO-SKIP|BACKGROUND-COLOR|BACKGROUND-COLOUR|BASIS|BEEP|BEFORE|BEGINNING|BELL|BINARY|BIT|BLANK|BLINK|BLOCK|BOTTOM|BOUNDS|BY|BYFUNCTION|BYTITLE|CALL|CANCEL|CAPABLE|CCSVERSION|CD|CF|CH|CHAINING|CHANGED|CHANNEL|CHARACTER|CHARACTERS|CLASS|CLASS-ID|CLOCK-UNITS|CLOSE|CLOSE-DISPOSITION|COBOL|CODE|CODE-SET|COL|COLLATING|COLUMN|COM-REG|COMMA|COMMITMENT|COMMON|COMMUNICATION|COMP|COMP-1|COMP-2|COMP-3|COMP-4|COMP-5|COMPUTATIONAL|COMPUTATIONAL-1|COMPUTATIONAL-2|COMPUTATIONAL-3|COMPUTATIONAL-4|COMPUTATIONAL-5|COMPUTE|CONFIGURATION|CONTAINS|CONTENT|CONTINUE|CONTROL|CONTROL-POINT|CONTROLS|CONVENTION|CONVERTING|COPY|CORR|CORRESPONDING|COUNT|CRUNCH|CURRENCY|CURSOR|DATA|DATA-BASE|DATE|DATE-COMPILED|DATE-WRITTEN|DAY|DAY-OF-WEEK|DBCS|DE|DEBUG-CONTENTS|DEBUG-ITEM|DEBUG-LINE|DEBUG-NAME|DEBUG-SUB-1|DEBUG-SUB-2|DEBUG-SUB-3|DEBUGGING|DECIMAL-POINT|DECLARATIVES|DEFAULT|DEFAULT-DISPLAY|DEFINITION|DELETE|DELIMITED|DELIMITER|DEPENDING|DESCENDING|DESTINATION|DETAIL|DFHRESP|DFHVALUE|DISABLE|DISK|DISPLAY|DISPLAY-1|DIVIDE|DIVISION|DONTCARE|DOUBLE|DOWN|DUPLICATES|DYNAMIC|EBCDIC|EGCS|EGI|ELSE|EMI|EMPTY-CHECK|ENABLE|END|END-ACCEPT|END-ADD|END-CALL|END-COMPUTE|END-DELETE|END-DIVIDE|END-EVALUATE|END-IF|END-MULTIPLY|END-OF-PAGE|END-PERFORM|END-READ|END-RECEIVE|END-RETURN|END-REWRITE|END-SEARCH|END-START|END-STRING|END-SUBTRACT|END-UNSTRING|END-WRITE|ENDING|ENTER|ENTRY|ENTRY-PROCEDURE|ENVIRONMENT|EOL|EOP|EOS|ERASE|ERROR|ESCAPE|ESI|EVALUATE|EVENT|EVERY|EXCEPTION|EXCLUSIVE|EXHIBIT|EXIT|EXPORT|EXTEND|EXTENDED|EXTERNAL|FD|FILE|FILE-CONTROL|FILLER|FINAL|FIRST|FOOTING|FOR|FOREGROUND-COLOR|FOREGROUND-COLOUR|FROM|FULL|FUNCTION|FUNCTION-POINTER|FUNCTIONNAME|GENERATE|GIVING|GLOBAL|GO|GOBACK|GRID|GROUP|HEADING|HIGH-VALUE|HIGH-VALUES|HIGHLIGHT|I-O|I-O-CONTROL|ID|IDENTIFICATION|IF|IMPLICIT|IMPORT|IN|INDEX|INDEXED|INDICATE|INITIAL|INITIALIZE|INITIATE|INPUT|INPUT-OUTPUT|INSPECT|INSTALLATION|INTEGER|INTO|INVALID|INVOKE|IS|JUST|JUSTIFIED|KANJI|KEPT|KEY|KEYBOARD|LABEL|LANGUAGE|LAST|LB|LD|LEADING|LEFT|LEFTLINE|LENGTH|LENGTH-CHECK|LIBACCESS|LIBPARAMETER|LIBRARY|LIMIT|LIMITS|LINAGE|LINAGE-COUNTER|LINE|LINE-COUNTER|LINES|LINKAGE|LIST|LOCAL|LOCAL-STORAGE|LOCK|LONG-DATE|LONG-TIME|LOW-VALUE|LOW-VALUES|LOWER|LOWLIGHT|MEMORY|MERGE|MESSAGE|MMDDYYYY|MODE|MODULES|MORE-LABELS|MOVE|MULTIPLE|MULTIPLY|NAMED|NATIONAL|NATIONAL-EDITED|NATIVE|NEGATIVE|NETWORK|NEXT|NO|NO-ECHO|NULL|NULLS|NUMBER|NUMERIC|NUMERIC-DATE|NUMERIC-EDITED|NUMERIC-TIME|OBJECT-COMPUTER|OCCURS|ODT|OF|OFF|OMITTED|ON|OPEN|OPTIONAL|ORDER|ORDERLY|ORGANIZATION|OTHER|OUTPUT|OVERFLOW|OVERLINE|OWN|PACKED-DECIMAL|PADDING|PAGE|PAGE-COUNTER|PASSWORD|PERFORM|PF|PH|PIC|PICTURE|PLUS|POINTER|PORT|POSITION|POSITIVE|PRINTER|PRINTING|PRIVATE|PROCEDURE|PROCEDURE-POINTER|PROCEDURES|PROCEED|PROCESS|PROGRAM|PROGRAM-ID|PROGRAM-LIBRARY|PROMPT|PURGE|QUEUE|QUOTE|QUOTES|RANDOM|RD|READ|READER|REAL|RECEIVE|RECEIVED|RECORD|RECORDING|RECORDS|RECURSIVE|REDEFINES|REEL|REF|REFERENCE|REFERENCES|RELATIVE|RELEASE|REMAINDER|REMARKS|REMOTE|REMOVAL|REMOVE|RENAMES|REPLACE|REPLACING|REPORT|REPORTING|REPORTS|REQUIRED|RERUN|RESERVE|RESET|RETURN|RETURN-CODE|RETURNING|REVERSE-VIDEO|REVERSED|REWIND|REWRITE|RF|RH|RIGHT|ROUNDED|RUN|SAME|SAVE|SCREEN|SD|SEARCH|SECTION|SECURE|SECURITY|SEGMENT|SEGMENT-LIMIT|SELECT|SEND|SENTENCE|SEPARATE|SEQUENCE|SEQUENTIAL|SET|SHARED|SHAREDBYALL|SHAREDBYRUNUNIT|SHARING|SHIFT-IN|SHIFT-OUT|SHORT-DATE|SIGN|SIZE|SORT|SORT-CONTROL|SORT-CORE-SIZE|SORT-FILE-SIZE|SORT-MERGE|SORT-MESSAGE|SORT-MODE-SIZE|SORT-RETURN|SOURCE|SOURCE-COMPUTER|SPACE|SPACES|SPECIAL-NAMES|STANDARD|STANDARD-1|STANDARD-2|START|STATUS|STOP|STRING|SUB-QUEUE-1|SUB-QUEUE-2|SUB-QUEUE-3|SUBTRACT|SUM|SUPPRESS|SYMBOL|SYMBOLIC|SYNC|SYNCHRONIZED|TABLE|TALLY|TALLYING|TAPE|TASK|TERMINAL|TERMINATE|TEST|TEXT|THEN|THREAD|THREAD-LOCAL|THROUGH|THRU|TIME|TIMER|TIMES|TITLE|TO|TODAYS-DATE|TODAYS-NAME|TOP|TRAILING|TRUNCATED|TYPE|TYPEDEF|UNDERLINE|UNIT|UNSTRING|UNTIL|UP|UPON|USAGE|USE|USING|VALUE|VALUES|VARYING|VIRTUAL|WAIT|WHEN|WHEN-COMPILED|WITH|WORDS|WORKING-STORAGE|WRITE|YEAR|YYYYDDD|YYYYMMDD|ZERO-FILL|ZEROES|ZEROS)(?![\w-])/i,lookbehind:!0},boolean:{pattern:/(^|[^\w-])(?:false|true)(?![\w-])/i,lookbehind:!0},number:{pattern:/(^|[^\w-])(?:[+-]?(?:(?:\d+(?:[.,]\d+)?|[.,]\d+)(?:e[+-]?\d+)?|zero))(?![\w-])/i,lookbehind:!0},operator:[/<>|[<>]=?|[=+*/&]/,{pattern:/(^|[^\w-])(?:-|and|equal|greater|less|not|or|than)(?![\w-])/i,lookbehind:!0}],punctuation:/[.:,()]/}}function TC(e){var t,n;e.register(vB),t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"},e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}function TR(e){e.languages.concurnas={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\/\/.*)/,lookbehind:!0,greedy:!0},langext:{pattern:/\b\w+\s*\|\|[\s\S]+?\|\|/,greedy:!0,inside:{"class-name":/^\w+/,string:{pattern:/(^\s*\|\|)[\s\S]+(?=\|\|$)/,lookbehind:!0},punctuation:/\|\|/}},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/,lookbehind:!0},keyword:/\b(?:abstract|actor|also|annotation|assert|async|await|bool|boolean|break|byte|case|catch|changed|char|class|closed|constant|continue|def|default|del|double|elif|else|enum|every|extends|false|finally|float|for|from|global|gpudef|gpukernel|if|import|in|init|inject|int|lambda|local|long|loop|match|new|nodefault|null|of|onchange|open|out|override|package|parfor|parforsync|post|pre|private|protected|provide|provider|public|return|shared|short|single|size_t|sizeof|super|sync|this|throw|trait|trans|transient|true|try|typedef|unchecked|using|val|var|void|while|with)\b/,boolean:/\b(?:false|true)\b/,number:/\b0b[01][01_]*L?\b|\b0x(?:[\da-f_]*\.)?[\da-f_p+-]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfls]?/i,punctuation:/[{}[\];(),.:]/,operator:/<==|>==|=>|->|<-|<>|&==|&<>|\?:?|\.\?|\+\+|--|[-+*/=<>]=?|[!^~]|\b(?:and|as|band|bor|bxor|comp|is|isnot|mod|or)\b=?/,annotation:{pattern:/@(?:\w+:)?(?:\w+|\[[^\]]+\])?/,alias:"builtin"}},e.languages.insertBefore("concurnas","langext",{"regex-literal":{pattern:/\br("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:e.languages.concurnas},regex:/[\s\S]+/}},"string-literal":{pattern:/(?:\B|\bs)("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:e.languages.concurnas},string:/[\s\S]+/}}}),e.languages.conc=e.languages.concurnas}function TO(e){function t(e){return RegExp(/([ \t])/.source+"(?:"+e+")"+/(?=[\s;]|$)/.source,"i")}e.languages.csp={directive:{pattern:/(^|[\s;])(?:base-uri|block-all-mixed-content|(?:child|connect|default|font|frame|img|manifest|media|object|prefetch|script|style|worker)-src|disown-opener|form-action|frame-(?:ancestors|options)|input-protection(?:-(?:clip|selectors))?|navigate-to|plugin-types|policy-uri|referrer|reflected-xss|report-(?:to|uri)|require-sri-for|sandbox|(?:script|style)-src-(?:attr|elem)|upgrade-insecure-requests)(?=[\s;]|$)/i,lookbehind:!0,alias:"property"},scheme:{pattern:t(/[a-z][a-z0-9.+-]*:/.source),lookbehind:!0},none:{pattern:t(/'none'/.source),lookbehind:!0,alias:"keyword"},nonce:{pattern:t(/'nonce-[-+/\w=]+'/.source),lookbehind:!0,alias:"number"},hash:{pattern:t(/'sha(?:256|384|512)-[-+/\w=]+'/.source),lookbehind:!0,alias:"number"},host:{pattern:t(/[a-z][a-z0-9.+-]*:\/\/[^\s;,']*/.source+"|"+/\*[^\s;,']*/.source+"|"+/[a-z0-9-]+(?:\.[a-z0-9-]+)+(?::[\d*]+)?(?:\/[^\s;,']*)?/.source),lookbehind:!0,alias:"url",inside:{important:/\*/}},keyword:[{pattern:t(/'unsafe-[a-z-]+'/.source),lookbehind:!0,alias:"unsafe"},{pattern:t(/'[a-z-]+'/.source),lookbehind:!0,alias:"safe"}],punctuation:/;/}}function TD(e){var t,n,r,a;t=/(?:(?!\s)[\d$+<=a-zA-Z\x80-\uFFFF])+/.source,r=(n=/[^{}@#]+/.source)+/\{[^}#@]*\}/.source,a=/(?:h|hours|hrs|m|min|minutes)/.source,e.languages.cooklang={comment:{pattern:/\[-[\s\S]*?-\]|--.*/,greedy:!0},meta:{pattern:/>>.*:.*/,inside:{property:{pattern:/(>>\s*)[^\s:](?:[^:]*[^\s:])?/,lookbehind:!0}}},"cookware-group":{pattern:RegExp("#(?:"+r+"|"+t+")"),inside:{cookware:{pattern:RegExp("(^#)(?:"+n+")"),lookbehind:!0,alias:"variable"},"cookware-keyword":{pattern:/^#/,alias:"keyword"},"quantity-group":{pattern:new RegExp(/\{[^{}@#]*\}/),inside:{quantity:{pattern:new RegExp(/(^\{)/.source+n),lookbehind:!0,alias:"number"},punctuation:/[{}]/}}}},"ingredient-group":{pattern:RegExp("@(?:"+r+"|"+t+")"),inside:{ingredient:{pattern:RegExp("(^@)(?:"+n+")"),lookbehind:!0,alias:"variable"},"ingredient-keyword":{pattern:/^@/,alias:"keyword"},"amount-group":{pattern:/\{[^{}]*\}/,inside:{amount:{pattern:/([\{|])[^{}|*%]+/,lookbehind:!0,alias:"number"},unit:{pattern:/(%)[^}]+/,lookbehind:!0,alias:"symbol"},"servings-scaler":{pattern:/\*/,alias:"operator"},"servings-alternative-separator":{pattern:/\|/,alias:"operator"},"unit-separator":{pattern:/(?:%|(\*)%)/,lookbehind:!0,alias:"operator"},punctuation:/[{}]/}}}},"timer-group":{pattern:/~(?!\s)[^@#~{}]*\{[^{}]*\}/,inside:{timer:{pattern:/(^~)[^{]+/,lookbehind:!0,alias:"variable"},"duration-group":{pattern:/\{[^{}]*\}/,inside:{punctuation:/[{}]/,unit:{pattern:new RegExp(/(%\s*)/.source+a+/\b/.source),lookbehind:!0,alias:"symbol"},operator:/%/,duration:{pattern:/\d+/,alias:"number"}}},"timer-keyword":{pattern:/^~/,alias:"keyword"}}}}}function TL(e){for(var t=/\(\*(?:[^(*]|\((?!\*)|\*(?!\))|<self>)*\*\)/.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,"[]"),e.languages.coq={comment:RegExp(t),string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},attribute:[{pattern:RegExp(/#\[(?:[^\[\]("]|"(?:[^"]|"")*"(?!")|\((?!\*)|<comment>)*\]/.source.replace(/<comment>/g,function(){return t})),greedy:!0,alias:"attr-name",inside:{comment:RegExp(t),string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},operator:/=/,punctuation:/^#\[|\]$|[,()]/}},{pattern:/\b(?:Cumulative|Global|Local|Monomorphic|NonCumulative|Polymorphic|Private|Program)\b/,alias:"attr-name"}],keyword:/\b(?:Abort|About|Add|Admit|Admitted|All|Arguments|As|Assumptions|Axiom|Axioms|Back|BackTo|Backtrace|BinOp|BinOpSpec|BinRel|Bind|Blacklist|Canonical|Case|Cd|Check|Class|Classes|Close|CoFixpoint|CoInductive|Coercion|Coercions|Collection|Combined|Compute|Conjecture|Conjectures|Constant|Constants|Constraint|Constructors|Context|Corollary|Create|CstOp|Custom|Cut|Debug|Declare|Defined|Definition|Delimit|Dependencies|Dependent|Derive|Diffs|Drop|Elimination|End|Entry|Equality|Eval|Example|Existential|Existentials|Existing|Export|Extern|Extraction|Fact|Fail|Field|File|Firstorder|Fixpoint|Flags|Focus|From|Funclass|Function|Functional|GC|Generalizable|Goal|Grab|Grammar|Graph|Guarded|Haskell|Heap|Hide|Hint|HintDb|Hints|Hypotheses|Hypothesis|IF|Identity|Immediate|Implicit|Implicits|Import|Include|Induction|Inductive|Infix|Info|Initial|InjTyp|Inline|Inspect|Instance|Instances|Intro|Intros|Inversion|Inversion_clear|JSON|Language|Left|Lemma|Let|Lia|Libraries|Library|Load|LoadPath|Locate|Ltac|Ltac2|ML|Match|Method|Minimality|Module|Modules|Morphism|Next|NoInline|Notation|Number|OCaml|Obligation|Obligations|Opaque|Open|Optimize|Parameter|Parameters|Parametric|Path|Paths|Prenex|Preterm|Primitive|Print|Profile|Projections|Proof|Prop|PropBinOp|PropOp|PropUOp|Property|Proposition|Pwd|Qed|Quit|Rec|Record|Recursive|Redirect|Reduction|Register|Relation|Remark|Remove|Require|Reserved|Reset|Resolve|Restart|Rewrite|Right|Ring|Rings|SProp|Saturate|Save|Scheme|Scope|Scopes|Search|SearchHead|SearchPattern|SearchRewrite|Section|Separate|Set|Setoid|Show|Signatures|Solve|Solver|Sort|Sortclass|Sorted|Spec|Step|Strategies|Strategy|String|Structure|SubClass|Subgraph|SuchThat|Tactic|Term|TestCompile|Theorem|Time|Timeout|To|Transparent|Type|Typeclasses|Types|Typing|UnOp|UnOpSpec|Undelimit|Undo|Unfocus|Unfocused|Unfold|Universe|Universes|Unshelve|Variable|Variables|Variant|Verbose|View|Visibility|Zify|_|apply|as|at|by|cofix|else|end|exists|exists2|fix|for|forall|fun|if|in|let|match|measure|move|removed|return|struct|then|using|wf|where|with)\b/,number:/\b(?:0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]+)?(?:p[+-]?\d[\d_]*)?|\d[\d_]*(?:\.[\d_]+)?(?:e[+-]?\d[\d_]*)?)\b/i,punct:{pattern:/@\{|\{\||\[=|:>/,alias:"punctuation"},operator:/\/\\|\\\/|\.{2,3}|:{1,2}=|\*\*|[-=]>|<(?:->?|[+:=>]|<:)|>(?:=|->)|\|[-|]?|[-!%&*+/<=>?@^~']/,punctuation:/\.\(|`\(|@\{|`\{|\{\||\[=|:>|[:.,;(){}\[\]]/}}function TM(e){var t,n,r;e.register(vF),e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}},delete e.languages.ruby.function,n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source,e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}function TP(e){e.register(TM),e.languages.crystal=e.languages.extend("ruby",{keyword:[/\b(?:__DIR__|__END_LINE__|__FILE__|__LINE__|abstract|alias|annotation|as|asm|begin|break|case|class|def|do|else|elsif|end|ensure|enum|extend|for|fun|if|ifdef|include|instance_sizeof|lib|macro|module|next|of|out|pointerof|private|protected|ptr|require|rescue|return|select|self|sizeof|struct|super|then|type|typeof|undef|uninitialized|union|unless|until|when|while|with|yield)\b/,{pattern:/(\.\s*)(?:is_a|responds_to)\?/,lookbehind:!0}],number:/\b(?:0b[01_]*[01]|0o[0-7_]*[0-7]|0x[\da-fA-F_]*[\da-fA-F]|(?:\d(?:[\d_]*\d)?)(?:\.[\d_]*\d)?(?:[eE][+-]?[\d_]*\d)?)(?:_(?:[uif](?:8|16|32|64))?)?\b/,operator:[/->/,e.languages.ruby.operator],punctuation:/[(){}[\].,;\\]/}),e.languages.insertBefore("crystal","string-literal",{attribute:{pattern:/@\[.*?\]/,inside:{delimiter:{pattern:/^@\[|\]$/,alias:"punctuation"},attribute:{pattern:/^(\s*)\w+/,lookbehind:!0,alias:"class-name"},args:{pattern:/\S(?:[\s\S]*\S)?/,inside:e.languages.crystal}}},expansion:{pattern:/\{(?:\{.*?\}|%.*?%)\}/,inside:{content:{pattern:/^(\{.)[\s\S]+(?=.\}$)/,lookbehind:!0,inside:e.languages.crystal},delimiter:{pattern:/^\{[\{%]|[\}%]\}$/,alias:"operator"}}},char:{pattern:/'(?:[^\\\r\n]{1,2}|\\(?:.|u(?:[A-Fa-f0-9]{1,4}|\{[A-Fa-f0-9]{1,6}\})))'/,greedy:!0}})}function Tj(e){var t,n,r,a;e.register(vj),n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),r={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},a={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:a,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:a})}function TF(e){e.languages.csv={value:/[^\r\n,"]+|"(?:[^"]|"")*"(?!")/,punctuation:/,/}}function TU(e){var t,n;t=/\\(?:(?!\2)|\2(?:[^()\r\n]|\([^()]*\)))/.source,n="(?:"+(/"""(?:[^\\"]|"(?!""\2)|<esc>)*"""/.source+"|"+/'''(?:[^\\']|'(?!''\2)|<esc>)*'''/.source+"|"+/"(?:[^\\\r\n"]|"(?!\2)|<esc>)*"/.source+"|"+/'(?:[^\\\r\n']|'(?!\2)|<esc>)*'/.source).replace(/<esc>/g,t)+")",e.languages.cue={comment:{pattern:/\/\/.*/,greedy:!0},"string-literal":{pattern:RegExp(/(^|[^#"'\\])(#*)/.source+n+/(?!["'])\2/.source),lookbehind:!0,greedy:!0,inside:{escape:{pattern:/(?=[\s\S]*["'](#*)$)\\\1(?:U[a-fA-F0-9]{1,8}|u[a-fA-F0-9]{1,4}|x[a-fA-F0-9]{1,2}|\d{2,3}|[^(])/,greedy:!0,alias:"string"},interpolation:{pattern:/(?=[\s\S]*["'](#*)$)\\\1\([^()]*\)/,greedy:!0,inside:{punctuation:/^\\#*\(|\)$/,expression:{pattern:/[\s\S]+/,inside:null}}},string:/[\s\S]+/}},keyword:{pattern:/(^|[^\w$])(?:for|if|import|in|let|null|package)(?![\w$])/,lookbehind:!0},boolean:{pattern:/(^|[^\w$])(?:false|true)(?![\w$])/,lookbehind:!0},builtin:{pattern:/(^|[^\w$])(?:bool|bytes|float|float(?:32|64)|u?int(?:8|16|32|64|128)?|number|rune|string)(?![\w$])/,lookbehind:!0},attribute:{pattern:/@[\w$]+(?=\s*\()/,alias:"function"},function:{pattern:/(^|[^\w$])[a-z_$][\w$]*(?=\s*\()/i,lookbehind:!0},number:{pattern:/(^|[^\w$.])(?:0b[01]+(?:_[01]+)*|0o[0-7]+(?:_[0-7]+)*|0[xX][0-9A-Fa-f]+(?:_[0-9A-Fa-f]+)*|(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[eE][+-]?\d+(?:_\d+)*)?(?:[KMGTP]i?)?)(?![\w$])/,lookbehind:!0},operator:/\.{3}|_\|_|&&?|\|\|?|[=!]~|[<>=!]=?|[+\-*/?]/,punctuation:/[()[\]{},.:]/},e.languages.cue["string-literal"].inside.interpolation.inside.expression.inside=e.languages.cue}function TB(e){e.languages.cypher={comment:/\/\/.*/,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/,greedy:!0},"class-name":{pattern:/(:\s*)(?:\w+|`(?:[^`\\\r\n])*`)(?=\s*[{):])/,lookbehind:!0,greedy:!0},relationship:{pattern:/(-\[\s*(?:\w+\s*|`(?:[^`\\\r\n])*`\s*)?:\s*|\|\s*:\s*)(?:\w+|`(?:[^`\\\r\n])*`)/,lookbehind:!0,greedy:!0,alias:"property"},identifier:{pattern:/`(?:[^`\\\r\n])*`/,greedy:!0},variable:/\$\w+/,keyword:/\b(?:ADD|ALL|AND|AS|ASC|ASCENDING|ASSERT|BY|CALL|CASE|COMMIT|CONSTRAINT|CONTAINS|CREATE|CSV|DELETE|DESC|DESCENDING|DETACH|DISTINCT|DO|DROP|ELSE|END|ENDS|EXISTS|FOR|FOREACH|IN|INDEX|IS|JOIN|KEY|LIMIT|LOAD|MANDATORY|MATCH|MERGE|NODE|NOT|OF|ON|OPTIONAL|OR|ORDER(?=\s+BY)|PERIODIC|REMOVE|REQUIRE|RETURN|SCALAR|SCAN|SET|SKIP|START|STARTS|THEN|UNION|UNIQUE|UNWIND|USING|WHEN|WHERE|WITH|XOR|YIELD)\b/i,function:/\b\w+\b(?=\s*\()/,boolean:/\b(?:false|null|true)\b/i,number:/\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)\b/,operator:/:|<--?|--?>?|<>|=~?|[<>]=?|[+*/%^|]|\.\.\.?/,punctuation:/[()[\]{},;.]/}}function Tz(e){e.register(vF),e.languages.d=e.languages.extend("clike",{comment:[{pattern:/^\s*#!.+/,greedy:!0},{pattern:RegExp(/(^|[^\\])/.source+"(?:"+[/\/\+(?:\/\+(?:[^+]|\+(?!\/))*\+\/|(?!\/\+)[\s\S])*?\+\//.source,/\/\/.*/.source,/\/\*[\s\S]*?\*\//.source].join("|")+")"),lookbehind:!0,greedy:!0}],string:[{pattern:RegExp([/\b[rx]"(?:\\[\s\S]|[^\\"])*"[cwd]?/.source,/\bq"(?:\[[\s\S]*?\]|\([\s\S]*?\)|<[\s\S]*?>|\{[\s\S]*?\})"/.source,/\bq"((?!\d)\w+)$[\s\S]*?^\1"/.source,/\bq"(.)[\s\S]*?\2"/.source,/(["`])(?:\\[\s\S]|(?!\3)[^\\])*\3[cwd]?/.source].join("|"),"m"),greedy:!0},{pattern:/\bq\{(?:\{[^{}]*\}|[^{}])*\}/,greedy:!0,alias:"token-string"}],keyword:/\$|\b(?:__(?:(?:DATE|EOF|FILE|FUNCTION|LINE|MODULE|PRETTY_FUNCTION|TIMESTAMP|TIME|VENDOR|VERSION)__|gshared|parameters|traits|vector)|abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|dstring|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|inout|int|interface|invariant|ireal|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|ptrdiff_t|public|pure|real|ref|return|scope|shared|short|size_t|static|string|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|wstring)\b/,number:[/\b0x\.?[a-f\d_]+(?:(?!\.\.)\.[a-f\d_]*)?(?:p[+-]?[a-f\d_]+)?[ulfi]{0,4}/i,{pattern:/((?:\.\.)?)(?:\b0b\.?|\b|\.)\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:e[+-]?\d[\d_]*)?[ulfi]{0,4}/i,lookbehind:!0}],operator:/\|[|=]?|&[&=]?|\+[+=]?|-[-=]?|\.?\.\.|=[>=]?|!(?:i[ns]\b|<>?=?|>=?|=)?|\bi[ns]\b|(?:<[<>]?|>>?>?|\^\^|[*\/%^~])=?/}),e.languages.insertBefore("d","string",{char:/'(?:\\(?:\W|\w+)|[^\\])'/}),e.languages.insertBefore("d","keyword",{property:/\B@\w*/}),e.languages.insertBefore("d","function",{register:{pattern:/\b(?:[ABCD][LHX]|E?(?:BP|DI|SI|SP)|[BS]PL|[ECSDGF]S|CR[0234]|[DS]IL|DR[012367]|E[ABCD]X|X?MM[0-7]|R(?:1[0-5]|[89])[BWD]?|R[ABCD]X|R[BS]P|R[DS]I|TR[3-7]|XMM(?:1[0-5]|[89])|YMM(?:1[0-5]|\d))\b|\bST(?:\([0-7]\)|\b)/,alias:"variable"}})}function TH(e){var t,n,r;e.register(vF),t=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],r={pattern:RegExp((n=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source)+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}},e.languages.dart=e.languages.extend("clike",{"class-name":[r,{pattern:RegExp(n+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:r.inside}],keyword:t,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),e.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.dart}}},string:/[\s\S]+/}},string:void 0}),e.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),e.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}function T$(e){e.languages.dataweave={url:/\b[A-Za-z]+:\/\/[\w/:.?=&-]+|\burn:[\w:.?=&-]+/,property:{pattern:/(?:\b\w+#)?(?:"(?:\\.|[^\\"\r\n])*"|\b\w+)(?=\s*[:@])/,greedy:!0},string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},"mime-type":/\b(?:application|audio|image|multipart|text|video)\/[\w+-]+/,date:{pattern:/\|[\w:+-]+\|/,greedy:!0},comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],regex:{pattern:/\/(?:[^\\\/\r\n]|\\[^\r\n])+\//,greedy:!0},keyword:/\b(?:and|as|at|case|do|else|fun|if|input|is|match|not|ns|null|or|output|type|unless|update|using|var)\b/,function:/\b[A-Z_]\w*(?=\s*\()/i,number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\];(),.:@]/,operator:/<<|>>|->|[<>~=]=?|!=|--?-?|\+\+?|!|\?/,boolean:/\b(?:false|true)\b/}}function TG(e){e.languages.dax={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/).*)/,lookbehind:!0},"data-field":{pattern:/'(?:[^']|'')*'(?!')(?:\[[ \w\xA0-\uFFFF]+\])?|\w+\[[ \w\xA0-\uFFFF]+\]/,alias:"symbol"},measure:{pattern:/\[[ \w\xA0-\uFFFF]+\]/,alias:"constant"},string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},function:/\b(?:ABS|ACOS|ACOSH|ACOT|ACOTH|ADDCOLUMNS|ADDMISSINGITEMS|ALL|ALLCROSSFILTERED|ALLEXCEPT|ALLNOBLANKROW|ALLSELECTED|AND|APPROXIMATEDISTINCTCOUNT|ASIN|ASINH|ATAN|ATANH|AVERAGE|AVERAGEA|AVERAGEX|BETA\.DIST|BETA\.INV|BLANK|CALCULATE|CALCULATETABLE|CALENDAR|CALENDARAUTO|CEILING|CHISQ\.DIST|CHISQ\.DIST\.RT|CHISQ\.INV|CHISQ\.INV\.RT|CLOSINGBALANCEMONTH|CLOSINGBALANCEQUARTER|CLOSINGBALANCEYEAR|COALESCE|COMBIN|COMBINA|COMBINEVALUES|CONCATENATE|CONCATENATEX|CONFIDENCE\.NORM|CONFIDENCE\.T|CONTAINS|CONTAINSROW|CONTAINSSTRING|CONTAINSSTRINGEXACT|CONVERT|COS|COSH|COT|COTH|COUNT|COUNTA|COUNTAX|COUNTBLANK|COUNTROWS|COUNTX|CROSSFILTER|CROSSJOIN|CURRENCY|CURRENTGROUP|CUSTOMDATA|DATATABLE|DATE|DATEADD|DATEDIFF|DATESBETWEEN|DATESINPERIOD|DATESMTD|DATESQTD|DATESYTD|DATEVALUE|DAY|DEGREES|DETAILROWS|DISTINCT|DISTINCTCOUNT|DISTINCTCOUNTNOBLANK|DIVIDE|EARLIER|EARLIEST|EDATE|ENDOFMONTH|ENDOFQUARTER|ENDOFYEAR|EOMONTH|ERROR|EVEN|EXACT|EXCEPT|EXP|EXPON\.DIST|FACT|FALSE|FILTER|FILTERS|FIND|FIRSTDATE|FIRSTNONBLANK|FIRSTNONBLANKVALUE|FIXED|FLOOR|FORMAT|GCD|GENERATE|GENERATEALL|GENERATESERIES|GEOMEAN|GEOMEANX|GROUPBY|HASONEFILTER|HASONEVALUE|HOUR|IF|IF\.EAGER|IFERROR|IGNORE|INT|INTERSECT|ISBLANK|ISCROSSFILTERED|ISEMPTY|ISERROR|ISEVEN|ISFILTERED|ISINSCOPE|ISLOGICAL|ISNONTEXT|ISNUMBER|ISO\.CEILING|ISODD|ISONORAFTER|ISSELECTEDMEASURE|ISSUBTOTAL|ISTEXT|KEEPFILTERS|KEYWORDMATCH|LASTDATE|LASTNONBLANK|LASTNONBLANKVALUE|LCM|LEFT|LEN|LN|LOG|LOG10|LOOKUPVALUE|LOWER|MAX|MAXA|MAXX|MEDIAN|MEDIANX|MID|MIN|MINA|MINUTE|MINX|MOD|MONTH|MROUND|NATURALINNERJOIN|NATURALLEFTOUTERJOIN|NEXTDAY|NEXTMONTH|NEXTQUARTER|NEXTYEAR|NONVISUAL|NORM\.DIST|NORM\.INV|NORM\.S\.DIST|NORM\.S\.INV|NOT|NOW|ODD|OPENINGBALANCEMONTH|OPENINGBALANCEQUARTER|OPENINGBALANCEYEAR|OR|PARALLELPERIOD|PATH|PATHCONTAINS|PATHITEM|PATHITEMREVERSE|PATHLENGTH|PERCENTILE\.EXC|PERCENTILE\.INC|PERCENTILEX\.EXC|PERCENTILEX\.INC|PERMUT|PI|POISSON\.DIST|POWER|PREVIOUSDAY|PREVIOUSMONTH|PREVIOUSQUARTER|PREVIOUSYEAR|PRODUCT|PRODUCTX|QUARTER|QUOTIENT|RADIANS|RAND|RANDBETWEEN|RANK\.EQ|RANKX|RELATED|RELATEDTABLE|REMOVEFILTERS|REPLACE|REPT|RIGHT|ROLLUP|ROLLUPADDISSUBTOTAL|ROLLUPGROUP|ROLLUPISSUBTOTAL|ROUND|ROUNDDOWN|ROUNDUP|ROW|SAMEPERIODLASTYEAR|SAMPLE|SEARCH|SECOND|SELECTCOLUMNS|SELECTEDMEASURE|SELECTEDMEASUREFORMATSTRING|SELECTEDMEASURENAME|SELECTEDVALUE|SIGN|SIN|SINH|SQRT|SQRTPI|STARTOFMONTH|STARTOFQUARTER|STARTOFYEAR|STDEV\.P|STDEV\.S|STDEVX\.P|STDEVX\.S|SUBSTITUTE|SUBSTITUTEWITHINDEX|SUM|SUMMARIZE|SUMMARIZECOLUMNS|SUMX|SWITCH|T\.DIST|T\.DIST\.2T|T\.DIST\.RT|T\.INV|T\.INV\.2T|TAN|TANH|TIME|TIMEVALUE|TODAY|TOPN|TOPNPERLEVEL|TOPNSKIP|TOTALMTD|TOTALQTD|TOTALYTD|TREATAS|TRIM|TRUE|TRUNC|UNICHAR|UNICODE|UNION|UPPER|USERELATIONSHIP|USERNAME|USEROBJECTID|USERPRINCIPALNAME|UTCNOW|UTCTODAY|VALUE|VALUES|VAR\.P|VAR\.S|VARX\.P|VARX\.S|WEEKDAY|WEEKNUM|XIRR|XNPV|YEAR|YEARFRAC)(?=\s*\()/i,keyword:/\b(?:DEFINE|EVALUATE|MEASURE|ORDER\s+BY|RETURN|VAR|START\s+AT|ASC|DESC)\b/i,boolean:{pattern:/\b(?:FALSE|NULL|TRUE)\b/i,alias:"constant"},number:/\b\d+(?:\.\d*)?|\B\.\d+\b/,operator:/:=|[-+*\/=^]|&&?|\|\||<(?:=>?|<|>)?|>[>=]?|\b(?:IN|NOT)\b/i,punctuation:/[;\[\](){}`,.]/}}function Tq(e){e.languages.dhall={comment:/--.*|\{-(?:[^-{]|-(?!\})|\{(?!-)|\{-(?:[^-{]|-(?!\})|\{(?!-))*-\})*-\}/,string:{pattern:/"(?:[^"\\]|\\.)*"|''(?:[^']|'(?!')|'''|''\$\{)*''(?!'|\$)/,greedy:!0,inside:{interpolation:{pattern:/\$\{[^{}]*\}/,inside:{expression:{pattern:/(^\$\{)[\s\S]+(?=\}$)/,lookbehind:!0,alias:"language-dhall",inside:null},punctuation:/\$\{|\}/}}}},label:{pattern:/`[^`]*`/,greedy:!0},url:{pattern:/\bhttps?:\/\/[\w.:%!$&'*+;=@~-]+(?:\/[\w.:%!$&'*+;=@~-]*)*(?:\?[/?\w.:%!$&'*+;=@~-]*)?/,greedy:!0},env:{pattern:/\benv:(?:(?!\d)\w+|"(?:[^"\\=]|\\.)*")/,greedy:!0,inside:{function:/^env/,operator:/^:/,variable:/[\s\S]+/}},hash:{pattern:/\bsha256:[\da-fA-F]{64}\b/,inside:{function:/sha256/,operator:/:/,number:/[\da-fA-F]{64}/}},keyword:/\b(?:as|assert|else|forall|if|in|let|merge|missing|then|toMap|using|with)\b|\u2200/,builtin:/\b(?:None|Some)\b/,boolean:/\b(?:False|True)\b/,number:/\bNaN\b|-?\bInfinity\b|[+-]?\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/,operator:/\/\\|\/\/\\\\|&&|\|\||===|[!=]=|\/\/|->|\+\+|::|[+*#@=:?<>|\\\u2227\u2a53\u2261\u2afd\u03bb\u2192]/,punctuation:/\.\.|[{}\[\](),./]/,"class-name":/\b[A-Z]\w*\b/},e.languages.dhall.string.inside.interpolation.inside.expression.inside=e.languages.dhall}function TW(e){var t;e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]},Object.keys(t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"}).forEach(function(n){var r=t[n],a=[];/^\w+$/.test(n)||a.push(/\w+/.exec(n)[0]),"diff"===n&&a.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:a,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}}),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}function TV(e){e.register(vP);function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,a,i){if(n.language===r){var s=n.tokenStack=[];n.code=n.code.replace(a,function(e){if("function"==typeof i&&!i(e))return e;for(var a,o=s.length;-1!==n.code.indexOf(a=t(r,o));)++o;return s[o]=e,a}),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var a=0,i=Object.keys(n.tokenStack);!function s(o){for(var l=0;l<o.length&&!(a>=i.length);l++){var c=o[l];if("string"==typeof c||c.content&&"string"==typeof c.content){var u=i[a],d=n.tokenStack[u],p="string"==typeof c?c:c.content,m=t(r,u),f=p.indexOf(m);if(f>-1){++a;var h=p.substring(0,f),g=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),b=p.substring(f+m.length),y=[];h&&y.push.apply(y,s([h])),y.push(g),b&&y.push.apply(y,s([b])),"string"==typeof c?o.splice.apply(o,[l,1].concat(y)):c.content=y}}else c.content&&s(c.content)}return o}(n.tokens)}}}})}function TY(e){var t,n;e.register(TV),e.languages.django={comment:/^\{#[\s\S]*?#\}$/,tag:{pattern:/(^\{%[+-]?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%][+-]?|[+-]?[}%]\}$/,alias:"punctuation"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},filter:{pattern:/(\|)\w+/,lookbehind:!0,alias:"function"},test:{pattern:/(\bis\s+(?:not\s+)?)(?!not\b)\w+/,lookbehind:!0,alias:"function"},function:/\b[a-z_]\w+(?=\s*\()/i,keyword:/\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,number:/\b\d+(?:\.\d+)?\b/,boolean:/[Ff]alse|[Nn]one|[Tt]rue/,variable:/\b\w+\b/,punctuation:/[{}[\](),.:;]/},t=/\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\}/g,n=e.languages["markup-templating"],e.hooks.add("before-tokenize",function(e){n.buildPlaceholders(e,"django",t)}),e.hooks.add("after-tokenize",function(e){n.tokenizePlaceholders(e,"django")}),e.languages.jinja2=e.languages.django,e.hooks.add("before-tokenize",function(e){n.buildPlaceholders(e,"jinja2",t)}),e.hooks.add("after-tokenize",function(e){n.tokenizePlaceholders(e,"jinja2")})}function TK(e){e.languages["dns-zone-file"]={comment:/;.*/,string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},variable:[{pattern:/(^\$ORIGIN[ \t]+)\S+/m,lookbehind:!0},{pattern:/(^|\s)@(?=\s|$)/,lookbehind:!0}],keyword:/^\$(?:INCLUDE|ORIGIN|TTL)(?=\s|$)/m,class:{pattern:/(^|\s)(?:CH|CS|HS|IN)(?=\s|$)/,lookbehind:!0,alias:"keyword"},type:{pattern:/(^|\s)(?:A|A6|AAAA|AFSDB|APL|ATMA|CAA|CDNSKEY|CDS|CERT|CNAME|DHCID|DLV|DNAME|DNSKEY|DS|EID|GID|GPOS|HINFO|HIP|IPSECKEY|ISDN|KEY|KX|LOC|MAILA|MAILB|MB|MD|MF|MG|MINFO|MR|MX|NAPTR|NB|NBSTAT|NIMLOC|NINFO|NS|NSAP|NSAP-PTR|NSEC|NSEC3|NSEC3PARAM|NULL|NXT|OPENPGPKEY|PTR|PX|RKEY|RP|RRSIG|RT|SIG|SINK|SMIMEA|SOA|SPF|SRV|SSHFP|TA|TKEY|TLSA|TSIG|TXT|UID|UINFO|UNSPEC|URI|WKS|X25)(?=\s|$)/,lookbehind:!0,alias:"keyword"},punctuation:/[()]/},e.languages["dns-zone"]=e.languages["dns-zone-file"]}function TX(e){!function(e){var t=/\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source,n=/(?:[ \t]+(?![ \t])(?:<SP_BS>)?|<SP_BS>)/.source.replace(/<SP_BS>/g,function(){return t}),r=/"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"|'(?:[^'\\\r\n]|\\(?:\r\n|[\s\S]))*'/.source,a=/--[\w-]+=(?:<STR>|(?!["'])(?:[^\s\\]|\\.)+)/.source.replace(/<STR>/g,function(){return r}),i={pattern:RegExp(r),greedy:!0},s={pattern:/(^[ \t]*)#.*/m,lookbehind:!0,greedy:!0};function o(e,t){return RegExp(e=e.replace(/<OPT>/g,function(){return a}).replace(/<SP>/g,function(){return n}),t)}e.languages.docker={instruction:{pattern:/(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,lookbehind:!0,greedy:!0,inside:{options:{pattern:o(/(^(?:ONBUILD<SP>)?\w+<SP>)<OPT>(?:<SP><OPT>)*/.source,"i"),lookbehind:!0,greedy:!0,inside:{property:{pattern:/(^|\s)--[\w-]+/,lookbehind:!0},string:[i,{pattern:/(=)(?!["'])(?:[^\s\\]|\\.)+/,lookbehind:!0}],operator:/\\$/m,punctuation:/=/}},keyword:[{pattern:o(/(^(?:ONBUILD<SP>)?HEALTHCHECK<SP>(?:<OPT><SP>)*)(?:CMD|NONE)\b/.source,"i"),lookbehind:!0,greedy:!0},{pattern:o(/(^(?:ONBUILD<SP>)?FROM<SP>(?:<OPT><SP>)*(?!--)[^ \t\\]+<SP>)AS/.source,"i"),lookbehind:!0,greedy:!0},{pattern:o(/(^ONBUILD<SP>)\w+/.source,"i"),lookbehind:!0,greedy:!0},{pattern:/^\w+/,greedy:!0}],comment:s,string:i,variable:/\$(?:\w+|\{[^{}"'\\]*\})/,operator:/\\$/m}},comment:s},e.languages.dockerfile=e.languages.docker}(e)}function TZ(e){var t="(?:"+[/[a-zA-Z_\x80-\uFFFF][\w\x80-\uFFFF]*/.source,/-?(?:\.\d+|\d+(?:\.\d*)?)/.source,/"[^"\\]*(?:\\[\s\S][^"\\]*)*"/.source,/<(?:[^<>]|(?!<!--)<(?:[^<>"']|"[^"]*"|'[^']*')+>|<!--(?:[^-]|-(?!->))*-->)*>/.source].join("|")+")",n={markup:{pattern:/(^<)[\s\S]+(?=>$)/,lookbehind:!0,alias:["language-markup","language-html","language-xml"],inside:e.languages.markup}};function r(e,n){return RegExp(e.replace(/<ID>/g,function(){return t}),n)}e.languages.dot={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\/|^#.*/m,greedy:!0},"graph-name":{pattern:r(/(\b(?:digraph|graph|subgraph)[ \t\r\n]+)<ID>/.source,"i"),lookbehind:!0,greedy:!0,alias:"class-name",inside:n},"attr-value":{pattern:r(/(=[ \t\r\n]*)<ID>/.source),lookbehind:!0,greedy:!0,inside:n},"attr-name":{pattern:r(/([\[;, \t\r\n])<ID>(?=[ \t\r\n]*=)/.source),lookbehind:!0,greedy:!0,inside:n},keyword:/\b(?:digraph|edge|graph|node|strict|subgraph)\b/i,"compass-point":{pattern:/(:[ \t\r\n]*)(?:[ewc_]|[ns][ew]?)(?![\w\x80-\uFFFF])/,lookbehind:!0,alias:"builtin"},node:{pattern:r(/(^|[^-.\w\x80-\uFFFF\\])<ID>/.source),lookbehind:!0,greedy:!0,inside:n},operator:/[=:]|-[->]/,punctuation:/[\[\]{};,]/},e.languages.gv=e.languages.dot}function TQ(e){e.languages.ebnf={comment:/\(\*[\s\S]*?\*\)/,string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,greedy:!0},special:{pattern:/\?[^?\r\n]*\?/,greedy:!0,alias:"class-name"},definition:{pattern:/^([\t ]*)[a-z]\w*(?:[ \t]+[a-z]\w*)*(?=\s*=)/im,lookbehind:!0,alias:["rule","keyword"]},rule:/\b[a-z]\w*(?:[ \t]+[a-z]\w*)*\b/i,punctuation:/\([:/]|[:/]\)|[.,;()[\]{}]/,operator:/[-=|*/!]/}}function TJ(e){e.languages.editorconfig={comment:/[;#].*/,section:{pattern:/(^[ \t]*)\[.+\]/m,lookbehind:!0,alias:"selector",inside:{regex:/\\\\[\[\]{},!?.*]/,operator:/[!?]|\.\.|\*{1,2}/,punctuation:/[\[\]{},]/}},key:{pattern:/(^[ \t]*)[^\s=]+(?=[ \t]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/=.*/,alias:"attr-value",inside:{punctuation:/^=/}}}}function T0(e){e.languages.eiffel={comment:/--.*/,string:[{pattern:/"([^[]*)\[[\s\S]*?\]\1"/,greedy:!0},{pattern:/"([^{]*)\{[\s\S]*?\}\1"/,greedy:!0},{pattern:/"(?:%(?:(?!\n)\s)*\n\s*%|%\S|[^%"\r\n])*"/,greedy:!0}],char:/'(?:%.|[^%'\r\n])+'/,keyword:/\b(?:across|agent|alias|all|and|as|assign|attached|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,boolean:/\b(?:False|True)\b/i,"class-name":/\b[A-Z][\dA-Z_]*\b/,number:[/\b0[xcb][\da-f](?:_*[\da-f])*\b/i,/(?:\b\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*\b|\b\d(?:_*\d)*\b\.?/i],punctuation:/:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,operator:/\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/}}function T1(e){e.register(vB),e.register(TV),e.languages.ejs={delimiter:{pattern:/^<%[-_=]?|[-_]?%>$/,alias:"punctuation"},comment:/^#[\s\S]*/,"language-javascript":{pattern:/[\s\S]+/,inside:e.languages.javascript}},e.hooks.add("before-tokenize",function(t){e.languages["markup-templating"].buildPlaceholders(t,"ejs",/<%(?!%)[\s\S]+?%>/g)}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"ejs")}),e.languages.eta=e.languages.ejs}function T2(e){e.languages.elixir={doc:{pattern:/@(?:doc|moduledoc)\s+(?:("""|''')[\s\S]*?\1|("|')(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2)/,inside:{attribute:/^@\w+/,string:/['"][\s\S]+/}},comment:{pattern:/#.*/,greedy:!0},regex:{pattern:/~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,greedy:!0},string:[{pattern:/~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|#(?!\{)|[^#\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,greedy:!0,inside:{}},{pattern:/("""|''')[\s\S]*?\1/,greedy:!0,inside:{}},{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{}}],atom:{pattern:/(^|[^:]):\w+/,lookbehind:!0,alias:"symbol"},module:{pattern:/\b[A-Z]\w*\b/,alias:"class-name"},"attr-name":/\b\w+\??:(?!:)/,argument:{pattern:/(^|[^&])&\d+/,lookbehind:!0,alias:"variable"},attribute:{pattern:/@\w+/,alias:"variable"},function:/\b[_a-zA-Z]\w*[?!]?(?:(?=\s*(?:\.\s*)?\()|(?=\/\d))/,number:/\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,keyword:/\b(?:after|alias|and|case|catch|cond|def(?:callback|delegate|exception|impl|macro|module|n|np|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|quote|raise|require|rescue|try|unless|unquote|use|when)\b/,boolean:/\b(?:false|nil|true)\b/,operator:[/\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,{pattern:/([^<])<(?!<)/,lookbehind:!0},{pattern:/([^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,%\[\]{}()]/},e.languages.elixir.string.forEach(function(t){t.inside={interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:e.languages.elixir}}}})}function T3(e){e.languages.elm={comment:/--.*|\{-[\s\S]*?-\}/,char:{pattern:/'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+|u\{[0-9a-fA-F]+\}))'/,greedy:!0},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:[^\\"\r\n]|\\.)*"/,greedy:!0}],"import-statement":{pattern:/(^[\t ]*)import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m,lookbehind:!0,inside:{keyword:/\b(?:as|exposing|import)\b/}},keyword:/\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/,builtin:/\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i,operator:/\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/,hvariable:/\b(?:[A-Z]\w*\.)*[a-z]\w*\b/,constant:/\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/,punctuation:/[{}[\]|(),.:]/}}function T4(e){e.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}}function T5(e){e.register(T4),e.register(TV),e.languages.etlua={delimiter:{pattern:/^<%[-=]?|-?%>$/,alias:"punctuation"},"language-lua":{pattern:/[\s\S]+/,inside:e.languages.lua}},e.hooks.add("before-tokenize",function(t){e.languages["markup-templating"].buildPlaceholders(t,"etlua",/<%[\s\S]+?%>/g)}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"etlua")})}function T6(e){e.register(TV),e.register(TM),e.languages.erb={delimiter:{pattern:/^(\s*)<%=?|%>(?=\s*$)/,lookbehind:!0,alias:"punctuation"},ruby:{pattern:/\s*\S[\s\S]*/,alias:"language-ruby",inside:e.languages.ruby}},e.hooks.add("before-tokenize",function(t){e.languages["markup-templating"].buildPlaceholders(t,"erb",/<%=?(?:[^\r\n]|[\r\n](?!=begin)|[\r\n]=begin\s(?:[^\r\n]|[\r\n](?!=end))*[\r\n]=end)+?%>/g)}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"erb")})}function T9(e){e.languages.erlang={comment:/%.+/,string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},"quoted-function":{pattern:/'(?:\\.|[^\\'\r\n])+'(?=\()/,alias:"function"},"quoted-atom":{pattern:/'(?:\\.|[^\\'\r\n])+'/,alias:"atom"},boolean:/\b(?:false|true)\b/,keyword:/\b(?:after|begin|case|catch|end|fun|if|of|receive|try|when)\b/,number:[/\$\\?./,/\b\d+#[a-z0-9]+/i,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i],function:/\b[a-z][\w@]*(?=\()/,variable:{pattern:/(^|[^@])(?:\b|\?)[A-Z_][\w@]*/,lookbehind:!0},operator:[/[=\/<>:]=|=[:\/]=|\+\+?|--?|[=*\/!]|\b(?:and|andalso|band|bnot|bor|bsl|bsr|bxor|div|not|or|orelse|rem|xor)\b/,{pattern:/(^|[^<])<(?!<)/,lookbehind:!0},{pattern:/(^|[^>])>(?!>)/,lookbehind:!0}],atom:/\b[a-z][\w@]*/,punctuation:/[()[\]{}:;,.#|]|<<|>>/}}function T8(e){e.languages["excel-formula"]={comment:{pattern:/(\bN\(\s*)"(?:[^"]|"")*"(?=\s*\))/i,lookbehind:!0,greedy:!0},string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},reference:{pattern:/(?:'[^']*'|(?:[^\s()[\]{}<>*?"';,$&]*\[[^^\s()[\]{}<>*?"']+\])?\w+)!/,greedy:!0,alias:"string",inside:{operator:/!$/,punctuation:/'/,sheet:{pattern:/[^[\]]+$/,alias:"function"},file:{pattern:/\[[^[\]]+\]$/,inside:{punctuation:/[[\]]/}},path:/[\s\S]+/}},"function-name":{pattern:/\b[A-Z]\w*(?=\()/i,alias:"builtin"},range:{pattern:/\$?\b(?:[A-Z]+\$?\d+:\$?[A-Z]+\$?\d+|[A-Z]+:\$?[A-Z]+|\d+:\$?\d+)\b/i,alias:"selector",inside:{operator:/:/,cell:/\$?[A-Z]+\$?\d+/i,column:/\$?[A-Z]+/i,row:/\$?\d+/}},cell:{pattern:/\b[A-Z]+\d+\b|\$[A-Za-z]+\$?\d+\b|\b[A-Za-z]+\$\d+\b/,alias:"selector"},number:/(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?\b/i,boolean:/\b(?:FALSE|TRUE)\b/i,operator:/[-+*/^%=&,]|<[=>]?|>=?/,punctuation:/[[\]();{}|]/},e.languages.xlsx=e.languages.xls=e.languages["excel-formula"]}function T7(e){e.register(vF),e.languages.fsharp=e.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\(\*(?!\))[\s\S]*?\*\)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?/,greedy:!0},"class-name":{pattern:/(\b(?:exception|inherit|interface|new|of|type)\s+|\w\s*:\s*|\s:\??>\s*)[.\w]+\b(?:\s*(?:->|\*)\s*[.\w]+\b)*(?!\s*[:.])/,lookbehind:!0,inside:{operator:/->|\*/,punctuation:/\./}},keyword:/\b(?:let|return|use|yield)(?:!\B|\b)|\b(?:abstract|and|as|asr|assert|atomic|base|begin|break|checked|class|component|const|constraint|constructor|continue|default|delegate|do|done|downcast|downto|eager|elif|else|end|event|exception|extern|external|false|finally|fixed|for|fun|function|functor|global|if|in|include|inherit|inline|interface|internal|land|lazy|lor|lsl|lsr|lxor|match|member|method|mixin|mod|module|mutable|namespace|new|not|null|object|of|open|or|override|parallel|private|process|protected|public|pure|rec|sealed|select|sig|static|struct|tailcall|then|to|trait|true|try|type|upcast|val|virtual|void|volatile|when|while|with)\b/,number:[/\b0x[\da-fA-F]+(?:LF|lf|un)?\b/,/\b0b[01]+(?:uy|y)?\b/,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i,/\b\d+(?:[IlLsy]|UL|u[lsy]?)?\b/],operator:/([<>~&^])\1\1|([*.:<>&])\2|<-|->|[!=:]=|<?\|{1,3}>?|\??(?:<=|>=|<>|[-+*/%=<>])\??|[!?^&]|~[+~-]|:>|:\?>?/}),e.languages.insertBefore("fsharp","keyword",{preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(^#)\b(?:else|endif|if|light|line|nowarn)\b/,lookbehind:!0,alias:"keyword"}}}}),e.languages.insertBefore("fsharp","punctuation",{"computation-expression":{pattern:/\b[_a-z]\w*(?=\s*\{)/i,alias:"keyword"}}),e.languages.insertBefore("fsharp","string",{annotation:{pattern:/\[<.+?>\]/,greedy:!0,inside:{punctuation:/^\[<|>\]$/,"class-name":{pattern:/^\w+$|(^|;\s*)[A-Z]\w*(?=\()/,lookbehind:!0},"annotation-content":{pattern:/[\s\S]+/,inside:e.languages.fsharp}}},char:{pattern:/'(?:[^\\']|\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8}))'B?/,greedy:!0}})}function Se(e){var t,n,r,a,i,s;r={comment:[{pattern:/(^|\s)(?:! .*|!$)/,lookbehind:!0,inside:t={function:/\b(?:BUGS?|FIX(?:MES?)?|NOTES?|TODOS?|XX+|HACKS?|WARN(?:ING)?|\?{2,}|!{2,})\b/}},{pattern:/(^|\s)\/\*\s[\s\S]*?\*\/(?=\s|$)/,lookbehind:!0,greedy:!0,inside:t},{pattern:/(^|\s)!\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/,lookbehind:!0,greedy:!0,inside:t}],number:[{pattern:/(^|\s)[+-]?\d+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)[+-]?0(?:b[01]+|o[0-7]+|d\d+|x[\dA-F]+)(?=\s|$)/i,lookbehind:!0},{pattern:/(^|\s)[+-]?\d+\/\d+\.?(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)\+?\d+\+\d+\/\d+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)-\d+-\d+\/\d+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)[+-]?(?:\d*\.\d+|\d+\.\d*|\d+)(?:e[+-]?\d+)?(?=\s|$)/i,lookbehind:!0},{pattern:/(^|\s)NAN:\s+[\da-fA-F]+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)[+-]?0(?:b1\.[01]*|o1\.[0-7]*|d1\.\d*|x1\.[\dA-F]*)p\d+(?=\s|$)/i,lookbehind:!0}],regexp:{pattern:/(^|\s)R\/\s(?:\\\S|[^\\/])*\/(?:[idmsr]*|[idmsr]+-[idmsr]+)(?=\s|$)/,lookbehind:!0,alias:"number",inside:{variable:/\\\S/,keyword:/[+?*\[\]^$(){}.|]/,operator:{pattern:/(\/)[idmsr]+(?:-[idmsr]+)?/,lookbehind:!0}}},boolean:{pattern:/(^|\s)[tf](?=\s|$)/,lookbehind:!0},"custom-string":{pattern:/(^|\s)[A-Z0-9\-]+"\s(?:\\\S|[^"\\])*"/,lookbehind:!0,greedy:!0,alias:"string",inside:{number:/\\\S|%\w|\//}},"multiline-string":[{pattern:/(^|\s)STRING:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*;(?=\s|$)/,lookbehind:!0,greedy:!0,alias:"string",inside:{number:(n={number:/\\[^\s']|%\w/}).number,"semicolon-or-setlocal":{pattern:/([\r\n][ \t]*);(?=\s|$)/,lookbehind:!0,alias:"function"}}},{pattern:/(^|\s)HEREDOC:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*\S+(?=\s|$)/,lookbehind:!0,greedy:!0,alias:"string",inside:n},{pattern:/(^|\s)\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/,lookbehind:!0,greedy:!0,alias:"string",inside:n}],"special-using":{pattern:/(^|\s)USING:(?:\s\S+)*(?=\s+;(?:\s|$))/,lookbehind:!0,alias:"function",inside:{string:{pattern:/(\s)[^:\s]+/,lookbehind:!0}}},"stack-effect-delimiter":[{pattern:/(^|\s)(?:call|eval|execute)?\((?=\s)/,lookbehind:!0,alias:"operator"},{pattern:/(\s)--(?=\s)/,lookbehind:!0,alias:"operator"},{pattern:/(\s)\)(?=\s|$)/,lookbehind:!0,alias:"operator"}],combinators:{pattern:null,lookbehind:!0,alias:"keyword"},"kernel-builtin":{pattern:null,lookbehind:!0,alias:"variable"},"sequences-builtin":{pattern:null,lookbehind:!0,alias:"variable"},"math-builtin":{pattern:null,lookbehind:!0,alias:"variable"},"constructor-word":{pattern:/(^|\s)<(?!=+>|-+>)\S+>(?=\s|$)/,lookbehind:!0,alias:"keyword"},"other-builtin-syntax":{pattern:null,lookbehind:!0,alias:"operator"},"conventionally-named-word":{pattern:/(^|\s)(?!")(?:(?:change|new|set|with)-\S+|\$\S+|>[^>\s]+|[^:>\s]+>|[^>\s]+>[^>\s]+|\+[^+\s]+\+|[^?\s]+\?|\?[^?\s]+|[^>\s]+>>|>>[^>\s]+|[^<\s]+<<|\([^()\s]+\)|[^!\s]+!|[^*\s]\S*\*|[^.\s]\S*\.)(?=\s|$)/,lookbehind:!0,alias:"keyword"},"colon-syntax":{pattern:/(^|\s)(?:[A-Z0-9\-]+#?)?:{1,2}\s+(?:;\S+|(?!;)\S+)(?=\s|$)/,lookbehind:!0,greedy:!0,alias:"function"},"semicolon-or-setlocal":{pattern:/(\s)(?:;|:>)(?=\s|$)/,lookbehind:!0,alias:"function"},"curly-brace-literal-delimiter":[{pattern:/(^|\s)[a-z]*\{(?=\s)/i,lookbehind:!0,alias:"operator"},{pattern:/(\s)\}(?=\s|$)/,lookbehind:!0,alias:"operator"}],"quotation-delimiter":[{pattern:/(^|\s)\[(?=\s)/,lookbehind:!0,alias:"operator"},{pattern:/(\s)\](?=\s|$)/,lookbehind:!0,alias:"operator"}],"normal-word":{pattern:/(^|\s)[^"\s]\S*(?=\s|$)/,lookbehind:!0},string:{pattern:/"(?:\\\S|[^"\\])*"/,greedy:!0,inside:n}},a=function(e){return(e+"").replace(/([.?*+\^$\[\]\\(){}|\-])/g,"\\$1")},i=function(e){return RegExp("(^|\\s)(?:"+e.map(a).join("|")+")(?=\\s|$)")},Object.keys(s={"kernel-builtin":["or","2nipd","4drop","tuck","wrapper","nip","wrapper?","callstack>array","die","dupd","callstack","callstack?","3dup","hashcode","pick","4nip","build",">boolean","nipd","clone","5nip","eq?","?","=","swapd","2over","clear","2dup","get-retainstack","not","tuple?","dup","3nipd","call","-rotd","object","drop","assert=","assert?","-rot","execute","boa","get-callstack","curried?","3drop","pickd","overd","over","roll","3nip","swap","and","2nip","rotd","throw","(clone)","hashcode*","spin","reach","4dup","equal?","get-datastack","assert","2drop","<wrapper>","boolean?","identity-hashcode","identity-tuple?","null","composed?","new","5drop","rot","-roll","xor","identity-tuple","boolean"],"other-builtin-syntax":["=======","recursive","flushable",">>","<<<<<<","M\\","B","PRIVATE>","\\","======","final","inline","delimiter","deprecated","<PRIVATE",">>>>>>","<<<<<<<","parse-complex","malformed-complex","read-only",">>>>>>>","call-next-method","<<","foldable","$","$[","${"],"sequences-builtin":["member-eq?","mismatch","append","assert-sequence=","longer","repetition","clone-like","3sequence","assert-sequence?","last-index-from","reversed","index-from","cut*","pad-tail","join-as","remove-eq!","concat-as","but-last","snip","nths","nth","sequence","longest","slice?","<slice>","remove-nth","tail-slice","empty?","tail*","member?","virtual-sequence?","set-length","drop-prefix","iota","unclip","bounds-error?","unclip-last-slice","non-negative-integer-expected","non-negative-integer-expected?","midpoint@","longer?","?set-nth","?first","rest-slice","prepend-as","prepend","fourth","sift","subseq-start","new-sequence","?last","like","first4","1sequence","reverse","slice","virtual@","repetition?","set-last","index","4sequence","max-length","set-second","immutable-sequence","first2","first3","supremum","unclip-slice","suffix!","insert-nth","tail","3append","short","suffix","concat","flip","immutable?","reverse!","2sequence","sum","delete-all","indices","snip-slice","<iota>","check-slice","sequence?","head","append-as","halves","sequence=","collapse-slice","?second","slice-error?","product","bounds-check?","bounds-check","immutable","virtual-exemplar","harvest","remove","pad-head","last","set-fourth","cartesian-product","remove-eq","shorten","shorter","reversed?","shorter?","shortest","head-slice","pop*","tail-slice*","but-last-slice","iota?","append!","cut-slice","new-resizable","head-slice*","sequence-hashcode","pop","set-nth","?nth","second","join","immutable-sequence?","<reversed>","3append-as","virtual-sequence","subseq?","remove-nth!","length","last-index","lengthen","assert-sequence","copy","move","third","first","tail?","set-first","prefix","bounds-error","<repetition>","exchange","surround","cut","min-length","set-third","push-all","head?","subseq-start-from","delete-slice","rest","sum-lengths","head*","infimum","remove!","glue","slice-error","subseq","push","replace-slice","subseq-as","unclip-last"],"math-builtin":["number=","next-power-of-2","?1+","fp-special?","imaginary-part","float>bits","number?","fp-infinity?","bignum?","fp-snan?","denominator","gcd","*","+","fp-bitwise=","-","u>=","/",">=","bitand","power-of-2?","log2-expects-positive","neg?","<","log2",">","integer?","number","bits>double","2/","zero?","bits>float","float?","shift","ratio?","rect>","even?","ratio","fp-sign","bitnot",">fixnum","complex?","/i","integer>fixnum","/f","sgn",">bignum","next-float","u<","u>","mod","recip","rational",">float","2^","integer","fixnum?","neg","fixnum","sq","bignum",">rect","bit?","fp-qnan?","simple-gcd","complex","<fp-nan>","real",">fraction","double>bits","bitor","rem","fp-nan-payload","real-part","log2-expects-positive?","prev-float","align","unordered?","float","fp-nan?","abs","bitxor","integer>fixnum-strict","u<=","odd?","<=","/mod",">integer","real?","rational?","numerator"]}).forEach(function(e){r[e].pattern=i(s[e])}),r.combinators.pattern=i(["2bi","while","2tri","bi*","4dip","both?","same?","tri@","curry","prepose","3bi","?if","tri*","2keep","3keep","curried","2keepd","when","2bi*","2tri*","4keep","bi@","keepdd","do","unless*","tri-curry","if*","loop","bi-curry*","when*","2bi@","2tri@","with","2with","either?","bi","until","3dip","3curry","tri-curry*","tri-curry@","bi-curry","keepd","compose","2dip","if","3tri","unless","tuple","keep","2curry","tri","most","while*","dip","composed","bi-curry@","find-last-from","trim-head-slice","map-as","each-from","none?","trim-tail","partition","if-empty","accumulate*","reject!","find-from","accumulate-as","collector-for-as","reject","map","map-sum","accumulate!","2each-from","follow","supremum-by","map!","unless-empty","collector","padding","reduce-index","replicate-as","infimum-by","trim-tail-slice","count","find-index","filter","accumulate*!","reject-as","map-integers","map-find","reduce","selector","interleave","2map","filter-as","binary-reduce","map-index-as","find","produce","filter!","replicate","cartesian-map","cartesian-each","find-index-from","map-find-last","3map-as","3map","find-last","selector-as","2map-as","2map-reduce","accumulate","each","each-index","accumulate*-as","when-empty","all?","collector-as","push-either","new-like","collector-for","2selector","push-if","2all?","map-reduce","3each","any?","trim-slice","2reduce","change-nth","produce-as","2each","trim","trim-head","cartesian-find","map-index","if-zero","each-integer","unless-zero","(find-integer)","when-zero","find-last-integer","(all-integers?)","times","(each-integer)","find-integer","all-integers?","unless-negative","if-positive","when-positive","when-negative","unless-positive","if-negative","case","2cleave","cond>quot","case>quot","3cleave","wrong-values","to-fixed-point","alist>quot","cond","cleave","call-effect","recursive-hashcode","spread","deep-spread>quot","2||","0||","n||","0&&","2&&","3||","1||","1&&","n&&","3&&","smart-unless*","keep-inputs","reduce-outputs","smart-when*","cleave>array","smart-with","smart-apply","smart-if","inputs/outputs","output>sequence-n","map-outputs","map-reduce-outputs","dropping","output>array","smart-map-reduce","smart-2map-reduce","output>array-n","nullary","input<sequence","append-outputs","drop-inputs","inputs","smart-2reduce","drop-outputs","smart-reduce","preserving","smart-when","outputs","append-outputs-as","smart-unless","smart-if*","sum-outputs","input<sequence-unsafe","output>sequence"]),e.languages.factor=r}function St(e){e.languages.false={comment:{pattern:/\{[^}]*\}/},string:{pattern:/"[^"]*"/,greedy:!0},"character-code":{pattern:/'(?:[^\r]|\r\n?)/,alias:"number"},"assembler-code":{pattern:/\d+`/,alias:"important"},number:/\d+/,operator:/[-!#$%&'*+,./:;=>?@\\^_`|~ßø]/,punctuation:/\[|\]/,variable:/[a-z]/,"non-standard":{pattern:/[()<BDO®]/,alias:"bold"}}}function Sn(e){e.register(vF),e.languages["firestore-security-rules"]=e.languages.extend("clike",{comment:/\/\/.*/,keyword:/\b(?:allow|function|if|match|null|return|rules_version|service)\b/,operator:/&&|\|\||[<>!=]=?|[-+*/%]|\b(?:in|is)\b/}),delete e.languages["firestore-security-rules"]["class-name"],e.languages.insertBefore("firestore-security-rules","keyword",{path:{pattern:/(^|[\s(),])(?:\/(?:[\w\xA0-\uFFFF]+|\{[\w\xA0-\uFFFF]+(?:=\*\*)?\}|\$\([\w\xA0-\uFFFF.]+\)))+/,lookbehind:!0,greedy:!0,inside:{variable:{pattern:/\{[\w\xA0-\uFFFF]+(?:=\*\*)?\}|\$\([\w\xA0-\uFFFF.]+\)/,inside:{operator:/=/,keyword:/\*\*/,punctuation:/[.$(){}]/}},punctuation:/\//}},method:{pattern:/(\ballow\s+)[a-z]+(?:\s*,\s*[a-z]+)*(?=\s*[:;])/,lookbehind:!0,alias:"builtin",inside:{punctuation:/,/}}})}function Sr(e){e.register(vB),e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})}function Sa(e){e.languages.fortran={"quoted-number":{pattern:/[BOZ](['"])[A-F0-9]+\1/i,alias:"number"},string:{pattern:/(?:\b\w+_)?(['"])(?:\1\1|&(?:\r\n?|\n)(?:[ \t]*!.*(?:\r\n?|\n)|(?![ \t]*!))|(?!\1).)*(?:\1|&)/,inside:{comment:{pattern:/(&(?:\r\n?|\n)\s*)!.*/,lookbehind:!0}}},comment:{pattern:/!.*/,greedy:!0},boolean:/\.(?:FALSE|TRUE)\.(?:_\w+)?/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[ED][+-]?\d+)?(?:_\w+)?/i,keyword:[/\b(?:CHARACTER|COMPLEX|DOUBLE ?PRECISION|INTEGER|LOGICAL|REAL)\b/i,/\b(?:END ?)?(?:BLOCK ?DATA|DO|FILE|FORALL|FUNCTION|IF|INTERFACE|MODULE(?! PROCEDURE)|PROGRAM|SELECT|SUBROUTINE|TYPE|WHERE)\b/i,/\b(?:ALLOCATABLE|ALLOCATE|BACKSPACE|CALL|CASE|CLOSE|COMMON|CONTAINS|CONTINUE|CYCLE|DATA|DEALLOCATE|DIMENSION|DO|END|EQUIVALENCE|EXIT|EXTERNAL|FORMAT|GO ?TO|IMPLICIT(?: NONE)?|INQUIRE|INTENT|INTRINSIC|MODULE PROCEDURE|NAMELIST|NULLIFY|OPEN|OPTIONAL|PARAMETER|POINTER|PRINT|PRIVATE|PUBLIC|READ|RETURN|REWIND|SAVE|SELECT|STOP|TARGET|WHILE|WRITE)\b/i,/\b(?:ASSIGNMENT|DEFAULT|ELEMENTAL|ELSE|ELSEIF|ELSEWHERE|ENTRY|IN|INCLUDE|INOUT|KIND|NULL|ONLY|OPERATOR|OUT|PURE|RECURSIVE|RESULT|SEQUENCE|STAT|THEN|USE)\b/i],operator:[/\*\*|\/\/|=>|[=\/]=|[<>]=?|::|[+\-*=%]|\.[A-Z]+\./i,{pattern:/(^|(?!\().)\/(?!\))/,lookbehind:!0}],punctuation:/\(\/|\/\)|[(),;:&]/}}function Si(e){e.register(TV);for(var t=/[^<()"']|\((?:<expr>)*\)|<(?!#--)|<#--(?:[^-]|-(?!->))*-->|"(?:[^\\"]|\\.)*"|'(?:[^\\']|\\.)*'/.source,n=0;n<2;n++)t=t.replace(/<expr>/g,function(){return t});t=t.replace(/<expr>/g,/[^\s\S]/.source);var r={comment:/<#--[\s\S]*?-->/,string:[{pattern:/\br("|')(?:(?!\1)[^\\]|\\.)*\1/,greedy:!0},{pattern:RegExp(/("|')(?:(?!\1|\$\{)[^\\]|\\.|\$\{(?:(?!\})(?:<expr>))*\})*\1/.source.replace(/<expr>/g,function(){return t})),greedy:!0,inside:{interpolation:{pattern:RegExp(/((?:^|[^\\])(?:\\\\)*)\$\{(?:(?!\})(?:<expr>))*\}/.source.replace(/<expr>/g,function(){return t})),lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:null}}}}],keyword:/\b(?:as)\b/,boolean:/\b(?:false|true)\b/,"builtin-function":{pattern:/((?:^|[^?])\?\s*)\w+/,lookbehind:!0,alias:"function"},function:/\b\w+(?=\s*\()/,number:/\b\d+(?:\.\d+)?\b/,operator:/\.\.[<*!]?|->|--|\+\+|&&|\|\||\?{1,2}|[-+*/%!=<>]=?|\b(?:gt|gte|lt|lte)\b/,punctuation:/[,;.:()[\]{}]/};r.string[1].inside.interpolation.inside.rest=r,e.languages.ftl={"ftl-comment":{pattern:/^<#--[\s\S]*/,alias:"comment"},"ftl-directive":{pattern:/^<[\s\S]+>$/,inside:{directive:{pattern:/(^<\/?)[#@][a-z]\w*/i,lookbehind:!0,alias:"keyword"},punctuation:/^<\/?|\/?>$/,content:{pattern:/\s*\S[\s\S]*/,alias:"ftl",inside:r}}},"ftl-interpolation":{pattern:/^\$\{[\s\S]*\}$/,inside:{punctuation:/^\$\{|\}$/,content:{pattern:/\s*\S[\s\S]*/,alias:"ftl",inside:r}}}},e.hooks.add("before-tokenize",function(n){var r=RegExp(/<#--[\s\S]*?-->|<\/?[#@][a-zA-Z](?:<expr>)*?>|\$\{(?:<expr>)*?\}/.source.replace(/<expr>/g,function(){return t}),"gi");e.languages["markup-templating"].buildPlaceholders(n,"ftl",r)}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"ftl")})}function Ss(e){e.register(vF),e.languages.gamemakerlanguage=e.languages.gml=e.languages.extend("clike",{keyword:/\b(?:break|case|continue|default|do|else|enum|exit|for|globalvar|if|repeat|return|switch|until|var|while)\b/,number:/(?:\b0x[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ulf]{0,4}/i,operator:/--|\+\+|[-+%/=]=?|!=|\*\*?=?|<[<=>]?|>[=>]?|&&?|\^\^?|\|\|?|~|\b(?:and|at|not|or|with|xor)\b/,constant:/\b(?:GM_build_date|GM_version|action_(?:continue|restart|reverse|stop)|all|gamespeed_(?:fps|microseconds)|global|local|noone|other|pi|pointer_(?:invalid|null)|self|timezone_(?:local|utc)|undefined|ev_(?:create|destroy|step|alarm|keyboard|mouse|collision|other|draw|draw_(?:begin|end|post|pre)|keypress|keyrelease|trigger|(?:left|middle|no|right)_button|(?:left|middle|right)_press|(?:left|middle|right)_release|mouse_(?:enter|leave|wheel_down|wheel_up)|global_(?:left|middle|right)_button|global_(?:left|middle|right)_press|global_(?:left|middle|right)_release|joystick(?:1|2)_(?:button1|button2|button3|button4|button5|button6|button7|button8|down|left|right|up)|outside|boundary|game_start|game_end|room_start|room_end|no_more_lives|animation_end|end_of_path|no_more_health|user\d|gui|gui_begin|gui_end|step_(?:begin|end|normal))|vk_(?:alt|anykey|backspace|control|delete|down|end|enter|escape|home|insert|left|nokey|pagedown|pageup|pause|printscreen|return|right|shift|space|tab|up|f\d|numpad\d|add|decimal|divide|lalt|lcontrol|lshift|multiply|ralt|rcontrol|rshift|subtract)|achievement_(?:filter_(?:all_players|favorites_only|friends_only)|friends_info|info|leaderboard_info|our_info|pic_loaded|show_(?:achievement|bank|friend_picker|leaderboard|profile|purchase_prompt|ui)|type_challenge|type_score_challenge)|asset_(?:font|object|path|room|script|shader|sound|sprite|tiles|timeline|unknown)|audio_(?:3d|falloff_(?:exponent_distance|exponent_distance_clamped|inverse_distance|inverse_distance_clamped|linear_distance|linear_distance_clamped|none)|mono|new_system|old_system|stereo)|bm_(?:add|complex|dest_alpha|dest_color|dest_colour|inv_dest_alpha|inv_dest_color|inv_dest_colour|inv_src_alpha|inv_src_color|inv_src_colour|max|normal|one|src_alpha|src_alpha_sat|src_color|src_colour|subtract|zero)|browser_(?:chrome|firefox|ie|ie_mobile|not_a_browser|opera|safari|safari_mobile|tizen|unknown|windows_store)|buffer_(?:bool|f16|f32|f64|fast|fixed|generalerror|grow|invalidtype|network|outofbounds|outofspace|s16|s32|s8|seek_end|seek_relative|seek_start|string|text|u16|u32|u64|u8|vbuffer|wrap)|c_(?:aqua|black|blue|dkgray|fuchsia|gray|green|lime|ltgray|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)|cmpfunc_(?:always|equal|greater|greaterequal|less|lessequal|never|notequal)|cr_(?:appstart|arrow|beam|cross|default|drag|handpoint|hourglass|none|size_all|size_nesw|size_ns|size_nwse|size_we|uparrow)|cull_(?:clockwise|counterclockwise|noculling)|device_(?:emulator|tablet)|device_ios_(?:ipad|ipad_retina|iphone|iphone5|iphone6|iphone6plus|iphone_retina|unknown)|display_(?:landscape|landscape_flipped|portrait|portrait_flipped)|dll_(?:cdecl|cdel|stdcall)|ds_type_(?:grid|list|map|priority|queue|stack)|ef_(?:cloud|ellipse|explosion|firework|flare|rain|ring|smoke|smokeup|snow|spark|star)|fa_(?:archive|bottom|center|directory|hidden|left|middle|readonly|right|sysfile|top|volumeid)|fb_login_(?:default|fallback_to_webview|forcing_safari|forcing_webview|no_fallback_to_webview|use_system_account)|iap_(?:available|canceled|ev_consume|ev_product|ev_purchase|ev_restore|ev_storeload|failed|purchased|refunded|status_available|status_loading|status_processing|status_restoring|status_unavailable|status_uninitialised|storeload_failed|storeload_ok|unavailable)|leaderboard_type_(?:number|time_mins_secs)|lighttype_(?:dir|point)|matrix_(?:projection|view|world)|mb_(?:any|left|middle|none|right)|network_(?:config_(?:connect_timeout|disable_reliable_udp|enable_reliable_udp|use_non_blocking_socket)|socket_(?:bluetooth|tcp|udp)|type_(?:connect|data|disconnect|non_blocking_connect))|of_challenge_(?:lose|tie|win)|os_(?:android|ios|linux|macosx|ps3|ps4|psvita|unknown|uwp|win32|win8native|windows|winphone|xboxone)|phy_debug_render_(?:aabb|collision_pairs|coms|core_shapes|joints|obb|shapes)|phy_joint_(?:anchor_1_x|anchor_1_y|anchor_2_x|anchor_2_y|angle|angle_limits|damping_ratio|frequency|length_1|length_2|lower_angle_limit|max_force|max_length|max_motor_force|max_motor_torque|max_torque|motor_force|motor_speed|motor_torque|reaction_force_x|reaction_force_y|reaction_torque|speed|translation|upper_angle_limit)|phy_particle_data_flag_(?:category|color|colour|position|typeflags|velocity)|phy_particle_flag_(?:colormixing|colourmixing|elastic|powder|spring|tensile|viscous|wall|water|zombie)|phy_particle_group_flag_(?:rigid|solid)|pr_(?:linelist|linestrip|pointlist|trianglefan|trianglelist|trianglestrip)|ps_(?:distr|shape)_(?:diamond|ellipse|gaussian|invgaussian|line|linear|rectangle)|pt_shape_(?:circle|cloud|disk|explosion|flare|line|pixel|ring|smoke|snow|spark|sphere|square|star)|ty_(?:real|string)|gp_(?:face\d|axislh|axislv|axisrh|axisrv|padd|padl|padr|padu|select|shoulderl|shoulderlb|shoulderr|shoulderrb|start|stickl|stickr)|lb_disp_(?:none|numeric|time_ms|time_sec)|lb_sort_(?:ascending|descending|none)|ov_(?:achievements|community|friends|gamegroup|players|settings)|ugc_(?:filetype_(?:community|microtrans)|list_(?:Favorited|Followed|Published|Subscribed|UsedOrPlayed|VotedDown|VotedOn|VotedUp|WillVoteLater)|match_(?:AllGuides|Artwork|Collections|ControllerBindings|IntegratedGuides|Items|Items_Mtx|Items_ReadyToUse|Screenshots|UsableInGame|Videos|WebGuides)|query_(?:AcceptedForGameRankedByAcceptanceDate|CreatedByFriendsRankedByPublicationDate|FavoritedByFriendsRankedByPublicationDate|NotYetRated)|query_RankedBy(?:NumTimesReported|PublicationDate|TextSearch|TotalVotesAsc|Trend|Vote|VotesUp)|result_success|sortorder_CreationOrder(?:Asc|Desc)|sortorder_(?:ForModeration|LastUpdatedDesc|SubscriptionDateDesc|TitleAsc|VoteScoreDesc)|visibility_(?:friends_only|private|public))|vertex_usage_(?:binormal|blendindices|blendweight|color|colour|depth|fog|normal|position|psize|sample|tangent|texcoord|textcoord)|vertex_type_(?:float\d|color|colour|ubyte4)|input_type|layerelementtype_(?:background|instance|oldtilemap|particlesystem|sprite|tile|tilemap|undefined)|se_(?:chorus|compressor|echo|equalizer|flanger|gargle|none|reverb)|text_type|tile_(?:flip|index_mask|mirror|rotate)|(?:obj|rm|scr|spr)\w+)\b/,variable:/\b(?:alarm|application_surface|async_load|background_(?:alpha|blend|color|colour|foreground|height|hspeed|htiled|index|showcolor|showcolour|visible|vspeed|vtiled|width|x|xscale|y|yscale)|bbox_(?:bottom|left|right|top)|browser_(?:height|width)|caption_(?:health|lives|score)|current_(?:day|hour|minute|month|second|time|weekday|year)|cursor_sprite|debug_mode|delta_time|direction|display_aa|error_(?:last|occurred)|event_(?:action|number|object|type)|fps|fps_real|friction|game_(?:display|project|save)_(?:id|name)|gamemaker_(?:pro|registered|version)|gravity|gravity_direction|(?:h|v)speed|health|iap_data|id|image_(?:alpha|angle|blend|depth|index|number|speed|xscale|yscale)|instance_(?:count|id)|keyboard_(?:key|lastchar|lastkey|string)|layer|lives|mask_index|mouse_(?:button|lastbutton|x|y)|object_index|os_(?:browser|device|type|version)|path_(?:endaction|index|orientation|position|positionprevious|scale|speed)|persistent|phy_(?:rotation|(?:col_normal|collision|com|linear_velocity|position|speed)_(?:x|y)|angular_(?:damping|velocity)|position_(?:x|y)previous|speed|linear_damping|bullet|fixed_rotation|active|mass|inertia|dynamic|kinematic|sleeping|collision_points)|pointer_(?:invalid|null)|room|room_(?:caption|first|height|last|persistent|speed|width)|score|secure_mode|show_(?:health|lives|score)|solid|speed|sprite_(?:height|index|width|xoffset|yoffset)|temp_directory|timeline_(?:index|loop|position|running|speed)|transition_(?:color|kind|steps)|undefined|view_(?:angle|current|enabled|(?:h|v)(?:border|speed)|(?:h|w|x|y)port|(?:h|w|x|y)view|object|surface_id|visible)|visible|webgl_enabled|working_directory|(?:x|y)(?:previous|start)|x|y|argument(?:_relitive|_count|\d)|argument|global|local|other|self)\b/})}function So(e){e.languages.gap={shell:{pattern:/^gap>[\s\S]*?(?=^gap>|$(?![\s\S]))/m,greedy:!0,inside:{gap:{pattern:/^(gap>).+(?:(?:\r(?:\n|(?!\n))|\n)>.*)*/,lookbehind:!0,inside:null},punctuation:/^gap>/}},comment:{pattern:/#.*/,greedy:!0},string:{pattern:/(^|[^\\'"])(?:'(?:[^\r\n\\']|\\.){1,10}'|"(?:[^\r\n\\"]|\\.)*"(?!")|"""[\s\S]*?""")/,lookbehind:!0,greedy:!0,inside:{continuation:{pattern:/([\r\n])>/,lookbehind:!0,alias:"punctuation"}}},keyword:/\b(?:Assert|Info|IsBound|QUIT|TryNextMethod|Unbind|and|atomic|break|continue|do|elif|else|end|fi|for|function|if|in|local|mod|not|od|or|quit|readonly|readwrite|rec|repeat|return|then|until|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:{pattern:/(^|[^\w.]|\.\.)(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?:_[a-z]?)?(?=$|[^\w.]|\.\.)/,lookbehind:!0},continuation:{pattern:/([\r\n])>/,lookbehind:!0,alias:"punctuation"},operator:/->|[-+*/^~=!]|<>|[<>]=?|:=|\.\./,punctuation:/[()[\]{},;.:]/},e.languages.gap.shell.inside.gap.inside=e.languages.gap}function Sl(e){e.languages.gcode={comment:/;.*|\B\(.*?\)\B/,string:{pattern:/"(?:""|[^"])*"/,greedy:!0},keyword:/\b[GM]\d+(?:\.\d+)?\b/,property:/\b[A-Z]/,checksum:{pattern:/(\*)\d+/,lookbehind:!0,alias:"number"},punctuation:/[:*]/}}function Sc(e){e.languages.gdscript={comment:/#.*/,string:{pattern:/@?(?:("|')(?:(?!\1)[^\n\\]|\\[\s\S])*\1(?!"|')|"""(?:[^\\]|\\[\s\S])*?""")/,greedy:!0},"class-name":{pattern:/(^(?:class|class_name|extends)[ \t]+|^export\([ \t]*|\bas[ \t]+|(?:\b(?:const|var)[ \t]|[,(])[ \t]*\w+[ \t]*:[ \t]*|->[ \t]*)[a-zA-Z_]\w*/m,lookbehind:!0},keyword:/\b(?:and|as|assert|break|breakpoint|class|class_name|const|continue|elif|else|enum|export|extends|for|func|if|in|is|master|mastersync|match|not|null|onready|or|pass|preload|puppet|puppetsync|remote|remotesync|return|self|setget|signal|static|tool|var|while|yield)\b/,function:/\b[a-z_]\w*(?=[ \t]*\()/i,variable:/\$\w+/,number:[/\b0b[01_]+\b|\b0x[\da-fA-F_]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.[\d_]+)(?:e[+-]?[\d_]+)?\b/,/\b(?:INF|NAN|PI|TAU)\b/],constant:/\b[A-Z][A-Z_\d]*\b/,boolean:/\b(?:false|true)\b/,operator:/->|:=|&&|\|\||<<|>>|[-+*/%&|!<>=]=?|[~^]/,punctuation:/[.:,;()[\]{}]/}}function Su(e){e.languages.gedcom={"line-value":{pattern:/(^[\t ]*\d+ +(?:@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@ +)?\w+ ).+/m,lookbehind:!0,inside:{pointer:{pattern:/^@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@$/,alias:"variable"}}},record:{pattern:/(^[\t ]*\d+ +(?:@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@ +)?)\w+/m,lookbehind:!0,alias:"tag"},level:{pattern:/(^[\t ]*)\d+/m,lookbehind:!0,alias:"number"},pointer:{pattern:/@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@/,alias:"variable"}}}function Sd(e){e.languages.gettext={comment:[{pattern:/# .*/,greedy:!0,alias:"translator-comment"},{pattern:/#\..*/,greedy:!0,alias:"extracted-comment"},{pattern:/#:.*/,greedy:!0,alias:"reference-comment"},{pattern:/#,.*/,greedy:!0,alias:"flag-comment"},{pattern:/#\|.*/,greedy:!0,alias:"previously-untranslated-comment"},{pattern:/#.*/,greedy:!0}],string:{pattern:/(^|[^\\])"(?:[^"\\]|\\.)*"/,lookbehind:!0,greedy:!0},keyword:/^msg(?:ctxt|id|id_plural|str)\b/m,number:/\b\d+\b/,punctuation:/[\[\]]/},e.languages.po=e.languages.gettext}function Sp(e){var t;t=/(?:\r?\n|\r)[ \t]*\|.+\|(?:(?!\|).)*/.source,e.languages.gherkin={pystring:{pattern:/("""|''')[\s\S]+?\1/,alias:"string"},comment:{pattern:/(^[ \t]*)#.*/m,lookbehind:!0},tag:{pattern:/(^[ \t]*)@\S*/m,lookbehind:!0},feature:{pattern:/((?:^|\r?\n|\r)[ \t]*)(?:Ability|Ahoy matey!|Arwedd|Aspekt|Besigheid Behoefte|Business Need|Caracteristica|Característica|Egenskab|Egenskap|Eiginleiki|Feature|Fīča|Fitur|Fonctionnalité|Fonksyonalite|Funcionalidade|Funcionalitat|Functionalitate|Funcţionalitate|Funcționalitate|Functionaliteit|Fungsi|Funkcia|Funkcija|Funkcionalitāte|Funkcionalnost|Funkcja|Funksie|Funktionalität|Funktionalitéit|Funzionalità|Hwaet|Hwæt|Jellemző|Karakteristik|Lastnost|Mak|Mogucnost|laH|Mogućnost|Moznosti|Možnosti|OH HAI|Omadus|Ominaisuus|Osobina|Özellik|Potrzeba biznesowa|perbogh|poQbogh malja'|Požadavek|Požiadavka|Pretty much|Qap|Qu'meH 'ut|Savybė|Tính năng|Trajto|Vermoë|Vlastnosť|Właściwość|Značilnost|Δυνατότητα|Λειτουργία|Могућност|Мөмкинлек|Особина|Свойство|Үзенчәлеклелек|Функционал|Функционалност|Функция|Функціонал|תכונה|خاصية|خصوصیت|صلاحیت|کاروبار کی ضرورت|وِیژگی|रूप लेख|ਖਾਸੀਅਤ|ਨਕਸ਼ ਨੁਹਾਰ|ਮੁਹਾਂਦਰਾ|గుణము|ಹೆಚ್ಚಳ|ความต้องการทางธุรกิจ|ความสามารถ|โครงหลัก|기능|フィーチャ|功能|機能):(?:[^:\r\n]+(?:\r?\n|\r|$))*/,lookbehind:!0,inside:{important:{pattern:/(:)[^\r\n]+/,lookbehind:!0},keyword:/[^:\r\n]+:/}},scenario:{pattern:/(^[ \t]*)(?:Abstract Scenario|Abstrakt Scenario|Achtergrond|Aer|Ær|Agtergrond|All y'all|Antecedentes|Antecedents|Atburðarás|Atburðarásir|Awww, look mate|B4|Background|Baggrund|Bakgrund|Bakgrunn|Bakgrunnur|Beispiele|Beispiller|Bối cảnh|Cefndir|Cenario|Cenário|Cenario de Fundo|Cenário de Fundo|Cenarios|Cenários|Contesto|Context|Contexte|Contexto|Conto|Contoh|Contone|Dæmi|Dasar|Dead men tell no tales|Delineacao do Cenario|Delineação do Cenário|Dis is what went down|Dữ liệu|Dyagram Senaryo|Dyagram senaryo|Egzanp|Ejemplos|Eksempler|Ekzemploj|Enghreifftiau|Esbozo do escenario|Escenari|Escenario|Esempi|Esquema de l'escenari|Esquema del escenario|Esquema do Cenario|Esquema do Cenário|EXAMPLZ|Examples|Exempel|Exemple|Exemples|Exemplos|First off|Fono|Forgatókönyv|Forgatókönyv vázlat|Fundo|Geçmiş|Grundlage|Hannergrond|ghantoH|Háttér|Heave to|Istorik|Juhtumid|Keadaan|Khung kịch bản|Khung tình huống|Kịch bản|Koncept|Konsep skenario|Kontèks|Kontekst|Kontekstas|Konteksts|Kontext|Konturo de la scenaro|Latar Belakang|lut chovnatlh|lut|lutmey|Lýsing Atburðarásar|Lýsing Dæma|MISHUN SRSLY|MISHUN|Menggariskan Senario|mo'|Náčrt Scenára|Náčrt Scénáře|Náčrt Scenáru|Oris scenarija|Örnekler|Osnova|Osnova Scenára|Osnova scénáře|Osnutek|Ozadje|Paraugs|Pavyzdžiai|Példák|Piemēri|Plan du scénario|Plan du Scénario|Plan Senaryo|Plan senaryo|Plang vum Szenario|Pozadí|Pozadie|Pozadina|Príklady|Příklady|Primer|Primeri|Primjeri|Przykłady|Raamstsenaarium|Reckon it's like|Rerefons|Scenár|Scénář|Scenarie|Scenarij|Scenarijai|Scenarijaus šablonas|Scenariji|Scenārijs|Scenārijs pēc parauga|Scenarijus|Scenario|Scénario|Scenario Amlinellol|Scenario Outline|Scenario Template|Scenariomal|Scenariomall|Scenarios|Scenariu|Scenariusz|Scenaro|Schema dello scenario|Se ðe|Se the|Se þe|Senario|Senaryo Deskripsyon|Senaryo deskripsyon|Senaryo|Senaryo taslağı|Shiver me timbers|Situācija|Situai|Situasie Uiteensetting|Situasie|Skenario konsep|Skenario|Skica|Structura scenariu|Structură scenariu|Struktura scenarija|Stsenaarium|Swa hwaer swa|Swa|Swa hwær swa|Szablon scenariusza|Szenario|Szenariogrundriss|Tapaukset|Tapaus|Tapausaihio|Taust|Tausta|Template Keadaan|Template Senario|Template Situai|The thing of it is|Tình huống|Variantai|Voorbeelde|Voorbeelden|Wharrimean is|Yo-ho-ho|You'll wanna|Założenia|Παραδείγματα|Περιγραφή Σεναρίου|Σενάρια|Σενάριο|Υπόβαθρο|Кереш|Контекст|Концепт|Мисаллар|Мисоллар|Основа|Передумова|Позадина|Предистория|Предыстория|Приклади|Пример|Примери|Примеры|Рамка на сценарий|Скица|Структура сценарија|Структура сценария|Структура сценарію|Сценарий|Сценарий структураси|Сценарийның төзелеше|Сценарији|Сценарио|Сценарій|Тарих|Үрнәкләр|דוגמאות|רקע|תבנית תרחיש|תרחיש|الخلفية|الگوی سناریو|امثلة|پس منظر|زمینه|سناریو|سيناريو|سيناريو مخطط|مثالیں|منظر نامے کا خاکہ|منظرنامہ|نمونه ها|उदाहरण|परिदृश्य|परिदृश्य रूपरेखा|पृष्ठभूमि|ਉਦਾਹਰਨਾਂ|ਪਟਕਥਾ|ਪਟਕਥਾ ਢਾਂਚਾ|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ|ਪਿਛੋਕੜ|ఉదాహరణలు|కథనం|నేపథ్యం|సన్నివేశం|ಉದಾಹರಣೆಗಳು|ಕಥಾಸಾರಾಂಶ|ವಿವರಣೆ|ಹಿನ್ನೆಲೆ|โครงสร้างของเหตุการณ์|ชุดของตัวอย่าง|ชุดของเหตุการณ์|แนวคิด|สรุปเหตุการณ์|เหตุการณ์|배경|시나리오|시나리오 개요|예|サンプル|シナリオ|シナリオアウトライン|シナリオテンプレ|シナリオテンプレート|テンプレ|例|例子|剧本|剧本大纲|劇本|劇本大綱|场景|场景大纲|場景|場景大綱|背景):[^:\r\n]*/m,lookbehind:!0,inside:{important:{pattern:/(:)[^\r\n]*/,lookbehind:!0},keyword:/[^:\r\n]+:/}},"table-body":{pattern:RegExp("("+t+")(?:"+t+")+"),lookbehind:!0,inside:{outline:{pattern:/<[^>]+>/,alias:"variable"},td:{pattern:/\s*[^\s|][^|]*/,alias:"string"},punctuation:/\|/}},"table-head":{pattern:RegExp(t),inside:{th:{pattern:/\s*[^\s|][^|]*/,alias:"variable"},punctuation:/\|/}},atrule:{pattern:/(^[ \t]+)(?:'a|'ach|'ej|7|a|A také|A taktiež|A tiež|A zároveň|Aber|Ac|Adott|Akkor|Ak|Aleshores|Ale|Ali|Allora|Alors|Als|Ama|Amennyiben|Amikor|Ampak|an|AN|Ananging|And y'all|And|Angenommen|Anrhegedig a|An|Apabila|Atès|Atesa|Atunci|Avast!|Aye|A|awer|Bagi|Banjur|Bet|Biết|Blimey!|Buh|But at the end of the day I reckon|But y'all|But|BUT|Cal|Când|Cand|Cando|Ce|Cuando|Če|Ða ðe|Ða|Dadas|Dada|Dados|Dado|DaH ghu' bejlu'|dann|Dann|Dano|Dan|Dar|Dat fiind|Data|Date fiind|Date|Dati fiind|Dati|Daţi fiind|Dați fiind|DEN|Dato|De|Den youse gotta|Dengan|Diberi|Diyelim ki|Donada|Donat|Donitaĵo|Do|Dun|Duota|Ðurh|Eeldades|Ef|Eğer ki|Entao|Então|Entón|E|En|Entonces|Epi|És|Etant donnée|Etant donné|Et|Étant données|Étant donnée|Étant donné|Etant données|Etant donnés|Étant donnés|Fakat|Gangway!|Gdy|Gegeben seien|Gegeben sei|Gegeven|Gegewe|ghu' noblu'|Gitt|Given y'all|Given|Givet|Givun|Ha|Cho|I CAN HAZ|In|Ir|It's just unbelievable|I|Ja|Jeśli|Jeżeli|Kad|Kada|Kadar|Kai|Kaj|Když|Keď|Kemudian|Ketika|Khi|Kiedy|Ko|Kuid|Kui|Kun|Lan|latlh|Le sa a|Let go and haul|Le|Lè sa a|Lè|Logo|Lorsqu'<|Lorsque|mä|Maar|Mais|Mając|Ma|Majd|Maka|Manawa|Mas|Men|Menawa|Mutta|Nalika|Nalikaning|Nanging|Når|När|Nato|Nhưng|Niin|Njuk|O zaman|Och|Og|Oletetaan|Ond|Onda|Oraz|Pak|Pero|Però|Podano|Pokiaľ|Pokud|Potem|Potom|Privzeto|Pryd|Quan|Quand|Quando|qaSDI'|Så|Sed|Se|Siis|Sipoze ke|Sipoze Ke|Sipoze|Si|Şi|Și|Soit|Stel|Tada|Tad|Takrat|Tak|Tapi|Ter|Tetapi|Tha the|Tha|Then y'all|Then|Thì|Thurh|Toda|Too right|Un|Und|ugeholl|Và|vaj|Vendar|Ve|wann|Wanneer|WEN|Wenn|When y'all|When|Wtedy|Wun|Y'know|Yeah nah|Yna|Youse know like when|Youse know when youse got|Y|Za predpokladu|Za předpokladu|Zadan|Zadani|Zadano|Zadate|Zadato|Zakładając|Zaradi|Zatati|Þa þe|Þa|Þá|Þegar|Þurh|Αλλά|Δεδομένου|Και|Όταν|Τότε|А також|Агар|Але|Али|Аммо|А|Әгәр|Әйтик|Әмма|Бирок|Ва|Вә|Дадено|Дано|Допустим|Если|Задате|Задати|Задато|И|І|К тому же|Када|Кад|Когато|Когда|Коли|Ләкин|Лекин|Нәтиҗәдә|Нехай|Но|Онда|Припустимо, що|Припустимо|Пусть|Также|Та|Тогда|Тоді|То|Унда|Һәм|Якщо|אבל|אזי|אז|בהינתן|וגם|כאשר|آنگاه|اذاً|اگر|اما|اور|با فرض|بالفرض|بفرض|پھر|تب|ثم|جب|عندما|فرض کیا|لكن|لیکن|متى|هنگامی|و|अगर|और|कदा|किन्तु|चूंकि|जब|तथा|तदा|तब|परन्तु|पर|यदि|ਅਤੇ|ਜਦੋਂ|ਜਿਵੇਂ ਕਿ|ਜੇਕਰ|ਤਦ|ਪਰ|అప్పుడు|ఈ పరిస్థితిలో|కాని|చెప్పబడినది|మరియు|ಆದರೆ|ನಂತರ|ನೀಡಿದ|ಮತ್ತು|ಸ್ಥಿತಿಯನ್ನು|กำหนดให้|ดังนั้น|แต่|เมื่อ|และ|그러면<|그리고<|단<|만약<|만일<|먼저<|조건<|하지만<|かつ<|しかし<|ただし<|ならば<|もし<|並且<|但し<|但是<|假如<|假定<|假設<|假设<|前提<|同时<|同時<|并且<|当<|當<|而且<|那么<|那麼<)(?=[ \t])/m,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\\r\n])*"|'(?:\\.|[^'\\\r\n])*'/,inside:{outline:{pattern:/<[^>]+>/,alias:"variable"}}},outline:{pattern:/<[^>]+>/,alias:"variable"}}}function Sm(e){e.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m}}function Sf(e){e.register(v0),e.languages.glsl=e.languages.extend("c",{keyword:/\b(?:active|asm|atomic_uint|attribute|[ibdu]?vec[234]|bool|break|buffer|case|cast|centroid|class|coherent|common|const|continue|d?mat[234](?:x[234])?|default|discard|do|double|else|enum|extern|external|false|filter|fixed|flat|float|for|fvec[234]|goto|half|highp|hvec[234]|[iu]?sampler2DMS(?:Array)?|[iu]?sampler2DRect|[iu]?samplerBuffer|[iu]?samplerCube|[iu]?samplerCubeArray|[iu]?sampler[123]D|[iu]?sampler[12]DArray|[iu]?image2DMS(?:Array)?|[iu]?image2DRect|[iu]?imageBuffer|[iu]?imageCube|[iu]?imageCubeArray|[iu]?image[123]D|[iu]?image[12]DArray|if|in|inline|inout|input|int|interface|invariant|layout|long|lowp|mediump|namespace|noinline|noperspective|out|output|partition|patch|precise|precision|public|readonly|resource|restrict|return|sample|sampler[12]DArrayShadow|sampler[12]DShadow|sampler2DRectShadow|sampler3DRect|samplerCubeArrayShadow|samplerCubeShadow|shared|short|sizeof|smooth|static|struct|subroutine|superp|switch|template|this|true|typedef|uint|uniform|union|unsigned|using|varying|void|volatile|while|writeonly)\b/})}function Sh(e){e.languages.gn={comment:{pattern:/#.*/,greedy:!0},"string-literal":{pattern:/(^|[^\\"])"(?:[^\r\n"\\]|\\.)*"/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\{[\s\S]*?\}|[a-zA-Z_]\w*|0x[a-fA-F0-9]{2})/,lookbehind:!0,inside:{number:/^\$0x[\s\S]{2}$/,variable:/^\$\w+$/,"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}},string:/[\s\S]+/}},keyword:/\b(?:else|if)\b/,boolean:/\b(?:false|true)\b/,"builtin-function":{pattern:/\b(?:assert|defined|foreach|import|pool|print|template|tool|toolchain)(?=\s*\()/i,alias:"keyword"},function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:current_cpu|current_os|current_toolchain|default_toolchain|host_cpu|host_os|root_build_dir|root_gen_dir|root_out_dir|target_cpu|target_gen_dir|target_os|target_out_dir)\b/,number:/-?\b\d+\b/,operator:/[-+!=<>]=?|&&|\|\|/,punctuation:/[(){}[\],.]/},e.languages.gn["string-literal"].inside.interpolation.inside.expression.inside=e.languages.gn,e.languages.gni=e.languages.gn}function Sg(e){e.languages["linker-script"]={comment:{pattern:/(^|\s)\/\*[\s\S]*?(?:$|\*\/)/,lookbehind:!0,greedy:!0},identifier:{pattern:/"[^"\r\n]*"/,greedy:!0},"location-counter":{pattern:/\B\.\B/,alias:"important"},section:{pattern:/(^|[^\w*])\.\w+\b/,lookbehind:!0,alias:"keyword"},function:/\b[A-Z][A-Z_]*(?=\s*\()/,number:/\b(?:0[xX][a-fA-F0-9]+|\d+)[KM]?\b/,operator:/>>=?|<<=?|->|\+\+|--|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?/,punctuation:/[(){},;]/},e.languages.ld=e.languages["linker-script"]}function Sb(e){e.register(vF),e.languages.go=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),e.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete e.languages.go["class-name"]}function Sy(e){e.languages["go-mod"]=e.languages["go-module"]={comment:{pattern:/\/\/.*/,greedy:!0},version:{pattern:/(^|[\s()[\],])v\d+\.\d+\.\d+(?:[+-][-+.\w]*)?(?![^\s()[\],])/,lookbehind:!0,alias:"number"},"go-version":{pattern:/((?:^|\s)go\s+)\d+(?:\.\d+){1,2}/,lookbehind:!0,alias:"number"},keyword:{pattern:/^([ \t]*)(?:exclude|go|module|replace|require|retract)\b/m,lookbehind:!0},operator:/=>/,punctuation:/[()[\],]/}}function SE(e){var t;e.register(vF),t={pattern:/((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}},e.languages.gradle=e.languages.extend("clike",{string:{pattern:/'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,greedy:!0},keyword:/\b(?:apply|def|dependencies|else|if|implementation|import|plugin|plugins|project|repositories|repository|sourceSets|tasks|val)\b/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),e.languages.insertBefore("gradle","string",{shebang:{pattern:/#!.+/,alias:"comment",greedy:!0},"interpolation-string":{pattern:/"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}}}),e.languages.insertBefore("gradle","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),e.languages.insertBefore("gradle","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),t.inside.expression.inside=e.languages.gradle}function Sx(e){e.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:e.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},e.hooks.add("after-tokenize",function(e){if("graphql"===e.language)for(var t=e.tokens.filter(function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type}),n=0;n<t.length;){var r=t[n++];if("keyword"===r.type&&"mutation"===r.content){var a=[];if(u(["definition-mutation","punctuation"])&&"("===t[n+1].content){n+=2;var i=d(/^\($/,/^\)$/);if(-1===i)continue;for(;n<i;n++){var s=t[n+0];"variable"===s.type&&(p(s,"variable-input"),a.push(s.content))}n=i+1}if(u(["punctuation","property-query"])&&"{"===t[n+0].content&&(p(t[++n+0],"property-mutation"),a.length>0)){var o=d(/^\{$/,/^\}$/);if(-1===o)continue;for(var l=n;l<o;l++){var c=t[l];"variable"===c.type&&a.indexOf(c.content)>=0&&p(c,"variable-input")}}}}function u(e,r){r=r||0;for(var a=0;a<e.length;a++){var i=t[n+(a+r)];if(!i||i.type!==e[a])return!1}return!0}function d(e,r){for(var a=1,i=n;i<t.length;i++){var s=t[i],o=s.content;if("punctuation"===s.type&&"string"==typeof o){if(e.test(o))a++;else if(r.test(o)&&0==--a)return i}}return -1}function p(e,t){var n=e.alias;n?Array.isArray(n)||(e.alias=n=[n]):e.alias=n=[],n.push(t)}})}function Sv(e){var t;e.register(vF),t={pattern:/((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}},e.languages.groovy=e.languages.extend("clike",{string:{pattern:/'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,greedy:!0},keyword:/\b(?:abstract|as|assert|boolean|break|byte|case|catch|char|class|const|continue|def|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|in|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),e.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment",greedy:!0},"interpolation-string":{pattern:/"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}}}),e.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),e.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),t.inside.expression.inside=e.languages.groovy}function ST(e){e.register(vj),e.languages.less=e.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),e.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}})}function SS(e){e.register(vj),e.languages.scss=e.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),e.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),e.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),e.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),e.languages.scss.atrule.inside.rest=e.languages.scss}function S_(e){e.register(vP),function(e){var t=/\([^|()\n]+\)|\[[^\]\n]+\]|\{[^}\n]+\}/.source,n=/\)|\((?![^|()\n]+\))/.source;function r(e,r){return RegExp(e.replace(/<MOD>/g,function(){return"(?:"+t+")"}).replace(/<PAR>/g,function(){return"(?:"+n+")"}),r||"")}var a={css:{pattern:/\{[^{}]+\}/,inside:{rest:e.languages.css}},"class-id":{pattern:/(\()[^()]+(?=\))/,lookbehind:!0,alias:"attr-value"},lang:{pattern:/(\[)[^\[\]]+(?=\])/,lookbehind:!0,alias:"attr-value"},punctuation:/[\\\/]\d+|\S/},i=e.languages.textile=e.languages.extend("markup",{phrase:{pattern:/(^|\r|\n)\S[\s\S]*?(?=$|\r?\n\r?\n|\r\r)/,lookbehind:!0,inside:{"block-tag":{pattern:r(/^[a-z]\w*(?:<MOD>|<PAR>|[<>=])*\./.source),inside:{modifier:{pattern:r(/(^[a-z]\w*)(?:<MOD>|<PAR>|[<>=])+(?=\.)/.source),lookbehind:!0,inside:a},tag:/^[a-z]\w*/,punctuation:/\.$/}},list:{pattern:r(/^[*#]+<MOD>*\s+\S.*/.source,"m"),inside:{modifier:{pattern:r(/(^[*#]+)<MOD>+/.source),lookbehind:!0,inside:a},punctuation:/^[*#]+/}},table:{pattern:r(/^(?:(?:<MOD>|<PAR>|[<>=^~])+\.\s*)?(?:\|(?:(?:<MOD>|<PAR>|[<>=^~_]|[\\/]\d+)+\.|(?!(?:<MOD>|<PAR>|[<>=^~_]|[\\/]\d+)+\.))[^|]*)+\|/.source,"m"),inside:{modifier:{pattern:r(/(^|\|(?:\r?\n|\r)?)(?:<MOD>|<PAR>|[<>=^~_]|[\\/]\d+)+(?=\.)/.source),lookbehind:!0,inside:a},punctuation:/\||^\./}},inline:{pattern:r(/(^|[^a-zA-Z\d])(\*\*|__|\?\?|[*_%@+\-^~])<MOD>*.+?\2(?![a-zA-Z\d])/.source),lookbehind:!0,inside:{bold:{pattern:r(/(^(\*\*?)<MOD>*).+?(?=\2)/.source),lookbehind:!0},italic:{pattern:r(/(^(__?)<MOD>*).+?(?=\2)/.source),lookbehind:!0},cite:{pattern:r(/(^\?\?<MOD>*).+?(?=\?\?)/.source),lookbehind:!0,alias:"string"},code:{pattern:r(/(^@<MOD>*).+?(?=@)/.source),lookbehind:!0,alias:"keyword"},inserted:{pattern:r(/(^\+<MOD>*).+?(?=\+)/.source),lookbehind:!0},deleted:{pattern:r(/(^-<MOD>*).+?(?=-)/.source),lookbehind:!0},span:{pattern:r(/(^%<MOD>*).+?(?=%)/.source),lookbehind:!0},modifier:{pattern:r(/(^\*\*|__|\?\?|[*_%@+\-^~])<MOD>+/.source),lookbehind:!0,inside:a},punctuation:/[*_%?@+\-^~]+/}},"link-ref":{pattern:/^\[[^\]]+\]\S+$/m,inside:{string:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0},url:{pattern:/(^\])\S+$/,lookbehind:!0},punctuation:/[\[\]]/}},link:{pattern:r(/"<MOD>*[^"]+":.+?(?=[^\w/]?(?:\s|$))/.source),inside:{text:{pattern:r(/(^"<MOD>*)[^"]+(?=")/.source),lookbehind:!0},modifier:{pattern:r(/(^")<MOD>+/.source),lookbehind:!0,inside:a},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[":]/}},image:{pattern:r(/!(?:<MOD>|<PAR>|[<>=])*(?![<>=])[^!\s()]+(?:\([^)]+\))?!(?::.+?(?=[^\w/]?(?:\s|$)))?/.source),inside:{source:{pattern:r(/(^!(?:<MOD>|<PAR>|[<>=])*)(?![<>=])[^!\s()]+(?:\([^)]+\))?(?=!)/.source),lookbehind:!0,alias:"url"},modifier:{pattern:r(/(^!)(?:<MOD>|<PAR>|[<>=])+/.source),lookbehind:!0,inside:a},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[!:]/}},footnote:{pattern:/\b\[\d+\]/,alias:"comment",inside:{punctuation:/\[|\]/}},acronym:{pattern:/\b[A-Z\d]+\([^)]+\)/,inside:{comment:{pattern:/(\()[^()]+(?=\))/,lookbehind:!0},punctuation:/[()]/}},mark:{pattern:/\b\((?:C|R|TM)\)/,alias:"comment",inside:{punctuation:/[()]/}}}}}),s=i.phrase.inside,o={inline:s.inline,link:s.link,image:s.image,footnote:s.footnote,acronym:s.acronym,mark:s.mark};i.tag.pattern=/<\/?(?!\d)[a-z0-9]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i;var l=s.inline.inside;l.bold.inside=o,l.italic.inside=o,l.inserted.inside=o,l.deleted.inside=o,l.span.inside=o;var c=s.table.inside;c.inline=o.inline,c.link=o.link,c.image=o.image,c.footnote=o.footnote,c.acronym=o.acronym,c.mark=o.mark}(e)}function Sk(e){e.register(TM),function(e){e.languages.haml={"multiline-comment":{pattern:/((?:^|\r?\n|\r)([\t ]*))(?:\/|-#).*(?:(?:\r?\n|\r)\2[\t ].+)*/,lookbehind:!0,alias:"comment"},"multiline-code":[{pattern:/((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*,[\t ]*(?:(?:\r?\n|\r)\2[\t ].*,[\t ]*)*(?:(?:\r?\n|\r)\2[\t ].+)/,lookbehind:!0,inside:e.languages.ruby},{pattern:/((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*\|[\t ]*(?:(?:\r?\n|\r)\2[\t ].*\|[\t ]*)*/,lookbehind:!0,inside:e.languages.ruby}],filter:{pattern:/((?:^|\r?\n|\r)([\t ]*)):[\w-]+(?:(?:\r?\n|\r)(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/,lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"symbol"}}},markup:{pattern:/((?:^|\r?\n|\r)[\t ]*)<.+/,lookbehind:!0,inside:e.languages.markup},doctype:{pattern:/((?:^|\r?\n|\r)[\t ]*)!!!(?: .+)?/,lookbehind:!0},tag:{pattern:/((?:^|\r?\n|\r)[\t ]*)[%.#][\w\-#.]*[\w\-](?:\([^)]+\)|\{(?:\{[^}]+\}|[^{}])+\}|\[[^\]]+\])*[\/<>]*/,lookbehind:!0,inside:{attributes:[{pattern:/(^|[^#])\{(?:\{[^}]+\}|[^{}])+\}/,lookbehind:!0,inside:e.languages.ruby},{pattern:/\([^)]+\)/,inside:{"attr-value":{pattern:/(=\s*)(?:"(?:\\.|[^\\"\r\n])*"|[^)\s]+)/,lookbehind:!0},"attr-name":/[\w:-]+(?=\s*!?=|\s*[,)])/,punctuation:/[=(),]/}},{pattern:/\[[^\]]+\]/,inside:e.languages.ruby}],punctuation:/[<>]/}},code:{pattern:/((?:^|\r?\n|\r)[\t ]*(?:[~-]|[&!]?=)).+/,lookbehind:!0,inside:e.languages.ruby},interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},ruby:{pattern:/[\s\S]+/,inside:e.languages.ruby}}},punctuation:{pattern:/((?:^|\r?\n|\r)[\t ]*)[~=\-&!]+/,lookbehind:!0}};for(var t=["css",{filter:"coffee",language:"coffeescript"},"erb","javascript","less","markdown","ruby","scss","textile"],n={},r=0,a=t.length;r<a;r++){var i=t[r];i="string"==typeof i?{filter:i,language:i}:i,e.languages[i.language]&&(n["filter-"+i.filter]={pattern:RegExp("((?:^|\\r?\\n|\\r)([\\t ]*)):{{filter_name}}(?:(?:\\r?\\n|\\r)(?:\\2[\\t ].+|\\s*?(?=\\r?\\n|\\r)))+".replace("{{filter_name}}",function(){return i.filter})),lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"symbol"},text:{pattern:/[\s\S]+/,alias:[i.language,"language-"+i.language],inside:e.languages[i.language]}}})}e.languages.insertBefore("haml","filter",n)}(e)}function Sw(e){e.register(TV),e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",function(t){e.languages["markup-templating"].buildPlaceholders(t,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"handlebars")}),e.languages.hbs=e.languages.handlebars,e.languages.mustache=e.languages.handlebars}function SA(e){e.languages.haskell={comment:{pattern:/(^|[^-!#$%*+=?&@|~.:<>^\\\/])(?:--(?:(?=.)[^-!#$%*+=?&@|~.:<>^\\\/].*|$)|\{-[\s\S]*?-\})/m,lookbehind:!0},char:{pattern:/'(?:[^\\']|\\(?:[abfnrtv\\"'&]|\^[A-Z@[\]^_]|ACK|BEL|BS|CAN|CR|DC1|DC2|DC3|DC4|DEL|DLE|EM|ENQ|EOT|ESC|ETB|ETX|FF|FS|GS|HT|LF|NAK|NUL|RS|SI|SO|SOH|SP|STX|SUB|SYN|US|VT|\d+|o[0-7]+|x[0-9a-fA-F]+))'/,alias:"string"},string:{pattern:/"(?:[^\\"]|\\(?:\S|\s+\\))*"/,greedy:!0},keyword:/\b(?:case|class|data|deriving|do|else|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b/,"import-statement":{pattern:/(^[\t ]*)import\s+(?:qualified\s+)?(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*(?:\s+as\s+(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m,lookbehind:!0,inside:{keyword:/\b(?:as|hiding|import|qualified)\b/,punctuation:/\./}},builtin:/\b(?:abs|acos|acosh|all|and|any|appendFile|approxRational|asTypeOf|asin|asinh|atan|atan2|atanh|basicIORun|break|catch|ceiling|chr|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|denominator|digitToInt|div|divMod|drop|dropWhile|either|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromDouble|fromEnum|fromInt|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|group|head|id|inRange|index|init|intToDigit|interact|ioError|isAlpha|isAlphaNum|isAscii|isControl|isDenormalized|isDigit|isHexDigit|isIEEE|isInfinite|isLower|isNaN|isNegativeZero|isOctDigit|isPrint|isSpace|isUpper|iterate|last|lcm|length|lex|lexDigits|lexLitChar|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|numerator|odd|or|ord|otherwise|pack|pi|pred|primExitWith|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|range|rangeSize|read|readDec|readFile|readFloat|readHex|readIO|readInt|readList|readLitChar|readLn|readOct|readParen|readSigned|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showInt|showList|showLitChar|showParen|showSigned|showString|shows|showsPrec|significand|signum|sin|sinh|snd|sort|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|threadToIOResult|toEnum|toInt|toInteger|toLower|toRational|toUpper|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0o[0-7]+|0x[0-9a-f]+)\b/i,operator:[{pattern:/`(?:[A-Z][\w']*\.)*[_a-z][\w']*`/,greedy:!0},{pattern:/(\s)\.(?=\s)/,lookbehind:!0},/[-!#$%*+=?&@|~:<>^\\\/][-!#$%*+=?&@|~.:<>^\\\/]*|\.[-!#$%*+=?&@|~.:<>^\\\/]+/],hvariable:{pattern:/\b(?:[A-Z][\w']*\.)*[_a-z][\w']*/,inside:{punctuation:/\./}},constant:{pattern:/\b(?:[A-Z][\w']*\.)*[A-Z][\w']*/,inside:{punctuation:/\./}},punctuation:/[{}[\];(),.:]/},e.languages.hs=e.languages.haskell}function SN(e){e.register(vF),e.languages.haxe=e.languages.extend("clike",{string:{pattern:/"(?:[^"\\]|\\[\s\S])*"/,greedy:!0},"class-name":[{pattern:/(\b(?:abstract|class|enum|extends|implements|interface|new|typedef)\s+)[A-Z_]\w*/,lookbehind:!0},/\b[A-Z]\w*/],keyword:/\bthis\b|\b(?:abstract|as|break|case|cast|catch|class|continue|default|do|dynamic|else|enum|extends|extern|final|for|from|function|if|implements|import|in|inline|interface|macro|new|null|operator|overload|override|package|private|public|return|static|super|switch|throw|to|try|typedef|untyped|using|var|while)(?!\.)\b/,function:{pattern:/\b[a-z_]\w*(?=\s*(?:<[^<>]*>\s*)?\()/i,greedy:!0},operator:/\.{3}|\+\+|--|&&|\|\||->|=>|(?:<<?|>{1,3}|[-+*/%!=&|^])=?|[?:~]/}),e.languages.insertBefore("haxe","string",{"string-interpolation":{pattern:/'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{interpolation:{pattern:/(^|[^\\])\$(?:\w+|\{[^{}]+\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.haxe}}},string:/[\s\S]+/}}}),e.languages.insertBefore("haxe","class-name",{regex:{pattern:/~\/(?:[^\/\\\r\n]|\\.)+\/[a-z]*/,greedy:!0,inside:{"regex-flags":/\b[a-z]+$/,"regex-source":{pattern:/^(~\/)[\s\S]+(?=\/$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^~\/|\/$/}}}),e.languages.insertBefore("haxe","keyword",{preprocessor:{pattern:/#(?:else|elseif|end|if)\b.*/,alias:"property"},metadata:{pattern:/@:?[\w.]+/,alias:"symbol"},reification:{pattern:/\$(?:\w+|(?=\{))/,alias:"important"}})}function SI(e){e.languages.hcl={comment:/(?:\/\/|#).*|\/\*[\s\S]*?(?:\*\/|$)/,heredoc:{pattern:/<<-?(\w+\b)[\s\S]*?^[ \t]*\1/m,greedy:!0,alias:"string"},keyword:[{pattern:/(?:data|resource)\s+(?:"(?:\\[\s\S]|[^\\"])*")(?=\s+"[\w-]+"\s+\{)/i,inside:{type:{pattern:/(resource|data|\s+)(?:"(?:\\[\s\S]|[^\\"])*")/i,lookbehind:!0,alias:"variable"}}},{pattern:/(?:backend|module|output|provider|provisioner|variable)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+(?=\{)/i,inside:{type:{pattern:/(backend|module|output|provider|provisioner|variable)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+/i,lookbehind:!0,alias:"variable"}}},/[\w-]+(?=\s+\{)/],property:[/[-\w\.]+(?=\s*=(?!=))/,/"(?:\\[\s\S]|[^\\"])+"(?=\s*[:=])/],string:{pattern:/"(?:[^\\$"]|\\[\s\S]|\$(?:(?=")|\$+(?!\$)|[^"${])|\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\})*"/,greedy:!0,inside:{interpolation:{pattern:/(^|[^$])\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\}/,lookbehind:!0,inside:{type:{pattern:/(\b(?:count|data|local|module|path|self|terraform|var)\b\.)[\w\*]+/i,lookbehind:!0,alias:"variable"},keyword:/\b(?:count|data|local|module|path|self|terraform|var)\b/i,function:/\w+(?=\()/,string:{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0},number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,punctuation:/[!\$#%&'()*+,.\/;<=>@\[\\\]^`{|}~?:]/}}}},number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,boolean:/\b(?:false|true)\b/i,punctuation:/[=\[\]{}]/}}function SC(e){e.register(v0),e.languages.hlsl=e.languages.extend("c",{"class-name":[e.languages.c["class-name"],/\b(?:AppendStructuredBuffer|BlendState|Buffer|ByteAddressBuffer|CompileShader|ComputeShader|ConsumeStructuredBuffer|DepthStencilState|DepthStencilView|DomainShader|GeometryShader|Hullshader|InputPatch|LineStream|OutputPatch|PixelShader|PointStream|RWBuffer|RWByteAddressBuffer|RWStructuredBuffer|RWTexture(?:1D|1DArray|2D|2DArray|3D)|RasterizerState|RenderTargetView|SamplerComparisonState|SamplerState|StructuredBuffer|Texture(?:1D|1DArray|2D|2DArray|2DMS|2DMSArray|3D|Cube|CubeArray)|TriangleStream|VertexShader)\b/],keyword:[/\b(?:asm|asm_fragment|auto|break|case|catch|cbuffer|centroid|char|class|column_major|compile|compile_fragment|const|const_cast|continue|default|delete|discard|do|dynamic_cast|else|enum|explicit|export|extern|for|friend|fxgroup|goto|groupshared|if|in|inline|inout|interface|line|lineadj|linear|long|matrix|mutable|namespace|new|nointerpolation|noperspective|operator|out|packoffset|pass|pixelfragment|point|precise|private|protected|public|register|reinterpret_cast|return|row_major|sample|sampler|shared|short|signed|sizeof|snorm|stateblock|stateblock_state|static|static_cast|string|struct|switch|tbuffer|technique|technique10|technique11|template|texture|this|throw|triangle|triangleadj|try|typedef|typename|uniform|union|unorm|unsigned|using|vector|vertexfragment|virtual|void|volatile|while)\b/,/\b(?:bool|double|dword|float|half|int|min(?:10float|12int|16(?:float|int|uint))|uint)(?:[1-4](?:x[1-4])?)?\b/],number:/(?:(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?|\b0x[\da-fA-F]+)[fFhHlLuU]?\b/,boolean:/\b(?:false|true)\b/})}function SR(e){e.languages.hoon={comment:{pattern:/::.*/,greedy:!0},string:{pattern:/"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'/,greedy:!0},constant:/%(?:\.[ny]|[\w-]+)/,"class-name":/@(?:[a-z0-9-]*[a-z0-9])?|\*/i,function:/(?:\+[-+] {2})?(?:[a-z](?:[a-z0-9-]*[a-z0-9])?)/,keyword:/\.[\^\+\*=\?]|![><:\.=\?!]|=[>|:,\.\-\^<+;/~\*\?]|\?[>|:\.\-\^<\+&~=@!]|\|[\$_%:\.\-\^~\*=@\?]|\+[|\$\+\*]|:[_\-\^\+~\*]|%[_:\.\-\^\+~\*=]|\^[|:\.\-\+&~\*=\?]|\$[|_%:<>\-\^&~@=\?]|;[:<\+;\/~\*=]|~[>|\$_%<\+\/&=\?!]|--|==/}}function SO(e){e.languages.hpkp={directive:{pattern:/\b(?:includeSubDomains|max-age|pin-sha256|preload|report-to|report-uri|strict)(?=[\s;=]|$)/i,alias:"property"},operator:/=/,punctuation:/;/}}function SD(e){e.languages.hsts={directive:{pattern:/\b(?:includeSubDomains|max-age|preload)(?=[\s;=]|$)/i,alias:"property"},operator:/=/,punctuation:/;/}}function SL(e){e.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},e.languages.webmanifest=e.languages.json}function SM(e){e.languages.uri={scheme:{pattern:/^[a-z][a-z0-9+.-]*:/im,greedy:!0,inside:{"scheme-delimiter":/:$/}},fragment:{pattern:/#[\w\-.~!$&'()*+,;=%:@/?]*/,inside:{"fragment-delimiter":/^#/}},query:{pattern:/\?[\w\-.~!$&'()*+,;=%:@/?]*/,inside:{"query-delimiter":{pattern:/^\?/,greedy:!0},"pair-delimiter":/[&;]/,pair:{pattern:/^[^=][\s\S]*/,inside:{key:/^[^=]+/,value:{pattern:/(^=)[\s\S]+/,lookbehind:!0}}}}},authority:{pattern:RegExp(/^\/\//.source+/(?:[\w\-.~!$&'()*+,;=%:]*@)?/.source+("(?:"+/\[(?:[0-9a-fA-F:.]{2,48}|v[0-9a-fA-F]+\.[\w\-.~!$&'()*+,;=]+)\]/.source+"|")+/[\w\-.~!$&'()*+,;=%]*/.source+")"+/(?::\d*)?/.source,"m"),inside:{"authority-delimiter":/^\/\//,"user-info-segment":{pattern:/^[\w\-.~!$&'()*+,;=%:]*@/,inside:{"user-info-delimiter":/@$/,"user-info":/^[\w\-.~!$&'()*+,;=%:]+/}},"port-segment":{pattern:/:\d*$/,inside:{"port-delimiter":/^:/,port:/^\d+/}},host:{pattern:/[\s\S]+/,inside:{"ip-literal":{pattern:/^\[[\s\S]+\]$/,inside:{"ip-literal-delimiter":/^\[|\]$/,"ipv-future":/^v[\s\S]+/,"ipv6-address":/^[\s\S]+/}},"ipv4-address":/^(?:(?:[03-9]\d?|[12]\d{0,2})\.){3}(?:[03-9]\d?|[12]\d{0,2})$/}}}},path:{pattern:/^[\w\-.~!$&'()*+,;=%:@/]+/m,inside:{"path-separator":/\//}}},e.languages.url=e.languages.uri}function SP(e){!function(e){function t(e){return RegExp("(^(?:"+e+"):[ ]*(?![ ]))[^]+","i")}e.languages.http={"request-line":{pattern:/^(?:CONNECT|DELETE|GET|HEAD|OPTIONS|PATCH|POST|PRI|PUT|SEARCH|TRACE)\s(?:https?:\/\/|\/)\S*\sHTTP\/[\d.]+/m,inside:{method:{pattern:/^[A-Z]+\b/,alias:"property"},"request-target":{pattern:/^(\s)(?:https?:\/\/|\/)\S*(?=\s)/,lookbehind:!0,alias:"url",inside:e.languages.uri},"http-version":{pattern:/^(\s)HTTP\/[\d.]+/,lookbehind:!0,alias:"property"}}},"response-status":{pattern:/^HTTP\/[\d.]+ \d+ .+/m,inside:{"http-version":{pattern:/^HTTP\/[\d.]+/,alias:"property"},"status-code":{pattern:/^(\s)\d+(?=\s)/,lookbehind:!0,alias:"number"},"reason-phrase":{pattern:/^(\s).+/,lookbehind:!0,alias:"string"}}},header:{pattern:/^[\w-]+:.+(?:(?:\r\n?|\n)[ \t].+)*/m,inside:{"header-value":[{pattern:t(/Content-Security-Policy/.source),lookbehind:!0,alias:["csp","languages-csp"],inside:e.languages.csp},{pattern:t(/Public-Key-Pins(?:-Report-Only)?/.source),lookbehind:!0,alias:["hpkp","languages-hpkp"],inside:e.languages.hpkp},{pattern:t(/Strict-Transport-Security/.source),lookbehind:!0,alias:["hsts","languages-hsts"],inside:e.languages.hsts},{pattern:t(/[^:]+/.source),lookbehind:!0}],"header-name":{pattern:/^[^:]+/,alias:"keyword"},punctuation:/^:/}}};var n,r=e.languages,a={"application/javascript":r.javascript,"application/json":r.json||r.javascript,"application/xml":r.xml,"text/xml":r.xml,"text/html":r.html,"text/css":r.css,"text/plain":r.plain},i={"application/json":!0,"application/xml":!0};for(var s in a)if(a[s]){n=n||{};var o=i[s]?function(e){var t=e.replace(/^[a-z]+\//,"");return"(?:"+e+"|\\w+/(?:[\\w.-]+\\+)+"+t+"(?![+\\w.-]))"}(s):s;n[s.replace(/\//g,"-")]={pattern:RegExp("("+/content-type:\s*/.source+o+/(?:(?:\r\n?|\n)[\w-].*)*(?:\r(?:\n|(?!\n))|\n)/.source+")"+/[^ \t\w-][\s\S]*/.source,"i"),lookbehind:!0,inside:a[s]}}n&&e.languages.insertBefore("http","header",n)}(e)}function Sj(e){e.languages.ichigojam={comment:/(?:\B'|REM)(?:[^\n\r]*)/i,string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/\B#[0-9A-F]+|\B`[01]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:BEEP|BPS|CASE|CLEAR|CLK|CLO|CLP|CLS|CLT|CLV|CONT|COPY|ELSE|END|FILE|FILES|FOR|GOSUB|GOTO|GSB|IF|INPUT|KBD|LED|LET|LIST|LOAD|LOCATE|LRUN|NEW|NEXT|OUT|PLAY|POKE|PRINT|PWM|REM|RENUM|RESET|RETURN|RIGHT|RTN|RUN|SAVE|SCROLL|SLEEP|SRND|STEP|STOP|SUB|TEMPO|THEN|TO|UART|VIDEO|WAIT)(?:\$|\b)/i,function:/\b(?:ABS|ANA|ASC|BIN|BTN|DEC|END|FREE|HELP|HEX|I2CR|I2CW|IN|INKEY|LEN|LINE|PEEK|RND|SCR|SOUND|STR|TICK|USR|VER|VPEEK|ZER)(?:\$|\b)/i,label:/(?:\B@\S+)/,operator:/<[=>]?|>=?|\|\||&&|[+\-*\/=|&^~!]|\b(?:AND|NOT|OR)\b/i,punctuation:/[\[,;:()\]]/}}function SF(e){e.languages.icon={comment:/#.*/,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n_]|\\.|_(?!\1)(?:\r\n|[\s\S]))*\1/,greedy:!0},number:/\b(?:\d+r[a-z\d]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b|\.\d+\b/i,"builtin-keyword":{pattern:/&(?:allocated|ascii|clock|collections|cset|current|date|dateline|digits|dump|e|error(?:number|text|value)?|errout|fail|features|file|host|input|lcase|letters|level|line|main|null|output|phi|pi|pos|progname|random|regions|source|storage|subject|time|trace|ucase|version)\b/,alias:"variable"},directive:{pattern:/\$\w+/,alias:"builtin"},keyword:/\b(?:break|by|case|create|default|do|else|end|every|fail|global|if|initial|invocable|link|local|next|not|of|procedure|record|repeat|return|static|suspend|then|to|until|while)\b/,function:/\b(?!\d)\w+(?=\s*[({]|\s*!\s*\[)/,operator:/[+-]:(?!=)|(?:[\/?@^%&]|\+\+?|--?|==?=?|~==?=?|\*\*?|\|\|\|?|<(?:->?|<?=?)|>>?=?)(?::=)?|:(?:=:?)?|[!.\\|~]/,punctuation:/[\[\](){},;]/}}function SU(e){!function(e){function t(e,n){return n<=0?/[]/.source:e.replace(/<SELF>/g,function(){return t(e,n-1)})}var n=/'[{}:=,](?:[^']|'')*'(?!')/,r={pattern:/''/,greedy:!0,alias:"operator"},a=t(/\{(?:[^{}']|'(?![{},'])|''|<STR>|<SELF>)*\}/.source.replace(/<STR>/g,function(){return n.source}),8),i={pattern:RegExp(a),inside:{message:{pattern:/^(\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:null},"message-delimiter":{pattern:/./,alias:"punctuation"}}};e.languages["icu-message-format"]={argument:{pattern:RegExp(a),greedy:!0,inside:{content:{pattern:/^(\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:{"argument-name":{pattern:/^(\s*)[^{}:=,\s]+/,lookbehind:!0},"choice-style":{pattern:/^(\s*,\s*choice\s*,\s*)\S(?:[\s\S]*\S)?/,lookbehind:!0,inside:{punctuation:/\|/,range:{pattern:/^(\s*)[+-]?(?:\d+(?:\.\d*)?|\u221e)\s*[<#\u2264]/,lookbehind:!0,inside:{operator:/[<#\u2264]/,number:/\S+/}},rest:null}},"plural-style":{pattern:/^(\s*,\s*(?:plural|selectordinal)\s*,\s*)\S(?:[\s\S]*\S)?/,lookbehind:!0,inside:{offset:/^offset:\s*\d+/,"nested-message":i,selector:{pattern:/=\d+|[^{}:=,\s]+/,inside:{keyword:/^(?:few|many|one|other|two|zero)$/}}}},"select-style":{pattern:/^(\s*,\s*select\s*,\s*)\S(?:[\s\S]*\S)?/,lookbehind:!0,inside:{"nested-message":i,selector:{pattern:/[^{}:=,\s]+/,inside:{keyword:/^other$/}}}},keyword:/\b(?:choice|plural|select|selectordinal)\b/,"arg-type":{pattern:/\b(?:date|duration|number|ordinal|spellout|time)\b/,alias:"keyword"},"arg-skeleton":{pattern:/(,\s*)::[^{}:=,\s]+/,lookbehind:!0},"arg-style":{pattern:/(,\s*)(?:currency|full|integer|long|medium|percent|short)(?=\s*$)/,lookbehind:!0},"arg-style-text":{pattern:RegExp(/(^\s*,\s*(?=\S))/.source+t(/(?:[^{}']|'[^']*'|\{(?:<SELF>)?\})+/.source,8)+"$"),lookbehind:!0,alias:"string"},punctuation:/,/}},"argument-delimiter":{pattern:/./,alias:"operator"}}},escape:r,string:{pattern:n,greedy:!0,inside:{escape:r}}},i.inside.message.inside=e.languages["icu-message-format"],e.languages["icu-message-format"].argument.inside.content.inside["choice-style"].inside.rest=e.languages["icu-message-format"]}(e)}function SB(e){e.register(SA),e.languages.idris=e.languages.extend("haskell",{comment:{pattern:/(?:(?:--|\|\|\|).*$|\{-[\s\S]*?-\})/m},keyword:/\b(?:Type|case|class|codata|constructor|corecord|data|do|dsl|else|export|if|implementation|implicit|import|impossible|in|infix|infixl|infixr|instance|interface|let|module|mutual|namespace|of|parameters|partial|postulate|private|proof|public|quoteGoal|record|rewrite|syntax|then|total|using|where|with)\b/,builtin:void 0}),e.languages.insertBefore("idris","keyword",{"import-statement":{pattern:/(^\s*import\s+)(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*/m,lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.idr=e.languages.idris}function Sz(e){e.languages.ignore={comment:/^#.*/m,entry:{pattern:/\S(?:.*(?:(?:\\ )|\S))?/,alias:"string",inside:{operator:/^!|\*\*?|\?/,regex:{pattern:/(^|[^\\])\[[^\[\]]*\]/,lookbehind:!0},punctuation:/\//}}},e.languages.gitignore=e.languages.ignore,e.languages.hgignore=e.languages.ignore,e.languages.npmignore=e.languages.ignore}function SH(e){e.languages.inform7={string:{pattern:/"[^"]*"/,inside:{substitution:{pattern:/\[[^\[\]]+\]/,inside:{delimiter:{pattern:/\[|\]/,alias:"punctuation"}}}}},comment:{pattern:/\[[^\[\]]+\]/,greedy:!0},title:{pattern:/^[ \t]*(?:book|chapter|part(?! of)|section|table|volume)\b.+/im,alias:"important"},number:{pattern:/(^|[^-])(?:\b\d+(?:\.\d+)?(?:\^\d+)?(?:(?!\d)\w+)?|\b(?:eight|eleven|five|four|nine|one|seven|six|ten|three|twelve|two))\b(?!-)/i,lookbehind:!0},verb:{pattern:/(^|[^-])\b(?:answering|applying to|are|asking|attacking|be(?:ing)?|burning|buying|called|carries|carry(?! out)|carrying|climbing|closing|conceal(?:ing|s)?|consulting|contain(?:ing|s)?|cutting|drinking|dropping|eating|enclos(?:es?|ing)|entering|examining|exiting|getting|giving|going|ha(?:s|ve|ving)|hold(?:ing|s)?|impl(?:ies|y)|incorporat(?:es?|ing)|inserting|is|jumping|kissing|listening|locking|looking|mean(?:ing|s)?|opening|provid(?:es?|ing)|pulling|pushing|putting|relat(?:es?|ing)|removing|searching|see(?:ing|s)?|setting|showing|singing|sleeping|smelling|squeezing|support(?:ing|s)?|swearing|switching|taking|tasting|telling|thinking|throwing|touching|turning|tying|unlock(?:ing|s)?|var(?:ies|y|ying)|waiting|waking|waving|wear(?:ing|s)?)\b(?!-)/i,lookbehind:!0,alias:"operator"},keyword:{pattern:/(^|[^-])\b(?:after|before|carry out|check|continue the action|definition(?= *:)|do nothing|else|end (?:if|the story|unless)|every turn|if|include|instead(?: of)?|let|move|no|now|otherwise|repeat|report|resume the story|rule for|running through|say(?:ing)?|stop the action|test|try(?:ing)?|understand|unless|use|when|while|yes)\b(?!-)/i,lookbehind:!0},property:{pattern:/(^|[^-])\b(?:adjacent(?! to)|carried|closed|concealed|contained|dark|described|edible|empty|enclosed|enterable|even|female|fixed in place|full|handled|held|improper-named|incorporated|inedible|invisible|lighted|lit|lock(?:able|ed)|male|marked for listing|mentioned|negative|neuter|non-(?:empty|full|recurring)|odd|opaque|open(?:able)?|plural-named|portable|positive|privately-named|proper-named|provided|publically-named|pushable between rooms|recurring|related|rubbing|scenery|seen|singular-named|supported|swinging|switch(?:able|ed(?: off| on)?)|touch(?:able|ed)|transparent|unconcealed|undescribed|unlit|unlocked|unmarked for listing|unmentioned|unopenable|untouchable|unvisited|variable|visible|visited|wearable|worn)\b(?!-)/i,lookbehind:!0,alias:"symbol"},position:{pattern:/(^|[^-])\b(?:above|adjacent to|back side of|below|between|down|east|everywhere|front side|here|in|inside(?: from)?|north(?:east|west)?|nowhere|on(?: top of)?|other side|outside(?: from)?|parts? of|regionally in|south(?:east|west)?|through|up|west|within)\b(?!-)/i,lookbehind:!0,alias:"keyword"},type:{pattern:/(^|[^-])\b(?:actions?|activit(?:ies|y)|actors?|animals?|backdrops?|containers?|devices?|directions?|doors?|holders?|kinds?|lists?|m[ae]n|nobody|nothing|nouns?|numbers?|objects?|people|persons?|player(?:'s holdall)?|regions?|relations?|rooms?|rule(?:book)?s?|scenes?|someone|something|supporters?|tables?|texts?|things?|time|vehicles?|wom[ae]n)\b(?!-)/i,lookbehind:!0,alias:"variable"},punctuation:/[.,:;(){}]/},e.languages.inform7.string.inside.substitution.inside.rest=e.languages.inform7,e.languages.inform7.string.inside.substitution.inside.rest.text={pattern:/\S(?:\s*\S)*/,alias:"comment"}}function S$(e){e.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/}}function SG(e){e.languages.io={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\/\/.*|#.*)/,lookbehind:!0,greedy:!0},"triple-quoted-string":{pattern:/"""(?:\\[\s\S]|(?!""")[^\\])*"""/,greedy:!0,alias:"string"},string:{pattern:/"(?:\\.|[^\\\r\n"])*"/,greedy:!0},keyword:/\b(?:activate|activeCoroCount|asString|block|break|call|catch|clone|collectGarbage|compileString|continue|do|doFile|doMessage|doString|else|elseif|exit|for|foreach|forward|getEnvironmentVariable|getSlot|hasSlot|if|ifFalse|ifNil|ifNilEval|ifTrue|isActive|isNil|isResumable|list|message|method|parent|pass|pause|perform|performWithArgList|print|println|proto|raise|raiseResumable|removeSlot|resend|resume|schedulerSleepSeconds|self|sender|setSchedulerSleepSeconds|setSlot|shallowCopy|slotNames|super|system|then|thisBlock|thisContext|try|type|uniqueId|updateSlot|wait|while|write|yield)\b/,builtin:/\b(?:Array|AudioDevice|AudioMixer|BigNum|Block|Box|Buffer|CFunction|CGI|Color|Curses|DBM|DNSResolver|DOConnection|DOProxy|DOServer|Date|Directory|Duration|DynLib|Error|Exception|FFT|File|Fnmatch|Font|Future|GL|GLE|GLScissor|GLU|GLUCylinder|GLUQuadric|GLUSphere|GLUT|Host|Image|Importer|LinkList|List|Lobby|Locals|MD5|MP3Decoder|MP3Encoder|Map|Message|Movie|Notification|Number|Object|OpenGL|Point|Protos|Random|Regex|SGML|SGMLElement|SGMLParser|SQLite|Sequence|Server|ShowMessage|SleepyCat|SleepyCatCursor|Socket|SocketManager|Sound|Soup|Store|String|Tree|UDPSender|UPDReceiver|URL|User|Warning|WeakLink)\b/,boolean:/\b(?:false|nil|true)\b/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e-?\d+)?/i,operator:/[=!*/%+\-^&|]=|>>?=?|<<?=?|:?:?=|\+\+?|--?|\*\*?|\/\/?|%|\|\|?|&&?|\b(?:and|not|or|return)\b|@@?|\?\??|\.\./,punctuation:/[{}[\];(),.:]/}}function Sq(e){e.languages.j={comment:{pattern:/\bNB\..*/,greedy:!0},string:{pattern:/'(?:''|[^'\r\n])*'/,greedy:!0},keyword:/\b(?:(?:CR|LF|adverb|conjunction|def|define|dyad|monad|noun|verb)\b|(?:assert|break|case|catch[dt]?|continue|do|else|elseif|end|fcase|for|for_\w+|goto_\w+|if|label_\w+|return|select|throw|try|while|whilst)\.)/,verb:{pattern:/(?!\^:|;\.|[=!][.:])(?:\{(?:\.|::?)?|p(?:\.\.?|:)|[=!\]]|[<>+*\-%$|,#][.:]?|[?^]\.?|[;\[]:?|[~}"i][.:]|[ACeEIjLor]\.|(?:[_\/\\qsux]|_?\d):)/,alias:"keyword"},number:/\b_?(?:(?!\d:)\d+(?:\.\d+)?(?:(?:ad|ar|[ejpx])_?\d+(?:\.\d+)?)*(?:b_?[\da-z]+(?:\.[\da-z]+)?)?|_\b(?!\.))/,adverb:{pattern:/[~}]|[\/\\]\.?|[bfM]\.|t[.:]/,alias:"builtin"},operator:/[=a][.:]|_\./,conjunction:{pattern:/&(?:\.:?|:)?|[.:@][.:]?|[!D][.:]|[;dHT]\.|`:?|[\^LS]:|"/,alias:"variable"},punctuation:/[()]/}}function SW(e){var t,n,r;e.register(vF),t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}},e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})}function SV(e){var t,n,r,a,i,s,o;e.register(TV),t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],r=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,a=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,i=/[{}\[\](),:;]/,e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:r,operator:a,punctuation:i},o=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:s={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php}}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:s}}],e.languages.insertBefore("php","variable",{string:o,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:o,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:r,operator:a,punctuation:i}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",function(t){/<\?/.test(t.code)&&e.languages["markup-templating"].buildPlaceholders(t,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"php")})}function SY(e){var t;Object.defineProperty(t=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/},"addSupport",{value:function(t,n){"string"==typeof t&&(t=[t]),t.forEach(function(t){!function(t,n){var r="doc-comment",a=e.languages[t];if(a){var i=a[r];if(!i){var s={};s[r]={pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"},i=(a=e.languages.insertBefore(t,"comment",s))[r]}if(i instanceof RegExp&&(i=a[r]={pattern:i}),Array.isArray(i))for(var o=0,l=i.length;o<l;o++)i[o]instanceof RegExp&&(i[o]={pattern:i[o]}),n(i[o]);else n(i)}}(t,function(e){e.inside||(e.inside={}),e.inside.rest=n})})}}),t.addSupport(["java","javascript","php"],t)}function SK(e){e.register(SW),e.languages.scala=e.languages.extend("java",{"triple-quoted-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:/<-|=>|\b(?:abstract|case|catch|class|def|derives|do|else|enum|extends|extension|final|finally|for|forSome|given|if|implicit|import|infix|inline|lazy|match|new|null|object|opaque|open|override|package|private|protected|return|sealed|self|super|this|throw|trait|transparent|try|type|using|val|var|while|with|yield)\b/,number:/\b0x(?:[\da-f]*\.)?[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e\d+)?[dfl]?/i,builtin:/\b(?:Any|AnyRef|AnyVal|Boolean|Byte|Char|Double|Float|Int|Long|Nothing|Short|String|Unit)\b/,symbol:/'[^\d\s\\]\w*/}),e.languages.insertBefore("scala","triple-quoted-string",{"string-interpolation":{pattern:/\b[a-z]\w*(?:"""(?:[^$]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*?"""|"(?:[^$"\r\n]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*")/i,greedy:!0,inside:{id:{pattern:/^\w+/,greedy:!0,alias:"function"},escape:{pattern:/\\\$"|\$[$"]/,greedy:!0,alias:"symbol"},interpolation:{pattern:/\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,greedy:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.scala}}},string:/[\s\S]+/}}}),delete e.languages.scala["class-name"],delete e.languages.scala.function,delete e.languages.scala.constant}function SX(e){var t,n,r;e.register(SW),e.register(SY),e.register(vP),t=/(^(?:[\t ]*(?:\*\s*)*))[^*\s].*$/m,n=/#\s*\w+(?:\s*\([^()]*\))?/.source,r=/(?:\b[a-zA-Z]\w+\s*\.\s*)*\b[A-Z]\w*(?:\s*<mem>)?|<mem>/.source.replace(/<mem>/g,function(){return n}),e.languages.javadoc=e.languages.extend("javadoclike",{}),e.languages.insertBefore("javadoc","keyword",{reference:{pattern:RegExp(/(@(?:exception|link|linkplain|see|throws|value)\s+(?:\*\s*)?)/.source+"(?:"+r+")"),lookbehind:!0,inside:{function:{pattern:/(#\s*)\w+(?=\s*\()/,lookbehind:!0},field:{pattern:/(#\s*)\w+/,lookbehind:!0},namespace:{pattern:/\b(?:[a-z]\w*\s*\.\s*)+/,inside:{punctuation:/\./}},"class-name":/\b[A-Z]\w*/,keyword:e.languages.java.keyword,punctuation:/[#()[\],.]/}},"class-name":{pattern:/(@param\s+)<[A-Z]\w*>/,lookbehind:!0,inside:{punctuation:/[.<>]/}},"code-section":[{pattern:/(\{@code\s+(?!\s))(?:[^\s{}]|\s+(?![\s}])|\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*\})+(?=\s*\})/,lookbehind:!0,inside:{code:{pattern:t,lookbehind:!0,inside:e.languages.java,alias:"language-java"}}},{pattern:/(<(code|pre|tt)>(?!<code>)\s*)\S(?:\S|\s+\S)*?(?=\s*<\/\2>)/,lookbehind:!0,inside:{line:{pattern:t,lookbehind:!0,inside:{tag:e.languages.markup.tag,entity:e.languages.markup.entity,code:{pattern:/.+/,inside:e.languages.java,alias:"language-java"}}}}}],tag:e.languages.markup.tag,entity:e.languages.markup.entity}),e.languages.javadoclike.addSupport("java",e.languages.javadoc)}function SZ(e){e.languages.javastacktrace={summary:{pattern:/^([\t ]*)(?:(?:Caused by:|Suppressed:|Exception in thread "[^"]*")[\t ]+)?[\w$.]+(?::.*)?$/m,lookbehind:!0,inside:{keyword:{pattern:/^([\t ]*)(?:(?:Caused by|Suppressed)(?=:)|Exception in thread)/m,lookbehind:!0},string:{pattern:/^(\s*)"[^"]*"/,lookbehind:!0},exceptions:{pattern:/^(:?\s*)[\w$.]+(?=:|$)/,lookbehind:!0,inside:{"class-name":/[\w$]+$/,namespace:/\b[a-z]\w*\b/,punctuation:/\./}},message:{pattern:/(:\s*)\S.*/,lookbehind:!0,alias:"string"},punctuation:/:/}},"stack-frame":{pattern:/^([\t ]*)at (?:[\w$./]|@[\w$.+-]*\/)+(?:<init>)?\([^()]*\)/m,lookbehind:!0,inside:{keyword:{pattern:/^(\s*)at(?= )/,lookbehind:!0},source:[{pattern:/(\()\w+\.\w+:\d+(?=\))/,lookbehind:!0,inside:{file:/^\w+\.\w+/,punctuation:/:/,"line-number":{pattern:/\b\d+\b/,alias:"number"}}},{pattern:/(\()[^()]*(?=\))/,lookbehind:!0,inside:{keyword:/^(?:Native Method|Unknown Source)$/}}],"class-name":/[\w$]+(?=\.(?:<init>|[\w$]+)\()/,function:/(?:<init>|[\w$]+)(?=\()/,"class-loader":{pattern:/(\s)[a-z]\w*(?:\.[a-z]\w*)*(?=\/[\w@$.]*\/)/,lookbehind:!0,alias:"namespace",inside:{punctuation:/\./}},module:{pattern:/([\s/])[a-z]\w*(?:\.[a-z]\w*)*(?:@[\w$.+-]*)?(?=\/)/,lookbehind:!0,inside:{version:{pattern:/(@)[\s\S]+/,lookbehind:!0,alias:"number"},punctuation:/[@.]/}},namespace:{pattern:/(?:\b[a-z]\w*\.)+/,inside:{punctuation:/\./}},punctuation:/[()/.]/}},more:{pattern:/^([\t ]*)\.{3} \d+ [a-z]+(?: [a-z]+)*/m,lookbehind:!0,inside:{punctuation:/\.{3}/,number:/\d+/,keyword:/\b[a-z]+(?: [a-z]+)*\b/}}}}function SQ(e){e.languages.jexl={string:/(["'])(?:\\[\s\S]|(?!\1)[^\\])*\1/,transform:{pattern:/(\|\s*)[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][\wа-яА-Я\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*/,alias:"function",lookbehind:!0},function:/[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][\wа-яА-Я\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*\s*(?=\()/,number:/\b\d+(?:\.\d+)?\b|\B\.\d+\b/,operator:/[<>!]=?|-|\+|&&|==|\|\|?|\/\/?|[?:*^%]/,boolean:/\b(?:false|true)\b/,keyword:/\bin\b/,punctuation:/[{}[\](),.]/}}function SJ(e){e.register(vF),e.languages.jolie=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\[\s\S]|[^"\\])*"/,lookbehind:!0,greedy:!0},"class-name":{pattern:/((?:\b(?:as|courier|embed|in|inputPort|outputPort|service)\b|@)[ \t]*)\w+/,lookbehind:!0},keyword:/\b(?:as|cH|comp|concurrent|constants|courier|cset|csets|default|define|else|embed|embedded|execution|exit|extender|for|foreach|forward|from|global|if|import|in|include|init|inputPort|install|instanceof|interface|is_defined|linkIn|linkOut|main|new|nullProcess|outputPort|over|private|provide|public|scope|sequential|service|single|spawn|synchronized|this|throw|throws|type|undef|until|while|with)\b/,function:/\b[a-z_]\w*(?=[ \t]*[@(])/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?l?/i,operator:/-[-=>]?|\+[+=]?|<[<=]?|[>=*!]=?|&&|\|\||[?\/%^@|]/,punctuation:/[()[\]{},;.:]/,builtin:/\b(?:Byte|any|bool|char|double|enum|float|int|length|long|ranges|regex|string|undefined|void)\b/}),e.languages.insertBefore("jolie","keyword",{aggregates:{pattern:/(\bAggregates\s*:\s*)(?:\w+(?:\s+with\s+\w+)?\s*,\s*)*\w+(?:\s+with\s+\w+)?/,lookbehind:!0,inside:{keyword:/\bwith\b/,"class-name":/\w+/,punctuation:/,/}},redirects:{pattern:/(\bRedirects\s*:\s*)(?:\w+\s*=>\s*\w+\s*,\s*)*(?:\w+\s*=>\s*\w+)/,lookbehind:!0,inside:{punctuation:/,/,"class-name":/\w+/,operator:/=>/}},property:{pattern:/\b(?:Aggregates|[Ii]nterfaces|Java|Javascript|Jolie|[Ll]ocation|OneWay|[Pp]rotocol|Redirects|RequestResponse)\b(?=[ \t]*:)/}})}function S0(e){var t,n,r,a;t=/\\\((?:[^()]|\([^()]*\))*\)/.source,n=RegExp(/(^|[^\\])"(?:[^"\r\n\\]|\\[^\r\n(]|__)*"/.source.replace(/__/g,function(){return t})),r={interpolation:{pattern:RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+t),lookbehind:!0,inside:{content:{pattern:/^(\\\()[\s\S]+(?=\)$)/,lookbehind:!0,inside:null},punctuation:/^\\\(|\)$/}}},a=e.languages.jq={comment:/#.*/,property:{pattern:RegExp(n.source+/(?=\s*:(?!:))/.source),lookbehind:!0,greedy:!0,inside:r},string:{pattern:n,lookbehind:!0,greedy:!0,inside:r},function:{pattern:/(\bdef\s+)[a-z_]\w+/i,lookbehind:!0},variable:/\B\$\w+/,"property-literal":{pattern:/\b[a-z_]\w*(?=\s*:(?!:))/i,alias:"property"},keyword:/\b(?:as|break|catch|def|elif|else|end|foreach|if|import|include|label|module|modulemeta|null|reduce|then|try|while)\b/,boolean:/\b(?:false|true)\b/,number:/(?:\b\d+\.|\B\.)?\b\d+(?:[eE][+-]?\d+)?\b/,operator:[{pattern:/\|=?/,alias:"pipe"},/\.\.|[!=<>]?=|\?\/\/|\/\/=?|[-+*/%]=?|[<>?]|\b(?:and|not|or)\b/],"c-style-function":{pattern:/\b[a-z_]\w*(?=\s*\()/i,alias:"function"},punctuation:/::|[()\[\]{},:;]|\.(?=\s*[\[\w$])/,dot:{pattern:/\./,alias:"important"}},r.interpolation.inside.content.inside=a}function S1(e){e.register(vB),function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,a=r.inside["interpolation-punctuation"],i=r.pattern.source;function s(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function o(t,n,r){var a={code:t,grammar:n,language:r};return e.hooks.run("before-tokenize",a),a.tokens=e.tokenize(a.code,a.grammar),e.hooks.run("after-tokenize",a),a.tokens}e.languages.javascript["template-string"]=[s("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),s("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),s("svg",/\bsvg/.source),s("markdown",/\b(?:markdown|md)/.source),s("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),s("sql",/\bsql/.source),t].filter(Boolean);var l={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};e.hooks.add("after-tokenize",function(t){t.language in l&&function t(n){for(var s=0,l=n.length;s<l;s++){var c=n[s];if("string"!=typeof c){var u=c.content;if(!Array.isArray(u)){"string"!=typeof u&&t([u]);continue}if("template-string"===c.type){var d=u[1];if(3===u.length&&"string"!=typeof d&&"embedded-code"===d.type){var p=function e(t){return"string"==typeof t?t:Array.isArray(t)?t.map(e).join(""):e(t.content)}(d),m=d.alias,f=Array.isArray(m)?m[0]:m,h=e.languages[f];if(!h)continue;u[1]=function(t,n,s){var l=e.tokenize(t,{interpolation:{pattern:RegExp(i),lookbehind:!0}}),c=0,u={},d=o(l.map(function(e){if("string"==typeof e)return e;for(var n,r,a=e.content;-1!==t.indexOf((n=c++,r="___"+s.toUpperCase()+"_"+n+"___")););return u[r]=a,r}).join(""),n,s),p=Object.keys(u);return c=0,!function t(n){for(var i=0;i<n.length;i++){if(c>=p.length)return;var s=n[i];if("string"==typeof s||"string"==typeof s.content){var l=p[c],d="string"==typeof s?s:s.content,m=d.indexOf(l);if(-1!==m){++c;var f=d.substring(0,m),h=function(t){var n={};n["interpolation-punctuation"]=a;var i=e.tokenize(t,n);if(3===i.length){var s=[1,1];s.push.apply(s,o(i[1],e.languages.javascript,"javascript")),i.splice.apply(i,s)}return new e.Token("interpolation",i,r.alias,t)}(u[l]),g=d.substring(m+l.length),b=[];if(f&&b.push(f),b.push(h),g){var y=[g];t(y),b.push.apply(b,y)}"string"==typeof s?(n.splice.apply(n,[i,1].concat(b)),i+=b.length-1):s.content=b}}else{var E=s.content;Array.isArray(E)?t(E):t([E])}}}(d),new e.Token(s,d,"language-"+s,t)}(p,h,f)}}else t(u)}}}(t.tokens)})}(e)}function S2(e){var t;e.register(vB),e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"],t=e.languages.extend("typescript",{}),delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}function S3(e){var t,n,r;e.register(SY),e.register(vB),e.register(S2),t=e.languages.javascript,r="(@(?:arg|argument|param|property)\\s+(?:"+(n=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source)+"\\s+)?)",e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(r+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(r+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,function(){return n})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{string:t.string,number:t.number,boolean:t.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:t,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)}function S4(e){e.register(vB),e.languages.n4js=e.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),e.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),e.languages.n4jsd=e.languages.n4js}function S5(e){e.register(vB),function(e){function t(e,t){return RegExp(e.replace(/<ID>/g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r<n.length;r++){var a=n[r],i=e.languages.javascript[a];"RegExp"===e.util.type(i)&&(i=e.languages.javascript[a]={pattern:i});var s=i.inside||{};i.inside=s,s["maybe-class-name"]=/^[A-Z][\s\S]*/}}(e)}function S6(e){var t;e.register(SL),t=/("|')(?:\\(?:\r\n?|\n|.)|(?!\1)[^\\\r\n])*\1/,e.languages.json5=e.languages.extend("json",{property:[{pattern:RegExp(t.source+"(?=\\s*:)"),greedy:!0},{pattern:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/,alias:"unquoted"}],string:{pattern:t,greedy:!0},number:/[+-]?\b(?:NaN|Infinity|0x[a-fA-F\d]+)\b|[+-]?(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+\b)?/})}function S9(e){e.register(SL),e.languages.jsonp=e.languages.extend("json",{punctuation:/[{}[\]();,.]/}),e.languages.insertBefore("jsonp","punctuation",{function:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*\()/})}function S8(e){e.languages.jsstacktrace={"error-message":{pattern:/^\S.*/m,alias:"string"},"stack-frame":{pattern:/(^[ \t]+)at[ \t].*/m,lookbehind:!0,inside:{"not-my-code":{pattern:/^at[ \t]+(?!\s)(?:node\.js|<unknown>|.*(?:node_modules|\(<anonymous>\)|\(<unknown>|<anonymous>$|\(internal\/|\(node\.js)).*/m,alias:"comment"},filename:{pattern:/(\bat\s+(?!\s)|\()(?:[a-zA-Z]:)?[^():]+(?=:)/,lookbehind:!0,alias:"url"},function:{pattern:/(\bat\s+(?:new\s+)?)(?!\s)[_$a-zA-Z\xA0-\uFFFF<][.$\w\xA0-\uFFFF<>]*/,lookbehind:!0,inside:{punctuation:/\./}},punctuation:/[()]/,keyword:/\b(?:at|new)\b/,alias:{pattern:/\[(?:as\s+)?(?!\s)[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\]/,alias:"variable"},"line-number":{pattern:/:\d+(?::\d+)?\b/,alias:"number",inside:{punctuation:/:/}}}}}}function S7(e){e.languages.julia={comment:{pattern:/(^|[^\\])(?:#=(?:[^#=]|=(?!#)|#(?!=)|#=(?:[^#=]|=(?!#)|#(?!=))*=#)*=#|#.*)/,lookbehind:!0},regex:{pattern:/r"(?:\\.|[^"\\\r\n])*"[imsx]{0,4}/,greedy:!0},string:{pattern:/"""[\s\S]+?"""|(?:\b\w+)?"(?:\\.|[^"\\\r\n])*"|`(?:[^\\`\r\n]|\\.)*`/,greedy:!0},char:{pattern:/(^|[^\w'])'(?:\\[^\r\n][^'\r\n]*|[^\\\r\n])'/,lookbehind:!0,greedy:!0},keyword:/\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|in|let|local|macro|module|print|println|quote|return|struct|try|type|typealias|using|while)\b/,boolean:/\b(?:false|true)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[box])?(?:[\da-f]+(?:_[\da-f]+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[efp][+-]?\d+(?:_\d+)*)?j?/i,operator:/&&|\|\||[-+*^%÷⊻&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:|])?|>(?:=|>>?=?)?|==?=?|[~≠≤≥'√∛]/,punctuation:/::?|[{}[\]();,.?]/,constant:/\b(?:(?:Inf|NaN)(?:16|32|64)?|im|pi)\b|[πℯ]/}}function _e(e){e.languages.keepalived={comment:{pattern:/[#!].*/,greedy:!0},string:{pattern:/(^|[^\\])(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,lookbehind:!0,greedy:!0},ip:{pattern:RegExp(/\b(?:(?:(?:[\da-f]{1,4}:){7}[\da-f]{1,4}|(?:[\da-f]{1,4}:){6}:[\da-f]{1,4}|(?:[\da-f]{1,4}:){5}:(?:[\da-f]{1,4}:)?[\da-f]{1,4}|(?:[\da-f]{1,4}:){4}:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4}|(?:[\da-f]{1,4}:){3}:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4}|(?:[\da-f]{1,4}:){2}:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4}|(?:[\da-f]{1,4}:){6}<ipv4>|(?:[\da-f]{1,4}:){0,5}:<ipv4>|::(?:[\da-f]{1,4}:){0,5}<ipv4>|[\da-f]{1,4}::(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4}|::(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4}|(?:[\da-f]{1,4}:){1,7}:)(?:\/\d{1,3})?|<ipv4>(?:\/\d{1,2})?)\b/.source.replace(/<ipv4>/g,function(){return/(?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d))/.source}),"i"),alias:"number"},path:{pattern:/(\s)\/(?:[^\/\s]+\/)*[^\/\s]*|\b[a-zA-Z]:\\(?:[^\\\s]+\\)*[^\\\s]*/,lookbehind:!0,alias:"string"},variable:/\$\{?\w+\}?/,email:{pattern:/[\w-]+@[\w-]+(?:\.[\w-]{2,3}){1,2}/,alias:"string"},"conditional-configuration":{pattern:/@\^?[\w-]+/,alias:"variable"},operator:/=/,property:/\b(?:BFD_CHECK|DNS_CHECK|FILE_CHECK|HTTP_GET|MISC_CHECK|NAME|PING_CHECK|SCRIPTS|SMTP_CHECK|SSL|SSL_GET|TCP_CHECK|UDP_CHECK|accept|advert_int|alpha|auth_pass|auth_type|authentication|bfd_cpu_affinity|bfd_instance|bfd_no_swap|bfd_priority|bfd_process_name|bfd_rlimit_rttime|bfd_rt_priority|bind_if|bind_port|bindto|ca|certificate|check_unicast_src|checker|checker_cpu_affinity|checker_log_all_failures|checker_no_swap|checker_priority|checker_rlimit_rttime|checker_rt_priority|child_wait_time|connect_ip|connect_port|connect_timeout|dbus_service_name|debug|default_interface|delay|delay_before_retry|delay_loop|digest|dont_track_primary|dynamic|dynamic_interfaces|enable_(?:dbus|script_security|sni|snmp_checker|snmp_rfc|snmp_rfcv2|snmp_rfcv3|snmp_vrrp|traps)|end|fall|fast_recovery|file|flag-[123]|fork_delay|full_command|fwmark|garp_group|garp_interval|garp_lower_prio_delay|garp_lower_prio_repeat|garp_master_delay|garp_master_refresh|garp_master_refresh_repeat|garp_master_repeat|global_defs|global_tracking|gna_interval|group|ha_suspend|hashed|helo_name|higher_prio_send_advert|hoplimit|http_protocol|hysteresis|idle_tx|include|inhibit_on_failure|init_fail|init_file|instance|interface|interfaces|interval|ip_family|ipvs_process_name|keepalived.conf|kernel_rx_buf_size|key|linkbeat_interfaces|linkbeat_use_polling|log_all_failures|log_unknown_vrids|lower_prio_no_advert|lthreshold|lvs_flush|lvs_flush_onstop|lvs_method|lvs_netlink_cmd_rcv_bufs|lvs_netlink_cmd_rcv_bufs_force|lvs_netlink_monitor_rcv_bufs|lvs_netlink_monitor_rcv_bufs_force|lvs_notify_fifo|lvs_notify_fifo_script|lvs_sched|lvs_sync_daemon|max_auto_priority|max_hops|mcast_src_ip|mh-fallback|mh-port|min_auto_priority_delay|min_rx|min_tx|misc_dynamic|misc_path|misc_timeout|multiplier|name|namespace_with_ipsets|native_ipv6|neighbor_ip|net_namespace|net_namespace_ipvs|nftables|nftables_counters|nftables_ifindex|nftables_priority|no_accept|no_checker_emails|no_email_faults|nopreempt|notification_email|notification_email_from|notify|notify_backup|notify_deleted|notify_down|notify_fault|notify_fifo|notify_fifo_script|notify_master|notify_master_rx_lower_pri|notify_priority_changes|notify_stop|notify_up|old_unicast_checksum|omega|ops|param_match|passive|password|path|persistence_engine|persistence_granularity|persistence_timeout|preempt|preempt_delay|priority|process|process_monitor_rcv_bufs|process_monitor_rcv_bufs_force|process_name|process_names|promote_secondaries|protocol|proxy_arp|proxy_arp_pvlan|quorum|quorum_down|quorum_max|quorum_up|random_seed|real_server|regex|regex_max_offset|regex_min_offset|regex_no_match|regex_options|regex_stack|reload_repeat|reload_time_file|require_reply|retry|rise|router_id|rs_init_notifies|script|script_user|sh-fallback|sh-port|shutdown_script|shutdown_script_timeout|skip_check_adv_addr|smtp_alert|smtp_alert_checker|smtp_alert_vrrp|smtp_connect_timeout|smtp_helo_name|smtp_server|snmp_socket|sorry_server|sorry_server_inhibit|sorry_server_lvs_method|source_ip|start|startup_script|startup_script_timeout|state|static_ipaddress|static_routes|static_rules|status_code|step|strict_mode|sync_group_tracking_weight|terminate_delay|timeout|track_bfd|track_file|track_group|track_interface|track_process|track_script|track_src_ip|ttl|type|umask|unicast_peer|unicast_src_ip|unicast_ttl|url|use_ipvlan|use_pid_dir|use_vmac|user|uthreshold|val[123]|version|virtual_ipaddress|virtual_ipaddress_excluded|virtual_router_id|virtual_routes|virtual_rules|virtual_server|virtual_server_group|virtualhost|vmac_xmit_base|vrrp|vrrp_(?:check_unicast_src|cpu_affinity|garp_interval|garp_lower_prio_delay|garp_lower_prio_repeat|garp_master_delay|garp_master_refresh|garp_master_refresh_repeat|garp_master_repeat|gna_interval|higher_prio_send_advert|instance|ipsets|iptables|lower_prio_no_advert|mcast_group4|mcast_group6|min_garp|netlink_cmd_rcv_bufs|netlink_cmd_rcv_bufs_force|netlink_monitor_rcv_bufs|netlink_monitor_rcv_bufs_force|no_swap|notify_fifo|notify_fifo_script|notify_priority_changes|priority|process_name|rlimit_rttime|rt_priority|rx_bufs_multiplier|rx_bufs_policy|script|skip_check_adv_addr|startup_delay|strict|sync_group|track_process|version)|warmup|weight)\b/,constant:/\b(?:A|AAAA|AH|BACKUP|CNAME|DR|MASTER|MX|NAT|NS|PASS|SCTP|SOA|TCP|TUN|TXT|UDP|dh|fo|lblc|lblcr|lc|mh|nq|ovf|rr|sed|sh|wlc|wrr)\b/,number:{pattern:/(^|[^\w.-])-?\d+(?:\.\d+)?/,lookbehind:!0},boolean:/\b(?:false|no|off|on|true|yes)\b/,punctuation:/[\{\}]/}}function _t(e){e.languages.keyman={comment:{pattern:/\bc .*/i,greedy:!0},string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,greedy:!0},"virtual-key":{pattern:/\[\s*(?:(?:ALT|CAPS|CTRL|LALT|LCTRL|NCAPS|RALT|RCTRL|SHIFT)\s+)*(?:[TKU]_[\w?]+|[A-E]\d\d?|"[^"\r\n]*"|'[^'\r\n]*')\s*\]/i,greedy:!0,alias:"function"},"header-keyword":{pattern:/&\w+/,alias:"bold"},"header-statement":{pattern:/\b(?:bitmap|bitmaps|caps always off|caps on only|copyright|hotkey|language|layout|message|name|shift frees caps|version)\b/i,alias:"bold"},"rule-keyword":{pattern:/\b(?:any|baselayout|beep|call|context|deadkey|dk|if|index|layer|notany|nul|outs|platform|reset|return|save|set|store|use)\b/i,alias:"keyword"},"structural-keyword":{pattern:/\b(?:ansi|begin|group|match|newcontext|nomatch|postkeystroke|readonly|unicode|using keys)\b/i,alias:"keyword"},"compile-target":{pattern:/\$(?:keyman|keymanonly|keymanweb|kmfl|weaver):/i,alias:"property"},number:/\b(?:U\+[\dA-F]+|d\d+|x[\da-f]+|\d+)\b/i,operator:/[+>\\$]|\.\./,punctuation:/[()=,]/}}function _n(e){var t;e.register(vF),e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"],t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}},e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}function _r(e){var t=/\s\x00-\x1f\x22-\x2f\x3a-\x3f\x5b-\x5e\x60\x7b-\x7e/.source;function n(e,n){return RegExp(e.replace(/<nonId>/g,t),n)}e.languages.kumir={comment:{pattern:/\|.*/},prolog:{pattern:/#.*/,greedy:!0},string:{pattern:/"[^\n\r"]*"|'[^\n\r']*'/,greedy:!0},boolean:{pattern:n(/(^|[<nonId>])(?:да|нет)(?=[<nonId>]|$)/.source),lookbehind:!0},"operator-word":{pattern:n(/(^|[<nonId>])(?:и|или|не)(?=[<nonId>]|$)/.source),lookbehind:!0,alias:"keyword"},"system-variable":{pattern:n(/(^|[<nonId>])знач(?=[<nonId>]|$)/.source),lookbehind:!0,alias:"keyword"},type:[{pattern:n(/(^|[<nonId>])(?:вещ|лит|лог|сим|цел)(?:\x20*таб)?(?=[<nonId>]|$)/.source),lookbehind:!0,alias:"builtin"},{pattern:n(/(^|[<nonId>])(?:компл|сканкод|файл|цвет)(?=[<nonId>]|$)/.source),lookbehind:!0,alias:"important"}],keyword:{pattern:n(/(^|[<nonId>])(?:алг|арг(?:\x20*рез)?|ввод|ВКЛЮЧИТЬ|вс[её]|выбор|вывод|выход|дано|для|до|дс|если|иначе|исп|использовать|кон(?:(?:\x20+|_)исп)?|кц(?:(?:\x20+|_)при)?|надо|нач|нс|нц|от|пауза|пока|при|раза?|рез|стоп|таб|то|утв|шаг)(?=[<nonId>]|$)/.source),lookbehind:!0},name:{pattern:n(/(^|[<nonId>])[^\d<nonId>][^<nonId>]*(?:\x20+[^<nonId>]+)*(?=[<nonId>]|$)/.source),lookbehind:!0},number:{pattern:n(/(^|[<nonId>])(?:\B\$[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)(?=[<nonId>]|$)/.source,"i"),lookbehind:!0},punctuation:/:=|[(),:;\[\]]/,"operator-char":{pattern:/\*\*?|<[=>]?|>=?|[-+/=]/,alias:"operator"}},e.languages.kum=e.languages.kumir}function _a(e){e.languages.kusto={comment:{pattern:/\/\/.*/,greedy:!0},string:{pattern:/```[\s\S]*?```|[hH]?(?:"(?:[^\r\n\\"]|\\.)*"|'(?:[^\r\n\\']|\\.)*'|@(?:"[^\r\n"]*"|'[^\r\n']*'))/,greedy:!0},verb:{pattern:/(\|\s*)[a-z][\w-]*/i,lookbehind:!0,alias:"keyword"},command:{pattern:/\.[a-z][a-z\d-]*\b/,alias:"keyword"},"class-name":/\b(?:bool|datetime|decimal|dynamic|guid|int|long|real|string|timespan)\b/,keyword:/\b(?:access|alias|and|anti|as|asc|auto|between|by|(?:contains|(?:ends|starts)with|has(?:perfix|suffix)?)(?:_cs)?|database|declare|desc|external|from|fullouter|has_all|in|ingestion|inline|inner|innerunique|into|(?:left|right)(?:anti(?:semi)?|inner|outer|semi)?|let|like|local|not|of|on|or|pattern|print|query_parameters|range|restrict|schema|set|step|table|tables|to|view|where|with|matches\s+regex|nulls\s+(?:first|last))(?![\w-])/,boolean:/\b(?:false|null|true)\b/,function:/\b[a-z_]\w*(?=\s*\()/,datetime:[{pattern:/\b(?:(?:Fri|Friday|Mon|Monday|Sat|Saturday|Sun|Sunday|Thu|Thursday|Tue|Tuesday|Wed|Wednesday)\s*,\s*)?\d{1,2}(?:\s+|-)(?:Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)(?:\s+|-)\d{2}\s+\d{2}:\d{2}(?::\d{2})?(?:\s*(?:\b(?:[A-Z]|(?:[ECMT][DS]|GM|U)T)|[+-]\d{4}))?\b/,alias:"number"},{pattern:/[+-]?\b(?:\d{4}-\d{2}-\d{2}(?:[ T]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)?|\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)Z?/,alias:"number"}],number:/\b(?:0x[0-9A-Fa-f]+|\d+(?:\.\d+)?(?:[Ee][+-]?\d+)?)(?:(?:min|sec|[mnµ]s|[dhms]|microsecond|tick)\b)?|[+-]?\binf\b/,operator:/=>|[!=]~|[!=<>]=?|[-+*/%|]|\.\./,punctuation:/[()\[\]{},;.:]/}}function _i(e){var t,n;n={"equation-command":{pattern:t=/\\(?:[^a-z()[\]]|[a-z*]+)/i,alias:"regex"}},e.languages.latex={comment:/%.*/,cdata:{pattern:/(\\begin\{((?:lstlisting|verbatim)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0},equation:[{pattern:/\$\$(?:\\[\s\S]|[^\\$])+\$\$|\$(?:\\[\s\S]|[^\\$])+\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/,inside:n,alias:"string"},{pattern:/(\\begin\{((?:align|eqnarray|equation|gather|math|multline)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0,inside:n,alias:"string"}],keyword:{pattern:/(\\(?:begin|cite|documentclass|end|label|ref|usepackage)(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0},url:{pattern:/(\\url\{)[^}]+(?=\})/,lookbehind:!0},headline:{pattern:/(\\(?:chapter|frametitle|paragraph|part|section|subparagraph|subsection|subsubparagraph|subsubsection|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0,alias:"class-name"},function:{pattern:t,alias:"selector"},punctuation:/[[\]{}&]/},e.languages.tex=e.languages.latex,e.languages.context=e.languages.latex}function _s(e){var t;e.register(vF),e.register(TV),e.register(SV),e.languages.latte={comment:/^\{\*[\s\S]*/,"latte-tag":{pattern:/(^\{(?:\/(?=[a-z]))?)(?:[=_]|[a-z]\w*\b(?!\())/i,lookbehind:!0,alias:"important"},delimiter:{pattern:/^\{\/?|\}$/,alias:"punctuation"},php:{pattern:/\S(?:[\s\S]*\S)?/,alias:"language-php",inside:e.languages.php}},t=e.languages.extend("markup",{}),e.languages.insertBefore("inside","attr-value",{"n-attr":{pattern:/n:[\w-]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+))?/,inside:{"attr-name":{pattern:/^[^\s=]+/,alias:"important"},"attr-value":{pattern:/=[\s\S]+/,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}],php:{pattern:/\S(?:[\s\S]*\S)?/,inside:e.languages.php}}}}}},t.tag),e.hooks.add("before-tokenize",function(n){"latte"===n.language&&(e.languages["markup-templating"].buildPlaceholders(n,"latte",/\{\*[\s\S]*?\*\}|\{[^'"\s{}*](?:[^"'/{}]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|\/\*(?:[^*]|\*(?!\/))*\*\/)*\}/g),n.grammar=t)}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"latte")})}function _o(e){e.languages.scheme={comment:/;.*|#;\s*(?:\((?:[^()]|\([^()]*\))*\)|\[(?:[^\[\]]|\[[^\[\]]*\])*\])|#\|(?:[^#|]|#(?!\|)|\|(?!#)|#\|(?:[^#|]|#(?!\|)|\|(?!#))*\|#)*\|#/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()\[\]#'\s]+/,greedy:!0},char:{pattern:/#\\(?:[ux][a-fA-F\d]+\b|[-a-zA-Z]+\b|[\uD800-\uDBFF][\uDC00-\uDFFF]|\S)/,greedy:!0},"lambda-parameter":[{pattern:/((?:^|[^'`#])[(\[]lambda\s+)(?:[^|()\[\]'\s]+|\|(?:[^\\|]|\\.)*\|)/,lookbehind:!0},{pattern:/((?:^|[^'`#])[(\[]lambda\s+[(\[])[^()\[\]']+/,lookbehind:!0}],keyword:{pattern:/((?:^|[^'`#])[(\[])(?:begin|case(?:-lambda)?|cond(?:-expand)?|define(?:-library|-macro|-record-type|-syntax|-values)?|defmacro|delay(?:-force)?|do|else|except|export|guard|if|import|include(?:-ci|-library-declarations)?|lambda|let(?:rec)?(?:-syntax|-values|\*)?|let\*-values|only|parameterize|prefix|(?:quasi-?)?quote|rename|set!|syntax-(?:case|rules)|unless|unquote(?:-splicing)?|when)(?=[()\[\]\s]|$)/,lookbehind:!0},builtin:{pattern:/((?:^|[^'`#])[(\[])(?:abs|and|append|apply|assoc|ass[qv]|binary-port\?|boolean=?\?|bytevector(?:-append|-copy|-copy!|-length|-u8-ref|-u8-set!|\?)?|caar|cadr|call-with-(?:current-continuation|port|values)|call\/cc|car|cdar|cddr|cdr|ceiling|char(?:->integer|-ready\?|\?|<\?|<=\?|=\?|>\?|>=\?)|close-(?:input-port|output-port|port)|complex\?|cons|current-(?:error|input|output)-port|denominator|dynamic-wind|eof-object\??|eq\?|equal\?|eqv\?|error|error-object(?:-irritants|-message|\?)|eval|even\?|exact(?:-integer-sqrt|-integer\?|\?)?|expt|features|file-error\?|floor(?:-quotient|-remainder|\/)?|flush-output-port|for-each|gcd|get-output-(?:bytevector|string)|inexact\??|input-port(?:-open\?|\?)|integer(?:->char|\?)|lcm|length|list(?:->string|->vector|-copy|-ref|-set!|-tail|\?)?|make-(?:bytevector|list|parameter|string|vector)|map|max|member|memq|memv|min|modulo|negative\?|newline|not|null\?|number(?:->string|\?)|numerator|odd\?|open-(?:input|output)-(?:bytevector|string)|or|output-port(?:-open\?|\?)|pair\?|peek-char|peek-u8|port\?|positive\?|procedure\?|quotient|raise|raise-continuable|rational\?|rationalize|read-(?:bytevector|bytevector!|char|error\?|line|string|u8)|real\?|remainder|reverse|round|set-c[ad]r!|square|string(?:->list|->number|->symbol|->utf8|->vector|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?|<\?|<=\?|=\?|>\?|>=\?)?|substring|symbol(?:->string|\?|=\?)|syntax-error|textual-port\?|truncate(?:-quotient|-remainder|\/)?|u8-ready\?|utf8->string|values|vector(?:->list|->string|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?)?|with-exception-handler|write-(?:bytevector|char|string|u8)|zero\?)(?=[()\[\]\s]|$)/,lookbehind:!0},operator:{pattern:/((?:^|[^'`#])[(\[])(?:[-+*%/]|[<>]=?|=>?)(?=[()\[\]\s]|$)/,lookbehind:!0},number:{pattern:RegExp(function(e){for(var t in e)e[t]=e[t].replace(/<[\w\s]+>/g,function(t){return"(?:"+e[t].trim()+")"});return e[t]}({"<ureal dec>":/\d+(?:\/\d+)|(?:\d+(?:\.\d*)?|\.\d+)(?:[esfdl][+-]?\d+)?/.source,"<real dec>":/[+-]?<ureal dec>|[+-](?:inf|nan)\.0/.source,"<imaginary dec>":/[+-](?:<ureal dec>|(?:inf|nan)\.0)?i/.source,"<complex dec>":/<real dec>(?:@<real dec>|<imaginary dec>)?|<imaginary dec>/.source,"<num dec>":/(?:#d(?:#[ei])?|#[ei](?:#d)?)?<complex dec>/.source,"<ureal box>":/[0-9a-f]+(?:\/[0-9a-f]+)?/.source,"<real box>":/[+-]?<ureal box>|[+-](?:inf|nan)\.0/.source,"<imaginary box>":/[+-](?:<ureal box>|(?:inf|nan)\.0)?i/.source,"<complex box>":/<real box>(?:@<real box>|<imaginary box>)?|<imaginary box>/.source,"<num box>":/#[box](?:#[ei])?|(?:#[ei])?#[box]<complex box>/.source,"<number>":/(^|[()\[\]\s])(?:<num dec>|<num box>)(?=[()\[\]\s]|$)/.source}),"i"),lookbehind:!0},boolean:{pattern:/(^|[()\[\]\s])#(?:[ft]|false|true)(?=[()\[\]\s]|$)/,lookbehind:!0},function:{pattern:/((?:^|[^'`#])[(\[])(?:[^|()\[\]'\s]+|\|(?:[^\\|]|\\.)*\|)(?=[()\[\]\s]|$)/,lookbehind:!0},identifier:{pattern:/(^|[()\[\]\s])\|(?:[^\\|]|\\.)*\|(?=[()\[\]\s]|$)/,lookbehind:!0,greedy:!0},punctuation:/[()\[\]']/}}function _l(e){e.register(_o);for(var t=/\((?:[^();"#\\]|\\[\s\S]|;.*(?!.)|"(?:[^"\\]|\\.)*"|#(?:\{(?:(?!#\})[\s\S])*#\}|[^{])|<expr>)*\)/.source,n=0;n<5;n++)t=t.replace(/<expr>/g,function(){return t});t=t.replace(/<expr>/g,/[^\s\S]/.source);var r=e.languages.lilypond={comment:/%(?:(?!\{).*|\{[\s\S]*?%\})/,"embedded-scheme":{pattern:RegExp(/(^|[=\s])#(?:"(?:[^"\\]|\\.)*"|[^\s()"]*(?:[^\s()]|<expr>))/.source.replace(/<expr>/g,function(){return t}),"m"),lookbehind:!0,greedy:!0,inside:{scheme:{pattern:/^(#)[\s\S]+$/,lookbehind:!0,alias:"language-scheme",inside:{"embedded-lilypond":{pattern:/#\{[\s\S]*?#\}/,greedy:!0,inside:{punctuation:/^#\{|#\}$/,lilypond:{pattern:/[\s\S]+/,alias:"language-lilypond",inside:null}}},rest:e.languages.scheme}},punctuation:/#/}},string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},"class-name":{pattern:/(\\new\s+)[\w-]+/,lookbehind:!0},keyword:{pattern:/\\[a-z][-\w]*/i,inside:{punctuation:/^\\/}},operator:/[=|]|<<|>>/,punctuation:{pattern:/(^|[a-z\d])(?:'+|,+|[_^]?-[_^]?(?:[-+^!>._]|(?=\d))|[_^]\.?|[.!])|[{}()[\]<>^~]|\\[()[\]<>\\!]|--|__/,lookbehind:!0},number:/\b\d+(?:\/\d+)?\b/};r["embedded-scheme"].inside.scheme.inside["embedded-lilypond"].inside.lilypond.inside=r,e.languages.ly=r}function _c(e){e.register(TV),e.languages.liquid={comment:{pattern:/(^\{%\s*comment\s*%\})[\s\S]+(?=\{%\s*endcomment\s*%\}$)/,lookbehind:!0},delimiter:{pattern:/^\{(?:\{\{|[%\{])-?|-?(?:\}\}|[%\}])\}$/,alias:"punctuation"},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},keyword:/\b(?:as|assign|break|(?:end)?(?:capture|case|comment|for|form|if|paginate|raw|style|tablerow|unless)|continue|cycle|decrement|echo|else|elsif|in|include|increment|limit|liquid|offset|range|render|reversed|section|when|with)\b/,object:/\b(?:address|all_country_option_tags|article|block|blog|cart|checkout|collection|color|country|country_option_tags|currency|current_page|current_tags|customer|customer_address|date|discount_allocation|discount_application|external_video|filter|filter_value|font|forloop|fulfillment|generic_file|gift_card|group|handle|image|line_item|link|linklist|localization|location|measurement|media|metafield|model|model_source|order|page|page_description|page_image|page_title|part|policy|product|product_option|recommendations|request|robots|routes|rule|script|search|selling_plan|selling_plan_allocation|selling_plan_group|shipping_method|shop|shop_locale|sitemap|store_availability|tax_line|template|theme|transaction|unit_price_measurement|user_agent|variant|video|video_source)\b/,function:[{pattern:/(\|\s*)\w+/,lookbehind:!0,alias:"filter"},{pattern:/(\.\s*)(?:first|last|size)/,lookbehind:!0}],boolean:/\b(?:false|nil|true)\b/,range:{pattern:/\.\./,alias:"operator"},number:/\b\d+(?:\.\d+)?\b/,operator:/[!=]=|<>|[<>]=?|[|?:=-]|\b(?:and|contains(?=\s)|or)\b/,punctuation:/[.,\[\]()]/,empty:{pattern:/\bempty\b/,alias:"keyword"}},e.hooks.add("before-tokenize",function(t){var n=!1;e.languages["markup-templating"].buildPlaceholders(t,"liquid",/\{%\s*comment\s*%\}[\s\S]*?\{%\s*endcomment\s*%\}|\{(?:%[\s\S]*?%|\{\{[\s\S]*?\}\}|\{[\s\S]*?\})\}/g,function(e){var t=/^\{%-?\s*(\w+)/.exec(e);if(t){var r=t[1];if("raw"===r&&!n)return n=!0,!0;if("endraw"===r)return n=!1,!0}return!n})}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"liquid")})}function _u(e){!function(e){function t(e){return RegExp(/(\()/.source+"(?:"+e+")"+/(?=[\s\)])/.source)}function n(e){return RegExp(/([\s([])/.source+"(?:"+e+")"+/(?=[\s)])/.source)}var r=/(?!\d)[-+*/~!@$%^=<>{}\w]+/.source,a="&"+r,i="(\\()",s="(?=\\s)",o=/(?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\))*\))*\))*/.source,l={heading:{pattern:/;;;.*/,alias:["comment","title"]},comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0,inside:{argument:/[-A-Z]+(?=[.,\s])/,symbol:RegExp("`"+r+"'")}},"quoted-symbol":{pattern:RegExp("#?'"+r),alias:["variable","symbol"]},"lisp-property":{pattern:RegExp(":"+r),alias:"property"},splice:{pattern:RegExp(",@?"+r),alias:["symbol","variable"]},keyword:[{pattern:RegExp(i+"(?:and|(?:cl-)?letf|cl-loop|cond|cons|error|if|(?:lexical-)?let\\*?|message|not|null|or|provide|require|setq|unless|use-package|when|while)"+s),lookbehind:!0},{pattern:RegExp(i+"(?:append|by|collect|concat|do|finally|for|in|return)"+s),lookbehind:!0}],declare:{pattern:t(/declare/.source),lookbehind:!0,alias:"keyword"},interactive:{pattern:t(/interactive/.source),lookbehind:!0,alias:"keyword"},boolean:{pattern:n(/nil|t/.source),lookbehind:!0},number:{pattern:n(/[-+]?\d+(?:\.\d*)?/.source),lookbehind:!0},defvar:{pattern:RegExp(i+"def(?:const|custom|group|var)\\s+"+r),lookbehind:!0,inside:{keyword:/^def[a-z]+/,variable:RegExp(r)}},defun:{pattern:RegExp(i+/(?:cl-)?(?:defmacro|defun\*?)\s+/.source+r+/\s+\(/.source+o+/\)/.source),lookbehind:!0,greedy:!0,inside:{keyword:/^(?:cl-)?def\S+/,arguments:null,function:{pattern:RegExp("(^\\s)"+r),lookbehind:!0},punctuation:/[()]/}},lambda:{pattern:RegExp(i+"lambda\\s+\\(\\s*(?:&?"+r+"(?:\\s+&?"+r+")*\\s*)?\\)"),lookbehind:!0,greedy:!0,inside:{keyword:/^lambda/,arguments:null,punctuation:/[()]/}},car:{pattern:RegExp(i+r),lookbehind:!0},punctuation:[/(?:['`,]?\(|[)\[\]])/,{pattern:/(\s)\.(?=\s)/,lookbehind:!0}]},c={"lisp-marker":RegExp(a),varform:{pattern:RegExp(/\(/.source+r+/\s+(?=\S)/.source+o+/\)/.source),inside:l},argument:{pattern:RegExp(/(^|[\s(])/.source+r),lookbehind:!0,alias:"variable"},rest:l},u="\\S+(?:\\s+\\S+)*",d={pattern:RegExp(i+o+"(?=\\))"),lookbehind:!0,inside:{"rest-vars":{pattern:RegExp("&(?:body|rest)\\s+"+u),inside:c},"other-marker-vars":{pattern:RegExp("&(?:aux|optional)\\s+"+u),inside:c},keys:{pattern:RegExp("&key\\s+"+u+"(?:\\s+&allow-other-keys)?"),inside:c},argument:{pattern:RegExp(r),alias:"variable"},punctuation:/[()]/}};l.lambda.inside.arguments=d,l.defun.inside.arguments=e.util.clone(d),l.defun.inside.arguments.inside.sublist=d,e.languages.lisp=l,e.languages.elisp=l,e.languages.emacs=l,e.languages["emacs-lisp"]=l}(e)}function _d(e){e.languages.livescript={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\])#.*/,lookbehind:!0}],"interpolated-string":{pattern:/(^|[^"])("""|")(?:\\[\s\S]|(?!\2)[^\\])*\2(?!")/,lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(^|[^\\])#[a-z_](?:-?[a-z]|[\d_])*/m,lookbehind:!0},interpolation:{pattern:/(^|[^\\])#\{[^}]+\}/m,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^#\{|\}$/,alias:"variable"}}},string:/[\s\S]+/}},string:[{pattern:/('''|')(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},{pattern:/<\[[\s\S]*?\]>/,greedy:!0},/\\[^\s,;\])}]+/],regex:[{pattern:/\/\/(?:\[[^\r\n\]]*\]|\\.|(?!\/\/)[^\\\[])+\/\/[gimyu]{0,5}/,greedy:!0,inside:{comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0}}},{pattern:/\/(?:\[[^\r\n\]]*\]|\\.|[^/\\\r\n\[])+\/[gimyu]{0,5}/,greedy:!0}],keyword:{pattern:/(^|(?!-).)\b(?:break|case|catch|class|const|continue|default|do|else|extends|fallthrough|finally|for(?: ever)?|function|if|implements|it|let|loop|new|null|otherwise|own|return|super|switch|that|then|this|throw|try|unless|until|var|void|when|while|yield)(?!-)\b/m,lookbehind:!0},"keyword-operator":{pattern:/(^|[^-])\b(?:(?:delete|require|typeof)!|(?:and|by|delete|export|from|import(?: all)?|in|instanceof|is(?: not|nt)?|not|of|or|til|to|typeof|with|xor)(?!-)\b)/m,lookbehind:!0,alias:"operator"},boolean:{pattern:/(^|[^-])\b(?:false|no|off|on|true|yes)(?!-)\b/m,lookbehind:!0},argument:{pattern:/(^|(?!\.&\.)[^&])&(?!&)\d*/m,lookbehind:!0,alias:"variable"},number:/\b(?:\d+~[\da-z]+|\d[\d_]*(?:\.\d[\d_]*)?(?:[a-z]\w*)?)/i,identifier:/[a-z_](?:-?[a-z]|[\d_])*/i,operator:[{pattern:/( )\.(?= )/,lookbehind:!0},/\.(?:[=~]|\.\.?)|\.(?:[&|^]|<<|>>>?)\.|:(?:=|:=?)|&&|\|[|>]|<(?:<<?<?|--?!?|~~?!?|[|=?])?|>[>=?]?|-(?:->?|>)?|\+\+?|@@?|%%?|\*\*?|!(?:~?=|--?>|~?~>)?|~(?:~?>|=)?|==?|\^\^?|[\/?]/],punctuation:/[(){}\[\]|.,:;`]/},e.languages.livescript["interpolated-string"].inside.interpolation.inside.rest=e.languages.livescript}function _p(e){e.languages.llvm={comment:/;.*/,string:{pattern:/"[^"]*"/,greedy:!0},boolean:/\b(?:false|true)\b/,variable:/[%@!#](?:(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+|\d+)/i,label:/(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+:/i,type:{pattern:/\b(?:double|float|fp128|half|i[1-9]\d*|label|metadata|ppc_fp128|token|void|x86_fp80|x86_mmx)\b/,alias:"class-name"},keyword:/\b[a-z_][a-z_0-9]*\b/,number:/[+-]?\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b|\b0x[\dA-Fa-f]+\b|\b0xK[\dA-Fa-f]{20}\b|\b0x[ML][\dA-Fa-f]{32}\b|\b0xH[\dA-Fa-f]{4}\b/,punctuation:/[{}[\];(),.!*=<>]/}}function _m(e){e.languages.log={string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?![st] | \w)(?:[^'\\\r\n]|\\.)*'/,greedy:!0},exception:{pattern:/(^|[^\w.])[a-z][\w.]*(?:Error|Exception):.*(?:(?:\r\n?|\n)[ \t]*(?:at[ \t].+|\.{3}.*|Caused by:.*))+(?:(?:\r\n?|\n)[ \t]*\.\.\. .*)?/,lookbehind:!0,greedy:!0,alias:["javastacktrace","language-javastacktrace"],inside:e.languages.javastacktrace||{keyword:/\bat\b/,function:/[a-z_][\w$]*(?=\()/,punctuation:/[.:()]/}},level:[{pattern:/\b(?:ALERT|CRIT|CRITICAL|EMERG|EMERGENCY|ERR|ERROR|FAILURE|FATAL|SEVERE)\b/,alias:["error","important"]},{pattern:/\b(?:WARN|WARNING|WRN)\b/,alias:["warning","important"]},{pattern:/\b(?:DISPLAY|INF|INFO|NOTICE|STATUS)\b/,alias:["info","keyword"]},{pattern:/\b(?:DBG|DEBUG|FINE)\b/,alias:["debug","keyword"]},{pattern:/\b(?:FINER|FINEST|TRACE|TRC|VERBOSE|VRB)\b/,alias:["trace","comment"]}],property:{pattern:/((?:^|[\]|])[ \t]*)[a-z_](?:[\w-]|\b\/\b)*(?:[. ]\(?\w(?:[\w-]|\b\/\b)*\)?)*:(?=\s)/im,lookbehind:!0},separator:{pattern:/(^|[^-+])-{3,}|={3,}|\*{3,}|- - /m,lookbehind:!0,alias:"comment"},url:/\b(?:file|ftp|https?):\/\/[^\s|,;'"]*[^\s|,;'">.]/,email:{pattern:/(^|\s)[-\w+.]+@[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)+(?=\s)/,lookbehind:!0,alias:"url"},"ip-address":{pattern:/\b(?:\d{1,3}(?:\.\d{1,3}){3})\b/,alias:"constant"},"mac-address":{pattern:/\b[a-f0-9]{2}(?::[a-f0-9]{2}){5}\b/i,alias:"constant"},domain:{pattern:/(^|\s)[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)*\.[a-z][a-z0-9-]+(?=\s)/,lookbehind:!0,alias:"constant"},uuid:{pattern:/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/i,alias:"constant"},hash:{pattern:/\b(?:[a-f0-9]{32}){1,2}\b/i,alias:"constant"},"file-path":{pattern:/\b[a-z]:[\\/][^\s|,;:(){}\[\]"']+|(^|[\s:\[\](>|])\.{0,2}\/\w[^\s|,;:(){}\[\]"']*/i,lookbehind:!0,greedy:!0,alias:"string"},date:{pattern:RegExp(/\b\d{4}[-/]\d{2}[-/]\d{2}(?:T(?=\d{1,2}:)|(?=\s\d{1,2}:))/.source+"|"+/\b\d{1,4}[-/ ](?:\d{1,2}|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)[-/ ]\d{2,4}T?\b/.source+"|"+/\b(?:(?:Fri|Mon|Sat|Sun|Thu|Tue|Wed)(?:\s{1,2}(?:Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep))?|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)\s{1,2}\d{1,2}\b/.source,"i"),alias:"number"},time:{pattern:/\b\d{1,2}:\d{1,2}:\d{1,2}(?:[.,:]\d+)?(?:\s?[+-]\d{2}:?\d{2}|Z)?\b/,alias:"number"},boolean:/\b(?:false|null|true)\b/i,number:{pattern:/(^|[^.\w])(?:0x[a-f0-9]+|0o[0-7]+|0b[01]+|v?\d[\da-f]*(?:\.\d+)*(?:e[+-]?\d+)?[a-z]{0,3}\b)\b(?!\.\w)/i,lookbehind:!0},operator:/[;:?<=>~/@!$%&+\-|^(){}*#]/,punctuation:/[\[\].,]/}}function _f(e){e.languages.lolcode={comment:[/\bOBTW\s[\s\S]*?\sTLDR\b/,/\bBTW.+/],string:{pattern:/"(?::.|[^":])*"/,inside:{variable:/:\{[^}]+\}/,symbol:[/:\([a-f\d]+\)/i,/:\[[^\]]+\]/,/:[)>o":]/]},greedy:!0},number:/(?:\B-)?(?:\b\d+(?:\.\d*)?|\B\.\d+)/,symbol:{pattern:/(^|\s)(?:A )?(?:BUKKIT|NOOB|NUMBAR|NUMBR|TROOF|YARN)(?=\s|,|$)/,lookbehind:!0,inside:{keyword:/A(?=\s)/}},label:{pattern:/((?:^|\s)(?:IM IN YR|IM OUTTA YR) )[a-zA-Z]\w*/,lookbehind:!0,alias:"string"},function:{pattern:/((?:^|\s)(?:HOW IZ I|I IZ|IZ) )[a-zA-Z]\w*/,lookbehind:!0},keyword:[{pattern:/(^|\s)(?:AN|FOUND YR|GIMMEH|GTFO|HAI|HAS A|HOW IZ I|I HAS A|I IZ|IF U SAY SO|IM IN YR|IM OUTTA YR|IS NOW(?: A)?|ITZ(?: A)?|IZ|KTHX|KTHXBYE|LIEK(?: A)?|MAEK|MEBBE|MKAY|NERFIN|NO WAI|O HAI IM|O RLY\?|OIC|OMG|OMGWTF|R|SMOOSH|SRS|TIL|UPPIN|VISIBLE|WILE|WTF\?|YA RLY|YR)(?=\s|,|$)/,lookbehind:!0},/'Z(?=\s|,|$)/],boolean:{pattern:/(^|\s)(?:FAIL|WIN)(?=\s|,|$)/,lookbehind:!0},variable:{pattern:/(^|\s)IT(?=\s|,|$)/,lookbehind:!0},operator:{pattern:/(^|\s)(?:NOT|BOTH SAEM|DIFFRINT|(?:ALL|ANY|BIGGR|BOTH|DIFF|EITHER|MOD|PRODUKT|QUOSHUNT|SMALLR|SUM|WON) OF)(?=\s|,|$)/,lookbehind:!0},punctuation:/\.{3}|…|,|!/}}function _h(e){e.languages.magma={output:{pattern:/^(>.*(?:\r(?:\n|(?!\n))|\n))(?!>)(?:.+|(?:\r(?:\n|(?!\n))|\n)(?!>).*)(?:(?:\r(?:\n|(?!\n))|\n)(?!>).*)*/m,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/(^|[^\\"])"(?:[^\r\n\\"]|\\.)*"/,lookbehind:!0,greedy:!0},keyword:/\b(?:_|adj|and|assert|assert2|assert3|assigned|break|by|case|cat|catch|clear|cmpeq|cmpne|continue|declare|default|delete|diff|div|do|elif|else|end|eq|error|eval|exists|exit|for|forall|forward|fprintf|freeze|function|ge|gt|if|iload|import|in|intrinsic|is|join|le|load|local|lt|meet|mod|ne|not|notadj|notin|notsubset|or|print|printf|procedure|quit|random|read|readi|repeat|require|requirege|requirerange|restore|return|save|sdiff|select|subset|then|time|to|try|until|vprint|vprintf|vtime|when|where|while|xor)\b/,boolean:/\b(?:false|true)\b/,generator:{pattern:/\b[a-z_]\w*(?=\s*<)/i,alias:"class-name"},function:/\b[a-z_]\w*(?=\s*\()/i,number:{pattern:/(^|[^\w.]|\.\.)(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?:_[a-z]?)?(?=$|[^\w.]|\.\.)/,lookbehind:!0},operator:/->|[-+*/^~!|#=]|:=|\.\./,punctuation:/[()[\]{}<>,;.:]/}}function _g(e){e.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}}function _b(e){var t,n;t=/\b(?:(?:col|row)?vector|matrix|scalar)\b/.source,n=/\bvoid\b|<org>|\b(?:complex|numeric|pointer(?:\s*\([^()]*\))?|real|string|(?:class|struct)\s+\w+|transmorphic)(?:\s*<org>)?/.source.replace(/<org>/g,t),e.languages.mata={comment:{pattern:/\/\/.*|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\//,greedy:!0},string:{pattern:/"[^"\r\n]*"|[‘`']".*?"[’`']/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|struct)\s+)\w+(?=\s*(?:\{|\bextends\b))/,lookbehind:!0},type:{pattern:RegExp(n),alias:"class-name",inside:{punctuation:/[()]/,keyword:/\b(?:class|function|struct|void)\b/}},keyword:/\b(?:break|class|continue|do|else|end|extends|external|final|for|function|goto|if|pragma|private|protected|public|return|static|struct|unset|unused|version|virtual|while)\b/,constant:/\bNULL\b/,number:{pattern:/(^|[^\w.])(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|\d[a-f0-9]*(?:\.[a-f0-9]+)?x[+-]?\d+)i?(?![\w.])/i,lookbehind:!0},missing:{pattern:/(^|[^\w.])(?:\.[a-z]?)(?![\w.])/,lookbehind:!0,alias:"symbol"},function:/\b[a-z_]\w*(?=\s*\()/i,operator:/\.\.|\+\+|--|&&|\|\||:?(?:[!=<>]=|[+\-*/^<>&|:])|[!?=\\#’`']/,punctuation:/[()[\]{},;.]/}}function _y(e){e.languages.matlab={comment:[/%\{[\s\S]*?\}%/,/%.+/],string:{pattern:/\B'(?:''|[^'\r\n])*'/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?(?:[ij])?|\b[ij]\b/,keyword:/\b(?:NaN|break|case|catch|continue|else|elseif|end|for|function|if|inf|otherwise|parfor|pause|pi|return|switch|try|while)\b/,function:/\b(?!\d)\w+(?=\s*\()/,operator:/\.?[*^\/\\']|[+\-:@]|[<>=~]=?|&&?|\|\|?/,punctuation:/\.{3}|[.,;\[\](){}!]/}}function _E(e){var t;t=/\b(?:about|and|animate|as|at|attributes|by|case|catch|collect|continue|coordsys|do|else|exit|fn|for|from|function|global|if|in|local|macroscript|mapped|max|not|of|off|on|or|parameters|persistent|plugin|rcmenu|return|rollout|set|struct|then|throw|to|tool|try|undo|utility|when|where|while|with)\b/i,e.languages.maxscript={comment:{pattern:/\/\*[\s\S]*?(?:\*\/|$)|--.*/,greedy:!0},string:{pattern:/(^|[^"\\@])(?:"(?:[^"\\]|\\[\s\S])*"|@"[^"]*")/,lookbehind:!0,greedy:!0},path:{pattern:/\$(?:[\w/\\.*?]|'[^']*')*/,greedy:!0,alias:"string"},"function-call":{pattern:RegExp("((?:"+(/^/.source+"|"+/[;=<>+\-*/^({\[]/.source)+"|"+/\b(?:and|by|case|catch|collect|do|else|if|in|not|or|return|then|to|try|where|while|with)\b/.source+")[ ]*)(?!"+t.source+")"+/[a-z_]\w*\b/.source+"(?=[ ]*(?:"+("(?!"+t.source+")"+/[a-z_]/.source+"|"+/\d|-\.?\d/.source)+"|"+/[({'"$@#?]/.source+"))","im"),lookbehind:!0,greedy:!0,alias:"function"},"function-definition":{pattern:/(\b(?:fn|function)\s+)\w+\b/i,lookbehind:!0,alias:"function"},argument:{pattern:/\b[a-z_]\w*(?=:)/i,alias:"attr-name"},keyword:t,boolean:/\b(?:false|true)\b/,time:{pattern:/(^|[^\w.])(?:(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?[msft])+|\d+:\d+(?:\.\d*)?)(?![\w.:])/,lookbehind:!0,alias:"number"},number:[{pattern:/(^|[^\w.])(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?|0x[a-fA-F0-9]+)(?![\w.:])/,lookbehind:!0},/\b(?:e|pi)\b/],constant:/\b(?:dontcollect|ok|silentValue|undefined|unsupplied)\b/,color:{pattern:/\b(?:black|blue|brown|gray|green|orange|red|white|yellow)\b/i,alias:"constant"},operator:/[-+*/<>=!]=?|[&^?]|#(?!\()/,punctuation:/[()\[\]{}.:,;]|#(?=\()|\\$/m}}function _x(e){e.languages.mel={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},code:{pattern:/`(?:\\.|[^\\`])*`/,greedy:!0,alias:"italic",inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},statement:{pattern:/[\s\S]+/,inside:null}}},string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},variable:/\$\w+/,number:/\b0x[\da-fA-F]+\b|\b\d+(?:\.\d*)?|\B\.\d+/,flag:{pattern:/-[^\d\W]\w*/,alias:"operator"},keyword:/\b(?:break|case|continue|default|do|else|float|for|global|if|in|int|matrix|proc|return|string|switch|vector|while)\b/,function:{pattern:/((?:^|[{;])[ \t]*)[a-z_]\w*\b(?!\s*(?:\.(?!\.)|[[{=]))|\b[a-z_]\w*(?=[ \t]*\()/im,lookbehind:!0,greedy:!0},"tensor-punctuation":{pattern:/<<|>>/,alias:"punctuation"},operator:/\+[+=]?|-[-=]?|&&|\|\||[<>]=?|[*\/!=]=?|[%^]/,punctuation:/[.,:;?\[\](){}]/},e.languages.mel.code.inside.statement.inside=e.languages.mel}function _v(e){e.languages.mermaid={comment:{pattern:/%%.*/,greedy:!0},style:{pattern:/^([ \t]*(?:classDef|linkStyle|style)[ \t]+[\w$-]+[ \t]+)\w.*[^\s;]/m,lookbehind:!0,inside:{property:/\b\w[\w-]*(?=[ \t]*:)/,operator:/:/,punctuation:/,/}},"inter-arrow-label":{pattern:/([^<>ox.=-])(?:-[-.]|==)(?![<>ox.=-])[ \t]*(?:"[^"\r\n]*"|[^\s".=-](?:[^\r\n.=-]*[^\s.=-])?)[ \t]*(?:\.+->?|--+[->]|==+[=>])(?![<>ox.=-])/,lookbehind:!0,greedy:!0,inside:{arrow:{pattern:/(?:\.+->?|--+[->]|==+[=>])$/,alias:"operator"},label:{pattern:/^([\s\S]{2}[ \t]*)\S(?:[\s\S]*\S)?/,lookbehind:!0,alias:"property"},"arrow-head":{pattern:/^\S+/,alias:["arrow","operator"]}}},arrow:[{pattern:/(^|[^{}|o.-])[|}][|o](?:--|\.\.)[|o][|{](?![{}|o.-])/,lookbehind:!0,alias:"operator"},{pattern:/(^|[^<>ox.=-])(?:[<ox](?:==+|--+|-\.*-)[>ox]?|(?:==+|--+|-\.*-)[>ox]|===+|---+|-\.+-)(?![<>ox.=-])/,lookbehind:!0,alias:"operator"},{pattern:/(^|[^<>()x-])(?:--?(?:>>|[x>)])(?![<>()x])|(?:<<|[x<(])--?(?!-))/,lookbehind:!0,alias:"operator"},{pattern:/(^|[^<>|*o.-])(?:[*o]--|--[*o]|<\|?(?:--|\.\.)|(?:--|\.\.)\|?>|--|\.\.)(?![<>|*o.-])/,lookbehind:!0,alias:"operator"}],label:{pattern:/(^|[^|<])\|(?:[^\r\n"|]|"[^"\r\n]*")+\|/,lookbehind:!0,greedy:!0,alias:"property"},text:{pattern:/(?:[(\[{]+|\b>)(?:[^\r\n"()\[\]{}]|"[^"\r\n]*")+(?:[)\]}]+|>)/,alias:"string"},string:{pattern:/"[^"\r\n]*"/,greedy:!0},annotation:{pattern:/<<(?:abstract|choice|enumeration|fork|interface|join|service)>>|\[\[(?:choice|fork|join)\]\]/i,alias:"important"},keyword:[{pattern:/(^[ \t]*)(?:action|callback|class|classDef|classDiagram|click|direction|erDiagram|flowchart|gantt|gitGraph|graph|journey|link|linkStyle|pie|requirementDiagram|sequenceDiagram|stateDiagram|stateDiagram-v2|style|subgraph)(?![\w$-])/m,lookbehind:!0,greedy:!0},{pattern:/(^[ \t]*)(?:activate|alt|and|as|autonumber|deactivate|else|end(?:[ \t]+note)?|loop|opt|par|participant|rect|state|note[ \t]+(?:over|(?:left|right)[ \t]+of))(?![\w$-])/im,lookbehind:!0,greedy:!0}],entity:/#[a-z0-9]+;/,operator:{pattern:/(\w[ \t]*)&(?=[ \t]*\w)|:::|:/,lookbehind:!0},punctuation:/[(){};]/}}function _T(e){e.languages.metafont={comment:{pattern:/%.*/,greedy:!0},string:{pattern:/"[^\r\n"]*"/,greedy:!0},number:/\d*\.?\d+/,boolean:/\b(?:false|true)\b/,punctuation:[/[,;()]/,{pattern:/(^|[^{}])(?:\{|\})(?![{}])/,lookbehind:!0},{pattern:/(^|[^[])\[(?!\[)/,lookbehind:!0},{pattern:/(^|[^\]])\](?!\])/,lookbehind:!0}],constant:[{pattern:/(^|[^!?])\?\?\?(?![!?])/,lookbehind:!0},{pattern:/(^|[^/*\\])(?:\\|\\\\)(?![/*\\])/,lookbehind:!0},/\b(?:_|blankpicture|bp|cc|cm|dd|ditto|down|eps|epsilon|fullcircle|halfcircle|identity|in|infinity|left|mm|nullpen|nullpicture|origin|pc|penrazor|penspeck|pensquare|penstroke|proof|pt|quartercircle|relax|right|smoke|unitpixel|unitsquare|up)\b/],quantity:{pattern:/\b(?:autorounding|blacker|boundarychar|charcode|chardp|chardx|chardy|charext|charht|charic|charwd|currentwindow|day|designsize|displaying|fillin|fontmaking|granularity|hppp|join_radius|month|o_correction|pausing|pen_(?:bot|lft|rt|top)|pixels_per_inch|proofing|showstopping|smoothing|time|tolerance|tracingcapsules|tracingchoices|tracingcommands|tracingedges|tracingequations|tracingmacros|tracingonline|tracingoutput|tracingpens|tracingrestores|tracingspecs|tracingstats|tracingtitles|turningcheck|vppp|warningcheck|xoffset|year|yoffset)\b/,alias:"keyword"},command:{pattern:/\b(?:addto|batchmode|charlist|cull|display|errhelp|errmessage|errorstopmode|everyjob|extensible|fontdimen|headerbyte|inner|interim|let|ligtable|message|newinternal|nonstopmode|numspecial|openwindow|outer|randomseed|save|scrollmode|shipout|show|showdependencies|showstats|showtoken|showvariable|special)\b/,alias:"builtin"},operator:[{pattern:/(^|[^>=<:|])(?:<|<=|=|=:|\|=:|\|=:>|=:\|>|=:\||\|=:\||\|=:\|>|\|=:\|>>|>|>=|:|:=|<>|::|\|\|:)(?![>=<:|])/,lookbehind:!0},{pattern:/(^|[^+-])(?:\+|\+\+|-{1,3}|\+-\+)(?![+-])/,lookbehind:!0},{pattern:/(^|[^/*\\])(?:\*|\*\*|\/)(?![/*\\])/,lookbehind:!0},{pattern:/(^|[^.])(?:\.{2,3})(?!\.)/,lookbehind:!0},{pattern:/(^|[^@#&$])&(?![@#&$])/,lookbehind:!0},/\b(?:and|not|or)\b/],macro:{pattern:/\b(?:abs|beginchar|bot|byte|capsule_def|ceiling|change_width|clear_pen_memory|clearit|clearpen|clearxy|counterclockwise|cullit|cutdraw|cutoff|decr|define_blacker_pixels|define_corrected_pixels|define_good_x_pixels|define_good_y_pixels|define_horizontal_corrected_pixels|define_pixels|define_whole_blacker_pixels|define_whole_pixels|define_whole_vertical_blacker_pixels|define_whole_vertical_pixels|dir|direction|directionpoint|div|dotprod|downto|draw|drawdot|endchar|erase|fill|filldraw|fix_units|flex|font_coding_scheme|font_extra_space|font_identifier|font_normal_shrink|font_normal_space|font_normal_stretch|font_quad|font_size|font_slant|font_x_height|gfcorners|gobble|gobbled|good\.(?:bot|lft|rt|top|x|y)|grayfont|hide|hround|imagerules|incr|interact|interpath|intersectionpoint|inverse|italcorr|killtext|labelfont|labels|lft|loggingall|lowres_fix|makegrid|makelabel(?:\.(?:bot|lft|rt|top)(?:\.nodot)?)?|max|min|mod|mode_def|mode_setup|nodisplays|notransforms|numtok|openit|penlabels|penpos|pickup|proofoffset|proofrule|proofrulethickness|range|reflectedabout|rotatedabout|rotatedaround|round|rt|savepen|screenchars|screenrule|screenstrokes|shipit|showit|slantfont|softjoin|solve|stop|superellipse|tensepath|thru|titlefont|top|tracingall|tracingnone|undraw|undrawdot|unfill|unfilldraw|upto|vround)\b/,alias:"function"},builtin:/\b(?:ASCII|angle|char|cosd|decimal|directiontime|floor|hex|intersectiontimes|jobname|known|length|makepath|makepen|mexp|mlog|normaldeviate|oct|odd|pencircle|penoffset|point|postcontrol|precontrol|reverse|rotated|sind|sqrt|str|subpath|substring|totalweight|turningnumber|uniformdeviate|unknown|xpart|xxpart|xypart|ypart|yxpart|yypart)\b/,keyword:/\b(?:also|at|atleast|begingroup|charexists|contour|controls|curl|cycle|def|delimiters|doublepath|dropping|dump|else|elseif|end|enddef|endfor|endgroup|endinput|exitif|exitunless|expandafter|fi|for|forever|forsuffixes|from|if|input|inwindow|keeping|kern|of|primarydef|quote|readstring|scaled|scantokens|secondarydef|shifted|skipto|slanted|step|tension|tertiarydef|to|transformed|until|vardef|withpen|withweight|xscaled|yscaled|zscaled)\b/,type:{pattern:/\b(?:boolean|expr|numeric|pair|path|pen|picture|primary|secondary|string|suffix|tertiary|text|transform)\b/,alias:"property"},variable:{pattern:/(^|[^@#&$])(?:@#|#@|#|@)(?![@#&$])|\b(?:aspect_ratio|currentpen|currentpicture|currenttransform|d|extra_beginchar|extra_endchar|extra_setup|h|localfont|mag|mode|screen_cols|screen_rows|w|whatever|x|y|z)\b/,lookbehind:!0}}}function _S(e){e.languages.mizar={comment:/::.+/,keyword:/@proof\b|\b(?:according|aggregate|all|and|antonym|are|as|associativity|assume|asymmetry|attr|be|begin|being|by|canceled|case|cases|clusters?|coherence|commutativity|compatibility|connectedness|consider|consistency|constructors|contradiction|correctness|def|deffunc|define|definitions?|defpred|do|does|end|environ|equals|ex|exactly|existence|for|from|func|given|hence|hereby|holds|idempotence|identity|iff?|implies|involutiveness|irreflexivity|is|it|let|means|mode|non|not|notations?|now|of|or|otherwise|over|per|pred|prefix|projectivity|proof|provided|qua|reconsider|redefine|reduce|reducibility|reflexivity|registrations?|requirements|reserve|sch|schemes?|section|selector|set|sethood|st|struct|such|suppose|symmetry|synonym|take|that|the|then|theorems?|thesis|thus|to|transitivity|uniqueness|vocabular(?:ies|y)|when|where|with|wrt)\b/,parameter:{pattern:/\$(?:10|\d)/,alias:"variable"},variable:/\b\w+(?=:)/,number:/(?:\b|-)\d+\b/,operator:/\.\.\.|->|&|\.?=/,punctuation:/\(#|#\)|[,:;\[\](){}]/}}function __(e){var t;e.register(vB),t="(?:"+["$eq","$gt","$gte","$in","$lt","$lte","$ne","$nin","$and","$not","$nor","$or","$exists","$type","$expr","$jsonSchema","$mod","$regex","$text","$where","$geoIntersects","$geoWithin","$near","$nearSphere","$all","$elemMatch","$size","$bitsAllClear","$bitsAllSet","$bitsAnyClear","$bitsAnySet","$comment","$elemMatch","$meta","$slice","$currentDate","$inc","$min","$max","$mul","$rename","$set","$setOnInsert","$unset","$addToSet","$pop","$pull","$push","$pullAll","$each","$position","$slice","$sort","$bit","$addFields","$bucket","$bucketAuto","$collStats","$count","$currentOp","$facet","$geoNear","$graphLookup","$group","$indexStats","$limit","$listLocalSessions","$listSessions","$lookup","$match","$merge","$out","$planCacheStats","$project","$redact","$replaceRoot","$replaceWith","$sample","$set","$skip","$sort","$sortByCount","$unionWith","$unset","$unwind","$setWindowFields","$abs","$accumulator","$acos","$acosh","$add","$addToSet","$allElementsTrue","$and","$anyElementTrue","$arrayElemAt","$arrayToObject","$asin","$asinh","$atan","$atan2","$atanh","$avg","$binarySize","$bsonSize","$ceil","$cmp","$concat","$concatArrays","$cond","$convert","$cos","$dateFromParts","$dateToParts","$dateFromString","$dateToString","$dayOfMonth","$dayOfWeek","$dayOfYear","$degreesToRadians","$divide","$eq","$exp","$filter","$first","$floor","$function","$gt","$gte","$hour","$ifNull","$in","$indexOfArray","$indexOfBytes","$indexOfCP","$isArray","$isNumber","$isoDayOfWeek","$isoWeek","$isoWeekYear","$last","$last","$let","$literal","$ln","$log","$log10","$lt","$lte","$ltrim","$map","$max","$mergeObjects","$meta","$min","$millisecond","$minute","$mod","$month","$multiply","$ne","$not","$objectToArray","$or","$pow","$push","$radiansToDegrees","$range","$reduce","$regexFind","$regexFindAll","$regexMatch","$replaceOne","$replaceAll","$reverseArray","$round","$rtrim","$second","$setDifference","$setEquals","$setIntersection","$setIsSubset","$setUnion","$size","$sin","$slice","$split","$sqrt","$stdDevPop","$stdDevSamp","$strcasecmp","$strLenBytes","$strLenCP","$substr","$substrBytes","$substrCP","$subtract","$sum","$switch","$tan","$toBool","$toDate","$toDecimal","$toDouble","$toInt","$toLong","$toObjectId","$toString","$toLower","$toUpper","$trim","$trunc","$type","$week","$year","$zip","$count","$dateAdd","$dateDiff","$dateSubtract","$dateTrunc","$getField","$rand","$sampleRate","$setField","$unsetField","$comment","$explain","$hint","$max","$maxTimeMS","$min","$orderby","$query","$returnKey","$showDiskLoc","$natural"].map(function(e){return e.replace("$","\\$")}).join("|")+")\\b",e.languages.mongodb=e.languages.extend("javascript",{}),e.languages.insertBefore("mongodb","string",{property:{pattern:/(?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)(?=\s*:)/,greedy:!0,inside:{keyword:RegExp("^(['\"])?"+t+"(?:\\1)?$")}}}),e.languages.mongodb.string.inside={url:{pattern:/https?:\/\/[-\w@:%.+~#=]{1,256}\.[a-z0-9()]{1,6}\b[-\w()@:%+.~#?&/=]*/i,greedy:!0},entity:{pattern:/\b(?:(?:[01]?\d\d?|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d\d?|2[0-4]\d|25[0-5])\b/,greedy:!0}},e.languages.insertBefore("mongodb","constant",{builtin:{pattern:RegExp("\\b(?:ObjectId|Code|BinData|DBRef|Timestamp|NumberLong|NumberDecimal|MaxKey|MinKey|RegExp|ISODate|UUID)\\b"),alias:"keyword"}})}function _k(e){e.languages.monkey={comment:{pattern:/^#Rem\s[\s\S]*?^#End|'.+/im,greedy:!0},string:{pattern:/"[^"\r\n]*"/,greedy:!0},preprocessor:{pattern:/(^[ \t]*)#.+/m,lookbehind:!0,greedy:!0,alias:"property"},function:/\b\w+(?=\()/,"type-char":{pattern:/\b[?%#$]/,alias:"class-name"},number:{pattern:/((?:\.\.)?)(?:(?:\b|\B-\.?|\B\.)\d+(?:(?!\.\.)\.\d*)?|\$[\da-f]+)/i,lookbehind:!0},keyword:/\b(?:Abstract|Array|Bool|Case|Catch|Class|Const|Continue|Default|Eachin|Else|ElseIf|End|EndIf|Exit|Extends|Extern|False|Field|Final|Float|For|Forever|Function|Global|If|Implements|Import|Inline|Int|Interface|Local|Method|Module|New|Next|Null|Object|Private|Property|Public|Repeat|Return|Select|Self|Step|Strict|String|Super|Then|Throw|To|True|Try|Until|Void|Wend|While)\b/i,operator:/\.\.|<[=>]?|>=?|:?=|(?:[+\-*\/&~|]|\b(?:Mod|Shl|Shr)\b)=?|\b(?:And|Not|Or)\b/i,punctuation:/[.,:;()\[\]]/}}function _w(e){e.languages.moonscript={comment:/--.*/,string:[{pattern:/'[^']*'|\[(=*)\[[\s\S]*?\]\1\]/,greedy:!0},{pattern:/"[^"]*"/,greedy:!0,inside:{interpolation:{pattern:/#\{[^{}]*\}/,inside:{moonscript:{pattern:/(^#\{)[\s\S]+(?=\})/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/#\{|\}/,alias:"punctuation"}}}}}],"class-name":[{pattern:/(\b(?:class|extends)[ \t]+)\w+/,lookbehind:!0},/\b[A-Z]\w*/],keyword:/\b(?:class|continue|do|else|elseif|export|extends|for|from|if|import|in|local|nil|return|self|super|switch|then|unless|using|when|while|with)\b/,variable:/@@?\w*/,property:{pattern:/\b(?!\d)\w+(?=:)|(:)(?!\d)\w+/,lookbehind:!0},function:{pattern:/\b(?:_G|_VERSION|assert|collectgarbage|coroutine\.(?:create|resume|running|status|wrap|yield)|debug\.(?:debug|getfenv|gethook|getinfo|getlocal|getmetatable|getregistry|getupvalue|setfenv|sethook|setlocal|setmetatable|setupvalue|traceback)|dofile|error|getfenv|getmetatable|io\.(?:close|flush|input|lines|open|output|popen|read|stderr|stdin|stdout|tmpfile|type|write)|ipairs|load|loadfile|loadstring|math\.(?:abs|acos|asin|atan|atan2|ceil|cos|cosh|deg|exp|floor|fmod|frexp|ldexp|log|log10|max|min|modf|pi|pow|rad|random|randomseed|sin|sinh|sqrt|tan|tanh)|module|next|os\.(?:clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)|package\.(?:cpath|loaded|loadlib|path|preload|seeall)|pairs|pcall|print|rawequal|rawget|rawset|require|select|setfenv|setmetatable|string\.(?:byte|char|dump|find|format|gmatch|gsub|len|lower|match|rep|reverse|sub|upper)|table\.(?:concat|insert|maxn|remove|sort)|tonumber|tostring|type|unpack|xpcall)\b/,inside:{punctuation:/\./}},boolean:/\b(?:false|true)\b/,number:/(?:\B\.\d+|\b\d+\.\d+|\b\d+(?=[eE]))(?:[eE][-+]?\d+)?\b|\b(?:0x[a-fA-F\d]+|\d+)(?:U?LL)?\b/,operator:/\.{3}|[-=]>|~=|(?:[-+*/%<>!=]|\.\.)=?|[:#^]|\b(?:and|or)\b=?|\b(?:not)\b/,punctuation:/[.,()[\]{}\\]/},e.languages.moonscript.string[1].inside.interpolation.inside.moonscript.inside=e.languages.moonscript,e.languages.moon=e.languages.moonscript}function _A(e){e.languages.n1ql={comment:{pattern:/\/\*[\s\S]*?(?:$|\*\/)|--.*/,greedy:!0},string:{pattern:/(["'])(?:\\[\s\S]|(?!\1)[^\\]|\1\1)*\1/,greedy:!0},identifier:{pattern:/`(?:\\[\s\S]|[^\\`]|``)*`/,greedy:!0},parameter:/\$[\w.]+/,keyword:/\b(?:ADVISE|ALL|ALTER|ANALYZE|AS|ASC|AT|BEGIN|BINARY|BOOLEAN|BREAK|BUCKET|BUILD|BY|CALL|CAST|CLUSTER|COLLATE|COLLECTION|COMMIT|COMMITTED|CONNECT|CONTINUE|CORRELATE|CORRELATED|COVER|CREATE|CURRENT|DATABASE|DATASET|DATASTORE|DECLARE|DECREMENT|DELETE|DERIVED|DESC|DESCRIBE|DISTINCT|DO|DROP|EACH|ELEMENT|EXCEPT|EXCLUDE|EXECUTE|EXPLAIN|FETCH|FILTER|FLATTEN|FLUSH|FOLLOWING|FOR|FORCE|FROM|FTS|FUNCTION|GOLANG|GRANT|GROUP|GROUPS|GSI|HASH|HAVING|IF|IGNORE|ILIKE|INCLUDE|INCREMENT|INDEX|INFER|INLINE|INNER|INSERT|INTERSECT|INTO|IS|ISOLATION|JAVASCRIPT|JOIN|KEY|KEYS|KEYSPACE|KNOWN|LANGUAGE|LAST|LEFT|LET|LETTING|LEVEL|LIMIT|LSM|MAP|MAPPING|MATCHED|MATERIALIZED|MERGE|MINUS|MISSING|NAMESPACE|NEST|NL|NO|NTH_VALUE|NULL|NULLS|NUMBER|OBJECT|OFFSET|ON|OPTION|OPTIONS|ORDER|OTHERS|OUTER|OVER|PARSE|PARTITION|PASSWORD|PATH|POOL|PRECEDING|PREPARE|PRIMARY|PRIVATE|PRIVILEGE|PROBE|PROCEDURE|PUBLIC|RANGE|RAW|REALM|REDUCE|RENAME|RESPECT|RETURN|RETURNING|REVOKE|RIGHT|ROLE|ROLLBACK|ROW|ROWS|SATISFIES|SAVEPOINT|SCHEMA|SCOPE|SELECT|SELF|SEMI|SET|SHOW|SOME|START|STATISTICS|STRING|SYSTEM|TIES|TO|TRAN|TRANSACTION|TRIGGER|TRUNCATE|UNBOUNDED|UNDER|UNION|UNIQUE|UNKNOWN|UNNEST|UNSET|UPDATE|UPSERT|USE|USER|USING|VALIDATE|VALUE|VALUES|VIA|VIEW|WHERE|WHILE|WINDOW|WITH|WORK|XOR)\b/i,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:FALSE|TRUE)\b/i,number:/(?:\b\d+\.|\B\.)\d+e[+\-]?\d+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/%]|!=|==?|\|\||<[>=]?|>=?|\b(?:AND|ANY|ARRAY|BETWEEN|CASE|ELSE|END|EVERY|EXISTS|FIRST|IN|LIKE|NOT|OR|THEN|VALUED|WHEN|WITHIN)\b/i,punctuation:/[;[\](),.{}:]/}}function _N(e){e.languages["nand2tetris-hdl"]={comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,keyword:/\b(?:BUILTIN|CHIP|CLOCKED|IN|OUT|PARTS)\b/,boolean:/\b(?:false|true)\b/,function:/\b[A-Za-z][A-Za-z0-9]*(?=\()/,number:/\b\d+\b/,operator:/=|\.\./,punctuation:/[{}[\];(),:]/}}function _I(e){var t,n;n={"quoted-string":{pattern:/"(?:[^"\\]|\\.)*"/,alias:"operator"},"command-param-id":{pattern:/(\s)\w+:/,lookbehind:!0,alias:"property"},"command-param-value":[{pattern:t=/\{[^\r\n\[\]{}]*\}/,alias:"selector"},{pattern:/([\t ])\S+/,lookbehind:!0,greedy:!0,alias:"operator"},{pattern:/\S(?:.*\S)?/,alias:"operator"}]},e.languages.naniscript={comment:{pattern:/^([\t ]*);.*/m,lookbehind:!0},define:{pattern:/^>.+/m,alias:"tag",inside:{value:{pattern:/(^>\w+[\t ]+)(?!\s)[^{}\r\n]+/,lookbehind:!0,alias:"operator"},key:{pattern:/(^>)\w+/,lookbehind:!0}}},label:{pattern:/^([\t ]*)#[\t ]*\w+[\t ]*$/m,lookbehind:!0,alias:"regex"},command:{pattern:/^([\t ]*)@\w+(?=[\t ]|$).*/m,lookbehind:!0,alias:"function",inside:{"command-name":/^@\w+/,expression:{pattern:t,greedy:!0,alias:"selector"},"command-params":{pattern:/\s*\S[\s\S]*/,inside:n}}},"generic-text":{pattern:/(^[ \t]*)[^#@>;\s].*/m,lookbehind:!0,alias:"punctuation",inside:{"escaped-char":/\\[{}\[\]"]/,expression:{pattern:t,greedy:!0,alias:"selector"},"inline-command":{pattern:/\[[\t ]*\w[^\r\n\[\]]*\]/,greedy:!0,alias:"function",inside:{"command-params":{pattern:/(^\[[\t ]*\w+\b)[\s\S]+(?=\]$)/,lookbehind:!0,inside:n},"command-param-name":{pattern:/^(\[[\t ]*)\w+/,lookbehind:!0,alias:"name"},"start-stop-char":/[\[\]]/}}}}},e.languages.nani=e.languages.naniscript,e.hooks.add("after-tokenize",function(e){e.tokens.forEach(function(e){if("string"!=typeof e&&"generic-text"===e.type){var t=function e(t){return"string"==typeof t?t:Array.isArray(t)?t.map(e).join(""):e(t.content)}(e);!function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n],a="[]{}".indexOf(r);if(-1!==a){if(a%2==0)t.push(a+1);else if(t.pop()!==a)return!1}}return 0===t.length}(t)&&(e.type="bad-line",e.content=t)}})})}function _C(e){e.languages.nasm={comment:/;.*$/m,string:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,label:{pattern:/(^\s*)[A-Za-z._?$][\w.?$@~#]*:/m,lookbehind:!0,alias:"function"},keyword:[/\[?BITS (?:16|32|64)\]?/,{pattern:/(^\s*)section\s*[a-z.]+:?/im,lookbehind:!0},/(?:extern|global)[^;\r\n]*/i,/(?:CPU|DEFAULT|FLOAT).*$/m],register:{pattern:/\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|di|si|sp)|[cdefgs]s)\b/i,alias:"variable"},number:/(?:\b|(?=\$))(?:0[hx](?:\.[\da-f]+|[\da-f]+(?:\.[\da-f]+)?)(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|(?:\d+(?:\.\d+)?|\.\d+)(?:\.?e[+-]?\d+)?[dt]?)\b/i,operator:/[\[\]*+\-\/%<>=&|$!]/}}function _R(e){e.languages.neon={comment:{pattern:/#.*/,greedy:!0},datetime:{pattern:/(^|[[{(=:,\s])\d\d\d\d-\d\d?-\d\d?(?:(?:[Tt]| +)\d\d?:\d\d:\d\d(?:\.\d*)? *(?:Z|[-+]\d\d?(?::?\d\d)?)?)?(?=$|[\]}),\s])/,lookbehind:!0,alias:"number"},key:{pattern:/(^|[[{(,\s])[^,:=[\]{}()'"\s]+(?=\s*:(?:$|[\]}),\s])|\s*=)/,lookbehind:!0,alias:"property"},number:{pattern:/(^|[[{(=:,\s])[+-]?(?:0x[\da-fA-F]+|0o[0-7]+|0b[01]+|(?:\d+(?:\.\d*)?|\.?\d+)(?:[eE][+-]?\d+)?)(?=$|[\]}),:=\s])/,lookbehind:!0},boolean:{pattern:/(^|[[{(=:,\s])(?:false|no|true|yes)(?=$|[\]}),:=\s])/i,lookbehind:!0},null:{pattern:/(^|[[{(=:,\s])(?:null)(?=$|[\]}),:=\s])/i,lookbehind:!0,alias:"keyword"},string:{pattern:/(^|[[{(=:,\s])(?:('''|""")\r?\n(?:(?:[^\r\n]|\r?\n(?![\t ]*\2))*\r?\n)?[\t ]*\2|'[^'\r\n]*'|"(?:\\.|[^\\"\r\n])*")/,lookbehind:!0,greedy:!0},literal:{pattern:/(^|[[{(=:,\s])(?:[^#"',:=[\]{}()\s`-]|[:-][^"',=[\]{}()\s])(?:[^,:=\]})(\s]|:(?![\s,\]})]|$)|[ \t]+[^#,:=\]})(\s])*/,lookbehind:!0,alias:"string"},punctuation:/[,:=[\]{}()-]/}}function _O(e){e.languages.nevod={comment:/\/\/.*|(?:\/\*[\s\S]*?(?:\*\/|$))/,string:{pattern:/(?:"(?:""|[^"])*"(?!")|'(?:''|[^'])*'(?!'))!?\*?/,greedy:!0,inside:{"string-attrs":/!$|!\*$|\*$/}},namespace:{pattern:/(@namespace\s+)[a-zA-Z0-9\-.]+(?=\s*\{)/,lookbehind:!0},pattern:{pattern:/(@pattern\s+)?#?[a-zA-Z0-9\-.]+(?:\s*\(\s*(?:~\s*)?[a-zA-Z0-9\-.]+\s*(?:,\s*(?:~\s*)?[a-zA-Z0-9\-.]*)*\))?(?=\s*=)/,lookbehind:!0,inside:{"pattern-name":{pattern:/^#?[a-zA-Z0-9\-.]+/,alias:"class-name"},fields:{pattern:/\(.*\)/,inside:{"field-name":{pattern:/[a-zA-Z0-9\-.]+/,alias:"variable"},punctuation:/[,()]/,operator:{pattern:/~/,alias:"field-hidden-mark"}}}}},search:{pattern:/(@search\s+|#)[a-zA-Z0-9\-.]+(?:\.\*)?(?=\s*;)/,alias:"function",lookbehind:!0},keyword:/@(?:having|inside|namespace|outside|pattern|require|search|where)\b/,"standard-pattern":{pattern:/\b(?:Alpha|AlphaNum|Any|Blank|End|LineBreak|Num|NumAlpha|Punct|Space|Start|Symbol|Word|WordBreak)\b(?:\([a-zA-Z0-9\-.,\s+]*\))?/,inside:{"standard-pattern-name":{pattern:/^[a-zA-Z0-9\-.]+/,alias:"builtin"},quantifier:{pattern:/\b\d+(?:\s*\+|\s*-\s*\d+)?(?!\w)/,alias:"number"},"standard-pattern-attr":{pattern:/[a-zA-Z0-9\-.]+/,alias:"builtin"},punctuation:/[,()]/}},quantifier:{pattern:/\b\d+(?:\s*\+|\s*-\s*\d+)?(?!\w)/,alias:"number"},operator:[{pattern:/=/,alias:"pattern-def"},{pattern:/&/,alias:"conjunction"},{pattern:/~/,alias:"exception"},{pattern:/\?/,alias:"optionality"},{pattern:/[[\]]/,alias:"repetition"},{pattern:/[{}]/,alias:"variation"},{pattern:/[+_]/,alias:"sequence"},{pattern:/\.{2,3}/,alias:"span"}],"field-capture":[{pattern:/([a-zA-Z0-9\-.]+\s*\()\s*[a-zA-Z0-9\-.]+\s*:\s*[a-zA-Z0-9\-.]+(?:\s*,\s*[a-zA-Z0-9\-.]+\s*:\s*[a-zA-Z0-9\-.]+)*(?=\s*\))/,lookbehind:!0,inside:{"field-name":{pattern:/[a-zA-Z0-9\-.]+/,alias:"variable"},colon:/:/}},{pattern:/[a-zA-Z0-9\-.]+\s*:/,inside:{"field-name":{pattern:/[a-zA-Z0-9\-.]+/,alias:"variable"},colon:/:/}}],punctuation:/[:;,()]/,name:/[a-zA-Z0-9\-.]+/}}function _D(e){var t;t=/\$(?:\w[a-z\d]*(?:_[^\x00-\x1F\s"'\\()$]*)?|\{[^}\s"'\\]+\})/i,e.languages.nginx={comment:{pattern:/(^|[\s{};])#.*/,lookbehind:!0,greedy:!0},directive:{pattern:/(^|\s)\w(?:[^;{}"'\\\s]|\\.|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|\s+(?:#.*(?!.)|(?![#\s])))*?(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:{string:{pattern:/((?:^|[^\\])(?:\\\\)*)(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/,lookbehind:!0,greedy:!0,inside:{escape:{pattern:/\\["'\\nrt]/,alias:"entity"},variable:t}},comment:{pattern:/(\s)#.*/,lookbehind:!0,greedy:!0},keyword:{pattern:/^\S+/,greedy:!0},boolean:{pattern:/(\s)(?:off|on)(?!\S)/,lookbehind:!0},number:{pattern:/(\s)\d+[a-z]*(?!\S)/i,lookbehind:!0},variable:t}},punctuation:/[{};]/}}function _L(e){e.languages.nim={comment:{pattern:/#.*/,greedy:!0},string:{pattern:/(?:\b(?!\d)(?:\w|\\x[89a-fA-F][0-9a-fA-F])+)?(?:"""[\s\S]*?"""(?!")|"(?:\\[\s\S]|""|[^"\\])*")/,greedy:!0},char:{pattern:/'(?:\\(?:\d+|x[\da-fA-F]{0,2}|.)|[^'])'/,greedy:!0},function:{pattern:/(?:(?!\d)(?:\w|\\x[89a-fA-F][0-9a-fA-F])+|`[^`\r\n]+`)\*?(?:\[[^\]]+\])?(?=\s*\()/,greedy:!0,inside:{operator:/\*$/}},identifier:{pattern:/`[^`\r\n]+`/,greedy:!0,inside:{punctuation:/`/}},number:/\b(?:0[xXoObB][\da-fA-F_]+|\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:[eE][+-]?\d[\d_]*)?)(?:'?[iuf]\d*)?/,keyword:/\b(?:addr|as|asm|atomic|bind|block|break|case|cast|concept|const|continue|converter|defer|discard|distinct|do|elif|else|end|enum|except|export|finally|for|from|func|generic|if|import|include|interface|iterator|let|macro|method|mixin|nil|object|out|proc|ptr|raise|ref|return|static|template|try|tuple|type|using|var|when|while|with|without|yield)\b/,operator:{pattern:/(^|[({\[](?=\.\.)|(?![({\[]\.).)(?:(?:[=+\-*\/<>@$~&%|!?^:\\]|\.\.|\.(?![)}\]]))+|\b(?:and|div|in|is|isnot|mod|not|notin|of|or|shl|shr|xor)\b)/m,lookbehind:!0},punctuation:/[({\[]\.|\.[)}\]]|[`(){}\[\],:]/}}function _M(e){e.languages.nix={comment:{pattern:/\/\*[\s\S]*?\*\/|#.*/,greedy:!0},string:{pattern:/"(?:[^"\\]|\\[\s\S])*"|''(?:(?!'')[\s\S]|''(?:'|\\|\$\{))*''/,greedy:!0,inside:{interpolation:{pattern:/(^|(?:^|(?!'').)[^\\])\$\{(?:[^{}]|\{[^}]*\})*\}/,lookbehind:!0,inside:null}}},url:[/\b(?:[a-z]{3,7}:\/\/)[\w\-+%~\/.:#=?&]+/,{pattern:/([^\/])(?:[\w\-+%~.:#=?&]*(?!\/\/)[\w\-+%~\/.:#=?&])?(?!\/\/)\/[\w\-+%~\/.:#=?&]*/,lookbehind:!0}],antiquotation:{pattern:/\$(?=\{)/,alias:"important"},number:/\b\d+\b/,keyword:/\b(?:assert|builtins|else|if|in|inherit|let|null|or|then|with)\b/,function:/\b(?:abort|add|all|any|attrNames|attrValues|baseNameOf|compareVersions|concatLists|currentSystem|deepSeq|derivation|dirOf|div|elem(?:At)?|fetch(?:Tarball|url)|filter(?:Source)?|fromJSON|genList|getAttr|getEnv|hasAttr|hashString|head|import|intersectAttrs|is(?:Attrs|Bool|Function|Int|List|Null|String)|length|lessThan|listToAttrs|map|mul|parseDrvName|pathExists|read(?:Dir|File)|removeAttrs|replaceStrings|seq|sort|stringLength|sub(?:string)?|tail|throw|to(?:File|JSON|Path|String|XML)|trace|typeOf)\b|\bfoldl'\B/,boolean:/\b(?:false|true)\b/,operator:/[=!<>]=?|\+\+?|\|\||&&|\/\/|->?|[?@]/,punctuation:/[{}()[\].,:;]/},e.languages.nix.string.inside.interpolation.inside=e.languages.nix}function _P(e){e.languages.nsis={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|[#;].*)/,lookbehind:!0,greedy:!0},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:{pattern:/(^[\t ]*)(?:Abort|Add(?:BrandingImage|Size)|AdvSplash|Allow(?:RootDirInstall|SkipFiles)|AutoCloseWindow|BG(?:Font|Gradient|Image)|Banner|BrandingText|BringToFront|CRCCheck|Call(?:InstDLL)?|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|Create(?:Directory|Font|ShortCut)|Delete(?:INISec|INIStr|RegKey|RegValue)?|Detail(?:Print|sButtonText)|Dialer|Dir(?:Text|Var|Verify)|EnableWindow|Enum(?:RegKey|RegValue)|Exch|Exec(?:Shell(?:Wait)?|Wait)?|ExpandEnvStrings|File(?:BufSize|Close|ErrorText|Open|Read|ReadByte|ReadUTF16LE|ReadWord|Seek|Write|WriteByte|WriteUTF16LE|WriteWord)?|Find(?:Close|First|Next|Window)|FlushINI|Get(?:CurInstType|CurrentAddress|DLLVersion(?:Local)?|DlgItem|ErrorLevel|FileTime(?:Local)?|FullPathName|Function(?:Address|End)?|InstDirError|KnownFolderPath|LabelAddress|TempFileName|WinVer)|Goto|HideWindow|Icon|If(?:Abort|Errors|FileExists|RebootFlag|RtlLanguage|ShellVarContextAll|Silent)|InitPluginsDir|InstProgressFlags|Inst(?:Type(?:GetText|SetText)?)|Install(?:ButtonText|Colors|Dir(?:RegKey)?)|Int(?:64|Ptr)?CmpU?|Int(?:64)?Fmt|Int(?:Ptr)?Op|IsWindow|Lang(?:DLL|String)|License(?:BkColor|Data|ForceSelection|LangString|Text)|LoadLanguageFile|LockWindow|Log(?:Set|Text)|Manifest(?:DPIAware|SupportedOS)|Math|MessageBox|MiscButtonText|NSISdl|Name|Nop|OutFile|PE(?:DllCharacteristics|SubsysVer)|Page(?:Callbacks)?|Pop|Push|Quit|RMDir|Read(?:EnvStr|INIStr|RegDWORD|RegStr)|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|SearchPath|Section(?:End|GetFlags|GetInstTypes|GetSize|GetText|Group|In|SetFlags|SetInstTypes|SetSize|SetText)?|SendMessage|Set(?:AutoClose|BrandingImage|Compress|Compressor(?:DictSize)?|CtlColors|CurInstType|DatablockOptimize|DateSave|Details(?:Print|View)|ErrorLevel|Errors|FileAttributes|Font|OutPath|Overwrite|PluginUnload|RebootFlag|RegView|ShellVarContext|Silent)|Show(?:InstDetails|UninstDetails|Window)|Silent(?:Install|UnInstall)|Sleep|SpaceTexts|Splash|StartMenu|Str(?:CmpS?|Cpy|Len)|SubCaption|System|Target|UnRegDLL|Unicode|UninstPage|Uninstall(?:ButtonText|Caption|Icon|SubCaption|Text)|UserInfo|VI(?:AddVersionKey|FileVersion|ProductVersion)|VPatch|Var|WindowIcon|Write(?:INIStr|Reg(?:Bin|DWORD|ExpandStr|MultiStr|None|Str)|Uninstaller)|XPStyle|ns(?:Dialogs|Exec))\b/m,lookbehind:!0},property:/\b(?:ARCHIVE|FILE_(?:ATTRIBUTE_ARCHIVE|ATTRIBUTE_NORMAL|ATTRIBUTE_OFFLINE|ATTRIBUTE_READONLY|ATTRIBUTE_SYSTEM|ATTRIBUTE_TEMPORARY)|HK(?:(?:CR|CU|LM)(?:32|64)?|DD|PD|U)|HKEY_(?:CLASSES_ROOT|CURRENT_CONFIG|CURRENT_USER|DYN_DATA|LOCAL_MACHINE|PERFORMANCE_DATA|USERS)|ID(?:ABORT|CANCEL|IGNORE|NO|OK|RETRY|YES)|MB_(?:ABORTRETRYIGNORE|DEFBUTTON1|DEFBUTTON2|DEFBUTTON3|DEFBUTTON4|ICONEXCLAMATION|ICONINFORMATION|ICONQUESTION|ICONSTOP|OK|OKCANCEL|RETRYCANCEL|RIGHT|RTLREADING|SETFOREGROUND|TOPMOST|USERICON|YESNO)|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY|admin|all|auto|both|colored|false|force|hide|highest|lastused|leave|listonly|none|normal|notset|off|on|open|print|show|silent|silentlog|smooth|textonly|true|user)\b/,constant:/\$\{[!\w\.:\^-]+\}|\$\([!\w\.:\^-]+\)/,variable:/\$\w[\w\.]*/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|\+\+?|<=?|>=?|==?=?|&&?|\|\|?|[?*\/~^%]/,punctuation:/[{}[\];(),.:]/,important:{pattern:/(^[\t ]*)!(?:addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversion|gettlbversion|if|ifdef|ifmacrodef|ifmacrondef|ifndef|include|insertmacro|macro|macroend|makensis|packhdr|pragma|searchparse|searchreplace|system|tempfile|undef|verbose|warning)\b/im,lookbehind:!0}}}function _j(e){e.register(v0),e.languages.objectivec=e.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}function _F(e){e.languages.ocaml={comment:{pattern:/\(\*[\s\S]*?\*\)/,greedy:!0},char:{pattern:/'(?:[^\\\r\n']|\\(?:.|[ox]?[0-9a-f]{1,3}))'/i,greedy:!0},string:[{pattern:/"(?:\\(?:[\s\S]|\r\n)|[^\\\r\n"])*"/,greedy:!0},{pattern:/\{([a-z_]*)\|[\s\S]*?\|\1\}/,greedy:!0}],number:[/\b(?:0b[01][01_]*|0o[0-7][0-7_]*)\b/i,/\b0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]*)?(?:p[+-]?\d[\d_]*)?(?!\w)/i,/\b\d[\d_]*(?:\.[\d_]*)?(?:e[+-]?\d[\d_]*)?(?!\w)/i],directive:{pattern:/\B#\w+/,alias:"property"},label:{pattern:/\B~\w+/,alias:"property"},"type-variable":{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"symbol"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,"operator-like-punctuation":{pattern:/\[[<>|]|[>|]\]|\{<|>\}/,alias:"punctuation"},operator:/\.[.~]|:[=>]|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/;;|::|[(){}\[\].,:;#]|\b_\b/}}function _U(e){var t;t=/\\(?:["'\\abefnrtv]|0[0-7]{2}|U[\dA-Fa-f]{6}|u[\dA-Fa-f]{4}|x[\dA-Fa-f]{2})/,e.languages.odin={comment:[{pattern:/\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:\*(?!\/)|[^*])*(?:\*\/|$))*(?:\*\/|$)/,greedy:!0},{pattern:/#![^\n\r]*/,greedy:!0},{pattern:/\/\/[^\n\r]*/,greedy:!0}],char:{pattern:/'(?:\\(?:.|[0Uux][0-9A-Fa-f]{1,6})|[^\n\r'\\])'/,greedy:!0,inside:{symbol:t}},string:[{pattern:/`[^`]*`/,greedy:!0},{pattern:/"(?:\\.|[^\n\r"\\])*"/,greedy:!0,inside:{symbol:t}}],directive:{pattern:/#\w+/,alias:"property"},number:/\b0(?:b[01_]+|d[\d_]+|h_*(?:(?:(?:[\dA-Fa-f]_*){8}){1,2}|(?:[\dA-Fa-f]_*){4})|o[0-7_]+|x[\dA-F_a-f]+|z[\dAB_ab]+)\b|(?:\b\d+(?:\.(?!\.)\d*)?|\B\.\d+)(?:[Ee][+-]?\d*)?[ijk]?(?!\w)/,discard:{pattern:/\b_\b/,alias:"keyword"},"procedure-definition":{pattern:/\b\w+(?=[ \t]*(?::\s*){2}proc\b)/,alias:"function"},keyword:/\b(?:asm|auto_cast|bit_set|break|case|cast|context|continue|defer|distinct|do|dynamic|else|enum|fallthrough|for|foreign|if|import|in|map|matrix|not_in|or_else|or_return|package|proc|return|struct|switch|transmute|typeid|union|using|when|where)\b/,"procedure-name":{pattern:/\b\w+(?=[ \t]*\()/,alias:"function"},boolean:/\b(?:false|nil|true)\b/,"constant-parameter-sign":{pattern:/\$/,alias:"important"},undefined:{pattern:/---/,alias:"operator"},arrow:{pattern:/->/,alias:"punctuation"},operator:/\+\+|--|\.\.[<=]?|(?:&~|[-!*+/=~]|[%&<>|]{1,2})=?|[?^]/,punctuation:/[(),.:;@\[\]{}]/}}function _B(e){var t;e.register(v0),e.languages.opencl=e.languages.extend("c",{keyword:/\b(?:(?:__)?(?:constant|global|kernel|local|private|read_only|read_write|write_only)|__attribute__|auto|(?:bool|u?(?:char|int|long|short)|half|quad)(?:2|3|4|8|16)?|break|case|complex|const|continue|(?:double|float)(?:16(?:x(?:1|2|4|8|16))?|1x(?:1|2|4|8|16)|2(?:x(?:1|2|4|8|16))?|3|4(?:x(?:1|2|4|8|16))?|8(?:x(?:1|2|4|8|16))?)?|default|do|else|enum|extern|for|goto|if|imaginary|inline|packed|pipe|register|restrict|return|signed|sizeof|static|struct|switch|typedef|uniform|union|unsigned|void|volatile|while)\b/,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[fuhl]{0,4}/i,boolean:/\b(?:false|true)\b/,"constant-opencl-kernel":{pattern:/\b(?:CHAR_(?:BIT|MAX|MIN)|CLK_(?:ADDRESS_(?:CLAMP(?:_TO_EDGE)?|NONE|REPEAT)|FILTER_(?:LINEAR|NEAREST)|(?:GLOBAL|LOCAL)_MEM_FENCE|NORMALIZED_COORDS_(?:FALSE|TRUE))|CL_(?:BGRA|(?:HALF_)?FLOAT|INTENSITY|LUMINANCE|A?R?G?B?[Ax]?|(?:(?:UN)?SIGNED|[US]NORM)_(?:INT(?:8|16|32))|UNORM_(?:INT_101010|SHORT_(?:555|565)))|(?:DBL|FLT|HALF)_(?:DIG|EPSILON|(?:MAX|MIN)(?:(?:_10)?_EXP)?|MANT_DIG)|FLT_RADIX|HUGE_VALF?|(?:INT|LONG|SCHAR|SHRT)_(?:MAX|MIN)|INFINITY|MAXFLOAT|M_(?:[12]_PI|2_SQRTPI|E|LN(?:2|10)|LOG(?:2|10)E?|PI(?:_[24])?|SQRT(?:1_2|2))(?:_F|_H)?|NAN|(?:UCHAR|UINT|ULONG|USHRT)_MAX)\b/,alias:"constant"}}),e.languages.insertBefore("opencl","class-name",{"builtin-type":{pattern:/\b(?:_cl_(?:command_queue|context|device_id|event|kernel|mem|platform_id|program|sampler)|cl_(?:image_format|mem_fence_flags)|clk_event_t|event_t|image(?:1d_(?:array_|buffer_)?t|2d_(?:array_(?:depth_|msaa_depth_|msaa_)?|depth_|msaa_depth_|msaa_)?t|3d_t)|intptr_t|ndrange_t|ptrdiff_t|queue_t|reserve_id_t|sampler_t|size_t|uintptr_t)\b/,alias:"keyword"}}),t={"type-opencl-host":{pattern:/\b(?:cl_(?:GLenum|GLint|GLuin|addressing_mode|bitfield|bool|buffer_create_type|build_status|channel_(?:order|type)|(?:u?(?:char|int|long|short)|double|float)(?:2|3|4|8|16)?|command_(?:queue(?:_info|_properties)?|type)|context(?:_info|_properties)?|device_(?:exec_capabilities|fp_config|id|info|local_mem_type|mem_cache_type|type)|(?:event|sampler)(?:_info)?|filter_mode|half|image_info|kernel(?:_info|_work_group_info)?|map_flags|mem(?:_flags|_info|_object_type)?|platform_(?:id|info)|profiling_info|program(?:_build_info|_info)?))\b/,alias:"keyword"},"boolean-opencl-host":{pattern:/\bCL_(?:FALSE|TRUE)\b/,alias:"boolean"},"constant-opencl-host":{pattern:/\bCL_(?:A|ABGR|ADDRESS_(?:CLAMP(?:_TO_EDGE)?|MIRRORED_REPEAT|NONE|REPEAT)|ARGB|BGRA|BLOCKING|BUFFER_CREATE_TYPE_REGION|BUILD_(?:ERROR|IN_PROGRESS|NONE|PROGRAM_FAILURE|SUCCESS)|COMMAND_(?:ACQUIRE_GL_OBJECTS|BARRIER|COPY_(?:BUFFER(?:_RECT|_TO_IMAGE)?|IMAGE(?:_TO_BUFFER)?)|FILL_(?:BUFFER|IMAGE)|MAP(?:_BUFFER|_IMAGE)|MARKER|MIGRATE(?:_SVM)?_MEM_OBJECTS|NATIVE_KERNEL|NDRANGE_KERNEL|READ_(?:BUFFER(?:_RECT)?|IMAGE)|RELEASE_GL_OBJECTS|SVM_(?:FREE|MAP|MEMCPY|MEMFILL|UNMAP)|TASK|UNMAP_MEM_OBJECT|USER|WRITE_(?:BUFFER(?:_RECT)?|IMAGE))|COMPILER_NOT_AVAILABLE|COMPILE_PROGRAM_FAILURE|COMPLETE|CONTEXT_(?:DEVICES|INTEROP_USER_SYNC|NUM_DEVICES|PLATFORM|PROPERTIES|REFERENCE_COUNT)|DEPTH(?:_STENCIL)?|DEVICE_(?:ADDRESS_BITS|AFFINITY_DOMAIN_(?:L[1-4]_CACHE|NEXT_PARTITIONABLE|NUMA)|AVAILABLE|BUILT_IN_KERNELS|COMPILER_AVAILABLE|DOUBLE_FP_CONFIG|ENDIAN_LITTLE|ERROR_CORRECTION_SUPPORT|EXECUTION_CAPABILITIES|EXTENSIONS|GLOBAL_(?:MEM_(?:CACHELINE_SIZE|CACHE_SIZE|CACHE_TYPE|SIZE)|VARIABLE_PREFERRED_TOTAL_SIZE)|HOST_UNIFIED_MEMORY|IL_VERSION|IMAGE(?:2D_MAX_(?:HEIGHT|WIDTH)|3D_MAX_(?:DEPTH|HEIGHT|WIDTH)|_BASE_ADDRESS_ALIGNMENT|_MAX_ARRAY_SIZE|_MAX_BUFFER_SIZE|_PITCH_ALIGNMENT|_SUPPORT)|LINKER_AVAILABLE|LOCAL_MEM_SIZE|LOCAL_MEM_TYPE|MAX_(?:CLOCK_FREQUENCY|COMPUTE_UNITS|CONSTANT_ARGS|CONSTANT_BUFFER_SIZE|GLOBAL_VARIABLE_SIZE|MEM_ALLOC_SIZE|NUM_SUB_GROUPS|ON_DEVICE_(?:EVENTS|QUEUES)|PARAMETER_SIZE|PIPE_ARGS|READ_IMAGE_ARGS|READ_WRITE_IMAGE_ARGS|SAMPLERS|WORK_GROUP_SIZE|WORK_ITEM_DIMENSIONS|WORK_ITEM_SIZES|WRITE_IMAGE_ARGS)|MEM_BASE_ADDR_ALIGN|MIN_DATA_TYPE_ALIGN_SIZE|NAME|NATIVE_VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT)|NOT_(?:AVAILABLE|FOUND)|OPENCL_C_VERSION|PARENT_DEVICE|PARTITION_(?:AFFINITY_DOMAIN|BY_AFFINITY_DOMAIN|BY_COUNTS|BY_COUNTS_LIST_END|EQUALLY|FAILED|MAX_SUB_DEVICES|PROPERTIES|TYPE)|PIPE_MAX_(?:ACTIVE_RESERVATIONS|PACKET_SIZE)|PLATFORM|PREFERRED_(?:GLOBAL_ATOMIC_ALIGNMENT|INTEROP_USER_SYNC|LOCAL_ATOMIC_ALIGNMENT|PLATFORM_ATOMIC_ALIGNMENT|VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT))|PRINTF_BUFFER_SIZE|PROFILE|PROFILING_TIMER_RESOLUTION|QUEUE_(?:ON_(?:DEVICE_(?:MAX_SIZE|PREFERRED_SIZE|PROPERTIES)|HOST_PROPERTIES)|PROPERTIES)|REFERENCE_COUNT|SINGLE_FP_CONFIG|SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS|SVM_(?:ATOMICS|CAPABILITIES|COARSE_GRAIN_BUFFER|FINE_GRAIN_BUFFER|FINE_GRAIN_SYSTEM)|TYPE(?:_ACCELERATOR|_ALL|_CPU|_CUSTOM|_DEFAULT|_GPU)?|VENDOR(?:_ID)?|VERSION)|DRIVER_VERSION|EVENT_(?:COMMAND_(?:EXECUTION_STATUS|QUEUE|TYPE)|CONTEXT|REFERENCE_COUNT)|EXEC_(?:KERNEL|NATIVE_KERNEL|STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST)|FILTER_(?:LINEAR|NEAREST)|FLOAT|FP_(?:CORRECTLY_ROUNDED_DIVIDE_SQRT|DENORM|FMA|INF_NAN|ROUND_TO_INF|ROUND_TO_NEAREST|ROUND_TO_ZERO|SOFT_FLOAT)|GLOBAL|HALF_FLOAT|IMAGE_(?:ARRAY_SIZE|BUFFER|DEPTH|ELEMENT_SIZE|FORMAT|FORMAT_MISMATCH|FORMAT_NOT_SUPPORTED|HEIGHT|NUM_MIP_LEVELS|NUM_SAMPLES|ROW_PITCH|SLICE_PITCH|WIDTH)|INTENSITY|INVALID_(?:ARG_INDEX|ARG_SIZE|ARG_VALUE|BINARY|BUFFER_SIZE|BUILD_OPTIONS|COMMAND_QUEUE|COMPILER_OPTIONS|CONTEXT|DEVICE|DEVICE_PARTITION_COUNT|DEVICE_QUEUE|DEVICE_TYPE|EVENT|EVENT_WAIT_LIST|GLOBAL_OFFSET|GLOBAL_WORK_SIZE|GL_OBJECT|HOST_PTR|IMAGE_DESCRIPTOR|IMAGE_FORMAT_DESCRIPTOR|IMAGE_SIZE|KERNEL|KERNEL_ARGS|KERNEL_DEFINITION|KERNEL_NAME|LINKER_OPTIONS|MEM_OBJECT|MIP_LEVEL|OPERATION|PIPE_SIZE|PLATFORM|PROGRAM|PROGRAM_EXECUTABLE|PROPERTY|QUEUE_PROPERTIES|SAMPLER|VALUE|WORK_DIMENSION|WORK_GROUP_SIZE|WORK_ITEM_SIZE)|KERNEL_(?:ARG_(?:ACCESS_(?:NONE|QUALIFIER|READ_ONLY|READ_WRITE|WRITE_ONLY)|ADDRESS_(?:CONSTANT|GLOBAL|LOCAL|PRIVATE|QUALIFIER)|INFO_NOT_AVAILABLE|NAME|TYPE_(?:CONST|NAME|NONE|PIPE|QUALIFIER|RESTRICT|VOLATILE))|ATTRIBUTES|COMPILE_NUM_SUB_GROUPS|COMPILE_WORK_GROUP_SIZE|CONTEXT|EXEC_INFO_SVM_FINE_GRAIN_SYSTEM|EXEC_INFO_SVM_PTRS|FUNCTION_NAME|GLOBAL_WORK_SIZE|LOCAL_MEM_SIZE|LOCAL_SIZE_FOR_SUB_GROUP_COUNT|MAX_NUM_SUB_GROUPS|MAX_SUB_GROUP_SIZE_FOR_NDRANGE|NUM_ARGS|PREFERRED_WORK_GROUP_SIZE_MULTIPLE|PRIVATE_MEM_SIZE|PROGRAM|REFERENCE_COUNT|SUB_GROUP_COUNT_FOR_NDRANGE|WORK_GROUP_SIZE)|LINKER_NOT_AVAILABLE|LINK_PROGRAM_FAILURE|LOCAL|LUMINANCE|MAP_(?:FAILURE|READ|WRITE|WRITE_INVALIDATE_REGION)|MEM_(?:ALLOC_HOST_PTR|ASSOCIATED_MEMOBJECT|CONTEXT|COPY_HOST_PTR|COPY_OVERLAP|FLAGS|HOST_NO_ACCESS|HOST_PTR|HOST_READ_ONLY|HOST_WRITE_ONLY|KERNEL_READ_AND_WRITE|MAP_COUNT|OBJECT_(?:ALLOCATION_FAILURE|BUFFER|IMAGE1D|IMAGE1D_ARRAY|IMAGE1D_BUFFER|IMAGE2D|IMAGE2D_ARRAY|IMAGE3D|PIPE)|OFFSET|READ_ONLY|READ_WRITE|REFERENCE_COUNT|SIZE|SVM_ATOMICS|SVM_FINE_GRAIN_BUFFER|TYPE|USES_SVM_POINTER|USE_HOST_PTR|WRITE_ONLY)|MIGRATE_MEM_OBJECT_(?:CONTENT_UNDEFINED|HOST)|MISALIGNED_SUB_BUFFER_OFFSET|NONE|NON_BLOCKING|OUT_OF_(?:HOST_MEMORY|RESOURCES)|PIPE_(?:MAX_PACKETS|PACKET_SIZE)|PLATFORM_(?:EXTENSIONS|HOST_TIMER_RESOLUTION|NAME|PROFILE|VENDOR|VERSION)|PROFILING_(?:COMMAND_(?:COMPLETE|END|QUEUED|START|SUBMIT)|INFO_NOT_AVAILABLE)|PROGRAM_(?:BINARIES|BINARY_SIZES|BINARY_TYPE(?:_COMPILED_OBJECT|_EXECUTABLE|_LIBRARY|_NONE)?|BUILD_(?:GLOBAL_VARIABLE_TOTAL_SIZE|LOG|OPTIONS|STATUS)|CONTEXT|DEVICES|IL|KERNEL_NAMES|NUM_DEVICES|NUM_KERNELS|REFERENCE_COUNT|SOURCE)|QUEUED|QUEUE_(?:CONTEXT|DEVICE|DEVICE_DEFAULT|ON_DEVICE|ON_DEVICE_DEFAULT|OUT_OF_ORDER_EXEC_MODE_ENABLE|PROFILING_ENABLE|PROPERTIES|REFERENCE_COUNT|SIZE)|R|RA|READ_(?:ONLY|WRITE)_CACHE|RG|RGB|RGBA|RGBx|RGx|RUNNING|Rx|SAMPLER_(?:ADDRESSING_MODE|CONTEXT|FILTER_MODE|LOD_MAX|LOD_MIN|MIP_FILTER_MODE|NORMALIZED_COORDS|REFERENCE_COUNT)|(?:UN)?SIGNED_INT(?:8|16|32)|SNORM_INT(?:8|16)|SUBMITTED|SUCCESS|UNORM_INT(?:8|16|24|_101010|_101010_2)|UNORM_SHORT_(?:555|565)|VERSION_(?:1_0|1_1|1_2|2_0|2_1)|sBGRA|sRGB|sRGBA|sRGBx)\b/,alias:"constant"},"function-opencl-host":{pattern:/\bcl(?:BuildProgram|CloneKernel|CompileProgram|Create(?:Buffer|CommandQueue(?:WithProperties)?|Context|ContextFromType|Image|Image2D|Image3D|Kernel|KernelsInProgram|Pipe|ProgramWith(?:Binary|BuiltInKernels|IL|Source)|Sampler|SamplerWithProperties|SubBuffer|SubDevices|UserEvent)|Enqueue(?:(?:Barrier|Marker)(?:WithWaitList)?|Copy(?:Buffer(?:Rect|ToImage)?|Image(?:ToBuffer)?)|(?:Fill|Map)(?:Buffer|Image)|MigrateMemObjects|NDRangeKernel|NativeKernel|(?:Read|Write)(?:Buffer(?:Rect)?|Image)|SVM(?:Free|Map|MemFill|Memcpy|MigrateMem|Unmap)|Task|UnmapMemObject|WaitForEvents)|Finish|Flush|Get(?:CommandQueueInfo|ContextInfo|Device(?:AndHostTimer|IDs|Info)|Event(?:Profiling)?Info|ExtensionFunctionAddress(?:ForPlatform)?|HostTimer|ImageInfo|Kernel(?:ArgInfo|Info|SubGroupInfo|WorkGroupInfo)|MemObjectInfo|PipeInfo|Platform(?:IDs|Info)|Program(?:Build)?Info|SamplerInfo|SupportedImageFormats)|LinkProgram|(?:Release|Retain)(?:CommandQueue|Context|Device|Event|Kernel|MemObject|Program|Sampler)|SVM(?:Alloc|Free)|Set(?:CommandQueueProperty|DefaultDeviceCommandQueue|EventCallback|Kernel|Kernel(?:Arg(?:SVMPointer)?|ExecInfo)|MemObjectDestructorCallback|UserEventStatus)|Unload(?:Platform)?Compiler|WaitForEvents)\b/,alias:"function"}},e.languages.insertBefore("c","keyword",t),e.languages.cpp&&(t["type-opencl-host-cpp"]={pattern:/\b(?:Buffer|BufferGL|BufferRenderGL|CommandQueue|Context|Device|DeviceCommandQueue|EnqueueArgs|Event|Image|Image1D|Image1DArray|Image1DBuffer|Image2D|Image2DArray|Image2DGL|Image3D|Image3DGL|ImageFormat|ImageGL|Kernel|KernelFunctor|LocalSpaceArg|Memory|NDRange|Pipe|Platform|Program|SVMAllocator|SVMTraitAtomic|SVMTraitCoarse|SVMTraitFine|SVMTraitReadOnly|SVMTraitReadWrite|SVMTraitWriteOnly|Sampler|UserEvent)\b/,alias:"keyword"},e.languages.insertBefore("cpp","keyword",t))}function _z(e){e.languages.openqasm={comment:/\/\*[\s\S]*?\*\/|\/\/.*/,string:{pattern:/"[^"\r\n\t]*"|'[^'\r\n\t]*'/,greedy:!0},keyword:/\b(?:CX|OPENQASM|U|barrier|boxas|boxto|break|const|continue|ctrl|def|defcal|defcalgrammar|delay|else|end|for|gate|gphase|if|in|include|inv|kernel|lengthof|let|measure|pow|reset|return|rotary|stretchinf|while)\b|#pragma\b/,"class-name":/\b(?:angle|bit|bool|creg|fixed|float|int|length|qreg|qubit|stretch|uint)\b/,function:/\b(?:cos|exp|ln|popcount|rotl|rotr|sin|sqrt|tan)\b(?=\s*\()/,constant:/\b(?:euler|pi|tau)\b|π|𝜏|ℇ/,number:{pattern:/(^|[^.\w$])(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?(?:dt|ns|us|µs|ms|s)?/i,lookbehind:!0},operator:/->|>>=?|<<=?|&&|\|\||\+\+|--|[!=<>&|~^+\-*/%]=?|@/,punctuation:/[(){}\[\];,:.]/},e.languages.qasm=e.languages.openqasm}function _H(e){e.languages.oz={comment:{pattern:/\/\*[\s\S]*?\*\/|%.*/,greedy:!0},string:{pattern:/"(?:[^"\\]|\\[\s\S])*"/,greedy:!0},atom:{pattern:/'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,alias:"builtin"},keyword:/\$|\[\]|\b(?:_|at|attr|case|catch|choice|class|cond|declare|define|dis|else(?:case|if)?|end|export|fail|false|feat|finally|from|fun|functor|if|import|in|local|lock|meth|nil|not|of|or|prepare|proc|prop|raise|require|self|skip|then|thread|true|try|unit)\b/,function:[/\b[a-z][A-Za-z\d]*(?=\()/,{pattern:/(\{)[A-Z][A-Za-z\d]*\b/,lookbehind:!0}],number:/\b(?:0[bx][\da-f]+|\d+(?:\.\d*)?(?:e~?\d+)?)\b|&(?:[^\\]|\\(?:\d{3}|.))/i,variable:/`(?:[^`\\]|\\.)+`/,"attr-name":/\b\w+(?=[ \t]*:(?![:=]))/,operator:/:(?:=|::?)|<[-:=]?|=(?:=|<?:?)|>=?:?|\\=:?|!!?|[|#+\-*\/,~^@]|\b(?:andthen|div|mod|orelse)\b/,punctuation:/[\[\](){}.:;?]/}}function _$(e){e.languages.parigp={comment:/\/\*[\s\S]*?\*\/|\\\\.*/,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"/,greedy:!0},keyword:RegExp("\\b(?:"+["breakpoint","break","dbg_down","dbg_err","dbg_up","dbg_x","forcomposite","fordiv","forell","forpart","forprime","forstep","forsubgroup","forvec","for","iferr","if","local","my","next","return","until","while"].map(function(e){return e.split("").join(" *")}).join("|")+")\\b"),function:/\b\w(?:[\w ]*\w)?(?= *\()/,number:{pattern:/((?:\. *\. *)?)(?:\b\d(?: *\d)*(?: *(?!\. *\.)\.(?: *\d)*)?|\. *\d(?: *\d)*)(?: *e *(?:[+-] *)?\d(?: *\d)*)?/i,lookbehind:!0},operator:/\. *\.|[*\/!](?: *=)?|%(?: *=|(?: *#)?(?: *')*)?|\+(?: *[+=])?|-(?: *[-=>])?|<(?: *>|(?: *<)?(?: *=)?)?|>(?: *>)?(?: *=)?|=(?: *=){0,2}|\\(?: *\/)?(?: *=)?|&(?: *&)?|\| *\||['#~^]/,punctuation:/[\[\]{}().,:;|]/}}function _G(e){var t;e.register(vP),t=e.languages.parser=e.languages.extend("markup",{keyword:{pattern:/(^|[^^])(?:\^(?:case|eval|for|if|switch|throw)\b|@(?:BASE|CLASS|GET(?:_DEFAULT)?|OPTIONS|SET_DEFAULT|USE)\b)/,lookbehind:!0},variable:{pattern:/(^|[^^])\B\$(?:\w+|(?=[.{]))(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{punctuation:/\.|:+/}},function:{pattern:/(^|[^^])\B[@^]\w+(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{keyword:{pattern:/(^@)(?:GET_|SET_)/,lookbehind:!0},punctuation:/\.|:+/}},escape:{pattern:/\^(?:[$^;@()\[\]{}"':]|#[a-f\d]*)/i,alias:"builtin"},punctuation:/[\[\](){};]/}),t=e.languages.insertBefore("parser","keyword",{"parser-comment":{pattern:/(\s)#.*/,lookbehind:!0,alias:"comment"},expression:{pattern:/(^|[^^])\((?:[^()]|\((?:[^()]|\((?:[^()])*\))*\))*\)/,greedy:!0,lookbehind:!0,inside:{string:{pattern:/(^|[^^])(["'])(?:(?!\2)[^^]|\^[\s\S])*\2/,lookbehind:!0},keyword:t.keyword,variable:t.variable,function:t.function,boolean:/\b(?:false|true)\b/,number:/\b(?:0x[a-f\d]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?)\b/i,escape:t.escape,operator:/[~+*\/\\%]|!(?:\|\|?|=)?|&&?|\|\|?|==|<[<=]?|>[>=]?|-[fd]?|\b(?:def|eq|ge|gt|in|is|le|lt|ne)\b/,punctuation:t.punctuation}}}),e.languages.insertBefore("inside","punctuation",{expression:t.expression,keyword:t.keyword,variable:t.variable,function:t.function,escape:t.escape,"parser-punctuation":{pattern:t.punctuation,alias:"punctuation"}},t.tag.inside["attr-value"])}function _q(e){e.languages.pascal={directive:{pattern:/\{\$[\s\S]*?\}/,greedy:!0,alias:["marco","property"]},comment:{pattern:/\(\*[\s\S]*?\*\)|\{[\s\S]*?\}|\/\/.*/,greedy:!0},string:{pattern:/(?:'(?:''|[^'\r\n])*'(?!')|#[&$%]?[a-f\d]+)+|\^[a-z]/i,greedy:!0},asm:{pattern:/(\basm\b)[\s\S]+?(?=\bend\s*[;[])/i,lookbehind:!0,greedy:!0,inside:null},keyword:[{pattern:/(^|[^&])\b(?:absolute|array|asm|begin|case|const|constructor|destructor|do|downto|else|end|file|for|function|goto|if|implementation|inherited|inline|interface|label|nil|object|of|operator|packed|procedure|program|record|reintroduce|repeat|self|set|string|then|to|type|unit|until|uses|var|while|with)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:dispose|exit|false|new|true)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:class|dispinterface|except|exports|finalization|finally|initialization|inline|library|on|out|packed|property|raise|resourcestring|threadvar|try)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:absolute|abstract|alias|assembler|bitpacked|break|cdecl|continue|cppdecl|cvar|default|deprecated|dynamic|enumerator|experimental|export|external|far|far16|forward|generic|helper|implements|index|interrupt|iochecks|local|message|name|near|nodefault|noreturn|nostackframe|oldfpccall|otherwise|overload|override|pascal|platform|private|protected|public|published|read|register|reintroduce|result|safecall|saveregisters|softfloat|specialize|static|stdcall|stored|strict|unaligned|unimplemented|varargs|virtual|write)\b/i,lookbehind:!0}],number:[/(?:[&%]\d+|\$[a-f\d]+)/i,/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?/i],operator:[/\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=]/,{pattern:/(^|[^&])\b(?:and|as|div|exclude|in|include|is|mod|not|or|shl|shr|xor)\b/,lookbehind:!0}],punctuation:/\(\.|\.\)|[()\[\]:;,.]/},e.languages.pascal.asm.inside=e.languages.extend("pascal",{asm:void 0,keyword:void 0,operator:void 0}),e.languages.objectpascal=e.languages.pascal}function _W(e){var t,n,r,a;t=/\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\)/.source,n=/(?:\b\w+(?:<braces>)?|<braces>)/.source.replace(/<braces>/g,function(){return t}),r=e.languages.pascaligo={comment:/\(\*[\s\S]+?\*\)|\/\/.*/,string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1|\^[a-z]/i,greedy:!0},"class-name":[{pattern:RegExp(/(\btype\s+\w+\s+is\s+)<type>/.source.replace(/<type>/g,function(){return n}),"i"),lookbehind:!0,inside:null},{pattern:RegExp(/<type>(?=\s+is\b)/.source.replace(/<type>/g,function(){return n}),"i"),inside:null},{pattern:RegExp(/(:\s*)<type>/.source.replace(/<type>/g,function(){return n})),lookbehind:!0,inside:null}],keyword:{pattern:/(^|[^&])\b(?:begin|block|case|const|else|end|fail|for|from|function|if|is|nil|of|remove|return|skip|then|type|var|while|with)\b/i,lookbehind:!0},boolean:{pattern:/(^|[^&])\b(?:False|True)\b/i,lookbehind:!0},builtin:{pattern:/(^|[^&])\b(?:bool|int|list|map|nat|record|string|unit)\b/i,lookbehind:!0},function:/\b\w+(?=\s*\()/,number:[/%[01]+|&[0-7]+|\$[a-f\d]+/i,/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?(?:mtz|n)?/i],operator:/->|=\/=|\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=|]|\b(?:and|mod|or)\b/,punctuation:/\(\.|\.\)|[()\[\]:;,.{}]/},a=["comment","keyword","builtin","operator","punctuation"].reduce(function(e,t){return e[t]=r[t],e},{}),r["class-name"].forEach(function(e){e.inside=a})}function _V(e){e.languages.psl={comment:{pattern:/#.*/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"])*"/,greedy:!0,inside:{symbol:/\\[ntrbA-Z"\\]/}},"heredoc-string":{pattern:/<<<([a-zA-Z_]\w*)[\r\n](?:.*[\r\n])*?\1\b/,alias:"string",greedy:!0},keyword:/\b(?:__multi|__single|case|default|do|else|elsif|exit|export|for|foreach|function|if|last|line|local|next|requires|return|switch|until|while|word)\b/,constant:/\b(?:ALARM|CHART_ADD_GRAPH|CHART_DELETE_GRAPH|CHART_DESTROY|CHART_LOAD|CHART_PRINT|EOF|OFFLINE|OK|PSL_PROF_LOG|R_CHECK_HORIZ|R_CHECK_VERT|R_CLICKER|R_COLUMN|R_FRAME|R_ICON|R_LABEL|R_LABEL_CENTER|R_LIST_MULTIPLE|R_LIST_MULTIPLE_ND|R_LIST_SINGLE|R_LIST_SINGLE_ND|R_MENU|R_POPUP|R_POPUP_SCROLLED|R_RADIO_HORIZ|R_RADIO_VERT|R_ROW|R_SCALE_HORIZ|R_SCALE_VERT|R_SEP_HORIZ|R_SEP_VERT|R_SPINNER|R_TEXT_FIELD|R_TEXT_FIELD_LABEL|R_TOGGLE|TRIM_LEADING|TRIM_LEADING_AND_TRAILING|TRIM_REDUNDANT|TRIM_TRAILING|VOID|WARN)\b/,boolean:/\b(?:FALSE|False|NO|No|TRUE|True|YES|Yes|false|no|true|yes)\b/,variable:/\b(?:PslDebug|errno|exit_status)\b/,builtin:{pattern:/\b(?:PslExecute|PslFunctionCall|PslFunctionExists|PslSetOptions|_snmp_debug|acos|add_diary|annotate|annotate_get|ascii_to_ebcdic|asctime|asin|atan|atexit|batch_set|blackout|cat|ceil|chan_exists|change_state|close|code_cvt|cond_signal|cond_wait|console_type|convert_base|convert_date|convert_locale_date|cos|cosh|create|date|dcget_text|destroy|destroy_lock|dget_text|difference|dump_hist|ebcdic_to_ascii|encrypt|event_archive|event_catalog_get|event_check|event_query|event_range_manage|event_range_query|event_report|event_schedule|event_trigger|event_trigger2|execute|exists|exp|fabs|file|floor|fmod|fopen|fseek|ftell|full_discovery|get|get_chan_info|get_ranges|get_text|get_vars|getenv|gethostinfo|getpid|getpname|grep|history|history_get_retention|in_transition|index|int|internal|intersection|is_var|isnumber|join|kill|length|lines|lock|lock_info|log|log10|loge|matchline|msg_check|msg_get_format|msg_get_severity|msg_printf|msg_sprintf|ntharg|nthargf|nthline|nthlinef|num_bytes|num_consoles|pconfig|popen|poplines|pow|print|printf|proc_exists|process|random|read|readln|refresh_parameters|remote_check|remote_close|remote_event_query|remote_event_trigger|remote_file_send|remote_open|remove|replace|rindex|sec_check_priv|sec_store_get|sec_store_set|set|set_alarm_ranges|set_locale|share|sin|sinh|sleep|snmp_agent_config|snmp_agent_start|snmp_agent_stop|snmp_close|snmp_config|snmp_get|snmp_get_next|snmp_h_get|snmp_h_get_next|snmp_h_set|snmp_open|snmp_set|snmp_trap_ignore|snmp_trap_listen|snmp_trap_raise_std_trap|snmp_trap_receive|snmp_trap_register_im|snmp_trap_send|snmp_walk|sopen|sort|splitline|sprintf|sqrt|srandom|str_repeat|strcasecmp|subset|substr|system|tail|tan|tanh|text_domain|time|tmpnam|tolower|toupper|trace_psl_process|trim|union|unique|unlock|unset|va_arg|va_start|write)\b/,alias:"builtin-function"},"foreach-variable":{pattern:/(\bforeach\s+(?:(?:\w+\b|"(?:\\.|[^\\"])*")\s+){0,2})[_a-zA-Z]\w*(?=\s*\()/,lookbehind:!0,greedy:!0},function:/\b[_a-z]\w*\b(?=\s*\()/i,number:/\b(?:0x[0-9a-f]+|\d+(?:\.\d+)?)\b/i,operator:/--|\+\+|&&=?|\|\|=?|<<=?|>>=?|[=!]~|[-+*/%&|^!=<>]=?|\.|[:?]/,punctuation:/[(){}\[\];,]/}}function _Y(e){e.languages.pcaxis={string:/"[^"]*"/,keyword:{pattern:/((?:^|;)\s*)[-A-Z\d]+(?:\s*\[[-\w]+\])?(?:\s*\("[^"]*"(?:,\s*"[^"]*")*\))?(?=\s*=)/,lookbehind:!0,greedy:!0,inside:{keyword:/^[-A-Z\d]+/,language:{pattern:/^(\s*)\[[-\w]+\]/,lookbehind:!0,inside:{punctuation:/^\[|\]$/,property:/[-\w]+/}},"sub-key":{pattern:/^(\s*)\S[\s\S]*/,lookbehind:!0,inside:{parameter:{pattern:/"[^"]*"/,alias:"property"},punctuation:/^\(|\)$|,/}}}},operator:/=/,tlist:{pattern:/TLIST\s*\(\s*\w+(?:(?:\s*,\s*"[^"]*")+|\s*,\s*"[^"]*"-"[^"]*")?\s*\)/,greedy:!0,inside:{function:/^TLIST/,property:{pattern:/^(\s*\(\s*)\w+/,lookbehind:!0},string:/"[^"]*"/,punctuation:/[(),]/,operator:/-/}},punctuation:/[;,]/,number:{pattern:/(^|\s)\d+(?:\.\d+)?(?!\S)/,lookbehind:!0},boolean:/NO|YES/},e.languages.px=e.languages.pcaxis}function _K(e){e.languages.peoplecode={comment:RegExp([/\/\*[\s\S]*?\*\//.source,/\bREM[^;]*;/.source,/<\*(?:[^<*]|\*(?!>)|<(?!\*)|<\*(?:(?!\*>)[\s\S])*\*>)*\*>/.source,/\/\+[\s\S]*?\+\//.source].join("|")),string:{pattern:/'(?:''|[^'\r\n])*'(?!')|"(?:""|[^"\r\n])*"(?!")/,greedy:!0},variable:/%\w+/,"function-definition":{pattern:/((?:^|[^\w-])(?:function|method)\s+)\w+/i,lookbehind:!0,alias:"function"},"class-name":{pattern:/((?:^|[^-\w])(?:as|catch|class|component|create|extends|global|implements|instance|local|of|property|returns)\s+)\w+(?::\w+)*/i,lookbehind:!0,inside:{punctuation:/:/}},keyword:/\b(?:abstract|alias|as|catch|class|component|constant|create|declare|else|end-(?:class|evaluate|for|function|get|if|method|set|try|while)|evaluate|extends|for|function|get|global|if|implements|import|instance|library|local|method|null|of|out|peopleCode|private|program|property|protected|readonly|ref|repeat|returns?|set|step|then|throw|to|try|until|value|when(?:-other)?|while)\b/i,"operator-keyword":{pattern:/\b(?:and|not|or)\b/i,alias:"operator"},function:/[_a-z]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/i,number:/\b\d+(?:\.\d+)?\b/,operator:/<>|[<>]=?|!=|\*\*|[-+*/|=@]/,punctuation:/[:.;,()[\]]/},e.languages.pcode=e.languages.peoplecode}function _X(e){var t;t=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source,e.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,t+/\s*/.source+t].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}}function _Z(e){var t;e.register(SY),e.register(SV),t=/(?:\b[a-zA-Z]\w*|[|\\[\]])+/.source,e.languages.phpdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp("(@(?:global|param|property(?:-read|-write)?|var)\\s+(?:"+t+"\\s+)?)\\$\\w+"),lookbehind:!0}}),e.languages.insertBefore("phpdoc","keyword",{"class-name":[{pattern:RegExp("(@(?:global|package|param|property(?:-read|-write)?|return|subpackage|throws|var)\\s+)"+t),lookbehind:!0,inside:{keyword:/\b(?:array|bool|boolean|callback|double|false|float|int|integer|mixed|null|object|resource|self|string|true|void)\b/,punctuation:/[|\\[\]()]/}}]}),e.languages.javadoclike.addSupport("php",e.languages.phpdoc)}function _Q(e){e.register(SV),e.languages.insertBefore("php","variable",{this:{pattern:/\$this\b/,alias:"keyword"},global:/\$(?:GLOBALS|HTTP_RAW_POST_DATA|_(?:COOKIE|ENV|FILES|GET|POST|REQUEST|SERVER|SESSION)|argc|argv|http_response_header|php_errormsg)\b/,scope:{pattern:/\b[\w\\]+::/,inside:{keyword:/\b(?:parent|self|static)\b/,punctuation:/::|\\/}}})}function _J(e){var t,n,r,a,i,s,o;t=/\$\w+|%[a-z]+%/,a="(?:-+"+(r=/(?:[drlu]|do|down|le|left|ri|right|up)/.source)+"-+|\\.+"+r+"\\.+|-+(?:"+(n=/\[[^[\]]*\]/.source)+"-*)?|"+n+"-+|\\.+(?:"+n+"\\.*)?|"+n+"\\.+)",i=/(?:<{1,2}|\/{1,2}|\\{1,2}|<\||[#*^+}xo])/.source,s=/(?:>{1,2}|\/{1,2}|\\{1,2}|\|>|[#*^+{xo])/.source,o=/[[?]?[ox]?/.source+"(?:"+a+s+"|"+i+a+"(?:"+s+")?)"+/[ox]?[\]?]?/.source,e.languages["plant-uml"]={comment:{pattern:/(^[ \t]*)(?:'.*|\/'[\s\S]*?'\/)/m,lookbehind:!0,greedy:!0},preprocessor:{pattern:/(^[ \t]*)!.*/m,lookbehind:!0,greedy:!0,alias:"property",inside:{variable:t}},delimiter:{pattern:/(^[ \t]*)@(?:end|start)uml\b/m,lookbehind:!0,greedy:!0,alias:"punctuation"},arrow:{pattern:RegExp(/(^|[^-.<>?|\\[\]ox])/.source+o+/(?![-.<>?|\\\]ox])/.source),lookbehind:!0,greedy:!0,alias:"operator",inside:{expression:{pattern:/(\[)[^[\]]+(?=\])/,lookbehind:!0,inside:null},punctuation:/\[(?=$|\])|^\]/}},string:{pattern:/"[^"]*"/,greedy:!0},text:{pattern:/(\[[ \t]*[\r\n]+(?![\r\n]))[^\]]*(?=\])/,lookbehind:!0,greedy:!0,alias:"string"},keyword:[{pattern:/^([ \t]*)(?:abstract\s+class|end\s+(?:box|fork|group|merge|note|ref|split|title)|(?:fork|split)(?:\s+again)?|activate|actor|agent|alt|annotation|artifact|autoactivate|autonumber|backward|binary|boundary|box|break|caption|card|case|circle|class|clock|cloud|collections|component|concise|control|create|critical|database|deactivate|destroy|detach|diamond|else|elseif|end|end[hr]note|endif|endswitch|endwhile|entity|enum|file|folder|footer|frame|group|[hr]?note|header|hexagon|hide|if|interface|label|legend|loop|map|namespace|network|newpage|node|nwdiag|object|opt|package|page|par|participant|person|queue|rectangle|ref|remove|repeat|restore|return|robust|scale|set|show|skinparam|stack|start|state|stop|storage|switch|title|together|usecase|usecase\/|while)(?=\s|$)/m,lookbehind:!0,greedy:!0},/\b(?:elseif|equals|not|while)(?=\s*\()/,/\b(?:as|is|then)\b/],divider:{pattern:/^==.+==$/m,greedy:!0,alias:"important"},time:{pattern:/@(?:\d+(?:[:/]\d+){2}|[+-]?\d+|:[a-z]\w*(?:[+-]\d+)?)\b/i,greedy:!0,alias:"number"},color:{pattern:/#(?:[a-z_]+|[a-fA-F0-9]+)\b/,alias:"symbol"},variable:t,punctuation:/[:,;()[\]{}]|\.{3}/},e.languages["plant-uml"].arrow.inside.expression.inside=e.languages["plant-uml"],e.languages.plantuml=e.languages["plant-uml"]}function _0(e){e.register(vK),e.languages.plsql=e.languages.extend("sql",{comment:{pattern:/\/\*[\s\S]*?\*\/|--.*/,greedy:!0},keyword:/\b(?:A|ACCESSIBLE|ADD|AGENT|AGGREGATE|ALL|ALTER|AND|ANY|ARRAY|AS|ASC|AT|ATTRIBUTE|AUTHID|AVG|BEGIN|BETWEEN|BFILE_BASE|BINARY|BLOB_BASE|BLOCK|BODY|BOTH|BOUND|BULK|BY|BYTE|C|CALL|CALLING|CASCADE|CASE|CHAR|CHARACTER|CHARSET|CHARSETFORM|CHARSETID|CHAR_BASE|CHECK|CLOB_BASE|CLONE|CLOSE|CLUSTER|CLUSTERS|COLAUTH|COLLECT|COLUMNS|COMMENT|COMMIT|COMMITTED|COMPILED|COMPRESS|CONNECT|CONSTANT|CONSTRUCTOR|CONTEXT|CONTINUE|CONVERT|COUNT|CRASH|CREATE|CREDENTIAL|CURRENT|CURSOR|CUSTOMDATUM|DANGLING|DATA|DATE|DATE_BASE|DAY|DECLARE|DEFAULT|DEFINE|DELETE|DESC|DETERMINISTIC|DIRECTORY|DISTINCT|DOUBLE|DROP|DURATION|ELEMENT|ELSE|ELSIF|EMPTY|END|ESCAPE|EXCEPT|EXCEPTION|EXCEPTIONS|EXCLUSIVE|EXECUTE|EXISTS|EXIT|EXTERNAL|FETCH|FINAL|FIRST|FIXED|FLOAT|FOR|FORALL|FORCE|FROM|FUNCTION|GENERAL|GOTO|GRANT|GROUP|HASH|HAVING|HEAP|HIDDEN|HOUR|IDENTIFIED|IF|IMMEDIATE|IMMUTABLE|IN|INCLUDING|INDEX|INDEXES|INDICATOR|INDICES|INFINITE|INSERT|INSTANTIABLE|INT|INTERFACE|INTERSECT|INTERVAL|INTO|INVALIDATE|IS|ISOLATION|JAVA|LANGUAGE|LARGE|LEADING|LENGTH|LEVEL|LIBRARY|LIKE|LIKE2|LIKE4|LIKEC|LIMIT|LIMITED|LOCAL|LOCK|LONG|LOOP|MAP|MAX|MAXLEN|MEMBER|MERGE|MIN|MINUS|MINUTE|MOD|MODE|MODIFY|MONTH|MULTISET|MUTABLE|NAME|NAN|NATIONAL|NATIVE|NCHAR|NEW|NOCOMPRESS|NOCOPY|NOT|NOWAIT|NULL|NUMBER_BASE|OBJECT|OCICOLL|OCIDATE|OCIDATETIME|OCIDURATION|OCIINTERVAL|OCILOBLOCATOR|OCINUMBER|OCIRAW|OCIREF|OCIREFCURSOR|OCIROWID|OCISTRING|OCITYPE|OF|OLD|ON|ONLY|OPAQUE|OPEN|OPERATOR|OPTION|OR|ORACLE|ORADATA|ORDER|ORGANIZATION|ORLANY|ORLVARY|OTHERS|OUT|OVERLAPS|OVERRIDING|PACKAGE|PARALLEL_ENABLE|PARAMETER|PARAMETERS|PARENT|PARTITION|PASCAL|PERSISTABLE|PIPE|PIPELINED|PLUGGABLE|POLYMORPHIC|PRAGMA|PRECISION|PRIOR|PRIVATE|PROCEDURE|PUBLIC|RAISE|RANGE|RAW|READ|RECORD|REF|REFERENCE|RELIES_ON|REM|REMAINDER|RENAME|RESOURCE|RESULT|RESULT_CACHE|RETURN|RETURNING|REVERSE|REVOKE|ROLLBACK|ROW|SAMPLE|SAVE|SAVEPOINT|SB1|SB2|SB4|SECOND|SEGMENT|SELECT|SELF|SEPARATE|SEQUENCE|SERIALIZABLE|SET|SHARE|SHORT|SIZE|SIZE_T|SOME|SPARSE|SQL|SQLCODE|SQLDATA|SQLNAME|SQLSTATE|STANDARD|START|STATIC|STDDEV|STORED|STRING|STRUCT|STYLE|SUBMULTISET|SUBPARTITION|SUBSTITUTABLE|SUBTYPE|SUM|SYNONYM|TABAUTH|TABLE|TDO|THE|THEN|TIME|TIMESTAMP|TIMEZONE_ABBR|TIMEZONE_HOUR|TIMEZONE_MINUTE|TIMEZONE_REGION|TO|TRAILING|TRANSACTION|TRANSACTIONAL|TRUSTED|TYPE|UB1|UB2|UB4|UNDER|UNION|UNIQUE|UNPLUG|UNSIGNED|UNTRUSTED|UPDATE|USE|USING|VALIST|VALUE|VALUES|VARIABLE|VARIANCE|VARRAY|VARYING|VIEW|VIEWS|VOID|WHEN|WHERE|WHILE|WITH|WORK|WRAPPED|WRITE|YEAR|ZONE)\b/i,operator:/:=?|=>|[<>^~!]=|\.\.|\|\||\*\*|[-+*/%<>=@]/}),e.languages.insertBefore("plsql","operator",{label:{pattern:/<<\s*\w+\s*>>/,alias:"symbol"}})}function _1(e){e.languages.powerquery={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},"quoted-identifier":{pattern:/#"(?:[^"\r\n]|"")*"(?!")/,greedy:!0},string:{pattern:/(?:#!)?"(?:[^"\r\n]|"")*"(?!")/,greedy:!0},constant:[/\bDay\.(?:Friday|Monday|Saturday|Sunday|Thursday|Tuesday|Wednesday)\b/,/\bTraceLevel\.(?:Critical|Error|Information|Verbose|Warning)\b/,/\bOccurrence\.(?:All|First|Last)\b/,/\bOrder\.(?:Ascending|Descending)\b/,/\bRoundingMode\.(?:AwayFromZero|Down|ToEven|TowardZero|Up)\b/,/\bMissingField\.(?:Error|Ignore|UseNull)\b/,/\bQuoteStyle\.(?:Csv|None)\b/,/\bJoinKind\.(?:FullOuter|Inner|LeftAnti|LeftOuter|RightAnti|RightOuter)\b/,/\bGroupKind\.(?:Global|Local)\b/,/\bExtraValues\.(?:Error|Ignore|List)\b/,/\bJoinAlgorithm\.(?:Dynamic|LeftHash|LeftIndex|PairwiseHash|RightHash|RightIndex|SortMerge)\b/,/\bJoinSide\.(?:Left|Right)\b/,/\bPrecision\.(?:Decimal|Double)\b/,/\bRelativePosition\.From(?:End|Start)\b/,/\bTextEncoding\.(?:Ascii|BigEndianUnicode|Unicode|Utf16|Utf8|Windows)\b/,/\b(?:Any|Binary|Date|DateTime|DateTimeZone|Duration|Function|Int16|Int32|Int64|Int8|List|Logical|None|Number|Record|Table|Text|Time)\.Type\b/,/\bnull\b/],boolean:/\b(?:false|true)\b/,keyword:/\b(?:and|as|each|else|error|if|in|is|let|meta|not|nullable|optional|or|otherwise|section|shared|then|try|type)\b|#(?:binary|date|datetime|datetimezone|duration|infinity|nan|sections|shared|table|time)\b/,function:{pattern:/(^|[^#\w.])[a-z_][\w.]*(?=\s*\()/i,lookbehind:!0},"data-type":{pattern:/\b(?:any|anynonnull|binary|date|datetime|datetimezone|duration|function|list|logical|none|number|record|table|text|time)\b/,alias:"class-name"},number:{pattern:/\b0x[\da-f]+\b|(?:[+-]?(?:\b\d+\.)?\b\d+|[+-]\.\d+|(^|[^.])\B\.\d+)(?:e[+-]?\d+)?\b/i,lookbehind:!0},operator:/[-+*\/&?@^]|<(?:=>?|>)?|>=?|=>?|\.\.\.?/,punctuation:/[,;\[\](){}]/},e.languages.pq=e.languages.powerquery,e.languages.mscript=e.languages.powerquery}function _2(e){var t;(t=e.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/}).string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:t},boolean:t.boolean,variable:t.variable}}function _3(e){e.register(vF),e.languages.processing=e.languages.extend("clike",{keyword:/\b(?:break|case|catch|class|continue|default|else|extends|final|for|if|implements|import|new|null|private|public|return|static|super|switch|this|try|void|while)\b/,function:/\b\w+(?=\s*\()/,operator:/<[<=]?|>[>=]?|&&?|\|\|?|[%?]|[!=+\-*\/]=?/}),e.languages.insertBefore("processing","number",{constant:/\b(?!XML\b)[A-Z][A-Z\d_]+\b/,type:{pattern:/\b(?:boolean|byte|char|color|double|float|int|[A-Z]\w*)\b/,alias:"class-name"}})}function _4(e){e.languages.prolog={comment:{pattern:/\/\*[\s\S]*?\*\/|%.*/,greedy:!0},string:{pattern:/(["'])(?:\1\1|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1(?!\1)/,greedy:!0},builtin:/\b(?:fx|fy|xf[xy]?|yfx?)\b/,function:/\b[a-z]\w*(?:(?=\()|\/\d+)/,number:/\b\d+(?:\.\d*)?/,operator:/[:\\=><\-?*@\/;+^|!$.]+|\b(?:is|mod|not|xor)\b/,punctuation:/[(){}\[\],]/}}function _5(e){var t,n;n=["sum","min","max","avg","group","stddev","stdvar","count","count_values","bottomk","topk","quantile"].concat(t=["on","ignoring","group_right","group_left","by","without"],["offset"]),e.languages.promql={comment:{pattern:/(^[ \t]*)#.*/m,lookbehind:!0},"vector-match":{pattern:RegExp("((?:"+t.join("|")+")\\s*)\\([^)]*\\)"),lookbehind:!0,inside:{"label-key":{pattern:/\b[^,]+\b/,alias:"attr-name"},punctuation:/[(),]/}},"context-labels":{pattern:/\{[^{}]*\}/,inside:{"label-key":{pattern:/\b[a-z_]\w*(?=\s*(?:=|![=~]))/,alias:"attr-name"},"label-value":{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0,alias:"attr-value"},punctuation:/\{|\}|=~?|![=~]|,/}},"context-range":[{pattern:/\[[\w\s:]+\]/,inside:{punctuation:/\[|\]|:/,"range-duration":{pattern:/\b(?:\d+(?:[smhdwy]|ms))+\b/i,alias:"number"}}},{pattern:/(\boffset\s+)\w+/,lookbehind:!0,inside:{"range-duration":{pattern:/\b(?:\d+(?:[smhdwy]|ms))+\b/i,alias:"number"}}}],keyword:RegExp("\\b(?:"+n.join("|")+")\\b","i"),function:/\b[a-z_]\w*(?=\s*\()/i,number:/[-+]?(?:(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[-+]?\d+)?\b|\b(?:0x[0-9a-f]+|nan|inf)\b)/i,operator:/[\^*/%+-]|==|!=|<=|<|>=|>|\b(?:and|or|unless)\b/i,punctuation:/[{};()`,.[\]]/}}function _6(e){e.languages.properties={comment:/^[ \t]*[#!].*$/m,value:{pattern:/(^[ \t]*(?:\\(?:\r\n|[\s\S])|[^\\\s:=])+(?: *[=:] *(?! )| ))(?:\\(?:\r\n|[\s\S])|[^\\\r\n])+/m,lookbehind:!0,alias:"attr-value"},key:{pattern:/^[ \t]*(?:\\(?:\r\n|[\s\S])|[^\\\s:=])+(?= *[=:]| )/m,alias:"attr-name"},punctuation:/[=:]/}}function _9(e){var t;e.register(vF),t=/\b(?:bool|bytes|double|s?fixed(?:32|64)|float|[su]?int(?:32|64)|string)\b/,e.languages.protobuf=e.languages.extend("clike",{"class-name":[{pattern:/(\b(?:enum|extend|message|service)\s+)[A-Za-z_]\w*(?=\s*\{)/,lookbehind:!0},{pattern:/(\b(?:rpc\s+\w+|returns)\s*\(\s*(?:stream\s+)?)\.?[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*(?=\s*\))/,lookbehind:!0}],keyword:/\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|returns|rpc(?=\s+\w)|service|stream|syntax|to)\b(?!\s*=\s*\d)/,function:/\b[a-z_]\w*(?=\s*\()/i}),e.languages.insertBefore("protobuf","operator",{map:{pattern:/\bmap<\s*[\w.]+\s*,\s*[\w.]+\s*>(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/[<>.,]/,builtin:t}},builtin:t,"positional-class-name":{pattern:/(?:\b|\B\.)[a-z_]\w*(?:\.[a-z_]\w*)*(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/\./}},annotation:{pattern:/(\[\s*)[a-z_]\w*(?=\s*=)/i,lookbehind:!0}})}function _8(e){var t,n,r;(r={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},number:n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,boolean:/\b(?:false|true)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:n,punctuation:/[{}()\[\];:,]/}).interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:r}},r.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:r}},e.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:r}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:r}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:r}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:r.interpolation}},rest:r}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:r.interpolation,comment:r.comment,punctuation:/[{},]/}},func:r.func,string:r.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:r.interpolation,punctuation:/[{}()\[\];:.]/}}function _7(e){e.register(TV),e.languages.twig={comment:/^\{#[\s\S]*?#\}$/,"tag-name":{pattern:/(^\{%-?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%]-?|-?[%}]\}$/,alias:"punctuation"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,inside:{punctuation:/^['"]|['"]$/}},keyword:/\b(?:even|if|odd)\b/,boolean:/\b(?:false|null|true)\b/,number:/\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,operator:[{pattern:/(\s)(?:and|b-and|b-or|b-xor|ends with|in|is|matches|not|or|same as|starts with)(?=\s)/,lookbehind:!0},/[=<>]=?|!=|\*\*?|\/\/?|\?:?|[-+~%|]/],punctuation:/[()\[\]{}:.,]/},e.hooks.add("before-tokenize",function(t){"twig"===t.language&&e.languages["markup-templating"].buildPlaceholders(t,"twig",/\{(?:#[\s\S]*?#|%[\s\S]*?%|\{[\s\S]*?\})\}/g)}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"twig")})}function ke(e){e.register(vB),e.register(vP),function(e){e.languages.pug={comment:{pattern:/(^([\t ]*))\/\/.*(?:(?:\r?\n|\r)\2[\t ].+)*/m,lookbehind:!0},"multiline-script":{pattern:/(^([\t ]*)script\b.*\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0,inside:e.languages.javascript},filter:{pattern:/(^([\t ]*)):.+(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"variable"},text:/\S[\s\S]*/}},"multiline-plain-text":{pattern:/(^([\t ]*)[\w\-#.]+\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0},markup:{pattern:/(^[\t ]*)<.+/m,lookbehind:!0,inside:e.languages.markup},doctype:{pattern:/((?:^|\n)[\t ]*)doctype(?: .+)?/,lookbehind:!0},"flow-control":{pattern:/(^[\t ]*)(?:case|default|each|else|if|unless|when|while)\b(?: .+)?/m,lookbehind:!0,inside:{each:{pattern:/^each .+? in\b/,inside:{keyword:/\b(?:each|in)\b/,punctuation:/,/}},branch:{pattern:/^(?:case|default|else|if|unless|when|while)\b/,alias:"keyword"},rest:e.languages.javascript}},keyword:{pattern:/(^[\t ]*)(?:append|block|extends|include|prepend)\b.+/m,lookbehind:!0},mixin:[{pattern:/(^[\t ]*)mixin .+/m,lookbehind:!0,inside:{keyword:/^mixin/,function:/\w+(?=\s*\(|\s*$)/,punctuation:/[(),.]/}},{pattern:/(^[\t ]*)\+.+/m,lookbehind:!0,inside:{name:{pattern:/^\+\w+/,alias:"function"},rest:e.languages.javascript}}],script:{pattern:/(^[\t ]*script(?:(?:&[^(]+)?\([^)]+\))*[\t ]).+/m,lookbehind:!0,inside:e.languages.javascript},"plain-text":{pattern:/(^[\t ]*(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?[\t ]).+/m,lookbehind:!0},tag:{pattern:/(^[\t ]*)(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?:?/m,lookbehind:!0,inside:{attributes:[{pattern:/&[^(]+\([^)]+\)/,inside:e.languages.javascript},{pattern:/\([^)]+\)/,inside:{"attr-value":{pattern:/(=\s*(?!\s))(?:\{[^}]*\}|[^,)\r\n]+)/,lookbehind:!0,inside:e.languages.javascript},"attr-name":/[\w-]+(?=\s*!?=|\s*[,)])/,punctuation:/[!=(),]+/}}],punctuation:/:/,"attr-id":/#[\w\-]+/,"attr-class":/\.[\w\-]+/}},code:[{pattern:/(^[\t ]*(?:-|!?=)).+/m,lookbehind:!0,inside:e.languages.javascript}],punctuation:/[.\-!=|]+/};for(var t=/(^([\t ]*)):<filter_name>(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/.source,n=[{filter:"atpl",language:"twig"},{filter:"coffee",language:"coffeescript"},"ejs","handlebars","less","livescript","markdown",{filter:"sass",language:"scss"},"stylus"],r={},a=0,i=n.length;a<i;a++){var s=n[a];s="string"==typeof s?{filter:s,language:s}:s,e.languages[s.language]&&(r["filter-"+s.filter]={pattern:RegExp(t.replace("<filter_name>",function(){return s.filter}),"m"),lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"variable"},text:{pattern:/\S[\s\S]*/,alias:[s.language,"language-"+s.language],inside:e.languages[s.language]}}})}e.languages.insertBefore("pug","filter",r)}(e)}function kt(e){var t;e.languages.puppet={heredoc:[{pattern:/(@\("([^"\r\n\/):]+)"(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r(?!\n)))*?[ \t]*(?:\|[ \t]*)?(?:-[ \t]*)?\2/,lookbehind:!0,alias:"string",inside:{punctuation:/(?=\S).*\S(?= *$)/}},{pattern:/(@\(([^"\r\n\/):]+)(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r(?!\n)))*?[ \t]*(?:\|[ \t]*)?(?:-[ \t]*)?\2/,lookbehind:!0,greedy:!0,alias:"string",inside:{punctuation:/(?=\S).*\S(?= *$)/}},{pattern:/@\("?(?:[^"\r\n\/):]+)"?(?:\/[nrts$uL]*)?\)/,alias:"string",inside:{punctuation:{pattern:/(\().+?(?=\))/,lookbehind:!0}}}],"multiline-comment":{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0,greedy:!0,alias:"comment"},regex:{pattern:/((?:\bnode\s+|[~=\(\[\{,]\s*|[=+]>\s*|^\s*))\/(?:[^\/\\]|\\[\s\S])+\/(?:[imx]+\b|\B)/,lookbehind:!0,greedy:!0,inside:{"extended-regex":{pattern:/^\/(?:[^\/\\]|\\[\s\S])+\/[im]*x[im]*$/,inside:{comment:/#.*/}}}},comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},string:{pattern:/(["'])(?:\$\{(?:[^'"}]|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}|\$(?!\{)|(?!\1)[^\\$]|\\[\s\S])*\1/,greedy:!0,inside:{"double-quoted":{pattern:/^"[\s\S]*"$/,inside:{}}}},variable:{pattern:/\$(?:::)?\w+(?:::\w+)*/,inside:{punctuation:/::/}},"attr-name":/(?:\b\w+|\*)(?=\s*=>)/,function:[{pattern:/(\.)(?!\d)\w+/,lookbehind:!0},/\b(?:contain|debug|err|fail|include|info|notice|realize|require|tag|warning)\b|\b(?!\d)\w+(?=\()/],number:/\b(?:0x[a-f\d]+|\d+(?:\.\d+)?(?:e-?\d+)?)\b/i,boolean:/\b(?:false|true)\b/,keyword:/\b(?:application|attr|case|class|consumes|default|define|else|elsif|function|if|import|inherits|node|private|produces|type|undef|unless)\b/,datatype:{pattern:/\b(?:Any|Array|Boolean|Callable|Catalogentry|Class|Collection|Data|Default|Enum|Float|Hash|Integer|NotUndef|Numeric|Optional|Pattern|Regexp|Resource|Runtime|Scalar|String|Struct|Tuple|Type|Undef|Variant)\b/,alias:"symbol"},operator:/=[=~>]?|![=~]?|<(?:<\|?|[=~|-])?|>[>=]?|->?|~>|\|>?>?|[*\/%+?]|\b(?:and|in|or)\b/,punctuation:/[\[\]{}().,;]|:+/},t=[{pattern:/(^|[^\\])\$\{(?:[^'"{}]|\{[^}]*\}|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}/,lookbehind:!0,inside:{"short-variable":{pattern:/(^\$\{)(?!\w+\()(?:::)?\w+(?:::\w+)*/,lookbehind:!0,alias:"variable",inside:{punctuation:/::/}},delimiter:{pattern:/^\$/,alias:"variable"},rest:e.languages.puppet}},{pattern:/(^|[^\\])\$(?:::)?\w+(?:::\w+)*/,lookbehind:!0,alias:"variable",inside:{punctuation:/::/}}],e.languages.puppet.heredoc[0].inside.interpolation=t,e.languages.puppet.string.inside["double-quoted"].inside.interpolation=t}function kn(e){var t;e.languages.pure={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0},/#!.+/],"inline-lang":{pattern:/%<[\s\S]+?%>/,greedy:!0,inside:{lang:{pattern:/(^%< *)-\*-.+?-\*-/,lookbehind:!0,alias:"comment"},delimiter:{pattern:/^%<.*|%>$/,alias:"punctuation"}}},string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},number:{pattern:/((?:\.\.)?)(?:\b(?:inf|nan)\b|\b0x[\da-f]+|(?:\b(?:0b)?\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?L?)/i,lookbehind:!0},keyword:/\b(?:NULL|ans|break|bt|case|catch|cd|clear|const|def|del|dump|else|end|exit|extern|false|force|help|if|infix[lr]?|interface|let|ls|mem|namespace|nonfix|of|otherwise|outfix|override|postfix|prefix|private|public|pwd|quit|run|save|show|stats|then|throw|trace|true|type|underride|using|when|with)\b/,function:/\b(?:abs|add_(?:addr|constdef|(?:fundef|interface|macdef|typedef)(?:_at)?|vardef)|all|any|applp?|arity|bigintp?|blob(?:_crc|_size|p)?|boolp?|byte_c?string(?:_pointer)?|byte_(?:matrix|pointer)|calloc|cat|catmap|ceil|char[ps]?|check_ptrtag|chr|clear_sentry|clearsym|closurep?|cmatrixp?|cols?|colcat(?:map)?|colmap|colrev|colvector(?:p|seq)?|complex(?:_float_(?:matrix|pointer)|_matrix(?:_view)?|_pointer|p)?|conj|cookedp?|cst|cstring(?:_(?:dup|list|vector))?|curry3?|cyclen?|del_(?:constdef|fundef|interface|macdef|typedef|vardef)|delete|diag(?:mat)?|dim|dmatrixp?|do|double(?:_matrix(?:_view)?|_pointer|p)?|dowith3?|drop|dropwhile|eval(?:cmd)?|exactp|filter|fix|fixity|flip|float(?:_matrix|_pointer)|floor|fold[lr]1?|frac|free|funp?|functionp?|gcd|get(?:_(?:byte|constdef|double|float|fundef|int(?:64)?|interface(?:_typedef)?|long|macdef|pointer|ptrtag|sentry|short|string|typedef|vardef))?|globsym|hash|head|id|im|imatrixp?|index|inexactp|infp|init|insert|int(?:_matrix(?:_view)?|_pointer|p)?|int64_(?:matrix|pointer)|integerp?|iteraten?|iterwhile|join|keys?|lambdap?|last(?:err(?:pos)?)?|lcd|list[2p]?|listmap|make_ptrtag|malloc|map|matcat|matrixp?|max|member|min|nanp|nargs|nmatrixp?|null|numberp?|ord|pack(?:ed)?|pointer(?:_cast|_tag|_type|p)?|pow|pred|ptrtag|put(?:_(?:byte|double|float|int(?:64)?|long|pointer|short|string))?|rationalp?|re|realp?|realloc|recordp?|redim|reduce(?:_with)?|refp?|repeatn?|reverse|rlistp?|round|rows?|rowcat(?:map)?|rowmap|rowrev|rowvector(?:p|seq)?|same|scan[lr]1?|sentry|sgn|short_(?:matrix|pointer)|slice|smatrixp?|sort|split|str|strcat|stream|stride|string(?:_(?:dup|list|vector)|p)?|subdiag(?:mat)?|submat|subseq2?|substr|succ|supdiag(?:mat)?|symbolp?|tail|take|takewhile|thunkp?|transpose|trunc|tuplep?|typep|ubyte|uint(?:64)?|ulong|uncurry3?|unref|unzip3?|update|ushort|vals?|varp?|vector(?:p|seq)?|void|zip3?|zipwith3?)\b/,special:{pattern:/\b__[a-z]+__\b/i,alias:"builtin"},operator:/(?:[!"#$%&'*+,\-.\/:<=>?@\\^`|~\u00a1-\u00bf\u00d7-\u00f7\u20d0-\u2bff]|\b_+\b)+|\b(?:and|div|mod|not|or)\b/,punctuation:/[(){}\[\];,|]/},t=/%< *-\*- *<lang>\d* *-\*-[\s\S]+?%>/.source,["c",{lang:"c++",alias:"cpp"},"fortran"].forEach(function(n){var r=n;if("string"!=typeof n&&(r=n.alias,n=n.lang),e.languages[r]){var a={};a["inline-lang-"+r]={pattern:RegExp(t.replace("<lang>",n.replace(/([.+*?\/\\(){}\[\]])/g,"\\$1")),"i"),inside:e.util.clone(e.languages.pure["inline-lang"].inside)},a["inline-lang-"+r].inside.rest=e.util.clone(e.languages[r]),e.languages.insertBefore("pure","inline-lang",a)}}),e.languages.c&&(e.languages.pure["inline-lang"].inside.rest=e.util.clone(e.languages.c))}function kr(e){e.register(vF),e.languages.purebasic=e.languages.extend("clike",{comment:/;.*/,keyword:/\b(?:align|and|as|break|calldebugger|case|compilercase|compilerdefault|compilerelse|compilerelseif|compilerendif|compilerendselect|compilererror|compilerif|compilerselect|continue|data|datasection|debug|debuglevel|declare|declarec|declarecdll|declaredll|declaremodule|default|define|dim|disableasm|disabledebugger|disableexplicit|else|elseif|enableasm|enabledebugger|enableexplicit|end|enddatasection|enddeclaremodule|endenumeration|endif|endimport|endinterface|endmacro|endmodule|endprocedure|endselect|endstructure|endstructureunion|endwith|enumeration|extends|fakereturn|for|foreach|forever|global|gosub|goto|if|import|importc|includebinary|includefile|includepath|interface|macro|module|newlist|newmap|next|not|or|procedure|procedurec|procedurecdll|proceduredll|procedurereturn|protected|prototype|prototypec|read|redim|repeat|restore|return|runtime|select|shared|static|step|structure|structureunion|swap|threaded|to|until|wend|while|with|xincludefile|xor)\b/i,function:/\b\w+(?:\.\w+)?\s*(?=\()/,number:/(?:\$[\da-f]+|\b-?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?)\b/i,operator:/(?:@\*?|\?|\*)\w+\$?|-[>-]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|?\||[~^%?*/@]/}),e.languages.insertBefore("purebasic","keyword",{tag:/#\w+\$?/,asm:{pattern:/(^[\t ]*)!.*/m,lookbehind:!0,alias:"tag",inside:{comment:/;.*/,string:{pattern:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"label-reference-anonymous":{pattern:/(!\s*j[a-z]+\s+)@[fb]/i,lookbehind:!0,alias:"fasm-label"},"label-reference-addressed":{pattern:/(!\s*j[a-z]+\s+)[A-Z._?$@][\w.?$@~#]*/i,lookbehind:!0,alias:"fasm-label"},keyword:[/\b(?:extern|global)\b[^;\r\n]*/i,/\b(?:CPU|DEFAULT|FLOAT)\b.*/],function:{pattern:/^([\t ]*!\s*)[\da-z]+(?=\s|$)/im,lookbehind:!0},"function-inline":{pattern:/(:\s*)[\da-z]+(?=\s)/i,lookbehind:!0,alias:"function"},label:{pattern:/^([\t ]*!\s*)[A-Za-z._?$@][\w.?$@~#]*(?=:)/m,lookbehind:!0,alias:"fasm-label"},register:/\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|di|si|sp)|[cdefgs]s|mm\d+)\b/i,number:/(?:\b|-|(?=\$))(?:0[hx](?:[\da-f]*\.)?[\da-f]+(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|(?:\d+(?:\.\d+)?|\.\d+)(?:\.?e[+-]?\d+)?[dt]?)\b/i,operator:/[\[\]*+\-/%<>=&|$!,.:]/}}}),delete e.languages.purebasic["class-name"],delete e.languages.purebasic.boolean,e.languages.pbfasm=e.languages.purebasic}function ka(e){e.register(SA),e.languages.purescript=e.languages.extend("haskell",{keyword:/\b(?:ado|case|class|data|derive|do|else|forall|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b|∀/,"import-statement":{pattern:/(^[\t ]*)import\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*(?:\s+as\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m,lookbehind:!0,inside:{keyword:/\b(?:as|hiding|import)\b/,punctuation:/\./}},builtin:/\b(?:absurd|add|ap|append|apply|between|bind|bottom|clamp|compare|comparing|compose|conj|const|degree|discard|disj|div|eq|flap|flip|gcd|identity|ifM|join|lcm|liftA1|liftM1|map|max|mempty|min|mod|mul|negate|not|notEq|one|otherwise|recip|show|sub|top|unit|unless|unlessM|void|when|whenM|zero)\b/,operator:[e.languages.haskell.operator[0],e.languages.haskell.operator[2],/[\xa2-\xa6\xa8\xa9\xac\xae-\xb1\xb4\xb8\xd7\xf7\u02c2-\u02c5\u02d2-\u02df\u02e5-\u02eb\u02ed\u02ef-\u02ff\u0375\u0384\u0385\u03f6\u0482\u058d-\u058f\u0606-\u0608\u060b\u060e\u060f\u06de\u06e9\u06fd\u06fe\u07f6\u07fe\u07ff\u09f2\u09f3\u09fa\u09fb\u0af1\u0b70\u0bf3-\u0bfa\u0c7f\u0d4f\u0d79\u0e3f\u0f01-\u0f03\u0f13\u0f15-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcc\u0fce\u0fcf\u0fd5-\u0fd8\u109e\u109f\u1390-\u1399\u166d\u17db\u1940\u19de-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u1fbd\u1fbf-\u1fc1\u1fcd-\u1fcf\u1fdd-\u1fdf\u1fed-\u1fef\u1ffd\u1ffe\u2044\u2052\u207a-\u207c\u208a-\u208c\u20a0-\u20bf\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a\u213b\u2140-\u2144\u214a-\u214d\u214f\u218a\u218b\u2190-\u2307\u230c-\u2328\u232b-\u2426\u2440-\u244a\u249c-\u24e9\u2500-\u2767\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2b73\u2b76-\u2b95\u2b97-\u2bff\u2ce5-\u2cea\u2e50\u2e51\u2e80-\u2e99\u2e9b-\u2ef3\u2f00-\u2fd5\u2ff0-\u2ffb\u3004\u3012\u3013\u3020\u3036\u3037\u303e\u303f\u309b\u309c\u3190\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3247\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua700-\ua716\ua720\ua721\ua789\ua78a\ua828-\ua82b\ua836-\ua839\uaa77-\uaa79\uab5b\uab6a\uab6b\ufb29\ufbb2-\ufbc1\ufdfc\ufdfd\ufe62\ufe64-\ufe66\ufe69\uff04\uff0b\uff1c-\uff1e\uff3e\uff40\uff5c\uff5e\uffe0-\uffe6\uffe8-\uffee\ufffc\ufffd]/]}),e.languages.purs=e.languages.purescript}function ki(e){e.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},e.languages.python["string-interpolation"].inside.interpolation.inside.rest=e.languages.python,e.languages.py=e.languages.python}function ks(e){e.register(vF),function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+t[+n]+")"})}function n(e,n,r){return RegExp(t(e,n),r||"")}var r=RegExp("\\b(?:"+"Adj BigInt Bool Ctl Double false Int One Pauli PauliI PauliX PauliY PauliZ Qubit Range Result String true Unit Zero Adjoint adjoint apply as auto body borrow borrowing Controlled controlled distribute elif else fail fixup for function if in internal intrinsic invert is let mutable namespace new newtype open operation repeat return self set until use using while within".trim().replace(/ /g,"|")+")\\b"),a=/\b[A-Za-z_]\w*\b/.source,i=t(/<<0>>(?:\s*\.\s*<<0>>)*/.source,[a]),s={keyword:r,punctuation:/[<>()?,.:[\]]/},o=/"(?:\\.|[^\\"])*"/.source;e.languages.qsharp=e.languages.extend("clike",{comment:/\/\/.*/,string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[o]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\b(?:as|open)\s+)<<0>>(?=\s*(?:;|as\b))/.source,[i]),lookbehind:!0,inside:s},{pattern:n(/(\bnamespace\s+)<<0>>(?=\s*\{)/.source,[i]),lookbehind:!0,inside:s}],keyword:r,number:/(?:\b0(?:x[\da-f]+|b[01]+|o[0-7]+)|(?:\B\.\d+|\b\d+(?:\.\d*)?)(?:e[-+]?\d+)?)l?\b/i,operator:/\band=|\bor=|\band\b|\bnot\b|\bor\b|<[-=]|[-=]>|>>>=?|<<<=?|\^\^\^=?|\|\|\|=?|&&&=?|w\/=?|~~~|[*\/+\-^=!%]=?/,punctuation:/::|[{}[\];(),.:]/}),e.languages.insertBefore("qsharp","number",{range:{pattern:/\.\./,alias:"operator"}});var l=function(e){for(var t=0;t<2;t++)e=e.replace(/<<self>>/g,function(){return"(?:"+e+")"});return e.replace(/<<self>>/g,"[^\\s\\S]")}(t(/\{(?:[^"{}]|<<0>>|<<self>>)*\}/.source,[o]));e.languages.insertBefore("qsharp","string",{"interpolation-string":{pattern:n(/\$"(?:\\.|<<0>>|[^\\"{])*"/.source,[l]),greedy:!0,inside:{interpolation:{pattern:n(/((?:^|[^\\])(?:\\\\)*)<<0>>/.source,[l]),lookbehind:!0,inside:{punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-qsharp",inside:e.languages.qsharp}}},string:/[\s\S]+/}}})}(e),e.languages.qs=e.languages.qsharp}function ko(e){e.languages.q={string:/"(?:\\.|[^"\\\r\n])*"/,comment:[{pattern:/([\t )\]}])\/.*/,lookbehind:!0,greedy:!0},{pattern:/(^|\r?\n|\r)\/[\t ]*(?:(?:\r?\n|\r)(?:.*(?:\r?\n|\r(?!\n)))*?(?:\\(?=[\t ]*(?:\r?\n|\r))|$)|\S.*)/,lookbehind:!0,greedy:!0},{pattern:/^\\[\t ]*(?:\r?\n|\r)[\s\S]+/m,greedy:!0},{pattern:/^#!.+/m,greedy:!0}],symbol:/`(?::\S+|[\w.]*)/,datetime:{pattern:/0N[mdzuvt]|0W[dtz]|\d{4}\.\d\d(?:m|\.\d\d(?:T(?:\d\d(?::\d\d(?::\d\d(?:[.:]\d\d\d)?)?)?)?)?[dz]?)|\d\d:\d\d(?::\d\d(?:[.:]\d\d\d)?)?[uvt]?/,alias:"number"},number:/\b(?![01]:)(?:0N[hje]?|0W[hj]?|0[wn]|0x[\da-fA-F]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?[hjfeb]?)/,keyword:/\\\w+\b|\b(?:abs|acos|aj0?|all|and|any|asc|asin|asof|atan|attr|avgs?|binr?|by|ceiling|cols|cor|cos|count|cov|cross|csv|cut|delete|deltas|desc|dev|differ|distinct|div|do|dsave|ej|enlist|eval|except|exec|exit|exp|fby|fills|first|fkeys|flip|floor|from|get|getenv|group|gtime|hclose|hcount|hdel|hopen|hsym|iasc|identity|idesc|if|ij|in|insert|inter|inv|keys?|last|like|list|ljf?|load|log|lower|lsq|ltime|ltrim|mavg|maxs?|mcount|md5|mdev|med|meta|mins?|mmax|mmin|mmu|mod|msum|neg|next|not|null|or|over|parse|peach|pj|plist|prds?|prev|prior|rand|rank|ratios|raze|read0|read1|reciprocal|reval|reverse|rload|rotate|rsave|rtrim|save|scan|scov|sdev|select|set|setenv|show|signum|sin|sqrt|ssr?|string|sublist|sums?|sv|svar|system|tables|tan|til|trim|txf|type|uj|ungroup|union|update|upper|upsert|value|var|views?|vs|wavg|where|while|within|wj1?|wsum|ww|xasc|xbar|xcols?|xdesc|xexp|xgroup|xkey|xlog|xprev|xrank)\b/,adverb:{pattern:/['\/\\]:?|\beach\b/,alias:"function"},verb:{pattern:/(?:\B\.\B|\b[01]:|<[=>]?|>=?|[:+\-*%,!?~=|$&#@^]):?|\b_\b:?/,alias:"operator"},punctuation:/[(){}\[\];.]/}}function kl(e){e.register(vB);for(var t=/"(?:\\.|[^\\"\r\n])*"|'(?:\\.|[^\\'\r\n])*'/.source,n=/\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))*\*\//.source,r=/(?:[^\\()[\]{}"'/]|<string>|\/(?![*/])|<comment>|\(<expr>*\)|\[<expr>*\]|\{<expr>*\}|\\[\s\S])/.source.replace(/<string>/g,function(){return t}).replace(/<comment>/g,function(){return n}),a=0;a<2;a++)r=r.replace(/<expr>/g,function(){return r});r=r.replace(/<expr>/g,"[^\\s\\S]"),e.languages.qml={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},"javascript-function":{pattern:RegExp(/((?:^|;)[ \t]*)function\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*\(<js>*\)\s*\{<js>*\}/.source.replace(/<js>/g,function(){return r}),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:e.languages.javascript},"class-name":{pattern:/((?:^|[:;])[ \t]*)(?!\d)\w+(?=[ \t]*\{|[ \t]+on\b)/m,lookbehind:!0},property:[{pattern:/((?:^|[;{])[ \t]*)(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0},{pattern:/((?:^|[;{])[ \t]*)property[ \t]+(?!\d)\w+(?:\.\w+)*[ \t]+(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0,inside:{keyword:/^property/,property:/\w+(?:\.\w+)*/}}],"javascript-expression":{pattern:RegExp(/(:[ \t]*)(?![\s;}[])(?:(?!$|[;}])<js>)+/.source.replace(/<js>/g,function(){return r}),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:e.languages.javascript},string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},keyword:/\b(?:as|import|on)\b/,punctuation:/[{}[\]:;,]/}}function kc(e){e.register(vF),e.languages.qore=e.languages.extend("clike",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:\/\/|#).*)/,lookbehind:!0},string:{pattern:/("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},keyword:/\b(?:abstract|any|assert|binary|bool|boolean|break|byte|case|catch|char|class|code|const|continue|data|default|do|double|else|enum|extends|final|finally|float|for|goto|hash|if|implements|import|inherits|instanceof|int|interface|long|my|native|new|nothing|null|object|our|own|private|reference|rethrow|return|short|soft(?:bool|date|float|int|list|number|string)|static|strictfp|string|sub|super|switch|synchronized|this|throw|throws|transient|try|void|volatile|while)\b/,boolean:/\b(?:false|true)\b/i,function:/\$?\b(?!\d)\w+(?=\()/,number:/\b(?:0b[01]+|0x(?:[\da-f]*\.)?[\da-fp\-]+|(?:\d+(?:\.\d+)?|\.\d+)(?:e\d+)?[df]|(?:\d+(?:\.\d+)?|\.\d+))\b/i,operator:{pattern:/(^|[^.])(?:\+[+=]?|-[-=]?|[!=](?:==?|~)?|>>?=?|<(?:=>?|<=?)?|&[&=]?|\|[|=]?|[*\/%^]=?|[~?])/,lookbehind:!0},variable:/\$(?!\d)\w+\b/})}function ku(e){e.languages.r={comment:/#.*/,string:{pattern:/(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->?>?|<(?:=|<?-)?|[>=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/}}function kd(e){e.register(_o),e.languages.racket=e.languages.extend("scheme",{"lambda-parameter":{pattern:/([(\[]lambda\s+[(\[])[^()\[\]'\s]+/,lookbehind:!0}}),e.languages.insertBefore("racket","string",{lang:{pattern:/^#lang.+/m,greedy:!0,alias:"keyword"}}),e.languages.rkt=e.languages.racket}function kp(e){e.register(Te),e.register(vP),function(e){var t=/\/(?![/*])|\/\/.*[\r\n]|\/\*[^*]*(?:\*(?!\/)[^*]*)*\*\//.source,n=/@(?!")|"(?:[^\r\n\\"]|\\.)*"|@"(?:[^\\"]|""|\\[\s\S])*"(?!")/.source+"|"+/'(?:(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'|(?=[^\\](?!')))/.source;function r(e,r){for(var a=0;a<r;a++)e=e.replace(/<self>/g,function(){return"(?:"+e+")"});return e.replace(/<self>/g,"[^\\s\\S]").replace(/<str>/g,"(?:"+n+")").replace(/<comment>/g,"(?:"+t+")")}var a=r(/\((?:[^()'"@/]|<str>|<comment>|<self>)*\)/.source,2),i=r(/\[(?:[^\[\]'"@/]|<str>|<comment>|<self>)*\]/.source,1),s=r(/\{(?:[^{}'"@/]|<str>|<comment>|<self>)*\}/.source,2),o=r(/<(?:[^<>'"@/]|<comment>|<self>)*>/.source,1),l=/@/.source+/(?:await\b\s*)?/.source+"(?:"+/(?!await\b)\w+\b/.source+"|"+a+")(?:"+/[?!]?\.\w+\b/.source+"|(?:"+o+")?"+a+"|"+i+")*"+/(?![?!\.(\[]|<(?!\/))/.source,c=/@(?![\w()])/.source+"|"+l,u="(?:"+/"[^"@]*"|'[^'@]*'|[^\s'"@>=]+(?=[\s>])/.source+"|[\"'][^\"'@]*(?:(?:"+c+")[^\"'@]*)+[\"'])",d=/(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*<tagAttrValue>|(?=[\s/>])))+)?/.source.replace(/<tagAttrValue>/,u),p=/(?!\d)[^\s>\/=$<%]+/.source+d+/\s*\/?>/.source,m=/\B@?/.source+"(?:"+/<([a-zA-Z][\w:]*)/.source+d+/\s*>/.source+"(?:"+(/[^<]/.source+"|"+/<\/?(?!\1\b)/.source+p)+"|"+r(/<\1/.source+d+/\s*>/.source+"(?:"+(/[^<]/.source+"|"+/<\/?(?!\1\b)/.source)+p+"|<self>)*"+/<\/\1\s*>/.source,2)+")*"+/<\/\1\s*>/.source+"|"+/</.source+p+")";e.languages.cshtml=e.languages.extend("markup",{});var f={pattern:/\S[\s\S]*/,alias:"language-csharp",inside:e.languages.insertBefore("csharp","string",{html:{pattern:RegExp(m),greedy:!0,inside:e.languages.cshtml}},{csharp:e.languages.extend("csharp",{})})},h={pattern:RegExp(/(^|[^@])/.source+l),lookbehind:!0,greedy:!0,alias:"variable",inside:{keyword:/^@/,csharp:f}};e.languages.cshtml.tag.pattern=RegExp(/<\/?/.source+p),e.languages.cshtml.tag.inside["attr-value"].pattern=RegExp(/=\s*/.source+u),e.languages.insertBefore("inside","punctuation",{value:h},e.languages.cshtml.tag.inside["attr-value"]),e.languages.insertBefore("cshtml","prolog",{"razor-comment":{pattern:/@\*[\s\S]*?\*@/,greedy:!0,alias:"comment"},block:{pattern:RegExp(/(^|[^@])@/.source+"(?:"+[s,/(?:code|functions)\s*/.source+s,/(?:for|foreach|lock|switch|using|while)\s*/.source+a+/\s*/.source+s,/do\s*/.source+s+/\s*while\s*/.source+a+/(?:\s*;)?/.source,/try\s*/.source+s+/\s*catch\s*/.source+a+/\s*/.source+s+/\s*finally\s*/.source+s,/if\s*/.source+a+/\s*/.source+s+"(?:"+/\s*else/.source+"(?:"+/\s+if\s*/.source+a+")?"+/\s*/.source+s+")*",/helper\s+\w+\s*/.source+a+/\s*/.source+s].join("|")+")"),lookbehind:!0,greedy:!0,inside:{keyword:/^@\w*/,csharp:f}},directive:{pattern:/^([ \t]*)@(?:addTagHelper|attribute|implements|inherits|inject|layout|model|namespace|page|preservewhitespace|removeTagHelper|section|tagHelperPrefix|using)(?=\s).*/m,lookbehind:!0,greedy:!0,inside:{keyword:/^@\w+/,csharp:f}},value:h,"delegate-operator":{pattern:/(^|[^@])@(?=<)/,lookbehind:!0,alias:"operator"}}),e.languages.razor=e.languages.cshtml}(e)}function km(e){e.register(vB),e.register(vP),function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,a=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function i(e,t){return RegExp(e=e.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return a}),t)}a=i(a).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=i(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:i(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:i(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var s=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(s).join(""):""},o=function(t){for(var n=[],r=0;r<t.length;r++){var a=t[r],i=!1;if("string"!=typeof a&&("tag"===a.type&&a.content[0]&&"tag"===a.content[0].type?"</"===a.content[0].content[0].content?n.length>0&&n[n.length-1].tagName===s(a.content[0].content[1])&&n.pop():"/>"===a.content[a.content.length-1].content||n.push({tagName:s(a.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===a.type&&"{"===a.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===a.type&&"}"===a.content?n[n.length-1].openedBraces--:i=!0),(i||"string"==typeof a)&&n.length>0&&0===n[n.length-1].openedBraces){var l=s(a);r<t.length-1&&("string"==typeof t[r+1]||"plain-text"===t[r+1].type)&&(l+=s(t[r+1]),t.splice(r+1,1)),r>0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(l=s(t[r-1])+l,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",l,null,l)}a.content&&"string"!=typeof a.content&&o(a.content)}};e.hooks.add("after-tokenize",function(e){("jsx"===e.language||"tsx"===e.language)&&o(e.tokens)})}(e)}function kf(e){var t,n;e.register(km),e.register(S2),t=e.util.clone(e.languages.typescript),e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],(n=e.languages.tsx.tag).pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}function kh(e){e.register(vF),e.languages.reason=e.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),e.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete e.languages.reason.function}function kg(e){e.languages.rego={comment:/#.*/,property:{pattern:/(^|[^\\.])(?:"(?:\\.|[^\\"\r\n])*"|`[^`]*`|\b[a-z_]\w*\b)(?=\s*:(?!=))/i,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:as|default|else|import|not|null|package|set(?=\s*\()|some|with)\b/,boolean:/\b(?:false|true)\b/,function:{pattern:/\b[a-z_]\w*\b(?:\s*\.\s*\b[a-z_]\w*\b)*(?=\s*\()/i,inside:{namespace:/\b\w+\b(?=\s*\.)/,punctuation:/\./}},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,operator:/[-+*/%|&]|[<>:=]=?|!=|\b_\b/,punctuation:/[,;.\[\]{}()]/}}function kb(e){e.languages.renpy={comment:{pattern:/(^|[^\\])#.+/,lookbehind:!0},string:{pattern:/("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\])*\2|(?:^#?(?:(?:[0-9a-fA-F]){3}|[0-9a-fA-F]{6})$)/m,greedy:!0},function:/\b[a-z_]\w*(?=\()/i,property:/\b(?:Update|UpdateVersion|action|activate_sound|adv_nvl_transition|after_load_transition|align|alpha|alt|anchor|antialias|area|auto|background|bar_invert|bar_resizing|bar_vertical|black_color|bold|bottom_bar|bottom_gutter|bottom_margin|bottom_padding|box_reverse|box_wrap|can_update|caret|child|color|crop|default_afm_enable|default_afm_time|default_fullscreen|default_text_cps|developer|directory_name|drag_handle|drag_joined|drag_name|drag_raise|draggable|dragged|drop_shadow|drop_shadow_color|droppable|dropped|easein|easeout|edgescroll|end_game_transition|end_splash_transition|enter_replay_transition|enter_sound|enter_transition|enter_yesno_transition|executable_name|exit_replay_transition|exit_sound|exit_transition|exit_yesno_transition|fadein|fadeout|first_indent|first_spacing|fit_first|focus|focus_mask|font|foreground|game_main_transition|get_installed_packages|google_play_key|google_play_salt|ground|has_music|has_sound|has_voice|height|help|hinting|hover|hover_background|hover_color|hover_sound|hovered|hyperlink_functions|idle|idle_color|image_style|include_update|insensitive|insensitive_background|insensitive_color|inside|intra_transition|italic|justify|kerning|keyboard_focus|language|layer_clipping|layers|layout|left_bar|left_gutter|left_margin|left_padding|length|line_leading|line_overlap_split|line_spacing|linear|main_game_transition|main_menu_music|maximum|min_width|minimum|minwidth|modal|mouse|mousewheel|name|narrator_menu|newline_indent|nvl_adv_transition|offset|order_reverse|outlines|overlay_functions|pos|position|prefix|radius|range|rest_indent|right_bar|right_gutter|right_margin|right_padding|rotate|rotate_pad|ruby_style|sample_sound|save_directory|say_attribute_transition|screen_height|screen_width|scrollbars|selected_hover|selected_hover_color|selected_idle|selected_idle_color|selected_insensitive|show_side_image|show_two_window|side_spacing|side_xpos|side_ypos|size|size_group|slow_cps|slow_cps_multiplier|spacing|strikethrough|subpixel|text_align|text_style|text_xpos|text_y_fudge|text_ypos|thumb|thumb_offset|thumb_shadow|thumbnail_height|thumbnail_width|time|top_bar|top_gutter|top_margin|top_padding|translations|underline|unscrollable|update|value|version|version_name|version_tuple|vertical|width|window_hide_transition|window_icon|window_left_padding|window_show_transition|window_title|windows_icon|xadjustment|xalign|xanchor|xanchoraround|xaround|xcenter|xfill|xinitial|xmargin|xmaximum|xminimum|xoffset|xofsset|xpadding|xpos|xsize|xzoom|yadjustment|yalign|yanchor|yanchoraround|yaround|ycenter|yfill|yinitial|ymargin|ymaximum|yminimum|yoffset|ypadding|ypos|ysize|ysizexysize|yzoom|zoom|zorder)\b/,tag:/\b(?:bar|block|button|buttoscreenn|drag|draggroup|fixed|frame|grid|[hv]box|hotbar|hotspot|image|imagebutton|imagemap|input|key|label|menu|mm_menu_frame|mousearea|nvl|parallel|screen|self|side|tag|text|textbutton|timer|vbar|viewport|window)\b|\$/,keyword:/\b(?:None|add|adjustment|alignaround|allow|angle|animation|around|as|assert|behind|box_layout|break|build|cache|call|center|changed|child_size|choice|circles|class|clear|clicked|clipping|clockwise|config|contains|continue|corner1|corner2|counterclockwise|def|default|define|del|delay|disabled|disabled_text|dissolve|elif|else|event|except|exclude|exec|expression|fade|finally|for|from|function|global|gm_root|has|hide|id|if|import|in|init|is|jump|knot|lambda|left|less_rounded|mm_root|movie|music|null|on|onlayer|pass|pause|persistent|play|print|python|queue|raise|random|renpy|repeat|return|right|rounded_window|scene|scope|set|show|slow|slow_abortable|slow_done|sound|stop|store|style|style_group|substitute|suffix|theme|transform|transform_anchor|transpose|try|ui|unhovered|updater|use|voice|while|widget|widget_hover|widget_selected|widget_text|yield)\b/,boolean:/\b(?:[Ff]alse|[Tt]rue)\b/,number:/(?:\b(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?)|\B\.\d+)(?:e[+-]?\d+)?j?/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:and|at|not|or|with)\b/,punctuation:/[{}[\];(),.:]/},e.languages.rpy=e.languages.renpy}function ky(e){e.languages.rescript={comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},char:{pattern:/'(?:[^\r\n\\]|\\(?:.|\w+))'/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*|@[a-z.]*|#[A-Za-z]\w*|#\d/,function:{pattern:/[a-zA-Z]\w*(?=\()|(\.)[a-z]\w*/,lookbehind:!0},number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,boolean:/\b(?:false|true)\b/,"attr-value":/[A-Za-z]\w*(?==)/,constant:{pattern:/(\btype\s+)[a-z]\w*/,lookbehind:!0},tag:{pattern:/(<)[a-z]\w*|(?:<\/)[a-z]\w*/,lookbehind:!0,inside:{operator:/<|>|\//}},keyword:/\b(?:and|as|assert|begin|bool|class|constraint|do|done|downto|else|end|exception|external|float|for|fun|function|if|in|include|inherit|initializer|int|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|string|switch|then|to|try|type|when|while|with)\b/,operator:/\.{3}|:[:=]?|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/,punctuation:/[(){}[\],;.]/},e.languages.insertBefore("rescript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"tag"},rest:e.languages.rescript}},string:/[\s\S]+/}}}),e.languages.res=e.languages.rescript}function kE(e){e.languages.rest={table:[{pattern:/(^[\t ]*)(?:\+[=-]+)+\+(?:\r?\n|\r)(?:\1[+|].+[+|](?:\r?\n|\r))+\1(?:\+[=-]+)+\+/m,lookbehind:!0,inside:{punctuation:/\||(?:\+[=-]+)+\+/}},{pattern:/(^[\t ]*)=+ [ =]*=(?:(?:\r?\n|\r)\1.+)+(?:\r?\n|\r)\1=+ [ =]*=(?=(?:\r?\n|\r){2}|\s*$)/m,lookbehind:!0,inside:{punctuation:/[=-]+/}}],"substitution-def":{pattern:/(^[\t ]*\.\. )\|(?:[^|\s](?:[^|]*[^|\s])?)\| [^:]+::/m,lookbehind:!0,inside:{substitution:{pattern:/^\|(?:[^|\s]|[^|\s][^|]*[^|\s])\|/,alias:"attr-value",inside:{punctuation:/^\||\|$/}},directive:{pattern:/( )(?! )[^:]+::/,lookbehind:!0,alias:"function",inside:{punctuation:/::$/}}}},"link-target":[{pattern:/(^[\t ]*\.\. )\[[^\]]+\]/m,lookbehind:!0,alias:"string",inside:{punctuation:/^\[|\]$/}},{pattern:/(^[\t ]*\.\. )_(?:`[^`]+`|(?:[^:\\]|\\.)+):/m,lookbehind:!0,alias:"string",inside:{punctuation:/^_|:$/}}],directive:{pattern:/(^[\t ]*\.\. )[^:]+::/m,lookbehind:!0,alias:"function",inside:{punctuation:/::$/}},comment:{pattern:/(^[\t ]*\.\.)(?:(?: .+)?(?:(?:\r?\n|\r).+)+| .+)(?=(?:\r?\n|\r){2}|$)/m,lookbehind:!0},title:[{pattern:/^(([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+)(?:\r?\n|\r).+(?:\r?\n|\r)\1$/m,inside:{punctuation:/^[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+|[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,important:/.+/}},{pattern:/(^|(?:\r?\n|\r){2}).+(?:\r?\n|\r)([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+(?=\r?\n|\r|$)/,lookbehind:!0,inside:{punctuation:/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,important:/.+/}}],hr:{pattern:/((?:\r?\n|\r){2})([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2{3,}(?=(?:\r?\n|\r){2})/,lookbehind:!0,alias:"punctuation"},field:{pattern:/(^[\t ]*):[^:\r\n]+:(?= )/m,lookbehind:!0,alias:"attr-name"},"command-line-option":{pattern:/(^[\t ]*)(?:[+-][a-z\d]|(?:--|\/)[a-z\d-]+)(?:[ =](?:[a-z][\w-]*|<[^<>]+>))?(?:, (?:[+-][a-z\d]|(?:--|\/)[a-z\d-]+)(?:[ =](?:[a-z][\w-]*|<[^<>]+>))?)*(?=(?:\r?\n|\r)? {2,}\S)/im,lookbehind:!0,alias:"symbol"},"literal-block":{pattern:/::(?:\r?\n|\r){2}([ \t]+)(?![ \t]).+(?:(?:\r?\n|\r)\1.+)*/,inside:{"literal-block-punctuation":{pattern:/^::/,alias:"punctuation"}}},"quoted-literal-block":{pattern:/::(?:\r?\n|\r){2}([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]).*(?:(?:\r?\n|\r)\1.*)*/,inside:{"literal-block-punctuation":{pattern:/^(?:::|([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\1*)/m,alias:"punctuation"}}},"list-bullet":{pattern:/(^[\t ]*)(?:[*+\-•‣⁃]|\(?(?:\d+|[a-z]|[ivxdclm]+)\)|(?:\d+|[a-z]|[ivxdclm]+)\.)(?= )/im,lookbehind:!0,alias:"punctuation"},"doctest-block":{pattern:/(^[\t ]*)>>> .+(?:(?:\r?\n|\r).+)*/m,lookbehind:!0,inside:{punctuation:/^>>>/}},inline:[{pattern:/(^|[\s\-:\/'"<(\[{])(?::[^:]+:`.*?`|`.*?`:[^:]+:|(\*\*?|``?|\|)(?!\s)(?:(?!\2).)*\S\2(?=[\s\-.,:;!?\\\/'")\]}]|$))/m,lookbehind:!0,inside:{bold:{pattern:/(^\*\*).+(?=\*\*$)/,lookbehind:!0},italic:{pattern:/(^\*).+(?=\*$)/,lookbehind:!0},"inline-literal":{pattern:/(^``).+(?=``$)/,lookbehind:!0,alias:"symbol"},role:{pattern:/^:[^:]+:|:[^:]+:$/,alias:"function",inside:{punctuation:/^:|:$/}},"interpreted-text":{pattern:/(^`).+(?=`$)/,lookbehind:!0,alias:"attr-value"},substitution:{pattern:/(^\|).+(?=\|$)/,lookbehind:!0,alias:"attr-value"},punctuation:/\*\*?|``?|\|/}}],link:[{pattern:/\[[^\[\]]+\]_(?=[\s\-.,:;!?\\\/'")\]}]|$)/,alias:"string",inside:{punctuation:/^\[|\]_$/}},{pattern:/(?:\b[a-z\d]+(?:[_.:+][a-z\d]+)*_?_|`[^`]+`_?_|_`[^`]+`)(?=[\s\-.,:;!?\\\/'")\]}]|$)/i,alias:"string",inside:{punctuation:/^_?`|`$|`?_?_$/}}],punctuation:{pattern:/(^[\t ]*)(?:\|(?= |$)|(?:---?|—|\.\.|__)(?= )|\.\.$)/m,lookbehind:!0}}}function kx(e){e.languages.rip={comment:{pattern:/#.*/,greedy:!0},char:{pattern:/\B`[^\s`'",.:;#\/\\()<>\[\]{}]\b/,greedy:!0},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},regex:{pattern:/(^|[^/])\/(?!\/)(?:\[[^\n\r\]]*\]|\\.|[^/\\\r\n\[])+\/(?=\s*(?:$|[\r\n,.;})]))/,lookbehind:!0,greedy:!0},keyword:/(?:=>|->)|\b(?:case|catch|class|else|exit|finally|if|raise|return|switch|try)\b/,builtin:/@|\bSystem\b/,boolean:/\b(?:false|true)\b/,date:/\b\d{4}-\d{2}-\d{2}\b/,time:/\b\d{2}:\d{2}:\d{2}\b/,datetime:/\b\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\b/,symbol:/:[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/,number:/[+-]?\b(?:\d+\.\d+|\d+)\b/,punctuation:/(?:\.{2,3})|[`,.:;=\/\\()<>\[\]{}]/,reference:/[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/}}function kv(e){e.languages.roboconf={comment:/#.*/,keyword:{pattern:/(^|\s)(?:(?:external|import)\b|(?:facet|instance of)(?=[ \t]+[\w-]+[ \t]*\{))/,lookbehind:!0},component:{pattern:/[\w-]+(?=[ \t]*\{)/,alias:"variable"},property:/[\w.-]+(?=[ \t]*:)/,value:{pattern:/(=[ \t]*(?![ \t]))[^,;]+/,lookbehind:!0,alias:"attr-value"},optional:{pattern:/\(optional\)/,alias:"builtin"},wildcard:{pattern:/(\.)\*/,lookbehind:!0,alias:"operator"},punctuation:/[{},.;:=]/}}function kT(e){!function(e){var t={pattern:/(^[ \t]*| {2}|\t)#.*/m,lookbehind:!0,greedy:!0},n={pattern:/((?:^|[^\\])(?:\\{2})*)[$@&%]\{(?:[^{}\r\n]|\{[^{}\r\n]*\})*\}/,lookbehind:!0,inside:{punctuation:/^[$@&%]\{|\}$/}};function r(e,r){var a={};for(var i in a["section-header"]={pattern:/^ ?\*{3}.+?\*{3}/,alias:"keyword"},r)a[i]=r[i];return a.tag={pattern:/([\r\n](?: {2}|\t)[ \t]*)\[[-\w]+\]/,lookbehind:!0,inside:{punctuation:/\[|\]/}},a.variable=n,a.comment=t,{pattern:RegExp(/^ ?\*{3}[ \t]*<name>[ \t]*\*{3}(?:.|[\r\n](?!\*{3}))*/.source.replace(/<name>/g,function(){return e}),"im"),alias:"section",inside:a}}var a={pattern:/(\[Documentation\](?: {2}|\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/,lookbehind:!0,alias:"string"},i={pattern:/([\r\n] ?)(?!#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0,alias:"function",inside:{variable:n}},s={pattern:/([\r\n](?: {2}|\t)[ \t]*)(?!\[|\.{3}|#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0,inside:{variable:n}};e.languages.robotframework={settings:r("Settings",{documentation:{pattern:/([\r\n] ?Documentation(?: {2}|\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/,lookbehind:!0,alias:"string"},property:{pattern:/([\r\n] ?)(?!\.{3}|#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0}}),variables:r("Variables"),"test-cases":r("Test Cases",{"test-name":i,documentation:a,property:s}),keywords:r("Keywords",{"keyword-name":i,documentation:a,property:s}),tasks:r("Tasks",{"task-name":i,documentation:a,property:s}),comment:t},e.languages.robot=e.languages.robotframework}(e)}function kS(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}function k_(e){var t,n,r,a,i,s,o,l,c,u,d,p,m,f,h,g,b,y;t=/(?:"(?:""|[^"])*"(?!")|'(?:''|[^'])*'(?!'))/.source,n=/\b(?:\d[\da-f]*x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,r={pattern:RegExp(t+"[bx]"),alias:"number"},i={pattern:/((?:^|\s|=|\())%(?:ABORT|BY|CMS|COPY|DISPLAY|DO|ELSE|END|EVAL|GLOBAL|GO|GOTO|IF|INC|INCLUDE|INDEX|INPUT|KTRIM|LENGTH|LET|LIST|LOCAL|PUT|QKTRIM|QSCAN|QSUBSTR|QSYSFUNC|QUPCASE|RETURN|RUN|SCAN|SUBSTR|SUPERQ|SYMDEL|SYMEXIST|SYMGLOBL|SYMLOCAL|SYSCALL|SYSEVALF|SYSEXEC|SYSFUNC|SYSGET|SYSRPUT|THEN|TO|TSO|UNQUOTE|UNTIL|UPCASE|WHILE|WINDOW)\b/i,lookbehind:!0,alias:"keyword"},s={pattern:/(^|\s)(?:proc\s+\w+|data(?!=)|quit|run)\b/i,alias:"keyword",lookbehind:!0},o=[/\/\*[\s\S]*?\*\//,{pattern:/(^[ \t]*|;\s*)\*[^;]*;/m,lookbehind:!0}],d={function:u={pattern:/%?\b\w+(?=\()/,alias:"keyword"},"arg-value":{pattern:/(=\s*)[A-Z\.]+/i,lookbehind:!0},operator:/=/,"macro-variable":a={pattern:/&[a-z_]\w*/i},arg:{pattern:/[A-Z]+/i,alias:"keyword"},number:n,"numeric-constant":r,punctuation:c=/[$%@.(){}\[\];,\\]/,string:l={pattern:RegExp(t),greedy:!0}},p={pattern:/\b(?:format|put)\b=?[\w'$.]+/i,inside:{keyword:/^(?:format|put)(?==)/i,equals:/=/,format:{pattern:/(?:\w|\$\d)+\.\d?/,alias:"number"}}},m={pattern:/\b(?:format|put)\s+[\w']+(?:\s+[$.\w]+)+(?=;)/i,inside:{keyword:/^(?:format|put)/i,format:{pattern:/[\w$]+\.\d?/,alias:"number"}}},f={pattern:/((?:^|\s)=?)(?:catname|checkpoint execute_always|dm|endsas|filename|footnote|%include|libname|%list|lock|missing|options|page|resetline|%run|sasfile|skip|sysecho|title\d?)\b/i,lookbehind:!0,alias:"keyword"},h={pattern:/(^|\s)(?:submit(?:\s+(?:load|norun|parseonly))?|endsubmit)\b/i,lookbehind:!0,alias:"keyword"},g=/aStore|accessControl|aggregation|audio|autotune|bayesianNetClassifier|bioMedImage|boolRule|builtins|cardinality|cdm|clustering|conditionalRandomFields|configuration|copula|countreg|dataDiscovery|dataPreprocess|dataSciencePilot|dataStep|decisionTree|deduplication|deepLearn|deepNeural|deepRnn|ds2|ecm|entityRes|espCluster|explainModel|factmac|fastKnn|fcmpact|fedSql|freqTab|gVarCluster|gam|gleam|graphSemiSupLearn|hiddenMarkovModel|hyperGroup|ica|image|iml|kernalPca|langModel|ldaTopic|loadStreams|mbc|mixed|mlTools|modelPublishing|network|neuralNet|nmf|nonParametricBayes|nonlinear|optNetwork|optimization|panel|pca|percentile|phreg|pls|qkb|qlim|quantreg|recommend|regression|reinforcementLearn|robustPca|ruleMining|sampling|sandwich|sccasl|search(?:Analytics)?|sentimentAnalysis|sequence|session(?:Prop)?|severity|simSystem|simple|smartData|sparkEmbeddedProcess|sparseML|spatialreg|spc|stabilityMonitoring|svDataDescription|svm|table|text(?:Filters|Frequency|Mining|Parse|Rule(?:Develop|Score)|Topic|Util)|timeData|transpose|tsInfo|tsReconcile|uniTimeSeries|varReduce/.source,b={pattern:RegExp(/(^|\s)(?:action\s+)?(?:<act>)\.[a-z]+\b[^;]+/.source.replace(/<act>/g,function(){return g}),"i"),lookbehind:!0,inside:{keyword:RegExp(/(?:<act>)\.[a-z]+\b/.source.replace(/<act>/g,function(){return g}),"i"),action:{pattern:/(?:action)/i,alias:"keyword"},comment:o,function:u,"arg-value":d["arg-value"],operator:d.operator,argument:d.arg,number:n,"numeric-constant":r,punctuation:c,string:l}},y={pattern:/((?:^|\s)=?)(?:after|analysis|and|array|barchart|barwidth|begingraph|by|call|cas|cbarline|cfill|class(?:lev)?|close|column|computed?|contains|continue|data(?==)|define|delete|describe|document|do\s+over|do|dol|drop|dul|else|end(?:comp|source)?|entryTitle|eval(?:uate)?|exec(?:ute)?|exit|file(?:name)?|fill(?:attrs)?|flist|fnc|function(?:list)?|global|goto|group(?:by)?|headline|headskip|histogram|if|infile|keep|keylabel|keyword|label|layout|leave|legendlabel|length|libname|loadactionset|merge|midpoints|_?null_|name|noobs|nowd|ods|options|or|otherwise|out(?:put)?|over(?:lay)?|plot|print|put|raise|ranexp|rannor|rbreak|retain|return|select|session|sessref|set|source|statgraph|sum|summarize|table|temp|terminate|then\s+do|then|title\d?|to|var|when|where|xaxisopts|y2axisopts|yaxisopts)\b/i,lookbehind:!0},e.languages.sas={datalines:{pattern:/^([ \t]*)(?:cards|(?:data)?lines);[\s\S]+?^[ \t]*;/im,lookbehind:!0,alias:"string",inside:{keyword:{pattern:/^(?:cards|(?:data)?lines)/i},punctuation:/;/}},"proc-sql":{pattern:/(^proc\s+(?:fed)?sql(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,lookbehind:!0,inside:{sql:{pattern:RegExp(/^[ \t]*(?:select|alter\s+table|(?:create|describe|drop)\s+(?:index|table(?:\s+constraints)?|view)|create\s+unique\s+index|insert\s+into|update)(?:<str>|[^;"'])+;/.source.replace(/<str>/g,function(){return t}),"im"),alias:"language-sql",inside:e.languages.sql},"global-statements":f,"sql-statements":{pattern:/(^|\s)(?:disconnect\s+from|begin|commit|exec(?:ute)?|reset|rollback|validate)\b/i,lookbehind:!0,alias:"keyword"},number:n,"numeric-constant":r,punctuation:c,string:l}},"proc-groovy":{pattern:/(^proc\s+groovy(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:o,groovy:{pattern:RegExp(/(^[ \t]*submit(?:\s+(?:load|norun|parseonly))?)(?:<str>|[^"'])+?(?=endsubmit;)/.source.replace(/<str>/g,function(){return t}),"im"),lookbehind:!0,alias:"language-groovy",inside:e.languages.groovy},keyword:y,"submit-statement":h,"global-statements":f,number:n,"numeric-constant":r,punctuation:c,string:l}},"proc-lua":{pattern:/(^proc\s+lua(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:o,lua:{pattern:RegExp(/(^[ \t]*submit(?:\s+(?:load|norun|parseonly))?)(?:<str>|[^"'])+?(?=endsubmit;)/.source.replace(/<str>/g,function(){return t}),"im"),lookbehind:!0,alias:"language-lua",inside:e.languages.lua},keyword:y,"submit-statement":h,"global-statements":f,number:n,"numeric-constant":r,punctuation:c,string:l}},"proc-cas":{pattern:/(^proc\s+cas(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|data);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:o,"statement-var":{pattern:/((?:^|\s)=?)saveresult\s[^;]+/im,lookbehind:!0,inside:{statement:{pattern:/^saveresult\s+\S+/i,inside:{keyword:/^(?:saveresult)/i}},rest:d}},"cas-actions":b,statement:{pattern:/((?:^|\s)=?)(?:default|(?:un)?set|on|output|upload)[^;]+/im,lookbehind:!0,inside:d},step:s,keyword:y,function:u,format:p,altformat:m,"global-statements":f,number:n,"numeric-constant":r,punctuation:c,string:l}},"proc-args":{pattern:RegExp(/(^proc\s+\w+\s+)(?!\s)(?:[^;"']|<str>)+;/.source.replace(/<str>/g,function(){return t}),"im"),lookbehind:!0,inside:d},"macro-keyword":i,"macro-variable":a,"macro-string-functions":{pattern:/((?:^|\s|=))%(?:BQUOTE|NRBQUOTE|NRQUOTE|NRSTR|QUOTE|STR)\(.*?(?:[^%]\))/i,lookbehind:!0,inside:{function:{pattern:/%(?:BQUOTE|NRBQUOTE|NRQUOTE|NRSTR|QUOTE|STR)/i,alias:"keyword"},"macro-keyword":i,"macro-variable":a,"escaped-char":{pattern:/%['"()<>=¬^~;,#]/},punctuation:c}},"macro-declaration":{pattern:/^%macro[^;]+(?=;)/im,inside:{keyword:/%macro/i}},"macro-end":{pattern:/^%mend[^;]+(?=;)/im,inside:{keyword:/%mend/i}},macro:{pattern:/%_\w+(?=\()/,alias:"keyword"},input:{pattern:/\binput\s[-\w\s/*.$&]+;/i,inside:{input:{alias:"keyword",pattern:/^input/i},comment:o,number:n,"numeric-constant":r}},"options-args":{pattern:/(^options)[-'"|/\\<>*+=:()\w\s]*(?=;)/im,lookbehind:!0,inside:d},"cas-actions":b,comment:o,function:u,format:p,altformat:m,"numeric-constant":r,datetime:{pattern:RegExp(t+"(?:dt?|t)"),alias:"number"},string:l,step:s,keyword:y,"operator-keyword":{pattern:/\b(?:eq|ge|gt|in|le|lt|ne|not)\b/i,alias:"operator"},number:n,operator:/\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?/,punctuation:c}}function kk(e){var t,n;e.register(vj),e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule,t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}],e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}function kw(e){var t;e.register(v5),t=[/"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/.source,/'[^']*'/.source,/\$'(?:[^'\\]|\\[\s\S])*'/.source,/<<-?\s*(["']?)(\w+)\1\s[\s\S]*?[\r\n]\2/.source].join("|"),e.languages["shell-session"]={command:{pattern:RegExp(/^/.source+"(?:"+/[^\s@:$#%*!/\\]+@[^\r\n@:$#%*!/\\]+(?::[^\0-\x1F$#%*?"<>:;|]+)?/.source+"|"+/[/~.][^\0-\x1F$#%*?"<>@:;|]*/.source+")?"+/[$#%](?=\s)/.source+/(?:[^\\\r\n \t'"<$]|[ \t](?:(?!#)|#.*$)|\\(?:[^\r]|\r\n?)|\$(?!')|<(?!<)|<<str>>)+/.source.replace(/<<str>>/g,function(){return t}),"m"),greedy:!0,inside:{info:{pattern:/^[^#$%]+/,alias:"punctuation",inside:{user:/^[^\s@:$#%*!/\\]+@[^\r\n@:$#%*!/\\]+/,punctuation:/:/,path:/[\s\S]+/}},bash:{pattern:/(^[$#%]\s*)\S[\s\S]*/,lookbehind:!0,alias:"language-bash",inside:e.languages.bash},"shell-symbol":{pattern:/^[$#%]/,alias:"important"}}},output:/.(?:.*(?:[\r\n]|.$))*/},e.languages["sh-session"]=e.languages.shellsession=e.languages["shell-session"]}function kA(e){e.languages.smali={comment:/#.*/,string:{pattern:/"(?:[^\r\n\\"]|\\.)*"|'(?:[^\r\n\\']|\\(?:.|u[\da-fA-F]{4}))'/,greedy:!0},"class-name":{pattern:/(^|[^L])L(?:(?:\w+|`[^`\r\n]*`)\/)*(?:[\w$]+|`[^`\r\n]*`)(?=\s*;)/,lookbehind:!0,inside:{"class-name":{pattern:/(^L|\/)(?:[\w$]+|`[^`\r\n]*`)$/,lookbehind:!0},namespace:{pattern:/^(L)(?:(?:\w+|`[^`\r\n]*`)\/)+/,lookbehind:!0,inside:{punctuation:/\//}},builtin:/^L/}},builtin:[{pattern:/([();\[])[BCDFIJSVZ]+/,lookbehind:!0},{pattern:/([\w$>]:)[BCDFIJSVZ]/,lookbehind:!0}],keyword:[{pattern:/(\.end\s+)[\w-]+/,lookbehind:!0},{pattern:/(^|[^\w.-])\.(?!\d)[\w-]+/,lookbehind:!0},{pattern:/(^|[^\w.-])(?:abstract|annotation|bridge|constructor|enum|final|interface|private|protected|public|runtime|static|synthetic|system|transient)(?![\w.-])/,lookbehind:!0}],function:{pattern:/(^|[^\w.-])(?:\w+|<[\w$-]+>)(?=\()/,lookbehind:!0},field:{pattern:/[\w$]+(?=:)/,alias:"variable"},register:{pattern:/(^|[^\w.-])[vp]\d(?![\w.-])/,lookbehind:!0,alias:"variable"},boolean:{pattern:/(^|[^\w.-])(?:false|true)(?![\w.-])/,lookbehind:!0},number:{pattern:/(^|[^/\w.-])-?(?:NAN|INFINITY|0x(?:[\dA-F]+(?:\.[\dA-F]*)?|\.[\dA-F]+)(?:p[+-]?[\dA-F]+)?|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)[dflst]?(?![\w.-])/i,lookbehind:!0},label:{pattern:/(:)\w+/,lookbehind:!0,alias:"property"},operator:/->|\.\.|[\[=]/,punctuation:/[{}(),;:]/}}function kN(e){e.languages.smalltalk={comment:{pattern:/"(?:""|[^"])*"/,greedy:!0},char:{pattern:/\$./,greedy:!0},string:{pattern:/'(?:''|[^'])*'/,greedy:!0},symbol:/#[\da-z]+|#(?:-|([+\/\\*~<>=@%|&?!])\1?)|#(?=\()/i,"block-arguments":{pattern:/(\[\s*):[^\[|]*\|/,lookbehind:!0,inside:{variable:/:[\da-z]+/i,punctuation:/\|/}},"temporary-variables":{pattern:/\|[^|]+\|/,inside:{variable:/[\da-z]+/i,punctuation:/\|/}},keyword:/\b(?:new|nil|self|super)\b/,boolean:/\b(?:false|true)\b/,number:[/\d+r-?[\dA-Z]+(?:\.[\dA-Z]+)?(?:e-?\d+)?/,/\b\d+(?:\.\d+)?(?:e-?\d+)?/],operator:/[<=]=?|:=|~[~=]|\/\/?|\\\\|>[>=]?|[!^+\-*&|,@]/,punctuation:/[.;:?\[\](){}]/}}function kI(e){var t,n;e.register(TV),e.languages.smarty={comment:{pattern:/^\{\*[\s\S]*?\*\}/,greedy:!0},"embedded-php":{pattern:/^\{php\}[\s\S]*?\{\/php\}/,greedy:!0,inside:{smarty:{pattern:/^\{php\}|\{\/php\}$/,inside:null},php:{pattern:/[\s\S]+/,alias:"language-php",inside:e.languages.php}}},string:[{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0,inside:{interpolation:{pattern:/\{[^{}]*\}|`[^`]*`/,inside:{"interpolation-punctuation":{pattern:/^[{`]|[`}]$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}},variable:/\$\w+/}},{pattern:/'(?:\\.|[^'\\\r\n])*'/,greedy:!0}],keyword:{pattern:/(^\{\/?)[a-z_]\w*\b(?!\()/i,lookbehind:!0,greedy:!0},delimiter:{pattern:/^\{\/?|\}$/,greedy:!0,alias:"punctuation"},number:/\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,variable:[/\$(?!\d)\w+/,/#(?!\d)\w+#/,{pattern:/(\.|->|\w\s*=)(?!\d)\w+\b(?!\()/,lookbehind:!0},{pattern:/(\[)(?!\d)\w+(?=\])/,lookbehind:!0}],function:{pattern:/(\|\s*)@?[a-z_]\w*|\b[a-z_]\w*(?=\()/i,lookbehind:!0},"attr-name":/\b[a-z_]\w*(?=\s*=)/i,boolean:/\b(?:false|no|off|on|true|yes)\b/,punctuation:/[\[\](){}.,:`]|->/,operator:[/[+\-*\/%]|==?=?|[!<>]=?|&&|\|\|?/,/\bis\s+(?:not\s+)?(?:div|even|odd)(?:\s+by)?\b/,/\b(?:and|eq|gt?e|gt|lt?e|lt|mod|neq?|not|or)\b/]},e.languages.smarty["embedded-php"].inside.smarty.inside=e.languages.smarty,e.languages.smarty.string[0].inside.interpolation.inside.expression.inside=e.languages.smarty,t=/"(?:\\.|[^"\\\r\n])*"|'(?:\\.|[^'\\\r\n])*'/,n=RegExp(/\{\*[\s\S]*?\*\}/.source+"|"+/\{php\}[\s\S]*?\{\/php\}/.source+"|"+/\{(?:[^{}"']|<str>|\{(?:[^{}"']|<str>|\{(?:[^{}"']|<str>)*\})*\})*\}/.source.replace(/<str>/g,function(){return t.source}),"g"),e.hooks.add("before-tokenize",function(t){var r=!1;e.languages["markup-templating"].buildPlaceholders(t,"smarty",n,function(e){return"{/literal}"===e&&(r=!1),!r&&("{literal}"===e&&(r=!0),!0)})}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"smarty")})}function kC(e){var t;t=/\b(?:abstype|and|andalso|as|case|datatype|do|else|end|eqtype|exception|fn|fun|functor|handle|if|in|include|infix|infixr|let|local|nonfix|of|op|open|orelse|raise|rec|sharing|sig|signature|struct|structure|then|type|val|where|while|with|withtype)\b/i,e.languages.sml={comment:/\(\*(?:[^*(]|\*(?!\))|\((?!\*)|\(\*(?:[^*(]|\*(?!\))|\((?!\*))*\*\))*\*\)/,string:{pattern:/#?"(?:[^"\\]|\\.)*"/,greedy:!0},"class-name":[{pattern:RegExp(/((?:^|[^:]):\s*)<TERMINAL>(?:\s*(?:(?:\*|->)\s*<TERMINAL>|,\s*<TERMINAL>(?:(?=<NOT-LAST>)|(?!<NOT-LAST>)\s+<LONG-ID>)))*/.source.replace(/<NOT-LAST>/g,function(){return/\s*(?:[*,]|->)/.source}).replace(/<TERMINAL>/g,function(){return/(?:'[\w']*|<LONG-ID>|\((?:[^()]|\([^()]*\))*\)|\{(?:[^{}]|\{[^{}]*\})*\})(?:\s+<LONG-ID>)*/.source}).replace(/<LONG-ID>/g,function(){return/(?!<KEYWORD>)[a-z\d_][\w'.]*/.source}).replace(/<KEYWORD>/g,function(){return t.source}),"i"),lookbehind:!0,greedy:!0,inside:null},{pattern:/((?:^|[^\w'])(?:datatype|exception|functor|signature|structure|type)\s+)[a-z_][\w'.]*/i,lookbehind:!0}],function:{pattern:/((?:^|[^\w'])fun\s+)[a-z_][\w'.]*/i,lookbehind:!0},keyword:t,variable:{pattern:/(^|[^\w'])'[\w']*/,lookbehind:!0},number:/~?\b(?:\d+(?:\.\d+)?(?:e~?\d+)?|0x[\da-f]+)\b/i,word:{pattern:/\b0w(?:\d+|x[\da-f]+)\b/i,alias:"constant"},boolean:/\b(?:false|true)\b/i,operator:/\.\.\.|:[>=:]|=>?|->|[<>]=?|[!+\-*/^#|@~]/,punctuation:/[(){}\[\].:,;]/},e.languages.sml["class-name"][0].inside=e.languages.sml,e.languages.smlnj=e.languages.sml}function kR(e){e.register(vF),e.languages.solidity=e.languages.extend("clike",{"class-name":{pattern:/(\b(?:contract|enum|interface|library|new|struct|using)\s+)(?!\d)[\w$]+/,lookbehind:!0},keyword:/\b(?:_|anonymous|as|assembly|assert|break|calldata|case|constant|constructor|continue|contract|default|delete|do|else|emit|enum|event|external|for|from|function|if|import|indexed|inherited|interface|internal|is|let|library|mapping|memory|modifier|new|payable|pragma|private|public|pure|require|returns?|revert|selfdestruct|solidity|storage|struct|suicide|switch|this|throw|using|var|view|while)\b/,operator:/=>|->|:=|=:|\*\*|\+\+|--|\|\||&&|<<=?|>>=?|[-+*/%^&|<>!=]=?|[~?]/}),e.languages.insertBefore("solidity","keyword",{builtin:/\b(?:address|bool|byte|u?int(?:8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?|string|bytes(?:[1-9]|[12]\d|3[0-2])?)\b/}),e.languages.insertBefore("solidity","number",{version:{pattern:/([<>]=?|\^)\d+\.\d+\.\d+\b/,lookbehind:!0,alias:"number"}}),e.languages.sol=e.languages.solidity}function kO(e){var t;t={pattern:/\{[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}\}/i,alias:"constant",inside:{punctuation:/[{}]/}},e.languages["solution-file"]={comment:{pattern:/#.*/,greedy:!0},string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,greedy:!0,inside:{guid:t}},object:{pattern:/^([ \t]*)(?:([A-Z]\w*)\b(?=.*(?:\r\n?|\n)(?:\1[ \t].*(?:\r\n?|\n))*\1End\2(?=[ \t]*$))|End[A-Z]\w*(?=[ \t]*$))/m,lookbehind:!0,greedy:!0,alias:"keyword"},property:{pattern:/^([ \t]*)(?!\s)[^\r\n"#=()]*[^\s"#=()](?=\s*=)/m,lookbehind:!0,inside:{guid:t}},guid:t,number:/\b\d+(?:\.\d+)*\b/,boolean:/\b(?:FALSE|TRUE)\b/,operator:/=/,punctuation:/[(),]/},e.languages.sln=e.languages["solution-file"]}function kD(e){var t,n;e.register(TV),t=/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,n=/\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b|\b0x[\dA-F]+\b/,e.languages.soy={comment:[/\/\*[\s\S]*?\*\//,{pattern:/(\s)\/\/.*/,lookbehind:!0,greedy:!0}],"command-arg":{pattern:/(\{+\/?\s*(?:alias|call|delcall|delpackage|deltemplate|namespace|template)\s+)\.?[\w.]+/,lookbehind:!0,alias:"string",inside:{punctuation:/\./}},parameter:{pattern:/(\{+\/?\s*@?param\??\s+)\.?[\w.]+/,lookbehind:!0,alias:"variable"},keyword:[{pattern:/(\{+\/?[^\S\r\n]*)(?:\\[nrt]|alias|call|case|css|default|delcall|delpackage|deltemplate|else(?:if)?|fallbackmsg|for(?:each)?|if(?:empty)?|lb|let|literal|msg|namespace|nil|@?param\??|rb|sp|switch|template|xid)/,lookbehind:!0},/\b(?:any|as|attributes|bool|css|float|html|in|int|js|list|map|null|number|string|uri)\b/],delimiter:{pattern:/^\{+\/?|\/?\}+$/,alias:"punctuation"},property:/\w+(?==)/,variable:{pattern:/\$[^\W\d]\w*(?:\??(?:\.\w+|\[[^\]]+\]))*/,inside:{string:{pattern:t,greedy:!0},number:n,punctuation:/[\[\].?]/}},string:{pattern:t,greedy:!0},function:[/\w+(?=\()/,{pattern:/(\|[^\S\r\n]*)\w+/,lookbehind:!0}],boolean:/\b(?:false|true)\b/,number:n,operator:/\?:?|<=?|>=?|==?|!=|[+*/%-]|\b(?:and|not|or)\b/,punctuation:/[{}()\[\]|.,:]/},e.hooks.add("before-tokenize",function(t){var n=!1;e.languages["markup-templating"].buildPlaceholders(t,"soy",/\{\{.+?\}\}|\{.+?\}|\s\/\/.*|\/\*[\s\S]*?\*\//g,function(e){return"{/literal}"===e&&(n=!1),!n&&("{literal}"===e&&(n=!0),!0)})}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"soy")})}function kL(e){e.languages.turtle={comment:{pattern:/#.*/,greedy:!0},"multiline-string":{pattern:/"""(?:(?:""?)?(?:[^"\\]|\\.))*"""|'''(?:(?:''?)?(?:[^'\\]|\\.))*'''/,greedy:!0,alias:"string",inside:{comment:/#.*/}},string:{pattern:/"(?:[^\\"\r\n]|\\.)*"|'(?:[^\\'\r\n]|\\.)*'/,greedy:!0},url:{pattern:/<(?:[^\x00-\x20<>"{}|^`\\]|\\(?:u[\da-fA-F]{4}|U[\da-fA-F]{8}))*>/,greedy:!0,inside:{punctuation:/[<>]/}},function:{pattern:/(?:(?![-.\d\xB7])[-.\w\xB7\xC0-\uFFFD]+)?:(?:(?![-.])(?:[-.:\w\xC0-\uFFFD]|%[\da-f]{2}|\\.)+)?/i,inside:{"local-name":{pattern:/([^:]*:)[\s\S]+/,lookbehind:!0},prefix:{pattern:/[\s\S]+/,inside:{punctuation:/:/}}}},number:/[+-]?\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,punctuation:/[{}.,;()[\]]|\^\^/,boolean:/\b(?:false|true)\b/,keyword:[/(?:\ba|@prefix|@base)\b|=/,/\b(?:base|graph|prefix)\b/i],tag:{pattern:/@[a-z]+(?:-[a-z\d]+)*/i,inside:{punctuation:/@/}}},e.languages.trig=e.languages.turtle}function kM(e){e.register(kL),e.languages.sparql=e.languages.extend("turtle",{boolean:/\b(?:false|true)\b/i,variable:{pattern:/[?$]\w+/,greedy:!0}}),e.languages.insertBefore("sparql","punctuation",{keyword:[/\b(?:A|ADD|ALL|AS|ASC|ASK|BNODE|BY|CLEAR|CONSTRUCT|COPY|CREATE|DATA|DEFAULT|DELETE|DESC|DESCRIBE|DISTINCT|DROP|EXISTS|FILTER|FROM|GROUP|HAVING|INSERT|INTO|LIMIT|LOAD|MINUS|MOVE|NAMED|NOT|NOW|OFFSET|OPTIONAL|ORDER|RAND|REDUCED|SELECT|SEPARATOR|SERVICE|SILENT|STRUUID|UNION|USING|UUID|VALUES|WHERE)\b/i,/\b(?:ABS|AVG|BIND|BOUND|CEIL|COALESCE|CONCAT|CONTAINS|COUNT|DATATYPE|DAY|ENCODE_FOR_URI|FLOOR|GROUP_CONCAT|HOURS|IF|IRI|isBLANK|isIRI|isLITERAL|isNUMERIC|isURI|LANG|LANGMATCHES|LCASE|MAX|MD5|MIN|MINUTES|MONTH|REGEX|REPLACE|ROUND|sameTerm|SAMPLE|SECONDS|SHA1|SHA256|SHA384|SHA512|STR|STRAFTER|STRBEFORE|STRDT|STRENDS|STRLANG|STRLEN|STRSTARTS|SUBSTR|SUM|TIMEZONE|TZ|UCASE|URI|YEAR)\b(?=\s*\()/i,/\b(?:BASE|GRAPH|PREFIX)\b/i]}),e.languages.rq=e.languages.sparql}function kP(e){e.languages["splunk-spl"]={comment:/`comment\("(?:\\.|[^\\"])*"\)`/,string:{pattern:/"(?:\\.|[^\\"])*"/,greedy:!0},keyword:/\b(?:abstract|accum|addcoltotals|addinfo|addtotals|analyzefields|anomalies|anomalousvalue|anomalydetection|append|appendcols|appendcsv|appendlookup|appendpipe|arules|associate|audit|autoregress|bin|bucket|bucketdir|chart|cluster|cofilter|collect|concurrency|contingency|convert|correlate|datamodel|dbinspect|dedup|delete|delta|diff|erex|eval|eventcount|eventstats|extract|fieldformat|fields|fieldsummary|filldown|fillnull|findtypes|folderize|foreach|format|from|gauge|gentimes|geom|geomfilter|geostats|head|highlight|history|iconify|input|inputcsv|inputlookup|iplocation|join|kmeans|kv|kvform|loadjob|localize|localop|lookup|makecontinuous|makemv|makeresults|map|mcollect|metadata|metasearch|meventcollect|mstats|multikv|multisearch|mvcombine|mvexpand|nomv|outlier|outputcsv|outputlookup|outputtext|overlap|pivot|predict|rangemap|rare|regex|relevancy|reltime|rename|replace|rest|return|reverse|rex|rtorder|run|savedsearch|script|scrub|search|searchtxn|selfjoin|sendemail|set|setfields|sichart|sirare|sistats|sitimechart|sitop|sort|spath|stats|strcat|streamstats|table|tags|tail|timechart|timewrap|top|transaction|transpose|trendline|tscollect|tstats|typeahead|typelearner|typer|union|uniq|untable|where|x11|xmlkv|xmlunescape|xpath|xyseries)\b/i,"operator-word":{pattern:/\b(?:and|as|by|not|or|xor)\b/i,alias:"operator"},function:/\b\w+(?=\s*\()/,property:/\b\w+(?=\s*=(?!=))/,date:{pattern:/\b\d{1,2}\/\d{1,2}\/\d{1,4}(?:(?::\d{1,2}){3})?\b/,alias:"number"},number:/\b\d+(?:\.\d+)?\b/,boolean:/\b(?:f|false|t|true)\b/i,operator:/[<>=]=?|[-+*/%|]/,punctuation:/[()[\],]/}}function kj(e){e.register(vF),e.languages.sqf=e.languages.extend("clike",{string:{pattern:/"(?:(?:"")?[^"])*"(?!")|'(?:[^'])*'/,greedy:!0},keyword:/\b(?:breakOut|breakTo|call|case|catch|default|do|echo|else|execFSM|execVM|exitWith|for|forEach|forEachMember|forEachMemberAgent|forEachMemberTeam|from|goto|if|nil|preprocessFile|preprocessFileLineNumbers|private|scopeName|spawn|step|switch|then|throw|to|try|while|with)\b/i,boolean:/\b(?:false|true)\b/i,function:/\b(?:abs|accTime|acos|action|actionIDs|actionKeys|actionKeysImages|actionKeysNames|actionKeysNamesArray|actionName|actionParams|activateAddons|activatedAddons|activateKey|add3DENConnection|add3DENEventHandler|add3DENLayer|addAction|addBackpack|addBackpackCargo|addBackpackCargoGlobal|addBackpackGlobal|addCamShake|addCuratorAddons|addCuratorCameraArea|addCuratorEditableObjects|addCuratorEditingArea|addCuratorPoints|addEditorObject|addEventHandler|addForce|addForceGeneratorRTD|addGoggles|addGroupIcon|addHandgunItem|addHeadgear|addItem|addItemCargo|addItemCargoGlobal|addItemPool|addItemToBackpack|addItemToUniform|addItemToVest|addLiveStats|addMagazine|addMagazineAmmoCargo|addMagazineCargo|addMagazineCargoGlobal|addMagazineGlobal|addMagazinePool|addMagazines|addMagazineTurret|addMenu|addMenuItem|addMissionEventHandler|addMPEventHandler|addMusicEventHandler|addOwnedMine|addPlayerScores|addPrimaryWeaponItem|addPublicVariableEventHandler|addRating|addResources|addScore|addScoreSide|addSecondaryWeaponItem|addSwitchableUnit|addTeamMember|addToRemainsCollector|addTorque|addUniform|addVehicle|addVest|addWaypoint|addWeapon|addWeaponCargo|addWeaponCargoGlobal|addWeaponGlobal|addWeaponItem|addWeaponPool|addWeaponTurret|admin|agent|agents|AGLToASL|aimedAtTarget|aimPos|airDensityCurveRTD|airDensityRTD|airplaneThrottle|airportSide|AISFinishHeal|alive|all3DENEntities|allAirports|allControls|allCurators|allCutLayers|allDead|allDeadMen|allDisplays|allGroups|allMapMarkers|allMines|allMissionObjects|allow3DMode|allowCrewInImmobile|allowCuratorLogicIgnoreAreas|allowDamage|allowDammage|allowFileOperations|allowFleeing|allowGetIn|allowSprint|allPlayers|allSimpleObjects|allSites|allTurrets|allUnits|allUnitsUAV|allVariables|ammo|ammoOnPylon|animate|animateBay|animateDoor|animatePylon|animateSource|animationNames|animationPhase|animationSourcePhase|animationState|append|apply|armoryPoints|arrayIntersect|asin|ASLToAGL|ASLToATL|assert|assignAsCargo|assignAsCargoIndex|assignAsCommander|assignAsDriver|assignAsGunner|assignAsTurret|assignCurator|assignedCargo|assignedCommander|assignedDriver|assignedGunner|assignedItems|assignedTarget|assignedTeam|assignedVehicle|assignedVehicleRole|assignItem|assignTeam|assignToAirport|atan|atan2|atg|ATLToASL|attachedObject|attachedObjects|attachedTo|attachObject|attachTo|attackEnabled|backpack|backpackCargo|backpackContainer|backpackItems|backpackMagazines|backpackSpaceFor|behaviour|benchmark|binocular|blufor|boundingBox|boundingBoxReal|boundingCenter|briefingName|buildingExit|buildingPos|buldozer_EnableRoadDiag|buldozer_IsEnabledRoadDiag|buldozer_LoadNewRoads|buldozer_reloadOperMap|buttonAction|buttonSetAction|cadetMode|callExtension|camCommand|camCommit|camCommitPrepared|camCommitted|camConstuctionSetParams|camCreate|camDestroy|cameraEffect|cameraEffectEnableHUD|cameraInterest|cameraOn|cameraView|campaignConfigFile|camPreload|camPreloaded|camPrepareBank|camPrepareDir|camPrepareDive|camPrepareFocus|camPrepareFov|camPrepareFovRange|camPreparePos|camPrepareRelPos|camPrepareTarget|camSetBank|camSetDir|camSetDive|camSetFocus|camSetFov|camSetFovRange|camSetPos|camSetRelPos|camSetTarget|camTarget|camUseNVG|canAdd|canAddItemToBackpack|canAddItemToUniform|canAddItemToVest|cancelSimpleTaskDestination|canFire|canMove|canSlingLoad|canStand|canSuspend|canTriggerDynamicSimulation|canUnloadInCombat|canVehicleCargo|captive|captiveNum|cbChecked|cbSetChecked|ceil|channelEnabled|cheatsEnabled|checkAIFeature|checkVisibility|civilian|className|clear3DENAttribute|clear3DENInventory|clearAllItemsFromBackpack|clearBackpackCargo|clearBackpackCargoGlobal|clearForcesRTD|clearGroupIcons|clearItemCargo|clearItemCargoGlobal|clearItemPool|clearMagazineCargo|clearMagazineCargoGlobal|clearMagazinePool|clearOverlay|clearRadio|clearVehicleInit|clearWeaponCargo|clearWeaponCargoGlobal|clearWeaponPool|clientOwner|closeDialog|closeDisplay|closeOverlay|collapseObjectTree|collect3DENHistory|collectiveRTD|combatMode|commandArtilleryFire|commandChat|commander|commandFire|commandFollow|commandFSM|commandGetOut|commandingMenu|commandMove|commandRadio|commandStop|commandSuppressiveFire|commandTarget|commandWatch|comment|commitOverlay|compile|compileFinal|completedFSM|composeText|configClasses|configFile|configHierarchy|configName|configNull|configProperties|configSourceAddonList|configSourceMod|configSourceModList|confirmSensorTarget|connectTerminalToUAV|controlNull|controlsGroupCtrl|copyFromClipboard|copyToClipboard|copyWaypoints|cos|count|countEnemy|countFriendly|countSide|countType|countUnknown|create3DENComposition|create3DENEntity|createAgent|createCenter|createDialog|createDiaryLink|createDiaryRecord|createDiarySubject|createDisplay|createGearDialog|createGroup|createGuardedPoint|createLocation|createMarker|createMarkerLocal|createMenu|createMine|createMissionDisplay|createMPCampaignDisplay|createSimpleObject|createSimpleTask|createSite|createSoundSource|createTask|createTeam|createTrigger|createUnit|createVehicle|createVehicleCrew|createVehicleLocal|crew|ctAddHeader|ctAddRow|ctClear|ctCurSel|ctData|ctFindHeaderRows|ctFindRowHeader|ctHeaderControls|ctHeaderCount|ctRemoveHeaders|ctRemoveRows|ctrlActivate|ctrlAddEventHandler|ctrlAngle|ctrlAutoScrollDelay|ctrlAutoScrollRewind|ctrlAutoScrollSpeed|ctrlChecked|ctrlClassName|ctrlCommit|ctrlCommitted|ctrlCreate|ctrlDelete|ctrlEnable|ctrlEnabled|ctrlFade|ctrlHTMLLoaded|ctrlIDC|ctrlIDD|ctrlMapAnimAdd|ctrlMapAnimClear|ctrlMapAnimCommit|ctrlMapAnimDone|ctrlMapCursor|ctrlMapMouseOver|ctrlMapScale|ctrlMapScreenToWorld|ctrlMapWorldToScreen|ctrlModel|ctrlModelDirAndUp|ctrlModelScale|ctrlParent|ctrlParentControlsGroup|ctrlPosition|ctrlRemoveAllEventHandlers|ctrlRemoveEventHandler|ctrlScale|ctrlSetActiveColor|ctrlSetAngle|ctrlSetAutoScrollDelay|ctrlSetAutoScrollRewind|ctrlSetAutoScrollSpeed|ctrlSetBackgroundColor|ctrlSetChecked|ctrlSetDisabledColor|ctrlSetEventHandler|ctrlSetFade|ctrlSetFocus|ctrlSetFont|ctrlSetFontH1|ctrlSetFontH1B|ctrlSetFontH2|ctrlSetFontH2B|ctrlSetFontH3|ctrlSetFontH3B|ctrlSetFontH4|ctrlSetFontH4B|ctrlSetFontH5|ctrlSetFontH5B|ctrlSetFontH6|ctrlSetFontH6B|ctrlSetFontHeight|ctrlSetFontHeightH1|ctrlSetFontHeightH2|ctrlSetFontHeightH3|ctrlSetFontHeightH4|ctrlSetFontHeightH5|ctrlSetFontHeightH6|ctrlSetFontHeightSecondary|ctrlSetFontP|ctrlSetFontPB|ctrlSetFontSecondary|ctrlSetForegroundColor|ctrlSetModel|ctrlSetModelDirAndUp|ctrlSetModelScale|ctrlSetPixelPrecision|ctrlSetPosition|ctrlSetScale|ctrlSetStructuredText|ctrlSetText|ctrlSetTextColor|ctrlSetTextColorSecondary|ctrlSetTextSecondary|ctrlSetTooltip|ctrlSetTooltipColorBox|ctrlSetTooltipColorShade|ctrlSetTooltipColorText|ctrlShow|ctrlShown|ctrlText|ctrlTextHeight|ctrlTextSecondary|ctrlTextWidth|ctrlType|ctrlVisible|ctRowControls|ctRowCount|ctSetCurSel|ctSetData|ctSetHeaderTemplate|ctSetRowTemplate|ctSetValue|ctValue|curatorAddons|curatorCamera|curatorCameraArea|curatorCameraAreaCeiling|curatorCoef|curatorEditableObjects|curatorEditingArea|curatorEditingAreaType|curatorMouseOver|curatorPoints|curatorRegisteredObjects|curatorSelected|curatorWaypointCost|current3DENOperation|currentChannel|currentCommand|currentMagazine|currentMagazineDetail|currentMagazineDetailTurret|currentMagazineTurret|currentMuzzle|currentNamespace|currentTask|currentTasks|currentThrowable|currentVisionMode|currentWaypoint|currentWeapon|currentWeaponMode|currentWeaponTurret|currentZeroing|cursorObject|cursorTarget|customChat|customRadio|cutFadeOut|cutObj|cutRsc|cutText|damage|date|dateToNumber|daytime|deActivateKey|debriefingText|debugFSM|debugLog|deg|delete3DENEntities|deleteAt|deleteCenter|deleteCollection|deleteEditorObject|deleteGroup|deleteGroupWhenEmpty|deleteIdentity|deleteLocation|deleteMarker|deleteMarkerLocal|deleteRange|deleteResources|deleteSite|deleteStatus|deleteTeam|deleteVehicle|deleteVehicleCrew|deleteWaypoint|detach|detectedMines|diag_activeMissionFSMs|diag_activeScripts|diag_activeSQFScripts|diag_activeSQSScripts|diag_captureFrame|diag_captureFrameToFile|diag_captureSlowFrame|diag_codePerformance|diag_drawMode|diag_dynamicSimulationEnd|diag_enable|diag_enabled|diag_fps|diag_fpsMin|diag_frameNo|diag_lightNewLoad|diag_list|diag_log|diag_logSlowFrame|diag_mergeConfigFile|diag_recordTurretLimits|diag_setLightNew|diag_tickTime|diag_toggle|dialog|diarySubjectExists|didJIP|didJIPOwner|difficulty|difficultyEnabled|difficultyEnabledRTD|difficultyOption|direction|directSay|disableAI|disableCollisionWith|disableConversation|disableDebriefingStats|disableMapIndicators|disableNVGEquipment|disableRemoteSensors|disableSerialization|disableTIEquipment|disableUAVConnectability|disableUserInput|displayAddEventHandler|displayCtrl|displayNull|displayParent|displayRemoveAllEventHandlers|displayRemoveEventHandler|displaySetEventHandler|dissolveTeam|distance|distance2D|distanceSqr|distributionRegion|do3DENAction|doArtilleryFire|doFire|doFollow|doFSM|doGetOut|doMove|doorPhase|doStop|doSuppressiveFire|doTarget|doWatch|drawArrow|drawEllipse|drawIcon|drawIcon3D|drawLine|drawLine3D|drawLink|drawLocation|drawPolygon|drawRectangle|drawTriangle|driver|drop|dynamicSimulationDistance|dynamicSimulationDistanceCoef|dynamicSimulationEnabled|dynamicSimulationSystemEnabled|east|edit3DENMissionAttributes|editObject|editorSetEventHandler|effectiveCommander|emptyPositions|enableAI|enableAIFeature|enableAimPrecision|enableAttack|enableAudioFeature|enableAutoStartUpRTD|enableAutoTrimRTD|enableCamShake|enableCaustics|enableChannel|enableCollisionWith|enableCopilot|enableDebriefingStats|enableDiagLegend|enableDynamicSimulation|enableDynamicSimulationSystem|enableEndDialog|enableEngineArtillery|enableEnvironment|enableFatigue|enableGunLights|enableInfoPanelComponent|enableIRLasers|enableMimics|enablePersonTurret|enableRadio|enableReload|enableRopeAttach|enableSatNormalOnDetail|enableSaving|enableSentences|enableSimulation|enableSimulationGlobal|enableStamina|enableStressDamage|enableTeamSwitch|enableTraffic|enableUAVConnectability|enableUAVWaypoints|enableVehicleCargo|enableVehicleSensor|enableWeaponDisassembly|endl|endLoadingScreen|endMission|engineOn|enginesIsOnRTD|enginesPowerRTD|enginesRpmRTD|enginesTorqueRTD|entities|environmentEnabled|estimatedEndServerTime|estimatedTimeLeft|evalObjectArgument|everyBackpack|everyContainer|exec|execEditorScript|exp|expectedDestination|exportJIPMessages|eyeDirection|eyePos|face|faction|fadeMusic|fadeRadio|fadeSound|fadeSpeech|failMission|fillWeaponsFromPool|find|findCover|findDisplay|findEditorObject|findEmptyPosition|findEmptyPositionReady|findIf|findNearestEnemy|finishMissionInit|finite|fire|fireAtTarget|firstBackpack|flag|flagAnimationPhase|flagOwner|flagSide|flagTexture|fleeing|floor|flyInHeight|flyInHeightASL|fog|fogForecast|fogParams|forceAddUniform|forceAtPositionRTD|forcedMap|forceEnd|forceFlagTexture|forceFollowRoad|forceGeneratorRTD|forceMap|forceRespawn|forceSpeed|forceWalk|forceWeaponFire|forceWeatherChange|forgetTarget|format|formation|formationDirection|formationLeader|formationMembers|formationPosition|formationTask|formatText|formLeader|freeLook|fromEditor|fuel|fullCrew|gearIDCAmmoCount|gearSlotAmmoCount|gearSlotData|get3DENActionState|get3DENAttribute|get3DENCamera|get3DENConnections|get3DENEntity|get3DENEntityID|get3DENGrid|get3DENIconsVisible|get3DENLayerEntities|get3DENLinesVisible|get3DENMissionAttribute|get3DENMouseOver|get3DENSelected|getAimingCoef|getAllEnvSoundControllers|getAllHitPointsDamage|getAllOwnedMines|getAllSoundControllers|getAmmoCargo|getAnimAimPrecision|getAnimSpeedCoef|getArray|getArtilleryAmmo|getArtilleryComputerSettings|getArtilleryETA|getAssignedCuratorLogic|getAssignedCuratorUnit|getBackpackCargo|getBleedingRemaining|getBurningValue|getCameraViewDirection|getCargoIndex|getCenterOfMass|getClientState|getClientStateNumber|getCompatiblePylonMagazines|getConnectedUAV|getContainerMaxLoad|getCursorObjectParams|getCustomAimCoef|getDammage|getDescription|getDir|getDirVisual|getDLCAssetsUsage|getDLCAssetsUsageByName|getDLCs|getDLCUsageTime|getEditorCamera|getEditorMode|getEditorObjectScope|getElevationOffset|getEngineTargetRpmRTD|getEnvSoundController|getFatigue|getFieldManualStartPage|getForcedFlagTexture|getFriend|getFSMVariable|getFuelCargo|getGroupIcon|getGroupIconParams|getGroupIcons|getHideFrom|getHit|getHitIndex|getHitPointDamage|getItemCargo|getMagazineCargo|getMarkerColor|getMarkerPos|getMarkerSize|getMarkerType|getMass|getMissionConfig|getMissionConfigValue|getMissionDLCs|getMissionLayerEntities|getMissionLayers|getModelInfo|getMousePosition|getMusicPlayedTime|getNumber|getObjectArgument|getObjectChildren|getObjectDLC|getObjectMaterials|getObjectProxy|getObjectTextures|getObjectType|getObjectViewDistance|getOxygenRemaining|getPersonUsedDLCs|getPilotCameraDirection|getPilotCameraPosition|getPilotCameraRotation|getPilotCameraTarget|getPlateNumber|getPlayerChannel|getPlayerScores|getPlayerUID|getPlayerUIDOld|getPos|getPosASL|getPosASLVisual|getPosASLW|getPosATL|getPosATLVisual|getPosVisual|getPosWorld|getPylonMagazines|getRelDir|getRelPos|getRemoteSensorsDisabled|getRepairCargo|getResolution|getRotorBrakeRTD|getShadowDistance|getShotParents|getSlingLoad|getSoundController|getSoundControllerResult|getSpeed|getStamina|getStatValue|getSuppression|getTerrainGrid|getTerrainHeightASL|getText|getTotalDLCUsageTime|getTrimOffsetRTD|getUnitLoadout|getUnitTrait|getUserMFDText|getUserMFDValue|getVariable|getVehicleCargo|getWeaponCargo|getWeaponSway|getWingsOrientationRTD|getWingsPositionRTD|getWPPos|glanceAt|globalChat|globalRadio|goggles|group|groupChat|groupFromNetId|groupIconSelectable|groupIconsVisible|groupId|groupOwner|groupRadio|groupSelectedUnits|groupSelectUnit|grpNull|gunner|gusts|halt|handgunItems|handgunMagazine|handgunWeapon|handsHit|hasInterface|hasPilotCamera|hasWeapon|hcAllGroups|hcGroupParams|hcLeader|hcRemoveAllGroups|hcRemoveGroup|hcSelected|hcSelectGroup|hcSetGroup|hcShowBar|hcShownBar|headgear|hideBody|hideObject|hideObjectGlobal|hideSelection|hint|hintC|hintCadet|hintSilent|hmd|hostMission|htmlLoad|HUDMovementLevels|humidity|image|importAllGroups|importance|in|inArea|inAreaArray|incapacitatedState|independent|inflame|inflamed|infoPanel|infoPanelComponentEnabled|infoPanelComponents|infoPanels|inGameUISetEventHandler|inheritsFrom|initAmbientLife|inPolygon|inputAction|inRangeOfArtillery|insertEditorObject|intersect|is3DEN|is3DENMultiplayer|isAbleToBreathe|isAgent|isAimPrecisionEnabled|isArray|isAutoHoverOn|isAutonomous|isAutoStartUpEnabledRTD|isAutotest|isAutoTrimOnRTD|isBleeding|isBurning|isClass|isCollisionLightOn|isCopilotEnabled|isDamageAllowed|isDedicated|isDLCAvailable|isEngineOn|isEqualTo|isEqualType|isEqualTypeAll|isEqualTypeAny|isEqualTypeArray|isEqualTypeParams|isFilePatchingEnabled|isFlashlightOn|isFlatEmpty|isForcedWalk|isFormationLeader|isGroupDeletedWhenEmpty|isHidden|isInRemainsCollector|isInstructorFigureEnabled|isIRLaserOn|isKeyActive|isKindOf|isLaserOn|isLightOn|isLocalized|isManualFire|isMarkedForCollection|isMultiplayer|isMultiplayerSolo|isNil|isNull|isNumber|isObjectHidden|isObjectRTD|isOnRoad|isPipEnabled|isPlayer|isRealTime|isRemoteExecuted|isRemoteExecutedJIP|isServer|isShowing3DIcons|isSimpleObject|isSprintAllowed|isStaminaEnabled|isSteamMission|isStreamFriendlyUIEnabled|isStressDamageEnabled|isText|isTouchingGround|isTurnedOut|isTutHintsEnabled|isUAVConnectable|isUAVConnected|isUIContext|isUniformAllowed|isVehicleCargo|isVehicleRadarOn|isVehicleSensorEnabled|isWalking|isWeaponDeployed|isWeaponRested|itemCargo|items|itemsWithMagazines|join|joinAs|joinAsSilent|joinSilent|joinString|kbAddDatabase|kbAddDatabaseTargets|kbAddTopic|kbHasTopic|kbReact|kbRemoveTopic|kbTell|kbWasSaid|keyImage|keyName|knowsAbout|land|landAt|landResult|language|laserTarget|lbAdd|lbClear|lbColor|lbColorRight|lbCurSel|lbData|lbDelete|lbIsSelected|lbPicture|lbPictureRight|lbSelection|lbSetColor|lbSetColorRight|lbSetCurSel|lbSetData|lbSetPicture|lbSetPictureColor|lbSetPictureColorDisabled|lbSetPictureColorSelected|lbSetPictureRight|lbSetPictureRightColor|lbSetPictureRightColorDisabled|lbSetPictureRightColorSelected|lbSetSelectColor|lbSetSelectColorRight|lbSetSelected|lbSetText|lbSetTextRight|lbSetTooltip|lbSetValue|lbSize|lbSort|lbSortByValue|lbText|lbTextRight|lbValue|leader|leaderboardDeInit|leaderboardGetRows|leaderboardInit|leaderboardRequestRowsFriends|leaderboardRequestRowsGlobal|leaderboardRequestRowsGlobalAroundUser|leaderboardsRequestUploadScore|leaderboardsRequestUploadScoreKeepBest|leaderboardState|leaveVehicle|libraryCredits|libraryDisclaimers|lifeState|lightAttachObject|lightDetachObject|lightIsOn|lightnings|limitSpeed|linearConversion|lineBreak|lineIntersects|lineIntersectsObjs|lineIntersectsSurfaces|lineIntersectsWith|linkItem|list|listObjects|listRemoteTargets|listVehicleSensors|ln|lnbAddArray|lnbAddColumn|lnbAddRow|lnbClear|lnbColor|lnbColorRight|lnbCurSelRow|lnbData|lnbDeleteColumn|lnbDeleteRow|lnbGetColumnsPosition|lnbPicture|lnbPictureRight|lnbSetColor|lnbSetColorRight|lnbSetColumnsPos|lnbSetCurSelRow|lnbSetData|lnbSetPicture|lnbSetPictureColor|lnbSetPictureColorRight|lnbSetPictureColorSelected|lnbSetPictureColorSelectedRight|lnbSetPictureRight|lnbSetText|lnbSetTextRight|lnbSetValue|lnbSize|lnbSort|lnbSortByValue|lnbText|lnbTextRight|lnbValue|load|loadAbs|loadBackpack|loadFile|loadGame|loadIdentity|loadMagazine|loadOverlay|loadStatus|loadUniform|loadVest|local|localize|locationNull|locationPosition|lock|lockCameraTo|lockCargo|lockDriver|locked|lockedCargo|lockedDriver|lockedTurret|lockIdentity|lockTurret|lockWP|log|logEntities|logNetwork|logNetworkTerminate|lookAt|lookAtPos|magazineCargo|magazines|magazinesAllTurrets|magazinesAmmo|magazinesAmmoCargo|magazinesAmmoFull|magazinesDetail|magazinesDetailBackpack|magazinesDetailUniform|magazinesDetailVest|magazinesTurret|magazineTurretAmmo|mapAnimAdd|mapAnimClear|mapAnimCommit|mapAnimDone|mapCenterOnCamera|mapGridPosition|markAsFinishedOnSteam|markerAlpha|markerBrush|markerColor|markerDir|markerPos|markerShape|markerSize|markerText|markerType|max|members|menuAction|menuAdd|menuChecked|menuClear|menuCollapse|menuData|menuDelete|menuEnable|menuEnabled|menuExpand|menuHover|menuPicture|menuSetAction|menuSetCheck|menuSetData|menuSetPicture|menuSetValue|menuShortcut|menuShortcutText|menuSize|menuSort|menuText|menuURL|menuValue|min|mineActive|mineDetectedBy|missionConfigFile|missionDifficulty|missionName|missionNamespace|missionStart|missionVersion|modelToWorld|modelToWorldVisual|modelToWorldVisualWorld|modelToWorldWorld|modParams|moonIntensity|moonPhase|morale|move|move3DENCamera|moveInAny|moveInCargo|moveInCommander|moveInDriver|moveInGunner|moveInTurret|moveObjectToEnd|moveOut|moveTime|moveTo|moveToCompleted|moveToFailed|musicVolume|name|nameSound|nearEntities|nearestBuilding|nearestLocation|nearestLocations|nearestLocationWithDubbing|nearestObject|nearestObjects|nearestTerrainObjects|nearObjects|nearObjectsReady|nearRoads|nearSupplies|nearTargets|needReload|netId|netObjNull|newOverlay|nextMenuItemIndex|nextWeatherChange|nMenuItems|numberOfEnginesRTD|numberToDate|objectCurators|objectFromNetId|objectParent|objNull|objStatus|onBriefingGear|onBriefingGroup|onBriefingNotes|onBriefingPlan|onBriefingTeamSwitch|onCommandModeChanged|onDoubleClick|onEachFrame|onGroupIconClick|onGroupIconOverEnter|onGroupIconOverLeave|onHCGroupSelectionChanged|onMapSingleClick|onPlayerConnected|onPlayerDisconnected|onPreloadFinished|onPreloadStarted|onShowNewObject|onTeamSwitch|openCuratorInterface|openDLCPage|openDSInterface|openMap|openSteamApp|openYoutubeVideo|opfor|orderGetIn|overcast|overcastForecast|owner|param|params|parseNumber|parseSimpleArray|parseText|parsingNamespace|particlesQuality|pi|pickWeaponPool|pitch|pixelGrid|pixelGridBase|pixelGridNoUIScale|pixelH|pixelW|playableSlotsNumber|playableUnits|playAction|playActionNow|player|playerRespawnTime|playerSide|playersNumber|playGesture|playMission|playMove|playMoveNow|playMusic|playScriptedMission|playSound|playSound3D|position|positionCameraToWorld|posScreenToWorld|posWorldToScreen|ppEffectAdjust|ppEffectCommit|ppEffectCommitted|ppEffectCreate|ppEffectDestroy|ppEffectEnable|ppEffectEnabled|ppEffectForceInNVG|precision|preloadCamera|preloadObject|preloadSound|preloadTitleObj|preloadTitleRsc|primaryWeapon|primaryWeaponItems|primaryWeaponMagazine|priority|processDiaryLink|processInitCommands|productVersion|profileName|profileNamespace|profileNameSteam|progressLoadingScreen|progressPosition|progressSetPosition|publicVariable|publicVariableClient|publicVariableServer|pushBack|pushBackUnique|putWeaponPool|queryItemsPool|queryMagazinePool|queryWeaponPool|rad|radioChannelAdd|radioChannelCreate|radioChannelRemove|radioChannelSetCallSign|radioChannelSetLabel|radioVolume|rain|rainbow|random|rank|rankId|rating|rectangular|registeredTasks|registerTask|reload|reloadEnabled|remoteControl|remoteExec|remoteExecCall|remoteExecutedOwner|remove3DENConnection|remove3DENEventHandler|remove3DENLayer|removeAction|removeAll3DENEventHandlers|removeAllActions|removeAllAssignedItems|removeAllContainers|removeAllCuratorAddons|removeAllCuratorCameraAreas|removeAllCuratorEditingAreas|removeAllEventHandlers|removeAllHandgunItems|removeAllItems|removeAllItemsWithMagazines|removeAllMissionEventHandlers|removeAllMPEventHandlers|removeAllMusicEventHandlers|removeAllOwnedMines|removeAllPrimaryWeaponItems|removeAllWeapons|removeBackpack|removeBackpackGlobal|removeCuratorAddons|removeCuratorCameraArea|removeCuratorEditableObjects|removeCuratorEditingArea|removeDrawIcon|removeDrawLinks|removeEventHandler|removeFromRemainsCollector|removeGoggles|removeGroupIcon|removeHandgunItem|removeHeadgear|removeItem|removeItemFromBackpack|removeItemFromUniform|removeItemFromVest|removeItems|removeMagazine|removeMagazineGlobal|removeMagazines|removeMagazinesTurret|removeMagazineTurret|removeMenuItem|removeMissionEventHandler|removeMPEventHandler|removeMusicEventHandler|removeOwnedMine|removePrimaryWeaponItem|removeSecondaryWeaponItem|removeSimpleTask|removeSwitchableUnit|removeTeamMember|removeUniform|removeVest|removeWeapon|removeWeaponAttachmentCargo|removeWeaponCargo|removeWeaponGlobal|removeWeaponTurret|reportRemoteTarget|requiredVersion|resetCamShake|resetSubgroupDirection|resistance|resize|resources|respawnVehicle|restartEditorCamera|reveal|revealMine|reverse|reversedMouseY|roadAt|roadsConnectedTo|roleDescription|ropeAttachedObjects|ropeAttachedTo|ropeAttachEnabled|ropeAttachTo|ropeCreate|ropeCut|ropeDestroy|ropeDetach|ropeEndPosition|ropeLength|ropes|ropeUnwind|ropeUnwound|rotorsForcesRTD|rotorsRpmRTD|round|runInitScript|safeZoneH|safeZoneW|safeZoneWAbs|safeZoneX|safeZoneXAbs|safeZoneY|save3DENInventory|saveGame|saveIdentity|saveJoysticks|saveOverlay|saveProfileNamespace|saveStatus|saveVar|savingEnabled|say|say2D|say3D|score|scoreSide|screenshot|screenToWorld|scriptDone|scriptName|scriptNull|scudState|secondaryWeapon|secondaryWeaponItems|secondaryWeaponMagazine|select|selectBestPlaces|selectDiarySubject|selectedEditorObjects|selectEditorObject|selectionNames|selectionPosition|selectLeader|selectMax|selectMin|selectNoPlayer|selectPlayer|selectRandom|selectRandomWeighted|selectWeapon|selectWeaponTurret|sendAUMessage|sendSimpleCommand|sendTask|sendTaskResult|sendUDPMessage|serverCommand|serverCommandAvailable|serverCommandExecutable|serverName|serverTime|set|set3DENAttribute|set3DENAttributes|set3DENGrid|set3DENIconsVisible|set3DENLayer|set3DENLinesVisible|set3DENLogicType|set3DENMissionAttribute|set3DENMissionAttributes|set3DENModelsVisible|set3DENObjectType|set3DENSelected|setAccTime|setActualCollectiveRTD|setAirplaneThrottle|setAirportSide|setAmmo|setAmmoCargo|setAmmoOnPylon|setAnimSpeedCoef|setAperture|setApertureNew|setArmoryPoints|setAttributes|setAutonomous|setBehaviour|setBleedingRemaining|setBrakesRTD|setCameraInterest|setCamShakeDefParams|setCamShakeParams|setCamUseTI|setCaptive|setCenterOfMass|setCollisionLight|setCombatMode|setCompassOscillation|setConvoySeparation|setCuratorCameraAreaCeiling|setCuratorCoef|setCuratorEditingAreaType|setCuratorWaypointCost|setCurrentChannel|setCurrentTask|setCurrentWaypoint|setCustomAimCoef|setCustomWeightRTD|setDamage|setDammage|setDate|setDebriefingText|setDefaultCamera|setDestination|setDetailMapBlendPars|setDir|setDirection|setDrawIcon|setDriveOnPath|setDropInterval|setDynamicSimulationDistance|setDynamicSimulationDistanceCoef|setEditorMode|setEditorObjectScope|setEffectCondition|setEngineRpmRTD|setFace|setFaceAnimation|setFatigue|setFeatureType|setFlagAnimationPhase|setFlagOwner|setFlagSide|setFlagTexture|setFog|setForceGeneratorRTD|setFormation|setFormationTask|setFormDir|setFriend|setFromEditor|setFSMVariable|setFuel|setFuelCargo|setGroupIcon|setGroupIconParams|setGroupIconsSelectable|setGroupIconsVisible|setGroupId|setGroupIdGlobal|setGroupOwner|setGusts|setHideBehind|setHit|setHitIndex|setHitPointDamage|setHorizonParallaxCoef|setHUDMovementLevels|setIdentity|setImportance|setInfoPanel|setLeader|setLightAmbient|setLightAttenuation|setLightBrightness|setLightColor|setLightDayLight|setLightFlareMaxDistance|setLightFlareSize|setLightIntensity|setLightnings|setLightUseFlare|setLocalWindParams|setMagazineTurretAmmo|setMarkerAlpha|setMarkerAlphaLocal|setMarkerBrush|setMarkerBrushLocal|setMarkerColor|setMarkerColorLocal|setMarkerDir|setMarkerDirLocal|setMarkerPos|setMarkerPosLocal|setMarkerShape|setMarkerShapeLocal|setMarkerSize|setMarkerSizeLocal|setMarkerText|setMarkerTextLocal|setMarkerType|setMarkerTypeLocal|setMass|setMimic|setMousePosition|setMusicEffect|setMusicEventHandler|setName|setNameSound|setObjectArguments|setObjectMaterial|setObjectMaterialGlobal|setObjectProxy|setObjectTexture|setObjectTextureGlobal|setObjectViewDistance|setOvercast|setOwner|setOxygenRemaining|setParticleCircle|setParticleClass|setParticleFire|setParticleParams|setParticleRandom|setPilotCameraDirection|setPilotCameraRotation|setPilotCameraTarget|setPilotLight|setPiPEffect|setPitch|setPlateNumber|setPlayable|setPlayerRespawnTime|setPos|setPosASL|setPosASL2|setPosASLW|setPosATL|setPosition|setPosWorld|setPylonLoadOut|setPylonsPriority|setRadioMsg|setRain|setRainbow|setRandomLip|setRank|setRectangular|setRepairCargo|setRotorBrakeRTD|setShadowDistance|setShotParents|setSide|setSimpleTaskAlwaysVisible|setSimpleTaskCustomData|setSimpleTaskDescription|setSimpleTaskDestination|setSimpleTaskTarget|setSimpleTaskType|setSimulWeatherLayers|setSize|setSkill|setSlingLoad|setSoundEffect|setSpeaker|setSpeech|setSpeedMode|setStamina|setStaminaScheme|setStatValue|setSuppression|setSystemOfUnits|setTargetAge|setTaskMarkerOffset|setTaskResult|setTaskState|setTerrainGrid|setText|setTimeMultiplier|setTitleEffect|setToneMapping|setToneMappingParams|setTrafficDensity|setTrafficDistance|setTrafficGap|setTrafficSpeed|setTriggerActivation|setTriggerArea|setTriggerStatements|setTriggerText|setTriggerTimeout|setTriggerType|setType|setUnconscious|setUnitAbility|setUnitLoadout|setUnitPos|setUnitPosWeak|setUnitRank|setUnitRecoilCoefficient|setUnitTrait|setUnloadInCombat|setUserActionText|setUserMFDText|setUserMFDValue|setVariable|setVectorDir|setVectorDirAndUp|setVectorUp|setVehicleAmmo|setVehicleAmmoDef|setVehicleArmor|setVehicleCargo|setVehicleId|setVehicleInit|setVehicleLock|setVehiclePosition|setVehicleRadar|setVehicleReceiveRemoteTargets|setVehicleReportOwnPosition|setVehicleReportRemoteTargets|setVehicleTIPars|setVehicleVarName|setVelocity|setVelocityModelSpace|setVelocityTransformation|setViewDistance|setVisibleIfTreeCollapsed|setWantedRpmRTD|setWaves|setWaypointBehaviour|setWaypointCombatMode|setWaypointCompletionRadius|setWaypointDescription|setWaypointForceBehaviour|setWaypointFormation|setWaypointHousePosition|setWaypointLoiterRadius|setWaypointLoiterType|setWaypointName|setWaypointPosition|setWaypointScript|setWaypointSpeed|setWaypointStatements|setWaypointTimeout|setWaypointType|setWaypointVisible|setWeaponReloadingTime|setWind|setWindDir|setWindForce|setWindStr|setWingForceScaleRTD|setWPPos|show3DIcons|showChat|showCinemaBorder|showCommandingMenu|showCompass|showCuratorCompass|showGPS|showHUD|showLegend|showMap|shownArtilleryComputer|shownChat|shownCompass|shownCuratorCompass|showNewEditorObject|shownGPS|shownHUD|shownMap|shownPad|shownRadio|shownScoretable|shownUAVFeed|shownWarrant|shownWatch|showPad|showRadio|showScoretable|showSubtitles|showUAVFeed|showWarrant|showWatch|showWaypoint|showWaypoints|side|sideAmbientLife|sideChat|sideEmpty|sideEnemy|sideFriendly|sideLogic|sideRadio|sideUnknown|simpleTasks|simulationEnabled|simulCloudDensity|simulCloudOcclusion|simulInClouds|simulWeatherSync|sin|size|sizeOf|skill|skillFinal|skipTime|sleep|sliderPosition|sliderRange|sliderSetPosition|sliderSetRange|sliderSetSpeed|sliderSpeed|slingLoadAssistantShown|soldierMagazines|someAmmo|sort|soundVolume|speaker|speed|speedMode|splitString|sqrt|squadParams|stance|startLoadingScreen|stop|stopEngineRTD|stopped|str|sunOrMoon|supportInfo|suppressFor|surfaceIsWater|surfaceNormal|surfaceType|swimInDepth|switchableUnits|switchAction|switchCamera|switchGesture|switchLight|switchMove|synchronizedObjects|synchronizedTriggers|synchronizedWaypoints|synchronizeObjectsAdd|synchronizeObjectsRemove|synchronizeTrigger|synchronizeWaypoint|systemChat|systemOfUnits|tan|targetKnowledge|targets|targetsAggregate|targetsQuery|taskAlwaysVisible|taskChildren|taskCompleted|taskCustomData|taskDescription|taskDestination|taskHint|taskMarkerOffset|taskNull|taskParent|taskResult|taskState|taskType|teamMember|teamMemberNull|teamName|teams|teamSwitch|teamSwitchEnabled|teamType|terminate|terrainIntersect|terrainIntersectASL|terrainIntersectAtASL|text|textLog|textLogFormat|tg|time|timeMultiplier|titleCut|titleFadeOut|titleObj|titleRsc|titleText|toArray|toFixed|toLower|toString|toUpper|triggerActivated|triggerActivation|triggerArea|triggerAttachedVehicle|triggerAttachObject|triggerAttachVehicle|triggerDynamicSimulation|triggerStatements|triggerText|triggerTimeout|triggerTimeoutCurrent|triggerType|turretLocal|turretOwner|turretUnit|tvAdd|tvClear|tvCollapse|tvCollapseAll|tvCount|tvCurSel|tvData|tvDelete|tvExpand|tvExpandAll|tvPicture|tvPictureRight|tvSetColor|tvSetCurSel|tvSetData|tvSetPicture|tvSetPictureColor|tvSetPictureColorDisabled|tvSetPictureColorSelected|tvSetPictureRight|tvSetPictureRightColor|tvSetPictureRightColorDisabled|tvSetPictureRightColorSelected|tvSetSelectColor|tvSetText|tvSetTooltip|tvSetValue|tvSort|tvSortByValue|tvText|tvTooltip|tvValue|type|typeName|typeOf|UAVControl|uiNamespace|uiSleep|unassignCurator|unassignItem|unassignTeam|unassignVehicle|underwater|uniform|uniformContainer|uniformItems|uniformMagazines|unitAddons|unitAimPosition|unitAimPositionVisual|unitBackpack|unitIsUAV|unitPos|unitReady|unitRecoilCoefficient|units|unitsBelowHeight|unlinkItem|unlockAchievement|unregisterTask|updateDrawIcon|updateMenuItem|updateObjectTree|useAIOperMapObstructionTest|useAISteeringComponent|useAudioTimeForMoves|userInputDisabled|vectorAdd|vectorCos|vectorCrossProduct|vectorDiff|vectorDir|vectorDirVisual|vectorDistance|vectorDistanceSqr|vectorDotProduct|vectorFromTo|vectorMagnitude|vectorMagnitudeSqr|vectorModelToWorld|vectorModelToWorldVisual|vectorMultiply|vectorNormalized|vectorUp|vectorUpVisual|vectorWorldToModel|vectorWorldToModelVisual|vehicle|vehicleCargoEnabled|vehicleChat|vehicleRadio|vehicleReceiveRemoteTargets|vehicleReportOwnPosition|vehicleReportRemoteTargets|vehicles|vehicleVarName|velocity|velocityModelSpace|verifySignature|vest|vestContainer|vestItems|vestMagazines|viewDistance|visibleCompass|visibleGPS|visibleMap|visiblePosition|visiblePositionASL|visibleScoretable|visibleWatch|waitUntil|waves|waypointAttachedObject|waypointAttachedVehicle|waypointAttachObject|waypointAttachVehicle|waypointBehaviour|waypointCombatMode|waypointCompletionRadius|waypointDescription|waypointForceBehaviour|waypointFormation|waypointHousePosition|waypointLoiterRadius|waypointLoiterType|waypointName|waypointPosition|waypoints|waypointScript|waypointsEnabledUAV|waypointShow|waypointSpeed|waypointStatements|waypointTimeout|waypointTimeoutCurrent|waypointType|waypointVisible|weaponAccessories|weaponAccessoriesCargo|weaponCargo|weaponDirection|weaponInertia|weaponLowered|weapons|weaponsItems|weaponsItemsCargo|weaponState|weaponsTurret|weightRTD|west|WFSideText|wind|windDir|windRTD|windStr|wingsForcesRTD|worldName|worldSize|worldToModel|worldToModelVisual|worldToScreen)\b/i,number:/(?:\$|\b0x)[\da-f]+\b|(?:\B\.\d+|\b\d+(?:\.\d+)?)(?:e[+-]?\d+)?\b/i,operator:/##|>>|&&|\|\||[!=<>]=?|[-+*/%#^]|\b(?:and|mod|not|or)\b/i,"magic-variable":{pattern:/\b(?:this|thisList|thisTrigger|_exception|_fnc_scriptName|_fnc_scriptNameParent|_forEachIndex|_this|_thisEventHandler|_thisFSM|_thisScript|_x)\b/i,alias:"keyword"},constant:/\bDIK(?:_[a-z\d]+)+\b/i}),e.languages.insertBefore("sqf","string",{macro:{pattern:/(^[ \t]*)#[a-z](?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{directive:{pattern:/#[a-z]+\b/i,alias:"keyword"},comment:e.languages.sqf.comment}}}),delete e.languages.sqf["class-name"]}function kF(e){e.register(vF),e.languages.squirrel=e.languages.extend("clike",{comment:[e.languages.clike.comment[0],{pattern:/(^|[^\\:])(?:\/\/|#).*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^\\"'@])(?:@"(?:[^"]|"")*"(?!")|"(?:[^\\\r\n"]|\\.)*")/,lookbehind:!0,greedy:!0},"class-name":{pattern:/(\b(?:class|enum|extends|instanceof)\s+)\w+(?:\.\w+)*/,lookbehind:!0,inside:{punctuation:/\./}},keyword:/\b(?:__FILE__|__LINE__|base|break|case|catch|class|clone|const|constructor|continue|default|delete|else|enum|extends|for|foreach|function|if|in|instanceof|local|null|resume|return|static|switch|this|throw|try|typeof|while|yield)\b/,number:/\b(?:0x[0-9a-fA-F]+|\d+(?:\.(?:\d+|[eE][+-]?\d+))?)\b/,operator:/\+\+|--|<=>|<[-<]|>>>?|&&?|\|\|?|[-+*/%!=<>]=?|[~^]|::?/,punctuation:/[(){}\[\],;.]/}),e.languages.insertBefore("squirrel","string",{char:{pattern:/(^|[^\\"'])'(?:[^\\']|\\(?:[xuU][0-9a-fA-F]{0,8}|[\s\S]))'/,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("squirrel","operator",{"attribute-punctuation":{pattern:/<\/|\/>/,alias:"important"},lambda:{pattern:/@(?=\()/,alias:"operator"}})}function kU(e){var t;t=/\b(?:algebra_solver|algebra_solver_newton|integrate_1d|integrate_ode|integrate_ode_bdf|integrate_ode_rk45|map_rect|ode_(?:adams|bdf|ckrk|rk45)(?:_tol)?|ode_adjoint_tol_ctl|reduce_sum|reduce_sum_static)\b/,e.languages.stan={comment:/\/\/.*|\/\*[\s\S]*?\*\/|#(?!include).*/,string:{pattern:/"[\x20\x21\x23-\x5B\x5D-\x7E]*"/,greedy:!0},directive:{pattern:/^([ \t]*)#include\b.*/m,lookbehind:!0,alias:"property"},"function-arg":{pattern:RegExp("("+t.source+/\s*\(\s*/.source+")"+/[a-zA-Z]\w*/.source),lookbehind:!0,alias:"function"},constraint:{pattern:/(\b(?:int|matrix|real|row_vector|vector)\s*)<[^<>]*>/,lookbehind:!0,inside:{expression:{pattern:/(=\s*)\S(?:\S|\s+(?!\s))*?(?=\s*(?:>$|,\s*\w+\s*=))/,lookbehind:!0,inside:null},property:/\b[a-z]\w*(?=\s*=)/i,operator:/=/,punctuation:/^<|>$|,/}},keyword:[{pattern:/\bdata(?=\s*\{)|\b(?:functions|generated|model|parameters|quantities|transformed)\b/,alias:"program-block"},/\b(?:array|break|cholesky_factor_corr|cholesky_factor_cov|complex|continue|corr_matrix|cov_matrix|data|else|for|if|in|increment_log_prob|int|matrix|ordered|positive_ordered|print|real|reject|return|row_vector|simplex|target|unit_vector|vector|void|while)\b/,t],function:/\b[a-z]\w*(?=\s*\()/i,number:/(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:E[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,boolean:/\b(?:false|true)\b/,operator:/<-|\.[*/]=?|\|\|?|&&|[!=<>+\-*/]=?|['^%~?:]/,punctuation:/[()\[\]{},;]/},e.languages.stan.constraint.inside.expression.inside=e.languages.stan}function kB(e){e.register(SW),e.register(_b),e.register(ki),e.languages.stata={comment:[{pattern:/(^[ \t]*)\*.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|\s)\/\/.*|\/\*[\s\S]*?\*\//,lookbehind:!0,greedy:!0}],"string-literal":{pattern:/"[^"\r\n]*"|[‘`']".*?"[’`']/,greedy:!0,inside:{interpolation:{pattern:/\$\{[^{}]*\}|[‘`']\w[^’`'\r\n]*[’`']/,inside:{punctuation:/^\$\{|\}$/,expression:{pattern:/[\s\S]+/,inside:null}}},string:/[\s\S]+/}},mata:{pattern:/(^[ \t]*mata[ \t]*:)[\s\S]+?(?=^end\b)/m,lookbehind:!0,greedy:!0,alias:"language-mata",inside:e.languages.mata},java:{pattern:/(^[ \t]*java[ \t]*:)[\s\S]+?(?=^end\b)/m,lookbehind:!0,greedy:!0,alias:"language-java",inside:e.languages.java},python:{pattern:/(^[ \t]*python[ \t]*:)[\s\S]+?(?=^end\b)/m,lookbehind:!0,greedy:!0,alias:"language-python",inside:e.languages.python},command:{pattern:/(^[ \t]*(?:\.[ \t]+)?(?:(?:bayes|bootstrap|by|bysort|capture|collect|fmm|fp|frame|jackknife|mfp|mi|nestreg|noisily|permute|quietly|rolling|simulate|statsby|stepwise|svy|version|xi)\b[^:\r\n]*:[ \t]*|(?:capture|noisily|quietly|version)[ \t]+)?)[a-zA-Z]\w*/m,lookbehind:!0,greedy:!0,alias:"keyword"},variable:/\$\w+|[‘`']\w[^’`'\r\n]*[’`']/,keyword:/\b(?:bayes|bootstrap|by|bysort|capture|clear|collect|fmm|fp|frame|if|in|jackknife|mi[ \t]+estimate|mfp|nestreg|noisily|of|permute|quietly|rolling|simulate|sort|statsby|stepwise|svy|varlist|version|xi)\b/,boolean:/\b(?:off|on)\b/,number:/\b\d+(?:\.\d+)?\b|\B\.\d+/,function:/\b[a-z_]\w*(?=\()/i,operator:/\+\+|--|##?|[<>!=~]=?|[+\-*^&|/]/,punctuation:/[(){}[\],:]/},e.languages.stata["string-literal"].inside.interpolation.inside.expression.inside=e.languages.stata}function kz(e){e.languages.iecst={comment:[{pattern:/(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\(\*[\s\S]*?(?:\*\)|$)|\{[\s\S]*?(?:\}|$))/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:[/\b(?:END_)?(?:PROGRAM|CONFIGURATION|INTERFACE|FUNCTION_BLOCK|FUNCTION|ACTION|TRANSITION|TYPE|STRUCT|(?:INITIAL_)?STEP|NAMESPACE|LIBRARY|CHANNEL|FOLDER|RESOURCE|VAR_(?:ACCESS|CONFIG|EXTERNAL|GLOBAL|INPUT|IN_OUT|OUTPUT|TEMP)|VAR|METHOD|PROPERTY)\b/i,/\b(?:AT|BY|(?:END_)?(?:CASE|FOR|IF|REPEAT|WHILE)|CONSTANT|CONTINUE|DO|ELSE|ELSIF|EXIT|EXTENDS|FROM|GET|GOTO|IMPLEMENTS|JMP|NON_RETAIN|OF|PRIVATE|PROTECTED|PUBLIC|RETAIN|RETURN|SET|TASK|THEN|TO|UNTIL|USING|WITH|__CATCH|__ENDTRY|__FINALLY|__TRY)\b/],"class-name":/\b(?:ANY|ARRAY|BOOL|BYTE|U?(?:D|L|S)?INT|(?:D|L)?WORD|DATE(?:_AND_TIME)?|DT|L?REAL|POINTER|STRING|TIME(?:_OF_DAY)?|TOD)\b/,address:{pattern:/%[IQM][XBWDL][\d.]*|%[IQ][\d.]*/,alias:"symbol"},number:/\b(?:16#[\da-f]+|2#[01_]+|0x[\da-f]+)\b|\b(?:D|DT|T|TOD)#[\d_shmd:]*|\b[A-Z]*#[\d.,_]*|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/,operator:/S?R?:?=>?|&&?|\*\*?|<[=>]?|>=?|[-:^/+#]|\b(?:AND|EQ|EXPT|GE|GT|LE|LT|MOD|NE|NOT|OR|XOR)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,punctuation:/[()[\].,;]/}}function kH(e){e.languages.supercollider={comment:{pattern:/\/\/.*|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\//,greedy:!0},string:{pattern:/(^|[^\\])"(?:[^"\\]|\\[\s\S])*"/,lookbehind:!0,greedy:!0},char:{pattern:/\$(?:[^\\\r\n]|\\.)/,greedy:!0},symbol:{pattern:/(^|[^\\])'(?:[^'\\]|\\[\s\S])*'|\\\w+/,lookbehind:!0,greedy:!0},keyword:/\b(?:_|arg|classvar|const|nil|var|while)\b/,boolean:/\b(?:false|true)\b/,label:{pattern:/\b[a-z_]\w*(?=\s*:)/,alias:"property"},number:/\b(?:inf|pi|0x[0-9a-fA-F]+|\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(?:pi)?|\d+r[0-9a-zA-Z]+(?:\.[0-9a-zA-Z]+)?|\d+[sb]{1,4}\d*)\b/,"class-name":/\b[A-Z]\w*\b/,operator:/\.{2,3}|#(?![[{])|&&|[!=]==?|\+>>|\+{1,3}|-[->]|=>|>>|\?\?|@\|?@|\|(?:@|[!=]=)?\||!\?|<[!=>]|\*{1,2}|<{2,3}\*?|[-!%&/<>?@|=`]/,punctuation:/[{}()[\].:,;]|#[[{]/},e.languages.sclang=e.languages.supercollider}function k$(e){e.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*")+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},e.languages.swift["string-literal"].forEach(function(t){t.inside.interpolation.inside=e.languages.swift})}function kG(e){var t,n;t={pattern:/^[;#].*/m,greedy:!0},n=/"(?:[^\r\n"\\]|\\(?:[^\r]|\r\n?))*"(?!\S)/.source,e.languages.systemd={comment:t,section:{pattern:/^\[[^\n\r\[\]]*\](?=[ \t]*$)/m,greedy:!0,inside:{punctuation:/^\[|\]$/,"section-name":{pattern:/[\s\S]+/,alias:"selector"}}},key:{pattern:/^[^\s=]+(?=[ \t]*=)/m,greedy:!0,alias:"attr-name"},value:{pattern:RegExp(/(=[ \t]*(?!\s))/.source+"(?:"+n+'|(?=[^"\r\n]))(?:'+(/[^\s\\]/.source+'|[ ]+(?:(?![ "])|'+n)+")|"+/\\[\r\n]+(?:[#;].*[\r\n]+)*(?![#;])/.source+")*"),lookbehind:!0,greedy:!0,alias:"attr-value",inside:{comment:t,quoted:{pattern:RegExp(/(^|\s)/.source+n),lookbehind:!0,greedy:!0},punctuation:/\\$/m,boolean:{pattern:/^(?:false|no|off|on|true|yes)$/,greedy:!0}}},punctuation:/=/}}function kq(e){function t(e,t,n){return{pattern:RegExp("<#"+e+"[\\s\\S]*?#>"),alias:"block",inside:{delimiter:{pattern:RegExp("^<#"+e+"|#>$"),alias:"important"},content:{pattern:/[\s\S]+/,inside:t,alias:n}}}}e.languages["t4-templating"]=Object.defineProperty({},"createT4",{value:function(n){var r=e.languages[n],a="language-"+n;return{block:{pattern:/<#[\s\S]+?#>/,inside:{directive:t("@",{"attr-value":{pattern:/=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/,inside:{punctuation:/^=|^["']|["']$/}},keyword:/\b\w+(?=\s)/,"attr-name":/\b\w+/}),expression:t("=",r,a),"class-feature":t("\\+",r,a),standard:t("",r,a)}}}}})}function kW(e){e.register(Te),e.register(kq),e.languages.t4=e.languages["t4-cs"]=e.languages["t4-templating"].createT4("csharp")}function kV(e){e.register(Tc),e.languages.vbnet=e.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/})}function kY(e){e.register(kq),e.register(kV),e.languages["t4-vb"]=e.languages["t4-templating"].createT4("vbnet")}function kK(e){e.register(v6),e.languages.tap={fail:/not ok[^#{\n\r]*/,pass:/ok[^#{\n\r]*/,pragma:/pragma [+-][a-z]+/,bailout:/bail out!.*/i,version:/TAP version \d+/i,plan:/\b\d+\.\.\d+(?: +#.*)?/,subtest:{pattern:/# Subtest(?:: .*)?/,greedy:!0},punctuation:/[{}]/,directive:/#.*/,yamlish:{pattern:/(^[ \t]*)---[\s\S]*?[\r\n][ \t]*\.\.\.$/m,lookbehind:!0,inside:e.languages.yaml,alias:"language-yaml"}}}function kX(e){e.languages.tcl={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:{pattern:/"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"/,greedy:!0},variable:[{pattern:/(\$)(?:::)?(?:[a-zA-Z0-9]+::)*\w+/,lookbehind:!0},{pattern:/(\$)\{[^}]+\}/,lookbehind:!0},{pattern:/(^[\t ]*set[ \t]+)(?:::)?(?:[a-zA-Z0-9]+::)*\w+/m,lookbehind:!0}],function:{pattern:/(^[\t ]*proc[ \t]+)\S+/m,lookbehind:!0},builtin:[{pattern:/(^[\t ]*)(?:break|class|continue|error|eval|exit|for|foreach|if|proc|return|switch|while)\b/m,lookbehind:!0},/\b(?:else|elseif)\b/],scope:{pattern:/(^[\t ]*)(?:global|upvar|variable)\b/m,lookbehind:!0,alias:"constant"},keyword:{pattern:/(^[\t ]*|\[)(?:Safe_Base|Tcl|after|append|apply|array|auto_(?:execok|import|load|mkindex|qualify|reset)|automkindex_old|bgerror|binary|catch|cd|chan|clock|close|concat|dde|dict|encoding|eof|exec|expr|fblocked|fconfigure|fcopy|file(?:event|name)?|flush|gets|glob|history|http|incr|info|interp|join|lappend|lassign|lindex|linsert|list|llength|load|lrange|lrepeat|lreplace|lreverse|lsearch|lset|lsort|math(?:func|op)|memory|msgcat|namespace|open|package|parray|pid|pkg_mkIndex|platform|puts|pwd|re_syntax|read|refchan|regexp|registry|regsub|rename|scan|seek|set|socket|source|split|string|subst|tcl(?:_endOfWord|_findLibrary|startOf(?:Next|Previous)Word|test|vars|wordBreak(?:After|Before))|tell|time|tm|trace|unknown|unload|unset|update|uplevel|vwait)\b/m,lookbehind:!0},operator:/!=?|\*\*?|==|&&?|\|\|?|<[=<]?|>[=>]?|[-+~\/%?^]|\b(?:eq|in|ne|ni)\b/,punctuation:/[{}()\[\]]/}}function kZ(e){e.register(vF),e.register(TV),e.languages.tt2=e.languages.extend("clike",{comment:/#.*|\[%#[\s\S]*?%\]/,keyword:/\b(?:BLOCK|CALL|CASE|CATCH|CLEAR|DEBUG|DEFAULT|ELSE|ELSIF|END|FILTER|FINAL|FOREACH|GET|IF|IN|INCLUDE|INSERT|LAST|MACRO|META|NEXT|PERL|PROCESS|RAWPERL|RETURN|SET|STOP|SWITCH|TAGS|THROW|TRY|UNLESS|USE|WHILE|WRAPPER)\b/,punctuation:/[[\]{},()]/}),e.languages.insertBefore("tt2","number",{operator:/=[>=]?|!=?|<=?|>=?|&&|\|\|?|\b(?:and|not|or)\b/,variable:{pattern:/\b[a-z]\w*(?:\s*\.\s*(?:\d+|\$?[a-z]\w*))*\b/i}}),e.languages.insertBefore("tt2","keyword",{delimiter:{pattern:/^(?:\[%|%%)-?|-?%\]$/,alias:"punctuation"}}),e.languages.insertBefore("tt2","string",{"single-quoted-string":{pattern:/'[^\\']*(?:\\[\s\S][^\\']*)*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"[^\\"]*(?:\\[\s\S][^\\"]*)*"/,greedy:!0,alias:"string",inside:{variable:{pattern:/\$(?:[a-z]\w*(?:\.(?:\d+|\$?[a-z]\w*))*)/i}}}}),delete e.languages.tt2.string,e.hooks.add("before-tokenize",function(t){e.languages["markup-templating"].buildPlaceholders(t,"tt2",/\[%[\s\S]+?%\]/g)}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"tt2")})}function kQ(e){var t=/(?:[\w-]+|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*")/.source;function n(e){return e.replace(/__/g,function(){return t})}e.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp(n(/(^[\t ]*\[\s*(?:\[\s*)?)__(?:\s*\.\s*__)*(?=\s*\])/.source),"m"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern:RegExp(n(/(^[\t ]*|[{,]\s*)__(?:\s*\.\s*__)*(?=\s*=)/.source),"m"),lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},date:[{pattern:/\b\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?\b/i,alias:"number"},{pattern:/\b\d{2}:\d{2}:\d{2}(?:\.\d+)?\b/,alias:"number"}],number:/(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\b\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?\b(?:inf|nan)\b/,boolean:/\b(?:false|true)\b/,punctuation:/[.,=[\]{}]/}}function kJ(e){var t;e.languages.tremor={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},"interpolated-string":null,extractor:{pattern:/\b[a-z_]\w*\|(?:[^\r\n\\|]|\\(?:\r\n|[\s\S]))*\|/i,greedy:!0,inside:{regex:{pattern:/(^re)\|[\s\S]+/,lookbehind:!0},function:/^\w+/,value:/\|[\s\S]+/}},identifier:{pattern:/`[^`]*`/,greedy:!0},function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())\b/,keyword:/\b(?:args|as|by|case|config|connect|connector|const|copy|create|default|define|deploy|drop|each|emit|end|erase|event|flow|fn|for|from|group|having|insert|into|intrinsic|let|links|match|merge|mod|move|of|operator|patch|pipeline|recur|script|select|set|sliding|state|stream|to|tumbling|update|use|when|where|window|with)\b/,boolean:/\b(?:false|null|true)\b/i,number:/\b(?:0b[01_]*|0x[0-9a-fA-F_]*|\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee][+-]?[\d_]+)?)\b/,"pattern-punctuation":{pattern:/%(?=[({[])/,alias:"punctuation"},operator:/[-+*\/%~!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?>?=?|(?:absent|and|not|or|present|xor)\b/,punctuation:/::|[;\[\]()\{\},.:]/},t=/#\{(?:[^"{}]|\{[^{}]*\}|"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*")*\}/.source,e.languages.tremor["interpolated-string"]={pattern:RegExp(/(^|[^\\])/.source+'(?:"""(?:'+/[^"\\#]|\\[\s\S]|"(?!"")|#(?!\{)/.source+"|"+t+')*"""|"(?:'+/[^"\\\r\n#]|\\(?:\r\n|[\s\S])|#(?!\{)/.source+"|"+t+')*")'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:RegExp(t),inside:{punctuation:/^#\{|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.tremor}}},string:/[\s\S]+/}},e.languages.troy=e.languages.tremor,e.languages.trickle=e.languages.tremor}function k0(e){var t;t=/\b(?:ACT|ACTIFSUB|CARRAY|CASE|CLEARGIF|COA|COA_INT|CONSTANTS|CONTENT|CUR|EDITPANEL|EFFECT|EXT|FILE|FLUIDTEMPLATE|FORM|FRAME|FRAMESET|GIFBUILDER|GMENU|GMENU_FOLDOUT|GMENU_LAYERS|GP|HMENU|HRULER|HTML|IENV|IFSUB|IMAGE|IMGMENU|IMGMENUITEM|IMGTEXT|IMG_RESOURCE|INCLUDE_TYPOSCRIPT|JSMENU|JSMENUITEM|LLL|LOAD_REGISTER|NO|PAGE|RECORDS|RESTORE_REGISTER|TEMPLATE|TEXT|TMENU|TMENUITEM|TMENU_LAYERS|USER|USER_INT|_GIFBUILDER|global|globalString|globalVar)\b/,e.languages.typoscript={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:= \t]|(?:^|[^= \t])[ \t]+)\/\/.*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^"'])#.*/,lookbehind:!0,greedy:!0}],function:[{pattern:/<INCLUDE_TYPOSCRIPT:\s*source\s*=\s*(?:"[^"\r\n]*"|'[^'\r\n]*')\s*>/,inside:{string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,inside:{keyword:t}},keyword:{pattern:/INCLUDE_TYPOSCRIPT/}}},{pattern:/@import\s*(?:"[^"\r\n]*"|'[^'\r\n]*')/,inside:{string:/"[^"\r\n]*"|'[^'\r\n]*'/}}],string:{pattern:/^([^=]*=[< ]?)(?:(?!\]\n).)*/,lookbehind:!0,inside:{function:/\{\$.*\}/,keyword:t,number:/^\d+$/,punctuation:/[,|:]/}},keyword:t,number:{pattern:/\b\d+\s*[.{=]/,inside:{operator:/[.{=]/}},tag:{pattern:/\.?[-\w\\]+\.?/,inside:{punctuation:/\./}},punctuation:/[{}[\];(),.:|]/,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/},e.languages.tsconfig=e.languages.typoscript}function k1(e){e.languages.unrealscript={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},category:{pattern:/(\b(?:(?:autoexpand|hide|show)categories|var)\s*\()[^()]+(?=\))/,lookbehind:!0,greedy:!0,alias:"property"},metadata:{pattern:/(\w\s*)<\s*\w+\s*=[^<>|=\r\n]+(?:\|\s*\w+\s*=[^<>|=\r\n]+)*>/,lookbehind:!0,greedy:!0,inside:{property:/\b\w+(?=\s*=)/,operator:/=/,punctuation:/[<>|]/}},macro:{pattern:/`\w+/,alias:"property"},"class-name":{pattern:/(\b(?:class|enum|extends|interface|state(?:\(\))?|struct|within)\s+)\w+/,lookbehind:!0},keyword:/\b(?:abstract|actor|array|auto|autoexpandcategories|bool|break|byte|case|class|classgroup|client|coerce|collapsecategories|config|const|continue|default|defaultproperties|delegate|dependson|deprecated|do|dontcollapsecategories|editconst|editinlinenew|else|enum|event|exec|export|extends|final|float|for|forcescriptorder|foreach|function|goto|guid|hidecategories|hidedropdown|if|ignores|implements|inherits|input|int|interface|iterator|latent|local|material|name|native|nativereplication|noexport|nontransient|noteditinlinenew|notplaceable|operator|optional|out|pawn|perobjectconfig|perobjectlocalized|placeable|postoperator|preoperator|private|protected|reliable|replication|return|server|showcategories|simulated|singular|state|static|string|struct|structdefault|structdefaultproperties|switch|texture|transient|travel|unreliable|until|var|vector|while|within)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/>>|<<|--|\+\+|\*\*|[-+*/~!=<>$@]=?|&&?|\|\|?|\^\^?|[?:%]|\b(?:ClockwiseFrom|Cross|Dot)\b/,punctuation:/[()[\]{};,.]/},e.languages.uc=e.languages.uscript=e.languages.unrealscript}function k2(e){e.languages.uorazor={"comment-hash":{pattern:/#.*/,alias:"comment",greedy:!0},"comment-slash":{pattern:/\/\/.*/,alias:"comment",greedy:!0},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,inside:{punctuation:/^['"]|['"]$/},greedy:!0},"source-layers":{pattern:/\b(?:arms|backpack|blue|bracelet|cancel|clear|cloak|criminal|earrings|enemy|facialhair|friend|friendly|gloves|gray|grey|ground|hair|head|innerlegs|innertorso|innocent|lefthand|middletorso|murderer|neck|nonfriendly|onehandedsecondary|outerlegs|outertorso|pants|red|righthand|ring|self|shirt|shoes|talisman|waist)\b/i,alias:"function"},"source-commands":{pattern:/\b(?:alliance|attack|cast|clearall|clearignore|clearjournal|clearlist|clearsysmsg|createlist|createtimer|dclick|dclicktype|dclickvar|dress|dressconfig|drop|droprelloc|emote|getlabel|guild|gumpclose|gumpresponse|hotkey|ignore|lasttarget|lift|lifttype|menu|menuresponse|msg|org|organize|organizer|overhead|pause|poplist|potion|promptresponse|pushlist|removelist|removetimer|rename|restock|say|scav|scavenger|script|setability|setlasttarget|setskill|settimer|setvar|sysmsg|target|targetloc|targetrelloc|targettype|undress|unignore|unsetvar|useobject|useonce|useskill|usetype|virtue|wait|waitforgump|waitformenu|waitforprompt|waitforstat|waitforsysmsg|waitfortarget|walk|wfsysmsg|wft|whisper|yell)\b/,alias:"function"},"tag-name":{pattern:/(^\{%-?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%]-?|-?[%}]\}$/,alias:"punctuation"},function:/\b(?:atlist|close|closest|count|counter|counttype|dead|dex|diffhits|diffmana|diffstam|diffweight|find|findbuff|finddebuff|findlayer|findtype|findtypelist|followers|gumpexists|hidden|hits|hp|hue|human|humanoid|ingump|inlist|insysmessage|insysmsg|int|invul|lhandempty|list|listexists|mana|maxhits|maxhp|maxmana|maxstam|maxweight|monster|mounted|name|next|noto|paralyzed|poisoned|position|prev|previous|queued|rand|random|rhandempty|skill|stam|str|targetexists|timer|timerexists|varexist|warmode|weight)\b/,keyword:/\b(?:and|as|break|continue|else|elseif|endfor|endif|endwhile|for|if|loop|not|or|replay|stop|while)\b/,boolean:/\b(?:false|null|true)\b/,number:/\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,operator:[{pattern:/(\s)(?:and|b-and|b-or|b-xor|ends with|in|is|matches|not|or|same as|starts with)(?=\s)/,lookbehind:!0},/[=<>]=?|!=|\*\*?|\/\/?|\?:?|[-+~%|]/],punctuation:/[()\[\]{}:.,]/}}function k3(e){var t;e.register(vF),t={pattern:/[\s\S]+/,inside:null},e.languages.v=e.languages.extend("clike",{string:{pattern:/r?(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,alias:"quoted-string",greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\{[^{}]*\}|\w+(?:\.\w+(?:\([^\(\)]*\))?|\[[^\[\]]+\])*)/,lookbehind:!0,inside:{"interpolation-variable":{pattern:/^\$\w[\s\S]*$/,alias:"variable"},"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},"interpolation-expression":t}}}},"class-name":{pattern:/(\b(?:enum|interface|struct|type)\s+)(?:C\.)?\w+/,lookbehind:!0},keyword:/(?:\b(?:__global|as|asm|assert|atomic|break|chan|const|continue|defer|else|embed|enum|fn|for|go(?:to)?|if|import|in|interface|is|lock|match|module|mut|none|or|pub|return|rlock|select|shared|sizeof|static|struct|type(?:of)?|union|unsafe)|\$(?:else|for|if)|#(?:flag|include))\b/,number:/\b(?:0x[a-f\d]+(?:_[a-f\d]+)*|0b[01]+(?:_[01]+)*|0o[0-7]+(?:_[0-7]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?)\b/i,operator:/~|\?|[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\.?/,builtin:/\b(?:any(?:_float|_int)?|bool|byte(?:ptr)?|charptr|f(?:32|64)|i(?:8|16|64|128|nt)|rune|size_t|string|u(?:16|32|64|128)|voidptr)\b/}),t.inside=e.languages.v,e.languages.insertBefore("v","string",{char:{pattern:/`(?:\\`|\\?[^`]{1,2})`/,alias:"rune"}}),e.languages.insertBefore("v","operator",{attribute:{pattern:/(^[\t ]*)\[(?:deprecated|direct_array_access|flag|inline|live|ref_only|typedef|unsafe_fn|windows_stdcall)\]/m,lookbehind:!0,alias:"annotation",inside:{punctuation:/[\[\]]/,keyword:/\w+/}},generic:{pattern:/<\w+>(?=\s*[\)\{])/,inside:{punctuation:/[<>]/,"class-name":/\w+/}}}),e.languages.insertBefore("v","function",{"generic-function":{pattern:/\b\w+\s*<\w+>(?=\()/,inside:{function:/^\w+/,generic:{pattern:/<\w+>/,inside:e.languages.v.generic.inside}}}})}function k4(e){e.register(vF),e.languages.vala=e.languages.extend("clike",{"class-name":[{pattern:/\b[A-Z]\w*(?:\.\w+)*\b(?=(?:\?\s+|\*?\s+\*?)\w)/,inside:{punctuation:/\./}},{pattern:/(\[)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/(\b(?:class|interface)\s+[A-Z]\w*(?:\.\w+)*\s*:\s*)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/((?:\b(?:class|enum|interface|new|struct)\s+)|(?:catch\s+\())[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}}],keyword:/\b(?:abstract|as|assert|async|base|bool|break|case|catch|char|class|const|construct|continue|default|delegate|delete|do|double|dynamic|else|ensures|enum|errordomain|extern|finally|float|for|foreach|get|if|in|inline|int|int16|int32|int64|int8|interface|internal|is|lock|long|namespace|new|null|out|override|owned|params|private|protected|public|ref|requires|return|set|short|signal|sizeof|size_t|ssize_t|static|string|struct|switch|this|throw|throws|try|typeof|uchar|uint|uint16|uint32|uint64|uint8|ulong|unichar|unowned|ushort|using|value|var|virtual|void|volatile|weak|while|yield)\b/i,function:/\b\w+(?=\s*\()/,number:/(?:\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)(?:f|u?l?)?/i,operator:/\+\+|--|&&|\|\||<<=?|>>=?|=>|->|~|[+\-*\/%&^|=!<>]=?|\?\??|\.\.\./,punctuation:/[{}[\];(),.:]/,constant:/\b[A-Z0-9_]+\b/}),e.languages.insertBefore("vala","string",{"raw-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},"template-string":{pattern:/@"[\s\S]*?"/,greedy:!0,inside:{interpolation:{pattern:/\$(?:\([^)]*\)|[a-zA-Z]\w*)/,inside:{delimiter:{pattern:/^\$\(?|\)$/,alias:"punctuation"},rest:e.languages.vala}},string:/[\s\S]+/}}}),e.languages.insertBefore("vala","keyword",{regex:{pattern:/\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[imsx]{0,4}(?=\s*(?:$|[\r\n,.;})\]]))/,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\//,"regex-flags":/^[a-z]+$/}}})}function k5(e){var t;e.register(vP),e.languages.velocity=e.languages.extend("markup",{}),(t={variable:{pattern:/(^|[^\\](?:\\\\)*)\$!?(?:[a-z][\w-]*(?:\([^)]*\))?(?:\.[a-z][\w-]*(?:\([^)]*\))?|\[[^\]]+\])*|\{[^}]+\})/i,lookbehind:!0,inside:{}},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},number:/\b\d+\b/,boolean:/\b(?:false|true)\b/,operator:/[=!<>]=?|[+*/%-]|&&|\|\||\.\.|\b(?:eq|g[et]|l[et]|n(?:e|ot))\b/,punctuation:/[(){}[\]:,.]/}).variable.inside={string:t.string,function:{pattern:/([^\w-])[a-z][\w-]*(?=\()/,lookbehind:!0},number:t.number,boolean:t.boolean,punctuation:t.punctuation},e.languages.insertBefore("velocity","comment",{unparsed:{pattern:/(^|[^\\])#\[\[[\s\S]*?\]\]#/,lookbehind:!0,greedy:!0,inside:{punctuation:/^#\[\[|\]\]#$/}},"velocity-comment":[{pattern:/(^|[^\\])#\*[\s\S]*?\*#/,lookbehind:!0,greedy:!0,alias:"comment"},{pattern:/(^|[^\\])##.*/,lookbehind:!0,greedy:!0,alias:"comment"}],directive:{pattern:/(^|[^\\](?:\\\\)*)#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})(?:\s*\((?:[^()]|\([^()]*\))*\))?/i,lookbehind:!0,inside:{keyword:{pattern:/^#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})|\bin\b/,inside:{punctuation:/[{}]/}},rest:t}},variable:t.variable}),e.languages.velocity.tag.inside["attr-value"].inside.rest=e.languages.velocity}function k6(e){e.languages.verilog={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"kernel-function":{pattern:/\B\$\w+\b/,alias:"property"},constant:/\B`\w+\b/,function:/\b\w+(?=\()/,keyword:/\b(?:alias|and|assert|assign|assume|automatic|before|begin|bind|bins|binsof|bit|break|buf|bufif0|bufif1|byte|case|casex|casez|cell|chandle|class|clocking|cmos|config|const|constraint|context|continue|cover|covergroup|coverpoint|cross|deassign|default|defparam|design|disable|dist|do|edge|else|end|endcase|endclass|endclocking|endconfig|endfunction|endgenerate|endgroup|endinterface|endmodule|endpackage|endprimitive|endprogram|endproperty|endsequence|endspecify|endtable|endtask|enum|event|expect|export|extends|extern|final|first_match|for|force|foreach|forever|fork|forkjoin|function|generate|genvar|highz0|highz1|if|iff|ifnone|ignore_bins|illegal_bins|import|incdir|include|initial|inout|input|inside|instance|int|integer|interface|intersect|join|join_any|join_none|large|liblist|library|local|localparam|logic|longint|macromodule|matches|medium|modport|module|nand|negedge|new|nmos|nor|noshowcancelled|not|notif0|notif1|null|or|output|package|packed|parameter|pmos|posedge|primitive|priority|program|property|protected|pull0|pull1|pulldown|pullup|pulsestyle_ondetect|pulsestyle_onevent|pure|rand|randc|randcase|randsequence|rcmos|real|realtime|ref|reg|release|repeat|return|rnmos|rpmos|rtran|rtranif0|rtranif1|scalared|sequence|shortint|shortreal|showcancelled|signed|small|solve|specify|specparam|static|string|strong0|strong1|struct|super|supply0|supply1|table|tagged|task|this|throughout|time|timeprecision|timeunit|tran|tranif0|tranif1|tri|tri0|tri1|triand|trior|trireg|type|typedef|union|unique|unsigned|use|uwire|var|vectored|virtual|void|wait|wait_order|wand|weak0|weak1|while|wildcard|wire|with|within|wor|xnor|xor)\b/,important:/\b(?:always|always_comb|always_ff|always_latch)\b(?: *@)?/,number:/\B##?\d+|(?:\b\d+)?'[odbh] ?[\da-fzx_?]+|\b(?:\d*[._])?\d+(?:e[-+]?\d+)?/i,operator:/[-+{}^~%*\/?=!<>&|]+/,punctuation:/[[\];(),.:]/}}function k9(e){e.languages.vhdl={comment:/--.+/,"vhdl-vectors":{pattern:/\b[oxb]"[\da-f_]+"|"[01uxzwlh-]+"/i,alias:"number"},"quoted-function":{pattern:/"\S+?"(?=\()/,alias:"function"},string:/"(?:[^\\"\r\n]|\\(?:\r\n|[\s\S]))*"/,attribute:{pattern:/\b'\w+/,alias:"attr-name"},keyword:/\b(?:access|after|alias|all|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|new|next|null|of|on|open|others|out|package|port|postponed|private|procedure|process|pure|range|record|register|reject|report|return|select|severity|shared|signal|subtype|then|to|transport|type|unaffected|units|until|use|variable|view|wait|when|while|with)\b/i,boolean:/\b(?:false|true)\b/i,function:/\w+(?=\()/,number:/'[01uxzwlh-]'|\b(?:\d+#[\da-f_.]+#|\d[\d_.]*)(?:e[-+]?\d+)?/i,operator:/[<>]=?|:=|[-+*/&=]|\b(?:abs|and|mod|nand|nor|not|or|rem|rol|ror|sla|sll|sra|srl|xnor|xor)\b/i,punctuation:/[{}[\];(),.:]/}}function k8(e){e.languages.vim={string:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\r\n]|'')*'/,comment:/".*/,function:/\b\w+(?=\()/,keyword:/\b(?:N|Next|P|Print|X|XMLent|XMLns|ab|abbreviate|abc|abclear|abo|aboveleft|al|all|ar|arga|argadd|argd|argdelete|argdo|arge|argedit|argg|argglobal|argl|arglocal|args|argu|argument|as|ascii|b|bN|bNext|ba|bad|badd|ball|bd|bdelete|be|bel|belowright|bf|bfirst|bl|blast|bm|bmodified|bn|bnext|bo|botright|bp|bprevious|br|brea|break|breaka|breakadd|breakd|breakdel|breakl|breaklist|brewind|bro|browse|bufdo|buffer|buffers|bun|bunload|bw|bwipeout|c|cN|cNext|cNfcNfile|ca|cabbrev|cabc|cabclear|cad|caddb|caddbuffer|caddexpr|caddf|caddfile|cal|call|cat|catch|cb|cbuffer|cc|ccl|cclose|cd|ce|center|cex|cexpr|cf|cfile|cfir|cfirst|cg|cgetb|cgetbuffer|cgete|cgetexpr|cgetfile|change|changes|chd|chdir|che|checkpath|checkt|checktime|cl|cla|clast|clist|clo|close|cmapc|cmapclear|cn|cnew|cnewer|cnext|cnf|cnfile|cnorea|cnoreabbrev|co|col|colder|colo|colorscheme|comc|comclear|comp|compiler|con|conf|confirm|continue|cope|copen|copy|cp|cpf|cpfile|cprevious|cq|cquit|cr|crewind|cu|cuna|cunabbrev|cunmap|cw|cwindow|d|debugg|debuggreedy|delc|delcommand|delete|delf|delfunction|delm|delmarks|di|diffg|diffget|diffoff|diffpatch|diffpu|diffput|diffsplit|diffthis|diffu|diffupdate|dig|digraphs|display|dj|djump|dl|dlist|dr|drop|ds|dsearch|dsp|dsplit|e|earlier|echoe|echoerr|echom|echomsg|echon|edit|el|else|elsei|elseif|em|emenu|en|endf|endfo|endfor|endfun|endfunction|endif|endt|endtry|endw|endwhile|ene|enew|ex|exi|exit|exu|exusage|f|file|files|filetype|fin|fina|finally|find|fini|finish|fir|first|fix|fixdel|fo|fold|foldc|foldclose|foldd|folddoc|folddoclosed|folddoopen|foldo|foldopen|for|fu|fun|function|go|goto|gr|grep|grepa|grepadd|h|ha|hardcopy|help|helpf|helpfind|helpg|helpgrep|helpt|helptags|hid|hide|his|history|ia|iabbrev|iabc|iabclear|if|ij|ijump|il|ilist|imapc|imapclear|in|inorea|inoreabbrev|isearch|isp|isplit|iu|iuna|iunabbrev|iunmap|j|join|ju|jumps|k|kee|keepalt|keepj|keepjumps|keepmarks|l|lN|lNext|lNf|lNfile|la|lad|laddb|laddbuffer|laddexpr|laddf|laddfile|lan|language|last|later|lb|lbuffer|lc|lcd|lch|lchdir|lcl|lclose|left|lefta|leftabove|let|lex|lexpr|lf|lfile|lfir|lfirst|lg|lgetb|lgetbuffer|lgete|lgetexpr|lgetfile|lgr|lgrep|lgrepa|lgrepadd|lh|lhelpgrep|list|ll|lla|llast|lli|llist|lm|lmak|lmake|lmap|lmapc|lmapclear|ln|lne|lnew|lnewer|lnext|lnf|lnfile|lnoremap|lo|loadview|loc|lockmarks|lockv|lockvar|lol|lolder|lop|lopen|lp|lpf|lpfile|lprevious|lr|lrewind|ls|lt|ltag|lu|lunmap|lv|lvimgrep|lvimgrepa|lvimgrepadd|lw|lwindow|m|ma|mak|make|mark|marks|mat|match|menut|menutranslate|mk|mkexrc|mks|mksession|mksp|mkspell|mkv|mkvie|mkview|mkvimrc|mod|mode|move|mz|mzf|mzfile|mzscheme|n|nbkey|new|next|nmapc|nmapclear|noh|nohlsearch|norea|noreabbrev|nu|number|nun|nunmap|o|omapc|omapclear|on|only|open|opt|options|ou|ounmap|p|pc|pclose|pe|ped|pedit|perl|perld|perldo|po|pop|popu|popup|pp|ppop|pre|preserve|prev|previous|print|prof|profd|profdel|profile|promptf|promptfind|promptr|promptrepl|ps|psearch|ptN|ptNext|pta|ptag|ptf|ptfirst|ptj|ptjump|ptl|ptlast|ptn|ptnext|ptp|ptprevious|ptr|ptrewind|pts|ptselect|pu|put|pw|pwd|py|pyf|pyfile|python|q|qa|qall|quit|quita|quitall|r|read|rec|recover|red|redi|redir|redo|redr|redraw|redraws|redrawstatus|reg|registers|res|resize|ret|retab|retu|return|rew|rewind|ri|right|rightb|rightbelow|ru|rub|ruby|rubyd|rubydo|rubyf|rubyfile|runtime|rv|rviminfo|sN|sNext|sa|sal|sall|san|sandbox|sargument|sav|saveas|sb|sbN|sbNext|sba|sball|sbf|sbfirst|sbl|sblast|sbm|sbmodified|sbn|sbnext|sbp|sbprevious|sbr|sbrewind|sbuffer|scrip|scripte|scriptencoding|scriptnames|se|set|setf|setfiletype|setg|setglobal|setl|setlocal|sf|sfind|sfir|sfirst|sh|shell|sign|sil|silent|sim|simalt|sl|sla|slast|sleep|sm|smagic|smap|smapc|smapclear|sme|smenu|sn|snext|sni|sniff|sno|snomagic|snor|snoremap|snoreme|snoremenu|so|sor|sort|source|sp|spe|spelld|spelldump|spellgood|spelli|spellinfo|spellr|spellrepall|spellu|spellundo|spellw|spellwrong|split|spr|sprevious|sre|srewind|st|sta|stag|star|startg|startgreplace|startinsert|startr|startreplace|stj|stjump|stop|stopi|stopinsert|sts|stselect|sun|sunhide|sunm|sunmap|sus|suspend|sv|sview|syncbind|t|tN|tNext|ta|tab|tabN|tabNext|tabc|tabclose|tabd|tabdo|tabe|tabedit|tabf|tabfind|tabfir|tabfirst|tabl|tablast|tabm|tabmove|tabn|tabnew|tabnext|tabo|tabonly|tabp|tabprevious|tabr|tabrewind|tabs|tag|tags|tc|tcl|tcld|tcldo|tclf|tclfile|te|tearoff|tf|tfirst|th|throw|tj|tjump|tl|tlast|tm|tmenu|tn|tnext|to|topleft|tp|tprevious|tr|trewind|try|ts|tselect|tu|tunmenu|u|una|unabbreviate|undo|undoj|undojoin|undol|undolist|unh|unhide|unlet|unlo|unlockvar|unm|unmap|up|update|ve|verb|verbose|version|vert|vertical|vi|vie|view|vim|vimgrep|vimgrepa|vimgrepadd|visual|viu|viusage|vmapc|vmapclear|vne|vnew|vs|vsplit|vu|vunmap|w|wN|wNext|wa|wall|wh|while|win|winc|wincmd|windo|winp|winpos|winsize|wn|wnext|wp|wprevious|wq|wqa|wqall|write|ws|wsverb|wv|wviminfo|x|xa|xall|xit|xm|xmap|xmapc|xmapclear|xme|xmenu|xn|xnoremap|xnoreme|xnoremenu|xu|xunmap|y|yank)\b/,builtin:/\b(?:acd|ai|akm|aleph|allowrevins|altkeymap|ambiwidth|ambw|anti|antialias|arab|arabic|arabicshape|ari|arshape|autochdir|autocmd|autoindent|autoread|autowrite|autowriteall|aw|awa|background|backspace|backup|backupcopy|backupdir|backupext|backupskip|balloondelay|ballooneval|balloonexpr|bdir|bdlay|beval|bex|bexpr|bg|bh|bin|binary|biosk|bioskey|bk|bkc|bomb|breakat|brk|browsedir|bs|bsdir|bsk|bt|bufhidden|buflisted|buftype|casemap|ccv|cdpath|cedit|cfu|ch|charconvert|ci|cin|cindent|cink|cinkeys|cino|cinoptions|cinw|cinwords|clipboard|cmdheight|cmdwinheight|cmp|cms|columns|com|comments|commentstring|compatible|complete|completefunc|completeopt|consk|conskey|copyindent|cot|cpo|cpoptions|cpt|cscopepathcomp|cscopeprg|cscopequickfix|cscopetag|cscopetagorder|cscopeverbose|cspc|csprg|csqf|cst|csto|csverb|cuc|cul|cursorcolumn|cursorline|cwh|debug|deco|def|define|delcombine|dex|dg|dict|dictionary|diff|diffexpr|diffopt|digraph|dip|dir|directory|dy|ea|ead|eadirection|eb|ed|edcompatible|ef|efm|ei|ek|enc|encoding|endofline|eol|ep|equalalways|equalprg|errorbells|errorfile|errorformat|esckeys|et|eventignore|expandtab|exrc|fcl|fcs|fdc|fde|fdi|fdl|fdls|fdm|fdn|fdo|fdt|fen|fenc|fencs|fex|ff|ffs|fileencoding|fileencodings|fileformat|fileformats|fillchars|fk|fkmap|flp|fml|fmr|foldcolumn|foldenable|foldexpr|foldignore|foldlevel|foldlevelstart|foldmarker|foldmethod|foldminlines|foldnestmax|foldtext|formatexpr|formatlistpat|formatoptions|formatprg|fp|fs|fsync|ft|gcr|gd|gdefault|gfm|gfn|gfs|gfw|ghr|gp|grepformat|grepprg|gtl|gtt|guicursor|guifont|guifontset|guifontwide|guiheadroom|guioptions|guipty|guitablabel|guitabtooltip|helpfile|helpheight|helplang|hf|hh|hi|hidden|highlight|hk|hkmap|hkmapp|hkp|hl|hlg|hls|hlsearch|ic|icon|iconstring|ignorecase|im|imactivatekey|imak|imc|imcmdline|imd|imdisable|imi|iminsert|ims|imsearch|inc|include|includeexpr|incsearch|inde|indentexpr|indentkeys|indk|inex|inf|infercase|insertmode|invacd|invai|invakm|invallowrevins|invaltkeymap|invanti|invantialias|invar|invarab|invarabic|invarabicshape|invari|invarshape|invautochdir|invautoindent|invautoread|invautowrite|invautowriteall|invaw|invawa|invbackup|invballooneval|invbeval|invbin|invbinary|invbiosk|invbioskey|invbk|invbl|invbomb|invbuflisted|invcf|invci|invcin|invcindent|invcompatible|invconfirm|invconsk|invconskey|invcopyindent|invcp|invcscopetag|invcscopeverbose|invcst|invcsverb|invcuc|invcul|invcursorcolumn|invcursorline|invdeco|invdelcombine|invdg|invdiff|invdigraph|invdisable|invea|inveb|inved|invedcompatible|invek|invendofline|inveol|invequalalways|inverrorbells|invesckeys|invet|invex|invexpandtab|invexrc|invfen|invfk|invfkmap|invfoldenable|invgd|invgdefault|invguipty|invhid|invhidden|invhk|invhkmap|invhkmapp|invhkp|invhls|invhlsearch|invic|invicon|invignorecase|invim|invimc|invimcmdline|invimd|invincsearch|invinf|invinfercase|invinsertmode|invis|invjoinspaces|invjs|invlazyredraw|invlbr|invlinebreak|invlisp|invlist|invloadplugins|invlpl|invlz|invma|invmacatsui|invmagic|invmh|invml|invmod|invmodeline|invmodifiable|invmodified|invmore|invmousef|invmousefocus|invmousehide|invnu|invnumber|invodev|invopendevice|invpaste|invpi|invpreserveindent|invpreviewwindow|invprompt|invpvw|invreadonly|invremap|invrestorescreen|invrevins|invri|invrightleft|invrightleftcmd|invrl|invrlc|invro|invrs|invru|invruler|invsb|invsc|invscb|invscrollbind|invscs|invsecure|invsft|invshellslash|invshelltemp|invshiftround|invshortname|invshowcmd|invshowfulltag|invshowmatch|invshowmode|invsi|invsm|invsmartcase|invsmartindent|invsmarttab|invsmd|invsn|invsol|invspell|invsplitbelow|invsplitright|invspr|invsr|invssl|invsta|invstartofline|invstmp|invswapfile|invswf|invta|invtagbsearch|invtagrelative|invtagstack|invtbi|invtbidi|invtbs|invtermbidi|invterse|invtextauto|invtextmode|invtf|invtgst|invtildeop|invtimeout|invtitle|invto|invtop|invtr|invttimeout|invttybuiltin|invttyfast|invtx|invvb|invvisualbell|invwa|invwarn|invwb|invweirdinvert|invwfh|invwfw|invwildmenu|invwinfixheight|invwinfixwidth|invwiv|invwmnu|invwrap|invwrapscan|invwrite|invwriteany|invwritebackup|invws|isf|isfname|isi|isident|isk|iskeyword|isprint|joinspaces|js|key|keymap|keymodel|keywordprg|km|kmp|kp|langmap|langmenu|laststatus|lazyredraw|lbr|lcs|linebreak|lines|linespace|lisp|lispwords|listchars|loadplugins|lpl|lsp|lz|macatsui|magic|makeef|makeprg|matchpairs|matchtime|maxcombine|maxfuncdepth|maxmapdepth|maxmem|maxmempattern|maxmemtot|mco|mef|menuitems|mfd|mh|mis|mkspellmem|ml|mls|mm|mmd|mmp|mmt|modeline|modelines|modifiable|modified|more|mouse|mousef|mousefocus|mousehide|mousem|mousemodel|mouses|mouseshape|mouset|mousetime|mp|mps|msm|mzq|mzquantum|nf|noacd|noai|noakm|noallowrevins|noaltkeymap|noanti|noantialias|noar|noarab|noarabic|noarabicshape|noari|noarshape|noautochdir|noautoindent|noautoread|noautowrite|noautowriteall|noaw|noawa|nobackup|noballooneval|nobeval|nobin|nobinary|nobiosk|nobioskey|nobk|nobl|nobomb|nobuflisted|nocf|noci|nocin|nocindent|nocompatible|noconfirm|noconsk|noconskey|nocopyindent|nocp|nocscopetag|nocscopeverbose|nocst|nocsverb|nocuc|nocul|nocursorcolumn|nocursorline|nodeco|nodelcombine|nodg|nodiff|nodigraph|nodisable|noea|noeb|noed|noedcompatible|noek|noendofline|noeol|noequalalways|noerrorbells|noesckeys|noet|noex|noexpandtab|noexrc|nofen|nofk|nofkmap|nofoldenable|nogd|nogdefault|noguipty|nohid|nohidden|nohk|nohkmap|nohkmapp|nohkp|nohls|noic|noicon|noignorecase|noim|noimc|noimcmdline|noimd|noincsearch|noinf|noinfercase|noinsertmode|nois|nojoinspaces|nojs|nolazyredraw|nolbr|nolinebreak|nolisp|nolist|noloadplugins|nolpl|nolz|noma|nomacatsui|nomagic|nomh|noml|nomod|nomodeline|nomodifiable|nomodified|nomore|nomousef|nomousefocus|nomousehide|nonu|nonumber|noodev|noopendevice|nopaste|nopi|nopreserveindent|nopreviewwindow|noprompt|nopvw|noreadonly|noremap|norestorescreen|norevins|nori|norightleft|norightleftcmd|norl|norlc|noro|nors|noru|noruler|nosb|nosc|noscb|noscrollbind|noscs|nosecure|nosft|noshellslash|noshelltemp|noshiftround|noshortname|noshowcmd|noshowfulltag|noshowmatch|noshowmode|nosi|nosm|nosmartcase|nosmartindent|nosmarttab|nosmd|nosn|nosol|nospell|nosplitbelow|nosplitright|nospr|nosr|nossl|nosta|nostartofline|nostmp|noswapfile|noswf|nota|notagbsearch|notagrelative|notagstack|notbi|notbidi|notbs|notermbidi|noterse|notextauto|notextmode|notf|notgst|notildeop|notimeout|notitle|noto|notop|notr|nottimeout|nottybuiltin|nottyfast|notx|novb|novisualbell|nowa|nowarn|nowb|noweirdinvert|nowfh|nowfw|nowildmenu|nowinfixheight|nowinfixwidth|nowiv|nowmnu|nowrap|nowrapscan|nowrite|nowriteany|nowritebackup|nows|nrformats|numberwidth|nuw|odev|oft|ofu|omnifunc|opendevice|operatorfunc|opfunc|osfiletype|pa|para|paragraphs|paste|pastetoggle|patchexpr|patchmode|path|pdev|penc|pex|pexpr|pfn|ph|pheader|pi|pm|pmbcs|pmbfn|popt|preserveindent|previewheight|previewwindow|printdevice|printencoding|printexpr|printfont|printheader|printmbcharset|printmbfont|printoptions|prompt|pt|pumheight|pvh|pvw|qe|quoteescape|readonly|remap|report|restorescreen|revins|rightleft|rightleftcmd|rl|rlc|ro|rs|rtp|ruf|ruler|rulerformat|runtimepath|sbo|sc|scb|scr|scroll|scrollbind|scrolljump|scrolloff|scrollopt|scs|sect|sections|secure|sel|selection|selectmode|sessionoptions|sft|shcf|shellcmdflag|shellpipe|shellquote|shellredir|shellslash|shelltemp|shelltype|shellxquote|shiftround|shiftwidth|shm|shortmess|shortname|showbreak|showcmd|showfulltag|showmatch|showmode|showtabline|shq|si|sidescroll|sidescrolloff|siso|sj|slm|smartcase|smartindent|smarttab|smc|smd|softtabstop|sol|spc|spell|spellcapcheck|spellfile|spelllang|spellsuggest|spf|spl|splitbelow|splitright|sps|sr|srr|ss|ssl|ssop|stal|startofline|statusline|stl|stmp|su|sua|suffixes|suffixesadd|sw|swapfile|swapsync|swb|swf|switchbuf|sws|sxq|syn|synmaxcol|syntax|t_AB|t_AF|t_AL|t_CS|t_CV|t_Ce|t_Co|t_Cs|t_DL|t_EI|t_F1|t_F2|t_F3|t_F4|t_F5|t_F6|t_F7|t_F8|t_F9|t_IE|t_IS|t_K1|t_K3|t_K4|t_K5|t_K6|t_K7|t_K8|t_K9|t_KA|t_KB|t_KC|t_KD|t_KE|t_KF|t_KG|t_KH|t_KI|t_KJ|t_KK|t_KL|t_RI|t_RV|t_SI|t_Sb|t_Sf|t_WP|t_WS|t_ZH|t_ZR|t_al|t_bc|t_cd|t_ce|t_cl|t_cm|t_cs|t_da|t_db|t_dl|t_fs|t_k1|t_k2|t_k3|t_k4|t_k5|t_k6|t_k7|t_k8|t_k9|t_kB|t_kD|t_kI|t_kN|t_kP|t_kb|t_kd|t_ke|t_kh|t_kl|t_kr|t_ks|t_ku|t_le|t_mb|t_md|t_me|t_mr|t_ms|t_nd|t_op|t_se|t_so|t_sr|t_te|t_ti|t_ts|t_ue|t_us|t_ut|t_vb|t_ve|t_vi|t_vs|t_xs|tabline|tabpagemax|tabstop|tagbsearch|taglength|tagrelative|tagstack|tal|tb|tbi|tbidi|tbis|tbs|tenc|term|termbidi|termencoding|terse|textauto|textmode|textwidth|tgst|thesaurus|tildeop|timeout|timeoutlen|title|titlelen|titleold|titlestring|toolbar|toolbariconsize|top|tpm|tsl|tsr|ttimeout|ttimeoutlen|ttm|tty|ttybuiltin|ttyfast|ttym|ttymouse|ttyscroll|ttytype|tw|tx|uc|ul|undolevels|updatecount|updatetime|ut|vb|vbs|vdir|verbosefile|vfile|viewdir|viewoptions|viminfo|virtualedit|visualbell|vop|wak|warn|wb|wc|wcm|wd|weirdinvert|wfh|wfw|whichwrap|wi|wig|wildchar|wildcharm|wildignore|wildmenu|wildmode|wildoptions|wim|winaltkeys|window|winfixheight|winfixwidth|winheight|winminheight|winminwidth|winwidth|wiv|wiw|wm|wmh|wmnu|wmw|wop|wrap|wrapmargin|wrapscan|writeany|writebackup|writedelay|ww)\b/,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?)\b/i,operator:/\|\||&&|[-+.]=?|[=!](?:[=~][#?]?)?|[<>]=?[#?]?|[*\/%?]|\b(?:is(?:not)?)\b/,punctuation:/[{}[\](),;:]/}}function k7(e){e.languages["visual-basic"]={comment:{pattern:/(?:['‘’]|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:\b_[ \t]*(?:\r\n?|\n)|.)+/i,alias:"property",greedy:!0},string:{pattern:/\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,greedy:!0},date:{pattern:/#[ \t]*(?:\d+([/-])\d+\1\d+(?:[ \t]+(?:\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?))?|\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?)[ \t]*#/i,alias:"number"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:[FRD]|U?[ILS])?/i,boolean:/\b(?:False|Nothing|True)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Until|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,operator:/[+\-*/\\^<=>&#@$%!]|\b_(?=[ \t]*[\r\n])/,punctuation:/[{}().,:?]/},e.languages.vb=e.languages["visual-basic"],e.languages.vba=e.languages["visual-basic"]}function we(e){e.languages.warpscript={comment:/#.*|\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'|<'(?:[^\\']|'(?!>)|\\.)*'>/,greedy:!0},variable:/\$\S+/,macro:{pattern:/@\S+/,alias:"property"},keyword:/\b(?:BREAK|CHECKMACRO|CONTINUE|CUDF|DEFINED|DEFINEDMACRO|EVAL|FAIL|FOR|FOREACH|FORSTEP|IFT|IFTE|MSGFAIL|NRETURN|RETHROW|RETURN|SWITCH|TRY|UDF|UNTIL|WHILE)\b/,number:/[+-]?\b(?:NaN|Infinity|\d+(?:\.\d*)?(?:[Ee][+-]?\d+)?|0x[\da-fA-F]+|0b[01]+)\b/,boolean:/\b(?:F|T|false|true)\b/,punctuation:/<%|%>|[{}[\]()]/,operator:/==|&&?|\|\|?|\*\*?|>>>?|<<|[<>!~]=?|[-/%^]|\+!?|\b(?:AND|NOT|OR)\b/}}function wt(e){e.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/}}function wn(e){var t=/(?:\B-|\b_|\b)[A-Za-z][\w-]*(?![\w-])/.source,n="(?:"+/\b(?:unsigned\s+)?long\s+long(?![\w-])/.source+"|"+/\b(?:unrestricted|unsigned)\s+[a-z]+(?![\w-])/.source+"|"+/(?!(?:unrestricted|unsigned)\b)/.source+t+/(?:\s*<(?:[^<>]|<[^<>]*>)*>)?/.source+")"+/(?:\s*\?)?/.source,r={};for(var a in e.languages["web-idl"]={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/"[^"]*"/,greedy:!0},namespace:{pattern:RegExp(/(\bnamespace\s+)/.source+t),lookbehind:!0},"class-name":[{pattern:/(^|[^\w-])(?:iterable|maplike|setlike)\s*<(?:[^<>]|<[^<>]*>)*>/,lookbehind:!0,inside:r},{pattern:RegExp(/(\b(?:attribute|const|deleter|getter|optional|setter)\s+)/.source+n),lookbehind:!0,inside:r},{pattern:RegExp("("+/\bcallback\s+/.source+t+/\s*=\s*/.source+")"+n),lookbehind:!0,inside:r},{pattern:RegExp(/(\btypedef\b\s*)/.source+n),lookbehind:!0,inside:r},{pattern:RegExp(/(\b(?:callback|dictionary|enum|interface(?:\s+mixin)?)\s+)(?!(?:interface|mixin)\b)/.source+t),lookbehind:!0},{pattern:RegExp(/(:\s*)/.source+t),lookbehind:!0},RegExp(t+/(?=\s+(?:implements|includes)\b)/.source),{pattern:RegExp(/(\b(?:implements|includes)\s+)/.source+t),lookbehind:!0},{pattern:RegExp(n+"(?="+/\s*(?:\.{3}\s*)?/.source+t+/\s*[(),;=]/.source+")"),inside:r}],builtin:/\b(?:ArrayBuffer|BigInt64Array|BigUint64Array|ByteString|DOMString|DataView|Float32Array|Float64Array|FrozenArray|Int16Array|Int32Array|Int8Array|ObservableArray|Promise|USVString|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray)\b/,keyword:[/\b(?:async|attribute|callback|const|constructor|deleter|dictionary|enum|getter|implements|includes|inherit|interface|mixin|namespace|null|optional|or|partial|readonly|required|setter|static|stringifier|typedef|unrestricted)\b/,/\b(?:any|bigint|boolean|byte|double|float|iterable|long|maplike|object|octet|record|sequence|setlike|short|symbol|undefined|unsigned|void)\b/],boolean:/\b(?:false|true)\b/,number:{pattern:/(^|[^\w-])-?(?:0x[0-9a-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|NaN|Infinity)(?![\w-])/i,lookbehind:!0},operator:/\.{3}|[=:?<>-]/,punctuation:/[(){}[\].,;]/},e.languages["web-idl"])"class-name"!==a&&(r[a]=e.languages["web-idl"][a]);e.languages.webidl=e.languages["web-idl"]}function wr(e){e.languages.wgsl={comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},"builtin-attribute":{pattern:/(@)builtin\(.*?\)/,lookbehind:!0,inside:{attribute:{pattern:/^builtin/,alias:"attr-name"},punctuation:/[(),]/,"built-in-values":{pattern:/\b(?:frag_depth|front_facing|global_invocation_id|instance_index|local_invocation_id|local_invocation_index|num_workgroups|position|sample_index|sample_mask|vertex_index|workgroup_id)\b/,alias:"attr-value"}}},attributes:{pattern:/(@)(?:align|binding|compute|const|fragment|group|id|interpolate|invariant|location|size|vertex|workgroup_size)/i,lookbehind:!0,alias:"attr-name"},functions:{pattern:/\b(fn\s+)[_a-zA-Z]\w*(?=[(<])/,lookbehind:!0,alias:"function"},keyword:/\b(?:bitcast|break|case|const|continue|continuing|default|discard|else|enable|fallthrough|fn|for|function|if|let|loop|private|return|storage|struct|switch|type|uniform|var|while|workgroup)\b/,builtin:/\b(?:abs|acos|acosh|all|any|array|asin|asinh|atan|atan2|atanh|atomic|atomicAdd|atomicAnd|atomicCompareExchangeWeak|atomicExchange|atomicLoad|atomicMax|atomicMin|atomicOr|atomicStore|atomicSub|atomicXor|bool|ceil|clamp|cos|cosh|countLeadingZeros|countOneBits|countTrailingZeros|cross|degrees|determinant|distance|dot|dpdx|dpdxCoarse|dpdxFine|dpdy|dpdyCoarse|dpdyFine|exp|exp2|extractBits|f32|f64|faceForward|firstLeadingBit|floor|fma|fract|frexp|fwidth|fwidthCoarse|fwidthFine|i32|i64|insertBits|inverseSqrt|ldexp|length|log|log2|mat[2-4]x[2-4]|max|min|mix|modf|normalize|override|pack2x16float|pack2x16snorm|pack2x16unorm|pack4x8snorm|pack4x8unorm|pow|ptr|quantizeToF16|radians|reflect|refract|reverseBits|round|sampler|sampler_comparison|select|shiftLeft|shiftRight|sign|sin|sinh|smoothstep|sqrt|staticAssert|step|storageBarrier|tan|tanh|textureDimensions|textureGather|textureGatherCompare|textureLoad|textureNumLayers|textureNumLevels|textureNumSamples|textureSample|textureSampleBias|textureSampleCompare|textureSampleCompareLevel|textureSampleGrad|textureSampleLevel|textureStore|texture_1d|texture_2d|texture_2d_array|texture_3d|texture_cube|texture_cube_array|texture_depth_2d|texture_depth_2d_array|texture_depth_cube|texture_depth_cube_array|texture_depth_multisampled_2d|texture_multisampled_2d|texture_storage_1d|texture_storage_2d|texture_storage_2d_array|texture_storage_3d|transpose|trunc|u32|u64|unpack2x16float|unpack2x16snorm|unpack2x16unorm|unpack4x8snorm|unpack4x8unorm|vec[2-4]|workgroupBarrier)\b/,"function-calls":{pattern:/\b[_a-z]\w*(?=\()/i,alias:"function"},"class-name":/\b(?:[A-Z][A-Za-z0-9]*)\b/,"bool-literal":{pattern:/\b(?:false|true)\b/,alias:"boolean"},"hex-int-literal":{pattern:/\b0[xX][0-9a-fA-F]+[iu]?\b(?![.pP])/,alias:"number"},"hex-float-literal":{pattern:/\b0[xX][0-9a-fA-F]*(?:\.[0-9a-fA-F]*)?(?:[pP][+-]?\d+[fh]?)?/,alias:"number"},"decimal-float-literal":[{pattern:/\d*\.\d+(?:[eE](?:\+|-)?\d+)?[fh]?/,alias:"number"},{pattern:/\d+\.\d*(?:[eE](?:\+|-)?\d+)?[fh]?/,alias:"number"},{pattern:/\d+[eE](?:\+|-)?\d+[fh]?/,alias:"number"},{pattern:/\b\d+[fh]\b/,alias:"number"}],"int-literal":{pattern:/\b\d+[iu]?\b/,alias:"number"},operator:[{pattern:/(?:\^|~|\|(?!\|)|\|\||&&|<<|>>|!)(?!=)/},{pattern:/&(?![&=])/},{pattern:/(?:\+=|-=|\*=|\/=|%=|\^=|&=|\|=|<<=|>>=)/},{pattern:/(^|[^<>=!])=(?![=>])/,lookbehind:!0},{pattern:/(?:==|!=|<=|\+\+|--|(^|[^=])>=)/,lookbehind:!0},{pattern:/(?:(?:[+%]|(?:\*(?!\w)))(?!=))|(?:-(?!>))|(?:\/(?!\/))/},{pattern:/->/}],punctuation:/[@(){}[\],;<>:.]/}}function wa(e){e.register(vP),e.languages.wiki=e.languages.extend("markup",{"block-comment":{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0,alias:"comment"},heading:{pattern:/^(=+)[^=\r\n].*?\1/m,inside:{punctuation:/^=+|=+$/,important:/.+/}},emphasis:{pattern:/('{2,5}).+?\1/,inside:{"bold-italic":{pattern:/(''''').+?(?=\1)/,lookbehind:!0,alias:["bold","italic"]},bold:{pattern:/(''')[^'](?:.*?[^'])?(?=\1)/,lookbehind:!0},italic:{pattern:/('')[^'](?:.*?[^'])?(?=\1)/,lookbehind:!0},punctuation:/^''+|''+$/}},hr:{pattern:/^-{4,}/m,alias:"punctuation"},url:[/ISBN +(?:97[89][ -]?)?(?:\d[ -]?){9}[\dx]\b|(?:PMID|RFC) +\d+/i,/\[\[.+?\]\]|\[.+?\]/],variable:[/__[A-Z]+__/,/\{{3}.+?\}{3}/,/\{\{.+?\}\}/],symbol:[/^#redirect/im,/~{3,5}/],"table-tag":{pattern:/((?:^|[|!])[|!])[^|\r\n]+\|(?!\|)/m,lookbehind:!0,inside:{"table-bar":{pattern:/\|$/,alias:"punctuation"},rest:e.languages.markup.tag.inside}},punctuation:/^(?:\{\||\|\}|\|-|[*#:;!|])|\|\||!!/m}),e.languages.insertBefore("wiki","tag",{nowiki:{pattern:/<(nowiki|pre|source)\b[^>]*>[\s\S]*?<\/\1>/i,inside:{tag:{pattern:/<(?:nowiki|pre|source)\b[^>]*>|<\/(?:nowiki|pre|source)>/i,inside:e.languages.markup.tag.inside}}}})}function wi(e){e.languages.wolfram={comment:/\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:Abs|AbsArg|Accuracy|Block|Do|For|Function|If|Manipulate|Module|Nest|NestList|None|Return|Switch|Table|Which|While)\b/,context:{pattern:/\b\w+`+\w*/,alias:"class-name"},blank:{pattern:/\b\w+_\b/,alias:"regex"},"global-variable":{pattern:/\$\w+/,alias:"variable"},boolean:/\b(?:False|True)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/\/\.|;|=\.|\^=|\^:=|:=|<<|>>|<\||\|>|:>|\|->|->|<-|@@@|@@|@|\/@|=!=|===|==|=|\+|-|\[\/-+%=\]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},e.languages.mathematica=e.languages.wolfram,e.languages.wl=e.languages.wolfram,e.languages.nb=e.languages.wolfram}function ws(e){e.languages.wren={comment:[{pattern:/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*))*\*\/)*\*\/)*\*\//,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],"triple-quoted-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},"string-literal":null,hashbang:{pattern:/^#!\/.+/,greedy:!0,alias:"comment"},attribute:{pattern:/#!?[ \t\u3000]*\w+/,alias:"keyword"},"class-name":[{pattern:/(\bclass\s+)\w+/,lookbehind:!0},/\b[A-Z][a-z\d_]*\b/],constant:/\b[A-Z][A-Z\d_]*\b/,null:{pattern:/\bnull\b/,alias:"keyword"},keyword:/\b(?:as|break|class|construct|continue|else|for|foreign|if|import|in|is|return|static|super|this|var|while)\b/,boolean:/\b(?:false|true)\b/,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,function:/\b[a-z_]\w*(?=\s*[({])/i,operator:/<<|>>|[=!<>]=?|&&|\|\||[-+*/%~^&|?:]|\.{2,3}/,punctuation:/[\[\](){}.,;]/},e.languages.wren["string-literal"]={pattern:/(^|[^\\"])"(?:[^\\"%]|\\[\s\S]|%(?!\()|%\((?:[^()]|\((?:[^()]|\([^)]*\))*\))*\))*"/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)%\((?:[^()]|\((?:[^()]|\([^)]*\))*\))*\)/,lookbehind:!0,inside:{expression:{pattern:/^(%\()[\s\S]+(?=\)$)/,lookbehind:!0,inside:e.languages.wren},"interpolation-punctuation":{pattern:/^%\(|\)$/,alias:"punctuation"}}},string:/[\s\S]+/}}}function wo(e){e.register(vP),e.languages.xeora=e.languages.extend("markup",{constant:{pattern:/\$(?:DomainContents|PageRenderDuration)\$/,inside:{punctuation:{pattern:/\$/}}},variable:{pattern:/\$@?(?:#+|[-+*~=^])?[\w.]+\$/,inside:{punctuation:{pattern:/[$.]/},operator:{pattern:/#+|[-+*~=^@]/}}},"function-inline":{pattern:/\$F:[-\w.]+\?[-\w.]+(?:,(?:(?:@[-#]*\w+\.[\w+.]\.*)*\|)*(?:(?:[\w+]|[-#*.~^]+[\w+]|=\S)(?:[^$=]|=+[^=])*=*|(?:@[-#]*\w+\.[\w+.]\.*)+(?:(?:[\w+]|[-#*~^][-#*.~^]*[\w+]|=\S)(?:[^$=]|=+[^=])*=*)?)?)?\$/,inside:{variable:{pattern:/(?:[,|])@?(?:#+|[-+*~=^])?[\w.]+/,inside:{punctuation:{pattern:/[,.|]/},operator:{pattern:/#+|[-+*~=^@]/}}},punctuation:{pattern:/\$\w:|[$:?.,|]/}},alias:"function"},"function-block":{pattern:/\$XF:\{[-\w.]+\?[-\w.]+(?:,(?:(?:@[-#]*\w+\.[\w+.]\.*)*\|)*(?:(?:[\w+]|[-#*.~^]+[\w+]|=\S)(?:[^$=]|=+[^=])*=*|(?:@[-#]*\w+\.[\w+.]\.*)+(?:(?:[\w+]|[-#*~^][-#*.~^]*[\w+]|=\S)(?:[^$=]|=+[^=])*=*)?)?)?\}:XF\$/,inside:{punctuation:{pattern:/[$:{}?.,|]/}},alias:"function"},"directive-inline":{pattern:/\$\w(?:#\d+\+?)?(?:\[[-\w.]+\])?:[-\/\w.]+\$/,inside:{punctuation:{pattern:/\$(?:\w:|C(?:\[|#\d))?|[:{[\]]/,inside:{tag:{pattern:/#\d/}}}},alias:"function"},"directive-block-open":{pattern:/\$\w+:\{|\$\w(?:#\d+\+?)?(?:\[[-\w.]+\])?:[-\w.]+:\{(?:![A-Z]+)?/,inside:{punctuation:{pattern:/\$(?:\w:|C(?:\[|#\d))?|[:{[\]]/,inside:{tag:{pattern:/#\d/}}},attribute:{pattern:/![A-Z]+$/,inside:{punctuation:{pattern:/!/}},alias:"keyword"}},alias:"function"},"directive-block-separator":{pattern:/\}:[-\w.]+:\{/,inside:{punctuation:{pattern:/[:{}]/}},alias:"function"},"directive-block-close":{pattern:/\}:[-\w.]+\$/,inside:{punctuation:{pattern:/[:{}$]/}},alias:"function"}}),e.languages.insertBefore("inside","punctuation",{variable:e.languages.xeora["function-inline"].inside.variable},e.languages.xeora["function-block"]),e.languages.xeoracube=e.languages.xeora}function wl(e){e.register(vP);function t(t,n){e.languages[t]&&e.languages.insertBefore(t,"comment",{"doc-comment":n})}var n=e.languages.markup.tag,r={pattern:/\/\/\/.*/,greedy:!0,alias:"comment",inside:{tag:n}};t("csharp",r),t("fsharp",r),t("vbnet",{pattern:/'''.*/,greedy:!0,alias:"comment",inside:{tag:n}})}function wc(e){e.languages.xojo={comment:{pattern:/(?:'|\/\/|Rem\b).+/i,greedy:!0},string:{pattern:/"(?:""|[^"])*"/,greedy:!0},number:[/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,/&[bchou][a-z\d]+/i],directive:{pattern:/#(?:Else|ElseIf|Endif|If|Pragma)\b/i,alias:"property"},keyword:/\b(?:AddHandler|App|Array|As(?:signs)?|Auto|Boolean|Break|By(?:Ref|Val)|Byte|Call|Case|Catch|CFStringRef|CGFloat|Class|Color|Const|Continue|CString|Currency|CurrentMethodName|Declare|Delegate|Dim|Do(?:uble|wnTo)?|Each|Else(?:If)?|End|Enumeration|Event|Exception|Exit|Extends|False|Finally|For|Function|Get|GetTypeInfo|Global|GOTO|If|Implements|In|Inherits|Int(?:8|16|32|64|eger|erface)?|Lib|Loop|Me|Module|Next|Nil|Object|Optional|OSType|ParamArray|Private|Property|Protected|PString|Ptr|Raise(?:Event)?|ReDim|RemoveHandler|Return|Select(?:or)?|Self|Set|Shared|Short|Single|Soft|Static|Step|String|Sub|Super|Text|Then|To|True|Try|Ubound|UInt(?:8|16|32|64|eger)?|Until|Using|Var(?:iant)?|Wend|While|WindowPtr|WString)\b/i,operator:/<[=>]?|>=?|[+\-*\/\\^=]|\b(?:AddressOf|And|Ctype|IsA?|Mod|New|Not|Or|WeakAddressOf|Xor)\b/i,punctuation:/[.,;:()]/}}function wu(e){var t,n;e.register(vP),e.languages.xquery=e.languages.extend("markup",{"xquery-comment":{pattern:/\(:[\s\S]*?:\)/,greedy:!0,alias:"comment"},string:{pattern:/(["'])(?:\1\1|(?!\1)[\s\S])*\1/,greedy:!0},extension:{pattern:/\(#.+?#\)/,alias:"symbol"},variable:/\$[-\w:]+/,axis:{pattern:/(^|[^-])(?:ancestor(?:-or-self)?|attribute|child|descendant(?:-or-self)?|following(?:-sibling)?|parent|preceding(?:-sibling)?|self)(?=::)/,lookbehind:!0,alias:"operator"},"keyword-operator":{pattern:/(^|[^:-])\b(?:and|castable as|div|eq|except|ge|gt|idiv|instance of|intersect|is|le|lt|mod|ne|or|union)\b(?=$|[^:-])/,lookbehind:!0,alias:"operator"},keyword:{pattern:/(^|[^:-])\b(?:as|ascending|at|base-uri|boundary-space|case|cast as|collation|construction|copy-namespaces|declare|default|descending|else|empty (?:greatest|least)|encoding|every|external|for|function|if|import|in|inherit|lax|let|map|module|namespace|no-inherit|no-preserve|option|order(?: by|ed|ing)?|preserve|return|satisfies|schema|some|stable|strict|strip|then|to|treat as|typeswitch|unordered|validate|variable|version|where|xquery)\b(?=$|[^:-])/,lookbehind:!0},function:/[\w-]+(?::[\w-]+)*(?=\s*\()/,"xquery-element":{pattern:/(element\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"tag"},"xquery-attribute":{pattern:/(attribute\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"attr-name"},builtin:{pattern:/(^|[^:-])\b(?:attribute|comment|document|element|processing-instruction|text|xs:(?:ENTITIES|ENTITY|ID|IDREFS?|NCName|NMTOKENS?|NOTATION|Name|QName|anyAtomicType|anyType|anyURI|base64Binary|boolean|byte|date|dateTime|dayTimeDuration|decimal|double|duration|float|gDay|gMonth|gMonthDay|gYear|gYearMonth|hexBinary|int|integer|language|long|negativeInteger|nonNegativeInteger|nonPositiveInteger|normalizedString|positiveInteger|short|string|time|token|unsigned(?:Byte|Int|Long|Short)|untyped(?:Atomic)?|yearMonthDuration))\b(?=$|[^:-])/,lookbehind:!0},number:/\b\d+(?:\.\d+)?(?:E[+-]?\d+)?/,operator:[/[+*=?|@]|\.\.?|:=|!=|<[=<]?|>[=>]?/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}],punctuation:/[[\](){},;:/]/}),e.languages.xquery.tag.pattern=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/,e.languages.xquery.tag.inside["attr-value"].pattern=/=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+)/,e.languages.xquery.tag.inside["attr-value"].inside.punctuation=/^="|"$/,e.languages.xquery.tag.inside["attr-value"].inside.expression={pattern:/\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}/,inside:e.languages.xquery,alias:"language-xquery"},t=function(e){return"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(t).join("")},n=function(r){for(var a=[],i=0;i<r.length;i++){var s=r[i],o=!1;if("string"!=typeof s&&("tag"===s.type&&s.content[0]&&"tag"===s.content[0].type?"</"===s.content[0].content[0].content?a.length>0&&a[a.length-1].tagName===t(s.content[0].content[1])&&a.pop():"/>"===s.content[s.content.length-1].content||a.push({tagName:t(s.content[0].content[1]),openedBraces:0}):!(a.length>0)||"punctuation"!==s.type||"{"!==s.content||r[i+1]&&"punctuation"===r[i+1].type&&"{"===r[i+1].content||r[i-1]&&"plain-text"===r[i-1].type&&"{"===r[i-1].content?a.length>0&&a[a.length-1].openedBraces>0&&"punctuation"===s.type&&"}"===s.content?a[a.length-1].openedBraces--:"comment"!==s.type&&(o=!0):a[a.length-1].openedBraces++),(o||"string"==typeof s)&&a.length>0&&0===a[a.length-1].openedBraces){var l=t(s);i<r.length-1&&("string"==typeof r[i+1]||"plain-text"===r[i+1].type)&&(l+=t(r[i+1]),r.splice(i+1,1)),i>0&&("string"==typeof r[i-1]||"plain-text"===r[i-1].type)&&(l=t(r[i-1])+l,r.splice(i-1,1),i--),/^\s+$/.test(l)?r[i]=l:r[i]=new e.Token("plain-text",l,null,l)}s.content&&"string"!=typeof s.content&&n(s.content)}},e.hooks.add("after-tokenize",function(e){"xquery"===e.language&&n(e.tokens)})}function wd(e){e.languages.yang={comment:/\/\*[\s\S]*?\*\/|\/\/.*/,string:{pattern:/"(?:[^\\"]|\\.)*"|'[^']*'/,greedy:!0},keyword:{pattern:/(^|[{};\r\n][ \t]*)[a-z_][\w.-]*/i,lookbehind:!0},namespace:{pattern:/(\s)[a-z_][\w.-]*(?=:)/i,lookbehind:!0},boolean:/\b(?:false|true)\b/,operator:/\+/,punctuation:/[{};:]/}}function wp(e){!function(e){function t(e){return function(){return e}}var n=/\b(?:align|allowzero|and|anyframe|anytype|asm|async|await|break|cancel|catch|comptime|const|continue|defer|else|enum|errdefer|error|export|extern|fn|for|if|inline|linksection|nakedcc|noalias|nosuspend|null|or|orelse|packed|promise|pub|resume|return|stdcallcc|struct|suspend|switch|test|threadlocal|try|undefined|union|unreachable|usingnamespace|var|volatile|while)\b/,r="\\b(?!"+n.source+")(?!\\d)\\w+\\b",a=/align\s*\((?:[^()]|\([^()]*\))*\)/.source,i="(?!\\s)(?:!?\\s*(?:"+/(?:\?|\bpromise->|(?:\[[^[\]]*\]|\*(?!\*)|\*\*)(?:\s*<ALIGN>|\s*const\b|\s*volatile\b|\s*allowzero\b)*)/.source.replace(/<ALIGN>/g,t(a))+"\\s*)*"+/(?:\bpromise\b|(?:\berror\.)?<ID>(?:\.<ID>)*(?!\s+<ID>))/.source.replace(/<ID>/g,t(r))+")+";e.languages.zig={comment:[{pattern:/\/\/[/!].*/,alias:"doc-comment"},/\/{2}.*/],string:[{pattern:/(^|[^\\@])c?"(?:[^"\\\r\n]|\\.)*"/,lookbehind:!0,greedy:!0},{pattern:/([\r\n])([ \t]+c?\\{2}).*(?:(?:\r\n?|\n)\2.*)*/,lookbehind:!0,greedy:!0}],char:{pattern:/(^|[^\\])'(?:[^'\\\r\n]|[\uD800-\uDFFF]{2}|\\(?:.|x[a-fA-F\d]{2}|u\{[a-fA-F\d]{1,6}\}))'/,lookbehind:!0,greedy:!0},builtin:/\B@(?!\d)\w+(?=\s*\()/,label:{pattern:/(\b(?:break|continue)\s*:\s*)\w+\b|\b(?!\d)\w+\b(?=\s*:\s*(?:\{|while\b))/,lookbehind:!0},"class-name":[/\b(?!\d)\w+(?=\s*=\s*(?:(?:extern|packed)\s+)?(?:enum|struct|union)\s*[({])/,{pattern:RegExp(/(:\s*)<TYPE>(?=\s*(?:<ALIGN>\s*)?[=;,)])|<TYPE>(?=\s*(?:<ALIGN>\s*)?\{)/.source.replace(/<TYPE>/g,t(i)).replace(/<ALIGN>/g,t(a))),lookbehind:!0,inside:null},{pattern:RegExp(/(\)\s*)<TYPE>(?=\s*(?:<ALIGN>\s*)?;)/.source.replace(/<TYPE>/g,t(i)).replace(/<ALIGN>/g,t(a))),lookbehind:!0,inside:null}],"builtin-type":{pattern:/\b(?:anyerror|bool|c_u?(?:int|long|longlong|short)|c_longdouble|c_void|comptime_(?:float|int)|f(?:16|32|64|128)|[iu](?:8|16|32|64|128|size)|noreturn|type|void)\b/,alias:"keyword"},keyword:n,function:/\b(?!\d)\w+(?=\s*\()/,number:/\b(?:0b[01]+|0o[0-7]+|0x[a-fA-F\d]+(?:\.[a-fA-F\d]*)?(?:[pP][+-]?[a-fA-F\d]+)?|\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)\b/,boolean:/\b(?:false|true)\b/,operator:/\.[*?]|\.{2,3}|[-=]>|\*\*|\+\+|\|\||(?:<<|>>|[-+*]%|[-+*/%^&|<>!=])=?|[?~]/,punctuation:/[.:,;(){}[\]]/},e.languages.zig["class-name"].forEach(function(t){null===t.inside&&(t.inside=e.languages.zig)})}(e)}vP.displayName="markup",vP.aliases=["atom","html","mathml","rss","ssml","svg","xml"],vj.displayName="css",vj.aliases=[],vF.displayName="clike",vF.aliases=[],vU.displayName="regex",vU.aliases=[],vB.displayName="javascript",vB.aliases=["js"],vz.displayName="abap",vz.aliases=[],vH.displayName="abnf",vH.aliases=[],v$.displayName="actionscript",v$.aliases=[],vG.displayName="ada",vG.aliases=[],vq.displayName="agda",vq.aliases=[],vW.displayName="al",vW.aliases=[],vV.displayName="antlr4",vV.aliases=["g4"],vY.displayName="apacheconf",vY.aliases=[],vK.displayName="sql",vK.aliases=[],vX.displayName="apex",vX.aliases=[],vZ.displayName="apl",vZ.aliases=[],vQ.displayName="applescript",vQ.aliases=[],vJ.displayName="aql",vJ.aliases=[],v0.displayName="c",v0.aliases=[],v1.displayName="cpp",v1.aliases=[],v2.displayName="arduino",v2.aliases=["ino"],v3.displayName="arff",v3.aliases=[],v4.displayName="armasm",v4.aliases=["arm-asm"],v5.displayName="bash",v5.aliases=["sh","shell"],v6.displayName="yaml",v6.aliases=["yml"],v9.displayName="markdown",v9.aliases=["md"],v8.displayName="arturo",v8.aliases=["art"],v7.displayName="asciidoc",v7.aliases=["adoc"],Te.displayName="csharp",Te.aliases=["cs","dotnet"],Tt.displayName="aspnet",Tt.aliases=[],Tn.displayName="asm6502",Tn.aliases=[],Tr.displayName="asmatmel",Tr.aliases=[],Ta.displayName="autohotkey",Ta.aliases=[],Ti.displayName="autoit",Ti.aliases=[],Ts.displayName="avisynth",Ts.aliases=["avs"],To.displayName="avro-idl",To.aliases=["avdl"],Tl.displayName="awk",Tl.aliases=["gawk"],Tc.displayName="basic",Tc.aliases=[],Tu.displayName="batch",Tu.aliases=[],Td.displayName="bbcode",Td.aliases=["shortcode"],Tp.displayName="bbj",Tp.aliases=[],Tm.displayName="bicep",Tm.aliases=[],Tf.displayName="birb",Tf.aliases=[],Th.displayName="bison",Th.aliases=[],Tg.displayName="bnf",Tg.aliases=["rbnf"],Tb.displayName="bqn",Tb.aliases=[],Ty.displayName="brainfuck",Ty.aliases=[],TE.displayName="brightscript",TE.aliases=[],Tx.displayName="bro",Tx.aliases=[],Tv.displayName="bsl",Tv.aliases=["oscript"],TT.displayName="cfscript",TT.aliases=["cfc"],TS.displayName="chaiscript",TS.aliases=[],T_.displayName="cil",T_.aliases=[],Tk.displayName="cilkc",Tk.aliases=["cilk-c"],Tw.displayName="cilkcpp",Tw.aliases=["cilk","cilk-cpp"],TA.displayName="clojure",TA.aliases=[],TN.displayName="cmake",TN.aliases=[],TI.displayName="cobol",TI.aliases=[],TC.displayName="coffeescript",TC.aliases=["coffee"],TR.displayName="concurnas",TR.aliases=["conc"],TO.displayName="csp",TO.aliases=[],TD.displayName="cooklang",TD.aliases=[],TL.displayName="coq",TL.aliases=[],TM.displayName="ruby",TM.aliases=["rb"],TP.displayName="crystal",TP.aliases=[],Tj.displayName="css-extras",Tj.aliases=[],TF.displayName="csv",TF.aliases=[],TU.displayName="cue",TU.aliases=[],TB.displayName="cypher",TB.aliases=[],Tz.displayName="d",Tz.aliases=[],TH.displayName="dart",TH.aliases=[],T$.displayName="dataweave",T$.aliases=[],TG.displayName="dax",TG.aliases=[],Tq.displayName="dhall",Tq.aliases=[],TW.displayName="diff",TW.aliases=[],TV.displayName="markup-templating",TV.aliases=[],TY.displayName="django",TY.aliases=["jinja2"],TK.displayName="dns-zone-file",TK.aliases=["dns-zone"],TX.displayName="docker",TX.aliases=["dockerfile"],TZ.displayName="dot",TZ.aliases=["gv"],TQ.displayName="ebnf",TQ.aliases=[],TJ.displayName="editorconfig",TJ.aliases=[],T0.displayName="eiffel",T0.aliases=[],T1.displayName="ejs",T1.aliases=["eta"],T2.displayName="elixir",T2.aliases=[],T3.displayName="elm",T3.aliases=[],T4.displayName="lua",T4.aliases=[],T5.displayName="etlua",T5.aliases=[],T6.displayName="erb",T6.aliases=[],T9.displayName="erlang",T9.aliases=[],T8.displayName="excel-formula",T8.aliases=["xls","xlsx"],T7.displayName="fsharp",T7.aliases=[],Se.displayName="factor",Se.aliases=[],St.displayName="false",St.aliases=[],Sn.displayName="firestore-security-rules",Sn.aliases=[],Sr.displayName="flow",Sr.aliases=[],Sa.displayName="fortran",Sa.aliases=[],Si.displayName="ftl",Si.aliases=[],Ss.displayName="gml",Ss.aliases=["gamemakerlanguage"],So.displayName="gap",So.aliases=[],Sl.displayName="gcode",Sl.aliases=[],Sc.displayName="gdscript",Sc.aliases=[],Su.displayName="gedcom",Su.aliases=[],Sd.displayName="gettext",Sd.aliases=["po"],Sp.displayName="gherkin",Sp.aliases=[],Sm.displayName="git",Sm.aliases=[],Sf.displayName="glsl",Sf.aliases=[],Sh.displayName="gn",Sh.aliases=["gni"],Sg.displayName="linker-script",Sg.aliases=["ld"],Sb.displayName="go",Sb.aliases=[],Sy.displayName="go-module",Sy.aliases=["go-mod"],SE.displayName="gradle",SE.aliases=[],Sx.displayName="graphql",Sx.aliases=[],Sv.displayName="groovy",Sv.aliases=[],ST.displayName="less",ST.aliases=[],SS.displayName="scss",SS.aliases=[],S_.displayName="textile",S_.aliases=[],Sk.displayName="haml",Sk.aliases=[],Sw.displayName="handlebars",Sw.aliases=["hbs","mustache"],SA.displayName="haskell",SA.aliases=["hs"],SN.displayName="haxe",SN.aliases=[],SI.displayName="hcl",SI.aliases=[],SC.displayName="hlsl",SC.aliases=[],SR.displayName="hoon",SR.aliases=[],SO.displayName="hpkp",SO.aliases=[],SD.displayName="hsts",SD.aliases=[],SL.displayName="json",SL.aliases=["webmanifest"],SM.displayName="uri",SM.aliases=["url"],SP.displayName="http",SP.aliases=[],Sj.displayName="ichigojam",Sj.aliases=[],SF.displayName="icon",SF.aliases=[],SU.displayName="icu-message-format",SU.aliases=[],SB.displayName="idris",SB.aliases=["idr"],Sz.displayName="ignore",Sz.aliases=["gitignore","hgignore","npmignore"],SH.displayName="inform7",SH.aliases=[],S$.displayName="ini",S$.aliases=[],SG.displayName="io",SG.aliases=[],Sq.displayName="j",Sq.aliases=[],SW.displayName="java",SW.aliases=[],SV.displayName="php",SV.aliases=[],SY.displayName="javadoclike",SY.aliases=[],SK.displayName="scala",SK.aliases=[],SX.displayName="javadoc",SX.aliases=[],SZ.displayName="javastacktrace",SZ.aliases=[],SQ.displayName="jexl",SQ.aliases=[],SJ.displayName="jolie",SJ.aliases=[],S0.displayName="jq",S0.aliases=[],S1.displayName="js-templates",S1.aliases=[],S2.displayName="typescript",S2.aliases=["ts"],S3.displayName="jsdoc",S3.aliases=[],S4.displayName="n4js",S4.aliases=["n4jsd"],S5.displayName="js-extras",S5.aliases=[],S6.displayName="json5",S6.aliases=[],S9.displayName="jsonp",S9.aliases=[],S8.displayName="jsstacktrace",S8.aliases=[],S7.displayName="julia",S7.aliases=[],_e.displayName="keepalived",_e.aliases=[],_t.displayName="keyman",_t.aliases=[],_n.displayName="kotlin",_n.aliases=["kt","kts"],_r.displayName="kumir",_r.aliases=["kum"],_a.displayName="kusto",_a.aliases=[],_i.displayName="latex",_i.aliases=["context","tex"],_s.displayName="latte",_s.aliases=[],_o.displayName="scheme",_o.aliases=[],_l.displayName="lilypond",_l.aliases=["ly"],_c.displayName="liquid",_c.aliases=[],_u.displayName="lisp",_u.aliases=["elisp","emacs","emacs-lisp"],_d.displayName="livescript",_d.aliases=[],_p.displayName="llvm",_p.aliases=[],_m.displayName="log",_m.aliases=[],_f.displayName="lolcode",_f.aliases=[],_h.displayName="magma",_h.aliases=[],_g.displayName="makefile",_g.aliases=[],_b.displayName="mata",_b.aliases=[],_y.displayName="matlab",_y.aliases=[],_E.displayName="maxscript",_E.aliases=[],_x.displayName="mel",_x.aliases=[],_v.displayName="mermaid",_v.aliases=[],_T.displayName="metafont",_T.aliases=[],_S.displayName="mizar",_S.aliases=[],__.displayName="mongodb",__.aliases=[],_k.displayName="monkey",_k.aliases=[],_w.displayName="moonscript",_w.aliases=["moon"],_A.displayName="n1ql",_A.aliases=[],_N.displayName="nand2tetris-hdl",_N.aliases=[],_I.displayName="naniscript",_I.aliases=["nani"],_C.displayName="nasm",_C.aliases=[],_R.displayName="neon",_R.aliases=[],_O.displayName="nevod",_O.aliases=[],_D.displayName="nginx",_D.aliases=[],_L.displayName="nim",_L.aliases=[],_M.displayName="nix",_M.aliases=[],_P.displayName="nsis",_P.aliases=[],_j.displayName="objectivec",_j.aliases=["objc"],_F.displayName="ocaml",_F.aliases=[],_U.displayName="odin",_U.aliases=[],_B.displayName="opencl",_B.aliases=[],_z.displayName="openqasm",_z.aliases=["qasm"],_H.displayName="oz",_H.aliases=[],_$.displayName="parigp",_$.aliases=[],_G.displayName="parser",_G.aliases=[],_q.displayName="pascal",_q.aliases=["objectpascal"],_W.displayName="pascaligo",_W.aliases=[],_V.displayName="psl",_V.aliases=[],_Y.displayName="pcaxis",_Y.aliases=["px"],_K.displayName="peoplecode",_K.aliases=["pcode"],_X.displayName="perl",_X.aliases=[],_Z.displayName="phpdoc",_Z.aliases=[],_Q.displayName="php-extras",_Q.aliases=[],_J.displayName="plant-uml",_J.aliases=["plantuml"],_0.displayName="plsql",_0.aliases=[],_1.displayName="powerquery",_1.aliases=["mscript","pq"],_2.displayName="powershell",_2.aliases=[],_3.displayName="processing",_3.aliases=[],_4.displayName="prolog",_4.aliases=[],_5.displayName="promql",_5.aliases=[],_6.displayName="properties",_6.aliases=[],_9.displayName="protobuf",_9.aliases=[],_8.displayName="stylus",_8.aliases=[],_7.displayName="twig",_7.aliases=[],ke.displayName="pug",ke.aliases=[],kt.displayName="puppet",kt.aliases=[],kn.displayName="pure",kn.aliases=[],kr.displayName="purebasic",kr.aliases=["pbfasm"],ka.displayName="purescript",ka.aliases=["purs"],ki.displayName="python",ki.aliases=["py"],ks.displayName="qsharp",ks.aliases=["qs"],ko.displayName="q",ko.aliases=[],kl.displayName="qml",kl.aliases=[],kc.displayName="qore",kc.aliases=[],ku.displayName="r",ku.aliases=[],kd.displayName="racket",kd.aliases=["rkt"],kp.displayName="cshtml",kp.aliases=["razor"],km.displayName="jsx",km.aliases=[],kf.displayName="tsx",kf.aliases=[],kh.displayName="reason",kh.aliases=[],kg.displayName="rego",kg.aliases=[],kb.displayName="renpy",kb.aliases=["rpy"],ky.displayName="rescript",ky.aliases=["res"],kE.displayName="rest",kE.aliases=[],kx.displayName="rip",kx.aliases=[],kv.displayName="roboconf",kv.aliases=[],kT.displayName="robotframework",kT.aliases=["robot"],kS.displayName="rust",kS.aliases=[],k_.displayName="sas",k_.aliases=[],kk.displayName="sass",kk.aliases=[],kw.displayName="shell-session",kw.aliases=["sh-session","shellsession"],kA.displayName="smali",kA.aliases=[],kN.displayName="smalltalk",kN.aliases=[],kI.displayName="smarty",kI.aliases=[],kC.displayName="sml",kC.aliases=["smlnj"],kR.displayName="solidity",kR.aliases=["sol"],kO.displayName="solution-file",kO.aliases=["sln"],kD.displayName="soy",kD.aliases=[],kL.displayName="turtle",kL.aliases=["trig"],kM.displayName="sparql",kM.aliases=["rq"],kP.displayName="splunk-spl",kP.aliases=[],kj.displayName="sqf",kj.aliases=[],kF.displayName="squirrel",kF.aliases=[],kU.displayName="stan",kU.aliases=[],kB.displayName="stata",kB.aliases=[],kz.displayName="iecst",kz.aliases=[],kH.displayName="supercollider",kH.aliases=["sclang"],k$.displayName="swift",k$.aliases=[],kG.displayName="systemd",kG.aliases=[],kq.displayName="t4-templating",kq.aliases=[],kW.displayName="t4-cs",kW.aliases=["t4"],kV.displayName="vbnet",kV.aliases=[],kY.displayName="t4-vb",kY.aliases=[],kK.displayName="tap",kK.aliases=[],kX.displayName="tcl",kX.aliases=[],kZ.displayName="tt2",kZ.aliases=[],kQ.displayName="toml",kQ.aliases=[],kJ.displayName="tremor",kJ.aliases=["trickle","troy"],k0.displayName="typoscript",k0.aliases=["tsconfig"],k1.displayName="unrealscript",k1.aliases=["uc","uscript"],k2.displayName="uorazor",k2.aliases=[],k3.displayName="v",k3.aliases=[],k4.displayName="vala",k4.aliases=[],k5.displayName="velocity",k5.aliases=[],k6.displayName="verilog",k6.aliases=[],k9.displayName="vhdl",k9.aliases=[],k8.displayName="vim",k8.aliases=[],k7.displayName="visual-basic",k7.aliases=["vb","vba"],we.displayName="warpscript",we.aliases=[],wt.displayName="wasm",wt.aliases=[],wn.displayName="web-idl",wn.aliases=["webidl"],wr.displayName="wgsl",wr.aliases=[],wa.displayName="wiki",wa.aliases=[],wi.displayName="wolfram",wi.aliases=["mathematica","nb","wl"],ws.displayName="wren",ws.aliases=[],wo.displayName="xeora",wo.aliases=["xeoracube"],wl.displayName="xml-doc",wl.aliases=[],wc.displayName="xojo",wc.aliases=[],wu.displayName="xquery",wu.aliases=[],wd.displayName="yang",wd.aliases=[],wp.displayName="zig",wp.aliases=[];let wm=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],wf={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function wh(e){let t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}function wg(e){let t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function wb(e){let t;return(t="string"==typeof e?e.charCodeAt(0):e)>=97&&t<=122||t>=65&&t<=90||wh(e)}let wy=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];var wE=0,wx={},wv={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++wE}),e.__id},clone:function e(t,n){var r,a;switch(n=n||{},wv.util.type(t)){case"Object":if(n[a=wv.util.objId(t)])return n[a];for(var i in r={},n[a]=r,t)t.hasOwnProperty(i)&&(r[i]=e(t[i],n));return r;case"Array":if(n[a=wv.util.objId(t)])return n[a];return r=[],n[a]=r,t.forEach(function(t,a){r[a]=e(t,n)}),r;default:return t}}},languages:{plain:wx,plaintext:wx,text:wx,txt:wx,extend:function(e,t){var n=wv.util.clone(wv.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var a=(r=r||wv.languages)[e],i={};for(var s in a)if(a.hasOwnProperty(s)){if(s==t)for(var o in n)n.hasOwnProperty(o)&&(i[o]=n[o]);n.hasOwnProperty(s)||(i[s]=a[s])}var l=r[e];return r[e]=i,wv.languages.DFS(wv.languages,function(t,n){n===l&&t!=e&&(this[t]=i)}),i},DFS:function e(t,n,r,a){a=a||{};var i=wv.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],r||s);var o=t[s],l=wv.util.type(o);"Object"!==l||a[i(o)]?"Array"!==l||a[i(o)]||(a[i(o)]=!0,e(o,n,s,a)):(a[i(o)]=!0,e(o,n,null,a))}}},plugins:{},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(wv.hooks.run("before-tokenize",r),!r.grammar)throw Error('The language "'+r.language+'" has no grammar.');return r.tokens=wv.tokenize(r.code,r.grammar),wv.hooks.run("after-tokenize",r),wT.stringify(wv.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var a=new w_;return wk(a,a.head,e),function e(t,n,r,a,i,s){for(var o in r)if(r.hasOwnProperty(o)&&r[o]){var l=r[o];l=Array.isArray(l)?l:[l];for(var c=0;c<l.length;++c){if(s&&s.cause==o+","+c)return;var u=l[c],d=u.inside,p=!!u.lookbehind,m=!!u.greedy,f=u.alias;if(m&&!u.pattern.global){var h=u.pattern.toString().match(/[imsuy]*$/)[0];u.pattern=RegExp(u.pattern.source,h+"g")}for(var g=u.pattern||u,b=a.next,y=i;b!==n.tail&&(!s||!(y>=s.reach));y+=b.value.length,b=b.next){var E,x=b.value;if(n.length>t.length)return;if(!(x instanceof wT)){var v=1;if(m){if(!(E=wS(g,y,t,p))||E.index>=t.length)break;var T=E.index,S=E.index+E[0].length,_=y;for(_+=b.value.length;T>=_;)_+=(b=b.next).value.length;if(_-=b.value.length,y=_,b.value instanceof wT)continue;for(var k=b;k!==n.tail&&(_<S||"string"==typeof k.value);k=k.next)v++,_+=k.value.length;v--,x=t.slice(y,_),E.index-=y}else if(!(E=wS(g,0,x,p)))continue;var T=E.index,w=E[0],A=x.slice(0,T),N=x.slice(T+w.length),I=y+x.length;s&&I>s.reach&&(s.reach=I);var C=b.prev;if(A&&(C=wk(n,C,A),y+=A.length),function(e,t,n){for(var r=t.next,a=0;a<n&&r!==e.tail;a++)r=r.next;t.next=r,r.prev=t,e.length-=a}(n,C,v),b=wk(n,C,new wT(o,d?wv.tokenize(w,d):w,f,w)),N&&wk(n,b,N),v>1){var R={cause:o+","+c,reach:I};e(t,n,r,b.prev,y,R),s&&R.reach>s.reach&&(s.reach=R.reach)}}}}}}(e,a,t,a.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(a)},hooks:{all:{},add:function(e,t){var n=wv.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=wv.hooks.all[e];if(n&&n.length)for(var r,a=0;r=n[a++];)r(t)}},Token:wT};function wT(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function wS(e,t,n,r){e.lastIndex=t;var a=e.exec(n);if(a&&r&&a[1]){var i=a[1].length;a.index+=i,a[0]=a[0].slice(i)}return a}function w_(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function wk(e,t,n){var r=t.next,a={value:n,prev:t,next:r};return t.next=a,r.prev=a,e.length++,a}function ww(){}ww.prototype=wv;let wA=new ww;wA.highlight=function(e,t){let n,r;if("string"!=typeof e)throw TypeError("Expected `string` for `value`, got `"+e+"`");if(t&&"object"==typeof t)n=t;else{if("string"!=typeof(r=t))throw TypeError("Expected `string` for `name`, got `"+r+"`");if(Object.hasOwn(wA.languages,r))n=wA.languages[r];else throw Error("Unknown language: `"+r+"` is not registered")}return{type:"root",children:wv.highlight.call(wA,e,n,r)}},wA.register=function(e){if("function"!=typeof e||!e.displayName)throw Error("Expected `function` for `syntax`, got `"+e+"`");Object.hasOwn(wA.languages,e.displayName)||e(wA)},wA.alias=function(e,t){let n,r=wA.languages,a={};for(n in"string"==typeof e?t&&(a[e]=t):a=e,a)if(Object.hasOwn(a,n)){let e=a[n],t="string"==typeof e?[e]:e,i=-1;for(;++i<t.length;)r[t[i]]=r[n]}},wA.registered=function(e){if("string"!=typeof e)throw TypeError("Expected `string` for `aliasOrLanguage`, got `"+e+"`");return Object.hasOwn(wA.languages,e)},wA.listLanguages=function(){let e,t=wA.languages,n=[];for(e in t)Object.hasOwn(t,e)&&"object"==typeof t[e]&&n.push(e);return n},wA.util.encode=function(e){return e},wA.Token.stringify=function e(t,n){if("string"==typeof t)return{type:"text",value:t};if(Array.isArray(t)){let r=[],a=-1;for(;++a<t.length;)null!==t[a]&&void 0!==t[a]&&""!==t[a]&&r.push(e(t[a],n));return r}let r={attributes:{},classes:["token",t.type],content:e(t.content,n),language:n,tag:"span",type:t.type};return t.alias&&r.classes.push(..."string"==typeof t.alias?[t.alias]:t.alias),wA.hooks.run("wrap",r),yz(r.tag+"."+r.classes.join("."),function(e){let t;for(t in e)Object.hasOwn(e,t)&&(e[t]=function(e){let t,n,r,a={},i="string"==typeof a.additional?a.additional.charCodeAt(0):a.additional,s=[],o=0,l=-1,c="";a.position&&("start"in a.position||"indent"in a.position?(n=a.position.indent,t=a.position.start):t=a.position);let u=(t?t.line:0)||1,d=(t?t.column:0)||1,p=h();for(o--;++o<=e.length;)if(10===r&&(d=(n?n[l]:0)||1),38===(r=e.charCodeAt(o))){let t,n=e.charCodeAt(o+1);if(9===n||10===n||12===n||32===n||38===n||60===n||Number.isNaN(n)||i&&n===i){c+=String.fromCharCode(r),d++;continue}let l=o+1,u=l,y=l;if(35===n){y=++u;let n=e.charCodeAt(y);88===n||120===n?(t="hexadecimal",y=++u):t="decimal"}else t="named";let E="",x="",v="",T="named"===t?wb:"decimal"===t?wh:wg;for(y--;++y<=e.length;){let n=e.charCodeAt(y);if(!T(n))break;v+=String.fromCharCode(n),"named"===t&&wm.includes(v)&&(E=v,x=hQ(v))}let S=59===e.charCodeAt(y);if(S){y++;let e="named"===t&&hQ(v);e&&(E=v,x=e)}let _=1+y-l,k="";if(S||!1!==a.nonTerminated)if(v)if("named"===t){if(S&&!x)g(5,1);else if(E!==v&&(_=1+(y=u+E.length)-u,S=!1),!S){let t=E?1:3;if(a.attribute){let n=e.charCodeAt(y);61===n?(g(t,_),x=""):wb(n)?x="":g(t,_)}else g(t,_)}k=x}else{var m,f;S||g(2,_);let e=Number.parseInt(v,"hexadecimal"===t?16:10);if((m=e)>=55296&&m<=57343||m>1114111)g(7,_),k=String.fromCharCode(65533);else if(e in wf)g(6,_),k=wf[e];else{let t="";((f=e)>=1&&f<=8||11===f||f>=13&&f<=31||f>=127&&f<=159||f>=64976&&f<=65007||(65535&f)==65535||(65535&f)==65534)&&g(6,_),e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10|55296),e=56320|1023&e),k=t+String.fromCharCode(e)}}else"named"!==t&&g(4,_);if(k){b(),p=h(),o=y-1,d+=y-l+1,s.push(k);let t=h();t.offset++,a.reference&&a.reference.call(a.referenceContext||void 0,k,{start:p,end:t},e.slice(l-1,y)),p=t}else v=e.slice(l-1,y),c+=v,d+=v.length,o=y-1}else 10===r&&(u++,l++,d=0),Number.isNaN(r)?b():(c+=String.fromCharCode(r),d++);return s.join("");function h(){return{line:u,column:d,offset:o+((t?t.offset:0)||0)}}function g(e,t){let n;a.warning&&(n=h(),n.column+=t,n.offset+=t,a.warning.call(a.warningContext||void 0,wy[e],n,e))}function b(){c&&(s.push(c),a.text&&a.text.call(a.textContext||void 0,c,{start:p,end:h()}),c="")}}(e[t]));return e}(r.attributes),r.content)},wA.register(vP),wA.register(vj),wA.register(vF),wA.register(vU),wA.register(vB),wA.register(vz),wA.register(vH),wA.register(v$),wA.register(vG),wA.register(vq),wA.register(vW),wA.register(vV),wA.register(vY),wA.register(vK),wA.register(vX),wA.register(vZ),wA.register(vQ),wA.register(vJ),wA.register(v0),wA.register(v1),wA.register(v2),wA.register(v3),wA.register(v4),wA.register(v5),wA.register(v6),wA.register(v9),wA.register(v8),wA.register(v7),wA.register(Te),wA.register(Tt),wA.register(Tn),wA.register(Tr),wA.register(Ta),wA.register(Ti),wA.register(Ts),wA.register(To),wA.register(Tl),wA.register(Tc),wA.register(Tu),wA.register(Td),wA.register(Tp),wA.register(Tm),wA.register(Tf),wA.register(Th),wA.register(Tg),wA.register(Tb),wA.register(Ty),wA.register(TE),wA.register(Tx),wA.register(Tv),wA.register(TT),wA.register(TS),wA.register(T_),wA.register(Tk),wA.register(Tw),wA.register(TA),wA.register(TN),wA.register(TI),wA.register(TC),wA.register(TR),wA.register(TO),wA.register(TD),wA.register(TL),wA.register(TM),wA.register(TP),wA.register(Tj),wA.register(TF),wA.register(TU),wA.register(TB),wA.register(Tz),wA.register(TH),wA.register(T$),wA.register(TG),wA.register(Tq),wA.register(TW),wA.register(TV),wA.register(TY),wA.register(TK),wA.register(TX),wA.register(TZ),wA.register(TQ),wA.register(TJ),wA.register(T0),wA.register(T1),wA.register(T2),wA.register(T3),wA.register(T4),wA.register(T5),wA.register(T6),wA.register(T9),wA.register(T8),wA.register(T7),wA.register(Se),wA.register(St),wA.register(Sn),wA.register(Sr),wA.register(Sa),wA.register(Si),wA.register(Ss),wA.register(So),wA.register(Sl),wA.register(Sc),wA.register(Su),wA.register(Sd),wA.register(Sp),wA.register(Sm),wA.register(Sf),wA.register(Sh),wA.register(Sg),wA.register(Sb),wA.register(Sy),wA.register(SE),wA.register(Sx),wA.register(Sv),wA.register(ST),wA.register(SS),wA.register(S_),wA.register(Sk),wA.register(Sw),wA.register(SA),wA.register(SN),wA.register(SI),wA.register(SC),wA.register(SR),wA.register(SO),wA.register(SD),wA.register(SL),wA.register(SM),wA.register(SP),wA.register(Sj),wA.register(SF),wA.register(SU),wA.register(SB),wA.register(Sz),wA.register(SH),wA.register(S$),wA.register(SG),wA.register(Sq),wA.register(SW),wA.register(SV),wA.register(SY),wA.register(SK),wA.register(SX),wA.register(SZ),wA.register(SQ),wA.register(SJ),wA.register(S0),wA.register(S1),wA.register(S2),wA.register(S3),wA.register(S4),wA.register(S5),wA.register(S6),wA.register(S9),wA.register(S8),wA.register(S7),wA.register(_e),wA.register(_t),wA.register(_n),wA.register(_r),wA.register(_a),wA.register(_i),wA.register(_s),wA.register(_o),wA.register(_l),wA.register(_c),wA.register(_u),wA.register(_d),wA.register(_p),wA.register(_m),wA.register(_f),wA.register(_h),wA.register(_g),wA.register(_b),wA.register(_y),wA.register(_E),wA.register(_x),wA.register(_v),wA.register(_T),wA.register(_S),wA.register(__),wA.register(_k),wA.register(_w),wA.register(_A),wA.register(_N),wA.register(_I),wA.register(_C),wA.register(_R),wA.register(_O),wA.register(_D),wA.register(_L),wA.register(_M),wA.register(_P),wA.register(_j),wA.register(_F),wA.register(_U),wA.register(_B),wA.register(_z),wA.register(_H),wA.register(_$),wA.register(_G),wA.register(_q),wA.register(_W),wA.register(_V),wA.register(_Y),wA.register(_K),wA.register(_X),wA.register(_Z),wA.register(_Q),wA.register(_J),wA.register(_0),wA.register(_1),wA.register(_2),wA.register(_3),wA.register(_4),wA.register(_5),wA.register(_6),wA.register(_9),wA.register(_8),wA.register(_7),wA.register(ke),wA.register(kt),wA.register(kn),wA.register(kr),wA.register(ka),wA.register(ki),wA.register(ks),wA.register(ko),wA.register(kl),wA.register(kc),wA.register(ku),wA.register(kd),wA.register(kp),wA.register(km),wA.register(kf),wA.register(kh),wA.register(kg),wA.register(kb),wA.register(ky),wA.register(kE),wA.register(kx),wA.register(kv),wA.register(kT),wA.register(kS),wA.register(k_),wA.register(kk),wA.register(kw),wA.register(kA),wA.register(kN),wA.register(kI),wA.register(kC),wA.register(kR),wA.register(kO),wA.register(kD),wA.register(kL),wA.register(kM),wA.register(kP),wA.register(kj),wA.register(kF),wA.register(kU),wA.register(kB),wA.register(kz),wA.register(kH),wA.register(k$),wA.register(kG),wA.register(kq),wA.register(kW),wA.register(kV),wA.register(kY),wA.register(kK),wA.register(kX),wA.register(kZ),wA.register(kQ),wA.register(kJ),wA.register(k0),wA.register(k1),wA.register(k2),wA.register(k3),wA.register(k4),wA.register(k5),wA.register(k6),wA.register(k9),wA.register(k8),wA.register(k7),wA.register(we),wA.register(wt),wA.register(wn),wA.register(wr),wA.register(wa),wA.register(wi),wA.register(ws),wA.register(wo),wA.register(wl),wA.register(wc),wA.register(wu),wA.register(wd),wA.register(wp);var wN=($={'code[class*="language-"]':{color:"black",background:"none",textShadow:"0 1px white",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"black",background:"#f5f2f0",textShadow:"0 1px white",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"]::selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#b3d4fc"},':not(pre) > code[class*="language-"]':{background:"#f5f2f0",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"slategray"},prolog:{color:"slategray"},doctype:{color:"slategray"},cdata:{color:"slategray"},punctuation:{color:"#999"},namespace:{Opacity:".7"},property:{color:"#905"},tag:{color:"#905"},boolean:{color:"#905"},number:{color:"#905"},constant:{color:"#905"},symbol:{color:"#905"},deleted:{color:"#905"},selector:{color:"#690"},"attr-name":{color:"#690"},string:{color:"#690"},char:{color:"#690"},builtin:{color:"#690"},inserted:{color:"#690"},operator:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},entity:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)",cursor:"help"},url:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".language-css .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".style .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},atrule:{color:"#07a"},"attr-value":{color:"#07a"},keyword:{color:"#07a"},function:{color:"#DD4A68"},"class-name":{color:"#DD4A68"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"bold"},variable:{color:"#e90"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}},function(e){var t,n,r=e.language,a=e.children,i=e.style,s=void 0===i?$:i,o=e.customStyle,l=void 0===o?{}:o,c=e.codeTagProps,u=void 0===c?{className:r?"language-".concat(r):void 0,style:vN(vN({},s['code[class*="language-"]']),s['code[class*="language-'.concat(r,'"]')])}:c,d=e.useInlineStyles,p=void 0===d||d,m=e.showLineNumbers,f=void 0!==m&&m,h=e.showInlineLineNumbers,g=void 0===h||h,b=e.startingLineNumber,y=void 0===b?1:b,E=e.lineNumberContainerStyle,x=e.lineNumberStyle,v=void 0===x?{}:x,T=e.wrapLines,S=e.wrapLongLines,_=void 0!==S&&S,k=e.lineProps,w=e.renderer,A=e.PreTag,N=void 0===A?"pre":A,I=e.CodeTag,C=void 0===I?"code":I,R=e.code,O=void 0===R?(Array.isArray(a)?a[0]:a)||"":R,D=e.astGenerator,L=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&({}).propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,vw);D=D||wA;var M=f?eu.default.createElement(vC,{containerStyle:E,codeStyle:u.style||{},numberStyle:v,startingLineNumber:y,codeString:O}):null,P=s.hljs||s['pre[class*="language-"]']||{backgroundColor:"#fff"},j=vM(D)?"hljs":"prismjs",F=p?Object.assign({},L,{style:Object.assign({},P,l)}):Object.assign({},L,{className:L.className?"".concat(j," ").concat(L.className):j,style:Object.assign({},l)});if(_?u.style=vN({whiteSpace:"pre-wrap"},u.style):u.style=vN({whiteSpace:"pre"},u.style),!D)return eu.default.createElement(N,F,M,eu.default.createElement(C,u,O));(void 0===T&&w||_)&&(T=!0),w=w||vL;var U=[{type:"text",value:O}],B=function(e){var t=e.astGenerator,n=e.language,r=e.code,a=e.defaultCodeValue;if(vM(t)){var i=-1!==t.listLanguages().indexOf(n);return"text"===n?{value:a,language:"text"}:i?t.highlight(n,r):t.highlightAuto(r)}try{return n&&"text"!==n?{value:t.highlight(r,n)}:{value:a}}catch(e){return{value:a}}}({astGenerator:D,language:r,code:O,defaultCodeValue:U});null===B.language&&(B.value=U);var z=y+(null!=(t=null==(n=O.match(/\n/g))?void 0:n.length)?t:0),H=function(e,t,n,r,a,i,s,o,l){var c,u=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];void 0===t.length&&(t=[t]);for(var a=0;a<t.length;a++){var i=t[a];if("text"===i.type)r.push(vD({children:[i],className:vE(new Set(n))}));else if(i.children){var s,o=n.concat((null==(s=i.properties)?void 0:s.className)||[]);e(i.children,o).forEach(function(e){return r.push(e)})}}return r}(e.value),d=[],p=-1,m=0;function f(e,i){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||c.length>0?function(e,i){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return vD({children:e,lineNumber:i,lineNumberStyle:o,largestLineNumber:s,showInlineLineNumbers:a,lineProps:n,className:c,showLineNumbers:r,wrapLongLines:l,wrapLines:t})}(e,i,c):function(e,t){if(r&&t&&a){var n=vO(o,t,s);e.unshift(vR(t,n))}return e}(e,i)}for(;m<u.length;)!function(){var e=u[m],t=e.children[0].value;if(t.match(vI)){var n=t.split("\n");n.forEach(function(t,a){var s=r&&d.length+i,o={type:"text",value:"".concat(t,"\n")};if(0===a){var l=f(u.slice(p+1,m).concat(vD({children:[o],className:e.properties.className})),s);d.push(l)}else if(a===n.length-1){var c=u[m+1]&&u[m+1].children&&u[m+1].children[0],h={type:"text",value:"".concat(t)};if(c){var g=vD({children:[h],className:e.properties.className});u.splice(m+1,0,g)}else{var b=f([h],s,e.properties.className);d.push(b)}}else{var y=f([o],s,e.properties.className);d.push(y)}}),p=m}m++}();if(p!==u.length-1){var h=u.slice(p+1,u.length);if(h&&h.length){var g=f(h,r&&d.length+i);d.push(g)}}return t?d:(c=[]).concat.apply(c,d)}(B,T,void 0===k?{}:k,f,g,y,z,v,_);return eu.default.createElement(N,F,eu.default.createElement(C,u,!g&&M,w({rows:H,stylesheet:s,useInlineStyles:p})))});wN.supportedLanguages=["abap","abnf","actionscript","ada","agda","al","antlr4","apacheconf","apex","apl","applescript","aql","arduino","arff","armasm","arturo","asciidoc","asm6502","asmatmel","aspnet","autohotkey","autoit","avisynth","avro-idl","awk","bash","basic","batch","bbcode","bbj","bicep","birb","bison","bnf","bqn","brainfuck","brightscript","bro","bsl","c","cfscript","chaiscript","cil","cilkc","cilkcpp","clike","clojure","cmake","cobol","coffeescript","concurnas","cooklang","coq","cpp","crystal","csharp","cshtml","csp","css-extras","css","csv","cue","cypher","d","dart","dataweave","dax","dhall","diff","django","dns-zone-file","docker","dot","ebnf","editorconfig","eiffel","ejs","elixir","elm","erb","erlang","etlua","excel-formula","factor","false","firestore-security-rules","flow","fortran","fsharp","ftl","gap","gcode","gdscript","gedcom","gettext","gherkin","git","glsl","gml","gn","go-module","go","gradle","graphql","groovy","haml","handlebars","haskell","haxe","hcl","hlsl","hoon","hpkp","hsts","http","ichigojam","icon","icu-message-format","idris","iecst","ignore","inform7","ini","io","j","java","javadoc","javadoclike","javascript","javastacktrace","jexl","jolie","jq","js-extras","js-templates","jsdoc","json","json5","jsonp","jsstacktrace","jsx","julia","keepalived","keyman","kotlin","kumir","kusto","latex","latte","less","lilypond","linker-script","liquid","lisp","livescript","llvm","log","lolcode","lua","magma","makefile","markdown","markup-templating","markup","mata","matlab","maxscript","mel","mermaid","metafont","mizar","mongodb","monkey","moonscript","n1ql","n4js","nand2tetris-hdl","naniscript","nasm","neon","nevod","nginx","nim","nix","nsis","objectivec","ocaml","odin","opencl","openqasm","oz","parigp","parser","pascal","pascaligo","pcaxis","peoplecode","perl","php-extras","php","phpdoc","plant-uml","plsql","powerquery","powershell","processing","prolog","promql","properties","protobuf","psl","pug","puppet","pure","purebasic","purescript","python","q","qml","qore","qsharp","r","racket","reason","regex","rego","renpy","rescript","rest","rip","roboconf","robotframework","ruby","rust","sas","sass","scala","scheme","scss","shell-session","smali","smalltalk","smarty","sml","solidity","solution-file","soy","sparql","splunk-spl","sqf","sql","squirrel","stan","stata","stylus","supercollider","swift","systemd","t4-cs","t4-templating","t4-vb","tap","tcl","textile","toml","tremor","tsx","tt2","turtle","twig","typescript","typoscript","unrealscript","uorazor","uri","v","vala","vbnet","velocity","verilog","vhdl","vim","visual-basic","warpscript","wasm","web-idl","wgsl","wiki","wolfram","wren","xeora","xml-doc","xojo","xquery","yaml","yang","zig"];let wI={'code[class*="language-"]':{background:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"] *::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"]::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"] *::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'pre[class*="language-"] *::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},prolog:{color:"hsl(220, 10%, 40%)"},cdata:{color:"hsl(220, 10%, 40%)"},doctype:{color:"hsl(220, 14%, 71%)"},punctuation:{color:"hsl(220, 14%, 71%)"},entity:{color:"hsl(220, 14%, 71%)",cursor:"help"},"attr-name":{color:"hsl(29, 54%, 61%)"},"class-name":{color:"hsl(29, 54%, 61%)"},boolean:{color:"hsl(29, 54%, 61%)"},constant:{color:"hsl(29, 54%, 61%)"},number:{color:"hsl(29, 54%, 61%)"},atrule:{color:"hsl(29, 54%, 61%)"},keyword:{color:"hsl(286, 60%, 67%)"},property:{color:"hsl(355, 65%, 65%)"},tag:{color:"hsl(355, 65%, 65%)"},symbol:{color:"hsl(355, 65%, 65%)"},deleted:{color:"hsl(355, 65%, 65%)"},important:{color:"hsl(355, 65%, 65%)"},selector:{color:"hsl(95, 38%, 62%)"},string:{color:"hsl(95, 38%, 62%)"},char:{color:"hsl(95, 38%, 62%)"},builtin:{color:"hsl(95, 38%, 62%)"},inserted:{color:"hsl(95, 38%, 62%)"},regex:{color:"hsl(95, 38%, 62%)"},"attr-value":{color:"hsl(95, 38%, 62%)"},"attr-value > .token.punctuation":{color:"hsl(95, 38%, 62%)"},variable:{color:"hsl(207, 82%, 66%)"},operator:{color:"hsl(207, 82%, 66%)"},function:{color:"hsl(207, 82%, 66%)"},url:{color:"hsl(187, 47%, 55%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(220, 14%, 71%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(220, 14%, 71%)"},".language-css .token.selector":{color:"hsl(355, 65%, 65%)"},".language-css .token.property":{color:"hsl(220, 14%, 71%)"},".language-css .token.function":{color:"hsl(187, 47%, 55%)"},".language-css .token.url > .token.function":{color:"hsl(187, 47%, 55%)"},".language-css .token.url > .token.string.url":{color:"hsl(95, 38%, 62%)"},".language-css .token.important":{color:"hsl(286, 60%, 67%)"},".language-css .token.atrule .token.rule":{color:"hsl(286, 60%, 67%)"},".language-javascript .token.operator":{color:"hsl(286, 60%, 67%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(5, 48%, 51%)"},".language-json .token.operator":{color:"hsl(220, 14%, 71%)"},".language-json .token.null.keyword":{color:"hsl(29, 54%, 61%)"},".language-markdown .token.url":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url > .token.operator":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url > .token.content":{color:"hsl(207, 82%, 66%)"},".language-markdown .token.url > .token.url":{color:"hsl(187, 47%, 55%)"},".language-markdown .token.url-reference.url":{color:"hsl(187, 47%, 55%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(95, 38%, 62%)"},".language-markdown .token.bold .token.content":{color:"hsl(29, 54%, 61%)"},".language-markdown .token.italic .token.content":{color:"hsl(286, 60%, 67%)"},".language-markdown .token.strike .token.content":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.list.punctuation":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(355, 65%, 65%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.cr:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.lf:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.space:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},".line-highlight.line-highlight":{background:"hsla(220, 100%, 80%, 0.04)"},".line-highlight.line-highlight:before":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 14%, 71%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 14%, 71%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(220, 100%, 80%, 0.04)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(220, 14%, 71%, 0.15)"},".command-line .command-line-prompt":{borderRightColor:"hsla(220, 14%, 71%, 0.15)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(220, 14%, 45%)"},".command-line .command-line-prompt > span:before":{color:"hsl(220, 14%, 45%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(286, 60%, 67%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(286, 60%, 67%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(286, 60%, 67%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(224, 13%, 17%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(224, 13%, 17%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(224, 13%, 17%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(224, 13%, 17%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(219, 13%, 22%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(219, 13%, 22%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(219, 13%, 22%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(220, 14%, 71%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(220, 14%, 71%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(220, 14%, 71%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(220, 14%, 71%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(220, 14%, 71%)"}},wC=ny("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"}]]);async function wR(e){try{if("u">typeof navigator&&navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch{}try{if("u"<typeof document)return!1;let t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.top="-9999px",t.style.opacity="0",document.body.appendChild(t);try{return t.select(),t.setSelectionRange(0,e.length),document.execCommand("copy")}finally{t.remove()}}catch{return!1}}let wO=eu.default.memo(({language:e,value:t})=>{let[n,r]=(0,eu.useState)(!1),a=(0,eu.useRef)(void 0);(0,eu.useEffect)(()=>()=>{a.current&&clearTimeout(a.current)},[]),(0,eu.useEffect)(()=>{r(!1),a.current&&clearTimeout(a.current)},[t]);let i=(0,eu.useCallback)(async()=>{await wR(t)?(r(!0),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>r(!1),2e3)):pz.toast.error("Couldn't copy to clipboard.")},[t]);return(0,ec.jsxs)("div",{className:"group relative max-w-full",children:[(0,ec.jsx)("button",{type:"button",onClick:i,"aria-label":n?"Copied":"Copy code",className:"absolute right-2 top-2 z-10 rounded-md border border-border bg-[var(--color-surface)] p-1.5 text-[var(--color-text-tertiary)] opacity-0 backdrop-blur-sm transition-opacity hover:text-[var(--color-text-primary)] focus-visible:opacity-100 focus-visible:ring-2 focus-visible:ring-ring group-hover:opacity-100",children:n?(0,ec.jsx)(cM,{className:"h-3.5 w-3.5","aria-hidden":"true"}):(0,ec.jsx)(wC,{className:"h-3.5 w-3.5","aria-hidden":"true"})}),(0,ec.jsx)(wN,{style:wI,language:e,PreTag:"div",className:"max-w-full rounded-md text-sm",wrapLines:!0,wrapLongLines:!0,lineProps:{style:{wordBreak:"break-all",whiteSpace:"pre-wrap",overflowWrap:"break-word"}},customStyle:{margin:0,maxWidth:"100%",overflowX:"auto",fontSize:"0.875rem"},children:t})]})});wO.displayName="CodeBlock";let wD=ny("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),wL=ny("zoom-in",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),wM=ny("zoom-out",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);var wP=e.i(921675);let wj=null,wF=Promise.resolve();async function wU(t,n,r){let a=wF.then(async()=>{let a=await (!wj&&(wj=e.A(695802).then(e=>e.default)),wj);if(a.initialize({startOnLoad:!1,theme:r,securityLevel:"strict"}),!await a.parse(n,{suppressErrors:!0}))return null;let{svg:i}=await a.render(t,n);return i});return wF=a.catch(()=>void 0),a}let wB=eu.default.memo(({code:e,isStreaming:t=!1})=>{let n=(0,eu.useId)().replace(/:/g,""),{resolvedTheme:r}=(0,wP.useTheme)(),a="dark"===r?"dark":"default",[i,s]=(0,eu.useState)(null);return((0,eu.useEffect)(()=>{if(t)return;let r=!1;return s(null),wU(`mermaid-${n}`,e,a).then(e=>{r||s(e)}).catch(()=>{r||s(null)}),()=>{r=!0}},[e,n,t,a]),t)?(0,ec.jsx)("pre",{className:"my-4 max-w-full overflow-x-auto whitespace-pre-wrap break-words rounded-md bg-[var(--color-surface)] p-3 text-xs text-[var(--color-text-tertiary)]",children:(0,ec.jsx)("code",{children:e})}):i?(0,ec.jsx)(wz,{svg:i}):(0,ec.jsx)(wO,{language:"mermaid",value:e})});wB.displayName="MermaidDiagram";let wz=eu.default.memo(({svg:e})=>{let[t,n]=(0,eu.useState)(!1),[r,a]=(0,eu.useState)(1),i=Math.round(100*r);return(0,eu.useEffect)(()=>{t&&a(1)},[t]),(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)("button",{type:"button","aria-label":"Open diagram in full view","aria-haspopup":"dialog",onClick:()=>n(!0),className:"my-4 block max-w-full cursor-zoom-in overflow-x-auto rounded-md bg-[var(--color-surface)] p-4 text-left transition-shadow hover:ring-2 hover:ring-primary/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary",dangerouslySetInnerHTML:{__html:e}}),(0,ec.jsx)(n9,{open:t,onOpenChange:n,children:(0,ec.jsxs)(re,{className:"max-h-[calc(100svh-1rem)] w-[calc(100vw-1rem)] max-w-[calc(100vw-1rem)] overflow-auto p-3 sm:max-h-[92vh] sm:w-[min(1200px,95vw)] sm:max-w-[95vw] sm:p-4",children:[(0,ec.jsx)(rr,{className:"sr-only",children:"Mermaid diagram"}),(0,ec.jsx)(ra,{className:"sr-only",children:"Full-size preview of the generated Mermaid diagram."}),(0,ec.jsxs)("div",{className:"sticky top-0 z-10 -mx-1 -mt-1 mb-2 flex items-center justify-end gap-1 bg-background/95 pb-2 pr-8 backdrop-blur",children:[(0,ec.jsx)("button",{type:"button",onClick:()=>a(e=>Math.max(.75,e-.25)),disabled:r<=.75,"aria-label":"Zoom out",className:"inline-flex size-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-40",children:(0,ec.jsx)(wM,{className:"size-4","aria-hidden":"true"})}),(0,ec.jsxs)("span",{className:"min-w-12 text-center text-xs font-medium tabular-nums text-muted-foreground","aria-live":"polite",children:[i,"%"]}),(0,ec.jsx)("button",{type:"button",onClick:()=>a(e=>Math.min(2.5,e+.25)),disabled:r>=2.5,"aria-label":"Zoom in",className:"inline-flex size-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-40",children:(0,ec.jsx)(wL,{className:"size-4","aria-hidden":"true"})}),(0,ec.jsx)("button",{type:"button",onClick:()=>a(1),"aria-label":"Reset zoom",className:"inline-flex size-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",children:(0,ec.jsx)(wD,{className:"size-4","aria-hidden":"true"})})]}),(0,ec.jsx)("div",{className:"min-w-full overflow-auto rounded-md bg-[var(--color-surface)] p-3",children:(0,ec.jsx)("div",{className:"[&_svg]:!h-auto [&_svg]:!w-full [&_svg]:!max-w-none",style:{width:`${i}%`},dangerouslySetInnerHTML:{__html:e}})})]})})]})});wz.displayName="MermaidPreview";let wH=new Set(["md","txt","json","jsonl","yaml","yml","csv","tsv","log","py","ts","tsx","js","jsx","html","css","sh","pdf","png","jpg","jpeg","gif","svg","webp","mp3","wav","mp4","mov"]);function w$(e){let t=e.trim();if(!t||/\s/.test(t)||/^[a-z][a-z0-9+.-]*:/i.test(t)||!t.includes("/"))return null;let n=t.lastIndexOf(".");if(n<=t.lastIndexOf("/"))return null;let r=t.slice(n+1).toLowerCase();if(!wH.has(r))return null;if(t.startsWith("/memories/"))return{kind:"memory",display:t,path:t.replace(/^\/memories\/+/,"")};let a=t.replace(/^\/+/,"").replace(/^\.\/+/,"");return{kind:"workspace",display:t,path:a}}let wG="evosci:open-file";function wq(e){window.dispatchEvent(new CustomEvent(wG,{detail:e}))}let wW="#evosci-file:",wV=Array.from(wH).join("|"),wY=RegExp(`(?:\\/(?:[\\w\\-.]+\\/)*|(?:[\\w\\-.]+\\/)+)[\\w\\-.]+\\.(?:${wV})\\b`,"g"),wK=new Set(["a","code","pre","script","style","kbd","samp"]);function wX(){let e=t=>{if(!t.children||0===t.children.length)return;let n=[];for(let r of t.children){let t;if("element"===r.type&&wK.has(r.tagName??"")){n.push(r);continue}if("element"===r.type){e(r),n.push(r);continue}if("text"!==r.type||"string"!=typeof r.value){n.push(r);continue}let a=r.value;wY.lastIndex=0;let i=0,s=!1;for(;null!==(t=wY.exec(a));)s=!0,t.index>i&&n.push({type:"text",value:a.slice(i,t.index)}),n.push({type:"element",tagName:"a",properties:{href:`${wW}${encodeURIComponent(t[0])}`},children:[{type:"text",value:t[0]}]}),i=t.index+t[0].length;if(!s){n.push(r);continue}i<a.length&&n.push({type:"text",value:a.slice(i)})}t.children=n};return t=>e(t)}let wZ=/\uE000(\d+)\uE001/g,wQ=/^(?:[ \t]*(?:>|(?:[-*+]|\d{1,9}[.)])(?=[ \t])))*[ \t]*/,wJ=/^(?:[ \t]*>)*[ \t]*/,w0=/^(?:[ \t]*(?:[-*+]|\d{1,9}[.)])[ \t])*/,w1=RegExp("^(?:#{1,6}(?:[ \\t]|$)|`{3,}|~{3,}|(?:(?:\\*[ \\t]*){3,}|(?:-[ \\t]*){3,}|(?:_[ \\t]*){3,}|=+[ \\t]*)$|<(?:script|pre|style|textarea)(?:[ \\t>]|$)|<!--|<\\?|<![A-Za-z]|<!\\[CDATA\\[|</?(?: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|h[1-6]|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)(?:[ \\t]|/?>|$))","i"),w2=/^(?:[-+*]|\d{1,9}[.)])(?:[ \t]|$)/,w3=/<(code|tt|kbd|samp|pre)\b[^>]{0,200}>/iy,w4=new Set(["code","tt"]),w5=/[\\^_=+<>{}]/,w6=/^(?:[A-Za-z]|\d+(?:\.\d+)?)$/;function w9(e){return wQ.exec(e)?.[0]??""}function w8(e,t){let n=t+1;for(;" "===e[n]||" "===e[n];)n++;return n>=e.length||"\n"===e[n]}function w7(e,t){let n=t;for(;"`"===e[n];)n++;return n-t}function Ae(e,t){let n=0,r=e.length;for(;n<r;){let a=n+r>>1;e[a]<t?n=a+1:r=a}return n}let At=e=>(e.match(/>/g)??[]).length;function An(e){return{type:"inlineMath",value:e,data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[{type:"text",value:e}]}}}function Ar(e){return{type:"math",value:e,data:{hName:"pre",hChildren:[{type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[{type:"text",value:e}]}]}}}function Aa(e,t){let n=[],r=0;for(let a of e.matchAll(wZ))a.index>r&&n.push(e.slice(r,a.index)),n.push(t[Number(a[1])]??a[0]),r=a.index+a[0].length;return r<e.length&&n.push(e.slice(r)),n}let Ai=e=>"text"===e.type&&!e.value?.trim();function As(e=[]){return t=>{e.length>0&&function e(t,n){let r;r=(e,t)=>e.replace(wZ,(e,r)=>{let a=n[Number(r)]?.raw;return void 0===a?e:t?a.replace(/\\([!-/:-@[-`{-~])/g,"$1"):a}),"text"!==t.type&&"string"==typeof t.value&&(t.value=r(t.value,!1)),"string"==typeof t.url&&(t.url=r(t.url,!0)),"string"==typeof t.title&&(t.title=r(t.title,!0)),"string"==typeof t.alt&&(t.alt=r(t.alt,!0)),t.children&&(t.children=t.children.flatMap(t=>{if("paragraph"===t.type){let r,a,i,s,o,l;return r=[],a=[],i=!1,s=()=>{for(;a.length>0;){let e=a[a.length-1];if("break"===e.type||Ai(e))a.pop();else break}let e=a[a.length-1];e?.type==="text"&&(e.value=e.value?.trimEnd()),a.length>0&&r.push({...t,children:a}),a=[]},o=e=>{if(i){if("break"===e.type||"text"===e.type&&(e.value=e.value?.trimStart(),!e.value))return;i=!1}a.push(e)},(l=t.children??[]).forEach((t,c)=>{if("text"!==t.type){e(t,n),o(t);return}let u=Aa(t.value??"",n);u.forEach((e,t)=>{let n;if("string"==typeof e)return void o({type:"text",value:e});let d=u[t+1],p="string"==typeof d&&/^[ \t]*\n/.test(d),m=void 0===d||"string"==typeof d&&!d.trim()&&t+2===u.length,f=l[c+1],h=p||m&&(void 0===f||"break"===f.type);e.display&&(n=a[a.length-1],a.every(Ai)||"break"===n.type||"text"===n.type&&/\n[ \t]*$/.test(n.value??""))&&h?(s(),r.push(Ar(e.tex)),i=!0):o(An(e.tex))})}),s(),r}return"text"===t.type?Aa(t.value??"",n).map(e=>"string"==typeof e?{type:"text",value:e}:An(e.tex)):(e(t,n),[t])}))}(t,e)}}function Ao(){return(e,t)=>{!function e(t,n){t.children&&(t.children=t.children.flatMap(t=>{let r="paragraph"===t.type?function(e,t){let n=[];for(let r of e.children??[]){if(Ai(r))continue;if("inlineMath"!==r.type)return null;let e=r.position?.start.offset;if(void 0===e||!t.startsWith("$$",e))return null;n.push({...Ar(r.value??""),position:r.position})}return n.length>0?n:null}(t,n):null;return r||(e(t,n),[t])}))}(e,String(t.value??""))}}let Al={...vc,attributes:{...vc.attributes,code:[...vc.attributes?.code||[],["className","math-inline","math-display"]]}},Ac=eu.default.memo(({content:e,className:t="",isStreaming:n=!1})=>{let{markdown:r,maths:a}=(0,eu.useMemo)(()=>(function(e){let t=[];if(!e.includes("\\[")&&!e.includes("\\(")||e.includes("")||e.includes(""))return{markdown:e,maths:t};let n=new Map,r=[],a=[],i=null,s=()=>{a.length>0&&r.push(function(e,t,n){let r=[],a=new Map;for(let t=0;t<e.length;){if("`"===e[t]){let n=w7(e,t),r=a.get(n);r?r.push(t):a.set(n,[t]),t+=n;continue}"\n"===e[t]&&w8(e,t)&&r.push(t),t++}let i=t=>r[Ae(r,t)]??e.length,s=(e,t)=>{let n=a.get(t)??[],r=n[Ae(n,e)];return void 0!==r&&r<i(e)?r:-1},o=new Map,l=(t,n)=>{let r=o.get(t);if(!r||n<r.from||-1!==r.at&&r.at<n){let a=RegExp(`</${t}\\s*>`,"gi");a.lastIndex=n;let i=a.exec(e);r={from:n,at:i?i.index:-1,end:i?i.index+i[0].length:-1},o.set(t,r)}return w4.has(t)?-1===r.at?e.length:r.end:-1!==r.at&&r.at<i(n)?r.end:-1},c=new Map,u=(t,n,r)=>{let a=e.indexOf("\n",t),i=e.slice(t,-1===a?e.length:a),s=wJ.exec(i)[0];if(At(s)>n())return!0;let o=i.slice(s.length);return w1.test(o)||!r&&w2.test(o)},d=r=>{let a,i="["===e[r+1],s=((t,n)=>{let r,a,i=t+2,s=()=>r??=e.slice(e.lastIndexOf("\n",t-1)+1,t),o=i;for(;" "===e[o]||" "===e[o];)o++;let l="]"===n&&(o>=e.length||"\n"===e[o])&&w9(s())===s(),d=l?"]own":n;if(i<(c.get(d)??-1))return -1;let p=()=>a??=At(w9(s()));for(let t=i;t<e.length;t++){if("\\"===e[t]){if(e[t+1]===n)return t;t++;continue}if("\n"===e[t]&&(w8(e,t)||u(t+1,p,l)))return c.set(d,t),-1}return c.set(d,e.length),-1})(r,i?"]":")");if(-1===s)return null;let o=e.slice(r+2,s);if(!((a=o.trim())&&(w5.test(a)||!i&&w6.test(a))))return null;let l=s+2,d=e.slice(r,l),p=n.get(d);if(void 0===p){let a=o;if(o.includes("\n")){let t=e.lastIndexOf("\n",r-1)+1,n=At(w9(e.slice(t,r)));a=o.split("\n").map((e,t)=>0===t?e:function(e,t){let n=e;for(let e=0;e<t;e++){let e=/^[ \t]*>[ \t]?/.exec(n);if(!e)break;n=n.slice(e[0].length)}return n}(e,n)).join("\n")}p=t.push({tex:a.trim(),display:i,raw:d})-1,n.set(d,p)}return{text:`\uE000${p}\uE001`,end:l}},p="",m=0,f=!1,h=0;for(;m<e.length;){let t=e[m];if("`"===t){let t=w7(e,m),n=s(m+t,t),r=-1===n?m+t:n+t;p+=e.slice(m,r),m=r;continue}if("<"===t){w3.lastIndex=m;let t=w3.exec(e),n=t?l(t[1].toLowerCase(),m+t[0].length):-1;if(-1!==n){p+=e.slice(m,n),m=n;continue}}if("\\"===t){let t=e[m+1],n=f||"["!==t&&"("!==t?null:d(m);if(n){p+=n.text,m=n.end;continue}p+=e.slice(m,m+2),/\s/.test(t??"")&&(f=!1),m+=2;continue}/\s/.test(t)||">"===t?f=!1:f&&"("===t?h++:f&&")"===t?h>0?h--:f=!1:!f&&(e.startsWith("://",m)||e.startsWith("www.",m))&&(f=!0,h=0),p+=t,m++}return p}(a.join("\n"),t,n)),a=[]};for(let t of e.replace(/\r\n?/g,"\n").split("\n")){if(i){r.push(t),function(e,t){let n=/^(`{3,}|~{3,})[ \t]*$/.exec(e.slice(w9(e).length));return!!n&&n[1][0]===t.char&&n[1].length>=t.size}(t,i)&&(i=null);continue}let e=function(e){let t=/^(?:[ \t]*>)*/.exec(e)[0],n=w0.exec(e.slice(t.length))[0],r=e.slice(t.length+n.length),a=/^[ \t]*/.exec(r)[0],i=a.replace(/\t/g," ").length;if(!n&&i>(t?4:3))return null;let s=/^(`{3,}|~{3,})(.*)$/.exec(r.slice(a.length));return!s||"`"===s[1][0]&&s[2].includes("`")?null:{char:s[1][0],size:s[1].length}}(t);if(e){s(),r.push(t),i=e;continue}a.push(t)}return s(),{markdown:r.join("\n"),maths:t}})(e),[e]);return(0,ec.jsx)("div",{className:n6("prose min-w-0 max-w-full overflow-hidden break-words text-sm leading-relaxed text-inherit [&_h1:first-child]:mt-0 [&_h1]:mb-4 [&_h1]:mt-6 [&_h1]:font-semibold [&_h2:first-child]:mt-0 [&_h2]:mb-4 [&_h2]:mt-6 [&_h2]:font-semibold [&_h3:first-child]:mt-0 [&_h3]:mb-4 [&_h3]:mt-6 [&_h3]:font-semibold [&_h4:first-child]:mt-0 [&_h4]:mb-4 [&_h4]:mt-6 [&_h4]:font-semibold [&_h5:first-child]:mt-0 [&_h5]:mb-4 [&_h5]:mt-6 [&_h5]:font-semibold [&_h6:first-child]:mt-0 [&_h6]:mb-4 [&_h6]:mt-6 [&_h6]:font-semibold [&_p:last-child]:mb-0 [&_p]:mb-4",t),children:(0,ec.jsx)(bx,{remarkPlugins:[yR,yj,Ao,[As,a]],rehypePlugins:[xX,wX,[vb,Al],[vo,{throwOnError:!1,strict:!1}]],components:{code({className:e,children:t,...r}){let a=/language-(\w+)/.exec(e||""),i=String(t),s=i.endsWith("\n"),o=i.replace(/\n$/,"");if(a?.[1]==="mermaid")return(0,ec.jsx)(wB,{code:o,isStreaming:n});if(a)return(0,ec.jsx)(wO,{language:a[1],value:o});let l=s?null:w$(o);return l?(0,ec.jsx)("button",{type:"button",onClick:()=>wq(l),title:`Open ${l.display}`,className:"rounded-sm bg-[var(--color-surface)] px-1 py-0.5 font-mono text-[0.9em] text-primary underline underline-offset-2 hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:l.display}):(0,ec.jsx)("code",{className:"rounded-sm bg-[var(--color-surface)] px-1 py-0.5 font-mono text-[0.9em]",...r,children:t})},pre:({children:e})=>(0,ec.jsx)("div",{className:"my-4 max-w-full overflow-hidden last:mb-0",children:e}),a({href:e,children:t}){if(e&&e.startsWith(wW)){let n,r=e.slice(wW.length);try{n=decodeURIComponent(r)}catch{n=r}let a=w$(n);return a?(0,ec.jsx)("button",{type:"button",onClick:()=>wq(a),title:`Open ${a.display}`,className:"text-primary underline underline-offset-2 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:t}):(0,ec.jsx)("span",{children:t})}return(0,ec.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-primary no-underline hover:underline",children:t})},blockquote:({children:e})=>(0,ec.jsx)("blockquote",{className:"my-4 border-l-4 border-border pl-4 italic text-[var(--color-text-tertiary)]",children:e}),ul:({children:e})=>(0,ec.jsx)("ul",{className:"my-4 list-disc pl-6 [&>li:last-child]:mb-0 [&>li]:mb-1",children:e}),ol:({children:e})=>(0,ec.jsx)("ol",{className:"my-4 list-decimal pl-6 [&>li:last-child]:mb-0 [&>li]:mb-1",children:e}),details:({children:e,...t})=>(0,ec.jsx)("details",{...t,className:"my-4 rounded-md border border-border bg-[var(--color-surface)] px-3 py-2 [&[open]>summary]:mb-2",children:e}),summary:({children:e,...t})=>(0,ec.jsx)("summary",{...t,className:"cursor-pointer select-none font-medium text-[var(--color-text-primary)] hover:text-[var(--color-text-secondary)]",children:e}),table:({children:e})=>(0,ec.jsx)("div",{className:"my-4 overflow-x-auto",children:(0,ec.jsx)("table",{className:"w-full border-collapse [&_td]:border [&_td]:border-border [&_td]:p-2 [&_th]:border [&_th]:border-border [&_th]:bg-[var(--color-surface)] [&_th]:p-2 [&_th]:text-left [&_th]:font-semibold",children:e})})},children:r})})});function Au({steps:e,hideFinalText:t,compact:n=!1,running:r=!0}){let a=new Map;for(let t of e)"tool_result"===t.kind&&t.toolCallId&&a.set(t.toolCallId,t.text);let i=-1;if(t){for(let t=e.length-1;t>=0;t--)if("text"===e[t].kind){i=t;break}}return(0,ec.jsx)("div",{className:n6("flex flex-col gap-1",n&&"gap-0.5"),children:e.map((e,t)=>{if(t===i)return null;if("tool_call"===e.kind){let i={id:e.id,name:e.name,args:e.args,result:a.get(e.id),status:a.has(e.id)?"completed":r?"pending":"stopped"};return(0,ec.jsx)(fe,{toolCall:i,compact:n},`${e.id||"tc"}-${t}`)}return"text"===e.kind?(0,ec.jsx)("div",{className:n6("px-2 text-sm",n&&"px-1 text-xs"),children:(0,ec.jsx)(Ac,{content:e.text,className:n?"text-xs leading-5 [&_blockquote]:my-2 [&_blockquote]:pl-2 [&_h1]:mb-2 [&_h1]:mt-3 [&_h1]:text-base [&_h2]:mb-2 [&_h2]:mt-3 [&_h2]:text-base [&_h3]:mb-1.5 [&_h3]:mt-3 [&_h3]:text-sm [&_h4]:mb-1.5 [&_h4]:mt-3 [&_h4]:text-sm [&_ol]:my-2 [&_ol]:pl-5 [&_p]:mb-2 [&_table]:text-[11px] [&_td]:p-1.5 [&_th]:p-1.5 [&_ul]:my-2 [&_ul]:pl-5":void 0})},`txt-${t}`):null})})}function Ad(e){switch(e){case"running":case"pending":case"busy":return"running";case"success":return"success";case"error":case"timeout":return"error";case"cancelled":case"interrupted":return"cancelled";case"expired":return"expired";default:return"unknown"}}Ac.displayName="MarkdownContent";let Ap={"writing-agent":"Writing agent","data-analysis-agent":"Data analysis agent"},Am="[Async tasks update]";function Af(e){return`${e.task_id}:${e.run_id||"legacy"}`}function Ah(e){let t=e.trim().split(/\r?\n/);if(t[0]!==Am||!t[1])return null;try{let e=JSON.parse(t[1]);if("string"!=typeof e.task_id||!e.task_id)return null;return{taskId:e.task_id,runId:"string"==typeof e.run_id&&e.run_id?e.run_id:void 0}}catch{return null}}function Ag(e,t){let n=Ah(e);return!!n&&n.taskId===t.task_id&&(!n.runId||n.runId===t.run_id)}function Ab(e){let t=e.liveStatus||e.status||"success";return[Am,JSON.stringify({agent:e.agent_name,kind:"agent",...e.run_id?{run_id:e.run_id}:{},status:t,task_id:e.task_id}),"(Signal only — fetch full result via check_async_task (sub-agents) if relevant to the current step, else acknowledge & continue.)"].join("\n")}let Ay={running:{dot:"bg-[var(--color-warning)]",label:"Running",pulse:!0},success:{dot:"bg-[var(--color-success)]",label:"Done",pulse:!1},error:{dot:"bg-[var(--color-error)]",label:"Error",pulse:!1},cancelled:{dot:"bg-muted-foreground",label:"Cancelled",pulse:!1},expired:{dot:"bg-muted-foreground",label:"Expired",pulse:!1},unknown:{dot:"bg-muted-foreground",label:"Unknown",pulse:!1}};function AE(e){let t=Ad(e);return"success"===t||"error"===t||"cancelled"===t}function Ax(e){return e.filter(e=>"running"===Ad(e.liveStatus??e.status)).length}function Av(e,t){if(!e)return"";let n=Date.parse(e);if(Number.isNaN(n))return"";let r=Math.max(0,Math.round((t-n)/1e3)),a=Math.floor(r/60);if(a>=60){let e=Math.floor(a/60);return`${e}h ${a%60}m`}return a>0?`${a}m ${r%60}s`:`${r}s`}function AT(e){if(!e||"object"!=typeof e)return;let t=e.id;return"string"==typeof t&&t.length>0?t:void 0}function AS(e,t){let n=new Map;if(0===t.length)return n;let r=new Map;t.forEach((e,t)=>{let n={actionRequest:e,actionIndex:t},a=r.get(e.name);a?a.push(n):r.set(e.name,[n])});let a=new Map;for(let t of e){if("interrupted"!==t.status)continue;let e=r.get(t.name);if(!e)continue;let i=a.get(t.name)??0;i<e.length&&(n.set(t.id,e[i]),a.set(t.name,i+1))}return n}let A_=ny("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]),Ak=ny("brain",[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]]),Aw=ny("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),AA=new Set(["stop","tool_calls","function_call","end_turn","tool_use"]),AN=eu.default.memo(({message:e,toolCalls:t,isLoading:n,isStreaming:r,actionRequests:a,submittedActionRequestKeys:i,onActionRequestSubmitted:s,reviewConfigsMap:o,ui:l,stream:c,onResumeInterrupt:u,graphId:d,onEditMessage:p,autoApprove:m,approvalAutoResolves:f,subAgentSteps:h})=>{let g="human"===e.type,b=me(e),y=b&&""!==b.trim(),E=t.length>0,x=(0,eu.useMemo)(()=>{let t=e.additional_kwargs?.reasoning_content;return"string"==typeof t&&t.trim()?t.trim():null},[e.additional_kwargs]),v=(0,eu.useMemo)(()=>{if(g)return null;let t=e.response_metadata?.finish_reason;return"string"!=typeof t||!t||AA.has(function(e){let t=e.toLowerCase();for(let e of AA)if(t!==e&&t.length%e.length==0){let n=t.length/e.length;if(n>1&&e.repeat(n)===t)return e}return t}(t))?null:{finishReason:t,variant:y||E?"partial":"missing"}},[g,y,E,e.response_metadata]),T=(0,eu.useMemo)(()=>t.filter(e=>"task"===e.name&&e.args.subagent_type&&""!==e.args.subagent_type&&null!==e.args.subagent_type).map(e=>{let t=e.args.subagent_type,n="completed"===e.status?"completed":"error"===e.status?"error":"pending"===e.status?"pending":"stopped"===e.status?"stopped":"active";return{id:e.id,name:e.name,subAgentName:t,input:e.args,output:void 0!==e.result&&null!==e.result?e.result:void 0,status:n}}),[t]),S=(0,eu.useMemo)(()=>AS(t,a??[]),[a,t]),_=(0,eu.useMemo)(()=>p7((a??[]).map(e=>({name:e.name,args:e.args})),0),[a]),k=(0,eu.useRef)({});(0,eu.useEffect)(()=>{k.current={}},[_]);let w=(0,eu.useCallback)((e,t)=>{let n=t?.decisions;if(!Array.isArray(n)||!a?.length||1===a.length||n.length===a.length)return void u?.(t);let r=n[0],i={...k.current,[e]:r};k.current=i,a.every((e,t)=>i[t])&&(k.current={},u?.({decisions:a.map((e,t)=>i[t])}))},[a,u]),[A,N]=(0,eu.useState)(!1),[I,C]=(0,eu.useState)(!1),R=(0,eu.useRef)(void 0);(0,eu.useEffect)(()=>()=>{R.current&&clearTimeout(R.current)},[]),(0,eu.useEffect)(()=>{C(!1),R.current&&clearTimeout(R.current)},[b]);let O=(0,eu.useCallback)(async()=>{b&&(await wR(b)?(C(!0),R.current&&clearTimeout(R.current),R.current=setTimeout(()=>C(!1),2e3)):pz.toast.error("Couldn't copy to clipboard."))},[b]),[D,L]=(0,eu.useState)({}),M=(0,eu.useCallback)(e=>D[e]??!1,[D]),P=(0,eu.useCallback)(e=>{L(t=>({...t,[e]:!t[e]}))},[]);return g&&null!==Ah(b)?(0,ec.jsx)("div",{className:"flex w-full justify-center py-1.5",children:(0,ec.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-border bg-muted/40 px-3 py-1 text-xs text-muted-foreground",children:[(0,ec.jsx)(A_,{className:"size-3 text-[var(--brand)]","aria-hidden":"true"}),"Background agent reported back"]})}):(0,ec.jsx)("div",{className:n6("group flex w-full max-w-full overflow-x-hidden",g&&"flex-row-reverse"),children:(0,ec.jsxs)("div",{className:n6("min-w-0 max-w-full",g?"max-w-[90%] sm:max-w-[70%]":"w-full"),children:[!g&&x&&(0,ec.jsxs)("div",{className:"mt-4",children:[(0,ec.jsxs)("button",{type:"button",onClick:()=>N(e=>!e),"aria-expanded":A,className:"flex items-center gap-1.5 text-xs font-medium text-muted-foreground hover:text-foreground",children:[(0,ec.jsx)(Aw,{className:n6("h-3.5 w-3.5 transition-transform",A&&"rotate-90"),"aria-hidden":"true"}),(0,ec.jsx)(Ak,{className:"h-3.5 w-3.5","aria-hidden":"true"}),"Thinking"]}),A&&(0,ec.jsx)("div",{className:"mt-2 whitespace-pre-wrap break-words border-l-2 border-border pl-3 text-sm leading-relaxed text-muted-foreground",children:x})]}),v&&"missing"===v.variant&&(0,ec.jsxs)("div",{className:"mt-4 flex items-start gap-2 rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-sm text-foreground",children:[(0,ec.jsx)(mF,{className:"mt-0.5 h-4 w-4 shrink-0 text-destructive","aria-hidden":"true"}),(0,ec.jsxs)("span",{children:["This turn ended without a response (",(0,ec.jsx)("span",{className:"font-mono text-xs",children:v.finishReason}),"). Re-send your last message to try again."]})]}),y&&(0,ec.jsx)("div",{className:n6("relative flex items-end gap-0"),children:(0,ec.jsx)("div",{className:n6("mt-4 overflow-hidden break-words text-sm font-normal leading-[150%]",g?"rounded-xl rounded-br-none border border-border px-3 py-2 text-foreground":"text-primary"),style:g?{backgroundColor:"var(--color-user-message-bg)"}:void 0,children:g?(0,ec.jsx)("p",{className:"m-0 whitespace-pre-wrap break-words text-sm leading-relaxed",children:b}):y?(0,ec.jsx)(Ac,{content:b,isStreaming:r}):null})}),!g&&y&&(0,ec.jsx)("div",{className:"mt-1",children:(0,ec.jsx)("button",{type:"button",onClick:O,"aria-label":I?"Copied":"Copy message",className:"inline-flex items-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",children:I?(0,ec.jsx)(cM,{className:"h-4 w-4","aria-hidden":"true"}):(0,ec.jsx)(wC,{className:"h-4 w-4","aria-hidden":"true"})})}),v&&"partial"===v.variant&&(0,ec.jsxs)("div",{className:"border-[var(--color-warning)]/30 bg-[var(--color-warning)]/5 mt-3 flex items-start gap-2 rounded-md border px-3 py-2 text-sm text-foreground",children:[(0,ec.jsx)(mF,{className:"mt-0.5 h-4 w-4 shrink-0 text-[var(--color-warning)]","aria-hidden":"true"}),(0,ec.jsxs)("span",{children:["Agent ended its turn unexpectedly (",(0,ec.jsx)("span",{className:"font-mono text-xs",children:v.finishReason}),"). The response above may be incomplete."]})]}),g&&y&&(0,ec.jsxs)("div",{className:"mt-1 flex justify-end gap-1 opacity-0 transition-opacity focus-within:opacity-100 group-hover:opacity-100",children:[(0,ec.jsx)("button",{type:"button",onClick:O,"aria-label":I?"Copied":"Copy message",className:"inline-flex items-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",children:I?(0,ec.jsx)(cM,{className:"h-4 w-4","aria-hidden":"true"}):(0,ec.jsx)(wC,{className:"h-4 w-4","aria-hidden":"true"})}),(0,ec.jsx)("button",{type:"button",onClick:()=>p?.(b),"aria-label":"Edit message",className:"inline-flex items-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",children:(0,ec.jsx)(sN,{className:"h-4 w-4","aria-hidden":"true"})})]}),E&&(0,ec.jsx)("div",{className:"mt-4 flex w-full flex-col",children:t.map(e=>{if("task"===e.name)return null;let t=l?.find(t=>t.metadata?.tool_call_id===e.id),r=S.get(e.id),a=r?.actionRequest,p=r?e.id:void 0,h=o?.get(e.name);return(0,ec.jsx)(fe,{toolCall:e,uiComponent:t,stream:c,graphId:d,actionRequest:a,actionRequestKey:p,actionRequestSubmitted:p?i?.has(p):void 0,onActionRequestSubmitted:s,reviewConfig:h,onResume:r?e=>w(r.actionIndex,e):u,isLoading:n,autoApprove:m,approvalAutoResolves:f},e.id)})}),!g&&T.length>0&&(0,ec.jsx)("div",{className:"flex w-fit max-w-full flex-col gap-4",children:T.map(e=>(0,ec.jsxs)("div",{className:"flex w-full flex-col gap-2",children:[(0,ec.jsx)(m$,{subAgent:e,onToggle:P,isExpanded:M(e.id)}),M(e.id)&&(0,ec.jsx)("div",{className:"w-full max-w-full",children:(0,ec.jsxs)("div",{className:"border-border-light rounded-md border bg-[var(--color-surface)] p-4",children:[(0,ec.jsx)("h4",{className:"mb-2 text-xs font-semibold uppercase tracking-wider text-[var(--color-text-secondary)]",children:"Input"}),(0,ec.jsx)("div",{className:"mb-4",children:(0,ec.jsx)(Ac,{content:mt(e.input)})}),(h?.[e.id]?.length??0)>0&&(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)("h4",{className:"mb-2 text-xs font-semibold uppercase tracking-wider text-[var(--color-text-secondary)]",children:"Steps"}),(0,ec.jsx)("div",{className:"mb-4",children:(0,ec.jsx)(Au,{steps:h[e.id],running:"pending"===e.status||"active"===e.status,hideFinalText:void 0!==e.output&&null!==e.output})})]}),void 0!==e.output&&null!==e.output&&(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)("h4",{className:"mb-2 text-xs font-semibold uppercase tracking-wider text-[var(--color-text-secondary)]",children:"Output"}),(0,ec.jsx)(Ac,{content:mt(e.output)})]})]})})]},e.id))})]})})});AN.displayName="ChatMessage";let AI=ny("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]),AC=eu.default.memo(({content:e,summarizedCount:t})=>{let[n,r]=(0,eu.useState)(!1),a=function(e){if(!e)return"";let t=e.match(/<summary>\s*([\s\S]*?)\s*<\/summary>/);if(t)return t[1].trim();let n=e.match(/Here is a summary of the conversation to date:\s*([\s\S]*)$/);return n?n[1].trim():e.trim()}(e);return(0,ec.jsxs)("div",{className:"my-3 w-full",children:[(0,ec.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ec.jsx)("div",{className:"h-px flex-1 bg-border"}),(0,ec.jsxs)("button",{type:"button",onClick:()=>r(e=>!e),"aria-expanded":n,className:"inline-flex items-center gap-1.5 rounded-full border border-border bg-muted/40 px-3 py-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",children:[(0,ec.jsx)(AI,{className:"size-3.5 text-[var(--brand)]","aria-hidden":"true"}),"Conversation compacted","number"==typeof t&&t>0&&(0,ec.jsxs)("span",{className:"text-muted-foreground/70",children:["· ",t," earlier"," ",1===t?"message":"messages"," summarized"]}),(0,ec.jsx)(Aw,{className:n6("size-3.5 transition-transform",n&&"rotate-90"),"aria-hidden":"true"})]}),(0,ec.jsx)("div",{className:"h-px flex-1 bg-border"})]}),n&&(0,ec.jsx)("div",{className:"mt-2 overflow-hidden rounded-md border border-border bg-muted/20 px-4 py-3",children:(0,ec.jsx)(Ac,{content:a})})]})});AC.displayName="CompactionSummary";let AR=eu.default.memo(function({items:e,isStreaming:t,defaultCollapsed:n,isAtBottom:r,lastMessageId:a,isLoading:i,actionRequests:s,submittedActionRequestKeys:o,onActionRequestSubmitted:l,reviewConfigsMap:c,stream:u,onResumeInterrupt:d,graphId:p,onEditMessage:m,autoApprove:f,approvalAutoResolves:h,subAgentSteps:g,ui:b,compactionAnchorId:y,summarizationEvent:E}){let x=(0,eu.useMemo)(()=>0!==s.length&&!(h??(f&&null!==m9(s)))&&void 0!==a&&e.some(e=>e.message.id===a),[f,h,s,a,e]),[v,T]=(0,eu.useState)(()=>!n),S=(0,eu.useRef)(t),_=(0,eu.useRef)(!1);(0,eu.useEffect)(()=>{let e=S.current;S.current=t,!_.current&&e&&!t&&!x&&n&&r&&T(!1)},[t,x,n,r]);let k=e.reduce((e,t)=>e+t.toolCalls.length,0),w=function(e){for(let t=e.length-1;t>=0;t--){let n=e[t].toolCalls;if(n.length>0)return n[n.length-1].name||"tool"}return"action"}(e),A=t?`${k} action${1===k?"":"s"} running — ${w}`:`${k} action${1===k?"":"s"} — last: ${w}`;return(0,ec.jsxs)("div",{className:"my-2",children:[(0,ec.jsxs)("button",{type:"button","aria-expanded":v,"aria-label":`${v?"Collapse":"Expand"} ${A}`,title:A,onClick:()=>{_.current=!0,T(e=>!e)},className:n6("group flex w-full items-center gap-2 rounded-md border border-border bg-[var(--color-surface)] px-3 py-2 text-left text-sm text-muted-foreground transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:[(0,ec.jsx)(Aw,{"aria-hidden":"true",className:n6("size-3.5 shrink-0 transition-transform",v&&"rotate-90")}),t&&(0,ec.jsx)(sk,{"aria-hidden":"true",className:"size-3.5 shrink-0 animate-spin text-[var(--brand)]"}),(0,ec.jsx)("span",{className:"truncate",children:A})]}),(()=>{if(v||!x||void 0===a)return null;let n=e.find(e=>e.message.id===a);if(!n||0===AS(n.toolCalls,s).size)return null;let r=b?.filter(e=>e.metadata?.message_id===n.message.id);return(0,ec.jsx)("div",{className:"mt-2 space-y-2 border-l-2 border-border pl-3",children:(0,ec.jsx)(AN,{message:n.message,toolCalls:n.toolCalls,isLoading:i,isStreaming:t,actionRequests:s,submittedActionRequestKeys:o,onActionRequestSubmitted:l,reviewConfigsMap:c??void 0,ui:r,stream:u,onResumeInterrupt:d,graphId:p,onEditMessage:m,autoApprove:f,approvalAutoResolves:h,subAgentSteps:g})})})(),v&&(0,ec.jsxs)("div",{className:"mt-2 space-y-2 border-l-2 border-border pl-3",children:[e.map(e=>{let n=e.message.id===a,r=b?.filter(t=>t.metadata?.message_id===e.message.id),x=y===e.message.id;return(0,ec.jsxs)(eu.default.Fragment,{children:[x&&E&&(0,ec.jsx)(AC,{content:E.content,summarizedCount:E.cutoffIndex}),(0,ec.jsx)(AN,{message:e.message,toolCalls:e.toolCalls,isLoading:i,isStreaming:t&&n,actionRequests:n?s:void 0,submittedActionRequestKeys:o,onActionRequestSubmitted:l,reviewConfigsMap:n?c??void 0:void 0,ui:r,stream:u,onResumeInterrupt:d,graphId:p,onEditMessage:m,autoApprove:f,approvalAutoResolves:h,subAgentSteps:g})]},e.message.id)}),(0,ec.jsxs)("button",{type:"button",onClick:()=>{_.current=!0,T(!1)},className:"flex w-full items-center justify-center gap-1.5 rounded-md py-1.5 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":`Collapse ${k} action${1===k?"":"s"}`,children:[(0,ec.jsx)(cj,{"aria-hidden":"true",className:"size-3.5"}),"Collapse"]})]})]})}),AO=ny("network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]),AD=ny("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]),AL=ny("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),AM=ny("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);function AP(e,t){let n=0x811c9dc5^t;for(let t=0;t<e.length;t++)n^=e.charCodeAt(t),n=Math.imul(n,0x1000193);return((n>>>0)/0xffffffff-.5)*4}function Aj(e){switch(e){case"complements":return"#10b981";case"contradicts":return"#f43f5e";case"supersedes":return"#f59e0b";default:return"#94a3b8"}}function AF(e){return Math.max(9,Math.min(22,9+2.5*e))}function AU(e){return"procedural"===e?"#0ea5e9":"#6366f1"}function AB(e){switch(e){case"complements":return"Complements";case"contradicts":return"Contradicts";case"supersedes":return"Supersedes";default:return e}}let Az="scheduled_task",AH="scheduler";function A$(){let e=e_();if(!e)return null;let t=e.langsmithApiKey||el.default.env.NEXT_PUBLIC_LANGSMITH_API_KEY||"";return ie(new aJ({apiUrl:e.deploymentUrl,defaultHeaders:t?{"X-Api-Key":t}:{}}))}function AG(e){let t=e.metadata??{};return{cron_id:e.cron_id,name:"string"==typeof t.name&&t.name?t.name:"Unnamed Task",prompt:"string"==typeof t.prompt?t.prompt:"",schedule:e.schedule,next_run_date:e.next_run_date??null,created_at:e.created_at,updated_at:e.updated_at}}async function Aq(){let e=A$();if(!e)return[];let t=(await e.crons.search({limit:200})).filter(e=>e.metadata?.run_kind===Az);return await Promise.allSettled(t.filter(e=>"keep"!==e.on_run_completed).map(t=>e.crons.update(t.cron_id,{onRunCompleted:"keep"}))),t.map(AG)}async function AW(e){let t=A$();if(!t)throw Error("No EvoScientist deployment configured.");return AG(await t.crons.create(AH,{input:{messages:[{role:"user",content:e.prompt}]},schedule:e.schedule,onRunCompleted:"keep",metadata:{run_kind:Az,name:e.name,prompt:e.prompt}}))}async function AV(e){let t=A$();if(!t)throw Error("No EvoScientist deployment configured.");await t.crons.delete(e)}async function AY(e){let t=await AW({name:e.name,prompt:e.prompt,schedule:e.schedule});try{return await AV(e.cronId),{task:t,oldTaskDeleted:!0}}catch{return{task:t,oldTaskDeleted:!1}}}async function AK(e){let t=A$();if(!t)throw Error("No EvoScientist deployment configured.");let n={run_kind:Az,cron_id:e.cron_id,trigger:"manual",name:e.name,prompt:e.prompt},r=await t.threads.create({graphId:AH,metadata:n});await t.runs.create(r.thread_id,AH,{input:{messages:[{role:"user",content:e.prompt}]},metadata:n,config:{configurable:{cron_id:e.cron_id}}})}async function AX(e){let t=await e.json().catch(()=>null);return e.ok?t:null}function AZ(e){let t=new Date(e).getTime();return Number.isFinite(t)?t:0}function AQ({onNavigate:e,onOpenThread:t}){let{data:n}=uQ({limit:100}),r=(0,eu.useMemo)(()=>(n??[]).flat().filter(e=>e.pinned).sort((e,t)=>t.updatedAt.getTime()-e.updatedAt.getTime()).slice(0,5),[n]),[a,i]=(0,eu.useState)(0),[s,o]=(0,eu.useState)(0),[l,c]=(0,eu.useState)(0),[u,d]=(0,eu.useState)(0),[p,m]=(0,eu.useState)([]),[f,h]=(0,eu.useState)(!1),g=(0,eu.useRef)(0);(0,eu.useEffect)(()=>{let e=++g.current;(async()=>{try{let[t,n,r,a]=await Promise.all([fetch("/api/memory/observations",{cache:"no-store"}).catch(()=>null),fetch("/api/memory/executions",{cache:"no-store"}).catch(()=>null),fetch("/api/workspace?recursive=1",{cache:"no-store"}).catch(()=>null),Aq().catch(()=>[])]),s=t?await AX(t):null,l=n?await AX(n):null,u=r?await AX(r):null;if(g.current!==e)return;d(a.length),c((Array.isArray(u?.entries)?u.entries:[]).reduce((e,t)=>e+("number"==typeof t.size?t.size:0),0));let p=Array.isArray(s?.nodes)?s.nodes:[],f=Array.isArray(l?.entries)?l.entries:[];i(p.length),o(f.length);let b=[...f.map(e=>({kind:"execution",id:e.id,created_at:e.created_at,createdAtMs:AZ(e.created_at),summary:e.summary||"Execution completed",label:e.agent||"agent",color:"var(--brand)"})),...p.map(e=>({kind:"observation",id:e.id,created_at:e.created_at,createdAtMs:AZ(e.created_at),summary:e.summary||e.id,label:e.memory_type||"memory",color:AU(e.memory_type)}))];b.sort((e,t)=>t.createdAtMs-e.createdAtMs),m(b.slice(0,5)),h(!0)}catch{g.current===e&&h(!0)}})()},[]);let b=f&&(a>0||s>0||u>0||l>0);if(!b&&0===r.length)return null;let y=l<=0?{num:"0",unit:""}:l<1024?{num:String(l),unit:"B"}:l<1048576?{num:String(Math.round(l/1024)),unit:"KB"}:{num:(l/1048576).toFixed(1),unit:"MB"},E=[{value:a,label:"Knowledge",hint:"Observations EvoScientist has learned.",Icon:AO,target:{view:"memory",tab:"knowledge"}},{value:s+a,label:"Timeline",hint:"Runs and observations on the activity timeline.",Icon:AD,target:{view:"memory",tab:"history"}},{value:y.num,unit:y.unit,label:"Workspace",hint:"Total size of files in the current workspace.",Icon:mM,target:{view:"workspace"}},{value:u,label:"Scheduled",hint:"Recurring scheduled tasks.",Icon:sS,target:{view:"schedule"}}];return(0,ec.jsxs)("div",{className:"mt-7 w-full max-w-xl text-left sm:mt-8",children:[b&&(0,ec.jsx)("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-4",children:E.map(({value:t,unit:n,label:r,hint:a,Icon:i,target:s})=>(0,ec.jsxs)("button",{type:"button",onClick:()=>e(s),title:a,"aria-label":`${r}: ${t}${n?` ${n}`:""}. ${a}`,className:"hover:border-[var(--brand)]/40 flex min-h-[82px] flex-col items-center justify-center gap-1 rounded-md border border-border bg-[var(--color-surface)] px-2 py-2.5 transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,ec.jsx)(i,{className:"size-4 text-[var(--brand)]","aria-hidden":"true"}),(0,ec.jsxs)("span",{className:"relative inline-block text-base font-bold leading-none text-foreground sm:text-lg",children:[t,n&&(0,ec.jsx)("span",{className:"absolute left-full top-0 ml-0.5 text-[9px] font-medium text-muted-foreground/70",children:n})]}),(0,ec.jsx)("span",{className:"text-[11px] leading-none text-muted-foreground",children:r})]},r))}),r.length>0&&(0,ec.jsxs)("div",{className:"mt-4 sm:mt-5",children:[(0,ec.jsxs)("div",{className:"mb-2 flex items-center gap-1.5",children:[(0,ec.jsx)(sI,{className:"size-3 text-muted-foreground","aria-hidden":"true"}),(0,ec.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Your research"})]}),(0,ec.jsx)("div",{className:"space-y-1",children:r.map(e=>(0,ec.jsxs)("button",{type:"button",onClick:()=>t(e.id),title:`Open ${e.title}`,"aria-label":`Open pinned research thread: ${e.title}`,className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,ec.jsx)(sw,{className:"size-3.5 flex-shrink-0 text-[var(--brand)]","aria-hidden":"true"}),(0,ec.jsx)("span",{className:"min-w-0 flex-1 truncate text-xs text-foreground",children:e.title}),(0,ec.jsx)("span",{className:"flex-shrink-0 text-[11px] tabular-nums text-muted-foreground",children:cq(e.updatedAt)})]},e.id))})]}),b&&p.length>0&&(0,ec.jsxs)("div",{className:"mt-4 sm:mt-5",children:[(0,ec.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,ec.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,ec.jsx)(AM,{className:"size-3 text-muted-foreground","aria-hidden":"true"}),(0,ec.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Recent activity"})]}),(0,ec.jsxs)("button",{type:"button",onClick:()=>e({view:"memory",tab:"history"}),className:"flex items-center gap-1 text-[11px] text-[var(--brand)] transition-opacity hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:["View all",(0,ec.jsx)(AL,{className:"size-3","aria-hidden":"true"})]})]}),(0,ec.jsx)("div",{className:"space-y-1",children:p.map(t=>{let n,r;return(0,ec.jsxs)("button",{type:"button",onClick:()=>e("observation"===t.kind?{view:"memory",tab:"knowledge",obsId:t.id}:{view:"memory",tab:"history",execId:t.id}),title:t.summary,"aria-label":(n="observation"===t.kind?"recent observation":"recent execution",r=cq(new Date(t.createdAtMs||NaN)),`Open ${n} from ${t.label}${""!==r&&"—"!==r?`, ${r}`:""}`),className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,ec.jsx)("span",{className:"size-2 flex-shrink-0 rounded-full",style:{background:t.color},"aria-hidden":"true"}),(0,ec.jsx)("span",{className:"flex-shrink-0 text-xs font-medium text-foreground",children:t.label}),(0,ec.jsx)("span",{className:"min-w-0 flex-1 truncate text-xs text-muted-foreground",children:t.summary}),(0,ec.jsx)("span",{className:"flex-shrink-0 text-[11px] tabular-nums text-muted-foreground",children:cq(new Date(t.createdAtMs||NaN))})]},`${t.kind}-${t.id}`)})})]})]})}let AJ=ny("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function A0({status:e}){return"running"===e?(0,ec.jsx)(sk,{size:14,className:"shrink-0 animate-spin","aria-label":"running"}):"done"===e?(0,ec.jsx)(mO,{size:14,className:"shrink-0 text-[var(--color-success)]","aria-label":"done"}):"cancelled"===e?(0,ec.jsx)(mV,{size:14,className:"shrink-0 text-muted-foreground","aria-label":"cancelled"}):(0,ec.jsx)(mq,{size:14,className:"shrink-0 text-destructive","aria-label":"error"})}function A1({evalData:e}){let t=ms(e);return t.running>0?(0,ec.jsx)(sk,{size:12,className:"shrink-0 animate-spin","aria-label":"running"}):t.failed>0?(0,ec.jsx)(mq,{size:12,className:"shrink-0 text-destructive","aria-label":"failed"}):t.cancelled>0?(0,ec.jsx)(mV,{size:12,className:"shrink-0 text-muted-foreground","aria-label":"cancelled"}):(0,ec.jsx)(mO,{size:12,className:"shrink-0 text-[var(--color-success)]","aria-label":"all done"})}function A2(e){let[t,n]=(0,eu.useState)(()=>Date.now());return(0,eu.useEffect)(()=>{if(!e)return;let t=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(t)},[e]),t}function A3({workflows:e,expanded:t,onClick:n}){let r=(0,eu.useMemo)(()=>mu(e),[e]),a=A2(r.running>0);if(0===r.phaseCount)return null;let i=r.activeEvalId?e[r.activeEvalId]:void 0,s=r.finished-r.failed-r.cancelled,o=[`${s} ✓`,r.failed>0?`${r.failed} ✗`:null,r.cancelled>0?`${r.cancelled} ⏹`:null].filter(Boolean).join(" · ");return(0,ec.jsxs)("button",{type:"button",onClick:n,"aria-expanded":t,className:"grid w-full cursor-pointer grid-cols-[auto_auto_1fr_auto] items-center gap-2.5 px-3 py-2.5 text-left transition-colors hover:bg-muted/40 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring sm:px-4",children:[r.running>0?(0,ec.jsx)(sk,{size:16,className:"animate-spin"}):r.failed>0?(0,ec.jsx)(mq,{size:16,className:"text-destructive"}):(0,ec.jsx)(AJ,{size:16,className:"text-[var(--brand)]"}),(0,ec.jsx)("span",{className:"ml-[1px] min-w-0 truncate text-sm",children:r.running>0?`Workflow ${r.finished}/${r.total}`:`Dynamic workflow \xb7 ${r.phaseCount} ${1===r.phaseCount?"phase":"phases"}`}),(0,ec.jsx)("span",{className:"min-w-0 truncate text-sm text-muted-foreground",children:r.running>0?r.runningLabel??"":o}),r.running>0&&i?(0,ec.jsx)("span",{className:"shrink-0 font-mono text-[11px] tabular-nums text-muted-foreground",children:mc(ml(i,a))}):(0,ec.jsx)("span",{})]})}function A4({workflows:e,expertNames:t}){let n=(0,eu.useMemo)(()=>Object.values(e).filter(e=>e.dispatches.length>0).sort((e,t)=>Math.min(...e.dispatches.map(e=>e.startedAt))-Math.min(...t.dispatches.map(e=>e.startedAt))),[e]),r=(0,eu.useMemo)(()=>mu(e),[e]),a=A2(r.running>0),[i,s]=(0,eu.useState)(null),[o,l]=(0,eu.useState)({}),c=(i?n.find(e=>e.evalId===i):void 0)??(r.activeEvalId?n.find(e=>e.evalId===r.activeEvalId):void 0)??n[n.length-1];return c?(0,ec.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row",children:[(0,ec.jsx)("div",{className:"flex shrink-0 flex-row gap-1 overflow-x-auto sm:w-44 sm:flex-col sm:overflow-x-visible",children:n.map((e,t)=>{let n=ms(e),r=e.evalId===c.evalId;return(0,ec.jsxs)("button",{type:"button",onClick:()=>s(e.evalId),"aria-pressed":r,className:n6("flex shrink-0 items-center gap-1.5 rounded-md px-2 py-1.5 text-left text-xs focus-visible:ring-2 focus-visible:ring-ring",r?"bg-accent font-medium text-foreground":"text-muted-foreground hover:bg-accent/60"),children:[(0,ec.jsx)(A1,{evalData:e}),(0,ec.jsxs)("span",{className:"shrink-0",children:["#",t+1]}),(0,ec.jsxs)("span",{className:"shrink-0 tabular-nums",children:[n.finished,"/",n.total]}),(0,ec.jsx)("span",{className:"min-w-0 truncate font-mono text-[10px] tabular-nums",children:mc(ml(e,a))})]},e.evalId)})}),(0,ec.jsx)("div",{className:"min-w-0 flex-1",children:(0,ec.jsx)("div",{className:"max-h-56 space-y-1 overflow-y-auto",children:c.dispatches.map(e=>{let n=!!e.error||e.description.length>0,r=!!o[e.id],i=(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)(A0,{status:e.status}),(0,ec.jsx)("span",{className:n6("shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px]",t?.has(e.subagentType)?"bg-[var(--brand-soft)] text-[var(--brand)]":"bg-muted text-muted-foreground"),title:t?.has(e.subagentType)?"Expert — dispatched with its own persona":void 0,children:e.subagentType}),(0,ec.jsx)("span",{className:"min-w-0 flex-1 truncate text-foreground",title:e.label,children:e.label}),"error"===e.status&&e.error&&(0,ec.jsx)("span",{className:"min-w-0 max-w-[40%] truncate text-destructive",title:e.error,children:e.error.slice(0,120)}),(0,ec.jsx)("span",{className:"shrink-0 font-mono text-[11px] tabular-nums text-muted-foreground",children:mc(mo(e,a))})]});return(0,ec.jsxs)("div",{className:"rounded-sm border border-border",children:[n?(0,ec.jsxs)("button",{type:"button",onClick:()=>l(t=>({...t,[e.id]:!t[e.id]})),"aria-expanded":r,className:"flex w-full items-center gap-2 bg-muted/30 p-2 text-left text-xs transition-colors hover:bg-muted/50 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",children:[i,(0,ec.jsx)(cP,{"aria-hidden":"true",className:n6("size-3 shrink-0 text-muted-foreground transition-transform",r&&"rotate-180")})]}):(0,ec.jsx)("div",{className:"flex w-full items-center gap-2 bg-muted/30 p-2 text-xs",children:i}),r&&n&&(0,ec.jsxs)("div",{className:"space-y-1 border-t border-border bg-muted/20 p-2 text-xs",children:[e.description&&(0,ec.jsx)("p",{className:"m-0 whitespace-pre-wrap break-words text-muted-foreground",children:e.description}),e.error&&(0,ec.jsx)("p",{className:"m-0 whitespace-pre-wrap break-all text-destructive",children:e.error})]})]},e.id)})})})]}):null}function A5({actionRequests:e,reviewConfigsMap:t,requestedBy:n,interruptKey:r,onResume:a,isLoading:i}){let s=(0,eu.useRef)({}),o=(0,eu.useMemo)(()=>p7(e.map(e=>({name:e.name,args:e.args})),0),[e]);return(0,eu.useEffect)(()=>{s.current={}},[o,r]),(0,ec.jsxs)("div",{className:"mt-4 flex w-full flex-col gap-3",children:[(0,ec.jsxs)("div",{className:"flex items-center gap-2 text-xs font-medium text-muted-foreground",children:[(0,ec.jsx)(mH,{size:14,"aria-hidden":"true"}),n?`Approval requested by ${n}`:"Approval requested by a sub-agent"]}),e.map((n,l)=>(0,ec.jsx)(m2,{actionRequest:n,reviewConfig:t.get(n.name),onResume:t=>((t,n)=>{let r=n?.decisions;if(!Array.isArray(r)||0===r.length)return;if(1===e.length||r.length===e.length)return void a({decisions:r});let i={...s.current,[t]:r[0]};s.current=i,e.every((e,t)=>i[t])&&(s.current={},a({decisions:e.map((e,t)=>i[t])}))})(l,t),isLoading:i},`${r??o}-${l}-${n.name}`))]})}let A6=ny("message-circle-question-mark",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),A9="__other__";function A8({questions:e,onSubmit:t,onCancel:n,isLoading:r}){let a=(0,eu.useId)(),[i,s]=(0,eu.useState)(()=>e.map(()=>"")),[o,l]=(0,eu.useState)(()=>e.map(()=>null)),c=(e,t)=>s(n=>n.map((n,r)=>r===e?t:n)),u=(e,t)=>l(n=>n.map((n,r)=>r===e?t:n)),d=e.every((e,t)=>!1===e.required||""!==i[t].trim());return(0,ec.jsxs)("section",{"aria-label":"EvoScientist needs your input",className:"w-full rounded-lg border border-border bg-muted/30 p-4",children:[(0,ec.jsxs)("div",{className:"mb-3 flex items-center gap-2 text-foreground",children:[(0,ec.jsx)(A6,{size:16,className:"text-[var(--brand)]","aria-hidden":"true"}),(0,ec.jsx)("span",{className:"text-xs font-semibold uppercase tracking-wider",children:"EvoScientist Needs Your Input"})]}),(0,ec.jsx)("div",{className:"space-y-5",children:e.map((e,t)=>(0,ec.jsxs)("div",{children:[(0,ec.jsxs)("p",{id:`${a}-question-${t}`,className:"mb-2 text-sm font-medium text-foreground",children:[e.question,!1!==e.required&&(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)("span",{className:"ml-1 text-destructive","aria-hidden":"true",children:"*"}),(0,ec.jsx)("span",{className:"sr-only",children:" (required)"})]}),!1===e.required&&(0,ec.jsx)("span",{className:"sr-only",children:" (optional)"})]}),"multiple_choice"===e.type?(0,ec.jsxs)("div",{className:"flex flex-col gap-2",role:"group","aria-labelledby":`${a}-question-${t}`,children:[e.choices?.map(e=>{let n=o[t]===e.value;return(0,ec.jsx)("button",{type:"button",disabled:r,"aria-pressed":n,onClick:()=>{u(t,e.value),c(t,e.value)},className:n6("rounded-md border px-3 py-2 text-left text-sm transition-colors",n?"border-[var(--brand-solid)] bg-[var(--brand-solid)] text-[var(--brand-foreground)]":"border-border bg-background hover:bg-accent"),children:e.value},e.value)}),(0,ec.jsx)("button",{type:"button",disabled:r,"aria-pressed":o[t]===A9,onClick:()=>{u(t,A9),c(t,"")},className:n6("rounded-md border px-3 py-2 text-left text-sm transition-colors",o[t]===A9?"border-[var(--brand)] text-foreground":"border-border bg-background hover:bg-accent"),children:"Other…"}),o[t]===A9&&(0,ec.jsx)(m1,{value:i[t],onChange:e=>c(t,e.target.value),"aria-label":`Other answer for ${e.question}`,placeholder:"Type your answer…",className:"text-sm",rows:2,disabled:r})]}):(0,ec.jsx)(m1,{value:i[t],onChange:e=>c(t,e.target.value),"aria-labelledby":`${a}-question-${t}`,placeholder:!1===e.required?"Type your answer… (optional)":"Type your answer…",className:"text-sm",rows:2,disabled:r})]},t))}),(0,ec.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2",children:[(0,ec.jsx)(rg,{variant:"outline",size:"sm",onClick:n,disabled:r,children:"Cancel"}),(0,ec.jsx)(rg,{size:"sm",onClick:()=>t(i),disabled:!d||r,className:"bg-[var(--brand-solid)] text-[var(--brand-foreground)] hover:opacity-90",children:r?"Submitting…":"Submit"})]})]})}let A7="evo-teams-change";function Ne(){window.dispatchEvent(new Event(A7))}function Nt(){let[e,t]=(0,eu.useState)([]),[n,r]=(0,eu.useState)(!0),[a,i]=(0,eu.useState)(null),[s,o]=(0,eu.useState)(0),l=(0,eu.useCallback)(()=>Ne(),[]);return(0,eu.useEffect)(()=>{let e=()=>o(e=>e+1);return window.addEventListener(A7,e),()=>window.removeEventListener(A7,e)},[]),(0,eu.useEffect)(()=>{let e=e_();if(!e)return void r(!1);let n=!1;r(!0);let a={},s=e.langsmithApiKey||el.default.env.NEXT_PUBLIC_LANGSMITH_API_KEY||"";return s&&(a["X-Api-Key"]=s),fetch(`${e.deploymentUrl.replace(/\/$/,"")}/api/teams`,{headers:a}).then(async e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return function(e){if(!e||"object"!=typeof e)return[];let t=e.teams;if(!Array.isArray(t))return[];let n=[];for(let e of t){if(!e||"object"!=typeof e)continue;let{name:t,description:r}=e;"string"==typeof t&&t&&n.push({name:t,description:"string"==typeof r?r:""})}return n}(await e.json())}).then(e=>{n||(t(e),i(null))}).catch(e=>{n||(i(e instanceof Error?e.message:"Failed to load experts."),t([]))}).finally(()=>{n||r(!1)}),()=>{n=!0}},[s]),{teams:e,loading:n,error:a,refresh:l}}function Nn({teams:e,onManage:t}){let[n,r]=(0,eu.useState)(!1),[a,i]=(0,eu.useState)(null),s=(0,eu.useRef)(null),o=(0,eu.useRef)(null),l=(0,eu.useCallback)(()=>{let e=s.current?.getBoundingClientRect();if(!e)return;let t=window.innerWidth-288-8;i({left:Math.max(8,Math.min(e.left,t)),bottom:window.innerHeight-e.top+6,maxHeight:Math.max(0,e.top-6-8)})},[]);if((0,eu.useEffect)(()=>{if(!n)return;let e=e=>{let t=e.target;s.current?.contains(t)||o.current?.contains(t)||r(!1)},t=e=>{"Escape"===e.key&&r(!1)},a=0,i=()=>{a||(a=requestAnimationFrame(()=>{a=0,l()}))};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),window.addEventListener("resize",i),window.addEventListener("scroll",i,!0),()=>{a&&cancelAnimationFrame(a),document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t),window.removeEventListener("resize",i),window.removeEventListener("scroll",i,!0)}},[n,l]),0===e.length)return null;let c=`${e.length} expert${1===e.length?"":"s"}`,u=(0,ec.jsxs)("div",{ref:o,style:a?{left:a.left,bottom:a.bottom,width:288,maxHeight:a.maxHeight}:void 0,className:"fixed z-[60] flex flex-col overflow-hidden rounded-lg border border-border bg-popover shadow-lg",children:[(0,ec.jsx)("p",{className:"shrink-0 border-b border-border px-3 py-2 text-[10px] font-semibold uppercase tracking-wider text-tertiary",children:"Available experts"}),(0,ec.jsx)("ul",{className:"min-h-0 flex-1 overflow-y-auto",children:e.map(e=>(0,ec.jsxs)("li",{className:"border-b border-border/60 px-3 py-2 last:border-b-0",children:[(0,ec.jsx)("p",{className:"text-xs font-medium text-foreground",children:e.name}),e.description&&(0,ec.jsx)("p",{className:"mt-0.5 line-clamp-2 text-[11px] leading-relaxed text-muted-foreground",children:e.description})]},e.name))}),(0,ec.jsx)("button",{type:"button",onClick:()=>{r(!1),t()},className:"w-full shrink-0 border-t border-border px-3 py-2 text-left text-[11px] font-medium text-[var(--brand)] transition-colors hover:bg-accent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",children:"Manage in Experts →"})]});return(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsxs)("button",{ref:s,type:"button",onClick:()=>{n||l(),r(e=>!e)},"aria-expanded":n,className:"inline-flex items-center gap-1.5 rounded-full border border-[var(--brand)] bg-[var(--brand-soft)] px-2 py-0.5 text-[11px] font-medium text-[var(--brand)] transition-opacity hover:opacity-80 focus-visible:ring-2 focus-visible:ring-ring",title:"Experts the orchestrator can dispatch on this deployment",children:[(0,ec.jsx)(sO,{className:"size-3","aria-hidden":"true"}),c]}),n&&"u">typeof document?(0,eP.createPortal)(u,document.body):null]})}function Nr(e,t){if("string"!=typeof e||!e.trim())return null;let n=e.trim(),r=n.lastIndexOf("/"),a=r>=0?n.slice(0,r):"";r>=0&&(n=n.slice(r+1)),n=n.replace(/-\d{8}$/,"");let i="string"==typeof t&&t.trim()||a;return{name:n,provider:i?i.charAt(0).toUpperCase()+i.slice(1):null}}function Na(e,t){let n=t?.enabled??!0,r=t?.intervalMs??3e3,a=ia(),[i,s]=(0,eu.useState)([]),[o,l]=(0,eu.useState)(!1),[c,u]=(0,eu.useState)(null),d=(0,eu.useRef)(0),p=(0,eu.useRef)(!0),m=(0,eu.useRef)(new Set);(0,eu.useEffect)(()=>{m.current.clear()},[a,e]);let f=(0,eu.useCallback)(async()=>{if(!n||!e){s([]),l(!0);return}let t=++d.current;try{let n=await a.threads.getState(e),r=function(e){if(!e||"object"!=typeof e)return[];let t=[];for(let n of Object.values(e))n&&"object"==typeof n&&"string"==typeof n.task_id&&"string"==typeof n.agent_name&&t.push({task_id:n.task_id,agent_name:n.agent_name,thread_id:"string"==typeof n.thread_id?n.thread_id:n.task_id,run_id:"string"==typeof n.run_id?n.run_id:"",status:"string"==typeof n.status?n.status:"",created_at:"string"==typeof n.created_at?n.created_at:void 0,last_updated_at:"string"==typeof n.last_updated_at?n.last_updated_at:void 0});return t.sort((e,t)=>(t.created_at??"").localeCompare(e.created_at??"")),t}(n.values?.async_tasks),i=await Promise.all(r.map(async e=>{if(!e.run_id)return{...e,liveStatus:e.status,startedAt:e.created_at};let t=`${e.thread_id}:${e.run_id}`;if(m.current.has(t))return{...e,liveStatus:"expired",startedAt:e.created_at,endedAt:e.last_updated_at??e.created_at};try{let t=await a.runs.get(e.thread_id,e.run_id),n=t.status??e.status;return{...e,liveStatus:n,startedAt:t.created_at??e.created_at,endedAt:AE(n)?t.updated_at??e.last_updated_at:void 0}}catch(n){if("object"==typeof n&&null!==n&&404===n.status)return m.current.add(t),{...e,liveStatus:"expired",startedAt:e.created_at,endedAt:e.last_updated_at??e.created_at};return{...e,liveStatus:e.status,startedAt:e.created_at}}}));if(t!==d.current||!p.current)return;s(i),u(null)}catch{t===d.current&&p.current&&u("Couldn't load background agents.")}finally{t===d.current&&p.current&&l(!0)}},[a,e,n]);return(0,eu.useEffect)(()=>{if(p.current=!0,!n)return s([]),l(!0),()=>{p.current=!1};l(!1),f();let e=setInterval(()=>{document.hidden||f()},r);return()=>{p.current=!1,clearInterval(e)}},[f,n,r]),{tasks:i,loaded:o,error:c,refresh:f}}let Ni="evoscientist-auto-notify",Ns="evoscientist-auto-notify-reported",No="evo-auto-notify-change";function Nl(){try{let e=localStorage.getItem(Ni);if(!e)return{};let t=JSON.parse(e);if(t&&"object"==typeof t&&!Array.isArray(t))return t}catch{}return{}}function Nc(){try{let e=localStorage.getItem(Ns);if(!e)return{};let t=JSON.parse(e);if(t&&"object"==typeof t&&!Array.isArray(t))return t}catch{}return{}}function Nu(e){try{localStorage.setItem(Ns,JSON.stringify(e))}catch{}}function Nd(e){return!!e&&!1!==Nl()[e]}function Np(e,t){if(!e)return;let n=Nc(),r=n[e];n[e]={initialized:!0,keys:Array.from(new Set([...r?.keys??[],...t]))},Nu(n)}function Nm(e,t){if(!e)return;let n=Nc(),r=n[e];n[e]={initialized:r?.initialized??!0,keys:Array.from(new Set([...r?.keys??[],t]))},Nu(n)}function Nf(e){let[t,n]=(0,eu.useState)(()=>Nd(e));return(0,eu.useEffect)(()=>{let t=()=>n(Nd(e));return t(),window.addEventListener(No,t),window.addEventListener("storage",t),()=>{window.removeEventListener(No,t),window.removeEventListener("storage",t)}},[e]),[t,(0,eu.useCallback)(t=>(function(e,t){if(!e)return;let n=Nl();t?delete n[e]:n[e]=!1;try{localStorage.setItem(Ni,JSON.stringify(n))}catch{}window.dispatchEvent(new Event(No))})(e,t),[e])]}let Nh="evoscientist-subagent-steps-v2",Ng="evoscientist-subagent-steps",Nb="…[truncated]";function Ny(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}function NE(){let e,t;try{e=localStorage.getItem(Nh),t=localStorage.getItem(Ng)}catch{return{}}let n=Ny(e);if(n?.version===1&&n.threads&&"object"==typeof n.threads&&!Array.isArray(n.threads))return n.threads;let r=Ny(t);if(r&&"object"==typeof r&&!Array.isArray(r)){Nx(r);try{localStorage.removeItem(Ng)}catch{}return r}return{}}function Nx(e){try{localStorage.setItem(Nh,JSON.stringify({version:1,threads:e}))}catch{}}function Nv(e,t){return e.length>t?e.slice(0,t)+Nb:e}function NT(e){return"tool_call"===e.kind?{...e,args:function e(t,n){if("string"==typeof t)return Nv(t,5e3);if(!t||"object"!=typeof t)return t;if(n>=8)return Nb;if(Array.isArray(t))return t.map(t=>e(t,n+1));let r={};for(let[a,i]of Object.entries(t))r[a]=e(i,n+1);return r}(e.args,0)}:e.text.length<=1e4?e:{...e,text:Nv(e.text,1e4)}}function NS(e){return!!e&&"object"==typeof e&&("tool_call"===e.kind?"string"==typeof e.id&&"string"==typeof e.name&&!!e.args&&"object"==typeof e.args&&!Array.isArray(e.args):"tool_result"===e.kind?"string"==typeof e.toolCallId&&"string"==typeof e.name&&"string"==typeof e.text:"text"===e.kind&&"string"==typeof e.text)}function N_(e,t){let n={};for(let[e,r]of Object.entries(t))Array.isArray(r)&&0!==r.length&&(n[e]=r.slice(-200).map(NT));let r=NE();if(0===Object.keys(n).length){if(!r[e])return;delete r[e],Nx(r);return}r[e]={updatedAt:Date.now(),tasks:n};let a=Object.keys(r);if(a.length>20){let t=a.filter(t=>t!==e);for(let e of(t.sort((e,t)=>(r[e]?.updatedAt??0)-(r[t]?.updatedAt??0)),t.slice(0,a.length-20)))delete r[e]}Nx(r)}let Nk=new Set,Nw={damping:.7,stiffness:.05,mass:1.25},NA=1e3/60,NN=!1;function NI(e,t){let n=(0,eu.useCallback)(t=>(n.current=t,e(t)),t);return n}globalThis.document?.addEventListener("mousedown",()=>{NN=!0}),globalThis.document?.addEventListener("mouseup",()=>{NN=!1}),globalThis.document?.addEventListener("click",()=>{NN=!1});let NC=new Map;function NR(...e){let t={...Nw},n=!1;for(let r of e){if("instant"===r){n=!0;continue}"object"==typeof r&&(n=!1,t.damping=r.damping??t.damping,t.stiffness=r.stiffness??t.stiffness,t.mass=r.mass??t.mass)}let r=JSON.stringify(t);return NC.has(r)||NC.set(r,Object.freeze(t)),n?"instant":NC.get(r)}let NO=ny("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),ND=(0,eu.createContext)(null);function NL(){return(0,eu.useContext)(ND)}function NM({files:e}){let t=NL();return 0===Object.keys(e).length?(0,ec.jsx)("div",{className:"flex h-full items-center justify-center p-4 text-center",children:(0,ec.jsx)("p",{className:"text-xs text-muted-foreground",children:"No files created yet"})}):(0,ec.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(256px,1fr))] gap-2",children:Object.keys(e).map(e=>(0,ec.jsxs)("button",{type:"button",onClick:()=>t?.open({source:"state",path:e}),className:"cursor-pointer space-y-1 truncate rounded-md border border-border px-2 py-3 shadow-sm transition-colors",style:{backgroundColor:"var(--color-file-button)"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="var(--color-file-button-hover)"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="var(--color-file-button)"},children:[(0,ec.jsx)(NO,{size:24,className:"mx-auto text-muted-foreground"}),(0,ec.jsx)("span",{className:"mx-auto block w-full truncate break-words text-center text-sm leading-relaxed text-foreground",children:e})]},e))})}eu.default.memo(({todos:e,files:t})=>{let[n,r]=(0,eu.useState)(!1),[a,i]=(0,eu.useState)(!1),s=(0,eu.useRef)(e.length),o=(0,eu.useRef)(Object.keys(t).length);(0,eu.useEffect)(()=>{0===s.current&&e.length>0&&r(!0),s.current=e.length},[e.length]);let l=Object.keys(t).length;(0,eu.useEffect)(()=>{0===o.current&&l>0&&i(!0),o.current=l},[l]);let c=(0,eu.useCallback)(e=>{switch(e){case"completed":return(0,ec.jsx)(mO,{size:12,className:"text-[var(--color-success)]"});case"in_progress":return(0,ec.jsx)(sS,{size:12,className:"text-[var(--color-warning)]"});default:return(0,ec.jsx)(mD,{size:10,className:"text-[var(--color-text-tertiary)]"})}},[]),u=(0,eu.useMemo)(()=>({pending:e.filter(e=>"pending"===e.status),in_progress:e.filter(e=>"in_progress"===e.status),completed:e.filter(e=>"completed"===e.status)}),[e]),d={pending:"Pending",in_progress:"In Progress",completed:"Completed"};return(0,ec.jsx)("div",{className:"min-h-0 w-full flex-1",children:(0,ec.jsx)("div",{className:"font-inter flex h-full w-full flex-col p-0",children:(0,ec.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-2 overflow-hidden",children:[(0,ec.jsxs)("div",{className:"flex items-center justify-between px-3 pb-1.5 pt-2",children:[(0,ec.jsx)("span",{className:"text-xs font-semibold tracking-wide text-zinc-600",children:"AGENT TASKS"}),(0,ec.jsx)("button",{onClick:()=>r(e=>!e),className:n6("flex h-6 w-6 items-center justify-center rounded-md text-muted-foreground transition-transform duration-200 hover:bg-muted",n?"rotate-180":"rotate-0"),"aria-label":"Toggle tasks panel",children:(0,ec.jsx)(cP,{size:14})})]}),n&&(0,ec.jsx)("div",{className:"bg-muted-secondary rounded-xl px-3 pb-2",children:(0,ec.jsx)(oo,{className:"h-full",children:0===e.length?(0,ec.jsx)("div",{className:"flex h-full items-center justify-center p-4 text-center",children:(0,ec.jsx)("p",{className:"text-xs text-muted-foreground",children:"No tasks created yet"})}):(0,ec.jsx)("div",{className:"ml-1 p-0.5",children:Object.entries(u).map(([e,t])=>(0,ec.jsxs)("div",{className:"mb-4",children:[(0,ec.jsx)("h3",{className:"mb-1 text-[10px] font-semibold uppercase tracking-wider text-tertiary",children:d[e]}),t.map((t,n)=>(0,ec.jsxs)("div",{className:"mb-1.5 flex items-start gap-2 rounded-sm p-1 text-sm",children:[c(t.status),(0,ec.jsx)("span",{className:"flex-1 break-words leading-relaxed text-inherit",children:t.content})]},`${e}_${t.id}_${n}`))]}))})})}),(0,ec.jsxs)("div",{className:"flex items-center justify-between px-3 pb-1.5 pt-2",children:[(0,ec.jsx)("span",{className:"text-xs font-semibold tracking-wide text-zinc-600",children:"FILE SYSTEM"}),(0,ec.jsx)("button",{onClick:()=>i(e=>!e),className:n6("flex h-6 w-6 items-center justify-center rounded-md text-muted-foreground transition-transform duration-200 hover:bg-muted",a?"rotate-180":"rotate-0"),"aria-label":"Toggle files panel",children:(0,ec.jsx)(cP,{size:14})})]}),a&&(0,ec.jsx)(NM,{files:t})]})})})}).displayName="TasksFilesSidebar";let NP={entries:[],defaultEntry:null},Nj=new Map,NF=[],NU=["Survey recent papers on a topic","Design an experiment plan","Analyze workspace files"];function NB(e,t){let n=t.length>0?`
|
|
8
|
+
|
|
9
|
+
Workspace files uploaded for this request:
|
|
10
|
+
${t.map(e=>`- ${e.path}`).join("\n")}`:"";return`${e}${n}`}let Nz=(e,t)=>{switch(e){case"completed":return(0,ec.jsx)(mO,{size:16,className:n6("text-[var(--color-success)]",t)});case"in_progress":return(0,ec.jsx)(sS,{size:16,className:n6("text-[var(--color-warning)]",t)});default:return(0,ec.jsx)(mD,{size:16,className:n6("text-[var(--color-text-tertiary)]",t)})}},NH=eu.default.memo(({assistant:e,onShowAgents:t,onNotifyReady:n,onNavigate:r,onOpenThread:a,workspaceOpen:i,draftSeed:s,onComposerSnapshotReady:o})=>{let l,c,u,d,p,m,[f,h]=(0,eu.useState)(null),g=(0,eu.useRef)(null),b=(0,eu.useRef)(null),y=(0,eu.useRef)(null),[E,x]=(0,eu.useState)(""),[v,T]=(0,eu.useState)([]);(0,eu.useEffect)(()=>{if(!s)return;let{text:e,files:t}=s;e&&x(t=>t.trim()?t:e),t.length>0&&T(e=>e.length>0?e:t),requestAnimationFrame(()=>{let t=b.current;t&&(t.focus(),t.setSelectionRange(e.length,e.length))})},[s]);let[S,_]=(0,eu.useState)(!1),[k,w]=(0,eu.useState)(null);(0,eu.useEffect)(()=>{let e=!1;return fetch("/api/workspace").then(e=>e.ok?e.json():null).then(t=>{!e&&t?.dir&&w(t.dir)}).catch(()=>{}),()=>{e=!0}},[]);let[A,N]=(0,eu.useState)([]),I=(0,eu.useRef)(A);I.current=A;let C=(0,eu.useRef)({input:E,pendingFiles:v});C.current={input:E,pendingFiles:v};let R=(0,eu.useRef)(o);R.current=o,(0,eu.useEffect)(()=>(R.current?.(()=>{let{input:e,pendingFiles:t}=C.current,n=I.current,r=[...n.map(e=>e.text),e].map(e=>e.trim()).filter(Boolean).join("\n\n"),a=new Set;return{text:r,files:[...n.flatMap(e=>e.files),...t].filter(e=>!a.has(e.path)&&a.add(e.path))}}),()=>R.current?.(null)),[]);let O=(0,eu.useRef)(0),D=(0,eu.useRef)(null),[L]=ev("threadId"),[M,P]=(0,eu.useState)(()=>dl(L)),[j,F]=(0,eu.useState)(!1),[U,B]=(0,eu.useState)(!1),[z,H]=(0,eu.useState)("");(0,eu.useEffect)(()=>{U&&H("")},[U]);let{registry:$,loading:G,error:q}=function(){let[e,t]=(0,eu.useState)(NP),[n,r]=(0,eu.useState)(!0),[a,i]=(0,eu.useState)(null);return(0,eu.useEffect)(()=>{let e=e_();if(!e)return void r(!1);let n=!1,a=e.langsmithApiKey||el.default.env.NEXT_PUBLIC_LANGSMITH_API_KEY||"";return(function(e,t){let n=e.replace(/\/$/,""),r=Nj.get(n);if(r)return r;let a={};t&&(a["X-Api-Key"]=t);let i=fetch(`${n}/api/models`,{headers:a}).then(async e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json(),n=[];if(Array.isArray(t.entries))for(let e of t.entries)e&&"object"==typeof e&&"string"==typeof e.name&&"string"==typeof e.provider&&e.name&&e.provider&&n.push({name:e.name,model_id:"string"==typeof e.model_id?e.model_id:e.name,provider:e.provider});let r=null;if(t.default&&"object"==typeof t.default){let e=t.default;"string"==typeof e.name&&e.name&&(r={name:e.name,provider:"string"==typeof e.provider&&e.provider?e.provider:null})}return{entries:n,defaultEntry:r}}).catch(e=>{throw Nj.delete(n),e});return Nj.set(n,i),i})(e.deploymentUrl,a).then(e=>{n||(t(e),i(null))}).catch(e=>{n||(i(e instanceof Error?e.message:"Failed to load models."),t(NP))}).finally(()=>{n||r(!1)}),()=>{n=!0}},[]),{registry:e,loading:n,error:a}}(),W=!G&&0===$.entries.length;(0,eu.useEffect)(()=>{W&&console.warn("[model picker] using curated fallback list — registry fetch failed or empty",q??"(no error message)")},[W,q]);let V=(0,eu.useMemo)(()=>$.entries.length>0?$.entries.map(e=>({model:e.name,model_provider:e.provider})):mx.map(e=>({model:e.model,model_provider:e.model_provider})),[$.entries]),Y=(0,eu.useMemo)(()=>{let e=z.trim().toLowerCase();return e?V.filter(t=>{let n=t.model_provider??"";return t.model.toLowerCase().includes(e)||n.toLowerCase().includes(e)}):V},[V,z]),K=(0,eu.useRef)(L),X=(0,eu.useRef)(!1),{scrollRef:Z,contentRef:Q,scrollToBottom:J,isAtBottom:ee}=((e={})=>{let[t,n]=(0,eu.useState)(!1),[r,a]=(0,eu.useState)(!1!==e.initial),[i,s]=(0,eu.useState)(!1),o=(0,eu.useRef)(null);o.current=e;let l=(0,eu.useCallback)(()=>{if(!NN)return!1;let e=window.getSelection();if(!e||!e.rangeCount)return!1;let t=e.getRangeAt(0);return t.commonAncestorContainer.contains(g.current)||g.current?.contains(t.commonAncestorContainer)},[]),c=(0,eu.useCallback)(e=>{d.isAtBottom=e,a(e)},[]),u=(0,eu.useCallback)(e=>{d.escapedFromLock=e,n(e)},[]),d=(0,eu.useMemo)(()=>{let n;return{escapedFromLock:t,isAtBottom:r,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return g.current?.scrollTop??0},set scrollTop(scrollTop){if(g.current){let{scrollBehavior:e}=getComputedStyle(g.current);"auto"!==e&&(g.current.style.scrollBehavior="auto"),g.current.scrollTop=scrollTop,d.ignoreScrollToTop=g.current.scrollTop,"auto"!==e&&(g.current.style.scrollBehavior=e)}},get targetScrollTop(){if(!g.current||!b.current)return 0;return g.current.scrollHeight-1-g.current.clientHeight},get calculatedTargetScrollTop(){if(!g.current||!b.current)return 0;let{targetScrollTop:t}=this;if(!e.targetScrollTop)return t;if(n?.targetScrollTop===t)return n.calculatedScrollTop;let r=Math.max(Math.min(e.targetScrollTop(t,{scrollElement:g.current,contentElement:b.current}),t),0);return n={targetScrollTop:t,calculatedScrollTop:r},requestAnimationFrame(()=>{n=void 0}),r},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=70}}},[]),p=(0,eu.useCallback)((e={})=>{let t;"string"==typeof e&&(e={animation:e}),e.preserveScrollPosition||c(!0);let n=Date.now()+(Number(e.wait)||0),r=NR(o.current,e.animation),{ignoreEscapes:a=!1}=e,i=d.calculatedTargetScrollTop;e.duration instanceof Promise?e.duration.finally(()=>{t=Date.now()}):t=n+(e.duration??0);let s=async()=>{let e=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;let{scrollTop:c}=d,u=performance.now(),m=(u-(d.lastTick??u))/NA;if(d.animation||(d.animation={behavior:r,promise:e,ignoreEscapes:a}),d.animation.behavior===r&&(d.lastTick=u),l()||n>Date.now())return s();if(c<Math.min(i,d.calculatedTargetScrollTop)){if(d.animation?.behavior===r){if("instant"===r)return d.scrollTop=d.calculatedTargetScrollTop,s();d.velocity=(r.damping*d.velocity+r.stiffness*d.scrollDifference)/r.mass,d.accumulated+=d.velocity*m,d.scrollTop+=d.accumulated,d.scrollTop!==c&&(d.accumulated=0)}return s()}return t>Date.now()?(i=d.calculatedTargetScrollTop,s()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop)?p({animation:NR(o.current,o.current.resize),ignoreEscapes:a,duration:Math.max(0,t-Date.now())||void 0}):d.isAtBottom});return e.then(e=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),e))};return(!0!==e.wait&&(d.animation=void 0),d.animation?.behavior===r)?d.animation.promise:s()},[c,l,d]),m=(0,eu.useCallback)(()=>{u(!0),c(!1)},[u,c]),f=(0,eu.useCallback)(({target:e})=>{if(e!==g.current)return;let{scrollTop:t,ignoreScrollToTop:n}=d,{lastScrollTop:r=t}=d;d.lastScrollTop=t,d.ignoreScrollToTop=void 0,n&&n>t&&(r=n),s(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||t===n)return;if(l()){u(!0),c(!1);return}let e=t>r,a=t<r;if(d.animation?.ignoreEscapes){d.scrollTop=r;return}a&&(u(!0),c(!1)),e&&u(!1),!d.escapedFromLock&&d.isNearBottom&&c(!0)},1)},[u,c,l,d]),h=(0,eu.useCallback)(({target:e,deltaY:t})=>{let n=e;for(;!["scroll","auto"].includes(getComputedStyle(n).overflow);){if(!n.parentElement)return;n=n.parentElement}n===g.current&&t<0&&g.current.scrollHeight>g.current.clientHeight&&!d.animation?.ignoreEscapes&&(u(!0),c(!1))},[u,c,d]),g=NI(e=>{g.current?.removeEventListener("scroll",f),g.current?.removeEventListener("wheel",h),e?.addEventListener("scroll",f,{passive:!0}),e?.addEventListener("wheel",h,{passive:!0})},[]),b=NI(e=>{let t;d.resizeObserver?.disconnect(),d.resizeObserver=void 0,e&&(d.resizeObserver=new ResizeObserver(([e])=>{let{height:n}=e.contentRect,r=n-(t??n);if(d.resizeDifference=r,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),s(d.isNearBottom),r>=0){let e=NR(o.current,t?o.current.resize:o.current.initial);p({animation:e,wait:!0,preserveScrollPosition:!0,duration:"instant"===e?void 0:350})}else d.isNearBottom&&(u(!1),c(!0));t=n,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===r&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(e))},[]);return{contentRef:b,scrollRef:g,scrollToBottom:p,stopScroll:m,isAtBottom:r||i,isNearBottom:i,escapedFromLock:t,state:d}})(),{stream:et,messages:en,todos:er,files:ea,ui:ei,setFiles:es,isLoading:eo,runSettled:ed,isThreadLoading:ep,interrupt:em,sendMessage:ef,abortRun:eh,resumeInterrupt:eg,subAgentActivity:eb,dynamicWorkflows:ey,asyncTasks:eE,summarizationEvent:ex,modelOverride:eT,setModelOverride:eS}=function(){let e=(0,eu.useContext)(mI);if(void 0===e)throw Error("useChatContext must be used within a ChatProvider");return e}(),ek=NL(),ew=ek?.registerChat,eA=ek?.notifyFilesMayHaveChanged,eN=!0===eo||void 0!==em;(0,eu.useEffect)(()=>{ew?.({threadId:L,files:ea,setFiles:es,editDisabled:eN})},[ew,L,ea,es,eN]),(0,eu.useEffect)(()=>()=>ew?.(null),[ew]);let eI=(0,eu.useRef)(null);(0,eu.useEffect)(()=>{if(ep)return;let e=en.filter(e=>"tool"===e.type&&e.id).map(e=>e.id),t=eI.current;if(null===t){eI.current=new Set(e);return}let n=!1;for(let r of e)t.has(r)||(t.add(r),n=!0);n&&eA?.()},[en,ep,eA]);let eC=(0,eu.useRef)(eo);(0,eu.useEffect)(()=>{eC.current&&!eo&&eA?.(),eC.current=eo},[eo,eA]);let{teams:eR}=Nt(),eO=(0,eu.useMemo)(()=>new Set(eR.map(e=>e.name)),[eR]),{tasks:eD}=Na(L,{enabled:Object.keys(eE??{}).length>0}),eL=(0,eu.useMemo)(()=>Ax(eD),[eD]),eM=(0,eu.useMemo)(()=>{let e=new Set;for(let t of en)if("ai"===t.type)for(let n of t.tool_calls??[])"task"===n.name&&n.id&&e.add(n.id);return e},[en]),eP=(0,eu.useMemo)(()=>{let e=new Set;for(let t of en){if("tool"!==t.type)continue;let n=t.tool_call_id;n&&eM.has(n)&&e.add(n)}return e},[en,eM]),ej=(0,eu.useMemo)(()=>L?function(e){let t=NE()[e];if(!t||"object"!=typeof t)return{};let n=t.tasks;if(!n||"object"!=typeof n||Array.isArray(n))return{};let r={};for(let[e,t]of Object.entries(n))Array.isArray(t)&&t.length>0&&t.every(NS)&&(r[e]=t.slice(-200));return r}(L):{},[L]),eF=(0,eu.useMemo)(()=>{let e={};for(let[t,n]of Object.entries(ej))eM.has(t)&&(e[t]=n);return e},[ej,eM]),eU=(0,eu.useMemo)(()=>{let e={};for(let[t,n]of Object.entries(eb))eM.has(t)&&(e[t]=n);return e},[eb,eM]),eB=(0,eu.useMemo)(()=>({...eF,...eU}),[eF,eU]),ez=(0,eu.useMemo)(()=>{let e={...eF};for(let[t,n]of Object.entries(eU))eP.has(t)&&n.length>0&&(e[t]=n);return e},[eP,eU,eF]),eH=(0,eu.useRef)({threadId:null,map:{}});(0,eu.useEffect)(()=>{if(eH.current={threadId:L,map:ez},!L||0===Object.keys(ez).length)return;let e=window.setTimeout(()=>{N_(L,ez)},750);return()=>window.clearTimeout(e)},[L,ez]),(0,eu.useEffect)(()=>()=>{let{threadId:e,map:t}=eH.current;e&&Object.keys(t).length>0&&N_(e,t)},[]);let[e$]=Nf(L),eG=(0,eu.useRef)(!1);(0,eu.useEffect)(()=>{eG.current=!1},[L]),(0,eu.useEffect)(()=>{eo&&(eG.current=!1)},[eo]),(0,eu.useEffect)(()=>{var e;if(!eD||0===eD.length||!L||!e$)return;if(!(L&&Nc()[L]?.initialized===!0))return void Np(L,eD.filter(e=>AE(e.liveStatus)).map(Af));if(eo||eG.current||E.trim()||A.length>0)return;let t=function(e){if(!e)return new Set;let t=Nc()[e];return new Set(Array.isArray(t?.keys)?t.keys:[])}(L);for(let n of eD){if(!AE(n.liveStatus))continue;let r=Af(n);if(!t.has(r)){if(en.some(e=>"human"===e.type&&Ag(me(e),n))){Nm(L,r);continue}eG.current=!0,Nm(L,r),ef(Ab(n)),pz.toast.success(`Auto-reported ${Ap[e=n.agent_name]??e} to the main chat.`);break}}},[eD,e$,eo,E,en,ef,L,A]),(0,eu.useEffect)(()=>{eo&&J()},[eo,J]);let eq=(0,eu.useRef)({sendMessage:ef,isLoading:eo,messages:en,threadId:L});eq.current={sendMessage:ef,isLoading:eo,messages:en,threadId:L};let eW=(0,eu.useRef)(n);eW.current=n,(0,eu.useEffect)(()=>(eW.current?.((e,t)=>{let n=eq.current;return n.threadId!==t?"wrong-thread":n.isLoading?"busy":n.messages.some(t=>"human"===t.type&&Ag(me(t),e))?"duplicate":(Nm(t,Af(e)),n.sendMessage(Ab(e)),"sent")}),()=>eW.current?.(null)),[]);let eV=(0,eu.useMemo)(()=>{if(eT)return Nr(eT.model,eT.model_provider);if($.defaultEntry)return Nr($.defaultEntry.name,$.defaultEntry.provider??void 0);let t=e?.config,n=t?.configurable;if(n){let e=Nr(n.model??n.model_name,n.model_provider);if(e)return e}for(let e=en.length-1;e>=0;e--){let t=en[e];if("ai"!==t.type)continue;let n=t.response_metadata,r=Nr(n?.model_name??n?.model,n?.model_provider);if(r)return r}return null},[en,eT,e?.config,$.defaultEntry]),eY=em?.value,eK=eY?.type==="ask_user"||Array.isArray(eY?.action_requests)&&eY.action_requests.length>0,eX=eo||!e||eK;(0,eu.useEffect)(()=>{if(eo||eK||eG.current||0===A.length)return;let[e,...t]=A;e.threadId===L&&(eG.current=!0,N(t),ef(NB(e.text,e.files)))},[eo,eK,A,ef,L]);let eZ=(0,eu.useRef)(L);(0,eu.useEffect)(()=>{let e=eZ.current;(eZ.current=L,null===e&&null!==L)?N(e=>e.map(e=>null===e.threadId?{...e,threadId:L}:e)):e!==L&&N([])},[L]);let eQ=(0,eu.useCallback)(()=>{P(!0),dc(L,!0),F(!1)},[L]),eJ=(0,eu.useCallback)(()=>{P(!1),dc(L,!1),F(!1)},[L]);(0,eu.useEffect)(()=>{let e=K.current;if(e!==L){if(null===e&&null!==L&&X.current){let e;(e=dr())[dt]&&(e[L]=!0),dt in e&&(delete e[dt],da(e))}else null===e&&null!==L&&dc(null,!1);P(dl(L)),F(!1),T([]),X.current=!1,K.current=L}},[L]);let e0=(0,eu.useCallback)(async e=>{let t=Array.from(e.target.files??[]);if(e.target.value="",0!==t.length){_(!0);try{let e=new FormData;t.forEach(t=>e.append("files",t));let n=await fetch("/api/workspace/upload",{method:"POST",body:e}),r=await n.json();if(!n.ok||!r.files)throw Error(r.error||"Failed to upload files.");T(e=>[...e,...r.files]),pz.toast.success(`${r.files.length} file${1===r.files.length?"":"s"} uploaded to the workspace.`)}catch(e){pz.toast.error(e instanceof Error?e.message:"Failed to upload files.")}finally{_(!1)}}},[]),e1=(0,eu.useCallback)(e=>{T(t=>t.filter(t=>t.path!==e))},[]),e2=(0,eu.useCallback)(async e=>{if(e){if("show"===e.kind)return void B(!0);try{if("reset"===e.kind)await eS(null),pz.toast.success("Model override cleared.");else{let t={model:e.model,...e.provider?{model_provider:e.provider}:{}};await eS(t),pz.toast.success(`Model set to ${e.model}${e.provider?` (${e.provider})`:""}.`)}}catch(e){pz.toast.error(e instanceof Error?`Couldn't update model: ${e.message}`:"Couldn't update model — try again.")}}},[eS]),e3=(0,eu.useCallback)(t=>{t&&t.preventDefault();let n=E.trim();if(!n)return;let r=function(e){let t=e.trim();if("/model"!==t&&!t.startsWith("/model "))return null;let n=t.slice(6).trim();if(!n)return{kind:"show"};let r=n.split(/\s+/);return"reset"===r[0].toLowerCase()&&1===r.length?{kind:"reset"}:r.length>2?null:{kind:"set",model:r[0],provider:r[1]}}(n);if(r){e2(r),x("");return}if(e&&!eK&&!S){if(eo){N(e=>[...e,{id:O.current+=1,text:n,files:v,threadId:L}]),x(""),T([]);return}X.current=null===L&&M,ef(NB(n,v)),x(""),T([])}},[E,e2,e,eK,M,eo,S,v,ef,L]),e4=(0,eu.useCallback)(e=>{let t=I.current.find(t=>t.id===e);t&&(N(t=>t.filter(t=>t.id!==e)),x(t.text),T(t.files),requestAnimationFrame(()=>{let e=b.current;e&&(e.focus(),e.setSelectionRange(t.text.length,t.text.length))}))},[]),e5=(0,eu.useCallback)(e=>{N(t=>{let n=t.find(t=>t.id===e);return n&&t[0]?.id!==e?[n,...t.filter(t=>t.id!==e)]:t}),pz.toast.info("This message will run next without interrupting the current turn.")},[]),e6=(0,eu.useCallback)((e,t)=>{N(n=>{let r=n.findIndex(t=>t.id===e),a=r+t;if(r<0||a<0||a>=n.length)return n;let i=[...n],[s]=i.splice(r,1);return i.splice(a,0,s),i})},[]),e9=(0,eu.useCallback)(e=>{let t=D.current;D.current=null,null!==t&&t!==e&&N(n=>{let r=n.findIndex(e=>e.id===t),a=n.findIndex(t=>t.id===e);if(r<0||a<0)return n;let i=[...n],[s]=i.splice(r,1);return i.splice(a,0,s),i})},[]),e8=(0,eu.useCallback)(e=>{N(t=>t.filter(t=>t.id!==e))},[]),e7=(0,eu.useCallback)(()=>{N([])},[]),te=(0,eu.useCallback)(e=>{if(!eK&&!e.nativeEvent.isComposing&&229!==e.keyCode){if("ArrowUp"===e.key&&0===E.length&&I.current.length>0){e.preventDefault();let t=I.current;e4(t[t.length-1].id);return}"Enter"!==e.key||e.shiftKey||(e.preventDefault(),e3())}},[e3,eK,E,e4]),tt=(0,eu.useCallback)(e=>{x(e),requestAnimationFrame(()=>{let t=b.current;t&&(t.focus(),t.setSelectionRange(e.length,e.length))})},[]),tn=(0,eu.useCallback)(e=>{x(e),requestAnimationFrame(()=>b.current?.focus())},[]),tr=function(){let e=(0,eu.useContext)(it);if(!e)throw Error("useDeployment must be used within a ClientProvider");return{deploymentUrl:e.deploymentUrl,apiKey:e.apiKey}}(),ta=function({interrupt:e,deploymentUrl:t,apiKey:n}){let r,a=t?t.replace(/\/$/,""):null,i=Array.isArray(r=e?.value?.action_requests)?r:[],s=i.length>0?mS(e):null,o=null!==s&&void 0!==AT(e),l=JSON.stringify(i),c=o&&a?`${a}
|
|
11
|
+
${function(e){if(!e)return"";let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)|0;return(t>>>0).toString(36)}(n)}
|
|
12
|
+
${s}
|
|
13
|
+
${l}`:null,[u,d]=(0,eu.useState)(null);return((0,eu.useEffect)(()=>{if(!c||!a||Nk.has(a))return;let e=JSON.parse(l),t=!1,r=new AbortController,i=setTimeout(()=>r.abort(),2e3),s=e=>{t||d({key:c,decisions:e})},o={"Content-Type":"application/json"};return n&&(o["X-Api-Key"]=n),fetch(`${a}/api/policy`,{method:"POST",headers:o,body:`{"action_requests":${l}}`,signal:r.signal}).then(async t=>404===t.status||405===t.status?(Nk.add(a),s(null)):t.ok?void s(function(e,t){if(!e||"object"!=typeof e)return null;let n=e.decisions;if(!Array.isArray(n)||0===n.length||n.length!==t.length)return null;let r=[];for(let e of n){if(!e||"object"!=typeof e)return null;let{type:t,message:n}=e;if("approve"===t)r.push({type:"approve"});else{if("reject"!==t)return null;r.push("string"==typeof n?{type:"reject",message:n}:{type:"reject"})}}return r}(await t.json(),e)):s(null)).catch(()=>s(null)).finally(()=>clearTimeout(i)),()=>{t=!0,clearTimeout(i),r.abort()}},[c,a,n,l]),s)?!c||!a||Nk.has(a)?{interruptKey:s,checking:!1,decisions:null}:u?.key===c?{interruptKey:s,checking:!1,decisions:u.decisions}:{interruptKey:s,checking:!0,decisions:null}:{interruptKey:null,checking:!1,decisions:null}}({interrupt:em,deploymentUrl:tr.deploymentUrl,apiKey:tr.apiKey});!function({autoApprove:e,interrupt:t,resumeInterrupt:n,isLoading:r,resetKey:a,policy:i}){let s=(0,eu.useRef)(new Set),o=(0,eu.useRef)(new Set),l=(0,eu.useRef)({resetKey:a,autoApprove:e});(0,eu.useEffect)(()=>{let t=l.current;(t.resetKey!==a||t.autoApprove!==e)&&(l.current={resetKey:a,autoApprove:e},s.current=new Set,t.resetKey!==a&&(o.current=new Set))},[a,e]);let c=i?.interruptKey??null,u=i?.checking??!1,d=i?.decisions??null;(0,eu.useEffect)(()=>{if(r||u)return;let a=t?.value?.action_requests;if(!t||!Array.isArray(a)||0===a.length)return;let i=mS(t);if(null===i)return;let l=c===i?d:null,p=m8(a,l,e);if(null!==p&&!o.current.has(i)){var m,f;if(null!==l)o.current.add(i);else if(s.current.has(i))return;s.current.add(i),n((m=AT(t),f={decisions:p},m?{[m]:f}:f))}},[e,t,n,r,a,c,u,d])}({autoApprove:M,interrupt:em,resumeInterrupt:eg,isLoading:eo,resetKey:L,policy:ta});let ti=(0,eu.useMemo)(()=>{let e=em?.value;return e?.type==="ask_user"&&Array.isArray(e.questions)?e.questions:null},[em]),ts=(0,eu.useCallback)(e=>{eg({status:"answered",answers:e})},[eg]),to=(0,eu.useCallback)(()=>{eg({status:"cancelled"})},[eg]),tl=(0,eu.useMemo)(()=>{let e=em?.value&&em.value.action_requests;return Array.isArray(e)?e:[]},[em]),tc=(0,eu.useMemo)(()=>AT(em),[em]),tu=tl.length>0&&(ta.checking||null!==m8(tl,ta.decisions,M)),td=(0,eu.useCallback)(e=>{var t,n;eg((t=tc,n=e,t?{[t]:n}:n))},[eg,tc]),tp=(0,eu.useMemo)(()=>{let e=new Map,t=new Set,n=en.filter(e=>{if("human"===e.type){let n,r=(n=Ah(me(e)))?`${n.taskId}:${n.runId||"legacy"}`:null;return!r||!t.has(r)&&(t.add(r),!0)}let n=et.getMessagesMetadata(e)?.streamMetadata,r=n?.langgraph_checkpoint_ns;return!("string"==typeof r&&r.includes("|")||function(e){if("human"===e.type){var t;if("human"!==e.type)return!1;let n=e.additional_kwargs;return n?.lc_source==="summarization"}return"ai"===e.type&&!!(t=me(e))&&(!!(/\bconversation that has been summarized\b/.test(t)||/\bHere is a summary of the conversation to date\b/.test(t)||/<summary>[\s\S]*<\/summary>/.test(t))||/##\s+SESSION INTENT\b/.test(t))}(e))}),r=new Set;for(let e of n){if("tool"!==e.type)continue;let t=e.tool_call_id;t&&r.add(t)}let a=new Map;for(let e of tl)a.set(e.name,(a.get(e.name)??0)+1);let i=-1;n.forEach((e,t)=>{"human"===e.type&&(i=t)}),n.forEach((t,n)=>{let s=n>i;if("ai"===t.type){let n,i=new Map,o=(n=[],t.additional_kwargs?.tool_calls&&Array.isArray(t.additional_kwargs.tool_calls)?n.push(...t.additional_kwargs.tool_calls):t.tool_calls&&Array.isArray(t.tool_calls)?n.push(...t.tool_calls.filter(e=>""!==e.name)):Array.isArray(t.content)&&n.push(...t.content.filter(e=>"tool_use"===e.type)),n.map(e=>{let t=e.function?.arguments||e.args||e.input||{};return{id:e.id,name:e.function?.name||e.name||e.type||"",args:function(e){if(e&&"object"==typeof e)return e;if("string"!=typeof e)return{};try{let t=JSON.parse(e);return t&&"object"==typeof t?t:{}}catch{return{}}}(t)}})).map((e,t)=>({toolCall:e,sourceIndex:t})).filter(({toolCall:e})=>{if("string"!=typeof e.id||!e.id)return!0;let t=i.get(e.id);return t?(0===Object.keys(t.args).length&&Object.keys(e.args).length>0&&(t.args=e.args),!t.name&&e.name&&(t.name=e.name),!1):(i.set(e.id,e),!0)}).filter(({toolCall:e})=>"ToolSelectionResponse"!==e.name||eo&&!em).map(({toolCall:e,sourceIndex:n})=>{let i=e.name||"unknown",o=e.id||`${t.id??"ai-message"}-tool-${n}-${i}`,l=a.get(i)??0,c=l>0&&s&&!r.has(o);return c&&a.set(i,l-1),{id:o,name:i,args:e.args,status:c?"interrupted":ed||!s?"stopped":"pending"}});e.set(t.id,{message:t,toolCalls:o})}else if("tool"===t.type){let n=t.tool_call_id;if(!n)return;for(let[,r]of e.entries()){let e=r.toolCalls.findIndex(e=>e.id===n);if(-1!==e){r.toolCalls[e]={...r.toolCalls[e],status:"completed",result:me(t)};break}}}else"human"===t.type&&e.set(t.id,{message:t,toolCalls:[]})});let s=Array.from(e.values());return s.map((e,t)=>{let n=t>0?s[t-1].message:null;return{...e,showAvatar:e.message.type!==n?.type}})},[en,tl,em,eo,ed,et]),tm=(0,eu.useMemo)(()=>Object.values(ey).some(e=>e.dispatches.length>0),[ey]),{value:tf}=r_(),th=e=>{let t=e.content;if("string"==typeof t)return t.trim().length>0;if(Array.isArray(t))for(let e of t){let t=e?.text;if("string"==typeof t&&t.trim().length>0)return!0}return!1},tg=(0,eu.useMemo)(()=>{let e=[];for(let t of tp)if("ai"===t.message.type&&t.toolCalls.length>0&&!th(t.message)){let n=e[e.length-1];n?.kind==="action-group"?n.items.push(t):e.push({kind:"action-group",items:[t]})}else e.push({kind:"message",data:t});return e},[tp]),tb=tp.length>0?tp[tp.length-1].message.id:void 0,ty=(0,eu.useMemo)(()=>{if(!ex)return null;let e=new Set(tp.map(e=>e.message.id));for(let t=ex.cutoffIndex;t<en.length;t++){let n=en[t]?.id;if(null!=n&&e.has(n))return n}return null},[ex,en,tp]),tE={in_progress:er.filter(e=>"in_progress"===e.status),pending:er.filter(e=>"pending"===e.status),completed:er.filter(e=>"completed"===e.status)},tx=er.length>0,tv=Object.keys(ea).length>0,[tT,tS]=(0,eu.useState)(()=>new Set);(0,eu.useEffect)(()=>{0===tl.length&&tS(new Set)},[tl.length]);let t_=(0,eu.useCallback)(e=>{tS(t=>{let n=new Set(t);return n.add(e),n})},[]),tk=(0,eu.useMemo)(()=>{let e=em?.value&&em.value.review_configs;if(!Array.isArray(e))return new Map;let t=[];for(let n of e){let e=n.actionName??n.action_name;e&&t.push([e,{actionName:e,allowedDecisions:n.allowedDecisions??n.allowed_decisions}])}return new Map(t)},[em]),tw=(0,eu.useMemo)(()=>{for(let e=tp.length-1;e>=0;e--){let t=tp[e];if("ai"===t.message.type)return t.toolCalls}return[]},[tp]),tA=(0,eu.useMemo)(()=>"fallback"==(0===tl.length?"none":AS(tw,tl).size===tl.length?"inline":"fallback"),[tl,tw]),tN=tA?NF:tl,tI=(0,eu.useMemo)(()=>{let e=new Set(tw.filter(e=>"task"===e.name&&"completed"!==e.status).map(e=>e.args.subagent_type).filter(e=>"string"==typeof e&&e.length>0));return 1===e.size?[...e][0]:null},[tw]);return(0,ec.jsxs)("div",{className:"flex flex-1 flex-col overflow-hidden",children:[(0,ec.jsx)(n9,{open:j,onOpenChange:F,children:(0,ec.jsxs)(re,{className:"sm:max-w-md",children:[(0,ec.jsxs)(rt,{children:[(0,ec.jsx)(rr,{children:"Enable Auto-approve?"}),(0,ec.jsx)(ra,{children:"EvoScientist will run routine tool actions in this research without asking. Dangerous shell commands (piping downloads into an interpreter or network tool) are auto-rejected, delete is auto-approved, and schedule_task always asks first."})]}),(0,ec.jsxs)("div",{className:"flex items-start gap-3 rounded-lg border border-amber-300 bg-amber-50 p-3 text-sm text-amber-950 dark:border-amber-800 dark:bg-amber-950/40 dark:text-amber-100",children:[(0,ec.jsx)(mF,{className:"mt-0.5 size-4 shrink-0","aria-hidden":"true"}),(0,ec.jsx)("p",{children:"Auto-approve stays on for this research only and follows it across views and reloads. Delete is included; scheduled tasks still show an approval card here."})]}),(0,ec.jsxs)(rn,{children:[(0,ec.jsx)(rg,{variant:"outline",onClick:()=>F(!1),children:"Cancel"}),(0,ec.jsx)(rg,{onClick:eQ,className:"bg-amber-600 text-white hover:bg-amber-700",children:"Enable Auto-approve"})]})]})}),(0,ec.jsx)(n9,{open:U,onOpenChange:B,children:(0,ec.jsxs)(re,{className:"sm:max-w-md",children:[(0,ec.jsxs)(rt,{children:[(0,ec.jsx)(rr,{children:"Pick a model for this chat"}),(0,ec.jsxs)(ra,{children:["The choice applies per-thread. Type"," ",(0,ec.jsx)("span",{className:"font-mono text-xs",children:"/model <name>"})," ","in the composer to use a name not in the list."]})]}),(0,ec.jsxs)("div",{className:"mt-2 space-y-2",children:[(0,ec.jsxs)("div",{className:"text-xs text-muted-foreground",children:["Current:"," ",(0,ec.jsx)("span",{className:"font-mono",children:eV?`${eV.name}${eV.provider?` (${eV.provider})`:""}`:"deployment default"}),G&&(0,ec.jsx)("span",{className:"ml-2 italic",children:"loading registry…"})]}),W&&(0,ec.jsxs)("div",{className:"border-[var(--color-warning)]/30 bg-[var(--color-warning)]/5 flex items-start gap-2 rounded-md border px-3 py-2 text-xs text-foreground",children:[(0,ec.jsx)("span",{"aria-hidden":"true",className:"text-base leading-none text-[var(--color-warning)]",children:"⚠"}),(0,ec.jsxs)("span",{children:["Showing a curated subset — the deployment’s",(0,ec.jsx)("span",{className:"mx-1 font-mono",children:"/api/models"}),"registry didn’t load",q?` (${q})`:"",". Other short names still work via"," ",(0,ec.jsx)("span",{className:"font-mono",children:"/model <name>"}),"."]})]}),(0,ec.jsx)("input",{type:"text",value:z,onChange:e=>H(e.target.value),placeholder:"Filter by name or provider…",autoFocus:!0,className:"w-full rounded-md border border-border bg-background px-3 py-1.5 font-mono text-sm placeholder:font-sans placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"}),(0,ec.jsxs)("ul",{className:"max-h-72 space-y-1 overflow-y-auto pl-0",children:[0===Y.length&&(0,ec.jsxs)("li",{className:"px-3 py-2 text-xs text-muted-foreground",children:["No models match “",z,"”."]}),Y.map(e=>{let t=eT?.model===e.model&&eT?.model_provider===e.model_provider,n=!eT&&$.defaultEntry?.name===e.model&&($.defaultEntry?.provider??null)===(e.model_provider??null);return(0,ec.jsx)("li",{children:(0,ec.jsxs)("button",{type:"button","aria-label":`Select model ${e.model}${e.model_provider?` from ${e.model_provider}`:""}${n?" (default)":""}`,onClick:async()=>{try{await eS({model:e.model,...e.model_provider?{model_provider:e.model_provider}:{}}),pz.toast.success(`Model set to ${e.model}${e.model_provider?` (${e.model_provider})`:""}.`),B(!1)}catch(e){pz.toast.error(e instanceof Error?`Couldn't update model: ${e.message}`:"Couldn't update model — try again.")}},className:n6("flex w-full items-center justify-between gap-3 rounded px-3 py-2 text-left text-sm transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",t&&"bg-accent"),children:[(0,ec.jsxs)("span",{className:"min-w-0 truncate font-mono",children:[e.model,n&&(0,ec.jsx)("span",{className:"ml-2 text-xs font-normal text-muted-foreground",children:"· default"})]}),e.model_provider&&(0,ec.jsx)("span",{className:"shrink-0 text-xs text-muted-foreground",children:e.model_provider})]})},`${e.model}|${e.model_provider??""}`)})]})]}),(0,ec.jsxs)(rn,{children:[(0,ec.jsx)(rg,{variant:"outline",onClick:async()=>{try{await eS(null),pz.toast.success("Model override cleared."),B(!1)}catch(e){pz.toast.error(e instanceof Error?`Couldn't clear override: ${e.message}`:"Couldn't clear override — try again.")}},disabled:!eT,children:"Reset to default"}),(0,ec.jsx)(rg,{onClick:()=>B(!1),children:"Close"})]})]})}),(0,ec.jsx)("div",{className:"flex-1 overflow-y-auto overflow-x-hidden overscroll-contain",ref:Z,children:(0,ec.jsx)("div",{className:"mx-auto w-full max-w-[960px] px-4 pb-4 pt-3 sm:px-5",ref:Q,children:ep?(0,ec.jsx)("div",{className:"flex items-center justify-center p-8",children:(0,ec.jsx)("p",{className:"text-muted-foreground",children:"Loading…"})}):(0,ec.jsxs)(ec.Fragment,{children:[0===tp.length&&!eo&&(0,ec.jsxs)("div",{className:"flex min-h-[42vh] flex-col items-center justify-center px-3 pt-12 text-center sm:pt-16",children:[(0,ec.jsx)("h2",{className:"text-pretty text-lg font-semibold sm:text-xl",children:"Where research evolves"}),(0,ec.jsx)("p",{className:"mt-2 max-w-lg text-sm text-muted-foreground",children:"Your self-evolving lab partner — reads the literature, runs experiments, and remembers what matters."}),(0,ec.jsx)("div",{className:"mt-4 flex max-w-2xl flex-wrap justify-center gap-2",children:NU.map(e=>(0,ec.jsx)("button",{type:"button",onClick:()=>tn(e),className:"max-w-full rounded-full border border-border bg-card px-2.5 py-1.5 text-xs text-foreground shadow-sm transition-colors hover:border-[var(--color-border)] hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring sm:text-sm",children:e},e))}),r&&a&&(0,ec.jsx)(AQ,{onNavigate:r,onOpenThread:a})]}),tg.map((t,n)=>{if("action-group"===t.kind){let r=t.items[t.items.length-1].message.id,a=n===tg.length-1,i=eo&&a&&r===tb;return(0,ec.jsx)(AR,{items:t.items,isStreaming:i,defaultCollapsed:tf,isAtBottom:ee,lastMessageId:tb,isLoading:eo,actionRequests:tN,submittedActionRequestKeys:tT,onActionRequestSubmitted:t_,reviewConfigsMap:tk,stream:et,onResumeInterrupt:td,graphId:e?.graph_id,onEditMessage:tt,autoApprove:M,approvalAutoResolves:tu,subAgentSteps:eB,ui:ei,compactionAnchorId:ty,summarizationEvent:ex??null},`action-group-${t.items[0].message.id}`)}let r=t.data,a=ei?.filter(e=>e.metadata?.message_id===r.message.id),i=n===tg.length-1,s="human"!==r.message.type,o=ty===r.message.id;return(0,ec.jsxs)(eu.default.Fragment,{children:[o&&ex&&(0,ec.jsx)(AC,{content:ex.content,summarizedCount:ex.cutoffIndex}),(0,ec.jsx)(AN,{message:r.message,toolCalls:r.toolCalls,isLoading:eo,isStreaming:eo&&i&&s,actionRequests:i?tN:void 0,submittedActionRequestKeys:tT,onActionRequestSubmitted:t_,reviewConfigsMap:i?tk:void 0,ui:a,stream:et,onResumeInterrupt:td,graphId:e?.graph_id,onEditMessage:tt,autoApprove:M,approvalAutoResolves:tu,subAgentSteps:eB})]},r.message.id)}),ex&&!ty&&(0,ec.jsx)(AC,{content:ex.content,summarizedCount:ex.cutoffIndex}),tA&&(0,ec.jsx)(A5,{actionRequests:tl,reviewConfigsMap:tk??new Map,requestedBy:tI,interruptKey:tc,onResume:td,isLoading:eo||ta.checking}),ti&&(0,ec.jsx)("div",{className:"mt-4",children:(0,ec.jsx)(A8,{questions:ti,onSubmit:ts,onCancel:to,isLoading:eo},`ask-user-${tc??p7(ti,0)}`)})]})})}),(0,ec.jsxs)("div",{className:"flex-shrink-0 bg-background",children:[A.length>0&&(0,ec.jsx)("div",{"aria-label":"Queued messages",className:"relative mx-auto -mb-4 w-[calc(100%-16px)] max-w-[960px] px-2 sm:w-[calc(100%-24px)]",children:(0,ec.jsx)("div",{className:"rounded-b-lg rounded-t-2xl border border-border bg-background pb-5 pt-1 shadow-sm",children:A.map((e,t)=>{let n=E.trim().length>0||v.length>0;return(0,ec.jsxs)("div",{onDragOver:e=>e.preventDefault(),onDrop:()=>e9(e.id),className:"relative flex min-h-11 items-start gap-1.5 px-2 py-2 text-sm sm:gap-2 sm:px-3",children:[(0,ec.jsx)("button",{type:"button",draggable:!0,onDragStart:t=>{D.current=e.id,t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",String(e.id))},onDragEnd:()=>{D.current=null},onKeyDown:n=>{"ArrowUp"===n.key&&t>0&&(n.preventDefault(),e6(e.id,-1)),"ArrowDown"===n.key&&t<A.length-1&&(n.preventDefault(),e6(e.id,1))},"aria-label":`Reorder queued message ${t+1} of ${A.length}`,title:"Drag to reorder, or use the arrow keys",className:"mt-0.5 inline-flex size-5 shrink-0 cursor-grab items-center justify-center rounded text-muted-foreground/60 focus-visible:ring-2 focus-visible:ring-ring active:cursor-grabbing",children:(0,ec.jsx)(id,{className:"size-3.5","aria-hidden":"true"})}),(0,ec.jsx)(mB,{className:"mt-0.5 size-4 shrink-0 text-muted-foreground","aria-hidden":"true"}),(0,ec.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[(0,ec.jsx)("span",{className:"line-clamp-2 whitespace-pre-wrap break-words pt-0.5 text-foreground",children:e.text}),e.files.length>0&&(0,ec.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground",children:[(0,ec.jsx)(mU,{className:"size-3 shrink-0","aria-hidden":"true"}),e.files.length," file",1===e.files.length?"":"s"]})]}),(0,ec.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5",children:[(0,ec.jsxs)("button",{type:"button",onClick:()=>e5(e.id),"aria-label":"Steer with this message next",title:"Submit next without interrupting the current turn",className:"inline-flex h-7 items-center gap-1 rounded-full px-2 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",children:[(0,ec.jsx)(mB,{className:"size-3.5","aria-hidden":"true"}),(0,ec.jsx)("span",{className:"hidden sm:inline",children:"Steer"})]}),(0,ec.jsx)("button",{type:"button",onClick:()=>e8(e.id),"aria-label":"Remove queued message",title:"Remove from queue",className:"inline-flex size-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",children:(0,ec.jsx)(sL,{className:"size-3.5","aria-hidden":"true"})}),(0,ec.jsxs)("details",{className:"group/menu relative",onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||e.currentTarget.removeAttribute("open")},onKeyDown:e=>{"Escape"===e.key&&(e.currentTarget.removeAttribute("open"),e.currentTarget.querySelector("summary")?.focus())},children:[(0,ec.jsx)("summary",{"aria-label":"More queued message actions",title:"More actions",className:"inline-flex size-7 cursor-pointer list-none items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring [&::-webkit-details-marker]:hidden",children:(0,ec.jsx)(sA,{className:"size-4","aria-hidden":"true"})}),(0,ec.jsxs)("div",{className:"absolute right-0 top-8 z-30 min-w-40 rounded-xl border border-border bg-background p-1.5 shadow-lg",children:[(0,ec.jsxs)("button",{type:"button",onClick:()=>e4(e.id),disabled:n,className:"flex w-full items-center gap-2 rounded-lg px-2.5 py-2 text-left text-sm text-foreground transition-colors hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-40",children:[(0,ec.jsx)(sN,{className:"size-4","aria-hidden":"true"}),"Edit message"]}),(0,ec.jsxs)("button",{type:"button",onClick:e7,className:"flex w-full items-center gap-2 rounded-lg px-2.5 py-2 text-left text-sm text-foreground transition-colors hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring",children:[(0,ec.jsx)(mz,{className:"size-4","aria-hidden":"true"}),"Close queue"]})]})]})]})]},e.id)})})}),(0,ec.jsxs)("div",{className:n6("relative z-10 mx-auto mb-2 flex w-[calc(100%-16px)] max-w-[960px] flex-shrink-0 flex-col overflow-hidden rounded-xl border border-border bg-background transition-colors duration-200 ease-in-out sm:mb-4 sm:w-[calc(100%-24px)]","focus-within:ring-2 focus-within:ring-ring"),children:[(0,ec.jsxs)("div",{className:"flex max-h-60 flex-col overflow-y-auto border-b border-border bg-sidebar empty:hidden sm:max-h-72",children:[!f&&(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)(A3,{workflows:ey,expanded:!1,onClick:()=>h(e=>"workflow"===e?null:"workflow")}),(l=er.find(e=>"in_progress"===e.status),u=(c=er.length)-tE.pending.length,d=c===u,p=tx?(0,ec.jsx)("button",{type:"button",onClick:()=>h(e=>"tasks"===e?null:"tasks"),className:"grid w-full cursor-pointer grid-cols-[auto_auto_1fr] items-center gap-2.5 px-3 py-2.5 text-left sm:px-4","aria-expanded":"tasks"===f,children:d?[(0,ec.jsx)(mO,{size:16,className:"text-[var(--color-success)]"},"icon"),(0,ec.jsx)("span",{className:"ml-[1px] min-w-0 truncate text-sm",children:"All tasks completed"},"label")]:null!=l?[(0,ec.jsx)("div",{children:Nz(l.status)},"icon"),(0,ec.jsxs)("span",{className:"ml-[1px] min-w-0 truncate text-sm",children:["Task"," ",c-tE.pending.length," ","of ",c]},"label"),(0,ec.jsx)("span",{className:"min-w-0 gap-2 truncate text-sm text-muted-foreground",children:l.content},"content")]:[(0,ec.jsx)(mD,{size:16,className:"text-[var(--color-text-tertiary)]"},"icon"),(0,ec.jsxs)("span",{className:"ml-[1px] min-w-0 truncate text-sm",children:["Task"," ",c-tE.pending.length," of"," ",c]},"label")]}):null,m=tv?(0,ec.jsxs)("button",{type:"button",onClick:()=>h(e=>"files"===e?null:"files"),className:"flex flex-shrink-0 cursor-pointer items-center gap-2 px-3 py-2.5 text-left text-sm sm:px-4","aria-expanded":"files"===f,children:[(0,ec.jsx)(mL,{size:16}),"Files (State)",(0,ec.jsx)("span",{className:"h-4 min-w-4 rounded-full bg-[var(--brand-solid)] px-0.5 text-center text-[10px] leading-[16px] text-[var(--brand-foreground)]",children:Object.keys(ea).length})]}):null,tx||tv?(0,ec.jsxs)("div",{className:"flex items-center",children:[(0,ec.jsx)("div",{className:"min-w-0 flex-1",children:p}),m]}):null)]}),f&&(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsxs)("div",{className:"sticky top-0 flex items-stretch bg-sidebar text-sm",children:[tx&&(0,ec.jsx)("button",{type:"button",className:"py-2.5 pr-4 first:pl-3 aria-expanded:font-semibold sm:first:pl-4",onClick:()=>h(e=>"tasks"===e?null:"tasks"),"aria-expanded":"tasks"===f,children:"Tasks"}),tv&&(0,ec.jsxs)("button",{type:"button",className:"inline-flex items-center gap-2 py-2.5 pr-4 first:pl-3 aria-expanded:font-semibold sm:first:pl-4",onClick:()=>h(e=>"files"===e?null:"files"),"aria-expanded":"files"===f,children:["Files (State)",(0,ec.jsx)("span",{className:"h-4 min-w-4 rounded-full bg-[var(--brand-solid)] px-0.5 text-center text-[10px] leading-[16px] text-[var(--brand-foreground)]",children:Object.keys(ea).length})]}),tm&&(0,ec.jsx)("button",{type:"button",className:"py-2.5 pr-4 first:pl-3 aria-expanded:font-semibold sm:first:pl-4",onClick:()=>h(e=>"workflow"===e?null:"workflow"),"aria-expanded":"workflow"===f,children:"Workflow"}),(0,ec.jsx)("button",{"aria-label":"Close",className:"flex-1",onClick:()=>h(null)})]}),(0,ec.jsxs)("div",{ref:g,className:"px-3 sm:px-4",children:["tasks"===f&&Object.entries(tE).filter(([e,t])=>t.length>0).map(([e,t])=>(0,ec.jsxs)("div",{className:"mb-4",children:[(0,ec.jsx)("h3",{className:"mb-1 text-[10px] font-semibold uppercase tracking-wider text-tertiary",children:{pending:"Pending",in_progress:"In Progress",completed:"Completed"}[e]}),(0,ec.jsx)("div",{className:"grid grid-cols-[auto_1fr] gap-3 rounded-sm p-1 pl-0 text-sm",children:t.map((t,n)=>(0,ec.jsxs)(eu.Fragment,{children:[Nz(t.status,"mt-0.5"),(0,ec.jsx)("span",{className:"break-words text-inherit",children:t.content})]},`${e}_${t.id}_${n}`))})]},e)),"files"===f&&(0,ec.jsx)("div",{className:"mb-6",children:(0,ec.jsx)(NM,{files:ea})}),"workflow"===f&&(0,ec.jsx)(A4,{workflows:ey,expertNames:eO})]})]})]}),M&&(0,ec.jsxs)("div",{"aria-live":"polite",className:"flex items-center justify-between gap-3 border-b border-amber-300 bg-amber-50 px-3 py-2 text-xs text-amber-950 dark:border-amber-800 dark:bg-amber-950/40 dark:text-amber-100",children:[(0,ec.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,ec.jsx)(mF,{className:"size-3.5 shrink-0","aria-hidden":"true"}),"Tool actions auto-run, including delete. Dangerous commands are blocked; scheduled tasks still ask."]}),(0,ec.jsx)("button",{type:"button",onClick:eJ,"aria-label":"Turn off auto-approve",className:"shrink-0 rounded px-2 py-1 font-semibold transition-colors hover:bg-amber-200 focus-visible:ring-2 focus-visible:ring-amber-700 dark:hover:bg-amber-900",children:"Turn Off"})]}),(eV||eL>0||eR.length>0)&&(0,ec.jsxs)("div",{className:"flex items-center gap-1.5 border-t border-border px-3 py-1.5 text-xs text-muted-foreground",children:[eV&&(0,ec.jsxs)("button",{type:"button",onClick:()=>B(!0),title:"Click to change model for this chat","aria-label":"Change model for this chat",className:"-mx-1 flex min-w-0 items-center gap-1.5 rounded px-1 py-0.5 transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,ec.jsx)(mj,{className:"size-3.5 shrink-0 text-[var(--brand)]","aria-hidden":"true"}),(0,ec.jsx)("span",{className:"truncate font-medium text-foreground",children:eV.name}),eV.provider&&(0,ec.jsxs)("span",{className:"hidden shrink-0 sm:inline",children:["· ",eV.provider]})]}),(0,ec.jsx)(Nn,{teams:eR,onManage:()=>r?.({view:"experts"})}),eL>0&&(0,ec.jsxs)("button",{type:"button",onClick:t,title:`${eL} background agent${1===eL?"":"s"} running — click to view`,"aria-label":`${eL} background agent${1===eL?"":"s"} running — view`,className:"ml-auto flex shrink-0 items-center gap-1.5 rounded px-1.5 py-0.5 font-medium text-[var(--brand)] transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,ec.jsx)("span",{className:"size-2 animate-pulse rounded-full bg-[var(--color-warning)]","aria-hidden":"true"}),eL," agent",1===eL?"":"s"]})]}),(0,ec.jsxs)("form",{onSubmit:e3,className:"mobile-composer flex flex-col",children:[v.length>0&&(0,ec.jsx)("div",{"aria-label":"Attached files",className:"flex flex-wrap gap-2 border-b border-border px-3 py-2",children:v.map(e=>(0,ec.jsxs)("span",{className:"inline-flex max-w-full items-center gap-1.5 rounded-md border border-border bg-muted px-2 py-1 text-xs text-foreground",children:[(0,ec.jsx)(mL,{className:"size-3.5 shrink-0 text-muted-foreground","aria-hidden":"true"}),(0,ec.jsx)("span",{className:"max-w-48 truncate",title:e.path,children:e.name}),(0,ec.jsx)("button",{type:"button",onClick:()=>e1(e.path),"aria-label":`Remove ${e.name} from this message`,title:`Remove ${e.name} from this message`,className:"rounded-sm text-muted-foreground transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",children:(0,ec.jsx)(nE,{className:"size-3.5","aria-hidden":"true"})})]},e.path))}),(0,ec.jsx)("textarea",{ref:b,value:E,onChange:e=>x(e.target.value),onKeyDown:te,"aria-label":"Message",disabled:eK,placeholder:eK?"Respond to the request above to continue…":eo?"Queue a follow-up — sends when this turn finishes…":"Ask EvoScientist anything…",className:"font-inherit field-sizing-content max-h-[min(30dvh,12rem)] min-h-12 flex-1 resize-none overflow-y-auto border-0 bg-transparent px-3.5 pb-2.5 pt-3 text-sm leading-6 text-primary outline-none placeholder:text-tertiary disabled:cursor-not-allowed sm:px-4",rows:1}),(0,ec.jsxs)("div",{className:"flex items-center justify-between gap-2 p-2 sm:p-2.5",children:[(0,ec.jsxs)("div",{className:"flex items-center gap-1",children:[(0,ec.jsx)("input",{ref:y,type:"file",multiple:!0,onChange:e0,disabled:!e||eK||S,className:"hidden"}),(0,ec.jsx)("button",{type:"button",onClick:()=>y.current?.click(),disabled:!e||eK||S,"aria-label":"Upload files to workspace",title:"Upload files to workspace (max 50 MB each)",className:"inline-flex size-8 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",children:(0,ec.jsx)(mU,{className:"size-4","aria-hidden":"true"})}),(0,ec.jsxs)("button",{type:"button",onClick:()=>M?eJ():F(!0),"aria-pressed":M,"aria-label":M?"Turn off auto-approve":"Auto-approve",title:"Auto-approve all tool actions in this conversation",className:n6("inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium transition-colors",M?"bg-amber-600 text-white hover:bg-amber-700":"text-muted-foreground hover:bg-accent hover:text-foreground"),children:[(0,ec.jsx)(mP,{className:"size-3.5","aria-hidden":"true"}),(0,ec.jsx)("span",{className:"hidden min-[360px]:inline",children:M?"Auto-approve On":"Auto-approve"})]}),r&&k&&(0,ec.jsxs)("button",{type:"button",onClick:()=>r({view:"workspace"}),title:`${i?"Close":"Open"} workspace: ${k}`,"aria-label":`${i?"Close":"Open"} workspace: ${k}`,"aria-pressed":!!i,className:"inline-flex min-w-0 items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",children:[(0,ec.jsx)(mM,{className:"size-3.5 flex-shrink-0","aria-hidden":"true"}),(0,ec.jsx)("span",{className:"hidden max-w-[140px] truncate font-mono sm:inline lg:max-w-[220px]",children:k.split("/").filter(Boolean).pop()||k})]})]}),(0,ec.jsx)("div",{className:"flex justify-end gap-2",children:(0,ec.jsx)(rg,{type:eo?"button":"submit",variant:eo?"destructive":"default",onClick:eo?eh:e3,disabled:!eo&&(eX||S||!E.trim()),"aria-label":eo?"Stop generating":"Send message",children:eo?(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)(mC,{size:14}),(0,ec.jsx)("span",{className:"hidden sm:inline",children:"Stop"})]}):(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)(mR,{size:18}),(0,ec.jsx)("span",{className:"hidden sm:inline",children:"Send"})]})})})]})]})]})]})]})});NH.displayName="ChatInterface";let N$=ny("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]),NG=ny("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),Nq=eu.default.memo(({skill:e,preferExpert:t,onClose:n})=>{let[r,a]=(0,eu.useState)(null),[i,s]=(0,eu.useState)(!1),[o,l]=(0,eu.useState)(null);if((0,eu.useEffect)(()=>{if(!e)return;let t=!1;return a(null),l(null),s(!0),fetch(`/api/skills/detail?name=${encodeURIComponent(e.name)}`).then(async e=>{let t=await e.json().catch(()=>null);if(!e.ok)throw Error(t?.error||`Failed to load (${e.status})`);return t}).then(e=>{t||a(e)}).catch(e=>{t||l(e.message??"Failed to load skill detail.")}).finally(()=>{t||s(!1)}),()=>{t=!0}},[e]),!e)return null;let c=r?.title??e.title,u=r?.version??e.version,d=r?.description??e.description,p=r?.installed??e.installed,m=t&&r?.expertBody||r?.body;return(0,ec.jsx)(n9,{open:!0,onOpenChange:n,children:(0,ec.jsxs)(re,{"aria-describedby":void 0,className:"flex h-[80vh] max-h-[80vh] min-w-[60vw] flex-col p-6",children:[(0,ec.jsx)(rr,{className:"sr-only",children:c}),(0,ec.jsxs)("div",{className:"mb-3 flex items-start gap-3 border-b border-border pb-4",children:[(0,ec.jsx)(sR,{className:"mt-1 size-6 shrink-0 text-[var(--brand)]","aria-hidden":"true"}),(0,ec.jsx)("div",{className:"min-w-0 flex-1",children:(0,ec.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-0.5",children:[(0,ec.jsx)("h2",{className:"break-words text-lg font-semibold",children:c}),u&&(0,ec.jsxs)("span",{className:"font-mono text-xs text-muted-foreground",children:["v",u]}),null!=e.fileCount&&(0,ec.jsxs)("span",{className:"text-xs text-muted-foreground",children:["· ",e.fileCount," file",1===e.fileCount?"":"s"]}),p&&(0,ec.jsxs)("span",{className:"bg-[var(--brand)]/10 inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[11px] font-medium text-[var(--brand)]",children:[(0,ec.jsx)(NG,{className:"size-3","aria-hidden":"true"}),"Installed"]})]})})]}),(0,ec.jsx)(oo,{className:"min-h-0 flex-1",children:(0,ec.jsxs)("div",{className:"pr-3",children:[(0,ec.jsx)("p",{className:"whitespace-pre-wrap text-sm leading-relaxed text-foreground",children:d||"No description."}),(0,ec.jsx)("div",{className:"mt-4 border-t border-border pt-4",children:i?(0,ec.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,ec.jsx)(sk,{className:"size-4 animate-spin","aria-hidden":"true"}),"Loading skill contents…"]}):o?(0,ec.jsx)("p",{className:"text-sm text-muted-foreground",children:o}):m?(0,ec.jsx)(Ac,{content:m}):(0,ec.jsx)("p",{className:"text-sm text-muted-foreground",children:"No additional contents."})})]})})]})})});Nq.displayName="SkillDetailDialog";let NW=ny("circle-arrow-up",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]);function NV({title:e,description:t,meta:n,installed:r,installedVersion:a,latestVersion:i,updateAvailable:s,busy:o,onOpen:l,onInstall:c,onUpdate:u,onUninstall:d,actions:p,icon:m=sR}){let f=r?a&&`v${a}`:i&&`v${i}`;return(0,ec.jsxs)("div",{className:"flex flex-col rounded-lg border border-border bg-card p-3",children:[(0,ec.jsxs)("button",{type:"button",onClick:l,className:"-m-1 flex items-start gap-2.5 rounded-md p-1 text-left transition-colors hover:bg-muted/50 focus-visible:ring-2 focus-visible:ring-ring",title:"View details",children:[(0,ec.jsx)(m,{className:"mt-0.5 size-5 shrink-0 text-[var(--brand)]","aria-hidden":"true"}),(0,ec.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,ec.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-0.5",children:[(0,ec.jsx)("h3",{className:"break-words text-lg font-medium leading-tight",children:e}),f&&(0,ec.jsx)("span",{className:"shrink-0 font-mono text-xs text-muted-foreground",children:f}),n&&(0,ec.jsxs)("span",{className:"shrink-0 text-xs text-muted-foreground",children:["· ",n]})]}),(0,ec.jsx)("p",{className:"mt-1 line-clamp-2 text-sm leading-6 text-muted-foreground",children:t||"No description."})]})]}),(0,ec.jsxs)("div",{className:"mt-2.5 flex flex-wrap items-center justify-end gap-2",children:[p,r&&s&&(0,ec.jsxs)("button",{type:"button",onClick:u,disabled:!!o,className:"inline-flex items-center gap-1.5 rounded-md bg-[var(--brand-solid)] px-2.5 py-1 text-xs font-medium text-[var(--brand-foreground)] transition-opacity hover:opacity-90 focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50",title:i?`Update to v${i}`:"Update",children:["update"===o?(0,ec.jsx)(sk,{className:"size-3.5 animate-spin","aria-hidden":"true"}):(0,ec.jsx)(NW,{className:"size-3.5","aria-hidden":"true"}),"update"===o?"Updating…":i?`Update → v${i}`:"Update"]}),r?d?(0,ec.jsxs)("button",{type:"button",onClick:d,disabled:!!o,className:"inline-flex items-center gap-1.5 rounded-md border border-border px-2.5 py-1 text-xs font-medium text-muted-foreground transition-colors hover:border-destructive/40 hover:bg-destructive/10 hover:text-destructive focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50",children:["uninstall"===o?(0,ec.jsx)(sk,{className:"size-3.5 animate-spin","aria-hidden":"true"}):(0,ec.jsx)(sL,{className:"size-3.5","aria-hidden":"true"}),"uninstall"===o?"Removing…":"Uninstall"]}):null:(0,ec.jsxs)("button",{type:"button",onClick:c,disabled:!!o,className:"inline-flex items-center gap-1.5 rounded-md bg-[var(--brand-solid)] px-2.5 py-1 text-xs font-medium text-[var(--brand-foreground)] transition-opacity hover:opacity-90 focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50",children:["install"===o?(0,ec.jsx)(sk,{className:"size-3.5 animate-spin","aria-hidden":"true"}):(0,ec.jsx)(s_,{className:"size-3.5","aria-hidden":"true"}),"install"===o?"Installing…":"Install"]})]})]})}let NY=(0,ec.jsx)("span",{className:"shrink-0 rounded-full border border-[var(--brand)] bg-[var(--brand-soft)] px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-[var(--brand)]",title:"Installed — the orchestrator can dispatch it",children:"Active"});function NK(){let{teams:e,refresh:t}=Nt(),[n,r]=(0,eu.useState)([]),[a,i]=(0,eu.useState)([]),[s,o]=(0,eu.useState)(null),[l,c]=(0,eu.useState)(null),[u,d]=(0,eu.useState)(!0),[p,m]=(0,eu.useState)({}),[f,h]=(0,eu.useState)(null),g=(0,eu.useRef)(0),[b,y]=(0,eu.useState)(null),E=(0,eu.useCallback)(async(e=!1)=>{let t=++g.current;d(!0);let[n,a]=await Promise.allSettled([fetch(`/api/skills/catalog${e?"?refresh=1":""}`).then(async e=>{let t=await e.json();if(!e.ok)throw Error(t?.error||`HTTP ${e.status}`);return t.skills??[]}),fetch("/api/skills").then(async e=>{let t=await e.json();if(!e.ok)throw Error(t?.error||`HTTP ${e.status}`);return t.skills??[]})]);t===g.current&&("fulfilled"===n.status?(r(n.value),o(null)):(r([]),o(n.reason instanceof Error?n.reason.message:"Failed to load catalog.")),"fulfilled"===a.status?(i(a.value),c(null)):c(a.reason instanceof Error?a.reason.message:"Failed to read installed skills."),d(!1))},[]);(0,eu.useEffect)(()=>{E()},[E]);let x=(0,eu.useCallback)(async(e,n)=>{m(t=>({...t,[e]:n})),c(null);try{let r="uninstall"===n?await fetch(`/api/skills?name=${encodeURIComponent(e)}`,{method:"DELETE"}):await fetch("/api/skills/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e})}),a=await r.json().catch(()=>({}));if(!r.ok)throw Error(a?.error||`HTTP ${r.status}`);await E(),t()}catch(e){c(e instanceof Error?e.message:"Action failed.")}finally{m(t=>{let n={...t};return delete n[e],n})}},[E,t]),v=function(e){let t=new Set(e.teams.map(e=>e.name)),n=new Map(e.installed.map(e=>[e.name,e])),r=e.catalog.filter(e=>e.isExpert).map(e=>{let r=e.installed||n.has(e.name);return{...e,installed:r||t.has(e.name),removable:r}}),a=new Set(r.map(e=>e.name)),i=new Set;for(let t of e.teams)i.add(t.name);for(let t of e.installed)t.isExpert&&i.add(t.name);let s=new Map(e.teams.map(e=>[e.name,e]));return{catalog:r,other:[...i].filter(e=>!a.has(e)).map(e=>{let t=n.get(e),r=s.get(e);return{name:e,title:t?.title||e,description:t?.description||r?.description||"",removable:void 0!==t}}).sort((e,t)=>e.title.localeCompare(t.title))}}({teams:e,catalog:n,installed:a}),T=!u&&0===v.catalog.length&&0===v.other.length;return(0,ec.jsxs)("div",{className:"h-full overflow-y-auto",children:[(0,ec.jsxs)("div",{className:"mx-auto max-w-[960px] px-4 py-5 sm:px-5 sm:py-6",children:[(0,ec.jsxs)("header",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,ec.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,ec.jsx)("h2",{className:"text-xl font-semibold sm:text-2xl",children:"Experts"}),(0,ec.jsx)("p",{className:"mt-1 text-sm leading-6 text-muted-foreground",children:"Skills that also carry an actor definition, so the orchestrator can dispatch them to run a task on its own. Installing one is all it takes — there is nothing to switch on."})]}),(0,ec.jsx)("button",{type:"button",onClick:()=>{E(!0),t()},disabled:u,className:"inline-flex size-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50",title:"Refresh","aria-label":"Refresh",children:u?(0,ec.jsx)(sk,{className:"size-4 animate-spin","aria-hidden":"true"}):(0,ec.jsx)(N$,{className:"size-4","aria-hidden":"true"})})]}),s&&(0,ec.jsxs)("div",{className:"mb-4 flex items-start gap-2 rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-xs text-amber-950 dark:border-amber-800 dark:bg-amber-950/40 dark:text-amber-100",children:[(0,ec.jsx)(mF,{className:"mt-0.5 size-3.5 shrink-0","aria-hidden":"true"}),(0,ec.jsxs)("span",{children:["Couldn't load the official catalog: ",s,". Experts already installed are listed below."]})]}),l&&(0,ec.jsx)("div",{className:"mb-4 rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:l}),(0,ec.jsxs)("div",{className:"space-y-6",children:[v.catalog.length>0&&(0,ec.jsxs)("section",{children:[(0,ec.jsx)("h3",{className:"mb-2.5 text-xs font-semibold uppercase tracking-wider text-tertiary",children:"Official catalog"}),(0,ec.jsx)("div",{className:"grid grid-cols-1 gap-2.5 sm:grid-cols-2",children:v.catalog.map(e=>(0,ec.jsx)(NV,{icon:sO,title:e.title,description:e.description,meta:e.fileCount?`${e.fileCount} file${1===e.fileCount?"":"s"}`:void 0,installed:e.installed,installedVersion:e.installedVersion,latestVersion:e.latestVersion,updateAvailable:e.updateAvailable,busy:p[e.name],actions:e.installed?NY:void 0,onOpen:()=>h({name:e.name,title:e.title,description:e.description,version:e.installedVersion??e.latestVersion,fileCount:e.fileCount,installed:e.installed}),onInstall:()=>void x(e.name,"install"),onUpdate:()=>void x(e.name,"update"),onUninstall:e.removable?()=>y({name:e.name,title:e.title}):void 0},e.name))})]}),v.other.length>0&&(0,ec.jsxs)("section",{children:[(0,ec.jsx)("h3",{className:"mb-2.5 text-xs font-semibold uppercase tracking-wider text-tertiary",children:"Other installed experts"}),(0,ec.jsx)("div",{className:"grid grid-cols-1 gap-2.5 sm:grid-cols-2",children:v.other.map(e=>(0,ec.jsx)(NV,{icon:sO,title:e.title,description:e.description,installed:!0,busy:p[e.name],actions:NY,onOpen:()=>h({name:e.name,title:e.title,description:e.description,installed:!0}),onUninstall:e.removable?()=>y({name:e.name,title:e.title}):void 0},e.name))})]})]}),T&&(0,ec.jsxs)("div",{className:"rounded-lg border border-dashed border-border px-6 py-10 text-center",children:[(0,ec.jsx)("p",{className:"text-sm font-medium",children:"No experts yet"}),(0,ec.jsx)("p",{className:"mx-auto mt-1.5 max-w-md text-xs leading-relaxed text-muted-foreground",children:"An expert is a skill that also ships an actor definition. Install one from Research Skills and it shows up here — nothing ships with the backend by default."})]})]}),(0,ec.jsx)(Nq,{skill:f,preferExpert:!0,onClose:()=>h(null)}),(0,ec.jsx)(n9,{open:null!==b,onOpenChange:e=>{e||y(null)},children:(0,ec.jsxs)(re,{className:"sm:max-w-md",children:[(0,ec.jsxs)(rt,{children:[(0,ec.jsx)(rr,{children:"Uninstall expert?"}),(0,ec.jsxs)(ra,{children:["“",b?.title??b?.name,"” will be removed from this Web UI, with its actor definition. A skill that came from the catalog can be installed again; one written locally cannot."]})]}),(0,ec.jsxs)(rn,{children:[(0,ec.jsx)(rg,{variant:"outline",onClick:()=>y(null),children:"Cancel"}),(0,ec.jsx)(rg,{onClick:()=>{y(null),b&&x(b.name,"uninstall")},className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Uninstall"})]})]})})]})}function NX(){let[,e]=ev("view"),[t,n]=(0,eu.useState)([]),[r,a]=(0,eu.useState)([]),[i,s]=(0,eu.useState)(!0),[o,l]=(0,eu.useState)(null),[c,u]=(0,eu.useState)(null),[d,p]=(0,eu.useState)({}),[m,f]=(0,eu.useState)(null),[h,g]=(0,eu.useState)(null),b=(0,eu.useCallback)(async(e=!1)=>{s(!0),u(null),l(null);let[t,r]=await Promise.allSettled([fetch(`/api/skills/catalog${e?"?refresh=1":""}`).then(async e=>{let t=await e.json();if(!e.ok)throw Error(t.error||"Failed to load catalog");return t.skills??[]}),fetch("/api/skills").then(async e=>{let t=await e.json();if(!e.ok)throw Error(t.error||"Failed to load skills");return t.skills??[]})]),i=e=>!1!==e.isSkill,o=("fulfilled"===t.status?t.value:[]).filter(i);if("rejected"===t.status&&l(t.reason instanceof Error?t.reason.message:"Failed to load the official catalog."),n(o),"fulfilled"===r.status){let e=new Set(o.map(e=>e.name));a(r.value.filter(t=>!e.has(t.name)&&i(t)))}else a([]),u(r.reason instanceof Error?r.reason.message:"Failed to load installed skills.");s(!1)},[]);(0,eu.useEffect)(()=>{b()},[b]);let y=async(e,t="install")=>{p(n=>({...n,[e]:t})),u(null);try{let t=await fetch("/api/skills/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e})}),r=await t.json();if(!t.ok)throw Error(r.error||"Failed to install");n(t=>t.map(t=>t.name===e?{...t,installed:!0,updateAvailable:!1,installedVersion:t.latestVersion??t.installedVersion}:t)),Ne()}catch(e){u(e instanceof Error?e.message:`Failed to ${t}`)}finally{p(t=>{let n={...t};return delete n[e],n})}},E=async(e,t)=>{p(t=>({...t,[e]:"uninstall"})),u(null);try{let r=await fetch(`/api/skills?name=${encodeURIComponent(e)}`,{method:"DELETE"});if(!r.ok){let e=await r.json();throw Error(e.error||"Failed to uninstall")}t?n(t=>t.map(t=>t.name===e?{...t,installed:!1}:t)):a(t=>t.filter(t=>t.name!==e)),Ne()}catch(e){u(e instanceof Error?e.message:"Failed to uninstall")}finally{p(t=>{let n={...t};return delete n[e],n})}},x=async()=>{h&&(g(null),await E(h.name,h.isCatalog))};return(0,ec.jsxs)("div",{className:"h-full overflow-y-auto",children:[(0,ec.jsxs)("div",{className:"mx-auto max-w-[960px] px-4 py-5 sm:px-5 sm:py-6",children:[(0,ec.jsxs)("header",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,ec.jsxs)("div",{children:[(0,ec.jsx)("h2",{className:"text-xl font-semibold sm:text-2xl",children:"Research Skills"}),(0,ec.jsxs)("p",{className:"mt-1 text-sm leading-6 text-muted-foreground",children:["Install official skills from the"," ",(0,ec.jsx)("a",{href:"https://github.com/EvoScientist/EvoSkills",target:"_blank",rel:"noreferrer",className:"underline underline-offset-2 hover:text-foreground",children:"EvoSkills"})," ","catalog, or remove ones you don't need."]})]}),(0,ec.jsx)("button",{type:"button",onClick:()=>b(!0),disabled:i,"aria-label":"Refresh",className:"rounded-md p-2 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",children:(0,ec.jsx)(N$,{className:i?"size-4 animate-spin":"size-4","aria-hidden":"true"})})]}),c&&(0,ec.jsx)("p",{role:"alert",className:"mb-4 text-sm text-destructive",children:c}),i?(0,ec.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground","aria-live":"polite",children:[(0,ec.jsx)(sk,{className:"size-4 animate-spin","aria-hidden":"true"}),"Loading skills…"]}):(0,ec.jsxs)("div",{className:"space-y-6",children:[(0,ec.jsxs)("section",{children:[(0,ec.jsx)("h3",{className:"mb-2.5 text-xs font-semibold uppercase tracking-wider text-tertiary",children:"Official catalog"}),o?(0,ec.jsx)("p",{className:"text-sm text-muted-foreground",children:o}):0===t.length?(0,ec.jsx)("p",{className:"text-sm text-muted-foreground",children:"No skills found in the catalog."}):(0,ec.jsx)("div",{className:"grid grid-cols-1 gap-2.5 sm:grid-cols-2",children:t.map(t=>(0,ec.jsx)(NV,{title:t.title,description:t.description,meta:`${t.fileCount} file${1===t.fileCount?"":"s"}`,installed:t.installed,installedVersion:t.installedVersion,latestVersion:t.latestVersion,updateAvailable:t.updateAvailable,busy:d[t.name],actions:NZ(t.isExpert,e),onOpen:()=>f({name:t.name,title:t.title,description:t.description,version:t.installed?t.installedVersion:t.latestVersion,fileCount:t.fileCount,installed:t.installed}),onInstall:()=>y(t.name),onUpdate:()=>y(t.name,"update"),onUninstall:()=>g({name:t.name,title:t.title,isCatalog:!0})},t.name))})]}),r.length>0&&(0,ec.jsxs)("section",{children:[(0,ec.jsx)("h3",{className:"mb-2.5 text-xs font-semibold uppercase tracking-wider text-tertiary",children:"Other installed skills"}),(0,ec.jsx)("div",{className:"grid grid-cols-1 gap-2.5 sm:grid-cols-2",children:r.map(t=>(0,ec.jsx)(NV,{title:t.title,description:t.description,installed:!0,busy:d[t.name],actions:NZ(t.isExpert,e),onOpen:()=>f({name:t.name,title:t.title,description:t.description,installed:!0}),onUninstall:()=>g({name:t.name,title:t.title,isCatalog:!1})},t.name))})]})]})]}),(0,ec.jsx)(Nq,{skill:m,onClose:()=>f(null)}),(0,ec.jsx)(n9,{open:null!==h,onOpenChange:e=>{e||g(null)},children:(0,ec.jsxs)(re,{className:"sm:max-w-md",children:[(0,ec.jsxs)(rt,{children:[(0,ec.jsx)(rr,{children:"Uninstall skill?"}),(0,ec.jsxs)(ra,{children:["“",h?.title??h?.name,"” will be removed from this Web UI. You can install it again later."]})]}),(0,ec.jsxs)(rn,{children:[(0,ec.jsx)(rg,{variant:"outline",onClick:()=>g(null),children:"Cancel"}),(0,ec.jsx)(rg,{onClick:x,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Uninstall"})]})]})})]})}function NZ(e,t){if(e)return(0,ec.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),t("experts")},className:"shrink-0 rounded-full border border-[var(--brand)] bg-[var(--brand-soft)] px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-[var(--brand)] transition-opacity hover:opacity-80 focus-visible:ring-2 focus-visible:ring-ring",title:"Also an expert — can be dispatched to run a task on its own",children:"Expert"})}let NQ=ny("fingerprint",[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]]),NJ=ny("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),N0=ny("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]),N1="rounded border border-border bg-background p-1.5 text-muted-foreground shadow-sm transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50",N2=["complements","contradicts","supersedes"];function N3({node:e,edges:t,nodeMap:n,onClose:r,onNavigate:a}){let i,[s,o]=(0,eu.useState)(null),[l,c]=(0,eu.useState)(!0),[u,d]=(0,eu.useState)(null);(0,eu.useEffect)(()=>{let t=new AbortController;return c(!0),o(null),d(null),fetch(`/api/memory?path=${encodeURIComponent(e.path)}`,{cache:"no-store",signal:t.signal}).then(async e=>{let t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Failed to load observation.");o(t.content??null)}).catch(e=>{t.signal.aborted||(o(null),d(e instanceof Error?e.message:"Failed to load observation."))}).finally(()=>{t.signal.aborted||c(!1)}),()=>t.abort()},[e.path]);let p=(i=new Set,t.filter(t=>{if(t.source!==e.id&&t.target!==e.id)return!1;let n=t.source===e.id?t.target:t.source,r=`${n}::${t.relation}`;return!i.has(r)&&(i.add(r),!0)})),m=s?s.replace(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/,"").trim():"";return(0,ec.jsxs)("div",{className:"flex h-full flex-col overflow-hidden border-l border-border bg-background shadow-xl md:shadow-none",children:[(0,ec.jsxs)("div",{className:"flex items-start justify-between gap-2 border-b border-border px-4 py-3",children:[(0,ec.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,ec.jsxs)("p",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:[e.memory_type," · ",e.scope]}),(0,ec.jsx)("h3",{className:"mt-0.5 line-clamp-3 text-sm font-semibold leading-snug text-foreground",children:e.summary}),e.created_at&&(0,ec.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:(e=>{try{let t=new Date(e);if(Number.isNaN(t.getTime()))return e;return t.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return e}})(e.created_at)})]}),(0,ec.jsx)("button",{type:"button",onClick:r,className:"mt-0.5 inline-flex size-8 flex-shrink-0 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Close observation details",title:"Close observation details",children:(0,ec.jsx)(nE,{className:"h-4 w-4","aria-hidden":"true"})})]}),(0,ec.jsxs)("div",{className:"flex-1 overflow-y-auto","aria-live":l?"polite":"off",children:[p.length>0&&(0,ec.jsxs)("div",{className:"border-b border-border px-4 py-3",children:[(0,ec.jsx)("p",{className:"mb-2 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Relations"}),(0,ec.jsx)("ul",{className:"space-y-1.5",children:p.map((t,r)=>{let i=t.source===e.id?t.target:t.source,s=n.get(i);return(0,ec.jsxs)("li",{className:"flex items-start gap-2",children:[(0,ec.jsx)("span",{className:"mt-0.5 flex-shrink-0 rounded px-1.5 py-0.5 text-[10px] font-semibold text-white",style:{background:Aj(t.relation)},children:AB(t.relation)}),s?(0,ec.jsx)("button",{type:"button",onClick:()=>a(i),className:"min-w-0 rounded-sm text-left text-xs text-foreground hover:underline focus-visible:ring-2 focus-visible:ring-ring",children:s.summary}):(0,ec.jsx)("span",{className:"text-xs text-muted-foreground",children:i})]},r)})})]}),(0,ec.jsx)("div",{className:"px-4 py-3",children:l?(0,ec.jsx)("p",{className:"text-xs text-muted-foreground",children:"Loading…"}):u?(0,ec.jsx)("p",{role:"alert",className:"text-xs text-destructive",children:u}):m?(0,ec.jsx)(Ac,{content:m,className:"text-xs leading-relaxed [&_h2]:mb-2 [&_h2]:mt-4 [&_h2]:text-sm [&_p]:mb-3"}):(0,ec.jsx)("p",{className:"text-xs text-muted-foreground",children:"This observation has no body content."})})]})]})}function N4({data:e,selectedId:t,onSelect:n,w:r,h:a}){let i=(0,eu.useMemo)(()=>{let t=new Set;return e.edges.filter(e=>{let n=[e.source,e.target].sort().join("::");return!t.has(n)&&(t.add(n),!0)})},[e.edges]),s=function(e,t,n,r){let[a,i]=(0,eu.useState)([]),s=(0,eu.useRef)([]),o=(0,eu.useRef)(null),l=(0,eu.useRef)(0),c=(0,eu.useRef)(n),u=(0,eu.useRef)(r);return(0,eu.useEffect)(()=>{c.current=n,u.current=r},[n,r]),(0,eu.useEffect)(()=>{var n,r;let a,d;if(0===e.length||0===c.current||0===u.current){i([]),s.current=[];return}let p=(n=c.current,r=u.current,d=Math.min(n,r)*Math.max(.28,.12*Math.sqrt(a=Math.max(e.length,1))),e.map((e,t)=>{let i=t/a*2*Math.PI;return{id:e.id,x:n/2+d*Math.cos(i)+AP(e.id,0),y:r/2+d*Math.sin(i)+AP(e.id,1),vx:0,vy:0}}));s.current=p,i(p),l.current=0,o.current&&cancelAnimationFrame(o.current);let m=0,f=()=>{let{positions:e,energy:n}=function(e,t,n,r){let a=n/2,i=r/2,s=new Float64Array(e.length),o=new Float64Array(e.length),l=new Map(e.map((e,t)=>[e.id,t]));for(let t=0;t<e.length;t++)for(let n=t+1;n<e.length;n++){let r=e[t].x-e[n].x,a=e[t].y-e[n].y,i=Math.max(Math.sqrt(r*r+a*a),1),l=6e3/(i*i),c=r/i,u=a/i;s[t]+=l*c,o[t]+=l*u,s[n]-=l*c,o[n]-=l*u}for(let n of t){let t=l.get(n.source),r=l.get(n.target);if(null==t||null==r)continue;let a=e[r].x-e[t].x,i=e[r].y-e[t].y,c=Math.max(Math.sqrt(a*a+i*i),1),u=.04*(c-180),d=a/c,p=i/c;s[t]+=u*d,o[t]+=u*p,s[r]-=u*d,o[r]-=u*p}for(let t=0;t<e.length;t++)s[t]+=.02*(a-e[t].x),o[t]+=.02*(i-e[t].y);let c=0;return{positions:e.map((e,t)=>{let n=(e.vx+s[t])*.78,r=(e.vy+o[t])*.78,a=Math.sqrt(n*n+r*r);return a>12&&(n=n/a*12,r=r/a*12),c+=n*n+r*r,{id:e.id,x:e.x+n,y:e.y+r,vx:n,vy:r}}),energy:c}}(s.current,t,c.current,u.current);s.current=e,l.current++,++m%2==0&&i([...e]),l.current<600&&n>.3?o.current=requestAnimationFrame(f):i([...s.current])};return o.current=requestAnimationFrame(f),()=>{o.current&&cancelAnimationFrame(o.current)}},[e,t]),a}(e.nodes,i,r,a),[o,l]=(0,eu.useState)(0),[c,u]=(0,eu.useState)(0),[d,p]=(0,eu.useState)(1),m=(0,eu.useRef)(null),f=(0,eu.useRef)(null),[h,g]=(0,eu.useState)(new Set(N2)),[b,y]=(0,eu.useState)(new Set(["semantic","procedural"])),E=(0,eu.useMemo)(()=>new Map(s.map(e=>[e.id,e])),[s]),x=(0,eu.useMemo)(()=>new Map(e.nodes.map(e=>[e.id,e])),[e.nodes]),v=(0,eu.useRef)({tx:o,ty:c,scale:d});v.current={tx:o,ty:c,scale:d};let T=(0,eu.useCallback)((e,t,n)=>{let{tx:r,ty:a,scale:i}=v.current,s=Math.max(.2,Math.min(5,i*n)),o=s/i;p(s),l(e-o*(e-r)),u(t-o*(t-a))},[]),S=(0,eu.useCallback)(e=>{e.preventDefault();let t=e.currentTarget.getBoundingClientRect();T(e.clientX-t.left,e.clientY-t.top,e.deltaY<0?1.1:.9)},[T]),_=(0,eu.useCallback)(e=>{(e.target===e.currentTarget||"svg"===e.target.tagName)&&(f.current={startX:e.clientX,startY:e.clientY,tx:o,ty:c},e.currentTarget.setPointerCapture(e.pointerId))},[o,c]),k=(0,eu.useCallback)(e=>{f.current&&(l(f.current.tx+e.clientX-f.current.startX),u(f.current.ty+e.clientY-f.current.startY))},[]),w=(0,eu.useCallback)(()=>{f.current=null},[]);if(0===r||0===a)return null;let A=new Set(e.nodes.filter(e=>b.has("procedural"===e.memory_type?"procedural":"semantic")).map(e=>e.id)),N=e.edges.filter(e=>A.has(e.source)&&A.has(e.target)&&(h.has(e.relation)||!N2.includes(e.relation)));return(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsxs)("div",{className:"absolute left-3 top-3 z-10 flex gap-1",children:[(0,ec.jsx)("button",{type:"button",onClick:()=>T(r/2,a/2,1.25),className:N1,"aria-label":"Zoom in observation graph",title:"Zoom in",children:(0,ec.jsx)(wL,{className:"h-3.5 w-3.5","aria-hidden":"true"})}),(0,ec.jsx)("button",{type:"button",onClick:()=>T(r/2,a/2,.8),className:N1,"aria-label":"Zoom out observation graph",title:"Zoom out",children:(0,ec.jsx)(wM,{className:"h-3.5 w-3.5","aria-hidden":"true"})}),(0,ec.jsx)("button",{type:"button",onClick:()=>{l(0),u(0),p(1)},className:N1,"aria-label":"Reset observation graph view",title:"Reset view",children:(0,ec.jsx)(N0,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]}),(0,ec.jsxs)("div",{className:"absolute right-3 top-3 z-10 flex max-w-[calc(100%-1.5rem)] select-none flex-col gap-1 rounded border border-border bg-background/90 px-2.5 py-2 text-[11px] shadow-sm backdrop-blur-sm",children:[["complements","contradicts","supersedes"].map(e=>{let t=h.has(e);return(0,ec.jsxs)("button",{type:"button",onClick:()=>{g(t=>{let n=new Set(t);if(n.has(e)){if(1===n.size)return t;n.delete(e)}else n.add(e);return n})},"aria-pressed":t,title:`${t?"Hide":"Show"} ${e} edges`,className:`flex items-center gap-1.5 text-left transition-opacity ${t?"opacity-100":"opacity-35"}`,children:[(0,ec.jsx)("span",{className:"inline-block h-2 w-6 flex-shrink-0 rounded-sm",style:{background:Aj(e)}}),(0,ec.jsx)("span",{className:"capitalize text-muted-foreground",children:AB(e)})]},e)}),(0,ec.jsx)("div",{className:"mt-1 flex flex-col gap-0.5 border-t border-border pt-1",children:[["semantic","Semantic"],["procedural","Procedural"]].map(([e,t])=>{let n=b.has(e);return(0,ec.jsxs)("button",{type:"button",onClick:()=>{y(t=>{let n=new Set(t);if(n.has(e)){if(1===n.size)return t;n.delete(e)}else n.add(e);return n})},"aria-pressed":n,title:`${n?"Hide":"Show"} ${t.toLowerCase()} nodes`,className:`flex items-center gap-1.5 text-left transition-opacity ${n?"opacity-100":"opacity-35"}`,children:[(0,ec.jsx)("span",{className:"inline-block h-3 w-3 flex-shrink-0 rounded-full",style:{background:AU(e)}}),(0,ec.jsx)("span",{className:"text-muted-foreground",children:t})]},e)})})]}),(0,ec.jsxs)("svg",{ref:m,width:r,height:a,className:"absolute inset-0 cursor-grab active:cursor-grabbing",style:{userSelect:"none"},role:"img","aria-label":"Observation relationship graph",onWheel:S,onPointerDown:_,onPointerMove:k,onPointerUp:w,onClick:e=>{(e.target===e.currentTarget||"svg"===e.target.tagName)&&n(null)},children:[(0,ec.jsx)("defs",{children:["complements","contradicts","supersedes","default"].map(e=>(0,ec.jsx)("marker",{id:`arrow-${e}`,viewBox:"0 0 10 10",markerWidth:"7",markerHeight:"7",refX:"10",refY:"5",orient:"auto",markerUnits:"userSpaceOnUse",children:(0,ec.jsx)("path",{d:"M0,1.5 L10,5 L0,8.5 z",fill:Aj(e)})},e))}),(0,ec.jsxs)("g",{transform:`translate(${o},${c}) scale(${d})`,children:[N.map((e,t)=>{let n=E.get(e.source),r=E.get(e.target);if(!n||!r)return null;let a=x.get(e.source),i=x.get(e.target),s=a?AF(a.degree):9,o=i?AF(i.degree):9,l=r.x-n.x,c=r.y-n.y,u=Math.max(Math.sqrt(l*l+c*c),1),d=l/u,p=c/u,m=n.x+d*s,f=n.y+p*s,h=r.x-d*(o+2),g=r.y-p*(o+2),b=e.relation in{complements:1,contradicts:1,supersedes:1}?e.relation:"default",y=Aj(e.relation),v=`edge-grad-${t}`,T="complements"===e.relation,S=Math.min(45,7/Math.max(u-s-(o+2),1)*100);return(0,ec.jsxs)("g",{children:[(0,ec.jsx)("linearGradient",{id:v,gradientUnits:"userSpaceOnUse",x1:m,y1:f,x2:h,y2:g,children:T?(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)("stop",{offset:"0%",stopColor:y,stopOpacity:0}),(0,ec.jsx)("stop",{offset:`${S}%`,stopColor:y,stopOpacity:.7}),(0,ec.jsx)("stop",{offset:`${100-S}%`,stopColor:y,stopOpacity:.7}),(0,ec.jsx)("stop",{offset:"100%",stopColor:y,stopOpacity:0})]}):(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)("stop",{offset:"0%",stopColor:y,stopOpacity:.7}),(0,ec.jsx)("stop",{offset:`${100-S}%`,stopColor:y,stopOpacity:.7}),(0,ec.jsx)("stop",{offset:"100%",stopColor:y,stopOpacity:0})]})}),(0,ec.jsx)("line",{x1:m,y1:f,x2:h,y2:g,stroke:`url(#${v})`,strokeWidth:1.5,strokeDasharray:"contradicts"===e.relation?"5,3":void 0,markerEnd:T?void 0:`url(#arrow-${b})`})]},t)}),e.nodes.map(e=>{let r=E.get(e.id);if(!r||!A.has(e.id))return null;let a=AF(e.degree),i=e.id===t,s=e.summary.length>28?e.summary.slice(0,26)+"…":e.summary;return(0,ec.jsxs)("g",{role:"button",tabIndex:0,"aria-label":`Select observation: ${e.summary}`,className:"outline-none [&:focus-visible]:outline-none [&:focus]:outline-none",style:{cursor:"pointer"},onClick:r=>{r.stopPropagation(),n(e.id===t?null:e.id)},onKeyDown:r=>{("Enter"===r.key||" "===r.key)&&(r.preventDefault(),n(e.id===t?null:e.id))},children:[i&&(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)("circle",{cx:r.x,cy:r.y,r:a+7,fill:"none",style:{stroke:"var(--brand)"},strokeWidth:2,opacity:.3}),(0,ec.jsx)("circle",{cx:r.x,cy:r.y,r:a+4,fill:"none",style:{stroke:"var(--brand)"},strokeWidth:2.5})]}),(0,ec.jsx)("circle",{cx:r.x,cy:r.y,r:a,fill:AU(e.memory_type),stroke:"#fff",strokeWidth:1.5,opacity:.9}),(0,ec.jsx)("text",{x:r.x,y:r.y+a+12,textAnchor:"middle",fontSize:10,fill:"currentColor",className:"select-none fill-foreground/70",children:s}),(0,ec.jsx)("title",{children:e.summary})]},e.id)})]})]})]})}function N5({message:e}){return(0,ec.jsx)("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:e})}function N6({data:e,loading:t,error:n,highlightNodeId:r}){let a=(0,eu.useRef)(null),[i,s]=(0,eu.useState)({w:0,h:0}),[o,l]=(0,eu.useState)(null),[c,u]=(0,eu.useState)(!1),[d,p]=(0,eu.useState)(360),m=(0,eu.useRef)(null);(0,eu.useEffect)(()=>{null!=r&&l(r)},[r]),(0,eu.useEffect)(()=>{let e=window.matchMedia("(min-width: 768px)"),t=()=>u(e.matches);return t(),e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]);let f=(0,eu.useCallback)(e=>{m.current={startX:e.clientX,startW:d},e.currentTarget.setPointerCapture(e.pointerId)},[d]),h=(0,eu.useCallback)(e=>{if(!m.current)return;let t=e.clientX-m.current.startX;p(Math.min(Math.max(640,.6*window.innerWidth),Math.max(280,m.current.startW-t)))},[]),g=(0,eu.useCallback)(()=>{m.current=null},[]);(0,eu.useEffect)(()=>{let e=a.current;if(!e)return;let t=new ResizeObserver(([e])=>{s({w:e.contentRect.width,h:e.contentRect.height})});return t.observe(e),()=>t.disconnect()},[]);let b=new Map((e?.nodes??[]).map(e=>[e.id,e])),y=o?b.get(o)??null:null,E=null!==y;return(0,ec.jsxs)("div",{className:"flex h-full min-h-0 w-full flex-col",children:[(0,ec.jsx)("div",{className:"flex items-center border-b border-border px-4 py-2",children:(0,ec.jsx)("span",{className:"text-xs text-muted-foreground",children:e?`${e.nodes.length} nodes \xb7 ${e.edges.length} edges`:t?"Loading…":""})}),(0,ec.jsxs)("div",{className:"relative flex min-h-0 flex-1",children:[(0,ec.jsxs)("div",{ref:a,className:"relative min-w-0 flex-1 overflow-hidden bg-muted/20",children:[t&&(0,ec.jsx)(N5,{message:"Loading observations…"}),!t&&n&&(0,ec.jsx)(N5,{message:`Error: ${n}`}),!t&&!n&&e&&0===e.nodes.length&&(0,ec.jsx)(N5,{message:"No observations yet."}),!t&&!n&&e&&e.nodes.length>0&&i.w>0&&(0,ec.jsx)(N4,{data:e,selectedId:o,onSelect:l,w:i.w,h:i.h})]}),E&&c&&(0,ec.jsx)("div",{role:"separator","aria-orientation":"vertical",onPointerDown:f,onPointerMove:h,onPointerUp:g,className:"hover:bg-[var(--brand)]/40 w-1 flex-shrink-0 cursor-col-resize bg-border transition-colors"}),E&&(0,ec.jsx)("div",{className:c?"flex-shrink-0 overflow-hidden":"absolute inset-0 z-20 overflow-hidden",style:c?{width:d}:void 0,children:(0,ec.jsx)(N3,{node:y,edges:e?.edges??[],nodeMap:b,onClose:()=>l(null),onNavigate:e=>l(e)})})]})]})}let N9=ny("compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),N8=[{path:"profile/USER_PROFILE.md",label:"User",description:"Persistent context about the researcher",Icon:ny("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]])},{path:"profile/RESEARCH_TASTE.md",label:"Taste",description:"Aesthetic and methodological preferences",Icon:N9},{path:"profile/SOUL.md",label:"SOUL",description:"EvoScientist's core values and personality",Icon:mj}];function N7({entry:e,selected:t,onSelect:n}){let{Icon:r}=e;return(0,ec.jsxs)("button",{type:"button",onClick:()=>n(e),className:n6("group flex w-full min-w-0 items-center gap-2 rounded-md border px-3 py-2.5 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",t?"border-[var(--brand)]/40 bg-accent":"hover:border-[var(--brand)]/40 border-border bg-[var(--color-surface)] hover:bg-accent/60"),children:[(0,ec.jsx)("span",{className:n6("flex size-7 shrink-0 items-center justify-center rounded-md transition-colors",t?"bg-[var(--brand)] text-white":"bg-muted text-[var(--brand)] group-hover:bg-background"),children:(0,ec.jsx)(r,{className:"size-4","aria-hidden":"true"})}),(0,ec.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,ec.jsx)("span",{className:"block truncate text-sm font-medium",children:e.label}),(0,ec.jsx)("span",{className:"block truncate text-[11px] text-muted-foreground",children:e.description})]})]})}function Ie({entry:e}){let[t,n]=(0,eu.useState)(""),[r,a]=(0,eu.useState)(""),[i,s]=(0,eu.useState)(!1),[o,l]=(0,eu.useState)(!1),[c,u]=(0,eu.useState)(!1),[d,p]=(0,eu.useState)(null),m=(0,eu.useRef)(0);(0,eu.useEffect)(()=>{if(!e){n(""),a("");return}let t=++m.current;s(!0),l(!1),p(null),fetch(`/api/memory?path=${encodeURIComponent(e.path)}`).then(async e=>{let t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Failed to load.");return t}).then(e=>{m.current===t&&(n(e.content??""),a(e.content??""))}).catch(e=>{m.current===t&&(n(""),a(""),p(e instanceof Error?e.message:"Failed to load."))}).finally(()=>{m.current===t&&s(!1)})},[e]);let f=async()=>{if(e){u(!0),p(null);try{let t=await fetch("/api/memory",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e.path,content:r})}),a=await t.json();if(!t.ok)throw Error(a.error??"Failed to save.");n(r),l(!1)}catch(e){p(e instanceof Error?e.message:"Failed to save.")}finally{u(!1)}}};if(!e)return(0,ec.jsx)("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"Select a profile to view"});let h=t.replace(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/,"").trim();return(0,ec.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,ec.jsxs)("div",{className:"flex flex-shrink-0 items-center justify-between border-b border-border px-4 py-2.5",children:[(0,ec.jsx)("span",{className:"text-sm font-medium",children:e.label}),(0,ec.jsx)("div",{className:"flex items-center gap-1.5",children:o?(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)(rg,{variant:"outline",size:"sm",onClick:()=>{l(!1),a(t)},children:"Cancel"}),(0,ec.jsx)(rg,{size:"sm",onClick:f,disabled:c||r===t,children:c?(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)(sk,{className:"size-3.5 animate-spin","aria-hidden":"true"}),"Saving"]}):"Save"})]}):(0,ec.jsxs)(rg,{variant:"outline",size:"sm",onClick:()=>l(!0),disabled:i,children:[(0,ec.jsx)(sN,{className:"size-3.5","aria-hidden":"true"}),"Edit raw"]})})]}),d&&(0,ec.jsx)("p",{className:"flex-shrink-0 px-4 py-2 text-xs text-destructive",children:d}),(0,ec.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden",children:i?(0,ec.jsxs)("div",{className:"flex h-full items-center justify-center gap-2 text-sm text-muted-foreground",children:[(0,ec.jsx)(sk,{className:"size-4 animate-spin","aria-hidden":"true"}),"Loading…"]}):o?(0,ec.jsx)("textarea",{"aria-label":`Edit ${e.label} memory`,className:"size-full resize-none bg-background p-4 font-mono text-sm text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",value:r,onChange:e=>a(e.target.value),spellCheck:!1}):(0,ec.jsx)(oo,{className:"h-full",children:(0,ec.jsx)("div",{className:"px-4 py-4",children:(0,ec.jsx)(Ac,{content:h})})})})]})}function It({listing:e,listingLoading:t}){let[n,r]=(0,eu.useState)(null),[a,i]=(0,eu.useState)(!1);(0,eu.useEffect)(()=>{let e=window.matchMedia("(min-width: 768px)"),t=()=>i(e.matches);return t(),e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]);let s=(0,eu.useMemo)(()=>(e?.entries??[]).filter(e=>e.path.startsWith("profile/projects/")&&e.path.endsWith(".md")).map(e=>{let t=e.path.split("/"),n=t.length>=4?`${t[2]}/${t.slice(3).join("/")}`:e.path;return{path:e.path,label:n.replace(/\/PROJECT_PROFILE\.md$/,""),description:"Project profile",Icon:mM}}),[e?.entries]),o=(0,eu.useMemo)(()=>[...N8,...s],[s]);(0,eu.useEffect)(()=>{!t&&0!==o.length&&(n&&o.some(e=>e.path===n.path)||r(o[0]))},[o,t,n]);let l=(0,ec.jsx)(oo,{className:"h-full",children:(0,ec.jsxs)("div",{className:"p-3",children:[(0,ec.jsx)("p",{className:"mb-2 text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Profile"}),(0,ec.jsx)("div",{className:"space-y-1.5",children:N8.map(e=>(0,ec.jsx)(N7,{entry:e,selected:n?.path===e.path,onSelect:r},e.path))}),(0,ec.jsx)("p",{className:"mb-2 mt-5 text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Project Profiles"}),t?(0,ec.jsxs)("div",{className:"flex h-10 items-center gap-2 text-xs text-muted-foreground",children:[(0,ec.jsx)(sk,{className:"size-3.5 animate-spin","aria-hidden":"true"}),"Loading projects…"]}):0===s.length?(0,ec.jsx)("p",{className:"text-xs text-muted-foreground",children:"No project profiles yet."}):(0,ec.jsx)("div",{className:"space-y-1.5",children:s.map(e=>(0,ec.jsx)(N7,{entry:e,selected:n?.path===e.path,onSelect:r},e.path))})]})});return a?(0,ec.jsxs)(sx,{direction:"horizontal",autoSaveId:"evomemory-identity",className:"h-full",children:[(0,ec.jsx)(i_,{defaultSize:35,minSize:22,maxSize:55,children:l}),(0,ec.jsx)(sv,{}),(0,ec.jsx)(i_,{defaultSize:65,minSize:45,children:(0,ec.jsx)(Ie,{entry:n})})]}):(0,ec.jsxs)("div",{className:"flex min-h-0 w-full flex-1 flex-col",children:[(0,ec.jsx)("div",{className:"max-h-[42svh] flex-shrink-0 overflow-hidden border-b border-border",children:l}),(0,ec.jsx)("div",{className:"min-h-0 flex-1",children:(0,ec.jsx)(Ie,{entry:n})})]})}function In(e){try{let t=new Date(e),n=new Date;return t.getFullYear()===n.getFullYear()&&t.getMonth()===n.getMonth()&&t.getDate()===n.getDate()}catch{return!1}}function Ir({items:e}){let t=new Set(e.filter(e=>"execution"===e.kind).map(e=>e.project_id).filter(Boolean)).size,n=e.filter(e=>e.created_at&&In(e.created_at)),r=n.filter(e=>"execution"===e.kind).length,a=n.filter(e=>"observation"===e.kind).length,i=[{n:t,label:"Projects"},{n:e.length,label:"Total"},{n:r,label:"Runs Today"},{n:a,label:"Obs Today"}];return(0,ec.jsx)("div",{className:"flex flex-shrink-0 border-b border-border",children:i.map(e=>(0,ec.jsxs)("div",{className:"flex flex-1 flex-col items-center gap-1 border-r border-border py-2 last:border-r-0",children:[(0,ec.jsx)("span",{className:"text-lg font-bold leading-none text-[var(--brand)]",children:e.n}),(0,ec.jsx)("span",{className:"text-[11px] leading-none text-muted-foreground",children:e.label})]},e.label))})}function Ia({created_at:e,dotColor:t,children:n}){return(0,ec.jsxs)("div",{className:"flex gap-2",children:[(0,ec.jsx)("time",{dateTime:e,className:"w-14 flex-shrink-0 pt-3 text-right text-xs tabular-nums leading-none text-muted-foreground",children:function(e){try{let t=new Date(e);if(In(e))return new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).format(t);let n=new Date;return new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",...t.getFullYear()!==n.getFullYear()?{year:"numeric"}:{}}).format(t)}catch{return e}}(e)}),(0,ec.jsxs)("div",{className:"relative flex w-3 flex-shrink-0 justify-center",children:[(0,ec.jsx)("span",{className:"absolute bottom-0 left-1/2 top-0 w-px -translate-x-1/2 bg-border","aria-hidden":"true"}),(0,ec.jsx)("span",{className:"z-10 mt-3 size-2.5 rounded-full border-2 border-[var(--color-surface)]",style:{background:t}})]}),n]})}function Ii({entry:e,onNavigateToObs:t,defaultOpen:n=!1}){let[r,a]=(0,eu.useState)(n),i=(0,eu.useRef)(null),s=`${r?"Collapse":"Expand"} ${e.agent} execution: ${e.summary}`;return(0,eu.useEffect)(()=>{n&&(a(!0),i.current?.scrollIntoView({block:"center"}))},[n]),(0,ec.jsx)(Ia,{created_at:e.created_at,dotColor:"var(--brand)",children:(0,ec.jsxs)("div",{ref:i,className:`hover:border-[var(--brand)]/40 mb-2 min-w-0 flex-1 overflow-hidden rounded-lg border bg-[var(--color-surface)] transition-colors ${n?"border-[var(--brand)]/40":"border-border"}`,children:[(0,ec.jsxs)("button",{type:"button","aria-expanded":r,"aria-label":s,title:s,onClick:()=>a(e=>!e),className:"flex w-full items-center gap-2 px-3 py-2.5 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",children:[(0,ec.jsx)("span",{className:"flex-shrink-0 text-sm font-medium text-foreground",children:e.agent}),!r&&(0,ec.jsx)("span",{className:"min-w-0 flex-1 truncate text-xs text-muted-foreground",children:e.summary}),(0,ec.jsx)(cP,{className:`ml-auto size-3.5 flex-shrink-0 text-muted-foreground transition-transform duration-200 ${r?"rotate-180":""}`,"aria-hidden":"true"})]}),(0,ec.jsx)("div",{className:"grid transition-[grid-template-rows] duration-200",style:{gridTemplateRows:r?"1fr":"0fr"},children:r&&(0,ec.jsxs)("div",{className:"overflow-hidden",children:[e.project_id&&(0,ec.jsx)("p",{className:"px-3 pb-2 font-mono text-[11px] text-muted-foreground",children:e.project_id}),(0,ec.jsx)("p",{className:"border-t border-border px-3 py-3 text-sm leading-relaxed text-foreground",children:e.summary}),e.obs_ids.length>0&&(0,ec.jsxs)("div",{className:"border-t border-border px-3 py-2.5",children:[(0,ec.jsx)("p",{className:"mb-2 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Linked Observations"}),(0,ec.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.obs_ids.map(e=>(0,ec.jsxs)("button",{type:"button",onClick:n=>{n.stopPropagation(),t(e)},className:"border-[var(--brand)]/40 rounded border bg-background px-2 py-0.5 font-mono text-[11px] text-[var(--brand)] transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",title:`Jump to ${e} in Knowledge graph`,"aria-label":`Jump to observation ${e} in Knowledge graph`,children:[e.slice(0,14),"…"]},e))})]})]})})]})})}function Is({obs:e,onNavigateToObs:t}){let n=AU(e.memory_type);return(0,ec.jsx)(Ia,{created_at:e.created_at,dotColor:n,children:(0,ec.jsx)("button",{type:"button",onClick:()=>t(e.id),title:"View in Knowledge graph","aria-label":`View observation in Knowledge graph: ${e.summary}`,className:"hover:border-[var(--brand)]/40 mb-2 min-w-0 flex-1 cursor-pointer overflow-hidden rounded-lg border border-dashed border-border bg-[var(--color-surface)] px-3 py-2.5 text-left transition-colors hover:bg-accent/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:(0,ec.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ec.jsx)("span",{className:"flex-shrink-0 rounded px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-white",style:{background:n},children:e.memory_type}),(0,ec.jsx)("span",{className:"min-w-0 flex-1 truncate text-xs text-foreground",children:e.summary}),(0,ec.jsx)(AO,{className:"ml-auto size-3.5 flex-shrink-0 text-muted-foreground","aria-hidden":"true"})]})})})}function Io({items:e,truncated:t,loading:n,error:r,highlightExecId:a,onRefresh:i,onNavigateToObs:s}){return n&&!e?(0,ec.jsxs)("div",{className:"flex flex-1 items-center justify-center gap-2 text-sm text-muted-foreground",children:[(0,ec.jsx)(sk,{className:"size-4 animate-spin","aria-hidden":"true"}),"Loading history…"]}):r?(0,ec.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-8",children:[(0,ec.jsx)("p",{className:"text-sm text-destructive",children:r}),(0,ec.jsxs)("button",{type:"button",onClick:i,className:"flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground",children:[(0,ec.jsx)(NJ,{className:"size-3.5","aria-hidden":"true"}),"Retry"]})]}):e&&0!==e.length?(0,ec.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,ec.jsx)(Ir,{items:e}),(0,ec.jsx)(oo,{type:"always",className:"min-h-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block [&_[data-slot=scroll-area-viewport]>div]:!w-full",children:(0,ec.jsxs)("div",{className:"p-4",children:[(0,ec.jsx)("div",{children:e.map(e=>"execution"===e.kind?(0,ec.jsx)(Ii,{entry:e,onNavigateToObs:s,defaultOpen:a===e.id},`e-${e.id}`):(0,ec.jsx)(Is,{obs:e,onNavigateToObs:s},`o-${e.id}`))}),t&&(0,ec.jsxs)("p",{className:"mt-2 text-center text-xs text-muted-foreground",children:["Showing newest ",e.length," items."]})]})})]}):(0,ec.jsx)("div",{className:"flex flex-1 items-center justify-center text-sm text-muted-foreground",children:"No activity yet."})}function Il(e){return"identity"===e||"knowledge"===e||"history"===e}function Ic({initialTab:e,initialObsId:t,initialExecId:n}={}){let[r,a]=(0,eu.useState)(null),[i,s]=(0,eu.useState)(!0),[o,l]=(0,eu.useState)(Il(e)?e:"identity"),[c,u]=(0,eu.useState)(null),[d,p]=(0,eu.useState)(!1),[m,f]=(0,eu.useState)(null),[h,g]=(0,eu.useState)(null),[b,y]=(0,eu.useState)(!1),[E,x]=(0,eu.useState)(null),[v,T]=(0,eu.useState)(t??null),S=(0,eu.useRef)(0),_=(0,eu.useRef)(0),k=(0,eu.useCallback)(async()=>{s(!0);try{let e=await fetch("/api/memory"),t=await e.json();if(!e.ok)return;a(t);let n=t.entries.reduce((e,t)=>t.mtime>e?t.mtime:e,0);n>0&&u7(n)}catch{}finally{s(!1)}},[]),w=(0,eu.useCallback)(async()=>{let e=++S.current;p(!0),f(null);try{let t=await fetch("/api/memory/observations",{cache:"no-store"}),n=await t.json().catch(()=>({}));if(e!==S.current)return;if(!t.ok)throw Error(n.error||"Failed.");u(n)}catch(t){if(e!==S.current)return;f(t instanceof Error?t.message:"Failed to load.")}finally{e===S.current&&p(!1)}},[]),A=(0,eu.useCallback)(async()=>{let e=++_.current;y(!0),x(null);try{let t=await fetch("/api/memory/executions",{cache:"no-store"}),n=await t.json().catch(()=>({}));if(e!==_.current)return;if(!t.ok)throw Error(n.error||"Failed.");g(n)}catch(t){if(e!==_.current)return;x(t instanceof Error?t.message:"Failed to load.")}finally{e===_.current&&y(!1)}},[]);(0,eu.useEffect)(()=>{k()},[k]),(0,eu.useEffect)(()=>{Il(e)&&l(e)},[e]),(0,eu.useEffect)(()=>{t?(T(t),l("knowledge")):T(null)},[t]),(0,eu.useEffect)(()=>{n&&l("history")},[n]),(0,eu.useEffect)(()=>{if("history"!==o)return;let e=()=>{A(),w()};e();let t=setInterval(e,3e4);return()=>clearInterval(t)},[o,A,w]),(0,eu.useEffect)(()=>{"knowledge"!==o||c||d||w()},[o,c,d,w]);let N=(0,eu.useMemo)(()=>{if(!h||!c)return null;let e=[];for(let t of h.entries)e.push({kind:"execution",...t});for(let t of c.nodes)e.push({kind:"observation",id:t.id,created_at:t.created_at,summary:t.summary,memory_type:t.memory_type,scope:t.scope});return e.sort((e,t)=>e.created_at<t.created_at?1:-1),e},[h,c]),I=[{id:"identity",label:"Identity",Icon:NQ},{id:"knowledge",label:"Knowledge",Icon:AO},{id:"history",label:"History",Icon:AM}];return(0,ec.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,ec.jsxs)("header",{className:"flex flex-shrink-0 items-start justify-between gap-3 border-b border-border px-4 py-3 sm:px-5",children:[(0,ec.jsxs)("div",{className:"min-w-0",children:[(0,ec.jsx)("h2",{className:"text-xl font-semibold sm:text-2xl",children:"EvoMemory"}),(0,ec.jsxs)("p",{className:"mt-1 text-sm leading-6 text-muted-foreground",children:["EvoScientist's"," ",(0,ec.jsx)("span",{className:"font-medium text-[var(--brand)]",children:"self-evolving memory system"})," ","— continuously learns and refines what it knows about you, your research taste, and lessons from past experiments."]})]}),(0,ec.jsx)("button",{type:"button",onClick:()=>{"history"===o?(A(),w()):"knowledge"===o?w():k()},disabled:"history"===o?b||d:"knowledge"===o?d:i,"aria-label":"Refresh",title:"Refresh",className:"mt-0.5 flex-shrink-0 rounded-md p-2 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50",children:(0,ec.jsx)(NJ,{className:`size-4 ${"history"===o&&(b||d)||"knowledge"===o&&d||"identity"===o&&i?"animate-spin":""}`,"aria-hidden":"true"})})]}),(0,ec.jsx)("div",{className:"grid flex-shrink-0 grid-cols-3 gap-1 border-b border-border px-2 pt-1 sm:flex sm:items-center sm:px-3",role:"tablist","aria-label":"Memory views",children:I.map(({id:e,label:t,Icon:n})=>(0,ec.jsxs)("button",{type:"button",role:"tab","aria-selected":o===e,onClick:()=>{l(e),"knowledge"!==e&&T(null)},className:n6("flex min-w-0 items-center justify-center gap-1 rounded-t-md border-b-2 px-1.5 py-2 text-xs transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring sm:gap-1.5 sm:px-3 sm:text-sm",o===e?"border-[var(--brand)] bg-accent text-foreground":"border-transparent text-muted-foreground hover:bg-accent hover:text-foreground"),children:[(0,ec.jsx)(n,{className:"size-3.5","aria-hidden":"true"}),t]},e))}),(0,ec.jsxs)("div",{className:"flex min-h-0 flex-1 overflow-hidden",children:["identity"===o&&(0,ec.jsx)(It,{listing:r,listingLoading:i}),"knowledge"===o&&(0,ec.jsx)(N6,{data:c,loading:d,error:m,highlightNodeId:v}),"history"===o&&(0,ec.jsx)("div",{className:"flex min-h-0 w-full flex-1 flex-col",children:(0,ec.jsx)(Io,{items:N,truncated:!!h?.truncated,loading:b||d,error:E||m,highlightExecId:n,onRefresh:()=>{A(),w()},onNavigateToObs:e=>{T(e),l("knowledge")}})})]})]})}let Iu=ny("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),Id=ny("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),Ip=ny("calendar-clock",[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]),Im=ny("clipboard-list",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]),If=ny("flask-conical",[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]]),Ih=ny("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]),Ig=ny("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),Ib=ny("repeat-2",[["path",{d:"m2 9 3-3 3 3",key:"1ltn5i"}],["path",{d:"M13 18H7a2 2 0 0 1-2-2V6",key:"1r6tfw"}],["path",{d:"m22 15-3 3-3-3",key:"4rnwn2"}],["path",{d:"M11 6h6a2 2 0 0 1 2 2v10",key:"2f72bc"}]]);function Iy(e){return e&&"object"==typeof e?e:{}}function IE(e){return"pending"===e||"running"===e}let Ix={frequency:"daily",hour:9,minute:0,dayOfWeek:1,dayOfMonth:1,custom:"0 9 * * *"},Iv=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function IT(e,t,n){return Number.isFinite(e)?Math.min(n,Math.max(t,e)):t}function IS(e){let t=IT(e.minute,0,59),n=IT(e.hour,0,23),r=IT(e.dayOfWeek,0,6),a=IT(e.dayOfMonth,1,28);switch(e.frequency){case"daily":break;case"weekly":return`${t} ${n} * * ${r}`;case"monthly":return`${t} ${n} ${a} * *`;case"custom":return e.custom.trim()}return`${t} ${n} * * *`}function I_(e){let t=e.trim().split(/\s+/);if(5!==t.length)return{...Ix,frequency:"custom",custom:e};let[n,r,a,i,s]=t,o=parseInt(n,10),l=parseInt(r,10);return"*"!==i||"*"!==a||"*"!==s||isNaN(o)||isNaN(l)?"*"!==i||"*"!==a||isNaN(parseInt(s,10))||isNaN(o)||isNaN(l)?"*"!==i||"*"!==s||isNaN(parseInt(a,10))||isNaN(o)||isNaN(l)?{...Ix,frequency:"custom",custom:e}:{...Ix,frequency:"monthly",hour:IT(l,0,23),minute:IT(o,0,59),dayOfMonth:IT(parseInt(a,10),1,28)}:{...Ix,frequency:"weekly",hour:IT(l,0,23),minute:IT(o,0,59),dayOfWeek:IT(parseInt(s,10),0,6)}:{...Ix,frequency:"daily",hour:l,minute:o}}function Ik(e){let t=I_(e),n=`${String(t.hour).padStart(2,"0")}:${String(t.minute).padStart(2,"0")}`;switch(t.frequency){case"daily":return`Every day at ${n}`;case"weekly":return`Every ${Iv[t.dayOfWeek]} at ${n}`;case"monthly":return`Monthly on day ${t.dayOfMonth} at ${n}`;default:return e}}function Iw(e){if(!e)return"—";let t=new Date(e);if(isNaN(t.getTime()))return"—";let n=Date.now(),r=t.getTime()-n;if(r<0)return"Overdue";let a=Math.round(r/6e4);if(a<1)return"in <1m";if(a<60)return`in ${a}m`;let i=Math.round(r/36e5);if(i<24)return`in ${i}h`;let s=Math.round(r/864e5);return`in ${s}d`}function IA(e){if(!e)return"";let t=new Date(e);return Number.isNaN(t.getTime())?"":new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(t)}function IN({task:e,onOpenThread:t}){let{runs:n,loaded:r,error:a}=function(e){let[t,n]=(0,eu.useState)([]),[r,a]=(0,eu.useState)(!1),[i,s]=(0,eu.useState)(null),o=(0,eu.useRef)(0),l=(0,eu.useRef)(!0),c=(0,eu.useRef)(new Map),u=e?.cron_id??null,d=e?.prompt??"";(0,eu.useEffect)(()=>{c.current=new Map},[u]);let p=(0,eu.useCallback)(async()=>{if(!u){n([]),a(!0);return}let e=A$();if(!e){n([]),a(!0);return}let t=++o.current,r=c.current;try{let a=await e.threads.search({metadata:{graph_id:"scheduler"},limit:50}),i=await Promise.all(a.map(async t=>{let n=r.get(t.thread_id);if(!1===n)return null;if(n&&!IE(n.status)&&n.thread_updated_at===(t.updated_at??null))return n;try{let n,a,i,s,o,l,c,p,m,f=(await e.runs.list(t.thread_id,{limit:1}))[0];if(!f)return null;if(!function(e,t,n){if(Iy(t).cron_id===n.cron_id)return!0;let r=Iy(e),a=Iy(r.metadata);return a.cron_id===n.cron_id||Iy(Iy(Iy(r.kwargs).config).configurable).cron_id===n.cron_id||"scheduled_task"===a.run_kind&&"string"==typeof a.prompt&&""!==a.prompt&&a.prompt===n.prompt}(f,t.metadata,{cron_id:u,prompt:d}))return r.set(t.thread_id,!1),null;let h=(n=Iy(f),a=Iy(n.metadata),i=Iy(t.metadata),s=function(e){switch(e){case"pending":case"running":case"success":case"error":case"timeout":case"interrupted":return e;default:return"error"}}(n.status),o="string"==typeof n.created_at?n.created_at:null,l="string"==typeof n.updated_at?n.updated_at:null,c=o??t.created_at??new Date(0).toISOString(),p=IE(s)?null:l??t.updated_at??null,m="manual"===i.trigger||"manual-run"===a.name?"manual":"cron",{thread_id:t.thread_id,run_id:"string"==typeof n.run_id?n.run_id:null,status:s,trigger:m,started_at:c,ended_at:p,thread_updated_at:t.updated_at??null});return r.set(t.thread_id,h),h}catch{return n||null}}));if(t!==o.current||!l.current)return;let c=i.filter(e=>!!e).sort((e,t)=>Date.parse(t.started_at)-Date.parse(e.started_at)).slice(0,20);n(c),s(null)}catch{t===o.current&&l.current&&s("Couldn't load task runs.")}finally{t===o.current&&l.current&&a(!0)}},[u,d]);return(0,eu.useEffect)(()=>{l.current=!0,a(!1),p();let e=setInterval(()=>{document.hidden||p()},3e3);return()=>{l.current=!1,clearInterval(e)}},[p]),{runs:t,loaded:r,error:i,refresh:p}}(e),[i,s]=(0,eu.useState)(()=>Date.now()),[o,l]=(0,eu.useState)(null),[c,u]=(0,eu.useState)({}),[d,p]=(0,eu.useState)(null),m=(0,eu.useRef)(new Set),f=n.some(e=>IE(e.status));(0,eu.useEffect)(()=>{if(!f)return;let e=setInterval(()=>s(Date.now()),1e3);return()=>clearInterval(e)},[f]),(0,eu.useEffect)(()=>{l(null),u({}),p(null),m.current.clear()},[e.cron_id]);let h=(0,eu.useMemo)(()=>n.find(e=>e.thread_id===o)??null,[n,o]),g=!!h&&IE(h.status),b=h?.thread_updated_at??null;return(0,eu.useEffect)(()=>{if(!o)return;let e=`${o}:${b??""}`;if(!g&&m.current.has(e))return;let t=A$();if(!t)return;let n=!1,r=async()=>{try{let r=await t.threads.getState(o);if(n)return;let a=Array.isArray(r.values?.messages)?r.values.messages:[];u(e=>({...e,[o]:my(a)})),p(null),g||m.current.add(e)}catch{n||p("Couldn't load run steps.")}};r();let a=g?setInterval(r,2500):null;return()=>{n=!0,a&&clearInterval(a)}},[o,g,b]),(0,ec.jsxs)("section",{className:"space-y-1.5",children:[(0,ec.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:"Activity"}),(0,ec.jsxs)("div",{className:"rounded-md border border-border bg-[var(--color-surface)]",children:[!f&&(0,ec.jsxs)("div",{className:"flex items-center gap-2 border-b border-border px-3 py-2",children:[(0,ec.jsx)("span",{className:"size-2 shrink-0 rounded-full bg-[var(--color-text-tertiary,var(--muted-foreground))] opacity-40","aria-hidden":"true"}),(0,ec.jsx)("p",{className:"min-w-0 truncate text-sm text-muted-foreground",children:e.next_run_date?`Next run ${Iw(e.next_run_date)} \xb7 ${IA(e.next_run_date)}`:"Not scheduled"})]}),a?(0,ec.jsx)("p",{className:"px-3 py-2.5 text-sm text-destructive",role:"alert",children:a}):r?0===n.length?(0,ec.jsx)("p",{className:"px-3 py-2.5 text-sm text-muted-foreground",children:"No runs yet. Runs appear here after the schedule fires or you press Run now."}):(0,ec.jsx)("div",{className:"divide-y divide-border",children:n.map(e=>{var n;let r=e.thread_id===o,a=c[e.thread_id];return(0,ec.jsxs)("div",{children:[(0,ec.jsxs)("button",{type:"button",onClick:()=>{var t;return t=e.thread_id,void(p(null),l(e=>e===t?null:t))},"aria-expanded":r,className:"flex w-full items-center gap-2 px-3 py-2 text-left transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,ec.jsx)("span",{className:n6("size-2 shrink-0 rounded-full",IE(e.status)?"bg-[var(--color-success)] animate-pulse":"success"===e.status?"bg-[var(--color-success)]":"bg-[var(--color-error)]"),"aria-hidden":"true"}),"success"===e.status&&(0,ec.jsx)("span",{className:"sr-only",children:"Completed: "}),(0,ec.jsx)("span",{className:"min-w-0 flex-1 truncate text-sm tabular-nums",children:function(e,t){if(IE(e.status)){let n=Av(e.started_at,t);return n?`Running… ${n}`:"Running…"}let n=IA(e.started_at),r=e.ended_at?Av(e.started_at,Date.parse(e.ended_at)):"",a="success"!==e.status?` \xb7 ${e.status}`:"";return[n,r].filter(Boolean).join(" · ")+a}(e,i)}),"manual"===e.trigger&&(0,ec.jsx)("span",{className:"shrink-0 rounded-full bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground",children:"manual"}),r?(0,ec.jsx)(cP,{className:"size-3.5 shrink-0 text-muted-foreground","aria-hidden":"true"}):(0,ec.jsx)(Aw,{className:"size-3.5 shrink-0 text-muted-foreground","aria-hidden":"true"})]}),r&&(0,ec.jsxs)("div",{className:"border-t border-border/60 px-3 py-2",children:["interrupted"===e.status&&t&&(0,ec.jsxs)("button",{type:"button",onClick:()=>void t(e.thread_id),className:"mb-2 inline-flex items-center gap-1.5 rounded-md border border-border px-2 py-1 text-xs text-foreground transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,ec.jsx)(A6,{className:"size-3.5","aria-hidden":"true"}),"Open conversation to respond"]}),d?(0,ec.jsx)("p",{className:"text-xs text-destructive",role:"alert",children:d}):a?0===a.length?(0,ec.jsx)("p",{className:"text-xs text-muted-foreground",children:"No steps recorded yet."}):(0,ec.jsx)(Au,{steps:a,running:"success"!==(n=e.status)&&"error"!==n&&"timeout"!==n,compact:!0}):(0,ec.jsxs)("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",role:"status",children:[(0,ec.jsx)(sk,{className:"size-3 animate-spin","aria-hidden":"true"}),"Loading steps…"]})]})]},e.thread_id)})}):(0,ec.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2.5 text-sm text-muted-foreground",role:"status",children:[(0,ec.jsx)(sk,{className:"size-3.5 animate-spin","aria-hidden":"true"}),"Loading runs…"]})]})]})}let II=[{icon:Im,label:"Daily Papers",description:"Track new ML papers against your research preferences.",name:"Daily Papers",prompt:"Summarise the latest ML papers from arXiv according to my research preferences with the paper-navigator skill. Focus on papers that are relevant to my current projects, explain why each one matters, and save the summary to ./daily-papers.md in the current workspace.",schedule:"0 9 * * *"},{icon:Ib,label:"Weekly Research Review",description:"Summarise this week's research progress and future direction.",name:"Weekly Research Review",prompt:"Summarise this week's research progress across my active projects. Highlight key results, decisions, blockers, open questions, and what changed in my understanding. Then propose future research directions and concrete next steps. Save the review to ./weekly-research-review.md in the current workspace.",schedule:"0 17 * * 5"},{icon:AD,label:"Weekly Research Plan",description:"Draft a Monday plan for the week's research priorities.",name:"Weekly Research Plan",prompt:"Draft this week's research plan based on my active projects, recent progress, project files, and open questions. Prioritise the most important research goals, propose concrete experiments or reading tasks, identify risks, and write a practical schedule for the week. Save the plan to ./weekly-research-plan.md in the current workspace.",schedule:"0 8 * * 1"},{icon:If,label:"Experiment Backlog",description:"Convert open questions into testable experiment ideas.",name:"Experiment Backlog",prompt:"Review my active project files, recent research notes, and open questions. Turn the most important unresolved ideas into a prioritised experiment backlog with hypotheses, expected signal, required data or code, estimated effort, and success criteria. Save it to ./experiment-backlog.md in the current workspace.",schedule:"0 10 * * 2"}];function IC(e){if(!e)return"Not scheduled";let t=new Date(e);return Number.isNaN(t.getTime())?"Unknown":new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(t)}function IR(e){if(!e)return"";let t=new Date(e);return Number.isNaN(t.getTime())?"":new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(t)}function IO({children:e,htmlFor:t}){return(0,ec.jsx)("label",{htmlFor:t,className:"text-xs font-medium text-muted-foreground",children:e})}function ID({value:e,onChange:t,error:n}){let r=n=>t({...e,...n}),a="h-9 rounded-md border border-input bg-background py-1.5 pl-2.5 pr-8 text-sm outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",i=n6(a,"w-full sm:min-w-40"),s=n6(a,"w-full sm:w-28");return(0,ec.jsxs)("div",{className:"space-y-2",children:[(0,ec.jsxs)("div",{className:"grid gap-2 sm:grid-cols-[minmax(9rem,1fr)_auto_auto_auto_auto] sm:items-center",children:[(0,ec.jsxs)("select",{"aria-label":"Schedule frequency",value:e.frequency,onChange:e=>r({frequency:e.target.value}),className:i,children:[(0,ec.jsx)("option",{value:"daily",children:"Every day"}),(0,ec.jsx)("option",{value:"weekly",children:"Every week"}),(0,ec.jsx)("option",{value:"monthly",children:"Every month"}),(0,ec.jsx)("option",{value:"custom",children:"Custom cron"})]}),"custom"!==e.frequency&&(0,ec.jsxs)(ec.Fragment,{children:["weekly"===e.frequency&&(0,ec.jsx)("select",{"aria-label":"Day of week",value:e.dayOfWeek,onChange:e=>r({dayOfWeek:Number(e.target.value)}),className:s,children:Iv.map((e,t)=>(0,ec.jsx)("option",{value:t,children:e},e))}),"monthly"===e.frequency&&(0,ec.jsx)("select",{"aria-label":"Day of month",value:e.dayOfMonth,onChange:e=>r({dayOfMonth:Number(e.target.value)}),className:s,children:Array.from({length:28},(e,t)=>t+1).map(e=>(0,ec.jsxs)("option",{value:e,children:["Day ",e]},e))}),(0,ec.jsx)("span",{className:"hidden text-xs text-muted-foreground sm:block",children:"at"}),(0,ec.jsxs)("div",{className:"grid grid-cols-[1fr_auto_1fr] items-center gap-1 sm:col-span-2 sm:w-32",children:[(0,ec.jsx)(rv,{"aria-label":"Hour",type:"number",min:0,max:23,value:e.hour,onChange:e=>r({hour:Number(e.target.value)}),className:"h-9 text-center font-mono tabular-nums"}),(0,ec.jsx)("span",{className:"font-mono text-muted-foreground",children:":"}),(0,ec.jsx)(rv,{"aria-label":"Minute",type:"number",min:0,max:59,value:e.minute,onChange:e=>r({minute:Number(e.target.value)}),className:"h-9 text-center font-mono tabular-nums"})]})]})]}),"custom"===e.frequency&&(0,ec.jsx)(rv,{type:"text",value:e.custom,onChange:e=>r({custom:e.target.value}),placeholder:"0 9 * * 1-5",spellCheck:!1,"aria-invalid":!!n,"aria-describedby":"schedule-cron-help",className:"h-9 font-mono text-sm"}),(0,ec.jsxs)("div",{id:"schedule-cron-help",className:n6("flex items-center gap-1.5 text-xs",n?"text-destructive":"text-muted-foreground"),children:[(0,ec.jsx)(Ip,{className:"size-3.5 shrink-0","aria-hidden":"true"}),(0,ec.jsx)("span",{className:"min-w-0 truncate",children:n??Ik(IS(e))})]})]})}function IL({template:e,onSelect:t,compact:n}){let r=e.icon;return(0,ec.jsxs)("button",{type:"button",onClick:()=>t(e),className:n6("hover:border-[var(--brand)]/40 group flex w-full min-w-0 items-start gap-2 rounded-md border border-border bg-[var(--color-surface)] text-left transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",n?"px-2.5 py-2":"px-3 py-2.5"),children:[(0,ec.jsx)("span",{className:"mt-0.5 flex size-7 shrink-0 items-center justify-center rounded-md bg-muted text-[var(--brand)] group-hover:bg-background",children:(0,ec.jsx)(r,{className:"size-4","aria-hidden":"true"})}),(0,ec.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,ec.jsx)("span",{className:"block truncate text-sm font-medium",children:e.label}),!n&&(0,ec.jsx)("span",{className:"mt-0.5 line-clamp-2 text-xs leading-snug text-muted-foreground",children:e.description}),(0,ec.jsx)("span",{className:"mt-1 block text-[11px] text-muted-foreground",children:Ik(e.schedule)})]})]})}function IM({initialTemplate:e,initialTask:t,onSaved:n,onCancel:r}){let a,i=!!t,[s,o]=(0,eu.useState)(t?.name??e?.name??""),[l,c]=(0,eu.useState)(t?.prompt??e?.prompt??""),[u,d]=(0,eu.useState)(()=>t?I_(t.schedule):e?I_(e.schedule):{...Ix}),[p,m]=(0,eu.useState)(!1),f=(0,eu.useRef)(null),h=IS(u),g="custom"===u.frequency?(a=h.trim())?5!==a.split(/\s+/).length?"Use five cron fields: minute hour day month weekday.":null:"Enter a cron expression.":null,b=!t||s.trim()!==t.name.trim()||l.trim()!==t.prompt.trim()||h!==t.schedule.trim(),y=!!(s.trim()&&l.trim()&&!g&&b);(0,eu.useEffect)(()=>{f.current?.focus()},[]);let E=async e=>{if(e.preventDefault(),!s.trim())return void pz.toast.error("Task name is required.");if(!l.trim())return void pz.toast.error("Task description is required.");if(g)return void pz.toast.error(g);if(b){m(!0);try{if(t){let e=await AY({cronId:t.cron_id,name:s.trim(),prompt:l.trim(),schedule:h});e.oldTaskDeleted?pz.toast.success(`"${s.trim()}" updated.`):pz.toast.warning(`"${s.trim()}" was saved, but the old scheduled task could not be removed.`),n(e.task)}else await AW({name:s.trim(),prompt:l.trim(),schedule:h}),pz.toast.success(`"${s.trim()}" scheduled.`),n()}catch(e){pz.toast.error(e instanceof Error?e.message:i?"Failed to update scheduled task.":"Failed to create scheduled task.")}finally{m(!1)}}};return(0,ec.jsxs)("form",{onSubmit:E,className:"flex h-full min-h-0 flex-col",children:[(0,ec.jsxs)("div",{className:"flex flex-shrink-0 items-center gap-2 border-b border-border px-3 py-2.5 sm:px-5",children:[(0,ec.jsx)("button",{type:"button",onClick:r,"aria-label":"Back to scheduled tasks",className:"rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring md:hidden",children:(0,ec.jsx)(Iu,{className:"size-4","aria-hidden":"true"})}),(0,ec.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,ec.jsx)("h2",{className:"truncate text-sm font-semibold",children:i?"Edit scheduled task":"New scheduled task"}),(0,ec.jsx)("p",{className:"truncate text-xs text-muted-foreground",children:"EvoScientist will run this task description unattended."})]})]}),(0,ec.jsx)(oo,{className:"min-h-0 flex-1",children:(0,ec.jsxs)("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-4 p-3 sm:p-5",children:[(0,ec.jsxs)("div",{className:"space-y-1.5",children:[(0,ec.jsx)(IO,{htmlFor:"scheduled-task-name",children:"Task name"}),(0,ec.jsx)(rv,{id:"scheduled-task-name",ref:f,type:"text",value:s,onChange:e=>o(e.target.value),placeholder:"Daily Briefing",autoComplete:"off"})]}),(0,ec.jsxs)("div",{className:"space-y-1.5",children:[(0,ec.jsx)(IO,{htmlFor:"scheduled-task-prompt",children:"Task description"}),(0,ec.jsx)(m1,{id:"scheduled-task-prompt",value:l,onChange:e=>c(e.target.value),placeholder:"Describe what EvoScientist should do each time this task runs...",rows:9,className:"min-h-52 resize-y leading-relaxed"})]}),(0,ec.jsxs)("div",{className:"space-y-1.5",children:[(0,ec.jsx)(IO,{children:"Schedule"}),(0,ec.jsx)(ID,{value:u,onChange:d,error:g})]})]})}),(0,ec.jsxs)("div",{className:"flex flex-shrink-0 items-center justify-end gap-2 border-t border-border bg-background px-3 py-2.5 sm:px-5",children:[(0,ec.jsx)(rg,{type:"button",variant:"outline",size:"sm",onClick:r,disabled:p,children:"Cancel"}),(0,ec.jsxs)(rg,{type:"submit",size:"sm",disabled:p||!y,children:[p?(0,ec.jsx)(sk,{className:"size-3.5 animate-spin"}):i?(0,ec.jsx)(sN,{className:"size-3.5"}):(0,ec.jsx)(Ig,{className:"size-3.5"}),i?"Save changes":"Create task"]})]})]})}function IP({task:e,onBack:t,onEdit:n,onDeleted:r,onOpenThread:a}){let i,[s,o]=(0,eu.useState)(!1),[l,c]=(0,eu.useState)(!1),[u,d]=(0,eu.useState)(!1),p=IR(e.next_run_date),m=(0,eu.useCallback)(async()=>{o(!0);try{await AK(e),pz.toast.success(`"${e.name}" started.`)}catch(e){pz.toast.error(e instanceof Error?e.message:"Failed to start the task.")}finally{o(!1)}},[e]),f=(0,eu.useCallback)(async()=>{d(!0);try{await AV(e.cron_id),pz.toast.success(`"${e.name}" deleted.`),c(!1),r()}catch(e){pz.toast.error(e instanceof Error?e.message:"Failed to delete the task.")}finally{d(!1)}},[e,r]);return(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,ec.jsxs)("div",{className:"flex flex-shrink-0 items-center gap-2 border-b border-border px-3 py-2.5 sm:px-5",children:[(0,ec.jsx)("button",{type:"button",onClick:t,"aria-label":"Back to scheduled tasks",className:"rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring md:hidden",children:(0,ec.jsx)(Iu,{className:"size-4","aria-hidden":"true"})}),(0,ec.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,ec.jsx)("h2",{className:"truncate text-sm font-semibold",children:e.name}),(0,ec.jsx)("p",{className:"truncate text-xs text-muted-foreground",children:Ik(e.schedule)})]}),(0,ec.jsxs)(rg,{size:"sm",onClick:m,disabled:s||!e.prompt.trim(),children:[s?(0,ec.jsx)(sk,{className:"size-3.5 animate-spin"}):(0,ec.jsx)(Ih,{className:"size-3.5"}),"Run now"]})]}),(0,ec.jsx)(oo,{className:"min-h-0 flex-1",children:(0,ec.jsxs)("div",{className:"mx-auto w-full max-w-3xl space-y-4 p-3 sm:p-5",children:[(0,ec.jsxs)("div",{className:"grid gap-2 sm:grid-cols-3",children:[(0,ec.jsxs)("div",{className:"rounded-md border border-border bg-[var(--color-surface)] px-3 py-2",children:[(0,ec.jsx)("p",{className:"text-[11px] font-medium uppercase text-muted-foreground",children:"Next run"}),(0,ec.jsx)("p",{className:"mt-1 truncate text-sm font-medium tabular-nums",title:p,children:e.next_run_date?`${Iw(e.next_run_date)} \xb7 ${IC(e.next_run_date)}`:"Not scheduled"})]}),(0,ec.jsxs)("div",{className:"rounded-md border border-border bg-[var(--color-surface)] px-3 py-2",children:[(0,ec.jsx)("p",{className:"text-[11px] font-medium uppercase text-muted-foreground",children:"Cron"}),(0,ec.jsx)("p",{className:"mt-1 truncate font-mono text-sm",children:e.schedule})]}),(0,ec.jsxs)("div",{className:"rounded-md border border-border bg-[var(--color-surface)] px-3 py-2",children:[(0,ec.jsx)("p",{className:"text-[11px] font-medium uppercase text-muted-foreground",children:"Created"}),(0,ec.jsx)("p",{className:"mt-1 truncate text-sm",children:Number.isNaN((i=new Date(e.created_at)).getTime())?"Unknown":new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",year:"numeric"}).format(i)})]})]}),(0,ec.jsxs)("section",{className:"space-y-1.5",children:[(0,ec.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:"Task description"}),(0,ec.jsx)("div",{className:"max-h-[min(38rem,55vh)] overflow-auto rounded-md border border-border bg-[var(--color-surface)] px-3 py-2.5",children:e.prompt?(0,ec.jsx)("p",{className:"whitespace-pre-wrap break-words text-sm leading-relaxed",children:e.prompt}):(0,ec.jsx)("p",{className:"text-sm italic text-muted-foreground",children:"No task description stored."})})]}),(0,ec.jsx)(IN,{task:e,onOpenThread:a})]})}),(0,ec.jsxs)("div",{className:"flex flex-shrink-0 items-center justify-between gap-2 border-t border-border bg-background px-3 py-2.5 sm:px-5",children:[(0,ec.jsx)("p",{className:"hidden truncate text-xs text-muted-foreground sm:block",children:"Manual runs create a scheduler thread immediately."}),(0,ec.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[(0,ec.jsxs)(rg,{variant:"outline",size:"sm",onClick:n,"aria-label":`Edit scheduled task "${e.name}"`,children:[(0,ec.jsx)(sN,{className:"size-3.5"}),"Edit"]}),(0,ec.jsxs)(rg,{variant:"outline",size:"sm",onClick:()=>c(!0),"aria-label":`Delete scheduled task "${e.name}"`,className:"text-destructive hover:border-destructive hover:text-destructive",children:[(0,ec.jsx)(sL,{className:"size-3.5"}),"Delete"]})]})]})]}),(0,ec.jsx)(n9,{open:l,onOpenChange:e=>{u||c(e)},children:(0,ec.jsxs)(re,{className:"sm:max-w-sm",children:[(0,ec.jsxs)(rt,{children:[(0,ec.jsx)(rr,{children:"Delete scheduled task?"}),(0,ec.jsxs)(ra,{children:["“",e.name,"” will stop running. This cannot be undone."]})]}),(0,ec.jsxs)(rn,{children:[(0,ec.jsx)(rg,{variant:"outline",size:"sm",onClick:()=>c(!1),disabled:u,children:"Cancel"}),(0,ec.jsxs)(rg,{variant:"destructive",size:"sm",onClick:f,disabled:u,"aria-label":`Confirm delete scheduled task "${e.name}"`,children:[u&&(0,ec.jsx)(sk,{className:"size-3.5 animate-spin"}),"Delete"]})]})]})})]})}function Ij({task:e,active:t,onSelect:n}){let r=e.next_run_date;return(0,ec.jsxs)("button",{type:"button",onClick:n,"aria-current":t,className:n6("flex w-full items-start gap-2 rounded-md px-2 py-2 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",t?"bg-accent":"hover:bg-accent/60"),children:[(0,ec.jsx)("span",{className:"mt-1 flex size-2 shrink-0 rounded-full bg-[var(--brand)]"}),(0,ec.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,ec.jsx)("span",{className:"block truncate text-sm font-medium",children:e.name}),(0,ec.jsx)("span",{className:"mt-0.5 block truncate text-xs text-muted-foreground",children:Ik(e.schedule)}),(0,ec.jsxs)("span",{className:"mt-1 flex min-w-0 items-center gap-1.5 text-[11px] text-muted-foreground",children:[(0,ec.jsx)(sS,{className:"size-3 shrink-0","aria-hidden":"true"}),(0,ec.jsx)("span",{className:"truncate tabular-nums",title:IR(r),children:r?Iw(r):"No next run"})]})]}),(0,ec.jsx)(Aw,{className:"mt-1 size-3.5 shrink-0 text-muted-foreground","aria-hidden":"true"})]})}function IF({onOpenThread:e}){let{tasks:t,loading:n,error:r,refresh:a}=function(){let[e,t]=(0,eu.useState)([]),[n,r]=(0,eu.useState)(!0),[a,i]=(0,eu.useState)(null),[s,o]=(0,eu.useState)(0),l=(0,eu.useCallback)(()=>o(e=>e+1),[]);return(0,eu.useEffect)(()=>{let e=!1;return r(!0),Aq().then(n=>{e||(t(n),i(null))}).catch(n=>{e||(i(n instanceof Error?n.message:"Failed to load scheduled tasks."),t([]))}).finally(()=>{e||r(!1)}),()=>{e=!0}},[s]),{tasks:e,loading:n,error:a,refresh:l}}(),[i,s]=(0,eu.useState)({kind:"empty"}),[o,l]=(0,eu.useState)(""),c=(0,eu.useRef)(0),u=(0,eu.useRef)(0),d=(0,eu.useRef)(null),p=(0,eu.useMemo)(()=>[...t].sort((e,t)=>{let n=e.next_run_date?new Date(e.next_run_date).getTime():0,r=t.next_run_date?new Date(t.next_run_date).getTime():0;return n&&r&&n!==r?n-r:n&&!r?-1:!n&&r?1:e.name.localeCompare(t.name)}),[t]),m=(0,eu.useMemo)(()=>{let e=o.trim().toLowerCase();return e?p.filter(t=>[t.name,t.prompt,t.schedule,Ik(t.schedule),t.next_run_date?IC(t.next_run_date):""].join(" ").toLowerCase().includes(e)):p},[o,p]),f=p.find(e=>e.next_run_date),h="detail"===i.kind?i.task.cron_id:null;(0,eu.useEffect)(()=>{if(!h||n)return;let e=t.find(e=>e.cron_id===h);if(e){d.current===h&&(d.current=null),s({kind:"detail",task:e});return}(d.current!==h||r)&&(d.current=null,s({kind:"empty"}))},[r,n,h,t]);let g=(0,eu.useCallback)(e=>{c.current+=1,s({kind:"create",template:e,createId:c.current})},[]),b=(0,eu.useCallback)(e=>{u.current+=1,s({kind:"edit",task:e,editId:u.current})},[]),y=(0,eu.useCallback)(e=>{d.current=e?.cron_id??null,a(),s(e?{kind:"detail",task:e}:{kind:"empty"})},[a]),E=(0,eu.useCallback)(()=>{a(),s({kind:"empty"})},[a]);return(0,ec.jsxs)("div",{className:"flex h-full min-h-0 flex-col bg-background",children:[(0,ec.jsxs)("header",{className:"flex flex-shrink-0 items-center justify-between gap-3 border-b border-border px-3 py-2.5 sm:px-4",children:[(0,ec.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,ec.jsx)("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-md bg-accent text-[var(--brand)]",children:(0,ec.jsx)(Ip,{className:"size-4","aria-hidden":"true"})}),(0,ec.jsxs)("div",{className:"min-w-0",children:[(0,ec.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,ec.jsx)("h1",{className:"truncate text-sm font-semibold",children:"Scheduled"}),!n&&(0,ec.jsx)("span",{className:"rounded-full bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground",children:t.length})]}),(0,ec.jsx)("p",{className:"truncate text-xs text-muted-foreground",children:f?.next_run_date?`Next: ${Iw(f.next_run_date)}`:"Recurring EvoScientist tasks"})]})]}),(0,ec.jsxs)("div",{className:"flex shrink-0 items-center gap-1.5",children:[(0,ec.jsx)("button",{type:"button",onClick:a,disabled:n,"aria-label":"Refresh scheduled tasks",title:"Refresh scheduled tasks",className:"rounded-md p-2 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50",children:(0,ec.jsx)(NJ,{className:n6("size-4",n&&"animate-spin"),"aria-hidden":"true"})}),(0,ec.jsxs)(rg,{size:"sm",onClick:()=>g(),children:[(0,ec.jsx)(Ig,{className:"size-3.5"}),(0,ec.jsx)("span",{className:"hidden sm:inline",children:"New task"}),(0,ec.jsx)("span",{className:"sm:hidden",children:"New"})]})]})]}),(0,ec.jsxs)("div",{className:"flex min-h-0 flex-1",children:[(0,ec.jsxs)("aside",{className:n6("w-full min-w-0 flex-col border-r border-border md:flex md:w-72 md:flex-shrink-0","empty"===i.kind?"flex":"hidden"),children:[(0,ec.jsx)("div",{className:"flex-shrink-0 space-y-2 border-b border-border p-2.5",children:(0,ec.jsxs)("div",{className:"relative",children:[(0,ec.jsx)(sD,{className:"pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"}),(0,ec.jsx)(rv,{type:"search",name:"scheduled-search",value:o,onChange:e=>l(e.target.value),placeholder:"Search scheduled tasks...","aria-label":"Search scheduled tasks",autoComplete:"off",spellCheck:!1,className:"h-9 pl-8 pr-8"}),o&&(0,ec.jsx)("button",{type:"button",onClick:()=>l(""),"aria-label":"Clear scheduled task search",className:"absolute right-1 top-1/2 -translate-y-1/2 rounded p-1 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",children:(0,ec.jsx)(nE,{className:"size-3.5","aria-hidden":"true"})})]})}),(0,ec.jsx)(oo,{className:"h-0 flex-1",children:n?(0,ec.jsxs)("div",{className:"flex items-center justify-center gap-2 py-10 text-sm text-muted-foreground",children:[(0,ec.jsx)(sk,{className:"size-4 animate-spin","aria-hidden":"true"}),"Loading tasks..."]}):r?(0,ec.jsxs)("div",{role:"alert",className:"space-y-3 p-3",children:[(0,ec.jsx)("p",{className:"text-sm text-destructive",children:r}),(0,ec.jsxs)(rg,{variant:"outline",size:"sm",onClick:a,children:[(0,ec.jsx)(NJ,{className:"size-3.5"}),"Retry"]})]}):0===t.length?(0,ec.jsxs)("div",{className:"space-y-4 p-3",children:[(0,ec.jsxs)("div",{className:"rounded-md border border-dashed border-border bg-[var(--color-surface)] px-3 py-5 text-center",children:[(0,ec.jsx)(Id,{className:"mx-auto size-7 text-muted-foreground/60","aria-hidden":"true"}),(0,ec.jsx)("p",{className:"mt-2 text-sm font-medium",children:"No scheduled tasks"}),(0,ec.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"Start from a template or create one from scratch."})]}),(0,ec.jsxs)("div",{className:"space-y-2",children:[(0,ec.jsx)("p",{className:"px-1 text-[11px] font-semibold uppercase text-muted-foreground",children:"Templates"}),II.map(e=>(0,ec.jsx)(IL,{template:e,onSelect:g},e.label))]})]}):0===m.length?(0,ec.jsxs)("div",{className:"space-y-3 p-4 text-center",children:[(0,ec.jsx)("p",{className:"text-sm font-medium",children:"No matching tasks"}),(0,ec.jsx)("p",{className:"text-xs text-muted-foreground",children:"Try a task name, schedule, or description keyword."}),(0,ec.jsx)(rg,{variant:"outline",size:"sm",onClick:()=>l(""),children:"Clear search"})]}):(0,ec.jsxs)("div",{className:"p-1.5",children:[(0,ec.jsxs)("div",{className:"mb-2 flex items-center justify-between px-2 py-1",children:[(0,ec.jsx)("p",{className:"text-[11px] font-semibold uppercase text-muted-foreground",children:"Tasks"}),(0,ec.jsx)("p",{className:"text-[11px] text-muted-foreground",children:m.length})]}),(0,ec.jsx)("div",{className:"flex flex-col gap-0.5",children:m.map(e=>{let t="detail"===i.kind&&i.task.cron_id===e.cron_id;return(0,ec.jsx)(Ij,{task:e,active:t,onSelect:()=>s({kind:"detail",task:e})},e.cron_id)})}),(0,ec.jsxs)("div",{className:"mt-3 space-y-2 border-t border-border px-1 py-3",children:[(0,ec.jsx)("p",{className:"px-1 text-[11px] font-semibold uppercase text-muted-foreground",children:"Templates"}),(0,ec.jsx)("div",{className:"grid gap-1.5",children:II.map(e=>(0,ec.jsx)(IL,{template:e,onSelect:g,compact:!0},e.label))})]})]})})]}),(0,ec.jsxs)("section",{className:n6("min-w-0 flex-1 flex-col","empty"===i.kind?"hidden md:flex":"flex"),children:["empty"===i.kind&&(0,ec.jsx)("div",{className:"flex flex-1 items-center justify-center p-5",children:(0,ec.jsxs)("div",{className:"w-full max-w-lg space-y-4",children:[(0,ec.jsxs)("div",{className:"space-y-1 text-center",children:[(0,ec.jsx)(Ip,{className:"mx-auto size-9 text-muted-foreground/40","aria-hidden":"true"}),(0,ec.jsx)("p",{className:"text-sm font-medium",children:"Pick a scheduled task"}),(0,ec.jsx)("p",{className:"text-xs text-muted-foreground",children:"Pick a template below, or ask EvoScientist in chat to create a recurring task."})]}),t.length>0&&(0,ec.jsx)("div",{className:"mx-auto grid w-full max-w-xl gap-2 sm:grid-cols-2",children:II.map(e=>(0,ec.jsx)(IL,{template:e,onSelect:g,compact:!0},e.label))})]})}),"create"===i.kind&&(0,ec.jsx)(IM,{initialTemplate:i.template,onSaved:y,onCancel:()=>s({kind:"empty"})},i.createId),"edit"===i.kind&&(0,ec.jsx)(IM,{initialTask:i.task,onSaved:y,onCancel:()=>s({kind:"detail",task:i.task})},i.editId),"detail"===i.kind&&(0,ec.jsx)(IP,{task:i.task,onBack:()=>s({kind:"empty"}),onEdit:()=>b(i.task),onDeleted:E,onOpenThread:e})]})]})]})}let IU=ny("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]),IB=ny("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);function Iz(){let{resolvedTheme:e,setTheme:t}=(0,wP.useTheme)(),[n,r]=(0,eu.useState)(!1);(0,eu.useEffect)(()=>r(!0),[]);let a=n&&"dark"===e;return(0,ec.jsx)(rg,{variant:"ghost",size:"icon",className:"size-8 sm:size-9",onClick:()=>t(a?"light":"dark"),"aria-label":a?"Switch to light mode":"Switch to dark mode",title:a?"Switch to light mode":"Switch to dark mode",children:a?(0,ec.jsx)(IU,{className:"size-5","aria-hidden":"true"}):(0,ec.jsx)(IB,{className:"size-5","aria-hidden":"true"})})}let IH={checking:{dot:"bg-[var(--color-warning)]",label:"Connecting…",pulse:!0},online:{dot:"bg-[var(--color-success)]",label:"Connected",pulse:!1},offline:{dot:"bg-[var(--color-error)]",label:"Offline",pulse:!1}};function I$(e){return e.trim().replace(/\/+$/,"")}async function IG(e){let t=new AbortController,n=setTimeout(()=>t.abort(),4e3);try{return(await fetch(`${e}/info`,{signal:t.signal,cache:"no-store"})).ok}catch{return!1}finally{clearTimeout(n)}}function Iq({deploymentUrl:e,onReconnect:t}){let[n,r]=(0,eu.useState)("checking"),[a,i]=(0,eu.useState)(null),[s,o]=(0,eu.useState)(null),l=(0,eu.useRef)(0),c=(0,eu.useRef)(!0),u=(0,eu.useRef)(null),d=(0,eu.useCallback)(async t=>{let n=I$(e);try{let e=await fetch("/api/evosci-config",{cache:"no-store"}),r=await e.json().catch(()=>null),a=r?.deploymentUrl?I$(r.deploymentUrl):"";if(t!==l.current||!c.current)return;if(!a||a===n)return void o(null);let i=await IG(a);if(t!==l.current||!c.current)return;o(i?a:null)}catch{t===l.current&&c.current&&o(null)}},[e]),p=(0,eu.useCallback)(async()=>{let t=++l.current,n=I$(e);if(!n){t===l.current&&c.current&&(i(null),r("offline"),o(null));return}u.current?.abort();let a=new AbortController;u.current=a;let s=setTimeout(()=>a.abort(),4e3);try{let e=await fetch(`${n}/info`,{signal:a.signal,cache:"no-store"});if(t!==l.current||!c.current)return;if(!e.ok){r("offline"),d(t);return}let s=await e.json().catch(()=>null);if(t!==l.current||!c.current)return;i(s),r("online"),o(null)}catch{t===l.current&&c.current&&(r("offline"),d(t))}finally{clearTimeout(s)}},[e,d]);(0,eu.useEffect)(()=>{c.current=!0,r("checking"),p();let e=setInterval(()=>{document.hidden||p()},1e4),t=()=>p(),n=()=>{document.hidden||p()};return window.addEventListener("focus",t),window.addEventListener("online",t),document.addEventListener("visibilitychange",n),()=>{c.current=!1,u.current?.abort(),clearInterval(e),window.removeEventListener("focus",t),window.removeEventListener("online",t),document.removeEventListener("visibilitychange",n)}},[p]);let m=IH[n],f="online"===n?`Connected to ${e}${a?.version?` \xb7 langgraph ${a.version}`:""}`:"offline"===n?`Can't reach the backend at ${e}. Is "EvoSci deploy" running? Click to retry.`:`Checking connection to ${e}…`;return(0,ec.jsxs)("div",{className:"flex items-center gap-1",children:[(0,ec.jsxs)(rg,{variant:"ghost",size:"sm",onClick:p,title:f,"aria-label":f,className:"h-8 gap-1.5 px-2 text-xs font-normal text-muted-foreground",children:[(0,ec.jsx)("span",{className:`size-2 shrink-0 rounded-full ${m.dot} ${m.pulse?"animate-pulse":""}`,"aria-hidden":"true"}),(0,ec.jsx)("span",{className:"hidden sm:inline",children:m.label})]}),"offline"===n&&null!==s&&void 0!==t&&(0,ec.jsxs)(rg,{variant:"ghost",size:"sm",onClick:()=>{s&&(o(null),r("checking"),t?.(s))},title:`Backend detected at ${s}. Click to reconnect.`,"aria-label":`Reconnect to detected backend ${s}`,className:"h-8 gap-1 px-2 text-xs font-medium text-[var(--brand)] hover:text-[var(--brand)]",children:["Reconnect"," ",(0,ec.jsx)("span",{className:"tabular-nums",children:s?function(e){try{let t=new URL(e),n="127.0.0.1"===t.hostname||"localhost"===t.hostname||"0.0.0.0"===t.hostname,r=t.port||("https:"===t.protocol?"443":"80");return n?`:${r}`:`${t.hostname}:${r}`}catch{return e}}(s):""})]})]})}let IW=ny("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);async function IV(e){let t=await fetch(`/api/workspace?${new URLSearchParams({path:e})}`),n=await t.json().catch(()=>null);if(!t.ok)throw Error(n?.error||"Failed to list workspace.");return n?.entries??[]}async function IY(){let e=await fetch("/api/workspace?recursive=1"),t=await e.json().catch(()=>null);if(!e.ok)throw Error(t?.error||"Failed to load workspace.");return{entries:t?.entries??[],truncated:!!t?.truncated}}let IK=[{key:"docs",label:"Papers & docs",Icon:NO,exts:["pdf","tex","bib","md","markdown","txt","docx","doc","rtf","odt"]},{key:"figures",label:"Figures",Icon:ny("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]),exts:["png","jpg","jpeg","gif","svg","webp","bmp","tiff","tif","eps"]},{key:"data",label:"Data",Icon:ny("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]),exts:["json","jsonl","csv","tsv","xlsx","xls","parquet","pkl","npy","npz","h5","hdf5","db","sqlite","yaml","yml","xml"]},{key:"code",label:"Code",Icon:ny("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]),exts:["py","ipynb","js","ts","tsx","jsx","sh","bash","r","jl","cpp","cc","c","h","hpp","java","go","rs","m","rb"]}],IX={key:"other",label:"Other",Icon:mL},IZ={};for(let e of IK)for(let t of e.exts)IZ[t]=e.key;function IQ(){let[e,t]=(0,eu.useState)("tree"),[n,r]=(0,eu.useState)({}),[a,i]=(0,eu.useState)(new Set),[s,o]=(0,eu.useState)(new Set),[l,c]=(0,eu.useState)(!1),[u,d]=(0,eu.useState)(null),[p,m]=(0,eu.useState)(!1),[f,h]=(0,eu.useState)(!1),[g,b]=(0,eu.useState)(null),y=NL(),E=e=>y?.open({source:"workspace",path:e.path,size:e.size}),x=(0,eu.useMemo)(()=>new Set((y?.state.tabs??[]).filter(e=>"workspace"===e.source).map(e=>e.path)),[y?.state.tabs]),v=y?.state.tabs.length??0,T=(0,eu.useCallback)(async e=>{o(t=>new Set(t).add(e));try{let t=await IV(e);return r(n=>({...n,[e]:t})),""===e&&b(null),t}catch(t){throw""===e&&b(t instanceof Error?t.message:"Failed to load."),t}finally{o(t=>{let n=new Set(t);return n.delete(e),n})}},[]),S=(0,eu.useCallback)(async()=>{m(!0);try{let{entries:e,truncated:t}=await IY();d(e),h(t),b(null)}catch(e){b(e instanceof Error?e.message:"Failed to load.")}finally{m(!1)}},[]);(0,eu.useEffect)(()=>{c(!0),T("").catch(()=>{}).finally(()=>c(!1))},[]),(0,eu.useEffect)(()=>{"type"!==e||null!==u||p||S()},[e]);let _=(0,eu.useCallback)(async()=>{(b(null),"type"===e)?await S():(c(!0),await Promise.allSettled(["",...a].map(e=>T(e))),c(!1))},[e,a,T,S]),k=(0,eu.useRef)(y?.treeRevision??0);(0,eu.useEffect)(()=>{let e=y?.treeRevision??0;e!==k.current&&(k.current=e,_())},[y?.treeRevision,_]);let w=(0,eu.useCallback)(e=>{i(t=>{let r=new Set(t);return r.has(e)?r.delete(e):(r.add(e),n[e]||T(e).catch(()=>{})),r})},[n,T]),A=(0,eu.useMemo)(()=>{let e={};for(let t of u??[]){let n=IZ[t.ext]??IX.key;(e[n]??=[]).push(t)}for(let t of Object.values(e))t.sort((e,t)=>t.mtime-e.mtime);return e},[u]),N="type"===e?p:l,I=(e,t)=>{let r=n[e];return r?0===r.length&&0===t?(0,ec.jsx)("p",{className:"px-2 py-6 text-center text-xs text-muted-foreground",children:"No files in the workspace yet"}):r.map(e=>{let n=a.has(e.path),r=s.has(e.path);return(0,ec.jsxs)("div",{children:[(0,ec.jsxs)("button",{type:"button",onClick:()=>"dir"===e.type?w(e.path):E(e),className:"flex w-full items-center gap-1.5 rounded-md py-1 pr-2 text-left text-sm text-foreground transition-colors hover:bg-muted",style:{paddingLeft:`${14*t+4}px`},title:e.name,children:["dir"===e.type?(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)("span",{className:"flex size-4 shrink-0 items-center justify-center text-muted-foreground",children:r?(0,ec.jsx)(sk,{className:"size-3 animate-spin"}):n?(0,ec.jsx)(cP,{className:"size-3.5"}):(0,ec.jsx)(Aw,{className:"size-3.5"})}),(0,ec.jsx)(IW,{className:"size-4 shrink-0 text-[var(--brand)]"})]}):(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)("span",{className:"size-4 shrink-0"}),(0,ec.jsx)(NO,{className:"size-4 shrink-0 text-muted-foreground"})]}),(0,ec.jsx)("span",{className:"truncate",children:e.name}),x.has(e.path)&&(0,ec.jsx)("span",{className:"ml-auto size-1.5 shrink-0 rounded-full bg-[var(--brand)]","aria-label":"Open in preview"})]}),"dir"===e.type&&n&&I(e.path,t+1)]},e.path)}):null};return(0,ec.jsxs)("div",{className:"flex min-h-0 flex-col",children:[v>0&&(0,ec.jsxs)("button",{type:"button",onClick:()=>y?.showPreview(),className:"mb-2 flex w-full items-center gap-1.5 rounded-md bg-accent px-2 py-1.5 text-left text-sm font-medium text-[var(--brand)] transition-colors hover:bg-muted max-sm:min-h-11",children:[(0,ec.jsx)(Iu,{className:"size-4 rotate-180","aria-hidden":"true"}),`Back to preview (${v} open)`]}),(0,ec.jsxs)("div",{className:"flex items-center justify-between gap-2 pb-1.5",children:[(0,ec.jsx)("div",{className:"flex items-center gap-0.5 rounded-md bg-muted p-0.5 text-xs",children:["tree","type"].map(n=>(0,ec.jsx)("button",{type:"button",onClick:()=>t(n),className:n6("rounded px-2 py-0.5 font-medium transition-colors",e===n?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),"aria-pressed":e===n,children:"tree"===n?"Tree":"By type"},n))}),(0,ec.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,ec.jsxs)("a",{href:"/api/workspace/download",download:!0,className:"inline-flex items-center gap-1 rounded-md px-1.5 py-1 text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",title:"Download the whole workspace as a zip",children:[(0,ec.jsx)(s_,{className:"size-3.5"}),"All"]}),(0,ec.jsx)("button",{type:"button",onClick:_,disabled:N,className:"inline-flex size-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-50","aria-label":"Refresh workspace",title:"Refresh",children:(0,ec.jsx)(NJ,{className:n6("size-3.5",N&&"animate-spin")})})]})]}),g?(0,ec.jsx)("p",{className:"px-2 py-6 text-center text-xs text-muted-foreground",children:g}):"tree"===e?l&&!n[""]?(0,ec.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,ec.jsx)(sk,{className:"size-4 animate-spin text-muted-foreground"})}):(0,ec.jsx)("div",{className:"-mx-1",children:I("",0)}):p&&null===u?(0,ec.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,ec.jsx)(sk,{className:"size-4 animate-spin text-muted-foreground"})}):(()=>{if(!u)return null;if(0===u.length)return(0,ec.jsx)("p",{className:"px-2 py-6 text-center text-xs text-muted-foreground",children:"No files in the workspace yet"});let e=[...IK,IX];return(0,ec.jsxs)("div",{className:"space-y-3",children:[f&&(0,ec.jsx)("p",{className:"px-1 text-[11px] text-muted-foreground",children:"Showing the first files only — the workspace has more than the limit."}),e.map(e=>{let t=A[e.key];if(!t||0===t.length)return null;let n=e.Icon;return(0,ec.jsxs)("div",{children:[(0,ec.jsxs)("div",{className:"mb-0.5 flex items-center gap-1.5 px-1 text-[10px] font-semibold uppercase tracking-wider text-tertiary",children:[(0,ec.jsx)(n,{className:"size-3.5"}),e.label,(0,ec.jsxs)("span",{className:"text-muted-foreground",children:["(",t.length,")"]})]}),t.map(e=>{let t=e.path.includes("/")?e.path.slice(0,e.path.lastIndexOf("/")):"";return(0,ec.jsxs)("button",{type:"button",onClick:()=>E(e),className:"flex w-full items-center gap-1.5 rounded-md px-1 py-1 text-left text-sm text-foreground transition-colors hover:bg-muted",title:e.path,children:[(0,ec.jsx)(n,{className:"size-4 shrink-0 text-muted-foreground"}),(0,ec.jsx)("span",{className:"truncate",children:e.name}),(t||x.has(e.path))&&(0,ec.jsxs)("span",{className:"ml-auto flex shrink-0 items-center gap-1.5 truncate pl-2",children:[t&&(0,ec.jsx)("span",{className:"truncate text-[11px] text-muted-foreground",children:t}),x.has(e.path)&&(0,ec.jsx)("span",{className:"size-1.5 shrink-0 rounded-full bg-[var(--brand)]","aria-label":"Open in preview"})]})]},e.path)})]},e.key)})]})})()]})}let IJ=ny("bell-ring",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}]]),I0=ny("corner-up-left",[["path",{d:"M20 20v-7a4 4 0 0 0-4-4H4",key:"1nkjon"}],["path",{d:"M9 14 4 9l5-5",key:"102s5s"}]]);function I1(e){let t="";for(let n of e)if("human"===n.type){let e=me(n).trim();if(e){t=e;break}}return{prompt:t,steps:my(e)}}function I2({status:e}){let t=Ay[Ad(e)];return(0,ec.jsx)("span",{className:n6("size-2 shrink-0 rounded-full",t.dot,t.pulse&&"animate-pulse"),"aria-hidden":"true"})}function I3({onReportToMainChat:e}){let t=ia(),[n]=ev("threadId"),{tasks:r,loaded:a,error:i,refresh:s}=Na(n),[o,l]=(0,eu.useState)(()=>Date.now()),[c,u]=(0,eu.useState)(null),[d,p]=(0,eu.useState)({}),m=(0,eu.useRef)(new Map),[f,h]=(0,eu.useState)({}),[g,b]=Nf(n),[y,E]=(0,eu.useState)({}),[x,v]=(0,eu.useState)({}),[T,S]=(0,eu.useState)({}),_=(0,eu.useRef)(!0);(0,eu.useEffect)(()=>(_.current=!0,()=>{_.current=!1}),[]),(0,eu.useEffect)(()=>{let e=setInterval(()=>l(Date.now()),1e3);return()=>clearInterval(e)},[]);let k=async e=>{let n=(y[e.task_id]??"").trim();if(n&&!x[e.task_id]){v(t=>({...t,[e.task_id]:!0})),S(t=>({...t,[e.task_id]:null}));try{let r=await t.runs.wait(e.thread_id,e.agent_name,{input:{messages:[{type:"human",content:n}]}});if(!_.current)return;let a=Array.isArray(r?.messages)?r.messages:[];if(0===a.length)return void S(t=>({...t,[e.task_id]:"The agent didn't return a reply — it may have hit an error."}));E(t=>({...t,[e.task_id]:""}));let{prompt:i,steps:s}=I1(a);p(t=>({...t,[e.task_id]:{loading:!1,error:null,prompt:i,steps:s}}))}catch(n){if(!_.current)return;let t=n instanceof TypeError||"object"==typeof n&&null!==n&&"number"==typeof n.status;S(n=>({...n,[e.task_id]:t?"Couldn't reach this agent — try again.":"The agent hit an error processing this follow-up."}))}finally{_.current&&v(t=>({...t,[e.task_id]:!1}))}}};(0,eu.useEffect)(()=>{if(!c)return;let e=r.find(e=>e.task_id===c);if(!e||"expired"===Ad(e.liveStatus))return;let n="running"===Ad(e.liveStatus),a=[e.run_id,e.last_updated_at,e.endedAt].join(":");if(!n&&m.current.get(c)===a)return;let i=!1;return p(e=>({...e,[c]:{loading:!e[c],error:null,prompt:e[c]?.prompt??"",steps:e[c]?.steps??[]}})),(async()=>{try{let r=await t.threads.getState(e.thread_id);if(i)return;let{prompt:s,steps:o}=I1(r.values?.messages??[]);n||m.current.set(c,a),p(e=>({...e,[c]:{loading:!1,error:null,prompt:s,steps:o}}))}catch{if(i)return;m.current.delete(c),p(e=>({...e,[c]:{loading:!1,error:"Couldn't load this agent's steps.",prompt:e[c]?.prompt??"",steps:e[c]?.steps??[]}}))}})(),()=>{i=!0}},[c,r,t]);let w=(0,eu.useMemo)(()=>Ax(r),[r]);return(0,ec.jsxs)("div",{className:"flex h-full flex-col",children:[(0,ec.jsxs)("div",{className:"flex items-center justify-between gap-2 px-1 pb-2",children:[(0,ec.jsx)("p",{className:"text-xs text-muted-foreground",children:w>0?`${w} running`:r.length>0?`${r.length} total`:"Background agents"}),(0,ec.jsxs)("div",{className:"flex items-center gap-1",children:[(0,ec.jsxs)("button",{type:"button",onClick:()=>{n&&(g||Np(n,r.filter(e=>AE(e.liveStatus)).map(Af)),b(!g))},"aria-pressed":g,"aria-label":`Auto-report ${g?"on":"off"}`,title:g?"Auto-report on: finished agents are sent to the main chat automatically":"Auto-report off: use each agent's “Notify main chat” button",className:n6("inline-flex items-center gap-1 rounded-md px-1.5 py-1 text-[11px] font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",g?"bg-accent text-[var(--brand)]":"text-muted-foreground hover:bg-accent hover:text-foreground"),children:[(0,ec.jsx)(IJ,{className:"size-3.5","aria-hidden":"true"}),(0,ec.jsxs)("span",{className:"hidden min-[340px]:inline",children:["Auto-report ",g?"On":"Off"]})]}),(0,ec.jsx)("button",{type:"button",onClick:s,"aria-label":"Refresh agents",title:"Refresh",className:"rounded p-1 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",children:(0,ec.jsx)(NJ,{className:"size-3.5","aria-hidden":"true"})})]})]}),i&&(0,ec.jsx)("p",{className:"px-1 text-xs text-[var(--color-error)]",children:i}),!a&&(0,ec.jsxs)("div",{className:"flex items-center gap-2 px-1 py-4 text-xs text-muted-foreground",children:[(0,ec.jsx)(sk,{className:"size-4 animate-spin","aria-hidden":"true"}),"Loading…"]}),a&&0===r.length&&(0,ec.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-10 text-center",children:[(0,ec.jsx)(mH,{className:"size-9 text-muted-foreground/60","aria-hidden":"true"}),(0,ec.jsx)("p",{className:"text-sm text-muted-foreground",children:"No background agents yet."}),(0,ec.jsx)("p",{className:"text-xs text-muted-foreground/80",children:"When EvoScientist delegates long tasks (writing, data analysis) they run in the background and show up here."})]}),(0,ec.jsx)("div",{className:"flex min-h-0 flex-1 flex-col gap-1.5 overflow-y-auto",children:r.map(t=>{var r,a;let i,s,l,p=Ad(t.liveStatus),m=Ay[p],b=c===t.task_id,v="expired"===p,S=d[t.task_id];return(0,ec.jsxs)("div",{className:"rounded-md border border-border bg-background",children:[(0,ec.jsxs)("button",{type:"button",onClick:()=>u(b?null:t.task_id),className:"flex w-full items-center gap-2 rounded-md px-2.5 py-2 text-left transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring","aria-expanded":b,children:[b?(0,ec.jsx)(cP,{className:"size-3.5 shrink-0 text-muted-foreground","aria-hidden":"true"}):(0,ec.jsx)(Aw,{className:"size-3.5 shrink-0 text-muted-foreground","aria-hidden":"true"}),(0,ec.jsx)(I2,{status:t.liveStatus}),(0,ec.jsx)("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:Ap[r=t.agent_name]??r}),(0,ec.jsxs)("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:[m.label,(i=function(e,t){let n=Ad(e.liveStatus);if("expired"===n)return"";let r="running"===n?t:e.endedAt?Date.parse(e.endedAt):t;return Av(e.startedAt??e.created_at,r)}(t,o))?` \xb7 ${i}`:""]})]}),b&&v&&(0,ec.jsx)("div",{className:"border-t border-border px-2.5 py-2 text-xs",children:(0,ec.jsx)("p",{className:"text-muted-foreground",children:"This task ran before a backend restart and its records are gone, so its steps and result can no longer be loaded. Any files it produced are still in the workspace."})}),b&&!v&&(0,ec.jsxs)("div",{className:"border-t border-border px-2.5 py-2 text-xs",children:[S?.loading&&(0,ec.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,ec.jsx)(sk,{className:"size-3.5 animate-spin","aria-hidden":"true"}),"Loading steps…"]}),S?.error&&(0,ec.jsx)("p",{className:"text-[var(--color-error)]",children:S.error}),S&&!S.loading&&!S.error&&(0,ec.jsxs)("div",{className:"flex flex-col gap-2",children:[S.prompt&&(0,ec.jsxs)("div",{children:[(0,ec.jsx)("p",{className:"font-semibold text-foreground",children:"Task"}),(0,ec.jsx)("p",{className:"whitespace-pre-wrap break-words text-muted-foreground",children:S.prompt.length>600?S.prompt.slice(0,600)+"…":S.prompt})]}),(0,ec.jsxs)("div",{children:[(0,ec.jsxs)("p",{className:"mb-1 font-semibold text-foreground",children:["Steps"," ",(0,ec.jsxs)("span",{className:"font-normal text-muted-foreground",children:["(",S.steps.length,")"]})]}),0===S.steps.length?(0,ec.jsx)("p",{className:"text-muted-foreground",children:"No steps yet."}):(0,ec.jsx)(Au,{steps:S.steps,running:!AE(a=t.liveStatus)&&"expired"!==Ad(a),compact:!0})]}),AE(t.liveStatus)&&(0,ec.jsx)("div",{className:"mt-1 border-t border-border pt-2",children:g?(0,ec.jsxs)("p",{className:"inline-flex items-center gap-1.5 text-[11px] text-muted-foreground",children:[(0,ec.jsx)(IJ,{className:"size-3.5 text-[var(--brand)]","aria-hidden":"true"}),"Auto-report on · future completions notify the main chat"]}):(0,ec.jsxs)("button",{type:"button",onClick:()=>(t=>{if(!e||!n)return void pz.toast.error("Open the conversation to notify the main agent.");let r=e(t,n);if("sent"===r){h(e=>({...e,[Af(t)]:!0})),pz.toast.success("Reported to the main chat.");return}if("duplicate"===r){h(e=>({...e,[Af(t)]:!0})),pz.toast.info("This result is already in the main chat.");return}pz.toast.error("wrong-thread"===r?"The active conversation changed — reopen this task and try again.":"Main chat is busy — try again when it's idle.")})(t),disabled:!e||!!f[Af(t)],title:e?"Send this result back to the main agent":"Open the conversation to notify the main agent",className:"inline-flex items-center gap-1.5 rounded-md border border-border px-2 py-1 text-[11px] font-medium text-foreground transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",children:[(0,ec.jsx)(I0,{className:"size-3.5 text-[var(--brand)]","aria-hidden":"true"}),f[Af(t)]?"Reported to main chat":"Notify main chat"]})}),(s="running"===Ad(t.liveStatus),l=!!x[t.task_id],(0,ec.jsxs)("div",{className:"mt-1 border-t border-border pt-2",children:[(0,ec.jsx)("p",{className:"mb-1 text-[11px] text-muted-foreground",children:"Direct follow-up · Main chat is not notified"}),(0,ec.jsxs)("form",{onSubmit:e=>{e.preventDefault(),k(t)},className:"flex items-center gap-1.5",children:[(0,ec.jsx)("input",{type:"text",name:`agent-message-${t.task_id}`,autoComplete:"off",value:y[t.task_id]??"",onChange:e=>E(n=>({...n,[t.task_id]:e.target.value})),onKeyDown:e=>{"Enter"===e.key&&(e.nativeEvent.isComposing||229===e.keyCode)&&e.preventDefault()},disabled:s||l,placeholder:s?"Agent is working…":"Send a direct follow-up…","aria-label":"Message this agent",className:"min-w-0 flex-1 rounded-md border border-border bg-background px-2 py-1.5 text-xs outline-none placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-60"}),(0,ec.jsx)("button",{type:"submit",disabled:s||l||!(y[t.task_id]??"").trim(),"aria-label":"Send",title:"Send to this agent",className:"inline-flex size-7 shrink-0 items-center justify-center rounded-md bg-[var(--brand-solid)] text-[var(--brand-foreground)] transition-opacity hover:opacity-90 focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-40",children:l?(0,ec.jsx)(sk,{className:"size-3.5 animate-spin","aria-hidden":"true"}):(0,ec.jsx)(mR,{className:"size-3.5","aria-hidden":"true"})})]}),T[t.task_id]&&(0,ec.jsx)("p",{className:"mt-1 text-[var(--color-error)]",role:"status","aria-live":"polite",children:T[t.task_id]})]}))]})]})]},t.task_id)})})]})}let I4={js:"javascript",jsx:"javascript",ts:"typescript",tsx:"typescript",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",cpp:"cpp",c:"c",cs:"csharp",php:"php",swift:"swift",kt:"kotlin",scala:"scala",sh:"bash",bash:"bash",zsh:"bash",json:"json",jsonl:"json",xml:"xml",html:"html",css:"css",scss:"scss",sass:"sass",less:"less",sql:"sql",yaml:"yaml",yml:"yaml",toml:"toml",ini:"ini",tex:"latex",bib:"latex",r:"r",dockerfile:"dockerfile",makefile:"makefile"},I5=new Set(["js","jsx","ts","tsx","py","rb","go","rs","java","cpp","c","cs","php","swift","kt","sh","bash","zsh","json","jsonl","xml","html","css","scss","sql","yaml","yml","toml","ini","tex","bib","r","txt","md","markdown","log","csv","tsv","cfg","conf","env","gitignore"]),I6=new Set(["png","jpg","jpeg","gif","webp","svg","bmp"]);function I9(e){return e.split("/").filter(Boolean).pop()||e}function I8(e){return e.includes(".")?e.split(".").pop().toLowerCase():""}function I7(e,t={}){let n=new URLSearchParams({path:e});return t.download&&n.set("download","1"),t.version&&n.set("v",String(t.version)),`/api/workspace/file?${n.toString()}`}function Ce({content:e,ext:t}){return(0,ec.jsx)(wN,{language:I4[t]||"text",style:wI,customStyle:{margin:0,borderRadius:"0.5rem",fontSize:"0.875rem"},showLineNumbers:!0,wrapLines:!0,lineProps:{style:{whiteSpace:"pre-wrap"}},children:e})}function Ct({children:e}){return(0,ec.jsx)(oo,{className:"h-full rounded-md bg-[var(--color-surface)]",children:(0,ec.jsx)("div",{className:"p-4",children:e})})}function Cn({content:e}){let[t,n]=(0,eu.useState)("page");return(0,ec.jsxs)("div",{className:"flex h-full min-h-0 flex-col gap-2",children:[(0,ec.jsx)("div",{className:"flex shrink-0 items-center gap-0.5 self-start rounded-md bg-muted p-0.5 text-xs",children:[["page","Preview"],["source","Source"]].map(([e,r])=>(0,ec.jsx)("button",{type:"button",onClick:()=>n(e),"aria-pressed":t===e,className:n6("rounded px-2 py-0.5 font-medium transition-colors max-sm:min-h-11 max-sm:px-3",t===e?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:r},e))}),(0,ec.jsx)("div",{className:"min-h-0 flex-1",children:"page"===t?(0,ec.jsx)("iframe",{title:"Page preview",sandbox:"allow-scripts allow-popups allow-popups-to-escape-sandbox",srcDoc:e,referrerPolicy:"no-referrer",className:"h-full w-full rounded-md border border-border bg-white"}):(0,ec.jsx)(Ct,{children:(0,ec.jsx)(Ce,{content:e,ext:"html"})})})]})}let Cr=eu.default.memo(function({content:e,ext:t}){return e?"html"===t?(0,ec.jsx)(Cn,{content:e}):"md"===t||"markdown"===t?(0,ec.jsx)(Ct,{children:(0,ec.jsx)("div",{className:"p-4",children:(0,ec.jsx)(Ac,{content:e})})}):(0,ec.jsx)(Ct,{children:(0,ec.jsx)(Ce,{content:e,ext:t})}):(0,ec.jsx)(Ct,{children:(0,ec.jsx)("div",{className:"flex items-center justify-center p-12",children:(0,ec.jsx)("p",{className:"text-sm text-muted-foreground",children:"File is empty"})})})});function Ca(e,t,n){let r=(0,eu.useRef)(t);(0,eu.useEffect)(()=>{e&&r.current!==t&&(r.current=t,n())},[e,t,n])}async function Ci(e){let t=e.includes("/")?e.slice(0,e.lastIndexOf("/")):"";try{let n=await fetch(`/api/workspace?${new URLSearchParams({path:t})}`);if(400===n.status)return!1;if(!n.ok)return null;return((await n.json()).entries??[]).some(t=>t.path===e&&"file"===t.type)}catch{return null}}async function Cs(e){try{let t=await fetch("/api/memory");if(!t.ok)return null;let n=await t.json();if((n.entries??[]).some(t=>t.path===e))return!0;return!!n.truncated&&null}catch{return null}}async function Co(e){let t=await fetch(`/api/memory?path=${encodeURIComponent(e)}`);if(!t.ok){let e=await t.json().catch(()=>null);throw Error(e?.error||`HTTP ${t.status}`)}let n=await t.json();return"string"==typeof n.content?n.content:""}function Cl({tabId:e,path:t,visible:n,refreshTick:r,onClose:a}){let[i,s]=(0,eu.useState)(null),[o,l]=(0,eu.useState)(!1),[c,u]=(0,eu.useState)(null),d=(0,eu.useRef)(0),p=(0,eu.useRef)(!0);(0,eu.useEffect)(()=>(p.current=!0,()=>{p.current=!1}),[]);let m=(0,eu.useCallback)(async()=>{let e=++d.current,n=()=>p.current&&e===d.current;try{let e=await Co(t);if(!n())return;s(e),l(!1),u(null)}catch(r){if(!n())return;let e=await Cs(t);if(!n())return;!1===e?l(!0):u(r instanceof Error?r.message:"Failed to read file.")}},[t]);(0,eu.useEffect)(()=>{m()},[m]),Ca(n,r,m);let f=I8(I9(t));return(0,ec.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,ec.jsxs)("div",{className:"mb-2 flex shrink-0 items-center justify-between gap-2",children:[(0,ec.jsxs)("p",{className:"min-w-0 truncate font-mono text-xs text-muted-foreground",title:`/memories/${t}`,children:["/memories/",t]}),(0,ec.jsxs)("div",{className:"flex shrink-0 items-center gap-1 max-sm:[&>button]:min-h-11 max-sm:[&>button]:min-w-11",children:[(0,ec.jsx)("span",{className:"rounded border border-border px-1.5 py-0.5 text-[11px] text-muted-foreground",children:"Read-only"}),(0,ec.jsx)(rg,{variant:"ghost",size:"sm",className:"h-8 px-2",onClick:()=>void m(),"aria-label":"Reload file",title:"Reload file",children:(0,ec.jsx)(NJ,{size:16,"aria-hidden":"true"})})]})]}),c&&null!==i&&(0,ec.jsx)("p",{role:"alert",className:"mb-2 text-sm text-destructive",children:c}),(0,ec.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden",children:o?(0,ec.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-3 p-12 text-center",children:[(0,ec.jsx)("p",{className:"text-sm text-muted-foreground",children:"This file no longer exists."}),(0,ec.jsx)(rg,{variant:"outline",size:"sm",onClick:()=>a(e),children:"Close tab"})]}):null===i?(0,ec.jsx)("div",{className:"flex h-full items-center justify-center",children:c?(0,ec.jsx)("p",{className:"text-sm text-destructive",children:c}):(0,ec.jsx)(sk,{className:"size-5 animate-spin text-muted-foreground","aria-hidden":"true"})}):(0,ec.jsx)(Cr,{content:i,ext:f})})]})}let Cc=ny("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),Cu=ny("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);function Cd({tabId:e,path:t,chat:n,drafts:r,onDirtyChange:a,onClose:i}){let s=n&&Object.prototype.hasOwnProperty.call(n.files,t)?function(e){if("object"==typeof e&&null!==e&&"content"in e){let t=e.content;return Array.isArray(t)?t.join("\n"):String(t??"")}return String(e??"")}(n.files[t]):null,[o,l]=(0,eu.useState)(null),c=o&&o.over===s?o.text:s,[u,d]=(0,eu.useState)(()=>void 0!==r.get(e)),[p,m]=(0,eu.useState)(()=>r.get(e)?.text??""),[f,h]=(0,eu.useState)(!1),g=u&&null!==c&&p!==c;(0,eu.useEffect)(()=>{a(e,g)},[e,g,a]);let b=t=>{m(t),r.set(e,{text:t,base:c??""})},y=()=>{d(!1),r.set(e,void 0)},E=async()=>{if(n){h(!0);try{await n.setFiles({...n.files,[t]:p}),l({over:s,text:p}),y()}catch(e){pz.toast.error(`Failed to save file: ${e}`)}finally{h(!1)}}},x=I9(t),v=(0,eu.useCallback)(()=>{if(null===c)return;let e=URL.createObjectURL(new Blob([c],{type:"text/plain"})),t=document.createElement("a");t.href=e,t.download=x,document.body.appendChild(t),t.click(),document.body.removeChild(t),URL.revokeObjectURL(e)},[c,x]);return n?null===c?(0,ec.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-3 p-12 text-center",children:[(0,ec.jsx)("p",{className:"text-sm text-muted-foreground",children:"This file is no longer in the conversation."}),(0,ec.jsx)(rg,{variant:"outline",size:"sm",onClick:()=>i(e),children:"Close tab"})]}):(0,ec.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,ec.jsxs)("div",{className:"mb-2 flex shrink-0 items-center justify-between gap-2",children:[(0,ec.jsx)("p",{className:"min-w-0 truncate font-mono text-xs text-muted-foreground",title:t,children:t}),(0,ec.jsx)("div",{className:"flex shrink-0 items-center gap-1 max-sm:[&>button]:min-h-11 max-sm:[&>button]:min-w-11",children:u?(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsxs)(rg,{variant:"ghost",size:"sm",className:"h-8 px-2",onClick:y,disabled:f,children:[(0,ec.jsx)(Cc,{size:16,className:"mr-1","aria-hidden":"true"}),"Cancel"]}),(0,ec.jsxs)(rg,{size:"sm",className:"h-8 bg-[var(--brand-solid)] px-3 text-[var(--brand-foreground)] hover:opacity-90",onClick:E,disabled:f||!g,children:[f?(0,ec.jsx)(sk,{size:16,className:"mr-1 animate-spin","aria-hidden":"true"}):(0,ec.jsx)(Cu,{size:16,className:"mr-1","aria-hidden":"true"}),"Save"]})]}):(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsxs)(rg,{variant:"ghost",size:"sm",className:"h-8 px-2",onClick:()=>{b(c),d(!0)},disabled:n.editDisabled,"aria-label":"Edit file",children:[(0,ec.jsx)(sN,{size:16,className:"mr-1","aria-hidden":"true"}),"Edit"]}),(0,ec.jsx)(rg,{variant:"ghost",size:"sm",className:"h-8 px-2",onClick:()=>void wR(c),"aria-label":"Copy file",children:(0,ec.jsx)(wC,{size:16,"aria-hidden":"true"})}),(0,ec.jsx)(rg,{variant:"ghost",size:"sm",className:"h-8 px-2",onClick:v,"aria-label":"Download file",children:(0,ec.jsx)(s_,{size:16,"aria-hidden":"true"})})]})})]}),(0,ec.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden",children:u?(0,ec.jsx)("textarea",{value:p,onChange:e=>b(e.target.value),spellCheck:!1,"aria-label":"File content",className:"h-full w-full resize-none rounded-md border border-border bg-background p-4 font-mono text-sm leading-relaxed text-foreground outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring"}):(0,ec.jsx)(Cr,{content:c,ext:I8(x)})})]}):(0,ec.jsx)("div",{className:"flex h-full items-center justify-center p-12 text-center",children:(0,ec.jsx)("p",{className:"text-sm text-muted-foreground",children:"Open the conversation this file belongs to."})})}class Cp extends Error{}async function Cm(e){let t=new AbortController,n=await fetch(I7(e),{signal:t.signal});if(!n.ok){let e=await n.json().catch(()=>null);throw Error(e?.error||`Failed to load file (${n.status})`)}if(Number(n.headers.get("content-length"))>2097152)throw t.abort(),new Cp;return n.text()}function Cf({tabId:e,path:t,size:n,visible:r,refreshTick:a,drafts:i,onDirtyChange:s,onClose:o,onTreeChanged:l}){let c=I9(t),u=I8(c),d=I6.has(u)?"image":"pdf"===u?"pdf":I5.has(u)?"text":"binary",p="text"===d&&null!=n&&n>2097152,[m,f]=(0,eu.useState)(()=>i.get(e)?.base??null),[h,g]=(0,eu.useState)(p?{state:"too-large"}:"text"===d?{state:"loading"}:{state:"ready"}),[b,y]=(0,eu.useState)(null),[E,x]=(0,eu.useState)(null),[v,T]=(0,eu.useState)(()=>void 0!==i.get(e)),[S,_]=(0,eu.useState)(()=>i.get(e)?.text??""),[k,w]=(0,eu.useState)(!1),[A,N]=(0,eu.useState)(!1),[I,C]=(0,eu.useState)(!1),[R,O]=(0,eu.useState)(!1),[D,L]=(0,eu.useState)(null),[M,P]=(0,eu.useState)(0),j=(0,eu.useRef)(!0);(0,eu.useEffect)(()=>(j.current=!0,()=>{j.current=!1}),[]);let F=v&&null!==m&&S!==m;(0,eu.useEffect)(()=>{s(e,F)},[e,F,s]),(0,eu.useEffect)(()=>{v&&null!==m&&i.set(e,{text:S,base:m})},[v,m,S,i,e]);let U=(0,eu.useRef)({content:m,editing:v,draft:S,saving:k,body:h,version:M});(0,eu.useEffect)(()=>{U.current={content:m,editing:v,draft:S,saving:k,body:h,version:M}});let B=(0,eu.useRef)(0),z=(0,eu.useCallback)(async e=>{if("text"!==d){("manual"===e||"auto"===e&&"image"===d)&&(P(e=>e+1),g({state:"ready"}));return}if(p||"too-large"===U.current.body.state||"auto"===e&&U.current.saving)return;let n=++B.current,r=()=>j.current&&n===B.current;try{let e=await Cm(t);if(!r())return;y(null),g({state:"ready"});let{content:n,editing:a,draft:i}=U.current;if(null===n)return void f(e);if(e===n)return void x(null);if(a&&i!==n)return void x(e);f(e),x(null),a&&_(e)}catch(o){if(!r())return;if(o instanceof Cp)return void g({state:"too-large"});let e=o instanceof Error?o.message:"Failed to load file.",n=await Ci(t);if(!r())return;let{content:a,editing:i,draft:s}=U.current;!1!==n||i&&null!==a&&s!==a?!1===n?y("This file no longer exists on disk."):null===a?g({state:"error",message:e}):y(e):g({state:"missing"})}},[d,p,t]);(0,eu.useEffect)(()=>{z("initial")},[z]),Ca(r,a,(0,eu.useCallback)(()=>void z("auto"),[z]));let H=async()=>{let e=await Ci(t);j.current&&U.current.version===M&&g(!1===e?{state:"missing"}:{state:"error",message:"Failed to load image."})},$=()=>{T(!1),x(null),i.set(e,void 0)},G=async()=>{B.current+=1,w(!0),L(null);try{let n=await fetch(I7(t),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:S})}),r=await n.json().catch(()=>null);if(!n.ok)throw Error(r?.error||"Failed to save.");if(i.set(e,void 0),l(),!j.current)return;f(S),$()}catch(e){j.current&&L(e instanceof Error?e.message:"Failed to save.")}finally{j.current&&w(!1)}},q=async()=>{N(!0),L(null);try{let n=await fetch(I7(t),{method:"DELETE"});if(!n.ok){let e=await n.json().catch(()=>null);throw Error(e?.error||"Failed to delete.")}i.set(e,void 0),l(),o(e)}catch(e){j.current&&(C(!1),L(e instanceof Error?e.message:"Failed to delete."))}finally{j.current&&N(!1)}},W=e=>(0,ec.jsxs)("a",{href:I7(t,{download:!0}),download:c,children:[(0,ec.jsx)(s_,{size:16,className:"mr-1","aria-hidden":"true"}),e]});return(0,ec.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,ec.jsxs)("div",{className:"mb-2 flex shrink-0 flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,ec.jsx)("p",{className:"min-w-0 truncate font-mono text-xs text-muted-foreground",title:t,children:t}),(0,ec.jsx)("div",{className:"flex shrink-0 flex-wrap items-center justify-end gap-1 max-sm:[&>a]:min-h-11 max-sm:[&>button]:min-h-11 max-sm:[&>button]:min-w-11",children:v?(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsxs)(rg,{variant:"ghost",size:"sm",className:"h-8 px-2",onClick:()=>F?O(!0):$(),disabled:k,children:[(0,ec.jsx)(Cc,{size:16,className:"mr-1","aria-hidden":"true"}),"Cancel"]}),(0,ec.jsxs)(rg,{size:"sm",className:"h-8 bg-[var(--brand-solid)] px-3 text-[var(--brand-foreground)] hover:opacity-90",onClick:G,disabled:k||!F,children:[k?(0,ec.jsx)(sk,{size:16,className:"mr-1 animate-spin","aria-hidden":"true"}):(0,ec.jsx)(Cu,{size:16,className:"mr-1","aria-hidden":"true"}),k?"Saving…":"Save"]})]}):(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)(rg,{variant:"ghost",size:"sm",className:"h-8 px-2",onClick:()=>void z("manual"),"aria-label":"Reload file",title:"Reload file",children:(0,ec.jsx)(NJ,{size:16,"aria-hidden":"true"})}),"text"===d&&"ready"===h.state&&null!==m&&(0,ec.jsxs)(rg,{variant:"ghost",size:"sm",className:"h-8 px-2",onClick:()=>{_(m??""),L(null),T(!0)},"aria-label":"Edit file",children:[(0,ec.jsx)(sN,{size:16,className:"mr-1","aria-hidden":"true"}),"Edit"]}),(0,ec.jsx)(rg,{variant:"ghost",size:"sm",className:"h-8 px-2",asChild:!0,children:W("Download")}),(0,ec.jsx)(rg,{variant:"ghost",size:"sm",className:"h-8 px-2 text-muted-foreground hover:text-destructive",onClick:()=>C(!0),disabled:A,"aria-label":"Delete file",title:"Delete file",children:A?(0,ec.jsx)(sk,{size:16,className:"animate-spin","aria-hidden":"true"}):(0,ec.jsx)(sL,{size:16,"aria-hidden":"true"})})]})})]}),null!==E&&(0,ec.jsxs)("div",{role:"status",className:"mb-2 flex flex-wrap items-center gap-2 rounded-md border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-sm",children:[(0,ec.jsx)("span",{children:"The file changed on disk."}),(0,ec.jsx)(rg,{variant:"outline",size:"sm",className:"h-7",onClick:()=>{f(E),$()},children:"Reload"}),(0,ec.jsx)(rg,{variant:"ghost",size:"sm",className:"h-7",onClick:()=>{f(E),x(null)},children:"Keep my edits"})]}),b&&(0,ec.jsxs)("div",{role:"alert",className:"mb-2 flex items-center gap-2 text-sm text-destructive",children:[(0,ec.jsx)("span",{children:b}),(0,ec.jsx)(rg,{variant:"outline",size:"sm",className:"h-7",onClick:()=>void z("manual"),children:"Retry"})]}),D&&(0,ec.jsx)("p",{role:"alert",className:"mb-2 text-sm text-destructive",children:D}),(0,ec.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden",children:v?(0,ec.jsx)("textarea",{value:S,onChange:e=>_(e.target.value),spellCheck:!1,"aria-label":"File content",className:"h-full w-full resize-none rounded-md border border-border bg-background p-4 font-mono text-sm leading-relaxed text-foreground outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",placeholder:"File is empty…"}):"missing"===h.state?(0,ec.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-3 p-12 text-center",children:[(0,ec.jsx)("p",{className:"text-sm text-muted-foreground",children:"This file no longer exists."}),(0,ec.jsx)(rg,{variant:"outline",size:"sm",onClick:()=>o(e),children:"Close tab"})]}):"error"===h.state?(0,ec.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-3 p-12",children:[(0,ec.jsx)("p",{className:"text-sm text-destructive",children:h.message}),(0,ec.jsx)(rg,{variant:"outline",size:"sm",onClick:()=>void z("manual"),children:"Retry"})]}):"image"===d?(0,ec.jsx)(oo,{className:"h-full rounded-md bg-[var(--color-surface)]",children:(0,ec.jsx)("div",{className:"flex items-center justify-center p-4",children:(0,ec.jsx)("img",{src:I7(t,{version:M}),alt:c,onError:()=>void H(),className:"max-h-full max-w-full object-contain"})})}):"pdf"===d?(0,ec.jsx)("iframe",{src:I7(t,{version:M}),title:c,className:"h-full w-full rounded-md border border-border"}):"binary"===d||"too-large"===h.state?(0,ec.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-3 p-12 text-center",children:[(0,ec.jsx)("p",{className:"text-sm text-muted-foreground",children:"too-large"===h.state?"This file is too large to preview inline.":"This file type can't be previewed."}),(0,ec.jsx)(rg,{variant:"outline",size:"sm",asChild:!0,children:W("Download file")})]}):"loading"===h.state?(0,ec.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,ec.jsx)(sk,{className:"size-5 animate-spin text-muted-foreground","aria-hidden":"true"})}):(0,ec.jsx)(Cr,{content:m??"",ext:u})}),(0,ec.jsx)(n9,{open:R,onOpenChange:O,children:(0,ec.jsxs)(re,{className:"sm:max-w-md",children:[(0,ec.jsxs)(rt,{children:[(0,ec.jsx)(rr,{children:"Discard unsaved changes?"}),(0,ec.jsxs)(ra,{children:["Your edits to “",c,"” have not been saved."]})]}),(0,ec.jsxs)(rn,{children:[(0,ec.jsx)(rg,{variant:"outline",onClick:()=>O(!1),children:"Keep Editing"}),(0,ec.jsx)(rg,{onClick:()=>{O(!1),$()},className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Discard"})]})]})}),(0,ec.jsx)(n9,{open:I,onOpenChange:e=>{A||C(e)},children:(0,ec.jsxs)(re,{className:"sm:max-w-md",children:[(0,ec.jsxs)(rt,{children:[(0,ec.jsx)(rr,{children:"Delete file?"}),(0,ec.jsxs)(ra,{children:["“",c,"” will be permanently removed from the workspace. This can't be undone."]})]}),(0,ec.jsxs)(rn,{children:[(0,ec.jsx)(rg,{variant:"outline",onClick:()=>C(!1),disabled:A,children:"Cancel"}),(0,ec.jsx)(rg,{onClick:q,disabled:A,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:A?"Deleting…":"Delete"})]})]})})]})}let Ch={workspace:NO,memory:Ak,state:mH};function Cg(){let e=NL(),[t,n]=(0,eu.useState)(null);if(!e)return null;let{state:r,activate:a,close:i,showTree:s,setDirty:o,refreshTick:l,bumpTreeRevision:c,drafts:u,chat:d}=e;return(0,ec.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,ec.jsxs)("div",{className:"flex shrink-0 items-center gap-1 border-b border-border px-2 py-1.5",children:[(0,ec.jsxs)(rg,{variant:"ghost",size:"sm",className:"h-7 shrink-0 px-2 max-sm:min-h-11",onClick:s,"aria-label":"Back to files",children:[(0,ec.jsx)(Iu,{className:"mr-1 size-4","aria-hidden":"true"}),"Files"]}),(0,ec.jsx)("div",{role:"tablist","aria-label":"Open files",className:"scrollbar-pretty flex min-w-0 flex-1 items-center gap-1 overflow-x-auto",children:r.tabs.map(e=>{let t=Ch[e.source],s=e.id===r.activeId,o=I9(e.path);return(0,ec.jsxs)("div",{className:n6("flex max-w-[12rem] shrink-0 items-center rounded-md border text-xs",s?"border-[var(--brand)] bg-background text-foreground":"border-border bg-muted text-muted-foreground hover:text-foreground"),children:[(0,ec.jsxs)("button",{type:"button",role:"tab","aria-selected":s,title:e.path,onClick:()=>a(e.id),className:"flex min-w-0 items-center gap-1 py-1 pl-2 pr-1 max-sm:min-h-11",children:[(0,ec.jsx)(t,{className:"size-3.5 shrink-0","aria-hidden":"true"}),(0,ec.jsx)("span",{className:"truncate",children:o}),e.dirty&&(0,ec.jsx)("span",{className:"size-1.5 shrink-0 rounded-full bg-[var(--brand)]","aria-label":"Unsaved changes"})]}),(0,ec.jsx)("button",{type:"button","aria-label":`Close ${o}`,onClick:()=>e.dirty?n(e):i(e.id),className:"rounded p-1 hover:bg-accent max-sm:min-h-11 max-sm:min-w-11",children:(0,ec.jsx)(nE,{className:"size-3","aria-hidden":"true"})})]},e.id)})})]}),(0,ec.jsx)("div",{className:"min-h-0 flex-1",children:r.tabs.map(e=>{let t=e.id===r.activeId,n=t&&"preview"===r.mode;return(0,ec.jsx)("div",{hidden:!t,className:"h-full p-3",children:"workspace"===e.source?(0,ec.jsx)(Cf,{tabId:e.id,path:e.path,size:e.size,visible:n,refreshTick:l,drafts:u,onDirtyChange:o,onClose:i,onTreeChanged:c}):"memory"===e.source?(0,ec.jsx)(Cl,{tabId:e.id,path:e.path,visible:n,refreshTick:l,onClose:i}):(0,ec.jsx)(Cd,{tabId:e.id,path:e.path,chat:d,drafts:u,onDirtyChange:o,onClose:i})},e.id)})}),(0,ec.jsx)(n9,{open:null!==t,onOpenChange:e=>{e||n(null)},children:(0,ec.jsxs)(re,{className:"sm:max-w-md",children:[(0,ec.jsxs)(rt,{children:[(0,ec.jsx)(rr,{children:"Discard unsaved changes?"}),(0,ec.jsxs)(ra,{children:["Your edits to “",t?I9(t.path):"","” have not been saved."]})]}),(0,ec.jsxs)(rn,{children:[(0,ec.jsx)(rg,{variant:"outline",onClick:()=>n(null),children:"Keep Editing"}),(0,ec.jsx)(rg,{onClick:()=>{t&&i(t.id),n(null)},className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Discard"})]})]})})]})}function Cb({onClose:e,onReportToMainChat:t}){let[n,r]=ev("inspectorTab"),a="agents"===n?"agents":"workspace",i=NL(),s="workspace"===a&&i?.state.mode==="preview"&&null!==i.state.activeId,o=(0,eu.useRef)(null),l=(0,eu.useRef)(null),c=(0,eu.useRef)(null),u=i?.state.activeId??null,d=i?.focusRequest??0,p=i?.takeFocusRequest;return(0,eu.useEffect)(()=>{if("workspace"!==a)return;let e=p?.()??!1,t=c.current,n=s?o.current:l.current,r=null!==t&&(document.activeElement===t||document.activeElement===document.body)&&(!t.isConnected||!!n?.contains(t));if(!e&&!r)return;let i=s?l.current?.querySelector('[role="tab"][aria-selected="true"]'):o.current?.querySelector("button, a[href]");i&&(i.focus(),document.activeElement===i&&(c.current=i))},[a,s,u,d,p]),(0,ec.jsxs)("div",{className:"flex h-full flex-col border-l border-border bg-sidebar","data-file-pane":s?"preview":"tree",onFocus:e=>{c.current=e.target},children:[(0,ec.jsxs)("div",{className:"flex h-11 shrink-0 items-center justify-between gap-2 border-b border-border px-2",children:[(0,ec.jsxs)("div",{role:"tablist","aria-label":"Inspector",className:"flex items-center gap-1",children:[(0,ec.jsxs)("button",{type:"button",role:"tab","aria-selected":"workspace"===a,onClick:()=>r(null),className:n6("flex items-center gap-1.5 rounded-md px-2 py-1 text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","workspace"===a?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground"),children:[(0,ec.jsx)(mM,{className:"size-4 text-[var(--brand)]","aria-hidden":"true"}),"Workspace"]}),(0,ec.jsxs)("button",{type:"button",role:"tab","aria-selected":"agents"===a,onClick:()=>r("agents"),className:n6("flex items-center gap-1.5 rounded-md px-2 py-1 text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","agents"===a?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground"),children:[(0,ec.jsx)(mH,{className:"size-4 text-[var(--brand)]","aria-hidden":"true"}),"Agents"]})]}),(0,ec.jsx)(rg,{variant:"ghost",size:"icon",className:"size-7",onClick:e,"aria-label":"Close inspector",title:"Close",children:(0,ec.jsx)(nE,{className:"size-4","aria-hidden":"true"})})]}),"agents"===a&&(0,ec.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden p-3",children:(0,ec.jsx)(I3,{onReportToMainChat:t})}),(0,ec.jsx)("div",{ref:o,className:n6("min-h-0 flex-1 overflow-y-auto p-3",("workspace"!==a||s)&&"hidden"),children:(0,ec.jsx)(IQ,{})}),i&&i.state.tabs.length>0&&(0,ec.jsx)("div",{ref:l,className:n6("min-h-0 flex-1 overflow-hidden",!s&&"hidden"),children:(0,ec.jsx)(Cg,{})})]})}let Cy={tabs:[],activeId:null,mode:"tree",clock:0},CE=["workspace","memory","state"];function Cx(e,t){let n=e.clock+1;return{...e,clock:n,activeId:t,tabs:e.tabs.map(e=>e.id===t?{...e,lastActive:n}:e)}}function Cv(e,t,n){return n?Cx({...e,tabs:t},n.id):{...e,tabs:t,activeId:null,mode:"tree"}}function CT(e,t){switch(t.type){case"open":{var n;let r=(n=t.ref,`${n.source}:${n.path}`),a=e.tabs.find(e=>e.id===r),i=e;if(a)void 0!==t.ref.size&&t.ref.size!==a.size&&(i={...e,tabs:e.tabs.map(e=>e.id===r?{...e,size:t.ref.size}:e)});else{let n={source:t.ref.source,path:t.ref.path,size:t.ref.size,id:r,lastActive:0,dirty:!1};i={...e,tabs:[...e.tabs,n]}}return function(e){let t=e.tabs;for(;t.length>8;){let n=t.filter(t=>!t.dirty&&t.id!==e.activeId);if(0===n.length)break;let r=n.reduce((e,t)=>t.lastActive<e.lastActive?t:e);t=t.filter(e=>e.id!==r.id)}return t===e.tabs?e:{...e,tabs:t}}({...Cx(i,r),mode:"preview"})}case"activate":return e.tabs.some(e=>e.id===t.id)?{...Cx(e,t.id),mode:"preview"}:e;case"close":{let n=e.tabs.findIndex(e=>e.id===t.id);if(-1===n)return e;let r=e.tabs.filter(e=>e.id!==t.id);if(e.activeId!==t.id)return{...e,tabs:r};return Cv(e,r,r[n]??r[n-1])}case"closeSource":{let n=e.tabs.filter(e=>e.source!==t.source);if(n.length===e.tabs.length)return e;if(n.some(t=>t.id===e.activeId))return{...e,tabs:n};let r=n.length?n.reduce((e,t)=>t.lastActive>e.lastActive?t:e):void 0;return Cv(e,n,r)}case"showTree":return"tree"===e.mode?e:{...e,mode:"tree"};case"showPreview":return e.activeId&&"preview"!==e.mode?{...e,mode:"preview"}:e;case"setDirty":{let n=e.tabs.find(e=>e.id===t.id);if(!n||n.dirty===t.dirty)return e;return{...e,tabs:e.tabs.map(e=>e.id===t.id?{...e,dirty:t.dirty}:e)}}}}function CS({children:e,onReveal:t}){let[n,r]=(0,eu.useReducer)(CT,Cy),[a,i]=ev("file"),[s,o]=(0,eu.useState)(0),[l,c]=(0,eu.useState)(0),[u,d]=(0,eu.useState)(null),p=(0,eu.useRef)(t);(0,eu.useEffect)(()=>{p.current=t},[t]);let[m,f]=(0,eu.useState)(0),h=(0,eu.useRef)(!1),g=(0,eu.useCallback)((e,t)=>{r({type:"open",ref:e}),t&&(h.current=!0,f(e=>e+1)),p.current?.()},[]),b=(0,eu.useCallback)(e=>g(e,!0),[g]),y=(0,eu.useCallback)(()=>{let e=h.current;return h.current=!1,e},[]);(0,eu.useEffect)(()=>{let e=e=>{let t=e.detail;t&&b({source:"memory"===t.kind?"memory":"workspace",path:t.path})};return window.addEventListener(wG,e),()=>window.removeEventListener(wG,e)},[b]);let E=(0,eu.useRef)(null);(0,eu.useEffect)(()=>{if(a===E.current)return;if(null===a)return void r({type:"showTree"});let e=function(e){if(!e)return null;let t=e.indexOf(":");if(t<=0)return null;let n=e.slice(0,t),r=e.slice(t+1);return!CE.includes(n)||!r.trim()||/[\u0000-\u001f\u007f]/.test(r)?null:{source:n,path:r}}(a);if(!e){E.current=null,i(null);return}g(e,!1)},[a,g,i]);let x="preview"===n.mode?n.activeId:null,v=(0,eu.useRef)(void 0);(0,eu.useEffect)(()=>{if(void 0===v.current){v.current=x;return}v.current!==x&&(v.current=x,E.current=x,i(x))},[x,i]);let T=(0,eu.useRef)(new Map),S=(0,eu.useMemo)(()=>({get:e=>T.current.get(e),set:(e,t)=>{void 0===t?T.current.delete(e):T.current.set(e,t)}}),[]);(0,eu.useEffect)(()=>{let e=new Set(n.tabs.map(e=>e.id));for(let t of T.current.keys())e.has(t)||T.current.delete(t)},[n.tabs]);let _=(0,eu.useRef)(void 0),k=(0,eu.useCallback)(e=>{if(d(t=>!function(e,t){if(e===t)return!0;if(!e||!t||e.threadId!==t.threadId||e.setFiles!==t.setFiles||e.editDisabled!==t.editDisabled)return!1;let n=Object.keys(e.files);return n.length===Object.keys(t.files).length&&n.every(n=>e.files[n]===t.files[n])}(t,e)?e:t),!e)return;let t=_.current;null!=t&&t!==e.threadId&&r({type:"closeSource",source:"state"}),_.current=e.threadId},[]),w=(0,eu.useCallback)(()=>o(e=>e+1),[]),A=(0,eu.useCallback)(()=>c(e=>e+1),[]),N=(0,eu.useCallback)(e=>r({type:"activate",id:e}),[]),I=(0,eu.useCallback)(e=>{T.current.delete(e),r({type:"close",id:e})},[]),C=(0,eu.useCallback)(()=>r({type:"showTree"}),[]),R=(0,eu.useCallback)(()=>r({type:"showPreview"}),[]),O=(0,eu.useCallback)((e,t)=>r({type:"setDirty",id:e,dirty:t}),[]),D=(0,eu.useMemo)(()=>({state:n,activeTab:n.tabs.find(e=>e.id===n.activeId)??null,open:b,focusRequest:m,takeFocusRequest:y,activate:N,close:I,showTree:C,showPreview:R,setDirty:O,refreshTick:s,notifyFilesMayHaveChanged:w,treeRevision:l,bumpTreeRevision:A,drafts:S,chat:u,registerChat:k}),[n,b,m,y,N,I,C,R,O,s,w,l,A,S,u,k]);return(0,ec.jsx)(ND.Provider,{value:D,children:e})}let C_="evoscientist-file-pane-widths",Ck={tree:26,preview:45},Cw=e=>"number"==typeof e&&Number.isFinite(e)&&e>=20&&e<=80;function CA(){try{let e=JSON.parse(window.localStorage.getItem(C_)??"{}");return{tree:Cw(e.tree)?e.tree:Ck.tree,preview:Cw(e.preview)?e.preview:Ck.preview}}catch{return{...Ck}}}function CN(e){let t=NL();return e&&t?.state.mode==="preview"&&t.state.activeId?"preview":"tree"}function CI({panelRef:e,sidebarRef:t,sidebarOpen:n,workspaceTab:r,inspectorOpen:a}){let i=CN(r);return(0,eu.useEffect)(()=>{if(!a||!e.current)return;let n=0,r=()=>{cancelAnimationFrame(n);let r=e.current;if(!r)return;let a=function(e,t,n,r=360){return t<=0?e:Math.max(20,Math.min(e,Math.floor(100-n-r/t*100)))}(CA()[i],window.innerWidth,t.current?.getSize()??0);r.resize(a);let s=0,o=()=>{let t=e.current;t&&Math.abs(t.getSize()-a)>.5&&++s<10&&(t.resize(a),n=requestAnimationFrame(o))};n=requestAnimationFrame(o)};r();let s=()=>{cancelAnimationFrame(n),n=requestAnimationFrame(r)};return window.addEventListener("resize",s),()=>{window.removeEventListener("resize",s),cancelAnimationFrame(n)}},[i,a,n,e,t]),null}let CC=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"]);function CR({panelRef:e,workspaceTab:t}){let n=CN(t),r=()=>{let t=e.current?.getSize();null!=t&&function(e,t){if(Cw(t))try{window.localStorage.setItem(C_,JSON.stringify({...CA(),[e]:t}))}catch{}}(n,t)};return(0,ec.jsx)(sv,{onDragging:e=>{e||r()},onKeyUp:e=>{CC.has(e.key)&&r()}})}function CO({config:e,configDialogOpen:t,setConfigDialogOpen:n,handleSaveConfig:r}){let a=ia(),[i,s]=ev("threadId"),[o,l]=ev("sidebar"),[c,u]=ev("view"),[d,p]=ev("memoryTab"),[m,f]=ev("memoryObs"),[h,g]=ev("memoryExec"),[b,y]=ev("inspector"),[E,x]=ev("inspectorTab"),[v,T]=(0,eu.useState)(null),[S,_]=(0,eu.useState)(0),[k,w]=(0,eu.useState)(null),[A,N]=(0,eu.useState)(null),[I,C]=(0,eu.useState)(0),[R,O]=(0,eu.useState)(null),D=(0,eu.useCallback)(async()=>{let t=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e.assistantId),n=async()=>{if(t)return await a.assistants.get(e.assistantId);let n=await a.assistants.search({graphId:e.assistantId,limit:100}),r=n.find(e=>e.metadata?.created_by==="system")??n[0];if(!r)throw Error("No assistant found for this graph.");return r};for(let e=0;e<3;e+=1)try{w(await n());return}catch(t){if(e<2){await new Promise(e=>setTimeout(e,700));continue}console.warn("Couldn't resolve the EvoScientist assistant; addressing the graph by id instead. Is the backend running?",t)}w({assistant_id:e.assistantId,graph_id:e.assistantId,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),config:{},metadata:{},version:1,name:e.assistantId,context:{}})},[a,e.assistantId]);(0,eu.useEffect)(()=>{D()},[D]),(0,eu.useEffect)(()=>{let e=window.matchMedia("(min-width: 768px)"),t=()=>N(e.matches);return t(),e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]),(0,eu.useEffect)(()=>{!1===A&&o&&b&&y(null)},[b,A,y,o]);let L=(0,eu.useCallback)(()=>l(null),[l]),M=(0,eu.useCallback)(()=>{y(null),x(null)},[y,x]),P=(0,eu.useCallback)(()=>{o?l(null):(!1===A&&M(),l("1"))},[M,A,l,o]),j=(0,eu.useCallback)(()=>{b?M():(!1===A&&l(null),x(null),y("1"))},[M,b,A,y,x,l]),F=(0,eu.useCallback)(()=>{x("agents"),!1===A&&l(null),y("1")},[A,y,l,x]),U=(0,eu.useCallback)(()=>{!1===A&&l(null),x(null),y("1")},[A,y,x,l]),B=(0,eu.useRef)(null),z=(0,eu.useRef)(null),H=c?o?"Hide navigation":"Show navigation":o?"Hide research":"Show research",[$,G]=(0,eu.useState)(null),q=(0,eu.useRef)(null),W=(0,eu.useRef)(i);(0,eu.useEffect)(()=>{W.current=i},[i]);let V=(0,eu.useCallback)(()=>{dc(null,!1),W.current=null,s(null),u(null),G(null),C(e=>e+1)},[s,u]),Y=(0,eu.useCallback)(({threadId:e,unsentMessage:t})=>{if(e!==W.current)return!1;let n=q.current?.(),r=[t,n?.text].map(e=>e?.trim()??"").filter(Boolean).join("\n\n"),a=n?.files??[];return V(),G(r||a.length>0?{text:r,files:a}:null),!0},[V]),K=(0,eu.useCallback)(e=>{if("memory"===e.view)p(e.tab),f(e.obsId??null),g(e.execId??null),u("memory");else if("schedule"===e.view)u("schedule");else if("experts"===e.view)u("experts");else{if(b&&"agents"!==E)return void M();!1===A&&l(null),x(null),y("1")}},[M,b,E,A,y,x,g,f,p,l,u]),X=(0,eu.useCallback)(async e=>{dc(null,!1),u(null),G(null),W.current=e,i!==e&&C(e=>e+1),await s(e)},[s,u,i]);return(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)(rk,{open:t,onOpenChange:n,onSave:r,initialConfig:e}),(0,ec.jsxs)("div",{className:"app-shell flex flex-col",children:[(0,ec.jsxs)("header",{className:"mobile-app-header flex h-14 shrink-0 items-center justify-between gap-1 border-b border-border px-2 sm:gap-2 sm:px-4",children:[(0,ec.jsxs)("div",{className:"flex min-w-0 items-center gap-2 sm:gap-3",children:[(0,ec.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,ec.jsx)(ed.default,{src:"/evoscientist-logo.png",alt:"EvoScientist",width:28,height:28,className:"size-6 shrink-0",priority:!0}),o&&(0,ec.jsx)("h1",{className:"hidden truncate text-base font-semibold sm:block sm:text-lg",children:"EvoScientist"})]}),(0,ec.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,ec.jsxs)(rg,{variant:"ghost",size:"icon",onClick:P,"aria-label":H,className:"relative size-8",children:[o?(0,ec.jsx)(il,{className:"size-5","aria-hidden":"true"}):(0,ec.jsx)(io,{className:"size-5","aria-hidden":"true"}),S>0&&(0,ec.jsx)("span",{className:"absolute right-0 top-0 inline-flex min-h-4 min-w-4 items-center justify-center rounded-full bg-destructive px-1 text-[10px] text-destructive-foreground",children:S})]}),!o&&(0,ec.jsx)(rg,{variant:"ghost",size:"icon",onClick:V,"aria-label":"New chat",className:"size-8",children:(0,ec.jsx)(is,{className:"size-5","aria-hidden":"true"})})]})]}),(0,ec.jsxs)("div",{className:"flex shrink-0 items-center gap-1 sm:gap-2",children:[(0,ec.jsx)(Iq,{deploymentUrl:e.deploymentUrl,onReconnect:t=>r({...e,deploymentUrl:t})}),(0,ec.jsx)(Iz,{}),(0,ec.jsx)(rg,{variant:"ghost",size:"icon",onClick:j,"aria-label":b?"Hide inspector":"Show workspace",title:b?"Hide inspector":"Show workspace",className:"size-8",children:b?(0,ec.jsx)(iu,{className:"size-5","aria-hidden":"true"}):(0,ec.jsx)(ic,{className:"size-5","aria-hidden":"true"})}),(0,ec.jsx)(rg,{variant:"ghost",size:"icon",onClick:()=>n(!0),"aria-label":"Settings",title:"Settings",className:"size-8",children:(0,ec.jsx)(ii,{className:"size-5","aria-hidden":"true"})})]})]}),(0,ec.jsx)(CS,{onReveal:U,children:(0,ec.jsxs)("div",{className:"relative flex-1 overflow-hidden",children:[(0,ec.jsx)(CI,{panelRef:B,sidebarRef:z,sidebarOpen:!!(o&&A),workspaceTab:"agents"!==E,inspectorOpen:!!(b&&A)}),o&&!1===A&&(0,ec.jsxs)("div",{className:"absolute inset-0 z-40 flex md:hidden",children:[(0,ec.jsx)("button",{type:"button","aria-label":"Close research",className:"absolute inset-0 bg-black/40",onClick:L}),(0,ec.jsx)("aside",{"aria-label":c?"Navigation":"Research navigation",className:"relative z-10 h-full w-[min(19rem,calc(100vw-2.25rem))] bg-background shadow-xl",children:(0,ec.jsx)(pX,{onClose:L,onNewChat:V,onThreadSelect:async e=>{await X(e),L()},onMutateReady:e=>T(()=>e),onInterruptCountChange:_})})]}),b&&!1===A&&(0,ec.jsxs)("div",{className:"absolute inset-0 z-40 flex justify-end md:hidden",children:[(0,ec.jsx)("button",{type:"button","aria-label":"Close inspector",className:"absolute inset-0 bg-black/40",onClick:M}),(0,ec.jsx)("aside",{"aria-label":"Inspector",className:"relative z-10 h-full w-[min(22rem,calc(100vw-2.25rem))] bg-background shadow-xl has-[[data-file-pane=preview]]:w-full",children:(0,ec.jsx)(Cb,{onClose:M,onReportToMainChat:R})})]}),(0,ec.jsxs)(sx,{direction:"horizontal",autoSaveId:"evoscientist-chat",children:[o&&A&&(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)(i_,{ref:z,id:"thread-history",order:1,defaultSize:23,minSize:18,className:"relative min-w-[260px]",children:(0,ec.jsx)(pX,{onNewChat:V,onThreadSelect:X,onMutateReady:e=>T(()=>e),onInterruptCountChange:_})}),(0,ec.jsx)(sv,{})]}),(0,ec.jsxs)(i_,{id:"chat",className:"relative flex flex-col",order:2,children:[(0,ec.jsx)("div",{className:n6("flex h-full min-h-0 flex-1 flex-col",null!==c&&"hidden"),children:(0,ec.jsx)(mN,{activeAssistant:k,onHistoryRevalidate:()=>v?.(),onThreadUnavailable:Y,children:(0,ec.jsx)(NH,{assistant:k,draftSeed:$,onComposerSnapshotReady:e=>{q.current=e},onShowAgents:F,onNotifyReady:e=>O(()=>e),onNavigate:K,onOpenThread:X,workspaceOpen:!!(b&&"agents"!==E)})},I)}),"skills"===c&&(0,ec.jsx)(NX,{}),"experts"===c&&(0,ec.jsx)(NK,{}),"memory"===c&&(0,ec.jsx)(Ic,{initialTab:d,initialObsId:m,initialExecId:h}),"schedule"===c&&(0,ec.jsx)(IF,{onOpenThread:X})]}),b&&A&&(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)(CR,{panelRef:B,workspaceTab:"agents"!==E}),(0,ec.jsx)(i_,{ref:B,id:"inspector",order:3,defaultSize:26,minSize:20,className:"relative min-w-[300px]",children:(0,ec.jsx)(Cb,{onClose:M,onReportToMainChat:R})})]})]})]})})]})]})}function CD(){let[e,t]=(0,eu.useState)(null),[n,r]=(0,eu.useState)(!1),[a,i]=(0,eu.useState)(!1),[s,o]=ev("assistantId");(0,eu.useEffect)(()=>{let e=e_();e?(t(e),s||o(e.assistantId)):i(!0),r(!0)},[]),(0,eu.useEffect)(()=>{e&&!s&&o(e.assistantId)},[e,s,o]);let l=(0,eu.useCallback)(e=>{localStorage.setItem(eS,JSON.stringify(e)),t(e)},[]),c=e?.langsmithApiKey||el.default.env.NEXT_PUBLIC_LANGSMITH_API_KEY||"";return n?e?(0,ec.jsx)(ir,{deploymentUrl:e.deploymentUrl,apiKey:c,children:(0,ec.jsx)(CO,{config:e,configDialogOpen:a,setConfigDialogOpen:i,handleSaveConfig:l})}):(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)(rk,{open:a,onOpenChange:i,onSave:l}),(0,ec.jsx)("div",{className:"flex h-screen items-center justify-center",children:(0,ec.jsxs)("div",{className:"text-center",children:[(0,ec.jsx)("h1",{className:"text-2xl font-bold",children:"Welcome to EvoScientist"}),(0,ec.jsx)("p",{className:"mt-2 text-muted-foreground",children:"Configure your deployment to get started"}),(0,ec.jsx)(rg,{onClick:()=>i(!0),className:"mt-4",children:"Open Configuration"})]})})]}):(0,ec.jsx)("div",{className:"flex h-screen items-center justify-center",children:(0,ec.jsx)("p",{role:"status",className:"text-muted-foreground",children:"Loading…"})})}e.s(["default",0,function(){return(0,ec.jsx)(eu.Suspense,{fallback:(0,ec.jsx)("div",{className:"flex h-screen items-center justify-center",children:(0,ec.jsx)("p",{className:"text-muted-foreground",children:"Loading…"})}),children:(0,ec.jsx)(CD,{})})}],952683)}]);
|