@playdrop/playdrop-cli 0.14.8 → 0.14.9
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/config/client-meta.json +2 -2
- package/node_modules/@playdrop/config/client-meta.json +2 -2
- package/node_modules/@playwright/mcp/LICENSE +201 -0
- package/node_modules/@playwright/mcp/README.md +1592 -0
- package/node_modules/@playwright/mcp/cli.js +32 -0
- package/node_modules/@playwright/mcp/config.d.ts +239 -0
- package/node_modules/@playwright/mcp/index.d.ts +23 -0
- package/node_modules/@playwright/mcp/index.js +19 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/LICENSE +202 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/NOTICE +5 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/README.md +318 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/ThirdPartyNotices.txt +14 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/cli.js +19 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/index.d.ts +17 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/index.js +17 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/index.mjs +18 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/jsx-runtime.js +42 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/jsx-runtime.mjs +21 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/agentParser.js +89 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/copilot-setup-steps.yml +34 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/generateAgents.js +395 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-coverage.prompt.md +31 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-generate.prompt.md +8 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-generator.agent.md +88 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-heal.prompt.md +6 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-healer.agent.md +56 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-plan.prompt.md +9 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-planner.agent.md +74 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/cli/reportActions.js +78 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/cli/testActions.js +213 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/common/index.js +2966 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/common/index.js.txt +34 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/errorContext.js +129 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/globals.js +58 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/index.js +783 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/isomorphic.js +260 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/isomorphic.js.txt +9 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/loader/loaderProcessEntry.js +34 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/loader/loaderProcessEntry.js.txt +9 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/matchers/expect.js +13480 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/matchers/expect.js.LICENSE +640 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/matchers/expect.js.txt +67 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/browserBackend.js +125 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/generatorTools.js +122 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/plannerTools.js +150 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/seed.js +82 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/streams.js +44 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/testBackend.js +99 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/testContext.js +306 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/testTool.js +30 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/testTools.js +98 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/package.js +47 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/program.js +237 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/runner/index.js +8154 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/runner/index.js.txt +59 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/transform/babelBundle.js +72275 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/transform/babelBundle.js.LICENSE +2384 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/transform/babelBundle.js.txt +325 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/transform/esmLoader.js +8060 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/transform/esmLoader.js.LICENSE +355 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/transform/esmLoader.js.txt +60 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/util.js +373 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/worker/workerProcessEntry.js +1850 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/lib/worker/workerProcessEntry.js.txt +19 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/package.json +58 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/test.d.ts +18 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/test.js +24 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/test.mjs +35 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/types/test.d.ts +10709 -0
- package/node_modules/@playwright/mcp/node_modules/playwright/types/testReporter.d.ts +908 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/LICENSE +202 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/NOTICE +5 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/README.md +3 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/ThirdPartyNotices.txt +13 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/install_media_pack.ps1 +5 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/install_webkit_wsl.ps1 +33 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh +42 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh +13 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1 +24 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh +42 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh +12 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1 +24 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh +48 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh +11 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1 +23 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh +48 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh +11 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1 +23 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh +48 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh +11 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1 +24 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/browsers.json +81 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/cli.js +21 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/index.d.ts +17 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/index.js +17 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/index.mjs +28 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/bootstrap.js +88 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/coreBundle.js +74495 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/entry/cliDaemon.js +5 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/entry/dashboardApp.js +3 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/entry/mcp.js +10 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/entry/oopBrowserDownload.js +3 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/package.js +50 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/server/chromium/appIcon.png +0 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/server/electron/loader.js +118 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/serverRegistry.js +7347 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/serverRegistry.js.LICENSE +354 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/channelSessions.js +141 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/cli.js +6 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/help.json +707 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/minimist.js +128 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/output.js +343 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/program.js +404 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/registry.js +176 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/session.js +258 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/SKILL.md +420 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/element-attributes.md +23 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/playwright-tests.md +39 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/request-mocking.md +87 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/running-code.md +241 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/session-management.md +225 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/storage-state.md +275 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/test-generation.md +433 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/tracing.md +139 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/video-recording.md +143 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/dashboard/appIcon.png +0 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/trace/SKILL.md +171 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/utils/extension.js +78 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/utils/socketConnection.js +108 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/utilsBundle.js +90764 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/utilsBundle.js.LICENSE +2179 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/codicon-DCmgc-ay.ttf +0 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-1bWoP6pv.svg +1 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-beta-k3eOH_eK.svg +1 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-nightly-Cp5nfeDT.svg +1 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/index-CyWAfh-p.js +11 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/index-DhC616m4.css +1 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/safari-na3_-uQk.svg +1 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/index.html +29 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/playwright-logo.svg +24 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/htmlReport/index.html +16 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/htmlReport/report.css +2 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/htmlReport/report.js +32 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule--QdMvsKi.css +1 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-BVGIAA-i.js +32 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/assets/index-BQ57a3QC.js +129 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/assets/index-l_lX622x.css +1 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/index.html +29 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/playwright-logo.svg +9 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-BSEO6m_i.js +32 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-CT5oRh4X.js +181 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/assets/urlMatch-L3liM589.js +1 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/assets/xtermModule-BN2nOuEV.js +7 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/codeMirrorModule.-QdMvsKi.css +1 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.BLFoOugd.css +1 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/index.B_TqY17P.css +1 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/index.DLSGjmWZ.js +1 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/index.html +44 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/manifest.webmanifest +16 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/playwright-logo.svg +9 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/snapshot.B_Jk1wbt.js +1 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/snapshot.html +10 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js +4 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/uiMode.C7UW1sC9.css +1 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CZvydVOh.js +5 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +18 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/xtermModule.kHJ-D0s7.css +1 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/xdg-open +1267 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/package.json +34 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/types/protocol.d.ts +24842 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/types/structs.d.ts +45 -0
- package/node_modules/@playwright/mcp/node_modules/playwright-core/types/types.d.ts +26088 -0
- package/node_modules/@playwright/mcp/package.json +51 -0
- package/package.json +3 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import{O as e,k as t}from"./defaultSettingsView-CT5oRh4X.js";var n=e(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n||=self,n.CodeMirror=r())})(e,(function(){var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),a=/Edge\/(\d+)/.exec(e),o=r||i||a,s=o&&(r?document.documentMode||6:+(a||i)[1]),c=!a&&/WebKit\//.test(e),l=c&&/Qt\/\d+\.\d+/.test(e),u=!a&&/Chrome\/(\d+)/.exec(e),d=u&&+u[1],f=/Opera\//.test(e),p=/Apple Computer/.test(navigator.vendor),m=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),h=/PhantomJS/.test(e),g=p&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),_=/Android/.test(e),v=g||_||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=g||/Mac/.test(t),b=/\bCrOS\b/.test(e),x=/win/i.test(t),S=f&&e.match(/Version\/(\d*\.\d*)/);S&&=Number(S[1]),S&&S>=15&&(f=!1,c=!0);var C=y&&(l||f&&(S==null||S<12.11)),w=n||o&&s>=9;function T(e){return RegExp(`(^|\\s)`+e+`(?:$|\\s)\\s*`)}var E=function(e,t){var n=e.className,r=T(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:``)}};function D(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function O(e,t){return D(e).appendChild(t)}function k(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t==`string`)i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a<t.length;++a)i.appendChild(t[a]);return i}function A(e,t,n,r){var i=k(e,t,n,r);return i.setAttribute(`role`,`presentation`),i}var j=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch{return r}return r.collapse(!0),r.moveEnd(`character`,n),r.moveStart(`character`,t),r};function M(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function ee(e){var t=e.ownerDocument||e,n;try{n=e.activeElement}catch{n=t.body||null}for(;n&&n.shadowRoot&&n.shadowRoot.activeElement;)n=n.shadowRoot.activeElement;return n}function te(e,t){var n=e.className;T(t).test(n)||(e.className+=(n?` `:``)+t)}function N(e,t){for(var n=e.split(` `),r=0;r<n.length;r++)n[r]&&!T(n[r]).test(t)&&(t+=` `+n[r]);return t}var ne=function(e){e.select()};g?ne=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:o&&(ne=function(e){try{e.select()}catch{}});function P(e){return e.display.wrapper.ownerDocument}function re(e){return F(e.display.wrapper)}function F(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function I(e){return P(e).defaultView}function L(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function R(e,t,n){for(var r in t||={},e)e.hasOwnProperty(r)&&(n!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}function z(e,t,n,r,i){t??(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var a=r||0,o=i||0;;){var s=e.indexOf(` `,a);if(s<0||s>=t)return o+(t-a);o+=s-a,o+=n-o%n,a=s+1}}var ie=function(){this.id=null,this.f=null,this.time=0,this.handler=L(this.onTimeout,this)};ie.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},ie.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};function B(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var ae=50,oe={toString:function(){return`CodeMirror.Pass`}},se={scroll:!1},ce={origin:`*mouse`},le={origin:`+move`};function ue(e,t,n){for(var r=0,i=0;;){var a=e.indexOf(` `,r);a==-1&&(a=e.length);var o=a-r;if(a==e.length||i+o>=t)return r+Math.min(o,t-i);if(i+=a-r,i+=n-i%n,r=a+1,i>=t)return r}}var de=[``];function fe(e){for(;de.length<=e;)de.push(V(de)+` `);return de[e]}function V(e){return e[e.length-1]}function pe(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function me(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function he(){}function ge(e,t){var n;return Object.create?n=Object.create(e):(he.prototype=e,n=new he),t&&R(t,n),n}var _e=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ve(e){return/\w/.test(e)||e>``&&(e.toUpperCase()!=e.toLowerCase()||_e.test(e))}function ye(e,t){return t?t.source.indexOf(`\\w`)>-1&&ve(e)?!0:t.test(e):ve(e)}function be(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var xe=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Se(e){return e.charCodeAt(0)>=768&&xe.test(e)}function Ce(e,t,n){for(;(n<0?t>0:t<e.length)&&Se(e.charAt(t));)t+=n;return t}function we(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,a=r<0?Math.ceil(i):Math.floor(i);if(a==t)return e(a)?t:n;e(a)?n=a:t=a+r}}function Te(e,t,n,r){if(!e)return r(t,n,`ltr`,0);for(var i=!1,a=0;a<e.length;++a){var o=e[a];(o.from<n&&o.to>t||t==n&&o.to==t)&&(r(Math.max(o.from,t),Math.min(o.to,n),o.level==1?`rtl`:`ltr`,a),i=!0)}i||r(t,n,`ltr`)}var Ee=null;function De(e,t,n){var r;Ee=null;for(var i=0;i<e.length;++i){var a=e[i];if(a.from<t&&a.to>t)return i;a.to==t&&(a.from!=a.to&&n==`before`?r=i:Ee=i),a.from==t&&(a.from!=a.to&&n!=`before`?r=i:Ee=i)}return r??Ee}var Oe=(function(){function e(e){return e<=247?`bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN`.charAt(e):1424<=e&&e<=1524?`R`:1536<=e&&e<=1785?`nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111`.charAt(e-1536):1774<=e&&e<=2220?`r`:8192<=e&&e<=8203?`w`:e==8204?`b`:`L`}var t=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,n=/[stwN]/,r=/[LRr]/,i=/[Lb1n]/,a=/[1n]/;function o(e,t,n){this.level=e,this.from=t,this.to=n}return function(s,c){var l=c==`ltr`?`L`:`R`;if(s.length==0||c==`ltr`&&!t.test(s))return!1;for(var u=s.length,d=[],f=0;f<u;++f)d.push(e(s.charCodeAt(f)));for(var p=0,m=l;p<u;++p){var h=d[p];h==`m`?d[p]=m:m=h}for(var g=0,_=l;g<u;++g){var v=d[g];v==`1`&&_==`r`?d[g]=`n`:r.test(v)&&(_=v,v==`r`&&(d[g]=`R`))}for(var y=1,b=d[0];y<u-1;++y){var x=d[y];x==`+`&&b==`1`&&d[y+1]==`1`?d[y]=`1`:x==`,`&&b==d[y+1]&&(b==`1`||b==`n`)&&(d[y]=b),b=x}for(var S=0;S<u;++S){var C=d[S];if(C==`,`)d[S]=`N`;else if(C==`%`){var w=void 0;for(w=S+1;w<u&&d[w]==`%`;++w);for(var T=S&&d[S-1]==`!`||w<u&&d[w]==`1`?`1`:`N`,E=S;E<w;++E)d[E]=T;S=w-1}}for(var D=0,O=l;D<u;++D){var k=d[D];O==`L`&&k==`1`?d[D]=`L`:r.test(k)&&(O=k)}for(var A=0;A<u;++A)if(n.test(d[A])){var j=void 0;for(j=A+1;j<u&&n.test(d[j]);++j);for(var M=(A?d[A-1]:l)==`L`,ee=M==((j<u?d[j]:l)==`L`)?M?`L`:`R`:l,te=A;te<j;++te)d[te]=ee;A=j-1}for(var N=[],ne,P=0;P<u;)if(i.test(d[P])){var re=P;for(++P;P<u&&i.test(d[P]);++P);N.push(new o(0,re,P))}else{var F=P,I=N.length,L=+(c==`rtl`);for(++P;P<u&&d[P]!=`L`;++P);for(var R=F;R<P;)if(a.test(d[R])){F<R&&(N.splice(I,0,new o(1,F,R)),I+=L);var z=R;for(++R;R<P&&a.test(d[R]);++R);N.splice(I,0,new o(2,z,R)),I+=L,F=R}else++R;F<P&&N.splice(I,0,new o(1,F,P))}return c==`ltr`&&(N[0].level==1&&(ne=s.match(/^\s+/))&&(N[0].from=ne[0].length,N.unshift(new o(0,0,ne[0].length))),V(N).level==1&&(ne=s.match(/\s+$/))&&(V(N).to-=ne[0].length,N.push(new o(0,u-ne[0].length,u)))),c==`rtl`?N.reverse():N}})();function H(e,t){var n=e.order;return n??=e.order=Oe(e.text,t),n}var ke=[],U=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent(`on`+t,n);else{var r=e._handlers||={};r[t]=(r[t]||ke).concat(n)}};function Ae(e,t){return e._handlers&&e._handlers[t]||ke}function je(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent(`on`+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var a=B(i,n);a>-1&&(r[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function W(e,t){var n=Ae(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function G(e,t,n){return typeof t==`string`&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),W(e,n||t.type,e,t),Le(t)||t.codemirrorIgnore}function Me(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)B(n,t[r])==-1&&n.push(t[r])}function Ne(e,t){return Ae(e,t).length>0}function Pe(e){e.prototype.on=function(e,t){U(this,e,t)},e.prototype.off=function(e,t){je(this,e,t)}}function Fe(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ie(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Le(e){return e.defaultPrevented==null?e.returnValue==0:e.defaultPrevented}function Re(e){Fe(e),Ie(e)}function ze(e){return e.target||e.srcElement}function Be(e){var t=e.which;return t??(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),y&&e.ctrlKey&&t==1&&(t=3),t}var Ve=function(){if(o&&s<9)return!1;var e=k(`div`);return`draggable`in e||`dragDrop`in e}(),He;function Ue(e){if(He==null){var t=k(`span`,``);O(e,k(`span`,[t,document.createTextNode(`x`)])),e.firstChild.offsetHeight!=0&&(He=t.offsetWidth<=1&&t.offsetHeight>2&&!(o&&s<8))}var n=He?k(`span`,``):k(`span`,`\xA0`,null,`display: inline-block; width: 1px; margin-right: -1px`);return n.setAttribute(`cm-text`,``),n}var We;function Ge(e){if(We!=null)return We;var t=O(e,document.createTextNode(`AخA`)),n=j(t,0,1).getBoundingClientRect(),r=j(t,1,2).getBoundingClientRect();return D(e),!n||n.left==n.right?!1:We=r.right-n.right<3}var Ke=`
|
|
2
|
+
|
|
3
|
+
b`.split(/\n/).length==3?function(e){return e.split(/\r\n?|\n/)}:function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(`
|
|
4
|
+
`,t);i==-1&&(i=e.length);var a=e.slice(t,e.charAt(i-1)==`\r`?i-1:i),o=a.indexOf(`\r`);o==-1?(n.push(a),t=i+1):(n.push(a.slice(0,o)),t+=o+1)}return n},qe=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints(`StartToEnd`,t)!=0},Je=(function(){var e=k(`div`);return`oncopy`in e?!0:(e.setAttribute(`oncopy`,`return;`),typeof e.oncopy==`function`)})(),Ye=null;function Xe(e){if(Ye!=null)return Ye;var t=O(e,k(`span`,`x`)),n=t.getBoundingClientRect(),r=j(t,0,1).getBoundingClientRect();return Ye=Math.abs(n.left-r.left)>1}var Ze={},Qe={};function $e(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ze[e]=t}function et(e,t){Qe[e]=t}function tt(e){if(typeof e==`string`&&Qe.hasOwnProperty(e))e=Qe[e];else if(e&&typeof e.name==`string`&&Qe.hasOwnProperty(e.name)){var t=Qe[e.name];typeof t==`string`&&(t={name:t}),e=ge(t,e),e.name=t.name}else if(typeof e==`string`&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return tt(`application/xml`);else if(typeof e==`string`&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return tt(`application/json`);return typeof e==`string`?{name:e}:e||{name:`null`}}function nt(e,t){t=tt(t);var n=Ze[t.name];if(!n)return nt(e,`text/plain`);var r=n(e,t);if(rt.hasOwnProperty(t.name)){var i=rt[t.name];for(var a in i)i.hasOwnProperty(a)&&(r.hasOwnProperty(a)&&(r[`_`+a]=r[a]),r[a]=i[a])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var o in t.modeProps)r[o]=t.modeProps[o];return r}var rt={};function it(e,t){R(t,rt.hasOwnProperty(e)?rt[e]:rt[e]={})}function at(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function ot(e,t){for(var n;e.innerMode&&(n=e.innerMode(t),!(!n||n.mode==e));)t=n.state,e=n.mode;return n||{mode:e,state:t}}function st(e,t,n){return e.startState?e.startState(t,n):!0}var ct=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};ct.prototype.eol=function(){return this.pos>=this.string.length},ct.prototype.sol=function(){return this.pos==this.lineStart},ct.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ct.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},ct.prototype.eat=function(e){var t=this.string.charAt(this.pos);if(typeof e==`string`?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},ct.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},ct.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},ct.prototype.skipToEnd=function(){this.pos=this.string.length},ct.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},ct.prototype.backUp=function(e){this.pos-=e},ct.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=z(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?z(this.string,this.lineStart,this.tabSize):0)},ct.prototype.indentation=function(){return z(this.string,null,this.tabSize)-(this.lineStart?z(this.string,this.lineStart,this.tabSize):0)},ct.prototype.match=function(e,t,n){if(typeof e==`string`){var r=function(e){return n?e.toLowerCase():e};if(r(this.string.substr(this.pos,e.length))==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var i=this.string.slice(this.pos).match(e);return i&&i.index>0?null:(i&&t!==!1&&(this.pos+=i[0].length),i)}},ct.prototype.current=function(){return this.string.slice(this.start,this.pos)},ct.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},ct.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},ct.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function K(e,t){if(t-=e.first,t<0||t>=e.size)throw Error(`There is no line `+(t+e.first)+` in the document.`);for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],a=i.chunkSize();if(t<a){n=i;break}t-=a}return n.lines[t]}function lt(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(e){var a=e.text;i==n.line&&(a=a.slice(0,n.ch)),i==t.line&&(a=a.slice(t.ch)),r.push(a),++i}),r}function ut(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function dt(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function q(e){if(e.parent==null)return null;for(var t=e.parent,n=B(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function ft(e,t){var n=e.first;outer:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],a=i.height;if(t<a){e=i;continue outer}t-=a,n+=i.chunkSize()}return n}while(!e.lines);for(var o=0;o<e.lines.length;++o){var s=e.lines[o].height;if(t<s)break;t-=s}return n+o}function pt(e,t){return t>=e.first&&t<e.first+e.size}function mt(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function J(e,t,n){if(n===void 0&&(n=null),!(this instanceof J))return new J(e,t,n);this.line=e,this.ch=t,this.sticky=n}function Y(e,t){return e.line-t.line||e.ch-t.ch}function ht(e,t){return e.sticky==t.sticky&&Y(e,t)==0}function gt(e){return J(e.line,e.ch)}function _t(e,t){return Y(e,t)<0?t:e}function vt(e,t){return Y(e,t)<0?e:t}function yt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function X(e,t){if(t.line<e.first)return J(e.first,0);var n=e.first+e.size-1;return t.line>n?J(n,K(e,n).text.length):bt(t,K(e,t.line).text.length)}function bt(e,t){var n=e.ch;return n==null||n>t?J(e.line,t):n<0?J(e.line,0):e}function xt(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=X(e,t[r]);return n}var St=function(e,t){this.state=e,this.lookAhead=t},Ct=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};Ct.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Ct.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,``),size:this.baseTokens[this.baseTokenPos]-e}},Ct.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ct.fromSaved=function(e,t,n){return t instanceof St?new Ct(e,at(e.mode,t.state),n,t.lookAhead):new Ct(e,at(e.mode,t),n)},Ct.prototype.save=function(e){var t=e===!1?this.state:at(this.doc.mode,this.state);return this.maxLookAhead>0?new St(t,this.maxLookAhead):t};function wt(e,t,n,r){var i=[e.state.modeGen],a={};Nt(e,t.text,e.doc.mode,n,function(e,t){return i.push(e,t)},a,r);for(var o=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],c=1,l=0;n.state=!0,Nt(e,t.text,s.mode,n,function(e,t){for(var n=c;l<e;){var r=i[c];r>e&&i.splice(c,1,e,i[c+1],r),c+=2,l=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,c-n,e,`overlay `+t),c=n+2;else for(;n<c;n+=2){var a=i[n+1];i[n+1]=(a?a+` `:``)+`overlay `+t}},a),n.state=o,n.baseTokens=null,n.baseTokenPos=1},c=0;c<e.state.overlays.length;++c)s(c);return{styles:i,classes:a.bgClass||a.textClass?a:null}}function Tt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=Et(e,q(t)),i=t.text.length>e.options.maxHighlightLength&&at(e.doc.mode,r.state),a=wt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&=null,n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Et(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new Ct(r,!0,t);var a=Pt(e,t,n),o=a>r.first&&K(r,a-1).stateAfter,s=o?Ct.fromSaved(r,o,a):new Ct(r,st(r.mode),a);return r.iter(a,t,function(n){Dt(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&r<i.viewTo?s.save():null,s.nextLine()}),n&&(r.modeFrontier=s.line),s}function Dt(e,t,n,r){var i=e.doc.mode,a=new ct(t,e.options.tabSize,n);for(a.start=a.pos=r||0,t==``&&Ot(i,n.state);!a.eol();)kt(i,a,n.state),a.start=a.pos}function Ot(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=ot(e,t);if(n.mode.blankLine)return n.mode.blankLine(n.state)}}function kt(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=ot(e,n).mode);var a=e.token(t,n);if(t.pos>t.start)return a}throw Error(`Mode `+e.name+` failed to advance stream.`)}var At=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function jt(e,t,n,r){var i=e.doc,a=i.mode,o;t=X(i,t);var s=K(i,t.line),c=Et(e,t.line,n),l=new ct(s.text,e.options.tabSize,c),u;for(r&&(u=[]);(r||l.pos<t.ch)&&!l.eol();)l.start=l.pos,o=kt(a,l,c.state),r&&u.push(new At(l,o,at(i.mode,c.state)));return r?u:new At(l,o,c.state)}function Mt(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?`bgClass`:`textClass`;t[r]==null?t[r]=n[2]:RegExp(`(?:^|\\s)`+n[2]+`(?:$|\\s)`).test(t[r])||(t[r]+=` `+n[2])}return e}function Nt(e,t,n,r,i,a,o){var s=n.flattenSpans;s??=e.options.flattenSpans;var c=0,l=null,u=new ct(t,e.options.tabSize,r),d,f=e.options.addModeClass&&[null];for(t==``&&Mt(Ot(n,r.state),a);!u.eol();){if(u.pos>e.options.maxHighlightLength?(s=!1,o&&Dt(e,t,r,u.pos),u.pos=t.length,d=null):d=Mt(kt(n,u,r.state,f),a),f){var p=f[0].name;p&&(d=`m-`+(d?p+` `+d:p))}if(!s||l!=d){for(;c<u.start;)c=Math.min(u.start,c+5e3),i(c,l);l=d}u.start=u.pos}for(;c<u.pos;){var m=Math.min(u.pos,c+5e3);i(m,l),c=m}}function Pt(e,t,n){for(var r,i,a=e.doc,o=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>o;--s){if(s<=a.first)return a.first;var c=K(a,s-1),l=c.stateAfter;if(l&&(!n||s+(l instanceof St?l.lookAhead:0)<=a.modeFrontier))return s;var u=z(c.text,null,e.options.tabSize);(i==null||r>u)&&(i=s-1,r=u)}return i}function Ft(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=K(e,r).stateAfter;if(i&&(!(i instanceof St)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var It=!1,Lt=!1;function Rt(){It=!0}function zt(){Lt=!0}function Bt(e,t,n){this.marker=e,this.from=t,this.to=n}function Vt(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Ht(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||=[]).push(e[r]);return n}function Ut(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||=new WeakSet);r&&e.markedSpans&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}function Wt(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker;if(a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t)||a.from==t&&o.type==`bookmark`&&(!n||!a.marker.insertLeft)){var s=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);(r||=[]).push(new Bt(o,a.from,s?null:a.to))}}return r}function Gt(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker;if(a.to==null||(o.inclusiveRight?a.to>=t:a.to>t)||a.from==t&&o.type==`bookmark`&&(!n||a.marker.insertLeft)){var s=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);(r||=[]).push(new Bt(o,s?null:a.from-t,a.to==null?null:a.to-t))}}return r}function Kt(e,t){if(t.full)return null;var n=pt(e,t.from.line)&&K(e,t.from.line).markedSpans,r=pt(e,t.to.line)&&K(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,a=t.to.ch,o=Y(t.from,t.to)==0,s=Wt(n,i,o),c=Gt(r,a,o),l=t.text.length==1,u=V(t.text).length+(l?i:0);if(s)for(var d=0;d<s.length;++d){var f=s[d];if(f.to==null){var p=Vt(c,f.marker);p?l&&(f.to=p.to==null?null:p.to+u):f.to=i}}if(c)for(var m=0;m<c.length;++m){var h=c[m];h.to!=null&&(h.to+=u),h.from==null?Vt(s,h.marker)||(h.from=u,l&&(s||=[]).push(h)):(h.from+=u,l&&(s||=[]).push(h))}s&&=qt(s),c&&c!=s&&(c=qt(c));var g=[s];if(!l){var _=t.text.length-2,v;if(_>0&&s)for(var y=0;y<s.length;++y)s[y].to??(v||=[]).push(new Bt(s[y].marker,null,null));for(var b=0;b<_;++b)g.push(v);g.push(c)}return g}function qt(e){for(var t=0;t<e.length;++t){var n=e[t];n.from!=null&&n.from==n.to&&n.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Jt(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;n.readOnly&&(!r||B(r,n)==-1)&&(r||=[]).push(n)}}),!r)return null;for(var i=[{from:t,to:n}],a=0;a<r.length;++a)for(var o=r[a],s=o.find(0),c=0;c<i.length;++c){var l=i[c];if(!(Y(l.to,s.from)<0||Y(l.from,s.to)>0)){var u=[c,1],d=Y(l.from,s.from),f=Y(l.to,s.to);(d<0||!o.inclusiveLeft&&!d)&&u.push({from:l.from,to:s.from}),(f>0||!o.inclusiveRight&&!f)&&u.push({from:s.to,to:l.to}),i.splice.apply(i,u),c+=u.length-3}}return i}function Yt(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Xt(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Zt(e){return e.inclusiveLeft?-1:0}function Qt(e){return+!!e.inclusiveRight}function $t(e,t){var n=e.lines.length-t.lines.length;if(n!=0)return n;var r=e.find(),i=t.find(),a=Y(r.from,i.from)||Zt(e)-Zt(t);return a?-a:Y(r.to,i.to)||Qt(e)-Qt(t)||t.id-e.id}function en(e,t){var n=Lt&&e.markedSpans,r;if(n)for(var i=void 0,a=0;a<n.length;++a)i=n[a],i.marker.collapsed&&(t?i.from:i.to)==null&&(!r||$t(r,i.marker)<0)&&(r=i.marker);return r}function tn(e){return en(e,!0)}function nn(e){return en(e,!1)}function rn(e,t){var n=Lt&&e.markedSpans,r;if(n)for(var i=0;i<n.length;++i){var a=n[i];a.marker.collapsed&&(a.from==null||a.from<t)&&(a.to==null||a.to>t)&&(!r||$t(r,a.marker)<0)&&(r=a.marker)}return r}function an(e,t,n,r,i){var a=K(e,t),o=Lt&&a.markedSpans;if(o)for(var s=0;s<o.length;++s){var c=o[s];if(c.marker.collapsed){var l=c.marker.find(0),u=Y(l.from,n)||Zt(c.marker)-Zt(i),d=Y(l.to,r)||Qt(c.marker)-Qt(i);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(c.marker.inclusiveRight&&i.inclusiveLeft?Y(l.to,n)>=0:Y(l.to,n)>0)||u>=0&&(c.marker.inclusiveRight&&i.inclusiveLeft?Y(l.from,r)<=0:Y(l.from,r)<0)))return!0}}}function on(e){for(var t;t=tn(e);)e=t.find(-1,!0).line;return e}function sn(e){for(var t;t=nn(e);)e=t.find(1,!0).line;return e}function cn(e){for(var t,n;t=nn(e);)e=t.find(1,!0).line,(n||=[]).push(e);return n}function ln(e,t){var n=K(e,t),r=on(n);return n==r?t:q(r)}function un(e,t){if(t>e.lastLine())return t;var n=K(e,t),r;if(!dn(e,n))return t;for(;r=nn(n);)n=r.find(1,!0).line;return q(n)+1}function dn(e,t){var n=Lt&&t.markedSpans;if(n){for(var r=void 0,i=0;i<n.length;++i)if(r=n[i],r.marker.collapsed&&(r.from==null||!r.marker.widgetNode&&r.from==0&&r.marker.inclusiveLeft&&fn(e,t,r)))return!0}}function fn(e,t,n){if(n.to==null){var r=n.marker.find(1,!0);return fn(e,r.line,Vt(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,a=0;a<t.markedSpans.length;++a)if(i=t.markedSpans[a],i.marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(i.to==null||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&fn(e,t,i))return!0}function pn(e){e=on(e);for(var t=0,n=e.parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var a=n.parent;a;n=a,a=n.parent)for(var o=0;o<a.children.length;++o){var s=a.children[o];if(s==n)break;t+=s.height}return t}function mn(e){if(e.height==0)return 0;for(var t=e.text.length,n,r=e;n=tn(r);){var i=n.find(0,!0);r=i.from.line,t+=i.from.ch-i.to.ch}for(r=e;n=nn(r);){var a=n.find(0,!0);t-=r.text.length-a.from.ch,r=a.to.line,t+=r.text.length-a.to.ch}return t}function hn(e){var t=e.display,n=e.doc;t.maxLine=K(n,n.first),t.maxLineLength=mn(t.maxLine),t.maxLineChanged=!0,n.iter(function(e){var n=mn(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}var gn=function(e,t,n){this.text=e,Xt(this,t),this.height=n?n(this):1};gn.prototype.lineNo=function(){return q(this)},Pe(gn);function _n(e,t,n,r){e.text=t,e.stateAfter&&=null,e.styles&&=null,e.order!=null&&(e.order=null),Yt(e),Xt(e,n);var i=r?r(e):1;i!=e.height&&dt(e,i)}function vn(e){e.parent=null,Yt(e)}var yn={},bn={};function xn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?bn:yn;return n[e]||(n[e]=e.replace(/\S+/g,`cm-$&`))}function Sn(e,t){var n=A(`span`,null,null,c?`padding-right: .1px`:null),r={pre:A(`pre`,[n],`CodeMirror-line`),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption(`lineWrapping`)};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a=i?t.rest[i-1]:t.line,o=void 0;r.pos=0,r.addToken=wn,Ge(e.display.measure)&&(o=H(a,e.doc.direction))&&(r.addToken=En(r.addToken,o)),r.map=[],On(a,r,Tt(e,a,t!=e.display.externalMeasured&&q(a))),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=N(a.styleClasses.bgClass,r.bgClass||``)),a.styleClasses.textClass&&(r.textClass=N(a.styleClasses.textClass,r.textClass||``))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(Ue(e.display.measure))),i==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(c){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(`.cm-tab`))&&(r.content.className=`cm-tab-wrap-hack`)}return W(e,`renderLine`,e,t.line,r.pre),r.pre.className&&(r.textClass=N(r.pre.className,r.textClass||``)),r}function Cn(e){var t=k(`span`,`•`,`cm-invalidchar`);return t.title=`\\u`+e.charCodeAt(0).toString(16),t.setAttribute(`aria-label`,t.title),t}function wn(e,t,n,r,i,a,c){if(t){var l=e.splitSpaces?Tn(t,e.trailingSpace):t,u=e.cm.state.specialChars,d=!1,f;if(!u.test(t))e.col+=t.length,f=document.createTextNode(l),e.map.push(e.pos,e.pos+t.length,f),o&&s<9&&(d=!0),e.pos+=t.length;else{f=document.createDocumentFragment();for(var p=0;;){u.lastIndex=p;var m=u.exec(t),h=m?m.index-p:t.length-p;if(h){var g=document.createTextNode(l.slice(p,p+h));o&&s<9?f.appendChild(k(`span`,[g])):f.appendChild(g),e.map.push(e.pos,e.pos+h,g),e.col+=h,e.pos+=h}if(!m)break;p+=h+1;var _=void 0;if(m[0]==` `){var v=e.cm.options.tabSize,y=v-e.col%v;_=f.appendChild(k(`span`,fe(y),`cm-tab`)),_.setAttribute(`role`,`presentation`),_.setAttribute(`cm-text`,` `),e.col+=y}else m[0]==`\r`||m[0]==`
|
|
5
|
+
`?(_=f.appendChild(k(`span`,m[0]==`\r`?`␍`:``,`cm-invalidchar`)),_.setAttribute(`cm-text`,m[0]),e.col+=1):(_=e.cm.options.specialCharPlaceholder(m[0]),_.setAttribute(`cm-text`,m[0]),o&&s<9?f.appendChild(k(`span`,[_])):f.appendChild(_),e.col+=1);e.map.push(e.pos,e.pos+1,_),e.pos++}}if(e.trailingSpace=l.charCodeAt(t.length-1)==32,n||r||i||d||a||c){var b=n||``;r&&(b+=r),i&&(b+=i);var x=k(`span`,[f],b,a);if(c)for(var S in c)c.hasOwnProperty(S)&&S!=`style`&&S!=`class`&&x.setAttribute(S,c[S]);return e.content.appendChild(x)}e.content.appendChild(f)}}function Tn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r=``,i=0;i<e.length;i++){var a=e.charAt(i);a==` `&&n&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(a=`\xA0`),r+=a,n=a==` `}return r}function En(e,t){return function(n,r,i,a,o,s,c){i=i?i+` cm-force-border`:`cm-force-border`;for(var l=n.pos,u=l+r.length;;){for(var d=void 0,f=0;f<t.length&&(d=t[f],!(d.to>l&&d.from<=l));f++);if(d.to>=u)return e(n,r,i,a,o,s,c);e(n,r.slice(0,d.to-l),i,a,null,s,c),a=null,r=r.slice(d.to-l),l=d.to}}}function Dn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||=e.content.appendChild(document.createElement(`span`)),i.setAttribute(`cm-marker`,n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function On(e,t,n){var r=e.markedSpans,i=e.text,a=0;if(!r){for(var o=1;o<n.length;o+=2)t.addToken(t,i.slice(a,a=n[o]),xn(n[o+1],t.cm.options));return}for(var s=i.length,c=0,l=1,u=``,d,f,p=0,m,h,g,_,v;;){if(p==c){m=h=g=f=``,v=null,_=null,p=1/0;for(var y=[],b=void 0,x=0;x<r.length;++x){var S=r[x],C=S.marker;if(C.type==`bookmark`&&S.from==c&&C.widgetNode)y.push(C);else if(S.from<=c&&(S.to==null||S.to>c||C.collapsed&&S.to==c&&S.from==c)){if(S.to!=null&&S.to!=c&&p>S.to&&(p=S.to,h=``),C.className&&(m+=` `+C.className),C.css&&(f=(f?f+`;`:``)+C.css),C.startStyle&&S.from==c&&(g+=` `+C.startStyle),C.endStyle&&S.to==p&&(b||=[]).push(C.endStyle,S.to),C.title&&((v||={}).title=C.title),C.attributes)for(var w in C.attributes)(v||={})[w]=C.attributes[w];C.collapsed&&(!_||$t(_.marker,C)<0)&&(_=S)}else S.from>c&&p>S.from&&(p=S.from)}if(b)for(var T=0;T<b.length;T+=2)b[T+1]==p&&(h+=` `+b[T]);if(!_||_.from==c)for(var E=0;E<y.length;++E)Dn(t,0,y[E]);if(_&&(_.from||0)==c){if(Dn(t,(_.to==null?s+1:_.to)-c,_.marker,_.from==null),_.to==null)return;_.to==c&&(_=!1)}}if(c>=s)break;for(var D=Math.min(s,p);;){if(u){var O=c+u.length;if(!_){var k=O>D?u.slice(0,D-c):u;t.addToken(t,k,d?d+m:m,g,c+k.length==p?h:``,f,v)}if(O>=D){u=u.slice(D-c),c=D;break}c=O,g=``}u=i.slice(a,a=n[l++]),d=xn(n[l++],t.cm.options)}}}function kn(e,t,n){this.line=t,this.rest=cn(t),this.size=this.rest?q(V(this.rest))-n+1:1,this.node=this.text=null,this.hidden=dn(e,t)}function An(e,t,n){for(var r=[],i,a=t;a<n;a=i){var o=new kn(e.doc,K(e.doc,a),a);i=a+o.size,r.push(o)}return r}var jn=null;function Mn(e){jn?jn.ops.push(e):e.ownsGroup=jn={ops:[e],delayedCallbacks:[]}}function Nn(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}function Pn(e,t){var n=e.ownsGroup;if(n)try{Nn(n)}finally{jn=null,t(n)}}var Fn=null;function In(e,t){var n=Ae(e,t);if(n.length){var r=Array.prototype.slice.call(arguments,2),i;jn?i=jn.delayedCallbacks:Fn?i=Fn:(i=Fn=[],setTimeout(Ln,0));for(var a=function(e){i.push(function(){return n[e].apply(null,r)})},o=0;o<n.length;++o)a(o)}}function Ln(){var e=Fn;Fn=null;for(var t=0;t<e.length;++t)e[t]()}function Rn(e,t,n,r){for(var i=0;i<t.changes.length;i++){var a=t.changes[i];a==`text`?Hn(e,t):a==`gutter`?Wn(e,t,n,r):a==`class`?Un(e,t):a==`widget`&&Gn(e,t,r)}t.changes=null}function zn(e){return e.node==e.text&&(e.node=k(`div`,null,null,`position: relative`),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),o&&s<8&&(e.node.style.zIndex=2)),e.node}function Bn(e,t){var n=t.bgClass?t.bgClass+` `+(t.line.bgClass||``):t.line.bgClass;if(n&&(n+=` CodeMirror-linebackground`),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=zn(t);t.background=r.insertBefore(k(`div`,null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function Vn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Sn(e,t)}function Hn(e,t){var n=t.text.className,r=Vn(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,Un(e,t)):n&&(t.text.className=n)}function Un(e,t){Bn(e,t),t.line.wrapClass?zn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className=``);var n=t.textClass?t.textClass+` `+(t.line.textClass||``):t.line.textClass;t.text.className=n||``}function Wn(e,t,n,r){if(t.gutter&&=(t.node.removeChild(t.gutter),null),t.gutterBackground&&=(t.node.removeChild(t.gutterBackground),null),t.line.gutterClass){var i=zn(t);t.gutterBackground=k(`div`,null,`CodeMirror-gutter-background `+t.line.gutterClass,`left: `+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+`px; width: `+r.gutterTotalWidth+`px`),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var o=zn(t),s=t.gutter=k(`div`,null,`CodeMirror-gutter-wrapper`,`left: `+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+`px`);if(s.setAttribute(`aria-hidden`,`true`),e.display.input.setUneditable(s),o.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=` `+t.line.gutterClass),e.options.lineNumbers&&(!a||!a[`CodeMirror-linenumbers`])&&(t.lineNumber=s.appendChild(k(`div`,mt(e.options,n),`CodeMirror-linenumber CodeMirror-gutter-elt`,`left: `+r.gutterLeft[`CodeMirror-linenumbers`]+`px; width: `+e.display.lineNumInnerWidth+`px`))),a)for(var c=0;c<e.display.gutterSpecs.length;++c){var l=e.display.gutterSpecs[c].className,u=a.hasOwnProperty(l)&&a[l];u&&s.appendChild(k(`div`,[u],`CodeMirror-gutter-elt`,`left: `+r.gutterLeft[l]+`px; width: `+r.gutterWidth[l]+`px`))}}}function Gn(e,t,n){t.alignable&&=null;for(var r=T(`CodeMirror-linewidget`),i=t.node.firstChild,a=void 0;i;i=a)a=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);qn(e,t,n)}function Kn(e,t,n,r){var i=Vn(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Un(e,t),Wn(e,t,n,r),qn(e,t,r),t.node}function qn(e,t,n){if(Jn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)Jn(e,t.rest[r],t,n,!1)}function Jn(e,t,n,r,i){if(t.widgets)for(var a=zn(n),o=0,s=t.widgets;o<s.length;++o){var c=s[o],l=k(`div`,[c.node],`CodeMirror-linewidget`+(c.className?` `+c.className:``));c.handleMouseEvents||l.setAttribute(`cm-ignore-events`,`true`),Yn(c,l,n,r),e.display.input.setUneditable(l),i&&c.above?a.insertBefore(l,n.gutter||n.text):a.appendChild(l),In(c,`redraw`)}}function Yn(e,t,n,r){if(e.noHScroll){(n.alignable||=[]).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+`px`,e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+`px`),t.style.width=i+`px`}e.coverGutter&&(t.style.zIndex=5,t.style.position=`relative`,e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+`px`))}function Xn(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!M(document.body,e.node)){var n=`position: relative;`;e.coverGutter&&(n+=`margin-left: -`+t.display.gutters.offsetWidth+`px;`),e.noHScroll&&(n+=`width: `+t.display.wrapper.clientWidth+`px;`),O(t.display.measure,k(`div`,[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function Zn(e,t){for(var n=ze(t);n!=e.wrapper;n=n.parentNode)if(!n||n.nodeType==1&&n.getAttribute(`cm-ignore-events`)==`true`||n.parentNode==e.sizer&&n!=e.mover)return!0}function Qn(e){return e.lineSpace.offsetTop}function $n(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function er(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=O(e.measure,k(`pre`,`x`,`CodeMirror-line-like`)),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return!isNaN(r.left)&&!isNaN(r.right)&&(e.cachedPaddingH=r),r}function tr(e){return ae-e.display.nativeBarWidth}function nr(e){return e.display.scroller.clientWidth-tr(e)-e.display.barWidth}function rr(e){return e.display.scroller.clientHeight-tr(e)-e.display.barHeight}function ir(e,t,n){var r=e.options.lineWrapping,i=r&&nr(e);if(!t.measure.heights||r&&t.measure.width!=i){var a=t.measure.heights=[];if(r){t.measure.width=i;for(var o=t.text.firstChild.getClientRects(),s=0;s<o.length-1;s++){var c=o[s],l=o[s+1];Math.abs(c.bottom-l.bottom)>2&&a.push((c.bottom+l.top)/2-n.top)}}a.push(n.bottom-n.top)}}function ar(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(q(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function or(e,t){t=on(t);var n=q(t),r=e.display.externalMeasured=new kn(e.doc,t,n);r.lineN=n;var i=r.built=Sn(e,r);return r.text=i.pre,O(e.display.lineMeasure,i.pre),r}function sr(e,t,n,r){return ur(e,lr(e,t),n,r)}function cr(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Ur(e,t)];var n=e.display.externalMeasured;if(n&&t>=n.lineN&&t<n.lineN+n.size)return n}function lr(e,t){var n=q(t),r=cr(e,n);r&&!r.text?r=null:r&&r.changes&&(Rn(e,r,n,Rr(e)),e.curOp.forceUpdate=!0),r||=or(e,t);var i=ar(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function ur(e,t,n,r,i){t.before&&(n=-1);var a=n+(r||``),o;return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||=t.view.text.getBoundingClientRect(),t.hasHeights||=(ir(e,t.view,t.rect),!0),o=mr(e,t,n,r),o.bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var dr={left:0,right:0,top:0,bottom:0};function fr(e,t,n){for(var r,i,a,o,s,c,l=0;l<e.length;l+=3)if(s=e[l],c=e[l+1],t<s?(i=0,a=1,o=`left`):t<c?(i=t-s,a=i+1):(l==e.length-3||t==c&&e[l+3]>t)&&(a=c-s,i=a-1,t>=c&&(o=`right`)),i!=null){if(r=e[l+2],s==c&&n==(r.insertLeft?`left`:`right`)&&(o=n),n==`left`&&i==0)for(;l&&e[l-2]==e[l-3]&&e[l-1].insertLeft;)r=e[(l-=3)+2],o=`left`;if(n==`right`&&i==c-s)for(;l<e.length-3&&e[l+3]==e[l+4]&&!e[l+5].insertLeft;)r=e[(l+=3)+2],o=`right`;break}return{node:r,start:i,end:a,collapse:o,coverStart:s,coverEnd:c}}function pr(e,t){var n=dr;if(t==`left`)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;i>=0&&(n=e[i]).left==n.right;i--);return n}function mr(e,t,n,r){var i=fr(t.map,n,r),a=i.node,c=i.start,l=i.end,u=i.collapse,d;if(a.nodeType==3){for(var f=0;f<4;f++){for(;c&&Se(t.line.text.charAt(i.coverStart+c));)--c;for(;i.coverStart+l<i.coverEnd&&Se(t.line.text.charAt(i.coverStart+l));)++l;if(d=o&&s<9&&c==0&&l==i.coverEnd-i.coverStart?a.parentNode.getBoundingClientRect():pr(j(a,c,l).getClientRects(),r),d.left||d.right||c==0)break;l=c,--c,u=`right`}o&&s<11&&(d=hr(e.display.measure,d))}else{c>0&&(u=r=`right`);var p;d=e.options.lineWrapping&&(p=a.getClientRects()).length>1?p[r==`right`?p.length-1:0]:a.getBoundingClientRect()}if(o&&s<9&&!c&&(!d||!d.left&&!d.right)){var m=a.parentNode.getClientRects()[0];d=m?{left:m.left,right:m.left+Lr(e.display),top:m.top,bottom:m.bottom}:dr}for(var h=d.top-t.rect.top,g=d.bottom-t.rect.top,_=(h+g)/2,v=t.view.measure.heights,y=0;y<v.length-1&&!(_<v[y]);y++);var b=y?v[y-1]:0,x=v[y],S={left:(u==`right`?d.right:d.left)-t.rect.left,right:(u==`left`?d.left:d.right)-t.rect.left,top:b,bottom:x};return!d.left&&!d.right&&(S.bogus=!0),e.options.singleCursorHeightPerLine||(S.rtop=h,S.rbottom=g),S}function hr(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Xe(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}function gr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function _r(e){e.display.externalMeasure=null,D(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)gr(e.display.view[t])}function vr(e){_r(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function yr(e){return u&&_?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function br(e){return u&&_?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function xr(e){var t=on(e).widgets,n=0;if(t)for(var r=0;r<t.length;++r)t[r].above&&(n+=Xn(t[r]));return n}function Sr(e,t,n,r,i){if(!i){var a=xr(t);n.top+=a,n.bottom+=a}if(r==`line`)return n;r||=`local`;var o=pn(t);if(r==`local`?o+=Qn(e.display):o-=e.display.viewOffset,r==`page`||r==`window`){var s=e.display.lineSpace.getBoundingClientRect();o+=s.top+(r==`window`?0:br(P(e)));var c=s.left+(r==`window`?0:yr(P(e)));n.left+=c,n.right+=c}return n.top+=o,n.bottom+=o,n}function Cr(e,t,n){if(n==`div`)return t;var r=t.left,i=t.top;if(n==`page`)r-=yr(P(e)),i-=br(P(e));else if(n==`local`||!n){var a=e.display.sizer.getBoundingClientRect();r+=a.left,i+=a.top}var o=e.display.lineSpace.getBoundingClientRect();return{left:r-o.left,top:i-o.top}}function wr(e,t,n,r,i){return r||=K(e.doc,t.line),Sr(e,r,sr(e,r,t.ch,i),n)}function Tr(e,t,n,r,i,a){r||=K(e.doc,t.line),i||=lr(e,r);function o(t,o){var s=ur(e,i,t,o?`right`:`left`,a);return o?s.left=s.right:s.right=s.left,Sr(e,r,s,n)}var s=H(r,e.doc.direction),c=t.ch,l=t.sticky;if(c>=r.text.length?(c=r.text.length,l=`before`):c<=0&&(c=0,l=`after`),!s)return o(l==`before`?c-1:c,l==`before`);function u(e,t,n){var r=s[t].level==1;return o(n?e-1:e,r!=n)}var d=De(s,c,l),f=Ee,p=u(c,d,l==`before`);return f!=null&&(p.other=u(c,f,l!=`before`)),p}function Er(e,t){var n=0;t=X(e.doc,t),e.options.lineWrapping||(n=Lr(e.display)*t.ch);var r=K(e.doc,t.line),i=pn(r)+Qn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Dr(e,t,n,r,i){var a=J(e,t,n);return a.xRel=i,r&&(a.outside=r),a}function Or(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return Dr(r.first,0,null,-1,-1);var i=ft(r,n),a=r.first+r.size-1;if(i>a)return Dr(r.first+r.size-1,K(r,a).text.length,null,1,1);t<0&&(t=0);for(var o=K(r,i);;){var s=Mr(e,o,i,t,n),c=rn(o,s.ch+ +(s.xRel>0||s.outside>0));if(!c)return s;var l=c.find(1);if(l.line==i)return l;o=K(r,i=l.line)}}function kr(e,t,n,r){r-=xr(t);var i=t.text.length,a=we(function(t){return ur(e,n,t-1).bottom<=r},i,0);return i=we(function(t){return ur(e,n,t).top>r},a,i),{begin:a,end:i}}function Ar(e,t,n,r){n||=lr(e,t);var i=Sr(e,t,ur(e,n,r),`line`).top;return kr(e,t,n,i)}function jr(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function Mr(e,t,n,r,i){i-=pn(t);var a=lr(e,t),o=xr(t),s=0,c=t.text.length,l=!0,u=H(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?Pr:Nr)(e,t,n,a,u,r,i);l=d.level!=1,s=l?d.from:d.to-1,c=l?d.to:d.from-1}var f=null,p=null,m=we(function(t){var n=ur(e,a,t);return n.top+=o,n.bottom+=o,jr(n,r,i,!1)?(n.top<=i&&n.left<=r&&(f=t,p=n),!0):!1},s,c),h,g,_=!1;if(p){var v=r-p.left<p.right-r,y=v==l;m=f+ +!y,g=y?`after`:`before`,h=v?p.left:p.right}else{!l&&(m==c||m==s)&&m++,g=m==0?`after`:m==t.text.length?`before`:ur(e,a,m-+!!l).bottom+o<=i==l?`after`:`before`;var b=Tr(e,J(n,m,g),`line`,t,a);h=b.left,_=i<b.top?-1:+(i>=b.bottom)}return m=Ce(t.text,m,1),Dr(n,m,g,_,r-h)}function Nr(e,t,n,r,i,a,o){var s=we(function(s){var c=i[s],l=c.level!=1;return jr(Tr(e,J(n,l?c.to:c.from,l?`before`:`after`),`line`,t,r),a,o,!0)},0,i.length-1),c=i[s];if(s>0){var l=c.level!=1,u=Tr(e,J(n,l?c.from:c.to,l?`after`:`before`),`line`,t,r);jr(u,a,o,!0)&&u.top>o&&(c=i[s-1])}return c}function Pr(e,t,n,r,i,a,o){var s=kr(e,t,r,o),c=s.begin,l=s.end;/\s/.test(t.text.charAt(l-1))&&l--;for(var u=null,d=null,f=0;f<i.length;f++){var p=i[f];if(!(p.from>=l||p.to<=c)){var m=ur(e,r,p.level==1?Math.max(c,p.from):Math.min(l,p.to)-1).right,h=m<a?a-m+1e9:m-a;(!u||d>h)&&(u=p,d=h)}}return u||=i[i.length-1],u.from<c&&(u={from:c,to:u.to,level:u.level}),u.to>l&&(u={from:u.from,to:l,level:u.level}),u}var Fr;function Ir(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Fr==null){Fr=k(`pre`,null,`CodeMirror-line-like`);for(var t=0;t<49;++t)Fr.appendChild(document.createTextNode(`x`)),Fr.appendChild(k(`br`));Fr.appendChild(document.createTextNode(`x`))}O(e.measure,Fr);var n=Fr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),D(e.measure),n||1}function Lr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=k(`span`,`xxxxxxxxxx`),n=k(`pre`,[t],`CodeMirror-line-like`);O(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Rr(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,a=t.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var s=e.display.gutterSpecs[o].className;n[s]=a.offsetLeft+a.clientLeft+i,r[s]=a.clientWidth}return{fixedPos:zr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function zr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Br(e){var t=Ir(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Lr(e.display)-3);return function(i){if(dn(e.doc,i))return 0;var a=0;if(i.widgets)for(var o=0;o<i.widgets.length;o++)i.widgets[o].height&&(a+=i.widgets[o].height);return n?a+(Math.ceil(i.text.length/r)||1)*t:a+t}}function Vr(e){var t=e.doc,n=Br(e);t.iter(function(e){var t=n(e);t!=e.height&&dt(e,t)})}function Hr(e,t,n,r){var i=e.display;if(!n&&ze(t).getAttribute(`cm-not-content`)==`true`)return null;var a,o,s=i.lineSpace.getBoundingClientRect();try{a=t.clientX-s.left,o=t.clientY-s.top}catch{return null}var c=Or(e,a,o),l;if(r&&c.xRel>0&&(l=K(e.doc,c.line).text).length==c.ch){var u=z(l,l.length,e.options.tabSize)-l.length;c=J(c.line,Math.max(0,Math.round((a-er(e.display).left)/Lr(e.display))-u))}return c}function Ur(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var n=e.display.view,r=0;r<n.length;r++)if(t-=n[r].size,t<0)return r}function Wr(e,t,n,r){t??=e.doc.first,n??=e.doc.first+e.doc.size,r||=0;var i=e.display;if(r&&n<i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Lt&&ln(e.doc,t)<i.viewTo&&Kr(e);else if(n<=i.viewFrom)Lt&&un(e.doc,n+r)>i.viewFrom?Kr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Kr(e);else if(t<=i.viewFrom){var a=qr(e,n,n+r,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=r):Kr(e)}else if(n>=i.viewTo){var o=qr(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):Kr(e)}else{var s=qr(e,t,t,-1),c=qr(e,n,n+r,1);s&&c?(i.view=i.view.slice(0,s.index).concat(An(e,s.lineN,c.lineN)).concat(i.view.slice(c.index)),i.viewTo+=r):Kr(e)}var l=i.externalMeasured;l&&(n<l.lineN?l.lineN+=r:t<l.lineN+l.size&&(i.externalMeasured=null))}function Gr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var a=r.view[Ur(e,t)];if(a.node!=null){var o=a.changes||=[];B(o,n)==-1&&o.push(n)}}}function Kr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function qr(e,t,n,r){var i=Ur(e,t),a,o=e.display.view;if(!Lt||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var s=e.display.viewFrom,c=0;c<i;c++)s+=o[c].size;if(s!=t){if(r>0){if(i==o.length-1)return null;a=s+o[i].size-t,i++}else a=s-t;t+=a,n+=a}for(;ln(e.doc,n)!=n;){if(i==(r<0?0:o.length-1))return null;n+=r*o[i-+(r<0)].size,i+=r}return{index:i,lineN:n}}function Jr(e,t,n){var r=e.display;r.view.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=An(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=An(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Ur(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(An(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,Ur(e,n)))),r.viewTo=n}function Yr(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];!i.hidden&&(!i.node||i.changes)&&++n}return n}function Xr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Zr(e,t){t===void 0&&(t=!0);var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),a=r.selection=document.createDocumentFragment(),o=e.options.$customCursor;o&&(t=!0);for(var s=0;s<n.sel.ranges.length;s++)if(!(!t&&s==n.sel.primIndex)){var c=n.sel.ranges[s];if(!(c.from().line>=e.display.viewTo||c.to().line<e.display.viewFrom)){var l=c.empty();if(o){var u=o(e,c);u&&Qr(e,u,i)}else(l||e.options.showCursorWhenSelecting)&&Qr(e,c.head,i);l||ei(e,c,a)}}return r}function Qr(e,t,n){var r=Tr(e,t,`div`,null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(k(`div`,`\xA0`,`CodeMirror-cursor`));if(i.style.left=r.left+`px`,i.style.top=r.top+`px`,i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+`px`,/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var a=wr(e,t,`div`,null,null),o=a.right-a.left;i.style.width=(o>0?o:e.defaultCharWidth())+`px`}if(r.other){var s=n.appendChild(k(`div`,`\xA0`,`CodeMirror-cursor CodeMirror-secondarycursor`));s.style.display=``,s.style.left=r.other.left+`px`,s.style.top=r.other.top+`px`,s.style.height=(r.other.bottom-r.other.top)*.85+`px`}}function $r(e,t){return e.top-t.top||e.left-t.left}function ei(e,t,n){var r=e.display,i=e.doc,a=document.createDocumentFragment(),o=er(e.display),s=o.left,c=Math.max(r.sizerWidth,nr(e)-r.sizer.offsetLeft)-o.right,l=i.direction==`ltr`;function u(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),a.appendChild(k(`div`,null,`CodeMirror-selected`,`position: absolute; left: `+e+`px;
|
|
6
|
+
top: `+t+`px; width: `+(n??c-e)+`px;
|
|
7
|
+
height: `+(r-t)+`px`))}function d(t,n,r){var a=K(i,t),o=a.text.length,d,f;function p(n,r){return wr(e,J(t,n),`div`,a,r)}function m(t,n,r){var i=Ar(e,a,null,t),o=n==`ltr`==(r==`after`)?`left`:`right`;return p(r==`after`?i.begin:i.end-(/\s/.test(a.text.charAt(i.end-1))?2:1),o)[o]}var h=H(a,i.direction);return Te(h,n||0,r??o,function(e,t,i,a){var g=i==`ltr`,_=p(e,g?`left`:`right`),v=p(t-1,g?`right`:`left`),y=n==null&&e==0,b=r==null&&t==o,x=a==0,S=!h||a==h.length-1;if(v.top-_.top<=3){var C=(l?y:b)&&x,w=(l?b:y)&&S,T=C?s:(g?_:v).left,E=w?c:(g?v:_).right;u(T,_.top,E-T,_.bottom)}else{var D,O,k,A;g?(D=l&&y&&x?s:_.left,O=l?c:m(e,i,`before`),k=l?s:m(t,i,`after`),A=l&&b&&S?c:v.right):(D=l?m(e,i,`before`):s,O=!l&&y&&x?c:_.right,k=!l&&b&&S?s:v.left,A=l?m(t,i,`after`):c),u(D,_.top,O-D,_.bottom),_.bottom<v.top&&u(s,_.bottom,null,v.top),u(k,v.top,A-k,v.bottom)}(!d||$r(_,d)<0)&&(d=_),$r(v,d)<0&&(d=v),(!f||$r(_,f)<0)&&(f=_),$r(v,f)<0&&(f=v)}),{start:d,end:f}}var f=t.from(),p=t.to();if(f.line==p.line)d(f.line,f.ch,p.ch);else{var m=K(i,f.line),h=K(i,p.line),g=on(m)==on(h),_=d(f.line,f.ch,g?m.text.length+1:null).end,v=d(p.line,g?0:null,p.ch).start;g&&(_.top<v.top-2?(u(_.right,_.top,null,_.bottom),u(s,v.top,v.left,v.bottom)):u(_.right,_.top,v.left-_.right,_.bottom)),_.bottom<v.top&&u(s,_.bottom,null,v.top)}n.appendChild(a)}function ti(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility=``,e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||ai(e),t.cursorDiv.style.visibility=(n=!n)?``:`hidden`},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility=`hidden`)}}function ni(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||ii(e))}function ri(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&ai(e))},100)}function ii(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!=`nocursor`&&(e.state.focused||(W(e,`focus`,e,t),e.state.focused=!0,te(e.display.wrapper,`CodeMirror-focused`),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),c&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),ti(e))}function ai(e,t){e.state.delayingBlurEvent||(e.state.focused&&(W(e,`blur`,e,t),e.state.focused=!1,E(e.display.wrapper,`CodeMirror-focused`)),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function oi(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,a=0,c=0;c<t.view.length;c++){var l=t.view[c],u=e.options.lineWrapping,d=void 0,f=0;if(!l.hidden){if(i+=l.line.height,o&&s<8){var p=l.node.offsetTop+l.node.offsetHeight;d=p-n,n=p}else{var m=l.node.getBoundingClientRect();d=m.bottom-m.top,!u&&l.text.firstChild&&(f=l.text.firstChild.getBoundingClientRect().right-m.left-1)}var h=l.line.height-d;if((h>.005||h<-.005)&&(i<r&&(a-=h),dt(l.line,d),si(l.line),l.rest))for(var g=0;g<l.rest.length;g++)si(l.rest[g]);if(f>e.display.sizerWidth){var _=Math.ceil(f/Lr(e.display));_>e.display.maxLineLength&&(e.display.maxLineLength=_,e.display.maxLine=l.line,e.display.maxLineChanged=!0)}}}Math.abs(a)>2&&(t.scroller.scrollTop+=a)}function si(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function ci(e,t,n){var r=n&&n.top!=null?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Qn(e));var i=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,a=ft(t,r),o=ft(t,i);if(n&&n.ensure){var s=n.ensure.from.line,c=n.ensure.to.line;s<a?(a=s,o=ft(t,pn(K(t,s))+e.wrapper.clientHeight)):Math.min(c,t.lastLine())>=o&&(a=ft(t,pn(K(t,c))-e.wrapper.clientHeight),o=c)}return{from:a,to:Math.max(o,a+1)}}function li(e,t){if(!G(e,`scrollCursorIntoView`)){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,a=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(a.defaultView.innerHeight||a.documentElement.clientHeight)&&(i=!1),i!=null&&!h){var o=k(`div`,``,null,`position: absolute;
|
|
8
|
+
top: `+(t.top-n.viewOffset-Qn(e.display))+`px;
|
|
9
|
+
height: `+(t.bottom-t.top+tr(e)+n.barHeight)+`px;
|
|
10
|
+
left: `+t.left+`px; width: `+Math.max(2,t.right-t.left)+`px;`);e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function ui(e,t,n,r){r??=0;var i;!e.options.lineWrapping&&t==n&&(n=t.sticky==`before`?J(t.line,t.ch+1,`before`):t,t=t.ch?J(t.line,t.sticky==`before`?t.ch-1:t.ch,`after`):t);for(var a=0;a<5;a++){var o=!1,s=Tr(e,t),c=!n||n==t?s:Tr(e,n);i={left:Math.min(s.left,c.left),top:Math.min(s.top,c.top)-r,right:Math.max(s.left,c.left),bottom:Math.max(s.bottom,c.bottom)+r};var l=fi(e,i),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(l.scrollTop!=null&&(yi(e,l.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(o=!0)),l.scrollLeft!=null&&(xi(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(o=!0)),!o)break}return i}function di(e,t){var n=fi(e,t);n.scrollTop!=null&&yi(e,n.scrollTop),n.scrollLeft!=null&&xi(e,n.scrollLeft)}function fi(e,t){var n=e.display,r=Ir(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,a=rr(e),o={};t.bottom-t.top>a&&(t.bottom=t.top+a);var s=e.doc.height+$n(n),c=t.top<r,l=t.bottom>s-r;if(t.top<i)o.scrollTop=c?0:t.top;else if(t.bottom>i+a){var u=Math.min(t.top,(l?s:t.bottom)-a);u!=i&&(o.scrollTop=u)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,f=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-d,p=nr(e)-n.gutters.offsetWidth,m=t.right-t.left>p;return m&&(t.right=t.left+p),t.left<10?o.scrollLeft=0:t.left<f?o.scrollLeft=Math.max(0,t.left+d-(m?0:10)):t.right>p+f-3&&(o.scrollLeft=t.right+(m?0:10)-p),o}function pi(e,t){t!=null&&(_i(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function mi(e){_i(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function hi(e,t,n){(t!=null||n!=null)&&_i(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function gi(e,t){_i(e),e.curOp.scrollToPos=t}function _i(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,vi(e,Er(e,t.from),Er(e,t.to),t.margin))}function vi(e,t,n,r){var i=fi(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});hi(e,i.scrollLeft,i.scrollTop)}function yi(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||Xi(e,{top:t}),bi(e,t,!0),n&&Xi(e),Hi(e,100))}function bi(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function xi(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,ea(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Si(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+$n(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+tr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Ci=function(e,t,n){this.cm=n;var r=this.vert=k(`div`,[k(`div`,null,null,`min-width: 1px`)],`CodeMirror-vscrollbar`),i=this.horiz=k(`div`,[k(`div`,null,null,`height: 100%; min-height: 1px`)],`CodeMirror-hscrollbar`);r.tabIndex=i.tabIndex=-1,e(r),e(i),U(r,`scroll`,function(){r.clientHeight&&t(r.scrollTop,`vertical`)}),U(i,`scroll`,function(){i.clientWidth&&t(i.scrollLeft,`horizontal`)}),this.checkedZeroWidth=!1,o&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth=`18px`)};Ci.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display=`block`,this.vert.style.bottom=t?r+`px`:`0`;var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+`px`}else this.vert.scrollTop=0,this.vert.style.display=``,this.vert.firstChild.style.height=`0`;if(t){this.horiz.style.display=`block`,this.horiz.style.right=n?r+`px`:`0`,this.horiz.style.left=e.barLeft+`px`;var a=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+`px`}else this.horiz.style.display=``,this.horiz.firstChild.style.width=`0`;return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Ci.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,`horiz`)},Ci.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,`vert`)},Ci.prototype.zeroWidthHack=function(){var e=y&&!m?`12px`:`18px`;this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility=`hidden`,this.disableHoriz=new ie,this.disableVert=new ie},Ci.prototype.enableZeroWidthBar=function(e,t,n){e.style.visibility=``;function r(){var i=e.getBoundingClientRect();(n==`vert`?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))==e?t.set(1e3,r):e.style.visibility=`hidden`}t.set(1e3,r)},Ci.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var wi=function(){};wi.prototype.update=function(){return{bottom:0,right:0}},wi.prototype.setScrollLeft=function(){},wi.prototype.setScrollTop=function(){},wi.prototype.clear=function(){};function Ti(e,t){t||=Si(e);var n=e.display.barWidth,r=e.display.barHeight;Ei(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&oi(e),Ei(e,Si(e)),n=e.display.barWidth,r=e.display.barHeight}function Ei(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+`px`,n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+`px`,n.heightForcer.style.borderBottom=r.bottom+`px solid transparent`,r.right&&r.bottom?(n.scrollbarFiller.style.display=`block`,n.scrollbarFiller.style.height=r.bottom+`px`,n.scrollbarFiller.style.width=r.right+`px`):n.scrollbarFiller.style.display=``,r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display=`block`,n.gutterFiller.style.height=r.bottom+`px`,n.gutterFiller.style.width=t.gutterWidth+`px`):n.gutterFiller.style.display=``}var Di={native:Ci,null:wi};function Oi(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&E(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Di[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),U(t,`mousedown`,function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute(`cm-not-content`,`true`)},function(t,n){n==`horizontal`?xi(e,t):yi(e,t)},e),e.display.scrollbars.addClass&&te(e.display.wrapper,e.display.scrollbars.addClass)}var ki=0;function Ai(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++ki,markArrays:null},Mn(e.curOp)}function ji(e){var t=e.curOp;t&&Pn(t,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;Mi(e)})}function Mi(e){for(var t=e.ops,n=0;n<t.length;n++)Ni(t[n]);for(var r=0;r<t.length;r++)Pi(t[r]);for(var i=0;i<t.length;i++)Fi(t[i]);for(var a=0;a<t.length;a++)Ii(t[a]);for(var o=0;o<t.length;o++)Li(t[o])}function Ni(e){var t=e.cm,n=t.display;Gi(t),e.updateMaxLine&&hn(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Wi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Pi(e){e.updatedDisplay=e.mustUpdate&&Ji(e.cm,e.update)}function Fi(e){var t=e.cm,n=t.display;e.updatedDisplay&&oi(t),e.barMeasure=Si(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=sr(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+tr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-nr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Ii(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+`px`,e.maxScrollLeft<t.doc.scrollLeft&&xi(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==ee(re(t));e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Ti(t,e.barMeasure),e.updatedDisplay&&$i(t,e.barMeasure),e.selectionChanged&&ti(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&ni(e.cm)}function Li(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&Yi(t,e.update),n.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(n.wheelStartX=n.wheelStartY=null),e.scrollTop!=null&&bi(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&xi(t,e.scrollLeft,!0,!0),e.scrollToPos&&li(t,ui(t,X(r,e.scrollToPos.from),X(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(i)for(var o=0;o<i.length;++o)i[o].lines.length||W(i[o],`hide`);if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&W(a[s],`unhide`);n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&W(t,`changes`,t,e.changeObjs),e.update&&e.update.finish()}function Ri(e,t){if(e.curOp)return t();Ai(e);try{return t()}finally{ji(e)}}function zi(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Ai(e);try{return t.apply(e,arguments)}finally{ji(e)}}}function Bi(e){return function(){if(this.curOp)return e.apply(this,arguments);Ai(this);try{return e.apply(this,arguments)}finally{ji(this)}}}function Vi(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Ai(t);try{return e.apply(this,arguments)}finally{ji(t)}}}function Hi(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,L(Ui,e))}function Ui(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=Et(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(a){if(r.line>=e.display.viewFrom){var o=a.styles,s=a.text.length>e.options.maxHighlightLength?at(t.mode,r.state):null,c=wt(e,a,r,!0);s&&(r.state=s),a.styles=c.styles;var l=a.styleClasses,u=c.classes;u?a.styleClasses=u:l&&(a.styleClasses=null);for(var d=!o||o.length!=a.styles.length||l!=u&&(!l||!u||l.bgClass!=u.bgClass||l.textClass!=u.textClass),f=0;!d&&f<o.length;++f)d=o[f]!=a.styles[f];d&&i.push(r.line),a.stateAfter=r.save(),r.nextLine()}else a.text.length<=e.options.maxHighlightLength&&Dt(e,a.text,r),a.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return Hi(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Ri(e,function(){for(var t=0;t<i.length;t++)Gr(e,i[t],`text`)})}}var Wi=function(e,t,n){var r=e.display;this.viewport=t,this.visible=ci(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=nr(e),this.force=n,this.dims=Rr(e),this.events=[]};Wi.prototype.signal=function(e,t){Ne(e,t)&&this.events.push(arguments)},Wi.prototype.finish=function(){for(var e=0;e<this.events.length;e++)W.apply(null,this.events[e])};function Gi(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=tr(e)+`px`,t.sizer.style.marginBottom=-t.nativeBarWidth+`px`,t.sizer.style.borderRightWidth=tr(e)+`px`,t.scrollbarsClipped=!0)}function Ki(e){if(e.hasFocus())return null;var t=ee(re(e));if(!t||!M(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=I(e).getSelection();r.anchorNode&&r.extend&&M(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function qi(e){if(!(!e||!e.activeElt||e.activeElt==ee(F(e.activeElt)))&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&M(document.body,e.anchorNode)&&M(document.body,e.focusNode))){var t=e.activeElt.ownerDocument,n=t.defaultView.getSelection(),r=t.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),n.removeAllRanges(),n.addRange(r),n.extend(e.focusNode,e.focusOffset)}}function Ji(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return Kr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&Yr(e)==0)return!1;ta(e)&&(Kr(e),t.dims=Rr(e));var i=r.first+r.size,a=Math.max(t.visible.from-e.options.viewportMargin,r.first),o=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<a&&a-n.viewFrom<20&&(a=Math.max(r.first,n.viewFrom)),n.viewTo>o&&n.viewTo-o<20&&(o=Math.min(i,n.viewTo)),Lt&&(a=ln(e.doc,a),o=un(e.doc,o));var s=a!=n.viewFrom||o!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Jr(e,a,o),n.viewOffset=pn(K(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+`px`;var c=Yr(e);if(!s&&c==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var l=Ki(e);return c>4&&(n.lineDiv.style.display=`none`),Zi(e,n.updateLineNumbers,t.dims),c>4&&(n.lineDiv.style.display=``),n.renderedView=n.view,qi(l),D(n.cursorDiv),D(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Hi(e,400)),n.updateLineNumbers=null,!0}function Yi(e,t){for(var n=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==nr(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+$n(e.display)-rr(e),n.top)}),t.visible=ci(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=ci(e.display,e.doc,n));if(!Ji(e,t))break;oi(e);var i=Si(e);Xr(e),Ti(e,i),$i(e,i),t.force=!1}t.signal(e,`update`,e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,`viewportChange`,e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Xi(e,t){var n=new Wi(e,t);if(Ji(e,n)){oi(e),Yi(e,n);var r=Si(e);Xr(e),Ti(e,r),$i(e,r),n.finish()}}function Zi(e,t,n){var r=e.display,i=e.options.lineNumbers,a=r.lineDiv,o=a.firstChild;function s(t){var n=t.nextSibling;return c&&y&&e.display.currentWheelTarget==t?t.style.display=`none`:t.parentNode.removeChild(t),n}for(var l=r.view,u=r.viewFrom,d=0;d<l.length;d++){var f=l[d];if(!f.hidden)if(!f.node||f.node.parentNode!=a){var p=Kn(e,f,u,n);a.insertBefore(p,o)}else{for(;o!=f.node;)o=s(o);var m=i&&t!=null&&t<=u&&f.lineNumber;f.changes&&(B(f.changes,`gutter`)>-1&&(m=!1),Rn(e,f,u,n)),m&&(D(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(mt(e.options,u)))),o=f.node.nextSibling}u+=f.size}for(;o;)o=s(o)}function Qi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+`px`,In(e,`gutterChanged`,e)}function $i(e,t){e.display.sizer.style.minHeight=t.docHeight+`px`,e.display.heightForcer.style.top=t.docHeight+`px`,e.display.gutters.style.height=t.docHeight+e.display.barHeight+tr(e)+`px`}function ea(e){var t=e.display,n=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=zr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,a=r+`px`,o=0;o<n.length;o++)if(!n[o].hidden){e.options.fixedGutter&&(n[o].gutter&&(n[o].gutter.style.left=a),n[o].gutterBackground&&(n[o].gutterBackground.style.left=a));var s=n[o].alignable;if(s)for(var c=0;c<s.length;c++)s[c].style.left=a}e.options.fixedGutter&&(t.gutters.style.left=r+i+`px`)}}function ta(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=mt(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(k(`div`,[k(`div`,n)],`CodeMirror-linenumber CodeMirror-gutter-elt`)),a=i.firstChild.offsetWidth,o=i.offsetWidth-a;return r.lineGutter.style.width=``,r.lineNumInnerWidth=Math.max(a,r.lineGutter.offsetWidth-o)+1,r.lineNumWidth=r.lineNumInnerWidth+o,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+`px`,Qi(e.display),!0}return!1}function na(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var a=e[i],o=null;if(typeof a!=`string`&&(o=a.style,a=a.className),a==`CodeMirror-linenumbers`)if(t)r=!0;else continue;n.push({className:a,style:o})}return t&&!r&&n.push({className:`CodeMirror-linenumbers`,style:null}),n}function ra(e){var t=e.gutters,n=e.gutterSpecs;D(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],a=i.className,o=i.style,s=t.appendChild(k(`div`,null,`CodeMirror-gutter `+a));o&&(s.style.cssText=o),a==`CodeMirror-linenumbers`&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+`px`)}t.style.display=n.length?``:`none`,Qi(e)}function ia(e){ra(e.display),Wr(e),ea(e)}function aa(e,t,r,i){var a=this;this.input=r,a.scrollbarFiller=k(`div`,null,`CodeMirror-scrollbar-filler`),a.scrollbarFiller.setAttribute(`cm-not-content`,`true`),a.gutterFiller=k(`div`,null,`CodeMirror-gutter-filler`),a.gutterFiller.setAttribute(`cm-not-content`,`true`),a.lineDiv=A(`div`,null,`CodeMirror-code`),a.selectionDiv=k(`div`,null,null,`position: relative; z-index: 1`),a.cursorDiv=k(`div`,null,`CodeMirror-cursors`),a.measure=k(`div`,null,`CodeMirror-measure`),a.lineMeasure=k(`div`,null,`CodeMirror-measure`),a.lineSpace=A(`div`,[a.measure,a.lineMeasure,a.selectionDiv,a.cursorDiv,a.lineDiv],null,`position: relative; outline: none`),a.mover=k(`div`,[A(`div`,[a.lineSpace],`CodeMirror-lines`)],null,`position: relative`),a.sizer=k(`div`,[a.mover],`CodeMirror-sizer`),a.sizerWidth=null,a.heightForcer=k(`div`,null,null,`position: absolute; height: `+ae+`px; width: 1px;`),a.gutters=k(`div`,null,`CodeMirror-gutters`),a.lineGutter=null,a.scroller=k(`div`,[a.sizer,a.heightForcer,a.gutters],`CodeMirror-scroll`),a.scroller.setAttribute(`tabIndex`,`-1`),a.wrapper=k(`div`,[a.scrollbarFiller,a.gutterFiller,a.scroller],`CodeMirror`),u&&d>=105&&(a.wrapper.style.clipPath=`inset(0px)`),a.wrapper.setAttribute(`translate`,`no`),o&&s<8&&(a.gutters.style.zIndex=-1,a.scroller.style.paddingRight=0),!c&&!(n&&v)&&(a.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(a.wrapper):e(a.wrapper)),a.viewFrom=a.viewTo=t.first,a.reportedViewFrom=a.reportedViewTo=t.first,a.view=[],a.renderedView=null,a.externalMeasured=null,a.viewOffset=0,a.lastWrapHeight=a.lastWrapWidth=0,a.updateLineNumbers=null,a.nativeBarWidth=a.barHeight=a.barWidth=0,a.scrollbarsClipped=!1,a.lineNumWidth=a.lineNumInnerWidth=a.lineNumChars=null,a.alignWidgets=!1,a.cachedCharWidth=a.cachedTextHeight=a.cachedPaddingH=null,a.maxLine=null,a.maxLineLength=0,a.maxLineChanged=!1,a.wheelDX=a.wheelDY=a.wheelStartX=a.wheelStartY=null,a.shift=!1,a.selForContextMenu=null,a.activeTouch=null,a.gutterSpecs=na(i.gutters,i.lineNumbers),ra(a),r.init(a)}var oa=0,sa=null;o?sa=-.53:n?sa=15:u?sa=-.7:p&&(sa=-1/3);function ca(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),n==null&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:n??=e.wheelDelta,{x:t,y:n}}function la(e){var t=ca(e);return t.x*=sa,t.y*=sa,t}function ua(e,t){u&&d==102&&(e.display.chromeScrollHack==null?e.display.sizer.style.pointerEvents=`none`:clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout(function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=``},100));var r=ca(t),i=r.x,a=r.y,o=sa;t.deltaMode===0&&(i=t.deltaX,a=t.deltaY,o=1);var s=e.display,l=s.scroller,p=l.scrollWidth>l.clientWidth,m=l.scrollHeight>l.clientHeight;if(i&&p||a&&m){if(a&&y&&c){outer:for(var h=t.target,g=s.view;h!=l;h=h.parentNode)for(var _=0;_<g.length;_++)if(g[_].node==h){e.display.currentWheelTarget=h;break outer}}if(i&&!n&&!f&&o!=null){a&&m&&yi(e,Math.max(0,l.scrollTop+a*o)),xi(e,Math.max(0,l.scrollLeft+i*o)),(!a||a&&m)&&Fe(t),s.wheelStartX=null;return}if(a&&o!=null){var v=a*o,b=e.doc.scrollTop,x=b+s.wrapper.clientHeight;v<0?b=Math.max(0,b+v-50):x=Math.min(e.doc.height,x+v+50),Xi(e,{top:b,bottom:x})}oa<20&&t.deltaMode!==0&&(s.wheelStartX==null?(s.wheelStartX=l.scrollLeft,s.wheelStartY=l.scrollTop,s.wheelDX=i,s.wheelDY=a,setTimeout(function(){if(s.wheelStartX!=null){var e=l.scrollLeft-s.wheelStartX,t=l.scrollTop-s.wheelStartY,n=t&&s.wheelDY&&t/s.wheelDY||e&&s.wheelDX&&e/s.wheelDX;s.wheelStartX=s.wheelStartY=null,n&&(sa=(sa*oa+n)/(oa+1),++oa)}},200)):(s.wheelDX+=i,s.wheelDY+=a))}}var da=function(e,t){this.ranges=e,this.primIndex=t};da.prototype.primary=function(){return this.ranges[this.primIndex]},da.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!ht(n.anchor,r.anchor)||!ht(n.head,r.head))return!1}return!0},da.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Z(gt(this.ranges[t].anchor),gt(this.ranges[t].head));return new da(e,this.primIndex)},da.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},da.prototype.contains=function(e,t){t||=e;for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(Y(t,r.from())>=0&&Y(e,r.to())<=0)return n}return-1};var Z=function(e,t){this.anchor=e,this.head=t};Z.prototype.from=function(){return vt(this.anchor,this.head)},Z.prototype.to=function(){return _t(this.anchor,this.head)},Z.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function fa(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(e,t){return Y(e.from(),t.from())}),n=B(t,i);for(var a=1;a<t.length;a++){var o=t[a],s=t[a-1],c=Y(s.to(),o.from());if(r&&!o.empty()?c>0:c>=0){var l=vt(s.from(),o.from()),u=_t(s.to(),o.to()),d=s.empty()?o.from()==o.head:s.from()==s.head;a<=n&&--n,t.splice(--a,2,new Z(d?u:l,d?l:u))}}return new da(t,n)}function pa(e,t){return new da([new Z(e,t||e)],0)}function ma(e){return e.text?J(e.from.line+e.text.length-1,V(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function ha(e,t){if(Y(e,t.from)<0)return e;if(Y(e,t.to)<=0)return ma(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=ma(t).ch-t.to.ch),J(n,r)}function ga(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new Z(ha(i.anchor,t),ha(i.head,t)))}return fa(e.cm,n,e.sel.primIndex)}function _a(e,t,n){return e.line==t.line?J(n.line,e.ch-t.ch+n.ch):J(n.line+(e.line-t.line),e.ch)}function va(e,t,n){for(var r=[],i=J(e.first,0),a=i,o=0;o<t.length;o++){var s=t[o],c=_a(s.from,i,a),l=_a(ma(s),i,a);if(i=s.to,a=l,n==`around`){var u=e.sel.ranges[o],d=Y(u.head,u.anchor)<0;r[o]=new Z(d?l:c,d?c:l)}else r[o]=new Z(c,c)}return new da(r,e.sel.primIndex)}function ya(e){e.doc.mode=nt(e.options,e.doc.modeOption),ba(e)}function ba(e){e.doc.iter(function(e){e.stateAfter&&=null,e.styles&&=null}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Hi(e,100),e.state.modeGen++,e.curOp&&Wr(e)}function xa(e,t){return t.from.ch==0&&t.to.ch==0&&V(t.text)==``&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Sa(e,t,n,r){function i(e){return n?n[e]:null}function a(e,n,i){_n(e,n,i,r),In(e,`change`,e,t)}function o(e,t){for(var n=[],a=e;a<t;++a)n.push(new gn(l[a],i(a),r));return n}var s=t.from,c=t.to,l=t.text,u=K(e,s.line),d=K(e,c.line),f=V(l),p=i(l.length-1),m=c.line-s.line;if(t.full)e.insert(0,o(0,l.length)),e.remove(l.length,e.size-l.length);else if(xa(e,t)){var h=o(0,l.length-1);a(d,d.text,p),m&&e.remove(s.line,m),h.length&&e.insert(s.line,h)}else if(u==d)if(l.length==1)a(u,u.text.slice(0,s.ch)+f+u.text.slice(c.ch),p);else{var g=o(1,l.length-1);g.push(new gn(f+u.text.slice(c.ch),p,r)),a(u,u.text.slice(0,s.ch)+l[0],i(0)),e.insert(s.line+1,g)}else if(l.length==1)a(u,u.text.slice(0,s.ch)+l[0]+d.text.slice(c.ch),i(0)),e.remove(s.line+1,m);else{a(u,u.text.slice(0,s.ch)+l[0],i(0)),a(d,f+d.text.slice(c.ch),p);var _=o(1,l.length-1);m>1&&e.remove(s.line+1,m-1),e.insert(s.line+1,_)}In(e,`change`,e,t)}function Ca(e,t,n){function r(e,i,a){if(e.linked)for(var o=0;o<e.linked.length;++o){var s=e.linked[o];if(s.doc!=i){var c=a&&s.sharedHist;n&&!c||(t(s.doc,c),r(s.doc,e,c))}}}r(e,null,!0)}function wa(e,t){if(t.cm)throw Error(`This document is already in use.`);e.doc=t,t.cm=e,Vr(e),ya(e),Ta(e),e.options.direction=t.direction,e.options.lineWrapping||hn(e),e.options.mode=t.modeOption,Wr(e)}function Ta(e){(e.doc.direction==`rtl`?te:E)(e.display.lineDiv,`CodeMirror-rtl`)}function Ea(e){Ri(e,function(){Ta(e),Wr(e)})}function Da(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function Oa(e,t){var n={from:gt(t.from),to:ma(t),text:lt(e,t.from,t.to)};return Fa(e,n,t.from.line,t.to.line+1),Ca(e,function(e){return Fa(e,n,t.from.line,t.to.line+1)},!0),n}function ka(e){for(;e.length&&V(e).ranges;)e.pop()}function Aa(e,t){if(t)return ka(e.done),V(e.done);if(e.done.length&&!V(e.done).ranges)return V(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),V(e.done)}function ja(e,t,n,r){var i=e.history;i.undone.length=0;var a=+new Date,o,s;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)==`+`&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)==`*`))&&(o=Aa(i,i.lastOp==r)))s=V(o.changes),Y(t.from,t.to)==0&&Y(t.from,s.to)==0?s.to=ma(t):o.changes.push(Oa(e,t));else{var c=V(i.done);for((!c||!c.ranges)&&Pa(e.sel,i.done),o={changes:[Oa(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,s||W(e,`historyAdded`)}function Ma(e,t,n,r){var i=t.charAt(0);return i==`*`||i==`+`&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Na(e,t,n,r){var i=e.history,a=r&&r.origin;n==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||Ma(e,a,V(i.done),t))?i.done[i.done.length-1]=t:Pa(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=n,r&&r.clearRedo!==!1&&ka(i.undone)}function Pa(e,t){var n=V(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Fa(e,t,n,r){var i=t[`spans_`+e.id],a=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||=t[`spans_`+e.id]={})[a]=n.markedSpans),++a})}function Ia(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||=e.slice(0,n):t&&t.push(e[n]);return t?t.length?t:null:e}function La(e,t){var n=t[`spans_`+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(Ia(n[i]));return r}function Ra(e,t){var n=La(e,t),r=Kt(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var a=n[i],o=r[i];if(a&&o)spans:for(var s=0;s<o.length;++s){for(var c=o[s],l=0;l<a.length;++l)if(a[l].marker==c.marker)continue spans;a.push(c)}else o&&(n[i]=o)}return n}function za(e,t,n){for(var r=[],i=0;i<e.length;++i){var a=e[i];if(a.ranges){r.push(n?da.prototype.deepCopy.call(a):a);continue}var o=a.changes,s=[];r.push({changes:s});for(var c=0;c<o.length;++c){var l=o[c],u=void 0;if(s.push({from:l.from,to:l.to,text:l.text}),t)for(var d in l)(u=d.match(/^spans_(\d+)$/))&&B(t,Number(u[1]))>-1&&(V(s)[d]=l[d],delete l[d])}}return r}function Ba(e,t,n,r){if(r){var i=e.anchor;if(n){var a=Y(t,i)<0;a==Y(n,i)<0?a!=Y(t,n)<0&&(t=n):(i=t,t=n)}return new Z(i,t)}else return new Z(n||t,t)}function Va(e,t,n,r,i){i??=e.cm&&(e.cm.display.shift||e.extend),qa(e,new da([Ba(e.sel.primary(),t,n,i)],0),r)}function Ha(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),a=0;a<e.sel.ranges.length;a++)r[a]=Ba(e.sel.ranges[a],t[a],null,i);qa(e,fa(e.cm,r,e.sel.primIndex),n)}function Ua(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,qa(e,fa(e.cm,i,e.sel.primIndex),r)}function Wa(e,t,n,r){qa(e,pa(t,n),r)}function Ga(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new Z(X(e,t[n].anchor),X(e,t[n].head))},origin:n&&n.origin};return W(e,`beforeSelectionChange`,e,r),e.cm&&W(e.cm,`beforeSelectionChange`,e.cm,r),r.ranges==t.ranges?t:fa(e.cm,r.ranges,r.ranges.length-1)}function Ka(e,t,n){var r=e.history.done,i=V(r);i&&i.ranges?(r[r.length-1]=t,Ja(e,t,n)):qa(e,t,n)}function qa(e,t,n){Ja(e,t,n),Na(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function Ja(e,t,n){(Ne(e,`beforeSelectionChange`)||e.cm&&Ne(e.cm,`beforeSelectionChange`))&&(t=Ga(e,t,n));var r=n&&n.bias||(Y(t.primary().head,e.sel.primary().head)<0?-1:1);Ya(e,Za(e,t,r,!0)),!(n&&n.scroll===!1)&&e.cm&&e.cm.getOption(`readOnly`)!=`nocursor`&&mi(e.cm)}function Ya(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Me(e.cm)),In(e,`cursorActivity`,e))}function Xa(e){Ya(e,Za(e,e.sel,null,!1))}function Za(e,t,n,r){for(var i,a=0;a<t.ranges.length;a++){var o=t.ranges[a],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[a],c=$a(e,o.anchor,s&&s.anchor,n,r),l=o.head==o.anchor?c:$a(e,o.head,s&&s.head,n,r);(i||c!=o.anchor||l!=o.head)&&(i||=t.ranges.slice(0,a),i[a]=new Z(c,l))}return i?fa(e.cm,i,t.primIndex):t}function Qa(e,t,n,r,i){var a=K(e,t.line);if(a.markedSpans)for(var o=0;o<a.markedSpans.length;++o){var s=a.markedSpans[o],c=s.marker,l=`selectLeft`in c?!c.selectLeft:c.inclusiveLeft,u=`selectRight`in c?!c.selectRight:c.inclusiveRight;if((s.from==null||(l?s.from<=t.ch:s.from<t.ch))&&(s.to==null||(u?s.to>=t.ch:s.to>t.ch))){if(i&&(W(c,`beforeCursorEnter`),c.explicitlyCleared))if(a.markedSpans){--o;continue}else break;if(!c.atomic)continue;if(n){var d=c.find(r<0?1:-1),f=void 0;if((r<0?u:l)&&(d=eo(e,d,-r,d&&d.line==t.line?a:null)),d&&d.line==t.line&&(f=Y(d,n))&&(r<0?f<0:f>0))return Qa(e,d,t,r,i)}var p=c.find(r<0?-1:1);return(r<0?l:u)&&(p=eo(e,p,r,p.line==t.line?a:null)),p?Qa(e,p,t,r,i):null}}return t}function $a(e,t,n,r,i){var a=r||1;return Qa(e,t,n,a,i)||!i&&Qa(e,t,n,a,!0)||Qa(e,t,n,-a,i)||!i&&Qa(e,t,n,-a,!0)||(e.cantEdit=!0,J(e.first,0))}function eo(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?X(e,J(t.line-1)):null:n>0&&t.ch==(r||K(e,t.line)).text.length?t.line<e.first+e.size-1?J(t.line+1,0):null:new J(t.line,t.ch+n)}function to(e){e.setSelection(J(e.firstLine(),0),J(e.lastLine()),se)}function no(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,i,a){t&&(r.from=X(e,t)),n&&(r.to=X(e,n)),i&&(r.text=i),a!==void 0&&(r.origin=a)}),W(e,`beforeChange`,e,r),e.cm&&W(e.cm,`beforeChange`,e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function ro(e,t,n){if(e.cm){if(!e.cm.curOp)return zi(e.cm,ro)(e,t,n);if(e.cm.state.suppressEdits)return}if(!((Ne(e,`beforeChange`)||e.cm&&Ne(e.cm,`beforeChange`))&&(t=no(e,t,!0),!t))){var r=It&&!n&&Jt(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)io(e,{from:r[i].from,to:r[i].to,text:i?[``]:t.text,origin:t.origin});else io(e,t)}}function io(e,t){if(!(t.text.length==1&&t.text[0]==``&&Y(t.from,t.to)==0)){var n=ga(e,t);ja(e,t,n,e.cm?e.cm.curOp.id:NaN),so(e,t,n,Kt(e,t));var r=[];Ca(e,function(e,n){!n&&B(r,e.history)==-1&&(po(e.history,t),r.push(e.history)),so(e,t,null,Kt(e,t))})}}function ao(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!(r&&!n)){for(var i=e.history,a,o=e.sel,s=t==`undo`?i.done:i.undone,c=t==`undo`?i.undone:i.done,l=0;l<s.length&&(a=s[l],!(n?a.ranges&&!a.equals(e.sel):!a.ranges));l++);if(l!=s.length){for(i.lastOrigin=i.lastSelOrigin=null;;)if(a=s.pop(),a.ranges){if(Pa(a,c),n&&!a.equals(e.sel)){qa(e,a,{clearRedo:!1});return}o=a}else if(r){s.push(a);return}else break;var u=[];Pa(o,c),c.push({changes:u,generation:i.generation}),i.generation=a.generation||++i.maxGeneration;for(var d=Ne(e,`beforeChange`)||e.cm&&Ne(e.cm,`beforeChange`),f=function(n){var r=a.changes[n];if(r.origin=t,d&&!no(e,r,!1))return s.length=0,{};u.push(Oa(e,r)),so(e,r,n?ga(e,r):V(s),Ra(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:ma(r)});var i=[];Ca(e,function(e,t){!t&&B(i,e.history)==-1&&(po(e.history,r),i.push(e.history)),so(e,r,null,Ra(e,r))})},p=a.changes.length-1;p>=0;--p){var m=f(p);if(m)return m.v}}}}function oo(e,t){if(t!=0&&(e.first+=t,e.sel=new da(pe(e.sel.ranges,function(e){return new Z(J(e.anchor.line+t,e.anchor.ch),J(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Wr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)Gr(e.cm,r,`gutter`)}}function so(e,t,n,r){if(e.cm&&!e.cm.curOp)return zi(e.cm,so)(e,t,n,r);if(t.to.line<e.first){oo(e,t.text.length-1-(t.to.line-t.from.line));return}if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);oo(e,i),t={from:J(e.first,0),to:J(t.to.line+i,t.to.ch),text:[V(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:J(a,K(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=lt(e,t.from,t.to),n||=ga(e,t),e.cm?co(e.cm,t,r):Sa(e,t,r),Ja(e,n,se),e.cantEdit&&$a(e,J(e.firstLine(),0))&&(e.cantEdit=!1)}}function co(e,t,n){var r=e.doc,i=e.display,a=t.from,o=t.to,s=!1,c=a.line;e.options.lineWrapping||(c=q(on(K(r,a.line))),r.iter(c,o.line+1,function(e){if(e==i.maxLine)return s=!0,!0})),r.sel.contains(t.from,t.to)>-1&&Me(e),Sa(r,t,n,Br(e)),e.options.lineWrapping||(r.iter(c,a.line+t.text.length,function(e){var t=mn(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),Ft(r,a.line),Hi(e,400);var l=t.text.length-(o.line-a.line)-1;t.full?Wr(e):a.line==o.line&&t.text.length==1&&!xa(e.doc,t)?Gr(e,a.line,`text`):Wr(e,a.line,o.line+1,l);var u=Ne(e,`changes`),d=Ne(e,`change`);if(d||u){var f={from:a,to:o,text:t.text,removed:t.removed,origin:t.origin};d&&In(e,`change`,e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}function lo(e,t,n,r,i){var a;r||=n,Y(r,n)<0&&(a=[r,n],n=a[0],r=a[1]),typeof t==`string`&&(t=e.splitLines(t)),ro(e,{from:n,to:r,text:t,origin:i})}function uo(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function fo(e,t,n,r){for(var i=0;i<e.length;++i){var a=e[i],o=!0;if(a.ranges){a.copied||(a=e[i]=a.deepCopy(),a.copied=!0);for(var s=0;s<a.ranges.length;s++)uo(a.ranges[s].anchor,t,n,r),uo(a.ranges[s].head,t,n,r);continue}for(var c=0;c<a.changes.length;++c){var l=a.changes[c];if(n<l.from.line)l.from=J(l.from.line+r,l.from.ch),l.to=J(l.to.line+r,l.to.ch);else if(t<=l.to.line){o=!1;break}}o||(e.splice(0,i+1),i=0)}}function po(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;fo(e.done,n,r,i),fo(e.undone,n,r,i)}function mo(e,t,n,r){var i=t,a=t;return typeof t==`number`?a=K(e,yt(e,t)):i=q(t),i==null?null:(r(a,i)&&e.cm&&Gr(e.cm,i,n),a)}function ho(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}ho.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,vn(i),In(i,`delete`)}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}};function go(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}go.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var a=Math.min(t,i-e),o=r.height;if(r.removeInner(e,a),this.height-=o-r.height,i==a&&(this.children.splice(n--,1),r.parent=null),(t-=a)==0)break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ho))){var s=[];this.collapse(s),this.children=[new ho(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],a=i.chunkSize();if(e<=a){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var o=i.lines.length%25+25,s=o;s<i.lines.length;){var c=new ho(i.lines.slice(s,s+=25));i.height-=c.height,this.children.splice(++r,0,c),c.parent=this}i.lines=i.lines.slice(0,o),this.maybeSpill()}break}e-=a}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new go(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=B(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new go(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],a=i.chunkSize();if(e<a){var o=Math.min(t,a-e);if(i.iterN(e,o,n))return!0;if((t-=o)==0)break;e=0}else e-=a}}};var _o=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};_o.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=q(n);if(!(r==null||!t)){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var a=Xn(this);dt(n,Math.max(0,n.height-a)),e&&(Ri(e,function(){vo(e,n,-a),Gr(e,r,`widget`)}),In(e,`lineWidgetCleared`,e,this,r))}},_o.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=Xn(this)-t;i&&(dn(this.doc,r)||dt(r,r.height+i),n&&Ri(n,function(){n.curOp.forceUpdate=!0,vo(n,r,i),In(n,`lineWidgetChanged`,n,e,q(r))}))},Pe(_o);function vo(e,t,n){pn(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&pi(e,n)}function yo(e,t,n,r){var i=new _o(e,n,r),a=e.cm;return a&&i.noHScroll&&(a.display.alignWidgets=!0),mo(e,t,`widget`,function(t){var n=t.widgets||=[];if(i.insertAt==null?n.push(i):n.splice(Math.min(n.length,Math.max(0,i.insertAt)),0,i),i.line=t,a&&!dn(e,t)){var r=pn(t)<e.scrollTop;dt(t,t.height+Xn(i)),r&&pi(a,i.height),a.curOp.forceUpdate=!0}return!0}),a&&In(a,`lineWidgetAdded`,a,i,typeof t==`number`?t:q(t)),i}var bo=0,xo=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++bo};xo.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Ai(e),Ne(this,`clear`)){var n=this.find();n&&In(this,`clear`,n.from,n.to)}for(var r=null,i=null,a=0;a<this.lines.length;++a){var o=this.lines[a],s=Vt(o.markedSpans,this);e&&!this.collapsed?Gr(e,q(o),`text`):e&&(s.to!=null&&(i=q(o)),s.from!=null&&(r=q(o))),o.markedSpans=Ht(o.markedSpans,s),s.from==null&&this.collapsed&&!dn(this.doc,o)&&e&&dt(o,Ir(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var c=0;c<this.lines.length;++c){var l=on(this.lines[c]),u=mn(l);u>e.display.maxLineLength&&(e.display.maxLine=l,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&Wr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Xa(e.doc)),e&&In(e,`markerCleared`,e,this,r,i),t&&ji(e),this.parent&&this.parent.clear()}},xo.prototype.find=function(e,t){e==null&&this.type==`bookmark`&&(e=1);for(var n,r,i=0;i<this.lines.length;++i){var a=this.lines[i],o=Vt(a.markedSpans,this);if(o.from!=null&&(n=J(t?a:q(a),o.from),e==-1))return n;if(o.to!=null&&(r=J(t?a:q(a),o.to),e==1))return r}return n&&{from:n,to:r}},xo.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;!t||!r||Ri(r,function(){var i=t.line,a=cr(r,q(t.line));if(a&&(gr(a),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!dn(n.doc,i)&&n.height!=null){var o=n.height;n.height=null;var s=Xn(n)-o;s&&dt(i,i.height+s)}In(r,`markerChanged`,r,e)})},xo.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||B(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||=[]).push(this)}this.lines.push(e)},xo.prototype.detachLine=function(e){if(this.lines.splice(B(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||=[]).push(this)}},Pe(xo);function So(e,t,n,r,i){if(r&&r.shared)return wo(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return zi(e.cm,So)(e,t,n,r,i);var a=new xo(e,i),o=Y(t,n);if(r&&R(r,a,!1),o>0||o==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=A(`span`,[a.replacedWith],`CodeMirror-widget`),r.handleMouseEvents||a.widgetNode.setAttribute(`cm-ignore-events`,`true`),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(an(e,t.line,t,n,a)||t.line!=n.line&&an(e,n.line,t,n,a))throw Error(`Inserting collapsed marker partially overlapping an existing one`);zt()}a.addToHistory&&ja(e,{from:t,to:n,origin:`markText`},e.sel,NaN);var s=t.line,c=e.cm,l;if(e.iter(s,n.line+1,function(r){c&&a.collapsed&&!c.options.lineWrapping&&on(r)==c.display.maxLine&&(l=!0),a.collapsed&&s!=t.line&&dt(r,0),Ut(r,new Bt(a,s==t.line?t.ch:null,s==n.line?n.ch:null),e.cm&&e.cm.curOp),++s}),a.collapsed&&e.iter(t.line,n.line+1,function(t){dn(e,t)&&dt(t,0)}),a.clearOnEnter&&U(a,`beforeCursorEnter`,function(){return a.clear()}),a.readOnly&&(Rt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++bo,a.atomic=!0),c){if(l&&(c.curOp.updateMaxLine=!0),a.collapsed)Wr(c,t.line,n.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var u=t.line;u<=n.line;u++)Gr(c,u,`text`);a.atomic&&Xa(c.doc),In(c,`markerAdded`,c,a)}return a}var Co=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};Co.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();In(this,`clear`)}},Co.prototype.find=function(e,t){return this.primary.find(e,t)},Pe(Co);function wo(e,t,n,r,i){r=R(r),r.shared=!1;var a=[So(e,t,n,r,i)],o=a[0],s=r.widgetNode;return Ca(e,function(e){s&&(r.widgetNode=s.cloneNode(!0)),a.push(So(e,X(e,t),X(e,n),r,i));for(var c=0;c<e.linked.length;++c)if(e.linked[c].isParent)return;o=V(a)}),new Co(a,o)}function To(e){return e.findMarks(J(e.first,0),e.clipPos(J(e.lastLine())),function(e){return e.parent})}function Eo(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),a=e.clipPos(i.from),o=e.clipPos(i.to);if(Y(a,o)){var s=So(e,a,o,r.primary,r.primary.type);r.markers.push(s),s.parent=r}}}function Do(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];Ca(n.primary.doc,function(e){return r.push(e)});for(var i=0;i<n.markers.length;i++){var a=n.markers[i];B(r,a.doc)==-1&&(a.parent=null,n.markers.splice(i--,1))}},n=0;n<e.length;n++)t(n)}var Oo=0,ko=function(e,t,n,r,i){if(!(this instanceof ko))return new ko(e,t,n,r,i);n??=0,go.call(this,[new ho([new gn(``,null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var a=J(n,0);this.sel=pa(a),this.history=new Da(null),this.id=++Oo,this.modeOption=t,this.lineSep=r,this.direction=i==`rtl`?`rtl`:`ltr`,this.extend=!1,typeof e==`string`&&(e=this.splitLines(e)),Sa(this,{from:a,to:a,text:e}),qa(this,pa(a),se)};ko.prototype=ge(go.prototype,{constructor:ko,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=ut(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Vi(function(e){var t=J(this.first,0),n=this.first+this.size-1;ro(this,{from:t,to:J(n,K(this,n).text.length),text:this.splitLines(e),origin:`setValue`,full:!0},!0),this.cm&&hi(this.cm,0,0),qa(this,pa(t),se)}),replaceRange:function(e,t,n,r){t=X(this,t),n=n?X(this,n):t,lo(this,e,t,n,r)},getRange:function(e,t,n){var r=lt(this,X(this,e),X(this,t));return n===!1?r:n===``?r.join(``):r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(pt(this,e))return K(this,e)},getLineNumber:function(e){return q(e)},getLineHandleVisualStart:function(e){return typeof e==`number`&&(e=K(this,e)),on(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return X(this,e)},getCursor:function(e){var t=this.sel.primary();return e==null||e==`head`?t.head:e==`anchor`?t.anchor:e==`end`||e==`to`||e===!1?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Vi(function(e,t,n){Wa(this,X(this,typeof e==`number`?J(e,t||0):e),null,n)}),setSelection:Vi(function(e,t,n){Wa(this,X(this,e),X(this,t||e),n)}),extendSelection:Vi(function(e,t,n){Va(this,X(this,e),t&&X(this,t),n)}),extendSelections:Vi(function(e,t){Ha(this,xt(this,e),t)}),extendSelectionsBy:Vi(function(e,t){var n=pe(this.sel.ranges,e);Ha(this,xt(this,n),t)}),setSelections:Vi(function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new Z(X(this,e[i].anchor),X(this,e[i].head||e[i].anchor));t??=Math.min(e.length-1,this.sel.primIndex),qa(this,fa(this.cm,r,t),n)}}),addSelection:Vi(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Z(X(this,e),X(this,t||e))),qa(this,fa(this.cm,r,r.length-1),n)}),getSelection:function(e){for(var t=this.sel.ranges,n,r=0;r<t.length;r++){var i=lt(this,t[r].from(),t[r].to());n=n?n.concat(i):i}return e===!1?n:n.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=lt(this,n[r].from(),n[r].to());e!==!1&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||`+input`)},replaceSelections:Vi(function(e,t,n){for(var r=[],i=this.sel,a=0;a<i.ranges.length;a++){var o=i.ranges[a];r[a]={from:o.from(),to:o.to(),text:this.splitLines(e[a]),origin:n}}for(var s=t&&t!=`end`&&va(this,r,t),c=r.length-1;c>=0;c--)ro(this,r[c]);s?Ka(this,s):this.cm&&mi(this.cm)}),undo:Vi(function(){ao(this,`undo`)}),redo:Vi(function(){ao(this,`redo`)}),undoSelection:Vi(function(){ao(this,`undo`,!0)}),redoSelection:Vi(function(){ao(this,`redo`,!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new Da(this.history),Ca(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:za(this.history.done),undone:za(this.history.undone)}},setHistory:function(e){var t=this.history=new Da(this.history);t.done=za(e.done.slice(0),null,!0),t.undone=za(e.undone.slice(0),null,!0)},setGutterMarker:Vi(function(e,t,n){return mo(this,e,`gutter`,function(e){var r=e.gutterMarkers||={};return r[t]=n,!n&&be(r)&&(e.gutterMarkers=null),!0})}),clearGutter:Vi(function(e){var t=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&mo(t,n,`gutter`,function(){return n.gutterMarkers[e]=null,be(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e==`number`){if(!pt(this,e)||(t=e,e=K(this,e),!e))return null}else if(t=q(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Vi(function(e,t,n){return mo(this,e,t==`gutter`?`gutter`:`class`,function(e){var r=t==`text`?`textClass`:t==`background`?`bgClass`:t==`gutter`?`gutterClass`:`wrapClass`;if(!e[r])e[r]=n;else if(T(n).test(e[r]))return!1;else e[r]+=` `+n;return!0})}),removeLineClass:Vi(function(e,t,n){return mo(this,e,t==`gutter`?`gutter`:`class`,function(e){var r=t==`text`?`textClass`:t==`background`?`bgClass`:t==`gutter`?`gutterClass`:`wrapClass`,i=e[r];if(!i)return!1;if(n==null)e[r]=null;else{var a=i.match(T(n));if(!a)return!1;var o=a.index+a[0].length;e[r]=i.slice(0,a.index)+(!a.index||o==i.length?``:` `)+i.slice(o)||null}return!0})}),addLineWidget:Vi(function(e,t,n){return yo(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return So(this,X(this,e),X(this,t),n,n&&n.type||`range`)},setBookmark:function(e,t){var n={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=X(this,e),So(this,e,e,n,`bookmark`)},findMarksAt:function(e){e=X(this,e);var t=[],n=K(this,e.line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(i.from==null||i.from<=e.ch)&&(i.to==null||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=X(this,e),t=X(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(a){var o=a.markedSpans;if(o)for(var s=0;s<o.length;s++){var c=o[s];!(c.to!=null&&i==e.line&&e.ch>=c.to||c.from==null&&i!=e.line||c.from!=null&&i==t.line&&c.from>=t.ch)&&(!n||n(c.marker))&&r.push(c.marker.parent||c.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)n[r].from!=null&&e.push(n[r].marker)}),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter(function(i){var a=i.text.length+r;if(a>e)return t=e,!0;e-=a,++n}),X(this,J(n,t))},indexFromPos:function(e){e=X(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+n}),t},copy:function(e){var t=new ko(ut(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||={};var t=this.first,n=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<n&&(n=e.to);var r=new ko(ut(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||=[]).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Eo(r,To(this)),r},unlinkDoc:function(e){if(e instanceof Q&&(e=e.doc),this.linked){for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Do(To(this));break}}if(e.history==this.history){var n=[e.id];Ca(e,function(e){return n.push(e.id)},!0),e.history=new Da(null),e.history.done=za(this.history.done,n),e.history.undone=za(this.history.undone,n)}},iterLinkedDocs:function(e){Ca(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Ke(e)},lineSeparator:function(){return this.lineSep||`
|
|
11
|
+
`},setDirection:Vi(function(e){e!=`rtl`&&(e=`ltr`),e!=this.direction&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&Ea(this.cm))})}),ko.prototype.eachLine=ko.prototype.iter;var Ao=0;function jo(e){var t=this;if(Po(t),!(G(t,e)||Zn(t.display,e))){Fe(e),o&&(Ao=+new Date);var n=Hr(t,e,!0),r=e.dataTransfer.files;if(!(!n||t.isReadOnly()))if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,a=Array(i),s=0,c=function(){++s==i&&zi(t,function(){n=X(t.doc,n);var e={from:n,to:n,text:t.doc.splitLines(a.filter(function(e){return e!=null}).join(t.doc.lineSeparator())),origin:`paste`};ro(t.doc,e),Ka(t.doc,pa(X(t.doc,n),X(t.doc,ma(e))))})()},l=function(e,n){if(t.options.allowDropFileTypes&&B(t.options.allowDropFileTypes,e.type)==-1){c();return}var r=new FileReader;r.onerror=function(){return c()},r.onload=function(){var e=r.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)){c();return}a[n]=e,c()},r.readAsText(e)},u=0;u<r.length;u++)l(r[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var d=e.dataTransfer.getData(`Text`);if(d){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),Ja(t.doc,pa(n,n)),f)for(var p=0;p<f.length;++p)lo(t.doc,``,f[p].anchor,f[p].head,`drag`);t.replaceSelection(d,`around`,`paste`),t.display.input.focus()}}catch{}}}}function Mo(e,t){if(o&&(!e.state.draggingText||+new Date-Ao<100)){Re(t);return}if(!(G(e,t)||Zn(e.display,t))&&(t.dataTransfer.setData(`Text`,e.getSelection()),t.dataTransfer.effectAllowed=`copyMove`,t.dataTransfer.setDragImage&&!p)){var n=k(`img`,null,null,`position: fixed; left: 0; top: 0;`);n.src=`data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==`,f&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),f&&n.parentNode.removeChild(n)}}function No(e,t){var n=Hr(e,t);if(n){var r=document.createDocumentFragment();Qr(e,n,r),e.display.dragCursor||(e.display.dragCursor=k(`div`,null,`CodeMirror-cursors CodeMirror-dragcursors`),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),O(e.display.dragCursor,r)}}function Po(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Fo(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName(`CodeMirror`),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation(function(){for(var t=0;t<n.length;t++)e(n[t])})}}var Io=!1;function Lo(){Io||=(Ro(),!0)}function Ro(){var e;U(window,`resize`,function(){e??=setTimeout(function(){e=null,Fo(zo)},100)}),U(window,`blur`,function(){return Fo(ai)})}function zo(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Bo={3:`Pause`,8:`Backspace`,9:`Tab`,13:`Enter`,16:`Shift`,17:`Ctrl`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Esc`,32:`Space`,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`Left`,38:`Up`,39:`Right`,40:`Down`,44:`PrintScrn`,45:`Insert`,46:`Delete`,59:`;`,61:`=`,91:`Mod`,92:`Mod`,93:`Mod`,106:`*`,107:`=`,109:`-`,110:`.`,111:`/`,145:`ScrollLock`,173:`-`,186:`;`,187:`=`,188:`,`,189:`-`,190:`.`,191:`/`,192:"`",219:`[`,220:`\\`,221:`]`,222:`'`,224:`Mod`,63232:`Up`,63233:`Down`,63234:`Left`,63235:`Right`,63272:`Delete`,63273:`Home`,63275:`End`,63276:`PageUp`,63277:`PageDown`,63302:`Insert`},Vo=0;Vo<10;Vo++)Bo[Vo+48]=Bo[Vo+96]=String(Vo);for(var Ho=65;Ho<=90;Ho++)Bo[Ho]=String.fromCharCode(Ho);for(var Uo=1;Uo<=12;Uo++)Bo[Uo+111]=Bo[Uo+63235]=`F`+Uo;var Wo={};Wo.basic={Left:`goCharLeft`,Right:`goCharRight`,Up:`goLineUp`,Down:`goLineDown`,End:`goLineEnd`,Home:`goLineStartSmart`,PageUp:`goPageUp`,PageDown:`goPageDown`,Delete:`delCharAfter`,Backspace:`delCharBefore`,"Shift-Backspace":`delCharBefore`,Tab:`defaultTab`,"Shift-Tab":`indentAuto`,Enter:`newlineAndIndent`,Insert:`toggleOverwrite`,Esc:`singleSelection`},Wo.pcDefault={"Ctrl-A":`selectAll`,"Ctrl-D":`deleteLine`,"Ctrl-Z":`undo`,"Shift-Ctrl-Z":`redo`,"Ctrl-Y":`redo`,"Ctrl-Home":`goDocStart`,"Ctrl-End":`goDocEnd`,"Ctrl-Up":`goLineUp`,"Ctrl-Down":`goLineDown`,"Ctrl-Left":`goGroupLeft`,"Ctrl-Right":`goGroupRight`,"Alt-Left":`goLineStart`,"Alt-Right":`goLineEnd`,"Ctrl-Backspace":`delGroupBefore`,"Ctrl-Delete":`delGroupAfter`,"Ctrl-S":`save`,"Ctrl-F":`find`,"Ctrl-G":`findNext`,"Shift-Ctrl-G":`findPrev`,"Shift-Ctrl-F":`replace`,"Shift-Ctrl-R":`replaceAll`,"Ctrl-[":`indentLess`,"Ctrl-]":`indentMore`,"Ctrl-U":`undoSelection`,"Shift-Ctrl-U":`redoSelection`,"Alt-U":`redoSelection`,fallthrough:`basic`},Wo.emacsy={"Ctrl-F":`goCharRight`,"Ctrl-B":`goCharLeft`,"Ctrl-P":`goLineUp`,"Ctrl-N":`goLineDown`,"Ctrl-A":`goLineStart`,"Ctrl-E":`goLineEnd`,"Ctrl-V":`goPageDown`,"Shift-Ctrl-V":`goPageUp`,"Ctrl-D":`delCharAfter`,"Ctrl-H":`delCharBefore`,"Alt-Backspace":`delWordBefore`,"Ctrl-K":`killLine`,"Ctrl-T":`transposeChars`,"Ctrl-O":`openLine`},Wo.macDefault={"Cmd-A":`selectAll`,"Cmd-D":`deleteLine`,"Cmd-Z":`undo`,"Shift-Cmd-Z":`redo`,"Cmd-Y":`redo`,"Cmd-Home":`goDocStart`,"Cmd-Up":`goDocStart`,"Cmd-End":`goDocEnd`,"Cmd-Down":`goDocEnd`,"Alt-Left":`goGroupLeft`,"Alt-Right":`goGroupRight`,"Cmd-Left":`goLineLeft`,"Cmd-Right":`goLineRight`,"Alt-Backspace":`delGroupBefore`,"Ctrl-Alt-Backspace":`delGroupAfter`,"Alt-Delete":`delGroupAfter`,"Cmd-S":`save`,"Cmd-F":`find`,"Cmd-G":`findNext`,"Shift-Cmd-G":`findPrev`,"Cmd-Alt-F":`replace`,"Shift-Cmd-Alt-F":`replaceAll`,"Cmd-[":`indentLess`,"Cmd-]":`indentMore`,"Cmd-Backspace":`delWrappedLineLeft`,"Cmd-Delete":`delWrappedLineRight`,"Cmd-U":`undoSelection`,"Shift-Cmd-U":`redoSelection`,"Ctrl-Up":`goDocStart`,"Ctrl-Down":`goDocEnd`,fallthrough:[`basic`,`emacsy`]},Wo.default=y?Wo.macDefault:Wo.pcDefault;function Go(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var n,r,i,a,o=0;o<t.length-1;o++){var s=t[o];if(/^(cmd|meta|m)$/i.test(s))a=!0;else if(/^a(lt)?$/i.test(s))n=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else if(/^s(hift)?$/i.test(s))i=!0;else throw Error(`Unrecognized modifier name: `+s)}return n&&(e=`Alt-`+e),r&&(e=`Ctrl-`+e),a&&(e=`Cmd-`+e),i&&(e=`Shift-`+e),e}function Ko(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if(r==`...`){delete e[n];continue}for(var i=pe(n.split(` `),Go),a=0;a<i.length;a++){var o=void 0,s=void 0;a==i.length-1?(s=i.join(` `),o=r):(s=i.slice(0,a+1).join(` `),o=`...`);var c=t[s];if(!c)t[s]=o;else if(c!=o)throw Error(`Inconsistent bindings for `+s)}delete e[n]}for(var l in t)e[l]=t[l];return e}function qo(e,t,n,r){t=Zo(t);var i=t.call?t.call(e,r):t[e];if(i===!1)return`nothing`;if(i===`...`)return`multi`;if(i!=null&&n(i))return`handled`;if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!=`[object Array]`)return qo(e,t.fallthrough,n,r);for(var a=0;a<t.fallthrough.length;a++){var o=qo(e,t.fallthrough[a],n,r);if(o)return o}}}function Jo(e){var t=typeof e==`string`?e:Bo[e.keyCode];return t==`Ctrl`||t==`Alt`||t==`Shift`||t==`Mod`}function Yo(e,t,n){var r=e;return t.altKey&&r!=`Alt`&&(e=`Alt-`+e),(C?t.metaKey:t.ctrlKey)&&r!=`Ctrl`&&(e=`Ctrl-`+e),(C?t.ctrlKey:t.metaKey)&&r!=`Mod`&&(e=`Cmd-`+e),!n&&t.shiftKey&&r!=`Shift`&&(e=`Shift-`+e),e}function Xo(e,t){if(f&&e.keyCode==34&&e.char)return!1;var n=Bo[e.keyCode];return n==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(n=e.code),Yo(n,e,t))}function Zo(e){return typeof e==`string`?Wo[e]:e}function Qo(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var a=t(n[i]);r.length&&Y(a.from,V(r).to)<=0;){var o=r.pop();if(Y(o.from,a.from)<0){a.from=o.from;break}}r.push(a)}Ri(e,function(){for(var t=r.length-1;t>=0;t--)lo(e.doc,``,r[t].from,r[t].to,`+delete`);mi(e)})}function $o(e,t,n){var r=Ce(e.text,t+n,n);return r<0||r>e.text.length?null:r}function es(e,t,n){var r=$o(e,t.ch,n);return r==null?null:new J(t.line,r,n<0?`after`:`before`)}function ts(e,t,n,r,i){if(e){t.doc.direction==`rtl`&&(i=-i);var a=H(n,t.doc.direction);if(a){var o=i<0?V(a):a[0],s=i<0==(o.level==1)?`after`:`before`,c;if(o.level>0||t.doc.direction==`rtl`){var l=lr(t,n);c=i<0?n.text.length-1:0;var u=ur(t,l,c).top;c=we(function(e){return ur(t,l,e).top==u},i<0==(o.level==1)?o.from:o.to-1,c),s==`before`&&(c=$o(n,c,1))}else c=i<0?o.to:o.from;return new J(r,c,s)}}return new J(r,i<0?n.text.length:0,i<0?`before`:`after`)}function ns(e,t,n,r){var i=H(t,e.doc.direction);if(!i)return es(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky=`before`):n.ch<=0&&(n.ch=0,n.sticky=`after`);var a=De(i,n.ch,n.sticky),o=i[a];if(e.doc.direction==`ltr`&&o.level%2==0&&(r>0?o.to>n.ch:o.from<n.ch))return es(t,n,r);var s=function(e,n){return $o(t,e instanceof J?e.ch:e,n)},c,l=function(n){return e.options.lineWrapping?(c||=lr(e,t),Ar(e,t,c,n)):{begin:0,end:t.text.length}},u=l(n.sticky==`before`?s(n,-1):n.ch);if(e.doc.direction==`rtl`||o.level==1){var d=o.level==1==r<0,f=s(n,d?1:-1);if(f!=null&&(d?f<=o.to&&f<=u.end:f>=o.from&&f>=u.begin)){var p=d?`before`:`after`;return new J(n.line,f,p)}}var m=function(e,t,r){for(var a=function(e,t){return t?new J(n.line,s(e,1),`before`):new J(n.line,e,`after`)};e>=0&&e<i.length;e+=t){var o=i[e],c=t>0==(o.level!=1),l=c?r.begin:s(r.end,-1);if(o.from<=l&&l<o.to||(l=c?o.from:s(o.to,-1),r.begin<=l&&l<r.end))return a(l,c)}},h=m(a+r,r,u);if(h)return h;var g=r>0?u.end:s(u.begin,-1);return g!=null&&!(r>0&&g==t.text.length)&&(h=m(r>0?0:i.length-1,r,l(g)),h)?h:null}var rs={selectAll:to,singleSelection:function(e){return e.setSelection(e.getCursor(`anchor`),e.getCursor(`head`),se)},killLine:function(e){return Qo(e,function(t){if(t.empty()){var n=K(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:J(t.head.line+1,0)}:{from:t.head,to:J(t.head.line,n)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Qo(e,function(t){return{from:J(t.from().line,0),to:X(e.doc,J(t.to().line+1,0))}})},delLineLeft:function(e){return Qo(e,function(e){return{from:J(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return Qo(e,function(t){var n=e.charCoords(t.head,`div`).top+5;return{from:e.coordsChar({left:0,top:n},`div`),to:t.from()}})},delWrappedLineRight:function(e){return Qo(e,function(t){var n=e.charCoords(t.head,`div`).top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},`div`);return{from:t.from(),to:r}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(J(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(J(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return is(e,t.head.line)},{origin:`+move`,bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return os(e,t.head)},{origin:`+move`,bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return as(e,t.head.line)},{origin:`+move`,bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,`div`).top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},`div`)},le)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,`div`).top+5;return e.coordsChar({left:0,top:n},`div`)},le)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,`div`).top+5,r=e.coordsChar({left:0,top:n},`div`);return r.ch<e.getLine(r.line).search(/\S/)?os(e,t.head):r},le)},goLineUp:function(e){return e.moveV(-1,`line`)},goLineDown:function(e){return e.moveV(1,`line`)},goPageUp:function(e){return e.moveV(-1,`page`)},goPageDown:function(e){return e.moveV(1,`page`)},goCharLeft:function(e){return e.moveH(-1,`char`)},goCharRight:function(e){return e.moveH(1,`char`)},goColumnLeft:function(e){return e.moveH(-1,`column`)},goColumnRight:function(e){return e.moveH(1,`column`)},goWordLeft:function(e){return e.moveH(-1,`word`)},goGroupRight:function(e){return e.moveH(1,`group`)},goGroupLeft:function(e){return e.moveH(-1,`group`)},goWordRight:function(e){return e.moveH(1,`word`)},delCharBefore:function(e){return e.deleteH(-1,`codepoint`)},delCharAfter:function(e){return e.deleteH(1,`char`)},delWordBefore:function(e){return e.deleteH(-1,`word`)},delWordAfter:function(e){return e.deleteH(1,`word`)},delGroupBefore:function(e){return e.deleteH(-1,`group`)},delGroupAfter:function(e){return e.deleteH(1,`group`)},indentAuto:function(e){return e.indentSelection(`smart`)},indentMore:function(e){return e.indentSelection(`add`)},indentLess:function(e){return e.indentSelection(`subtract`)},insertTab:function(e){return e.replaceSelection(` `)},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var a=n[i].from(),o=z(e.getLine(a.line),a.ch,r);t.push(fe(r-o%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection(`add`):e.execCommand(`insertTab`)},transposeChars:function(e){return Ri(e,function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,a=K(e.doc,i.line).text;if(a){if(i.ch==a.length&&(i=new J(i.line,i.ch-1)),i.ch>0)i=new J(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),J(i.line,i.ch-2),i,`+transpose`);else if(i.line>e.doc.first){var o=K(e.doc,i.line-1).text;o&&(i=new J(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),J(i.line-1,o.length-1),i,`+transpose`))}}n.push(new Z(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return Ri(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,`+input`);t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);mi(e)})},openLine:function(e){return e.replaceSelection(`
|
|
12
|
+
`,`start`)},toggleOverwrite:function(e){return e.toggleOverwrite()}};function is(e,t){var n=K(e.doc,t),r=on(n);return r!=n&&(t=q(r)),ts(!0,e,r,t,1)}function as(e,t){var n=K(e.doc,t),r=sn(n);return r!=n&&(t=q(r)),ts(!0,e,n,t,-1)}function os(e,t){var n=is(e,t.line),r=K(e.doc,n.line),i=H(r,e.doc.direction);if(!i||i[0].level==0){var a=Math.max(n.ch,r.text.search(/\S/)),o=t.line==n.line&&t.ch<=a&&t.ch;return J(n.line,o?0:a,n.sticky)}return n}function ss(e,t,n){if(typeof t==`string`&&(t=rs[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=oe}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function cs(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=qo(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&qo(t,e.options.extraKeys,n,e)||qo(t,e.options.keyMap,n,e)}var ls=new ie;function us(e,t,n,r){var i=e.state.keySeq;if(i){if(Jo(t))return`handled`;if(/\'$/.test(t)?e.state.keySeq=null:ls.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),ds(e,i+` `+t,n,r))return!0}return ds(e,t,n,r)}function ds(e,t,n,r){var i=cs(e,t,r);return i==`multi`&&(e.state.keySeq=t),i==`handled`&&In(e,`keyHandled`,e,t,n),(i==`handled`||i==`multi`)&&(Fe(n),ti(e)),!!i}function fs(e,t){var n=Xo(t,!0);return n?t.shiftKey&&!e.state.keySeq?us(e,`Shift-`+n,t,function(t){return ss(e,t,!0)})||us(e,n,t,function(t){if(typeof t==`string`?/^go[A-Z]/.test(t):t.motion)return ss(e,t)}):us(e,n,t,function(t){return ss(e,t)}):!1}function ps(e,t,n){return us(e,`'`+n+`'`,t,function(t){return ss(e,t,!0)})}var ms=null;function hs(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=ee(re(t)),!G(t,e))){o&&s<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var i=fs(t,e);f&&(ms=i?r:null,!i&&r==88&&!Je&&(y?e.metaKey:e.ctrlKey)&&t.replaceSelection(``,null,`cut`)),n&&!y&&!i&&r==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand(`cut`),r==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&gs(t)}}function gs(e){var t=e.display.lineDiv;te(t,`CodeMirror-crosshair`);function n(e){(e.keyCode==18||!e.altKey)&&(E(t,`CodeMirror-crosshair`),je(document,`keyup`,n),je(document,`mouseover`,n))}U(document,`keyup`,n),U(document,`mouseover`,n)}function _s(e){e.keyCode==16&&(this.doc.sel.shift=!1),G(this,e)}function vs(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(Zn(t.display,e)||G(t,e)||e.ctrlKey&&!e.altKey||y&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(f&&n==ms){ms=null,Fe(e);return}if(!(f&&(!e.which||e.which<10)&&fs(t,e))){var i=String.fromCharCode(r??n);i!=`\b`&&(ps(t,e,i)||t.display.input.onKeyPress(e))}}}var ys=400,bs=function(e,t,n){this.time=e,this.pos=t,this.button=n};bs.prototype.compare=function(e,t,n){return this.time+ys>e&&Y(t,this.pos)==0&&n==this.button};var xs,Ss;function Cs(e,t){var n=+new Date;return Ss&&Ss.compare(n,e,t)?(xs=Ss=null,`triple`):xs&&xs.compare(n,e,t)?(Ss=new bs(n,e,t),xs=null,`double`):(xs=new bs(n,e,t),Ss=null,`single`)}function ws(e){var t=this,n=t.display;if(!(G(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,Zn(n,e)){c||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!Ns(t,e)){var r=Hr(t,e),i=Be(e),a=r?Cs(r,i):`single`;I(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&Ts(t,i,r,a,e))&&(i==1?r?Ds(t,r,a,e):ze(e)==n.scroller&&Fe(e):i==2?(r&&Va(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(w?t.display.input.onContextMenu(e):ri(t)))}}}function Ts(e,t,n,r,i){var a=`Click`;return r==`double`?a=`Double`+a:r==`triple`&&(a=`Triple`+a),a=(t==1?`Left`:t==2?`Middle`:`Right`)+a,us(e,Yo(a,i),i,function(t){if(typeof t==`string`&&(t=rs[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=oe}finally{e.state.suppressEdits=!1}return r})}function Es(e,t,n){var r=e.getOption(`configureMouse`),i=r?r(e,t,n):{};return i.unit??=(b?n.shiftKey&&n.metaKey:n.altKey)?`rectangle`:t==`single`?`char`:t==`double`?`word`:`line`,(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),i.addNew??=y?n.metaKey:n.ctrlKey,i.moveOnDrag??=!(y?n.altKey:n.ctrlKey),i}function Ds(e,t,n,r){o?setTimeout(L(ni,e),0):e.curOp.focus=ee(re(e));var i=Es(e,n,r),a=e.doc.sel,s;e.options.dragDrop&&Ve&&!e.isReadOnly()&&n==`single`&&(s=a.contains(t))>-1&&(Y((s=a.ranges[s]).from(),t)<0||t.xRel>0)&&(Y(s.to(),t)>0||t.xRel<0)?Os(e,r,t,i):As(e,r,t,i)}function Os(e,t,n,r){var i=e.display,a=!1,l=zi(e,function(t){c&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:ri(e)),je(i.wrapper.ownerDocument,`mouseup`,l),je(i.wrapper.ownerDocument,`mousemove`,u),je(i.scroller,`dragstart`,d),je(i.scroller,`drop`,l),a||(Fe(t),r.addNew||Va(e.doc,n,null,null,r.extend),c&&!p||o&&s==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),u=function(e){a||=Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return a=!0};c&&(i.scroller.draggable=!0),e.state.draggingText=l,l.copy=!r.moveOnDrag,U(i.wrapper.ownerDocument,`mouseup`,l),U(i.wrapper.ownerDocument,`mousemove`,u),U(i.scroller,`dragstart`,d),U(i.scroller,`drop`,l),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function ks(e,t,n){if(n==`char`)return new Z(t,t);if(n==`word`)return e.findWordAt(t);if(n==`line`)return new Z(J(t.line,0),X(e.doc,J(t.line+1,0)));var r=n(e,t);return new Z(r.from,r.to)}function As(e,t,n,r){o&&ri(e);var i=e.display,a=e.doc;Fe(t);var s,c,l=a.sel,u=l.ranges;if(r.addNew&&!r.extend?(c=a.sel.contains(n),s=c>-1?u[c]:new Z(n,n)):(s=a.sel.primary(),c=a.sel.primIndex),r.unit==`rectangle`)r.addNew||(s=new Z(n,n)),n=Hr(e,t,!0,!0),c=-1;else{var d=ks(e,n,r.unit);s=r.extend?Ba(s,d.anchor,d.head,r.extend):d}r.addNew?c==-1?(c=u.length,qa(a,fa(e,u.concat([s]),c),{scroll:!1,origin:`*mouse`})):u.length>1&&u[c].empty()&&r.unit==`char`&&!r.extend?(qa(a,fa(e,u.slice(0,c).concat(u.slice(c+1)),0),{scroll:!1,origin:`*mouse`}),l=a.sel):Ua(a,c,s,ce):(c=0,qa(a,new da([s],0),ce),l=a.sel);var f=n;function p(t){if(Y(f,t)!=0)if(f=t,r.unit==`rectangle`){for(var i=[],o=e.options.tabSize,u=z(K(a,n.line).text,n.ch,o),d=z(K(a,t.line).text,t.ch,o),p=Math.min(u,d),m=Math.max(u,d),h=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));h<=g;h++){var _=K(a,h).text,v=ue(_,p,o);p==m?i.push(new Z(J(h,v),J(h,v))):_.length>v&&i.push(new Z(J(h,v),J(h,ue(_,m,o))))}i.length||i.push(new Z(n,n)),qa(a,fa(e,l.ranges.slice(0,c).concat(i),c),{origin:`*mouse`,scroll:!1}),e.scrollIntoView(t)}else{var y=s,b=ks(e,t,r.unit),x=y.anchor,S;Y(b.anchor,x)>0?(S=b.head,x=vt(y.from(),b.anchor)):(S=b.anchor,x=_t(y.to(),b.head));var C=l.ranges.slice(0);C[c]=js(e,new Z(X(a,x),S)),qa(a,fa(e,C,c),ce)}}var m=i.wrapper.getBoundingClientRect(),h=0;function g(t){var n=++h,o=Hr(e,t,!0,r.unit==`rectangle`);if(o)if(Y(o,f)!=0){e.curOp.focus=ee(re(e)),p(o);var s=ci(i,a);(o.line>=s.to||o.line<s.from)&&setTimeout(zi(e,function(){h==n&&g(t)}),150)}else{var c=t.clientY<m.top?-20:t.clientY>m.bottom?20:0;c&&setTimeout(zi(e,function(){h==n&&(i.scroller.scrollTop+=c,g(t))}),50)}}function _(t){e.state.selectingText=!1,h=1/0,t&&(Fe(t),i.input.focus()),je(i.wrapper.ownerDocument,`mousemove`,v),je(i.wrapper.ownerDocument,`mouseup`,y),a.history.lastSelOrigin=null}var v=zi(e,function(e){e.buttons===0||!Be(e)?_(e):g(e)}),y=zi(e,_);e.state.selectingText=y,U(i.wrapper.ownerDocument,`mousemove`,v),U(i.wrapper.ownerDocument,`mouseup`,y)}function js(e,t){var n=t.anchor,r=t.head,i=K(e.doc,n.line);if(Y(n,r)==0&&n.sticky==r.sticky)return t;var a=H(i);if(!a)return t;var o=De(a,n.ch,n.sticky),s=a[o];if(s.from!=n.ch&&s.to!=n.ch)return t;var c=o+(s.from==n.ch==(s.level!=1)?0:1);if(c==0||c==a.length)return t;var l;if(r.line!=n.line)l=(r.line-n.line)*(e.doc.direction==`ltr`?1:-1)>0;else{var u=De(a,r.ch,r.sticky),d=u-o||(r.ch-n.ch)*(s.level==1?-1:1);l=u==c-1||u==c?d<0:d>0}var f=a[c+(l?-1:0)],p=l==(f.level==1),m=p?f.from:f.to,h=p?`after`:`before`;return n.ch==m&&n.sticky==h?t:new Z(new J(n.line,m,h),r)}function Ms(e,t,n,r){var i,a;if(t.touches)i=t.touches[0].clientX,a=t.touches[0].clientY;else try{i=t.clientX,a=t.clientY}catch{return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Fe(t);var o=e.display,s=o.lineDiv.getBoundingClientRect();if(a>s.bottom||!Ne(e,n))return Le(t);a-=s.top-o.viewOffset;for(var c=0;c<e.display.gutterSpecs.length;++c){var l=o.gutters.childNodes[c];if(l&&l.getBoundingClientRect().right>=i){var u=ft(e.doc,a),d=e.display.gutterSpecs[c];return W(e,n,e,u,d.className,t),Le(t)}}}function Ns(e,t){return Ms(e,t,`gutterClick`,!0)}function Ps(e,t){Zn(e.display,t)||Fs(e,t)||G(e,t,`contextmenu`)||w||e.display.input.onContextMenu(t)}function Fs(e,t){return Ne(e,`gutterContextMenu`)?Ms(e,t,`gutterContextMenu`,!1):!1}function Is(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,``)+e.options.theme.replace(/(^|\s)\s*/g,` cm-s-`),vr(e)}var Ls={toString:function(){return`CodeMirror.Init`}},Rs={},zs={};function Bs(e){var t=e.optionHandlers;function n(n,r,i,a){e.defaults[n]=r,i&&(t[n]=a?function(e,t,n){n!=Ls&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Ls,n(`value`,``,function(e,t){return e.setValue(t)},!0),n(`mode`,null,function(e,t){e.doc.modeOption=t,ya(e)},!0),n(`indentUnit`,2,ya,!0),n(`indentWithTabs`,!1),n(`smartIndent`,!0),n(`tabSize`,4,function(e){ba(e),vr(e),Wr(e)},!0),n(`lineSeparator`,null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var a=e.text.indexOf(t,i);if(a==-1)break;i=a+t.length,n.push(J(r,a))}r++});for(var i=n.length-1;i>=0;i--)lo(e.doc,t,n[i],J(n[i].line,n[i].ch+t.length))}}),n(`specialChars`,/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(e,t,n){e.state.specialChars=RegExp(t.source+(t.test(` `)?``:`| `),`g`),n!=Ls&&e.refresh()}),n(`specialCharPlaceholder`,Cn,function(e){return e.refresh()},!0),n(`electricChars`,!0),n(`inputStyle`,v?`contenteditable`:`textarea`,function(){throw Error(`inputStyle can not (yet) be changed in a running editor`)},!0),n(`spellcheck`,!1,function(e,t){return e.getInputField().spellcheck=t},!0),n(`autocorrect`,!1,function(e,t){return e.getInputField().autocorrect=t},!0),n(`autocapitalize`,!1,function(e,t){return e.getInputField().autocapitalize=t},!0),n(`rtlMoveVisually`,!x),n(`wholeLineUpdateBefore`,!0),n(`theme`,`default`,function(e){Is(e),ia(e)},!0),n(`keyMap`,`default`,function(e,t,n){var r=Zo(t),i=n!=Ls&&Zo(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)}),n(`extraKeys`,null),n(`configureMouse`,null),n(`lineWrapping`,!1,Hs,!0),n(`gutters`,[],function(e,t){e.display.gutterSpecs=na(t,e.options.lineNumbers),ia(e)},!0),n(`fixedGutter`,!0,function(e,t){e.display.gutters.style.left=t?zr(e.display)+`px`:`0`,e.refresh()},!0),n(`coverGutterNextToScrollbar`,!1,function(e){return Ti(e)},!0),n(`scrollbarStyle`,`native`,function(e){Oi(e),Ti(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),n(`lineNumbers`,!1,function(e,t){e.display.gutterSpecs=na(e.options.gutters,t),ia(e)},!0),n(`firstLineNumber`,1,ia,!0),n(`lineNumberFormatter`,function(e){return e},ia,!0),n(`showCursorWhenSelecting`,!1,Xr,!0),n(`resetSelectionOnContextMenu`,!0),n(`lineWiseCopyCut`,!0),n(`pasteLinesPerSelection`,!0),n(`selectionsMayTouch`,!1),n(`readOnly`,!1,function(e,t){t==`nocursor`&&(ai(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),n(`screenReaderLabel`,null,function(e,t){t=t===``?null:t,e.display.input.screenReaderLabelChanged(t)}),n(`disableInput`,!1,function(e,t){t||e.display.input.reset()},!0),n(`dragDrop`,!0,Vs),n(`allowDropFileTypes`,null),n(`cursorBlinkRate`,530),n(`cursorScrollMargin`,0),n(`cursorHeight`,1,Xr,!0),n(`singleCursorHeightPerLine`,!0,Xr,!0),n(`workTime`,100),n(`workDelay`,100),n(`flattenSpans`,!0,ba,!0),n(`addModeClass`,!1,ba,!0),n(`pollInterval`,100),n(`undoDepth`,200,function(e,t){return e.doc.history.undoDepth=t}),n(`historyEventDelay`,1250),n(`viewportMargin`,10,function(e){return e.refresh()},!0),n(`maxHighlightLength`,1e4,ba,!0),n(`moveInputWithCursor`,!0,function(e,t){t||e.display.input.resetPosition()}),n(`tabindex`,null,function(e,t){return e.display.input.getField().tabIndex=t||``}),n(`autofocus`,null),n(`direction`,`ltr`,function(e,t){return e.doc.setDirection(t)},!0),n(`phrases`,null)}function Vs(e,t,n){if(!t!=!(n&&n!=Ls)){var r=e.display.dragFunctions,i=t?U:je;i(e.display.scroller,`dragstart`,r.start),i(e.display.scroller,`dragenter`,r.enter),i(e.display.scroller,`dragover`,r.over),i(e.display.scroller,`dragleave`,r.leave),i(e.display.scroller,`drop`,r.drop)}}function Hs(e){e.options.lineWrapping?(te(e.display.wrapper,`CodeMirror-wrap`),e.display.sizer.style.minWidth=``,e.display.sizerWidth=null):(E(e.display.wrapper,`CodeMirror-wrap`),hn(e)),Vr(e),Wr(e),vr(e),setTimeout(function(){return Ti(e)},100)}function Q(e,t){var n=this;if(!(this instanceof Q))return new Q(e,t);this.options=t=t?R(t):{},R(Rs,t,!1);var r=t.value;typeof r==`string`?r=new ko(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Q.inputStyles[t.inputStyle](this),a=this.display=new aa(e,r,i,t);for(var l in a.wrapper.CodeMirror=this,Is(this),t.lineWrapping&&(this.display.wrapper.className+=` CodeMirror-wrap`),Oi(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new ie,keySeq:null,specialChars:null},t.autofocus&&!v&&a.input.focus(),o&&s<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Us(this),Lo(),Ai(this),this.curOp.forceUpdate=!0,wa(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&ii(n)},20):ai(this),zs)zs.hasOwnProperty(l)&&zs[l](this,t[l],Ls);ta(this),t.finishInit&&t.finishInit(this);for(var u=0;u<Ws.length;++u)Ws[u](this);ji(this),c&&t.lineWrapping&&getComputedStyle(a.lineDiv).textRendering==`optimizelegibility`&&(a.lineDiv.style.textRendering=`auto`)}Q.defaults=Rs,Q.optionHandlers=zs;function Us(e){var t=e.display;U(t.scroller,`mousedown`,zi(e,ws)),o&&s<11?U(t.scroller,`dblclick`,zi(e,function(t){if(!G(e,t)){var n=Hr(e,t);if(!(!n||Ns(e,t)||Zn(e.display,t))){Fe(t);var r=e.findWordAt(n);Va(e.doc,r.anchor,r.head)}}})):U(t.scroller,`dblclick`,function(t){return G(e,t)||Fe(t)}),U(t.scroller,`contextmenu`,function(t){return Ps(e,t)}),U(t.input.getField(),`contextmenu`,function(n){t.scroller.contains(n.target)||Ps(e,n)});var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout(function(){return t.activeTouch=null},1e3),r=t.activeTouch,r.end=+new Date)}function a(e){if(e.touches.length!=1)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function c(e,t){if(t.left==null)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}U(t.scroller,`touchstart`,function(i){if(!G(e,i)&&!a(i)&&!Ns(e,i)){t.input.ensurePolled(),clearTimeout(n);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},i.touches.length==1&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}}),U(t.scroller,`touchmove`,function(){t.activeTouch&&(t.activeTouch.moved=!0)}),U(t.scroller,`touchend`,function(n){var r=t.activeTouch;if(r&&!Zn(t,n)&&r.left!=null&&!r.moved&&new Date-r.start<300){var a=e.coordsChar(t.activeTouch,`page`),o=!r.prev||c(r,r.prev)?new Z(a,a):!r.prev.prev||c(r,r.prev.prev)?e.findWordAt(a):new Z(J(a.line,0),X(e.doc,J(a.line+1,0)));e.setSelection(o.anchor,o.head),e.focus(),Fe(n)}i()}),U(t.scroller,`touchcancel`,i),U(t.scroller,`scroll`,function(){t.scroller.clientHeight&&(yi(e,t.scroller.scrollTop),xi(e,t.scroller.scrollLeft,!0),W(e,`scroll`,e))}),U(t.scroller,`mousewheel`,function(t){return ua(e,t)}),U(t.scroller,`DOMMouseScroll`,function(t){return ua(e,t)}),U(t.wrapper,`scroll`,function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(t){G(e,t)||Re(t)},over:function(t){G(e,t)||(No(e,t),Re(t))},start:function(t){return Mo(e,t)},drop:zi(e,jo),leave:function(t){G(e,t)||Po(e)}};var l=t.input.getField();U(l,`keyup`,function(t){return _s.call(e,t)}),U(l,`keydown`,zi(e,hs)),U(l,`keypress`,zi(e,vs)),U(l,`focus`,function(t){return ii(e,t)}),U(l,`blur`,function(t){return ai(e,t)})}var Ws=[];Q.defineInitHook=function(e){return Ws.push(e)};function Gs(e,t,n,r){var i=e.doc,a;n??=`add`,n==`smart`&&(i.mode.indent?a=Et(e,t).state:n=`prev`);var o=e.options.tabSize,s=K(i,t),c=z(s.text,null,o);s.stateAfter&&=null;var l=s.text.match(/^\s*/)[0],u;if(!r&&!/\S/.test(s.text))u=0,n=`not`;else if(n==`smart`&&(u=i.mode.indent(a,s.text.slice(l.length),s.text),u==oe||u>150)){if(!r)return;n=`prev`}n==`prev`?u=t>i.first?z(K(i,t-1).text,null,o):0:n==`add`?u=c+e.options.indentUnit:n==`subtract`?u=c-e.options.indentUnit:typeof n==`number`&&(u=c+n),u=Math.max(0,u);var d=``,f=0;if(e.options.indentWithTabs)for(var p=Math.floor(u/o);p;--p)f+=o,d+=` `;if(f<u&&(d+=fe(u-f)),d!=l)return lo(i,d,J(t,0),J(t,l.length),`+input`),s.stateAfter=null,!0;for(var m=0;m<i.sel.ranges.length;m++){var h=i.sel.ranges[m];if(h.head.line==t&&h.head.ch<l.length){var g=J(t,l.length);Ua(i,m,new Z(g,g));break}}}var Ks=null;function qs(e){Ks=e}function Js(e,t,n,r,i){var a=e.doc;e.display.shift=!1,r||=a.sel;var o=new Date-200,s=i==`paste`||e.state.pasteIncoming>o,c=Ke(t),l=null;if(s&&r.ranges.length>1)if(Ks&&Ks.text.join(`
|
|
13
|
+
`)==t){if(r.ranges.length%Ks.text.length==0){l=[];for(var u=0;u<Ks.text.length;u++)l.push(a.splitLines(Ks.text[u]))}}else c.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(l=pe(c,function(e){return[e]}));for(var d=e.curOp.updateInput,f=r.ranges.length-1;f>=0;f--){var p=r.ranges[f],m=p.from(),h=p.to();p.empty()&&(n&&n>0?m=J(m.line,m.ch-n):e.state.overwrite&&!s?h=J(h.line,Math.min(K(a,h.line).text.length,h.ch+V(c).length)):s&&Ks&&Ks.lineWise&&Ks.text.join(`
|
|
14
|
+
`)==c.join(`
|
|
15
|
+
`)&&(m=h=J(m.line,0)));var g={from:m,to:h,text:l?l[f%l.length]:c,origin:i||(s?`paste`:e.state.cutIncoming>o?`cut`:`+input`)};ro(e.doc,g),In(e,`inputRead`,e,g)}t&&!s&&Xs(e,t),mi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ys(e,t){var n=e.clipboardData&&e.clipboardData.getData(`Text`);if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Ri(t,function(){return Js(t,n,0,null,`paste`)}),!0}function Xs(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var a=e.getModeAt(i.head),o=!1;if(a.electricChars){for(var s=0;s<a.electricChars.length;s++)if(t.indexOf(a.electricChars.charAt(s))>-1){o=Gs(e,i.head.line,`smart`);break}}else a.electricInput&&a.electricInput.test(K(e.doc,i.head.line).text.slice(0,i.head.ch))&&(o=Gs(e,i.head.line,`smart`));o&&In(e,`electricInput`,e,i.head.line)}}}function Zs(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,a={anchor:J(i,0),head:J(i+1,0)};n.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:n}}function Qs(e,t,n,r){e.setAttribute(`autocorrect`,n?`on`:`off`),e.setAttribute(`autocapitalize`,r?`on`:`off`),e.setAttribute(`spellcheck`,!!t)}function $s(){var e=k(`textarea`,null,null,`position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none`),t=k(`div`,[e],null,`overflow: hidden; position: relative; width: 3px; height: 0px;`);return c?e.style.width=`1000px`:e.setAttribute(`wrap`,`off`),g&&(e.style.border=`1px solid black`),t}function ec(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){I(this).focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&e!=`mode`||(r[e]=n,t.hasOwnProperty(e)&&zi(this,t[e])(this,n,i),W(this,`optionChange`,this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?`push`:`unshift`](Zo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:Bi(function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw Error(`Overlays may not be stateful.`);me(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},function(e){return e.priority}),this.state.modeGen++,Wr(this)}),removeOverlay:Bi(function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||typeof e==`string`&&r.name==e){t.splice(n,1),this.state.modeGen++,Wr(this);return}}}),indentLine:Bi(function(e,t,n){typeof t!=`string`&&typeof t!=`number`&&(t=t==null?this.options.smartIndent?`smart`:`prev`:t?`add`:`subtract`),pt(this.doc,e)&&Gs(this,e,t,n)}),indentSelection:Bi(function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Gs(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&mi(this));else{var a=i.from(),o=i.to(),s=Math.max(n,a.line);n=Math.min(this.lastLine(),o.line-+!o.ch)+1;for(var c=s;c<n;++c)Gs(this,c,e);var l=this.doc.sel.ranges;a.ch==0&&t.length==l.length&&l[r].from().ch>0&&Ua(this.doc,r,new Z(a,l[r].to()),se)}}}),getTokenAt:function(e,t){return jt(this,e,t)},getLineTokens:function(e,t){return jt(this,J(e),t,!0)},getTokenTypeAt:function(e){e=X(this.doc,e);var t=Tt(this,K(this.doc,e.line)),n=0,r=(t.length-1)/2,i=e.ch,a;if(i==0)a=t[2];else for(;;){var o=n+r>>1;if((o?t[o*2-1]:0)>=i)r=o;else if(t[o*2+1]<i)n=o+1;else{a=t[o*2+2];break}}var s=a?a.indexOf(`overlay `):-1;return s<0?a:s==0?null:a.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!n.hasOwnProperty(t))return r;var i=n[t],a=this.getModeAt(e);if(typeof a[t]==`string`)i[a[t]]&&r.push(i[a[t]]);else if(a[t])for(var o=0;o<a[t].length;o++){var s=i[a[t][o]];s&&r.push(s)}else a.helperType&&i[a.helperType]?r.push(i[a.helperType]):i[a.name]&&r.push(i[a.name]);for(var c=0;c<i._global.length;c++){var l=i._global[c];l.pred(a,this)&&B(r,l.val)==-1&&r.push(l.val)}return r},getStateAfter:function(e,t){var n=this.doc;return e=yt(n,e??n.first+n.size-1),Et(this,e+1,t).state},cursorCoords:function(e,t){var n,r=this.doc.sel.primary();return n=e==null?r.head:typeof e==`object`?X(this.doc,e):e?r.from():r.to(),Tr(this,n,t||`page`)},charCoords:function(e,t){return wr(this,X(this.doc,e),t||`page`)},coordsChar:function(e,t){return e=Cr(this,e,t||`page`),Or(this,e.left,e.top)},lineAtHeight:function(e,t){return e=Cr(this,{top:e,left:0},t||`page`).top,ft(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r=!1,i;if(typeof e==`number`){var a=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>a&&(e=a,r=!0),i=K(this.doc,e)}else i=e;return Sr(this,i,{top:0,left:0},t||`page`,n||r).top+(r?this.doc.height-pn(i):0)},defaultTextHeight:function(){return Ir(this.display)},defaultCharWidth:function(){return Lr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var a=this.display;e=Tr(this,X(this.doc,e));var o=e.bottom,s=e.left;if(t.style.position=`absolute`,t.setAttribute(`cm-ignore-events`,`true`),this.display.input.setUneditable(t),a.sizer.appendChild(t),r==`over`)o=e.top;else if(r==`above`||r==`near`){var c=Math.max(a.wrapper.clientHeight,this.doc.height),l=Math.max(a.sizer.clientWidth,a.lineSpace.clientWidth);(r==`above`||e.bottom+t.offsetHeight>c)&&e.top>t.offsetHeight?o=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=c&&(o=e.bottom),s+t.offsetWidth>l&&(s=l-t.offsetWidth)}t.style.top=o+`px`,t.style.left=t.style.right=``,i==`right`?(s=a.sizer.clientWidth-t.offsetWidth,t.style.right=`0px`):(i==`left`?s=0:i==`middle`&&(s=(a.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+`px`),n&&di(this,{left:s,top:o,right:s+t.offsetWidth,bottom:o+t.offsetHeight})},triggerOnKeyDown:Bi(hs),triggerOnKeyPress:Bi(vs),triggerOnKeyUp:_s,triggerOnMouseDown:Bi(ws),execCommand:function(e){if(rs.hasOwnProperty(e))return rs[e].call(null,this)},triggerElectric:Bi(function(e){Xs(this,e)}),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var a=X(this.doc,e),o=0;o<t&&(a=tc(this.doc,a,i,n,r),!a.hitSide);++o);return a},moveH:Bi(function(e,t){var n=this;this.extendSelectionsBy(function(r){return n.display.shift||n.doc.extend||r.empty()?tc(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()},le)}),deleteH:Bi(function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection(``,null,`+delete`):Qo(this,function(n){var i=tc(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}})}),findPosV:function(e,t,n,r){var i=1,a=r;t<0&&(i=-1,t=-t);for(var o=X(this.doc,e),s=0;s<t;++s){var c=Tr(this,o,`div`);if(a==null?a=c.left:c.left=a,o=nc(this,c,i,n),o.hitSide)break}return o},moveV:Bi(function(e,t){var n=this,r=this.doc,i=[],a=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy(function(o){if(a)return e<0?o.from():o.to();var s=Tr(n,o.head,`div`);o.goalColumn!=null&&(s.left=o.goalColumn),i.push(s.left);var c=nc(n,s,e,t);return t==`page`&&o==r.sel.primary()&&pi(n,wr(n,c,`div`).top-s.top),c},le),i.length)for(var o=0;o<r.sel.ranges.length;o++)r.sel.ranges[o].goalColumn=i[o]}),findWordAt:function(e){var t=this.doc,n=K(t,e.line).text,r=e.ch,i=e.ch;if(n){var a=this.getHelper(e,`wordChars`);(e.sticky==`before`||i==n.length)&&r?--r:++i;for(var o=n.charAt(r),s=ye(o,a)?function(e){return ye(e,a)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!ye(e)};r>0&&s(n.charAt(r-1));)--r;for(;i<n.length&&s(n.charAt(i));)++i}return new Z(J(e.line,r),J(e.line,i))},toggleOverwrite:function(e){e!=null&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?te(this.display.cursorDiv,`CodeMirror-overwrite`):E(this.display.cursorDiv,`CodeMirror-overwrite`),W(this,`overwriteToggle`,this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==ee(re(this))},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Bi(function(e,t){hi(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-tr(this)-this.display.barHeight,width:e.scrollWidth-tr(this)-this.display.barWidth,clientHeight:rr(this),clientWidth:nr(this)}},scrollIntoView:Bi(function(e,t){e==null?(e={from:this.doc.sel.primary().head,to:null},t??=this.options.cursorScrollMargin):typeof e==`number`?e={from:J(e,0),to:null}:e.from??(e={from:e,to:null}),e.to||=e.from,e.margin=t||0,e.from.line==null?vi(this,e.from,e.to,e.margin):gi(this,e)}),setSize:Bi(function(e,t){var n=this,r=function(e){return typeof e==`number`||/^\d+$/.test(String(e))?e+`px`:e};e!=null&&(this.display.wrapper.style.width=r(e)),t!=null&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&_r(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,function(e){if(e.widgets){for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Gr(n,i,`widget`);break}}++i}),this.curOp.forceUpdate=!0,W(this,`refresh`,this)}),operation:function(e){return Ri(this,e)},startOperation:function(){return Ai(this)},endOperation:function(){return ji(this)},refresh:Bi(function(){var e=this.display.cachedTextHeight;Wr(this),this.curOp.forceUpdate=!0,vr(this),hi(this,this.doc.scrollLeft,this.doc.scrollTop),Qi(this.display),(e==null||Math.abs(e-Ir(this.display))>.5||this.options.lineWrapping)&&Vr(this),W(this,`refresh`,this)}),swapDoc:Bi(function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),wa(this,e),vr(this),this.display.input.reset(),hi(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,In(this,`swapDoc`,this,t),t}),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Pe(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,a){e.registerHelper(t,r,a),n[t]._global.push({pred:i,val:a})}}function tc(e,t,n,r,i){var a=t,o=n,s=K(e,t.line),c=i&&e.direction==`rtl`?-n:n;function l(){var n=t.line+c;return n<e.first||n>=e.first+e.size?!1:(t=new J(n,t.ch,t.sticky),s=K(e,n))}function u(a){var o;if(r==`codepoint`){var u=s.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(u))o=null;else{var d=n>0?u>=55296&&u<56320:u>=56320&&u<57343;o=new J(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(d?2:1))),-n)}}else o=i?ns(e.cm,s,t,n):es(s,t,n);if(o==null)if(!a&&l())t=ts(i,e.cm,s,t.line,c);else return!1;else t=o;return!0}if(r==`char`||r==`codepoint`)u();else if(r==`column`)u(!0);else if(r==`word`||r==`group`)for(var d=null,f=r==`group`,p=e.cm&&e.cm.getHelper(t,`wordChars`),m=!0;!(n<0&&!u(!m));m=!1){var h=s.text.charAt(t.ch)||`
|
|
16
|
+
`,g=ye(h,p)?`w`:f&&h==`
|
|
17
|
+
`?`n`:!f||/\s/.test(h)?null:`p`;if(f&&!m&&!g&&(g=`s`),d&&d!=g){n<0&&(n=1,u(),t.sticky=`after`);break}if(g&&(d=g),n>0&&!u(!m))break}var _=$a(e,t,a,o,!0);return ht(a,_)&&(_.hitSide=!0),_}function nc(e,t,n,r){var i=e.doc,a=t.left,o;if(r==`page`){var s=Math.min(e.display.wrapper.clientHeight,I(e).innerHeight||i(e).documentElement.clientHeight),c=Math.max(s-.5*Ir(e.display),3);o=(n>0?t.bottom:t.top)+n*c}else r==`line`&&(o=n>0?t.bottom+3:t.top-3);for(var l;l=Or(e,a,o),l.outside;){if(n<0?o<=0:o>=i.height){l.hitSide=!0;break}o+=n*5}return l}var $=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ie,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};$.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,Qs(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function a(e){for(var t=e.target;t;t=t.parentNode){if(t==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}U(i,`paste`,function(e){!a(e)||G(r,e)||Ys(e,r)||s<=11&&setTimeout(zi(r,function(){return t.updateFromDOM()}),20)}),U(i,`compositionstart`,function(e){t.composing={data:e.data,done:!1}}),U(i,`compositionupdate`,function(e){t.composing||={data:e.data,done:!1}}),U(i,`compositionend`,function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),U(i,`touchstart`,function(){return n.forceCompositionEnd()}),U(i,`input`,function(){t.composing||t.readFromDOMSoon()});function o(e){if(!(!a(e)||G(r,e))){if(r.somethingSelected())qs({lineWise:!1,text:r.getSelections()}),e.type==`cut`&&r.replaceSelection(``,null,`cut`);else if(r.options.lineWiseCopyCut){var t=Zs(r);qs({lineWise:!0,text:t.text}),e.type==`cut`&&r.operation(function(){r.setSelections(t.ranges,0,se),r.replaceSelection(``,null,`cut`)})}else return;if(e.clipboardData){e.clipboardData.clearData();var o=Ks.text.join(`
|
|
18
|
+
`);if(e.clipboardData.setData(`Text`,o),e.clipboardData.getData(`Text`)==o){e.preventDefault();return}}var s=$s(),c=s.firstChild;Qs(c),r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),c.value=Ks.text.join(`
|
|
19
|
+
`);var l=ee(F(i));ne(c),setTimeout(function(){r.display.lineSpace.removeChild(s),l.focus(),l==i&&n.showPrimarySelection()},50)}}U(i,`copy`,o),U(i,`cut`,o)},$.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute(`aria-label`,e):this.div.removeAttribute(`aria-label`)},$.prototype.prepareSelection=function(){var e=Zr(this.cm,!1);return e.focus=ee(F(this.div))==this.div,e},$.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},$.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},$.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),i=r.from(),a=r.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||a.line<t.display.viewFrom){e.removeAllRanges();return}var o=sc(t,e.anchorNode,e.anchorOffset),s=sc(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&s&&!s.bad&&Y(vt(o,s),i)==0&&Y(_t(o,s),a)==0)){var c=t.display.view,l=i.line>=t.display.viewFrom&&rc(t,i)||{node:c[0].measure.map[2],offset:0},u=a.line<t.display.viewTo&&rc(t,a);if(!u){var d=c[c.length-1].measure,f=d.maps?d.maps[d.maps.length-1]:d.map;u={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(!l||!u){e.removeAllRanges();return}var p=e.rangeCount&&e.getRangeAt(0),m;try{m=j(l.node,l.offset,u.offset,u.node)}catch{}m&&(!n&&t.state.focused?(e.collapse(l.node,l.offset),m.collapsed||(e.removeAllRanges(),e.addRange(m))):(e.removeAllRanges(),e.addRange(m)),p&&e.anchorNode==null?e.addRange(p):n&&this.startGracePeriod()),this.rememberSelection()}},$.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},$.prototype.showMultipleSelections=function(e){O(this.cm.display.cursorDiv,e.cursors),O(this.cm.display.selectionDiv,e.selection)},$.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},$.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return M(this.div,t)},$.prototype.focus=function(){this.cm.options.readOnly!=`nocursor`&&((!this.selectionInEditor()||ee(F(this.div))!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},$.prototype.blur=function(){this.div.blur()},$.prototype.getField=function(){return this.div},$.prototype.supportsTouch=function(){return!0},$.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):Ri(this.cm,function(){return t.cm.curOp.selectionChanged=!0});function n(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,n))}this.polling.set(this.cm.options.pollInterval,n)},$.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},$.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(_&&u&&this.cm.display.gutterSpecs.length&&ic(e.anchorNode)){this.cm.triggerOnKeyDown({type:`keydown`,keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var n=sc(t,e.anchorNode,e.anchorOffset),r=sc(t,e.focusNode,e.focusOffset);n&&r&&Ri(t,function(){qa(t.doc,pa(n,r),se),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},$.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(r.ch==0&&r.line>e.firstLine()&&(r=J(r.line-1,K(e.doc,r.line-1).length)),i.ch==K(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=J(i.line+1,0)),r.line<t.viewFrom||i.line>t.viewTo-1)return!1;var a,o,s;r.line==t.viewFrom||(a=Ur(e,r.line))==0?(o=q(t.view[0].line),s=t.view[0].node):(o=q(t.view[a].line),s=t.view[a-1].node.nextSibling);var c=Ur(e,i.line),l,u;if(c==t.view.length-1?(l=t.viewTo-1,u=t.lineDiv.lastChild):(l=q(t.view[c+1].line)-1,u=t.view[c+1].node.previousSibling),!s)return!1;for(var d=e.doc.splitLines(oc(e,s,u,o,l)),f=lt(e.doc,J(o,0),J(l,K(e.doc,l).text.length));d.length>1&&f.length>1;)if(V(d)==V(f))d.pop(),f.pop(),l--;else if(d[0]==f[0])d.shift(),f.shift(),o++;else break;for(var p=0,m=0,h=d[0],g=f[0],_=Math.min(h.length,g.length);p<_&&h.charCodeAt(p)==g.charCodeAt(p);)++p;for(var v=V(d),y=V(f),b=Math.min(v.length-(d.length==1?p:0),y.length-(f.length==1?p:0));m<b&&v.charCodeAt(v.length-m-1)==y.charCodeAt(y.length-m-1);)++m;if(d.length==1&&f.length==1&&o==r.line)for(;p&&p>r.ch&&v.charCodeAt(v.length-m-1)==y.charCodeAt(y.length-m-1);)p--,m++;d[d.length-1]=v.slice(0,v.length-m).replace(/^\u200b+/,``),d[0]=d[0].slice(p).replace(/\u200b+$/,``);var x=J(o,p),S=J(l,f.length?V(f).length-m:0);if(d.length>1||d[0]||Y(x,S))return lo(e.doc,d,x,S,`+input`),!0},$.prototype.ensurePolled=function(){this.forceCompositionEnd()},$.prototype.reset=function(){this.forceCompositionEnd()},$.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},$.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout??=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},$.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Ri(this.cm,function(){return Wr(e.cm)})},$.prototype.setUneditable=function(e){e.contentEditable=`false`},$.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||zi(this.cm,Js)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},$.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!=`nocursor`)},$.prototype.onContextMenu=function(){},$.prototype.resetPosition=function(){},$.prototype.needsContentAttribute=!0;function rc(e,t){var n=cr(e,t.line);if(!n||n.hidden)return null;var r=K(e.doc,t.line),i=ar(n,r,t.line),a=H(r,e.doc.direction),o=`left`;a&&(o=De(a,t.ch)%2?`right`:`left`);var s=fr(i.map,t.ch,o);return s.offset=s.collapse==`right`?s.end:s.start,s}function ic(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function ac(e,t){return t&&(e.bad=!0),e}function oc(e,t,n,r,i){var a=``,o=!1,s=e.doc.lineSeparator(),c=!1;function l(e){return function(t){return t.id==e}}function u(){o&&=(a+=s,c&&(a+=s),c=!1)}function d(e){e&&(u(),a+=e)}function f(t){if(t.nodeType==1){var n=t.getAttribute(`cm-text`);if(n){d(n);return}var a=t.getAttribute(`cm-marker`),p;if(a){var m=e.findMarks(J(r,0),J(i+1,0),l(+a));m.length&&(p=m[0].find(0))&&d(lt(e.doc,p.from,p.to).join(s));return}if(t.getAttribute(`contenteditable`)==`false`)return;var h=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&t.textContent.length==0)return;h&&u();for(var g=0;g<t.childNodes.length;g++)f(t.childNodes[g]);/^(pre|p)$/i.test(t.nodeName)&&(c=!0),h&&(o=!0)}else t.nodeType==3&&d(t.nodeValue.replace(/\u200b/g,``).replace(/\u00a0/g,` `))}for(;f(t),t!=n;)t=t.nextSibling,c=!1;return a}function sc(e,t,n){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[n],!r)return ac(e.clipPos(J(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var a=e.display.view[i];if(a.node==r)return cc(a,t,n)}}function cc(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!M(r,t))return ac(J(q(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var a=e.rest?V(e.rest):e.line;return ac(J(q(a),a.text.length),i)}var o=t.nodeType==3?t:null,s=t;for(!o&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(o=t.firstChild,n&&=o.nodeValue.length);s.parentNode!=r;)s=s.parentNode;var c=e.measure,l=c.maps;function u(t,n,r){for(var i=-1;i<(l?l.length:0);i++)for(var a=i<0?c.map:l[i],o=0;o<a.length;o+=3){var s=a[o+2];if(s==t||s==n){var u=q(i<0?e.line:e.rest[i]),d=a[o]+r;return(r<0||s!=t)&&(d=a[o+ +!!r]),J(u,d)}}}var d=u(o,s,n);if(d)return ac(d,i);for(var f=s.nextSibling,p=o?o.nodeValue.length-n:0;f;f=f.nextSibling){if(d=u(f,f.firstChild,0),d)return ac(J(d.line,d.ch-p),i);p+=f.textContent.length}for(var m=s.previousSibling,h=n;m;m=m.previousSibling){if(d=u(m,m.firstChild,-1),d)return ac(J(d.line,d.ch+h),i);h+=m.textContent.length}}var lc=function(e){this.cm=e,this.prevInput=``,this.pollingFast=!1,this.polling=new ie,this.hasSelection=!1,this.composing=null,this.resetting=!1};lc.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(i.style.width=`0px`),U(i,`input`,function(){o&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),U(i,`paste`,function(e){G(r,e)||Ys(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())});function a(e){if(!G(r,e)){if(r.somethingSelected())qs({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var t=Zs(r);qs({lineWise:!0,text:t.text}),e.type==`cut`?r.setSelections(t.ranges,null,se):(n.prevInput=``,i.value=t.text.join(`
|
|
20
|
+
`),ne(i))}else return;e.type==`cut`&&(r.state.cutIncoming=+new Date)}}U(i,`cut`,a),U(i,`copy`,a),U(e.scroller,`paste`,function(t){if(!(Zn(e,t)||G(r,t))){if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var a=new Event(`paste`);a.clipboardData=t.clipboardData,i.dispatchEvent(a)}}),U(e.lineSpace,`selectstart`,function(t){Zn(e,t)||Fe(t)}),U(i,`compositionstart`,function(){var e=r.getCursor(`from`);n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor(`to`),{className:`CodeMirror-composing`})}}),U(i,`compositionend`,function(){n.composing&&=(n.poll(),n.composing.range.clear(),null)})},lc.prototype.createField=function(e){this.wrapper=$s(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;Qs(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},lc.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute(`aria-label`,e):this.textarea.removeAttribute(`aria-label`)},lc.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Zr(e);if(e.options.moveInputWithCursor){var i=Tr(e,n.sel.primary().head,`div`),a=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+o.top-a.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+o.left-a.left))}return r},lc.prototype.showSelection=function(e){var t=this.cm.display;O(t.cursorDiv,e.cursors),O(t.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+`px`,this.wrapper.style.left=e.teLeft+`px`)},lc.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput=``;var n=t.getSelection();this.textarea.value=n,t.state.focused&&ne(this.textarea),o&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value=``,o&&s>=9&&(this.hasSelection=null));this.resetting=!1}},lc.prototype.getField=function(){return this.textarea},lc.prototype.supportsTouch=function(){return!1},lc.prototype.focus=function(){if(this.cm.options.readOnly!=`nocursor`&&(!v||ee(F(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},lc.prototype.blur=function(){this.textarea.blur()},lc.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},lc.prototype.receivedFocus=function(){this.slowPoll()},lc.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},lc.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function n(){!t.poll()&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},lc.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||qe(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(o&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=i.charCodeAt(0);if(a==8203&&!r&&(r=``),a==8666)return this.reset(),this.cm.execCommand(`undo`)}for(var c=0,l=Math.min(r.length,i.length);c<l&&r.charCodeAt(c)==i.charCodeAt(c);)++c;return Ri(t,function(){Js(t,i.slice(c),r.length-c,null,e.composing?`*compose`:null),i.length>1e3||i.indexOf(`
|
|
21
|
+
`)>-1?n.value=e.prevInput=``:e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor(`to`),{className:`CodeMirror-composing`}))}),!0},lc.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},lc.prototype.onKeyPress=function(){o&&s>=9&&(this.hasSelection=null),this.fastPoll()},lc.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=Hr(n,e),l=r.scroller.scrollTop;if(!a||f)return;n.options.resetSelectionOnContextMenu&&n.doc.sel.contains(a)==-1&&zi(n,qa)(n.doc,pa(a),se);var u=i.style.cssText,d=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText=`position: static`,i.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
22
|
+
top: `+(e.clientY-p.top-5)+`px; left: `+(e.clientX-p.left-5)+`px;
|
|
23
|
+
z-index: 1000; background: `+(o?`rgba(255, 255, 255, .05)`:`transparent`)+`;
|
|
24
|
+
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var m;c&&(m=i.ownerDocument.defaultView.scrollY),r.input.focus(),c&&i.ownerDocument.defaultView.scrollTo(null,m),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=` `),t.contextMenuPending=g,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function h(){if(i.selectionStart!=null){var e=n.somethingSelected(),a=``+(e?i.value:``);i.value=`⇚`,i.value=a,t.prevInput=e?``:``,i.selectionStart=1,i.selectionEnd=a.length,r.selForContextMenu=n.doc.sel}}function g(){if(t.contextMenuPending==g&&(t.contextMenuPending=!1,t.wrapper.style.cssText=d,i.style.cssText=u,o&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),i.selectionStart!=null)){(!o||o&&s<9)&&h();var e=0,a=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput==``?zi(n,to)(n):e++<10?r.detectingSelectAll=setTimeout(a,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(a,200)}}if(o&&s>=9&&h(),w){Re(e);var _=function(){je(window,`mouseup`,_),setTimeout(g,20)};U(window,`mouseup`,_)}else setTimeout(g,50)},lc.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e==`nocursor`,this.textarea.readOnly=!!e},lc.prototype.setUneditable=function(){},lc.prototype.needsContentAttribute=!1;function uc(e,t){if(t=t?R(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var n=ee(F(e));t.autofocus=n==e||e.getAttribute(`autofocus`)!=null&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(U(e.form,`submit`,r),!t.leaveSubmitMethodAlone)){var a=e.form;i=a.submit;try{var o=a.submit=function(){r(),a.submit=i,a.submit(),a.submit=o}}catch{}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display=``,e.form&&(je(e.form,`submit`,r),!t.leaveSubmitMethodAlone&&typeof e.form.submit==`function`&&(e.form.submit=i))}},e.style.display=`none`;var s=Q(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return s}function dc(e){e.off=je,e.on=U,e.wheelEventPixels=la,e.Doc=ko,e.splitLines=Ke,e.countColumn=z,e.findColumn=ue,e.isWordChar=ve,e.Pass=oe,e.signal=W,e.Line=gn,e.changeEnd=ma,e.scrollbarModel=Di,e.Pos=J,e.cmpPos=Y,e.modes=Ze,e.mimeModes=Qe,e.resolveMode=tt,e.getMode=nt,e.modeExtensions=rt,e.extendMode=it,e.copyState=at,e.startState=st,e.innerMode=ot,e.commands=rs,e.keyMap=Wo,e.keyName=Xo,e.isModifierKey=Jo,e.lookupKey=qo,e.normalizeKeyMap=Ko,e.StringStream=ct,e.SharedTextMarker=Co,e.TextMarker=xo,e.LineWidget=_o,e.e_preventDefault=Fe,e.e_stopPropagation=Ie,e.e_stop=Re,e.addClass=te,e.contains=M,e.rmClass=E,e.keyNames=Bo}Bs(Q),ec(Q);var fc=`iter insert remove copy getEditor constructor`.split(` `);for(var pc in ko.prototype)ko.prototype.hasOwnProperty(pc)&&B(fc,pc)<0&&(Q.prototype[pc]=(function(e){return function(){return e.apply(this.doc,arguments)}})(ko.prototype[pc]));return Pe(ko),Q.inputStyles={textarea:lc,contenteditable:$},Q.defineMode=function(e){!Q.defaults.mode&&e!=`null`&&(Q.defaults.mode=e),$e.apply(this,arguments)},Q.defineMIME=et,Q.defineMode(`null`,function(){return{token:function(e){return e.skipToEnd()}}}),Q.defineMIME(`text/plain`,`null`),Q.defineExtension=function(e,t){Q.prototype[e]=t},Q.defineDocExtension=function(e,t){ko.prototype[e]=t},Q.fromTextArea=uc,dc(Q),Q.version=`5.65.18`,Q}))})),r=t(n()),i=e(((e,t)=>{(function(r){typeof e==`object`&&typeof t==`object`?r(n()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],r):r(CodeMirror)})(function(e){e.defineMode(`css`,function(t,n){var r=n.inline;n.propertyKeywords||(n=e.resolveMode(`text/css`));var i=t.indentUnit,a=n.tokenHooks,o=n.documentTypes||{},s=n.mediaTypes||{},c=n.mediaFeatures||{},l=n.mediaValueKeywords||{},u=n.propertyKeywords||{},d=n.nonStandardPropertyKeywords||{},f=n.fontProperties||{},p=n.counterDescriptors||{},m=n.colorKeywords||{},h=n.valueKeywords||{},g=n.allowNested,_=n.lineComment,v=n.supportsAtComponent===!0,y=t.highlightNonStandardPropertyKeywords!==!1,b,x;function S(e,t){return b=t,e}function C(e,t){var n=e.next();if(a[n]){var r=a[n](e,t);if(r!==!1)return r}if(n==`@`)return e.eatWhile(/[\w\\\-]/),S(`def`,e.current());if(n==`=`||(n==`~`||n==`|`)&&e.eat(`=`))return S(null,`compare`);if(n==`"`||n==`'`)return t.tokenize=w(n),t.tokenize(e,t);if(n==`#`)return e.eatWhile(/[\w\\\-]/),S(`atom`,`hash`);if(n==`!`)return e.match(/^\s*\w*/),S(`keyword`,`important`);if(/\d/.test(n)||n==`.`&&e.eat(/\d/))return e.eatWhile(/[\w.%]/),S(`number`,`unit`);if(n===`-`){if(/[\d.]/.test(e.peek()))return e.eatWhile(/[\w.%]/),S(`number`,`unit`);if(e.match(/^-[\w\\\-]*/))return e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?S(`variable-2`,`variable-definition`):S(`variable-2`,`variable`);if(e.match(/^\w+-/))return S(`meta`,`meta`)}else if(/[,+>*\/]/.test(n))return S(null,`select-op`);else if(n==`.`&&e.match(/^-?[_a-z][_a-z0-9-]*/i))return S(`qualifier`,`qualifier`);else if(/[:;{}\[\]\(\)]/.test(n))return S(null,n);else if(e.match(/^[\w-.]+(?=\()/))return/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(t.tokenize=T),S(`variable callee`,`variable`);else if(/[\w\\\-]/.test(n))return e.eatWhile(/[\w\\\-]/),S(`property`,`word`);else return S(null,null)}function w(e){return function(t,n){for(var r=!1,i;(i=t.next())!=null;){if(i==e&&!r){e==`)`&&t.backUp(1);break}r=!r&&i==`\\`}return(i==e||!r&&e!=`)`)&&(n.tokenize=null),S(`string`,`string`)}}function T(e,t){return e.next(),e.match(/^\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=w(`)`),S(null,`(`)}function E(e,t,n){this.type=e,this.indent=t,this.prev=n}function D(e,t,n,r){return e.context=new E(n,t.indentation()+(r===!1?0:i),e.context),n}function O(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function k(e,t,n){return M[n.context.type](e,t,n)}function A(e,t,n,r){for(var i=r||1;i>0;i--)n.context=n.context.prev;return k(e,t,n)}function j(e){var t=e.current().toLowerCase();x=h.hasOwnProperty(t)?`atom`:m.hasOwnProperty(t)?`keyword`:`variable`}var M={};return M.top=function(e,t,n){if(e==`{`)return D(n,t,`block`);if(e==`}`&&n.context.prev)return O(n);if(v&&/@component/i.test(e))return D(n,t,`atComponentBlock`);if(/^@(-moz-)?document$/i.test(e))return D(n,t,`documentTypes`);if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return D(n,t,`atBlock`);if(/^@(font-face|counter-style)/i.test(e))return n.stateArg=e,`restricted_atBlock_before`;if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return`keyframes`;if(e&&e.charAt(0)==`@`)return D(n,t,`at`);if(e==`hash`)x=`builtin`;else if(e==`word`)x=`tag`;else if(e==`variable-definition`)return`maybeprop`;else if(e==`interpolation`)return D(n,t,`interpolation`);else if(e==`:`)return`pseudo`;else if(g&&e==`(`)return D(n,t,`parens`);return n.context.type},M.block=function(e,t,n){if(e==`word`){var r=t.current().toLowerCase();return u.hasOwnProperty(r)?(x=`property`,`maybeprop`):d.hasOwnProperty(r)?(x=y?`string-2`:`property`,`maybeprop`):g?(x=t.match(/^\s*:(?:\s|$)/,!1)?`property`:`tag`,`block`):(x+=` error`,`maybeprop`)}else if(e==`meta`)return`block`;else if(!g&&(e==`hash`||e==`qualifier`))return x=`error`,`block`;else return M.top(e,t,n)},M.maybeprop=function(e,t,n){return e==`:`?D(n,t,`prop`):k(e,t,n)},M.prop=function(e,t,n){if(e==`;`)return O(n);if(e==`{`&&g)return D(n,t,`propBlock`);if(e==`}`||e==`{`)return A(e,t,n);if(e==`(`)return D(n,t,`parens`);if(e==`hash`&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(t.current()))x+=` error`;else if(e==`word`)j(t);else if(e==`interpolation`)return D(n,t,`interpolation`);return`prop`},M.propBlock=function(e,t,n){return e==`}`?O(n):e==`word`?(x=`property`,`maybeprop`):n.context.type},M.parens=function(e,t,n){return e==`{`||e==`}`?A(e,t,n):e==`)`?O(n):e==`(`?D(n,t,`parens`):e==`interpolation`?D(n,t,`interpolation`):(e==`word`&&j(t),`parens`)},M.pseudo=function(e,t,n){return e==`meta`?`pseudo`:e==`word`?(x=`variable-3`,n.context.type):k(e,t,n)},M.documentTypes=function(e,t,n){return e==`word`&&o.hasOwnProperty(t.current())?(x=`tag`,n.context.type):M.atBlock(e,t,n)},M.atBlock=function(e,t,n){if(e==`(`)return D(n,t,`atBlock_parens`);if(e==`}`||e==`;`)return A(e,t,n);if(e==`{`)return O(n)&&D(n,t,g?`block`:`top`);if(e==`interpolation`)return D(n,t,`interpolation`);if(e==`word`){var r=t.current().toLowerCase();x=r==`only`||r==`not`||r==`and`||r==`or`?`keyword`:s.hasOwnProperty(r)?`attribute`:c.hasOwnProperty(r)?`property`:l.hasOwnProperty(r)?`keyword`:u.hasOwnProperty(r)?`property`:d.hasOwnProperty(r)?y?`string-2`:`property`:h.hasOwnProperty(r)?`atom`:m.hasOwnProperty(r)?`keyword`:`error`}return n.context.type},M.atComponentBlock=function(e,t,n){return e==`}`?A(e,t,n):e==`{`?O(n)&&D(n,t,g?`block`:`top`,!1):(e==`word`&&(x=`error`),n.context.type)},M.atBlock_parens=function(e,t,n){return e==`)`?O(n):e==`{`||e==`}`?A(e,t,n,2):M.atBlock(e,t,n)},M.restricted_atBlock_before=function(e,t,n){return e==`{`?D(n,t,`restricted_atBlock`):e==`word`&&n.stateArg==`@counter-style`?(x=`variable`,`restricted_atBlock_before`):k(e,t,n)},M.restricted_atBlock=function(e,t,n){return e==`}`?(n.stateArg=null,O(n)):e==`word`?(x=n.stateArg==`@font-face`&&!f.hasOwnProperty(t.current().toLowerCase())||n.stateArg==`@counter-style`&&!p.hasOwnProperty(t.current().toLowerCase())?`error`:`property`,`maybeprop`):`restricted_atBlock`},M.keyframes=function(e,t,n){return e==`word`?(x=`variable`,`keyframes`):e==`{`?D(n,t,`top`):k(e,t,n)},M.at=function(e,t,n){return e==`;`?O(n):e==`{`||e==`}`?A(e,t,n):(e==`word`?x=`tag`:e==`hash`&&(x=`builtin`),`at`)},M.interpolation=function(e,t,n){return e==`}`?O(n):e==`{`||e==`;`?A(e,t,n):(e==`word`?x=`variable`:e!=`variable`&&e!=`(`&&e!=`)`&&(x=`error`),`interpolation`)},{startState:function(e){return{tokenize:null,state:r?`block`:`top`,stateArg:null,context:new E(r?`block`:`top`,e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var n=(t.tokenize||C)(e,t);return n&&typeof n==`object`&&(b=n[1],n=n[0]),x=n,b!=`comment`&&(t.state=M[t.state](b,e,t)),x},indent:function(e,t){var n=e.context,r=t&&t.charAt(0),a=n.indent;return n.type==`prop`&&(r==`}`||r==`)`)&&(n=n.prev),n.prev&&(r==`}`&&(n.type==`block`||n.type==`top`||n.type==`interpolation`||n.type==`restricted_atBlock`)?(n=n.prev,a=n.indent):(r==`)`&&(n.type==`parens`||n.type==`atBlock_parens`)||r==`{`&&(n.type==`at`||n.type==`atBlock`))&&(a=Math.max(0,n.indent-i))),a},electricChars:`}`,blockCommentStart:`/*`,blockCommentEnd:`*/`,blockCommentContinue:` * `,lineComment:_,fold:`brace`}});function t(e){for(var t={},n=0;n<e.length;++n)t[e[n].toLowerCase()]=!0;return t}var n=[`domain`,`regexp`,`url`,`url-prefix`],r=t(n),i=[`all`,`aural`,`braille`,`handheld`,`print`,`projection`,`screen`,`tty`,`tv`,`embossed`],a=t(i),o=`width.min-width.max-width.height.min-height.max-height.device-width.min-device-width.max-device-width.device-height.min-device-height.max-device-height.aspect-ratio.min-aspect-ratio.max-aspect-ratio.device-aspect-ratio.min-device-aspect-ratio.max-device-aspect-ratio.color.min-color.max-color.color-index.min-color-index.max-color-index.monochrome.min-monochrome.max-monochrome.resolution.min-resolution.max-resolution.scan.grid.orientation.device-pixel-ratio.min-device-pixel-ratio.max-device-pixel-ratio.pointer.any-pointer.hover.any-hover.prefers-color-scheme.dynamic-range.video-dynamic-range`.split(`.`),s=t(o),c=[`landscape`,`portrait`,`none`,`coarse`,`fine`,`on-demand`,`hover`,`interlace`,`progressive`,`dark`,`light`,`standard`,`high`],l=t(c),u=`align-content.align-items.align-self.alignment-adjust.alignment-baseline.all.anchor-point.animation.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-timing-function.appearance.azimuth.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.binding.bleed.block-size.bookmark-label.bookmark-level.bookmark-state.bookmark-target.border.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-decoration-break.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.color.color-profile.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.content.counter-increment.counter-reset.crop.cue.cue-after.cue-before.cursor.direction.display.dominant-baseline.drop-initial-after-adjust.drop-initial-after-align.drop-initial-before-adjust.drop-initial-before-align.drop-initial-size.drop-initial-value.elevation.empty-cells.fit.fit-content.fit-position.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.float-offset.flow-from.flow-into.font.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-size.font-size-adjust.font-stretch.font-style.font-synthesis.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.gap.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-gap.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-gap.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphens.icon.image-orientation.image-rendering.image-resolution.inline-box-align.inset.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.left.letter-spacing.line-break.line-height.line-height-step.line-stacking.line-stacking-ruby.line-stacking-shift.line-stacking-strategy.list-style.list-style-image.list-style-position.list-style-type.margin.margin-bottom.margin-left.margin-right.margin-top.marks.marquee-direction.marquee-loop.marquee-play-count.marquee-speed.marquee-style.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.move-to.nav-down.nav-index.nav-left.nav-right.nav-up.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-style.overflow-wrap.overflow-x.overflow-y.padding.padding-bottom.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.page-policy.pause.pause-after.pause-before.perspective.perspective-origin.pitch.pitch-range.place-content.place-items.place-self.play-during.position.presentation-level.punctuation-trim.quotes.region-break-after.region-break-before.region-break-inside.region-fragment.rendering-intent.resize.rest.rest-after.rest-before.richness.right.rotate.rotation.rotation-point.row-gap.ruby-align.ruby-overhang.ruby-position.ruby-span.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-type.shape-image-threshold.shape-inside.shape-margin.shape-outside.size.speak.speak-as.speak-header.speak-numeral.speak-punctuation.speech-rate.stress.string-set.tab-size.table-layout.target.target-name.target-new.target-position.text-align.text-align-last.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-height.text-indent.text-justify.text-orientation.text-outline.text-overflow.text-rendering.text-shadow.text-size-adjust.text-space-collapse.text-transform.text-underline-position.text-wrap.top.touch-action.transform.transform-origin.transform-style.transition.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.user-select.vertical-align.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.volume.white-space.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.z-index.clip-path.clip-rule.mask.enable-background.filter.flood-color.flood-opacity.lighting-color.stop-color.stop-opacity.pointer-events.color-interpolation.color-interpolation-filters.color-rendering.fill.fill-opacity.fill-rule.image-rendering.marker.marker-end.marker-mid.marker-start.paint-order.shape-rendering.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.text-rendering.baseline-shift.dominant-baseline.glyph-orientation-horizontal.glyph-orientation-vertical.text-anchor.writing-mode`.split(`.`),d=t(u),f=`accent-color.aspect-ratio.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.content-visibility.margin-block.margin-block-end.margin-block-start.margin-inline.margin-inline-end.margin-inline-start.overflow-anchor.overscroll-behavior.padding-block.padding-block-end.padding-block-start.padding-inline.padding-inline-end.padding-inline-start.scroll-snap-stop.scrollbar-3d-light-color.scrollbar-arrow-color.scrollbar-base-color.scrollbar-dark-shadow-color.scrollbar-face-color.scrollbar-highlight-color.scrollbar-shadow-color.scrollbar-track-color.searchfield-cancel-button.searchfield-decoration.searchfield-results-button.searchfield-results-decoration.shape-inside.zoom`.split(`.`),p=t(f),m=t([`font-display`,`font-family`,`src`,`unicode-range`,`font-variant`,`font-feature-settings`,`font-stretch`,`font-weight`,`font-style`]),h=t([`additive-symbols`,`fallback`,`negative`,`pad`,`prefix`,`range`,`speak-as`,`suffix`,`symbols`,`system`]),g=`aliceblue.antiquewhite.aqua.aquamarine.azure.beige.bisque.black.blanchedalmond.blue.blueviolet.brown.burlywood.cadetblue.chartreuse.chocolate.coral.cornflowerblue.cornsilk.crimson.cyan.darkblue.darkcyan.darkgoldenrod.darkgray.darkgreen.darkgrey.darkkhaki.darkmagenta.darkolivegreen.darkorange.darkorchid.darkred.darksalmon.darkseagreen.darkslateblue.darkslategray.darkslategrey.darkturquoise.darkviolet.deeppink.deepskyblue.dimgray.dimgrey.dodgerblue.firebrick.floralwhite.forestgreen.fuchsia.gainsboro.ghostwhite.gold.goldenrod.gray.grey.green.greenyellow.honeydew.hotpink.indianred.indigo.ivory.khaki.lavender.lavenderblush.lawngreen.lemonchiffon.lightblue.lightcoral.lightcyan.lightgoldenrodyellow.lightgray.lightgreen.lightgrey.lightpink.lightsalmon.lightseagreen.lightskyblue.lightslategray.lightslategrey.lightsteelblue.lightyellow.lime.limegreen.linen.magenta.maroon.mediumaquamarine.mediumblue.mediumorchid.mediumpurple.mediumseagreen.mediumslateblue.mediumspringgreen.mediumturquoise.mediumvioletred.midnightblue.mintcream.mistyrose.moccasin.navajowhite.navy.oldlace.olive.olivedrab.orange.orangered.orchid.palegoldenrod.palegreen.paleturquoise.palevioletred.papayawhip.peachpuff.peru.pink.plum.powderblue.purple.rebeccapurple.red.rosybrown.royalblue.saddlebrown.salmon.sandybrown.seagreen.seashell.sienna.silver.skyblue.slateblue.slategray.slategrey.snow.springgreen.steelblue.tan.teal.thistle.tomato.turquoise.violet.wheat.white.whitesmoke.yellow.yellowgreen`.split(`.`),_=t(g),v=`above.absolute.activeborder.additive.activecaption.afar.after-white-space.ahead.alias.all.all-scroll.alphabetic.alternate.always.amharic.amharic-abegede.antialiased.appworkspace.arabic-indic.armenian.asterisks.attr.auto.auto-flow.avoid.avoid-column.avoid-page.avoid-region.axis-pan.background.backwards.baseline.below.bidi-override.binary.bengali.blink.block.block-axis.blur.bold.bolder.border.border-box.both.bottom.break.break-all.break-word.brightness.bullets.button.buttonface.buttonhighlight.buttonshadow.buttontext.calc.cambodian.capitalize.caps-lock-indicator.caption.captiontext.caret.cell.center.checkbox.circle.cjk-decimal.cjk-earthly-branch.cjk-heavenly-stem.cjk-ideographic.clear.clip.close-quote.col-resize.collapse.color.color-burn.color-dodge.column.column-reverse.compact.condensed.conic-gradient.contain.content.contents.content-box.context-menu.continuous.contrast.copy.counter.counters.cover.crop.cross.crosshair.cubic-bezier.currentcolor.cursive.cyclic.darken.dashed.decimal.decimal-leading-zero.default.default-button.dense.destination-atop.destination-in.destination-out.destination-over.devanagari.difference.disc.discard.disclosure-closed.disclosure-open.document.dot-dash.dot-dot-dash.dotted.double.down.drop-shadow.e-resize.ease.ease-in.ease-in-out.ease-out.element.ellipse.ellipsis.embed.end.ethiopic.ethiopic-abegede.ethiopic-abegede-am-et.ethiopic-abegede-gez.ethiopic-abegede-ti-er.ethiopic-abegede-ti-et.ethiopic-halehame-aa-er.ethiopic-halehame-aa-et.ethiopic-halehame-am-et.ethiopic-halehame-gez.ethiopic-halehame-om-et.ethiopic-halehame-sid-et.ethiopic-halehame-so-et.ethiopic-halehame-ti-er.ethiopic-halehame-ti-et.ethiopic-halehame-tig.ethiopic-numeric.ew-resize.exclusion.expanded.extends.extra-condensed.extra-expanded.fantasy.fast.fill.fill-box.fixed.flat.flex.flex-end.flex-start.footnotes.forwards.from.geometricPrecision.georgian.grayscale.graytext.grid.groove.gujarati.gurmukhi.hand.hangul.hangul-consonant.hard-light.hebrew.help.hidden.hide.higher.highlight.highlighttext.hiragana.hiragana-iroha.horizontal.hsl.hsla.hue.hue-rotate.icon.ignore.inactiveborder.inactivecaption.inactivecaptiontext.infinite.infobackground.infotext.inherit.initial.inline.inline-axis.inline-block.inline-flex.inline-grid.inline-table.inset.inside.intrinsic.invert.italic.japanese-formal.japanese-informal.justify.kannada.katakana.katakana-iroha.keep-all.khmer.korean-hangul-formal.korean-hanja-formal.korean-hanja-informal.landscape.lao.large.larger.left.level.lighter.lighten.line-through.linear.linear-gradient.lines.list-item.listbox.listitem.local.logical.loud.lower.lower-alpha.lower-armenian.lower-greek.lower-hexadecimal.lower-latin.lower-norwegian.lower-roman.lowercase.ltr.luminosity.malayalam.manipulation.match.matrix.matrix3d.media-play-button.media-slider.media-sliderthumb.media-volume-slider.media-volume-sliderthumb.medium.menu.menulist.menulist-button.menutext.message-box.middle.min-intrinsic.mix.mongolian.monospace.move.multiple.multiple_mask_images.multiply.myanmar.n-resize.narrower.ne-resize.nesw-resize.no-close-quote.no-drop.no-open-quote.no-repeat.none.normal.not-allowed.nowrap.ns-resize.numbers.numeric.nw-resize.nwse-resize.oblique.octal.opacity.open-quote.optimizeLegibility.optimizeSpeed.oriya.oromo.outset.outside.outside-shape.overlay.overline.padding.padding-box.painted.page.paused.persian.perspective.pinch-zoom.plus-darker.plus-lighter.pointer.polygon.portrait.pre.pre-line.pre-wrap.preserve-3d.progress.push-button.radial-gradient.radio.read-only.read-write.read-write-plaintext-only.rectangle.region.relative.repeat.repeating-linear-gradient.repeating-radial-gradient.repeating-conic-gradient.repeat-x.repeat-y.reset.reverse.rgb.rgba.ridge.right.rotate.rotate3d.rotateX.rotateY.rotateZ.round.row.row-resize.row-reverse.rtl.run-in.running.s-resize.sans-serif.saturate.saturation.scale.scale3d.scaleX.scaleY.scaleZ.screen.scroll.scrollbar.scroll-position.se-resize.searchfield.searchfield-cancel-button.searchfield-decoration.searchfield-results-button.searchfield-results-decoration.self-start.self-end.semi-condensed.semi-expanded.separate.sepia.serif.show.sidama.simp-chinese-formal.simp-chinese-informal.single.skew.skewX.skewY.skip-white-space.slide.slider-horizontal.slider-vertical.sliderthumb-horizontal.sliderthumb-vertical.slow.small.small-caps.small-caption.smaller.soft-light.solid.somali.source-atop.source-in.source-out.source-over.space.space-around.space-between.space-evenly.spell-out.square.square-button.start.static.status-bar.stretch.stroke.stroke-box.sub.subpixel-antialiased.svg_masks.super.sw-resize.symbolic.symbols.system-ui.table.table-caption.table-cell.table-column.table-column-group.table-footer-group.table-header-group.table-row.table-row-group.tamil.telugu.text.text-bottom.text-top.textarea.textfield.thai.thick.thin.threeddarkshadow.threedface.threedhighlight.threedlightshadow.threedshadow.tibetan.tigre.tigrinya-er.tigrinya-er-abegede.tigrinya-et.tigrinya-et-abegede.to.top.trad-chinese-formal.trad-chinese-informal.transform.translate.translate3d.translateX.translateY.translateZ.transparent.ultra-condensed.ultra-expanded.underline.unidirectional-pan.unset.up.upper-alpha.upper-armenian.upper-greek.upper-hexadecimal.upper-latin.upper-norwegian.upper-roman.uppercase.urdu.url.var.vertical.vertical-text.view-box.visible.visibleFill.visiblePainted.visibleStroke.visual.w-resize.wait.wave.wider.window.windowframe.windowtext.words.wrap.wrap-reverse.x-large.x-small.xor.xx-large.xx-small`.split(`.`),y=t(v),b=n.concat(i).concat(o).concat(c).concat(u).concat(f).concat(g).concat(v);e.registerHelper(`hintWords`,`css`,b);function x(e,t){for(var n=!1,r;(r=e.next())!=null;){if(n&&r==`/`){t.tokenize=null;break}n=r==`*`}return[`comment`,`comment`]}e.defineMIME(`text/css`,{documentTypes:r,mediaTypes:a,mediaFeatures:s,mediaValueKeywords:l,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:h,colorKeywords:_,valueKeywords:y,tokenHooks:{"/":function(e,t){return e.eat(`*`)?(t.tokenize=x,x(e,t)):!1}},name:`css`}),e.defineMIME(`text/x-scss`,{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:l,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:_,valueKeywords:y,fontProperties:m,allowNested:!0,lineComment:`//`,tokenHooks:{"/":function(e,t){return e.eat(`/`)?(e.skipToEnd(),[`comment`,`comment`]):e.eat(`*`)?(t.tokenize=x,x(e,t)):[`operator`,`operator`]},":":function(e){return e.match(/^\s*\{/,!1)?[null,null]:!1},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?[`variable-2`,`variable-definition`]:[`variable-2`,`variable`]},"#":function(e){return e.eat(`{`)?[null,`interpolation`]:!1}},name:`css`,helperType:`scss`}),e.defineMIME(`text/x-less`,{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:l,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:_,valueKeywords:y,fontProperties:m,allowNested:!0,lineComment:`//`,tokenHooks:{"/":function(e,t){return e.eat(`/`)?(e.skipToEnd(),[`comment`,`comment`]):e.eat(`*`)?(t.tokenize=x,x(e,t)):[`operator`,`operator`]},"@":function(e){return e.eat(`{`)?[null,`interpolation`]:e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)?!1:(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?[`variable-2`,`variable-definition`]:[`variable-2`,`variable`])},"&":function(){return[`atom`,`atom`]}},name:`css`,helperType:`less`}),e.defineMIME(`text/x-gss`,{documentTypes:r,mediaTypes:a,mediaFeatures:s,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:h,colorKeywords:_,valueKeywords:y,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return e.eat(`*`)?(t.tokenize=x,x(e,t)):!1}},name:`css`,helperType:`gss`})})})),a=e(((e,t)=>{(function(r){typeof e==`object`&&typeof t==`object`?r(n()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],r):r(CodeMirror)})(function(e){var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode(`xml`,function(r,i){var a=r.indentUnit,o={},s=i.htmlMode?t:n;for(var c in s)o[c]=s[c];for(var c in i)o[c]=i[c];var l,u;function d(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();return r==`<`?e.eat(`!`)?e.eat(`[`)?e.match(`CDATA[`)?n(m(`atom`,`]]>`)):null:e.match(`--`)?n(m(`comment`,`-->`)):e.match(`DOCTYPE`,!0,!0)?(e.eatWhile(/[\w\._\-]/),n(h(1))):null:e.eat(`?`)?(e.eatWhile(/[\w\._\-]/),t.tokenize=m(`meta`,`?>`),`meta`):(l=e.eat(`/`)?`closeTag`:`openTag`,t.tokenize=f,`tag bracket`):r==`&`?(e.eat(`#`)?e.eat(`x`)?e.eatWhile(/[a-fA-F\d]/)&&e.eat(`;`):e.eatWhile(/[\d]/)&&e.eat(`;`):e.eatWhile(/[\w\.\-:]/)&&e.eat(`;`))?`atom`:`error`:(e.eatWhile(/[^&<]/),null)}d.isInText=!0;function f(e,t){var n=e.next();if(n==`>`||n==`/`&&e.eat(`>`))return t.tokenize=d,l=n==`>`?`endTag`:`selfcloseTag`,`tag bracket`;if(n==`=`)return l=`equals`,null;if(n==`<`){t.tokenize=d,t.state=b,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+` tag error`:`tag error`}else if(/[\'\"]/.test(n))return t.tokenize=p(n),t.stringStartCol=e.column(),t.tokenize(e,t);else return e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),`word`}function p(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=f;break}return`string`};return t.isInAttribute=!0,t}function m(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=d;break}n.next()}return e}}function h(e){return function(t,n){for(var r;(r=t.next())!=null;)if(r==`<`)return n.tokenize=h(e+1),n.tokenize(t,n);else if(r==`>`)if(e==1){n.tokenize=d;break}else return n.tokenize=h(e-1),n.tokenize(t,n);return`meta`}}function g(e){return e&&e.toLowerCase()}function _(e,t,n){this.prev=e.context,this.tagName=t||``,this.indent=e.indented,this.startOfLine=n,(o.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function v(e){e.context&&=e.context.prev}function y(e,t){for(var n;;){if(!e.context||(n=e.context.tagName,!o.contextGrabbers.hasOwnProperty(g(n))||!o.contextGrabbers[g(n)].hasOwnProperty(g(t))))return;v(e)}}function b(e,t,n){return e==`openTag`?(n.tagStart=t.column(),x):e==`closeTag`?S:b}function x(e,t,n){return e==`word`?(n.tagName=t.current(),u=`tag`,T):o.allowMissingTagName&&e==`endTag`?(u=`tag bracket`,T(e,t,n)):(u=`error`,x)}function S(e,t,n){if(e==`word`){var r=t.current();return n.context&&n.context.tagName!=r&&o.implicitlyClosed.hasOwnProperty(g(n.context.tagName))&&v(n),n.context&&n.context.tagName==r||o.matchClosing===!1?(u=`tag`,C):(u=`tag error`,w)}else if(o.allowMissingTagName&&e==`endTag`)return u=`tag bracket`,C(e,t,n);else return u=`error`,w}function C(e,t,n){return e==`endTag`?(v(n),b):(u=`error`,C)}function w(e,t,n){return u=`error`,C(e,t,n)}function T(e,t,n){if(e==`word`)return u=`attribute`,E;if(e==`endTag`||e==`selfcloseTag`){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,e==`selfcloseTag`||o.autoSelfClosers.hasOwnProperty(g(r))?y(n,r):(y(n,r),n.context=new _(n,r,i==n.indented)),b}return u=`error`,T}function E(e,t,n){return e==`equals`?D:(o.allowMissing||(u=`error`),T(e,t,n))}function D(e,t,n){return e==`string`?O:e==`word`&&o.allowUnquoted?(u=`string`,T):(u=`error`,T(e,t,n))}function O(e,t,n){return e==`string`?O:T(e,t,n)}return{startState:function(e){var t={tokenize:d,state:b,indented:e||0,tagName:null,tagStart:null,context:null};return e!=null&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;l=null;var n=t.tokenize(e,t);return(n||l)&&n!=`comment`&&(u=null,t.state=t.state(l||n,e,t),u&&(n=u==`error`?n+` error`:u)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+a;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=f&&t.tokenize!=d)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return o.multilineTagIndentPastTag===!1?t.tagStart+a*(o.multilineTagIndentFactor||1):t.tagStart+t.tagName.length+2;if(o.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var s=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(s&&s[1])for(;i;)if(i.tagName==s[2]){i=i.prev;break}else if(o.implicitlyClosed.hasOwnProperty(g(i.tagName)))i=i.prev;else break;else if(s)for(;i;){var c=o.contextGrabbers[g(i.tagName)];if(c&&c.hasOwnProperty(g(s[2])))i=i.prev;else break}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+a:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:`<!--`,blockCommentEnd:`-->`,configuration:o.htmlMode?`html`:`xml`,helperType:o.htmlMode?`html`:`xml`,skipAttribute:function(e){e.state==D&&(e.state=T)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:e.type==`closeTag`}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)t.push(n.tagName);return t.reverse()}}}),e.defineMIME(`text/xml`,`xml`),e.defineMIME(`application/xml`,`xml`),e.mimeModes.hasOwnProperty(`text/html`)||e.defineMIME(`text/html`,{name:`xml`,htmlMode:!0})})})),o=e(((e,t)=>{(function(r){typeof e==`object`&&typeof t==`object`?r(n()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],r):r(CodeMirror)})(function(e){e.defineMode(`javascript`,function(t,n){var r=t.indentUnit,i=n.statementIndent,a=n.jsonld,o=n.json||a,s=n.trackScope!==!1,c=n.typescript,l=n.wordCharacters||/[\w$\xa1-\uffff]/,u=function(){function e(e){return{type:e,style:`keyword`}}var t=e(`keyword a`),n=e(`keyword b`),r=e(`keyword c`),i=e(`keyword d`),a=e(`operator`),o={type:`atom`,style:`atom`};return{if:e(`if`),while:t,with:t,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:e(`new`),delete:r,void:r,throw:r,debugger:e(`debugger`),var:e(`var`),const:e(`var`),let:e(`var`),function:e(`function`),catch:e(`catch`),for:e(`for`),switch:e(`switch`),case:e(`case`),default:e(`default`),in:a,typeof:a,instanceof:a,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e(`this`),class:e(`class`),super:e(`atom`),yield:r,export:e(`export`),import:e(`import`),extends:r,await:r}}(),d=/[+\-*&%=<>!?|~^@]/,f=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function p(e){for(var t=!1,n,r=!1;(n=e.next())!=null;){if(!t){if(n==`/`&&!r)return;n==`[`?r=!0:r&&n==`]`&&(r=!1)}t=!t&&n==`\\`}}var m,h;function g(e,t,n){return m=e,h=n,t}function _(e,t){var n=e.next();if(n==`"`||n==`'`)return t.tokenize=v(n),t.tokenize(e,t);if(n==`.`&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return g(`number`,`number`);if(n==`.`&&e.match(`..`))return g(`spread`,`meta`);if(/[\[\]{}\(\),;\:\.]/.test(n))return g(n);if(n==`=`&&e.eat(`>`))return g(`=>`,`operator`);if(n==`0`&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return g(`number`,`number`);if(/\d/.test(n))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),g(`number`,`number`);if(n==`/`)return e.eat(`*`)?(t.tokenize=y,y(e,t)):e.eat(`/`)?(e.skipToEnd(),g(`comment`,`comment`)):dt(e,t,1)?(p(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),g(`regexp`,`string-2`)):(e.eat(`=`),g(`operator`,`operator`,e.current()));if(n=="`")return t.tokenize=b,b(e,t);if(n==`#`&&e.peek()==`!`)return e.skipToEnd(),g(`meta`,`meta`);if(n==`#`&&e.eatWhile(l))return g(`variable`,`property`);if(n==`<`&&e.match(`!--`)||n==`-`&&e.match(`->`)&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),g(`comment`,`comment`);if(d.test(n))return(n!=`>`||!t.lexical||t.lexical.type!=`>`)&&(e.eat(`=`)?(n==`!`||n==`=`)&&e.eat(`=`):/[<>*+\-|&?]/.test(n)&&(e.eat(n),n==`>`&&e.eat(n))),n==`?`&&e.eat(`.`)?g(`.`):g(`operator`,`operator`,e.current());if(l.test(n)){e.eatWhile(l);var r=e.current();if(t.lastType!=`.`){if(u.propertyIsEnumerable(r)){var i=u[r];return g(i.type,i.style,r)}if(r==`async`&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return g(`async`,`keyword`,r)}return g(`variable`,`variable`,r)}}function v(e){return function(t,n){var r=!1,i;if(a&&t.peek()==`@`&&t.match(f))return n.tokenize=_,g(`jsonld-keyword`,`meta`);for(;(i=t.next())!=null&&!(i==e&&!r);)r=!r&&i==`\\`;return r||(n.tokenize=_),g(`string`,`string`)}}function y(e,t){for(var n=!1,r;r=e.next();){if(r==`/`&&n){t.tokenize=_;break}n=r==`*`}return g(`comment`,`comment`)}function b(e,t){for(var n=!1,r;(r=e.next())!=null;){if(!n&&(r=="`"||r==`$`&&e.eat(`{`))){t.tokenize=_;break}n=!n&&r==`\\`}return g(`quasi`,`string-2`,e.current())}var x=`([{}])`;function S(e,t){t.fatArrowAt&&=null;var n=e.string.indexOf(`=>`,e.start);if(!(n<0)){if(c){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var i=0,a=!1,o=n-1;o>=0;--o){var s=e.string.charAt(o),u=x.indexOf(s);if(u>=0&&u<3){if(!i){++o;break}if(--i==0){s==`(`&&(a=!0);break}}else if(u>=3&&u<6)++i;else if(l.test(s))a=!0;else if(/["'\/`]/.test(s))for(;;--o){if(o==0)return;if(e.string.charAt(o-1)==s&&e.string.charAt(o-2)!=`\\`){o--;break}}else if(a&&!i){++o;break}}a&&!i&&(t.fatArrowAt=o)}}var C={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function w(e,t,n,r,i,a){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=a,r!=null&&(this.align=r)}function T(e,t){if(!s)return!1;for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(var n=r.vars;n;n=n.next)if(n.name==t)return!0}function E(e,t,n,r,i){var a=e.cc;for(D.state=e,D.stream=i,D.marked=null,D.cc=a,D.style=t,e.lexical.hasOwnProperty(`align`)||(e.lexical.align=!0);;)if((a.length?a.pop():o?B:z)(n,r)){for(;a.length&&a[a.length-1].lex;)a.pop()();return D.marked?D.marked:n==`variable`&&T(e,r)?`variable-2`:t}}var D={state:null,column:null,marked:null,cc:null};function O(){for(var e=arguments.length-1;e>=0;e--)D.cc.push(arguments[e])}function k(){return O.apply(null,arguments),!0}function A(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function j(e){var t=D.state;if(D.marked=`def`,s){if(t.context){if(t.lexical.info==`var`&&t.context&&t.context.block){var r=M(e,t.context);if(r!=null){t.context=r;return}}else if(!A(e,t.localVars)){t.localVars=new N(e,t.localVars);return}}n.globalVars&&!A(e,t.globalVars)&&(t.globalVars=new N(e,t.globalVars))}}function M(e,t){if(!t)return null;if(t.block){var n=M(e,t.prev);return n?n==t.prev?t:new te(n,t.vars,!0):null}else if(A(e,t.vars))return t;else return new te(t.prev,new N(e,t.vars),!1)}function ee(e){return e==`public`||e==`private`||e==`protected`||e==`abstract`||e==`readonly`}function te(e,t,n){this.prev=e,this.vars=t,this.block=n}function N(e,t){this.name=e,this.next=t}var ne=new N(`this`,new N(`arguments`,null));function P(){D.state.context=new te(D.state.context,D.state.localVars,!1),D.state.localVars=ne}function re(){D.state.context=new te(D.state.context,D.state.localVars,!0),D.state.localVars=null}P.lex=re.lex=!0;function F(){D.state.localVars=D.state.context.vars,D.state.context=D.state.context.prev}F.lex=!0;function I(e,t){var n=function(){var n=D.state,r=n.indented;if(n.lexical.type==`stat`)r=n.lexical.indented;else for(var i=n.lexical;i&&i.type==`)`&&i.align;i=i.prev)r=i.indented;n.lexical=new w(r,D.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function L(){var e=D.state;e.lexical.prev&&(e.lexical.type==`)`&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}L.lex=!0;function R(e){function t(n){return n==e?k():e==`;`||n==`}`||n==`)`||n==`]`?O():k(t)}return t}function z(e,t){return e==`var`?k(I(`vardef`,t),Ie,R(`;`),L):e==`keyword a`?k(I(`form`),oe,z,L):e==`keyword b`?k(I(`form`),z,L):e==`keyword d`?D.stream.match(/^\s*$/,!1)?k():k(I(`stat`),ce,R(`;`),L):e==`debugger`?k(R(`;`)):e==`{`?k(I(`}`),re,we,L,F):e==`;`?k():e==`if`?(D.state.lexical.info==`else`&&D.state.cc[D.state.cc.length-1]==L&&D.state.cc.pop()(),k(I(`form`),oe,z,L,He)):e==`function`?k(Ke):e==`for`?k(I(`form`),re,Ue,z,F,L):e==`class`||c&&t==`interface`?(D.marked=`keyword`,k(I(`form`,e==`class`?e:t),Ze,L)):e==`variable`?c&&t==`declare`?(D.marked=`keyword`,k(z)):c&&(t==`module`||t==`enum`||t==`type`)&&D.stream.match(/^\s*\w/,!1)?(D.marked=`keyword`,t==`enum`?k(K):t==`type`?k(Je,R(`operator`),H,R(`;`)):k(I(`form`),Le,R(`{`),I(`}`),we,L,L)):c&&t==`namespace`?(D.marked=`keyword`,k(I(`form`),B,z,L)):c&&t==`abstract`?(D.marked=`keyword`,k(z)):k(I(`stat`),_e):e==`switch`?k(I(`form`),oe,R(`{`),I(`}`,`switch`),re,we,L,L,F):e==`case`?k(B,R(`:`)):e=="default"?k(R(`:`)):e==`catch`?k(I(`form`),P,ie,z,L,F):e==`export`?k(I(`stat`),tt,L):e==`import`?k(I(`stat`),rt,L):e==`async`?k(z):t==`@`?k(B,z):O(I(`stat`),B,R(`;`),L)}function ie(e){if(e==`(`)return k(Ye,R(`)`))}function B(e,t){return se(e,t,!1)}function ae(e,t){return se(e,t,!0)}function oe(e){return e==`(`?k(I(`)`),ce,R(`)`),L):O()}function se(e,t,n){if(D.state.fatArrowAt==D.stream.start){var r=n?pe:V;if(e==`(`)return k(P,I(`)`),Se(Ye,`)`),L,R(`=>`),r,F);if(e==`variable`)return O(P,Le,R(`=>`),r,F)}var i=n?ue:le;return C.hasOwnProperty(e)?k(i):e==`function`?k(Ke,i):e==`class`||c&&t==`interface`?(D.marked=`keyword`,k(I(`form`),Xe,L)):e==`keyword c`||e==`async`?k(n?ae:B):e==`(`?k(I(`)`),ce,R(`)`),L,i):e==`operator`||e==`spread`?k(n?ae:B):e==`[`?k(I(`]`),ct,L,i):e==`{`?Ce(ye,`}`,null,i):e==`quasi`?O(de,i):e==`new`?k(me(n)):k()}function ce(e){return e.match(/[;\}\)\],]/)?O():O(B)}function le(e,t){return e==`,`?k(ce):ue(e,t,!1)}function ue(e,t,n){var r=n==0?le:ue,i=n==0?B:ae;if(e==`=>`)return k(P,n?pe:V,F);if(e==`operator`)return/\+\+|--/.test(t)||c&&t==`!`?k(r):c&&t==`<`&&D.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?k(I(`>`),Se(H,`>`),L,r):t==`?`?k(B,R(`:`),i):k(i);if(e==`quasi`)return O(de,r);if(e!=`;`){if(e==`(`)return Ce(ae,`)`,`call`,r);if(e==`.`)return k(ve,r);if(e==`[`)return k(I(`]`),ce,R(`]`),L,r);if(c&&t==`as`)return D.marked=`keyword`,k(H,r);if(e==`regexp`)return D.state.lastType=D.marked=`operator`,D.stream.backUp(D.stream.pos-D.stream.start-1),k(i)}}function de(e,t){return e==`quasi`?t.slice(t.length-2)=="${"?k(ce,fe):k(de):O()}function fe(e){if(e==`}`)return D.marked=`string-2`,D.state.tokenize=b,k(de)}function V(e){return S(D.stream,D.state),O(e==`{`?z:B)}function pe(e){return S(D.stream,D.state),O(e==`{`?z:ae)}function me(e){return function(t){return t==`.`?k(e?ge:he):t==`variable`&&c?k(Ne,e?ue:le):O(e?ae:B)}}function he(e,t){if(t==`target`)return D.marked=`keyword`,k(le)}function ge(e,t){if(t==`target`)return D.marked=`keyword`,k(ue)}function _e(e){return e==`:`?k(L,z):O(le,R(`;`),L)}function ve(e){if(e==`variable`)return D.marked=`property`,k()}function ye(e,t){if(e==`async`)return D.marked=`property`,k(ye);if(e==`variable`||D.style==`keyword`){if(D.marked=`property`,t==`get`||t==`set`)return k(be);var n;return c&&D.state.fatArrowAt==D.stream.start&&(n=D.stream.match(/^\s*:\s*/,!1))&&(D.state.fatArrowAt=D.stream.pos+n[0].length),k(xe)}else if(e==`number`||e==`string`)return D.marked=a?`property`:D.style+` property`,k(xe);else if(e==`jsonld-keyword`)return k(xe);else if(c&&ee(t))return D.marked=`keyword`,k(ye);else if(e==`[`)return k(B,Te,R(`]`),xe);else if(e==`spread`)return k(ae,xe);else if(t==`*`)return D.marked=`keyword`,k(ye);else if(e==`:`)return O(xe)}function be(e){return e==`variable`?(D.marked=`property`,k(Ke)):O(xe)}function xe(e){if(e==`:`)return k(ae);if(e==`(`)return O(Ke)}function Se(e,t,n){function r(i,a){if(n?n.indexOf(i)>-1:i==`,`){var o=D.state.lexical;return o.info==`call`&&(o.pos=(o.pos||0)+1),k(function(n,r){return n==t||r==t?O():O(e)},r)}return i==t||a==t?k():n&&n.indexOf(`;`)>-1?O(e):k(R(t))}return function(n,i){return n==t||i==t?k():O(e,r)}}function Ce(e,t,n){for(var r=3;r<arguments.length;r++)D.cc.push(arguments[r]);return k(I(t,n),Se(e,t),L)}function we(e){return e==`}`?k():O(z,we)}function Te(e,t){if(c){if(e==`:`)return k(H);if(t==`?`)return k(Te)}}function Ee(e,t){if(c&&(e==`:`||t==`in`))return k(H)}function De(e){if(c&&e==`:`)return D.stream.match(/^\s*\w+\s+is\b/,!1)?k(B,Oe,H):k(H)}function Oe(e,t){if(t==`is`)return D.marked=`keyword`,k()}function H(e,t){if(t==`keyof`||t==`typeof`||t==`infer`||t==`readonly`)return D.marked=`keyword`,k(t==`typeof`?ae:H);if(e==`variable`||t==`void`)return D.marked=`type`,k(Me);if(t==`|`||t==`&`)return k(H);if(e==`string`||e==`number`||e==`atom`)return k(Me);if(e==`[`)return k(I(`]`),Se(H,`]`,`,`),L,Me);if(e==`{`)return k(I(`}`),U,L,Me);if(e==`(`)return k(Se(G,`)`),ke,Me);if(e==`<`)return k(Se(H,`>`),H);if(e==`quasi`)return O(je,Me)}function ke(e){if(e==`=>`)return k(H)}function U(e){return e.match(/[\}\)\]]/)?k():e==`,`||e==`;`?k(U):O(Ae,U)}function Ae(e,t){if(e==`variable`||D.style==`keyword`)return D.marked=`property`,k(Ae);if(t==`?`||e==`number`||e==`string`)return k(Ae);if(e==`:`)return k(H);if(e==`[`)return k(R(`variable`),Ee,R(`]`),Ae);if(e==`(`)return O(qe,Ae);if(!e.match(/[;\}\)\],]/))return k()}function je(e,t){return e==`quasi`?t.slice(t.length-2)=="${"?k(H,W):k(je):O()}function W(e){if(e==`}`)return D.marked=`string-2`,D.state.tokenize=b,k(je)}function G(e,t){return e==`variable`&&D.stream.match(/^\s*[?:]/,!1)||t==`?`?k(G):e==`:`?k(H):e==`spread`?k(G):O(H)}function Me(e,t){if(t==`<`)return k(I(`>`),Se(H,`>`),L,Me);if(t==`|`||e==`.`||t==`&`)return k(H);if(e==`[`)return k(H,R(`]`),Me);if(t==`extends`||t==`implements`)return D.marked=`keyword`,k(H);if(t==`?`)return k(H,R(`:`),H)}function Ne(e,t){if(t==`<`)return k(I(`>`),Se(H,`>`),L,Me)}function Pe(){return O(H,Fe)}function Fe(e,t){if(t==`=`)return k(H)}function Ie(e,t){return t==`enum`?(D.marked=`keyword`,k(K)):O(Le,Te,Be,Ve)}function Le(e,t){if(c&&ee(t))return D.marked=`keyword`,k(Le);if(e==`variable`)return j(t),k();if(e==`spread`)return k(Le);if(e==`[`)return Ce(ze,`]`);if(e==`{`)return Ce(Re,`}`)}function Re(e,t){return e==`variable`&&!D.stream.match(/^\s*:/,!1)?(j(t),k(Be)):(e==`variable`&&(D.marked=`property`),e==`spread`?k(Le):e==`}`?O():e==`[`?k(B,R(`]`),R(`:`),Re):k(R(`:`),Le,Be))}function ze(){return O(Le,Be)}function Be(e,t){if(t==`=`)return k(ae)}function Ve(e){if(e==`,`)return k(Ie)}function He(e,t){if(e==`keyword b`&&t==`else`)return k(I(`form`,`else`),z,L)}function Ue(e,t){if(t==`await`)return k(Ue);if(e==`(`)return k(I(`)`),We,L)}function We(e){return e==`var`?k(Ie,Ge):e==`variable`?k(Ge):O(Ge)}function Ge(e,t){return e==`)`?k():e==`;`?k(Ge):t==`in`||t==`of`?(D.marked=`keyword`,k(B,Ge)):O(B,Ge)}function Ke(e,t){if(t==`*`)return D.marked=`keyword`,k(Ke);if(e==`variable`)return j(t),k(Ke);if(e==`(`)return k(P,I(`)`),Se(Ye,`)`),L,De,z,F);if(c&&t==`<`)return k(I(`>`),Se(Pe,`>`),L,Ke)}function qe(e,t){if(t==`*`)return D.marked=`keyword`,k(qe);if(e==`variable`)return j(t),k(qe);if(e==`(`)return k(P,I(`)`),Se(Ye,`)`),L,De,F);if(c&&t==`<`)return k(I(`>`),Se(Pe,`>`),L,qe)}function Je(e,t){if(e==`keyword`||e==`variable`)return D.marked=`type`,k(Je);if(t==`<`)return k(I(`>`),Se(Pe,`>`),L)}function Ye(e,t){return t==`@`&&k(B,Ye),e==`spread`?k(Ye):c&&ee(t)?(D.marked=`keyword`,k(Ye)):c&&e==`this`?k(Te,Be):O(Le,Te,Be)}function Xe(e,t){return e==`variable`?Ze(e,t):Qe(e,t)}function Ze(e,t){if(e==`variable`)return j(t),k(Qe)}function Qe(e,t){if(t==`<`)return k(I(`>`),Se(Pe,`>`),L,Qe);if(t==`extends`||t==`implements`||c&&e==`,`)return t==`implements`&&(D.marked=`keyword`),k(c?H:B,Qe);if(e==`{`)return k(I(`}`),$e,L)}function $e(e,t){if(e==`async`||e==`variable`&&(t==`static`||t==`get`||t==`set`||c&&ee(t))&&D.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return D.marked=`keyword`,k($e);if(e==`variable`||D.style==`keyword`)return D.marked=`property`,k(et,$e);if(e==`number`||e==`string`)return k(et,$e);if(e==`[`)return k(B,Te,R(`]`),et,$e);if(t==`*`)return D.marked=`keyword`,k($e);if(c&&e==`(`)return O(qe,$e);if(e==`;`||e==`,`)return k($e);if(e==`}`)return k();if(t==`@`)return k(B,$e)}function et(e,t){if(t==`!`||t==`?`)return k(et);if(e==`:`)return k(H,Be);if(t==`=`)return k(ae);var n=D.state.lexical.prev;return O(n&&n.info==`interface`?qe:Ke)}function tt(e,t){return t==`*`?(D.marked=`keyword`,k(st,R(`;`))):t=="default"?(D.marked=`keyword`,k(B,R(`;`))):e==`{`?k(Se(nt,`}`),st,R(`;`)):O(z)}function nt(e,t){if(t==`as`)return D.marked=`keyword`,k(R(`variable`));if(e==`variable`)return O(ae,nt)}function rt(e){return e==`string`?k():e==`(`?O(B):e==`.`?O(le):O(it,at,st)}function it(e,t){return e==`{`?Ce(it,`}`):(e==`variable`&&j(t),t==`*`&&(D.marked=`keyword`),k(ot))}function at(e){if(e==`,`)return k(it,at)}function ot(e,t){if(t==`as`)return D.marked=`keyword`,k(it)}function st(e,t){if(t==`from`)return D.marked=`keyword`,k(B)}function ct(e){return e==`]`?k():O(Se(ae,`]`))}function K(){return O(I(`form`),Le,R(`{`),I(`}`),Se(lt,`}`),L,L)}function lt(){return O(Le,Be)}function ut(e,t){return e.lastType==`operator`||e.lastType==`,`||d.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function dt(e,t,n){return t.tokenize==_&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||t.lastType==`quasi`&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return{startState:function(e){var t={tokenize:_,lastType:`sof`,cc:[],lexical:new w((e||0)-r,0,`block`,!1),localVars:n.localVars,context:n.localVars&&new te(null,null,!1),indented:e||0};return n.globalVars&&typeof n.globalVars==`object`&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty(`align`)||(t.lexical.align=!1),t.indented=e.indentation(),S(e,t)),t.tokenize!=y&&e.eatSpace())return null;var n=t.tokenize(e,t);return m==`comment`?n:(t.lastType=m==`operator`&&(h==`++`||h==`--`)?`incdec`:m,E(t,n,m,h,e))},indent:function(t,a){if(t.tokenize==y||t.tokenize==b)return e.Pass;if(t.tokenize!=_)return 0;var o=a&&a.charAt(0),s=t.lexical,c;if(!/^\s*else\b/.test(a))for(var l=t.cc.length-1;l>=0;--l){var u=t.cc[l];if(u==L)s=s.prev;else if(u!=He&&u!=F)break}for(;(s.type==`stat`||s.type==`form`)&&(o==`}`||(c=t.cc[t.cc.length-1])&&(c==le||c==ue)&&!/^[,\.=+\-*:?[\(]/.test(a));)s=s.prev;i&&s.type==`)`&&s.prev.type==`stat`&&(s=s.prev);var d=s.type,f=o==d;return d==`vardef`?s.indented+(t.lastType==`operator`||t.lastType==`,`?s.info.length+1:0):d==`form`&&o==`{`?s.indented:d==`form`?s.indented+r:d==`stat`?s.indented+(ut(t,a)?i||r:0):s.info==`switch`&&!f&&n.doubleIndentSwitch!=0?s.indented+(/^(?:case|default)\b/.test(a)?r:2*r):s.align?s.column+ +!f:s.indented+(f?0:r)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:o?null:`/*`,blockCommentEnd:o?null:`*/`,blockCommentContinue:o?null:` * `,lineComment:o?null:`//`,fold:`brace`,closeBrackets:`()[]{}''""\`\``,helperType:o?`json`:`javascript`,jsonldMode:a,jsonMode:o,expressionAllowed:dt,skipExpression:function(t){E(t,`atom`,`atom`,`true`,new e.StringStream(``,2,null))}}}),e.registerHelper(`wordChars`,`javascript`,/[\w$]/),e.defineMIME(`text/javascript`,`javascript`),e.defineMIME(`text/ecmascript`,`javascript`),e.defineMIME(`application/javascript`,`javascript`),e.defineMIME(`application/x-javascript`,`javascript`),e.defineMIME(`application/ecmascript`,`javascript`),e.defineMIME(`application/json`,{name:`javascript`,json:!0}),e.defineMIME(`application/x-json`,{name:`javascript`,json:!0}),e.defineMIME(`application/manifest+json`,{name:`javascript`,json:!0}),e.defineMIME(`application/ld+json`,{name:`javascript`,jsonld:!0}),e.defineMIME(`text/typescript`,{name:`javascript`,typescript:!0}),e.defineMIME(`application/typescript`,{name:`javascript`,typescript:!0})})})),s=e(((e,t)=>{(function(r){typeof e==`object`&&typeof t==`object`?r(n(),a(),o(),i()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`../xml/xml`,`../javascript/javascript`,`../css/css`],r):r(CodeMirror)})(function(e){var t={script:[[`lang`,/(javascript|babel)/i,`javascript`],[`type`,/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,`javascript`],[`type`,/./,`text/plain`],[null,null,`javascript`]],style:[[`lang`,/^css$/i,`css`],[`type`,/^(text\/)?(x-)?(stylesheet|css)$/i,`css`],[`type`,/./,`text/plain`],[null,null,`css`]]};function n(e,t,n){var r=e.current(),i=r.search(t);return i>-1?e.backUp(r.length-i):r.match(/<\/?$/)&&(e.backUp(r.length),e.match(t,!1)||e.match(r)),n}var r={};function i(e){return r[e]||(r[e]=RegExp(`\\s+`+e+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function a(e,t){var n=e.match(i(t));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:``}function o(e,t){return RegExp((t?`^`:``)+`</\\s*`+e+`\\s*>`,`i`)}function s(e,t){for(var n in e)for(var r=t[n]||(t[n]=[]),i=e[n],a=i.length-1;a>=0;a--)r.unshift(i[a])}function c(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(!r[0]||r[1].test(a(t,r[0])))return r[2]}}e.defineMode(`htmlmixed`,function(r,i){var a=e.getMode(r,{name:`xml`,htmlMode:!0,multilineTagIndentFactor:i.multilineTagIndentFactor,multilineTagIndentPastTag:i.multilineTagIndentPastTag,allowMissingTagName:i.allowMissingTagName}),l={},u=i&&i.tags,d=i&&i.scriptTypes;if(s(t,l),u&&s(u,l),d)for(var f=d.length-1;f>=0;f--)l.script.unshift([`type`,d[f].matches,d[f].mode]);function p(t,i){var s=a.token(t,i.htmlState),u=/\btag\b/.test(s),d;if(u&&!/[<>\s\/]/.test(t.current())&&(d=i.htmlState.tagName&&i.htmlState.tagName.toLowerCase())&&l.hasOwnProperty(d))i.inTag=d+` `;else if(i.inTag&&u&&/>$/.test(t.current())){var f=/^([\S]+) (.*)/.exec(i.inTag);i.inTag=null;var m=t.current()==`>`&&c(l[f[1]],f[2]),h=e.getMode(r,m),g=o(f[1],!0),_=o(f[1],!1);i.token=function(e,t){return e.match(g,!1)?(t.token=p,t.localState=t.localMode=null,null):n(e,_,t.localMode.token(e,t.localState))},i.localMode=h,i.localState=e.startState(h,a.indent(i.htmlState,``,``))}else i.inTag&&(i.inTag+=t.current(),t.eol()&&(i.inTag+=` `));return s}return{startState:function(){return{token:p,inTag:null,localMode:null,localState:null,htmlState:e.startState(a)}},copyState:function(t){var n;return t.localState&&(n=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:n,htmlState:e.copyState(a,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,n,r){return!t.localMode||/^\s*<\//.test(n)?a.indent(t.htmlState,n,r):t.localMode.indent?t.localMode.indent(t.localState,n,r):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||a}}}},`xml`,`javascript`,`css`),e.defineMIME(`text/html`,`htmlmixed`)})})),c=e(((e,t)=>{(function(r){typeof e==`object`&&typeof t==`object`?r(n()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],r):r(CodeMirror)})(function(e){function t(e){return RegExp(`^((`+e.join(`)|(`)+`))\\b`)}var n=t([`and`,`or`,`not`,`is`]),r=`as.assert.break.class.continue.def.del.elif.else.except.finally.for.from.global.if.import.lambda.pass.raise.return.try.while.with.yield.in.False.True`.split(`.`),i=`abs.all.any.bin.bool.bytearray.callable.chr.classmethod.compile.complex.delattr.dict.dir.divmod.enumerate.eval.filter.float.format.frozenset.getattr.globals.hasattr.hash.help.hex.id.input.int.isinstance.issubclass.iter.len.list.locals.map.max.memoryview.min.next.object.oct.open.ord.pow.property.range.repr.reversed.round.set.setattr.slice.sorted.staticmethod.str.sum.super.tuple.type.vars.zip.__import__.NotImplemented.Ellipsis.__debug__`.split(`.`);e.registerHelper(`hintWords`,`python`,r.concat(i).concat([`exec`,`print`]));function a(e){return e.scopes[e.scopes.length-1]}e.defineMode(`python`,function(o,s){for(var c=`error`,l=s.delimiters||s.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,u=[s.singleOperators,s.doubleOperators,s.doubleDelimiters,s.tripleDelimiters,s.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],d=0;d<u.length;d++)u[d]||u.splice(d--,1);var f=s.hangingIndent||o.indentUnit,p=r,m=i;s.extra_keywords!=null&&(p=p.concat(s.extra_keywords)),s.extra_builtins!=null&&(m=m.concat(s.extra_builtins));var h=!(s.version&&Number(s.version)<3);if(h){var g=s.identifiers||/^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*/;p=p.concat([`nonlocal`,`None`,`aiter`,`anext`,`async`,`await`,`breakpoint`,`match`,`case`]),m=m.concat([`ascii`,`bytes`,`exec`,`print`]);var _=RegExp(`^(([rbuf]|(br)|(rb)|(fr)|(rf))?('{3}|"{3}|['"]))`,`i`)}else{var g=s.identifiers||/^[_A-Za-z][_A-Za-z0-9]*/;p=p.concat([`exec`,`print`]),m=m.concat([`apply`,`basestring`,`buffer`,`cmp`,`coerce`,`execfile`,`file`,`intern`,`long`,`raw_input`,`reduce`,`reload`,`unichr`,`unicode`,`xrange`,`None`]);var _=RegExp(`^(([rubf]|(ur)|(br))?('{3}|"{3}|['"]))`,`i`)}var v=t(p),y=t(m);function b(e,t){var n=e.sol()&&t.lastToken!=`\\`;if(n&&(t.indent=e.indentation()),n&&a(t).type==`py`){var r=a(t).offset;if(e.eatSpace()){var i=e.indentation();return i>r?w(t):i<r&&E(e,t)&&e.peek()!=`#`&&(t.errorToken=!0),null}else{var o=x(e,t);return r>0&&E(e,t)&&(o+=` `+c),o}}return x(e,t)}function x(e,t,r){if(e.eatSpace())return null;if(!r&&e.match(/^#.*/))return`comment`;if(e.match(/^[0-9\.]/,!1)){var i=!1;if(e.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(i=!0),e.match(/^[\d_]+\.\d*/)&&(i=!0),e.match(/^\.\d+/)&&(i=!0),i)return e.eat(/J/i),`number`;var a=!1;if(e.match(/^0x[0-9a-f_]+/i)&&(a=!0),e.match(/^0b[01_]+/i)&&(a=!0),e.match(/^0o[0-7_]+/i)&&(a=!0),e.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(e.eat(/J/i),a=!0),e.match(/^0(?![\dx])/i)&&(a=!0),a)return e.eat(/L/i),`number`}if(e.match(_))return e.current().toLowerCase().indexOf(`f`)===-1?(t.tokenize=C(e.current(),t.tokenize),t.tokenize(e,t)):(t.tokenize=S(e.current(),t.tokenize),t.tokenize(e,t));for(var o=0;o<u.length;o++)if(e.match(u[o]))return`operator`;return e.match(l)?`punctuation`:t.lastToken==`.`&&e.match(g)?`property`:e.match(v)||e.match(n)?`keyword`:e.match(y)?`builtin`:e.match(/^(self|cls)\b/)?`variable-2`:e.match(g)?t.lastToken==`def`||t.lastToken==`class`?`def`:`variable`:(e.next(),r?null:c)}function S(e,t){for(;`rubf`.indexOf(e.charAt(0).toLowerCase())>=0;)e=e.substr(1);var n=e.length==1,r=`string`;function i(e){return function(t,n){var r=x(t,n,!0);return r==`punctuation`&&(t.current()==`{`?n.tokenize=i(e+1):t.current()==`}`&&(e>1?n.tokenize=i(e-1):n.tokenize=a)),r}}function a(a,o){for(;!a.eol();)if(a.eatWhile(/[^'"\{\}\\]/),a.eat(`\\`)){if(a.next(),n&&a.eol())return r}else if(a.match(e))return o.tokenize=t,r;else if(a.match(`{{`))return r;else if(a.match(`{`,!1))return o.tokenize=i(0),a.current()?r:o.tokenize(a,o);else if(a.match(`}}`))return r;else if(a.match(`}`))return c;else a.eat(/['"]/);if(n){if(s.singleLineStringErrors)return c;o.tokenize=t}return r}return a.isString=!0,a}function C(e,t){for(;`rubf`.indexOf(e.charAt(0).toLowerCase())>=0;)e=e.substr(1);var n=e.length==1,r=`string`;function i(i,a){for(;!i.eol();)if(i.eatWhile(/[^'"\\]/),i.eat(`\\`)){if(i.next(),n&&i.eol())return r}else if(i.match(e))return a.tokenize=t,r;else i.eat(/['"]/);if(n){if(s.singleLineStringErrors)return c;a.tokenize=t}return r}return i.isString=!0,i}function w(e){for(;a(e).type!=`py`;)e.scopes.pop();e.scopes.push({offset:a(e).offset+o.indentUnit,type:`py`,align:null})}function T(e,t,n){var r=e.match(/^[\s\[\{\(]*(?:#|$)/,!1)?null:e.column()+1;t.scopes.push({offset:t.indent+f,type:n,align:r})}function E(e,t){for(var n=e.indentation();t.scopes.length>1&&a(t).offset>n;){if(a(t).type!=`py`)return!0;t.scopes.pop()}return a(t).offset!=n}function D(e,t){e.sol()&&(t.beginningOfLine=!0,t.dedent=!1);var n=t.tokenize(e,t),r=e.current();if(t.beginningOfLine&&r==`@`)return e.match(g,!1)?`meta`:h?`operator`:c;if(/\S/.test(r)&&(t.beginningOfLine=!1),(n==`variable`||n==`builtin`)&&t.lastToken==`meta`&&(n=`meta`),(r==`pass`||r==`return`)&&(t.dedent=!0),r==`lambda`&&(t.lambda=!0),r==`:`&&!t.lambda&&a(t).type==`py`&&e.match(/^\s*(?:#|$)/,!1)&&w(t),r.length==1&&!/string|comment/.test(n)){var i=`[({`.indexOf(r);if(i!=-1&&T(e,t,`])}`.slice(i,i+1)),i=`])}`.indexOf(r),i!=-1)if(a(t).type==r)t.indent=t.scopes.pop().offset-f;else return c}return t.dedent&&e.eol()&&a(t).type==`py`&&t.scopes.length>1&&t.scopes.pop(),n}return{startState:function(e){return{tokenize:b,scopes:[{offset:e||0,type:`py`,align:null}],indent:e||0,lastToken:null,lambda:!1,dedent:0}},token:function(e,t){var n=t.errorToken;n&&(t.errorToken=!1);var r=D(e,t);return r&&r!=`comment`&&(t.lastToken=r==`keyword`||r==`punctuation`?e.current():r),r==`punctuation`&&(r=null),e.eol()&&t.lambda&&(t.lambda=!1),n?r+` `+c:r},indent:function(t,n){if(t.tokenize!=b)return t.tokenize.isString?e.Pass:0;var r=a(t),i=r.type==n.charAt(0)||r.type==`py`&&!t.dedent&&/^(else:|elif |except |finally:)/.test(n);return r.align==null?r.offset-(i?f:0):r.align-+!!i},electricInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/,closeBrackets:{triples:`'"`},lineComment:`#`,fold:`indent`}}),e.defineMIME(`text/x-python`,`python`),e.defineMIME(`text/x-cython`,{name:`python`,extra_keywords:function(e){return e.split(` `)}(`by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE`)})})})),l=e(((e,t)=>{(function(r){typeof e==`object`&&typeof t==`object`?r(n()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],r):r(CodeMirror)})(function(e){function t(e,t,n,r,i,a){this.indented=e,this.column=t,this.type=n,this.info=r,this.align=i,this.prev=a}function n(e,n,r,i){var a=e.indented;return e.context&&e.context.type==`statement`&&r!=`statement`&&(a=e.context.indented),e.context=new t(a,n,r,i,null,e.context)}function r(e){var t=e.context.type;return(t==`)`||t==`]`||t==`}`)&&(e.indented=e.context.indented),e.context=e.context.prev}function i(e,t,n){if(t.prevToken==`variable`||t.prevToken==`type`||/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,n))||t.typeAtEndOfLine&&e.column()==e.indentation())return!0}function a(e){for(;;){if(!e||e.type==`top`)return!0;if(e.type==`}`&&e.prev.info!=`namespace`)return!1;e=e.prev}}e.defineMode(`clike`,function(o,c){var l=o.indentUnit,u=c.statementIndentUnit||l,d=c.dontAlignCalls,f=c.keywords||{},p=c.types||{},m=c.builtin||{},h=c.blockKeywords||{},g=c.defKeywords||{},_=c.atoms||{},v=c.hooks||{},y=c.multiLineStrings,b=c.indentStatements!==!1,x=c.indentSwitch!==!1,S=c.namespaceSeparator,C=c.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,w=c.numberStart||/[\d\.]/,T=c.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,E=c.isOperatorChar||/[+\-*&%=<>!?|\/]/,D=c.isIdentifierChar||/[\w\$_\xa1-\uffff]/,O=c.isReservedIdentifier||!1,k,A;function j(e,t){var n=e.next();if(v[n]){var r=v[n](e,t);if(r!==!1)return r}if(n==`"`||n==`'`)return t.tokenize=M(n),t.tokenize(e,t);if(w.test(n)){if(e.backUp(1),e.match(T))return`number`;e.next()}if(C.test(n))return k=n,null;if(n==`/`){if(e.eat(`*`))return t.tokenize=ee,ee(e,t);if(e.eat(`/`))return e.skipToEnd(),`comment`}if(E.test(n)){for(;!e.match(/^\/[\/*]/,!1)&&e.eat(E););return`operator`}if(e.eatWhile(D),S)for(;e.match(S);)e.eatWhile(D);var i=e.current();return s(f,i)?(s(h,i)&&(k=`newstatement`),s(g,i)&&(A=!0),`keyword`):s(p,i)?`type`:s(m,i)||O&&O(i)?(s(h,i)&&(k=`newstatement`),`builtin`):s(_,i)?`atom`:`variable`}function M(e){return function(t,n){for(var r=!1,i,a=!1;(i=t.next())!=null;){if(i==e&&!r){a=!0;break}r=!r&&i==`\\`}return(a||!(r||y))&&(n.tokenize=null),`string`}}function ee(e,t){for(var n=!1,r;r=e.next();){if(r==`/`&&n){t.tokenize=null;break}n=r==`*`}return`comment`}function te(e,t){c.typeFirstDefinitions&&e.eol()&&a(t.context)&&(t.typeAtEndOfLine=i(e,t,e.pos))}return{startState:function(e){return{tokenize:null,context:new t((e||0)-l,0,`top`,null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(e,t){var o=t.context;if(e.sol()&&(o.align??=!1,t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return te(e,t),null;k=A=null;var s=(t.tokenize||j)(e,t);if(s==`comment`||s==`meta`)return s;if(o.align??=!0,k==`;`||k==`:`||k==`,`&&e.match(/^\s*(?:\/\/.*)?$/,!1))for(;t.context.type==`statement`;)r(t);else if(k==`{`)n(t,e.column(),`}`);else if(k==`[`)n(t,e.column(),`]`);else if(k==`(`)n(t,e.column(),`)`);else if(k==`}`){for(;o.type==`statement`;)o=r(t);for(o.type==`}`&&(o=r(t));o.type==`statement`;)o=r(t)}else k==o.type?r(t):b&&((o.type==`}`||o.type==`top`)&&k!=`;`||o.type==`statement`&&k==`newstatement`)&&n(t,e.column(),`statement`,e.current());if(s==`variable`&&(t.prevToken==`def`||c.typeFirstDefinitions&&i(e,t,e.start)&&a(t.context)&&e.match(/^\s*\(/,!1))&&(s=`def`),v.token){var l=v.token(e,t,s);l!==void 0&&(s=l)}return s==`def`&&c.styleDefs===!1&&(s=`variable`),t.startOfLine=!1,t.prevToken=A?`def`:s||k,te(e,t),s},indent:function(t,n){if(t.tokenize!=j&&t.tokenize!=null||t.typeAtEndOfLine&&a(t.context))return e.Pass;var r=t.context,i=n&&n.charAt(0),o=i==r.type;if(r.type==`statement`&&i==`}`&&(r=r.prev),c.dontIndentStatements)for(;r.type==`statement`&&c.dontIndentStatements.test(r.info);)r=r.prev;if(v.indent){var s=v.indent(t,r,n,l);if(typeof s==`number`)return s}var f=r.prev&&r.prev.info==`switch`;if(c.allmanIndentation&&/[{(]/.test(i)){for(;r.type!=`top`&&r.type!=`}`;)r=r.prev;return r.indented}return r.type==`statement`?r.indented+(i==`{`?0:u):r.align&&(!d||r.type!=`)`)?r.column+ +!o:r.type==`)`&&!o?r.indented+u:r.indented+(o?0:l)+(!o&&f&&!/^(?:case|default)\b/.test(n)?l:0)},electricInput:x?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:`/*`,blockCommentEnd:`*/`,blockCommentContinue:` * `,lineComment:`//`,fold:`brace`}});function o(e){for(var t={},n=e.split(` `),r=0;r<n.length;++r)t[n[r]]=!0;return t}function s(e,t){return typeof e==`function`?e(t):e.propertyIsEnumerable(t)}var c=`auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile inline restrict asm fortran`,l=`alignas alignof and and_eq audit axiom bitand bitor catch class compl concept constexpr const_cast decltype delete dynamic_cast explicit export final friend import module mutable namespace new noexcept not not_eq operator or or_eq override private protected public reinterpret_cast requires static_assert static_cast template this thread_local throw try typeid typename using virtual xor xor_eq`,u=`bycopy byref in inout oneway out self super atomic nonatomic retain copy readwrite readonly strong weak assign typeof nullable nonnull null_resettable _cmd @interface @implementation @end @protocol @encode @property @synthesize @dynamic @class @public @package @private @protected @required @optional @try @catch @finally @import @selector @encode @defs @synchronized @autoreleasepool @compatibility_alias @available`,d=`FOUNDATION_EXPORT FOUNDATION_EXTERN NS_INLINE NS_FORMAT_FUNCTION NS_RETURNS_RETAINEDNS_ERROR_ENUM NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER NS_DESIGNATED_INITIALIZER NS_ENUM NS_OPTIONS NS_REQUIRES_NIL_TERMINATION NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_SWIFT_NAME NS_REFINED_FOR_SWIFT`,f=o(`int long char short double float unsigned signed void bool`),p=o(`SEL instancetype id Class Protocol BOOL`);function m(e){return s(f,e)||/.+_t$/.test(e)}function h(e){return m(e)||s(p,e)}var g=`case do else for if switch while struct enum union`,_=`struct enum union`;function v(e,t){if(!t.startOfLine)return!1;for(var n,r=null;n=e.peek();){if(n==`\\`&&e.match(/^.$/)){r=v;break}else if(n==`/`&&e.match(/^\/[\/\*]/,!1))break;e.next()}return t.tokenize=r,`meta`}function y(e,t){return t.prevToken==`type`?`type`:!1}function b(e){return!e||e.length<2||e[0]!=`_`?!1:e[1]==`_`||e[1]!==e[1].toLowerCase()}function x(e){return e.eatWhile(/[\w\.']/),`number`}function S(e,t){if(e.backUp(1),e.match(/^(?:R|u8R|uR|UR|LR)/)){var n=e.match(/^"([^\s\\()]{0,16})\(/);return n?(t.cpp11RawStringDelim=n[1],t.tokenize=T,T(e,t)):!1}return e.match(/^(?:u8|u|U|L)/)?e.match(/^["']/,!1)?`string`:!1:(e.next(),!1)}function C(e){var t=/(\w+)::~?(\w+)$/.exec(e);return t&&t[1]==t[2]}function w(e,t){for(var n;(n=e.next())!=null;)if(n==`"`&&!e.eat(`"`)){t.tokenize=null;break}return`string`}function T(e,t){var n=t.cpp11RawStringDelim.replace(/[^\w\s]/g,`\\$&`);return e.match(RegExp(`.*?\\)`+n+`"`))?t.tokenize=null:e.skipToEnd(),`string`}function E(t,n){typeof t==`string`&&(t=[t]);var r=[];function i(e){if(e)for(var t in e)e.hasOwnProperty(t)&&r.push(t)}i(n.keywords),i(n.types),i(n.builtin),i(n.atoms),r.length&&(n.helperType=t[0],e.registerHelper(`hintWords`,t[0],r));for(var a=0;a<t.length;++a)e.defineMIME(t[a],n)}E([`text/x-csrc`,`text/x-c`,`text/x-chdr`],{name:`clike`,keywords:o(c),types:m,blockKeywords:o(g),defKeywords:o(_),typeFirstDefinitions:!0,atoms:o(`NULL true false`),isReservedIdentifier:b,hooks:{"#":v,"*":y},modeProps:{fold:[`brace`,`include`]}}),E([`text/x-c++src`,`text/x-c++hdr`],{name:`clike`,keywords:o(c+` `+l),types:m,blockKeywords:o(g+` class try catch`),defKeywords:o(_+` class namespace`),typeFirstDefinitions:!0,atoms:o(`true false NULL nullptr`),dontIndentStatements:/^template$/,isIdentifierChar:/[\w\$_~\xa1-\uffff]/,isReservedIdentifier:b,hooks:{"#":v,"*":y,u:S,U:S,L:S,R:S,0:x,1:x,2:x,3:x,4:x,5:x,6:x,7:x,8:x,9:x,token:function(e,t,n){if(n==`variable`&&e.peek()==`(`&&(t.prevToken==`;`||t.prevToken==null||t.prevToken==`}`)&&C(e.current()))return`def`}},namespaceSeparator:`::`,modeProps:{fold:[`brace`,`include`]}}),E(`text/x-java`,{name:`clike`,keywords:o(`abstract assert break case catch class const continue default do else enum extends final finally for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while @interface`),types:o(`var byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void`),blockKeywords:o(`catch class do else finally for if switch try while`),defKeywords:o(`class interface enum @interface`),typeFirstDefinitions:!0,atoms:o(`true false null`),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(e){return e.match(`interface`,!1)?!1:(e.eatWhile(/[\w\$_]/),`meta`)},'"':function(e,t){return e.match(/""$/)?(t.tokenize=D,t.tokenize(e,t)):!1}},modeProps:{fold:[`brace`,`import`]}}),E(`text/x-csharp`,{name:`clike`,keywords:o(`abstract as async await base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in init interface internal is lock namespace new operator out override params private protected public readonly record ref required return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield`),types:o(`Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong`),blockKeywords:o(`catch class do else finally for foreach if struct switch try while`),defKeywords:o(`class interface namespace record struct var`),typeFirstDefinitions:!0,atoms:o(`true false null`),hooks:{"@":function(e,t){return e.eat(`"`)?(t.tokenize=w,w(e,t)):(e.eatWhile(/[\w\$_]/),`meta`)}}});function D(e,t){for(var n=!1;!e.eol();){if(!n&&e.match(`"""`)){t.tokenize=null;break}n=e.next()==`\\`&&!n}return`string`}function O(e){return function(t,n){for(var r;r=t.next();)if(r==`*`&&t.eat(`/`))if(e==1){n.tokenize=null;break}else return n.tokenize=O(e-1),n.tokenize(t,n);else if(r==`/`&&t.eat(`*`))return n.tokenize=O(e+1),n.tokenize(t,n);return`comment`}}E(`text/x-scala`,{name:`clike`,keywords:o(`abstract case catch class def do else extends final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try type val var while with yield _ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble`),types:o(`AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void`),multiLineStrings:!0,blockKeywords:o(`catch class enum do else finally for forSome if match switch try while`),defKeywords:o(`class enum def object package trait type val var`),atoms:o(`true false null`),indentStatements:!1,indentSwitch:!1,isOperatorChar:/[+\-*&%=<>!?|\/#:@]/,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),`meta`},'"':function(e,t){return e.match(`""`)?(t.tokenize=D,t.tokenize(e,t)):!1},"'":function(e){return e.match(/^(\\[^'\s]+|[^\\'])'/)?`string-2`:(e.eatWhile(/[\w\$_\xa1-\uffff]/),`atom`)},"=":function(e,n){var r=n.context;return r.type==`}`&&r.align&&e.eat(`>`)?(n.context=new t(r.indented,r.column,r.type,r.info,null,r.prev),`operator`):!1},"/":function(e,t){return e.eat(`*`)?(t.tokenize=O(1),t.tokenize(e,t)):!1}},modeProps:{closeBrackets:{pairs:`()[]{}""`,triples:`"`}}});function k(e){return function(t,n){for(var r=!1,i,a=!1;!t.eol();){if(!e&&!r&&t.match(`"`)){a=!0;break}if(e&&t.match(`"""`)){a=!0;break}i=t.next(),!r&&i==`$`&&t.match(`{`)&&t.skipTo(`}`),r=!r&&i==`\\`&&!e}return(a||!e)&&(n.tokenize=null),`string`}}E(`text/x-kotlin`,{name:`clike`,keywords:o(`package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam value`),types:o(`Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit`),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:o(`catch class do else finally for if where try while enum`),defKeywords:o(`class val var object interface fun`),atoms:o(`true false null this`),hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),`meta`},"*":function(e,t){return t.prevToken==`.`?`variable`:`operator`},'"':function(e,t){return t.tokenize=k(e.match(`""`)),t.tokenize(e,t)},"/":function(e,t){return e.eat(`*`)?(t.tokenize=O(1),t.tokenize(e,t)):!1},indent:function(e,t,n,r){var i=n&&n.charAt(0);if((e.prevToken==`}`||e.prevToken==`)`)&&n==``)return e.indented;if(e.prevToken==`operator`&&n!=`}`&&e.context.type!=`}`||e.prevToken==`variable`&&i==`.`||(e.prevToken==`}`||e.prevToken==`)`)&&i==`.`)return r*2+t.indented;if(t.align&&t.type==`}`)return t.indented+(e.context.type==(n||``).charAt(0)?0:r)}},modeProps:{closeBrackets:{triples:`"`}}}),E([`x-shader/x-vertex`,`x-shader/x-fragment`],{name:`clike`,keywords:o(`sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout`),types:o(`float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4`),blockKeywords:o(`for while do if else struct`),builtin:o(`radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4`),atoms:o(`true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TextureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers`),indentSwitch:!1,hooks:{"#":v},modeProps:{fold:[`brace`,`include`]}}),E(`text/x-nesc`,{name:`clike`,keywords:o(c+` as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends`),types:m,blockKeywords:o(g),atoms:o(`null true false`),hooks:{"#":v},modeProps:{fold:[`brace`,`include`]}}),E(`text/x-objectivec`,{name:`clike`,keywords:o(c+` `+u),types:h,builtin:o(d),blockKeywords:o(g+` @synthesize @try @catch @finally @autoreleasepool @synchronized`),defKeywords:o(_+` @interface @implementation @protocol @class`),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:o(`YES NO NULL Nil nil true false nullptr`),isReservedIdentifier:b,hooks:{"#":v,"*":y},modeProps:{fold:[`brace`,`include`]}}),E(`text/x-objectivec++`,{name:`clike`,keywords:o(c+` `+u+` `+l),types:h,builtin:o(d),blockKeywords:o(g+` @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch`),defKeywords:o(_+` @interface @implementation @protocol @class class namespace`),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:o(`YES NO NULL Nil nil true false nullptr`),isReservedIdentifier:b,hooks:{"#":v,"*":y,u:S,U:S,L:S,R:S,0:x,1:x,2:x,3:x,4:x,5:x,6:x,7:x,8:x,9:x,token:function(e,t,n){if(n==`variable`&&e.peek()==`(`&&(t.prevToken==`;`||t.prevToken==null||t.prevToken==`}`)&&C(e.current()))return`def`}},namespaceSeparator:`::`,modeProps:{fold:[`brace`,`include`]}}),E(`text/x-squirrel`,{name:`clike`,keywords:o(`base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static`),types:m,blockKeywords:o(`case catch class else for foreach if switch try while`),defKeywords:o(`function local class`),typeFirstDefinitions:!0,atoms:o(`true false null`),hooks:{"#":v},modeProps:{fold:[`brace`,`include`]}});var A=null;function j(e){return function(t,n){for(var r=!1,i,a=!1;!t.eol();){if(!r&&t.match(`"`)&&(e==`single`||t.match(`""`))){a=!0;break}if(!r&&t.match("``")){A=j(e),a=!0;break}i=t.next(),r=e==`single`&&!r&&i==`\\`}return a&&(n.tokenize=null),`string`}}E(`text/x-ceylon`,{name:`clike`,keywords:o(`abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while`),types:function(e){var t=e.charAt(0);return t===t.toUpperCase()&&t!==t.toLowerCase()},blockKeywords:o(`case catch class dynamic else finally for function if interface module new object switch try while`),defKeywords:o(`class dynamic function interface module object package value`),builtin:o(`abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable`),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:o(`true false null larger smaller equal empty finished`),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),`meta`},'"':function(e,t){return t.tokenize=j(e.match(`""`)?`triple`:`single`),t.tokenize(e,t)},"`":function(e,t){return!A||!e.match("`")?!1:(t.tokenize=A,A=null,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),`atom`},token:function(e,t,n){if((n==`variable`||n==`type`)&&t.prevToken==`.`)return`variable-2`}},modeProps:{fold:[`brace`,`import`],closeBrackets:{triples:`"`}}})})})),u=e(((e,t)=>{(function(r){typeof e==`object`&&typeof t==`object`?r(n()):typeof define==`function`&&define.amd?define([`../lib/codemirror`],r):r(CodeMirror)})(function(e){e.modeInfo=[{name:`APL`,mime:`text/apl`,mode:`apl`,ext:[`dyalog`,`apl`]},{name:`PGP`,mimes:[`application/pgp`,`application/pgp-encrypted`,`application/pgp-keys`,`application/pgp-signature`],mode:`asciiarmor`,ext:[`asc`,`pgp`,`sig`]},{name:`ASN.1`,mime:`text/x-ttcn-asn`,mode:`asn.1`,ext:[`asn`,`asn1`]},{name:`Asterisk`,mime:`text/x-asterisk`,mode:`asterisk`,file:/^extensions\.conf$/i},{name:`Brainfuck`,mime:`text/x-brainfuck`,mode:`brainfuck`,ext:[`b`,`bf`]},{name:`C`,mime:`text/x-csrc`,mode:`clike`,ext:[`c`,`h`,`ino`]},{name:`C++`,mime:`text/x-c++src`,mode:`clike`,ext:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],alias:[`cpp`]},{name:`Cobol`,mime:`text/x-cobol`,mode:`cobol`,ext:[`cob`,`cpy`,`cbl`]},{name:`C#`,mime:`text/x-csharp`,mode:`clike`,ext:[`cs`],alias:[`csharp`,`cs`]},{name:`Clojure`,mime:`text/x-clojure`,mode:`clojure`,ext:[`clj`,`cljc`,`cljx`]},{name:`ClojureScript`,mime:`text/x-clojurescript`,mode:`clojure`,ext:[`cljs`]},{name:`Closure Stylesheets (GSS)`,mime:`text/x-gss`,mode:`css`,ext:[`gss`]},{name:`CMake`,mime:`text/x-cmake`,mode:`cmake`,ext:[`cmake`,`cmake.in`],file:/^CMakeLists\.txt$/},{name:`CoffeeScript`,mimes:[`application/vnd.coffeescript`,`text/coffeescript`,`text/x-coffeescript`],mode:`coffeescript`,ext:[`coffee`],alias:[`coffee`,`coffee-script`]},{name:`Common Lisp`,mime:`text/x-common-lisp`,mode:`commonlisp`,ext:[`cl`,`lisp`,`el`],alias:[`lisp`]},{name:`Cypher`,mime:`application/x-cypher-query`,mode:`cypher`,ext:[`cyp`,`cypher`]},{name:`Cython`,mime:`text/x-cython`,mode:`python`,ext:[`pyx`,`pxd`,`pxi`]},{name:`Crystal`,mime:`text/x-crystal`,mode:`crystal`,ext:[`cr`]},{name:`CSS`,mime:`text/css`,mode:`css`,ext:[`css`]},{name:`CQL`,mime:`text/x-cassandra`,mode:`sql`,ext:[`cql`]},{name:`D`,mime:`text/x-d`,mode:`d`,ext:[`d`]},{name:`Dart`,mimes:[`application/dart`,`text/x-dart`],mode:`dart`,ext:[`dart`]},{name:`diff`,mime:`text/x-diff`,mode:`diff`,ext:[`diff`,`patch`]},{name:`Django`,mime:`text/x-django`,mode:`django`},{name:`Dockerfile`,mime:`text/x-dockerfile`,mode:`dockerfile`,file:/^Dockerfile$/},{name:`DTD`,mime:`application/xml-dtd`,mode:`dtd`,ext:[`dtd`]},{name:`Dylan`,mime:`text/x-dylan`,mode:`dylan`,ext:[`dylan`,`dyl`,`intr`]},{name:`EBNF`,mime:`text/x-ebnf`,mode:`ebnf`},{name:`ECL`,mime:`text/x-ecl`,mode:`ecl`,ext:[`ecl`]},{name:`edn`,mime:`application/edn`,mode:`clojure`,ext:[`edn`]},{name:`Eiffel`,mime:`text/x-eiffel`,mode:`eiffel`,ext:[`e`]},{name:`Elm`,mime:`text/x-elm`,mode:`elm`,ext:[`elm`]},{name:`Embedded JavaScript`,mime:`application/x-ejs`,mode:`htmlembedded`,ext:[`ejs`]},{name:`Embedded Ruby`,mime:`application/x-erb`,mode:`htmlembedded`,ext:[`erb`]},{name:`Erlang`,mime:`text/x-erlang`,mode:`erlang`,ext:[`erl`]},{name:`Esper`,mime:`text/x-esper`,mode:`sql`},{name:`Factor`,mime:`text/x-factor`,mode:`factor`,ext:[`factor`]},{name:`FCL`,mime:`text/x-fcl`,mode:`fcl`},{name:`Forth`,mime:`text/x-forth`,mode:`forth`,ext:[`forth`,`fth`,`4th`]},{name:`Fortran`,mime:`text/x-fortran`,mode:`fortran`,ext:[`f`,`for`,`f77`,`f90`,`f95`]},{name:`F#`,mime:`text/x-fsharp`,mode:`mllike`,ext:[`fs`],alias:[`fsharp`]},{name:`Gas`,mime:`text/x-gas`,mode:`gas`,ext:[`s`]},{name:`Gherkin`,mime:`text/x-feature`,mode:`gherkin`,ext:[`feature`]},{name:`GitHub Flavored Markdown`,mime:`text/x-gfm`,mode:`gfm`,file:/^(readme|contributing|history)\.md$/i},{name:`Go`,mime:`text/x-go`,mode:`go`,ext:[`go`]},{name:`Groovy`,mime:`text/x-groovy`,mode:`groovy`,ext:[`groovy`,`gradle`],file:/^Jenkinsfile$/},{name:`HAML`,mime:`text/x-haml`,mode:`haml`,ext:[`haml`]},{name:`Haskell`,mime:`text/x-haskell`,mode:`haskell`,ext:[`hs`]},{name:`Haskell (Literate)`,mime:`text/x-literate-haskell`,mode:`haskell-literate`,ext:[`lhs`]},{name:`Haxe`,mime:`text/x-haxe`,mode:`haxe`,ext:[`hx`]},{name:`HXML`,mime:`text/x-hxml`,mode:`haxe`,ext:[`hxml`]},{name:`ASP.NET`,mime:`application/x-aspx`,mode:`htmlembedded`,ext:[`aspx`],alias:[`asp`,`aspx`]},{name:`HTML`,mime:`text/html`,mode:`htmlmixed`,ext:[`html`,`htm`,`handlebars`,`hbs`],alias:[`xhtml`]},{name:`HTTP`,mime:`message/http`,mode:`http`},{name:`IDL`,mime:`text/x-idl`,mode:`idl`,ext:[`pro`]},{name:`Pug`,mime:`text/x-pug`,mode:`pug`,ext:[`jade`,`pug`],alias:[`jade`]},{name:`Java`,mime:`text/x-java`,mode:`clike`,ext:[`java`]},{name:`Java Server Pages`,mime:`application/x-jsp`,mode:`htmlembedded`,ext:[`jsp`],alias:[`jsp`]},{name:`JavaScript`,mimes:[`text/javascript`,`text/ecmascript`,`application/javascript`,`application/x-javascript`,`application/ecmascript`],mode:`javascript`,ext:[`js`],alias:[`ecmascript`,`js`,`node`]},{name:`JSON`,mimes:[`application/json`,`application/x-json`],mode:`javascript`,ext:[`json`,`map`],alias:[`json5`]},{name:`JSON-LD`,mime:`application/ld+json`,mode:`javascript`,ext:[`jsonld`],alias:[`jsonld`]},{name:`JSX`,mime:`text/jsx`,mode:`jsx`,ext:[`jsx`]},{name:`Jinja2`,mime:`text/jinja2`,mode:`jinja2`,ext:[`j2`,`jinja`,`jinja2`]},{name:`Julia`,mime:`text/x-julia`,mode:`julia`,ext:[`jl`],alias:[`jl`]},{name:`Kotlin`,mime:`text/x-kotlin`,mode:`clike`,ext:[`kt`]},{name:`LESS`,mime:`text/x-less`,mode:`css`,ext:[`less`]},{name:`LiveScript`,mime:`text/x-livescript`,mode:`livescript`,ext:[`ls`],alias:[`ls`]},{name:`Lua`,mime:`text/x-lua`,mode:`lua`,ext:[`lua`]},{name:`Markdown`,mime:`text/x-markdown`,mode:`markdown`,ext:[`markdown`,`md`,`mkd`]},{name:`mIRC`,mime:`text/mirc`,mode:`mirc`},{name:`MariaDB SQL`,mime:`text/x-mariadb`,mode:`sql`},{name:`Mathematica`,mime:`text/x-mathematica`,mode:`mathematica`,ext:[`m`,`nb`,`wl`,`wls`]},{name:`Modelica`,mime:`text/x-modelica`,mode:`modelica`,ext:[`mo`]},{name:`MUMPS`,mime:`text/x-mumps`,mode:`mumps`,ext:[`mps`]},{name:`MS SQL`,mime:`text/x-mssql`,mode:`sql`},{name:`mbox`,mime:`application/mbox`,mode:`mbox`,ext:[`mbox`]},{name:`MySQL`,mime:`text/x-mysql`,mode:`sql`},{name:`Nginx`,mime:`text/x-nginx-conf`,mode:`nginx`,file:/nginx.*\.conf$/i},{name:`NSIS`,mime:`text/x-nsis`,mode:`nsis`,ext:[`nsh`,`nsi`]},{name:`NTriples`,mimes:[`application/n-triples`,`application/n-quads`,`text/n-triples`],mode:`ntriples`,ext:[`nt`,`nq`]},{name:`Objective-C`,mime:`text/x-objectivec`,mode:`clike`,ext:[`m`],alias:[`objective-c`,`objc`]},{name:`Objective-C++`,mime:`text/x-objectivec++`,mode:`clike`,ext:[`mm`],alias:[`objective-c++`,`objc++`]},{name:`OCaml`,mime:`text/x-ocaml`,mode:`mllike`,ext:[`ml`,`mli`,`mll`,`mly`]},{name:`Octave`,mime:`text/x-octave`,mode:`octave`,ext:[`m`]},{name:`Oz`,mime:`text/x-oz`,mode:`oz`,ext:[`oz`]},{name:`Pascal`,mime:`text/x-pascal`,mode:`pascal`,ext:[`p`,`pas`]},{name:`PEG.js`,mime:`null`,mode:`pegjs`,ext:[`jsonld`]},{name:`Perl`,mime:`text/x-perl`,mode:`perl`,ext:[`pl`,`pm`]},{name:`PHP`,mimes:[`text/x-php`,`application/x-httpd-php`,`application/x-httpd-php-open`],mode:`php`,ext:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`]},{name:`Pig`,mime:`text/x-pig`,mode:`pig`,ext:[`pig`]},{name:`Plain Text`,mime:`text/plain`,mode:`null`,ext:[`txt`,`text`,`conf`,`def`,`list`,`log`]},{name:`PLSQL`,mime:`text/x-plsql`,mode:`sql`,ext:[`pls`]},{name:`PostgreSQL`,mime:`text/x-pgsql`,mode:`sql`},{name:`PowerShell`,mime:`application/x-powershell`,mode:`powershell`,ext:[`ps1`,`psd1`,`psm1`]},{name:`Properties files`,mime:`text/x-properties`,mode:`properties`,ext:[`properties`,`ini`,`in`],alias:[`ini`,`properties`]},{name:`ProtoBuf`,mime:`text/x-protobuf`,mode:`protobuf`,ext:[`proto`]},{name:`Python`,mime:`text/x-python`,mode:`python`,ext:[`BUILD`,`bzl`,`py`,`pyw`],file:/^(BUCK|BUILD)$/},{name:`Puppet`,mime:`text/x-puppet`,mode:`puppet`,ext:[`pp`]},{name:`Q`,mime:`text/x-q`,mode:`q`,ext:[`q`]},{name:`R`,mime:`text/x-rsrc`,mode:`r`,ext:[`r`,`R`],alias:[`rscript`]},{name:`reStructuredText`,mime:`text/x-rst`,mode:`rst`,ext:[`rst`],alias:[`rst`]},{name:`RPM Changes`,mime:`text/x-rpm-changes`,mode:`rpm`},{name:`RPM Spec`,mime:`text/x-rpm-spec`,mode:`rpm`,ext:[`spec`]},{name:`Ruby`,mime:`text/x-ruby`,mode:`ruby`,ext:[`rb`],alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`]},{name:`Rust`,mime:`text/x-rustsrc`,mode:`rust`,ext:[`rs`]},{name:`SAS`,mime:`text/x-sas`,mode:`sas`,ext:[`sas`]},{name:`Sass`,mime:`text/x-sass`,mode:`sass`,ext:[`sass`]},{name:`Scala`,mime:`text/x-scala`,mode:`clike`,ext:[`scala`]},{name:`Scheme`,mime:`text/x-scheme`,mode:`scheme`,ext:[`scm`,`ss`]},{name:`SCSS`,mime:`text/x-scss`,mode:`css`,ext:[`scss`]},{name:`Shell`,mimes:[`text/x-sh`,`application/x-sh`],mode:`shell`,ext:[`sh`,`ksh`,`bash`],alias:[`bash`,`sh`,`zsh`],file:/^PKGBUILD$/},{name:`Sieve`,mime:`application/sieve`,mode:`sieve`,ext:[`siv`,`sieve`]},{name:`Slim`,mimes:[`text/x-slim`,`application/x-slim`],mode:`slim`,ext:[`slim`]},{name:`Smalltalk`,mime:`text/x-stsrc`,mode:`smalltalk`,ext:[`st`]},{name:`Smarty`,mime:`text/x-smarty`,mode:`smarty`,ext:[`tpl`]},{name:`Solr`,mime:`text/x-solr`,mode:`solr`},{name:`SML`,mime:`text/x-sml`,mode:`mllike`,ext:[`sml`,`sig`,`fun`,`smackspec`]},{name:`Soy`,mime:`text/x-soy`,mode:`soy`,ext:[`soy`],alias:[`closure template`]},{name:`SPARQL`,mime:`application/sparql-query`,mode:`sparql`,ext:[`rq`,`sparql`],alias:[`sparul`]},{name:`Spreadsheet`,mime:`text/x-spreadsheet`,mode:`spreadsheet`,alias:[`excel`,`formula`]},{name:`SQL`,mime:`text/x-sql`,mode:`sql`,ext:[`sql`]},{name:`SQLite`,mime:`text/x-sqlite`,mode:`sql`},{name:`Squirrel`,mime:`text/x-squirrel`,mode:`clike`,ext:[`nut`]},{name:`Stylus`,mime:`text/x-styl`,mode:`stylus`,ext:[`styl`]},{name:`Swift`,mime:`text/x-swift`,mode:`swift`,ext:[`swift`]},{name:`sTeX`,mime:`text/x-stex`,mode:`stex`},{name:`LaTeX`,mime:`text/x-latex`,mode:`stex`,ext:[`text`,`ltx`,`tex`],alias:[`tex`]},{name:`SystemVerilog`,mime:`text/x-systemverilog`,mode:`verilog`,ext:[`v`,`sv`,`svh`]},{name:`Tcl`,mime:`text/x-tcl`,mode:`tcl`,ext:[`tcl`]},{name:`Textile`,mime:`text/x-textile`,mode:`textile`,ext:[`textile`]},{name:`TiddlyWiki`,mime:`text/x-tiddlywiki`,mode:`tiddlywiki`},{name:`Tiki wiki`,mime:`text/tiki`,mode:`tiki`},{name:`TOML`,mime:`text/x-toml`,mode:`toml`,ext:[`toml`]},{name:`Tornado`,mime:`text/x-tornado`,mode:`tornado`},{name:`troff`,mime:`text/troff`,mode:`troff`,ext:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`]},{name:`TTCN`,mime:`text/x-ttcn`,mode:`ttcn`,ext:[`ttcn`,`ttcn3`,`ttcnpp`]},{name:`TTCN_CFG`,mime:`text/x-ttcn-cfg`,mode:`ttcn-cfg`,ext:[`cfg`]},{name:`Turtle`,mime:`text/turtle`,mode:`turtle`,ext:[`ttl`]},{name:`TypeScript`,mime:`application/typescript`,mode:`javascript`,ext:[`ts`],alias:[`ts`]},{name:`TypeScript-JSX`,mime:`text/typescript-jsx`,mode:`jsx`,ext:[`tsx`],alias:[`tsx`]},{name:`Twig`,mime:`text/x-twig`,mode:`twig`},{name:`Web IDL`,mime:`text/x-webidl`,mode:`webidl`,ext:[`webidl`]},{name:`VB.NET`,mime:`text/x-vb`,mode:`vb`,ext:[`vb`]},{name:`VBScript`,mime:`text/vbscript`,mode:`vbscript`,ext:[`vbs`]},{name:`Velocity`,mime:`text/velocity`,mode:`velocity`,ext:[`vtl`]},{name:`Verilog`,mime:`text/x-verilog`,mode:`verilog`,ext:[`v`]},{name:`VHDL`,mime:`text/x-vhdl`,mode:`vhdl`,ext:[`vhd`,`vhdl`]},{name:`Vue.js Component`,mimes:[`script/x-vue`,`text/x-vue`],mode:`vue`,ext:[`vue`]},{name:`XML`,mimes:[`application/xml`,`text/xml`],mode:`xml`,ext:[`xml`,`xsl`,`xsd`,`svg`],alias:[`rss`,`wsdl`,`xsd`]},{name:`XQuery`,mime:`application/xquery`,mode:`xquery`,ext:[`xy`,`xquery`]},{name:`Yacas`,mime:`text/x-yacas`,mode:`yacas`,ext:[`ys`]},{name:`YAML`,mimes:[`text/x-yaml`,`text/yaml`],mode:`yaml`,ext:[`yaml`,`yml`],alias:[`yml`]},{name:`Z80`,mime:`text/x-z80`,mode:`z80`,ext:[`z80`]},{name:`mscgen`,mime:`text/x-mscgen`,mode:`mscgen`,ext:[`mscgen`,`mscin`,`msc`]},{name:`xu`,mime:`text/x-xu`,mode:`mscgen`,ext:[`xu`]},{name:`msgenny`,mime:`text/x-msgenny`,mode:`mscgen`,ext:[`msgenny`]},{name:`WebAssembly`,mime:`text/webassembly`,mode:`wast`,ext:[`wat`,`wast`]}];for(var t=0;t<e.modeInfo.length;t++){var n=e.modeInfo[t];n.mimes&&(n.mime=n.mimes[0])}e.findModeByMIME=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.mime==t)return r;if(r.mimes){for(var i=0;i<r.mimes.length;i++)if(r.mimes[i]==t)return r}}if(/\+xml$/.test(t))return e.findModeByMIME(`application/xml`);if(/\+json$/.test(t))return e.findModeByMIME(`application/json`)},e.findModeByExtension=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.ext){for(var i=0;i<r.ext.length;i++)if(r.ext[i]==t)return r}}},e.findModeByFileName=function(t){for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.file&&r.file.test(t))return r}var i=t.lastIndexOf(`.`),a=i>-1&&t.substring(i+1,t.length);if(a)return e.findModeByExtension(a)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.name.toLowerCase()==t)return r;if(r.alias){for(var i=0;i<r.alias.length;i++)if(r.alias[i].toLowerCase()==t)return r}}}})})),d=e(((e,t)=>{(function(r){typeof e==`object`&&typeof t==`object`?r(n(),a(),u()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`../xml/xml`,`../meta`],r):r(CodeMirror)})(function(e){e.defineMode(`markdown`,function(t,n){var r=e.getMode(t,`text/html`),i=r.name==`null`;function a(n){if(e.findModeByName){var r=e.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=e.getMode(t,n);return i.name==`null`?null:i}n.highlightFormatting===void 0&&(n.highlightFormatting=!1),n.maxBlockquoteDepth===void 0&&(n.maxBlockquoteDepth=0),n.taskLists===void 0&&(n.taskLists=!1),n.strikethrough===void 0&&(n.strikethrough=!1),n.emoji===void 0&&(n.emoji=!1),n.fencedCodeBlockHighlighting===void 0&&(n.fencedCodeBlockHighlighting=!0),n.fencedCodeBlockDefaultMode===void 0&&(n.fencedCodeBlockDefaultMode=`text/plain`),n.xml===void 0&&(n.xml=!0),n.tokenTypeOverrides===void 0&&(n.tokenTypeOverrides={});var o={header:`header`,code:`comment`,quote:`quote`,list1:`variable-2`,list2:`variable-3`,list3:`keyword`,hr:`hr`,image:`image`,imageAltText:`image-alt-text`,imageMarker:`image-marker`,formatting:`formatting`,linkInline:`link`,linkEmail:`link`,linkText:`link`,linkHref:`string`,em:`em`,strong:`strong`,strikethrough:`strikethrough`,emoji:`builtin`};for(var s in o)o.hasOwnProperty(s)&&n.tokenTypeOverrides[s]&&(o[s]=n.tokenTypeOverrides[s]);var c=/^([*\-_])(?:\s*\1){2,}\s*$/,l=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,u=/^\[(x| )\](?=\s)/i,d=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,f=/^ {0,3}(?:\={1,}|-{2,})\s*$/,p=/^[^#!\[\]*_\\<>` "'(~:]+/,m=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,h=/^\s*\[[^\]]+?\]:.*$/,g=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,_=` `;function v(e,t,n){return t.f=t.inline=n,n(e,t)}function y(e,t,n){return t.f=t.block=n,n(e,t)}function b(e){return!e||!/\S/.test(e.string)}function x(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==C){var n=i;if(!n){var a=e.innerMode(r,t.htmlState);n=a.mode.name==`xml`&&a.state.tagStart===null&&!a.state.context&&a.state.tokenize.isInText}n&&(t.f=D,t.block=S,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function S(t,r){var i=t.column()===r.indentation,s=b(r.prevLine.stream),p=r.indentedCode,g=r.prevLine.hr,_=r.list!==!1,y=(r.listStack[r.listStack.length-1]||0)+3;r.indentedCode=!1;var x=r.indentation;if(r.indentationDiff===null&&(r.indentationDiff=r.indentation,_)){for(r.list=null;x<r.listStack[r.listStack.length-1];)r.listStack.pop(),r.listStack.length?r.indentation=r.listStack[r.listStack.length-1]:r.list=!1;r.list!==!1&&(r.indentationDiff=x-r.listStack[r.listStack.length-1])}var S=!s&&!g&&!r.prevLine.header&&(!_||!p)&&!r.prevLine.fencedCodeEnd,C=(r.list===!1||g||s)&&r.indentation<=y&&t.match(c),E=null;if(r.indentationDiff>=4&&(p||r.prevLine.fencedCodeEnd||r.prevLine.header||s))return t.skipToEnd(),r.indentedCode=!0,o.code;if(t.eatSpace())return null;if(i&&r.indentation<=y&&(E=t.match(d))&&E[1].length<=6)return r.quote=0,r.header=E[1].length,r.thisLine.header=!0,n.highlightFormatting&&(r.formatting=`header`),r.f=r.inline,T(r);if(r.indentation<=y&&t.eat(`>`))return r.quote=i?1:r.quote+1,n.highlightFormatting&&(r.formatting=`quote`),t.eatSpace(),T(r);if(!C&&!r.setext&&i&&r.indentation<=y&&(E=t.match(l))){var D=E[1]?`ol`:`ul`;return r.indentation=x+t.current().length,r.list=!0,r.quote=0,r.listStack.push(r.indentation),r.em=!1,r.strong=!1,r.code=!1,r.strikethrough=!1,n.taskLists&&t.match(u,!1)&&(r.taskList=!0),r.f=r.inline,n.highlightFormatting&&(r.formatting=[`list`,`list-`+D]),T(r)}else if(i&&r.indentation<=y&&(E=t.match(m,!0)))return r.quote=0,r.fencedEndRE=RegExp(E[1]+`+ *$`),r.localMode=n.fencedCodeBlockHighlighting&&a(E[2]||n.fencedCodeBlockDefaultMode),r.localMode&&(r.localState=e.startState(r.localMode)),r.f=r.block=w,n.highlightFormatting&&(r.formatting=`code-block`),r.code=-1,T(r);else if(r.setext||(!S||!_)&&!r.quote&&r.list===!1&&!r.code&&!C&&!h.test(t.string)&&(E=t.lookAhead(1))&&(E=E.match(f)))return r.setext?(r.header=r.setext,r.setext=0,t.skipToEnd(),n.highlightFormatting&&(r.formatting=`header`)):(r.header=E[0].charAt(0)==`=`?1:2,r.setext=r.header),r.thisLine.header=!0,r.f=r.inline,T(r);else if(C)return t.skipToEnd(),r.hr=!0,r.thisLine.hr=!0,o.hr;else if(t.peek()===`[`)return v(t,r,M);return v(t,r,r.inline)}function C(t,n){var a=r.token(t,n.htmlState);if(!i){var o=e.innerMode(r,n.htmlState);(o.mode.name==`xml`&&o.state.tagStart===null&&!o.state.context&&o.state.tokenize.isInText||n.md_inside&&t.current().indexOf(`>`)>-1)&&(n.f=D,n.block=S,n.htmlState=null)}return a}function w(e,t){var r=t.listStack[t.listStack.length-1]||0,i=t.indentation<r,a=r+3;if(t.fencedEndRE&&t.indentation<=a&&(i||e.match(t.fencedEndRE))){n.highlightFormatting&&(t.formatting=`code-block`);var s;return i||(s=T(t)),t.localMode=t.localState=null,t.block=S,t.f=D,t.fencedEndRE=null,t.code=0,t.thisLine.fencedCodeEnd=!0,i?y(e,t,t.block):s}else if(t.localMode)return t.localMode.token(e,t.localState);else return e.skipToEnd(),o.code}function T(e){var t=[];if(e.formatting){t.push(o.formatting),typeof e.formatting==`string`&&(e.formatting=[e.formatting]);for(var r=0;r<e.formatting.length;r++)t.push(o.formatting+`-`+e.formatting[r]),e.formatting[r]===`header`&&t.push(o.formatting+`-`+e.formatting[r]+`-`+e.header),e.formatting[r]===`quote`&&(!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(o.formatting+`-`+e.formatting[r]+`-`+e.quote):t.push(`error`))}if(e.taskOpen)return t.push(`meta`),t.length?t.join(` `):null;if(e.taskClosed)return t.push(`property`),t.length?t.join(` `):null;if(e.linkHref?t.push(o.linkHref,`url`):(e.strong&&t.push(o.strong),e.em&&t.push(o.em),e.strikethrough&&t.push(o.strikethrough),e.emoji&&t.push(o.emoji),e.linkText&&t.push(o.linkText),e.code&&t.push(o.code),e.image&&t.push(o.image),e.imageAltText&&t.push(o.imageAltText,`link`),e.imageMarker&&t.push(o.imageMarker)),e.header&&t.push(o.header,o.header+`-`+e.header),e.quote&&(t.push(o.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(o.quote+`-`+e.quote):t.push(o.quote+`-`+n.maxBlockquoteDepth)),e.list!==!1){var i=(e.listStack.length-1)%3;i?i===1?t.push(o.list2):t.push(o.list3):t.push(o.list1)}return e.trailingSpaceNewLine?t.push(`trailing-space-new-line`):e.trailingSpace&&t.push(`trailing-space-`+(e.trailingSpace%2?`a`:`b`)),t.length?t.join(` `):null}function E(e,t){if(e.match(p,!0))return T(t)}function D(t,i){var a=i.text(t,i);if(a!==void 0)return a;if(i.list)return i.list=null,T(i);if(i.taskList)return t.match(u,!0)[1]===` `?i.taskOpen=!0:i.taskClosed=!0,n.highlightFormatting&&(i.formatting=`task`),i.taskList=!1,T(i);if(i.taskOpen=!1,i.taskClosed=!1,i.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(i.formatting=`header`),T(i);var s=t.next();if(i.linkTitle){i.linkTitle=!1;var c=s;s===`(`&&(c=`)`),c=(c+``).replace(/([.?*+^\[\]\\(){}|-])/g,`\\$1`);var l=`^\\s*(?:[^`+c+`\\\\]+|\\\\\\\\|\\\\.)`+c;if(t.match(new RegExp(l),!0))return o.linkHref}if(s==="`"){var d=i.formatting;n.highlightFormatting&&(i.formatting=`code`),t.eatWhile("`");var f=t.current().length;if(i.code==0&&(!i.quote||f==1))return i.code=f,T(i);if(f==i.code){var p=T(i);return i.code=0,p}else return i.formatting=d,T(i)}else if(i.code)return T(i);if(s===`\\`&&(t.next(),n.highlightFormatting)){var m=T(i),h=o.formatting+`-escape`;return m?m+` `+h:h}if(s===`!`&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return i.imageMarker=!0,i.image=!0,n.highlightFormatting&&(i.formatting=`image`),T(i);if(s===`[`&&i.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,n.highlightFormatting&&(i.formatting=`image`),T(i);if(s===`]`&&i.imageAltText){n.highlightFormatting&&(i.formatting=`image`);var m=T(i);return i.imageAltText=!1,i.image=!1,i.inline=i.f=k,m}if(s===`[`&&!i.image)return i.linkText&&t.match(/^.*?\]/)?T(i):(i.linkText=!0,n.highlightFormatting&&(i.formatting=`link`),T(i));if(s===`]`&&i.linkText){n.highlightFormatting&&(i.formatting=`link`);var m=T(i);return i.linkText=!1,i.inline=i.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?k:D,m}if(s===`<`&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){i.f=i.inline=O,n.highlightFormatting&&(i.formatting=`link`);var m=T(i);return m?m+=` `:m=``,m+o.linkInline}if(s===`<`&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){i.f=i.inline=O,n.highlightFormatting&&(i.formatting=`link`);var m=T(i);return m?m+=` `:m=``,m+o.linkEmail}if(n.xml&&s===`<`&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var _=t.string.indexOf(`>`,t.pos);if(_!=-1){var v=t.string.substring(t.start,_);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(v)&&(i.md_inside=!0)}return t.backUp(1),i.htmlState=e.startState(r),y(t,i,C)}if(n.xml&&s===`<`&&t.match(/^\/\w*?>/))return i.md_inside=!1,`tag`;if(s===`*`||s===`_`){for(var b=1,x=t.pos==1?` `:t.string.charAt(t.pos-2);b<3&&t.eat(s);)b++;var S=t.peek()||` `,w=!/\s/.test(S)&&(!g.test(S)||/\s/.test(x)||g.test(x)),E=!/\s/.test(x)&&(!g.test(x)||/\s/.test(S)||g.test(S)),A=null,j=null;if(b%2&&(!i.em&&w&&(s===`*`||!E||g.test(x))?A=!0:i.em==s&&E&&(s===`*`||!w||g.test(S))&&(A=!1)),b>1&&(!i.strong&&w&&(s===`*`||!E||g.test(x))?j=!0:i.strong==s&&E&&(s===`*`||!w||g.test(S))&&(j=!1)),j!=null||A!=null){n.highlightFormatting&&(i.formatting=A==null?`strong`:j==null?`em`:`strong em`),A===!0&&(i.em=s),j===!0&&(i.strong=s);var p=T(i);return A===!1&&(i.em=!1),j===!1&&(i.strong=!1),p}}else if(s===` `&&(t.eat(`*`)||t.eat(`_`))){if(t.peek()===` `)return T(i);t.backUp(1)}if(n.strikethrough){if(s===`~`&&t.eatWhile(s)){if(i.strikethrough){n.highlightFormatting&&(i.formatting=`strikethrough`);var p=T(i);return i.strikethrough=!1,p}else if(t.match(/^[^\s]/,!1))return i.strikethrough=!0,n.highlightFormatting&&(i.formatting=`strikethrough`),T(i)}else if(s===` `&&t.match(`~~`,!0)){if(t.peek()===` `)return T(i);t.backUp(2)}}if(n.emoji&&s===`:`&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,n.highlightFormatting&&(i.formatting=`emoji`);var M=T(i);return i.emoji=!1,M}return s===` `&&(t.match(/^ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),T(i)}function O(e,t){if(e.next()===`>`){t.f=t.inline=D,n.highlightFormatting&&(t.formatting=`link`);var r=T(t);return r?r+=` `:r=``,r+o.linkInline}return e.match(/^[^>]+/,!0),o.linkInline}function k(e,t){if(e.eatSpace())return null;var r=e.next();return r===`(`||r===`[`?(t.f=t.inline=j(r===`(`?`)`:`]`),n.highlightFormatting&&(t.formatting=`link-string`),t.linkHref=!0,T(t)):`error`}var A={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function j(e){return function(t,r){if(t.next()===e){r.f=r.inline=D,n.highlightFormatting&&(r.formatting=`link-string`);var i=T(r);return r.linkHref=!1,i}return t.match(A[e]),r.linkHref=!0,T(r)}}function M(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=ee,e.next(),n.highlightFormatting&&(t.formatting=`link`),t.linkText=!0,T(t)):v(e,t,D)}function ee(e,t){if(e.match(`]:`,!0)){t.f=t.inline=te,n.highlightFormatting&&(t.formatting=`link`);var r=T(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),o.linkText}function te(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),e.peek()===void 0?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),t.f=t.inline=D,o.linkHref+` url`)}var N={startState:function(){return{f:S,prevLine:{stream:null},thisLine:{stream:null},block:S,htmlState:null,indentation:0,inline:D,text:E,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(r,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkText:t.linkText,linkTitle:t.linkTitle,linkHref:t.linkHref,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,emoji:t.emoji,header:t.header,setext:t.setext,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedEndRE:t.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return x(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=C)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g,_).length;if(t.indentation=n,t.indentationDiff=null,n>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==C?{state:e.htmlState,mode:r}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:N}},indent:function(t,n,i){return t.block==C&&r.indent?r.indent(t.htmlState,n,i):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,n,i):e.Pass},blankLine:x,getType:T,blockCommentStart:`<!--`,blockCommentEnd:`-->`,closeBrackets:`()[]{}''""\`\``,fold:`markdown`};return N},`xml`),e.defineMIME(`text/markdown`,`markdown`),e.defineMIME(`text/x-markdown`,`markdown`)})})),f=e(((e,t)=>{(function(r){typeof e==`object`&&typeof t==`object`?r(n()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],r):r(CodeMirror)})(function(e){e.defineOption(`placeholder`,``,function(n,o,s){var c=s&&s!=e.Init;if(o&&!c)n.on(`blur`,i),n.on(`change`,a),n.on(`swapDoc`,a),e.on(n.getInputField(),`compositionupdate`,n.state.placeholderCompose=function(){r(n)}),a(n);else if(!o&&c){n.off(`blur`,i),n.off(`change`,a),n.off(`swapDoc`,a),e.off(n.getInputField(),`compositionupdate`,n.state.placeholderCompose),t(n);var l=n.getWrapperElement();l.className=l.className.replace(` CodeMirror-empty`,``)}o&&!n.hasFocus()&&i(n)});function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function n(e){t(e);var n=e.state.placeholder=document.createElement(`pre`);n.style.cssText=`height: 0; overflow: visible`,n.style.direction=e.getOption(`direction`),n.className=`CodeMirror-placeholder CodeMirror-line-like`;var r=e.getOption(`placeholder`);typeof r==`string`&&(r=document.createTextNode(r)),n.appendChild(r),e.display.lineSpace.insertBefore(n,e.display.lineSpace.firstChild)}function r(e){setTimeout(function(){var r=!1;if(e.lineCount()==1){var i=e.getInputField();r=i.nodeName==`TEXTAREA`?!e.getLine(0).length:!/[^\u200b]/.test(i.querySelector(`.CodeMirror-line`).textContent)}r?n(e):t(e)},20)}function i(e){o(e)&&n(e)}function a(e){var r=e.getWrapperElement(),i=o(e);r.className=r.className.replace(` CodeMirror-empty`,``)+(i?` CodeMirror-empty`:``),i?n(e):t(e)}function o(e){return e.lineCount()===1&&e.getLine(0)===``}})})),p=e(((e,t)=>{(function(r){typeof e==`object`&&typeof t==`object`?r(n()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],r):r(CodeMirror)})(function(e){e.defineSimpleMode=function(t,n){e.defineMode(t,function(t){return e.simpleMode(t,n)})},e.simpleMode=function(n,r){t(r,`start`);var o={},s=r.meta||{},c=!1;for(var u in r)if(u!=s&&r.hasOwnProperty(u))for(var d=o[u]=[],f=r[u],p=0;p<f.length;p++){var m=f[p];d.push(new i(m,r)),(m.indent||m.dedent)&&(c=!0)}var h={startState:function(){return{state:`start`,pending:null,local:null,localState:null,indent:c?[]:null}},copyState:function(t){var n={state:t.state,pending:t.pending,local:t.local,localState:null,indent:t.indent&&t.indent.slice(0)};t.localState&&(n.localState=e.copyState(t.local.mode,t.localState)),t.stack&&(n.stack=t.stack.slice(0));for(var r=t.persistentStates;r;r=r.next)n.persistentStates={mode:r.mode,spec:r.spec,state:r.state==t.localState?n.localState:e.copyState(r.mode,r.state),next:n.persistentStates};return n},token:a(o,n),innerMode:function(e){return e.local&&{mode:e.local.mode,state:e.localState}},indent:l(o,s)};if(s)for(var g in s)s.hasOwnProperty(g)&&(h[g]=s[g]);return h};function t(e,t){if(!e.hasOwnProperty(t))throw Error(`Undefined state `+t+` in simple mode`)}function n(e,t){if(!e)return/(?:)/;var n=``;return e instanceof RegExp?(e.ignoreCase&&(n=`i`),e.unicode&&(n+=`u`),e=e.source):e=String(e),RegExp((t===!1?``:`^`)+`(?:`+e+`)`,n)}function r(e){if(!e)return null;if(e.apply)return e;if(typeof e==`string`)return e.replace(/\./g,` `);for(var t=[],n=0;n<e.length;n++)t.push(e[n]&&e[n].replace(/\./g,` `));return t}function i(e,i){(e.next||e.push)&&t(i,e.next||e.push),this.regex=n(e.regex),this.token=r(e.token),this.data=e}function a(e,t){return function(n,r){if(r.pending){var i=r.pending.shift();return r.pending.length==0&&(r.pending=null),n.pos+=i.text.length,i.token}if(r.local)if(r.local.end&&n.match(r.local.end)){var a=r.local.endToken||null;return r.local=r.localState=null,a}else{var a=r.local.mode.token(n,r.localState),o;return r.local.endScan&&(o=r.local.endScan.exec(n.current()))&&(n.pos=n.start+o.index),a}for(var c=e[r.state],l=0;l<c.length;l++){var u=c[l],d=(!u.data.sol||n.sol())&&n.match(u.regex);if(d){u.data.next?r.state=u.data.next:u.data.push?((r.stack||=[]).push(r.state),r.state=u.data.push):u.data.pop&&r.stack&&r.stack.length&&(r.state=r.stack.pop()),u.data.mode&&s(t,r,u.data.mode,u.token),u.data.indent&&r.indent.push(n.indentation()+t.indentUnit),u.data.dedent&&r.indent.pop();var f=u.token;if(f&&f.apply&&(f=f(d)),d.length>2&&u.token&&typeof u.token!=`string`){for(var p=2;p<d.length;p++)d[p]&&(r.pending||=[]).push({text:d[p],token:u.token[p-1]});return n.backUp(d[0].length-(d[1]?d[1].length:0)),f[0]}else if(f&&f.join)return f[0];else return f}}return n.next(),null}}function o(e,t){if(e===t)return!0;if(!e||typeof e!=`object`||!t||typeof t!=`object`)return!1;var n=0;for(var r in e)if(e.hasOwnProperty(r)){if(!t.hasOwnProperty(r)||!o(e[r],t[r]))return!1;n++}for(var r in t)t.hasOwnProperty(r)&&n--;return n==0}function s(t,r,i,a){var s;if(i.persistent)for(var c=r.persistentStates;c&&!s;c=c.next)(i.spec?o(i.spec,c.spec):i.mode==c.mode)&&(s=c);var l=s?s.mode:i.mode||e.getMode(t,i.spec),u=s?s.state:e.startState(l);i.persistent&&!s&&(r.persistentStates={mode:l,spec:i.spec,state:u,next:r.persistentStates}),r.localState=u,r.local={mode:l,end:i.end&&n(i.end),endScan:i.end&&i.forceEnd!==!1&&n(i.end,!1),endToken:a&&a.join?a[a.length-1]:a}}function c(e,t){for(var n=0;n<t.length;n++)if(t[n]===e)return!0}function l(t,n){return function(r,i,a){if(r.local&&r.local.mode.indent)return r.local.mode.indent(r.localState,i,a);if(r.indent==null||r.local||n.dontIndentStates&&c(r.state,n.dontIndentStates)>-1)return e.Pass;var o=r.indent.length-1,s=t[r.state];scan:for(;;){for(var l=0;l<s.length;l++){var u=s[l];if(u.data.dedent&&u.data.dedentIfLineStart!==!1){var d=u.regex.exec(i);if(d&&d[0]){o--,(u.next||u.push)&&(s=t[u.next||u.push]),i=i.slice(d[0].length);continue scan}}}break}return o<0?0:r.indent[o]}}})})),m=e(((e,t)=>{(function(r){typeof e==`object`&&typeof t==`object`?r(n()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],r):r(CodeMirror)})(function(e){var t=/MSIE \d/.test(navigator.userAgent)&&(document.documentMode==null||document.documentMode<8),n=e.Pos,r={"(":`)>`,")":`(<`,"[":`]>`,"]":`[<`,"{":`}>`,"}":`{<`,"<":`>>`,">":`<<`};function i(e){return e&&e.bracketRegex||/[(){}[\]]/}function a(e,t,a){var s=e.getLineHandle(t.line),c=t.ch-1,l=a&&a.afterCursor;l??=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className);var u=i(a),d=!l&&c>=0&&u.test(s.text.charAt(c))&&r[s.text.charAt(c)]||u.test(s.text.charAt(c+1))&&r[s.text.charAt(++c)];if(!d)return null;var f=d.charAt(1)==`>`?1:-1;if(a&&a.strict&&f>0!=(c==t.ch))return null;var p=e.getTokenTypeAt(n(t.line,c+1)),m=o(e,n(t.line,c+ +(f>0)),f,p,a);return m==null?null:{from:n(t.line,c),to:m&&m.pos,match:m&&m.ch==d.charAt(0),forward:f>0}}function o(e,t,a,o,s){for(var c=s&&s.maxScanLineLength||1e4,l=s&&s.maxScanLines||1e3,u=[],d=i(s),f=a>0?Math.min(t.line+l,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-l),p=t.line;p!=f;p+=a){var m=e.getLine(p);if(m){var h=a>0?0:m.length-1,g=a>0?m.length:-1;if(!(m.length>c))for(p==t.line&&(h=t.ch-+(a<0));h!=g;h+=a){var _=m.charAt(h);if(d.test(_)&&(o===void 0||(e.getTokenTypeAt(n(p,h+1))||``)==(o||``))){var v=r[_];if(v&&v.charAt(1)==`>`==a>0)u.push(_);else if(u.length)u.pop();else return{pos:n(p,h),ch:_}}}}}return p-a==(a>0?e.lastLine():e.firstLine())?!1:null}function s(e,r,i){for(var o=e.state.matchBrackets.maxHighlightLineLength||1e3,s=i&&i.highlightNonMatching,c=[],l=e.listSelections(),u=0;u<l.length;u++){var d=l[u].empty()&&a(e,l[u].head,i);if(d&&(d.match||s!==!1)&&e.getLine(d.from.line).length<=o){var f=d.match?`CodeMirror-matchingbracket`:`CodeMirror-nonmatchingbracket`;c.push(e.markText(d.from,n(d.from.line,d.from.ch+1),{className:f})),d.to&&e.getLine(d.to.line).length<=o&&c.push(e.markText(d.to,n(d.to.line,d.to.ch+1),{className:f}))}}if(c.length){t&&e.state.focused&&e.focus();var p=function(){e.operation(function(){for(var e=0;e<c.length;e++)c[e].clear()})};if(r)setTimeout(p,800);else return p}}function c(e){e.operation(function(){e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null),e.state.matchBrackets.currentlyHighlighted=s(e,!1,e.state.matchBrackets)})}function l(e){e.state.matchBrackets&&e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null)}e.defineOption(`matchBrackets`,!1,function(t,n,r){r&&r!=e.Init&&(t.off(`cursorActivity`,c),t.off(`focus`,c),t.off(`blur`,l),l(t)),n&&(t.state.matchBrackets=typeof n==`object`?n:{},t.on(`cursorActivity`,c),t.on(`focus`,c),t.on(`blur`,l))}),e.defineExtension(`matchBrackets`,function(){s(this,!0)}),e.defineExtension(`findMatchingBracket`,function(e,t,n){return(n||typeof t==`boolean`)&&(n?(n.strict=t,t=n):t=t?{strict:!0}:null),a(this,e,t)}),e.defineExtension(`scanForBracket`,function(e,t,n,r){return o(this,e,t,n,r)})})})),h=e(((e,t)=>{(function(r){typeof e==`object`&&typeof t==`object`?r(n()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],r):r(CodeMirror)})(function(e){var t={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:``,explode:`[]{}`},n=e.Pos;e.defineOption(`autoCloseBrackets`,!1,function(t,n,o){o&&o!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),n&&(a(r(n,`pairs`)),t.state.closeBrackets=n,t.addKeyMap(i))});function r(e,n){return n==`pairs`&&typeof e==`string`?e:typeof e==`object`&&e[n]!=null?e[n]:t[n]}var i={Backspace:c,Enter:l};function a(e){for(var t=0;t<e.length;t++){var n=e.charAt(t),r=`'`+n+`'`;i[r]||(i[r]=o(n))}}a(t.pairs+"`");function o(e){return function(t){return f(t,e)}}function s(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function c(t){var i=s(t);if(!i||t.getOption(`disableInput`))return e.Pass;for(var a=r(i,`pairs`),o=t.listSelections(),c=0;c<o.length;c++){if(!o[c].empty())return e.Pass;var l=p(t,o[c].head);if(!l||a.indexOf(l)%2!=0)return e.Pass}for(var c=o.length-1;c>=0;c--){var u=o[c].head;t.replaceRange(``,n(u.line,u.ch-1),n(u.line,u.ch+1),`+delete`)}}function l(t){var n=s(t),i=n&&r(n,`explode`);if(!i||t.getOption(`disableInput`))return e.Pass;for(var a=t.listSelections(),o=0;o<a.length;o++){if(!a[o].empty())return e.Pass;var c=p(t,a[o].head);if(!c||i.indexOf(c)%2!=0)return e.Pass}t.operation(function(){var e=t.lineSeparator()||`
|
|
25
|
+
`;t.replaceSelection(e+e,null),u(t,-1),a=t.listSelections();for(var n=0;n<a.length;n++){var r=a[n].head.line;t.indentLine(r,null,!0),t.indentLine(r+1,null,!0)}})}function u(e,t){for(var n=[],r=e.listSelections(),i=0,a=0;a<r.length;a++){var o=r[a];o.head==e.getCursor()&&(i=a);var s=o.head.ch||t>0?{line:o.head.line,ch:o.head.ch+t}:{line:o.head.line-1};n.push({anchor:s,head:s})}e.setSelections(n,i)}function d(t){var r=e.cmpPos(t.anchor,t.head)>0;return{anchor:new n(t.anchor.line,t.anchor.ch+(r?-1:1)),head:new n(t.head.line,t.head.ch+(r?1:-1))}}function f(t,i){var a=s(t);if(!a||t.getOption(`disableInput`))return e.Pass;var o=r(a,`pairs`),c=o.indexOf(i);if(c==-1)return e.Pass;for(var l=r(a,`closeBefore`),f=r(a,`triples`),p=o.charAt(c+1)==i,h=t.listSelections(),g=c%2==0,_,v=0;v<h.length;v++){var y=h[v],b=y.head,x,S=t.getRange(b,n(b.line,b.ch+1));if(g&&!y.empty())x=`surround`;else if((p||!g)&&S==i)x=p&&m(t,b)?`both`:f.indexOf(i)>=0&&t.getRange(b,n(b.line,b.ch+3))==i+i+i?`skipThree`:`skip`;else if(p&&b.ch>1&&f.indexOf(i)>=0&&t.getRange(n(b.line,b.ch-2),b)==i+i){if(b.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(b.line,b.ch-2))))return e.Pass;x=`addFour`}else if(p){var C=b.ch==0?` `:t.getRange(n(b.line,b.ch-1),b);if(!e.isWordChar(S)&&C!=i&&!e.isWordChar(C))x=`both`;else return e.Pass}else if(g&&(S.length===0||/\s/.test(S)||l.indexOf(S)>-1))x=`both`;else return e.Pass;if(!_)_=x;else if(_!=x)return e.Pass}var w=c%2?o.charAt(c-1):i,T=c%2?i:o.charAt(c+1);t.operation(function(){if(_==`skip`)u(t,1);else if(_==`skipThree`)u(t,3);else if(_==`surround`){for(var e=t.getSelections(),n=0;n<e.length;n++)e[n]=w+e[n]+T;t.replaceSelections(e,`around`),e=t.listSelections().slice();for(var n=0;n<e.length;n++)e[n]=d(e[n]);t.setSelections(e)}else _==`both`?(t.replaceSelection(w+T,null),t.triggerElectric(w+T),u(t,-1)):_==`addFour`&&(t.replaceSelection(w+w+w+w,`before`),u(t,1))})}function p(e,t){var r=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return r.length==2?r:null}function m(e,t){var r=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(r.type)&&r.start==t.ch&&(t.ch==0||!/\bstring/.test(e.getTokenTypeAt(t)))}})})),g=e(((e,t)=>{(function(r){typeof e==`object`&&typeof t==`object`?r(n()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],r):r(CodeMirror)})(function(e){var t=e.Pos;function n(e){return e.flags??(e.ignoreCase?`i`:``)+(e.global?`g`:``)+(e.multiline?`m`:``)}function r(e,t){for(var r=n(e),i=r,a=0;a<t.length;a++)i.indexOf(t.charAt(a))==-1&&(i+=t.charAt(a));return r==i?e:new RegExp(e.source,i)}function i(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function a(e,n,i){n=r(n,`g`);for(var a=i.line,o=i.ch,s=e.lastLine();a<=s;a++,o=0){n.lastIndex=o;var c=e.getLine(a),l=n.exec(c);if(l)return{from:t(a,l.index),to:t(a,l.index+l[0].length),match:l}}}function o(e,n,o){if(!i(n))return a(e,n,o);n=r(n,`gm`);for(var s,c=1,l=o.line,u=e.lastLine();l<=u;){for(var d=0;d<c&&!(l>u);d++){var f=e.getLine(l++);s=s==null?f:s+`
|
|
26
|
+
`+f}c*=2,n.lastIndex=o.ch;var p=n.exec(s);if(p){var m=s.slice(0,p.index).split(`
|
|
27
|
+
`),h=p[0].split(`
|
|
28
|
+
`),g=o.line+m.length-1,_=m[m.length-1].length;return{from:t(g,_),to:t(g+h.length-1,h.length==1?_+h[0].length:h[h.length-1].length),match:p}}}}function s(e,t,n){for(var r,i=0;i<=e.length;){t.lastIndex=i;var a=t.exec(e);if(!a)break;var o=a.index+a[0].length;if(o>e.length-n)break;(!r||o>r.index+r[0].length)&&(r=a),i=a.index+1}return r}function c(e,n,i){n=r(n,`g`);for(var a=i.line,o=i.ch,c=e.firstLine();a>=c;a--,o=-1){var l=e.getLine(a),u=s(l,n,o<0?0:l.length-o);if(u)return{from:t(a,u.index),to:t(a,u.index+u[0].length),match:u}}}function l(e,n,a){if(!i(n))return c(e,n,a);n=r(n,`gm`);for(var o,l=1,u=e.getLine(a.line).length-a.ch,d=a.line,f=e.firstLine();d>=f;){for(var p=0;p<l&&d>=f;p++){var m=e.getLine(d--);o=o==null?m:m+`
|
|
29
|
+
`+o}l*=2;var h=s(o,n,u);if(h){var g=o.slice(0,h.index).split(`
|
|
30
|
+
`),_=h[0].split(`
|
|
31
|
+
`),v=d+g.length,y=g[g.length-1].length;return{from:t(v,y),to:t(v+_.length-1,_.length==1?y+_[0].length:_[_.length-1].length),match:h}}}}var u,d;String.prototype.normalize?(u=function(e){return e.normalize(`NFD`).toLowerCase()},d=function(e){return e.normalize(`NFD`)}):(u=function(e){return e.toLowerCase()},d=function(e){return e});function f(e,t,n,r){if(e.length==t.length)return n;for(var i=0,a=n+Math.max(0,e.length-t.length);;){if(i==a)return i;var o=i+a>>1,s=r(e.slice(0,o)).length;if(s==n)return o;s>n?a=o:i=o+1}}function p(e,n,r,i){if(!n.length)return null;var a=i?u:d,o=a(n).split(/\r|\n\r?/);search:for(var s=r.line,c=r.ch,l=e.lastLine()+1-o.length;s<=l;s++,c=0){var p=e.getLine(s).slice(c),m=a(p);if(o.length==1){var h=m.indexOf(o[0]);if(h==-1)continue search;var r=f(p,m,h,a)+c;return{from:t(s,f(p,m,h,a)+c),to:t(s,f(p,m,h+o[0].length,a)+c)}}else{var g=m.length-o[0].length;if(m.slice(g)!=o[0])continue search;for(var _=1;_<o.length-1;_++)if(a(e.getLine(s+_))!=o[_])continue search;var v=e.getLine(s+o.length-1),y=a(v),b=o[o.length-1];if(y.slice(0,b.length)!=b)continue search;return{from:t(s,f(p,m,g,a)+c),to:t(s+o.length-1,f(v,y,b.length,a))}}}}function m(e,n,r,i){if(!n.length)return null;var a=i?u:d,o=a(n).split(/\r|\n\r?/);search:for(var s=r.line,c=r.ch,l=e.firstLine()-1+o.length;s>=l;s--,c=-1){var p=e.getLine(s);c>-1&&(p=p.slice(0,c));var m=a(p);if(o.length==1){var h=m.lastIndexOf(o[0]);if(h==-1)continue search;return{from:t(s,f(p,m,h,a)),to:t(s,f(p,m,h+o[0].length,a))}}else{var g=o[o.length-1];if(m.slice(0,g.length)!=g)continue search;for(var _=1,r=s-o.length+1;_<o.length-1;_++)if(a(e.getLine(r+_))!=o[_])continue search;var v=e.getLine(s+1-o.length),y=a(v);if(y.slice(y.length-o[0].length)!=o[0])continue search;return{from:t(s+1-o.length,f(v,y,v.length-o[0].length,a)),to:t(s,f(p,m,g.length,a))}}}}function h(e,n,i,s){this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=e,i=i?e.clipPos(i):t(0,0),this.pos={from:i,to:i};var u;typeof s==`object`?u=s.caseFold:(u=s,s=null),typeof n==`string`?(u??=!1,this.matches=function(t,r){return(t?m:p)(e,n,r,u)}):(n=r(n,`gm`),!s||s.multiline!==!1?this.matches=function(t,r){return(t?l:o)(e,n,r)}:this.matches=function(t,r){return(t?c:a)(e,n,r)})}h.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(n){var r=this.doc.clipPos(n?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(r=t(r.line,r.ch),n?(r.ch--,r.ch<0&&(r.line--,r.ch=(this.doc.getLine(r.line)||``).length)):(r.ch++,r.ch>(this.doc.getLine(r.line)||``).length&&(r.ch=0,r.line++)),e.cmpPos(r,this.doc.clipPos(r))!=0))return this.atOccurrence=!1;var i=this.matches(n,r);if(this.afterEmptyMatch=i&&e.cmpPos(i.from,i.to)==0,i)return this.pos=i,this.atOccurrence=!0,this.pos.match||!0;var a=t(n?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:a,to:a},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(n,r){if(this.atOccurrence){var i=e.splitLines(n);this.doc.replaceRange(i,this.pos.from,this.pos.to,r),this.pos.to=t(this.pos.from.line+i.length-1,i[i.length-1].length+(i.length==1?this.pos.from.ch:0))}}},e.defineExtension(`getSearchCursor`,function(e,t,n){return new h(this.doc,e,t,n)}),e.defineDocExtension(`getSearchCursor`,function(e,t,n){return new h(this,e,t,n)}),e.defineExtension(`selectMatches`,function(t,n){for(var r=[],i=this.getSearchCursor(t,this.getCursor(`from`),n);i.findNext()&&!(e.cmpPos(i.to(),this.getCursor(`to`))>0);)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)})})})),_=e(((e,t)=>{(function(r){typeof e==`object`&&typeof t==`object`?r(n()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],r):r(CodeMirror)})(function(e){function t(t,n,r){var i=t.getWrapperElement(),a=i.appendChild(document.createElement(`div`));return r?a.className=`CodeMirror-dialog CodeMirror-dialog-bottom`:a.className=`CodeMirror-dialog CodeMirror-dialog-top`,typeof n==`string`?a.innerHTML=n:a.appendChild(n),e.addClass(i,`dialog-opened`),a}function n(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}e.defineExtension(`openDialog`,function(r,i,a){a||={},n(this,null);var o=t(this,r,a.bottom),s=!1,c=this;function l(t){if(typeof t==`string`)u.value=t;else{if(s)return;s=!0,e.rmClass(o.parentNode,`dialog-opened`),o.parentNode.removeChild(o),c.focus(),a.onClose&&a.onClose(o)}}var u=o.getElementsByTagName(`input`)[0],d;return u?(u.focus(),a.value&&(u.value=a.value,a.selectValueOnOpen!==!1&&u.select()),a.onInput&&e.on(u,`input`,function(e){a.onInput(e,u.value,l)}),a.onKeyUp&&e.on(u,`keyup`,function(e){a.onKeyUp(e,u.value,l)}),e.on(u,`keydown`,function(t){a&&a.onKeyDown&&a.onKeyDown(t,u.value,l)||((t.keyCode==27||a.closeOnEnter!==!1&&t.keyCode==13)&&(u.blur(),e.e_stop(t),l()),t.keyCode==13&&i(u.value,t))}),a.closeOnBlur!==!1&&e.on(o,`focusout`,function(e){e.relatedTarget!==null&&l()})):(d=o.getElementsByTagName(`button`)[0])&&(e.on(d,`click`,function(){l(),c.focus()}),a.closeOnBlur!==!1&&e.on(d,`blur`,l),d.focus()),l}),e.defineExtension(`openConfirm`,function(r,i,a){n(this,null);var o=t(this,r,a&&a.bottom),s=o.getElementsByTagName(`button`),c=!1,l=this,u=1;function d(){c||(c=!0,e.rmClass(o.parentNode,`dialog-opened`),o.parentNode.removeChild(o),l.focus())}s[0].focus();for(var f=0;f<s.length;++f){var p=s[f];(function(t){e.on(p,`click`,function(n){e.e_preventDefault(n),d(),t&&t(l)})})(i[f]),e.on(p,`blur`,function(){--u,setTimeout(function(){u<=0&&d()},200)}),e.on(p,`focus`,function(){++u})}}),e.defineExtension(`openNotification`,function(r,i){n(this,l);var a=t(this,r,i&&i.bottom),o=!1,s,c=i&&i.duration!==void 0?i.duration:5e3;function l(){o||(o=!0,clearTimeout(s),e.rmClass(a.parentNode,`dialog-opened`),a.parentNode.removeChild(a))}return e.on(a,`click`,function(t){e.e_preventDefault(t),l()}),c&&(s=setTimeout(l,c)),l})})})),v=e(((e,t)=>{(function(r){typeof e==`object`&&typeof t==`object`?r(n(),g(),_()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`./searchcursor`,`../dialog/dialog`],r):r(CodeMirror)})(function(e){e.defineOption(`search`,{bottom:!1});function t(e,t){return typeof e==`string`?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),t?`gi`:`g`):e.global||(e=new RegExp(e.source,e.ignoreCase?`gi`:`g`)),{token:function(t){e.lastIndex=t.pos;var n=e.exec(t.string);if(n&&n.index==t.pos)return t.pos+=n[0].length||1,`searching`;n?t.pos=n.index:t.skipToEnd()}}}function n(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function r(e){return e.state.search||(e.state.search=new n)}function i(e){return typeof e==`string`&&e==e.toLowerCase()}function a(e,t,n){return e.getSearchCursor(t,n,{caseFold:i(t),multiline:!0})}function o(e,t,n,r,i){e.openDialog(t,r,{value:n,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){m(e)},onKeyDown:i,bottom:e.options.search.bottom})}function s(e,t,n,r,i){e.openDialog?e.openDialog(t,i,{value:r,selectValueOnOpen:!0,bottom:e.options.search.bottom}):i(prompt(n,r))}function c(e,t,n,r){e.openConfirm?e.openConfirm(t,r):confirm(n)&&r[0]()}function l(e){return e.replace(/\\([nrt\\])/g,function(e,t){return t==`n`?`
|
|
32
|
+
`:t==`r`?`\r`:t==`t`?` `:t==`\\`?`\\`:e})}function u(e){var t=e.match(/^\/(.*)\/([a-z]*)$/);if(t)try{e=new RegExp(t[1],t[2].indexOf(`i`)==-1?``:`i`)}catch{}else e=l(e);return(typeof e==`string`?e==``:e.test(``))&&(e=/x^/),e}function d(e,n,r){n.queryText=r,n.query=u(r),e.removeOverlay(n.overlay,i(n.query)),n.overlay=t(n.query,i(n.query)),e.addOverlay(n.overlay),e.showMatchesOnScrollbar&&(n.annotate&&=(n.annotate.clear(),null),n.annotate=e.showMatchesOnScrollbar(n.query,i(n.query)))}function f(t,n,i,a){var c=r(t);if(c.query)return p(t,n);var l=t.getSelection()||c.lastQuery;if(l instanceof RegExp&&l.source==`x^`&&(l=null),i&&t.openDialog){var u=null,f=function(n,r){e.e_stop(r),n&&(n!=c.queryText&&(d(t,c,n),c.posFrom=c.posTo=t.getCursor()),u&&(u.style.opacity=1),p(t,r.shiftKey,function(e,n){var r;n.line<3&&document.querySelector&&(r=t.display.wrapper.querySelector(`.CodeMirror-dialog`))&&r.getBoundingClientRect().bottom-4>t.cursorCoords(n,`window`).top&&((u=r).style.opacity=.4)}))};o(t,g(t),l,f,function(n,i){var a=e.keyName(n),o=t.getOption(`extraKeys`),s=o&&o[a]||e.keyMap[t.getOption(`keyMap`)][a];s==`findNext`||s==`findPrev`||s==`findPersistentNext`||s==`findPersistentPrev`?(e.e_stop(n),d(t,r(t),i),t.execCommand(s)):(s==`find`||s==`findPersistent`)&&(e.e_stop(n),f(i,n))}),a&&l&&(d(t,c,l),p(t,n))}else s(t,g(t),`Search for:`,l,function(e){e&&!c.query&&t.operation(function(){d(t,c,e),c.posFrom=c.posTo=t.getCursor(),p(t,n)})})}function p(t,n,i){t.operation(function(){var o=r(t),s=a(t,o.query,n?o.posFrom:o.posTo);!s.find(n)&&(s=a(t,o.query,n?e.Pos(t.lastLine()):e.Pos(t.firstLine(),0)),!s.find(n))||(t.setSelection(s.from(),s.to()),t.scrollIntoView({from:s.from(),to:s.to()},20),o.posFrom=s.from(),o.posTo=s.to(),i&&i(s.from(),s.to()))})}function m(e){e.operation(function(){var t=r(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&=(t.annotate.clear(),null))})}function h(e,t){var n=e?document.createElement(e):document.createDocumentFragment();for(var r in t)n[r]=t[r];for(var i=2;i<arguments.length;i++){var a=arguments[i];n.appendChild(typeof a==`string`?document.createTextNode(a):a)}return n}function g(e){var t=h(`label`,{className:`CodeMirror-search-label`},e.phrase(`Search:`),h(`input`,{type:`text`,style:`width: 10em`,className:`CodeMirror-search-field`,id:`CodeMirror-search-field`}));return t.setAttribute(`for`,`CodeMirror-search-field`),h(``,null,t,` `,h(`span`,{style:`color: #666`,className:`CodeMirror-search-hint`},e.phrase(`(Use /re/ syntax for regexp search)`)))}function _(e){return h(``,null,` `,h(`input`,{type:`text`,style:`width: 10em`,className:`CodeMirror-search-field`}),` `,h(`span`,{style:`color: #666`,className:`CodeMirror-search-hint`},e.phrase(`(Use /re/ syntax for regexp search)`)))}function v(e){return h(``,null,h(`span`,{className:`CodeMirror-search-label`},e.phrase(`With:`)),` `,h(`input`,{type:`text`,style:`width: 10em`,className:`CodeMirror-search-field`}))}function y(e){return h(``,null,h(`span`,{className:`CodeMirror-search-label`},e.phrase(`Replace?`)),` `,h(`button`,{},e.phrase(`Yes`)),` `,h(`button`,{},e.phrase(`No`)),` `,h(`button`,{},e.phrase(`All`)),` `,h(`button`,{},e.phrase(`Stop`)))}function b(e,t,n){e.operation(function(){for(var r=a(e,t);r.findNext();)if(typeof t!=`string`){var i=e.getRange(r.from(),r.to()).match(t);r.replace(n.replace(/\$(\d)/g,function(e,t){return i[t]}))}else r.replace(n)})}function x(e,t){if(!e.getOption(`readOnly`)){var n=e.getSelection()||r(e).lastQuery,i=t?e.phrase(`Replace all:`):e.phrase(`Replace:`);s(e,h(``,null,h(`span`,{className:`CodeMirror-search-label`},i),_(e)),i,n,function(n){n&&(n=u(n),s(e,v(e),e.phrase(`Replace with:`),``,function(r){if(r=l(r),t)b(e,n,r);else{m(e);var i=a(e,n,e.getCursor(`from`)),o=function(){var t=i.from(),l;!(l=i.findNext())&&(i=a(e,n),!(l=i.findNext())||t&&i.from().line==t.line&&i.from().ch==t.ch)||(e.setSelection(i.from(),i.to()),e.scrollIntoView({from:i.from(),to:i.to()}),c(e,y(e),e.phrase(`Replace?`),[function(){s(l)},o,function(){b(e,n,r)}]))},s=function(e){i.replace(typeof n==`string`?r:r.replace(/\$(\d)/g,function(t,n){return e[n]})),o()};o()}}))})}}e.commands.find=function(e){m(e),f(e)},e.commands.findPersistent=function(e){m(e),f(e,!1,!0)},e.commands.findPersistentNext=function(e){f(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){f(e,!0,!0,!0)},e.commands.findNext=f,e.commands.findPrev=function(e){f(e,!0)},e.commands.clearSearch=m,e.commands.replace=x,e.commands.replaceAll=function(e){x(e,!0)}})})),y=e(((e,t)=>{(function(r){typeof e==`object`&&typeof t==`object`?r(n(),_()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`../dialog/dialog`],r):r(CodeMirror)})(function(e){e.defineOption(`search`,{bottom:!1});function t(e,t,n,r,i){e.openDialog?e.openDialog(t,i,{value:r,selectValueOnOpen:!0,bottom:e.options.search.bottom}):i(prompt(n,r))}function n(e){return e.phrase(`Jump to line:`)+` <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">`+e.phrase(`(Use line:column or scroll% syntax)`)+`</span>`}function r(e,t){var n=Number(t);return/^[-+]/.test(t)?e.getCursor().line+n:n-1}e.commands.jumpToLine=function(e){var i=e.getCursor();t(e,n(e),e.phrase(`Jump to line:`),i.line+1+`:`+i.ch,function(t){if(t){var n;if(n=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(t))e.setCursor(r(e,n[1]),Number(n[2]));else if(n=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(t)){var a=Math.round(e.lineCount()*Number(n[1])/100);/^[-+]/.test(n[1])&&(a=i.line+a+1),e.setCursor(a-1,i.ch)}else(n=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(t))&&e.setCursor(r(e,n[1]),i.ch)}})},e.keyMap.default[`Alt-G`]=`jumpToLine`})}));i(),o(),s(),c(),l(),d(),f(),p(),m(),h(),g(),_(),v(),y();var b=r.default;export{b as default};
|