From ae5b182ac1afae040ba2dad119fe51c7336c7733 Mon Sep 17 00:00:00 2001 From: Mo Date: Mon, 7 Mar 2022 10:34:23 -0600 Subject: [PATCH 01/12] feat: snjs with auto integrity resolution (#912) --- .../AccountMenu/GeneralAccountMenu.tsx | 8 +- .../components/ApplicationView.tsx | 2 +- app/assets/javascripts/components/Footer.tsx | 6 +- .../components/NoteView/NoteView.tsx | 4 +- .../changeEditor/ChangeEditorMenu.tsx | 2 +- .../components/SyncResolutionMenu.tsx | 142 ++---------------- .../preferences/panes/Extensions.tsx | 2 +- .../preferences/panes/account/Sync.tsx | 10 +- .../ui_models/app_state/app_state.ts | 2 +- .../ui_models/app_state/note_tags_state.ts | 4 +- .../ui_models/app_state/notes_state.ts | 10 +- .../ui_models/app_state/tags_state.ts | 6 +- package.json | 10 +- yarn.lock | 69 ++++----- 14 files changed, 78 insertions(+), 199 deletions(-) diff --git a/app/assets/javascripts/components/AccountMenu/GeneralAccountMenu.tsx b/app/assets/javascripts/components/AccountMenu/GeneralAccountMenu.tsx index 706b85e3c..526ddf8d9 100644 --- a/app/assets/javascripts/components/AccountMenu/GeneralAccountMenu.tsx +++ b/app/assets/javascripts/components/AccountMenu/GeneralAccountMenu.tsx @@ -24,23 +24,23 @@ export const GeneralAccountMenu: FunctionComponent = observer( ({ application, appState, setMenuPane, closeMenu }) => { const [isSyncingInProgress, setIsSyncingInProgress] = useState(false); const [lastSyncDate, setLastSyncDate] = useState( - formatLastSyncDate(application.getLastSyncDate() as Date) + formatLastSyncDate(application.sync.getLastSyncDate() as Date) ); const doSynchronization = async () => { setIsSyncingInProgress(true); - application + application.sync .sync({ queueStrategy: SyncQueueStrategy.ForceSpawnNew, checkIntegrity: true, }) .then((res) => { - if (res && res.error) { + if (res && (res as any).error) { throw new Error(); } else { setLastSyncDate( - formatLastSyncDate(application.getLastSyncDate() as Date) + formatLastSyncDate(application.sync.getLastSyncDate() as Date) ); } }) diff --git a/app/assets/javascripts/components/ApplicationView.tsx b/app/assets/javascripts/components/ApplicationView.tsx index 71b467ed3..2cfc18f39 100644 --- a/app/assets/javascripts/components/ApplicationView.tsx +++ b/app/assets/javascripts/components/ApplicationView.tsx @@ -145,7 +145,7 @@ export class ApplicationView extends PureComponent { this.setState({ appClass }); } else if (eventName === AppStateEvent.WindowDidFocus) { if (!(await this.application.isLocked())) { - this.application.sync(); + this.application.sync.sync(); } } } diff --git a/app/assets/javascripts/components/Footer.tsx b/app/assets/javascripts/components/Footer.tsx index d04d7a194..b96437a79 100644 --- a/app/assets/javascripts/components/Footer.tsx +++ b/app/assets/javascripts/components/Footer.tsx @@ -256,7 +256,7 @@ export class Footer extends PureComponent { updateSyncStatus() { const statusManager = this.application.getStatusManager(); - const syncStatus = this.application.getSyncStatus(); + const syncStatus = this.application.sync.getSyncStatus(); const stats = syncStatus.getStats(); if (syncStatus.hasError()) { statusManager.setMessage('Unable to Sync'); @@ -290,7 +290,7 @@ export class Footer extends PureComponent { updateLocalDataStatus() { const statusManager = this.application.getStatusManager(); - const syncStatus = this.application.getSyncStatus(); + const syncStatus = this.application.sync.getSyncStatus(); const stats = syncStatus.getStats(); const encryption = this.application.isEncryptionAvailable(); if (stats.localDataDone) { @@ -312,7 +312,7 @@ export class Footer extends PureComponent { findErrors() { this.setState({ - hasError: this.application.getSyncStatus().hasError(), + hasError: this.application.sync.getSyncStatus().hasError(), }); } diff --git a/app/assets/javascripts/components/NoteView/NoteView.tsx b/app/assets/javascripts/components/NoteView/NoteView.tsx index 49e881e45..4de1ad6a9 100644 --- a/app/assets/javascripts/components/NoteView/NoteView.tsx +++ b/app/assets/javascripts/components/NoteView/NoteView.tsx @@ -681,7 +681,7 @@ export class NoteView extends PureComponent { if (left !== undefined && left !== null) { await this.application.setPreference(PrefKey.EditorLeft, left); } - this.application.sync(); + this.application.sync.sync(); }; async reloadSpellcheck() { @@ -797,7 +797,7 @@ export class NoteView extends PureComponent { } else { await this.disassociateComponentWithCurrentNote(component); } - this.application.sync(); + this.application.sync.sync(); }; async disassociateComponentWithCurrentNote(component: SNComponent) { diff --git a/app/assets/javascripts/components/NotesOptions/changeEditor/ChangeEditorMenu.tsx b/app/assets/javascripts/components/NotesOptions/changeEditor/ChangeEditorMenu.tsx index 7ca59b382..fad58fbae 100644 --- a/app/assets/javascripts/components/NotesOptions/changeEditor/ChangeEditorMenu.tsx +++ b/app/assets/javascripts/components/NotesOptions/changeEditor/ChangeEditorMenu.tsx @@ -153,7 +153,7 @@ export const ChangeEditorMenu: FunctionComponent = ({ await application.runTransactionalMutations(transactions); /** Dirtying can happen above */ - application.sync(); + application.sync.sync(); setCurrentEditor(application.componentManager.editorForNote(note)); }; diff --git a/app/assets/javascripts/components/SyncResolutionMenu.tsx b/app/assets/javascripts/components/SyncResolutionMenu.tsx index 30a4eaaa4..d2a058e82 100644 --- a/app/assets/javascripts/components/SyncResolutionMenu.tsx +++ b/app/assets/javascripts/components/SyncResolutionMenu.tsx @@ -1,6 +1,5 @@ import { WebApplication } from '@/ui_models/application'; import { PureComponent } from './Abstract/PureComponent'; -import { Fragment } from 'preact'; type Props = { application: WebApplication; @@ -8,43 +7,13 @@ type Props = { }; export class SyncResolutionMenu extends PureComponent { - private status: Partial<{ - backupFinished: boolean; - resolving: boolean; - attemptedResolution: boolean; - success: boolean; - fail: boolean; - }> = {}; - constructor(props: Props) { super(props, props.application); } - downloadBackup(encrypted: boolean) { - this.props.application.getArchiveService().downloadBackup(encrypted); - this.status.backupFinished = true; - } - - skipBackup() { - this.status.backupFinished = true; - } - - async performSyncResolution() { - this.status.resolving = true; - await this.props.application.resolveOutOfSync(); - - this.status.resolving = false; - this.status.attemptedResolution = true; - if (this.props.application.isOutOfSync()) { - this.status.fail = true; - } else { - this.status.success = true; - } - } - - close() { + close = () => { this.props.close(); - } + }; render() { return ( @@ -59,13 +28,15 @@ export class SyncResolutionMenu extends PureComponent {
- We've detected that the data on the server may not match the - data in the current application session. + We've detected that the data in the current application session + may not match the data on the server. An attempt was made to + auto-resolve the issue, but it was unable to reconcile the + differences.
- Option 1 — Restart App: + Option 1 — Restart Application:
Quit the application and re-open it. Sometimes, this may @@ -76,108 +47,15 @@ export class SyncResolutionMenu extends PureComponent {
- Option 2 (recommended) — Sign Out: + Option 2 — Sign Out and Back In:
Sign out of your account, then sign back in. This will - ensure your data is consistent with the server. -
- Be sure to download a backup of your data before doing so. -
-
-
-
- - Option 3 — Sync Resolution: - -
- We can attempt to reconcile changes by downloading all data - from the server. No existing data will be overwritten. If - the local contents of an item differ from what the server - has, a conflicted copy will be created. + ensure your data is consistent with the server. Be sure to + download a backup of your data before doing so.
- {!this.status.backupFinished && ( - -
- Please download a backup before we attempt to perform a full - account sync resolution. -
-
-
- - - -
-
-
- )} - - {this.status.backupFinished && ( -
- {!this.status.resolving && !this.status.attemptedResolution && ( -
- -
- )} - {this.status.resolving && ( -
-
-
-
- Attempting sync resolution... -
-
-
- )} - {this.status.fail && ( -
-
- Sync Resolution Failed -
-
- We attempted to reconcile local content and server - content, but were unable to do so. At this point, we - recommend signing out of your account and signing back - in. You may wish to download a data backup before doing - so. -
-
- )} - {this.status.success && ( -
-
- Sync Resolution Success -
-
- Your local data is now in sync with the server. You may - close this window. -
-
- )} -
- )}
diff --git a/app/assets/javascripts/preferences/panes/Extensions.tsx b/app/assets/javascripts/preferences/panes/Extensions.tsx index b70f06e73..459bb7a22 100644 --- a/app/assets/javascripts/preferences/panes/Extensions.tsx +++ b/app/assets/javascripts/preferences/panes/Extensions.tsx @@ -74,7 +74,7 @@ export const Extensions: FunctionComponent<{ const confirmExtension = async () => { await application.insertItem(confirmableExtension as SNComponent); - application.sync(); + application.sync.sync(); setExtensions(loadExtensions(application)); }; diff --git a/app/assets/javascripts/preferences/panes/account/Sync.tsx b/app/assets/javascripts/preferences/panes/account/Sync.tsx index b7d6147bd..3e51f0383 100644 --- a/app/assets/javascripts/preferences/panes/account/Sync.tsx +++ b/app/assets/javascripts/preferences/panes/account/Sync.tsx @@ -24,22 +24,22 @@ export const Sync: FunctionComponent = observer( ({ application }: Props) => { const [isSyncingInProgress, setIsSyncingInProgress] = useState(false); const [lastSyncDate, setLastSyncDate] = useState( - formatLastSyncDate(application.getLastSyncDate() as Date) + formatLastSyncDate(application.sync.getLastSyncDate() as Date) ); const doSynchronization = async () => { setIsSyncingInProgress(true); - const response = await application.sync({ + const response = await application.sync.sync({ queueStrategy: SyncQueueStrategy.ForceSpawnNew, checkIntegrity: true, }); setIsSyncingInProgress(false); - if (response && response.error) { - application.alertService!.alert(STRING_GENERIC_SYNC_ERROR); + if (response && (response as any).error) { + application.alertService.alert(STRING_GENERIC_SYNC_ERROR); } else { setLastSyncDate( - formatLastSyncDate(application.getLastSyncDate() as Date) + formatLastSyncDate(application.sync.getLastSyncDate() as Date) ); } }; diff --git a/app/assets/javascripts/ui_models/app_state/app_state.ts b/app/assets/javascripts/ui_models/app_state/app_state.ts index 2e86701e9..ecd81c7af 100644 --- a/app/assets/javascripts/ui_models/app_state/app_state.ts +++ b/app/assets/javascripts/ui_models/app_state/app_state.ts @@ -381,7 +381,7 @@ export class AppState { } break; case ApplicationEvent.SyncStatusChanged: - this.sync.update(this.application.getSyncStatus()); + this.sync.update(this.application.sync.getSyncStatus()); break; } }); diff --git a/app/assets/javascripts/ui_models/app_state/note_tags_state.ts b/app/assets/javascripts/ui_models/app_state/note_tags_state.ts index 4ae9200b4..25677e602 100644 --- a/app/assets/javascripts/ui_models/app_state/note_tags_state.ts +++ b/app/assets/javascripts/ui_models/app_state/note_tags_state.ts @@ -181,7 +181,7 @@ export class NoteTagsState { if (activeNote) { await this.application.addTagHierarchyToNote(activeNote, tag); - this.application.sync(); + this.application.sync.sync(); this.reloadTags(); } } @@ -192,7 +192,7 @@ export class NoteTagsState { await this.application.changeItem(tag.uuid, (mutator) => { mutator.removeItemAsRelationship(activeNote); }); - this.application.sync(); + this.application.sync.sync(); this.reloadTags(); } } diff --git a/app/assets/javascripts/ui_models/app_state/notes_state.ts b/app/assets/javascripts/ui_models/app_state/notes_state.ts index 93f10ecea..47ded4d4a 100644 --- a/app/assets/javascripts/ui_models/app_state/notes_state.ts +++ b/app/assets/javascripts/ui_models/app_state/notes_state.ts @@ -265,7 +265,7 @@ export class NotesState { mutate, false ); - this.application.sync(); + this.application.sync.sync(); } setHideSelectedNotePreviews(hide: boolean): void { @@ -403,7 +403,7 @@ export class NotesState { }, false ); - this.application.sync(); + this.application.sync.sync(); } async addTagToSelectedNotes(tag: SNTag): Promise { @@ -419,7 +419,7 @@ export class NotesState { }); }) ); - this.application.sync(); + this.application.sync.sync(); } async removeTagFromSelectedNotes(tag: SNTag): Promise { @@ -429,7 +429,7 @@ export class NotesState { mutator.removeItemAsRelationship(note); } }); - this.application.sync(); + this.application.sync.sync(); } isTagInSelectedNotes(tag: SNTag): boolean { @@ -453,7 +453,7 @@ export class NotesState { }) ) { this.application.emptyTrash(); - this.application.sync(); + this.application.sync.sync(); } } diff --git a/app/assets/javascripts/ui_models/app_state/tags_state.ts b/app/assets/javascripts/ui_models/app_state/tags_state.ts index 05dac66bb..c8d4be798 100644 --- a/app/assets/javascripts/ui_models/app_state/tags_state.ts +++ b/app/assets/javascripts/ui_models/app_state/tags_state.ts @@ -208,7 +208,7 @@ export class TagsState { this.assignParent(createdTag.uuid, parent.uuid); - this.application.sync(); + this.application.sync.sync(); runInAction(() => { this.selected = createdTag as SNTag; @@ -364,7 +364,7 @@ export class TagsState { await this.application.setTagParent(futureParent, tag); } - await this.application.sync(); + await this.application.sync.sync(); } get rootTags(): SNTag[] { @@ -507,7 +507,7 @@ export class TagsState { } const insertedTag = await this.application.createTagOrSmartView(newTitle); - this.application.sync(); + this.application.sync.sync(); runInAction(() => { this.selected = insertedTag as SNTag; }); diff --git a/package.json b/package.json index b591d8189..0fbf27403 100644 --- a/package.json +++ b/package.json @@ -27,8 +27,8 @@ "@babel/preset-typescript": "^7.16.7", "@reach/disclosure": "^0.16.2", "@reach/visually-hidden": "^0.16.0", - "@standardnotes/responses": "^1.1.7", - "@standardnotes/services": "^1.4.0", + "@standardnotes/responses": "^1.2.0", + "@standardnotes/services": "^1.5.0", "@standardnotes/stylekit": "5.14.0", "@svgr/webpack": "^6.2.1", "@types/jest": "^27.4.1", @@ -80,13 +80,13 @@ "@reach/tooltip": "^0.16.2", "@standardnotes/components": "1.7.9", "@standardnotes/features": "1.34.1", - "@standardnotes/settings": "^1.11.5", + "@standardnotes/settings": "^1.12.0", "@standardnotes/sncrypto-web": "1.7.3", - "@standardnotes/snjs": "2.73.2", + "@standardnotes/snjs": "2.76.0", "mobx": "^6.4.2", "mobx-react-lite": "^3.3.0", "preact": "^10.6.6", - "qrcode.react": "^1.0.1", + "qrcode.react": "^2.0.0", "react-dnd": "^15.1.1", "react-dnd-html5-backend": "^15.1.2", "react-dnd-touch-backend": "^15.1.1" diff --git a/yarn.lock b/yarn.lock index 399002bf2..d3f7531ab 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2331,10 +2331,10 @@ resolved "https://registry.yarnpkg.com/@standardnotes/components/-/components-1.7.9.tgz#41e5fdbcee250b9b3c18045dad8998c6f668307b" integrity sha512-/+Paw6ry/IS9ldYUM/lgC4O6qwl1fukWvNw65IMKyB9LMY3+xTh/I2BfnWynP117pVPxtu3/2+FBEnx04KvQwg== -"@standardnotes/domain-events@^2.23.21": - version "2.23.21" - resolved "https://registry.yarnpkg.com/@standardnotes/domain-events/-/domain-events-2.23.21.tgz#bbf752ee7a0fd08b9fb675e81b46d3c10bbf89e9" - integrity sha512-YPpwy+QrDziBOpjt5cOIZwY47fOddN3038+NTRSqxi4h/D8hU+U5O8dGl2XktENEq9DqVJ78OVmWBjkA2FlsEQ== +"@standardnotes/domain-events@^2.23.22": + version "2.23.22" + resolved "https://registry.yarnpkg.com/@standardnotes/domain-events/-/domain-events-2.23.22.tgz#eb246cc3d8e69af7014678f5aac34fa1d7b494a0" + integrity sha512-mtw1nFZ/laiMisjTNBXgCsu6RLG/zkW4VtvnKjodG2TEJV3zPxFALGRUnsIlSlwt3YdClzg073sKHtUn4s+sAw== dependencies: "@standardnotes/auth" "^3.17.3" "@standardnotes/features" "^1.34.1" @@ -2347,39 +2347,40 @@ "@standardnotes/auth" "^3.17.3" "@standardnotes/common" "^1.15.3" -"@standardnotes/payloads@^1.3.2": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@standardnotes/payloads/-/payloads-1.3.2.tgz#3255abf6e2a2385c73e7998705066b828e5a74e0" - integrity sha512-SnDqdQXyEWett/Y33crvNnDGwv4BfCkoHId99fLd+UL5uTgXpuFgkd/AVHg+mOT5xC3+KAR8zdUCmQSXTRuysg== +"@standardnotes/payloads@^1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@standardnotes/payloads/-/payloads-1.4.0.tgz#e1a5415708c9d462c4f5f4824f7effd7e9d7f791" + integrity sha512-gAOj3p9KPsQggZ2SjeMjh4XTkTy8ntUYD23kYKbLA/Z7ArCCp8LnZZHASII2kEznaK+vrUAqlSM2/oKwQlohDA== dependencies: "@standardnotes/applications" "^1.1.3" "@standardnotes/common" "^1.15.3" "@standardnotes/features" "^1.34.1" "@standardnotes/utils" "^1.2.3" -"@standardnotes/responses@^1.1.7": - version "1.1.7" - resolved "https://registry.yarnpkg.com/@standardnotes/responses/-/responses-1.1.7.tgz#ab982f94693f2e1f967809bdb5e3863182770b14" - integrity sha512-1q8+eGjvttleesciHAOTe6u478W3UpEy+0StT8ZL3miFWzIyCLXJmnxNbYfYCm6oZ+t2rwhW+AzmnMRhG2cOUA== +"@standardnotes/responses@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@standardnotes/responses/-/responses-1.2.0.tgz#fe295b31751dbc692bb65c8e162972127fb990b2" + integrity sha512-YuVJQlB4ipdqAlAtD0xPhbHSR38fPzcRbSkntaCadHeAZl7WAdDDf/7pxTCDwhXN8Hls9OXlrq+WNbhorpe0tw== dependencies: "@standardnotes/auth" "^3.17.3" "@standardnotes/common" "^1.15.3" "@standardnotes/features" "^1.34.1" - "@standardnotes/payloads" "^1.3.2" + "@standardnotes/payloads" "^1.4.0" -"@standardnotes/services@^1.4.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@standardnotes/services/-/services-1.4.0.tgz#776ee5d022e4512844af1a284a2e90f599217218" - integrity sha512-wO0LQ+qMG0bfH0HNPulsO8nZ2Z1Y84NLP0fZdMdtqiuaCi1GrM/PUlcL/fpXCJKNeTKoYa8Dh4PfF8DOjalKXg== +"@standardnotes/services@^1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@standardnotes/services/-/services-1.5.0.tgz#ab71393d947bf52a7fb682d8bbcc190acef8fe97" + integrity sha512-vZ7NmV3SVdt5UQDCJ+OsoGtMFr0wsmHBdXpyb8s4rRnR4PgmJsrhuGXEu0t23EyLilL+Yb6WtkfJQhXeQsiT9w== dependencies: "@standardnotes/applications" "^1.1.3" "@standardnotes/common" "^1.15.3" + "@standardnotes/responses" "^1.2.0" "@standardnotes/utils" "^1.2.3" -"@standardnotes/settings@^1.11.5": - version "1.11.5" - resolved "https://registry.yarnpkg.com/@standardnotes/settings/-/settings-1.11.5.tgz#792bf3e0505065486f521b2f19c2bf1081b8fa5e" - integrity sha512-n6StAS3nBgs7Lia5mOt3+H4Xd6hatCcHFx83paFq9kdI1cKbqn7oFF4g/rUbWPy4nsx+96zBehB6EhsJ2MGzyQ== +"@standardnotes/settings@^1.12.0": + version "1.12.0" + resolved "https://registry.yarnpkg.com/@standardnotes/settings/-/settings-1.12.0.tgz#43f3dd7f015f726b1ed88a48fcc3737899116cd5" + integrity sha512-w6S5TT7KRpvUb+JsXZ7ucWPjlWRtpKQdsyT7cLs66ynKRXxUn40hf4kA8T9FhuLAKbG+wIYDrAZl3FRk+HvDWQ== "@standardnotes/sncrypto-common@^1.7.3": version "1.7.3" @@ -2395,20 +2396,20 @@ buffer "^6.0.3" libsodium-wrappers "^0.7.9" -"@standardnotes/snjs@2.73.2": - version "2.73.2" - resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.73.2.tgz#5361d73c861b990d06821d5a822dcb0893830a43" - integrity sha512-oGPZmzX+tNWQFxmvrQRtsqlofbW25YUOapyEPN8oVgfwV98r8EVzpUGXHWkog3ZW6oO3aO22Rhtk0D92d0CqtQ== +"@standardnotes/snjs@2.76.0": + version "2.76.0" + resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.76.0.tgz#61cfa03bea5e624529b7bbdd67646b4184ea30b3" + integrity sha512-SWSCMbDsJhdxNpHFHdK60iqaAsgvozvX8pgcAekko+yPlw3kz5Ucp+wwQbiznQRwrxOZPPrG/1NkJa1U/wWcdA== dependencies: "@standardnotes/applications" "^1.1.3" "@standardnotes/auth" "^3.17.3" "@standardnotes/common" "^1.15.3" - "@standardnotes/domain-events" "^2.23.21" + "@standardnotes/domain-events" "^2.23.22" "@standardnotes/features" "^1.34.1" - "@standardnotes/payloads" "^1.3.2" - "@standardnotes/responses" "^1.1.7" - "@standardnotes/services" "^1.4.0" - "@standardnotes/settings" "^1.11.5" + "@standardnotes/payloads" "^1.4.0" + "@standardnotes/responses" "^1.2.0" + "@standardnotes/services" "^1.5.0" + "@standardnotes/settings" "^1.12.0" "@standardnotes/sncrypto-common" "^1.7.3" "@standardnotes/utils" "^1.2.3" @@ -8002,10 +8003,10 @@ qr.js@0.0.0: resolved "https://registry.yarnpkg.com/qr.js/-/qr.js-0.0.0.tgz#cace86386f59a0db8050fa90d9b6b0e88a1e364f" integrity sha1-ys6GOG9ZoNuAUPqQ2baw6IoeNk8= -qrcode.react@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/qrcode.react/-/qrcode.react-1.0.1.tgz#2834bb50e5e275ffe5af6906eff15391fe9e38a5" - integrity sha512-8d3Tackk8IRLXTo67Y+c1rpaiXjoz/Dd2HpcMdW//62/x8J1Nbho14Kh8x974t9prsLHN6XqVgcnRiBGFptQmg== +qrcode.react@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/qrcode.react/-/qrcode.react-2.0.0.tgz#20b738eddcfc6958673bbbd1a0c5568ee5c399f5" + integrity sha512-1CCzwC4KHYCzOLb7M+lKYqHzDMVsppKJBhrU1ZDCuJRHKiD99LeDHOkuvUKCRvnJgDzp9SnB6/WNA7qp6I7ozA== dependencies: loose-envify "^1.4.0" prop-types "^15.6.0" From 6d64889aad4172c1fdc9508a93787eb2785b688a Mon Sep 17 00:00:00 2001 From: Mo Date: Tue, 8 Mar 2022 09:07:57 -0600 Subject: [PATCH 02/12] chore: upgrade deps --- app/assets/javascripts/app.tsx | 4 - app/assets/javascripts/startApplication.ts | 1 - .../javascripts/ui_models/application.ts | 2 - .../ui_models/application_group.ts | 2 - package.json | 16 +- yarn.lock | 178 +++++++++--------- 6 files changed, 97 insertions(+), 106 deletions(-) diff --git a/app/assets/javascripts/app.tsx b/app/assets/javascripts/app.tsx index 07beabdc2..b8848a528 100644 --- a/app/assets/javascripts/app.tsx +++ b/app/assets/javascripts/app.tsx @@ -4,7 +4,6 @@ declare global { interface Window { bugsnagApiKey?: string; dashboardUrl?: string; - defaultFilesHost: string; defaultSyncServer: string; devAccountEmail?: string; devAccountPassword?: string; @@ -30,7 +29,6 @@ import { isDev } from './utils'; const startApplication: StartApplication = async function startApplication( defaultSyncServerHost: string, - defaultFilesHostHost: string, bridge: Bridge, enableUnfinishedFeatures: boolean, webSocketUrl: string @@ -40,7 +38,6 @@ const startApplication: StartApplication = async function startApplication( const mainApplicationGroup = new ApplicationGroup( defaultSyncServerHost, - defaultFilesHostHost, bridge, enableUnfinishedFeatures ? Runtime.Dev : Runtime.Prod, webSocketUrl @@ -75,7 +72,6 @@ const startApplication: StartApplication = async function startApplication( if (IsWebPlatform) { startApplication( window.defaultSyncServer, - window.defaultFilesHost, new BrowserBridge(WebAppVersion), window.enabledUnfinishedFeatures, window.websocketUrl diff --git a/app/assets/javascripts/startApplication.ts b/app/assets/javascripts/startApplication.ts index 11afdfc4c..c4c5fa1b2 100644 --- a/app/assets/javascripts/startApplication.ts +++ b/app/assets/javascripts/startApplication.ts @@ -2,7 +2,6 @@ import { Bridge } from './services/bridge'; export type StartApplication = ( defaultSyncServerHost: string, - defaultFilesHostHost: string, bridge: Bridge, enableUnfinishedFeatures: boolean, webSocketUrl: string diff --git a/app/assets/javascripts/ui_models/application.ts b/app/assets/javascripts/ui_models/application.ts index 54254e3fe..e75cffd3a 100644 --- a/app/assets/javascripts/ui_models/application.ts +++ b/app/assets/javascripts/ui_models/application.ts @@ -48,7 +48,6 @@ export class WebApplication extends SNApplication { platform: Platform, identifier: string, defaultSyncServerHost: string, - defaultFilesHostHost: string, public bridge: Bridge, webSocketUrl: string, runtime: Runtime @@ -61,7 +60,6 @@ export class WebApplication extends SNApplication { alertService: new AlertService(), identifier, defaultHost: defaultSyncServerHost, - defaultFilesHost: defaultFilesHostHost, appVersion: bridge.appVersion, webSocketUrl: webSocketUrl, runtime, diff --git a/app/assets/javascripts/ui_models/application_group.ts b/app/assets/javascripts/ui_models/application_group.ts index d062d0a24..8feb4c7c4 100644 --- a/app/assets/javascripts/ui_models/application_group.ts +++ b/app/assets/javascripts/ui_models/application_group.ts @@ -21,7 +21,6 @@ import { InternalEventBus } from '@standardnotes/services'; export class ApplicationGroup extends SNApplicationGroup { constructor( private defaultSyncServerHost: string, - private defaultFilesHostHost: string, private bridge: Bridge, private runtime: Runtime, private webSocketUrl: string @@ -52,7 +51,6 @@ export class ApplicationGroup extends SNApplicationGroup { platform, descriptor.identifier, this.defaultSyncServerHost, - this.defaultFilesHostHost, this.bridge, this.webSocketUrl, this.runtime diff --git a/package.json b/package.json index 0fbf27403..52d457519 100644 --- a/package.json +++ b/package.json @@ -27,21 +27,21 @@ "@babel/preset-typescript": "^7.16.7", "@reach/disclosure": "^0.16.2", "@reach/visually-hidden": "^0.16.0", - "@standardnotes/responses": "^1.2.0", - "@standardnotes/services": "^1.5.0", - "@standardnotes/stylekit": "5.14.0", + "@standardnotes/responses": "^1.3.0", + "@standardnotes/services": "^1.5.2", + "@standardnotes/stylekit": "5.15.0", "@svgr/webpack": "^6.2.1", "@types/jest": "^27.4.1", "@types/lodash": "^4.14.179", "@types/react": "^17.0.39", - "@typescript-eslint/eslint-plugin": "^5.13.0", - "@typescript-eslint/parser": "^5.13.0", + "@typescript-eslint/eslint-plugin": "^5.14.0", + "@typescript-eslint/parser": "^5.14.0", "apply-loader": "^2.0.0", "babel-eslint": "^10.1.0", "babel-loader": "^8.2.3", "connect": "^3.7.0", "copy-webpack-plugin": "^10.2.4", - "css-loader": "^6.7.0", + "css-loader": "^6.7.1", "dotenv": "^16.0.0", "eslint": "^8.10.0", "eslint-config-prettier": "^8.5.0", @@ -79,10 +79,10 @@ "@reach/listbox": "^0.16.2", "@reach/tooltip": "^0.16.2", "@standardnotes/components": "1.7.9", - "@standardnotes/features": "1.34.1", + "@standardnotes/features": "1.34.2", "@standardnotes/settings": "^1.12.0", "@standardnotes/sncrypto-web": "1.7.3", - "@standardnotes/snjs": "2.76.0", + "@standardnotes/snjs": "2.77.0", "mobx": "^6.4.2", "mobx-react-lite": "^3.3.0", "preact": "^10.6.6", diff --git a/yarn.lock b/yarn.lock index d3f7531ab..0a86a8825 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2331,50 +2331,50 @@ resolved "https://registry.yarnpkg.com/@standardnotes/components/-/components-1.7.9.tgz#41e5fdbcee250b9b3c18045dad8998c6f668307b" integrity sha512-/+Paw6ry/IS9ldYUM/lgC4O6qwl1fukWvNw65IMKyB9LMY3+xTh/I2BfnWynP117pVPxtu3/2+FBEnx04KvQwg== -"@standardnotes/domain-events@^2.23.22": - version "2.23.22" - resolved "https://registry.yarnpkg.com/@standardnotes/domain-events/-/domain-events-2.23.22.tgz#eb246cc3d8e69af7014678f5aac34fa1d7b494a0" - integrity sha512-mtw1nFZ/laiMisjTNBXgCsu6RLG/zkW4VtvnKjodG2TEJV3zPxFALGRUnsIlSlwt3YdClzg073sKHtUn4s+sAw== +"@standardnotes/domain-events@^2.23.24": + version "2.23.24" + resolved "https://registry.yarnpkg.com/@standardnotes/domain-events/-/domain-events-2.23.24.tgz#7872c178491cffb8ad9efa20eca3610a30ca669e" + integrity sha512-R8n1J4YHnY0qxUJcZt91eth+87Dy//GncsC+mpkNwEgtrzAAkS6lXO4xFwYVw7UHp6EmLtsKCnbXk+72WPzd9A== dependencies: "@standardnotes/auth" "^3.17.3" - "@standardnotes/features" "^1.34.1" + "@standardnotes/features" "^1.34.2" -"@standardnotes/features@1.34.1", "@standardnotes/features@^1.34.1": - version "1.34.1" - resolved "https://registry.yarnpkg.com/@standardnotes/features/-/features-1.34.1.tgz#da2e37a437ba274dfbdb9e0f5ab9de3ee95689ee" - integrity sha512-ILc4mSLoAE6S24GquNAS5TNLqM+RBKx8zyfFVgKEUB2sF00341HDi+/l5MuCCds2VnhTvIuVcIsCrPlj9NVmFg== +"@standardnotes/features@1.34.2", "@standardnotes/features@^1.34.2": + version "1.34.2" + resolved "https://registry.yarnpkg.com/@standardnotes/features/-/features-1.34.2.tgz#a3f2480e88a3873ae7dd34e6b57b9595a9f15c87" + integrity sha512-77/DyFMsL+gW4ElVl4n1huNyeYhFA1PyTPbITWkFhQib02aPhhOmjSecxJknFppSNZnBRRqd2hbBa0vMhxUWIA== dependencies: "@standardnotes/auth" "^3.17.3" "@standardnotes/common" "^1.15.3" -"@standardnotes/payloads@^1.4.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@standardnotes/payloads/-/payloads-1.4.0.tgz#e1a5415708c9d462c4f5f4824f7effd7e9d7f791" - integrity sha512-gAOj3p9KPsQggZ2SjeMjh4XTkTy8ntUYD23kYKbLA/Z7ArCCp8LnZZHASII2kEznaK+vrUAqlSM2/oKwQlohDA== +"@standardnotes/payloads@^1.4.1": + version "1.4.1" + resolved "https://registry.yarnpkg.com/@standardnotes/payloads/-/payloads-1.4.1.tgz#5da68ecc55920080223518c5d5d186380d1a43ca" + integrity sha512-NXc6Iv2AHIOIzURCuPiHpSgLQwfBFpg8ecozwa+zRXMe1ggEljJGWLutds3ehbqp7C0eCaZr+3pGJhtVdoW06w== dependencies: "@standardnotes/applications" "^1.1.3" "@standardnotes/common" "^1.15.3" - "@standardnotes/features" "^1.34.1" + "@standardnotes/features" "^1.34.2" "@standardnotes/utils" "^1.2.3" -"@standardnotes/responses@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@standardnotes/responses/-/responses-1.2.0.tgz#fe295b31751dbc692bb65c8e162972127fb990b2" - integrity sha512-YuVJQlB4ipdqAlAtD0xPhbHSR38fPzcRbSkntaCadHeAZl7WAdDDf/7pxTCDwhXN8Hls9OXlrq+WNbhorpe0tw== +"@standardnotes/responses@^1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@standardnotes/responses/-/responses-1.3.0.tgz#5c4a901e4ee3fec010e83fe6a773b988e601db07" + integrity sha512-6/g+Hg9yOHvbydw69HNVeblbPH1vzDKSZGYLqWkhKpZjBIHn5dv29PnLfK4OUDJD3C5xFmweYKPBkGuZMuKXrQ== dependencies: "@standardnotes/auth" "^3.17.3" "@standardnotes/common" "^1.15.3" - "@standardnotes/features" "^1.34.1" - "@standardnotes/payloads" "^1.4.0" + "@standardnotes/features" "^1.34.2" + "@standardnotes/payloads" "^1.4.1" -"@standardnotes/services@^1.5.0": - version "1.5.0" - resolved "https://registry.yarnpkg.com/@standardnotes/services/-/services-1.5.0.tgz#ab71393d947bf52a7fb682d8bbcc190acef8fe97" - integrity sha512-vZ7NmV3SVdt5UQDCJ+OsoGtMFr0wsmHBdXpyb8s4rRnR4PgmJsrhuGXEu0t23EyLilL+Yb6WtkfJQhXeQsiT9w== +"@standardnotes/services@^1.5.2": + version "1.5.2" + resolved "https://registry.yarnpkg.com/@standardnotes/services/-/services-1.5.2.tgz#7c559785b659694801db391814217a2f8acaac87" + integrity sha512-MSfZmV8+eJp5SMYs9MV1I/WygBTQL0gVK+utfxB8DctC0y1HeEpF4OtooZHmariiQt38tC7vi1/kEpxqgCRL+Q== dependencies: "@standardnotes/applications" "^1.1.3" "@standardnotes/common" "^1.15.3" - "@standardnotes/responses" "^1.2.0" + "@standardnotes/responses" "^1.3.0" "@standardnotes/utils" "^1.2.3" "@standardnotes/settings@^1.12.0": @@ -2396,27 +2396,27 @@ buffer "^6.0.3" libsodium-wrappers "^0.7.9" -"@standardnotes/snjs@2.76.0": - version "2.76.0" - resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.76.0.tgz#61cfa03bea5e624529b7bbdd67646b4184ea30b3" - integrity sha512-SWSCMbDsJhdxNpHFHdK60iqaAsgvozvX8pgcAekko+yPlw3kz5Ucp+wwQbiznQRwrxOZPPrG/1NkJa1U/wWcdA== +"@standardnotes/snjs@2.77.0": + version "2.77.0" + resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.77.0.tgz#8606cc0c372e27fb099b92c418301f3d0e1add77" + integrity sha512-/JAX65BgJstGIvmQRhtm1QUeS9jRzqbyb5KtRR4WgWn9SVuGRZo2BE0d5ywlQ/y/CW64Xmbp9LDFd137O48uFA== dependencies: "@standardnotes/applications" "^1.1.3" "@standardnotes/auth" "^3.17.3" "@standardnotes/common" "^1.15.3" - "@standardnotes/domain-events" "^2.23.22" - "@standardnotes/features" "^1.34.1" - "@standardnotes/payloads" "^1.4.0" - "@standardnotes/responses" "^1.2.0" - "@standardnotes/services" "^1.5.0" + "@standardnotes/domain-events" "^2.23.24" + "@standardnotes/features" "^1.34.2" + "@standardnotes/payloads" "^1.4.1" + "@standardnotes/responses" "^1.3.0" + "@standardnotes/services" "^1.5.2" "@standardnotes/settings" "^1.12.0" "@standardnotes/sncrypto-common" "^1.7.3" "@standardnotes/utils" "^1.2.3" -"@standardnotes/stylekit@5.14.0": - version "5.14.0" - resolved "https://registry.yarnpkg.com/@standardnotes/stylekit/-/stylekit-5.14.0.tgz#806b7d896fb94de8be72e762dd205beefff05fd7" - integrity sha512-zCB8QFPUTe+063RsLNCudkP6FY6ujKC3iE2pD6ak4htpXtW6DndwYbhEffuiWIjbRzDGAy0YyQ7y8V19Jw7ElQ== +"@standardnotes/stylekit@5.15.0": + version "5.15.0" + resolved "https://registry.yarnpkg.com/@standardnotes/stylekit/-/stylekit-5.15.0.tgz#14c0ff5c4e40d4afa9ea6fec0431934e1184a18f" + integrity sha512-BR78DIdXo8fxzNPruiugiQJfgT7usUFWxJ0CPnjhk3hshYM2/kleHdcrahYdi2Rs5MR7chhbsvUFUWHxykOaRg== dependencies: "@nanostores/preact" "^0.1.3" "@reach/listbox" "^0.16.2" @@ -2833,14 +2833,14 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@^5.13.0": - version "5.13.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.13.0.tgz#2809052b85911ced9c54a60dac10e515e9114497" - integrity sha512-vLktb2Uec81fxm/cfz2Hd6QaWOs8qdmVAZXLdOBX6JFJDhf6oDZpMzZ4/LZ6SFM/5DgDcxIMIvy3F+O9yZBuiQ== +"@typescript-eslint/eslint-plugin@^5.14.0": + version "5.14.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.14.0.tgz#5119b67152356231a0e24b998035288a9cd21335" + integrity sha512-ir0wYI4FfFUDfLcuwKzIH7sMVA+db7WYen47iRSaCGl+HMAZI9fpBwfDo45ZALD3A45ZGyHWDNLhbg8tZrMX4w== dependencies: - "@typescript-eslint/scope-manager" "5.13.0" - "@typescript-eslint/type-utils" "5.13.0" - "@typescript-eslint/utils" "5.13.0" + "@typescript-eslint/scope-manager" "5.14.0" + "@typescript-eslint/type-utils" "5.14.0" + "@typescript-eslint/utils" "5.14.0" debug "^4.3.2" functional-red-black-tree "^1.0.1" ignore "^5.1.8" @@ -2848,69 +2848,69 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/parser@^5.13.0": - version "5.13.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.13.0.tgz#0394ed8f2f849273c0bf4b811994d177112ced5c" - integrity sha512-GdrU4GvBE29tm2RqWOM0P5QfCtgCyN4hXICj/X9ibKED16136l9ZpoJvCL5pSKtmJzA+NRDzQ312wWMejCVVfg== +"@typescript-eslint/parser@^5.14.0": + version "5.14.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.14.0.tgz#7c79f898aa3cff0ceee6f1d34eeed0f034fb9ef3" + integrity sha512-aHJN8/FuIy1Zvqk4U/gcO/fxeMKyoSv/rS46UXMXOJKVsLQ+iYPuXNbpbH7cBLcpSbmyyFbwrniLx5+kutu1pw== dependencies: - "@typescript-eslint/scope-manager" "5.13.0" - "@typescript-eslint/types" "5.13.0" - "@typescript-eslint/typescript-estree" "5.13.0" + "@typescript-eslint/scope-manager" "5.14.0" + "@typescript-eslint/types" "5.14.0" + "@typescript-eslint/typescript-estree" "5.14.0" debug "^4.3.2" -"@typescript-eslint/scope-manager@5.13.0": - version "5.13.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.13.0.tgz#cf6aff61ca497cb19f0397eea8444a58f46156b6" - integrity sha512-T4N8UvKYDSfVYdmJq7g2IPJYCRzwtp74KyDZytkR4OL3NRupvswvmJQJ4CX5tDSurW2cvCc1Ia1qM7d0jpa7IA== +"@typescript-eslint/scope-manager@5.14.0": + version "5.14.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.14.0.tgz#ea518962b42db8ed0a55152ea959c218cb53ca7b" + integrity sha512-LazdcMlGnv+xUc5R4qIlqH0OWARyl2kaP8pVCS39qSL3Pd1F7mI10DbdXeARcE62sVQE4fHNvEqMWsypWO+yEw== dependencies: - "@typescript-eslint/types" "5.13.0" - "@typescript-eslint/visitor-keys" "5.13.0" + "@typescript-eslint/types" "5.14.0" + "@typescript-eslint/visitor-keys" "5.14.0" -"@typescript-eslint/type-utils@5.13.0": - version "5.13.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.13.0.tgz#b0efd45c85b7bab1125c97b752cab3a86c7b615d" - integrity sha512-/nz7qFizaBM1SuqAKb7GLkcNn2buRdDgZraXlkhz+vUGiN1NZ9LzkA595tHHeduAiS2MsHqMNhE2zNzGdw43Yg== +"@typescript-eslint/type-utils@5.14.0": + version "5.14.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.14.0.tgz#711f08105860b12988454e91df433567205a8f0b" + integrity sha512-d4PTJxsqaUpv8iERTDSQBKUCV7Q5yyXjqXUl3XF7Sd9ogNLuKLkxz82qxokqQ4jXdTPZudWpmNtr/JjbbvUixw== dependencies: - "@typescript-eslint/utils" "5.13.0" + "@typescript-eslint/utils" "5.14.0" debug "^4.3.2" tsutils "^3.21.0" -"@typescript-eslint/types@5.13.0": - version "5.13.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.13.0.tgz#da1de4ae905b1b9ff682cab0bed6b2e3be9c04e5" - integrity sha512-LmE/KO6DUy0nFY/OoQU0XelnmDt+V8lPQhh8MOVa7Y5k2gGRd6U9Kp3wAjhB4OHg57tUO0nOnwYQhRRyEAyOyg== +"@typescript-eslint/types@5.14.0": + version "5.14.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.14.0.tgz#96317cf116cea4befabc0defef371a1013f8ab11" + integrity sha512-BR6Y9eE9360LNnW3eEUqAg6HxS9Q35kSIs4rp4vNHRdfg0s+/PgHgskvu5DFTM7G5VKAVjuyaN476LCPrdA7Mw== -"@typescript-eslint/typescript-estree@5.13.0": - version "5.13.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.13.0.tgz#b37c07b748ff030a3e93d87c842714e020b78141" - integrity sha512-Q9cQow0DeLjnp5DuEDjLZ6JIkwGx3oYZe+BfcNuw/POhtpcxMTy18Icl6BJqTSd+3ftsrfuVb7mNHRZf7xiaNA== +"@typescript-eslint/typescript-estree@5.14.0": + version "5.14.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.14.0.tgz#78b7f7385d5b6f2748aacea5c9b7f6ae62058314" + integrity sha512-QGnxvROrCVtLQ1724GLTHBTR0lZVu13izOp9njRvMkCBgWX26PKvmMP8k82nmXBRD3DQcFFq2oj3cKDwr0FaUA== dependencies: - "@typescript-eslint/types" "5.13.0" - "@typescript-eslint/visitor-keys" "5.13.0" + "@typescript-eslint/types" "5.14.0" + "@typescript-eslint/visitor-keys" "5.14.0" debug "^4.3.2" globby "^11.0.4" is-glob "^4.0.3" semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/utils@5.13.0": - version "5.13.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.13.0.tgz#2328feca700eb02837298339a2e49c46b41bd0af" - integrity sha512-+9oHlPWYNl6AwwoEt5TQryEHwiKRVjz7Vk6kaBeD3/kwHE5YqTGHtm/JZY8Bo9ITOeKutFaXnBlMgSATMJALUQ== +"@typescript-eslint/utils@5.14.0": + version "5.14.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.14.0.tgz#6c8bc4f384298cbbb32b3629ba7415f9f80dc8c4" + integrity sha512-EHwlII5mvUA0UsKYnVzySb/5EE/t03duUTweVy8Zqt3UQXBrpEVY144OTceFKaOe4xQXZJrkptCf7PjEBeGK4w== dependencies: "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.13.0" - "@typescript-eslint/types" "5.13.0" - "@typescript-eslint/typescript-estree" "5.13.0" + "@typescript-eslint/scope-manager" "5.14.0" + "@typescript-eslint/types" "5.14.0" + "@typescript-eslint/typescript-estree" "5.14.0" eslint-scope "^5.1.1" eslint-utils "^3.0.0" -"@typescript-eslint/visitor-keys@5.13.0": - version "5.13.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.13.0.tgz#f45ff55bcce16403b221ac9240fbeeae4764f0fd" - integrity sha512-HLKEAS/qA1V7d9EzcpLFykTePmOQqOFim8oCvhY3pZgQ8Hi38hYpHd9e5GN6nQBFQNecNhws5wkS9Y5XIO0s/g== +"@typescript-eslint/visitor-keys@5.14.0": + version "5.14.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.14.0.tgz#1927005b3434ccd0d3ae1b2ecf60e65943c36986" + integrity sha512-yL0XxfzR94UEkjBqyymMLgCBdojzEuy/eim7N9/RIcTNxpJudAcqsU8eRyfzBbcEzGoPWfdM3AGak3cN08WOIw== dependencies: - "@typescript-eslint/types" "5.13.0" + "@typescript-eslint/types" "5.14.0" eslint-visitor-keys "^3.0.0" "@webassemblyjs/ast@1.11.1": @@ -4116,10 +4116,10 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -css-loader@^6.7.0: - version "6.7.0" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-6.7.0.tgz#c1200da1dfffe6643b18bda20fdd84cad3e36d39" - integrity sha512-S7HCfCiDHLA+VXKqdZwyRZgoO0R9BnKDnVIoHMq5grl3N86zAu7MB+FBWHr5xOJC8SmvpTLha/2NpfFkFEN/ig== +css-loader@^6.7.1: + version "6.7.1" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-6.7.1.tgz#e98106f154f6e1baf3fc3bc455cb9981c1d5fd2e" + integrity sha512-yB5CNFa14MbPJcomwNh3wLThtkZgcNyI2bNMRt8iE5Z8Vwl7f8vQXFAzn2HDOJvtDq2NTZBUGMSUNNyrv3/+cw== dependencies: icss-utils "^5.1.0" postcss "^8.4.7" From ab6e5ac367c248e6e89474c4f96f19ade0494602 Mon Sep 17 00:00:00 2001 From: Aman Harwara Date: Tue, 8 Mar 2022 22:09:37 +0530 Subject: [PATCH 03/12] feat: add Labs pane to preferences (#892) * feat: add Labs pane to preferences * feat: use lab_features value for account switcher * feat: labs pane with experimental features * fix: use toggleExperimentalFeature from features service * fix: show premium modal if not entitled for experimental feature * fix: add isExperimental && isExperimentalEnabled to EditorMenuItem type * fix: hide experimental editor if not enabled * chore(deps): update features and snjs * fix: remove comment * fix: remove filtering from reloadExperimentalFeatures * fix: revert Footer.tsx * chore(deps): bump @standardnotes packages * fix: change experimental features layout Co-authored-by: Johnny Almonte Co-authored-by: Mo --- .../NotesOptions/ChangeEditorOption.tsx | 2 + .../changeEditor/ChangeEditorMenu.tsx | 4 + .../changeEditor/createEditorMenuGroups.ts | 15 +++ .../javascripts/preferences/panes/General.tsx | 3 +- .../panes/general-segments/Labs.tsx | 102 ++++++++++++++++++ .../panes/general-segments/index.ts | 1 + package.json | 10 +- yarn.lock | 70 ++++++------ 8 files changed, 166 insertions(+), 41 deletions(-) create mode 100644 app/assets/javascripts/preferences/panes/general-segments/Labs.tsx diff --git a/app/assets/javascripts/components/NotesOptions/ChangeEditorOption.tsx b/app/assets/javascripts/components/NotesOptions/ChangeEditorOption.tsx index efa4f98c4..0128bc109 100644 --- a/app/assets/javascripts/components/NotesOptions/ChangeEditorOption.tsx +++ b/app/assets/javascripts/components/NotesOptions/ChangeEditorOption.tsx @@ -34,6 +34,8 @@ export type EditorMenuItem = { name: string; component?: SNComponent; isEntitled: boolean; + isExperimental: boolean; + isExperimentalEnabled: boolean; }; export type EditorMenuGroup = AccordionMenuGroup; diff --git a/app/assets/javascripts/components/NotesOptions/changeEditor/ChangeEditorMenu.tsx b/app/assets/javascripts/components/NotesOptions/changeEditor/ChangeEditorMenu.tsx index fad58fbae..4708ad08c 100644 --- a/app/assets/javascripts/components/NotesOptions/changeEditor/ChangeEditorMenu.tsx +++ b/app/assets/javascripts/components/NotesOptions/changeEditor/ChangeEditorMenu.tsx @@ -223,6 +223,10 @@ export const ChangeEditorMenu: FunctionComponent = ({ selectEditor(item); }; + if (item.isExperimental && !item.isExperimentalEnabled) { + return; + } + return ( = observer( + = ({ application }) => { + const [experimentalFeatures, setExperimentalFeatures] = + useState(); + + const reloadExperimentalFeatures = useCallback(() => { + const experimentalFeatures = application.features.getExperimentalFeatures(); + setExperimentalFeatures(experimentalFeatures); + }, [application.features]); + + useEffect(() => { + reloadExperimentalFeatures(); + }, [reloadExperimentalFeatures]); + + const premiumModal = usePremiumModal(); + + if (!experimentalFeatures) { + return ( +
+ No experimental features available. +
+ ); + } + + return ( + + + Labs +
+ {experimentalFeatures?.map( + (featureIdentifier: FeatureIdentifier, index: number) => { + const feature = FindNativeFeature(featureIdentifier); + const featureName = feature?.name ?? featureIdentifier; + const featureDescription = feature?.description ?? ''; + + const isFeatureEnabled = + application.features.isExperimentalFeatureEnabled( + featureIdentifier + ); + + const toggleFeature = () => { + const isEntitled = + application.features.getFeatureStatus(featureIdentifier) === + FeatureStatus.Entitled; + if (!isEntitled) { + premiumModal.activate(featureName); + return; + } + + application.features.toggleExperimentalFeature( + featureIdentifier + ); + reloadExperimentalFeatures(); + }; + + const showHorizontalSeparator = + experimentalFeatures.length > 1 && + index !== experimentalFeatures.length - 1; + + return ( + <> +
+
+ {featureName} + {featureDescription} +
+ +
+ {showHorizontalSeparator && ( + + )} + + ); + } + )} +
+
+
+ ); +}; diff --git a/app/assets/javascripts/preferences/panes/general-segments/index.ts b/app/assets/javascripts/preferences/panes/general-segments/index.ts index 42a057b5d..32a2585a3 100644 --- a/app/assets/javascripts/preferences/panes/general-segments/index.ts +++ b/app/assets/javascripts/preferences/panes/general-segments/index.ts @@ -1,3 +1,4 @@ export * from './ErrorReporting'; export * from './Tools'; export * from './Defaults'; +export * from './Labs'; diff --git a/package.json b/package.json index 52d457519..39045beb6 100644 --- a/package.json +++ b/package.json @@ -27,8 +27,8 @@ "@babel/preset-typescript": "^7.16.7", "@reach/disclosure": "^0.16.2", "@reach/visually-hidden": "^0.16.0", - "@standardnotes/responses": "^1.3.0", - "@standardnotes/services": "^1.5.2", + "@standardnotes/responses": "1.3.1", + "@standardnotes/services": "1.5.3", "@standardnotes/stylekit": "5.15.0", "@svgr/webpack": "^6.2.1", "@types/jest": "^27.4.1", @@ -79,10 +79,10 @@ "@reach/listbox": "^0.16.2", "@reach/tooltip": "^0.16.2", "@standardnotes/components": "1.7.9", - "@standardnotes/features": "1.34.2", - "@standardnotes/settings": "^1.12.0", + "@standardnotes/features": "1.34.3", + "@standardnotes/settings": "1.12.0", "@standardnotes/sncrypto-web": "1.7.3", - "@standardnotes/snjs": "2.77.0", + "@standardnotes/snjs": "2.77.1", "mobx": "^6.4.2", "mobx-react-lite": "^3.3.0", "preact": "^10.6.6", diff --git a/yarn.lock b/yarn.lock index 0a86a8825..bfad4fd80 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2331,53 +2331,53 @@ resolved "https://registry.yarnpkg.com/@standardnotes/components/-/components-1.7.9.tgz#41e5fdbcee250b9b3c18045dad8998c6f668307b" integrity sha512-/+Paw6ry/IS9ldYUM/lgC4O6qwl1fukWvNw65IMKyB9LMY3+xTh/I2BfnWynP117pVPxtu3/2+FBEnx04KvQwg== -"@standardnotes/domain-events@^2.23.24": - version "2.23.24" - resolved "https://registry.yarnpkg.com/@standardnotes/domain-events/-/domain-events-2.23.24.tgz#7872c178491cffb8ad9efa20eca3610a30ca669e" - integrity sha512-R8n1J4YHnY0qxUJcZt91eth+87Dy//GncsC+mpkNwEgtrzAAkS6lXO4xFwYVw7UHp6EmLtsKCnbXk+72WPzd9A== +"@standardnotes/domain-events@^2.23.25": + version "2.23.25" + resolved "https://registry.yarnpkg.com/@standardnotes/domain-events/-/domain-events-2.23.25.tgz#bab5773fd1355a94fe35faba995b53ae414e325a" + integrity sha512-2nhsCRAbAowtBvzXgRVBo+o4blz1VfmGLM32TabW1EEXHI1Y5K/qQ7+OrZ9TPkd6B0JNC4od/OCY7rLCma8BEg== dependencies: "@standardnotes/auth" "^3.17.3" - "@standardnotes/features" "^1.34.2" + "@standardnotes/features" "^1.34.3" -"@standardnotes/features@1.34.2", "@standardnotes/features@^1.34.2": - version "1.34.2" - resolved "https://registry.yarnpkg.com/@standardnotes/features/-/features-1.34.2.tgz#a3f2480e88a3873ae7dd34e6b57b9595a9f15c87" - integrity sha512-77/DyFMsL+gW4ElVl4n1huNyeYhFA1PyTPbITWkFhQib02aPhhOmjSecxJknFppSNZnBRRqd2hbBa0vMhxUWIA== +"@standardnotes/features@1.34.3", "@standardnotes/features@^1.34.3": + version "1.34.3" + resolved "https://registry.yarnpkg.com/@standardnotes/features/-/features-1.34.3.tgz#4de3259e43cfd2c2d50a0a113439566a6bed8fca" + integrity sha512-WL+nyJsm/mBq2zuR3ZlJ/mJhaVPrm3j7gvBdDr4kxdvMM5y9E4DiYHp98SeUvblIGXWmhZxVc7rdDmVaoYt99g== dependencies: "@standardnotes/auth" "^3.17.3" "@standardnotes/common" "^1.15.3" -"@standardnotes/payloads@^1.4.1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@standardnotes/payloads/-/payloads-1.4.1.tgz#5da68ecc55920080223518c5d5d186380d1a43ca" - integrity sha512-NXc6Iv2AHIOIzURCuPiHpSgLQwfBFpg8ecozwa+zRXMe1ggEljJGWLutds3ehbqp7C0eCaZr+3pGJhtVdoW06w== +"@standardnotes/payloads@^1.4.2": + version "1.4.2" + resolved "https://registry.yarnpkg.com/@standardnotes/payloads/-/payloads-1.4.2.tgz#6f9995a4f585fa814f88bfffdb8d973f078d21d6" + integrity sha512-iw2Fhr7oBQgtOtpLnDyCARbP8VWUpT9bhRdgKg47I8Ky5EmyYBcYOf2U8XuXkzypot4+zZNYc5Bgzgs4YXyDzQ== dependencies: "@standardnotes/applications" "^1.1.3" "@standardnotes/common" "^1.15.3" - "@standardnotes/features" "^1.34.2" + "@standardnotes/features" "^1.34.3" "@standardnotes/utils" "^1.2.3" -"@standardnotes/responses@^1.3.0": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@standardnotes/responses/-/responses-1.3.0.tgz#5c4a901e4ee3fec010e83fe6a773b988e601db07" - integrity sha512-6/g+Hg9yOHvbydw69HNVeblbPH1vzDKSZGYLqWkhKpZjBIHn5dv29PnLfK4OUDJD3C5xFmweYKPBkGuZMuKXrQ== +"@standardnotes/responses@1.3.1", "@standardnotes/responses@^1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@standardnotes/responses/-/responses-1.3.1.tgz#2890e679b6e635b14e223a9eb5a5d8c44accd530" + integrity sha512-h9C/DJike0MVQjDkhZhQ8lPCreZKsAuqtEvXpwVl8vcFAOEfeS1BXacvxSlefHx90og6ti9rfF0D/FqzcI+b6Q== dependencies: "@standardnotes/auth" "^3.17.3" "@standardnotes/common" "^1.15.3" - "@standardnotes/features" "^1.34.2" - "@standardnotes/payloads" "^1.4.1" + "@standardnotes/features" "^1.34.3" + "@standardnotes/payloads" "^1.4.2" -"@standardnotes/services@^1.5.2": - version "1.5.2" - resolved "https://registry.yarnpkg.com/@standardnotes/services/-/services-1.5.2.tgz#7c559785b659694801db391814217a2f8acaac87" - integrity sha512-MSfZmV8+eJp5SMYs9MV1I/WygBTQL0gVK+utfxB8DctC0y1HeEpF4OtooZHmariiQt38tC7vi1/kEpxqgCRL+Q== +"@standardnotes/services@1.5.3", "@standardnotes/services@^1.5.3": + version "1.5.3" + resolved "https://registry.yarnpkg.com/@standardnotes/services/-/services-1.5.3.tgz#0cfa7c0336b31c0084e2be976641fb2c36739e5b" + integrity sha512-NBsF5A4hJZPFOASTSJd60dTuVTiyop1IVZGlmvjs2K8UfHG9/ET59BkVwzPsCsSfnoYSJasVJkxnFunkaeJ/OA== dependencies: "@standardnotes/applications" "^1.1.3" "@standardnotes/common" "^1.15.3" - "@standardnotes/responses" "^1.3.0" + "@standardnotes/responses" "^1.3.1" "@standardnotes/utils" "^1.2.3" -"@standardnotes/settings@^1.12.0": +"@standardnotes/settings@1.12.0", "@standardnotes/settings@^1.12.0": version "1.12.0" resolved "https://registry.yarnpkg.com/@standardnotes/settings/-/settings-1.12.0.tgz#43f3dd7f015f726b1ed88a48fcc3737899116cd5" integrity sha512-w6S5TT7KRpvUb+JsXZ7ucWPjlWRtpKQdsyT7cLs66ynKRXxUn40hf4kA8T9FhuLAKbG+wIYDrAZl3FRk+HvDWQ== @@ -2396,19 +2396,19 @@ buffer "^6.0.3" libsodium-wrappers "^0.7.9" -"@standardnotes/snjs@2.77.0": - version "2.77.0" - resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.77.0.tgz#8606cc0c372e27fb099b92c418301f3d0e1add77" - integrity sha512-/JAX65BgJstGIvmQRhtm1QUeS9jRzqbyb5KtRR4WgWn9SVuGRZo2BE0d5ywlQ/y/CW64Xmbp9LDFd137O48uFA== +"@standardnotes/snjs@2.77.1": + version "2.77.1" + resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.77.1.tgz#2af90c0837edfc0508579a8f71686e946a81afb6" + integrity sha512-kbCh63YxQCaKKx2AHonsBgtTlHeBR6SFtmchBIXiSKA4O7USroGJilTUaK2DVyK5L89hwafkZfot7R+nvXD9zQ== dependencies: "@standardnotes/applications" "^1.1.3" "@standardnotes/auth" "^3.17.3" "@standardnotes/common" "^1.15.3" - "@standardnotes/domain-events" "^2.23.24" - "@standardnotes/features" "^1.34.2" - "@standardnotes/payloads" "^1.4.1" - "@standardnotes/responses" "^1.3.0" - "@standardnotes/services" "^1.5.2" + "@standardnotes/domain-events" "^2.23.25" + "@standardnotes/features" "^1.34.3" + "@standardnotes/payloads" "^1.4.2" + "@standardnotes/responses" "^1.3.1" + "@standardnotes/services" "^1.5.3" "@standardnotes/settings" "^1.12.0" "@standardnotes/sncrypto-common" "^1.7.3" "@standardnotes/utils" "^1.2.3" From 5d49352f938dbd5001460103fa0eabb9936909b6 Mon Sep 17 00:00:00 2001 From: Myreli Date: Tue, 8 Mar 2022 13:50:21 -0300 Subject: [PATCH 04/12] feat: redesign search filtering experience (#908) * feat(search): redesign search filters as bubbles like mobile * fix(search): decouble Bubble component styling - animate the bubles on search - decouple the Bubbles styling using utility classes - improve styling of the new search options * fix(Bubble): remove duplicated utility classes * fix(bubble): use color neutral utility * fix(bubble): increase gaps and justify center * fix(Bubble): increase height and decrease gap * fix(search): improve usability on search options - increase animation timing to match mobile - properly center cancel button - only show cancel on text input - prevent search options from disappearing when clicking with no text * fix(search-options): improve spacing and auto size * fix(search-options): improve animation and decrease gap --- app/assets/javascripts/components/Bubble.tsx | 25 ++++ .../javascripts/components/NotesView.tsx | 59 +++++---- .../javascripts/components/SearchOptions.tsx | 118 ++++-------------- .../ui_models/app_state/notes_view_state.ts | 4 - app/assets/stylesheets/_notes.scss | 24 +++- app/assets/stylesheets/_sn.scss | 43 +++++++ 6 files changed, 145 insertions(+), 128 deletions(-) create mode 100644 app/assets/javascripts/components/Bubble.tsx diff --git a/app/assets/javascripts/components/Bubble.tsx b/app/assets/javascripts/components/Bubble.tsx new file mode 100644 index 000000000..e164a4f50 --- /dev/null +++ b/app/assets/javascripts/components/Bubble.tsx @@ -0,0 +1,25 @@ +interface BubbleProperties { + label: string; + selected: boolean; + onSelect: () => void; +} + +const styles = { + base: 'px-2 py-1.5 text-center rounded-full cursor-pointer transition border-1 border-solid active:border-info active:bg-info active:color-neutral-contrast', + unselected: 'color-neutral border-secondary', + selected: 'border-info bg-info color-neutral-contrast', +}; + +const Bubble = ({ label, selected, onSelect }: BubbleProperties) => ( + + {label} + +); + +export default Bubble; diff --git a/app/assets/javascripts/components/NotesView.tsx b/app/assets/javascripts/components/NotesView.tsx index 41001045f..6c6a19f23 100644 --- a/app/assets/javascripts/components/NotesView.tsx +++ b/app/assets/javascripts/components/NotesView.tsx @@ -48,13 +48,13 @@ export const NotesView: FunctionComponent = observer( selectPreviousNote, onFilterEnter, handleFilterTextChanged, - onSearchInputBlur, clearFilterText, paginate, panelWidth, } = appState.notesView; const [showDisplayOptionsMenu, setShowDisplayOptionsMenu] = useState(false); + const [focusedSearch, setFocusedSearch] = useState(false); const [closeDisplayOptMenuOnBlur] = useCloseOnBlur( displayOptionsMenuRef, @@ -130,6 +130,9 @@ export const NotesView: FunctionComponent = observer( setNoteFilterText((e.target as HTMLInputElement).value); }; + const onSearchFocused = () => setFocusedSearch(true); + const onSearchBlurred = () => setFocusedSearch(false); + const onNoteFilterKeyUp = (e: KeyboardEvent) => { if (e.key === KeyboardKey.Enter) { onFilterEnter(); @@ -179,32 +182,38 @@ export const NotesView: FunctionComponent = observer(
- onSearchInputBlur()} - /> - {noteFilterText ? ( - - ) : null} -
- + + {noteFilterText && ( + + )}
+ + {(focusedSearch || noteFilterText) && ( +
+ +
+ )}
diff --git a/app/assets/javascripts/components/SearchOptions.tsx b/app/assets/javascripts/components/SearchOptions.tsx index 0c07dbb55..c6abf6e0e 100644 --- a/app/assets/javascripts/components/SearchOptions.tsx +++ b/app/assets/javascripts/components/SearchOptions.tsx @@ -1,16 +1,7 @@ import { AppState } from '@/ui_models/app_state'; -import { Icon } from './Icon'; -import { useCloseOnBlur } from './utils'; -import { useEffect, useRef, useState } from 'preact/hooks'; import { WebApplication } from '@/ui_models/application'; -import VisuallyHidden from '@reach/visually-hidden'; -import { - Disclosure, - DisclosureButton, - DisclosurePanel, -} from '@reach/disclosure'; -import { Switch } from './Switch'; import { observer } from 'mobx-react-lite'; +import Bubble from './Bubble'; type Props = { appState: AppState; @@ -23,94 +14,33 @@ export const SearchOptions = observer(({ appState }: Props) => { const { includeProtectedContents, includeArchived, includeTrashed } = searchOptions; - const [open, setOpen] = useState(false); - const [position, setPosition] = useState({ - top: 0, - right: 0, - }); - const [maxWidth, setMaxWidth] = useState('auto'); - const buttonRef = useRef(null); - const panelRef = useRef(null); - const [closeOnBlur, setLockCloseOnBlur] = useCloseOnBlur( - panelRef as any, - setOpen - ); - async function toggleIncludeProtectedContents() { - setLockCloseOnBlur(true); - try { - await searchOptions.toggleIncludeProtectedContents(); - } finally { - setLockCloseOnBlur(false); - } + await searchOptions.toggleIncludeProtectedContents(); } - const updateWidthAndPosition = () => { - const rect = buttonRef.current!.getBoundingClientRect(); - setMaxWidth(rect.right - 16); - setPosition({ - top: rect.bottom, - right: document.body.clientWidth - rect.right, - }); - }; - - useEffect(() => { - window.addEventListener('resize', updateWidthAndPosition); - return () => { - window.removeEventListener('resize', updateWidthAndPosition); - }; - }, []); - return ( - { - updateWidthAndPosition(); - setOpen(!open); - }} +
e.preventDefault()} > - - Search options - - - - -

Include protected contents

-
- -

Include archived notes

-
- -

Include trashed notes

-
-
- + + + + + +
); }); diff --git a/app/assets/javascripts/ui_models/app_state/notes_view_state.ts b/app/assets/javascripts/ui_models/app_state/notes_view_state.ts index c22e3ce1c..9aaba02a7 100644 --- a/app/assets/javascripts/ui_models/app_state/notes_view_state.ts +++ b/app/assets/javascripts/ui_models/app_state/notes_view_state.ts @@ -559,10 +559,6 @@ export class NotesViewState { this.reloadNotes(); }; - onSearchInputBlur = () => { - this.appState.searchOptions.refreshIncludeProtectedContents(); - }; - clearFilterText = () => { this.setNoteFilterText(''); this.onFilterEnter(); diff --git a/app/assets/stylesheets/_notes.scss b/app/assets/stylesheets/_notes.scss index 9308c94bc..3e8cf1cd1 100644 --- a/app/assets/stylesheets/_notes.scss +++ b/app/assets/stylesheets/_notes.scss @@ -52,11 +52,11 @@ .filter-section { clear: left; - height: 28px; - margin-top: 14px; + max-height: 80px; + margin-top: 10px; position: relative; display: flex; - align-items: center; + flex-direction: column; .filter-bar { background-color: var(--sn-stylekit-contrast-background-color); @@ -71,6 +71,20 @@ border-color: transparent; width: 100%; position: relative; + height: 28px; + } + + .search-options { + margin-top: 10px; + + display: grid; + grid-template-columns: repeat( 3, 1fr ); + gap: .5rem; + + font-size: var(--sn-stylekit-font-size-p); + white-space: nowrap; + + overflow-x: auto; } #search-clear-button { @@ -86,9 +100,9 @@ line-height: 17px; text-align: center; position: absolute; - top: 50%; + top: 20%; transform: translateY(-50%); - right: 36px; + right: 10px; cursor: pointer; transition: background-color 0.15s linear; diff --git a/app/assets/stylesheets/_sn.scss b/app/assets/stylesheets/_sn.scss index 4c2fc3caa..503ca21b4 100644 --- a/app/assets/stylesheets/_sn.scss +++ b/app/assets/stylesheets/_sn.scss @@ -436,6 +436,10 @@ border-color: var(--sn-stylekit-neutral-contrast-color); } +.border-secondary { + border-color: var(--sn-stylekit-secondary-border-color); +} + .sn-component .border-r-1px { border-right-width: 1px; } @@ -938,3 +942,42 @@ .invisible { visibility: hidden; } + +.color-neutral-contrast { + color: var(--sn-stylekit-neutral-contrast-color); +} + +.active\:bg-info:active { + background-color: var(--sn-stylekit-info-color); +} + +.active\:border-info:active { + border-color: var(--sn-stylekit-info-color); +} + +.active\:color-neutral-contrast:active { + color: var(--sn-stylekit-neutral-contrast-color); +} + +.transition { + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; + transition-timing-function: cubic-bezier(.4,0,.2,1); + transition-duration: 100ms; +} + +.animate-fade-from-top { + animation: fade-from-top .2s ease-out; +} + +@keyframes fade-from-top { + 0% { + opacity: 0; + transform: translateY(-20%); + } + 75% { + opacity: 1; + } + 100% { + transform: translateY(0%); + } +} From 5ceba79e158624f5eda78769a787f762e0b82b5c Mon Sep 17 00:00:00 2001 From: Johnny A <5891646+johnny243@users.noreply.github.com> Date: Tue, 8 Mar 2022 11:47:19 -0800 Subject: [PATCH 05/12] chore(deps): bump @standarndotes packages (#916) * chore(deps): bump @standarndotes packages * chore: bundle Co-authored-by: Johnny Almonte --- package.json | 10 +-- public/components/checksums.json | 6 +- .../dist/dist.css | 8 +- .../dist/dist.css.map | 8 +- .../package.json | 4 +- yarn.lock | 76 +++++++++---------- 6 files changed, 53 insertions(+), 59 deletions(-) diff --git a/package.json b/package.json index 39045beb6..6a64373f4 100644 --- a/package.json +++ b/package.json @@ -27,8 +27,8 @@ "@babel/preset-typescript": "^7.16.7", "@reach/disclosure": "^0.16.2", "@reach/visually-hidden": "^0.16.0", - "@standardnotes/responses": "1.3.1", - "@standardnotes/services": "1.5.3", + "@standardnotes/responses": "1.3.2", + "@standardnotes/services": "1.5.4", "@standardnotes/stylekit": "5.15.0", "@svgr/webpack": "^6.2.1", "@types/jest": "^27.4.1", @@ -78,11 +78,11 @@ "@reach/dialog": "^0.16.2", "@reach/listbox": "^0.16.2", "@reach/tooltip": "^0.16.2", - "@standardnotes/components": "1.7.9", - "@standardnotes/features": "1.34.3", + "@standardnotes/components": "1.7.10", + "@standardnotes/features": "1.34.4", "@standardnotes/settings": "1.12.0", "@standardnotes/sncrypto-web": "1.7.3", - "@standardnotes/snjs": "2.77.1", + "@standardnotes/snjs": "2.77.2", "mobx": "^6.4.2", "mobx-react-lite": "^3.3.0", "preact": "^10.6.6", diff --git a/public/components/checksums.json b/public/components/checksums.json index 2ff95be0f..1ea31d011 100644 --- a/public/components/checksums.json +++ b/public/components/checksums.json @@ -30,9 +30,9 @@ "binary": "21df7e16f57f6aede482b1281ff1c6d2ad9747fc9c3059e483aea7a03a3a8224" }, "org.standardnotes.theme-dynamic": { - "version": "1.0.3", - "base64": "81d1465772d0233e3a9648ed0e0ea289f51d1dcf12fef8b29b25488268256521", - "binary": "42d28f3598669b801821879f0b7e26389300f151bfbc566b11c214e6091719ed" + "version": "1.0.4", + "base64": "92038664655c6cb1d6b422b9546da1a98da58b0251394cf2a485aed9b1774c07", + "binary": "d05185aca67768f35227565dacce030fdff233563f119781baaf4e95f9198115" }, "org.standardnotes.code-editor": { "version": "1.3.12", diff --git a/public/components/org.standardnotes.theme-dynamic/dist/dist.css b/public/components/org.standardnotes.theme-dynamic/dist/dist.css index 62085b20b..42662c9f7 100644 --- a/public/components/org.standardnotes.theme-dynamic/dist/dist.css +++ b/public/components/org.standardnotes.theme-dynamic/dist/dist.css @@ -2,7 +2,7 @@ .section.tags, navigation { flex: none !important; - width: 120px !important; + width: 190px !important; transition: width 0.25s; } @@ -10,21 +10,21 @@ navigation { .section.tags:hover, navigation:hover { flex: initial; - width: 180px !important; + width: 250px !important; transition: width 0.25s; } .section.notes, notes-view { flex: none !important; - width: 200px !important; + width: 270px !important; transition: width 0.25s; } .section.notes:hover, notes-view:hover { flex: initial; - width: 350px !important; + width: 420px !important; transition: width 0.25s; } diff --git a/public/components/org.standardnotes.theme-dynamic/dist/dist.css.map b/public/components/org.standardnotes.theme-dynamic/dist/dist.css.map index b431baedc..605685158 100644 --- a/public/components/org.standardnotes.theme-dynamic/dist/dist.css.map +++ b/public/components/org.standardnotes.theme-dynamic/dist/dist.css.map @@ -1,7 +1 @@ -{ -"version": 3, -"mappings": "AAAA;;UAEW;EACT,IAAI,EAAE,eAAe;EACrB,KAAK,EAAE,gBAAgB;EACvB,UAAU,EAAE,WAAW;;;AAGzB;;gBAEiB;EACf,IAAI,EAAE,OAAO;EACb,KAAK,EAAE,gBAAgB;EACvB,UAAU,EAAE,WAAW;;;AAGzB;UACW;EACT,IAAI,EAAE,eAAe;EACrB,KAAK,EAAE,gBAAgB;EACvB,UAAU,EAAE,WAAW;;;AAGzB;gBACiB;EACf,IAAI,EAAE,OAAO;EACb,KAAK,EAAE,gBAAgB;EACvB,UAAU,EAAE,WAAW", -"sources": ["../src/main.scss"], -"names": [], -"file": "dist.css" -} +{"version":3,"sourceRoot":"","sources":["../src/main.scss"],"names":[],"mappings":"AAAA;AAAA;AAAA;EAGE;EACA;EACA;;;AAGF;AAAA;AAAA;EAGE;EACA;EACA;;;AAGF;AAAA;EAEE;EACA;EACA;;;AAGF;AAAA;EAEE;EACA;EACA","file":"dist.css"} \ No newline at end of file diff --git a/public/components/org.standardnotes.theme-dynamic/package.json b/public/components/org.standardnotes.theme-dynamic/package.json index 3a3a5d965..50046b3bf 100644 --- a/public/components/org.standardnotes.theme-dynamic/package.json +++ b/public/components/org.standardnotes.theme-dynamic/package.json @@ -1,6 +1,6 @@ { - "name": "sn-theme-dynamic", - "version": "1.0.3", + "name": "@standardnotes/dynamic-theme", + "version": "1.0.4", "main": "dist/dist.css", "devDependencies": { "grunt": "^1.0.1", diff --git a/yarn.lock b/yarn.lock index bfad4fd80..3aa7534f6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2326,55 +2326,55 @@ resolved "https://registry.yarnpkg.com/@standardnotes/common/-/common-1.15.3.tgz#0b8ce48b81b260abe2d405431fb04aacb44b5a01" integrity sha512-9oh/W3sFQYyA5Vabcbu6BUkLVkFq/25Q5EK9KCd4aT9QnDJ9JQlTtzDmTk1jYuM6rnccsJ6SW2pcWjbi9FVniw== -"@standardnotes/components@1.7.9": - version "1.7.9" - resolved "https://registry.yarnpkg.com/@standardnotes/components/-/components-1.7.9.tgz#41e5fdbcee250b9b3c18045dad8998c6f668307b" - integrity sha512-/+Paw6ry/IS9ldYUM/lgC4O6qwl1fukWvNw65IMKyB9LMY3+xTh/I2BfnWynP117pVPxtu3/2+FBEnx04KvQwg== +"@standardnotes/components@1.7.10": + version "1.7.10" + resolved "https://registry.yarnpkg.com/@standardnotes/components/-/components-1.7.10.tgz#1b135edda74521c5143760c15df3ec88d6001d5a" + integrity sha512-s+rxAw0o3wlAyq+MMjV7Hh31C+CckZJUer/ueWbRpL60YRl4JYZ7Tbx6ciw6VkxXFwYjW+aIOU0FOASjJrvpmg== -"@standardnotes/domain-events@^2.23.25": - version "2.23.25" - resolved "https://registry.yarnpkg.com/@standardnotes/domain-events/-/domain-events-2.23.25.tgz#bab5773fd1355a94fe35faba995b53ae414e325a" - integrity sha512-2nhsCRAbAowtBvzXgRVBo+o4blz1VfmGLM32TabW1EEXHI1Y5K/qQ7+OrZ9TPkd6B0JNC4od/OCY7rLCma8BEg== +"@standardnotes/domain-events@^2.23.26": + version "2.23.26" + resolved "https://registry.yarnpkg.com/@standardnotes/domain-events/-/domain-events-2.23.26.tgz#310d44e8cc3524ddf6945907b0d0a4fa273d84a8" + integrity sha512-+GS6/Nc9yIXLL+Q9xFKynA+pMTik4Q7sL5VvJC99fRjrYeXZrxPBbJcXZdwtY61F58QYD86MQwpzhEuLGGsseg== dependencies: "@standardnotes/auth" "^3.17.3" - "@standardnotes/features" "^1.34.3" + "@standardnotes/features" "^1.34.4" -"@standardnotes/features@1.34.3", "@standardnotes/features@^1.34.3": - version "1.34.3" - resolved "https://registry.yarnpkg.com/@standardnotes/features/-/features-1.34.3.tgz#4de3259e43cfd2c2d50a0a113439566a6bed8fca" - integrity sha512-WL+nyJsm/mBq2zuR3ZlJ/mJhaVPrm3j7gvBdDr4kxdvMM5y9E4DiYHp98SeUvblIGXWmhZxVc7rdDmVaoYt99g== +"@standardnotes/features@1.34.4", "@standardnotes/features@^1.34.4": + version "1.34.4" + resolved "https://registry.yarnpkg.com/@standardnotes/features/-/features-1.34.4.tgz#171ffb481600195c2cb4f8d23e630ce3f840932a" + integrity sha512-Ej+9s2H208dF8M/hXKkQ+MzGzM4qioPvfF0wmZ/ovz/PyIkGAOGU/l3zxJPI4vov4W7Xvxk6jMAxa1LEOerDuQ== dependencies: "@standardnotes/auth" "^3.17.3" "@standardnotes/common" "^1.15.3" -"@standardnotes/payloads@^1.4.2": - version "1.4.2" - resolved "https://registry.yarnpkg.com/@standardnotes/payloads/-/payloads-1.4.2.tgz#6f9995a4f585fa814f88bfffdb8d973f078d21d6" - integrity sha512-iw2Fhr7oBQgtOtpLnDyCARbP8VWUpT9bhRdgKg47I8Ky5EmyYBcYOf2U8XuXkzypot4+zZNYc5Bgzgs4YXyDzQ== +"@standardnotes/payloads@^1.4.3": + version "1.4.3" + resolved "https://registry.yarnpkg.com/@standardnotes/payloads/-/payloads-1.4.3.tgz#8d146a61d8bf173835ee54a683d1e6cc95ca15ee" + integrity sha512-mwC2EBHjniZBF3eSfkNE45VLGOn0xKWkOcAFb0sSLjouB4Mk90/CG+9gIGVZX8WcpG62A/vVcgvvJtcOtNfK6w== dependencies: "@standardnotes/applications" "^1.1.3" "@standardnotes/common" "^1.15.3" - "@standardnotes/features" "^1.34.3" + "@standardnotes/features" "^1.34.4" "@standardnotes/utils" "^1.2.3" -"@standardnotes/responses@1.3.1", "@standardnotes/responses@^1.3.1": - version "1.3.1" - resolved "https://registry.yarnpkg.com/@standardnotes/responses/-/responses-1.3.1.tgz#2890e679b6e635b14e223a9eb5a5d8c44accd530" - integrity sha512-h9C/DJike0MVQjDkhZhQ8lPCreZKsAuqtEvXpwVl8vcFAOEfeS1BXacvxSlefHx90og6ti9rfF0D/FqzcI+b6Q== +"@standardnotes/responses@1.3.2", "@standardnotes/responses@^1.3.2": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@standardnotes/responses/-/responses-1.3.2.tgz#fc967bc8013bc1df3e627094cce7b44e99fb8ecc" + integrity sha512-d7U9IpngnnAxmT0S0uKPdQgklzykBrHZNj2UlcbwkhAjbSf1mB4nPaEQFa9qjl30YeasK+0EbJjf2G8ThCcE8Q== dependencies: "@standardnotes/auth" "^3.17.3" "@standardnotes/common" "^1.15.3" - "@standardnotes/features" "^1.34.3" - "@standardnotes/payloads" "^1.4.2" + "@standardnotes/features" "^1.34.4" + "@standardnotes/payloads" "^1.4.3" -"@standardnotes/services@1.5.3", "@standardnotes/services@^1.5.3": - version "1.5.3" - resolved "https://registry.yarnpkg.com/@standardnotes/services/-/services-1.5.3.tgz#0cfa7c0336b31c0084e2be976641fb2c36739e5b" - integrity sha512-NBsF5A4hJZPFOASTSJd60dTuVTiyop1IVZGlmvjs2K8UfHG9/ET59BkVwzPsCsSfnoYSJasVJkxnFunkaeJ/OA== +"@standardnotes/services@1.5.4", "@standardnotes/services@^1.5.4": + version "1.5.4" + resolved "https://registry.yarnpkg.com/@standardnotes/services/-/services-1.5.4.tgz#16067c9bd0d8a54e5ea2295e97cbbe4327e80811" + integrity sha512-qyq2KzvDWqUvBLXAdW8KQI1AqpdynSItn3iBzDM+h4U4rJMaAmkPoWtMxVcBAjz7cdHC5xku6t/iAvvKFKqUkA== dependencies: "@standardnotes/applications" "^1.1.3" "@standardnotes/common" "^1.15.3" - "@standardnotes/responses" "^1.3.1" + "@standardnotes/responses" "^1.3.2" "@standardnotes/utils" "^1.2.3" "@standardnotes/settings@1.12.0", "@standardnotes/settings@^1.12.0": @@ -2396,19 +2396,19 @@ buffer "^6.0.3" libsodium-wrappers "^0.7.9" -"@standardnotes/snjs@2.77.1": - version "2.77.1" - resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.77.1.tgz#2af90c0837edfc0508579a8f71686e946a81afb6" - integrity sha512-kbCh63YxQCaKKx2AHonsBgtTlHeBR6SFtmchBIXiSKA4O7USroGJilTUaK2DVyK5L89hwafkZfot7R+nvXD9zQ== +"@standardnotes/snjs@2.77.2": + version "2.77.2" + resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.77.2.tgz#f9a687a81f84b1978b1edf5e0527f4dc2702bef8" + integrity sha512-r5bdOVltdhgJgTI9CrlMoC/jCmvEeLIgkMy5RtT5K6EBOnxu9soxsBA2cvPo6nIs8+m6BS4psLpMBy93Kx/D5w== dependencies: "@standardnotes/applications" "^1.1.3" "@standardnotes/auth" "^3.17.3" "@standardnotes/common" "^1.15.3" - "@standardnotes/domain-events" "^2.23.25" - "@standardnotes/features" "^1.34.3" - "@standardnotes/payloads" "^1.4.2" - "@standardnotes/responses" "^1.3.1" - "@standardnotes/services" "^1.5.3" + "@standardnotes/domain-events" "^2.23.26" + "@standardnotes/features" "^1.34.4" + "@standardnotes/payloads" "^1.4.3" + "@standardnotes/responses" "^1.3.2" + "@standardnotes/services" "^1.5.4" "@standardnotes/settings" "^1.12.0" "@standardnotes/sncrypto-common" "^1.7.3" "@standardnotes/utils" "^1.2.3" From 87631dcb0dea716540649c05103a29049e98c719 Mon Sep 17 00:00:00 2001 From: Johnny A <5891646+johnny243@users.noreply.github.com> Date: Wed, 9 Mar 2022 12:18:39 -0800 Subject: [PATCH 06/12] fix: experimental features not reloading after toggling (#917) Co-authored-by: Johnny Almonte --- .../panes/general-segments/Labs.tsx | 80 +++++++++++-------- 1 file changed, 45 insertions(+), 35 deletions(-) diff --git a/app/assets/javascripts/preferences/panes/general-segments/Labs.tsx b/app/assets/javascripts/preferences/panes/general-segments/Labs.tsx index 9d1370b6c..7c023168e 100644 --- a/app/assets/javascripts/preferences/panes/general-segments/Labs.tsx +++ b/app/assets/javascripts/preferences/panes/general-segments/Labs.tsx @@ -14,16 +14,41 @@ import { useCallback, useEffect, useState } from 'preact/hooks'; import { usePremiumModal } from '@/components/Premium'; import { HorizontalSeparator } from '@/components/shared/HorizontalSeparator'; +type ExperimentalFeatureItem = { + identifier: FeatureIdentifier; + name: string; + description: string; + isEnabled: boolean; + isEntitled: boolean; +}; + type Props = { application: WebApplication; }; export const LabsPane: FunctionComponent = ({ application }) => { - const [experimentalFeatures, setExperimentalFeatures] = - useState(); + const [experimentalFeatures, setExperimentalFeatures] = useState< + ExperimentalFeatureItem[] + >([]); const reloadExperimentalFeatures = useCallback(() => { - const experimentalFeatures = application.features.getExperimentalFeatures(); + const experimentalFeatures = application.features + .getExperimentalFeatures() + .map((featureIdentifier) => { + const feature = FindNativeFeature(featureIdentifier); + return { + identifier: featureIdentifier, + name: feature?.name ?? featureIdentifier, + description: feature?.description ?? '', + isEnabled: + application.features.isExperimentalFeatureEnabled( + featureIdentifier + ), + isEntitled: + application.features.getFeatureStatus(featureIdentifier) === + FeatureStatus.Entitled, + }; + }); setExperimentalFeatures(experimentalFeatures); }, [application.features]); @@ -33,42 +58,23 @@ export const LabsPane: FunctionComponent = ({ application }) => { const premiumModal = usePremiumModal(); - if (!experimentalFeatures) { - return ( -
- No experimental features available. -
- ); - } - return ( Labs
- {experimentalFeatures?.map( - (featureIdentifier: FeatureIdentifier, index: number) => { - const feature = FindNativeFeature(featureIdentifier); - const featureName = feature?.name ?? featureIdentifier; - const featureDescription = feature?.description ?? ''; - - const isFeatureEnabled = - application.features.isExperimentalFeatureEnabled( - featureIdentifier - ); - + {experimentalFeatures.map( + ( + { identifier, name, description, isEnabled, isEntitled }, + index: number + ) => { const toggleFeature = () => { - const isEntitled = - application.features.getFeatureStatus(featureIdentifier) === - FeatureStatus.Entitled; if (!isEntitled) { - premiumModal.activate(featureName); + premiumModal.activate(name); return; } - application.features.toggleExperimentalFeature( - featureIdentifier - ); + application.features.toggleExperimentalFeature(identifier); reloadExperimentalFeatures(); }; @@ -80,13 +86,10 @@ export const LabsPane: FunctionComponent = ({ application }) => { <>
- {featureName} - {featureDescription} + {name} + {description}
- +
{showHorizontalSeparator && ( @@ -95,6 +98,13 @@ export const LabsPane: FunctionComponent = ({ application }) => { ); } )} + {experimentalFeatures.length === 0 && ( +
+
+ No experimental features available. +
+
+ )}
From b31afee10819a6beffd060039eb559ee09895c16 Mon Sep 17 00:00:00 2001 From: Aman Harwara Date: Thu, 10 Mar 2022 13:51:28 +0530 Subject: [PATCH 07/12] feat: add files popover in note toolbar (#913) --- .../components/ApplicationView.tsx | 33 --- .../AttachedFilesButton.tsx | 260 ++++++++++++++++++ .../AttachedFilesPopover.tsx | 195 +++++++++++++ .../PopoverDragNDropWrapper.tsx | 143 ++++++++++ .../AttachedFilesPopover/PopoverFileItem.tsx | 129 +++++++++ .../PopoverFileItemAction.tsx | 32 +++ .../PopoverFileSubmenu.tsx | 188 +++++++++++++ app/assets/javascripts/components/Icon.tsx | 28 +- .../components/NoteView/NoteView.tsx | 28 ++ .../components/NotesOptions/AddTagOption.tsx | 2 - app/assets/javascripts/components/utils.ts | 9 +- app/assets/javascripts/constants.ts | 4 +- .../ui_models/app_state/app_state.ts | 3 + .../ui_models/app_state/files_state.ts | 142 ++++++++++ app/assets/javascripts/utils/index.ts | 6 +- app/assets/stylesheets/_sn.scss | 38 ++- package.json | 12 +- yarn.lock | 122 ++++---- 18 files changed, 1269 insertions(+), 105 deletions(-) create mode 100644 app/assets/javascripts/components/AttachedFilesPopover/AttachedFilesButton.tsx create mode 100644 app/assets/javascripts/components/AttachedFilesPopover/AttachedFilesPopover.tsx create mode 100644 app/assets/javascripts/components/AttachedFilesPopover/PopoverDragNDropWrapper.tsx create mode 100644 app/assets/javascripts/components/AttachedFilesPopover/PopoverFileItem.tsx create mode 100644 app/assets/javascripts/components/AttachedFilesPopover/PopoverFileItemAction.tsx create mode 100644 app/assets/javascripts/components/AttachedFilesPopover/PopoverFileSubmenu.tsx create mode 100644 app/assets/javascripts/ui_models/app_state/files_state.ts diff --git a/app/assets/javascripts/components/ApplicationView.tsx b/app/assets/javascripts/components/ApplicationView.tsx index 2cfc18f39..6210d8da1 100644 --- a/app/assets/javascripts/components/ApplicationView.tsx +++ b/app/assets/javascripts/components/ApplicationView.tsx @@ -8,7 +8,6 @@ import { removeFromArray, } from '@standardnotes/snjs'; import { PANEL_NAME_NOTES, PANEL_NAME_NAVIGATION } from '@/constants'; -import { STRING_DEFAULT_FILE_ERROR } from '@/strings'; import { alertDialog } from '@/services/alertService'; import { WebAppEvent, WebApplication } from '@/ui_models/application'; import { PureComponent } from '@/components/Abstract/PureComponent'; @@ -51,17 +50,10 @@ export class ApplicationView extends PureComponent { appClass: '', challenges: [], }; - this.onDragDrop = this.onDragDrop.bind(this); - this.onDragOver = this.onDragOver.bind(this); - this.addDragDropHandlers(); } deinit() { (this.application as unknown) = undefined; - window.removeEventListener('dragover', this.onDragOver, true); - window.removeEventListener('drop', this.onDragDrop, true); - (this.onDragDrop as unknown) = undefined; - (this.onDragOver as unknown) = undefined; super.deinit(); } @@ -150,31 +142,6 @@ export class ApplicationView extends PureComponent { } } - addDragDropHandlers() { - /** - * Disable dragging and dropping of files (but allow text) into main SN interface. - * both 'dragover' and 'drop' are required to prevent dropping of files. - * This will not prevent extensions from receiving drop events. - */ - window.addEventListener('dragover', this.onDragOver, true); - window.addEventListener('drop', this.onDragDrop, true); - } - - onDragOver(event: DragEvent) { - if (event.dataTransfer?.files.length) { - event.preventDefault(); - } - } - - onDragDrop(event: DragEvent) { - if (event.dataTransfer?.files.length) { - event.preventDefault(); - void alertDialog({ - text: STRING_DEFAULT_FILE_ERROR, - }); - } - } - async handleDemoSignInFromParams() { if ( window.location.href.includes('demo') && diff --git a/app/assets/javascripts/components/AttachedFilesPopover/AttachedFilesButton.tsx b/app/assets/javascripts/components/AttachedFilesPopover/AttachedFilesButton.tsx new file mode 100644 index 000000000..0a21ccea8 --- /dev/null +++ b/app/assets/javascripts/components/AttachedFilesPopover/AttachedFilesButton.tsx @@ -0,0 +1,260 @@ +import { WebApplication } from '@/ui_models/application'; +import { AppState } from '@/ui_models/app_state'; +import { MENU_MARGIN_FROM_APP_BORDER } from '@/constants'; +import { + Disclosure, + DisclosureButton, + DisclosurePanel, +} from '@reach/disclosure'; +import VisuallyHidden from '@reach/visually-hidden'; +import { observer } from 'mobx-react-lite'; +import { FunctionComponent } from 'preact'; +import { useCallback, useEffect, useRef, useState } from 'preact/hooks'; +import { Icon } from '../Icon'; +import { useCloseOnClickOutside } from '../utils'; +import { ChallengeReason, ContentType, SNFile } from '@standardnotes/snjs'; +import { confirmDialog } from '@/services/alertService'; +import { addToast, dismissToast, ToastType } from '@standardnotes/stylekit'; +import { parseFileName } from '@standardnotes/filepicker'; +import { + PopoverFileItemAction, + PopoverFileItemActionType, +} from './PopoverFileItemAction'; +import { PopoverDragNDropWrapper } from './PopoverDragNDropWrapper'; + +type Props = { + application: WebApplication; + appState: AppState; + onClickPreprocessing?: () => Promise; +}; + +export const AttachedFilesButton: FunctionComponent = observer( + ({ application, appState, onClickPreprocessing }) => { + const note = Object.values(appState.notes.selectedNotes)[0]; + + const [open, setOpen] = useState(false); + const [position, setPosition] = useState({ + top: 0, + right: 0, + }); + const [maxHeight, setMaxHeight] = useState('auto'); + const buttonRef = useRef(null); + const panelRef = useRef(null); + const containerRef = useRef(null); + useCloseOnClickOutside(containerRef, () => { + setOpen(false); + }); + + const [attachedFilesCount, setAttachedFilesCount] = useState( + note ? application.items.getFilesForNote(note).length : 0 + ); + + const reloadAttachedFilesCount = useCallback(() => { + setAttachedFilesCount( + note ? application.items.getFilesForNote(note).length : 0 + ); + }, [application.items, note]); + + useEffect(() => { + const unregisterFileStream = application.streamItems( + ContentType.File, + () => { + reloadAttachedFilesCount(); + } + ); + + return () => { + unregisterFileStream(); + }; + }, [application, reloadAttachedFilesCount]); + + const toggleAttachedFilesMenu = async () => { + const rect = buttonRef.current?.getBoundingClientRect(); + if (rect) { + const { clientHeight } = document.documentElement; + const footerElementRect = document + .getElementById('footer-bar') + ?.getBoundingClientRect(); + const footerHeightInPx = footerElementRect?.height; + + if (footerHeightInPx) { + setMaxHeight( + clientHeight - + rect.bottom - + footerHeightInPx - + MENU_MARGIN_FROM_APP_BORDER + ); + } + + setPosition({ + top: rect.bottom, + right: document.body.clientWidth - rect.right, + }); + + const newOpenState = !open; + if (newOpenState && onClickPreprocessing) { + await onClickPreprocessing(); + } + + setOpen(newOpenState); + } + }; + + const deleteFile = async (file: SNFile) => { + const shouldDelete = await confirmDialog({ + text: `Are you sure you want to permanently delete "${file.nameWithExt}"?`, + confirmButtonStyle: 'danger', + }); + if (shouldDelete) { + const deletingToastId = addToast({ + type: ToastType.Loading, + message: `Deleting file "${file.nameWithExt}"...`, + }); + await application.deleteItem(file); + addToast({ + type: ToastType.Success, + message: `Deleted file "${file.nameWithExt}"`, + }); + dismissToast(deletingToastId); + } + }; + + const downloadFile = async (file: SNFile) => { + appState.files.downloadFile(file); + }; + + const attachFileToNote = async (file: SNFile) => { + await application.items.associateFileWithNote(file, note); + }; + + const detachFileFromNote = async (file: SNFile) => { + await application.items.disassociateFileWithNote(file, note); + }; + + const toggleFileProtection = async (file: SNFile) => { + let result: SNFile | undefined; + if (file.protected) { + result = await application.protections.unprotectFile(file); + } else { + result = await application.protections.protectFile(file); + } + const isProtected = result ? result.protected : file.protected; + return isProtected; + }; + + const authorizeProtectedActionForFile = async ( + file: SNFile, + challengeReason: ChallengeReason + ) => { + const authorizedFiles = + await application.protections.authorizeProtectedActionForFiles( + [file], + challengeReason + ); + const isAuthorized = + authorizedFiles.length > 0 && authorizedFiles.includes(file); + return isAuthorized; + }; + + const renameFile = async (file: SNFile, fileName: string) => { + const { name, ext } = parseFileName(fileName); + await application.items.renameFile(file, name, ext); + }; + + const handleFileAction = async (action: PopoverFileItemAction) => { + const file = + action.type !== PopoverFileItemActionType.RenameFile + ? action.payload + : action.payload.file; + let isAuthorizedForAction = true; + + if ( + file.protected && + action.type !== PopoverFileItemActionType.ToggleFileProtection + ) { + isAuthorizedForAction = await authorizeProtectedActionForFile( + file, + ChallengeReason.AccessProtectedFile + ); + } + + if (!isAuthorizedForAction) { + return false; + } + + switch (action.type) { + case PopoverFileItemActionType.AttachFileToNote: + await attachFileToNote(file); + break; + case PopoverFileItemActionType.DetachFileToNote: + await detachFileFromNote(file); + break; + case PopoverFileItemActionType.DeleteFile: + await deleteFile(file); + break; + case PopoverFileItemActionType.DownloadFile: + await downloadFile(file); + break; + case PopoverFileItemActionType.ToggleFileProtection: { + const isProtected = await toggleFileProtection(file); + action.callback(isProtected); + break; + } + case PopoverFileItemActionType.RenameFile: + await renameFile(file, action.payload.name); + break; + } + + application.sync.sync(); + + return true; + }; + + return ( +
+ + { + if (event.key === 'Escape') { + setOpen(false); + } + }} + ref={buttonRef} + className={`sn-icon-button border-contrast ${ + attachedFilesCount > 0 ? 'py-1 px-3' : '' + }`} + > + Attached files + + {attachedFilesCount > 0 && ( + {attachedFilesCount} + )} + + { + if (event.key === 'Escape') { + setOpen(false); + buttonRef.current?.focus(); + } + }} + ref={panelRef} + style={{ + ...position, + maxHeight, + }} + className="sn-dropdown sn-dropdown--animated min-w-80 max-h-120 max-w-xs flex flex-col overflow-y-auto fixed" + > + {open && ( + + )} + + +
+ ); + } +); diff --git a/app/assets/javascripts/components/AttachedFilesPopover/AttachedFilesPopover.tsx b/app/assets/javascripts/components/AttachedFilesPopover/AttachedFilesPopover.tsx new file mode 100644 index 000000000..996d3d20d --- /dev/null +++ b/app/assets/javascripts/components/AttachedFilesPopover/AttachedFilesPopover.tsx @@ -0,0 +1,195 @@ +import { ContentType, SNFile } from '@standardnotes/snjs'; +import { FilesIllustration } from '@standardnotes/stylekit'; +import { observer } from 'mobx-react-lite'; +import { FunctionComponent } from 'preact'; +import { StateUpdater, useCallback, useEffect, useState } from 'preact/hooks'; +import { Button } from '../Button'; +import { Icon } from '../Icon'; +import { PopoverTabs, PopoverWrapperProps } from './PopoverDragNDropWrapper'; +import { PopoverFileItem } from './PopoverFileItem'; +import { PopoverFileItemActionType } from './PopoverFileItemAction'; + +type Props = PopoverWrapperProps & { + currentTab: PopoverTabs; + setCurrentTab: StateUpdater; +}; + +export const AttachedFilesPopover: FunctionComponent = observer( + ({ + application, + appState, + note, + fileActionHandler, + currentTab, + setCurrentTab, + }) => { + const [attachedFiles, setAttachedFiles] = useState([]); + const [allFiles, setAllFiles] = useState([]); + const [searchQuery, setSearchQuery] = useState(''); + + const filesList = + currentTab === PopoverTabs.AttachedFiles ? attachedFiles : allFiles; + + const filteredList = + searchQuery.length > 0 + ? filesList.filter( + (file) => file.nameWithExt.toLowerCase().indexOf(searchQuery) !== -1 + ) + : filesList; + + const reloadAttachedFiles = useCallback(() => { + setAttachedFiles( + application.items + .getFilesForNote(note) + .sort((a, b) => (a.created_at < b.created_at ? 1 : -1)) + ); + }, [application.items, note]); + + const reloadAllFiles = useCallback(() => { + setAllFiles( + application + .getItems(ContentType.File) + .sort((a, b) => (a.created_at < b.created_at ? 1 : -1)) as SNFile[] + ); + }, [application]); + + useEffect(() => { + const unregisterFileStream = application.streamItems( + ContentType.File, + () => { + reloadAttachedFiles(); + reloadAllFiles(); + } + ); + + return () => { + unregisterFileStream(); + }; + }, [application, reloadAllFiles, reloadAttachedFiles]); + + const handleAttachFilesClick = async () => { + const uploadedFiles = await appState.files.uploadNewFile(); + if (!uploadedFiles) { + return; + } + if (currentTab === PopoverTabs.AttachedFiles) { + uploadedFiles.forEach((file) => { + fileActionHandler({ + type: PopoverFileItemActionType.AttachFileToNote, + payload: file, + }); + }); + } + }; + + return ( +
+
+ + +
+
+ {filteredList.length > 0 || searchQuery.length > 0 ? ( +
+
+ { + setSearchQuery((e.target as HTMLInputElement).value); + }} + /> + {searchQuery.length > 0 && ( + + )} +
+
+ ) : null} + {filteredList.length > 0 ? ( + filteredList.map((file: SNFile) => { + return ( + + ); + }) + ) : ( +
+
+ +
+
+ {searchQuery.length > 0 + ? 'No result found' + : currentTab === PopoverTabs.AttachedFiles + ? 'No files attached to this note' + : 'No files found in this account'} +
+ +
+ Or drop your files here +
+
+ )} +
+ {filteredList.length > 0 && ( + + )} +
+ ); + } +); diff --git a/app/assets/javascripts/components/AttachedFilesPopover/PopoverDragNDropWrapper.tsx b/app/assets/javascripts/components/AttachedFilesPopover/PopoverDragNDropWrapper.tsx new file mode 100644 index 000000000..487b4e61e --- /dev/null +++ b/app/assets/javascripts/components/AttachedFilesPopover/PopoverDragNDropWrapper.tsx @@ -0,0 +1,143 @@ +import { FOCUSABLE_BUT_NOT_TABBABLE } from '@/constants'; +import { WebApplication } from '@/ui_models/application'; +import { AppState } from '@/ui_models/app_state'; +import { StreamingFileReader } from '@standardnotes/filepicker'; +import { SNNote } from '@standardnotes/snjs'; +import { FunctionComponent } from 'preact'; +import { useCallback, useEffect, useRef, useState } from 'preact/hooks'; +import { AttachedFilesPopover } from './AttachedFilesPopover'; +import { + PopoverFileItemAction, + PopoverFileItemActionType, +} from './PopoverFileItemAction'; + +export enum PopoverTabs { + AttachedFiles, + AllFiles, +} + +export type PopoverWrapperProps = { + application: WebApplication; + appState: AppState; + note: SNNote; + fileActionHandler: (action: PopoverFileItemAction) => Promise; +}; + +export const PopoverDragNDropWrapper: FunctionComponent< + PopoverWrapperProps +> = ({ fileActionHandler, appState, application, note }) => { + const dropzoneRef = useRef(null); + + const [isDragging, setIsDragging] = useState(false); + const [currentTab, setCurrentTab] = useState(PopoverTabs.AttachedFiles); + const dragCounter = useRef(0); + + const handleDrag = (event: DragEvent) => { + event.preventDefault(); + event.stopPropagation(); + }; + + const handleDragIn = (event: DragEvent) => { + event.preventDefault(); + event.stopPropagation(); + + dragCounter.current = dragCounter.current + 1; + + if (event.dataTransfer?.items.length) { + setIsDragging(true); + } + }; + + const handleDragOut = (event: DragEvent) => { + event.preventDefault(); + event.stopPropagation(); + + dragCounter.current = dragCounter.current - 1; + + if (dragCounter.current > 0) { + return; + } + + setIsDragging(false); + }; + + const handleDrop = useCallback( + (event: DragEvent) => { + event.preventDefault(); + event.stopPropagation(); + + setIsDragging(false); + + if (event.dataTransfer?.items.length) { + Array.from(event.dataTransfer.items).forEach(async (item) => { + let fileOrHandle; + if (StreamingFileReader.available()) { + fileOrHandle = + (await item.getAsFileSystemHandle()) as FileSystemFileHandle; + } else { + fileOrHandle = item.getAsFile(); + } + if (fileOrHandle) { + const uploadedFiles = await appState.files.uploadNewFile( + fileOrHandle + ); + if (!uploadedFiles) { + return; + } + + if (currentTab === PopoverTabs.AttachedFiles) { + uploadedFiles.forEach((file) => { + fileActionHandler({ + type: PopoverFileItemActionType.AttachFileToNote, + payload: file, + }); + }); + } + } + }); + + event.dataTransfer.clearData(); + dragCounter.current = 0; + } + }, + [appState.files, currentTab, fileActionHandler] + ); + + useEffect(() => { + const dropzoneElement = dropzoneRef.current; + + if (dropzoneElement) { + dropzoneElement.addEventListener('dragenter', handleDragIn); + dropzoneElement.addEventListener('dragleave', handleDragOut); + dropzoneElement.addEventListener('dragover', handleDrag); + dropzoneElement.addEventListener('drop', handleDrop); + } + + return () => { + dropzoneElement?.removeEventListener('dragenter', handleDragIn); + dropzoneElement?.removeEventListener('dragleave', handleDragOut); + dropzoneElement?.removeEventListener('dragover', handleDrag); + dropzoneElement?.removeEventListener('drop', handleDrop); + }; + }, [handleDrop]); + + return ( +
+ +
+ ); +}; diff --git a/app/assets/javascripts/components/AttachedFilesPopover/PopoverFileItem.tsx b/app/assets/javascripts/components/AttachedFilesPopover/PopoverFileItem.tsx new file mode 100644 index 000000000..dee6cb335 --- /dev/null +++ b/app/assets/javascripts/components/AttachedFilesPopover/PopoverFileItem.tsx @@ -0,0 +1,129 @@ +import { KeyboardKey } from '@/services/ioService'; +import { formatSizeToReadableString } from '@standardnotes/filepicker'; +import { SNFile } from '@standardnotes/snjs'; +import { FunctionComponent } from 'preact'; +import { useEffect, useRef, useState } from 'preact/hooks'; +import { ICONS } from '../Icon'; +import { + PopoverFileItemAction, + PopoverFileItemActionType, +} from './PopoverFileItemAction'; +import { PopoverFileSubmenu } from './PopoverFileSubmenu'; + +const getIconForFileType = (fileType: string) => { + let iconType = 'file-other'; + + if (fileType === 'pdf') { + iconType = 'file-pdf'; + } + + if (/^(docx?|odt)/.test(fileType)) { + iconType = 'file-doc'; + } + + if (/^pptx?/.test(fileType)) { + iconType = 'file-ppt'; + } + + if (/^(xlsx?|ods)/.test(fileType)) { + iconType = 'file-xls'; + } + + if (/^(jpe?g|a?png|webp|gif)/.test(fileType)) { + iconType = 'file-image'; + } + + if (/^(mov|mp4|mkv)/.test(fileType)) { + iconType = 'file-mov'; + } + + if (/^(wav|mp3|flac|ogg)/.test(fileType)) { + iconType = 'file-music'; + } + + if (/^(zip|rar|7z)/.test(fileType)) { + iconType = 'file-zip'; + } + + const IconComponent = ICONS[iconType as keyof typeof ICONS]; + + return ; +}; + +export type PopoverFileItemProps = { + file: SNFile; + isAttachedToNote: boolean; + handleFileAction: (action: PopoverFileItemAction) => Promise; +}; + +export const PopoverFileItem: FunctionComponent = ({ + file, + isAttachedToNote, + handleFileAction, +}) => { + const [fileName, setFileName] = useState(file.nameWithExt); + const [isRenamingFile, setIsRenamingFile] = useState(false); + const fileNameInputRef = useRef(null); + + useEffect(() => { + if (isRenamingFile) { + fileNameInputRef.current?.focus(); + } + }, [isRenamingFile]); + + const renameFile = async (file: SNFile, name: string) => { + const didRename = await handleFileAction({ + type: PopoverFileItemActionType.RenameFile, + payload: { + file, + name, + }, + }); + if (didRename) { + setIsRenamingFile(false); + } + }; + + const handleFileNameInput = (event: Event) => { + setFileName((event.target as HTMLInputElement).value); + }; + + const handleFileNameInputKeyDown = (event: KeyboardEvent) => { + if (event.key === KeyboardKey.Enter) { + renameFile(file, fileName); + return; + } + }; + + return ( +
+
+ {getIconForFileType(file.ext ?? '')} +
+ {isRenamingFile ? ( + + ) : ( +
{file.nameWithExt}
+ )} +
+ {file.created_at.toLocaleString()} ·{' '} + {formatSizeToReadableString(file.size)} +
+
+
+ +
+ ); +}; diff --git a/app/assets/javascripts/components/AttachedFilesPopover/PopoverFileItemAction.tsx b/app/assets/javascripts/components/AttachedFilesPopover/PopoverFileItemAction.tsx new file mode 100644 index 000000000..dd10b01ef --- /dev/null +++ b/app/assets/javascripts/components/AttachedFilesPopover/PopoverFileItemAction.tsx @@ -0,0 +1,32 @@ +import { SNFile } from '@standardnotes/snjs'; + +export enum PopoverFileItemActionType { + AttachFileToNote, + DetachFileToNote, + DeleteFile, + DownloadFile, + RenameFile, + ToggleFileProtection, +} + +export type PopoverFileItemAction = + | { + type: Exclude< + PopoverFileItemActionType, + | PopoverFileItemActionType.RenameFile + | PopoverFileItemActionType.ToggleFileProtection + >; + payload: SNFile; + } + | { + type: PopoverFileItemActionType.ToggleFileProtection; + payload: SNFile; + callback: (isProtected: boolean) => void; + } + | { + type: PopoverFileItemActionType.RenameFile; + payload: { + file: SNFile; + name: string; + }; + }; diff --git a/app/assets/javascripts/components/AttachedFilesPopover/PopoverFileSubmenu.tsx b/app/assets/javascripts/components/AttachedFilesPopover/PopoverFileSubmenu.tsx new file mode 100644 index 000000000..f585b2268 --- /dev/null +++ b/app/assets/javascripts/components/AttachedFilesPopover/PopoverFileSubmenu.tsx @@ -0,0 +1,188 @@ +import { FOCUSABLE_BUT_NOT_TABBABLE } from '@/constants'; +import { + calculateSubmenuStyle, + SubmenuStyle, +} from '@/utils/calculateSubmenuStyle'; +import { + Disclosure, + DisclosureButton, + DisclosurePanel, +} from '@reach/disclosure'; +import { FunctionComponent } from 'preact'; +import { + StateUpdater, + useCallback, + useEffect, + useRef, + useState, +} from 'preact/hooks'; +import { Icon } from '../Icon'; +import { Switch } from '../Switch'; +import { useCloseOnBlur } from '../utils'; +import { PopoverFileItemProps } from './PopoverFileItem'; +import { PopoverFileItemActionType } from './PopoverFileItemAction'; + +type Props = Omit & { + setIsRenamingFile: StateUpdater; +}; + +export const PopoverFileSubmenu: FunctionComponent = ({ + file, + isAttachedToNote, + handleFileAction, + setIsRenamingFile, +}) => { + const menuContainerRef = useRef(null); + const menuButtonRef = useRef(null); + const menuRef = useRef(null); + + const [isMenuOpen, setIsMenuOpen] = useState(false); + const [isFileProtected, setIsFileProtected] = useState(file.protected); + const [menuStyle, setMenuStyle] = useState({ + right: 0, + bottom: 0, + maxHeight: 'auto', + }); + const [closeOnBlur] = useCloseOnBlur(menuContainerRef, setIsMenuOpen); + + const closeMenu = () => { + setIsMenuOpen(false); + }; + + const toggleMenu = () => { + if (!isMenuOpen) { + const menuPosition = calculateSubmenuStyle(menuButtonRef.current); + if (menuPosition) { + setMenuStyle(menuPosition); + } + } + + setIsMenuOpen(!isMenuOpen); + }; + + const recalculateMenuStyle = useCallback(() => { + const newMenuPosition = calculateSubmenuStyle( + menuButtonRef.current, + menuRef.current + ); + + if (newMenuPosition) { + setMenuStyle(newMenuPosition); + } + }, []); + + useEffect(() => { + if (isMenuOpen) { + setTimeout(() => { + recalculateMenuStyle(); + }); + } + }, [isMenuOpen, recalculateMenuStyle]); + + return ( +
+ + + + + + {isMenuOpen && ( + <> + {isAttachedToNote ? ( + + ) : ( + + )} +
+ +
+ + + + )} +
+
+
+ ); +}; diff --git a/app/assets/javascripts/components/Icon.tsx b/app/assets/javascripts/components/Icon.tsx index 196a63e45..b7c24f52b 100644 --- a/app/assets/javascripts/components/Icon.tsx +++ b/app/assets/javascripts/components/Icon.tsx @@ -9,6 +9,7 @@ import { ArrowLeftIcon, ArrowsSortDownIcon, ArrowsSortUpIcon, + AttachmentFileIcon, AuthenticatorIcon, CheckBoldIcon, CheckCircleIcon, @@ -17,6 +18,7 @@ import { ChevronRightIcon, CloseIcon, CloudOffIcon, + ClearCircleFilledIcon, CodeIcon, CopyIcon, DashboardIcon, @@ -25,12 +27,22 @@ import { EmailIcon, EyeIcon, EyeOffIcon, + FileDocIcon, + FileImageIcon, + FileMovIcon, + FileMusicIcon, + FileOtherIcon, + FilePdfIcon, + FilePptIcon, + FileXlsIcon, + FileZipIcon, HashtagIcon, HashtagOffIcon, HelpIcon, HistoryIcon, InfoIcon, KeyboardIcon, + LinkIcon, LinkOffIcon, ListBulleted, ListedIcon, @@ -44,9 +56,9 @@ import { MoreIcon, NotesIcon, PasswordIcon, - PencilOffIcon, PencilFilledIcon, PencilIcon, + PencilOffIcon, PinFilledIcon, PinIcon, PlainTextIcon, @@ -75,17 +87,28 @@ import { WindowIcon, } from '@standardnotes/stylekit'; -const ICONS = { +export const ICONS = { 'account-circle': AccountCircleIcon, 'arrow-left': ArrowLeftIcon, 'arrows-sort-down': ArrowsSortDownIcon, 'arrows-sort-up': ArrowsSortUpIcon, + 'attachment-file': AttachmentFileIcon, 'check-bold': CheckBoldIcon, 'check-circle': CheckCircleIcon, 'chevron-down': ChevronDownIcon, 'chevron-right': ChevronRightIcon, 'cloud-off': CloudOffIcon, + 'clear-circle-filled': ClearCircleFilledIcon, 'eye-off': EyeOffIcon, + 'file-doc': FileDocIcon, + 'file-image': FileImageIcon, + 'file-mov': FileMovIcon, + 'file-music': FileMusicIcon, + 'file-other': FileOtherIcon, + 'file-pdf': FilePdfIcon, + 'file-ppt': FilePptIcon, + 'file-xls': FileXlsIcon, + 'file-zip': FileZipIcon, 'hashtag-off': HashtagOffIcon, 'link-off': LinkOffIcon, 'list-bulleted': ListBulleted, @@ -121,6 +144,7 @@ const ICONS = { history: HistoryIcon, info: InfoIcon, keyboard: KeyboardIcon, + link: LinkIcon, listed: ListedIcon, lock: LockIcon, markdown: MarkdownIcon, diff --git a/app/assets/javascripts/components/NoteView/NoteView.tsx b/app/assets/javascripts/components/NoteView/NoteView.tsx index 4de1ad6a9..33d8f21bb 100644 --- a/app/assets/javascripts/components/NoteView/NoteView.tsx +++ b/app/assets/javascripts/components/NoteView/NoteView.tsx @@ -17,6 +17,8 @@ import { ItemMutator, ProposedSecondsToDeferUILevelSessionExpirationDuringActiveInteraction, NoteViewController, + FeatureIdentifier, + FeatureStatus, } from '@standardnotes/snjs'; import { debounce, isDesktopApplication } from '@/utils'; import { KeyboardModifier, KeyboardKey } from '@/services/ioService'; @@ -37,6 +39,7 @@ import { ComponentView } from '../ComponentView'; import { PanelSide, PanelResizer, PanelResizeType } from '../PanelResizer'; import { ElementIds } from '@/element_ids'; import { ChangeEditorButton } from '../ChangeEditorButton'; +import { AttachedFilesButton } from '../AttachedFilesPopover/AttachedFilesButton'; const MINIMUM_STATUS_DURATION = 400; const TEXTAREA_DEBOUNCE = 100; @@ -100,6 +103,7 @@ type State = { editorTitle: string; editorText: string; isDesktop?: boolean; + isEntitledToFiles: boolean; lockText: string; marginResizersEnabled?: boolean; monospaceFont?: boolean; @@ -168,6 +172,9 @@ export class NoteView extends PureComponent { editorText: '', editorTitle: '', isDesktop: isDesktopApplication(), + isEntitledToFiles: + this.application.features.getFeatureStatus(FeatureIdentifier.Files) === + FeatureStatus.Entitled, lockText: 'Note Editing Disabled', noteStatus: undefined, noteLocked: this.controller.note.locked, @@ -321,6 +328,15 @@ export class NoteView extends PureComponent { /** @override */ async onAppEvent(eventName: ApplicationEvent) { switch (eventName) { + case ApplicationEvent.FeaturesUpdated: + case ApplicationEvent.UserRolesChanged: + this.setState({ + isEntitledToFiles: + this.application.features.getFeatureStatus( + FeatureIdentifier.Files + ) === FeatureStatus.Entitled, + }); + break; case ApplicationEvent.PreferencesChanged: this.reloadPreferences(); break; @@ -1027,6 +1043,18 @@ export class NoteView extends PureComponent { )}
+ {this.state.isEntitledToFiles && + window.enabledUnfinishedFeatures && ( +
+ +
+ )}
= observer( const menuPosition = calculateSubmenuStyle(menuButtonRef.current); if (menuPosition) { setMenuStyle(menuPosition); - console.log(menuPosition); } } @@ -53,7 +52,6 @@ export const AddTagOption: FunctionComponent = observer( if (newMenuPosition) { setMenuStyle(newMenuPosition); - console.log(newMenuPosition); } }, []); diff --git a/app/assets/javascripts/components/utils.ts b/app/assets/javascripts/components/utils.ts index 4fc543b8f..33f04f67e 100644 --- a/app/assets/javascripts/components/utils.ts +++ b/app/assets/javascripts/components/utils.ts @@ -46,8 +46,13 @@ export function useCloseOnClickOutside( if (!container.current) { return; } - const isDescendant = container.current.contains(event.target as Node); - if (!isDescendant) { + const isDescendantOfContainer = container.current.contains( + event.target as Node + ); + const isDescendantOfDialog = (event.target as HTMLElement).closest( + '[role="dialog"]' + ); + if (!isDescendantOfContainer && !isDescendantOfDialog) { callback(); } }, diff --git a/app/assets/javascripts/constants.ts b/app/assets/javascripts/constants.ts index 19a24688d..3e18aa7c7 100644 --- a/app/assets/javascripts/constants.ts +++ b/app/assets/javascripts/constants.ts @@ -13,4 +13,6 @@ export const NOTES_LIST_SCROLL_THRESHOLD = 200; export const MILLISECONDS_IN_A_DAY = 1000 * 60 * 60 * 24; export const DAYS_IN_A_WEEK = 7; export const DAYS_IN_A_YEAR = 365; -export const BYTES_IN_ONE_MEGABYTE = 1000000; + +export const BYTES_IN_ONE_KILOBYTE = 1_000; +export const BYTES_IN_ONE_MEGABYTE = 1_000_000; diff --git a/app/assets/javascripts/ui_models/app_state/app_state.ts b/app/assets/javascripts/ui_models/app_state/app_state.ts index ecd81c7af..f67fe522f 100644 --- a/app/assets/javascripts/ui_models/app_state/app_state.ts +++ b/app/assets/javascripts/ui_models/app_state/app_state.ts @@ -26,6 +26,7 @@ import { } from 'mobx'; import { ActionsMenuState } from './actions_menu_state'; import { FeaturesState } from './features_state'; +import { FilesState } from './files_state'; import { NotesState } from './notes_state'; import { NotesViewState } from './notes_view_state'; import { NoteTagsState } from './note_tags_state'; @@ -89,6 +90,7 @@ export class AppState { readonly tags: TagsState; readonly notesView: NotesViewState; readonly subscription: SubscriptionState; + readonly files: FilesState; isSessionsModalVisible = false; @@ -139,6 +141,7 @@ export class AppState { this, this.appEventObserverRemovers ); + this.files = new FilesState(application); this.addAppEventObserver(); this.streamNotesAndTags(); this.onVisibilityChange = () => { diff --git a/app/assets/javascripts/ui_models/app_state/files_state.ts b/app/assets/javascripts/ui_models/app_state/files_state.ts new file mode 100644 index 000000000..526b48a33 --- /dev/null +++ b/app/assets/javascripts/ui_models/app_state/files_state.ts @@ -0,0 +1,142 @@ +import { + ClassicFileReader, + StreamingFileReader, + StreamingFileSaver, + ClassicFileSaver, +} from '@standardnotes/filepicker'; +import { SNFile } from '@standardnotes/snjs'; +import { addToast, dismissToast, ToastType } from '@standardnotes/stylekit'; + +import { WebApplication } from '../application'; + +export class FilesState { + constructor(private application: WebApplication) {} + + public async downloadFile(file: SNFile): Promise { + let downloadingToastId = ''; + + try { + const saver = StreamingFileSaver.available() + ? new StreamingFileSaver(file.nameWithExt) + : new ClassicFileSaver(); + + const isUsingStreamingSaver = saver instanceof StreamingFileSaver; + + if (isUsingStreamingSaver) { + await saver.selectFileToSaveTo(); + } + + downloadingToastId = addToast({ + type: ToastType.Loading, + message: `Downloading file...`, + }); + + await this.application.files.downloadFile( + file, + async (decryptedBytes: Uint8Array) => { + if (isUsingStreamingSaver) { + await saver.pushBytes(decryptedBytes); + } else { + saver.saveFile(file.nameWithExt, decryptedBytes); + } + } + ); + + if (isUsingStreamingSaver) { + await saver.finish(); + } + + addToast({ + type: ToastType.Success, + message: 'Successfully downloaded file', + }); + } catch (error) { + console.error(error); + + addToast({ + type: ToastType.Error, + message: 'There was an error while downloading the file', + }); + } + + if (downloadingToastId.length > 0) { + dismissToast(downloadingToastId); + } + } + + public async uploadNewFile(fileOrHandle?: File | FileSystemFileHandle) { + let toastId = ''; + + try { + const minimumChunkSize = this.application.files.minimumChunkSize(); + + const picker = StreamingFileReader.available() + ? StreamingFileReader + : ClassicFileReader; + + const selectedFiles = + fileOrHandle instanceof File + ? [fileOrHandle] + : StreamingFileReader.available() && + fileOrHandle instanceof FileSystemFileHandle + ? await StreamingFileReader.getFilesFromHandles([fileOrHandle]) + : await picker.selectFiles(); + + const uploadedFiles: SNFile[] = []; + + for (const file of selectedFiles) { + const operation = await this.application.files.beginNewFileUpload(); + + const onChunk = async ( + chunk: Uint8Array, + index: number, + isLast: boolean + ) => { + await this.application.files.pushBytesForUpload( + operation, + chunk, + index, + isLast + ); + }; + + toastId = addToast({ + type: ToastType.Loading, + message: `Uploading file "${file.name}"...`, + }); + + const fileResult = await picker.readFile( + file, + minimumChunkSize, + onChunk + ); + + const uploadedFile = await this.application.files.finishUpload( + operation, + fileResult.name, + fileResult.ext + ); + + uploadedFiles.push(uploadedFile); + + dismissToast(toastId); + addToast({ + type: ToastType.Success, + message: `Uploaded file "${uploadedFile.nameWithExt}"`, + }); + } + + return uploadedFiles; + } catch (error) { + console.error(error); + + if (toastId.length > 0) { + dismissToast(toastId); + } + addToast({ + type: ToastType.Error, + message: 'There was an error while uploading the file', + }); + } + } +} diff --git a/app/assets/javascripts/utils/index.ts b/app/assets/javascripts/utils/index.ts index c802e760f..f16780ca7 100644 --- a/app/assets/javascripts/utils/index.ts +++ b/app/assets/javascripts/utils/index.ts @@ -1,6 +1,10 @@ import { Platform, platformFromString } from '@standardnotes/snjs'; import { IsDesktopPlatform, IsWebPlatform } from '@/version'; -import { EMAIL_REGEX } from '../constants'; +import { + BYTES_IN_ONE_KILOBYTE, + BYTES_IN_ONE_MEGABYTE, + EMAIL_REGEX, +} from '../constants'; export { isMobile } from './isMobile'; declare const process: { diff --git a/app/assets/stylesheets/_sn.scss b/app/assets/stylesheets/_sn.scss index 503ca21b4..7ec1f9d25 100644 --- a/app/assets/stylesheets/_sn.scss +++ b/app/assets/stylesheets/_sn.scss @@ -258,6 +258,11 @@ margin-right: 3rem; } +.mx-4 { + margin-left: 1rem; + margin-right: 1rem; +} + .my-0\.5 { margin-top: 0.125rem; margin-bottom: 0.125rem; @@ -328,6 +333,10 @@ width: 0.75rem; } +.w-18 { + width: 4.5rem; +} + .w-26 { width: 6.5rem; } @@ -428,6 +437,10 @@ max-height: 1.25rem; } +.max-h-110 { + max-height: 27.5rem; +} + .border-danger { border-color: var(--sn-stylekit-danger-color); } @@ -517,6 +530,11 @@ padding-right: 0; } +.px-1\.5 { + padding-left: 0.375rem; + padding-right: 0.375rem; +} + .px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; @@ -576,6 +594,10 @@ font-weight: 500; } +.sticky { + position: sticky; +} + .top-30\% { top: 30%; } @@ -640,6 +662,10 @@ right: 0; } +.right-2 { + right: 0.5rem; +} + .-right-2 { right: -0.5rem; } @@ -906,6 +932,10 @@ var(--sn-stylekit-info-color) -1px -1px 0px 0px inset; } +.focus\:shadow-bottom:focus { + box-shadow: currentcolor 0px -1px 0px 0px inset, currentcolor 0px 1px 0px 0px; +} + .bg-note-size-warning { background-color: rgba(235, 173, 0, 0.08); } @@ -960,13 +990,15 @@ } .transition { - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; - transition-timing-function: cubic-bezier(.4,0,.2,1); + transition-property: color, background-color, border-color, + text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, + backdrop-filter; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 100ms; } .animate-fade-from-top { - animation: fade-from-top .2s ease-out; + animation: fade-from-top 0.2s ease-out; } @keyframes fade-from-top { diff --git a/package.json b/package.json index 6a64373f4..6d07eb49e 100644 --- a/package.json +++ b/package.json @@ -27,13 +27,14 @@ "@babel/preset-typescript": "^7.16.7", "@reach/disclosure": "^0.16.2", "@reach/visually-hidden": "^0.16.0", - "@standardnotes/responses": "1.3.2", - "@standardnotes/services": "1.5.4", + "@standardnotes/responses": "1.3.4", + "@standardnotes/services": "1.5.6", "@standardnotes/stylekit": "5.15.0", "@svgr/webpack": "^6.2.1", "@types/jest": "^27.4.1", "@types/lodash": "^4.14.179", "@types/react": "^17.0.39", + "@types/wicg-file-system-access": "^2020.9.5", "@typescript-eslint/eslint-plugin": "^5.14.0", "@typescript-eslint/parser": "^5.14.0", "apply-loader": "^2.0.0", @@ -71,7 +72,7 @@ "webpack-merge": "^5.8.0" }, "dependencies": { - "@bugsnag/js": "^7.16.1", + "@bugsnag/js": "^7.16.2", "@reach/alert": "^0.16.0", "@reach/alert-dialog": "^0.16.2", "@reach/checkbox": "^0.16.0", @@ -79,10 +80,11 @@ "@reach/listbox": "^0.16.2", "@reach/tooltip": "^0.16.2", "@standardnotes/components": "1.7.10", - "@standardnotes/features": "1.34.4", + "@standardnotes/features": "1.34.5", + "@standardnotes/filepicker": "1.8.0", "@standardnotes/settings": "1.12.0", "@standardnotes/sncrypto-web": "1.7.3", - "@standardnotes/snjs": "2.77.2", + "@standardnotes/snjs": "2.79.0", "mobx": "^6.4.2", "mobx-react-lite": "^3.3.0", "preact": "^10.6.6", diff --git a/yarn.lock b/yarn.lock index 3aa7534f6..9550cec07 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1751,10 +1751,10 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@bugsnag/browser@^7.16.1": - version "7.16.1" - resolved "https://registry.yarnpkg.com/@bugsnag/browser/-/browser-7.16.1.tgz#652aa3ed64e51ba0015878d252a08917429bba03" - integrity sha512-Tq9fWpwmqdOsbedYL67GzsTKrG5MERIKtnKCi5FyvFjTj143b6as0pwj7LWQ+Eh8grWlR7S11+VvJmb8xnY8Tg== +"@bugsnag/browser@^7.16.2": + version "7.16.2" + resolved "https://registry.yarnpkg.com/@bugsnag/browser/-/browser-7.16.2.tgz#b6fc7ebaeae4800d195b660abc770caf33670e03" + integrity sha512-iBbAmjTDe0I6WPTHi3wIcmKu3ykydtT6fc8atJA65rzgDLMlTM1Wnwz4Ny1cn0bVouLGa48BRiOJ27Rwy7QRYA== dependencies: "@bugsnag/core" "^7.16.1" @@ -1774,18 +1774,18 @@ resolved "https://registry.yarnpkg.com/@bugsnag/cuid/-/cuid-3.0.0.tgz#2ee7642a30aee6dc86f5e7f824653741e42e5c35" integrity sha512-LOt8aaBI+KvOQGneBtpuCz3YqzyEAehd1f3nC5yr9TIYW1+IzYKa2xWS4EiMz5pPOnRPHkyyS5t/wmSmN51Gjg== -"@bugsnag/js@^7.16.1": - version "7.16.1" - resolved "https://registry.yarnpkg.com/@bugsnag/js/-/js-7.16.1.tgz#4a4ec2c7f3e047333e7d15eb53cb11f165b7067f" - integrity sha512-yb83OmsbIMDJhX3hHhbHl5StN72feqdr/Ctq7gqsdcfOHNb2121Edf2EbegPJKZhFqSik66vWwiVbGJ6CdS/UQ== +"@bugsnag/js@^7.16.2": + version "7.16.2" + resolved "https://registry.yarnpkg.com/@bugsnag/js/-/js-7.16.2.tgz#fb15ec9cc5980f0b210aecc7b740274e50400a91" + integrity sha512-AzV0PtG3SZt+HnA2JmRJeI60aDNZsIJbEEAZIWZeATvWBt5RdVdsWKllM1SkTvURfxfdAVd4Xry3BgVrh8nEbg== dependencies: - "@bugsnag/browser" "^7.16.1" - "@bugsnag/node" "^7.16.1" + "@bugsnag/browser" "^7.16.2" + "@bugsnag/node" "^7.16.2" -"@bugsnag/node@^7.16.1": - version "7.16.1" - resolved "https://registry.yarnpkg.com/@bugsnag/node/-/node-7.16.1.tgz#473bb6eeb346b418295b49e4c4576e0004af4901" - integrity sha512-9zBA1IfDTbLKMoDltdhELpTd1e+b5+vUW4j40zGA+4SYIe64XNZKShfqRdvij7embvC1iHQ9UpuPRSk60P6Dng== +"@bugsnag/node@^7.16.2": + version "7.16.2" + resolved "https://registry.yarnpkg.com/@bugsnag/node/-/node-7.16.2.tgz#8ac1b41786306d8917fb9fe222ada74fe0c4c6d5" + integrity sha512-V5pND701cIYGzjjTwt0tuvAU1YyPB9h7vo5F/DzrDHRPmCINA/oVbc0Twco87knc2VPe8ntGFqTicTY65iOWzg== dependencies: "@bugsnag/core" "^7.16.1" byline "^5.0.0" @@ -2313,10 +2313,10 @@ dependencies: "@standardnotes/common" "^1.15.3" -"@standardnotes/auth@^3.17.3": - version "3.17.3" - resolved "https://registry.yarnpkg.com/@standardnotes/auth/-/auth-3.17.3.tgz#a00f10faa0fb2a7dd76509d3b678f85818aad63c" - integrity sha512-tb5ylXuDBPhgeZZynNsMk83N74NMMV9z6M9hyrwuK5HbKWM5r5L9U8lwFawG8flqTKpYzPeWxmaRFZT/5qR22Q== +"@standardnotes/auth@^3.17.4": + version "3.17.4" + resolved "https://registry.yarnpkg.com/@standardnotes/auth/-/auth-3.17.4.tgz#ab2449a280ee6ec794fe397c9d8387e105c6c644" + integrity sha512-0710hUiYoRFjABfUFPlyOIyCMx0gC0rlJtFdPYK7WHXf0bfxO0JiSXeWbNSvV0QVGqHIkcUjGmdyE6cJEKTh9g== dependencies: "@standardnotes/common" "^1.15.3" jsonwebtoken "^8.5.1" @@ -2331,50 +2331,55 @@ resolved "https://registry.yarnpkg.com/@standardnotes/components/-/components-1.7.10.tgz#1b135edda74521c5143760c15df3ec88d6001d5a" integrity sha512-s+rxAw0o3wlAyq+MMjV7Hh31C+CckZJUer/ueWbRpL60YRl4JYZ7Tbx6ciw6VkxXFwYjW+aIOU0FOASjJrvpmg== -"@standardnotes/domain-events@^2.23.26": - version "2.23.26" - resolved "https://registry.yarnpkg.com/@standardnotes/domain-events/-/domain-events-2.23.26.tgz#310d44e8cc3524ddf6945907b0d0a4fa273d84a8" - integrity sha512-+GS6/Nc9yIXLL+Q9xFKynA+pMTik4Q7sL5VvJC99fRjrYeXZrxPBbJcXZdwtY61F58QYD86MQwpzhEuLGGsseg== +"@standardnotes/domain-events@^2.24.1": + version "2.24.1" + resolved "https://registry.yarnpkg.com/@standardnotes/domain-events/-/domain-events-2.24.1.tgz#dc578242297d3a6ae7ccdabde97f0229a0e6294c" + integrity sha512-UAOlTdH4WWkpIfi5fAKtLCCj3kb4cecxIhj57tuLORidq0z9VrY+9pFN86yIuLWGJPsaO22B1pLX/mwEDrOJPw== dependencies: - "@standardnotes/auth" "^3.17.3" - "@standardnotes/features" "^1.34.4" + "@standardnotes/auth" "^3.17.4" + "@standardnotes/features" "^1.34.5" -"@standardnotes/features@1.34.4", "@standardnotes/features@^1.34.4": - version "1.34.4" - resolved "https://registry.yarnpkg.com/@standardnotes/features/-/features-1.34.4.tgz#171ffb481600195c2cb4f8d23e630ce3f840932a" - integrity sha512-Ej+9s2H208dF8M/hXKkQ+MzGzM4qioPvfF0wmZ/ovz/PyIkGAOGU/l3zxJPI4vov4W7Xvxk6jMAxa1LEOerDuQ== +"@standardnotes/features@1.34.5", "@standardnotes/features@^1.34.5": + version "1.34.5" + resolved "https://registry.yarnpkg.com/@standardnotes/features/-/features-1.34.5.tgz#3077cf8c6c353694b3a8c0350961a0262f3139e8" + integrity sha512-b3T67XkMaiNR4D2n6/wszMK+eCEkX6xdYxqCeJYl8ofeM25AtznLMFcRQtCCOoNso+fld8vwCF+VBVp/l5yuDw== dependencies: - "@standardnotes/auth" "^3.17.3" + "@standardnotes/auth" "^3.17.4" "@standardnotes/common" "^1.15.3" -"@standardnotes/payloads@^1.4.3": - version "1.4.3" - resolved "https://registry.yarnpkg.com/@standardnotes/payloads/-/payloads-1.4.3.tgz#8d146a61d8bf173835ee54a683d1e6cc95ca15ee" - integrity sha512-mwC2EBHjniZBF3eSfkNE45VLGOn0xKWkOcAFb0sSLjouB4Mk90/CG+9gIGVZX8WcpG62A/vVcgvvJtcOtNfK6w== +"@standardnotes/filepicker@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@standardnotes/filepicker/-/filepicker-1.8.0.tgz#f8d85350c4b4022235e3017b0b2c7841882eef4f" + integrity sha512-xgFoD+aHFCKV5pAbhKNCyyhUL18G9l2Aep6eiQ5gxB55l8CcNHlLBi5qw5i1we07NdCwIJ3yP3aVKI+7qe22yQ== + +"@standardnotes/payloads@^1.4.4": + version "1.4.4" + resolved "https://registry.yarnpkg.com/@standardnotes/payloads/-/payloads-1.4.4.tgz#c6414069a17af12b9cfbfb4f7dfa72303d5cdd5d" + integrity sha512-gJuaSLGZgtCXP9iJJByKgZ41wn5KRP5QvQFwxoOQWIMy1KIBNItMVSHDZn4AVwi9S8qeMj9jdONXzzwX+IYGfQ== dependencies: "@standardnotes/applications" "^1.1.3" "@standardnotes/common" "^1.15.3" - "@standardnotes/features" "^1.34.4" + "@standardnotes/features" "^1.34.5" "@standardnotes/utils" "^1.2.3" -"@standardnotes/responses@1.3.2", "@standardnotes/responses@^1.3.2": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@standardnotes/responses/-/responses-1.3.2.tgz#fc967bc8013bc1df3e627094cce7b44e99fb8ecc" - integrity sha512-d7U9IpngnnAxmT0S0uKPdQgklzykBrHZNj2UlcbwkhAjbSf1mB4nPaEQFa9qjl30YeasK+0EbJjf2G8ThCcE8Q== +"@standardnotes/responses@1.3.4", "@standardnotes/responses@^1.3.4": + version "1.3.4" + resolved "https://registry.yarnpkg.com/@standardnotes/responses/-/responses-1.3.4.tgz#94dae8bafb481dd9b263f78af7558a2e762cf0ed" + integrity sha512-4oxPppADhKJ2K1X4SGRiUuFfzbYIrK57sNP1V8HJod2ULp4IPPZbkvpSmtVaSUeyPGqbpszSltQBVCblgfe3nQ== dependencies: - "@standardnotes/auth" "^3.17.3" + "@standardnotes/auth" "^3.17.4" "@standardnotes/common" "^1.15.3" - "@standardnotes/features" "^1.34.4" - "@standardnotes/payloads" "^1.4.3" + "@standardnotes/features" "^1.34.5" + "@standardnotes/payloads" "^1.4.4" -"@standardnotes/services@1.5.4", "@standardnotes/services@^1.5.4": - version "1.5.4" - resolved "https://registry.yarnpkg.com/@standardnotes/services/-/services-1.5.4.tgz#16067c9bd0d8a54e5ea2295e97cbbe4327e80811" - integrity sha512-qyq2KzvDWqUvBLXAdW8KQI1AqpdynSItn3iBzDM+h4U4rJMaAmkPoWtMxVcBAjz7cdHC5xku6t/iAvvKFKqUkA== +"@standardnotes/services@1.5.6", "@standardnotes/services@^1.5.6": + version "1.5.6" + resolved "https://registry.yarnpkg.com/@standardnotes/services/-/services-1.5.6.tgz#53938d82a8492d88097dfcfb714ca472c8557ab5" + integrity sha512-2G7lGC+aYO/t0viIhL5EZKneJM+wqRfZNPw83SsjW1YR4hIAWz7C6sUwAnkWorCeiSWQoXRI2O0AhDaCHpVUXg== dependencies: "@standardnotes/applications" "^1.1.3" "@standardnotes/common" "^1.15.3" - "@standardnotes/responses" "^1.3.2" + "@standardnotes/responses" "^1.3.4" "@standardnotes/utils" "^1.2.3" "@standardnotes/settings@1.12.0", "@standardnotes/settings@^1.12.0": @@ -2396,19 +2401,19 @@ buffer "^6.0.3" libsodium-wrappers "^0.7.9" -"@standardnotes/snjs@2.77.2": - version "2.77.2" - resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.77.2.tgz#f9a687a81f84b1978b1edf5e0527f4dc2702bef8" - integrity sha512-r5bdOVltdhgJgTI9CrlMoC/jCmvEeLIgkMy5RtT5K6EBOnxu9soxsBA2cvPo6nIs8+m6BS4psLpMBy93Kx/D5w== +"@standardnotes/snjs@2.79.0": + version "2.79.0" + resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.79.0.tgz#645f13c068972ce8c90132312e74eeebf9a375bb" + integrity sha512-fDLuQaAzZrBMjRhhkUy7B8xAzx47prFiLtEPsAJkZNHumkoB1KGU2iEE5ZxnlHc008ilLX0Nj4r5tqGXKxUFQA== dependencies: "@standardnotes/applications" "^1.1.3" - "@standardnotes/auth" "^3.17.3" + "@standardnotes/auth" "^3.17.4" "@standardnotes/common" "^1.15.3" - "@standardnotes/domain-events" "^2.23.26" - "@standardnotes/features" "^1.34.4" - "@standardnotes/payloads" "^1.4.3" - "@standardnotes/responses" "^1.3.2" - "@standardnotes/services" "^1.5.4" + "@standardnotes/domain-events" "^2.24.1" + "@standardnotes/features" "^1.34.5" + "@standardnotes/payloads" "^1.4.4" + "@standardnotes/responses" "^1.3.4" + "@standardnotes/services" "^1.5.6" "@standardnotes/settings" "^1.12.0" "@standardnotes/sncrypto-common" "^1.7.3" "@standardnotes/utils" "^1.2.3" @@ -2814,6 +2819,11 @@ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== +"@types/wicg-file-system-access@^2020.9.5": + version "2020.9.5" + resolved "https://registry.yarnpkg.com/@types/wicg-file-system-access/-/wicg-file-system-access-2020.9.5.tgz#4a0c8f3d1ed101525f329e86c978f7735404474f" + integrity sha512-UYK244awtmcUYQfs7FR8710MJcefL2WvkyHMjA8yJzxd1mo0Gfn88sRZ1Bls7hiUhA2w7ne1gpJ9T5g3G0wOyA== + "@types/ws@^8.2.2": version "8.2.2" resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.2.2.tgz#7c5be4decb19500ae6b3d563043cd407bf366c21" From be6a9fdb34f297891b98e6dbef19fc0b101009a9 Mon Sep 17 00:00:00 2001 From: Aman Harwara Date: Thu, 10 Mar 2022 20:57:59 +0530 Subject: [PATCH 08/12] feat: wrap search option bubbles if not enough space (#918) --- app/assets/javascripts/components/Bubble.tsx | 3 +-- app/assets/javascripts/components/NotesView.tsx | 2 +- app/assets/javascripts/components/SearchOptions.tsx | 6 +----- app/assets/stylesheets/_notes.scss | 12 ++++-------- 4 files changed, 7 insertions(+), 16 deletions(-) diff --git a/app/assets/javascripts/components/Bubble.tsx b/app/assets/javascripts/components/Bubble.tsx index e164a4f50..5e6a157dc 100644 --- a/app/assets/javascripts/components/Bubble.tsx +++ b/app/assets/javascripts/components/Bubble.tsx @@ -12,8 +12,7 @@ const styles = { const Bubble = ({ label, selected, onSelect }: BubbleProperties) => ( = observer(
-
+
{ } return ( -
e.preventDefault()} - > +
e.preventDefault()}> Date: Thu, 10 Mar 2022 09:45:46 -0600 Subject: [PATCH 09/12] fix: allow experimental editors if component is installed regardless of feature state --- .../AttachedFilesPopover.tsx | 2 +- .../NotesOptions/ChangeEditorOption.tsx | 2 - .../changeEditor/ChangeEditorMenu.tsx | 4 - .../changeEditor/createEditorMenuGroups.ts | 15 ---- package.json | 10 +-- yarn.lock | 76 +++++++++---------- 6 files changed, 44 insertions(+), 65 deletions(-) diff --git a/app/assets/javascripts/components/AttachedFilesPopover/AttachedFilesPopover.tsx b/app/assets/javascripts/components/AttachedFilesPopover/AttachedFilesPopover.tsx index 996d3d20d..887e3dcbe 100644 --- a/app/assets/javascripts/components/AttachedFilesPopover/AttachedFilesPopover.tsx +++ b/app/assets/javascripts/components/AttachedFilesPopover/AttachedFilesPopover.tsx @@ -171,7 +171,7 @@ export const AttachedFilesPopover: FunctionComponent = observer( {currentTab === PopoverTabs.AttachedFiles ? 'Attach' : 'Upload'}{' '} files -
+
Or drop your files here
diff --git a/app/assets/javascripts/components/NotesOptions/ChangeEditorOption.tsx b/app/assets/javascripts/components/NotesOptions/ChangeEditorOption.tsx index 0128bc109..efa4f98c4 100644 --- a/app/assets/javascripts/components/NotesOptions/ChangeEditorOption.tsx +++ b/app/assets/javascripts/components/NotesOptions/ChangeEditorOption.tsx @@ -34,8 +34,6 @@ export type EditorMenuItem = { name: string; component?: SNComponent; isEntitled: boolean; - isExperimental: boolean; - isExperimentalEnabled: boolean; }; export type EditorMenuGroup = AccordionMenuGroup; diff --git a/app/assets/javascripts/components/NotesOptions/changeEditor/ChangeEditorMenu.tsx b/app/assets/javascripts/components/NotesOptions/changeEditor/ChangeEditorMenu.tsx index 4708ad08c..fad58fbae 100644 --- a/app/assets/javascripts/components/NotesOptions/changeEditor/ChangeEditorMenu.tsx +++ b/app/assets/javascripts/components/NotesOptions/changeEditor/ChangeEditorMenu.tsx @@ -223,10 +223,6 @@ export const ChangeEditorMenu: FunctionComponent = ({ selectEditor(item); }; - if (item.isExperimental && !item.isExperimentalEnabled) { - return; - } - return ( Date: Thu, 10 Mar 2022 09:52:39 -0600 Subject: [PATCH 10/12] Revert "feat: wrap search option bubbles if not enough space (#918)" This reverts commit be6a9fdb34f297891b98e6dbef19fc0b101009a9. --- app/assets/javascripts/components/Bubble.tsx | 3 ++- app/assets/javascripts/components/NotesView.tsx | 2 +- app/assets/javascripts/components/SearchOptions.tsx | 6 +++++- app/assets/stylesheets/_notes.scss | 12 ++++++++---- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/app/assets/javascripts/components/Bubble.tsx b/app/assets/javascripts/components/Bubble.tsx index 5e6a157dc..e164a4f50 100644 --- a/app/assets/javascripts/components/Bubble.tsx +++ b/app/assets/javascripts/components/Bubble.tsx @@ -12,7 +12,8 @@ const styles = { const Bubble = ({ label, selected, onSelect }: BubbleProperties) => ( = observer(
-
+
{ } return ( -
e.preventDefault()}> +
e.preventDefault()} + > Date: Thu, 10 Mar 2022 10:03:43 -0600 Subject: [PATCH 11/12] fix: move Labs behind unfinished features flag --- .../changeEditor/createEditorMenuGroups.ts | 12 +++++++----- app/assets/javascripts/preferences/panes/General.tsx | 4 +++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/components/NotesOptions/changeEditor/createEditorMenuGroups.ts b/app/assets/javascripts/components/NotesOptions/changeEditor/createEditorMenuGroups.ts index c2a56e096..1b59c6358 100644 --- a/app/assets/javascripts/components/NotesOptions/changeEditor/createEditorMenuGroups.ts +++ b/app/assets/javascripts/components/NotesOptions/changeEditor/createEditorMenuGroups.ts @@ -59,11 +59,13 @@ export const createEditorMenuGroups = ( feature.area === ComponentArea.Editor ) .forEach((editorFeature) => { - if ( - !editors.find( - (editor) => editor.identifier === editorFeature.identifier - ) - ) { + const notInstalled = !editors.find( + (editor) => editor.identifier === editorFeature.identifier + ); + const isExperimental = application.features.isExperimentalFeature( + editorFeature.identifier + ); + if (notInstalled && !isExperimental) { editorItems[getEditorGroup(editorFeature)].push({ name: editorFeature.name as string, isEntitled: false, diff --git a/app/assets/javascripts/preferences/panes/General.tsx b/app/assets/javascripts/preferences/panes/General.tsx index a616c2d07..6492cd496 100644 --- a/app/assets/javascripts/preferences/panes/General.tsx +++ b/app/assets/javascripts/preferences/panes/General.tsx @@ -19,7 +19,9 @@ export const General: FunctionComponent = observer( - + {appState.enableUnfinishedFeatures && ( + + )} Date: Thu, 10 Mar 2022 11:15:04 -0600 Subject: [PATCH 12/12] fix: markdown visual 1.0.2 --- .../javascripts/preferences/panes/General.tsx | 4 +- package.json | 12 +-- public/components/checksums.json | 6 +- .../build/asset-manifest.json | 23 +++--- .../build/index.html | 2 +- .../build/static/js/2.6a3180fe.chunk.js | 3 + .../static/js/2.6a3180fe.chunk.js.LICENSE.txt | 57 ++++++++++++++ .../build/static/js/2.6a3180fe.chunk.js.map | 1 + .../build/static/js/main.18531fb0.chunk.js | 3 + .../js/main.18531fb0.chunk.js.LICENSE.txt | 5 ++ .../static/js/main.18531fb0.chunk.js.map | 1 + .../build/static/js/runtime-main.0f6dab54.js | 2 + .../static/js/runtime-main.0f6dab54.js.map | 1 + .../package.json | 5 +- yarn.lock | 76 +++++++++---------- 15 files changed, 135 insertions(+), 66 deletions(-) create mode 100644 public/components/org.standardnotes.markdown-visual-editor/build/static/js/2.6a3180fe.chunk.js create mode 100644 public/components/org.standardnotes.markdown-visual-editor/build/static/js/2.6a3180fe.chunk.js.LICENSE.txt create mode 100644 public/components/org.standardnotes.markdown-visual-editor/build/static/js/2.6a3180fe.chunk.js.map create mode 100644 public/components/org.standardnotes.markdown-visual-editor/build/static/js/main.18531fb0.chunk.js create mode 100644 public/components/org.standardnotes.markdown-visual-editor/build/static/js/main.18531fb0.chunk.js.LICENSE.txt create mode 100644 public/components/org.standardnotes.markdown-visual-editor/build/static/js/main.18531fb0.chunk.js.map create mode 100644 public/components/org.standardnotes.markdown-visual-editor/build/static/js/runtime-main.0f6dab54.js create mode 100644 public/components/org.standardnotes.markdown-visual-editor/build/static/js/runtime-main.0f6dab54.js.map diff --git a/app/assets/javascripts/preferences/panes/General.tsx b/app/assets/javascripts/preferences/panes/General.tsx index 6492cd496..a616c2d07 100644 --- a/app/assets/javascripts/preferences/panes/General.tsx +++ b/app/assets/javascripts/preferences/panes/General.tsx @@ -19,9 +19,7 @@ export const General: FunctionComponent = observer( - {appState.enableUnfinishedFeatures && ( - - )} + Markdown Visual
\ No newline at end of file +Markdown Visual
\ No newline at end of file diff --git a/public/components/org.standardnotes.markdown-visual-editor/build/static/js/2.6a3180fe.chunk.js b/public/components/org.standardnotes.markdown-visual-editor/build/static/js/2.6a3180fe.chunk.js new file mode 100644 index 000000000..b7182345f --- /dev/null +++ b/public/components/org.standardnotes.markdown-visual-editor/build/static/js/2.6a3180fe.chunk.js @@ -0,0 +1,3 @@ +/*! For license information please see 2.6a3180fe.chunk.js.LICENSE.txt */ +(this["webpackJsonp@standardnotes/markdown-visual"]=this["webpackJsonp@standardnotes/markdown-visual"]||[]).push([[2],[function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(47);function i(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Object(r.a)(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(t,e){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1];g(this,t,e)}},{key:"invertedDesc",get:function(){for(var e=[],n=0;n1&&void 0!==arguments[1]&&arguments[1];return t.empty?this:m(this,t,e)}},{key:"mapPos",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.Simple,r=0,i=0,o=0;ot)return i+(t-r);i+=a}else{if(n!=l.Simple&&u>=t&&(n==l.TrackDel&&rt||n==l.TrackBefore&&rt))return null;if(u>t||u==t&&e<0&&!a)return t==r||e<0?i:i+s;i+=s}r=u}if(t>r)throw new RangeError("Position ".concat(t," is out of range for changeset of length ").concat(r));return i}},{key:"touchesRange",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=0,r=0;n=0&&r<=e&&a>=t)return!(re)||"cover";r=a}return!1}},{key:"toString",value:function(){for(var t="",e=0;e=0?":"+r:"")}return t}},{key:"toJSON",value:function(){return this.sections}}],[{key:"fromJSON",value:function(e){if(!Array.isArray(e)||e.length%2||e.some((function(t){return"number"!=typeof t})))throw new RangeError("Invalid JSON representation of ChangeDesc");return new t(e)}}]),t}(),f=function(t){Object(i.a)(n,t);var e=Object(o.a)(n);function n(t,r){var i;return Object(a.a)(this,n),(i=e.call(this,t)).inserted=r,i}return Object(s.a)(n,[{key:"apply",value:function(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return g(this,(function(e,n,r,i,o){return t=t.replace(r,r+(n-e),o)}),!1),t}},{key:"mapDesc",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return m(this,t,e,!0)}},{key:"invert",value:function(t){for(var e=this.sections.slice(),r=[],i=0,o=0;i=0){e[i]=s,e[i+1]=a;for(var c=i>>1;r.length1&&void 0!==arguments[1]&&arguments[1];return t.empty?this:m(this,t,e,!0)}},{key:"iterChanges",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];g(this,t,e)}},{key:"desc",get:function(){return new h(this.sections)}},{key:"filter",value:function(t){var e=[],r=[],i=[],o=new y(this);t:for(var a=0,s=0;;){for(var u=a==t.length?1e9:t[a++];s0&&p(r,e,o.text),o.forward(c),s+=c}for(var f=t[a++];s>1].toJSON()))}return t}}],[{key:"of",value:function(t,e,i){var o=[],a=[],s=0,l=null;function h(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(t||o.length){sb||v<0||b>e)throw new RangeError("Invalid change range ".concat(v," to ").concat(b," (in doc of length ").concat(e,")"));var w=O?"string"==typeof O?u.a.of(O.split(i||c)):O:u.a.empty,k=w.length;if(v==b&&0==k)return;vs&&d(o,v-s,-1),d(o,b-v,k),p(a,o,w),s=b}}(t),h(!l),l}},{key:"empty",value:function(t){return new n(t?[t,-1]:[],[])}},{key:"fromJSON",value:function(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");for(var e=[],r=[],i=0;i3&&void 0!==arguments[3]&&arguments[3];if(!(0==e&&n<=0)){var i=t.length-2;i>=0&&n<=0&&n==t[i+1]?t[i]+=e:0==e&&0==t[i]?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}}function p(t,e,n){if(0!=n.length){var r=e.length-2>>1;if(r>1])),!(n||a==t.sections.length||t.sections[a+1]<0);)s=t.sections[a++],c=t.sections[a++];e(i,l,o,h,f),i=l,o=h}}}function m(t,e,n){for(var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=[],o=r?[]:null,a=new y(t),s=new y(e),u=0,c=0;;)if(-1==a.ins)u+=a.len,a.next();else if(-1==s.ins&&c=0&&(a.done||cc&&!a.done&&u+a.len=0)){if(a.done&&s.done)return o?new f(i,o):new h(i);throw new Error("Mismatched change set lengths")}for(var g=0,m=u+a.len;;)if(s.ins>=0&&c>u&&c+s.len2&&void 0!==arguments[2]&&arguments[2],r=[],i=n?[]:null,o=new y(t),a=new y(e),s=!1;;){if(o.done&&a.done)return i?new f(r,i):new h(r);if(0==o.ins)d(r,o.len,0,s),o.next();else if(0!=a.len||a.done){if(o.done||a.done)throw new Error("Mismatched change set lengths");var u=Math.min(o.len2,a.len),c=r.length;if(-1==o.ins){var l=-1==a.ins?-1:a.off?0:a.ins;d(r,u,l,s),i&&l&&p(i,r,a.text)}else-1==a.ins?(d(r,o.off?0:o.len,u,s),i&&p(i,r,o.textBit(u))):(d(r,o.off?0:o.len,a.off?0:a.ins,s),i&&!a.off&&p(i,r,a.text));s=(o.ins>u||a.ins>=0&&a.len>u)&&(s||r.length>c),o.forward2(u),a.forward(u)}else d(r,0,a.ins,s),i&&p(i,r,a.text),a.next()}}var y=function(){function t(e){Object(a.a)(this,t),this.set=e,this.i=0,this.next()}return Object(s.a)(t,[{key:"next",value:function(){var t=this.set.sections;this.i>1;return e>=t.length?u.a.empty:t[e]}},{key:"textBit",value:function(t){var e=this.set.inserted,n=this.i-2>>1;return n>=e.length&&!t?u.a.empty:e[n].slice(this.off,null==t?void 0:this.off+t)}},{key:"forward",value:function(t){t==this.len?this.next():(this.len-=t,this.off+=t)}},{key:"forward2",value:function(t){-1==this.ins?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}]),t}(),b=function(){function t(e,n,r){Object(a.a)(this,t),this.from=e,this.to=n,this.flags=r}return Object(s.a)(t,[{key:"anchor",get:function(){return 16&this.flags?this.to:this.from}},{key:"head",get:function(){return 16&this.flags?this.from:this.to}},{key:"empty",get:function(){return this.from==this.to}},{key:"assoc",get:function(){return 4&this.flags?-1:8&this.flags?1:0}},{key:"bidiLevel",get:function(){var t=3&this.flags;return 3==t?null:t}},{key:"goalColumn",get:function(){var t=this.flags>>5;return 33554431==t?void 0:t}},{key:"map",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,r=e.mapPos(this.from,n),i=e.mapPos(this.to,n);return r==this.from&&i==this.to?this:new t(r,i,this.flags)}},{key:"extend",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;if(t<=this.anchor&&e>=this.anchor)return O.range(t,e);var n=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return O.range(this.anchor,n)}},{key:"eq",value:function(t){return this.anchor==t.anchor&&this.head==t.head}},{key:"toJSON",value:function(){return{anchor:this.anchor,head:this.head}}}],[{key:"fromJSON",value:function(t){if(!t||"number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid JSON representation for SelectionRange");return O.range(t.anchor,t.head)}}]),t}(),O=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;Object(a.a)(this,t),this.ranges=e,this.mainIndex=n}return Object(s.a)(t,[{key:"map",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return e.empty?this:t.create(this.ranges.map((function(t){return t.map(e,n)})),this.mainIndex)}},{key:"eq",value:function(t){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(var e=0;e1&&void 0!==arguments[1])||arguments[1];return t.create([e].concat(this.ranges),n?0:this.mainIndex+1)}},{key:"replaceRange",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.mainIndex,r=this.ranges.slice();return r[n]=e,t.create(r,this.mainIndex)}},{key:"toJSON",value:function(){return{ranges:this.ranges.map((function(t){return t.toJSON()})),main:this.mainIndex}}}],[{key:"fromJSON",value:function(e){if(!e||!Array.isArray(e.ranges)||"number"!=typeof e.main||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new t(e.ranges.map((function(t){return b.fromJSON(t)})),e.main)}},{key:"single",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return new t([t.range(e,n)],0)}},{key:"create",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0==e.length)throw new RangeError("A selection needs at least one range");for(var r=0,i=0;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;return new b(t,t,(0==e?0:e<0?4:8)|(null==n?3:Math.min(2,n))|(null!==r&&void 0!==r?r:33554431)<<5)}},{key:"range",value:function(t,e,n){var r=(null!==n&&void 0!==n?n:33554431)<<5;return e1&&void 0!==arguments[1]?arguments[1]:0,n=t[e];t.sort((function(t,e){return t.from-e.from})),e=t.indexOf(n);for(var r=1;ri.head?O.range(s,a):O.range(a,s))}}return new O(t,e)}function k(t,e){var n,i=Object(r.a)(t.ranges);try{for(i.s();!(n=i.n()).done;){if(n.value.to>e)throw new RangeError("Selection points outside of document")}}catch(o){i.e(o)}finally{i.f()}}var x=0,_=function(){function t(e,n,r,i,o){Object(a.a)(this,t),this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=i,this.extensions=o,this.id=x++,this.default=e([])}return Object(s.a)(t,[{key:"of",value:function(t){return new E([],this,0,t)}},{key:"compute",value:function(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new E(t,this,1,e)}},{key:"computeN",value:function(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new E(t,this,2,e)}},{key:"from",value:function(t,e){return e||(e=function(t){return t}),this.compute([t],(function(n){return e(n.field(t))}))}}],[{key:"define",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new t(e.combine||function(t){return t},e.compareInput||function(t,e){return t===e},e.compare||(e.combine?function(t,e){return t===e}:S),!!e.static,e.enables)}}]),t}();function S(t,e){return t==e||t.length==e.length&&t.every((function(t,n){return t===e[n]}))}var E=function(){function t(e,n,r,i){Object(a.a)(this,t),this.dependencies=e,this.facet=n,this.type=r,this.value=i,this.id=x++}return Object(s.a)(t,[{key:"dynamicSlot",value:function(t){var e,n,i=this.value,o=this.facet.compareInput,a=t[this.id]>>1,s=2==this.type,u=!1,c=!1,l=[],h=Object(r.a)(this.dependencies);try{for(h.s();!(n=h.n()).done;){var f=n.value;"doc"==f?u=!0:"selection"==f?c=!0:0==(1&(null!==(e=t[f.id])&&void 0!==e?e:1))&&l.push(t[f.id])}}catch(d){h.e(d)}finally{h.f()}return function(t,e){var n=t.values[a];if(n===Q)return t.values[a]=i(t),1;if(e&&(u&&e.docChanged||c&&(e.docChanged||e.selection)||l.some((function(e){return(1&$(t,e))>0})))){var r=i(t);if(s?!function(t,e,n){if(t.length!=e.length)return!1;for(var r=0;r>1;return function(t,r){var i=t.values[n];if(i===Q)return t.values[n]=e.create(t),1;if(r){var o=e.updateF(i,r);if(!e.compareF(i,o))return t.values[n]=o,1}return 0}}},{key:"init",value:function(t){return[this,C.of({field:this,create:t})]}},{key:"extension",get:function(){return this}}],[{key:"define",value:function(e){var n=new t(x++,e.create,e.update,e.compare||function(t,e){return t===e},e);return e.provide&&(n.provides=e.provide(n)),n}}]),t}(),A=4,D=3,M=2,j=1,N=0;function P(t){return function(e){return new L(e,t)}}var R={lowest:P(A),low:P(D),default:P(M),high:P(j),highest:P(N),fallback:P(A),extend:P(j),override:P(N)},L=Object(s.a)((function t(e,n){Object(a.a)(this,t),this.inner=e,this.prec=n})),F=function(){function t(){Object(a.a)(this,t)}return Object(s.a)(t,[{key:"of",value:function(t){return new B(this,t)}},{key:"reconfigure",value:function(e){return t.reconfigure.of({compartment:this,extension:e})}},{key:"get",value:function(t){return t.config.compartments.get(this)}}]),t}(),B=Object(s.a)((function t(e,n){Object(a.a)(this,t),this.compartment=e,this.inner=n})),I=function(){function t(e,n,r,i,o){for(Object(a.a)(this,t),this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=o,this.statusTemplate=[];this.statusTemplate.length>1]}}],[{key:"resolve",value:function(e,n,i){var o,a=[],s=Object.create(null),u=new Map,c=Object(r.a)(function(t,e,n){var i=[[],[],[],[],[]],o=new Map;function a(t,s){var u=o.get(t);if(null!=u){if(u>=s)return;var c=i[u].indexOf(t);c>-1&&i[u].splice(c,1),t instanceof B&&n.delete(t.compartment)}if(o.set(t,s),Array.isArray(t)){var l,h=Object(r.a)(t);try{for(h.s();!(l=h.n()).done;){a(l.value,s)}}catch(p){h.e(p)}finally{h.f()}}else if(t instanceof B){if(n.has(t.compartment))throw new RangeError("Duplicate use of compartment in extensions");var f=e.get(t.compartment)||t.inner;n.set(t.compartment,f),a(f,s)}else if(t instanceof L)a(t.inner,t.prec);else if(t instanceof T)i[s].push(t),t.provides&&a(t.provides,s);else if(t instanceof E)i[s].push(t),t.facet.extensions&&a(t.facet.extensions,s);else{var d=t.extension;if(!d)throw new Error("Unrecognized extension value in extension set (".concat(t,"). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks."));a(d,s)}}return a(t,M),i.reduce((function(t,e){return t.concat(e)}))}(e,n,u));try{for(c.s();!(o=c.n()).done;){var l=o.value;l instanceof T?a.push(l):(s[l.facet.id]||(s[l.facet.id]=[])).push(l)}}catch(S){c.e(S)}finally{c.f()}for(var h=Object.create(null),f=[],d=[],p=[],g=function(){var t=v[m];h[t.id]=d.length<<1,d.push((function(e){return t.slot(e)})),p.push([])},m=0,v=a;m>1;return function(t,n){var u,c=t.values[s],l=c===Q||!n,h=Object(r.a)(a);try{for(h.s();!(u=h.n()).done;)1&$(t,u.value)&&(l=!0)}catch(S){h.e(S)}finally{h.f()}if(!l)return 0;for(var f=[],d=0;d7)return!1;var r=h[e];if(!(1&r))return p[r>>1].every((function(e){return t(e,n+1)}));var o=i.config.address[e];return null!=o&&z(i,o)==f[r>>1]};for(var k in h){var x=h[k],_=i.config.address[k];null!=_&&0==(1&x)&&w(+k,0)&&(O[x>>1]=z(i,_))}}return{configuration:new t(e,u,d.map((function(t){return t(h)})),h,f),values:O}}}]),t}();var Q={};function $(t,e){if(1&e)return 2;var n=e>>1,r=t.status[n];if(4==r)throw new Error("Cyclic dependency between fields and/or facets");if(2&r)return r;t.status[n]=4;var i=t.config.dynamicSlots[n](t,t.applying);return t.status[n]=2|i}function z(t,e){return 1&e?t.config.staticValues[e>>1]:t.values[e>>1]}var q=_.define(),W=_.define({combine:function(t){return t.some((function(t){return t}))},static:!0}),V=_.define({combine:function(t){return t.length?t[0]:void 0},static:!0}),Y=_.define(),U=_.define(),H=_.define(),X=_.define({combine:function(t){return!!t.length&&t[0]}}),G=function(){function t(e,n){Object(a.a)(this,t),this.type=e,this.value=n}return Object(s.a)(t,null,[{key:"define",value:function(){return new Z}}]),t}(),Z=function(){function t(){Object(a.a)(this,t)}return Object(s.a)(t,[{key:"of",value:function(t){return new G(this,t)}}]),t}(),K=function(){function t(e){Object(a.a)(this,t),this.map=e}return Object(s.a)(t,[{key:"of",value:function(t){return new J(this,t)}}]),t}(),J=function(){function t(e,n){Object(a.a)(this,t),this.type=e,this.value=n}return Object(s.a)(t,[{key:"map",value:function(e){var n=this.type.map(this.value,e);return void 0===n?void 0:n==this.value?this:new t(this.type,n)}},{key:"is",value:function(t){return this.type==t}}],[{key:"define",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new K(t.map||function(t){return t})}},{key:"mapEffects",value:function(t,e){if(!t.length)return t;var n,i=[],o=Object(r.a)(t);try{for(o.s();!(n=o.n()).done;){var a=n.value.map(e);a&&i.push(a)}}catch(s){o.e(s)}finally{o.f()}return i}}]),t}();J.reconfigure=J.define(),J.appendConfig=J.define();var tt=function(){function t(e,n,r,i,o,s){Object(a.a)(this,t),this.startState=e,this.changes=n,this.selection=r,this.effects=i,this.annotations=o,this.scrollIntoView=s,this._doc=null,this._state=null,r&&k(r,n.newLength),o.some((function(e){return e.type==t.time}))||(this.annotations=o.concat(t.time.of(Date.now())))}return Object(s.a)(t,[{key:"newDoc",get:function(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}},{key:"newSelection",get:function(){return this.selection||this.startState.selection.map(this.changes)}},{key:"state",get:function(){return this._state||this.startState.applyTransaction(this),this._state}},{key:"annotation",value:function(t){var e,n=Object(r.a)(this.annotations);try{for(n.s();!(e=n.n()).done;){var i=e.value;if(i.type==t)return i.value}}catch(o){n.e(o)}finally{n.f()}}},{key:"docChanged",get:function(){return!this.changes.empty}},{key:"reconfigured",get:function(){return this.startState.config!=this.state.config}},{key:"isUserEvent",value:function(e){var n=this.annotation(t.userEvent);return!(!n||!(n==e||n.length>e.length&&n.slice(0,e.length)==e&&"."==n[e.length]))}}]),t}();function et(t,e){for(var n=[],r=0,i=0;;){var o=void 0,a=void 0;if(r=t[r]))o=t[r++],a=t[r++];else{if(!(i=0;i--){var o=n[i](t);o&&Object.keys(o).length&&(r=nt(t,rt(e,o,t.changes.newLength),!0))}return r==t?t:new tt(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}(n?function(t){var e,n=t.startState,i=!0,o=Object(r.a)(n.facet(Y));try{for(o.s();!(e=o.n()).done;){var a=(0,e.value)(t);if(!1===a){i=!1;break}Array.isArray(a)&&(i=!0===i?a:et(i,a))}}catch(p){o.e(p)}finally{o.f()}if(!0!==i){var s,u;if(!1===i)u=t.changes.invertedDesc,s=f.empty(n.doc.length);else{var c=t.changes.filter(i);s=c.changes,u=c.filtered.invertedDesc}t=new tt(n,s,t.selection&&t.selection.map(u),J.mapEffects(t.effects,u),t.annotations,t.scrollIntoView)}for(var l=n.facet(U),h=l.length-1;h>=0;h--){var d=l[h](t);t=d instanceof tt?d:Array.isArray(d)&&1==d.length&&d[0]instanceof tt?d[0]:it(n,at(d),!1)}return t}(s):s)}tt.time=G.define(),tt.userEvent=G.define(),tt.addToHistory=G.define(),tt.remote=G.define();var ot=[];function at(t){return null==t?ot:Array.isArray(t)?t:[t]}var st,ut=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(ut||(ut={})),ct=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{st=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(dt){}function lt(t){return function(e){if(!/\S/.test(e))return ut.Space;if(function(t){if(st)return st.test(t);for(var e=0;e"\x80"&&(n.toUpperCase()!=n.toLowerCase()||ct.test(n)))return!0}return!1}(e))return ut.Word;for(var n=0;n-1)return ut.Word;return ut.Other}}var ht=function(){function t(e,n,r,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;Object(a.a)(this,t),this.config=e,this.doc=n,this.selection=r,this.values=i,this.applying=null,this.status=e.statusTemplate.slice(),this.applying=o,o&&(o._state=this);for(var s=0;s1&&void 0!==arguments[1])||arguments[1],n=this.config.address[t.id];if(null!=n)return $(this,n),z(this,n);if(e)throw new RangeError("Field is not present in this state")}},{key:"update",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:[];return e instanceof f?e:f.of(e,this.doc.length,this.facet(t.lineSeparator))}},{key:"toText",value:function(e){return u.a.of(e.split(this.facet(t.lineSeparator)||c))}},{key:"sliceDoc",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.doc.length;return this.doc.sliceString(t,e,this.lineBreak)}},{key:"facet",value:function(t){var e=this.config.address[t.id];return null==e?t.default:($(this,e),z(this,e))}},{key:"toJSON",value:function(t){var e={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(var n in t){var r=t[n];r instanceof T&&(e[n]=r.spec.toJSON(this.field(t[n]),this))}return e}},{key:"tabSize",get:function(){return this.facet(t.tabSize)}},{key:"lineBreak",get:function(){return this.facet(t.lineSeparator)||"\n"}},{key:"readOnly",get:function(){return this.facet(X)}},{key:"phrase",value:function(e){var n,i=Object(r.a)(this.facet(t.phrases));try{for(i.s();!(n=i.n()).done;){var o=n.value;if(Object.prototype.hasOwnProperty.call(o,e))return o[e]}}catch(a){i.e(a)}finally{i.f()}return e}},{key:"languageDataAt",value:function(t,e){var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,o=[],a=Object(r.a)(this.facet(q));try{for(a.s();!(n=a.n()).done;){var s,u=n.value,c=Object(r.a)(u(this,e,i));try{for(c.s();!(s=c.n()).done;){var l=s.value;Object.prototype.hasOwnProperty.call(l,t)&&o.push(l[t])}}catch(h){c.e(h)}finally{c.f()}}}catch(h){a.e(h)}finally{a.f()}return o}},{key:"charCategorizer",value:function(t){return lt(this.languageDataAt("wordChars",t).join(""))}},{key:"wordAt",value:function(t){for(var e=this.doc.lineAt(t),n=e.text,r=e.from,i=e.length,o=this.charCategorizer(t),a=t-r,s=t-r;a>0;){var c=Object(u.e)(n,a,!1);if(o(n.slice(c,a))!=ut.Word)break;a=c}for(;s1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if(!e||"string"!=typeof e.doc)throw new RangeError("Invalid JSON representation for EditorState");var i=[];if(r){var o=function(t){var n=r[t],o=e[t];i.push(n.init((function(t){return n.spec.fromJSON(o,t)})))};for(var a in r)o(a)}return t.create({doc:e.doc,selection:O.fromJSON(e.selection),extensions:n.extensions?i.concat([n.extensions]):i})}},{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=I.resolve(e.extensions||[],new Map),r=n.configuration,i=n.values,o=e.doc instanceof u.a?e.doc:u.a.of((e.doc||"").split(r.staticFacet(t.lineSeparator)||c)),a=e.selection?e.selection instanceof O?e.selection:O.single(e.selection.anchor,e.selection.head):O.single(0);return k(a,o.length),r.staticFacet(W)||(a=a.asSingle()),new t(r,o,a,i)}}]),t}();function ft(t,e){var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o={},a=Object(r.a)(t);try{for(a.s();!(n=a.n()).done;)for(var s=n.value,u=0,c=Object.keys(s);u-1?e:g.get(e.base||e,e.modified.concat(t).sort((function(t,e){return t.id-e.id})))}}}]),t}(),p=0,g=function(){function t(){Object(i.a)(this,t),this.instances=[],this.id=p++}return Object(o.a)(t,null,[{key:"get",value:function(e,n){if(!n.length)return e;var i=n[0].instances.find((function(t){return t.base==e&&(r=n,i=t.modified,r.length==i.length&&r.every((function(t,e){return t==i[e]})));var r,i}));if(i)return i;var o,a=[],s=new d(a,e,n),u=Object(r.a)(n);try{for(u.s();!(o=u.n()).done;){o.value.instances.push(s)}}catch(y){u.e(y)}finally{u.f()}var c,l=m(n),h=Object(r.a)(e.set);try{for(h.s();!(c=h.n()).done;){var f,p=c.value,g=Object(r.a)(l);try{for(g.s();!(f=g.n()).done;){var v=f.value;a.push(t.get(p,v))}}catch(y){g.e(y)}finally{g.f()}}}catch(y){h.e(y)}finally{h.f()}return s}}]),t}();function m(t){for(var e=[t],n=0;n0&&h+3==s.length){c=1;break}var f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!f)throw new RangeError("Invalid path: "+s);if(u.push("*"==f[0]?null:'"'==f[0][0]?JSON.parse(f[0]):f[0]),(h+=f[0].length)==s.length)break;var d=s[h++];if(h==s.length&&"!"==d){c=0;break}if("/"!=d)throw new RangeError("Invalid path: "+s);l=s.slice(h)}var p=u.length-1,g=u[p];if(!g)throw new RangeError("Invalid path: "+s);var m=new k(i,c,p>0?u.slice(0,p):null);e[g]=m.sort(e[g])}}}catch(v){a.e(v)}finally{a.f()}}return y.add(e)}var y=new a.b,b=c.g.define({combine:function(t){return t.length?x.combinedMatch(t):null}}),O=c.g.define({combine:function(t){return t.length?t[0].match:null}});function w(t){return t.facet(b)||t.facet(O)}var k=function(){function t(e,n,r,o){Object(i.a)(this,t),this.tags=e,this.mode=n,this.context=r,this.next=o}return Object(o.a)(t,[{key:"sort",value:function(t){return!t||t.depththis.at&&(this.at=t),this.class=e)}},{key:"flush",value:function(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}},{key:"highlightRange",value:function(t,e,n,i,o,s){var u=t.type,c=t.from,l=t.to;if(!(c>=n||l<=e)){E[o]=u.name,u.isTop&&(s=u);for(var h=i,f=u.prop(y),d=!1;f;){if(!f.context||A(f.context,E,o)){var p,g=Object(r.a)(f.tags);try{for(g.s();!(p=g.n()).done;){var m=p.value,v=this.style(m,s);v&&(h&&(h+=" "),h+=v,1==f.mode?i+=(i?" ":"")+v:0==f.mode&&(d=!0))}}catch(D){g.e(D)}finally{g.f()}break}f=f.next}if(this.startSpan(t.from,h),!d){var b=t.tree&&t.tree.prop(a.b.mounted);if(b&&b.overlay){for(var O=t.node.enter(b.overlay[0].from+c,1),w=t.firstChild(),k=0,x=c;;k++){var _=k=S)&&t.nextSibling()););if(!_||S>n)break;(x=_.to+c)>e&&(this.highlightRange(O.cursor,Math.max(e,_.from+c),Math.min(n,x),i,o,b.tree.type),this.startSpan(x,h))}w&&t.parent()}else if(t.firstChild()){do{if(!(t.to<=e)){if(t.from>=n)break;this.highlightRange(t,e,n,i,o+1,s),this.startSpan(Math.min(n,t.to),h)}}while(t.nextSibling());t.parent()}}}}}]),t}();function T(t,e,n,r,i){var o=new C(e,r,i);o.highlightRange(t.cursor(),e,n,"",0,t.type),o.flush(n)}function A(t,e,n){if(t.length>n-1)return!1;for(var r=n-1,i=t.length-1;i>=0;i--,r--){var o=t[i];if(o&&o!=e[r])return!1}return!0}var D=d.define,M=D(),j=D(),N=D(j),P=D(j),R=D(),L=D(R),F=D(R),B=D(),I=D(B),Q=D(),$=D(),z=D(),q=D(z),W=D(),V={comment:M,lineComment:D(M),blockComment:D(M),docComment:D(M),name:j,variableName:D(j),typeName:N,tagName:D(N),propertyName:P,attributeName:D(P),className:D(j),labelName:D(j),namespace:D(j),macroName:D(j),literal:R,string:L,docString:D(L),character:D(L),attributeValue:D(L),number:F,integer:D(F),float:D(F),bool:D(R),regexp:D(R),escape:D(R),color:D(R),url:D(R),keyword:Q,self:D(Q),null:D(Q),atom:D(Q),unit:D(Q),modifier:D(Q),operatorKeyword:D(Q),controlKeyword:D(Q),definitionKeyword:D(Q),operator:$,derefOperator:D($),arithmeticOperator:D($),logicOperator:D($),bitwiseOperator:D($),compareOperator:D($),updateOperator:D($),definitionOperator:D($),typeOperator:D($),controlOperator:D($),punctuation:z,separator:D(z),bracket:q,angleBracket:D(q),squareBracket:D(q),paren:D(q),brace:D(q),content:B,heading:I,heading1:D(I),heading2:D(I),heading3:D(I),heading4:D(I),heading5:D(I),heading6:D(I),contentSeparator:D(B),list:D(B),quote:D(B),emphasis:D(B),strong:D(B),link:D(B),monospace:D(B),strikethrough:D(B),inserted:D(),deleted:D(),changed:D(),invalid:D(),meta:W,documentMeta:D(W),annotation:D(W),processingInstruction:D(W),definition:d.defineModifier(),constant:d.defineModifier(),function:d.defineModifier(),standard:d.defineModifier(),local:d.defineModifier(),special:d.defineModifier()},Y=x.define([{tag:V.link,textDecoration:"underline"},{tag:V.heading,textDecoration:"underline",fontWeight:"bold"},{tag:V.emphasis,fontStyle:"italic"},{tag:V.strong,fontWeight:"bold"},{tag:V.strikethrough,textDecoration:"line-through"},{tag:V.keyword,color:"#708"},{tag:[V.atom,V.bool,V.url,V.contentSeparator,V.labelName],color:"#219"},{tag:[V.literal,V.inserted],color:"#164"},{tag:[V.string,V.deleted],color:"#a11"},{tag:[V.regexp,V.escape,V.special(V.string)],color:"#e40"},{tag:V.definition(V.variableName),color:"#00f"},{tag:V.local(V.variableName),color:"#30a"},{tag:[V.typeName,V.namespace],color:"#085"},{tag:V.className,color:"#167"},{tag:[V.special(V.variableName),V.macroName],color:"#256"},{tag:V.definition(V.propertyName),color:"#00c"},{tag:V.comment,color:"#940"},{tag:V.meta,color:"#7a757a"},{tag:V.invalid,color:"#f00"}]);V.link,V.heading,V.emphasis,V.strong,V.keyword,V.atom,V.bool,V.url,V.labelName,V.inserted,V.deleted,V.literal,V.string,V.number,V.regexp,V.escape,V.string,V.variableName,V.variableName,V.variableName,V.variableName,V.typeName,V.namespace,V.macroName,V.propertyName,V.operator,V.comment,V.meta,V.invalid,V.punctuation},function(t,e,n){"use strict";n.d(e,"a",(function(){return Fi})),n.d(e,"b",(function(){return Po})),n.d(e,"c",(function(){return bo})),n.d(e,"d",(function(){return Bi})),n.d(e,"e",(function(){return Yi})),n.d(e,"f",(function(){return oo})),n.d(e,"g",(function(){return xo})),n.d(e,"h",(function(){return ko})),n.d(e,"i",(function(){return _o})),n.d(e,"j",(function(){return so})),n.d(e,"k",(function(){return go})),n.d(e,"l",(function(){return mo})),n.d(e,"m",(function(){return Do})),n.d(e,"n",(function(){return $i})),n.d(e,"o",(function(){return Gi})),n.d(e,"p",(function(){return Xi})),n.d(e,"q",(function(){return Ji})),n.d(e,"r",(function(){return zi})),n.d(e,"s",(function(){return qi})),n.d(e,"t",(function(){return vo})),n.d(e,"u",(function(){return Ui})),n.d(e,"v",(function(){return ro})),n.d(e,"w",(function(){return jo})),n.d(e,"x",(function(){return To})),n.d(e,"y",(function(){return Wi}));var r={};n.r(r),n.d(r,"document",(function(){return xe})),n.d(r,"contentInitial",(function(){return _e})),n.d(r,"flowInitial",(function(){return Se})),n.d(r,"flow",(function(){return Ee})),n.d(r,"string",(function(){return Ce})),n.d(r,"text",(function(){return Te})),n.d(r,"insideSpan",(function(){return Ae})),n.d(r,"attentionMarkers",(function(){return De})),n.d(r,"disable",(function(){return Me}));var i=n(1),o=n(2),a=n(11),s=n(22),u=n(28),c=n(0),l=n(16),h=n.n(l),f=n(25),d=n(33),p=n(7),g=n(9),m=n(26),v=n(40),y=n(73),b=n(38),O=n(81),w=n(76),k=n(47),x=n(82);function _(t){return Object(O.a)(t)||Object(w.a)(t)||Object(k.a)(t)||Object(x.a)()}function S(t){if(t)throw t}var E=n(101),C=n.n(E),T=n(96),A=n.n(T);function D(t){if("[object Object]"!==Object.prototype.toString.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function M(t,e){var n;return function(){for(var e=arguments.length,o=new Array(e),a=0;ao.length;u&&o.push(r);try{s=t.apply(void 0,o)}catch(l){var c=l;if(u&&n)throw c;return r(c)}u||(s instanceof Promise?s.then(i,r):s instanceof Error?r(s):i(s))};function r(t){if(!n){n=!0;for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;ot.length){for(;o--;)if(47===t.charCodeAt(o)){if(n){r=o+1;break}}else i<0&&(n=!0,i=o+1);return i<0?"":t.slice(r,i)}if(e===t)return"";var a=-1,s=e.length-1;for(;o--;)if(47===t.charCodeAt(o)){if(n){r=o+1;break}}else a<0&&(n=!0,a=o+1),s>-1&&(t.charCodeAt(o)===e.charCodeAt(s--)?s<0&&(i=o):(s=-1,i=a));r===i?i=a:i<0&&(i=t.length);return t.slice(r,i)},dirname:function(t){if(V(t),0===t.length)return".";var e,n=-1,r=t.length;for(;--r;)if(47===t.charCodeAt(r)){if(e){n=r;break}}else e||(e=!0);return n<0?47===t.charCodeAt(0)?"/":".":1===n&&47===t.charCodeAt(0)?"//":t.slice(0,n)},extname:function(t){V(t);var e,n=t.length,r=-1,i=0,o=-1,a=0;for(;n--;){var s=t.charCodeAt(n);if(47!==s)r<0&&(e=!0,r=n+1),46===s?o<0?o=n:1!==a&&(a=1):o>-1&&(a=-1);else if(e){i=n+1;break}}if(o<0||r<0||0===a||1===a&&o===r-1&&o===i+1)return"";return t.slice(o,r)},join:function(){for(var t,e=-1,n=arguments.length,r=new Array(n),i=0;i2){if((r=i.lastIndexOf("/"))!==i.length-1){r<0?(i="",o=0):o=(i=i.slice(0,r)).length-1-i.lastIndexOf("/"),a=u,s=0;continue}}else if(i.length>0){i="",o=0,a=u,s=0;continue}e&&(i=i.length>0?i+"/..":"..",o=2)}else i.length>0?i+="/"+t.slice(a+1,u):i=t.slice(a+1,u),o=u-a-1;a=u,s=0}else 46===n&&s>-1?s++:s=-1}return i}(t,!e);return 0!==n.length||e||(n="."),n.length>0&&47===t.charCodeAt(t.length-1)&&(n+="/"),e?"/"+n:n}function V(t){if("string"!==typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}var Y={cwd:function(){return"/"}};function U(t){return null!==t&&"object"===typeof t&&t.href&&t.origin}function H(t){if("string"===typeof t)t=new URL(t);else if(!U(t)){var e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if("file:"!==t.protocol){var n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return function(t){if(""!==t.hostname){var e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}var n=t.pathname,r=-1;for(;++r1?u-1:0),l=1;l1?n-1:0),u=1;ur))return;for(var c,l,h=i.events.length,f=h;f--;)if("exit"===i.events[f][0]&&"chunkFlow"===i.events[f][1].type){if(c){l=i.events[f][1].end;break}c=!0}for(v(a),u=h;ue;){var r=o[n];i.containerState=r[1],r[0].exit.call(i,t)}o.length=e}function y(){e.write([null]),n=void 0,e=void 0,i.containerState._closeFlow=void 0}}},yt={tokenize:function(t,e,n){return Object(dt.a)(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};var bt=n(68);function Ot(t){for(var e,n,r,i,o,a,s,u={},c=-1;++c=4?e(i):t.interrupt(r.parser.constructs.flow,n,e)(i)}},partial:!0};var _t={tokenize:function(t){var e=this,n=t.attempt(bt.a,(function(r){if(null===r)return void t.consume(r);return t.enter("lineEndingBlank"),t.consume(r),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}),t.attempt(this.parser.constructs.flowInitial,r,Object(dt.a)(t,t.attempt(this.parser.constructs.flow,r,t.attempt(kt,r)),"linePrefix")));return n;function r(r){if(null!==r)return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),e.currentConstruct=void 0,n;t.consume(r)}}};var St={resolveAll:At()},Et=Tt("string"),Ct=Tt("text");function Tt(t){return{tokenize:function(e){var n=this,r=this.parser.constructs[t],i=e.attempt(r,o,a);return o;function o(t){return u(t)?i(t):a(t)}function a(t){if(null!==t)return e.enter("data"),e.consume(t),s;e.consume(t)}function s(t){return u(t)?(e.exit("data"),i(t)):(e.consume(t),s)}function u(t){if(null===t)return!0;var e=r[t],i=-1;if(e)for(;++i-1&&(n[0]=n[0].slice(i)),a>0&&n.push(t[o].slice(0,a)));return n}(s,t)}function d(){return Object.assign({},r)}function p(){for(var t;r._indexc?n(i):(t.consume(i),p):41===i?l--?(t.consume(i),p):(t.exit("chunkString"),t.exit(s),t.exit(a),t.exit(r),e(i)):null===i||Object(pt.i)(i)?l?n(i):(t.exit("chunkString"),t.exit(s),t.exit(a),t.exit(r),e(i)):Object(pt.d)(i)?n(i):(t.consume(i),92===i?g:p)}function g(e){return 40===e||41===e||92===e?(t.consume(e),p):p(e)}}function Qt(t,e,n,r,i,o){var a,s=this,u=0;return function(e){return t.enter(r),t.enter(i),t.consume(e),t.exit(i),t.enter(o),c};function c(h){return null===h||91===h||93===h&&!a||94===h&&!u&&"_hiddenFootnoteSupport"in s.parser.constructs||u>999?n(h):93===h?(t.exit(o),t.enter(i),t.consume(h),t.exit(i),t.exit(r),e):Object(pt.h)(h)?(t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),c):(t.enter("chunkString",{contentType:"string"}),l(h))}function l(e){return null===e||91===e||93===e||Object(pt.h)(e)||u++>999?(t.exit("chunkString"),c(e)):(t.consume(e),a=a||!Object(pt.j)(e),92===e?h:l)}function h(e){return 91===e||92===e||93===e?(t.consume(e),u++,l):l(e)}}function $t(t,e,n,r,i,o){var a;return function(e){return t.enter(r),t.enter(i),t.consume(e),t.exit(i),a=40===e?41:e,s};function s(n){return n===a?(t.enter(i),t.consume(n),t.exit(i),t.exit(r),e):(t.enter(o),u(n))}function u(e){return e===a?(t.exit(o),s(a)):null===e?n(e):Object(pt.h)(e)?(t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),Object(dt.a)(t,u,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),c(e))}function c(e){return e===a||null===e||Object(pt.h)(e)?(t.exit("chunkString"),u(e)):(t.consume(e),92===e?l:c)}function l(e){return e===a||92===e?(t.consume(e),c):c(e)}}function zt(t,e){var n;return function r(i){if(Object(pt.h)(i))return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),n=!0,r;if(Object(pt.j)(i))return Object(dt.a)(t,r,n?"linePrefix":"lineSuffix")(i);return e(i)}}var qt=n(34),Wt={name:"definition",tokenize:function(t,e,n){var r,i=this;return function(e){return t.enter("definition"),Qt.call(i,t,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(e)};function o(e){return r=Object(qt.a)(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),58===e?(t.enter("definitionMarker"),t.consume(e),t.exit("definitionMarker"),zt(t,It(t,t.attempt(Vt,Object(dt.a)(t,a,"whitespace"),Object(dt.a)(t,a,"whitespace")),n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):n(e)}function a(o){return null===o||Object(pt.h)(o)?(t.exit("definition"),i.parser.defined.includes(r)||i.parser.defined.push(r),e(o)):n(o)}}},Vt={tokenize:function(t,e,n){return function(e){return Object(pt.i)(e)?zt(t,r)(e):n(e)};function r(e){return 34===e||39===e||40===e?$t(t,Object(dt.a)(t,i,"whitespace"),n,"definitionTitle","definitionTitleMarker","definitionTitleString")(e):n(e)}function i(t){return null===t||Object(pt.h)(t)?e(t):n(t)}},partial:!0};var Yt={name:"codeIndented",tokenize:function(t,e,n){var r=this;return function(e){return t.enter("codeIndented"),Object(dt.a)(t,i,"linePrefix",5)(e)};function i(t){var e=r.events[r.events.length-1];return e&&"linePrefix"===e[1].type&&e[2].sliceSerialize(e[1],!0).length>=4?o(t):n(t)}function o(e){return null===e?s(e):Object(pt.h)(e)?t.attempt(Ut,o,s)(e):(t.enter("codeFlowValue"),a(e))}function a(e){return null===e||Object(pt.h)(e)?(t.exit("codeFlowValue"),o(e)):(t.consume(e),a)}function s(n){return t.exit("codeIndented"),e(n)}}},Ut={tokenize:function(t,e,n){var r=this;return i;function i(e){return r.parser.lazy[r.now().line]?n(e):Object(pt.h)(e)?(t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),i):Object(dt.a)(t,o,"linePrefix",5)(e)}function o(t){var o=r.events[r.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?e(t):Object(pt.h)(t)?i(t):n(t)}},partial:!0};var Ht={name:"headingAtx",tokenize:function(t,e,n){var r=this,i=0;return function(e){return t.enter("atxHeading"),t.enter("atxHeadingSequence"),o(e)};function o(s){return 35===s&&i++<6?(t.consume(s),o):null===s||Object(pt.i)(s)?(t.exit("atxHeadingSequence"),r.interrupt?e(s):a(s)):n(s)}function a(n){return 35===n?(t.enter("atxHeadingSequence"),s(n)):null===n||Object(pt.h)(n)?(t.exit("atxHeading"),e(n)):Object(pt.j)(n)?Object(dt.a)(t,a,"whitespace")(n):(t.enter("atxHeadingText"),u(n))}function s(e){return 35===e?(t.consume(e),s):(t.exit("atxHeadingSequence"),a(e))}function u(e){return null===e||35===e||Object(pt.i)(e)?(t.exit("atxHeadingText"),a(e)):(t.consume(e),u)}},resolve:function(t,e){var n,r,i=t.length-2,o=3;"whitespace"===t[o][1].type&&(o+=2);i-2>o&&"whitespace"===t[i][1].type&&(i-=2);"atxHeadingSequence"===t[i][1].type&&(o===i-1||i-4>o&&"whitespace"===t[i-2][1].type)&&(i-=o+1===i?2:4);i>o&&(n={type:"atxHeadingText",start:t[o][1].start,end:t[i][1].end},r={type:"chunkText",start:t[o][1].start,end:t[i][1].end,contentType:"text"},Object(mt.b)(t,o,i-o+1,[["enter",n,e],["enter",r,e],["exit",r,e],["exit",n,e]]));return t}};var Xt={name:"setextUnderline",tokenize:function(t,e,n){var r,i,o=this,a=o.events.length;for(;a--;)if("lineEnding"!==o.events[a][1].type&&"linePrefix"!==o.events[a][1].type&&"content"!==o.events[a][1].type){i="paragraph"===o.events[a][1].type;break}return function(e){if(!o.parser.lazy[o.now().line]&&(o.interrupt||i))return t.enter("setextHeadingLine"),t.enter("setextHeadingLineSequence"),r=e,s(e);return n(e)};function s(e){return e===r?(t.consume(e),s):(t.exit("setextHeadingLineSequence"),Object(dt.a)(t,u,"lineSuffix")(e))}function u(r){return null===r||Object(pt.h)(r)?(t.exit("setextHeadingLine"),e(r)):n(r)}},resolveTo:function(t,e){var n,r,i,o=t.length;for(;o--;)if("enter"===t[o][0]){if("content"===t[o][1].type){n=o;break}"paragraph"===t[o][1].type&&(r=o)}else"content"===t[o][1].type&&t.splice(o,1),i||"definition"!==t[o][1].type||(i=o);var a={type:"setextHeading",start:Object.assign({},t[r][1].start),end:Object.assign({},t[t.length-1][1].end)};t[r][1].type="setextHeadingText",i?(t.splice(r,0,["enter",a,e]),t.splice(i+1,0,["exit",t[n][1],e]),t[n][1].end=Object.assign({},t[i][1].end)):t[n][1]=a;return t.push(["exit",a,e]),t}};var Gt=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Zt=["pre","script","style","textarea"],Kt={name:"htmlFlow",tokenize:function(t,e,n){var r,i,o,a,s,u=this;return function(e){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(e),c};function c(a){return 33===a?(t.consume(a),l):47===a?(t.consume(a),d):63===a?(t.consume(a),r=3,u.interrupt?e:P):Object(pt.a)(a)?(t.consume(a),o=String.fromCharCode(a),i=!0,p):n(a)}function l(i){return 45===i?(t.consume(i),r=2,h):91===i?(t.consume(i),r=5,o="CDATA[",a=0,f):Object(pt.a)(i)?(t.consume(i),r=4,u.interrupt?e:P):n(i)}function h(r){return 45===r?(t.consume(r),u.interrupt?e:P):n(r)}function f(r){return r===o.charCodeAt(a++)?(t.consume(r),a===o.length?u.interrupt?e:E:f):n(r)}function d(e){return Object(pt.a)(e)?(t.consume(e),o=String.fromCharCode(e),p):n(e)}function p(a){return null===a||47===a||62===a||Object(pt.i)(a)?47!==a&&i&&Zt.includes(o.toLowerCase())?(r=1,u.interrupt?e(a):E(a)):Gt.includes(o.toLowerCase())?(r=6,47===a?(t.consume(a),g):u.interrupt?e(a):E(a)):(r=7,u.interrupt&&!u.parser.lazy[u.now().line]?n(a):i?v(a):m(a)):45===a||Object(pt.b)(a)?(t.consume(a),o+=String.fromCharCode(a),p):n(a)}function g(r){return 62===r?(t.consume(r),u.interrupt?e:E):n(r)}function m(e){return Object(pt.j)(e)?(t.consume(e),m):_(e)}function v(e){return 47===e?(t.consume(e),_):58===e||95===e||Object(pt.a)(e)?(t.consume(e),y):Object(pt.j)(e)?(t.consume(e),v):_(e)}function y(e){return 45===e||46===e||58===e||95===e||Object(pt.b)(e)?(t.consume(e),y):b(e)}function b(e){return 61===e?(t.consume(e),O):Object(pt.j)(e)?(t.consume(e),b):v(e)}function O(e){return null===e||60===e||61===e||62===e||96===e?n(e):34===e||39===e?(t.consume(e),s=e,w):Object(pt.j)(e)?(t.consume(e),O):(s=null,k(e))}function w(e){return null===e||Object(pt.h)(e)?n(e):e===s?(t.consume(e),x):(t.consume(e),w)}function k(e){return null===e||34===e||39===e||60===e||61===e||62===e||96===e||Object(pt.i)(e)?b(e):(t.consume(e),k)}function x(t){return 47===t||62===t||Object(pt.j)(t)?v(t):n(t)}function _(e){return 62===e?(t.consume(e),S):n(e)}function S(e){return Object(pt.j)(e)?(t.consume(e),S):null===e||Object(pt.h)(e)?E(e):n(e)}function E(e){return 45===e&&2===r?(t.consume(e),D):60===e&&1===r?(t.consume(e),M):62===e&&4===r?(t.consume(e),R):63===e&&3===r?(t.consume(e),P):93===e&&5===r?(t.consume(e),N):!Object(pt.h)(e)||6!==r&&7!==r?null===e||Object(pt.h)(e)?C(e):(t.consume(e),E):t.check(Jt,R,C)(e)}function C(e){return t.exit("htmlFlowData"),T(e)}function T(e){return null===e?L(e):Object(pt.h)(e)?t.attempt({tokenize:A,partial:!0},T,L)(e):(t.enter("htmlFlowData"),E(e))}function A(t,e,n){return function(e){return t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),r};function r(t){return u.parser.lazy[u.now().line]?n(t):e(t)}}function D(e){return 45===e?(t.consume(e),P):E(e)}function M(e){return 47===e?(t.consume(e),o="",j):E(e)}function j(e){return 62===e&&Zt.includes(o.toLowerCase())?(t.consume(e),R):Object(pt.a)(e)&&o.length<8?(t.consume(e),o+=String.fromCharCode(e),j):E(e)}function N(e){return 93===e?(t.consume(e),P):E(e)}function P(e){return 62===e?(t.consume(e),R):45===e&&2===r?(t.consume(e),P):E(e)}function R(e){return null===e||Object(pt.h)(e)?(t.exit("htmlFlowData"),L(e)):(t.consume(e),R)}function L(n){return t.exit("htmlFlow"),e(n)}},resolveTo:function(t){var e=t.length;for(;e--&&("enter"!==t[e][0]||"htmlFlow"!==t[e][1].type););e>1&&"linePrefix"===t[e-2][1].type&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2));return t},concrete:!0},Jt={tokenize:function(t,e,n){return function(r){return t.exit("htmlFlowData"),t.enter("lineEndingBlank"),t.consume(r),t.exit("lineEndingBlank"),t.attempt(bt.a,e,n)}},partial:!0};var te={name:"codeFenced",tokenize:function(t,e,n){var r,i=this,o={tokenize:function(t,e,n){var i=0;return Object(dt.a)(t,o,"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function o(e){return t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),a(e)}function a(e){return e===r?(t.consume(e),i++,a):i1&&t[l][1].end.offset-t[l][1].start.offset>1?2:1;var h=Object.assign({},t[n][1].end),f=Object.assign({},t[l][1].start);fe(h,-s),fe(f,s),o={type:s>1?"strongSequence":"emphasisSequence",start:h,end:Object.assign({},t[n][1].end)},a={type:s>1?"strongSequence":"emphasisSequence",start:Object.assign({},t[l][1].start),end:f},i={type:s>1?"strongText":"emphasisText",start:Object.assign({},t[n][1].end),end:Object.assign({},t[l][1].start)},r={type:s>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},a.end)},t[n][1].end=Object.assign({},o.start),t[l][1].start=Object.assign({},a.end),u=[],t[n][1].end.offset-t[n][1].start.offset&&(u=Object(mt.a)(u,[["enter",t[n][1],e],["exit",t[n][1],e]])),u=Object(mt.a)(u,[["enter",r,e],["enter",o,e],["exit",o,e],["enter",i,e]]),u=Object(mt.a)(u,Object(Mt.a)(e.parser.constructs.insideSpan.null,t.slice(n+1,l),e)),u=Object(mt.a)(u,[["exit",i,e],["enter",a,e],["exit",a,e],["exit",r,e]]),t[l][1].end.offset-t[l][1].start.offset?(c=2,u=Object(mt.a)(u,[["enter",t[l][1],e],["exit",t[l][1],e]])):c=0,Object(mt.b)(t,n-1,l-n+3,u),l=n+u.length-c-2;break}l=-1;for(;++l0&&void 0!==arguments[0]?arguments[0]:{},e=Fe({transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(it),autolinkProtocol:T,autolinkEmail:T,atxHeading:u(tt),blockQuote:u(X),characterEscape:T,characterReference:T,codeFenced:u(G),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:u(G,c),codeText:u(Z,c),codeTextData:T,data:T,codeFlowValue:T,definition:u(K),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:u(J),hardBreakEscape:u(et),hardBreakTrailing:u(et),htmlFlow:u(nt,c),htmlFlowData:T,htmlText:u(nt,c),htmlTextData:T,image:u(rt),label:c,link:u(it),listItem:u(at),listItemValue:g,listOrdered:u(ot,p),listUnordered:u(ot),paragraph:u(st),reference:q,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:u(tt),strong:u(ut),thematicBreak:u(ht)},exit:{atxHeading:h(),atxHeadingSequence:_,autolink:h(),autolinkEmail:H,autolinkProtocol:U,blockQuote:h(),characterEscapeValue:A,characterReferenceMarkerHexadecimal:V,characterReferenceMarkerNumeric:V,characterReferenceValue:Y,codeFenced:h(b),codeFencedFence:y,codeFencedFenceInfo:m,codeFencedFenceMeta:v,codeFlowValue:A,codeIndented:h(O),codeText:h(P),codeTextData:A,data:A,definition:h(),definitionDestinationString:x,definitionLabelString:w,definitionTitleString:k,emphasis:h(),hardBreakEscape:h(M),hardBreakTrailing:h(M),htmlFlow:h(j),htmlFlowData:A,htmlText:h(N),htmlTextData:A,image:h(L),label:I,labelText:F,lineEnding:D,link:h(R),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:W,resourceDestinationString:Q,resourceTitleString:$,resource:z,setextHeading:h(C),setextHeadingLineSequence:E,setextHeadingText:S,strong:h(),thematicBreak:h()}},t.mdastExtensions||[]),n={};return r;function r(t){for(var n={type:"root",children:[]},r=[],u=[],h={stack:[n],tokenStack:r,config:e,enter:l,exit:f,buffer:c,resume:d,setData:o,getData:a},p=-1;++p0){var m=r[r.length-1];(m[1]||Ie).call(h,void 0,m[0])}for(n.position={start:s(t.length>0?t[0][1].start:{line:1,column:1,offset:0}),end:s(t.length>0?t[t.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p0&&void 0!==arguments[0]?arguments[0]:{},e={defined:[],lazy:{},constructs:Object(ft.a)([r].concat(t.extensions||[])),content:n(gt),document:n(vt),flow:n(_t),string:n(Et),text:n(Ct)};return e;function n(t){return function(n){return jt(e,t,n)}}}(n).document().write(function(){var t,e=1,n="",r=!0;return function(i,o,a){var s,u,c,l,h,f=[];for(i=n+i.toString(o),c=0,n="",r&&(65279===i.charCodeAt(0)&&c++,r=void 0);c"+(n?"":" ")+t}var Ue=n(86);function He(t,e,n,r){for(var i=-1;++i"})+">"):(a=n.enter("destinationRaw"),s+=Object(Ze.a)(n,t.url,{before:"(",after:t.title?" ":")"})),a(),t.title&&(a=n.enter("title"+i),s+=" "+r+Object(Ze.a)(n,t.title,{before:r,after:r})+r,a()),s+=")",o(),s}function cn(t,e,n){var r=t.referenceType,i=n.enter("imageReference"),o=n.enter("label"),a=Object(Ze.a)(n,t.alt,{before:"[",after:"]"}),s="!["+a+"]";o();var u=n.stack;n.stack=[],o=n.enter("reference");var c=Object(Ze.a)(n,Object(Je.a)(t),{before:"[",after:"]"});return o(),n.stack=u,i(),"full"!==r&&a&&a===c?"shortcut"!==r&&(s+="[]"):s+="["+c+"]",s}sn.peek=function(){return"<"},un.peek=function(){return"!"},cn.peek=function(){return"!"};var ln=n(89);function hn(t,e){var n=ct(t);return Boolean(!e.options.resourceLink&&t.url&&!t.title&&t.children&&1===t.children.length&&"text"===t.children[0].type&&(n===t.url||"mailto:"+n===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}function fn(t,e,n){var r,i,o,a=tn(n),s='"'===a?"Quote":"Apostrophe";if(hn(t,n)){var u=n.stack;return n.stack=[],r=n.enter("autolink"),o="<"+Object(en.a)(t,n,{before:"<",after:">"})+">",r(),n.stack=u,o}return r=n.enter("link"),i=n.enter("label"),o="["+Object(en.a)(t,n,{before:"[",after:"]"})+"](",i(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(i=n.enter("destinationLiteral"),o+="<"+Object(Ze.a)(n,t.url,{before:"<",after:">"})+">"):(i=n.enter("destinationRaw"),o+=Object(Ze.a)(n,t.url,{before:"(",after:t.title?" ":")"})),i(),t.title&&(i=n.enter("title"+s),o+=" "+a+Object(Ze.a)(n,t.title,{before:a,after:a})+a,i()),o+=")",r(),o}function dn(t,e,n){var r=t.referenceType,i=n.enter("linkReference"),o=n.enter("label"),a=Object(en.a)(t,n,{before:"[",after:"]"}),s="["+a+"]";o();var u=n.stack;n.stack=[],o=n.enter("reference");var c=Object(Ze.a)(n,Object(Je.a)(t),{before:"[",after:"]"});return o(),n.stack=u,i(),"full"!==r&&a&&a===c?"shortcut"!==r&&(s+="[]"):s+="["+c+"]",s}fn.peek=function(t,e,n){return hn(t,n)?"<":"["},dn.peek=function(){return"["};var pn=n(57);function gn(t){var e=t.options.bulletOrdered||".";if("."!==e&&")"!==e)throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function mn(t){var e=t.options.rule||"*";if("*"!==e&&"-"!==e&&"_"!==e)throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}var vn=n(92);function yn(t,e,n){var r=function(t){var e=t.options.strong||"*";if("*"!==e&&"_"!==e)throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}(n),i=n.enter("strong"),o=Object(en.a)(t,n,{before:r,after:r});return i(),r+r+o+r+r}yn.peek=function(t,e,n){return n.options.strong||"*"};var bn={blockquote:function(t,e,n){var r=n.enter("blockquote"),i=Object(Ve.a)(Object(We.a)(t,n),Ye);return r(),i},break:He,code:function(t,e,n){var r,i,o=function(t){var e=t.options.fence||"`";if("`"!==e&&"~"!==e)throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}(n),a=t.value||"",s="`"===o?"GraveAccent":"Tilde";if(Ge(t,n))i=n.enter("codeIndented"),r=Object(Ve.a)(a,Ke);else{var u,c=o.repeat(Math.max(Object(Xe.a)(a,o)+1,3));i=n.enter("codeFenced"),r=c,t.lang&&(u=n.enter("codeFencedLang"+s),r+=Object(Ze.a)(n,t.lang,{before:"`",after:" ",encode:["`"]}),u()),t.lang&&t.meta&&(u=n.enter("codeFencedMeta"+s),r+=" "+Object(Ze.a)(n,t.meta,{before:" ",after:"\n",encode:["`"]}),u()),r+="\n",a&&(r+=a+"\n"),r+=c}return i(),r},definition:function(t,e,n){var r=tn(n),i='"'===r?"Quote":"Apostrophe",o=n.enter("definition"),a=n.enter("label"),s="["+Object(Ze.a)(n,Object(Je.a)(t),{before:"[",after:"]"})+"]: ";return a(),!t.url||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),s+="<"+Object(Ze.a)(n,t.url,{before:"<",after:">"})+">"):(a=n.enter("destinationRaw"),s+=Object(Ze.a)(n,t.url,{before:" ",after:" "})),a(),t.title&&(a=n.enter("title"+i),s+=" "+r+Object(Ze.a)(n,t.title,{before:r,after:r})+r,a()),o(),s},emphasis:nn,hardBreak:He,heading:function(t,e,n){var r=Math.max(Math.min(6,t.depth||1),1);if(an(t,n)){var i=n.enter("headingSetext"),o=n.enter("phrasing"),a=Object(en.a)(t,n,{before:"\n",after:"\n"});return o(),i(),a+"\n"+(1===r?"=":"-").repeat(a.length-(Math.max(a.lastIndexOf("\r"),a.lastIndexOf("\n"))+1))}var s="#".repeat(r),u=n.enter("headingAtx"),c=n.enter("phrasing"),l=Object(en.a)(t,n,{before:"# ",after:"\n"});return/^[\t ]/.test(l)&&(l="&#x"+l.charCodeAt(0).toString(16).toUpperCase()+";"+l.slice(1)),l=l?s+" "+l:s,n.options.closeAtx&&(l+=" "+s),c(),u(),l},html:sn,image:un,imageReference:cn,inlineCode:ln.a,link:fn,linkReference:dn,list:function(t,e,n){var r=n.enter("list"),i=n.bulletCurrent,o=t.ordered?gn(n):Object(pn.a)(n),a=t.ordered?function(t){var e=gn(t),n=t.options.bulletOrderedOther;if(!n)return"."===e?")":".";if("."!==n&&")"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrderedOther`, expected `*`, `+`, or `-`");if(n===e)throw new Error("Expected `bulletOrdered` (`"+e+"`) and `bulletOrderedOther` (`"+n+"`) to be different");return n}(n):function(t){var e=Object(pn.a)(t),n=t.options.bulletOther;if(!n)return"*"===e?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n),s=n.bulletLastUsed,u=!1;if(e&&(t.ordered?n.options.bulletOrderedOther:n.options.bulletOther)&&s&&o===s&&(u=!0),!t.ordered){var c=t.children?t.children[0]:void 0;if("*"!==o&&"-"!==o||!c||c.children&&c.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(u=!0),mn(n)===o&&c)for(var l=-1;++l"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:wn},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:wn},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:wn},{atBreak:!0,character:"~"}];function xn(t){throw new Error("Cannot handle value `"+t+"`, expected node")}function _n(t){throw new Error("Cannot handle unknown node `"+t.type+"`")}function Sn(t,e){if("definition"===t.type&&t.type===e.type)return 0}var En,Cn,Tn,An,Dn,Mn,jn,Nn,Pn,Rn,Ln,Fn,Bn=function(t){var e=this;Object.assign(this,{Compiler:function(n){var r=e.data("settings");return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={enter:i,stack:[],unsafe:[],join:[],handlers:{},options:{},indexStack:[]};qe(n,{unsafe:kn,join:On,handlers:bn}),qe(n,e),n.options.tightDefinitions&&qe(n,{join:[Sn]}),n.handle=ze("type",{invalid:xn,unknown:_n,handlers:n.handlers});var r=n.handle(t,null,n,{before:"\n",after:"\n"});return r&&10!==r.charCodeAt(r.length-1)&&13!==r.charCodeAt(r.length-1)&&(r+="\n"),r;function i(t){return n.stack.push(t),function(){n.stack.pop()}}}(n,Object.assign({},r,t,{extensions:e.data("toMarkdownExtensions")||[]}))}})},In=tt().use(Qe).use(Bn).freeze(),Qn=Object.defineProperty,$n=Object.defineProperties,zn=Object.getOwnPropertyDescriptors,qn=Object.getOwnPropertySymbols,Wn=Object.prototype.hasOwnProperty,Vn=Object.prototype.propertyIsEnumerable,Yn=function(t,e,n){return e in t?Qn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n},Un=function(t,e){for(var n in e||(e={}))Wn.call(e,n)&&Yn(t,n,e[n]);if(qn){var r,i=Object(c.a)(qn(e));try{for(i.s();!(r=i.n()).done;){n=r.value;Vn.call(e,n)&&Yn(t,n,e[n])}}catch(o){i.e(o)}finally{i.f()}}return t},Hn=function(t,e){return $n(t,zn(e))},Xn=function(t,e){var n={};for(var r in t)Wn.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&qn){var i,o=Object(c.a)(qn(t));try{for(o.s();!(i=o.n()).done;){r=i.value;e.indexOf(r)<0&&Vn.call(t,r)&&(n[r]=t[r])}}catch(a){o.e(a)}finally{o.f()}}return n},Gn=function(t,e,n){if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Zn=function(t,e,n){return function(t,e,n){if(!e.has(t))throw TypeError("Cannot "+n)}(t,e,"access private method"),n},Kn=function(){var t=function(t){return t.elements.length},e=function(e){return e.elements[t(e)-1]};return{size:t,top:e,push:function(t){return function(n){var r;null==(r=e(t))||r.push(n)}},open:function(t){return function(e){t.elements.push(e)}},close:function(t){var e=t.elements.pop();if(!e)throw Object(d.i)();return e}}},Jn=function(t,e){for(var n,r=arguments.length,i=new Array(r>2?r-2:0),o=2;o0&&void 0!==arguments[0]?arguments[0]:[];return[t].flat().forEach((function(t){return Zn(o,Tn,An).call(o,t)})),o},this.toDoc=function(){return o.stack.build()},this.injectRoot=function(t,e,n){return o.stack.openNode(e,n),o.next(t.children),o},this.addText=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return o.stack.addText(t),o},this.addNode=function(){var t;return(t=o.stack).addNode.apply(t,arguments),o},this.openNode=function(){var t;return(t=o.stack).openNode.apply(t,arguments),o},this.closeNode=function(){var t;return(t=o.stack).closeNode.apply(t,arguments),o},this.openMark=function(){var t;return(t=o.stack).openMark.apply(t,arguments),o},this.closeMark=function(){var t;return(t=o.stack).closeMark.apply(t,arguments),o}}));En=new WeakSet,Cn=function(t){var e=Object.values(this.specMap).find((function(e){return e.match(t)}));if(!e)throw Object(d.g)(t);return e},Tn=new WeakSet,An=function(t){var e=Zn(this,En,Cn).call(this,t),n=e.key,r=e.runner,i=e.is;r(this,t,this.schema["node"===i?"nodes":"marks"][n])};var gr=function(t,e,n){return function(r){var i=new pr(function(t){var e={marks:[],elements:[],schema:t};return{build:dr(e),openMark:lr(e),closeMark:hr(e),addText:fr(e),openNode:sr(e),addNode:ur(e),closeNode:cr(e)}}(t),t,e);return i.run(n,r),i.toDoc()}},mr=function(t,e){var n;t.children||(t.children=[]);for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o3&&void 0!==arguments[3]?arguments[3]:{},i={type:t,children:e,props:r,value:n,push:function(){for(var t=arguments.length,e=new Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){return"".concat(t)};return Object.entries(t).map((function(t){var n=Object(s.a)(t,2),r=n[0],i=n[1];return"--".concat(r,": ").concat(e(i),";")})).join("\n")};var Zr={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Kr(t){var e=Object.create(null);return function(n){return void 0===e[n]&&(e[n]=t(n)),e[n]}}var Jr=/[A-Z]|^ms/g,ti=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ei=function(t){return 45===t.charCodeAt(1)},ni=function(t){return null!=t&&"boolean"!==typeof t},ri=Kr((function(t){return ei(t)?t:t.replace(Jr,"-$&").toLowerCase()})),ii=function(t,e){switch(t){case"animation":case"animationName":if("string"===typeof e)return e.replace(ti,(function(t,e,n){return ai={name:e,styles:n,next:ai},e}))}return 1===Zr[t]||ei(t)||"number"!==typeof e||0===e?e:e+"px"};function oi(t,e,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return ai={name:n.name,styles:n.styles,next:ai},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)ai={name:r.name,styles:r.styles,next:ai},r=r.next;return n.styles+";"}return function(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i=4;++r,i-=4)e=1540483477*(65535&(e=255&t.charCodeAt(r)|(255&t.charCodeAt(++r))<<8|(255&t.charCodeAt(++r))<<16|(255&t.charCodeAt(++r))<<24))+(59797*(e>>>16)<<16),n=1540483477*(65535&(e^=e>>>24))+(59797*(e>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&t.charCodeAt(r+2))<<16;case 2:n^=(255&t.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&t.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+u;return{name:c,styles:i,next:ai}};function ci(t,e,n){var r="";return n.split(" ").forEach((function(n){void 0!==t[n]?e.push(t[n]+";"):r+=n+" "})),r}var li=function(t,e,n){var r=t.key+"-"+e.name;if(!1===n&&void 0===t.registered[r]&&(t.registered[r]=e.styles),void 0===t.inserted[e.name]){var i=e;do{t.insert(e===i?"."+r:"",i,t.sheet,!0),i=i.next}while(void 0!==i)}};function hi(t,e){if(void 0===t.inserted[e.name])return t.insert("",e,t.sheet,!0)}function fi(t,e,n){var r=[],i=ci(t,r,n);return r.length<2?n:i+e(r)}var di,pi,gi,mi,vi,yi,bi,Oi=function t(e){for(var n="",r=0;r0&&void 0!==arguments[0]?arguments[0]:{},Xr)}(r),Gr(i,(function(t){return t.join(", ")})),Gr(a))},xi=function(t){var e=t.font,n=t.size,r=void 0===n?{}:n,i=t.mixin,o=t.slots,a=t.global,s=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.fromEntries(Object.keys(t).map((function(t){return[t,"var(--".concat(t,")")]})))},u={palette:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return"rgba(var(--".concat(t,"), ").concat(e,")")},size:qr(qr({},Yr),s(r)),font:qr(qr({},Vr),s(e))},c=qr(qr({},Ur),null==i?void 0:i(u)),l=Wr(qr({},u),{mixin:c}),h=qr(qr({},Hr),null==o?void 0:o(l)),f=Wr(qr({},l),{slots:h});return null==a||a(f),f},_i=Object.defineProperty,Si=Object.defineProperties,Ei=Object.getOwnPropertyDescriptors,Ci=Object.getOwnPropertySymbols,Ti=Object.prototype.hasOwnProperty,Ai=Object.prototype.propertyIsEnumerable,Di=function(t,e,n){return e in t?_i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n},Mi=function(t,e){for(var n in e||(e={}))Ti.call(e,n)&&Di(t,n,e[n]);if(Ci){var r,i=Object(c.a)(Ci(e));try{for(i.s();!(r=i.n()).done;){n=r.value;Ai.call(e,n)&&Di(t,n,e[n])}}catch(o){i.e(o)}finally{i.f()}}return t},ji=function(t,e){return Si(t,Ei(e))},Ni=function(t,e,n){if(!e.has(t))throw TypeError("Cannot "+n)},Pi=function(t,e,n){return Ni(t,e,"read from private field"),n?n.call(t):e.get(t)},Ri=function(t,e,n){if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Li=function(t,e,n,r){return Ni(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n},Fi=Object(f.f)("ConfigReady"),Bi=Object(f.f)("InitReady"),Ii=Object(f.e)([],"initTimer"),Qi=Object(f.e)({},"editor"),$i=Object(f.e)([],"inputRules"),zi=Object(f.e)([],"prosePlugins"),qi=Object(f.e)([],"remarkPlugins"),Wi=Object(f.e)([],"nodeView"),Vi=Object(f.e)(In(),"remark"),Yi=Object(f.f)("schemaReady"),Ui=Object(f.e)({},"schema"),Hi=Object(f.e)([],"schemaTimer"),Xi=Object(f.e)([],"nodes"),Gi=Object(f.e)([],"marks"),Zi=function(t){var e;return ji(Mi({},t),{parseDOM:null==(e=t.parseDOM)?void 0:e.map((function(e){return Mi({priority:t.priority},e)}))})},Ki=function(t){return t.inject(Ui).inject(Xi).inject(Gi).inject(Hi,[Bi]).record(Yi),function(){var t=Object(u.a)(h.a.mark((function t(e){var n,r,i,o,a;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.waitTimers(Hi);case 2:n=e.get(Vi),r=e.get(qi),i=r.reduce((function(t,e){return t.use(e)}),n),e.set(Vi,i),o=Object.fromEntries(e.get(Xi).map((function(t){var e=Object(s.a)(t,2),n=e[0],r=e[1];return[n,Zi(r)]}))),a=Object.fromEntries(e.get(Gi).map((function(t){var e=Object(s.a)(t,2),n=e[0],r=e[1];return[n,Zi(r)]}))),e.set(Ui,new p.i({nodes:o,marks:a})),e.done(Yi);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},Ji=Object(f.e)((function(){return null}),"parser"),to=Object(f.e)([],"parserTimer"),eo=Object(f.f)("ParserReady"),no=function(t){return t.inject(Ji).inject(to,[Yi]).record(eo),function(){var t=Object(u.a)(h.a.mark((function t(e){var n,r,i,o,u,c;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.waitTimers(to);case 2:n=e.get(Xi),r=e.get(Gi),i=e.get(Vi),o=e.get(Ui),u=[].concat(Object(a.a)(n.map((function(t){var e=Object(s.a)(t,2),n=e[0],r=e[1];return Mi({id:n},r)})).map((function(t){return ji(Mi({},t),{is:"node"})}))),Object(a.a)(r.map((function(t){var e=Object(s.a)(t,2),n=e[0],r=e[1];return Mi({id:n},r)})).map((function(t){return ji(Mi({},t),{is:"mark"})})))),c=Object.fromEntries(u.map((function(t){var e=t.id,n=t.parseMarkdown,r=t.is;return[e,ji(Mi({},n),{is:r,key:e})]}))),e.set(Ji,gr(o,c,i)),e.done(eo);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},ro=Object(f.e)((function(){return""}),"serializer"),io=Object(f.e)([],"serializerTimer"),oo=Object(f.f)("SerializerReady"),ao=function(t){return t.inject(ro).inject(io,[Yi]).record(oo),function(){var t=Object(u.a)(h.a.mark((function t(e){var n,r,i,o,u,c;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.waitTimers(io);case 2:n=e.get(Xi),r=e.get(Gi),i=e.get(Vi),o=e.get(Ui),u=[].concat(Object(a.a)(n),Object(a.a)(r)),c=Object.fromEntries(u.map((function(t){var e=Object(s.a)(t,2);return[e[0],e[1].toMarkdown]}))),e.set(ro,Nr(o,c,i)),e.done(oo);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},so=Object(f.e)("","defaultValue"),uo=Object(f.e)({},"editorState"),co=Object(f.e)({},"stateOptions"),lo=Object(f.e)([],"editorStateTimer"),ho=Object(f.f)("EditorStateReady"),fo=function(t,e,n){if("string"===typeof t)return e(t);if("html"===t.type)return p.a.fromSchema(n).parse(t.dom);if("json"===t.type)return p.f.fromJSON(n,t.value);throw Object(d.e)(t)},po=function(t){return t.inject(so).inject(uo).inject(co).inject(lo,[eo,oo,Eo]).record(ho),function(){var t=Object(u.a)(h.a.mark((function t(e){var n,r,i,o,s,u,c,l;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.waitTimers(lo);case 2:n=e.get(Ui),r=e.get(Ji),i=e.get($i),o=e.get(co),s=e.get(zi),u=e.get(so),c=fo(u,r,n),l=g.b.create(Mi({schema:n,doc:c,plugins:[].concat(Object(a.a)(s),[Object(m.d)({rules:i}),Object(v.b)(y.a)])},o)),e.set(uo,l),e.done(ho);case 12:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},go=Object(f.e)({},"editorView"),mo=Object(f.e)({},"editorViewOptions"),vo=Object(f.e)(document.body,"root"),yo=Object(f.e)([],"editorViewTimer"),bo=Object(f.f)("EditorViewReady"),Oo=function(t){var e=document.createElement("div");return e.className="milkdown",t.appendChild(e),e},wo=function(t){return t.inject(vo,document.body).inject(go).inject(mo).inject(yo,[ho]).record(bo),function(){var t=Object(u.a)(h.a.mark((function t(e){var n,r,i,o,a,s,u;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.waitTimers(yo);case 2:n=e.get(uo),r=e.get(mo),i=Object.fromEntries(e.get(Wi)),o=e.get(vo),a="string"===typeof o?document.querySelector(o):o,s=a?Oo(a):void 0,u=new b.c(s,Mi({state:n,nodeViews:i},r)),(c=u.dom).classList.add("editor"),c.setAttribute("role","textbox"),e.set(go,u),e.done(bo);case 12:case"end":return t.stop()}var c}),t)})));return function(e){return t.apply(this,arguments)}}()},ko=function(t,e){return[t,e]},xo=Object(f.e)({},"commands"),_o=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cmdKey";return Object(f.e)((function(){return function(){return!1}}),t)},So=Object(f.e)([],"commandsTimer"),Eo=Object(f.f)("CommandsReady"),Co=function(t){var e=Object(f.d)(),n={create:function(t,n){return t(e.sliceMap,n)},get:function(t){return e.getSlice(t).get()},getByName:function(t){var n=e.getSliceByName(t);return n?n.get():null},call:function(){throw Object(d.a)()},callByName:function(){throw Object(d.a)()}};return t.inject(xo,n).inject(So,[Yi]).record(Eo),function(){var t=Object(u.a)(h.a.mark((function t(e){return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.waitTimers(So);case 2:return e.done(Eo),t.next=5,e.wait(bo);case 5:e.update(xo,(function(t){return ji(Mi({},t),{call:function(t,r){var i=n.get(t)(r),o=e.get(go);return i(o.state,o.dispatch,o)},callByName:function(t,r){var i=n.getByName(t);if(!i)return null;var o=i(r),a=e.get(go);return o(a.state,a.dispatch,a)}})}));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},To=Object(f.e)({mixin:{},font:{},size:{},slots:{},palette:function(){return""}},"ThemeTool"),Ao=Object(f.e)({key:"milkdown"},"EmotionConfig"),Do=Object(f.e)({},"Emotion"),Mo=new g.e("MILKDOWN_THEME_RESET"),jo=function(t){return function(e){return e.inject(To).inject(Ao).inject(Do),function(){var e=Object(u.a)(h.a.mark((function e(n){var r,i,o;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.wait(Fi);case 2:return r=wi(n.get(Ao)),i=t(r),ki(i,r),o=xi(i),n.set(Do,r),n.set(To,o),e.next=10,n.wait(Bi);case 10:n.update(zi,(function(t){return t.concat(new g.d({key:Mo,view:function(){return{destroy:function(){r.flush()}}}}))}));case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}},No=function(){function t(){var e=this;Object(i.a)(this,t),Ri(this,di,void 0),Ri(this,pi,void 0),Ri(this,gi,void 0),Ri(this,mi,void 0),Ri(this,vi,void 0),Ri(this,yi,void 0),Ri(this,bi,void 0),Li(this,di,Object(f.d)()),Li(this,pi,Object(f.c)()),Li(this,gi,new Set),Li(this,mi,[]),Li(this,vi,new f.a(Pi(this,di),Pi(this,pi))),Li(this,yi,new f.b(Pi(this,di),Pi(this,pi))),Li(this,bi,(function(){var t,n,r=[Ki,no,ao,Co,po,wo],i=(t=function(){var t=Object(u.a)(h.a.mark((function t(n){return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all(Pi(e,mi).map((function(t){return t(n)})));case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),function(e){return e.record(Fi),function(){var e=Object(u.a)(h.a.mark((function e(n){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t(n);case 2:n.done(Fi);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()});e.use(r.concat((n=e,function(t){return t.inject(Qi,n).inject(zi).inject(qi).inject($i).inject(Wi).inject(Vi,In()).inject(Ii,[Fi]).record(Bi),function(){var t=Object(u.a)(h.a.mark((function t(e){return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.waitTimers(Ii);case 2:e.done(Bi);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()})).concat(i))})),this.use=function(t){return[t].flat().forEach((function(t){Pi(e,gi).add(t(Pi(e,yi)))})),e},this.config=function(t){return Pi(e,mi).push(t),e},this.create=Object(u.a)(h.a.mark((function t(){return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return Pi(e,bi).call(e),t.next=3,Promise.all(Object(a.a)(Pi(e,gi)).map((function(t){return t(Pi(e,vi))})));case 3:return t.abrupt("return",e);case 4:case"end":return t.stop()}}),t)}))),this.action=function(t){return t(Pi(e,vi))}}return Object(o.a)(t,[{key:"ctx",get:function(){return Pi(this,vi)}}],[{key:"make",value:function(){return new t}}]),t}(),Po=No;di=new WeakMap,pi=new WeakMap,gi=new WeakMap,mi=new WeakMap,vi=new WeakMap,yi=new WeakMap,bi=new WeakMap},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"e",(function(){return i})),n.d(e,"f",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"g",(function(){return s})),n.d(e,"c",(function(){return u})),n.d(e,"d",(function(){return c})),n.d(e,"i",(function(){return l})),n.d(e,"h",(function(){return h})),n.d(e,"j",(function(){return f})),n.d(e,"l",(function(){return d})),n.d(e,"k",(function(){return p}));var r=g(/[A-Za-z]/),i=g(/\d/),o=g(/[\dA-Fa-f]/),a=g(/[\dA-Za-z]/),s=g(/[!-/:-@[-`{-~]/),u=g(/[#-'*+\--9=?A-Z^-~]/);function c(t){return null!==t&&(t<32||127===t)}function l(t){return null!==t&&(t<0||32===t)}function h(t){return null!==t&&t<-2}function f(t){return-2===t||-1===t||32===t}var d=g(/\s/),p=g(/[!-/:-@[-`{-~\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\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\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\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-\u2E4F\u2E52\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]/);function g(t){return function(e){return null!==e&&t.test(String.fromCharCode(e))}}},function(t,e,n){"use strict";function r(t){this.content=t}n.d(e,"a",(function(){return at})),n.d(e,"b",(function(){return vt})),n.d(e,"c",(function(){return s})),n.d(e,"d",(function(){return f})),n.d(e,"e",(function(){return rt})),n.d(e,"f",(function(){return R})),n.d(e,"g",(function(){return j})),n.d(e,"h",(function(){return d})),n.d(e,"i",(function(){return it})),n.d(e,"j",(function(){return p})),r.prototype={constructor:r,find:function(t){for(var e=0;e>1}},r.from=function(t){if(t instanceof r)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new r(e)};var i=r;function o(t,e,n){for(var r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;var i=t.child(r),a=e.child(r);if(i!=a){if(!i.sameMarkup(a))return n;if(i.isText&&i.text!=a.text){for(var s=0;i.text[s]==a.text[s];s++)n++;return n}if(i.content.size||a.content.size){var u=o(i.content,a.content,n+1);if(null!=u)return u}n+=i.nodeSize}else n+=i.nodeSize}}function a(t,e,n,r){for(var i=t.childCount,o=e.childCount;;){if(0==i||0==o)return i==o?null:{a:n,b:r};var s=t.child(--i),u=e.child(--o),c=s.nodeSize;if(s!=u){if(!s.sameMarkup(u))return{a:n,b:r};if(s.isText&&s.text!=u.text){for(var l=0,h=Math.min(s.text.length,u.text.length);lt&&!1!==n(s,r+a,i,o)&&s.content.size){var c=a+1;s.nodesBetween(Math.max(0,t-c),Math.min(s.content.size,e-c),n,r+c)}a=u}},s.prototype.descendants=function(t){this.nodesBetween(0,this.size,t)},s.prototype.textBetween=function(t,e,n,r){var i="",o=!0;return this.nodesBetween(t,e,(function(a,s){a.isText?(i+=a.text.slice(Math.max(t,s)-s,e-s),o=!n):a.isLeaf&&r?(i+="function"===typeof r?r(a):r,o=!n):!o&&a.isBlock&&(i+=n,o=!0)}),0),i},s.prototype.append=function(t){if(!t.size)return this;if(!this.size)return t;var e=this.lastChild,n=t.firstChild,r=this.content.slice(),i=0;for(e.isText&&e.sameMarkup(n)&&(r[r.length-1]=e.withText(e.text+n.text),i=1);it)for(var i=0,o=0;ot&&((oe)&&(a=a.isText?a.cut(Math.max(0,t-o),Math.min(a.text.length,e-o)):a.cut(Math.max(0,t-o-1),Math.min(a.content.size,e-o-1))),n.push(a),r+=a.nodeSize),o=u}return new s(n,r)},s.prototype.cutByIndex=function(t,e){return t==e?s.empty:0==t&&e==this.content.length?this:new s(this.content.slice(t,e))},s.prototype.replaceChild=function(t,e){var n=this.content[t];if(n==e)return this;var r=this.content.slice(),i=this.size+e.nodeSize-n.nodeSize;return r[t]=e,new s(r,i)},s.prototype.addToStart=function(t){return new s([t].concat(this.content),this.size+t.nodeSize)},s.prototype.addToEnd=function(t){return new s(this.content.concat(t),this.size+t.nodeSize)},s.prototype.eq=function(t){if(this.content.length!=t.content.length)return!1;for(var e=0;ethis.size||t<0)throw new RangeError("Position "+t+" outside of fragment ("+this+")");for(var n=0,r=0;;n++){var i=r+this.child(n).nodeSize;if(i>=t)return i==t||e>0?l(n+1,i):l(n,r);r=i}},s.prototype.toString=function(){return"<"+this.toStringInner()+">"},s.prototype.toStringInner=function(){return this.content.join(", ")},s.prototype.toJSON=function(){return this.content.length?this.content.map((function(t){return t.toJSON()})):null},s.fromJSON=function(t,e){if(!e)return s.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new s(e.map(t.nodeFromJSON))},s.fromArray=function(t){if(!t.length)return s.empty;for(var e,n=0,r=0;rthis.type.rank&&(e||(e=t.slice(0,r)),e.push(this),n=!0),e&&e.push(i)}}return e||(e=t.slice()),n||e.push(this),e},f.prototype.removeFromSet=function(t){for(var e=0;et.depth)throw new d("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new d("Inconsistent open depths");return b(t,e,n,0)}function b(t,e,n,r){var i=t.index(r),o=t.node(r);if(i==e.index(r)&&r=0;i--)r=e.node(i).copy(s.from(r));return{start:r.resolveNoCache(t.openStart+n),end:r.resolveNoCache(r.content.size-t.openEnd-n)}}(n,t);return _(o,S(t,u.start,u.end,e,r))}var c=t.parent,l=c.content;return _(c,l.cut(0,t.parentOffset).append(n.content).append(l.cut(e.parentOffset)))}return _(o,E(t,e,r))}function O(t,e){if(!e.type.compatibleContent(t.type))throw new d("Cannot join "+e.type.name+" onto "+t.type.name)}function w(t,e,n){var r=t.node(n);return O(r,e.node(n)),r}function k(t,e){var n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function x(t,e,n,r){var i=(e||t).node(n),o=0,a=e?e.index(n):i.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(k(t.nodeAfter,r),o++));for(var s=o;si&&w(t,e,i+1),a=r.depth>i&&w(n,r,i+1),u=[];return x(null,t,i,u),o&&a&&e.index(i)==n.index(i)?(O(o,a),k(_(o,S(t,e,n,r,i+1)),u)):(o&&k(_(o,E(t,e,i+1)),u),x(e,n,i,u),a&&k(_(a,E(n,r,i+1)),u)),x(r,null,i,u),new s(u)}function E(t,e,n){var r=[];(x(null,t,n,r),t.depth>n)&&k(_(w(t,e,n+1),E(t,e,n+1)),r);return x(e,null,n,r),new s(r)}g.size.get=function(){return this.content.size-this.openStart-this.openEnd},p.prototype.insertAt=function(t,e){var n=v(this.content,t+this.openStart,e,null);return n&&new p(n,this.openStart,this.openEnd)},p.prototype.removeBetween=function(t,e){return new p(m(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)},p.prototype.eq=function(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd},p.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},p.prototype.toJSON=function(){if(!this.content.size)return null;var t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t},p.fromJSON=function(t,e){if(!e)return p.empty;var n=e.openStart||0,r=e.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new p(s.fromJSON(t,e.content),n,r)},p.maxOpen=function(t,e){void 0===e&&(e=!0);for(var n=0,r=0,i=t.firstChild;i&&!i.isLeaf&&(e||!i.type.spec.isolating);i=i.firstChild)n++;for(var o=t.lastChild;o&&!o.isLeaf&&(e||!o.type.spec.isolating);o=o.lastChild)r++;return new p(t,n,r)},Object.defineProperties(p.prototype,g),p.empty=new p(s.empty,0,0);var C=function(t,e,n){this.pos=t,this.path=e,this.depth=e.length/3-1,this.parentOffset=n},T={parent:{configurable:!0},doc:{configurable:!0},textOffset:{configurable:!0},nodeAfter:{configurable:!0},nodeBefore:{configurable:!0}};C.prototype.resolveDepth=function(t){return null==t?this.depth:t<0?this.depth+t:t},T.parent.get=function(){return this.node(this.depth)},T.doc.get=function(){return this.node(0)},C.prototype.node=function(t){return this.path[3*this.resolveDepth(t)]},C.prototype.index=function(t){return this.path[3*this.resolveDepth(t)+1]},C.prototype.indexAfter=function(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)},C.prototype.start=function(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1},C.prototype.end=function(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size},C.prototype.before=function(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]},C.prototype.after=function(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize},T.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},T.nodeAfter.get=function(){var t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;var n=this.pos-this.path[this.path.length-1],r=t.child(e);return n?t.child(e).cut(n):r},T.nodeBefore.get=function(){var t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)},C.prototype.posAtIndex=function(t,e){e=this.resolveDepth(e);for(var n=this.path[3*e],r=0==e?0:this.path[3*e-1]+1,i=0;i0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0},C.prototype.blockRange=function(t,e){if(void 0===t&&(t=this),t.pos=0;n--)if(t.pos<=this.end(n)&&(!e||e(this.node(n))))return new j(this,t,n)},C.prototype.sameParent=function(t){return this.pos-this.parentOffset==t.pos-t.parentOffset},C.prototype.max=function(t){return t.pos>this.pos?t:this},C.prototype.min=function(t){return t.pos=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");for(var n=[],r=0,i=e,o=t;;){var a=o.content.findIndex(i),s=a.index,u=a.offset,c=i-u;if(n.push(o,s,r+u),!c)break;if((o=o.child(s)).isText)break;i=c-1,r+=u+1}return new C(e,n,i)},C.resolveCached=function(t,e){for(var n=0;nt&&this.nodesBetween(t,e,(function(t){return n.isInSet(t.marks)&&(r=!0),!r})),r},L.isBlock.get=function(){return this.type.isBlock},L.isTextblock.get=function(){return this.type.isTextblock},L.inlineContent.get=function(){return this.type.inlineContent},L.isInline.get=function(){return this.type.isInline},L.isText.get=function(){return this.type.isText},L.isLeaf.get=function(){return this.type.isLeaf},L.isAtom.get=function(){return this.type.isAtom},R.prototype.toString=function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),B(this.marks,t)},R.prototype.contentMatchAt=function(t){var e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e},R.prototype.canReplace=function(t,e,n,r,i){void 0===n&&(n=s.empty),void 0===r&&(r=0),void 0===i&&(i=n.childCount);var o=this.contentMatchAt(t).matchFragment(n,r,i),a=o&&o.matchFragment(this.content,e);if(!a||!a.validEnd)return!1;for(var u=r;u=0;n--)e=t[n].type.name+"("+e+")";return e}var I=function(t){this.validEnd=t,this.next=[],this.wrapCache=[]},Q={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};I.parse=function(t,e){var n=new $(t,e);if(null==n.next)return I.empty;var r=q(n);n.next&&n.err("Unexpected trailing text");var i=function(t){var e=Object.create(null);return n(X(t,0));function n(r){var i=[];r.forEach((function(e){t[e].forEach((function(e){var n=e.term,r=e.to;if(n){var o=i.indexOf(n),a=o>-1&&i[o+1];X(t,r).forEach((function(t){a||i.push(n,a=[]),-1==a.indexOf(t)&&a.push(t)}))}}))}));for(var o=e[r.join(",")]=new I(r.indexOf(t.length-1)>-1),a=0;a>1},I.prototype.edge=function(t){var e=t<<1;if(e>=this.next.length)throw new RangeError("There's no "+t+"th edge in this content match");return{type:this.next[e],next:this.next[e+1]}},I.prototype.toString=function(){var t=[];return function e(n){t.push(n);for(var r=1;r"+t.indexOf(e.next[i+1]);return r})).join("\n")},Object.defineProperties(I.prototype,Q),I.empty=new I(!0);var $=function(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()},z={next:{configurable:!0}};function q(t){var e=[];do{e.push(W(t))}while(t.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function W(t){var e=[];do{e.push(V(t))}while(t.next&&")"!=t.next&&"|"!=t.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function V(t){for(var e=function(t){if(t.eat("(")){var e=q(t);return t.eat(")")||t.err("Missing closing paren"),e}if(!/\W/.test(t.next)){var n=function(t,e){var n=t.nodeTypes,r=n[e];if(r)return[r];var i=[];for(var o in n){var a=n[o];a.groups.indexOf(e)>-1&&i.push(a)}0==i.length&&t.err("No node type or group '"+e+"' found");return i}(t,t.next).map((function(e){return null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e}}));return t.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}t.err("Unexpected token '"+t.next+"'")}(t);;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else{if(!t.eat("{"))break;e=U(t,e)}return e}function Y(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");var e=Number(t.next);return t.pos++,e}function U(t,e){var n=Y(t),r=n;return t.eat(",")&&(r="}"!=t.next?Y(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function H(t,e){return e-t}function X(t,e){var n=[];return function e(r){var i=t[r];if(1==i.length&&!i[0].term)return e(i[0].to);n.push(r);for(var o=0;o-1},J.prototype.allowsMarks=function(t){if(null==this.markSet)return!0;for(var e=0;e-1};var it=function(t){for(var e in this.spec={},t)this.spec[e]=t[e];this.spec.nodes=i.from(t.nodes),this.spec.marks=i.from(t.marks),this.nodes=J.compile(this.spec.nodes,this),this.marks=rt.compile(this.spec.marks,this);var n=Object.create(null);for(var r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");var o=this.nodes[r],a=o.spec.content||"",s=o.spec.marks;o.contentMatch=n[a]||(n[a]=I.parse(a,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet="_"==s?null:s?ot(this,s.split(" ")):""!=s&&o.inlineContent?null:[]}for(var u in this.marks){var c=this.marks[u],l=c.spec.excludes;c.excluded=null==l?[c]:""==l?[]:ot(this,l.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached=Object.create(null),this.cached.wrappings=Object.create(null)};function ot(t,e){for(var n=[],r=0;r-1)&&n.push(a=u)}if(!a)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}it.prototype.node=function(t,e,n,r){if("string"==typeof t)t=this.nodeType(t);else{if(!(t instanceof J))throw new RangeError("Invalid node type: "+t);if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}return t.createChecked(e,n,r)},it.prototype.text=function(t,e){var n=this.nodes.text;return new F(n,n.defaultAttrs,t,f.setFrom(e))},it.prototype.mark=function(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)},it.prototype.nodeFromJSON=function(t){return R.fromJSON(this,t)},it.prototype.markFromJSON=function(t){return f.fromJSON(this,t)},it.prototype.nodeType=function(t){var e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e};var at=function(t,e){var n=this;this.schema=t,this.rules=e,this.tags=[],this.styles=[],e.forEach((function(t){t.tag?n.tags.push(t):t.style&&n.styles.push(t)})),this.normalizeLists=!this.tags.some((function(e){if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;var n=t.nodes[e.node];return n.contentMatch.matchType(n)}))};at.prototype.parse=function(t,e){void 0===e&&(e={});var n=new ft(this,e,!1);return n.addAll(t,null,e.from,e.to),n.finish()},at.prototype.parseSlice=function(t,e){void 0===e&&(e={});var n=new ft(this,e,!0);return n.addAll(t,null,e.from,e.to),p.maxOpen(n.finish())},at.prototype.matchTag=function(t,e,n){for(var r=n?this.tags.indexOf(n)+1:0;rt.length&&(61!=o.style.charCodeAt(t.length)||o.style.slice(t.length+1)!=e))){if(o.getAttrs){var a=o.getAttrs(e);if(!1===a)continue;o.attrs=a}return o}}},at.schemaRules=function(t){var e=[];function n(t){for(var n=null==t.priority?50:t.priority,r=0;r=0;e--)if(t.eq(this.stashMarks[e]))return this.stashMarks.splice(e,1)[0]},ht.prototype.applyPending=function(t){for(var e=0,n=this.pendingMarks;e=0;r--){var i=this.nodes[r],o=i.findWrapping(t);if(o&&(!e||e.length>o.length)&&(e=o,n=i,!o.length))break;if(i.solid)break}if(!e)return!1;this.sync(n);for(var a=0;athis.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}},ft.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},ft.prototype.sync=function(t){for(var e=this.open;e>=0;e--)if(this.nodes[e]==t)return void(this.open=e)},dt.currentPos.get=function(){this.closeExtra();for(var t=0,e=this.open;e>=0;e--){for(var n=this.nodes[e].content,r=n.length-1;r>=0;r--)t+=n[r].nodeSize;e&&t++}return t},ft.prototype.findAtPoint=function(t,e){if(this.find)for(var n=0;n-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);var n=t.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1);return function t(a,s){for(;a>=0;a--){var u=n[a];if(""==u){if(a==n.length-1||0==a)continue;for(;s>=o;s--)if(t(a-1,s))return!0;return!1}var c=s>0||0==s&&i?e.nodes[s].type:r&&s>=o?r.node(s-o).type:null;if(!c||c.name!=u&&-1==c.groups.indexOf(u))return!1;s--}return!0}(n.length-1,this.open)},ft.prototype.textblockFromContext=function(){var t=this.options.context;if(t)for(var e=t.depth;e>=0;e--){var n=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(var r in this.parser.schema.nodes){var i=this.parser.schema.nodes[r];if(i.isTextblock&&i.defaultAttrs)return i}},ft.prototype.addPendingMark=function(t){var e=function(t,e){for(var n=0;n=0;n--){var r=this.nodes[n];if(r.pendingMarks.lastIndexOf(t)>-1)r.pendingMarks=t.removeFromSet(r.pendingMarks);else{r.activeMarks=t.removeFromSet(r.activeMarks);var i=r.popFromStashMark(t);i&&r.type&&r.type.allowsMarkType(i.type)&&(r.activeMarks=i.addToSet(r.activeMarks))}if(r==e)break}},Object.defineProperties(ft.prototype,dt);var vt=function(t,e){this.nodes=t||{},this.marks=e||{}};function yt(t){var e={};for(var n in t){var r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function bt(t){return t.document||window.document}vt.prototype.serializeFragment=function(t,e,n){var r=this;void 0===e&&(e={}),n||(n=bt(e).createDocumentFragment());var i=n,o=null;return t.forEach((function(t){if(o||t.marks.length){o||(o=[]);for(var n=0,a=0;n=0;r--){var i=this.serializeMark(t.marks[r],t.isInline,e);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n},vt.prototype.serializeMark=function(t,e,n){void 0===n&&(n={});var r=this.marks[t.type.name];return r&&vt.renderSpec(bt(n),r(t,e))},vt.renderSpec=function(t,e,n){if(void 0===n&&(n=null),"string"==typeof e)return{dom:t.createTextNode(e)};if(null!=e.nodeType)return{dom:e};if(e.dom&&null!=e.dom.nodeType)return e;var r=e[0],i=r.indexOf(" ");i>0&&(n=r.slice(0,i),r=r.slice(i+1));var o=null,a=n?t.createElementNS(n,r):t.createElement(r),s=e[1],u=1;if(s&&"object"==typeof s&&null==s.nodeType&&!Array.isArray(s))for(var c in u=2,s)if(null!=s[c]){var l=c.indexOf(" ");l>0?a.setAttributeNS(c.slice(0,l),c.slice(l+1),s[c]):a.setAttribute(c,s[c])}for(var h=u;hu)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}var d=vt.renderSpec(t,f,n),p=d.dom,g=d.contentDOM;if(a.appendChild(p),g){if(o)throw new RangeError("Multiple content holes");o=g}}return{dom:a,contentDOM:o}},vt.fromSchema=function(t){return t.cached.domSerializer||(t.cached.domSerializer=new vt(this.nodesFromSchema(t),this.marksFromSchema(t)))},vt.nodesFromSchema=function(t){var e=yt(t.nodes);return e.text||(e.text=function(t){return t.text}),e},vt.marksFromSchema=function(t){return yt(t.marks)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return yt})),n.d(e,"b",(function(){return bt})),n.d(e,"c",(function(){return ne})),n.d(e,"d",(function(){return tr})),n.d(e,"e",(function(){return Wt})),n.d(e,"f",(function(){return Ut})),n.d(e,"g",(function(){return vt})),n.d(e,"h",(function(){return kr})),n.d(e,"i",(function(){return Pr})),n.d(e,"j",(function(){return Ur})),n.d(e,"k",(function(){return zr})),n.d(e,"l",(function(){return dr})),n.d(e,"m",(function(){return $t})),n.d(e,"n",(function(){return Zr})),n.d(e,"o",(function(){return mr}));var r=n(42),i=n(37),o=n(32),a=n(17),s=n(18),u=n(22),c=n(11),l=n(0),h=n(1),f=n(2),d=n(3),p=n(13),g=n(44),m=n(27),v=n(61);function y(t){return(11==t.nodeType?t.getSelection?t:t.ownerDocument:t).getSelection()}function b(t,e){return!!e&&t.contains(1!=e.nodeType?e.parentNode:e)}function O(t,e){if(!e.anchorNode)return!1;try{return b(t,e.anchorNode)}catch(n){return!1}}function w(t){return 3==t.nodeType?N(t,0,t.nodeValue.length).getClientRects():1==t.nodeType?t.getClientRects():[]}function k(t,e,n,r){return!!n&&(_(t,e,n,r,-1)||_(t,e,n,r,1))}function x(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e}function _(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:S(t))){if("DIV"==t.nodeName)return!1;var o=t.parentNode;if(!o||1!=o.nodeType)return!1;e=x(t)+(i<0?0:1),t=o}else{if(1!=t.nodeType)return!1;if(1==(t=t.childNodes[e+(i<0?-1:0)]).nodeType&&"false"==t.contentEditable)return!1;e=i<0?S(t):0}}}function S(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}var E={left:0,right:0,top:0,bottom:0};function C(t,e){var n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function T(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}var A,D=function(){function t(){Object(h.a)(this,t),this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}return Object(f.a)(t,[{key:"eq",value:function(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}},{key:"setRange",value:function(t){this.set(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset)}},{key:"set",value:function(t,e,n,r){this.anchorNode=t,this.anchorOffset=e,this.focusNode=n,this.focusOffset=r}}]),t}(),M=null;function j(t){if(t.setActive)return t.setActive();if(M)return t.focus(M);for(var e=[],n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(null==M?{get preventScroll(){return M={preventScroll:!0},!0}}:void 0),!M){M=!1;for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:e,r=A||(A=document.createRange());return r.setEnd(t,n),r.setStart(t,e),r}function P(t,e,n){var r={key:e,code:e,keyCode:n,which:n,cancelable:!0},i=new KeyboardEvent("keydown",r);i.synthetic=!0,t.dispatchEvent(i);var o=new KeyboardEvent("keyup",r);return o.synthetic=!0,t.dispatchEvent(o),i.defaultPrevented||o.defaultPrevented}function R(t){for(;t;){if(t&&(9==t.nodeType||11==t.nodeType&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function L(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}var F=function(){function t(e,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];Object(h.a)(this,t),this.node=e,this.offset=n,this.precise=r}return Object(f.a)(t,null,[{key:"before",value:function(e,n){return new t(e.parentNode,x(e),n)}},{key:"after",value:function(e,n){return new t(e.parentNode,x(e)+1,n)}}]),t}(),B=[],I=function(){function t(){Object(h.a)(this,t),this.parent=null,this.dom=null,this.dirty=2}return Object(f.a)(t,[{key:"editorView",get:function(){if(!this.parent)throw new Error("Accessing view in orphan content view");return this.parent.editorView}},{key:"overrideDOMText",get:function(){return null}},{key:"posAtStart",get:function(){return this.parent?this.parent.posBefore(this):0}},{key:"posAtEnd",get:function(){return this.posAtStart+this.length}},{key:"posBefore",value:function(t){var e,n=this.posAtStart,r=Object(l.a)(this.children);try{for(r.s();!(e=r.n()).done;){var i=e.value;if(i==t)return n;n+=i.length+i.breakAfter}}catch(o){r.e(o)}finally{r.f()}throw new RangeError("Invalid child in posBefore")}},{key:"posAfter",value:function(t){return this.posBefore(t)+t.length}},{key:"coordsAt",value:function(t,e){return null}},{key:"sync",value:function(e){if(2&this.dirty){var n,r=this.dom,i=r.firstChild,o=Object(l.a)(this.children);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(a.dirty){if(!a.dom&&i){var s=t.get(i);s&&(s.parent||s.constructor!=a.constructor)||a.reuseDOM(i)}a.sync(e),a.dirty=0}if(e&&!e.written&&e.node==r&&i!=a.dom&&(e.written=!0),a.dom.parentNode==r){for(;i&&i!=a.dom;)i=Q(i);i=a.dom.nextSibling}else r.insertBefore(a.dom,i)}}catch(f){o.e(f)}finally{o.f()}for(i&&e&&e.node==r&&(e.written=!0);i;)i=Q(i)}else if(1&this.dirty){var u,c=Object(l.a)(this.children);try{for(c.s();!(u=c.n()).done;){var h=u.value;h.dirty&&(h.sync(e),h.dirty=0)}}catch(f){c.e(f)}finally{c.f()}}}},{key:"reuseDOM",value:function(t){}},{key:"localPosFromDOM",value:function(e,n){var r;if(e==this.dom)r=this.dom.childNodes[n];else{for(var i=0==S(e)?0:0==n?-1:1;;){var o=e.parentNode;if(o==this.dom)break;0==i&&o.firstChild!=o.lastChild&&(i=e==o.firstChild?-1:1),e=o}r=i<0?e:e.nextSibling}if(r==this.dom.firstChild)return 0;for(;r&&!t.get(r);)r=r.nextSibling;if(!r)return this.length;for(var a=0,s=0;;a++){var u=this.children[a];if(u.dom==r)return s;s+=u.length+u.breakAfter}}},{key:"domBoundsAround",value:function(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=-1,i=-1,o=-1,a=-1,s=0,u=n,c=n;se)return l.domBoundsAround(t,e,u);if(h>=t&&-1==r&&(r=s,i=u),u>e&&l.dom.parentNode==this.dom){o=s,a=c;break}c=h,u=h+l.breakAfter}return{from:i,to:a<0?n+this.length:a,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].dom:null}}},{key:"markDirty",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.dirty|=2,this.markParentsDirty(t)}},{key:"markParentsDirty",value:function(t){for(var e=this.parent;e;e=e.parent){if(t&&(e.dirty|=2),1&e.dirty)return;e.dirty|=1,t=!1}}},{key:"setParent",value:function(t){this.parent!=t&&(this.parent=t,this.dirty&&this.markParentsDirty(!0))}},{key:"setDOM",value:function(t){this.dom&&(this.dom.cmView=null),this.dom=t,t.cmView=this}},{key:"rootView",get:function(){for(var t=this;;){var e=t.parent;if(!e)return t;t=e}}},{key:"replaceChildren",value:function(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:B;this.markDirty();for(var i=t;i0&&void 0!==arguments[0]?arguments[0]:this.length;return new $(this.children,t,this.children.length)}},{key:"childPos",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.childCursor().findPos(t,e)}},{key:"toString",value:function(){var t=this.constructor.name.replace("View","");return t+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==t?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}},{key:"isEditable",get:function(){return!0}},{key:"merge",value:function(t,e,n,r,i,o){return!1}},{key:"become",value:function(t){return!1}},{key:"getSide",value:function(){return 0}},{key:"destroy",value:function(){this.parent=null}}],[{key:"get",value:function(t){return t.cmView}}]),t}();function Q(t){var e=t.nextSibling;return t.parentNode.removeChild(t),e}I.prototype.breakAfter=0;var $=function(){function t(e,n,r){Object(h.a)(this,t),this.children=e,this.pos=n,this.i=r,this.off=0}return Object(f.a)(t,[{key:"findPos",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;;){if(t>this.pos||t==this.pos&&(e>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=t-this.pos,this;var n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}]),t}();function z(t,e,n,r,i,o,a,s,u){var c=t.children,l=c.length?c[e]:null,h=o.length?o[o.length-1]:null,f=h?h.breakAfter:a;if(!(e==r&&l&&!a&&!f&&o.length<2&&l.merge(n,i,o.length?h:null,0==n,s,u))){if(r0&&(!a&&o.length&&l.merge(n,l.length,o[0],!1,s,0)?l.breakAfter=o.shift().breakAfter:(n2),rt={mac:nt||/Mac/.test(Y.platform),windows:/Win/.test(Y.platform),linux:/Linux|X11/.test(Y.platform),ie:Z,ie_version:X?U.documentMode||6:G?+G[1]:H?+H[1]:0,gecko:K,gecko_version:K?+(/Firefox\/(\d+)/.exec(Y.userAgent)||[0,0])[1]:0,chrome:!!J,chrome_version:J?+J[1]:0,ios:nt,android:/Android\b/.test(Y.userAgent),webkit:tt,safari:et,webkit_version:tt?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=U.documentElement.style.tabSize?"tab-size":"-moz-tab-size"},it=function(t){Object(a.a)(n,t);var e=Object(s.a)(n);function n(t){var r;return Object(h.a)(this,n),(r=e.call(this)).text=t,r}return Object(f.a)(n,[{key:"length",get:function(){return this.text.length}},{key:"createDOM",value:function(t){this.setDOM(t||document.createTextNode(this.text))}},{key:"sync",value:function(t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}},{key:"reuseDOM",value:function(t){3==t.nodeType&&this.createDOM(t)}},{key:"merge",value:function(t,e,r){return(!r||r instanceof n&&!(this.length-(e-t)+r.length>256))&&(this.text=this.text.slice(0,t)+(r?r.text:"")+this.text.slice(e),this.markDirty(),!0)}},{key:"split",value:function(t){var e=new n(this.text.slice(t));return this.text=this.text.slice(0,t),this.markDirty(),e}},{key:"localPosFromDOM",value:function(t,e){return t==this.dom?e:e?this.text.length:0}},{key:"domAtPos",value:function(t){return new F(this.dom,t)}},{key:"domBoundsAround",value:function(t,e,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}},{key:"coordsAt",value:function(t,e){return at(this.dom,t,e)}}]),n}(I),ot=function(t){Object(a.a)(n,t);var e=Object(s.a)(n);function n(t){var i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;Object(h.a)(this,n),(i=e.call(this)).mark=t,i.children=o,i.length=a;var s,u=Object(l.a)(o);try{for(u.s();!(s=u.n()).done;){var c=s.value;c.setParent(Object(r.a)(i))}}catch(f){u.e(f)}finally{u.f()}return i}return Object(f.a)(n,[{key:"setAttrs",value:function(t){if(L(t),this.mark.class&&(t.className=this.mark.class),this.mark.attrs)for(var e in this.mark.attrs)t.setAttribute(e,this.mark.attrs[e]);return t}},{key:"reuseDOM",value:function(t){t.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(t),this.dirty|=6)}},{key:"sync",value:function(t){this.dom?4&this.dirty&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),Object(i.a)(Object(o.a)(n.prototype),"sync",this).call(this,t)}},{key:"merge",value:function(t,e,r,i,o,a){return(!r||!(!(r instanceof n&&r.mark.eq(this.mark))||t&&o<=0||et&&r.push(i=t&&(o=a),i=c,a++}}catch(f){s.e(f)}finally{s.f()}var h=this.length-t;return this.length=t,o>-1&&(this.children.length=o,this.markDirty()),new n(this.mark,r,h)}},{key:"domAtPos",value:function(t){return ht(this.dom,this.children,t)}},{key:"coordsAt",value:function(t,e){return dt(this,t,e)}}]),n}(I);function at(t,e,n){var r=t.nodeValue.length;e>r&&(e=r);var i=e,o=e,a=0;0==e&&n<0||e==r&&n>=0?rt.chrome||rt.gecko||(e?(i--,a=1):(o++,a=-1)):n<0?i--:o++;var s=N(t,i,o).getClientRects();if(!s.length)return E;var u=s[(a?a<0:n>=0)?0:s.length-1];return rt.safari&&!a&&0==u.width&&(u=Array.prototype.find.call(s,(function(t){return t.width}))||u),a?C(u,a<0):u||null}var st=function(t){Object(a.a)(n,t);var e=Object(s.a)(n);function n(t,r,i){var o;return Object(h.a)(this,n),(o=e.call(this)).widget=t,o.length=r,o.side=i,o}return Object(f.a)(n,[{key:"split",value:function(t){var e=n.create(this.widget,this.length-t,this.side);return this.length-=t,e}},{key:"sync",value:function(){this.dom&&this.widget.updateDOM(this.dom)||(this.setDOM(this.widget.toDOM(this.editorView)),this.dom.contentEditable="false")}},{key:"getSide",value:function(){return this.side}},{key:"merge",value:function(t,e,r,i,o,a){return!(r&&(!(r instanceof n&&this.widget.compare(r.widget))||t>0&&o<=0||e0?n.length-1:0;r=n[i],!(t>0?0==i:i==n.length-1||r.top0?-1:1);return 0==t&&e>0||t==this.length&&e<=0?r:C(r,0==t)}},{key:"isEditable",get:function(){return!1}},{key:"destroy",value:function(){Object(i.a)(Object(o.a)(n.prototype),"destroy",this).call(this),this.dom&&this.widget.destroy(this.dom)}}],[{key:"create",value:function(t,e,r){return new(t.customView||n)(t,e,r)}}]),n}(I),ut=function(t){Object(a.a)(n,t);var e=Object(s.a)(n);function n(){return Object(h.a)(this,n),e.apply(this,arguments)}return Object(f.a)(n,[{key:"domAtPos",value:function(t){return new F(this.widget.text,t)}},{key:"sync",value:function(){this.setDOM(this.widget.toDOM())}},{key:"localPosFromDOM",value:function(t,e){return e?3==t.nodeType?Math.min(e,this.length):this.length:0}},{key:"ignoreMutation",value:function(){return!1}},{key:"overrideDOMText",get:function(){return null}},{key:"coordsAt",value:function(t,e){return at(this.widget.text,t,e)}},{key:"isEditable",get:function(){return!0}}]),n}(st),ct=rt.android?"\u200b\u200b":"\u200b",lt=function(t){Object(a.a)(n,t);var e=Object(s.a)(n);function n(t){var r;return Object(h.a)(this,n),(r=e.call(this)).side=t,r}return Object(f.a)(n,[{key:"length",get:function(){return 0}},{key:"merge",value:function(){return!1}},{key:"become",value:function(t){return t instanceof n&&t.side==this.side}},{key:"split",value:function(){return new n(this.side)}},{key:"sync",value:function(){this.dom?this.dirty&&this.dom.nodeValue!=ct&&(this.dom.nodeValue=ct):this.setDOM(document.createTextNode(ct))}},{key:"getSide",value:function(){return this.side}},{key:"domAtPos",value:function(t){return F.before(this.dom)}},{key:"localPosFromDOM",value:function(){return 0}},{key:"domBoundsAround",value:function(){return null}},{key:"coordsAt",value:function(t){var e=w(this.dom);return e[e.length-1]||null}},{key:"overrideDOMText",get:function(){return p.a.of([this.dom.nodeValue.replace(/\u200b/g,"")])}}]),n}(I);function ht(t,e,n){for(var r=0,i=0;ri&&n0;r--){var s=e[r-1].dom;if(s.parentNode==t)return F.after(s)}return new F(t,0)}function ft(t,e,n){var r,i=t.children;n>0&&e instanceof ot&&i.length&&(r=i[i.length-1])instanceof ot&&r.mark.eq(e.mark)?ft(r,e.children[0],n-1):(i.push(e),e.setParent(t)),t.length+=e.length}function dt(t,e,n){for(var r=0,i=0;i0?a>=e:a>e)&&(e0)){var u=0;if(a==r){if(o.getSide()<=0)continue;u=n=-o.getSide()}var c=o.coordsAt(e-r,n);return u&&c?C(c,n<0):c}r=a}var l=t.dom.lastChild;if(!l)return t.dom.getBoundingClientRect();var h=w(l);return h[h.length-1]||null}function pt(t,e){for(var n in t)"class"==n&&e.class?e.class+=" "+t.class:"style"==n&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}function gt(t,e){if(t==e)return!0;if(!t||!e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!=r.length)return!1;for(var i=0,o=n;i-1}}],[{key:"mark",value:function(t){return new Ot(t)}},{key:"widget",value:function(t){var e=t.side||0,n=!!t.block;return new kt(t,e+=n?e>0?3e8:-4e8:e>0?1e8:-1e8,e,n,t.widget||null,!1)}},{key:"replace",value:function(t){var e=!!t.block,n=xt(t,e),r=n.start,i=n.end;return new kt(t,e?r?-3e8:-1:4e8,e?i?2e8:1:-5e8,e,t.widget||null,!0)}},{key:"line",value:function(t){return new wt(t)}},{key:"set",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return m.a.of(t,e)}}]),n}(m.c);bt.none=m.a.empty;var Ot=function(t){Object(a.a)(n,t);var e=Object(s.a)(n);function n(t){var r;Object(h.a)(this,n);var i=xt(t),o=i.start,a=i.end;return(r=e.call(this,o?-1:4e8,a?1:-5e8,null,t)).tagName=t.tagName||"span",r.class=t.class||"",r.attrs=t.attributes||null,r}return Object(f.a)(n,[{key:"eq",value:function(t){return this==t||t instanceof n&&this.tagName==t.tagName&&this.class==t.class&>(this.attrs,t.attrs)}},{key:"range",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;if(t>=e)throw new RangeError("Mark decorations may not be empty");return Object(i.a)(Object(o.a)(n.prototype),"range",this).call(this,t,e)}}]),n}(bt);Ot.prototype.point=!1;var wt=function(t){Object(a.a)(n,t);var e=Object(s.a)(n);function n(t){return Object(h.a)(this,n),e.call(this,-2e8,-2e8,null,t)}return Object(f.a)(n,[{key:"eq",value:function(t){return t instanceof n&>(this.spec.attributes,t.spec.attributes)}},{key:"range",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;if(e!=t)throw new RangeError("Line decoration ranges must be zero-length");return Object(i.a)(Object(o.a)(n.prototype),"range",this).call(this,t,e)}}]),n}(bt);wt.prototype.mapMode=d.h.TrackBefore,wt.prototype.point=!0;var kt=function(t){Object(a.a)(n,t);var e=Object(s.a)(n);function n(t,r,i,o,a,s){var u;return Object(h.a)(this,n),(u=e.call(this,r,i,a,t)).block=o,u.isReplace=s,u.mapMode=o?r<=0?d.h.TrackBefore:d.h.TrackAfter:d.h.TrackDel,u}return Object(f.a)(n,[{key:"type",get:function(){return this.startSide=5}},{key:"eq",value:function(t){return t instanceof n&&(e=this.widget,r=t.widget,e==r||!!(e&&r&&e.compare(r)))&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide;var e,r}},{key:"range",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;if(this.isReplace&&(t>e||t==e&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&e!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return Object(i.a)(Object(o.a)(n.prototype),"range",this).call(this,t,e)}}]),n}(bt);function xt(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.inclusiveStart,r=t.inclusiveEnd;return null==n&&(n=t.inclusive),null==r&&(r=t.inclusive),{start:null!==n&&void 0!==n?n:e,end:null!==r&&void 0!==r?r:e}}function _t(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=n.length-1;i>=0&&n[i]+r>t?n[i]=Math.max(n[i],e):n.push(t,e)}kt.prototype.point=!0;var St=function(t){Object(a.a)(n,t);var e=Object(s.a)(n);function n(){var t;return Object(h.a)(this,n),(t=e.apply(this,arguments)).children=[],t.length=0,t.prevAttrs=void 0,t.attrs=null,t.breakAfter=0,t}return Object(f.a)(n,[{key:"merge",value:function(t,e,r,i,o,a){if(r){if(!(r instanceof n))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),q(this,t,e,r?r.children:[],o,a),!0}},{key:"split",value:function(t){var e=new n;if(e.breakAfter=this.breakAfter,0==this.length)return e;var r=this.childPos(t),i=r.i,o=r.off;o&&(e.append(this.children[i].split(o),0),this.children[i].merge(o,this.children[i].length,null,!1,0,0),i++);for(var a=i;a0&&0==this.children[i-1].length;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=t,e}},{key:"transferDOM",value:function(t){this.dom&&(t.setDOM(this.dom),t.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}},{key:"setDeco",value:function(t){gt(this.attrs,t)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=t)}},{key:"append",value:function(t,e){ft(this,t,e)}},{key:"addLineDeco",value:function(t){var e=t.spec.attributes,n=t.spec.class;e&&(this.attrs=pt(e,this.attrs||{})),n&&(this.attrs=pt(e,{class:n}))}},{key:"domAtPos",value:function(t){return ht(this.dom,this.children,t)}},{key:"reuseDOM",value:function(t){"DIV"==t.nodeName&&(this.setDOM(t),this.dirty|=6)}},{key:"sync",value:function(t){var e;this.dom?4&this.dirty&&(L(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(mt(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),Object(i.a)(Object(o.a)(n.prototype),"sync",this).call(this,t);for(var r=this.dom.lastChild;r&&I.get(r)instanceof ot;)r=r.lastChild;if(!r||"BR"!=r.nodeName&&0==(null===(e=I.get(r))||void 0===e?void 0:e.isEditable)&&(!rt.ios||!this.children.some((function(t){return t instanceof it})))){var a=document.createElement("BR");a.cmIgnore=!0,this.dom.appendChild(a)}}},{key:"measureTextSize",value:function(){if(0==this.children.length||this.length>20)return null;var t,e=0,n=Object(l.a)(this.children);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(!(r instanceof it))return null;var i=w(r.dom);if(1!=i.length)return null;e+=i[0].width}}catch(o){n.e(o)}finally{n.f()}return{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length}}},{key:"coordsAt",value:function(t,e){return dt(this,t,e)}},{key:"become",value:function(t){return!1}},{key:"type",get:function(){return yt.Text}}],[{key:"find",value:function(t,e){for(var r=0,i=0;r=e){if(o instanceof n)return o;if(a>e)break}i=a+o.breakAfter}return null}}]),n}(I),Et=function(t){Object(a.a)(n,t);var e=Object(s.a)(n);function n(t,r,i){var o;return Object(h.a)(this,n),(o=e.call(this)).widget=t,o.length=r,o.type=i,o.breakAfter=0,o}return Object(f.a)(n,[{key:"merge",value:function(t,e,r,i,o,a){return!(r&&(!(r instanceof n&&this.widget.compare(r.widget))||t>0&&o<=0||e0;){if(this.textOff==this.text.length){var r=this.cursor.next(this.skip),i=r.value,o=r.lineBreak,a=r.done;if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer([]),this.curLine=null,t--;continue}this.text=i,this.textOff=0}var s=Math.min(this.text.length-this.textOff,t,512);this.flushBuffer(e),this.getLine().append(Tt(new it(this.text.slice(this.textOff,this.textOff+s)),e),n),this.atCursorPos=!0,this.textOff+=s,t-=s,n=0}}},{key:"span",value:function(t,e,n,r){this.buildText(e-t,n,r),this.pos=e,this.openStart<0&&(this.openStart=r)}},{key:"point",value:function(t,e,n,r,i){var o=e-t;if(n instanceof kt)if(n.block){var a=n.type;a!=yt.WidgetAfter||this.posCovered()||this.getLine(),this.addBlockWidget(new Et(n.widget||new At("div"),o,a))}else{var s=st.create(n.widget||new At("span"),o,n.startSide),u=this.atCursorPos&&!s.isEditable&&i<=r.length&&(t0),c=!s.isEditable&&(t=this.disallowBlockEffectsBelow||!(n instanceof kt))return!0;if(n.block)throw new RangeError("Block decorations may not be specified via plugins");return e<=this.doc.lineAt(this.pos).to}}],[{key:"build",value:function(e,n,r,i,o){var a=new t(e,n,r,o);return a.openEnd=m.a.spans(i,n,r,a),a.openStart<0&&(a.openStart=a.openEnd),a.finish(a.openEnd),a}}]),t}();function Tt(t,e){var n,r=Object(l.a)(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;t=new ot(i,[t],t.length)}}catch(o){r.e(o)}finally{r.f()}return t}var At=function(t){Object(a.a)(n,t);var e=Object(s.a)(n);function n(t){var r;return Object(h.a)(this,n),(r=e.call(this)).tag=t,r}return Object(f.a)(n,[{key:"eq",value:function(t){return t.tag==this.tag}},{key:"toDOM",value:function(){return document.createElement(this.tag)}},{key:"updateDOM",value:function(t){return t.nodeName.toLowerCase()==this.tag}}]),n}(vt),Dt=[],Mt=d.g.define(),jt=d.g.define(),Nt=d.g.define(),Pt=d.g.define(),Rt=d.g.define(),Lt=d.g.define(),Ft=d.j.define({map:function(t,e){return t.map(e)}}),Bt=d.j.define({map:function(t,e){return t.map(e)}}),It=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"nearest",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"nearest",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:5;Object(h.a)(this,t),this.range=e,this.y=n,this.x=r,this.yMargin=i,this.xMargin=o}return Object(f.a)(t,[{key:"map",value:function(e){return e.empty?this:new t(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin)}}]),t}(),Qt=d.j.define({map:function(t,e){return t.map(e)}});function $t(t,e,n){var r=t.facet(Pt);r.length?r[0](e):window.onerror?window.onerror(String(e),n,void 0,void 0,e):n?console.error(n+":",e):console.error(e)}var zt=d.g.define({combine:function(t){return!t.length||t[0]}}),qt=Object(f.a)((function t(e,n){Object(h.a)(this,t),this.field=e,this.get=n})),Wt=function(){function t(){Object(h.a)(this,t)}return Object(f.a)(t,[{key:"from",value:function(t){return new qt(this,t)}}],[{key:"define",value:function(){return new t}}]),t}();Wt.decorations=Wt.define(),Wt.atomicRanges=Wt.define(),Wt.scrollMargins=Wt.define();var Vt=0,Yt=d.g.define(),Ut=function(){function t(e,n,r){Object(h.a)(this,t),this.id=e,this.create=n,this.fields=r,this.extension=Yt.of(this)}return Object(f.a)(t,null,[{key:"define",value:function(e,n){var r=n||{},i=r.eventHandlers,o=r.provide,a=r.decorations,s=[];if(o){var u,c=Object(l.a)(Array.isArray(o)?o:[o]);try{for(c.s();!(u=c.n()).done;){var h=u.value;s.push(h)}}catch(f){c.e(f)}finally{c.f()}}return i&&s.push(Ht.from((function(t){return{plugin:t,handlers:i}}))),a&&s.push(Wt.decorations.from(a)),new t(Vt++,e,s)}},{key:"fromClass",value:function(e,n){return t.define((function(t){return new e(t)}),n)}}]),t}(),Ht=Wt.define(),Xt=function(){function t(e){Object(h.a)(this,t),this.spec=e,this.mustUpdate=null,this.value=null}return Object(f.a)(t,[{key:"takeField",value:function(t,e){if(this.spec){var n,r=Object(l.a)(this.spec.fields);try{for(r.s();!(n=r.n()).done;){var i=n.value,o=i.field,a=i.get;o==t&&e.push(a(this.value))}}catch(s){r.e(s)}finally{r.f()}}}},{key:"update",value:function(t){if(this.value){if(this.mustUpdate){var e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(n){if($t(e.state,n,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(r){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(t)}catch(n){$t(t.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}},{key:"destroy",value:function(t){var e;if(null===(e=this.value)||void 0===e?void 0:e.destroy)try{this.value.destroy()}catch(n){$t(t.state,n,"CodeMirror plugin crashed")}}},{key:"deactivate",value:function(){this.spec=this.value=null}}]),t}(),Gt=d.g.define(),Zt=d.g.define(),Kt=d.g.define(),Jt=d.g.define(),te=function(){function t(e,n,r,i){Object(h.a)(this,t),this.fromA=e,this.toA=n,this.fromB=r,this.toB=i}return Object(f.a)(t,[{key:"join",value:function(e){return new t(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}},{key:"addToSet",value:function(t){for(var e=t.length,n=this;e>0;e--){var r=t[e-1];if(!(r.fromA>n.toA)){if(r.toAl)break;o+=2}if(!u)return r;new t(u.fromA,u.toA,u.fromB,u.toB).addToSet(r),a=u.toA,s=u.toB}}}]),t}(),ee=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Dt;Object(h.a)(this,t),this.view=e,this.state=n,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=d.c.empty(this.startState.doc.length);var i,o=Object(l.a)(r);try{for(o.s();!(i=o.n()).done;){var a=i.value;this.changes=this.changes.compose(a.changes)}}catch(c){o.e(c)}finally{o.f()}var s=[];this.changes.iterChangedRanges((function(t,e,n,r){return s.push(new te(t,e,n,r))})),this.changedRanges=s;var u=e.hasFocus;u!=e.inputState.notifiedFocused&&(e.inputState.notifiedFocused=u,this.flags|=1)}return Object(f.a)(t,[{key:"viewportChanged",get:function(){return(4&this.flags)>0}},{key:"heightChanged",get:function(){return(2&this.flags)>0}},{key:"geometryChanged",get:function(){return this.docChanged||(10&this.flags)>0}},{key:"focusChanged",get:function(){return(1&this.flags)>0}},{key:"docChanged",get:function(){return!this.changes.empty}},{key:"selectionSet",get:function(){return this.transactions.some((function(t){return t.selection}))}},{key:"empty",get:function(){return 0==this.flags&&0==this.transactions.length}}]),t}(),ne=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(ne||(ne={})),re=ne.LTR,ie=ne.RTL;function oe(t){for(var e=[],n=0;n=e){if(a.level==n)return o;(i<0||(0!=r?r<0?a.frome:t[i].level>a.level))&&(i=o)}}if(i<0)throw new RangeError("Index out of range");return i}}]),t}(),ye=[];function be(t,e){var n=t.length,r=e==re?1:2,i=e==re?2:1;if(!t||1==r&&!me.test(t))return Oe(n);for(var o=0,a=r,s=r;o=0;k-=3)if(ce[k+1]==-v){var x=ce[k+2],_=2&x?r:4&x?1&x?i:r:0;_&&(ye[b]=ye[ce[k]]=_),O=k;break}}else{if(189==ce.length)break;ce[O++]=b,ce[O++]=m,ce[O++]=w}else if(2==(y=ye[b])||1==y){var S=y==r;w=S?0:1;for(var E=O-3;E>=0;E-=3){var C=ce[E+2];if(2&C)break;if(S)ce[E+2]|=2;else{if(4&C)break;ce[E+2]|=4}}}for(var T=0;TR;){for(var B=F,I=2!=ye[--F];F>R&&I==(2!=ye[F-1]);)F--;N.push(new ve(F,B,I?2:1))}else N.push(new ve(R,P,0))}else for(var Q=0;Q0&&n.length&&(n.every((function(t){var n=t.fromA;return t.toAe.minWidthTo}))?(this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=t.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.view.inputState.composing<0?this.compositionDeco=bt.none:(t.transactions.length||this.dirty)&&(this.compositionDeco=function(t,e){var n=t.observer.selectionRange,r=n.focusNode&&De(n.focusNode,n.focusOffset,0);if(!r)return bt.none;var i=t.docView.nearest(r);if(!i)return bt.none;var o,a,s=r;if(i instanceof St){for(;s.parentNode!=i.dom;)s=s.parentNode;for(var u=s.previousSibling;u&&!I.get(u);)u=u.previousSibling;o=a=u?I.get(u).posAtEnd:i.posAtStart}else{for(;;){var c=i.parent;if(!c)return bt.none;if(c instanceof St)break;i=c}a=(o=i.posAtStart)+i.length,s=i.dom}var l=e.mapPos(o,1),h=Math.max(l,e.mapPos(a,-1)),f=t.state,d=3==s.nodeType?s.nodeValue:new xe([],t).readRange(s.firstChild,null).text;if(h-l=0?t[r]:null;if(!i)break;var o=i.fromA,a=i.toA,s=i.fromB,u=i.toB,c=Ct.build(this.view.state.doc,s,u,this.decorations,this.pluginDecorationLength),l=c.content,h=c.breakAtStart,f=c.openStart,d=c.openEnd,p=n.findPos(a,1),g=p.i,m=p.off,v=n.findPos(o,-1);z(this,v.i,v.off,g,m,l,h,f,d)}}},{key:"updateSelection",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e&&this.view.observer.readSelectionRange(),!(!n&&!this.mayControlSelection()||rt.ios&&this.view.inputState.rapidCompositionStart)){var r=this.forceSelection;this.forceSelection=!1;var i=this.view.state.selection.main,o=this.domAtPos(i.anchor),a=i.empty?o:this.domAtPos(i.head);if(rt.gecko&&i.empty&&Ce(o)){var s=document.createTextNode("");this.view.observer.ignore((function(){return o.node.insertBefore(s,o.node.childNodes[o.offset]||null)})),o=a=new F(s,0),r=!0}var u=this.view.observer.selectionRange;!r&&u.focusNode&&k(o.node,o.offset,u.anchorNode,u.anchorOffset)&&k(a.node,a.offset,u.focusNode,u.focusOffset)||(this.view.observer.ignore((function(){rt.android&&rt.chrome&&t.dom.contains(u.focusNode)&&Ne(u.focusNode,t.dom)&&(t.dom.blur(),t.dom.focus({preventScroll:!0}));var e=y(t.root);if(i.empty){if(rt.gecko){var n=Me(o.node,o.offset);if(n&&3!=n){var r=De(o.node,o.offset,1==n?1:-1);r&&(o=new F(r,1==n?0:r.nodeValue.length))}}e.collapse(o.node,o.offset),null!=i.bidiLevel&&null!=u.cursorBidiLevel&&(u.cursorBidiLevel=i.bidiLevel)}else if(e.extend)e.collapse(o.node,o.offset),e.extend(a.node,a.offset);else{var s=document.createRange();if(i.anchor>i.head){var c=[a,o];o=c[0],a=c[1]}s.setEnd(a.node,a.offset),s.setStart(o.node,o.offset),e.removeAllRanges(),e.addRange(s)}})),this.view.observer.setSelectionRange(o,a)),this.impreciseAnchor=o.precise?null:new F(u.anchorNode,u.anchorOffset),this.impreciseHead=a.precise?null:new F(u.focusNode,u.focusOffset)}}},{key:"enforceCursorAssoc",value:function(){if(!this.compositionDeco.size){var t=this.view.state.selection.main,e=y(this.root);if(t.empty&&t.assoc&&e.modify){var n=St.find(this,t.head);if(n){var r=n.posAtStart;if(t.head!=r&&t.head!=r+n.length){var i=this.coordsAt(t.head,-1),o=this.coordsAt(t.head,1);if(i&&o&&!(i.bottom>o.top)){var a=this.domAtPos(t.head+t.assoc);e.collapse(a.node,a.offset),e.modify("move",t.assoc<0?"forward":"backward","lineboundary")}}}}}}},{key:"mayControlSelection",value:function(){return this.view.state.facet(zt)?this.root.activeElement==this.dom:O(this.dom,this.view.observer.selectionRange)}},{key:"nearest",value:function(t){for(var e=t;e;){var n=I.get(e);if(n&&n.rootView==this)return n;e=e.parentNode}return null}},{key:"posFromDOM",value:function(t,e){var n=this.nearest(t);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(t,e)+n.posAtStart}},{key:"domAtPos",value:function(t){for(var e=this.childCursor().findPos(t,-1),n=e.i,r=e.off;no||t==o&&i.type!=yt.WidgetBefore&&i.type!=yt.WidgetAfter&&(!r||2==e||this.children[r-1].breakAfter||this.children[r-1].type==yt.WidgetBefore&&e>-2))return i.coordsAt(t-o,e);n=o}}},{key:"measureVisibleLineHeights",value:function(){for(var t=[],e=this.view.viewState.viewport,n=e.from,r=e.to,i=this.view.contentDOM.clientWidth,o=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,s=0,u=0;ur)break;if(s>=n){var h=c.dom.getBoundingClientRect();if(t.push(h.height),o){var f=c.dom.lastChild,d=f?w(f):[];if(d.length){var p=d[d.length-1],g=this.view.textDirection==ne.LTR?p.right-h.left:h.right-p.left;g>a&&(a=g,this.minWidth=i,this.minWidthFrom=s,this.minWidthTo=l)}}}s=l+c.breakAfter}return t}},{key:"measureTextSize",value:function(){var t,e=this,n=Object(l.a)(this.children);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r instanceof St){var i=r.measureTextSize();if(i)return i}}}catch(u){n.e(u)}finally{n.f()}var o,a,s=document.createElement("div");return s.className="cm-line",s.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((function(){e.dom.appendChild(s);var t=w(s.firstChild)[0];o=s.getBoundingClientRect().height,a=t?t.width/27:7,s.remove()})),{lineHeight:o,charWidth:a}}},{key:"childCursor",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.length,e=this.children.length;return e&&(t-=this.children[--e].length),new $(this.children,t,e)}},{key:"computeBlockGapDeco",value:function(){for(var t=[],e=this.view.viewState,n=0,r=0;;r++){var i=r==e.viewports.length?null:e.viewports[r],o=i?i.from-1:this.length;if(o>n){var a=e.lineBlockAt(o).bottom-e.lineBlockAt(n).top;t.push(bt.replace({widget:new Te(a),block:!0,inclusive:!0}).range(n,o))}if(!i)break;n=i.to+1}return bt.set(t)}},{key:"updateDeco",value:function(){var t=this.view.pluginField(Wt.decorations);return this.pluginDecorationLength=t.length,this.decorations=[].concat(Object(c.a)(t),Object(c.a)(this.view.state.facet(Kt)),[this.compositionDeco,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco])}},{key:"scrollIntoView",value:function(t){var e,n=t.range,r=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1);if(r){!n.empty&&(e=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,e.left),top:Math.min(r.top,e.top),right:Math.max(r.right,e.right),bottom:Math.max(r.bottom,e.bottom)});var i,o=0,a=0,s=0,u=0,c=Object(l.a)(this.view.pluginField(Wt.scrollMargins));try{for(c.s();!(i=c.n()).done;){var h=i.value;if(h){var f=h.left,d=h.right,p=h.top,g=h.bottom;null!=f&&(o=Math.max(o,f)),null!=d&&(a=Math.max(a,d)),null!=p&&(s=Math.max(s,p)),null!=g&&(u=Math.max(u,g))}}}catch(v){c.e(v)}finally{c.f()}var m={left:r.left-o,top:r.top-s,right:r.right+a,bottom:r.bottom+u};!function(t,e,n,r,i,o,a,s){for(var u=t.ownerDocument,c=u.defaultView,l=t;l;)if(1==l.nodeType){var h=void 0,f=l==u.body;if(f)h=T(c);else{if(l.scrollHeight<=l.clientHeight&&l.scrollWidth<=l.clientWidth){l=l.parentNode;continue}var d=l.getBoundingClientRect();h={left:d.left,right:d.left+l.clientWidth,top:d.top,bottom:d.top+l.clientHeight}}var p=0,g=0;if("nearest"==i)e.top0&&e.bottom>h.bottom+g&&(g=e.bottom-h.bottom+g+a)):e.bottom>h.bottom&&(g=e.bottom-h.bottom+a,n<0&&e.top-g0&&e.right>h.right+p&&(p=e.right-h.right+p+o)):e.right>h.right&&(p=e.right-h.right+o,n<0&&e.left0&&n<=0)e=S(t=t.childNodes[e-1]);else{if(!(1==t.nodeType&&e=0))return null;t=t.childNodes[e],e=0}}}function Me(t,e){return 1!=t.nodeType?0:(e&&"false"==t.childNodes[e-1].contentEditable?1:0)|(et?e.left-t:Math.max(0,t-e.right)}function Re(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function Le(t,e){return t.tope.top+1}function Fe(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function Ie(t,e,n){for(var r,i,o,a,s,u,c,l,h=t.firstChild;h;h=h.nextSibling)for(var f=w(h),d=0;dm||a==m&&o>g)&&(r=h,i=p,o=g,a=m),0==g?n>p.bottom&&(!c||c.bottomp.top)&&(u=h,l=p):c&&Le(c,p)?c=Be(c,p.bottom):l&&Le(l,p)&&(l=Fe(l,p.top))}if(c&&c.bottom>=n?(r=s,i=c):l&&l.top<=n&&(r=u,i=l),!r)return{node:t,offset:0};var v=Math.max(i.left,Math.min(i.right,e));return 3==r.nodeType?Qe(r,v,n):o||"true"!=r.contentEditable?{node:t,offset:Array.prototype.indexOf.call(t.childNodes,r)+(e>=(i.left+i.right)/2?1:0)}:Ie(r,v,n)}function Qe(t,e,n){for(var r=t.nodeValue.length,i=-1,o=1e9,a=0,s=0;sn?l.top-n:n-l.bottom)-1;if(l.left-1<=e&&l.right+1>=e&&h=(l.left+l.right)/2,d=f;if(rt.chrome||rt.gecko)N(t,s).getBoundingClientRect().left==l.right&&(d=!f);if(h<=0)return{node:t,offset:s+(d?1:0)};i=s+(d?1:0),o=h}}}return{node:t,offset:i>-1?i:a>0?t.nodeValue.length:0}}function $e(t,e,n){for(var r,i,o=e.x,a=e.y,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,u=t.contentDOM.getBoundingClientRect(),c=u.top+t.viewState.paddingTop,l=t.viewState.docHeight,h=Math.max(0,Math.min(a-c,l)),f=t.defaultLineHeight/2,d=!1;(i=t.elementAtHeight(h)).type!=yt.Text;)for(;!((h=s>0?i.bottom+f:i.top-f)>=0&&h<=l);){if(d)return n?null:0;d=!0,s=-s}a=c+h;var p=i.from;if(pt.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:ze(t,u,i,o,a);var g=t.dom.ownerDocument,m=t.root.elementFromPoint?t.root:g,v=m.elementFromPoint(o,a);v&&!t.contentDOM.contains(v)&&(v=null),v||(o=Math.max(u.left+1,Math.min(u.right-1,o)),(v=m.elementFromPoint(o,a))&&!t.contentDOM.contains(v)&&(v=null));var y,b=-1;if(v&&0!=(null===(r=t.docView.nearest(v))||void 0===r?void 0:r.isEditable))if(g.caretPositionFromPoint){var O=g.caretPositionFromPoint(o,a);O&&(y=O.offsetNode,b=O.offset)}else if(g.caretRangeFromPoint){var w=g.caretRangeFromPoint(o,a);w&&(y=w.startContainer,b=w.startOffset,rt.safari&&qe(y,b,o)&&(y=void 0))}if(!y||!t.docView.dom.contains(y)){var k=St.find(t.docView,p);if(!k)return h>i.top+i.height/2?i.to:i.from;var x=Ie(k.dom,o,a);y=x.node,b=x.offset}return t.docView.posFromDOM(y,b)}function ze(t,e,n,r,i){var o=Math.round((r-e.left)*t.defaultCharacterWidth);t.lineWrapping&&n.height>1.5*t.defaultLineHeight&&(o+=Math.floor((i-n.top)/t.defaultLineHeight)*t.viewState.heightOracle.lineLength);var a=t.state.sliceDoc(n.from,n.to);return n.from+Object(p.f)(a,o,t.state.tabSize)}function qe(t,e,n){var r;if(3!=t.nodeType||e!=(r=t.nodeValue.length))return!1;for(var i=t.nextSibling;i;i=i.nextSibling)if(1!=i.nodeType||"BR"!=i.nodeName)return!1;return N(t,r-1,r).getBoundingClientRect().left>n}function We(t,e,n,r){var i=t.state.doc.lineAt(e.head),o=r&&t.lineWrapping?t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head):null;if(o){var a=t.dom.getBoundingClientRect(),s=t.posAtCoords({x:n==(t.textDirection==ne.LTR)?a.right-1:a.left+1,y:(o.top+o.bottom)/2});if(null!=s)return d.e.cursor(s,n?-1:1)}var u=St.find(t.docView,e.head),c=u?n?u.posAtEnd:u.posAtStart:n?i.to:i.from;return d.e.cursor(c,n?-1:1)}function Ve(t,e,n,r){for(var i=t.state.doc.lineAt(e.head),o=t.bidiSpans(i),a=e,s=null;;){var u=ke(i,o,t.textDirection,a,n),c=we;if(!u){if(i.number==(n?t.state.doc.lines:1))return a;c="\n",i=t.state.doc.line(i.number+(n?1:-1)),o=t.bidiSpans(i),u=d.e.cursor(n?i.from:i.to)}if(s){if(!s(c))return a}else{if(!r)return u;s=r(c)}a=u}}function Ye(t,e,n){for(var r=t.pluginField(Wt.atomicRanges);;){var i,o=!1,a=Object(l.a)(r);try{for(a.s();!(i=a.n()).done;){i.value.between(n.from-1,n.from+1,(function(t,r,i){n.from>t&&n.fromn.from?d.e.cursor(t,1):d.e.cursor(r,-1),o=!0)}))}}catch(s){a.e(s)}finally{a.f()}if(!o)return n}}var Ue=function(){function t(e){var n=this;Object(h.a)(this,t),this.lastKeyCode=0,this.lastKeyTime=0,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.rapidCompositionStart=!1,this.mouseSelection=null;var r=function(t){var r=Ke[t];e.contentDOM.addEventListener(t,(function(i){"keydown"==t&&n.keydown(e,i)||Ze(e,i)&&!n.ignoreDuringComposition(i)&&(n.mustFlushObserver(i)&&e.observer.forceFlush(),n.runCustomHandlers(t,e,i)?i.preventDefault():r(e,i))})),n.registeredEvents.push(t)};for(var i in Ke)r(i);this.notifiedFocused=e.hasFocus,this.ensureHandlers(e),rt.safari&&e.contentDOM.addEventListener("input",(function(){return null}))}return Object(f.a)(t,[{key:"setSelectionOrigin",value:function(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}},{key:"ensureHandlers",value:function(t){var e,n=this,r=this.customHandlers=t.pluginField(Ht),i=Object(l.a)(r);try{for(i.s();!(e=i.n()).done;){var o=e.value,a=function(e){n.registeredEvents.indexOf(e)<0&&"scroll"!=e&&(n.registeredEvents.push(e),t.contentDOM.addEventListener(e,(function(r){Ze(t,r)&&n.runCustomHandlers(e,t,r)&&r.preventDefault()})))};for(var s in o.handlers)a(s)}}catch(u){i.e(u)}finally{i.f()}}},{key:"runCustomHandlers",value:function(t,e,n){var r,i=Object(l.a)(this.customHandlers);try{for(i.s();!(r=i.n()).done;){var o=r.value,a=o.handlers[t];if(a)try{if(a.call(o.plugin,n,e)||n.defaultPrevented)return!0}catch(s){$t(e.state,s)}}}catch(u){i.e(u)}finally{i.f()}return!1}},{key:"runScrollHandlers",value:function(t,e){var n,r=Object(l.a)(this.customHandlers);try{for(r.s();!(n=r.n()).done;){var i=n.value,o=i.handlers.scroll;if(o)try{o.call(i.plugin,e,t)}catch(a){$t(t.state,a)}}}catch(s){r.e(s)}finally{r.f()}}},{key:"keydown",value:function(t,e){var n,r=this;return this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),!!this.screenKeyEvent(t,e)||(!rt.android||!rt.chrome||e.synthetic||13!=e.keyCode&&8!=e.keyCode?!(!rt.ios||!(n=He.find((function(t){return t.keyCode==e.keyCode})))||e.ctrlKey||e.altKey||e.metaKey||e.synthetic)&&(this.pendingIOSKey=n,setTimeout((function(){return r.flushIOSKey(t)}),250),!0):(t.observer.delayAndroidKey(e.key,e.keyCode),!0))}},{key:"flushIOSKey",value:function(t){var e=this.pendingIOSKey;return!!e&&(this.pendingIOSKey=void 0,P(t.contentDOM,e.key,e.keyCode))}},{key:"ignoreDuringComposition",value:function(t){return!!/^key/.test(t.type)&&(this.composing>0||!!(rt.safari&&Date.now()-this.compositionEndedAt<500)&&(this.compositionEndedAt=0,!0))}},{key:"screenKeyEvent",value:function(t,e){var n=9==e.keyCode&&Date.now()=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}(e,n)||1!=fn(n))&&null,!1===this.dragging&&(n.preventDefault(),this.select(n))}return Object(f.a)(t,[{key:"move",value:function(t){if(0==t.buttons)return this.destroy();!1===this.dragging&&this.select(this.lastEvent=t)}},{key:"up",value:function(t){null==this.dragging&&this.select(this.lastEvent),this.dragging||t.preventDefault(),this.destroy()}},{key:"destroy",value:function(){var t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move),t.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}},{key:"select",value:function(t){var e=this.style.get(t,this.extend,this.multiple);!this.mustSelect&&e.eq(this.view.state.selection)&&e.main.assoc==this.view.state.selection.main.assoc||this.view.dispatch({selection:e,userEvent:"select.pointer",scrollIntoView:!0}),this.mustSelect=!1}},{key:"update",value:function(t){var e=this;t.docChanged&&this.dragging&&(this.dragging=this.dragging.map(t.changes)),this.style.update(t)&&setTimeout((function(){return e.select(e.lastEvent)}),20)}}]),t}();function Ze(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(var n,r=e.target;r!=t.contentDOM;r=r.parentNode)if(!r||11==r.nodeType||(n=I.get(r))&&n.ignoreEvent(e))return!1;return!0}var Ke=Object.create(null),Je=rt.ie&&rt.ie_version<15||rt.ios&&rt.webkit_version<604;function tn(t,e){var n,r=t.state,i=1,o=r.toText(e),a=o.lines==r.selection.ranges.length,s=null!=pn&&r.selection.ranges.every((function(t){return t.empty}))&&pn==o.toString();if(s){var u=-1;n=r.changeByRange((function(t){var n=r.doc.lineAt(t.from);if(n.from==u)return{range:t};u=n.from;var s=r.toText((a?o.line(i++).text:e)+r.lineBreak);return{changes:{from:n.from,insert:s},range:d.e.cursor(t.from+s.length)}}))}else n=a?r.changeByRange((function(t){var e=o.line(i++);return{changes:{from:t.from,to:t.to,insert:e.text},range:d.e.cursor(t.from+e.length)}})):r.replaceSelection(o);t.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}Ke.keydown=function(t,e){t.inputState.setSelectionOrigin("select")};var en=0;function nn(t,e,n,r){if(1==r)return d.e.cursor(e,n);if(2==r)return function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=t.charCategorizer(e),i=t.doc.lineAt(e),o=e-i.from;if(0==i.length)return d.e.cursor(e);0==o?n=1:o==i.length&&(n=-1);var a=o,s=o;n<0?a=Object(p.e)(i.text,o,!1):s=Object(p.e)(i.text,o);for(var u=r(i.text.slice(a,s));a>0;){var c=Object(p.e)(i.text,a,!1);if(r(i.text.slice(c,a))!=u)break;a=c}for(;sDate.now()-2e3&&1==fn(e))){var n,r=null,i=Object(l.a)(t.state.facet(Nt));try{for(i.s();!(n=i.n()).done;){if(r=(0,n.value)(t,e))break}}catch(a){i.e(a)}finally{i.f()}if(r||0!=e.button||(r=function(t,e){var n=sn(t,e),r=fn(e),i=t.state.selection,o=n,a=e;return{update:function(t){t.docChanged&&(n&&(n.pos=t.changes.mapPos(n.pos)),i=i.map(t.changes),a=null)},get:function(e,s,u){var c;if(a&&e.clientX==a.clientX&&e.clientY==a.clientY?c=o:(c=o=sn(t,e),a=e),!c||!n)return i;var l=nn(t,c.pos,c.bias,r);if(n.pos!=c.pos&&!s){var h=nn(t,n.pos,n.bias,r),f=Math.min(h.from,l.from),p=Math.max(h.to,l.to);l=f=e.top&&t<=e.bottom},on=function(t,e,n){return rn(e,n)&&t>=n.left&&t<=n.right};function an(t,e,n,r){var i=St.find(t.docView,e);if(!i)return 1;var o=e-i.posAtStart;if(0==o)return 1;if(o==i.length)return-1;var a=i.coordsAt(o,-1);if(a&&on(n,r,a))return-1;var s=i.coordsAt(o,1);return s&&on(n,r,s)?1:a&&rn(r,a)?-1:1}function sn(t,e){var n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:an(t,n,e.clientX,e.clientY)}}var un=rt.ie&&rt.ie_version<=11,cn=null,ln=0,hn=0;function fn(t){if(!un)return t.detail;var e=cn,n=hn;return cn=t,hn=Date.now(),ln=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(ln+1)%3:1}function dn(t,e,n,r){if(n){var i=t.posAtCoords({x:e.clientX,y:e.clientY},!1);e.preventDefault();var o=t.inputState.mouseSelection,a=r&&o&&o.dragging&&o.dragMove?{from:o.dragging.from,to:o.dragging.to}:null,s={from:i,insert:n},u=t.state.changes(a?[a,s]:s);t.focus(),t.dispatch({changes:u,selection:{anchor:u.mapPos(i,-1),head:u.mapPos(i,1)},userEvent:a?"move.drop":"input.drop"})}}Ke.dragstart=function(t,e){var n=t.state.selection.main,r=t.inputState.mouseSelection;r&&(r.dragging=n),e.dataTransfer&&(e.dataTransfer.setData("Text",t.state.sliceDoc(n.from,n.to)),e.dataTransfer.effectAllowed="copyMove")},Ke.drop=function(t,e){if(e.dataTransfer){if(t.state.readOnly)return e.preventDefault();var n=e.dataTransfer.files;n&&n.length?function(){e.preventDefault();for(var r=Array(n.length),i=0,o=function(){++i==n.length&&dn(t,e,r.filter((function(t){return null!=t})).join(t.state.lineBreak),!1)},a=function(t){var e=new FileReader;e.onerror=o,e.onload=function(){/[\x00-\x08\x0e-\x1f]{2}/.test(e.result)||(r[t]=e.result),o()},e.readAsText(n[t])},s=0;su&&(n.push(f.text),r.push({from:f.from,to:Math.min(t.doc.length,f.to+1)})),u=f.number}}catch(d){c.e(d)}finally{c.f()}i=!0}return{text:n.join(t.lineBreak),ranges:r,linewise:i}}(t.state),r=n.text,i=n.ranges,o=n.linewise;if(r||o){pn=o?r:null;var a=Je?null:e.clipboardData;a?(e.preventDefault(),a.clearData(),a.setData("text/plain",r)):function(t,e){var n=t.dom.parentNode;if(n){var r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout((function(){r.remove(),t.focus()}),50)}}(t,r),"cut"!=e.type||t.state.readOnly||t.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"})}},Ke.focus=Ke.blur=function(t){setTimeout((function(){t.hasFocus!=t.inputState.notifiedFocused&&t.update([])}),10)},Ke.beforeprint=function(t){t.viewState.printing=!0,t.requestMeasure(),setTimeout((function(){t.viewState.printing=!1,t.requestMeasure()}),2e3)},Ke.compositionstart=Ke.compositionupdate=function(t){null==t.inputState.compositionFirstChange&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0,t.docView.compositionDeco.size&&(t.observer.flush(),gn(t,!0)))},Ke.compositionend=function(t){t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionFirstChange=null,setTimeout((function(){t.inputState.composing<0&&gn(t,!1)}),50)},Ke.contextmenu=function(t){t.inputState.lastContextMenu=Date.now()},Ke.beforeinput=function(t,e){var n,r;if(rt.chrome&&rt.android&&(r=He.find((function(t){return t.inputType==e.inputType})))&&(t.observer.delayAndroidKey(r.key,r.keyCode),"Backspace"==r.key||"Delete"==r.key)){var i=(null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0;setTimeout((function(){var e;((null===(e=window.visualViewport)||void 0===e?void 0:e.height)||0)>i+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())}),100)}};var mn=["pre-wrap","normal","pre-line","break-spaces"],vn=function(){function t(){Object(h.a)(this,t),this.doc=p.a.empty,this.lineWrapping=!1,this.direction=ne.LTR,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.lineLength=30,this.heightChanged=!1}return Object(f.a)(t,[{key:"heightForGap",value:function(t,e){var n=this.doc.lineAt(e).number-this.doc.lineAt(t).number+1;return this.lineWrapping&&(n+=Math.ceil((e-t-n*this.lineLength*.5)/this.lineLength)),this.lineHeight*n}},{key:"heightForLine",value:function(t){return this.lineWrapping?(1+Math.max(0,Math.ceil((t-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}},{key:"setDoc",value:function(t){return this.doc=t,this}},{key:"mustRefreshForStyle",value:function(t,e){return mn.indexOf(t)>-1!=this.lineWrapping||this.direction!=e}},{key:"mustRefreshForHeights",value:function(t){for(var e=!1,n=0;n-1,s=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=a||this.direction!=e;if(this.lineWrapping=a,this.direction=e,this.lineHeight=n,this.charWidth=r,this.lineLength=i,s){this.heightSamples={};for(var u=0;u2&&void 0!==arguments[2]?arguments[2]:2;Object(h.a)(this,t),this.length=e,this.height=n,this.flags=r}return Object(f.a)(t,[{key:"outdated",get:function(){return(2&this.flags)>0},set:function(t){this.flags=(t?2:0)|-3&this.flags}},{key:"setHeight",value:function(t,e){this.height!=e&&(Math.abs(this.height-e)>wn&&(t.heightChanged=!0),this.height=e)}},{key:"replace",value:function(e,n,r){return t.of(r)}},{key:"decomposeLeft",value:function(t,e){e.push(this)}},{key:"decomposeRight",value:function(t,e){e.push(this)}},{key:"applyChanges",value:function(t,e,n,r){for(var i=this,o=r.length-1;o>=0;o--){var a=r[o],s=a.fromA,u=a.toA,c=a.fromB,l=a.toB,h=i.lineAt(s,On.ByPosNoHeight,e,0,0),f=h.to>=u?h:i.lineAt(u,On.ByPosNoHeight,e,0,0);for(l+=f.to-u,u=f.to;o>0&&h.from<=r[o-1].toA;)s=r[o-1].fromA,c=r[o-1].fromB,o--,s2*o){var a=e[n-1];a.break?e.splice(--n,1,a.left,null,a.right):e.splice(--n,1,a.left,a.right),r+=1+a.break,i-=a.size}else{if(!(o>2*i))break;var s=e[r];s.break?e.splice(r,1,s.left,null,s.right):e.splice(r,1,s.left,s.right),r+=2+s.break,o-=s.size}else if(i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>3?arguments[3]:void 0;return n&&n.from<=e&&n.more&&this.setHeight(t,n.heights[n.index++]),this.outdated=!1,this}},{key:"toString",value:function(){return"block(".concat(this.length,")")}}]),n}(kn),_n=function(t){Object(a.a)(n,t);var e=Object(s.a)(n);function n(t,r){var i;return Object(h.a)(this,n),(i=e.call(this,t,r,yt.Text)).collapsed=0,i.widgetHeight=0,i}return Object(f.a)(n,[{key:"replace",value:function(t,e,r){var i=r[0];return 1==r.length&&(i instanceof n||i instanceof Sn&&4&i.flags)&&Math.abs(this.length-i.length)<10?(i instanceof Sn?i=new n(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):kn.of(r)}},{key:"updateHeight",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;return r&&r.from<=e&&r.more?this.setHeight(t,r.heights[r.index++]):(n||this.outdated)&&this.setHeight(t,Math.max(this.widgetHeight,t.heightForLine(this.length-this.collapsed))),this.outdated=!1,this}},{key:"toString",value:function(){return"line(".concat(this.length).concat(this.collapsed?-this.collapsed:"").concat(this.widgetHeight?":"+this.widgetHeight:"",")")}}]),n}(xn),Sn=function(t){Object(a.a)(n,t);var e=Object(s.a)(n);function n(t){return Object(h.a)(this,n),e.call(this,t,0)}return Object(f.a)(n,[{key:"lines",value:function(t,e){var n=t.lineAt(e).number,r=t.lineAt(e+this.length).number;return{firstLine:n,lastLine:r,lineHeight:this.height/(r-n+1)}}},{key:"blockAt",value:function(t,e,n,r){var i=this.lines(e,r),o=i.firstLine,a=i.lastLine,s=i.lineHeight,u=Math.max(0,Math.min(a-o,Math.floor((t-n)/s))),c=e.line(o+u),l=c.from,h=c.length;return new bn(l,h,n+s*u,s,yt.Text)}},{key:"lineAt",value:function(t,e,n,r,i){if(e==On.ByHeight)return this.blockAt(t,n,r,i);if(e==On.ByPosNoHeight){var o=n.lineAt(t),a=o.from,s=o.to;return new bn(a,s-a,0,0,yt.Text)}var u=this.lines(n,i),c=u.firstLine,l=u.lineHeight,h=n.lineAt(t),f=h.from,d=h.length,p=h.number;return new bn(f,d,r+l*(p-c),l,yt.Text)}},{key:"forEachLine",value:function(t,e,n,r,i,o){for(var a=this.lines(n,i),s=a.firstLine,u=a.lineHeight,c=Math.max(t,i),l=Math.min(i+this.length,e);c<=l;){var h=n.lineAt(c);c==t&&(r+=u*(h.number-s)),o(new bn(h.from,h.length,r,u,yt.Text)),r+=u,c=h.to+1}}},{key:"replace",value:function(t,e,r){var i=this.length-e;if(i>0){var o=r[r.length-1];o instanceof n?r[r.length-1]=new n(o.length+i):r.push(null,new n(i-1))}if(t>0){var a=r[0];a instanceof n?r[0]=new n(t+a.length):r.unshift(new n(t-1),null)}return kn.of(r)}},{key:"decomposeLeft",value:function(t,e){e.push(new n(t-1),null)}},{key:"decomposeRight",value:function(t,e){e.push(null,new n(this.length-t-1))}},{key:"updateHeight",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0,o=e+this.length;if(i&&i.from<=e+this.length&&i.more){var a=[],s=Math.max(e,i.from),u=-1,c=t.heightChanged;for(i.from>e&&a.push(new n(i.from-e-1).updateHeight(t,e));s<=o&&i.more;){var l=t.doc.lineAt(s).length;a.length&&a.push(null);var h=i.heights[i.index++];-1==u?u=h:Math.abs(h-u)>=wn&&(u=-2);var f=new _n(l,h);f.outdated=!1,a.push(f),s+=l+1}s<=o&&a.push(null,new n(o-s).updateHeight(t,s));var d=kn.of(a);return t.heightChanged=c||u<0||Math.abs(d.height-this.height)>=wn||Math.abs(u-this.lines(t.doc,e).lineHeight)>=wn,d}return(r||this.outdated)&&(this.setHeight(t,t.heightForGap(e,e+this.length)),this.outdated=!1),this}},{key:"toString",value:function(){return"gap(".concat(this.length,")")}}]),n}(kn),En=function(t){Object(a.a)(n,t);var e=Object(s.a)(n);function n(t,r,i){var o;return Object(h.a)(this,n),(o=e.call(this,t.length+r+i.length,t.height+i.height,r|(t.outdated||i.outdated?2:0))).left=t,o.right=i,o.size=t.size+i.size,o}return Object(f.a)(n,[{key:"break",get:function(){return 1&this.flags}},{key:"blockAt",value:function(t,e,n,r){var i=n+this.left.height;return ta))return u;var c=e==On.ByPosNoHeight?On.ByPosNoHeight:On.ByPos;return s?u.join(this.right.lineAt(a,c,n,o,a)):this.left.lineAt(a,c,n,r,i).join(u)}},{key:"forEachLine",value:function(t,e,n,r,i,o){var a=r+this.left.height,s=i+this.left.length+this.break;if(this.break)t=s&&this.right.forEachLine(t,e,n,a,s,o);else{var u=this.lineAt(s,On.ByPos,n,r,i);t=t&&u.from<=e&&o(u),e>u.to&&this.right.forEachLine(u.to+1,e,n,a,s,o)}}},{key:"replace",value:function(t,e,n){var r=this.left.length+this.break;if(ethis.left.length)return this.balanced(this.left,this.right.replace(t-r,e-r,n));var i=[];t>0&&this.decomposeLeft(t,i);var o,a=i.length,s=Object(l.a)(n);try{for(s.s();!(o=s.n()).done;){var u=o.value;i.push(u)}}catch(h){s.e(h)}finally{s.f()}if(t>0&&Cn(i,a-1),e=++n&&e.push(null),t>n&&this.right.decomposeLeft(t-n,e)}},{key:"decomposeRight",value:function(t,e){var n=this.left.length,r=n+this.break;if(t>=r)return this.right.decomposeRight(t-r,e);t2*e.size||e.size>2*t.size?kn.of(this.break?[t,null,e]:[t,e]):(this.left=t,this.right=e,this.height=t.height+e.height,this.outdated=t.outdated||e.outdated,this.size=t.size+e.size,this.length=t.length+this.break+e.length,this)}},{key:"updateHeight",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0,i=this.left,o=this.right,a=e+i.length+this.break,s=null;return r&&r.from<=e+i.length&&r.more?s=i=i.updateHeight(t,e,n,r):i.updateHeight(t,e,n),r&&r.from<=a+o.length&&r.more?s=o=o.updateHeight(t,a,n,r):o.updateHeight(t,a,n),s?this.balanced(i,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}},{key:"toString",value:function(){return this.left+(this.break?" ":"-")+this.right}}]),n}(kn);function Cn(t,e){var n,r;null==t[e]&&(n=t[e-1])instanceof Sn&&(r=t[e+1])instanceof Sn&&t.splice(e-1,3,new Sn(n.length+1+r.length))}var Tn=function(){function t(e,n){Object(h.a)(this,t),this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}return Object(f.a)(t,[{key:"isCovered",get:function(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}},{key:"span",value:function(t,e){if(this.lineStart>-1){var n=Math.min(e,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof _n?r.length+=n-this.pos:(n>this.pos||!this.isCovered)&&this.nodes.push(new _n(n-this.pos,-1)),this.writtenTo=n,e>n&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}},{key:"point",value:function(t,e,n){if(t=5)&&this.addLineDeco(r,i)}else e>t&&this.span(t,e);this.lineEnd>-1&&this.lineEnd-1)){var t=this.oracle.doc.lineAt(this.pos),e=t.from,n=t.to;this.lineStart=e,this.lineEnd=n,this.writtenToe&&this.nodes.push(new _n(this.pos-e,-1)),this.writtenTo=this.pos}}},{key:"blankContent",value:function(t,e){var n=new Sn(e-t);return this.oracle.doc.lineAt(t).to==e&&(n.flags|=4),n}},{key:"ensureLine",value:function(){this.enterLine();var t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof _n)return t;var e=new _n(0,-1);return this.nodes.push(e),e}},{key:"addBlock",value:function(t){this.enterLine(),t.type!=yt.WidgetAfter||this.isCovered||this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,t.type!=yt.WidgetBefore&&(this.covering=t)}},{key:"addLineDeco",value:function(t,e){var n=this.ensureLine();n.length+=e,n.collapsed+=e,n.widgetHeight=Math.max(n.widgetHeight,t),this.writtenTo=this.pos=this.pos+e}},{key:"finish",value:function(t){var e=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||e instanceof _n||this.isCovered?(this.writtenTo=e&&i<=n}))){var o=t.lineBlockAt(i),a=o.from,s=o.to;e.push(new Pn(a,s))}},i=0;i<=1;i++)r(i);this.viewports=e.sort((function(t,e){return t.from-e.from})),this.scaler=this.heightMap.height<=7e6?Bn:new In(this.heightOracle.doc,this.heightMap,this.viewports)}},{key:"updateViewportLines",value:function(){var t=this;this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.state.doc,0,0,(function(e){t.viewportLines.push(1==t.scaler.scale?e:Qn(e,t.scaler))}))}},{key:"update",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.state;this.state=t.state;var r=this.state.facet(Kt),i=t.changedRanges,o=te.extendWithRanges(i,An(t.startState.facet(Kt),r,t?t.changes:d.c.empty(this.state.doc.length))),a=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(r,n.doc,this.heightOracle.setDoc(this.state.doc),o),this.heightMap.height!=a&&(t.flags|=2);var s=o.length?this.mapViewport(this.viewport,t.changes):this.viewport;(e&&(e.range.heads.to)||!this.viewportIsAppropriate(s))&&(s=this.getViewport(0,e));var u=!t.changes.empty||2&t.flags||s.from!=this.viewport.from||s.to!=this.viewport.to;this.viewport=s,this.updateForViewport(),u&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes))),t.flags|=this.computeVisibleRanges(),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&t.selectionSet&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&(this.mustEnforceCursorAssoc=!0)}},{key:"measure",value:function(t){var e=t.contentDOM,n=window.getComputedStyle(e),r=this.heightOracle,i=n.whiteSpace,o="rtl"==n.direction?ne.RTL:ne.LTR,a=this.heightOracle.mustRefreshForStyle(i,o),s=a||this.mustMeasureContent||this.contentDOMHeight!=e.clientHeight,u=0,c=0;if(s){this.mustMeasureContent=!1,this.contentDOMHeight=e.clientHeight;var l=parseInt(n.paddingTop)||0,h=parseInt(n.paddingBottom)||0;this.paddingTop==l&&this.paddingBottom==h||(u|=8,this.paddingTop=l,this.paddingBottom=h)}var f=this.printing?{top:-1e8,bottom:1e8,left:-1e8,right:1e8}:function(t,e){for(var n=t.getBoundingClientRect(),r=Math.max(0,n.left),i=Math.min(innerWidth,n.right),o=Math.max(0,n.top),a=Math.min(innerHeight,n.bottom),s=t.ownerDocument.body,u=t.parentNode;u&&u!=s;)if(1==u.nodeType){var c=u,l=window.getComputedStyle(c);if((c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth)&&"visible"!=l.overflow){var h=c.getBoundingClientRect();r=Math.max(r,h.left),i=Math.min(i,h.right),o=Math.max(o,h.top),a=Math.min(a,h.bottom)}u="absolute"==l.position||"fixed"==l.position?c.offsetParent:c.parentNode}else{if(11!=u.nodeType)break;u=u.host}return{left:r-n.left,right:Math.max(r,i)-n.left,top:o-(n.top+e),bottom:Math.max(o,a)-(n.top+e)}}(e,this.paddingTop),d=f.top-this.pixelViewport.top,p=f.bottom-this.pixelViewport.bottom;this.pixelViewport=f;var g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(s=!0)),!this.inView)return 0;if(s){var m=t.docView.measureVisibleLineHeights();r.mustRefreshForHeights(m)&&(a=!0);var v=e.clientWidth;if(a||r.lineWrapping&&Math.abs(v-this.contentDOMWidth)>r.charWidth){var y=t.docView.measureTextSize(),b=y.lineHeight,O=y.charWidth;(a=r.refresh(i,o,b,O,v/O,m))&&(t.docView.minWidth=0,u|=8)}this.contentDOMWidth!=v&&(this.contentDOMWidth=v,u|=8),this.editorHeight!=t.scrollDOM.clientHeight&&(this.editorHeight=t.scrollDOM.clientHeight,u|=8),d>0&&p>0?c=Math.max(d,p):d<0&&p<0&&(c=Math.min(d,p)),r.heightChanged=!1,this.heightMap=this.heightMap.updateHeight(r,0,a,new yn(this.viewport.from,m)),r.heightChanged&&(u|=2)}var w=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return w&&(this.viewport=this.getViewport(c,this.scrollTarget)),this.updateForViewport(),(2&u||w)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc()),u}},{key:"visibleTop",get:function(){return this.scaler.fromDOM(this.pixelViewport.top)}},{key:"visibleBottom",get:function(){return this.scaler.fromDOM(this.pixelViewport.bottom)}},{key:"getViewport",value:function(t,e){var n=.5-Math.max(-.5,Math.min(.5,t/1e3/2)),r=this.heightMap,i=this.state.doc,o=this.visibleTop,a=this.visibleBottom,s=new Pn(r.lineAt(o-1e3*n,On.ByHeight,i,0,0).from,r.lineAt(a+1e3*(1-n),On.ByHeight,i,0,0).to);if(e){var u=e.range.head,c=this.editorHeight;if(us.to){var l,h=r.lineAt(u,On.ByPos,i,0,0);l="center"==e.y?(h.top+h.bottom)/2-c/2:"start"==e.y||"nearest"==e.y&&u1&&void 0!==arguments[1]?arguments[1]:0;if(!this.inView)return!0;var i=this.heightMap.lineAt(e,On.ByPos,this.state.doc,0,0),o=i.top,a=this.heightMap.lineAt(n,On.ByPos,this.state.doc,0,0),s=a.bottom,u=this.visibleTop,c=this.visibleBottom;return(0==e||o<=u-Math.max(10,Math.min(-r,250)))&&(n==this.state.doc.length||s>=c+Math.max(10,Math.min(r,250)))&&o>u-2e3&&si&&(r.push({from:i,to:t}),o+=t-i),i=e}},20),ii.from&&f.push({from:i.from,to:a}),s=i.from&&d.from<=i.to&&Fn(f,d.from-10,d.from+10),!d.empty&&d.to>=i.from&&d.to<=i.to&&Fn(f,d.to-10,d.to+10);for(var p=function(){var r=v[g],a=r.from,s=r.to;s-a>1e3&&n.push(function(t,e){var n,r=Object(l.a)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(e(i))return i}}catch(o){r.e(o)}finally{r.f()}return}(t,(function(t){return t.from>=i.from&&t.to<=i.to&&Math.abs(t.from-a)<1e3&&Math.abs(t.to-s)<1e3}))||new Mn(a,s,e.gapSize(i,a,s,o)))},g=0,v=f;g=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find((function(e){return e.from<=t&&e.to>=t}))||Qn(this.heightMap.lineAt(t,On.ByPos,this.state.doc,0,0),this.scaler)}},{key:"lineBlockAtHeight",value:function(t){return Qn(this.heightMap.lineAt(this.scaler.fromDOM(t),On.ByHeight,this.state.doc,0,0),this.scaler)}},{key:"elementAtHeight",value:function(t){return Qn(this.heightMap.blockAt(this.scaler.fromDOM(t),this.state.doc,0,0),this.scaler)}},{key:"docHeight",get:function(){return this.scaler.toDOM(this.heightMap.height)}},{key:"contentHeight",get:function(){return this.docHeight+this.paddingTop+this.paddingBottom}}]),t}(),Pn=Object(f.a)((function t(e,n){Object(h.a)(this,t),this.from=e,this.to=n}));function Rn(t,e){var n=t.total,r=t.ranges;if(e<=0)return r[0].from;if(e>=1)return r[r.length-1].to;for(var i=Math.floor(n*e),o=0;;o++){var a=r[o],s=a.from,u=a.to-s;if(i<=u)return s+i;i-=u}}function Ln(t,e){var n,r=0,i=Object(l.a)(t.ranges);try{for(i.s();!(n=i.n()).done;){var o=n.value,a=o.from,s=o.to;if(e<=s){r+=e-a;break}r+=s-a}}catch(u){i.e(u)}finally{i.f()}return r/t.total}function Fn(t,e,n){for(var r=0;re){var o=[];i.fromn&&o.push({from:n,to:i.to}),t.splice.apply(t,[r,1].concat(o)),r+=o.length-1}}}var Bn={toDOM:function(t){return t},fromDOM:function(t){return t},scale:1},In=function(){function t(e,n,r){Object(h.a)(this,t);var i=0,o=0,a=0;this.viewports=r.map((function(t){var r=t.from,o=t.to,a=n.lineAt(r,On.ByPos,e,0,0).top,s=n.lineAt(o,On.ByPos,e,0,0).bottom;return i+=s-a,{from:r,to:o,top:a,bottom:s,domTop:0,domBottom:0}})),this.scale=(7e6-i)/(n.height-i);var s,u=Object(l.a)(this.viewports);try{for(u.s();!(s=u.n()).done;){var c=s.value;c.domTop=a+(c.top-o)*this.scale,a=c.domBottom=c.domTop+(c.bottom-c.top),o=c.bottom}}catch(f){u.e(f)}finally{u.f()}}return Object(f.a)(t,[{key:"toDOM",value:function(t){for(var e=0,n=0,r=0;;e++){var i=e-1}}),qn=g.a.newName(),Wn=g.a.newName(),Vn=g.a.newName(),Yn={"&light":"."+Wn,"&dark":"."+Vn};function Un(t,e,n){return new g.a(e,{finish:function(e){return/&/.test(e)?e.replace(/&\w*/,(function(e){if("&"==e)return t;if(!n||!n[e])throw new RangeError("Unsupported selector: ".concat(e));return n[e]})):t+" "+e}})}var Hn=Un("."+qn,{"&.cm-editor":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,minHeight:"100%",display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere"},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 4px"},".cm-selectionLayer":{zIndex:-1,contain:"size style"},".cm-selectionBackground":{position:"absolute"},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{zIndex:100,contain:"size style",pointerEvents:"none"},"&.cm-focused .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{visibility:"hidden"},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{visibility:"hidden"},"100%":{}},".cm-cursor, .cm-dropCursor":{position:"absolute",borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},"&.cm-focused .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#f3f9ff"},"&dark .cm-activeLine":{backgroundColor:"#223039"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Yn),Xn={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Gn=rt.ie&&rt.ie_version<=11,Zn=function(){function t(e,n,r){var i=this;Object(h.a)(this,t),this.view=e,this.onChange=n,this.onScrollChanged=r,this.active=!1,this.selectionRange=new D,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.scrollTargets=[],this.intersection=null,this.resize=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver((function(t){var n,r=Object(l.a)(t);try{for(r.s();!(n=r.n()).done;){var o=n.value;i.queue.push(o)}}catch(a){r.e(a)}finally{r.f()}(rt.ie&&rt.ie_version<=11||rt.ios&&e.composing)&&t.some((function(t){return"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length}))?i.flushSoon():i.flush()})),Gn&&(this.onCharData=function(t){i.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),i.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),"function"==typeof ResizeObserver&&(this.resize=new ResizeObserver((function(){i.view.docView.lastUpdate0&&t[t.length-1].intersectionRatio>0!=i.intersecting&&(i.intersecting=!i.intersecting,i.intersecting!=i.view.inView&&i.onScrollChanged(document.createEvent("Event")))}),{}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((function(t){t.length>0&&t[t.length-1].intersectionRatio>0&&i.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange(),this.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}return Object(f.a)(t,[{key:"onScroll",value:function(t){this.intersecting&&this.flush(!1),this.onScrollChanged(t)}},{key:"updateGaps",value:function(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some((function(e,n){return e!=t[n]})))){this.gapIntersection.disconnect();var e,n=Object(l.a)(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;this.gapIntersection.observe(r)}}catch(i){n.e(i)}finally{n.f()}this.gaps=t}}},{key:"onSelectionChange",value:function(t){if(this.readSelectionRange()&&!this.delayedAndroidKey){var e=this.view,n=this.selectionRange;if(e.state.facet(zt)?e.root.activeElement==this.dom:O(e.dom,n)){var r=n.anchorNode&&e.docView.nearest(n.anchorNode);r&&r.ignoreEvent(t)||((rt.ie&&rt.ie_version<=11||rt.android&&rt.chrome)&&!e.state.selection.main.empty&&n.focusNode&&k(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)?this.flushSoon():this.flush(!1))}}}},{key:"readSelectionRange",value:function(){var t=this.view.root,e=y(t),n=rt.safari&&11==t.nodeType&&function(){for(var t=document.activeElement;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}()==this.view.contentDOM&&function(t){var e=null;function n(t){t.preventDefault(),t.stopImmediatePropagation(),e=t.getTargetRanges()[0]}if(t.contentDOM.addEventListener("beforeinput",n,!0),document.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",n,!0),!e)return null;var r=e.startContainer,i=e.startOffset,o=e.endContainer,a=e.endOffset,s=t.docView.domAtPos(t.state.selection.main.anchor);if(k(s.node,s.offset,o,a)){var u=[o,a,r,i];r=u[0],i=u[1],o=u[2],a=u[3]}return{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:a}}(this.view)||e;return!this.selectionRange.eq(n)&&(this.selectionRange.setRange(n),this.selectionChanged=!0)}},{key:"setSelectionRange",value:function(t,e){this.selectionRange.set(t.node,t.offset,e.node,e.offset),this.selectionChanged=!1}},{key:"listenForScroll",value:function(){this.parentCheck=-1;for(var t=0,e=null,n=this.dom;n;)if(1==n.nodeType)!e&&t=0&&(window.clearTimeout(this.delayedFlush),this.delayedFlush=-1,this.flush())}},{key:"processRecords",value:function(){var t,e=this.queue,n=Object(l.a)(this.observer.takeRecords());try{for(n.s();!(t=n.n()).done;){var r=t.value;e.push(r)}}catch(f){n.e(f)}finally{n.f()}e.length&&(this.queue=[]);var i,o=-1,a=-1,s=!1,u=Object(l.a)(e);try{for(u.s();!(i=u.n()).done;){var c=i.value,h=this.readMutation(c);h&&(h.typeOver&&(s=!0),-1==o?(o=h.from,a=h.to):(o=Math.min(h.from,o),a=Math.max(h.to,a)))}}catch(f){u.e(f)}finally{u.f()}return{from:o,to:a,typeOver:s}}},{key:"flush",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!(this.delayedFlush>=0||this.delayedAndroidKey)){t&&this.readSelectionRange();var e=this.processRecords(),n=e.from,r=e.to,i=e.typeOver,o=this.selectionChanged&&O(this.dom,this.selectionRange);if(!(n<0)||o){this.selectionChanged=!1;var a=this.view.state;this.onChange(n,r,i),this.view.state==a&&this.view.update([])}}}},{key:"readMutation",value:function(t){var e=this.view.docView.nearest(t.target);if(!e||e.ignoreMutation(t))return null;if(e.markDirty("attributes"==t.type),"attributes"==t.type&&(e.dirty|=4),"childList"==t.type){var n=Kn(e,t.previousSibling||t.target.previousSibling,-1),r=Kn(e,t.nextSibling||t.target.nextSibling,1);return{from:n?e.posAfter(n):e.posAtStart,to:r?e.posBefore(r):e.posAtEnd,typeOver:!1}}return"characterData"==t.type?{from:e.posAtStart,to:e.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}:null}},{key:"destroy",value:function(){var t,e,n;this.stop(),null===(t=this.intersection)||void 0===t||t.disconnect(),null===(e=this.gapIntersection)||void 0===e||e.disconnect(),null===(n=this.resize)||void 0===n||n.disconnect();var r,i=Object(l.a)(this.scrollTargets);try{for(i.s();!(r=i.n()).done;){r.value.removeEventListener("scroll",this.onScroll)}}catch(o){i.e(o)}finally{i.f()}window.removeEventListener("scroll",this.onScroll),this.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout)}}]),t}();function Kn(t,e,n){for(;e;){var r=I.get(e);if(r&&r.parent==t)return r;var i=e.parentNode;e=i!=t.dom?i:n>0?e.nextSibling:e.previousSibling}return null}function Jn(t,e,n,r){var i,o,a=t.state.selection.main;if(e>-1){var s=t.docView.domBoundsAround(e,n,0);if(!s||t.state.readOnly)return;var u=s.from,c=s.to,l=t.docView.impreciseHead||t.docView.impreciseAnchor?[]:function(t){var e=[];if(t.root.activeElement!=t.contentDOM)return e;var n=t.observer.selectionRange,r=n.anchorNode,i=n.anchorOffset,o=n.focusNode,a=n.focusOffset;r&&(e.push(new Se(r,i)),o==r&&a==i||e.push(new Se(o,a)));return e}(t),h=new xe(l,t);h.readRange(s.startDOM,s.endDOM),o=function(t,e){if(0==t.length)return null;var n=t[0].pos,r=2==t.length?t[1].pos:n;return n>-1&&r>-1?d.e.single(n+e,r+e):null}(l,u);var f=a.from,p=null;(8===t.inputState.lastKeyCode&&t.inputState.lastKeyTime>Date.now()-100||rt.android&&h.text.length0&&s>0&&t.charCodeAt(a-1)==e.charCodeAt(s-1);)a--,s--;if("end"==r){n-=a+Math.max(0,o-Math.min(a,s))-o}if(a=a?o-n:0)+(s-a),a=o}else if(s=s?o-n:0)+(a-s),s=o}return{from:o,toA:a,toB:s}}(t.state.sliceDoc(u,c),h.text,f-u,p);g&&(i={from:u+g.from,to:u+g.toA,insert:t.state.toText(h.text.slice(g.from,g.toB))})}else if(t.hasFocus||!t.state.facet(zt)){var m=t.observer.selectionRange,v=t.docView,y=v.impreciseHead,O=v.impreciseAnchor,w=y&&y.node==m.focusNode&&y.offset==m.focusOffset||!b(t.contentDOM,m.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(m.focusNode,m.focusOffset),k=O&&O.node==m.anchorNode&&O.offset==m.anchorOffset||!b(t.contentDOM,m.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(m.anchorNode,m.anchorOffset);w==a.head&&k==a.anchor||(o=d.e.single(k,w))}if(i||o)if(!i&&r&&!a.empty&&o&&o.main.empty?i={from:a.from,to:a.to,insert:t.state.doc.slice(a.from,a.to)}:i&&i.from>=a.from&&i.to<=a.to&&(i.from!=a.from||i.to!=a.to)&&a.to-a.from-(i.to-i.from)<=4&&(i={from:a.from,to:a.to,insert:t.state.doc.slice(a.from,i.from).append(i.insert).append(t.state.doc.slice(i.to,a.to))}),i){var x=t.state;if(rt.ios&&t.inputState.flushIOSKey(t))return;if(rt.android&&(i.from==a.from&&i.to==a.to&&1==i.insert.length&&2==i.insert.lines&&P(t.contentDOM,"Enter",13)||i.from==a.from-1&&i.to==a.to&&0==i.insert.length&&P(t.contentDOM,"Backspace",8)||i.from==a.from&&i.to==a.to+1&&0==i.insert.length&&P(t.contentDOM,"Delete",46)))return;var _,S=i.insert.toString();if(t.state.facet(Lt).some((function(e){return e(t,i.from,i.to,S)})))return;if(t.inputState.composing>=0&&t.inputState.composing++,i.from>=a.from&&i.to<=a.to&&i.to-i.from>=(a.to-a.from)/3&&(!o||o.main.empty&&o.main.from==i.from+i.insert.length)){var E=a.fromi.to?x.sliceDoc(i.to,a.to):"";_=x.replaceSelection(t.state.toText(E+i.insert.sliceString(0,void 0,t.state.lineBreak)+C))}else{var T=x.changes(i);_={changes:T,selection:o&&!x.selection.main.eq(o.main)&&o.main.to<=T.newLength?x.selection.replaceRange(o.main):void 0}}var A="input.type";t.composing&&(A+=".compose",t.inputState.compositionFirstChange&&(A+=".start",t.inputState.compositionFirstChange=!1)),t.dispatch(_,{scrollIntoView:!0,userEvent:A})}else if(o&&!o.main.eq(a)){var D=!1,M="select";t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&(D=!0),M=t.inputState.lastSelectionOrigin),t.dispatch({selection:o,scrollIntoView:D,userEvent:M})}}var tr=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(h.a)(this,t),this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: absolute; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=n.dispatch||function(t){return e.update([t])},this.dispatch=this.dispatch.bind(this),this.root=n.root||R(n.parent)||document,this.viewState=new Nn(n.state||d.f.create()),this.plugins=this.state.facet(Yt).map((function(t){return new Xt(t)}));var r,i=Object(l.a)(this.plugins);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.update(this)}}catch(a){i.e(a)}finally{i.f()}this.observer=new Zn(this,(function(t,n,r){Jn(e,t,n,r)}),(function(t){e.inputState.runScrollHandlers(e,t),e.observer.intersecting&&e.measure()})),this.inputState=new Ue(this),this.docView=new Ee(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,ir(),this.requestMeasure(),n.parent&&n.parent.appendChild(this.dom)}return Object(f.a)(t,[{key:"state",get:function(){return this.viewState.state}},{key:"viewport",get:function(){return this.viewState.viewport}},{key:"visibleRanges",get:function(){return this.viewState.visibleRanges}},{key:"inView",get:function(){return this.viewState.inView}},{key:"composing",get:function(){return this.inputState.composing>0}},{key:"dispatch",value:function(){var t;this._dispatch(1==arguments.length&&(arguments.length<=0?void 0:arguments[0])instanceof d.l?arguments.length<=0?void 0:arguments[0]:(t=this.state).update.apply(t,arguments))}},{key:"update",value:function(t){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");var e,n,r=!1,i=this.state,o=Object(l.a)(t);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(a.startState!=i)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");i=a.state}}catch(b){o.e(b)}finally{o.f()}if(this.destroyed)this.viewState.state=i;else{if(i.facet(d.f.phrases)!=this.state.facet(d.f.phrases))return this.setState(i);e=new ee(this,i,t);var s=null;try{this.updateState=2;var u,c=Object(l.a)(t);try{for(c.s();!(u=c.n()).done;){var h=u.value;if(s&&(s=s.map(h.changes)),h.scrollIntoView){var f=h.state.selection.main;s=new It(f.empty?f:d.e.cursor(f.head,f.head>f.anchor?-1:1))}var p,g=Object(l.a)(h.effects);try{for(g.s();!(p=g.n()).done;){var m=p.value;m.is(Ft)?s=new It(m.value):m.is(Bt)?s=new It(m.value,"center"):m.is(Qt)&&(s=m.value)}}catch(b){g.e(b)}finally{g.f()}}}catch(b){c.e(b)}finally{c.f()}this.viewState.update(e,s),this.bidiCache=sr.update(this.bidiCache,e.changes),e.empty||(this.updatePlugins(e),this.inputState.update(e)),r=this.docView.update(e),this.state.facet(Jt)!=this.styleModules&&this.mountStyles(),this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(r,t.some((function(t){return t.isUserEvent("select.pointer")})))}finally{this.updateState=0}if((r||s||this.viewState.mustEnforceCursorAssoc)&&this.requestMeasure(),!e.empty){var v,y=Object(l.a)(this.state.facet(Rt));try{for(y.s();!(v=y.n()).done;){(0,v.value)(e)}}catch(b){y.e(b)}finally{y.f()}}}}},{key:"setState",value:function(t){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)this.viewState.state=t;else{this.updateState=2;try{var e,n=Object(l.a)(this.plugins);try{for(n.s();!(e=n.n()).done;){e.value.destroy(this)}}catch(o){n.e(o)}finally{n.f()}this.viewState=new Nn(t),this.plugins=t.facet(Yt).map((function(t){return new Xt(t)})),this.pluginMap.clear();var r,i=Object(l.a)(this.plugins);try{for(i.s();!(r=i.n()).done;){r.value.update(this)}}catch(o){i.e(o)}finally{i.f()}this.docView=new Ee(this),this.inputState.ensureHandlers(this),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}this.requestMeasure()}}},{key:"updatePlugins",value:function(t){var e=t.startState.facet(Yt),n=t.state.facet(Yt);if(e!=n){var r,i=[],o=Object(l.a)(n);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=e.indexOf(a);if(s<0)i.push(new Xt(a));else{var u=this.plugins[s];u.mustUpdate=t,i.push(u)}}}catch(m){o.e(m)}finally{o.f()}var c,h=Object(l.a)(this.plugins);try{for(h.s();!(c=h.n()).done;){var f=c.value;f.mustUpdate!=t&&f.destroy(this)}}catch(m){h.e(m)}finally{h.f()}this.plugins=i,this.pluginMap.clear(),this.inputState.ensureHandlers(this)}else{var d,p=Object(l.a)(this.plugins);try{for(p.s();!(d=p.n()).done;){d.value.mustUpdate=t}}catch(m){p.e(m)}finally{p.f()}}for(var g=0;g0&&void 0!==arguments[0])||arguments[0];if(!this.destroyed){this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,e&&this.observer.flush();var n=null;try{for(var r=0;;r++){this.updateState=1;var i=this.viewport,o=this.viewState.measure(this);if(!o&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(r>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}var a=[];if(!(4&o)){var s=[a,this.measureRequests];this.measureRequests=s[0],a=s[1]}var u=a.map((function(e){try{return e.read(t)}catch(n){return $t(t.state,n),ar}})),c=new ee(this,this.state),h=!1;c.flags|=o,n?n.flags|=o:n=c,this.updateState=2,c.empty||(this.updatePlugins(c),this.inputState.update(c),this.updateAttrs(),h=this.docView.update(c));for(var f=0;f-1&&this.measure(!1)}},{key:"requestMeasure",value:function(t){var e=this;if(this.measureScheduled<0&&(this.measureScheduled=requestAnimationFrame((function(){return e.measure()}))),t){if(null!=t.key)for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:0;return this.lineBlockAt(t).moveY(e+this.viewState.paddingTop)}},{key:"lineBlockAt",value:function(t){return this.viewState.lineBlockAt(t)}},{key:"contentHeight",get:function(){return this.viewState.contentHeight}},{key:"moveByChar",value:function(t,e,n){return Ye(this,t,Ve(this,t,e,n))}},{key:"moveByGroup",value:function(t,e){var n=this;return Ye(this,t,Ve(this,t,e,(function(e){return function(t,e,n){var r=t.state.charCategorizer(e),i=r(n);return function(t){var e=r(t);return i==d.d.Space&&(i=e),i==e}}(n,t.head,e)})))}},{key:"moveToLineBoundary",value:function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return We(this,t,e,n)}},{key:"moveVertically",value:function(t,e,n){return Ye(this,t,function(t,e,n,r){var i=e.head,o=n?1:-1;if(i==(n?t.state.doc.length:0))return d.e.cursor(i);var a,s=e.goalColumn,u=t.contentDOM.getBoundingClientRect(),c=t.coordsAtPos(i),l=t.documentTop;if(c)null==s&&(s=c.left-u.left),a=o<0?c.top:c.bottom;else{var h=t.viewState.lineBlockAt(i-l);null==s&&(s=Math.min(u.right-u.left,t.defaultCharacterWidth*(i-h.from))),a=(o<0?h.top:h.bottom)+l}for(var f=u.left+s,p=null!==r&&void 0!==r?r:t.defaultLineHeight>>1,g=0;;g+=10){var m=a+(p+g)*o,v=$e(t,{x:f,y:m},!1,o);if(mu.bottom||(o<0?vi))return d.e.cursor(v,void 0,void 0,s)}}(this,t,e,n))}},{key:"scrollPosIntoView",value:function(t){this.dispatch({effects:Ft.of(d.e.cursor(t))})}},{key:"domAtPos",value:function(t){return this.docView.domAtPos(t)}},{key:"posAtDOM",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.docView.posFromDOM(t,e)}},{key:"posAtCoords",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.readMeasured(),$e(this,t,e)}},{key:"coordsAtPos",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.readMeasured();var n=this.docView.coordsAt(t,e);if(!n||n.left==n.right)return n;var r=this.state.doc.lineAt(t),i=this.bidiSpans(r),o=i[ve.find(i,t-r.from,-1,e)];return C(n,o.dir==ne.LTR==e>0)}},{key:"defaultCharacterWidth",get:function(){return this.viewState.heightOracle.charWidth}},{key:"defaultLineHeight",get:function(){return this.viewState.heightOracle.lineHeight}},{key:"textDirection",get:function(){return this.viewState.heightOracle.direction}},{key:"lineWrapping",get:function(){return this.viewState.heightOracle.lineWrapping}},{key:"bidiSpans",value:function(t){if(t.length>er)return Oe(t.length);var e,n=this.textDirection,r=Object(l.a)(this.bidiCache);try{for(r.s();!(e=r.n()).done;){var i=e.value;if(i.from==t.from&&i.dir==n)return i.order}}catch(a){r.e(a)}finally{r.f()}var o=be(t.text,this.textDirection);return this.bidiCache.push(new sr(t.from,t.to,n,o)),o}},{key:"hasFocus",get:function(){var t;return(document.hasFocus()||rt.safari&&(null===(t=this.inputState)||void 0===t?void 0:t.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}},{key:"focus",value:function(){var t=this;this.observer.ignore((function(){j(t.contentDOM),t.docView.updateSelection()}))}},{key:"destroy",value:function(){var t,e=Object(l.a)(this.plugins);try{for(e.s();!(t=e.n()).done;){t.value.destroy(this)}}catch(n){e.e(n)}finally{e.f()}this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}}],[{key:"scrollIntoView",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Qt.of(new It("number"==typeof t?d.e.cursor(t):t,e.y,e.x,e.yMargin,e.xMargin))}},{key:"domEventHandlers",value:function(t){return Ut.define((function(){return{}}),{eventHandlers:t})}},{key:"theme",value:function(t,e){var n=g.a.newName(),r=[$n.of(n),Jt.of(Un(".".concat(n),t))];return e&&e.dark&&r.push(zn.of(!0)),r}},{key:"baseTheme",value:function(t){return d.i.lowest(Jt.of(Un("."+qn,t,Yn)))}}]),t}();tr.scrollTo=Ft,tr.centerOn=Bt,tr.styleModule=Jt,tr.inputHandler=Lt,tr.exceptionSink=Pt,tr.updateListener=Rt,tr.editable=zt,tr.mouseSelectionStyle=Nt,tr.dragMovesSelection=jt,tr.clickAddsSelectionRange=Mt,tr.decorations=Kt,tr.contentAttributes=Zt,tr.editorAttributes=Gt,tr.lineWrapping=tr.contentAttributes.of({class:"cm-lineWrapping"}),tr.announce=d.j.define();var er=4096;function nr(t,e){return(null==t?e.contentDOM.getBoundingClientRect().top:t)+e.viewState.paddingTop}var rr=-1;function ir(){window.addEventListener("resize",(function(){-1==rr&&(rr=setTimeout(or,50))}))}function or(){rr=-1;for(var t=document.querySelectorAll(".cm-content"),e=0;e=0;i--){var o=r[i],a="function"==typeof o?o(t):o;a&&pt(a,n)}return n}var cr=rt.mac?"mac":rt.windows?"win":rt.linux?"linux":"key";function lr(t,e){var n,r,i,o,a=t.split(/-(?!$)/),s=a[a.length-1];"Space"==s&&(s=" ");for(var u=0;u1&&void 0!==arguments[1]?arguments[1]:cr,r=Object.create(null),i=Object.create(null),o=function(t,e){var n=i[t];if(null==n)i[t]=e;else if(n!=e)throw new Error("Key binding "+t+" is used both as a regular binding and as a multi-stroke prefix")},a=function(t,e,i,a){for(var s=r[t]||(r[t]=Object.create(null)),u=e.split(/ (?!$)/).map((function(t){return lr(t,n)})),c=function(e){var n=u.slice(0,e).join(" ");o(n,!0),s[n]||(s[n]={preventDefault:!0,commands:[function(e){var r=vr={view:e,prefix:n,scope:t};return setTimeout((function(){vr==r&&(vr=null)}),yr),!0}]})},l=1;l0&&void 0!==arguments[0]?arguments[0]:{};return[wr.of(t),_r,Er]}var xr=function(){function t(e,n,r,i,o){Object(h.a)(this,t),this.left=e,this.top=n,this.width=r,this.height=i,this.className=o}return Object(f.a)(t,[{key:"draw",value:function(){var t=document.createElement("div");return t.className=this.className,this.adjust(t),t}},{key:"adjust",value:function(t){t.style.left=this.left+"px",t.style.top=this.top+"px",this.width>=0&&(t.style.width=this.width+"px"),t.style.height=this.height+"px"}},{key:"eq",value:function(t){return this.left==t.left&&this.top==t.top&&this.width==t.width&&this.height==t.height&&this.className==t.className}}]),t}(),_r=Ut.fromClass(function(){function t(e){Object(h.a)(this,t),this.view=e,this.rangePieces=[],this.cursors=[],this.measureReq={read:this.readPos.bind(this),write:this.drawSel.bind(this)},this.selectionLayer=e.scrollDOM.appendChild(document.createElement("div")),this.selectionLayer.className="cm-selectionLayer",this.selectionLayer.setAttribute("aria-hidden","true"),this.cursorLayer=e.scrollDOM.appendChild(document.createElement("div")),this.cursorLayer.className="cm-cursorLayer",this.cursorLayer.setAttribute("aria-hidden","true"),e.requestMeasure(this.measureReq),this.setBlinkRate()}return Object(f.a)(t,[{key:"setBlinkRate",value:function(){this.cursorLayer.style.animationDuration=this.view.state.facet(wr).cursorBlinkRate+"ms"}},{key:"update",value:function(t){var e=t.startState.facet(wr)!=t.state.facet(wr);(e||t.selectionSet||t.geometryChanged||t.viewportChanged)&&this.view.requestMeasure(this.measureReq),t.transactions.some((function(t){return t.scrollIntoView}))&&(this.cursorLayer.style.animationName="cm-blink"==this.cursorLayer.style.animationName?"cm-blink2":"cm-blink"),e&&this.setBlinkRate()}},{key:"readPos",value:function(){var t,e=this,n=this.view.state,r=n.facet(wr),i=n.selection.ranges.map((function(t){return t.empty?[]:function(t,e){if(e.to<=t.viewport.from||e.from>=t.viewport.to)return[];var n=Math.max(e.from,t.viewport.from),r=Math.min(e.to,t.viewport.to),i=t.textDirection==ne.LTR,o=t.contentDOM,a=o.getBoundingClientRect(),s=Cr(t),u=window.getComputedStyle(o.firstChild),c=a.left+parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)),h=a.right-parseInt(u.paddingRight),f=Ar(t,n),d=Ar(t,r),p=f.type==yt.Text?f:null,g=d.type==yt.Text?d:null;t.lineWrapping&&(p&&(p=Tr(t,n,p)),g&&(g=Tr(t,r,g)));if(p&&g&&p.from==g.from)return O(w(e.from,e.to,p));var m=p?w(e.from,null,p):k(f,!1),v=g?w(null,e.to,g):k(d,!0),y=[];return(p||f).to<(g||d).from-1?y.push(b(c,m.bottom,h,v.top)):m.bottomd&&m.from=y)break;_>v&&u(Math.max(x,v),null==e&&x<=d,Math.min(_,y),null==n&&_>=p,k.dir)}}catch(S){w.e(S)}finally{w.f()}if((v=O.to+1)>=y)break}}}catch(S){g.e(S)}finally{g.f()}return 0==s.length&&u(d,null==e,p,null==n,t.textDirection),{top:o,bottom:a,horizontal:s}}function k(t,e){var n=a.top+(e?t.top:t.bottom);return{top:n,bottom:n,horizontal:[]}}}(e.view,t)})).reduce((function(t,e){return t.concat(e)})),o=[],a=Object(l.a)(n.selection.ranges);try{for(a.s();!(t=a.n()).done;){var s=t.value,u=s==n.selection.main;if(s.empty?!u||Or:r.drawRangeCursor){var c=Dr(this.view,s,u);c&&o.push(c)}}}catch(h){a.e(h)}finally{a.f()}return{rangePieces:i,cursors:o}}},{key:"drawSel",value:function(t){var e=this,n=t.rangePieces,r=t.cursors;if(n.length!=this.rangePieces.length||n.some((function(t,n){return!t.eq(e.rangePieces[n])}))){this.selectionLayer.textContent="";var i,o=Object(l.a)(n);try{for(o.s();!(i=o.n()).done;){var a=i.value;this.selectionLayer.appendChild(a.draw())}}catch(f){o.e(f)}finally{o.f()}this.rangePieces=n}if(r.length!=this.cursors.length||r.some((function(t,n){return!t.eq(e.cursors[n])}))){var s=this.cursorLayer.children;if(s.length!==r.length){this.cursorLayer.textContent="";var u,c=Object(l.a)(r);try{for(c.s();!(u=c.n()).done;){var h=u.value;this.cursorLayer.appendChild(h.draw())}}catch(f){c.e(f)}finally{c.f()}}else r.forEach((function(t,e){return t.adjust(s[e])}));this.cursors=r}}},{key:"destroy",value:function(){this.selectionLayer.remove(),this.cursorLayer.remove()}}]),t}()),Sr={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};Or&&(Sr[".cm-line"].caretColor="transparent !important");var Er=d.i.highest(tr.theme(Sr));function Cr(t){var e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==ne.LTR?e.left:e.right-t.scrollDOM.clientWidth)-t.scrollDOM.scrollLeft,top:e.top-t.scrollDOM.scrollTop}}function Tr(t,e,n){var r=d.e.cursor(e);return{from:Math.max(n.from,t.moveToLineBoundary(r,!1,!0).from),to:Math.min(n.to,t.moveToLineBoundary(r,!0,!0).from),type:yt.Text}}function Ar(t,e){var n=t.lineBlockAt(e);if(Array.isArray(n.type)){var r,i=Object(l.a)(n.type);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(o.to>e||o.to==e&&(o.to==n.to||o.type==yt.Text))return o}}catch(a){i.e(a)}finally{i.f()}}return n}function Dr(t,e,n){var r=t.coordsAtPos(e.head,e.assoc||1);if(!r)return null;var i=Cr(t);return new xr(r.left-i.left,r.top-i.top,-1,r.bottom-r.top,n?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary")}var Mr=d.j.define({map:function(t,e){return null==t?null:e.mapPos(t)}}),jr=d.k.define({create:function(){return null},update:function(t,e){return null!=t&&(t=e.changes.mapPos(t)),e.effects.reduce((function(t,e){return e.is(Mr)?e.value:t}),t)}}),Nr=Ut.fromClass(function(){function t(e){Object(h.a)(this,t),this.view=e,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}return Object(f.a)(t,[{key:"update",value:function(t){var e,n=t.state.field(jr);null==n?null!=this.cursor&&(null===(e=this.cursor)||void 0===e||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(jr)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}},{key:"readPos",value:function(){var t=this.view.state.field(jr),e=null!=t&&this.view.coordsAtPos(t);if(!e)return null;var n=this.view.scrollDOM.getBoundingClientRect();return{left:e.left-n.left+this.view.scrollDOM.scrollLeft,top:e.top-n.top+this.view.scrollDOM.scrollTop,height:e.bottom-e.top}}},{key:"drawCursor",value:function(t){this.cursor&&(t?(this.cursor.style.left=t.left+"px",this.cursor.style.top=t.top+"px",this.cursor.style.height=t.height+"px"):this.cursor.style.left="-100000px")}},{key:"destroy",value:function(){this.cursor&&this.cursor.remove()}},{key:"setDropPos",value:function(t){this.view.state.field(jr)!=t&&this.view.dispatch({effects:Mr.of(t)})}}]),t}(),{eventHandlers:{dragover:function(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave:function(t){t.target!=this.view.contentDOM&&this.view.contentDOM.contains(t.relatedTarget)||this.setDropPos(null)},dragend:function(){this.setDropPos(null)},drop:function(){this.setDropPos(null)}}});function Pr(){return[jr,Nr]}function Rr(t,e,n,r,i){e.lastIndex=0;for(var o,a=t.iterRange(n,r),s=n;!a.next().done;s+=a.value.length)if(!a.lineBreak)for(;o=e.exec(a.value);)i(s+o.index,s+o.index+o[0].length,o)}var Lr=function(){function t(e){Object(h.a)(this,t);var n=e.regexp,r=e.decoration,i=e.boundary,o=e.maxLength,a=void 0===o?1e3:o;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");this.regexp=n,this.getDeco="function"==typeof r?r:function(){return r},this.boundary=i,this.maxLength=a}return Object(f.a)(t,[{key:"createDeco",value:function(t){var e,n=this,r=new m.b,i=Object(l.a)(function(t,e){var n=t.visibleRanges;if(1==n.length&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;var r,i=[],o=Object(l.a)(n);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=a.from,u=a.to;s=Math.max(t.state.doc.lineAt(s).from,s-e),u=Math.min(t.state.doc.lineAt(u).to,u+e),i.length&&i[i.length-1].to>=s?i[i.length-1].to=u:i.push({from:s,to:u})}}catch(c){o.e(c)}finally{o.f()}return i}(t,this.maxLength));try{for(i.s();!(e=i.n()).done;){var o=e.value,a=o.from,s=o.to;Rr(t.state.doc,this.regexp,a,s,(function(e,i,o){return r.add(e,i,n.getDeco(o,t,e))}))}}catch(u){i.e(u)}finally{i.f()}return r.finish()}},{key:"updateDeco",value:function(t,e){var n=1e9,r=-1;return t.docChanged&&t.changes.iterChanges((function(e,i,o,a){a>t.view.viewport.from&&o1e3?this.createDeco(t.view):r>-1?this.updateRange(t.view,e.map(t.changes),n,r):e}},{key:"updateRange",value:function(t,e,n,r){var i,o=this,a=Object(l.a)(t.visibleRanges);try{for(a.s();!(i=a.n()).done;){var s=i.value,u=Math.max(s.from,n),c=Math.min(s.to,r);c>u&&function(){var n=t.state.doc.lineAt(u),r=n.ton.from;u--)if(o.boundary.test(n.text[u-1-n.from])){i=u;break}for(;ca},add:l})}()}}catch(h){a.e(h)}finally{a.f()}return e}}]),t}(),Fr=null!=/x/.unicode?"gu":"g",Br=new RegExp("[\0-\b\n-\x1f\x7f-\x9f\xad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\ufeff\ufff9-\ufffc]",Fr),Ir={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"},Qr=null;var $r=d.g.define({combine:function(t){var e=Object(d.m)(t,{render:null,specialChars:Br,addSpecialChars:null});return(e.replaceTabs=!function(){var t;if(null==Qr&&"undefined"!=typeof document&&document.body){var e=document.body.style;Qr=null!=(null!==(t=e.tabSize)&&void 0!==t?t:e.MozTabSize)}return Qr||!1}())&&(e.specialChars=new RegExp("\t|"+e.specialChars.source,Fr)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Fr)),e}});function zr(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[$r.of(t),Wr()]}var qr=null;function Wr(){return qr||(qr=Ut.fromClass(function(){function t(e){Object(h.a)(this,t),this.view=e,this.decorations=bt.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(e.state.facet($r)),this.decorations=this.decorator.createDeco(e)}return Object(f.a)(t,[{key:"makeDecorator",value:function(t){var e=this;return new Lr({regexp:t.specialChars,decoration:function(n,r,i){var o=r.state.doc,a=Object(p.b)(n[0],0);if(9==a){var s=o.lineAt(i),u=r.state.tabSize,c=Object(p.d)(s.text,u,i-s.from);return bt.replace({widget:new Yr((u-c%u)*e.view.defaultCharacterWidth)})}return e.decorationCache[a]||(e.decorationCache[a]=bt.replace({widget:new Vr(t,a)}))},boundary:t.replaceTabs?void 0:/[^]/})}},{key:"update",value:function(t){var e=t.state.facet($r);t.startState.facet($r)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}}]),t}(),{decorations:function(t){return t.decorations}}))}var Vr=function(t){Object(a.a)(n,t);var e=Object(s.a)(n);function n(t,r){var i;return Object(h.a)(this,n),(i=e.call(this)).options=t,i.code=r,i}return Object(f.a)(n,[{key:"eq",value:function(t){return t.code==this.code}},{key:"toDOM",value:function(t){var e,n=(e=this.code)>=32?"\u2022":10==e?"\u2424":String.fromCharCode(9216+e),r=t.state.phrase("Control character")+" "+(Ir[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,n);if(i)return i;var o=document.createElement("span");return o.textContent=n,o.title=r,o.setAttribute("aria-label",r),o.className="cm-specialChar",o}},{key:"ignoreEvent",value:function(){return!1}}]),n}(vt),Yr=function(t){Object(a.a)(n,t);var e=Object(s.a)(n);function n(t){var r;return Object(h.a)(this,n),(r=e.call(this)).width=t,r}return Object(f.a)(n,[{key:"eq",value:function(t){return t.width==this.width}},{key:"toDOM",value:function(){var t=document.createElement("span");return t.textContent="\t",t.className="cm-tab",t.style.width=this.width+"px",t}},{key:"ignoreEvent",value:function(){return!1}}]),n}(vt);function Ur(){return Xr}var Hr=bt.line({class:"cm-activeLine"}),Xr=Ut.fromClass(function(){function t(e){Object(h.a)(this,t),this.decorations=this.getDeco(e)}return Object(f.a)(t,[{key:"update",value:function(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}},{key:"getDeco",value:function(t){var e,n=-1,r=[],i=Object(l.a)(t.state.selection.ranges);try{for(i.s();!(e=i.n()).done;){var o=e.value;if(!o.empty)return bt.none;var a=t.lineBlockAt(o.head);a.from>n&&(r.push(Hr.range(a.from)),n=a.from)}}catch(s){i.e(s)}finally{i.f()}return bt.set(r)}}]),t}(),{decorations:function(t){return t.decorations}}),Gr=function(t){Object(a.a)(n,t);var e=Object(s.a)(n);function n(t){var r;return Object(h.a)(this,n),(r=e.call(this)).content=t,r}return Object(f.a)(n,[{key:"toDOM",value:function(){var t=document.createElement("span");return t.className="cm-placeholder",t.style.pointerEvents="none",t.appendChild("string"==typeof this.content?document.createTextNode(this.content):this.content),"string"==typeof this.content?t.setAttribute("aria-label","placeholder "+this.content):t.setAttribute("aria-hidden","true"),t}},{key:"ignoreEvent",value:function(){return!1}}]),n}(vt);function Zr(t){return Ut.fromClass(function(){function e(n){Object(h.a)(this,e),this.view=n,this.placeholder=bt.set([bt.widget({widget:new Gr(t),side:1}).range(0)])}return Object(f.a)(e,[{key:"decorations",get:function(){return this.view.state.doc.length?bt.none:this.placeholder}}]),e}(),{decorations:function(t){return t.decorations}})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return d})),n.d(e,"b",(function(){return k})),n.d(e,"c",(function(){return h})),n.d(e,"d",(function(){return E})),n.d(e,"e",(function(){return A})),n.d(e,"f",(function(){return a})),n.d(e,"g",(function(){return u})),n.d(e,"h",(function(){return c}));var r=n(7),i=n(24),o=Object.create(null),a=function(t,e,n){this.ranges=n||[new u(t.min(e),t.max(e))],this.$anchor=t,this.$head=e},s={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};s.anchor.get=function(){return this.$anchor.pos},s.head.get=function(){return this.$head.pos},s.from.get=function(){return this.$from.pos},s.to.get=function(){return this.$to.pos},s.$from.get=function(){return this.ranges[0].$from},s.$to.get=function(){return this.ranges[0].$to},s.empty.get=function(){for(var t=this.ranges,e=0;e=0;i--){var o=e<0?g(t.node(0),t.node(i),t.before(i+1),t.index(i),e,n):g(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,e,n);if(o)return o}},a.near=function(t,e){return void 0===e&&(e=1),this.findFrom(t,e)||this.findFrom(t,-e)||new d(t.node(0))},a.atStart=function(t){return g(t,t,0,0,1)||new d(t)},a.atEnd=function(t){return g(t,t,t.content.size,t.childCount,-1)||new d(t)},a.fromJSON=function(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=o[e.type];if(!n)throw new RangeError("No selection type "+e.type+" defined");return n.fromJSON(t,e)},a.jsonID=function(t,e){if(t in o)throw new RangeError("Duplicate use of selection JSON ID "+t);return o[t]=e,e.prototype.jsonID=t,e},a.prototype.getBookmark=function(){return c.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(a.prototype,s),a.prototype.visible=!0;var u=function(t,e){this.$from=t,this.$to=e},c=function(t){function e(e,n){void 0===n&&(n=e),t.call(this,e,n)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={$cursor:{configurable:!0}};return n.$cursor.get=function(){return this.$anchor.pos==this.$head.pos?this.$head:null},e.prototype.map=function(n,r){var i=n.resolve(r.map(this.head));if(!i.parent.inlineContent)return t.near(i);var o=n.resolve(r.map(this.anchor));return new e(o.parent.inlineContent?o:i,i)},e.prototype.replace=function(e,n){if(void 0===n&&(n=r.j.empty),t.prototype.replace.call(this,e,n),n==r.j.empty){var i=this.$from.marksAcross(this.$to);i&&e.ensureMarks(i)}},e.prototype.eq=function(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head},e.prototype.getBookmark=function(){return new l(this.anchor,this.head)},e.prototype.toJSON=function(){return{type:"text",anchor:this.anchor,head:this.head}},e.fromJSON=function(t,n){if("number"!=typeof n.anchor||"number"!=typeof n.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new e(t.resolve(n.anchor),t.resolve(n.head))},e.create=function(t,e,n){void 0===n&&(n=e);var r=t.resolve(e);return new this(r,n==e?r:t.resolve(n))},e.between=function(n,r,i){var o=n.pos-r.pos;if(i&&!o||(i=o>=0?1:-1),!r.parent.inlineContent){var a=t.findFrom(r,i,!0)||t.findFrom(r,-i,!0);if(!a)return t.near(r,i);r=a.$head}return n.parent.inlineContent||(0==o||(n=(t.findFrom(n,-i,!0)||t.findFrom(n,i,!0)).$anchor).pos0?0:1);i>0?a=0;a+=i){var s=e.child(a);if(s.isAtom){if(!o&&h.isSelectable(s))return h.create(t,n-(i<0?s.nodeSize:0))}else{var u=g(t,s,n+i,i<0?s.childCount:0,i,o);if(u)return u}n+=s.nodeSize*i}}function m(t,e,n){var r=t.steps.length-1;if(!(r0},e.prototype.setStoredMarks=function(t){return this.storedMarks=t,this.updated|=2,this},e.prototype.ensureMarks=function(t){return r.d.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this},e.prototype.addStoredMark=function(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))},e.prototype.removeStoredMark=function(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))},n.storedMarksSet.get=function(){return(2&this.updated)>0},e.prototype.addStep=function(e,n){t.prototype.addStep.call(this,e,n),this.updated=-3&this.updated,this.storedMarks=null},e.prototype.setTime=function(t){return this.time=t,this},e.prototype.replaceSelection=function(t){return this.selection.replace(this,t),this},e.prototype.replaceSelectionWith=function(t,e){var n=this.selection;return!1!==e&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.d.none))),n.replaceWith(this,t),this},e.prototype.deleteSelection=function(){return this.selection.replace(this),this},e.prototype.insertText=function(t,e,n){void 0===n&&(n=e);var r=this.doc.type.schema;if(null==e)return t?this.replaceSelectionWith(r.text(t),!0):this.deleteSelection();if(!t)return this.deleteRange(e,n);var i=this.storedMarks;if(!i){var o=this.doc.resolve(e);i=n==e?o.marks():o.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(e,n,r.text(t,i)),this.selection.empty||this.setSelection(a.near(this.selection.$to)),this},e.prototype.setMeta=function(t,e){return this.meta["string"==typeof t?t:t.key]=e,this},e.prototype.getMeta=function(t){return this.meta["string"==typeof t?t:t.key]},n.isGeneric.get=function(){for(var t in this.meta)return!1;return!0},e.prototype.scrollIntoView=function(){return this.updated|=4,this},n.scrolledIntoView.get=function(){return(4&this.updated)>0},Object.defineProperties(e.prototype,n),e}(i.f);function y(t,e){return e&&t?t.bind(e):t}var b=function(t,e,n){this.name=t,this.init=y(e.init,n),this.apply=y(e.apply,n)},O=[new b("doc",{init:function(t){return t.doc||t.schema.topNodeType.createAndFill()},apply:function(t){return t.doc}}),new b("selection",{init:function(t,e){return t.selection||a.atStart(e.doc)},apply:function(t){return t.selection}}),new b("storedMarks",{init:function(t){return t.storedMarks||null},apply:function(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new b("scrollToSelection",{init:function(){return 0},apply:function(t,e){return t.scrolledIntoView?e+1:e}})],w=function(t,e){var n=this;this.schema=t,this.fields=O.concat(),this.plugins=[],this.pluginsByKey=Object.create(null),e&&e.forEach((function(t){if(n.pluginsByKey[t.key])throw new RangeError("Adding different instances of a keyed plugin ("+t.key+")");n.plugins.push(t),n.pluginsByKey[t.key]=t,t.spec.state&&n.fields.push(new b(t.key,t.spec.state,t))}))},k=function(t){this.config=t},x={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};x.schema.get=function(){return this.config.schema},x.plugins.get=function(){return this.config.plugins},k.prototype.apply=function(t){return this.applyTransaction(t).state},k.prototype.filterTransaction=function(t,e){void 0===e&&(e=-1);for(var n=0;n-1&&_.splice(e,1)},Object.defineProperties(k.prototype,x);var _=[];function S(t,e,n){for(var r in t){var i=t[r];i instanceof Function?i=i.bind(e):"handleDOMEvents"==r&&(i=S(i,e,{})),n[r]=i}return n}var E=function(t){this.props={},t.props&&S(t.props,this,this.props),this.spec=t,this.key=t.key?t.key.key:T("plugin")};E.prototype.getState=function(t){return t[this.key]};var C=Object.create(null);function T(t){return t in C?t+"$"+ ++C[t]:(C[t]=0,t+"$")}var A=function(t){void 0===t&&(t="key"),this.key=T(t)};A.prototype.get=function(t){return t.config.pluginsByKey[this.key]},A.prototype.getState=function(t){return t[this.key]}},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(66);var i=n(76),o=n(47);function a(t){return function(t){if(Array.isArray(t))return Object(r.a)(t)}(t)||Object(i.a)(t)||Object(o.a)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(t,e,n){"use strict";n.d(e,"a",(function(){return b})),n.d(e,"b",(function(){return O})),n.d(e,"c",(function(){return y})),n.d(e,"d",(function(){return E})),n.d(e,"e",(function(){return C})),n.d(e,"f",(function(){return T})),n.d(e,"g",(function(){return w}));var r=n(22),i=n(28),o=n(83),a=n(11),s=n(1),u=n(2),c=n(17),l=n(18),h=n(58),f=n(16),d=n.n(f),p=n(5),g=n(40),m=n(33),v=function(t){return Object.prototype.hasOwnProperty.call(t,"origin")},y=function(t){Object(c.a)(n,t);var e=Object(l.a)(n);function n(){return Object(s.a)(this,n),e.apply(this,arguments)}return Object(u.a)(n,[{key:"findThenRun",value:function(t,e){var n=this.findIndex((function(e){return v(e)&&e.origin===t}));return n<0||e(n),this}},{key:"configure",value:function(t,e){var n=this;return this.findThenRun(t,(function(r){n.splice(r,1,t(e))}))}},{key:"replace",value:function(t,e){var n=this;return this.findThenRun(t,(function(t){n.splice(t,1,e)}))}},{key:"remove",value:function(t){var e=this;return this.findThenRun(t,(function(t){e.splice(t,1)}))}},{key:"headless",value:function(){var t=this;return this.filter(v).forEach((function(e){t.configure(e.origin,{headless:!0})})),this}}],[{key:"create",value:function(t){return Object(o.a)(n,Object(a.a)(t))}}]),n}(Object(h.a)(Array)),b=function(t){return function e(){return function(){var n=Object(i.a)(d.a.mark((function n(r){var i;return d.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,r.wait(p.e);case 2:i=t(r),r.update(p.r,(function(t){return[].concat(Object(a.a)(t),[i])})),e.plugin=i;case 5:case"end":return n.stop()}}),n)})));return function(t){return n.apply(this,arguments)}}()}},O=function(t){return function e(){return function(){var n=Object(i.a)(d.a.mark((function n(r){var i;return d.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,r.wait(p.d);case 2:i=t(r),r.update(p.s,(function(t){return[].concat(Object(a.a)(t),[i])})),e.plugin=i;case 5:case"end":return n.stop()}}),n)})));return function(t){return n.apply(this,arguments)}}()}},w=function(t,e,n){return[t,e,n]},k=function(t,e){try{var n=t.get(p.x),r=t.get(p.m);if(!r.css)throw Object(m.j)();return{getClassName:(i=null==e?void 0:e.className,function(t){for(var e,n=arguments.length,r=new Array(n>1?n-1:0),o=1;ot)return h[e-1]<=t;return!1}function p(t){return t>=127462&&t<=127487}function g(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return(n?m:v)(t,e)}function m(t,e){if(e==t.length)return e;e&&y(t.charCodeAt(e))&&b(t.charCodeAt(e-1))&&e--;var n=O(t,e);for(e+=k(n);e=0&&p(O(t,o));)i++,o-=2;if(i%2==0)break;e+=2}}return e}function v(t,e){for(;e>0;){var n=m(t,e-2);if(n=56320&&t<57344}function b(t){return t>=55296&&t<56320}function O(t,e){var n=t.charCodeAt(e);if(!b(n)||e+1==t.length)return n;var r=t.charCodeAt(e+1);return y(r)?r-56320+(n-55296<<10)+65536:n}function w(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function k(t){return t<65536?1:2}function x(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,r=0,i=0;i=e)return i;if(i==t.length)break;o+=9==t.charCodeAt(i)?n-o%n:1,i=g(t,i)}return!0===r?-1:t.length}var S=function(){function t(){Object(c.a)(this,t)}return Object(l.a)(t,[{key:"lineAt",value:function(t){if(t<0||t>this.length)throw new RangeError("Invalid position ".concat(t," in document of length ").concat(this.length));return this.lineInner(t,!1,1,0)}},{key:"line",value:function(t){if(t<1||t>this.lines)throw new RangeError("Invalid line number ".concat(t," in ").concat(this.lines,"-line document"));return this.lineInner(t,!0,1,0)}},{key:"replace",value:function(t,e,n){var r=[];return this.decompose(0,t,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(e,this.length,r,1),C.from(r,this.length-(e-t)+n.length)}},{key:"append",value:function(t){return this.replace(this.length,this.length,t)}},{key:"slice",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,n=[];return this.decompose(t,e,n,0),C.from(n,e-t)}},{key:"eq",value:function(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;for(var e=this.scanIdentical(t,1),n=this.length-this.scanIdentical(t,-1),r=new M(this),i=new M(t),o=e,a=e;;){if(r.next(o),i.next(o),o=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(a+=r.value.length,r.done||a>=n)return!0}}},{key:"iter",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return new M(this,t)}},{key:"iterRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length;return new j(this,t,e)}},{key:"iterLines",value:function(t,e){var n;if(null==t)n=this.iter();else{null==e&&(e=this.lines+1);var r=this.line(t).from;n=this.iterRange(r,Math.max(r,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new N(n)}},{key:"toString",value:function(){return this.sliceString(0)}},{key:"toJSON",value:function(){var t=[];return this.flatten(t),t}}],[{key:"of",value:function(e){if(0==e.length)throw new RangeError("A document must have at least one line");return 1!=e.length||e[0]?e.length<=32?new E(e):C.from(E.split(e,[])):t.empty}}]),t}(),E=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:T(t);return Object(c.a)(this,n),(r=e.call(this)).text=t,r.length=i,r}return Object(l.a)(n,[{key:"lines",get:function(){return this.text.length}},{key:"children",get:function(){return null}},{key:"lineInner",value:function(t,e,n,r){for(var i=0;;i++){var o=this.text[i],a=r+o.length;if((e?n:a)>=t)return new P(r,a,n,o);r=a+1,n++}}},{key:"decompose",value:function(t,e,r,i){var o=t<=0&&e>=this.length?this:new n(D(this.text,t,e),Math.min(e,this.length)-Math.max(0,t));if(1&i){var a=r.pop(),s=A(o.text,a.text.slice(),0,o.length);if(s.length<=32)r.push(new n(s,a.length+o.length));else{var u=s.length>>1;r.push(new n(s.slice(0,u)),new n(s.slice(u)))}}else r.push(o)}},{key:"replace",value:function(t,e,r){if(!(r instanceof n))return Object(o.a)(Object(a.a)(n.prototype),"replace",this).call(this,t,e,r);var i=A(this.text,A(r.text,D(this.text,0,t)),e),s=this.length+r.length-(e-t);return i.length<=32?new n(i,s):C.from(n.split(i,[]),s)}},{key:"sliceString",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n",r="",i=0,o=0;i<=e&&ot&&o&&(r+=n),ti&&(r+=a.slice(Math.max(0,t-i),e-i)),i=s+1}return r}},{key:"flatten",value:function(t){var e,n=Object(i.a)(this.text);try{for(n.s();!(e=n.n()).done;){var r=e.value;t.push(r)}}catch(o){n.e(o)}finally{n.f()}}},{key:"scanIdentical",value:function(){return 0}}],[{key:"split",value:function(t,e){var r,o=[],a=-1,s=Object(i.a)(t);try{for(s.s();!(r=s.n()).done;){var u=r.value;o.push(u),a+=u.length+1,32==o.length&&(e.push(new n(o,a)),o=[],a=-1)}}catch(c){s.e(c)}finally{s.f()}return a>-1&&e.push(new n(o,a)),e}}]),n}(S),C=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t,r){var o;Object(c.a)(this,n),(o=e.call(this)).children=t,o.length=r,o.lines=0;var a,s=Object(i.a)(t);try{for(s.s();!(a=s.n()).done;){var u=a.value;o.lines+=u.lines}}catch(l){s.e(l)}finally{s.f()}return o}return Object(l.a)(n,[{key:"lineInner",value:function(t,e,n,r){for(var i=0;;i++){var o=this.children[i],a=r+o.length,s=n+o.lines-1;if((e?s:a)>=t)return o.lineInner(t,e,n,r);r=a+1,n=s+1}}},{key:"decompose",value:function(t,e,n,r){for(var i=0,o=0;o<=e&&i=o){var u=r&((o<=t?1:0)|(s>=e?2:0));o>=t&&s<=e&&!u?n.push(a):a.decompose(t-o,e-o,n,u)}o=s+1}}},{key:"replace",value:function(t,e,r){if(r.lines=s&&e<=c){var l=u.replace(t-s,e-s,r),h=this.lines-u.lines+l.lines;if(l.lines>4&&l.lines>h>>6){var f=this.children.slice();return f[i]=l,new n(f,this.length-(e-t)+r.length)}return Object(o.a)(Object(a.a)(n.prototype),"replace",this).call(this,s,c,l)}s=c+1}return Object(o.a)(Object(a.a)(n.prototype),"replace",this).call(this,t,e,r)}},{key:"sliceString",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n",r="",i=0,o=0;it&&i&&(r+=n),to&&(r+=a.sliceString(t-o,e-o,n)),o=s+1}return r}},{key:"flatten",value:function(t){var e,n=Object(i.a)(this.children);try{for(n.s();!(e=n.n()).done;){e.value.flatten(t)}}catch(r){n.e(r)}finally{n.f()}}},{key:"scanIdentical",value:function(t,e){if(!(t instanceof n))return 0;for(var i=0,o=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1],a=Object(r.a)(o,4),s=a[0],u=a[1],c=a[2],l=a[3];;s+=e,u+=e){if(s==c||u==l)return i;var h=this.children[s],f=t.children[u];if(h!=f)return i+h.scanIdentical(f,e);i+=h.length+1}}}],[{key:"from",value:function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.reduce((function(t,e){return t+e.length+1}),-1),o=0,a=Object(i.a)(t);try{for(a.s();!(e=a.n()).done;){var s=e.value;o+=s.lines}}catch(_){a.e(_)}finally{a.f()}if(o<32){var u,c=[],l=Object(i.a)(t);try{for(l.s();!(u=l.n()).done;){var h=u.value;h.flatten(c)}}catch(_){l.e(_)}finally{l.f()}return new E(c,r)}var f=Math.max(32,o>>5),d=f<<1,p=f>>1,g=[],m=0,v=-1,y=[];function b(t){var e;if(t.lines>d&&t instanceof n){var r,o=Object(i.a)(t.children);try{for(o.s();!(r=o.n()).done;){b(r.value)}}catch(_){o.e(_)}finally{o.f()}}else t.lines>p&&(m>p||!m)?(O(),g.push(t)):t instanceof E&&m&&(e=y[y.length-1])instanceof E&&t.lines+e.lines<=32?(m+=t.lines,v+=t.length+1,y[y.length-1]=new E(e.text.concat(t.text),e.length+1+t.length)):(m+t.lines>f&&O(),m+=t.lines,v+=t.length+1,y.push(t))}function O(){0!=m&&(g.push(1==y.length?y[0]:n.from(y,v)),v=-1,m=y.length=0)}var w,k=Object(i.a)(t);try{for(k.s();!(w=k.n()).done;){var x=w.value;b(x)}}catch(_){k.e(_)}finally{k.f()}return O(),1==g.length?g[0]:new n(g,r)}}]),n}(S);function T(t){var e,n=-1,r=Object(i.a)(t);try{for(r.s();!(e=r.n()).done;){n+=e.value.length+1}}catch(o){r.e(o)}finally{r.f()}return n}function A(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e9,i=0,o=0,a=!0;o=n&&(u>r&&(s=s.slice(0,r-i)),i1&&void 0!==arguments[1]?arguments[1]:1;Object(c.a)(this,t),this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[n>0?1:(e instanceof E?e.text.length:e.children.length)<<1]}return Object(l.a)(t,[{key:"nextInner",value:function(t,e){for(this.done=this.lineBreak=!1;;){var n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],o=i>>1,a=r instanceof E?r.text.length:r.children.length;if(o==(e>0?a:0)){if(0==n)return this.done=!0,this.value="",this;e>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&i)==(e>0?0:1)){if(this.offsets[n]+=e,0==t)return this.lineBreak=!0,this.value="\n",this;t--}else if(r instanceof E){var s=r.text[o+(e<0?-1:0)];if(this.offsets[n]+=e,s.length>Math.max(0,t))return this.value=0==t?s:e>0?s.slice(t):s.slice(0,s.length-t),this;t-=s.length}else{var u=r.children[o+(e<0?-1:0)];t>u.length?(t-=u.length,this.offsets[n]+=e):(e<0&&this.offsets[n]--,this.nodes.push(u),this.offsets.push(e>0?1:(u instanceof E?u.text.length:u.children.length)<<1))}}}},{key:"next",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}]),t}(),j=function(){function t(e,n,r){Object(c.a)(this,t),this.value="",this.done=!1,this.cursor=new M(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}return Object(l.a)(t,[{key:"nextInner",value:function(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);var n=e<0?this.pos-this.from:this.to-this.pos;t>n&&(t=n),n-=t;var r=this.cursor.next(t).value;return this.pos+=(r.length+t)*e,this.value=r.length<=n?r:e<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}},{key:"next",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}},{key:"lineBreak",get:function(){return this.cursor.lineBreak&&""!=this.value}}]),t}(),N=function(){function t(e){Object(c.a)(this,t),this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}return Object(l.a)(t,[{key:"next",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=this.inner.next(t),n=e.done,r=e.lineBreak,i=e.value;return n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}},{key:"lineBreak",get:function(){return!1}}]),t}();"undefined"!=typeof Symbol&&(S.prototype[Symbol.iterator]=function(){return this.iter()},M.prototype[Symbol.iterator]=j.prototype[Symbol.iterator]=N.prototype[Symbol.iterator]=function(){return this});var P=function(){function t(e,n,r,i){Object(c.a)(this,t),this.from=e,this.to=n,this.number=r,this.text=i}return Object(l.a)(t,[{key:"length",get:function(){return this.to-this.from}}]),t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return N})),n.d(e,"b",(function(){return m})),n.d(e,"c",(function(){return p})),n.d(e,"d",(function(){return C})),n.d(e,"e",(function(){return E})),n.d(e,"f",(function(){return O})),n.d(e,"g",(function(){return q})),n.d(e,"h",(function(){return d})),n.d(e,"i",(function(){return Q})),n.d(e,"j",(function(){return z})),n.d(e,"k",(function(){return U})),n.d(e,"l",(function(){return Y})),n.d(e,"m",(function(){return H})),n.d(e,"n",(function(){return D})),n.d(e,"o",(function(){return j})),n.d(e,"p",(function(){return P})),n.d(e,"q",(function(){return W})),n.d(e,"r",(function(){return M})),n.d(e,"s",(function(){return A})),n.d(e,"t",(function(){return S})),n.d(e,"u",(function(){return f})),n.d(e,"v",(function(){return v}));var r=n(17),i=n(18),o=n(0),a=n(1),s=n(2),u=n(15),c=n(3),l=n(8),h=n(13),f=new u.b;function d(t){return c.g.define({combine:t?function(e){return e.concat(t)}:void 0})}var p=function(){function t(e,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];Object(a.a)(this,t),this.data=e,this.topNode=r,c.f.prototype.hasOwnProperty("tree")||Object.defineProperty(c.f.prototype,"tree",{get:function(){return v(this)}}),this.parser=n,this.extension=[S.of(this),c.f.languageData.of((function(t,e,n){return t.facet(g(t,e,n))}))].concat(i)}return Object(s.a)(t,[{key:"isActiveAt",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;return g(t,e,n)==this.data}},{key:"findRegions",value:function(t){var e=this,n=t.facet(S);if((null===n||void 0===n?void 0:n.data)==this.data)return[{from:0,to:t.doc.length}];if(!n||!n.allowsNesting)return[];var r=[];return function t(n,i){if(n.prop(f)!=e.data){var a=n.prop(u.b.mounted);if(a){if(a.tree.prop(f)==e.data){if(a.overlay){var s,c=Object(o.a)(a.overlay);try{for(c.s();!(s=c.n()).done;){var l=s.value;r.push({from:l.from+i,to:l.to+i})}}catch(g){c.e(g)}finally{c.f()}}else r.push({from:i,to:i+n.length});return}if(a.overlay){var h=r.length;if(t(a.tree,a.overlay[0].from+i),r.length>h)return}}for(var d=0;d0}}],[{key:"define",value:function(t){var e=d(t.languageData);return new n(e,t.parser.configure({props:[f.add((function(t){return t.isTop?e:void 0}))]}))}}]),n}(p);function v(t){var e=t.field(p.state,!1);return e?e.tree:u.f.empty}var y=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;Object(a.a)(this,t),this.doc=e,this.length=n,this.cursorPos=0,this.string="",this.cursor=e.iter()}return Object(s.a)(t,[{key:"syncTo",value:function(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}},{key:"chunk",value:function(t){return this.syncTo(t),this.string}},{key:"lineChunks",get:function(){return!0}},{key:"read",value:function(t,e){var n=this.cursorPos-this.string.length;return t=this.cursorPos?this.doc.sliceString(t,e):this.string.slice(t-n,e-n)}}]),t}(),b=null,O=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0,u=arguments.length>6?arguments[6]:void 0,c=arguments.length>7?arguments[7]:void 0;Object(a.a)(this,t),this.parser=e,this.state=n,this.fragments=r,this.tree=i,this.treeLen=o,this.viewport=s,this.skipped=u,this.scheduleOn=c,this.parse=null,this.tempSkipped=[]}return Object(s.a)(t,[{key:"startParse",value:function(){return this.parser.startParse(new y(this.state.doc),this.fragments)}},{key:"work",value:function(t,e){var n=this;return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=u.f.empty&&this.isDone(null!==e&&void 0!==e?e:this.state.doc.length)?(this.takeTree(),!0):this.withContext((function(){var r,i=Date.now()+t;for(n.parse||(n.parse=n.startParse()),null!=e&&(null==n.parse.stoppedAt||n.parse.stoppedAt>e)&&ei)return!1}}))}},{key:"takeTree",value:function(){var t,e,n=this;this.parse&&(t=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext((function(){for(;!(e=n.parse.advance()););})),this.treeLen=t,this.tree=e,this.fragments=this.withoutTempSkipped(u.g.addTree(this.tree,this.fragments,!0)),this.parse=null)}},{key:"withContext",value:function(t){var e=b;b=this;try{return t()}finally{b=e}}},{key:"withoutTempSkipped",value:function(t){for(var e;e=this.tempSkipped.pop();)t=w(t,e.from,e.to);return t}},{key:"changes",value:function(e,n){var r=this.fragments,i=this.tree,a=this.treeLen,s=this.viewport,c=this.skipped;if(this.takeTree(),!e.empty){var l=[];if(e.iterChangedRanges((function(t,e,n,r){return l.push({fromA:t,toA:e,fromB:n,toB:r})})),r=u.g.applyChanges(r,l),i=u.f.empty,a=0,s={from:e.mapPos(s.from,-1),to:e.mapPos(s.to,1)},this.skipped.length){c=[];var h,f=Object(o.a)(this.skipped);try{for(f.s();!(h=f.n()).done;){var d=h.value,p=e.mapPos(d.from,1),g=e.mapPos(d.to,-1);pt.from&&(this.fragments=w(this.fragments,i,o),this.skipped.splice(n--,1))}return!(this.skipped.length>=e)&&(this.reset(),!0)}},{key:"reset",value:function(){this.parse&&(this.takeTree(),this.parse=null)}},{key:"skipUntilInView",value:function(t,e){this.skipped.push({from:t,to:e})}},{key:"isDone",value:function(t){t=Math.min(t,this.state.doc.length);var e=this.fragments;return this.treeLen>=t&&e.length&&0==e[0].from&&e[0].to>=t}}],[{key:"getSkippingParser",value:function(t){return new(function(e){Object(r.a)(c,e);var n=Object(i.a)(c);function c(){return Object(a.a)(this,c),n.apply(this,arguments)}return Object(s.a)(c,[{key:"createParse",value:function(e,n,r){var i=r[0].from,a=r[r.length-1].to;return{parsedPos:i,advance:function(){var e=b;if(e){var n,s=Object(o.a)(r);try{for(s.s();!(n=s.n()).done;){var c=n.value;e.tempSkipped.push(c)}}catch(l){s.e(l)}finally{s.f()}t&&(e.scheduleOn=e.scheduleOn?Promise.all([e.scheduleOn,t]):t)}return this.parsedPos=a,new u.f(u.d.none,[],[],a-i)},stoppedAt:null,stopAt:function(){}}}}]),c}(u.e))}},{key:"get",value:function(){return b}}]),t}();function w(t,e,n){return u.g.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}var k=function(){function t(e){Object(a.a)(this,t),this.context=e,this.tree=e.tree}return Object(s.a)(t,[{key:"apply",value:function(e){if(!e.docChanged)return this;var n=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new t(n)}}],[{key:"init",value:function(e){var n=Math.min(3e3,e.doc.length),r=new O(e.facet(S).parser,e,[],u.f.empty,0,{from:0,to:n},[],null);return r.work(20,n)||r.takeTree(),new t(r)}}]),t}();p.state=c.k.define({create:k.init,update:function(t,e){var n,r=Object(o.a)(e.effects);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.is(p.setState))return i.value}}catch(a){r.e(a)}finally{r.f()}return e.startState.facet(S)!=e.state.facet(S)?k.init(e.state):t.apply(e)}});var x=function(t){var e=setTimeout((function(){return t()}),500);return function(){return clearTimeout(e)}};"undefined"!=typeof requestIdleCallback&&(x=function(t){var e=-1,n=setTimeout((function(){e=requestIdleCallback(t,{timeout:400})}),100);return function(){return e<0?clearTimeout(n):cancelIdleCallback(e)}});var _=l.f.fromClass(function(){function t(e){Object(a.a)(this,t),this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}return Object(s.a)(t,[{key:"update",value:function(t){var e=this.view.state.field(p.state).context;(e.updateViewport(t.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),t.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}},{key:"scheduleWork",value:function(){if(!this.working){var t=this.view.state,e=t.field(p.state);e.tree==e.context.tree&&e.context.isDone(t.doc.length)||(this.working=x(this.work))}}},{key:"work",value:function(t){this.working=null;var e=Date.now();if(this.chunkEndi+1e3,u=o.context.work(a,i+(s?0:1e5));this.chunkBudget-=Date.now()-e,(u||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:p.setState.of(new k(o.context))})),this.chunkBudget>0&&(!u||s)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}}}},{key:"checkAsyncSchedule",value:function(t){var e=this;t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then((function(){return e.scheduleWork()})).catch((function(t){return Object(l.m)(e.view.state,t)})).then((function(){return e.workScheduled--})),t.scheduleOn=null)}},{key:"destroy",value:function(){this.working&&this.working()}},{key:"isWorking",value:function(){return this.working||this.workScheduled>0}}]),t}(),{eventHandlers:{focus:function(){this.scheduleWork()}}}),S=c.g.define({combine:function(t){return t.length?t[0]:null},enables:[p.state,_]}),E=Object(s.a)((function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];Object(a.a)(this,t),this.language=e,this.support=n,this.extension=[e,n]})),C=function(){function t(e,n,r,i,o){var s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0;Object(a.a)(this,t),this.name=e,this.alias=n,this.extensions=r,this.filename=i,this.loadFunc=o,this.support=s,this.loading=null}return Object(s.a)(t,[{key:"load",value:function(){var t=this;return this.loading||(this.loading=this.loadFunc().then((function(e){return t.support=e}),(function(e){throw t.loading=null,e})))}}],[{key:"of",value:function(e){var n=e.load,r=e.support;if(!n){if(!r)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");n=function(){return Promise.resolve(r)}}return new t(e.name,(e.alias||[]).concat(e.name).map((function(t){return t.toLowerCase()})),e.extensions||[],e.filename,n,r)}},{key:"matchFilename",value:function(t,e){var n,r=Object(o.a)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.filename&&i.filename.test(e))return i}}catch(l){r.e(l)}finally{r.f()}var a=/\.([^.]+)$/.exec(e);if(a){var s,u=Object(o.a)(t);try{for(u.s();!(s=u.n()).done;){var c=s.value;if(c.extensions.indexOf(a[1])>-1)return c}}catch(l){u.e(l)}finally{u.f()}}return null}},{key:"matchLanguageName",value:function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e=e.toLowerCase();var r,i=Object(o.a)(t);try{for(i.s();!(r=i.n()).done;){var a=r.value;if(a.alias.some((function(t){return t==e})))return a}}catch(p){i.e(p)}finally{i.f()}if(n){var s,u=Object(o.a)(t);try{for(u.s();!(s=u.n()).done;){var c,l=s.value,h=Object(o.a)(l.alias);try{for(h.s();!(c=h.n()).done;){var f=c.value,d=e.indexOf(f);if(d>-1&&(f.length>2||!/\w/.test(e[d-1])&&!/\w/.test(e[d+f.length])))return l}}catch(p){h.e(p)}finally{h.f()}}}catch(p){u.e(p)}finally{u.f()}}return null}}]),t}(),T=c.g.define(),A=c.g.define({combine:function(t){if(!t.length)return" ";if(!/^(?: +|\t+)$/.test(t[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return t[0]}});function D(t){var e=t.facet(A);return 9==e.charCodeAt(0)?t.tabSize*e.length:e.length}function M(t,e){var n="",r=t.tabSize;if(9==t.facet(A).charCodeAt(0))for(;e>=r;)n+="\t",e-=r;for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:{};Object(a.a)(this,t),this.state=e,this.options=n,this.unit=D(e)}return Object(s.a)(t,[{key:"lineAt",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.state.doc.lineAt(t),r=this.options.simulateBreak;return null!=r&&r>=n.from&&r<=n.to?(e<0?r1&&void 0!==arguments[1]?arguments[1]:1;if(this.options.simulateDoubleBreak&&t==this.options.simulateBreak)return"";var n=this.lineAt(t,e),r=n.text,i=n.from;return r.slice(t-i,Math.min(r.length,t+100-i))}},{key:"column",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.lineAt(t,e),r=n.text,i=n.from,o=this.countColumn(r,t-i),a=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return a>-1&&(o+=a-this.countColumn(r,r.search(/\S|$/))),o}},{key:"countColumn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.length;return Object(h.d)(t,this.state.tabSize,e)}},{key:"lineIndent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.lineAt(t,e),r=n.text,i=n.from,o=this.options.overrideIndentation;if(o){var a=o(i);if(a>-1)return a}return this.countColumn(r,r.search(/\S|$/))}},{key:"simulatedBreak",get:function(){return this.options.simulateBreak||null}}]),t}(),P=new u.b;function R(t){var e=t.type.prop(P);if(e)return e;var n,r=t.firstChild;if(r&&(n=r.type.prop(u.b.closedBy))){var i=t.lastChild,o=i&&n.indexOf(i.name)>-1;return function(t){return $(t,!0,1,void 0,o&&!function(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}(t)?i.from:void 0)}}return null==t.parent?F:null}function L(t,e,n){for(;t;t=t.parent){var r=R(t);if(r)return r(new B(n,e,t))}return null}function F(){return 0}var B=function(t){Object(r.a)(n,t);var e=Object(i.a)(n);function n(t,r,i){var o;return Object(a.a)(this,n),(o=e.call(this,t.state,t.options)).base=t,o.pos=r,o.node=i,o}return Object(s.a)(n,[{key:"textAfter",get:function(){return this.textAfterPos(this.pos)}},{key:"baseIndent",get:function(){for(var t=this.state.doc.lineAt(this.node.from);;){for(var e=this.node.resolve(t.from);e.parent&&e.parent.from==e.from;)e=e.parent;if(I(e,this.node))break;t=this.state.doc.lineAt(e.from)}return this.lineIndent(t.from)}},{key:"continue",value:function(){var t=this.node.parent;return t?L(t,this.pos,this.base):0}}]),n}(N);function I(t,e){for(var n=e;n;n=n.parent)if(t==n)return!0;return!1}function Q(t){var e=t.closing,n=t.align,r=void 0===n||n,i=t.units,o=void 0===i?1:i;return function(t){return $(t,r,o,e)}}function $(t,e,n,r,i){var o=t.textAfter,a=o.match(/^\s*/)[0].length,s=r&&o.slice(a,a+r.length)==r||i==t.pos+a,u=e?function(t){var e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;for(var i=t.options.simulateBreak,o=t.state.doc.lineAt(n.from),a=null==i||i<=o.from?o.to:Math.min(o.to,i),s=n.to;;){var u=e.childAfter(s);if(!u||u==r)return null;if(!u.type.isSkipped)return u.from0&&void 0!==arguments[0]?arguments[0]:{},e=t.except,n=t.units,r=void 0===n?1:n;return function(t){var n=e&&e.test(t.textAfter);return t.baseIndent+(n?0:r*t.unit)}}function W(){return c.f.transactionFilter.of((function(t){if(!t.docChanged||!t.isUserEvent("input.type"))return t;var e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;var n=t.newDoc,r=t.newSelection.main.head,i=n.lineAt(r);if(r>i.from+200)return t;var a=n.sliceString(i.from,r);if(!e.some((function(t){return t.test(a)})))return t;var s,u=t.state,c=-1,l=[],h=Object(o.a)(u.selection.ranges);try{for(h.s();!(s=h.n()).done;){var f=s.value.head,d=u.doc.lineAt(f);if(d.from!=c){c=d.from;var p=j(u,d.from);if(null!=p){var g=/^\s*/.exec(d.text)[0],m=M(u,p);g!=m&&l.push({from:d.from,to:d.from+g.length,insert:m})}}}}catch(v){h.e(v)}finally{h.f()}return l.length?[t,{changes:l,sequential:!0}]:t}))}var V=c.g.define(),Y=new u.b;function U(t){var e=t.firstChild,n=t.lastChild;return e&&e.ton)){if(i&&o.from=e&&s.to>n&&(i=s)}}return i}(t,e,n)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return l})),n.d(e,"c",(function(){return p})),n.d(e,"d",(function(){return d})),n.d(e,"e",(function(){return P})),n.d(e,"f",(function(){return v})),n.d(e,"g",(function(){return N})),n.d(e,"h",(function(){return L}));var r=n(22),i=n(0),o=n(2),a=n(1),s=1024,u=0,c=Object(o.a)((function t(e,n){Object(a.a)(this,t),this.from=e,this.to=n})),l=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(a.a)(this,t),this.id=u++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||function(){throw new Error("This node type doesn't define a deserialize function")}}return Object(o.a)(t,[{key:"add",value:function(t){var e=this;if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof t&&(t=d.match(t)),function(n){var r=t(n);return void 0===r?null:[e,r]}}}]),t}();l.closedBy=new l({deserialize:function(t){return t.split(" ")}}),l.openedBy=new l({deserialize:function(t){return t.split(" ")}}),l.group=new l({deserialize:function(t){return t.split(" ")}}),l.contextHash=new l({perNode:!0}),l.lookAhead=new l({perNode:!0}),l.mounted=new l({perNode:!0});var h=Object(o.a)((function t(e,n,r){Object(a.a)(this,t),this.tree=e,this.overlay=n,this.parser=r})),f=Object.create(null),d=function(){function t(e,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;Object(a.a)(this,t),this.name=e,this.props=n,this.id=r,this.flags=i}return Object(o.a)(t,[{key:"prop",value:function(t){return this.props[t.id]}},{key:"isTop",get:function(){return(1&this.flags)>0}},{key:"isSkipped",get:function(){return(2&this.flags)>0}},{key:"isError",get:function(){return(4&this.flags)>0}},{key:"isAnonymous",get:function(){return(8&this.flags)>0}},{key:"is",value:function(t){if("string"==typeof t){if(this.name==t)return!0;var e=this.prop(l.group);return!!e&&e.indexOf(t)>-1}return this.id==t}}],[{key:"define",value:function(e){var n=e.props&&e.props.length?Object.create(null):f,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(null==e.name?8:0),o=new t(e.name||"",n,e.id,r);if(e.props){var a,s=Object(i.a)(e.props);try{for(s.s();!(a=s.n()).done;){var u=a.value;if(Array.isArray(u)||(u=u(o)),u){if(u[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[u[0].id]=u[1]}}}catch(c){s.e(c)}finally{s.f()}}return o}},{key:"match",value:function(t){var e=Object.create(null);for(var n in t){var r,o=Object(i.a)(n.split(" "));try{for(o.s();!(r=o.n()).done;){var a=r.value;e[a]=t[n]}}catch(s){o.e(s)}finally{o.f()}}return function(t){for(var n=t.prop(l.group),r=-1;r<(n?n.length:0);r++){var i=e[r<0?t.name:n[r]];if(i)return i}}}}]),t}();d.none=new d("",Object.create(null),0,8);var p=function(){function t(e){Object(a.a)(this,t),this.types=e;for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:0,n=null!=t&&g.get(this)||this.topNode,r=new C(n);return null!=t&&(r.moveTo(t,e),g.set(this,r._tree)),r}},{key:"fullCursor",value:function(){return new C(this.topNode,1)}},{key:"topNode",get:function(){return new x(this,0,0,null)}},{key:"resolve",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=k(g.get(this)||this.topNode,t,e,!1);return g.set(this,n),n}},{key:"resolveInner",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=k(m.get(this)||this.topNode,t,e,!0);return m.set(this,n),n}},{key:"iterate",value:function(t){for(var e=t.enter,n=t.leave,r=t.from,i=void 0===r?0:r,o=t.to,a=void 0===o?this.length:o,s=this.cursor(),u=function(){return s.node};;){var c=!1;if(s.from<=a&&s.to>=i&&(s.type.isAnonymous||!1!==e(s.type,s.from,s.to,u))){if(s.firstChild())continue;s.type.isAnonymous||(c=!0)}for(;c&&n&&n(s.type,s.from,s.to,u),c=s.type.isAnonymous,!s.nextSibling();){if(!s.parent())return;c=!0}}}},{key:"prop",value:function(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}},{key:"propValues",get:function(){var t=[];if(this.props)for(var e in this.props)t.push([+e,this.props[e]]);return t}},{key:"balance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.children.length<=8?this:j(d.none,this.children,this.positions,0,this.children.length,0,this.length,(function(n,r,i){return new t(e.type,n,r,i,e.propValues)}),n.makeTree||function(e,n,r){return new t(d.none,e,n,r)})}}],[{key:"build",value:function(t){return A(t)}}]),t}();v.empty=new v(d.none,[],[],0);var y=function(){function t(e,n){Object(a.a)(this,t),this.buffer=e,this.index=n}return Object(o.a)(t,[{key:"id",get:function(){return this.buffer[this.index-4]}},{key:"start",get:function(){return this.buffer[this.index-3]}},{key:"end",get:function(){return this.buffer[this.index-2]}},{key:"size",get:function(){return this.buffer[this.index-1]}},{key:"pos",get:function(){return this.index}},{key:"next",value:function(){this.index-=4}},{key:"fork",value:function(){return new t(this.buffer,this.index)}}]),t}(),b=function(){function t(e,n,r){Object(a.a)(this,t),this.buffer=e,this.length=n,this.set=r}return Object(o.a)(t,[{key:"type",get:function(){return d.none}},{key:"toString",value:function(){for(var t=[],e=0;e0));s=o[s+3]);return a}},{key:"slice",value:function(e,n,r,i){for(var o=this.buffer,a=new Uint16Array(n-e),s=e,u=0;s=e&&ne;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function w(t,e){for(var n=t.childBefore(e);n;){var r=n.lastChild;if(!r||r.to!=n.to)break;r.type.isError&&r.from==r.to?(t=n,n=r.prevSibling):n=r}return t}function k(t,e,n,r){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to4&&void 0!==arguments[4]?arguments[4]:0,a=this;;){for(var s=a.node,u=s.children,c=s.positions,h=n>0?u.length:-1;e!=h;e+=n){var f=u[e],d=c[e]+a._from;if(O(i,r,d,d+f.length))if(f instanceof b){if(2&o)continue;var p=f.findChild(0,f.buffer.length,n,r-d,i);if(p>-1)return new E(new S(a,f,e,d),null,p)}else if(1&o||!f.type.isAnonymous||T(f)){var g=void 0;if(!(1&o)&&f.props&&(g=f.prop(l.mounted))&&!g.overlay)return new t(g.tree,d,e,a);var m=new t(f,d,e,a);return 1&o||!m.type.isAnonymous?m:m.nextChild(n<0?f.children.length-1:0,n,r,i)}}if(1&o||!a.type.isAnonymous)return null;if(e=a.index>=0?a.index+n:n<0?-1:a._parent.node.children.length,!(a=a._parent))return null}}},{key:"firstChild",get:function(){return this.nextChild(0,1,0,4)}},{key:"lastChild",get:function(){return this.nextChild(this.node.children.length-1,-1,0,4)}},{key:"childAfter",value:function(t){return this.nextChild(0,1,t,2)}},{key:"childBefore",value:function(t){return this.nextChild(this.node.children.length-1,-1,t,-2)}},{key:"enter",value:function(e,n){var r,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(o&&(r=this.node.prop(l.mounted))&&r.overlay){var s,u=e-this.from,c=Object(i.a)(r.overlay);try{for(c.s();!(s=c.n()).done;){var h=s.value,f=h.from,d=h.to;if((n>0?f<=u:f=u:d>u))return new t(r.tree,r.overlay[0].from+this.from,-1,this)}}catch(p){c.e(p)}finally{c.f()}}return this.nextChild(0,1,e,n,a?0:2)}},{key:"nextSignificantParent",value:function(){for(var t=this;t.type.isAnonymous&&t._parent;)t=t._parent;return t}},{key:"parent",get:function(){return this._parent?this._parent.nextSignificantParent():null}},{key:"nextSibling",get:function(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}},{key:"prevSibling",get:function(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}},{key:"cursor",get:function(){return new C(this)}},{key:"tree",get:function(){return this.node}},{key:"toTree",value:function(){return this.node}},{key:"resolve",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return k(this,t,e,!1)}},{key:"resolveInner",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return k(this,t,e,!0)}},{key:"enterUnfinishedNodesBefore",value:function(t){return w(this,t)}},{key:"getChild",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=_(this,t,e,n);return r.length?r[0]:null}},{key:"getChildren",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return _(this,t,e,n)}},{key:"toString",value:function(){return this.node.toString()}}]),t}();function _(t,e,n,r){var i=t.cursor,o=[];if(!i.firstChild())return o;if(null!=n)for(;!i.type.is(n);)if(!i.nextSibling())return o;for(;;){if(null!=r&&i.type.is(r))return o;if(i.type.is(e)&&o.push(i.node),!i.nextSibling())return null==r?o:[]}}var S=Object(o.a)((function t(e,n,r,i){Object(a.a)(this,t),this.parent=e,this.buffer=n,this.index=r,this.start=i})),E=function(){function t(e,n,r){Object(a.a)(this,t),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}return Object(o.a)(t,[{key:"name",get:function(){return this.type.name}},{key:"from",get:function(){return this.context.start+this.context.buffer.buffer[this.index+1]}},{key:"to",get:function(){return this.context.start+this.context.buffer.buffer[this.index+2]}},{key:"child",value:function(e,n,r){var i=this.context.buffer,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return o<0?null:new t(this.context,this,o)}},{key:"firstChild",get:function(){return this.child(1,0,4)}},{key:"lastChild",get:function(){return this.child(-1,0,4)}},{key:"childAfter",value:function(t){return this.child(1,t,2)}},{key:"childBefore",value:function(t){return this.child(-1,t,-2)}},{key:"enter",value:function(e,n,r){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!i)return null;var o=this.context.buffer,a=o.findChild(this.index+4,o.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return a<0?null:new t(this.context,this,a)}},{key:"parent",get:function(){return this._parent||this.context.parent.nextSignificantParent()}},{key:"externalSibling",value:function(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}},{key:"nextSibling",get:function(){var e=this.context.buffer,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new t(this.context,this._parent,n):this.externalSibling(1)}},{key:"prevSibling",get:function(){var e=this.context.buffer,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new t(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}},{key:"cursor",get:function(){return new C(this)}},{key:"tree",get:function(){return null}},{key:"toTree",value:function(){var t=[],e=[],n=this.context.buffer,r=this.index+4,i=n.buffer[this.index+3];if(i>r){var o=n.buffer[this.index+1],a=n.buffer[this.index+2];t.push(n.slice(r,i,o,a)),e.push(0)}return new v(this.type,t,e,this.to-this.from)}},{key:"resolve",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return k(this,t,e,!1)}},{key:"resolveInner",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return k(this,t,e,!0)}},{key:"enterUnfinishedNodesBefore",value:function(t){return w(this,t)}},{key:"toString",value:function(){return this.context.buffer.childString(this.index)}},{key:"getChild",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=_(this,t,e,n);return r.length?r[0]:null}},{key:"getChildren",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return _(this,t,e,n)}}]),t}(),C=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(Object(a.a)(this,t),this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof x)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(var r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}return Object(o.a)(t,[{key:"name",get:function(){return this.type.name}},{key:"yieldNode",value:function(t){return!!t&&(this._tree=t,this.type=t.type,this.from=t.from,this.to=t.to,!0)}},{key:"yieldBuf",value:function(t,e){this.index=t;var n=this.buffer,r=n.start,i=n.buffer;return this.type=e||i.set.types[i.buffer[t]],this.from=r+i.buffer[t+1],this.to=r+i.buffer[t+2],!0}},{key:"yield",value:function(t){return!!t&&(t instanceof x?(this.buffer=null,this.yieldNode(t)):(this.buffer=t.context,this.yieldBuf(t.index,t.type)))}},{key:"toString",value:function(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}},{key:"enterChild",value:function(t,e,n){if(!this.buffer)return this.yield(this._tree.nextChild(t<0?this._tree.node.children.length-1:0,t,e,n,this.mode));var r=this.buffer.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],t,e-this.buffer.start,n);return!(i<0)&&(this.stack.push(this.index),this.yieldBuf(i))}},{key:"firstChild",value:function(){return this.enterChild(1,0,4)}},{key:"lastChild",value:function(){return this.enterChild(-1,0,4)}},{key:"childAfter",value:function(t){return this.enterChild(1,t,2)}},{key:"childBefore",value:function(t){return this.enterChild(-1,t,-2)}},{key:"enter",value:function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return this.buffer?!!r&&this.enterChild(1,t,e):this.yield(this._tree.enter(t,e,n&&!(1&this.mode),r))}},{key:"parent",value:function(){if(!this.buffer)return this.yieldNode(1&this.mode?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());var t=1&this.mode?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(t)}},{key:"sibling",value:function(t){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+t,t,0,4,this.mode));var e=this.buffer.buffer,n=this.stack.length-1;if(t<0){var r=n<0?0:this.stack[n]+4;if(this.index!=r)return this.yieldBuf(e.findChild(r,this.index,-1,0,4))}else{var i=e.buffer[this.index+3];if(i<(n<0?e.buffer.length:e.buffer[this.stack[n]+3]))return this.yieldBuf(i)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+t,t,0,4,this.mode))}},{key:"nextSibling",value:function(){return this.sibling(1)}},{key:"prevSibling",value:function(){return this.sibling(-1)}},{key:"atLastNode",value:function(t){var e,n,r=this.buffer;if(r){if(t>0){if(this.index-1)for(var s=e+t,u=t<0?-1:n.node.children.length;s!=u;s+=t){var c=n.node.children[s];if(1&this.mode||c instanceof b||!c.type.isAnonymous||T(c))return!1}}return!0}},{key:"move",value:function(t,e){if(e&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}},{key:"next",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.move(1,t)}},{key:"prev",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.move(-1,t)}},{key:"moveTo",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(this.from==this.to||(e<1?this.from>=t:this.from>t)||(e>-1?this.to<=t:this.to=0;){for(var o=t;o;o=o._parent)if(o.index==r){if(r==this.index)return o;e=o,n=i+1;break t}r=this.stack[--i]}for(var a=n;ac;){var l=n.size;if(n.id==e&&l>=0)u.size=r,u.start=i,u.skip=a,a+=4,r+=4,n.next();else{var d=n.pos-l;if(l<0||d=h?4:0,g=n.start;for(n.next();n.pos>d;){if(n.size<0){if(-3!=n.size)break t;p+=4}else n.id>=h&&(p+=4);n.next()}i=g,r+=l,a+=p}}(e<0||r==t)&&(u.size=r,u.start=i,u.skip=a);return u.size>4?u:void 0}(f.pos-e,a))){for(var D=new Uint16Array(C.size-C.skip),M=f.pos-C.size,N=D.length;f.pos>M;)N=k(C.start,D,N);E=new b(D,y-C.start,r),A=C.start-t}else{var P=f.pos-x;f.next();for(var R=[],L=[],F=s>=h?s:-1,B=0,I=y;f.pos>P;)F>=0&&f.id==F&&f.size>=0?(f.end<=I-o&&(O(R,L,c,B,f.end,I,F,_),B=R.length,I=f.end),f.next()):m(c,P,R,L,F);if(F>=0&&B>0&&B-1&&B>0){var Q=function(t){return function(e,n,r){var i,o,a=0,s=e.length-1;if(s>=0&&(i=e[s])instanceof v){if(!s&&i.type==t&&i.length==r)return i;(o=i.prop(l.lookAhead))&&(a=n[s]+i.length+o)}return w(t,e,n,r,a)}}(T);E=j(T,R,L,0,R.length,0,y-c,Q,Q)}else E=w(T,R,L,y-c,_-y)}n.push(E),i.push(A)}function O(t,e,n,i,o,a,s,u){for(var c=[],l=[];t.length>i;)c.push(t.pop()),l.push(e.pop()+n-o);t.push(w(r.types[s],c,l,a-o,u-a)),e.push(o-n)}function w(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5?arguments[5]:void 0;if(p){var a=[l.contextHash,p];o=o?[a].concat(o):[a]}if(i>25){var s=[l.lookAhead,i];o=o?[s].concat(o):[s]}return new v(t,e,n,r,o)}function k(t,e,n){var r=f.id,i=f.start,o=f.end,a=f.size;if(f.next(),a>=0&&r4)for(var u=f.pos-(a-4);f.pos>u;)n=k(t,e,n);e[--n]=s,e[--n]=o-t,e[--n]=i-t,e[--n]=r}else-3==a?p=r:-4==a&&(g=r);return n}for(var x=[],_=[];f.pos>0;)m(t.start||0,t.bufferStart||0,x,_,-1);var S=null!==(e=t.length)&&void 0!==e?e:x.length?_[0]+x[0].length:0;return new v(d[t.topID],x.reverse(),_.reverse(),S)}var D=new WeakMap;function M(t,e){if(!t.isAnonymous||e instanceof b||e.type!=t)return 1;var n=D.get(e);if(null==n){n=1;var r,o=Object(i.a)(e.children);try{for(o.s();!(r=o.n()).done;){var a=r.value;if(a.type!=t||!(a instanceof v)){n=1;break}n+=M(t,a)}}catch(s){o.e(s)}finally{o.f()}D.set(e,n)}return n}function j(t,e,n,r,i,o,a,s,u){for(var c=0,l=r;l=h)break;g+=m}if(c==l+1){if(g>h){var v=n[l];e(v.children,v.positions,0,v.children.length,r[l]+s);continue}f.push(n[l])}else{var y=r[c-1]+n[c-1].length-p;f.push(j(t,n,r,l,c,p,y,null,u))}d.push(p+s-o)}}(e,n,r,i,0),(s||u)(f,d,a)}var N=function(){function t(e,n,r,i){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];Object(a.a)(this,t),this.from=e,this.to=n,this.tree=r,this.offset=i,this.open=(o?1:0)|(s?2:0)}return Object(o.a)(t,[{key:"openStart",get:function(){return(1&this.open)>0}},{key:"openEnd",get:function(){return(2&this.open)>0}}],[{key:"addTree",value:function(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=[new t(0,e.length,e,0,!1,o)],s=Object(i.a)(r);try{for(s.s();!(n=s.n()).done;){var u=n.value;u.to>e.length&&a.push(u)}}catch(c){s.e(c)}finally{s.f()}return a}},{key:"applyChanges",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:128;if(!n.length)return e;for(var i=[],o=1,a=e.length?e[0]:null,s=0,u=0,c=0;;s++){var l=s=r)for(;a&&a.from=f.from||h<=f.to||c){var d=Math.max(f.from,u)-c,p=Math.min(f.to,h)-c;f=d>=p?null:new t(d,p,f.tree,f.offset+c,s>0,!!l)}if(f&&i.push(f),a.to>h)break;a=o=r.to&&t.mount.overlay}));if(l){var h,f=Object(i.a)(l.mount.overlay);try{for(f.s();!(h=f.n()).done;){var d=h.value,p=d.from+l.pos,g=d.to+l.pos;p>=r.from&&g<=r.to&&e.ranges.push({from:p,to:g})}}catch(b){f.e(b)}finally{f.f()}}}s=!1}else if(n&&(a=$(n.ranges,r.from,r.to)))s=2!=a;else if(!r.type.isAnonymous&&r.from=n)break;if(a.to>e)return a.from<=e&&a.to>=n?2:1}}catch(s){o.e(s)}finally{o.f()}return 0}function z(t,e,n,r,i,o){if(e=e.to);r++);var a=i.children[r],s=a.buffer;i.children[r]=function t(n,r,i,u,c){for(var l=n;s[l+2]+o<=e.from;)l=s[l+3];var h=[],f=[];z(a,n,l,h,f,u);var d=s[l+1],p=s[l+2],g=d+o==e.from&&p+o==e.to&&s[l]==e.type.id;return h.push(g?e.toTree():t(l+4,s[l+3],a.set.types[s[l]],d,p-d)),f.push(d-u),z(a,s[l+3],r,h,f,u),new v(i,h,f,c)}(0,s.length,d.none,0,a.length);for(var u=0;u<=n;u++)t.childAfter(e.from)}var W=function(){function t(e,n){Object(a.a)(this,t),this.offset=n,this.done=!1,this.cursor=e.fullCursor()}return Object(o.a)(t,[{key:"moveTo",value:function(t){for(var e=this.cursor,n=t-this.offset;!this.done&&e.from=t&&e.enter(n,1,!1,!1)||e.next(!1)||(this.done=!0)}},{key:"hasNode",value:function(t){if(this.moveTo(t.from),!this.done&&this.cursor.from+this.offset==t.from&&this.cursor.tree)for(var e=this.cursor.tree;;){if(e==t.tree)return!0;if(!(e.children.length&&0==e.positions[0]&&e.children[0]instanceof v))break;e=e.children[0]}return!1}}]),t}(),V=function(){function t(e){var n;if(Object(a.a)(this,t),this.fragments=e,this.curTo=0,this.fragI=0,e.length){var r=this.curFrag=e[0];this.curTo=null!==(n=r.tree.prop(I))&&void 0!==n?n:r.to,this.inner=new W(r.tree,-r.offset)}else this.curFrag=this.inner=null}return Object(o.a)(t,[{key:"hasNode",value:function(t){for(;this.curFrag&&t.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=t.from&&this.curTo>=t.to&&this.inner.hasNode(t)}},{key:"nextFrag",value:function(){var t;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{var e=this.curFrag=this.fragments[this.fragI];this.curTo=null!==(t=e.tree.prop(I))&&void 0!==t?t:e.to,this.inner=new W(e.tree,-e.offset)}}},{key:"findMounts",value:function(t,e){var n,r=[];if(this.inner){this.inner.cursor.moveTo(t,1);for(var i=this.inner.cursor.node;i;i=i.parent){var o=null===(n=i.tree)||void 0===n?void 0:n.prop(l.mounted);if(o&&o.parser==e)for(var a=this.fragI;a=i.to)break;s.tree==this.curFrag.tree&&r.push({frag:s,pos:i.from-s.offset,mount:o})}}}return r}}]),t}();function Y(t,e){for(var n=null,r=e,i=1,o=0;i=s)break;u.to<=a||(n||(r=n=e.slice()),u.froms&&n.splice(o+1,0,new c(s,u.to))):u.to>s?n[o--]=new c(s,u.to):n.splice(o--,1))}return r}function U(t,e){var n,r=[],o=Object(i.a)(t);try{var a=function(){var t=n.value,i=t.pos,o=t.mount,a=t.frag,s=i+(o.overlay?o.overlay[0].from:0),u=s+o.tree.length,l=Math.max(a.from,s),h=Math.min(a.to,u);if(o.overlay)for(var f=o.overlay.map((function(t){return new c(t.from+i,t.to+i)})),d=function(t,e,n,r){for(var i=0,o=0,a=!1,s=!1,u=-1e9,l=[];;){var h=i==t.length?1e9:a?t[i].to:t[i].from,f=o==e.length?1e9:s?e[o].to:e[o].from;if(a!=s){var d=Math.max(u,n),p=Math.min(h,f,r);dg&&r.push(new N(g,v,o.tree,-s,a.from>=g,a.to<=v)),m)break;g=d[p].to}else r.push(new N(l,h,o.tree,-s,a.from>=s,a.to<=u))};for(o.s();!(n=o.n()).done;)a()}catch(s){o.e(s)}finally{o.f()}return r}},function(t,e,n){t.exports=n(118)},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(48);function i(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");Object.defineProperty(t,"prototype",{value:Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),writable:!1}),e&&Object(r.a)(t,e)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(32),i=n(77),o=n(78);function a(t){var e=Object(i.a)();return function(){var n,i=Object(r.a)(t);if(e){var a=Object(r.a)(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return Object(o.a)(this,n)}}},function(t,e,n){"use strict";function r(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";t.exports=n(120)},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(6);function i(t,e,n,i){var o=i?i-1:Number.POSITIVE_INFINITY,a=0;return function(i){if(Object(r.j)(i))return t.enter(n),s(i);return e(i)};function s(i){return Object(r.j)(i)&&a++]+)>/g,(function(t,e){return"$"+o[e]})))}if("function"==typeof i){var s=this;return t[Symbol.replace].call(this,n,(function(){var t=arguments;return"object"!=a()(t[t.length-1])&&(t=[].slice.call(t)).push(r(t,s)),i.apply(this,t)}))}return t[Symbol.replace].call(this,n,i)},c.apply(this,arguments)}var l,h,f,d,p,g,m,v,y,b,O,w,k,x,_,S,E,C=n(10),T=n(19),A=n(0),D=n(12),M=n(5),j=n(26),N=n(73),P=n(9),R=n(54),L=n(24),F=n(74),B=n(50),I=n(64),Q=n(53),$={}.hasOwnProperty;function z(t){var e,n,r,i,o=Object.create(null);if(!t||!t.type)throw new Error("mdast-util-definitions expected node");return e=t,r=function(t){var e=q(t.identifier);e&&!$.call(o,e)&&(o[e]=t)},"function"===typeof(n="definition")&&"function"!==typeof r&&(i=r,r=n,n=null),Object(Q.a)(e,n,(function(t,e){var n=e[e.length-1];return r(t,n?n.children.indexOf(t):null,n)}),i),function(t){var e=q(t);return e&&$.call(o,e)?o[e]:null}}function q(t){return String(t||"").toUpperCase()}function W(){return function(t){var e=z(t);Object(B.a)(t,(function(t,n,r){if("definition"===t.type&&null!==r&&"number"===typeof n)return r.children.splice(n,1),[I.b,n];if("imageReference"===t.type||"linkReference"===t.type){var i=e(t.identifier);if(i&&null!==r&&"number"===typeof n){var o="imageReference"===t.type?{type:"image",url:i.url,title:i.title,alt:t.alt}:{type:"link",url:i.url,title:i.title,children:t.children};return r.children[n]=o,[I.b,n]}}}))}}var V=Object.defineProperty,Y=Object.defineProperties,U=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertySymbols,X=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable,Z=function(t,e,n){return e in t?V(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n},K=function(t,e){for(var n in e||(e={}))X.call(e,n)&&Z(t,n,e[n]);if(H){var r,i=Object(A.a)(H(e));try{for(i.s();!(r=i.n()).done;){n=r.value;G.call(e,n)&&Z(t,n,e[n])}}catch(o){i.e(o)}finally{i.f()}}return t},J=function(t,e){return Y(t,U(e))},tt={HardBreak:"HardBreak",Blockquote:"Blockquote",BulletList:"BulletList",OrderedList:"OrderedList",CodeFence:"CodeFence",H1:"H1",H2:"H2",H3:"H3",H4:"H4",H5:"H5",H6:"H6",Text:"Text",CodeInline:"CodeInline",Em:"Em",Bold:"Bold",NextListItem:"NextListItem",SinkListItem:"SinkListItem",LiftListItem:"LiftListItem"},et="code_inline",nt=Object(M.i)("ToggleInlineCode"),rt=Object(D.d)((function(t){var e=t.getStyle((function(t,e){var n=t.palette,r=t.size,i=t.font;return(0,e.css)(l||(l=Object(T.a)(["\n background-color: ",";\n color: ",";\n border-radius: ",";\n font-weight: 500;\n font-family: ",";\n padding: 0 0.2rem;\n "])),n("neutral"),n("background"),r.radius,i.code)}));return{id:et,schema:function(){return{priority:100,code:!0,inclusive:!1,parseDOM:[{tag:"code"}],toDOM:function(n){return["code",{class:t.getClassName(n.attrs,"code-inline",e)}]},parseMarkdown:{match:function(t){return"inlineCode"===t.type},runner:function(t,e,n){t.openMark(n),t.addText(e.value),t.closeMark(n)}},toMarkdown:{match:function(t){return t.type.name===et},runner:function(t,e,n){t.withMark(e,"inlineCode",n.text||"")}}}},inputRules:function(t){return[Object(j.h)(/(?:^|[^`])(`([^`]+)`)$/,t)]},commands:function(t){return[Object(M.h)(nt,(function(){return Object(N.e)(t)}))]},shortcuts:Object(C.a)({},tt.CodeInline,Object(D.g)(nt,"Mod-e"))}})),it="em",ot=Object(M.i)("ToggleItalic"),at=Object(D.d)((function(t){return{id:it,schema:function(){return{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style",getAttrs:function(t){return"italic"===t}}],toDOM:function(e){return["em",{class:t.getClassName(e.attrs,it)}]},parseMarkdown:{match:function(t){return"emphasis"===t.type},runner:function(t,e,n){t.openMark(n),t.next(e.children),t.closeMark(n)}},toMarkdown:{match:function(t){return t.type.name===it},runner:function(t,e){t.withMark(e,"emphasis")}}}},inputRules:function(t){return[Object(j.h)(/(?:^|[^_])(_([^_]+)_)$/,t),Object(j.h)(/(?:^|[^*])(\*([^*]+)\*)$/,t)]},commands:function(t){return[Object(M.h)(ot,(function(){return Object(N.e)(t)}))]},shortcuts:Object(C.a)({},tt.Em,Object(D.g)(ot,"Mod-i"))}})),st=Object(M.i)("ToggleLink"),ut=Object(M.i)("ModifyLink"),ct="link",lt=Object(D.d)((function(t){var e=t.getStyle((function(t,e){var n=e.css,r=t.palette("line");return n(h||(h=Object(T.a)(["\n color: ",";\n cursor: pointer;\n transition: all 0.4s ease-in-out;\n font-weight: 500;\n &:hover {\n background-color: ",";\n box-shadow: 0 0.2rem ",", 0 -0.2rem ",";\n }\n "])),t.palette("secondary"),r,r,r)}));return{id:ct,schema:function(){return{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:function(t){if(!(t instanceof HTMLElement))throw new Error;return{href:t.getAttribute("href"),title:t.getAttribute("title")}}}],toDOM:function(n){return["a",J(K({},n.attrs),{class:t.getClassName(n.attrs,ct,e)})]},parseMarkdown:{match:function(t){return"link"===t.type},runner:function(t,e,n){var r=e.url,i=e.title;t.openMark(n,{href:r,title:i}),t.next(e.children),t.closeMark(n)}},toMarkdown:{match:function(t){return t.type.name===ct},runner:function(t,e){t.withMark(e,"link",void 0,{title:e.attrs.title,url:e.attrs.href})}}}},commands:function(t){return[Object(M.h)(st,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Object(N.e)(t,{href:e})})),Object(M.h)(ut,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return function(n,r){if(!r)return!1;var i,o=n.schema.marks,a=-1,s=n.selection;if(n.doc.nodesBetween(s.from,s.to,(function(t,e){if(o.link.isInSet(t.marks))return i=t,a=e,!1})),!i)return!1;var u=i.marks.find((function(e){return e.type===t}));if(!u)return!1;var c=a,l=a+i.nodeSize,h=n.tr,f=o.link.create(J(K({},u.attrs),{href:e}));return r(h.removeMark(c,l,u).addMark(c,l,f).setSelection(new P.h(h.selection.$anchor)).scrollIntoView()),!0}}))]},inputRules:function(t,e){return[new R.a(c(/\[(.*?)\]\((.*?)(?=\u201C|\))"?((?:(?!")[\s\S])+)?"?\)/,{text:1,href:2,title:3}),(function(n,r,o,a){var s=Object(i.a)(r,4),u=s[0],c=s[1],l=void 0===c?"":c,h=s[2],f=s[3],d=n.tr;if(u){var p=l||"link";d.replaceWith(o,a,e.get(M.u).text(p)).addMark(o,p.length+o,t.create({title:f,href:h}))}return d}))]}}})),ht="strong",ft=Object(M.i)("ToggleBold"),dt=Object(D.d)((function(t){var e=t.getStyle((function(t,e){return(0,e.css)(f||(f=Object(T.a)(["\n font-weight: 600;\n "])))}));return{id:ht,schema:function(){return{parseDOM:[{tag:"b"},{tag:"strong"},{style:"font-style",getAttrs:function(t){return"bold"===t}}],toDOM:function(n){return["strong",{class:t.getClassName(n.attrs,ht,e)}]},parseMarkdown:{match:function(t){return"strong"===t.type},runner:function(t,e,n){t.openMark(n),t.next(e.children),t.closeMark(n)}},toMarkdown:{match:function(t){return t.type.name===ht},runner:function(t,e){t.withMark(e,"strong")}}}},inputRules:function(t){return[Object(j.h)(/(?:__)([^_]+)(?:__)$/,t),Object(j.h)(/(?:\*\*)([^*]+)(?:\*\*)$/,t)]},commands:function(t){return[Object(M.h)(ft,(function(){return Object(N.e)(t)}))]},shortcuts:Object(C.a)({},tt.Bold,Object(D.g)(ft,"Mod-b"))}})),pt=[rt(),at(),dt(),lt()],gt="blockquote",mt=Object(M.i)("WrapInBlockquote"),vt=Object(D.e)((function(t){var e=t.getStyle((function(t,e){return(0,e.css)(d||(d=Object(T.a)(["\n padding-left: 1.875rem;\n line-height: 1.75rem;\n border-left: 4px solid ",";\n * {\n font-size: 1rem;\n line-height: 1.5rem;\n }\n "])),t.palette("primary"))}));return{id:gt,schema:function(){return{content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:function(n){return["blockquote",{class:t.getClassName(n.attrs,gt,e)},0]},parseMarkdown:{match:function(t){return t.type===gt},runner:function(t,e,n){t.openNode(n).next(e.children).closeNode()}},toMarkdown:{match:function(t){return t.type.name===gt},runner:function(t,e){t.openNode("blockquote").next(e.content).closeNode()}}}},inputRules:function(t){return[Object(R.d)(/^\s*>\s$/,t)]},commands:function(t){return[Object(M.h)(mt,(function(){return Object(N.f)(t)}))]},shortcuts:Object(C.a)({},tt.Blockquote,Object(D.g)(mt,"Mod-Shift-b"))}})),yt=Object(M.i)("WrapInBulletList"),bt=Object(D.e)((function(t){var e="bullet_list";return{id:e,schema:function(){return{content:"listItem+",group:"block",parseDOM:[{tag:"ul"}],toDOM:function(e){return["ul",{class:t.getClassName(e.attrs,"bullet-list")},0]},parseMarkdown:{match:function(t){var e=t.type,n=t.ordered;return"list"===e&&!n},runner:function(t,e,n){t.openNode(n).next(e.children).closeNode()}},toMarkdown:{match:function(t){return t.type.name===e},runner:function(t,e){t.openNode("list",void 0,{ordered:!1}).next(e.content).closeNode()}}}},inputRules:function(t){return[Object(R.d)(/^\s*([-+*])\s$/,t)]},commands:function(t){return[Object(M.h)(yt,(function(){return Object(N.f)(t)}))]},shortcuts:Object(C.a)({},tt.BulletList,Object(D.g)(yt,"Mod-Alt-8"))}})),Ot=["","javascript","typescript","bash","sql","json","html","css","c","cpp","java","ruby","python","go","rust","markdown"],wt=c(/^```([a-z]*)?[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]$/,{language:1}),kt=c(/^~~~([a-z]*)?[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]$/,{language:1}),xt=Object(M.i)("TurnIntoCodeFence"),_t="fence",St=Object(D.e)((function(t,e){var n=t.getStyle((function(t,e){var n=t.palette,r=t.mixin,i=t.size,o=t.font,a=e.css,s=r.shadow,u=r.scrollbar,c=r.border,l=i.lineWidth,h=i.radius;return a(p||(p=Object(T.a)(["\n background-color: ",";\n color: ",";\n font-size: 0.85rem;\n padding: 1.2rem 0.4rem 1.4rem;\n border-radius: ",";\n font-family: ",";\n\n * {\n margin: 0;\n }\n\n .code-fence_select-wrapper {\n position: relative;\n }\n\n .code-fence_value {\n width: 10.25rem;\n box-sizing: border-box;\n border-radius: ",";\n margin: 0 1.2rem 1.2rem;\n ",";\n ",";\n cursor: pointer;\n background-color: ",";\n position: relative;\n display: flex;\n color: ",";\n letter-spacing: 0.5px;\n height: 2.625rem;\n align-items: center;\n\n & > .icon {\n width: 2.625rem;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n color: ",";\n border-left: "," solid ",";\n\n text-align: center;\n transition: all 0.2s ease-in-out;\n &:hover {\n background: ",";\n color: ",";\n }\n }\n\n > span:first-child {\n padding-left: 1rem;\n flex: 1;\n font-weight: 500;\n }\n }\n\n .code-fence_select-option {\n list-style: none;\n line-height: 2rem;\n padding-left: 1rem;\n cursor: pointer;\n :hover {\n background: ",";\n color: ",";\n }\n }\n\n .code-fence_select {\n &[data-fold='true'] {\n display: none;\n }\n\n font-weight: 500;\n position: absolute;\n z-index: 1;\n top: 2.625rem;\n box-sizing: border-box;\n left: 1.2rem;\n padding: 0.5rem 0;\n max-height: 16.75rem;\n width: 10.25rem;\n ",";\n ",";\n background-color: ",";\n border-top: none;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n\n ","\n }\n\n code {\n line-height: 1.5;\n font-family: ",";\n }\n\n pre {\n font-family: ",";\n margin: 0 1.2rem !important;\n white-space: pre;\n overflow: auto;\n ",";\n }\n "])),n("background"),n("neutral"),h,o.typography,i.radius,c(),s(),n("surface"),n("neutral",.87),n("solid",.87),l,n("line"),n("background"),n("primary"),n("secondary",.12),n("primary"),c(),s(),n("surface"),u("y"),o.code,o.code,u("x"))}));return{id:_t,schema:function(){return{content:"text*",group:"block",marks:"",defining:!0,code:!0,attrs:{language:{default:""},fold:{default:!0}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:function(t){if(!(t instanceof HTMLElement))throw new Error("Parse DOM error.");return{language:t.dataset.language}}}],toDOM:function(e){return["pre",{"data-language":e.attrs.language,class:t.getClassName(e.attrs,"code-fence",n)},["code",{spellCheck:"false"},0]]},parseMarkdown:{match:function(t){return"code"===t.type},runner:function(t,e,n){var r=e.lang,i=e.value;t.openNode(n,{language:r}),i&&t.addText(i),t.closeNode()}},toMarkdown:{match:function(t){return t.type.name===_t},runner:function(t,e){var n;t.addNode("code",void 0,(null==(n=e.content.firstChild)?void 0:n.text)||"",{lang:e.attrs.language})}}}},inputRules:function(t){return[Object(R.c)(wt,t,(function(t){var e=Object(i.a)(t,2),n=e[0],r=e[1];if(n)return{language:r}})),Object(R.c)(kt,t,(function(t){var e=Object(i.a)(t,2),n=e[0],r=e[1];if(n)return{language:r}}))]},commands:function(t){return[Object(M.h)(xt,(function(){return Object(N.d)(t)}))]},shortcuts:Object(C.a)({},tt.CodeFence,Object(D.g)(xt,"Mod-Alt-c")),view:function(r){return function(i,o,a){var s=document.createElement("div"),u=document.createElement("div"),c=document.createElement("ul"),l=document.createElement("pre"),h=document.createElement("code"),f=document.createElement("div");f.className="code-fence_value";var d=document.createElement("span");f.appendChild(d),o.editable&&f.appendChild(r.get(M.x).slots.icon("downArrow")),c.className="code-fence_select",c.addEventListener("mousedown",(function(t){if(t.preventDefault(),t.stopPropagation(),o.editable){var e=t.target;if(e instanceof HTMLLIElement){var n=o.state.tr;o.dispatch(n.setNodeMarkup(a(),void 0,{fold:!0,language:e.dataset.value}))}}})),f.addEventListener("mousedown",(function(t){if(t.preventDefault(),t.stopPropagation(),o.editable){var e=o.state.tr;o.dispatch(e.setNodeMarkup(a(),void 0,{fold:!1,language:s.dataset.language}))}})),document.addEventListener("mousedown",(function(){if(o.editable&&"true"!==c.dataset.fold){var t=o.state.tr;o.dispatch(t.setNodeMarkup(a(),void 0,{fold:!0,language:s.dataset.language}))}})),((null==e?void 0:e.languageList)||Ot).forEach((function(t){var e=document.createElement("li");e.className="code-fence_select-option",e.innerText=t||"--",c.appendChild(e),e.setAttribute("data-value",t)})),h.spellcheck=!1,u.className="code-fence_select-wrapper",u.contentEditable="false",u.append(f),u.append(c),l.append(h);var p=document.createElement("div");return h.append(p),p.style.whiteSpace="inherit",s.append(u,l),s.setAttribute("class",t.getClassName(i.attrs,"code-fence",n)),s.setAttribute("data-language",i.attrs.language),d.innerText=i.attrs.language||"--",c.setAttribute("data-fold",i.attrs.fold?"true":"false"),{dom:s,contentDOM:p,update:function(t){if(t.type.name!==_t)return!1;var e=t.attrs.language;return s.dataset.language=e,d.innerText=e||"--",c.setAttribute("data-fold",t.attrs.fold?"true":"false"),!0}}}}}})),Et=Object(D.e)((function(){return{id:"doc",schema:function(){return{content:"block+",parseMarkdown:{match:function(t){return"root"===t.type},runner:function(t,e,n){t.injectRoot(e,n)}},toMarkdown:{match:function(t){return"doc"===t.type.name},runner:function(t,e){t.openNode("root"),t.next(e.content)}}}}}})),Ct=Object(M.i)("InsertHardbreak"),Tt=Object(D.e)((function(t){return{id:"hardbreak",schema:function(){return{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:function(e){return["br",{class:t.getClassName(e.attrs,"hardbreak")}]},parseMarkdown:{match:function(t){return"break"===t.type},runner:function(t,e,n){t.addNode(n)}},toMarkdown:{match:function(t){return"hardbreak"===t.type.name},runner:function(t){t.addNode("break")}}}},commands:function(t){return[Object(M.h)(Ct,(function(){return function(e,n){return null==n||n(e.tr.setMeta("hardbreak",!0).replaceSelectionWith(t.create()).scrollIntoView()),!0}}))]},shortcuts:Object(C.a)({},tt.HardBreak,Object(D.g)(Ct,"Shift-Enter")),prosePlugins:function(t){return[new P.d({key:new P.e("MILKDOWN_PLUGIN_HARDBREAK_MARKS"),appendTransaction:function(e,n,r){if(e.length){var o=Object(i.a)(e,1)[0];if(o){var a=Object(i.a)(o.steps,1)[0];if(o.getMeta("hardbreak")){if(!(a instanceof L.d))return;var s=a.from;return r.tr.setNodeMarkup(s,t,void 0,[])}if(a instanceof L.a){var u=r.tr,c=a.from,l=a.to;return r.doc.nodesBetween(c,l,(function(e,n){e.type===t&&(u=u.setNodeMarkup(n,t,void 0,[]))})),u}}}}})]}}})),At=Array(6).fill(0).map((function(t,e){return e+1})),Dt=Object(M.i)("TurnIntoHeading"),Mt=new P.e("MILKDOWN_PLUGIN_ID"),jt=Object(D.e)((function(t){var e,n="heading";return{id:n,schema:function(){return{content:"inline*",group:"block",defining:!0,attrs:{id:{default:""},level:{default:1}},parseDOM:At.map((function(t){return{tag:"h".concat(t),getAttrs:function(e){if(!(e instanceof HTMLElement))throw new Error;return{level:t,id:e.id}}}})),toDOM:function(e){return["h".concat(e.attrs.level),{id:e.attrs.id||e.textContent.split(" ").join("-").toLocaleLowerCase(),class:t.getClassName(e.attrs,"heading h".concat(e.attrs.level),(n=e.attrs.level,t.getStyle((function(t,e){var r=e.css,i={1:r(g||(g=Object(T.a)(["\n font-size: 3rem;\n line-height: 3.5rem;\n "]))),2:r(m||(m=Object(T.a)(["\n font-size: 2.5rem;\n line-height: 3rem;\n "]))),3:r(v||(v=Object(T.a)(["\n font-size: 2.125rem;\n line-height: 2.25rem;\n "]))),4:r(y||(y=Object(T.a)(["\n font-size: 1.75rem;\n line-height: 2rem;\n "]))),5:r(b||(b=Object(T.a)(["\n font-size: 1.5rem;\n line-height: 1.5rem;\n "]))),6:r(O||(O=Object(T.a)(["\n font-size: 1.25rem;\n line-height: 1.25rem;\n "])))};return r(w||(w=Object(T.a)(["\n ","\n margin: 2.5rem 0 !important;\n font-weight: 400;\n "])),i[n]||"")}))))},0];var n},parseMarkdown:{match:function(t){return t.type===n},runner:function(t,e,n){var r=e.depth;t.openNode(n,{level:r}),t.next(e.children),t.closeNode()}},toMarkdown:{match:function(t){return t.type.name===n},runner:function(t,e){t.openNode("heading",void 0,{depth:e.attrs.level}),t.next(e.content),t.closeNode()}}}},inputRules:function(t){return At.map((function(e){return Object(R.c)(new RegExp("^(#{1,".concat(e,"})\\s$")),t,(function(){return{level:e}}))}))},commands:function(t){return[Object(M.h)(Dt,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return Object(N.d)(t,{level:e})}))]},shortcuts:(e={},Object(C.a)(e,tt.H1,Object(D.g)(Dt,"Mod-Alt-1",1)),Object(C.a)(e,tt.H2,Object(D.g)(Dt,"Mod-Alt-2",2)),Object(C.a)(e,tt.H3,Object(D.g)(Dt,"Mod-Alt-3",3)),Object(C.a)(e,tt.H4,Object(D.g)(Dt,"Mod-Alt-4",4)),Object(C.a)(e,tt.H5,Object(D.g)(Dt,"Mod-Alt-5",5)),Object(C.a)(e,tt.H6,Object(D.g)(Dt,"Mod-Alt-6",6)),e),prosePlugins:function(t,e){var n=!1,r=function(e,r){var i=e.tr;e.doc.descendants((function(e,r){if(e.type===t&&!n){if(0===e.textContent.trim().length)return;var o=e.attrs,a=function(t){return t.textContent.replace(/(?:[!-\/:-@\[-`\{-~\xA1-\xA9\xAB\xAC\xAE-\xB1\xB4\xB6-\xB8\xBB\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u037E\u0384\u0385\u0387\u03F6\u0482\u055A-\u055F\u0589\u058A\u058D-\u058F\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0606-\u060F\u061B\u061D-\u061F\u066A-\u066D\u06D4\u06DE\u06E9\u06FD\u06FE\u0700-\u070D\u07F6-\u07F9\u07FE\u07FF\u0830-\u083E\u085E\u0888\u0964\u0965\u0970\u09F2\u09F3\u09FA\u09FB\u09FD\u0A76\u0AF0\u0AF1\u0B70\u0BF3-\u0BFA\u0C77\u0C7F\u0C84\u0D4F\u0D79\u0DF4\u0E3F\u0E4F\u0E5A\u0E5B\u0F01-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F85\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u104A-\u104F\u109E\u109F\u10FB\u1360-\u1368\u1390-\u1399\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DB\u1800-\u180A\u1940\u1944\u1945\u19DE-\u19FF\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B6A\u1B74-\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2010-\u2027\u2030-\u205E\u207A-\u207E\u208A-\u208E\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2775\u2794-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u303F\u309B\u309C\u30A0\u30FB\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAA77-\uAA79\uAADE\uAADF\uAAF0\uAAF1\uAB5B\uAB6A\uAB6B\uABEB\uFB29\uFBB2-\uFBC2\uFD3E-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD00-\uDD02\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDC77\uDC78\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEC8\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3F]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDFD5-\uDFF1\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3F\uDF44\uDF45]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F[\uDC9C\uDC9F]|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE8B]|\uD838[\uDD4F\uDEFF]|\uD83A[\uDD5E\uDD5F]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDD-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6\uDF00-\uDF92\uDF94-\uDFCA])/g,"").replace(/\s/g,"").trim()}(e);o.id!==a&&i.setMeta(Mt,!0).setNodeMarkup(r,void 0,J(K({},o),{id:a}))}})),r(i)};return[new P.d({key:Mt,props:{handleDOMEvents:{compositionstart:function(){return n=!0,!1},compositionend:function(){n=!1;var t=e.get(M.k);return setTimeout((function(){r(t.state,(function(e){return t.dispatch(e)}))}),0),!1}}},appendTransaction:function(t,e,n){var i=null;return t.every((function(t){return!t.getMeta(Mt)}))&&t.some((function(t){return t.docChanged}))&&r(n,(function(t){i=t})),i}})]}}})),Nt="hr",Pt=Object(M.i)("InsertHr"),Rt=Object(D.e)((function(t){var e=t.getStyle((function(t,e){return(0,e.css)(k||(k=Object(T.a)(["\n height: ",";\n background-color: ",";\n border-width: 0;\n "])),t.size.lineWidth,t.palette("line"))}));return{id:Nt,schema:function(){return{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(n){return["hr",{class:t.getClassName(n.attrs,Nt,e)}]},parseMarkdown:{match:function(t){return"thematicBreak"===t.type},runner:function(t,e,n){t.addNode(n)}},toMarkdown:{match:function(t){return t.type.name===Nt},runner:function(t){t.addNode("thematicBreak")}}}},inputRules:function(t){return[new R.a(/^(?:---|___\s|\*\*\*\s)$/,(function(e,n,r,i){var o=e.tr;return n[0]&&o.replaceWith(r-1,i,t.create()),o}))]},commands:function(t,e){return[Object(M.h)(Pt,(function(){return function(n,r){if(!r)return!0;var i=n.tr,o=n.selection.from,a=t.create();if(!a)return!0;var s=i.replaceSelectionWith(a).insert(o,e.get(M.u).node("paragraph")),u=P.f.findFrom(s.doc.resolve(o),1,!0);return!u||(r(s.setSelection(u).scrollIntoView()),!0)}}))]}}})),Lt=Object(M.i)("ModifyImage"),Ft=Object(M.i)("InsertImage"),Bt="image",It=Object(D.e)((function(t,e){var n,r,o=K({loading:"Loading...",empty:"Add an Image",failed:"Image loads failed"},null!=(n=null==e?void 0:e.placeholder)?n:{}),a=null!=(r=null==e?void 0:e.isBlock)&&r,s=t.getStyle((function(t,e){return(0,e.css)(x||(x=Object(T.a)(["\n display: inline-block;\n position: relative;\n text-align: center;\n font-size: 0;\n vertical-align: text-bottom;\n line-height: 1;\n\n ","\n\n &.ProseMirror-selectednode::after {\n content: '';\n background: ",";\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n\n img {\n max-width: 100%;\n height: auto;\n object-fit: contain;\n margin: 0 2px;\n }\n .icon,\n .placeholder {\n display: none;\n }\n\n &.system {\n width: 100%;\n padding: 0 2rem;\n\n img {\n width: 0;\n height: 0;\n display: none;\n }\n\n .icon,\n .placeholder {\n display: inline;\n }\n\n box-sizing: border-box;\n height: 3rem;\n background-color: ",";\n border-radius: ",";\n display: inline-flex;\n gap: 2rem;\n justify-content: flex-start;\n align-items: center;\n .placeholder {\n margin: 0;\n line-height: 1;\n &::before {\n content: '';\n font-size: 0.875rem;\n color: ",";\n }\n }\n }\n\n &.loading {\n .placeholder {\n &::before {\n content: '","';\n }\n }\n }\n\n &.empty {\n .placeholder {\n &::before {\n content: '","';\n }\n }\n }\n\n &.failed {\n .placeholder {\n &::before {\n content: '","';\n }\n }\n }\n "])),a?"\n width: 100%;\n margin: 0 auto;\n ":"",t.palette("secondary",.38),t.palette("background"),t.size.radius,t.palette("neutral",.6),o.loading,o.empty,o.failed)})),u=t.getStyle((function(t,e){return(0,e.css)(_||(_=Object(T.a)(["\n display: inline-block;\n margin: 0 auto;\n object-fit: contain;\n width: 100%;\n position: relative;\n height: auto;\n text-align: center;\n "])))}));return{id:"image",schema:function(){return{inline:!0,group:"inline",selectable:!0,draggable:!0,marks:"",atom:!0,defining:!0,isolating:!0,attrs:{src:{default:""},alt:{default:null},title:{default:null},failed:{default:!1},loading:{default:!0},width:{default:null}},parseDOM:[{tag:"img[src]",getAttrs:function(t){if(!(t instanceof HTMLElement))throw new Error;return{failed:t.classList.contains("failed"),loading:t.classList.contains("loading"),src:t.getAttribute("src")||"",alt:t.getAttribute("alt"),title:t.getAttribute("title")||t.getAttribute("alt"),width:t.getAttribute("width")}}}],toDOM:function(e){return["img",J(K({},e.attrs),{class:t.getClassName(e.attrs,Bt,e.attrs.failed?"failed":"",e.attrs.loading?"loading":"",u)})]},parseMarkdown:{match:function(t){return t.type===Bt},runner:function(t,e,n){var r=e.url,i=e.alt,o=e.title;t.addNode(n,{src:r,alt:i,title:o})}},toMarkdown:{match:function(t){return t.type.name===Bt},runner:function(t,e){t.addNode("image",void 0,void 0,{title:e.attrs.title,url:e.attrs.src,alt:e.attrs.alt})}}}},commands:function(t){return[Object(M.h)(Ft,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return function(n,r){if(!r)return!0;var i=n.tr,o=t.create({src:e});return!o||(r(i.replaceSelectionWith(o).scrollIntoView()),!0)}})),Object(M.h)(Lt,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return function(n,r){var i=Object(j.g)(n.selection,t);if(!i)return!1;var o=n.tr;return null==r||r(o.setNodeMarkup(i.pos,void 0,J(K({},i.node.attrs),{loading:!0,src:e})).scrollIntoView()),!0}}))]},inputRules:function(t){return[new R.a(c(/!\[(.*?)\]\((.*?)[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(?="|\))"?((?:(?!")[\s\S])+)?"?\)/,{alt:1,filename:2,title:3}),(function(e,n,r,o){var a=Object(i.a)(n,4),s=a[0],u=a[1],c=a[2],l=void 0===c?"":c,h=a[3],f=e.tr;return s&&f.replaceWith(r,o,t.create({src:l,alt:u,title:h})),f}))]},view:function(e){return function(n,r,i){var o=n.type,a=e.get(M.x).slots.icon,u=document.createElement("span");u.className=t.getClassName(n.attrs,Bt,s);var c=document.createElement("img");u.append(c);var l=a("image"),h=document.createElement("span");h.classList.add("placeholder"),u.append(l,h);var f=function(t){var e=a(t);u.replaceChild(e,l),l=e},d=function(t){u.classList.add("system","loading"),f("loading");var e=document.createElement("img");e.src=t,e.onerror=function(){var e=i();if(e){var a=r.state.tr.setNodeMarkup(e,o,J(K({},n.attrs),{src:t,loading:!1,failed:!0}));r.dispatch(a)}},e.onload=function(){var a=r.state.tr,s=i();if(s){var u=a.setNodeMarkup(s,o,J(K({},n.attrs),{width:e.width,src:t,loading:!1,failed:!1}));r.dispatch(u)}}},p=n.attrs,g=p.src,m=p.loading,v=p.title,y=p.alt,b=p.width;return c.src=g,c.title=v||y,c.alt=y,b&&(c.width=b),0===g.length?(u.classList.add("system","empty"),f("image")):m&&d(g),{dom:u,update:function(t){if(t.type.name!==Bt)return!1;var e=t.attrs,n=e.src,r=e.alt,i=e.title,o=e.loading,a=e.failed,s=e.width;return c.src=n,c.alt=r,c.title=i||r,s&&(c.width=s),o?(d(n),!0):a?(u.classList.remove("loading","empty"),u.classList.add("system","failed"),f("brokenImage"),!0):n.length>0?(u.classList.remove("system","empty","loading"),!0):(u.classList.add("system","empty"),f("image"),!0)},selectNode:function(){u.classList.add("ProseMirror-selectednode")},deselectNode:function(){u.classList.remove("ProseMirror-selectednode")}}}}}})),Qt="list_item",$t=Object(M.i)("SplitListItem"),zt=Object(M.i)("SinkListItem"),qt=Object(M.i)("LiftListItem"),Wt=Object(D.e)((function(t){var e,n=t.getStyle((function(t,e){return(0,e.css)(S||(S=Object(T.a)(["\n &,\n & > * {\n margin: 0.5rem 0;\n }\n\n &,\n li {\n &::marker {\n color: ",";\n }\n }\n "])),t.palette("primary"))}));return{id:Qt,schema:function(){return{group:"listItem",content:"paragraph block*",defining:!0,parseDOM:[{tag:"li"}],toDOM:function(e){return["li",{class:t.getClassName(e.attrs,"list-item",n)},0]},parseMarkdown:{match:function(t){var e=t.type,n=t.checked;return"listItem"===e&&null===n},runner:function(t,e,n){t.openNode(n),t.next(e.children),t.closeNode()}},toMarkdown:{match:function(t){return t.type.name===Qt},runner:function(t,e){t.openNode("listItem"),t.next(e.content),t.closeNode()}}}},inputRules:function(t){return[Object(R.d)(/^\s*([-+*])\s$/,t)]},commands:function(t){return[Object(M.h)($t,(function(){return Object(F.c)(t)})),Object(M.h)(zt,(function(){return Object(F.b)(t)})),Object(M.h)(qt,(function(){return Object(F.a)(t)}))]},shortcuts:(e={},Object(C.a)(e,tt.NextListItem,Object(D.g)($t,"Enter")),Object(C.a)(e,tt.SinkListItem,Object(D.g)(zt,"Mod-]")),Object(C.a)(e,tt.LiftListItem,Object(D.g)(qt,"Mod-[")),e)}})),Vt=Object(M.i)("WrapInOrderedList"),Yt="ordered_list",Ut=Object(D.e)((function(t){return{id:Yt,schema:function(){return{content:"listItem+",group:"block",attrs:{order:{default:1}},parseDOM:[{tag:"ol",getAttrs:function(t){if(!(t instanceof HTMLElement))throw new Error;return{order:t.hasAttribute("start")?Number(t.getAttribute("start")):1}}}],toDOM:function(e){return["ol",J(K({},1===e.attrs.order?{}:e.attrs.order),{class:t.getClassName(e.attrs,"ordered-list")}),0]},parseMarkdown:{match:function(t){var e=t.type,n=t.ordered;return"list"===e&&!!n},runner:function(t,e,n){t.openNode(n).next(e.children).closeNode()}},toMarkdown:{match:function(t){return t.type.name===Yt},runner:function(t,e){t.openNode("list",void 0,{ordered:!0,start:1}),t.next(e.content),t.closeNode()}}}},inputRules:function(t){return[Object(R.d)(/^(\d+)\.\s$/,t,(function(t){return{order:Number(t[1])}}),(function(t,e){return e.childCount+e.attrs.order===Number(t[1])}))]},commands:function(t){return[Object(M.h)(Vt,(function(){return Object(N.f)(t)}))]},shortcuts:Object(C.a)({},tt.OrderedList,Object(D.g)(Vt,"Mod-Alt-7"))}})),Ht=Object(M.i)("TurnIntoText"),Xt="paragraph",Gt=Object(D.e)((function(t){var e=t.getStyle((function(t,e){return(0,e.css)(E||(E=Object(T.a)(["\n font-size: 1rem;\n line-height: 1.5;\n letter-spacing: 0.5px;\n "])))}));return{id:Xt,schema:function(){return{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:function(n){return["p",{class:t.getClassName(n.attrs,Xt,e)},0]},parseMarkdown:{match:function(t){return"paragraph"===t.type},runner:function(t,e,n){t.openNode(n),e.children?t.next(e.children):t.addText(e.value),t.closeNode()}},toMarkdown:{match:function(t){return"paragraph"===t.type.name},runner:function(t,e){t.openNode("paragraph"),t.next(e.content),t.closeNode()}}}},commands:function(t){return[Object(M.h)(Ht,(function(){return Object(N.d)(t)}))]},shortcuts:Object(C.a)({},tt.Text,Object(D.g)(Ht,"Mod-Alt-0"))}})),Zt=Object(D.e)((function(){return{id:"text",schema:function(){return{group:"inline",parseMarkdown:{match:function(t){return"text"===t.type},runner:function(t,e){t.addText(e.value)}},toMarkdown:{match:function(t){return"text"===t.type.name},runner:function(t,e){t.addNode("text",void 0,e.text)}}}}}})),Kt=[Et(),Gt(),Tt(),vt(),St(),bt(),Ut(),Wt(),jt(),Rt(),It(),Zt()];var Jt=function(){return function(t){var e;e=function(t){return function(t){return"html"===t.type}(t)?[]:[t]},function t(n,r,i){if(function(t){return!!t.children}(n)){for(var o=[],a=0,s=n.children.length;at)break;var l=this.ranges[u+o],h=this.ranges[u+s],f=c+l;if(t<=f){var d=c+r+((l?t==c?-1:t==f?1:e:e)<0?0:h);if(n)return d;var p=t==(e<0?c:f)?null:u/3+(t-c)*i;return new a(d,e<0?t!=c:t!=f,p)}r+=h-l}return n?t+r:new a(t+r)},s.prototype.touches=function(t,e){for(var n=0,r=o(e),i=this.inverted?2:1,a=this.inverted?1:2,s=0;st)break;var c=this.ranges[s+i];if(t<=u+c&&s==3*r)return!0;n+=this.ranges[s+a]-c}return!1},s.prototype.forEach=function(t){for(var e=this.inverted?2:1,n=this.inverted?1:2,r=0,i=0;r=0;e--){var r=t.getMirror(e);this.appendMap(t.maps[e].invert(),null!=r&&r>e?n-r-1:null)}},u.prototype.invert=function(){var t=new u;return t.appendMappingInverted(this),t},u.prototype.map=function(t,e){if(void 0===e&&(e=1),this.mirror)return this._map(t,e,!0);for(var n=this.from;ni&&s0},l.prototype.addStep=function(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e},Object.defineProperties(l.prototype,h);var d=Object.create(null),p=function(){};p.prototype.apply=function(t){return f()},p.prototype.getMap=function(){return s.empty},p.prototype.invert=function(t){return f()},p.prototype.map=function(t){return f()},p.prototype.merge=function(t){return null},p.prototype.toJSON=function(){return f()},p.fromJSON=function(t,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=d[e.stepType];if(!n)throw new RangeError("No step type "+e.stepType+" defined");return n.fromJSON(t,e)},p.jsonID=function(t,e){if(t in d)throw new RangeError("Duplicate use of step JSON ID "+t);return d[t]=e,e.prototype.jsonID=t,e};var g=function(t,e){this.doc=t,this.failed=e};g.ok=function(t){return new g(t,null)},g.fail=function(t){return new g(null,t)},g.fromReplace=function(t,e,n,i){try{return g.ok(t.replace(e,n,i))}catch(o){if(o instanceof r.h)return g.fail(o.message);throw o}};var m=function(t){function e(e,n,r,i){t.call(this),this.from=e,this.to=n,this.slice=r,this.structure=!!i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){return this.structure&&y(t,this.from,this.to)?g.fail("Structure replace would overwrite content"):g.fromReplace(t,this.from,this.to,this.slice)},e.prototype.getMap=function(){return new s([this.from,this.to-this.from,this.slice.size])},e.prototype.invert=function(t){return new e(this.from,this.from+this.slice.size,t.slice(this.from,this.to))},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted?null:new e(n.pos,Math.max(n.pos,r.pos),this.slice)},e.prototype.merge=function(t){if(!(t instanceof e)||t.structure||this.structure)return null;if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart){if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null;var n=this.slice.size+t.slice.size==0?r.j.empty:new r.j(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new e(t.from,this.to,n,this.structure)}var i=this.slice.size+t.slice.size==0?r.j.empty:new r.j(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new e(this.from,this.to+(t.to-t.from),i,this.structure)},e.prototype.toJSON=function(){var t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new e(n.from,n.to,r.j.fromJSON(t,n.slice),!!n.structure)},e}(p);p.jsonID("replace",m);var v=function(t){function e(e,n,r,i,o,a,s){t.call(this),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=a,this.structure=!!s}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){if(this.structure&&(y(t,this.from,this.gapFrom)||y(t,this.gapTo,this.to)))return g.fail("Structure gap-replace would overwrite content");var e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return g.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,e.content);return n?g.fromReplace(t,this.from,this.to,n):g.fail("Content does not fit in gap")},e.prototype.getMap=function(){return new s([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])},e.prototype.invert=function(t){var n=this.gapTo-this.gapFrom;return new e(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=t.map(this.gapFrom,-1),o=t.map(this.gapTo,1);return n.deleted&&r.deleted||ir.pos?null:new e(n.pos,r.pos,i,o,this.slice,this.insert,this.structure)},e.prototype.toJSON=function(){var t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to||"number"!=typeof n.gapFrom||"number"!=typeof n.gapTo||"number"!=typeof n.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new e(n.from,n.to,n.gapFrom,n.gapTo,r.j.fromJSON(t,n.slice),n.insert,!!n.structure)},e}(p);function y(t,e,n){for(var r=t.resolve(e),i=n-e,o=r.depth;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0)for(var a=r.node(o).maybeChild(r.indexAfter(o));i>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,i--}return!1}function b(t,e,n){return(0==e||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function O(t){for(var e=t.parent.content.cutByIndex(t.startIndex,t.endIndex),n=t.depth;;--n){var r=t.$from.node(n),i=t.$from.index(n),o=t.$to.indexAfter(n);if(no;s--,u--){var c=i.node(s),l=i.index(s);if(c.type.spec.isolating)return!1;var h=c.content.cutByIndex(l,c.childCount),f=r&&r[u]||c;if(f!=c&&(h=h.replaceChild(0,f.type.create(f.attrs))),!c.canReplace(l+1,c.childCount)||!f.type.validContent(h))return!1}var d=i.indexAfter(o),p=r&&r[0];return i.node(o).canReplaceWith(d,d,p?p.type:i.node(o+1).type)}function _(t,e){var n=t.resolve(e),r=n.index();return S(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function S(t,e){return t&&e&&!t.isLeaf&&t.canAppend(e)}function E(t,e,n){void 0===n&&(n=-1);for(var r=t.resolve(e),i=r.depth;;i--){var o=void 0,a=void 0,s=r.index(i);if(i==r.depth?(o=r.nodeBefore,a=r.nodeAfter):n>0?(o=r.node(i+1),s++,a=r.node(i).maybeChild(s)):(o=r.node(i).maybeChild(s-1),a=r.node(i+1)),o&&!o.isTextblock&&S(o,a)&&r.node(i).canReplace(s,s+1))return e;if(0==i)break;e=n<0?r.before(i):r.after(i)}}function C(t,e,n){var r=t.resolve(e);if(!n.content.size)return e;for(var i=n.content,o=0;o=0;s--){var u=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,c=r.index(s)+(u>0?1:0),l=r.node(s),h=!1;if(1==a)h=l.canReplace(c,c,i);else{var f=l.contentMatchAt(c).findWrapping(i.firstChild.type);h=f&&l.canReplaceWith(c,c,f[0])}if(h)return 0==u?r.pos:u<0?r.before(s+1):r.after(s+1)}return null}function T(t,e,n){for(var i=[],o=0;oe;f--)d||n.index(f)>0?(d=!0,l=r.c.from(n.node(f).copy(l)),h++):u--;for(var p=r.c.empty,g=0,m=o,y=!1;m>e;m--)y||i.after(m+1)=0;i--)n=r.c.from(e[i].type.create(e[i].attrs,n));var o=t.start,a=t.end;return this.step(new v(o,a,o,a,new r.j(n,0,0),e.length,!0))},l.prototype.setBlockType=function(t,e,n,i){var o=this;if(void 0===e&&(e=t),!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var a=this.steps.length;return this.doc.nodesBetween(t,e,(function(t,e){if(t.isTextblock&&!t.hasMarkup(n,i)&&function(t,e,n){var r=t.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}(o.doc,o.mapping.slice(a).map(e),n)){o.clearIncompatible(o.mapping.slice(a).map(e,1),n);var s=o.mapping.slice(a),u=s.map(e,1),c=s.map(e+t.nodeSize,1);return o.step(new v(u,c,u+1,c-1,new r.j(r.c.from(n.create(i,null,t.marks)),0,0),1,!0)),!1}})),this},l.prototype.setNodeMarkup=function(t,e,n,i){var o=this.doc.nodeAt(t);if(!o)throw new RangeError("No node at given position");e||(e=o.type);var a=e.create(n,null,i||o.marks);if(o.isLeaf)return this.replaceWith(t,t+o.nodeSize,a);if(!e.validContent(o.content))throw new RangeError("Invalid content for node type "+e.name);return this.step(new v(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new r.j(r.c.from(a),0,0),1,!0))},l.prototype.split=function(t,e,n){void 0===e&&(e=1);for(var i=this.doc.resolve(t),o=r.c.empty,a=r.c.empty,s=i.depth,u=i.depth-e,c=e-1;s>u;s--,c--){o=r.c.from(i.node(s).copy(o));var l=n&&n[c];a=r.c.from(l?l.type.create(l.attrs,a):i.node(s).copy(a))}return this.step(new m(t,t,new r.j(o.append(a),e,e),!0))},l.prototype.join=function(t,e){void 0===e&&(e=1);var n=new m(t-e,t+e,r.j.empty,!0);return this.step(n)};var A=function(t){function e(e,n,r){t.call(this),this.from=e,this.to=n,this.mark=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){var e=this,n=t.slice(this.from,this.to),i=t.resolve(this.from),o=i.node(i.sharedDepth(this.to)),a=new r.j(T(n.content,(function(t,n){return t.isAtom&&n.type.allowsMarkType(e.mark.type)?t.mark(e.mark.addToSet(t.marks)):t}),o),n.openStart,n.openEnd);return g.fromReplace(t,this.from,this.to,a)},e.prototype.invert=function(){return new D(this.from,this.to,this.mark)},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)},e.prototype.merge=function(t){if(t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from)return new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark)},e.prototype.toJSON=function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))},e}(p);p.jsonID("addMark",A);var D=function(t){function e(e,n,r){t.call(this),this.from=e,this.to=n,this.mark=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){var e=this,n=t.slice(this.from,this.to),i=new r.j(T(n.content,(function(t){return t.mark(e.mark.removeFromSet(t.marks))})),n.openStart,n.openEnd);return g.fromReplace(t,this.from,this.to,i)},e.prototype.invert=function(){return new A(this.from,this.to,this.mark)},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)},e.prototype.merge=function(t){if(t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from)return new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark)},e.prototype.toJSON=function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))},e}(p);function M(t,e,n,i){if(void 0===n&&(n=e),void 0===i&&(i=r.j.empty),e==n&&!i.size)return null;var o=t.resolve(e),a=t.resolve(n);return j(o,a,i)?new m(e,n,i):new N(o,a,i).fit()}function j(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}p.jsonID("removeMark",D),l.prototype.addMark=function(t,e,n){var r=this,i=[],o=[],a=null,s=null;return this.doc.nodesBetween(t,e,(function(r,u,c){if(r.isInline){var l=r.marks;if(!n.isInSet(l)&&c.type.allowsMarkType(n.type)){for(var h=Math.max(u,t),f=Math.min(u+r.nodeSize,e),d=n.addToSet(l),p=0;p=0;d--)this.step(o[d]);return this},l.prototype.replace=function(t,e,n){void 0===e&&(e=t),void 0===n&&(n=r.j.empty);var i=M(this.doc,t,e,n);return i&&this.step(i),this},l.prototype.replaceWith=function(t,e,n){return this.replace(t,e,new r.j(r.c.from(n),0,0))},l.prototype.delete=function(t,e){return this.replace(t,e,r.j.empty)},l.prototype.insert=function(t,e){return this.replaceWith(t,t,e)};var N=function(t,e,n){this.$to=e,this.$from=t,this.unplaced=n,this.frontier=[];for(var i=0;i<=t.depth;i++){var o=t.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(i))})}this.placed=r.c.empty;for(var a=t.depth;a>0;a--)this.placed=r.c.from(t.node(a).copy(this.placed))},P={depth:{configurable:!0}};function R(t,e,n){return 0==e?t.cutByIndex(n):t.replaceChild(0,t.firstChild.copy(R(t.firstChild.content,e-1,n)))}function L(t,e,n){return 0==e?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(L(t.lastChild.content,e-1,n)))}function F(t,e){for(var n=0;n1&&(i=i.replaceChild(0,B(i.firstChild,e-1,1==i.childCount?n-1:0))),e>0&&(i=t.type.contentMatch.fillBefore(i).append(i),n<=0&&(i=i.append(t.type.contentMatch.matchFragment(i).fillBefore(r.c.empty,!0)))),t.copy(i)}function I(t,e,n,r,i){var o=t.node(e),a=i?t.indexAfter(e):t.index(e);if(a==o.childCount&&!n.compatibleContent(o.type))return null;var s=r.fillBefore(o.content,!0,a);return s&&!function(t,e,n){for(var r=n;ri){var s=o.contentMatchAt(0),u=s.fillBefore(t).append(t);t=u.append(s.matchFragment(u).fillBefore(r.c.empty,!0))}return t}function $(t,e){for(var n=[],r=Math.min(t.depth,e.depth);r>=0;r--){var i=t.start(r);if(ie.pos+(e.depth-r)||t.node(r).type.spec.isolating||e.node(r).type.spec.isolating)break;(i==e.start(r)||r==t.depth&&r==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&r&&e.start(r-1)==i-1)&&n.push(r)}return n}P.depth.get=function(){return this.frontier.length-1},N.prototype.fit=function(){for(;this.unplaced.size;){var t=this.findFittable();t?this.placeNodes(t):this.openMore()||this.dropNode()}var e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,i=this.$from,o=this.close(e<0?this.$to:i.doc.resolve(e));if(!o)return null;for(var a=this.placed,s=i.depth,u=o.depth;s&&u&&1==a.childCount;)a=a.firstChild.content,s--,u--;var c=new r.j(a,s,u);return e>-1?new v(i.pos,e,this.$to.pos,this.$to.end(),c,n):c.size||i.pos!=this.$to.pos?new m(i.pos,o.pos,c):void 0},N.prototype.findFittable=function(){for(var t=1;t<=2;t++)for(var e=this.unplaced.openStart;e>=0;e--)for(var n=void 0,i=(e?(n=F(this.unplaced.content,e-1).firstChild).content:this.unplaced.content).firstChild,o=this.depth;o>=0;o--){var a=this.frontier[o],s=a.type,u=a.match,c=void 0,l=void 0;if(1==t&&(i?u.matchType(i.type)||(l=u.fillBefore(r.c.from(i),!1)):s.compatibleContent(n.type)))return{sliceDepth:e,frontierDepth:o,parent:n,inject:l};if(2==t&&i&&(c=u.findWrapping(i.type)))return{sliceDepth:e,frontierDepth:o,parent:n,wrap:c};if(n&&u.matchType(n.type))break}},N.prototype.openMore=function(){var t=this.unplaced,e=t.content,n=t.openStart,i=t.openEnd,o=F(e,n);return!(!o.childCount||o.firstChild.isLeaf)&&(this.unplaced=new r.j(e,n+1,Math.max(i,o.size+n>=e.size-i?n+1:0)),!0)},N.prototype.dropNode=function(){var t=this.unplaced,e=t.content,n=t.openStart,i=t.openEnd,o=F(e,n);if(o.childCount<=1&&n>0){var a=e.size-n<=n+o.size;this.unplaced=new r.j(R(e,n-1,1),n-1,a?n-1:i)}else this.unplaced=new r.j(R(e,n,1),n,i)},N.prototype.placeNodes=function(t){for(var e=t.sliceDepth,n=t.frontierDepth,i=t.parent,o=t.inject,a=t.wrap;this.depth>n;)this.closeFrontierNode();if(a)for(var s=0;s1||0==l||y.content.size)&&(p=b,f.push(B(y.mark(g.allowedMarks(y.marks)),1==h?l:0,h==c.childCount?v:-1)))}var O=h==c.childCount;O||(v=-1),this.placed=L(this.placed,n,r.c.from(f)),this.frontier[n].match=p,O&&v<0&&i&&i.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var w=0,k=c;w1&&r==this.$to.end(--n);)++r;return r},N.prototype.findCloseLevel=function(t){t:for(var e=Math.min(this.depth,t.depth);e>=0;e--){var n=this.frontier[e],r=n.match,i=n.type,o=e=0;s--){var u=this.frontier[s],c=u.match,l=I(t,s,u.type,c,!0);if(!l||l.childCount)continue t}return{depth:e,fit:a,move:o?t.doc.resolve(t.after(e+1)):t}}}},N.prototype.close=function(t){var e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=L(this.placed,e.depth,e.fit)),t=e.move;for(var n=e.depth+1;n<=t.depth;n++){var r=t.node(n),i=r.type.contentMatch.fillBefore(r.content,!0,t.index(n));this.openFrontierNode(r.type,r.attrs,i)}return t},N.prototype.openFrontierNode=function(t,e,n){var i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=L(this.placed,this.depth,r.c.from(t.create(e,n))),this.frontier.push({type:t,match:t.contentMatch})},N.prototype.closeFrontierNode=function(){var t=this.frontier.pop().match.fillBefore(r.c.empty,!0);t.childCount&&(this.placed=L(this.placed,this.frontier.length,t))},Object.defineProperties(N.prototype,P),l.prototype.replaceRange=function(t,e,n){if(!n.size)return this.deleteRange(t,e);var i=this.doc.resolve(t),o=this.doc.resolve(e);if(j(i,o,n))return this.step(new m(t,e,n));var a=$(i,this.doc.resolve(e));0==a[a.length-1]&&a.pop();var s=-(i.depth+1);a.unshift(s);for(var u=i.depth,c=i.pos-1;u>0;u--,c--){var l=i.node(u).type.spec;if(l.defining||l.isolating)break;a.indexOf(u)>-1?s=u:i.before(u)==c&&a.splice(1,0,-u)}for(var h=a.indexOf(s),f=[],d=n.openStart,p=n.content,g=0;;g++){var v=p.firstChild;if(f.push(v),g==n.openStart)break;p=v.content}d>0&&f[d-1].type.spec.defining&&i.node(h).type!=f[d-1].type?d-=1:d>=2&&f[d-1].isTextblock&&f[d-2].type.spec.defining&&i.node(h).type!=f[d-2].type&&(d-=2);for(var y=n.openStart;y>=0;y--){var b=(y+d+1)%(n.openStart+1),O=f[b];if(O)for(var w=0;w=0&&(this.replace(t,e,n),!(this.steps.length>E));C--){var T=a[C];T<0||(t=i.before(T),e=o.after(T))}return this},l.prototype.replaceRangeWith=function(t,e,n){if(!n.isInline&&t==e&&this.doc.resolve(t).parent.content.size){var i=function(t,e,n){var r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(0==r.parentOffset)for(var i=r.depth-1;i>=0;i--){var o=r.index(i);if(r.node(i).canReplaceWith(o,o,n))return r.before(i+1);if(o>0)return null}if(r.parentOffset==r.parent.content.size)for(var a=r.depth-1;a>=0;a--){var s=r.indexAfter(a);if(r.node(a).canReplaceWith(s,s,n))return r.after(a+1);if(s0&&(s||n.node(a-1).canReplace(n.index(a-1),r.indexAfter(a-1))))return this.delete(n.before(a),r.after(a))}for(var u=1;u<=n.depth&&u<=r.depth;u++)if(t-n.start(u)==n.depth-u&&e>n.end(u)&&r.end(u)-e!=r.depth-u)return this.delete(n.before(u),e);return this.delete(t,e)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return C})),n.d(e,"b",(function(){return T})),n.d(e,"c",(function(){return A})),n.d(e,"d",(function(){return _})),n.d(e,"e",(function(){return E})),n.d(e,"f",(function(){return D}));var r,i,o,a,s=n(28),u=n(2),c=n(1),l=n(11),h=n(0),f=n(16),d=n.n(f),p=n(33),g=Object.defineProperty,m=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,b=function(t,e,n){return e in t?g(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n},O=function(t,e,n){if(!e.has(t))throw TypeError("Cannot "+n)},w=function(t,e,n){return O(t,e,"read from private field"),n?n.call(t):e.get(t)},k=function(t,e,n){if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},x=function(t,e,n,r){return O(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n},_=function(){var t=new Map;return{getSlice:function(e){var n=t.get(e.id);if(!n)throw Object(p.b)(e.sliceName);return n},sliceMap:t,getSliceByName:function(e){var n=Object(l.a)(t.values()).find((function(t){return t.name===e}));return n||null}}},S=function(t){return Array.isArray(t)?Object(l.a)(t):"object"===typeof t?function(t,e){for(var n in e||(e={}))v.call(e,n)&&b(t,n,e[n]);if(m){var r,i=Object(h.a)(m(e));try{for(i.s();!(r=i.n()).done;)n=r.value,y.call(e,n)&&b(t,n,e[n])}catch(o){i.e(o)}finally{i.f()}}return t}({},t):t},E=function(t,e){var n=Symbol("Context"),r=function(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:S(t),o=i,a={name:e,id:n,set:function(t){o=t},get:function(){return o},update:function(t){o=t(o)}};return r.set(n,a),a};return r.sliceName=e,r.id=n,r._typeInfo=function(){throw Object(p.d)()},r},C=Object(u.a)((function t(e,n){var o=this;Object(c.a)(this,t),k(this,r,void 0),k(this,i,void 0),this.use=function(t){return w(o,r).getSlice(t)},this.useByName=function(t){return w(o,r).getSliceByName(t)},this.get=function(t){return o.use(t).get()},this.set=function(t,e){return o.use(t).set(e)},this.update=function(t,e){return o.use(t).update(e)},this.timing=function(t){return w(o,i).get(t)},this.wait=function(t){return o.timing(t)()},this.done=function(t){return o.timing(t).done()},this.waitTimers=function(){var t=Object(s.a)(d.a.mark((function t(e){return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all(o.get(e).map((function(t){return o.wait(t)})));case 2:return t.abrupt("return");case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),x(this,r,e),x(this,i,n)}));r=new WeakMap,i=new WeakMap;var T=Object(u.a)((function t(e,n){var r=this;Object(c.a)(this,t),k(this,o,void 0),k(this,a,void 0),this.inject=function(t,e){return t(w(r,o).sliceMap,e),r},this.record=function(t){return t(w(r,a).store),r},x(this,o,e),x(this,a,n)}));o=new WeakMap,a=new WeakMap;var A=function(){var t=new Map;return{store:t,get:function(e){var n=t.get(e.id);if(!n)throw Object(p.k)();return n}}},D=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3e3,n=Symbol("Timer"),r=function(r){var i=Symbol(t),o=function(){return new Promise((function(n,r){setTimeout((function(){r("Timing ".concat(t," timeout."))}),e),addEventListener(t,(function(t){t instanceof CustomEvent&&t.detail.id===i&&n(void 0)}))}))};return o.done=function(){var e=new CustomEvent(t,{detail:{id:i}});dispatchEvent(e)},r.set(n,o),o};return r.id=n,r}},function(t,e,n){"use strict";n.d(e,"a",(function(){return h})),n.d(e,"b",(function(){return f})),n.d(e,"c",(function(){return d})),n.d(e,"d",(function(){return c})),n.d(e,"e",(function(){return p})),n.d(e,"f",(function(){return g})),n.d(e,"g",(function(){return m})),n.d(e,"h",(function(){return l}));var r=n(22),i=n(11),o=(n(73),n(62),n(63),n(43),n(54)),a=(n(40),n(7),n(74),n(9));n(75),n(24),n(38),n(33);function s(t,e,n,r,i,o){if(t.composing)return!1;var a=t.state,s=a.doc.resolve(e);if(s.parent.type.spec.code)return!1;for(var u=s.parent.textBetween(Math.max(0,s.parentOffset-500),s.parentOffset,void 0,"\ufffc")+r,c=0;cd}));if(v.length)return null;md&&a.delete(d,g),c=(u=d)+h.length}return a.addMark(u,c,e.create()),a.removeStoredMark(e),a}))}var h=function(t,e,n){var i,o=t.state.selection.from,a=t.domAtPos(o).node,s=a instanceof Text?a.parentElement:a;if(!(s instanceof HTMLElement))throw new Error;var u=s.getBoundingClientRect(),c=e.getBoundingClientRect(),l=null==(i=e.parentElement)?void 0:i.getBoundingClientRect();if(!l)throw new Error;var h=n(u,c,l),f=Object(r.a)(h,2),d=f[0],p=f[1];e.style.top=d+"px",e.style.left=p+"px"},f=function(t,e,n){var i=t.state.selection,o=i.from,a=i.to,s=t.coordsAtPos(o),u=t.coordsAtPos(a),c=e.getBoundingClientRect(),l=e.parentElement;if(!l)throw new Error;var h=n(s,u,c,l.getBoundingClientRect()),f=Object(r.a)(h,2),d=f[0],p=f[1];e.style.top=d+"px",e.style.left=p+"px"},d=function(t){return Object.assign(Object.create(t),t).setTime(Date.now())},p=function(t){return function(e,n){return function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=[];return t.descendants((function(t,r){if(n.push({node:t,pos:r}),!e)return!1})),n}(e,n).filter((function(e){return t(e.node)}))}},g=function(t){return function(e){return function(t){return function(e){for(var n=e.depth;n>0;n--){var r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}}(t)(e.$from)}},m=function(t,e){if(t instanceof a.c){var n=t.node,r=t.$from;return function(t,e){return Array.isArray(t)&&t.indexOf(e.type)>-1||e.type===t}(e,n)?{node:n,pos:r.pos,start:r.start(r.depth),depth:r.depth}:void 0}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return h})),n.d(e,"b",(function(){return d})),n.d(e,"c",(function(){return s}));var r=n(0),i=n(1),o=n(2),a=n(3),s=function(){function t(){Object(i.a)(this,t)}return Object(o.a)(t,[{key:"eq",value:function(t){return this==t}},{key:"range",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return new u(t,e,this)}}]),t}();s.prototype.startSide=s.prototype.endSide=0,s.prototype.point=!1,s.prototype.mapMode=a.h.TrackDel;var u=Object(o.a)((function t(e,n,r){Object(i.a)(this,t),this.from=e,this.to=n,this.value=r}));function c(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}var l=function(){function t(e,n,r,o){Object(i.a)(this,t),this.from=e,this.to=n,this.value=r,this.maxPoint=o}return Object(o.a)(t,[{key:"length",get:function(){return this.to[this.to.length-1]}},{key:"findIndex",value:function(t,e,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=n?this.to:this.from,o=r,a=i.length;;){if(o==a)return o;var s=o+a>>1,u=i[s]-t||(n?this.value[s].endSide:this.value[s].startSide)-e;if(s==o)return u>=0?o:a;u>=0?a=s:o=s+1}}},{key:"between",value:function(t,e,n,r){for(var i=this.findIndex(e,-1e9,!0),o=this.findIndex(n,1e9,!1,i);i(d=n.mapPos(h,c.endSide))||f==d&&c.startSide>0&&c.endSide<=0)continue;(d-f||c.endSide-c.startSide)<0||(a<0&&(a=f),c.point&&(s=Math.max(s,d-f)),r.push(c),i.push(f-a),o.push(d-a))}return{mapped:r.length?new t(i,o,r,s):null,pos:a}}}]),t}(),h=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.empty,o=arguments.length>3?arguments[3]:void 0;Object(i.a)(this,t),this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=o}return Object(o.a)(t,[{key:"length",get:function(){var t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}},{key:"size",get:function(){if(this.isEmpty)return 0;var t,e=this.nextLayer.size,n=Object(r.a)(this.chunk);try{for(n.s();!(t=n.n()).done;){e+=t.value.value.length}}catch(i){n.e(i)}finally{n.f()}return e}},{key:"chunkEnd",value:function(t){return this.chunkPos[t]+this.chunk[t].length}},{key:"update",value:function(e){var n=e.add,r=void 0===n?[]:n,i=e.sort,o=void 0!==i&&i,a=e.filterFrom,s=void 0===a?0:a,l=e.filterTo,h=void 0===l?this.length:l,f=e.filter;if(0==r.length&&!f)return this;if(o&&r.slice().sort(c),this.isEmpty)return r.length?t.of(r):this;for(var p=new g(this,null,-1).goto(0),m=0,v=[],y=new d;p.value||m=0){var b=r[m++];y.addInner(b.from,b.to,b.value)||v.push(b)}else 1==p.rangeIndex&&p.chunkIndexthis.chunkEnd(p.chunkIndex)||hp.to||h=i&&t<=i+o.length&&!1===o.between(i,t-i,e-i,n))return}this.nextLayer.between(t,e,n)}}},{key:"iter",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return m.from([this]).goto(t)}},{key:"isEmpty",get:function(){return this.nextLayer==this}}],[{key:"iter",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return m.from(t).goto(e)}},{key:"compare",value:function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,o=t.filter((function(t){return t.maxPoint>0||!t.isEmpty&&t.maxPoint>=i})),a=e.filter((function(t){return t.maxPoint>0||!t.isEmpty&&t.maxPoint>=i})),s=p(o,a,n),u=new y(o,s,i),c=new y(a,s,i);n.iterGaps((function(t,e,n){return b(u,t,c,e,n,r)})),n.empty&&0==n.length&&b(u,0,c,0,0,r)}},{key:"eq",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;null==r&&(r=1e9);var i=t.filter((function(t){return!t.isEmpty&&e.indexOf(t)<0})),o=e.filter((function(e){return!e.isEmpty&&t.indexOf(e)<0}));if(i.length!=o.length)return!1;if(!i.length)return!0;for(var a=p(i,o),s=new y(i,a,0).goto(n),u=new y(o,a,0).goto(n);;){if(s.to!=u.to||!O(s.active,u.active)||s.point&&(!u.point||!s.point.eq(u.point)))return!1;if(s.to>r)return!0;s.next(),u.next()}}},{key:"spans",value:function(t,e,n,r){for(var i,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,a=new y(t,null,o,null===(i=r.filterPoint)||void 0===i?void 0:i.bind(r)).goto(e),s=e,u=a.openStart;;){var c=Math.min(a.to,n);if(a.point?(r.point(s,c,a.point,a.activeForPoint(a.to),u),u=a.openEnd(c)+(a.to>c?1:0)):c>s&&(r.span(s,c,a.active,u),u=a.openEnd(c)),a.to>n)break;s=a.to,a.next()}return u}},{key:"of",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=new d,o=Object(r.a)(t instanceof u?[t]:n?f(t):t);try{for(o.s();!(e=o.n()).done;){var a=e.value;i.add(a.from,a.to,a.value)}}catch(s){o.e(s)}finally{o.f()}return i.finish()}}]),t}();function f(t){if(t.length>1)for(var e=t[0],n=1;n0)return t.slice().sort(c);e=r}return t}h.empty=new h([],[],null,-1),h.empty.nextLayer=h.empty;var d=function(){function t(){Object(i.a)(this,t),this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}return Object(o.a)(t,[{key:"finishChunk",value:function(t){this.chunks.push(new l(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}},{key:"add",value:function(e,n,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new t)).add(e,n,r)}},{key:"addInner",value:function(t,e,n){var r=t-this.lastTo||n.startSide-this.last.endSide;if(r<=0&&(t-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(e-this.chunkStart),this.last=n,this.lastFrom=t,this.lastTo=e,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,e-t)),!0)}},{key:"addChunk",value:function(t,e){if((t-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(t);var n=e.value.length-1;return this.last=e.value[n],this.lastFrom=e.from[n]+t,this.lastTo=e.to[n]+t,!0}},{key:"finish",value:function(){return this.finishInner(h.empty)}},{key:"finishInner",value:function(t){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return t;var e=new h(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,e}}]),t}();function p(t,e,n){var i,o=new Map,a=Object(r.a)(t);try{for(a.s();!(i=a.n()).done;)for(var s=i.value,u=0;u3&&void 0!==arguments[3]?arguments[3]:0;Object(i.a)(this,t),this.layer=e,this.skip=n,this.minPoint=r,this.rank=o}return Object(o.a)(t,[{key:"startSide",get:function(){return this.value?this.value.startSide:0}},{key:"endSide",get:function(){return this.value?this.value.endSide:0}},{key:"goto",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.chunkIndex=this.rangeIndex=0,this.gotoInner(t,e,!1),this}},{key:"gotoInner",value:function(t,e,n){for(;this.chunkIndex=this.minPoint)break}}},{key:"setRangeIndex",value:function(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex1&&void 0!==arguments[1]?arguments[1]:-1e9,i=Object(r.a)(this.heap);try{for(i.s();!(e=i.n()).done;){var o=e.value;o.goto(t,n)}}catch(s){i.e(s)}finally{i.f()}for(var a=this.heap.length>>1;a>=0;a--)v(this.heap,a);return this.next(),this}},{key:"forward",value:function(t,e){var n,i=Object(r.a)(this.heap);try{for(i.s();!(n=i.n()).done;){n.value.forward(t,e)}}catch(a){i.e(a)}finally{i.f()}for(var o=this.heap.length>>1;o>=0;o--)v(this.heap,o);(this.to-t||this.value.endSide-e)<0&&this.next()}},{key:"next",value:function(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{var t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),v(this.heap,0)}}}],[{key:"from",value:function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,i=[],o=0;o=r&&i.push(new g(a,n,r,o));return 1==i.length?i[0]:new t(i)}}]),t}();function v(t,e){for(var n=t[e];;){var r=1+(e<<1);if(r>=t.length)break;var i=t[r];if(r+1=0&&(i=t[r+1],r++),n.compare(i)<0)break;t[r]=n,t[e]=i,e=r}}var y=function(){function t(e,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){return!0};Object(i.a)(this,t),this.minPoint=r,this.filterPoint=o,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=m.from(e,n,r)}return Object(o.a)(t,[{key:"goto",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.cursor.goto(t,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=e,this.openStart=-1,this.next(),this}},{key:"forward",value:function(t,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(t,e)}},{key:"removeActive",value:function(t){w(this.active,t),w(this.activeTo,t),w(this.activeRank,t),this.minActive=x(this.active,this.activeTo)}},{key:"addActive",value:function(t){for(var e=0,n=this.cursor,r=n.value,i=n.to,o=n.rank;e-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>t){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),n&&w(n,i)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}var o=this.cursor.value;if(o.point)if(e&&this.cursor.to==this.to&&this.cursor.fromt&&this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(n),this.cursor.next()}}if(n){for(var a=0;a=0&&!(this.activeRank[n]t||this.activeTo[n]==t&&this.active[n].endSide>=this.point.endSide)&&e.push(this.active[n]);return e.reverse()}},{key:"openEnd",value:function(t){for(var e=0,n=this.activeTo.length-1;n>=0&&this.activeTo[n]>t;n--)e++;return e}}]),t}();function b(t,e,n,r,i,o){t.goto(e),n.goto(r);for(var a=r+i,s=r,u=r-e;;){var c=t.to+u-n.to||t.endSide-n.endSide,l=c<0?t.to+u:n.to,h=Math.min(l,a);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&O(t.activeForPoint(t.to+u),n.activeForPoint(n.to))||o.comparePoint(s,h,t.point,n.point):h>s&&!O(t.active,n.active)&&o.compareRange(s,h,t.active,n.active),l>a)break;s=l,c<=0&&t.next(),c>=0&&n.next()}}function O(t,e){if(t.length!=e.length)return!1;for(var n=0;n=e;r--)t[r+1]=t[r];t[e]=n}function x(t,e){for(var n=-1,r=1e9,i=0;io?0:o+e:e>o?o:e,n=n>0?n:0,r.length<1e4)(i=Array.from(r)).unshift(e,n),[].splice.apply(t,i);else for(n&&[].splice.apply(t,[e,n]);a0?(r(t,t.length,0,e),t):e}n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(88),i=n(86);function o(t,e,n){for(var o=(n.before||"")+(e||"")+(n.after||""),u=[],c=[],l={},h=-1;++h=b||(O+19&&void 0!==arguments[9]?arguments[9]:0,f=arguments.length>10?arguments[10]:void 0;Object(u.a)(this,t),this.p=e,this.stack=n,this.state=r,this.reducePos=i,this.pos=o,this.score=a,this.buffer=s,this.bufferBase=c,this.curContext=l,this.lookAhead=h,this.parent=f}return Object(c.a)(t,[{key:"toString",value:function(){return"[".concat(this.stack.filter((function(t,e){return e%3==0})).concat(this.state),"]@").concat(this.pos).concat(this.score?"!"+this.score:"")}},{key:"context",get:function(){return this.curContext?this.curContext.context:null}},{key:"pushState",value:function(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}},{key:"reduce",value:function(t){var e=t>>19,n=65535&t,r=this.p.parser,i=r.dynamicPrecedence(n);if(i&&(this.score+=i),0==e)return no;)this.stack.pop();this.reduceContext(n,a)}},{key:"storeNode",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:4,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(0==t){var o=this,a=this.buffer.length;if(0==a&&o.parent&&(a=o.bufferBase-o.parent.bufferBase,o=o.parent),a>0&&0==o.buffer[a-4]&&o.buffer[a-1]>-1){if(e==n)return;if(o.buffer[a-2]>=e)return void(o.buffer[a-2]=n)}}if(i&&this.pos!=n){var s=this.buffer.length;if(s>0&&0!=this.buffer[s-4])for(;s>0&&this.buffer[s-2]>n;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,r>4&&(r-=4);this.buffer[s]=t,this.buffer[s+1]=e,this.buffer[s+2]=n,this.buffer[s+3]=r}else this.buffer.push(t,e,n,r)}},{key:"shift",value:function(t,e,n){var r=this.pos;if(131072&t)this.pushState(65535&t,this.pos);else if(0==(262144&t)){var i=t,o=this.p.parser;(n>this.pos||e<=o.maxNode)&&(this.pos=n,o.stateFlag(i,1)||(this.reducePos=n)),this.pushState(i,r),this.shiftContext(e,r),e<=o.maxNode&&this.buffer.push(e,r,n,4)}else this.pos=n,this.shiftContext(e,r),e<=this.p.parser.maxNode&&this.buffer.push(e,r,n,4)}},{key:"apply",value:function(t,e,n){65536&t?this.reduce(t):this.shift(t,e,n)}},{key:"useNode",value:function(t,e){var n=this.p.reused.length-1;(n<0||this.p.reused[n]!=t)&&(this.p.reused.push(t),n++);var r=this.pos;this.reducePos=this.pos=r+t.length,this.pushState(e,r),this.buffer.push(n,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}},{key:"split",value:function(){for(var e=this,n=e.buffer.length;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;for(var r=e.buffer.slice(n),i=e.bufferBase+n;e&&i==e.bufferBase;)e=e.parent;return new t(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}},{key:"recoverByDelete",value:function(t,e){var n=t<=this.p.parser.maxNode;n&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,n?8:4),this.pos=this.reducePos=e,this.score-=190}},{key:"canShift",value:function(t){for(var e=new d(this);;){var n=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(0==(65536&n))return!0;if(0==n)return!1;e.reduce(n)}}},{key:"recoverByInsert",value:function(t){if(this.stack.length>=300)return[];var e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){for(var n,r=[],i=0;i>19,r=65535&t,i=this.stack.length-3*n;if(i<0||e.getGoto(this.stack[i],r,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reduce(t),!0}},{key:"forceAll",value:function(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}},{key:"deadEnd",get:function(){if(3!=this.stack.length)return!1;var t=this.p.parser;return 65535==t.data[t.stateSlot(this.state,1)]&&!t.stateSlot(this.state,4)}},{key:"restart",value:function(){this.state=this.stack[0],this.stack.length=0}},{key:"sameState",value:function(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(var e=0;ethis.lookAhead&&(this.emitLookAhead(),this.lookAhead=t)}},{key:"close",value:function(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}],[{key:"start",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=e.parser.context;return new t(e,[],n,r,r,0,[],0,i?new f(i,i.start):null,0,null)}}]),t}(),f=Object(c.a)((function t(e,n){Object(u.a)(this,t),this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}));!function(t){t[t.Insert=200]="Insert",t[t.Delete=190]="Delete",t[t.Reduce=100]="Reduce",t[t.MaxNext=4]="MaxNext",t[t.MaxInsertStackDepth=300]="MaxInsertStackDepth",t[t.DampenInsertStackDepth=120]="DampenInsertStackDepth"}(r||(r={}));var d=function(){function t(e){Object(u.a)(this,t),this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}return Object(c.a)(t,[{key:"reduce",value:function(t){var e=65535&t,n=t>>19;0==n?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(n-1);var r=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=r}}]),t}(),p=function(){function t(e,n,r){Object(u.a)(this,t),this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,0==this.index&&this.maybeNext()}return Object(c.a)(t,[{key:"maybeNext",value:function(){var t=this.stack.parent;null!=t&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}},{key:"id",get:function(){return this.buffer[this.index-4]}},{key:"start",get:function(){return this.buffer[this.index-3]}},{key:"end",get:function(){return this.buffer[this.index-2]}},{key:"size",get:function(){return this.buffer[this.index-1]}},{key:"next",value:function(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}},{key:"fork",value:function(){return new t(this.stack,this.pos,this.index)}}],[{key:"create",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.bufferBase+e.buffer.length;return new t(e,n,n-e.bufferBase)}}]),t}(),g=Object(c.a)((function t(){Object(u.a)(this,t),this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0})),m=new g,v=function(){function t(e,n){Object(u.a)(this,t),this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=m,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}return Object(c.a)(t,[{key:"resolveOffset",value:function(t,e){for(var n=this.range,r=this.rangeIndex,i=this.pos+t;in.to:i>=n.to;){if(r==this.ranges.length-1)return null;var a=this.ranges[++r];i+=a.from-n.to,n=a}return i}},{key:"peek",value:function(t){var e,n,r=this.chunkOff+t;if(r>=0&&r=this.chunk2Pos&&ea.to&&(this.chunk2=this.chunk2.slice(0,a.to-e)),n=this.chunk2.charCodeAt(0)}}return e>=this.token.lookAhead&&(this.token.lookAhead=e+1),n}},{key:"acceptToken",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e?this.resolveOffset(e,-1):this.pos;if(null==n||n=this.chunk2Pos&&this.posthis.range.to?n.slice(0,this.range.to-this.pos):n,this.chunkPos=this.pos,this.chunkOff=0}}},{key:"readNext",value:function(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}},{key:"advance",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}},{key:"setDone",value:function(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}},{key:"reset",value:function(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=m,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);var n,r="",i=Object(s.a)(this.ranges);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o.from>=e)break;o.to>t&&(r+=this.input.read(Math.max(o.from,t),Math.min(o.to,e)))}}catch(a){i.e(a)}finally{i.f()}return r}}]),t}(),y=function(){function t(e,n){Object(u.a)(this,t),this.data=e,this.id=n}return Object(c.a)(t,[{key:"token",value:function(t,e){!function(t,e,n,r){var i=0,o=1<0){var l=t[c];if(s.allows(l)&&(-1==e.token.value||e.token.value==l||a.overrides(l,e.token.value))){e.acceptToken(l);break}}for(var h=e.next,f=0,d=t[i+2];f>1,g=u+p+(p<<1),m=t[g],v=t[g+1];if(h=v)){i=t[g+2],e.advance();continue t}f=p+1}}break}}(this.data,t,e,this.id)}}]),t}();y.prototype.contextual=y.prototype.fallback=y.prototype.extend=!1;var b=Object(c.a)((function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(u.a)(this,t),this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}));function O(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Uint16Array;if("string"!=typeof t)return t;for(var n=null,r=0,i=0;r=92&&a--,a>=34&&a--;var u=a-32;if(u>=46&&(u-=46,s=!0),o+=u,s)break;o*=46}n?n[i++]=o:n=new e(o)}return n}var w,k="undefined"!=typeof t&&/\bparse\b/.test(Object({NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}).LOG),x=null;function _(t,e,n){var r=t.fullCursor();for(r.moveTo(e);;)if(!(n<0?r.childBefore(e):r.childAfter(e)))for(;;){if((n<0?r.toe)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}!function(t){t[t.Margin=25]="Margin"}(w||(w={}));var S,E=function(){function t(e,n){Object(u.a)(this,t),this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}return Object(c.a)(t,[{key:"nextFragment",value:function(){var t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?_(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?_(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}},{key:"nodeAt",value:function(t){if(tt)return this.nextStart=o,null;if(i instanceof l.f){if(o==t){if(o=Math.max(this.safeFrom,t)&&(this.trees.push(i),this.start.push(o),this.index.push(0))}else this.index[e]++,this.nextStart=o+i.length}else this.trees.pop(),this.start.pop(),this.index.pop()}}}]),t}(),C=function(){function t(e,n){Object(u.a)(this,t),this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map((function(t){return new g}))}return Object(c.a)(t,[{key:"getActions",value:function(t){for(var e=0,n=null,r=t.p.parser,i=r.tokenizers,o=r.stateSlot(t.state,3),a=t.curContext?t.curContext.hash:0,s=0,u=0;ul.end+25&&(s=Math.max(l.lookAhead,s)),0!=l.value)){var h=e;if(l.extended>-1&&(e=this.addActions(t,l.extended,l.end,e)),e=this.addActions(t,l.value,l.end,e),!c.extend&&(n=l,e>h))break}}for(;this.actions.length>e;)this.actions.pop();return s&&t.setLookAhead(s),n||t.pos!=this.stream.end||((n=new g).value=t.p.parser.eofTerm,n.start=n.end=t.pos,e=this.addActions(t,n.value,n.end,e)),this.mainToken=n,this.actions}},{key:"getMainToken",value:function(t){if(this.mainToken)return this.mainToken;var e=new g,n=t.pos,r=t.p;return e.start=n,e.end=Math.min(n+1,r.stream.end),e.value=n==r.stream.end?r.parser.eofTerm:0,e}},{key:"updateCachedToken",value:function(t,e,n){if(e.token(this.stream.reset(n.pos,t),n),t.value>-1){for(var r=n.p.parser,i=0;i=0&&n.p.parser.dialect.allows(o>>1)){0==(1&o)?t.value=o>>1:t.extended=o>>1;break}}}else t.value=0,t.end=Math.min(n.p.stream.end,n.pos+1)}},{key:"putAction",value:function(t,e,n,r){for(var i=0;i4*e.bufferLength?new E(r,e.nodeSet):null}return Object(c.a)(t,[{key:"parsedPos",get:function(){return this.minStackPos}},{key:"advance",value:function(){for(var t,e,n=this.stacks,r=this.minStackPos,i=this.stacks=[],o=0;or)i.push(a);else{if(this.advanceStack(a,i,n))continue;t||(t=[],e=[]),t.push(a);var u=this.tokens.getMainToken(a);e.push(u.value,u.end)}break}if(!i.length){var c=t&&function(t){var e,n=null,r=Object(s.a)(t);try{for(r.s();!(e=r.n()).done;){var i=e.value,o=i.p.stoppedAt;(i.pos==i.p.stream.end||null!=o&&i.pos>o)&&i.p.parser.stateFlag(i.state,2)&&(!n||n.scorethis.stoppedAt?t[0]:this.runRecovery(t,e,i);if(l)return this.stackToTree(l.forceAll())}if(this.recovering){var h=1==this.recovering?1:3*this.recovering;if(i.length>h)for(i.sort((function(t,e){return e.score-t.score}));i.length>h;)i.pop();i.some((function(t){return t.reducePos>r}))&&this.recovering--}else if(i.length>1)t:for(var f=0;f200&&g.buffer.length>200){if(!((d.score-g.score||d.buffer.length-g.buffer.length)>0)){i.splice(f--,1);continue t}i.splice(p--,1)}}this.minStackPos=i[0].pos;for(var m=1;m ":"";if(null!=this.stoppedAt&&r>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments)for(var a=t.curContext&&t.curContext.tracker.strict,s=a?t.curContext.hash:0,u=this.fragments.nodeAt(r);u;){var c=this.parser.nodeSet.types[u.type.id]==u.type?i.getGoto(t.state,u.type.id):-1;if(c>-1&&u.length&&(!a||(u.prop(l.b.contextHash)||0)==s))return t.useNode(u,c),k&&console.log(o+this.stackID(t)+" (via reuse of ".concat(i.getName(u.type.id),")")),!0;if(!(u instanceof l.f)||0==u.children.length||u.positions[0]>0)break;var h=u.children[0];if(!(h instanceof l.f&&0==u.positions[0]))break;u=h}var f=i.stateSlot(t.state,4);if(f>0)return t.reduce(f),k&&console.log(o+this.stackID(t)+" (via always-reduce ".concat(i.getName(65535&f),")")),!0;for(var d=this.tokens.getActions(t),p=0;pr?e.push(b):n.push(b)}return!1}},{key:"advanceFully",value:function(t,e){for(var n=t.pos;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>n)return A(t,e),!0}}},{key:"runRecovery",value:function(t,e,n){for(var r=null,i=!1,o=0;o ":"";if(a.deadEnd){if(i)continue;if(i=!0,a.restart(),k&&console.log(l+this.stackID(a)+" (restarted)"),this.advanceFully(a,n))continue}for(var h=a.split(),f=l,d=0;h.forceReduce()&&d<10;d++){if(k&&console.log(f+this.stackID(h)+" (via force-reduce)"),this.advanceFully(h,n))break;k&&(f=this.stackID(h)+" -> ")}var p,g=Object(s.a)(a.recoverByInsert(u));try{for(g.s();!(p=g.n()).done;){var m=p.value;k&&console.log(l+this.stackID(m)+" (via recover-insert)"),this.advanceFully(m,n)}}catch(v){g.e(v)}finally{g.f()}this.stream.end>a.pos?(c==a.pos&&(c++,u=0),a.recoverByDelete(u,c),k&&console.log(l+this.stackID(a)+" (via recover-delete ".concat(this.parser.getName(u),")")),A(a,n)):(!r||r.score=0)f(b,m,g[v++]);else{for(var w=g[v+-b],k=-b;k>0;k--)f(g[v++],m,w);v++}}}catch(S){p.e(S)}finally{p.f()}}r.nodeSet=new l.c(i.map((function(e,n){return l.d.define({name:n>=r.minRepeatTerm?void 0:e,id:n,props:c[n],top:a.indexOf(n)>-1,error:0==n,skipped:t.skippedNodes&&t.skippedNodes.indexOf(n)>-1})}))),r.strict=!1,r.bufferLength=l.a;var x=O(t.tokenData);if(r.context=t.context,r.specialized=new Uint16Array(t.specialized?t.specialized.length:0),r.specializers=[],t.specialized)for(var _=0;_2&&void 0!==arguments[2]&&arguments[2],r=this.goto;if(e>=r[0])return-1;for(var i=r[e+1];;){var o=r[i++],a=1&o,s=r[i++];if(a&&n)return s;for(var u=i+(o>>1);i0}},{key:"validAction",value:function(t,e){if(e==this.stateSlot(t,4))return!0;for(var n=this.stateSlot(t,1);;n+=3){if(65535==this.data[n]){if(1!=this.data[n+1])return!1;n=P(this.data,n+2)}if(e==P(this.data,n+1))return!0}}},{key:"nextStates",value:function(t){for(var e=this,n=[],r=this.stateSlot(t,1);;r+=3){if(65535==this.data[r]){if(1!=this.data[r+1])break;r=P(this.data,r+2)}0==(1&this.data[r+2])&&function(){var t=e.data[r+1];n.some((function(e,n){return 1&n&&e==t}))||n.push(e.data[r],t)}()}return n}},{key:"overrides",value:function(t,e){var n=R(this.data,this.tokenPrecTable,e);return n<0||R(this.data,this.tokenPrecTable,t)=0&&(n[a]=!0)}}catch(f){i.e(f)}finally{i.f()}}for(var u=null,c=0;c0&&("\r"===s||"\n"===s)&&"html"===u.type&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),s=" "),o.push(e.handle(u,t,e,{before:s,after:c})),s=o[o.length-1].slice(-1)}return r.pop(),o.join("")}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(32);function i(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Object(r.a)(t)););return t}function o(){return o="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=i(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},o.apply(this,arguments)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return je})),n.d(e,"b",(function(){return Le})),n.d(e,"c",(function(){return Ue}));var r=n(9),i=n(7),o=n(24),a={};if("undefined"!=typeof navigator&&"undefined"!=typeof document){var s=/Edge\/(\d+)/.exec(navigator.userAgent),u=/MSIE \d/.test(navigator.userAgent),c=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),l=a.ie=!!(u||c||s);a.ie_version=u?document.documentMode||6:c?+c[1]:s?+s[1]:null,a.gecko=!l&&/gecko\/(\d+)/i.test(navigator.userAgent),a.gecko_version=a.gecko&&+(/Firefox\/(\d+)/.exec(navigator.userAgent)||[0,0])[1];var h=!l&&/Chrome\/(\d+)/.exec(navigator.userAgent);a.chrome=!!h,a.chrome_version=h&&+h[1],a.safari=!l&&/Apple Computer/.test(navigator.vendor),a.ios=a.safari&&(/Mobile\/\w+/.test(navigator.userAgent)||navigator.maxTouchPoints>2),a.mac=a.ios||/Mac/.test(navigator.platform),a.android=/Android \d/.test(navigator.userAgent),a.webkit="webkitFontSmoothing"in document.documentElement.style,a.webkit_version=a.webkit&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]}var f=function(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e},d=function(t){var e=t.assignedSlot||t.parentNode;return e&&11==e.nodeType?e.host:e},p=null,g=function(t,e,n){var r=p||(p=document.createRange());return r.setEnd(t,null==n?t.nodeValue.length:n),r.setStart(t,e||0),r},m=function(t,e,n,r){return n&&(y(t,e,n,r,-1)||y(t,e,n,r,1))},v=/^(img|br|input|textarea|hr)$/i;function y(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:b(t))){var o=t.parentNode;if(1!=o.nodeType||O(t)||v.test(t.nodeName)||"false"==t.contentEditable)return!1;e=f(t)+(i<0?0:1),t=o}else{if(1!=t.nodeType)return!1;if("false"==(t=t.childNodes[e+(i<0?-1:0)]).contentEditable)return!1;e=i<0?b(t):0}}}function b(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function O(t){for(var e,n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}var w=function(t){var e=t.isCollapsed;return e&&a.chrome&&t.rangeCount&&!t.getRangeAt(0).collapsed&&(e=!1),e};function k(t,e){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function x(t){return{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function _(t,e){return"number"==typeof t?t:t[e]}function S(t){var e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function E(t,e,n){for(var r=t.someProp("scrollThreshold")||0,i=t.someProp("scrollMargin")||5,o=t.dom.ownerDocument,a=n||t.dom;a;a=d(a))if(1==a.nodeType){var s=a==o.body||1!=a.nodeType,u=s?x(o):S(a),c=0,l=0;if(e.topu.bottom-_(r,"bottom")&&(l=e.bottom-u.bottom+_(i,"bottom")),e.leftu.right-_(r,"right")&&(c=e.right-u.right+_(i,"right")),c||l)if(s)o.defaultView.scrollBy(c,l);else{var h=a.scrollLeft,f=a.scrollTop;l&&(a.scrollTop+=l),c&&(a.scrollLeft+=c);var p=a.scrollLeft-h,g=a.scrollTop-f;e={left:e.left-p,top:e.top-g,right:e.right-p,bottom:e.bottom-g}}if(s)break}}function C(t){for(var e=[],n=t.ownerDocument;t&&(e.push({dom:t,top:t.scrollTop,left:t.scrollLeft}),t!=n);t=d(t));return e}function T(t,e){for(var n=0;n=s){a=Math.max(f.bottom,a),s=Math.min(f.top,s);var d=f.left>e.left?f.left-e.left:f.right=(f.left+f.right)/2?1:0));continue}}!n&&(e.left>=f.right&&e.top>=f.top||e.left>=f.left&&e.top>=f.bottom)&&(o=c+1)}}return n&&3==n.nodeType?function(t,e){for(var n=t.nodeValue.length,r=document.createRange(),i=0;i=(o.left+o.right)/2?1:0)}}return{node:t,offset:0}}(n,r):!n||i&&1==n.nodeType?{node:t,offset:o}:D(n,r)}function M(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function j(t,e,n){var r=t.childNodes.length;if(r&&n.tope.top&&o++}i==t.dom&&o==i.childNodes.length-1&&1==i.lastChild.nodeType&&e.top>i.lastChild.getBoundingClientRect().bottom?l=t.state.doc.content.size:0!=o&&1==i.nodeType&&"BR"==i.childNodes[o-1].nodeName||(l=function(t,e,n,r){for(var i=-1,o=e;o!=t.dom;){var a=t.docView.nearestDesc(o,!0);if(!a)return null;if(a.node.isBlock&&a.parent){var s=a.dom.getBoundingClientRect();if(s.left>r.left||s.top>r.top)i=a.posBefore;else{if(!(s.right-1?i:t.docView.posFromDOM(e,n)}(t,i,o,e))}null==l&&(l=function(t,e,n){var r=D(e,n),i=r.node,o=r.offset,a=-1;if(1==i.nodeType&&!i.firstChild){var s=i.getBoundingClientRect();a=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return t.docView.posFromDOM(i,o,a)}(t,h,e));var v=t.docView.nearestDesc(h,!0);return{pos:l,inside:v?v.posAtStart-v.border:-1}}function P(t,e){var n=t.getClientRects();return n.length?n[e<0?0:n.length-1]:t.getBoundingClientRect()}var R=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function L(t,e,n){var r=t.docView.domFromPos(e,n<0?-1:1),i=r.node,o=r.offset,s=a.webkit||a.gecko;if(3==i.nodeType){if(!s||!R.test(i.nodeValue)&&(n<0?o:o!=i.nodeValue.length)){var u=o,c=o,l=n<0?1:-1;return n<0&&!o?(c++,l=-1):n>=0&&o==i.nodeValue.length?(u--,l=1):n<0?u--:c++,F(P(g(i,u,c),l),l<0)}var h=P(g(i,o,o),n);if(a.gecko&&o&&/\s/.test(i.nodeValue[o-1])&&o=0)}if(o&&(n<0||o==b(i))){var v=i.childNodes[o-1],y=3==v.nodeType?g(v,b(v)-(s?0:1)):1!=v.nodeType||"BR"==v.nodeName&&v.nextSibling?null:v;if(y)return F(P(y,1),!1)}if(o=0)}function F(t,e){if(0==t.width)return t;var n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function B(t,e){if(0==t.height)return t;var n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function I(t,e,n){var r=t.state,i=t.root.activeElement;r!=e&&t.updateState(e),i!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),i!=t.dom&&i&&i.focus()}}var Q=/[\u0590-\u08ac]/;var $=null,z=null,q=!1;function W(t,e,n){return $==e&&z==n?q:($=e,z=n,q="up"==n||"down"==n?function(t,e,n){var r=e.selection,i="up"==n?r.$from:r.$to;return I(t,e,(function(){for(var e=t.docView.domFromPos(i.pos,"up"==n?-1:1).node;;){var r=t.docView.nearestDesc(e,!0);if(!r)break;if(r.node.isBlock){e=r.dom;break}e=r.dom.parentNode}for(var o=L(t,i.pos,1),a=e.firstChild;a;a=a.nextSibling){var s=void 0;if(1==a.nodeType)s=a.getClientRects();else{if(3!=a.nodeType)continue;s=g(a,0,a.nodeValue.length).getClientRects()}for(var u=0;uc.top+1&&("up"==n?o.top-c.top>2*(c.bottom-o.top):c.bottom-o.bottom>2*(o.bottom-c.top)))return!1}}return!0}))}(t,e,n):function(t,e,n){var r=e.selection.$head;if(!r.parent.isTextblock)return!1;var i=r.parentOffset,o=!i,a=i==r.parent.content.size,s=t.root.getSelection();return Q.test(r.parent.textContent)&&s.modify?I(t,e,(function(){var e=s.getRangeAt(0),i=s.focusNode,o=s.focusOffset,a=s.caretBidiLevel;s.modify("move",n,"character");var u=!(r.depth?t.docView.domAfterPos(r.before()):t.dom).contains(1==s.focusNode.nodeType?s.focusNode:s.focusNode.parentNode)||i==s.focusNode&&o==s.focusOffset;return s.removeAllRanges(),s.addRange(e),null!=a&&(s.caretBidiLevel=a),u})):"left"==n||"backward"==n?o:a}(t,e,n))}var V=function(t,e,n,r){this.parent=t,this.children=e,this.dom=n,n.pmViewDesc=this,this.contentDOM=r,this.dirty=0},Y={size:{configurable:!0},border:{configurable:!0},posBefore:{configurable:!0},posAtStart:{configurable:!0},posAfter:{configurable:!0},posAtEnd:{configurable:!0},contentLost:{configurable:!0},domAtom:{configurable:!0},ignoreForCoords:{configurable:!0}};V.prototype.matchesWidget=function(){return!1},V.prototype.matchesMark=function(){return!1},V.prototype.matchesNode=function(){return!1},V.prototype.matchesHack=function(t){return!1},V.prototype.parseRule=function(){return null},V.prototype.stopEvent=function(){return!1},Y.size.get=function(){for(var t=0,e=0;ef(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))s=2&t.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==e)for(var u=t;;u=u.parentNode){if(u==this.dom){s=!1;break}if(u.parentNode.firstChild!=u)break}if(null==s&&e==t.childNodes.length)for(var c=t;;c=c.parentNode){if(c==this.dom){s=!0;break}if(c.parentNode.lastChild!=c)break}}return(null==s?n>0:s)?this.posAtEnd:this.posAtStart},V.prototype.nearestDesc=function(t,e){for(var n=!0,r=t;r;r=r.parentNode){var i=this.getDesc(r);if(i&&(!e||i.node)){if(!n||!i.nodeDOM||(1==i.nodeDOM.nodeType?i.nodeDOM.contains(1==t.nodeType?t:t.parentNode):i.nodeDOM==t))return i;n=!1}}},V.prototype.getDesc=function(t){for(var e=t.pmViewDesc,n=e;n;n=n.parent)if(n==this)return e},V.prototype.posFromDOM=function(t,e,n){for(var r=t;r;r=r.parentNode){var i=this.getDesc(r);if(i)return i.localPosFromDOM(t,e,n)}return-1},V.prototype.descAt=function(t){for(var e=0,n=0;et||o instanceof tt){r=t-i;break}i=a}if(r)return this.children[n].domFromPos(r-this.children[n].border,e);for(var s=void 0;n&&!(s=this.children[n-1]).size&&s instanceof H&&s.widget.type.side>=0;n--);if(e<=0){for(var u,c=!0;(u=n?this.children[n-1]:null)&&u.dom.parentNode!=this.contentDOM;n--,c=!1);return u&&e&&c&&!u.border&&!u.domAtom?u.domFromPos(u.size,e):{node:this.contentDOM,offset:u?f(u.dom)+1:0}}for(var l,h=!0;(l=n=c&&e<=u-s.border&&s.node&&s.contentDOM&&this.contentDOM.contains(s.contentDOM))return s.parseRange(t,e,c);t=o;for(var l=a;l>0;l--){var h=this.children[l-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){r=f(h.dom)+1;break}t-=h.size}-1==r&&(r=0)}if(r>-1&&(u>e||a==this.children.length-1)){e=u;for(var d=a+1;du&&oe){var S=h;h=d,d=S}var E=document.createRange();E.setEnd(d.node,d.offset),E.setStart(h.node,h.offset),p.removeAllRanges(),p.addRange(E)}}},V.prototype.ignoreMutation=function(t){return!this.contentDOM&&"selection"!=t.type},Y.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},V.prototype.markDirty=function(t,e){for(var n=0,r=0;r=n:tn){var a=n+i.border,s=o-i.border;if(t>=a&&e<=s)return this.dirty=t==n||e==o?2:1,void(t!=a||e!=s||!i.contentLost&&i.dom.parentNode==this.contentDOM?i.markDirty(t-a,e-a):i.dirty=3);i.dirty=i.dom!=i.contentDOM||i.dom.parentNode!=this.contentDOM||i.children.length?3:2}n=o}this.dirty=2},V.prototype.markParentsDirty=function(){for(var t=1,e=this.parent;e;e=e.parent,t++){var n=1==t?2:1;e.dirty0&&(o=dt(o,0,t,r));for(var s=0;s-1?s:null,c=s&&s.pos<0,l=new ht(this,u&&u.node);!function(t,e,n,r){var i=e.locals(t),o=0;if(0==i.length){for(var a=0;ao;)c.push(i[u++]);var y=o+g.nodeSize;if(g.isText){var b=y;u=0&&!s&&l.syncToMarks(a==n.node.childCount?i.d.none:n.node.child(a).marks,r,t),l.placeWidget(e,t,o)}),(function(e,n,i,a){var u;l.syncToMarks(e.marks,r,t),l.findNodeMatch(e,n,i,a)||c&&t.state.selection.from>o&&t.state.selection.to-1&&l.updateNodeAt(e,n,i,u,t)||l.updateNextNode(e,n,i,t,a)||l.addNode(e,n,i,t,o),o+=e.nodeSize})),l.syncToMarks(U,r,t),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(u&&this.protectLocalComposition(t,u),nt(this.contentDOM,this.children,t),a.ios&&function(t){if("UL"==t.nodeName||"OL"==t.nodeName){var e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}(this.dom))},e.prototype.localCompositionInfo=function(t,e){var n=t.state.selection,i=n.from,o=n.to;if(!(!(t.state.selection instanceof r.h)||ie+this.node.content.size)){var a=t.root.getSelection(),s=function(t,e){for(;;){if(3==t.nodeType)return t;if(1==t.nodeType&&e>0){if(t.childNodes.length>e&&3==t.childNodes[e].nodeType)return t.childNodes[e];e=b(t=t.childNodes[e-1])}else{if(!(1==t.nodeType&&e=n&&s=0&&l+e.length+s>=n)return s+l}}}return-1}(this.node.content,u,i-e,o-e);return c<0?null:{node:s,pos:c,text:u}}return{node:s,pos:-1}}}},e.prototype.protectLocalComposition=function(t,e){var n=e.node,r=e.pos,i=e.text;if(!this.getDesc(n)){for(var o=n;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=null)}var a=new X(this,o,n,i);t.compositionNodes.push(a),this.children=dt(this.children,r,r+i.length,t,a)}},e.prototype.update=function(t,e,n,r){return!(3==this.dirty||!t.sameMarkup(this.node))&&(this.updateInner(t,e,n,r),!0)},e.prototype.updateInner=function(t,e,n,r){this.updateOuterDeco(e),this.node=t,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0},e.prototype.updateOuterDeco=function(t){if(!ct(t,this.outerDeco)){var e=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=at(this.dom,this.nodeDOM,ot(this.outerDeco,this.node,e),ot(t,this.node,e)),this.dom!=n&&(n.pmViewDesc=null,this.dom.pmViewDesc=this),this.outerDeco=t}},e.prototype.selectNode=function(){this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)},e.prototype.deselectNode=function(){this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")},n.domAtom.get=function(){return this.node.isAtom},Object.defineProperties(e.prototype,n),e}(V);function K(t,e,n,r,i){return ut(r,e,t),new Z(null,t,e,n,r,r,r,i,0)}var J=function(t){function e(e,n,r,i,o,a,s){t.call(this,e,n,r,i,o,null,a,s)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={domAtom:{configurable:!0}};return e.prototype.parseRule=function(){for(var t=this.nodeDOM.parentNode;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}},e.prototype.update=function(t,e,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!t.sameMarkup(this.node))&&(this.updateOuterDeco(e),0==this.dirty&&t.text==this.node.text||t.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=t.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=t,this.dirty=0,!0)},e.prototype.inParent=function(){for(var t=this.parent.contentDOM,e=this.nodeDOM;e;e=e.parentNode)if(e==t)return!0;return!1},e.prototype.domFromPos=function(t){return{node:this.nodeDOM,offset:t}},e.prototype.localPosFromDOM=function(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):t.prototype.localPosFromDOM.call(this,e,n,r)},e.prototype.ignoreMutation=function(t){return"characterData"!=t.type&&"selection"!=t.type},e.prototype.slice=function(t,n,r){var i=this.node.cut(t,n),o=document.createTextNode(i.text);return new e(this.parent,i,this.outerDeco,this.innerDeco,o,o,r)},e.prototype.markDirty=function(e,n){t.prototype.markDirty.call(this,e,n),this.dom==this.nodeDOM||0!=e&&n!=this.nodeDOM.nodeValue.length||(this.dirty=3)},n.domAtom.get=function(){return!1},Object.defineProperties(e.prototype,n),e}(Z),tt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={domAtom:{configurable:!0},ignoreForCoords:{configurable:!0}};return e.prototype.parseRule=function(){return{ignore:!0}},e.prototype.matchesHack=function(t){return 0==this.dirty&&this.dom.nodeName==t},n.domAtom.get=function(){return!0},n.ignoreForCoords.get=function(){return"IMG"==this.dom.nodeName},Object.defineProperties(e.prototype,n),e}(V),et=function(t){function e(e,n,r,i,o,a,s,u,c,l){t.call(this,e,n,r,i,o,a,s,c,l),this.spec=u}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.update=function(e,n,r,i){if(3==this.dirty)return!1;if(this.spec.update){var o=this.spec.update(e,n,r);return o&&this.updateInner(e,n,r,i),o}return!(!this.contentDOM&&!e.isLeaf)&&t.prototype.update.call(this,e,n,r,i)},e.prototype.selectNode=function(){this.spec.selectNode?this.spec.selectNode():t.prototype.selectNode.call(this)},e.prototype.deselectNode=function(){this.spec.deselectNode?this.spec.deselectNode():t.prototype.deselectNode.call(this)},e.prototype.setSelection=function(e,n,r,i){this.spec.setSelection?this.spec.setSelection(e,n,r):t.prototype.setSelection.call(this,e,n,r,i)},e.prototype.destroy=function(){this.spec.destroy&&this.spec.destroy(),t.prototype.destroy.call(this)},e.prototype.stopEvent=function(t){return!!this.spec.stopEvent&&this.spec.stopEvent(t)},e.prototype.ignoreMutation=function(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):t.prototype.ignoreMutation.call(this,e)},e}(Z);function nt(t,e,n){for(var r=t.firstChild,i=!1,o=0;o0;){for(var s=void 0;;)if(r){var u=n.children[r-1];if(!(u instanceof G)){s=u,r--;break}n=u,r=u.children.length}else{if(n==e)break t;r=n.parent.children.indexOf(n),n=n.parent}var c=s.node;if(c){if(c!=t.child(i-1))break;--i,o.set(s,i),a.push(s)}}return{index:i,matched:o,matches:a.reverse()}}(t.node.content,t)};function ft(t,e){return t.type.side-e.type.side}function dt(t,e,n,r,i){for(var o=[],a=0,s=0;a=n||l<=e?o.push(u):(cn&&o.push(u.slice(n-c,u.size,r)))}return o}function pt(t,e){var n=t.root.getSelection(),i=t.state.doc;if(!n.focusNode)return null;var o=t.docView.nearestDesc(n.focusNode),a=o&&0==o.size,s=t.docView.posFromDOM(n.focusNode,n.focusOffset);if(s<0)return null;var u,c,l=i.resolve(s);if(w(n)){for(u=l;o&&!o.node;)o=o.parent;if(o&&o.node.isAtom&&r.c.isSelectable(o.node)&&o.parent&&(!o.node.isInline||!function(t,e,n){for(var r=0==e,i=e==b(t);r||i;){if(t==n)return!0;var o=f(t);if(!(t=t.parentNode))return!1;r=r&&0==o,i=i&&o==b(t)}}(n.focusNode,n.focusOffset,o.dom))){var h=o.posBefore;c=new r.c(s==h?l:i.resolve(h))}}else{var d=t.docView.posFromDOM(n.anchorNode,n.anchorOffset);if(d<0)return null;u=i.resolve(d)}c||(c=xt(t,u,l,"pointer"==e||t.state.selection.head>1,o=Math.min(i,t.length);r-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{var u=G.create(this.top,t[i],e,n);this.top.children.splice(this.index,0,u),this.top=u,this.changed=!0}this.index=0,i++}},ht.prototype.findNodeMatch=function(t,e,n,r){var i,o=-1;if(r>=this.preMatch.index&&(i=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&i.matchesNode(t,e,n))o=this.top.children.indexOf(i,this.index);else for(var a=this.index,s=Math.min(this.top.children.length,a+5);a0?i.max(o):i.min(o),s=a.parent.inlineContent?a.depth?t.doc.resolve(e>0?a.after():a.before()):null:a;return s&&r.f.findFrom(s,e)}function Et(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Ct(t,e,n){var i=t.state.selection;if(!(i instanceof r.h)){if(i instanceof r.c&&i.node.isInline)return Et(t,new r.h(e>0?i.$to:i.$from));var o=St(t.state,e);return!!o&&Et(t,o)}if(!i.empty||n.indexOf("s")>-1)return!1;if(t.endOfTextblock(e>0?"right":"left")){var s=St(t.state,e);return!!(s&&s instanceof r.c)&&Et(t,s)}if(!(a.mac&&n.indexOf("m")>-1)){var u,c=i.$head,l=c.textOffset?null:e<0?c.nodeBefore:c.nodeAfter;if(!l||l.isText)return!1;var h=e<0?c.pos-l.nodeSize:c.pos;return!!(l.isAtom||(u=t.docView.descAt(h))&&!u.contentDOM)&&(r.c.isSelectable(l)?Et(t,new r.c(e<0?t.state.doc.resolve(c.pos-l.nodeSize):c)):!!a.webkit&&Et(t,new r.h(t.state.doc.resolve(e<0?h:h+l.nodeSize))))}}function Tt(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function At(t){var e=t.pmViewDesc;return e&&0==e.size&&(t.nextSibling||"BR"!=t.nodeName)}function Dt(t){var e=t.root.getSelection(),n=e.focusNode,r=e.focusOffset;if(n){var i,o,s=!1;for(a.gecko&&1==n.nodeType&&r0){if(1!=n.nodeType)break;var u=n.childNodes[r-1];if(At(u))i=n,o=--r;else{if(3!=u.nodeType)break;r=(n=u).nodeValue.length}}else{if(jt(n))break;for(var c=n.previousSibling;c&&At(c);)i=n.parentNode,o=f(c),c=c.previousSibling;if(c)r=Tt(n=c);else{if((n=n.parentNode)==t.dom)break;r=0}}s?Nt(t,e,n,r):i&&Nt(t,e,i,o)}}function Mt(t){var e=t.root.getSelection(),n=e.focusNode,r=e.focusOffset;if(n){for(var i,o,a=Tt(n);;)if(r-1)return!1;if(a.mac&&n.indexOf("m")>-1)return!1;var o=i.$from,s=i.$to;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){var u=St(t.state,e);if(u&&u instanceof r.c)return Et(t,u)}if(!o.parent.inlineContent){var c=e<0?o:s,l=i instanceof r.a?r.f.near(c,e):r.f.findFrom(c,e);return!!l&&Et(t,l)}return!1}function Rt(t,e){if(!(t.state.selection instanceof r.h))return!0;var n=t.state.selection,i=n.$head,o=n.$anchor,a=n.empty;if(!i.sameParent(o))return!0;if(!a)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;var s=!i.textOffset&&(e<0?i.nodeBefore:i.nodeAfter);if(s&&!s.isText){var u=t.state.tr;return e<0?u.delete(i.pos-s.nodeSize,i.pos):u.delete(i.pos,i.pos+s.nodeSize),t.dispatch(u),!0}return!1}function Lt(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function Ft(t,e){var n=e.keyCode,r=function(t){var e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}(e);return 8==n||a.mac&&72==n&&"c"==r?Rt(t,-1)||Dt(t):46==n||a.mac&&68==n&&"c"==r?Rt(t,1)||Mt(t):13==n||27==n||(37==n?Ct(t,-1,r)||Dt(t):39==n?Ct(t,1,r)||Mt(t):38==n?Pt(t,-1,r)||Dt(t):40==n?function(t){if(a.safari&&!(t.state.selection.$head.parentOffset>0)){var e=t.root.getSelection(),n=e.focusNode,r=e.focusOffset;if(n&&1==n.nodeType&&0==r&&n.firstChild&&"false"==n.firstChild.contentEditable){var i=n.firstChild;Lt(t,i,!0),setTimeout((function(){return Lt(t,i,!1)}),20)}}}(t)||Pt(t,1,r)||Mt(t):r==(a.mac?"m":"c")&&(66==n||73==n||89==n||90==n))}function Bt(t){var e=t.pmViewDesc;if(e)return e.parseRule();if("BR"==t.nodeName&&t.parentNode){if(a.safari&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){var n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(t.parentNode.lastChild==t||a.safari&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if("IMG"==t.nodeName&&t.getAttribute("mark-placeholder"))return{ignore:!0}}function It(t,e,n,o,s){if(e<0){var u=t.lastSelectionTime>Date.now()-50?t.lastSelectionOrigin:null,c=pt(t,u);if(c&&!t.state.selection.eq(c)){var l=t.state.tr.setSelection(c);"pointer"==u?l.setMeta("pointer",!0):"key"==u&&l.scrollIntoView(),t.dispatch(l)}}else{var h=t.state.doc.resolve(e),f=h.sharedDepth(n);e=h.before(f+1),n=t.state.doc.resolve(n).after(f+1);var d=t.state.selection,p=function(t,e,n){var r=t.docView.parseRange(e,n),o=r.node,s=r.fromOffset,u=r.toOffset,c=r.from,l=r.to,h=t.root.getSelection(),f=null,d=h.anchorNode;if(d&&t.dom.contains(1==d.nodeType?d:d.parentNode)&&(f=[{node:d,offset:h.anchorOffset}],w(h)||f.push({node:h.focusNode,offset:h.focusOffset})),a.chrome&&8===t.lastKeyCode)for(var p=u;p>s;p--){var g=o.childNodes[p-1],m=g.pmViewDesc;if("BR"==g.nodeName&&!m){u=p;break}if(!m||m.size)break}var v=t.state.doc,y=t.someProp("domParser")||i.a.fromSchema(t.state.schema),b=v.resolve(c),O=null,k=y.parse(o,{topNode:b.parent,topMatch:b.parent.contentMatchAt(b.index()),topOpen:!0,from:s,to:u,preserveWhitespace:"pre"!=b.parent.type.whitespace||"full",editableContent:!0,findPositions:f,ruleFromNode:Bt,context:b});if(f&&null!=f[0].pos){var x=f[0].pos,_=f[1]&&f[1].pos;null==_&&(_=x),O={anchor:x+c,head:_+c}}return{doc:k,sel:O,from:c,to:l}}(t,e,n);if(a.chrome&&t.cursorWrapper&&p.sel&&p.sel.anchor==t.cursorWrapper.deco.from){var g=t.cursorWrapper.deco.type.toDOM.nextSibling,m=g&&g.nodeValue?g.nodeValue.length:1;p.sel={anchor:p.sel.anchor+m,head:p.sel.anchor+m}}var v,y,b=t.state.doc,O=b.slice(p.from,p.to);8===t.lastKeyCode&&Date.now()-100=s?o-r:0)+(u-s),s=o}else if(u=u?o-r:0)+(s-u),u=o}return{start:o,endA:s,endB:u}}(O.content,p.doc.content,p.from,v,y);if(!x){if(!(o&&d instanceof r.h&&!d.empty&&d.$head.sameParent(d.$anchor))||t.composing||p.sel&&p.sel.anchor!=p.sel.head){if((a.ios&&t.lastIOSEnter>Date.now()-225||a.android)&&s.some((function(t){return"DIV"==t.nodeName||"P"==t.nodeName}))&&t.someProp("handleKeyDown",(function(e){return e(t,k(13,"Enter"))})))return void(t.lastIOSEnter=0);if(p.sel){var _=Qt(t,t.state.doc,p.sel);_&&!_.eq(t.state.selection)&&t.dispatch(t.state.tr.setSelection(_))}return}x={start:d.from,endA:d.to,endB:d.to}}t.domChangeCount++,t.state.selection.fromt.state.selection.from&&x.start<=t.state.selection.from+2?x.start=t.state.selection.from:x.endA=t.state.selection.to-2&&(x.endB+=t.state.selection.to-x.endA,x.endA=t.state.selection.to)),a.ie&&a.ie_version<=11&&x.endB==x.start+1&&x.endA==x.start&&x.start>p.from&&" \xa0"==p.doc.textBetween(x.start-p.from-1,x.start-p.from+1)&&(x.start--,x.endA--,x.endB--);var S,E=p.doc.resolveNoCache(x.start-p.from),C=p.doc.resolveNoCache(x.endB-p.from),T=E.sameParent(C)&&E.parent.inlineContent;if((a.ios&&t.lastIOSEnter>Date.now()-225&&(!T||s.some((function(t){return"DIV"==t.nodeName||"P"==t.nodeName})))||!T&&E.posx.start&&function(t,e,n,r,i){if(!r.parent.isTextblock||n-e<=i.pos-r.pos||$t(r,!0,!1)n||$t(a,!0,!1)e.content.size?null:xt(t,e.resolve(n.anchor),e.resolve(n.head))}function $t(t,e,n){for(var r=t.depth,i=e?t.end():t.pos;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,i++,e=!1;if(n)for(var o=t.node(r).maybeChild(t.indexAfter(r));o&&!o.isLeaf;)o=o.firstChild,i++;return i}function zt(t,e){for(var n=[],r=e.content,o=e.openStart,a=e.openEnd;o>1&&a>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,a--;var s=r.firstChild;n.push(s.type.name,s.attrs!=s.type.defaultAttrs?s.attrs:null),r=s.content}var u=t.someProp("clipboardSerializer")||i.b.fromSchema(t.state.schema),c=Kt(),l=c.createElement("div");l.appendChild(u.serializeFragment(r,{document:c}));for(var h,f=l.firstChild;f&&1==f.nodeType&&(h=Gt[f.nodeName.toLowerCase()]);){for(var d=h.length-1;d>=0;d--){for(var p=c.createElement(h[d]);l.firstChild;)p.appendChild(l.firstChild);l.appendChild(p),"tbody"!=h[d]&&(o++,a++)}f=l.firstChild}return f&&1==f.nodeType&&f.setAttribute("data-pm-slice",o+" "+a+" "+JSON.stringify(n)),{dom:l,text:t.someProp("clipboardTextSerializer",(function(t){return t(e)}))||e.content.textBetween(0,e.content.size,"\n\n")}}function qt(t,e,n,r,o){var s,u,c=o.parent.type.spec.code;if(!n&&!e)return null;var l=e&&(r||c||!n);if(l){if(t.someProp("transformPastedText",(function(t){e=t(e,c||r)})),c)return e?new i.j(i.c.from(t.state.schema.text(e.replace(/\r\n?/g,"\n"))),0,0):i.j.empty;var h=t.someProp("clipboardTextParser",(function(t){return t(e,o,r)}));if(h)u=h;else{var f=o.marks(),d=t.state.schema,p=i.b.fromSchema(d);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach((function(t){var e=s.appendChild(document.createElement("p"));t&&e.appendChild(p.serializeNode(d.text(t,f)))}))}}else t.someProp("transformPastedHTML",(function(t){n=t(n)})),s=function(t){var e=/^(\s*]*>)*/.exec(t);e&&(t=t.slice(e[0].length));var n,r=Kt().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(t);(n=i&&Gt[i[1].toLowerCase()])&&(t=n.map((function(t){return"<"+t+">"})).join("")+t+n.map((function(t){return""})).reverse().join(""));if(r.innerHTML=t,n)for(var o=0;o=0;u-=2){var c=r.nodes[n[u]];if(!c||c.hasRequiredAttrs())break;o=i.c.from(c.create(n[u+1],o)),a++,s++}return new i.j(o,a,s)}(Xt(u,+m[1],+m[2]),m[3]);else if(u=i.j.maxOpen(function(t,e){if(t.childCount<2)return t;for(var n=function(n){var r=e.node(n).contentMatchAt(e.index(n)),o=void 0,a=[];if(t.forEach((function(t){if(a){var e,n=r.findWrapping(t.type);if(!n)return a=null;if(e=a.length&&o.length&&Yt(n,o,t,a[a.length-1],0))a[a.length-1]=e;else{a.length&&(a[a.length-1]=Ut(a[a.length-1],o.length));var i=Vt(t,n);a.push(i),r=r.matchType(i.type,i.attrs),o=n}}})),a)return{v:i.c.from(a)}},r=e.depth;r>=0;r--){var o=n(r);if(o)return o.v}return t}(u.content,o),!0),u.openStart||u.openEnd){for(var y=0,b=0,O=u.content.firstChild;y=n;r--)t=e[r].create(null,i.c.from(t));return t}function Yt(t,e,n,r,o){if(o=n&&(u=e<0?s.contentMatchAt(0).fillBefore(u,t.childCount>1||a<=o).append(u):u.append(s.contentMatchAt(s.childCount).fillBefore(i.c.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(u))}function Xt(t,e,n){return et.target.nodeValue.length}))?n.flushSoon():n.flush()})),this.currentSelection=new ee,te&&(this.onCharData=function(t){n.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),n.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.suppressingSelectionUpdates=!1};ne.prototype.flushSoon=function(){var t=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((function(){t.flushingSoon=-1,t.flush()}),20))},ne.prototype.forceFlush=function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())},ne.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,Jt),te&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},ne.prototype.stop=function(){var t=this;if(this.observer){var e=this.observer.takeRecords();if(e.length){for(var n=0;n-1)){var t=this.observer?this.observer.takeRecords():[];this.queue.length&&(t=this.queue.concat(t),this.queue.length=0);var e=this.view.root.getSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(e)&&_t(this.view)&&!this.ignoreSelectionChange(e),r=-1,i=-1,o=!1,s=[];if(this.view.editable)for(var u=0;u1){var l=s.filter((function(t){return"BR"==t.nodeName}));if(2==l.length){var h=l[0],f=l[1];h.parentNode&&h.parentNode.parentNode==f.parentNode?f.remove():h.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,i),function(t){if(re)return;re=!0,"normal"==getComputedStyle(t.dom).whiteSpace&&console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.")}(this.view)),this.handleDOMChange(r,i,o,s),this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(e)||mt(this.view),this.currentSelection.set(e))}},ne.prototype.registerMutation=function(t,e){if(e.indexOf(t.target)>-1)return null;var n=this.view.docView.nearestDesc(t.target);if("attributes"==t.type&&(n==this.view.docView||"contenteditable"==t.attributeName||"style"==t.attributeName&&!t.oldValue&&!t.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(t))return null;if("childList"==t.type){for(var r=0;ro.depth?e(t,n,o.nodeAfter,o.before(r),i,!0):e(t,n,o.node(r),o.before(r),i,!1)})))return{v:!0}},s=o.depth+1;s>0;s--){var u=a(s);if(u)return u.v}return!1}function he(t,e,n){t.focused||t.focus();var r=t.state.tr.setSelection(e);"pointer"==n&&r.setMeta("pointer",!0),t.dispatch(r)}function fe(t,e,n,i,o){return le(t,"handleClickOn",e,n,i)||t.someProp("handleClick",(function(n){return n(t,e,i)}))||(o?function(t,e){if(-1==e)return!1;var n,i,o=t.state.selection;o instanceof r.c&&(n=o.node);for(var a=t.state.doc.resolve(e),s=a.depth+1;s>0;s--){var u=s>a.depth?a.nodeAfter:a.node(s);if(r.c.isSelectable(u)){i=n&&o.$from.depth>0&&s>=o.$from.depth&&a.before(o.$from.depth+1)==o.$from.pos?a.before(o.$from.depth):a.before(s);break}}return null!=i&&(he(t,r.c.create(t.state.doc,i),"pointer"),!0)}(t,n):function(t,e){if(-1==e)return!1;var n=t.state.doc.resolve(e),i=n.nodeAfter;return!!(i&&i.isAtom&&r.c.isSelectable(i))&&(he(t,new r.c(n),"pointer"),!0)}(t,n))}function de(t,e,n,r){return le(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",(function(n){return n(t,e,r)}))}function pe(t,e,n,i){return le(t,"handleTripleClickOn",e,n,i)||t.someProp("handleTripleClick",(function(n){return n(t,e,i)}))||function(t,e,n){if(0!=n.button)return!1;var i=t.state.doc;if(-1==e)return!!i.inlineContent&&(he(t,r.h.create(i,0,i.content.size),"pointer"),!0);for(var o=i.resolve(e),a=o.depth+1;a>0;a--){var s=a>o.depth?o.nodeAfter:o.node(a),u=o.before(a);if(s.inlineContent)he(t,r.h.create(i,u+1,u+1+s.content.size),"pointer");else{if(!r.c.isSelectable(s))continue;he(t,r.c.create(i,u),"pointer")}return!0}}(t,n,i)}function ge(t){return ke(t)}oe.keydown=function(t,e){if(t.shiftKey=16==e.keyCode||e.shiftKey,!ye(t,e)&&(t.lastKeyCode=e.keyCode,t.lastKeyCodeTime=Date.now(),!a.android||!a.chrome||13!=e.keyCode))if(229!=e.keyCode&&t.domObserver.forceFlush(),!a.ios||13!=e.keyCode||e.ctrlKey||e.altKey||e.metaKey)t.someProp("handleKeyDown",(function(n){return n(t,e)}))||Ft(t,e)?e.preventDefault():ae(t,"key");else{var n=Date.now();t.lastIOSEnter=n,t.lastIOSEnterFallbackTimeout=setTimeout((function(){t.lastIOSEnter==n&&(t.someProp("handleKeyDown",(function(e){return e(t,k(13,"Enter"))})),t.lastIOSEnter=0)}),200)}},oe.keyup=function(t,e){16==e.keyCode&&(t.shiftKey=!1)},oe.keypress=function(t,e){if(!(ye(t,e)||!e.charCode||e.ctrlKey&&!e.altKey||a.mac&&e.metaKey))if(t.someProp("handleKeyPress",(function(n){return n(t,e)})))e.preventDefault();else{var n=t.state.selection;if(!(n instanceof r.h)||!n.$from.sameParent(n.$to)){var i=String.fromCharCode(e.charCode);t.someProp("handleTextInput",(function(e){return e(t,n.$from.pos,n.$to.pos,i)}))||t.dispatch(t.state.tr.insertText(i).scrollIntoView()),e.preventDefault()}}};var me=a.mac?"metaKey":"ctrlKey";ie.mousedown=function(t,e){t.shiftKey=e.shiftKey;var n=ge(t),r=Date.now(),i="singleClick";r-t.lastClick.time<500&&function(t,e){var n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}(e,t.lastClick)&&!e[me]&&("singleClick"==t.lastClick.type?i="doubleClick":"doubleClick"==t.lastClick.type&&(i="tripleClick")),t.lastClick={time:r,x:e.clientX,y:e.clientY,type:i};var o=t.posAtCoords(ce(e));o&&("singleClick"==i?(t.mouseDown&&t.mouseDown.done(),t.mouseDown=new ve(t,o,e,n)):("doubleClick"==i?de:pe)(t,o.pos,o.inside,e)?e.preventDefault():ae(t,"pointer"))};var ve=function(t,e,n,i){var o,s,u=this;if(this.view=t,this.startDoc=t.state.doc,this.pos=e,this.event=n,this.flushed=i,this.selectNode=n[me],this.allowDefault=n.shiftKey,this.delayedSelectionSync=!1,e.inside>-1)o=t.state.doc.nodeAt(e.inside),s=e.inside;else{var c=t.state.doc.resolve(e.pos);o=c.parent,s=c.depth?c.before():0}this.mightDrag=null;var l=i?null:n.target,h=l?t.docView.nearestDesc(l,!0):null;this.target=h?h.dom:null;var f=t.state.selection;(0==n.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||f instanceof r.c&&f.from<=s&&f.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&a.gecko&&!this.target.hasAttribute("contentEditable")}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((function(){u.view.mouseDown==u&&u.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),ae(t,"pointer")};function ye(t,e){return!!t.composing||!!(a.safari&&Math.abs(e.timeStamp-t.compositionEndedAt)<500)&&(t.compositionEndedAt=-2e8,!0)}ve.prototype.done=function(){var t=this;this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((function(){return mt(t.view)})),this.view.mouseDown=null},ve.prototype.up=function(t){if(this.done(),this.view.dom.contains(3==t.target.nodeType?t.target.parentNode:t.target)){var e=this.pos;this.view.state.doc!=this.startDoc&&(e=this.view.posAtCoords(ce(t))),this.allowDefault||!e?ae(this.view,"pointer"):fe(this.view,e.pos,e.inside,t,this.selectNode)?t.preventDefault():0==t.button&&(this.flushed||a.safari&&this.mightDrag&&!this.mightDrag.node.isAtom||a.chrome&&!(this.view.state.selection instanceof r.h)&&Math.min(Math.abs(e.pos-this.view.state.selection.from),Math.abs(e.pos-this.view.state.selection.to))<=2)?(he(this.view,r.f.near(this.view.state.doc.resolve(e.pos)),"pointer"),t.preventDefault()):ae(this.view,"pointer")}},ve.prototype.move=function(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0),ae(this.view,"pointer"),0==t.buttons&&this.done()},ie.touchdown=function(t){ge(t),ae(t,"pointer")},ie.contextmenu=function(t){return ge(t)};var be=a.android?5e3:-1;function Oe(t,e){clearTimeout(t.composingTimeout),e>-1&&(t.composingTimeout=setTimeout((function(){return ke(t)}),e))}function we(t){for(t.composing&&(t.composing=!1,t.compositionEndedAt=function(){var t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}());t.compositionNodes.length>0;)t.compositionNodes.pop().markParentsDirty()}function ke(t,e){if(!(a.android&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),we(t),e||t.docView.dirty){var n=pt(t);return n&&!n.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(n)):t.updateState(t.state),!0}return!1}}oe.compositionstart=oe.compositionupdate=function(t){if(!t.composing){t.domObserver.flush();var e=t.state,n=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((function(t){return!1===t.type.spec.inclusive}))))t.markCursor=t.state.storedMarks||n.marks(),ke(t,!0),t.markCursor=null;else if(ke(t),a.gecko&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length)for(var r=t.root.getSelection(),i=r.focusNode,o=r.focusOffset;i&&1==i.nodeType&&0!=o;){var s=o<0?i.lastChild:i.childNodes[o-1];if(!s)break;if(3==s.nodeType){r.collapse(s,s.nodeValue.length);break}i=s,o=-1}t.composing=!0}Oe(t,be)},oe.compositionend=function(t,e){t.composing&&(t.composing=!1,t.compositionEndedAt=e.timeStamp,Oe(t,20))};var xe=a.ie&&a.ie_version<15||a.ios&&a.webkit_version<604;function _e(t,e,n,r){var o=qt(t,e,n,t.shiftKey,t.state.selection.$from);if(t.someProp("handlePaste",(function(e){return e(t,r,o||i.j.empty)})))return!0;if(!o)return!1;var a=function(t){return 0==t.openStart&&0==t.openEnd&&1==t.content.childCount?t.content.firstChild:null}(o),s=a?t.state.tr.replaceSelectionWith(a,t.shiftKey):t.state.tr.replaceSelection(o);return t.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}ie.copy=oe.cut=function(t,e){var n=t.state.selection,r="cut"==e.type;if(!n.empty){var i=xe?null:e.clipboardData,o=zt(t,n.content()),a=o.dom,s=o.text;i?(e.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",s)):function(t,e){if(t.dom.parentNode){var n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";var r=getSelection(),i=document.createRange();i.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout((function(){n.parentNode&&n.parentNode.removeChild(n),t.focus()}),50)}}(t,a),r&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},oe.paste=function(t,e){if(!t.composing||a.android){var n=xe?null:e.clipboardData;n&&_e(t,n.getData("text/plain"),n.getData("text/html"),e)?e.preventDefault():function(t,e){if(t.dom.parentNode){var n=t.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((function(){t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?_e(t,r.value,null,e):_e(t,r.textContent,r.innerHTML,e)}),50)}}(t,e)}};var Se=function(t,e){this.slice=t,this.move=e},Ee=a.mac?"altKey":"ctrlKey";for(var Ce in ie.dragstart=function(t,e){var n=t.mouseDown;if(n&&n.done(),e.dataTransfer){var i=t.state.selection,o=i.empty?null:t.posAtCoords(ce(e));if(o&&o.pos>=i.from&&o.pos<=(i instanceof r.c?i.to-1:i.to));else if(n&&n.mightDrag)t.dispatch(t.state.tr.setSelection(r.c.create(t.state.doc,n.mightDrag.pos)));else if(e.target&&1==e.target.nodeType){var a=t.docView.nearestDesc(e.target,!0);a&&a.node.type.spec.draggable&&a!=t.docView&&t.dispatch(t.state.tr.setSelection(r.c.create(t.state.doc,a.posBefore)))}var s=t.state.selection.content(),u=zt(t,s),c=u.dom,l=u.text;e.dataTransfer.clearData(),e.dataTransfer.setData(xe?"Text":"text/html",c.innerHTML),e.dataTransfer.effectAllowed="copyMove",xe||e.dataTransfer.setData("text/plain",l),t.dragging=new Se(s,!e[Ee])}},ie.dragend=function(t){var e=t.dragging;window.setTimeout((function(){t.dragging==e&&(t.dragging=null)}),50)},oe.dragover=oe.dragenter=function(t,e){return e.preventDefault()},oe.drop=function(t,e){var n=t.dragging;if(t.dragging=null,e.dataTransfer){var a=t.posAtCoords(ce(e));if(a){var s=t.state.doc.resolve(a.pos);if(s){var u=n&&n.slice;u?t.someProp("transformPasted",(function(t){u=t(u)})):u=qt(t,e.dataTransfer.getData(xe?"Text":"text/plain"),xe?null:e.dataTransfer.getData("text/html"),!1,s);var c=n&&!e[Ee];if(t.someProp("handleDrop",(function(n){return n(t,e,u||i.j.empty,c)})))e.preventDefault();else if(u){e.preventDefault();var l=u?Object(o.i)(t.state.doc,s.pos,u):s.pos;null==l&&(l=s.pos);var h=t.state.tr;c&&h.deleteSelection();var f=h.mapping.map(l),d=0==u.openStart&&0==u.openEnd&&1==u.content.childCount,p=h.doc;if(d?h.replaceRangeWith(f,f,u.content.firstChild):h.replaceRange(f,f,u),!h.doc.eq(p)){var g=h.doc.resolve(f);if(d&&r.c.isSelectable(u.content.firstChild)&&g.nodeAfter&&g.nodeAfter.sameMarkup(u.content.firstChild))h.setSelection(new r.c(g));else{var m=h.mapping.map(l);h.mapping.maps[h.mapping.maps.length-1].forEach((function(t,e,n,r){return m=r})),h.setSelection(xt(t,g,h.doc.resolve(m)))}t.focus(),t.dispatch(h.setMeta("uiEvent","drop"))}}}}}},ie.focus=function(t){t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout((function(){t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.root.getSelection())&&mt(t)}),20))},ie.blur=function(t,e){t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),e.relatedTarget&&t.dom.contains(e.relatedTarget)&&t.domObserver.currentSelection.set({}),t.focused=!1)},ie.beforeinput=function(t,e){if(a.chrome&&a.android&&"deleteContentBackward"==e.inputType){t.domObserver.flushSoon();var n=t.domChangeCount;setTimeout((function(){if(t.domChangeCount==n&&(t.dom.blur(),t.focus(),!t.someProp("handleKeyDown",(function(e){return e(t,k(8,"Backspace"))})))){var e=t.state.selection.$cursor;e&&e.pos>0&&t.dispatch(t.state.tr.delete(e.pos-1,e.pos).scrollIntoView())}}),50)}},oe)ie[Ce]=oe[Ce];function Te(t,e){if(t==e)return!0;for(var n in t)if(t[n]!==e[n])return!1;for(var r in e)if(!(r in t))return!1;return!0}var Ae=function(t,e){this.spec=e||Re,this.side=this.spec.side||0,this.toDOM=t};Ae.prototype.map=function(t,e,n,r){var i=t.mapResult(e.from+r,this.side<0?-1:1),o=i.pos;return i.deleted?null:new je(o-n,o-n,this)},Ae.prototype.valid=function(){return!0},Ae.prototype.eq=function(t){return this==t||t instanceof Ae&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Te(this.spec,t.spec))},Ae.prototype.destroy=function(t){this.spec.destroy&&this.spec.destroy(t)};var De=function(t,e){this.spec=e||Re,this.attrs=t};De.prototype.map=function(t,e,n,r){var i=t.map(e.from+r,this.spec.inclusiveStart?-1:1)-n,o=t.map(e.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=o?null:new je(i,o,this)},De.prototype.valid=function(t,e){return e.from=t&&(!i||i(a.spec))&&n.push(a.copy(a.from+r,a.to+r))}for(var s=0;st){var u=this.children[s]+1;this.children[s+2].findInner(t-u,e-u,n,r+u,i)}},Le.prototype.map=function(t,e,n){return this==Fe||0==t.maps.length?this:this.mapInner(t,e,0,0,n||Re)},Le.prototype.mapInner=function(t,e,n,r,i){for(var o,a=0;au+o||(e>=s[a]+o?s[a+1]=-1:n>=i&&(c=r-n-(e-t))&&(s[a]+=c,s[a+1]+=c))}},c=0;c=r.content.size){l=!0;continue}var p=n.map(t[h+1]+o,-1)-i,g=r.content.findIndex(d),m=g.index,v=g.offset,y=r.maybeChild(m);if(y&&v==d&&v+y.nodeSize==p){var b=s[h+2].mapInner(n,y,f+1,t[h]+o+1,a);b!=Fe?(s[h]=d,s[h+1]=p,s[h+2]=b):(s[h+1]=-2,l=!0)}else l=!0}if(l){var O=function(t,e,n,r,i,o,a){function s(t,e){for(var o=0;oa&&c.to=t){this.children[i]==t&&(n=this.children[i+2]);break}for(var o=t+1,a=o+e.content.size,s=0;so&&u.type instanceof De){var c=Math.max(o,u.from)-o,l=Math.min(a,u.to)-o;cn&&a.to0;)e++;t.splice(e,0,n)}function Ye(t){var e=[];return t.someProp("decorations",(function(n){var r=n(t.state);r&&r!=Fe&&e.push(r)})),t.cursorWrapper&&e.push(Le.create(t.state.doc,[t.cursorWrapper.deco])),Be.from(e)}Be.prototype.map=function(t,e){var n=this.members.map((function(n){return n.map(t,e,Re)}));return Be.from(n)},Be.prototype.forChild=function(t,e){if(e.isLeaf)return Le.empty;for(var n=[],r=0;ri.scrollToSelection?"to selection":"preserve",f=o||!this.docView.matchesNode(t.doc,l,c);!f&&t.selection.eq(i.selection)||(s=!0);var d="preserve"==h&&s&&null==this.dom.style.overflowAnchor&&function(t){for(var e,n,r=t.dom.getBoundingClientRect(),i=Math.max(0,r.top),o=(r.left+r.right)/2,a=i+1;a=i-20){e=s,n=u.top;break}}}return{refDOM:e,refTop:n,stack:C(t.dom)}}(this);if(s){this.domObserver.stop();var p=f&&(a.ie||a.chrome)&&!this.composing&&!i.selection.empty&&!t.selection.empty&&function(t,e){var n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}(i.selection,t.selection);if(f){var g=a.chrome?this.trackWrites=this.root.getSelection().focusNode:null;!o&&this.docView.update(t.doc,l,c,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=K(t.doc,l,c,this.dom,this)),g&&!this.trackWrites&&(p=!0)}p||!(this.mouseDown&&this.domObserver.currentSelection.eq(this.root.getSelection())&&function(t){var e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.root.getSelection();return m(e.node,e.offset,n.anchorNode,n.anchorOffset)}(this))?mt(this,p):(wt(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(i),"reset"==h)this.dom.scrollTop=0;else if("to selection"==h){var v=this.root.getSelection().focusNode;this.someProp("handleScrollToSelection",(function(t){return t(n)}))||(t.selection instanceof r.c?E(this,this.docView.domAfterPos(t.selection.from).getBoundingClientRect(),v):E(this,this.coordsAtPos(t.selection.head,1),v))}else d&&function(t){var e=t.refDOM,n=t.refTop,r=t.stack,i=e?e.getBoundingClientRect().top:0;T(r,0==i?0:i-n)}(d)},Ue.prototype.destroyPluginViews=function(){for(var t;t=this.pluginViews.pop();)t.destroy&&t.destroy()},Ue.prototype.updatePluginViews=function(t){if(t&&t.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(var e=0;e-1)return null;return e(n)}}var b=Object(c.a)((function t(e,n,r){Object(u.a)(this,t),this.completion=e,this.source=n,this.match=r}));function O(t){return t.selection.main.head}function w(t,e){var n,r=t.source,i=e&&"^"!=r[0],o="$"!=r[r.length-1];return i||o?new RegExp("".concat(i?"^":"","(?:").concat(r,")").concat(o?"$":""),null!==(n=t.flags)&&void 0!==n?n:t.ignoreCase?"i":""):t}var k=l.a.define();function x(t,e){var n=e.completion.apply||e.completion.label,r=e.source;"string"==typeof n?t.dispatch({changes:{from:r.from,to:r.to,insert:n},selection:{anchor:r.from+n.length},userEvent:"input.complete",annotations:k.of(e.completion)}):n(t,e.completion,r.from,r.to)}var _=new WeakMap;function S(t){if(!Array.isArray(t))return t;var e=_.get(t);return e||_.set(t,e=v(t)),e}var E=function(){function t(e){Object(u.a)(this,t),this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[];for(var n=0;n=48&&_<=57||_>=97&&_<=122?2:_>=65&&_<=90?1:0:(S=Object(h.g)(_))!=S.toLowerCase()?1:S!=S.toUpperCase()?2:0;(1==E&&O||0==x&&0!=E)&&(e[g]==_||n[g]==_&&(m=!0))&&(o[g++]=w),x=E,w+=Object(h.c)(_)}return g==u&&0==o[0]?this.result((m?-200:0)-100,o,t):v==u&&0==y?[-200,0,b]:s>-1?[-700,s,s+this.pattern.length]:v==u?[-900,y,b]:g==u?this.result((m?-200:0)-100-700,o,t):2==e.length?null:this.result((r[0]?-700:0)-200-1100,r,t)}},{key:"result",value:function(t,e,n){var r,i=[t],o=1,a=Object(s.a)(e);try{for(a.s();!(r=a.n()).done;){var u=r.value,c=u+(this.astral?Object(h.c)(Object(h.b)(n,u)):1);o>1&&i[o-1]==u?i[o-1]=c:(i[o++]=u,i[o++]=c)}}catch(l){a.e(l)}finally{a.f()}return i}}]),t}(),C=l.g.define({combine:function(t){return Object(l.m)(t,{activateOnTyping:!0,override:null,maxRenderedOptions:100,defaultKeymap:!0,optionClass:function(){return""},aboveCursor:!1,icons:!0,addToOptions:[]},{defaultKeymap:function(t,e){return t&&e},icons:function(t,e){return t&&e},optionClass:function(t,e){return function(n){return function(t,e){return t?e?t+" "+e:t:e}(t(n),e(n))}},addToOptions:function(t,e){return t.concat(e)}})}});function T(t,e,n){if(t<=n)return{from:0,to:t};if(e<=t>>1){var r=Math.floor(e/n);return{from:r*n,to:(r+1)*n}}var i=Math.floor((t-e)/n);return{from:t-(i+1)*n,to:t-i*n}}var A=function(){function t(e,n){var r=this;Object(u.a)(this,t),this.view=e,this.stateField=n,this.info=null,this.placeInfo={read:function(){return r.measureInfo()},write:function(t){return r.positionInfo(t)},key:this};var i=e.state.field(n),a=i.open,s=a.options,c=a.selected,l=e.state.facet(C);this.optionContent=function(t){var e=t.addToOptions.slice();return t.icons&&e.push({render:function(t){var e,n=document.createElement("div");return n.classList.add("cm-completionIcon"),t.type&&(e=n.classList).add.apply(e,Object(o.a)(t.type.split(/\s+/g).map((function(t){return"cm-completionIcon-"+t})))),n.setAttribute("aria-hidden","true"),n},position:20}),e.push({render:function(t,e,n){var r=document.createElement("span");r.className="cm-completionLabel";for(var i=t.label,o=0,a=1;ao&&r.appendChild(document.createTextNode(i.slice(o,s)));var c=r.appendChild(document.createElement("span"));c.appendChild(document.createTextNode(i.slice(s,u))),c.className="cm-completionMatchedText",o=u}return o=this.range.to)&&(this.range=T(n.options.length,n.selected,this.view.state.facet(C).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(n.options,e.id,this.range)),this.list.addEventListener("scroll",(function(){t.info&&t.view.requestMeasure(t.placeInfo)}))),this.updateSelectedOption(n.selected)){this.info&&(this.info.remove(),this.info=null);var r=n.options[n.selected];r.completion.info&&(this.info=this.dom.appendChild(function(t,e){var n=document.createElement("div");n.className="cm-tooltip cm-completionInfo";var r=t.completion.info;if("string"==typeof r)n.textContent=r;else{var i=r(t.completion);i.then?i.then((function(t){return n.appendChild(t)}),(function(t){return Object(f.m)(e.state,t,"completion info")})):n.appendChild(i)}return n}(r,this.view)),this.view.requestMeasure(this.placeInfo))}}},{key:"updateSelectedOption",value:function(t){for(var e=null,n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)r==t?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),e=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected");return e&&function(t,e){var n=t.getBoundingClientRect(),r=e.getBoundingClientRect();r.topn.bottom&&(t.scrollTop+=r.bottom-n.bottom)}(this.list,e),e}},{key:"measureInfo",value:function(){var t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;var e=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect();if(e.top>innerHeight-10||e.bottom<10)return null;var r=Math.max(0,Math.min(t.getBoundingClientRect().top,innerHeight-n.height))-e.top,i=this.view.textDirection==f.c.RTL,o=e.left,a=innerWidth-e.right;return i&&o=this.options.length?this:new t(this.options,P(n,e),this.tooltip,this.timestamp,e)}},{key:"map",value:function(e){return new t(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected)}}],[{key:"build",value:function(e,n,r,i,o){var a=function(t,e){var n,r=[],i=0,o=Object(s.a)(t);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(a.hasResult())if(!1===a.result.filter){var u,c=Object(s.a)(a.result.options);try{for(c.s();!(u=c.n()).done;){var l=u.value;r.push(new b(l,a,[1e9-i++]))}}catch(k){c.e(k)}finally{c.f()}}else{var h,f=new E(e.sliceDoc(a.from,a.to)),d=void 0,p=Object(s.a)(a.result.options);try{for(p.s();!(h=p.n()).done;){var g=h.value;(d=f.match(g.label))&&(null!=g.boost&&(d[0]+=g.boost),r.push(new b(g,a,d)))}}catch(k){p.e(k)}finally{p.f()}}}}catch(k){o.e(k)}finally{o.f()}r.sort(L);var m,v=[],y=null,O=Object(s.a)(r.sort(L));try{for(O.s();!(m=O.n()).done;){var w=m.value;if(300==v.length)break;y&&y.label==w.completion.label&&y.detail==w.completion.detail&&y.type==w.completion.type&&y.apply==w.completion.apply?D(w.completion)>D(y)&&(v[v.length-1]=w):v.push(w),y=w.completion}}catch(k){O.e(k)}finally{O.f()}return v}(e,n);if(!a.length)return null;var u,c=0;if(i&&i.selected)for(var l=i.options[i.selected].completion,h=0;h2&&void 0!==arguments[2]?arguments[2]:-1;Object(u.a)(this,t),this.source=e,this.state=n,this.explicitPos=r}return Object(c.a)(t,[{key:"hasResult",value:function(){return!1}},{key:"update",value:function(e,n){var r=F(e),i=this;r?i=i.handleUserEvent(e,r,n):e.docChanged?i=i.handleChange(e):e.selection&&0!=i.state&&(i=new t(i.source,0));var o,a=Object(s.a)(e.effects);try{for(a.s();!(o=a.n()).done;){var u=o.value;if(u.is(Q))i=new t(i.source,1,u.value?O(e.state):-1);else if(u.is($))i=new t(i.source,0);else if(u.is(z)){var c,l=Object(s.a)(u.value);try{for(l.s();!(c=l.n()).done;){var h=c.value;h.source==i.source&&(i=h)}}catch(f){l.e(f)}finally{l.f()}}}}catch(f){a.e(f)}finally{a.f()}return i}},{key:"handleUserEvent",value:function(e,n,r){return"delete"!=n&&r.activateOnTyping?new t(this.source,1):this.map(e.changes)}},{key:"handleChange",value:function(e){return e.changes.touchesRange(O(e.startState))?new t(this.source,0):this.map(e.changes)}},{key:"map",value:function(e){return e.empty||this.explicitPos<0?this:new t(this.source,this.state,e.mapPos(this.explicitPos))}}]),t}(),I=function(t){Object(r.a)(n,t);var e=Object(i.a)(n);function n(t,r,i,o,a,s){var c;return Object(u.a)(this,n),(c=e.call(this,t,2,r)).result=i,c.from=o,c.to=a,c.span=s,c}return Object(c.a)(n,[{key:"hasResult",value:function(){return!0}},{key:"handleUserEvent",value:function(t,e,r){var i=t.changes.mapPos(this.from),o=t.changes.mapPos(this.to,1),a=O(t.state);if((this.explicitPos>-1?ao)return new B(this.source,"input"==e&&r.activateOnTyping?1:0);var s=this.explicitPos<0?-1:t.changes.mapPos(this.explicitPos);return this.span&&(i==o||this.span.test(t.state.sliceDoc(i,o)))?new n(this.source,s,this.result,i,o,this.span):new B(this.source,1,s)}},{key:"handleChange",value:function(t){return t.changes.touchesRange(this.from,this.to)?new B(this.source,0):this.map(t.changes)}},{key:"map",value:function(t){return t.empty?this:new n(this.source,this.explicitPos<0?-1:t.mapPos(this.explicitPos),this.result,t.mapPos(this.from),t.mapPos(this.to,1),this.span)}}]),n}(B),Q=l.j.define(),$=l.j.define(),z=l.j.define({map:function(t,e){return t.map((function(t){return t.map(e)}))}}),q=l.j.define(),W=l.k.define({create:function(){return j.start()},update:function(t,e){return t.update(e)},provide:function(t){return[d.b.from(t,(function(t){return t.tooltip})),f.d.contentAttributes.from(t,(function(t){return t.attrs}))]}});function V(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"option";return function(n){var r=n.state.field(W,!1);if(!r||!r.open||Date.now()-r.open.timestamp<75)return!1;var i,o=1;"page"==e&&(i=n.dom.querySelector(".cm-tooltip-autocomplete"))&&(o=Math.max(2,Math.floor(i.offsetHeight/i.firstChild.offsetHeight)));var a=r.open.selected+o*(t?1:-1),s=r.open.options.length;return a<0?a="page"==e?0:s-1:a>=s&&(a="page"==e?s-1:0),n.dispatch({effects:q.of(a)}),!0}}var Y=Object(c.a)((function t(e,n){Object(u.a)(this,t),this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0})),U=f.f.fromClass(function(){function t(e){Object(u.a)(this,t),this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;var n,r=Object(s.a)(e.state.field(W).active);try{for(r.s();!(n=r.n()).done;){var i=n.value;1==i.state&&this.startQuery(i)}}catch(o){r.e(o)}finally{r.f()}}return Object(c.a)(t,[{key:"update",value:function(t){var e=this,n=t.state.field(W);if(t.selectionSet||t.docChanged||t.startState.field(W)!=n){for(var r=t.transactions.some((function(t){return(t.selection||t.docChanged)&&!F(t)})),i=0;i50&&a.time-Date.now()>1e3){var u,c=Object(s.a)(a.context.abortListeners);try{for(c.s();!(u=c.n()).done;){var l=u.value;try{l()}catch(m){Object(f.m)(this.view.state,m)}}}catch(v){c.e(v)}finally{c.f()}a.context.abortListeners=null,this.running.splice(i--,1)}else{var h;(h=a.updates).push.apply(h,Object(o.a)(t.transactions))}}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=n.active.some((function(t){return 1==t.state&&!e.running.some((function(e){return e.active.source==t.source}))}))?setTimeout((function(){return e.startUpdate()}),50):-1,0!=this.composing){var d,p=Object(s.a)(t.transactions);try{for(p.s();!(d=p.n()).done;){var g=d.value;"input"==F(g)?this.composing=2:2==this.composing&&g.selection&&(this.composing=3)}}catch(v){p.e(v)}finally{p.f()}}}}},{key:"startUpdate",value:function(){var t=this;this.debounceUpdate=-1;var e,n=this.view.state.field(W),r=Object(s.a)(n.active);try{var i=function(){var n=e.value;1!=n.state||t.running.some((function(t){return t.active.source==n.source}))||t.startQuery(n)};for(r.s();!(e=r.n()).done;)i()}catch(o){r.e(o)}finally{r.f()}}},{key:"startQuery",value:function(t){var e=this,n=this.view.state,r=O(n),i=new g(n,r,t.explicitPos==r),o=new Y(t,i);this.running.push(o),Promise.resolve(t.source(i)).then((function(t){o.context.aborted||(o.done=t||null,e.scheduleAccept())}),(function(t){e.view.dispatch({effects:$.of(null)}),Object(f.m)(e.view.state,t)}))}},{key:"scheduleAccept",value:function(){var t=this;this.running.every((function(t){return void 0!==t.done}))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((function(){return t.accept()}),50))}},{key:"accept",value:function(){var t,e=this;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;for(var n=[],r=this.view.state.facet(C),i=function(i){var a=e.running[i];if(void 0===a.done)return o=i,"continue";if(e.running.splice(i--,1),a.done){var u,c=new I(a.active.source,a.active.explicitPos,a.done,a.done.from,null!==(t=a.done.to)&&void 0!==t?t:O(a.updates.length?a.updates[0].startState:e.view.state),a.done.span&&!1!==a.done.filter?w(a.done.span,!0):null),l=Object(s.a)(a.updates);try{for(l.s();!(u=l.n()).done;){var h=u.value;c=c.update(h,r)}}catch(v){l.e(v)}finally{l.f()}if(c.hasResult())return n.push(c),o=i,"continue"}var f=e.view.state.field(W).active.find((function(t){return t.source==a.active.source}));if(f&&1==f.state)if(null==a.done){var d,p=new B(a.active.source,0),g=Object(s.a)(a.updates);try{for(g.s();!(d=g.n()).done;){var m=d.value;p=p.update(m,r)}}catch(v){g.e(v)}finally{g.f()}1!=p.state&&n.push(p)}else e.startQuery(f);o=i},o=0;o ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",listStyle:"none",margin:0,padding:0,"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer",padding:"1px 3px",lineHeight:1.2}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#39e",color:"white"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xb7\xb7\xb7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"300px"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'\u0192'"}},".cm-completionIcon-class":{"&:after":{content:"'\u25cb'"}},".cm-completionIcon-interface":{"&:after":{content:"'\u25cc'"}},".cm-completionIcon-variable":{"&:after":{content:"'\ud835\udc65'"}},".cm-completionIcon-constant":{"&:after":{content:"'\ud835\udc36'"}},".cm-completionIcon-type":{"&:after":{content:"'\ud835\udc61'"}},".cm-completionIcon-enum":{"&:after":{content:"'\u222a'"}},".cm-completionIcon-property":{"&:after":{content:"'\u25a1'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\ud83d\udd11\ufe0e'"}},".cm-completionIcon-namespace":{"&:after":{content:"'\u25a2'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),X=Object(c.a)((function t(e,n,r,i){Object(u.a)(this,t),this.field=e,this.line=n,this.from=r,this.to=i})),G=function(){function t(e,n,r){Object(u.a)(this,t),this.field=e,this.from=n,this.to=r}return Object(c.a)(t,[{key:"map",value:function(e){return new t(this.field,e.mapPos(this.from,-1),e.mapPos(this.to,1))}}]),t}(),Z=function(){function t(e,n){Object(u.a)(this,t),this.lines=e,this.fieldPositions=n}return Object(c.a)(t,[{key:"instantiate",value:function(t,e){var n,r=[],i=[e],o=t.doc.lineAt(e),a=/^\s*/.exec(o.text)[0],u=Object(s.a)(this.lines);try{for(u.s();!(n=u.n()).done;){var c=n.value;if(r.length){for(var l=a,h=/^\t*/.exec(c)[0].length,f=0;f=f&&v.field++}}catch(y){m.e(y)}finally{m.f()}}a.push(new X(f,o.length,n.index,n.index+h.length)),c=c.slice(0,n.index)+h+c.slice(n.index+n[0].length)}o.push(c)}}catch(y){u.e(y)}finally{u.f()}return new t(o,a)}}]),t}(),K=f.b.widget({widget:new(function(t){Object(r.a)(n,t);var e=Object(i.a)(n);function n(){return Object(u.a)(this,n),e.apply(this,arguments)}return Object(c.a)(n,[{key:"toDOM",value:function(){var t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}},{key:"ignoreEvent",value:function(){return!1}}]),n}(f.g))}),J=f.b.mark({class:"cm-snippetField"}),tt=function(){function t(e,n){Object(u.a)(this,t),this.ranges=e,this.active=n,this.deco=f.b.set(e.map((function(t){return(t.from==t.to?K:J).range(t.from,t.to)})))}return Object(c.a)(t,[{key:"map",value:function(e){return new t(this.ranges.map((function(t){return t.map(e)})),this.active)}},{key:"selectionInsideField",value:function(t){var e=this;return t.ranges.every((function(t){return e.ranges.some((function(n){return n.field==e.active&&n.from<=t.from&&n.to>=t.to}))}))}}]),t}(),et=l.j.define({map:function(t,e){return t&&t.map(e)}}),nt=l.j.define(),rt=l.k.define({create:function(){return null},update:function(t,e){var n,r=Object(s.a)(e.effects);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.is(et))return i.value;if(i.is(nt)&&t)return new tt(t.ranges,i.value)}}catch(o){r.e(o)}finally{r.f()}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:function(t){return f.d.decorations.from(t,(function(t){return t?t.deco:f.b.none}))}});function it(t,e){return l.e.create(t.filter((function(t){return t.field==e})).map((function(t){return l.e.range(t.from,t.to)})))}function ot(t){var e=Z.parse(t);return function(t,n,r,i){var o=e.instantiate(t.state,r),a=o.text,s=o.ranges,u={changes:{from:r,to:i,insert:h.a.of(a)}};if(s.length&&(u.selection=it(s,0)),s.length>1){var c=new tt(s,0),f=u.effects=[et.of(c)];void 0===t.state.field(rt,!1)&&f.push(l.j.appendConfig.of([rt,ct,ht,H]))}t.dispatch(t.state.update(u))}}function at(t){return function(e){var n=e.state,r=e.dispatch,i=n.field(rt,!1);if(!i||t<0&&0==i.active)return!1;var o=i.active+t,a=t>0&&!i.ranges.some((function(e){return e.field==o+t}));return r(n.update({selection:it(i.ranges,o),effects:et.of(a?null:new tt(i.ranges,o))})),!0}}var st=[{key:"Tab",run:at(1),shift:at(-1)},{key:"Escape",run:function(t){var e=t.state,n=t.dispatch;return!!e.field(rt,!1)&&(n(e.update({effects:et.of(null)})),!0)}}],ut=l.g.define({combine:function(t){return t.length?t[0]:st}}),ct=l.i.highest(f.l.compute([ut],(function(t){return t.facet(ut)})));function lt(t,e){return Object.assign(Object.assign({},e),{apply:ot(t)})}var ht=f.d.domEventHandlers({mousedown:function(t,e){var n,r=e.state.field(rt,!1);if(!r||null==(n=e.posAtCoords({x:t.clientX,y:t.clientY})))return!1;var i=r.ranges.find((function(t){return t.from<=n&&t.to>=n}));return!(!i||i.field==r.active)&&(e.dispatch({selection:it(r.ranges,i.field),effects:et.of(r.ranges.some((function(t){return t.field>i.field}))?new tt(r.ranges,i.field):null)}),!0)}});function ft(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[W,C.of(t),U,pt,H]}var dt=[{key:"Ctrl-Space",run:function(t){return!!t.state.field(W,!1)&&(t.dispatch({effects:Q.of(!0)}),!0)}},{key:"Escape",run:function(t){var e=t.state.field(W,!1);return!(!e||!e.active.some((function(t){return 0!=t.state})))&&(t.dispatch({effects:$.of(null)}),!0)}},{key:"ArrowDown",run:V(!0)},{key:"ArrowUp",run:V(!1)},{key:"PageDown",run:V(!0,"page")},{key:"PageUp",run:V(!1,"page")},{key:"Enter",run:function(t){var e=t.state.field(W,!1);return!(t.state.readOnly||!e||!e.open||Date.now()-e.open.timestamp<75)&&(x(t,e.open.options[e.open.selected]),!0)}}],pt=l.i.highest(f.l.computeN([C],(function(t){return t.facet(C).defaultKeymap?[dt]:[]})))},function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return u}));var r=n(61),i=n(9),o="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function a(t){var e,n,r,i,a=t.split(/-(?!$)/),s=a[a.length-1];"Space"==s&&(s=" ");for(var u=0;u127)&&(i=r.a[n.keyCode])&&i!=o){var c=e[s(i,n,!0)];if(c&&c(t.state,t.dispatch,t))return!0}else if(a&&n.shiftKey){var l=e[s(o,n,!0)];if(l&&l(t.state,t.dispatch,t))return!0}return!1}}},function(t,e,n){"use strict";function r(t,e){var n=e.indexStack,r=t.children||[],i=[],o=-1;for(n.push(-1);++o=e?i.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},i.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},i.prototype.forEach=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length),e<=n?this.forEachInner(t,e,n,0):this.forEachInvertedInner(t,e,n,0)},i.prototype.map=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(e,n){return r.push(t(e,n))}),e,n),r},i.from=function(t){return t instanceof i?t:t&&t.length?new o(t):i.empty};var o=function(t){function e(e){t.call(this),this.values=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(t,n){return 0==t&&n==this.length?this:new e(this.values.slice(t,n))},e.prototype.getInner=function(t){return this.values[t]},e.prototype.forEachInner=function(t,e,n,r){for(var i=e;i=n;i--)if(!1===t(this.values[i],r+i))return!1},e.prototype.leafAppend=function(t){if(this.length+t.length<=r)return new e(this.values.concat(t.flatten()))},e.prototype.leafPrepend=function(t){if(this.length+t.length<=r)return new e(t.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(i);i.empty=new o([]);var a=function(t){function e(e,n){t.call(this),this.left=e,this.right=n,this.length=e.length+n.length,this.depth=Math.max(e.depth,n.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(t){return ti&&!1===this.right.forEachInner(t,Math.max(e-i,0),Math.min(this.length,n)-i,r+i))&&void 0)},e.prototype.forEachInvertedInner=function(t,e,n,r){var i=this.left.length;return!(e>i&&!1===this.right.forEachInvertedInner(t,e-i,Math.max(n,i)-i,r+i))&&(!(n=n?this.right.slice(t-n,e-n):this.left.slice(t,n).append(this.right.slice(0,e-n))},e.prototype.leafAppend=function(t){var n=this.right.leafAppend(t);if(n)return new e(this.left,n)},e.prototype.leafPrepend=function(t){var n=this.left.leafPrepend(t);if(n)return new e(n,this.right)},e.prototype.appendInner=function(t){return this.left.depth>=Math.max(this.right.depth,t.depth)+1?new e(this.left,new e(this.right,t)):new e(this,t)},e}(i),s=i,u=n(24),c=n(9),l=function(t,e){this.items=t,this.eventCount=e};l.prototype.popEvent=function(t,e){var n=this;if(0==this.eventCount)return null;for(var r,i,o=this.items.length;;o--){if(this.items.get(o-1).selection){--o;break}}e&&(r=this.remapping(o,this.items.length),i=r.maps.length);var a,s,u=t.tr,c=[],f=[];return this.items.forEach((function(t,e){if(!t.step)return r||(r=n.remapping(o,e+1),i=r.maps.length),i--,void f.push(t);if(r){f.push(new h(t.map));var d,p=t.step.map(r.slice(i));p&&u.maybeStep(p).doc&&(d=u.mapping.maps[u.mapping.maps.length-1],c.push(new h(d,null,null,c.length+f.length))),i--,d&&r.appendMap(d,i)}else u.maybeStep(t.step);return t.selection?(a=r?t.selection.map(r.slice(i)):t.selection,s=new l(n.items.slice(0,o).append(f.reverse().concat(c)),n.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:u,selection:a}},l.prototype.addTransform=function(t,e,n,r){for(var i=[],o=this.eventCount,a=this.items,s=!r&&a.length?a.get(a.length-1):null,u=0;ud&&(a=function(t,e){var n;return t.forEach((function(t,r){if(t.selection&&0==e--)return n=r,!1})),t.slice(n)}(a,g),o-=g),new l(a.append(i),o)},l.prototype.remapping=function(t,e){var n=new u.b;return this.items.forEach((function(e,r){var i=null!=e.mirrorOffset&&r-e.mirrorOffset>=t?n.maps.length-e.mirrorOffset:null;n.appendMap(e.map,i)}),t,e),n},l.prototype.addMaps=function(t){return 0==this.eventCount?this:new l(this.items.append(t.map((function(t){return new h(t)}))),this.eventCount)},l.prototype.rebased=function(t,e){if(!this.eventCount)return this;var n=[],r=Math.max(0,this.items.length-e),i=t.mapping,o=t.steps.length,a=this.eventCount;this.items.forEach((function(t){t.selection&&a--}),r);var s=e;this.items.forEach((function(e){var r=i.getMirror(--s);if(null!=r){o=Math.min(o,r);var u=i.maps[r];if(e.step){var c=t.steps[r].invert(t.docs[r]),l=e.selection&&e.selection.map(i.slice(s+1,r));l&&a++,n.push(new h(u,c,l))}else n.push(new h(u))}}),r);for(var u=[],c=e;c500&&(d=d.compress(this.items.length-n.length)),d},l.prototype.emptyItemCount=function(){var t=0;return this.items.forEach((function(e){e.step||t++})),t},l.prototype.compress=function(t){void 0===t&&(t=this.items.length);var e=this.remapping(0,t),n=e.maps.length,r=[],i=0;return this.items.forEach((function(o,a){if(a>=t)r.push(o),o.selection&&i++;else if(o.step){var s=o.step.map(e.slice(n)),u=s&&s.getMap();if(n--,u&&e.appendMap(u,n),s){var c=o.selection&&o.selection.map(e.slice(n));c&&i++;var l,f=new h(u.invert(),s,c),d=r.length-1;(l=r.length&&r[d].merge(f))?r[d]=l:r.push(f)}}else o.map&&n--}),this.items.length,0),new l(s.from(r.reverse()),i)},l.empty=new l(s.empty,0);var h=function(t,e,n,r){this.map=t,this.step=e,this.selection=n,this.mirrorOffset=r};h.prototype.merge=function(t){if(this.step&&t.step&&!t.selection){var e=t.step.merge(this.step);if(e)return new h(e.getMap().invert(),e,this.selection)}};var f=function(t,e,n,r){this.done=t,this.undone=e,this.prevRanges=n,this.prevTime=r},d=20;function p(t){var e=[];return t.forEach((function(t,n,r,i){return e.push(r,i)})),e}function g(t,e){if(!t)return null;for(var n=[],r=0;r=e[i]&&(n=!0)})),n}(n,t.prevRanges)),u=a?g(t.prevRanges,n.mapping):p(n.mapping.maps[n.steps.length-1]);return new f(t.done.addTransform(n,s?e.selection.getBookmark():null,r,b(e)),l.empty,u,n.time)}(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput:function(t,e){var n="historyUndo"==e.inputType?x(t.state,t.dispatch):"historyRedo"==e.inputType&&_(t.state,t.dispatch);return n&&e.preventDefault(),n}}}})}function x(t,e){var n=O.getState(t);return!(!n||0==n.done.eventCount)&&(e&&m(n,t,e,!1),!0)}function _(t,e){var n=O.getState(t);return!(!n||0==n.undone.eventCount)&&(e&&m(n,t,e,!0),!0)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(1),i=n(2),o="undefined"==typeof Symbol?"__\u037c":Symbol.for("\u037c"),a="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{},u=function(){function t(e,n){Object(r.a)(this,t),this.rules=[];var i=(n||{}).finish;function o(t){return/^@/.test(t)?[t]:t.split(/,\s*/)}function a(t,e,n,r){var s=[],u=/^@(\w+)\b/.exec(t[0]),c=u&&"keyframes"==u[1];if(u&&null==e)return n.push(t[0]+";");for(var l in e){var h=e[l];if(/&/.test(l))a(l.split(/,\s*/).map((function(e){return t.map((function(t){return e.replace(/&/,t)}))})).reduce((function(t,e){return t.concat(e)})),h,n);else if(h&&"object"==typeof h){if(!u)throw new RangeError("The value of a property ("+l+") should be a primitive value.");a(o(l),h,s,c)}else null!=h&&s.push(l.replace(/_.*/,"").replace(/[A-Z]/g,(function(t){return"-"+t.toLowerCase()}))+": "+h+";")}(s.length||c)&&n.push((!i||u||r?t:t.map(i)).join(", ")+" {"+s.join(" ")+"}")}for(var s in e)a(o(s),e[s],this.rules)}return Object(i.a)(t,[{key:"getRules",value:function(){return this.rules.join("\n")}}],[{key:"newName",value:function(){var t=s[o]||1;return s[o]=t+1,"\u037c"+t.toString(36)}},{key:"mount",value:function(t,e){(t[a]||new l(t)).mount(Array.isArray(e)?e:[e])}}]),t}(),c=null,l=function(){function t(e){if(Object(r.a)(this,t),!e.head&&e.adoptedStyleSheets&&"undefined"!=typeof CSSStyleSheet){if(c)return e.adoptedStyleSheets=[c.sheet].concat(e.adoptedStyleSheets),e[a]=c;this.sheet=new CSSStyleSheet,e.adoptedStyleSheets=[this.sheet].concat(e.adoptedStyleSheets),c=this}else{this.styleTag=(e.ownerDocument||e).createElement("style");var n=e.head||e;n.insertBefore(this.styleTag,n.firstChild)}this.modules=[],e[a]=this}return Object(i.a)(t,[{key:"mount",value:function(t){for(var e=this.sheet,n=0,r=0,i=0;i-1&&(this.modules.splice(a,1),r--,a=-1),-1==a){if(this.modules.splice(r++,0,o),e)for(var s=0;s0&&v(e.state,u.head-1,1,o)||o.afterCursor&&(v(e.state,u.head,1,o)||u.head0&&void 0!==arguments[0]?arguments[0]:{};return[h.of(t),p]}function m(t,e,n){var r=t.prop(e<0?s.b.openedBy:s.b.closedBy);if(r)return r;if(1==t.name.length){var i=n.indexOf(t.name);if(i>-1&&i%2==(e<0?1:0))return[n[i+e]]}return null}function v(t,e,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.maxScanDistance||c,a=r.brackets||l,s=Object(o.v)(t),u=s.resolveInner(e,n),h=u;h;h=h.parent){var f=m(h.type,n,a);if(f&&h.from=r.to){if(0==u&&i.indexOf(c.type.name)>-1&&c.from0)return null;for(var c={from:n<0?e-1:e,to:n>0?e+1:e},l=t.doc.iterRange(e,n>0?t.doc.length:0),h=0,f=0;!l.next().done&&f<=o;){var d=l.value;n<0&&(f+=d.length);for(var p=e+f*n,g=n>0?0:d.length-1,m=n>0?d.length:-1;g!=m;g+=n){var v=a.indexOf(d[g]);if(!(v<0||r.resolve(p+g,1).type!=i))if(v%2==0==n>0)h++;else{if(1==h)return{start:c,end:{from:p+g,to:p+g+1},matched:v>>1==u>>1};h--}}n>0&&(f+=d.length)}return l.done?{start:c,matched:!1}:null}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(66);function i(t,e){if(t){if("string"===typeof t)return Object(r.a)(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(t,e):void 0}}},function(t,e,n){"use strict";function r(t,e){return r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(t,e)}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(t,e,n){for(var r=[],i=-1;++i=4;++r,i-=4)e=1540483477*(65535&(e=255&t.charCodeAt(r)|(255&t.charCodeAt(++r))<<8|(255&t.charCodeAt(++r))<<16|(255&t.charCodeAt(++r))<<24))+(59797*(e>>>16)<<16),n=1540483477*(65535&(e^=e>>>24))+(59797*(e>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&t.charCodeAt(r+2))<<16;case 2:n^=(255&t.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&t.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},o={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},a=n(95),s=/[A-Z]|^ms/g,u=/_EMO_([^_]+?)_([^]*?)_EMO_/g,c=function(t){return 45===t.charCodeAt(1)},l=function(t){return null!=t&&"boolean"!==typeof t},h=Object(a.a)((function(t){return c(t)?t:t.replace(s,"-$&").toLowerCase()})),f=function(t,e){switch(t){case"animation":case"animationName":if("string"===typeof e)return e.replace(u,(function(t,e,n){return p={name:e,styles:n,next:p},e}))}return 1===o[t]||c(t)||"number"!==typeof e||0===e?e:e+"px"};function d(t,e,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return p={name:n.name,styles:n.styles,next:p},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)p={name:r.name,styles:r.styles,next:p},r=r.next;return n.styles+";"}return function(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i":"")+")"}));return h;function h(){var c,l,h,f=[];if((!e||o(r,s,u[u.length-1]||null))&&(f=function(t){if(Array.isArray(t))return t;if("number"===typeof t)return[true,t];return[t]}(n(r,u)),false===f[0]))return f;if(r.children&&"skip"!==f[0])for(l=(i?r.children.length:-1)+a,h=u.concat(r);l>-1&&l0&&(o=e[0].slice(a-s,a)+o,r=i)}return t.tr.insertText(o,r,i)}):e};function a(t){var e=t.rules,n=new r.d({state:{init:function(){return null},apply:function(t,e){var n=t.getMeta(this);return n||(t.selectionSet||t.docChanged?null:e)}},props:{handleTextInput:function(t,r,i,o){return s(t,r,i,o,e,n)},handleDOMEvents:{compositionend:function(t){setTimeout((function(){var r=t.state.selection.$cursor;r&&s(t,r.pos,r.pos,"",e,n)}))}}},isInputRules:!0});return n}function s(t,e,n,r,i,o){if(t.composing)return!1;var a=t.state,s=a.doc.resolve(e);if(s.parent.type.spec.code)return!1;for(var u=s.parent.textBetween(Math.max(0,s.parentOffset-500),s.parentOffset,null,"\ufffc")+r,c=0;c0&&void 0!==arguments[0]?arguments[0]:{};return[d,f.of(t),i.d.domEventHandlers({beforeinput:function(t,e){var n="historyUndo"==t.inputType?m:"historyRedo"==t.inputType?v:null;return!!n&&(t.preventDefault(),n(e))}})]}function g(t,e){return function(n){var r=n.state,i=n.dispatch;if(!e&&r.readOnly)return!1;var o=r.field(d,!1);if(!o)return!1;var a=o.pop(t,r,e);return!!a&&(i(a),!0)}}var m=g(0,!1),v=g(1,!1),y=g(0,!0),b=g(1,!0);var O=function(){function t(e,n,r,i,o){Object(s.a)(this,t),this.changes=e,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=o}return Object(u.a)(t,[{key:"setSelAfter",value:function(e){return new t(this.changes,this.effects,this.mapped,this.startSelection,e)}},{key:"toJSON",value:function(){var t,e,n;return{changes:null===(t=this.changes)||void 0===t?void 0:t.toJSON(),mapped:null===(e=this.mapped)||void 0===e?void 0:e.toJSON(),startSelection:null===(n=this.startSelection)||void 0===n?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map((function(t){return t.toJSON()}))}}}],[{key:"fromJSON",value:function(e){return new t(e.changes&&o.c.fromJSON(e.changes),[],e.mapped&&o.b.fromJSON(e.mapped),e.startSelection&&o.e.fromJSON(e.startSelection),e.selectionsAfter.map(o.e.fromJSON))}},{key:"fromTransaction",value:function(e){var n,r=x,i=Object(a.a)(e.startState.facet(h));try{for(i.s();!(n=i.n()).done;){var o=(0,n.value)(e);o.length&&(r=r.concat(o))}}catch(s){i.e(s)}finally{i.f()}return!r.length&&e.changes.empty?null:new t(e.changes.invert(e.startState.doc),r,void 0,e.startState.selection,x)}},{key:"selection",value:function(e){return new t(void 0,x,void 0,void 0,e)}}]),t}();function w(t,e,n,r){var i=e+1>n+20?e-n-1:0,o=t.slice(i,e);return o.push(r),o}function k(t,e){return t.length?e.length?t.concat(e):t:e}var x=[];function _(t,e){if(t.length){var n=t[t.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-200));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),w(t,t.length-1,1e9,n.setSelAfter(r)))}return[O.selection([e])]}function S(t){var e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function E(t,e){if(!t.length)return t;for(var n=t.length,r=x;n;){var i=C(t[n-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){var o=t.slice(0,n);return o[n-1]=i,o}e=i.mapped,n--,r=i.selectionsAfter}return r.length?[O.selection(r)]:x}function C(t,e,n){var r=k(t.selectionsAfter.length?t.selectionsAfter.map((function(t){return t.map(e)})):x,n);if(!t.changes)return O.selection(r);var i=t.changes.map(e),a=e.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(a):a;return new O(i,o.j.mapEffects(t.effects,e),s,t.startSelection.map(a),r)}var T=/^(input\.type|delete)($|\.)/,A=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;Object(s.a)(this,t),this.done=e,this.undone=n,this.prevTime=r,this.prevUserEvent=i}return Object(u.a)(t,[{key:"isolate",value:function(){return this.prevTime?new t(this.done,this.undone):this}},{key:"addChanges",value:function(e,n,r,i,o){var a=this.done,s=a[a.length-1];return a=s&&s.changes&&!s.changes.empty&&e.changes&&(!r||T.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime=s&&i<=u&&(r=!0)}})),r}(s.changes,e.changes)||"input.type.compose"==r)?w(a,a.length-1,o,new O(e.changes.compose(s.changes),k(e.effects,s.effects),s.mapped,s.startSelection,x)):w(a,a.length,o,e),new t(a,x,n,r)}},{key:"addSelection",value:function(e,n,r,i){var o,a,s=this.done.length?this.done[this.done.length-1].selectionsAfter:x;return s.length>0&&n-this.prevTimethis.i;){var e=t.elements.pop();t.dom.removeChild(e.dom),e.destroy()}}}]),t}(),U=function(){function t(e,n){var r=this;Object(s.a)(this,t),this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");var i=function(t){r.dom.addEventListener(t,(function(r){var i=e.lineBlockAtHeight(r.clientY-e.documentTop);n.domEventHandlers[t](e,i,r)&&r.preventDefault()}))};for(var o in n.domEventHandlers)i(o);this.markers=W(n.markers(e)),n.initialSpacer&&(this.spacer=new H(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}return Object(u.a)(t,[{key:"update",value:function(t){var e=this.markers;if(this.markers=W(this.config.markers(t.view)),this.spacer&&this.config.updateSpacer){var n=this.config.updateSpacer(this.spacer.markers[0],t);n!=this.spacer.markers[0]&&this.spacer.update(t.view,0,0,[n])}var r=t.view.viewport;return!P.a.eq(this.markers,e,r.from,r.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(t)}},{key:"destroy",value:function(){var t,e=Object(a.a)(this.elements);try{for(e.s();!(t=e.n()).done;){t.value.destroy()}}catch(n){e.e(n)}finally{e.f()}}}]),t}(),H=function(){function t(e,n,r,i){Object(s.a)(this,t),this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.update(e,n,r,i)}return Object(u.a)(t,[{key:"update",value:function(t,e,n,r){this.height!=e&&(this.dom.style.height=(this.height=e)+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),function(t,e){if(t.length!=e.length)return!1;for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return[G.of(t),z(),J]}function et(t){for(var e=9;er&&(r=s,n.push(nt.range(s)))}}}catch(u){i.e(u)}finally{i.f()}return P.a.of(n)}));function it(){return rt}function ot(t,e){var n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return n>=r?void 0:{from:n,to:r}}var at=o.j.define({map:ot}),st=o.j.define({map:ot});function ut(t){var e,n=[],r=Object(a.a)(t.state.selection.ranges);try{var i=function(){var r=e.value.head;if(n.some((function(t){return t.from<=r&&t.to>=r})))return"continue";n.push(t.lineBlockAt(r))};for(r.s();!(e=r.n()).done;)i()}catch(o){r.e(o)}finally{r.f()}return n}var ct=o.k.define({create:function(){return i.b.none},update:function(t,e){t=t.map(e.changes);var n,r=Object(a.a)(e.effects);try{var i=function(){var e=n.value;e.is(at)&&!function(t,e,n){var r=!1;return t.between(e,e,(function(t,i){t==e&&i==n&&(r=!0)})),r}(t,e.value.from,e.value.to)?t=t.update({add:[vt.range(e.value.from,e.value.to)]}):e.is(st)&&(t=t.update({filter:function(t,n){return e.value.from!=t||e.value.to!=n},filterFrom:e.value.from,filterTo:e.value.to}))};for(r.s();!(n=r.n()).done;)i()}catch(u){r.e(u)}finally{r.f()}if(e.selection){var o=!1,s=e.selection.main.head;t.between(s,s,(function(t,e){ts&&(o=!0)})),o&&(t=t.update({filterFrom:s,filterTo:s,filter:function(t,e){return e<=s||t>=s}}))}return t},provide:function(t){return i.d.decorations.from(t)}});function lt(t,e,n){var r,i=null;return null===(r=t.field(ct,!1))||void 0===r||r.between(e,n,(function(t,e){(!i||i.from>t)&&(i={from:t,to:e})})),i}function ht(t,e){return t.field(ct,!1)?e:e.concat(o.j.appendConfig.of(mt()))}function ft(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=t.state.doc.lineAt(e.from).number,o=t.state.doc.lineAt(e.to).number;return i.d.announce.of("".concat(t.state.phrase(n?"Folded lines":"Unfolded lines")," ").concat(r," ").concat(t.state.phrase("to")," ").concat(o,"."))}var dt=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:function(t){var e,n=Object(a.a)(ut(t));try{for(n.s();!(e=n.n()).done;){var r=e.value,i=Object(N.m)(t.state,r.from,r.to);if(i)return t.dispatch({effects:ht(t.state,[at.of(i),ft(t,i)])}),!0}}catch(o){n.e(o)}finally{n.f()}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:function(t){if(!t.state.field(ct,!1))return!1;var e,n=[],r=Object(a.a)(ut(t));try{for(r.s();!(e=r.n()).done;){var i=e.value,o=lt(t.state,i.from,i.to);o&&n.push(st.of(o),ft(t,o,!1))}}catch(s){r.e(s)}finally{r.f()}return n.length&&t.dispatch({effects:n}),n.length>0}},{key:"Ctrl-Alt-[",run:function(t){for(var e=t.state,n=[],r=0;r0&&void 0!==arguments[0]?arguments[0]:{},e=Object.assign(Object.assign({},yt),t),n=new bt(e,!0),r=new bt(e,!1),o=i.f.fromClass(function(){function t(e){Object(s.a)(this,t),this.from=e.viewport.from,this.markers=this.buildMarkers(e)}return Object(u.a)(t,[{key:"update",value:function(t){(t.docChanged||t.viewportChanged||t.startState.facet(N.t)!=t.state.facet(N.t)||t.startState.field(ct,!1)!=t.state.field(ct,!1))&&(this.markers=this.buildMarkers(t.view))}},{key:"buildMarkers",value:function(t){var e,i=new P.b,o=Object(a.a)(t.viewportLineBlocks);try{for(o.s();!(e=o.n()).done;){var s=e.value,u=lt(t.state,s.from,s.to)?r:Object(N.m)(t.state,s.from,s.to)?n:null;u&&i.add(s.from,s.from,u)}}catch(c){o.e(c)}finally{o.f()}return i.finish()}}]),t}());return[o,I({class:"cm-foldGutter",markers:function(t){var e;return(null===(e=t.plugin(o))||void 0===e?void 0:e.markers)||P.a.empty},initialSpacer:function(){return new bt(e,!1)},domEventHandlers:{click:function(t,e){var n=lt(t.state,e.from,e.to);if(n)return t.dispatch({effects:st.of(n)}),!0;var r=Object(N.m)(t.state,e.from,e.to);return!!r&&(t.dispatch({effects:at.of(r)}),!0)}}}),mt()]}var wt=i.d.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}}),kt=n(90),xt=n(46),_t=n(13),St={brackets:["(","[","{","'",'"'],before:")]}'\":;>"},Et=o.j.define({map:function(t,e){var n=e.mapPos(t,-1,o.h.TrackAfter);return null==n?void 0:n}}),Ct=o.j.define({map:function(t,e){return e.mapPos(t)}}),Tt=new(function(t){Object(M.a)(n,t);var e=Object(j.a)(n);function n(){return Object(s.a)(this,n),e.apply(this,arguments)}return Object(u.a)(n)}(P.c));Tt.startSide=1,Tt.endSide=-1;var At=o.k.define({create:function(){return P.a.empty},update:function(t,e){if(e.selection){var n=e.state.doc.lineAt(e.selection.main.head).from,r=e.startState.doc.lineAt(e.startState.selection.main.head).from;n!=e.changes.mapPos(r,-1)&&(t=P.a.empty)}t=t.map(e.changes);var i,o=Object(a.a)(e.effects);try{var s=function(){var e=i.value;e.is(Et)?t=t.update({add:[Tt.range(e.value,e.value+1)]}):e.is(Ct)&&(t=t.update({filter:function(t){return t!=e.value}}))};for(o.s();!(i=o.n()).done;)s()}catch(u){o.e(u)}finally{o.f()}return t}});function Dt(){return[i.d.inputHandler.of(Pt),At]}var Mt="()[]{}<>";function jt(t){for(var e=0;e2||2==r.length&&1==Object(_t.c)(Object(_t.b)(r,0))||e!=i.from||n!=i.to)return!1;var o=function(t,e){var n,r=Nt(t,t.selection.main.head),i=r.brackets||St.brackets,o=Object(a.a)(i);try{for(o.s();!(n=o.n()).done;){var s=n.value,u=jt(Object(_t.b)(s,0));if(e==s)return u==s?Qt(t,s,i.indexOf(s+s+s)>-1):Bt(t,s,u,r.before||St.before);if(e==u&&Lt(t,t.selection.main.from))return It(t,s,u)}}catch(c){o.e(c)}finally{o.f()}return null}(t.state,r);return!!o&&(t.dispatch(o),!0)}var Rt=[{key:"Backspace",run:function(t){var e=t.state,n=t.dispatch,r=Nt(e,e.selection.main.head).brackets||St.brackets,i=null,s=e.changeByRange((function(t){if(t.empty){var n,s=function(t,e){var n=t.sliceString(e-2,e);return Object(_t.c)(Object(_t.b)(n,0))==n.length?n:n.slice(1)}(e.doc,t.head),u=Object(a.a)(r);try{for(u.s();!(n=u.n()).done;){var c=n.value;if(c==s&&Ft(e.doc,t.head)==jt(Object(_t.b)(c,0)))return{changes:{from:t.head-c.length,to:t.head+c.length},range:o.e.cursor(t.head-c.length),userEvent:"delete.backward"}}}catch(l){u.e(l)}finally{u.f()}}return{range:i=t}}));return i||n(e.update(s,{scrollIntoView:!0})),!i}}];function Lt(t,e){var n=!1;return t.field(At).between(0,t.doc.length,(function(t){t==e&&(n=!0)})),n}function Ft(t,e){var n=t.sliceString(e,e+2);return n.slice(0,Object(_t.c)(Object(_t.b)(n,0)))}function Bt(t,e,n,r){var i=null,a=t.changeByRange((function(a){if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:n,from:a.to}],effects:Et.of(a.to+e.length),range:o.e.range(a.anchor+e.length,a.head+e.length)};var s=Ft(t.doc,a.head);return!s||/\s/.test(s)||r.indexOf(s)>-1?{changes:{insert:e+n,from:a.head},effects:Et.of(a.head+e.length),range:o.e.cursor(a.head+e.length)}:{range:i=a}}));return i?null:t.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function It(t,e,n){var r=null,i=t.selection.ranges.map((function(e){return e.empty&&Ft(t.doc,e.head)==n?o.e.cursor(e.head+n.length):r=e}));return r?null:t.update({selection:o.e.create(i,t.selection.mainIndex),scrollIntoView:!0,effects:t.selection.ranges.map((function(t){var e=t.from;return Ct.of(e)}))})}function Qt(t,e,n){var r=null,i=t.changeByRange((function(i){if(!i.empty)return{changes:[{insert:e,from:i.from},{insert:e,from:i.to}],effects:Et.of(i.to+e.length),range:o.e.range(i.anchor+e.length,i.head+e.length)};var a=i.head,s=Ft(t.doc,a);if(s==e){if($t(t,a))return{changes:{insert:e+e,from:a},effects:Et.of(a+e.length),range:o.e.cursor(a+e.length)};if(Lt(t,a)){var u=n&&t.sliceDoc(a,a+3*e.length)==e+e+e;return{range:o.e.cursor(a+e.length*(u?3:1)),effects:Ct.of(a)}}}else{if(n&&t.sliceDoc(a-2*e.length,a)==e+e&&$t(t,a-2*e.length))return{changes:{insert:e+e+e+e,from:a},effects:Et.of(a+e.length),range:o.e.cursor(a+e.length)};if(t.charCategorizer(a)(s)!=o.d.Word){var c=t.sliceDoc(a-1,a);if(c!=e&&t.charCategorizer(a)(c)!=o.d.Word)return{changes:{insert:e+e,from:a},effects:Et.of(a+e.length),range:o.e.cursor(a+e.length)}}}return{range:r=i}}));return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function $t(t,e){var n=Object(N.v)(t).resolveInner(e+1);return n.parent&&n.from==e}var zt=n(22),qt=o.g.define({combine:function(t){var e,n,r,i=Object(a.a)(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;e=e||o.topContainer,n=n||o.bottomContainer}}catch(s){i.e(s)}finally{i.f()}return{topContainer:e,bottomContainer:n}}});function Wt(t,e){var n=t.plugin(Vt),r=n?n.specs.indexOf(e):-1;return r>-1?n.panels[r]:null}var Vt=i.f.fromClass(function(){function t(e){Object(s.a)(this,t),this.input=e.state.facet(Xt),this.specs=this.input.filter((function(t){return t})),this.panels=this.specs.map((function(t){return t(e)}));var n=e.state.facet(qt);this.top=new Yt(e,!0,n.topContainer),this.bottom=new Yt(e,!1,n.bottomContainer),this.top.sync(this.panels.filter((function(t){return t.top}))),this.bottom.sync(this.panels.filter((function(t){return!t.top})));var r,i=Object(a.a)(this.panels);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.dom.classList.add("cm-panel"),o.mount&&o.mount()}}catch(u){i.e(u)}finally{i.f()}}return Object(u.a)(t,[{key:"update",value:function(t){var e=t.state.facet(qt);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Yt(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Yt(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();var n=t.state.facet(Xt);if(n!=this.input){var r,i=n.filter((function(t){return t})),o=[],s=[],u=[],c=[],l=Object(a.a)(i);try{for(l.s();!(r=l.n()).done;){var h=r.value,f=this.specs.indexOf(h),d=void 0;f<0?(d=h(t.view),c.push(d)):(d=this.panels[f]).update&&d.update(t),o.push(d),(d.top?s:u).push(d)}}catch(O){l.e(O)}finally{l.f()}this.specs=i,this.panels=o,this.top.sync(s),this.bottom.sync(u);for(var p=0,g=c;p2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.length,o=arguments.length>4?arguments[4]:void 0;Object(s.a)(this,t),this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=o?function(t){return o(Kt(t))}:Kt,this.query=this.normalize(n)}return Object(u.a)(t,[{key:"peek",value:function(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Object(_t.b)(this.buffer,this.bufferPos)}},{key:"next",value:function(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}},{key:"nextOverlapping",value:function(){for(;;){var t=this.peek();if(t<0)return this.done=!0,this;var e=Object(_t.g)(t),n=this.bufferStart+this.bufferPos;this.bufferPos+=Object(_t.c)(t);for(var r=this.normalize(e),i=0,o=n;;i++){var a=r.charCodeAt(i),s=this.match(a,o);if(s)return this.value=s,this;if(i==r.length-1)break;o==n&&i3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:e.length;if(Object(s.a)(this,t),this.to=o,this.curLine="",this.done=!1,this.value=te,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new oe(e,n,r,i,o);this.re=new RegExp(n,ee+((null===r||void 0===r?void 0:r.ignoreCase)?"i":"")),this.iter=e.iter();var a=e.lineAt(i);this.curLineStart=a.from,this.matchPos=i,this.getLine(this.curLineStart)}return Object(u.a)(t,[{key:"getLine",value:function(t){this.iter.next(t),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}},{key:"nextLine",value:function(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}},{key:"next",value:function(){for(var t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;var e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){var n=this.curLineStart+e.index,r=n+e[0].length;if(this.matchPos=r+(n==r?1:0),n==this.curLine.length&&this.nextLine(),nthis.value.to)return this.value={from:n,to:r,match:e},this;t=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length=r||i.to<=n){var o=new t(n,e.sliceString(n,r));return re.set(e,o),o}if(i.from==n&&i.to==r)return i;var a=i.text,s=i.from;return s>n&&(a=e.sliceString(n,s)+a,s=n),i.to=this.to?this.to:this.text.lineAt(t).to}},{key:"next",value:function(){for(;;){var t=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==t&&(this.re.lastIndex=t+1,e=this.re.exec(this.flat.text)),e&&this.flat.tothis.flat.text.length-10&&(e=null),e){var n=this.flat.from+e.index,r=n+e[0].length;return this.value={from:n,to:r,match:e},this.matchPos=r+(n==r?1:0),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=ie.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}]),t}();function ae(t){var e=Gt("input",{class:"cm-textfield",name:"line"});function n(){var n=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);if(n){var r=t.state,i=r.doc.lineAt(r.selection.main.head),a=Object(zt.a)(n,5),s=a[1],u=a[2],c=a[3],l=a[4],h=c?+c.slice(1):0,f=u?+u:i.number;if(u&&l){var d=f/100;s&&(d=d*("-"==s?-1:1)+i.number/r.doc.lines),f=Math.round(r.doc.lines*d)}else u&&s&&(f=f*("-"==s?-1:1)+i.number);var p=r.doc.line(Math.max(1,Math.min(r.doc.lines,f)));t.dispatch({effects:se.of(!1),selection:o.e.cursor(p.from+Math.max(0,Math.min(h,p.length))),scrollIntoView:!0}),t.focus()}}return{dom:Gt("form",{class:"cm-gotoLine",onkeydown:function(e){27==e.keyCode?(e.preventDefault(),t.dispatch({effects:se.of(!1)}),t.focus()):13==e.keyCode&&(e.preventDefault(),n())},onsubmit:function(t){t.preventDefault(),n()}},Gt("label",t.state.phrase("Go to line"),": ",e)," ",Gt("button",{class:"cm-button",type:"submit"},t.state.phrase("go"))),pos:-10}}"undefined"!=typeof Symbol&&(ne.prototype[Symbol.iterator]=oe.prototype[Symbol.iterator]=function(){return this});var se=o.j.define(),ue=o.k.define({create:function(){return!0},update:function(t,e){var n,r=Object(a.a)(e.effects);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.is(se)&&(t=i.value)}}catch(o){r.e(o)}finally{r.f()}return t},provide:function(t){return Xt.from(t,(function(t){return t?ae:null}))}}),ce=i.d.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),le={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100},he=o.g.define({combine:function(t){return Object(o.m)(t,le,{highlightWordAroundCursor:function(t,e){return t||e},minSelectionLength:Math.min,maxMatches:Math.min})}});function fe(t){var e=[me,ge];return t&&e.push(he.of(t)),e}var de=i.b.mark({class:"cm-selectionMatch"}),pe=i.b.mark({class:"cm-selectionMatch cm-selectionMatch-main"}),ge=i.f.fromClass(function(){function t(e){Object(s.a)(this,t),this.decorations=this.getDeco(e)}return Object(u.a)(t,[{key:"update",value:function(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}},{key:"getDeco",value:function(t){var e=t.state.facet(he),n=t.state,r=n.selection;if(r.ranges.length>1)return i.b.none;var s,u=r.main,c=null;if(u.empty){if(!e.highlightWordAroundCursor)return i.b.none;var l=n.wordAt(u.head);if(!l)return i.b.none;c=n.charCategorizer(u.head),s=n.sliceDoc(l.from,l.to)}else{var h=u.to-u.from;if(h200)return i.b.none;if(!(s=n.sliceDoc(u.from,u.to).trim()))return i.b.none}var f,d=[],p=Object(a.a)(t.visibleRanges);try{for(p.s();!(f=p.n()).done;)for(var g=f.value,m=new Jt(n.doc,s,g.from,g.to);!m.next().done;){var v=m.value,y=v.from,b=v.to;if((!c||(0==y||c(n.sliceDoc(y-1,y))!=o.d.Word)&&(b==n.doc.length||c(n.sliceDoc(b,b+1))!=o.d.Word))&&(c&&y<=u.from&&b>=u.to?d.push(pe.range(y,b)):(y>=u.to||b<=u.from)&&d.push(de.range(y,b)),d.length>e.maxMatches))return i.b.none}}catch(O){p.e(O)}finally{p.f()}return i.b.set(d)}}]),t}(),{decorations:function(t){return t.decorations}}),me=i.d.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}});var ve=o.g.define({combine:function(t){var e;return{top:t.reduce((function(t,e){return null!==t&&void 0!==t?t:e.top}),void 0)||!1,caseSensitive:t.reduce((function(t,e){return null!==t&&void 0!==t?t:e.caseSensitive||e.matchCase}),void 0)||!1,createPanel:(null===(e=t.find((function(t){return t.createPanel})))||void 0===e?void 0:e.createPanel)||function(t){return new Qe(t)}}}});var ye=function(){function t(e){Object(s.a)(this,t),this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||function(t){try{return new RegExp(t,ee),!0}catch(e){return!1}}(this.search))}return Object(u.a)(t,[{key:"eq",value:function(t){return this.search==t.search&&this.replace==t.replace&&this.caseSensitive==t.caseSensitive&&this.regexp==t.regexp}},{key:"create",value:function(){return this.regexp?new we(this):new Oe(this)}}]),t}(),be=Object(u.a)((function t(e){Object(s.a)(this,t),this.spec=e})),Oe=function(t){Object(M.a)(n,t);var e=Object(j.a)(n);function n(t){var r;return Object(s.a)(this,n),(r=e.call(this,t)).unquoted=t.search.replace(/\\([nrt\\])/g,(function(t,e){return"n"==e?"\n":"r"==e?"\r":"t"==e?"\t":"\\"})),r}return Object(u.a)(n,[{key:"cursor",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length;return new Jt(t,this.unquoted,e,n,this.spec.caseSensitive?void 0:function(t){return t.toLowerCase()})}},{key:"nextMatch",value:function(t,e,n){var r=this.cursor(t,n).nextOverlapping();return r.done&&(r=this.cursor(t,0,e).nextOverlapping()),r.done?null:r.value}},{key:"prevMatchInRange",value:function(t,e,n){for(var r=n;;){for(var i=Math.max(e,r-1e4-this.unquoted.length),o=this.cursor(t,i,r),a=null;!o.nextOverlapping().done;)a=o.value;if(a)return a;if(i==e)return null;r-=1e4}}},{key:"prevMatch",value:function(t,e,n){return this.prevMatchInRange(t,0,e)||this.prevMatchInRange(t,n,t.length)}},{key:"getReplacement",value:function(t){return this.spec.replace}},{key:"matchAll",value:function(t,e){for(var n=this.cursor(t),r=[];!n.next().done;){if(r.length>=e)return null;r.push(n.value)}return r}},{key:"highlight",value:function(t,e,n,r){for(var i=this.cursor(t,Math.max(0,e-this.unquoted.length),Math.min(n+this.unquoted.length,t.length));!i.next().done;)r(i.value.from,i.value.to)}}]),n}(be),we=function(t){Object(M.a)(n,t);var e=Object(j.a)(n);function n(){return Object(s.a)(this,n),e.apply(this,arguments)}return Object(u.a)(n,[{key:"cursor",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length;return new ne(t,this.spec.search,this.spec.caseSensitive?void 0:{ignoreCase:!0},e,n)}},{key:"nextMatch",value:function(t,e,n){var r=this.cursor(t,n).next();return r.done&&(r=this.cursor(t,0,e).next()),r.done?null:r.value}},{key:"prevMatchInRange",value:function(t,e,n){for(var r=1;;r++){for(var i=Math.max(e,n-1e4*r),o=this.cursor(t,i,n),a=null;!o.next().done;)a=o.value;if(a&&(i==e||a.from>i+10))return a;if(i==e)return null}}},{key:"prevMatch",value:function(t,e,n){return this.prevMatchInRange(t,0,e)||this.prevMatchInRange(t,n,t.length)}},{key:"getReplacement",value:function(t){return this.spec.replace.replace(/\$([$&\d+])/g,(function(e,n){return"$"==n?"$":"&"==n?t.match[0]:"0"!=n&&+n=e)return null;r.push(n.value)}return r}},{key:"highlight",value:function(t,e,n,r){for(var i=this.cursor(t,Math.max(0,e-250),Math.min(n+250,t.length));!i.next().done;)r(i.value.from,i.value.to)}}]),n}(be),ke=o.j.define(),xe=o.j.define(),_e=o.k.define({create:function(t){return new Se(Le(t).create(),Re)},update:function(t,e){var n,r=Object(a.a)(e.effects);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.is(ke)?t=new Se(i.value.create(),t.panel):i.is(xe)&&(t=new Se(t.query,i.value?Re:null))}}catch(o){r.e(o)}finally{r.f()}return t},provide:function(t){return Xt.from(t,(function(t){return t.panel}))}});var Se=Object(u.a)((function t(e,n){Object(s.a)(this,t),this.query=e,this.panel=n})),Ee=i.b.mark({class:"cm-searchMatch"}),Ce=i.b.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Te=i.f.fromClass(function(){function t(e){Object(s.a)(this,t),this.view=e,this.decorations=this.highlight(e.state.field(_e))}return Object(u.a)(t,[{key:"update",value:function(t){var e=t.state.field(_e);(e!=t.startState.field(_e)||t.docChanged||t.selectionSet)&&(this.decorations=this.highlight(e))}},{key:"highlight",value:function(t){var e=t.query;if(!t.panel||!e.spec.valid)return i.b.none;for(var n=this.view,r=new P.b,o=0,a=n.visibleRanges,s=a.length;oa[o+1].from-500;)l=a[++o].to;e.highlight(n.state.doc,c,l,(function(t,e){var i=n.state.selection.ranges.some((function(n){return n.from==t&&n.to==e}));r.add(t,e,i?Ce:Ee)}))}return r.finish()}}]),t}(),{decorations:function(t){return t.decorations}});function Ae(t){return function(e){var n=e.state.field(_e,!1);return n&&n.query.spec.valid?t(e,n):Fe(e)}}var De=Ae((function(t,e){var n=e.query,r=t.state.selection.main,i=r.from,o=r.to,a=n.nextMatch(t.state.doc,i,o);return!(!a||a.from==i&&a.to==o)&&(t.dispatch({selection:{anchor:a.from,head:a.to},scrollIntoView:!0,effects:qe(t,a),userEvent:"select.search"}),!0)})),Me=Ae((function(t,e){var n=e.query,r=t.state,i=r.selection.main,o=i.from,a=i.to,s=n.prevMatch(r.doc,o,a);return!!s&&(t.dispatch({selection:{anchor:s.from,head:s.to},scrollIntoView:!0,effects:qe(t,s),userEvent:"select.search"}),!0)})),je=Ae((function(t,e){var n=e.query.matchAll(t.state.doc,1e3);return!(!n||!n.length)&&(t.dispatch({selection:o.e.create(n.map((function(t){return o.e.range(t.from,t.to)}))),userEvent:"select.search.matches"}),!0)})),Ne=Ae((function(t,e){var n=e.query,r=t.state,i=r.selection.main,o=i.from,a=i.to;if(r.readOnly)return!1;var s=n.nextMatch(r.doc,o,o);if(!s)return!1;var u,c,l=[];if(s.from==o&&s.to==a&&(c=r.toText(n.getReplacement(s)),l.push({from:s.from,to:s.to,insert:c}),s=n.nextMatch(r.doc,s.from,s.to)),s){var h=0==l.length||l[0].from>=s.to?0:s.to-s.from-c.length;u={anchor:s.from-h,head:s.to-h}}return t.dispatch({changes:l,selection:u,scrollIntoView:!!u,effects:s?qe(t,s):void 0,userEvent:"input.replace"}),!0})),Pe=Ae((function(t,e){var n=e.query;if(t.state.readOnly)return!1;var r=n.matchAll(t.state.doc,1e9).map((function(t){return{from:t.from,to:t.to,insert:n.getReplacement(t)}}));return!!r.length&&(t.dispatch({changes:r,userEvent:"input.replace.all"}),!0)}));function Re(t){return t.state.facet(ve).createPanel(t)}function Le(t,e){var n,r=t.selection.main,i=r.empty||r.to>r.from+100?"":t.sliceDoc(r.from,r.to),o=null!==(n=null===e||void 0===e?void 0:e.caseSensitive)&&void 0!==n?n:t.facet(ve).caseSensitive;return e&&!i?e:new ye({search:i.replace(/\n/g,"\\n"),caseSensitive:o})}var Fe=function(t){var e=t.state.field(_e,!1);if(e&&e.panel){var n=Wt(t,Re);if(!n)return!1;var r=n.dom.querySelector("[name=search]");if(r!=t.root.activeElement){var i=Le(t.state,e.query.spec);i.valid&&t.dispatch({effects:ke.of(i)}),r.focus(),r.select()}}else t.dispatch({effects:[xe.of(!0),e?ke.of(Le(t.state,e.query.spec)):o.j.appendConfig.of(Ve)]});return!0},Be=function(t){var e=t.state.field(_e,!1);if(!e||!e.panel)return!1;var n=Wt(t,Re);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:xe.of(!1)}),!0},Ie=[{key:"Mod-f",run:Fe,scope:"editor search-panel"},{key:"F3",run:De,shift:Me,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:De,shift:Me,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Be,scope:"editor search-panel"},{key:"Mod-Shift-l",run:function(t){var e=t.state,n=t.dispatch,r=e.selection;if(r.ranges.length>1||r.main.empty)return!1;for(var i=r.main,a=i.from,s=i.to,u=[],c=0,l=new Jt(e.doc,e.sliceDoc(a,s));!l.next().done;){if(u.length>1e3)return!1;l.value.from==a&&(c=u.length),u.push(o.e.range(l.value.from,l.value.to))}return n(e.update({selection:o.e.create(u,c),userEvent:"select.search.matches"})),!0}},{key:"Alt-g",run:function(t){var e=Wt(t,ae);if(!e){var n=[se.of(!0)];null==t.state.field(ue,!1)&&n.push(o.j.appendConfig.of([ue,ce])),t.dispatch({effects:n}),e=Wt(t,ae)}return e&&e.dom.querySelector("input").focus(),!0}},{key:"Mod-d",run:function(t){var e=t.state,n=t.dispatch,r=e.selection.ranges;if(r.some((function(t){return t.from===t.to})))return function(t){var e=t.state,n=t.dispatch,r=e.selection,i=o.e.create(r.ranges.map((function(t){return e.wordAt(t.head)||o.e.cursor(t.head)})),r.mainIndex);return!i.eq(r)&&(n(e.update({selection:i})),!0)}({state:e,dispatch:n});var i=e.sliceDoc(r[0].from,r[0].to);if(e.selection.ranges.some((function(t){return e.sliceDoc(t.from,t.to)!=i})))return!1;var a=function(t,e){for(var n=t.selection,r=n.main,i=n.ranges,o=t.wordAt(r.head),a=o&&o.from==r.from&&o.to==r.to,s=function(n,r){if(r.next(),!r.done){if(n&&i.some((function(t){return t.from==r.value.from})))return c=r,u=n,"continue";if(a){var o=t.wordAt(r.value.from);if(!o||o.from!=r.value.from||o.to!=r.value.to)return c=r,u=n,"continue"}return u=n,c=r,{v:r.value}}if(n)return c=r,u=n,{v:null};r=new Jt(t.doc,e,0,Math.max(0,i[i.length-1].from-1)),u=n=!0,c=r},u=!1,c=new Jt(t.doc,e,i[i.length-1].to);;){var l=s(u,c);if("continue"!==l&&"object"===typeof l)return l.v}}(e,i);return!!a&&(n(e.update({selection:e.selection.addRange(o.e.range(a.from,a.to),!1),scrollIntoView:!0})),!0)},preventDefault:!0}],Qe=function(){function t(e){var n=this;Object(s.a)(this,t),this.view=e;var i=this.query=e.state.field(_e).query.spec;function o(t,e,n){return Gt("button",{class:"cm-button",name:t,onclick:e,type:"button"},n)}this.commit=this.commit.bind(this),this.searchField=Gt("input",{value:i.search,placeholder:$e(e,"Find"),"aria-label":$e(e,"Find"),class:"cm-textfield",name:"search",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Gt("input",{value:i.replace,placeholder:$e(e,"Replace"),"aria-label":$e(e,"Replace"),class:"cm-textfield",name:"replace",onchange:this.commit,onkeyup:this.commit}),this.caseField=Gt("input",{type:"checkbox",name:"case",checked:i.caseSensitive,onchange:this.commit}),this.reField=Gt("input",{type:"checkbox",name:"re",checked:i.regexp,onchange:this.commit}),this.dom=Gt("div",{onkeydown:function(t){return n.keydown(t)},class:"cm-search"},[this.searchField,o("next",(function(){return De(e)}),[$e(e,"next")]),o("prev",(function(){return Me(e)}),[$e(e,"previous")]),o("select",(function(){return je(e)}),[$e(e,"all")]),Gt("label",null,[this.caseField,$e(e,"match case")]),Gt("label",null,[this.reField,$e(e,"regexp")])].concat(Object(r.a)(e.state.readOnly?[]:[Gt("br"),this.replaceField,o("replace",(function(){return Ne(e)}),[$e(e,"replace")]),o("replaceAll",(function(){return Pe(e)}),[$e(e,"replace all")]),Gt("button",{name:"close",onclick:function(){return Be(e)},"aria-label":$e(e,"close"),type:"button"},["\xd7"])])))}return Object(u.a)(t,[{key:"commit",value:function(){var t=new ye({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,replace:this.replaceField.value});t.eq(this.query)||(this.query=t,this.view.dispatch({effects:ke.of(t)}))}},{key:"keydown",value:function(t){Object(i.o)(this.view,t,"search-panel")?t.preventDefault():13==t.keyCode&&t.target==this.searchField?(t.preventDefault(),(t.shiftKey?Me:De)(this.view)):13==t.keyCode&&t.target==this.replaceField&&(t.preventDefault(),Ne(this.view))}},{key:"update",value:function(t){var e,n=Object(a.a)(t.transactions);try{for(n.s();!(e=n.n()).done;){var r,i=e.value,o=Object(a.a)(i.effects);try{for(o.s();!(r=o.n()).done;){var s=r.value;s.is(ke)&&!s.value.eq(this.query)&&this.setQuery(s.value)}}catch(u){o.e(u)}finally{o.f()}}}catch(u){n.e(u)}finally{n.f()}}},{key:"setQuery",value:function(t){this.query=t,this.searchField.value=t.search,this.replaceField.value=t.replace,this.caseField.checked=t.caseSensitive,this.reField.checked=t.regexp}},{key:"mount",value:function(){this.searchField.select()}},{key:"pos",get:function(){return 80}},{key:"top",get:function(){return this.view.state.facet(ve).top}}]),t}();function $e(t,e){return t.state.phrase(e)}var ze=/[\s\.,:;?!]/;function qe(t,e){var n=e.from,r=e.to,o=t.state.doc.lineAt(n).from,a=t.state.doc.lineAt(r).to,s=Math.max(o,n-30),u=Math.min(a,r+30),c=t.state.sliceDoc(s,u);if(s!=o)for(var l=0;l<30;l++)if(!ze.test(c[l+1])&&ze.test(c[l])){c=c.slice(l);break}if(u!=a)for(var h=c.length-1;h>c.length-30;h--)if(!ze.test(c[h-1])&&ze.test(c[h])){c=c.slice(0,h);break}return i.d.announce.of("".concat(t.state.phrase("current match"),". ").concat(c," ").concat(t.state.phrase("on line")," ").concat(t.state.doc.lineAt(n).number))}var We=i.d.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),Ve=[_e,o.i.lowest(Te),We],Ye=n(39);function Ue(t,e){return function(n){var r=n.state,i=n.dispatch,o=t(e,r.selection.ranges,r);return!!o&&(i(r.update(o)),!0)}}var He=Ue(Je,0),Xe=Ue(Ke,0),Ge=[{key:"Mod-/",run:function(t){var e=Ze(t.state);return e.line?He(t):!!e.block&&Xe(t)}},{key:"Alt-A",run:Xe}];function Ze(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.selection.main.head,n=t.languageDataAt("commentTokens",e);return n.length?n[0]:{}}function Ke(t,e,n){var r=e.map((function(t){return Ze(n,t.from).block}));if(!r.every((function(t){return t})))return null;var i=e.map((function(t,e){return function(t,e,n,r){var i,o,a=e.open,s=e.close,u=t.sliceDoc(n-50,n),c=t.sliceDoc(r,r+50),l=/\s*$/.exec(u)[0].length,h=/^\s*/.exec(c)[0].length,f=u.length-l;if(u.slice(f-a.length,f)==a&&c.slice(h,h+s.length)==s)return{open:{pos:n-l,margin:l&&1},close:{pos:r+h,margin:h&&1}};r-n<=100?i=o=t.sliceDoc(n,r):(i=t.sliceDoc(n,n+50),o=t.sliceDoc(r-50,r));var d=/^\s*/.exec(i)[0].length,p=/\s*$/.exec(o)[0].length,g=o.length-p-s.length;return i.slice(d,d+a.length)==a&&o.slice(g,g+s.length)==s?{open:{pos:n+d+a.length,margin:/\s/.test(i.charAt(d+a.length))?1:0},close:{pos:r-p-s.length,margin:/\s/.test(o.charAt(g-1))?1:0}}:null}(n,r[e],t.from,t.to)}));if(2!=t&&!i.every((function(t){return t}))){var a=0;return n.changeByRange((function(t){var e=r[a++],n=e.open,s=e.close;if(i[a])return{range:t};var u=n.length+1;return{changes:[{from:t.from,insert:n+" "},{from:t.to,insert:" "+s}],range:o.e.range(t.anchor+u,t.head+u)}}))}if(1!=t&&i.some((function(t){return t}))){for(var s,u=[],c=0;co&&(c==l||l>p.from)){o=p.from;var g=Ze(n,d).line;if(!g)continue;var m=/^\s*/.exec(p.text)[0].length,v=m==p.length,y=p.text.slice(m,m+g.length)==g?m:-1;m=0}))){var A,D=[],M=Object(a.a)(i);try{for(M.s();!(A=M.n()).done;){var j=A.value,N=j.line,P=j.comment,R=j.token;if(P>=0){var L=N.from+P,F=L+R.length;" "==N.text[F-N.from]&&F++,D.push({from:L,to:F})}}}catch(B){M.e(B)}finally{M.f()}return{changes:D}}return null}var tn=2e3;function en(t,e){var n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(n),i=n-r.from,o=i>tn?-1:i==r.length?function(t,e){var n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}(t,e.clientX):Object(_t.d)(r.text,t.state.tabSize,n-r.from);return{line:r.number,col:o,off:i}}function nn(t,e){var n=en(t,e),r=t.state.selection;return n?{update:function(t){if(t.docChanged){var e=t.changes.mapPos(t.startState.doc.line(n.line).from),i=t.state.doc.lineAt(e);n={line:i.number,col:n.col,off:Math.min(n.off,i.length)},r=r.map(t.changes)}},get:function(e,i,a){var s=en(t,e);if(!s)return r;var u=function(t,e,n){var r=Math.min(e.line,n.line),i=Math.max(e.line,n.line),a=[];if(e.off>tn||n.off>tn||e.col<0||n.col<0)for(var s=Math.min(e.off,n.off),u=Math.max(e.off,n.off),c=r;c<=i;c++){var l=t.doc.line(c);l.length<=u&&a.push(o.e.range(l.from+s,l.to+u))}else for(var h=Math.min(e.col,n.col),f=Math.max(e.col,n.col),d=r;d<=i;d++){var p=t.doc.line(d),g=Object(_t.f)(p.text,h,t.tabSize,!0);if(g>-1){var m=Object(_t.f)(p.text,f,t.tabSize);a.push(o.e.range(p.from+g,p.from+m))}}return a}(t.state,n,s);return u.length?a?o.e.create(u.concat(r.ranges)):o.e.create(u):r}}:null}function rn(t){var e=(null===t||void 0===t?void 0:t.eventFilter)||function(t){return t.altKey&&0==t.button};return i.d.mouseSelectionStyle.of((function(t,n){return e(n)?nn(t,n):null}))}var on=n(4),an=n(69),sn=Object(u.a)((function t(e,n,r){Object(s.a)(this,t),this.from=e,this.to=n,this.diagnostic=r})),un=function(){function t(e,n,r){Object(s.a)(this,t),this.diagnostics=e,this.panel=n,this.selected=r}return Object(u.a)(t,null,[{key:"init",value:function(e,n,r){var o=i.b.set(e.map((function(t){return t.from==t.to||t.from==t.to-1&&r.doc.lineAt(t.from).to==t.from?i.b.widget({widget:new kn(t),diagnostic:t}).range(t.from):i.b.mark({attributes:{class:"cm-lintRange cm-lintRange-"+t.severity},diagnostic:t}).range(t.from,t.to)})),!0);return new t(o,n,cn(o))}}]),t}();function cn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=null;return t.between(n,1e9,(function(t,n,i){var o=i.spec;if(!e||o.diagnostic==e)return r=new sn(t,n,o.diagnostic),!1})),r}function ln(t,e){return t.field(pn,!1)?e:e.concat(o.j.appendConfig.of([pn,i.d.decorations.compute([pn],(function(t){var e=t.field(pn),n=e.selected,r=e.panel;return n&&r&&n.from!=n.to?i.b.set([gn.range(n.from,n.to)]):i.b.none})),Object(an.a)(mn),Cn]))}var hn=o.j.define(),fn=o.j.define(),dn=o.j.define(),pn=o.k.define({create:function(){return new un(i.b.none,null,null)},update:function(t,e){if(e.docChanged){var n=t.diagnostics.map(e.changes),r=null;if(t.selected){var i=e.changes.mapPos(t.selected.from,1);r=cn(n,t.selected.diagnostic,i)||cn(n,null,i)}t=new un(n,t.panel,r)}var o,s=Object(a.a)(e.effects);try{for(s.s();!(o=s.n()).done;){var u=o.value;u.is(hn)?t=un.init(u.value,t.panel,e.state):u.is(fn)?t=new un(t.diagnostics,u.value?_n.open:null,t.selected):u.is(dn)&&(t=new un(t.diagnostics,t.panel,u.value))}}catch(c){s.e(c)}finally{s.f()}return t},provide:function(t){return[Xt.from(t,(function(t){return t.panel})),i.d.decorations.from(t,(function(t){return t.diagnostics}))]}});var gn=i.b.mark({class:"cm-lintRange cm-lintRange-active"});function mn(t,e,n){var r=t.state.field(pn).diagnostics,i=[],o=2e8,a=0;return r.between(e-(n<0?1:0),e+(n>0?1:0),(function(t,r,s){var u=s.spec;e>=t&&e<=r&&(t==r||(e>t||n>0)&&(e=65&&t.keyCode<=90&&n.selectedIndex>=0))return;for(var r=n.items[n.selectedIndex].diagnostic,i=On(r.actions),o=0;oi&&(t.items.splice(i,l-i),o=!0)),r&&u.diagnostic==r.diagnostic?u.dom.hasAttribute("aria-selected")||(u.dom.setAttribute("aria-selected","true"),a=u):u.dom.hasAttribute("aria-selected")&&u.dom.removeAttribute("aria-selected"),i++}));ir.bottom&&(t.list.scrollTop+=n.bottom-r.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),o&&this.sync()}},{key:"sync",value:function(){var t=this.list.firstChild;function e(){var e=t;t=e.nextSibling,e.remove()}var n,r=Object(a.a)(this.items);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.dom.parentNode==this.list){for(;t!=i.dom;)e();t=i.dom.nextSibling}else this.list.insertBefore(i.dom,t)}}catch(o){r.e(o)}finally{r.f()}for(;t;)e()}},{key:"moveSelection",value:function(t){if(!(this.selectedIndex<0)){var e=cn(this.view.state.field(pn).diagnostics,this.items[t].diagnostic);e&&this.view.dispatch({selection:{anchor:e.from,head:e.to},scrollIntoView:!0,effects:dn.of(e)})}}}],[{key:"open",value:function(e){return new t(e)}}]),t}();function Sn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:'viewBox="0 0 40 40"';return'url(\'data:image/svg+xml,").concat(encodeURIComponent(t),"')")}function En(t){return Sn(''),'width="6" height="3"')}var Cn=i.d.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:En("#d11")},".cm-lintRange-warning":{backgroundImage:En("orange")},".cm-lintRange-info":{backgroundImage:En("#999")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});var Tn=[tt(),it(),Object(i.k)(),p(),Ot(),Object(i.h)(),Object(i.i)(),o.f.allowMultipleSelections.of(!0),Object(N.q)(),on.b.fallback,Object(xt.a)(),Dt(),Object(Ye.a)(),rn(),Object(i.j)(),fe(),i.l.of([].concat(Object(r.a)(Rt),Object(r.a)(kt.a),Object(r.a)(Ie),Object(r.a)(D),Object(r.a)(dt),Object(r.a)(Ge),Object(r.a)(Ye.c),Object(r.a)(bn)))]},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(t){if(void 0===t||null===t)return a;if("string"===typeof t)return function(t){return o(e);function e(e){return e&&e.type===t}}(t);if("object"===typeof t)return Array.isArray(t)?i(t):function(t){return o(e);function e(e){var n;for(n in t)if(e[n]!==t[n])return!1;return!0}}(t);if("function"===typeof t)return o(t);throw new Error("Expected function, string, or object as test")};function i(t){for(var e=[],n=-1;++n",GT:">",Gamma:"\u0393",Gammad:"\u03dc",Gbreve:"\u011e",Gcedil:"\u0122",Gcirc:"\u011c",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\ud835\udd0a",Gg:"\u22d9",Gopf:"\ud835\udd3e",GreaterEqual:"\u2265",GreaterEqualLess:"\u22db",GreaterFullEqual:"\u2267",GreaterGreater:"\u2aa2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2a7e",GreaterTilde:"\u2273",Gscr:"\ud835\udca2",Gt:"\u226b",HARDcy:"\u042a",Hacek:"\u02c7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210c",HilbertSpace:"\u210b",Hopf:"\u210d",HorizontalLine:"\u2500",Hscr:"\u210b",Hstrok:"\u0126",HumpDownHump:"\u224e",HumpEqual:"\u224f",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacut:"\xcd",Iacute:"\xcd",Icir:"\xce",Icirc:"\xce",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Igrav:"\xcc",Igrave:"\xcc",Im:"\u2111",Imacr:"\u012a",ImaginaryI:"\u2148",Implies:"\u21d2",Int:"\u222c",Integral:"\u222b",Intersection:"\u22c2",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",Iogon:"\u012e",Iopf:"\ud835\udd40",Iota:"\u0399",Iscr:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Ium:"\xcf",Iuml:"\xcf",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\ud835\udd0d",Jopf:"\ud835\udd41",Jscr:"\ud835\udca5",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040c",Kappa:"\u039a",Kcedil:"\u0136",Kcy:"\u041a",Kfr:"\ud835\udd0e",Kopf:"\ud835\udd42",Kscr:"\ud835\udca6",LJcy:"\u0409",L:"<",LT:"<",Lacute:"\u0139",Lambda:"\u039b",Lang:"\u27ea",Laplacetrf:"\u2112",Larr:"\u219e",Lcaron:"\u013d",Lcedil:"\u013b",Lcy:"\u041b",LeftAngleBracket:"\u27e8",LeftArrow:"\u2190",LeftArrowBar:"\u21e4",LeftArrowRightArrow:"\u21c6",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27e6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21c3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230a",LeftRightArrow:"\u2194",LeftRightVector:"\u294e",LeftTee:"\u22a3",LeftTeeArrow:"\u21a4",LeftTeeVector:"\u295a",LeftTriangle:"\u22b2",LeftTriangleBar:"\u29cf",LeftTriangleEqual:"\u22b4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21bf",LeftUpVectorBar:"\u2958",LeftVector:"\u21bc",LeftVectorBar:"\u2952",Leftarrow:"\u21d0",Leftrightarrow:"\u21d4",LessEqualGreater:"\u22da",LessFullEqual:"\u2266",LessGreater:"\u2276",LessLess:"\u2aa1",LessSlantEqual:"\u2a7d",LessTilde:"\u2272",Lfr:"\ud835\udd0f",Ll:"\u22d8",Lleftarrow:"\u21da",Lmidot:"\u013f",LongLeftArrow:"\u27f5",LongLeftRightArrow:"\u27f7",LongRightArrow:"\u27f6",Longleftarrow:"\u27f8",Longleftrightarrow:"\u27fa",Longrightarrow:"\u27f9",Lopf:"\ud835\udd43",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",Lscr:"\u2112",Lsh:"\u21b0",Lstrok:"\u0141",Lt:"\u226a",Map:"\u2905",Mcy:"\u041c",MediumSpace:"\u205f",Mellintrf:"\u2133",Mfr:"\ud835\udd10",MinusPlus:"\u2213",Mopf:"\ud835\udd44",Mscr:"\u2133",Mu:"\u039c",NJcy:"\u040a",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041d",NegativeMediumSpace:"\u200b",NegativeThickSpace:"\u200b",NegativeThinSpace:"\u200b",NegativeVeryThinSpace:"\u200b",NestedGreaterGreater:"\u226b",NestedLessLess:"\u226a",NewLine:"\n",Nfr:"\ud835\udd11",NoBreak:"\u2060",NonBreakingSpace:"\xa0",Nopf:"\u2115",Not:"\u2aec",NotCongruent:"\u2262",NotCupCap:"\u226d",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226f",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226b\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2a7e\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224e\u0338",NotHumpEqual:"\u224f\u0338",NotLeftTriangle:"\u22ea",NotLeftTriangleBar:"\u29cf\u0338",NotLeftTriangleEqual:"\u22ec",NotLess:"\u226e",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226a\u0338",NotLessSlantEqual:"\u2a7d\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2aa2\u0338",NotNestedLessLess:"\u2aa1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2aaf\u0338",NotPrecedesSlantEqual:"\u22e0",NotReverseElement:"\u220c",NotRightTriangle:"\u22eb",NotRightTriangleBar:"\u29d0\u0338",NotRightTriangleEqual:"\u22ed",NotSquareSubset:"\u228f\u0338",NotSquareSubsetEqual:"\u22e2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22e3",NotSubset:"\u2282\u20d2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2ab0\u0338",NotSucceedsSlantEqual:"\u22e1",NotSucceedsTilde:"\u227f\u0338",NotSuperset:"\u2283\u20d2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\ud835\udca9",Ntild:"\xd1",Ntilde:"\xd1",Nu:"\u039d",OElig:"\u0152",Oacut:"\xd3",Oacute:"\xd3",Ocir:"\xd4",Ocirc:"\xd4",Ocy:"\u041e",Odblac:"\u0150",Ofr:"\ud835\udd12",Ograv:"\xd2",Ograve:"\xd2",Omacr:"\u014c",Omega:"\u03a9",Omicron:"\u039f",Oopf:"\ud835\udd46",OpenCurlyDoubleQuote:"\u201c",OpenCurlyQuote:"\u2018",Or:"\u2a54",Oscr:"\ud835\udcaa",Oslas:"\xd8",Oslash:"\xd8",Otild:"\xd5",Otilde:"\xd5",Otimes:"\u2a37",Oum:"\xd6",Ouml:"\xd6",OverBar:"\u203e",OverBrace:"\u23de",OverBracket:"\u23b4",OverParenthesis:"\u23dc",PartialD:"\u2202",Pcy:"\u041f",Pfr:"\ud835\udd13",Phi:"\u03a6",Pi:"\u03a0",PlusMinus:"\xb1",Poincareplane:"\u210c",Popf:"\u2119",Pr:"\u2abb",Precedes:"\u227a",PrecedesEqual:"\u2aaf",PrecedesSlantEqual:"\u227c",PrecedesTilde:"\u227e",Prime:"\u2033",Product:"\u220f",Proportion:"\u2237",Proportional:"\u221d",Pscr:"\ud835\udcab",Psi:"\u03a8",QUO:'"',QUOT:'"',Qfr:"\ud835\udd14",Qopf:"\u211a",Qscr:"\ud835\udcac",RBarr:"\u2910",RE:"\xae",REG:"\xae",Racute:"\u0154",Rang:"\u27eb",Rarr:"\u21a0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211c",ReverseElement:"\u220b",ReverseEquilibrium:"\u21cb",ReverseUpEquilibrium:"\u296f",Rfr:"\u211c",Rho:"\u03a1",RightAngleBracket:"\u27e9",RightArrow:"\u2192",RightArrowBar:"\u21e5",RightArrowLeftArrow:"\u21c4",RightCeiling:"\u2309",RightDoubleBracket:"\u27e7",RightDownTeeVector:"\u295d",RightDownVector:"\u21c2",RightDownVectorBar:"\u2955",RightFloor:"\u230b",RightTee:"\u22a2",RightTeeArrow:"\u21a6",RightTeeVector:"\u295b",RightTriangle:"\u22b3",RightTriangleBar:"\u29d0",RightTriangleEqual:"\u22b5",RightUpDownVector:"\u294f",RightUpTeeVector:"\u295c",RightUpVector:"\u21be",RightUpVectorBar:"\u2954",RightVector:"\u21c0",RightVectorBar:"\u2953",Rightarrow:"\u21d2",Ropf:"\u211d",RoundImplies:"\u2970",Rrightarrow:"\u21db",Rscr:"\u211b",Rsh:"\u21b1",RuleDelayed:"\u29f4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042c",Sacute:"\u015a",Sc:"\u2abc",Scaron:"\u0160",Scedil:"\u015e",Scirc:"\u015c",Scy:"\u0421",Sfr:"\ud835\udd16",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03a3",SmallCircle:"\u2218",Sopf:"\ud835\udd4a",Sqrt:"\u221a",Square:"\u25a1",SquareIntersection:"\u2293",SquareSubset:"\u228f",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\ud835\udcae",Star:"\u22c6",Sub:"\u22d0",Subset:"\u22d0",SubsetEqual:"\u2286",Succeeds:"\u227b",SucceedsEqual:"\u2ab0",SucceedsSlantEqual:"\u227d",SucceedsTilde:"\u227f",SuchThat:"\u220b",Sum:"\u2211",Sup:"\u22d1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22d1",THOR:"\xde",THORN:"\xde",TRADE:"\u2122",TSHcy:"\u040b",TScy:"\u0426",Tab:"\t",Tau:"\u03a4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\ud835\udd17",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205f\u200a",ThinSpace:"\u2009",Tilde:"\u223c",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\ud835\udd4b",TripleDot:"\u20db",Tscr:"\ud835\udcaf",Tstrok:"\u0166",Uacut:"\xda",Uacute:"\xda",Uarr:"\u219f",Uarrocir:"\u2949",Ubrcy:"\u040e",Ubreve:"\u016c",Ucir:"\xdb",Ucirc:"\xdb",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\ud835\udd18",Ugrav:"\xd9",Ugrave:"\xd9",Umacr:"\u016a",UnderBar:"_",UnderBrace:"\u23df",UnderBracket:"\u23b5",UnderParenthesis:"\u23dd",Union:"\u22c3",UnionPlus:"\u228e",Uogon:"\u0172",Uopf:"\ud835\udd4c",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21c5",UpDownArrow:"\u2195",UpEquilibrium:"\u296e",UpTee:"\u22a5",UpTeeArrow:"\u21a5",Uparrow:"\u21d1",Updownarrow:"\u21d5",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03d2",Upsilon:"\u03a5",Uring:"\u016e",Uscr:"\ud835\udcb0",Utilde:"\u0168",Uum:"\xdc",Uuml:"\xdc",VDash:"\u22ab",Vbar:"\u2aeb",Vcy:"\u0412",Vdash:"\u22a9",Vdashl:"\u2ae6",Vee:"\u22c1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200a",Vfr:"\ud835\udd19",Vopf:"\ud835\udd4d",Vscr:"\ud835\udcb1",Vvdash:"\u22aa",Wcirc:"\u0174",Wedge:"\u22c0",Wfr:"\ud835\udd1a",Wopf:"\ud835\udd4e",Wscr:"\ud835\udcb2",Xfr:"\ud835\udd1b",Xi:"\u039e",Xopf:"\ud835\udd4f",Xscr:"\ud835\udcb3",YAcy:"\u042f",YIcy:"\u0407",YUcy:"\u042e",Yacut:"\xdd",Yacute:"\xdd",Ycirc:"\u0176",Ycy:"\u042b",Yfr:"\ud835\udd1c",Yopf:"\ud835\udd50",Yscr:"\ud835\udcb4",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017d",Zcy:"\u0417",Zdot:"\u017b",ZeroWidthSpace:"\u200b",Zeta:"\u0396",Zfr:"\u2128",Zopf:"\u2124",Zscr:"\ud835\udcb5",aacut:"\xe1",aacute:"\xe1",abreve:"\u0103",ac:"\u223e",acE:"\u223e\u0333",acd:"\u223f",acir:"\xe2",acirc:"\xe2",acut:"\xb4",acute:"\xb4",acy:"\u0430",aeli:"\xe6",aelig:"\xe6",af:"\u2061",afr:"\ud835\udd1e",agrav:"\xe0",agrave:"\xe0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03b1",amacr:"\u0101",amalg:"\u2a3f",am:"&",amp:"&",and:"\u2227",andand:"\u2a55",andd:"\u2a5c",andslope:"\u2a58",andv:"\u2a5a",ang:"\u2220",ange:"\u29a4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29a8",angmsdab:"\u29a9",angmsdac:"\u29aa",angmsdad:"\u29ab",angmsdae:"\u29ac",angmsdaf:"\u29ad",angmsdag:"\u29ae",angmsdah:"\u29af",angrt:"\u221f",angrtvb:"\u22be",angrtvbd:"\u299d",angsph:"\u2222",angst:"\xc5",angzarr:"\u237c",aogon:"\u0105",aopf:"\ud835\udd52",ap:"\u2248",apE:"\u2a70",apacir:"\u2a6f",ape:"\u224a",apid:"\u224b",apos:"'",approx:"\u2248",approxeq:"\u224a",arin:"\xe5",aring:"\xe5",ascr:"\ud835\udcb6",ast:"*",asymp:"\u2248",asympeq:"\u224d",atild:"\xe3",atilde:"\xe3",aum:"\xe4",auml:"\xe4",awconint:"\u2233",awint:"\u2a11",bNot:"\u2aed",backcong:"\u224c",backepsilon:"\u03f6",backprime:"\u2035",backsim:"\u223d",backsimeq:"\u22cd",barvee:"\u22bd",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23b5",bbrktbrk:"\u23b6",bcong:"\u224c",bcy:"\u0431",bdquo:"\u201e",becaus:"\u2235",because:"\u2235",bemptyv:"\u29b0",bepsi:"\u03f6",bernou:"\u212c",beta:"\u03b2",beth:"\u2136",between:"\u226c",bfr:"\ud835\udd1f",bigcap:"\u22c2",bigcirc:"\u25ef",bigcup:"\u22c3",bigodot:"\u2a00",bigoplus:"\u2a01",bigotimes:"\u2a02",bigsqcup:"\u2a06",bigstar:"\u2605",bigtriangledown:"\u25bd",bigtriangleup:"\u25b3",biguplus:"\u2a04",bigvee:"\u22c1",bigwedge:"\u22c0",bkarow:"\u290d",blacklozenge:"\u29eb",blacksquare:"\u25aa",blacktriangle:"\u25b4",blacktriangledown:"\u25be",blacktriangleleft:"\u25c2",blacktriangleright:"\u25b8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20e5",bnequiv:"\u2261\u20e5",bnot:"\u2310",bopf:"\ud835\udd53",bot:"\u22a5",bottom:"\u22a5",bowtie:"\u22c8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255d",boxUR:"\u255a",boxUl:"\u255c",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256c",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256b",boxVl:"\u2562",boxVr:"\u255f",boxbox:"\u29c9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250c",boxh:"\u2500",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252c",boxhu:"\u2534",boxminus:"\u229f",boxplus:"\u229e",boxtimes:"\u22a0",boxuL:"\u255b",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256a",boxvL:"\u2561",boxvR:"\u255e",boxvh:"\u253c",boxvl:"\u2524",boxvr:"\u251c",bprime:"\u2035",breve:"\u02d8",brvba:"\xa6",brvbar:"\xa6",bscr:"\ud835\udcb7",bsemi:"\u204f",bsim:"\u223d",bsime:"\u22cd",bsol:"\\",bsolb:"\u29c5",bsolhsub:"\u27c8",bull:"\u2022",bullet:"\u2022",bump:"\u224e",bumpE:"\u2aae",bumpe:"\u224f",bumpeq:"\u224f",cacute:"\u0107",cap:"\u2229",capand:"\u2a44",capbrcup:"\u2a49",capcap:"\u2a4b",capcup:"\u2a47",capdot:"\u2a40",caps:"\u2229\ufe00",caret:"\u2041",caron:"\u02c7",ccaps:"\u2a4d",ccaron:"\u010d",ccedi:"\xe7",ccedil:"\xe7",ccirc:"\u0109",ccups:"\u2a4c",ccupssm:"\u2a50",cdot:"\u010b",cedi:"\xb8",cedil:"\xb8",cemptyv:"\u29b2",cen:"\xa2",cent:"\xa2",centerdot:"\xb7",cfr:"\ud835\udd20",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03c7",cir:"\u25cb",cirE:"\u29c3",circ:"\u02c6",circeq:"\u2257",circlearrowleft:"\u21ba",circlearrowright:"\u21bb",circledR:"\xae",circledS:"\u24c8",circledast:"\u229b",circledcirc:"\u229a",circleddash:"\u229d",cire:"\u2257",cirfnint:"\u2a10",cirmid:"\u2aef",cirscir:"\u29c2",clubs:"\u2663",clubsuit:"\u2663",colon:":",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2a6d",conint:"\u222e",copf:"\ud835\udd54",coprod:"\u2210",cop:"\xa9",copy:"\xa9",copysr:"\u2117",crarr:"\u21b5",cross:"\u2717",cscr:"\ud835\udcb8",csub:"\u2acf",csube:"\u2ad1",csup:"\u2ad0",csupe:"\u2ad2",ctdot:"\u22ef",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22de",cuesc:"\u22df",cularr:"\u21b6",cularrp:"\u293d",cup:"\u222a",cupbrcap:"\u2a48",cupcap:"\u2a46",cupcup:"\u2a4a",cupdot:"\u228d",cupor:"\u2a45",cups:"\u222a\ufe00",curarr:"\u21b7",curarrm:"\u293c",curlyeqprec:"\u22de",curlyeqsucc:"\u22df",curlyvee:"\u22ce",curlywedge:"\u22cf",curre:"\xa4",curren:"\xa4",curvearrowleft:"\u21b6",curvearrowright:"\u21b7",cuvee:"\u22ce",cuwed:"\u22cf",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232d",dArr:"\u21d3",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",darr:"\u2193",dash:"\u2010",dashv:"\u22a3",dbkarow:"\u290f",dblac:"\u02dd",dcaron:"\u010f",dcy:"\u0434",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21ca",ddotseq:"\u2a77",de:"\xb0",deg:"\xb0",delta:"\u03b4",demptyv:"\u29b1",dfisht:"\u297f",dfr:"\ud835\udd21",dharl:"\u21c3",dharr:"\u21c2",diam:"\u22c4",diamond:"\u22c4",diamondsuit:"\u2666",diams:"\u2666",die:"\xa8",digamma:"\u03dd",disin:"\u22f2",div:"\xf7",divid:"\xf7",divide:"\xf7",divideontimes:"\u22c7",divonx:"\u22c7",djcy:"\u0452",dlcorn:"\u231e",dlcrop:"\u230d",dollar:"$",dopf:"\ud835\udd55",dot:"\u02d9",doteq:"\u2250",doteqdot:"\u2251",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22a1",doublebarwedge:"\u2306",downarrow:"\u2193",downdownarrows:"\u21ca",downharpoonleft:"\u21c3",downharpoonright:"\u21c2",drbkarow:"\u2910",drcorn:"\u231f",drcrop:"\u230c",dscr:"\ud835\udcb9",dscy:"\u0455",dsol:"\u29f6",dstrok:"\u0111",dtdot:"\u22f1",dtri:"\u25bf",dtrif:"\u25be",duarr:"\u21f5",duhar:"\u296f",dwangle:"\u29a6",dzcy:"\u045f",dzigrarr:"\u27ff",eDDot:"\u2a77",eDot:"\u2251",eacut:"\xe9",eacute:"\xe9",easter:"\u2a6e",ecaron:"\u011b",ecir:"\xea",ecirc:"\xea",ecolon:"\u2255",ecy:"\u044d",edot:"\u0117",ee:"\u2147",efDot:"\u2252",efr:"\ud835\udd22",eg:"\u2a9a",egrav:"\xe8",egrave:"\xe8",egs:"\u2a96",egsdot:"\u2a98",el:"\u2a99",elinters:"\u23e7",ell:"\u2113",els:"\u2a95",elsdot:"\u2a97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014b",ensp:"\u2002",eogon:"\u0119",eopf:"\ud835\udd56",epar:"\u22d5",eparsl:"\u29e3",eplus:"\u2a71",epsi:"\u03b5",epsilon:"\u03b5",epsiv:"\u03f5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2a96",eqslantless:"\u2a95",equals:"=",equest:"\u225f",equiv:"\u2261",equivDD:"\u2a78",eqvparsl:"\u29e5",erDot:"\u2253",erarr:"\u2971",escr:"\u212f",esdot:"\u2250",esim:"\u2242",eta:"\u03b7",et:"\xf0",eth:"\xf0",eum:"\xeb",euml:"\xeb",euro:"\u20ac",excl:"!",exist:"\u2203",expectation:"\u2130",exponentiale:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",female:"\u2640",ffilig:"\ufb03",fflig:"\ufb00",ffllig:"\ufb04",ffr:"\ud835\udd23",filig:"\ufb01",fjlig:"fj",flat:"\u266d",fllig:"\ufb02",fltns:"\u25b1",fnof:"\u0192",fopf:"\ud835\udd57",forall:"\u2200",fork:"\u22d4",forkv:"\u2ad9",fpartint:"\u2a0d",frac1:"\xbc",frac12:"\xbd",frac13:"\u2153",frac14:"\xbc",frac15:"\u2155",frac16:"\u2159",frac18:"\u215b",frac23:"\u2154",frac25:"\u2156",frac3:"\xbe",frac34:"\xbe",frac35:"\u2157",frac38:"\u215c",frac45:"\u2158",frac56:"\u215a",frac58:"\u215d",frac78:"\u215e",frasl:"\u2044",frown:"\u2322",fscr:"\ud835\udcbb",gE:"\u2267",gEl:"\u2a8c",gacute:"\u01f5",gamma:"\u03b3",gammad:"\u03dd",gap:"\u2a86",gbreve:"\u011f",gcirc:"\u011d",gcy:"\u0433",gdot:"\u0121",ge:"\u2265",gel:"\u22db",geq:"\u2265",geqq:"\u2267",geqslant:"\u2a7e",ges:"\u2a7e",gescc:"\u2aa9",gesdot:"\u2a80",gesdoto:"\u2a82",gesdotol:"\u2a84",gesl:"\u22db\ufe00",gesles:"\u2a94",gfr:"\ud835\udd24",gg:"\u226b",ggg:"\u22d9",gimel:"\u2137",gjcy:"\u0453",gl:"\u2277",glE:"\u2a92",gla:"\u2aa5",glj:"\u2aa4",gnE:"\u2269",gnap:"\u2a8a",gnapprox:"\u2a8a",gne:"\u2a88",gneq:"\u2a88",gneqq:"\u2269",gnsim:"\u22e7",gopf:"\ud835\udd58",grave:"`",gscr:"\u210a",gsim:"\u2273",gsime:"\u2a8e",gsiml:"\u2a90",g:">",gt:">",gtcc:"\u2aa7",gtcir:"\u2a7a",gtdot:"\u22d7",gtlPar:"\u2995",gtquest:"\u2a7c",gtrapprox:"\u2a86",gtrarr:"\u2978",gtrdot:"\u22d7",gtreqless:"\u22db",gtreqqless:"\u2a8c",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\ufe00",gvnE:"\u2269\ufe00",hArr:"\u21d4",hairsp:"\u200a",half:"\xbd",hamilt:"\u210b",hardcy:"\u044a",harr:"\u2194",harrcir:"\u2948",harrw:"\u21ad",hbar:"\u210f",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22b9",hfr:"\ud835\udd25",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21ff",homtht:"\u223b",hookleftarrow:"\u21a9",hookrightarrow:"\u21aa",hopf:"\ud835\udd59",horbar:"\u2015",hscr:"\ud835\udcbd",hslash:"\u210f",hstrok:"\u0127",hybull:"\u2043",hyphen:"\u2010",iacut:"\xed",iacute:"\xed",ic:"\u2063",icir:"\xee",icirc:"\xee",icy:"\u0438",iecy:"\u0435",iexc:"\xa1",iexcl:"\xa1",iff:"\u21d4",ifr:"\ud835\udd26",igrav:"\xec",igrave:"\xec",ii:"\u2148",iiiint:"\u2a0c",iiint:"\u222d",iinfin:"\u29dc",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012b",image:"\u2111",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22b7",imped:"\u01b5",in:"\u2208",incare:"\u2105",infin:"\u221e",infintie:"\u29dd",inodot:"\u0131",int:"\u222b",intcal:"\u22ba",integers:"\u2124",intercal:"\u22ba",intlarhk:"\u2a17",intprod:"\u2a3c",iocy:"\u0451",iogon:"\u012f",iopf:"\ud835\udd5a",iota:"\u03b9",iprod:"\u2a3c",iques:"\xbf",iquest:"\xbf",iscr:"\ud835\udcbe",isin:"\u2208",isinE:"\u22f9",isindot:"\u22f5",isins:"\u22f4",isinsv:"\u22f3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",iukcy:"\u0456",ium:"\xef",iuml:"\xef",jcirc:"\u0135",jcy:"\u0439",jfr:"\ud835\udd27",jmath:"\u0237",jopf:"\ud835\udd5b",jscr:"\ud835\udcbf",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03ba",kappav:"\u03f0",kcedil:"\u0137",kcy:"\u043a",kfr:"\ud835\udd28",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045c",kopf:"\ud835\udd5c",kscr:"\ud835\udcc0",lAarr:"\u21da",lArr:"\u21d0",lAtail:"\u291b",lBarr:"\u290e",lE:"\u2266",lEg:"\u2a8b",lHar:"\u2962",lacute:"\u013a",laemptyv:"\u29b4",lagran:"\u2112",lambda:"\u03bb",lang:"\u27e8",langd:"\u2991",langle:"\u27e8",lap:"\u2a85",laqu:"\xab",laquo:"\xab",larr:"\u2190",larrb:"\u21e4",larrbfs:"\u291f",larrfs:"\u291d",larrhk:"\u21a9",larrlp:"\u21ab",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21a2",lat:"\u2aab",latail:"\u2919",late:"\u2aad",lates:"\u2aad\ufe00",lbarr:"\u290c",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298b",lbrksld:"\u298f",lbrkslu:"\u298d",lcaron:"\u013e",lcedil:"\u013c",lceil:"\u2308",lcub:"{",lcy:"\u043b",ldca:"\u2936",ldquo:"\u201c",ldquor:"\u201e",ldrdhar:"\u2967",ldrushar:"\u294b",ldsh:"\u21b2",le:"\u2264",leftarrow:"\u2190",leftarrowtail:"\u21a2",leftharpoondown:"\u21bd",leftharpoonup:"\u21bc",leftleftarrows:"\u21c7",leftrightarrow:"\u2194",leftrightarrows:"\u21c6",leftrightharpoons:"\u21cb",leftrightsquigarrow:"\u21ad",leftthreetimes:"\u22cb",leg:"\u22da",leq:"\u2264",leqq:"\u2266",leqslant:"\u2a7d",les:"\u2a7d",lescc:"\u2aa8",lesdot:"\u2a7f",lesdoto:"\u2a81",lesdotor:"\u2a83",lesg:"\u22da\ufe00",lesges:"\u2a93",lessapprox:"\u2a85",lessdot:"\u22d6",lesseqgtr:"\u22da",lesseqqgtr:"\u2a8b",lessgtr:"\u2276",lesssim:"\u2272",lfisht:"\u297c",lfloor:"\u230a",lfr:"\ud835\udd29",lg:"\u2276",lgE:"\u2a91",lhard:"\u21bd",lharu:"\u21bc",lharul:"\u296a",lhblk:"\u2584",ljcy:"\u0459",ll:"\u226a",llarr:"\u21c7",llcorner:"\u231e",llhard:"\u296b",lltri:"\u25fa",lmidot:"\u0140",lmoust:"\u23b0",lmoustache:"\u23b0",lnE:"\u2268",lnap:"\u2a89",lnapprox:"\u2a89",lne:"\u2a87",lneq:"\u2a87",lneqq:"\u2268",lnsim:"\u22e6",loang:"\u27ec",loarr:"\u21fd",lobrk:"\u27e6",longleftarrow:"\u27f5",longleftrightarrow:"\u27f7",longmapsto:"\u27fc",longrightarrow:"\u27f6",looparrowleft:"\u21ab",looparrowright:"\u21ac",lopar:"\u2985",lopf:"\ud835\udd5d",loplus:"\u2a2d",lotimes:"\u2a34",lowast:"\u2217",lowbar:"_",loz:"\u25ca",lozenge:"\u25ca",lozf:"\u29eb",lpar:"(",lparlt:"\u2993",lrarr:"\u21c6",lrcorner:"\u231f",lrhar:"\u21cb",lrhard:"\u296d",lrm:"\u200e",lrtri:"\u22bf",lsaquo:"\u2039",lscr:"\ud835\udcc1",lsh:"\u21b0",lsim:"\u2272",lsime:"\u2a8d",lsimg:"\u2a8f",lsqb:"[",lsquo:"\u2018",lsquor:"\u201a",lstrok:"\u0142",l:"<",lt:"<",ltcc:"\u2aa6",ltcir:"\u2a79",ltdot:"\u22d6",lthree:"\u22cb",ltimes:"\u22c9",ltlarr:"\u2976",ltquest:"\u2a7b",ltrPar:"\u2996",ltri:"\u25c3",ltrie:"\u22b4",ltrif:"\u25c2",lurdshar:"\u294a",luruhar:"\u2966",lvertneqq:"\u2268\ufe00",lvnE:"\u2268\ufe00",mDDot:"\u223a",mac:"\xaf",macr:"\xaf",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21a6",mapsto:"\u21a6",mapstodown:"\u21a7",mapstoleft:"\u21a4",mapstoup:"\u21a5",marker:"\u25ae",mcomma:"\u2a29",mcy:"\u043c",mdash:"\u2014",measuredangle:"\u2221",mfr:"\ud835\udd2a",mho:"\u2127",micr:"\xb5",micro:"\xb5",mid:"\u2223",midast:"*",midcir:"\u2af0",middo:"\xb7",middot:"\xb7",minus:"\u2212",minusb:"\u229f",minusd:"\u2238",minusdu:"\u2a2a",mlcp:"\u2adb",mldr:"\u2026",mnplus:"\u2213",models:"\u22a7",mopf:"\ud835\udd5e",mp:"\u2213",mscr:"\ud835\udcc2",mstpos:"\u223e",mu:"\u03bc",multimap:"\u22b8",mumap:"\u22b8",nGg:"\u22d9\u0338",nGt:"\u226b\u20d2",nGtv:"\u226b\u0338",nLeftarrow:"\u21cd",nLeftrightarrow:"\u21ce",nLl:"\u22d8\u0338",nLt:"\u226a\u20d2",nLtv:"\u226a\u0338",nRightarrow:"\u21cf",nVDash:"\u22af",nVdash:"\u22ae",nabla:"\u2207",nacute:"\u0144",nang:"\u2220\u20d2",nap:"\u2249",napE:"\u2a70\u0338",napid:"\u224b\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266e",natural:"\u266e",naturals:"\u2115",nbs:"\xa0",nbsp:"\xa0",nbump:"\u224e\u0338",nbumpe:"\u224f\u0338",ncap:"\u2a43",ncaron:"\u0148",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2a6d\u0338",ncup:"\u2a42",ncy:"\u043d",ndash:"\u2013",ne:"\u2260",neArr:"\u21d7",nearhk:"\u2924",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",nexist:"\u2204",nexists:"\u2204",nfr:"\ud835\udd2b",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2a7e\u0338",nges:"\u2a7e\u0338",ngsim:"\u2275",ngt:"\u226f",ngtr:"\u226f",nhArr:"\u21ce",nharr:"\u21ae",nhpar:"\u2af2",ni:"\u220b",nis:"\u22fc",nisd:"\u22fa",niv:"\u220b",njcy:"\u045a",nlArr:"\u21cd",nlE:"\u2266\u0338",nlarr:"\u219a",nldr:"\u2025",nle:"\u2270",nleftarrow:"\u219a",nleftrightarrow:"\u21ae",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2a7d\u0338",nles:"\u2a7d\u0338",nless:"\u226e",nlsim:"\u2274",nlt:"\u226e",nltri:"\u22ea",nltrie:"\u22ec",nmid:"\u2224",nopf:"\ud835\udd5f",no:"\xac",not:"\xac",notin:"\u2209",notinE:"\u22f9\u0338",notindot:"\u22f5\u0338",notinva:"\u2209",notinvb:"\u22f7",notinvc:"\u22f6",notni:"\u220c",notniva:"\u220c",notnivb:"\u22fe",notnivc:"\u22fd",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2afd\u20e5",npart:"\u2202\u0338",npolint:"\u2a14",npr:"\u2280",nprcue:"\u22e0",npre:"\u2aaf\u0338",nprec:"\u2280",npreceq:"\u2aaf\u0338",nrArr:"\u21cf",nrarr:"\u219b",nrarrc:"\u2933\u0338",nrarrw:"\u219d\u0338",nrightarrow:"\u219b",nrtri:"\u22eb",nrtrie:"\u22ed",nsc:"\u2281",nsccue:"\u22e1",nsce:"\u2ab0\u0338",nscr:"\ud835\udcc3",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22e2",nsqsupe:"\u22e3",nsub:"\u2284",nsubE:"\u2ac5\u0338",nsube:"\u2288",nsubset:"\u2282\u20d2",nsubseteq:"\u2288",nsubseteqq:"\u2ac5\u0338",nsucc:"\u2281",nsucceq:"\u2ab0\u0338",nsup:"\u2285",nsupE:"\u2ac6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20d2",nsupseteq:"\u2289",nsupseteqq:"\u2ac6\u0338",ntgl:"\u2279",ntild:"\xf1",ntilde:"\xf1",ntlg:"\u2278",ntriangleleft:"\u22ea",ntrianglelefteq:"\u22ec",ntriangleright:"\u22eb",ntrianglerighteq:"\u22ed",nu:"\u03bd",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22ad",nvHarr:"\u2904",nvap:"\u224d\u20d2",nvdash:"\u22ac",nvge:"\u2265\u20d2",nvgt:">\u20d2",nvinfin:"\u29de",nvlArr:"\u2902",nvle:"\u2264\u20d2",nvlt:"<\u20d2",nvltrie:"\u22b4\u20d2",nvrArr:"\u2903",nvrtrie:"\u22b5\u20d2",nvsim:"\u223c\u20d2",nwArr:"\u21d6",nwarhk:"\u2923",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",oS:"\u24c8",oacut:"\xf3",oacute:"\xf3",oast:"\u229b",ocir:"\xf4",ocirc:"\xf4",ocy:"\u043e",odash:"\u229d",odblac:"\u0151",odiv:"\u2a38",odot:"\u2299",odsold:"\u29bc",oelig:"\u0153",ofcir:"\u29bf",ofr:"\ud835\udd2c",ogon:"\u02db",ograv:"\xf2",ograve:"\xf2",ogt:"\u29c1",ohbar:"\u29b5",ohm:"\u03a9",oint:"\u222e",olarr:"\u21ba",olcir:"\u29be",olcross:"\u29bb",oline:"\u203e",olt:"\u29c0",omacr:"\u014d",omega:"\u03c9",omicron:"\u03bf",omid:"\u29b6",ominus:"\u2296",oopf:"\ud835\udd60",opar:"\u29b7",operp:"\u29b9",oplus:"\u2295",or:"\u2228",orarr:"\u21bb",ord:"\xba",order:"\u2134",orderof:"\u2134",ordf:"\xaa",ordm:"\xba",origof:"\u22b6",oror:"\u2a56",orslope:"\u2a57",orv:"\u2a5b",oscr:"\u2134",oslas:"\xf8",oslash:"\xf8",osol:"\u2298",otild:"\xf5",otilde:"\xf5",otimes:"\u2297",otimesas:"\u2a36",oum:"\xf6",ouml:"\xf6",ovbar:"\u233d",par:"\xb6",para:"\xb6",parallel:"\u2225",parsim:"\u2af3",parsl:"\u2afd",part:"\u2202",pcy:"\u043f",percnt:"%",period:".",permil:"\u2030",perp:"\u22a5",pertenk:"\u2031",pfr:"\ud835\udd2d",phi:"\u03c6",phiv:"\u03d5",phmmat:"\u2133",phone:"\u260e",pi:"\u03c0",pitchfork:"\u22d4",piv:"\u03d6",planck:"\u210f",planckh:"\u210e",plankv:"\u210f",plus:"+",plusacir:"\u2a23",plusb:"\u229e",pluscir:"\u2a22",plusdo:"\u2214",plusdu:"\u2a25",pluse:"\u2a72",plusm:"\xb1",plusmn:"\xb1",plussim:"\u2a26",plustwo:"\u2a27",pm:"\xb1",pointint:"\u2a15",popf:"\ud835\udd61",poun:"\xa3",pound:"\xa3",pr:"\u227a",prE:"\u2ab3",prap:"\u2ab7",prcue:"\u227c",pre:"\u2aaf",prec:"\u227a",precapprox:"\u2ab7",preccurlyeq:"\u227c",preceq:"\u2aaf",precnapprox:"\u2ab9",precneqq:"\u2ab5",precnsim:"\u22e8",precsim:"\u227e",prime:"\u2032",primes:"\u2119",prnE:"\u2ab5",prnap:"\u2ab9",prnsim:"\u22e8",prod:"\u220f",profalar:"\u232e",profline:"\u2312",profsurf:"\u2313",prop:"\u221d",propto:"\u221d",prsim:"\u227e",prurel:"\u22b0",pscr:"\ud835\udcc5",psi:"\u03c8",puncsp:"\u2008",qfr:"\ud835\udd2e",qint:"\u2a0c",qopf:"\ud835\udd62",qprime:"\u2057",qscr:"\ud835\udcc6",quaternions:"\u210d",quatint:"\u2a16",quest:"?",questeq:"\u225f",quo:'"',quot:'"',rAarr:"\u21db",rArr:"\u21d2",rAtail:"\u291c",rBarr:"\u290f",rHar:"\u2964",race:"\u223d\u0331",racute:"\u0155",radic:"\u221a",raemptyv:"\u29b3",rang:"\u27e9",rangd:"\u2992",range:"\u29a5",rangle:"\u27e9",raqu:"\xbb",raquo:"\xbb",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21e5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291e",rarrhk:"\u21aa",rarrlp:"\u21ac",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21a3",rarrw:"\u219d",ratail:"\u291a",ratio:"\u2236",rationals:"\u211a",rbarr:"\u290d",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298c",rbrksld:"\u298e",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rceil:"\u2309",rcub:"}",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201d",rdquor:"\u201d",rdsh:"\u21b3",real:"\u211c",realine:"\u211b",realpart:"\u211c",reals:"\u211d",rect:"\u25ad",re:"\xae",reg:"\xae",rfisht:"\u297d",rfloor:"\u230b",rfr:"\ud835\udd2f",rhard:"\u21c1",rharu:"\u21c0",rharul:"\u296c",rho:"\u03c1",rhov:"\u03f1",rightarrow:"\u2192",rightarrowtail:"\u21a3",rightharpoondown:"\u21c1",rightharpoonup:"\u21c0",rightleftarrows:"\u21c4",rightleftharpoons:"\u21cc",rightrightarrows:"\u21c9",rightsquigarrow:"\u219d",rightthreetimes:"\u22cc",ring:"\u02da",risingdotseq:"\u2253",rlarr:"\u21c4",rlhar:"\u21cc",rlm:"\u200f",rmoust:"\u23b1",rmoustache:"\u23b1",rnmid:"\u2aee",roang:"\u27ed",roarr:"\u21fe",robrk:"\u27e7",ropar:"\u2986",ropf:"\ud835\udd63",roplus:"\u2a2e",rotimes:"\u2a35",rpar:")",rpargt:"\u2994",rppolint:"\u2a12",rrarr:"\u21c9",rsaquo:"\u203a",rscr:"\ud835\udcc7",rsh:"\u21b1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22cc",rtimes:"\u22ca",rtri:"\u25b9",rtrie:"\u22b5",rtrif:"\u25b8",rtriltri:"\u29ce",ruluhar:"\u2968",rx:"\u211e",sacute:"\u015b",sbquo:"\u201a",sc:"\u227b",scE:"\u2ab4",scap:"\u2ab8",scaron:"\u0161",sccue:"\u227d",sce:"\u2ab0",scedil:"\u015f",scirc:"\u015d",scnE:"\u2ab6",scnap:"\u2aba",scnsim:"\u22e9",scpolint:"\u2a13",scsim:"\u227f",scy:"\u0441",sdot:"\u22c5",sdotb:"\u22a1",sdote:"\u2a66",seArr:"\u21d8",searhk:"\u2925",searr:"\u2198",searrow:"\u2198",sec:"\xa7",sect:"\xa7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\ud835\udd30",sfrown:"\u2322",sharp:"\u266f",shchcy:"\u0449",shcy:"\u0448",shortmid:"\u2223",shortparallel:"\u2225",sh:"\xad",shy:"\xad",sigma:"\u03c3",sigmaf:"\u03c2",sigmav:"\u03c2",sim:"\u223c",simdot:"\u2a6a",sime:"\u2243",simeq:"\u2243",simg:"\u2a9e",simgE:"\u2aa0",siml:"\u2a9d",simlE:"\u2a9f",simne:"\u2246",simplus:"\u2a24",simrarr:"\u2972",slarr:"\u2190",smallsetminus:"\u2216",smashp:"\u2a33",smeparsl:"\u29e4",smid:"\u2223",smile:"\u2323",smt:"\u2aaa",smte:"\u2aac",smtes:"\u2aac\ufe00",softcy:"\u044c",sol:"/",solb:"\u29c4",solbar:"\u233f",sopf:"\ud835\udd64",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\ufe00",sqcup:"\u2294",sqcups:"\u2294\ufe00",sqsub:"\u228f",sqsube:"\u2291",sqsubset:"\u228f",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25a1",square:"\u25a1",squarf:"\u25aa",squf:"\u25aa",srarr:"\u2192",sscr:"\ud835\udcc8",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22c6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03f5",straightphi:"\u03d5",strns:"\xaf",sub:"\u2282",subE:"\u2ac5",subdot:"\u2abd",sube:"\u2286",subedot:"\u2ac3",submult:"\u2ac1",subnE:"\u2acb",subne:"\u228a",subplus:"\u2abf",subrarr:"\u2979",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2ac5",subsetneq:"\u228a",subsetneqq:"\u2acb",subsim:"\u2ac7",subsub:"\u2ad5",subsup:"\u2ad3",succ:"\u227b",succapprox:"\u2ab8",succcurlyeq:"\u227d",succeq:"\u2ab0",succnapprox:"\u2aba",succneqq:"\u2ab6",succnsim:"\u22e9",succsim:"\u227f",sum:"\u2211",sung:"\u266a",sup:"\u2283",sup1:"\xb9",sup2:"\xb2",sup3:"\xb3",supE:"\u2ac6",supdot:"\u2abe",supdsub:"\u2ad8",supe:"\u2287",supedot:"\u2ac4",suphsol:"\u27c9",suphsub:"\u2ad7",suplarr:"\u297b",supmult:"\u2ac2",supnE:"\u2acc",supne:"\u228b",supplus:"\u2ac0",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2ac6",supsetneq:"\u228b",supsetneqq:"\u2acc",supsim:"\u2ac8",supsub:"\u2ad4",supsup:"\u2ad6",swArr:"\u21d9",swarhk:"\u2926",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292a",szli:"\xdf",szlig:"\xdf",target:"\u2316",tau:"\u03c4",tbrk:"\u23b4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",tdot:"\u20db",telrec:"\u2315",tfr:"\ud835\udd31",there4:"\u2234",therefore:"\u2234",theta:"\u03b8",thetasym:"\u03d1",thetav:"\u03d1",thickapprox:"\u2248",thicksim:"\u223c",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223c",thor:"\xfe",thorn:"\xfe",tilde:"\u02dc",time:"\xd7",times:"\xd7",timesb:"\u22a0",timesbar:"\u2a31",timesd:"\u2a30",tint:"\u222d",toea:"\u2928",top:"\u22a4",topbot:"\u2336",topcir:"\u2af1",topf:"\ud835\udd65",topfork:"\u2ada",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",triangle:"\u25b5",triangledown:"\u25bf",triangleleft:"\u25c3",trianglelefteq:"\u22b4",triangleq:"\u225c",triangleright:"\u25b9",trianglerighteq:"\u22b5",tridot:"\u25ec",trie:"\u225c",triminus:"\u2a3a",triplus:"\u2a39",trisb:"\u29cd",tritime:"\u2a3b",trpezium:"\u23e2",tscr:"\ud835\udcc9",tscy:"\u0446",tshcy:"\u045b",tstrok:"\u0167",twixt:"\u226c",twoheadleftarrow:"\u219e",twoheadrightarrow:"\u21a0",uArr:"\u21d1",uHar:"\u2963",uacut:"\xfa",uacute:"\xfa",uarr:"\u2191",ubrcy:"\u045e",ubreve:"\u016d",ucir:"\xfb",ucirc:"\xfb",ucy:"\u0443",udarr:"\u21c5",udblac:"\u0171",udhar:"\u296e",ufisht:"\u297e",ufr:"\ud835\udd32",ugrav:"\xf9",ugrave:"\xf9",uharl:"\u21bf",uharr:"\u21be",uhblk:"\u2580",ulcorn:"\u231c",ulcorner:"\u231c",ulcrop:"\u230f",ultri:"\u25f8",umacr:"\u016b",um:"\xa8",uml:"\xa8",uogon:"\u0173",uopf:"\ud835\udd66",uparrow:"\u2191",updownarrow:"\u2195",upharpoonleft:"\u21bf",upharpoonright:"\u21be",uplus:"\u228e",upsi:"\u03c5",upsih:"\u03d2",upsilon:"\u03c5",upuparrows:"\u21c8",urcorn:"\u231d",urcorner:"\u231d",urcrop:"\u230e",uring:"\u016f",urtri:"\u25f9",uscr:"\ud835\udcca",utdot:"\u22f0",utilde:"\u0169",utri:"\u25b5",utrif:"\u25b4",uuarr:"\u21c8",uum:"\xfc",uuml:"\xfc",uwangle:"\u29a7",vArr:"\u21d5",vBar:"\u2ae8",vBarv:"\u2ae9",vDash:"\u22a8",vangrt:"\u299c",varepsilon:"\u03f5",varkappa:"\u03f0",varnothing:"\u2205",varphi:"\u03d5",varpi:"\u03d6",varpropto:"\u221d",varr:"\u2195",varrho:"\u03f1",varsigma:"\u03c2",varsubsetneq:"\u228a\ufe00",varsubsetneqq:"\u2acb\ufe00",varsupsetneq:"\u228b\ufe00",varsupsetneqq:"\u2acc\ufe00",vartheta:"\u03d1",vartriangleleft:"\u22b2",vartriangleright:"\u22b3",vcy:"\u0432",vdash:"\u22a2",vee:"\u2228",veebar:"\u22bb",veeeq:"\u225a",vellip:"\u22ee",verbar:"|",vert:"|",vfr:"\ud835\udd33",vltri:"\u22b2",vnsub:"\u2282\u20d2",vnsup:"\u2283\u20d2",vopf:"\ud835\udd67",vprop:"\u221d",vrtri:"\u22b3",vscr:"\ud835\udccb",vsubnE:"\u2acb\ufe00",vsubne:"\u228a\ufe00",vsupnE:"\u2acc\ufe00",vsupne:"\u228b\ufe00",vzigzag:"\u299a",wcirc:"\u0175",wedbar:"\u2a5f",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",wfr:"\ud835\udd34",wopf:"\ud835\udd68",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\ud835\udccc",xcap:"\u22c2",xcirc:"\u25ef",xcup:"\u22c3",xdtri:"\u25bd",xfr:"\ud835\udd35",xhArr:"\u27fa",xharr:"\u27f7",xi:"\u03be",xlArr:"\u27f8",xlarr:"\u27f5",xmap:"\u27fc",xnis:"\u22fb",xodot:"\u2a00",xopf:"\ud835\udd69",xoplus:"\u2a01",xotime:"\u2a02",xrArr:"\u27f9",xrarr:"\u27f6",xscr:"\ud835\udccd",xsqcup:"\u2a06",xuplus:"\u2a04",xutri:"\u25b3",xvee:"\u22c1",xwedge:"\u22c0",yacut:"\xfd",yacute:"\xfd",yacy:"\u044f",ycirc:"\u0177",ycy:"\u044b",ye:"\xa5",yen:"\xa5",yfr:"\ud835\udd36",yicy:"\u0457",yopf:"\ud835\udd6a",yscr:"\ud835\udcce",yucy:"\u044e",yum:"\xff",yuml:"\xff",zacute:"\u017a",zcaron:"\u017e",zcy:"\u0437",zdot:"\u017c",zeetrf:"\u2128",zeta:"\u03b6",zfr:"\ud835\udd37",zhcy:"\u0436",zigrarr:"\u21dd",zopf:"\ud835\udd6b",zscr:"\ud835\udccf",zwj:"\u200d",zwnj:"\u200c"},i={}.hasOwnProperty;function o(t){return!!i.call(r,t)&&r[t]}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(6);function i(t){return null===t||Object(r.i)(t)||Object(r.l)(t)?1:Object(r.k)(t)?2:void 0}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return d}));for(var r={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"},i={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},o="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),a="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),s="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),u="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),c="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),l=o&&(u||+o[1]<57)||s&&u,h=0;h<10;h++)r[48+h]=r[96+h]=String(h);for(h=1;h<=24;h++)r[h+111]="F"+h;for(h=65;h<=90;h++)r[h]=String.fromCharCode(h+32),i[h]=String.fromCharCode(h);for(var f in r)i.hasOwnProperty(f)||(i[f]=r[f]);function d(t){var e=!(l&&(t.ctrlKey||t.altKey||t.metaKey)||(a||c)&&t.shiftKey&&t.key&&1==t.key.length)&&t.key||(t.shiftKey?i:r)[t.keyCode]||t.key||"Unidentified";return"Esc"==e&&(e="Escape"),"Del"==e&&(e="Delete"),"Left"==e&&(e="ArrowLeft"),"Up"==e&&(e="ArrowUp"),"Right"==e&&(e="ArrowRight"),"Down"==e&&(e="ArrowDown"),e}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(9),i=n(24);function o(t){return void 0===t&&(t={}),new r.d({view:function(e){return new a(e,t)}})}var a=function(t,e){var n=this;this.editorView=t,this.width=e.width||1,this.color=e.color||"black",this.class=e.class,this.cursorPos=null,this.element=null,this.timeout=null,this.handlers=["dragover","dragend","drop","dragleave"].map((function(e){var r=function(t){return n[e](t)};return t.dom.addEventListener(e,r),{name:e,handler:r}}))};a.prototype.destroy=function(){var t=this;this.handlers.forEach((function(e){var n=e.name,r=e.handler;return t.editorView.dom.removeEventListener(n,r)}))},a.prototype.update=function(t,e){null!=this.cursorPos&&e.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())},a.prototype.setCursor=function(t){t!=this.cursorPos&&(this.cursorPos=t,null==t?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())},a.prototype.updateOverlay=function(){var t,e=this.editorView.state.doc.resolve(this.cursorPos);if(!e.parent.inlineContent){var n=e.nodeBefore,r=e.nodeAfter;if(n||r){var i=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0)).getBoundingClientRect(),o=n?i.bottom:i.top;n&&r&&(o=(o+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),t={left:i.left,right:i.right,top:o-this.width/2,bottom:o+this.width/2}}}if(!t){var a=this.editorView.coordsAtPos(this.cursorPos);t={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}var s,u,c=this.editorView.dom.offsetParent;if(this.element||(this.element=c.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none; background-color: "+this.color),!c||c==document.body&&"static"==getComputedStyle(c).position)s=-pageXOffset,u=-pageYOffset;else{var l=c.getBoundingClientRect();s=l.left-c.scrollLeft,u=l.top-c.scrollTop}this.element.style.left=t.left-s+"px",this.element.style.top=t.top-u+"px",this.element.style.width=t.right-t.left+"px",this.element.style.height=t.bottom-t.top+"px"},a.prototype.scheduleRemoval=function(t){var e=this;clearTimeout(this.timeout),this.timeout=setTimeout((function(){return e.setCursor(null)}),t)},a.prototype.dragover=function(t){if(this.editorView.editable){var e=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),n=e&&e.inside>=0&&this.editorView.state.doc.nodeAt(e.inside),r=n&&n.type.spec.disableDropCursor,o="function"==typeof r?r(this.editorView,e):r;if(e&&!o){var a=e.pos;if(this.editorView.dragging&&this.editorView.dragging.slice&&null==(a=Object(i.i)(this.editorView.state.doc,a,this.editorView.dragging.slice)))return this.setCursor(null);this.setCursor(a),this.scheduleRemoval(5e3)}}},a.prototype.dragend=function(){this.scheduleRemoval(20)},a.prototype.drop=function(){this.scheduleRemoval(20)},a.prototype.dragleave=function(t){t.target!=this.editorView.dom&&this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(40),i=n(9),o=n(38),a=n(7),s=function(t){function e(e){t.call(this,e,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.map=function(n,r){var i=n.resolve(r.map(this.head));return e.valid(i)?new e(i):t.near(i)},e.prototype.content=function(){return a.j.empty},e.prototype.eq=function(t){return t instanceof e&&t.head==this.head},e.prototype.toJSON=function(){return{type:"gapcursor",pos:this.head}},e.fromJSON=function(t,n){if("number"!=typeof n.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new e(t.resolve(n.pos))},e.prototype.getBookmark=function(){return new u(this.anchor)},e.valid=function(t){var e=t.parent;if(e.isTextblock||!function(t){for(var e=t.depth;e>=0;e--){var n=t.index(e),r=t.node(e);if(0!=n)for(var i=r.child(n-1);;i=i.lastChild){if(0==i.childCount&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(t)||!function(t){for(var e=t.depth;e>=0;e--){var n=t.indexAfter(e),r=t.node(e);if(n!=r.childCount)for(var i=r.child(n);;i=i.firstChild){if(0==i.childCount&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(t))return!1;var n=e.type.spec.allowGapCursor;if(null!=n)return n;var r=e.contentMatchAt(t.index()).defaultType;return r&&r.isTextblock},e.findFrom=function(t,n,r){t:for(;;){if(!r&&e.valid(t))return t;for(var o=t.pos,a=null,s=t.depth;;s--){var u=t.node(s);if(n>0?t.indexAfter(s)0){a=u.child(n>0?t.indexAfter(s):t.index(s)-1);break}if(0==s)return null;o+=n;var c=t.doc.resolve(o);if(e.valid(c))return c}for(;;){var l=n>0?a.firstChild:a.lastChild;if(!l){if(a.isAtom&&!a.isText&&!i.c.isSelectable(a)){t=t.doc.resolve(o+a.nodeSize*n),r=!1;continue t}break}a=l,o+=n;var h=t.doc.resolve(o);if(e.valid(h))return h}return null}},e}(i.f);s.prototype.visible=!1,i.f.jsonID("gapcursor",s);var u=function(t){this.pos=t};u.prototype.map=function(t){return new u(t.map(this.pos))},u.prototype.resolve=function(t){var e=t.resolve(this.pos);return s.valid(e)?new s(e):i.f.near(e)};var c=function(){return new i.d({props:{decorations:d,createSelectionBetween:function(t,e,n){if(e.pos==n.pos&&s.valid(n))return new s(n)},handleClick:f,handleKeyDown:l}})},l=Object(r.a)({ArrowLeft:h("horiz",-1),ArrowRight:h("horiz",1),ArrowUp:h("vert",-1),ArrowDown:h("vert",1)});function h(t,e){var n="vert"==t?e>0?"down":"up":e>0?"right":"left";return function(t,r,o){var a=t.selection,u=e>0?a.$to:a.$from,c=a.empty;if(a instanceof i.h){if(!o.endOfTextblock(n)||0==u.depth)return!1;c=!1,u=t.doc.resolve(e>0?u.after():u.before())}var l=s.findFrom(u,e,c);return!!l&&(r&&r(t.tr.setSelection(new s(l))),!0)}}function f(t,e,n){if(!t.editable)return!1;var r=t.state.doc.resolve(e);if(!s.valid(r))return!1;var o=t.posAtCoords({left:n.clientX,top:n.clientY}).inside;return!(o>-1&&i.c.isSelectable(t.state.doc.nodeAt(o)))&&(t.dispatch(t.state.tr.setSelection(new s(r))),!0)}function d(t){if(!(t.selection instanceof s))return null;var e=document.createElement("div");return e.className="ProseMirror-gapcursor",o.b.create(t.doc,[o.a.widget(t.selection.head,e,{key:"gapcursor"})])}},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return a}));var r=n(56);var i="skip",o=!1,a=function(t,e,n,a){"function"===typeof e&&"function"!==typeof n&&(a=n,n=e,e=null);var s=Object(r.a)(e),u=a?-1:1;!function t(r,c,l){var h,f="object"===typeof r&&null!==r?r:{};"string"===typeof f.type&&(h="string"===typeof f.tagName?f.tagName:"string"===typeof f.name?f.name:void 0,Object.defineProperty(d,"name",{value:"node ("+f.type+(h?"<"+h+">":"")+")"}));return d;function d(){var h,f,d,p=[];if((!e||s(r,c,l[l.length-1]||null))&&(p=function(t){if(Array.isArray(t))return t;if("number"===typeof t)return[true,t];return[t]}(n(r,l)),p[0]===o))return p;if(r.children&&p[0]!==i)for(f=(a?r.children.length:-1)+u,d=l.concat(r);f>-1&&f0?v(T,--E):0,_--,10===C&&(_=1,x--),C}function j(){return C=E2||L(C)>3?"":" "}function $(t,e){for(;--e&&j()&&!(C<48||C>102||C>57&&C<65||C>70&&C<97););return R(t,P()+(e<6&&32==N()&&32==j()))}function z(t){for(;j();)switch(C){case t:return E;case 34:case 39:34!==t&&39!==t&&z(C);break;case 40:41===t&&z(t);break;case 92:j()}return E}function q(t,e){for(;j()&&t+C!==57&&(t+C!==84||47!==N()););return"/*"+R(e,E-1)+"*"+f(47===t?t:j())}function W(t){for(;!L(N());)j();return R(t,E)}function V(t){return B(Y("",null,null,null,[""],t=F(t),0,[0],t))}function Y(t,e,n,r,i,o,a,s,u){for(var c=0,l=0,h=a,d=0,p=0,v=0,y=1,O=1,k=1,x=0,_="",S=i,E=o,C=r,T=_;O;)switch(v=x,x=j()){case 40:if(108!=v&&58==T.charCodeAt(h-1)){-1!=m(T+=g(I(x),"&","&\f"),"&\f")&&(k=-1);break}case 34:case 39:case 91:T+=I(x);break;case 9:case 10:case 13:case 32:T+=Q(v);break;case 92:T+=$(P()-1,7);continue;case 47:switch(N()){case 42:case 47:w(H(q(j(),P()),e,n),u);break;default:T+="/"}break;case 123*y:s[c++]=b(T)*k;case 125*y:case 59:case 0:switch(x){case 0:case 125:O=0;case 59+l:p>0&&b(T)-h&&w(p>32?X(T+";",r,n,h-1):X(g(T," ","")+";",r,n,h-2),u);break;case 59:T+=";";default:if(w(C=U(T,e,n,c,l,i,s,_,S=[],E=[],h),o),123===x)if(0===l)Y(T,e,C,C,S,o,h,s,E);else switch(d){case 100:case 109:case 115:Y(t,C,C,r&&w(U(t,C,C,0,0,i,s,_,i,S=[],h),E),i,E,h,s,r?S:E);break;default:Y(T,C,C,C,[""],E,0,s,E)}}c=l=p=0,y=k=1,_=T="",h=a;break;case 58:h=1+b(T),p=v;default:if(y<1)if(123==x)--y;else if(125==x&&0==y++&&125==M())continue;switch(T+=f(x),x*y){case 38:k=l>0?1:(T+="\f",-1);break;case 44:s[c++]=(b(T)-1)*k,k=1;break;case 64:45===N()&&(T+=I(j())),d=N(),l=h=b(_=T+=W(P())),x++;break;case 45:45===v&&2==b(T)&&(y=0)}}return o}function U(t,e,n,r,i,o,a,s,c,l,f){for(var d=i-1,m=0===i?o:[""],v=O(m),b=0,w=0,k=0;b0?m[x]+" "+_:g(_,/&\f/g,m[x])))&&(c[k++]=S);return A(t,e,n,0===i?u:s,c,l,f)}function H(t,e,n){return A(t,e,n,s,f(C),y(t,2,-2),0)}function X(t,e,n,r){return A(t,e,n,c,y(t,0,r),y(t,r+1,-1),r)}function G(t,e){switch(function(t,e){return(((e<<2^v(t,0))<<2^v(t,1))<<2^v(t,2))<<2^v(t,3)}(t,e)){case 5103:return a+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return a+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return a+t+o+t+i+t+t;case 6828:case 4268:return a+t+i+t+t;case 6165:return a+t+i+"flex-"+t+t;case 5187:return a+t+g(t,/(\w+).+(:[^]+)/,a+"box-$1$2"+i+"flex-$1$2")+t;case 5443:return a+t+i+"flex-item-"+g(t,/flex-|-self/,"")+t;case 4675:return a+t+i+"flex-line-pack"+g(t,/align-content|flex-|-self/,"")+t;case 5548:return a+t+i+g(t,"shrink","negative")+t;case 5292:return a+t+i+g(t,"basis","preferred-size")+t;case 6060:return a+"box-"+g(t,"-grow","")+a+t+i+g(t,"grow","positive")+t;case 4554:return a+g(t,/([^-])(transform)/g,"$1"+a+"$2")+t;case 6187:return g(g(g(t,/(zoom-|grab)/,a+"$1"),/(image-set)/,a+"$1"),t,"")+t;case 5495:case 3959:return g(t,/(image-set\([^]*)/,a+"$1$`$1");case 4968:return g(g(t,/(.+:)(flex-)?(.*)/,a+"box-pack:$3"+i+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+a+t+t;case 4095:case 3583:case 4068:case 2532:return g(t,/(.+)-inline(.+)/,a+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(b(t)-1-e>6)switch(v(t,e+1)){case 109:if(45!==v(t,e+4))break;case 102:return g(t,/(.+:)(.+)-([^]+)/,"$1"+a+"$2-$3$1"+o+(108==v(t,e+3)?"$3":"$2-$3"))+t;case 115:return~m(t,"stretch")?G(g(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(115!==v(t,e+1))break;case 6444:switch(v(t,b(t)-3-(~m(t,"!important")&&10))){case 107:return g(t,":",":"+a)+t;case 101:return g(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+a+(45===v(t,14)?"inline-":"")+"box$3$1"+a+"$2$3$1"+i+"$2box$3")+t}break;case 5936:switch(v(t,e+11)){case 114:return a+t+i+g(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return a+t+i+g(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return a+t+i+g(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return a+t+i+t+t}return t}function Z(t,e){for(var n="",r=O(t),i=0;i-1&&!t.return)switch(t.type){case c:t.return=G(t.value,t.length);break;case l:return Z([D(t,{value:g(t.value,"@","@"+a)})],r);case u:if(t.length)return k(t.props,(function(e){switch(function(t,e){return(t=e.exec(t))?t[0]:t}(e,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Z([D(t,{props:[g(e,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Z([D(t,{props:[g(e,/:(plac\w+)/,":"+a+"input-$1")]}),D(t,{props:[g(e,/:(plac\w+)/,":-moz-$1")]}),D(t,{props:[g(e,/:(plac\w+)/,i+"input-$1")]})],r)}return""}))}}];e.a=function(t){var e=t.key;if("css"===e){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(t){-1!==t.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(t),t.setAttribute("data-s",""))}))}var i=t.stylisPlugins||ot;var o,a,s={},u=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+e+' "]'),(function(t){for(var e=t.getAttribute("data-emotion").split(" "),n=1;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n2),l="-10000px",h=function(){function t(e,n,r){Object(o.a)(this,t),this.facet=n,this.createTooltipView=r,this.input=e.state.facet(n),this.tooltips=this.input.filter((function(t){return t})),this.tooltipViews=this.tooltips.map(r)}return Object(a.a)(t,[{key:"update",value:function(t){var e=t.state.facet(this.facet),n=e.filter((function(t){return t}));if(e===this.input){var r,o=Object(i.a)(this.tooltipViews);try{for(o.s();!(r=o.n()).done;){var a=r.value;a.update&&a.update(t)}}catch(v){o.e(v)}finally{o.f()}return!1}for(var s=[],u=0;un.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&(n.intersectionTimeout=setTimeout((function(){n.intersectionTimeout=-1,n.maybeMeasure()}),50))}),{threshold:[1]}):null,this.observeIntersection(),this.maybeMeasure()}return Object(a.a)(t,[{key:"createContainer",value:function(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}},{key:"observeIntersection",value:function(){if(this.intersectionObserver){this.intersectionObserver.disconnect();var t,e=Object(i.a)(this.manager.tooltipViews);try{for(e.s();!(t=e.n()).done;){var n=t.value;this.intersectionObserver.observe(n.dom)}}catch(r){e.e(r)}finally{e.f()}}}},{key:"update",value:function(t){t.transactions.length&&(this.lastTransaction=Date.now());var e=this.manager.update(t);e&&this.observeIntersection();var n=e||t.geometryChanged,r=t.state.facet(d);if(r.position!=this.position){this.position=r.position;var o,a=Object(i.a)(this.manager.tooltipViews);try{for(a.s();!(o=a.n()).done;){o.value.dom.style.position=this.position}}catch(l){a.e(l)}finally{a.f()}n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();var s,u=Object(i.a)(this.manager.tooltipViews);try{for(u.s();!(s=u.n()).done;){var c=s.value;this.container.appendChild(c.dom)}}catch(l){u.e(l)}finally{u.f()}n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}},{key:"createTooltip",value:function(t){var e=t.create(this.view);if(e.dom.classList.add("cm-tooltip"),t.arrow&&!e.dom.querySelector("cm-tooltip > cm-tooltip-arrow")){var n=document.createElement("div");n.className="cm-tooltip-arrow",e.dom.appendChild(n)}return e.dom.style.position=this.position,e.dom.style.top=l,this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}},{key:"destroy",value:function(){var t,e,n=Object(i.a)(this.manager.tooltipViews);try{for(n.s();!(e=n.n()).done;){e.value.dom.remove()}}catch(r){n.e(r)}finally{n.f()}null===(t=this.intersectionObserver)||void 0===t||t.disconnect(),clearTimeout(this.intersectionTimeout)}},{key:"readMeasure",value:function(){var t=this,e=this.view.dom.getBoundingClientRect();return{editor:e,parent:this.parent?this.container.getBoundingClientRect():e,pos:this.manager.tooltips.map((function(e){return t.view.coordsAtPos(e.pos)})),size:this.manager.tooltipViews.map((function(t){return t.dom.getBoundingClientRect()})),space:this.view.state.facet(d).tooltipSpace(this.view)}}},{key:"writeMeasure",value:function(t){for(var e=t.editor,n=t.space,r=[],o=0;o=Math.min(e.bottom,n.bottom)||h.right<=Math.max(e.left,n.left)||h.left>=Math.min(e.right,n.right))c.style.top=l;else{var d=a.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,p=d?7:0,g=f.right-f.left,v=f.bottom-f.top,y=u.offset||m,b=this.view.textDirection==s.c.LTR,O=f.width>n.right-n.left?b?n.left:n.right-f.width:b?Math.min(h.left-(d?14:0)+y.x,n.right-g):Math.max(n.left,h.left-g+(d?14:0)-y.x),w=!!a.above;!a.strictSide&&(w?h.top-(f.bottom-f.top)-y.yn.bottom)&&w==n.bottom-h.bottom>h.top-n.top&&(w=!w);var k,x=w?h.top-v-p-y.y:h.bottom+p+y.y,_=O+g,S=Object(i.a)(r);try{for(S.s();!(k=S.n()).done;){var E=k.value;E.left<_&&E.right>O&&E.topx&&(x=w?E.top-v-2-p:E.bottom+p+2)}}catch(C){S.e(C)}finally{S.f()}"absolute"==this.position?(c.style.top=x-t.parent.top+"px",c.style.left=O-t.parent.left+"px"):(c.style.top=x+"px",c.style.left=O+"px"),d&&(d.style.left="".concat(h.left+(b?y.x:-y.x)-(O+14-7),"px")),r.push({left:O,top:x,right:_,bottom:x+v}),c.classList.toggle("cm-tooltip-above",w),c.classList.toggle("cm-tooltip-below",!w),u.positioned&&u.positioned()}}}},{key:"maybeMeasure",value:function(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView))){var t,e=Object(i.a)(this.manager.tooltipViews);try{for(e.s();!(t=e.n()).done;){t.value.dom.style.top=l}}catch(n){e.e(n)}finally{e.f()}}}}]),t}(),{eventHandlers:{scroll:function(){this.maybeMeasure()}}}),g=s.d.baseTheme({".cm-tooltip":{zIndex:100},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"".concat(7,"px"),width:"".concat(14,"px"),position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"".concat(7,"px solid transparent"),borderRight:"".concat(7,"px solid transparent")},".cm-tooltip-above &":{bottom:"-".concat(7,"px"),"&:before":{borderTop:"".concat(7,"px solid #bbb")},"&:after":{borderTop:"".concat(7,"px solid #f5f5f5"),bottom:"1px"}},".cm-tooltip-below &":{top:"-".concat(7,"px"),"&:before":{borderBottom:"".concat(7,"px solid #bbb")},"&:after":{borderBottom:"".concat(7,"px solid #f5f5f5"),top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),m={x:0,y:0},v=u.g.define({enables:[p,g]}),y=u.g.define(),b=function(){function t(e){var n=this;Object(o.a)(this,t),this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new h(e,y,(function(t){return n.createHostedView(t)}))}return Object(a.a)(t,[{key:"createHostedView",value:function(t){var e=t.create(this.view);return e.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(e.dom),this.mounted&&e.mount&&e.mount(this.view),e}},{key:"mount",value:function(t){var e,n=Object(i.a)(this.manager.tooltipViews);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.mount&&r.mount(t)}}catch(o){n.e(o)}finally{n.f()}this.mounted=!0}},{key:"positioned",value:function(){var t,e=Object(i.a)(this.manager.tooltipViews);try{for(e.s();!(t=e.n()).done;){var n=t.value;n.positioned&&n.positioned()}}catch(r){e.e(r)}finally{e.f()}}},{key:"update",value:function(t){this.manager.update(t)}}],[{key:"create",value:function(e){return new t(e)}}]),t}(),O=v.compute([y],(function(t){var e=t.facet(y).filter((function(t){return t}));return 0===e.length?null:{pos:Math.min.apply(Math,Object(r.a)(e.map((function(t){return t.pos})))),end:Math.max.apply(Math,Object(r.a)(e.filter((function(t){return null!=t.end})).map((function(t){return t.end})))),create:b.create,above:e[0].above,arrow:e.some((function(t){return t.arrow}))}})),w=function(){function t(e,n,r,i,a){Object(o.a)(this,t),this.view=e,this.source=n,this.field=r,this.setHover=i,this.hoverTime=a,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}return Object(a.a)(t,[{key:"update",value:function(){var t=this;this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout((function(){return t.startHover()}),20))}},{key:"active",get:function(){return this.view.state.field(this.field)}},{key:"checkHover",value:function(){if(this.hoverTimeout=-1,!this.active){var t=Date.now()-this.lastMove.time;ti.bottom||n.xi.right+this.view.defaultCharacterWidth)){var o=this.view.bidiSpans(this.view.state.doc.lineAt(r)).find((function(t){return t.from<=r&&t.to>=r})),a=o&&o.dir==s.c.RTL?-1:1,u=this.source(this.view,r,n.x1&&void 0!==arguments[1]?arguments[1]:{},n=u.j.define(),r=u.k.define({create:function(){return null},update:function(t,r){if(t&&e.hideOnChange&&(r.docChanged||r.selection))return null;var o,a=Object(i.a)(r.effects);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(s.is(n))return s.value;if(s.is(x))return null}}catch(h){a.e(h)}finally{a.f()}if(t&&r.docChanged){var c=r.changes.mapPos(t.pos,-1,u.h.TrackDel);if(null==c)return null;var l=Object.assign(Object.create(null),t);return l.pos=c,null!=t.end&&(l.end=r.changes.mapPos(t.end)),l}return t},provide:function(t){return y.from(t)}}),o=e.hoverTime||600;return[r,s.f.define((function(e){return new w(e,t,r,n,o)})),O]}var x=u.j.define()},function(t,e,n){"use strict";n.d(e,"a",(function(){return Ne})),n.d(e,"b",(function(){return $e})),n.d(e,"c",(function(){return qe}));for(var r=n(11),i=n(19),o=n(10),a=n(22),s=n(0),u=n(23),c=n(12),l=n(67),h=n(6),f={tokenize:function(t,e,n){return function(e){return t.consume(e),r};function r(e){return 87===e||119===e?(t.consume(e),i):n(e)}function i(e){return 87===e||119===e?(t.consume(e),o):n(e)}function o(e){return 46===e?(t.consume(e),a):n(e)}function a(t){return null===t||Object(h.h)(t)?n(t):e(t)}},partial:!0},d={tokenize:function(t,e,n){var r,i;return o;function o(e){return 38===e?t.check(m,s,a)(e):46===e||95===e?t.check(g,s,a)(e):null===e||Object(h.d)(e)||Object(h.l)(e)||45!==e&&Object(h.k)(e)?s(e):(t.consume(e),o)}function a(e){return 46===e?(i=r,r=void 0,t.consume(e),o):(95===e&&(r=!0),t.consume(e),o)}function s(t){return i||r?n(t):e(t)}},partial:!0},p={tokenize:function(t,e){var n=0;return r;function r(a){return 38===a?t.check(m,e,i)(a):(40===a&&n++,41===a?t.check(g,o,i)(a):_(a)?e(a):x(a)?t.check(g,e,i)(a):(t.consume(a),r))}function i(e){return t.consume(e),r}function o(t){return--n<0?e(t):i(t)}},partial:!0},g={tokenize:function(t,e,n){return function(e){return t.consume(e),r};function r(i){return x(i)?(t.consume(i),r):_(i)?e(i):n(i)}},partial:!0},m={tokenize:function(t,e,n){return function(e){return t.consume(e),r};function r(e){return Object(h.a)(e)?(t.consume(e),r):59===e?(t.consume(e),i):n(e)}function i(t){return _(t)?e(t):n(t)}},partial:!0},v={tokenize:function(t,e,n){var r=this;return function(e){if(87!==e&&119!==e||!E(r.previous)||A(r.events))return n(e);return t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(f,t.attempt(d,t.attempt(p,i),n),n)(e)};function i(n){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(n)}},previous:E},y={tokenize:function(t,e,n){var r=this;return function(e){if(72!==e&&104!==e||!C(r.previous)||A(r.events))return n(e);return t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),t.consume(e),i};function i(e){return 84===e||116===e?(t.consume(e),o):n(e)}function o(e){return 84===e||116===e?(t.consume(e),a):n(e)}function a(e){return 80===e||112===e?(t.consume(e),s):n(e)}function s(e){return 83===e||115===e?(t.consume(e),u):u(e)}function u(e){return 58===e?(t.consume(e),c):n(e)}function c(e){return 47===e?(t.consume(e),l):n(e)}function l(e){return 47===e?(t.consume(e),f):n(e)}function f(e){return null===e||Object(h.d)(e)||Object(h.l)(e)||Object(h.k)(e)?n(e):t.attempt(d,t.attempt(p,g),n)(e)}function g(n){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(n)}},previous:C},b={tokenize:function(t,e,n){var r,i,o=this;return function(e){if(!S(e)||!T(o.previous)||A(o.events))return n(e);return t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),a(e)};function a(e){return S(e)?(t.consume(e),a):64===e?(t.consume(e),s):n(e)}function s(e){return 46===e?t.check(g,f,u)(e):45===e||95===e?t.check(g,n,c)(e):Object(h.b)(e)?(!i&&Object(h.e)(e)&&(i=!0),t.consume(e),s):f(e)}function u(e){return t.consume(e),r=!0,i=void 0,s}function c(e){return t.consume(e),l}function l(e){return 46===e?t.check(g,n,u)(e):s(e)}function f(o){return r&&!i?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(o)):n(o)}},previous:T},O={},w={text:O},k=48;k<123;)O[k]=b,58===++k?k=65:91===k&&(k=97);function x(t){return 33===t||34===t||39===t||41===t||42===t||44===t||46===t||58===t||59===t||60===t||63===t||95===t||126===t}function _(t){return null===t||60===t||Object(h.i)(t)}function S(t){return 43===t||45===t||46===t||95===t||Object(h.b)(t)}function E(t){return null===t||40===t||42===t||95===t||126===t||Object(h.i)(t)}function C(t){return null===t||!Object(h.a)(t)}function T(t){return 47!==t&&C(t)}function A(t){for(var e=t.length,n=!1;e--;){var r=t[e][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return t.length>0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}O[43]=b,O[45]=b,O[46]=b,O[95]=b,O[72]=[b,y],O[104]=[b,y],O[87]=[b,v],O[119]=[b,v];var D=n(68),M=n(21),j=n(34),N={tokenize:function(t,e,n){var r=this;return Object(M.a)(t,(function(t){var i=r.events[r.events.length-1];return i&&"gfmFootnoteDefinitionIndent"===i[1].type&&4===i[2].sliceSerialize(i[1],!0).length?e(t):n(t)}),"gfmFootnoteDefinitionIndent",5)},partial:!0};function P(){var t;return{document:Object(o.a)({},91,{tokenize:B,continuation:{tokenize:I},exit:Q}),text:(t={},Object(o.a)(t,91,{tokenize:F}),Object(o.a)(t,93,{add:"after",tokenize:R,resolveTo:L}),t)}}function R(t,e,n){for(var r,i=this,o=i.events.length,a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);o--;){var s=i.events[o][1];if("labelImage"===s.type){r=s;break}if("gfmFootnoteCall"===s.type||"labelLink"===s.type||"label"===s.type||"image"===s.type||"link"===s.type)break}return function(o){if(!r||!r._balanced)return n(o);var s=Object(j.a)(i.sliceSerialize({start:r.end,end:i.now()}));if(94!==s.charCodeAt(0)||!a.includes(s.slice(1)))return n(o);return t.enter("gfmFootnoteCallLabelMarker"),t.consume(o),t.exit("gfmFootnoteCallLabelMarker"),e(o)}}function L(t,e){for(var n=t.length;n--;)if("labelImage"===t[n][1].type&&"enter"===t[n][0]){t[n][1];break}t[n+1][1].type="data",t[n+3][1].type="gfmFootnoteCallLabelMarker";var r={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;var o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},t[t.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[t[n+1],t[n+2],["enter",r,e],t[n+3],t[n+4],["enter",i,e],["exit",i,e],["enter",o,e],["enter",a,e],["exit",a,e],["exit",o,e],t[t.length-2],t[t.length-1],["exit",r,e]];return t.splice.apply(t,[n,t.length-n+1].concat(s)),t}function F(t,e,n){var r,i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]),a=0;return function(e){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(e),t.exit("gfmFootnoteCallLabelMarker"),s};function s(e){return 94!==e?n(e):(t.enter("gfmFootnoteCallMarker"),t.consume(e),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",u)}function u(s){var l;return null===s||91===s||a++>999?n(s):93===s?r?(t.exit("chunkString"),l=t.exit("gfmFootnoteCallString"),o.includes(Object(j.a)(i.sliceSerialize(l)))?function(n){return t.enter("gfmFootnoteCallLabelMarker"),t.consume(n),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e}(s):n(s)):n(s):(t.consume(s),Object(h.i)(s)||(r=!0),92===s?c:u)}function c(e){return 91===e||92===e||93===e?(t.consume(e),a++,u):u(e)}}function B(t,e,n){var r,i,o=this,a=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]),s=0;return function(e){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(e),t.exit("gfmFootnoteDefinitionLabelMarker"),u};function u(e){return 94===e?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(e),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),c):n(e)}function c(e){var a;return null===e||91===e||s>999?n(e):93===e?i?(a=t.exit("gfmFootnoteDefinitionLabelString"),r=Object(j.a)(o.sliceSerialize(a)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(e),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),d):n(e):Object(h.h)(e)?(t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),s++,c):(t.enter("chunkString").contentType="string",l(e))}function l(e){return null===e||Object(h.h)(e)||91===e||93===e||s>999?(t.exit("chunkString"),c(e)):(Object(h.i)(e)||(i=!0),s++,t.consume(e),92===e?f:l)}function f(e){return 91===e||92===e||93===e?(t.consume(e),s++,l):l(e)}function d(e){return 58===e?(t.enter("definitionMarker"),t.consume(e),t.exit("definitionMarker"),Object(M.a)(t,p,"gfmFootnoteDefinitionWhitespace")):n(e)}function p(t){return a.includes(r)||a.push(r),e(t)}}function I(t,e,n){return t.check(D.a,e,t.attempt(N,e,n))}function Q(t){t.exit("gfmFootnoteDefinition")}var $=n(29),z=n(60),q=n(49);function W(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.singleTilde,n={tokenize:i,resolveAll:r};return null!==e&&void 0!==e||(e=!0),{text:Object(o.a)({},126,n),insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(t,e){for(var n=-1;++n1?r(o):(t.consume(o),a++,s);if(a<2&&!e)return r(o);var c=t.exit("strikethroughSequenceTemporary"),l=Object(z.a)(o);return c._open=!l||2===l&&Boolean(u),c._close=!u||2===u&&Boolean(l),n(o)}}}var V={flow:{null:{tokenize:function(t,e,n){var r,i,o=this,a=[],s=0;return function(e){if(t.enter("table")._align=a,t.enter("tableHead"),t.enter("tableRow"),124===e)return u(e);return s++,t.enter("temporaryTableCellContent"),f(e)};function u(e){return t.enter("tableCellDivider"),t.consume(e),t.exit("tableCellDivider"),r=!0,c}function c(e){return null===e||Object(h.h)(e)?function(e){if(null===e)return n(e);t.exit("tableRow"),t.exit("tableHead");var r=o.interrupt;return o.interrupt=!0,t.attempt({tokenize:A,partial:!0},(function(e){return o.interrupt=r,t.enter("tableDelimiterRow"),p(e)}),(function(t){return o.interrupt=r,n(t)}))(e)}(e):Object(h.j)(e)?(t.enter("whitespace"),t.consume(e),l):(r&&(r=void 0,s++),124===e?u(e):(t.enter("temporaryTableCellContent"),f(e)))}function l(e){return Object(h.j)(e)?(t.consume(e),l):(t.exit("whitespace"),c(e))}function f(e){return null===e||124===e||Object(h.i)(e)?(t.exit("temporaryTableCellContent"),c(e)):(t.consume(e),92===e?d:f)}function d(e){return 92===e||124===e?(t.consume(e),f):f(e)}function p(e){return null===e||Object(h.h)(e)?b(e):Object(h.j)(e)?(t.enter("whitespace"),t.consume(e),g):45===e?(t.enter("tableDelimiterFiller"),t.consume(e),i=!0,a.push("none"),m):58===e?(t.enter("tableDelimiterAlignment"),t.consume(e),t.exit("tableDelimiterAlignment"),a.push("left"),v):124===e?(t.enter("tableCellDivider"),t.consume(e),t.exit("tableCellDivider"),p):n(e)}function g(e){return Object(h.j)(e)?(t.consume(e),g):(t.exit("whitespace"),p(e))}function m(e){return 45===e?(t.consume(e),m):(t.exit("tableDelimiterFiller"),58===e?(t.enter("tableDelimiterAlignment"),t.consume(e),t.exit("tableDelimiterAlignment"),a[a.length-1]="left"===a[a.length-1]?"center":"right",y):p(e))}function v(e){return 45===e?(t.enter("tableDelimiterFiller"),t.consume(e),i=!0,m):n(e)}function y(e){return null===e||Object(h.h)(e)?b(e):Object(h.j)(e)?(t.enter("whitespace"),t.consume(e),g):124===e?(t.enter("tableCellDivider"),t.consume(e),t.exit("tableCellDivider"),p):n(e)}function b(e){return t.exit("tableDelimiterRow"),i&&s===a.length?null===e?O(e):t.check(Y,O,t.attempt({tokenize:A,partial:!0},Object(M.a)(t,w,"linePrefix",4),O))(e):n(e)}function O(n){return t.exit("table"),e(n)}function w(e){return t.enter("tableBody"),k(e)}function k(e){return t.enter("tableRow"),124===e?x(e):(t.enter("temporaryTableCellContent"),E(e))}function x(e){return t.enter("tableCellDivider"),t.consume(e),t.exit("tableCellDivider"),_}function _(e){return null===e||Object(h.h)(e)?function(e){if(t.exit("tableRow"),null===e)return T(e);return t.check(Y,T,t.attempt({tokenize:A,partial:!0},Object(M.a)(t,k,"linePrefix",4),T))(e)}(e):Object(h.j)(e)?(t.enter("whitespace"),t.consume(e),S):124===e?x(e):(t.enter("temporaryTableCellContent"),E(e))}function S(e){return Object(h.j)(e)?(t.consume(e),S):(t.exit("whitespace"),_(e))}function E(e){return null===e||124===e||Object(h.i)(e)?(t.exit("temporaryTableCellContent"),_(e)):(t.consume(e),92===e?C:E)}function C(e){return 92===e||124===e?(t.consume(e),E):E(e)}function T(e){return t.exit("tableBody"),O(e)}function A(t,e,n){return function(e){return t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),Object(M.a)(t,r,"linePrefix")};function r(r){if(o.parser.lazy[o.now().line]||null===r||Object(h.h)(r))return n(r);var i=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?n(r):(o._gfmTableDynamicInterruptHack=!0,t.check(o.parser.constructs.flow,(function(t){return o._gfmTableDynamicInterruptHack=!1,n(t)}),(function(t){return o._gfmTableDynamicInterruptHack=!1,e(t)}))(r))}}},resolve:function(t,e){var n,r,i,o,a,s,u,c=-1;for(;++c])/gi;new RegExp("^"+U.source,"i");var H={tokenize:function(t,e,n){var r=this;return function(e){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(e);return t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(e),t.exit("taskListCheckMarker"),i};function i(e){return Object(h.i)(e)?(t.enter("taskListCheckValueUnchecked"),t.consume(e),t.exit("taskListCheckValueUnchecked"),o):88===e||120===e?(t.enter("taskListCheckValueChecked"),t.consume(e),t.exit("taskListCheckValueChecked"),o):n(e)}function o(r){return 93===r?(t.enter("taskListCheckMarker"),t.consume(r),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),t.check({tokenize:G},e,n)):n(r)}}},X={text:Object(o.a)({},91,H)};function G(t,e,n){var r=this;return Object(M.a)(t,(function(t){var i=r.events[r.events.length-1];return(i&&"whitespace"===i[1].type||Object(h.h)(t))&&null!==t?e(t):n(t)}),"whitespace")}function Z(t){return Object(l.a)([w,P(),W(t),V,X])}function K(t,e){var n=String(t);if("string"!==typeof e)throw new TypeError("Expected character");for(var r=0,i=n.indexOf(e);-1!==i;)r++,i=n.indexOf(e,i+e.length);return r}var J=n(53),tt=n(56),et={}.hasOwnProperty,nt=function(t,e,n,i){var o,a;"string"===typeof e||e instanceof RegExp?(a=[[e,n]],o=i):(a=e,o=n),o||(o={});for(var s=Object(tt.a)(o.ignore||[]),u=function(t){var e=[];if("object"!==typeof t)throw new TypeError("Expected array or object as schema");if(Array.isArray(t))for(var n=-1;++n0?{type:"text",value:f}:void 0),!1!==f){var d;if(a!==n&&l.push({type:"text",value:t.value.slice(a,n)}),Array.isArray(f))(d=l).push.apply(d,Object(r.a)(f));else f&&l.push(f);a=n+h[0].length}if(!i.global)break;h=i.exec(t.value)}if(void 0===n)l=[t],s--;else{var p;a?\]}]+$/.exec(t);if(o)for(t=t.slice(0,o.index),e=(i=o[0]).indexOf(")"),n=K(t,"("),r=K(t,")");-1!==e&&n>r;)t+=i.slice(0,e+1),e=(i=i.slice(e+1)).indexOf(")"),r++;return[t,i]}(n+r);if(!a[0])return!1;var s={type:"link",title:null,url:o+e+a[0],children:[{type:"text",value:e+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function ht(t,e,n,r){return!(!ft(r,!0)||/[_-\d]$/.test(n))&&{type:"link",title:null,url:"mailto:"+e+"@"+n,children:[{type:"text",value:e+"@"+n}]}}function ft(t,e){var n=t.input.charCodeAt(t.index-1);return(0===t.index||Object(h.l)(n)||Object(h.k)(n))&&(!e||47!==n)}var dt=n(45),pt=n(41),gt=n(51),mt=n(30),vt=n(50),yt=n(64),bt=!1,Ot=!1;function wt(){return t.peek=function(){return"["},{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:function(t,e,n){var r=n.enter("footnoteDefinition"),i=n.enter("label"),o=Object(mt.a)(n,Object(dt.a)(t),{before:"^",after:"]"}),a="[^"+o+"]:";i();var s=Object(gt.a)(Object(pt.a)(t,n),(function(t,e,n){if(e)return(n?"":" ")+t;return(n?a:a+" ")+t}));r(),!bt&&o.includes(":")&&(console.warn("[mdast-util-gfm-footnote] Warning: Found a colon in footnote identifier `"+o+"`. GitHub currently crahes on colons in footnotes (see for more info)"),bt=!0);Ot||Object(vt.a)(t,"list",(function(){return console.warn("[mdast-util-gfm-footnote] Warning: Found a list in a footnote definition. GitHub currently crahes on lists in footnotes (see for more info)"),Ot=!0,yt.a}));return s},footnoteReference:t}};function t(t,e,n){var r=n.enter("footnoteReference"),i=n.enter("reference"),o=Object(mt.a)(n,Object(dt.a)(t),{before:"^",after:"]"});return i(),r(),"[^"+o+"]"}}var kt=n(36),xt={canContainEols:["delete"],enter:{strikethrough:function(t){this.enter({type:"delete",children:[]},t)}},exit:{strikethrough:function(t){this.exit(t)}}},_t={unsafe:[{character:"~",inConstruct:"phrasing"}],handlers:{delete:St}};function St(t,e,n){var r=n.enter("emphasis"),i=Object(kt.a)(t,n,{before:"~",after:"~"});return r(),"~~"+i+"~~"}St.peek=function(){return"~"};var Et=n(89);function Ct(t){return null===t||void 0===t?"":String(t)}function Tt(t){return t.length}function At(t){var e="string"===typeof t?t.codePointAt(0):0;return 67===e||99===e?99:76===e||108===e?108:82===e||114===e?114:0}var Dt={enter:{table:function(t){var e=t._align;this.enter({type:"table",align:e.map((function(t){return"none"===t?null:t})),children:[]},t),this.setData("inTable",!0)},tableData:jt,tableHeader:jt,tableRow:function(t){this.enter({type:"tableRow",children:[]},t)}},exit:{codeText:function(t){var e=this.resume();this.getData("inTable")&&(e=e.replace(/\\([\\|])/g,Nt));this.stack[this.stack.length-1].value=e,this.exit(t)},table:function(t){this.exit(t),this.setData("inTable")},tableData:Mt,tableHeader:Mt,tableRow:Mt}};function Mt(t){this.exit(t)}function jt(t){this.enter({type:"tableCell",children:[]},t)}function Nt(t,e){return"|"===e?e:t}function Pt(t){var e=t||{},n=e.tableCellPadding,r=e.tablePipeAlign,i=e.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:function(t,e,n){return s(function(t,e){var n=t.children,r=-1,i=[],o=e.enter("table");for(;++r1&&void 0!==arguments[1]?arguments[1]:{},n=(e.align||[]).concat(),r=e.stringLength||Tt,i=[],o=[],a=[],s=[],u=0,c=-1;++cu&&(u=t[c].length);++fs[f])&&(s[f]=p)}l.push(d)}o[c]=l,a[c]=h}var g=-1;if("object"===typeof n&&"length"in n)for(;++gs[g]&&(s[g]=k),y[g]=k),v[g]=x}o.splice(1,0,v),a.splice(1,0,y),c=-1;for(var _=[];++c0&&void 0!==arguments[0]?arguments[0]:{},e=this.data();function n(t,n){(e[t]?e[t]:e[t]=[]).push(n)}n("micromarkExtensions",Z(t)),n("fromMarkdownExtensions",It()),n("toMarkdownExtensions",Qt(t))}var zt,qt,Wt,Vt,Yt,Ut=n(54),Ht=n(75),Xt=n(9),Gt=n(26),Zt=n(38),Kt=n(73),Jt=n(74),te=n(5),ee=Object.defineProperty,ne=Object.defineProperties,re=Object.getOwnPropertyDescriptors,ie=Object.getOwnPropertySymbols,oe=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable,se=function(t,e,n){return e in t?ee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n},ue=function(t,e){for(var n in e||(e={}))oe.call(e,n)&&se(t,n,e[n]);if(ie){var r,i=Object(s.a)(ie(e));try{for(i.s();!(r=i.n()).done;){n=r.value;ae.call(e,n)&&se(t,n,e[n])}}catch(o){i.e(o)}finally{i.f()}}return t},ce=function(t,e){return ne(t,re(e))},le=/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)$/,he=Object(c.a)((function(){return Object(Ut.b)({rules:[new Ut.a(le,(function(t,e,n,r){var i=t.schema,o=Object(a.a)(e,1)[0];return o?t.tr.replaceWith(n,r,i.text(o)).addMark(n,o.length+n,i.marks.link.create({href:o})):null}))]})})),fe=function(t){return Object(Gt.f)((function(t){return"table"===t.type.spec.tableRole}))(t)},de=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,r=Object(Ht.n)(t),i=r.cell,o=r.header_cell,a=r.row,s=r.table,u=Array(n).fill(0).map((function(){return i.createAndFill(null)})),c=Array(n).fill(0).map((function(){return o.createAndFill(null)})),l=Array(e).fill(0).map((function(t,e){return a.create(null,0===e?c:u)}));return s.create(null,l)},pe=function(t){return function(e){return function(n){var r=fe(n.selection),i="row"===t;if(r){var o=Ht.b.get(r.node);if(e>=0&&e<(i?o.height:o.width)){var a=o.positionAt(i?e:o.height-1,i?o.width-1:e,r.node),s=n.doc.resolve(r.start+a),u=i?Ht.a.rowSelection:Ht.a.colSelection,c=o.positionAt(i?e:0,i?0:e,r.node),l=n.doc.resolve(r.start+c);return Object(Gt.c)(n.setSelection(u(s,l)))}}return n}}},ge=function(t){var e=function(t){var e=fe(t);if(e){var n=Ht.b.get(e.node);return n.cellsInRect({left:0,right:n.width,top:0,bottom:n.height}).map((function(t){var n=e.node.nodeAt(t),r=t+e.start;return{pos:r,start:r+1,node:n}}))}}(t.selection);if(e&&e[0]){var n=t.doc.resolve(e[0].pos),r=e[e.length-1];if(r){var i=t.doc.resolve(r.pos);return Object(Gt.c)(t.setSelection(new Ht.a(i,n)))}}return t};function me(t,e,n){var r=e.map,i=e.tableStart,o=e.table,a=Array(n).fill(0).reduce((function(t,e,n){return t+o.child(n).nodeSize}),i),s=Object(Ht.n)(o.type.schema),u=s.cell,c=s.row,l=Array(r.width).fill(0).map((function(t,e){var n=o.nodeAt(r.map[e]);return u.createAndFill({alignment:null==n?void 0:n.attrs.alignment})}));return t.insert(a,c.create(null,l)),t}var ve,ye,be=function(t){return t.state.selection};(ye=ve||(ve={}))[ye.AddColLeft=0]="AddColLeft",ye[ye.AddColRight=1]="AddColRight",ye[ye.AddRowTop=2]="AddRowTop",ye[ye.AddRowBottom=3]="AddRowBottom",ye[ye.AlignLeft=4]="AlignLeft",ye[ye.AlignCenter=5]="AlignCenter",ye[ye.AlignRight=6]="AlignRight",ye[ye.Delete=7]="Delete";var Oe,we,ke=function(t){var e;return e={},Object(o.a)(e,0,{$:t.get(te.x).slots.icon("leftArrow"),command:function(){return Ht.d},disable:function(t){return!be(t).isColSelection()}}),Object(o.a)(e,1,{$:t.get(te.x).slots.icon("rightArrow"),command:function(){return Ht.c},disable:function(t){return!be(t).isColSelection()}}),Object(o.a)(e,2,{$:t.get(te.x).slots.icon("upArrow"),command:function(){return function(t,e){if(!Object(Ht.j)(t))return!1;if(e){var n=Object(Ht.k)(t);e(me(t.tr,n,n.top))}return!0}},disable:function(t){return!be(t).isRowSelection()||"table_header"===be(t).$head.parent.type.name}}),Object(o.a)(e,3,{$:t.get(te.x).slots.icon("downArrow"),command:function(){return function(t,e){if(!Object(Ht.j)(t))return!1;if(e){var n=Object(Ht.k)(t);e(me(t.tr,n,n.bottom))}return!0}},disable:function(t){return!be(t).isRowSelection()}}),Object(o.a)(e,4,{$:t.get(te.x).slots.icon("alignLeft"),command:function(){return Object(Ht.l)("alignment","left")},disable:function(t){return!be(t).isColSelection()}}),Object(o.a)(e,5,{$:t.get(te.x).slots.icon("alignCenter"),command:function(){return Object(Ht.l)("alignment","center")},disable:function(t){return!be(t).isColSelection()}}),Object(o.a)(e,6,{$:t.get(te.x).slots.icon("alignRight"),command:function(){return Object(Ht.l)("alignment","right")},disable:function(t){return!be(t).isColSelection()}}),Object(o.a)(e,7,{$:t.get(te.x).slots.icon("delete"),command:function(t,e){var n=be(e),r=n.isColSelection(),i=n.isRowSelection();return r&&i?Ht.h:r?Ht.f:Ht.g},disable:function(t){var e=be(t);return!!e.isRowSelection()&&(!e.isColSelection()&&function(t){for(var e=Ht.b.get(t.$anchorCell.node(-1)),n=t.$anchorCell.start(-1),r=e.cellsInRect({left:0,right:e.width,top:0,bottom:1}),i=e.cellsInRect(e.rectBetween(t.$anchorCell.pos-n,t.$headCell.pos-n)),o=0,a=r.length;o3&&void 0!==arguments[3]?arguments[3]:0,i=Zt.a.widget(e.pos+1,(function(e){var i=document.createElement("div");return i.classList.add(_e(n)),n===Oe.Point&&i.appendChild(t.get(te.x).slots.icon("select")),i.addEventListener("mousedown",(function(t){if(e)switch(t.preventDefault(),n){case Oe.Point:return void e.dispatch(ge(e.state.tr));case Oe.Left:return void e.dispatch(pe("row")(r)(e.state.tr));case Oe.Top:return void e.dispatch(pe("col")(r)(e.state.tr))}})),i}));return i}var Ee=function(t,e){var n=ke(t),r=document.createElement("div"),i=e.getStyle(xe);return i&&r.classList.add(i),r.classList.add("table-tooltip","hide"),new Xt.d({key:new Xt.e("MILKDOWN_TABLE_OP"),props:{decorations:function(e){var n,r=[],i=(n=0,function(t){var e=fe(t);if(e){var r=Ht.b.get(e.node);if(!(n<0||n>=r.width))return r.cellsInRect({left:n,right:n+1,top:0,bottom:r.height}).map((function(t){var n=e.node.nodeAt(t);if(!n)throw new Error;var r=t+e.start;return{pos:r,start:r+1,node:n}}))}})(e.selection);if(!i)return null;var o,s=(o=0,function(t){var e=fe(t);if(e){var n=Ht.b.get(e.node);if(!(o<0||o>=n.height))return n.cellsInRect({left:0,right:n.width,top:o,bottom:o+1}).map((function(t){var n=e.node.nodeAt(t);if(!n)throw new Error;var r=t+e.start;return{pos:r,start:r+1,node:n}}))}})(e.selection);if(!s)return null;var u=Object(a.a)(i,1)[0];return r.push(Se(t,u,Oe.Point)),i.forEach((function(e,n){r.push(Se(t,e,Oe.Left,n))})),s.forEach((function(e,n){r.push(Se(t,e,Oe.Top,n))})),Zt.b.create(e.doc,r)}},view:function(t){var e;Object.values(n).forEach((function(t){var e=t.$;return r.appendChild(e)})),null==(e=t.dom.parentNode)||e.appendChild(r);var i=function(e){t&&(e.stopPropagation(),e.preventDefault(),Object.values(n).forEach((function(n){var r=n.$,i=n.command;r.contains(e.target)&&i(e,t)(t.state,t.dispatch,t)})))},o=function(){r.classList.add("hide")};return r.addEventListener("mousedown",i),{update:function(t,e){var i=t.state;(null==e?void 0:e.doc.eq(i.doc))&&e.selection.eq(i.selection)||(i.selection instanceof Ht.a&&t.editable?(function(t,e){Object.values(t).forEach((function(t){var n;(null==(n=t.disable)?void 0:n.call(t,e))?t.$.classList.add("hide"):t.$.classList.remove("hide")}))}(n,t),Object.values(n).every((function(t){return t.$.classList.contains("hide")}))?o():(r.classList.remove("hide"),function(t,e){var n=t.state.selection,r=n.isColSelection(),i=n.isRowSelection();Object(Gt.a)(t,e,(function(t,n,o){var a=e.parentElement;if(!a)throw new Error;var s=i?t.left-o.left-n.width/2-8:t.left-o.left+(t.width-n.width)/2;return s<0&&(s=0),[t.top-o.top-n.height-(r?14:0)-14+a.scrollTop,s]}))}(t,r))):o())},destroy:function(){r.removeEventListener("mousedown",i),r.remove()}}}})},Ce=Object(Ht.o)({tableGroup:"block",cellContent:"paragraph",cellAttributes:{alignment:{default:"left",getFromDOM:function(t){return t.style.textAlign||"left"},setDOMAttr:function(t,e){e.style="text-align: ".concat(t||"left")}}}}),Te=function(t){return t.getStyle((function(t,e){var n,r,o,a=t.size,s=t.palette,u=t.mixin;(0,e.injectGlobal)(Wt||(Wt=Object(i.a)(["\n ","\n\n .tableWrapper {\n margin: 0 !important;\n\n ",";\n\n width: 100%;\n\n table {\n width: calc(100% - 2rem) !important;\n border-radius: ",";\n box-sizing: border-box;\n margin: 1rem 0 1rem 1rem !important;\n overflow: auto !important;\n * {\n margin: 0 !important;\n box-sizing: border-box;\n font-size: 1rem;\n }\n tr {\n ",";\n }\n\n th {\n background: ",";\n font-weight: 400;\n }\n\n th,\n td {\n min-width: 100px;\n ",";\n text-align: left;\n position: relative;\n line-height: 3rem;\n box-sizing: border-box;\n height: 3rem;\n }\n\n .selectedCell {\n &::after {\n background: ",";\n }\n & ::selection {\n background: transparent;\n }\n }\n\n .column-resize-handle {\n background: ",";\n width: ",";\n }\n\n th,\n td {\n padding: 0 1rem;\n p {\n line-height: unset !important;\n }\n }\n\n .milkdown-cell-left,\n .milkdown-cell-point,\n .milkdown-cell-top {\n position: absolute;\n\n &::after {\n cursor: pointer;\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n display: block;\n transition: all 0.2s ease-in-out;\n background: ",";\n content: '';\n }\n &:hover::after {\n background: ",";\n }\n }\n\n .milkdown-cell-left {\n left: calc(-6px - 0.5rem);\n top: 0;\n bottom: 0;\n width: 0.5rem;\n }\n\n .milkdown-cell-top {\n left: 0;\n right: 0;\n top: calc(-6px - 0.5rem);\n height: 0.5rem;\n }\n\n .milkdown-cell-point {\n left: calc(-2px - 1rem);\n top: calc(-2px - 1rem);\n width: 1rem;\n height: 1rem;\n\n .icon {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n }\n }\n }\n }\n "])),(0,e.css)(qt||(qt=Object(i.a)(["\n /* copy from https://github.com/ProseMirror/prosemirror-tables/blob/master/style/tables.css */\n .ProseMirror .tableWrapper {\n overflow-x: auto;\n }\n .ProseMirror table {\n border-collapse: collapse;\n table-layout: fixed;\n width: 100%;\n overflow: hidden;\n }\n .ProseMirror td,\n .ProseMirror th {\n vertical-align: top;\n box-sizing: border-box;\n position: relative;\n }\n .ProseMirror .column-resize-handle {\n position: absolute;\n right: -2px;\n top: 0;\n bottom: 0;\n width: 4px;\n z-index: 20;\n background-color: #adf;\n pointer-events: none;\n }\n .ProseMirror.resize-cursor {\n cursor: ew-resize;\n cursor: col-resize;\n }\n /* Give selected cells a blue overlay */\n .ProseMirror .selectedCell:after {\n z-index: 2;\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n background: rgba(200, 200, 255, 0.4);\n pointer-events: none;\n }\n"]))),null==(n=u.scrollbar)?void 0:n.call(u,"x"),a.radius,null==(r=u.border)?void 0:r.call(u,"bottom"),s("background",.5),null==(o=u.border)?void 0:o.call(u),s("secondary",.38),s("primary"),a.lineWidth,s("secondary",.12),s("secondary",.38))}))},Ae={NextCell:"NextCell",PrevCell:"PrevCell",ExitTable:"ExitTable"},De=Object(te.i)("PrevCell"),Me=Object(te.i)("NextCell"),je=Object(te.i)("BreakTable"),Ne=Object(te.i)("InsertTable"),Pe=Object(c.f)((function(t){var e;return Te(t),{schema:function(){return{node:{table:ce(ue({},Ce.table),{parseMarkdown:{match:function(t){return"table"===t.type},runner:function(t,e,n){var r=e.align,i=e.children.map((function(t,e){return ce(ue({},t),{align:r,isHeader:0===e})}));t.openNode(n),t.next(i),t.closeNode()}},toMarkdown:{match:function(t){return"table"===t.type.name},runner:function(t,e){var n,r=null==(n=e.content.firstChild)?void 0:n.content;if(r){var i=[];r.forEach((function(t){i.push(t.attrs.alignment)})),t.openNode("table",void 0,{align:i}),t.next(e.content),t.closeNode()}}}}),table_row:ce(ue({},Ce.table_row),{parseMarkdown:{match:function(t){return"tableRow"===t.type},runner:function(t,e,n){var r=e.align,i=e.children.map((function(t,n){return ce(ue({},t),{align:r[n],isHeader:e.isHeader})}));t.openNode(n),t.next(i),t.closeNode()}},toMarkdown:{match:function(t){return"table_row"===t.type.name},runner:function(t,e){t.openNode("tableRow"),t.next(e.content),t.closeNode()}}}),table_cell:ce(ue({},Ce.table_cell),{parseMarkdown:{match:function(t){return"tableCell"===t.type&&!t.isHeader},runner:function(t,e,n){var r=e.align;t.openNode(n,{alignment:r}).openNode(t.schema.nodes.paragraph).next(e.children).closeNode().closeNode()}},toMarkdown:{match:function(t){return"table_cell"===t.type.name},runner:function(t,e){t.openNode("tableCell").next(e.content).closeNode()}}}),table_header:ce(ue({},Ce.table_header),{parseMarkdown:{match:function(t){return"tableCell"===t.type&&!!t.isHeader},runner:function(t,e,n){var r=e.align;t.openNode(n,{alignment:r}),t.openNode(t.schema.nodes.paragraph),t.next(e.children),t.closeNode(),t.closeNode()}},toMarkdown:{match:function(t){return"table_header"===t.type.name},runner:function(t,e){t.openNode("tableCell"),t.next(e.content),t.closeNode()}}})}}},inputRules:function(t,e){return[new Ut.a(/^\|\|\s$/,(function(n,r,i,o){var a=n.doc.resolve(i);if(!a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),t.table))return null;var s=de(e.get(te.u)),u=n.tr.replaceRangeWith(i,o,s).scrollIntoView();return u.setSelection(Xt.h.create(u.doc,i+3))}))]},commands:function(t,e){return[Object(te.h)(De,(function(){return Object(Ht.i)(-1)})),Object(te.h)(Me,(function(){return Object(Ht.i)(1)})),Object(te.h)(je,(function(){return t=e.get(te.u).nodes.paragraph,function(e,n){if(!Object(Ht.j)(e))return!1;var r=e.selection.$head.after(),i=e.tr.replaceWith(r,r,t.createAndFill());return i.setSelection(Xt.f.near(i.doc.resolve(r),1)),null==n||n(i.scrollIntoView()),!0};var t})),Object(te.h)(Ne,(function(){return function(t,n){var r=t.selection,i=t.tr,o=r.from,a=de(e.get(te.u)),s=i.replaceSelectionWith(a),u=Xt.f.findFrom(s.doc.resolve(o),1,!0);return u&&(null==n||n(s.setSelection(u))),!0}}))]},shortcuts:(e={},Object(o.a)(e,Ae.NextCell,Object(c.g)(Me,"Mod-]")),Object(o.a)(e,Ae.PrevCell,Object(c.g)(De,"Mod-[")),Object(o.a)(e,Ae.ExitTable,Object(c.g)(je,"Mod-Enter")),e),prosePlugins:function(e,n){return[Ee(n,t),Object(Ht.e)({}),Object(Ht.m)()]}}})),Re=ce(ue(ue({},u.e),Ae),{StrikeThrough:"StrikeThrough",TaskList:"TaskList"}),Le=Object(te.i)("ToggleStrikeThrough"),Fe=Object(c.d)((function(t){var e="strike_through",n=t.getStyle((function(t,e){return(0,e.css)(Vt||(Vt=Object(i.a)(["\n text-decoration-color: ",";\n "])),t.palette("secondary"))}));return{id:e,schema:function(){return{parseDOM:[{tag:"del"},{style:"text-decoration",getAttrs:function(t){return"line-through"===t}}],toDOM:function(e){return["del",{class:t.getClassName(e.attrs,"strike-through",n)}]},parseMarkdown:{match:function(t){return"delete"===t.type},runner:function(t,e,n){t.openMark(n),t.next(e.children),t.closeMark(n)}},toMarkdown:{match:function(t){return t.type.name===e},runner:function(t,e){t.withMark(e,"delete")}}}},inputRules:function(t){return[Object(Gt.h)(/(?:~~)([^~]+)(?:~~)$/,t),Object(Gt.h)(/(?:^|[^~])(~([^~]+)~)$/,t)]},commands:function(t){return[Object(te.h)(Le,(function(){return Object(Kt.e)(t)}))]},shortcuts:Object(o.a)({},Re.StrikeThrough,Object(c.g)(Le,"Mod-Alt-x"))}})),Be=Object(te.i)("SplitTaskListItem"),Ie=Object(te.i)("SinkTaskListItem"),Qe=Object(te.i)("LiftTaskListItem"),$e=Object(te.i)("TurnIntoTaskList"),ze=Object(c.e)((function(t){var e,n="task_list_item",r=t.getStyle((function(t,e){var n=t.palette,r=t.size;return(0,e.css)(Yt||(Yt=Object(i.a)(["\n list-style-type: none;\n position: relative;\n\n & > div {\n overflow: hidden;\n padding: 0 2px;\n }\n\n label {\n position: absolute;\n top: 0;\n left: -2rem;\n display: inline-block;\n width: 1.5rem;\n height: 1.5rem;\n margin: 0.5rem 0;\n input {\n visibility: hidden;\n }\n }\n label:before {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n border-radius: ",";\n }\n label:hover:before {\n background: ",";\n }\n &[data-checked='true'] {\n label {\n color: ",";\n }\n }\n &[data-checked='false'] {\n label {\n color: ",";\n }\n }\n .paragraph {\n margin: 0.5rem 0;\n }\n "])),r.radius,n("background"),n("primary"),n("solid",.87))}));return{id:n,schema:function(){return{group:"listItem",content:"paragraph block*",defining:!0,priority:60,attrs:{checked:{default:!1}},parseDOM:[{tag:'li[data-type="task-item"]',getAttrs:function(t){if(!(t instanceof HTMLElement))throw new Error;return{checked:"true"===t.dataset.checked}}}],toDOM:function(e){return["li",{"data-type":"task-item","data-checked":e.attrs.checked?"true":"false",class:t.getClassName(e.attrs,"task-list-item",r)},0]},parseMarkdown:{match:function(t){var e=t.type,n=t.checked;return"listItem"===e&&null!==n},runner:function(t,e,n){t.openNode(n,{checked:e.checked}),t.next(e.children),t.closeNode()}},toMarkdown:{match:function(t){return t.type.name===n},runner:function(t,e){t.openNode("listItem",void 0,{checked:e.attrs.checked}),t.next(e.content),t.closeNode()}}}},inputRules:function(t){return[Object(Ut.d)(/^\s*(\[([ |x])\])\s$/,t,(function(t){return{checked:"x"===t[t.length-1]}}))]},commands:function(t){return[Object(te.h)(Be,(function(){return Object(Jt.c)(t)})),Object(te.h)(Ie,(function(){return Object(Jt.b)(t)})),Object(te.h)(Qe,(function(){return Object(Jt.a)(t)})),Object(te.h)($e,(function(){return Object(Kt.f)(t)}))]},shortcuts:(e={},Object(o.a)(e,Re.NextListItem,Object(c.g)(Be,"Enter")),Object(o.a)(e,Re.SinkListItem,Object(c.g)(Ie,"Mod-]")),Object(o.a)(e,Re.LiftListItem,Object(c.g)(Qe,"Mod-[")),Object(o.a)(e,Re.TaskList,Object(c.g)($e,"Mod-Alt-9")),e),view:function(e){return function(i,o,s){var u=e.get(te.x).slots.icon,c=document.createElement("li"),l=document.createElement("label"),h=document.createElement("span"),f=document.createElement("input"),d=document.createElement("div"),p=u("unchecked");l.appendChild(p);var g=function(t){var e=u(t);l.replaceChild(e,p),p=e};l.contentEditable="false",f.type="checkbox";var m=function(t){var e=t.target;if(e instanceof HTMLInputElement)if(o.editable){var n=o.state.tr;o.dispatch(n.setNodeMarkup(s(),void 0,{checked:e.checked}))}else f.checked=!f.checked};f.addEventListener("change",m),c.dataset.checked=i.attrs.checked,i.attrs.checked&&f.setAttribute("checked","checked"),l.append(f,h),c.append(l,d);var v={"data-type":"task-item","data-checked":i.attrs.checked?"true":"false",class:t.getClassName(i.attrs,"task-list-item",r)};return Object.entries(v).forEach((function(t){var e=Object(a.a)(t,2),n=e[0],r=e[1];c.setAttribute(n,r)})),g(i.attrs.checked?"checked":"unchecked"),{dom:c,contentDOM:d,update:function(t){return t.type.name===n&&(c.dataset.checked=t.attrs.checked,t.attrs.checked?f.setAttribute("checked","checked"):f.removeAttribute("checked"),g(t.attrs.checked?"checked":"unchecked"),!0)},destroy:function(){f.removeEventListener("change",m)}}}}}})),qe=c.c.create([].concat(Object(r.a)(u.j),[Object(c.b)((function(){return $t})),Pe(),he,Fe(),ze()]));ce(ue({},u.i),{ToggleStrikeThrough:Le,TurnIntoTaskList:$e,SinkTaskListItem:Ie,LiftTaskListItem:Qe,SplitTaskListItem:Be})},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(10);function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function c(t){if(!t.parent.type.spec.isolating)for(var e=t.depth-1;e>=0;e--){var n=t.node(e);if(t.index(e)+1=0;p--)d=i.c.from(a[p].create(null,d));d=i.c.from(c.copy(d));var g=t.tr.step(new r.c(e.pos-1,f,e.pos,f,new i.j(d,1,0),a.length,!0)),m=f+2*a.length;Object(r.g)(g.doc,m)&&g.join(m),n(g.scrollIntoView())}return!0}var v=o.f.findFrom(e,1),y=v&&v.$from.blockRange(v.$to),b=y&&Object(r.l)(y);if(null!=b&&b>=e.depth)return n&&n(t.tr.lift(y,b).scrollIntoView()),!0;if(h&&s(l,"start",!0)&&s(c,"end")){for(var O=c,w=[];w.push(O),!O.isTextblock;)O=O.lastChild;for(var k=l,x=1;!k.isTextblock;k=k.firstChild)x++;if(O.canReplace(O.childCount,O.childCount,k.content)){if(n){for(var _=i.c.empty,S=w.length-1;S>=0;S--)_=i.c.from(w[S].copy(_));n(t.tr.step(new r.c(e.pos-w.length,e.pos+l.nodeSize,e.pos+x,e.pos+l.nodeSize-x,new i.j(_,w.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function g(t){return function(e,n){for(var r=e.selection,i=t<0?r.$from:r.$to,a=i.depth;i.node(a).isInline;){if(!a)return!1;a--}return!!i.node(a).isTextblock&&(n&&n(e.tr.setSelection(o.h.create(e.doc,t<0?i.start(a):i.end(a)))),!0)}}var m=g(-1),v=g(1);function y(t,e){return function(n,i){var o=n.selection,a=o.$from,s=o.$to,u=a.blockRange(s),c=u&&Object(r.j)(u,t,e);return!!c&&(i&&i(n.tr.wrap(u,c).scrollIntoView()),!0)}}function b(t,e){return function(n,r){var i=n.selection,o=i.from,a=i.to,s=!1;return n.doc.nodesBetween(o,a,(function(r,i){if(s)return!1;if(r.isTextblock&&!r.hasMarkup(t,e))if(r.type==t)s=!0;else{var o=n.doc.resolve(i),a=o.index();s=o.parent.canReplaceWith(a,a+1,t)}})),!!s&&(r&&r(n.tr.setBlockType(o,a,t,e).scrollIntoView()),!0)}}function O(t,e){return function(n,r){var i=n.selection,o=i.empty,a=i.$cursor,s=i.ranges;if(o&&!a||!function(t,e,n){for(var r=function(r){var i=e[r],o=i.$from,a=i.$to,s=0==o.depth&&t.type.allowsMarkType(n);if(t.nodesBetween(o.pos,a.pos,(function(t){if(s)return!1;s=t.inlineContent&&t.type.allowsMarkType(n)})),s)return{v:!0}},i=0;i0))return!1;var c=u(a);if(!c){var l=a.blockRange(),h=l&&Object(r.l)(l);return null!=h&&(e&&e(t.tr.lift(l,h).scrollIntoView()),!0)}var f=c.nodeBefore;if(!f.type.spec.isolating&&p(t,c,e))return!0;if(0==a.parent.content.size&&(s(f,"end")||o.c.isSelectable(f))){var d=Object(r.m)(t.doc,a.before(),a.after(),i.j.empty);if(d.slice.size0)return!1;a=u(i)}var s=a&&a.nodeBefore;return!(!s||!o.c.isSelectable(s))&&(e&&e(t.tr.setSelection(o.c.create(t.doc,a.pos-s.nodeSize)).scrollIntoView()),!0)})),x=w(a,(function(t,e,n){var a=t.selection.$cursor;if(!a||(n?!n.endOfTextblock("forward",t):a.parentOffset1&&n.after()!=n.end(-1)){var i=n.before();if(Object(r.h)(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}var o=n.blockRange(),a=o&&Object(r.l)(o);return null!=a&&(e&&e(t.tr.lift(o,a).scrollIntoView()),!0)}),f),"Mod-Enter":function(t,e){var n=t.selection,r=n.$head,i=n.$anchor;if(!r.parent.type.spec.code||!r.sameParent(i))return!1;var a=r.node(-1),s=r.indexAfter(-1),u=h(a.contentMatchAt(s));if(!a.canReplaceWith(s,s,u))return!1;if(e){var c=r.after(),l=t.tr.replaceWith(c,c,u.createAndFill());l.setSelection(o.f.near(l.doc.resolve(c),1)),e(l.scrollIntoView())}return!0},Backspace:k,"Mod-Backspace":k,"Shift-Backspace":k,Delete:x,"Mod-Delete":x,"Mod-a":function(t,e){return e&&e(t.tr.setSelection(new o.a(t.doc))),!0}},S={"Ctrl-h":_.Backspace,"Alt-Backspace":_["Mod-Backspace"],"Ctrl-d":_.Delete,"Ctrl-Alt-Backspace":_["Mod-Delete"],"Alt-Delete":_["Mod-Delete"],"Alt-d":_["Mod-Delete"],"Ctrl-a":m,"Ctrl-e":v};for(var E in _)S[E]=_[E];_.Home=m,_.End=v;var C=("undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&"darwin"==os.platform())?S:_},function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return o}));var r=n(24),i=n(7);function o(t){return function(e,n){var o=e.selection,a=o.$from,s=o.$to,u=o.node;if(u&&u.isBlock||a.depth<2||!a.sameParent(s))return!1;var c=a.node(-1);if(c.type!=t)return!1;if(0==a.parent.content.size&&a.node(-1).childCount==a.indexAfter(-1)){if(2==a.depth||a.node(-3).type!=t||a.index(-2)!=a.node(-2).childCount-1)return!1;if(n){for(var l=i.c.empty,h=a.index(-1)?1:a.index(-2)?2:3,f=a.depth-h;f>=a.depth-3;f--)l=i.c.from(a.node(f).copy(l));var d=a.indexAfter(-1)-1)return!1;t.isTextblock&&0==t.content.size&&(m=e+1)})),m>-1&&g.setSelection(e.selection.constructor.near(g.doc.resolve(m))),n(g.scrollIntoView())}return!0}var v=s.pos==a.end()?c.contentMatchAt(0).defaultType:null,y=e.tr.delete(a.pos,s.pos),b=v&&[null,{type:v}];return!!Object(r.h)(y.doc,a.pos,2,b)&&(n&&n(y.split(a.pos,2,b).scrollIntoView()),!0)}}function a(t){return function(e,n){var o=e.selection,a=o.$from,s=o.$to,u=a.blockRange(s,(function(e){return e.childCount&&e.firstChild.type==t}));return!!u&&(!n||(a.node(u.depth-1).type==t?function(t,e,n,o){var a=t.tr,s=o.end,u=o.$to.end(o.depth);sc;u--)s-=a.child(u).nodeSize,o.delete(s-1,s+1);var l=o.doc.resolve(n.start),h=l.nodeAfter;if(o.mapping.map(n.end)!=n.start+l.nodeAfter.nodeSize)return!1;var f=0==n.startIndex,d=n.endIndex==a.childCount,p=l.node(-1),g=l.index(-1);if(!p.canReplace(g+(f?0:1),g+1,h.content.append(d?i.c.empty:i.c.from(a))))return!1;var m=l.pos,v=m+h.nodeSize;return o.step(new r.c(m-(f?1:0),v+(d?1:0),m+1,v-1,new i.j((f?i.c.empty:i.c.from(a.copy(i.c.empty))).append(d?i.c.empty:i.c.from(a.copy(i.c.empty))),f?0:1,d?0:1),f?0:1)),e(o.scrollIntoView()),!0}(e,n,u)))}}function s(t){return function(e,n){var o=e.selection,a=o.$from,s=o.$to,u=a.blockRange(s,(function(e){return e.childCount&&e.firstChild.type==t}));if(!u)return!1;var c=u.startIndex;if(0==c)return!1;var l=u.parent,h=l.child(c-1);if(h.type!=t)return!1;if(n){var f=h.lastChild&&h.lastChild.type==l.type,d=i.c.from(f?t.create():null),p=new i.j(i.c.from(t.create(null,i.c.from(l.type.create(null,d)))),f?3:1,0),g=u.start,m=u.end;n(e.tr.step(new r.c(g-(f?3:1),m,g,m,p,1,!0)).scrollIntoView())}return!0}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return D})),n.d(e,"b",(function(){return p})),n.d(e,"c",(function(){return et})),n.d(e,"d",(function(){return tt})),n.d(e,"e",(function(){return pt})),n.d(e,"f",(function(){return rt})),n.d(e,"g",(function(){return ot})),n.d(e,"h",(function(){return lt})),n.d(e,"i",(function(){return ct})),n.d(e,"j",(function(){return k})),n.d(e,"k",(function(){return K})),n.d(e,"l",(function(){return at})),n.d(e,"m",(function(){return Ot})),n.d(e,"n",(function(){return b})),n.d(e,"o",(function(){return y}));var r,i,o=n(9),a=n(7),s=n(40),u=n(38),c=n(24);if("undefined"!=typeof WeakMap){var l=new WeakMap;r=function(t){return l.get(t)},i=function(t,e){return l.set(t,e),e}}else{var h=[],f=0;r=function(t){for(var e=0;er&&(o+=c.attrs.colspan)}for(var l=0;l1&&(n=!0)}-1==e?e=o:e!=o&&(e=Math.max(e,o))}return e}(t),n=t.childCount,r=[],i=0,o=null,a=[],s=0,u=e*n;s=n){(o||(o=[])).push({type:"overlong_rowspan",pos:l,n:y-O});break}for(var w=i+O*e,k=0;k0;e--)if("row"==t.node(e).type.spec.tableRole)return t.node(0).resolve(t.before(e+1));return null}function k(t){for(var e=t.selection.$head,n=e.depth;n>0;n--)if("row"==e.node(n).type.spec.tableRole)return!0;return!1}function x(t){var e=t.selection;return e.$anchorCell?e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell:e.node&&"cell"==e.node.type.spec.tableRole?e.$anchor:w(e.$head)||function(t){for(var e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){var r=e.type.spec.tableRole;if("cell"==r||"header_cell"==r)return t.doc.resolve(n)}for(var i=t.nodeBefore,o=t.pos;i;i=i.lastChild,o--){var a=i.type.spec.tableRole;if("cell"==a||"header_cell"==a)return t.doc.resolve(o-i.nodeSize)}}(e.$head)}function _(t){return"row"==t.parent.type.spec.tableRole&&t.nodeAfter}function S(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function E(t,e,n){var r=t.start(-1),i=p.get(t.node(-1)).nextCell(t.pos-r,e,n);return null==i?null:t.node(0).resolve(r+i)}function C(t,e,n){var r={};for(var i in t)r[i]=t[i];return r[e]=n,r}function T(t,e,n){void 0===n&&(n=1);var r=C(t,"colspan",t.colspan-n);return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,n),r.colwidth.some((function(t){return t>0}))||(r.colwidth=null)),r}function A(t,e,n){void 0===n&&(n=1);var r=C(t,"colspan",t.colspan+n);if(r.colwidth){r.colwidth=r.colwidth.slice();for(var i=0;i0||m>0){var v=d.attrs;g>0&&(v=T(v,0,g)),m>0&&(v=T(v,v.colspan-m,m)),d=f.leftr.bottom){var y=C(d.attrs,"rowspan",Math.min(f.bottom,r.bottom)-Math.max(f.top,r.top));d=f.top0)return!1;var n=t+this.$anchorCell.nodeAfter.attrs.rowspan,r=e+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount},e.colSelection=function(t,n){void 0===n&&(n=t);var r=p.get(t.node(-1)),i=t.start(-1),o=r.findCell(t.pos-i),a=r.findCell(n.pos-i),s=t.node(0);return o.top<=a.top?(o.top>0&&(t=s.resolve(i+r.map[o.left])),a.bottom0&&(n=s.resolve(i+r.map[a.left])),o.bottom0)return!1;var i=n+this.$anchorCell.nodeAfter.attrs.colspan,o=r+this.$headCell.nodeAfter.attrs.colspan;return Math.max(i,o)==t.width},e.prototype.eq=function(t){return t instanceof e&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos},e.rowSelection=function(t,n){void 0===n&&(n=t);var r=p.get(t.node(-1)),i=t.start(-1),o=r.findCell(t.pos-i),a=r.findCell(n.pos-i),s=t.node(0);return o.left<=a.left?(o.left>0&&(t=s.resolve(i+r.map[o.top*r.width])),a.right0&&(n=s.resolve(i+r.map[a.top*r.width])),o.right0&&r>0||"table"==e.firstChild.type.spec.tableRole);)n--,r--,e=e.firstChild.content;var i=e.firstChild,o=i.type.spec.tableRole,s=i.type.schema,u=[];if("row"==o)for(var c=0;c=0;o--)for(var s=i.child(o).attrs,u=s.rowspan,c=s.colspan,l=r;l=e.length&&e.push(a.c.empty),n[d]e.width)for(var h=0,f=0;he.height){for(var v=[],y=0,O=(e.height-1)*e.width;y=e.width)&&n.nodeAt(e.map[O+y]).type==l.header_cell;v.push(w?c||(c=l.header_cell.createAndFill()):u||(u=l.cell.createAndFill()))}for(var k=l.row.create(null,a.c.from(v)),x=[],_=e.height;_e&&(p=p.type.create(T(p.attrs,p.attrs.colspan,f+p.attrs.colspan-e),p.content)),h.push(p),f+=p.attrs.colspan;for(var g=1;gn&&(k=k.type.create(C(k.attrs,"rowspan",Math.max(1,n-k.attrs.rowspan)),k.content)),b.push(k)}m.push(a.c.from(b))}o=m,i=n}return{width:r,height:i,rows:o}}(r,u.right-u.left,u.bottom-u.top),F(t.state,t.dispatch,s,u,r),!0}if(r){var c=x(t.state),l=c.start(-1);return F(t.state,t.dispatch,l,p.get(c.node(-1)).findCell(c.pos-l),r),!0}return!1}function V(t,e){if(!e.ctrlKey&&!e.metaKey){var n,r=U(t,e.target);if(e.shiftKey&&t.state.selection instanceof D)i(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&null!=(n=w(t.state.selection.$anchor))&&H(t,e).pos!=n.pos)i(n,e),e.preventDefault();else if(!r)return;t.root.addEventListener("mouseup",o),t.root.addEventListener("dragstart",o),t.root.addEventListener("mousemove",a)}function i(e,n){var r=H(t,n),i=null==O.getState(t.state);if(!r||!S(e,r)){if(!i)return;r=e}var o=new D(e,r);if(i||!t.state.selection.eq(o)){var a=t.state.tr.setSelection(o);i&&a.setMeta(O,e.pos),t.dispatch(a)}}function o(){t.root.removeEventListener("mouseup",o),t.root.removeEventListener("dragstart",o),t.root.removeEventListener("mousemove",a),null!=O.getState(t.state)&&t.dispatch(t.state.tr.setMeta(O,-1))}function a(n){var a,s=O.getState(t.state);if(null!=s)a=t.state.doc.resolve(s);else if(U(t,n.target)!=r&&!(a=H(t,e)))return o();a&&i(a,n)}}function Y(t,e,n){if(!(t.state.selection instanceof o.h))return null;for(var r=t.state.selection.$head,i=r.depth-1;i>=0;i--){var a=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:a.childCount))return null;if("cell"==a.type.spec.tableRole||"header_cell"==a.type.spec.tableRole){var s=r.before(i),u="vert"==e?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(u)?s:null}}return null}function U(t,e){for(;e&&e!=t.dom;e=e.parentNode)if("TD"==e.nodeName||"TH"==e.nodeName)return e}function H(t,e){var n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?w(t.state.doc.resolve(n.pos)):null}var X=new o.e("fix-tables");function G(t,e,n,r){var i=t.childCount,o=e.childCount;t:for(var a=0,s=0;a0){var x="cell";O.firstChild&&(x=O.firstChild.type.spec.tableRole);for(var _=[],S=0;S0?-1:0;(function(t,e,n){for(var r=b(e.type.schema).header_cell,i=0;i0&&n0&&r.map[u-1]==c||n0&&f==r.map[h-r.width]){var d=i.nodeAt(f).attrs;t.setNodeMarkup(t.mapping.slice(c).map(f+o),null,C(d,"rowspan",d.rowspan-1)),l+=d.colspan-1}else if(n=0;r--){var o=t.node(-1).child(r);if(o.childCount)return i-1-o.lastChild.nodeSize;i-=o.nodeSize}}else{if(t.index()0;r--){if("table"==n.node(r).type.spec.tableRole)return e&&e(t.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0}return!1}var ht=function(t,e){this.node=t,this.cellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),ft(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))};function ft(t,e,n,r,i,o){for(var a=0,s=!0,u=e.firstChild,c=t.firstChild,l=0,h=0;l-1?{class:"resize-cursor"}:null},handleDOMEvents:{mousemove:function(t,n){!function(t,e,n,r,i){var o=dt.getState(t.state);if(!o.dragging){var a=function(t){for(;t&&"TD"!=t.nodeName&&"TH"!=t.nodeName;)t=t.classList.contains("ProseMirror")?null:t.parentNode;return t}(e.target),s=-1;if(a){var u=a.getBoundingClientRect(),c=u.left,l=u.right;e.clientX-c<=n?s=mt(t,e,"left"):l-e.clientX<=n&&(s=mt(t,e,"right"))}if(s!=o.activeHandle){if(!i&&-1!==s){var h=t.state.doc.resolve(s),f=h.node(-1),d=p.get(f),g=h.start(-1);if(d.colCount(h.pos-g)+h.nodeAfter.attrs.colspan-1==d.width-1)return}yt(t,s)}}}(t,n,e,0,i)},mouseleave:function(t){!function(t){var e=dt.getState(t.state);e.activeHandle>-1&&!e.dragging&&yt(t,-1)}(t)},mousedown:function(t,e){!function(t,e,n){var r=dt.getState(t.state);if(-1==r.activeHandle||r.dragging)return!1;var i=t.state.doc.nodeAt(r.activeHandle),o=function(t,e,n){var r=n.colspan,i=n.colwidth,o=i&&i[i.length-1];if(o)return o;var a=t.domAtPos(e),s=a.node.childNodes[a.offset].offsetWidth,u=r;if(i)for(var c=0;c-1)return function(t,e){for(var n=[],r=t.doc.resolve(e),i=r.node(-1),o=p.get(i),a=r.start(-1),s=o.colCount(r.pos-a)+r.nodeAfter.attrs.colspan,c=0;c=0&&!(e.after(o+1)=0&&!(n.before(a+1)>n.start(a));a--,i--);return r==i&&/row|table/.test(e.node(o).type.spec.tableRole)}(a)?r=o.h.create(s,a.from):a instanceof o.h&&function(t){for(var e,n,r=t.$from,i=t.$to,o=r.depth;o>0;o--){var a=r.node(o);if("cell"===a.type.spec.tableRole||"header_cell"===a.type.spec.tableRole){e=a;break}}for(var s=i.depth;s>0;s--){var u=i.node(s);if("cell"===u.type.spec.tableRole||"header_cell"===u.type.spec.tableRole){n=u;break}}return e!==n&&0===i.parentOffset}(a)&&(r=o.h.create(s,a.$from.start(),a.$from.end()));return r&&(e||(e=t.tr)).setSelection(r),e}(r,Z(r,n),e)}})}gt.prototype.apply=function(t){var e=this,n=t.getMeta(dt);if(n&&null!=n.setHandle)return new gt(n.setHandle,null);if(n&&void 0!==n.setDragging)return new gt(e.activeHandle,n.setDragging);if(e.activeHandle>-1&&t.docChanged){var r=t.mapping.map(e.activeHandle,-1);_(t.doc.resolve(r))||(r=null),e=new gt(r,e.dragging)}return e}},function(t,e,n){"use strict";function r(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(79),i=n.n(r),o=n(42);function a(t,e){if(e&&("object"===i()(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Object(o.a)(t)}},function(t,e){function n(e){return t.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){"use strict";!function t(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}(),t.exports=n(121)},function(t,e,n){"use strict";function r(t){if(Array.isArray(t))return t}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(48),i=n(77);function o(t,e,n){return o=Object(i.a)()?Reflect.construct:function(t,e,n){var i=[null];i.push.apply(i,e);var o=new(Function.bind.apply(t,i));return n&&Object(r.a)(o,n.prototype),o},o.apply(null,arguments)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(59),i=n(85),o=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function a(t){return t.replace(o,s)}function s(t,e,n){if(e)return e;if(35===n.charCodeAt(0)){var o=n.charCodeAt(1),a=120===o||88===o;return Object(i.a)(n.slice(a?2:1),a?16:10)}return Object(r.a)(n)||t}},function(t,e,n){"use strict";function r(t,e){var n=Number.parseInt(t,e);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||65535===(65535&n)||65534===(65535&n)||n>1114111?"\ufffd":String.fromCharCode(n)}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(t,e){return i(t,e.inConstruct,!0)&&!i(t,e.notInConstruct,!1)}function i(t,e,n){if(!e)return n;"string"===typeof e&&(e=[e]);for(var r=-1;++ra&&(a=o):o=1,i=r+1,r=n.indexOf(e,i);return a}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(t){if(!t._compiled){var e=(t.atBreak?"[\\r\\n][\\t ]*":"")+(t.before?"(?:"+t.before+")":"");t._compiled=new RegExp((e?"("+e+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(t.character)?"\\":"")+t.character+(t.after?"(?:"+t.after+")":""),"g")}return t._compiled}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(88);function i(t,e,n){for(var i=t.value||"",o="`",a=-1;new RegExp("(^|[^`])"+o+"([^`]|$)").test(i);)o+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++a2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function b(t,e,n){for(var r=Object(u.v)(t).resolveInner(e.head),o=n?c.b.closedBy:c.b.openedBy,a=e.head;;){var l=n?r.childAfter(a):r.childBefore(a);if(!l)break;y(t,l,o)?r=l:a=n?l.to:l.from}var h,f;return f=r.type.prop(o)&&(h=n?Object(s.b)(t,r.from,1):Object(s.b)(t,r.to,-1))&&h.matched?n?h.end.to:h.end.from:n?r.to:r.from,i.e.cursor(f,n?-1:1)}function O(t,e){return f(t,(function(n){if(!n.empty)return d(n,e);var r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)}))}var w=function(t){return O(t,!1)},k=function(t){return O(t,!0)};function x(t,e){return f(t,(function(n){return n.empty?t.moveVertically(n,e,t.dom.clientHeight):d(n,e)}))}var _=function(t){return x(t,!1)},S=function(t){return x(t,!0)};function E(t,e,n){var r=t.lineBlockAt(e.head),o=t.moveToLineBoundary(e,n);if(o.head==e.head&&o.head!=(n?r.to:r.from)&&(o=t.moveToLineBoundary(e,n,!1)),!n&&o.head==r.from&&r.length){var a=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;a&&e.head!=r.from+a&&(o=i.e.cursor(r.from+a))}return o}var C=function(t){return f(t,(function(e){return E(t,e,!0)}))},T=function(t){return f(t,(function(e){return E(t,e,!1)}))};function A(t,e,n){var r=!1,o=l(t.selection,(function(e){var o=Object(s.b)(t,e.head,-1)||Object(s.b)(t,e.head,1)||e.head>0&&Object(s.b)(t,e.head-1,1)||e.headn&&(o="delete.forward"),n=Math.min(n,a),r=Math.max(r,a)}return n==r?{range:t}:{changes:{from:n,to:r},range:i.e.cursor(n)}}));return!a.changes.empty&&(r(n.update(a,{scrollIntoView:!0,userEvent:o})),!0)}function H(t,e,n){if(t instanceof a.d){var i,o=Object(r.a)(t.pluginField(a.e.atomicRanges));try{for(o.s();!(i=o.n()).done;){i.value.between(e,e,(function(t,r){te&&(e=n?r:t)}))}}catch(s){o.e(s)}finally{o.f()}}return e}var X=function(t,e){return U(t,(function(n){var r,i,a=t.state,s=a.doc.lineAt(n);if(!e&&n>s.from&&n=s.number){var c=n[n.length-1];c.to=u.to,c.ranges.push(a)}else n.push({from:s.from,to:u.to,ranges:[a]});i=u.number+1}}catch(l){o.e(l)}finally{o.f()}return n}function nt(t,e,n){if(t.readOnly)return!1;var o,a=[],s=[],u=Object(r.a)(et(t));try{for(u.s();!(o=u.n()).done;){var c=o.value;if(n?c.to!=t.doc.length:0!=c.from){var l=t.doc.lineAt(n?c.to+1:c.from-1),h=l.length+1;if(n){a.push({from:c.to,to:l.to},{from:c.from,insert:l.text+t.lineBreak});var f,d=Object(r.a)(c.ranges);try{for(d.s();!(f=d.n()).done;){var p=f.value;s.push(i.e.range(Math.min(t.doc.length,p.anchor+h),Math.min(t.doc.length,p.head+h)))}}catch(y){d.e(y)}finally{d.f()}}else{a.push({from:l.from,to:c.from},{from:c.to,insert:t.lineBreak+l.text});var g,m=Object(r.a)(c.ranges);try{for(m.s();!(g=m.n()).done;){var v=g.value;s.push(i.e.range(v.anchor-h,v.head-h))}}catch(y){m.e(y)}finally{m.f()}}}}}catch(y){u.e(y)}finally{u.f()}return!!a.length&&(e(t.update({changes:a,scrollIntoView:!0,selection:i.e.create(s,t.selection.mainIndex),userEvent:"move.line"})),!0)}function rt(t,e,n){if(t.readOnly)return!1;var i,o=[],a=Object(r.a)(et(t));try{for(a.s();!(i=a.n()).done;){var s=i.value;n?o.push({from:s.from,insert:t.doc.slice(s.from,s.to)+t.lineBreak}):o.push({from:s.to,insert:t.lineBreak+t.doc.slice(s.from,s.to)})}}catch(u){a.e(u)}finally{a.f()}return e(t.update({changes:o,scrollIntoView:!0,userEvent:"input.copyline"})),!0}var it=ot(!1);function ot(t){return function(e){var n=e.state,r=e.dispatch;if(n.readOnly)return!1;var a=n.changeByRange((function(e){var r=e.from,a=e.to,s=n.doc.lineAt(r),l=!t&&r==a&&function(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};var n,r=Object(u.v)(t).resolveInner(e),i=r.childBefore(e),o=r.childAfter(e);return i&&o&&i.to<=e&&o.from>=e&&(n=i.type.prop(c.b.closedBy))&&n.indexOf(o.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(o.from).from?{from:i.to,to:o.from}:null}(n,r);t&&(r=a=(a<=s.to?s:n.doc.lineAt(a)).to);var h=new u.a(n,{simulateBreak:r,simulateDoubleBreak:!!l}),f=Object(u.o)(h,r);for(null==f&&(f=/^\s*/.exec(n.doc.lineAt(r).text)[0].length);as.from&&rn&&(r.empty||r.to>s.from)&&(e(s,o,r),n=s.number),a=s.to+1}var u=t.changes(o);return{changes:o,range:i.e.range(u.mapPos(r.anchor,1),u.mapPos(r.head,1))}}))}var st=function(t){var e=t.state,n=t.dispatch;return!e.readOnly&&(n(e.update(at(e,(function(t,n){n.push({from:t.from,insert:e.facet(u.s)})})),{userEvent:"input.indent"})),!0)},ut=function(t){var e=t.state,n=t.dispatch;return!e.readOnly&&(n(e.update(at(e,(function(t,n){var r=/^\s*/.exec(t.text)[0];if(r){for(var i=Object(o.d)(r,e.tabSize),a=0,s=Object(u.r)(e,Math.max(0,i-Object(u.n)(e)));a1?o=i.e.create([r.main]):r.main.empty||(o=i.e.create([i.e.cursor(r.main.head)])),!!o&&(n(h(e,o)),!0)}},{key:"Mod-Enter",run:ot(!0)},{key:"Alt-l",mac:"Ctrl-l",run:function(t){var e=t.state,n=t.dispatch,r=et(e).map((function(t){var n=t.from,r=t.to;return i.e.range(n,Math.min(r+1,e.doc.length))}));return n(e.update({selection:i.e.create(r),userEvent:"select"})),!0}},{key:"Mod-i",run:function(t){var e=t.state,n=t.dispatch,r=l(e.selection,(function(t){for(var n,r=Object(u.v)(e).resolveInner(t.head,1);!(r.from=t.to||r.to>t.to&&r.from<=t.from)&&(null===(n=r.parent)||void 0===n?void 0:n.parent);)r=r.parent;return i.e.range(r.to,r.from)}));return n(h(e,r)),!0},preventDefault:!0},{key:"Mod-[",run:ut},{key:"Mod-]",run:st},{key:"Mod-Alt-\\",run:function(t){var e=t.state,n=t.dispatch;if(e.readOnly)return!1;var r=Object.create(null),i=new u.a(e,{overrideIndentation:function(t){var e=r[t];return null==e?-1:e}}),o=at(e,(function(t,n,o){var a=Object(u.o)(i,t.from);if(null!=a){/\S/.test(t.text)||(a=0);var s=/^\s*/.exec(t.text)[0],c=Object(u.r)(e,a);(s!=c||o.from0?n--:rn?n:Math.max(0,e-1),!1)}))}},{mac:"Mod-Delete",run:tt}].concat([{key:"Ctrl-b",run:g,shift:j,preventDefault:!0},{key:"Ctrl-f",run:m,shift:N},{key:"Ctrl-p",run:w,shift:L},{key:"Ctrl-n",run:k,shift:F},{key:"Ctrl-a",run:function(t){return f(t,(function(e){return i.e.cursor(t.lineBlockAt(e.head).from,1)}))},shift:function(t){return D(t,(function(e){return i.e.cursor(t.lineBlockAt(e.head).from)}))}},{key:"Ctrl-e",run:function(t){return f(t,(function(e){return i.e.cursor(t.lineBlockAt(e.head).to,-1)}))},shift:function(t){return D(t,(function(e){return i.e.cursor(t.lineBlockAt(e.head).to)}))}},{key:"Ctrl-d",run:Z},{key:"Ctrl-h",run:G},{key:"Ctrl-k",run:tt},{key:"Ctrl-Alt-h",run:J},{key:"Ctrl-o",run:function(t){var e=t.state,n=t.dispatch;if(e.readOnly)return!1;var r=e.changeByRange((function(t){return{changes:{from:t.from,to:t.to,insert:o.a.of(["",""])},range:i.e.cursor(t.from)}}));return n(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:function(t){var e=t.state,n=t.dispatch;if(e.readOnly)return!1;var r=e.changeByRange((function(t){if(!t.empty||0==t.from||t.from==e.doc.length)return{range:t};var n=t.from,r=e.doc.lineAt(n),a=n==r.from?n-1:Object(o.e)(r.text,n-r.from,!1)+r.from,s=n==r.to?n+1:Object(o.e)(r.text,n-r.from,!0)+r.from;return{changes:{from:a,to:s,insert:e.doc.slice(n,s).append(e.doc.slice(a,n))},range:i.e.cursor(s)}}));return!r.changes.empty&&(n(e.update(r,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Alt-<",run:q},{key:"Alt->",run:W},{key:"Ctrl-v",run:S},{key:"Alt-v",run:_}].map((function(t){return{mac:t.key,run:t.run,shift:t.shift}})))),lt={key:"Tab",run:st,shift:ut}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=function(t){return crypto.getRandomValues(new Uint8Array(t))},i=function(t,e){return function(t,e,n){var r=(2<-1?e.start:1)+(!1===n.options.incrementListMarker?0:e.children.indexOf(t))+s);var u=s.length+1;("tab"===a||"mixed"===a&&(e&&"list"===e.type&&e.spread||t.spread))&&(u=4*Math.ceil(u/4));var c=n.enter("listItem"),l=Object(o.a)(Object(i.a)(t,n),(function(t,e,n){if(e)return(n?"":" ".repeat(u))+t;return(n?s:s+" ".repeat(u-s.length))+t}));return c(),l}},function(t,e,n){"use strict";n.d(e,"a",(function(){return d.d}));var r=n(110),i=n.n(r),o=n(111),a=n.n(o),s=n(20),u=n.n(s),c=n(22),l=n(55),h=n(3),f=n(90),d=n(8),p=n(4),g="#e06c75",m="#abb2bf",v="#7d8799",y="#d19a66",b="#2c313a",O="#282c34",w="#353a42",k="#528bff",x=d.d.theme({"&":{color:m,backgroundColor:O},".cm-content":{caretColor:k},"&.cm-focused .cm-cursor":{borderLeftColor:k},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:"#3E4451"},".cm-panels":{backgroundColor:"#21252b",color:m},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:b},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847",outline:"1px solid #515a6b"},".cm-gutters":{backgroundColor:O,color:v,border:"none"},".cm-activeLineGutter":{backgroundColor:b},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:w},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:w,borderBottomColor:w},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:b,color:m}}},{dark:!0}),_=(p.d.keyword,p.d.name,p.d.deleted,p.d.character,p.d.propertyName,p.d.macroName,p.d.variableName,p.d.labelName,p.d.color,p.d.name,p.d.name,p.d.name,p.d.separator,p.d.typeName,p.d.className,p.d.number,p.d.changed,p.d.annotation,p.d.modifier,p.d.self,p.d.namespace,p.d.operator,p.d.operatorKeyword,p.d.url,p.d.escape,p.d.regexp,p.d.link,p.d.string,p.d.meta,p.d.comment,p.d.strong,p.d.emphasis,p.d.strikethrough,p.d.link,p.d.heading,p.d.atom,p.d.bool,p.d.variableName,p.d.processingInstruction,p.d.string,p.d.inserted,p.d.invalid,d.d.theme({"&":{backgroundColor:"#fff"}},{dark:!1}));var S=n(31),E=["className","value","selection","extensions","onChange","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","root"],C=u.a.forwardRef((function(t,e){var n=t.className,r=t.value,o=t.selection,u=t.extensions,p=void 0===u?[]:u,g=t.onChange,m=t.onUpdate,v=t.autoFocus,y=t.theme,b=void 0===y?"light":y,O=t.height,w=t.minHeight,k=t.maxHeight,C=t.width,T=t.minWidth,A=t.maxWidth,D=t.basicSetup,M=t.placeholder,j=t.indentWithTab,N=t.editable,P=t.root,R=a()(t,E),L=Object(s.useRef)(null),F=function(t){var e=t.value,n=t.selection,r=t.onChange,i=t.onUpdate,o=t.extensions,a=void 0===o?[]:o,u=t.autoFocus,p=t.theme,g=void 0===p?"light":p,m=t.height,v=void 0===m?"":m,y=t.minHeight,b=void 0===y?"":y,O=t.maxHeight,w=void 0===O?"":O,k=t.placeholder,S=void 0===k?"":k,E=t.width,C=void 0===E?"":E,T=t.minWidth,A=void 0===T?"":T,D=t.maxWidth,M=void 0===D?"":D,j=t.editable,N=void 0===j||j,P=t.indentWithTab,R=void 0===P||P,L=t.basicSetup,F=void 0===L||L,B=t.root,I=Object(s.useState)(t.container),Q=Object(c.a)(I,2),$=Q[0],z=Q[1],q=Object(s.useState)(),W=Object(c.a)(q,2),V=W[0],Y=W[1],U=Object(s.useState)(),H=Object(c.a)(U,2),X=H[0],G=H[1],Z=d.d.theme({"&":{height:v,minHeight:b,maxHeight:w,width:C,minWidth:A,maxWidth:M}}),K=[d.d.updateListener.of((function(t){if(t.docChanged&&"function"===typeof r){var e=t.state.doc.toString();r(e,t)}})),Z];switch(R&&K.unshift(d.l.of([f.b])),F&&K.unshift(l.a),S&&K.unshift(Object(d.n)(S)),g){case"light":K.push(_);break;case"dark":K.push(x);break;default:K.push(g)}return!1===N&&K.push(d.d.editable.of(!1)),i&&"function"===typeof i&&K.push(d.d.updateListener.of(i)),K=K.concat(a),Object(s.useEffect)((function(){if($&&!X){var t=h.f.create({doc:e,selection:n,extensions:K});if(G(t),!V){var r=new d.d({state:t,parent:$,root:B});Y(r)}}}),[$,X]),Object(s.useEffect)((function(){return function(){V&&V.destroy()}}),[V]),Object(s.useEffect)((function(){if(V){var t=V.state.doc.toString();e!==t&&V.dispatch({changes:{from:0,to:t.length,insert:e||""}})}}),[e,V]),Object(s.useEffect)((function(){V&&V.dispatch({effects:h.j.reconfigure.of(K)})}),[g,a,S,v,b,w,C,A,M,N,R,F]),Object(s.useEffect)((function(){u&&V&&V.focus()}),[u,V]),{state:X,setState:G,view:V,setView:Y,container:$,setContainer:z}}({container:L.current,root:P,value:r,autoFocus:v,theme:b,height:O,minHeight:w,maxHeight:k,width:C,minWidth:T,maxWidth:A,basicSetup:D,placeholder:M,indentWithTab:j,editable:N,selection:o,onChange:g,onUpdate:m,extensions:p}),B=F.state,I=F.view,Q=F.container,$=F.setContainer;Object(s.useImperativeHandle)(e,(function(){return{editor:Q,state:B,view:I}})),Object(s.useEffect)((function(){return $(L.current),function(){I&&I.destroy()}}),[]);var z="string"===typeof b?"cm-theme-"+b:"cm-theme";return Object(S.jsx)("div",i()({ref:L,className:z+(n?" "+n:"")},R))}));C.displayName="CodeMirror";e.b=C},function(t,e,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(t,e){for(var n,s,u=a(t),c=1;c0&&(null==o||o!==n)&&r.updated.forEach((function(t){t(e,n,o)})),r.markdownUpdated.length>0){var s=i(t.doc);null!=a&&a===s||(r.markdownUpdated.forEach((function(t){t(e,s,a)})),a=s)}o=n}}}}),e.update(c.r,(function(t){return t.concat(u)})),t.next=16,e.wait(c.c);case 16:r.mounted.forEach((function(t){return t(e)}));case 17:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}},function(t,e,n){var r;"undefined"!==typeof self&&self,r=function(){return function(){"use strict";var t={d:function(e,n){for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},e={};t.d(e,{default:function(){return Xr}});var n=function t(e,n){this.position=void 0;var r,i="KaTeX parse error: "+e,o=n&&n.loc;if(o&&o.start<=o.end){var a=o.lexer.input;r=o.start;var s=o.end;r===a.length?i+=" at end of input: ":i+=" at position "+(r+1)+": ";var u=a.slice(r,s).replace(/[^]/g,"$&\u0332");i+=(r>15?"\u2026"+a.slice(r-15,r):a.slice(0,r))+u+(s+15":">","<":"<",'"':""","'":"'"},a=/[&><"']/g,s=function t(e){return"ordgroup"===e.type||"color"===e.type?1===e.body.length?t(e.body[0]):e:"font"===e.type?t(e.body):e},u={contains:function(t,e){return-1!==t.indexOf(e)},deflt:function(t,e){return void 0===t?e:t},escape:function(t){return String(t).replace(a,(function(t){return o[t]}))},hyphenate:function(t){return t.replace(i,"-$1").toLowerCase()},getBaseElem:s,isCharacterBox:function(t){var e=s(t);return"mathord"===e.type||"textord"===e.type||"atom"===e.type},protocolFromUrl:function(t){var e=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(t);return null!=e?e[1]:"_relative"}},c={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:function(t){return"#"+t}},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:function(t,e){return e.push(t),e}},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:function(t){return Math.max(0,t)},cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:function(t){return Math.max(0,t)},cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:function(t){return Math.max(0,t)},cli:"-e, --max-expand ",cliProcessor:function(t){return"Infinity"===t?1/0:parseInt(t)}},globalGroup:{type:"boolean",cli:!1}};function l(t){if(t.default)return t.default;var e=t.type,n=Array.isArray(e)?e[0]:e;if("string"!==typeof n)return n.enum[0];switch(n){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}var h=function(){function t(t){for(var e in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,t=t||{},c)if(c.hasOwnProperty(e)){var n=c[e];this[e]=void 0!==t[e]?n.processor?n.processor(t[e]):t[e]:l(n)}}var e=t.prototype;return e.reportNonstrict=function(t,e,n){var i=this.strict;if("function"===typeof i&&(i=i(t,e,n)),i&&"ignore"!==i){if(!0===i||"error"===i)throw new r("LaTeX-incompatible input and strict mode is set to 'error': "+e+" ["+t+"]",n);"warn"===i?"undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+e+" ["+t+"]"):"undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+i+"': "+e+" ["+t+"]")}},e.useStrictBehavior=function(t,e,n){var r=this.strict;if("function"===typeof r)try{r=r(t,e,n)}catch(i){r="error"}return!(!r||"ignore"===r)&&(!0===r||"error"===r||("warn"===r?("undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+e+" ["+t+"]"),!1):("undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+e+" ["+t+"]"),!1)))},e.isTrusted=function(t){t.url&&!t.protocol&&(t.protocol=u.protocolFromUrl(t.url));var e="function"===typeof this.trust?this.trust(t):this.trust;return Boolean(e)},t}(),f=function(){function t(t,e,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=e,this.cramped=n}var e=t.prototype;return e.sup=function(){return d[p[this.id]]},e.sub=function(){return d[g[this.id]]},e.fracNum=function(){return d[m[this.id]]},e.fracDen=function(){return d[v[this.id]]},e.cramp=function(){return d[y[this.id]]},e.text=function(){return d[b[this.id]]},e.isTight=function(){return this.size>=2},t}(),d=[new f(0,0,!1),new f(1,0,!0),new f(2,1,!1),new f(3,1,!0),new f(4,2,!1),new f(5,2,!0),new f(6,3,!1),new f(7,3,!0)],p=[4,5,4,5,6,7,6,7],g=[5,5,5,5,7,7,7,7],m=[2,3,4,5,6,7,6,7],v=[3,3,5,5,7,7,7,7],y=[1,1,3,3,5,5,7,7],b=[0,1,2,3,2,3,2,3],O={DISPLAY:d[0],TEXT:d[2],SCRIPT:d[4],SCRIPTSCRIPT:d[6]},w=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}],k=[];function x(t){for(var e=0;e=k[e]&&t<=k[e+1])return!0;return!1}w.forEach((function(t){return t.blocks.forEach((function(t){return k.push.apply(k,t)}))}));var _=80,S={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"},E=function(){function t(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}var e=t.prototype;return e.hasClass=function(t){return u.contains(this.classes,t)},e.toNode=function(){for(var t=document.createDocumentFragment(),e=0;e=5?0:t>=3?1:2]){var n=M[e]={cssEmPerMu:T.quad[e]/18};for(var r in T)T.hasOwnProperty(r)&&(n[r]=T[r][e])}return M[e]}(this.size)),this._fontMetrics},e.getColor=function(){return this.phantom?"transparent":this.color},t}();R.BASESIZE=6;var L=R,F={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},B={ex:!0,em:!0,mu:!0},I=function(t){return"string"!==typeof t&&(t=t.unit),t in F||t in B||"ex"===t},Q=function(t,e){var n;if(t.unit in F)n=F[t.unit]/e.fontMetrics().ptPerEm/e.sizeMultiplier;else if("mu"===t.unit)n=e.fontMetrics().cssEmPerMu;else{var i;if(i=e.style.isTight()?e.havingStyle(e.style.text()):e,"ex"===t.unit)n=i.fontMetrics().xHeight;else{if("em"!==t.unit)throw new r("Invalid unit: '"+t.unit+"'");n=i.fontMetrics().quad}i!==e&&(n*=i.sizeMultiplier/e.sizeMultiplier)}return Math.min(t.number*n,e.maxSize)},$=function(t){return+t.toFixed(4)+"em"},z=function(t){return t.filter((function(t){return t})).join(" ")},q=function(t,e,n){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},e){e.style.isTight()&&this.classes.push("mtight");var r=e.getColor();r&&(this.style.color=r)}},W=function(t){var e=document.createElement(t);for(var n in e.className=z(this.classes),this.style)this.style.hasOwnProperty(n)&&(e.style[n]=this.style[n]);for(var r in this.attributes)this.attributes.hasOwnProperty(r)&&e.setAttribute(r,this.attributes[r]);for(var i=0;i"},Y=function(){function t(t,e,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,q.call(this,t,n,r),this.children=e||[]}var e=t.prototype;return e.setAttribute=function(t,e){this.attributes[t]=e},e.hasClass=function(t){return u.contains(this.classes,t)},e.toNode=function(){return W.call(this,"span")},e.toMarkup=function(){return V.call(this,"span")},t}(),U=function(){function t(t,e,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,q.call(this,e,r),this.children=n||[],this.setAttribute("href",t)}var e=t.prototype;return e.setAttribute=function(t,e){this.attributes[t]=e},e.hasClass=function(t){return u.contains(this.classes,t)},e.toNode=function(){return W.call(this,"a")},e.toMarkup=function(){return V.call(this,"a")},t}(),H=function(){function t(t,e,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=e,this.src=t,this.classes=["mord"],this.style=n}var e=t.prototype;return e.hasClass=function(t){return u.contains(this.classes,t)},e.toNode=function(){var t=document.createElement("img");for(var e in t.src=this.src,t.alt=this.alt,t.className="mord",this.style)this.style.hasOwnProperty(e)&&(t.style[e]=this.style[e]);return t},e.toMarkup=function(){var t=""+this.alt+"=i[0]&&t<=i[1])return n.name}return null}(this.text.charCodeAt(0));u&&this.classes.push(u+"_fallback"),/[\xee\xef\xed\xec]/.test(this.text)&&(this.text=X[this.text])}var e=t.prototype;return e.hasClass=function(t){return u.contains(this.classes,t)},e.toNode=function(){var t=document.createTextNode(this.text),e=null;for(var n in this.italic>0&&((e=document.createElement("span")).style.marginRight=$(this.italic)),this.classes.length>0&&((e=e||document.createElement("span")).className=z(this.classes)),this.style)this.style.hasOwnProperty(n)&&((e=e||document.createElement("span")).style[n]=this.style[n]);return e?(e.appendChild(t),e):t},e.toMarkup=function(){var t=!1,e="0&&(n+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(r)&&(n+=u.hyphenate(r)+":"+this.style[r]+";");n&&(t=!0,e+=' style="'+u.escape(n)+'"');var i=u.escape(this.text);return t?(e+=">",e+=i,e+=""):i},t}(),Z=function(){function t(t,e){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=e||{}}var e=t.prototype;return e.toNode=function(){var t=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);for(var n=0;n":""},t}(),J=function(){function t(t){this.attributes=void 0,this.attributes=t||{}}var e=t.prototype;return e.toNode=function(){var t=document.createElementNS("http://www.w3.org/2000/svg","line");for(var e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);return t},e.toMarkup=function(){var t="","\\gt",!0),ot(at,ut,yt,"\u2208","\\in",!0),ot(at,ut,yt,"\ue020","\\@not"),ot(at,ut,yt,"\u2282","\\subset",!0),ot(at,ut,yt,"\u2283","\\supset",!0),ot(at,ut,yt,"\u2286","\\subseteq",!0),ot(at,ut,yt,"\u2287","\\supseteq",!0),ot(at,ct,yt,"\u2288","\\nsubseteq",!0),ot(at,ct,yt,"\u2289","\\nsupseteq",!0),ot(at,ut,yt,"\u22a8","\\models"),ot(at,ut,yt,"\u2190","\\leftarrow",!0),ot(at,ut,yt,"\u2264","\\le"),ot(at,ut,yt,"\u2264","\\leq",!0),ot(at,ut,yt,"<","\\lt",!0),ot(at,ut,yt,"\u2192","\\rightarrow",!0),ot(at,ut,yt,"\u2192","\\to"),ot(at,ct,yt,"\u2271","\\ngeq",!0),ot(at,ct,yt,"\u2270","\\nleq",!0),ot(at,ut,bt,"\xa0","\\ "),ot(at,ut,bt,"\xa0","\\space"),ot(at,ut,bt,"\xa0","\\nobreakspace"),ot(st,ut,bt,"\xa0","\\ "),ot(st,ut,bt,"\xa0"," "),ot(st,ut,bt,"\xa0","\\space"),ot(st,ut,bt,"\xa0","\\nobreakspace"),ot(at,ut,bt,null,"\\nobreak"),ot(at,ut,bt,null,"\\allowbreak"),ot(at,ut,vt,",",","),ot(at,ut,vt,";",";"),ot(at,ct,ht,"\u22bc","\\barwedge",!0),ot(at,ct,ht,"\u22bb","\\veebar",!0),ot(at,ut,ht,"\u2299","\\odot",!0),ot(at,ut,ht,"\u2295","\\oplus",!0),ot(at,ut,ht,"\u2297","\\otimes",!0),ot(at,ut,Ot,"\u2202","\\partial",!0),ot(at,ut,ht,"\u2298","\\oslash",!0),ot(at,ct,ht,"\u229a","\\circledcirc",!0),ot(at,ct,ht,"\u22a1","\\boxdot",!0),ot(at,ut,ht,"\u25b3","\\bigtriangleup"),ot(at,ut,ht,"\u25bd","\\bigtriangledown"),ot(at,ut,ht,"\u2020","\\dagger"),ot(at,ut,ht,"\u22c4","\\diamond"),ot(at,ut,ht,"\u22c6","\\star"),ot(at,ut,ht,"\u25c3","\\triangleleft"),ot(at,ut,ht,"\u25b9","\\triangleright"),ot(at,ut,mt,"{","\\{"),ot(st,ut,Ot,"{","\\{"),ot(st,ut,Ot,"{","\\textbraceleft"),ot(at,ut,ft,"}","\\}"),ot(st,ut,Ot,"}","\\}"),ot(st,ut,Ot,"}","\\textbraceright"),ot(at,ut,mt,"{","\\lbrace"),ot(at,ut,ft,"}","\\rbrace"),ot(at,ut,mt,"[","\\lbrack",!0),ot(st,ut,Ot,"[","\\lbrack",!0),ot(at,ut,ft,"]","\\rbrack",!0),ot(st,ut,Ot,"]","\\rbrack",!0),ot(at,ut,mt,"(","\\lparen",!0),ot(at,ut,ft,")","\\rparen",!0),ot(st,ut,Ot,"<","\\textless",!0),ot(st,ut,Ot,">","\\textgreater",!0),ot(at,ut,mt,"\u230a","\\lfloor",!0),ot(at,ut,ft,"\u230b","\\rfloor",!0),ot(at,ut,mt,"\u2308","\\lceil",!0),ot(at,ut,ft,"\u2309","\\rceil",!0),ot(at,ut,Ot,"\\","\\backslash"),ot(at,ut,Ot,"\u2223","|"),ot(at,ut,Ot,"\u2223","\\vert"),ot(st,ut,Ot,"|","\\textbar",!0),ot(at,ut,Ot,"\u2225","\\|"),ot(at,ut,Ot,"\u2225","\\Vert"),ot(st,ut,Ot,"\u2225","\\textbardbl"),ot(st,ut,Ot,"~","\\textasciitilde"),ot(st,ut,Ot,"\\","\\textbackslash"),ot(st,ut,Ot,"^","\\textasciicircum"),ot(at,ut,yt,"\u2191","\\uparrow",!0),ot(at,ut,yt,"\u21d1","\\Uparrow",!0),ot(at,ut,yt,"\u2193","\\downarrow",!0),ot(at,ut,yt,"\u21d3","\\Downarrow",!0),ot(at,ut,yt,"\u2195","\\updownarrow",!0),ot(at,ut,yt,"\u21d5","\\Updownarrow",!0),ot(at,ut,gt,"\u2210","\\coprod"),ot(at,ut,gt,"\u22c1","\\bigvee"),ot(at,ut,gt,"\u22c0","\\bigwedge"),ot(at,ut,gt,"\u2a04","\\biguplus"),ot(at,ut,gt,"\u22c2","\\bigcap"),ot(at,ut,gt,"\u22c3","\\bigcup"),ot(at,ut,gt,"\u222b","\\int"),ot(at,ut,gt,"\u222b","\\intop"),ot(at,ut,gt,"\u222c","\\iint"),ot(at,ut,gt,"\u222d","\\iiint"),ot(at,ut,gt,"\u220f","\\prod"),ot(at,ut,gt,"\u2211","\\sum"),ot(at,ut,gt,"\u2a02","\\bigotimes"),ot(at,ut,gt,"\u2a01","\\bigoplus"),ot(at,ut,gt,"\u2a00","\\bigodot"),ot(at,ut,gt,"\u222e","\\oint"),ot(at,ut,gt,"\u222f","\\oiint"),ot(at,ut,gt,"\u2230","\\oiiint"),ot(at,ut,gt,"\u2a06","\\bigsqcup"),ot(at,ut,gt,"\u222b","\\smallint"),ot(st,ut,dt,"\u2026","\\textellipsis"),ot(at,ut,dt,"\u2026","\\mathellipsis"),ot(st,ut,dt,"\u2026","\\ldots",!0),ot(at,ut,dt,"\u2026","\\ldots",!0),ot(at,ut,dt,"\u22ef","\\@cdots",!0),ot(at,ut,dt,"\u22f1","\\ddots",!0),ot(at,ut,Ot,"\u22ee","\\varvdots"),ot(at,ut,lt,"\u02ca","\\acute"),ot(at,ut,lt,"\u02cb","\\grave"),ot(at,ut,lt,"\xa8","\\ddot"),ot(at,ut,lt,"~","\\tilde"),ot(at,ut,lt,"\u02c9","\\bar"),ot(at,ut,lt,"\u02d8","\\breve"),ot(at,ut,lt,"\u02c7","\\check"),ot(at,ut,lt,"^","\\hat"),ot(at,ut,lt,"\u20d7","\\vec"),ot(at,ut,lt,"\u02d9","\\dot"),ot(at,ut,lt,"\u02da","\\mathring"),ot(at,ut,pt,"\ue131","\\@imath"),ot(at,ut,pt,"\ue237","\\@jmath"),ot(at,ut,Ot,"\u0131","\u0131"),ot(at,ut,Ot,"\u0237","\u0237"),ot(st,ut,Ot,"\u0131","\\i",!0),ot(st,ut,Ot,"\u0237","\\j",!0),ot(st,ut,Ot,"\xdf","\\ss",!0),ot(st,ut,Ot,"\xe6","\\ae",!0),ot(st,ut,Ot,"\u0153","\\oe",!0),ot(st,ut,Ot,"\xf8","\\o",!0),ot(st,ut,Ot,"\xc6","\\AE",!0),ot(st,ut,Ot,"\u0152","\\OE",!0),ot(st,ut,Ot,"\xd8","\\O",!0),ot(st,ut,lt,"\u02ca","\\'"),ot(st,ut,lt,"\u02cb","\\`"),ot(st,ut,lt,"\u02c6","\\^"),ot(st,ut,lt,"\u02dc","\\~"),ot(st,ut,lt,"\u02c9","\\="),ot(st,ut,lt,"\u02d8","\\u"),ot(st,ut,lt,"\u02d9","\\."),ot(st,ut,lt,"\xb8","\\c"),ot(st,ut,lt,"\u02da","\\r"),ot(st,ut,lt,"\u02c7","\\v"),ot(st,ut,lt,"\xa8",'\\"'),ot(st,ut,lt,"\u02dd","\\H"),ot(st,ut,lt,"\u25ef","\\textcircled");var wt={"--":!0,"---":!0,"``":!0,"''":!0};ot(st,ut,Ot,"\u2013","--",!0),ot(st,ut,Ot,"\u2013","\\textendash"),ot(st,ut,Ot,"\u2014","---",!0),ot(st,ut,Ot,"\u2014","\\textemdash"),ot(st,ut,Ot,"\u2018","`",!0),ot(st,ut,Ot,"\u2018","\\textquoteleft"),ot(st,ut,Ot,"\u2019","'",!0),ot(st,ut,Ot,"\u2019","\\textquoteright"),ot(st,ut,Ot,"\u201c","``",!0),ot(st,ut,Ot,"\u201c","\\textquotedblleft"),ot(st,ut,Ot,"\u201d","''",!0),ot(st,ut,Ot,"\u201d","\\textquotedblright"),ot(at,ut,Ot,"\xb0","\\degree",!0),ot(st,ut,Ot,"\xb0","\\degree"),ot(st,ut,Ot,"\xb0","\\textdegree",!0),ot(at,ut,Ot,"\xa3","\\pounds"),ot(at,ut,Ot,"\xa3","\\mathsterling",!0),ot(st,ut,Ot,"\xa3","\\pounds"),ot(st,ut,Ot,"\xa3","\\textsterling",!0),ot(at,ct,Ot,"\u2720","\\maltese"),ot(st,ct,Ot,"\u2720","\\maltese");for(var kt='0123456789/@."',xt=0;xte&&(e=o.height),o.depth>n&&(n=o.depth),o.maxFontSize>r&&(r=o.maxFontSize)}t.height=e,t.depth=n,t.maxFontSize=r},Vt=function(t,e,n,r){var i=new Y(t,e,n,r);return Wt(i),i},Yt=function(t,e,n,r){return new Y(t,e,n,r)},Ut=function(t){var e=new E(t);return Wt(e),e},Ht=function(t,e,n){var r="";switch(t){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=t}return r+"-"+("textbf"===e&&"textit"===n?"BoldItalic":"textbf"===e?"Bold":"textit"===e?"Italic":"Regular")},Xt={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Gt={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Zt={fontMap:Xt,makeSymbol:zt,mathsym:function(t,e,n,r){return void 0===r&&(r=[]),"boldsymbol"===n.font&&$t(t,"Main-Bold",e).metrics?zt(t,"Main-Bold",e,n,r.concat(["mathbf"])):"\\"===t||"main"===it[e][t].font?zt(t,"Main-Regular",e,n,r):zt(t,"AMS-Regular",e,n,r.concat(["amsrm"]))},makeSpan:Vt,makeSvgSpan:Yt,makeLineSpan:function(t,e,n){var r=Vt([t],[],e);return r.height=Math.max(n||e.fontMetrics().defaultRuleThickness,e.minRuleThickness),r.style.borderBottomWidth=$(r.height),r.maxFontSize=1,r},makeAnchor:function(t,e,n,r){var i=new U(t,e,n,r);return Wt(i),i},makeFragment:Ut,wrapFragment:function(t,e){return t instanceof E?Vt([],[t],e):t},makeVList:function(t,e){for(var n=function(t){if("individualShift"===t.positionType){for(var e=t.children,n=[e[0]],r=-e[0].shift-e[0].elem.depth,i=r,o=1;o0&&(a.push(ke(s,e)),s=[]),a.push(i[u]));s.length>0&&a.push(ke(s,e)),n?((o=ke(ge(n,e,!0))).classes=["tag"],a.push(o)):r&&a.push(r);var l=le(["katex-html"],a);if(l.setAttribute("aria-hidden","true"),o){var h=o.children[0];h.style.height=$(l.height+l.depth),l.depth&&(h.style.verticalAlign=$(-l.depth))}return l}function _e(t){return new E(t)}var Se=function(){function t(t,e,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=e||[],this.classes=n||[]}var e=t.prototype;return e.setAttribute=function(t,e){this.attributes[t]=e},e.getAttribute=function(t){return this.attributes[t]},e.toNode=function(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);this.classes.length>0&&(t.className=z(this.classes));for(var n=0;n0&&(t+=' class ="'+u.escape(z(this.classes))+'"'),t+=">";for(var n=0;n"},e.toText=function(){return this.children.map((function(t){return t.toText()})).join("")},t}(),Ee=function(){function t(t){this.text=void 0,this.text=t}var e=t.prototype;return e.toNode=function(){return document.createTextNode(this.text)},e.toMarkup=function(){return u.escape(this.toText())},e.toText=function(){return this.text},t}(),Ce={MathNode:Se,TextNode:Ee,SpaceNode:function(){function t(t){this.width=void 0,this.character=void 0,this.width=t,this.character=t>=.05555&&t<=.05556?"\u200a":t>=.1666&&t<=.1667?"\u2009":t>=.2222&&t<=.2223?"\u2005":t>=.2777&&t<=.2778?"\u2005\u200a":t>=-.05556&&t<=-.05555?"\u200a\u2063":t>=-.1667&&t<=-.1666?"\u2009\u2063":t>=-.2223&&t<=-.2222?"\u205f\u2063":t>=-.2778&&t<=-.2777?"\u2005\u2063":null}var e=t.prototype;return e.toNode=function(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",$(this.width)),t},e.toMarkup=function(){return this.character?""+this.character+"":''},e.toText=function(){return this.character?this.character:" "},t}(),newDocumentFragment:_e},Te=function(t,e,n){return!it[e][t]||!it[e][t].replace||55349===t.charCodeAt(0)||wt.hasOwnProperty(t)&&n&&(n.fontFamily&&"tt"===n.fontFamily.substr(4,2)||n.font&&"tt"===n.font.substr(4,2))||(t=it[e][t].replace),new Ce.TextNode(t)},Ae=function(t){return 1===t.length?t[0]:new Ce.MathNode("mrow",t)},De=function(t,e){if("texttt"===e.fontFamily)return"monospace";if("textsf"===e.fontFamily)return"textit"===e.fontShape&&"textbf"===e.fontWeight?"sans-serif-bold-italic":"textit"===e.fontShape?"sans-serif-italic":"textbf"===e.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===e.fontShape&&"textbf"===e.fontWeight)return"bold-italic";if("textit"===e.fontShape)return"italic";if("textbf"===e.fontWeight)return"bold";var n=e.font;if(!n||"mathnormal"===n)return null;var r=t.mode;if("mathit"===n)return"italic";if("boldsymbol"===n)return"textord"===t.type?"bold":"bold-italic";if("mathbf"===n)return"bold";if("mathbb"===n)return"double-struck";if("mathfrak"===n)return"fraktur";if("mathscr"===n||"mathcal"===n)return"script";if("mathsf"===n)return"sans-serif";if("mathtt"===n)return"monospace";var i=t.text;return u.contains(["\\imath","\\jmath"],i)?null:(it[r][i]&&it[r][i].replace&&(i=it[r][i].replace),D(i,Zt.fontMap[n].fontName,r)?Zt.fontMap[n].variant:null)},Me=function(t,e,n){if(1===t.length){var r=Ne(t[0],e);return n&&r instanceof Se&&"mo"===r.type&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var i,o=[],a=0;a0&&(d.text=d.text.slice(0,1)+"\u0338"+d.text.slice(1),o.pop())}}}o.push(s),i=s}return o},je=function(t,e,n){return Ae(Me(t,e,n))},Ne=function(t,e){if(!t)return new Ce.MathNode("mrow");if(oe[t.type])return oe[t.type](t,e);throw new r("Got group of unknown type: '"+t.type+"'")};function Pe(t,e,n,r,i){var o,a=Me(t,n);o=1===a.length&&a[0]instanceof Se&&u.contains(["mrow","mtable"],a[0].type)?a[0]:new Ce.MathNode("mrow",a);var s=new Ce.MathNode("annotation",[new Ce.TextNode(e)]);s.setAttribute("encoding","application/x-tex");var c=new Ce.MathNode("semantics",[o,s]),l=new Ce.MathNode("math",[c]);l.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&l.setAttribute("display","block");var h=i?"katex":"katex-mathml";return Zt.makeSpan([h],[l])}var Re=function(t){return new L({style:t.displayMode?O.DISPLAY:O.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},Le=function(t,e){if(e.displayMode){var n=["katex-display"];e.leqno&&n.push("leqno"),e.fleqn&&n.push("fleqn"),t=Zt.makeSpan(n,[t])}return t},Fe={widehat:"^",widecheck:"\u02c7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23df",overbrace:"\u23de",overgroup:"\u23e0",undergroup:"\u23e1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21d2",xRightarrow:"\u21d2",overleftharpoon:"\u21bc",xleftharpoonup:"\u21bc",overrightharpoon:"\u21c0",xrightharpoonup:"\u21c0",xLeftarrow:"\u21d0",xLeftrightarrow:"\u21d4",xhookleftarrow:"\u21a9",xhookrightarrow:"\u21aa",xmapsto:"\u21a6",xrightharpoondown:"\u21c1",xleftharpoondown:"\u21bd",xrightleftharpoons:"\u21cc",xleftrightharpoons:"\u21cb",xtwoheadleftarrow:"\u219e",xtwoheadrightarrow:"\u21a0",xlongequal:"=",xtofrom:"\u21c4",xrightleftarrows:"\u21c4",xrightequilibrium:"\u21cc",xleftequilibrium:"\u21cb","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},Be={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Ie=function(t,e,n,r,i){var o,a=t.height+t.depth+n+r;if(/fbox|color|angl/.test(e)){if(o=Zt.makeSpan(["stretchy",e],[],i),"fbox"===e){var s=i.color&&i.getColor();s&&(o.style.borderColor=s)}}else{var u=[];/^[bx]cancel$/.test(e)&&u.push(new J({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(e)&&u.push(new J({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new Z(u,{width:"100%",height:$(a)});o=Zt.makeSvgSpan([],[c],i)}return o.height=a,o.style.height=$(a),o},Qe=function(t){var e=new Ce.MathNode("mo",[new Ce.TextNode(Fe[t.replace(/^\\/,"")])]);return e.setAttribute("stretchy","true"),e},$e=function(t,e){var n=function(){var n=4e5,r=t.label.substr(1);if(u.contains(["widehat","widecheck","widetilde","utilde"],r)){var i,o,a,s="ordgroup"===(p=t.base).type?p.body.length:1;if(s>5)"widehat"===r||"widecheck"===r?(i=420,n=2364,a=.42,o=r+"4"):(i=312,n=2340,a=.34,o="tilde4");else{var c=[1,1,2,2,3,3][s];"widehat"===r||"widecheck"===r?(n=[0,1062,2364,2364,2364][c],i=[0,239,300,360,420][c],a=[0,.24,.3,.3,.36,.42][c],o=r+c):(n=[0,600,1033,2339,2340][c],i=[0,260,286,306,312][c],a=[0,.26,.286,.3,.306,.34][c],o="tilde"+c)}var l=new K(o),h=new Z([l],{width:"100%",height:$(a),viewBox:"0 0 "+n+" "+i,preserveAspectRatio:"none"});return{span:Zt.makeSvgSpan([],[h],e),minWidth:0,height:a}}var f,d,p,g=[],m=Be[r],v=m[0],y=m[1],b=m[2],O=b/1e3,w=v.length;if(1===w)f=["hide-tail"],d=[m[3]];else if(2===w)f=["halfarrow-left","halfarrow-right"],d=["xMinYMin","xMaxYMin"];else{if(3!==w)throw new Error("Correct katexImagesData or update code here to support\n "+w+" children.");f=["brace-left","brace-center","brace-right"],d=["xMinYMin","xMidYMin","xMaxYMin"]}for(var k=0;k0&&(r.style.minWidth=$(i)),r};function ze(t,e){if(!t||t.type!==e)throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)));return t}function qe(t){var e=We(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e}function We(t){return t&&("atom"===t.type||nt.hasOwnProperty(t.type))?t:null}var Ve=function(t,e){var n,r,i;t&&"supsub"===t.type?(n=(r=ze(t.base,"accent")).base,t.base=n,i=function(t){if(t instanceof Y)return t;throw new Error("Expected span but got "+String(t)+".")}(we(t,e)),t.base=r):n=(r=ze(t,"accent")).base;var o=we(n,e.havingCrampedStyle()),a=0;if(r.isShifty&&u.isCharacterBox(n)){var s=u.getBaseElem(n);a=tt(we(s,e.havingCrampedStyle())).skew}var c,l="\\c"===r.label,h=l?o.height+o.depth:Math.min(o.height,e.fontMetrics().xHeight);if(r.isStretchy)c=$e(r,e),c=Zt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"elem",elem:c,wrapperClasses:["svg-align"],wrapperStyle:a>0?{width:"calc(100% - "+$(2*a)+")",marginLeft:$(2*a)}:void 0}]},e);else{var f,d;"\\vec"===r.label?(f=Zt.staticSvg("vec",e),d=Zt.svgData.vec[1]):((f=tt(f=Zt.makeOrd({mode:r.mode,text:r.label},e,"textord"))).italic=0,d=f.width,l&&(h+=f.depth)),c=Zt.makeSpan(["accent-body"],[f]);var p="\\textcircled"===r.label;p&&(c.classes.push("accent-full"),h=o.height);var g=a;p||(g-=d/2),c.style.left=$(g),"\\textcircled"===r.label&&(c.style.top=".2em"),c=Zt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:-h},{type:"elem",elem:c}]},e)}var m=Zt.makeSpan(["mord","accent"],[c],e);return i?(i.children[0]=m,i.height=Math.max(m.height,i.height),i.classes[0]="mord",i):m},Ye=function(t,e){var n=t.isStretchy?Qe(t.label):new Ce.MathNode("mo",[Te(t.label,t.mode)]),r=new Ce.MathNode("mover",[Ne(t.base,e),n]);return r.setAttribute("accent","true"),r},Ue=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((function(t){return"\\"+t})).join("|"));ae({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:function(t,e){var n=ue(e[0]),r=!Ue.test(t.funcName),i=!r||"\\widehat"===t.funcName||"\\widetilde"===t.funcName||"\\widecheck"===t.funcName;return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:Ve,mathmlBuilder:Ye}),ae({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:function(t,e){var n=e[0],r=t.parser.mode;return"math"===r&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:t.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:Ve,mathmlBuilder:Ye}),ae({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(t,e){var n=t.parser,r=t.funcName,i=e[0];return{type:"accentUnder",mode:n.mode,label:r,base:i}},htmlBuilder:function(t,e){var n=we(t.base,e),r=$e(t,e),i="\\utilde"===t.label?.12:0,o=Zt.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:n}]},e);return Zt.makeSpan(["mord","accentunder"],[o],e)},mathmlBuilder:function(t,e){var n=Qe(t.label),r=new Ce.MathNode("munder",[Ne(t.base,e),n]);return r.setAttribute("accentunder","true"),r}});var He=function(t){var e=new Ce.MathNode("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};ae({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler:function(t,e,n){var r=t.parser,i=t.funcName;return{type:"xArrow",mode:r.mode,label:i,body:e[0],below:n[0]}},htmlBuilder:function(t,e){var n,r=e.style,i=e.havingStyle(r.sup()),o=Zt.wrapFragment(we(t.body,i,e),e),a="\\x"===t.label.slice(0,2)?"x":"cd";o.classes.push(a+"-arrow-pad"),t.below&&(i=e.havingStyle(r.sub()),(n=Zt.wrapFragment(we(t.below,i,e),e)).classes.push(a+"-arrow-pad"));var s,u=$e(t,e),c=-e.fontMetrics().axisHeight+.5*u.height,l=-e.fontMetrics().axisHeight-.5*u.height-.111;if((o.depth>.25||"\\xleftequilibrium"===t.label)&&(l-=o.depth),n){var h=-e.fontMetrics().axisHeight+n.height+.5*u.height+.111;s=Zt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:l},{type:"elem",elem:u,shift:c},{type:"elem",elem:n,shift:h}]},e)}else s=Zt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:l},{type:"elem",elem:u,shift:c}]},e);return s.children[0].children[0].children[1].classes.push("svg-align"),Zt.makeSpan(["mrel","x-arrow"],[s],e)},mathmlBuilder:function(t,e){var n,r=Qe(t.label);if(r.setAttribute("minsize","x"===t.label.charAt(0)?"1.75em":"3.0em"),t.body){var i=He(Ne(t.body,e));if(t.below){var o=He(Ne(t.below,e));n=new Ce.MathNode("munderover",[r,o,i])}else n=new Ce.MathNode("mover",[r,i])}else if(t.below){var a=He(Ne(t.below,e));n=new Ce.MathNode("munder",[r,a])}else n=He(),n=new Ce.MathNode("mover",[r,n]);return n}});var Xe={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Ge=function(t){return"textord"===t.type&&"@"===t.text};function Ze(t,e,n){var r=Xe[t];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":var i={type:"atom",text:r,mode:"math",family:"rel"},o={type:"ordgroup",mode:"math",body:[n.callFunction("\\\\cdleft",[e[0]],[]),n.callFunction("\\Big",[i],[]),n.callFunction("\\\\cdright",[e[1]],[])]};return n.callFunction("\\\\cdparent",[o],[]);case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return n.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}ae({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler:function(t,e){var n=t.parser,r=t.funcName;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:e[0]}},htmlBuilder:function(t,e){var n=e.havingStyle(e.style.sup()),r=Zt.wrapFragment(we(t.label,n,e),e);return r.classes.push("cd-label-"+t.side),r.style.bottom=$(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder:function(t,e){var n=new Ce.MathNode("mrow",[Ne(t.label,e)]);return(n=new Ce.MathNode("mpadded",[n])).setAttribute("width","0"),"left"===t.side&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),(n=new Ce.MathNode("mstyle",[n])).setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}}),ae({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler:function(t,e){return{type:"cdlabelparent",mode:t.parser.mode,fragment:e[0]}},htmlBuilder:function(t,e){var n=Zt.wrapFragment(we(t.fragment,e),e);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder:function(t,e){return new Ce.MathNode("mrow",[Ne(t.fragment,e)])}}),ae({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(t,e){for(var n=t.parser,i=ze(e[0],"ordgroup").body,o="",a=0;a=1114111)throw new r("\\@char with invalid code point "+o);return u<=65535?s=String.fromCharCode(u):(u-=65536,s=String.fromCharCode(55296+(u>>10),56320+(1023&u))),{type:"textord",mode:n.mode,text:s}}});var Ke=function(t,e){var n=ge(t.body,e.withColor(t.color),!1);return Zt.makeFragment(n)},Je=function(t,e){var n=Me(t.body,e.withColor(t.color)),r=new Ce.MathNode("mstyle",n);return r.setAttribute("mathcolor",t.color),r};ae({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler:function(t,e){var n=t.parser,r=ze(e[0],"color-token").color,i=e[1];return{type:"color",mode:n.mode,color:r,body:ce(i)}},htmlBuilder:Ke,mathmlBuilder:Je}),ae({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler:function(t,e){var n=t.parser,r=t.breakOnTokenText,i=ze(e[0],"color-token").color;n.gullet.macros.set("\\current@color",i);var o=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:i,body:o}},htmlBuilder:Ke,mathmlBuilder:Je}),ae({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:1,argTypes:["size"],allowedInText:!0},handler:function(t,e,n){var r=t.parser,i=n[0],o=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:o,size:i&&ze(i,"size").value}},htmlBuilder:function(t,e){var n=Zt.makeSpan(["mspace"],[],e);return t.newLine&&(n.classes.push("newline"),t.size&&(n.style.marginTop=$(Q(t.size,e)))),n},mathmlBuilder:function(t,e){var n=new Ce.MathNode("mspace");return t.newLine&&(n.setAttribute("linebreak","newline"),t.size&&n.setAttribute("height",$(Q(t.size,e)))),n}});var tn={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},en=function(t){var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new r("Expected a control sequence",t);return e},nn=function(t,e,n,r){var i=t.gullet.macros.get(n.text);null==i&&(n.noexpand=!0,i={tokens:[n],numArgs:0,unexpandable:!t.gullet.isExpandable(n.text)}),t.gullet.macros.set(e,i,r)};ae({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler:function(t){var e=t.parser,n=t.funcName;e.consumeSpaces();var i=e.fetch();if(tn[i.text])return"\\global"!==n&&"\\\\globallong"!==n||(i.text=tn[i.text]),ze(e.parseFunction(),"internal");throw new r("Invalid token after macro prefix",i)}}),ae({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(t){var e=t.parser,n=t.funcName,i=e.gullet.popToken(),o=i.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(o))throw new r("Expected a control sequence",i);for(var a,s=0,u=[[]];"{"!==e.gullet.future().text;)if("#"===(i=e.gullet.popToken()).text){if("{"===e.gullet.future().text){a=e.gullet.future(),u[s].push("{");break}if(i=e.gullet.popToken(),!/^[1-9]$/.test(i.text))throw new r('Invalid argument number "'+i.text+'"');if(parseInt(i.text)!==s+1)throw new r('Argument number "'+i.text+'" out of order');s++,u.push([])}else{if("EOF"===i.text)throw new r("Expected a macro definition");u[s].push(i.text)}var c=e.gullet.consumeArg().tokens;return a&&c.unshift(a),"\\edef"!==n&&"\\xdef"!==n||(c=e.gullet.expandTokens(c)).reverse(),e.gullet.macros.set(o,{tokens:c,numArgs:s,delimiters:u},n===tn[n]),{type:"internal",mode:e.mode}}}),ae({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(t){var e=t.parser,n=t.funcName,r=en(e.gullet.popToken());e.gullet.consumeSpaces();var i=function(t){var e=t.gullet.popToken();return"="===e.text&&" "===(e=t.gullet.popToken()).text&&(e=t.gullet.popToken()),e}(e);return nn(e,r,i,"\\\\globallet"===n),{type:"internal",mode:e.mode}}}),ae({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(t){var e=t.parser,n=t.funcName,r=en(e.gullet.popToken()),i=e.gullet.popToken(),o=e.gullet.popToken();return nn(e,r,o,"\\\\globalfuture"===n),e.gullet.pushToken(o),e.gullet.pushToken(i),{type:"internal",mode:e.mode}}});var rn=function(t,e,n){var r=D(it.math[t]&&it.math[t].replace||t,e,n);if(!r)throw new Error("Unsupported symbol "+t+" and font size "+e+".");return r},on=function(t,e,n,r){var i=n.havingBaseStyle(e),o=Zt.makeSpan(r.concat(i.sizingClasses(n)),[t],n),a=i.sizeMultiplier/n.sizeMultiplier;return o.height*=a,o.depth*=a,o.maxFontSize=i.sizeMultiplier,o},an=function(t,e,n){var r=e.havingBaseStyle(n),i=(1-e.sizeMultiplier/r.sizeMultiplier)*e.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=$(i),t.height-=i,t.depth+=i},sn=function(t,e,n,r,i,o){var a=function(t,e,n,r){return Zt.makeSymbol(t,"Size"+e+"-Regular",n,r)}(t,e,i,r),s=on(Zt.makeSpan(["delimsizing","size"+e],[a],r),O.TEXT,r,o);return n&&an(s,r,O.TEXT),s},un=function(t,e,n){var r;return r="Size1-Regular"===e?"delim-size1":"delim-size4",{type:"elem",elem:Zt.makeSpan(["delimsizinginner",r],[Zt.makeSpan([],[Zt.makeSymbol(t,e,n)])])}},cn=function(t,e,n){var r=C["Size4-Regular"][t.charCodeAt(0)]?C["Size4-Regular"][t.charCodeAt(0)][4]:C["Size1-Regular"][t.charCodeAt(0)][4],i=new K("inner",function(t,e){switch(t){case"\u239c":return"M291 0 H417 V"+e+" H291z M291 0 H417 V"+e+" H291z";case"\u2223":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145z";case"\u2225":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145zM367 0 H410 V"+e+" H367z M367 0 H410 V"+e+" H367z";case"\u239f":return"M457 0 H583 V"+e+" H457z M457 0 H583 V"+e+" H457z";case"\u23a2":return"M319 0 H403 V"+e+" H319z M319 0 H403 V"+e+" H319z";case"\u23a5":return"M263 0 H347 V"+e+" H263z M263 0 H347 V"+e+" H263z";case"\u23aa":return"M384 0 H504 V"+e+" H384z M384 0 H504 V"+e+" H384z";case"\u23d0":return"M312 0 H355 V"+e+" H312z M312 0 H355 V"+e+" H312z";case"\u2016":return"M257 0 H300 V"+e+" H257z M257 0 H300 V"+e+" H257zM478 0 H521 V"+e+" H478z M478 0 H521 V"+e+" H478z";default:return""}}(t,Math.round(1e3*e))),o=new Z([i],{width:$(r),height:$(e),style:"width:"+$(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*e),preserveAspectRatio:"xMinYMin"}),a=Zt.makeSvgSpan([],[o],n);return a.height=e,a.style.height=$(e),a.style.width=$(r),{type:"elem",elem:a}},ln={type:"kern",size:-.008},hn=["|","\\lvert","\\rvert","\\vert"],fn=["\\|","\\lVert","\\rVert","\\Vert"],dn=function(t,e,n,r,i,o){var a,s,c,l;a=c=l=t,s=null;var h="Size1-Regular";"\\uparrow"===t?c=l="\u23d0":"\\Uparrow"===t?c=l="\u2016":"\\downarrow"===t?a=c="\u23d0":"\\Downarrow"===t?a=c="\u2016":"\\updownarrow"===t?(a="\\uparrow",c="\u23d0",l="\\downarrow"):"\\Updownarrow"===t?(a="\\Uparrow",c="\u2016",l="\\Downarrow"):u.contains(hn,t)?c="\u2223":u.contains(fn,t)?c="\u2225":"["===t||"\\lbrack"===t?(a="\u23a1",c="\u23a2",l="\u23a3",h="Size4-Regular"):"]"===t||"\\rbrack"===t?(a="\u23a4",c="\u23a5",l="\u23a6",h="Size4-Regular"):"\\lfloor"===t||"\u230a"===t?(c=a="\u23a2",l="\u23a3",h="Size4-Regular"):"\\lceil"===t||"\u2308"===t?(a="\u23a1",c=l="\u23a2",h="Size4-Regular"):"\\rfloor"===t||"\u230b"===t?(c=a="\u23a5",l="\u23a6",h="Size4-Regular"):"\\rceil"===t||"\u2309"===t?(a="\u23a4",c=l="\u23a5",h="Size4-Regular"):"("===t||"\\lparen"===t?(a="\u239b",c="\u239c",l="\u239d",h="Size4-Regular"):")"===t||"\\rparen"===t?(a="\u239e",c="\u239f",l="\u23a0",h="Size4-Regular"):"\\{"===t||"\\lbrace"===t?(a="\u23a7",s="\u23a8",l="\u23a9",c="\u23aa",h="Size4-Regular"):"\\}"===t||"\\rbrace"===t?(a="\u23ab",s="\u23ac",l="\u23ad",c="\u23aa",h="Size4-Regular"):"\\lgroup"===t||"\u27ee"===t?(a="\u23a7",l="\u23a9",c="\u23aa",h="Size4-Regular"):"\\rgroup"===t||"\u27ef"===t?(a="\u23ab",l="\u23ad",c="\u23aa",h="Size4-Regular"):"\\lmoustache"===t||"\u23b0"===t?(a="\u23a7",l="\u23ad",c="\u23aa",h="Size4-Regular"):"\\rmoustache"!==t&&"\u23b1"!==t||(a="\u23ab",l="\u23a9",c="\u23aa",h="Size4-Regular");var f=rn(a,h,i),d=f.height+f.depth,p=rn(c,h,i),g=p.height+p.depth,m=rn(l,h,i),v=m.height+m.depth,y=0,b=1;if(null!==s){var w=rn(s,h,i);y=w.height+w.depth,b=2}var k=d+v+y,x=k+Math.max(0,Math.ceil((e-k)/(b*g)))*b*g,_=r.fontMetrics().axisHeight;n&&(_*=r.sizeMultiplier);var S=x/2-_,E=[];if(E.push(un(l,h,i)),E.push(ln),null===s){var C=x-d-v+.016;E.push(cn(c,C,r))}else{var T=(x-d-v-y)/2+.016;E.push(cn(c,T,r)),E.push(ln),E.push(un(s,h,i)),E.push(ln),E.push(cn(c,T,r))}E.push(ln),E.push(un(a,h,i));var A=r.havingBaseStyle(O.TEXT),D=Zt.makeVList({positionType:"bottom",positionData:S,children:E},A);return on(Zt.makeSpan(["delimsizing","mult"],[D],A),O.TEXT,r,o)},pn=.08,gn=function(t,e,n,r,i){var o=function(t,e,n){e*=1e3;var r="";switch(t){case"sqrtMain":r=function(t,e){return"M95,"+(622+t+e)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+t/2.075+" -"+t+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+t)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+t)+" "+e+"h400000v"+(40+t)+"h-400000z"}(e,_);break;case"sqrtSize1":r=function(t,e){return"M263,"+(601+t+e)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+t/2.084+" -"+t+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+t)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+t)+" "+e+"h400000v"+(40+t)+"h-400000z"}(e,_);break;case"sqrtSize2":r=function(t,e){return"M983 "+(10+t+e)+"\nl"+t/3.13+" -"+t+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+t)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+t)+" "+e+"h400000v"+(40+t)+"h-400000z"}(e,_);break;case"sqrtSize3":r=function(t,e){return"M424,"+(2398+t+e)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+t/4.223+" -"+t+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+t)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+t)+" "+e+"\nh400000v"+(40+t)+"h-400000z"}(e,_);break;case"sqrtSize4":r=function(t,e){return"M473,"+(2713+t+e)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+t/5.298+" -"+t+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+t)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+t)+" "+e+"h400000v"+(40+t)+"H1017.7z"}(e,_);break;case"sqrtTall":r=function(t,e,n){return"M702 "+(t+e)+"H400000"+(40+t)+"\nH742v"+(n-54-e-t)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+e+"H400000v"+(40+t)+"H742z"}(e,_,n)}return r}(t,r,n),a=new K(t,o),s=new Z([a],{width:"400em",height:$(e),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return Zt.makeSvgSpan(["hide-tail"],[s],i)},mn=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","\\surd"],vn=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1"],yn=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],bn=[0,1.2,1.8,2.4,3],On=[{type:"small",style:O.SCRIPTSCRIPT},{type:"small",style:O.SCRIPT},{type:"small",style:O.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],wn=[{type:"small",style:O.SCRIPTSCRIPT},{type:"small",style:O.SCRIPT},{type:"small",style:O.TEXT},{type:"stack"}],kn=[{type:"small",style:O.SCRIPTSCRIPT},{type:"small",style:O.SCRIPT},{type:"small",style:O.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],xn=function(t){if("small"===t.type)return"Main-Regular";if("large"===t.type)return"Size"+t.size+"-Regular";if("stack"===t.type)return"Size4-Regular";throw new Error("Add support for delim type '"+t.type+"' here.")},_n=function(t,e,n,r){for(var i=Math.min(2,3-r.style.size);ie)return n[i]}return n[n.length-1]},Sn=function(t,e,n,r,i,o){var a;"<"===t||"\\lt"===t||"\u27e8"===t?t="\\langle":">"!==t&&"\\gt"!==t&&"\u27e9"!==t||(t="\\rangle"),a=u.contains(yn,t)?On:u.contains(mn,t)?kn:wn;var s=_n(t,e,a,r);return"small"===s.type?function(t,e,n,r,i,o){var a=Zt.makeSymbol(t,"Main-Regular",i,r),s=on(a,e,r,o);return n&&an(s,r,e),s}(t,s.style,n,r,i,o):"large"===s.type?sn(t,s.size,n,r,i,o):dn(t,e,n,r,i,o)},En={sqrtImage:function(t,e){var n,r,i=e.havingBaseSizing(),o=_n("\\surd",t*i.sizeMultiplier,kn,i),a=i.sizeMultiplier,s=Math.max(0,e.minRuleThickness-e.fontMetrics().sqrtRuleThickness),u=0,c=0,l=0;return"small"===o.type?(t<1?a=1:t<1.4&&(a=.7),c=(1+s)/a,(n=gn("sqrtMain",u=(1+s+pn)/a,l=1e3+1e3*s+80,s,e)).style.minWidth="0.853em",r=.833/a):"large"===o.type?(l=1080*bn[o.size],c=(bn[o.size]+s)/a,u=(bn[o.size]+s+pn)/a,(n=gn("sqrtSize"+o.size,u,l,s,e)).style.minWidth="1.02em",r=1/a):(u=t+s+pn,c=t+s,l=Math.floor(1e3*t+s)+80,(n=gn("sqrtTall",u,l,s,e)).style.minWidth="0.742em",r=1.056),n.height=c,n.style.height=$(u),{span:n,advanceWidth:r,ruleWidth:(e.fontMetrics().sqrtRuleThickness+s)*a}},sizedDelim:function(t,e,n,i,o){if("<"===t||"\\lt"===t||"\u27e8"===t?t="\\langle":">"!==t&&"\\gt"!==t&&"\u27e9"!==t||(t="\\rangle"),u.contains(mn,t)||u.contains(yn,t))return sn(t,e,!1,n,i,o);if(u.contains(vn,t))return dn(t,bn[e],!1,n,i,o);throw new r("Illegal delimiter: '"+t+"'")},sizeToMaxHeight:bn,customSizedDelim:Sn,leftRightDelim:function(t,e,n,r,i,o){var a=r.fontMetrics().axisHeight*r.sizeMultiplier,s=5/r.fontMetrics().ptPerEm,u=Math.max(e-a,n+a),c=Math.max(u/500*901,2*u-s);return Sn(t,c,!0,r,i,o)}},Cn={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Tn=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27e8","\\rangle","\u27e9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function An(t,e){var n=We(t);if(n&&u.contains(Tn,n.text))return n;throw new r(n?"Invalid delimiter '"+n.text+"' after '"+e.funcName+"'":"Invalid delimiter type '"+t.type+"'",t)}function Dn(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ae({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:function(t,e){var n=An(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:Cn[t.funcName].size,mclass:Cn[t.funcName].mclass,delim:n.text}},htmlBuilder:function(t,e){return"."===t.delim?Zt.makeSpan([t.mclass]):En.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass])},mathmlBuilder:function(t){var e=[];"."!==t.delim&&e.push(Te(t.delim,t.mode));var n=new Ce.MathNode("mo",e);"mopen"===t.mclass||"mclose"===t.mclass?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=$(En.sizeToMaxHeight[t.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}}),ae({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:function(t,e){var n=t.parser.gullet.macros.get("\\current@color");if(n&&"string"!==typeof n)throw new r("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:An(e[0],t).text,color:n}}}),ae({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:function(t,e){var n=An(e[0],t),r=t.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var o=ze(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:i,left:n.text,right:o.delim,rightColor:o.color}},htmlBuilder:function(t,e){Dn(t);for(var n,r,i=ge(t.body,e,!0,["mopen","mclose"]),o=0,a=0,s=!1,u=0;u-1?"mpadded":"menclose",[Ne(t.body,e)]);switch(t.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),"\\fcolorbox"===t.label){var i=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);r.setAttribute("style","border: "+i+"em solid "+String(t.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return t.backgroundColor&&r.setAttribute("mathbackground",t.backgroundColor),r};ae({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler:function(t,e,n){var r=t.parser,i=t.funcName,o=ze(e[0],"color-token").color,a=e[1];return{type:"enclose",mode:r.mode,label:i,backgroundColor:o,body:a}},htmlBuilder:Mn,mathmlBuilder:jn}),ae({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler:function(t,e,n){var r=t.parser,i=t.funcName,o=ze(e[0],"color-token").color,a=ze(e[1],"color-token").color,s=e[2];return{type:"enclose",mode:r.mode,label:i,backgroundColor:a,borderColor:o,body:s}},htmlBuilder:Mn,mathmlBuilder:jn}),ae({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:function(t,e){return{type:"enclose",mode:t.parser.mode,label:"\\fbox",body:e[0]}}}),ae({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler:function(t,e){var n=t.parser,r=t.funcName,i=e[0];return{type:"enclose",mode:n.mode,label:r,body:i}},htmlBuilder:Mn,mathmlBuilder:jn}),ae({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler:function(t,e){return{type:"enclose",mode:t.parser.mode,label:"\\angl",body:e[0]}}});var Nn={};function Pn(t){for(var e=t.type,n=t.names,r=t.props,i=t.handler,o=t.htmlBuilder,a=t.mathmlBuilder,s={type:e,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},u=0;u1||!h)&&m.pop(),y.length0&&(b+=.25),l.push({pos:b,isDashed:t[e]})}for(w(a[0]),n=0;n0&&(_<(T+=y)&&(_=T),T=0),t.addJot&&(_+=g),S.height=x,S.depth=_,b+=x,S.pos=b,b+=_+T,c[n]=S,w(a[n+1])}var A,D,M=b/2+e.fontMetrics().axisHeight,j=t.cols||[],N=[],P=[];if(t.tags&&t.tags.some((function(t){return t})))for(n=0;n=s)){var Y=void 0;(i>0||t.hskipBeforeAndAfter)&&0!==(Y=u.deflt(I.pregap,d))&&((A=Zt.makeSpan(["arraycolsep"],[])).style.width=$(Y),N.push(A));var U=[];for(n=0;n0){for(var Z=Zt.makeLineSpan("hline",e,h),K=Zt.makeLineSpan("hdashline",e,h),J=[{type:"elem",elem:c,shift:0}];l.length>0;){var tt=l.pop(),et=tt.pos-M;tt.isDashed?J.push({type:"elem",elem:K,shift:et}):J.push({type:"elem",elem:Z,shift:et})}c=Zt.makeVList({positionType:"individualShift",children:J},e)}if(0===P.length)return Zt.makeSpan(["mord"],[c],e);var nt=Zt.makeVList({positionType:"individualShift",children:P},e);return nt=Zt.makeSpan(["tag"],[nt],e),Zt.makeFragment([c,nt])},Vn={c:"center ",l:"left ",r:"right "},Yn=function(t,e){for(var n=[],r=new Ce.MathNode("mtd",[],["mtr-glue"]),i=new Ce.MathNode("mtd",[],["mml-eqn-num"]),o=0;o0){var d=t.cols,p="",g=!1,m=0,v=d.length;"separator"===d[0].type&&(h+="top ",m=1),"separator"===d[d.length-1].type&&(h+="bottom ",v-=1);for(var y=m;y0?"left ":"",h+=x[x.length-1].length>0?"right ":"";for(var _=1;_-1?"alignat":"align",a="split"===t.envName,s=zn(t.parser,{cols:i,addJot:!0,autoTag:a?void 0:$n(t.envName),emptySingleRow:!0,colSeparationType:o,maxNumCols:a?2:void 0,leqno:t.parser.settings.leqno},"display"),u=0,c={type:"ordgroup",mode:t.mode,body:[]};if(e[0]&&"ordgroup"===e[0].type){for(var l="",h=0;h0&&f&&(g=1),i[d]={type:"align",align:p,pregap:g,postgap:0}}return s.colSeparationType=f?"align":"alignat",s};Pn({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(t,e){var n=(We(e[0])?[e[0]]:ze(e[0],"ordgroup").body).map((function(t){var e=qe(t).text;if(-1!=="lcr".indexOf(e))return{type:"align",align:e};if("|"===e)return{type:"separator",separator:"|"};if(":"===e)return{type:"separator",separator:":"};throw new r("Unknown column alignment: "+e,t)})),i={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return zn(t.parser,i,qn(t.envName))},htmlBuilder:Wn,mathmlBuilder:Yn}),Pn({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler:function(t){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[t.envName.replace("*","")],n="c",i={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if("*"===t.envName.charAt(t.envName.length-1)){var o=t.parser;if(o.consumeSpaces(),"["===o.fetch().text){if(o.consume(),o.consumeSpaces(),n=o.fetch().text,-1==="lcr".indexOf(n))throw new r("Expected l or c or r",o.nextToken);o.consume(),o.consumeSpaces(),o.expect("]"),o.consume(),i.cols=[{type:"align",align:n}]}}var a=zn(t.parser,i,qn(t.envName)),s=Math.max.apply(Math,[0].concat(a.body.map((function(t){return t.length}))));return a.cols=new Array(s).fill({type:"align",align:n}),e?{type:"leftright",mode:t.mode,body:[a],left:e[0],right:e[1],rightColor:void 0}:a},htmlBuilder:Wn,mathmlBuilder:Yn}),Pn({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(t){var e=zn(t.parser,{arraystretch:.5},"script");return e.colSeparationType="small",e},htmlBuilder:Wn,mathmlBuilder:Yn}),Pn({type:"array",names:["subarray"],props:{numArgs:1},handler:function(t,e){var n=(We(e[0])?[e[0]]:ze(e[0],"ordgroup").body).map((function(t){var e=qe(t).text;if(-1!=="lc".indexOf(e))return{type:"align",align:e};throw new r("Unknown column alignment: "+e,t)}));if(n.length>1)throw new r("{subarray} can contain only one column");var i={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5};if((i=zn(t.parser,i,"script")).body.length>0&&i.body[0].length>1)throw new r("{subarray} can contain only one column");return i},htmlBuilder:Wn,mathmlBuilder:Yn}),Pn({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler:function(t){var e=zn(t.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},qn(t.envName));return{type:"leftright",mode:t.mode,body:[e],left:t.envName.indexOf("r")>-1?".":"\\{",right:t.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Wn,mathmlBuilder:Yn}),Pn({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Un,htmlBuilder:Wn,mathmlBuilder:Yn}),Pn({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler:function(t){u.contains(["gather","gather*"],t.envName)&&Qn(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:$n(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return zn(t.parser,e,"display")},htmlBuilder:Wn,mathmlBuilder:Yn}),Pn({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Un,htmlBuilder:Wn,mathmlBuilder:Yn}),Pn({type:"array",names:["equation","equation*"],props:{numArgs:0},handler:function(t){Qn(t);var e={autoTag:$n(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return zn(t.parser,e,"display")},htmlBuilder:Wn,mathmlBuilder:Yn}),Pn({type:"array",names:["CD"],props:{numArgs:0},handler:function(t){return Qn(t),function(t){var e=[];for(t.gullet.beginGroup(),t.gullet.macros.set("\\cr","\\\\\\relax"),t.gullet.beginGroup();;){e.push(t.parseExpression(!1,"\\\\")),t.gullet.endGroup(),t.gullet.beginGroup();var n=t.fetch().text;if("&"!==n&&"\\\\"!==n){if("\\end"===n){0===e[e.length-1].length&&e.pop();break}throw new r("Expected \\\\ or \\cr or \\end",t.nextToken)}t.consume()}for(var i,o,a=[],s=[a],u=0;u-1);else{if(!("<>AV".indexOf(f)>-1))throw new r('Expected one of "<>AV=|." after @',c[h]);for(var p=0;p<2;p++){for(var g=!0,m=h+1;m=O.SCRIPT.id?n.text():O.DISPLAY:"text"===t&&n.size===O.DISPLAY.size?n=O.TEXT:"script"===t?n=O.SCRIPT:"scriptscript"===t&&(n=O.SCRIPTSCRIPT),n},rr=function(t,e){var n,r=nr(t.size,e.style),i=r.fracNum(),o=r.fracDen();n=e.havingStyle(i);var a=we(t.numer,n,e);if(t.continued){var s=8.5/e.fontMetrics().ptPerEm,u=3.5/e.fontMetrics().ptPerEm;a.height=a.height0?3*h:7*h,p=e.fontMetrics().denom1):(l>0?(f=e.fontMetrics().num2,d=h):(f=e.fontMetrics().num3,d=3*h),p=e.fontMetrics().denom2),c){var w=e.fontMetrics().axisHeight;f-a.depth-(w+.5*l)0&&(e="."===(e=t)?null:e),e};ae({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler:function(t,e){var n,r=t.parser,i=e[4],o=e[5],a=ue(e[0]),s="atom"===a.type&&"open"===a.family?ar(a.text):null,u=ue(e[1]),c="atom"===u.type&&"close"===u.family?ar(u.text):null,l=ze(e[2],"size"),h=null;n=!!l.isBlank||(h=l.value).number>0;var f="auto",d=e[3];if("ordgroup"===d.type){if(d.body.length>0){var p=ze(d.body[0],"textord");f=or[Number(p.text)]}}else d=ze(d,"textord"),f=or[Number(d.text)];return{type:"genfrac",mode:r.mode,numer:i,denom:o,continued:!1,hasBarLine:n,barSize:h,leftDelim:s,rightDelim:c,size:f}},htmlBuilder:rr,mathmlBuilder:ir}),ae({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(t,e){var n=t.parser,r=(t.funcName,t.token);return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:ze(e[0],"size").value,token:r}}}),ae({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(t,e){var n=t.parser,r=(t.funcName,e[0]),i=function(t){if(!t)throw new Error("Expected non-null, but got "+String(t));return t}(ze(e[1],"infix").size),o=e[2],a=i.number>0;return{type:"genfrac",mode:n.mode,numer:r,denom:o,continued:!1,hasBarLine:a,barSize:i,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:rr,mathmlBuilder:ir});var sr=function(t,e){var n,r,i=e.style;"supsub"===t.type?(n=t.sup?we(t.sup,e.havingStyle(i.sup()),e):we(t.sub,e.havingStyle(i.sub()),e),r=ze(t.base,"horizBrace")):r=ze(t,"horizBrace");var o,a=we(r.base,e.havingBaseStyle(O.DISPLAY)),s=$e(r,e);if(r.isOver?(o=Zt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:s}]},e)).children[0].children[0].children[1].classes.push("svg-align"):(o=Zt.makeVList({positionType:"bottom",positionData:a.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a}]},e)).children[0].children[0].children[0].classes.push("svg-align"),n){var u=Zt.makeSpan(["mord",r.isOver?"mover":"munder"],[o],e);o=r.isOver?Zt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:u},{type:"kern",size:.2},{type:"elem",elem:n}]},e):Zt.makeVList({positionType:"bottom",positionData:u.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:u}]},e)}return Zt.makeSpan(["mord",r.isOver?"mover":"munder"],[o],e)};ae({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(t,e){var n=t.parser,r=t.funcName;return{type:"horizBrace",mode:n.mode,label:r,isOver:/^\\over/.test(r),base:e[0]}},htmlBuilder:sr,mathmlBuilder:function(t,e){var n=Qe(t.label);return new Ce.MathNode(t.isOver?"mover":"munder",[Ne(t.base,e),n])}}),ae({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(t,e){var n=t.parser,r=e[1],i=ze(e[0],"url").url;return n.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:n.mode,href:i,body:ce(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:function(t,e){var n=ge(t.body,e,!1);return Zt.makeAnchor(t.href,[],n,e)},mathmlBuilder:function(t,e){var n=je(t.body,e);return n instanceof Se||(n=new Se("mrow",[n])),n.setAttribute("href",t.href),n}}),ae({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(t,e){var n=t.parser,r=ze(e[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var i=[],o=0;o0&&(r=Q(t.totalheight,e)-n);var i=0;t.width.number>0&&(i=Q(t.width,e));var o={height:$(n+r)};i>0&&(o.width=$(i)),r>0&&(o.verticalAlign=$(-r));var a=new H(t.src,t.alt,o);return a.height=n,a.depth=r,a},mathmlBuilder:function(t,e){var n=new Ce.MathNode("mglyph",[]);n.setAttribute("alt",t.alt);var r=Q(t.height,e),i=0;if(t.totalheight.number>0&&(i=Q(t.totalheight,e)-r,n.setAttribute("valign",$(-i))),n.setAttribute("height",$(r+i)),t.width.number>0){var o=Q(t.width,e);n.setAttribute("width",$(o))}return n.setAttribute("src",t.src),n}}),ae({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler:function(t,e){var n=t.parser,r=t.funcName,i=ze(e[0],"size");if(n.settings.strict){var o="m"===r[1],a="mu"===i.value.unit;o?(a||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, not "+i.value.unit+" units"),"math"!==n.mode&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):a&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:i.value}},htmlBuilder:function(t,e){return Zt.makeGlue(t.dimension,e)},mathmlBuilder:function(t,e){var n=Q(t.dimension,e);return new Ce.SpaceNode(n)}}),ae({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(t,e){var n=t.parser,r=t.funcName,i=e[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:function(t,e){var n;"clap"===t.alignment?(n=Zt.makeSpan([],[we(t.body,e)]),n=Zt.makeSpan(["inner"],[n],e)):n=Zt.makeSpan(["inner"],[we(t.body,e)]);var r=Zt.makeSpan(["fix"],[]),i=Zt.makeSpan([t.alignment],[n,r],e),o=Zt.makeSpan(["strut"]);return o.style.height=$(i.height+i.depth),i.depth&&(o.style.verticalAlign=$(-i.depth)),i.children.unshift(o),i=Zt.makeSpan(["thinbox"],[i],e),Zt.makeSpan(["mord","vbox"],[i],e)},mathmlBuilder:function(t,e){var n=new Ce.MathNode("mpadded",[Ne(t.body,e)]);if("rlap"!==t.alignment){var r="llap"===t.alignment?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}}),ae({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(t,e){var n=t.funcName,r=t.parser,i=r.mode;r.switchMode("math");var o="\\("===n?"\\)":"$",a=r.parseExpression(!1,o);return r.expect(o),r.switchMode(i),{type:"styling",mode:r.mode,style:"text",body:a}}}),ae({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(t,e){throw new r("Mismatched "+t.funcName)}});var cr=function(t,e){switch(e.style.size){case O.DISPLAY.size:return t.display;case O.TEXT.size:return t.text;case O.SCRIPT.size:return t.script;case O.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}};ae({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:function(t,e){return{type:"mathchoice",mode:t.parser.mode,display:ce(e[0]),text:ce(e[1]),script:ce(e[2]),scriptscript:ce(e[3])}},htmlBuilder:function(t,e){var n=cr(t,e),r=ge(n,e,!1);return Zt.makeFragment(r)},mathmlBuilder:function(t,e){var n=cr(t,e);return je(n,e)}});var lr=function(t,e,n,r,i,o,a){t=Zt.makeSpan([],[t]);var s,c,l,h=n&&u.isCharacterBox(n);if(e){var f=we(e,r.havingStyle(i.sup()),r);c={elem:f,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-f.depth)}}if(n){var d=we(n,r.havingStyle(i.sub()),r);s={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}if(c&&s){var p=r.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+t.depth+a;l=Zt.makeVList({positionType:"bottom",positionData:p,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:$(-o)},{type:"kern",size:s.kern},{type:"elem",elem:t},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:$(o)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(s){var g=t.height-a;l=Zt.makeVList({positionType:"top",positionData:g,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:$(-o)},{type:"kern",size:s.kern},{type:"elem",elem:t}]},r)}else{if(!c)return t;var m=t.depth+a;l=Zt.makeVList({positionType:"bottom",positionData:m,children:[{type:"elem",elem:t},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:$(o)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}var v=[l];if(s&&0!==o&&!h){var y=Zt.makeSpan(["mspace"],[],r);y.style.marginRight=$(o),v.unshift(y)}return Zt.makeSpan(["mop","op-limits"],v,r)},hr=["\\smallint"],fr=function(t,e){var n,r,i,o=!1;"supsub"===t.type?(n=t.sup,r=t.sub,i=ze(t.base,"op"),o=!0):i=ze(t,"op");var a,s=e.style,c=!1;if(s.size===O.DISPLAY.size&&i.symbol&&!u.contains(hr,i.name)&&(c=!0),i.symbol){var l=c?"Size2-Regular":"Size1-Regular",h="";if("\\oiint"!==i.name&&"\\oiiint"!==i.name||(h=i.name.substr(1),i.name="oiint"===h?"\\iint":"\\iiint"),a=Zt.makeSymbol(i.name,l,"math",e,["mop","op-symbol",c?"large-op":"small-op"]),h.length>0){var f=a.italic,d=Zt.staticSvg(h+"Size"+(c?"2":"1"),e);a=Zt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:0},{type:"elem",elem:d,shift:c?.08:0}]},e),i.name="\\"+h,a.classes.unshift("mop"),a.italic=f}}else if(i.body){var p=ge(i.body,e,!0);1===p.length&&p[0]instanceof G?(a=p[0]).classes[0]="mop":a=Zt.makeSpan(["mop"],p,e)}else{for(var g=[],m=1;m0){for(var s=i.body.map((function(t){var e=t.text;return"string"===typeof e?{type:"textord",mode:t.mode,text:e}:t})),u=ge(s,e.withFont("mathrm"),!0),c=0;c=0?s.setAttribute("height",$(i)):(s.setAttribute("height",$(i)),s.setAttribute("depth",$(-i))),s.setAttribute("voffset",$(i)),s}});var yr=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];ae({type:"sizing",names:yr,props:{numArgs:0,allowedInText:!0},handler:function(t,e){var n=t.breakOnTokenText,r=t.funcName,i=t.parser,o=i.parseExpression(!1,n);return{type:"sizing",mode:i.mode,size:yr.indexOf(r)+1,body:o}},htmlBuilder:function(t,e){var n=e.havingSize(t.size);return vr(t.body,n,e)},mathmlBuilder:function(t,e){var n=e.havingSize(t.size),r=Me(t.body,n),i=new Ce.MathNode("mstyle",r);return i.setAttribute("mathsize",$(n.sizeMultiplier)),i}}),ae({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(t,e,n){var r=t.parser,i=!1,o=!1,a=n[0]&&ze(n[0],"ordgroup");if(a)for(var s="",u=0;un.height+n.depth+o&&(o=(o+h-n.height-n.depth)/2);var f=u.height-n.height-o-c;n.style.paddingLeft=$(l);var d=Zt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+f)},{type:"elem",elem:u},{type:"kern",size:c}]},e);if(t.index){var p=e.havingStyle(O.SCRIPTSCRIPT),g=we(t.index,p,e),m=.6*(d.height-d.depth),v=Zt.makeVList({positionType:"shift",positionData:-m,children:[{type:"elem",elem:g}]},e),y=Zt.makeSpan(["root"],[v]);return Zt.makeSpan(["mord","sqrt"],[y,d],e)}return Zt.makeSpan(["mord","sqrt"],[d],e)},mathmlBuilder:function(t,e){var n=t.body,r=t.index;return r?new Ce.MathNode("mroot",[Ne(n,e),Ne(r,e)]):new Ce.MathNode("msqrt",[Ne(n,e)])}});var br={display:O.DISPLAY,text:O.TEXT,script:O.SCRIPT,scriptscript:O.SCRIPTSCRIPT};ae({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(t,e){var n=t.breakOnTokenText,r=t.funcName,i=t.parser,o=i.parseExpression(!0,n),a=r.slice(1,r.length-5);return{type:"styling",mode:i.mode,style:a,body:o}},htmlBuilder:function(t,e){var n=br[t.style],r=e.havingStyle(n).withFont("");return vr(t.body,r,e)},mathmlBuilder:function(t,e){var n=br[t.style],r=e.havingStyle(n),i=Me(t.body,r),o=new Ce.MathNode("mstyle",i),a={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[t.style];return o.setAttribute("scriptlevel",a[0]),o.setAttribute("displaystyle",a[1]),o}});var Or=function(t,e){var n=t.base;return n?"op"===n.type?n.limits&&(e.style.size===O.DISPLAY.size||n.alwaysHandleSupSub)?fr:null:"operatorname"===n.type?n.alwaysHandleSupSub&&(e.style.size===O.DISPLAY.size||n.limits)?mr:null:"accent"===n.type?u.isCharacterBox(n.base)?Ve:null:"horizBrace"===n.type&&!t.sub===n.isOver?sr:null:null};se({type:"supsub",htmlBuilder:function(t,e){var n=Or(t,e);if(n)return n(t,e);var r,i,o,a=t.base,s=t.sup,c=t.sub,l=we(a,e),h=e.fontMetrics(),f=0,d=0,p=a&&u.isCharacterBox(a);if(s){var g=e.havingStyle(e.style.sup());r=we(s,g,e),p||(f=l.height-g.fontMetrics().supDrop*g.sizeMultiplier/e.sizeMultiplier)}if(c){var m=e.havingStyle(e.style.sub());i=we(c,m,e),p||(d=l.depth+m.fontMetrics().subDrop*m.sizeMultiplier/e.sizeMultiplier)}o=e.style===O.DISPLAY?h.sup1:e.style.cramped?h.sup3:h.sup2;var v,y=e.sizeMultiplier,b=$(.5/h.ptPerEm/y),w=null;if(i){var k=t.base&&"op"===t.base.type&&t.base.name&&("\\oiint"===t.base.name||"\\oiiint"===t.base.name);(l instanceof G||k)&&(w=$(-l.italic))}if(r&&i){f=Math.max(f,o,r.depth+.25*h.xHeight),d=Math.max(d,h.sub2);var x=4*h.defaultRuleThickness;if(f-r.depth-(i.height-d)0&&(f+=_,d-=_)}var S=[{type:"elem",elem:i,shift:d,marginRight:b,marginLeft:w},{type:"elem",elem:r,shift:-f,marginRight:b}];v=Zt.makeVList({positionType:"individualShift",children:S},e)}else if(i){d=Math.max(d,h.sub1,i.height-.8*h.xHeight);var E=[{type:"elem",elem:i,marginLeft:w,marginRight:b}];v=Zt.makeVList({positionType:"shift",positionData:d,children:E},e)}else{if(!r)throw new Error("supsub must have either sup or sub.");f=Math.max(f,o,r.depth+.25*h.xHeight),v=Zt.makeVList({positionType:"shift",positionData:-f,children:[{type:"elem",elem:r,marginRight:b}]},e)}var C=be(l,"right")||"mord";return Zt.makeSpan([C],[l,Zt.makeSpan(["msupsub"],[v])],e)},mathmlBuilder:function(t,e){var n,r=!1;t.base&&"horizBrace"===t.base.type&&!!t.sup===t.base.isOver&&(r=!0,n=t.base.isOver),!t.base||"op"!==t.base.type&&"operatorname"!==t.base.type||(t.base.parentIsSupSub=!0);var i,o=[Ne(t.base,e)];if(t.sub&&o.push(Ne(t.sub,e)),t.sup&&o.push(Ne(t.sup,e)),r)i=n?"mover":"munder";else if(t.sub)if(t.sup){var a=t.base;i=a&&"op"===a.type&&a.limits&&e.style===O.DISPLAY||a&&"operatorname"===a.type&&a.alwaysHandleSupSub&&(e.style===O.DISPLAY||a.limits)?"munderover":"msubsup"}else{var s=t.base;i=s&&"op"===s.type&&s.limits&&(e.style===O.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||e.style===O.DISPLAY)?"munder":"msub"}else{var u=t.base;i=u&&"op"===u.type&&u.limits&&(e.style===O.DISPLAY||u.alwaysHandleSupSub)||u&&"operatorname"===u.type&&u.alwaysHandleSupSub&&(u.limits||e.style===O.DISPLAY)?"mover":"msup"}return new Ce.MathNode(i,o)}}),se({type:"atom",htmlBuilder:function(t,e){return Zt.mathsym(t.text,t.mode,e,["m"+t.family])},mathmlBuilder:function(t,e){var n=new Ce.MathNode("mo",[Te(t.text,t.mode)]);if("bin"===t.family){var r=De(t,e);"bold-italic"===r&&n.setAttribute("mathvariant",r)}else"punct"===t.family?n.setAttribute("separator","true"):"open"!==t.family&&"close"!==t.family||n.setAttribute("stretchy","false");return n}});var wr={mi:"italic",mn:"normal",mtext:"normal"};se({type:"mathord",htmlBuilder:function(t,e){return Zt.makeOrd(t,e,"mathord")},mathmlBuilder:function(t,e){var n=new Ce.MathNode("mi",[Te(t.text,t.mode,e)]),r=De(t,e)||"italic";return r!==wr[n.type]&&n.setAttribute("mathvariant",r),n}}),se({type:"textord",htmlBuilder:function(t,e){return Zt.makeOrd(t,e,"textord")},mathmlBuilder:function(t,e){var n,r=Te(t.text,t.mode,e),i=De(t,e)||"normal";return n="text"===t.mode?new Ce.MathNode("mtext",[r]):/[0-9]/.test(t.text)?new Ce.MathNode("mn",[r]):"\\prime"===t.text?new Ce.MathNode("mo",[r]):new Ce.MathNode("mi",[r]),i!==wr[n.type]&&n.setAttribute("mathvariant",i),n}});var kr={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},xr={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};se({type:"spacing",htmlBuilder:function(t,e){if(xr.hasOwnProperty(t.text)){var n=xr[t.text].className||"";if("text"===t.mode){var i=Zt.makeOrd(t,e,"textord");return i.classes.push(n),i}return Zt.makeSpan(["mspace",n],[Zt.mathsym(t.text,t.mode,e)],e)}if(kr.hasOwnProperty(t.text))return Zt.makeSpan(["mspace",kr[t.text]],[],e);throw new r('Unknown type of space "'+t.text+'"')},mathmlBuilder:function(t,e){if(!xr.hasOwnProperty(t.text)){if(kr.hasOwnProperty(t.text))return new Ce.MathNode("mspace");throw new r('Unknown type of space "'+t.text+'"')}return new Ce.MathNode("mtext",[new Ce.TextNode("\xa0")])}});var _r=function(){var t=new Ce.MathNode("mtd",[]);return t.setAttribute("width","50%"),t};se({type:"tag",mathmlBuilder:function(t,e){var n=new Ce.MathNode("mtable",[new Ce.MathNode("mtr",[_r(),new Ce.MathNode("mtd",[je(t.body,e)]),_r(),new Ce.MathNode("mtd",[je(t.tag,e)])])]);return n.setAttribute("width","100%"),n}});var Sr={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Er={"\\textbf":"textbf","\\textmd":"textmd"},Cr={"\\textit":"textit","\\textup":"textup"},Tr=function(t,e){var n=t.font;return n?Sr[n]?e.withTextFontFamily(Sr[n]):Er[n]?e.withTextFontWeight(Er[n]):e.withTextFontShape(Cr[n]):e};ae({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler:function(t,e){var n=t.parser,r=t.funcName,i=e[0];return{type:"text",mode:n.mode,body:ce(i),font:r}},htmlBuilder:function(t,e){var n=Tr(t,e),r=ge(t.body,n,!0);return Zt.makeSpan(["mord","text"],r,n)},mathmlBuilder:function(t,e){var n=Tr(t,e);return je(t.body,n)}}),ae({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(t,e){return{type:"underline",mode:t.parser.mode,body:e[0]}},htmlBuilder:function(t,e){var n=we(t.body,e),r=Zt.makeLineSpan("underline-line",e),i=e.fontMetrics().defaultRuleThickness,o=Zt.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:i},{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n}]},e);return Zt.makeSpan(["mord","underline"],[o],e)},mathmlBuilder:function(t,e){var n=new Ce.MathNode("mo",[new Ce.TextNode("\u203e")]);n.setAttribute("stretchy","true");var r=new Ce.MathNode("munder",[Ne(t.body,e),n]);return r.setAttribute("accentunder","true"),r}}),ae({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler:function(t,e){return{type:"vcenter",mode:t.parser.mode,body:e[0]}},htmlBuilder:function(t,e){var n=we(t.body,e),r=e.fontMetrics().axisHeight,i=.5*(n.height-r-(n.depth+r));return Zt.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:n}]},e)},mathmlBuilder:function(t,e){return new Ce.MathNode("mpadded",[Ne(t.body,e)],["vcenter"])}}),ae({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(t,e,n){throw new r("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(t,e){for(var n=Ar(t),r=[],i=e.havingStyle(e.style.text()),o=0;o0;)this.endGroup()},e.has=function(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)},e.get=function(t){return this.current.hasOwnProperty(t)?this.current[t]:this.builtins[t]},e.set=function(t,e,n){if(void 0===n&&(n=!1),n){for(var r=0;r0&&(this.undefStack[this.undefStack.length-1][t]=e)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(t)&&(i[t]=this.current[t])}null==e?delete this.current[t]:this.current[t]=e},t}(),Pr=Rn;Ln("\\noexpand",(function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}})),Ln("\\expandafter",(function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}})),Ln("\\@firstoftwo",(function(t){return{tokens:t.consumeArgs(2)[0],numArgs:0}})),Ln("\\@secondoftwo",(function(t){return{tokens:t.consumeArgs(2)[1],numArgs:0}})),Ln("\\@ifnextchar",(function(t){var e=t.consumeArgs(3);t.consumeSpaces();var n=t.future();return 1===e[0].length&&e[0][0].text===n.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}})),Ln("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Ln("\\TextOrMath",(function(t){var e=t.consumeArgs(2);return"text"===t.mode?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}}));var Rr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Ln("\\char",(function(t){var e,n=t.popToken(),i="";if("'"===n.text)e=8,n=t.popToken();else if('"'===n.text)e=16,n=t.popToken();else if("`"===n.text)if("\\"===(n=t.popToken()).text[0])i=n.text.charCodeAt(1);else{if("EOF"===n.text)throw new r("\\char` missing argument");i=n.text.charCodeAt(0)}else e=10;if(e){if(null==(i=Rr[n.text])||i>=e)throw new r("Invalid base-"+e+" digit "+n.text);for(var o;null!=(o=Rr[t.future().text])&&o":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};Ln("\\dots",(function(t){var e="\\dotso",n=t.expandAfterFuture().text;return n in Fr?e=Fr[n]:("\\not"===n.substr(0,4)||n in it.math&&u.contains(["bin","rel"],it.math[n].group))&&(e="\\dotsb"),e}));var Br={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Ln("\\dotso",(function(t){return t.future().text in Br?"\\ldots\\,":"\\ldots"})),Ln("\\dotsc",(function(t){var e=t.future().text;return e in Br&&","!==e?"\\ldots\\,":"\\ldots"})),Ln("\\cdots",(function(t){return t.future().text in Br?"\\@cdots\\,":"\\@cdots"})),Ln("\\dotsb","\\cdots"),Ln("\\dotsm","\\cdots"),Ln("\\dotsi","\\!\\cdots"),Ln("\\dotsx","\\ldots\\,"),Ln("\\DOTSI","\\relax"),Ln("\\DOTSB","\\relax"),Ln("\\DOTSX","\\relax"),Ln("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Ln("\\,","\\tmspace+{3mu}{.1667em}"),Ln("\\thinspace","\\,"),Ln("\\>","\\mskip{4mu}"),Ln("\\:","\\tmspace+{4mu}{.2222em}"),Ln("\\medspace","\\:"),Ln("\\;","\\tmspace+{5mu}{.2777em}"),Ln("\\thickspace","\\;"),Ln("\\!","\\tmspace-{3mu}{.1667em}"),Ln("\\negthinspace","\\!"),Ln("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Ln("\\negthickspace","\\tmspace-{5mu}{.277em}"),Ln("\\enspace","\\kern.5em "),Ln("\\enskip","\\hskip.5em\\relax"),Ln("\\quad","\\hskip1em\\relax"),Ln("\\qquad","\\hskip2em\\relax"),Ln("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Ln("\\tag@paren","\\tag@literal{({#1})}"),Ln("\\tag@literal",(function(t){if(t.macros.get("\\df@tag"))throw new r("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),Ln("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Ln("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Ln("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Ln("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Ln("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),Ln("\\newline","\\\\\\relax"),Ln("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Ir=$(C["Main-Regular"]["T".charCodeAt(0)][1]-.7*C["Main-Regular"]["A".charCodeAt(0)][1]);Ln("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+Ir+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Ln("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Ir+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Ln("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Ln("\\@hspace","\\hskip #1\\relax"),Ln("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Ln("\\ordinarycolon",":"),Ln("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Ln("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Ln("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Ln("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Ln("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Ln("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Ln("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Ln("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Ln("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Ln("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Ln("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Ln("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Ln("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Ln("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Ln("\u2237","\\dblcolon"),Ln("\u2239","\\eqcolon"),Ln("\u2254","\\coloneqq"),Ln("\u2255","\\eqqcolon"),Ln("\u2a74","\\Coloneqq"),Ln("\\ratio","\\vcentcolon"),Ln("\\coloncolon","\\dblcolon"),Ln("\\colonequals","\\coloneqq"),Ln("\\coloncolonequals","\\Coloneqq"),Ln("\\equalscolon","\\eqqcolon"),Ln("\\equalscoloncolon","\\Eqqcolon"),Ln("\\colonminus","\\coloneq"),Ln("\\coloncolonminus","\\Coloneq"),Ln("\\minuscolon","\\eqcolon"),Ln("\\minuscoloncolon","\\Eqcolon"),Ln("\\coloncolonapprox","\\Colonapprox"),Ln("\\coloncolonsim","\\Colonsim"),Ln("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Ln("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Ln("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Ln("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Ln("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220c}}"),Ln("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Ln("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Ln("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Ln("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Ln("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Ln("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Ln("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Ln("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Ln("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),Ln("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),Ln("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),Ln("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),Ln("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),Ln("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),Ln("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),Ln("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),Ln("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),Ln("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),Ln("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228a}"),Ln("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2acb}"),Ln("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228b}"),Ln("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2acc}"),Ln("\\imath","\\html@mathml{\\@imath}{\u0131}"),Ln("\\jmath","\\html@mathml{\\@jmath}{\u0237}"),Ln("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27e6}}"),Ln("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27e7}}"),Ln("\u27e6","\\llbracket"),Ln("\u27e7","\\rrbracket"),Ln("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),Ln("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),Ln("\u2983","\\lBrace"),Ln("\u2984","\\rBrace"),Ln("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29b5}}"),Ln("\u29b5","\\minuso"),Ln("\\darr","\\downarrow"),Ln("\\dArr","\\Downarrow"),Ln("\\Darr","\\Downarrow"),Ln("\\lang","\\langle"),Ln("\\rang","\\rangle"),Ln("\\uarr","\\uparrow"),Ln("\\uArr","\\Uparrow"),Ln("\\Uarr","\\Uparrow"),Ln("\\N","\\mathbb{N}"),Ln("\\R","\\mathbb{R}"),Ln("\\Z","\\mathbb{Z}"),Ln("\\alef","\\aleph"),Ln("\\alefsym","\\aleph"),Ln("\\Alpha","\\mathrm{A}"),Ln("\\Beta","\\mathrm{B}"),Ln("\\bull","\\bullet"),Ln("\\Chi","\\mathrm{X}"),Ln("\\clubs","\\clubsuit"),Ln("\\cnums","\\mathbb{C}"),Ln("\\Complex","\\mathbb{C}"),Ln("\\Dagger","\\ddagger"),Ln("\\diamonds","\\diamondsuit"),Ln("\\empty","\\emptyset"),Ln("\\Epsilon","\\mathrm{E}"),Ln("\\Eta","\\mathrm{H}"),Ln("\\exist","\\exists"),Ln("\\harr","\\leftrightarrow"),Ln("\\hArr","\\Leftrightarrow"),Ln("\\Harr","\\Leftrightarrow"),Ln("\\hearts","\\heartsuit"),Ln("\\image","\\Im"),Ln("\\infin","\\infty"),Ln("\\Iota","\\mathrm{I}"),Ln("\\isin","\\in"),Ln("\\Kappa","\\mathrm{K}"),Ln("\\larr","\\leftarrow"),Ln("\\lArr","\\Leftarrow"),Ln("\\Larr","\\Leftarrow"),Ln("\\lrarr","\\leftrightarrow"),Ln("\\lrArr","\\Leftrightarrow"),Ln("\\Lrarr","\\Leftrightarrow"),Ln("\\Mu","\\mathrm{M}"),Ln("\\natnums","\\mathbb{N}"),Ln("\\Nu","\\mathrm{N}"),Ln("\\Omicron","\\mathrm{O}"),Ln("\\plusmn","\\pm"),Ln("\\rarr","\\rightarrow"),Ln("\\rArr","\\Rightarrow"),Ln("\\Rarr","\\Rightarrow"),Ln("\\real","\\Re"),Ln("\\reals","\\mathbb{R}"),Ln("\\Reals","\\mathbb{R}"),Ln("\\Rho","\\mathrm{P}"),Ln("\\sdot","\\cdot"),Ln("\\sect","\\S"),Ln("\\spades","\\spadesuit"),Ln("\\sub","\\subset"),Ln("\\sube","\\subseteq"),Ln("\\supe","\\supseteq"),Ln("\\Tau","\\mathrm{T}"),Ln("\\thetasym","\\vartheta"),Ln("\\weierp","\\wp"),Ln("\\Zeta","\\mathrm{Z}"),Ln("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Ln("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Ln("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Ln("\\bra","\\mathinner{\\langle{#1}|}"),Ln("\\ket","\\mathinner{|{#1}\\rangle}"),Ln("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Ln("\\Bra","\\left\\langle#1\\right|"),Ln("\\Ket","\\left|#1\\right\\rangle"),Ln("\\angln","{\\angl n}"),Ln("\\blue","\\textcolor{##6495ed}{#1}"),Ln("\\orange","\\textcolor{##ffa500}{#1}"),Ln("\\pink","\\textcolor{##ff00af}{#1}"),Ln("\\red","\\textcolor{##df0030}{#1}"),Ln("\\green","\\textcolor{##28ae7b}{#1}"),Ln("\\gray","\\textcolor{gray}{#1}"),Ln("\\purple","\\textcolor{##9d38bd}{#1}"),Ln("\\blueA","\\textcolor{##ccfaff}{#1}"),Ln("\\blueB","\\textcolor{##80f6ff}{#1}"),Ln("\\blueC","\\textcolor{##63d9ea}{#1}"),Ln("\\blueD","\\textcolor{##11accd}{#1}"),Ln("\\blueE","\\textcolor{##0c7f99}{#1}"),Ln("\\tealA","\\textcolor{##94fff5}{#1}"),Ln("\\tealB","\\textcolor{##26edd5}{#1}"),Ln("\\tealC","\\textcolor{##01d1c1}{#1}"),Ln("\\tealD","\\textcolor{##01a995}{#1}"),Ln("\\tealE","\\textcolor{##208170}{#1}"),Ln("\\greenA","\\textcolor{##b6ffb0}{#1}"),Ln("\\greenB","\\textcolor{##8af281}{#1}"),Ln("\\greenC","\\textcolor{##74cf70}{#1}"),Ln("\\greenD","\\textcolor{##1fab54}{#1}"),Ln("\\greenE","\\textcolor{##0d923f}{#1}"),Ln("\\goldA","\\textcolor{##ffd0a9}{#1}"),Ln("\\goldB","\\textcolor{##ffbb71}{#1}"),Ln("\\goldC","\\textcolor{##ff9c39}{#1}"),Ln("\\goldD","\\textcolor{##e07d10}{#1}"),Ln("\\goldE","\\textcolor{##a75a05}{#1}"),Ln("\\redA","\\textcolor{##fca9a9}{#1}"),Ln("\\redB","\\textcolor{##ff8482}{#1}"),Ln("\\redC","\\textcolor{##f9685d}{#1}"),Ln("\\redD","\\textcolor{##e84d39}{#1}"),Ln("\\redE","\\textcolor{##bc2612}{#1}"),Ln("\\maroonA","\\textcolor{##ffbde0}{#1}"),Ln("\\maroonB","\\textcolor{##ff92c6}{#1}"),Ln("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Ln("\\maroonD","\\textcolor{##ca337c}{#1}"),Ln("\\maroonE","\\textcolor{##9e034e}{#1}"),Ln("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Ln("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Ln("\\purpleC","\\textcolor{##aa87ff}{#1}"),Ln("\\purpleD","\\textcolor{##7854ab}{#1}"),Ln("\\purpleE","\\textcolor{##543b78}{#1}"),Ln("\\mintA","\\textcolor{##f5f9e8}{#1}"),Ln("\\mintB","\\textcolor{##edf2df}{#1}"),Ln("\\mintC","\\textcolor{##e0e5cc}{#1}"),Ln("\\grayA","\\textcolor{##f6f7f7}{#1}"),Ln("\\grayB","\\textcolor{##f0f1f2}{#1}"),Ln("\\grayC","\\textcolor{##e3e5e6}{#1}"),Ln("\\grayD","\\textcolor{##d6d8da}{#1}"),Ln("\\grayE","\\textcolor{##babec2}{#1}"),Ln("\\grayF","\\textcolor{##888d93}{#1}"),Ln("\\grayG","\\textcolor{##626569}{#1}"),Ln("\\grayH","\\textcolor{##3b3e40}{#1}"),Ln("\\grayI","\\textcolor{##21242c}{#1}"),Ln("\\kaBlue","\\textcolor{##314453}{#1}"),Ln("\\kaGreen","\\textcolor{##71B307}{#1}");var Qr={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},$r=function(){function t(t,e,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=e,this.expansionCount=0,this.feed(t),this.macros=new Nr(Pr,e.macros),this.mode=n,this.stack=[]}var e=t.prototype;return e.feed=function(t){this.lexer=new jr(t,this.settings)},e.switchMode=function(t){this.mode=t},e.beginGroup=function(){this.macros.beginGroup()},e.endGroup=function(){this.macros.endGroup()},e.endGroups=function(){this.macros.endGroups()},e.future=function(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]},e.popToken=function(){return this.future(),this.stack.pop()},e.pushToken=function(t){this.stack.push(t)},e.pushTokens=function(t){var e;(e=this.stack).push.apply(e,t)},e.scanArgument=function(t){var e,n,r;if(t){if(this.consumeSpaces(),"["!==this.future().text)return null;e=this.popToken();var i=this.consumeArg(["]"]);r=i.tokens,n=i.end}else{var o=this.consumeArg();r=o.tokens,e=o.start,n=o.end}return this.pushToken(new Bn("EOF",n.loc)),this.pushTokens(r),e.range(n,"")},e.consumeSpaces=function(){for(;" "===this.future().text;)this.stack.pop()},e.consumeArg=function(t){var e=[],n=t&&t.length>0;n||this.consumeSpaces();var i,o=this.future(),a=0,s=0;do{if(i=this.popToken(),e.push(i),"{"===i.text)++a;else if("}"===i.text){if(-1===--a)throw new r("Extra }",i)}else if("EOF"===i.text)throw new r("Unexpected end of input in a macro argument, expected '"+(t&&n?t[s]:"}")+"'",i);if(t&&n)if((0===a||1===a&&"{"===t[s])&&i.text===t[s]){if(++s===t.length){e.splice(-s,s);break}}else s=0}while(0!==a||n);return"{"===o.text&&"}"===e[e.length-1].text&&(e.pop(),e.shift()),e.reverse(),{tokens:e,start:o,end:i}},e.consumeArgs=function(t,e){if(e){if(e.length!==t+1)throw new r("The length of delimiters doesn't match the number of args!");for(var n=e[0],i=0;ithis.settings.maxExpand)throw new r("Too many expansions: infinite loop or need to increase maxExpand setting");var o=i.tokens,a=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs)for(var s=(o=o.slice()).length-1;s>=0;--s){var u=o[s];if("#"===u.text){if(0===s)throw new r("Incomplete placeholder at end of macro body",u);if("#"===(u=o[--s]).text)o.splice(s+1,1);else{if(!/^[1-9]$/.test(u.text))throw new r("Not a valid argument number",u);var c;(c=o).splice.apply(c,[s,2].concat(a[+u.text-1]))}}}return this.pushTokens(o),o},e.expandAfterFuture=function(){return this.expandOnce(),this.future()},e.expandNextToken=function(){for(;;){var t=this.expandOnce();if(t instanceof Bn)return t.treatAsRelax&&(t.text="\\relax"),this.stack.pop()}throw new Error},e.expandMacro=function(t){return this.macros.has(t)?this.expandTokens([new Bn(t)]):void 0},e.expandTokens=function(t){var e=[],n=this.stack.length;for(this.pushTokens(t);this.stack.length>n;){var r=this.expandOnce(!0);r instanceof Bn&&(r.treatAsRelax&&(r.noexpand=!1,r.treatAsRelax=!1),e.push(this.stack.pop()))}return e},e.expandMacroAsText=function(t){var e=this.expandMacro(t);return e?e.map((function(t){return t.text})).join(""):e},e._getExpansion=function(t){var e=this.macros.get(t);if(null==e)return e;if(1===t.length){var n=this.lexer.catcodes[t];if(null!=n&&13!==n)return}var r="function"===typeof e?e(this):e;if("string"===typeof r){var i=0;if(-1!==r.indexOf("#"))for(var o=r.replace(/##/g,"");-1!==o.indexOf("#"+(i+1));)++i;for(var a=new jr(r,this.settings),s=[],u=a.lex();"EOF"!==u.text;)s.push(u),u=a.lex();return s.reverse(),{tokens:s,numArgs:i}}return r},e.isDefined=function(t){return this.macros.has(t)||Dr.hasOwnProperty(t)||it.math.hasOwnProperty(t)||it.text.hasOwnProperty(t)||Qr.hasOwnProperty(t)},e.isExpandable=function(t){var e=this.macros.get(t);return null!=e?"string"===typeof e||"function"===typeof e||!e.unexpandable:Dr.hasOwnProperty(t)&&!Dr[t].primitive},t}(),zr={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030c":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030a":{text:"\\r",math:"\\mathring"},"\u030b":{text:"\\H"},"\u0327":{text:"\\c"}},qr={"\xe1":"a\u0301","\xe0":"a\u0300","\xe4":"a\u0308","\u01df":"a\u0308\u0304","\xe3":"a\u0303","\u0101":"a\u0304","\u0103":"a\u0306","\u1eaf":"a\u0306\u0301","\u1eb1":"a\u0306\u0300","\u1eb5":"a\u0306\u0303","\u01ce":"a\u030c","\xe2":"a\u0302","\u1ea5":"a\u0302\u0301","\u1ea7":"a\u0302\u0300","\u1eab":"a\u0302\u0303","\u0227":"a\u0307","\u01e1":"a\u0307\u0304","\xe5":"a\u030a","\u01fb":"a\u030a\u0301","\u1e03":"b\u0307","\u0107":"c\u0301","\u1e09":"c\u0327\u0301","\u010d":"c\u030c","\u0109":"c\u0302","\u010b":"c\u0307","\xe7":"c\u0327","\u010f":"d\u030c","\u1e0b":"d\u0307","\u1e11":"d\u0327","\xe9":"e\u0301","\xe8":"e\u0300","\xeb":"e\u0308","\u1ebd":"e\u0303","\u0113":"e\u0304","\u1e17":"e\u0304\u0301","\u1e15":"e\u0304\u0300","\u0115":"e\u0306","\u1e1d":"e\u0327\u0306","\u011b":"e\u030c","\xea":"e\u0302","\u1ebf":"e\u0302\u0301","\u1ec1":"e\u0302\u0300","\u1ec5":"e\u0302\u0303","\u0117":"e\u0307","\u0229":"e\u0327","\u1e1f":"f\u0307","\u01f5":"g\u0301","\u1e21":"g\u0304","\u011f":"g\u0306","\u01e7":"g\u030c","\u011d":"g\u0302","\u0121":"g\u0307","\u0123":"g\u0327","\u1e27":"h\u0308","\u021f":"h\u030c","\u0125":"h\u0302","\u1e23":"h\u0307","\u1e29":"h\u0327","\xed":"i\u0301","\xec":"i\u0300","\xef":"i\u0308","\u1e2f":"i\u0308\u0301","\u0129":"i\u0303","\u012b":"i\u0304","\u012d":"i\u0306","\u01d0":"i\u030c","\xee":"i\u0302","\u01f0":"j\u030c","\u0135":"j\u0302","\u1e31":"k\u0301","\u01e9":"k\u030c","\u0137":"k\u0327","\u013a":"l\u0301","\u013e":"l\u030c","\u013c":"l\u0327","\u1e3f":"m\u0301","\u1e41":"m\u0307","\u0144":"n\u0301","\u01f9":"n\u0300","\xf1":"n\u0303","\u0148":"n\u030c","\u1e45":"n\u0307","\u0146":"n\u0327","\xf3":"o\u0301","\xf2":"o\u0300","\xf6":"o\u0308","\u022b":"o\u0308\u0304","\xf5":"o\u0303","\u1e4d":"o\u0303\u0301","\u1e4f":"o\u0303\u0308","\u022d":"o\u0303\u0304","\u014d":"o\u0304","\u1e53":"o\u0304\u0301","\u1e51":"o\u0304\u0300","\u014f":"o\u0306","\u01d2":"o\u030c","\xf4":"o\u0302","\u1ed1":"o\u0302\u0301","\u1ed3":"o\u0302\u0300","\u1ed7":"o\u0302\u0303","\u022f":"o\u0307","\u0231":"o\u0307\u0304","\u0151":"o\u030b","\u1e55":"p\u0301","\u1e57":"p\u0307","\u0155":"r\u0301","\u0159":"r\u030c","\u1e59":"r\u0307","\u0157":"r\u0327","\u015b":"s\u0301","\u1e65":"s\u0301\u0307","\u0161":"s\u030c","\u1e67":"s\u030c\u0307","\u015d":"s\u0302","\u1e61":"s\u0307","\u015f":"s\u0327","\u1e97":"t\u0308","\u0165":"t\u030c","\u1e6b":"t\u0307","\u0163":"t\u0327","\xfa":"u\u0301","\xf9":"u\u0300","\xfc":"u\u0308","\u01d8":"u\u0308\u0301","\u01dc":"u\u0308\u0300","\u01d6":"u\u0308\u0304","\u01da":"u\u0308\u030c","\u0169":"u\u0303","\u1e79":"u\u0303\u0301","\u016b":"u\u0304","\u1e7b":"u\u0304\u0308","\u016d":"u\u0306","\u01d4":"u\u030c","\xfb":"u\u0302","\u016f":"u\u030a","\u0171":"u\u030b","\u1e7d":"v\u0303","\u1e83":"w\u0301","\u1e81":"w\u0300","\u1e85":"w\u0308","\u0175":"w\u0302","\u1e87":"w\u0307","\u1e98":"w\u030a","\u1e8d":"x\u0308","\u1e8b":"x\u0307","\xfd":"y\u0301","\u1ef3":"y\u0300","\xff":"y\u0308","\u1ef9":"y\u0303","\u0233":"y\u0304","\u0177":"y\u0302","\u1e8f":"y\u0307","\u1e99":"y\u030a","\u017a":"z\u0301","\u017e":"z\u030c","\u1e91":"z\u0302","\u017c":"z\u0307","\xc1":"A\u0301","\xc0":"A\u0300","\xc4":"A\u0308","\u01de":"A\u0308\u0304","\xc3":"A\u0303","\u0100":"A\u0304","\u0102":"A\u0306","\u1eae":"A\u0306\u0301","\u1eb0":"A\u0306\u0300","\u1eb4":"A\u0306\u0303","\u01cd":"A\u030c","\xc2":"A\u0302","\u1ea4":"A\u0302\u0301","\u1ea6":"A\u0302\u0300","\u1eaa":"A\u0302\u0303","\u0226":"A\u0307","\u01e0":"A\u0307\u0304","\xc5":"A\u030a","\u01fa":"A\u030a\u0301","\u1e02":"B\u0307","\u0106":"C\u0301","\u1e08":"C\u0327\u0301","\u010c":"C\u030c","\u0108":"C\u0302","\u010a":"C\u0307","\xc7":"C\u0327","\u010e":"D\u030c","\u1e0a":"D\u0307","\u1e10":"D\u0327","\xc9":"E\u0301","\xc8":"E\u0300","\xcb":"E\u0308","\u1ebc":"E\u0303","\u0112":"E\u0304","\u1e16":"E\u0304\u0301","\u1e14":"E\u0304\u0300","\u0114":"E\u0306","\u1e1c":"E\u0327\u0306","\u011a":"E\u030c","\xca":"E\u0302","\u1ebe":"E\u0302\u0301","\u1ec0":"E\u0302\u0300","\u1ec4":"E\u0302\u0303","\u0116":"E\u0307","\u0228":"E\u0327","\u1e1e":"F\u0307","\u01f4":"G\u0301","\u1e20":"G\u0304","\u011e":"G\u0306","\u01e6":"G\u030c","\u011c":"G\u0302","\u0120":"G\u0307","\u0122":"G\u0327","\u1e26":"H\u0308","\u021e":"H\u030c","\u0124":"H\u0302","\u1e22":"H\u0307","\u1e28":"H\u0327","\xcd":"I\u0301","\xcc":"I\u0300","\xcf":"I\u0308","\u1e2e":"I\u0308\u0301","\u0128":"I\u0303","\u012a":"I\u0304","\u012c":"I\u0306","\u01cf":"I\u030c","\xce":"I\u0302","\u0130":"I\u0307","\u0134":"J\u0302","\u1e30":"K\u0301","\u01e8":"K\u030c","\u0136":"K\u0327","\u0139":"L\u0301","\u013d":"L\u030c","\u013b":"L\u0327","\u1e3e":"M\u0301","\u1e40":"M\u0307","\u0143":"N\u0301","\u01f8":"N\u0300","\xd1":"N\u0303","\u0147":"N\u030c","\u1e44":"N\u0307","\u0145":"N\u0327","\xd3":"O\u0301","\xd2":"O\u0300","\xd6":"O\u0308","\u022a":"O\u0308\u0304","\xd5":"O\u0303","\u1e4c":"O\u0303\u0301","\u1e4e":"O\u0303\u0308","\u022c":"O\u0303\u0304","\u014c":"O\u0304","\u1e52":"O\u0304\u0301","\u1e50":"O\u0304\u0300","\u014e":"O\u0306","\u01d1":"O\u030c","\xd4":"O\u0302","\u1ed0":"O\u0302\u0301","\u1ed2":"O\u0302\u0300","\u1ed6":"O\u0302\u0303","\u022e":"O\u0307","\u0230":"O\u0307\u0304","\u0150":"O\u030b","\u1e54":"P\u0301","\u1e56":"P\u0307","\u0154":"R\u0301","\u0158":"R\u030c","\u1e58":"R\u0307","\u0156":"R\u0327","\u015a":"S\u0301","\u1e64":"S\u0301\u0307","\u0160":"S\u030c","\u1e66":"S\u030c\u0307","\u015c":"S\u0302","\u1e60":"S\u0307","\u015e":"S\u0327","\u0164":"T\u030c","\u1e6a":"T\u0307","\u0162":"T\u0327","\xda":"U\u0301","\xd9":"U\u0300","\xdc":"U\u0308","\u01d7":"U\u0308\u0301","\u01db":"U\u0308\u0300","\u01d5":"U\u0308\u0304","\u01d9":"U\u0308\u030c","\u0168":"U\u0303","\u1e78":"U\u0303\u0301","\u016a":"U\u0304","\u1e7a":"U\u0304\u0308","\u016c":"U\u0306","\u01d3":"U\u030c","\xdb":"U\u0302","\u016e":"U\u030a","\u0170":"U\u030b","\u1e7c":"V\u0303","\u1e82":"W\u0301","\u1e80":"W\u0300","\u1e84":"W\u0308","\u0174":"W\u0302","\u1e86":"W\u0307","\u1e8c":"X\u0308","\u1e8a":"X\u0307","\xdd":"Y\u0301","\u1ef2":"Y\u0300","\u0178":"Y\u0308","\u1ef8":"Y\u0303","\u0232":"Y\u0304","\u0176":"Y\u0302","\u1e8e":"Y\u0307","\u0179":"Z\u0301","\u017d":"Z\u030c","\u1e90":"Z\u0302","\u017b":"Z\u0307","\u03ac":"\u03b1\u0301","\u1f70":"\u03b1\u0300","\u1fb1":"\u03b1\u0304","\u1fb0":"\u03b1\u0306","\u03ad":"\u03b5\u0301","\u1f72":"\u03b5\u0300","\u03ae":"\u03b7\u0301","\u1f74":"\u03b7\u0300","\u03af":"\u03b9\u0301","\u1f76":"\u03b9\u0300","\u03ca":"\u03b9\u0308","\u0390":"\u03b9\u0308\u0301","\u1fd2":"\u03b9\u0308\u0300","\u1fd1":"\u03b9\u0304","\u1fd0":"\u03b9\u0306","\u03cc":"\u03bf\u0301","\u1f78":"\u03bf\u0300","\u03cd":"\u03c5\u0301","\u1f7a":"\u03c5\u0300","\u03cb":"\u03c5\u0308","\u03b0":"\u03c5\u0308\u0301","\u1fe2":"\u03c5\u0308\u0300","\u1fe1":"\u03c5\u0304","\u1fe0":"\u03c5\u0306","\u03ce":"\u03c9\u0301","\u1f7c":"\u03c9\u0300","\u038e":"\u03a5\u0301","\u1fea":"\u03a5\u0300","\u03ab":"\u03a5\u0308","\u1fe9":"\u03a5\u0304","\u1fe8":"\u03a5\u0306","\u038f":"\u03a9\u0301","\u1ffa":"\u03a9\u0300"},Wr=function(){function t(t,e){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new $r(t,e,this.mode),this.settings=e,this.leftrightDepth=0}var e=t.prototype;return e.expect=function(t,e){if(void 0===e&&(e=!0),this.fetch().text!==t)throw new r("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());e&&this.consume()},e.consume=function(){this.nextToken=null},e.fetch=function(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken},e.switchMode=function(t){this.mode=t,this.gullet.switchMode(t)},e.parse=function(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}},e.subparse=function(t){var e=this.nextToken;this.consume(),this.gullet.pushToken(new Bn("}")),this.gullet.pushTokens(t);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=e,n},e.parseExpression=function(e,n){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var i=this.fetch();if(-1!==t.endOfExpression.indexOf(i.text))break;if(n&&i.text===n)break;if(e&&Dr[i.text]&&Dr[i.text].infix)break;var o=this.parseAtom(n);if(!o)break;"internal"!==o.type&&r.push(o)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)},e.handleInfixNodes=function(t){for(var e,n=-1,i=0;i=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+e[0]+'" used in math mode',t);var s,u=it[this.mode][e].group,c=Fn.range(t);if(et.hasOwnProperty(u)){var l=u;s={type:"atom",mode:this.mode,family:l,loc:c,text:e}}else s={type:u,mode:this.mode,loc:c,text:e};o=s}else{if(!(e.charCodeAt(0)>=128))return null;this.settings.strict&&(x(e.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+e[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+e[0]+'" ('+e.charCodeAt(0)+")",t)),o={type:"textord",mode:"text",loc:Fn.range(t),text:e}}if(this.consume(),a)for(var h=0;h1&&void 0!==arguments[1]?arguments[1]:[];return c.a.useCallback((function(){return t.apply(void 0,arguments)}),e)}},,function(t,e){t.exports=function(t){return null!=t&&null!=t.constructor&&"function"===typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}},function(t,e){t.exports=function(t){return null!=t&&null!=t.constructor&&"function"===typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return M}));var r,i,o,a,s,u,c,l,h,f=n(19),d=n(5),p=function(t){var e=t.css;return function(t){var n=t.palette,s=t.size;return{scrollbar:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"y";return e(r||(r=Object(f.a)(["\n scrollbar-width: thin;\n scrollbar-color: "," ",";\n -webkit-overflow-scrolling: touch;\n\n &::-webkit-scrollbar {\n ",": 12px;\n background-color: transparent;\n }\n\n &::-webkit-scrollbar-track {\n border-radius: 999px;\n background: transparent;\n border: 4px solid transparent;\n }\n\n &::-webkit-scrollbar-thumb {\n border-radius: 999px;\n background-color: ",";\n border: 4px solid transparent;\n background-clip: content-box;\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background-color: ",";\n }\n "])),n("secondary",.38),n("secondary",.12),"y"===t?"width":"height",n("secondary",.38),n("secondary"))},shadow:function(){var t=s.lineWidth;return e(i||(i=Object(f.a)(["\n box-shadow: 0px "," "," ",",\n 0px 2px "," ",", 0px "," 3px ",";\n "])),t,t,n("shadow",.14),t,n("shadow",.12),t,n("shadow",.2))},border:function(t){return t?e(a||(a=Object(f.a)(["\n ",": "," solid ",";\n "])),"border-".concat(t),s.lineWidth,n("line")):e(o||(o=Object(f.a)(["\n border: "," solid ",";\n "])),s.lineWidth,n("line"))}}}},g="#2e3440",m="#3b4252",v="#d8dee9",y="#eceff4",b="#81a1c1",O="#5e81ac",w={shadow:m,primary:O,secondary:b,neutral:g,solid:"#4c566a",line:v,background:y,surface:"#fff"},k={shadow:m,primary:O,secondary:b,neutral:y,solid:v,line:"#434c5e",background:"#252932",surface:g},x=function(t){var e=t.css;return function(t){var n,r,i,o=t.palette,a=t.mixin,u=t.size,c=t.font;return e(s||(s=Object(f.a)(["\n .milkdown {\n color: ",";\n background: ",";\n\n position: relative;\n font-family: ",";\n margin-left: auto;\n margin-right: auto;\n ",";\n box-sizing: border-box;\n ",";\n\n .editor {\n padding: 3.125rem 1.25rem;\n outline: none;\n & > * {\n margin: 1.875rem 0;\n }\n\n @media only screen and (min-width: 72rem) {\n max-width: 57.375rem;\n padding: 3.125rem 7.25rem;\n }\n }\n\n .ProseMirror-selectednode {\n outline: "," solid ",";\n }\n\n li.ProseMirror-selectednode {\n outline: none;\n }\n\n li.ProseMirror-selectednode::after {\n ",";\n }\n\n & ::selection {\n background: ",";\n }\n }\n "])),o("neutral",.87),o("surface"),c.typography,null==(n=a.shadow)?void 0:n.call(a),null==(r=a.scrollbar)?void 0:r.call(a),u.lineWidth,o("line"),null==(i=a.border)?void 0:i.call(a),o("secondary",.38))}},_={h1:{label:"h1",icon:"looks_one"},h2:{label:"h2",icon:"looks_two"},h3:{label:"h3",icon:"looks_3"},loading:{label:"loading",icon:"hourglass_empty"},quote:{label:"quote",icon:"format_quote"},code:{label:"code",icon:"code"},table:{label:"table",icon:"table_chart"},divider:{label:"divider",icon:"horizontal_rule"},image:{label:"image",icon:"image"},brokenImage:{label:"broken image",icon:"broken_image"},bulletList:{label:"bullet list",icon:"format_list_bulleted"},orderedList:{label:"ordered list",icon:"format_list_numbered"},taskList:{label:"task list",icon:"checklist"},bold:{label:"bold",icon:"format_bold"},italic:{label:"italic",icon:"format_italic"},inlineCode:{label:"inline code",icon:"code"},strikeThrough:{label:"strike through",icon:"strikethrough_s"},link:{label:"link",icon:"link"},leftArrow:{label:"left arrow",icon:"chevron_left"},rightArrow:{label:"right arrow",icon:"chevron_right"},upArrow:{label:"up arrow",icon:"expand_less"},downArrow:{label:"down arrow",icon:"expand_more"},alignLeft:{label:"align left",icon:"format_align_left"},alignRight:{label:"align right",icon:"format_align_right"},alignCenter:{label:"align center",icon:"format_align_center"},delete:{label:"delete",icon:"delete"},select:{label:"select",icon:"select_all"},unchecked:{label:"unchecked",icon:"check_box_outline_blank"},checked:{label:"checked",icon:"check_box"},undo:{label:"undo",icon:"turn_left"},redo:{label:"redo",icon:"turn_right"},liftList:{label:"lift list",icon:"format_indent_decrease"},sinkList:{label:"sink list",icon:"format_indent_increase"}},S=function(){return{icon:function(t){var e=document.createElement("span");return e.className="icon material-icons material-icons-outlined",e.textContent=_[t].icon,e},label:function(t){return _[t].label}}},E=function(t){return(0,t.css)(u||(u=Object(f.a)(["\n /* copy from https://github.com/ProseMirror/@milkdown/prose/blob/master/style/prosemirror.css */\n .ProseMirror {\n position: relative;\n }\n\n .ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: 'liga' 0; /* the above doesn't seem to work in Edge */\n }\n\n .ProseMirror pre {\n white-space: pre-wrap;\n }\n\n .ProseMirror li {\n position: relative;\n }\n\n .ProseMirror-hideselection *::selection {\n background: transparent;\n }\n .ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n }\n .ProseMirror-hideselection {\n caret-color: transparent;\n }\n\n .ProseMirror-selectednode {\n outline: 2px solid #8cf;\n }\n\n /* Make sure li selections wrap around markers */\n\n li.ProseMirror-selectednode {\n outline: none;\n }\n\n li.ProseMirror-selectednode:after {\n content: '';\n position: absolute;\n left: -32px;\n right: -2px;\n top: -2px;\n bottom: -2px;\n border: 2px solid #8cf;\n pointer-events: none;\n }\n"])))},C={typography:["Roboto","HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue","Helvetica","Arial","Lucida Grande","sans-serif"],code:["Consolas","Monaco","Andale Mono","Ubuntu Mono","monospace"]},T={radius:"4px",lineWidth:"1px"},A=Object(d.w)((function(t){return{font:C,size:T,slots:S,color:w,mixin:p(t),global:function(e){(0,t.injectGlobal)(c||(c=Object(f.a)(["\n ",";\n ","\n "])),E(t),x(t)(e))}}})),D=Object(d.w)((function(t){return{font:C,size:T,slots:S,color:k,mixin:p(t),global:function(e){(0,t.injectGlobal)(l||(l=Object(f.a)(["\n ",";\n ","\n "])),E(t),x(t)(e))}}})),M=Boolean(null==(h=window.matchMedia)?void 0:h.call(window,"(prefers-color-scheme: dark)").matches)?D:A},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(5),i=n(9),o=n(7),a=n(12),s=function t(e){if(!e)return!1;if(Array.isArray(e))return!(e.length>1)&&t(e[0]);var n=e.content;return n?t(n):"text"===e.type},u=new i.e("MILKDOWN_PLUGIN_CLIPBOARD"),c=Object(a.f)((function(){return{prosePlugins:function(t,e){var n=e.get(r.u);return e.update(r.l,(function(t){var e;return{editable:null!=(e=t.editable)?e:function(){return!0}}})),[new i.d({key:u,props:{handlePaste:function(t,n){var i,a,s=e.get(r.q),u=null==(a=(i=t.props).editable)?void 0:a.call(i,t.state),c=n.clipboardData;if(!u||!c)return!1;if(t.state.selection.$from.node().type.spec.code)return!1;var l=c.getData("text/plain");if(c.getData("text/html").length>0||0===l.length)return!1;var h=s(l);if(!h||"string"===typeof h)return!1;var f=t.state.selection.content();return t.dispatch(t.state.tr.replaceSelection(new o.j(h.content,f.openStart,f.openEnd))),!0},clipboardTextSerializer:function(t){var i=e.get(r.v);if(s(t.content.toJSON()))return t.content.textBetween(0,t.content.size,"\n\n");var o=n.topNodeType.createAndFill(void 0,t.content);return o?i(o):""}}})]}}}))()},function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var r,i=n(19),o=n(0),a=n(5),s=n(9),u=n(40),c=n(12),l=Object.defineProperty,h=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,p=function(t,e,n){return e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n},g=(Object(a.i)("Indent"),Object(c.f)((function(t,e){return{prosePlugins:function(){var n=function(t,e){for(var n in e||(e={}))f.call(e,n)&&p(t,n,e[n]);if(h){var r,i=Object(o.a)(h(e));try{for(i.s();!(r=i.n()).done;)n=r.value,d.call(e,n)&&p(t,n,e[n])}catch(a){i.e(a)}finally{i.f()}}return t}({type:"tab",size:4},null!=e?e:{});!function(t,e){"tab"===t.type&&e.getStyle((function(e,n){return(0,n.injectGlobal)(r||(r=Object(i.a)(["\n .milkdown {\n tab-size: ",";\n }\n "])),t.size)}))}(n,t);var a=Object(u.b)({Tab:function(t,e){var r=function(t,e){var n=t.doc,r=t.selection;if(!n||!r)return t;if(!(r instanceof s.h||r instanceof s.a))return t;var i=r.to,o="space"===e.type?Array(e.size).fill(" ").join(""):"\t";return t.insertText(o,i)}(t.tr,n);return!!r.docChanged&&(null==e||e(r),!0)}});return[a]}}}))),m=c.c.create([g()])},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return ve}));var r,i=n(11),o=n(42),a=n(17),s=n(18),u=n(10),c=n(2),l=n(1),h=n(0),f=n(12),d=n(26),p=n(38),g=n(9),m=Object.defineProperty,v=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,O=function(t,e,n){return e in t?m(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n},w=function(t,e){for(var n in e||(e={}))y.call(e,n)&&O(t,n,e[n]);if(v){var r,i=Object(h.a)(v(e));try{for(i.s();!(r=i.n()).done;){n=r.value;b.call(e,n)&&O(t,n,e[n])}}catch(o){i.e(o)}finally{i.f()}}return t};function k(t){t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}function x(t){t.register(k),t.languages.c=t.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),t.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),t.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},t.languages.c.string],char:t.languages.c.char,comment:t.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:t.languages.c}}}}),t.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete t.languages.c.boolean}function _(t){t.register(x),function(t){var e=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,(function(){return e.source}));t.languages.cpp=t.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,(function(){return e.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:e,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),t.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),t.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t.languages.cpp}}}}),t.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),t.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:t.languages.extend("cpp",{})}}),t.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},t.languages.cpp["base-clause"])}(t)}function S(t){t.register(_),t.languages.arduino=t.languages.extend("cpp",{keyword:/\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,constant:/\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,builtin:/\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/}),t.languages.ino=t.languages.arduino}function E(t){!function(t){var e="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+e),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+e),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};t.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+e),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+e),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=t.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=r.variable[1].inside,a=0;a>/g,(function(t,n){return"(?:"+e[+n]+")"}))}function n(t,n,r){return RegExp(e(t,n),r||"")}function r(t,e){for(var n=0;n>/g,(function(){return"(?:"+t+")"}));return t.replace(/<>/g,"[^\\s\\S]")}var i="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",o="class enum interface record struct",a="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",s="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function u(t){return"\\b(?:"+t.trim().replace(/ /g,"|")+")\\b"}var c=u(o),l=RegExp(u(i+" "+o+" "+a+" "+s)),h=u(o+" "+a+" "+s),f=u(i+" "+o+" "+s),d=r(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),p=r(/\((?:[^()]|<>)*\)/.source,2),g=/@?\b[A-Za-z_]\w*\b/.source,m=e(/<<0>>(?:\s*<<1>>)?/.source,[g,d]),v=e(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[h,m]),y=/\[\s*(?:,\s*)*\]/.source,b=e(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[v,y]),O=e(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[d,p,y]),w=e(/\(<<0>>+(?:,<<0>>+)+\)/.source,[O]),k=e(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[w,v,y]),x={keyword:l,punctuation:/[<>()?,.:[\]]/},_=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,S=/"(?:\\.|[^\\"\r\n])*"/.source,E=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;t.languages.csharp=t.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[E]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[S]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[v]),lookbehind:!0,inside:x},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[g,k]),lookbehind:!0,inside:x},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[g]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[c,m]),lookbehind:!0,inside:x},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[v]),lookbehind:!0,inside:x},{pattern:n(/(\bwhere\s+)<<0>>/.source,[g]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[b]),lookbehind:!0,inside:x},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[k,f,g]),inside:x}],keyword:l,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),t.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),t.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[g]),lookbehind:!0,alias:"punctuation"}}),t.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[g]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[p]),lookbehind:!0,alias:"class-name",inside:x},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[k,v]),inside:x,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[k]),lookbehind:!0,inside:x,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[g,d]),inside:{function:n(/^<<0>>/.source,[g]),generic:{pattern:RegExp(d),alias:"class-name",inside:x}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[c,m,g,k,l.source,p,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[m,p]),lookbehind:!0,greedy:!0,inside:t.languages.csharp},keyword:l,"class-name":{pattern:RegExp(k),greedy:!0,inside:x},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var C=S+"|"+_,T=e(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[C]),A=r(e(/[^"'/()]|<<0>>|\(<>*\)/.source,[T]),2),D=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,M=e(/<<0>>(?:\s*\(<<1>>*\))?/.source,[v,A]);t.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[D,M]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[D]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[A]),inside:t.languages.csharp},"class-name":{pattern:RegExp(v),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var j=/:[^}\r\n]+/.source,N=r(e(/[^"'/()]|<<0>>|\(<>*\)/.source,[T]),2),P=e(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[N,j]),R=r(e(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[C]),2),L=e(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[R,j]);function F(e,r){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[e]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[r,j]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:t.languages.csharp}}},string:/[\s\S]+/}}t.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[P]),lookbehind:!0,greedy:!0,inside:F(P,N)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[L]),lookbehind:!0,greedy:!0,inside:F(L,R)}],char:{pattern:RegExp(_),greedy:!0}}),t.languages.dotnet=t.languages.cs=t.languages.csharp}(t)}function T(t){t.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",(function(t){"entity"===t.type&&(t.attributes.title=t.content.value.replace(/&/,"&"))})),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(e,n){var r={};r["language-"+n]={pattern:/(^$)/i,lookbehind:!0,inside:t.languages[n]},r.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:r}};i["language-"+n]={pattern:/[\s\S]+/,inside:t.languages[n]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:i},t.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(e,n){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:t.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml}function A(t){!function(t){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var n=t.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(t)}function D(t){!function(t){t.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var e={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(e).forEach((function(n){var r=e[n],i=[];/^\w+$/.test(n)||i.push(/\w+/.exec(n)[0]),"diff"===n&&i.push("bold"),t.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(t.languages.diff,"PREFIXES",{value:e})}(t)}function M(t){t.register(k),t.languages.go=t.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),t.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete t.languages.go["class-name"]}function j(t){t.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},header:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/}}function N(t){t.register(k),function(t){var e=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};t.languages.java=t.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(n+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:r.inside}],keyword:e,function:[t.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),t.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),t.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}},namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,(function(){return e.source}))),lookbehind:!0,inside:{punctuation:/\./}}})}(t)}function P(t){!function(t){var e={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,r="(?:[^\\\\-]|"+n.source+")",i=RegExp(r+"-"+r),o={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};t.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:i,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":e,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":e,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":o}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]||&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript}function L(t){t.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},t.languages.webmanifest=t.languages.json}function F(t){t.register(k),function(t){t.languages.kotlin=t.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete t.languages.kotlin["class-name"];var e={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:t.languages.kotlin}};t.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:e},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:e},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete t.languages.kotlin.string,t.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),t.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),t.languages.kt=t.languages.kotlin,t.languages.kts=t.languages.kotlin}(t)}function B(t){t.register(A),t.languages.less=t.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),t.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}})}function I(t){t.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}}function Q(t){t.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}}function $(t){!function(t){var e=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+e.source+")?|"+e.source+"(?:[ \t]+"+n.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function a(t,e){e=(e||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return t}));return RegExp(n,e)}t.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return"(?:"+i+"|"+o+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:a(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:a(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:a(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:a(o),lookbehind:!0,greedy:!0},number:{pattern:a(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:e,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},t.languages.yml=t.languages.yaml}(t)}function z(t){t.register(T),function(t){var e=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(t){return t=t.replace(//g,(function(){return e})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+t+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;t.languages.markdown=t.languages.extend("markup",{}),t.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:t.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+o+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+o+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:t.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:t.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(e){["url","bold","italic","strike","code-snippet"].forEach((function(n){e!==n&&(t.languages.markdown[e].inside.content.inside[n]=t.languages.markdown[n])}))})),t.hooks.add("after-tokenize",(function(t){"markdown"!==t.language&&"md"!==t.language||function t(e){if(e&&"string"!==typeof e)for(var n=0,r=e.length;n",quot:'"'},u=String.fromCodePoint||String.fromCharCode;t.languages.md=t.languages.markdown}(t)}function q(t){t.register(x),t.languages.objectivec=t.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete t.languages.objectivec["class-name"],t.languages.objc=t.languages.objectivec}function W(t){!function(t){var e=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;t.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,e].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,e].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,e+/\s*/.source+e].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}}(t)}function V(t){t.register(T),function(t){function e(t,e){return"___"+t.toUpperCase()+e+"___"}Object.defineProperties(t.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,i,o){if(n.language===r){var a=n.tokenStack=[];n.code=n.code.replace(i,(function(t){if("function"===typeof o&&!o(t))return t;for(var i,s=a.length;-1!==n.code.indexOf(i=e(r,s));)++s;return a[s]=t,i})),n.grammar=t.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=t.languages[r];var i=0,o=Object.keys(n.tokenStack);!function a(s){for(var u=0;u=o.length);u++){var c=s[u];if("string"===typeof c||c.content&&"string"===typeof c.content){var l=o[i],h=n.tokenStack[l],f="string"===typeof c?c:c.content,d=e(r,l),p=f.indexOf(d);if(p>-1){++i;var g=f.substring(0,p),m=new t.Token(r,t.tokenize(h,n.grammar),"language-"+r,h),v=f.substring(p+d.length),y=[];g&&y.push.apply(y,a([g])),y.push(m),v&&y.push.apply(y,a([v])),"string"===typeof c?s.splice.apply(s,[u,1].concat(y)):c.content=y}}else c.content&&a(c.content)}return s}(n.tokens)}}}})}(t)}function Y(t){t.register(V),function(t){var e=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],r=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,i=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,o=/[{}\[\](),:;]/;t.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:e,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:r,operator:i,punctuation:o};var a={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:t.languages.php},s=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:a}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:a}}];t.languages.insertBefore("php","variable",{string:s,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:e,string:s,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:r,operator:i,punctuation:o}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),t.hooks.add("before-tokenize",(function(e){if(/<\?/.test(e.code)){t.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)}})),t.hooks.add("after-tokenize",(function(e){t.languages["markup-templating"].tokenizePlaceholders(e,"php")}))}(t)}function U(t){t.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},t.languages.python["string-interpolation"].inside.interpolation.inside.rest=t.languages.python,t.languages.py=t.languages.python}function H(t){t.languages.r={comment:/#.*/,string:{pattern:/(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->?>?|<(?:=|=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/}}function X(t){t.register(k),function(t){t.languages.ruby=t.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),t.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var e={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:t.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete t.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;t.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:e,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:e,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),t.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:e,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:e,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:e,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:e,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:e,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete t.languages.ruby.string,t.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),t.languages.rb=t.languages.ruby}(t)}function G(t){!function(t){for(var e=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,n=0;n<2;n++)e=e.replace(//g,(function(){return e}));e=e.replace(//g,(function(){return/[^\s\S]/.source})),t.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+e),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},t.languages.rust["closure-params"].inside.rest=t.languages.rust,t.languages.rust.attribute.inside.string=t.languages.rust.string}(t)}function Z(t){t.register(A),function(t){t.languages.sass=t.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),t.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete t.languages.sass.atrule;var e=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];t.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:e,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:e,operator:n,important:t.languages.sass.important}}}),delete t.languages.sass.property,delete t.languages.sass.important,t.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(t)}function K(t){t.register(A),t.languages.scss=t.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),t.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),t.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),t.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),t.languages.scss.atrule.inside.rest=t.languages.scss}function J(t){t.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}}function tt(t){t.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},t.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=t.languages.swift}))}function et(t){t.register(R),function(t){t.languages.typescript=t.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),t.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete t.languages.typescript.parameter,delete t.languages.typescript["literal-property"];var e=t.languages.extend("typescript",{});delete e["class-name"],t.languages.typescript["class-name"].inside=e,t.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e}}}}),t.languages.ts=t.languages.typescript}(t)}function nt(t){t.languages.basic={comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/}}function rt(t){t.register(nt),t.languages.vbnet=t.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/})}k.displayName="clike",k.aliases=[],x.displayName="c",x.aliases=[],_.displayName="cpp",_.aliases=[],S.displayName="arduino",S.aliases=["ino"],E.displayName="bash",E.aliases=["shell"],C.displayName="csharp",C.aliases=["cs","dotnet"],T.displayName="markup",T.aliases=["atom","html","mathml","rss","ssml","svg","xml"],A.displayName="css",A.aliases=[],D.displayName="diff",D.aliases=[],M.displayName="go",M.aliases=[],j.displayName="ini",j.aliases=[],N.displayName="java",N.aliases=[],P.displayName="regex",P.aliases=[],R.displayName="javascript",R.aliases=["js"],L.displayName="json",L.aliases=["webmanifest"],F.displayName="kotlin",F.aliases=["kt","kts"],B.displayName="less",B.aliases=[],I.displayName="lua",I.aliases=[],Q.displayName="makefile",Q.aliases=[],$.displayName="yaml",$.aliases=["yml"],z.displayName="markdown",z.aliases=["md"],q.displayName="objectivec",q.aliases=["objc"],W.displayName="perl",W.aliases=[],V.displayName="markup-templating",V.aliases=[],Y.displayName="php",Y.aliases=[],U.displayName="python",U.aliases=["py"],H.displayName="r",H.aliases=[],X.displayName="ruby",X.aliases=["rb"],G.displayName="rust",G.aliases=[],Z.displayName="sass",Z.aliases=[],K.displayName="scss",K.aliases=[],J.displayName="sql",J.aliases=[],tt.displayName="swift",tt.aliases=[],et.displayName="typescript",et.aliases=["ts"],nt.displayName="basic",nt.aliases=[],rt.displayName="vbnet",rt.aliases=[];var it=Object(c.a)((function t(e,n,r){Object(l.a)(this,t),this.property=e,this.normal=n,r&&(this.space=r)}));function ot(t,e){for(var n={},r={},i=-1;++i1&&void 0!==arguments[1]?arguments[1]:"div",o=t||"",a={},s=0;s4&&"data"===n.slice(0,4)&&Mt.test(e)){if("-"===e.charAt(4)){var o=e.slice(5).replace(jt,Rt);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{var a=e.slice(4);if(!jt.test(a)){var s=a.replace(Nt,Pt);"-"!==s.charAt(0)&&(s="-"+s),e="data"+s}}i=bt}return new i(r,e)}(t,n),a=-1;if(void 0!==r&&null!==r){if("number"===typeof r){if(Number.isNaN(r))return;i=r}else i="boolean"===typeof r?r:"string"===typeof r?o.spaceSeparated?It(r):o.commaSeparated?Qt(r):o.commaOrSpaceSeparated?It(Qt(r).join(" ")):Yt(o,o.property,r):Array.isArray(r)?r.concat():"style"===o.property?function(t){var e,n=[];for(e in t)zt.call(t,e)&&n.push([e,t[e]].join(": "));return n.join("; ")}(r):String(r);if(Array.isArray(i)){for(var s=[];++a2?u-2:0),l=2;l=48&&e<=57}function Zt(t){var e="string"===typeof t?t.charCodeAt(0):t;return e>=97&&e<=102||e>=65&&e<=70||e>=48&&e<=57}function Kt(t){return function(t){var e="string"===typeof t?t.charCodeAt(0):t;return e>=97&&e<=122||e>=65&&e<=90}(t)||Gt(t)}var Jt=document.createElement("i");function te(t){var e="&"+t+";";Jt.innerHTML=e;var n=Jt.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===t)&&(n!==e&&n)}var ee=String.fromCharCode,ne=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function re(t){var e,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i="string"===typeof r.additional?r.additional.charCodeAt(0):r.additional,o=[],a=0,s=-1,u="";r.position&&("start"in r.position||"indent"in r.position?(n=r.position.indent,e=r.position.start):e=r.position);var c,l=(e?e.line:0)||1,h=(e?e.column:0)||1,f=N();for(a--;++a<=t.length;)if(10===c&&(h=(n?n[s]:0)||1),38===(c=t.charCodeAt(a))){var d=t.charCodeAt(a+1);if(9===d||10===d||12===d||32===d||38===d||60===d||Number.isNaN(d)||i&&d===i){u+=ee(c),h++;continue}var p=a+1,g=p,m=p,v=void 0;if(35===d){m=++g;var y=t.charCodeAt(m);88===y||120===y?(v="hexadecimal",m=++g):v="decimal"}else v="named";var b="",O="",w="",k="named"===v?Kt:"decimal"===v?Gt:Zt;for(m--;++m<=t.length;){var x=t.charCodeAt(m);if(!k(x))break;w+=ee(x),"named"===v&&Ht.includes(w)&&(b=w,O=te(w))}var _=59===t.charCodeAt(m);if(_){m++;var S="named"===v&&te(w);S&&(b=w,O=S)}var E=1+m-p,C="";if(_||!1!==r.nonTerminated)if(w)if("named"===v){if(_&&!O)P(5,1);else if(b!==w&&(E=1+(m=g+b.length)-g,_=!1),!_){var T=b?1:3;if(r.attribute){var A=t.charCodeAt(m);61===A?(P(T,E),O=""):Kt(A)?O="":P(T,E)}else P(T,E)}C=O}else{_||P(2,E);var D=Number.parseInt(w,"hexadecimal"===v?16:10);if(ie(D))P(7,E),C=ee(65533);else if(D in Xt)P(6,E),C=Xt[D];else{var M="";oe(D)&&P(6,E),D>65535&&(M+=ee((D-=65536)>>>10|55296),D=56320|1023&D),C=M+ee(D)}}else"named"!==v&&P(4,E);else;if(C){R(),f=N(),a=m-1,h+=m-p+1,o.push(C);var j=N();j.offset++,r.reference&&r.reference.call(r.referenceContext,C,{start:f,end:j},t.slice(p-1,m)),f=j}else w=t.slice(p-1,m),u+=w,h+=w.length,a=m-1}else 10===c&&(l++,s++,h=0),Number.isNaN(c)?R():(u+=ee(c),h++);return o.join("");function N(){return{line:l,column:h,offset:a+((e?e.offset:0)||0)}}function P(t,e){var n;r.warning&&((n=N()).column+=e,n.offset+=e,r.warning.call(r.warningContext,ne[t],n,t))}function R(){u&&(o.push(u),r.text&&r.text.call(r.textContext,u,{start:f,end:N()}),u="")}}function ie(t){return t>=55296&&t<=57343||t>1114111}function oe(t){return t>=1&&t<=8||11===t||t>=13&&t<=31||t>=127&&t<=159||t>=64976&&t<=65007||65535===(65535&t)||65534===(65535&t)}var ae="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{},se={exports:{}};!function(t){var e=function(t){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},i={manual:t.Prism&&t.Prism.manual,disableWorkerMessageHandler:t.Prism&&t.Prism.disableWorkerMessageHandler,util:{encode:function t(e){return e instanceof o?new o(e.type,t(e.content),e.alias):Array.isArray(e)?e.map(t):e.replace(/&/g,"&").replace(/=h.reach);x+=k.value.length,k=k.next){var _=k.value;if(e.length>t.length)return;if(!(_ instanceof o)){var S,E=1;if(y){if(!(S=a(w,x,t,v))||S.index>=t.length)break;var C=S.index,T=S.index+S[0].length,A=x;for(A+=k.value.length;C>=A;)A+=(k=k.next).value.length;if(x=A-=k.value.length,k.value instanceof o)continue;for(var D=k;D!==e.tail&&(Ah.reach&&(h.reach=P);var R=k.prev;if(j&&(R=c(e,R,j),x+=j.length),l(e,R,E),k=c(e,R,new o(f,m?i.tokenize(M,m):M,b,M)),N&&c(e,k,N),E>1){var L={cause:f+","+p,reach:P};s(t,e,n,k.prev,x,L),h&&L.reach>h.reach&&(h.reach=L.reach)}}}}}}function u(){var t={value:null,prev:null,next:null},e={value:null,prev:t,next:null};t.next=e,this.head=t,this.tail=e,this.length=0}function c(t,e,n){var r=e.next,i={value:n,prev:e,next:r};return e.next=i,r.prev=i,t.length++,i}function l(t,e,n){for(var r=e.next,i=0;i"+o.content+""},!t.document)return t.addEventListener?(i.disableWorkerMessageHandler||t.addEventListener("message",(function(e){var n=JSON.parse(e.data),r=n.language,o=n.code,a=n.immediateClose;t.postMessage(i.highlight(o,i.languages[r],r)),a&&t.close()}),!1),i):i;var h=i.util.currentScript();function f(){i.manual||i.highlightAll()}if(h&&(i.filename=h.src,h.hasAttribute("data-manual")&&(i.manual=!0)),!i.manual){var d=document.readyState;"loading"===d||"interactive"===d&&h&&h.defer?document.addEventListener("DOMContentLoaded",f):window.requestAnimationFrame?window.requestAnimationFrame(f):window.setTimeout(f,16)}return i}("undefined"!==typeof window?window:"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});t.exports&&(t.exports=e),"undefined"!==typeof ae&&(ae.Prism=e)}(se);var ue=se.exports,ce="object"===typeof globalThis?globalThis:"object"===typeof self?self:"object"===typeof window?window:"object"===typeof t?t:{},le=function(){var t="Prism"in ce,e=t?ce.Prism:void 0;return function(){t?ce.Prism=e:delete ce.Prism;t=void 0,e=void 0}}();ce.Prism=ce.Prism||{},ce.Prism.manual=!0,ce.Prism.disableWorkerMessageHandler=!0,le();var he={}.hasOwnProperty;function fe(){}fe.prototype=ue;var de=new fe;de.highlight=function(t,e){if("string"!==typeof t)throw new TypeError("Expected `string` for `value`, got `"+t+"`");var n,r;if(e&&"object"===typeof e)n=e;else{if("string"!==typeof(r=e))throw new TypeError("Expected `string` for `name`, got `"+r+"`");if(!he.call(de.languages,r))throw new Error("Unknown language: `"+r+"` is not registered");n=de.languages[r]}return{type:"root",children:ue.highlight.call(de,t,n,r)}},de.register=function(t){if("function"!==typeof t||!t.displayName)throw new Error("Expected `function` for `syntax`, got `"+t+"`");he.call(de.languages,t.displayName)||t(de)},de.alias=function(t,e){var n,r=de.languages,i={};"string"===typeof t?e&&(i[t]=e):i=t;for(n in i)if(he.call(i,n))for(var o=i[n],a="string"===typeof o?[o]:o,s=-1;++s1&&void 0!==arguments[1]?arguments[1]:[];return e.flatMap((function(e){var r;return"element"===e.type?t(e.children,[].concat(Object(i.a)(n),Object(i.a)((null==(r=e.properties)?void 0:r.className)||[]))):[{text:e.value,className:n}]}))};function ge(t,e,n){var r=n.highlight,i=(0,n.listLanguages)(),o=[];return Object(d.e)((function(t){return t.type.name===e}))(t).forEach((function(t){var e=t.pos+1,n=t.node.attrs.language;if(n&&i.includes(n)){var a=r(t.node.textContent,n);pe(a.children).forEach((function(t){var n=e+t.text.length;if(t.className.length){var r=p.a.inline(e,n,{class:t.className.join(" ")});o.push(r)}e=n}))}else console.warn("Unsupported language detected, this language has not been supported by prism: ",n)})),p.b.create(t,o)}function me(t){var e=t.nodeName,n=t.configureRefractor;return new g.d({key:new g.e("MILKDOWN_PLUGIN_PRISM"),state:{init:function(t,r){var i=r.doc;return n(de),ge(i,e,de)},apply:function(t,n,r,i){var o,a,s=i.selection.$head.parent.type.name===e,u=r.selection.$head.parent.type.name===e,c=Object(d.e)((function(t){return t.type.name===e}))(r.doc),l=Object(d.e)((function(t){return t.type.name===e}))(i.doc);return t.docChanged&&(s||u||c.length!==l.length||(null==(o=c[0])?void 0:o.node.attrs.language)!==(null==(a=l[0])?void 0:a.node.attrs.language)||t.steps.some((function(t){var e=t;return void 0!==e.from&&void 0!==e.to&&c.some((function(t){return t.pos>=e.from&&t.pos+t.node.nodeSize<=e.to}))})))?ge(t.doc,e,de):n.map(t.mapping,t.doc)}},props:{decorations:function(t){return this.getState(t)}}})}var ve=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=w({nodeName:"fence",configureRefractor:function(){}},t);return Object(f.a)((function(){return me(e)}))}()}).call(this,n(125))},function(t,e,n){"use strict";n.d(e,"a",(function(){return Q}));var r,i,o,a,s,u,c=n(19),l=n(10),h=n(0),f=n(5),d=n(26),p=n(9),g=n(12),m=Object.defineProperty,v=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,O=function(t,e,n){return e in t?m(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n},w=function(t,e){for(var n in e||(e={}))y.call(e,n)&&O(t,n,e[n]);if(v){var r,i=Object(h.a)(v(e));try{for(i.s();!(r=i.n()).done;){n=r.value;b.call(e,n)&&O(t,n,e[n])}}catch(o){i.e(o)}finally{i.f()}}return t},k=function(t,e){return t.tagName===e.toUpperCase()},x=function(t){return function(e){var n=e.target;if(!(n instanceof HTMLElement))return function(){return!0};if(k(n,"input")&&(!("key"in e)||"Enter"!==e.key))return n.focus(),function(){return!1};var r=n.parentNode;if(!r)return function(){return!1};var i=Array.from(r.children).find((function(t){return"INPUT"===t.tagName}));return i instanceof HTMLInputElement?t.get(f.g).callByName("ModifyLink",i.value):function(){return!1}}},_=function(t){return function(e){var n=e.target;if(!(n instanceof HTMLElement))return function(){return!0};var r=n.parentNode;if(!r)return function(){return!1};var i=Array.from(r.children).find((function(t){return"INPUT"===t.tagName}));return i instanceof HTMLInputElement?t.get(f.g).callByName("ModifyInlineMath",i.value):function(){return!1}}},S=function(t){return function(e){var n=e.target;if(!(n instanceof HTMLElement))return function(){return!0};if(k(n,"input")&&(!("key"in e)||"Enter"!==e.key))return n.focus(),function(){return!1};var r=n.parentNode;if(!r)return function(){return!1};var i=Array.from(r.children).find((function(t){return"INPUT"===t.tagName}));return i instanceof HTMLInputElement?t.get(f.g).callByName("ModifyImage",i.value):function(){return!1}}},E=function(t,e){var n=t.state.schema.marks,r=e.firstChild,i=e.lastElementChild;if(r instanceof HTMLInputElement&&i instanceof HTMLButtonElement){var o,a=t.state.selection,s=a.from,u=a.to;if(t.state.doc.nodesBetween(s,s===u?u+1:u,(function(t){if(n.link.isInSet(t.marks))return o=t,!1})),o){var c=o.marks.find((function(t){return t.type===n.link}));if(c){var l=c.attrs.href;r.value=l,l?i.classList.contains("disable")&&i.classList.remove("disable"):i.classList.add("disable")}}}},C=function(t,e){var n=t.state.schema.nodes,r=e.firstChild,i=e.lastElementChild;if(r instanceof HTMLInputElement&&i instanceof HTMLButtonElement){var o=Object(d.g)(t.state.selection,n.math_inline);if(o){var a=o.node.attrs.value;r.value=a,a?i.classList.contains("disable")&&i.classList.remove("disable"):i.classList.add("disable")}}},T=function(t,e){var n=t.state.schema.nodes,r=e.firstChild,i=e.lastElementChild;if(r instanceof HTMLInputElement&&i instanceof HTMLButtonElement){var o=Object(d.g)(t.state.selection,n.image);if(o){var a=o.node.attrs.src;r.value=a.length>50?"Url is too long to display.":a,a?i.classList.contains("disable")&&i.classList.remove("disable"):i.classList.add("disable")}}},A=function(t,e){if(!e)return!1;var n=t.selection,r=n.from,i=n.to;return t.doc.rangeHasMark(r,r===i?i+1:i,e)},D=function(t,e){return!function(t){var e=t.selection;return e instanceof p.h&&!!t.doc.textBetween(e.from,e.to)}(t)||function(t){return Boolean(Object(d.f)((function(t){return!!t.type.spec.code}))(t.selection))}(t)||A(t,e)},M=function(t,e,n,r,i){return{$:t.get(f.x).slots.icon(e),command:function(){return t.get(f.g).callByName(n)},active:function(t){return A(t.state,r)},disable:function(t){return D(t.state,i)},enable:function(t){return!!r&&!!t.state.schema.marks[r.name]}}};(a=o||(o={}))[a.ToggleBold=0]="ToggleBold",a[a.ToggleItalic=1]="ToggleItalic",a[a.ToggleStrike=2]="ToggleStrike",a[a.ToggleCode=3]="ToggleCode",a[a.ToggleLink=4]="ToggleLink",(u=s||(s={}))[u.ModifyLink=0]="ModifyLink",u[u.ModifyImage=1]="ModifyImage",u[u.ModifyInlineMath=2]="ModifyInlineMath";var j=function(t,e){var n,i,o=e.css,a=t.palette,s=t.mixin,u=t.size;return o(r||(r=Object(c.a)(["\n display: inline-flex;\n cursor: pointer;\n justify-content: space-evenly;\n position: absolute;\n border-radius: ",";\n z-index: 2;\n\n ",";\n ",";\n\n overflow: hidden;\n background: ",";\n\n .icon {\n position: relative;\n color: ",";\n\n width: 3rem;\n line-height: 3rem;\n text-align: center;\n transition: all 0.4s ease-in-out;\n &:hover {\n background-color: ",";\n }\n &.active {\n color: ",";\n }\n &:not(:last-child)::after {\n content: '';\n position: absolute;\n top: 0;\n right: calc(-0.5 * ",");\n width: ",";\n bottom: 0;\n background: ",";\n }\n }\n &.hide,\n .hide {\n display: none;\n }\n "])),u.radius,null==(n=s.border)?void 0:n.call(s),null==(i=s.shadow)?void 0:i.call(s),a("surface"),a("solid",.87),a("secondary",.12),a("primary"),u.lineWidth,u.lineWidth,a("line"))},N=function(t,e){return Object.values(t).filter((function(t){return t.enable(e)})).forEach((function(t){var n;(null==(n=t.disable)?void 0:n.call(t,e))?t.$.classList.add("hide"):(t.$.classList.remove("hide"),t.active(e)?t.$.classList.add("active"):t.$.classList.remove("active"))})),function(t,e){return Object.values(t).filter((function(t){return t.enable(e)})).every((function(t){return t.$.classList.contains("hide")}))}(t,e)},P=function(t,e){var n=function(t,e){var n=document.createElement("div"),r=e.getStyle(j)||"";return r&&n.classList.add(r),n.classList.add("tooltip"),{dom:n,render:function(e){var r;Object.values(t).filter((function(t){return t.enable(e)})).forEach((function(t){var e=t.$;return n.appendChild(e)})),null==(r=e.dom.parentNode)||r.appendChild(n)}}}(t,e),r=n.dom,i=n.render,o=function(e){var n=Object.values(t).find((function(t){var n=t.$;return e.target instanceof Element&&n.contains(e.target)}));n&&(e.stopPropagation(),e.preventDefault(),n.command())},a=function(){r.classList.add("hide")};return r.addEventListener("mousedown",o),{destroy:function(){r.removeEventListener("mousedown",o),r.remove()},hide:a,update:function(e){N(t,e)?a():function(t,e){t.classList.remove("hide"),Object(d.b)(e,t,(function(e,n,r,i){var o=t.parentElement;if(!o)throw new Error;var a=n.left-e.left,s=e.left-i.left-(r.width-a)/2,u=e.top-i.top-r.height-14+o.scrollTop;return s<0&&(s=0),e.top=0||(i[n]=t[n]);return i},t.exports.__esModule=!0,t.exports.default=t.exports},,function(t,e,n){!function(t){"use strict";function e(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function s(e){t.defaults=e}t.defaults=a();var u=/[&<>"']/,c=/[&<>"']/g,l=/[<>"']|&(?!#?\w+;)/,h=/[<>"']|&(?!#?\w+;)/g,f={"&":"&","<":"<",">":">",'"':""","'":"'"},d=function(t){return f[t]};function p(t,e){if(e){if(u.test(t))return t.replace(c,d)}else if(l.test(t))return t.replace(h,d);return t}var g=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function m(t){return t.replace(g,(function(t,e){return"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""}))}var v=/(^|[^\[])\^/g;function y(t,e){t=t.source||t,e=e||"";var n={replace:function(e,r){return r=(r=r.source||r).replace(v,"$1"),t=t.replace(e,r),n},getRegex:function(){return new RegExp(t,e)}};return n}var b=/[^\w:]/g,O=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function w(t,e,n){if(t){var r;try{r=decodeURIComponent(m(n)).replace(b,"").toLowerCase()}catch(i){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}e&&!O.test(n)&&(n=E(e,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(i){return null}return n}var k={},x=/^[^:]+:\/*[^/]*$/,_=/^([^:]+:)[\s\S]*$/,S=/^([^:]+:\/*[^/]*)[\s\S]*$/;function E(t,e){k[" "+t]||(x.test(t)?k[" "+t]=t+"/":k[" "+t]=D(t,"/",!0));var n=-1===(t=k[" "+t]).indexOf(":");return"//"===e.substring(0,2)?n?e:t.replace(_,"$1")+e:"/"===e.charAt(0)?n?e:t.replace(S,"$1")+e:t+e}var C={exec:function(){}};function T(t){for(var e,n,r=1;r=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>e)n.splice(e);else for(;n.length1;)1&e&&(n+=t),e>>=1,t+=t;return n+t}function P(t,e,n,r){var i=e.href,o=e.title?p(e.title):null,a=t[1].replace(/\\([\[\]])/g,"$1");if("!"!==t[0].charAt(0)){r.state.inLink=!0;var s={type:"link",raw:n,href:i,title:o,text:a,tokens:r.inlineTokens(a,[])};return r.state.inLink=!1,s}return{type:"image",raw:n,href:i,title:o,text:p(a)}}function R(t,e){var n=t.match(/^(\s+)(?:```)/);if(null===n)return e;var r=n[1];return e.split("\n").map((function(t){var e=t.match(/^\s+/);return null===e?t:e[0].length>=r.length?t.slice(r.length):t})).join("\n")}var L=function(){function e(e){this.options=e||t.defaults}var n=e.prototype;return n.space=function(t){var e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}},n.code=function(t){var e=this.rules.block.code.exec(t);if(e){var n=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:D(n,"\n")}}},n.fences=function(t){var e=this.rules.block.fences.exec(t);if(e){var n=e[0],r=R(n,e[3]||"");return{type:"code",raw:n,lang:e[2]?e[2].trim():e[2],text:r}}},n.heading=function(t){var e=this.rules.block.heading.exec(t);if(e){var n=e[2].trim();if(/#$/.test(n)){var r=D(n,"#");this.options.pedantic?n=r.trim():r&&!/ $/.test(r)||(n=r.trim())}var i={type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:[]};return this.lexer.inline(i.text,i.tokens),i}},n.hr=function(t){var e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:e[0]}},n.blockquote=function(t){var e=this.rules.block.blockquote.exec(t);if(e){var n=e[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:e[0],tokens:this.lexer.blockTokens(n,[]),text:n}}},n.list=function(t){var e=this.rules.block.list.exec(t);if(e){var n,r,i,a,s,u,c,l,h,f,d,p,g=e[1].trim(),m=g.length>1,v={type:"list",raw:"",ordered:m,start:m?+g.slice(0,-1):"",loose:!1,items:[]};g=m?"\\d{1,9}\\"+g.slice(-1):"\\"+g,this.options.pedantic&&(g=m?g:"[*+-]");for(var y=new RegExp("^( {0,3}"+g+")((?: [^\\n]*)?(?:\\n|$))");t&&(p=!1,e=y.exec(t))&&!this.rules.block.hr.test(t);){if(n=e[0],t=t.substring(n.length),l=e[2].split("\n",1)[0],h=t.split("\n",1)[0],this.options.pedantic?(a=2,d=l.trimLeft()):(a=(a=e[2].search(/[^ ]/))>4?1:a,d=l.slice(a),a+=e[1].length),u=!1,!l&&/^ *$/.test(h)&&(n+=h+"\n",t=t.substring(h.length+1),p=!0),!p)for(var b=new RegExp("^ {0,"+Math.min(3,a-1)+"}(?:[*+-]|\\d{1,9}[.)])");t&&(l=f=t.split("\n",1)[0],this.options.pedantic&&(l=l.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!b.test(l));){if(l.search(/[^ ]/)>=a||!l.trim())d+="\n"+l.slice(a);else{if(u)break;d+="\n"+l}u||l.trim()||(u=!0),n+=f+"\n",t=t.substring(f.length+1)}v.loose||(c?v.loose=!0:/\n *\n *$/.test(n)&&(c=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(d))&&(i="[ ] "!==r[0],d=d.replace(/^\[[ xX]\] +/,"")),v.items.push({type:"list_item",raw:n,task:!!r,checked:i,loose:!1,text:d}),v.raw+=n}v.items[v.items.length-1].raw=n.trimRight(),v.items[v.items.length-1].text=d.trimRight(),v.raw=v.raw.trimRight();var O=v.items.length;for(s=0;s1)return!0;return!1}));!v.loose&&w.length&&k&&(v.loose=!0,v.items[s].loose=!0)}return v}},n.html=function(t){var e=this.rules.block.html.exec(t);if(e){var n={type:"html",raw:e[0],pre:!this.options.sanitizer&&("pre"===e[1]||"script"===e[1]||"style"===e[1]),text:e[0]};return this.options.sanitize&&(n.type="paragraph",n.text=this.options.sanitizer?this.options.sanitizer(e[0]):p(e[0]),n.tokens=[],this.lexer.inline(n.text,n.tokens)),n}},n.def=function(t){var e=this.rules.block.def.exec(t);if(e)return e[3]&&(e[3]=e[3].substring(1,e[3].length-1)),{type:"def",tag:e[1].toLowerCase().replace(/\s+/g," "),raw:e[0],href:e[2],title:e[3]}},n.table=function(t){var e=this.rules.block.table.exec(t);if(e){var n={type:"table",header:A(e[1]).map((function(t){return{text:t}})),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=e[0];var r,i,o,a,s=n.align.length;for(r=0;r/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):p(e[0]):e[0]}},n.link=function(t){var e=this.rules.inline.link.exec(t);if(e){var n=e[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;var r=D(n.slice(0,-1),"\\");if((n.length-r.length)%2===0)return}else{var i=M(e[2],"()");if(i>-1){var o=(0===e[0].indexOf("!")?5:4)+e[1].length+i;e[2]=e[2].substring(0,i),e[0]=e[0].substring(0,o).trim(),e[3]=""}}var a=e[2],s="";if(this.options.pedantic){var u=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a);u&&(a=u[1],s=u[3])}else s=e[3]?e[3].slice(1,-1):"";return a=a.trim(),/^$/.test(n)?a.slice(1):a.slice(1,-1)),P(e,{href:a?a.replace(this.rules.inline._escapes,"$1"):a,title:s?s.replace(this.rules.inline._escapes,"$1"):s},e[0],this.lexer)}},n.reflink=function(t,e){var n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=e[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return P(n,r,n[0],this.lexer)}},n.emStrong=function(t,e,n){void 0===n&&(n="");var r=this.rules.inline.emStrong.lDelim.exec(t);if(r&&(!r[3]||!n.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var i=r[1]||r[2]||"";if(!i||i&&(""===n||this.rules.inline.punctuation.exec(n))){var o,a,s=r[0].length-1,u=s,c=0,l="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+s);null!=(r=l.exec(e));)if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6])if(a=o.length,r[3]||r[4])u+=a;else if(!((r[5]||r[6])&&s%3)||(s+a)%3){if(!((u-=a)>0)){if(a=Math.min(a,a+u+c),Math.min(s,a)%2){var h=t.slice(1,s+r.index+a);return{type:"em",raw:t.slice(0,s+r.index+a+1),text:h,tokens:this.lexer.inlineTokens(h,[])}}var f=t.slice(2,s+r.index+a-1);return{type:"strong",raw:t.slice(0,s+r.index+a+1),text:f,tokens:this.lexer.inlineTokens(f,[])}}}else c+=a}}},n.codespan=function(t){var e=this.rules.inline.code.exec(t);if(e){var n=e[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return r&&i&&(n=n.substring(1,n.length-1)),n=p(n,!0),{type:"codespan",raw:e[0],text:n}}},n.br=function(t){var e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}},n.del=function(t){var e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2],[])}},n.autolink=function(t,e){var n,r,i=this.rules.inline.autolink.exec(t);if(i)return r="@"===i[2]?"mailto:"+(n=p(this.options.mangle?e(i[1]):i[1])):n=p(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}},n.url=function(t,e){var n;if(n=this.rules.inline.url.exec(t)){var r,i;if("@"===n[2])i="mailto:"+(r=p(this.options.mangle?e(n[0]):n[0]));else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);r=p(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},n.inlineText=function(t,e){var n,r=this.rules.inline.text.exec(t);if(r)return n=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):p(r[0]):r[0]:p(this.options.smartypants?e(r[0]):r[0]),{type:"text",raw:r[0],text:n}},e}(),F={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:C,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};F.def=y(F.def).replace("label",F._label).replace("title",F._title).getRegex(),F.bullet=/(?:[*+-]|\d{1,9}[.)])/,F.listItemStart=y(/^( *)(bull) */).replace("bull",F.bullet).getRegex(),F.list=y(F.list).replace(/bull/g,F.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+F.def.source+")").getRegex(),F._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",F._comment=/|$)/,F.html=y(F.html,"i").replace("comment",F._comment).replace("tag",F._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),F.paragraph=y(F._paragraph).replace("hr",F.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",F._tag).getRegex(),F.blockquote=y(F.blockquote).replace("paragraph",F.paragraph).getRegex(),F.normal=T({},F),F.gfm=T({},F.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),F.gfm.table=y(F.gfm.table).replace("hr",F.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",F._tag).getRegex(),F.gfm.paragraph=y(F._paragraph).replace("hr",F.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",F.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",F._tag).getRegex(),F.pedantic=T({},F.normal,{html:y("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",F._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:C,paragraph:y(F.normal._paragraph).replace("hr",F.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",F.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var B={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:C,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:C,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}B._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",B.punctuation=y(B.punctuation).replace(/punctuation/g,B._punctuation).getRegex(),B.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,B.escapedEmSt=/\\\*|\\_/g,B._comment=y(F._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),B.emStrong.lDelim=y(B.emStrong.lDelim).replace(/punct/g,B._punctuation).getRegex(),B.emStrong.rDelimAst=y(B.emStrong.rDelimAst,"g").replace(/punct/g,B._punctuation).getRegex(),B.emStrong.rDelimUnd=y(B.emStrong.rDelimUnd,"g").replace(/punct/g,B._punctuation).getRegex(),B._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,B._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,B._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,B.autolink=y(B.autolink).replace("scheme",B._scheme).replace("email",B._email).getRegex(),B._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,B.tag=y(B.tag).replace("comment",B._comment).replace("attribute",B._attribute).getRegex(),B._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,B._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,B._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,B.link=y(B.link).replace("label",B._label).replace("href",B._href).replace("title",B._title).getRegex(),B.reflink=y(B.reflink).replace("label",B._label).replace("ref",F._label).getRegex(),B.nolink=y(B.nolink).replace("ref",F._label).getRegex(),B.reflinkSearch=y(B.reflinkSearch,"g").replace("reflink",B.reflink).replace("nolink",B.nolink).getRegex(),B.normal=T({},B),B.pedantic=T({},B.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:y(/^!?\[(label)\]\((.*?)\)/).replace("label",B._label).getRegex(),reflink:y(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",B._label).getRegex()}),B.gfm=T({},B.normal,{escape:y(B.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\0?e[e.length-1].raw+="\n":e.push(n);else if(n=this.tokenizer.code(t))t=t.substring(n.raw.length),!(r=e[e.length-1])||"paragraph"!==r.type&&"text"!==r.type?e.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.fences(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.heading(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.hr(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.blockquote(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.list(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.html(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.def(t))t=t.substring(n.raw.length),!(r=e[e.length-1])||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.table(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.lheading(t))t=t.substring(n.raw.length),e.push(n);else if(i=t,this.options.extensions&&this.options.extensions.startBlock&&function(){var e=1/0,n=t.slice(1),r=void 0;a.options.extensions.startBlock.forEach((function(t){"number"===typeof(r=t.call({lexer:this},n))&&r>=0&&(e=Math.min(e,r))})),e<1/0&&e>=0&&(i=t.substring(0,e+1))}(),this.state.top&&(n=this.tokenizer.paragraph(i)))r=e[e.length-1],o&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):e.push(n),o=i.length!==t.length,t=t.substring(n.raw.length);else if(n=this.tokenizer.text(t))t=t.substring(n.raw.length),(r=e[e.length-1])&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):e.push(n);else if(t){var s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}throw new Error(s)}return this.state.top=!0,e},r.inline=function(t,e){this.inlineQueue.push({src:t,tokens:e})},r.inlineTokens=function(t,e){var n,r,i,o=this;void 0===e&&(e=[]);var a,s,u,c=t;if(this.tokens.links){var l=Object.keys(this.tokens.links);if(l.length>0)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(c));)l.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,a.index)+"["+N("a",a[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,a.index)+"["+N("a",a[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(a=this.tokenizer.rules.inline.escapedEmSt.exec(c));)c=c.slice(0,a.index)+"++"+c.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;t;)if(s||(u=""),s=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((function(r){return!!(n=r.call({lexer:o},t,e))&&(t=t.substring(n.raw.length),e.push(n),!0)}))))if(n=this.tokenizer.escape(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.tag(t))t=t.substring(n.raw.length),(r=e[e.length-1])&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):e.push(n);else if(n=this.tokenizer.link(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(n.raw.length),(r=e[e.length-1])&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):e.push(n);else if(n=this.tokenizer.emStrong(t,c,u))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.codespan(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.br(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.del(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.autolink(t,Q))t=t.substring(n.raw.length),e.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(t,Q))){if(i=t,this.options.extensions&&this.options.extensions.startInline&&function(){var e=1/0,n=t.slice(1),r=void 0;o.options.extensions.startInline.forEach((function(t){"number"===typeof(r=t.call({lexer:this},n))&&r>=0&&(e=Math.min(e,r))})),e<1/0&&e>=0&&(i=t.substring(0,e+1))}(),n=this.tokenizer.inlineText(i,I))t=t.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(u=n.raw.slice(-1)),s=!0,(r=e[e.length-1])&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):e.push(n);else if(t){var h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}throw new Error(h)}}else t=t.substring(n.raw.length),e.push(n);return e},n(e,null,[{key:"rules",get:function(){return{block:F,inline:B}}}]),e}(),z=function(){function e(e){this.options=e||t.defaults}var n=e.prototype;return n.code=function(t,e,n){var r=(e||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(t,r);null!=i&&i!==t&&(n=!0,t=i)}return t=t.replace(/\n$/,"")+"\n",r?'
'+(n?t:p(t,!0))+"
\n":"
"+(n?t:p(t,!0))+"
\n"},n.blockquote=function(t){return"
\n"+t+"
\n"},n.html=function(t){return t},n.heading=function(t,e,n,r){return this.options.headerIds?"'+t+"\n":""+t+"\n"},n.hr=function(){return this.options.xhtml?"
\n":"
\n"},n.list=function(t,e,n){var r=e?"ol":"ul";return"<"+r+(e&&1!==n?' start="'+n+'"':"")+">\n"+t+"\n"},n.listitem=function(t){return"
  • "+t+"
  • \n"},n.checkbox=function(t){return" "},n.paragraph=function(t){return"

    "+t+"

    \n"},n.table=function(t,e){return e&&(e=""+e+""),"\n\n"+t+"\n"+e+"
    \n"},n.tablerow=function(t){return"\n"+t+"\n"},n.tablecell=function(t,e){var n=e.header?"th":"td";return(e.align?"<"+n+' align="'+e.align+'">':"<"+n+">")+t+"\n"},n.strong=function(t){return""+t+""},n.em=function(t){return""+t+""},n.codespan=function(t){return""+t+""},n.br=function(){return this.options.xhtml?"
    ":"
    "},n.del=function(t){return""+t+""},n.link=function(t,e,n){if(null===(t=w(this.options.sanitize,this.options.baseUrl,t)))return n;var r='"},n.image=function(t,e,n){if(null===(t=w(this.options.sanitize,this.options.baseUrl,t)))return n;var r=''+n+'":">"},n.text=function(t){return t},e}(),q=function(){function t(){}var e=t.prototype;return e.strong=function(t){return t},e.em=function(t){return t},e.codespan=function(t){return t},e.del=function(t){return t},e.html=function(t){return t},e.text=function(t){return t},e.link=function(t,e,n){return""+n},e.image=function(t,e,n){return""+n},e.br=function(){return""},t}(),W=function(){function t(){this.seen={}}var e=t.prototype;return e.serialize=function(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},e.getNextSafeSlug=function(t,e){var n=t,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[t];do{n=t+"-"+ ++r}while(this.seen.hasOwnProperty(n))}return e||(this.seen[t]=r,this.seen[n]=0),n},e.slug=function(t,e){void 0===e&&(e={});var n=this.serialize(t);return this.getNextSafeSlug(n,e.dryrun)},t}(),V=function(){function e(e){this.options=e||t.defaults,this.options.renderer=this.options.renderer||new z,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new q,this.slugger=new W}e.parse=function(t,n){return new e(n).parse(t)},e.parseInline=function(t,n){return new e(n).parseInline(t)};var n=e.prototype;return n.parse=function(t,e){void 0===e&&(e=!0);var n,r,i,o,a,s,u,c,l,h,f,d,p,g,v,y,b,O,w,k="",x=t.length;for(n=0;n0&&"paragraph"===v.tokens[0].type?(v.tokens[0].text=O+" "+v.tokens[0].text,v.tokens[0].tokens&&v.tokens[0].tokens.length>0&&"text"===v.tokens[0].tokens[0].type&&(v.tokens[0].tokens[0].text=O+" "+v.tokens[0].tokens[0].text)):v.tokens.unshift({type:"text",text:O}):g+=O),g+=this.parse(v.tokens,p),l+=this.renderer.listitem(g,b,y);k+=this.renderer.list(l,f,d);continue;case"html":k+=this.renderer.html(h.text);continue;case"paragraph":k+=this.renderer.paragraph(this.parseInline(h.tokens));continue;case"text":for(l=h.tokens?this.parseInline(h.tokens):h.text;n+1An error occurred:

    "+p(u.message+"",!0)+"
    ";throw u}}Y.options=Y.setOptions=function(t){return T(Y.defaults,t),s(Y.defaults),Y},Y.getDefaults=a,Y.defaults=t.defaults,Y.use=function(){for(var t=arguments.length,e=new Array(t),n=0;nAn error occurred:

    "+p(r.message+"",!0)+"
    ";throw r}},Y.Parser=V,Y.parser=V.parse,Y.Renderer=z,Y.TextRenderer=q,Y.Lexer=$,Y.lexer=$.lex,Y.Tokenizer=L,Y.Slugger=W,Y.parse=Y;var U=Y.options,H=Y.setOptions,X=Y.use,G=Y.walkTokens,Z=Y.parseInline,K=Y,J=V.parse,tt=$.lex;t.Lexer=$,t.Parser=V,t.Renderer=z,t.Slugger=W,t.TextRenderer=q,t.Tokenizer=L,t.getDefaults=a,t.lexer=tt,t.marked=Y,t.options=U,t.parse=K,t.parseInline=Z,t.parser=J,t.setOptions=H,t.use=X,t.walkTokens=G,Object.defineProperty(t,"__esModule",{value:!0})}(e)},function(t,e,n){"use strict";n.d(e,"a",(function(){return _n}));var r,i,o=n(1),a=n(2),s=n(3),u=n(8),c=n(14),l=n(17),h=n(18),f=n(11),d=n(0),p=n(10),g=n(15),m=function(){function t(e,n,r,i,a,s,u){Object(o.a)(this,t),this.type=e,this.value=n,this.from=r,this.hash=i,this.end=a,this.children=s,this.positions=u,this.hashProp=[[g.b.contextHash,i]]}return Object(a.a)(t,[{key:"addChild",value:function(t,e){t.prop(g.b.contextHash)!=this.hash&&(t=new g.f(t.type,t.children,t.positions,t.length,this.hashProp)),this.children.push(t),this.positions.push(e)}},{key:"toTree",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.end,r=this.children.length-1;r>=0&&(n=Math.max(n,this.positions[r]+this.children[r].length+this.from));var i=new g.f(t.types[this.type],this.children,this.positions,n-this.from).balance({makeTree:function(t,n,r){return new g.f(g.d.none,t,n,r,e.hashProp)}});return i}}],[{key:"create",value:function(e,n,r,i,o){return new t(e,n,r,i+(i<<8)+e+(n<<4)|0,o,[],[])}}]),t}();!function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.URL=33]="URL",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel"}(i||(i={}));var v=Object(a.a)((function t(e,n){Object(o.a)(this,t),this.start=e,this.content=n,this.marks=[],this.parsers=[]})),y=function(){function t(){Object(o.a)(this,t),this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}return Object(a.a)(t,[{key:"forward",value:function(){this.basePos>this.pos&&this.forwardInner()}},{key:"forwardInner",value:function(){var t=this.skipSpace(this.basePos);this.indent=this.countIndent(t,this.pos,this.indent),this.pos=t,this.next=t==this.text.length?-1:this.text.charCodeAt(t)}},{key:"skipSpace",value:function(t){return k(this.text,t)}},{key:"reset",value:function(t){for(this.text=t,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}},{key:"moveBase",value:function(t){this.basePos=t,this.baseIndent=this.countIndent(t,this.pos,this.indent)}},{key:"moveBaseColumn",value:function(t){this.baseIndent=t,this.basePos=this.findColumn(t)}},{key:"addMarker",value:function(t){this.markers.push(t)}},{key:"countIndent",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=e;r=e.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;var r=(t.type==i.OrderedList?A:T)(n,e,!1);return r>0&&(t.type!=i.BulletList||E(n,e,!1)<0)&&n.text.charCodeAt(n.pos+r-1)==t.value}var O=(r={},Object(p.a)(r,i.Blockquote,(function(t,e,n){return 62==n.next&&(n.markers.push(it(i.QuoteMark,e.lineStart+n.pos,e.lineStart+n.pos+1)),n.moveBase(n.pos+(w(n.text.charCodeAt(n.pos+1))?2:1)),t.end=e.lineStart+n.text.length,!0)})),Object(p.a)(r,i.ListItem,(function(t,e,n){return!(n.indent-1)&&(n.moveBaseColumn(n.baseIndent+t.value),!0)})),Object(p.a)(r,i.OrderedList,b),Object(p.a)(r,i.BulletList,b),Object(p.a)(r,i.Document,(function(){return!0})),r);function w(t){return 32==t||9==t||10==t||13==t}function k(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;en&&w(t.charCodeAt(e-1));)e--;return e}function _(t){if(96!=t.next&&126!=t.next)return-1;for(var e=t.pos+1;e-1&&t.depth==e.stack.length||r<3?-1:1}function C(t,e){for(var n=t.stack.length-1;n>=0;n--)if(t.stack[n].type==e)return!0;return!1}function T(t,e,n){return 45!=t.next&&43!=t.next&&42!=t.next||t.pos!=t.text.length-1&&!w(t.text.charCodeAt(t.pos+1))||!(!n||C(e,i.BulletList)||t.skipSpace(t.pos+2)=48&&o<=57;){if(++r==t.text.length)return-1;o=t.text.charCodeAt(r)}return r==t.pos||r>t.pos+9||46!=o&&41!=o||rt.pos+1||49!=t.next)?-1:r+1-t.pos}function D(t){if(35!=t.next)return-1;for(var e=t.pos+1;e6?-1:n}function M(t){if(45!=t.next&&61!=t.next||t.indent>=t.baseIndent+4)return-1;for(var e=t.pos+1;e/,P=/\?>/,R=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*/i.exec(r);if(a)return t.append(it(i.Comment,n,n+1+a[0].length));var s=/^\?[^]*?\?>/.exec(r);if(s)return t.append(it(i.ProcessingInstruction,n,n+1+s[0].length));var u=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(r);return u?t.append(it(i.HTMLTag,n,n+1+u[0].length)):-1},Emphasis:function(t,e,n){if(95!=e&&42!=e)return-1;for(var r=n+1;t.char(r)==e;)r++;var i=t.slice(n-1,n),o=t.slice(r,r+1),a=ht.test(i),s=ht.test(o),u=/\s|^$/.test(i),c=/\s|^$/.test(o),l=!c&&(!s||u||a),h=!u&&(!a||c||s),f=l&&(42==e||!h||a),d=h&&(42==e||!l||s);return t.append(new ct(95==e?ot:at,n,r,(f?1:0)|(d?2:0)))},HardBreak:function(t,e,n){if(92==e&&10==t.char(n+1))return t.append(it(i.HardBreak,n,n+2));if(32==e){for(var r=n+1;32==t.char(r);)r++;if(10==t.char(r)&&r>=n+2)return t.append(it(i.HardBreak,n,r+1))}return-1},Link:function(t,e,n){return 91==e?t.append(new ct(st,n,n+1,1)):-1},Image:function(t,e,n){return 33==e&&91==t.char(n+1)?t.append(new ct(ut,n,n+2,1)):-1},LinkEnd:function(t,e,n){if(93!=e)return-1;for(var r=t.parts.length-1;r>=0;r--){var o=t.parts[r];if(o instanceof ct&&(o.type==st||o.type==ut)){if(!o.side||t.skipSpace(o.to)==n&&!/[(\[]/.test(t.slice(n+1,n+2)))return t.parts[r]=null,-1;var a=t.takeContent(r),s=t.parts[r]=dt(t,a,o.type==st?i.Link:i.Image,o.from,n+1);if(o.type==st)for(var u=0;ue?it(i.URL,e+n,s+n):s==t.length&&null}function gt(t,e,n){var r=t.charCodeAt(e);if(39!=r&&34!=r&&40!=r)return!1;for(var o=40==r?41:r,a=e+1,s=!1;a=this.end?-1:this.text.charCodeAt(t-this.offset)}},{key:"end",get:function(){return this.offset+this.text.length}},{key:"slice",value:function(t,e){return this.text.slice(t-this.offset,e-this.offset)}},{key:"append",value:function(t){return this.parts.push(t),t.to}},{key:"addDelimiter",value:function(t,e,n,r,i){return this.append(new ct(t,e,n,(r?1:0)|(i?2:0)))}},{key:"addElement",value:function(t){return this.append(t)}},{key:"resolveMarkers",value:function(t){for(var e=t;e=t;a--){var s=this.parts[a];if(s instanceof ct&&1&s.side&&s.type==n.type&&!(r&&(1&n.side||2&s.side)&&(s.to-s.from+i)%3==0&&((s.to-s.from)%3||i%3))){o=s;break}}if(o){var u=n.type.resolve,c=[],l=o.from,h=n.to;if(r){var f=Math.min(2,o.to-o.from,i);l=o.to-f,h=n.from+f,u=1==f?"Emphasis":"StrongEmphasis"}o.type.mark&&c.push(this.elt(o.type.mark,l,o.to));for(var d=a+1;d=0;e--){var n=this.parts[e];if(n instanceof ct&&n.type==t)return e}return null}},{key:"takeContent",value:function(t){var e=this.resolveMarkers(t);return this.parts.length=t,e}},{key:"skipSpace",value:function(t){return k(this.text,t-this.offset)+this.offset}},{key:"elt",value:function(t,e,n,r){return"string"==typeof t?it(this.parser.getNodeType(t),e,n,r):new rt(t,e)}}]),t}();function yt(t,e){if(!e.length)return t;if(!t.length)return e;var n,r=t.slice(),i=0,o=Object(d.a)(e);try{for(o.s();!(n=o.n()).done;){for(var a=n.value;i(t?t-1:0))return!1;if(this.fragmentEnd<0){for(var n=this.fragment.to;n>0&&"\n"!=this.input.read(n-1,n);)n--;this.fragmentEnd=n?n-1:0}var r=this.cursor;r||(r=this.cursor=this.fragment.tree.cursor()).firstChild();for(var i=t+this.fragment.offset;r.to<=i;)if(!r.parent())return!1;for(;;){if(r.from>=i)return this.fragment.from<=e;if(!r.childAfter(i))return!1}}},{key:"matches",value:function(t){var e=this.cursor.tree;return e&&e.prop(g.b.contextHash)==t}},{key:"takeNodes",value:function(t){for(var e=this.cursor,n=this.fragment.offset,r=this.fragmentEnd-(this.fragment.openEnd?1:0),i=t.absoluteLineStart,o=i,a=t.block.children.length,s=o,u=a;;){if(e.to-n>r){if(e.type.isAnonymous&&e.firstChild())continue;break}if(t.dontInject.add(e.tree),t.addNode(e.tree,e.from-n),e.type.is("Block")&&(bt.indexOf(e.type.id)<0?(o=e.to-n,a=t.block.children.length):(o=s,a=u,s=e.to-n,u=t.block.children.length)),!e.nextSibling())break}for(;t.block.children.length>a;)t.block.children.pop(),t.block.positions.pop();return o-i}}]),t}(),wt=new U(new g.c(K),Object.keys(I).map((function(t){return I[t]})),Object.keys(I).map((function(t){return q[t]})),Object.keys(I),W,O,Object.keys(ft).map((function(t){return ft[t]})),Object.keys(ft),[]);function kt(t,e,n){for(var r=[],i=t.firstChild,o=e;;i=i.nextSibling){var a=i?i.from:n;if(a>o&&r.push({from:o,to:a}),!i)break;o=i.to}return r}function xt(t){var e=t.codeParser,n=t.htmlParser;return{wrap:Object(g.h)((function(t,r){var o=t.type.id;if(!e||o!=i.CodeBlock&&o!=i.FencedCode){if(n&&(o==i.HTMLBlock||o==i.HTMLTag))return{parser:n,overlay:kt(t.node,t.from,t.to)}}else{var a="";if(o=i.FencedCode){var s=t.node.getChild(i.CodeInfo);s&&(a=r.read(s.from,s.to))}var u=e(a);if(u)return{parser:u,overlay:function(t){return t.type.id==i.CodeText}}}return null}))}}var _t={resolve:"Strikethrough",mark:"StrikethroughMark"},St={defineNodes:["Strikethrough","StrikethroughMark"],parseInline:[{name:"Strikethrough",parse:function(t,e,n){return 126!=e||126!=t.char(n+1)?-1:t.addDelimiter(_t,n,n+2,!0,!0)},after:"Emphasis"}]};function Et(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=0,a=!0,s=-1,u=-1,c=!1,l=function(){r.push(t.elt("TableCell",i+s,i+u,t.parser.parseInline(e.slice(s,u),i+s)))},h=n;h-1)&&o++,a=!1,r&&(s>-1&&l(),r.push(t.elt("TableDelimiter",h+i,h+i+1))),s=u=-1),c=!c&&92==f}return s>-1&&(o++,r&&l()),o}var Ct=function(){function t(){Object(o.a)(this,t),this.rows=null}return Object(a.a)(t,[{key:"nextLine",value:function(t,e,n){var r;if(null==this.rows){if(this.rows=!1,(45==e.next||58==e.next||124==e.next)&&/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/.test(r=e.text.slice(e.pos))){var i=[];Et(t,n.content,0,i,n.start)==Et(t,r,e.pos)&&(this.rows=[t.elt("TableHeader",n.start,n.start+n.content.length,i),t.elt("TableDelimiter",t.lineStart+e.pos,t.lineStart+e.text.length)])}}else if(this.rows){var o=[];Et(t,e.text,e.pos,o,t.lineStart),this.rows.push(t.elt("TableRow",t.lineStart+e.pos,t.lineStart+e.text.length,o))}return!1}},{key:"finish",value:function(t,e){return!!this.rows&&(this.emit(t,e),!0)}},{key:"emit",value:function(t,e){t.addLeafElement(e,t.elt("Table",e.start,e.start+e.content.length,this.rows))}}]),t}(),Tt={defineNodes:[{name:"Table",block:!0},"TableHeader","TableRow","TableCell","TableDelimiter"],parseBlock:[{name:"Table",leaf:function(t,e){return function(t,e){for(var n=e;n=65&&i<=90||95==i||i>=97&&i<=122||i>=161;)o+=String.fromCharCode(r),r=t.peek(++e);return Qt=t,$t=n,It=o||(r==qt||r==Wt?void 0:null)}var qt=63,Wt=33;function Vt(t,e){this.name=t,this.parent=e,this.hash=e?e.hash:0;for(var n=0;n-1?new Vt(zt(r,1)||"",t):t},reduce:function(t,e){return 18==e&&t?t.parent:t},reuse:function(t,e,n,r){var i=e.type.id;return 4==i||35==i?new Vt(zt(r,1)||"",t):t},hash:function(t){return t?t.hash:0},strict:!1}),Ht=new Pt.b((function(t,e){if(60==t.next){t.advance();var n=47==t.next;n&&t.advance();var r=zt(t,0);if(void 0!==r){if(!r)return t.acceptToken(n?11:4);var i=e.context?e.context.name:null;if(n){if(r==i)return t.acceptToken(8);if(i&&Lt[i])return t.acceptToken(56,-2);if(e.dialectEnabled(0))return t.acceptToken(9);for(var o=e.context;o;o=o.parent)if(o.name==r)return;t.acceptToken(10)}else{if("script"==r)return t.acceptToken(5);if("style"==r)return t.acceptToken(6);if("textarea"==r)return t.acceptToken(7);i&&Ft[i]&&Ft[i][r]?t.acceptToken(56,-1):t.acceptToken(4)}}}else t.next<0&&e.context&&t.acceptToken(56)}),{contextual:!0}),Xt=new Pt.b((function(t,e){var n=1;if(47==t.next){if(62!=t.peek(1))return;n=2}else if(62!=t.next)return;e.context&&Rt[e.context.name]&&t.acceptToken(12,n)})),Gt=new Pt.b((function(t){for(var e=0,n=0;;n++){if(t.next<0){n&&t.acceptToken(57);break}if(t.next=="--\x3e".charCodeAt(e)){if(3==++e){n>3&&t.acceptToken(57,-2);break}}else e=0;t.advance()}}));function Zt(t,e,n){var r=2+t.length;return new Pt.b((function(i){for(var o=0,a=0,s=0;;s++){if(i.next<0){s&&i.acceptToken(e);break}if(0==o&&60==i.next||1==o&&47==i.next||o>=2&&oa?i.acceptToken(e,-a):i.acceptToken(n,-(a-2));break}if((10==i.next||13==i.next)&&s){i.acceptToken(e,1);break}o=a=0}else a++;i.advance()}}))}var Kt=Zt("script",53,1),Jt=Zt("style",54,2),te=Zt("textarea",55,3),ee=Pt.c.deserialize({version:13,states:",fOVO!jOOO!TQ#tO'#CoO!YQ#tO'#CyO!_Q#tO'#C|O!dQ#tO'#DPO!iOXO'#CnO!tOYO'#CnO#PO[O'#CnO$YO!jO'#CnOOOW'#Cn'#CnO$aO$fO'#DSO$iQ#tO'#DUO$nQ#tO'#DVOOOW'#Dj'#DjOOOW'#DX'#DXQVO!jOOO$sQ&jO,59ZO${Q&jO,59eO%TQ&jO,59hO%]Q&zO,59kOOOX'#D]'#D]O%hOXO'#CwO%sOXO,59YOOOY'#D^'#D^O%{OYO'#CzO&WOYO,59YOOO['#D_'#D_O&`O[O'#C}O&kO[O,59YOOOW'#D`'#D`O&sO!jO,59YO&zQ#tO'#DQOOOW,59Y,59YOOOp'#Da'#DaO'PO$fO,59nOOOW,59n,59nO'XQ#tO,59pO'^Q#tO,59qOOOW-E7V-E7VO'cQ&zO'#CqOOQ`'#DY'#DYO'qQ&jO1G.uOOOX1G.u1G.uO'yQ&jO1G/POOOY1G/P1G/PO(RQ&jO1G/SOOO[1G/S1G/SO(ZQ&zO1G/VOOOW1G/V1G/VOOOW1G/X1G/XOOOX-E7Z-E7ZO(fQ#tO'#CxOOOW1G.t1G.tOOOY-E7[-E7[O(kQ#tO'#C{OOO[-E7]-E7]O(pQ#tO'#DOOOOW-E7^-E7^O(uQ#tO,59lOOOp-E7_-E7_OOOW1G/Y1G/YOOOW1G/[1G/[OOOW1G/]1G/]O(zQ,UO,59]OOQ`-E7W-E7WOOOX7+$a7+$aOOOY7+$k7+$kOOO[7+$n7+$nOOOW7+$q7+$qOOOW7+$s7+$sO)VQ#tO,59dO)[Q#tO,59gO)aQ#tO,59jOOOW1G/W1G/WO)fO7[O'#CtO)tOMhO'#CtOOQ`1G.w1G.wOOOW1G/O1G/OOOOW1G/R1G/ROOOW1G/U1G/UOOOO'#DZ'#DZO*SO7[O,59`OOQ`,59`,59`OOOO'#D['#D[O*bOMhO,59`OOOO-E7X-E7XOOQ`1G.z1G.zOOOO-E7Y-E7Y",stateData:"*x~O!]OS~OSSOTPOUQOVROX[OYZOZ]O^]O_]O`]Oa]Ow]Oz^O!cYO~Od`O~OdaO~OdbO~OdcO~O!VdOPkP!YkP~O!WgOQnP!YnP~O!XjORqP!YqP~OSSOTPOUQOVROWoOX[OYZOZ]O^]O_]O`]Oa]Ow]O!cYO~O!YpO~P#[O!ZqO!dsO~OdtO~OduO~OfwOjzO~OfwOj|O~OfwOj!OO~O[!ROfwOj!QO~O!VdOPkX!YkX~OP!TO!Y!UO~O!WgOQnX!YnX~OQ!WO!Y!UO~O!XjORqX!YqX~OR!YO!Y!UO~O!Y!UO~P#[Od![O~O!ZqO!d!^O~Oj!_O~Oj!`O~Og!aOfeXjeX[eX~OfwOj!cO~OfwOj!dO~OfwOj!eO~O[!gOfwOj!fO~Od!hO~Od!iO~Od!jO~Oj!kO~Oi!nO!_!lO!a!mO~Oj!oO~Oj!pO~Oj!qO~O_!rO`!rO!_!tO!`!rO~O_!uO`!uO!a!tO!b!uO~O_!rO`!rO!_!xO!`!rO~O_!uO`!uO!a!xO!b!uO~O`_a!cwz!c~",goto:"%i!_PPPPPPPPPPPPPPPPPP!`!fP!lPP!vPP!y!|#P#V#Y#]#c#f#i#o#u!`P!`!`P#{$R$e$k$q$w$}%T%ZPPPPPPPP%aX]OW_nXTOW_nax`abcy{}!PR!n!aRfTR!UfXUOW_nRiUR!UiXVOW_nRlVR!UlXWOW_nQpWR!UnXXOW_nQ_ORv_Qy`Q{aQ}bQ!PcX!by{}!PQ!s!lR!w!sQ!v!mR!y!vQeTR!SeQhUR!VhQkVR!XkQnWR!ZnQrYR!]rS^O_TmWn",nodeNames:"\u26a0 StartCloseTag StartCloseTag StartCloseTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag SelfCloseEndTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue EndTag ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:66,context:Ut,nodeProps:[[g.b.closedBy,-9,1,2,3,5,6,7,8,9,10,"EndTag",4,"EndTag SelfCloseEndTag",-4,19,29,32,35,"CloseTag"],[g.b.group,-9,11,15,16,17,18,38,39,40,41,"Entity",14,"Entity TextContent",-3,27,30,33,"TextContent Entity"],[g.b.openedBy,12,"StartTag",26,"StartTag StartCloseTag",-4,28,31,34,36,"OpenTag"]],skippedNodes:[0],repeatNodeCount:9,tokenData:"!#b!aR!WOX$kXY)sYZ)sZ]$k]^)s^p$kpq)sqr$krs*zsv$kvw+dwx2yx}$k}!O3f!O!P$k!P!Q7_!Q![$k![!]8u!]!^$k!^!_>b!_!`!!p!`!a8T!a!c$k!c!}8u!}#R$k#R#S8u#S#T$k#T#o8u#o$f$k$f$g&R$g%W$k%W%o8u%o%p$k%p&a8u&a&b$k&b1p8u1p4U$k4U4d8u4d4e$k4e$IS8u$IS$I`$k$I`$Ib8u$Ib$Kh$k$Kh%#t8u%#t&/x$k&/x&Et8u&Et&FV$k&FV;'S8u;'S;:jiW!``!bpOq(kqr?Rrs'gsv(kwx(]x!a(k!a!bKj!b~(k!R?YZ!``!bpOr(krs'gsv(kwx(]x}(k}!O?{!O!f(k!f!gAR!g#W(k#W#XGz#X~(k!R@SV!``!bpOr(krs'gsv(kwx(]x}(k}!O@i!O~(k!R@rT!``!bp!cPOr(krs'gsv(kwx(]x~(k!RAYV!``!bpOr(krs'gsv(kwx(]x!q(k!q!rAo!r~(k!RAvV!``!bpOr(krs'gsv(kwx(]x!e(k!e!fB]!f~(k!RBdV!``!bpOr(krs'gsv(kwx(]x!v(k!v!wBy!w~(k!RCQV!``!bpOr(krs'gsv(kwx(]x!{(k!{!|Cg!|~(k!RCnV!``!bpOr(krs'gsv(kwx(]x!r(k!r!sDT!s~(k!RD[V!``!bpOr(krs'gsv(kwx(]x!g(k!g!hDq!h~(k!RDxW!``!bpOrDqrsEbsvDqvwEvwxFfx!`Dq!`!aGb!a~DqqEgT!bpOvEbvxEvx!`Eb!`!aFX!a~EbPEyRO!`Ev!`!aFS!a~EvPFXOzPqF`Q!bpzPOv'gx~'gaFkV!``OrFfrsEvsvFfvwEvw!`Ff!`!aGQ!a~FfaGXR!``zPOr(]sv(]w~(]!RGkT!``!bpzPOr(krs'gsv(kwx(]x~(k!RHRV!``!bpOr(krs'gsv(kwx(]x#c(k#c#dHh#d~(k!RHoV!``!bpOr(krs'gsv(kwx(]x#V(k#V#WIU#W~(k!RI]V!``!bpOr(krs'gsv(kwx(]x#h(k#h#iIr#i~(k!RIyV!``!bpOr(krs'gsv(kwx(]x#m(k#m#nJ`#n~(k!RJgV!``!bpOr(krs'gsv(kwx(]x#d(k#d#eJ|#e~(k!RKTV!``!bpOr(krs'gsv(kwx(]x#X(k#X#YDq#Y~(k!RKqW!``!bpOrKjrsLZsvKjvwLowxNPx!aKj!a!b! g!b~KjqL`T!bpOvLZvxLox!aLZ!a!bM^!b~LZPLrRO!aLo!a!bL{!b~LoPMORO!`Lo!`!aMX!a~LoPM^OwPqMcT!bpOvLZvxLox!`LZ!`!aMr!a~LZqMyQ!bpwPOv'gx~'gaNUV!``OrNPrsLosvNPvwLow!aNP!a!bNk!b~NPaNpV!``OrNPrsLosvNPvwLow!`NP!`!a! V!a~NPa! ^R!``wPOr(]sv(]w~(]!R! nW!``!bpOrKjrsLZsvKjvwLowxNPx!`Kj!`!a!!W!a~Kj!R!!aT!``!bpwPOr(krs'gsv(kwx(]x~(k!V!!{VgS^P!``!bpOr&Rrs&qsv&Rwx'rx!^&R!^!_(k!_~&R",tokenizers:[Kt,Jt,te,Ht,Xt,Gt,0,1,2,3,4,5],topRules:{Document:[0,13]},dialects:{noMatch:0},tokenPrec:446});function ne(t,e){var n,r=Object.create(null),i=Object(d.a)(t.firstChild.getChildren("Attribute"));try{for(i.s();!(n=i.n()).done;){var o=n.value,a=o.getChild("AttributeName"),s=o.getChild("AttributeValue")||o.getChild("UnquotedAttributeValue");a&&(r[e.read(a.from,a.to)]=s?"AttributeValue"==s.name?e.read(s.from+1,s.to-1):e.read(s.from,s.to):"")}}catch(u){i.e(u)}finally{i.f()}return r}function re(t,e,n){var r,i,o=Object(d.a)(n);try{for(o.s();!(i=o.n()).done;){var a=i.value;if(!a.attrs||a.attrs(r||(r=ne(t.node.parent,e))))return{parser:a.parser}}}catch(s){o.e(s)}finally{o.f()}return null}function ie(t){var e,n=[],r=[],i=[],o=Object(d.a)(t);try{for(o.s();!(e=o.n()).done;){var a=e.value,s="script"==a.tag?n:"style"==a.tag?r:"textarea"==a.tag?i:null;if(!s)throw new RangeError("Only script, style, and textarea tags can host nested parsers");s.push(a)}}catch(u){o.e(u)}finally{o.f()}return Object(g.h)((function(t,e){var o=t.type.id;return 27==o?re(t,e,n):30==o?re(t,e,r):33==o?re(t,e,i):null}))}var oe=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288];function ae(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}var se=new Pt.b((function(t,e){for(var n=!1,r=0,i=0;;i++){var o=t.next;if(!(ae(o)||45==o||95==o||n&&(a=o,a>=48&&a<=57))){n&&t.acceptToken(40==o?94:2==r&&e.canShift(2)?2:95);break}!n&&(45!=o||i>0)&&(n=!0),r===i&&45==o&&r++,t.advance()}var a})),ue=new Pt.b((function(t){if(oe.includes(t.peek(-1))){var e=t.next;(ae(e)||95==e||35==e||46==e||91==e||58==e||45==e)&&t.acceptToken(93)}})),ce=new Pt.b((function(t){if(!oe.includes(t.peek(-1))){var e=t.next;if(37==e&&(t.advance(),t.acceptToken(1)),ae(e)){do{t.advance()}while(ae(t.next));t.acceptToken(1)}}})),le={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,dir:32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},he={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},fe={__proto__:null,not:128,only:128,from:158,to:160},de=Pt.c.deserialize({version:13,states:"7WOYQ[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO!ZQ[O'#CfO!}QXO'#CaO#UQ[O'#ChO#aQ[O'#DPO#fQ[O'#DTOOQP'#Ec'#EcO#kQdO'#DeO$VQ[O'#DrO#kQdO'#DtO$hQ[O'#DvO$sQ[O'#DyO$xQ[O'#EPO%WQ[O'#EROOQS'#Eb'#EbOOQS'#ES'#ESQYQ[OOOOQP'#Cg'#CgOOQP,59Q,59QO!ZQ[O,59QO%_Q[O'#EVO%yQWO,58{O&RQ[O,59SO#aQ[O,59kO#fQ[O,59oO%_Q[O,59sO%_Q[O,59uO%_Q[O,59vO'bQ[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO'iQWO,59SO'nQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO'sQ`O,59oOOQS'#Cp'#CpO#kQdO'#CqO'{QvO'#CsO)VQtO,5:POOQO'#Cx'#CxO'iQWO'#CwO)kQWO'#CyOOQS'#Ef'#EfOOQO'#Dh'#DhO)pQ[O'#DoO*OQWO'#EiO$xQ[O'#DmO*^QWO'#DpOOQO'#Ej'#EjO%|QWO,5:^O*cQpO,5:`OOQS'#Dx'#DxO*kQWO,5:bO*pQ[O,5:bOOQO'#D{'#D{O*xQWO,5:eO*}QWO,5:kO+VQWO,5:mOOQS-E8Q-E8QOOQP1G.l1G.lO+yQXO,5:qOOQO-E8T-E8TOOQS1G.g1G.gOOQP1G.n1G.nO'iQWO1G.nO'nQWO1G.nOOQP1G/V1G/VO,WQ`O1G/ZO,qQXO1G/_O-XQXO1G/aO-oQXO1G/bO.VQXO'#CdO.zQWO'#DaOOQS,59z,59zO/PQWO,59zO/XQ[O,59zO/`QdO'#CoO/gQ[O'#DOOOQP1G/Z1G/ZO#kQdO1G/ZO/nQpO,59]OOQS,59_,59_O#kQdO,59aO/vQWO1G/kOOQS,59c,59cO/{Q!bO,59eO0TQWO'#DhO0`QWO,5:TO0eQWO,5:ZO$xQ[O,5:VO$xQ[O'#EYO0mQWO,5;TO0xQWO,5:XO%_Q[O,5:[OOQS1G/x1G/xOOQS1G/z1G/zOOQS1G/|1G/|O1ZQWO1G/|O1`QdO'#D|OOQS1G0P1G0POOQS1G0V1G0VOOQS1G0X1G0XOOQP7+$Y7+$YOOQP7+$u7+$uO#kQdO7+$uO#kQdO,59{O1nQ[O'#EXO1xQWO1G/fOOQS1G/f1G/fO1xQWO1G/fO2QQtO'#ETO2uQdO'#EeO3PQWO,59ZO3UQXO'#EhO3]QWO,59jO3bQpO7+$uOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%V7+%VO3jQWO1G/PO#kQdO1G/oOOQO1G/u1G/uOOQO1G/q1G/qO3oQWO,5:tOOQO-E8W-E8WO3}QXO1G/vOOQS7+%h7+%hO4UQYO'#CsO%|QWO'#EZO4^QdO,5:hOOQS,5:h,5:hO4lQpO<O!c!}$w!}#O?[#O#P$w#P#Q?g#Q#R2U#R#T$w#T#U?r#U#c$w#c#d@q#d#o$w#o#pAQ#p#q2U#q#rA]#r#sAh#s#y$w#y#z%]#z$f$w$f$g%]$g#BY$w#BY#BZ%]#BZ$IS$w$IS$I_%]$I_$I|$w$I|$JO%]$JO$JT$w$JT$JU%]$JU$KV$w$KV$KW%]$KW&FU$w&FU&FV%]&FV~$wW$zQOy%Qz~%QW%VQoWOy%Qz~%Q~%bf#T~OX%QX^&v^p%Qpq&vqy%Qz#y%Q#y#z&v#z$f%Q$f$g&v$g#BY%Q#BY#BZ&v#BZ$IS%Q$IS$I_&v$I_$I|%Q$I|$JO&v$JO$JT%Q$JT$JU&v$JU$KV%Q$KV$KW&v$KW&FU%Q&FU&FV&v&FV~%Q~&}f#T~oWOX%QX^&v^p%Qpq&vqy%Qz#y%Q#y#z&v#z$f%Q$f$g&v$g#BY%Q#BY#BZ&v#BZ$IS%Q$IS$I_&v$I_$I|%Q$I|$JO&v$JO$JT%Q$JT$JU&v$JU$KV%Q$KV$KW&v$KW&FU%Q&FU&FV&v&FV~%Q^(fSOy%Qz#]%Q#]#^(r#^~%Q^(wSoWOy%Qz#a%Q#a#b)T#b~%Q^)YSoWOy%Qz#d%Q#d#e)f#e~%Q^)kSoWOy%Qz#c%Q#c#d)w#d~%Q^)|SoWOy%Qz#f%Q#f#g*Y#g~%Q^*_SoWOy%Qz#h%Q#h#i*k#i~%Q^*pSoWOy%Qz#T%Q#T#U*|#U~%Q^+RSoWOy%Qz#b%Q#b#c+_#c~%Q^+dSoWOy%Qz#h%Q#h#i+p#i~%Q^+wQ!VUoWOy%Qz~%Q~,QUOY+}Zr+}rs,ds#O+}#O#P,i#P~+}~,iOh~~,lPO~+}_,tWtPOy%Qz!Q%Q!Q![-^![!c%Q!c!i-^!i#T%Q#T#Z-^#Z~%Q^-cWoWOy%Qz!Q%Q!Q![-{![!c%Q!c!i-{!i#T%Q#T#Z-{#Z~%Q^.QWoWOy%Qz!Q%Q!Q![.j![!c%Q!c!i.j!i#T%Q#T#Z.j#Z~%Q^.qWfUoWOy%Qz!Q%Q!Q![/Z![!c%Q!c!i/Z!i#T%Q#T#Z/Z#Z~%Q^/bWfUoWOy%Qz!Q%Q!Q![/z![!c%Q!c!i/z!i#T%Q#T#Z/z#Z~%Q^0PWoWOy%Qz!Q%Q!Q![0i![!c%Q!c!i0i!i#T%Q#T#Z0i#Z~%Q^0pWfUoWOy%Qz!Q%Q!Q![1Y![!c%Q!c!i1Y!i#T%Q#T#Z1Y#Z~%Q^1_WoWOy%Qz!Q%Q!Q![1w![!c%Q!c!i1w!i#T%Q#T#Z1w#Z~%Q^2OQfUoWOy%Qz~%QY2XSOy%Qz!_%Q!_!`2e!`~%QY2lQzQoWOy%Qz~%QX2wQXPOy%Qz~%Q~3QUOY2}Zw2}wx,dx#O2}#O#P3d#P~2}~3gPO~2}_3oQbVOy%Qz~%Q~3zOa~_4RSUPjSOy%Qz!_%Q!_!`2e!`~%Q_4fUjS!PPOy%Qz!O%Q!O!P4x!P!Q%Q!Q![7_![~%Q^4}SoWOy%Qz!Q%Q!Q![5Z![~%Q^5bWoW#ZUOy%Qz!Q%Q!Q![5Z![!g%Q!g!h5z!h#X%Q#X#Y5z#Y~%Q^6PWoWOy%Qz{%Q{|6i|}%Q}!O6i!O!Q%Q!Q![6z![~%Q^6nSoWOy%Qz!Q%Q!Q![6z![~%Q^7RSoW#ZUOy%Qz!Q%Q!Q![6z![~%Q^7fYoW#ZUOy%Qz!O%Q!O!P5Z!P!Q%Q!Q![7_![!g%Q!g!h5z!h#X%Q#X#Y5z#Y~%Q_8ZQpVOy%Qz~%Q^8fUjSOy%Qz!O%Q!O!P4x!P!Q%Q!Q![7_![~%Q_8}S#WPOy%Qz!Q%Q!Q![5Z![~%Q~9`RjSOy%Qz{9i{~%Q~9nSoWOy9iyz9zz{:o{~9i~9}ROz9zz{:W{~9z~:ZTOz9zz{:W{!P9z!P!Q:j!Q~9z~:oOR~~:tUoWOy9iyz9zz{:o{!P9i!P!Q;W!Q~9i~;_QR~oWOy%Qz~%Q^;jY#ZUOy%Qz!O%Q!O!P5Z!P!Q%Q!Q![7_![!g%Q!g!h5z!h#X%Q#X#Y5z#Y~%QX<_S]POy%Qz![%Q![!]RUOy%Qz!c%Q!c!}>e!}#T%Q#T#o>e#o~%QX>lY!YPoWOy%Qz}%Q}!O>e!O!Q%Q!Q![>e![!c%Q!c!}>e!}#T%Q#T#o>e#o~%QX?aQxPOy%Qz~%Q^?lQvUOy%Qz~%QX?uSOy%Qz#b%Q#b#c@R#c~%QX@WSoWOy%Qz#W%Q#W#X@d#X~%QX@kQ!`PoWOy%Qz~%QX@tSOy%Qz#f%Q#f#g@d#g~%QXAVQ!RPOy%Qz~%Q_AbQ!QVOy%Qz~%QZAmS!PPOy%Qz!_%Q!_!`2e!`~%Q",tokenizers:[ue,ce,se,0,1,2,3],topRules:{StyleSheet:[0,4]},specialized:[{term:94,get:function(t){return le[t]||-1}},{term:56,get:function(t){return he[t]||-1}},{term:95,get:function(t){return fe[t]||-1}}],tokenPrec:1078}),pe=n(4),ge=null;function me(){if(!ge&&"object"==typeof document&&document.body){var t=[];for(var e in document.body.style)/[A-Z]|^-|^(item|length)$/.test(e)||t.push(e);ge=t.sort().map((function(t){return{type:"property",label:t}}))}return ge||[]}var ve=["active","after","before","checked","default","disabled","empty","enabled","first-child","first-letter","first-line","first-of-type","focus","hover","in-range","indeterminate","invalid","lang","last-child","last-of-type","link","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-of-type","only-child","optional","out-of-range","placeholder","read-only","read-write","required","root","selection","target","valid","visited"].map((function(t){return{type:"class",label:t}})),ye=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","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","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","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","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","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","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","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","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","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","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","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","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","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","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"].map((function(t){return{type:"keyword",label:t}})).concat(["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","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","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","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","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","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map((function(t){return{type:"constant",label:t}}))),be=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map((function(t){return{type:"type",label:t}})),Oe=/^[\w-]*/,we=c.b.define({parser:de.configure({props:[c.p.add({Declaration:Object(c.g)()}),c.l.add({Block:c.k}),Object(pe.c)({"import charset namespace keyframes":pe.d.definitionKeyword,"media supports":pe.d.controlKeyword,"from to selector":pe.d.keyword,NamespaceName:pe.d.namespace,KeyframeName:pe.d.labelName,TagName:pe.d.tagName,ClassName:pe.d.className,PseudoClassName:pe.d.constant(pe.d.className),IdName:pe.d.labelName,"FeatureName PropertyName":pe.d.propertyName,AttributeName:pe.d.attributeName,NumberLiteral:pe.d.number,KeywordQuery:pe.d.keyword,UnaryQueryOp:pe.d.operatorKeyword,"CallTag ValueName":pe.d.atom,VariableName:pe.d.variableName,Callee:pe.d.operatorKeyword,Unit:pe.d.unit,"UniversalSelector NestingSelector":pe.d.definitionOperator,AtKeyword:pe.d.keyword,MatchOp:pe.d.compareOperator,"ChildOp SiblingOp, LogicOp":pe.d.logicOperator,BinOp:pe.d.arithmeticOperator,Important:pe.d.modifier,Comment:pe.d.blockComment,ParenthesizedContent:pe.d.special(pe.d.name),ColorLiteral:pe.d.color,StringLiteral:pe.d.string,":":pe.d.punctuation,"PseudoOp #":pe.d.derefOperator,"; ,":pe.d.separator,"( )":pe.d.paren,"[ ]":pe.d.squareBracket,"{ }":pe.d.brace})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}}),ke=we.data.of({autocomplete:function(t){var e=t.state,n=t.pos,r=Object(c.v)(e).resolveInner(n,-1);if("PropertyName"==r.name)return{from:r.from,options:me(),span:Oe};if("ValueName"==r.name)return{from:r.from,options:ye,span:Oe};if("PseudoClassName"==r.name)return{from:r.from,options:ve,span:Oe};if("TagName"==r.name){for(var i=r.parent;i;i=i.parent)if("Block"==i.name)return{from:r.from,options:me(),span:Oe};return{from:r.from,options:be,span:Oe}}if(!t.explicit)return null;var o=r.resolve(n),a=o.childBefore(n);return a&&":"==a.name&&"PseudoClassSelector"==o.name?{from:n,options:ve,span:Oe}:a&&":"==a.name&&"Declaration"==o.name||"ArgList"==o.name?{from:n,options:ye,span:Oe}:"Block"==o.name?{from:n,options:me(),span:Oe}:null}});function xe(){return new c.e(we,ke)}var _e=276,Se=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Ee=new Pt.a({start:!1,shift:function(t,e){return 4==e||5==e||281==e?t:282==e},strict:!1}),Ce=new Pt.b((function(t,e){var n=t.next;(125==n||-1==n||e.context)&&e.canShift(279)&&t.acceptToken(279)}),{contextual:!0,fallback:!0}),Te=new Pt.b((function(t,e){var n,r=t.next;Se.indexOf(r)>-1||(47!=r||47!=(n=t.peek(1))&&42!=n)&&125!=r&&59!=r&&-1!=r&&!e.context&&e.canShift(275)&&t.acceptToken(275)}),{contextual:!0}),Ae=new Pt.b((function(t,e){var n=t.next;if((43==n||45==n)&&(t.advance(),n==t.next)){t.advance();var r=!e.context&&e.canShift(1);t.acceptToken(r?1:2)}}),{contextual:!0}),De=new Pt.b((function(t){for(var e=!1,n=0;;n++){var r=t.next;if(r<0){n&&t.acceptToken(_e);break}if(96==r){n?t.acceptToken(_e):t.acceptToken(278,1);break}if(123==r&&e){1==n?t.acceptToken(277,1):t.acceptToken(_e,-1);break}if(10==r&&n){t.advance(),t.acceptToken(_e);break}92==r&&t.advance(),e=36==r,t.advance()}}));var Me={__proto__:null,export:16,as:21,from:25,default:30,async:35,function:36,this:46,true:54,false:54,void:60,typeof:64,null:78,super:80,new:114,await:131,yield:133,delete:134,class:144,extends:146,public:189,private:189,protected:189,readonly:191,instanceof:212,in:214,const:216,import:248,keyof:299,unique:303,infer:309,is:343,abstract:363,implements:365,type:367,let:370,var:372,interface:379,enum:383,namespace:389,module:391,declare:395,global:399,for:420,of:429,while:432,with:436,do:440,if:444,else:446,switch:450,case:456,try:462,catch:464,finally:466,return:470,throw:474,break:478,continue:482,debugger:486},je={__proto__:null,async:101,get:103,set:105,public:153,private:153,protected:153,static:155,abstract:157,override:159,readonly:165,new:347},Ne={__proto__:null,"<":121},Pe=Pt.c.deserialize({version:13,states:"$1WO`QYOOO'QQ!LdO'#CgO'XOSO'#DSO)dQYO'#DXO)tQYO'#DdO){QYO'#DnO-xQYO'#DtOOQO'#EX'#EXO.]QWO'#EWO.bQWO'#EWOOQ!LS'#Eb'#EbO0aQ!LdO'#IqO2wQ!LdO'#IrO3eQWO'#EvO3jQpO'#F]OOQ!LS'#FO'#FOO3rO!bO'#FOO4QQWO'#FdO5_QWO'#FcOOQ!LS'#Ir'#IrOOQ!LQ'#Iq'#IqOOQQ'#J['#J[O5dQWO'#HjO5iQ!LYO'#HkOOQQ'#Ic'#IcOOQQ'#Hl'#HlQ`QYOOO){QYO'#DfO5qQWO'#GWO5vQ#tO'#ClO6UQWO'#EVO6aQWO'#EcO6fQ#tO'#E}O7QQWO'#GWO7VQWO'#G[O7bQWO'#G[O7pQWO'#G_O7pQWO'#G`O7pQWO'#GbO5qQWO'#GeO8aQWO'#GhO9oQWO'#CcO:PQWO'#GuO:XQWO'#G{O:XQWO'#G}O`QYO'#HPO:XQWO'#HRO:XQWO'#HUO:^QWO'#H[O:cQ!LZO'#H`O){QYO'#HbO:nQ!LZO'#HdO:yQ!LZO'#HfO5iQ!LYO'#HhO){QYO'#IsOOOS'#Hn'#HnO;UOSO,59nOOQ!LS,59n,59nO=gQbO'#CgO=qQYO'#HoO>OQWO'#ItO?}QbO'#ItO'dQYO'#ItO@UQWO,59sO@lQ&jO'#D^OAeQWO'#EXOArQWO'#JPOA}QWO'#JOOBVQWO,5:uOB[QWO'#I}OBcQWO'#DuO5vQ#tO'#EVOBqQWO'#EVOB|Q`O'#E}OOQ!LS,5:O,5:OOCUQYO,5:OOESQ!LdO,5:YOEpQWO,5:`OFZQ!LYO'#I|O7VQWO'#I{OFbQWO'#I{OFjQWO,5:tOFoQWO'#I{OF}QYO,5:rOH}QWO'#ESOJXQWO,5:rOKhQWO'#DhOKoQYO'#DmOKyQ&jO,5:{O){QYO,5:{OOQQ'#En'#EnOOQQ'#Ep'#EpO){QYO,5:}O){QYO,5:}O){QYO,5:}O){QYO,5:}O){QYO,5:}O){QYO,5:}O){QYO,5:}O){QYO,5:}O){QYO,5:}O){QYO,5:}O){QYO,5:}OOQQ'#Et'#EtOLRQYO,5;_OOQ!LS,5;d,5;dOOQ!LS,5;e,5;eONRQWO,5;eOOQ!LS,5;f,5;fO){QYO'#HyONWQ!LYO,5UOOQQ'#If'#IfOOQQ,5>V,5>VOOQQ-E;j-E;jO!+SQ!LdO,5:QOOQ!LQ'#Co'#CoO!+sQ#tO,5O,5>OO!7yQWO,5>OOOQQ,5>Q,5>QO!7yQWO,5>QOOQQ,5>S,5>SO!8OQ`O,5?_OOOS-E;l-E;lOOQ!LS1G/Y1G/YO!8TQbO,5>ZO){QYO,5>ZOOQO-E;m-E;mO!8_QWO,5?`O!8gQbO,5?`O!8nQWO,5?jOOQ!LS1G/_1G/_O!8vQpO'#DQOOQO'#Iv'#IvO){QYO'#IvO!9eQpO'#IvO!:SQpO'#D_O!:eQ&jO'#D_O!SQ&jO'#D_O){QYO,5?kO!>^QWO'#HtO!8nQWO,5?jOOQ!LQ1G0a1G0aO!?jQ&jO'#DxOOQ!LS,5:a,5:aO){QYO,5:aOH}QWO,5:aO!?qQWO,5:aO:^QWO,5:qO!,lQpO,5:qO!,tQ#tO,5:qO5vQ#tO,5:qOOQ!LS1G/j1G/jOOQ!LS1G/z1G/zOOQ!LQ'#ER'#ERO){QYO,5?hO!?|Q!LYO,5?hO!@_Q!LYO,5?hO!@fQWO,5?gO!@nQWO'#HvO!@fQWO,5?gOOQ!LQ1G0`1G0`O7VQWO,5?gOOQ!LS1G0^1G0^O!AYQ!LdO1G0^O!AyQ!LbO,5:nOOQ!LS'#Fm'#FmO!BgQ!LdO'#IlOF}QYO1G0^O!DfQ#tO'#IwO!DpQWO,5:SO!DuQbO'#IxO){QYO'#IxO!EPQWO,5:XOOQ!LS'#DQ'#DQOOQ!LS1G0g1G0gO!EUQWO1G0gO!GgQ!LdO1G0iO!GnQ!LdO1G0iO!JRQ!LdO1G0iO!JYQ!LdO1G0iO!LaQ!LdO1G0iO!LtQ!LdO1G0iO# eQ!LdO1G0iO# lQ!LdO1G0iO#$PQ!LdO1G0iO#$WQ!LdO1G0iO#%{Q!LdO1G0iO#(uQ7^O'#CgO#*pQ7^O1G0yO#,kQ7^O'#IrOOQ!LS1G1P1G1PO#-OQ!LdO,5>eOOQ!LQ-E;w-E;wO#-oQ!LdO1G0iOOQ!LS1G0i1G0iO#/qQ!LdO1G0|O#0bQpO,5;oO#0gQpO,5;pO#0lQpO'#FWO#1QQWO'#FVOOQO'#JU'#JUOOQO'#Hw'#HwO#1VQpO1G1XOOQ!LS1G1X1G1XOOOO1G1b1G1bO#1eQ7^O'#IqO#1oQWO,5;yOLRQYO,5;yOOOO-E;v-E;vOOQ!LS1G1U1G1UOOQ!LS,5;{,5;{O#1tQpO,5;{OOQ!LS,59`,59`OH}QWO'#InOOOS'#Hm'#HmO#1yOSO,59dOOQ!LS,59d,59dO){QYO1G1hO!(eQWO'#H{O#2UQWO,5SQWO'#J_O#>_QWO,5=[OOQQ1G.i1G.iO#>dQ!LYO1G.iO#>oQWO1G.iO!(ZQWO1G.iO5iQ!LYO1G.iO#>tQbO,5?|O#?OQWO,5?|O#?ZQYO,5=cO#?bQWO,5=cO7VQWO,5?|OOQQ1G2{1G2{O`QYO1G2{OOQQ1G3R1G3ROOQQ1G3T1G3TO:XQWO1G3VO#?gQYO1G3XO#CbQYO'#HWOOQQ1G3[1G3[O:^QWO1G3bO#CoQWO1G3bO5iQ!LYO1G3fOOQQ1G3h1G3hOOQ!LQ'#Ft'#FtO5iQ!LYO1G3jO5iQ!LYO1G3lOOOS1G4y1G4yO#CwQ`O,5`,5>`O7VQWO,5>`OOQO-E;r-E;rOOQ!LQ'#EO'#EOO#FbQ!LrO'#EPO!?bQ&jO'#DyOOQO'#Hs'#HsO#F|Q&jO,5:dOOQ!LS,5:d,5:dO#GTQ&jO'#DyO#GfQ&jO'#DyO#GmQ&jO'#EUO#GpQ&jO'#EPO#G}Q&jO'#EPO!?bQ&jO'#EPO#HbQWO1G/{O#HgQ`O1G/{OOQ!LS1G/{1G/{O){QYO1G/{OH}QWO1G/{OOQ!LS1G0]1G0]O:^QWO1G0]O!,lQpO1G0]O!,tQ#tO1G0]O#HnQ!LdO1G5SO){QYO1G5SO#IOQ!LYO1G5SO#IaQWO1G5RO7VQWO,5>bOOQO,5>b,5>bO#IiQWO,5>bOOQO-E;t-E;tO#IaQWO1G5RO#IwQ!LdO,59gO#KvQ!LdO,5g,5>gO$'gQWO,5>gOOQ!LS1G1{1G1{P$'lQWO'#H{POQ!LS-E;y-E;yO$(]Q#tO1G2WO$)OQ#tO1G2YO$)YQ#tO1G2[OOQ!LS1G1t1G1tO$)aQWO'#HzO$)oQWO,5?sO$)oQWO,5?sO$)wQWO,5?sO$*SQWO,5?sOOQO1G1v1G1vO$*bQ#tO1G1uO$*rQWO'#H|O$+SQWO,5?tOH}QWO,5?tO$+[Q`O,5?tOOQ!LS1G1y1G1yO5iQ!LYO,5j,5>jOOQO-E;|-E;|O!-lQ&jO,59iO){QYO,59iO$,gQWO1G1pOJ^QWO1G1wO$,lQ!LdO7+'TOOQ!LS7+'T7+'TOF}QYO7+'TOOQ!LS7+%W7+%WO$-]Q`O'#JZO#HbQWO7+'xO$-gQWO7+'xO$-oQ`O7+'xOOQQ7+'x7+'xOH}QWO7+'xO){QYO7+'xOH}QWO7+'xOOQO1G.v1G.vO$-yQ!LbO'#CgO$.ZQ!LbO,5r,5>rOOQO-El,5>lOOQ!LQ-En,5>nOOQO-E[,5>[OOQO-E;n-E;nOOQO,5>a,5>aOOQO-E;s-E;sO!,lQpO1G/eOOQO1G3z1G3zO:^QWO,5:eOOQO,5:k,5:kO){QYO,5:kO$8tQ!LYO,5:kO$9PQ!LYO,5:kO!,lQpO,5:eOOQO-E;q-E;qOOQ!LS1G0O1G0OO!?bQ&jO,5:eO$9_Q&jO,5:eO$9pQ!LrO,5:kO$:[Q&jO,5:eO!?bQ&jO,5:kOOQO,5:p,5:pO$:cQ&jO,5:kO$:pQ!LYO,5:kOOQ!LS7+%g7+%gO#HbQWO7+%gO#HgQ`O7+%gOOQ!LS7+%w7+%wO:^QWO7+%wO!,lQpO7+%wO$;UQ!LdO7+*nO){QYO7+*nOOQO1G3|1G3|O7VQWO1G3|O$;fQWO7+*mO$;nQ!LdO1G2WO$=pQ!LdO1G2YO$?rQ!LdO1G1uO$AzQ#tO,5>]OOQO-E;o-E;oO$BUQbO,5>^O){QYO,5>^OOQO-E;p-E;pO$B`QWO1G5OO$BhQ7^O1G0^O$DoQ7^O1G0iO$DvQ7^O1G0iO$FwQ7^O1G0iO$GOQ7^O1G0iO$HsQ7^O1G0iO$IWQ7^O1G0iO$KeQ7^O1G0iO$KlQ7^O1G0iO$MmQ7^O1G0iO$MtQ7^O1G0iO% iQ7^O1G0iO% |Q!LdO<eOOOO7+'P7+'POOOS1G4t1G4tOOQ!LS1G4R1G4ROJ^QWO7+'vO%&vQWO,5>fO5qQWO,5>fOOQO-E;x-E;xO%'UQWO1G5_O%'UQWO1G5_O%'^QWO1G5_O%'iQ`O,5>hO%'sQWO,5>hOH}QWO,5>hOOQO-E;z-E;zO%'xQ`O1G5`O%(SQWO1G5`OOQO1G2O1G2OOOQO1G2P1G2PO5iQ!LYO1G2PO$+fQWO1G2PO5iQ!LYO1G2OO%([QWO1G2QOH}QWO1G2QOOQO1G2R1G2RO5iQ!LYO1G2UO!,lQpO1G2OO#4jQWO1G2PO%(aQWO1G2QO%(iQWO1G2POJ^QWO7+*]OOQ!LS1G/T1G/TO%(tQWO1G/TOOQ!LS7+'[7+'[O%(yQ#tO7+'cO%)ZQ!LdO<q,5>qO%+VQWO,5>qO#;kQWO,5>qOOQO-EpOOQO-EQQ`O1G4SO%>[QWO7+*zOOQO7+'k7+'kO5iQ!LYO7+'kOOQO7+'j7+'jO$+fQWO7+'lO%>dQ`O7+'lOOQO7+'p7+'pO5iQ!LYO7+'jO$+fQWO7+'kO%>kQWO7+'lOH}QWO7+'lO#4jQWO7+'kO%>pQ#tO<zQ`O,5>kOOQO-E;}-E;}O#HbQWOANAOOOQQANAOANAOOH}QWOANAOO%?UQ!LbO7+'nOOQQAN=dAN=dO5qQWO1G4]OOQO1G4]1G4]O%?cQWO1G4]O%?hQWO7++RO%?hQWO7++RO5iQ!LYOANAkO%?pQWOANAkOOQQANAkANAkO%?uQWOANAOO%?}Q`OANAOOOQQANAVANAVOOQQANAWANAWO%@XQWO,5>mOOQO-E}AN>}O%C|Q!LdO<wAN>wOOQOAN>qAN>qO%/yQ!LdOAN>wO:^QWOAN>qO){QYOAN>wO!,lQpOAN>qO&&xQ!LYOAN>wO&'TQ7^O<WOz%{O~Ou&OO!S&YO!T&RO!U&RO'X$aO~O]&POj&PO|&SO'd%|O!O'iP!O'tP~P@ZOz'qX}'qX!X'qX!_'qX'n'qX~O!w'qX#S!{X!O'qX~PASO!w&ZOz'sX}'sX~O}&[Oz'rX~Oz&^O~O!w#dO~PASOR&bO!P&_O!k&aO'W$_O~Ob&gO!`$WO'W$_O~Or$mO!`$lO~O!O&hO~P`Or!zOs!zOu!{O!^!xO!`!yO'aQOP!baY!bai!ba}!ba!]!ba!f!ba#W!ba#X!ba#Y!ba#Z!ba#[!ba#]!ba#^!ba#_!ba#a!ba#c!ba#e!ba#f!ba'n!ba'u!ba'v!ba~O^!ba'R!baz!ba!_!ba'c!ba!P!ba$|!ba!X!ba~PC]O!_&iO~O!X!vO!w&kO'n&jO}'pX^'pX'R'pX~O!_'pX~PEuO}&oO!_'oX~O!_&qO~Ou$sO!P$tO#R&rO'W$_O~OPTOQTO]cOa!jOb!iOgcOiTOjcOkcOnTOpTOuROwcOxcOycO!PSO!ZkO!`UO!cTO!dTO!eTO!fTO!gTO!j!hO#p!kO#t^O'W9VO'aQO'mYO'zaO~O]#pOg#}Oi#qOj#pOk#pOn$OOp9iOu#wO!P#xO!Z:lO!`#uO#R9oO#p$SO$Z9kO$]9mO$`$TO'W&vO'a#rO~O#S&xO~O]#pOg#}Oi#qOj#pOk#pOn$OOp$POu#wO!P#xO!Z$UO!`#uO#R$VO#p$SO$Z$QO$]$RO$`$TO'W&vO'a#rO~O'['kP~PJ^O|&|O!_'lP~P){O'd'OO'mYO~OP9SOQ9SO]cOa:jOb!iOgcOi9SOjcOkcOn9SOp9SOuROwcOxcOycO!P!bO!Z9UO!`UO!c9SO!d9SO!e9SO!f9SO!g9SO!j!hO#p!kO#t^O'W'^O'aQO'mYO'z:hO~O!`!yO~O}#aO^$Xa'R$Xa!_$Xaz$Xa!P$Xa$|$Xa!X$Xa~O#`'eO~PH}O!X'gO!P'wX#s'wX#v'wX#}'wX~Or'hO~PNyOr'hO!P'wX#s'wX#v'wX#}'wX~O!P'jO#s'nO#v'iO#}'oO~O|'rO~PLRO#v#eO#}'uO~Or$aXu$aX!^$aX'n$aX'u$aX'v$aX~OReX}eX!weX'[eX'[$aX~P!!cOj'wO~O'O'yO'P'xO'Q'{O~Or'}Ou(OO'n#ZO'u(QO'v(SO~O'['|O~P!#lO'[(VO~O]#pOg#}Oi#qOj#pOk#pOn$OOp9iOu#wO!P#xO!Z:lO!`#uO#R9oO#p$SO$Z9kO$]9mO$`$TO'a#rO~O|(ZO'W(WO!_'{P~P!$ZO#S(]O~O|(aO'W(^Oz'|P~P!$ZO^(jOi(oOu(gO!S(mO!T(fO!U(fO!`(dO!t(nO$s(iO'X$aO'd(cO~O!O(lO~P!&RO!^!xOr'`Xu'`X'n'`X'u'`X'v'`X}'`X!w'`X~O'['`X#i'`X~P!&}OR(rO!w(qO}'_X'['_X~O}(sO'['^X~O'W(uO~O!`(zO~O'W&vO~O!`(dO~Ou$sO|!qO!P$tO#Q!tO#R!qO'W$_O!_'oP~O!X!vO#S)OO~OP#]OY#cOi#QOr!zOs!zOu!{O!]#SO!^!xO!`!yO!f#]O#W#OO#X#PO#Y#PO#Z#PO#[#RO#]#SO#^#SO#_#SO#a#TO#c#VO#e#XO#f#YO'aQO'n#ZO'u!|O'v!}O~O^!Ya}!Ya'R!Yaz!Ya!_!Ya'c!Ya!P!Ya$|!Ya!X!Ya~P!)`OR)WO!P&_O!k)VO$|)UO']$bO~O'W$yO'['^P~O!X)ZO!P'ZX^'ZX'R'ZX~O!`$WO']$bO~O!`$WO'W$_O']$bO~O!X!vO#S&xO~O$})gO'W)cO!O(TP~O})hO[(SX~O'd'OO~OY)lO~O[)mO~O!P$jO'W$_O'X$aO[(SP~Ou$sO|)rO!P$tO'W$_Oz'rP~O]&VOj&VO|)sO'd'OO!O'tP~O})tO^(PX'R(PX~O!w)xO']$bO~OR){O!P#xO']$bO~O!P)}O~Or*PO!PSO~O!j*UO~Ob*ZO~O'W(uO!O(RP~Ob$hO~O$}tO'W$yO~P8tOY*aO[*`O~OPTOQTO]cOanObmOgcOiTOjcOkcOnTOpTOuROwcOxcOycO!ZkO!`UO!cTO!dTO!eTO!fTO!gTO!jlO#t^O${qO'aQO'mYO'zaO~O!P!bO#p!kO'W9VO~P!0uO[*`O^$ZO'R$ZO~O^*eO#`*gO%P*gO%Q*gO~P){O!`%^O~O%p*lO~O!P*nO~O&Q*qO&R*pOP&OaQ&OaW&Oa]&Oa^&Oaa&Oab&Oag&Oai&Oaj&Oak&Oan&Oap&Oau&Oaw&Oax&Oay&Oa!P&Oa!Z&Oa!`&Oa!c&Oa!d&Oa!e&Oa!f&Oa!g&Oa!j&Oa#`&Oa#p&Oa#t&Oa${&Oa$}&Oa%P&Oa%Q&Oa%T&Oa%V&Oa%Y&Oa%Z&Oa%]&Oa%j&Oa%p&Oa%r&Oa%t&Oa%v&Oa%y&Oa&P&Oa&T&Oa&V&Oa&X&Oa&Z&Oa&]&Oa&|&Oa'W&Oa'a&Oa'm&Oa'z&Oa!O&Oa%w&Oa_&Oa%|&Oa~O'W*tO~O'c*wO~Oz&ca}&ca~P!)`O}!]Oz'ha~Oz'ha~P>WO}&[Oz'ra~O}tX}!VX!OtX!O!VX!XtX!X!VX!`!VX!wtX']!VX~O!X+OO!w*}O}#PX}'jX!O#PX!O'jX!X'jX!`'jX']'jX~O!X+QO!`$WO']$bO}!RX!O!RX~O]%}Oj%}Ou&OO'd(cO~OP9SOQ9SO]cOa:jOb!iOgcOi9SOjcOkcOn9SOp9SOuROwcOxcOycO!P!bO!Z9UO!`UO!c9SO!d9SO!e9SO!f9SO!g9SO!j!hO#p!kO#t^O'aQO'mYO'z:hO~O'W9sO~P!:sO}+UO!O'iX~O!O+WO~O!X+OO!w*}O}#PX!O#PX~O}+XO!O'tX~O!O+ZO~O]%}Oj%}Ou&OO'X$aO'd(cO~O!T+[O!U+[O~P!=qOu$sO|+_O!P$tO'W$_Oz&hX}&hX~O^+dO!S+gO!T+cO!U+cO!n+kO!o+iO!p+jO!q+hO!t+lO'X$aO'd(cO'm+aO~O!O+fO~P!>rOR+qO!P&_O!k+pO~O!w+wO}'pa!_'pa^'pa'R'pa~O!X!vO~P!?|O}&oO!_'oa~Ou$sO|+zO!P$tO#Q+|O#R+zO'W$_O}&jX!_&jX~O^!zi}!zi'R!ziz!zi!_!zi'c!zi!P!zi$|!zi!X!zi~P!)`O#S!va}!va!_!va!w!va!P!va^!va'R!vaz!va~P!#lO#S'`XP'`XY'`X^'`Xi'`Xs'`X!]'`X!`'`X!f'`X#W'`X#X'`X#Y'`X#Z'`X#['`X#]'`X#^'`X#_'`X#a'`X#c'`X#e'`X#f'`X'R'`X'a'`X!_'`Xz'`X!P'`X'c'`X$|'`X!X'`X~P!&}O},VO'['kX~P!#lO'[,XO~O},YO!_'lX~P!)`O!_,]O~Oz,^O~OP#]Or!zOs!zOu!{O!^!xO!`!yO!f#]O'aQOY#Vi^#Vii#Vi}#Vi!]#Vi#X#Vi#Y#Vi#Z#Vi#[#Vi#]#Vi#^#Vi#_#Vi#a#Vi#c#Vi#e#Vi#f#Vi'R#Vi'n#Vi'u#Vi'v#Viz#Vi!_#Vi'c#Vi!P#Vi$|#Vi!X#Vi~O#W#Vi~P!EZO#W#OO~P!EZOP#]Or!zOs!zOu!{O!^!xO!`!yO!f#]O#W#OO#X#PO#Y#PO#Z#PO'aQOY#Vi^#Vi}#Vi!]#Vi#[#Vi#]#Vi#^#Vi#_#Vi#a#Vi#c#Vi#e#Vi#f#Vi'R#Vi'n#Vi'u#Vi'v#Viz#Vi!_#Vi'c#Vi!P#Vi$|#Vi!X#Vi~Oi#Vi~P!GuOi#QO~P!GuOP#]Oi#QOr!zOs!zOu!{O!^!xO!`!yO!f#]O#W#OO#X#PO#Y#PO#Z#PO#[#RO'aQO^#Vi}#Vi#a#Vi#c#Vi#e#Vi#f#Vi'R#Vi'n#Vi'u#Vi'v#Viz#Vi!_#Vi'c#Vi!P#Vi$|#Vi!X#Vi~OY#Vi!]#Vi#]#Vi#^#Vi#_#Vi~P!JaOY#cO!]#SO#]#SO#^#SO#_#SO~P!JaOP#]OY#cOi#QOr!zOs!zOu!{O!]#SO!^!xO!`!yO!f#]O#W#OO#X#PO#Y#PO#Z#PO#[#RO#]#SO#^#SO#_#SO#a#TO'aQO^#Vi}#Vi#c#Vi#e#Vi#f#Vi'R#Vi'n#Vi'v#Viz#Vi!_#Vi'c#Vi!P#Vi$|#Vi!X#Vi~O'u#Vi~P!MXO'u!|O~P!MXOP#]OY#cOi#QOr!zOs!zOu!{O!]#SO!^!xO!`!yO!f#]O#W#OO#X#PO#Y#PO#Z#PO#[#RO#]#SO#^#SO#_#SO#a#TO#c#VO'aQO'u!|O^#Vi}#Vi#e#Vi#f#Vi'R#Vi'n#Viz#Vi!_#Vi'c#Vi!P#Vi$|#Vi!X#Vi~O'v#Vi~P# sO'v!}O~P# sOP#]OY#cOi#QOr!zOs!zOu!{O!]#SO!^!xO!`!yO!f#]O#W#OO#X#PO#Y#PO#Z#PO#[#RO#]#SO#^#SO#_#SO#a#TO#c#VO#e#XO'aQO'u!|O'v!}O~O^#Vi}#Vi#f#Vi'R#Vi'n#Viz#Vi!_#Vi'c#Vi!P#Vi$|#Vi!X#Vi~P#$_OPZXYZXiZXrZXsZXuZX!]ZX!^ZX!`ZX!fZX!wZX#ScX#WZX#XZX#YZX#ZZX#[ZX#]ZX#^ZX#_ZX#aZX#cZX#eZX#fZX#kZX'aZX'nZX'uZX'vZX}ZX!OZX~O#iZX~P#&rOP#]OY9gOi9[Or!zOs!zOu!{O!]9^O!^!xO!`!yO!f#]O#W9YO#X9ZO#Y9ZO#Z9ZO#[9]O#]9^O#^9^O#_9^O#a9_O#c9aO#e9cO#f9dO'aQO'n#ZO'u!|O'v!}O~O#i,`O~P#(|OP'fXY'fXi'fXr'fXs'fXu'fX!]'fX!^'fX!`'fX!f'fX#W'fX#X'fX#Y'fX#Z'fX#['fX#]'fX#^'fX#a'fX#c'fX#e'fX#f'fX'a'fX'n'fX'u'fX'v'fX}'fX~O!w9hO#k9hO#_'fX#i'fX!O'fX~P#*wO^&ma}&ma'R&ma!_&ma'c&maz&ma!P&ma$|&ma!X&ma~P!)`OP#ViY#Vi^#Vii#Vis#Vi}#Vi!]#Vi!^#Vi!`#Vi!f#Vi#W#Vi#X#Vi#Y#Vi#Z#Vi#[#Vi#]#Vi#^#Vi#_#Vi#a#Vi#c#Vi#e#Vi#f#Vi'R#Vi'a#Viz#Vi!_#Vi'c#Vi!P#Vi$|#Vi!X#Vi~P!#lO^#ji}#ji'R#jiz#ji!_#ji'c#ji!P#ji$|#ji!X#ji~P!)`O#v,bO~O#v,cO~O!X'gO!w,dO!P#zX#s#zX#v#zX#}#zX~O|,eO~O!P'jO#s,gO#v'iO#},hO~O}9eO!O'eX~P#(|O!O,iO~O#},kO~O'O'yO'P'xO'Q,nO~O],qOj,qOz,rO~O}cX!XcX!_cX!_$aX'ncX~P!!cO!_,xO~P!#lO},yO!X!vO'n&jO!_'{X~O!_-OO~Oz$aX}$aX!X$hX~P!!cO}-QOz'|X~P!#lO!X-SO~Oz-UO~O|(ZO'W$_O!_'{P~Oi-YO!X!vO!`$WO']$bO'n&jO~O!X)ZO~O!O-`O~P!&RO!T-aO!U-aO'X$aO'd(cO~Ou-cO'd(cO~O!t-dO~O'W$yO}&rX'[&rX~O}(sO'['^a~Or-iOs-iOu-jO'noa'uoa'voa}oa!woa~O'[oa#ioa~P#5{Or'}Ou(OO'n$Ya'u$Ya'v$Ya}$Ya!w$Ya~O'[$Ya#i$Ya~P#6qOr'}Ou(OO'n$[a'u$[a'v$[a}$[a!w$[a~O'[$[a#i$[a~P#7dO]-kO~O#S-lO~O'[$ja}$ja#i$ja!w$ja~P!#lO#S-oO~OR-xO!P&_O!k-wO$|-vO~O'[-yO~O]#pOi#qOj#pOk#pOn$OOp9iOu#wO!P#xO!Z:lO!`#uO#R9oO#p$SO$Z9kO$]9mO$`$TO'a#rO~Og-{O'W-zO~P#9ZO!X)ZO!P'Za^'Za'R'Za~O#S.RO~OYZX}cX!OcX~O}.SO!O(TX~O!O.UO~OY.VO~O'W)cO~O!P$jO'W$_O[&zX}&zX~O})hO[(Sa~O!_.[O~P!)`O].^O~OY._O~O[.`O~OR-xO!P&_O!k-wO$|-vO']$bO~O})tO^(Pa'R(Pa~O!w.fO~OR.iO!P#xO~O'd'OO!O(QP~OR.sO!P.oO!k.rO$|.qO']$bO~OY.}O}.{O!O(RX~O!O/OO~O[/QO^$ZO'R$ZO~O]/RO~O#_/TO%n/UO~P0zO!w#dO#_/TO%n/UO~O^/VO~P){O^/XO~O%w/]OP%uiQ%uiW%ui]%ui^%uia%uib%uig%uii%uij%uik%uin%uip%uiu%uiw%uix%uiy%ui!P%ui!Z%ui!`%ui!c%ui!d%ui!e%ui!f%ui!g%ui!j%ui#`%ui#p%ui#t%ui${%ui$}%ui%P%ui%Q%ui%T%ui%V%ui%Y%ui%Z%ui%]%ui%j%ui%p%ui%r%ui%t%ui%v%ui%y%ui&P%ui&T%ui&V%ui&X%ui&Z%ui&]%ui&|%ui'W%ui'a%ui'm%ui'z%ui!O%ui_%ui%|%ui~O_/cO!O/aO%|/bO~P`O!PSO!`/fO~O}#aO'c$Xa~Oz&ci}&ci~P!)`O}!]Oz'hi~O}&[Oz'ri~Oz/jO~O}!Ra!O!Ra~P#(|O]%}Oj%}O|/pO'd(cO}&dX!O&dX~P@ZO}+UO!O'ia~O]&VOj&VO|)sO'd'OO}&iX!O&iX~O}+XO!O'ta~Oz'si}'si~P!)`O^$ZO!X!vO!`$WO!f/{O!w/yO'R$ZO']$bO'n&jO~O!O0OO~P!>rO!T0PO!U0PO'X$aO'd(cO'm+aO~O!S0QO~P#GTO!PSO!S0QO!q0SO!t0TO~P#GTO!S0QO!o0VO!p0VO!q0SO!t0TO~P#GTO!P&_O~O!P&_O~P!#lO}'pi!_'pi^'pi'R'pi~P!)`O!w0`O}'pi!_'pi^'pi'R'pi~O}&oO!_'oi~Ou$sO!P$tO#R0bO'W$_O~O#SoaPoaYoa^oaioa!]oa!^oa!`oa!foa#Woa#Xoa#Yoa#Zoa#[oa#]oa#^oa#_oa#aoa#coa#eoa#foa'Roa'aoa!_oazoa!Poa'coa$|oa!Xoa~P#5{O#S$YaP$YaY$Ya^$Yai$Yas$Ya!]$Ya!^$Ya!`$Ya!f$Ya#W$Ya#X$Ya#Y$Ya#Z$Ya#[$Ya#]$Ya#^$Ya#_$Ya#a$Ya#c$Ya#e$Ya#f$Ya'R$Ya'a$Ya!_$Yaz$Ya!P$Ya'c$Ya$|$Ya!X$Ya~P#6qO#S$[aP$[aY$[a^$[ai$[as$[a!]$[a!^$[a!`$[a!f$[a#W$[a#X$[a#Y$[a#Z$[a#[$[a#]$[a#^$[a#_$[a#a$[a#c$[a#e$[a#f$[a'R$[a'a$[a!_$[az$[a!P$[a'c$[a$|$[a!X$[a~P#7dO#S$jaP$jaY$ja^$jai$jas$ja}$ja!]$ja!^$ja!`$ja!f$ja#W$ja#X$ja#Y$ja#Z$ja#[$ja#]$ja#^$ja#_$ja#a$ja#c$ja#e$ja#f$ja'R$ja'a$ja!_$jaz$ja!P$ja!w$ja'c$ja$|$ja!X$ja~P!#lO^!zq}!zq'R!zqz!zq!_!zq'c!zq!P!zq$|!zq!X!zq~P!)`O}&eX'[&eX~PJ^O},VO'['ka~O|0jO}&fX!_&fX~P){O},YO!_'la~O},YO!_'la~P!)`O#i!ba!O!ba~PC]O#i!Ya}!Ya!O!Ya~P#(|O!P0}O#t^O#{1OO~O!O1SO~O'c1TO~P!#lO^$Uq}$Uq'R$Uqz$Uq!_$Uq'c$Uq!P$Uq$|$Uq!X$Uq~P!)`Oz1UO~O],qOj,qO~Or'}Ou(OO'v(SO'n$ti'u$ti}$ti!w$ti~O'[$ti#i$ti~P$'tOr'}Ou(OO'n$vi'u$vi'v$vi}$vi!w$vi~O'[$vi#i$vi~P$(gO#i1VO~P!#lO|1XO'W$_O}&nX!_&nX~O},yO!_'{a~O},yO!X!vO!_'{a~O},yO!X!vO'n&jO!_'{a~O'[$ci}$ci#i$ci!w$ci~P!#lO|1`O'W(^Oz&pX}&pX~P!$ZO}-QOz'|a~O}-QOz'|a~P!#lO!X!vO~O!X!vO#_1jO~Oi1nO!X!vO'n&jO~O}'_i'['_i~P!#lO!w1qO}'_i'['_i~P!#lO!_1tO~O^$Vq}$Vq'R$Vqz$Vq!_$Vq'c$Vq!P$Vq$|$Vq!X$Vq~P!)`O}1xO!P'}X~P!#lO!P&_O$|1{O~O!P&_O$|1{O~P!#lO!P$aX$qZX^$aX'R$aX~P!!cO$q2POrfXufX!PfX'nfX'ufX'vfX^fX'RfX~O$q2PO~O$}2WO'W)cO}&yX!O&yX~O}.SO!O(Ta~OY2[O~O[2]O~O]2`O~OR2bO!P&_O!k2aO$|1{O~O^$ZO'R$ZO~P!#lO!P#xO~P!#lO}2gO!w2iO!O(QX~O!O2jO~Ou(gO!S2sO!T2lO!U2lO!n2rO!o2qO!p2qO!t2pO'X$aO'd(cO'm+aO~O!O2oO~P$0uOR2zO!P.oO!k2yO$|2xO~OR2zO!P.oO!k2yO$|2xO']$bO~O'W(uO}&xX!O&xX~O}.{O!O(Ra~O'd3TO~O]3VO~O[3XO~O!_3[O~P){O^3^O~O^3^O~P){O#_3`O%n3aO~PEuO_/cO!O3eO%|/bO~P`O!X3gO~O&R3hOP&OqQ&OqW&Oq]&Oq^&Oqa&Oqb&Oqg&Oqi&Oqj&Oqk&Oqn&Oqp&Oqu&Oqw&Oqx&Oqy&Oq!P&Oq!Z&Oq!`&Oq!c&Oq!d&Oq!e&Oq!f&Oq!g&Oq!j&Oq#`&Oq#p&Oq#t&Oq${&Oq$}&Oq%P&Oq%Q&Oq%T&Oq%V&Oq%Y&Oq%Z&Oq%]&Oq%j&Oq%p&Oq%r&Oq%t&Oq%v&Oq%y&Oq&P&Oq&T&Oq&V&Oq&X&Oq&Z&Oq&]&Oq&|&Oq'W&Oq'a&Oq'm&Oq'z&Oq!O&Oq%w&Oq_&Oq%|&Oq~O}#Pi!O#Pi~P#(|O!w3jO}#Pi!O#Pi~O}!Ri!O!Ri~P#(|O^$ZO!w3qO'R$ZO~O^$ZO!X!vO!w3qO'R$ZO~O!T3uO!U3uO'X$aO'd(cO'm+aO~O^$ZO!X!vO!`$WO!f3vO!w3qO'R$ZO']$bO'n&jO~O!S3wO~P$9_O!S3wO!q3zO!t3{O~P$9_O^$ZO!X!vO!f3vO!w3qO'R$ZO'n&jO~O}'pq!_'pq^'pq'R'pq~P!)`O}&oO!_'oq~O#S$tiP$tiY$ti^$tii$tis$ti!]$ti!^$ti!`$ti!f$ti#W$ti#X$ti#Y$ti#Z$ti#[$ti#]$ti#^$ti#_$ti#a$ti#c$ti#e$ti#f$ti'R$ti'a$ti!_$tiz$ti!P$ti'c$ti$|$ti!X$ti~P$'tO#S$viP$viY$vi^$vii$vis$vi!]$vi!^$vi!`$vi!f$vi#W$vi#X$vi#Y$vi#Z$vi#[$vi#]$vi#^$vi#_$vi#a$vi#c$vi#e$vi#f$vi'R$vi'a$vi!_$viz$vi!P$vi'c$vi$|$vi!X$vi~P$(gO#S$ciP$ciY$ci^$cii$cis$ci}$ci!]$ci!^$ci!`$ci!f$ci#W$ci#X$ci#Y$ci#Z$ci#[$ci#]$ci#^$ci#_$ci#a$ci#c$ci#e$ci#f$ci'R$ci'a$ci!_$ciz$ci!P$ci!w$ci'c$ci$|$ci!X$ci~P!#lO}&ea'[&ea~P!#lO}&fa!_&fa~P!)`O},YO!_'li~O#i!zi}!zi!O!zi~P#(|OP#]Or!zOs!zOu!{O!^!xO!`!yO!f#]O'aQOY#Vii#Vi!]#Vi#X#Vi#Y#Vi#Z#Vi#[#Vi#]#Vi#^#Vi#_#Vi#a#Vi#c#Vi#e#Vi#f#Vi#i#Vi'n#Vi'u#Vi'v#Vi}#Vi!O#Vi~O#W#Vi~P$BuO#W9YO~P$BuOP#]Or!zOs!zOu!{O!^!xO!`!yO!f#]O#W9YO#X9ZO#Y9ZO#Z9ZO'aQOY#Vi!]#Vi#[#Vi#]#Vi#^#Vi#_#Vi#a#Vi#c#Vi#e#Vi#f#Vi#i#Vi'n#Vi'u#Vi'v#Vi}#Vi!O#Vi~Oi#Vi~P$D}Oi9[O~P$D}OP#]Oi9[Or!zOs!zOu!{O!^!xO!`!yO!f#]O#W9YO#X9ZO#Y9ZO#Z9ZO#[9]O'aQO#a#Vi#c#Vi#e#Vi#f#Vi#i#Vi'n#Vi'u#Vi'v#Vi}#Vi!O#Vi~OY#Vi!]#Vi#]#Vi#^#Vi#_#Vi~P$GVOY9gO!]9^O#]9^O#^9^O#_9^O~P$GVOP#]OY9gOi9[Or!zOs!zOu!{O!]9^O!^!xO!`!yO!f#]O#W9YO#X9ZO#Y9ZO#Z9ZO#[9]O#]9^O#^9^O#_9^O#a9_O'aQO#c#Vi#e#Vi#f#Vi#i#Vi'n#Vi'v#Vi}#Vi!O#Vi~O'u#Vi~P$IkO'u!|O~P$IkOP#]OY9gOi9[Or!zOs!zOu!{O!]9^O!^!xO!`!yO!f#]O#W9YO#X9ZO#Y9ZO#Z9ZO#[9]O#]9^O#^9^O#_9^O#a9_O#c9aO'aQO'u!|O#e#Vi#f#Vi#i#Vi'n#Vi}#Vi!O#Vi~O'v#Vi~P$KsO'v!}O~P$KsOP#]OY9gOi9[Or!zOs!zOu!{O!]9^O!^!xO!`!yO!f#]O#W9YO#X9ZO#Y9ZO#Z9ZO#[9]O#]9^O#^9^O#_9^O#a9_O#c9aO#e9cO'aQO'u!|O'v!}O~O#f#Vi#i#Vi'n#Vi}#Vi!O#Vi~P$M{O^#gy}#gy'R#gyz#gy!_#gy'c#gy!P#gy$|#gy!X#gy~P!)`OP#ViY#Vii#Vis#Vi!]#Vi!^#Vi!`#Vi!f#Vi#W#Vi#X#Vi#Y#Vi#Z#Vi#[#Vi#]#Vi#^#Vi#_#Vi#a#Vi#c#Vi#e#Vi#f#Vi#i#Vi'a#Vi}#Vi!O#Vi~P!#lO!^!xOP'`XY'`Xi'`Xr'`Xs'`Xu'`X!]'`X!`'`X!f'`X#W'`X#X'`X#Y'`X#Z'`X#['`X#]'`X#^'`X#_'`X#a'`X#c'`X#e'`X#f'`X#i'`X'a'`X'n'`X'u'`X'v'`X}'`X!O'`X~O#i#ji}#ji!O#ji~P#(|O!O4]O~O}&ma!O&ma~P#(|O!X!vO'n&jO}&na!_&na~O},yO!_'{i~O},yO!X!vO!_'{i~Oz&pa}&pa~P!#lO!X4dO~O}-QOz'|i~P!#lO}-QOz'|i~Oz4jO~O!X!vO#_4pO~Oi4qO!X!vO'n&jO~Oz4sO~O'[$eq}$eq#i$eq!w$eq~P!#lO^$Vy}$Vy'R$Vyz$Vy!_$Vy'c$Vy!P$Vy$|$Vy!X$Vy~P!)`O}1xO!P'}a~O!P&_O$|4xO~O!P&_O$|4xO~P!#lO^!zy}!zy'R!zyz!zy!_!zy'c!zy!P!zy$|!zy!X!zy~P!)`OY4{O~O}.SO!O(Ti~O]5QO~O[5RO~O'd'OO}&uX!O&uX~O}2gO!O(Qa~O!O5`O~P$0uOu-cO'd(cO'm+aO~O!S5cO!T5bO!U5bO!t0TO'X$aO'd(cO'm+aO~O!o5dO!p5dO~P%,eO!T5bO!U5bO'X$aO'd(cO'm+aO~O!P.oO~O!P.oO$|5fO~O!P.oO$|5fO~P!#lOR5kO!P.oO!k5jO$|5fO~OY5pO}&xa!O&xa~O}.{O!O(Ri~O]5sO~O!_5tO~O!_5uO~O!_5vO~O!_5vO~P){O^5xO~O!X5{O~O!_5}O~O}'si!O'si~P#(|O^$ZO'R$ZO~P!)`O^$ZO!w6SO'R$ZO~O^$ZO!X!vO!w6SO'R$ZO~O!T6XO!U6XO'X$aO'd(cO'm+aO~O^$ZO!X!vO!f6YO!w6SO'R$ZO'n&jO~O!`$WO']$bO~P%1PO!S6ZO~P%0nO}'py!_'py^'py'R'py~P!)`O#S$eqP$eqY$eq^$eqi$eqs$eq}$eq!]$eq!^$eq!`$eq!f$eq#W$eq#X$eq#Y$eq#Z$eq#[$eq#]$eq#^$eq#_$eq#a$eq#c$eq#e$eq#f$eq'R$eq'a$eq!_$eqz$eq!P$eq!w$eq'c$eq$|$eq!X$eq~P!#lO}&fi!_&fi~P!)`O#i!zq}!zq!O!zq~P#(|Or-iOs-iOu-jOPoaYoaioa!]oa!^oa!`oa!foa#Woa#Xoa#Yoa#Zoa#[oa#]oa#^oa#_oa#aoa#coa#eoa#foa#ioa'aoa'noa'uoa'voa}oa!Ooa~Or'}Ou(OOP$YaY$Yai$Yas$Ya!]$Ya!^$Ya!`$Ya!f$Ya#W$Ya#X$Ya#Y$Ya#Z$Ya#[$Ya#]$Ya#^$Ya#_$Ya#a$Ya#c$Ya#e$Ya#f$Ya#i$Ya'a$Ya'n$Ya'u$Ya'v$Ya}$Ya!O$Ya~Or'}Ou(OOP$[aY$[ai$[as$[a!]$[a!^$[a!`$[a!f$[a#W$[a#X$[a#Y$[a#Z$[a#[$[a#]$[a#^$[a#_$[a#a$[a#c$[a#e$[a#f$[a#i$[a'a$[a'n$[a'u$[a'v$[a}$[a!O$[a~OP$jaY$jai$jas$ja!]$ja!^$ja!`$ja!f$ja#W$ja#X$ja#Y$ja#Z$ja#[$ja#]$ja#^$ja#_$ja#a$ja#c$ja#e$ja#f$ja#i$ja'a$ja}$ja!O$ja~P!#lO#i$Uq}$Uq!O$Uq~P#(|O#i$Vq}$Vq!O$Vq~P#(|O!O6eO~O'[$xy}$xy#i$xy!w$xy~P!#lO!X!vO}&ni!_&ni~O!X!vO'n&jO}&ni!_&ni~O},yO!_'{q~Oz&pi}&pi~P!#lO}-QOz'|q~Oz6lO~P!#lOz6lO~O}'_y'['_y~P!#lO}&sa!P&sa~P!#lO!P$pq^$pq'R$pq~P!#lOY6tO~O}.SO!O(Tq~O]6wO~O!P&_O$|6xO~O!P&_O$|6xO~P!#lO!w6yO}&ua!O&ua~O}2gO!O(Qi~P#(|O!T7PO!U7PO'X$aO'd(cO'm+aO~O!S7RO!t3{O~P%@nO!P.oO$|7UO~O!P.oO$|7UO~P!#lO'd7[O~O}.{O!O(Rq~O!_7_O~O!_7_O~P){O!_7aO~O!_7bO~O}#Py!O#Py~P#(|O^$ZO!w7hO'R$ZO~O^$ZO!X!vO!w7hO'R$ZO~O!T7kO!U7kO'X$aO'd(cO'm+aO~O^$ZO!X!vO!f7lO!w7hO'R$ZO'n&jO~O#S$xyP$xyY$xy^$xyi$xys$xy}$xy!]$xy!^$xy!`$xy!f$xy#W$xy#X$xy#Y$xy#Z$xy#[$xy#]$xy#^$xy#_$xy#a$xy#c$xy#e$xy#f$xy'R$xy'a$xy!_$xyz$xy!P$xy!w$xy'c$xy$|$xy!X$xy~P!#lO#i#gy}#gy!O#gy~P#(|OP$ciY$cii$cis$ci!]$ci!^$ci!`$ci!f$ci#W$ci#X$ci#Y$ci#Z$ci#[$ci#]$ci#^$ci#_$ci#a$ci#c$ci#e$ci#f$ci#i$ci'a$ci}$ci!O$ci~P!#lOr'}Ou(OO'v(SOP$tiY$tii$tis$ti!]$ti!^$ti!`$ti!f$ti#W$ti#X$ti#Y$ti#Z$ti#[$ti#]$ti#^$ti#_$ti#a$ti#c$ti#e$ti#f$ti#i$ti'a$ti'n$ti'u$ti}$ti!O$ti~Or'}Ou(OOP$viY$vii$vis$vi!]$vi!^$vi!`$vi!f$vi#W$vi#X$vi#Y$vi#Z$vi#[$vi#]$vi#^$vi#_$vi#a$vi#c$vi#e$vi#f$vi#i$vi'a$vi'n$vi'u$vi'v$vi}$vi!O$vi~O#i$Vy}$Vy!O$Vy~P#(|O#i!zy}!zy!O!zy~P#(|O!X!vO}&nq!_&nq~O},yO!_'{y~Oz&pq}&pq~P!#lOz7rO~P!#lO}.SO!O(Ty~O}2gO!O(Qq~O!T8OO!U8OO'X$aO'd(cO'm+aO~O!P.oO$|8RO~O!P.oO$|8RO~P!#lO!_8UO~O&R8VOP&O!ZQ&O!ZW&O!Z]&O!Z^&O!Za&O!Zb&O!Zg&O!Zi&O!Zj&O!Zk&O!Zn&O!Zp&O!Zu&O!Zw&O!Zx&O!Zy&O!Z!P&O!Z!Z&O!Z!`&O!Z!c&O!Z!d&O!Z!e&O!Z!f&O!Z!g&O!Z!j&O!Z#`&O!Z#p&O!Z#t&O!Z${&O!Z$}&O!Z%P&O!Z%Q&O!Z%T&O!Z%V&O!Z%Y&O!Z%Z&O!Z%]&O!Z%j&O!Z%p&O!Z%r&O!Z%t&O!Z%v&O!Z%y&O!Z&P&O!Z&T&O!Z&V&O!Z&X&O!Z&Z&O!Z&]&O!Z&|&O!Z'W&O!Z'a&O!Z'm&O!Z'z&O!Z!O&O!Z%w&O!Z_&O!Z%|&O!Z~O^$ZO!w8[O'R$ZO~O^$ZO!X!vO!w8[O'R$ZO~OP$eqY$eqi$eqs$eq!]$eq!^$eq!`$eq!f$eq#W$eq#X$eq#Y$eq#Z$eq#[$eq#]$eq#^$eq#_$eq#a$eq#c$eq#e$eq#f$eq#i$eq'a$eq}$eq!O$eq~P!#lO}&uq!O&uq~P#(|O^$ZO!w8qO'R$ZO~OP$xyY$xyi$xys$xy!]$xy!^$xy!`$xy!f$xy#W$xy#X$xy#Y$xy#Z$xy#[$xy#]$xy#^$xy#_$xy#a$xy#c$xy#e$xy#f$xy#i$xy'a$xy}$xy!O$xy~P!#lO'c'eX~P.jO'cZXzZX!_ZX%nZX!PZX$|ZX!XZX~P$zO!XcX!_ZX!_cX'ncX~P;aOP9SOQ9SO]cOa:jOb!iOgcOi9SOjcOkcOn9SOp9SOuROwcOxcOycO!PSO!Z9UO!`UO!c9SO!d9SO!e9SO!f9SO!g9SO!j!hO#p!kO#t^O'W'^O'aQO'mYO'z:hO~O}9eO!O$Xa~O]#pOg#}Oi#qOj#pOk#pOn$OOp9jOu#wO!P#xO!Z:mO!`#uO#R9pO#p$SO$Z9lO$]9nO$`$TO'W&vO'a#rO~O#`'eO~P&+}O!OZX!OcX~P;aO#S9XO~O!X!vO#S9XO~O!w9hO~O#_9^O~O!w9qO}'sX!O'sX~O!w9hO}'qX!O'qX~O#S9rO~O'[9tO~P!#lO#S9yO~O#S9zO~O!X!vO#S9{O~O!X!vO#S9rO~O#i9|O~P#(|O#S9}O~O#S:OO~O#S:PO~O#S:QO~O#i:RO~P!#lO#i:SO~P!#lO#t~!^!n!p!q#Q#R'z$Z$]$`$q${$|$}%T%V%Y%Z%]%_~TS#t'z#Xy'T'U#v'T'W'd~",goto:"#Dk(XPPPPPPP(YP(jP*^PPPP-sPP.Y3j5^5qP5qPPP5q5qP5qP7_PP7dP7xPPPPwPPP>}AYP`!>h!>l!>lP!;jP!>p!>pP!AcP!Agk|}?O}!O>k!O!P?`!P!QCl!Q!R!0[!R![!1q![!]!7s!]!^!8V!^!_!8g!_!`!9d!`!a!:[!a!b!U#R#S2`#S#T!>i#T#o2`#o#p!>y#p#q!?O#q#r!?f#r#s!?x#s$f%T$f$g%c$g#BY2`#BY#BZ!@Y#BZ$IS2`$IS$I_!@Y$I_$I|2`$I|$I}!Bq$I}$JO!Bq$JO$JT2`$JT$JU!@Y$JU$KV2`$KV$KW!@Y$KW&FU2`&FU&FV!@Y&FV?HT2`?HT?HU!@Y?HU~2`W%YR$QWO!^%T!_#o%T#p~%T,T%jg$QW'T+{OX%TXY%cYZ%TZ[%c[p%Tpq%cq!^%T!_#o%T#p$f%T$f$g%c$g#BY%T#BY#BZ%c#BZ$IS%T$IS$I_%c$I_$JT%T$JT$JU%c$JU$KV%T$KV$KW%c$KW&FU%T&FU&FV%c&FV?HT%T?HT?HU%c?HU~%T,T'YR$QW'U+{O!^%T!_#o%T#p~%T$T'jS$QW!f#{O!^%T!_!`'v!`#o%T#p~%T$O'}S#a#v$QWO!^%T!_!`(Z!`#o%T#p~%T$O(bR#a#v$QWO!^%T!_#o%T#p~%T'u(rZ$QW]!ROY(kYZ)eZr(krs*rs!^(k!^!_+U!_#O(k#O#P-b#P#o(k#o#p+U#p~(k&r)jV$QWOr)ers*Ps!^)e!^!_*a!_#o)e#o#p*a#p~)e&r*WR#{&j$QWO!^%T!_#o%T#p~%T&j*dROr*ars*ms~*a&j*rO#{&j'u*{R#{&j$QW]!RO!^%T!_#o%T#p~%T'm+ZV]!ROY+UYZ*aZr+Urs+ps#O+U#O#P+w#P~+U'm+wO#{&j]!R'm+zROr+Urs,Ts~+U'm,[U#{&j]!ROY,nZr,nrs-Vs#O,n#O#P-[#P~,n!R,sU]!ROY,nZr,nrs-Vs#O,n#O#P-[#P~,n!R-[O]!R!R-_PO~,n'u-gV$QWOr(krs-|s!^(k!^!_+U!_#o(k#o#p+U#p~(k'u.VZ#{&j$QW]!ROY.xYZ%TZr.xrs/rs!^.x!^!_,n!_#O.x#O#P0S#P#o.x#o#p,n#p~.x!Z/PZ$QW]!ROY.xYZ%TZr.xrs/rs!^.x!^!_,n!_#O.x#O#P0S#P#o.x#o#p,n#p~.x!Z/yR$QW]!RO!^%T!_#o%T#p~%T!Z0XT$QWO!^.x!^!_,n!_#o.x#o#p,n#p~.xy0mZ$QWOt%Ttu1`u!^%T!_!c%T!c!}1`!}#R%T#R#S1`#S#T%T#T#o1`#p$g%T$g~1`y1g]$QW'mqOt%Ttu1`u!Q%T!Q![1`![!^%T!_!c%T!c!}1`!}#R%T#R#S1`#S#T%T#T#o1`#p$g%T$g~1`&i2k_$QW#vS'W%k'dpOt%Ttu2`u}%T}!O3j!O!Q%T!Q![2`![!^%T!_!c%T!c!}2`!}#R%T#R#S2`#S#T%T#T#o2`#p$g%T$g~2`[3q_$QW#vSOt%Ttu3ju}%T}!O3j!O!Q%T!Q![3j![!^%T!_!c%T!c!}3j!}#R%T#R#S3j#S#T%T#T#o3j#p$g%T$g~3j$O4wS#Y#v$QWO!^%T!_!`5T!`#o%T#p~%T$O5[R$QW#k#vO!^%T!_#o%T#p~%T%r5lU'v%j$QWOv%Tvw6Ow!^%T!_!`5T!`#o%T#p~%T$O6VS$QW#e#vO!^%T!_!`5T!`#o%T#p~%T'u6jZ$QW]!ROY6cYZ7]Zw6cwx*rx!^6c!^!_8T!_#O6c#O#P:T#P#o6c#o#p8T#p~6c&r7bV$QWOw7]wx*Px!^7]!^!_7w!_#o7]#o#p7w#p~7]&j7zROw7wwx*mx~7w'm8YV]!ROY8TYZ7wZw8Twx+px#O8T#O#P8o#P~8T'm8rROw8Twx8{x~8T'm9SU#{&j]!ROY9fZw9fwx-Vx#O9f#O#P9}#P~9f!R9kU]!ROY9fZw9fwx-Vx#O9f#O#P9}#P~9f!R:QPO~9f'u:YV$QWOw6cwx:ox!^6c!^!_8T!_#o6c#o#p8T#p~6c'u:xZ#{&j$QW]!ROY;kYZ%TZw;kwx/rx!^;k!^!_9f!_#O;k#O#PW{!^%T!_!`5T!`#o%T#p~%T$O>_S#W#v$QWO!^%T!_!`5T!`#o%T#p~%T$u>rSi$m$QWO!^%T!_!`5T!`#o%T#p~%T&i?VR}&a$QWO!^%T!_#o%T#p~%T&i?gVr%n$QWO!O%T!O!P?|!P!Q%T!Q![@r![!^%T!_#o%T#p~%Ty@RT$QWO!O%T!O!P@b!P!^%T!_#o%T#p~%Ty@iR|q$QWO!^%T!_#o%T#p~%Ty@yZ$QWjqO!Q%T!Q![@r![!^%T!_!g%T!g!hAl!h#R%T#R#S@r#S#X%T#X#YAl#Y#o%T#p~%TyAqZ$QWO{%T{|Bd|}%T}!OBd!O!Q%T!Q![CO![!^%T!_#R%T#R#SCO#S#o%T#p~%TyBiV$QWO!Q%T!Q![CO![!^%T!_#R%T#R#SCO#S#o%T#p~%TyCVV$QWjqO!Q%T!Q![CO![!^%T!_#R%T#R#SCO#S#o%T#p~%T,TCs`$QW#X#vOYDuYZ%TZzDuz{Jl{!PDu!P!Q!-e!Q!^Du!^!_Fx!_!`!.^!`!a!/]!a!}Du!}#OHq#O#PJQ#P#oDu#o#pFx#p~DuXD|[$QWyPOYDuYZ%TZ!PDu!P!QEr!Q!^Du!^!_Fx!_!}Du!}#OHq#O#PJQ#P#oDu#o#pFx#p~DuXEy_$QWyPO!^%T!_#Z%T#Z#[Er#[#]%T#]#^Er#^#a%T#a#bEr#b#g%T#g#hEr#h#i%T#i#jEr#j#m%T#m#nEr#n#o%T#p~%TPF}VyPOYFxZ!PFx!P!QGd!Q!}Fx!}#OG{#O#PHh#P~FxPGiUyP#Z#[Gd#]#^Gd#a#bGd#g#hGd#i#jGd#m#nGdPHOTOYG{Z#OG{#O#PH_#P#QFx#Q~G{PHbQOYG{Z~G{PHkQOYFxZ~FxXHvY$QWOYHqYZ%TZ!^Hq!^!_G{!_#OHq#O#PIf#P#QDu#Q#oHq#o#pG{#p~HqXIkV$QWOYHqYZ%TZ!^Hq!^!_G{!_#oHq#o#pG{#p~HqXJVV$QWOYDuYZ%TZ!^Du!^!_Fx!_#oDu#o#pFx#p~Du,TJs^$QWyPOYJlYZKoZzJlz{NQ{!PJl!P!Q!,R!Q!^Jl!^!_!!]!_!}Jl!}#O!'|#O#P!+a#P#oJl#o#p!!]#p~Jl,TKtV$QWOzKoz{LZ{!^Ko!^!_M]!_#oKo#o#pM]#p~Ko,TL`X$QWOzKoz{LZ{!PKo!P!QL{!Q!^Ko!^!_M]!_#oKo#o#pM]#p~Ko,TMSR$QWT+{O!^%T!_#o%T#p~%T+{M`ROzM]z{Mi{~M]+{MlTOzM]z{Mi{!PM]!P!QM{!Q~M]+{NQOT+{,TNX^$QWyPOYJlYZKoZzJlz{NQ{!PJl!P!Q! T!Q!^Jl!^!_!!]!_!}Jl!}#O!'|#O#P!+a#P#oJl#o#p!!]#p~Jl,T! ^_$QWT+{yPO!^%T!_#Z%T#Z#[Er#[#]%T#]#^Er#^#a%T#a#bEr#b#g%T#g#hEr#h#i%T#i#jEr#j#m%T#m#nEr#n#o%T#p~%T+{!!bYyPOY!!]YZM]Zz!!]z{!#Q{!P!!]!P!Q!&x!Q!}!!]!}#O!$`#O#P!&f#P~!!]+{!#VYyPOY!!]YZM]Zz!!]z{!#Q{!P!!]!P!Q!#u!Q!}!!]!}#O!$`#O#P!&f#P~!!]+{!#|UT+{yP#Z#[Gd#]#^Gd#a#bGd#g#hGd#i#jGd#m#nGd+{!$cWOY!$`YZM]Zz!$`z{!${{#O!$`#O#P!&S#P#Q!!]#Q~!$`+{!%OYOY!$`YZM]Zz!$`z{!${{!P!$`!P!Q!%n!Q#O!$`#O#P!&S#P#Q!!]#Q~!$`+{!%sTT+{OYG{Z#OG{#O#PH_#P#QFx#Q~G{+{!&VTOY!$`YZM]Zz!$`z{!${{~!$`+{!&iTOY!!]YZM]Zz!!]z{!#Q{~!!]+{!&}_yPOzM]z{Mi{#ZM]#Z#[!&x#[#]M]#]#^!&x#^#aM]#a#b!&x#b#gM]#g#h!&x#h#iM]#i#j!&x#j#mM]#m#n!&x#n~M],T!(R[$QWOY!'|YZKoZz!'|z{!(w{!^!'|!^!_!$`!_#O!'|#O#P!*o#P#QJl#Q#o!'|#o#p!$`#p~!'|,T!(|^$QWOY!'|YZKoZz!'|z{!(w{!P!'|!P!Q!)x!Q!^!'|!^!_!$`!_#O!'|#O#P!*o#P#QJl#Q#o!'|#o#p!$`#p~!'|,T!*PY$QWT+{OYHqYZ%TZ!^Hq!^!_G{!_#OHq#O#PIf#P#QDu#Q#oHq#o#pG{#p~Hq,T!*tX$QWOY!'|YZKoZz!'|z{!(w{!^!'|!^!_!$`!_#o!'|#o#p!$`#p~!'|,T!+fX$QWOYJlYZKoZzJlz{NQ{!^Jl!^!_!!]!_#oJl#o#p!!]#p~Jl,T!,Yc$QWyPOzKoz{LZ{!^Ko!^!_M]!_#ZKo#Z#[!,R#[#]Ko#]#^!,R#^#aKo#a#b!,R#b#gKo#g#h!,R#h#iKo#i#j!,R#j#mKo#m#n!,R#n#oKo#o#pM]#p~Ko,T!-lV$QWS+{OY!-eYZ%TZ!^!-e!^!_!.R!_#o!-e#o#p!.R#p~!-e+{!.WQS+{OY!.RZ~!.R$P!.g[$QW#k#vyPOYDuYZ%TZ!PDu!P!QEr!Q!^Du!^!_Fx!_!}Du!}#OHq#O#PJQ#P#oDu#o#pFx#p~Du]!/f[#sS$QWyPOYDuYZ%TZ!PDu!P!QEr!Q!^Du!^!_Fx!_!}Du!}#OHq#O#PJQ#P#oDu#o#pFx#p~Duy!0cd$QWjqO!O%T!O!P@r!P!Q%T!Q![!1q![!^%T!_!g%T!g!hAl!h#R%T#R#S!1q#S#U%T#U#V!3X#V#X%T#X#YAl#Y#b%T#b#c!2w#c#d!4m#d#l%T#l#m!5{#m#o%T#p~%Ty!1x_$QWjqO!O%T!O!P@r!P!Q%T!Q![!1q![!^%T!_!g%T!g!hAl!h#R%T#R#S!1q#S#X%T#X#YAl#Y#b%T#b#c!2w#c#o%T#p~%Ty!3OR$QWjqO!^%T!_#o%T#p~%Ty!3^W$QWO!Q%T!Q!R!3v!R!S!3v!S!^%T!_#R%T#R#S!3v#S#o%T#p~%Ty!3}Y$QWjqO!Q%T!Q!R!3v!R!S!3v!S!^%T!_#R%T#R#S!3v#S#b%T#b#c!2w#c#o%T#p~%Ty!4rV$QWO!Q%T!Q!Y!5X!Y!^%T!_#R%T#R#S!5X#S#o%T#p~%Ty!5`X$QWjqO!Q%T!Q!Y!5X!Y!^%T!_#R%T#R#S!5X#S#b%T#b#c!2w#c#o%T#p~%Ty!6QZ$QWO!Q%T!Q![!6s![!^%T!_!c%T!c!i!6s!i#R%T#R#S!6s#S#T%T#T#Z!6s#Z#o%T#p~%Ty!6z]$QWjqO!Q%T!Q![!6s![!^%T!_!c%T!c!i!6s!i#R%T#R#S!6s#S#T%T#T#Z!6s#Z#b%T#b#c!2w#c#o%T#p~%T%w!7|R!XV$QW#i%hO!^%T!_#o%T#p~%T!P!8^R^w$QWO!^%T!_#o%T#p~%T+c!8rR']d!]%Y#t&s'zP!P!Q!8{!^!_!9Q!_!`!9_W!9QO$SW#v!9VP#[#v!_!`!9Y#v!9_O#k#v#v!9dO#]#v%w!9kT!w%o$QWO!^%T!_!`'v!`!a!9z!a#o%T#p~%T$P!:RR#S#w$QWO!^%T!_#o%T#p~%T%w!:gT'[!s#]#v#}S$QWO!^%T!_!`!:v!`!a!;W!a#o%T#p~%T$O!:}R#]#v$QWO!^%T!_#o%T#p~%T$O!;_T#[#v$QWO!^%T!_!`5T!`!a!;n!a#o%T#p~%T$O!;uS#[#v$QWO!^%T!_!`5T!`#o%T#p~%T%w!]S#c#v$QWO!^%T!_!`5T!`#o%T#p~%T$P!>pR$QW'a#wO!^%T!_#o%T#p~%T~!?OO!P~%r!?VT'u%j$QWO!^%T!_!`5T!`#o%T#p#q!=P#q~%T$u!?oR!O$k$QW'cQO!^%T!_#o%T#p~%TX!@PR!gP$QWO!^%T!_#o%T#p~%T,T!@gr$QW'T+{#vS'W%k'dpOX%TXY%cYZ%TZ[%c[p%Tpq%cqt%Ttu2`u}%T}!O3j!O!Q%T!Q![2`![!^%T!_!c%T!c!}2`!}#R%T#R#S2`#S#T%T#T#o2`#p$f%T$f$g%c$g#BY2`#BY#BZ!@Y#BZ$IS2`$IS$I_!@Y$I_$JT2`$JT$JU!@Y$JU$KV2`$KV$KW!@Y$KW&FU2`&FU&FV!@Y&FV?HT2`?HT?HU!@Y?HU~2`,T!CO_$QW'U+{#vS'W%k'dpOt%Ttu2`u}%T}!O3j!O!Q%T!Q![2`![!^%T!_!c%T!c!}2`!}#R%T#R#S2`#S#T%T#T#o2`#p$g%T$g~2`",tokenizers:[Te,Ae,De,0,1,2,3,4,5,6,7,8,Ce],topRules:{Script:[0,6]},dialects:{jsx:11282,ts:11284},dynamicPrecedences:{145:1,172:1},specialized:[{term:284,get:function(t,e){return function(t,e){return"extends"==t&&e.dialectEnabled(1)?3:-1}(t,e)<<1}},{term:284,get:function(t){return Me[t]||-1}},{term:296,get:function(t){return je[t]||-1}},{term:59,get:function(t){return Ne[t]||-1}}],tokenPrec:11305}),Re=n(39),Le=[Object(Re.e)("function ${name}(${params}) {\n\t${}\n}",{label:"function",detail:"definition",type:"keyword"}),Object(Re.e)("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n\t${}\n}",{label:"for",detail:"loop",type:"keyword"}),Object(Re.e)("for (let ${name} of ${collection}) {\n\t${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Object(Re.e)("try {\n\t${}\n} catch (${error}) {\n\t${}\n}",{label:"try",detail:"block",type:"keyword"}),Object(Re.e)("class ${name} {\n\tconstructor(${params}) {\n\t\t${}\n\t}\n}",{label:"class",detail:"definition",type:"keyword"}),Object(Re.e)('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Object(Re.e)('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],Fe=c.b.define({parser:Pe.configure({props:[c.p.add({IfStatement:Object(c.g)({except:/^\s*({|else\b)/}),TryStatement:Object(c.g)({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:c.j,SwitchBody:function(t){var e=t.textAfter,n=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:r?1:2)*t.unit},Block:Object(c.i)({closing:"}"}),ArrowFunction:function(t){return t.baseIndent+t.unit},"TemplateString BlockComment":function(){return-1},"Statement Property":Object(c.g)({except:/^{/}),JSXElement:function(t){var e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape:function(t){var e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag":function(t){return t.column(t.node.from)+t.unit}}),c.l.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression":c.k,BlockComment:function(t){return{from:t.from+2,to:t.to-2}}}),Object(pe.c)({"get set async static":pe.d.modifier,"for while do if else switch try catch finally return throw break continue default case":pe.d.controlKeyword,"in of await yield void typeof delete instanceof":pe.d.operatorKeyword,"export import let var const function class extends":pe.d.definitionKeyword,"with debugger from as new":pe.d.keyword,TemplateString:pe.d.special(pe.d.string),Super:pe.d.atom,BooleanLiteral:pe.d.bool,this:pe.d.self,null:pe.d.null,Star:pe.d.modifier,VariableName:pe.d.variableName,"CallExpression/VariableName":pe.d.function(pe.d.variableName),VariableDefinition:pe.d.definition(pe.d.variableName),Label:pe.d.labelName,PropertyName:pe.d.propertyName,PrivatePropertyName:pe.d.special(pe.d.propertyName),"CallExpression/MemberExpression/PropertyName":pe.d.function(pe.d.propertyName),"FunctionDeclaration/VariableDefinition":pe.d.function(pe.d.definition(pe.d.variableName)),"ClassDeclaration/VariableDefinition":pe.d.definition(pe.d.className),PropertyDefinition:pe.d.definition(pe.d.propertyName),PrivatePropertyDefinition:pe.d.definition(pe.d.special(pe.d.propertyName)),UpdateOp:pe.d.updateOperator,LineComment:pe.d.lineComment,BlockComment:pe.d.blockComment,Number:pe.d.number,String:pe.d.string,ArithOp:pe.d.arithmeticOperator,LogicOp:pe.d.logicOperator,BitOp:pe.d.bitwiseOperator,CompareOp:pe.d.compareOperator,RegExp:pe.d.regexp,Equals:pe.d.definitionOperator,"Arrow : Spread":pe.d.punctuation,"( )":pe.d.paren,"[ ]":pe.d.squareBracket,"{ }":pe.d.brace,".":pe.d.derefOperator,", ;":pe.d.separator,TypeName:pe.d.typeName,TypeDefinition:pe.d.definition(pe.d.typeName),"type enum interface implements namespace module declare":pe.d.definitionKeyword,"abstract global privacy readonly override":pe.d.modifier,"is keyof unique infer":pe.d.operatorKeyword,JSXAttributeValue:pe.d.attributeValue,JSXText:pe.d.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":pe.d.angleBracket,"JSXIdentifier JSXNameSpacedName":pe.d.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":pe.d.attributeName})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),Be=Fe.configure({dialect:"ts"}),Ie=Fe.configure({dialect:"jsx"}),Qe=Fe.configure({dialect:"jsx ts"});function $e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.jsx?t.typescript?Qe:Ie:t.typescript?Be:Fe;return new c.e(e,Fe.data.of({autocomplete:Object(Re.d)(["LineComment","BlockComment","String"],Object(Re.b)(Le))}))}var ze=["_blank","_self","_top","_parent"],qe=["ascii","utf-8","utf-16","latin1","latin1"],We=["get","post","put","delete"],Ve=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Ye=["true","false"],Ue={},He={a:{attrs:{href:null,ping:null,type:null,media:null,target:ze,hreflang:null}},abbr:Ue,acronym:Ue,address:Ue,applet:Ue,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Ue,aside:Ue,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Ue,base:{attrs:{href:null,target:ze}},basefont:Ue,bdi:Ue,bdo:Ue,big:Ue,blockquote:{attrs:{cite:null}},body:Ue,br:Ue,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Ve,formmethod:We,formnovalidate:["novalidate"],formtarget:ze,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Ue,center:Ue,cite:Ue,code:Ue,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:Ue,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Ue,dir:Ue,div:Ue,dl:Ue,dt:Ue,em:Ue,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Ue,figure:Ue,font:Ue,footer:Ue,form:{attrs:{action:null,name:null,"accept-charset":qe,autocomplete:["on","off"],enctype:Ve,method:We,novalidate:["novalidate"],target:ze}},frame:Ue,frameset:Ue,h1:Ue,h2:Ue,h3:Ue,h4:Ue,h5:Ue,h6:Ue,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Ue,hgroup:Ue,hr:Ue,html:{attrs:{manifest:null}},i:Ue,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Ve,formmethod:We,formnovalidate:["novalidate"],formtarget:ze,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:Ue,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Ue,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:Ue,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:qe,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:Ue,noframes:Ue,noscript:Ue,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:Ue,param:{attrs:{name:null,value:null}},pre:Ue,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Ue,rt:Ue,ruby:Ue,s:Ue,samp:Ue,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:qe}},section:Ue,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},small:Ue,source:{attrs:{src:null,type:null,media:null}},span:Ue,strike:Ue,strong:Ue,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Ue,summary:Ue,sup:Ue,table:Ue,tbody:Ue,td:{attrs:{colspan:null,rowspan:null,headers:null}},textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:Ue,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Ue,time:{attrs:{datetime:null}},title:Ue,tr:Ue,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},tt:Ue,u:Ue,ul:{children:["li","script","template","ul","ol"]},var:Ue,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:Ue},Xe={accesskey:null,class:null,contenteditable:Ye,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Ye,autocorrect:Ye,autocapitalize:Ye,style:null,tabindex:null,title:null,translate:["yes","no"],onclick:null,rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Ye,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Ye,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Ye,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Ye,"aria-hidden":Ye,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Ye,"aria-multiselectable":Ye,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Ye,"aria-relevant":null,"aria-required":Ye,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},Ge=Object.keys(He),Ze=Object.keys(Xe);function Ke(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length;if(!e)return"";var r=e.firstChild,i=r&&r.getChild("TagName");return i?t.sliceString(i.from,Math.min(i.to,n)):""}function Je(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.parent;n;n=n.parent)if("Element"==n.name){if(!e)return n;e=!1}return null}function tn(t,e){var n=He[Ke(t,Je(e,!0))];return(null===n||void 0===n?void 0:n.children)||Ge}function en(t,e){for(var n=[],r=e;r=Je(r);){var i=Ke(t,r);if(i&&"CloseTag"==r.lastChild.name)break;i&&n.indexOf(i)<0&&("EndTag"==e.name||e.from>=r.firstChild.to)&&n.push(i)}return n}var nn=/^[:\-\.\w\u00b7-\uffff]+$/;function rn(t,e,n,r){var i=/\s*>/.test(t.sliceDoc(r,r+5))?"":">";return{from:n,to:r,options:tn(t.doc,e).map((function(t){return{label:t,type:"type"}})).concat(en(t.doc,e).map((function(t,e){return{label:"/"+t,apply:"/"+t+i,type:"type",boost:99-e}}))),span:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function on(t,e,n,r){var i=/\s*>/.test(t.sliceDoc(r,r+5))?"":">";return{from:n,to:r,options:en(t.doc,e).map((function(t,e){return{label:t,apply:t+i,type:"type",boost:99-e}})),span:nn}}var an=c.b.define({parser:ee.configure({props:[c.p.add({Element:function(t){var e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag":function(t){return t.column(t.node.from)+t.unit},Document:function(t){if(t.pos+/\s*/.exec(t.textAfter)[0].length='"]*$/;var m,v=Object(d.a)(c);try{for(v.s();!(m=v.n()).done;){var y=m.value;a.push({label:y,apply:p+y+g,type:"constant"})}}catch(b){v.e(b)}finally{v.f()}}}return{from:n,to:r,options:a,span:s}}(n,o,"Is"==o.name?r:o.from,r):!t.explicit||"Element"!=i.name&&"Text"!=i.name&&"Document"!=i.name?null:function(t,e,n){var r,i=[],o=0,a=Object(d.a)(tn(t.doc,e));try{for(a.s();!(r=a.n()).done;){var s=r.value;i.push({label:"<"+s,type:"type"})}}catch(h){a.e(h)}finally{a.f()}var u,c=Object(d.a)(en(t.doc,e));try{for(c.s();!(u=c.n()).done;){var l=u.value;i.push({label:"",type:"type",boost:99-o++})}}catch(h){c.e(h)}finally{c.f()}return{from:n,to:n,options:i,span:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}(n,o,r)}});function un(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=an;return!1===t.matchClosingTags&&(e=e.configure({dialect:"noMatch"})),new c.e(e,[sn,!1!==t.autoCloseTags?cn:[],$e().support,xe().support])}var cn=u.d.inputHandler.of((function(t,e,n,r){if(t.composing||t.state.readOnly||e!=n||">"!=r&&"/"!=r||!an.isActiveAt(t.state,e,-1))return!1;var i=t.state,o=i.changeByRange((function(t){var e,n,o,a,u=t.head,l=Object(c.v)(i).resolveInner(u,-1);if("TagName"!=l.name&&"StartTag"!=l.name||(l=l.parent),">"==r&&"OpenTag"==l.name){if("CloseTag"!=(null===(n=null===(e=l.parent)||void 0===e?void 0:e.lastChild)||void 0===n?void 0:n.name)&&(a=Ke(i.doc,l.parent,u)))return{range:s.e.cursor(u+1),changes:{from:u,insert:">")}}}else if("/"==r&&"OpenTag"==l.name){var h=l.parent,f=null===h||void 0===h?void 0:h.parent;if(h.from==u-1&&"CloseTag"!=(null===(o=f.lastChild)||void 0===o?void 0:o.name)&&(a=Ke(i.doc,f,u))){var d="/".concat(a,">");return{range:s.e.cursor(u+d.length),changes:{from:u,insert:d}}}}return{range:t}}));return!o.changes.empty&&(t.dispatch(o,{userEvent:"input.type",scrollIntoView:!0}),!0)})),ln=Object(c.h)({block:{open:"\x3c!--",close:"--\x3e"}}),hn=wt.configure({props:[Object(pe.c)({"Blockquote/...":pe.d.quote,HorizontalRule:pe.d.contentSeparator,"ATXHeading1/... SetextHeading1/...":pe.d.heading1,"ATXHeading2/... SetextHeading2/...":pe.d.heading2,"ATXHeading3/...":pe.d.heading3,"ATXHeading4/...":pe.d.heading4,"ATXHeading5/...":pe.d.heading5,"ATXHeading6/...":pe.d.heading6,"Comment CommentBlock":pe.d.comment,Escape:pe.d.escape,Entity:pe.d.character,"Emphasis/...":pe.d.emphasis,"StrongEmphasis/...":pe.d.strong,"Link/... Image/...":pe.d.link,"OrderedList/... BulletList/...":pe.d.list,"BlockQuote/...":pe.d.quote,"InlineCode CodeText":pe.d.monospace,URL:pe.d.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":pe.d.processingInstruction,"CodeInfo LinkLabel":pe.d.labelName,LinkTitle:pe.d.string,Paragraph:pe.d.content}),c.l.add((function(t){if(t.is("Block")&&!t.is("Document"))return function(t,e){return{from:e.doc.lineAt(t.from).to,to:t.to}}})),c.p.add({Document:function(){return null}}),c.u.add({Document:ln})]});function fn(t){return new c.c(ln,t,t.nodeSet.types.find((function(t){return"Document"==t.name})))}var dn=fn(hn),pn=fn(hn.configure([Dt,Nt,jt,{defineNodes:["Emoji"],parseInline:[{name:"Emoji",parse:function(t,e,n){var r;return 58==e&&(r=/^[a-zA-Z_0-9]+:/.exec(t.slice(n+1,t.end)))?t.addElement(t.elt("Emoji",n,n+1+r[0].length)):-1}}]},{props:[Object(pe.c)({"TableDelimiter SubscriptMark SuperscriptMark StrikethroughMark":pe.d.processingInstruction,"TableHeader/...":pe.d.heading,"Strikethrough/...":pe.d.strikethrough,TaskMarker:pe.d.atom,Task:pe.d.list,Emoji:pe.d.character,"Subscript Superscript":pe.d.special(pe.d.content),TableCell:pe.d.content})]}]));function gn(t,e){return function(n){var r=n&&c.d.matchLanguageName(t,n,!0);return r?r.support?r.support.language.parser:c.f.getSkippingParser(r.load()):e?e.parser:null}}function mn(t,e){return e.sliceString(t.from,t.from+50)}var vn=function(){function t(e,n,r,i,a,s,u){Object(o.a)(this,t),this.node=e,this.from=n,this.to=r,this.spaceBefore=i,this.spaceAfter=a,this.type=s,this.item=u}return Object(a.a)(t,[{key:"blank",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this.spaceBefore;if("Blockquote"==this.node.name)e+=">";else for(var n=this.to-this.from-e.length-this.spaceAfter.length;n>0;n--)e+=" ";return e+(t?this.spaceAfter:"")}},{key:"marker",value:function(t,e){var n="OrderedList"==this.node.name?String(+bn(this.item,t)[2]+e):"";return this.spaceBefore+n+this.type+this.spaceAfter}}]),t}();function yn(t,e,n){for(var r=[],i=t;i&&"Document"!=i.name;i=i.parent)"ListItem"!=i.name&&"Blockquote"!=i.name||r.push(i);for(var o=[],a=0,s=r.length-1;s>=0;s--){var u=r[s],c=void 0,l=a;if("Blockquote"==u.name&&(c=/^\s*>( ?)/.exec(e.slice(a))))a+=c[0].length,o.push(new vn(u,l,a,"",c[1],">",null));else if("ListItem"==u.name&&"OrderedList"==u.parent.name&&(c=/^(\s*)\d+([.)])(\s*)/.exec(mn(u,n)))){var h=c[3],f=c[0].length;h.length>=4&&(h=h.slice(0,h.length-4),f-=4),a+=f,o.push(new vn(u.parent,l,a,c[1],h,c[2],u))}else if("ListItem"==u.name&&"BulletList"==u.parent.name&&(c=/^(\s*)([-+*])(\s+)/.exec(mn(u,n)))){var d=c[3],p=c[0].length;d.length>4&&(d=d.slice(0,d.length-4),p-=4),a+=p,o.push(new vn(u.parent,l,a,c[1],d,c[2],u))}}return o}function bn(t,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from,t.from+10))}function On(t,e,n){for(var r=-1,i=t;;){if("ListItem"==i.name){var o=bn(i,e),a=+o[2];if(r>=0){if(a!=r+1)return;n.push({from:i.from+o[1].length,to:i.from+o[0].length,insert:String(r+2)})}r=a}var s=i.nextSibling;if(!s)break;i=s}}function wn(t){return"QuoteMark"==t.name||"ListMark"==t.name}var kn=[{key:"Enter",run:function(t){var e=t.state,n=t.dispatch,r=Object(c.v)(e),i=e.doc,o=null,a=e.changeByRange((function(t){if(!t.empty||!pn.isActiveAt(e,t.from))return o={range:t};for(var n=t.from,a=i.lineAt(n),u=yn(r.resolveInner(n,-1),a.text,i);u.length&&u[u.length-1].from>n-a.from;)u.pop();if(!u.length)return o={range:t};var c=u[u.length-1];if(c.to-c.spaceAfter.length>n-a.from)return o={range:t};if(c.item&&n>=c.to-c.spaceAfter.length&&!/\S/.test(a.text.slice(c.to))){if(c.node.firstChild.to>=n||a.from>0&&!/[^\s>]/.test(i.lineAt(a.from-1).text)){var l,h=u.length>1?u[u.length-2]:null,f="";h&&h.item?(l=a.from+h.from,f=h.marker(i,1)):l=a.from+(h?h.to:0);var d=[{from:l,to:n,insert:f}];return"OrderedList"==c.node.name&&On(c.item,i,d),h&&"OrderedList"==h.node.name&&On(h.item,i,d),{range:s.e.cursor(l+f.length),changes:d}}for(var p="",g=0,m=u.length-2;g<=m;g++)p+=u[g].blank(g]*/.exec(a.text)[0].length>=c.to)for(var O=0,w=u.length-1;O<=w;O++)y+=O!=w||b?u[O].blank():u[O].marker(i,1);for(var k=n;k>a.from&&/\s/.test(a.text.charAt(k-a.from-1));)k--;return v.push({from:k,to:n,insert:y}),{range:s.e.cursor(k+y.length),changes:v}}));return!o&&(n(e.update(a,{scrollIntoView:!0,userEvent:"input"})),!0)}},{key:"Backspace",run:function(t){var e=t.state,n=t.dispatch,r=Object(c.v)(e),i=null,o=e.changeByRange((function(t){var n=t.from,o=e.doc;if(t.empty&&pn.isActiveAt(e,t.from)){var a=o.lineAt(n),u=yn(function(t,e){var n,r=t.resolveInner(e,-1),i=e;for(wn(r)&&(i=r.from,r=r.parent);n=r.childBefore(i);)if(wn(n))i=n.from;else{if("OrderedList"!=n.name&&"BulletList"!=n.name)break;i=(r=n.lastChild).to}return r}(r,n),a.text,o);if(u.length){var c=u[u.length-1],l=c.to-c.spaceAfter.length+(c.spaceAfter?1:0);if(n-a.from>l&&!/\S/.test(a.text.slice(l,n-a.from)))return{range:s.e.cursor(a.from+l),changes:{from:a.from+l,to:n}};if(n-a.from==l){var h=a.from+c.from;if(c.item&&c.node.from0&&void 0!==arguments[0]?arguments[0]:{},e=t.codeLanguages,n=t.defaultCodeLanguage,r=t.addKeymap,i=void 0===r||r,o=t.base,a=(o=void 0===o?dn:o).parser;if(!(a instanceof U))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");var l,h=t.extensions?[t.extensions]:[],f=[xn.support];n instanceof c.e?(f.push(n.support),l=n.language):n&&(l=n);var d=e||l?gn(e||[],l):void 0;return h.push(xt({codeParser:d,htmlParser:xn.language.parser})),i&&f.push(s.i.high(u.l.of(kn))),new c.e(fn(a.configure(h)),f)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return G}));var r=n(11),i=n(19),o=n(0),a=n(12),s=n(10),u=n(21),c=n(6),l={tokenize:function(t,e,n){var r=this,i=r.events[r.events.length-1],o=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,a=0;return function(e){return t.enter("mathFlow"),t.enter("mathFlowFence"),t.enter("mathFlowFenceSequence"),s(e)};function s(e){return 36===e?(t.consume(e),a++,s):(t.exit("mathFlowFenceSequence"),a<2?n(e):Object(u.a)(t,l,"whitespace")(e))}function l(e){return null===e||Object(c.h)(e)?d(e):(t.enter("mathFlowFenceMeta"),t.enter("chunkString",{contentType:"string"}),f(e))}function f(e){return null===e||Object(c.h)(e)?(t.exit("chunkString"),t.exit("mathFlowFenceMeta"),d(e)):36===e?n(e):(t.consume(e),f)}function d(n){return t.exit("mathFlowFence"),r.interrupt?e(n):p(n)}function p(e){return null===e?m(e):Object(c.h)(e)?t.attempt(h,t.attempt({tokenize:v,partial:!0},m,o?Object(u.a)(t,p,"linePrefix",o+1):p),m)(e):(t.enter("mathFlowValue"),g(e))}function g(e){return null===e||Object(c.h)(e)?(t.exit("mathFlowValue"),p(e)):(t.consume(e),g)}function m(n){return t.exit("mathFlow"),e(n)}function v(t,e,n){var r=0;return Object(u.a)(t,(function(e){return t.enter("mathFlowFence"),t.enter("mathFlowFenceSequence"),i(e)}),"linePrefix",4);function i(e){return 36===e?(t.consume(e),r++,i):r0&&void 0!==arguments[0]?arguments[0]:{},e=t.singleDollarTextMath;return null!==e&&void 0!==e||(e=!0),{tokenize:n,resolve:d,previous:p};function n(t,n,r){var i,o,a=0;return function(e){return t.enter("mathText"),t.enter("mathTextSequence"),s(e)};function s(n){return 36===n?(t.consume(n),a++,s):a<2&&!e?r(n):(t.exit("mathTextSequence"),u(n))}function u(e){return null===e?r(e):36===e?(o=t.enter("mathTextSequence"),i=0,h(e)):32===e?(t.enter("space"),t.consume(e),t.exit("space"),u):Object(c.h)(e)?(t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),u):(t.enter("mathTextData"),l(e))}function l(e){return null===e||32===e||36===e||Object(c.h)(e)?(t.exit("mathTextData"),u(e)):(t.consume(e),l)}function h(e){return 36===e?(t.consume(e),i++,h):i===a?(t.exit("mathTextSequence"),t.exit("mathText"),n(e)):(o.type="mathTextData",l(e))}}}function d(t){var e,n,r=t.length-4,i=3;if(("lineEnding"===t[i][1].type||"space"===t[i][1].type)&&("lineEnding"===t[r][1].type||"space"===t[r][1].type))for(e=i;++e0&&void 0!==arguments[0]?arguments[0]:{},e=t.singleDollarTextMath;return null!==e&&void 0!==e||(e=!0),r.peek=i,{unsafe:[{character:"\r",inConstruct:["mathFlowMeta"]},{character:"\r",inConstruct:["mathFlowMeta"]},e?{character:"$",inConstruct:["mathFlowMeta","phrasing"]}:{character:"$",after:"\\$",inConstruct:["mathFlowMeta","phrasing"]},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:n,inlineMath:r}};function n(t,e,n){var r=t.value||"",i="$".repeat(Math.max(Object(m.a)(r,"$")+1,2)),o=n.enter("mathFlow"),a=i;if(t.meta){var s=n.enter("mathFlowMeta");a+=Object(v.a)(n,t.meta,{before:"$",after:" ",encode:["$"]}),s()}return a+="\n",r&&(a+=r+"\n"),a+=i,o(),a}function r(t){var n=t.value||"",r=1,i="";for(e||r++;new RegExp("(^|[^$])"+"\\$".repeat(r)+"([^$]|$)").test(n);)r++;/[^ \r\n]/.test(n)&&(/[ \r\n$]/.test(n.charAt(0))||/[ \r\n$]/.test(n.charAt(n.length-1)))&&(i=" ");var o="$".repeat(r);return o+i+n+i+o}function i(){return"$"}}function O(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.data();function n(t,n){(e[t]?e[t]:e[t]=[]).push(n)}n("micromarkExtensions",g(t)),n("fromMarkdownExtensions",y()),n("toMarkdownExtensions",b(t))}var w,k,x,_,S=n(38),E=n(9),C=n(40),T=n(73),A=n(24),D=n(54),M=n(26),j=n(98),N=n.n(j),P=n(5),R=Object.defineProperty,L=Object.defineProperties,F=Object.getOwnPropertyDescriptors,B=Object.getOwnPropertySymbols,I=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,$=function(t,e,n){return e in t?R(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n},z=function(t,e){for(var n in e||(e={}))I.call(e,n)&&$(t,n,e[n]);if(B){var r,i=Object(o.a)(B(e));try{for(i.s();!(r=i.n()).done;){n=r.value;Q.call(e,n)&&$(t,n,e[n])}}catch(a){i.e(a)}finally{i.f()}}return t},q=function(t,e){return L(t,F(e))},W=/^\$\$\s$/,V=Object(a.e)((function(t,e){var n,r=function(t){return{codeStyle:t.getStyle((function(t,e){var n=t.palette,r=t.size,o=t.font;return(0,e.css)(w||(w=Object(i.a)(["\n color: ",";\n background-color: ",";\n border-radius: ",";\n padding: 1rem 2rem;\n font-size: 0.875rem;\n font-family: ",";\n overflow: hidden;\n .ProseMirror {\n outline: none;\n }\n "])),n("neutral",.87),n("background"),r.radius,o.code)})),hideCodeStyle:t.getStyle((function(t,e){return(0,e.css)(k||(k=Object(i.a)(["\n display: none;\n "])))})),previewPanelStyle:t.getStyle((function(t,e){return(0,e.css)(x||(x=Object(i.a)(["\n display: flex;\n justify-content: center;\n padding: 1rem 0;\n "])))}))}}(t),o=r.codeStyle,a=r.hideCodeStyle,s=r.previewPanelStyle,u="math_block",c=z({empty:"Empty",error:"Syntax Error"},null!=(n=null==e?void 0:e.placeholder)?n:{});return{id:u,schema:function(){return{content:"text*",group:"block",marks:"",defining:!0,atom:!0,code:!0,isolating:!0,attrs:{value:{default:""}},parseDOM:[{tag:'div[data-type="'.concat(u,'"]'),preserveWhitespace:"full",getAttrs:function(t){if(!(t instanceof HTMLElement))throw new Error;return{value:t.dataset.value}}}],toDOM:function(e){return["div",{class:t.getClassName(e.attrs,"mermaid"),"data-type":u,"data-value":e.attrs.value},0]},parseMarkdown:{match:function(t){return"math"===t.type},runner:function(t,e,n){var r=e.value;t.openNode(n,{value:r}),r&&t.addText(r),t.closeNode()}},toMarkdown:{match:function(t){return t.type.name===u},runner:function(t,e){var n="";e.forEach((function(t){n+=t.text})),t.addNode("math",void 0,n)}}}},view:function(){return function(t,e,n){var r=function(t,e){var n,r=!1;return{isEditing:function(){return r},innerView:function(){return n},openEditor:function(i,o){(n=new S.c(i,{state:E.b.create({doc:o,plugins:[Object(C.b)({Tab:function(t,e){return e&&e(t.tr.insertText("\t")),!0},Enter:T.b,"Mod-Enter":function(e,n){if(n){var r=t.state,i=r.selection.to,o=r.tr.replaceWith(i,i,r.schema.nodes.paragraph.createAndFill());t.dispatch(o.setSelection(E.h.create(o.doc,i))),t.focus()}return!0}})]}),dispatchTransaction:function(r){if(n){var i=n.state.applyTransaction(r),o=i.state,a=i.transactions;if(n.updateState(o),!r.getMeta("fromOutside")){var s=t.state.tr,u=A.e.offset(e()+1);a.forEach((function(t){t.steps.forEach((function(t){var e=t.map(u);if(!e)throw Error("step discarded!");s.step(e)}))})),s.docChanged&&t.dispatch(s)}}}})).focus();var a=n.state;n.dispatch(a.tr.setSelection(E.h.create(a.doc,0))),r=!0},closeEditor:function(){n&&n.destroy(),n=void 0,r=!1}}}(e,n),i=t,l=document.createElement("div");l.classList.add("math-block");var h=document.createElement("div");h.dataset.type=u,h.dataset.value=t.attrs.value,o&&a&&h.classList.add(o,a);var f=document.createElement("div");s&&f.classList.add(s),l.append(h);var d=function(t){try{t?N.a.render(t,f):f.innerHTML=c.empty}catch(e){f.innerHTML=c.error}finally{l.appendChild(f)}};return d(t.attrs.value),{dom:l,update:function(e){var n;if(!e.sameMarkup(i))return!1;i=e;var o=r.innerView();if(o){var a=o.state,s=e.content.findDiffStart(a.doc.content);if(null!==s&&void 0!==s){var u=e.content.findDiffEnd(a.doc.content);if(u){var c=u.a,l=u.b,f=s-Math.min(c,l);f>0&&(c+=f,l+=f),o.dispatch(a.tr.replace(s,l,t.slice(s,c)).setMeta("fromOutside",!0))}}}var p=(null==(n=e.content.firstChild)?void 0:n.text)||"";return h.dataset.value=p,d(p),!0},selectNode:function(){e.editable&&(a&&h.classList.remove(a),r.openEditor(h,i),l.classList.add("ProseMirror-selectednode"))},deselectNode:function(){a&&h.classList.add(a),r.closeEditor(),l.classList.remove("ProseMirror-selectednode")},stopEvent:function(t){var e=r.innerView(),n=t.target,i=n&&(null==e?void 0:e.dom.contains(n));return!(!e||!i)},ignoreMutation:function(){return!0},destroy:function(){f.remove(),h.remove(),l.remove()}}}},inputRules:function(t){return[Object(D.c)(W,t)]}}})),Y=Object(P.i)("ModifyInlineMath"),U=Object(a.e)((function(t,e){var n,r=z({empty:"(empty)",error:"(error)"},null!=(n=null==e?void 0:e.placeholder)?n:{}),o=t.getStyle((function(t,e){var n=t.size,r=t.palette;return(0,e.css)(_||(_=Object(i.a)(["\n font-size: unset;\n\n &.ProseMirror-selectednode {\n outline: none;\n border: "," solid ",";\n }\n "])),n.lineWidth,r("line"))})),a="math_inline";return{id:a,schema:function(){return{group:"inline",inline:!0,atom:!0,attrs:{value:{default:""}},parseDOM:[{tag:'span[data-type="'.concat(a,'"]'),getAttrs:function(t){if(!(t instanceof HTMLElement))throw new Error;return{value:t.dataset.value}}}],toDOM:function(t){return["span",{class:o,"data-type":a,"data-value":t.attrs.value}]},parseMarkdown:{match:function(t){return"inlineMath"===t.type},runner:function(t,e,n){var r=e.value;t.addNode(n,{value:r})}},toMarkdown:{match:function(t){return t.type.name===a},runner:function(t,e){t.addNode("inlineMath",void 0,e.attrs.value)}}}},commands:function(t){return[Object(P.h)(Y,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return function(n,r){var i=Object(M.g)(n.selection,t);if(!i)return!1;var o=n.tr.setNodeMarkup(i.pos,void 0,q(z({},i.node.attrs),{value:e}));return null==r||r(o.setSelection(E.c.create(o.doc,i.pos))),!0}}))]},view:function(){return function(t){var e=t,n=document.createElement("span");o&&n.classList.add(o);var i=function(t){try{t?N.a.render(t,n):n.innerHTML=r.empty}catch(e){n.innerHTML=r.error}};return i(t.attrs.value),{dom:n,update:function(t){if(!t.sameMarkup(e))return!1;e=t;var n=t.attrs.value;return i(n),!0}}}},inputRules:function(t){return[new D.a(/(?:\$)([^$]+)(?:\$)$/,(function(e,n,r,i){var o=e.doc.resolve(r),a=o.index(),s=e.doc.resolve(i);if(!o.parent.canReplaceWith(a,s.index(),t))return null;var u=n[1];return e.tr.replaceRangeWith(r,i,t.create({value:u},t.schema.text(u)))}))]}}})),H=a.c.create([U(),V()]),X=Object(a.f)((function(){return{remarkPlugins:function(){return[O]}}})),G=a.c.create([X()].concat(Object(r.a)(H)))},function(t,e,n){"use strict";n.d(e,"a",(function(){return $}));var r=n(19),i=n(0),o=n(12),a=n(5),s=n(26),u=n(38),c=n(9);function l(t){return"object"==typeof t&&null!=t&&1===t.nodeType}function h(t,e){return(!e||"hidden"!==t)&&"visible"!==t&&"clip"!==t}function f(t,e){if(t.clientHeighte||o>t&&a=e&&s>=n?o-t-r:a>e&&sn?a-e+i:0}var p=function(t,e){var n=window,r=e.scrollMode,i=e.block,o=e.inline,a=e.boundary,s=e.skipOverflowHiddenElements,u="function"==typeof a?a:function(t){return t!==a};if(!l(t))throw new TypeError("Invalid target");for(var c=document.scrollingElement||document.documentElement,h=[],p=t;l(p)&&u(p);){if((p=p.parentElement)===c){h.push(p);break}null!=p&&p===document.body&&f(p)&&!f(document.documentElement)||null!=p&&f(p,s)&&h.push(p)}for(var g=n.visualViewport?n.visualViewport.width:innerWidth,m=n.visualViewport?n.visualViewport.height:innerHeight,v=window.scrollX||pageXOffset,y=window.scrollY||pageYOffset,b=t.getBoundingClientRect(),O=b.height,w=b.width,k=b.top,x=b.right,_=b.bottom,S=b.left,E="start"===i||"nearest"===i?k:"end"===i?_:k+O/2,C="center"===o?S+w/2:"end"===o?x:S,T=[],A=0;A=0&&S>=0&&_<=m&&x<=g&&k>=P&&_<=L&&S>=F&&x<=R)return T;var B=getComputedStyle(D),I=parseInt(B.borderLeftWidth,10),Q=parseInt(B.borderTopWidth,10),$=parseInt(B.borderRightWidth,10),z=parseInt(B.borderBottomWidth,10),q=0,W=0,V="offsetWidth"in D?D.offsetWidth-D.clientWidth-I-$:0,Y="offsetHeight"in D?D.offsetHeight-D.clientHeight-Q-z:0;if(c===D)q="start"===i?E:"end"===i?E-m:"nearest"===i?d(y,y+m,m,Q,z,y+E,y+E+O,O):E-m/2,W="start"===o?C:"center"===o?C-g/2:"end"===o?C-g:d(v,v+g,g,I,$,v+C,v+C+w,w),q=Math.max(0,q+y),W=Math.max(0,W+v);else{q="start"===i?E-P-Q:"end"===i?E-L+z+Y:"nearest"===i?d(P,L,j,Q,z+Y,E,E+O,O):E-(P+j/2)+Y/2,W="start"===o?C-F-I:"center"===o?C-(F+N/2)+V/2:"end"===o?C-R+$+V:d(F,R,N,I,$+V,C,C+w,w);var U=D.scrollLeft,H=D.scrollTop;E+=H-(q=Math.max(0,Math.min(H+q,D.scrollHeight-j+Y))),C+=U-(W=Math.max(0,Math.min(U+W,D.scrollWidth-N+V)))}T.push({el:D,top:q,left:W})}return T};function g(t){return t===Object(t)&&0!==Object.keys(t).length}var m,v=function(t,e){var n=!t.ownerDocument.documentElement.contains(t);if(g(e)&&"function"===typeof e.behavior)return e.behavior(n?[]:p(t,e));if(!n){var r=function(t){return!1===t?{block:"end",inline:"nearest"}:g(t)?t:{block:"start",inline:"nearest"}}(e);return function(t,e){void 0===e&&(e="auto");var n="scrollBehavior"in document.body.style;t.forEach((function(t){var r=t.el,i=t.top,o=t.left;r.scroll&&n?r.scroll({top:i,left:o,behavior:e}):(r.scrollTop=i,r.scrollLeft=o)}))}(p(t,r),r.behavior)}},y=function(){return m||(m="performance"in window?performance.now.bind(performance):Date.now),m()};function b(t){var e=y(),n=Math.min((e-t.startTime)/t.duration,1),r=t.ease(n),i=t.startX+(t.x-t.startX)*r,o=t.startY+(t.y-t.startY)*r;t.method(i,o),i!==t.x||o!==t.y?requestAnimationFrame((function(){return b(t)})):t.cb()}function O(t,e,n,r,i,o){var a,s,u,c;void 0===r&&(r=600),void 0===i&&(i=function(t){return 1+--t*t*t*t*t}),a=t,s=t.scrollLeft,u=t.scrollTop,c=function(e,n){t.scrollLeft=Math.ceil(e),t.scrollTop=Math.ceil(n)},b({scrollable:a,method:c,startTime:y(),startX:s,startY:u,x:e,y:n,duration:r,ease:i,cb:o})}var w,k,x,_,S=function(t,e){var n=e||{};return function(t){return t&&!t.behavior||"smooth"===t.behavior}(n)?v(t,{block:n.block,inline:n.inline,scrollMode:n.scrollMode,boundary:n.boundary,behavior:function(t){return Promise.all(t.reduce((function(t,e){var r=e.el,i=e.left,o=e.top,a=r.scrollLeft,s=r.scrollTop;return a===i&&s===o?t:[].concat(t,[new Promise((function(t){return O(r,i,o,n.duration,n.ease,(function(){return t({el:r,left:[a,i],top:[s,o]})}))}))])}),[]))}}):Promise.resolve(v(t,e))},E=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable,A=function(t,e){var n={};for(var r in t)C.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&E){var o,a=Object(i.a)(E(t));try{for(a.s();!(o=a.n()).done;){r=o.value;e.indexOf(r)<0&&T.call(t,r)&&(n[r]=t[r])}}catch(s){a.e(s)}finally{a.f()}}return n},D=function(t,e){var n,i,o,a=t.mixin,s=t.size,u=t.palette;return e.css(k||(k=Object(r.a)(["\n width: 20.5rem;\n max-height: 20.5rem;\n overflow-y: auto;\n ",";\n border-radius: ",";\n position: absolute;\n background: ",";\n\n ",";\n\n &.hide {\n display: none;\n }\n\n ",";\n\n ","\n "])),null==(n=a.border)?void 0:n.call(a),s.radius,u("surface"),null==(i=a.shadow)?void 0:i.call(a),null==(o=a.scrollbar)?void 0:o.call(a),function(t,e){var n=t.font,i=t.palette;return(0,e.css)(w||(w=Object(r.a)(["\n .slash-dropdown-item {\n display: flex;\n gap: 2rem;\n height: 3rem;\n padding: 0 1rem;\n align-items: center;\n justify-content: flex-start;\n cursor: pointer;\n line-height: 2;\n font-family: ",";\n font-size: 0.875rem;\n\n transition: all 0.2s ease-in-out;\n\n &,\n .icon {\n color: ",";\n transition: all 0.2s ease-in-out;\n }\n\n &.hide {\n display: none;\n }\n\n &.active {\n background: ",";\n &,\n .icon {\n color: ",";\n }\n }\n "])),n.typography,i("neutral",.87),i("secondary",.12),i("primary"))}(t,e))},M=function(t,e,n,r){var i,o=null!=(i=null==r?void 0:r.textClassName)?i:"text",a=document.createElement("div");a.setAttribute("role","option"),a.classList.add("slash-dropdown-item");var s=t.slots.icon(n),u=document.createElement("span");return u.textContent=e,u.className=o,a.appendChild(s),a.appendChild(u),a},j=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",n=t.get(a.u),r=n.nodes,i=[{id:"h1",dom:M(t.get(a.x),"Large Heading","h1"),command:function(){return t.get(a.g).callByName("TurnIntoHeading",1)},keyword:["h1","large heading"],typeName:"heading"},{id:"h2",dom:M(t.get(a.x),"Medium Heading","h2"),command:function(){return t.get(a.g).callByName("TurnIntoHeading",2)},keyword:["h2","medium heading"],typeName:"heading"},{id:"h3",dom:M(t.get(a.x),"Small Heading","h3"),command:function(){return t.get(a.g).callByName("TurnIntoHeading",3)},keyword:["h3","small heading"],typeName:"heading"},{id:"bulletList",dom:M(t.get(a.x),"Bullet List","bulletList"),command:function(){return t.get(a.g).callByName("WrapInBulletList")},keyword:["bullet list","ul"],typeName:"bullet_list"},{id:"orderedList",dom:M(t.get(a.x),"Ordered List","orderedList"),command:function(){return t.get(a.g).callByName("WrapInOrderedList")},keyword:["ordered list","ol"],typeName:"ordered_list"},{id:"taskList",dom:M(t.get(a.x),"Task List","taskList"),command:function(){return t.get(a.g).callByName("TurnIntoTaskList")},keyword:["task list","task"],typeName:"task_list_item"},{id:"image",dom:M(t.get(a.x),"Image","image"),command:function(){return t.get(a.g).callByName("InsertImage")},keyword:["image"],typeName:"image"},{id:"blockquote",dom:M(t.get(a.x),"Quote","quote"),command:function(){return t.get(a.g).callByName("WrapInBlockquote")},keyword:["quote","blockquote"],typeName:"blockquote"},{id:"table",dom:M(t.get(a.x),"Table","table"),command:function(){return t.get(a.g).callByName("InsertTable")},keyword:["table"],typeName:"table"},{id:"code",dom:M(t.get(a.x),"Code Fence","code"),command:function(){return t.get(a.g).callByName("TurnIntoCodeFence")},keyword:["code"],typeName:"fence"},{id:"divider",dom:M(t.get(a.x),"Divide Line","divider"),command:function(){return t.get(a.g).callByName("InsertHr")},keyword:["divider","hr"],typeName:"hr"}],o=e.slice(1).toLocaleLowerCase();return i.filter((function(t){return!!r[t.typeName]&&t.keyword.some((function(t){return t.includes(o)}))})).map((function(t){var e=t;e.keyword,e.typeName;return A(e,["keyword","typeName"])}))},N=function(t){return function(e){var n=e.content;return e.isTopLevel?n?n.startsWith("/")?"/"===n?{placeholder:"Type to filter...",actions:j(t)}:{actions:j(t,n)}:null:{placeholder:"Type / to use the slash commands..."}:null}},P=function(t,e){var n=t.font,i=t.palette;return(0,e.css)(x||(x=Object(r.a)(["\n position: relative;\n &::before {\n position: absolute;\n cursor: text;\n font-family: ",";\n font-size: 0.875rem;\n color: ",";\n content: attr(data-text);\n height: 100%;\n display: flex;\n align-items: center;\n }\n"])),n.typography,i("neutral",.6))},R=function(t,e){return(0,e.css)(_||(_=Object(r.a)(["\n &::before {\n left: 0.5rem;\n }\n"])))},L=function(t,e){var n=e.getStyle(P),r=e.getStyle(R);return{handleKeyDown:function(e,n){return!t.isEmpty()&&(n instanceof KeyboardEvent&&!!["ArrowUp","ArrowDown","Enter"].includes(n.key))},decorations:function(e){var i=Object(s.f)((function(t){return"paragraph"===t.type.name}))(e.selection),o=e.plugins.find((function(t){return"MILKDOWN_PLUGIN_UPLOAD$"===t.key})),a=null==o?void 0:o.getState(e);if(null!=a&&a.find(e.selection.from,e.selection.to).length>0)t.clear();else{if(!(!i||i.node.childCount>1||e.selection.$from.parentOffset!==i.node.textContent.length||i.node.firstChild&&"text"!==i.node.firstChild.type.name)){var c=t.update({parentNode:e.selection.$from.node(e.selection.$from.depth-1),isTopLevel:1===e.selection.$from.depth,content:i.node.textContent,state:e}),l=c.placeholder,h=c.actions;if(!l)return null;var f=function(t,n){var r=i.pos;return u.b.create(e.doc,[u.a.node(r,r+i.node.nodeSize,{class:n.filter((function(t){return t})).join(" "),"data-text":t})])};return h.length?f(l,[n,r,"empty-node","is-slash"]):f(l,[n,"empty-node"])}t.clear()}}}},F=function(t){return{id:t.id,$:t.dom,command:(e=t.command,function(t,n,r){return r&&(function(t,e){var n=t.selection.$from,r=t.tr.deleteRange(n.start(),n.pos);null==e||e(r)}(t,n),e()),!0})};var e},B=function(t,e,n){var r=e.dom.parentNode;if(!r)return{};var i=function(t){var e=document.createElement("div");e.setAttribute("role","listbox"),e.setAttribute("tabindex","-1");var n=t.getStyle(D);return n&&e.classList.add(n),e.classList.add("slash-dropdown","hide"),e}(n),o=function(){var t=!1;return{isLock:function(){return t},lock:function(){t=!0},unlock:function(){t=!1}}}();r.appendChild(i);var a=function(t){return function(){t.unlock()}}(o),u=function(t,e,n){return function(r){var i=r.target;if(i instanceof HTMLElement&&e){var o=function(){r.stopPropagation(),r.preventDefault()},a=t.get().actions,s=Object.values(a).find((function(t){return t.$.contains(i)}));if(!s){if(t.isEmpty())return;return t.clear(),n.classList.add("hide"),void o()}o(),s.command(e.state,e.dispatch,e)}}}(t,e,i),c=function(t,e,n,r){return function(i){if(i instanceof KeyboardEvent){r.isLock()||r.lock();var o=i.key;if(!t.isEmpty()&&["ArrowDown","ArrowUp","Enter","Escape"].includes(o)){var a=t.get().actions,s=a.findIndex((function(t){return t.$.classList.contains("active")}));s<0&&(s=0);var u=function(t){var e=a[s],n=a[t];e&&n&&(e.$.classList.remove("active"),n.$.classList.add("active"),S(n.$,{scrollMode:"if-needed",block:"nearest",inline:"nearest"}))};if("ArrowDown"!==o)if("ArrowUp"!==o){if("Escape"===o){if(t.isEmpty())return;return t.clear(),void n.classList.add("hide")}var c=a[s];c&&(c.command(e.state,e.dispatch,e),c.$.classList.remove("active"))}else u(0===s?a.length-1:s-1);else u(s===a.length-1?0:s+1)}}}}(t,e,i,o),l=function(t,e){return function(n){if(!e.isLock()){var r=t.get().actions,i=r.findIndex((function(t){return t.$.classList.contains("active")})),o=r[i];o&&i>=0&&o.$.classList.remove("active");var a=n.target;a instanceof HTMLElement&&a.classList.add("active")}}}(t,o),h=function(t){var e=t.target;e instanceof HTMLElement&&e.classList.remove("active")};return r.addEventListener("mousemove",a),r.addEventListener("mousedown",u),r.addEventListener("keydown",c),{update:function(e){var n=function(t,e,n){var r=t.get().actions;if(!r.length)return e.classList.add("hide"),!1;e.childNodes.forEach((function(t){t.removeEventListener("mouseenter",n.mouseEnter),t.removeEventListener("mouseleave",n.mouseLeave)})),e.textContent="",r.forEach((function(t){var r=t.$;r.classList.remove("active"),r.addEventListener("mouseenter",n.mouseEnter),r.addEventListener("mouseleave",n.mouseLeave),e.appendChild(r)})),e.classList.remove("hide");var i=r[0];return i&&(i.$.classList.add("active"),requestAnimationFrame((function(){S(i.$,{scrollMode:"if-needed",block:"nearest",inline:"nearest"})}))),!0}(t,i,{mouseEnter:l,mouseLeave:h});n&&function(t,e){Object(s.a)(t,e,(function(t,n,r){var i=e.parentElement;if(!i)throw new Error;var o=t.left-r.left,a=t.bottom-r.top+14+i.scrollTop;return o<0&&(o=0),window.innerHeight-t.bottomh&&T.push("'"+this.terminals_[S]+"'");D=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[O]||O)+"'":"Parse error on line "+(u+1)+": Unexpected "+(O==f?"end of input":"'"+(this.terminals_[O]||O)+"'"),this.parseError(D,{text:p.match,token:this.terminals_[O]||O,line:p.yylineno,loc:v,expected:T})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+O);switch(x[0]){case 1:n.push(O),i.push(p.yytext),o.push(p.yylloc),n.push(x[1]),O=null,w?(O=w,w=null):(c=p.yyleng,s=p.yytext,u=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[x[1]][1],A.$=i[i.length-E],A._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(A._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),void 0!==(_=this.performAction.apply(A,[s,c,u,g.yy,x[1],i,o].concat(d))))return _;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[x[1]][0]),i.push(A.$),o.push(A._$),C=a[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0}},F={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;oe[0].length)){if(e=n,r=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),18;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 10;case 5:return this.begin("type_directive"),19;case 6:return this.popState(),this.begin("arg_directive"),16;case 7:return this.popState(),this.popState(),21;case 8:return 20;case 9:case 10:case 12:case 19:break;case 11:return 15;case 13:case 14:return 22;case 15:return this.begin("struct"),39;case 16:return"EOF_IN_STRUCT";case 17:return"OPEN_IN_STRUCT";case 18:return this.popState(),41;case 20:return"MEMBER";case 21:return 37;case 22:return 63;case 23:return 56;case 24:return 57;case 25:return 59;case 26:return 42;case 27:return 43;case 28:this.begin("generic");break;case 29:case 32:case 35:case 38:case 41:case 44:this.popState();break;case 30:return"GENERICTYPE";case 31:this.begin("string");break;case 33:return"STR";case 34:this.begin("bqstring");break;case 36:return"BQUOTE_STR";case 37:this.begin("href");break;case 39:return 62;case 40:this.begin("callback_name");break;case 42:this.popState(),this.begin("callback_args");break;case 43:return 60;case 45:return 61;case 46:case 47:case 48:case 49:return 58;case 50:case 51:return 51;case 52:case 53:return 53;case 54:return 52;case 55:return 50;case 56:return 54;case 57:return 55;case 58:return 31;case 59:return 38;case 60:return 75;case 61:return"DOT";case 62:return"PLUS";case 63:return 72;case 64:case 65:return"EQUALS";case 66:return 79;case 67:return"PUNCTUATION";case 68:return 78;case 69:return 77;case 70:return 74;case 71:return 24}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:[{])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:class\b)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[`])/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/],conditions:{arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},callback_args:{rules:[44,45],inclusive:!1},callback_name:{rules:[41,42,43],inclusive:!1},href:{rules:[38,39],inclusive:!1},struct:{rules:[16,17,18,19,20],inclusive:!1},generic:{rules:[29,30],inclusive:!1},bqstring:{rules:[35,36],inclusive:!1},string:{rules:[32,33],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,12,13,14,15,21,22,23,24,25,26,27,28,31,34,37,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71],inclusive:!0}}};function B(){this.yy={}}return L.lexer=F,B.prototype=L,L.Parser=B,new B}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(8218).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},5890:function(t,e,n){t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,5],r=[6,9,11,23,40],i=[1,17],o=[1,20],a=[1,25],s=[1,26],u=[1,27],c=[1,28],l=[1,37],h=[23,37,38],f=[4,6,9,11,23,40],d=[33,34,35,36],p=[22,29],g={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,entityName:17,relSpec:18,role:19,BLOCK_START:20,attributes:21,BLOCK_STOP:22,ALPHANUM:23,attribute:24,attributeType:25,attributeName:26,attributeKeyType:27,COMMENT:28,ATTRIBUTE_WORD:29,ATTRIBUTE_KEY:30,cardinality:31,relType:32,ZERO_OR_ONE:33,ZERO_OR_MORE:34,ONE_OR_MORE:35,ONLY_ONE:36,NON_IDENTIFYING:37,IDENTIFYING:38,WORD:39,open_directive:40,type_directive:41,arg_directive:42,close_directive:43,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",20:"BLOCK_START",22:"BLOCK_STOP",23:"ALPHANUM",28:"COMMENT",29:"ATTRIBUTE_WORD",30:"ATTRIBUTE_KEY",33:"ZERO_OR_ONE",34:"ZERO_OR_MORE",35:"ONE_OR_MORE",36:"ONLY_ONE",37:"NON_IDENTIFYING",38:"IDENTIFYING",39:"WORD",40:"open_directive",41:"type_directive",42:"arg_directive",43:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,5],[10,4],[10,3],[10,1],[17,1],[21,1],[21,2],[24,2],[24,3],[24,3],[24,4],[25,1],[26,1],[27,1],[18,3],[31,1],[31,1],[31,1],[31,1],[32,1],[32,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,n,r,i,o,a){var s=o.length-1;switch(i){case 1:break;case 3:case 7:case 8:this.$=[];break;case 4:o[s-1].push(o[s]),this.$=o[s-1];break;case 5:case 6:case 16:case 23:case 24:case 25:case 34:this.$=o[s];break;case 12:r.addEntity(o[s-4]),r.addEntity(o[s-2]),r.addRelationship(o[s-4],o[s],o[s-2],o[s-3]);break;case 13:r.addEntity(o[s-3]),r.addAttributes(o[s-3],o[s-1]);break;case 14:r.addEntity(o[s-2]);break;case 15:r.addEntity(o[s]);break;case 17:this.$=[o[s]];break;case 18:o[s].push(o[s-1]),this.$=o[s];break;case 19:this.$={attributeType:o[s-1],attributeName:o[s]};break;case 20:this.$={attributeType:o[s-2],attributeName:o[s-1],attributeKeyType:o[s]};break;case 21:this.$={attributeType:o[s-2],attributeName:o[s-1],attributeComment:o[s]};break;case 22:this.$={attributeType:o[s-3],attributeName:o[s-2],attributeKeyType:o[s-1],attributeComment:o[s]};break;case 26:this.$={cardA:o[s],relType:o[s-1],cardB:o[s-2]};break;case 27:this.$=r.Cardinality.ZERO_OR_ONE;break;case 28:this.$=r.Cardinality.ZERO_OR_MORE;break;case 29:this.$=r.Cardinality.ONE_OR_MORE;break;case 30:this.$=r.Cardinality.ONLY_ONE;break;case 31:this.$=r.Identification.NON_IDENTIFYING;break;case 32:this.$=r.Identification.IDENTIFYING;break;case 33:this.$=o[s].replace(/"/g,"");break;case 35:r.parseDirective("%%{","open_directive");break;case 36:r.parseDirective(o[s],"type_directive");break;case 37:o[s]=o[s].trim().replace(/'/g,'"'),r.parseDirective(o[s],"arg_directive");break;case 38:r.parseDirective("}%%","close_directive","er")}},table:[{3:1,4:e,7:3,12:4,40:n},{1:[3]},t(r,[2,3],{5:6}),{3:7,4:e,7:3,12:4,40:n},{13:8,41:[1,9]},{41:[2,35]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,23:i,40:n},{1:[2,2]},{14:18,15:[1,19],43:o},t([15,43],[2,36]),t(r,[2,8],{1:[2,1]}),t(r,[2,4]),{7:15,10:21,12:4,17:16,23:i,40:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,11]),t(r,[2,15],{18:22,31:24,20:[1,23],33:a,34:s,35:u,36:c}),t([6,9,11,15,20,23,33,34,35,36,40],[2,16]),{11:[1,29]},{16:30,42:[1,31]},{11:[2,38]},t(r,[2,5]),{17:32,23:i},{21:33,22:[1,34],24:35,25:36,29:l},{32:38,37:[1,39],38:[1,40]},t(h,[2,27]),t(h,[2,28]),t(h,[2,29]),t(h,[2,30]),t(f,[2,9]),{14:41,43:o},{43:[2,37]},{15:[1,42]},{22:[1,43]},t(r,[2,14]),{21:44,22:[2,17],24:35,25:36,29:l},{26:45,29:[1,46]},{29:[2,23]},{31:47,33:a,34:s,35:u,36:c},t(d,[2,31]),t(d,[2,32]),{11:[1,48]},{19:49,23:[1,51],39:[1,50]},t(r,[2,13]),{22:[2,18]},t(p,[2,19],{27:52,28:[1,53],30:[1,54]}),t([22,28,29,30],[2,24]),{23:[2,26]},t(f,[2,10]),t(r,[2,12]),t(r,[2,33]),t(r,[2,34]),t(p,[2,20],{28:[1,55]}),t(p,[2,21]),t([22,28,29],[2,25]),t(p,[2,22])],defaultActions:{5:[2,35],7:[2,2],20:[2,38],31:[2,37],37:[2,23],44:[2,18],47:[2,26]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],o=[],a=this.table,s="",u=0,c=0,l=0,h=2,f=1,d=o.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(g.yy[m]=this.yy[m]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;o.push(v);var y=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var O,w,k,x,_,S,E,C,T,A={};;){if(k=n[n.length-1],this.defaultActions[k]?x=this.defaultActions[k]:(null==O&&(O=b()),x=a[k]&&a[k][O]),void 0===x||!x.length||!x[0]){var D="";for(S in T=[],a[k])this.terminals_[S]&&S>h&&T.push("'"+this.terminals_[S]+"'");D=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[O]||O)+"'":"Parse error on line "+(u+1)+": Unexpected "+(O==f?"end of input":"'"+(this.terminals_[O]||O)+"'"),this.parseError(D,{text:p.match,token:this.terminals_[O]||O,line:p.yylineno,loc:v,expected:T})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+O);switch(x[0]){case 1:n.push(O),i.push(p.yytext),o.push(p.yylloc),n.push(x[1]),O=null,w?(O=w,w=null):(c=p.yyleng,s=p.yytext,u=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[x[1]][1],A.$=i[i.length-E],A._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(A._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),void 0!==(_=this.performAction.apply(A,[s,c,u,g.yy,x[1],i,o].concat(d))))return _;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[x[1]][0]),i.push(A.$),o.push(A._$),C=a[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0}},m={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;oe[0].length)){if(e=n,r=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),40;case 1:return this.begin("type_directive"),41;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),43;case 4:return 42;case 5:case 6:case 8:case 13:case 17:break;case 7:return 11;case 9:return 9;case 10:return 39;case 11:return 4;case 12:return this.begin("block"),20;case 14:return 30;case 15:return 29;case 16:return 28;case 18:return this.popState(),22;case 19:case 32:return e.yytext[0];case 20:case 24:return 33;case 21:case 25:return 34;case 22:case 26:return 35;case 23:return 36;case 27:case 29:case 30:return 37;case 28:return 38;case 31:return 23;case 33:return 6}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:\s+)/i,/^(?:(?:PK)|(?:FK))/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\|o\b)/i,/^(?:\}o\b)/i,/^(?:\}\|)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},block:{rules:[13,14,15,16,17,18,19],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,20,21,22,23,24,25,26,27,28,29,30,31,32,33],inclusive:!0}}};function v(){this.yy={}}return g.lexer=m,v.prototype=g,g.Parser=v,new v}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(8009).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},3602:function(t,e,n){t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,9],n=[1,7],r=[1,6],i=[1,8],o=[1,20,21,22,23,38,47,59,60,79,80,81,82,83,84,88,98,99,102,104,105,111,112,113,114,115,116,117,118,119,120],a=[2,10],s=[1,20],u=[1,21],c=[1,22],l=[1,23],h=[1,30],f=[1,59],d=[1,45],p=[1,49],g=[1,33],m=[1,34],v=[1,35],y=[1,36],b=[1,37],O=[1,53],w=[1,60],k=[1,48],x=[1,50],_=[1,52],S=[1,56],E=[1,57],C=[1,38],T=[1,39],A=[1,40],D=[1,41],M=[1,58],j=[1,47],N=[1,51],P=[1,54],R=[1,55],L=[1,46],F=[1,63],B=[1,68],I=[1,20,21,22,23,38,42,47,59,60,79,80,81,82,83,84,88,98,99,102,104,105,111,112,113,114,115,116,117,118,119,120],Q=[1,72],$=[1,71],z=[1,73],q=[20,21,23,74,75],W=[1,94],V=[1,99],Y=[1,102],U=[1,103],H=[1,96],X=[1,101],G=[1,104],Z=[1,97],K=[1,109],J=[1,108],tt=[1,98],et=[1,100],nt=[1,105],rt=[1,106],it=[1,107],ot=[1,110],at=[20,21,22,23,74,75],st=[20,21,22,23,48,74,75],ut=[20,21,22,23,40,47,48,50,52,54,56,58,59,60,62,64,66,67,69,74,75,84,88,98,99,102,104,105,115,116,117,118,119,120],ct=[20,21,23],lt=[20,21,23,47,59,60,74,75,84,88,98,99,102,104,105,115,116,117,118,119,120],ht=[1,12,20,21,22,23,24,38,42,47,59,60,79,80,81,82,83,84,88,98,99,102,104,105,111,112,113,114,115,116,117,118,119,120],ft=[47,59,60,84,88,98,99,102,104,105,115,116,117,118,119,120],dt=[1,143],pt=[1,151],gt=[1,152],mt=[1,153],vt=[1,154],yt=[1,138],bt=[1,139],Ot=[1,135],wt=[1,146],kt=[1,147],xt=[1,148],_t=[1,149],St=[1,150],Et=[1,155],Ct=[1,156],Tt=[1,141],At=[1,144],Dt=[1,140],Mt=[1,137],jt=[20,21,22,23,38,42,47,59,60,79,80,81,82,83,84,88,98,99,102,104,105,111,112,113,114,115,116,117,118,119,120],Nt=[1,159],Pt=[20,21,22,23,26,47,59,60,84,98,99,102,104,105,115,116,117,118,119,120],Rt=[20,21,22,23,24,26,38,40,41,42,47,51,53,55,57,59,60,61,63,65,66,68,70,74,75,79,80,81,82,83,84,85,88,98,99,102,104,105,106,107,115,116,117,118,119,120],Lt=[12,21,22,24],Ft=[22,99],Bt=[1,242],It=[1,237],Qt=[1,238],$t=[1,246],zt=[1,243],qt=[1,240],Wt=[1,239],Vt=[1,241],Yt=[1,244],Ut=[1,245],Ht=[1,247],Xt=[1,265],Gt=[20,21,23,99],Zt=[20,21,22,23,59,60,79,95,98,99,102,103,104,105,106],Kt={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,openDirective:6,typeDirective:7,closeDirective:8,separator:9,":":10,argDirective:11,open_directive:12,type_directive:13,arg_directive:14,close_directive:15,graphConfig:16,document:17,line:18,statement:19,SEMI:20,NEWLINE:21,SPACE:22,EOF:23,GRAPH:24,NODIR:25,DIR:26,FirstStmtSeperator:27,ending:28,endToken:29,spaceList:30,spaceListNewline:31,verticeStatement:32,styleStatement:33,linkStyleStatement:34,classDefStatement:35,classStatement:36,clickStatement:37,subgraph:38,text:39,SQS:40,SQE:41,end:42,direction:43,link:44,node:45,vertex:46,AMP:47,STYLE_SEPARATOR:48,idString:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,ALPHA:59,COLON:60,PIPE:61,CYLINDERSTART:62,CYLINDEREND:63,DIAMOND_START:64,DIAMOND_STOP:65,TAGEND:66,TRAPSTART:67,TRAPEND:68,INVTRAPSTART:69,INVTRAPEND:70,linkStatement:71,arrowText:72,TESTSTR:73,START_LINK:74,LINK:75,textToken:76,STR:77,keywords:78,STYLE:79,LINKSTYLE:80,CLASSDEF:81,CLASS:82,CLICK:83,DOWN:84,UP:85,textNoTags:86,textNoTagsToken:87,DEFAULT:88,stylesOpt:89,alphaNum:90,CALLBACKNAME:91,CALLBACKARGS:92,HREF:93,LINK_TARGET:94,HEX:95,numList:96,INTERPOLATE:97,NUM:98,COMMA:99,style:100,styleComponent:101,MINUS:102,UNIT:103,BRKT:104,DOT:105,PCT:106,TAGSTART:107,alphaNumToken:108,idStringToken:109,alphaNumStatement:110,direction_tb:111,direction_bt:112,direction_rl:113,direction_lr:114,PUNCTUATION:115,UNICODE_TEXT:116,PLUS:117,EQUALS:118,MULT:119,UNDERSCORE:120,graphCodeTokens:121,ARROW_CROSS:122,ARROW_POINT:123,ARROW_CIRCLE:124,ARROW_OPEN:125,QUOTE:126,$accept:0,$end:1},terminals_:{2:"error",10:":",12:"open_directive",13:"type_directive",14:"arg_directive",15:"close_directive",20:"SEMI",21:"NEWLINE",22:"SPACE",23:"EOF",24:"GRAPH",25:"NODIR",26:"DIR",38:"subgraph",40:"SQS",41:"SQE",42:"end",47:"AMP",48:"STYLE_SEPARATOR",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"ALPHA",60:"COLON",61:"PIPE",62:"CYLINDERSTART",63:"CYLINDEREND",64:"DIAMOND_START",65:"DIAMOND_STOP",66:"TAGEND",67:"TRAPSTART",68:"TRAPEND",69:"INVTRAPSTART",70:"INVTRAPEND",73:"TESTSTR",74:"START_LINK",75:"LINK",77:"STR",79:"STYLE",80:"LINKSTYLE",81:"CLASSDEF",82:"CLASS",83:"CLICK",84:"DOWN",85:"UP",88:"DEFAULT",91:"CALLBACKNAME",92:"CALLBACKARGS",93:"HREF",94:"LINK_TARGET",95:"HEX",97:"INTERPOLATE",98:"NUM",99:"COMMA",102:"MINUS",103:"UNIT",104:"BRKT",105:"DOT",106:"PCT",107:"TAGSTART",111:"direction_tb",112:"direction_bt",113:"direction_rl",114:"direction_lr",115:"PUNCTUATION",116:"UNICODE_TEXT",117:"PLUS",118:"EQUALS",119:"MULT",120:"UNDERSCORE",122:"ARROW_CROSS",123:"ARROW_POINT",124:"ARROW_CIRCLE",125:"ARROW_OPEN",126:"QUOTE"},productions_:[0,[3,1],[3,2],[5,4],[5,6],[6,1],[7,1],[11,1],[8,1],[4,2],[17,0],[17,2],[18,1],[18,1],[18,1],[18,1],[18,1],[16,2],[16,2],[16,2],[16,3],[28,2],[28,1],[29,1],[29,1],[29,1],[27,1],[27,1],[27,2],[31,2],[31,2],[31,1],[31,1],[30,2],[30,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,9],[19,6],[19,4],[19,1],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[45,1],[45,5],[45,3],[46,4],[46,6],[46,4],[46,4],[46,4],[46,8],[46,4],[46,4],[46,4],[46,6],[46,4],[46,4],[46,4],[46,4],[46,4],[46,1],[44,2],[44,3],[44,3],[44,1],[44,3],[71,1],[72,3],[39,1],[39,2],[39,1],[78,1],[78,1],[78,1],[78,1],[78,1],[78,1],[78,1],[78,1],[78,1],[78,1],[78,1],[86,1],[86,2],[35,5],[35,5],[36,5],[37,2],[37,4],[37,3],[37,5],[37,2],[37,4],[37,4],[37,6],[37,2],[37,4],[37,2],[37,4],[37,4],[37,6],[33,5],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[96,1],[96,3],[89,1],[89,3],[100,1],[100,2],[101,1],[101,1],[101,1],[101,1],[101,1],[101,1],[101,1],[101,1],[101,1],[101,1],[101,1],[76,1],[76,1],[76,1],[76,1],[76,1],[76,1],[87,1],[87,1],[87,1],[87,1],[49,1],[49,2],[90,1],[90,2],[110,1],[110,1],[110,1],[110,1],[43,1],[43,1],[43,1],[43,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1]],performAction:function(t,e,n,r,i,o,a){var s=o.length-1;switch(i){case 5:r.parseDirective("%%{","open_directive");break;case 6:r.parseDirective(o[s],"type_directive");break;case 7:o[s]=o[s].trim().replace(/'/g,'"'),r.parseDirective(o[s],"arg_directive");break;case 8:r.parseDirective("}%%","close_directive","flowchart");break;case 10:case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 11:o[s]!==[]&&o[s-1].push(o[s]),this.$=o[s-1];break;case 12:case 78:case 80:case 92:case 148:case 150:case 151:case 74:case 146:this.$=o[s];break;case 19:r.setDirection("TB"),this.$="TB";break;case 20:r.setDirection(o[s-1]),this.$=o[s-1];break;case 35:this.$=o[s-1].nodes;break;case 41:this.$=r.addSubGraph(o[s-6],o[s-1],o[s-4]);break;case 42:this.$=r.addSubGraph(o[s-3],o[s-1],o[s-3]);break;case 43:this.$=r.addSubGraph(void 0,o[s-1],void 0);break;case 48:r.addLink(o[s-2].stmt,o[s],o[s-1]),this.$={stmt:o[s],nodes:o[s].concat(o[s-2].nodes)};break;case 49:r.addLink(o[s-3].stmt,o[s-1],o[s-2]),this.$={stmt:o[s-1],nodes:o[s-1].concat(o[s-3].nodes)};break;case 50:this.$={stmt:o[s-1],nodes:o[s-1]};break;case 51:this.$={stmt:o[s],nodes:o[s]};break;case 52:case 119:case 121:this.$=[o[s]];break;case 53:this.$=o[s-4].concat(o[s]);break;case 54:this.$=[o[s-2]],r.setClass(o[s-2],o[s]);break;case 55:this.$=o[s-3],r.addVertex(o[s-3],o[s-1],"square");break;case 56:this.$=o[s-5],r.addVertex(o[s-5],o[s-2],"circle");break;case 57:this.$=o[s-3],r.addVertex(o[s-3],o[s-1],"ellipse");break;case 58:this.$=o[s-3],r.addVertex(o[s-3],o[s-1],"stadium");break;case 59:this.$=o[s-3],r.addVertex(o[s-3],o[s-1],"subroutine");break;case 60:this.$=o[s-7],r.addVertex(o[s-7],o[s-1],"rect",void 0,void 0,void 0,Object.fromEntries([[o[s-5],o[s-3]]]));break;case 61:this.$=o[s-3],r.addVertex(o[s-3],o[s-1],"cylinder");break;case 62:this.$=o[s-3],r.addVertex(o[s-3],o[s-1],"round");break;case 63:this.$=o[s-3],r.addVertex(o[s-3],o[s-1],"diamond");break;case 64:this.$=o[s-5],r.addVertex(o[s-5],o[s-2],"hexagon");break;case 65:this.$=o[s-3],r.addVertex(o[s-3],o[s-1],"odd");break;case 66:this.$=o[s-3],r.addVertex(o[s-3],o[s-1],"trapezoid");break;case 67:this.$=o[s-3],r.addVertex(o[s-3],o[s-1],"inv_trapezoid");break;case 68:this.$=o[s-3],r.addVertex(o[s-3],o[s-1],"lean_right");break;case 69:this.$=o[s-3],r.addVertex(o[s-3],o[s-1],"lean_left");break;case 70:this.$=o[s],r.addVertex(o[s]);break;case 71:o[s-1].text=o[s],this.$=o[s-1];break;case 72:case 73:o[s-2].text=o[s-1],this.$=o[s-2];break;case 75:var u=r.destructLink(o[s],o[s-2]);this.$={type:u.type,stroke:u.stroke,length:u.length,text:o[s-1]};break;case 76:u=r.destructLink(o[s]),this.$={type:u.type,stroke:u.stroke,length:u.length};break;case 77:this.$=o[s-1];break;case 79:case 93:case 149:case 147:this.$=o[s-1]+""+o[s];break;case 94:case 95:this.$=o[s-4],r.addClass(o[s-2],o[s]);break;case 96:this.$=o[s-4],r.setClass(o[s-2],o[s]);break;case 97:case 105:this.$=o[s-1],r.setClickEvent(o[s-1],o[s]);break;case 98:case 106:this.$=o[s-3],r.setClickEvent(o[s-3],o[s-2]),r.setTooltip(o[s-3],o[s]);break;case 99:this.$=o[s-2],r.setClickEvent(o[s-2],o[s-1],o[s]);break;case 100:this.$=o[s-4],r.setClickEvent(o[s-4],o[s-3],o[s-2]),r.setTooltip(o[s-4],o[s]);break;case 101:case 107:this.$=o[s-1],r.setLink(o[s-1],o[s]);break;case 102:case 108:this.$=o[s-3],r.setLink(o[s-3],o[s-2]),r.setTooltip(o[s-3],o[s]);break;case 103:case 109:this.$=o[s-3],r.setLink(o[s-3],o[s-2],o[s]);break;case 104:case 110:this.$=o[s-5],r.setLink(o[s-5],o[s-4],o[s]),r.setTooltip(o[s-5],o[s-2]);break;case 111:this.$=o[s-4],r.addVertex(o[s-2],void 0,void 0,o[s]);break;case 112:case 114:this.$=o[s-4],r.updateLink(o[s-2],o[s]);break;case 113:this.$=o[s-4],r.updateLink([o[s-2]],o[s]);break;case 115:this.$=o[s-8],r.updateLinkInterpolate([o[s-6]],o[s-2]),r.updateLink([o[s-6]],o[s]);break;case 116:this.$=o[s-8],r.updateLinkInterpolate(o[s-6],o[s-2]),r.updateLink(o[s-6],o[s]);break;case 117:this.$=o[s-6],r.updateLinkInterpolate([o[s-4]],o[s]);break;case 118:this.$=o[s-6],r.updateLinkInterpolate(o[s-4],o[s]);break;case 120:case 122:o[s-2].push(o[s]),this.$=o[s-2];break;case 124:this.$=o[s-1]+o[s];break;case 152:this.$="v";break;case 153:this.$="-";break;case 154:this.$={stmt:"dir",value:"TB"};break;case 155:this.$={stmt:"dir",value:"BT"};break;case 156:this.$={stmt:"dir",value:"RL"};break;case 157:this.$={stmt:"dir",value:"LR"}}},table:[{3:1,4:2,5:3,6:5,12:e,16:4,21:n,22:r,24:i},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:e,16:4,21:n,22:r,24:i},t(o,a,{17:11}),{7:12,13:[1,13]},{16:14,21:n,22:r,24:i},{16:15,21:n,22:r,24:i},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:s,21:u,22:c,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,43:31,45:32,46:42,47:f,49:43,59:d,60:p,79:g,80:m,81:v,82:y,83:b,84:O,88:w,98:k,99:x,102:_,104:S,105:E,109:44,111:C,112:T,113:A,114:D,115:M,116:j,117:N,118:P,119:R,120:L},{8:61,10:[1,62],15:F},t([10,15],[2,6]),t(o,[2,17]),t(o,[2,18]),t(o,[2,19]),{20:[1,65],21:[1,66],22:B,27:64,30:67},t(I,[2,11]),t(I,[2,12]),t(I,[2,13]),t(I,[2,14]),t(I,[2,15]),t(I,[2,16]),{9:69,20:Q,21:$,23:z,44:70,71:74,74:[1,75],75:[1,76]},{9:77,20:Q,21:$,23:z},{9:78,20:Q,21:$,23:z},{9:79,20:Q,21:$,23:z},{9:80,20:Q,21:$,23:z},{9:81,20:Q,21:$,23:z},{9:83,20:Q,21:$,22:[1,82],23:z},t(I,[2,44]),t(q,[2,51],{30:84,22:B}),{22:[1,85]},{22:[1,86]},{22:[1,87]},{22:[1,88]},{26:W,47:V,59:Y,60:U,77:[1,92],84:H,90:91,91:[1,89],93:[1,90],98:X,99:G,102:Z,104:K,105:J,108:95,110:93,115:tt,116:et,117:nt,118:rt,119:it,120:ot},t(I,[2,154]),t(I,[2,155]),t(I,[2,156]),t(I,[2,157]),t(at,[2,52],{48:[1,111]}),t(st,[2,70],{109:123,40:[1,112],47:f,50:[1,113],52:[1,114],54:[1,115],56:[1,116],58:[1,117],59:d,60:p,62:[1,118],64:[1,119],66:[1,120],67:[1,121],69:[1,122],84:O,88:w,98:k,99:x,102:_,104:S,105:E,115:M,116:j,117:N,118:P,119:R,120:L}),t(ut,[2,146]),t(ut,[2,171]),t(ut,[2,172]),t(ut,[2,173]),t(ut,[2,174]),t(ut,[2,175]),t(ut,[2,176]),t(ut,[2,177]),t(ut,[2,178]),t(ut,[2,179]),t(ut,[2,180]),t(ut,[2,181]),t(ut,[2,182]),t(ut,[2,183]),t(ut,[2,184]),t(ut,[2,185]),t(ut,[2,186]),{9:124,20:Q,21:$,23:z},{11:125,14:[1,126]},t(ct,[2,8]),t(o,[2,20]),t(o,[2,26]),t(o,[2,27]),{21:[1,127]},t(lt,[2,34],{30:128,22:B}),t(I,[2,35]),{45:129,46:42,47:f,49:43,59:d,60:p,84:O,88:w,98:k,99:x,102:_,104:S,105:E,109:44,115:M,116:j,117:N,118:P,119:R,120:L},t(ht,[2,45]),t(ht,[2,46]),t(ht,[2,47]),t(ft,[2,74],{72:130,61:[1,132],73:[1,131]}),{22:dt,24:pt,26:gt,38:mt,39:133,42:vt,47:V,59:Y,60:U,66:yt,74:bt,76:134,77:Ot,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},t([47,59,60,61,73,84,88,98,99,102,104,105,115,116,117,118,119,120],[2,76]),t(I,[2,36]),t(I,[2,37]),t(I,[2,38]),t(I,[2,39]),t(I,[2,40]),{22:dt,24:pt,26:gt,38:mt,39:157,42:vt,47:V,59:Y,60:U,66:yt,74:bt,76:134,77:Ot,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},t(jt,a,{17:158}),t(q,[2,50],{47:Nt}),{26:W,47:V,59:Y,60:U,84:H,90:160,95:[1,161],98:X,99:G,102:Z,104:K,105:J,108:95,110:93,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{88:[1,162],96:163,98:[1,164]},{26:W,47:V,59:Y,60:U,84:H,88:[1,165],90:166,98:X,99:G,102:Z,104:K,105:J,108:95,110:93,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{26:W,47:V,59:Y,60:U,84:H,90:167,98:X,99:G,102:Z,104:K,105:J,108:95,110:93,115:tt,116:et,117:nt,118:rt,119:it,120:ot},t(ct,[2,97],{22:[1,168],92:[1,169]}),t(ct,[2,101],{22:[1,170]}),t(ct,[2,105],{108:95,110:172,22:[1,171],26:W,47:V,59:Y,60:U,84:H,98:X,99:G,102:Z,104:K,105:J,115:tt,116:et,117:nt,118:rt,119:it,120:ot}),t(ct,[2,107],{22:[1,173]}),t(Pt,[2,148]),t(Pt,[2,150]),t(Pt,[2,151]),t(Pt,[2,152]),t(Pt,[2,153]),t(Rt,[2,158]),t(Rt,[2,159]),t(Rt,[2,160]),t(Rt,[2,161]),t(Rt,[2,162]),t(Rt,[2,163]),t(Rt,[2,164]),t(Rt,[2,165]),t(Rt,[2,166]),t(Rt,[2,167]),t(Rt,[2,168]),t(Rt,[2,169]),t(Rt,[2,170]),{47:f,49:174,59:d,60:p,84:O,88:w,98:k,99:x,102:_,104:S,105:E,109:44,115:M,116:j,117:N,118:P,119:R,120:L},{22:dt,24:pt,26:gt,38:mt,39:175,42:vt,47:V,59:Y,60:U,66:yt,74:bt,76:134,77:Ot,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{22:dt,24:pt,26:gt,38:mt,39:177,42:vt,47:V,50:[1,176],59:Y,60:U,66:yt,74:bt,76:134,77:Ot,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{22:dt,24:pt,26:gt,38:mt,39:178,42:vt,47:V,59:Y,60:U,66:yt,74:bt,76:134,77:Ot,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{22:dt,24:pt,26:gt,38:mt,39:179,42:vt,47:V,59:Y,60:U,66:yt,74:bt,76:134,77:Ot,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{22:dt,24:pt,26:gt,38:mt,39:180,42:vt,47:V,59:Y,60:U,66:yt,74:bt,76:134,77:Ot,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{59:[1,181]},{22:dt,24:pt,26:gt,38:mt,39:182,42:vt,47:V,59:Y,60:U,66:yt,74:bt,76:134,77:Ot,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{22:dt,24:pt,26:gt,38:mt,39:183,42:vt,47:V,59:Y,60:U,64:[1,184],66:yt,74:bt,76:134,77:Ot,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{22:dt,24:pt,26:gt,38:mt,39:185,42:vt,47:V,59:Y,60:U,66:yt,74:bt,76:134,77:Ot,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{22:dt,24:pt,26:gt,38:mt,39:186,42:vt,47:V,59:Y,60:U,66:yt,74:bt,76:134,77:Ot,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{22:dt,24:pt,26:gt,38:mt,39:187,42:vt,47:V,59:Y,60:U,66:yt,74:bt,76:134,77:Ot,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},t(ut,[2,147]),t(Lt,[2,3]),{8:188,15:F},{15:[2,7]},t(o,[2,28]),t(lt,[2,33]),t(q,[2,48],{30:189,22:B}),t(ft,[2,71],{22:[1,190]}),{22:[1,191]},{22:dt,24:pt,26:gt,38:mt,39:192,42:vt,47:V,59:Y,60:U,66:yt,74:bt,76:134,77:Ot,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{22:dt,24:pt,26:gt,38:mt,42:vt,47:V,59:Y,60:U,66:yt,74:bt,75:[1,193],76:194,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},t(Rt,[2,78]),t(Rt,[2,80]),t(Rt,[2,136]),t(Rt,[2,137]),t(Rt,[2,138]),t(Rt,[2,139]),t(Rt,[2,140]),t(Rt,[2,141]),t(Rt,[2,142]),t(Rt,[2,143]),t(Rt,[2,144]),t(Rt,[2,145]),t(Rt,[2,81]),t(Rt,[2,82]),t(Rt,[2,83]),t(Rt,[2,84]),t(Rt,[2,85]),t(Rt,[2,86]),t(Rt,[2,87]),t(Rt,[2,88]),t(Rt,[2,89]),t(Rt,[2,90]),t(Rt,[2,91]),{9:196,20:Q,21:$,22:dt,23:z,24:pt,26:gt,38:mt,40:[1,195],42:vt,47:V,59:Y,60:U,66:yt,74:bt,76:194,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{18:18,19:19,20:s,21:u,22:c,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,197],43:31,45:32,46:42,47:f,49:43,59:d,60:p,79:g,80:m,81:v,82:y,83:b,84:O,88:w,98:k,99:x,102:_,104:S,105:E,109:44,111:C,112:T,113:A,114:D,115:M,116:j,117:N,118:P,119:R,120:L},{22:B,30:198},{22:[1,199],26:W,47:V,59:Y,60:U,84:H,98:X,99:G,102:Z,104:K,105:J,108:95,110:172,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{22:[1,200]},{22:[1,201]},{22:[1,202],99:[1,203]},t(Ft,[2,119]),{22:[1,204]},{22:[1,205],26:W,47:V,59:Y,60:U,84:H,98:X,99:G,102:Z,104:K,105:J,108:95,110:172,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{22:[1,206],26:W,47:V,59:Y,60:U,84:H,98:X,99:G,102:Z,104:K,105:J,108:95,110:172,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{77:[1,207]},t(ct,[2,99],{22:[1,208]}),{77:[1,209],94:[1,210]},{77:[1,211]},t(Pt,[2,149]),{77:[1,212],94:[1,213]},t(at,[2,54],{109:123,47:f,59:d,60:p,84:O,88:w,98:k,99:x,102:_,104:S,105:E,115:M,116:j,117:N,118:P,119:R,120:L}),{22:dt,24:pt,26:gt,38:mt,41:[1,214],42:vt,47:V,59:Y,60:U,66:yt,74:bt,76:194,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{22:dt,24:pt,26:gt,38:mt,39:215,42:vt,47:V,59:Y,60:U,66:yt,74:bt,76:134,77:Ot,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{22:dt,24:pt,26:gt,38:mt,42:vt,47:V,51:[1,216],59:Y,60:U,66:yt,74:bt,76:194,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{22:dt,24:pt,26:gt,38:mt,42:vt,47:V,53:[1,217],59:Y,60:U,66:yt,74:bt,76:194,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{22:dt,24:pt,26:gt,38:mt,42:vt,47:V,55:[1,218],59:Y,60:U,66:yt,74:bt,76:194,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{22:dt,24:pt,26:gt,38:mt,42:vt,47:V,57:[1,219],59:Y,60:U,66:yt,74:bt,76:194,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{60:[1,220]},{22:dt,24:pt,26:gt,38:mt,42:vt,47:V,59:Y,60:U,63:[1,221],66:yt,74:bt,76:194,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{22:dt,24:pt,26:gt,38:mt,42:vt,47:V,59:Y,60:U,65:[1,222],66:yt,74:bt,76:194,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{22:dt,24:pt,26:gt,38:mt,39:223,42:vt,47:V,59:Y,60:U,66:yt,74:bt,76:134,77:Ot,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{22:dt,24:pt,26:gt,38:mt,41:[1,224],42:vt,47:V,59:Y,60:U,66:yt,74:bt,76:194,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{22:dt,24:pt,26:gt,38:mt,42:vt,47:V,59:Y,60:U,66:yt,68:[1,225],70:[1,226],74:bt,76:194,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{22:dt,24:pt,26:gt,38:mt,42:vt,47:V,59:Y,60:U,66:yt,68:[1,228],70:[1,227],74:bt,76:194,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{9:229,20:Q,21:$,23:z},t(q,[2,49],{47:Nt}),t(ft,[2,73]),t(ft,[2,72]),{22:dt,24:pt,26:gt,38:mt,42:vt,47:V,59:Y,60:U,61:[1,230],66:yt,74:bt,76:194,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},t(ft,[2,75]),t(Rt,[2,79]),{22:dt,24:pt,26:gt,38:mt,39:231,42:vt,47:V,59:Y,60:U,66:yt,74:bt,76:134,77:Ot,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},t(jt,a,{17:232}),t(I,[2,43]),{46:233,47:f,49:43,59:d,60:p,84:O,88:w,98:k,99:x,102:_,104:S,105:E,109:44,115:M,116:j,117:N,118:P,119:R,120:L},{22:Bt,59:It,60:Qt,79:$t,89:234,95:zt,98:qt,100:235,101:236,102:Wt,103:Vt,104:Yt,105:Ut,106:Ht},{22:Bt,59:It,60:Qt,79:$t,89:248,95:zt,98:qt,100:235,101:236,102:Wt,103:Vt,104:Yt,105:Ut,106:Ht},{22:Bt,59:It,60:Qt,79:$t,89:249,95:zt,97:[1,250],98:qt,100:235,101:236,102:Wt,103:Vt,104:Yt,105:Ut,106:Ht},{22:Bt,59:It,60:Qt,79:$t,89:251,95:zt,97:[1,252],98:qt,100:235,101:236,102:Wt,103:Vt,104:Yt,105:Ut,106:Ht},{98:[1,253]},{22:Bt,59:It,60:Qt,79:$t,89:254,95:zt,98:qt,100:235,101:236,102:Wt,103:Vt,104:Yt,105:Ut,106:Ht},{22:Bt,59:It,60:Qt,79:$t,89:255,95:zt,98:qt,100:235,101:236,102:Wt,103:Vt,104:Yt,105:Ut,106:Ht},{26:W,47:V,59:Y,60:U,84:H,90:256,98:X,99:G,102:Z,104:K,105:J,108:95,110:93,115:tt,116:et,117:nt,118:rt,119:it,120:ot},t(ct,[2,98]),{77:[1,257]},t(ct,[2,102],{22:[1,258]}),t(ct,[2,103]),t(ct,[2,106]),t(ct,[2,108],{22:[1,259]}),t(ct,[2,109]),t(st,[2,55]),{22:dt,24:pt,26:gt,38:mt,42:vt,47:V,51:[1,260],59:Y,60:U,66:yt,74:bt,76:194,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},t(st,[2,62]),t(st,[2,57]),t(st,[2,58]),t(st,[2,59]),{59:[1,261]},t(st,[2,61]),t(st,[2,63]),{22:dt,24:pt,26:gt,38:mt,42:vt,47:V,59:Y,60:U,65:[1,262],66:yt,74:bt,76:194,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},t(st,[2,65]),t(st,[2,66]),t(st,[2,68]),t(st,[2,67]),t(st,[2,69]),t(Lt,[2,4]),t([22,47,59,60,84,88,98,99,102,104,105,115,116,117,118,119,120],[2,77]),{22:dt,24:pt,26:gt,38:mt,41:[1,263],42:vt,47:V,59:Y,60:U,66:yt,74:bt,76:194,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{18:18,19:19,20:s,21:u,22:c,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,264],43:31,45:32,46:42,47:f,49:43,59:d,60:p,79:g,80:m,81:v,82:y,83:b,84:O,88:w,98:k,99:x,102:_,104:S,105:E,109:44,111:C,112:T,113:A,114:D,115:M,116:j,117:N,118:P,119:R,120:L},t(at,[2,53]),t(ct,[2,111],{99:Xt}),t(Gt,[2,121],{101:266,22:Bt,59:It,60:Qt,79:$t,95:zt,98:qt,102:Wt,103:Vt,104:Yt,105:Ut,106:Ht}),t(Zt,[2,123]),t(Zt,[2,125]),t(Zt,[2,126]),t(Zt,[2,127]),t(Zt,[2,128]),t(Zt,[2,129]),t(Zt,[2,130]),t(Zt,[2,131]),t(Zt,[2,132]),t(Zt,[2,133]),t(Zt,[2,134]),t(Zt,[2,135]),t(ct,[2,112],{99:Xt}),t(ct,[2,113],{99:Xt}),{22:[1,267]},t(ct,[2,114],{99:Xt}),{22:[1,268]},t(Ft,[2,120]),t(ct,[2,94],{99:Xt}),t(ct,[2,95],{99:Xt}),t(ct,[2,96],{108:95,110:172,26:W,47:V,59:Y,60:U,84:H,98:X,99:G,102:Z,104:K,105:J,115:tt,116:et,117:nt,118:rt,119:it,120:ot}),t(ct,[2,100]),{94:[1,269]},{94:[1,270]},{51:[1,271]},{61:[1,272]},{65:[1,273]},{9:274,20:Q,21:$,23:z},t(I,[2,42]),{22:Bt,59:It,60:Qt,79:$t,95:zt,98:qt,100:275,101:236,102:Wt,103:Vt,104:Yt,105:Ut,106:Ht},t(Zt,[2,124]),{26:W,47:V,59:Y,60:U,84:H,90:276,98:X,99:G,102:Z,104:K,105:J,108:95,110:93,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{26:W,47:V,59:Y,60:U,84:H,90:277,98:X,99:G,102:Z,104:K,105:J,108:95,110:93,115:tt,116:et,117:nt,118:rt,119:it,120:ot},t(ct,[2,104]),t(ct,[2,110]),t(st,[2,56]),{22:dt,24:pt,26:gt,38:mt,39:278,42:vt,47:V,59:Y,60:U,66:yt,74:bt,76:134,77:Ot,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},t(st,[2,64]),t(jt,a,{17:279}),t(Gt,[2,122],{101:266,22:Bt,59:It,60:Qt,79:$t,95:zt,98:qt,102:Wt,103:Vt,104:Yt,105:Ut,106:Ht}),t(ct,[2,117],{108:95,110:172,22:[1,280],26:W,47:V,59:Y,60:U,84:H,98:X,99:G,102:Z,104:K,105:J,115:tt,116:et,117:nt,118:rt,119:it,120:ot}),t(ct,[2,118],{108:95,110:172,22:[1,281],26:W,47:V,59:Y,60:U,84:H,98:X,99:G,102:Z,104:K,105:J,115:tt,116:et,117:nt,118:rt,119:it,120:ot}),{22:dt,24:pt,26:gt,38:mt,41:[1,282],42:vt,47:V,59:Y,60:U,66:yt,74:bt,76:194,78:145,79:wt,80:kt,81:xt,82:_t,83:St,84:Et,85:Ct,87:136,88:Tt,98:X,99:G,102:At,104:K,105:J,106:Dt,107:Mt,108:142,115:tt,116:et,117:nt,118:rt,119:it,120:ot},{18:18,19:19,20:s,21:u,22:c,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,283],43:31,45:32,46:42,47:f,49:43,59:d,60:p,79:g,80:m,81:v,82:y,83:b,84:O,88:w,98:k,99:x,102:_,104:S,105:E,109:44,111:C,112:T,113:A,114:D,115:M,116:j,117:N,118:P,119:R,120:L},{22:Bt,59:It,60:Qt,79:$t,89:284,95:zt,98:qt,100:235,101:236,102:Wt,103:Vt,104:Yt,105:Ut,106:Ht},{22:Bt,59:It,60:Qt,79:$t,89:285,95:zt,98:qt,100:235,101:236,102:Wt,103:Vt,104:Yt,105:Ut,106:Ht},t(st,[2,60]),t(I,[2,41]),t(ct,[2,115],{99:Xt}),t(ct,[2,116],{99:Xt})],defaultActions:{2:[2,1],9:[2,5],10:[2,2],126:[2,7]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],o=[],a=this.table,s="",u=0,c=0,l=0,h=2,f=1,d=o.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(g.yy[m]=this.yy[m]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;o.push(v);var y=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var O,w,k,x,_,S,E,C,T,A={};;){if(k=n[n.length-1],this.defaultActions[k]?x=this.defaultActions[k]:(null==O&&(O=b()),x=a[k]&&a[k][O]),void 0===x||!x.length||!x[0]){var D="";for(S in T=[],a[k])this.terminals_[S]&&S>h&&T.push("'"+this.terminals_[S]+"'");D=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[O]||O)+"'":"Parse error on line "+(u+1)+": Unexpected "+(O==f?"end of input":"'"+(this.terminals_[O]||O)+"'"),this.parseError(D,{text:p.match,token:this.terminals_[O]||O,line:p.yylineno,loc:v,expected:T})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+O);switch(x[0]){case 1:n.push(O),i.push(p.yytext),o.push(p.yylloc),n.push(x[1]),O=null,w?(O=w,w=null):(c=p.yyleng,s=p.yytext,u=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[x[1]][1],A.$=i[i.length-E],A._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(A._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),void 0!==(_=this.performAction.apply(A,[s,c,u,g.yy,x[1],i,o].concat(d))))return _;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[x[1]][0]),i.push(A.$),o.push(A._$),C=a[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0}},Jt={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;oe[0].length)){if(e=n,r=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),12;case 1:return this.begin("type_directive"),13;case 2:return this.popState(),this.begin("arg_directive"),10;case 3:return this.popState(),this.popState(),15;case 4:return 14;case 5:case 6:break;case 7:this.begin("string");break;case 8:case 17:case 20:case 23:case 26:this.popState();break;case 9:return"STR";case 10:return 79;case 11:return 88;case 12:return 80;case 13:return 97;case 14:return 81;case 15:return 82;case 16:this.begin("href");break;case 18:return 93;case 19:this.begin("callbackname");break;case 21:this.popState(),this.begin("callbackargs");break;case 22:return 91;case 24:return 92;case 25:this.begin("click");break;case 27:return 83;case 28:case 29:return t.lex.firstGraph()&&this.begin("dir"),24;case 30:return 38;case 31:return 42;case 32:case 33:case 34:case 35:return 94;case 36:return this.popState(),25;case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:return this.popState(),26;case 47:return 111;case 48:return 112;case 49:return 113;case 50:return 114;case 51:return 98;case 52:return 104;case 53:return 48;case 54:return 60;case 55:return 47;case 56:return 20;case 57:return 99;case 58:return 119;case 59:case 60:case 61:return 75;case 62:case 63:case 64:return 74;case 65:return 52;case 66:return 53;case 67:return 54;case 68:return 55;case 69:return 56;case 70:return 57;case 71:return 58;case 72:return 62;case 73:return 63;case 74:return 102;case 75:return 105;case 76:return 120;case 77:return 117;case 78:return 106;case 79:case 80:return 118;case 81:return 107;case 82:return 66;case 83:return 85;case 84:return"SEP";case 85:return 84;case 86:return 59;case 87:return 68;case 88:return 67;case 89:return 70;case 90:return 69;case 91:return 115;case 92:return 116;case 93:return 61;case 94:return 50;case 95:return 51;case 96:return 40;case 97:return 41;case 98:return 64;case 99:return 65;case 100:return 126;case 101:return 21;case 102:return 22;case 103:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[^\}]%%[^\n]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\[)/,/^(?:\]\))/,/^(?:\[\[)/,/^(?:\]\])/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\])/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_/])/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[23,24],inclusive:!1},callbackname:{rules:[20,21,22],inclusive:!1},href:{rules:[17,18],inclusive:!1},click:{rules:[26,27],inclusive:!1},vertex:{rules:[],inclusive:!1},dir:{rules:[36,37,38,39,40,41,42,43,44,45,46],inclusive:!1},string:{rules:[8,9],inclusive:!1},INITIAL:{rules:[0,5,6,7,10,11,12,13,14,15,16,19,25,28,29,30,31,32,33,34,35,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103],inclusive:!0}}};function te(){this.yy={}}return Kt.lexer=Jt,te.prototype=Kt,Kt.Parser=te,new te}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(5354).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},9959:function(t,e,n){t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,3],n=[1,5],r=[7,9,11,12,13,14,15,16,17,18,19,20,22,29,34],i=[1,15],o=[1,16],a=[1,17],s=[1,18],u=[1,19],c=[1,20],l=[1,21],h=[1,22],f=[1,23],d=[1,25],p=[1,27],g=[1,30],m=[5,7,9,11,12,13,14,15,16,17,18,19,20,22,29,34],v={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,gantt:5,document:6,EOF:7,line:8,SPACE:9,statement:10,NL:11,dateFormat:12,inclusiveEndDates:13,topAxis:14,axisFormat:15,excludes:16,includes:17,todayMarker:18,title:19,section:20,clickStatement:21,taskTxt:22,taskData:23,openDirective:24,typeDirective:25,closeDirective:26,":":27,argDirective:28,click:29,callbackname:30,callbackargs:31,href:32,clickStatementDebug:33,open_directive:34,type_directive:35,arg_directive:36,close_directive:37,$accept:0,$end:1},terminals_:{2:"error",5:"gantt",7:"EOF",9:"SPACE",11:"NL",12:"dateFormat",13:"inclusiveEndDates",14:"topAxis",15:"axisFormat",16:"excludes",17:"includes",18:"todayMarker",19:"title",20:"section",22:"taskTxt",23:"taskData",27:":",29:"click",30:"callbackname",31:"callbackargs",32:"href",34:"open_directive",35:"type_directive",36:"arg_directive",37:"close_directive"},productions_:[0,[3,2],[3,3],[6,0],[6,2],[8,2],[8,1],[8,1],[8,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,1],[4,4],[4,6],[21,2],[21,3],[21,3],[21,4],[21,3],[21,4],[21,2],[33,2],[33,3],[33,3],[33,4],[33,3],[33,4],[33,2],[24,1],[25,1],[28,1],[26,1]],performAction:function(t,e,n,r,i,o,a){var s=o.length-1;switch(i){case 2:return o[s-1];case 3:case 7:case 8:this.$=[];break;case 4:o[s-1].push(o[s]),this.$=o[s-1];break;case 5:case 6:this.$=o[s];break;case 9:r.setDateFormat(o[s].substr(11)),this.$=o[s].substr(11);break;case 10:r.enableInclusiveEndDates(),this.$=o[s].substr(18);break;case 11:r.TopAxis(),this.$=o[s].substr(8);break;case 12:r.setAxisFormat(o[s].substr(11)),this.$=o[s].substr(11);break;case 13:r.setExcludes(o[s].substr(9)),this.$=o[s].substr(9);break;case 14:r.setIncludes(o[s].substr(9)),this.$=o[s].substr(9);break;case 15:r.setTodayMarker(o[s].substr(12)),this.$=o[s].substr(12);break;case 16:r.setTitle(o[s].substr(6)),this.$=o[s].substr(6);break;case 17:r.addSection(o[s].substr(8)),this.$=o[s].substr(8);break;case 19:r.addTask(o[s-1],o[s]),this.$="task";break;case 23:this.$=o[s-1],r.setClickEvent(o[s-1],o[s],null);break;case 24:this.$=o[s-2],r.setClickEvent(o[s-2],o[s-1],o[s]);break;case 25:this.$=o[s-2],r.setClickEvent(o[s-2],o[s-1],null),r.setLink(o[s-2],o[s]);break;case 26:this.$=o[s-3],r.setClickEvent(o[s-3],o[s-2],o[s-1]),r.setLink(o[s-3],o[s]);break;case 27:this.$=o[s-2],r.setClickEvent(o[s-2],o[s],null),r.setLink(o[s-2],o[s-1]);break;case 28:this.$=o[s-3],r.setClickEvent(o[s-3],o[s-1],o[s]),r.setLink(o[s-3],o[s-2]);break;case 29:this.$=o[s-1],r.setLink(o[s-1],o[s]);break;case 30:case 36:this.$=o[s-1]+" "+o[s];break;case 31:case 32:case 34:this.$=o[s-2]+" "+o[s-1]+" "+o[s];break;case 33:case 35:this.$=o[s-3]+" "+o[s-2]+" "+o[s-1]+" "+o[s];break;case 37:r.parseDirective("%%{","open_directive");break;case 38:r.parseDirective(o[s],"type_directive");break;case 39:o[s]=o[s].trim().replace(/'/g,'"'),r.parseDirective(o[s],"arg_directive");break;case 40:r.parseDirective("}%%","close_directive","gantt")}},table:[{3:1,4:2,5:e,24:4,34:n},{1:[3]},{3:6,4:2,5:e,24:4,34:n},t(r,[2,3],{6:7}),{25:8,35:[1,9]},{35:[2,37]},{1:[2,1]},{4:26,7:[1,10],8:11,9:[1,12],10:13,11:[1,14],12:i,13:o,14:a,15:s,16:u,17:c,18:l,19:h,20:f,21:24,22:d,24:4,29:p,34:n},{26:28,27:[1,29],37:g},t([27,37],[2,38]),t(r,[2,8],{1:[2,2]}),t(r,[2,4]),{4:26,10:31,12:i,13:o,14:a,15:s,16:u,17:c,18:l,19:h,20:f,21:24,22:d,24:4,29:p,34:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),t(r,[2,17]),t(r,[2,18]),{23:[1,32]},t(r,[2,20]),{30:[1,33],32:[1,34]},{11:[1,35]},{28:36,36:[1,37]},{11:[2,40]},t(r,[2,5]),t(r,[2,19]),t(r,[2,23],{31:[1,38],32:[1,39]}),t(r,[2,29],{30:[1,40]}),t(m,[2,21]),{26:41,37:g},{37:[2,39]},t(r,[2,24],{32:[1,42]}),t(r,[2,25]),t(r,[2,27],{31:[1,43]}),{11:[1,44]},t(r,[2,26]),t(r,[2,28]),t(m,[2,22])],defaultActions:{5:[2,37],6:[2,1],30:[2,40],37:[2,39]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],o=[],a=this.table,s="",u=0,c=0,l=0,h=2,f=1,d=o.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(g.yy[m]=this.yy[m]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;o.push(v);var y=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var O,w,k,x,_,S,E,C,T,A={};;){if(k=n[n.length-1],this.defaultActions[k]?x=this.defaultActions[k]:(null==O&&(O=b()),x=a[k]&&a[k][O]),void 0===x||!x.length||!x[0]){var D="";for(S in T=[],a[k])this.terminals_[S]&&S>h&&T.push("'"+this.terminals_[S]+"'");D=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[O]||O)+"'":"Parse error on line "+(u+1)+": Unexpected "+(O==f?"end of input":"'"+(this.terminals_[O]||O)+"'"),this.parseError(D,{text:p.match,token:this.terminals_[O]||O,line:p.yylineno,loc:v,expected:T})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+O);switch(x[0]){case 1:n.push(O),i.push(p.yytext),o.push(p.yylloc),n.push(x[1]),O=null,w?(O=w,w=null):(c=p.yyleng,s=p.yytext,u=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[x[1]][1],A.$=i[i.length-E],A._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(A._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),void 0!==(_=this.performAction.apply(A,[s,c,u,g.yy,x[1],i,o].concat(d))))return _;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[x[1]][0]),i.push(A.$),o.push(A._$),C=a[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0}},y={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;oe[0].length)){if(e=n,r=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),34;case 1:return this.begin("type_directive"),35;case 2:return this.popState(),this.begin("arg_directive"),27;case 3:return this.popState(),this.popState(),37;case 4:return 36;case 5:case 6:case 7:case 9:case 10:case 11:break;case 8:return 11;case 12:this.begin("href");break;case 13:case 16:case 19:case 22:this.popState();break;case 14:return 32;case 15:this.begin("callbackname");break;case 17:this.popState(),this.begin("callbackargs");break;case 18:return 30;case 20:return 31;case 21:this.begin("click");break;case 23:return 29;case 24:return 5;case 25:return 12;case 26:return 13;case 27:return 14;case 28:return 15;case 29:return 17;case 30:return 16;case 31:return 18;case 32:return"date";case 33:return 19;case 34:return 20;case 35:return 22;case 36:return 23;case 37:return 27;case 38:return 7;case 39:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[19,20],inclusive:!1},callbackname:{rules:[16,17,18],inclusive:!1},href:{rules:[13,14],inclusive:!1},click:{rules:[22,23],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,15,21,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39],inclusive:!0}}};function b(){this.yy={}}return v.lexer=y,b.prototype=v,v.Parser=b,new b}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(6878).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},2553:function(t,e,n){t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[2,3],n=[1,7],r=[7,12,15,17,19,20,21],i=[7,11,12,15,17,19,20,21],o=[2,20],a=[1,32],s={trace:function(){},yy:{},symbols_:{error:2,start:3,GG:4,":":5,document:6,EOF:7,DIR:8,options:9,body:10,OPT:11,NL:12,line:13,statement:14,COMMIT:15,commit_arg:16,BRANCH:17,ID:18,CHECKOUT:19,MERGE:20,RESET:21,reset_arg:22,STR:23,HEAD:24,reset_parents:25,CARET:26,$accept:0,$end:1},terminals_:{2:"error",4:"GG",5:":",7:"EOF",8:"DIR",11:"OPT",12:"NL",15:"COMMIT",17:"BRANCH",18:"ID",19:"CHECKOUT",20:"MERGE",21:"RESET",23:"STR",24:"HEAD",26:"CARET"},productions_:[0,[3,4],[3,5],[6,0],[6,2],[9,2],[9,1],[10,0],[10,2],[13,2],[13,1],[14,2],[14,2],[14,2],[14,2],[14,2],[16,0],[16,1],[22,2],[22,2],[25,0],[25,2]],performAction:function(t,e,n,r,i,o,a){var s=o.length-1;switch(i){case 1:return o[s-1];case 2:return r.setDirection(o[s-3]),o[s-1];case 4:r.setOptions(o[s-1]),this.$=o[s];break;case 5:o[s-1]+=o[s],this.$=o[s-1];break;case 7:this.$=[];break;case 8:o[s-1].push(o[s]),this.$=o[s-1];break;case 9:this.$=o[s-1];break;case 11:r.commit(o[s]);break;case 12:r.branch(o[s]);break;case 13:r.checkout(o[s]);break;case 14:r.merge(o[s]);break;case 15:r.reset(o[s]);break;case 16:this.$="";break;case 17:this.$=o[s];break;case 18:this.$=o[s-1]+":"+o[s];break;case 19:this.$=o[s-1]+":"+r.count,r.count=0;break;case 20:r.count=0;break;case 21:r.count+=1}},table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3],8:[1,4]},{6:5,7:e,9:6,12:n},{5:[1,8]},{7:[1,9]},t(r,[2,7],{10:10,11:[1,11]}),t(i,[2,6]),{6:12,7:e,9:6,12:n},{1:[2,1]},{7:[2,4],12:[1,15],13:13,14:14,15:[1,16],17:[1,17],19:[1,18],20:[1,19],21:[1,20]},t(i,[2,5]),{7:[1,21]},t(r,[2,8]),{12:[1,22]},t(r,[2,10]),{12:[2,16],16:23,23:[1,24]},{18:[1,25]},{18:[1,26]},{18:[1,27]},{18:[1,30],22:28,24:[1,29]},{1:[2,2]},t(r,[2,9]),{12:[2,11]},{12:[2,17]},{12:[2,12]},{12:[2,13]},{12:[2,14]},{12:[2,15]},{12:o,25:31,26:a},{12:o,25:33,26:a},{12:[2,18]},{12:o,25:34,26:a},{12:[2,19]},{12:[2,21]}],defaultActions:{9:[2,1],21:[2,2],23:[2,11],24:[2,17],25:[2,12],26:[2,13],27:[2,14],28:[2,15],31:[2,18],33:[2,19],34:[2,21]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],o=[],a=this.table,s="",u=0,c=0,l=0,h=2,f=1,d=o.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(g.yy[m]=this.yy[m]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;o.push(v);var y=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var O,w,k,x,_,S,E,C,T,A={};;){if(k=n[n.length-1],this.defaultActions[k]?x=this.defaultActions[k]:(null==O&&(O=b()),x=a[k]&&a[k][O]),void 0===x||!x.length||!x[0]){var D="";for(S in T=[],a[k])this.terminals_[S]&&S>h&&T.push("'"+this.terminals_[S]+"'");D=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[O]||O)+"'":"Parse error on line "+(u+1)+": Unexpected "+(O==f?"end of input":"'"+(this.terminals_[O]||O)+"'"),this.parseError(D,{text:p.match,token:this.terminals_[O]||O,line:p.yylineno,loc:v,expected:T})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+O);switch(x[0]){case 1:n.push(O),i.push(p.yytext),o.push(p.yylloc),n.push(x[1]),O=null,w?(O=w,w=null):(c=p.yyleng,s=p.yytext,u=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[x[1]][1],A.$=i[i.length-E],A._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(A._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),void 0!==(_=this.performAction.apply(A,[s,c,u,g.yy,x[1],i,o].concat(d))))return _;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[x[1]][0]),i.push(A.$),o.push(A._$),C=a[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0}},u={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;oe[0].length)){if(e=n,r=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 12;case 1:case 2:case 3:break;case 4:return 4;case 5:return 15;case 6:return 17;case 7:return 20;case 8:return 21;case 9:return 19;case 10:case 11:return 8;case 12:return 5;case 13:return 26;case 14:this.begin("options");break;case 15:case 18:this.popState();break;case 16:return 11;case 17:this.begin("string");break;case 19:return 23;case 20:return 18;case 21:return 7}},rules:[/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit\b)/i,/^(?:branch\b)/i,/^(?:merge\b)/i,/^(?:reset\b)/i,/^(?:checkout\b)/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:end\r?\n)/i,/^(?:[^\n]+\r?\n)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[a-zA-Z][-_\.a-zA-Z0-9]*[-_a-zA-Z0-9])/i,/^(?:$)/i],conditions:{options:{rules:[15,16],inclusive:!1},string:{rules:[18,19],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,20,21],inclusive:!0}}};function c(){this.yy={}}return s.lexer=u,c.prototype=s,s.Parser=c,new c}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(8183).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},6765:function(t,e,n){t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[6,9,10],n={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,e,n,r,i,o,a){switch(o.length,i){case 1:return r;case 4:break;case 6:r.setInfo(!0)}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},t(e,[2,3]),t(e,[2,4]),t(e,[2,5]),t(e,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],o=[],a=this.table,s="",u=0,c=0,l=0,h=2,f=1,d=o.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(g.yy[m]=this.yy[m]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;o.push(v);var y=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var O,w,k,x,_,S,E,C,T,A={};;){if(k=n[n.length-1],this.defaultActions[k]?x=this.defaultActions[k]:(null==O&&(O=b()),x=a[k]&&a[k][O]),void 0===x||!x.length||!x[0]){var D="";for(S in T=[],a[k])this.terminals_[S]&&S>h&&T.push("'"+this.terminals_[S]+"'");D=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[O]||O)+"'":"Parse error on line "+(u+1)+": Unexpected "+(O==f?"end of input":"'"+(this.terminals_[O]||O)+"'"),this.parseError(D,{text:p.match,token:this.terminals_[O]||O,line:p.yylineno,loc:v,expected:T})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+O);switch(x[0]){case 1:n.push(O),i.push(p.yytext),o.push(p.yylloc),n.push(x[1]),O=null,w?(O=w,w=null):(c=p.yyleng,s=p.yytext,u=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[x[1]][1],A.$=i[i.length-E],A._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(A._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),void 0!==(_=this.performAction.apply(A,[s,c,u,g.yy,x[1],i,o].concat(d))))return _;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[x[1]][0]),i.push(A.$),o.push(A._$),C=a[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0}},r={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;oe[0].length)){if(e=n,r=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};function i(){this.yy={}}return n.lexer=r,i.prototype=n,n.Parser=i,new i}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(1428).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},7062:function(t,e,n){t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,4],n=[1,5],r=[1,6],i=[1,7],o=[1,9],a=[1,11,13,20,21,22,23],s=[2,5],u=[1,6,11,13,20,21,22,23],c=[20,21,22],l=[2,8],h=[1,18],f=[1,19],d=[1,24],p=[6,20,21,22,23],g={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,PIE:6,document:7,showData:8,line:9,statement:10,txt:11,value:12,title:13,title_value:14,openDirective:15,typeDirective:16,closeDirective:17,":":18,argDirective:19,NEWLINE:20,";":21,EOF:22,open_directive:23,type_directive:24,arg_directive:25,close_directive:26,$accept:0,$end:1},terminals_:{2:"error",6:"PIE",8:"showData",11:"txt",12:"value",13:"title",14:"title_value",18:":",20:"NEWLINE",21:";",22:"EOF",23:"open_directive",24:"type_directive",25:"arg_directive",26:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,3],[7,0],[7,2],[9,2],[10,0],[10,2],[10,2],[10,1],[5,3],[5,5],[4,1],[4,1],[4,1],[15,1],[16,1],[19,1],[17,1]],performAction:function(t,e,n,r,i,o,a){var s=o.length-1;switch(i){case 4:r.setShowData(!0);break;case 7:this.$=o[s-1];break;case 9:r.addSection(o[s-1],r.cleanupValue(o[s]));break;case 10:this.$=o[s].trim(),r.setTitle(this.$);break;case 17:r.parseDirective("%%{","open_directive");break;case 18:r.parseDirective(o[s],"type_directive");break;case 19:o[s]=o[s].trim().replace(/'/g,'"'),r.parseDirective(o[s],"arg_directive");break;case 20:r.parseDirective("}%%","close_directive","pie")}},table:[{3:1,4:2,5:3,6:e,15:8,20:n,21:r,22:i,23:o},{1:[3]},{3:10,4:2,5:3,6:e,15:8,20:n,21:r,22:i,23:o},{3:11,4:2,5:3,6:e,15:8,20:n,21:r,22:i,23:o},t(a,s,{7:12,8:[1,13]}),t(u,[2,14]),t(u,[2,15]),t(u,[2,16]),{16:14,24:[1,15]},{24:[2,17]},{1:[2,1]},{1:[2,2]},t(c,l,{15:8,9:16,10:17,5:20,1:[2,3],11:h,13:f,23:o}),t(a,s,{7:21}),{17:22,18:[1,23],26:d},t([18,26],[2,18]),t(a,[2,6]),{4:25,20:n,21:r,22:i},{12:[1,26]},{14:[1,27]},t(c,[2,11]),t(c,l,{15:8,9:16,10:17,5:20,1:[2,4],11:h,13:f,23:o}),t(p,[2,12]),{19:28,25:[1,29]},t(p,[2,20]),t(a,[2,7]),t(c,[2,9]),t(c,[2,10]),{17:30,26:d},{26:[2,19]},t(p,[2,13])],defaultActions:{9:[2,17],10:[2,1],11:[2,2],29:[2,19]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],o=[],a=this.table,s="",u=0,c=0,l=0,h=2,f=1,d=o.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(g.yy[m]=this.yy[m]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;o.push(v);var y=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var O,w,k,x,_,S,E,C,T,A={};;){if(k=n[n.length-1],this.defaultActions[k]?x=this.defaultActions[k]:(null==O&&(O=b()),x=a[k]&&a[k][O]),void 0===x||!x.length||!x[0]){var D="";for(S in T=[],a[k])this.terminals_[S]&&S>h&&T.push("'"+this.terminals_[S]+"'");D=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[O]||O)+"'":"Parse error on line "+(u+1)+": Unexpected "+(O==f?"end of input":"'"+(this.terminals_[O]||O)+"'"),this.parseError(D,{text:p.match,token:this.terminals_[O]||O,line:p.yylineno,loc:v,expected:T})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+O);switch(x[0]){case 1:n.push(O),i.push(p.yytext),o.push(p.yylloc),n.push(x[1]),O=null,w?(O=w,w=null):(c=p.yyleng,s=p.yytext,u=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[x[1]][1],A.$=i[i.length-E],A._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(A._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),void 0!==(_=this.performAction.apply(A,[s,c,u,g.yy,x[1],i,o].concat(d))))return _;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[x[1]][0]),i.push(A.$),o.push(A._$),C=a[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0}},m={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;oe[0].length)){if(e=n,r=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),23;case 1:return this.begin("type_directive"),24;case 2:return this.popState(),this.begin("arg_directive"),18;case 3:return this.popState(),this.popState(),26;case 4:return 25;case 5:case 6:case 8:case 9:break;case 7:return 20;case 10:return this.begin("title"),13;case 11:return this.popState(),"title_value";case 12:this.begin("string");break;case 13:this.popState();break;case 14:return"txt";case 15:return 6;case 16:return 8;case 17:return"value";case 18:return 22}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[11],inclusive:!1},string:{rules:[13,14],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,15,16,17,18],inclusive:!0}}};function v(){this.yy={}}return g.lexer=m,v.prototype=g,g.Parser=v,new v}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(4551).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},3176:function(t,e,n){t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,3],n=[1,5],r=[1,17],i=[2,10],o=[1,21],a=[1,22],s=[1,23],u=[1,24],c=[1,25],l=[1,26],h=[1,19],f=[1,27],d=[1,28],p=[1,31],g=[66,67],m=[5,8,14,35,36,37,38,39,40,48,55,57,66,67],v=[5,6,8,14,35,36,37,38,39,40,48,66,67],y=[1,51],b=[1,52],O=[1,53],w=[1,54],k=[1,55],x=[1,56],_=[1,57],S=[57,58],E=[1,69],C=[1,65],T=[1,66],A=[1,67],D=[1,68],M=[1,70],j=[1,74],N=[1,75],P=[1,72],R=[1,73],L=[5,8,14,35,36,37,38,39,40,48,66,67],F={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,openDirective:9,typeDirective:10,closeDirective:11,":":12,argDirective:13,open_directive:14,type_directive:15,arg_directive:16,close_directive:17,requirementDef:18,elementDef:19,relationshipDef:20,requirementType:21,requirementName:22,STRUCT_START:23,requirementBody:24,ID:25,COLONSEP:26,id:27,TEXT:28,text:29,RISK:30,riskLevel:31,VERIFYMTHD:32,verifyType:33,STRUCT_STOP:34,REQUIREMENT:35,FUNCTIONAL_REQUIREMENT:36,INTERFACE_REQUIREMENT:37,PERFORMANCE_REQUIREMENT:38,PHYSICAL_REQUIREMENT:39,DESIGN_CONSTRAINT:40,LOW_RISK:41,MED_RISK:42,HIGH_RISK:43,VERIFY_ANALYSIS:44,VERIFY_DEMONSTRATION:45,VERIFY_INSPECTION:46,VERIFY_TEST:47,ELEMENT:48,elementName:49,elementBody:50,TYPE:51,type:52,DOCREF:53,ref:54,END_ARROW_L:55,relationship:56,LINE:57,END_ARROW_R:58,CONTAINS:59,COPIES:60,DERIVES:61,SATISFIES:62,VERIFIES:63,REFINES:64,TRACES:65,unqString:66,qString:67,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",12:":",14:"open_directive",15:"type_directive",16:"arg_directive",17:"close_directive",23:"STRUCT_START",25:"ID",26:"COLONSEP",28:"TEXT",30:"RISK",32:"VERIFYMTHD",34:"STRUCT_STOP",35:"REQUIREMENT",36:"FUNCTIONAL_REQUIREMENT",37:"INTERFACE_REQUIREMENT",38:"PERFORMANCE_REQUIREMENT",39:"PHYSICAL_REQUIREMENT",40:"DESIGN_CONSTRAINT",41:"LOW_RISK",42:"MED_RISK",43:"HIGH_RISK",44:"VERIFY_ANALYSIS",45:"VERIFY_DEMONSTRATION",46:"VERIFY_INSPECTION",47:"VERIFY_TEST",48:"ELEMENT",51:"TYPE",53:"DOCREF",55:"END_ARROW_L",57:"LINE",58:"END_ARROW_R",59:"CONTAINS",60:"COPIES",61:"DERIVES",62:"SATISFIES",63:"VERIFIES",64:"REFINES",65:"TRACES",66:"unqString",67:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,3],[4,5],[9,1],[10,1],[13,1],[11,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[18,5],[24,5],[24,5],[24,5],[24,5],[24,2],[24,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[31,1],[31,1],[31,1],[33,1],[33,1],[33,1],[33,1],[19,5],[50,5],[50,5],[50,2],[50,1],[20,5],[20,5],[56,1],[56,1],[56,1],[56,1],[56,1],[56,1],[56,1],[22,1],[22,1],[27,1],[27,1],[29,1],[29,1],[49,1],[49,1],[52,1],[52,1],[54,1],[54,1]],performAction:function(t,e,n,r,i,o,a){var s=o.length-1;switch(i){case 6:r.parseDirective("%%{","open_directive");break;case 7:r.parseDirective(o[s],"type_directive");break;case 8:o[s]=o[s].trim().replace(/'/g,'"'),r.parseDirective(o[s],"arg_directive");break;case 9:r.parseDirective("}%%","close_directive","pie");break;case 10:this.$=[];break;case 16:r.addRequirement(o[s-3],o[s-4]);break;case 17:r.setNewReqId(o[s-2]);break;case 18:r.setNewReqText(o[s-2]);break;case 19:r.setNewReqRisk(o[s-2]);break;case 20:r.setNewReqVerifyMethod(o[s-2]);break;case 23:this.$=r.RequirementType.REQUIREMENT;break;case 24:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 25:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 26:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 27:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 28:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 29:this.$=r.RiskLevel.LOW_RISK;break;case 30:this.$=r.RiskLevel.MED_RISK;break;case 31:this.$=r.RiskLevel.HIGH_RISK;break;case 32:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 33:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 34:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 35:this.$=r.VerifyType.VERIFY_TEST;break;case 36:r.addElement(o[s-3]);break;case 37:r.setNewElementType(o[s-2]);break;case 38:r.setNewElementDocRef(o[s-2]);break;case 41:r.addRelationship(o[s-2],o[s],o[s-4]);break;case 42:r.addRelationship(o[s-2],o[s-4],o[s]);break;case 43:this.$=r.Relationships.CONTAINS;break;case 44:this.$=r.Relationships.COPIES;break;case 45:this.$=r.Relationships.DERIVES;break;case 46:this.$=r.Relationships.SATISFIES;break;case 47:this.$=r.Relationships.VERIFIES;break;case 48:this.$=r.Relationships.REFINES;break;case 49:this.$=r.Relationships.TRACES}},table:[{3:1,4:2,6:e,9:4,14:n},{1:[3]},{3:7,4:2,5:[1,6],6:e,9:4,14:n},{5:[1,8]},{10:9,15:[1,10]},{15:[2,6]},{3:11,4:2,6:e,9:4,14:n},{1:[2,2]},{4:16,5:r,7:12,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:o,36:a,37:s,38:u,39:c,40:l,48:h,66:f,67:d},{11:29,12:[1,30],17:p},t([12,17],[2,7]),{1:[2,1]},{8:[1,32]},{4:16,5:r,7:33,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:o,36:a,37:s,38:u,39:c,40:l,48:h,66:f,67:d},{4:16,5:r,7:34,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:o,36:a,37:s,38:u,39:c,40:l,48:h,66:f,67:d},{4:16,5:r,7:35,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:o,36:a,37:s,38:u,39:c,40:l,48:h,66:f,67:d},{4:16,5:r,7:36,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:o,36:a,37:s,38:u,39:c,40:l,48:h,66:f,67:d},{4:16,5:r,7:37,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:o,36:a,37:s,38:u,39:c,40:l,48:h,66:f,67:d},{22:38,66:[1,39],67:[1,40]},{49:41,66:[1,42],67:[1,43]},{55:[1,44],57:[1,45]},t(g,[2,23]),t(g,[2,24]),t(g,[2,25]),t(g,[2,26]),t(g,[2,27]),t(g,[2,28]),t(m,[2,52]),t(m,[2,53]),t(v,[2,4]),{13:46,16:[1,47]},t(v,[2,9]),{1:[2,3]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{23:[1,48]},{23:[2,50]},{23:[2,51]},{23:[1,49]},{23:[2,56]},{23:[2,57]},{56:50,59:y,60:b,61:O,62:w,63:k,64:x,65:_},{56:58,59:y,60:b,61:O,62:w,63:k,64:x,65:_},{11:59,17:p},{17:[2,8]},{5:[1,60]},{5:[1,61]},{57:[1,62]},t(S,[2,43]),t(S,[2,44]),t(S,[2,45]),t(S,[2,46]),t(S,[2,47]),t(S,[2,48]),t(S,[2,49]),{58:[1,63]},t(v,[2,5]),{5:E,24:64,25:C,28:T,30:A,32:D,34:M},{5:j,34:N,50:71,51:P,53:R},{27:76,66:f,67:d},{27:77,66:f,67:d},t(L,[2,16]),{26:[1,78]},{26:[1,79]},{26:[1,80]},{26:[1,81]},{5:E,24:82,25:C,28:T,30:A,32:D,34:M},t(L,[2,22]),t(L,[2,36]),{26:[1,83]},{26:[1,84]},{5:j,34:N,50:85,51:P,53:R},t(L,[2,40]),t(L,[2,41]),t(L,[2,42]),{27:86,66:f,67:d},{29:87,66:[1,88],67:[1,89]},{31:90,41:[1,91],42:[1,92],43:[1,93]},{33:94,44:[1,95],45:[1,96],46:[1,97],47:[1,98]},t(L,[2,21]),{52:99,66:[1,100],67:[1,101]},{54:102,66:[1,103],67:[1,104]},t(L,[2,39]),{5:[1,105]},{5:[1,106]},{5:[2,54]},{5:[2,55]},{5:[1,107]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[1,108]},{5:[2,32]},{5:[2,33]},{5:[2,34]},{5:[2,35]},{5:[1,109]},{5:[2,58]},{5:[2,59]},{5:[1,110]},{5:[2,60]},{5:[2,61]},{5:E,24:111,25:C,28:T,30:A,32:D,34:M},{5:E,24:112,25:C,28:T,30:A,32:D,34:M},{5:E,24:113,25:C,28:T,30:A,32:D,34:M},{5:E,24:114,25:C,28:T,30:A,32:D,34:M},{5:j,34:N,50:115,51:P,53:R},{5:j,34:N,50:116,51:P,53:R},t(L,[2,17]),t(L,[2,18]),t(L,[2,19]),t(L,[2,20]),t(L,[2,37]),t(L,[2,38])],defaultActions:{5:[2,6],7:[2,2],11:[2,1],32:[2,3],33:[2,11],34:[2,12],35:[2,13],36:[2,14],37:[2,15],39:[2,50],40:[2,51],42:[2,56],43:[2,57],47:[2,8],88:[2,54],89:[2,55],91:[2,29],92:[2,30],93:[2,31],95:[2,32],96:[2,33],97:[2,34],98:[2,35],100:[2,58],101:[2,59],103:[2,60],104:[2,61]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],o=[],a=this.table,s="",u=0,c=0,l=0,h=2,f=1,d=o.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(g.yy[m]=this.yy[m]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;o.push(v);var y=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var O,w,k,x,_,S,E,C,T,A={};;){if(k=n[n.length-1],this.defaultActions[k]?x=this.defaultActions[k]:(null==O&&(O=b()),x=a[k]&&a[k][O]),void 0===x||!x.length||!x[0]){var D="";for(S in T=[],a[k])this.terminals_[S]&&S>h&&T.push("'"+this.terminals_[S]+"'");D=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[O]||O)+"'":"Parse error on line "+(u+1)+": Unexpected "+(O==f?"end of input":"'"+(this.terminals_[O]||O)+"'"),this.parseError(D,{text:p.match,token:this.terminals_[O]||O,line:p.yylineno,loc:v,expected:T})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+O);switch(x[0]){case 1:n.push(O),i.push(p.yytext),o.push(p.yylloc),n.push(x[1]),O=null,w?(O=w,w=null):(c=p.yyleng,s=p.yytext,u=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[x[1]][1],A.$=i[i.length-E],A._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(A._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),void 0!==(_=this.performAction.apply(A,[s,c,u,g.yy,x[1],i,o].concat(d))))return _;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[x[1]][0]),i.push(A.$),o.push(A._$),C=a[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0}},B={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;oe[0].length)){if(e=n,r=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),14;case 1:return this.begin("type_directive"),15;case 2:return this.popState(),this.begin("arg_directive"),12;case 3:return this.popState(),this.popState(),17;case 4:return 16;case 5:return 5;case 6:case 7:case 8:break;case 9:return 8;case 10:return 6;case 11:return 23;case 12:return 34;case 13:return 26;case 14:return 25;case 15:return 28;case 16:return 30;case 17:return 32;case 18:return 35;case 19:return 36;case 20:return 37;case 21:return 38;case 22:return 39;case 23:return 40;case 24:return 41;case 25:return 42;case 26:return 43;case 27:return 44;case 28:return 45;case 29:return 46;case 30:return 47;case 31:return 48;case 32:return 59;case 33:return 60;case 34:return 61;case 35:return 62;case 36:return 63;case 37:return 64;case 38:return 65;case 39:return 51;case 40:return 53;case 41:return 55;case 42:return 58;case 43:return 57;case 44:this.begin("string");break;case 45:this.popState();break;case 46:return"qString";case 47:return e.yytext=e.yytext.trim(),66}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[45,46],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,47],inclusive:!0}}};function I(){this.yy={}}return F.lexer=B,I.prototype=F,F.Parser=I,new I}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(8800).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},6876:function(t,e,n){t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,3],r=[1,5],i=[1,7],o=[2,5],a=[1,15],s=[1,17],u=[1,18],c=[1,19],l=[1,21],h=[1,22],f=[1,23],d=[1,29],p=[1,30],g=[1,31],m=[1,32],v=[1,33],y=[1,34],b=[1,37],O=[1,38],w=[1,39],k=[1,40],x=[1,41],_=[1,42],S=[1,45],E=[1,4,5,16,20,22,23,24,30,32,33,34,35,36,38,40,41,42,46,47,48,49,57,67],C=[1,58],T=[4,5,16,20,22,23,24,30,32,33,34,35,36,38,42,46,47,48,49,57,67],A=[4,5,16,20,22,23,24,30,32,33,34,35,36,38,41,42,46,47,48,49,57,67],D=[4,5,16,20,22,23,24,30,32,33,34,35,36,38,40,42,46,47,48,49,57,67],M=[55,56,57],j=[1,4,5,7,16,20,22,23,24,30,32,33,34,35,36,38,40,41,42,46,47,48,49,57,67],N={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,openDirective:11,typeDirective:12,closeDirective:13,":":14,argDirective:15,participant:16,actor:17,AS:18,restOfLine:19,participant_actor:20,signal:21,autonumber:22,activate:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,text2:31,loop:32,end:33,rect:34,opt:35,alt:36,else_sections:37,par:38,par_sections:39,and:40,else:41,note:42,placement:43,over:44,actor_pair:45,links:46,link:47,properties:48,details:49,spaceList:50,",":51,left_of:52,right_of:53,signaltype:54,"+":55,"-":56,ACTOR:57,SOLID_OPEN_ARROW:58,DOTTED_OPEN_ARROW:59,SOLID_ARROW:60,DOTTED_ARROW:61,SOLID_CROSS:62,DOTTED_CROSS:63,SOLID_POINT:64,DOTTED_POINT:65,TXT:66,open_directive:67,type_directive:68,arg_directive:69,close_directive:70,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",14:":",16:"participant",18:"AS",19:"restOfLine",20:"participant_actor",22:"autonumber",23:"activate",24:"deactivate",30:"title",32:"loop",33:"end",34:"rect",35:"opt",36:"alt",38:"par",40:"and",41:"else",42:"note",44:"over",46:"links",47:"link",48:"properties",49:"details",51:",",52:"left_of",53:"right_of",55:"+",56:"-",57:"ACTOR",58:"SOLID_OPEN_ARROW",59:"DOTTED_OPEN_ARROW",60:"SOLID_ARROW",61:"DOTTED_ARROW",62:"SOLID_CROSS",63:"DOTTED_CROSS",64:"SOLID_POINT",65:"DOTTED_POINT",66:"TXT",67:"open_directive",68:"type_directive",69:"arg_directive",70:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[6,4],[6,6],[10,5],[10,3],[10,5],[10,3],[10,2],[10,1],[10,3],[10,3],[10,2],[10,2],[10,2],[10,2],[10,2],[10,3],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[39,1],[39,4],[37,1],[37,4],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[50,2],[50,1],[45,3],[45,1],[43,1],[43,1],[21,5],[21,5],[21,4],[17,1],[54,1],[54,1],[54,1],[54,1],[54,1],[54,1],[54,1],[54,1],[31,1],[11,1],[12,1],[15,1],[13,1]],performAction:function(t,e,n,r,i,o,a){var s=o.length-1;switch(i){case 4:return r.apply(o[s]),o[s];case 5:case 9:this.$=[];break;case 6:o[s-1].push(o[s]),this.$=o[s-1];break;case 7:case 8:case 45:this.$=o[s];break;case 12:o[s-3].type="addParticipant",o[s-3].description=r.parseMessage(o[s-1]),this.$=o[s-3];break;case 13:o[s-1].type="addParticipant",this.$=o[s-1];break;case 14:o[s-3].type="addActor",o[s-3].description=r.parseMessage(o[s-1]),this.$=o[s-3];break;case 15:o[s-1].type="addActor",this.$=o[s-1];break;case 17:r.enableSequenceNumbers();break;case 18:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:o[s-1]};break;case 19:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:o[s-1]};break;case 25:this.$=[{type:"setTitle",text:o[s-1]}];break;case 26:o[s-1].unshift({type:"loopStart",loopText:r.parseMessage(o[s-2]),signalType:r.LINETYPE.LOOP_START}),o[s-1].push({type:"loopEnd",loopText:o[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=o[s-1];break;case 27:o[s-1].unshift({type:"rectStart",color:r.parseMessage(o[s-2]),signalType:r.LINETYPE.RECT_START}),o[s-1].push({type:"rectEnd",color:r.parseMessage(o[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=o[s-1];break;case 28:o[s-1].unshift({type:"optStart",optText:r.parseMessage(o[s-2]),signalType:r.LINETYPE.OPT_START}),o[s-1].push({type:"optEnd",optText:r.parseMessage(o[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=o[s-1];break;case 29:o[s-1].unshift({type:"altStart",altText:r.parseMessage(o[s-2]),signalType:r.LINETYPE.ALT_START}),o[s-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=o[s-1];break;case 30:o[s-1].unshift({type:"parStart",parText:r.parseMessage(o[s-2]),signalType:r.LINETYPE.PAR_START}),o[s-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=o[s-1];break;case 33:this.$=o[s-3].concat([{type:"and",parText:r.parseMessage(o[s-1]),signalType:r.LINETYPE.PAR_AND},o[s]]);break;case 35:this.$=o[s-3].concat([{type:"else",altText:r.parseMessage(o[s-1]),signalType:r.LINETYPE.ALT_ELSE},o[s]]);break;case 36:this.$=[o[s-1],{type:"addNote",placement:o[s-2],actor:o[s-1].actor,text:o[s]}];break;case 37:o[s-2]=[].concat(o[s-1],o[s-1]).slice(0,2),o[s-2][0]=o[s-2][0].actor,o[s-2][1]=o[s-2][1].actor,this.$=[o[s-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:o[s-2].slice(0,2),text:o[s]}];break;case 38:this.$=[o[s-1],{type:"addLinks",actor:o[s-1].actor,text:o[s]}];break;case 39:this.$=[o[s-1],{type:"addALink",actor:o[s-1].actor,text:o[s]}];break;case 40:this.$=[o[s-1],{type:"addProperties",actor:o[s-1].actor,text:o[s]}];break;case 41:this.$=[o[s-1],{type:"addDetails",actor:o[s-1].actor,text:o[s]}];break;case 44:this.$=[o[s-2],o[s]];break;case 46:this.$=r.PLACEMENT.LEFTOF;break;case 47:this.$=r.PLACEMENT.RIGHTOF;break;case 48:this.$=[o[s-4],o[s-1],{type:"addMessage",from:o[s-4].actor,to:o[s-1].actor,signalType:o[s-3],msg:o[s]},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:o[s-1]}];break;case 49:this.$=[o[s-4],o[s-1],{type:"addMessage",from:o[s-4].actor,to:o[s-1].actor,signalType:o[s-3],msg:o[s]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:o[s-4]}];break;case 50:this.$=[o[s-3],o[s-1],{type:"addMessage",from:o[s-3].actor,to:o[s-1].actor,signalType:o[s-2],msg:o[s]}];break;case 51:this.$={type:"addParticipant",actor:o[s]};break;case 52:this.$=r.LINETYPE.SOLID_OPEN;break;case 53:this.$=r.LINETYPE.DOTTED_OPEN;break;case 54:this.$=r.LINETYPE.SOLID;break;case 55:this.$=r.LINETYPE.DOTTED;break;case 56:this.$=r.LINETYPE.SOLID_CROSS;break;case 57:this.$=r.LINETYPE.DOTTED_CROSS;break;case 58:this.$=r.LINETYPE.SOLID_POINT;break;case 59:this.$=r.LINETYPE.DOTTED_POINT;break;case 60:this.$=r.parseMessage(o[s].trim().substring(1));break;case 61:r.parseDirective("%%{","open_directive");break;case 62:r.parseDirective(o[s],"type_directive");break;case 63:o[s]=o[s].trim().replace(/'/g,'"'),r.parseDirective(o[s],"arg_directive");break;case 64:r.parseDirective("}%%","close_directive","sequence")}},table:[{3:1,4:e,5:n,6:4,7:r,11:6,67:i},{1:[3]},{3:8,4:e,5:n,6:4,7:r,11:6,67:i},{3:9,4:e,5:n,6:4,7:r,11:6,67:i},{3:10,4:e,5:n,6:4,7:r,11:6,67:i},t([1,4,5,16,20,22,23,24,30,32,34,35,36,38,42,46,47,48,49,57,67],o,{8:11}),{12:12,68:[1,13]},{68:[2,61]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:a,5:s,6:35,9:14,10:16,11:6,16:u,17:36,20:c,21:20,22:l,23:h,24:f,25:24,26:25,27:26,28:27,29:28,30:d,32:p,34:g,35:m,36:v,38:y,42:b,46:O,47:w,48:k,49:x,57:_,67:i},{13:43,14:[1,44],70:S},t([14,70],[2,62]),t(E,[2,6]),{6:35,10:46,11:6,16:u,17:36,20:c,21:20,22:l,23:h,24:f,25:24,26:25,27:26,28:27,29:28,30:d,32:p,34:g,35:m,36:v,38:y,42:b,46:O,47:w,48:k,49:x,57:_,67:i},t(E,[2,8]),t(E,[2,9]),{17:47,57:_},{17:48,57:_},{5:[1,49]},t(E,[2,17]),{17:50,57:_},{17:51,57:_},{5:[1,52]},{5:[1,53]},{5:[1,54]},{5:[1,55]},{5:[1,56]},{31:57,66:C},{19:[1,59]},{19:[1,60]},{19:[1,61]},{19:[1,62]},{19:[1,63]},t(E,[2,31]),{54:64,58:[1,65],59:[1,66],60:[1,67],61:[1,68],62:[1,69],63:[1,70],64:[1,71],65:[1,72]},{43:73,44:[1,74],52:[1,75],53:[1,76]},{17:77,57:_},{17:78,57:_},{17:79,57:_},{17:80,57:_},t([5,18,51,58,59,60,61,62,63,64,65,66],[2,51]),{5:[1,81]},{15:82,69:[1,83]},{5:[2,64]},t(E,[2,7]),{5:[1,85],18:[1,84]},{5:[1,87],18:[1,86]},t(E,[2,16]),{5:[1,88]},{5:[1,89]},t(E,[2,20]),t(E,[2,21]),t(E,[2,22]),t(E,[2,23]),t(E,[2,24]),{5:[1,90]},{5:[2,60]},t(T,o,{8:91}),t(T,o,{8:92}),t(T,o,{8:93}),t(A,o,{37:94,8:95}),t(D,o,{39:96,8:97}),{17:100,55:[1,98],56:[1,99],57:_},t(M,[2,52]),t(M,[2,53]),t(M,[2,54]),t(M,[2,55]),t(M,[2,56]),t(M,[2,57]),t(M,[2,58]),t(M,[2,59]),{17:101,57:_},{17:103,45:102,57:_},{57:[2,46]},{57:[2,47]},{31:104,66:C},{31:105,66:C},{31:106,66:C},{31:107,66:C},t(j,[2,10]),{13:108,70:S},{70:[2,63]},{19:[1,109]},t(E,[2,13]),{19:[1,110]},t(E,[2,15]),t(E,[2,18]),t(E,[2,19]),t(E,[2,25]),{4:a,5:s,6:35,9:14,10:16,11:6,16:u,17:36,20:c,21:20,22:l,23:h,24:f,25:24,26:25,27:26,28:27,29:28,30:d,32:p,33:[1,111],34:g,35:m,36:v,38:y,42:b,46:O,47:w,48:k,49:x,57:_,67:i},{4:a,5:s,6:35,9:14,10:16,11:6,16:u,17:36,20:c,21:20,22:l,23:h,24:f,25:24,26:25,27:26,28:27,29:28,30:d,32:p,33:[1,112],34:g,35:m,36:v,38:y,42:b,46:O,47:w,48:k,49:x,57:_,67:i},{4:a,5:s,6:35,9:14,10:16,11:6,16:u,17:36,20:c,21:20,22:l,23:h,24:f,25:24,26:25,27:26,28:27,29:28,30:d,32:p,33:[1,113],34:g,35:m,36:v,38:y,42:b,46:O,47:w,48:k,49:x,57:_,67:i},{33:[1,114]},{4:a,5:s,6:35,9:14,10:16,11:6,16:u,17:36,20:c,21:20,22:l,23:h,24:f,25:24,26:25,27:26,28:27,29:28,30:d,32:p,33:[2,34],34:g,35:m,36:v,38:y,41:[1,115],42:b,46:O,47:w,48:k,49:x,57:_,67:i},{33:[1,116]},{4:a,5:s,6:35,9:14,10:16,11:6,16:u,17:36,20:c,21:20,22:l,23:h,24:f,25:24,26:25,27:26,28:27,29:28,30:d,32:p,33:[2,32],34:g,35:m,36:v,38:y,40:[1,117],42:b,46:O,47:w,48:k,49:x,57:_,67:i},{17:118,57:_},{17:119,57:_},{31:120,66:C},{31:121,66:C},{31:122,66:C},{51:[1,123],66:[2,45]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},{5:[1,124]},{5:[1,125]},{5:[1,126]},t(E,[2,26]),t(E,[2,27]),t(E,[2,28]),t(E,[2,29]),{19:[1,127]},t(E,[2,30]),{19:[1,128]},{31:129,66:C},{31:130,66:C},{5:[2,50]},{5:[2,36]},{5:[2,37]},{17:131,57:_},t(j,[2,11]),t(E,[2,12]),t(E,[2,14]),t(A,o,{8:95,37:132}),t(D,o,{8:97,39:133}),{5:[2,48]},{5:[2,49]},{66:[2,44]},{33:[2,35]},{33:[2,33]}],defaultActions:{7:[2,61],8:[2,1],9:[2,2],10:[2,3],45:[2,64],58:[2,60],75:[2,46],76:[2,47],83:[2,63],104:[2,38],105:[2,39],106:[2,40],107:[2,41],120:[2,50],121:[2,36],122:[2,37],129:[2,48],130:[2,49],131:[2,44],132:[2,35],133:[2,33]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],o=[],a=this.table,s="",u=0,c=0,l=0,h=2,f=1,d=o.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(g.yy[m]=this.yy[m]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;o.push(v);var y=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var O,w,k,x,_,S,E,C,T,A={};;){if(k=n[n.length-1],this.defaultActions[k]?x=this.defaultActions[k]:(null==O&&(O=b()),x=a[k]&&a[k][O]),void 0===x||!x.length||!x[0]){var D="";for(S in T=[],a[k])this.terminals_[S]&&S>h&&T.push("'"+this.terminals_[S]+"'");D=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[O]||O)+"'":"Parse error on line "+(u+1)+": Unexpected "+(O==f?"end of input":"'"+(this.terminals_[O]||O)+"'"),this.parseError(D,{text:p.match,token:this.terminals_[O]||O,line:p.yylineno,loc:v,expected:T})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+O);switch(x[0]){case 1:n.push(O),i.push(p.yytext),o.push(p.yylloc),n.push(x[1]),O=null,w?(O=w,w=null):(c=p.yyleng,s=p.yytext,u=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[x[1]][1],A.$=i[i.length-E],A._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(A._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),void 0!==(_=this.performAction.apply(A,[s,c,u,g.yy,x[1],i,o].concat(d))))return _;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[x[1]][0]),i.push(A.$),o.push(A._$),C=a[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0}},P={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;oe[0].length)){if(e=n,r=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),67;case 1:return this.begin("type_directive"),68;case 2:return this.popState(),this.begin("arg_directive"),14;case 3:return this.popState(),this.popState(),70;case 4:return 69;case 5:case 39:case 52:return 5;case 6:case 7:case 8:case 9:case 10:break;case 11:return this.begin("ID"),16;case 12:return this.begin("ID"),20;case 13:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),57;case 14:return this.popState(),this.popState(),this.begin("LINE"),18;case 15:return this.popState(),this.popState(),5;case 16:return this.begin("LINE"),32;case 17:return this.begin("LINE"),34;case 18:return this.begin("LINE"),35;case 19:return this.begin("LINE"),36;case 20:return this.begin("LINE"),41;case 21:return this.begin("LINE"),38;case 22:return this.begin("LINE"),40;case 23:return this.popState(),19;case 24:return 33;case 25:return 52;case 26:return 53;case 27:return 46;case 28:return 47;case 29:return 48;case 30:return 49;case 31:return 44;case 32:return 42;case 33:return this.begin("ID"),23;case 34:return this.begin("ID"),24;case 35:return 30;case 36:return 7;case 37:return 22;case 38:return 51;case 40:return e.yytext=e.yytext.trim(),57;case 41:return 60;case 42:return 61;case 43:return 58;case 44:return 59;case 45:return 62;case 46:return 63;case 47:return 64;case 48:return 65;case 49:return 66;case 50:return 55;case 51:return 56;case 53:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:[^\->:\n,;]+?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:and\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\b)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1,8],inclusive:!1},type_directive:{rules:[2,3,8],inclusive:!1},arg_directive:{rules:[3,4,8],inclusive:!1},ID:{rules:[7,8,13],inclusive:!1},ALIAS:{rules:[7,8,14,15],inclusive:!1},LINE:{rules:[7,8,23],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,12,16,17,18,19,20,21,22,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53],inclusive:!0}}};function R(){this.yy={}}return N.lexer=P,R.prototype=N,N.Parser=R,new R}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(1993).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},3584:function(t,e,n){t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,3],r=[1,5],i=[1,7],o=[2,5],a=[1,15],s=[1,17],u=[1,19],c=[1,20],l=[1,21],h=[1,22],f=[1,30],d=[1,23],p=[1,24],g=[1,25],m=[1,26],v=[1,27],y=[1,32],b=[1,33],O=[1,34],w=[1,35],k=[1,31],x=[1,38],_=[1,4,5,14,15,17,19,20,22,23,24,25,26,27,36,37,38,39,42,45],S=[1,4,5,12,13,14,15,17,19,20,22,23,24,25,26,27,36,37,38,39,42,45],E=[1,4,5,7,14,15,17,19,20,22,23,24,25,26,27,36,37,38,39,42,45],C=[4,5,14,15,17,19,20,22,23,24,25,26,27,36,37,38,39,42,45],T={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,directive:6,SD:7,document:8,line:9,statement:10,idStatement:11,DESCR:12,"--\x3e":13,HIDE_EMPTY:14,scale:15,WIDTH:16,COMPOSIT_STATE:17,STRUCT_START:18,STRUCT_STOP:19,STATE_DESCR:20,AS:21,ID:22,FORK:23,JOIN:24,CHOICE:25,CONCURRENT:26,note:27,notePosition:28,NOTE_TEXT:29,direction:30,openDirective:31,typeDirective:32,closeDirective:33,":":34,argDirective:35,direction_tb:36,direction_bt:37,direction_rl:38,direction_lr:39,eol:40,";":41,EDGE_STATE:42,left_of:43,right_of:44,open_directive:45,type_directive:46,arg_directive:47,close_directive:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",7:"SD",12:"DESCR",13:"--\x3e",14:"HIDE_EMPTY",15:"scale",16:"WIDTH",17:"COMPOSIT_STATE",18:"STRUCT_START",19:"STRUCT_STOP",20:"STATE_DESCR",21:"AS",22:"ID",23:"FORK",24:"JOIN",25:"CHOICE",26:"CONCURRENT",27:"note",29:"NOTE_TEXT",34:":",36:"direction_tb",37:"direction_bt",38:"direction_rl",39:"direction_lr",41:";",42:"EDGE_STATE",43:"left_of",44:"right_of",45:"open_directive",46:"type_directive",47:"arg_directive",48:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,1],[10,2],[10,1],[10,4],[10,3],[10,6],[10,1],[10,1],[10,1],[10,1],[10,4],[10,4],[10,1],[10,1],[6,3],[6,5],[30,1],[30,1],[30,1],[30,1],[40,1],[40,1],[11,1],[11,1],[28,1],[28,1],[31,1],[32,1],[35,1],[33,1]],performAction:function(t,e,n,r,i,o,a){var s=o.length-1;switch(i){case 4:return r.setRootDoc(o[s]),o[s];case 5:this.$=[];break;case 6:"nl"!=o[s]&&(o[s-1].push(o[s]),this.$=o[s-1]);break;case 7:case 8:case 36:case 37:this.$=o[s];break;case 9:this.$="nl";break;case 10:this.$={stmt:"state",id:o[s],type:"default",description:""};break;case 11:this.$={stmt:"state",id:o[s-1],type:"default",description:r.trimColon(o[s])};break;case 12:this.$={stmt:"relation",state1:{stmt:"state",id:o[s-2],type:"default",description:""},state2:{stmt:"state",id:o[s],type:"default",description:""}};break;case 13:this.$={stmt:"relation",state1:{stmt:"state",id:o[s-3],type:"default",description:""},state2:{stmt:"state",id:o[s-1],type:"default",description:""},description:o[s].substr(1).trim()};break;case 17:this.$={stmt:"state",id:o[s-3],type:"default",description:"",doc:o[s-1]};break;case 18:var u=o[s],c=o[s-2].trim();if(o[s].match(":")){var l=o[s].split(":");u=l[0],c=[c,l[1]]}this.$={stmt:"state",id:u,type:"default",description:c};break;case 19:this.$={stmt:"state",id:o[s-3],type:"default",description:o[s-5],doc:o[s-1]};break;case 20:this.$={stmt:"state",id:o[s],type:"fork"};break;case 21:this.$={stmt:"state",id:o[s],type:"join"};break;case 22:this.$={stmt:"state",id:o[s],type:"choice"};break;case 23:this.$={stmt:"state",id:r.getDividerId(),type:"divider"};break;case 24:this.$={stmt:"state",id:o[s-1].trim(),note:{position:o[s-2].trim(),text:o[s].trim()}};break;case 30:r.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 31:r.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 32:r.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 33:r.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 40:r.parseDirective("%%{","open_directive");break;case 41:r.parseDirective(o[s],"type_directive");break;case 42:o[s]=o[s].trim().replace(/'/g,'"'),r.parseDirective(o[s],"arg_directive");break;case 43:r.parseDirective("}%%","close_directive","state")}},table:[{3:1,4:e,5:n,6:4,7:r,31:6,45:i},{1:[3]},{3:8,4:e,5:n,6:4,7:r,31:6,45:i},{3:9,4:e,5:n,6:4,7:r,31:6,45:i},{3:10,4:e,5:n,6:4,7:r,31:6,45:i},t([1,4,5,14,15,17,20,22,23,24,25,26,27,36,37,38,39,42,45],o,{8:11}),{32:12,46:[1,13]},{46:[2,40]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:a,5:s,6:28,9:14,10:16,11:18,14:u,15:c,17:l,20:h,22:f,23:d,24:p,25:g,26:m,27:v,30:29,31:6,36:y,37:b,38:O,39:w,42:k,45:i},{33:36,34:[1,37],48:x},t([34,48],[2,41]),t(_,[2,6]),{6:28,10:39,11:18,14:u,15:c,17:l,20:h,22:f,23:d,24:p,25:g,26:m,27:v,30:29,31:6,36:y,37:b,38:O,39:w,42:k,45:i},t(_,[2,8]),t(_,[2,9]),t(_,[2,10],{12:[1,40],13:[1,41]}),t(_,[2,14]),{16:[1,42]},t(_,[2,16],{18:[1,43]}),{21:[1,44]},t(_,[2,20]),t(_,[2,21]),t(_,[2,22]),t(_,[2,23]),{28:45,29:[1,46],43:[1,47],44:[1,48]},t(_,[2,26]),t(_,[2,27]),t(S,[2,36]),t(S,[2,37]),t(_,[2,30]),t(_,[2,31]),t(_,[2,32]),t(_,[2,33]),t(E,[2,28]),{35:49,47:[1,50]},t(E,[2,43]),t(_,[2,7]),t(_,[2,11]),{11:51,22:f,42:k},t(_,[2,15]),t(C,o,{8:52}),{22:[1,53]},{22:[1,54]},{21:[1,55]},{22:[2,38]},{22:[2,39]},{33:56,48:x},{48:[2,42]},t(_,[2,12],{12:[1,57]}),{4:a,5:s,6:28,9:14,10:16,11:18,14:u,15:c,17:l,19:[1,58],20:h,22:f,23:d,24:p,25:g,26:m,27:v,30:29,31:6,36:y,37:b,38:O,39:w,42:k,45:i},t(_,[2,18],{18:[1,59]}),{29:[1,60]},{22:[1,61]},t(E,[2,29]),t(_,[2,13]),t(_,[2,17]),t(C,o,{8:62}),t(_,[2,24]),t(_,[2,25]),{4:a,5:s,6:28,9:14,10:16,11:18,14:u,15:c,17:l,19:[1,63],20:h,22:f,23:d,24:p,25:g,26:m,27:v,30:29,31:6,36:y,37:b,38:O,39:w,42:k,45:i},t(_,[2,19])],defaultActions:{7:[2,40],8:[2,1],9:[2,2],10:[2,3],47:[2,38],48:[2,39],50:[2,42]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],o=[],a=this.table,s="",u=0,c=0,l=0,h=2,f=1,d=o.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(g.yy[m]=this.yy[m]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;o.push(v);var y=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var O,w,k,x,_,S,E,C,T,A={};;){if(k=n[n.length-1],this.defaultActions[k]?x=this.defaultActions[k]:(null==O&&(O=b()),x=a[k]&&a[k][O]),void 0===x||!x.length||!x[0]){var D="";for(S in T=[],a[k])this.terminals_[S]&&S>h&&T.push("'"+this.terminals_[S]+"'");D=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[O]||O)+"'":"Parse error on line "+(u+1)+": Unexpected "+(O==f?"end of input":"'"+(this.terminals_[O]||O)+"'"),this.parseError(D,{text:p.match,token:this.terminals_[O]||O,line:p.yylineno,loc:v,expected:T})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+O);switch(x[0]){case 1:n.push(O),i.push(p.yytext),o.push(p.yylloc),n.push(x[1]),O=null,w?(O=w,w=null):(c=p.yyleng,s=p.yytext,u=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[x[1]][1],A.$=i[i.length-E],A._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(A._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),void 0!==(_=this.performAction.apply(A,[s,c,u,g.yy,x[1],i,o].concat(d))))return _;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[x[1]][0]),i.push(A.$),o.push(A._$),C=a[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0}},A={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;oe[0].length)){if(e=n,r=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:case 26:return 36;case 1:case 27:return 37;case 2:case 28:return 38;case 3:case 29:return 39;case 4:return this.begin("open_directive"),45;case 5:return this.begin("type_directive"),46;case 6:return this.popState(),this.begin("arg_directive"),34;case 7:return this.popState(),this.popState(),48;case 8:return 47;case 9:case 10:case 12:case 13:case 14:case 15:case 39:case 45:break;case 11:case 59:return 5;case 16:return this.pushState("SCALE"),15;case 17:return 16;case 18:case 33:case 36:this.popState();break;case 19:this.pushState("STATE");break;case 20:case 23:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),23;case 21:case 24:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),24;case 22:case 25:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),25;case 30:this.begin("STATE_STRING");break;case 31:return this.popState(),this.pushState("STATE_ID"),"AS";case 32:case 47:return this.popState(),"ID";case 34:return"STATE_DESCR";case 35:return 17;case 37:return this.popState(),this.pushState("struct"),18;case 38:return this.popState(),19;case 40:return this.begin("NOTE"),27;case 41:return this.popState(),this.pushState("NOTE_ID"),43;case 42:return this.popState(),this.pushState("NOTE_ID"),44;case 43:this.popState(),this.pushState("FLOATING_NOTE");break;case 44:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 46:return"NOTE_TEXT";case 48:return this.popState(),this.pushState("NOTE_TEXT"),22;case 49:return this.popState(),e.yytext=e.yytext.substr(2).trim(),29;case 50:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),29;case 51:case 52:return 7;case 53:return 14;case 54:return 42;case 55:return 22;case 56:return e.yytext=e.yytext.trim(),12;case 57:return 13;case 58:return 26;case 60:return"INVALID"}},rules:[/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[13,14],inclusive:!1},close_directive:{rules:[13,14],inclusive:!1},arg_directive:{rules:[7,8,13,14],inclusive:!1},type_directive:{rules:[6,7,13,14],inclusive:!1},open_directive:{rules:[5,13,14],inclusive:!1},struct:{rules:[13,14,19,26,27,28,29,38,39,40,54,55,56,57,58],inclusive:!1},FLOATING_NOTE_ID:{rules:[47],inclusive:!1},FLOATING_NOTE:{rules:[44,45,46],inclusive:!1},NOTE_TEXT:{rules:[49,50],inclusive:!1},NOTE_ID:{rules:[48],inclusive:!1},NOTE:{rules:[41,42,43],inclusive:!1},SCALE:{rules:[17,18],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[32],inclusive:!1},STATE_STRING:{rules:[33,34],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[13,14,20,21,22,23,24,25,30,31,35,36,37],inclusive:!1},ID:{rules:[13,14],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,12,14,15,16,19,37,40,51,52,53,54,55,56,57,59,60],inclusive:!0}}};function D(){this.yy={}}return T.lexer=A,D.prototype=T,T.Parser=D,new D}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(3069).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},9763:function(t,e,n){t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,5],r=[6,9,11,17,18,19,21],i=[1,15],o=[1,16],a=[1,17],s=[1,21],u=[4,6,9,11,17,18,19,21],c={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,section:18,taskName:19,taskData:20,open_directive:21,type_directive:22,arg_directive:23,close_directive:24,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"section",19:"taskName",20:"taskData",21:"open_directive",22:"type_directive",23:"arg_directive",24:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,n,r,i,o,a){var s=o.length-1;switch(i){case 1:return o[s-1];case 3:case 7:case 8:this.$=[];break;case 4:o[s-1].push(o[s]),this.$=o[s-1];break;case 5:case 6:this.$=o[s];break;case 11:r.setTitle(o[s].substr(6)),this.$=o[s].substr(6);break;case 12:r.addSection(o[s].substr(8)),this.$=o[s].substr(8);break;case 13:r.addTask(o[s-1],o[s]),this.$="task";break;case 15:r.parseDirective("%%{","open_directive");break;case 16:r.parseDirective(o[s],"type_directive");break;case 17:o[s]=o[s].trim().replace(/'/g,'"'),r.parseDirective(o[s],"arg_directive");break;case 18:r.parseDirective("}%%","close_directive","journey")}},table:[{3:1,4:e,7:3,12:4,21:n},{1:[3]},t(r,[2,3],{5:6}),{3:7,4:e,7:3,12:4,21:n},{13:8,22:[1,9]},{22:[2,15]},{6:[1,10],7:18,8:11,9:[1,12],10:13,11:[1,14],12:4,17:i,18:o,19:a,21:n},{1:[2,2]},{14:19,15:[1,20],24:s},t([15,24],[2,16]),t(r,[2,8],{1:[2,1]}),t(r,[2,4]),{7:18,10:22,12:4,17:i,18:o,19:a,21:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,11]),t(r,[2,12]),{20:[1,23]},t(r,[2,14]),{11:[1,24]},{16:25,23:[1,26]},{11:[2,18]},t(r,[2,5]),t(r,[2,13]),t(u,[2,9]),{14:27,24:s},{24:[2,17]},{11:[1,28]},t(u,[2,10])],defaultActions:{5:[2,15],7:[2,2],21:[2,18],26:[2,17]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],o=[],a=this.table,s="",u=0,c=0,l=0,h=2,f=1,d=o.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(g.yy[m]=this.yy[m]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;o.push(v);var y=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var O,w,k,x,_,S,E,C,T,A={};;){if(k=n[n.length-1],this.defaultActions[k]?x=this.defaultActions[k]:(null==O&&(O=b()),x=a[k]&&a[k][O]),void 0===x||!x.length||!x[0]){var D="";for(S in T=[],a[k])this.terminals_[S]&&S>h&&T.push("'"+this.terminals_[S]+"'");D=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[O]||O)+"'":"Parse error on line "+(u+1)+": Unexpected "+(O==f?"end of input":"'"+(this.terminals_[O]||O)+"'"),this.parseError(D,{text:p.match,token:this.terminals_[O]||O,line:p.yylineno,loc:v,expected:T})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+O);switch(x[0]){case 1:n.push(O),i.push(p.yytext),o.push(p.yylloc),n.push(x[1]),O=null,w?(O=w,w=null):(c=p.yyleng,s=p.yytext,u=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[x[1]][1],A.$=i[i.length-E],A._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(A._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),void 0!==(_=this.performAction.apply(A,[s,c,u,g.yy,x[1],i,o].concat(d))))return _;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[x[1]][0]),i.push(A.$),o.push(A._$),C=a[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0}},l={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;oe[0].length)){if(e=n,r=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),21;case 1:return this.begin("type_directive"),22;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),24;case 4:return 23;case 5:case 6:case 8:case 9:break;case 7:return 11;case 10:return 4;case 11:return 17;case 12:return 18;case 13:return 19;case 14:return 20;case 15:return 15;case 16:return 6;case 17:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,13,14,15,16,17],inclusive:!0}}};function h(){this.yy={}}return c.lexer=l,h.prototype=c,c.Parser=h,new h}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(9143).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},9609:function(t){var e=/^(%20|\s)*(javascript|data)/im,n=/[^\x20-\x7E]/gim,r=/^([^:]+):/gm,i=[".","/"];t.exports={sanitizeUrl:function(t){if(!t)return"about:blank";var o,a,s=t.replace(n,"").trim();return function(t){return i.indexOf(t[0])>-1}(s)?s:(a=s.match(r))?(o=a[0],e.test(o)?"about:blank":s):"about:blank"}}},3841:function(t){t.exports=function(t,e){return t.intersect(e)}},7458:function(t,e,n){n.d(e,{Z:function(){return QS}});var i=n(1941),o=n.n(i),s={debug:1,info:2,warn:3,error:4,fatal:5},u={debug:function(){},info:function(){},warn:function(){},error:function(){},fatal:function(){}},c=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"fatal";isNaN(t)&&(t=t.toLowerCase(),void 0!==s[t]&&(t=s[t])),u.trace=function(){},u.debug=function(){},u.info=function(){},u.warn=function(){},u.error=function(){},u.fatal=function(){},t<=s.fatal&&(u.fatal=console.error?console.error.bind(console,l("FATAL"),"color: orange"):console.log.bind(console,"\x1b[35m",l("FATAL"))),t<=s.error&&(u.error=console.error?console.error.bind(console,l("ERROR"),"color: orange"):console.log.bind(console,"\x1b[31m",l("ERROR"))),t<=s.warn&&(u.warn=console.warn?console.warn.bind(console,l("WARN"),"color: orange"):console.log.bind(console,"\x1b[33m",l("WARN"))),t<=s.info&&(u.info=console.info?console.info.bind(console,l("INFO"),"color: lightblue"):console.log.bind(console,"\x1b[34m",l("INFO"))),t<=s.debug&&(u.debug=console.debug?console.debug.bind(console,l("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",l("DEBUG")))},l=function(t){var e=o()().format("ss.SSS");return"%c".concat(e," : ").concat(t," : ")};function h(t,e){var n;if(void 0===e){var r,i=Object(a.a)(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;null!=o&&(n=o)&&(n=o)}}catch(h){i.e(h)}finally{i.f()}}else{var s,u=-1,c=Object(a.a)(t);try{for(c.s();!(s=c.n()).done;){var l=s.value;null!=(l=e(l,++u,t))&&(n=l)&&(n=l)}}catch(h){c.e(h)}finally{c.f()}}return n}function f(t,e){var n;if(void 0===e){var r,i=Object(a.a)(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;null!=o&&(n>o||void 0===n&&o>=o)&&(n=o)}}catch(h){i.e(h)}finally{i.f()}}else{var s,u=-1,c=Object(a.a)(t);try{for(c.s();!(s=c.n()).done;){var l=s.value;null!=(l=e(l,++u,t))&&(n>l||void 0===n&&l>=l)&&(n=l)}}catch(h){c.e(h)}finally{c.f()}}return n}function d(t){return t}var p=1e-6;function E(t){return"translate("+t+",0)"}function C(t){return"translate(0,"+t+")"}function T(t){return function(e){return+t(e)}}function A(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function D(){return!this.__axis}function M(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,c=1===t||4===t?-1:1,l=4===t||2===t?"x":"y",h=1===t||3===t?E:C;function f(f){var g=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,m=null==i?e.tickFormat?e.tickFormat.apply(e,n):d:i,v=Math.max(o,0)+s,y=e.range(),b=+y[0]+u,O=+y[y.length-1]+u,w=(e.bandwidth?A:T)(e.copy(),u),k=f.selection?f.selection():f,x=k.selectAll(".domain").data([null]),_=k.selectAll(".tick").data(g,e).order(),S=_.exit(),E=_.enter().append("g").attr("class","tick"),C=_.select("line"),M=_.select("text");x=x.merge(x.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),_=_.merge(E),C=C.merge(E.append("line").attr("stroke","currentColor").attr(l+"2",c*o)),M=M.merge(E.append("text").attr("fill","currentColor").attr(l,c*v).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),f!==k&&(x=x.transition(f),_=_.transition(f),C=C.transition(f),M=M.transition(f),S=S.transition(f).attr("opacity",p).attr("transform",(function(t){return isFinite(t=w(t))?h(t+u):this.getAttribute("transform")})),E.attr("opacity",p).attr("transform",(function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:w(t))+u)}))),S.remove(),x.attr("d",4===t||2===t?a?"M"+c*a+","+b+"H"+u+"V"+O+"H"+c*a:"M"+u+","+b+"V"+O:a?"M"+b+","+c*a+"V"+u+"H"+O+"V"+c*a:"M"+b+","+u+"H"+O),_.attr("opacity",1).attr("transform",(function(t){return h(w(t)+u)})),C.attr(l+"2",c*o),M.attr(l,c*v).text(m),k.filter(D).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),k.each((function(){this.__axis=w}))}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),f):r&&r.slice()},f.tickFormat=function(t){return arguments.length?(i=t,f):i},f.tickSize=function(t){return arguments.length?(o=a=+t,f):o},f.tickSizeInner=function(t){return arguments.length?(o=+t,f):o},f.tickSizeOuter=function(t){return arguments.length?(a=+t,f):a},f.tickPadding=function(t){return arguments.length?(s=+t,f):s},f.offset=function(t){return arguments.length?(u=+t,f):u},f}function j(){}function N(t){return null==t?j:function(){return this.querySelector(t)}}function P(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function R(){return[]}function L(t){return null==t?R:function(){return this.querySelectorAll(t)}}function F(t){return function(){return this.matches(t)}}function B(t){return function(e){return e.matches(t)}}var I=Array.prototype.find;function Q(){return this.firstElementChild}var $=Array.prototype.filter;function z(){return Array.from(this.children)}function q(t){return new Array(t.length)}function W(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function V(t){return function(){return t}}function Y(t,e,n,r,i,o){for(var a,s=0,u=e.length,c=o.length;se?1:t>=e?0:NaN}W.prototype={constructor:W,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var Z="http://www.w3.org/1999/xhtml",K={svg:"http://www.w3.org/2000/svg",xhtml:Z,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function J(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),K.hasOwnProperty(e)?{space:K[e],local:t}:t}function tt(t){return function(){this.removeAttribute(t)}}function et(t){return function(){this.removeAttributeNS(t.space,t.local)}}function nt(t,e){return function(){this.setAttribute(t,e)}}function rt(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function it(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function ot(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function at(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function st(t){return function(){this.style.removeProperty(t)}}function ut(t,e,n){return function(){this.style.setProperty(t,e,n)}}function ct(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function lt(t,e){return t.style.getPropertyValue(e)||at(t).getComputedStyle(t,null).getPropertyValue(e)}function ht(t){return function(){delete this[t]}}function ft(t,e){return function(){this[t]=e}}function dt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function pt(t){return t.trim().split(/^|\s+/)}function gt(t){return t.classList||new mt(t)}function mt(t){this._node=t,this._names=pt(t.getAttribute("class")||"")}function vt(t,e){for(var n=gt(t),r=-1,i=e.length;++r=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function Bt(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var qt=[null];function Wt(t,e){this._groups=t,this._parents=e}function Vt(){return new Wt([[document.documentElement]],qt)}Wt.prototype=Vt.prototype=Object(_.a)({constructor:Wt,select:function(t){"function"!=typeof t&&(t=N(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i=w&&(w=O+1);!(b=m[w])&&++w=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=G);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o1?this.each((null==e?st:"function"==typeof e?ct:ut)(t,e,null==n?"":n)):lt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?ht:"function"==typeof e?dt:ft)(t,e)):this.node()[t]},classed:function(t,e){var n=pt(t+"");if(arguments.length<2){for(var r=gt(this.node()),i=-1,o=n.length;++i=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function Zt(t,e){for(var n,r=0,i=t.length;r0)for(var n,r,i=new Array(n),o=0;o=0&&e._call.call(void 0,t),e=e._next;--ne}()}finally{ne=0,function(){for(var t,e,n=Jt,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Jt=e);te=t,me(r)}(),ae=0}}function ge(){var t=ue.now(),e=t-oe;e>1e3&&(se-=e,oe=t)}function me(t){ne||(re&&(re=clearTimeout(re)),t-ae>24?(t<1/0&&(re=setTimeout(pe,t-ue.now()-se)),ie&&(ie=clearInterval(ie))):(ie||(oe=ue.now(),ie=setInterval(ge,1e3)),ne=1,ce(pe)))}function ve(t,e,n){var r=new fe;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}fe.prototype=de.prototype={constructor:fe,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?le():+n)+(null==e?0:+e),this._next||te===this||(te?te._next=this:Jt=this,te=this),this._call=t,this._time=n,me()},stop:function(){this._call&&(this._call=null,this._time=1/0,me())}};var ye=ee("start","end","cancel","interrupt"),be=[];function Oe(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(u){var c,l,h,f;if(1!==n.state)return s();for(c in i)if((f=i[c]).name===n.name){if(3===f.state)return ve(o);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[c]):+c0)throw new Error("too late; already scheduled");return n}function ke(t,e){var n=xe(t,e);if(n.state>3)throw new Error("too late; already running");return n}function xe(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function _e(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var Se,Ee=180/Math.PI,Ce={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Te(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:_e(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,s,u),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:_e(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,s,u),function(t,e,n,r,o,a){if(t!==n||e!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:_e(t,n)},{i:s-2,x:_e(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,u),o=a=null,function(t){for(var e,n=-1,r=u.length;++n>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?en(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?en(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=We.exec(t))?new on(e[1],e[2],e[3],1):(e=Ve.exec(t))?new on(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Ye.exec(t))?en(e[1],e[2],e[3],e[4]):(e=Ue.exec(t))?en(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=He.exec(t))?cn(e[1],e[2]/100,e[3]/100,1):(e=Xe.exec(t))?cn(e[1],e[2]/100,e[3]/100,e[4]):Ge.hasOwnProperty(t)?tn(Ge[t]):"transparent"===t?new on(NaN,NaN,NaN,0):null}function tn(t){return new on(t>>16&255,t>>8&255,255&t,1)}function en(t,e,n,r){return r<=0&&(t=e=n=NaN),new on(t,e,n,r)}function nn(t){return t instanceof Fe||(t=Je(t)),t?new on((t=t.rgb()).r,t.g,t.b,t.opacity):new on}function rn(t,e,n,r){return 1===arguments.length?nn(t):new on(t,e,n,null==r?1:r)}function on(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function an(){return"#"+un(this.r)+un(this.g)+un(this.b)}function sn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function un(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function cn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new hn(t,e,n,r)}function ln(t){if(t instanceof hn)return new hn(t.h,t.s,t.l,t.opacity);if(t instanceof Fe||(t=Je(t)),!t)return new hn;if(t instanceof hn)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n0&&u<1?0:a,new hn(a,s,u,t.opacity)}function hn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function fn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function dn(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}Re(Fe,Je,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Ze,formatHex:Ze,formatHsl:function(){return ln(this).formatHsl()},formatRgb:Ke,toString:Ke}),Re(on,rn,Le(Fe,{brighter:function(t){return t=null==t?Ie:Math.pow(Ie,t),new on(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Be:Math.pow(Be,t),new on(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:an,formatHex:an,formatRgb:sn,toString:sn})),Re(hn,(function(t,e,n,r){return 1===arguments.length?ln(t):new hn(t,e,n,null==r?1:r)}),Le(Fe,{brighter:function(t){return t=null==t?Ie:Math.pow(Ie,t),new hn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Be:Math.pow(Be,t),new hn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new on(fn(t>=240?t-240:t+120,i,r),fn(t,i,r),fn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var pn=function(t){return function(){return t}};function gn(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):pn(isNaN(t)?e:t)}var mn=function t(e){var n=function(t){return 1==(t=+t)?gn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):pn(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=rn(t)).r,(e=rn(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=gn(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function vn(t){return function(e){var n,r,i=e.length,o=new Array(i),a=new Array(i),s=new Array(i);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=ro&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:_e(n,r)})),o=bn.lastIndex;return o=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?we:ke;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}var Bn=Yt.prototype.constructor;function In(t){return function(){this.style.removeProperty(t)}}function Qn(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function $n(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&Qn(t,o,n)),r}return o._value=e,o}function zn(t){return function(e){this.textContent=t.call(this,e)}}function qn(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&zn(r)),e}return r._value=t,r}var Wn=0;function Vn(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Yn(){return++Wn}var Un=Yt.prototype;Vn.prototype=function(t){return Yt().transition(t)}.prototype=Object(_.a)({constructor:Vn,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=N(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}}(this,t)}))},Yt.prototype.transition=function(t){var e,n;t instanceof Vn?(e=t._id,t=t._name):(e=Yn(),(n=Hn).time=le(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?vr(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?vr(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=ar.exec(t))?new Or(e[1],e[2],e[3],1):(e=sr.exec(t))?new Or(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ur.exec(t))?vr(e[1],e[2],e[3],e[4]):(e=cr.exec(t))?vr(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=lr.exec(t))?_r(e[1],e[2]/100,e[3]/100,1):(e=hr.exec(t))?_r(e[1],e[2]/100,e[3]/100,e[4]):fr.hasOwnProperty(t)?mr(fr[t]):"transparent"===t?new Or(NaN,NaN,NaN,0):null}function mr(t){return new Or(t>>16&255,t>>8&255,255&t,1)}function vr(t,e,n,r){return r<=0&&(t=e=n=NaN),new Or(t,e,n,r)}function yr(t){return t instanceof Jn||(t=gr(t)),t?new Or((t=t.rgb()).r,t.g,t.b,t.opacity):new Or}function br(t,e,n,r){return 1===arguments.length?yr(t):new Or(t,e,n,null==r?1:r)}function Or(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function wr(){return"#"+xr(this.r)+xr(this.g)+xr(this.b)}function kr(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function xr(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function _r(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Er(t,e,n,r)}function Sr(t){if(t instanceof Er)return new Er(t.h,t.s,t.l,t.opacity);if(t instanceof Jn||(t=gr(t)),!t)return new Er;if(t instanceof Er)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n0&&u<1?0:a,new Er(a,s,u,t.opacity)}function Er(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Cr(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Zn(Jn,gr,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:dr,formatHex:dr,formatHsl:function(){return Sr(this).formatHsl()},formatRgb:pr,toString:pr}),Zn(Or,br,Kn(Jn,{brighter:function(t){return t=null==t?er:Math.pow(er,t),new Or(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?tr:Math.pow(tr,t),new Or(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:wr,formatHex:wr,formatRgb:kr,toString:kr})),Zn(Er,(function(t,e,n,r){return 1===arguments.length?Sr(t):new Er(t,e,n,null==r?1:r)}),Kn(Jn,{brighter:function(t){return t=null==t?er:Math.pow(er,t),new Er(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?tr:Math.pow(tr,t),new Er(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Or(Cr(t>=240?t-240:t+120,i,r),Cr(t,i,r),Cr(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Tr=Math.PI/180,Ar=180/Math.PI,Dr=.96422,Mr=.82521,jr=4/29,Nr=6/29,Pr=3*Nr*Nr;function Rr(t){if(t instanceof Lr)return new Lr(t.l,t.a,t.b,t.opacity);if(t instanceof qr)return Wr(t);t instanceof Or||(t=yr(t));var e,n,r=Qr(t.r),i=Qr(t.g),o=Qr(t.b),a=Fr((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?e=n=a:(e=Fr((.4360747*r+.3850649*i+.1430804*o)/Dr),n=Fr((.0139322*r+.0971045*i+.7141733*o)/Mr)),new Lr(116*a-16,500*(e-a),200*(a-n),t.opacity)}function Lr(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Fr(t){return t>.008856451679035631?Math.pow(t,1/3):t/Pr+jr}function Br(t){return t>Nr?t*t*t:Pr*(t-jr)}function Ir(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Qr(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function $r(t){if(t instanceof qr)return new qr(t.h,t.c,t.l,t.opacity);if(t instanceof Lr||(t=Rr(t)),0===t.a&&0===t.b)return new qr(NaN,0180||n<-180?n-360*Math.round(n/360):n):Vr(isNaN(t)?e:t)}));Hr(Ur);var Gr=Math.sqrt(50),Zr=Math.sqrt(10),Kr=Math.sqrt(2);function Jr(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=Gr?10:o>=Zr?5:o>=Kr?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Gr?10:o>=Zr?5:o>=Kr?2:1)}function ti(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=Gr?i*=10:o>=Zr?i*=5:o>=Kr&&(i*=2),ee?1:t>=e?0:NaN}function ni(t){var e=t,n=t,r=t;function i(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length;if(i>>1;r(t[a],e)<0?i=a+1:o=a}while(i2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length,a=i(t,n,r,o-1);return a>r&&e(t[a-1],n)>-e(t[a],n)?a-1:a},right:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length;if(i>>1;r(t[a],e)<=0?i=a+1:o=a}while(i>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Ei(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Ei(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=gi.exec(t))?new Ai(e[1],e[2],e[3],1):(e=mi.exec(t))?new Ai(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=vi.exec(t))?Ei(e[1],e[2],e[3],e[4]):(e=yi.exec(t))?Ei(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=bi.exec(t))?Ni(e[1],e[2]/100,e[3]/100,1):(e=Oi.exec(t))?Ni(e[1],e[2]/100,e[3]/100,e[4]):wi.hasOwnProperty(t)?Si(wi[t]):"transparent"===t?new Ai(NaN,NaN,NaN,0):null}function Si(t){return new Ai(t>>16&255,t>>8&255,255&t,1)}function Ei(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ai(t,e,n,r)}function Ci(t){return t instanceof ui||(t=_i(t)),t?new Ai((t=t.rgb()).r,t.g,t.b,t.opacity):new Ai}function Ti(t,e,n,r){return 1===arguments.length?Ci(t):new Ai(t,e,n,null==r?1:r)}function Ai(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Di(){return"#"+ji(this.r)+ji(this.g)+ji(this.b)}function Mi(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function ji(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Ni(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ri(t,e,n,r)}function Pi(t){if(t instanceof Ri)return new Ri(t.h,t.s,t.l,t.opacity);if(t instanceof ui||(t=_i(t)),!t)return new Ri;if(t instanceof Ri)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n0&&u<1?0:a,new Ri(a,s,u,t.opacity)}function Ri(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Li(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Fi(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}ai(ui,_i,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:ki,formatHex:ki,formatHsl:function(){return Pi(this).formatHsl()},formatRgb:xi,toString:xi}),ai(Ai,Ti,si(ui,{brighter:function(t){return t=null==t?li:Math.pow(li,t),new Ai(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?ci:Math.pow(ci,t),new Ai(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Di,formatHex:Di,formatRgb:Mi,toString:Mi})),ai(Ri,(function(t,e,n,r){return 1===arguments.length?Pi(t):new Ri(t,e,n,null==r?1:r)}),si(ui,{brighter:function(t){return t=null==t?li:Math.pow(li,t),new Ri(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?ci:Math.pow(ci,t),new Ri(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Ai(Li(t>=240?t-240:t+120,i,r),Li(t,i,r),Li(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Bi=function(t){return function(){return t}};function Ii(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Bi(isNaN(t)?e:t)}var Qi=function t(e){var n=function(t){return 1==(t=+t)?Ii:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Bi(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=Ti(t)).r,(e=Ti(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=Ii(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function $i(t){return function(e){var n,r,i=e.length,o=new Array(i),a=new Array(i),s=new Array(i);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=ro&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:Wi(n,r)})),o=Ui.lastIndex;return oe&&(n=t,t=e,e=n),c=function(n){return Math.max(t,Math.min(e,n))}),r=u>2?ro:no,i=o=null,h}function h(e){return null==e||isNaN(e=+e)?n:(i||(i=r(a.map(t),s,u)))(t(c(e)))}return h.invert=function(n){return c(e((o||(o=r(s,a.map(t),Wi)))(n)))},h.domain=function(t){return arguments.length?(a=Array.from(t,Ki),l()):a.slice()},h.range=function(t){return arguments.length?(s=Array.from(t),l()):s.slice()},h.rangeRound=function(t){return s=Array.from(t),u=Zi,l()},h.clamp=function(t){return arguments.length?(c=!!t||to,l()):c!==to},h.interpolate=function(t){return arguments.length?(u=t,l()):u},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,l()}}()(to,to)}function ao(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var so,uo=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function co(t){if(!(e=uo.exec(t)))throw new Error("invalid format: "+t);var e;return new lo({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function lo(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function ho(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function fo(t){return(t=ho(Math.abs(t)))?t[1]:NaN}function po(t,e){var n=ho(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}co.prototype=lo.prototype,lo.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var go={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return po(100*t,e)},r:po,s:function(t,e){var n=ho(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(so=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+ho(t,Math.max(0,e+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function mo(t){return t}var vo,yo,bo,Oo=Array.prototype.map,wo=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function ko(t){var e=t.domain;return t.ticks=function(t){var n=e();return function(t,e,n){var r,i,o,a,s=-1;if(n=+n,(t=+t)==(e=+e)&&n>0)return[t];if((r=e0){var u=Math.round(t/a),c=Math.round(e/a);for(u*ae&&--c,o=new Array(i=c-u+1);++se&&--h,o=new Array(i=h-l+1);++s0;){if((i=Jr(u,c,n))===r)return o[a]=u,o[s]=c,e(o);if(i>0)u=Math.floor(u/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;u=Math.ceil(u*i)/i,c=Math.floor(c*i)/i}r=i}return t},t}function xo(){var t=oo();return t.copy=function(){return io(t,xo())},ao.apply(t,arguments),ko(t)}vo=function(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?mo:(e=Oo.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(t.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?mo:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Oo.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"\u2212":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=co(t)).fill,n=t.align,h=t.sign,f=t.symbol,d=t.zero,p=t.width,g=t.comma,m=t.precision,v=t.trim,y=t.type;"n"===y?(g=!0,y="g"):go[y]||(void 0===m&&(m=12),v=!0,y="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var b="$"===f?i:"#"===f&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",O="$"===f?o:/[%p]/.test(y)?u:"",w=go[y],k=/[defgprs%]/.test(y);function x(t){var i,o,u,f=b,x=O;if("c"===y)x=w(t)+x,t="";else{var _=(t=+t)<0||1/t<0;if(t=isNaN(t)?l:w(Math.abs(t),m),v&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),_&&0==+t&&"+"!==h&&(_=!1),f=(_?"("===h?h:c:"-"===h||"("===h?"":h)+f,x=("s"===y?wo[8+so/3]:"")+x+(_&&"("===h?")":""),k)for(i=-1,o=t.length;++i(u=t.charCodeAt(i))||u>57){x=(46===u?a+t.slice(i+1):t.slice(i))+x,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var S=f.length+t.length+x.length,E=S>1)+f+t+x+E.slice(S);break;default:t=E+f+t+x}return s(t)}return m=void 0===m?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),x.toString=function(){return t+""},x}return{format:h,formatPrefix:function(t,e){var n=h(((t=co(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(fo(e)/3))),i=Math.pow(10,-r),o=wo[8+r/3];return function(t){return n(i*t)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),yo=vo.format,bo=vo.formatPrefix;var _o=function(t){Object(w.a)(n,t);var e=Object(k.a)(n);function n(t){var i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Eo;if(Object(g.a)(this,n),i=e.call(this),Object.defineProperties(Object(y.a)(i),{_intern:{value:new Map},_key:{value:o}}),null!=t){var s,u=Object(a.a)(t);try{for(u.s();!(s=u.n()).done;){var c=Object(r.a)(s.value,2),l=c[0],h=c[1];i.set(l,h)}}catch(f){u.e(f)}finally{u.f()}}return Object(v.a)(i)}return Object(m.a)(n,[{key:"get",value:function(t){return Object(b.a)(Object(O.a)(n.prototype),"get",this).call(this,So(this,t))}},{key:"has",value:function(t){return Object(b.a)(Object(O.a)(n.prototype),"has",this).call(this,So(this,t))}},{key:"set",value:function(t,e){return Object(b.a)(Object(O.a)(n.prototype),"set",this).call(this,function(t,e){var n=t._intern,r=(0,t._key)(e);return n.has(r)?n.get(r):(n.set(r,e),e)}(this,t),e)}},{key:"delete",value:function(t){return Object(b.a)(Object(O.a)(n.prototype),"delete",this).call(this,function(t,e){var n=t._intern,r=(0,t._key)(e);return n.has(r)&&(e=n.get(r),n.delete(r)),e}(this,t))}}]),n}(Object(x.a)(Map));function So(t,e){var n=t._intern,r=(0,t._key)(e);return n.has(r)?n.get(r):e}function Eo(t){return null!==t&&"object"==typeof t?t.valueOf():t}Set;var Co=Symbol("implicit");function To(){var t=new _o,e=[],n=[],r=Co;function i(i){var o=t.get(i);if(void 0===o){if(r!==Co)return r;t.set(i,o=e.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new _o;var r,o=Object(a.a)(n);try{for(o.s();!(r=o.n()).done;){var s=r.value;t.has(s)||t.set(s,e.push(s)-1)}}catch(u){o.e(u)}finally{o.f()}return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return To(e,n).unknown(r)},ao.apply(i,arguments),i}var Ao=1e3,Do=6e4,Mo=36e5,jo=864e5,No=6048e5,Po=31536e6,Ro=new Date,Lo=new Date;function Fo(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e0))return s;do{s.push(a=new Date(+n)),e(n,o),t(n)}while(a=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return Ro.setTime(+e),Lo.setTime(+r),t(Ro),t(Lo),Math.floor(n(Ro,Lo))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var Bo=Fo((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));Bo.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Fo((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):Bo:null};var Io=Bo;Bo.range;var Qo=Fo((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+e*Ao)}),(function(t,e){return(e-t)/Ao}),(function(t){return t.getUTCSeconds()})),$o=Qo;Qo.range;var zo=Fo((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Ao)}),(function(t,e){t.setTime(+t+e*Do)}),(function(t,e){return(e-t)/Do}),(function(t){return t.getMinutes()})),qo=zo;zo.range;var Wo=Fo((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Ao-t.getMinutes()*Do)}),(function(t,e){t.setTime(+t+e*Mo)}),(function(t,e){return(e-t)/Mo}),(function(t){return t.getHours()})),Vo=Wo;Wo.range;var Yo=Fo((function(t){return t.setHours(0,0,0,0)}),(function(t,e){return t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Do)/jo}),(function(t){return t.getDate()-1})),Uo=Yo;function Ho(t){return Fo((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Do)/No}))}Yo.range;var Xo=Ho(0),Go=Ho(1),Zo=Ho(2),Ko=Ho(3),Jo=Ho(4),ta=Ho(5),ea=Ho(6),na=(Xo.range,Go.range,Zo.range,Ko.range,Jo.range,ta.range,ea.range,Fo((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}))),ra=na;na.range;var ia=Fo((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));ia.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Fo((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var oa=ia;ia.range;var aa=Fo((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*Do)}),(function(t,e){return(e-t)/Do}),(function(t){return t.getUTCMinutes()})),sa=aa;aa.range;var ua=Fo((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*Mo)}),(function(t,e){return(e-t)/Mo}),(function(t){return t.getUTCHours()})),ca=ua;ua.range;var la=Fo((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/jo}),(function(t){return t.getUTCDate()-1})),ha=la;function fa(t){return Fo((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/No}))}la.range;var da=fa(0),pa=fa(1),ga=fa(2),ma=fa(3),va=fa(4),ya=fa(5),ba=fa(6),Oa=(da.range,pa.range,ga.range,ma.range,va.range,ya.range,ba.range,Fo((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()}))),wa=Oa;Oa.range;var ka=Fo((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));ka.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Fo((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var xa=ka;function _a(t,e,n,i,o,a){var s=[[$o,1,Ao],[$o,5,5e3],[$o,15,15e3],[$o,30,3e4],[a,1,Do],[a,5,3e5],[a,15,9e5],[a,30,18e5],[o,1,Mo],[o,3,108e5],[o,6,216e5],[o,12,432e5],[i,1,jo],[i,2,1728e5],[n,1,No],[e,1,2592e6],[e,3,7776e6],[t,1,Po]];function u(e,n,i){var o=Math.abs(n-e)/i,a=ni((function(t){return Object(r.a)(t,3)[2]})).right(s,o);if(a===s.length)return t.every(ti(e/Po,n/Po,i));if(0===a)return Io.every(Math.max(ti(e,n,i),1));var u=Object(r.a)(s[o/s[a-1][2]68?1900:2e3),n+r[0].length):-1}function Za(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Ka(t,e,n){var r=Fa.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Ja(t,e,n){var r=Fa.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function ts(t,e,n){var r=Fa.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function es(t,e,n){var r=Fa.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function ns(t,e,n){var r=Fa.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function rs(t,e,n){var r=Fa.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function is(t,e,n){var r=Fa.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function os(t,e,n){var r=Fa.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function as(t,e,n){var r=Fa.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function ss(t,e,n){var r=Ba.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function us(t,e,n){var r=Fa.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function cs(t,e,n){var r=Fa.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function ls(t,e){return Qa(t.getDate(),e,2)}function hs(t,e){return Qa(t.getHours(),e,2)}function fs(t,e){return Qa(t.getHours()%12||12,e,2)}function ds(t,e){return Qa(1+Uo.count(oa(t),t),e,3)}function ps(t,e){return Qa(t.getMilliseconds(),e,3)}function gs(t,e){return ps(t,e)+"000"}function ms(t,e){return Qa(t.getMonth()+1,e,2)}function vs(t,e){return Qa(t.getMinutes(),e,2)}function ys(t,e){return Qa(t.getSeconds(),e,2)}function bs(t){var e=t.getDay();return 0===e?7:e}function Os(t,e){return Qa(Xo.count(oa(t)-1,t),e,2)}function ws(t){var e=t.getDay();return e>=4||0===e?Jo(t):Jo.ceil(t)}function ks(t,e){return t=ws(t),Qa(Jo.count(oa(t),t)+(4===oa(t).getDay()),e,2)}function xs(t){return t.getDay()}function _s(t,e){return Qa(Go.count(oa(t)-1,t),e,2)}function Ss(t,e){return Qa(t.getFullYear()%100,e,2)}function Es(t,e){return Qa((t=ws(t)).getFullYear()%100,e,2)}function Cs(t,e){return Qa(t.getFullYear()%1e4,e,4)}function Ts(t,e){var n=t.getDay();return Qa((t=n>=4||0===n?Jo(t):Jo.ceil(t)).getFullYear()%1e4,e,4)}function As(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Qa(e/60|0,"0",2)+Qa(e%60,"0",2)}function Ds(t,e){return Qa(t.getUTCDate(),e,2)}function Ms(t,e){return Qa(t.getUTCHours(),e,2)}function js(t,e){return Qa(t.getUTCHours()%12||12,e,2)}function Ns(t,e){return Qa(1+ha.count(xa(t),t),e,3)}function Ps(t,e){return Qa(t.getUTCMilliseconds(),e,3)}function Rs(t,e){return Ps(t,e)+"000"}function Ls(t,e){return Qa(t.getUTCMonth()+1,e,2)}function Fs(t,e){return Qa(t.getUTCMinutes(),e,2)}function Bs(t,e){return Qa(t.getUTCSeconds(),e,2)}function Is(t){var e=t.getUTCDay();return 0===e?7:e}function Qs(t,e){return Qa(da.count(xa(t)-1,t),e,2)}function $s(t){var e=t.getUTCDay();return e>=4||0===e?va(t):va.ceil(t)}function zs(t,e){return t=$s(t),Qa(va.count(xa(t),t)+(4===xa(t).getUTCDay()),e,2)}function qs(t){return t.getUTCDay()}function Ws(t,e){return Qa(pa.count(xa(t)-1,t),e,2)}function Vs(t,e){return Qa(t.getUTCFullYear()%100,e,2)}function Ys(t,e){return Qa((t=$s(t)).getUTCFullYear()%100,e,2)}function Us(t,e){return Qa(t.getUTCFullYear()%1e4,e,4)}function Hs(t,e){var n=t.getUTCDay();return Qa((t=n>=4||0===n?va(t):va.ceil(t)).getUTCFullYear()%1e4,e,4)}function Xs(){return"+0000"}function Gs(){return"%"}function Zs(t){return+t}function Ks(t){return Math.floor(+t/1e3)}function Js(t){return new Date(t)}function tu(t){return t instanceof Date?+t:+new Date(+t)}function eu(t,e,n,r,i,o,a,s,u,c){var l=oo(),h=l.invert,f=l.domain,d=c(".%L"),p=c(":%S"),g=c("%I:%M"),m=c("%I %p"),v=c("%a %d"),y=c("%b %d"),b=c("%B"),O=c("%Y");function w(t){return(u(t)=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Zs,s:Ks,S:ys,u:bs,U:Os,V:ks,w:xs,W:_s,x:null,X:null,y:Ss,Y:Cs,Z:As,"%":Gs},O={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Ds,e:Ds,f:Rs,g:Ys,G:Hs,H:Ms,I:js,j:Ns,L:Ps,m:Ls,M:Fs,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Zs,s:Ks,S:Bs,u:Is,U:Qs,V:zs,w:qs,W:Ws,x:null,X:null,y:Vs,Y:Us,Z:Xs,"%":Gs},w={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=v.exec(e.slice(n));return r?(t.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=m.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return _(t,e,n,r)},d:ts,e:ts,f:as,g:Ga,G:Xa,H:ns,I:ns,j:es,L:os,m:Ja,M:rs,p:function(t,e,n){var r=c.exec(e.slice(n));return r?(t.p=l.get(r[0].toLowerCase()),n+r[0].length):-1},q:Ka,Q:us,s:cs,S:is,u:Va,U:Ya,V:Ua,w:Wa,W:Ha,x:function(t,e,r){return _(t,n,e,r)},X:function(t,e,n){return _(t,r,e,n)},y:Ga,Y:Xa,Z:Za,"%":ss};function k(t,e){return function(n){var r,i,o,a=[],s=-1,u=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=ja(Na(o.y,0,1))).getUTCDay(),r=i>4||0===i?pa.ceil(r):pa(r),r=ha.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Ma(Na(o.y,0,1))).getDay(),r=i>4||0===i?Go.ceil(r):Go(r),r=Uo.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?ja(Na(o.y,0,1)).getUTCDay():Ma(Na(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,ja(o)):Ma(o)}}function _(t,e,n,r){for(var i,o,a=0,s=e.length,u=n.length;a=u)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=w[i in La?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=k(n,b),b.X=k(r,b),b.c=k(e,b),O.x=k(n,O),O.X=k(r,O),O.c=k(e,O),{format:function(t){var e=k(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=x(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=k(t+="",O);return e.toString=function(){return t},e},utcParse:function(t){var e=x(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),Ra=Pa.format,Pa.parse,Pa.utcFormat,Pa.utcParse;var cu=Array.prototype.find;function lu(){return this.firstElementChild}var hu=Array.prototype.filter;function fu(){return Array.from(this.children)}function du(t){return new Array(t.length)}function pu(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function gu(t){return function(){return t}}function mu(t,e,n,r,i,o){for(var a,s=0,u=e.length,c=o.length;se?1:t>=e?0:NaN}pu.prototype={constructor:pu,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var wu="http://www.w3.org/1999/xhtml",ku={svg:"http://www.w3.org/2000/svg",xhtml:wu,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function xu(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),ku.hasOwnProperty(e)?{space:ku[e],local:t}:t}function _u(t){return function(){this.removeAttribute(t)}}function Su(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Eu(t,e){return function(){this.setAttribute(t,e)}}function Cu(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Tu(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Au(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Du(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Mu(t){return function(){this.style.removeProperty(t)}}function ju(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Nu(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Pu(t,e){return t.style.getPropertyValue(e)||Du(t).getComputedStyle(t,null).getPropertyValue(e)}function Ru(t){return function(){delete this[t]}}function Lu(t,e){return function(){this[t]=e}}function Fu(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Bu(t){return t.trim().split(/^|\s+/)}function Iu(t){return t.classList||new Qu(t)}function Qu(t){this._node=t,this._names=Bu(t.getAttribute("class")||"")}function $u(t,e){for(var n=Iu(t),r=-1,i=e.length;++r=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function uc(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var dc=[null];function pc(t,e){this._groups=t,this._parents=e}function gc(){return new pc([[document.documentElement]],dc)}pc.prototype=gc.prototype=Object(_.a)({constructor:pc,select:function(t){"function"!=typeof t&&(t=ru(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i=w&&(w=O+1);!(b=m[w])&&++w=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Ou);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o1?this.each((null==e?Mu:"function"==typeof e?Nu:ju)(t,e,null==n?"":n)):Pu(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Ru:"function"==typeof e?Fu:Lu)(t,e)):this.node()[t]},classed:function(t,e){var n=Bu(t+"");if(arguments.length<2){for(var r=Iu(this.node()),i=-1,o=n.length;++iwc)if(Math.abs(l*s-u*c)>wc&&i){var f=n-o,d=r-a,p=s*s+u*u,g=f*f+d*d,m=Math.sqrt(p),v=Math.sqrt(h),y=i*Math.tan((bc-Math.acos((p+h-g)/(2*m*v)))/2),b=y/v,O=y/m;Math.abs(b-1)>wc&&(this._+="L"+(t+b*c)+","+(e+b*l)),this._+="A"+i+","+i+",0,0,"+ +(l*f>c*d)+","+(this._x1=t+O*s)+","+(this._y1=e+O*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,n,r,i,o){t=+t,e=+e,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=t+a,c=e+s,l=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+c:(Math.abs(this._x1-u)>wc||Math.abs(this._y1-c)>wc)&&(this._+="L"+u+","+c),n&&(h<0&&(h=h%Oc+Oc),h>kc?this._+="A"+n+","+n+",0,1,"+l+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=u)+","+(this._y1=c):h>wc&&(this._+="A"+n+","+n+",0,"+ +(h>=bc)+","+l+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var Sc=_c;function Ec(t){return function(){return t}}var Cc=Math.abs,Tc=Math.atan2,Ac=Math.cos,Dc=Math.max,Mc=Math.min,jc=Math.sin,Nc=Math.sqrt,Pc=1e-12,Rc=Math.PI,Lc=Rc/2,Fc=2*Rc;function Bc(t){return t>1?0:t<-1?Rc:Math.acos(t)}function Ic(t){return t>=1?Lc:t<=-1?-Lc:Math.asin(t)}function Qc(t){return t.innerRadius}function $c(t){return t.outerRadius}function zc(t){return t.startAngle}function qc(t){return t.endAngle}function Wc(t){return t&&t.padAngle}function Vc(t,e,n,r,i,o,a,s){var u=n-t,c=r-e,l=a-i,h=s-o,f=h*u-l*c;if(!(f*fD*D+M*M&&(_=E,S=C),{cx:_,cy:S,x01:-l,y01:-h,x11:_*(i/w-1),y11:S*(i/w-1)}}function Uc(){var t=Qc,e=$c,n=Ec(0),r=null,i=zc,o=qc,a=Wc,s=null;function u(){var u,c,l=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-Lc,d=o.apply(this,arguments)-Lc,p=Cc(d-f),g=d>f;if(s||(s=u=Sc()),hPc)if(p>Fc-Pc)s.moveTo(h*Ac(f),h*jc(f)),s.arc(0,0,h,f,d,!g),l>Pc&&(s.moveTo(l*Ac(d),l*jc(d)),s.arc(0,0,l,d,f,g));else{var m,v,y=f,b=d,O=f,w=d,k=p,x=p,_=a.apply(this,arguments)/2,S=_>Pc&&(r?+r.apply(this,arguments):Nc(l*l+h*h)),E=Mc(Cc(h-l)/2,+n.apply(this,arguments)),C=E,T=E;if(S>Pc){var A=Ic(S/l*jc(_)),D=Ic(S/h*jc(_));(k-=2*A)>Pc?(O+=A*=g?1:-1,w-=A):(k=0,O=w=(f+d)/2),(x-=2*D)>Pc?(y+=D*=g?1:-1,b-=D):(x=0,y=b=(f+d)/2)}var M=h*Ac(y),j=h*jc(y),N=l*Ac(w),P=l*jc(w);if(E>Pc){var R,L=h*Ac(b),F=h*jc(b),B=l*Ac(O),I=l*jc(O);if(pPc?T>Pc?(m=Yc(B,I,M,j,h,T,g),v=Yc(L,F,N,P,h,T,g),s.moveTo(m.cx+m.x01,m.cy+m.y01),TPc&&k>Pc?C>Pc?(m=Yc(N,P,L,F,l,-C,g),v=Yc(M,j,B,I,l,-C,g),s.lineTo(m.cx+m.x01,m.cy+m.y01),Ct?1:e>=t?0:NaN}function el(t){return t}function nl(){}function rl(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function il(t){this._context=t}function ol(t){return new il(t)}function al(t){this._context=t}function sl(t){this._context=t}function ul(t){this._context=t}function cl(t){return t<0?-1:1}function ll(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(cl(o)+cl(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function hl(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function fl(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function dl(t){this._context=t}function pl(t){this._context=new gl(t)}function gl(t){this._context=t}function ml(t){this._context=t}function vl(t){var e,n,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[r-1]=(t[r]+i[r-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var bl=new Date,Ol=new Date;function wl(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e0))return s;do{s.push(a=new Date(+n)),e(n,o),t(n)}while(a=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return bl.setTime(+e),Ol.setTime(+r),t(bl),t(Ol),Math.floor(n(bl,Ol))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var kl=864e5,xl=6048e5;function _l(t){return wl((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/xl}))}var Sl=_l(0),El=_l(1),Cl=_l(2),Tl=_l(3),Al=_l(4),Dl=_l(5),Ml=_l(6),jl=(Sl.range,El.range,Cl.range,Tl.range,Al.range,Dl.range,Ml.range,wl((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/kl}),(function(t){return t.getUTCDate()-1}))),Nl=jl;function Pl(t){return wl((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/xl}))}jl.range;var Rl=Pl(0),Ll=Pl(1),Fl=Pl(2),Bl=Pl(3),Il=Pl(4),Ql=Pl(5),$l=Pl(6),zl=(Rl.range,Ll.range,Fl.range,Bl.range,Il.range,Ql.range,$l.range,wl((function(t){return t.setHours(0,0,0,0)}),(function(t,e){return t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/kl}),(function(t){return t.getDate()-1}))),ql=zl;zl.range;var Wl=wl((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));Wl.every=function(t){return isFinite(t=Math.floor(t))&&t>0?wl((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var Vl=Wl;Wl.range;var Yl=wl((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));Yl.every=function(t){return isFinite(t=Math.floor(t))&&t>0?wl((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var Ul=Yl;function Hl(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Xl(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Gl(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}Yl.range;var Zl,Kl,Jl={"-":"",_:" ",0:"0"},th=/^\s*\d+/,eh=/^%/,nh=/[\\^$*+?|[\]().{}]/g;function rh(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o68?1900:2e3),n+r[0].length):-1}function ph(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function gh(t,e,n){var r=th.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function mh(t,e,n){var r=th.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function vh(t,e,n){var r=th.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function yh(t,e,n){var r=th.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function bh(t,e,n){var r=th.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Oh(t,e,n){var r=th.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function wh(t,e,n){var r=th.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function kh(t,e,n){var r=th.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function xh(t,e,n){var r=th.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function _h(t,e,n){var r=eh.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Sh(t,e,n){var r=th.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Eh(t,e,n){var r=th.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Ch(t,e){return rh(t.getDate(),e,2)}function Th(t,e){return rh(t.getHours(),e,2)}function Ah(t,e){return rh(t.getHours()%12||12,e,2)}function Dh(t,e){return rh(1+ql.count(Vl(t),t),e,3)}function Mh(t,e){return rh(t.getMilliseconds(),e,3)}function jh(t,e){return Mh(t,e)+"000"}function Nh(t,e){return rh(t.getMonth()+1,e,2)}function Ph(t,e){return rh(t.getMinutes(),e,2)}function Rh(t,e){return rh(t.getSeconds(),e,2)}function Lh(t){var e=t.getDay();return 0===e?7:e}function Fh(t,e){return rh(Rl.count(Vl(t)-1,t),e,2)}function Bh(t){var e=t.getDay();return e>=4||0===e?Il(t):Il.ceil(t)}function Ih(t,e){return t=Bh(t),rh(Il.count(Vl(t),t)+(4===Vl(t).getDay()),e,2)}function Qh(t){return t.getDay()}function $h(t,e){return rh(Ll.count(Vl(t)-1,t),e,2)}function zh(t,e){return rh(t.getFullYear()%100,e,2)}function qh(t,e){return rh((t=Bh(t)).getFullYear()%100,e,2)}function Wh(t,e){return rh(t.getFullYear()%1e4,e,4)}function Vh(t,e){var n=t.getDay();return rh((t=n>=4||0===n?Il(t):Il.ceil(t)).getFullYear()%1e4,e,4)}function Yh(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+rh(e/60|0,"0",2)+rh(e%60,"0",2)}function Uh(t,e){return rh(t.getUTCDate(),e,2)}function Hh(t,e){return rh(t.getUTCHours(),e,2)}function Xh(t,e){return rh(t.getUTCHours()%12||12,e,2)}function Gh(t,e){return rh(1+Nl.count(Ul(t),t),e,3)}function Zh(t,e){return rh(t.getUTCMilliseconds(),e,3)}function Kh(t,e){return Zh(t,e)+"000"}function Jh(t,e){return rh(t.getUTCMonth()+1,e,2)}function tf(t,e){return rh(t.getUTCMinutes(),e,2)}function ef(t,e){return rh(t.getUTCSeconds(),e,2)}function nf(t){var e=t.getUTCDay();return 0===e?7:e}function rf(t,e){return rh(Sl.count(Ul(t)-1,t),e,2)}function of(t){var e=t.getUTCDay();return e>=4||0===e?Al(t):Al.ceil(t)}function af(t,e){return t=of(t),rh(Al.count(Ul(t),t)+(4===Ul(t).getUTCDay()),e,2)}function sf(t){return t.getUTCDay()}function uf(t,e){return rh(El.count(Ul(t)-1,t),e,2)}function cf(t,e){return rh(t.getUTCFullYear()%100,e,2)}function lf(t,e){return rh((t=of(t)).getUTCFullYear()%100,e,2)}function hf(t,e){return rh(t.getUTCFullYear()%1e4,e,4)}function ff(t,e){var n=t.getUTCDay();return rh((t=n>=4||0===n?Al(t):Al.ceil(t)).getUTCFullYear()%1e4,e,4)}function df(){return"+0000"}function pf(){return"%"}function gf(t){return+t}function mf(t){return Math.floor(+t/1e3)}Zl=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,u=t.shortMonths,c=oh(i),l=ah(i),h=oh(o),f=ah(o),d=oh(a),p=ah(a),g=oh(s),m=ah(s),v=oh(u),y=ah(u),b={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Ch,e:Ch,f:jh,g:qh,G:Vh,H:Th,I:Ah,j:Dh,L:Mh,m:Nh,M:Ph,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:gf,s:mf,S:Rh,u:Lh,U:Fh,V:Ih,w:Qh,W:$h,x:null,X:null,y:zh,Y:Wh,Z:Yh,"%":pf},O={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Uh,e:Uh,f:Kh,g:lf,G:ff,H:Hh,I:Xh,j:Gh,L:Zh,m:Jh,M:tf,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:gf,s:mf,S:ef,u:nf,U:rf,V:af,w:sf,W:uf,x:null,X:null,y:cf,Y:hf,Z:df,"%":pf},w={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=v.exec(e.slice(n));return r?(t.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=m.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return _(t,e,n,r)},d:vh,e:vh,f:xh,g:dh,G:fh,H:bh,I:bh,j:yh,L:kh,m:mh,M:Oh,p:function(t,e,n){var r=c.exec(e.slice(n));return r?(t.p=l.get(r[0].toLowerCase()),n+r[0].length):-1},q:gh,Q:Sh,s:Eh,S:wh,u:uh,U:ch,V:lh,w:sh,W:hh,x:function(t,e,r){return _(t,n,e,r)},X:function(t,e,n){return _(t,r,e,n)},y:dh,Y:fh,Z:ph,"%":_h};function k(t,e){return function(n){var r,i,o,a=[],s=-1,u=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Xl(Gl(o.y,0,1))).getUTCDay(),r=i>4||0===i?El.ceil(r):El(r),r=Nl.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Hl(Gl(o.y,0,1))).getDay(),r=i>4||0===i?Ll.ceil(r):Ll(r),r=ql.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Xl(Gl(o.y,0,1)).getUTCDay():Hl(Gl(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Xl(o)):Hl(o)}}function _(t,e,n,r){for(var i,o,a=0,s=e.length,u=n.length;a=u)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=w[i in Jl?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=k(n,b),b.X=k(r,b),b.c=k(e,b),O.x=k(n,O),O.X=k(r,O),O.c=k(e,O),{format:function(t){var e=k(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=x(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=k(t+="",O);return e.toString=function(){return t},e},utcParse:function(t){var e=x(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),Kl=Zl.format,Zl.parse,Zl.utcFormat,Zl.utcParse;var vf={value:function(){}};function yf(){for(var t,e=0,n=arguments.length,r={};e=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function wf(t,e){for(var n,r=0,i=t.length;r0)for(var n,r,i=new Array(n),o=0;o=0&&e._call.call(void 0,t),e=e._next;--Ef}()}finally{Ef=0,function(){for(var t,e,n=xf,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:xf=e);_f=t,Qf(r)}(),Df=0}}function If(){var t=jf.now(),e=t-Af;e>1e3&&(Mf-=e,Af=t)}function Qf(t){Ef||(Cf&&(Cf=clearTimeout(Cf)),t-Df>24?(t<1/0&&(Cf=setTimeout(Bf,t-jf.now()-Mf)),Tf&&(Tf=clearInterval(Tf))):(Tf||(Af=jf.now(),Tf=setInterval(If,1e3)),Ef=1,Nf(Bf)))}function $f(t,e,n){var r=new Lf;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Lf.prototype=Ff.prototype={constructor:Lf,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Pf():+n)+(null==e?0:+e),this._next||_f===this||(_f?_f._next=this:xf=this,_f=this),this._call=t,this._time=n,Qf()},stop:function(){this._call&&(this._call=null,this._time=1/0,Qf())}};var zf=Sf("start","end","cancel","interrupt"),qf=[];function Wf(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(u){var c,l,h,f;if(1!==n.state)return s();for(c in i)if((f=i[c]).name===n.name){if(3===f.state)return $f(o);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[c]):+c0)throw new Error("too late; already scheduled");return n}function Yf(t,e){var n=Uf(t,e);if(n.state>3)throw new Error("too late; already running");return n}function Uf(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Hf(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var Xf,Gf=180/Math.PI,Zf={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Kf(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Hf(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,s,u),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Hf(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,s,u),function(t,e,n,r,o,a){if(t!==n||e!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:Hf(t,n)},{i:s-2,x:Hf(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,u),o=a=null,function(t){for(var e,n=-1,r=u.length;++n=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=ro&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:Hf(n,r)})),o=cd.lastIndex;return o=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?Vf:Yf;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}var Td=mc.prototype.constructor;function Ad(t){return function(){this.style.removeProperty(t)}}function Dd(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Md(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&Dd(t,o,n)),r}return o._value=e,o}function jd(t){return function(e){this.textContent=t.call(this,e)}}function Nd(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&jd(r)),e}return r._value=t,r}var Pd=0;function Rd(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Ld(){return++Pd}var Fd=mc.prototype;Rd.prototype=function(t){return mc().transition(t)}.prototype=Object(_.a)({constructor:Rd,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=ru(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}}(this,t)}))},mc.prototype.transition=function(t){var e,n;t instanceof Rd?(e=t._id,t=t._name):(e=Ld(),(n=Bd).time=Pf(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;oe?1:t>=e?0:NaN}Kd.prototype={constructor:Kd,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var op="http://www.w3.org/1999/xhtml",ap={svg:"http://www.w3.org/2000/svg",xhtml:op,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function sp(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),ap.hasOwnProperty(e)?{space:ap[e],local:t}:t}function up(t){return function(){this.removeAttribute(t)}}function cp(t){return function(){this.removeAttributeNS(t.space,t.local)}}function lp(t,e){return function(){this.setAttribute(t,e)}}function hp(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function fp(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function dp(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function pp(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function gp(t){return function(){this.style.removeProperty(t)}}function mp(t,e,n){return function(){this.style.setProperty(t,e,n)}}function vp(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function yp(t,e){return t.style.getPropertyValue(e)||pp(t).getComputedStyle(t,null).getPropertyValue(e)}function bp(t){return function(){delete this[t]}}function Op(t,e){return function(){this[t]=e}}function wp(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function kp(t){return t.trim().split(/^|\s+/)}function xp(t){return t.classList||new _p(t)}function _p(t){this._node=t,this._names=kp(t.getAttribute("class")||"")}function Sp(t,e){for(var n=xp(t),r=-1,i=e.length;++r=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function Yp(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Zp=[null];function Kp(t,e){this._groups=t,this._parents=e}function Jp(){return new Kp([[document.documentElement]],Zp)}Kp.prototype=Jp.prototype=Object(_.a)({constructor:Kp,select:function(t){"function"!=typeof t&&(t=$d(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i=w&&(w=O+1);!(b=m[w])&&++w=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=ip);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o1?this.each((null==e?gp:"function"==typeof e?vp:mp)(t,e,null==n?"":n)):yp(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?bp:"function"==typeof e?wp:Op)(t,e)):this.node()[t]},classed:function(t,e){var n=kp(t+"");if(arguments.length<2){for(var r=xp(this.node()),i=-1,o=n.length;++i=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function og(t,e){for(var n,r=0,i=t.length;r0)for(var n,r,i=new Array(n),o=0;o=0&&e._call.call(void 0,t),e=e._next;--lg}()}finally{lg=0,function(){for(var t,e,n=sg,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:sg=e);ug=t,_g(r)}(),pg=0}}function xg(){var t=mg.now(),e=t-dg;e>1e3&&(gg-=e,dg=t)}function _g(t){lg||(hg&&(hg=clearTimeout(hg)),t-pg>24?(t<1/0&&(hg=setTimeout(kg,t-mg.now()-gg)),fg&&(fg=clearInterval(fg))):(fg||(dg=mg.now(),fg=setInterval(xg,1e3)),lg=1,vg(kg)))}function Sg(t,e,n){var r=new Og;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Og.prototype=wg.prototype={constructor:Og,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?yg():+n)+(null==e?0:+e),this._next||ug===this||(ug?ug._next=this:sg=this,ug=this),this._call=t,this._time=n,_g()},stop:function(){this._call&&(this._call=null,this._time=1/0,_g())}};var Eg=cg("start","end","cancel","interrupt"),Cg=[];function Tg(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(u){var c,l,h,f;if(1!==n.state)return s();for(c in i)if((f=i[c]).name===n.name){if(3===f.state)return Sg(o);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[c]):+c0)throw new Error("too late; already scheduled");return n}function Dg(t,e){var n=Mg(t,e);if(n.state>3)throw new Error("too late; already running");return n}function Mg(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function jg(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var Ng,Pg=180/Math.PI,Rg={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Lg(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:jg(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,s,u),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:jg(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,s,u),function(t,e,n,r,o,a){if(t!==n||e!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:jg(t,n)},{i:s-2,x:jg(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,u),o=a=null,function(t){for(var e,n=-1,r=u.length;++n>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?cm(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?cm(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Kg.exec(t))?new fm(e[1],e[2],e[3],1):(e=Jg.exec(t))?new fm(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=tm.exec(t))?cm(e[1],e[2],e[3],e[4]):(e=em.exec(t))?cm(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=nm.exec(t))?mm(e[1],e[2]/100,e[3]/100,1):(e=rm.exec(t))?mm(e[1],e[2]/100,e[3]/100,e[4]):im.hasOwnProperty(t)?um(im[t]):"transparent"===t?new fm(NaN,NaN,NaN,0):null}function um(t){return new fm(t>>16&255,t>>8&255,255&t,1)}function cm(t,e,n,r){return r<=0&&(t=e=n=NaN),new fm(t,e,n,r)}function lm(t){return t instanceof Vg||(t=sm(t)),t?new fm((t=t.rgb()).r,t.g,t.b,t.opacity):new fm}function hm(t,e,n,r){return 1===arguments.length?lm(t):new fm(t,e,n,null==r?1:r)}function fm(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function dm(){return"#"+gm(this.r)+gm(this.g)+gm(this.b)}function pm(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function gm(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function mm(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ym(t,e,n,r)}function vm(t){if(t instanceof ym)return new ym(t.h,t.s,t.l,t.opacity);if(t instanceof Vg||(t=sm(t)),!t)return new ym;if(t instanceof ym)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n0&&u<1?0:a,new ym(a,s,u,t.opacity)}function ym(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function bm(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Om(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}qg(Vg,sm,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:om,formatHex:om,formatHsl:function(){return vm(this).formatHsl()},formatRgb:am,toString:am}),qg(fm,hm,Wg(Vg,{brighter:function(t){return t=null==t?Ug:Math.pow(Ug,t),new fm(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Yg:Math.pow(Yg,t),new fm(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:dm,formatHex:dm,formatRgb:pm,toString:pm})),qg(ym,(function(t,e,n,r){return 1===arguments.length?vm(t):new ym(t,e,n,null==r?1:r)}),Wg(Vg,{brighter:function(t){return t=null==t?Ug:Math.pow(Ug,t),new ym(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Yg:Math.pow(Yg,t),new ym(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new fm(bm(t>=240?t-240:t+120,i,r),bm(t,i,r),bm(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var wm=function(t){return function(){return t}};function km(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):wm(isNaN(t)?e:t)}var xm=function t(e){var n=function(t){return 1==(t=+t)?km:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):wm(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=hm(t)).r,(e=hm(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=km(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function _m(t){return function(e){var n,r,i=e.length,o=new Array(i),a=new Array(i),s=new Array(i);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=ro&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:jg(n,r)})),o=Em.lastIndex;return o=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?Ag:Dg;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}var Vm=tg.prototype.constructor;function Ym(t){return function(){this.style.removeProperty(t)}}function Um(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Hm(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&Um(t,o,n)),r}return o._value=e,o}function Xm(t){return function(e){this.textContent=t.call(this,e)}}function Gm(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Xm(r)),e}return r._value=t,r}var Zm=0;function Km(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Jm(){return++Zm}var tv=tg.prototype;Km.prototype=function(t){return tg().transition(t)}.prototype=Object(_.a)({constructor:Km,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=$d(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}}(this,t)}))},tg.prototype.transition=function(t){var e,n;t instanceof Km?(e=t._id,t=t._name):(e=Jm(),(n=ev).time=yg(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o2||Dv(xv)>3?"":" "}function Nv(t,e){for(;--e&&Ev()&&!(xv<48||xv>102||xv>57&&xv<65||xv>70&&xv<97););return Av(t,Tv()+(e<6&&32==Cv()&&32==Ev()))}function Pv(t){for(;Ev();)switch(xv){case t:return kv;case 34:case 39:34!==t&&39!==t&&Pv(xv);break;case 40:41===t&&Pv(t);break;case 92:Ev()}return kv}function Rv(t,e){for(;Ev()&&t+xv!==57&&(t+xv!==84||47!==Cv()););return"/*"+Av(e,kv-1)+"*"+uv(47===t?t:Ev())}function Lv(t){for(;!Dv(Cv());)Ev();return Av(t,kv)}function Fv(t){return function(t){return _v="",t}(Bv("",null,null,null,[""],t=function(t){return bv=Ov=1,wv=pv(_v=t),kv=0,[]}(t),0,[0],t))}function Bv(t,e,n,r,i,o,a,s,u){for(var c=0,l=0,h=a,f=0,d=0,p=0,g=1,m=1,v=1,y=0,b="",O=i,w=o,k=r,x=b;m;)switch(p=y,y=Ev()){case 40:if(108!=p&&58==x.charCodeAt(h-1)){-1!=hv(x+=lv(Mv(y),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:x+=Mv(y);break;case 9:case 10:case 13:case 32:x+=jv(p);break;case 92:x+=Nv(Tv()-1,7);continue;case 47:switch(Cv()){case 42:case 47:mv(Qv(Rv(Ev(),Tv()),e,n),u);break;default:x+="/"}break;case 123*g:s[c++]=pv(x)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+l:d>0&&pv(x)-h&&mv(d>32?$v(x+";",r,n,h-1):$v(lv(x," ","")+";",r,n,h-2),u);break;case 59:x+=";";default:if(mv(k=Iv(x,e,n,c,l,i,s,b,O=[],w=[],h),o),123===y)if(0===l)Bv(x,e,k,k,O,o,h,s,w);else switch(f){case 100:case 109:case 115:Bv(t,k,k,r&&mv(Iv(t,k,k,0,0,i,s,b,i,O=[],h),w),i,w,h,s,r?O:w);break;default:Bv(x,k,k,k,[""],w,0,s,w)}}c=l=d=0,g=v=1,b=x="",h=a;break;case 58:h=1+pv(x),d=p;default:if(g<1)if(123==y)--g;else if(125==y&&0==g++&&125==(xv=kv>0?fv(_v,--kv):0,Ov--,10===xv&&(Ov=1,bv--),xv))continue;switch(x+=uv(y),y*g){case 38:v=l>0?1:(x+="\f",-1);break;case 44:s[c++]=(pv(x)-1)*v,v=1;break;case 64:45===Cv()&&(x+=Mv(Ev())),f=Cv(),l=h=pv(b=x+=Lv(Tv())),y++;break;case 45:45===p&&2==pv(x)&&(g=0)}}return o}function Iv(t,e,n,r,i,o,a,s,u,c,l){for(var h=i-1,f=0===i?o:[""],d=gv(f),p=0,g=0,m=0;p0?f[v]+" "+y:lv(y,/&\f/g,f[v])))&&(u[m++]=b);return Sv(t,e,n,0===i?ov:s,u,c,l)}function Qv(t,e,n){return Sv(t,e,n,iv,uv(xv),dv(t,2,-2),0)}function $v(t,e,n,r){return Sv(t,e,n,av,dv(t,0,r),dv(t,r+1,-1),r)}var zv=n(9609),qv=n(7856),Wv=n.n(qv),Vv=function(t){var e=t.replace(/\\u[\dA-F]{4}/gi,(function(t){return String.fromCharCode(parseInt(t.replace(/\\u/g,""),16))}));return console.log(e),(e=(e=e.replace(/\\x([0-9a-f]{2})/gi,(function(t,e){return String.fromCharCode(parseInt(e,16))}))).replace(/\\[\d\d\d]{3}/gi,(function(t){return String.fromCharCode(parseInt(t.replace(/\\/g,""),8))}))).replace(/\\[\d\d\d]{2}/gi,(function(t){return String.fromCharCode(parseInt(t.replace(/\\/g,""),8))}))},Yv=function(t){for(var e="",n=0;n>=0;){if(!((n=t.indexOf("=0)){e+=t,n=-1;break}e+=t.substr(0,n),(n=(t=t.substr(n+1)).indexOf("<\/script>"))>=0&&(n+=9,t=t.substr(n))}var r=Vv(e);return(r=(r=(r=r.replace(/script>/gi,"#")).replace(/javascript:/gi,"#")).replace(/onerror=/gi,"onerror:")).replace(/