@pedropaulovc/playwright-core 1.59.0-alpha-1769214875000
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/LICENSE +202 -0
- package/NOTICE +5 -0
- package/README.md +3 -0
- package/ThirdPartyNotices.txt +4076 -0
- package/bin/install_media_pack.ps1 +5 -0
- package/bin/install_webkit_wsl.ps1 +33 -0
- package/bin/reinstall_chrome_beta_linux.sh +42 -0
- package/bin/reinstall_chrome_beta_mac.sh +13 -0
- package/bin/reinstall_chrome_beta_win.ps1 +24 -0
- package/bin/reinstall_chrome_stable_linux.sh +42 -0
- package/bin/reinstall_chrome_stable_mac.sh +12 -0
- package/bin/reinstall_chrome_stable_win.ps1 +24 -0
- package/bin/reinstall_msedge_beta_linux.sh +48 -0
- package/bin/reinstall_msedge_beta_mac.sh +11 -0
- package/bin/reinstall_msedge_beta_win.ps1 +23 -0
- package/bin/reinstall_msedge_dev_linux.sh +48 -0
- package/bin/reinstall_msedge_dev_mac.sh +11 -0
- package/bin/reinstall_msedge_dev_win.ps1 +23 -0
- package/bin/reinstall_msedge_stable_linux.sh +48 -0
- package/bin/reinstall_msedge_stable_mac.sh +11 -0
- package/bin/reinstall_msedge_stable_win.ps1 +24 -0
- package/browsers.json +79 -0
- package/cli.js +18 -0
- package/index.d.ts +17 -0
- package/index.js +32 -0
- package/index.mjs +28 -0
- package/lib/androidServerImpl.js +65 -0
- package/lib/browserServerImpl.js +120 -0
- package/lib/cli/driver.js +97 -0
- package/lib/cli/program.js +601 -0
- package/lib/cli/programWithTestStub.js +74 -0
- package/lib/client/android.js +361 -0
- package/lib/client/api.js +137 -0
- package/lib/client/artifact.js +79 -0
- package/lib/client/browser.js +161 -0
- package/lib/client/browserContext.js +582 -0
- package/lib/client/browserType.js +185 -0
- package/lib/client/cdpSession.js +51 -0
- package/lib/client/channelOwner.js +194 -0
- package/lib/client/clientHelper.js +64 -0
- package/lib/client/clientInstrumentation.js +55 -0
- package/lib/client/clientStackTrace.js +69 -0
- package/lib/client/clock.js +68 -0
- package/lib/client/connection.js +318 -0
- package/lib/client/consoleMessage.js +58 -0
- package/lib/client/coverage.js +44 -0
- package/lib/client/dialog.js +56 -0
- package/lib/client/download.js +62 -0
- package/lib/client/electron.js +138 -0
- package/lib/client/elementHandle.js +284 -0
- package/lib/client/errors.js +77 -0
- package/lib/client/eventEmitter.js +314 -0
- package/lib/client/events.js +103 -0
- package/lib/client/fetch.js +368 -0
- package/lib/client/fileChooser.js +46 -0
- package/lib/client/fileUtils.js +34 -0
- package/lib/client/frame.js +409 -0
- package/lib/client/harRouter.js +87 -0
- package/lib/client/input.js +84 -0
- package/lib/client/jsHandle.js +109 -0
- package/lib/client/jsonPipe.js +39 -0
- package/lib/client/localUtils.js +60 -0
- package/lib/client/locator.js +369 -0
- package/lib/client/network.js +747 -0
- package/lib/client/page.js +743 -0
- package/lib/client/pageAgent.js +64 -0
- package/lib/client/platform.js +77 -0
- package/lib/client/playwright.js +71 -0
- package/lib/client/selectors.js +55 -0
- package/lib/client/stream.js +39 -0
- package/lib/client/timeoutSettings.js +79 -0
- package/lib/client/tracing.js +119 -0
- package/lib/client/types.js +28 -0
- package/lib/client/video.js +59 -0
- package/lib/client/waiter.js +142 -0
- package/lib/client/webError.js +39 -0
- package/lib/client/webSocket.js +93 -0
- package/lib/client/worker.js +85 -0
- package/lib/client/writableStream.js +39 -0
- package/lib/generated/bindingsControllerSource.js +28 -0
- package/lib/generated/clockSource.js +28 -0
- package/lib/generated/injectedScriptSource.js +28 -0
- package/lib/generated/pollingRecorderSource.js +28 -0
- package/lib/generated/storageScriptSource.js +28 -0
- package/lib/generated/utilityScriptSource.js +28 -0
- package/lib/generated/webSocketMockSource.js +336 -0
- package/lib/inProcessFactory.js +60 -0
- package/lib/inprocess.js +3 -0
- package/lib/mcpBundle.js +84 -0
- package/lib/mcpBundleImpl/index.js +147 -0
- package/lib/outofprocess.js +76 -0
- package/lib/protocol/serializers.js +197 -0
- package/lib/protocol/validator.js +2969 -0
- package/lib/protocol/validatorPrimitives.js +193 -0
- package/lib/remote/playwrightConnection.js +129 -0
- package/lib/remote/playwrightServer.js +334 -0
- package/lib/server/agent/actionRunner.js +335 -0
- package/lib/server/agent/actions.js +128 -0
- package/lib/server/agent/codegen.js +111 -0
- package/lib/server/agent/context.js +150 -0
- package/lib/server/agent/expectTools.js +156 -0
- package/lib/server/agent/pageAgent.js +204 -0
- package/lib/server/agent/performTools.js +262 -0
- package/lib/server/agent/tool.js +109 -0
- package/lib/server/android/android.js +465 -0
- package/lib/server/android/backendAdb.js +177 -0
- package/lib/server/artifact.js +127 -0
- package/lib/server/bidi/bidiBrowser.js +549 -0
- package/lib/server/bidi/bidiChromium.js +148 -0
- package/lib/server/bidi/bidiConnection.js +213 -0
- package/lib/server/bidi/bidiDeserializer.js +116 -0
- package/lib/server/bidi/bidiExecutionContext.js +267 -0
- package/lib/server/bidi/bidiFirefox.js +128 -0
- package/lib/server/bidi/bidiInput.js +146 -0
- package/lib/server/bidi/bidiNetworkManager.js +383 -0
- package/lib/server/bidi/bidiOverCdp.js +102 -0
- package/lib/server/bidi/bidiPage.js +583 -0
- package/lib/server/bidi/bidiPdf.js +106 -0
- package/lib/server/bidi/third_party/bidiCommands.d.js +22 -0
- package/lib/server/bidi/third_party/bidiKeyboard.js +256 -0
- package/lib/server/bidi/third_party/bidiProtocol.js +24 -0
- package/lib/server/bidi/third_party/bidiProtocolCore.js +180 -0
- package/lib/server/bidi/third_party/bidiProtocolPermissions.js +42 -0
- package/lib/server/bidi/third_party/bidiSerializer.js +148 -0
- package/lib/server/bidi/third_party/firefoxPrefs.js +259 -0
- package/lib/server/browser.js +149 -0
- package/lib/server/browserContext.js +702 -0
- package/lib/server/browserType.js +336 -0
- package/lib/server/callLog.js +82 -0
- package/lib/server/chromium/appIcon.png +0 -0
- package/lib/server/chromium/chromium.js +395 -0
- package/lib/server/chromium/chromiumSwitches.js +104 -0
- package/lib/server/chromium/crBrowser.js +511 -0
- package/lib/server/chromium/crConnection.js +197 -0
- package/lib/server/chromium/crCoverage.js +235 -0
- package/lib/server/chromium/crDevTools.js +111 -0
- package/lib/server/chromium/crDragDrop.js +131 -0
- package/lib/server/chromium/crExecutionContext.js +146 -0
- package/lib/server/chromium/crInput.js +187 -0
- package/lib/server/chromium/crNetworkManager.js +707 -0
- package/lib/server/chromium/crPage.js +1001 -0
- package/lib/server/chromium/crPdf.js +121 -0
- package/lib/server/chromium/crProtocolHelper.js +145 -0
- package/lib/server/chromium/crServiceWorker.js +136 -0
- package/lib/server/chromium/defaultFontFamilies.js +162 -0
- package/lib/server/chromium/protocol.d.js +16 -0
- package/lib/server/clock.js +149 -0
- package/lib/server/codegen/csharp.js +327 -0
- package/lib/server/codegen/java.js +274 -0
- package/lib/server/codegen/javascript.js +247 -0
- package/lib/server/codegen/jsonl.js +52 -0
- package/lib/server/codegen/language.js +132 -0
- package/lib/server/codegen/languages.js +68 -0
- package/lib/server/codegen/python.js +279 -0
- package/lib/server/codegen/types.js +16 -0
- package/lib/server/console.js +57 -0
- package/lib/server/cookieStore.js +206 -0
- package/lib/server/debugController.js +191 -0
- package/lib/server/debugger.js +119 -0
- package/lib/server/deviceDescriptors.js +39 -0
- package/lib/server/deviceDescriptorsSource.json +1779 -0
- package/lib/server/dialog.js +116 -0
- package/lib/server/dispatchers/androidDispatcher.js +325 -0
- package/lib/server/dispatchers/artifactDispatcher.js +118 -0
- package/lib/server/dispatchers/browserContextDispatcher.js +384 -0
- package/lib/server/dispatchers/browserDispatcher.js +118 -0
- package/lib/server/dispatchers/browserTypeDispatcher.js +64 -0
- package/lib/server/dispatchers/cdpSessionDispatcher.js +44 -0
- package/lib/server/dispatchers/debugControllerDispatcher.js +78 -0
- package/lib/server/dispatchers/dialogDispatcher.js +47 -0
- package/lib/server/dispatchers/dispatcher.js +364 -0
- package/lib/server/dispatchers/electronDispatcher.js +89 -0
- package/lib/server/dispatchers/elementHandlerDispatcher.js +181 -0
- package/lib/server/dispatchers/frameDispatcher.js +227 -0
- package/lib/server/dispatchers/jsHandleDispatcher.js +85 -0
- package/lib/server/dispatchers/jsonPipeDispatcher.js +58 -0
- package/lib/server/dispatchers/localUtilsDispatcher.js +149 -0
- package/lib/server/dispatchers/networkDispatchers.js +213 -0
- package/lib/server/dispatchers/pageAgentDispatcher.js +96 -0
- package/lib/server/dispatchers/pageDispatcher.js +393 -0
- package/lib/server/dispatchers/playwrightDispatcher.js +108 -0
- package/lib/server/dispatchers/streamDispatcher.js +67 -0
- package/lib/server/dispatchers/tracingDispatcher.js +68 -0
- package/lib/server/dispatchers/webSocketRouteDispatcher.js +165 -0
- package/lib/server/dispatchers/writableStreamDispatcher.js +79 -0
- package/lib/server/dom.js +815 -0
- package/lib/server/download.js +70 -0
- package/lib/server/electron/electron.js +273 -0
- package/lib/server/electron/loader.js +29 -0
- package/lib/server/errors.js +69 -0
- package/lib/server/fetch.js +621 -0
- package/lib/server/fileChooser.js +43 -0
- package/lib/server/fileUploadUtils.js +84 -0
- package/lib/server/firefox/ffBrowser.js +418 -0
- package/lib/server/firefox/ffConnection.js +142 -0
- package/lib/server/firefox/ffExecutionContext.js +150 -0
- package/lib/server/firefox/ffInput.js +159 -0
- package/lib/server/firefox/ffNetworkManager.js +256 -0
- package/lib/server/firefox/ffPage.js +497 -0
- package/lib/server/firefox/firefox.js +114 -0
- package/lib/server/firefox/protocol.d.js +16 -0
- package/lib/server/formData.js +147 -0
- package/lib/server/frameSelectors.js +160 -0
- package/lib/server/frames.js +1471 -0
- package/lib/server/har/harRecorder.js +147 -0
- package/lib/server/har/harTracer.js +607 -0
- package/lib/server/harBackend.js +157 -0
- package/lib/server/helper.js +96 -0
- package/lib/server/index.js +58 -0
- package/lib/server/input.js +277 -0
- package/lib/server/instrumentation.js +72 -0
- package/lib/server/javascript.js +291 -0
- package/lib/server/launchApp.js +128 -0
- package/lib/server/localUtils.js +214 -0
- package/lib/server/macEditingCommands.js +143 -0
- package/lib/server/network.js +667 -0
- package/lib/server/page.js +830 -0
- package/lib/server/pipeTransport.js +89 -0
- package/lib/server/playwright.js +69 -0
- package/lib/server/progress.js +132 -0
- package/lib/server/protocolError.js +52 -0
- package/lib/server/recorder/chat.js +161 -0
- package/lib/server/recorder/recorderApp.js +366 -0
- package/lib/server/recorder/recorderRunner.js +138 -0
- package/lib/server/recorder/recorderSignalProcessor.js +83 -0
- package/lib/server/recorder/recorderUtils.js +157 -0
- package/lib/server/recorder/throttledFile.js +57 -0
- package/lib/server/recorder.js +499 -0
- package/lib/server/registry/browserFetcher.js +177 -0
- package/lib/server/registry/dependencies.js +371 -0
- package/lib/server/registry/index.js +1422 -0
- package/lib/server/registry/nativeDeps.js +1280 -0
- package/lib/server/registry/oopDownloadBrowserMain.js +127 -0
- package/lib/server/screencast.js +190 -0
- package/lib/server/screenshotter.js +333 -0
- package/lib/server/selectors.js +112 -0
- package/lib/server/socksClientCertificatesInterceptor.js +383 -0
- package/lib/server/socksInterceptor.js +95 -0
- package/lib/server/trace/exporter/traceExporter.js +1102 -0
- package/lib/server/trace/recorder/snapshotter.js +147 -0
- package/lib/server/trace/recorder/snapshotterInjected.js +561 -0
- package/lib/server/trace/recorder/tracing.js +604 -0
- package/lib/server/trace/viewer/traceParser.js +72 -0
- package/lib/server/trace/viewer/traceViewer.js +245 -0
- package/lib/server/transport.js +181 -0
- package/lib/server/types.js +28 -0
- package/lib/server/usKeyboardLayout.js +145 -0
- package/lib/server/utils/ascii.js +44 -0
- package/lib/server/utils/comparators.js +139 -0
- package/lib/server/utils/crypto.js +216 -0
- package/lib/server/utils/debug.js +42 -0
- package/lib/server/utils/debugLogger.js +122 -0
- package/lib/server/utils/env.js +73 -0
- package/lib/server/utils/eventsHelper.js +39 -0
- package/lib/server/utils/expectUtils.js +123 -0
- package/lib/server/utils/fileUtils.js +191 -0
- package/lib/server/utils/happyEyeballs.js +207 -0
- package/lib/server/utils/hostPlatform.js +123 -0
- package/lib/server/utils/httpServer.js +203 -0
- package/lib/server/utils/imageUtils.js +141 -0
- package/lib/server/utils/image_tools/colorUtils.js +89 -0
- package/lib/server/utils/image_tools/compare.js +109 -0
- package/lib/server/utils/image_tools/imageChannel.js +78 -0
- package/lib/server/utils/image_tools/stats.js +102 -0
- package/lib/server/utils/linuxUtils.js +71 -0
- package/lib/server/utils/network.js +242 -0
- package/lib/server/utils/nodePlatform.js +154 -0
- package/lib/server/utils/pipeTransport.js +84 -0
- package/lib/server/utils/processLauncher.js +241 -0
- package/lib/server/utils/profiler.js +65 -0
- package/lib/server/utils/socksProxy.js +511 -0
- package/lib/server/utils/spawnAsync.js +41 -0
- package/lib/server/utils/task.js +51 -0
- package/lib/server/utils/userAgent.js +98 -0
- package/lib/server/utils/wsServer.js +121 -0
- package/lib/server/utils/zipFile.js +74 -0
- package/lib/server/utils/zones.js +57 -0
- package/lib/server/videoRecorder.js +124 -0
- package/lib/server/webkit/protocol.d.js +16 -0
- package/lib/server/webkit/webkit.js +108 -0
- package/lib/server/webkit/wkBrowser.js +335 -0
- package/lib/server/webkit/wkConnection.js +144 -0
- package/lib/server/webkit/wkExecutionContext.js +154 -0
- package/lib/server/webkit/wkInput.js +181 -0
- package/lib/server/webkit/wkInterceptableRequest.js +197 -0
- package/lib/server/webkit/wkPage.js +1158 -0
- package/lib/server/webkit/wkProvisionalPage.js +83 -0
- package/lib/server/webkit/wkWorkers.js +105 -0
- package/lib/third_party/pixelmatch.js +255 -0
- package/lib/utils/isomorphic/ariaSnapshot.js +455 -0
- package/lib/utils/isomorphic/assert.js +31 -0
- package/lib/utils/isomorphic/colors.js +72 -0
- package/lib/utils/isomorphic/cssParser.js +245 -0
- package/lib/utils/isomorphic/cssTokenizer.js +1051 -0
- package/lib/utils/isomorphic/headers.js +53 -0
- package/lib/utils/isomorphic/locatorGenerators.js +689 -0
- package/lib/utils/isomorphic/locatorParser.js +176 -0
- package/lib/utils/isomorphic/locatorUtils.js +81 -0
- package/lib/utils/isomorphic/lruCache.js +51 -0
- package/lib/utils/isomorphic/manualPromise.js +114 -0
- package/lib/utils/isomorphic/mimeType.js +459 -0
- package/lib/utils/isomorphic/multimap.js +80 -0
- package/lib/utils/isomorphic/protocolFormatter.js +81 -0
- package/lib/utils/isomorphic/protocolMetainfo.js +330 -0
- package/lib/utils/isomorphic/rtti.js +43 -0
- package/lib/utils/isomorphic/selectorParser.js +386 -0
- package/lib/utils/isomorphic/semaphore.js +54 -0
- package/lib/utils/isomorphic/stackTrace.js +158 -0
- package/lib/utils/isomorphic/stringUtils.js +204 -0
- package/lib/utils/isomorphic/time.js +49 -0
- package/lib/utils/isomorphic/timeoutRunner.js +66 -0
- package/lib/utils/isomorphic/trace/entries.js +16 -0
- package/lib/utils/isomorphic/trace/snapshotRenderer.js +499 -0
- package/lib/utils/isomorphic/trace/snapshotServer.js +120 -0
- package/lib/utils/isomorphic/trace/snapshotStorage.js +89 -0
- package/lib/utils/isomorphic/trace/traceLoader.js +131 -0
- package/lib/utils/isomorphic/trace/traceModel.js +365 -0
- package/lib/utils/isomorphic/trace/traceModernizer.js +400 -0
- package/lib/utils/isomorphic/trace/versions/traceV3.js +16 -0
- package/lib/utils/isomorphic/trace/versions/traceV4.js +16 -0
- package/lib/utils/isomorphic/trace/versions/traceV5.js +16 -0
- package/lib/utils/isomorphic/trace/versions/traceV6.js +16 -0
- package/lib/utils/isomorphic/trace/versions/traceV7.js +16 -0
- package/lib/utils/isomorphic/trace/versions/traceV8.js +16 -0
- package/lib/utils/isomorphic/traceUtils.js +58 -0
- package/lib/utils/isomorphic/types.js +16 -0
- package/lib/utils/isomorphic/urlMatch.js +190 -0
- package/lib/utils/isomorphic/utilityScriptSerializers.js +251 -0
- package/lib/utils/isomorphic/yaml.js +84 -0
- package/lib/utils.js +111 -0
- package/lib/utilsBundle.js +112 -0
- package/lib/utilsBundleImpl/index.js +218 -0
- package/lib/utilsBundleImpl/xdg-open +1066 -0
- package/lib/vite/htmlReport/index.html +84 -0
- package/lib/vite/recorder/assets/codeMirrorModule-DYBRYzYX.css +1 -0
- package/lib/vite/recorder/assets/codeMirrorModule-DadYNm1I.js +32 -0
- package/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
- package/lib/vite/recorder/assets/index-BSjZa4pk.css +1 -0
- package/lib/vite/recorder/assets/index-BhTWtUlo.js +193 -0
- package/lib/vite/recorder/index.html +29 -0
- package/lib/vite/recorder/playwright-logo.svg +9 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-a5XoALAZ.js +32 -0
- package/lib/vite/traceViewer/assets/defaultSettingsView-CJSZINFr.js +266 -0
- package/lib/vite/traceViewer/assets/xtermModule-CsJ4vdCR.js +9 -0
- package/lib/vite/traceViewer/codeMirrorModule.DYBRYzYX.css +1 -0
- package/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
- package/lib/vite/traceViewer/defaultSettingsView.7ch9cixO.css +1 -0
- package/lib/vite/traceViewer/index.BVu7tZDe.css +1 -0
- package/lib/vite/traceViewer/index.Dd9jebqr.js +2 -0
- package/lib/vite/traceViewer/index.html +43 -0
- package/lib/vite/traceViewer/manifest.webmanifest +16 -0
- package/lib/vite/traceViewer/playwright-logo.svg +9 -0
- package/lib/vite/traceViewer/snapshot.html +21 -0
- package/lib/vite/traceViewer/sw.bundle.js +5 -0
- package/lib/vite/traceViewer/uiMode.Btcz36p_.css +1 -0
- package/lib/vite/traceViewer/uiMode.CQJ9SCIQ.js +5 -0
- package/lib/vite/traceViewer/uiMode.html +17 -0
- package/lib/vite/traceViewer/xtermModule.DYP7pi_n.css +32 -0
- package/lib/zipBundle.js +34 -0
- package/lib/zipBundleImpl.js +5 -0
- package/package.json +43 -0
- package/types/protocol.d.ts +23824 -0
- package/types/structs.d.ts +45 -0
- package/types/types.d.ts +23170 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import{g as Ju}from"./index-BhTWtUlo.js";var vi={exports:{}},Zu=vi.exports,pa;function mt(){return pa||(pa=1,(function(ct,xt){(function(b,pe){ct.exports=pe()})(Zu,(function(){var b=navigator.userAgent,pe=navigator.platform,_=/gecko\/\d/i.test(b),te=/MSIE \d/.test(b),oe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(b),Q=/Edge\/(\d+)/.exec(b),k=te||oe||Q,I=k&&(te?document.documentMode||6:+(Q||oe)[1]),Y=!Q&&/WebKit\//.test(b),ne=Y&&/Qt\/\d+\.\d+/.test(b),S=!Q&&/Chrome\/(\d+)/.exec(b),R=S&&+S[1],A=/Opera\//.test(b),V=/Apple Computer/.test(navigator.vendor),ue=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(b),O=/PhantomJS/.test(b),w=V&&(/Mobile\/\w+/.test(b)||navigator.maxTouchPoints>2),M=/Android/.test(b),N=w||M||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(b),z=w||/Mac/.test(pe),X=/\bCrOS\b/.test(b),q=/win/i.test(pe),p=A&&b.match(/Version\/(\d*\.\d*)/);p&&(p=Number(p[1])),p&&p>=15&&(A=!1,Y=!0);var W=z&&(ne||A&&(p==null||p<12.11)),J=_||k&&I>=9;function P(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var $=function(e,t){var n=e.className,r=P(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 F(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function G(e,t){return F(e).appendChild(t)}function c(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 o=0;o<t.length;++o)i.appendChild(t[o]);return i}function T(e,t,n,r){var i=c(e,t,n,r);return i.setAttribute("role","presentation"),i}var C;document.createRange?C=function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:C=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 g(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 y(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 j(e,t){var n=e.className;P(t).test(n)||(e.className+=(n?" ":"")+t)}function de(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!P(n[r]).test(t)&&(t+=" "+n[r]);return t}var v=function(e){e.select()};w?v=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:k&&(v=function(e){try{e.select()}catch{}});function d(e){return e.display.wrapper.ownerDocument}function fe(e){return Te(e.display.wrapper)}function Te(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function le(e){return d(e).defaultView}function xe(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function Me(e,t,n){t||(t={});for(var r in e)e.hasOwnProperty(r)&&(n!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}function Fe(e,t,n,r,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var o=r||0,l=i||0;;){var a=e.indexOf(" ",o);if(a<0||a>=t)return l+(t-o);l+=a-o,l+=n-l%n,o=a+1}}var Ce=function(){this.id=null,this.f=null,this.time=0,this.handler=xe(this.onTimeout,this)};Ce.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Ce.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 ve(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var Oe=50,qe={toString:function(){return"CodeMirror.Pass"}},Ve={scroll:!1},dt={origin:"*mouse"},Pe={origin:"+move"};function _e(e,t,n){for(var r=0,i=0;;){var o=e.indexOf(" ",r);o==-1&&(o=e.length);var l=o-r;if(o==e.length||i+l>=t)return r+Math.min(l,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}var Ue=[""];function et(e){for(;Ue.length<=e;)Ue.push(we(Ue)+" ");return Ue[e]}function we(e){return e[e.length-1]}function Ie(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function E(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function ee(){}function K(e,t){var n;return Object.create?n=Object.create(e):(ee.prototype=e,n=new ee),t&&Me(t,n),n}var ze=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function me(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||ze.test(e))}function De(e,t){return t?t.source.indexOf("\\w")>-1&&me(e)?!0:t.test(e):me(e)}function be(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Be=/[\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 Ne(e){return e.charCodeAt(0)>=768&&Be.test(e)}function Mt(e,t,n){for(;(n<0?t>0:t<e.length)&&Ne(e.charAt(t));)t+=n;return t}function Pt(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function or(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var l=e[o];(l.from<n&&l.to>t||t==n&&l.to==t)&&(r(Math.max(l.from,t),Math.min(l.to,n),l.level==1?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var br=null;function lr(e,t,n){var r;br=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&n=="before"?r=i:br=i),o.from==t&&(o.from!=o.to&&n!="before"?r=i:br=i)}return r??br}var mi=(function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(u){return u<=247?e.charAt(u):1424<=u&&u<=1524?"R":1536<=u&&u<=1785?t.charAt(u-1536):1774<=u&&u<=2220?"r":8192<=u&&u<=8203?"w":u==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,l=/[Lb1n]/,a=/[1n]/;function s(u,h,x){this.level=u,this.from=h,this.to=x}return function(u,h){var x=h=="ltr"?"L":"R";if(u.length==0||h=="ltr"&&!r.test(u))return!1;for(var D=u.length,L=[],H=0;H<D;++H)L.push(n(u.charCodeAt(H)));for(var Z=0,ie=x;Z<D;++Z){var ae=L[Z];ae=="m"?L[Z]=ie:ie=ae}for(var he=0,se=x;he<D;++he){var ge=L[he];ge=="1"&&se=="r"?L[he]="n":o.test(ge)&&(se=ge,ge=="r"&&(L[he]="R"))}for(var Le=1,ke=L[0];Le<D-1;++Le){var Ee=L[Le];Ee=="+"&&ke=="1"&&L[Le+1]=="1"?L[Le]="1":Ee==","&&ke==L[Le+1]&&(ke=="1"||ke=="n")&&(L[Le]=ke),ke=Ee}for(var Ke=0;Ke<D;++Ke){var st=L[Ke];if(st==",")L[Ke]="N";else if(st=="%"){var Xe=void 0;for(Xe=Ke+1;Xe<D&&L[Xe]=="%";++Xe);for(var Nt=Ke&&L[Ke-1]=="!"||Xe<D&&L[Xe]=="1"?"1":"N",Tt=Ke;Tt<Xe;++Tt)L[Tt]=Nt;Ke=Xe-1}}for(var tt=0,Ct=x;tt<D;++tt){var ft=L[tt];Ct=="L"&&ft=="1"?L[tt]="L":o.test(ft)&&(Ct=ft)}for(var nt=0;nt<D;++nt)if(i.test(L[nt])){var rt=void 0;for(rt=nt+1;rt<D&&i.test(L[rt]);++rt);for(var Ze=(nt?L[nt-1]:x)=="L",Dt=(rt<D?L[rt]:x)=="L",nn=Ze==Dt?Ze?"L":"R":x,yr=nt;yr<rt;++yr)L[yr]=nn;nt=rt-1}for(var vt=[],Jt,ut=0;ut<D;)if(l.test(L[ut])){var co=ut;for(++ut;ut<D&&l.test(L[ut]);++ut);vt.push(new s(0,co,ut))}else{var ir=ut,Ar=vt.length,Nr=h=="rtl"?1:0;for(++ut;ut<D&&L[ut]!="L";++ut);for(var bt=ir;bt<ut;)if(a.test(L[bt])){ir<bt&&(vt.splice(Ar,0,new s(1,ir,bt)),Ar+=Nr);var on=bt;for(++bt;bt<ut&&a.test(L[bt]);++bt);vt.splice(Ar,0,new s(2,on,bt)),Ar+=Nr,ir=bt}else++bt;ir<ut&&vt.splice(Ar,0,new s(1,ir,ut))}return h=="ltr"&&(vt[0].level==1&&(Jt=u.match(/^\s+/))&&(vt[0].from=Jt[0].length,vt.unshift(new s(0,0,Jt[0].length))),we(vt).level==1&&(Jt=u.match(/\s+$/))&&(we(vt).to-=Jt[0].length,vt.push(new s(0,D-Jt[0].length,D)))),h=="rtl"?vt.reverse():vt}})();function Re(e,t){var n=e.order;return n==null&&(n=e.order=mi(e.text,t)),n}var Bn=[],Se=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||(e._handlers={});r[t]=(r[t]||Bn).concat(n)}};function Zt(e,t){return e._handlers&&e._handlers[t]||Bn}function ht(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 o=ve(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Ye(e,t){var n=Zt(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 Qe(e,t,n){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ye(e,n||t.type,e,t),kt(t)||t.codemirrorIgnore}function It(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)ve(n,t[r])==-1&&n.push(t[r])}function Ft(e,t){return Zt(e,t).length>0}function Bt(e){e.prototype.on=function(t,n){Se(this,t,n)},e.prototype.off=function(t,n){ht(this,t,n)}}function pt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Er(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function kt(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function ar(e){pt(e),Er(e)}function ln(e){return e.target||e.srcElement}function Rt(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),z&&e.ctrlKey&&t==1&&(t=3),t}var xi=(function(){if(k&&I<9)return!1;var e=c("div");return"draggable"in e||"dragDrop"in e})(),Or;function Rn(e){if(Or==null){var t=c("span","");G(e,c("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Or=t.offsetWidth<=1&&t.offsetHeight>2&&!(k&&I<8))}var n=Or?c("span",""):c("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}var an;function sr(e){if(an!=null)return an;var t=G(e,document.createTextNode("AخA")),n=C(t,0,1).getBoundingClientRect(),r=C(t,1,2).getBoundingClientRect();return F(e),!n||n.left==n.right?!1:an=r.right-n.right<3}var zt=`
|
|
2
|
+
|
|
3
|
+
b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(`
|
|
4
|
+
`,t);i==-1&&(i=e.length);var o=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),l=o.indexOf("\r");l!=-1?(n.push(o.slice(0,l)),t+=l+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},ur=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},Wn=(function(){var e=c("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")})(),Wt=null;function yi(e){if(Wt!=null)return Wt;var t=G(e,c("span","x")),n=t.getBoundingClientRect(),r=C(t,0,1).getBoundingClientRect();return Wt=Math.abs(n.left-r.left)>1}var Pr={},Ht={};function _t(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Pr[e]=t}function kr(e,t){Ht[e]=t}function Ir(e){if(typeof e=="string"&&Ht.hasOwnProperty(e))e=Ht[e];else if(e&&typeof e.name=="string"&&Ht.hasOwnProperty(e.name)){var t=Ht[e.name];typeof t=="string"&&(t={name:t}),e=K(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ir("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ir("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function zr(e,t){t=Ir(t);var n=Pr[t.name];if(!n)return zr(e,"text/plain");var r=n(e,t);if(fr.hasOwnProperty(t.name)){var i=fr[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}var fr={};function Br(e,t){var n=fr.hasOwnProperty(e)?fr[e]:fr[e]={};Me(t,n)}function Gt(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 sn(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 Rr(e,t,n){return e.startState?e.startState(t,n):!0}var Je=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};Je.prototype.eol=function(){return this.pos>=this.string.length},Je.prototype.sol=function(){return this.pos==this.lineStart},Je.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Je.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Je.prototype.eat=function(e){var t=this.string.charAt(this.pos),n;if(typeof e=="string"?n=t==e:n=t&&(e.test?e.test(t):e(t)),n)return++this.pos,t},Je.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Je.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Je.prototype.skipToEnd=function(){this.pos=this.string.length},Je.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Je.prototype.backUp=function(e){this.pos-=e},Je.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Fe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Fe(this.string,this.lineStart,this.tabSize):0)},Je.prototype.indentation=function(){return Fe(this.string,null,this.tabSize)-(this.lineStart?Fe(this.string,this.lineStart,this.tabSize):0)},Je.prototype.match=function(e,t,n){if(typeof e=="string"){var r=function(l){return n?l.toLowerCase():l},i=this.string.substr(this.pos,e.length);if(r(i)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var o=this.string.slice(this.pos).match(e);return o&&o.index>0?null:(o&&t!==!1&&(this.pos+=o[0].length),o)}},Je.prototype.current=function(){return this.string.slice(this.start,this.pos)},Je.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Je.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Je.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function ye(e,t){if(t-=e.first,t<0||t>=e.size)throw new 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],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function Vt(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(o){var l=o.text;i==n.line&&(l=l.slice(0,n.ch)),i==t.line&&(l=l.slice(t.ch)),r.push(l),++i}),r}function un(e,t,n){var r=[];return e.iter(t,n,function(i){r.push(i.text)}),r}function Et(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function f(e){if(e.parent==null)return null;for(var t=e.parent,n=ve(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 m(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var l=0;l<e.lines.length;++l){var a=e.lines[l],s=a.height;if(t<s)break;t-=s}return n+l}function U(e,t){return t>=e.first&&t<e.first+e.size}function re(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function B(e,t,n){if(n===void 0&&(n=null),!(this instanceof B))return new B(e,t,n);this.line=e,this.ch=t,this.sticky=n}function ce(e,t){return e.line-t.line||e.ch-t.ch}function We(e,t){return e.sticky==t.sticky&&ce(e,t)==0}function it(e){return B(e.line,e.ch)}function wt(e,t){return ce(e,t)<0?t:e}function Wr(e,t){return ce(e,t)<0?e:t}function go(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Ae(e,t){if(t.line<e.first)return B(e.first,0);var n=e.first+e.size-1;return t.line>n?B(n,ye(e,n).text.length):Za(t,ye(e,t.line).text.length)}function Za(e,t){var n=e.ch;return n==null||n>t?B(e.line,t):n<0?B(e.line,0):e}function vo(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=Ae(e,t[r]);return n}var Hn=function(e,t){this.state=e,this.lookAhead=t},Xt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};Xt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Xt.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}},Xt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Xt.fromSaved=function(e,t,n){return t instanceof Hn?new Xt(e,Gt(e.mode,t.state),n,t.lookAhead):new Xt(e,Gt(e.mode,t),n)},Xt.prototype.save=function(e){var t=e!==!1?Gt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Hn(t,this.maxLookAhead):t};function mo(e,t,n,r){var i=[e.state.modeGen],o={};So(e,t.text,e.doc.mode,n,function(u,h){return i.push(u,h)},o,r);for(var l=n.state,a=function(u){n.baseTokens=i;var h=e.state.overlays[u],x=1,D=0;n.state=!0,So(e,t.text,h.mode,n,function(L,H){for(var Z=x;D<L;){var ie=i[x];ie>L&&i.splice(x,1,L,i[x+1],ie),x+=2,D=Math.min(L,ie)}if(H)if(h.opaque)i.splice(Z,x-Z,L,"overlay "+H),x=Z+2;else for(;Z<x;Z+=2){var ae=i[Z+1];i[Z+1]=(ae?ae+" ":"")+"overlay "+H}},o),n.state=l,n.baseTokens=null,n.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)a(s);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function xo(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=fn(e,f(t)),i=t.text.length>e.options.maxHighlightLength&&Gt(e.doc.mode,r.state),o=mo(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function fn(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new Xt(r,!0,t);var o=Va(e,t,n),l=o>r.first&&ye(r,o-1).stateAfter,a=l?Xt.fromSaved(r,l,o):new Xt(r,Rr(r.mode),o);return r.iter(o,t,function(s){bi(e,s.text,a);var u=a.line;s.stateAfter=u==t-1||u%5==0||u>=i.viewFrom&&u<i.viewTo?a.save():null,a.nextLine()}),n&&(r.modeFrontier=a.line),a}function bi(e,t,n,r){var i=e.doc.mode,o=new Je(t,e.options.tabSize,n);for(o.start=o.pos=r||0,t==""&&yo(i,n.state);!o.eol();)ki(i,o,n.state),o.start=o.pos}function yo(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=sn(e,t);if(n.mode.blankLine)return n.mode.blankLine(n.state)}}function ki(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=sn(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}var bo=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function ko(e,t,n,r){var i=e.doc,o=i.mode,l;t=Ae(i,t);var a=ye(i,t.line),s=fn(e,t.line,n),u=new Je(a.text,e.options.tabSize,s),h;for(r&&(h=[]);(r||u.pos<t.ch)&&!u.eol();)u.start=u.pos,l=ki(o,u,s.state),r&&h.push(new bo(u,l,Gt(i.mode,s.state)));return r?h:new bo(u,l,s.state)}function wo(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]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function So(e,t,n,r,i,o,l){var a=n.flattenSpans;a==null&&(a=e.options.flattenSpans);var s=0,u=null,h=new Je(t,e.options.tabSize,r),x,D=e.options.addModeClass&&[null];for(t==""&&wo(yo(n,r.state),o);!h.eol();){if(h.pos>e.options.maxHighlightLength?(a=!1,l&&bi(e,t,r,h.pos),h.pos=t.length,x=null):x=wo(ki(n,h,r.state,D),o),D){var L=D[0].name;L&&(x="m-"+(x?L+" "+x:L))}if(!a||u!=x){for(;s<h.start;)s=Math.min(h.start,s+5e3),i(s,u);u=x}h.start=h.pos}for(;s<h.pos;){var H=Math.min(h.pos,s+5e3);i(H,u),s=H}}function Va(e,t,n){for(var r,i,o=e.doc,l=n?-1:t-(e.doc.mode.innerMode?1e3:100),a=t;a>l;--a){if(a<=o.first)return o.first;var s=ye(o,a-1),u=s.stateAfter;if(u&&(!n||a+(u instanceof Hn?u.lookAhead:0)<=o.modeFrontier))return a;var h=Fe(s.text,null,e.options.tabSize);(i==null||r>h)&&(i=a-1,r=h)}return i}function $a(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=ye(e,r).stateAfter;if(i&&(!(i instanceof Hn)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var Lo=!1,$t=!1;function es(){Lo=!0}function ts(){$t=!0}function _n(e,t,n){this.marker=e,this.from=t,this.to=n}function cn(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function rs(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function ns(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||(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 is(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker,a=o.from==null||(l.inclusiveLeft?o.from<=t:o.from<t);if(a||o.from==t&&l.type=="bookmark"&&(!n||!o.marker.insertLeft)){var s=o.to==null||(l.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new _n(l,o.from,s?null:o.to))}}return r}function os(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker,a=o.to==null||(l.inclusiveRight?o.to>=t:o.to>t);if(a||o.from==t&&l.type=="bookmark"&&(!n||o.marker.insertLeft)){var s=o.from==null||(l.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new _n(l,s?null:o.from-t,o.to==null?null:o.to-t))}}return r}function wi(e,t){if(t.full)return null;var n=U(e,t.from.line)&&ye(e,t.from.line).markedSpans,r=U(e,t.to.line)&&ye(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,l=ce(t.from,t.to)==0,a=is(n,i,l),s=os(r,o,l),u=t.text.length==1,h=we(t.text).length+(u?i:0);if(a)for(var x=0;x<a.length;++x){var D=a[x];if(D.to==null){var L=cn(s,D.marker);L?u&&(D.to=L.to==null?null:L.to+h):D.to=i}}if(s)for(var H=0;H<s.length;++H){var Z=s[H];if(Z.to!=null&&(Z.to+=h),Z.from==null){var ie=cn(a,Z.marker);ie||(Z.from=h,u&&(a||(a=[])).push(Z))}else Z.from+=h,u&&(a||(a=[])).push(Z)}a&&(a=To(a)),s&&s!=a&&(s=To(s));var ae=[a];if(!u){var he=t.text.length-2,se;if(he>0&&a)for(var ge=0;ge<a.length;++ge)a[ge].to==null&&(se||(se=[])).push(new _n(a[ge].marker,null,null));for(var Le=0;Le<he;++Le)ae.push(se);ae.push(s)}return ae}function To(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 ls(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(L){if(L.markedSpans)for(var H=0;H<L.markedSpans.length;++H){var Z=L.markedSpans[H].marker;Z.readOnly&&(!r||ve(r,Z)==-1)&&(r||(r=[])).push(Z)}}),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var l=r[o],a=l.find(0),s=0;s<i.length;++s){var u=i[s];if(!(ce(u.to,a.from)<0||ce(u.from,a.to)>0)){var h=[s,1],x=ce(u.from,a.from),D=ce(u.to,a.to);(x<0||!l.inclusiveLeft&&!x)&&h.push({from:u.from,to:a.from}),(D>0||!l.inclusiveRight&&!D)&&h.push({from:a.to,to:u.to}),i.splice.apply(i,h),s+=h.length-3}}return i}function Co(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Do(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function qn(e){return e.inclusiveLeft?-1:0}function jn(e){return e.inclusiveRight?1:0}function Si(e,t){var n=e.lines.length-t.lines.length;if(n!=0)return n;var r=e.find(),i=t.find(),o=ce(r.from,i.from)||qn(e)-qn(t);if(o)return-o;var l=ce(r.to,i.to)||jn(e)-jn(t);return l||t.id-e.id}function Mo(e,t){var n=$t&&e.markedSpans,r;if(n)for(var i=void 0,o=0;o<n.length;++o)i=n[o],i.marker.collapsed&&(t?i.from:i.to)==null&&(!r||Si(r,i.marker)<0)&&(r=i.marker);return r}function Fo(e){return Mo(e,!0)}function Kn(e){return Mo(e,!1)}function as(e,t){var n=$t&&e.markedSpans,r;if(n)for(var i=0;i<n.length;++i){var o=n[i];o.marker.collapsed&&(o.from==null||o.from<t)&&(o.to==null||o.to>t)&&(!r||Si(r,o.marker)<0)&&(r=o.marker)}return r}function Ao(e,t,n,r,i){var o=ye(e,t),l=$t&&o.markedSpans;if(l)for(var a=0;a<l.length;++a){var s=l[a];if(s.marker.collapsed){var u=s.marker.find(0),h=ce(u.from,n)||qn(s.marker)-qn(i),x=ce(u.to,r)||jn(s.marker)-jn(i);if(!(h>=0&&x<=0||h<=0&&x>=0)&&(h<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?ce(u.to,n)>=0:ce(u.to,n)>0)||h>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?ce(u.from,r)<=0:ce(u.from,r)<0)))return!0}}}function qt(e){for(var t;t=Fo(e);)e=t.find(-1,!0).line;return e}function ss(e){for(var t;t=Kn(e);)e=t.find(1,!0).line;return e}function us(e){for(var t,n;t=Kn(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function Li(e,t){var n=ye(e,t),r=qt(n);return n==r?t:f(r)}function No(e,t){if(t>e.lastLine())return t;var n=ye(e,t),r;if(!cr(e,n))return t;for(;r=Kn(n);)n=r.find(1,!0).line;return f(n)+1}function cr(e,t){var n=$t&&t.markedSpans;if(n){for(var r=void 0,i=0;i<n.length;++i)if(r=n[i],!!r.marker.collapsed){if(r.from==null)return!0;if(!r.marker.widgetNode&&r.from==0&&r.marker.inclusiveLeft&&Ti(e,t,r))return!0}}}function Ti(e,t,n){if(n.to==null){var r=n.marker.find(1,!0);return Ti(e,r.line,cn(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if(i=t.markedSpans[o],i.marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(i.to==null||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&Ti(e,t,i))return!0}function er(e){e=qt(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 o=n.parent;o;n=o,o=n.parent)for(var l=0;l<o.children.length;++l){var a=o.children[l];if(a==n)break;t+=a.height}return t}function Un(e){if(e.height==0)return 0;for(var t=e.text.length,n,r=e;n=Fo(r);){var i=n.find(0,!0);r=i.from.line,t+=i.from.ch-i.to.ch}for(r=e;n=Kn(r);){var o=n.find(0,!0);t-=r.text.length-o.from.ch,r=o.to.line,t+=r.text.length-o.to.ch}return t}function Ci(e){var t=e.display,n=e.doc;t.maxLine=ye(n,n.first),t.maxLineLength=Un(t.maxLine),t.maxLineChanged=!0,n.iter(function(r){var i=Un(r);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=r)})}var Hr=function(e,t,n){this.text=e,Do(this,t),this.height=n?n(this):1};Hr.prototype.lineNo=function(){return f(this)},Bt(Hr);function fs(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Co(e),Do(e,n);var i=r?r(e):1;i!=e.height&&Et(e,i)}function cs(e){e.parent=null,Co(e)}var ds={},hs={};function Eo(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?hs:ds;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Oo(e,t){var n=T("span",null,null,Y?"padding-right: .1px":null),r={pre:T("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 o=i?t.rest[i-1]:t.line,l=void 0;r.pos=0,r.addToken=gs,sr(e.display.measure)&&(l=Re(o,e.doc.direction))&&(r.addToken=ms(r.addToken,l)),r.map=[];var a=t!=e.display.externalMeasured&&f(o);xs(o,r,xo(e,o,a)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=de(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=de(o.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(Rn(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(Y){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 Ye(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=de(r.pre.className,r.textClass||"")),r}function ps(e){var t=c("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function gs(e,t,n,r,i,o,l){if(t){var a=e.splitSpaces?vs(t,e.trailingSpace):t,s=e.cm.state.specialChars,u=!1,h;if(!s.test(t))e.col+=t.length,h=document.createTextNode(a),e.map.push(e.pos,e.pos+t.length,h),k&&I<9&&(u=!0),e.pos+=t.length;else{h=document.createDocumentFragment();for(var x=0;;){s.lastIndex=x;var D=s.exec(t),L=D?D.index-x:t.length-x;if(L){var H=document.createTextNode(a.slice(x,x+L));k&&I<9?h.appendChild(c("span",[H])):h.appendChild(H),e.map.push(e.pos,e.pos+L,H),e.col+=L,e.pos+=L}if(!D)break;x+=L+1;var Z=void 0;if(D[0]==" "){var ie=e.cm.options.tabSize,ae=ie-e.col%ie;Z=h.appendChild(c("span",et(ae),"cm-tab")),Z.setAttribute("role","presentation"),Z.setAttribute("cm-text"," "),e.col+=ae}else D[0]=="\r"||D[0]==`
|
|
5
|
+
`?(Z=h.appendChild(c("span",D[0]=="\r"?"␍":"","cm-invalidchar")),Z.setAttribute("cm-text",D[0]),e.col+=1):(Z=e.cm.options.specialCharPlaceholder(D[0]),Z.setAttribute("cm-text",D[0]),k&&I<9?h.appendChild(c("span",[Z])):h.appendChild(Z),e.col+=1);e.map.push(e.pos,e.pos+1,Z),e.pos++}}if(e.trailingSpace=a.charCodeAt(t.length-1)==32,n||r||i||u||o||l){var he=n||"";r&&(he+=r),i&&(he+=i);var se=c("span",[h],he,o);if(l)for(var ge in l)l.hasOwnProperty(ge)&&ge!="style"&&ge!="class"&&se.setAttribute(ge,l[ge]);return e.content.appendChild(se)}e.content.appendChild(h)}}function vs(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);o==" "&&n&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(o=" "),r+=o,n=o==" "}return r}function ms(e,t){return function(n,r,i,o,l,a,s){i=i?i+" cm-force-border":"cm-force-border";for(var u=n.pos,h=u+r.length;;){for(var x=void 0,D=0;D<t.length&&(x=t[D],!(x.to>u&&x.from<=u));D++);if(x.to>=h)return e(n,r,i,o,l,a,s);e(n,r.slice(0,x.to-u),i,o,null,a,s),o=null,r=r.slice(x.to-u),u=x.to}}}function Po(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||(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 xs(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(!r){for(var l=1;l<n.length;l+=2)t.addToken(t,i.slice(o,o=n[l]),Eo(n[l+1],t.cm.options));return}for(var a=i.length,s=0,u=1,h="",x,D,L=0,H,Z,ie,ae,he;;){if(L==s){H=Z=ie=D="",he=null,ae=null,L=1/0;for(var se=[],ge=void 0,Le=0;Le<r.length;++Le){var ke=r[Le],Ee=ke.marker;if(Ee.type=="bookmark"&&ke.from==s&&Ee.widgetNode)se.push(Ee);else if(ke.from<=s&&(ke.to==null||ke.to>s||Ee.collapsed&&ke.to==s&&ke.from==s)){if(ke.to!=null&&ke.to!=s&&L>ke.to&&(L=ke.to,Z=""),Ee.className&&(H+=" "+Ee.className),Ee.css&&(D=(D?D+";":"")+Ee.css),Ee.startStyle&&ke.from==s&&(ie+=" "+Ee.startStyle),Ee.endStyle&&ke.to==L&&(ge||(ge=[])).push(Ee.endStyle,ke.to),Ee.title&&((he||(he={})).title=Ee.title),Ee.attributes)for(var Ke in Ee.attributes)(he||(he={}))[Ke]=Ee.attributes[Ke];Ee.collapsed&&(!ae||Si(ae.marker,Ee)<0)&&(ae=ke)}else ke.from>s&&L>ke.from&&(L=ke.from)}if(ge)for(var st=0;st<ge.length;st+=2)ge[st+1]==L&&(Z+=" "+ge[st]);if(!ae||ae.from==s)for(var Xe=0;Xe<se.length;++Xe)Po(t,0,se[Xe]);if(ae&&(ae.from||0)==s){if(Po(t,(ae.to==null?a+1:ae.to)-s,ae.marker,ae.from==null),ae.to==null)return;ae.to==s&&(ae=!1)}}if(s>=a)break;for(var Nt=Math.min(a,L);;){if(h){var Tt=s+h.length;if(!ae){var tt=Tt>Nt?h.slice(0,Nt-s):h;t.addToken(t,tt,x?x+H:H,ie,s+tt.length==L?Z:"",D,he)}if(Tt>=Nt){h=h.slice(Nt-s),s=Nt;break}s=Tt,ie=""}h=i.slice(o,o=n[u++]),x=Eo(n[u++],t.cm.options)}}}function Io(e,t,n){this.line=t,this.rest=us(t),this.size=this.rest?f(we(this.rest))-n+1:1,this.node=this.text=null,this.hidden=cr(e,t)}function Gn(e,t,n){for(var r=[],i,o=t;o<n;o=i){var l=new Io(e.doc,ye(e.doc,o),o);i=o+l.size,r.push(l)}return r}var _r=null;function ys(e){_r?_r.ops.push(e):e.ownsGroup=_r={ops:[e],delayedCallbacks:[]}}function bs(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 ks(e,t){var n=e.ownsGroup;if(n)try{bs(n)}finally{_r=null,t(n)}}var dn=null;function ot(e,t){var n=Zt(e,t);if(n.length){var r=Array.prototype.slice.call(arguments,2),i;_r?i=_r.delayedCallbacks:dn?i=dn:(i=dn=[],setTimeout(ws,0));for(var o=function(a){i.push(function(){return n[a].apply(null,r)})},l=0;l<n.length;++l)o(l)}}function ws(){var e=dn;dn=null;for(var t=0;t<e.length;++t)e[t]()}function zo(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];o=="text"?Ls(e,t):o=="gutter"?Ro(e,t,n,r):o=="class"?Di(e,t):o=="widget"&&Ts(e,t,r)}t.changes=null}function hn(e){return e.node==e.text&&(e.node=c("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),k&&I<8&&(e.node.style.zIndex=2)),e.node}function Ss(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=hn(t);t.background=r.insertBefore(c("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function Bo(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Oo(e,t)}function Ls(e,t){var n=t.text.className,r=Bo(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,Di(e,t)):n&&(t.text.className=n)}function Di(e,t){Ss(e,t),t.line.wrapClass?hn(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 Ro(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=hn(t);t.gutterBackground=c("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 o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var l=hn(t),a=t.gutter=c("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(a.setAttribute("aria-hidden","true"),e.display.input.setUneditable(a),l.insertBefore(a,t.text),t.line.gutterClass&&(a.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!o||!o["CodeMirror-linenumbers"])&&(t.lineNumber=a.appendChild(c("div",re(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var s=0;s<e.display.gutterSpecs.length;++s){var u=e.display.gutterSpecs[s].className,h=o.hasOwnProperty(u)&&o[u];h&&a.appendChild(c("div",[h],"CodeMirror-gutter-elt","left: "+r.gutterLeft[u]+"px; width: "+r.gutterWidth[u]+"px"))}}}function Ts(e,t,n){t.alignable&&(t.alignable=null);for(var r=P("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);Wo(e,t,n)}function Cs(e,t,n,r){var i=Bo(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Di(e,t),Ro(e,t,n,r),Wo(e,t,r),t.node}function Wo(e,t,n){if(Ho(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)Ho(e,t.rest[r],t,n,!1)}function Ho(e,t,n,r,i){if(t.widgets)for(var o=hn(n),l=0,a=t.widgets;l<a.length;++l){var s=a[l],u=c("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),Ds(s,u,n,r),e.display.input.setUneditable(u),i&&s.above?o.insertBefore(u,n.gutter||n.text):o.appendChild(u),ot(s,"redraw")}}function Ds(e,t,n,r){if(e.noHScroll){(n.alignable||(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 pn(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!g(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;"),G(t.display.measure,c("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function tr(e,t){for(var n=ln(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 Xn(e){return e.lineSpace.offsetTop}function Mi(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function _o(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=G(e.measure,c("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 Yt(e){return Oe-e.display.nativeBarWidth}function wr(e){return e.display.scroller.clientWidth-Yt(e)-e.display.barWidth}function Fi(e){return e.display.scroller.clientHeight-Yt(e)-e.display.barHeight}function Ms(e,t,n){var r=e.options.lineWrapping,i=r&&wr(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var l=t.text.firstChild.getClientRects(),a=0;a<l.length-1;a++){var s=l[a],u=l[a+1];Math.abs(s.bottom-u.bottom)>2&&o.push((s.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function qo(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(f(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function Fs(e,t){t=qt(t);var n=f(t),r=e.display.externalMeasured=new Io(e.doc,t,n);r.lineN=n;var i=r.built=Oo(e,r);return r.text=i.pre,G(e.display.lineMeasure,i.pre),r}function jo(e,t,n,r){return Qt(e,qr(e,t),n,r)}function Ai(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Tr(e,t)];var n=e.display.externalMeasured;if(n&&t>=n.lineN&&t<n.lineN+n.size)return n}function qr(e,t){var n=f(t),r=Ai(e,n);r&&!r.text?r=null:r&&r.changes&&(zo(e,r,n,Ii(e)),e.curOp.forceUpdate=!0),r||(r=Fs(e,t));var i=qo(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Qt(e,t,n,r,i){t.before&&(n=-1);var o=n+(r||""),l;return t.cache.hasOwnProperty(o)?l=t.cache[o]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Ms(e,t.view,t.rect),t.hasHeights=!0),l=Ns(e,t,n,r),l.bogus||(t.cache[o]=l)),{left:l.left,right:l.right,top:i?l.rtop:l.top,bottom:i?l.rbottom:l.bottom}}var Ko={left:0,right:0,top:0,bottom:0};function Uo(e,t,n){for(var r,i,o,l,a,s,u=0;u<e.length;u+=3)if(a=e[u],s=e[u+1],t<a?(i=0,o=1,l="left"):t<s?(i=t-a,o=i+1):(u==e.length-3||t==s&&e[u+3]>t)&&(o=s-a,i=o-1,t>=s&&(l="right")),i!=null){if(r=e[u+2],a==s&&n==(r.insertLeft?"left":"right")&&(l=n),n=="left"&&i==0)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[(u-=3)+2],l="left";if(n=="right"&&i==s-a)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)r=e[(u+=3)+2],l="right";break}return{node:r,start:i,end:o,collapse:l,coverStart:a,coverEnd:s}}function As(e,t){var n=Ko;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 Ns(e,t,n,r){var i=Uo(t.map,n,r),o=i.node,l=i.start,a=i.end,s=i.collapse,u;if(o.nodeType==3){for(var h=0;h<4;h++){for(;l&&Ne(t.line.text.charAt(i.coverStart+l));)--l;for(;i.coverStart+a<i.coverEnd&&Ne(t.line.text.charAt(i.coverStart+a));)++a;if(k&&I<9&&l==0&&a==i.coverEnd-i.coverStart?u=o.parentNode.getBoundingClientRect():u=As(C(o,l,a).getClientRects(),r),u.left||u.right||l==0)break;a=l,l=l-1,s="right"}k&&I<11&&(u=Es(e.display.measure,u))}else{l>0&&(s=r="right");var x;e.options.lineWrapping&&(x=o.getClientRects()).length>1?u=x[r=="right"?x.length-1:0]:u=o.getBoundingClientRect()}if(k&&I<9&&!l&&(!u||!u.left&&!u.right)){var D=o.parentNode.getClientRects()[0];D?u={left:D.left,right:D.left+Kr(e.display),top:D.top,bottom:D.bottom}:u=Ko}for(var L=u.top-t.rect.top,H=u.bottom-t.rect.top,Z=(L+H)/2,ie=t.view.measure.heights,ae=0;ae<ie.length-1&&!(Z<ie[ae]);ae++);var he=ae?ie[ae-1]:0,se=ie[ae],ge={left:(s=="right"?u.right:u.left)-t.rect.left,right:(s=="left"?u.left:u.right)-t.rect.left,top:he,bottom:se};return!u.left&&!u.right&&(ge.bogus=!0),e.options.singleCursorHeightPerLine||(ge.rtop=L,ge.rbottom=H),ge}function Es(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!yi(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 Go(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 Xo(e){e.display.externalMeasure=null,F(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Go(e.display.view[t])}function gn(e){Xo(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Yo(e){return S&&M?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function Qo(e){return S&&M?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function Ni(e){var t=qt(e),n=t.widgets,r=0;if(n)for(var i=0;i<n.length;++i)n[i].above&&(r+=pn(n[i]));return r}function Yn(e,t,n,r,i){if(!i){var o=Ni(t);n.top+=o,n.bottom+=o}if(r=="line")return n;r||(r="local");var l=er(t);if(r=="local"?l+=Xn(e.display):l-=e.display.viewOffset,r=="page"||r=="window"){var a=e.display.lineSpace.getBoundingClientRect();l+=a.top+(r=="window"?0:Qo(d(e)));var s=a.left+(r=="window"?0:Yo(d(e)));n.left+=s,n.right+=s}return n.top+=l,n.bottom+=l,n}function Jo(e,t,n){if(n=="div")return t;var r=t.left,i=t.top;if(n=="page")r-=Yo(d(e)),i-=Qo(d(e));else if(n=="local"||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var l=e.display.lineSpace.getBoundingClientRect();return{left:r-l.left,top:i-l.top}}function Qn(e,t,n,r,i){return r||(r=ye(e.doc,t.line)),Yn(e,r,jo(e,r,t.ch,i),n)}function jt(e,t,n,r,i,o){r=r||ye(e.doc,t.line),i||(i=qr(e,r));function l(H,Z){var ie=Qt(e,i,H,Z?"right":"left",o);return Z?ie.left=ie.right:ie.right=ie.left,Yn(e,r,ie,n)}var a=Re(r,e.doc.direction),s=t.ch,u=t.sticky;if(s>=r.text.length?(s=r.text.length,u="before"):s<=0&&(s=0,u="after"),!a)return l(u=="before"?s-1:s,u=="before");function h(H,Z,ie){var ae=a[Z],he=ae.level==1;return l(ie?H-1:H,he!=ie)}var x=lr(a,s,u),D=br,L=h(s,x,u=="before");return D!=null&&(L.other=h(s,D,u!="before")),L}function Zo(e,t){var n=0;t=Ae(e.doc,t),e.options.lineWrapping||(n=Kr(e.display)*t.ch);var r=ye(e.doc,t.line),i=er(r)+Xn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Ei(e,t,n,r,i){var o=B(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Oi(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return Ei(r.first,0,null,-1,-1);var i=m(r,n),o=r.first+r.size-1;if(i>o)return Ei(r.first+r.size-1,ye(r,o).text.length,null,1,1);t<0&&(t=0);for(var l=ye(r,i);;){var a=Os(e,l,i,t,n),s=as(l,a.ch+(a.xRel>0||a.outside>0?1:0));if(!s)return a;var u=s.find(1);if(u.line==i)return u;l=ye(r,i=u.line)}}function Vo(e,t,n,r){r-=Ni(t);var i=t.text.length,o=Pt(function(l){return Qt(e,n,l-1).bottom<=r},i,0);return i=Pt(function(l){return Qt(e,n,l).top>r},o,i),{begin:o,end:i}}function $o(e,t,n,r){n||(n=qr(e,t));var i=Yn(e,t,Qt(e,n,r),"line").top;return Vo(e,t,n,i)}function Pi(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function Os(e,t,n,r,i){i-=er(t);var o=qr(e,t),l=Ni(t),a=0,s=t.text.length,u=!0,h=Re(t,e.doc.direction);if(h){var x=(e.options.lineWrapping?Is:Ps)(e,t,n,o,h,r,i);u=x.level!=1,a=u?x.from:x.to-1,s=u?x.to:x.from-1}var D=null,L=null,H=Pt(function(Le){var ke=Qt(e,o,Le);return ke.top+=l,ke.bottom+=l,Pi(ke,r,i,!1)?(ke.top<=i&&ke.left<=r&&(D=Le,L=ke),!0):!1},a,s),Z,ie,ae=!1;if(L){var he=r-L.left<L.right-r,se=he==u;H=D+(se?0:1),ie=se?"after":"before",Z=he?L.left:L.right}else{!u&&(H==s||H==a)&&H++,ie=H==0?"after":H==t.text.length?"before":Qt(e,o,H-(u?1:0)).bottom+l<=i==u?"after":"before";var ge=jt(e,B(n,H,ie),"line",t,o);Z=ge.left,ae=i<ge.top?-1:i>=ge.bottom?1:0}return H=Mt(t.text,H,1),Ei(n,H,ie,ae,r-Z)}function Ps(e,t,n,r,i,o,l){var a=Pt(function(x){var D=i[x],L=D.level!=1;return Pi(jt(e,B(n,L?D.to:D.from,L?"before":"after"),"line",t,r),o,l,!0)},0,i.length-1),s=i[a];if(a>0){var u=s.level!=1,h=jt(e,B(n,u?s.from:s.to,u?"after":"before"),"line",t,r);Pi(h,o,l,!0)&&h.top>l&&(s=i[a-1])}return s}function Is(e,t,n,r,i,o,l){var a=Vo(e,t,r,l),s=a.begin,u=a.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var h=null,x=null,D=0;D<i.length;D++){var L=i[D];if(!(L.from>=u||L.to<=s)){var H=L.level!=1,Z=Qt(e,r,H?Math.min(u,L.to)-1:Math.max(s,L.from)).right,ie=Z<o?o-Z+1e9:Z-o;(!h||x>ie)&&(h=L,x=ie)}}return h||(h=i[i.length-1]),h.from<s&&(h={from:s,to:h.to,level:h.level}),h.to>u&&(h={from:h.from,to:u,level:h.level}),h}var Sr;function jr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Sr==null){Sr=c("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Sr.appendChild(document.createTextNode("x")),Sr.appendChild(c("br"));Sr.appendChild(document.createTextNode("x"))}G(e.measure,Sr);var n=Sr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),F(e.measure),n||1}function Kr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=c("span","xxxxxxxxxx"),n=c("pre",[t],"CodeMirror-line-like");G(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Ii(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l){var a=e.display.gutterSpecs[l].className;n[a]=o.offsetLeft+o.clientLeft+i,r[a]=o.clientWidth}return{fixedPos:zi(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function zi(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function el(e){var t=jr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Kr(e.display)-3);return function(i){if(cr(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l<i.widgets.length;l++)i.widgets[l].height&&(o+=i.widgets[l].height);return n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function Bi(e){var t=e.doc,n=el(e);t.iter(function(r){var i=n(r);i!=r.height&&Et(r,i)})}function Lr(e,t,n,r){var i=e.display;if(!n&&ln(t).getAttribute("cm-not-content")=="true")return null;var o,l,a=i.lineSpace.getBoundingClientRect();try{o=t.clientX-a.left,l=t.clientY-a.top}catch{return null}var s=Oi(e,o,l),u;if(r&&s.xRel>0&&(u=ye(e.doc,s.line).text).length==s.ch){var h=Fe(u,u.length,e.options.tabSize)-u.length;s=B(s.line,Math.max(0,Math.round((o-_o(e.display).left)/Kr(e.display))-h))}return s}function Tr(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 St(e,t,n,r){t==null&&(t=e.doc.first),n==null&&(n=e.doc.first+e.doc.size),r||(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)$t&&Li(e.doc,t)<i.viewTo&&hr(e);else if(n<=i.viewFrom)$t&&No(e.doc,n+r)>i.viewFrom?hr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)hr(e);else if(t<=i.viewFrom){var o=Jn(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):hr(e)}else if(n>=i.viewTo){var l=Jn(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):hr(e)}else{var a=Jn(e,t,t,-1),s=Jn(e,n,n+r,1);a&&s?(i.view=i.view.slice(0,a.index).concat(Gn(e,a.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):hr(e)}var u=i.externalMeasured;u&&(n<u.lineN?u.lineN+=r:t<u.lineN+u.size&&(i.externalMeasured=null))}function dr(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 o=r.view[Tr(e,t)];if(o.node!=null){var l=o.changes||(o.changes=[]);ve(l,n)==-1&&l.push(n)}}}function hr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Jn(e,t,n,r){var i=Tr(e,t),o,l=e.display.view;if(!$t||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var a=e.display.viewFrom,s=0;s<i;s++)a+=l[s].size;if(a!=t){if(r>0){if(i==l.length-1)return null;o=a+l[i].size-t,i++}else o=a-t;t+=o,n+=o}for(;Li(e.doc,n)!=n;){if(i==(r<0?0:l.length-1))return null;n+=r*l[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function zs(e,t,n){var r=e.display,i=r.view;i.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=Gn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Gn(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Tr(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(Gn(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,Tr(e,n)))),r.viewTo=n}function tl(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 vn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function rl(e,t){t===void 0&&(t=!0);var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),l=e.options.$customCursor;l&&(t=!0);for(var a=0;a<n.sel.ranges.length;a++)if(!(!t&&a==n.sel.primIndex)){var s=n.sel.ranges[a];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var u=s.empty();if(l){var h=l(e,s);h&&Ri(e,h,i)}else(u||e.options.showCursorWhenSelecting)&&Ri(e,s.head,i);u||Bs(e,s,o)}}return r}function Ri(e,t,n){var r=jt(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(c("div"," ","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 o=Qn(e,t,"div",null,null),l=o.right-o.left;i.style.width=(l>0?l:e.defaultCharWidth())+"px"}if(r.other){var a=n.appendChild(c("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=r.other.left+"px",a.style.top=r.other.top+"px",a.style.height=(r.other.bottom-r.other.top)*.85+"px"}}function Zn(e,t){return e.top-t.top||e.left-t.left}function Bs(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),l=_o(e.display),a=l.left,s=Math.max(r.sizerWidth,wr(e)-r.sizer.offsetLeft)-l.right,u=i.direction=="ltr";function h(se,ge,Le,ke){ge<0&&(ge=0),ge=Math.round(ge),ke=Math.round(ke),o.appendChild(c("div",null,"CodeMirror-selected","position: absolute; left: "+se+`px;
|
|
6
|
+
top: `+ge+"px; width: "+(Le??s-se)+`px;
|
|
7
|
+
height: `+(ke-ge)+"px"))}function x(se,ge,Le){var ke=ye(i,se),Ee=ke.text.length,Ke,st;function Xe(tt,Ct){return Qn(e,B(se,tt),"div",ke,Ct)}function Nt(tt,Ct,ft){var nt=$o(e,ke,null,tt),rt=Ct=="ltr"==(ft=="after")?"left":"right",Ze=ft=="after"?nt.begin:nt.end-(/\s/.test(ke.text.charAt(nt.end-1))?2:1);return Xe(Ze,rt)[rt]}var Tt=Re(ke,i.direction);return or(Tt,ge||0,Le??Ee,function(tt,Ct,ft,nt){var rt=ft=="ltr",Ze=Xe(tt,rt?"left":"right"),Dt=Xe(Ct-1,rt?"right":"left"),nn=ge==null&&tt==0,yr=Le==null&&Ct==Ee,vt=nt==0,Jt=!Tt||nt==Tt.length-1;if(Dt.top-Ze.top<=3){var ut=(u?nn:yr)&&vt,co=(u?yr:nn)&&Jt,ir=ut?a:(rt?Ze:Dt).left,Ar=co?s:(rt?Dt:Ze).right;h(ir,Ze.top,Ar-ir,Ze.bottom)}else{var Nr,bt,on,ho;rt?(Nr=u&&nn&&vt?a:Ze.left,bt=u?s:Nt(tt,ft,"before"),on=u?a:Nt(Ct,ft,"after"),ho=u&&yr&&Jt?s:Dt.right):(Nr=u?Nt(tt,ft,"before"):a,bt=!u&&nn&&vt?s:Ze.right,on=!u&&yr&&Jt?a:Dt.left,ho=u?Nt(Ct,ft,"after"):s),h(Nr,Ze.top,bt-Nr,Ze.bottom),Ze.bottom<Dt.top&&h(a,Ze.bottom,null,Dt.top),h(on,Dt.top,ho-on,Dt.bottom)}(!Ke||Zn(Ze,Ke)<0)&&(Ke=Ze),Zn(Dt,Ke)<0&&(Ke=Dt),(!st||Zn(Ze,st)<0)&&(st=Ze),Zn(Dt,st)<0&&(st=Dt)}),{start:Ke,end:st}}var D=t.from(),L=t.to();if(D.line==L.line)x(D.line,D.ch,L.ch);else{var H=ye(i,D.line),Z=ye(i,L.line),ie=qt(H)==qt(Z),ae=x(D.line,D.ch,ie?H.text.length+1:null).end,he=x(L.line,ie?0:null,L.ch).start;ie&&(ae.top<he.top-2?(h(ae.right,ae.top,null,ae.bottom),h(a,he.top,he.left,he.bottom)):h(ae.right,ae.top,he.left-ae.right,ae.bottom)),ae.bottom<he.top&&h(a,ae.bottom,null,he.top)}n.appendChild(o)}function Wi(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()||Ur(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function nl(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||_i(e))}function Hi(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Ur(e))},100)}function _i(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(Ye(e,"focus",e,t),e.state.focused=!0,j(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),Y&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Wi(e))}function Ur(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Ye(e,"blur",e,t),e.state.focused=!1,$(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Vn(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,l=0;l<t.view.length;l++){var a=t.view[l],s=e.options.lineWrapping,u=void 0,h=0;if(!a.hidden){if(i+=a.line.height,k&&I<8){var x=a.node.offsetTop+a.node.offsetHeight;u=x-n,n=x}else{var D=a.node.getBoundingClientRect();u=D.bottom-D.top,!s&&a.text.firstChild&&(h=a.text.firstChild.getBoundingClientRect().right-D.left-1)}var L=a.line.height-u;if((L>.005||L<-.005)&&(i<r&&(o-=L),Et(a.line,u),il(a.line),a.rest))for(var H=0;H<a.rest.length;H++)il(a.rest[H]);if(h>e.display.sizerWidth){var Z=Math.ceil(h/Kr(e.display));Z>e.display.maxLineLength&&(e.display.maxLineLength=Z,e.display.maxLine=a.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function il(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 $n(e,t,n){var r=n&&n.top!=null?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Xn(e));var i=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,o=m(t,r),l=m(t,i);if(n&&n.ensure){var a=n.ensure.from.line,s=n.ensure.to.line;a<o?(o=a,l=m(t,er(ye(t,a))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=l&&(o=m(t,er(ye(t,s))-e.wrapper.clientHeight),l=s)}return{from:o,to:Math.max(l,o+1)}}function Rs(e,t){if(!Qe(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,o=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)&&(i=!1),i!=null&&!O){var l=c("div","",null,`position: absolute;
|
|
8
|
+
top: `+(t.top-n.viewOffset-Xn(e.display))+`px;
|
|
9
|
+
height: `+(t.bottom-t.top+Yt(e)+n.barHeight)+`px;
|
|
10
|
+
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(i),e.display.lineSpace.removeChild(l)}}}function Ws(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(n=t.sticky=="before"?B(t.line,t.ch+1,"before"):t,t=t.ch?B(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var l=!1,a=jt(e,t),s=!n||n==t?a:jt(e,n);i={left:Math.min(a.left,s.left),top:Math.min(a.top,s.top)-r,right:Math.max(a.left,s.left),bottom:Math.max(a.bottom,s.bottom)+r};var u=qi(e,i),h=e.doc.scrollTop,x=e.doc.scrollLeft;if(u.scrollTop!=null&&(xn(e,u.scrollTop),Math.abs(e.doc.scrollTop-h)>1&&(l=!0)),u.scrollLeft!=null&&(Cr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-x)>1&&(l=!0)),!l)break}return i}function Hs(e,t){var n=qi(e,t);n.scrollTop!=null&&xn(e,n.scrollTop),n.scrollLeft!=null&&Cr(e,n.scrollLeft)}function qi(e,t){var n=e.display,r=jr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,o=Fi(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+Mi(n),s=t.top<r,u=t.bottom>a-r;if(t.top<i)l.scrollTop=s?0:t.top;else if(t.bottom>i+o){var h=Math.min(t.top,(u?a:t.bottom)-o);h!=i&&(l.scrollTop=h)}var x=e.options.fixedGutter?0:n.gutters.offsetWidth,D=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-x,L=wr(e)-n.gutters.offsetWidth,H=t.right-t.left>L;return H&&(t.right=t.left+L),t.left<10?l.scrollLeft=0:t.left<D?l.scrollLeft=Math.max(0,t.left+x-(H?0:10)):t.right>L+D-3&&(l.scrollLeft=t.right+(H?0:10)-L),l}function ji(e,t){t!=null&&(ei(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Gr(e){ei(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function mn(e,t,n){(t!=null||n!=null)&&ei(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function _s(e,t){ei(e),e.curOp.scrollToPos=t}function ei(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=Zo(e,t.from),r=Zo(e,t.to);ol(e,n,r,t.margin)}}function ol(e,t,n,r){var i=qi(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});mn(e,i.scrollLeft,i.scrollTop)}function xn(e,t){Math.abs(e.doc.scrollTop-t)<2||(_||Ui(e,{top:t}),ll(e,t,!0),_&&Ui(e),kn(e,100))}function ll(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 Cr(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,cl(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function yn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Mi(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+Yt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Dr=function(e,t,n){this.cm=n;var r=this.vert=c("div",[c("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=c("div",[c("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),Se(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Se(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,k&&I<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Dr.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 o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"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}},Dr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Dr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Dr.prototype.zeroWidthHack=function(){var e=z&&!ue?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new Ce,this.disableVert=new Ce},Dr.prototype.enableZeroWidthBar=function(e,t,n){e.style.visibility="";function r(){var i=e.getBoundingClientRect(),o=n=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);o!=e?e.style.visibility="hidden":t.set(1e3,r)}t.set(1e3,r)},Dr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var bn=function(){};bn.prototype.update=function(){return{bottom:0,right:0}},bn.prototype.setScrollLeft=function(){},bn.prototype.setScrollTop=function(){},bn.prototype.clear=function(){};function Xr(e,t){t||(t=yn(e));var n=e.display.barWidth,r=e.display.barHeight;al(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Vn(e),al(e,yn(e)),n=e.display.barWidth,r=e.display.barHeight}function al(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 sl={native:Dr,null:bn};function ul(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&$(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new sl[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Se(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"?Cr(e,t):xn(e,t)},e),e.display.scrollbars.addClass&&j(e.display.wrapper,e.display.scrollbars.addClass)}var qs=0;function Mr(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:++qs,markArrays:null},ys(e.curOp)}function Fr(e){var t=e.curOp;t&&ks(t,function(n){for(var r=0;r<n.ops.length;r++)n.ops[r].cm.curOp=null;js(n)})}function js(e){for(var t=e.ops,n=0;n<t.length;n++)Ks(t[n]);for(var r=0;r<t.length;r++)Us(t[r]);for(var i=0;i<t.length;i++)Gs(t[i]);for(var o=0;o<t.length;o++)Xs(t[o]);for(var l=0;l<t.length;l++)Ys(t[l])}function Ks(e){var t=e.cm,n=t.display;Js(t),e.updateMaxLine&&Ci(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 ti(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Us(e){e.updatedDisplay=e.mustUpdate&&Ki(e.cm,e.update)}function Gs(e){var t=e.cm,n=t.display;e.updatedDisplay&&Vn(t),e.barMeasure=yn(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=jo(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+Yt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-wr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Xs(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Cr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==y(fe(t));e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Xr(t,e.barMeasure),e.updatedDisplay&&Xi(t,e.barMeasure),e.selectionChanged&&Wi(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&nl(e.cm)}function Ys(e){var t=e.cm,n=t.display,r=t.doc;if(e.updatedDisplay&&fl(t,e.update),n.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(n.wheelStartX=n.wheelStartY=null),e.scrollTop!=null&&ll(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Cr(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=Ws(t,Ae(r,e.scrollToPos.from),Ae(r,e.scrollToPos.to),e.scrollToPos.margin);Rs(t,i)}var o=e.maybeHiddenMarkers,l=e.maybeUnhiddenMarkers;if(o)for(var a=0;a<o.length;++a)o[a].lines.length||Ye(o[a],"hide");if(l)for(var s=0;s<l.length;++s)l[s].lines.length&&Ye(l[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Ye(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function At(e,t){if(e.curOp)return t();Mr(e);try{return t()}finally{Fr(e)}}function lt(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Mr(e);try{return t.apply(e,arguments)}finally{Fr(e)}}}function yt(e){return function(){if(this.curOp)return e.apply(this,arguments);Mr(this);try{return e.apply(this,arguments)}finally{Fr(this)}}}function at(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Mr(t);try{return e.apply(this,arguments)}finally{Fr(t)}}}function kn(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,xe(Qs,e))}function Qs(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=fn(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(r.line>=e.display.viewFrom){var l=o.styles,a=o.text.length>e.options.maxHighlightLength?Gt(t.mode,r.state):null,s=mo(e,o,r,!0);a&&(r.state=a),o.styles=s.styles;var u=o.styleClasses,h=s.classes;h?o.styleClasses=h:u&&(o.styleClasses=null);for(var x=!l||l.length!=o.styles.length||u!=h&&(!u||!h||u.bgClass!=h.bgClass||u.textClass!=h.textClass),D=0;!x&&D<l.length;++D)x=l[D]!=o.styles[D];x&&i.push(r.line),o.stateAfter=r.save(),r.nextLine()}else o.text.length<=e.options.maxHighlightLength&&bi(e,o.text,r),o.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return kn(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&At(e,function(){for(var o=0;o<i.length;o++)dr(e,i[o],"text")})}}var ti=function(e,t,n){var r=e.display;this.viewport=t,this.visible=$n(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=wr(e),this.force=n,this.dims=Ii(e),this.events=[]};ti.prototype.signal=function(e,t){Ft(e,t)&&this.events.push(arguments)},ti.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ye.apply(null,this.events[e])};function Js(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Yt(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Yt(e)+"px",t.scrollbarsClipped=!0)}function Zs(e){if(e.hasFocus())return null;var t=y(fe(e));if(!t||!g(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=le(e).getSelection();r.anchorNode&&r.extend&&g(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function Vs(e){if(!(!e||!e.activeElt||e.activeElt==y(Te(e.activeElt)))&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&g(document.body,e.anchorNode)&&g(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 Ki(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return hr(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&&tl(e)==0)return!1;dl(e)&&(hr(e),t.dims=Ii(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>l&&n.viewTo-l<20&&(l=Math.min(i,n.viewTo)),$t&&(o=Li(e.doc,o),l=No(e.doc,l));var a=o!=n.viewFrom||l!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;zs(e,o,l),n.viewOffset=er(ye(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=tl(e);if(!a&&s==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var u=Zs(e);return s>4&&(n.lineDiv.style.display="none"),$s(e,n.updateLineNumbers,t.dims),s>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Vs(u),F(n.cursorDiv),F(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,kn(e,400)),n.updateLineNumbers=null,!0}function fl(e,t){for(var n=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==wr(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+Mi(e.display)-Fi(e),n.top)}),t.visible=$n(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=$n(e.display,e.doc,n));if(!Ki(e,t))break;Vn(e);var i=yn(e);vn(e),Xr(e,i),Xi(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 Ui(e,t){var n=new ti(e,t);if(Ki(e,n)){Vn(e),fl(e,n);var r=yn(e);vn(e),Xr(e,r),Xi(e,r),n.finish()}}function $s(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,l=o.firstChild;function a(H){var Z=H.nextSibling;return Y&&z&&e.display.currentWheelTarget==H?H.style.display="none":H.parentNode.removeChild(H),Z}for(var s=r.view,u=r.viewFrom,h=0;h<s.length;h++){var x=s[h];if(!x.hidden)if(!x.node||x.node.parentNode!=o){var D=Cs(e,x,u,n);o.insertBefore(D,l)}else{for(;l!=x.node;)l=a(l);var L=i&&t!=null&&t<=u&&x.lineNumber;x.changes&&(ve(x.changes,"gutter")>-1&&(L=!1),zo(e,x,u,n)),L&&(F(x.lineNumber),x.lineNumber.appendChild(document.createTextNode(re(e.options,u)))),l=x.node.nextSibling}u+=x.size}for(;l;)l=a(l)}function Gi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",ot(e,"gutterChanged",e)}function Xi(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+Yt(e)+"px"}function cl(e){var t=e.display,n=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=zi(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",l=0;l<n.length;l++)if(!n[l].hidden){e.options.fixedGutter&&(n[l].gutter&&(n[l].gutter.style.left=o),n[l].gutterBackground&&(n[l].gutterBackground.style.left=o));var a=n[l].alignable;if(a)for(var s=0;s<a.length;s++)a[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function dl(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=re(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(c("div",[c("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,l=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-l)+1,r.lineNumWidth=r.lineNumInnerWidth+l,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",Gi(e.display),!0}return!1}function Yi(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var o=e[i],l=null;if(typeof o!="string"&&(l=o.style,o=o.className),o=="CodeMirror-linenumbers")if(t)r=!0;else continue;n.push({className:o,style:l})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function hl(e){var t=e.gutters,n=e.gutterSpecs;F(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],o=i.className,l=i.style,a=t.appendChild(c("div",null,"CodeMirror-gutter "+o));l&&(a.style.cssText=l),o=="CodeMirror-linenumbers"&&(e.lineGutter=a,a.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",Gi(e)}function wn(e){hl(e.display),St(e),cl(e)}function eu(e,t,n,r){var i=this;this.input=n,i.scrollbarFiller=c("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=c("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=T("div",null,"CodeMirror-code"),i.selectionDiv=c("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=c("div",null,"CodeMirror-cursors"),i.measure=c("div",null,"CodeMirror-measure"),i.lineMeasure=c("div",null,"CodeMirror-measure"),i.lineSpace=T("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=T("div",[i.lineSpace],"CodeMirror-lines");i.mover=c("div",[o],null,"position: relative"),i.sizer=c("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=c("div",null,null,"position: absolute; height: "+Oe+"px; width: 1px;"),i.gutters=c("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=c("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=c("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),S&&R>=105&&(i.wrapper.style.clipPath="inset(0px)"),i.wrapper.setAttribute("translate","no"),k&&I<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!Y&&!(_&&N)&&(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=Yi(r.gutters,r.lineNumbers),hl(i),n.init(i)}var ri=0,rr=null;k?rr=-.53:_?rr=15:S?rr=-.7:V&&(rr=-1/3);function pl(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==null&&(n=e.wheelDelta),{x:t,y:n}}function tu(e){var t=pl(e);return t.x*=rr,t.y*=rr,t}function gl(e,t){S&&R==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 n=pl(t),r=n.x,i=n.y,o=rr;t.deltaMode===0&&(r=t.deltaX,i=t.deltaY,o=1);var l=e.display,a=l.scroller,s=a.scrollWidth>a.clientWidth,u=a.scrollHeight>a.clientHeight;if(r&&s||i&&u){if(i&&z&&Y){e:for(var h=t.target,x=l.view;h!=a;h=h.parentNode)for(var D=0;D<x.length;D++)if(x[D].node==h){e.display.currentWheelTarget=h;break e}}if(r&&!_&&!A&&o!=null){i&&u&&xn(e,Math.max(0,a.scrollTop+i*o)),Cr(e,Math.max(0,a.scrollLeft+r*o)),(!i||i&&u)&&pt(t),l.wheelStartX=null;return}if(i&&o!=null){var L=i*o,H=e.doc.scrollTop,Z=H+l.wrapper.clientHeight;L<0?H=Math.max(0,H+L-50):Z=Math.min(e.doc.height,Z+L+50),Ui(e,{top:H,bottom:Z})}ri<20&&t.deltaMode!==0&&(l.wheelStartX==null?(l.wheelStartX=a.scrollLeft,l.wheelStartY=a.scrollTop,l.wheelDX=r,l.wheelDY=i,setTimeout(function(){if(l.wheelStartX!=null){var ie=a.scrollLeft-l.wheelStartX,ae=a.scrollTop-l.wheelStartY,he=ae&&l.wheelDY&&ae/l.wheelDY||ie&&l.wheelDX&&ie/l.wheelDX;l.wheelStartX=l.wheelStartY=null,he&&(rr=(rr*ri+he)/(ri+1),++ri)}},200)):(l.wheelDX+=r,l.wheelDY+=i))}}var Ot=function(e,t){this.ranges=e,this.primIndex=t};Ot.prototype.primary=function(){return this.ranges[this.primIndex]},Ot.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(!We(n.anchor,r.anchor)||!We(n.head,r.head))return!1}return!0},Ot.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new He(it(this.ranges[t].anchor),it(this.ranges[t].head));return new Ot(e,this.primIndex)},Ot.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Ot.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(ce(t,r.from())>=0&&ce(e,r.to())<=0)return n}return-1};var He=function(e,t){this.anchor=e,this.head=t};He.prototype.from=function(){return Wr(this.anchor,this.head)},He.prototype.to=function(){return wt(this.anchor,this.head)},He.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Kt(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(D,L){return ce(D.from(),L.from())}),n=ve(t,i);for(var o=1;o<t.length;o++){var l=t[o],a=t[o-1],s=ce(a.to(),l.from());if(r&&!l.empty()?s>0:s>=0){var u=Wr(a.from(),l.from()),h=wt(a.to(),l.to()),x=a.empty()?l.from()==l.head:a.from()==a.head;o<=n&&--n,t.splice(--o,2,new He(x?h:u,x?u:h))}}return new Ot(t,n)}function pr(e,t){return new Ot([new He(e,t||e)],0)}function gr(e){return e.text?B(e.from.line+e.text.length-1,we(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function vl(e,t){if(ce(e,t.from)<0)return e;if(ce(e,t.to)<=0)return gr(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+=gr(t).ch-t.to.ch),B(n,r)}function Qi(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new He(vl(i.anchor,t),vl(i.head,t)))}return Kt(e.cm,n,e.sel.primIndex)}function ml(e,t,n){return e.line==t.line?B(n.line,e.ch-t.ch+n.ch):B(n.line+(e.line-t.line),e.ch)}function ru(e,t,n){for(var r=[],i=B(e.first,0),o=i,l=0;l<t.length;l++){var a=t[l],s=ml(a.from,i,o),u=ml(gr(a),i,o);if(i=a.to,o=u,n=="around"){var h=e.sel.ranges[l],x=ce(h.head,h.anchor)<0;r[l]=new He(x?u:s,x?s:u)}else r[l]=new He(s,s)}return new Ot(r,e.sel.primIndex)}function Ji(e){e.doc.mode=zr(e.options,e.doc.modeOption),Sn(e)}function Sn(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,kn(e,100),e.state.modeGen++,e.curOp&&St(e)}function xl(e,t){return t.from.ch==0&&t.to.ch==0&&we(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Zi(e,t,n,r){function i(he){return n?n[he]:null}function o(he,se,ge){fs(he,se,ge,r),ot(he,"change",he,t)}function l(he,se){for(var ge=[],Le=he;Le<se;++Le)ge.push(new Hr(u[Le],i(Le),r));return ge}var a=t.from,s=t.to,u=t.text,h=ye(e,a.line),x=ye(e,s.line),D=we(u),L=i(u.length-1),H=s.line-a.line;if(t.full)e.insert(0,l(0,u.length)),e.remove(u.length,e.size-u.length);else if(xl(e,t)){var Z=l(0,u.length-1);o(x,x.text,L),H&&e.remove(a.line,H),Z.length&&e.insert(a.line,Z)}else if(h==x)if(u.length==1)o(h,h.text.slice(0,a.ch)+D+h.text.slice(s.ch),L);else{var ie=l(1,u.length-1);ie.push(new Hr(D+h.text.slice(s.ch),L,r)),o(h,h.text.slice(0,a.ch)+u[0],i(0)),e.insert(a.line+1,ie)}else if(u.length==1)o(h,h.text.slice(0,a.ch)+u[0]+x.text.slice(s.ch),i(0)),e.remove(a.line+1,H);else{o(h,h.text.slice(0,a.ch)+u[0],i(0)),o(x,D+x.text.slice(s.ch),L);var ae=l(1,u.length-1);H>1&&e.remove(a.line+1,H-1),e.insert(a.line+1,ae)}ot(e,"change",e,t)}function vr(e,t,n){function r(i,o,l){if(i.linked)for(var a=0;a<i.linked.length;++a){var s=i.linked[a];if(s.doc!=o){var u=l&&s.sharedHist;n&&!u||(t(s.doc,u),r(s.doc,i,u))}}}r(e,null,!0)}function yl(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Bi(e),Ji(e),bl(e),e.options.direction=t.direction,e.options.lineWrapping||Ci(e),e.options.mode=t.modeOption,St(e)}function bl(e){(e.doc.direction=="rtl"?j:$)(e.display.lineDiv,"CodeMirror-rtl")}function nu(e){At(e,function(){bl(e),St(e)})}function ni(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 Vi(e,t){var n={from:it(t.from),to:gr(t),text:Vt(e,t.from,t.to)};return Sl(e,n,t.from.line,t.to.line+1),vr(e,function(r){return Sl(r,n,t.from.line,t.to.line+1)},!0),n}function kl(e){for(;e.length;){var t=we(e);if(t.ranges)e.pop();else break}}function iu(e,t){if(t)return kl(e.done),we(e.done);if(e.done.length&&!we(e.done).ranges)return we(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),we(e.done)}function wl(e,t,n,r){var i=e.history;i.undone.length=0;var o=+new Date,l,a;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>o-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(l=iu(i,i.lastOp==r)))a=we(l.changes),ce(t.from,t.to)==0&&ce(t.from,a.to)==0?a.to=gr(t):l.changes.push(Vi(e,t));else{var s=we(i.done);for((!s||!s.ranges)&&ii(e.sel,i.done),l={changes:[Vi(e,t)],generation:i.generation},i.done.push(l);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=o,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||Ye(e,"historyAdded")}function ou(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 lu(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||ou(e,o,we(i.done),t))?i.done[i.done.length-1]=t:ii(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&r.clearRedo!==!1&&kl(i.undone)}function ii(e,t){var n=we(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Sl(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(l){l.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=l.markedSpans),++o})}function au(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function su(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(au(n[i]));return r}function Ll(e,t){var n=su(e,t),r=wi(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],l=r[i];if(o&&l)e:for(var a=0;a<l.length;++a){for(var s=l[a],u=0;u<o.length;++u)if(o[u].marker==s.marker)continue e;o.push(s)}else l&&(n[i]=l)}return n}function Yr(e,t,n){for(var r=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges){r.push(n?Ot.prototype.deepCopy.call(o):o);continue}var l=o.changes,a=[];r.push({changes:a});for(var s=0;s<l.length;++s){var u=l[s],h=void 0;if(a.push({from:u.from,to:u.to,text:u.text}),t)for(var x in u)(h=x.match(/^spans_(\d+)$/))&&ve(t,Number(h[1]))>-1&&(we(a)[x]=u[x],delete u[x])}}return r}function $i(e,t,n,r){if(r){var i=e.anchor;if(n){var o=ce(t,i)<0;o!=ce(n,i)<0?(i=t,t=n):o!=ce(t,n)<0&&(t=n)}return new He(i,t)}else return new He(n||t,t)}function oi(e,t,n,r,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),gt(e,new Ot([$i(e.sel.primary(),t,n,i)],0),r)}function Tl(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)r[o]=$i(e.sel.ranges[o],t[o],null,i);var l=Kt(e.cm,r,e.sel.primIndex);gt(e,l,n)}function eo(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,gt(e,Kt(e.cm,i,e.sel.primIndex),r)}function Cl(e,t,n,r){gt(e,pr(t,n),r)}function uu(e,t,n){var r={ranges:t.ranges,update:function(i){this.ranges=[];for(var o=0;o<i.length;o++)this.ranges[o]=new He(Ae(e,i[o].anchor),Ae(e,i[o].head))},origin:n&&n.origin};return Ye(e,"beforeSelectionChange",e,r),e.cm&&Ye(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?Kt(e.cm,r.ranges,r.ranges.length-1):t}function Dl(e,t,n){var r=e.history.done,i=we(r);i&&i.ranges?(r[r.length-1]=t,li(e,t,n)):gt(e,t,n)}function gt(e,t,n){li(e,t,n),lu(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function li(e,t,n){(Ft(e,"beforeSelectionChange")||e.cm&&Ft(e.cm,"beforeSelectionChange"))&&(t=uu(e,t,n));var r=n&&n.bias||(ce(t.primary().head,e.sel.primary().head)<0?-1:1);Ml(e,Al(e,t,r,!0)),!(n&&n.scroll===!1)&&e.cm&&e.cm.getOption("readOnly")!="nocursor"&&Gr(e.cm)}function Ml(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,It(e.cm)),ot(e,"cursorActivity",e))}function Fl(e){Ml(e,Al(e,e.sel,null,!1))}function Al(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var l=t.ranges[o],a=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=ai(e,l.anchor,a&&a.anchor,n,r),u=l.head==l.anchor?s:ai(e,l.head,a&&a.head,n,r);(i||s!=l.anchor||u!=l.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new He(s,u))}return i?Kt(e.cm,i,t.primIndex):t}function Qr(e,t,n,r,i){var o=ye(e,t.line);if(o.markedSpans)for(var l=0;l<o.markedSpans.length;++l){var a=o.markedSpans[l],s=a.marker,u="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,h="selectRight"in s?!s.selectRight:s.inclusiveRight;if((a.from==null||(u?a.from<=t.ch:a.from<t.ch))&&(a.to==null||(h?a.to>=t.ch:a.to>t.ch))){if(i&&(Ye(s,"beforeCursorEnter"),s.explicitlyCleared))if(o.markedSpans){--l;continue}else break;if(!s.atomic)continue;if(n){var x=s.find(r<0?1:-1),D=void 0;if((r<0?h:u)&&(x=Nl(e,x,-r,x&&x.line==t.line?o:null)),x&&x.line==t.line&&(D=ce(x,n))&&(r<0?D<0:D>0))return Qr(e,x,t,r,i)}var L=s.find(r<0?-1:1);return(r<0?u:h)&&(L=Nl(e,L,r,L.line==t.line?o:null)),L?Qr(e,L,t,r,i):null}}return t}function ai(e,t,n,r,i){var o=r||1,l=Qr(e,t,n,o,i)||!i&&Qr(e,t,n,o,!0)||Qr(e,t,n,-o,i)||!i&&Qr(e,t,n,-o,!0);return l||(e.cantEdit=!0,B(e.first,0))}function Nl(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?Ae(e,B(t.line-1)):null:n>0&&t.ch==(r||ye(e,t.line)).text.length?t.line<e.first+e.size-1?B(t.line+1,0):null:new B(t.line,t.ch+n)}function El(e){e.setSelection(B(e.firstLine(),0),B(e.lastLine()),Ve)}function Ol(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(i,o,l,a){i&&(r.from=Ae(e,i)),o&&(r.to=Ae(e,o)),l&&(r.text=l),a!==void 0&&(r.origin=a)}),Ye(e,"beforeChange",e,r),e.cm&&Ye(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 Jr(e,t,n){if(e.cm){if(!e.cm.curOp)return lt(e.cm,Jr)(e,t,n);if(e.cm.state.suppressEdits)return}if(!((Ft(e,"beforeChange")||e.cm&&Ft(e.cm,"beforeChange"))&&(t=Ol(e,t,!0),!t))){var r=Lo&&!n&&ls(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)Pl(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else Pl(e,t)}}function Pl(e,t){if(!(t.text.length==1&&t.text[0]==""&&ce(t.from,t.to)==0)){var n=Qi(e,t);wl(e,t,n,e.cm?e.cm.curOp.id:NaN),Ln(e,t,n,wi(e,t));var r=[];vr(e,function(i,o){!o&&ve(r,i.history)==-1&&(Rl(i.history,t),r.push(i.history)),Ln(i,t,null,wi(i,t))})}}function si(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!(r&&!n)){for(var i=e.history,o,l=e.sel,a=t=="undo"?i.done:i.undone,s=t=="undo"?i.undone:i.done,u=0;u<a.length&&(o=a[u],!(n?o.ranges&&!o.equals(e.sel):!o.ranges));u++);if(u!=a.length){for(i.lastOrigin=i.lastSelOrigin=null;;)if(o=a.pop(),o.ranges){if(ii(o,s),n&&!o.equals(e.sel)){gt(e,o,{clearRedo:!1});return}l=o}else if(r){a.push(o);return}else break;var h=[];ii(l,s),s.push({changes:h,generation:i.generation}),i.generation=o.generation||++i.maxGeneration;for(var x=Ft(e,"beforeChange")||e.cm&&Ft(e.cm,"beforeChange"),D=function(Z){var ie=o.changes[Z];if(ie.origin=t,x&&!Ol(e,ie,!1))return a.length=0,{};h.push(Vi(e,ie));var ae=Z?Qi(e,ie):we(a);Ln(e,ie,ae,Ll(e,ie)),!Z&&e.cm&&e.cm.scrollIntoView({from:ie.from,to:gr(ie)});var he=[];vr(e,function(se,ge){!ge&&ve(he,se.history)==-1&&(Rl(se.history,ie),he.push(se.history)),Ln(se,ie,null,Ll(se,ie))})},L=o.changes.length-1;L>=0;--L){var H=D(L);if(H)return H.v}}}}function Il(e,t){if(t!=0&&(e.first+=t,e.sel=new Ot(Ie(e.sel.ranges,function(i){return new He(B(i.anchor.line+t,i.anchor.ch),B(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){St(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)dr(e.cm,r,"gutter")}}function Ln(e,t,n,r){if(e.cm&&!e.cm.curOp)return lt(e.cm,Ln)(e,t,n,r);if(t.to.line<e.first){Il(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);Il(e,i),t={from:B(e.first,0),to:B(t.to.line+i,t.to.ch),text:[we(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:B(o,ye(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Vt(e,t.from,t.to),n||(n=Qi(e,t)),e.cm?fu(e.cm,t,r):Zi(e,t,r),li(e,n,Ve),e.cantEdit&&ai(e,B(e.firstLine(),0))&&(e.cantEdit=!1)}}function fu(e,t,n){var r=e.doc,i=e.display,o=t.from,l=t.to,a=!1,s=o.line;e.options.lineWrapping||(s=f(qt(ye(r,o.line))),r.iter(s,l.line+1,function(L){if(L==i.maxLine)return a=!0,!0})),r.sel.contains(t.from,t.to)>-1&&It(e),Zi(r,t,n,el(e)),e.options.lineWrapping||(r.iter(s,o.line+t.text.length,function(L){var H=Un(L);H>i.maxLineLength&&(i.maxLine=L,i.maxLineLength=H,i.maxLineChanged=!0,a=!1)}),a&&(e.curOp.updateMaxLine=!0)),$a(r,o.line),kn(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?St(e):o.line==l.line&&t.text.length==1&&!xl(e.doc,t)?dr(e,o.line,"text"):St(e,o.line,l.line+1,u);var h=Ft(e,"changes"),x=Ft(e,"change");if(x||h){var D={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};x&&ot(e,"change",e,D),h&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(D)}e.display.selForContextMenu=null}function Zr(e,t,n,r,i){var o;r||(r=n),ce(r,n)<0&&(o=[r,n],n=o[0],r=o[1]),typeof t=="string"&&(t=e.splitLines(t)),Jr(e,{from:n,to:r,text:t,origin:i})}function zl(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function Bl(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],l=!0;if(o.ranges){o.copied||(o=e[i]=o.deepCopy(),o.copied=!0);for(var a=0;a<o.ranges.length;a++)zl(o.ranges[a].anchor,t,n,r),zl(o.ranges[a].head,t,n,r);continue}for(var s=0;s<o.changes.length;++s){var u=o.changes[s];if(n<u.from.line)u.from=B(u.from.line+r,u.from.ch),u.to=B(u.to.line+r,u.to.ch);else if(t<=u.to.line){l=!1;break}}l||(e.splice(0,i+1),i=0)}}function Rl(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;Bl(e.done,n,r,i),Bl(e.undone,n,r,i)}function Tn(e,t,n,r){var i=t,o=t;return typeof t=="number"?o=ye(e,go(e,t)):i=f(t),i==null?null:(r(o,i)&&e.cm&&dr(e.cm,i,n),o)}function Cn(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}Cn.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,cs(i),ot(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 Dn(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}Dn.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 o=Math.min(t,i-e),l=r.height;if(r.removeInner(e,o),this.height-=l-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),(t-=o)==0)break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Cn))){var a=[];this.collapse(a),this.children=[new Cn(a)],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],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var l=i.lines.length%25+25,a=l;a<i.lines.length;){var s=new Cn(i.lines.slice(a,a+=25));i.height-=s.height,this.children.splice(++r,0,s),s.parent=this}i.lines=i.lines.slice(0,l),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new Dn(t);if(e.parent){e.size-=n.size,e.height-=n.height;var i=ve(e.parent.children,e);e.parent.children.splice(i+1,0,n)}else{var r=new Dn(e.children);r.parent=e,e.children=[r,n],e=r}n.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],o=i.chunkSize();if(e<o){var l=Math.min(t,o-e);if(i.iterN(e,l,n))return!0;if((t-=l)==0)break;e=0}else e-=o}}};var Mn=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};Mn.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=f(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 o=pn(this);Et(n,Math.max(0,n.height-o)),e&&(At(e,function(){Wl(e,n,-o),dr(e,r,"widget")}),ot(e,"lineWidgetCleared",e,this,r))}},Mn.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=pn(this)-t;i&&(cr(this.doc,r)||Et(r,r.height+i),n&&At(n,function(){n.curOp.forceUpdate=!0,Wl(n,r,i),ot(n,"lineWidgetChanged",n,e,f(r))}))},Bt(Mn);function Wl(e,t,n){er(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&ji(e,n)}function cu(e,t,n,r){var i=new Mn(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),Tn(e,t,"widget",function(l){var a=l.widgets||(l.widgets=[]);if(i.insertAt==null?a.push(i):a.splice(Math.min(a.length,Math.max(0,i.insertAt)),0,i),i.line=l,o&&!cr(e,l)){var s=er(l)<e.scrollTop;Et(l,l.height+pn(i)),s&&ji(o,i.height),o.curOp.forceUpdate=!0}return!0}),o&&ot(o,"lineWidgetAdded",o,i,typeof t=="number"?t:f(t)),i}var Hl=0,mr=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Hl};mr.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Mr(e),Ft(this,"clear")){var n=this.find();n&&ot(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var l=this.lines[o],a=cn(l.markedSpans,this);e&&!this.collapsed?dr(e,f(l),"text"):e&&(a.to!=null&&(i=f(l)),a.from!=null&&(r=f(l))),l.markedSpans=rs(l.markedSpans,a),a.from==null&&this.collapsed&&!cr(this.doc,l)&&e&&Et(l,jr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var u=qt(this.lines[s]),h=Un(u);h>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=h,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&St(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Fl(e.doc)),e&&ot(e,"markerCleared",e,this,r,i),t&&Fr(e),this.parent&&this.parent.clear()}},mr.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var n,r,i=0;i<this.lines.length;++i){var o=this.lines[i],l=cn(o.markedSpans,this);if(l.from!=null&&(n=B(t?o:f(o),l.from),e==-1))return n;if(l.to!=null&&(r=B(t?o:f(o),l.to),e==1))return r}return n&&{from:n,to:r}},mr.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;!t||!r||At(r,function(){var i=t.line,o=f(t.line),l=Ai(r,o);if(l&&(Go(l),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!cr(n.doc,i)&&n.height!=null){var a=n.height;n.height=null;var s=pn(n)-a;s&&Et(i,i.height+s)}ot(r,"markerChanged",r,e)})},mr.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||ve(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},mr.prototype.detachLine=function(e){if(this.lines.splice(ve(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Bt(mr);function Vr(e,t,n,r,i){if(r&&r.shared)return du(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return lt(e.cm,Vr)(e,t,n,r,i);var o=new mr(e,i),l=ce(t,n);if(r&&Me(r,o,!1),l>0||l==0&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=T("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Ao(e,t.line,t,n,o)||t.line!=n.line&&Ao(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");ts()}o.addToHistory&&wl(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var a=t.line,s=e.cm,u;if(e.iter(a,n.line+1,function(x){s&&o.collapsed&&!s.options.lineWrapping&&qt(x)==s.display.maxLine&&(u=!0),o.collapsed&&a!=t.line&&Et(x,0),ns(x,new _n(o,a==t.line?t.ch:null,a==n.line?n.ch:null),e.cm&&e.cm.curOp),++a}),o.collapsed&&e.iter(t.line,n.line+1,function(x){cr(e,x)&&Et(x,0)}),o.clearOnEnter&&Se(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(es(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++Hl,o.atomic=!0),s){if(u&&(s.curOp.updateMaxLine=!0),o.collapsed)St(s,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var h=t.line;h<=n.line;h++)dr(s,h,"text");o.atomic&&Fl(s.doc),ot(s,"markerAdded",s,o)}return o}var Fn=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};Fn.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();ot(this,"clear")}},Fn.prototype.find=function(e,t){return this.primary.find(e,t)},Bt(Fn);function du(e,t,n,r,i){r=Me(r),r.shared=!1;var o=[Vr(e,t,n,r,i)],l=o[0],a=r.widgetNode;return vr(e,function(s){a&&(r.widgetNode=a.cloneNode(!0)),o.push(Vr(s,Ae(s,t),Ae(s,n),r,i));for(var u=0;u<s.linked.length;++u)if(s.linked[u].isParent)return;l=we(o)}),new Fn(o,l)}function _l(e){return e.findMarks(B(e.first,0),e.clipPos(B(e.lastLine())),function(t){return t.parent})}function hu(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),l=e.clipPos(i.to);if(ce(o,l)){var a=Vr(e,o,l,r.primary,r.primary.type);r.markers.push(a),a.parent=r}}}function pu(e){for(var t=function(r){var i=e[r],o=[i.primary.doc];vr(i.primary.doc,function(s){return o.push(s)});for(var l=0;l<i.markers.length;l++){var a=i.markers[l];ve(o,a.doc)==-1&&(a.parent=null,i.markers.splice(l--,1))}},n=0;n<e.length;n++)t(n)}var gu=0,Lt=function(e,t,n,r,i){if(!(this instanceof Lt))return new Lt(e,t,n,r,i);n==null&&(n=0),Dn.call(this,[new Cn([new Hr("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=B(n,0);this.sel=pr(o),this.history=new ni(null),this.id=++gu,this.modeOption=t,this.lineSep=r,this.direction=i=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Zi(this,{from:o,to:o,text:e}),gt(this,pr(o),Ve)};Lt.prototype=K(Dn.prototype,{constructor:Lt,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=un(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:at(function(e){var t=B(this.first,0),n=this.first+this.size-1;Jr(this,{from:t,to:B(n,ye(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&mn(this.cm,0,0),gt(this,pr(t),Ve)}),replaceRange:function(e,t,n,r){t=Ae(this,t),n=n?Ae(this,n):t,Zr(this,e,t,n,r)},getRange:function(e,t,n){var r=Vt(this,Ae(this,e),Ae(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(U(this,e))return ye(this,e)},getLineNumber:function(e){return f(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=ye(this,e)),qt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Ae(this,e)},getCursor:function(e){var t=this.sel.primary(),n;return e==null||e=="head"?n=t.head:e=="anchor"?n=t.anchor:e=="end"||e=="to"||e===!1?n=t.to():n=t.from(),n},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:at(function(e,t,n){Cl(this,Ae(this,typeof e=="number"?B(e,t||0):e),null,n)}),setSelection:at(function(e,t,n){Cl(this,Ae(this,e),Ae(this,t||e),n)}),extendSelection:at(function(e,t,n){oi(this,Ae(this,e),t&&Ae(this,t),n)}),extendSelections:at(function(e,t){Tl(this,vo(this,e),t)}),extendSelectionsBy:at(function(e,t){var n=Ie(this.sel.ranges,e);Tl(this,vo(this,n),t)}),setSelections:at(function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new He(Ae(this,e[i].anchor),Ae(this,e[i].head||e[i].anchor));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),gt(this,Kt(this.cm,r,t),n)}}),addSelection:at(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new He(Ae(this,e),Ae(this,t||e))),gt(this,Kt(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=Vt(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=Vt(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:at(function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var l=i.ranges[o];r[o]={from:l.from(),to:l.to(),text:this.splitLines(e[o]),origin:n}}for(var a=t&&t!="end"&&ru(this,r,t),s=r.length-1;s>=0;s--)Jr(this,r[s]);a?Dl(this,a):this.cm&&Gr(this.cm)}),undo:at(function(){si(this,"undo")}),redo:at(function(){si(this,"redo")}),undoSelection:at(function(){si(this,"undo",!0)}),redoSelection:at(function(){si(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 ni(this.history),vr(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:Yr(this.history.done),undone:Yr(this.history.undone)}},setHistory:function(e){var t=this.history=new ni(this.history);t.done=Yr(e.done.slice(0),null,!0),t.undone=Yr(e.undone.slice(0),null,!0)},setGutterMarker:at(function(e,t,n){return Tn(this,e,"gutter",function(r){var i=r.gutterMarkers||(r.gutterMarkers={});return i[t]=n,!n&&be(i)&&(r.gutterMarkers=null),!0})}),clearGutter:at(function(e){var t=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&Tn(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(!U(this,e)||(t=e,e=ye(this,e),!e))return null}else if(t=f(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:at(function(e,t,n){return Tn(this,e,t=="gutter"?"gutter":"class",function(r){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!r[i])r[i]=n;else{if(P(n).test(r[i]))return!1;r[i]+=" "+n}return!0})}),removeLineClass:at(function(e,t,n){return Tn(this,e,t=="gutter"?"gutter":"class",function(r){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",o=r[i];if(o)if(n==null)r[i]=null;else{var l=o.match(P(n));if(!l)return!1;var a=l.index+l[0].length;r[i]=o.slice(0,l.index)+(!l.index||a==o.length?"":" ")+o.slice(a)||null}else return!1;return!0})}),addLineWidget:at(function(e,t,n){return cu(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return Vr(this,Ae(this,e),Ae(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=Ae(this,e),Vr(this,e,e,n,"bookmark")},findMarksAt:function(e){e=Ae(this,e);var t=[],n=ye(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=Ae(this,e),t=Ae(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var a=0;a<l.length;a++){var s=l[a];!(s.to!=null&&i==e.line&&e.ch>=s.to||s.from==null&&i!=e.line||s.from!=null&&i==t.line&&s.from>=t.ch)&&(!n||n(s.marker))&&r.push(s.marker.parent||s.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 o=i.text.length+r;if(o>e)return t=e,!0;e-=o,++n}),Ae(this,B(n,t))},indexFromPos:function(e){e=Ae(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(r){t+=r.text.length+n}),t},copy:function(e){var t=new Lt(un(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||(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 Lt(un(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],hu(r,_l(this)),r},unlinkDoc:function(e){if(e instanceof Ge&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var n=this.linked[t];if(n.doc==e){this.linked.splice(t,1),e.unlinkDoc(this),pu(_l(this));break}}if(e.history==this.history){var r=[e.id];vr(e,function(i){return r.push(i.id)},!0),e.history=new ni(null),e.history.done=Yr(this.history.done,r),e.history.undone=Yr(this.history.undone,r)}},iterLinkedDocs:function(e){vr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):zt(e)},lineSeparator:function(){return this.lineSep||`
|
|
11
|
+
`},setDirection:at(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&nu(this.cm))})}),Lt.prototype.eachLine=Lt.prototype.iter;var ql=0;function vu(e){var t=this;if(jl(t),!(Qe(t,e)||tr(t.display,e))){pt(e),k&&(ql=+new Date);var n=Lr(t,e,!0),r=e.dataTransfer.files;if(!(!n||t.isReadOnly()))if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),l=0,a=function(){++l==i&<(t,function(){n=Ae(t.doc,n);var L={from:n,to:n,text:t.doc.splitLines(o.filter(function(H){return H!=null}).join(t.doc.lineSeparator())),origin:"paste"};Jr(t.doc,L),Dl(t.doc,pr(Ae(t.doc,n),Ae(t.doc,gr(L))))})()},s=function(L,H){if(t.options.allowDropFileTypes&&ve(t.options.allowDropFileTypes,L.type)==-1){a();return}var Z=new FileReader;Z.onerror=function(){return a()},Z.onload=function(){var ie=Z.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ie)){a();return}o[H]=ie,a()},Z.readAsText(L)},u=0;u<r.length;u++)s(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 h=e.dataTransfer.getData("Text");if(h){var x;if(t.state.draggingText&&!t.state.draggingText.copy&&(x=t.listSelections()),li(t.doc,pr(n,n)),x)for(var D=0;D<x.length;++D)Zr(t.doc,"",x[D].anchor,x[D].head,"drag");t.replaceSelection(h,"around","paste"),t.display.input.focus()}}catch{}}}}function mu(e,t){if(k&&(!e.state.draggingText||+new Date-ql<100)){ar(t);return}if(!(Qe(e,t)||tr(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!V)){var n=c("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",A&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),A&&n.parentNode.removeChild(n)}}function xu(e,t){var n=Lr(e,t);if(n){var r=document.createDocumentFragment();Ri(e,n,r),e.display.dragCursor||(e.display.dragCursor=c("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),G(e.display.dragCursor,r)}}function jl(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Kl(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 o=0;o<n.length;o++)e(n[o])})}}var Ul=!1;function yu(){Ul||(bu(),Ul=!0)}function bu(){var e;Se(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Kl(ku)},100))}),Se(window,"blur",function(){return Kl(Ur)})}function ku(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var xr={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"},An=0;An<10;An++)xr[An+48]=xr[An+96]=String(An);for(var ui=65;ui<=90;ui++)xr[ui]=String.fromCharCode(ui);for(var Nn=1;Nn<=12;Nn++)xr[Nn+111]=xr[Nn+63235]="F"+Nn;var nr={};nr.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"},nr.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"},nr.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"},nr.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"]},nr.default=z?nr.macDefault:nr.pcDefault;function wu(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var n,r,i,o,l=0;l<t.length-1;l++){var a=t[l];if(/^(cmd|meta|m)$/i.test(a))o=!0;else if(/^a(lt)?$/i.test(a))n=!0;else if(/^(c|ctrl|control)$/i.test(a))r=!0;else if(/^s(hift)?$/i.test(a))i=!0;else throw new Error("Unrecognized modifier name: "+a)}return n&&(e="Alt-"+e),r&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Su(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=Ie(n.split(" "),wu),o=0;o<i.length;o++){var l=void 0,a=void 0;o==i.length-1?(a=i.join(" "),l=r):(a=i.slice(0,o+1).join(" "),l="...");var s=t[a];if(!s)t[a]=l;else if(s!=l)throw new Error("Inconsistent bindings for "+a)}delete e[n]}for(var u in t)e[u]=t[u];return e}function $r(e,t,n,r){t=fi(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 $r(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var l=$r(e,t.fallthrough[o],n,r);if(l)return l}}}function Gl(e){var t=typeof e=="string"?e:xr[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function Xl(e,t,n){var r=e;return t.altKey&&r!="Alt"&&(e="Alt-"+e),(W?t.metaKey:t.ctrlKey)&&r!="Ctrl"&&(e="Ctrl-"+e),(W?t.ctrlKey:t.metaKey)&&r!="Mod"&&(e="Cmd-"+e),!n&&t.shiftKey&&r!="Shift"&&(e="Shift-"+e),e}function Yl(e,t){if(A&&e.keyCode==34&&e.char)return!1;var n=xr[e.keyCode];return n==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(n=e.code),Xl(n,e,t))}function fi(e){return typeof e=="string"?nr[e]:e}function en(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&ce(o.from,we(r).to)<=0;){var l=r.pop();if(ce(l.from,o.from)<0){o.from=l.from;break}}r.push(o)}At(e,function(){for(var a=r.length-1;a>=0;a--)Zr(e.doc,"",r[a].from,r[a].to,"+delete");Gr(e)})}function to(e,t,n){var r=Mt(e.text,t+n,n);return r<0||r>e.text.length?null:r}function ro(e,t,n){var r=to(e,t.ch,n);return r==null?null:new B(t.line,r,n<0?"after":"before")}function no(e,t,n,r,i){if(e){t.doc.direction=="rtl"&&(i=-i);var o=Re(n,t.doc.direction);if(o){var l=i<0?we(o):o[0],a=i<0==(l.level==1),s=a?"after":"before",u;if(l.level>0||t.doc.direction=="rtl"){var h=qr(t,n);u=i<0?n.text.length-1:0;var x=Qt(t,h,u).top;u=Pt(function(D){return Qt(t,h,D).top==x},i<0==(l.level==1)?l.from:l.to-1,u),s=="before"&&(u=to(n,u,1))}else u=i<0?l.to:l.from;return new B(r,u,s)}}return new B(r,i<0?n.text.length:0,i<0?"before":"after")}function Lu(e,t,n,r){var i=Re(t,e.doc.direction);if(!i)return ro(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 o=lr(i,n.ch,n.sticky),l=i[o];if(e.doc.direction=="ltr"&&l.level%2==0&&(r>0?l.to>n.ch:l.from<n.ch))return ro(t,n,r);var a=function(ae,he){return to(t,ae instanceof B?ae.ch:ae,he)},s,u=function(ae){return e.options.lineWrapping?(s=s||qr(e,t),$o(e,t,s,ae)):{begin:0,end:t.text.length}},h=u(n.sticky=="before"?a(n,-1):n.ch);if(e.doc.direction=="rtl"||l.level==1){var x=l.level==1==r<0,D=a(n,x?1:-1);if(D!=null&&(x?D<=l.to&&D<=h.end:D>=l.from&&D>=h.begin)){var L=x?"before":"after";return new B(n.line,D,L)}}var H=function(ae,he,se){for(var ge=function(Ke,st){return st?new B(n.line,a(Ke,1),"before"):new B(n.line,Ke,"after")};ae>=0&&ae<i.length;ae+=he){var Le=i[ae],ke=he>0==(Le.level!=1),Ee=ke?se.begin:a(se.end,-1);if(Le.from<=Ee&&Ee<Le.to||(Ee=ke?Le.from:a(Le.to,-1),se.begin<=Ee&&Ee<se.end))return ge(Ee,ke)}},Z=H(o+r,r,h);if(Z)return Z;var ie=r>0?h.end:a(h.begin,-1);return ie!=null&&!(r>0&&ie==t.text.length)&&(Z=H(r>0?0:i.length-1,r,u(ie)),Z)?Z:null}var En={selectAll:El,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ve)},killLine:function(e){return en(e,function(t){if(t.empty()){var n=ye(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:B(t.head.line+1,0)}:{from:t.head,to:B(t.head.line,n)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return en(e,function(t){return{from:B(t.from().line,0),to:Ae(e.doc,B(t.to().line+1,0))}})},delLineLeft:function(e){return en(e,function(t){return{from:B(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return en(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return{from:r,to:t.from()}})},delWrappedLineRight:function(e){return en(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(B(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(B(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Ql(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Jl(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Tu(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")},Pe)},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")},Pe)},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/)?Jl(e,t.head):r},Pe)},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 o=n[i].from(),l=Fe(e.getLine(o.line),o.ch,r);t.push(et(r-l%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return At(e,function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,o=ye(e.doc,i.line).text;if(o){if(i.ch==o.length&&(i=new B(i.line,i.ch-1)),i.ch>0)i=new B(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),B(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=ye(e.doc,i.line-1).text;l&&(i=new B(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),B(i.line-1,l.length-1),i,"+transpose"))}}n.push(new He(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return At(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);Gr(e)})},openLine:function(e){return e.replaceSelection(`
|
|
12
|
+
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Ql(e,t){var n=ye(e.doc,t),r=qt(n);return r!=n&&(t=f(r)),no(!0,e,r,t,1)}function Tu(e,t){var n=ye(e.doc,t),r=ss(n);return r!=n&&(t=f(r)),no(!0,e,n,t,-1)}function Jl(e,t){var n=Ql(e,t.line),r=ye(e.doc,n.line),i=Re(r,e.doc.direction);if(!i||i[0].level==0){var o=Math.max(n.ch,r.text.search(/\S/)),l=t.line==n.line&&t.ch<=o&&t.ch;return B(n.line,l?0:o,n.sticky)}return n}function ci(e,t,n){if(typeof t=="string"&&(t=En[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)!=qe}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function Cu(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=$r(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&$r(t,e.options.extraKeys,n,e)||$r(t,e.options.keyMap,n,e)}var Du=new Ce;function On(e,t,n,r){var i=e.state.keySeq;if(i){if(Gl(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Du.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),Zl(e,i+" "+t,n,r))return!0}return Zl(e,t,n,r)}function Zl(e,t,n,r){var i=Cu(e,t,r);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&ot(e,"keyHandled",e,t,n),(i=="handled"||i=="multi")&&(pt(n),Wi(e)),!!i}function Vl(e,t){var n=Yl(t,!0);return n?t.shiftKey&&!e.state.keySeq?On(e,"Shift-"+n,t,function(r){return ci(e,r,!0)})||On(e,n,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return ci(e,r)}):On(e,n,t,function(r){return ci(e,r)}):!1}function Mu(e,t,n){return On(e,"'"+n+"'",t,function(r){return ci(e,r,!0)})}var io=null;function $l(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=y(fe(t)),!Qe(t,e))){k&&I<11&&e.keyCode==27&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=n==16||e.shiftKey;var r=Vl(t,e);A&&(io=r?n:null,!r&&n==88&&!Wn&&(z?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),_&&!z&&!r&&n==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),n==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Fu(t)}}function Fu(e){var t=e.display.lineDiv;j(t,"CodeMirror-crosshair");function n(r){(r.keyCode==18||!r.altKey)&&($(t,"CodeMirror-crosshair"),ht(document,"keyup",n),ht(document,"mouseover",n))}Se(document,"keyup",n),Se(document,"mouseover",n)}function ea(e){e.keyCode==16&&(this.doc.sel.shift=!1),Qe(this,e)}function ta(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(tr(t.display,e)||Qe(t,e)||e.ctrlKey&&!e.altKey||z&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(A&&n==io){io=null,pt(e);return}if(!(A&&(!e.which||e.which<10)&&Vl(t,e))){var i=String.fromCharCode(r??n);i!="\b"&&(Mu(t,e,i)||t.display.input.onKeyPress(e))}}}var Au=400,oo=function(e,t,n){this.time=e,this.pos=t,this.button=n};oo.prototype.compare=function(e,t,n){return this.time+Au>e&&ce(t,this.pos)==0&&n==this.button};var Pn,In;function Nu(e,t){var n=+new Date;return In&&In.compare(n,e,t)?(Pn=In=null,"triple"):Pn&&Pn.compare(n,e,t)?(In=new oo(n,e,t),Pn=null,"double"):(Pn=new oo(n,e,t),In=null,"single")}function ra(e){var t=this,n=t.display;if(!(Qe(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,tr(n,e)){Y||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!lo(t,e)){var r=Lr(t,e),i=Rt(e),o=r?Nu(r,i):"single";le(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&Eu(t,i,r,o,e))&&(i==1?r?Pu(t,r,o,e):ln(e)==n.scroller&&pt(e):i==2?(r&&oi(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(J?t.display.input.onContextMenu(e):Hi(t)))}}}function Eu(e,t,n,r,i){var o="Click";return r=="double"?o="Double"+o:r=="triple"&&(o="Triple"+o),o=(t==1?"Left":t==2?"Middle":"Right")+o,On(e,Xl(o,i),i,function(l){if(typeof l=="string"&&(l=En[l]),!l)return!1;var a=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),a=l(e,n)!=qe}finally{e.state.suppressEdits=!1}return a})}function Ou(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==null){var o=X?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),i.addNew==null&&(i.addNew=z?n.metaKey:n.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(z?n.altKey:n.ctrlKey)),i}function Pu(e,t,n,r){k?setTimeout(xe(nl,e),0):e.curOp.focus=y(fe(e));var i=Ou(e,n,r),o=e.doc.sel,l;e.options.dragDrop&&xi&&!e.isReadOnly()&&n=="single"&&(l=o.contains(t))>-1&&(ce((l=o.ranges[l]).from(),t)<0||t.xRel>0)&&(ce(l.to(),t)>0||t.xRel<0)?Iu(e,r,t,i):zu(e,r,t,i)}function Iu(e,t,n,r){var i=e.display,o=!1,l=lt(e,function(u){Y&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Hi(e)),ht(i.wrapper.ownerDocument,"mouseup",l),ht(i.wrapper.ownerDocument,"mousemove",a),ht(i.scroller,"dragstart",s),ht(i.scroller,"drop",l),o||(pt(u),r.addNew||oi(e.doc,n,null,null,r.extend),Y&&!V||k&&I==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),a=function(u){o=o||Math.abs(t.clientX-u.clientX)+Math.abs(t.clientY-u.clientY)>=10},s=function(){return o=!0};Y&&(i.scroller.draggable=!0),e.state.draggingText=l,l.copy=!r.moveOnDrag,Se(i.wrapper.ownerDocument,"mouseup",l),Se(i.wrapper.ownerDocument,"mousemove",a),Se(i.scroller,"dragstart",s),Se(i.scroller,"drop",l),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function na(e,t,n){if(n=="char")return new He(t,t);if(n=="word")return e.findWordAt(t);if(n=="line")return new He(B(t.line,0),Ae(e.doc,B(t.line+1,0)));var r=n(e,t);return new He(r.from,r.to)}function zu(e,t,n,r){k&&Hi(e);var i=e.display,o=e.doc;pt(t);var l,a,s=o.sel,u=s.ranges;if(r.addNew&&!r.extend?(a=o.sel.contains(n),a>-1?l=u[a]:l=new He(n,n)):(l=o.sel.primary(),a=o.sel.primIndex),r.unit=="rectangle")r.addNew||(l=new He(n,n)),n=Lr(e,t,!0,!0),a=-1;else{var h=na(e,n,r.unit);r.extend?l=$i(l,h.anchor,h.head,r.extend):l=h}r.addNew?a==-1?(a=u.length,gt(o,Kt(e,u.concat([l]),a),{scroll:!1,origin:"*mouse"})):u.length>1&&u[a].empty()&&r.unit=="char"&&!r.extend?(gt(o,Kt(e,u.slice(0,a).concat(u.slice(a+1)),0),{scroll:!1,origin:"*mouse"}),s=o.sel):eo(o,a,l,dt):(a=0,gt(o,new Ot([l],0),dt),s=o.sel);var x=n;function D(se){if(ce(x,se)!=0)if(x=se,r.unit=="rectangle"){for(var ge=[],Le=e.options.tabSize,ke=Fe(ye(o,n.line).text,n.ch,Le),Ee=Fe(ye(o,se.line).text,se.ch,Le),Ke=Math.min(ke,Ee),st=Math.max(ke,Ee),Xe=Math.min(n.line,se.line),Nt=Math.min(e.lastLine(),Math.max(n.line,se.line));Xe<=Nt;Xe++){var Tt=ye(o,Xe).text,tt=_e(Tt,Ke,Le);Ke==st?ge.push(new He(B(Xe,tt),B(Xe,tt))):Tt.length>tt&&ge.push(new He(B(Xe,tt),B(Xe,_e(Tt,st,Le))))}ge.length||ge.push(new He(n,n)),gt(o,Kt(e,s.ranges.slice(0,a).concat(ge),a),{origin:"*mouse",scroll:!1}),e.scrollIntoView(se)}else{var Ct=l,ft=na(e,se,r.unit),nt=Ct.anchor,rt;ce(ft.anchor,nt)>0?(rt=ft.head,nt=Wr(Ct.from(),ft.anchor)):(rt=ft.anchor,nt=wt(Ct.to(),ft.head));var Ze=s.ranges.slice(0);Ze[a]=Bu(e,new He(Ae(o,nt),rt)),gt(o,Kt(e,Ze,a),dt)}}var L=i.wrapper.getBoundingClientRect(),H=0;function Z(se){var ge=++H,Le=Lr(e,se,!0,r.unit=="rectangle");if(Le)if(ce(Le,x)!=0){e.curOp.focus=y(fe(e)),D(Le);var ke=$n(i,o);(Le.line>=ke.to||Le.line<ke.from)&&setTimeout(lt(e,function(){H==ge&&Z(se)}),150)}else{var Ee=se.clientY<L.top?-20:se.clientY>L.bottom?20:0;Ee&&setTimeout(lt(e,function(){H==ge&&(i.scroller.scrollTop+=Ee,Z(se))}),50)}}function ie(se){e.state.selectingText=!1,H=1/0,se&&(pt(se),i.input.focus()),ht(i.wrapper.ownerDocument,"mousemove",ae),ht(i.wrapper.ownerDocument,"mouseup",he),o.history.lastSelOrigin=null}var ae=lt(e,function(se){se.buttons===0||!Rt(se)?ie(se):Z(se)}),he=lt(e,ie);e.state.selectingText=he,Se(i.wrapper.ownerDocument,"mousemove",ae),Se(i.wrapper.ownerDocument,"mouseup",he)}function Bu(e,t){var n=t.anchor,r=t.head,i=ye(e.doc,n.line);if(ce(n,r)==0&&n.sticky==r.sticky)return t;var o=Re(i);if(!o)return t;var l=lr(o,n.ch,n.sticky),a=o[l];if(a.from!=n.ch&&a.to!=n.ch)return t;var s=l+(a.from==n.ch==(a.level!=1)?0:1);if(s==0||s==o.length)return t;var u;if(r.line!=n.line)u=(r.line-n.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var h=lr(o,r.ch,r.sticky),x=h-l||(r.ch-n.ch)*(a.level==1?-1:1);h==s-1||h==s?u=x<0:u=x>0}var D=o[s+(u?-1:0)],L=u==(D.level==1),H=L?D.from:D.to,Z=L?"after":"before";return n.ch==H&&n.sticky==Z?t:new He(new B(n.line,H,Z),r)}function ia(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch{return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&pt(t);var l=e.display,a=l.lineDiv.getBoundingClientRect();if(o>a.bottom||!Ft(e,n))return kt(t);o-=a.top-l.viewOffset;for(var s=0;s<e.display.gutterSpecs.length;++s){var u=l.gutters.childNodes[s];if(u&&u.getBoundingClientRect().right>=i){var h=m(e.doc,o),x=e.display.gutterSpecs[s];return Ye(e,n,e,h,x.className,t),kt(t)}}}function lo(e,t){return ia(e,t,"gutterClick",!0)}function oa(e,t){tr(e.display,t)||Ru(e,t)||Qe(e,t,"contextmenu")||J||e.display.input.onContextMenu(t)}function Ru(e,t){return Ft(e,"gutterContextMenu")?ia(e,t,"gutterContextMenu",!1):!1}function la(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),gn(e)}var tn={toString:function(){return"CodeMirror.Init"}},aa={},di={};function Wu(e){var t=e.optionHandlers;function n(r,i,o,l){e.defaults[r]=i,o&&(t[r]=l?function(a,s,u){u!=tn&&o(a,s,u)}:o)}e.defineOption=n,e.Init=tn,n("value","",function(r,i){return r.setValue(i)},!0),n("mode",null,function(r,i){r.doc.modeOption=i,Ji(r)},!0),n("indentUnit",2,Ji,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(r){Sn(r),gn(r),St(r)},!0),n("lineSeparator",null,function(r,i){if(r.doc.lineSep=i,!!i){var o=[],l=r.doc.first;r.doc.iter(function(s){for(var u=0;;){var h=s.text.indexOf(i,u);if(h==-1)break;u=h+i.length,o.push(B(l,h))}l++});for(var a=o.length-1;a>=0;a--)Zr(r.doc,i,o[a],B(o[a].line,o[a].ch+i.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(r,i,o){r.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),o!=tn&&r.refresh()}),n("specialCharPlaceholder",ps,function(r){return r.refresh()},!0),n("electricChars",!0),n("inputStyle",N?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(r,i){return r.getInputField().spellcheck=i},!0),n("autocorrect",!1,function(r,i){return r.getInputField().autocorrect=i},!0),n("autocapitalize",!1,function(r,i){return r.getInputField().autocapitalize=i},!0),n("rtlMoveVisually",!q),n("wholeLineUpdateBefore",!0),n("theme","default",function(r){la(r),wn(r)},!0),n("keyMap","default",function(r,i,o){var l=fi(i),a=o!=tn&&fi(o);a&&a.detach&&a.detach(r,l),l.attach&&l.attach(r,a||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,_u,!0),n("gutters",[],function(r,i){r.display.gutterSpecs=Yi(i,r.options.lineNumbers),wn(r)},!0),n("fixedGutter",!0,function(r,i){r.display.gutters.style.left=i?zi(r.display)+"px":"0",r.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(r){return Xr(r)},!0),n("scrollbarStyle","native",function(r){ul(r),Xr(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),n("lineNumbers",!1,function(r,i){r.display.gutterSpecs=Yi(r.options.gutters,i),wn(r)},!0),n("firstLineNumber",1,wn,!0),n("lineNumberFormatter",function(r){return r},wn,!0),n("showCursorWhenSelecting",!1,vn,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(r,i){i=="nocursor"&&(Ur(r),r.display.input.blur()),r.display.input.readOnlyChanged(i)}),n("screenReaderLabel",null,function(r,i){i=i===""?null:i,r.display.input.screenReaderLabelChanged(i)}),n("disableInput",!1,function(r,i){i||r.display.input.reset()},!0),n("dragDrop",!0,Hu),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,vn,!0),n("singleCursorHeightPerLine",!0,vn,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Sn,!0),n("addModeClass",!1,Sn,!0),n("pollInterval",100),n("undoDepth",200,function(r,i){return r.doc.history.undoDepth=i}),n("historyEventDelay",1250),n("viewportMargin",10,function(r){return r.refresh()},!0),n("maxHighlightLength",1e4,Sn,!0),n("moveInputWithCursor",!0,function(r,i){i||r.display.input.resetPosition()}),n("tabindex",null,function(r,i){return r.display.input.getField().tabIndex=i||""}),n("autofocus",null),n("direction","ltr",function(r,i){return r.doc.setDirection(i)},!0),n("phrases",null)}function Hu(e,t,n){var r=n&&n!=tn;if(!t!=!r){var i=e.display.dragFunctions,o=t?Se:ht;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function _u(e){e.options.lineWrapping?(j(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):($(e.display.wrapper,"CodeMirror-wrap"),Ci(e)),Bi(e),St(e),gn(e),setTimeout(function(){return Xr(e)},100)}function Ge(e,t){var n=this;if(!(this instanceof Ge))return new Ge(e,t);this.options=t=t?Me(t):{},Me(aa,t,!1);var r=t.value;typeof r=="string"?r=new Lt(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Ge.inputStyles[t.inputStyle](this),o=this.display=new eu(e,r,i,t);o.wrapper.CodeMirror=this,la(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ul(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 Ce,keySeq:null,specialChars:null},t.autofocus&&!N&&o.input.focus(),k&&I<11&&setTimeout(function(){return n.display.input.reset(!0)},20),qu(this),yu(),Mr(this),this.curOp.forceUpdate=!0,yl(this,r),t.autofocus&&!N||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&_i(n)},20):Ur(this);for(var l in di)di.hasOwnProperty(l)&&di[l](this,t[l],tn);dl(this),t.finishInit&&t.finishInit(this);for(var a=0;a<ao.length;++a)ao[a](this);Fr(this),Y&&t.lineWrapping&&getComputedStyle(o.lineDiv).textRendering=="optimizelegibility"&&(o.lineDiv.style.textRendering="auto")}Ge.defaults=aa,Ge.optionHandlers=di;function qu(e){var t=e.display;Se(t.scroller,"mousedown",lt(e,ra)),k&&I<11?Se(t.scroller,"dblclick",lt(e,function(s){if(!Qe(e,s)){var u=Lr(e,s);if(!(!u||lo(e,s)||tr(e.display,s))){pt(s);var h=e.findWordAt(u);oi(e.doc,h.anchor,h.head)}}})):Se(t.scroller,"dblclick",function(s){return Qe(e,s)||pt(s)}),Se(t.scroller,"contextmenu",function(s){return oa(e,s)}),Se(t.input.getField(),"contextmenu",function(s){t.scroller.contains(s.target)||oa(e,s)});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 o(s){if(s.touches.length!=1)return!1;var u=s.touches[0];return u.radiusX<=1&&u.radiusY<=1}function l(s,u){if(u.left==null)return!0;var h=u.left-s.left,x=u.top-s.top;return h*h+x*x>400}Se(t.scroller,"touchstart",function(s){if(!Qe(e,s)&&!o(s)&&!lo(e,s)){t.input.ensurePolled(),clearTimeout(n);var u=+new Date;t.activeTouch={start:u,moved:!1,prev:u-r.end<=300?r:null},s.touches.length==1&&(t.activeTouch.left=s.touches[0].pageX,t.activeTouch.top=s.touches[0].pageY)}}),Se(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Se(t.scroller,"touchend",function(s){var u=t.activeTouch;if(u&&!tr(t,s)&&u.left!=null&&!u.moved&&new Date-u.start<300){var h=e.coordsChar(t.activeTouch,"page"),x;!u.prev||l(u,u.prev)?x=new He(h,h):!u.prev.prev||l(u,u.prev.prev)?x=e.findWordAt(h):x=new He(B(h.line,0),Ae(e.doc,B(h.line+1,0))),e.setSelection(x.anchor,x.head),e.focus(),pt(s)}i()}),Se(t.scroller,"touchcancel",i),Se(t.scroller,"scroll",function(){t.scroller.clientHeight&&(xn(e,t.scroller.scrollTop),Cr(e,t.scroller.scrollLeft,!0),Ye(e,"scroll",e))}),Se(t.scroller,"mousewheel",function(s){return gl(e,s)}),Se(t.scroller,"DOMMouseScroll",function(s){return gl(e,s)}),Se(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(s){Qe(e,s)||ar(s)},over:function(s){Qe(e,s)||(xu(e,s),ar(s))},start:function(s){return mu(e,s)},drop:lt(e,vu),leave:function(s){Qe(e,s)||jl(e)}};var a=t.input.getField();Se(a,"keyup",function(s){return ea.call(e,s)}),Se(a,"keydown",lt(e,$l)),Se(a,"keypress",lt(e,ta)),Se(a,"focus",function(s){return _i(e,s)}),Se(a,"blur",function(s){return Ur(e,s)})}var ao=[];Ge.defineInitHook=function(e){return ao.push(e)};function zn(e,t,n,r){var i=e.doc,o;n==null&&(n="add"),n=="smart"&&(i.mode.indent?o=fn(e,t).state:n="prev");var l=e.options.tabSize,a=ye(i,t),s=Fe(a.text,null,l);a.stateAfter&&(a.stateAfter=null);var u=a.text.match(/^\s*/)[0],h;if(!r&&!/\S/.test(a.text))h=0,n="not";else if(n=="smart"&&(h=i.mode.indent(o,a.text.slice(u.length),a.text),h==qe||h>150)){if(!r)return;n="prev"}n=="prev"?t>i.first?h=Fe(ye(i,t-1).text,null,l):h=0:n=="add"?h=s+e.options.indentUnit:n=="subtract"?h=s-e.options.indentUnit:typeof n=="number"&&(h=s+n),h=Math.max(0,h);var x="",D=0;if(e.options.indentWithTabs)for(var L=Math.floor(h/l);L;--L)D+=l,x+=" ";if(D<h&&(x+=et(h-D)),x!=u)return Zr(i,x,B(t,0),B(t,u.length),"+input"),a.stateAfter=null,!0;for(var H=0;H<i.sel.ranges.length;H++){var Z=i.sel.ranges[H];if(Z.head.line==t&&Z.head.ch<u.length){var ie=B(t,u.length);eo(i,H,new He(ie,ie));break}}}var Ut=null;function hi(e){Ut=e}function so(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var l=+new Date-200,a=i=="paste"||e.state.pasteIncoming>l,s=zt(t),u=null;if(a&&r.ranges.length>1)if(Ut&&Ut.text.join(`
|
|
13
|
+
`)==t){if(r.ranges.length%Ut.text.length==0){u=[];for(var h=0;h<Ut.text.length;h++)u.push(o.splitLines(Ut.text[h]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(u=Ie(s,function(ae){return[ae]}));for(var x=e.curOp.updateInput,D=r.ranges.length-1;D>=0;D--){var L=r.ranges[D],H=L.from(),Z=L.to();L.empty()&&(n&&n>0?H=B(H.line,H.ch-n):e.state.overwrite&&!a?Z=B(Z.line,Math.min(ye(o,Z.line).text.length,Z.ch+we(s).length)):a&&Ut&&Ut.lineWise&&Ut.text.join(`
|
|
14
|
+
`)==s.join(`
|
|
15
|
+
`)&&(H=Z=B(H.line,0)));var ie={from:H,to:Z,text:u?u[D%u.length]:s,origin:i||(a?"paste":e.state.cutIncoming>l?"cut":"+input")};Jr(e.doc,ie),ot(e,"inputRead",e,ie)}t&&!a&&ua(e,t),Gr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=x),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function sa(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&At(t,function(){return so(t,n,0,null,"paste")}),!0}function ua(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 o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var a=0;a<o.electricChars.length;a++)if(t.indexOf(o.electricChars.charAt(a))>-1){l=zn(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(ye(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=zn(e,i.head.line,"smart"));l&&ot(e,"electricInput",e,i.head.line)}}}function fa(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:B(i,0),head:B(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function uo(e,t,n,r){e.setAttribute("autocorrect",n?"on":"off"),e.setAttribute("autocapitalize",r?"on":"off"),e.setAttribute("spellcheck",!!t)}function ca(){var e=c("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=c("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Y?e.style.width="1000px":e.setAttribute("wrap","off"),w&&(e.style.border="1px solid black"),t}function ju(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){le(this).focus(),this.display.input.focus()},setOption:function(r,i){var o=this.options,l=o[r];o[r]==i&&r!="mode"||(o[r]=i,t.hasOwnProperty(r)&<(this,t[r])(this,i,l),Ye(this,"optionChange",this,r))},getOption:function(r){return this.options[r]},getDoc:function(){return this.doc},addKeyMap:function(r,i){this.state.keyMaps[i?"push":"unshift"](fi(r))},removeKeyMap:function(r){for(var i=this.state.keyMaps,o=0;o<i.length;++o)if(i[o]==r||i[o].name==r)return i.splice(o,1),!0},addOverlay:yt(function(r,i){var o=r.token?r:e.getMode(this.options,r);if(o.startState)throw new Error("Overlays may not be stateful.");E(this.state.overlays,{mode:o,modeSpec:r,opaque:i&&i.opaque,priority:i&&i.priority||0},function(l){return l.priority}),this.state.modeGen++,St(this)}),removeOverlay:yt(function(r){for(var i=this.state.overlays,o=0;o<i.length;++o){var l=i[o].modeSpec;if(l==r||typeof r=="string"&&l.name==r){i.splice(o,1),this.state.modeGen++,St(this);return}}}),indentLine:yt(function(r,i,o){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),U(this.doc,r)&&zn(this,r,i,o)}),indentSelection:yt(function(r){for(var i=this.doc.sel.ranges,o=-1,l=0;l<i.length;l++){var a=i[l];if(a.empty())a.head.line>o&&(zn(this,a.head.line,r,!0),o=a.head.line,l==this.doc.sel.primIndex&&Gr(this));else{var s=a.from(),u=a.to(),h=Math.max(o,s.line);o=Math.min(this.lastLine(),u.line-(u.ch?0:1))+1;for(var x=h;x<o;++x)zn(this,x,r);var D=this.doc.sel.ranges;s.ch==0&&i.length==D.length&&D[l].from().ch>0&&eo(this.doc,l,new He(s,D[l].to()),Ve)}}}),getTokenAt:function(r,i){return ko(this,r,i)},getLineTokens:function(r,i){return ko(this,B(r),i,!0)},getTokenTypeAt:function(r){r=Ae(this.doc,r);var i=xo(this,ye(this.doc,r.line)),o=0,l=(i.length-1)/2,a=r.ch,s;if(a==0)s=i[2];else for(;;){var u=o+l>>1;if((u?i[u*2-1]:0)>=a)l=u;else if(i[u*2+1]<a)o=u+1;else{s=i[u*2+2];break}}var h=s?s.indexOf("overlay "):-1;return h<0?s:h==0?null:s.slice(0,h-1)},getModeAt:function(r){var i=this.doc.mode;return i.innerMode?e.innerMode(i,this.getTokenAt(r).state).mode:i},getHelper:function(r,i){return this.getHelpers(r,i)[0]},getHelpers:function(r,i){var o=[];if(!n.hasOwnProperty(i))return o;var l=n[i],a=this.getModeAt(r);if(typeof a[i]=="string")l[a[i]]&&o.push(l[a[i]]);else if(a[i])for(var s=0;s<a[i].length;s++){var u=l[a[i][s]];u&&o.push(u)}else a.helperType&&l[a.helperType]?o.push(l[a.helperType]):l[a.name]&&o.push(l[a.name]);for(var h=0;h<l._global.length;h++){var x=l._global[h];x.pred(a,this)&&ve(o,x.val)==-1&&o.push(x.val)}return o},getStateAfter:function(r,i){var o=this.doc;return r=go(o,r??o.first+o.size-1),fn(this,r+1,i).state},cursorCoords:function(r,i){var o,l=this.doc.sel.primary();return r==null?o=l.head:typeof r=="object"?o=Ae(this.doc,r):o=r?l.from():l.to(),jt(this,o,i||"page")},charCoords:function(r,i){return Qn(this,Ae(this.doc,r),i||"page")},coordsChar:function(r,i){return r=Jo(this,r,i||"page"),Oi(this,r.left,r.top)},lineAtHeight:function(r,i){return r=Jo(this,{top:r,left:0},i||"page").top,m(this.doc,r+this.display.viewOffset)},heightAtLine:function(r,i,o){var l=!1,a;if(typeof r=="number"){var s=this.doc.first+this.doc.size-1;r<this.doc.first?r=this.doc.first:r>s&&(r=s,l=!0),a=ye(this.doc,r)}else a=r;return Yn(this,a,{top:0,left:0},i||"page",o||l).top+(l?this.doc.height-er(a):0)},defaultTextHeight:function(){return jr(this.display)},defaultCharWidth:function(){return Kr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,i,o,l,a){var s=this.display;r=jt(this,Ae(this.doc,r));var u=r.bottom,h=r.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),s.sizer.appendChild(i),l=="over")u=r.top;else if(l=="above"||l=="near"){var x=Math.max(s.wrapper.clientHeight,this.doc.height),D=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(l=="above"||r.bottom+i.offsetHeight>x)&&r.top>i.offsetHeight?u=r.top-i.offsetHeight:r.bottom+i.offsetHeight<=x&&(u=r.bottom),h+i.offsetWidth>D&&(h=D-i.offsetWidth)}i.style.top=u+"px",i.style.left=i.style.right="",a=="right"?(h=s.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(a=="left"?h=0:a=="middle"&&(h=(s.sizer.clientWidth-i.offsetWidth)/2),i.style.left=h+"px"),o&&Hs(this,{left:h,top:u,right:h+i.offsetWidth,bottom:u+i.offsetHeight})},triggerOnKeyDown:yt($l),triggerOnKeyPress:yt(ta),triggerOnKeyUp:ea,triggerOnMouseDown:yt(ra),execCommand:function(r){if(En.hasOwnProperty(r))return En[r].call(null,this)},triggerElectric:yt(function(r){ua(this,r)}),findPosH:function(r,i,o,l){var a=1;i<0&&(a=-1,i=-i);for(var s=Ae(this.doc,r),u=0;u<i&&(s=fo(this.doc,s,a,o,l),!s.hitSide);++u);return s},moveH:yt(function(r,i){var o=this;this.extendSelectionsBy(function(l){return o.display.shift||o.doc.extend||l.empty()?fo(o.doc,l.head,r,i,o.options.rtlMoveVisually):r<0?l.from():l.to()},Pe)}),deleteH:yt(function(r,i){var o=this.doc.sel,l=this.doc;o.somethingSelected()?l.replaceSelection("",null,"+delete"):en(this,function(a){var s=fo(l,a.head,r,i,!1);return r<0?{from:s,to:a.head}:{from:a.head,to:s}})}),findPosV:function(r,i,o,l){var a=1,s=l;i<0&&(a=-1,i=-i);for(var u=Ae(this.doc,r),h=0;h<i;++h){var x=jt(this,u,"div");if(s==null?s=x.left:x.left=s,u=da(this,x,a,o),u.hitSide)break}return u},moveV:yt(function(r,i){var o=this,l=this.doc,a=[],s=!this.display.shift&&!l.extend&&l.sel.somethingSelected();if(l.extendSelectionsBy(function(h){if(s)return r<0?h.from():h.to();var x=jt(o,h.head,"div");h.goalColumn!=null&&(x.left=h.goalColumn),a.push(x.left);var D=da(o,x,r,i);return i=="page"&&h==l.sel.primary()&&ji(o,Qn(o,D,"div").top-x.top),D},Pe),a.length)for(var u=0;u<l.sel.ranges.length;u++)l.sel.ranges[u].goalColumn=a[u]}),findWordAt:function(r){var i=this.doc,o=ye(i,r.line).text,l=r.ch,a=r.ch;if(o){var s=this.getHelper(r,"wordChars");(r.sticky=="before"||a==o.length)&&l?--l:++a;for(var u=o.charAt(l),h=De(u,s)?function(x){return De(x,s)}:/\s/.test(u)?function(x){return/\s/.test(x)}:function(x){return!/\s/.test(x)&&!De(x)};l>0&&h(o.charAt(l-1));)--l;for(;a<o.length&&h(o.charAt(a));)++a}return new He(B(r.line,l),B(r.line,a))},toggleOverwrite:function(r){r!=null&&r==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?j(this.display.cursorDiv,"CodeMirror-overwrite"):$(this.display.cursorDiv,"CodeMirror-overwrite"),Ye(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==y(fe(this))},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:yt(function(r,i){mn(this,r,i)}),getScrollInfo:function(){var r=this.display.scroller;return{left:r.scrollLeft,top:r.scrollTop,height:r.scrollHeight-Yt(this)-this.display.barHeight,width:r.scrollWidth-Yt(this)-this.display.barWidth,clientHeight:Fi(this),clientWidth:wr(this)}},scrollIntoView:yt(function(r,i){r==null?(r={from:this.doc.sel.primary().head,to:null},i==null&&(i=this.options.cursorScrollMargin)):typeof r=="number"?r={from:B(r,0),to:null}:r.from==null&&(r={from:r,to:null}),r.to||(r.to=r.from),r.margin=i||0,r.from.line!=null?_s(this,r):ol(this,r.from,r.to,r.margin)}),setSize:yt(function(r,i){var o=this,l=function(s){return typeof s=="number"||/^\d+$/.test(String(s))?s+"px":s};r!=null&&(this.display.wrapper.style.width=l(r)),i!=null&&(this.display.wrapper.style.height=l(i)),this.options.lineWrapping&&Xo(this);var a=this.display.viewFrom;this.doc.iter(a,this.display.viewTo,function(s){if(s.widgets){for(var u=0;u<s.widgets.length;u++)if(s.widgets[u].noHScroll){dr(o,a,"widget");break}}++a}),this.curOp.forceUpdate=!0,Ye(this,"refresh",this)}),operation:function(r){return At(this,r)},startOperation:function(){return Mr(this)},endOperation:function(){return Fr(this)},refresh:yt(function(){var r=this.display.cachedTextHeight;St(this),this.curOp.forceUpdate=!0,gn(this),mn(this,this.doc.scrollLeft,this.doc.scrollTop),Gi(this.display),(r==null||Math.abs(r-jr(this.display))>.5||this.options.lineWrapping)&&Bi(this),Ye(this,"refresh",this)}),swapDoc:yt(function(r){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),yl(this,r),gn(this),this.display.input.reset(),mn(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,ot(this,"swapDoc",this,i),i}),phrase:function(r){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,r)?i[r]:r},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}},Bt(e),e.registerHelper=function(r,i,o){n.hasOwnProperty(r)||(n[r]=e[r]={_global:[]}),n[r][i]=o},e.registerGlobalHelper=function(r,i,o,l){e.registerHelper(r,i,l),n[r]._global.push({pred:o,val:l})}}function fo(e,t,n,r,i){var o=t,l=n,a=ye(e,t.line),s=i&&e.direction=="rtl"?-n:n;function u(){var he=t.line+s;return he<e.first||he>=e.first+e.size?!1:(t=new B(he,t.ch,t.sticky),a=ye(e,he))}function h(he){var se;if(r=="codepoint"){var ge=a.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(ge))se=null;else{var Le=n>0?ge>=55296&&ge<56320:ge>=56320&&ge<57343;se=new B(t.line,Math.max(0,Math.min(a.text.length,t.ch+n*(Le?2:1))),-n)}}else i?se=Lu(e.cm,a,t,n):se=ro(a,t,n);if(se==null)if(!he&&u())t=no(i,e.cm,a,t.line,s);else return!1;else t=se;return!0}if(r=="char"||r=="codepoint")h();else if(r=="column")h(!0);else if(r=="word"||r=="group")for(var x=null,D=r=="group",L=e.cm&&e.cm.getHelper(t,"wordChars"),H=!0;!(n<0&&!h(!H));H=!1){var Z=a.text.charAt(t.ch)||`
|
|
16
|
+
`,ie=De(Z,L)?"w":D&&Z==`
|
|
17
|
+
`?"n":!D||/\s/.test(Z)?null:"p";if(D&&!H&&!ie&&(ie="s"),x&&x!=ie){n<0&&(n=1,h(),t.sticky="after");break}if(ie&&(x=ie),n>0&&!h(!H))break}var ae=ai(e,t,o,l,!0);return We(o,ae)&&(ae.hitSide=!0),ae}function da(e,t,n,r){var i=e.doc,o=t.left,l;if(r=="page"){var a=Math.min(e.display.wrapper.clientHeight,le(e).innerHeight||i(e).documentElement.clientHeight),s=Math.max(a-.5*jr(e.display),3);l=(n>0?t.bottom:t.top)+n*s}else r=="line"&&(l=n>0?t.bottom+3:t.top-3);for(var u;u=Oi(e,o,l),!!u.outside;){if(n<0?l<=0:l>=i.height){u.hitSide=!0;break}l+=n*5}return u}var je=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ce,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};je.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,uo(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function o(a){for(var s=a.target;s;s=s.parentNode){if(s==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(s.className))break}return!1}Se(i,"paste",function(a){!o(a)||Qe(r,a)||sa(a,r)||I<=11&&setTimeout(lt(r,function(){return t.updateFromDOM()}),20)}),Se(i,"compositionstart",function(a){t.composing={data:a.data,done:!1}}),Se(i,"compositionupdate",function(a){t.composing||(t.composing={data:a.data,done:!1})}),Se(i,"compositionend",function(a){t.composing&&(a.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Se(i,"touchstart",function(){return n.forceCompositionEnd()}),Se(i,"input",function(){t.composing||t.readFromDOMSoon()});function l(a){if(!(!o(a)||Qe(r,a))){if(r.somethingSelected())hi({lineWise:!1,text:r.getSelections()}),a.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var s=fa(r);hi({lineWise:!0,text:s.text}),a.type=="cut"&&r.operation(function(){r.setSelections(s.ranges,0,Ve),r.replaceSelection("",null,"cut")})}else return;if(a.clipboardData){a.clipboardData.clearData();var u=Ut.text.join(`
|
|
18
|
+
`);if(a.clipboardData.setData("Text",u),a.clipboardData.getData("Text")==u){a.preventDefault();return}}var h=ca(),x=h.firstChild;uo(x),r.display.lineSpace.insertBefore(h,r.display.lineSpace.firstChild),x.value=Ut.text.join(`
|
|
19
|
+
`);var D=y(Te(i));v(x),setTimeout(function(){r.display.lineSpace.removeChild(h),D.focus(),D==i&&n.showPrimarySelection()},50)}}Se(i,"copy",l),Se(i,"cut",l)},je.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},je.prototype.prepareSelection=function(){var e=rl(this.cm,!1);return e.focus=y(Te(this.div))==this.div,e},je.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},je.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},je.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line<t.display.viewFrom){e.removeAllRanges();return}var o=pi(t,e.anchorNode,e.anchorOffset),l=pi(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&l&&!l.bad&&ce(Wr(o,l),r)==0&&ce(wt(o,l),i)==0)){var a=t.display.view,s=r.line>=t.display.viewFrom&&ha(t,r)||{node:a[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&ha(t,i);if(!u){var h=a[a.length-1].measure,x=h.maps?h.maps[h.maps.length-1]:h.map;u={node:x[x.length-1],offset:x[x.length-2]-x[x.length-3]}}if(!s||!u){e.removeAllRanges();return}var D=e.rangeCount&&e.getRangeAt(0),L;try{L=C(s.node,s.offset,u.offset,u.node)}catch{}L&&(!_&&t.state.focused?(e.collapse(s.node,s.offset),L.collapsed||(e.removeAllRanges(),e.addRange(L))):(e.removeAllRanges(),e.addRange(L)),D&&e.anchorNode==null?e.addRange(D):_&&this.startGracePeriod()),this.rememberSelection()}},je.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)},je.prototype.showMultipleSelections=function(e){G(this.cm.display.cursorDiv,e.cursors),G(this.cm.display.selectionDiv,e.selection)},je.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},je.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return g(this.div,t)},je.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||y(Te(this.div))!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},je.prototype.blur=function(){this.div.blur()},je.prototype.getField=function(){return this.div},je.prototype.supportsTouch=function(){return!0},je.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):At(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)},je.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},je.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(M&&S&&this.cm.display.gutterSpecs.length&&Ku(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var n=pi(t,e.anchorNode,e.anchorOffset),r=pi(t,e.focusNode,e.focusOffset);n&&r&&At(t,function(){gt(t.doc,pr(n,r),Ve),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},je.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=B(r.line-1,ye(e.doc,r.line-1).length)),i.ch==ye(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=B(i.line+1,0)),r.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,l,a;r.line==t.viewFrom||(o=Tr(e,r.line))==0?(l=f(t.view[0].line),a=t.view[0].node):(l=f(t.view[o].line),a=t.view[o-1].node.nextSibling);var s=Tr(e,i.line),u,h;if(s==t.view.length-1?(u=t.viewTo-1,h=t.lineDiv.lastChild):(u=f(t.view[s+1].line)-1,h=t.view[s+1].node.previousSibling),!a)return!1;for(var x=e.doc.splitLines(Uu(e,a,h,l,u)),D=Vt(e.doc,B(l,0),B(u,ye(e.doc,u).text.length));x.length>1&&D.length>1;)if(we(x)==we(D))x.pop(),D.pop(),u--;else if(x[0]==D[0])x.shift(),D.shift(),l++;else break;for(var L=0,H=0,Z=x[0],ie=D[0],ae=Math.min(Z.length,ie.length);L<ae&&Z.charCodeAt(L)==ie.charCodeAt(L);)++L;for(var he=we(x),se=we(D),ge=Math.min(he.length-(x.length==1?L:0),se.length-(D.length==1?L:0));H<ge&&he.charCodeAt(he.length-H-1)==se.charCodeAt(se.length-H-1);)++H;if(x.length==1&&D.length==1&&l==r.line)for(;L&&L>r.ch&&he.charCodeAt(he.length-H-1)==se.charCodeAt(se.length-H-1);)L--,H++;x[x.length-1]=he.slice(0,he.length-H).replace(/^\u200b+/,""),x[0]=x[0].slice(L).replace(/\u200b+$/,"");var Le=B(l,L),ke=B(u,D.length?we(D).length-H:0);if(x.length>1||x[0]||ce(Le,ke))return Zr(e.doc,x,Le,ke,"+input"),!0},je.prototype.ensurePolled=function(){this.forceCompositionEnd()},je.prototype.reset=function(){this.forceCompositionEnd()},je.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},je.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},je.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&At(this.cm,function(){return St(e.cm)})},je.prototype.setUneditable=function(e){e.contentEditable="false"},je.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||lt(this.cm,so)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},je.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},je.prototype.onContextMenu=function(){},je.prototype.resetPosition=function(){},je.prototype.needsContentAttribute=!0;function ha(e,t){var n=Ai(e,t.line);if(!n||n.hidden)return null;var r=ye(e.doc,t.line),i=qo(n,r,t.line),o=Re(r,e.doc.direction),l="left";if(o){var a=lr(o,t.ch);l=a%2?"right":"left"}var s=Uo(i.map,t.ch,l);return s.offset=s.collapse=="right"?s.end:s.start,s}function Ku(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function rn(e,t){return t&&(e.bad=!0),e}function Uu(e,t,n,r,i){var o="",l=!1,a=e.doc.lineSeparator(),s=!1;function u(L){return function(H){return H.id==L}}function h(){l&&(o+=a,s&&(o+=a),l=s=!1)}function x(L){L&&(h(),o+=L)}function D(L){if(L.nodeType==1){var H=L.getAttribute("cm-text");if(H){x(H);return}var Z=L.getAttribute("cm-marker"),ie;if(Z){var ae=e.findMarks(B(r,0),B(i+1,0),u(+Z));ae.length&&(ie=ae[0].find(0))&&x(Vt(e.doc,ie.from,ie.to).join(a));return}if(L.getAttribute("contenteditable")=="false")return;var he=/^(pre|div|p|li|table|br)$/i.test(L.nodeName);if(!/^br$/i.test(L.nodeName)&&L.textContent.length==0)return;he&&h();for(var se=0;se<L.childNodes.length;se++)D(L.childNodes[se]);/^(pre|p)$/i.test(L.nodeName)&&(s=!0),he&&(l=!0)}else L.nodeType==3&&x(L.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;D(t),t!=n;)t=t.nextSibling,s=!1;return o}function pi(e,t,n){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[n],!r)return rn(e.clipPos(B(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 o=e.display.view[i];if(o.node==r)return Gu(o,t,n)}}function Gu(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!g(r,t))return rn(B(f(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var o=e.rest?we(e.rest):e.line;return rn(B(f(o),o.text.length),i)}var l=t.nodeType==3?t:null,a=t;for(!l&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(l=t.firstChild,n&&(n=l.nodeValue.length));a.parentNode!=r;)a=a.parentNode;var s=e.measure,u=s.maps;function h(ie,ae,he){for(var se=-1;se<(u?u.length:0);se++)for(var ge=se<0?s.map:u[se],Le=0;Le<ge.length;Le+=3){var ke=ge[Le+2];if(ke==ie||ke==ae){var Ee=f(se<0?e.line:e.rest[se]),Ke=ge[Le]+he;return(he<0||ke!=ie)&&(Ke=ge[Le+(he?1:0)]),B(Ee,Ke)}}}var x=h(l,a,n);if(x)return rn(x,i);for(var D=a.nextSibling,L=l?l.nodeValue.length-n:0;D;D=D.nextSibling){if(x=h(D,D.firstChild,0),x)return rn(B(x.line,x.ch-L),i);L+=D.textContent.length}for(var H=a.previousSibling,Z=n;H;H=H.previousSibling){if(x=h(H,H.firstChild,-1),x)return rn(B(x.line,x.ch+Z),i);Z+=H.textContent.length}}var $e=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Ce,this.hasSelection=!1,this.composing=null,this.resetting=!1};$e.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),w&&(i.style.width="0px"),Se(i,"input",function(){k&&I>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),Se(i,"paste",function(l){Qe(r,l)||sa(l,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())});function o(l){if(!Qe(r,l)){if(r.somethingSelected())hi({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var a=fa(r);hi({lineWise:!0,text:a.text}),l.type=="cut"?r.setSelections(a.ranges,null,Ve):(n.prevInput="",i.value=a.text.join(`
|
|
20
|
+
`),v(i))}else return;l.type=="cut"&&(r.state.cutIncoming=+new Date)}}Se(i,"cut",o),Se(i,"copy",o),Se(e.scroller,"paste",function(l){if(!(tr(e,l)||Qe(r,l))){if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var a=new Event("paste");a.clipboardData=l.clipboardData,i.dispatchEvent(a)}}),Se(e.lineSpace,"selectstart",function(l){tr(e,l)||pt(l)}),Se(i,"compositionstart",function(){var l=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:l,range:r.markText(l,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Se(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},$e.prototype.createField=function(e){this.wrapper=ca(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;uo(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},$e.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},$e.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=rl(e);if(e.options.moveInputWithCursor){var i=jt(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return r},$e.prototype.showSelection=function(e){var t=this.cm,n=t.display;G(n.cursorDiv,e.cursors),G(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},$e.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&&v(this.textarea),k&&I>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",k&&I>=9&&(this.hasSelection=null));this.resetting=!1}},$e.prototype.getField=function(){return this.textarea},$e.prototype.supportsTouch=function(){return!1},$e.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!N||y(Te(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},$e.prototype.blur=function(){this.textarea.blur()},$e.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},$e.prototype.receivedFocus=function(){this.slowPoll()},$e.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},$e.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function n(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},$e.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||ur(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(k&&I>=9&&this.hasSelection===i||z&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(o==8203&&!r&&(r=""),o==8666)return this.reset(),this.cm.execCommand("undo")}for(var l=0,a=Math.min(r.length,i.length);l<a&&r.charCodeAt(l)==i.charCodeAt(l);)++l;return At(t,function(){so(t,i.slice(l),r.length-l,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},$e.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},$e.prototype.onKeyPress=function(){k&&I>=9&&(this.hasSelection=null),this.fastPoll()},$e.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Lr(n,e),l=r.scroller.scrollTop;if(!o||A)return;var a=n.options.resetSelectionOnContextMenu;a&&n.doc.sel.contains(o)==-1&<(n,gt)(n.doc,pr(o),Ve);var s=i.style.cssText,u=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
22
|
+
top: `+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+`px;
|
|
23
|
+
z-index: 1000; background: `+(k?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
24
|
+
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var x;Y&&(x=i.ownerDocument.defaultView.scrollY),r.input.focus(),Y&&i.ownerDocument.defaultView.scrollTo(null,x),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=L,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function D(){if(i.selectionStart!=null){var Z=n.somethingSelected(),ie=""+(Z?i.value:"");i.value="⇚",i.value=ie,t.prevInput=Z?"":"",i.selectionStart=1,i.selectionEnd=ie.length,r.selForContextMenu=n.doc.sel}}function L(){if(t.contextMenuPending==L&&(t.contextMenuPending=!1,t.wrapper.style.cssText=u,i.style.cssText=s,k&&I<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),i.selectionStart!=null)){(!k||k&&I<9)&&D();var Z=0,ie=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput==""?lt(n,El)(n):Z++<10?r.detectingSelectAll=setTimeout(ie,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(ie,200)}}if(k&&I>=9&&D(),J){ar(e);var H=function(){ht(window,"mouseup",H),setTimeout(L,20)};Se(window,"mouseup",H)}else setTimeout(L,50)},$e.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},$e.prototype.setUneditable=function(){},$e.prototype.needsContentAttribute=!1;function Xu(e,t){if(t=t?Me(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=y(Te(e));t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=a.getValue()}var i;if(e.form&&(Se(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=l}}catch{}}t.finishInit=function(s){s.save=r,s.getTextArea=function(){return e},s.toTextArea=function(){s.toTextArea=isNaN,r(),e.parentNode.removeChild(s.getWrapperElement()),e.style.display="",e.form&&(ht(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var a=Ge(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return a}function Yu(e){e.off=ht,e.on=Se,e.wheelEventPixels=tu,e.Doc=Lt,e.splitLines=zt,e.countColumn=Fe,e.findColumn=_e,e.isWordChar=me,e.Pass=qe,e.signal=Ye,e.Line=Hr,e.changeEnd=gr,e.scrollbarModel=sl,e.Pos=B,e.cmpPos=ce,e.modes=Pr,e.mimeModes=Ht,e.resolveMode=Ir,e.getMode=zr,e.modeExtensions=fr,e.extendMode=Br,e.copyState=Gt,e.startState=Rr,e.innerMode=sn,e.commands=En,e.keyMap=nr,e.keyName=Yl,e.isModifierKey=Gl,e.lookupKey=$r,e.normalizeKeyMap=Su,e.StringStream=Je,e.SharedTextMarker=Fn,e.TextMarker=mr,e.LineWidget=Mn,e.e_preventDefault=pt,e.e_stopPropagation=Er,e.e_stop=ar,e.addClass=j,e.contains=g,e.rmClass=$,e.keyNames=xr}Wu(Ge),ju(Ge);var Qu="iter insert remove copy getEditor constructor".split(" ");for(var gi in Lt.prototype)Lt.prototype.hasOwnProperty(gi)&&ve(Qu,gi)<0&&(Ge.prototype[gi]=(function(e){return function(){return e.apply(this.doc,arguments)}})(Lt.prototype[gi]));return Bt(Lt),Ge.inputStyles={textarea:$e,contenteditable:je},Ge.defineMode=function(e){!Ge.defaults.mode&&e!="null"&&(Ge.defaults.mode=e),_t.apply(this,arguments)},Ge.defineMIME=kr,Ge.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ge.defineMIME("text/plain","null"),Ge.defineExtension=function(e,t){Ge.prototype[e]=t},Ge.defineDocExtension=function(e,t){Lt.prototype[e]=t},Ge.fromTextArea=Xu,Yu(Ge),Ge.version="5.65.18",Ge}))})(vi)),vi.exports}var Vu=mt();const df=Ju(Vu);var ga={exports:{}},va;function Xa(){return va||(va=1,(function(ct,xt){(function(b){b(mt())})(function(b){b.defineMode("css",function(J,P){var $=P.inline;P.propertyKeywords||(P=b.resolveMode("text/css"));var F=J.indentUnit,G=P.tokenHooks,c=P.documentTypes||{},T=P.mediaTypes||{},C=P.mediaFeatures||{},g=P.mediaValueKeywords||{},y=P.propertyKeywords||{},j=P.nonStandardPropertyKeywords||{},de=P.fontProperties||{},v=P.counterDescriptors||{},d=P.colorKeywords||{},fe=P.valueKeywords||{},Te=P.allowNested,le=P.lineComment,xe=P.supportsAtComponent===!0,Me=J.highlightNonStandardPropertyKeywords!==!1,Fe,Ce;function ve(E,ee){return Fe=ee,E}function Oe(E,ee){var K=E.next();if(G[K]){var ze=G[K](E,ee);if(ze!==!1)return ze}if(K=="@")return E.eatWhile(/[\w\\\-]/),ve("def",E.current());if(K=="="||(K=="~"||K=="|")&&E.eat("="))return ve(null,"compare");if(K=='"'||K=="'")return ee.tokenize=qe(K),ee.tokenize(E,ee);if(K=="#")return E.eatWhile(/[\w\\\-]/),ve("atom","hash");if(K=="!")return E.match(/^\s*\w*/),ve("keyword","important");if(/\d/.test(K)||K=="."&&E.eat(/\d/))return E.eatWhile(/[\w.%]/),ve("number","unit");if(K==="-"){if(/[\d.]/.test(E.peek()))return E.eatWhile(/[\w.%]/),ve("number","unit");if(E.match(/^-[\w\\\-]*/))return E.eatWhile(/[\w\\\-]/),E.match(/^\s*:/,!1)?ve("variable-2","variable-definition"):ve("variable-2","variable");if(E.match(/^\w+-/))return ve("meta","meta")}else return/[,+>*\/]/.test(K)?ve(null,"select-op"):K=="."&&E.match(/^-?[_a-z][_a-z0-9-]*/i)?ve("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(K)?ve(null,K):E.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(E.current())&&(ee.tokenize=Ve),ve("variable callee","variable")):/[\w\\\-]/.test(K)?(E.eatWhile(/[\w\\\-]/),ve("property","word")):ve(null,null)}function qe(E){return function(ee,K){for(var ze=!1,me;(me=ee.next())!=null;){if(me==E&&!ze){E==")"&&ee.backUp(1);break}ze=!ze&&me=="\\"}return(me==E||!ze&&E!=")")&&(K.tokenize=null),ve("string","string")}}function Ve(E,ee){return E.next(),E.match(/^\s*[\"\')]/,!1)?ee.tokenize=null:ee.tokenize=qe(")"),ve(null,"(")}function dt(E,ee,K){this.type=E,this.indent=ee,this.prev=K}function Pe(E,ee,K,ze){return E.context=new dt(K,ee.indentation()+(ze===!1?0:F),E.context),K}function _e(E){return E.context.prev&&(E.context=E.context.prev),E.context.type}function Ue(E,ee,K){return Ie[K.context.type](E,ee,K)}function et(E,ee,K,ze){for(var me=ze||1;me>0;me--)K.context=K.context.prev;return Ue(E,ee,K)}function we(E){var ee=E.current().toLowerCase();fe.hasOwnProperty(ee)?Ce="atom":d.hasOwnProperty(ee)?Ce="keyword":Ce="variable"}var Ie={};return Ie.top=function(E,ee,K){if(E=="{")return Pe(K,ee,"block");if(E=="}"&&K.context.prev)return _e(K);if(xe&&/@component/i.test(E))return Pe(K,ee,"atComponentBlock");if(/^@(-moz-)?document$/i.test(E))return Pe(K,ee,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(E))return Pe(K,ee,"atBlock");if(/^@(font-face|counter-style)/i.test(E))return K.stateArg=E,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(E))return"keyframes";if(E&&E.charAt(0)=="@")return Pe(K,ee,"at");if(E=="hash")Ce="builtin";else if(E=="word")Ce="tag";else{if(E=="variable-definition")return"maybeprop";if(E=="interpolation")return Pe(K,ee,"interpolation");if(E==":")return"pseudo";if(Te&&E=="(")return Pe(K,ee,"parens")}return K.context.type},Ie.block=function(E,ee,K){if(E=="word"){var ze=ee.current().toLowerCase();return y.hasOwnProperty(ze)?(Ce="property","maybeprop"):j.hasOwnProperty(ze)?(Ce=Me?"string-2":"property","maybeprop"):Te?(Ce=ee.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(Ce+=" error","maybeprop")}else return E=="meta"?"block":!Te&&(E=="hash"||E=="qualifier")?(Ce="error","block"):Ie.top(E,ee,K)},Ie.maybeprop=function(E,ee,K){return E==":"?Pe(K,ee,"prop"):Ue(E,ee,K)},Ie.prop=function(E,ee,K){if(E==";")return _e(K);if(E=="{"&&Te)return Pe(K,ee,"propBlock");if(E=="}"||E=="{")return et(E,ee,K);if(E=="(")return Pe(K,ee,"parens");if(E=="hash"&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(ee.current()))Ce+=" error";else if(E=="word")we(ee);else if(E=="interpolation")return Pe(K,ee,"interpolation");return"prop"},Ie.propBlock=function(E,ee,K){return E=="}"?_e(K):E=="word"?(Ce="property","maybeprop"):K.context.type},Ie.parens=function(E,ee,K){return E=="{"||E=="}"?et(E,ee,K):E==")"?_e(K):E=="("?Pe(K,ee,"parens"):E=="interpolation"?Pe(K,ee,"interpolation"):(E=="word"&&we(ee),"parens")},Ie.pseudo=function(E,ee,K){return E=="meta"?"pseudo":E=="word"?(Ce="variable-3",K.context.type):Ue(E,ee,K)},Ie.documentTypes=function(E,ee,K){return E=="word"&&c.hasOwnProperty(ee.current())?(Ce="tag",K.context.type):Ie.atBlock(E,ee,K)},Ie.atBlock=function(E,ee,K){if(E=="(")return Pe(K,ee,"atBlock_parens");if(E=="}"||E==";")return et(E,ee,K);if(E=="{")return _e(K)&&Pe(K,ee,Te?"block":"top");if(E=="interpolation")return Pe(K,ee,"interpolation");if(E=="word"){var ze=ee.current().toLowerCase();ze=="only"||ze=="not"||ze=="and"||ze=="or"?Ce="keyword":T.hasOwnProperty(ze)?Ce="attribute":C.hasOwnProperty(ze)?Ce="property":g.hasOwnProperty(ze)?Ce="keyword":y.hasOwnProperty(ze)?Ce="property":j.hasOwnProperty(ze)?Ce=Me?"string-2":"property":fe.hasOwnProperty(ze)?Ce="atom":d.hasOwnProperty(ze)?Ce="keyword":Ce="error"}return K.context.type},Ie.atComponentBlock=function(E,ee,K){return E=="}"?et(E,ee,K):E=="{"?_e(K)&&Pe(K,ee,Te?"block":"top",!1):(E=="word"&&(Ce="error"),K.context.type)},Ie.atBlock_parens=function(E,ee,K){return E==")"?_e(K):E=="{"||E=="}"?et(E,ee,K,2):Ie.atBlock(E,ee,K)},Ie.restricted_atBlock_before=function(E,ee,K){return E=="{"?Pe(K,ee,"restricted_atBlock"):E=="word"&&K.stateArg=="@counter-style"?(Ce="variable","restricted_atBlock_before"):Ue(E,ee,K)},Ie.restricted_atBlock=function(E,ee,K){return E=="}"?(K.stateArg=null,_e(K)):E=="word"?(K.stateArg=="@font-face"&&!de.hasOwnProperty(ee.current().toLowerCase())||K.stateArg=="@counter-style"&&!v.hasOwnProperty(ee.current().toLowerCase())?Ce="error":Ce="property","maybeprop"):"restricted_atBlock"},Ie.keyframes=function(E,ee,K){return E=="word"?(Ce="variable","keyframes"):E=="{"?Pe(K,ee,"top"):Ue(E,ee,K)},Ie.at=function(E,ee,K){return E==";"?_e(K):E=="{"||E=="}"?et(E,ee,K):(E=="word"?Ce="tag":E=="hash"&&(Ce="builtin"),"at")},Ie.interpolation=function(E,ee,K){return E=="}"?_e(K):E=="{"||E==";"?et(E,ee,K):(E=="word"?Ce="variable":E!="variable"&&E!="("&&E!=")"&&(Ce="error"),"interpolation")},{startState:function(E){return{tokenize:null,state:$?"block":"top",stateArg:null,context:new dt($?"block":"top",E||0,null)}},token:function(E,ee){if(!ee.tokenize&&E.eatSpace())return null;var K=(ee.tokenize||Oe)(E,ee);return K&&typeof K=="object"&&(Fe=K[1],K=K[0]),Ce=K,Fe!="comment"&&(ee.state=Ie[ee.state](Fe,E,ee)),Ce},indent:function(E,ee){var K=E.context,ze=ee&&ee.charAt(0),me=K.indent;return K.type=="prop"&&(ze=="}"||ze==")")&&(K=K.prev),K.prev&&(ze=="}"&&(K.type=="block"||K.type=="top"||K.type=="interpolation"||K.type=="restricted_atBlock")?(K=K.prev,me=K.indent):(ze==")"&&(K.type=="parens"||K.type=="atBlock_parens")||ze=="{"&&(K.type=="at"||K.type=="atBlock"))&&(me=Math.max(0,K.indent-F))),me},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:le,fold:"brace"}});function pe(J){for(var P={},$=0;$<J.length;++$)P[J[$].toLowerCase()]=!0;return P}var _=["domain","regexp","url","url-prefix"],te=pe(_),oe=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],Q=pe(oe),k=["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"],I=pe(k),Y=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],ne=pe(Y),S=["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"],R=pe(S),A=["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"],V=pe(A),ue=["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],O=pe(ue),w=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],M=pe(w),N=["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"],z=pe(N),X=["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"],q=pe(X),p=_.concat(oe).concat(k).concat(Y).concat(S).concat(A).concat(N).concat(X);b.registerHelper("hintWords","css",p);function W(J,P){for(var $=!1,F;(F=J.next())!=null;){if($&&F=="/"){P.tokenize=null;break}$=F=="*"}return["comment","comment"]}b.defineMIME("text/css",{documentTypes:te,mediaTypes:Q,mediaFeatures:I,mediaValueKeywords:ne,propertyKeywords:R,nonStandardPropertyKeywords:V,fontProperties:O,counterDescriptors:M,colorKeywords:z,valueKeywords:q,tokenHooks:{"/":function(J,P){return J.eat("*")?(P.tokenize=W,W(J,P)):!1}},name:"css"}),b.defineMIME("text/x-scss",{mediaTypes:Q,mediaFeatures:I,mediaValueKeywords:ne,propertyKeywords:R,nonStandardPropertyKeywords:V,colorKeywords:z,valueKeywords:q,fontProperties:O,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(J,P){return J.eat("/")?(J.skipToEnd(),["comment","comment"]):J.eat("*")?(P.tokenize=W,W(J,P)):["operator","operator"]},":":function(J){return J.match(/^\s*\{/,!1)?[null,null]:!1},$:function(J){return J.match(/^[\w-]+/),J.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(J){return J.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),b.defineMIME("text/x-less",{mediaTypes:Q,mediaFeatures:I,mediaValueKeywords:ne,propertyKeywords:R,nonStandardPropertyKeywords:V,colorKeywords:z,valueKeywords:q,fontProperties:O,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(J,P){return J.eat("/")?(J.skipToEnd(),["comment","comment"]):J.eat("*")?(P.tokenize=W,W(J,P)):["operator","operator"]},"@":function(J){return J.eat("{")?[null,"interpolation"]:J.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)?!1:(J.eatWhile(/[\w\\\-]/),J.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),b.defineMIME("text/x-gss",{documentTypes:te,mediaTypes:Q,mediaFeatures:I,propertyKeywords:R,nonStandardPropertyKeywords:V,fontProperties:O,counterDescriptors:M,colorKeywords:z,valueKeywords:q,supportsAtComponent:!0,tokenHooks:{"/":function(J,P){return J.eat("*")?(P.tokenize=W,W(J,P)):!1}},name:"css",helperType:"gss"})})})()),ga.exports}Xa();var ma={exports:{}},xa={exports:{}},ya;function Ya(){return ya||(ya=1,(function(ct,xt){(function(b){b(mt())})(function(b){var pe={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},_={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};b.defineMode("xml",function(te,oe){var Q=te.indentUnit,k={},I=oe.htmlMode?pe:_;for(var Y in I)k[Y]=I[Y];for(var Y in oe)k[Y]=oe[Y];var ne,S;function R(c,T){function C(j){return T.tokenize=j,j(c,T)}var g=c.next();if(g=="<")return c.eat("!")?c.eat("[")?c.match("CDATA[")?C(ue("atom","]]>")):null:c.match("--")?C(ue("comment","-->")):c.match("DOCTYPE",!0,!0)?(c.eatWhile(/[\w\._\-]/),C(O(1))):null:c.eat("?")?(c.eatWhile(/[\w\._\-]/),T.tokenize=ue("meta","?>"),"meta"):(ne=c.eat("/")?"closeTag":"openTag",T.tokenize=A,"tag bracket");if(g=="&"){var y;return c.eat("#")?c.eat("x")?y=c.eatWhile(/[a-fA-F\d]/)&&c.eat(";"):y=c.eatWhile(/[\d]/)&&c.eat(";"):y=c.eatWhile(/[\w\.\-:]/)&&c.eat(";"),y?"atom":"error"}else return c.eatWhile(/[^&<]/),null}R.isInText=!0;function A(c,T){var C=c.next();if(C==">"||C=="/"&&c.eat(">"))return T.tokenize=R,ne=C==">"?"endTag":"selfcloseTag","tag bracket";if(C=="=")return ne="equals",null;if(C=="<"){T.tokenize=R,T.state=X,T.tagName=T.tagStart=null;var g=T.tokenize(c,T);return g?g+" tag error":"tag error"}else return/[\'\"]/.test(C)?(T.tokenize=V(C),T.stringStartCol=c.column(),T.tokenize(c,T)):(c.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function V(c){var T=function(C,g){for(;!C.eol();)if(C.next()==c){g.tokenize=A;break}return"string"};return T.isInAttribute=!0,T}function ue(c,T){return function(C,g){for(;!C.eol();){if(C.match(T)){g.tokenize=R;break}C.next()}return c}}function O(c){return function(T,C){for(var g;(g=T.next())!=null;){if(g=="<")return C.tokenize=O(c+1),C.tokenize(T,C);if(g==">")if(c==1){C.tokenize=R;break}else return C.tokenize=O(c-1),C.tokenize(T,C)}return"meta"}}function w(c){return c&&c.toLowerCase()}function M(c,T,C){this.prev=c.context,this.tagName=T||"",this.indent=c.indented,this.startOfLine=C,(k.doNotIndent.hasOwnProperty(T)||c.context&&c.context.noIndent)&&(this.noIndent=!0)}function N(c){c.context&&(c.context=c.context.prev)}function z(c,T){for(var C;;){if(!c.context||(C=c.context.tagName,!k.contextGrabbers.hasOwnProperty(w(C))||!k.contextGrabbers[w(C)].hasOwnProperty(w(T))))return;N(c)}}function X(c,T,C){return c=="openTag"?(C.tagStart=T.column(),q):c=="closeTag"?p:X}function q(c,T,C){return c=="word"?(C.tagName=T.current(),S="tag",P):k.allowMissingTagName&&c=="endTag"?(S="tag bracket",P(c,T,C)):(S="error",q)}function p(c,T,C){if(c=="word"){var g=T.current();return C.context&&C.context.tagName!=g&&k.implicitlyClosed.hasOwnProperty(w(C.context.tagName))&&N(C),C.context&&C.context.tagName==g||k.matchClosing===!1?(S="tag",W):(S="tag error",J)}else return k.allowMissingTagName&&c=="endTag"?(S="tag bracket",W(c,T,C)):(S="error",J)}function W(c,T,C){return c!="endTag"?(S="error",W):(N(C),X)}function J(c,T,C){return S="error",W(c,T,C)}function P(c,T,C){if(c=="word")return S="attribute",$;if(c=="endTag"||c=="selfcloseTag"){var g=C.tagName,y=C.tagStart;return C.tagName=C.tagStart=null,c=="selfcloseTag"||k.autoSelfClosers.hasOwnProperty(w(g))?z(C,g):(z(C,g),C.context=new M(C,g,y==C.indented)),X}return S="error",P}function $(c,T,C){return c=="equals"?F:(k.allowMissing||(S="error"),P(c,T,C))}function F(c,T,C){return c=="string"?G:c=="word"&&k.allowUnquoted?(S="string",P):(S="error",P(c,T,C))}function G(c,T,C){return c=="string"?G:P(c,T,C)}return{startState:function(c){var T={tokenize:R,state:X,indented:c||0,tagName:null,tagStart:null,context:null};return c!=null&&(T.baseIndent=c),T},token:function(c,T){if(!T.tagName&&c.sol()&&(T.indented=c.indentation()),c.eatSpace())return null;ne=null;var C=T.tokenize(c,T);return(C||ne)&&C!="comment"&&(S=null,T.state=T.state(ne||C,c,T),S&&(C=S=="error"?C+" error":S)),C},indent:function(c,T,C){var g=c.context;if(c.tokenize.isInAttribute)return c.tagStart==c.indented?c.stringStartCol+1:c.indented+Q;if(g&&g.noIndent)return b.Pass;if(c.tokenize!=A&&c.tokenize!=R)return C?C.match(/^(\s*)/)[0].length:0;if(c.tagName)return k.multilineTagIndentPastTag!==!1?c.tagStart+c.tagName.length+2:c.tagStart+Q*(k.multilineTagIndentFactor||1);if(k.alignCDATA&&/<!\[CDATA\[/.test(T))return 0;var y=T&&/^<(\/)?([\w_:\.-]*)/.exec(T);if(y&&y[1])for(;g;)if(g.tagName==y[2]){g=g.prev;break}else if(k.implicitlyClosed.hasOwnProperty(w(g.tagName)))g=g.prev;else break;else if(y)for(;g;){var j=k.contextGrabbers[w(g.tagName)];if(j&&j.hasOwnProperty(w(y[2])))g=g.prev;else break}for(;g&&g.prev&&!g.startOfLine;)g=g.prev;return g?g.indent+Q:c.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:k.htmlMode?"html":"xml",helperType:k.htmlMode?"html":"xml",skipAttribute:function(c){c.state==F&&(c.state=P)},xmlCurrentTag:function(c){return c.tagName?{name:c.tagName,close:c.type=="closeTag"}:null},xmlCurrentContext:function(c){for(var T=[],C=c.context;C;C=C.prev)T.push(C.tagName);return T.reverse()}}}),b.defineMIME("text/xml","xml"),b.defineMIME("application/xml","xml"),b.mimeModes.hasOwnProperty("text/html")||b.defineMIME("text/html",{name:"xml",htmlMode:!0})})})()),xa.exports}var ba={exports:{}},ka;function Qa(){return ka||(ka=1,(function(ct,xt){(function(b){b(mt())})(function(b){b.defineMode("javascript",function(pe,_){var te=pe.indentUnit,oe=_.statementIndent,Q=_.jsonld,k=_.json||Q,I=_.trackScope!==!1,Y=_.typescript,ne=_.wordCharacters||/[\w$\xa1-\uffff]/,S=(function(){function f(it){return{type:it,style:"keyword"}}var m=f("keyword a"),U=f("keyword b"),re=f("keyword c"),B=f("keyword d"),ce=f("operator"),We={type:"atom",style:"atom"};return{if:f("if"),while:m,with:m,else:U,do:U,try:U,finally:U,return:B,break:B,continue:B,new:f("new"),delete:re,void:re,throw:re,debugger:f("debugger"),var:f("var"),const:f("var"),let:f("var"),function:f("function"),catch:f("catch"),for:f("for"),switch:f("switch"),case:f("case"),default:f("default"),in:ce,typeof:ce,instanceof:ce,true:We,false:We,null:We,undefined:We,NaN:We,Infinity:We,this:f("this"),class:f("class"),super:f("atom"),yield:re,export:f("export"),import:f("import"),extends:re,await:re}})(),R=/[+\-*&%=<>!?|~^@]/,A=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function V(f){for(var m=!1,U,re=!1;(U=f.next())!=null;){if(!m){if(U=="/"&&!re)return;U=="["?re=!0:re&&U=="]"&&(re=!1)}m=!m&&U=="\\"}}var ue,O;function w(f,m,U){return ue=f,O=U,m}function M(f,m){var U=f.next();if(U=='"'||U=="'")return m.tokenize=N(U),m.tokenize(f,m);if(U=="."&&f.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return w("number","number");if(U=="."&&f.match(".."))return w("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(U))return w(U);if(U=="="&&f.eat(">"))return w("=>","operator");if(U=="0"&&f.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return w("number","number");if(/\d/.test(U))return f.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),w("number","number");if(U=="/")return f.eat("*")?(m.tokenize=z,z(f,m)):f.eat("/")?(f.skipToEnd(),w("comment","comment")):Et(f,m,1)?(V(f),f.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),w("regexp","string-2")):(f.eat("="),w("operator","operator",f.current()));if(U=="`")return m.tokenize=X,X(f,m);if(U=="#"&&f.peek()=="!")return f.skipToEnd(),w("meta","meta");if(U=="#"&&f.eatWhile(ne))return w("variable","property");if(U=="<"&&f.match("!--")||U=="-"&&f.match("->")&&!/\S/.test(f.string.slice(0,f.start)))return f.skipToEnd(),w("comment","comment");if(R.test(U))return(U!=">"||!m.lexical||m.lexical.type!=">")&&(f.eat("=")?(U=="!"||U=="=")&&f.eat("="):/[<>*+\-|&?]/.test(U)&&(f.eat(U),U==">"&&f.eat(U))),U=="?"&&f.eat(".")?w("."):w("operator","operator",f.current());if(ne.test(U)){f.eatWhile(ne);var re=f.current();if(m.lastType!="."){if(S.propertyIsEnumerable(re)){var B=S[re];return w(B.type,B.style,re)}if(re=="async"&&f.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return w("async","keyword",re)}return w("variable","variable",re)}}function N(f){return function(m,U){var re=!1,B;if(Q&&m.peek()=="@"&&m.match(A))return U.tokenize=M,w("jsonld-keyword","meta");for(;(B=m.next())!=null&&!(B==f&&!re);)re=!re&&B=="\\";return re||(U.tokenize=M),w("string","string")}}function z(f,m){for(var U=!1,re;re=f.next();){if(re=="/"&&U){m.tokenize=M;break}U=re=="*"}return w("comment","comment")}function X(f,m){for(var U=!1,re;(re=f.next())!=null;){if(!U&&(re=="`"||re=="$"&&f.eat("{"))){m.tokenize=M;break}U=!U&&re=="\\"}return w("quasi","string-2",f.current())}var q="([{}])";function p(f,m){m.fatArrowAt&&(m.fatArrowAt=null);var U=f.string.indexOf("=>",f.start);if(!(U<0)){if(Y){var re=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(f.string.slice(f.start,U));re&&(U=re.index)}for(var B=0,ce=!1,We=U-1;We>=0;--We){var it=f.string.charAt(We),wt=q.indexOf(it);if(wt>=0&&wt<3){if(!B){++We;break}if(--B==0){it=="("&&(ce=!0);break}}else if(wt>=3&&wt<6)++B;else if(ne.test(it))ce=!0;else if(/["'\/`]/.test(it))for(;;--We){if(We==0)return;var Wr=f.string.charAt(We-1);if(Wr==it&&f.string.charAt(We-2)!="\\"){We--;break}}else if(ce&&!B){++We;break}}ce&&!B&&(m.fatArrowAt=We)}}var W={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function J(f,m,U,re,B,ce){this.indented=f,this.column=m,this.type=U,this.prev=B,this.info=ce,re!=null&&(this.align=re)}function P(f,m){if(!I)return!1;for(var U=f.localVars;U;U=U.next)if(U.name==m)return!0;for(var re=f.context;re;re=re.prev)for(var U=re.vars;U;U=U.next)if(U.name==m)return!0}function $(f,m,U,re,B){var ce=f.cc;for(F.state=f,F.stream=B,F.marked=null,F.cc=ce,F.style=m,f.lexical.hasOwnProperty("align")||(f.lexical.align=!0);;){var We=ce.length?ce.pop():k?ve:Fe;if(We(U,re)){for(;ce.length&&ce[ce.length-1].lex;)ce.pop()();return F.marked?F.marked:U=="variable"&&P(f,re)?"variable-2":m}}}var F={state:null,marked:null,cc:null};function G(){for(var f=arguments.length-1;f>=0;f--)F.cc.push(arguments[f])}function c(){return G.apply(null,arguments),!0}function T(f,m){for(var U=m;U;U=U.next)if(U.name==f)return!0;return!1}function C(f){var m=F.state;if(F.marked="def",!!I){if(m.context){if(m.lexical.info=="var"&&m.context&&m.context.block){var U=g(f,m.context);if(U!=null){m.context=U;return}}else if(!T(f,m.localVars)){m.localVars=new de(f,m.localVars);return}}_.globalVars&&!T(f,m.globalVars)&&(m.globalVars=new de(f,m.globalVars))}}function g(f,m){if(m)if(m.block){var U=g(f,m.prev);return U?U==m.prev?m:new j(U,m.vars,!0):null}else return T(f,m.vars)?m:new j(m.prev,new de(f,m.vars),!1);else return null}function y(f){return f=="public"||f=="private"||f=="protected"||f=="abstract"||f=="readonly"}function j(f,m,U){this.prev=f,this.vars=m,this.block=U}function de(f,m){this.name=f,this.next=m}var v=new de("this",new de("arguments",null));function d(){F.state.context=new j(F.state.context,F.state.localVars,!1),F.state.localVars=v}function fe(){F.state.context=new j(F.state.context,F.state.localVars,!0),F.state.localVars=null}d.lex=fe.lex=!0;function Te(){F.state.localVars=F.state.context.vars,F.state.context=F.state.context.prev}Te.lex=!0;function le(f,m){var U=function(){var re=F.state,B=re.indented;if(re.lexical.type=="stat")B=re.lexical.indented;else for(var ce=re.lexical;ce&&ce.type==")"&&ce.align;ce=ce.prev)B=ce.indented;re.lexical=new J(B,F.stream.column(),f,null,re.lexical,m)};return U.lex=!0,U}function xe(){var f=F.state;f.lexical.prev&&(f.lexical.type==")"&&(f.indented=f.lexical.indented),f.lexical=f.lexical.prev)}xe.lex=!0;function Me(f){function m(U){return U==f?c():f==";"||U=="}"||U==")"||U=="]"?G():c(m)}return m}function Fe(f,m){return f=="var"?c(le("vardef",m),Er,Me(";"),xe):f=="keyword a"?c(le("form"),qe,Fe,xe):f=="keyword b"?c(le("form"),Fe,xe):f=="keyword d"?F.stream.match(/^\s*$/,!1)?c():c(le("stat"),dt,Me(";"),xe):f=="debugger"?c(Me(";")):f=="{"?c(le("}"),fe,Pt,xe,Te):f==";"?c():f=="if"?(F.state.lexical.info=="else"&&F.state.cc[F.state.cc.length-1]==xe&&F.state.cc.pop()(),c(le("form"),qe,Fe,xe,Or)):f=="function"?c(zt):f=="for"?c(le("form"),fe,Rn,Fe,Te,xe):f=="class"||Y&&m=="interface"?(F.marked="keyword",c(le("form",f=="class"?f:m),Pr,xe)):f=="variable"?Y&&m=="declare"?(F.marked="keyword",c(Fe)):Y&&(m=="module"||m=="enum"||m=="type")&&F.stream.match(/^\s*\w/,!1)?(F.marked="keyword",m=="enum"?c(ye):m=="type"?c(Wn,Me("operator"),Re,Me(";")):c(le("form"),kt,Me("{"),le("}"),Pt,xe,xe)):Y&&m=="namespace"?(F.marked="keyword",c(le("form"),ve,Fe,xe)):Y&&m=="abstract"?(F.marked="keyword",c(Fe)):c(le("stat"),ze):f=="switch"?c(le("form"),qe,Me("{"),le("}","switch"),fe,Pt,xe,xe,Te):f=="case"?c(ve,Me(":")):f=="default"?c(Me(":")):f=="catch"?c(le("form"),d,Ce,Fe,xe,Te):f=="export"?c(le("stat"),Ir,xe):f=="import"?c(le("stat"),fr,xe):f=="async"?c(Fe):m=="@"?c(ve,Fe):G(le("stat"),ve,Me(";"),xe)}function Ce(f){if(f=="(")return c(Wt,Me(")"))}function ve(f,m){return Ve(f,m,!1)}function Oe(f,m){return Ve(f,m,!0)}function qe(f){return f!="("?G():c(le(")"),dt,Me(")"),xe)}function Ve(f,m,U){if(F.state.fatArrowAt==F.stream.start){var re=U?Ie:we;if(f=="(")return c(d,le(")"),Ne(Wt,")"),xe,Me("=>"),re,Te);if(f=="variable")return G(d,kt,Me("=>"),re,Te)}var B=U?_e:Pe;return W.hasOwnProperty(f)?c(B):f=="function"?c(zt,B):f=="class"||Y&&m=="interface"?(F.marked="keyword",c(le("form"),yi,xe)):f=="keyword c"||f=="async"?c(U?Oe:ve):f=="("?c(le(")"),dt,Me(")"),xe,B):f=="operator"||f=="spread"?c(U?Oe:ve):f=="["?c(le("]"),Je,xe,B):f=="{"?Mt(De,"}",null,B):f=="quasi"?G(Ue,B):f=="new"?c(E(U)):c()}function dt(f){return f.match(/[;\}\)\],]/)?G():G(ve)}function Pe(f,m){return f==","?c(dt):_e(f,m,!1)}function _e(f,m,U){var re=U==!1?Pe:_e,B=U==!1?ve:Oe;if(f=="=>")return c(d,U?Ie:we,Te);if(f=="operator")return/\+\+|--/.test(m)||Y&&m=="!"?c(re):Y&&m=="<"&&F.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?c(le(">"),Ne(Re,">"),xe,re):m=="?"?c(ve,Me(":"),B):c(B);if(f=="quasi")return G(Ue,re);if(f!=";"){if(f=="(")return Mt(Oe,")","call",re);if(f==".")return c(me,re);if(f=="[")return c(le("]"),dt,Me("]"),xe,re);if(Y&&m=="as")return F.marked="keyword",c(Re,re);if(f=="regexp")return F.state.lastType=F.marked="operator",F.stream.backUp(F.stream.pos-F.stream.start-1),c(B)}}function Ue(f,m){return f!="quasi"?G():m.slice(m.length-2)!="${"?c(Ue):c(dt,et)}function et(f){if(f=="}")return F.marked="string-2",F.state.tokenize=X,c(Ue)}function we(f){return p(F.stream,F.state),G(f=="{"?Fe:ve)}function Ie(f){return p(F.stream,F.state),G(f=="{"?Fe:Oe)}function E(f){return function(m){return m=="."?c(f?K:ee):m=="variable"&&Y?c(Ft,f?_e:Pe):G(f?Oe:ve)}}function ee(f,m){if(m=="target")return F.marked="keyword",c(Pe)}function K(f,m){if(m=="target")return F.marked="keyword",c(_e)}function ze(f){return f==":"?c(xe,Fe):G(Pe,Me(";"),xe)}function me(f){if(f=="variable")return F.marked="property",c()}function De(f,m){if(f=="async")return F.marked="property",c(De);if(f=="variable"||F.style=="keyword"){if(F.marked="property",m=="get"||m=="set")return c(be);var U;return Y&&F.state.fatArrowAt==F.stream.start&&(U=F.stream.match(/^\s*:\s*/,!1))&&(F.state.fatArrowAt=F.stream.pos+U[0].length),c(Be)}else{if(f=="number"||f=="string")return F.marked=Q?"property":F.style+" property",c(Be);if(f=="jsonld-keyword")return c(Be);if(Y&&y(m))return F.marked="keyword",c(De);if(f=="[")return c(ve,or,Me("]"),Be);if(f=="spread")return c(Oe,Be);if(m=="*")return F.marked="keyword",c(De);if(f==":")return G(Be)}}function be(f){return f!="variable"?G(Be):(F.marked="property",c(zt))}function Be(f){if(f==":")return c(Oe);if(f=="(")return G(zt)}function Ne(f,m,U){function re(B,ce){if(U?U.indexOf(B)>-1:B==","){var We=F.state.lexical;return We.info=="call"&&(We.pos=(We.pos||0)+1),c(function(it,wt){return it==m||wt==m?G():G(f)},re)}return B==m||ce==m?c():U&&U.indexOf(";")>-1?G(f):c(Me(m))}return function(B,ce){return B==m||ce==m?c():G(f,re)}}function Mt(f,m,U){for(var re=3;re<arguments.length;re++)F.cc.push(arguments[re]);return c(le(m,U),Ne(f,m),xe)}function Pt(f){return f=="}"?c():G(Fe,Pt)}function or(f,m){if(Y){if(f==":")return c(Re);if(m=="?")return c(or)}}function br(f,m){if(Y&&(f==":"||m=="in"))return c(Re)}function lr(f){if(Y&&f==":")return F.stream.match(/^\s*\w+\s+is\b/,!1)?c(ve,mi,Re):c(Re)}function mi(f,m){if(m=="is")return F.marked="keyword",c()}function Re(f,m){if(m=="keyof"||m=="typeof"||m=="infer"||m=="readonly")return F.marked="keyword",c(m=="typeof"?Oe:Re);if(f=="variable"||m=="void")return F.marked="type",c(It);if(m=="|"||m=="&")return c(Re);if(f=="string"||f=="number"||f=="atom")return c(It);if(f=="[")return c(le("]"),Ne(Re,"]",","),xe,It);if(f=="{")return c(le("}"),Se,xe,It);if(f=="(")return c(Ne(Qe,")"),Bn,It);if(f=="<")return c(Ne(Re,">"),Re);if(f=="quasi")return G(ht,It)}function Bn(f){if(f=="=>")return c(Re)}function Se(f){return f.match(/[\}\)\]]/)?c():f==","||f==";"?c(Se):G(Zt,Se)}function Zt(f,m){if(f=="variable"||F.style=="keyword")return F.marked="property",c(Zt);if(m=="?"||f=="number"||f=="string")return c(Zt);if(f==":")return c(Re);if(f=="[")return c(Me("variable"),br,Me("]"),Zt);if(f=="(")return G(ur,Zt);if(!f.match(/[;\}\)\],]/))return c()}function ht(f,m){return f!="quasi"?G():m.slice(m.length-2)!="${"?c(ht):c(Re,Ye)}function Ye(f){if(f=="}")return F.marked="string-2",F.state.tokenize=X,c(ht)}function Qe(f,m){return f=="variable"&&F.stream.match(/^\s*[?:]/,!1)||m=="?"?c(Qe):f==":"?c(Re):f=="spread"?c(Qe):G(Re)}function It(f,m){if(m=="<")return c(le(">"),Ne(Re,">"),xe,It);if(m=="|"||f=="."||m=="&")return c(Re);if(f=="[")return c(Re,Me("]"),It);if(m=="extends"||m=="implements")return F.marked="keyword",c(Re);if(m=="?")return c(Re,Me(":"),Re)}function Ft(f,m){if(m=="<")return c(le(">"),Ne(Re,">"),xe,It)}function Bt(){return G(Re,pt)}function pt(f,m){if(m=="=")return c(Re)}function Er(f,m){return m=="enum"?(F.marked="keyword",c(ye)):G(kt,or,Rt,xi)}function kt(f,m){if(Y&&y(m))return F.marked="keyword",c(kt);if(f=="variable")return C(m),c();if(f=="spread")return c(kt);if(f=="[")return Mt(ln,"]");if(f=="{")return Mt(ar,"}")}function ar(f,m){return f=="variable"&&!F.stream.match(/^\s*:/,!1)?(C(m),c(Rt)):(f=="variable"&&(F.marked="property"),f=="spread"?c(kt):f=="}"?G():f=="["?c(ve,Me("]"),Me(":"),ar):c(Me(":"),kt,Rt))}function ln(){return G(kt,Rt)}function Rt(f,m){if(m=="=")return c(Oe)}function xi(f){if(f==",")return c(Er)}function Or(f,m){if(f=="keyword b"&&m=="else")return c(le("form","else"),Fe,xe)}function Rn(f,m){if(m=="await")return c(Rn);if(f=="(")return c(le(")"),an,xe)}function an(f){return f=="var"?c(Er,sr):f=="variable"?c(sr):G(sr)}function sr(f,m){return f==")"?c():f==";"?c(sr):m=="in"||m=="of"?(F.marked="keyword",c(ve,sr)):G(ve,sr)}function zt(f,m){if(m=="*")return F.marked="keyword",c(zt);if(f=="variable")return C(m),c(zt);if(f=="(")return c(d,le(")"),Ne(Wt,")"),xe,lr,Fe,Te);if(Y&&m=="<")return c(le(">"),Ne(Bt,">"),xe,zt)}function ur(f,m){if(m=="*")return F.marked="keyword",c(ur);if(f=="variable")return C(m),c(ur);if(f=="(")return c(d,le(")"),Ne(Wt,")"),xe,lr,Te);if(Y&&m=="<")return c(le(">"),Ne(Bt,">"),xe,ur)}function Wn(f,m){if(f=="keyword"||f=="variable")return F.marked="type",c(Wn);if(m=="<")return c(le(">"),Ne(Bt,">"),xe)}function Wt(f,m){return m=="@"&&c(ve,Wt),f=="spread"?c(Wt):Y&&y(m)?(F.marked="keyword",c(Wt)):Y&&f=="this"?c(or,Rt):G(kt,or,Rt)}function yi(f,m){return f=="variable"?Pr(f,m):Ht(f,m)}function Pr(f,m){if(f=="variable")return C(m),c(Ht)}function Ht(f,m){if(m=="<")return c(le(">"),Ne(Bt,">"),xe,Ht);if(m=="extends"||m=="implements"||Y&&f==",")return m=="implements"&&(F.marked="keyword"),c(Y?Re:ve,Ht);if(f=="{")return c(le("}"),_t,xe)}function _t(f,m){if(f=="async"||f=="variable"&&(m=="static"||m=="get"||m=="set"||Y&&y(m))&&F.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return F.marked="keyword",c(_t);if(f=="variable"||F.style=="keyword")return F.marked="property",c(kr,_t);if(f=="number"||f=="string")return c(kr,_t);if(f=="[")return c(ve,or,Me("]"),kr,_t);if(m=="*")return F.marked="keyword",c(_t);if(Y&&f=="(")return G(ur,_t);if(f==";"||f==",")return c(_t);if(f=="}")return c();if(m=="@")return c(ve,_t)}function kr(f,m){if(m=="!"||m=="?")return c(kr);if(f==":")return c(Re,Rt);if(m=="=")return c(Oe);var U=F.state.lexical.prev,re=U&&U.info=="interface";return G(re?ur:zt)}function Ir(f,m){return m=="*"?(F.marked="keyword",c(Rr,Me(";"))):m=="default"?(F.marked="keyword",c(ve,Me(";"))):f=="{"?c(Ne(zr,"}"),Rr,Me(";")):G(Fe)}function zr(f,m){if(m=="as")return F.marked="keyword",c(Me("variable"));if(f=="variable")return G(Oe,zr)}function fr(f){return f=="string"?c():f=="("?G(ve):f=="."?G(Pe):G(Br,Gt,Rr)}function Br(f,m){return f=="{"?Mt(Br,"}"):(f=="variable"&&C(m),m=="*"&&(F.marked="keyword"),c(sn))}function Gt(f){if(f==",")return c(Br,Gt)}function sn(f,m){if(m=="as")return F.marked="keyword",c(Br)}function Rr(f,m){if(m=="from")return F.marked="keyword",c(ve)}function Je(f){return f=="]"?c():G(Ne(Oe,"]"))}function ye(){return G(le("form"),kt,Me("{"),le("}"),Ne(Vt,"}"),xe,xe)}function Vt(){return G(kt,Rt)}function un(f,m){return f.lastType=="operator"||f.lastType==","||R.test(m.charAt(0))||/[,.]/.test(m.charAt(0))}function Et(f,m,U){return m.tokenize==M&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(m.lastType)||m.lastType=="quasi"&&/\{\s*$/.test(f.string.slice(0,f.pos-(U||0)))}return{startState:function(f){var m={tokenize:M,lastType:"sof",cc:[],lexical:new J((f||0)-te,0,"block",!1),localVars:_.localVars,context:_.localVars&&new j(null,null,!1),indented:f||0};return _.globalVars&&typeof _.globalVars=="object"&&(m.globalVars=_.globalVars),m},token:function(f,m){if(f.sol()&&(m.lexical.hasOwnProperty("align")||(m.lexical.align=!1),m.indented=f.indentation(),p(f,m)),m.tokenize!=z&&f.eatSpace())return null;var U=m.tokenize(f,m);return ue=="comment"?U:(m.lastType=ue=="operator"&&(O=="++"||O=="--")?"incdec":ue,$(m,U,ue,O,f))},indent:function(f,m){if(f.tokenize==z||f.tokenize==X)return b.Pass;if(f.tokenize!=M)return 0;var U=m&&m.charAt(0),re=f.lexical,B;if(!/^\s*else\b/.test(m))for(var ce=f.cc.length-1;ce>=0;--ce){var We=f.cc[ce];if(We==xe)re=re.prev;else if(We!=Or&&We!=Te)break}for(;(re.type=="stat"||re.type=="form")&&(U=="}"||(B=f.cc[f.cc.length-1])&&(B==Pe||B==_e)&&!/^[,\.=+\-*:?[\(]/.test(m));)re=re.prev;oe&&re.type==")"&&re.prev.type=="stat"&&(re=re.prev);var it=re.type,wt=U==it;return it=="vardef"?re.indented+(f.lastType=="operator"||f.lastType==","?re.info.length+1:0):it=="form"&&U=="{"?re.indented:it=="form"?re.indented+te:it=="stat"?re.indented+(un(f,m)?oe||te:0):re.info=="switch"&&!wt&&_.doubleIndentSwitch!=!1?re.indented+(/^(?:case|default)\b/.test(m)?te:2*te):re.align?re.column+(wt?0:1):re.indented+(wt?0:te)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:k?null:"/*",blockCommentEnd:k?null:"*/",blockCommentContinue:k?null:" * ",lineComment:k?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:k?"json":"javascript",jsonldMode:Q,jsonMode:k,expressionAllowed:Et,skipExpression:function(f){$(f,"atom","atom","true",new b.StringStream("",2,null))}}}),b.registerHelper("wordChars","javascript",/[\w$]/),b.defineMIME("text/javascript","javascript"),b.defineMIME("text/ecmascript","javascript"),b.defineMIME("application/javascript","javascript"),b.defineMIME("application/x-javascript","javascript"),b.defineMIME("application/ecmascript","javascript"),b.defineMIME("application/json",{name:"javascript",json:!0}),b.defineMIME("application/x-json",{name:"javascript",json:!0}),b.defineMIME("application/manifest+json",{name:"javascript",json:!0}),b.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),b.defineMIME("text/typescript",{name:"javascript",typescript:!0}),b.defineMIME("application/typescript",{name:"javascript",typescript:!0})})})()),ba.exports}var wa;function $u(){return wa||(wa=1,(function(ct,xt){(function(b){b(mt(),Ya(),Qa(),Xa())})(function(b){var pe={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 _(ne,S,R){var A=ne.current(),V=A.search(S);return V>-1?ne.backUp(A.length-V):A.match(/<\/?$/)&&(ne.backUp(A.length),ne.match(S,!1)||ne.match(A)),R}var te={};function oe(ne){var S=te[ne];return S||(te[ne]=new RegExp("\\s+"+ne+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function Q(ne,S){var R=ne.match(oe(S));return R?/^\s*(.*?)\s*$/.exec(R[2])[1]:""}function k(ne,S){return new RegExp((S?"^":"")+"</\\s*"+ne+"\\s*>","i")}function I(ne,S){for(var R in ne)for(var A=S[R]||(S[R]=[]),V=ne[R],ue=V.length-1;ue>=0;ue--)A.unshift(V[ue])}function Y(ne,S){for(var R=0;R<ne.length;R++){var A=ne[R];if(!A[0]||A[1].test(Q(S,A[0])))return A[2]}}b.defineMode("htmlmixed",function(ne,S){var R=b.getMode(ne,{name:"xml",htmlMode:!0,multilineTagIndentFactor:S.multilineTagIndentFactor,multilineTagIndentPastTag:S.multilineTagIndentPastTag,allowMissingTagName:S.allowMissingTagName}),A={},V=S&&S.tags,ue=S&&S.scriptTypes;if(I(pe,A),V&&I(V,A),ue)for(var O=ue.length-1;O>=0;O--)A.script.unshift(["type",ue[O].matches,ue[O].mode]);function w(M,N){var z=R.token(M,N.htmlState),X=/\btag\b/.test(z),q;if(X&&!/[<>\s\/]/.test(M.current())&&(q=N.htmlState.tagName&&N.htmlState.tagName.toLowerCase())&&A.hasOwnProperty(q))N.inTag=q+" ";else if(N.inTag&&X&&/>$/.test(M.current())){var p=/^([\S]+) (.*)/.exec(N.inTag);N.inTag=null;var W=M.current()==">"&&Y(A[p[1]],p[2]),J=b.getMode(ne,W),P=k(p[1],!0),$=k(p[1],!1);N.token=function(F,G){return F.match(P,!1)?(G.token=w,G.localState=G.localMode=null,null):_(F,$,G.localMode.token(F,G.localState))},N.localMode=J,N.localState=b.startState(J,R.indent(N.htmlState,"",""))}else N.inTag&&(N.inTag+=M.current(),M.eol()&&(N.inTag+=" "));return z}return{startState:function(){var M=b.startState(R);return{token:w,inTag:null,localMode:null,localState:null,htmlState:M}},copyState:function(M){var N;return M.localState&&(N=b.copyState(M.localMode,M.localState)),{token:M.token,inTag:M.inTag,localMode:M.localMode,localState:N,htmlState:b.copyState(R,M.htmlState)}},token:function(M,N){return N.token(M,N)},indent:function(M,N,z){return!M.localMode||/^\s*<\//.test(N)?R.indent(M.htmlState,N,z):M.localMode.indent?M.localMode.indent(M.localState,N,z):b.Pass},innerMode:function(M){return{state:M.localState||M.htmlState,mode:M.localMode||R}}}},"xml","javascript","css"),b.defineMIME("text/html","htmlmixed")})})()),ma.exports}$u();Qa();var Sa={exports:{}},La;function ef(){return La||(La=1,(function(ct,xt){(function(b){b(mt())})(function(b){function pe(I){return new RegExp("^(("+I.join(")|(")+"))\\b")}var _=pe(["and","or","not","is"]),te=["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"],oe=["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__"];b.registerHelper("hintWords","python",te.concat(oe).concat(["exec","print"]));function Q(I){return I.scopes[I.scopes.length-1]}b.defineMode("python",function(I,Y){for(var ne="error",S=Y.delimiters||Y.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,R=[Y.singleOperators,Y.doubleOperators,Y.doubleDelimiters,Y.tripleDelimiters,Y.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],A=0;A<R.length;A++)R[A]||R.splice(A--,1);var V=Y.hangingIndent||I.indentUnit,ue=te,O=oe;Y.extra_keywords!=null&&(ue=ue.concat(Y.extra_keywords)),Y.extra_builtins!=null&&(O=O.concat(Y.extra_builtins));var w=!(Y.version&&Number(Y.version)<3);if(w){var M=Y.identifiers||/^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*/;ue=ue.concat(["nonlocal","None","aiter","anext","async","await","breakpoint","match","case"]),O=O.concat(["ascii","bytes","exec","print"]);var N=new RegExp(`^(([rbuf]|(br)|(rb)|(fr)|(rf))?('{3}|"{3}|['"]))`,"i")}else{var M=Y.identifiers||/^[_A-Za-z][_A-Za-z0-9]*/;ue=ue.concat(["exec","print"]),O=O.concat(["apply","basestring","buffer","cmp","coerce","execfile","file","intern","long","raw_input","reduce","reload","unichr","unicode","xrange","None"]);var N=new RegExp(`^(([rubf]|(ur)|(br))?('{3}|"{3}|['"]))`,"i")}var z=pe(ue),X=pe(O);function q(T,C){var g=T.sol()&&C.lastToken!="\\";if(g&&(C.indent=T.indentation()),g&&Q(C).type=="py"){var y=Q(C).offset;if(T.eatSpace()){var j=T.indentation();return j>y?P(C):j<y&&F(T,C)&&T.peek()!="#"&&(C.errorToken=!0),null}else{var de=p(T,C);return y>0&&F(T,C)&&(de+=" "+ne),de}}return p(T,C)}function p(T,C,g){if(T.eatSpace())return null;if(!g&&T.match(/^#.*/))return"comment";if(T.match(/^[0-9\.]/,!1)){var y=!1;if(T.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(y=!0),T.match(/^[\d_]+\.\d*/)&&(y=!0),T.match(/^\.\d+/)&&(y=!0),y)return T.eat(/J/i),"number";var j=!1;if(T.match(/^0x[0-9a-f_]+/i)&&(j=!0),T.match(/^0b[01_]+/i)&&(j=!0),T.match(/^0o[0-7_]+/i)&&(j=!0),T.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(T.eat(/J/i),j=!0),T.match(/^0(?![\dx])/i)&&(j=!0),j)return T.eat(/L/i),"number"}if(T.match(N)){var de=T.current().toLowerCase().indexOf("f")!==-1;return de?(C.tokenize=W(T.current(),C.tokenize),C.tokenize(T,C)):(C.tokenize=J(T.current(),C.tokenize),C.tokenize(T,C))}for(var v=0;v<R.length;v++)if(T.match(R[v]))return"operator";return T.match(S)?"punctuation":C.lastToken=="."&&T.match(M)?"property":T.match(z)||T.match(_)?"keyword":T.match(X)?"builtin":T.match(/^(self|cls)\b/)?"variable-2":T.match(M)?C.lastToken=="def"||C.lastToken=="class"?"def":"variable":(T.next(),g?null:ne)}function W(T,C){for(;"rubf".indexOf(T.charAt(0).toLowerCase())>=0;)T=T.substr(1);var g=T.length==1,y="string";function j(v){return function(d,fe){var Te=p(d,fe,!0);return Te=="punctuation"&&(d.current()=="{"?fe.tokenize=j(v+1):d.current()=="}"&&(v>1?fe.tokenize=j(v-1):fe.tokenize=de)),Te}}function de(v,d){for(;!v.eol();)if(v.eatWhile(/[^'"\{\}\\]/),v.eat("\\")){if(v.next(),g&&v.eol())return y}else{if(v.match(T))return d.tokenize=C,y;if(v.match("{{"))return y;if(v.match("{",!1))return d.tokenize=j(0),v.current()?y:d.tokenize(v,d);if(v.match("}}"))return y;if(v.match("}"))return ne;v.eat(/['"]/)}if(g){if(Y.singleLineStringErrors)return ne;d.tokenize=C}return y}return de.isString=!0,de}function J(T,C){for(;"rubf".indexOf(T.charAt(0).toLowerCase())>=0;)T=T.substr(1);var g=T.length==1,y="string";function j(de,v){for(;!de.eol();)if(de.eatWhile(/[^'"\\]/),de.eat("\\")){if(de.next(),g&&de.eol())return y}else{if(de.match(T))return v.tokenize=C,y;de.eat(/['"]/)}if(g){if(Y.singleLineStringErrors)return ne;v.tokenize=C}return y}return j.isString=!0,j}function P(T){for(;Q(T).type!="py";)T.scopes.pop();T.scopes.push({offset:Q(T).offset+I.indentUnit,type:"py",align:null})}function $(T,C,g){var y=T.match(/^[\s\[\{\(]*(?:#|$)/,!1)?null:T.column()+1;C.scopes.push({offset:C.indent+V,type:g,align:y})}function F(T,C){for(var g=T.indentation();C.scopes.length>1&&Q(C).offset>g;){if(Q(C).type!="py")return!0;C.scopes.pop()}return Q(C).offset!=g}function G(T,C){T.sol()&&(C.beginningOfLine=!0,C.dedent=!1);var g=C.tokenize(T,C),y=T.current();if(C.beginningOfLine&&y=="@")return T.match(M,!1)?"meta":w?"operator":ne;if(/\S/.test(y)&&(C.beginningOfLine=!1),(g=="variable"||g=="builtin")&&C.lastToken=="meta"&&(g="meta"),(y=="pass"||y=="return")&&(C.dedent=!0),y=="lambda"&&(C.lambda=!0),y==":"&&!C.lambda&&Q(C).type=="py"&&T.match(/^\s*(?:#|$)/,!1)&&P(C),y.length==1&&!/string|comment/.test(g)){var j="[({".indexOf(y);if(j!=-1&&$(T,C,"])}".slice(j,j+1)),j="])}".indexOf(y),j!=-1)if(Q(C).type==y)C.indent=C.scopes.pop().offset-V;else return ne}return C.dedent&&T.eol()&&Q(C).type=="py"&&C.scopes.length>1&&C.scopes.pop(),g}var c={startState:function(T){return{tokenize:q,scopes:[{offset:T||0,type:"py",align:null}],indent:T||0,lastToken:null,lambda:!1,dedent:0}},token:function(T,C){var g=C.errorToken;g&&(C.errorToken=!1);var y=G(T,C);return y&&y!="comment"&&(C.lastToken=y=="keyword"||y=="punctuation"?T.current():y),y=="punctuation"&&(y=null),T.eol()&&C.lambda&&(C.lambda=!1),g?y+" "+ne:y},indent:function(T,C){if(T.tokenize!=q)return T.tokenize.isString?b.Pass:0;var g=Q(T),y=g.type==C.charAt(0)||g.type=="py"&&!T.dedent&&/^(else:|elif |except |finally:)/.test(C);return g.align!=null?g.align-(y?1:0):g.offset-(y?V:0)},electricInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/,closeBrackets:{triples:`'"`},lineComment:"#",fold:"indent"};return c}),b.defineMIME("text/x-python","python");var k=function(I){return I.split(" ")};b.defineMIME("text/x-cython",{name:"python",extra_keywords:k("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")})})})()),Sa.exports}ef();var Ta={exports:{}},Ca;function tf(){return Ca||(Ca=1,(function(ct,xt){(function(b){b(mt())})(function(b){function pe(g,y,j,de,v,d){this.indented=g,this.column=y,this.type=j,this.info=de,this.align=v,this.prev=d}function _(g,y,j,de){var v=g.indented;return g.context&&g.context.type=="statement"&&j!="statement"&&(v=g.context.indented),g.context=new pe(v,y,j,de,null,g.context)}function te(g){var y=g.context.type;return(y==")"||y=="]"||y=="}")&&(g.indented=g.context.indented),g.context=g.context.prev}function oe(g,y,j){if(y.prevToken=="variable"||y.prevToken=="type"||/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(g.string.slice(0,j))||y.typeAtEndOfLine&&g.column()==g.indentation())return!0}function Q(g){for(;;){if(!g||g.type=="top")return!0;if(g.type=="}"&&g.prev.info!="namespace")return!1;g=g.prev}}b.defineMode("clike",function(g,y){var j=g.indentUnit,de=y.statementIndentUnit||j,v=y.dontAlignCalls,d=y.keywords||{},fe=y.types||{},Te=y.builtin||{},le=y.blockKeywords||{},xe=y.defKeywords||{},Me=y.atoms||{},Fe=y.hooks||{},Ce=y.multiLineStrings,ve=y.indentStatements!==!1,Oe=y.indentSwitch!==!1,qe=y.namespaceSeparator,Ve=y.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,dt=y.numberStart||/[\d\.]/,Pe=y.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,_e=y.isOperatorChar||/[+\-*&%=<>!?|\/]/,Ue=y.isIdentifierChar||/[\w\$_\xa1-\uffff]/,et=y.isReservedIdentifier||!1,we,Ie;function E(me,De){var be=me.next();if(Fe[be]){var Be=Fe[be](me,De);if(Be!==!1)return Be}if(be=='"'||be=="'")return De.tokenize=ee(be),De.tokenize(me,De);if(dt.test(be)){if(me.backUp(1),me.match(Pe))return"number";me.next()}if(Ve.test(be))return we=be,null;if(be=="/"){if(me.eat("*"))return De.tokenize=K,K(me,De);if(me.eat("/"))return me.skipToEnd(),"comment"}if(_e.test(be)){for(;!me.match(/^\/[\/*]/,!1)&&me.eat(_e););return"operator"}if(me.eatWhile(Ue),qe)for(;me.match(qe);)me.eatWhile(Ue);var Ne=me.current();return I(d,Ne)?(I(le,Ne)&&(we="newstatement"),I(xe,Ne)&&(Ie=!0),"keyword"):I(fe,Ne)?"type":I(Te,Ne)||et&&et(Ne)?(I(le,Ne)&&(we="newstatement"),"builtin"):I(Me,Ne)?"atom":"variable"}function ee(me){return function(De,be){for(var Be=!1,Ne,Mt=!1;(Ne=De.next())!=null;){if(Ne==me&&!Be){Mt=!0;break}Be=!Be&&Ne=="\\"}return(Mt||!(Be||Ce))&&(be.tokenize=null),"string"}}function K(me,De){for(var be=!1,Be;Be=me.next();){if(Be=="/"&&be){De.tokenize=null;break}be=Be=="*"}return"comment"}function ze(me,De){y.typeFirstDefinitions&&me.eol()&&Q(De.context)&&(De.typeAtEndOfLine=oe(me,De,me.pos))}return{startState:function(me){return{tokenize:null,context:new pe((me||0)-j,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(me,De){var be=De.context;if(me.sol()&&(be.align==null&&(be.align=!1),De.indented=me.indentation(),De.startOfLine=!0),me.eatSpace())return ze(me,De),null;we=Ie=null;var Be=(De.tokenize||E)(me,De);if(Be=="comment"||Be=="meta")return Be;if(be.align==null&&(be.align=!0),we==";"||we==":"||we==","&&me.match(/^\s*(?:\/\/.*)?$/,!1))for(;De.context.type=="statement";)te(De);else if(we=="{")_(De,me.column(),"}");else if(we=="[")_(De,me.column(),"]");else if(we=="(")_(De,me.column(),")");else if(we=="}"){for(;be.type=="statement";)be=te(De);for(be.type=="}"&&(be=te(De));be.type=="statement";)be=te(De)}else we==be.type?te(De):ve&&((be.type=="}"||be.type=="top")&&we!=";"||be.type=="statement"&&we=="newstatement")&&_(De,me.column(),"statement",me.current());if(Be=="variable"&&(De.prevToken=="def"||y.typeFirstDefinitions&&oe(me,De,me.start)&&Q(De.context)&&me.match(/^\s*\(/,!1))&&(Be="def"),Fe.token){var Ne=Fe.token(me,De,Be);Ne!==void 0&&(Be=Ne)}return Be=="def"&&y.styleDefs===!1&&(Be="variable"),De.startOfLine=!1,De.prevToken=Ie?"def":Be||we,ze(me,De),Be},indent:function(me,De){if(me.tokenize!=E&&me.tokenize!=null||me.typeAtEndOfLine&&Q(me.context))return b.Pass;var be=me.context,Be=De&&De.charAt(0),Ne=Be==be.type;if(be.type=="statement"&&Be=="}"&&(be=be.prev),y.dontIndentStatements)for(;be.type=="statement"&&y.dontIndentStatements.test(be.info);)be=be.prev;if(Fe.indent){var Mt=Fe.indent(me,be,De,j);if(typeof Mt=="number")return Mt}var Pt=be.prev&&be.prev.info=="switch";if(y.allmanIndentation&&/[{(]/.test(Be)){for(;be.type!="top"&&be.type!="}";)be=be.prev;return be.indented}return be.type=="statement"?be.indented+(Be=="{"?0:de):be.align&&(!v||be.type!=")")?be.column+(Ne?0:1):be.type==")"&&!Ne?be.indented+de:be.indented+(Ne?0:j)+(!Ne&&Pt&&!/^(?:case|default)\b/.test(De)?j:0)},electricInput:Oe?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});function k(g){for(var y={},j=g.split(" "),de=0;de<j.length;++de)y[j[de]]=!0;return y}function I(g,y){return typeof g=="function"?g(y):g.propertyIsEnumerable(y)}var Y="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",ne="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",S="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",R="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",A=k("int long char short double float unsigned signed void bool"),V=k("SEL instancetype id Class Protocol BOOL");function ue(g){return I(A,g)||/.+_t$/.test(g)}function O(g){return ue(g)||I(V,g)}var w="case do else for if switch while struct enum union",M="struct enum union";function N(g,y){if(!y.startOfLine)return!1;for(var j,de=null;j=g.peek();){if(j=="\\"&&g.match(/^.$/)){de=N;break}else if(j=="/"&&g.match(/^\/[\/\*]/,!1))break;g.next()}return y.tokenize=de,"meta"}function z(g,y){return y.prevToken=="type"?"type":!1}function X(g){return!g||g.length<2||g[0]!="_"?!1:g[1]=="_"||g[1]!==g[1].toLowerCase()}function q(g){return g.eatWhile(/[\w\.']/),"number"}function p(g,y){if(g.backUp(1),g.match(/^(?:R|u8R|uR|UR|LR)/)){var j=g.match(/^"([^\s\\()]{0,16})\(/);return j?(y.cpp11RawStringDelim=j[1],y.tokenize=P,P(g,y)):!1}return g.match(/^(?:u8|u|U|L)/)?g.match(/^["']/,!1)?"string":!1:(g.next(),!1)}function W(g){var y=/(\w+)::~?(\w+)$/.exec(g);return y&&y[1]==y[2]}function J(g,y){for(var j;(j=g.next())!=null;)if(j=='"'&&!g.eat('"')){y.tokenize=null;break}return"string"}function P(g,y){var j=y.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&"),de=g.match(new RegExp(".*?\\)"+j+'"'));return de?y.tokenize=null:g.skipToEnd(),"string"}function $(g,y){typeof g=="string"&&(g=[g]);var j=[];function de(d){if(d)for(var fe in d)d.hasOwnProperty(fe)&&j.push(fe)}de(y.keywords),de(y.types),de(y.builtin),de(y.atoms),j.length&&(y.helperType=g[0],b.registerHelper("hintWords",g[0],j));for(var v=0;v<g.length;++v)b.defineMIME(g[v],y)}$(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:k(Y),types:ue,blockKeywords:k(w),defKeywords:k(M),typeFirstDefinitions:!0,atoms:k("NULL true false"),isReservedIdentifier:X,hooks:{"#":N,"*":z},modeProps:{fold:["brace","include"]}}),$(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:k(Y+" "+ne),types:ue,blockKeywords:k(w+" class try catch"),defKeywords:k(M+" class namespace"),typeFirstDefinitions:!0,atoms:k("true false NULL nullptr"),dontIndentStatements:/^template$/,isIdentifierChar:/[\w\$_~\xa1-\uffff]/,isReservedIdentifier:X,hooks:{"#":N,"*":z,u:p,U:p,L:p,R:p,0:q,1:q,2:q,3:q,4:q,5:q,6:q,7:q,8:q,9:q,token:function(g,y,j){if(j=="variable"&&g.peek()=="("&&(y.prevToken==";"||y.prevToken==null||y.prevToken=="}")&&W(g.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),$("text/x-java",{name:"clike",keywords:k("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:k("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:k("catch class do else finally for if switch try while"),defKeywords:k("class interface enum @interface"),typeFirstDefinitions:!0,atoms:k("true false null"),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(g){return g.match("interface",!1)?!1:(g.eatWhile(/[\w\$_]/),"meta")},'"':function(g,y){return g.match(/""$/)?(y.tokenize=F,y.tokenize(g,y)):!1}},modeProps:{fold:["brace","import"]}}),$("text/x-csharp",{name:"clike",keywords:k("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:k("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:k("catch class do else finally for foreach if struct switch try while"),defKeywords:k("class interface namespace record struct var"),typeFirstDefinitions:!0,atoms:k("true false null"),hooks:{"@":function(g,y){return g.eat('"')?(y.tokenize=J,J(g,y)):(g.eatWhile(/[\w\$_]/),"meta")}}});function F(g,y){for(var j=!1;!g.eol();){if(!j&&g.match('"""')){y.tokenize=null;break}j=g.next()=="\\"&&!j}return"string"}function G(g){return function(y,j){for(var de;de=y.next();)if(de=="*"&&y.eat("/"))if(g==1){j.tokenize=null;break}else return j.tokenize=G(g-1),j.tokenize(y,j);else if(de=="/"&&y.eat("*"))return j.tokenize=G(g+1),j.tokenize(y,j);return"comment"}}$("text/x-scala",{name:"clike",keywords:k("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:k("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:k("catch class enum do else finally for forSome if match switch try while"),defKeywords:k("class enum def object package trait type val var"),atoms:k("true false null"),indentStatements:!1,indentSwitch:!1,isOperatorChar:/[+\-*&%=<>!?|\/#:@]/,hooks:{"@":function(g){return g.eatWhile(/[\w\$_]/),"meta"},'"':function(g,y){return g.match('""')?(y.tokenize=F,y.tokenize(g,y)):!1},"'":function(g){return g.match(/^(\\[^'\s]+|[^\\'])'/)?"string-2":(g.eatWhile(/[\w\$_\xa1-\uffff]/),"atom")},"=":function(g,y){var j=y.context;return j.type=="}"&&j.align&&g.eat(">")?(y.context=new pe(j.indented,j.column,j.type,j.info,null,j.prev),"operator"):!1},"/":function(g,y){return g.eat("*")?(y.tokenize=G(1),y.tokenize(g,y)):!1}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}});function c(g){return function(y,j){for(var de=!1,v,d=!1;!y.eol();){if(!g&&!de&&y.match('"')){d=!0;break}if(g&&y.match('"""')){d=!0;break}v=y.next(),!de&&v=="$"&&y.match("{")&&y.skipTo("}"),de=!de&&v=="\\"&&!g}return(d||!g)&&(j.tokenize=null),"string"}}$("text/x-kotlin",{name:"clike",keywords:k("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:k("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:k("catch class do else finally for if where try while enum"),defKeywords:k("class val var object interface fun"),atoms:k("true false null this"),hooks:{"@":function(g){return g.eatWhile(/[\w\$_]/),"meta"},"*":function(g,y){return y.prevToken=="."?"variable":"operator"},'"':function(g,y){return y.tokenize=c(g.match('""')),y.tokenize(g,y)},"/":function(g,y){return g.eat("*")?(y.tokenize=G(1),y.tokenize(g,y)):!1},indent:function(g,y,j,de){var v=j&&j.charAt(0);if((g.prevToken=="}"||g.prevToken==")")&&j=="")return g.indented;if(g.prevToken=="operator"&&j!="}"&&g.context.type!="}"||g.prevToken=="variable"&&v=="."||(g.prevToken=="}"||g.prevToken==")")&&v==".")return de*2+y.indented;if(y.align&&y.type=="}")return y.indented+(g.context.type==(j||"").charAt(0)?0:de)}},modeProps:{closeBrackets:{triples:'"'}}}),$(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:k("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:k("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:k("for while do if else struct"),builtin:k("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:k("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:{"#":N},modeProps:{fold:["brace","include"]}}),$("text/x-nesc",{name:"clike",keywords:k(Y+" 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:ue,blockKeywords:k(w),atoms:k("null true false"),hooks:{"#":N},modeProps:{fold:["brace","include"]}}),$("text/x-objectivec",{name:"clike",keywords:k(Y+" "+S),types:O,builtin:k(R),blockKeywords:k(w+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:k(M+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:k("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:X,hooks:{"#":N,"*":z},modeProps:{fold:["brace","include"]}}),$("text/x-objectivec++",{name:"clike",keywords:k(Y+" "+S+" "+ne),types:O,builtin:k(R),blockKeywords:k(w+" @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),defKeywords:k(M+" @interface @implementation @protocol @class class namespace"),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:k("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:X,hooks:{"#":N,"*":z,u:p,U:p,L:p,R:p,0:q,1:q,2:q,3:q,4:q,5:q,6:q,7:q,8:q,9:q,token:function(g,y,j){if(j=="variable"&&g.peek()=="("&&(y.prevToken==";"||y.prevToken==null||y.prevToken=="}")&&W(g.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),$("text/x-squirrel",{name:"clike",keywords:k("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:ue,blockKeywords:k("case catch class else for foreach if switch try while"),defKeywords:k("function local class"),typeFirstDefinitions:!0,atoms:k("true false null"),hooks:{"#":N},modeProps:{fold:["brace","include"]}});var T=null;function C(g){return function(y,j){for(var de=!1,v,d=!1;!y.eol();){if(!de&&y.match('"')&&(g=="single"||y.match('""'))){d=!0;break}if(!de&&y.match("``")){T=C(g),d=!0;break}v=y.next(),de=g=="single"&&!de&&v=="\\"}return d&&(j.tokenize=null),"string"}}$("text/x-ceylon",{name:"clike",keywords:k("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(g){var y=g.charAt(0);return y===y.toUpperCase()&&y!==y.toLowerCase()},blockKeywords:k("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:k("class dynamic function interface module object package value"),builtin:k("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:k("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(g){return g.eatWhile(/[\w\$_]/),"meta"},'"':function(g,y){return y.tokenize=C(g.match('""')?"triple":"single"),y.tokenize(g,y)},"`":function(g,y){return!T||!g.match("`")?!1:(y.tokenize=T,T=null,y.tokenize(g,y))},"'":function(g){return g.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(g,y,j){if((j=="variable"||j=="type")&&y.prevToken==".")return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})})})()),Ta.exports}tf();var Da={exports:{}},Ma={exports:{}},Fa;function rf(){return Fa||(Fa=1,(function(ct,xt){(function(b){b(mt())})(function(b){b.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 pe=0;pe<b.modeInfo.length;pe++){var _=b.modeInfo[pe];_.mimes&&(_.mime=_.mimes[0])}b.findModeByMIME=function(te){te=te.toLowerCase();for(var oe=0;oe<b.modeInfo.length;oe++){var Q=b.modeInfo[oe];if(Q.mime==te)return Q;if(Q.mimes){for(var k=0;k<Q.mimes.length;k++)if(Q.mimes[k]==te)return Q}}if(/\+xml$/.test(te))return b.findModeByMIME("application/xml");if(/\+json$/.test(te))return b.findModeByMIME("application/json")},b.findModeByExtension=function(te){te=te.toLowerCase();for(var oe=0;oe<b.modeInfo.length;oe++){var Q=b.modeInfo[oe];if(Q.ext){for(var k=0;k<Q.ext.length;k++)if(Q.ext[k]==te)return Q}}},b.findModeByFileName=function(te){for(var oe=0;oe<b.modeInfo.length;oe++){var Q=b.modeInfo[oe];if(Q.file&&Q.file.test(te))return Q}var k=te.lastIndexOf("."),I=k>-1&&te.substring(k+1,te.length);if(I)return b.findModeByExtension(I)},b.findModeByName=function(te){te=te.toLowerCase();for(var oe=0;oe<b.modeInfo.length;oe++){var Q=b.modeInfo[oe];if(Q.name.toLowerCase()==te)return Q;if(Q.alias){for(var k=0;k<Q.alias.length;k++)if(Q.alias[k].toLowerCase()==te)return Q}}}})})()),Ma.exports}var Aa;function nf(){return Aa||(Aa=1,(function(ct,xt){(function(b){b(mt(),Ya(),rf())})(function(b){b.defineMode("markdown",function(pe,_){var te=b.getMode(pe,"text/html"),oe=te.name=="null";function Q(v){if(b.findModeByName){var d=b.findModeByName(v);d&&(v=d.mime||d.mimes[0])}var fe=b.getMode(pe,v);return fe.name=="null"?null:fe}_.highlightFormatting===void 0&&(_.highlightFormatting=!1),_.maxBlockquoteDepth===void 0&&(_.maxBlockquoteDepth=0),_.taskLists===void 0&&(_.taskLists=!1),_.strikethrough===void 0&&(_.strikethrough=!1),_.emoji===void 0&&(_.emoji=!1),_.fencedCodeBlockHighlighting===void 0&&(_.fencedCodeBlockHighlighting=!0),_.fencedCodeBlockDefaultMode===void 0&&(_.fencedCodeBlockDefaultMode="text/plain"),_.xml===void 0&&(_.xml=!0),_.tokenTypeOverrides===void 0&&(_.tokenTypeOverrides={});var k={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 I in k)k.hasOwnProperty(I)&&_.tokenTypeOverrides[I]&&(k[I]=_.tokenTypeOverrides[I]);var Y=/^([*\-_])(?:\s*\1){2,}\s*$/,ne=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,S=/^\[(x| )\](?=\s)/i,R=_.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,A=/^ {0,3}(?:\={1,}|-{2,})\s*$/,V=/^[^#!\[\]*_\\<>` "'(~:]+/,ue=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,O=/^\s*\[[^\]]+?\]:.*$/,w=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,M=" ";function N(v,d,fe){return d.f=d.inline=fe,fe(v,d)}function z(v,d,fe){return d.f=d.block=fe,fe(v,d)}function X(v){return!v||!/\S/.test(v.string)}function q(v){if(v.linkTitle=!1,v.linkHref=!1,v.linkText=!1,v.em=!1,v.strong=!1,v.strikethrough=!1,v.quote=0,v.indentedCode=!1,v.f==W){var d=oe;if(!d){var fe=b.innerMode(te,v.htmlState);d=fe.mode.name=="xml"&&fe.state.tagStart===null&&!fe.state.context&&fe.state.tokenize.isInText}d&&(v.f=F,v.block=p,v.htmlState=null)}return v.trailingSpace=0,v.trailingSpaceNewLine=!1,v.prevLine=v.thisLine,v.thisLine={stream:null},null}function p(v,d){var fe=v.column()===d.indentation,Te=X(d.prevLine.stream),le=d.indentedCode,xe=d.prevLine.hr,Me=d.list!==!1,Fe=(d.listStack[d.listStack.length-1]||0)+3;d.indentedCode=!1;var Ce=d.indentation;if(d.indentationDiff===null&&(d.indentationDiff=d.indentation,Me)){for(d.list=null;Ce<d.listStack[d.listStack.length-1];)d.listStack.pop(),d.listStack.length?d.indentation=d.listStack[d.listStack.length-1]:d.list=!1;d.list!==!1&&(d.indentationDiff=Ce-d.listStack[d.listStack.length-1])}var ve=!Te&&!xe&&!d.prevLine.header&&(!Me||!le)&&!d.prevLine.fencedCodeEnd,Oe=(d.list===!1||xe||Te)&&d.indentation<=Fe&&v.match(Y),qe=null;if(d.indentationDiff>=4&&(le||d.prevLine.fencedCodeEnd||d.prevLine.header||Te))return v.skipToEnd(),d.indentedCode=!0,k.code;if(v.eatSpace())return null;if(fe&&d.indentation<=Fe&&(qe=v.match(R))&&qe[1].length<=6)return d.quote=0,d.header=qe[1].length,d.thisLine.header=!0,_.highlightFormatting&&(d.formatting="header"),d.f=d.inline,P(d);if(d.indentation<=Fe&&v.eat(">"))return d.quote=fe?1:d.quote+1,_.highlightFormatting&&(d.formatting="quote"),v.eatSpace(),P(d);if(!Oe&&!d.setext&&fe&&d.indentation<=Fe&&(qe=v.match(ne))){var Ve=qe[1]?"ol":"ul";return d.indentation=Ce+v.current().length,d.list=!0,d.quote=0,d.listStack.push(d.indentation),d.em=!1,d.strong=!1,d.code=!1,d.strikethrough=!1,_.taskLists&&v.match(S,!1)&&(d.taskList=!0),d.f=d.inline,_.highlightFormatting&&(d.formatting=["list","list-"+Ve]),P(d)}else{if(fe&&d.indentation<=Fe&&(qe=v.match(ue,!0)))return d.quote=0,d.fencedEndRE=new RegExp(qe[1]+"+ *$"),d.localMode=_.fencedCodeBlockHighlighting&&Q(qe[2]||_.fencedCodeBlockDefaultMode),d.localMode&&(d.localState=b.startState(d.localMode)),d.f=d.block=J,_.highlightFormatting&&(d.formatting="code-block"),d.code=-1,P(d);if(d.setext||(!ve||!Me)&&!d.quote&&d.list===!1&&!d.code&&!Oe&&!O.test(v.string)&&(qe=v.lookAhead(1))&&(qe=qe.match(A)))return d.setext?(d.header=d.setext,d.setext=0,v.skipToEnd(),_.highlightFormatting&&(d.formatting="header")):(d.header=qe[0].charAt(0)=="="?1:2,d.setext=d.header),d.thisLine.header=!0,d.f=d.inline,P(d);if(Oe)return v.skipToEnd(),d.hr=!0,d.thisLine.hr=!0,k.hr;if(v.peek()==="[")return N(v,d,g)}return N(v,d,d.inline)}function W(v,d){var fe=te.token(v,d.htmlState);if(!oe){var Te=b.innerMode(te,d.htmlState);(Te.mode.name=="xml"&&Te.state.tagStart===null&&!Te.state.context&&Te.state.tokenize.isInText||d.md_inside&&v.current().indexOf(">")>-1)&&(d.f=F,d.block=p,d.htmlState=null)}return fe}function J(v,d){var fe=d.listStack[d.listStack.length-1]||0,Te=d.indentation<fe,le=fe+3;if(d.fencedEndRE&&d.indentation<=le&&(Te||v.match(d.fencedEndRE))){_.highlightFormatting&&(d.formatting="code-block");var xe;return Te||(xe=P(d)),d.localMode=d.localState=null,d.block=p,d.f=F,d.fencedEndRE=null,d.code=0,d.thisLine.fencedCodeEnd=!0,Te?z(v,d,d.block):xe}else return d.localMode?d.localMode.token(v,d.localState):(v.skipToEnd(),k.code)}function P(v){var d=[];if(v.formatting){d.push(k.formatting),typeof v.formatting=="string"&&(v.formatting=[v.formatting]);for(var fe=0;fe<v.formatting.length;fe++)d.push(k.formatting+"-"+v.formatting[fe]),v.formatting[fe]==="header"&&d.push(k.formatting+"-"+v.formatting[fe]+"-"+v.header),v.formatting[fe]==="quote"&&(!_.maxBlockquoteDepth||_.maxBlockquoteDepth>=v.quote?d.push(k.formatting+"-"+v.formatting[fe]+"-"+v.quote):d.push("error"))}if(v.taskOpen)return d.push("meta"),d.length?d.join(" "):null;if(v.taskClosed)return d.push("property"),d.length?d.join(" "):null;if(v.linkHref?d.push(k.linkHref,"url"):(v.strong&&d.push(k.strong),v.em&&d.push(k.em),v.strikethrough&&d.push(k.strikethrough),v.emoji&&d.push(k.emoji),v.linkText&&d.push(k.linkText),v.code&&d.push(k.code),v.image&&d.push(k.image),v.imageAltText&&d.push(k.imageAltText,"link"),v.imageMarker&&d.push(k.imageMarker)),v.header&&d.push(k.header,k.header+"-"+v.header),v.quote&&(d.push(k.quote),!_.maxBlockquoteDepth||_.maxBlockquoteDepth>=v.quote?d.push(k.quote+"-"+v.quote):d.push(k.quote+"-"+_.maxBlockquoteDepth)),v.list!==!1){var Te=(v.listStack.length-1)%3;Te?Te===1?d.push(k.list2):d.push(k.list3):d.push(k.list1)}return v.trailingSpaceNewLine?d.push("trailing-space-new-line"):v.trailingSpace&&d.push("trailing-space-"+(v.trailingSpace%2?"a":"b")),d.length?d.join(" "):null}function $(v,d){if(v.match(V,!0))return P(d)}function F(v,d){var fe=d.text(v,d);if(typeof fe<"u")return fe;if(d.list)return d.list=null,P(d);if(d.taskList){var Te=v.match(S,!0)[1]===" ";return Te?d.taskOpen=!0:d.taskClosed=!0,_.highlightFormatting&&(d.formatting="task"),d.taskList=!1,P(d)}if(d.taskOpen=!1,d.taskClosed=!1,d.header&&v.match(/^#+$/,!0))return _.highlightFormatting&&(d.formatting="header"),P(d);var le=v.next();if(d.linkTitle){d.linkTitle=!1;var xe=le;le==="("&&(xe=")"),xe=(xe+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Me="^\\s*(?:[^"+xe+"\\\\]+|\\\\\\\\|\\\\.)"+xe;if(v.match(new RegExp(Me),!0))return k.linkHref}if(le==="`"){var Fe=d.formatting;_.highlightFormatting&&(d.formatting="code"),v.eatWhile("`");var Ce=v.current().length;if(d.code==0&&(!d.quote||Ce==1))return d.code=Ce,P(d);if(Ce==d.code){var ve=P(d);return d.code=0,ve}else return d.formatting=Fe,P(d)}else if(d.code)return P(d);if(le==="\\"&&(v.next(),_.highlightFormatting)){var Oe=P(d),qe=k.formatting+"-escape";return Oe?Oe+" "+qe:qe}if(le==="!"&&v.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return d.imageMarker=!0,d.image=!0,_.highlightFormatting&&(d.formatting="image"),P(d);if(le==="["&&d.imageMarker&&v.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return d.imageMarker=!1,d.imageAltText=!0,_.highlightFormatting&&(d.formatting="image"),P(d);if(le==="]"&&d.imageAltText){_.highlightFormatting&&(d.formatting="image");var Oe=P(d);return d.imageAltText=!1,d.image=!1,d.inline=d.f=c,Oe}if(le==="["&&!d.image)return d.linkText&&v.match(/^.*?\]/)||(d.linkText=!0,_.highlightFormatting&&(d.formatting="link")),P(d);if(le==="]"&&d.linkText){_.highlightFormatting&&(d.formatting="link");var Oe=P(d);return d.linkText=!1,d.inline=d.f=v.match(/\(.*?\)| ?\[.*?\]/,!1)?c:F,Oe}if(le==="<"&&v.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){d.f=d.inline=G,_.highlightFormatting&&(d.formatting="link");var Oe=P(d);return Oe?Oe+=" ":Oe="",Oe+k.linkInline}if(le==="<"&&v.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){d.f=d.inline=G,_.highlightFormatting&&(d.formatting="link");var Oe=P(d);return Oe?Oe+=" ":Oe="",Oe+k.linkEmail}if(_.xml&&le==="<"&&v.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Ve=v.string.indexOf(">",v.pos);if(Ve!=-1){var dt=v.string.substring(v.start,Ve);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(dt)&&(d.md_inside=!0)}return v.backUp(1),d.htmlState=b.startState(te),z(v,d,W)}if(_.xml&&le==="<"&&v.match(/^\/\w*?>/))return d.md_inside=!1,"tag";if(le==="*"||le==="_"){for(var Pe=1,_e=v.pos==1?" ":v.string.charAt(v.pos-2);Pe<3&&v.eat(le);)Pe++;var Ue=v.peek()||" ",et=!/\s/.test(Ue)&&(!w.test(Ue)||/\s/.test(_e)||w.test(_e)),we=!/\s/.test(_e)&&(!w.test(_e)||/\s/.test(Ue)||w.test(Ue)),Ie=null,E=null;if(Pe%2&&(!d.em&&et&&(le==="*"||!we||w.test(_e))?Ie=!0:d.em==le&&we&&(le==="*"||!et||w.test(Ue))&&(Ie=!1)),Pe>1&&(!d.strong&&et&&(le==="*"||!we||w.test(_e))?E=!0:d.strong==le&&we&&(le==="*"||!et||w.test(Ue))&&(E=!1)),E!=null||Ie!=null){_.highlightFormatting&&(d.formatting=Ie==null?"strong":E==null?"em":"strong em"),Ie===!0&&(d.em=le),E===!0&&(d.strong=le);var ve=P(d);return Ie===!1&&(d.em=!1),E===!1&&(d.strong=!1),ve}}else if(le===" "&&(v.eat("*")||v.eat("_"))){if(v.peek()===" ")return P(d);v.backUp(1)}if(_.strikethrough){if(le==="~"&&v.eatWhile(le)){if(d.strikethrough){_.highlightFormatting&&(d.formatting="strikethrough");var ve=P(d);return d.strikethrough=!1,ve}else if(v.match(/^[^\s]/,!1))return d.strikethrough=!0,_.highlightFormatting&&(d.formatting="strikethrough"),P(d)}else if(le===" "&&v.match("~~",!0)){if(v.peek()===" ")return P(d);v.backUp(2)}}if(_.emoji&&le===":"&&v.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){d.emoji=!0,_.highlightFormatting&&(d.formatting="emoji");var ee=P(d);return d.emoji=!1,ee}return le===" "&&(v.match(/^ +$/,!1)?d.trailingSpace++:d.trailingSpace&&(d.trailingSpaceNewLine=!0)),P(d)}function G(v,d){var fe=v.next();if(fe===">"){d.f=d.inline=F,_.highlightFormatting&&(d.formatting="link");var Te=P(d);return Te?Te+=" ":Te="",Te+k.linkInline}return v.match(/^[^>]+/,!0),k.linkInline}function c(v,d){if(v.eatSpace())return null;var fe=v.next();return fe==="("||fe==="["?(d.f=d.inline=C(fe==="("?")":"]"),_.highlightFormatting&&(d.formatting="link-string"),d.linkHref=!0,P(d)):"error"}var T={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function C(v){return function(d,fe){var Te=d.next();if(Te===v){fe.f=fe.inline=F,_.highlightFormatting&&(fe.formatting="link-string");var le=P(fe);return fe.linkHref=!1,le}return d.match(T[v]),fe.linkHref=!0,P(fe)}}function g(v,d){return v.match(/^([^\]\\]|\\.)*\]:/,!1)?(d.f=y,v.next(),_.highlightFormatting&&(d.formatting="link"),d.linkText=!0,P(d)):N(v,d,F)}function y(v,d){if(v.match("]:",!0)){d.f=d.inline=j,_.highlightFormatting&&(d.formatting="link");var fe=P(d);return d.linkText=!1,fe}return v.match(/^([^\]\\]|\\.)+/,!0),k.linkText}function j(v,d){return v.eatSpace()?null:(v.match(/^[^\s]+/,!0),v.peek()===void 0?d.linkTitle=!0:v.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),d.f=d.inline=F,k.linkHref+" url")}var de={startState:function(){return{f:p,prevLine:{stream:null},thisLine:{stream:null},block:p,htmlState:null,indentation:0,inline:F,text:$,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(v){return{f:v.f,prevLine:v.prevLine,thisLine:v.thisLine,block:v.block,htmlState:v.htmlState&&b.copyState(te,v.htmlState),indentation:v.indentation,localMode:v.localMode,localState:v.localMode?b.copyState(v.localMode,v.localState):null,inline:v.inline,text:v.text,formatting:!1,linkText:v.linkText,linkTitle:v.linkTitle,linkHref:v.linkHref,code:v.code,em:v.em,strong:v.strong,strikethrough:v.strikethrough,emoji:v.emoji,header:v.header,setext:v.setext,hr:v.hr,taskList:v.taskList,list:v.list,listStack:v.listStack.slice(0),quote:v.quote,indentedCode:v.indentedCode,trailingSpace:v.trailingSpace,trailingSpaceNewLine:v.trailingSpaceNewLine,md_inside:v.md_inside,fencedEndRE:v.fencedEndRE}},token:function(v,d){if(d.formatting=!1,v!=d.thisLine.stream){if(d.header=0,d.hr=!1,v.match(/^\s*$/,!0))return q(d),null;if(d.prevLine=d.thisLine,d.thisLine={stream:v},d.taskList=!1,d.trailingSpace=0,d.trailingSpaceNewLine=!1,!d.localState&&(d.f=d.block,d.f!=W)){var fe=v.match(/^\s*/,!0)[0].replace(/\t/g,M).length;if(d.indentation=fe,d.indentationDiff=null,fe>0)return null}}return d.f(v,d)},innerMode:function(v){return v.block==W?{state:v.htmlState,mode:te}:v.localState?{state:v.localState,mode:v.localMode}:{state:v,mode:de}},indent:function(v,d,fe){return v.block==W&&te.indent?te.indent(v.htmlState,d,fe):v.localState&&v.localMode.indent?v.localMode.indent(v.localState,d,fe):b.Pass},blankLine:q,getType:P,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return de},"xml"),b.defineMIME("text/markdown","markdown"),b.defineMIME("text/x-markdown","markdown")})})()),Da.exports}nf();var Na={exports:{}},Ea;function of(){return Ea||(Ea=1,(function(ct,xt){(function(b){b(mt())})(function(b){b.defineOption("placeholder","",function(I,Y,ne){var S=ne&&ne!=b.Init;if(Y&&!S)I.on("blur",oe),I.on("change",Q),I.on("swapDoc",Q),b.on(I.getInputField(),"compositionupdate",I.state.placeholderCompose=function(){te(I)}),Q(I);else if(!Y&&S){I.off("blur",oe),I.off("change",Q),I.off("swapDoc",Q),b.off(I.getInputField(),"compositionupdate",I.state.placeholderCompose),pe(I);var R=I.getWrapperElement();R.className=R.className.replace(" CodeMirror-empty","")}Y&&!I.hasFocus()&&oe(I)});function pe(I){I.state.placeholder&&(I.state.placeholder.parentNode.removeChild(I.state.placeholder),I.state.placeholder=null)}function _(I){pe(I);var Y=I.state.placeholder=document.createElement("pre");Y.style.cssText="height: 0; overflow: visible",Y.style.direction=I.getOption("direction"),Y.className="CodeMirror-placeholder CodeMirror-line-like";var ne=I.getOption("placeholder");typeof ne=="string"&&(ne=document.createTextNode(ne)),Y.appendChild(ne),I.display.lineSpace.insertBefore(Y,I.display.lineSpace.firstChild)}function te(I){setTimeout(function(){var Y=!1;if(I.lineCount()==1){var ne=I.getInputField();Y=ne.nodeName=="TEXTAREA"?!I.getLine(0).length:!/[^\u200b]/.test(ne.querySelector(".CodeMirror-line").textContent)}Y?_(I):pe(I)},20)}function oe(I){k(I)&&_(I)}function Q(I){var Y=I.getWrapperElement(),ne=k(I);Y.className=Y.className.replace(" CodeMirror-empty","")+(ne?" CodeMirror-empty":""),ne?_(I):pe(I)}function k(I){return I.lineCount()===1&&I.getLine(0)===""}})})()),Na.exports}of();var Oa={exports:{}},Pa;function lf(){return Pa||(Pa=1,(function(ct,xt){(function(b){b(mt())})(function(b){b.defineSimpleMode=function(S,R){b.defineMode(S,function(A){return b.simpleMode(A,R)})},b.simpleMode=function(S,R){pe(R,"start");var A={},V=R.meta||{},ue=!1;for(var O in R)if(O!=V&&R.hasOwnProperty(O))for(var w=A[O]=[],M=R[O],N=0;N<M.length;N++){var z=M[N];w.push(new oe(z,R)),(z.indent||z.dedent)&&(ue=!0)}var X={startState:function(){return{state:"start",pending:null,local:null,localState:null,indent:ue?[]:null}},copyState:function(p){var W={state:p.state,pending:p.pending,local:p.local,localState:null,indent:p.indent&&p.indent.slice(0)};p.localState&&(W.localState=b.copyState(p.local.mode,p.localState)),p.stack&&(W.stack=p.stack.slice(0));for(var J=p.persistentStates;J;J=J.next)W.persistentStates={mode:J.mode,spec:J.spec,state:J.state==p.localState?W.localState:b.copyState(J.mode,J.state),next:W.persistentStates};return W},token:Q(A,S),innerMode:function(p){return p.local&&{mode:p.local.mode,state:p.localState}},indent:ne(A,V)};if(V)for(var q in V)V.hasOwnProperty(q)&&(X[q]=V[q]);return X};function pe(S,R){if(!S.hasOwnProperty(R))throw new Error("Undefined state "+R+" in simple mode")}function _(S,R){if(!S)return/(?:)/;var A="";return S instanceof RegExp?(S.ignoreCase&&(A="i"),S.unicode&&(A+="u"),S=S.source):S=String(S),new RegExp((R===!1?"":"^")+"(?:"+S+")",A)}function te(S){if(!S)return null;if(S.apply)return S;if(typeof S=="string")return S.replace(/\./g," ");for(var R=[],A=0;A<S.length;A++)R.push(S[A]&&S[A].replace(/\./g," "));return R}function oe(S,R){(S.next||S.push)&&pe(R,S.next||S.push),this.regex=_(S.regex),this.token=te(S.token),this.data=S}function Q(S,R){return function(A,V){if(V.pending){var ue=V.pending.shift();return V.pending.length==0&&(V.pending=null),A.pos+=ue.text.length,ue.token}if(V.local)if(V.local.end&&A.match(V.local.end)){var O=V.local.endToken||null;return V.local=V.localState=null,O}else{var O=V.local.mode.token(A,V.localState),w;return V.local.endScan&&(w=V.local.endScan.exec(A.current()))&&(A.pos=A.start+w.index),O}for(var M=S[V.state],N=0;N<M.length;N++){var z=M[N],X=(!z.data.sol||A.sol())&&A.match(z.regex);if(X){z.data.next?V.state=z.data.next:z.data.push?((V.stack||(V.stack=[])).push(V.state),V.state=z.data.push):z.data.pop&&V.stack&&V.stack.length&&(V.state=V.stack.pop()),z.data.mode&&I(R,V,z.data.mode,z.token),z.data.indent&&V.indent.push(A.indentation()+R.indentUnit),z.data.dedent&&V.indent.pop();var q=z.token;if(q&&q.apply&&(q=q(X)),X.length>2&&z.token&&typeof z.token!="string"){for(var p=2;p<X.length;p++)X[p]&&(V.pending||(V.pending=[])).push({text:X[p],token:z.token[p-1]});return A.backUp(X[0].length-(X[1]?X[1].length:0)),q[0]}else return q&&q.join?q[0]:q}}return A.next(),null}}function k(S,R){if(S===R)return!0;if(!S||typeof S!="object"||!R||typeof R!="object")return!1;var A=0;for(var V in S)if(S.hasOwnProperty(V)){if(!R.hasOwnProperty(V)||!k(S[V],R[V]))return!1;A++}for(var V in R)R.hasOwnProperty(V)&&A--;return A==0}function I(S,R,A,V){var ue;if(A.persistent)for(var O=R.persistentStates;O&&!ue;O=O.next)(A.spec?k(A.spec,O.spec):A.mode==O.mode)&&(ue=O);var w=ue?ue.mode:A.mode||b.getMode(S,A.spec),M=ue?ue.state:b.startState(w);A.persistent&&!ue&&(R.persistentStates={mode:w,spec:A.spec,state:M,next:R.persistentStates}),R.localState=M,R.local={mode:w,end:A.end&&_(A.end),endScan:A.end&&A.forceEnd!==!1&&_(A.end,!1),endToken:V&&V.join?V[V.length-1]:V}}function Y(S,R){for(var A=0;A<R.length;A++)if(R[A]===S)return!0}function ne(S,R){return function(A,V,ue){if(A.local&&A.local.mode.indent)return A.local.mode.indent(A.localState,V,ue);if(A.indent==null||A.local||R.dontIndentStates&&Y(A.state,R.dontIndentStates)>-1)return b.Pass;var O=A.indent.length-1,w=S[A.state];e:for(;;){for(var M=0;M<w.length;M++){var N=w[M];if(N.data.dedent&&N.data.dedentIfLineStart!==!1){var z=N.regex.exec(V);if(z&&z[0]){O--,(N.next||N.push)&&(w=S[N.next||N.push]),V=V.slice(z[0].length);continue e}}}break}return O<0?0:A.indent[O]}}})})()),Oa.exports}lf();var Ia={exports:{}},za;function af(){return za||(za=1,(function(ct,xt){(function(b){b(mt())})(function(b){var pe=/MSIE \d/.test(navigator.userAgent)&&(document.documentMode==null||document.documentMode<8),_=b.Pos,te={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function oe(S){return S&&S.bracketRegex||/[(){}[\]]/}function Q(S,R,A){var V=S.getLineHandle(R.line),ue=R.ch-1,O=A&&A.afterCursor;O==null&&(O=/(^| )cm-fat-cursor($| )/.test(S.getWrapperElement().className));var w=oe(A),M=!O&&ue>=0&&w.test(V.text.charAt(ue))&&te[V.text.charAt(ue)]||w.test(V.text.charAt(ue+1))&&te[V.text.charAt(++ue)];if(!M)return null;var N=M.charAt(1)==">"?1:-1;if(A&&A.strict&&N>0!=(ue==R.ch))return null;var z=S.getTokenTypeAt(_(R.line,ue+1)),X=k(S,_(R.line,ue+(N>0?1:0)),N,z,A);return X==null?null:{from:_(R.line,ue),to:X&&X.pos,match:X&&X.ch==M.charAt(0),forward:N>0}}function k(S,R,A,V,ue){for(var O=ue&&ue.maxScanLineLength||1e4,w=ue&&ue.maxScanLines||1e3,M=[],N=oe(ue),z=A>0?Math.min(R.line+w,S.lastLine()+1):Math.max(S.firstLine()-1,R.line-w),X=R.line;X!=z;X+=A){var q=S.getLine(X);if(q){var p=A>0?0:q.length-1,W=A>0?q.length:-1;if(!(q.length>O))for(X==R.line&&(p=R.ch-(A<0?1:0));p!=W;p+=A){var J=q.charAt(p);if(N.test(J)&&(V===void 0||(S.getTokenTypeAt(_(X,p+1))||"")==(V||""))){var P=te[J];if(P&&P.charAt(1)==">"==A>0)M.push(J);else if(M.length)M.pop();else return{pos:_(X,p),ch:J}}}}}return X-A==(A>0?S.lastLine():S.firstLine())?!1:null}function I(S,R,A){for(var V=S.state.matchBrackets.maxHighlightLineLength||1e3,ue=A&&A.highlightNonMatching,O=[],w=S.listSelections(),M=0;M<w.length;M++){var N=w[M].empty()&&Q(S,w[M].head,A);if(N&&(N.match||ue!==!1)&&S.getLine(N.from.line).length<=V){var z=N.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";O.push(S.markText(N.from,_(N.from.line,N.from.ch+1),{className:z})),N.to&&S.getLine(N.to.line).length<=V&&O.push(S.markText(N.to,_(N.to.line,N.to.ch+1),{className:z}))}}if(O.length){pe&&S.state.focused&&S.focus();var X=function(){S.operation(function(){for(var q=0;q<O.length;q++)O[q].clear()})};if(R)setTimeout(X,800);else return X}}function Y(S){S.operation(function(){S.state.matchBrackets.currentlyHighlighted&&(S.state.matchBrackets.currentlyHighlighted(),S.state.matchBrackets.currentlyHighlighted=null),S.state.matchBrackets.currentlyHighlighted=I(S,!1,S.state.matchBrackets)})}function ne(S){S.state.matchBrackets&&S.state.matchBrackets.currentlyHighlighted&&(S.state.matchBrackets.currentlyHighlighted(),S.state.matchBrackets.currentlyHighlighted=null)}b.defineOption("matchBrackets",!1,function(S,R,A){A&&A!=b.Init&&(S.off("cursorActivity",Y),S.off("focus",Y),S.off("blur",ne),ne(S)),R&&(S.state.matchBrackets=typeof R=="object"?R:{},S.on("cursorActivity",Y),S.on("focus",Y),S.on("blur",ne))}),b.defineExtension("matchBrackets",function(){I(this,!0)}),b.defineExtension("findMatchingBracket",function(S,R,A){return(A||typeof R=="boolean")&&(A?(A.strict=R,R=A):R=R?{strict:!0}:null),Q(this,S,R)}),b.defineExtension("scanForBracket",function(S,R,A,V){return k(this,S,R,A,V)})})})()),Ia.exports}af();var Ba={exports:{}},Ra;function sf(){return Ra||(Ra=1,(function(ct,xt){(function(b){b(mt())})(function(b){var pe={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},_=b.Pos;b.defineOption("autoCloseBrackets",!1,function(O,w,M){M&&M!=b.Init&&(O.removeKeyMap(oe),O.state.closeBrackets=null),w&&(Q(te(w,"pairs")),O.state.closeBrackets=w,O.addKeyMap(oe))});function te(O,w){return w=="pairs"&&typeof O=="string"?O:typeof O=="object"&&O[w]!=null?O[w]:pe[w]}var oe={Backspace:Y,Enter:ne};function Q(O){for(var w=0;w<O.length;w++){var M=O.charAt(w),N="'"+M+"'";oe[N]||(oe[N]=k(M))}}Q(pe.pairs+"`");function k(O){return function(w){return A(w,O)}}function I(O){var w=O.state.closeBrackets;if(!w||w.override)return w;var M=O.getModeAt(O.getCursor());return M.closeBrackets||w}function Y(O){var w=I(O);if(!w||O.getOption("disableInput"))return b.Pass;for(var M=te(w,"pairs"),N=O.listSelections(),z=0;z<N.length;z++){if(!N[z].empty())return b.Pass;var X=V(O,N[z].head);if(!X||M.indexOf(X)%2!=0)return b.Pass}for(var z=N.length-1;z>=0;z--){var q=N[z].head;O.replaceRange("",_(q.line,q.ch-1),_(q.line,q.ch+1),"+delete")}}function ne(O){var w=I(O),M=w&&te(w,"explode");if(!M||O.getOption("disableInput"))return b.Pass;for(var N=O.listSelections(),z=0;z<N.length;z++){if(!N[z].empty())return b.Pass;var X=V(O,N[z].head);if(!X||M.indexOf(X)%2!=0)return b.Pass}O.operation(function(){var q=O.lineSeparator()||`
|
|
25
|
+
`;O.replaceSelection(q+q,null),S(O,-1),N=O.listSelections();for(var p=0;p<N.length;p++){var W=N[p].head.line;O.indentLine(W,null,!0),O.indentLine(W+1,null,!0)}})}function S(O,w){for(var M=[],N=O.listSelections(),z=0,X=0;X<N.length;X++){var q=N[X];q.head==O.getCursor()&&(z=X);var p=q.head.ch||w>0?{line:q.head.line,ch:q.head.ch+w}:{line:q.head.line-1};M.push({anchor:p,head:p})}O.setSelections(M,z)}function R(O){var w=b.cmpPos(O.anchor,O.head)>0;return{anchor:new _(O.anchor.line,O.anchor.ch+(w?-1:1)),head:new _(O.head.line,O.head.ch+(w?1:-1))}}function A(O,w){var M=I(O);if(!M||O.getOption("disableInput"))return b.Pass;var N=te(M,"pairs"),z=N.indexOf(w);if(z==-1)return b.Pass;for(var X=te(M,"closeBefore"),q=te(M,"triples"),p=N.charAt(z+1)==w,W=O.listSelections(),J=z%2==0,P,$=0;$<W.length;$++){var F=W[$],G=F.head,c,T=O.getRange(G,_(G.line,G.ch+1));if(J&&!F.empty())c="surround";else if((p||!J)&&T==w)p&&ue(O,G)?c="both":q.indexOf(w)>=0&&O.getRange(G,_(G.line,G.ch+3))==w+w+w?c="skipThree":c="skip";else if(p&&G.ch>1&&q.indexOf(w)>=0&&O.getRange(_(G.line,G.ch-2),G)==w+w){if(G.ch>2&&/\bstring/.test(O.getTokenTypeAt(_(G.line,G.ch-2))))return b.Pass;c="addFour"}else if(p){var C=G.ch==0?" ":O.getRange(_(G.line,G.ch-1),G);if(!b.isWordChar(T)&&C!=w&&!b.isWordChar(C))c="both";else return b.Pass}else if(J&&(T.length===0||/\s/.test(T)||X.indexOf(T)>-1))c="both";else return b.Pass;if(!P)P=c;else if(P!=c)return b.Pass}var g=z%2?N.charAt(z-1):w,y=z%2?w:N.charAt(z+1);O.operation(function(){if(P=="skip")S(O,1);else if(P=="skipThree")S(O,3);else if(P=="surround"){for(var j=O.getSelections(),de=0;de<j.length;de++)j[de]=g+j[de]+y;O.replaceSelections(j,"around"),j=O.listSelections().slice();for(var de=0;de<j.length;de++)j[de]=R(j[de]);O.setSelections(j)}else P=="both"?(O.replaceSelection(g+y,null),O.triggerElectric(g+y),S(O,-1)):P=="addFour"&&(O.replaceSelection(g+g+g+g,"before"),S(O,1))})}function V(O,w){var M=O.getRange(_(w.line,w.ch-1),_(w.line,w.ch+1));return M.length==2?M:null}function ue(O,w){var M=O.getTokenAt(_(w.line,w.ch+1));return/\bstring/.test(M.type)&&M.start==w.ch&&(w.ch==0||!/\bstring/.test(O.getTokenTypeAt(w)))}})})()),Ba.exports}sf();var Wa={exports:{}},Ha={exports:{}},_a;function Ja(){return _a||(_a=1,(function(ct,xt){(function(b){b(mt())})(function(b){var pe=b.Pos;function _(w){var M=w.flags;return M??(w.ignoreCase?"i":"")+(w.global?"g":"")+(w.multiline?"m":"")}function te(w,M){for(var N=_(w),z=N,X=0;X<M.length;X++)z.indexOf(M.charAt(X))==-1&&(z+=M.charAt(X));return N==z?w:new RegExp(w.source,z)}function oe(w){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(w.source)}function Q(w,M,N){M=te(M,"g");for(var z=N.line,X=N.ch,q=w.lastLine();z<=q;z++,X=0){M.lastIndex=X;var p=w.getLine(z),W=M.exec(p);if(W)return{from:pe(z,W.index),to:pe(z,W.index+W[0].length),match:W}}}function k(w,M,N){if(!oe(M))return Q(w,M,N);M=te(M,"gm");for(var z,X=1,q=N.line,p=w.lastLine();q<=p;){for(var W=0;W<X&&!(q>p);W++){var J=w.getLine(q++);z=z==null?J:z+`
|
|
26
|
+
`+J}X=X*2,M.lastIndex=N.ch;var P=M.exec(z);if(P){var $=z.slice(0,P.index).split(`
|
|
27
|
+
`),F=P[0].split(`
|
|
28
|
+
`),G=N.line+$.length-1,c=$[$.length-1].length;return{from:pe(G,c),to:pe(G+F.length-1,F.length==1?c+F[0].length:F[F.length-1].length),match:P}}}}function I(w,M,N){for(var z,X=0;X<=w.length;){M.lastIndex=X;var q=M.exec(w);if(!q)break;var p=q.index+q[0].length;if(p>w.length-N)break;(!z||p>z.index+z[0].length)&&(z=q),X=q.index+1}return z}function Y(w,M,N){M=te(M,"g");for(var z=N.line,X=N.ch,q=w.firstLine();z>=q;z--,X=-1){var p=w.getLine(z),W=I(p,M,X<0?0:p.length-X);if(W)return{from:pe(z,W.index),to:pe(z,W.index+W[0].length),match:W}}}function ne(w,M,N){if(!oe(M))return Y(w,M,N);M=te(M,"gm");for(var z,X=1,q=w.getLine(N.line).length-N.ch,p=N.line,W=w.firstLine();p>=W;){for(var J=0;J<X&&p>=W;J++){var P=w.getLine(p--);z=z==null?P:P+`
|
|
29
|
+
`+z}X*=2;var $=I(z,M,q);if($){var F=z.slice(0,$.index).split(`
|
|
30
|
+
`),G=$[0].split(`
|
|
31
|
+
`),c=p+F.length,T=F[F.length-1].length;return{from:pe(c,T),to:pe(c+G.length-1,G.length==1?T+G[0].length:G[G.length-1].length),match:$}}}}var S,R;String.prototype.normalize?(S=function(w){return w.normalize("NFD").toLowerCase()},R=function(w){return w.normalize("NFD")}):(S=function(w){return w.toLowerCase()},R=function(w){return w});function A(w,M,N,z){if(w.length==M.length)return N;for(var X=0,q=N+Math.max(0,w.length-M.length);;){if(X==q)return X;var p=X+q>>1,W=z(w.slice(0,p)).length;if(W==N)return p;W>N?q=p:X=p+1}}function V(w,M,N,z){if(!M.length)return null;var X=z?S:R,q=X(M).split(/\r|\n\r?/);e:for(var p=N.line,W=N.ch,J=w.lastLine()+1-q.length;p<=J;p++,W=0){var P=w.getLine(p).slice(W),$=X(P);if(q.length==1){var F=$.indexOf(q[0]);if(F==-1)continue e;var N=A(P,$,F,X)+W;return{from:pe(p,A(P,$,F,X)+W),to:pe(p,A(P,$,F+q[0].length,X)+W)}}else{var G=$.length-q[0].length;if($.slice(G)!=q[0])continue e;for(var c=1;c<q.length-1;c++)if(X(w.getLine(p+c))!=q[c])continue e;var T=w.getLine(p+q.length-1),C=X(T),g=q[q.length-1];if(C.slice(0,g.length)!=g)continue e;return{from:pe(p,A(P,$,G,X)+W),to:pe(p+q.length-1,A(T,C,g.length,X))}}}}function ue(w,M,N,z){if(!M.length)return null;var X=z?S:R,q=X(M).split(/\r|\n\r?/);e:for(var p=N.line,W=N.ch,J=w.firstLine()-1+q.length;p>=J;p--,W=-1){var P=w.getLine(p);W>-1&&(P=P.slice(0,W));var $=X(P);if(q.length==1){var F=$.lastIndexOf(q[0]);if(F==-1)continue e;return{from:pe(p,A(P,$,F,X)),to:pe(p,A(P,$,F+q[0].length,X))}}else{var G=q[q.length-1];if($.slice(0,G.length)!=G)continue e;for(var c=1,N=p-q.length+1;c<q.length-1;c++)if(X(w.getLine(N+c))!=q[c])continue e;var T=w.getLine(p+1-q.length),C=X(T);if(C.slice(C.length-q[0].length)!=q[0])continue e;return{from:pe(p+1-q.length,A(T,C,T.length-q[0].length,X)),to:pe(p,A(P,$,G.length,X))}}}}function O(w,M,N,z){this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=w,N=N?w.clipPos(N):pe(0,0),this.pos={from:N,to:N};var X;typeof z=="object"?X=z.caseFold:(X=z,z=null),typeof M=="string"?(X==null&&(X=!1),this.matches=function(q,p){return(q?ue:V)(w,M,p,X)}):(M=te(M,"gm"),!z||z.multiline!==!1?this.matches=function(q,p){return(q?ne:k)(w,M,p)}:this.matches=function(q,p){return(q?Y:Q)(w,M,p)})}O.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(w){var M=this.doc.clipPos(w?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(M=pe(M.line,M.ch),w?(M.ch--,M.ch<0&&(M.line--,M.ch=(this.doc.getLine(M.line)||"").length)):(M.ch++,M.ch>(this.doc.getLine(M.line)||"").length&&(M.ch=0,M.line++)),b.cmpPos(M,this.doc.clipPos(M))!=0))return this.atOccurrence=!1;var N=this.matches(w,M);if(this.afterEmptyMatch=N&&b.cmpPos(N.from,N.to)==0,N)return this.pos=N,this.atOccurrence=!0,this.pos.match||!0;var z=pe(w?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:z,to:z},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(w,M){if(this.atOccurrence){var N=b.splitLines(w);this.doc.replaceRange(N,this.pos.from,this.pos.to,M),this.pos.to=pe(this.pos.from.line+N.length-1,N[N.length-1].length+(N.length==1?this.pos.from.ch:0))}}},b.defineExtension("getSearchCursor",function(w,M,N){return new O(this.doc,w,M,N)}),b.defineDocExtension("getSearchCursor",function(w,M,N){return new O(this,w,M,N)}),b.defineExtension("selectMatches",function(w,M){for(var N=[],z=this.getSearchCursor(w,this.getCursor("from"),M);z.findNext()&&!(b.cmpPos(z.to(),this.getCursor("to"))>0);)N.push({anchor:z.from(),head:z.to()});N.length&&this.setSelections(N,0)})})})()),Ha.exports}var qa={exports:{}},ja;function po(){return ja||(ja=1,(function(ct,xt){(function(b){b(mt())})(function(b){function pe(te,oe,Q){var k=te.getWrapperElement(),I;return I=k.appendChild(document.createElement("div")),Q?I.className="CodeMirror-dialog CodeMirror-dialog-bottom":I.className="CodeMirror-dialog CodeMirror-dialog-top",typeof oe=="string"?I.innerHTML=oe:I.appendChild(oe),b.addClass(k,"dialog-opened"),I}function _(te,oe){te.state.currentNotificationClose&&te.state.currentNotificationClose(),te.state.currentNotificationClose=oe}b.defineExtension("openDialog",function(te,oe,Q){Q||(Q={}),_(this,null);var k=pe(this,te,Q.bottom),I=!1,Y=this;function ne(A){if(typeof A=="string")S.value=A;else{if(I)return;I=!0,b.rmClass(k.parentNode,"dialog-opened"),k.parentNode.removeChild(k),Y.focus(),Q.onClose&&Q.onClose(k)}}var S=k.getElementsByTagName("input")[0],R;return S?(S.focus(),Q.value&&(S.value=Q.value,Q.selectValueOnOpen!==!1&&S.select()),Q.onInput&&b.on(S,"input",function(A){Q.onInput(A,S.value,ne)}),Q.onKeyUp&&b.on(S,"keyup",function(A){Q.onKeyUp(A,S.value,ne)}),b.on(S,"keydown",function(A){Q&&Q.onKeyDown&&Q.onKeyDown(A,S.value,ne)||((A.keyCode==27||Q.closeOnEnter!==!1&&A.keyCode==13)&&(S.blur(),b.e_stop(A),ne()),A.keyCode==13&&oe(S.value,A))}),Q.closeOnBlur!==!1&&b.on(k,"focusout",function(A){A.relatedTarget!==null&&ne()})):(R=k.getElementsByTagName("button")[0])&&(b.on(R,"click",function(){ne(),Y.focus()}),Q.closeOnBlur!==!1&&b.on(R,"blur",ne),R.focus()),ne}),b.defineExtension("openConfirm",function(te,oe,Q){_(this,null);var k=pe(this,te,Q&&Q.bottom),I=k.getElementsByTagName("button"),Y=!1,ne=this,S=1;function R(){Y||(Y=!0,b.rmClass(k.parentNode,"dialog-opened"),k.parentNode.removeChild(k),ne.focus())}I[0].focus();for(var A=0;A<I.length;++A){var V=I[A];(function(ue){b.on(V,"click",function(O){b.e_preventDefault(O),R(),ue&&ue(ne)})})(oe[A]),b.on(V,"blur",function(){--S,setTimeout(function(){S<=0&&R()},200)}),b.on(V,"focus",function(){++S})}}),b.defineExtension("openNotification",function(te,oe){_(this,ne);var Q=pe(this,te,oe&&oe.bottom),k=!1,I,Y=oe&&typeof oe.duration<"u"?oe.duration:5e3;function ne(){k||(k=!0,clearTimeout(I),b.rmClass(Q.parentNode,"dialog-opened"),Q.parentNode.removeChild(Q))}return b.on(Q,"click",function(S){b.e_preventDefault(S),ne()}),Y&&(I=setTimeout(ne,Y)),ne})})})()),qa.exports}var Ka;function uf(){return Ka||(Ka=1,(function(ct,xt){(function(b){b(mt(),Ja(),po())})(function(b){b.defineOption("search",{bottom:!1});function pe(p,W){return typeof p=="string"?p=new RegExp(p.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),W?"gi":"g"):p.global||(p=new RegExp(p.source,p.ignoreCase?"gi":"g")),{token:function(J){p.lastIndex=J.pos;var P=p.exec(J.string);if(P&&P.index==J.pos)return J.pos+=P[0].length||1,"searching";P?J.pos=P.index:J.skipToEnd()}}}function _(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function te(p){return p.state.search||(p.state.search=new _)}function oe(p){return typeof p=="string"&&p==p.toLowerCase()}function Q(p,W,J){return p.getSearchCursor(W,J,{caseFold:oe(W),multiline:!0})}function k(p,W,J,P,$){p.openDialog(W,P,{value:J,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){ue(p)},onKeyDown:$,bottom:p.options.search.bottom})}function I(p,W,J,P,$){p.openDialog?p.openDialog(W,$,{value:P,selectValueOnOpen:!0,bottom:p.options.search.bottom}):$(prompt(J,P))}function Y(p,W,J,P){p.openConfirm?p.openConfirm(W,P):confirm(J)&&P[0]()}function ne(p){return p.replace(/\\([nrt\\])/g,function(W,J){return J=="n"?`
|
|
32
|
+
`:J=="r"?"\r":J=="t"?" ":J=="\\"?"\\":W})}function S(p){var W=p.match(/^\/(.*)\/([a-z]*)$/);if(W)try{p=new RegExp(W[1],W[2].indexOf("i")==-1?"":"i")}catch{}else p=ne(p);return(typeof p=="string"?p=="":p.test(""))&&(p=/x^/),p}function R(p,W,J){W.queryText=J,W.query=S(J),p.removeOverlay(W.overlay,oe(W.query)),W.overlay=pe(W.query,oe(W.query)),p.addOverlay(W.overlay),p.showMatchesOnScrollbar&&(W.annotate&&(W.annotate.clear(),W.annotate=null),W.annotate=p.showMatchesOnScrollbar(W.query,oe(W.query)))}function A(p,W,J,P){var $=te(p);if($.query)return V(p,W);var F=p.getSelection()||$.lastQuery;if(F instanceof RegExp&&F.source=="x^"&&(F=null),J&&p.openDialog){var G=null,c=function(T,C){b.e_stop(C),T&&(T!=$.queryText&&(R(p,$,T),$.posFrom=$.posTo=p.getCursor()),G&&(G.style.opacity=1),V(p,C.shiftKey,function(g,y){var j;y.line<3&&document.querySelector&&(j=p.display.wrapper.querySelector(".CodeMirror-dialog"))&&j.getBoundingClientRect().bottom-4>p.cursorCoords(y,"window").top&&((G=j).style.opacity=.4)}))};k(p,w(p),F,c,function(T,C){var g=b.keyName(T),y=p.getOption("extraKeys"),j=y&&y[g]||b.keyMap[p.getOption("keyMap")][g];j=="findNext"||j=="findPrev"||j=="findPersistentNext"||j=="findPersistentPrev"?(b.e_stop(T),R(p,te(p),C),p.execCommand(j)):(j=="find"||j=="findPersistent")&&(b.e_stop(T),c(C,T))}),P&&F&&(R(p,$,F),V(p,W))}else I(p,w(p),"Search for:",F,function(T){T&&!$.query&&p.operation(function(){R(p,$,T),$.posFrom=$.posTo=p.getCursor(),V(p,W)})})}function V(p,W,J){p.operation(function(){var P=te(p),$=Q(p,P.query,W?P.posFrom:P.posTo);!$.find(W)&&($=Q(p,P.query,W?b.Pos(p.lastLine()):b.Pos(p.firstLine(),0)),!$.find(W))||(p.setSelection($.from(),$.to()),p.scrollIntoView({from:$.from(),to:$.to()},20),P.posFrom=$.from(),P.posTo=$.to(),J&&J($.from(),$.to()))})}function ue(p){p.operation(function(){var W=te(p);W.lastQuery=W.query,W.query&&(W.query=W.queryText=null,p.removeOverlay(W.overlay),W.annotate&&(W.annotate.clear(),W.annotate=null))})}function O(p,W){var J=p?document.createElement(p):document.createDocumentFragment();for(var P in W)J[P]=W[P];for(var $=2;$<arguments.length;$++){var F=arguments[$];J.appendChild(typeof F=="string"?document.createTextNode(F):F)}return J}function w(p){var W=O("label",{className:"CodeMirror-search-label"},p.phrase("Search:"),O("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field",id:"CodeMirror-search-field"}));return W.setAttribute("for","CodeMirror-search-field"),O("",null,W," ",O("span",{style:"color: #666",className:"CodeMirror-search-hint"},p.phrase("(Use /re/ syntax for regexp search)")))}function M(p){return O("",null," ",O("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",O("span",{style:"color: #666",className:"CodeMirror-search-hint"},p.phrase("(Use /re/ syntax for regexp search)")))}function N(p){return O("",null,O("span",{className:"CodeMirror-search-label"},p.phrase("With:"))," ",O("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"}))}function z(p){return O("",null,O("span",{className:"CodeMirror-search-label"},p.phrase("Replace?"))," ",O("button",{},p.phrase("Yes"))," ",O("button",{},p.phrase("No"))," ",O("button",{},p.phrase("All"))," ",O("button",{},p.phrase("Stop")))}function X(p,W,J){p.operation(function(){for(var P=Q(p,W);P.findNext();)if(typeof W!="string"){var $=p.getRange(P.from(),P.to()).match(W);P.replace(J.replace(/\$(\d)/g,function(F,G){return $[G]}))}else P.replace(J)})}function q(p,W){if(!p.getOption("readOnly")){var J=p.getSelection()||te(p).lastQuery,P=W?p.phrase("Replace all:"):p.phrase("Replace:"),$=O("",null,O("span",{className:"CodeMirror-search-label"},P),M(p));I(p,$,P,J,function(F){F&&(F=S(F),I(p,N(p),p.phrase("Replace with:"),"",function(G){if(G=ne(G),W)X(p,F,G);else{ue(p);var c=Q(p,F,p.getCursor("from")),T=function(){var g=c.from(),y;!(y=c.findNext())&&(c=Q(p,F),!(y=c.findNext())||g&&c.from().line==g.line&&c.from().ch==g.ch)||(p.setSelection(c.from(),c.to()),p.scrollIntoView({from:c.from(),to:c.to()}),Y(p,z(p),p.phrase("Replace?"),[function(){C(y)},T,function(){X(p,F,G)}]))},C=function(g){c.replace(typeof F=="string"?G:G.replace(/\$(\d)/g,function(y,j){return g[j]})),T()};T()}}))})}}b.commands.find=function(p){ue(p),A(p)},b.commands.findPersistent=function(p){ue(p),A(p,!1,!0)},b.commands.findPersistentNext=function(p){A(p,!1,!0,!0)},b.commands.findPersistentPrev=function(p){A(p,!0,!0,!0)},b.commands.findNext=A,b.commands.findPrev=function(p){A(p,!0)},b.commands.clearSearch=ue,b.commands.replace=q,b.commands.replaceAll=function(p){q(p,!0)}})})()),Wa.exports}uf();Ja();var Ua={exports:{}},Ga;function ff(){return Ga||(Ga=1,(function(ct,xt){(function(b){b(mt(),po())})(function(b){b.defineOption("search",{bottom:!1});function pe(oe,Q,k,I,Y){oe.openDialog?oe.openDialog(Q,Y,{value:I,selectValueOnOpen:!0,bottom:oe.options.search.bottom}):Y(prompt(k,I))}function _(oe){return oe.phrase("Jump to line:")+' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">'+oe.phrase("(Use line:column or scroll% syntax)")+"</span>"}function te(oe,Q){var k=Number(Q);return/^[-+]/.test(Q)?oe.getCursor().line+k:k-1}b.commands.jumpToLine=function(oe){var Q=oe.getCursor();pe(oe,_(oe),oe.phrase("Jump to line:"),Q.line+1+":"+Q.ch,function(k){if(k){var I;if(I=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(k))oe.setCursor(te(oe,I[1]),Number(I[2]));else if(I=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(k)){var Y=Math.round(oe.lineCount()*Number(I[1])/100);/^[-+]/.test(I[1])&&(Y=Q.line+Y+1),oe.setCursor(Y-1,Q.ch)}else(I=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(k))&&oe.setCursor(te(oe,I[1]),Q.ch)}})},b.keyMap.default["Alt-G"]="jumpToLine"})})()),Ua.exports}ff();po();export{df as default};
|