From c1899a322ffea11d7c8aa3d3dc784e20e3a42a30 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 13 Nov 2023 21:55:25 +0100 Subject: [PATCH] Fix conditional rendering. --- .../Squidex/wwwroot/editor/squidex-editor.css | 2 +- .../Squidex/wwwroot/editor/squidex-editor.js | 1710 ++++++++++++++--- .../event-consumers-page.component.html | 4 +- .../pages/restore/restore-page.component.html | 4 +- .../pages/users/users-page.component.html | 4 +- .../assets/pages/assets-page.component.html | 4 +- .../pages/content/content-page.component.html | 4 +- .../contents/contents-page.component.html | 4 +- .../rules/pages/rule/rule-page.component.html | 4 +- .../pages/rules/rules-page.component.html | 4 +- .../pages/schema/schema-page.component.html | 4 +- .../asset-scripts-page.component.html | 4 +- .../pages/backups/backups-page.component.html | 4 +- .../pages/clients/clients-page.component.html | 4 +- .../contributors-page.component.html | 4 +- .../languages/languages-page.component.html | 4 +- .../pages/more/more-page.component.html | 4 +- .../pages/plans/plans-page.component.html | 4 +- .../pages/roles/roles-page.component.html | 4 +- .../settings/settings-page.component.html | 4 +- .../templates/templates-page.component.html | 4 +- .../workflows/workflows-page.component.html | 4 +- .../contributors-page.component.html | 4 +- .../teams/pages/more/more-page.component.html | 4 +- .../pages/plans/plans-page.component.html | 4 +- .../framework/angular/layout.component.html | 6 +- .../app/framework/angular/layout.component.ts | 6 +- .../framework/angular/template.directive.ts | 21 + frontend/src/app/framework/declarations.ts | 7 +- frontend/src/app/framework/module.ts | 6 +- .../shared/components/tour-hint.directive.ts | 4 + 31 files changed, 1496 insertions(+), 358 deletions(-) create mode 100644 frontend/src/app/framework/angular/template.directive.ts diff --git a/backend/src/Squidex/wwwroot/editor/squidex-editor.css b/backend/src/Squidex/wwwroot/editor/squidex-editor.css index 0f8e29189..eaad49e60 100644 --- a/backend/src/Squidex/wwwroot/editor/squidex-editor.css +++ b/backend/src/Squidex/wwwroot/editor/squidex-editor.css @@ -1 +1 @@ -.remirror-theme{width:100%}.remirror-theme{position:relative}.remirror-theme *{box-sizing:border-box}.remirror-theme .ProseMirror p{margin-bottom:1rem!important}.remirror-editor{min-height:300px!important;max-height:500px}.MuiStack-root>.MuiBox-root{margin-right:5px}.MuiBox-root>.MuiButtonBase-root{border-color:#dedfe3!important;border-radius:0}.MuiBox-root>.MuiButtonBase-root{border-left-width:0!important}.MuiBox-root>.MuiBox-root:first-child>.MuiButtonBase-root{border-left-width:1px!important}.MuiStack-root>.MuiBox-root>.MuiButtonBase-root:first-child{border-left-width:1px!important}.MuiButtonBase-root.Mui-selected:hover{background-color:#3284f4!important}.remirror-editor-wrapper{padding-top:0!important}.custom-icon path{fill:#0000008a}.remirror-theme div.ProseMirror{border:1px solid #dedfe3!important;border-radius:0!important;box-shadow:none!important}.MuiTooltip-popper>div{background-color:#1a2129;border-radius:0;font-size:85%;font-weight:400;padding:.5rem}.MuiMenu-paper{transform:none!important}.squidex-editor-disabled{pointer-events:none}.squidex-editor-menu{border:1px solid #dedfe3;border-bottom:0;padding:5px}.squidex-editor-counter{border:1px solid #dedfe3;border-top:0;font-size:85%;font-weight:400;opacity:.8;padding:4px 10px 4px 4px;text-align:right}.squidex-editor-image-view{border:1px solid #dedfe3;border-radius:0;display:inline-block;margin-top:15px;margin-bottom:15px;overflow:hidden}.squidex-editor-image-buttons{bottom:10px;left:10px;position:absolute}.squidex-editor-image-element{display:block;max-width:400px;max-height:400px}.squidex-editor-image-info{left:10px;top:10px;position:absolute;background-color:#3284f4;color:#fff;font-size:85%;font-weight:400;padding:2px 6px}.squidex-editor-content-link{align-items:center;border-radius:2px;border:1px solid #dedfe3;padding:10px;display:flex;flex-direction:row;flex-wrap:nowrap;margin-top:10px;margin-bottom:10px}.squidex-editor-content-schema{display:block;overflow-x:hidden;overflow-y:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;min-width:0;width:auto;border-right:1px solid #c2c4cc;color:#8b8f9d;flex-shrink:0;padding-left:10px;padding-right:10px;width:200px}.squidex-editor-content-name{display:block;overflow-x:hidden;overflow-y:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;min-width:0;width:auto;padding-left:10px;padding-right:0}.squidex-editor-html{margin-bottom:10px;margin-top:10px;position:relative}.squidex-editor-html-label{left:6px;top:0;position:absolute;color:#8b8f9d;font-size:85%;font-weight:400}.squidex-editor-html textarea{font-family:monospace;padding:30px 20px 20px}.squidex-editor-button{align-items:center;background-color:#fff;border-radius:0;border:1px solid #dedfe3;bottom:10px;display:inline-flex;font-size:85%;font-weight:400;margin-right:5px;padding:6px 12px}.squidex-editor-button:hover{background-color:#f5f5f5}.squidex-editor-input{border:1px solid #dedfe3;border-radius:0;box-sizing:border-box;height:30px;margin-left:0;margin-right:5px;outline:none;padding:6px 12px}.squidex-editor-input:active{border-color:#3284f4}.squidex-editor-floating{border:1px solid #dedfe3}.squidex-editor-floating .MuiBox-root{margin-right:0!important}.squidex-editor-floating .MuiButtonBase-root{height:30px}.squidex-editor-modal-wrapper,.squidex-editor-modal-backdrop{bottom:0;left:0;right:0;top:0;position:absolute}.squidex-editor-modal-backdrop{background-color:#00000003}.squidex-editor-modal-window{left:50%;top:50%;background-color:#fff;border:0;border-radius:.25rem;box-sizing:border-box;box-shadow:0 3px 16px #0003;margin-top:-50px;margin-left:-150px;position:absolute;width:350px}.squidex-editor-modal-body{display:flex;flex-direction:row;flex-grow:1;padding-top:0!important}.squidex-editor-modal-body,.squidex-editor-modal-title{padding:15px}.squidex-editor-modal-title{font-size:85%}.squidex-editor-modal-window input{flex-grow:1}.b:before{content:"";font-family:monospace;font-size:90%}.b:after{content:"";font-family:monospace;font-size:90%} +.remirror-theme{width:100%}.remirror-theme{position:relative}.remirror-theme *{box-sizing:border-box}.remirror-theme .ProseMirror p{margin-bottom:1rem!important}.remirror-editor{min-height:300px!important;max-height:500px}.MuiStack-root>.MuiBox-root{margin-right:5px}.MuiBox-root>.MuiButtonBase-root{border-color:#dedfe3!important;border-radius:0}.MuiBox-root>.MuiButtonBase-root{border-left-width:0!important}.MuiBox-root>.MuiBox-root:first-child>.MuiButtonBase-root{border-left-width:1px!important}.MuiStack-root>.MuiBox-root>.MuiButtonBase-root:first-child{border-left-width:1px!important}.MuiButtonBase-root.Mui-selected:hover{background-color:#3284f4!important}.remirror-editor-wrapper{padding-top:0!important}.custom-icon path{fill:#0000008a}.remirror-theme div.ProseMirror{border:1px solid #dedfe3!important;border-radius:0!important;box-shadow:none!important}.MuiTooltip-popper>div{background-color:#1a2129;border-radius:0;font-size:85%;font-weight:400;padding:.5rem}.MuiMenu-paper{transform:none!important}.squidex-editor-disabled{pointer-events:none}.squidex-editor-menu{border:1px solid #dedfe3;border-bottom:0;padding:5px}.squidex-editor-menu fieldset{border-radius:0;border:0;display:flex;outline:0;padding:0;pointer-events:none}.squidex-editor-menu fieldset:disabled{opacity:.5}.squidex-editor-counter{border:1px solid #dedfe3;border-top:0;font-size:85%;font-weight:400;opacity:.8;padding:4px 10px 4px 4px;text-align:right}.squidex-editor-image-view{border:1px solid #dedfe3;border-radius:0;display:inline-block;margin-top:15px;margin-bottom:15px;overflow:hidden}.squidex-editor-image-buttons{bottom:10px;left:10px;position:absolute}.squidex-editor-image-element{display:block;max-width:400px;max-height:400px}.squidex-editor-image-info{left:10px;top:10px;position:absolute;background-color:#3284f4;color:#fff;font-size:85%;font-weight:400;padding:2px 6px}.squidex-editor-main{position:relative}.squidex-editor-main .ace_editor{bottom:0;left:0;right:0;top:0;position:absolute;border:1px solid #dedfe3}.squidex-editor-content-link{align-items:center;border-radius:2px;border:1px solid #dedfe3;padding:10px;display:flex;flex-direction:row;flex-wrap:nowrap;margin-top:10px;margin-bottom:10px}.squidex-editor-content-schema{display:block;overflow-x:hidden;overflow-y:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;min-width:0;width:auto;border-right:1px solid #c2c4cc;color:#8b8f9d;flex-shrink:0;padding-left:10px;padding-right:10px;width:200px}.squidex-editor-content-name{display:block;overflow-x:hidden;overflow-y:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;min-width:0;width:auto;padding-left:10px;padding-right:0}.squidex-editor-html{margin-bottom:10px;margin-top:10px;position:relative}.squidex-editor-html-label{left:6px;top:0;position:absolute;color:#8b8f9d;font-size:85%;font-weight:400}.squidex-editor-html textarea{font-family:monospace;padding:30px 20px 20px}.squidex-editor-button{align-items:center;background-color:#fff;border-radius:0;border:1px solid #dedfe3;bottom:10px;display:inline-flex;font-size:85%;font-weight:400;margin-right:5px;padding:6px 12px}.squidex-editor-button:hover{background-color:#f5f5f5}.squidex-editor-input{border:1px solid #dedfe3;border-radius:0;box-sizing:border-box;height:30px;margin-left:0;margin-right:5px;outline:none;padding:6px 12px}.squidex-editor-input:active{border-color:#3284f4}.squidex-editor-floating{border:1px solid #dedfe3}.squidex-editor-floating .MuiBox-root{margin-right:0!important}.squidex-editor-floating .MuiButtonBase-root{height:30px}.squidex-editor-modal-wrapper,.squidex-editor-modal-backdrop{bottom:0;left:0;right:0;top:0;position:absolute}.squidex-editor-modal-backdrop{background-color:#00000003}.squidex-editor-modal-window{left:50%;top:50%;background-color:#fff;border:0;border-radius:.25rem;box-sizing:border-box;box-shadow:0 3px 16px #0003;margin-top:-50px;margin-left:-150px;position:absolute;width:350px}.squidex-editor-modal-body{display:flex;flex-direction:row;flex-grow:1;padding-top:0!important}.squidex-editor-modal-body,.squidex-editor-modal-title{padding:15px}.squidex-editor-modal-title{font-size:85%}.squidex-editor-modal-window input{flex-grow:1}.b:before{content:"";font-family:monospace;font-size:90%}.b:after{content:"";font-family:monospace;font-size:90%} diff --git a/backend/src/Squidex/wwwroot/editor/squidex-editor.js b/backend/src/Squidex/wwwroot/editor/squidex-editor.js index 6e983cf48..65509ef9a 100644 --- a/backend/src/Squidex/wwwroot/editor/squidex-editor.js +++ b/backend/src/Squidex/wwwroot/editor/squidex-editor.js @@ -1,4 +1,4 @@ -var $M=Object.defineProperty;var BM=(e,t,r)=>t in e?$M(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Fe=(e,t,r)=>(BM(e,typeof t!="symbol"?t+"":t,r),r),HM=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var xg=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)};var pp=(e,t,r)=>(HM(e,t,"access private method"),r);function FM(e,t){for(var r=0;rn[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(o){if(o.ep)return;o.ep=!0;const i=r(o);fetch(o.href,i)}})();var Zo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function po(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nC={exports:{}},Gh={},oC={exports:{}},we={};/** +var r4=Object.defineProperty;var o4=(t,e,n)=>e in t?r4(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var ct=(t,e,n)=>(o4(t,typeof e!="symbol"?e+"":e,n),n),i4=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var Uv=(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)};var xf=(t,e,n)=>(i4(t,e,"access private method"),n);function s4(t,e){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var ut=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function jo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var H_={exports:{}},nm={},U_={exports:{}},Ve={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var $M=Object.defineProperty;var BM=(e,t,r)=>t in e?$M(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var zd=Symbol.for("react.element"),UM=Symbol.for("react.portal"),VM=Symbol.for("react.fragment"),jM=Symbol.for("react.strict_mode"),GM=Symbol.for("react.profiler"),WM=Symbol.for("react.provider"),KM=Symbol.for("react.context"),YM=Symbol.for("react.forward_ref"),qM=Symbol.for("react.suspense"),XM=Symbol.for("react.memo"),ZM=Symbol.for("react.lazy"),bx=Symbol.iterator;function JM(e){return e===null||typeof e!="object"?null:(e=bx&&e[bx]||e["@@iterator"],typeof e=="function"?e:null)}var iC={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},sC=Object.assign,aC={};function lc(e,t,r){this.props=e,this.context=t,this.refs=aC,this.updater=r||iC}lc.prototype.isReactComponent={};lc.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};lc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function lC(){}lC.prototype=lc.prototype;function Ly(e,t,r){this.props=e,this.context=t,this.refs=aC,this.updater=r||iC}var Dy=Ly.prototype=new lC;Dy.constructor=Ly;sC(Dy,lc.prototype);Dy.isPureReactComponent=!0;var Ex=Array.isArray,cC=Object.prototype.hasOwnProperty,Py={current:null},uC={key:!0,ref:!0,__self:!0,__source:!0};function dC(e,t,r){var n,o={},i=null,s=null;if(t!=null)for(n in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)cC.call(t,n)&&!uC.hasOwnProperty(n)&&(o[n]=t[n]);var a=arguments.length-2;if(a===1)o.children=r;else if(1t in e?$M(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var n4=S,o4=Symbol.for("react.element"),i4=Symbol.for("react.fragment"),s4=Object.prototype.hasOwnProperty,a4=n4.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l4={key:!0,ref:!0,__self:!0,__source:!0};function pC(e,t,r){var n,o={},i=null,s=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(n in t)s4.call(t,n)&&!l4.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:o4,type:e,key:i,ref:s,props:o,_owner:a4.current}}Gh.Fragment=i4;Gh.jsx=pC;Gh.jsxs=pC;nC.exports=Gh;var A=nC.exports,H1={exports:{}};(function(e,t){var r=typeof Reflect<"u"?Reflect.construct:void 0,n=Object.defineProperty,o=Error.captureStackTrace;o===void 0&&(o=function(c){var u=new Error;n(c,"stack",{configurable:!0,get:function(){var p=u.stack;return n(this,"stack",{configurable:!0,value:p,writable:!0}),p},set:function(p){n(c,"stack",{configurable:!0,value:p,writable:!0})}})});function i(l){l!==void 0&&n(this,"message",{configurable:!0,value:l,writable:!0});var c=this.constructor.name;c!==void 0&&c!==this.name&&n(this,"name",{configurable:!0,value:c,writable:!0}),o(this,this.constructor)}i.prototype=Object.create(Error.prototype,{constructor:{configurable:!0,value:i,writable:!0}});var s=function(){function l(u,d){return n(u,"name",{configurable:!0,value:d})}try{var c=function(){};if(l(c,"foo"),c.name==="foo")return l}catch{}}();function a(l,c){if(c==null||c===Error)c=i;else if(typeof c!="function")throw new TypeError("super_ should be a function");var u;if(typeof l=="string")u=l,l=r!==void 0?function(){return r(c,arguments,this.constructor)}:function(){c.apply(this,arguments)},s!==void 0&&(s(l,u),u=void 0);else if(typeof l!="function")throw new TypeError("constructor should be either a string or a function");l.super_=l.super=c;var d={constructor:{configurable:!0,value:l,writable:!0}};return u!==void 0&&(d.name={configurable:!0,value:u,writable:!0}),l.prototype=Object.create(c.prototype,d),l}t=e.exports=a,t.BaseError=i})(H1,H1.exports);var fC=H1.exports,xx="ProseMirror-selectednode",$y="",$i="\0",Sx="__state_override__",c4={LastNodeCompatible:"lastNodeCompatible",FormattingMark:"formattingMark",FormattingNode:"formattingNode",NodeCursor:"nodeCursor",FontStyle:"fontStyle",Link:"link",Color:"color",Alignment:"alignment",Indentation:"indentation",Behavior:"behavior",Code:"code",InlineNode:"inline",ListContainerNode:"listContainer",ListItemNode:"listItemNode",Block:"block",BlockNode:"block",TextBlock:"textBlock",ExcludeInputRules:"excludeFromInputRules",PreventExits:"preventsExits",Media:"media"},ie=c4,si=Symbol.for("__remirror__"),Vt=(e=>(e.PlainExtension="RemirrorPlainExtension",e.NodeExtension="RemirrorNodeExtension",e.MarkExtension="RemirrorMarkExtension",e.PlainExtensionConstructor="RemirrorPlainExtensionConstructor",e.NodeExtensionConstructor="RemirrorNodeExtensionConstructor",e.MarkExtensionConstructor="RemirrorMarkExtensionConstructor",e.Manager="RemirrorManager",e.Preset="RemirrorPreset",e.PresetConstructor="RemirrorPresetConstructor",e))(Vt||{}),Ue=(e=>(e[e.Critical=1e6]="Critical",e[e.Highest=1e5]="Highest",e[e.High=1e4]="High",e[e.Medium=1e3]="Medium",e[e.Default=100]="Default",e[e.Low=10]="Low",e[e.Lowest=0]="Lowest",e))(Ue||{}),Dr=(e=>(e[e.None=0]="None",e[e.Create=1]="Create",e[e.EditorView=2]="EditorView",e[e.Runtime=3]="Runtime",e[e.Destroy=4]="Destroy",e))(Dr||{}),V=(e=>(e.Undo="_|undo|_",e.Redo="_|redo|_",e.Bold="_|bold|_",e.Italic="_|italic|_",e.Underline="_|underline|_",e.Strike="_|strike|_",e.Code="_|code|_",e.Paragraph="_|paragraph|_",e.H1="_|h1|_",e.H2="_|h2|_",e.H3="_|h3|_",e.H4="_|h4|_",e.H5="_|h5|_",e.H6="_|h6|_",e.TaskList="_|task|_",e.BulletList="_|bullet|_",e.OrderedList="_|number|_",e.Quote="_|quote|_",e.Divider="_|divider|_",e.Codeblock="_|codeblock|_",e.ClearFormatting="_|clear|_",e.Superscript="_|sup|_",e.Subscript="_|sub|_",e.LeftAlignment="_|left-align|_",e.CenterAlignment="_|center-align|_",e.RightAlignment="_|right-align|_",e.JustifyAlignment="_|justify-align|_",e.InsertLink="_|link|_",e.Find="_|find|_",e.FindBackwards="_|find-backwards|_",e.FindReplace="_|find-replace|_",e.AddFootnote="_|footnote|_",e.AddComment="_|comment|_",e.ContextMenu="_|context-menu|_",e.IncreaseFontSize="_|inc-font-size|_",e.DecreaseFontSize="_|dec-font-size|_",e.IncreaseIndent="_|indent|_",e.DecreaseIndent="_|dedent|_",e.Shortcuts="_|shortcuts|_",e.Copy="_|copy|_",e.Cut="_|cut|_",e.Paste="_|paste|_",e.PastePlain="_|paste-plain|_",e.SelectAll="_|select-all|_",e.Format="_|format|_",e))(V||{}),U=(e=>(e.PROD="RMR0000",e.UNKNOWN="RMR0001",e.INVALID_COMMAND_ARGUMENTS="RMR0002",e.CUSTOM="RMR0003",e.CORE_HELPERS="RMR0004",e.MUTATION="RMR0005",e.INTERNAL="RMR0006",e.MISSING_REQUIRED_EXTENSION="RMR0007",e.MANAGER_PHASE_ERROR="RMR0008",e.INVALID_GET_EXTENSION="RMR0010",e.INVALID_MANAGER_ARGUMENTS="RMR0011",e.SCHEMA="RMR0012",e.HELPERS_CALLED_IN_OUTER_SCOPE="RMR0013",e.INVALID_MANAGER_EXTENSION="RMR0014",e.DUPLICATE_COMMAND_NAMES="RMR0016",e.DUPLICATE_HELPER_NAMES="RMR0017",e.NON_CHAINABLE_COMMAND="RMR0018",e.INVALID_EXTENSION="RMR0019",e.INVALID_CONTENT="RMR0021",e.INVALID_NAME="RMR0050",e.EXTENSION="RMR0100",e.EXTENSION_SPEC="RMR0101",e.EXTENSION_EXTRA_ATTRIBUTES="RMR0102",e.INVALID_SET_EXTENSION_OPTIONS="RMR0103",e.REACT_PROVIDER_CONTEXT="RMR0200",e.REACT_GET_ROOT_PROPS="RMR0201",e.REACT_EDITOR_VIEW="RMR0202",e.REACT_CONTROLLED="RMR0203",e.REACT_NODE_VIEW="RMR0204",e.REACT_GET_CONTEXT="RMR0205",e.REACT_COMPONENTS="RMR0206",e.REACT_HOOKS="RMR0207",e.I18N_CONTEXT="RMR0300",e))(U||{}),u4=function(t){return d4(t)&&!p4(t)};function d4(e){return!!e&&typeof e=="object"}function p4(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||m4(e)}var f4=typeof Symbol=="function"&&Symbol.for,h4=f4?Symbol.for("react.element"):60103;function m4(e){return e.$$typeof===h4}function g4(e){return Array.isArray(e)?[]:{}}function Uu(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Il(g4(e),e,t):e}function y4(e,t,r){return e.concat(t).map(function(n){return Uu(n,r)})}function v4(e,t){if(!t.customMerge)return Il;var r=t.customMerge(e);return typeof r=="function"?r:Il}function b4(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function wx(e){return Object.keys(e).concat(b4(e))}function hC(e,t){try{return t in e}catch{return!1}}function E4(e,t){return hC(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function k4(e,t,r){var n={};return r.isMergeableObject(e)&&wx(e).forEach(function(o){n[o]=Uu(e[o],r)}),wx(t).forEach(function(o){E4(e,o)||(hC(e,o)&&r.isMergeableObject(t[o])?n[o]=v4(o,r)(e[o],t[o],r):n[o]=Uu(t[o],r))}),n}function Il(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||y4,r.isMergeableObject=r.isMergeableObject||u4,r.cloneUnlessOtherwiseSpecified=Uu;var n=Array.isArray(t),o=Array.isArray(e),i=n===o;return i?n?r.arrayMerge(e,t,r):k4(e,t,r):Uu(t,r)}Il.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,o){return Il(n,o,r)},{})};var x4=Il,S4=x4;const w4=po(S4);var T4=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;o--!==0;){var s=i[o];if(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r};const C4=po(T4);/*! + */var k4=P,E4=Symbol.for("react.element"),S4=Symbol.for("react.fragment"),C4=Object.prototype.hasOwnProperty,T4=k4.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,A4={key:!0,ref:!0,__self:!0,__source:!0};function q_(t,e,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(s=e.ref);for(r in e)C4.call(e,r)&&!A4.hasOwnProperty(r)&&(o[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)o[r]===void 0&&(o[r]=e[r]);return{$$typeof:E4,type:t,key:i,ref:s,props:o,_owner:T4.current}}nm.Fragment=S4;nm.jsx=q_;nm.jsxs=q_;H_.exports=nm;var j=H_.exports,c0={exports:{}};(function(t,e){var n=typeof Reflect<"u"?Reflect.construct:void 0,r=Object.defineProperty,o=Error.captureStackTrace;o===void 0&&(o=function(u){var c=new Error;r(u,"stack",{configurable:!0,get:function(){var h=c.stack;return r(this,"stack",{configurable:!0,value:h,writable:!0}),h},set:function(h){r(u,"stack",{configurable:!0,value:h,writable:!0})}})});function i(a){a!==void 0&&r(this,"message",{configurable:!0,value:a,writable:!0});var u=this.constructor.name;u!==void 0&&u!==this.name&&r(this,"name",{configurable:!0,value:u,writable:!0}),o(this,this.constructor)}i.prototype=Object.create(Error.prototype,{constructor:{configurable:!0,value:i,writable:!0}});var s=function(){function a(c,d){return r(c,"name",{configurable:!0,value:d})}try{var u=function(){};if(a(u,"foo"),u.name==="foo")return a}catch{}}();function l(a,u){if(u==null||u===Error)u=i;else if(typeof u!="function")throw new TypeError("super_ should be a function");var c;if(typeof a=="string")c=a,a=n!==void 0?function(){return n(u,arguments,this.constructor)}:function(){u.apply(this,arguments)},s!==void 0&&(s(a,c),c=void 0);else if(typeof a!="function")throw new TypeError("constructor should be either a string or a function");a.super_=a.super=u;var d={constructor:{configurable:!0,value:a,writable:!0}};return c!==void 0&&(d.name={configurable:!0,value:c,writable:!0}),a.prototype=Object.create(u.prototype,d),a}e=t.exports=l,e.BaseError=i})(c0,c0.exports);var Z_=c0.exports,ZE="ProseMirror-selectednode",cb="",ws="\0",QE="__state_override__",_4={LastNodeCompatible:"lastNodeCompatible",FormattingMark:"formattingMark",FormattingNode:"formattingNode",NodeCursor:"nodeCursor",FontStyle:"fontStyle",Link:"link",Color:"color",Alignment:"alignment",Indentation:"indentation",Behavior:"behavior",Code:"code",InlineNode:"inline",ListContainerNode:"listContainer",ListItemNode:"listItemNode",Block:"block",BlockNode:"block",TextBlock:"textBlock",ExcludeInputRules:"excludeFromInputRules",PreventExits:"preventsExits",Media:"media"},Ee=_4,Bi=Symbol.for("__remirror__"),bn=(t=>(t.PlainExtension="RemirrorPlainExtension",t.NodeExtension="RemirrorNodeExtension",t.MarkExtension="RemirrorMarkExtension",t.PlainExtensionConstructor="RemirrorPlainExtensionConstructor",t.NodeExtensionConstructor="RemirrorNodeExtensionConstructor",t.MarkExtensionConstructor="RemirrorMarkExtensionConstructor",t.Manager="RemirrorManager",t.Preset="RemirrorPreset",t.PresetConstructor="RemirrorPresetConstructor",t))(bn||{}),dt=(t=>(t[t.Critical=1e6]="Critical",t[t.Highest=1e5]="Highest",t[t.High=1e4]="High",t[t.Medium=1e3]="Medium",t[t.Default=100]="Default",t[t.Low=10]="Low",t[t.Lowest=0]="Lowest",t))(dt||{}),mr=(t=>(t[t.None=0]="None",t[t.Create=1]="Create",t[t.EditorView=2]="EditorView",t[t.Runtime=3]="Runtime",t[t.Destroy=4]="Destroy",t))(mr||{}),oe=(t=>(t.Undo="_|undo|_",t.Redo="_|redo|_",t.Bold="_|bold|_",t.Italic="_|italic|_",t.Underline="_|underline|_",t.Strike="_|strike|_",t.Code="_|code|_",t.Paragraph="_|paragraph|_",t.H1="_|h1|_",t.H2="_|h2|_",t.H3="_|h3|_",t.H4="_|h4|_",t.H5="_|h5|_",t.H6="_|h6|_",t.TaskList="_|task|_",t.BulletList="_|bullet|_",t.OrderedList="_|number|_",t.Quote="_|quote|_",t.Divider="_|divider|_",t.Codeblock="_|codeblock|_",t.ClearFormatting="_|clear|_",t.Superscript="_|sup|_",t.Subscript="_|sub|_",t.LeftAlignment="_|left-align|_",t.CenterAlignment="_|center-align|_",t.RightAlignment="_|right-align|_",t.JustifyAlignment="_|justify-align|_",t.InsertLink="_|link|_",t.Find="_|find|_",t.FindBackwards="_|find-backwards|_",t.FindReplace="_|find-replace|_",t.AddFootnote="_|footnote|_",t.AddComment="_|comment|_",t.ContextMenu="_|context-menu|_",t.IncreaseFontSize="_|inc-font-size|_",t.DecreaseFontSize="_|dec-font-size|_",t.IncreaseIndent="_|indent|_",t.DecreaseIndent="_|dedent|_",t.Shortcuts="_|shortcuts|_",t.Copy="_|copy|_",t.Cut="_|cut|_",t.Paste="_|paste|_",t.PastePlain="_|paste-plain|_",t.SelectAll="_|select-all|_",t.Format="_|format|_",t))(oe||{}),re=(t=>(t.PROD="RMR0000",t.UNKNOWN="RMR0001",t.INVALID_COMMAND_ARGUMENTS="RMR0002",t.CUSTOM="RMR0003",t.CORE_HELPERS="RMR0004",t.MUTATION="RMR0005",t.INTERNAL="RMR0006",t.MISSING_REQUIRED_EXTENSION="RMR0007",t.MANAGER_PHASE_ERROR="RMR0008",t.INVALID_GET_EXTENSION="RMR0010",t.INVALID_MANAGER_ARGUMENTS="RMR0011",t.SCHEMA="RMR0012",t.HELPERS_CALLED_IN_OUTER_SCOPE="RMR0013",t.INVALID_MANAGER_EXTENSION="RMR0014",t.DUPLICATE_COMMAND_NAMES="RMR0016",t.DUPLICATE_HELPER_NAMES="RMR0017",t.NON_CHAINABLE_COMMAND="RMR0018",t.INVALID_EXTENSION="RMR0019",t.INVALID_CONTENT="RMR0021",t.INVALID_NAME="RMR0050",t.EXTENSION="RMR0100",t.EXTENSION_SPEC="RMR0101",t.EXTENSION_EXTRA_ATTRIBUTES="RMR0102",t.INVALID_SET_EXTENSION_OPTIONS="RMR0103",t.REACT_PROVIDER_CONTEXT="RMR0200",t.REACT_GET_ROOT_PROPS="RMR0201",t.REACT_EDITOR_VIEW="RMR0202",t.REACT_CONTROLLED="RMR0203",t.REACT_NODE_VIEW="RMR0204",t.REACT_GET_CONTEXT="RMR0205",t.REACT_COMPONENTS="RMR0206",t.REACT_HOOKS="RMR0207",t.I18N_CONTEXT="RMR0300",t))(re||{}),R4=function(e){return M4(e)&&!O4(e)};function M4(t){return!!t&&typeof t=="object"}function O4(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||N4(t)}var I4=typeof Symbol=="function"&&Symbol.for,L4=I4?Symbol.for("react.element"):60103;function N4(t){return t.$$typeof===L4}function $4(t){return Array.isArray(t)?[]:{}}function Fd(t,e){return e.clone!==!1&&e.isMergeableObject(t)?_c($4(t),t,e):t}function D4(t,e,n){return t.concat(e).map(function(r){return Fd(r,n)})}function P4(t,e){if(!e.customMerge)return _c;var n=e.customMerge(t);return typeof n=="function"?n:_c}function z4(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function JE(t){return Object.keys(t).concat(z4(t))}function Q_(t,e){try{return e in t}catch{return!1}}function F4(t,e){return Q_(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function B4(t,e,n){var r={};return n.isMergeableObject(t)&&JE(t).forEach(function(o){r[o]=Fd(t[o],n)}),JE(e).forEach(function(o){F4(t,o)||(Q_(t,o)&&n.isMergeableObject(e[o])?r[o]=P4(o,n)(t[o],e[o],n):r[o]=Fd(e[o],n))}),r}function _c(t,e,n){n=n||{},n.arrayMerge=n.arrayMerge||D4,n.isMergeableObject=n.isMergeableObject||R4,n.cloneUnlessOtherwiseSpecified=Fd;var r=Array.isArray(e),o=Array.isArray(t),i=r===o;return i?r?n.arrayMerge(t,e,n):B4(t,e,n):Fd(e,n)}_c.all=function(e,n){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(r,o){return _c(r,o,n)},{})};var H4=_c,U4=H4;const W4=jo(U4);var V4=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!t(e[o],n[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var s=i[o];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n};const j4=jo(V4);/*! * isobject * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. - */var mC=function(t){return t!=null&&typeof t=="object"&&Array.isArray(t)===!1};/*! + */var J_=function(e){return e!=null&&typeof e=="object"&&Array.isArray(e)===!1};/*! * is-plain-object * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. - */var O4=mC;function Tx(e){return O4(e)===!0&&Object.prototype.toString.call(e)==="[object Object]"}var A4=function(t){var r,n;return!(Tx(t)===!1||(r=t.constructor,typeof r!="function")||(n=r.prototype,Tx(n)===!1)||n.hasOwnProperty("isPrototypeOf")===!1)};/*! + */var G4=J_;function eS(t){return G4(t)===!0&&Object.prototype.toString.call(t)==="[object Object]"}var K4=function(e){var n,r;return!(eS(e)===!1||(n=e.constructor,typeof n!="function")||(r=n.prototype,eS(r)===!1)||r.hasOwnProperty("isPrototypeOf")===!1)};/*! * is-extendable * * Copyright (c) 2015-2017, Jon Schlinkert. * Released under the MIT License. - */var N4=A4,R4=function(t){return N4(t)||typeof t=="function"||Array.isArray(t)};/*! + */var Y4=K4,X4=function(e){return Y4(e)||typeof e=="function"||Array.isArray(e)};/*! * object.omit * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. - */var _4=R4,I4=function(t,r,n){if(!_4(t))return{};typeof r=="function"&&(n=r,r=[]),typeof r=="string"&&(r=[r]);for(var o=typeof n=="function",i=Object.keys(t),s={},a=0;a * * Copyright (c) 2014-2015 Jon Schlinkert, contributors. * Licensed under the MIT License - */var M4=mC,L4=function(t,r){if(!M4(t)&&typeof t!="function")return{};var n={};if(typeof r=="string")return r in t&&(n[r]=t[r]),n;for(var o=r.length,i=-1;++i{let d=l.prefixes[u]||"",p=c;return r===!1&&(n&&(p=p.normalize("NFD").replace(new RegExp(`[^a-zA-ZØßø0-9${n.join("")}]`,"g"),"")),n||(p=p.normalize("NFD").replace(/[^a-zA-ZØßø0-9]/g,""),d="")),n&&(d=d.replace(new RegExp(`[^${n.join("")}]`,"g"),"")),u===0?d+p:!d&&!p?"":s&&!d&&o.match(/\s/)?" "+p:(d||o)+p}).filter(Boolean)}function z4(e){const t=e.matchAll(gC).next().value,r=t?t.index:0;return e.slice(0,r+1).toUpperCase()+e.slice(r+1).toLowerCase()}function vC(e,t){return yC(e,t).reduce((r,n)=>r+z4(n),"")}function Cx(e,t){return yC(e,{...t,prefix:"-"}).join("").toLowerCase()}function U1(e,t,r,n){var o,i=!1,s=0;function a(){o&&clearTimeout(o)}function l(){a(),i=!0}typeof t!="boolean"&&(n=r,r=t,t=void 0);function c(){for(var u=arguments.length,d=new Array(u),p=0;pe?m():t!==!0&&(o=setTimeout(n?b:m,n===void 0?e-h:e))}return c.cancel=l,c}function bC(e,t,r){return r===void 0?U1(e,t,!1):U1(e,r,t!==!1)}function lt(e,t,r){const n=e[t];return EC(!Kh(n),r),n}function EC(e,t){if(!e)throw new $4(t)}var $4=class extends fC.BaseError{constructor(){super(...arguments),this.name="AssertionError"}};function Dt(e){return Object.entries(e)}function Vu(e){return Object.keys(e)}function Wh(e){return Object.values(e)}function wr(e,t,r){return e.includes(t,r)}function te(e){return Object.assign(Object.create(null),e)}function kC(e){return Object.prototype.toString.call(e)}function xC(e){return kC(e).slice(8,-1)}function $d(e,t){return r=>typeof r!==e?!1:t?t(r):!0}function Hy(e){return t=>xC(t)===e}var Kh=$d("undefined"),oe=$d("string"),gn=$d("number",e=>!Number.isNaN(e)),De=$d("function");function B4(e){return e===null}function V1(e){return e===!0||e===!1}function gs(e){if(xC(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})}function H4(e){return e==null||/^[bns]/.test(typeof e)}function ns(e){return B4(e)||Kh(e)}function nr(e){return!ns(e)&&(De(e)||$d("object")(e))}var F4=Hy("RegExp");function U4(e){return Hy("Map")(e)}function V4(e){return Hy("Set")(e)}function Af(e){return nr(e)&&!U4(e)&&!V4(e)&&Object.keys(e).length===0}var ft=Array.isArray;function is(e){return ft(e)&&e.length===0}function Ox(e){return ft(e)&&e.length>0}function j4(e){return e.charAt(0).toUpperCase()+e.slice(1)}function cc(e,t,r=n=>!!n){t.lastIndex=0;const n=[],o=t.flags;let i;o.includes("g")||(t=new RegExp(t.source,`g${o}`));do i=t.exec(e),i&&n.push(i);while(r(i));return t.lastIndex=0,n}function Nf(){const e=Date.now(),t=Nf.last||e;return Nf.last=e>t?e:t+1}Nf.last=0;function Ml(e=""){return`${e}${Nf().toString(36)}`}function SC(e){return By(e,t=>!Kh(t))}function G4(e){if(!gs(e))throw new Error("An invalid value was passed into this clone utility. Expected a plain object");return{...e}}var wC=C4;function Ll(e,t=!1){const r=t?[...e].reverse():e,n=new Set(r);return t?[...n].reverse():[...n]}function TC(e){const t=[];for(const r of e){const n=ft(r)?TC(r):[r];t.push(...n)}return t}function CC(){}function OC(...e){return w4.all(e,{isMergeableObject:gs})}function W4({min:e,max:t,value:r}){return rt?t:r}function K4(e){return e[e.length-1]}function ia(e,t){return[...e].map((r,n)=>({value:r,index:n})).sort((r,n)=>t(r.value,n.value)||r.index-n.index).map(({value:r})=>r)}function Y4(e,t,r){try{if(oe(t)&&t in e)return e[t];ft(t)&&(t=`['${t.join("']['")}']`);let n=e;return t.replace(/\[\s*(["'])(.*?)\1\s*]|^\s*(\w+)\s*(?=\.|\[|$)|\.\s*(\w*)\s*(?=\.|\[|$)|\[\s*(-?\d+)\s*]/g,(o,i,s,a,l,c)=>(n=n[s||a||l||c],"")),n===void 0?r:n}catch{return r}}function q4(e,t){const r=G4(t);let n=r;for(const[o,i]of e.entries()){const s=o>=e.length-1;let a=n[i];if(s){if(ft(n)){const l=Number.parseInt(i.toString(),10);gn(l)&&n.splice(l,1)}else Reflect.deleteProperty(n,i);return r}if(H4(a))return r;a=ft(a)?[...a]:{...a},n[i]=a,n=a}return r}function X4(e){return t=>Y4(t,e)}function Fy(e,t,r=!1){const n=[],o=new Set,i=De(t)?t:X4(t),s=r?[...e].reverse():e;for(const a of s){const l=i(a);o.has(l)||(o.add(l),n.push(a))}return r?n.reverse():n}function Uy(e,t){const r=ft(e)?e[0]:e;return gn(t)?r<=t?Array.from({length:t+1-r},(n,o)=>o+r):Array.from({length:r+1-t},(n,o)=>-1*o+r):Array.from({length:Math.abs(r)},(n,o)=>(r<0?-1:1)*o)}function Ax(e,...t){const r=t.filter(gn);return e>=Math.min(...r)&&e<=Math.max(...r)}function AC(e){return De(e)?e():e}var NC="https://remirror.io/docs/errors",Z4={[U.UNKNOWN]:"An error occurred but we're not quite sure why. 🧐",[U.INVALID_COMMAND_ARGUMENTS]:"The arguments passed to the command method were invalid.",[U.CUSTOM]:"This is a custom error, possibly thrown by an external library.",[U.CORE_HELPERS]:"An error occurred in a function called from the `@remirror/core-helpers` library.",[U.MUTATION]:"Mutation of immutable value detected.",[U.INTERNAL]:"This is an error which should not occur and is internal to the remirror codebase.",[U.MISSING_REQUIRED_EXTENSION]:"Your editor is missing a required extension.",[U.MANAGER_PHASE_ERROR]:"This occurs when accessing a method or property before it is available.",[U.INVALID_GET_EXTENSION]:"The user requested an invalid extension from the getExtensions method. Please check the `createExtensions` return method is returning an extension with the defined constructor.",[U.INVALID_MANAGER_ARGUMENTS]:"Invalid value(s) passed into `Manager` constructor. Only `Presets` and `Extensions` are supported.",[U.SCHEMA]:"There is a problem with the schema or you are trying to access a node / mark that doesn't exists.",[U.HELPERS_CALLED_IN_OUTER_SCOPE]:"The `helpers` method which is passed into the ``create*` method should only be called within returned method since it relies on an active view (not present in the outer scope).",[U.INVALID_MANAGER_EXTENSION]:"You requested an invalid extension from the manager.",[U.DUPLICATE_COMMAND_NAMES]:"Command method names must be unique within the editor.",[U.DUPLICATE_HELPER_NAMES]:"Helper method names must be unique within the editor.",[U.NON_CHAINABLE_COMMAND]:"Attempted to chain a non chainable command.",[U.INVALID_EXTENSION]:"The provided extension is invalid.",[U.INVALID_CONTENT]:"The content provided to the editor is not supported.",[U.INVALID_NAME]:"An invalid name was used for the extension.",[U.EXTENSION]:"An error occurred within an extension. More details should be made available.",[U.EXTENSION_SPEC]:"The spec was defined without calling the `defaults`, `parse` or `dom` methods.",[U.EXTENSION_EXTRA_ATTRIBUTES]:"Extra attributes must either be a string or an object.",[U.INVALID_SET_EXTENSION_OPTIONS]:"A call to `extension.setOptions` was made with invalid keys.",[U.REACT_PROVIDER_CONTEXT]:"`useRemirrorContext` was called outside of the `remirror` context. It can only be used within an active remirror context created by the ``.",[U.REACT_GET_ROOT_PROPS]:"`getRootProps` has been attached to the DOM more than once. It should only be attached to the dom once per editor.",[U.REACT_EDITOR_VIEW]:"A problem occurred adding the editor view to the dom.",[U.REACT_CONTROLLED]:"There is a problem with your controlled editor setup.",[U.REACT_NODE_VIEW]:"Something went wrong with your custom ReactNodeView Component.",[U.REACT_GET_CONTEXT]:"You attempted to call `getContext` provided by the `useRemirror` prop during the first render of the editor. This is not possible and should only be after the editor first mounts.",[U.REACT_COMPONENTS]:"An error occurred within a remirror component.",[U.REACT_HOOKS]:"An error occurred within a remirror hook.",[U.I18N_CONTEXT]:"You called `useI18n()` outside of an `I18nProvider` context."};function J4(e){return oe(e)&&wr(Wh(U),e)}function Q4(e,t){const r=Z4[e],n=r?`${r} + */var Q4=J_,J4=function(e,n){if(!Q4(e)&&typeof e!="function")return{};var r={};if(typeof n=="string")return n in e&&(r[n]=e[n]),r;for(var o=n.length,i=-1;++i{let d=a.prefixes[c]||"",h=u;return n===!1&&(r&&(h=h.normalize("NFD").replace(new RegExp(`[^a-zA-ZØßø0-9${r.join("")}]`,"g"),"")),r||(h=h.normalize("NFD").replace(/[^a-zA-ZØßø0-9]/g,""),d="")),r&&(d=d.replace(new RegExp(`[^${r.join("")}]`,"g"),"")),c===0?d+h:!d&&!h?"":s&&!d&&o.match(/\s/)?" "+h:(d||o)+h}).filter(Boolean)}function nD(t){const e=t.matchAll(eR).next().value,n=e?e.index:0;return t.slice(0,n+1).toUpperCase()+t.slice(n+1).toLowerCase()}function nR(t,e){return tR(t,e).reduce((n,r)=>n+nD(r),"")}function tS(t,e){return tR(t,{...e,prefix:"-"}).join("").toLowerCase()}function d0(t,e,n,r){var o,i=!1,s=0;function l(){o&&clearTimeout(o)}function a(){l(),i=!0}typeof e!="boolean"&&(r=n,n=e,e=void 0);function u(){for(var c=arguments.length,d=new Array(c),h=0;ht?g():e!==!0&&(o=setTimeout(r?m:g,r===void 0?t-p:t))}return u.cancel=a,u}function rR(t,e,n){return n===void 0?d0(t,e,!1):d0(t,n,e!==!1)}function Ot(t,e,n){const r=t[e];return oR(!om(r),n),r}function oR(t,e){if(!t)throw new rD(e)}var rD=class extends Z_.BaseError{constructor(){super(...arguments),this.name="AssertionError"}};function cn(t){return Object.entries(t)}function Bd(t){return Object.keys(t)}function rm(t){return Object.values(t)}function sr(t,e,n){return t.includes(e,n)}function be(t){return Object.assign(Object.create(null),t)}function iR(t){return Object.prototype.toString.call(t)}function sR(t){return iR(t).slice(8,-1)}function Dh(t,e){return n=>typeof n!==t?!1:e?e(n):!0}function db(t){return e=>sR(e)===t}var om=Dh("undefined"),ke=Dh("string"),Yr=Dh("number",t=>!Number.isNaN(t)),tt=Dh("function");function oD(t){return t===null}function h0(t){return t===!0||t===!1}function Zs(t){if(sR(t)!=="Object")return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.getPrototypeOf({})}function iD(t){return t==null||/^[bns]/.test(typeof t)}function Fs(t){return oD(t)||om(t)}function Dn(t){return!Fs(t)&&(tt(t)||Dh("object")(t))}var sD=db("RegExp");function aD(t){return db("Map")(t)}function lD(t){return db("Set")(t)}function Pp(t){return Dn(t)&&!aD(t)&&!lD(t)&&Object.keys(t).length===0}var Bt=Array.isArray;function Bs(t){return Bt(t)&&t.length===0}function nS(t){return Bt(t)&&t.length>0}function cD(t){return t.charAt(0).toUpperCase()+t.slice(1)}function su(t,e,n=r=>!!r){e.lastIndex=0;const r=[],o=e.flags;let i;o.includes("g")||(e=new RegExp(e.source,`g${o}`));do i=e.exec(t),i&&r.push(i);while(n(i));return e.lastIndex=0,r}function zp(){const t=Date.now(),e=zp.last||t;return zp.last=t>e?t:e+1}zp.last=0;function Rc(t=""){return`${t}${zp().toString(36)}`}function aR(t){return ub(t,e=>!om(e))}function uD(t){if(!Zs(t))throw new Error("An invalid value was passed into this clone utility. Expected a plain object");return{...t}}var lR=j4;function Mc(t,e=!1){const n=e?[...t].reverse():t,r=new Set(n);return e?[...r].reverse():[...r]}function cR(t){const e=[];for(const n of t){const r=Bt(n)?cR(n):[n];e.push(...r)}return e}function uR(){}function dR(...t){return W4.all(t,{isMergeableObject:Zs})}function dD({min:t,max:e,value:n}){return ne?e:n}function hD(t){return t[t.length-1]}function Ka(t,e){return[...t].map((n,r)=>({value:n,index:r})).sort((n,r)=>e(n.value,r.value)||n.index-r.index).map(({value:n})=>n)}function fD(t,e,n){try{if(ke(e)&&e in t)return t[e];Bt(e)&&(e=`['${e.join("']['")}']`);let r=t;return e.replace(/\[\s*(["'])(.*?)\1\s*]|^\s*(\w+)\s*(?=\.|\[|$)|\.\s*(\w*)\s*(?=\.|\[|$)|\[\s*(-?\d+)\s*]/g,(o,i,s,l,a,u)=>(r=r[s||l||a||u],"")),r===void 0?n:r}catch{return n}}function pD(t,e){const n=uD(e);let r=n;for(const[o,i]of t.entries()){const s=o>=t.length-1;let l=r[i];if(s){if(Bt(r)){const a=Number.parseInt(i.toString(),10);Yr(a)&&r.splice(a,1)}else Reflect.deleteProperty(r,i);return n}if(iD(l))return n;l=Bt(l)?[...l]:{...l},r[i]=l,r=l}return n}function gD(t){return e=>fD(e,t)}function hb(t,e,n=!1){const r=[],o=new Set,i=tt(e)?e:gD(e),s=n?[...t].reverse():t;for(const l of s){const a=i(l);o.has(a)||(o.add(a),r.push(l))}return n?r.reverse():r}function fb(t,e){const n=Bt(t)?t[0]:t;return Yr(e)?n<=e?Array.from({length:e+1-n},(r,o)=>o+n):Array.from({length:n+1-e},(r,o)=>-1*o+n):Array.from({length:Math.abs(n)},(r,o)=>(n<0?-1:1)*o)}function rS(t,...e){const n=e.filter(Yr);return t>=Math.min(...n)&&t<=Math.max(...n)}function hR(t){return tt(t)?t():t}var fR="https://remirror.io/docs/errors",mD={[re.UNKNOWN]:"An error occurred but we're not quite sure why. 🧐",[re.INVALID_COMMAND_ARGUMENTS]:"The arguments passed to the command method were invalid.",[re.CUSTOM]:"This is a custom error, possibly thrown by an external library.",[re.CORE_HELPERS]:"An error occurred in a function called from the `@remirror/core-helpers` library.",[re.MUTATION]:"Mutation of immutable value detected.",[re.INTERNAL]:"This is an error which should not occur and is internal to the remirror codebase.",[re.MISSING_REQUIRED_EXTENSION]:"Your editor is missing a required extension.",[re.MANAGER_PHASE_ERROR]:"This occurs when accessing a method or property before it is available.",[re.INVALID_GET_EXTENSION]:"The user requested an invalid extension from the getExtensions method. Please check the `createExtensions` return method is returning an extension with the defined constructor.",[re.INVALID_MANAGER_ARGUMENTS]:"Invalid value(s) passed into `Manager` constructor. Only `Presets` and `Extensions` are supported.",[re.SCHEMA]:"There is a problem with the schema or you are trying to access a node / mark that doesn't exists.",[re.HELPERS_CALLED_IN_OUTER_SCOPE]:"The `helpers` method which is passed into the ``create*` method should only be called within returned method since it relies on an active view (not present in the outer scope).",[re.INVALID_MANAGER_EXTENSION]:"You requested an invalid extension from the manager.",[re.DUPLICATE_COMMAND_NAMES]:"Command method names must be unique within the editor.",[re.DUPLICATE_HELPER_NAMES]:"Helper method names must be unique within the editor.",[re.NON_CHAINABLE_COMMAND]:"Attempted to chain a non chainable command.",[re.INVALID_EXTENSION]:"The provided extension is invalid.",[re.INVALID_CONTENT]:"The content provided to the editor is not supported.",[re.INVALID_NAME]:"An invalid name was used for the extension.",[re.EXTENSION]:"An error occurred within an extension. More details should be made available.",[re.EXTENSION_SPEC]:"The spec was defined without calling the `defaults`, `parse` or `dom` methods.",[re.EXTENSION_EXTRA_ATTRIBUTES]:"Extra attributes must either be a string or an object.",[re.INVALID_SET_EXTENSION_OPTIONS]:"A call to `extension.setOptions` was made with invalid keys.",[re.REACT_PROVIDER_CONTEXT]:"`useRemirrorContext` was called outside of the `remirror` context. It can only be used within an active remirror context created by the ``.",[re.REACT_GET_ROOT_PROPS]:"`getRootProps` has been attached to the DOM more than once. It should only be attached to the dom once per editor.",[re.REACT_EDITOR_VIEW]:"A problem occurred adding the editor view to the dom.",[re.REACT_CONTROLLED]:"There is a problem with your controlled editor setup.",[re.REACT_NODE_VIEW]:"Something went wrong with your custom ReactNodeView Component.",[re.REACT_GET_CONTEXT]:"You attempted to call `getContext` provided by the `useRemirror` prop during the first render of the editor. This is not possible and should only be after the editor first mounts.",[re.REACT_COMPONENTS]:"An error occurred within a remirror component.",[re.REACT_HOOKS]:"An error occurred within a remirror hook.",[re.I18N_CONTEXT]:"You called `useI18n()` outside of an `I18nProvider` context."};function vD(t){return ke(t)&&sr(rm(re),t)}function yD(t,e){const n=mD[t],r=n?`${n} -`:"",o=t?`${t} +`:"",o=e?`${e} -`:"";return`${n}${o}For more information visit ${NC}#${e.toLowerCase()}`}var RC=class extends fC.BaseError{constructor({code:e,message:t,disableLogging:r=!1}={}){const n=J4(e)?e:U.CUSTOM;super(Q4(n,t)),this.errorCode=n,this.url=`${NC}#${n.toLowerCase()}`,r||console.error(this.message)}static create(e={}){return new RC(e)}};function re(e,t){if(!e)throw RC.create(t)}function Yh(e){if(typeof e!="object"||e===null)return e;const t=Symbol.toStringTag in e&&e[Symbol.toStringTag]==="Module"?e.default??e:e;return t&&typeof e=="object"&&"__esModule"in t&&t.__esModule&&t.default!==void 0?t.default:t}function Vs(e,t={}){return e}function Zt(e){this.content=e}Zt.prototype={constructor:Zt,find:function(e){for(var t=0;t>1}};Zt.from=function(e){if(e instanceof Zt)return e;var t=[];if(e)for(var r in e)t.push(r,e[r]);return new Zt(t)};function _C(e,t,r){for(let n=0;;n++){if(n==e.childCount||n==t.childCount)return e.childCount==t.childCount?null:r;let o=e.child(n),i=t.child(n);if(o==i){r+=o.nodeSize;continue}if(!o.sameMarkup(i))return r;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)r++;return r}if(o.content.size||i.content.size){let s=_C(o.content,i.content,r+1);if(s!=null)return s}r+=o.nodeSize}}function IC(e,t,r,n){for(let o=e.childCount,i=t.childCount;;){if(o==0||i==0)return o==i?null:{a:r,b:n};let s=e.child(--o),a=t.child(--i),l=s.nodeSize;if(s==a){r-=l,n-=l;continue}if(!s.sameMarkup(a))return{a:r,b:n};if(s.isText&&s.text!=a.text){let c=0,u=Math.min(s.text.length,a.text.length);for(;ct&&n(l,o+a,i||null,s)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,t-u),Math.min(l.content.size,r-u),n,o+u)}a=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,r,n,o){let i="",s=!0;return this.nodesBetween(t,r,(a,l)=>{a.isText?(i+=a.text.slice(Math.max(t,l)-l,r-l),s=!n):a.isLeaf?(o?i+=typeof o=="function"?o(a):o:a.type.spec.leafText&&(i+=a.type.spec.leafText(a)),s=!n):!s&&a.isBlock&&(i+=n,s=!0)},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let r=this.lastChild,n=t.firstChild,o=this.content.slice(),i=0;for(r.isText&&r.sameMarkup(n)&&(o[o.length-1]=r.withText(r.text+n.text),i=1);it)for(let i=0,s=0;st&&((sr)&&(a.isText?a=a.cut(Math.max(0,t-s),Math.min(a.text.length,r-s)):a=a.cut(Math.max(0,t-s-1),Math.min(a.content.size,r-s-1))),n.push(a),o+=a.nodeSize),s=l}return new I(n,o)}cutByIndex(t,r){return t==r?I.empty:t==0&&r==this.content.length?this:new I(this.content.slice(t,r))}replaceChild(t,r){let n=this.content[t];if(n==r)return this;let o=this.content.slice(),i=this.size+r.nodeSize-n.nodeSize;return o[t]=r,new I(o,i)}addToStart(t){return new I([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new I(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let r=0;rthis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,o=0;;n++){let i=this.child(n),s=o+i.nodeSize;if(s>=t)return s==t||r>0?hp(n+1,s):hp(n,o);o=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,r){if(!r)return I.empty;if(!Array.isArray(r))throw new RangeError("Invalid input for Fragment.fromJSON");return new I(r.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return I.empty;let r,n=0;for(let o=0;othis.type.rank&&(r||(r=t.slice(0,o)),r.push(this),n=!0),r&&r.push(i)}}return r||(r=t.slice()),n||r.push(this),r}removeFromSet(t){for(let r=0;rn.type.rank-o.type.rank),r}}Ne.none=[];class _f extends Error{}class W{constructor(t,r,n){this.content=t,this.openStart=r,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,r){let n=LC(this.content,t+this.openStart,r);return n&&new W(n,this.openStart,this.openEnd)}removeBetween(t,r){return new W(MC(this.content,t+this.openStart,r+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,r){if(!r)return W.empty;let n=r.openStart||0,o=r.openEnd||0;if(typeof n!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new W(I.fromJSON(t,r.content),n,o)}static maxOpen(t,r=!0){let n=0,o=0;for(let i=t.firstChild;i&&!i.isLeaf&&(r||!i.type.spec.isolating);i=i.firstChild)n++;for(let i=t.lastChild;i&&!i.isLeaf&&(r||!i.type.spec.isolating);i=i.lastChild)o++;return new W(t,n,o)}}W.empty=new W(I.empty,0,0);function MC(e,t,r){let{index:n,offset:o}=e.findIndex(t),i=e.maybeChild(n),{index:s,offset:a}=e.findIndex(r);if(o==t||i.isText){if(a!=r&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(r))}if(n!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(n,i.copy(MC(i.content,t-o-1,r-o-1)))}function LC(e,t,r,n){let{index:o,offset:i}=e.findIndex(t),s=e.maybeChild(o);if(i==t||s.isText)return n&&!n.canReplace(o,o,r)?null:e.cut(0,t).append(r).append(e.cut(t));let a=LC(s.content,t-i-1,r);return a&&e.replaceChild(o,s.copy(a))}function eL(e,t,r){if(r.openStart>e.depth)throw new _f("Inserted content deeper than insertion position");if(e.depth-r.openStart!=t.depth-r.openEnd)throw new _f("Inconsistent open depths");return DC(e,t,r,0)}function DC(e,t,r,n){let o=e.index(n),i=e.node(n);if(o==t.index(n)&&n=0&&e.isText&&e.sameMarkup(t[r])?t[r]=e.withText(t[r].text+e.text):t.push(e)}function Su(e,t,r,n){let o=(t||e).node(r),i=0,s=t?t.index(r):o.childCount;e&&(i=e.index(r),e.depth>r?i++:e.textOffset&&(Js(e.nodeAfter,n),i++));for(let a=i;ao&&j1(e,t,o+1),s=n.depth>o&&j1(r,n,o+1),a=[];return Su(null,e,o,a),i&&s&&t.index(o)==r.index(o)?(PC(i,s),Js(Qs(i,zC(e,t,r,n,o+1)),a)):(i&&Js(Qs(i,If(e,t,o+1)),a),Su(t,r,o,a),s&&Js(Qs(s,If(r,n,o+1)),a)),Su(n,null,o,a),new I(a)}function If(e,t,r){let n=[];if(Su(null,e,r,n),e.depth>r){let o=j1(e,t,r+1);Js(Qs(o,If(e,t,r+1)),n)}return Su(t,null,r,n),new I(n)}function tL(e,t){let r=t.depth-e.openStart,o=t.node(r).copy(e.content);for(let i=r-1;i>=0;i--)o=t.node(i).copy(I.from(o));return{start:o.resolveNoCache(e.openStart+r),end:o.resolveNoCache(o.content.size-e.openEnd-r)}}class Dl{constructor(t,r,n){this.pos=t,this.path=r,this.parentOffset=n,this.depth=r.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,r=this.index(this.depth);if(r==t.childCount)return null;let n=this.pos-this.path[this.path.length-1],o=t.child(r);return n?t.child(r).cut(n):o}get nodeBefore(){let t=this.index(this.depth),r=this.pos-this.path[this.path.length-1];return r?this.parent.child(t).cut(0,r):t==0?null:this.parent.child(t-1)}posAtIndex(t,r){r=this.resolveDepth(r);let n=this.path[r*3],o=r==0?0:this.path[r*3-1]+1;for(let i=0;i0;r--)if(this.start(r)<=t&&this.end(r)>=t)return r;return 0}blockRange(t=this,r){if(t.pos=0;n--)if(t.pos<=this.end(n)&&(!r||r(this.node(n))))return new sa(this,t,n);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&r<=t.content.size))throw new RangeError("Position "+r+" out of range");let n=[],o=0,i=r;for(let s=t;;){let{index:a,offset:l}=s.content.findIndex(i),c=i-l;if(n.push(s,a,o+l),!c||(s=s.child(a),s.isText))break;i=c-1,o+=l+1}return new Dl(r,n,i)}static resolveCached(t,r){for(let o=0;ot&&this.nodesBetween(t,r,i=>(n.isInSet(i.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),$C(this.marks,t)}contentMatchAt(t){let r=this.type.contentMatch.matchFragment(this.content,0,t);if(!r)throw new Error("Called contentMatchAt on a node with invalid content");return r}canReplace(t,r,n=I.empty,o=0,i=n.childCount){let s=this.contentMatchAt(t).matchFragment(n,o,i),a=s&&s.matchFragment(this.content,r);if(!a||!a.validEnd)return!1;for(let l=o;lr.type.name)}`);this.content.forEach(r=>r.check())}toJSON(){let t={type:this.type.name};for(let r in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(r=>r.toJSON())),t}static fromJSON(t,r){if(!r)throw new RangeError("Invalid input for Node.fromJSON");let n=null;if(r.marks){if(!Array.isArray(r.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=r.marks.map(t.markFromJSON)}if(r.type=="text"){if(typeof r.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(r.text,n)}let o=I.fromJSON(t,r.content);return t.nodeType(r.type).create(r.attrs,o,n)}};ji.prototype.text=void 0;class Mf extends ji{constructor(t,r,n,o){if(super(t,r,null,o),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):$C(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,r){return this.text.slice(t,r)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new Mf(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new Mf(this.type,this.attrs,t,this.marks)}cut(t=0,r=this.text.length){return t==0&&r==this.text.length?this:this.withText(this.text.slice(t,r))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function $C(e,t){for(let r=e.length-1;r>=0;r--)t=e[r].type.name+"("+t+")";return t}class aa{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,r){let n=new oL(t,r);if(n.next==null)return aa.empty;let o=BC(n);n.next&&n.err("Unexpected trailing text");let i=dL(uL(o));return pL(i,n),i}matchType(t){for(let r=0;rc.createAndFill()));for(let c=0;c=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function r(n){t.push(n);for(let o=0;o{let i=o+(n.validEnd?"*":" ")+" ";for(let s=0;s"+t.indexOf(n.next[s].next);return i}).join(` -`)}}aa.empty=new aa(!0);class oL{constructor(t,r){this.string=t,this.nodeTypes=r,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()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function BC(e){let t=[];do t.push(iL(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function iL(e){let t=[];do t.push(sL(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function sL(e){let t=cL(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=aL(e,t);else break;return t}function Nx(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function aL(e,t){let r=Nx(e),n=r;return e.eat(",")&&(e.next!="}"?n=Nx(e):n=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:r,max:n,expr:t}}function lL(e,t){let r=e.nodeTypes,n=r[t];if(n)return[n];let o=[];for(let i in r){let s=r[i];s.groups.indexOf(t)>-1&&o.push(s)}return o.length==0&&e.err("No node type or group '"+t+"' found"),o}function cL(e){if(e.eat("(")){let t=BC(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=lL(e,e.next).map(r=>(e.inline==null?e.inline=r.isInline:e.inline!=r.isInline&&e.err("Mixing inline and block content"),{type:"name",value:r}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function uL(e){let t=[[]];return o(i(e,0),r()),t;function r(){return t.push([])-1}function n(s,a,l){let c={term:l,to:a};return t[s].push(c),c}function o(s,a){s.forEach(l=>l.to=a)}function i(s,a){if(s.type=="choice")return s.exprs.reduce((l,c)=>l.concat(i(c,a)),[]);if(s.type=="seq")for(let l=0;;l++){let c=i(s.exprs[l],a);if(l==s.exprs.length-1)return c;o(c,a=r())}else if(s.type=="star"){let l=r();return n(a,l),o(i(s.expr,l),l),[n(l)]}else if(s.type=="plus"){let l=r();return o(i(s.expr,a),l),o(i(s.expr,l),l),[n(l)]}else{if(s.type=="opt")return[n(a)].concat(i(s.expr,a));if(s.type=="range"){let l=a;for(let c=0;c{e[s].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u{c||o.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let i=t[n.join(",")]=new aa(n.indexOf(e.length-1)>-1);for(let s=0;s-1}allowsMarks(t){if(this.markSet==null)return!0;for(let r=0;rn[i]=new jC(i,r,s));let o=r.spec.topNode||"doc";if(!n[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let i in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}};class fL{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class Bd{constructor(t,r,n,o){this.name=t,this.rank=r,this.schema=n,this.spec=o,this.attrs=VC(o.attrs),this.excluded=null;let i=FC(this.attrs);this.instance=i?new Ne(this,i):null}create(t=null){return!t&&this.instance?this.instance:new Ne(this,UC(this.attrs,t))}static compile(t,r){let n=Object.create(null),o=0;return t.forEach((i,s)=>n[i]=new Bd(i,o++,r,s)),n}removeFromSet(t){for(var r=0;r-1}}let hL=class{constructor(t){this.cached=Object.create(null);let r=this.spec={};for(let o in t)r[o]=t[o];r.nodes=Zt.from(t.nodes),r.marks=Zt.from(t.marks||{}),this.nodes=W1.compile(this.spec.nodes,this),this.marks=Bd.compile(this.spec.marks,this);let n=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],s=i.spec.content||"",a=i.spec.marks;i.contentMatch=n[s]||(n[s]=aa.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet=a=="_"?null:a?_x(this,a.split(" ")):a==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:_x(this,s.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,r=null,n,o){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof W1){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(r,n,o)}text(t,r){let n=this.nodes.text;return new Mf(n,n.defaultAttrs,t,Ne.setFrom(r))}mark(t,r){return typeof t=="string"&&(t=this.marks[t]),t.create(r)}nodeFromJSON(t){return ji.fromJSON(this,t)}markFromJSON(t){return Ne.fromJSON(this,t)}nodeType(t){let r=this.nodes[t];if(!r)throw new RangeError("Unknown node type: "+t);return r}};function _x(e,t){let r=[];for(let n=0;n-1)&&r.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[n]+"'")}return r}let Vy=class K1{constructor(t,r){this.schema=t,this.rules=r,this.tags=[],this.styles=[],r.forEach(n=>{n.tag?this.tags.push(n):n.style&&this.styles.push(n)}),this.normalizeLists=!this.tags.some(n=>{if(!/^(ul|ol)\b/.test(n.tag)||!n.node)return!1;let o=t.nodes[n.node];return o.contentMatch.matchType(o)})}parse(t,r={}){let n=new Mx(this,r,!1);return n.addAll(t,r.from,r.to),n.finish()}parseSlice(t,r={}){let n=new Mx(this,r,!0);return n.addAll(t,r.from,r.to),W.maxOpen(n.finish())}matchTag(t,r,n){for(let o=n?this.tags.indexOf(n)+1:0;ot.length&&(a.charCodeAt(t.length)!=61||a.slice(t.length+1)!=r))){if(s.getAttrs){let l=s.getAttrs(r);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(t){let r=[];function n(o){let i=o.priority==null?50:o.priority,s=0;for(;s{n(s=Lx(s)),s.mark||s.ignore||s.clearMark||(s.mark=o)})}for(let o in t.nodes){let i=t.nodes[o].spec.parseDOM;i&&i.forEach(s=>{n(s=Lx(s)),s.node||s.ignore||s.mark||(s.node=o)})}return r}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new K1(t,K1.schemaRules(t)))}};const GC={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},mL={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},WC={ol:!0,ul:!0},Lf=1,Df=2,wu=4;function Ix(e,t,r){return t!=null?(t?Lf:0)|(t==="full"?Df:0):e&&e.whitespace=="pre"?Lf|Df:r&~wu}class mp{constructor(t,r,n,o,i,s,a){this.type=t,this.attrs=r,this.marks=n,this.pendingMarks=o,this.solid=i,this.options=a,this.content=[],this.activeMarks=Ne.none,this.stashMarks=[],this.match=s||(a&wu?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let r=this.type.contentMatch.fillBefore(I.from(t));if(r)this.match=this.type.contentMatch.matchFragment(r);else{let n=this.type.contentMatch,o;return(o=n.findWrapping(t.type))?(this.match=n,o):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&Lf)){let n=this.content[this.content.length-1],o;if(n&&n.isText&&(o=/[ \t\r\n\u000c]+$/.exec(n.text))){let i=n;n.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let r=I.from(this.content);return!t&&this.match&&(r=r.append(this.match.fillBefore(I.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r}popFromStashMark(t){for(let r=this.stashMarks.length-1;r>=0;r--)if(t.eq(this.stashMarks[r]))return this.stashMarks.splice(r,1)[0]}applyPending(t){for(let r=0,n=this.pendingMarks;rthis.addAll(t)),s&&this.sync(a),this.needsBlock=l}else this.withStyleRules(t,()=>{this.addElementByRule(t,i,i.consuming===!1?o:void 0)})}leafFallback(t){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(` -`))}ignoreFallback(t){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(t){let r=Ne.none,n=Ne.none;for(let o=0;o{s.clearMark(a)&&(n=a.addToSet(n))}):r=this.parser.schema.marks[s.mark].create(s.attrs).addToSet(r),s.consuming===!1)i=s;else break}return[r,n]}addElementByRule(t,r,n){let o,i,s;r.node?(i=this.parser.schema.nodes[r.node],i.isLeaf?this.insertNode(i.create(r.attrs))||this.leafFallback(t):o=this.enter(i,r.attrs||null,r.preserveWhitespace)):(s=this.parser.schema.marks[r.mark].create(r.attrs),this.addPendingMark(s));let a=this.top;if(i&&i.isLeaf)this.findInside(t);else if(n)this.addElement(t,n);else if(r.getContent)this.findInside(t),r.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l));else{let l=t;typeof r.contentElement=="string"?l=t.querySelector(r.contentElement):typeof r.contentElement=="function"?l=r.contentElement(t):r.contentElement&&(l=r.contentElement),this.findAround(t,l,!0),this.addAll(l)}o&&this.sync(a)&&this.open--,s&&this.removePendingMark(s,a)}addAll(t,r,n){let o=r||0;for(let i=r?t.childNodes[r]:t.firstChild,s=n==null?null:t.childNodes[n];i!=s;i=i.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(i);this.findAtPoint(t,o)}findPlace(t){let r,n;for(let o=this.open;o>=0;o--){let i=this.nodes[o],s=i.findWrapping(t);if(s&&(!r||r.length>s.length)&&(r=s,n=i,!s.length)||i.solid)break}if(!r)return!1;this.sync(n);for(let o=0;othis.open){for(;r>this.open;r--)this.nodes[r-1].content.push(this.nodes[r].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let r=this.open;r>=0;r--)if(this.nodes[r]==t)return this.open=r,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let r=this.open;r>=0;r--){let n=this.nodes[r].content;for(let o=n.length-1;o>=0;o--)t+=n[o].nodeSize;r&&t++}return t}findAtPoint(t,r){if(this.find)for(let n=0;n-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let r=t.split("/"),n=this.options.context,o=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+(o?0:1),s=(a,l)=>{for(;a>=0;a--){let c=r[a];if(c==""){if(a==r.length-1||a==0)continue;for(;l>=i;l--)if(s(a-1,l))return!0;return!1}else{let u=l>0||l==0&&o?this.nodes[l].type:n&&l>=i?n.node(l-i).type:null;if(!u||u.name!=c&&u.groups.indexOf(c)==-1)return!1;l--}}return!0};return s(r.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let r=t.depth;r>=0;r--){let n=t.node(r).contentMatchAt(t.indexAfter(r)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let r in this.parser.schema.nodes){let n=this.parser.schema.nodes[r];if(n.isTextblock&&n.defaultAttrs)return n}}addPendingMark(t){let r=EL(t,this.top.pendingMarks);r&&this.top.stashMarks.push(r),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)}removePendingMark(t,r){for(let n=this.open;n>=0;n--){let o=this.nodes[n];if(o.pendingMarks.lastIndexOf(t)>-1)o.pendingMarks=t.removeFromSet(o.pendingMarks);else{o.activeMarks=t.removeFromSet(o.activeMarks);let s=o.popFromStashMark(t);s&&o.type&&o.type.allowsMarkType(s.type)&&(o.activeMarks=s.addToSet(o.activeMarks))}if(o==r)break}}}function gL(e){for(let t=e.firstChild,r=null;t;t=t.nextSibling){let n=t.nodeType==1?t.nodeName.toLowerCase():null;n&&WC.hasOwnProperty(n)&&r?(r.appendChild(t),t=r):n=="li"?r=t:n&&(r=null)}}function yL(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function vL(e){let t=/\s*([\w-]+)\s*:\s*([^;]+)/g,r,n=[];for(;r=t.exec(e);)n.push(r[1],r[2].trim());return n}function Lx(e){let t={};for(let r in e)t[r]=e[r];return t}function bL(e,t){let r=t.schema.nodes;for(let n in r){let o=r[n];if(!o.allowsMarkType(e))continue;let i=[],s=a=>{i.push(a);for(let l=0;l{if(i.length||s.marks.length){let a=0,l=0;for(;a=0;o--){let i=this.serializeMark(t.marks[o],t.isInline,r);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(t,r,n={}){let o=this.marks[t.type.name];return o&&un.renderSpec(Og(n),o(t,r))}static renderSpec(t,r,n=null){if(typeof r=="string")return{dom:t.createTextNode(r)};if(r.nodeType!=null)return{dom:r};if(r.dom&&r.dom.nodeType!=null)return r;let o=r[0],i=o.indexOf(" ");i>0&&(n=o.slice(0,i),o=o.slice(i+1));let s,a=n?t.createElementNS(n,o):t.createElement(o),l=r[1],c=1;if(l&&typeof l=="object"&&l.nodeType==null&&!Array.isArray(l)){c=2;for(let u in l)if(l[u]!=null){let d=u.indexOf(" ");d>0?a.setAttributeNS(u.slice(0,d),u.slice(d+1),l[u]):a.setAttribute(u,l[u])}}for(let u=c;uc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:p,contentDOM:f}=un.renderSpec(t,d,n);if(a.appendChild(p),f){if(s)throw new RangeError("Multiple content holes");s=f}}}return{dom:a,contentDOM:s}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new un(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let r=Dx(t.nodes);return r.text||(r.text=n=>n.text),r}static marksFromSchema(t){return Dx(t.marks)}}function Dx(e){let t={};for(let r in e){let n=e[r].spec.toDOM;n&&(t[r]=n)}return t}function Og(e){return e.document||window.document}const KC=65535,YC=Math.pow(2,16);function kL(e,t){return e+t*YC}function Px(e){return e&KC}function xL(e){return(e-(e&KC))/YC}const qC=1,XC=2,Yp=4,ZC=8;class Y1{constructor(t,r,n){this.pos=t,this.delInfo=r,this.recover=n}get deleted(){return(this.delInfo&ZC)>0}get deletedBefore(){return(this.delInfo&(qC|Yp))>0}get deletedAfter(){return(this.delInfo&(XC|Yp))>0}get deletedAcross(){return(this.delInfo&Yp)>0}}class an{constructor(t,r=!1){if(this.ranges=t,this.inverted=r,!t.length&&an.empty)return an.empty}recover(t){let r=0,n=Px(t);if(!this.inverted)for(let o=0;ot)break;let c=this.ranges[a+i],u=this.ranges[a+s],d=l+c;if(t<=d){let p=c?t==l?-1:t==d?1:r:r,f=l+o+(p<0?0:u);if(n)return f;let h=t==(r<0?l:d)?null:kL(a/3,t-l),m=t==l?XC:t==d?qC:Yp;return(r<0?t!=l:t!=d)&&(m|=ZC),new Y1(f,m,h)}o+=u-c}return n?t+o:new Y1(t+o,0,null)}touches(t,r){let n=0,o=Px(r),i=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;at)break;let c=this.ranges[a+i],u=l+c;if(t<=u&&a==o*3)return!0;n+=this.ranges[a+s]-c}return!1}forEach(t){let r=this.inverted?2:1,n=this.inverted?1:2;for(let o=0,i=0;o=0;r--){let o=t.getMirror(r);this.appendMap(t.maps[r].invert(),o!=null&&o>r?n-o-1:void 0)}}invert(){let t=new vl;return t.appendMappingInverted(this),t}map(t,r=1){if(this.mirror)return this._map(t,r,!0);for(let n=this.from;ni&&l!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),r.openStart,r.openEnd);return xt.fromReplace(t,this.from,this.to,i)}invert(){return new oo(this.from,this.to,this.mark)}map(t){let r=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new Jo(r.pos,n.pos,this.mark)}merge(t){return t instanceof Jo&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Jo(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Jo(r.from,r.to,t.markFromJSON(r.mark))}}zt.jsonID("addMark",Jo);class oo extends zt{constructor(t,r,n){super(),this.from=t,this.to=r,this.mark=n}apply(t){let r=t.slice(this.from,this.to),n=new W(jy(r.content,o=>o.mark(this.mark.removeFromSet(o.marks)),t),r.openStart,r.openEnd);return xt.fromReplace(t,this.from,this.to,n)}invert(){return new Jo(this.from,this.to,this.mark)}map(t){let r=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new oo(r.pos,n.pos,this.mark)}merge(t){return t instanceof oo&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new oo(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new oo(r.from,r.to,t.markFromJSON(r.mark))}}zt.jsonID("removeMark",oo);class Bi extends zt{constructor(t,r){super(),this.pos=t,this.mark=r}apply(t){let r=t.nodeAt(this.pos);if(!r)return xt.fail("No node at mark step's position");let n=r.type.create(r.attrs,null,this.mark.addToSet(r.marks));return xt.fromReplace(t,this.pos,this.pos+1,new W(I.from(n),0,r.isLeaf?0:1))}invert(t){let r=t.nodeAt(this.pos);if(r){let n=this.mark.addToSet(r.marks);if(n.length==r.marks.length){for(let o=0;on.pos?null:new St(r.pos,n.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let 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}static fromJSON(t,r){if(typeof r.from!="number"||typeof r.to!="number"||typeof r.gapFrom!="number"||typeof r.gapTo!="number"||typeof r.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new St(r.from,r.to,r.gapFrom,r.gapTo,W.fromJSON(t,r.slice),r.insert,!!r.structure)}}zt.jsonID("replaceAround",St);function q1(e,t,r){let n=e.resolve(t),o=r-t,i=n.depth;for(;o>0&&i>0&&n.indexAfter(i)==n.node(i).childCount;)i--,o--;if(o>0){let s=n.node(i).maybeChild(n.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function SL(e,t,r,n){let o=[],i=[],s,a;e.doc.nodesBetween(t,r,(l,c,u)=>{if(!l.isInline)return;let d=l.marks;if(!n.isInSet(d)&&u.type.allowsMarkType(n.type)){let p=Math.max(c,t),f=Math.min(c+l.nodeSize,r),h=n.addToSet(d);for(let m=0;me.step(l)),i.forEach(l=>e.step(l))}function wL(e,t,r,n){let o=[],i=0;e.doc.nodesBetween(t,r,(s,a)=>{if(!s.isInline)return;i++;let l=null;if(n instanceof Bd){let c=s.marks,u;for(;u=n.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else n?n.isInSet(s.marks)&&(l=[n]):l=s.marks;if(l&&l.length){let c=Math.min(a+s.nodeSize,r);for(let u=0;ue.step(new oo(s.from,s.to,s.style)))}function TL(e,t,r,n=r.contentMatch){let o=e.doc.nodeAt(t),i=[],s=t+1;for(let a=0;a=0;a--)e.step(i[a])}function CL(e,t,r){return(t==0||e.canReplace(t,e.childCount))&&(r==e.childCount||e.canReplace(0,r))}function uc(e){let r=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let o=e.$from.node(n),i=e.$from.index(n),s=e.$to.indexAfter(n);if(nr;h--)m||n.index(h)>0?(m=!0,u=I.from(n.node(h).copy(u)),d++):l--;let p=I.empty,f=0;for(let h=i,m=!1;h>r;h--)m||o.after(h+1)=0;s--){if(n.size){let a=r[s].type.contentMatch.matchFragment(n);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}n=I.from(r[s].type.create(r[s].attrs,n))}let o=t.start,i=t.end;e.step(new St(o,i,o,i,new W(n,0,0),r.length,!0))}function _L(e,t,r,n,o){if(!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=e.steps.length;e.doc.nodesBetween(t,r,(s,a)=>{if(s.isTextblock&&!s.hasMarkup(n,o)&&IL(e.doc,e.mapping.slice(i).map(a),n)){e.clearIncompatible(e.mapping.slice(i).map(a,1),n);let l=e.mapping.slice(i),c=l.map(a,1),u=l.map(a+s.nodeSize,1);return e.step(new St(c,u,c+1,u-1,new W(I.from(n.create(o,null,s.marks)),0,0),1,!0)),!1}})}function IL(e,t,r){let n=e.resolve(t),o=n.index();return n.parent.canReplaceWith(o,o+1,r)}function ML(e,t,r,n,o){let i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");r||(r=i.type);let s=r.create(n,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,s);if(!r.validContent(i.content))throw new RangeError("Invalid content for node type "+r.name);e.step(new St(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new W(I.from(s),0,0),1,!0))}function bl(e,t,r=1,n){let o=e.resolve(t),i=o.depth-r,s=n&&n[n.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let c=o.depth-1,u=r-2;c>i;c--,u--){let d=o.node(c),p=o.index(c);if(d.type.spec.isolating)return!1;let f=d.content.cutByIndex(p,d.childCount),h=n&&n[u+1];h&&(f=f.replaceChild(0,h.type.create(h.attrs)));let m=n&&n[u]||d;if(!d.canReplace(p+1,d.childCount)||!m.type.validContent(f))return!1}let a=o.indexAfter(i),l=n&&n[0];return o.node(i).canReplaceWith(a,a,l?l.type:o.node(i+1).type)}function LL(e,t,r=1,n){let o=e.doc.resolve(t),i=I.empty,s=I.empty;for(let a=o.depth,l=o.depth-r,c=r-1;a>l;a--,c--){i=I.from(o.node(a).copy(i));let u=n&&n[c];s=I.from(u?u.type.create(u.attrs,s):o.node(a).copy(s))}e.step(new Ut(t,t,new W(i.append(s),r,r),!0))}function Hd(e,t){let r=e.resolve(t),n=r.index();return DL(r.nodeBefore,r.nodeAfter)&&r.parent.canReplace(n,n+1)}function DL(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function PL(e,t,r){let n=new Ut(t-r,t+r,W.empty,!0);e.step(n)}function JC(e,t,r){let n=e.resolve(t);if(n.parent.canReplaceWith(n.index(),n.index(),r))return t;if(n.parentOffset==0)for(let o=n.depth-1;o>=0;o--){let i=n.index(o);if(n.node(o).canReplaceWith(i,i,r))return n.before(o+1);if(i>0)return null}if(n.parentOffset==n.parent.content.size)for(let o=n.depth-1;o>=0;o--){let i=n.indexAfter(o);if(n.node(o).canReplaceWith(i,i,r))return n.after(o+1);if(i=0;s--){let a=s==n.depth?0:n.pos<=(n.start(s+1)+n.end(s+1))/2?-1:1,l=n.index(s)+(a>0?1:0),c=n.node(s),u=!1;if(i==1)u=c.canReplace(l,l,o);else{let d=c.contentMatchAt(l).findWrapping(o.firstChild.type);u=d&&c.canReplaceWith(l,l,d[0])}if(u)return a==0?n.pos:a<0?n.before(s+1):n.after(s+1)}return null}function Wy(e,t,r=t,n=W.empty){if(t==r&&!n.size)return null;let o=e.resolve(t),i=e.resolve(r);return QC(o,i,n)?new Ut(t,r,n):new $L(o,i,n).fit()}function QC(e,t,r){return!r.openStart&&!r.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),r.content)}class $L{constructor(t,r,n){this.$from=t,this.$to=r,this.unplaced=n,this.frontier=[],this.placed=I.empty;for(let o=0;o<=t.depth;o++){let i=t.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(t.indexAfter(o))})}for(let o=t.depth;o>0;o--)this.placed=I.from(t.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),r=this.placed.size-this.depth-this.$from.depth,n=this.$from,o=this.close(t<0?this.$to:n.doc.resolve(t));if(!o)return null;let i=this.placed,s=n.depth,a=o.depth;for(;s&&a&&i.childCount==1;)i=i.firstChild.content,s--,a--;let l=new W(i,s,a);return t>-1?new St(n.pos,t,this.$to.pos,this.$to.end(),l,r):l.size||n.pos!=this.$to.pos?new Ut(n.pos,o.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let r=this.unplaced.content,n=0,o=this.unplaced.openEnd;n1&&(o=0),i.type.spec.isolating&&o<=n){t=n;break}r=i.content}for(let r=1;r<=2;r++)for(let n=r==1?t:this.unplaced.openStart;n>=0;n--){let o,i=null;n?(i=Ng(this.unplaced.content,n-1).firstChild,o=i.content):o=this.unplaced.content;let s=o.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:c}=this.frontier[a],u,d=null;if(r==1&&(s?c.matchType(s.type)||(d=c.fillBefore(I.from(s),!1)):i&&l.compatibleContent(i.type)))return{sliceDepth:n,frontierDepth:a,parent:i,inject:d};if(r==2&&s&&(u=c.findWrapping(s.type)))return{sliceDepth:n,frontierDepth:a,parent:i,wrap:u};if(i&&c.matchType(i.type))break}}}openMore(){let{content:t,openStart:r,openEnd:n}=this.unplaced,o=Ng(t,r);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new W(t,r+1,Math.max(n,o.size+r>=t.size-n?r+1:0)),!0)}dropNode(){let{content:t,openStart:r,openEnd:n}=this.unplaced,o=Ng(t,r);if(o.childCount<=1&&r>0){let i=t.size-r<=r+o.size;this.unplaced=new W(Uc(t,r-1,1),r-1,i?r-1:n)}else this.unplaced=new W(Uc(t,r,1),r,n)}placeNodes({sliceDepth:t,frontierDepth:r,parent:n,inject:o,wrap:i}){for(;this.depth>r;)this.closeFrontierNode();if(i)for(let m=0;m1||l==0||m.content.size)&&(d=b,u.push(eO(m.mark(p.allowedMarks(m.marks)),c==1?l:0,c==a.childCount?f:-1)))}let h=c==a.childCount;h||(f=-1),this.placed=Vc(this.placed,r,I.from(u)),this.frontier[r].match=d,h&&f<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,b=a;m1&&o==this.$to.end(--n);)++o;return o}findCloseLevel(t){e:for(let r=Math.min(this.depth,t.depth);r>=0;r--){let{match:n,type:o}=this.frontier[r],i=r=0;a--){let{match:l,type:c}=this.frontier[a],u=Rg(t,a,c,l,!0);if(!u||u.childCount)continue e}return{depth:r,fit:s,move:i?t.doc.resolve(t.after(r+1)):t}}}}close(t){let r=this.findCloseLevel(t);if(!r)return null;for(;this.depth>r.depth;)this.closeFrontierNode();r.fit.childCount&&(this.placed=Vc(this.placed,r.depth,r.fit)),t=r.move;for(let n=r.depth+1;n<=t.depth;n++){let o=t.node(n),i=o.type.contentMatch.fillBefore(o.content,!0,t.index(n));this.openFrontierNode(o.type,o.attrs,i)}return t}openFrontierNode(t,r=null,n){let o=this.frontier[this.depth];o.match=o.match.matchType(t),this.placed=Vc(this.placed,this.depth,I.from(t.create(r,n))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let r=this.frontier.pop().match.fillBefore(I.empty,!0);r.childCount&&(this.placed=Vc(this.placed,this.frontier.length,r))}}function Uc(e,t,r){return t==0?e.cutByIndex(r,e.childCount):e.replaceChild(0,e.firstChild.copy(Uc(e.firstChild.content,t-1,r)))}function Vc(e,t,r){return t==0?e.append(r):e.replaceChild(e.childCount-1,e.lastChild.copy(Vc(e.lastChild.content,t-1,r)))}function Ng(e,t){for(let r=0;r1&&(n=n.replaceChild(0,eO(n.firstChild,t-1,n.childCount==1?r-1:0))),t>0&&(n=e.type.contentMatch.fillBefore(n).append(n),r<=0&&(n=n.append(e.type.contentMatch.matchFragment(n).fillBefore(I.empty,!0)))),e.copy(n)}function Rg(e,t,r,n,o){let i=e.node(t),s=o?e.indexAfter(t):e.index(t);if(s==i.childCount&&!r.compatibleContent(i.type))return null;let a=n.fillBefore(i.content,!0,s);return a&&!BL(r,i.content,s)?a:null}function BL(e,t,r){for(let n=r;n0;p--,f--){let h=o.node(p).type.spec;if(h.defining||h.definingAsContext||h.isolating)break;s.indexOf(p)>-1?a=p:o.before(p)==f&&s.splice(1,0,-p)}let l=s.indexOf(a),c=[],u=n.openStart;for(let p=n.content,f=0;;f++){let h=p.firstChild;if(c.push(h),f==n.openStart)break;p=h.content}for(let p=u-1;p>=0;p--){let f=c[p],h=HL(f.type);if(h&&!f.sameMarkup(o.node(Math.abs(a)-1)))u=p;else if(h||!f.type.isTextblock)break}for(let p=n.openStart;p>=0;p--){let f=(p+u+1)%(n.openStart+1),h=c[f];if(h)for(let m=0;m=0&&(e.replace(t,r,n),!(e.steps.length>d));p--){let f=s[p];f<0||(t=o.before(f),r=i.after(f))}}function tO(e,t,r,n,o){if(tn){let i=o.contentMatchAt(0),s=i.fillBefore(e).append(e);e=s.append(i.matchFragment(s).fillBefore(I.empty,!0))}return e}function UL(e,t,r,n){if(!n.isInline&&t==r&&e.doc.resolve(t).parent.content.size){let o=JC(e.doc,t,n.type);o!=null&&(t=r=o)}e.replaceRange(t,r,new W(I.from(n),0,0))}function VL(e,t,r){let n=e.doc.resolve(t),o=e.doc.resolve(r),i=rO(n,o);for(let s=0;s0&&(l||n.node(a-1).canReplace(n.index(a-1),o.indexAfter(a-1))))return e.delete(n.before(a),o.after(a))}for(let s=1;s<=n.depth&&s<=o.depth;s++)if(t-n.start(s)==n.depth-s&&r>n.end(s)&&o.end(s)-r!=o.depth-s)return e.delete(n.before(s),r);e.delete(t,r)}function rO(e,t){let r=[],n=Math.min(e.depth,t.depth);for(let o=n;o>=0;o--){let i=e.start(o);if(it.pos+(t.depth-o)||e.node(o).type.spec.isolating||t.node(o).type.spec.isolating)break;(i==t.start(o)||o==e.depth&&o==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&o&&t.start(o-1)==i-1)&&r.push(o)}return r}class El extends zt{constructor(t,r,n){super(),this.pos=t,this.attr=r,this.value=n}apply(t){let r=t.nodeAt(this.pos);if(!r)return xt.fail("No node at attribute step's position");let n=Object.create(null);for(let i in r.attrs)n[i]=r.attrs[i];n[this.attr]=this.value;let o=r.type.create(n,null,r.marks);return xt.fromReplace(t,this.pos,this.pos+1,new W(I.from(o),0,r.isLeaf?0:1))}getMap(){return an.empty}invert(t){return new El(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let r=t.mapResult(this.pos,1);return r.deletedAfter?null:new El(r.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,r){if(typeof r.pos!="number"||typeof r.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new El(r.pos,r.attr,r.value)}}zt.jsonID("attr",El);class ju extends zt{constructor(t,r){super(),this.attr=t,this.value=r}apply(t){let r=Object.create(null);for(let o in t.attrs)r[o]=t.attrs[o];r[this.attr]=this.value;let n=t.type.create(r,t.content,t.marks);return xt.ok(n)}getMap(){return an.empty}invert(t){return new ju(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,r){if(typeof r.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new ju(r.attr,r.value)}}zt.jsonID("docAttr",ju);let zl=class extends Error{};zl=function e(t){let r=Error.call(this,t);return r.__proto__=e.prototype,r};zl.prototype=Object.create(Error.prototype);zl.prototype.constructor=zl;zl.prototype.name="TransformError";class jL{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new vl}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let r=this.maybeStep(t);if(r.failed)throw new zl(r.failed);return this}maybeStep(t){let r=t.apply(this.doc);return r.failed||this.addStep(t,r.doc),r}get docChanged(){return this.steps.length>0}addStep(t,r){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=r}replace(t,r=t,n=W.empty){let o=Wy(this.doc,t,r,n);return o&&this.step(o),this}replaceWith(t,r,n){return this.replace(t,r,new W(I.from(n),0,0))}delete(t,r){return this.replace(t,r,W.empty)}insert(t,r){return this.replaceWith(t,t,r)}replaceRange(t,r,n){return FL(this,t,r,n),this}replaceRangeWith(t,r,n){return UL(this,t,r,n),this}deleteRange(t,r){return VL(this,t,r),this}lift(t,r){return OL(this,t,r),this}join(t,r=1){return PL(this,t,r),this}wrap(t,r){return RL(this,t,r),this}setBlockType(t,r=t,n,o=null){return _L(this,t,r,n,o),this}setNodeMarkup(t,r,n=null,o){return ML(this,t,r,n,o),this}setNodeAttribute(t,r,n){return this.step(new El(t,r,n)),this}setDocAttribute(t,r){return this.step(new ju(t,r)),this}addNodeMark(t,r){return this.step(new Bi(t,r)),this}removeNodeMark(t,r){if(!(r instanceof Ne)){let n=this.doc.nodeAt(t);if(!n)throw new RangeError("No node at position "+t);if(r=r.isInSet(n.marks),!r)return this}return this.step(new Pl(t,r)),this}split(t,r=1,n){return LL(this,t,r,n),this}addMark(t,r,n){return SL(this,t,r,n),this}removeMark(t,r,n){return wL(this,t,r,n),this}clearIncompatible(t,r,n){return TL(this,t,r,n),this}}const _g=Object.create(null);class ke{constructor(t,r,n){this.$anchor=t,this.$head=r,this.ranges=n||[new GL(t.min(r),t.max(r))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let r=0;r=0;i--){let s=r<0?qa(t.node(0),t.node(i),t.before(i+1),t.index(i),r,n):qa(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,r,n);if(s)return s}return null}static near(t,r=1){return this.findFrom(t,r)||this.findFrom(t,-r)||new xr(t.node(0))}static atStart(t){return qa(t,t,0,0,1)||new xr(t)}static atEnd(t){return qa(t,t,t.content.size,t.childCount,-1)||new xr(t)}static fromJSON(t,r){if(!r||!r.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=_g[r.type];if(!n)throw new RangeError(`No selection type ${r.type} defined`);return n.fromJSON(t,r)}static jsonID(t,r){if(t in _g)throw new RangeError("Duplicate use of selection JSON ID "+t);return _g[t]=r,r.prototype.jsonID=t,r}getBookmark(){return ue.between(this.$anchor,this.$head).getBookmark()}}ke.prototype.visible=!0;class GL{constructor(t,r){this.$from=t,this.$to=r}}let $x=!1;function Bx(e){!$x&&!e.parent.inlineContent&&($x=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class ue extends ke{constructor(t,r=t){Bx(t),Bx(r),super(t,r)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,r){let n=t.resolve(r.map(this.head));if(!n.parent.inlineContent)return ke.near(n);let o=t.resolve(r.map(this.anchor));return new ue(o.parent.inlineContent?o:n,n)}replace(t,r=W.empty){if(super.replace(t,r),r==W.empty){let n=this.$from.marksAcross(this.$to);n&&t.ensureMarks(n)}}eq(t){return t instanceof ue&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new qh(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,r){if(typeof r.anchor!="number"||typeof r.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new ue(t.resolve(r.anchor),t.resolve(r.head))}static create(t,r,n=r){let o=t.resolve(r);return new this(o,n==r?o:t.resolve(n))}static between(t,r,n){let o=t.pos-r.pos;if((!n||o)&&(n=o>=0?1:-1),!r.parent.inlineContent){let i=ke.findFrom(r,n,!0)||ke.findFrom(r,-n,!0);if(i)r=i.$head;else return ke.near(r,n)}return t.parent.inlineContent||(o==0?t=r:(t=(ke.findFrom(t,-n,!0)||ke.findFrom(t,n,!0)).$anchor,t.pos0?0:1);o>0?s=0;s+=o){let a=t.child(s);if(a.isAtom){if(!i&&de.isSelectable(a))return de.create(e,r-(o<0?a.nodeSize:0))}else{let l=qa(e,a,r+o,o<0?a.childCount:0,o,i);if(l)return l}r+=a.nodeSize*o}return null}function Hx(e,t,r){let n=e.steps.length-1;if(n{s==null&&(s=u)}),e.setSelection(ke.near(e.doc.resolve(s),r))}const Fx=1,gp=2,Ux=4;class KL extends jL{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(t){return this.storedMarks=t,this.updated|=gp,this}ensureMarks(t){return Ne.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&gp)>0}addStep(t,r){super.addStep(t,r),this.updated=this.updated&~gp,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,r=!0){let n=this.selection;return r&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||Ne.none))),n.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,r,n){let o=this.doc.type.schema;if(r==null)return t?this.replaceSelectionWith(o.text(t),!0):this.deleteSelection();{if(n==null&&(n=r),n=n??r,!t)return this.deleteRange(r,n);let i=this.storedMarks;if(!i){let s=this.doc.resolve(r);i=n==r?s.marks():s.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(r,n,o.text(t,i)),this.selection.empty||this.setSelection(ke.near(this.selection.$to)),this}}setMeta(t,r){return this.meta[typeof t=="string"?t:t.key]=r,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=Ux,this}get scrolledIntoView(){return(this.updated&Ux)>0}}function Vx(e,t){return!t||!e?e:e.bind(t)}class jc{constructor(t,r,n){this.name=t,this.init=Vx(r.init,n),this.apply=Vx(r.apply,n)}}const YL=[new jc("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new jc("selection",{init(e,t){return e.selection||ke.atStart(t.doc)},apply(e){return e.selection}}),new jc("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,r,n){return n.selection.$cursor?e.storedMarks:null}}),new jc("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class Ig{constructor(t,r){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=YL.slice(),r&&r.forEach(n=>{if(this.pluginsByKey[n.key])throw new RangeError("Adding different instances of a keyed plugin ("+n.key+")");this.plugins.push(n),this.pluginsByKey[n.key]=n,n.spec.state&&this.fields.push(new jc(n.key,n.spec.state,n))})}}class js{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,r=-1){for(let n=0;nn.toJSON())),t&&typeof t=="object")for(let n in t){if(n=="doc"||n=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=t[n],i=o.spec.state;i&&i.toJSON&&(r[n]=i.toJSON.call(o,this[o.key]))}return r}static fromJSON(t,r,n){if(!r)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let o=new Ig(t.schema,t.plugins),i=new js(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=ji.fromJSON(t.schema,r.doc);else if(s.name=="selection")i.selection=ke.fromJSON(i.doc,r.selection);else if(s.name=="storedMarks")r.storedMarks&&(i.storedMarks=r.storedMarks.map(t.schema.markFromJSON));else{if(n)for(let a in n){let l=n[a],c=l.spec.state;if(l.key==s.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(r,a)){i[s.name]=c.fromJSON.call(l,t,r[a],i);return}}i[s.name]=s.init(t,i)}}),i}}function nO(e,t,r){for(let n in e){let o=e[n];o instanceof Function?o=o.bind(t):n=="handleDOMEvents"&&(o=nO(o,t,{})),r[n]=o}return r}class Po{constructor(t){this.spec=t,this.props={},t.props&&nO(t.props,this,this.props),this.key=t.key?t.key.key:oO("plugin")}getState(t){return t[this.key]}}const Mg=Object.create(null);function oO(e){return e in Mg?e+"$"+ ++Mg[e]:(Mg[e]=0,e+"$")}class Ca{constructor(t="key"){this.key=oO(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}var qL=/[A-Z]/g,XL=/^ms-/,Lg={};function ZL(e){return"-"+e.toLowerCase()}function JL(e){if(Lg.hasOwnProperty(e))return Lg[e];var t=e.replace(qL,ZL);return Lg[e]=XL.test(t)?"-"+t:t}function QL(e){return JL(e)}function e5(e,t){return QL(e)+":"+t}function t5(e){var t="";for(var r in e){var n=e[r];typeof n!="string"&&typeof n!="number"||(t&&(t+=";"),t+=e5(r,n))}return t}function r5(){return typeof document<"u"?document:null}var iO=r5;function sO(e,t){if(typeof e!="string")return[e];var r=[e];typeof t=="string"||Array.isArray(t)?t={brackets:t}:t||(t={});var n=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],o=t.escape||"___",i=!!t.flat;n.forEach(function(l){var c=new RegExp(["\\",l[0],"[^\\",l[0],"\\",l[1],"]*\\",l[1]].join("")),u=[];function d(p,f,h){var m=r.push(p.slice(l[0].length,-l[1].length))-1;return u.push(m),o+m+o}r.forEach(function(p,f){for(var h,m=0;p!=h;)if(h=p,p=p.replace(c,d),m++>1e4)throw Error("References have circular dependency. Please, check them.");r[f]=p}),u=u.reverse(),r=r.map(function(p){return u.forEach(function(f){p=p.replace(new RegExp("(\\"+o+f+"\\"+o+")","g"),l[0]+"$1"+l[1])}),p})});var s=new RegExp("\\"+o+"([0-9]+)\\"+o);function a(l,c,u){for(var d=[],p,f=0;p=s.exec(l);){if(f++>1e4)throw Error("Circular references in parenthesis");d.push(l.slice(0,p.index)),d.push(a(c[p[1]],c)),l=l.slice(p.index+p[0].length)}return d.push(l),d}return i?r:a(r[0],r)}function aO(e,t){if(t&&t.flat){var r=t&&t.escape||"___",n=e[0],o;if(!n)return"";for(var i=new RegExp("\\"+r+"([0-9]+)\\"+r),s=0;n!=o;){if(s++>1e4)throw Error("Circular references in "+e);o=n,n=n.replace(i,a)}return n}return e.reduce(function l(c,u){return Array.isArray(u)&&(u=u.reduce(l,"")),c+u},"");function a(l,c){if(e[c]==null)throw Error("Reference "+c+"is undefined");return e[c]}}function lO(e,t){return Array.isArray(e)?aO(e,t):sO(e,t)}lO.parse=sO;lO.stringify=aO;const n5={id:"extension.command.copy.label",message:"Copy",comment:"Label for copy command."},o5={id:"extension.command.copy.description",message:"Copy the selected text",comment:"Description for copy command."},i5={id:"extension.command.cut.label",message:"Cut",comment:"Label for cut command."},s5={id:"extension.command.cut.description",message:"Cut the selected text",comment:"Description for cut command."},a5={id:"extension.command.paste.label",message:"Paste",comment:"Label for paste command."},l5={id:"extension.command.paste.description",message:"Paste content into the editor",comment:"Description for paste command."},c5={id:"extension.command.select-all.label",message:"Select all",comment:"Label for select all command."},u5={id:"extension.command.select-all.description",message:"Select all content within the editor",comment:"Description for select all command."};var ss=Object.freeze({__proto__:null,COPY_DESCRIPTION:o5,COPY_LABEL:n5,CUT_DESCRIPTION:s5,CUT_LABEL:i5,PASTE_DESCRIPTION:l5,PASTE_LABEL:a5,SELECT_ALL_DESCRIPTION:u5,SELECT_ALL_LABEL:c5});const d5={id:"keyboard.shortcut.escape",message:"Enter",comment:"Label for escape key in shortcuts."},p5={id:"keyboard.shortcut.command",message:"Command",comment:"Label for command key in shortcuts."},f5={id:"keyboard.shortcut.control",message:"Control",comment:"Label for control key in shortcuts."},h5={id:"keyboard.shortcut.enter",message:"Enter",comment:"Label for enter key in shortcuts."},m5={id:"keyboard.shortcut.shift",message:"Shift",comment:"Label for shift key in shortcuts."},g5={id:"keyboard.shortcut.alt",message:"Alt",comment:"Label for alt key in shortcuts."},y5={id:"keyboard.shortcut.capsLock",message:"Caps Lock",comment:"Label for caps lock key in shortcuts."},v5={id:"keyboard.shortcut.backspace",message:"Backspace",comment:"Label for backspace key in shortcuts."},b5={id:"keyboard.shortcut.tab",message:"Tab",comment:"Label for tab key in shortcuts."},E5={id:"keyboard.shortcut.space",message:"Space",comment:"Label for space key in shortcuts."},k5={id:"keyboard.shortcut.delete",message:"Delete",comment:"Label for delete key in shortcuts."},x5={id:"keyboard.shortcut.pageUp",message:"Page Up",comment:"Label for page up key in shortcuts."},S5={id:"keyboard.shortcut.pageDown",message:"Page Down",comment:"Label for page down key in shortcuts."},w5={id:"keyboard.shortcut.home",message:"Home",comment:"Label for home key in shortcuts."},T5={id:"keyboard.shortcut.end",message:"End",comment:"Label for end key in shortcuts."},C5={id:"keyboard.shortcut.arrowLeft",message:"Arrow Left",comment:"Label for arrow left key in shortcuts."},O5={id:"keyboard.shortcut.arrowRight",message:"Arrow Right",comment:"Label for arrow right key in shortcuts."},A5={id:"keyboard.shortcut.arrowUp",message:"Arrow Up",comment:"Label for arrow up key in shortcuts."},N5={id:"keyboard.shortcut.arrowDown",message:"Arrow Down",comment:"Label for arrowDown key in shortcuts."};var _t=Object.freeze({__proto__:null,ALT_KEY:g5,ARROW_DOWN_KEY:N5,ARROW_LEFT_KEY:C5,ARROW_RIGHT_KEY:O5,ARROW_UP_KEY:A5,BACKSPACE_KEY:v5,CAPS_LOCK_KEY:y5,COMMAND_KEY:p5,CONTROL_KEY:f5,DELETE_KEY:k5,END_KEY:T5,ENTER_KEY:h5,ESCAPE_KEY:d5,HOME_KEY:w5,PAGE_DOWN_KEY:S5,PAGE_UP_KEY:x5,SHIFT_KEY:m5,SPACE_KEY:E5,TAB_KEY:b5});const R5={id:"extension.command.toggle-blockquote.label",message:"Blockquote",comment:"Label for blockquote formatting command."},_5={id:"extension.command.toggle-blockquote.description",message:"Add blockquote formatting to the selected text",comment:"Description for blockquote formatting command."};var jx=Object.freeze({__proto__:null,DESCRIPTION:_5,LABEL:R5});const I5={id:"extension.command.toggle-bold.label",message:"Bold",comment:"Label for bold formatting command."},M5={id:"extension.command.toggle-bold.description",message:"Add bold formatting to the selected text",comment:"Description for bold formatting command."};var Gx=Object.freeze({__proto__:null,DESCRIPTION:M5,LABEL:I5});const L5={id:"extension.command.toggle-code-block.label",message:"Codeblock",comment:"Label for the code block command."},D5={id:"extension.command.toggle-code-block.description",message:"Add a code block",comment:"Description for the code block command."};var P5=Object.freeze({__proto__:null,DESCRIPTION:D5,LABEL:L5});const z5={id:"extension.command.toggle-code.label",message:"Code",comment:"Label for the inline code formatting."},$5={id:"extension.command.toggle-code.description",message:"Add inline code formatting to the selected text",comment:"Description for the inline code formatting command."};var B5=Object.freeze({__proto__:null,DESCRIPTION:$5,LABEL:z5});const H5={id:"extension.command.toggle-heading.label",message:`{level, select, 1 {Heading 1} +`:"";return`${r}${o}For more information visit ${fR}#${t.toLowerCase()}`}var pR=class extends Z_.BaseError{constructor({code:t,message:e,disableLogging:n=!1}={}){const r=vD(t)?t:re.CUSTOM;super(yD(r,e)),this.errorCode=r,this.url=`${fR}#${r.toLowerCase()}`,n||console.error(this.message)}static create(t={}){return new pR(t)}};function we(t,e){if(!t)throw pR.create(e)}function im(t){if(typeof t!="object"||t===null)return t;const e=Symbol.toStringTag in t&&t[Symbol.toStringTag]==="Module"?t.default??t:t;return e&&typeof t=="object"&&"__esModule"in e&&e.__esModule&&e.default!==void 0?e.default:e}function Oa(t,e={}){return t}function Mn(t){this.content=t}Mn.prototype={constructor:Mn,find:function(t){for(var e=0;e>1}};Mn.from=function(t){if(t instanceof Mn)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Mn(e)};function gR(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let o=t.child(r),i=e.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){let s=gR(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function mR(t,e,n,r){for(let o=t.childCount,i=e.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let s=t.child(--o),l=e.child(--i),a=s.nodeSize;if(s==l){n-=a,r-=a;continue}if(!s.sameMarkup(l))return{a:n,b:r};if(s.isText&&s.text!=l.text){let u=0,c=Math.min(s.text.length,l.text.length);for(;ue&&r(a,o+l,i||null,s)!==!1&&a.content.size){let c=l+1;a.nodesBetween(Math.max(0,e-c),Math.min(a.content.size,n-c),r,o+c)}l=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,o){let i="",s=!0;return this.nodesBetween(e,n,(l,a)=>{l.isText?(i+=l.text.slice(Math.max(e,a)-a,n-a),s=!r):l.isLeaf?(o?i+=typeof o=="function"?o(l):o:l.type.spec.leafText&&(i+=l.type.spec.leafText(l)),s=!r):!s&&l.isBlock&&(i+=r,s=!0)},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);ie)for(let i=0,s=0;se&&((sn)&&(l.isText?l=l.cut(Math.max(0,e-s),Math.min(l.text.length,n-s)):l=l.cut(Math.max(0,e-s-1),Math.min(l.content.size,n-s-1))),r.push(l),o+=l.nodeSize),s=a}return new Q(r,o)}cutByIndex(e,n){return e==n?Q.empty:e==0&&n==this.content.length?this:new Q(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[e]=n,new Q(o,i)}addToStart(e){return new Q([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Q(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;nthis.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,o=0;;r++){let i=this.child(r),s=o+i.nodeSize;if(s>=e)return s==e||n>0?Ef(r+1,s):Ef(r,o);o=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return Q.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new Q(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Q.empty;let n,r=0;for(let o=0;othis.type.rank&&(n||(n=e.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;nr.type.rank-o.type.rank),n}}Ke.none=[];class Bp extends Error{}class ae{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=yR(this.content,e+this.openStart,n);return r&&new ae(r,this.openStart,this.openEnd)}removeBetween(e,n){return new ae(vR(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return ae.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ae(Q.fromJSON(e,n.content),r,o)}static maxOpen(e,n=!0){let r=0,o=0;for(let i=e.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new ae(e,r,o)}}ae.empty=new ae(Q.empty,0,0);function vR(t,e,n){let{index:r,offset:o}=t.findIndex(e),i=t.maybeChild(r),{index:s,offset:l}=t.findIndex(n);if(o==e||i.isText){if(l!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(vR(i.content,e-o-1,n-o-1)))}function yR(t,e,n,r){let{index:o,offset:i}=t.findIndex(e),s=t.maybeChild(o);if(i==e||s.isText)return r&&!r.canReplace(o,o,n)?null:t.cut(0,e).append(n).append(t.cut(e));let l=yR(s.content,e-i-1,n);return l&&t.replaceChild(o,s.copy(l))}function bD(t,e,n){if(n.openStart>t.depth)throw new Bp("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Bp("Inconsistent open depths");return bR(t,e,n,0)}function bR(t,e,n,r){let o=t.index(r),i=t.node(r);if(o==e.index(r)&&r=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function wd(t,e,n,r){let o=(e||t).node(n),i=0,s=e?e.index(n):o.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(Ba(t.nodeAfter,r),i++));for(let l=i;lo&&f0(t,e,o+1),s=r.depth>o&&f0(n,r,o+1),l=[];return wd(null,t,o,l),i&&s&&e.index(o)==n.index(o)?(wR(i,s),Ba(Ha(i,xR(t,e,n,r,o+1)),l)):(i&&Ba(Ha(i,Hp(t,e,o+1)),l),wd(e,n,o,l),s&&Ba(Ha(s,Hp(n,r,o+1)),l)),wd(r,null,o,l),new Q(l)}function Hp(t,e,n){let r=[];if(wd(null,t,n,r),t.depth>n){let o=f0(t,e,n+1);Ba(Ha(o,Hp(t,e,n+1)),r)}return wd(e,null,n,r),new Q(r)}function wD(t,e){let n=e.depth-t.openStart,o=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)o=e.node(i).copy(Q.from(o));return{start:o.resolveNoCache(t.openStart+n),end:o.resolveNoCache(o.content.size-t.openEnd-n)}}class Oc{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=e.child(n);return r?e.child(n).cut(r):o}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let i=0;i0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new Ya(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let s=e;;){let{index:l,offset:a}=s.content.findIndex(i),u=i-a;if(r.push(s,l,o+a),!u||(s=s.child(l),s.isText))break;i=u-1,o+=a+1}return new Oc(n,r,i)}static resolveCached(e,n){for(let o=0;oe&&this.nodesBetween(e,n,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),kR(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=Q.empty,o=0,i=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,o,i),l=s&&s.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let a=o;an.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let o=Q.fromJSON(e,n.content);return e.nodeType(n.type).create(n.attrs,o,r)}};Ts.prototype.text=void 0;class Up extends Ts{constructor(e,n,r,o){if(super(e,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):kR(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Up(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Up(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function kR(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Xa{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new ED(e,n);if(r.next==null)return Xa.empty;let o=ER(r);r.next&&r.err("Unexpected trailing text");let i=MD(RD(o));return OD(i,r),i}matchType(e){for(let n=0;nu.createAndFill()));for(let u=0;u=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let o=0;o{let i=o+(r.validEnd?"*":" ")+" ";for(let s=0;s"+e.indexOf(r.next[s].next);return i}).join(` +`)}}Xa.empty=new Xa(!0);class ED{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function ER(t){let e=[];do e.push(SD(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function SD(t){let e=[];do e.push(CD(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function CD(t){let e=_D(t);for(;;)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("{"))e=TD(t,e);else break;return e}function oS(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function TD(t,e){let n=oS(t),r=n;return t.eat(",")&&(t.next!="}"?r=oS(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function AD(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let o=[];for(let i in n){let s=n[i];s.groups.indexOf(e)>-1&&o.push(s)}return o.length==0&&t.err("No node type or group '"+e+"' found"),o}function _D(t){if(t.eat("(")){let e=ER(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=AD(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function RD(t){let e=[[]];return o(i(t,0),n()),e;function n(){return e.push([])-1}function r(s,l,a){let u={term:a,to:l};return e[s].push(u),u}function o(s,l){s.forEach(a=>a.to=l)}function i(s,l){if(s.type=="choice")return s.exprs.reduce((a,u)=>a.concat(i(u,l)),[]);if(s.type=="seq")for(let a=0;;a++){let u=i(s.exprs[a],l);if(a==s.exprs.length-1)return u;o(u,l=n())}else if(s.type=="star"){let a=n();return r(l,a),o(i(s.expr,a),a),[r(a)]}else if(s.type=="plus"){let a=n();return o(i(s.expr,l),a),o(i(s.expr,a),a),[r(a)]}else{if(s.type=="opt")return[r(l)].concat(i(s.expr,l));if(s.type=="range"){let a=l;for(let u=0;u{t[s].forEach(({term:l,to:a})=>{if(!l)return;let u;for(let c=0;c{u||o.push([l,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let i=e[r.join(",")]=new Xa(r.indexOf(t.length-1)>-1);for(let s=0;s-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;nr[i]=new _R(i,n,s));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class ID{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class Ph{constructor(e,n,r,o){this.name=e,this.rank=n,this.schema=r,this.spec=o,this.attrs=AR(o.attrs),this.excluded=null;let i=CR(this.attrs);this.instance=i?new Ke(this,i):null}create(e=null){return!e&&this.instance?this.instance:new Ke(this,TR(this.attrs,e))}static compile(e,n){let r=Object.create(null),o=0;return e.forEach((i,s)=>r[i]=new Ph(i,o++,n,s)),r}removeFromSet(e){for(var n=0;n-1}}let LD=class{constructor(e){this.cached=Object.create(null);let n=this.spec={};for(let o in e)n[o]=e[o];n.nodes=Mn.from(e.nodes),n.marks=Mn.from(e.marks||{}),this.nodes=g0.compile(this.spec.nodes,this),this.marks=Ph.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],s=i.spec.content||"",l=i.spec.marks;i.contentMatch=r[s]||(r[s]=Xa.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet=l=="_"?null:l?sS(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:sS(this,s.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,o){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof g0){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,o)}text(e,n){let r=this.nodes.text;return new Up(r,r.defaultAttrs,e,Ke.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeFromJSON(e){return Ts.fromJSON(this,e)}markFromJSON(e){return Ke.fromJSON(this,e)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}};function sS(t,e){let n=[];for(let r=0;r-1)&&n.push(s=a)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}let pb=class m0{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[],n.forEach(r=>{r.tag?this.tags.push(r):r.style&&this.styles.push(r)}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let o=e.nodes[r.node];return o.contentMatch.matchType(o)})}parse(e,n={}){let r=new lS(this,n,!1);return r.addAll(e,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new lS(this,n,!0);return r.addAll(e,n.from,n.to),ae.maxOpen(r.finish())}matchTag(e,n,r){for(let o=r?this.tags.indexOf(r)+1:0;oe.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=n))){if(s.getAttrs){let a=s.getAttrs(n);if(a===!1)continue;s.attrs=a||void 0}return s}}}static schemaRules(e){let n=[];function r(o){let i=o.priority==null?50:o.priority,s=0;for(;s{r(s=cS(s)),s.mark||s.ignore||s.clearMark||(s.mark=o)})}for(let o in e.nodes){let i=e.nodes[o].spec.parseDOM;i&&i.forEach(s=>{r(s=cS(s)),s.node||s.ignore||s.mark||(s.node=o)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new m0(e,m0.schemaRules(e)))}};const RR={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},ND={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},MR={ol:!0,ul:!0},Wp=1,Vp=2,xd=4;function aS(t,e,n){return e!=null?(e?Wp:0)|(e==="full"?Vp:0):t&&t.whitespace=="pre"?Wp|Vp:n&~xd}class Sf{constructor(e,n,r,o,i,s,l){this.type=e,this.attrs=n,this.marks=r,this.pendingMarks=o,this.solid=i,this.options=l,this.content=[],this.activeMarks=Ke.none,this.stashMarks=[],this.match=s||(l&xd?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(Q.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(e.type))?(this.match=r,o):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Wp)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let n=Q.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(Q.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}popFromStashMark(e){for(let n=this.stashMarks.length-1;n>=0;n--)if(e.eq(this.stashMarks[n]))return this.stashMarks.splice(n,1)[0]}applyPending(e){for(let n=0,r=this.pendingMarks;nthis.addAll(e)),s&&this.sync(l),this.needsBlock=a}else this.withStyleRules(e,()=>{this.addElementByRule(e,i,i.consuming===!1?o:void 0)})}leafFallback(e){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(` +`))}ignoreFallback(e){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(e){let n=Ke.none,r=Ke.none;for(let o=0;o{s.clearMark(l)&&(r=l.addToSet(r))}):n=this.parser.schema.marks[s.mark].create(s.attrs).addToSet(n),s.consuming===!1)i=s;else break}return[n,r]}addElementByRule(e,n,r){let o,i,s;n.node?(i=this.parser.schema.nodes[n.node],i.isLeaf?this.insertNode(i.create(n.attrs))||this.leafFallback(e):o=this.enter(i,n.attrs||null,n.preserveWhitespace)):(s=this.parser.schema.marks[n.mark].create(n.attrs),this.addPendingMark(s));let l=this.top;if(i&&i.isLeaf)this.findInside(e);else if(r)this.addElement(e,r);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a));else{let a=e;typeof n.contentElement=="string"?a=e.querySelector(n.contentElement):typeof n.contentElement=="function"?a=n.contentElement(e):n.contentElement&&(a=n.contentElement),this.findAround(e,a,!0),this.addAll(a)}o&&this.sync(l)&&this.open--,s&&this.removePendingMark(s,l)}addAll(e,n,r){let o=n||0;for(let i=n?e.childNodes[n]:e.firstChild,s=r==null?null:e.childNodes[r];i!=s;i=i.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(i);this.findAtPoint(e,o)}findPlace(e){let n,r;for(let o=this.open;o>=0;o--){let i=this.nodes[o],s=i.findWrapping(e);if(s&&(!n||n.length>s.length)&&(n=s,r=i,!s.length)||i.solid)break}if(!n)return!1;this.sync(r);for(let o=0;othis.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let n=this.open;n>=0;n--)if(this.nodes[n]==e)return this.open=n,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)e+=r[o].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(l,a)=>{for(;l>=0;l--){let u=n[l];if(u==""){if(l==n.length-1||l==0)continue;for(;a>=i;a--)if(s(l-1,a))return!0;return!1}else{let c=a>0||a==0&&o?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!c||c.name!=u&&c.groups.indexOf(u)==-1)return!1;a--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}addPendingMark(e){let n=FD(e,this.top.pendingMarks);n&&this.top.stashMarks.push(n),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,n){for(let r=this.open;r>=0;r--){let o=this.nodes[r];if(o.pendingMarks.lastIndexOf(e)>-1)o.pendingMarks=e.removeFromSet(o.pendingMarks);else{o.activeMarks=e.removeFromSet(o.activeMarks);let s=o.popFromStashMark(e);s&&o.type&&o.type.allowsMarkType(s.type)&&(o.activeMarks=s.addToSet(o.activeMarks))}if(o==n)break}}}function $D(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&MR.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function DD(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function PD(t){let e=/\s*([\w-]+)\s*:\s*([^;]+)/g,n,r=[];for(;n=e.exec(t);)r.push(n[1],n[2].trim());return r}function cS(t){let e={};for(let n in t)e[n]=t[n];return e}function zD(t,e){let n=e.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(t))continue;let i=[],s=l=>{i.push(l);for(let a=0;a{if(i.length||s.marks.length){let l=0,a=0;for(;l=0;o--){let i=this.serializeMark(e.marks[o],e.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,n,r={}){let o=this.marks[e.type.name];return o&&Ur.renderSpec(Kv(r),o(e,n))}static renderSpec(e,n,r=null){if(typeof n=="string")return{dom:e.createTextNode(n)};if(n.nodeType!=null)return{dom:n};if(n.dom&&n.dom.nodeType!=null)return n;let o=n[0],i=o.indexOf(" ");i>0&&(r=o.slice(0,i),o=o.slice(i+1));let s,l=r?e.createElementNS(r,o):e.createElement(o),a=n[1],u=1;if(a&&typeof a=="object"&&a.nodeType==null&&!Array.isArray(a)){u=2;for(let c in a)if(a[c]!=null){let d=c.indexOf(" ");d>0?l.setAttributeNS(c.slice(0,d),c.slice(d+1),a[c]):l.setAttribute(c,a[c])}}for(let c=u;cu)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:h,contentDOM:f}=Ur.renderSpec(e,d,r);if(l.appendChild(h),f){if(s)throw new RangeError("Multiple content holes");s=f}}}return{dom:l,contentDOM:s}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Ur(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=uS(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return uS(e.marks)}}function uS(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Kv(t){return t.document||window.document}const OR=65535,IR=Math.pow(2,16);function BD(t,e){return t+e*IR}function dS(t){return t&OR}function HD(t){return(t-(t&OR))/IR}const LR=1,NR=2,op=4,$R=8;class v0{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&$R)>0}get deletedBefore(){return(this.delInfo&(LR|op))>0}get deletedAfter(){return(this.delInfo&(NR|op))>0}get deletedAcross(){return(this.delInfo&op)>0}}class Fr{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Fr.empty)return Fr.empty}recover(e){let n=0,r=dS(e);if(!this.inverted)for(let o=0;oe)break;let u=this.ranges[l+i],c=this.ranges[l+s],d=a+u;if(e<=d){let h=u?e==a?-1:e==d?1:n:n,f=a+o+(h<0?0:c);if(r)return f;let p=e==(n<0?a:d)?null:BD(l/3,e-a),g=e==a?NR:e==d?LR:op;return(n<0?e!=a:e!=d)&&(g|=$R),new v0(f,g,p)}o+=c-u}return r?e+o:new v0(e+o,0,null)}touches(e,n){let r=0,o=dS(n),i=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;le)break;let u=this.ranges[l+i],c=a+u;if(e<=c&&l==o*3)return!0;r+=this.ranges[l+s]-u}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o=0;n--){let o=e.getMirror(n);this.appendMap(e.maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let e=new pc;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;ri&&a!s.isAtom||!l.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),n.openStart,n.openEnd);return Xt.fromReplace(e,this.from,this.to,i)}invert(){return new Po(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Ii(n.pos,r.pos,this.mark)}merge(e){return e instanceof Ii&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ii(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Ii(n.from,n.to,e.markFromJSON(n.mark))}}dn.jsonID("addMark",Ii);class Po extends dn{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new ae(gb(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),n.openStart,n.openEnd);return Xt.fromReplace(e,this.from,this.to,r)}invert(){return new Ii(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Po(n.pos,r.pos,this.mark)}merge(e){return e instanceof Po&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Po(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Po(n.from,n.to,e.markFromJSON(n.mark))}}dn.jsonID("removeMark",Po);class xs extends dn{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Xt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Xt.fromReplace(e,this.pos,this.pos+1,new ae(Q.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;or.pos?null:new qt(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new qt(n.from,n.to,n.gapFrom,n.gapTo,ae.fromJSON(e,n.slice),n.insert,!!n.structure)}}dn.jsonID("replaceAround",qt);function y0(t,e,n){let r=t.resolve(e),o=n-e,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function UD(t,e,n,r){let o=[],i=[],s,l;t.doc.nodesBetween(e,n,(a,u,c)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let h=Math.max(u,e),f=Math.min(u+a.nodeSize,n),p=r.addToSet(d);for(let g=0;gt.step(a)),i.forEach(a=>t.step(a))}function WD(t,e,n,r){let o=[],i=0;t.doc.nodesBetween(e,n,(s,l)=>{if(!s.isInline)return;i++;let a=null;if(r instanceof Ph){let u=s.marks,c;for(;c=r.isInSet(u);)(a||(a=[])).push(c),u=c.removeFromSet(u)}else r?r.isInSet(s.marks)&&(a=[r]):a=s.marks;if(a&&a.length){let u=Math.min(l+s.nodeSize,n);for(let c=0;ct.step(new Po(s.from,s.to,s.style)))}function VD(t,e,n,r=n.contentMatch){let o=t.doc.nodeAt(e),i=[],s=e+1;for(let l=0;l=0;l--)t.step(i[l])}function jD(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function au(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth;;--r){let o=t.$from.node(r),i=t.$from.index(r),s=t.$to.indexAfter(r);if(rn;p--)g||r.index(p)>0?(g=!0,c=Q.from(r.node(p).copy(c)),d++):a--;let h=Q.empty,f=0;for(let p=i,g=!1;p>n;p--)g||o.after(p+1)=0;s--){if(r.size){let l=n[s].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=Q.from(n[s].type.create(n[s].attrs,r))}let o=e.start,i=e.end;t.step(new qt(o,i,o,i,new ae(r,0,0),n.length,!0))}function qD(t,e,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=t.steps.length;t.doc.nodesBetween(e,n,(s,l)=>{if(s.isTextblock&&!s.hasMarkup(r,o)&&ZD(t.doc,t.mapping.slice(i).map(l),r)){t.clearIncompatible(t.mapping.slice(i).map(l,1),r);let a=t.mapping.slice(i),u=a.map(l,1),c=a.map(l+s.nodeSize,1);return t.step(new qt(u,c,u+1,c-1,new ae(Q.from(r.create(o,null,s.marks)),0,0),1,!0)),!1}})}function ZD(t,e,n){let r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function QD(t,e,n,r,o){let i=t.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return t.replaceWith(e,e+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new qt(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new ae(Q.from(s),0,0),1,!0))}function gc(t,e,n=1,r){let o=t.resolve(e),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let u=o.depth-1,c=n-2;u>i;u--,c--){let d=o.node(u),h=o.index(u);if(d.type.spec.isolating)return!1;let f=d.content.cutByIndex(h,d.childCount),p=r&&r[c+1];p&&(f=f.replaceChild(0,p.type.create(p.attrs)));let g=r&&r[c]||d;if(!d.canReplace(h+1,d.childCount)||!g.type.validContent(f))return!1}let l=o.indexAfter(i),a=r&&r[0];return o.node(i).canReplaceWith(l,l,a?a.type:o.node(i+1).type)}function JD(t,e,n=1,r){let o=t.doc.resolve(e),i=Q.empty,s=Q.empty;for(let l=o.depth,a=o.depth-n,u=n-1;l>a;l--,u--){i=Q.from(o.node(l).copy(i));let c=r&&r[u];s=Q.from(c?c.type.create(c.attrs,s):o.node(l).copy(s))}t.step(new yn(e,e,new ae(i.append(s),n,n),!0))}function zh(t,e){let n=t.resolve(e),r=n.index();return eP(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function eP(t,e){return!!(t&&e&&!t.isLeaf&&t.canAppend(e))}function tP(t,e,n){let r=new yn(e-n,e+n,ae.empty,!0);t.step(r)}function DR(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i=0;s--){let l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,a=r.index(s)+(l>0?1:0),u=r.node(s),c=!1;if(i==1)c=u.canReplace(a,a,o);else{let d=u.contentMatchAt(a).findWrapping(o.firstChild.type);c=d&&u.canReplaceWith(a,a,d[0])}if(c)return l==0?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function vb(t,e,n=e,r=ae.empty){if(e==n&&!r.size)return null;let o=t.resolve(e),i=t.resolve(n);return PR(o,i,r)?new yn(e,n,r):new rP(o,i,r).fit()}function PR(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class rP{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=Q.empty;for(let o=0;o<=e.depth;o++){let i=e.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(o))})}for(let o=e.depth;o>0;o--)this.placed=Q.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;let i=this.placed,s=r.depth,l=o.depth;for(;s&&l&&i.childCount==1;)i=i.firstChild.content,s--,l--;let a=new ae(i,s,l);return e>-1?new qt(r.pos,e,this.$to.pos,this.$to.end(),a,n):a.size||r.pos!=this.$to.pos?new yn(r.pos,o.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r1&&(o=0),i.type.spec.isolating&&o<=r){e=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=Xv(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let s=o.firstChild;for(let l=this.depth;l>=0;l--){let{type:a,match:u}=this.frontier[l],c,d=null;if(n==1&&(s?u.matchType(s.type)||(d=u.fillBefore(Q.from(s),!1)):i&&a.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:l,parent:i,inject:d};if(n==2&&s&&(c=u.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:l,parent:i,wrap:c};if(i&&u.matchType(i.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=Xv(e,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new ae(e,n+1,Math.max(r,o.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=Xv(e,n);if(o.childCount<=1&&n>0){let i=e.size-n<=n+o.size;this.unplaced=new ae(Fu(e,n-1,1),n-1,i?n-1:r)}else this.unplaced=new ae(Fu(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:o,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let g=0;g1||a==0||g.content.size)&&(d=m,c.push(zR(g.mark(h.allowedMarks(g.marks)),u==1?a:0,u==l.childCount?f:-1)))}let p=u==l.childCount;p||(f=-1),this.placed=Bu(this.placed,n,Q.from(c)),this.frontier[n].match=d,p&&f<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let g=0,m=l;g1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],i=n=0;l--){let{match:a,type:u}=this.frontier[l],c=qv(e,l,u,a,!0);if(!c||c.childCount)continue e}return{depth:n,fit:s,move:i?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Bu(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let o=e.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,e.index(r));this.openFrontierNode(o.type,o.attrs,i)}return e}openFrontierNode(e,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=Bu(this.placed,this.depth,Q.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(Q.empty,!0);n.childCount&&(this.placed=Bu(this.placed,this.frontier.length,n))}}function Fu(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(Fu(t.firstChild.content,e-1,n)))}function Bu(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Bu(t.lastChild.content,e-1,n)))}function Xv(t,e){for(let n=0;n1&&(r=r.replaceChild(0,zR(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(Q.empty,!0)))),t.copy(r)}function qv(t,e,n,r,o){let i=t.node(e),s=o?t.indexAfter(e):t.index(e);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let l=r.fillBefore(i.content,!0,s);return l&&!oP(n,i.content,s)?l:null}function oP(t,e,n){for(let r=n;r0;h--,f--){let p=o.node(h).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;s.indexOf(h)>-1?l=h:o.before(h)==f&&s.splice(1,0,-h)}let a=s.indexOf(l),u=[],c=r.openStart;for(let h=r.content,f=0;;f++){let p=h.firstChild;if(u.push(p),f==r.openStart)break;h=p.content}for(let h=c-1;h>=0;h--){let f=u[h],p=iP(f.type);if(p&&!f.sameMarkup(o.node(Math.abs(l)-1)))c=h;else if(p||!f.type.isTextblock)break}for(let h=r.openStart;h>=0;h--){let f=(h+c+1)%(r.openStart+1),p=u[f];if(p)for(let g=0;g=0&&(t.replace(e,n,r),!(t.steps.length>d));h--){let f=s[h];f<0||(e=o.before(f),n=i.after(f))}}function FR(t,e,n,r,o){if(er){let i=o.contentMatchAt(0),s=i.fillBefore(t).append(t);t=s.append(i.matchFragment(s).fillBefore(Q.empty,!0))}return t}function aP(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let o=DR(t.doc,e,r.type);o!=null&&(e=n=o)}t.replaceRange(e,n,new ae(Q.from(r),0,0))}function lP(t,e,n){let r=t.doc.resolve(e),o=t.doc.resolve(n),i=BR(r,o);for(let s=0;s0&&(a||r.node(l-1).canReplace(r.index(l-1),o.indexAfter(l-1))))return t.delete(r.before(l),o.after(l))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(e-r.start(s)==r.depth-s&&n>r.end(s)&&o.end(s)-n!=o.depth-s)return t.delete(r.before(s),n);t.delete(e,n)}function BR(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let o=r;o>=0;o--){let i=t.start(o);if(ie.pos+(e.depth-o)||t.node(o).type.spec.isolating||e.node(o).type.spec.isolating)break;(i==e.start(o)||o==t.depth&&o==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&o&&e.start(o-1)==i-1)&&n.push(o)}return n}class mc extends dn{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return Xt.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return Xt.fromReplace(e,this.pos,this.pos+1,new ae(Q.from(o),0,n.isLeaf?0:1))}getMap(){return Fr.empty}invert(e){return new mc(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new mc(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new mc(n.pos,n.attr,n.value)}}dn.jsonID("attr",mc);class Hd extends dn{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let o in e.attrs)n[o]=e.attrs[o];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return Xt.ok(r)}getMap(){return Fr.empty}invert(e){return new Hd(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Hd(n.attr,n.value)}}dn.jsonID("docAttr",Hd);let Lc=class extends Error{};Lc=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};Lc.prototype=Object.create(Error.prototype);Lc.prototype.constructor=Lc;Lc.prototype.name="TransformError";class cP{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new pc}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new Lc(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=ae.empty){let o=vb(this.doc,e,n,r);return o&&this.step(o),this}replaceWith(e,n,r){return this.replace(e,n,new ae(Q.from(r),0,0))}delete(e,n){return this.replace(e,n,ae.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return sP(this,e,n,r),this}replaceRangeWith(e,n,r){return aP(this,e,n,r),this}deleteRange(e,n){return lP(this,e,n),this}lift(e,n){return GD(this,e,n),this}join(e,n=1){return tP(this,e,n),this}wrap(e,n){return XD(this,e,n),this}setBlockType(e,n=e,r,o=null){return qD(this,e,n,r,o),this}setNodeMarkup(e,n,r=null,o){return QD(this,e,n,r,o),this}setNodeAttribute(e,n,r){return this.step(new mc(e,n,r)),this}setDocAttribute(e,n){return this.step(new Hd(e,n)),this}addNodeMark(e,n){return this.step(new xs(e,n)),this}removeNodeMark(e,n){if(!(n instanceof Ke)){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n=n.isInSet(r.marks),!n)return this}return this.step(new Ic(e,n)),this}split(e,n=1,r){return JD(this,e,n,r),this}addMark(e,n,r){return UD(this,e,n,r),this}removeMark(e,n,r){return WD(this,e,n,r),this}clearIncompatible(e,n,r){return VD(this,e,n,r),this}}const Zv=Object.create(null);class Ue{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new uP(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n=0;i--){let s=n<0?Vl(e.node(0),e.node(i),e.before(i+1),e.index(i),n,r):Vl(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,n,r);if(s)return s}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new or(e.node(0))}static atStart(e){return Vl(e,e,0,0,1)||new or(e)}static atEnd(e){return Vl(e,e,e.content.size,e.childCount,-1)||new or(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Zv[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Zv)throw new RangeError("Duplicate use of selection JSON ID "+e);return Zv[e]=n,n.prototype.jsonID=e,n}getBookmark(){return Ie.between(this.$anchor,this.$head).getBookmark()}}Ue.prototype.visible=!0;class uP{constructor(e,n){this.$from=e,this.$to=n}}let fS=!1;function pS(t){!fS&&!t.parent.inlineContent&&(fS=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class Ie extends Ue{constructor(e,n=e){pS(e),pS(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return Ue.near(r);let o=e.resolve(n.map(this.anchor));return new Ie(o.parent.inlineContent?o:r,r)}replace(e,n=ae.empty){if(super.replace(e,n),n==ae.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof Ie&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new sm(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Ie(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let o=e.resolve(n);return new this(o,r==n?o:e.resolve(r))}static between(e,n,r){let o=e.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let i=Ue.findFrom(n,r,!0)||Ue.findFrom(n,-r,!0);if(i)n=i.$head;else return Ue.near(n,r)}return e.parent.inlineContent||(o==0?e=n:(e=(Ue.findFrom(e,-r,!0)||Ue.findFrom(e,r,!0)).$anchor,e.pos0?0:1);o>0?s=0;s+=o){let l=e.child(s);if(l.isAtom){if(!i&&Le.isSelectable(l))return Le.create(t,n-(o<0?l.nodeSize:0))}else{let a=Vl(t,l,n+o,o<0?l.childCount:0,o,i);if(a)return a}n+=l.nodeSize*o}return null}function gS(t,e,n){let r=t.steps.length-1;if(r{s==null&&(s=c)}),t.setSelection(Ue.near(t.doc.resolve(s),n))}const mS=1,Cf=2,vS=4;class hP extends cP{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Cf,this}ensureMarks(e){return Ke.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Cf)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~Cf,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||Ke.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let o=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(o.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),r=r??n,!e)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let s=this.doc.resolve(n);i=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(e,i)),this.selection.empty||this.setSelection(Ue.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=vS,this}get scrolledIntoView(){return(this.updated&vS)>0}}function yS(t,e){return!e||!t?t:t.bind(e)}class Hu{constructor(e,n,r){this.name=e,this.init=yS(n.init,r),this.apply=yS(n.apply,r)}}const fP=[new Hu("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new Hu("selection",{init(t,e){return t.selection||Ue.atStart(e.doc)},apply(t){return t.selection}}),new Hu("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new Hu("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class Qv{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=fP.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Hu(r.key,r.spec.state,r))})}}class Ia{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;rr.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=e[r],i=o.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(o,this[o.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let o=new Qv(e.schema,e.plugins),i=new Ia(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=Ts.fromJSON(e.schema,n.doc);else if(s.name=="selection")i.selection=Ue.fromJSON(i.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let l in r){let a=r[l],u=a.spec.state;if(a.key==s.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,l)){i[s.name]=u.fromJSON.call(a,e,n[l],i);return}}i[s.name]=s.init(e,i)}}),i}}function HR(t,e,n){for(let r in t){let o=t[r];o instanceof Function?o=o.bind(e):r=="handleDOMEvents"&&(o=HR(o,e,{})),n[r]=o}return n}class gi{constructor(e){this.spec=e,this.props={},e.props&&HR(e.props,this,this.props),this.key=e.key?e.key.key:UR("plugin")}getState(e){return e[this.key]}}const Jv=Object.create(null);function UR(t){return t in Jv?t+"$"+ ++Jv[t]:(Jv[t]=0,t+"$")}class gl{constructor(e="key"){this.key=UR(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}var pP=/[A-Z]/g,gP=/^ms-/,e1={};function mP(t){return"-"+t.toLowerCase()}function vP(t){if(e1.hasOwnProperty(t))return e1[t];var e=t.replace(pP,mP);return e1[t]=gP.test(e)?"-"+e:e}function yP(t){return vP(t)}function bP(t,e){return yP(t)+":"+e}function wP(t){var e="";for(var n in t){var r=t[n];typeof r!="string"&&typeof r!="number"||(e&&(e+=";"),e+=bP(n,r))}return e}function xP(){return typeof document<"u"?document:null}var WR=xP;function VR(t,e){if(typeof t!="string")return[t];var n=[t];typeof e=="string"||Array.isArray(e)?e={brackets:e}:e||(e={});var r=e.brackets?Array.isArray(e.brackets)?e.brackets:[e.brackets]:["{}","[]","()"],o=e.escape||"___",i=!!e.flat;r.forEach(function(a){var u=new RegExp(["\\",a[0],"[^\\",a[0],"\\",a[1],"]*\\",a[1]].join("")),c=[];function d(h,f,p){var g=n.push(h.slice(a[0].length,-a[1].length))-1;return c.push(g),o+g+o}n.forEach(function(h,f){for(var p,g=0;h!=p;)if(p=h,h=h.replace(u,d),g++>1e4)throw Error("References have circular dependency. Please, check them.");n[f]=h}),c=c.reverse(),n=n.map(function(h){return c.forEach(function(f){h=h.replace(new RegExp("(\\"+o+f+"\\"+o+")","g"),a[0]+"$1"+a[1])}),h})});var s=new RegExp("\\"+o+"([0-9]+)\\"+o);function l(a,u,c){for(var d=[],h,f=0;h=s.exec(a);){if(f++>1e4)throw Error("Circular references in parenthesis");d.push(a.slice(0,h.index)),d.push(l(u[h[1]],u)),a=a.slice(h.index+h[0].length)}return d.push(a),d}return i?n:l(n[0],n)}function jR(t,e){if(e&&e.flat){var n=e&&e.escape||"___",r=t[0],o;if(!r)return"";for(var i=new RegExp("\\"+n+"([0-9]+)\\"+n),s=0;r!=o;){if(s++>1e4)throw Error("Circular references in "+t);o=r,r=r.replace(i,l)}return r}return t.reduce(function a(u,c){return Array.isArray(c)&&(c=c.reduce(a,"")),u+c},"");function l(a,u){if(t[u]==null)throw Error("Reference "+u+"is undefined");return t[u]}}function GR(t,e){return Array.isArray(t)?jR(t,e):VR(t,e)}GR.parse=VR;GR.stringify=jR;const kP={id:"extension.command.copy.label",message:"Copy",comment:"Label for copy command."},EP={id:"extension.command.copy.description",message:"Copy the selected text",comment:"Description for copy command."},SP={id:"extension.command.cut.label",message:"Cut",comment:"Label for cut command."},CP={id:"extension.command.cut.description",message:"Cut the selected text",comment:"Description for cut command."},TP={id:"extension.command.paste.label",message:"Paste",comment:"Label for paste command."},AP={id:"extension.command.paste.description",message:"Paste content into the editor",comment:"Description for paste command."},_P={id:"extension.command.select-all.label",message:"Select all",comment:"Label for select all command."},RP={id:"extension.command.select-all.description",message:"Select all content within the editor",comment:"Description for select all command."};var Hs=Object.freeze({__proto__:null,COPY_DESCRIPTION:EP,COPY_LABEL:kP,CUT_DESCRIPTION:CP,CUT_LABEL:SP,PASTE_DESCRIPTION:AP,PASTE_LABEL:TP,SELECT_ALL_DESCRIPTION:RP,SELECT_ALL_LABEL:_P});const MP={id:"keyboard.shortcut.escape",message:"Enter",comment:"Label for escape key in shortcuts."},OP={id:"keyboard.shortcut.command",message:"Command",comment:"Label for command key in shortcuts."},IP={id:"keyboard.shortcut.control",message:"Control",comment:"Label for control key in shortcuts."},LP={id:"keyboard.shortcut.enter",message:"Enter",comment:"Label for enter key in shortcuts."},NP={id:"keyboard.shortcut.shift",message:"Shift",comment:"Label for shift key in shortcuts."},$P={id:"keyboard.shortcut.alt",message:"Alt",comment:"Label for alt key in shortcuts."},DP={id:"keyboard.shortcut.capsLock",message:"Caps Lock",comment:"Label for caps lock key in shortcuts."},PP={id:"keyboard.shortcut.backspace",message:"Backspace",comment:"Label for backspace key in shortcuts."},zP={id:"keyboard.shortcut.tab",message:"Tab",comment:"Label for tab key in shortcuts."},FP={id:"keyboard.shortcut.space",message:"Space",comment:"Label for space key in shortcuts."},BP={id:"keyboard.shortcut.delete",message:"Delete",comment:"Label for delete key in shortcuts."},HP={id:"keyboard.shortcut.pageUp",message:"Page Up",comment:"Label for page up key in shortcuts."},UP={id:"keyboard.shortcut.pageDown",message:"Page Down",comment:"Label for page down key in shortcuts."},WP={id:"keyboard.shortcut.home",message:"Home",comment:"Label for home key in shortcuts."},VP={id:"keyboard.shortcut.end",message:"End",comment:"Label for end key in shortcuts."},jP={id:"keyboard.shortcut.arrowLeft",message:"Arrow Left",comment:"Label for arrow left key in shortcuts."},GP={id:"keyboard.shortcut.arrowRight",message:"Arrow Right",comment:"Label for arrow right key in shortcuts."},KP={id:"keyboard.shortcut.arrowUp",message:"Arrow Up",comment:"Label for arrow up key in shortcuts."},YP={id:"keyboard.shortcut.arrowDown",message:"Arrow Down",comment:"Label for arrowDown key in shortcuts."};var on=Object.freeze({__proto__:null,ALT_KEY:$P,ARROW_DOWN_KEY:YP,ARROW_LEFT_KEY:jP,ARROW_RIGHT_KEY:GP,ARROW_UP_KEY:KP,BACKSPACE_KEY:PP,CAPS_LOCK_KEY:DP,COMMAND_KEY:OP,CONTROL_KEY:IP,DELETE_KEY:BP,END_KEY:VP,ENTER_KEY:LP,ESCAPE_KEY:MP,HOME_KEY:WP,PAGE_DOWN_KEY:UP,PAGE_UP_KEY:HP,SHIFT_KEY:NP,SPACE_KEY:FP,TAB_KEY:zP});const XP={id:"extension.command.toggle-blockquote.label",message:"Blockquote",comment:"Label for blockquote formatting command."},qP={id:"extension.command.toggle-blockquote.description",message:"Add blockquote formatting to the selected text",comment:"Description for blockquote formatting command."};var bS=Object.freeze({__proto__:null,DESCRIPTION:qP,LABEL:XP});const ZP={id:"extension.command.toggle-bold.label",message:"Bold",comment:"Label for bold formatting command."},QP={id:"extension.command.toggle-bold.description",message:"Add bold formatting to the selected text",comment:"Description for bold formatting command."};var wS=Object.freeze({__proto__:null,DESCRIPTION:QP,LABEL:ZP});const JP={id:"extension.command.toggle-code-block.label",message:"Codeblock",comment:"Label for the code block command."},e5={id:"extension.command.toggle-code-block.description",message:"Add a code block",comment:"Description for the code block command."};var t5=Object.freeze({__proto__:null,DESCRIPTION:e5,LABEL:JP});const n5={id:"extension.command.toggle-code.label",message:"Code",comment:"Label for the inline code formatting."},r5={id:"extension.command.toggle-code.description",message:"Add inline code formatting to the selected text",comment:"Description for the inline code formatting command."};var o5=Object.freeze({__proto__:null,DESCRIPTION:r5,LABEL:n5});const i5={id:"extension.command.toggle-heading.label",message:`{level, select, 1 {Heading 1} 2 {Heading 2} 3 {Heading 3} 4 {Heading 4} 5 {Heading 5} 6 {Heading 6} -other {Heading}}`,comment:"Label for heading command with support for levels."};var F5=Object.freeze({__proto__:null,LABEL:H5});const U5={id:"extension.command.undo.label",message:"Undo",comment:"Label for undo."},V5={id:"extension.command.undo.description",message:"Undo the most recent action",comment:"Description for undo."},j5={id:"extension.command.redo.label",message:"Redo",comment:"Label for redo."},G5={id:"extension.command.redo.description",message:"Redo the most recent action",comment:"Description for redo."};var Pf=Object.freeze({__proto__:null,REDO_DESCRIPTION:G5,REDO_LABEL:j5,UNDO_DESCRIPTION:V5,UNDO_LABEL:U5});const W5={id:"extension.command.insert-horizontal-rule.label",message:"Divider",comment:"Label for inserting a horizontal rule (divider) command."},K5={id:"extension.command.insert-horizontal-rule.description",message:"Separate content with a diving horizontal line",comment:"Description for inserting a horizontal rule (divider) command."};var Wx=Object.freeze({__proto__:null,DESCRIPTION:K5,LABEL:W5});const Y5={id:"extension.command.toggle-italic.label",message:"Italic",comment:"Label for italic formatting command."},q5={id:"extension.command.toggle-italic.description",message:"Italicize the selected text",comment:"Description for italic formatting command."};var Kx=Object.freeze({__proto__:null,DESCRIPTION:q5,LABEL:Y5});const X5={id:"extension.command.toggle-ordered-list.label",message:"Ordered list",comment:"Label for inserting an ordered list into the editor."},Z5={id:"extension.command.toggle-bullet-list.description",message:"Bulleted list",comment:"Description for inserting a bullet list into the editor."},J5={id:"extension.command.toggle-task-list.description",message:"Tasked list",comment:"Description for inserting a task list into the editor."};var Yy=Object.freeze({__proto__:null,BULLET_LIST_LABEL:Z5,ORDERED_LIST_LABEL:X5,TASK_LIST_LABEL:J5});const Q5={id:"extension.command.insert-paragraph.label",message:"Insert Paragraph",comment:"Label for inserting a paragraph."},eD={id:"extension.command.insert-paragraph.description",message:"Insert a new paragraph",comment:"Description for inserting a paragraph."},tD={id:"extension.command.convert-paragraph.label",message:"Convert Paragraph",comment:"Label for converting the current node into a paragraph."},rD={id:"extension.command.convert-paragraph.description",message:"Convert current block into a paragraph block.",comment:"Description for converting a paragraph."};var zf=Object.freeze({__proto__:null,CONVERT_DESCRIPTION:rD,CONVERT_LABEL:tD,INSERT_DESCRIPTION:eD,INSERT_LABEL:Q5});const nD={id:"extension.command.toggle-strike.label",message:"Strikethrough",comment:"Label for strike formatting command."},oD={id:"extension.command.toggle-strike.description",message:"Strikethrough the selected text",comment:"Description for strike formatting command."};var Yx=Object.freeze({__proto__:null,DESCRIPTION:oD,LABEL:nD});const iD={id:"extension.command.toggle-underline.label",message:"Underline",comment:"Label for underline formatting command."},sD={id:"extension.command.toggle-underline.description",message:"Underline the selected text",comment:"Description for underline formatting command."};var qx=Object.freeze({__proto__:null,DESCRIPTION:sD,LABEL:iD});class Oa{constructor(t,r){this.match=t,this.match=t,this.handler=typeof r=="string"?aD(r):r}}function aD(e){return function(t,r,n,o){let i=e;if(r[1]){let s=r[0].lastIndexOf(r[1]);i+=r[0].slice(s+r[1].length),n+=s;let a=n-o;a>0&&(i=r[0].slice(s-a,s)+i,n=o)}return t.tr.insertText(i,n,o)}}const lD=500;function cD({rules:e}){let t=new Po({state:{init(){return null},apply(r,n){let o=r.getMeta(this);return o||(r.selectionSet||r.docChanged?null:n)}},props:{handleTextInput(r,n,o,i){return Xx(r,n,o,i,e,t)},handleDOMEvents:{compositionend:r=>{setTimeout(()=>{let{$cursor:n}=r.state.selection;n&&Xx(r,n.pos,n.pos,"",e,t)})}}},isInputRules:!0});return t}function Xx(e,t,r,n,o,i){if(e.composing)return!1;let s=e.state,a=s.doc.resolve(t);if(a.parent.type.spec.code)return!1;let l=a.parent.textBetween(Math.max(0,a.parentOffset-lD),a.parentOffset,null,"")+n;for(let c=0;c{let r=e.plugins;for(let n=0;n=0;l--)s.step(a.steps[l].invert(a.docs[l]));if(i.text){let l=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,e.schema.text(i.text,l))}else s.delete(i.from,i.to);t(s)}return!0}}return!1};function Xh(e,t,r=null,n){return new Oa(e,(o,i,s,a)=>{let l=r instanceof Function?r(i):r,c=o.tr.delete(s,a),u=c.doc.resolve(s),d=u.blockRange(),p=d&&Gy(d,t,l);if(!p)return null;c.wrap(d,p);let f=c.doc.resolve(s-1).nodeBefore;return f&&f.type==t&&Hd(c.doc,s-1)&&(!n||n(i,f))&&c.join(s-1),c})}function dD(e,t,r=null){return new Oa(e,(n,o,i,s)=>{let a=n.doc.resolve(i),l=r instanceof Function?r(o):r;return a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),t)?n.tr.delete(i,s).setBlockType(i,i,t,l):null})}const Er=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},Gu=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let Zx=null;const Wo=function(e,t,r){let n=Zx||(Zx=document.createRange());return n.setEnd(e,r??e.nodeValue.length),n.setStart(e,t||0),n},la=function(e,t,r,n){return r&&(Jx(e,t,r,n,-1)||Jx(e,t,r,n,1))},pD=/^(img|br|input|textarea|hr)$/i;function Jx(e,t,r,n,o){for(;;){if(e==r&&t==n)return!0;if(t==(o<0?0:ko(e))){let i=e.parentNode;if(!i||i.nodeType!=1||qy(e)||pD.test(e.nodeName)||e.contentEditable=="false")return!1;t=Er(e)+(o<0?0:1),e=i}else if(e.nodeType==1){if(e=e.childNodes[t+(o<0?-1:0)],e.contentEditable=="false")return!1;t=o<0?ko(e):0}else return!1}}function ko(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function fD(e,t,r){for(let n=t==0,o=t==ko(e);n||o;){if(e==r)return!0;let i=Er(e);if(e=e.parentNode,!e)return!1;n=n&&i==0,o=o&&i==ko(e)}}function qy(e){let t;for(let r=e;r&&!(t=r.pmViewDesc);r=r.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const Zh=function(e){return e.focusNode&&la(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function Us(e,t){let r=document.createEvent("Event");return r.initEvent("keydown",!0,!0),r.keyCode=e,r.key=r.code=t,r}function hD(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function mD(e,t,r){if(e.caretPositionFromPoint)try{let n=e.caretPositionFromPoint(t,r);if(n)return{node:n.offsetNode,offset:n.offset}}catch{}if(e.caretRangeFromPoint){let n=e.caretRangeFromPoint(t,r);if(n)return{node:n.startContainer,offset:n.startOffset}}}const _o=typeof navigator<"u"?navigator:null,Qx=typeof document<"u"?document:null,ys=_o&&_o.userAgent||"",X1=/Edge\/(\d+)/.exec(ys),cO=/MSIE \d/.exec(ys),Z1=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ys),Hr=!!(cO||Z1||X1),Gi=cO?document.documentMode:Z1?+Z1[1]:X1?+X1[1]:0,ao=!Hr&&/gecko\/(\d+)/i.test(ys);ao&&+(/Firefox\/(\d+)/.exec(ys)||[0,0])[1];const J1=!Hr&&/Chrome\/(\d+)/.exec(ys),hr=!!J1,gD=J1?+J1[1]:0,Tr=!Hr&&!!_o&&/Apple Computer/.test(_o.vendor),$l=Tr&&(/Mobile\/\w+/.test(ys)||!!_o&&_o.maxTouchPoints>2),Cn=$l||(_o?/Mac/.test(_o.platform):!1),yD=_o?/Win/.test(_o.platform):!1,eo=/Android \d/.test(ys),Fd=!!Qx&&"webkitFontSmoothing"in Qx.documentElement.style,vD=Fd?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function bD(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Ho(e,t){return typeof e=="number"?e:e[t]}function ED(e){let t=e.getBoundingClientRect(),r=t.width/e.offsetWidth||1,n=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*r,top:t.top,bottom:t.top+e.clientHeight*n}}function eS(e,t,r){let n=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument;for(let s=r||e.dom;s;s=Gu(s)){if(s.nodeType!=1)continue;let a=s,l=a==i.body,c=l?bD(i):ED(a),u=0,d=0;if(t.topc.bottom-Ho(n,"bottom")&&(d=t.bottom-t.top>c.bottom-c.top?t.top+Ho(o,"top")-c.top:t.bottom-c.bottom+Ho(o,"bottom")),t.leftc.right-Ho(n,"right")&&(u=t.right-c.right+Ho(o,"right")),u||d)if(l)i.defaultView.scrollBy(u,d);else{let p=a.scrollLeft,f=a.scrollTop;d&&(a.scrollTop+=d),u&&(a.scrollLeft+=u);let h=a.scrollLeft-p,m=a.scrollTop-f;t={left:t.left-h,top:t.top-m,right:t.right-h,bottom:t.bottom-m}}if(l||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function kD(e){let t=e.dom.getBoundingClientRect(),r=Math.max(0,t.top),n,o;for(let i=(t.left+t.right)/2,s=r+1;s=r-20){n=a,o=l.top;break}}return{refDOM:n,refTop:o,stack:uO(e.dom)}}function uO(e){let t=[],r=e.ownerDocument;for(let n=e;n&&(t.push({dom:n,top:n.scrollTop,left:n.scrollLeft}),e!=r);n=Gu(n));return t}function xD({refDOM:e,refTop:t,stack:r}){let n=e?e.getBoundingClientRect().top:0;dO(r,n==0?0:n-t)}function dO(e,t){for(let r=0;r=a){s=Math.max(h.bottom,s),a=Math.min(h.top,a);let m=h.left>t.left?h.left-t.left:h.right=(h.left+h.right)/2?1:0));continue}}else h.top>t.top&&!l&&h.left<=t.left&&h.right>=t.left&&(l=u,c={left:Math.max(h.left,Math.min(h.right,t.left)),top:h.top});!r&&(t.left>=h.right&&t.top>=h.top||t.left>=h.left&&t.top>=h.bottom)&&(i=d+1)}}return!r&&l&&(r=l,o=c,n=0),r&&r.nodeType==3?wD(r,o):!r||n&&r.nodeType==1?{node:e,offset:i}:pO(r,o)}function wD(e,t){let r=e.nodeValue.length,n=document.createRange();for(let o=0;o=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}function Xy(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function TD(e,t){let r=e.parentNode;return r&&/^li$/i.test(r.nodeName)&&t.left(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(n,o,i)}function OD(e,t,r,n){let o=-1;for(let i=t,s=!1;i!=e.dom;){let a=e.docView.nearestDesc(i,!0);if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent&&!s||!a.contentDOM)){let l=a.dom.getBoundingClientRect();if(a.node.isBlock&&a.parent&&!s&&(s=!0,l.left>n.left||l.top>n.top?o=a.posBefore:(l.right-1?o:e.docView.posFromDOM(t,r,-1)}function fO(e,t,r){let n=e.childNodes.length;if(n&&r.topt.top&&o++}let c;Fd&&o&&n.nodeType==1&&(c=n.childNodes[o-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=t.top&&o--,n==e.dom&&o==n.childNodes.length-1&&n.lastChild.nodeType==1&&t.top>n.lastChild.getBoundingClientRect().bottom?a=e.state.doc.content.size:(o==0||n.nodeType!=1||n.childNodes[o-1].nodeName!="BR")&&(a=OD(e,n,o,t))}a==null&&(a=CD(e,s,t));let l=e.docView.nearestDesc(s,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function tS(e){return e.top=0&&o==n.nodeValue.length?(l--,u=1):r<0?l--:c++,Cc(Ti(Wo(n,l,c),u),u<0)}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(i==null&&o&&(r<0||o==ko(n))){let l=n.childNodes[o-1];if(l.nodeType==1)return Dg(l.getBoundingClientRect(),!1)}if(i==null&&o=0)}if(i==null&&o&&(r<0||o==ko(n))){let l=n.childNodes[o-1],c=l.nodeType==3?Wo(l,ko(l)-(s?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(c)return Cc(Ti(c,1),!1)}if(i==null&&o=0)}function Cc(e,t){if(e.width==0)return e;let r=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:r,right:r}}function Dg(e,t){if(e.height==0)return e;let r=t?e.top:e.bottom;return{top:r,bottom:r,left:e.left,right:e.right}}function mO(e,t,r){let n=e.state,o=e.root.activeElement;n!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return r()}finally{n!=t&&e.updateState(n),o!=e.dom&&o&&o.focus()}}function RD(e,t,r){let n=t.selection,o=r=="up"?n.$from:n.$to;return mO(e,t,()=>{let{node:i}=e.docView.domFromPos(o.pos,r=="up"?-1:1);for(;;){let a=e.docView.nearestDesc(i,!0);if(!a)break;if(a.node.isBlock){i=a.contentDOM||a.dom;break}i=a.dom.parentNode}let s=hO(e,o.pos,1);for(let a=i.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=Wo(a,0,a.nodeValue.length).getClientRects();else continue;for(let c=0;cu.top+1&&(r=="up"?s.top-u.top>(u.bottom-s.top)*2:u.bottom-s.bottom>(s.bottom-u.top)*2))return!1}}return!0})}const _D=/[\u0590-\u08ac]/;function ID(e,t,r){let{$head:n}=t.selection;if(!n.parent.isTextblock)return!1;let o=n.parentOffset,i=!o,s=o==n.parent.content.size,a=e.domSelection();return!_D.test(n.parent.textContent)||!a.modify?r=="left"||r=="backward"?i:s:mO(e,t,()=>{let{focusNode:l,focusOffset:c,anchorNode:u,anchorOffset:d}=e.domSelectionRange(),p=a.caretBidiLevel;a.modify("move",r,"character");let f=n.depth?e.docView.domAfterPos(n.before()):e.dom,{focusNode:h,focusOffset:m}=e.domSelectionRange(),b=h&&!f.contains(h.nodeType==1?h:h.parentNode)||l==h&&c==m;try{a.collapse(u,d),l&&(l!=u||c!=d)&&a.extend&&a.extend(l,c)}catch{}return p!=null&&(a.caretBidiLevel=p),b})}let rS=null,nS=null,oS=!1;function MD(e,t,r){return rS==t&&nS==r?oS:(rS=t,nS=r,oS=r=="up"||r=="down"?RD(e,t,r):ID(e,t,r))}const In=0,iS=1,Gs=2,Io=3;class Ud{constructor(t,r,n,o){this.parent=t,this.children=r,this.dom=n,this.contentDOM=o,this.dirty=In,n.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,r,n){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let r=0;rEr(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(r==0)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&r==t.childNodes.length)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??n>0?this.posAtEnd:this.posAtStart}nearestDesc(t,r=!1){for(let n=!0,o=t;o;o=o.parentNode){let i=this.getDesc(o),s;if(i&&(!r||i.node))if(n&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(t.nodeType==1?t:t.parentNode):s==t))n=!1;else return i}}getDesc(t){let r=t.pmViewDesc;for(let n=r;n;n=n.parent)if(n==this)return r}posFromDOM(t,r,n){for(let o=t;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(t,r,n)}return-1}descAt(t){for(let r=0,n=0;rt||s instanceof yO){o=t-i;break}i=a}if(o)return this.children[n].domFromPos(o-this.children[n].border,r);for(let i;n&&!(i=this.children[n-1]).size&&i instanceof gO&&i.side>=0;n--);if(r<=0){let i,s=!0;for(;i=n?this.children[n-1]:null,!(!i||i.dom.parentNode==this.contentDOM);n--,s=!1);return i&&r&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,r):{node:this.contentDOM,offset:i?Er(i.dom)+1:0}}else{let i,s=!0;for(;i=n=u&&r<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(t,r,u);t=s;for(let d=a;d>0;d--){let p=this.children[d-1];if(p.size&&p.dom.parentNode==this.contentDOM&&!p.emptyChildAt(1)){o=Er(p.dom)+1;break}t-=p.size}o==-1&&(o=0)}if(o>-1&&(c>r||a==this.children.length-1)){r=c;for(let u=a+1;uf&&sr){let f=a;a=l,l=f}let p=document.createRange();p.setEnd(l.node,l.offset),p.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(p)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,r){for(let n=0,o=0;o=n:tn){let a=n+i.border,l=s-i.border;if(t>=a&&r<=l){this.dirty=t==n||r==s?Gs:iS,t==a&&r==l&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Io:i.markDirty(t-a,r-a);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?Gs:Io}n=s}this.dirty=Gs}markParentsDirty(){let t=1;for(let r=this.parent;r;r=r.parent,t++){let n=t==1?Gs:iS;r.dirty{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!r.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=r,this.widget=r,i=this}matchesWidget(t){return this.dirty==In&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let r=this.widget.spec.stopEvent;return r?r(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class LD extends Ud{constructor(t,r,n,o){super(t,[],r,null),this.textDOM=n,this.text=o}get size(){return this.text.length}localPosFromDOM(t,r){return t!=this.textDOM?this.posAtStart+(r?this.size:0):this.posAtStart+r}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class ca extends Ud{constructor(t,r,n,o){super(t,[],n,o),this.mark=r}static create(t,r,n,o){let i=o.nodeViews[r.type.name],s=i&&i(r,o,n);return(!s||!s.dom)&&(s=un.renderSpec(document,r.type.spec.toDOM(r,n))),new ca(t,r,s.dom,s.contentDOM||s.dom)}parseRule(){return this.dirty&Io||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=Io&&this.mark.eq(t)}markDirty(t,r){if(super.markDirty(t,r),this.dirty!=In){let n=this.parent;for(;!n.node;)n=n.parent;n.dirty0&&(i=t0(i,0,t,n));for(let a=0;a{if(!l)return s;if(l.parent)return l.parent.posBeforeChild(l)},n,o),u=c&&c.dom,d=c&&c.contentDOM;if(r.isText){if(!u)u=document.createTextNode(r.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:d}=un.renderSpec(document,r.type.spec.toDOM(r)));!d&&!r.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),r.type.spec.draggable&&(u.draggable=!0));let p=u;return u=EO(u,n,r),c?l=new DD(t,r,n,o,u,d||null,p,c,i,s+1):r.isText?new Jh(t,r,n,o,u,p,i):new Wi(t,r,n,o,u,d||null,p,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let r=this.children.length-1;r>=0;r--){let n=this.children[r];if(this.dom.contains(n.dom.parentNode)){t.contentElement=n.dom.parentNode;break}}t.contentElement||(t.getContent=()=>I.empty)}return t}matchesNode(t,r,n){return this.dirty==In&&t.eq(this.node)&&e0(r,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,r){let n=this.node.inlineContent,o=r,i=t.composing?this.localCompositionInfo(t,r):null,s=i&&i.pos>-1?i:null,a=i&&i.pos<0,l=new zD(this,s&&s.node,t);HD(this.node,this.innerDeco,(c,u,d)=>{c.spec.marks?l.syncToMarks(c.spec.marks,n,t):c.type.side>=0&&!d&&l.syncToMarks(u==this.node.childCount?Ne.none:this.node.child(u).marks,n,t),l.placeWidget(c,t,o)},(c,u,d,p)=>{l.syncToMarks(c.marks,n,t);let f;l.findNodeMatch(c,u,d,p)||a&&t.state.selection.from>o&&t.state.selection.to-1&&l.updateNodeAt(c,u,d,f,t)||l.updateNextNode(c,u,d,t,p,o)||l.addNode(c,u,d,t,o),o+=c.nodeSize}),l.syncToMarks([],n,t),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==Gs)&&(s&&this.protectLocalComposition(t,s),vO(this.contentDOM,this.children,t),$l&&FD(this.dom))}localCompositionInfo(t,r){let{from:n,to:o}=t.state.selection;if(!(t.state.selection instanceof ue)||nr+this.node.content.size)return null;let i=t.domSelectionRange(),s=UD(i.focusNode,i.focusOffset);if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let a=s.nodeValue,l=VD(this.node.content,a,n-r,o-r);return l<0?null:{node:s,pos:l,text:a}}else return{node:s,pos:-1,text:""}}protectLocalComposition(t,{node:r,pos:n,text:o}){if(this.getDesc(r))return;let i=r;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let s=new LD(this,i,r,o);t.input.compositionNodes.push(s),this.children=t0(this.children,n,n+o.length,t,s)}update(t,r,n,o){return this.dirty==Io||!t.sameMarkup(this.node)?!1:(this.updateInner(t,r,n,o),!0)}updateInner(t,r,n,o){this.updateOuterDeco(r),this.node=t,this.innerDeco=n,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=In}updateOuterDeco(t){if(e0(t,this.outerDeco))return;let r=this.nodeDOM.nodeType!=1,n=this.dom;this.dom=bO(this.dom,this.nodeDOM,Q1(this.outerDeco,this.node,r),Q1(t,this.node,r)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function sS(e,t,r,n,o){EO(n,t,e);let i=new Wi(void 0,e,t,r,n,n,n,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class Jh extends Wi{constructor(t,r,n,o,i,s,a){super(t,r,n,o,i,null,s,a,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,r,n,o){return this.dirty==Io||this.dirty!=In&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(r),(this.dirty!=In||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=t,this.dirty=In,!0)}inParent(){let t=this.parent.contentDOM;for(let r=this.nodeDOM;r;r=r.parentNode)if(r==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,r,n){return t==this.nodeDOM?this.posAtStart+Math.min(r,this.node.text.length):super.localPosFromDOM(t,r,n)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,r,n){let o=this.node.cut(t,r),i=document.createTextNode(o.text);return new Jh(this.parent,o,this.outerDeco,this.innerDeco,i,i,n)}markDirty(t,r){super.markDirty(t,r),this.dom!=this.nodeDOM&&(t==0||r==this.nodeDOM.nodeValue.length)&&(this.dirty=Io)}get domAtom(){return!1}}class yO extends Ud{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==In&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class DD extends Wi{constructor(t,r,n,o,i,s,a,l,c,u){super(t,r,n,o,i,s,a,c,u),this.spec=l}update(t,r,n,o){if(this.dirty==Io)return!1;if(this.spec.update){let i=this.spec.update(t,r,n);return i&&this.updateInner(t,r,n,o),i}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,r,n,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,r,n,o){this.spec.setSelection?this.spec.setSelection(t,r,n):super.setSelection(t,r,n,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function vO(e,t,r){let n=e.firstChild,o=!1;for(let i=0;i>1,s=Math.min(i,t.length);for(;o-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=ca.create(this.top,t[i],r,n);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,i++}}findNodeMatch(t,r,n,o){let i=-1,s;if(o>=this.preMatch.index&&(s=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&s.matchesNode(t,r,n))i=this.top.children.indexOf(s,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a0;){let a;for(;;)if(n){let c=r.children[n-1];if(c instanceof ca)r=c,n=c.children.length;else{a=c,n--;break}}else{if(r==t)break e;n=r.parent.children.indexOf(r),r=r.parent}let l=a.node;if(l){if(l!=e.child(o-1))break;--o,i.set(a,o),s.push(a)}}return{index:o,matched:i,matches:s.reverse()}}function BD(e,t){return e.type.side-t.type.side}function HD(e,t,r,n){let o=t.locals(e),i=0;if(o.length==0){for(let c=0;ci;)a.push(o[s++]);let h=i+p.nodeSize;if(p.isText){let b=h;s!b.inline):a.slice();n(p,m,t.forChild(i,p),f),i=h}}function FD(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function UD(e,t){for(;;){if(e.nodeType==3)return e;if(e.nodeType==1&&t>0){if(e.childNodes.length>t&&e.childNodes[t].nodeType==3)return e.childNodes[t];e=e.childNodes[t-1],t=ko(e)}else if(e.nodeType==1&&t=r){if(i>=n&&l.slice(n-t.length-a,n-a)==t)return n-t.length;let c=a=0&&c+t.length+a>=r)return a+c;if(r==n&&l.length>=n+t.length-a&&l.slice(n-a,n-a+t.length)==t)return n}}return-1}function t0(e,t,r,n,o){let i=[];for(let s=0,a=0;s=r||u<=t?i.push(l):(cr&&i.push(l.slice(r-c,l.size,n)))}return i}function Zy(e,t=null){let r=e.domSelectionRange(),n=e.state.doc;if(!r.focusNode)return null;let o=e.docView.nearestDesc(r.focusNode),i=o&&o.size==0,s=e.docView.posFromDOM(r.focusNode,r.focusOffset,1);if(s<0)return null;let a=n.resolve(s),l,c;if(Zh(r)){for(l=a;o&&!o.node;)o=o.parent;let u=o.node;if(o&&u.isAtom&&de.isSelectable(u)&&o.parent&&!(u.isInline&&fD(r.focusNode,r.focusOffset,o.dom))){let d=o.posBefore;c=new de(s==d?a:n.resolve(d))}}else{let u=e.docView.posFromDOM(r.anchorNode,r.anchorOffset,1);if(u<0)return null;l=n.resolve(u)}if(!c){let u=t=="pointer"||e.state.selection.head{(r.anchorNode!=n||r.anchorOffset!=o)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!kO(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function GD(e){let t=e.domSelection(),r=document.createRange(),n=e.cursorWrapper.dom,o=n.nodeName=="IMG";o?r.setEnd(n.parentNode,Er(n)+1):r.setEnd(n,0),r.collapse(!1),t.removeAllRanges(),t.addRange(r),!o&&!e.state.selection.visible&&Hr&&Gi<=11&&(n.disabled=!0,n.disabled=!1)}function xO(e,t){if(t instanceof de){let r=e.docView.descAt(t.from);r!=e.lastSelectedViewDesc&&(dS(e),r&&r.selectNode(),e.lastSelectedViewDesc=r)}else dS(e)}function dS(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Jy(e,t,r,n){return e.someProp("createSelectionBetween",o=>o(e,t,r))||ue.between(t,r,n)}function pS(e){return e.editable&&!e.hasFocus()?!1:SO(e)}function SO(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function WD(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),r=e.domSelectionRange();return la(t.node,t.offset,r.anchorNode,r.anchorOffset)}function r0(e,t){let{$anchor:r,$head:n}=e.selection,o=t>0?r.max(n):r.min(n),i=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return i&&ke.findFrom(i,t)}function _i(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function fS(e,t,r){let n=e.state.selection;if(n instanceof ue)if(r.indexOf("s")>-1){let{$head:o}=n,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let s=e.state.doc.resolve(o.pos+i.nodeSize*(t<0?-1:1));return _i(e,new ue(n.$anchor,s))}else if(n.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let o=r0(e.state,t);return o&&o instanceof de?_i(e,o):!1}else if(!(Cn&&r.indexOf("m")>-1)){let o=n.$head,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter,s;if(!i||i.isText)return!1;let a=t<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(s=e.docView.descAt(a))&&!s.contentDOM?de.isSelectable(i)?_i(e,new de(t<0?e.state.doc.resolve(o.pos-i.nodeSize):o)):Fd?_i(e,new ue(e.state.doc.resolve(t<0?a:a+i.nodeSize))):!1:!1}}else return!1;else{if(n instanceof de&&n.node.isInline)return _i(e,new ue(t>0?n.$to:n.$from));{let o=r0(e.state,t);return o?_i(e,o):!1}}}function $f(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Cu(e,t){let r=e.pmViewDesc;return r&&r.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function $a(e,t){return t<0?KD(e):YD(e)}function KD(e){let t=e.domSelectionRange(),r=t.focusNode,n=t.focusOffset;if(!r)return;let o,i,s=!1;for(ao&&r.nodeType==1&&n<$f(r)&&Cu(r.childNodes[n],-1)&&(s=!0);;)if(n>0){if(r.nodeType!=1)break;{let a=r.childNodes[n-1];if(Cu(a,-1))o=r,i=--n;else if(a.nodeType==3)r=a,n=r.nodeValue.length;else break}}else{if(wO(r))break;{let a=r.previousSibling;for(;a&&Cu(a,-1);)o=r.parentNode,i=Er(a),a=a.previousSibling;if(a)r=a,n=$f(r);else{if(r=r.parentNode,r==e.dom)break;n=0}}}s?n0(e,r,n):o&&n0(e,o,i)}function YD(e){let t=e.domSelectionRange(),r=t.focusNode,n=t.focusOffset;if(!r)return;let o=$f(r),i,s;for(;;)if(n{e.state==o&&oi(e)},50)}function hS(e,t){let r=e.state.doc.resolve(t);if(!(hr||yD)&&r.parent.inlineContent){let o=e.coordsAtPos(t);if(t>r.start()){let i=e.coordsAtPos(t-1),s=(i.top+i.bottom)/2;if(s>o.top&&s1)return i.lefto.top&&s1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function mS(e,t,r){let n=e.state.selection;if(n instanceof ue&&!n.empty||r.indexOf("s")>-1||Cn&&r.indexOf("m")>-1)return!1;let{$from:o,$to:i}=n;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=r0(e.state,t);if(s&&s instanceof de)return _i(e,s)}if(!o.parent.inlineContent){let s=t<0?o:i,a=n instanceof xr?ke.near(s,t):ke.findFrom(s,t);return a?_i(e,a):!1}return!1}function gS(e,t){if(!(e.state.selection instanceof ue))return!0;let{$head:r,$anchor:n,empty:o}=e.state.selection;if(!r.sameParent(n))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let i=!r.textOffset&&(t<0?r.nodeBefore:r.nodeAfter);if(i&&!i.isText){let s=e.state.tr;return t<0?s.delete(r.pos-i.nodeSize,r.pos):s.delete(r.pos,r.pos+i.nodeSize),e.dispatch(s),!0}return!1}function yS(e,t,r){e.domObserver.stop(),t.contentEditable=r,e.domObserver.start()}function ZD(e){if(!Tr||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:r}=e.domSelectionRange();if(t&&t.nodeType==1&&r==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let n=t.firstChild;yS(e,n,"true"),setTimeout(()=>yS(e,n,"false"),20)}return!1}function JD(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function QD(e,t){let r=t.keyCode,n=JD(t);if(r==8||Cn&&r==72&&n=="c")return gS(e,-1)||$a(e,-1);if(r==46&&!t.shiftKey||Cn&&r==68&&n=="c")return gS(e,1)||$a(e,1);if(r==13||r==27)return!0;if(r==37||Cn&&r==66&&n=="c"){let o=r==37?hS(e,e.state.selection.from)=="ltr"?-1:1:-1;return fS(e,o,n)||$a(e,o)}else if(r==39||Cn&&r==70&&n=="c"){let o=r==39?hS(e,e.state.selection.from)=="ltr"?1:-1:1;return fS(e,o,n)||$a(e,o)}else{if(r==38||Cn&&r==80&&n=="c")return mS(e,-1,n)||$a(e,-1);if(r==40||Cn&&r==78&&n=="c")return ZD(e)||mS(e,1,n)||$a(e,1);if(n==(Cn?"m":"c")&&(r==66||r==73||r==89||r==90))return!0}return!1}function TO(e,t){e.someProp("transformCopied",f=>{t=f(t,e)});let r=[],{content:n,openStart:o,openEnd:i}=t;for(;o>1&&i>1&&n.childCount==1&&n.firstChild.childCount==1;){o--,i--;let f=n.firstChild;r.push(f.type.name,f.attrs!=f.type.defaultAttrs?f.attrs:null),n=f.content}let s=e.someProp("clipboardSerializer")||un.fromSchema(e.state.schema),a=_O(),l=a.createElement("div");l.appendChild(s.serializeFragment(n,{document:a}));let c=l.firstChild,u,d=0;for(;c&&c.nodeType==1&&(u=RO[c.nodeName.toLowerCase()]);){for(let f=u.length-1;f>=0;f--){let h=a.createElement(u[f]);for(;l.firstChild;)h.appendChild(l.firstChild);l.appendChild(h),d++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${o} ${i}${d?` -${d}`:""} ${JSON.stringify(r)}`);let p=e.someProp("clipboardTextSerializer",f=>f(t,e))||t.content.textBetween(0,t.content.size,` +other {Heading}}`,comment:"Label for heading command with support for levels."};var s5=Object.freeze({__proto__:null,LABEL:i5});const a5={id:"extension.command.undo.label",message:"Undo",comment:"Label for undo."},l5={id:"extension.command.undo.description",message:"Undo the most recent action",comment:"Description for undo."},c5={id:"extension.command.redo.label",message:"Redo",comment:"Label for redo."},u5={id:"extension.command.redo.description",message:"Redo the most recent action",comment:"Description for redo."};var jp=Object.freeze({__proto__:null,REDO_DESCRIPTION:u5,REDO_LABEL:c5,UNDO_DESCRIPTION:l5,UNDO_LABEL:a5});const d5={id:"extension.command.insert-horizontal-rule.label",message:"Divider",comment:"Label for inserting a horizontal rule (divider) command."},h5={id:"extension.command.insert-horizontal-rule.description",message:"Separate content with a diving horizontal line",comment:"Description for inserting a horizontal rule (divider) command."};var xS=Object.freeze({__proto__:null,DESCRIPTION:h5,LABEL:d5});const f5={id:"extension.command.toggle-italic.label",message:"Italic",comment:"Label for italic formatting command."},p5={id:"extension.command.toggle-italic.description",message:"Italicize the selected text",comment:"Description for italic formatting command."};var kS=Object.freeze({__proto__:null,DESCRIPTION:p5,LABEL:f5});const g5={id:"extension.command.toggle-ordered-list.label",message:"Ordered list",comment:"Label for inserting an ordered list into the editor."},m5={id:"extension.command.toggle-bullet-list.description",message:"Bulleted list",comment:"Description for inserting a bullet list into the editor."},v5={id:"extension.command.toggle-task-list.description",message:"Tasked list",comment:"Description for inserting a task list into the editor."};var bb=Object.freeze({__proto__:null,BULLET_LIST_LABEL:m5,ORDERED_LIST_LABEL:g5,TASK_LIST_LABEL:v5});const y5={id:"extension.command.insert-paragraph.label",message:"Insert Paragraph",comment:"Label for inserting a paragraph."},b5={id:"extension.command.insert-paragraph.description",message:"Insert a new paragraph",comment:"Description for inserting a paragraph."},w5={id:"extension.command.convert-paragraph.label",message:"Convert Paragraph",comment:"Label for converting the current node into a paragraph."},x5={id:"extension.command.convert-paragraph.description",message:"Convert current block into a paragraph block.",comment:"Description for converting a paragraph."};var Gp=Object.freeze({__proto__:null,CONVERT_DESCRIPTION:x5,CONVERT_LABEL:w5,INSERT_DESCRIPTION:b5,INSERT_LABEL:y5});const k5={id:"extension.command.toggle-strike.label",message:"Strikethrough",comment:"Label for strike formatting command."},E5={id:"extension.command.toggle-strike.description",message:"Strikethrough the selected text",comment:"Description for strike formatting command."};var ES=Object.freeze({__proto__:null,DESCRIPTION:E5,LABEL:k5});const S5={id:"extension.command.toggle-underline.label",message:"Underline",comment:"Label for underline formatting command."},C5={id:"extension.command.toggle-underline.description",message:"Underline the selected text",comment:"Description for underline formatting command."};var SS=Object.freeze({__proto__:null,DESCRIPTION:C5,LABEL:S5});class ml{constructor(e,n){this.match=e,this.match=e,this.handler=typeof n=="string"?T5(n):n}}function T5(t){return function(e,n,r,o){let i=t;if(n[1]){let s=n[0].lastIndexOf(n[1]);i+=n[0].slice(s+n[1].length),r+=s;let l=r-o;l>0&&(i=n[0].slice(s-l,s)+i,r=o)}return e.tr.insertText(i,r,o)}}const A5=500;function _5({rules:t}){let e=new gi({state:{init(){return null},apply(n,r){let o=n.getMeta(this);return o||(n.selectionSet||n.docChanged?null:r)}},props:{handleTextInput(n,r,o,i){return CS(n,r,o,i,t,e)},handleDOMEvents:{compositionend:n=>{setTimeout(()=>{let{$cursor:r}=n.state.selection;r&&CS(n,r.pos,r.pos,"",t,e)})}}},isInputRules:!0});return e}function CS(t,e,n,r,o,i){if(t.composing)return!1;let s=t.state,l=s.doc.resolve(e);if(l.parent.type.spec.code)return!1;let a=l.parent.textBetween(Math.max(0,l.parentOffset-A5),l.parentOffset,null,"")+r;for(let u=0;u{let n=t.plugins;for(let r=0;r=0;a--)s.step(l.steps[a].invert(l.docs[a]));if(i.text){let a=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,t.schema.text(i.text,a))}else s.delete(i.from,i.to);e(s)}return!0}}return!1};function am(t,e,n=null,r){return new ml(t,(o,i,s,l)=>{let a=n instanceof Function?n(i):n,u=o.tr.delete(s,l),c=u.doc.resolve(s),d=c.blockRange(),h=d&&mb(d,e,a);if(!h)return null;u.wrap(d,h);let f=u.doc.resolve(s-1).nodeBefore;return f&&f.type==e&&zh(u.doc,s-1)&&(!r||r(i,f))&&u.join(s-1),u})}function M5(t,e,n=null){return new ml(t,(r,o,i,s)=>{let l=r.doc.resolve(i),a=n instanceof Function?n(o):n;return l.node(-1).canReplaceWith(l.index(-1),l.indexAfter(-1),e)?r.tr.delete(i,s).setBlockType(i,i,e,a):null})}const nr=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},Ud=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let TS=null;const Ai=function(t,e,n){let r=TS||(TS=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},qa=function(t,e,n,r){return n&&(AS(t,e,n,r,-1)||AS(t,e,n,r,1))},O5=/^(img|br|input|textarea|hr)$/i;function AS(t,e,n,r,o){for(;;){if(t==n&&e==r)return!0;if(e==(o<0?0:ei(t))){let i=t.parentNode;if(!i||i.nodeType!=1||wb(t)||O5.test(t.nodeName)||t.contentEditable=="false")return!1;e=nr(t)+(o<0?0:1),t=i}else if(t.nodeType==1){if(t=t.childNodes[e+(o<0?-1:0)],t.contentEditable=="false")return!1;e=o<0?ei(t):0}else return!1}}function ei(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function I5(t,e,n){for(let r=e==0,o=e==ei(t);r||o;){if(t==n)return!0;let i=nr(t);if(t=t.parentNode,!t)return!1;r=r&&i==0,o=o&&i==ei(t)}}function wb(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const lm=function(t){return t.focusNode&&qa(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function Ma(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function L5(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function N5(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:r.offset}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:r.startOffset}}}const ui=typeof navigator<"u"?navigator:null,_S=typeof document<"u"?document:null,Qs=ui&&ui.userAgent||"",b0=/Edge\/(\d+)/.exec(Qs),KR=/MSIE \d/.exec(Qs),w0=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Qs),xr=!!(KR||w0||b0),As=KR?document.documentMode:w0?+w0[1]:b0?+b0[1]:0,Ho=!xr&&/gecko\/(\d+)/i.test(Qs);Ho&&+(/Firefox\/(\d+)/.exec(Qs)||[0,0])[1];const x0=!xr&&/Chrome\/(\d+)/.exec(Qs),Kn=!!x0,$5=x0?+x0[1]:0,ar=!xr&&!!ui&&/Apple Computer/.test(ui.vendor),Nc=ar&&(/Mobile\/\w+/.test(Qs)||!!ui&&ui.maxTouchPoints>2),oo=Nc||(ui?/Mac/.test(ui.platform):!1),D5=ui?/Win/.test(ui.platform):!1,Lo=/Android \d/.test(Qs),Fh=!!_S&&"webkitFontSmoothing"in _S.documentElement.style,P5=Fh?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function z5(t){return{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function wi(t,e){return typeof t=="number"?t:t[e]}function F5(t){let 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 RS(t,e,n){let r=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument;for(let s=n||t.dom;s;s=Ud(s)){if(s.nodeType!=1)continue;let l=s,a=l==i.body,u=a?z5(i):F5(l),c=0,d=0;if(e.topu.bottom-wi(r,"bottom")&&(d=e.bottom-e.top>u.bottom-u.top?e.top+wi(o,"top")-u.top:e.bottom-u.bottom+wi(o,"bottom")),e.leftu.right-wi(r,"right")&&(c=e.right-u.right+wi(o,"right")),c||d)if(a)i.defaultView.scrollBy(c,d);else{let h=l.scrollLeft,f=l.scrollTop;d&&(l.scrollTop+=d),c&&(l.scrollLeft+=c);let p=l.scrollLeft-h,g=l.scrollTop-f;e={left:e.left-p,top:e.top-g,right:e.right-p,bottom:e.bottom-g}}if(a||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function B5(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,o;for(let i=(e.left+e.right)/2,s=n+1;s=n-20){r=l,o=a.top;break}}return{refDOM:r,refTop:o,stack:YR(t.dom)}}function YR(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=Ud(r));return e}function H5({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;XR(n,r==0?0:r-e)}function XR(t,e){for(let n=0;n=l){s=Math.max(p.bottom,s),l=Math.min(p.top,l);let g=p.left>e.left?p.left-e.left:p.right=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!a&&p.left<=e.left&&p.right>=e.left&&(a=c,u={left:Math.max(p.left,Math.min(p.right,e.left)),top:p.top});!n&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(i=d+1)}}return!n&&a&&(n=a,o=u,r=0),n&&n.nodeType==3?W5(n,o):!n||r&&n.nodeType==1?{node:t,offset:i}:qR(n,o)}function W5(t,e){let n=t.nodeValue.length,r=document.createRange();for(let o=0;o=(i.left+i.right)/2?1:0)}}return{node:t,offset:0}}function xb(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function V5(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left(s.left+s.right)/2?1:-1}return t.docView.posFromDOM(r,o,i)}function G5(t,e,n,r){let o=-1;for(let i=e,s=!1;i!=t.dom;){let l=t.docView.nearestDesc(i,!0);if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent&&!s||!l.contentDOM)){let a=l.dom.getBoundingClientRect();if(l.node.isBlock&&l.parent&&!s&&(s=!0,a.left>r.left||a.top>r.top?o=l.posBefore:(a.right-1?o:t.docView.posFromDOM(e,n,-1)}function ZR(t,e,n){let r=t.childNodes.length;if(r&&n.tope.top&&o++}let u;Fh&&o&&r.nodeType==1&&(u=r.childNodes[o-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=e.top&&o--,r==t.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?l=t.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(l=G5(t,r,o,e))}l==null&&(l=j5(t,s,e));let a=t.docView.nearestDesc(s,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function MS(t){return t.top=0&&o==r.nodeValue.length?(a--,c=1):n<0?a--:u++,Eu(as(Ai(r,a,u),c),c<0)}if(!t.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==ei(r))){let a=r.childNodes[o-1];if(a.nodeType==1)return t1(a.getBoundingClientRect(),!1)}if(i==null&&o=0)}if(i==null&&o&&(n<0||o==ei(r))){let a=r.childNodes[o-1],u=a.nodeType==3?Ai(a,ei(a)-(s?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(u)return Eu(as(u,1),!1)}if(i==null&&o=0)}function Eu(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function t1(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function JR(t,e,n){let r=t.state,o=t.root.activeElement;r!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),o!=t.dom&&o&&o.focus()}}function X5(t,e,n){let r=e.selection,o=n=="up"?r.$from:r.$to;return JR(t,e,()=>{let{node:i}=t.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let l=t.docView.nearestDesc(i,!0);if(!l)break;if(l.node.isBlock){i=l.contentDOM||l.dom;break}i=l.dom.parentNode}let s=QR(t,o.pos,1);for(let l=i.firstChild;l;l=l.nextSibling){let a;if(l.nodeType==1)a=l.getClientRects();else if(l.nodeType==3)a=Ai(l,0,l.nodeValue.length).getClientRects();else continue;for(let u=0;uc.top+1&&(n=="up"?s.top-c.top>(c.bottom-s.top)*2:c.bottom-s.bottom>(s.bottom-c.top)*2))return!1}}return!0})}const q5=/[\u0590-\u08ac]/;function Z5(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,l=t.domSelection();return!q5.test(r.parent.textContent)||!l.modify?n=="left"||n=="backward"?i:s:JR(t,e,()=>{let{focusNode:a,focusOffset:u,anchorNode:c,anchorOffset:d}=t.domSelectionRange(),h=l.caretBidiLevel;l.modify("move",n,"character");let f=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:p,focusOffset:g}=t.domSelectionRange(),m=p&&!f.contains(p.nodeType==1?p:p.parentNode)||a==p&&u==g;try{l.collapse(c,d),a&&(a!=c||u!=d)&&l.extend&&l.extend(a,u)}catch{}return h!=null&&(l.caretBidiLevel=h),m})}let OS=null,IS=null,LS=!1;function Q5(t,e,n){return OS==e&&IS==n?LS:(OS=e,IS=n,LS=n=="up"||n=="down"?X5(t,e,n):Z5(t,e,n))}const uo=0,NS=1,La=2,di=3;class Bh{constructor(e,n,r,o){this.parent=e,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=uo,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;nnr(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&n==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,o=e;o;o=o.parentNode){let i=this.getDesc(o),s;if(i&&(!n||i.node))if(r&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(e.nodeType==1?e:e.parentNode):s==e))r=!1;else return i}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let o=e;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;ne||s instanceof t2){o=e-i;break}i=l}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof e2&&i.side>=0;r--);if(n<=0){let i,s=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,s=!1);return i&&n&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?nr(i.dom)+1:0}}else{let i,s=!0;for(;i=r=c&&n<=u-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(e,n,c);e=s;for(let d=l;d>0;d--){let h=this.children[d-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){o=nr(h.dom)+1;break}e-=h.size}o==-1&&(o=0)}if(o>-1&&(u>n||l==this.children.length-1)){n=u;for(let c=l+1;cf&&sn){let f=l;l=a,a=f}let h=document.createRange();h.setEnd(a.node,a.offset),h.setStart(l.node,l.offset),u.removeAllRanges(),u.addRange(h)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,o=0;o=r:er){let l=r+i.border,a=s-i.border;if(e>=l&&n<=a){this.dirty=e==r||n==s?La:NS,e==l&&n==a&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=di:i.markDirty(e-l,n-l);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?La:di}r=s}this.dirty=La}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?La:NS;n.dirty{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(s.nodeType!=1){let l=document.createElement("span");l.appendChild(s),s=l}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=n,this.widget=n,i=this}matchesWidget(e){return this.dirty==uo&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class J5 extends Bh{constructor(e,n,r,o){super(e,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class Za extends Bh{constructor(e,n,r,o){super(e,[],r,o),this.mark=n}static create(e,n,r,o){let i=o.nodeViews[n.type.name],s=i&&i(n,o,r);return(!s||!s.dom)&&(s=Ur.renderSpec(document,n.type.spec.toDOM(n,r))),new Za(e,n,s.dom,s.contentDOM||s.dom)}parseRule(){return this.dirty&di||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=di&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=uo){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty0&&(i=S0(i,0,e,r));for(let l=0;l{if(!a)return s;if(a.parent)return a.parent.posBeforeChild(a)},r,o),c=u&&u.dom,d=u&&u.contentDOM;if(n.isText){if(!c)c=document.createTextNode(n.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:d}=Ur.renderSpec(document,n.type.spec.toDOM(n)));!d&&!n.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let h=c;return c=o2(c,r,n),u?a=new e3(e,n,r,o,c,d||null,h,u,i,s+1):n.isText?new cm(e,n,r,o,c,h,i):new _s(e,n,r,o,c,d||null,h,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>Q.empty)}return e}matchesNode(e,n,r){return this.dirty==uo&&e.eq(this.node)&&E0(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,o=n,i=e.composing?this.localCompositionInfo(e,n):null,s=i&&i.pos>-1?i:null,l=i&&i.pos<0,a=new n3(this,s&&s.node,e);i3(this.node,this.innerDeco,(u,c,d)=>{u.spec.marks?a.syncToMarks(u.spec.marks,r,e):u.type.side>=0&&!d&&a.syncToMarks(c==this.node.childCount?Ke.none:this.node.child(c).marks,r,e),a.placeWidget(u,e,o)},(u,c,d,h)=>{a.syncToMarks(u.marks,r,e);let f;a.findNodeMatch(u,c,d,h)||l&&e.state.selection.from>o&&e.state.selection.to-1&&a.updateNodeAt(u,c,d,f,e)||a.updateNextNode(u,c,d,e,h,o)||a.addNode(u,c,d,e,o),o+=u.nodeSize}),a.syncToMarks([],r,e),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==La)&&(s&&this.protectLocalComposition(e,s),n2(this.contentDOM,this.children,e),Nc&&s3(this.dom))}localCompositionInfo(e,n){let{from:r,to:o}=e.state.selection;if(!(e.state.selection instanceof Ie)||rn+this.node.content.size)return null;let i=e.domSelectionRange(),s=a3(i.focusNode,i.focusOffset);if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let l=s.nodeValue,a=l3(this.node.content,l,r-n,o-n);return a<0?null:{node:s,pos:a,text:l}}else return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let s=new J5(this,i,n,o);e.input.compositionNodes.push(s),this.children=S0(this.children,r,r+o.length,e,s)}update(e,n,r,o){return this.dirty==di||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,o),!0)}updateInner(e,n,r,o){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=uo}updateOuterDeco(e){if(E0(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=r2(this.dom,this.nodeDOM,k0(this.outerDeco,this.node,n),k0(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function $S(t,e,n,r,o){o2(r,e,t);let i=new _s(void 0,t,e,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class cm extends _s{constructor(e,n,r,o,i,s,l){super(e,n,r,o,i,null,s,l,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,o){return this.dirty==di||this.dirty!=uo&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=uo||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=e,this.dirty=uo,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let o=this.node.cut(e,n),i=document.createTextNode(o.text);return new cm(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=di)}get domAtom(){return!1}}class t2 extends Bh{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==uo&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class e3 extends _s{constructor(e,n,r,o,i,s,l,a,u,c){super(e,n,r,o,i,s,l,u,c),this.spec=a}update(e,n,r,o){if(this.dirty==di)return!1;if(this.spec.update){let i=this.spec.update(e,n,r);return i&&this.updateInner(e,n,r,o),i}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,o){this.spec.setSelection?this.spec.setSelection(e,n,r):super.setSelection(e,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function n2(t,e,n){let r=t.firstChild,o=!1;for(let i=0;i>1,s=Math.min(i,e.length);for(;o-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let a=Za.create(this.top,e[i],n,r);this.top.children.splice(this.index,0,a),this.top=a,this.changed=!0}this.index=0,i++}}findNodeMatch(e,n,r,o){let i=-1,s;if(o>=this.preMatch.index&&(s=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&s.matchesNode(e,n,r))i=this.top.children.indexOf(s,this.index);else for(let l=this.index,a=Math.min(this.top.children.length,l+5);l0;){let l;for(;;)if(r){let u=n.children[r-1];if(u instanceof Za)n=u,r=u.children.length;else{l=u,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let a=l.node;if(a){if(a!=t.child(o-1))break;--o,i.set(l,o),s.push(l)}}return{index:o,matched:i,matches:s.reverse()}}function o3(t,e){return t.type.side-e.type.side}function i3(t,e,n,r){let o=e.locals(t),i=0;if(o.length==0){for(let u=0;ui;)l.push(o[s++]);let p=i+h.nodeSize;if(h.isText){let m=p;s!m.inline):l.slice();r(h,g,e.forChild(i,h),f),i=p}}function s3(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function a3(t,e){for(;;){if(t.nodeType==3)return t;if(t.nodeType==1&&e>0){if(t.childNodes.length>e&&t.childNodes[e].nodeType==3)return t.childNodes[e];t=t.childNodes[e-1],e=ei(t)}else if(t.nodeType==1&&e=n){if(i>=r&&a.slice(r-e.length-l,r-l)==e)return r-e.length;let u=l=0&&u+e.length+l>=n)return l+u;if(n==r&&a.length>=r+e.length-l&&a.slice(r-l,r-l+e.length)==e)return r}}return-1}function S0(t,e,n,r,o){let i=[];for(let s=0,l=0;s=n||c<=e?i.push(a):(un&&i.push(a.slice(n-u,a.size,r)))}return i}function kb(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let o=t.docView.nearestDesc(n.focusNode),i=o&&o.size==0,s=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let l=r.resolve(s),a,u;if(lm(n)){for(a=l;o&&!o.node;)o=o.parent;let c=o.node;if(o&&c.isAtom&&Le.isSelectable(c)&&o.parent&&!(c.isInline&&I5(n.focusNode,n.focusOffset,o.dom))){let d=o.posBefore;u=new Le(s==d?l:r.resolve(d))}}else{let c=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(c<0)return null;a=r.resolve(c)}if(!u){let c=e=="pointer"||t.state.selection.head{(n.anchorNode!=r||n.anchorOffset!=o)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!i2(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function u3(t){let e=t.domSelection(),n=document.createRange(),r=t.cursorWrapper.dom,o=r.nodeName=="IMG";o?n.setEnd(r.parentNode,nr(r)+1):n.setEnd(r,0),n.collapse(!1),e.removeAllRanges(),e.addRange(n),!o&&!t.state.selection.visible&&xr&&As<=11&&(r.disabled=!0,r.disabled=!1)}function s2(t,e){if(e instanceof Le){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(BS(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else BS(t)}function BS(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function Eb(t,e,n,r){return t.someProp("createSelectionBetween",o=>o(t,e,n))||Ie.between(e,n,r)}function HS(t){return t.editable&&!t.hasFocus()?!1:a2(t)}function a2(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function d3(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return qa(e.node,e.offset,n.anchorNode,n.anchorOffset)}function C0(t,e){let{$anchor:n,$head:r}=t.selection,o=e>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?t.doc.resolve(e>0?o.after():o.before()):null:o;return i&&Ue.findFrom(i,e)}function fs(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function US(t,e,n){let r=t.state.selection;if(r instanceof Ie)if(n.indexOf("s")>-1){let{$head:o}=r,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let s=t.state.doc.resolve(o.pos+i.nodeSize*(e<0?-1:1));return fs(t,new Ie(r.$anchor,s))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let o=C0(t.state,e);return o&&o instanceof Le?fs(t,o):!1}else if(!(oo&&n.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter,s;if(!i||i.isText)return!1;let l=e<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(s=t.docView.descAt(l))&&!s.contentDOM?Le.isSelectable(i)?fs(t,new Le(e<0?t.state.doc.resolve(o.pos-i.nodeSize):o)):Fh?fs(t,new Ie(t.state.doc.resolve(e<0?l:l+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof Le&&r.node.isInline)return fs(t,new Ie(e>0?r.$to:r.$from));{let o=C0(t.state,e);return o?fs(t,o):!1}}}function Kp(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Ed(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function Ll(t,e){return e<0?h3(t):f3(t)}function h3(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,i,s=!1;for(Ho&&n.nodeType==1&&r0){if(n.nodeType!=1)break;{let l=n.childNodes[r-1];if(Ed(l,-1))o=n,i=--r;else if(l.nodeType==3)n=l,r=n.nodeValue.length;else break}}else{if(l2(n))break;{let l=n.previousSibling;for(;l&&Ed(l,-1);)o=n.parentNode,i=nr(l),l=l.previousSibling;if(l)n=l,r=Kp(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}s?T0(t,n,r):o&&T0(t,o,i)}function f3(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o=Kp(n),i,s;for(;;)if(r{t.state==o&&zi(t)},50)}function WS(t,e){let n=t.state.doc.resolve(e);if(!(Kn||D5)&&n.parent.inlineContent){let o=t.coordsAtPos(e);if(e>n.start()){let i=t.coordsAtPos(e-1),s=(i.top+i.bottom)/2;if(s>o.top&&s1)return i.lefto.top&&s1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function VS(t,e,n){let r=t.state.selection;if(r instanceof Ie&&!r.empty||n.indexOf("s")>-1||oo&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let s=C0(t.state,e);if(s&&s instanceof Le)return fs(t,s)}if(!o.parent.inlineContent){let s=e<0?o:i,l=r instanceof or?Ue.near(s,e):Ue.findFrom(s,e);return l?fs(t,l):!1}return!1}function jS(t,e){if(!(t.state.selection instanceof Ie))return!0;let{$head:n,$anchor:r,empty:o}=t.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let s=t.state.tr;return e<0?s.delete(n.pos-i.nodeSize,n.pos):s.delete(n.pos,n.pos+i.nodeSize),t.dispatch(s),!0}return!1}function GS(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function m3(t){if(!ar||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;GS(t,r,"true"),setTimeout(()=>GS(t,r,"false"),20)}return!1}function v3(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function y3(t,e){let n=e.keyCode,r=v3(e);if(n==8||oo&&n==72&&r=="c")return jS(t,-1)||Ll(t,-1);if(n==46&&!e.shiftKey||oo&&n==68&&r=="c")return jS(t,1)||Ll(t,1);if(n==13||n==27)return!0;if(n==37||oo&&n==66&&r=="c"){let o=n==37?WS(t,t.state.selection.from)=="ltr"?-1:1:-1;return US(t,o,r)||Ll(t,o)}else if(n==39||oo&&n==70&&r=="c"){let o=n==39?WS(t,t.state.selection.from)=="ltr"?1:-1:1;return US(t,o,r)||Ll(t,o)}else{if(n==38||oo&&n==80&&r=="c")return VS(t,-1,r)||Ll(t,-1);if(n==40||oo&&n==78&&r=="c")return m3(t)||VS(t,1,r)||Ll(t,1);if(r==(oo?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function c2(t,e){t.someProp("transformCopied",f=>{e=f(e,t)});let n=[],{content:r,openStart:o,openEnd:i}=e;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let f=r.firstChild;n.push(f.type.name,f.attrs!=f.type.defaultAttrs?f.attrs:null),r=f.content}let s=t.someProp("clipboardSerializer")||Ur.fromSchema(t.state.schema),l=g2(),a=l.createElement("div");a.appendChild(s.serializeFragment(r,{document:l}));let u=a.firstChild,c,d=0;for(;u&&u.nodeType==1&&(c=p2[u.nodeName.toLowerCase()]);){for(let f=c.length-1;f>=0;f--){let p=l.createElement(c[f]);for(;a.firstChild;)p.appendChild(a.firstChild);a.appendChild(p),d++}u=a.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${o} ${i}${d?` -${d}`:""} ${JSON.stringify(n)}`);let h=t.someProp("clipboardTextSerializer",f=>f(e,t))||e.content.textBetween(0,e.content.size,` -`);return{dom:l,text:p}}function CO(e,t,r,n,o){let i=o.parent.type.spec.code,s,a;if(!r&&!t)return null;let l=t&&(n||i||!r);if(l){if(e.someProp("transformPastedText",p=>{t=p(t,i||n,e)}),i)return t?new W(I.from(e.state.schema.text(t.replace(/\r\n?/g,` -`))),0,0):W.empty;let d=e.someProp("clipboardTextParser",p=>p(t,o,n,e));if(d)a=d;else{let p=o.marks(),{schema:f}=e.state,h=un.fromSchema(f);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(m=>{let b=s.appendChild(document.createElement("p"));m&&b.appendChild(h.serializeNode(f.text(m,p)))})}}else e.someProp("transformPastedHTML",d=>{r=d(r,e)}),s=r3(r),Fd&&n3(s);let c=s&&s.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let d=+u[3];d>0;d--){let p=s.firstChild;for(;p&&p.nodeType!=1;)p=p.nextSibling;if(!p)break;s=p}if(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||Vy.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(l||u),context:o,ruleFromNode(p){return p.nodeName=="BR"&&!p.nextSibling&&p.parentNode&&!e3.test(p.parentNode.nodeName)?{ignore:!0}:null}})),u)a=o3(vS(a,+u[1],+u[2]),u[4]);else if(a=W.maxOpen(t3(a.content,o),!0),a.openStart||a.openEnd){let d=0,p=0;for(let f=a.content.firstChild;d{a=d(a,e)}),a}const e3=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function t3(e,t){if(e.childCount<2)return e;for(let r=t.depth;r>=0;r--){let o=t.node(r).contentMatchAt(t.index(r)),i,s=[];if(e.forEach(a=>{if(!s)return;let l=o.findWrapping(a.type),c;if(!l)return s=null;if(c=s.length&&i.length&&AO(l,i,a,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=NO(s[s.length-1],i.length));let u=OO(a,l);s.push(u),o=o.matchType(u.type),i=l}}),s)return I.from(s)}return e}function OO(e,t,r=0){for(let n=t.length-1;n>=r;n--)e=t[n].create(null,I.from(e));return e}function AO(e,t,r,n,o){if(o1&&(i=0),o=r&&(a=t<0?s.contentMatchAt(0).fillBefore(a,i<=o).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(I.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function vS(e,t,r){return t]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let r=_O().createElement("div"),n=/<([a-z][^>\s]+)/i.exec(e),o;if((o=n&&RO[n[1].toLowerCase()])&&(e=o.map(i=>"<"+i+">").join("")+e+o.map(i=>"").reverse().join("")),r.innerHTML=e,o)for(let i=0;i=0;a-=2){let l=r.nodes[n[a]];if(!l||l.hasRequiredAttrs())break;o=I.from(l.create(n[a+1],o)),i++,s++}return new W(o,i,s)}const Cr={},Or={},i3={touchstart:!0,touchmove:!0};class s3{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function a3(e){for(let t in Cr){let r=Cr[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=n=>{c3(e,n)&&!Qy(e,n)&&(e.editable||!(n.type in Or))&&r(e,n)},i3[t]?{passive:!0}:void 0)}Tr&&e.dom.addEventListener("input",()=>null),i0(e)}function Hi(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function l3(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function i0(e){e.someProp("handleDOMEvents",t=>{for(let r in t)e.input.eventHandlers[r]||e.dom.addEventListener(r,e.input.eventHandlers[r]=n=>Qy(e,n))})}function Qy(e,t){return e.someProp("handleDOMEvents",r=>{let n=r[t.type];return n?n(e,t)||t.defaultPrevented:!1})}function c3(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let r=t.target;r!=e.dom;r=r.parentNode)if(!r||r.nodeType==11||r.pmViewDesc&&r.pmViewDesc.stopEvent(t))return!1;return!0}function u3(e,t){!Qy(e,t)&&Cr[t.type]&&(e.editable||!(t.type in Or))&&Cr[t.type](e,t)}Or.keydown=(e,t)=>{let r=t;if(e.input.shiftKey=r.keyCode==16||r.shiftKey,!MO(e,r)&&(e.input.lastKeyCode=r.keyCode,e.input.lastKeyCodeTime=Date.now(),!(eo&&hr&&r.keyCode==13)))if(r.keyCode!=229&&e.domObserver.forceFlush(),$l&&r.keyCode==13&&!r.ctrlKey&&!r.altKey&&!r.metaKey){let n=Date.now();e.input.lastIOSEnter=n,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==n&&(e.someProp("handleKeyDown",o=>o(e,Us(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",n=>n(e,r))||QD(e,r)?r.preventDefault():Hi(e,"key")};Or.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};Or.keypress=(e,t)=>{let r=t;if(MO(e,r)||!r.charCode||r.ctrlKey&&!r.altKey||Cn&&r.metaKey)return;if(e.someProp("handleKeyPress",o=>o(e,r))){r.preventDefault();return}let n=e.state.selection;if(!(n instanceof ue)||!n.$from.sameParent(n.$to)){let o=String.fromCharCode(r.charCode);!/[\r\n]/.test(o)&&!e.someProp("handleTextInput",i=>i(e,n.$from.pos,n.$to.pos,o))&&e.dispatch(e.state.tr.insertText(o).scrollIntoView()),r.preventDefault()}};function Qh(e){return{left:e.clientX,top:e.clientY}}function d3(e,t){let r=t.x-e.clientX,n=t.y-e.clientY;return r*r+n*n<100}function ev(e,t,r,n,o){if(n==-1)return!1;let i=e.state.doc.resolve(n);for(let s=i.depth+1;s>0;s--)if(e.someProp(t,a=>s>i.depth?a(e,r,i.nodeAfter,i.before(s),o,!0):a(e,r,i.node(s),i.before(s),o,!1)))return!0;return!1}function kl(e,t,r){e.focused||e.focus();let n=e.state.tr.setSelection(t);r=="pointer"&&n.setMeta("pointer",!0),e.dispatch(n)}function p3(e,t){if(t==-1)return!1;let r=e.state.doc.resolve(t),n=r.nodeAfter;return n&&n.isAtom&&de.isSelectable(n)?(kl(e,new de(r),"pointer"),!0):!1}function f3(e,t){if(t==-1)return!1;let r=e.state.selection,n,o;r instanceof de&&(n=r.node);let i=e.state.doc.resolve(t);for(let s=i.depth+1;s>0;s--){let a=s>i.depth?i.nodeAfter:i.node(s);if(de.isSelectable(a)){n&&r.$from.depth>0&&s>=r.$from.depth&&i.before(r.$from.depth+1)==r.$from.pos?o=i.before(r.$from.depth):o=i.before(s);break}}return o!=null?(kl(e,de.create(e.state.doc,o),"pointer"),!0):!1}function h3(e,t,r,n,o){return ev(e,"handleClickOn",t,r,n)||e.someProp("handleClick",i=>i(e,t,n))||(o?f3(e,r):p3(e,r))}function m3(e,t,r,n){return ev(e,"handleDoubleClickOn",t,r,n)||e.someProp("handleDoubleClick",o=>o(e,t,n))}function g3(e,t,r,n){return ev(e,"handleTripleClickOn",t,r,n)||e.someProp("handleTripleClick",o=>o(e,t,n))||y3(e,r,n)}function y3(e,t,r){if(r.button!=0)return!1;let n=e.state.doc;if(t==-1)return n.inlineContent?(kl(e,ue.create(n,0,n.content.size),"pointer"),!0):!1;let o=n.resolve(t);for(let i=o.depth+1;i>0;i--){let s=i>o.depth?o.nodeAfter:o.node(i),a=o.before(i);if(s.inlineContent)kl(e,ue.create(n,a+1,a+1+s.content.size),"pointer");else if(de.isSelectable(s))kl(e,de.create(n,a),"pointer");else continue;return!0}}function tv(e){return Bf(e)}const IO=Cn?"metaKey":"ctrlKey";Cr.mousedown=(e,t)=>{let r=t;e.input.shiftKey=r.shiftKey;let n=tv(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&d3(r,e.input.lastClick)&&!r[IO]&&(e.input.lastClick.type=="singleClick"?i="doubleClick":e.input.lastClick.type=="doubleClick"&&(i="tripleClick")),e.input.lastClick={time:o,x:r.clientX,y:r.clientY,type:i};let s=e.posAtCoords(Qh(r));s&&(i=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new v3(e,s,r,!!n)):(i=="doubleClick"?m3:g3)(e,s.pos,s.inside,r)?r.preventDefault():Hi(e,"pointer"))};class v3{constructor(t,r,n,o){this.view=t,this.pos=r,this.event=n,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!n[IO],this.allowDefault=n.shiftKey;let i,s;if(r.inside>-1)i=t.state.doc.nodeAt(r.inside),s=r.inside;else{let u=t.state.doc.resolve(r.pos);i=u.parent,s=u.depth?u.before():0}const a=o?null:n.target,l=a?t.docView.nearestDesc(a,!0):null;this.target=l?l.dom:null;let{selection:c}=t.state;(n.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||c instanceof de&&c.from<=s&&c.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&ao&&!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(()=>{this.view.input.mouseDown==this&&this.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)),Hi(t,"pointer")}done(){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(()=>oi(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let r=this.pos;this.view.state.doc!=this.startDoc&&(r=this.view.posAtCoords(Qh(t))),this.updateAllowDefault(t),this.allowDefault||!r?Hi(this.view,"pointer"):h3(this.view,r.pos,r.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||Tr&&this.mightDrag&&!this.mightDrag.node.isAtom||hr&&!this.view.state.selection.visible&&Math.min(Math.abs(r.pos-this.view.state.selection.from),Math.abs(r.pos-this.view.state.selection.to))<=2)?(kl(this.view,ke.near(this.view.state.doc.resolve(r.pos)),"pointer"),t.preventDefault()):Hi(this.view,"pointer")}move(t){this.updateAllowDefault(t),Hi(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}Cr.touchstart=e=>{e.input.lastTouch=Date.now(),tv(e),Hi(e,"pointer")};Cr.touchmove=e=>{e.input.lastTouch=Date.now(),Hi(e,"pointer")};Cr.contextmenu=e=>tv(e);function MO(e,t){return e.composing?!0:Tr&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const b3=eo?5e3:-1;Or.compositionstart=Or.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,r=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!r.textOffset&&r.parentOffset&&r.nodeBefore.marks.some(n=>n.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||r.marks(),Bf(e,!0),e.markCursor=null;else if(Bf(e),ao&&t.selection.empty&&r.parentOffset&&!r.textOffset&&r.nodeBefore.marks.length){let n=e.domSelectionRange();for(let o=n.focusNode,i=n.focusOffset;o&&o.nodeType==1&&i!=0;){let s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(s.nodeType==3){e.domSelection().collapse(s,s.nodeValue.length);break}else o=s,i=-1}}e.input.composing=!0}LO(e,b3)};Or.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,LO(e,20))};function LO(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>Bf(e),t))}function DO(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=E3());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function E3(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function Bf(e,t=!1){if(!(eo&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),DO(e),t||e.docView&&e.docView.dirty){let r=Zy(e);return r&&!r.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(r)):e.updateState(e.state),!0}return!1}}function k3(e,t){if(!e.dom.parentNode)return;let r=e.dom.parentNode.appendChild(document.createElement("div"));r.appendChild(t),r.style.cssText="position: fixed; left: -10000px; top: 10px";let n=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),n.removeAllRanges(),n.addRange(o),setTimeout(()=>{r.parentNode&&r.parentNode.removeChild(r),e.focus()},50)}const Bl=Hr&&Gi<15||$l&&vD<604;Cr.copy=Or.cut=(e,t)=>{let r=t,n=e.state.selection,o=r.type=="cut";if(n.empty)return;let i=Bl?null:r.clipboardData,s=n.content(),{dom:a,text:l}=TO(e,s);i?(r.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",l)):k3(e,a),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function x3(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function S3(e,t){if(!e.dom.parentNode)return;let r=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,n=e.dom.parentNode.appendChild(document.createElement(r?"textarea":"div"));r||(n.contentEditable="true"),n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus();let o=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),n.parentNode&&n.parentNode.removeChild(n),r?Wu(e,n.value,null,o,t):Wu(e,n.textContent,n.innerHTML,o,t)},50)}function Wu(e,t,r,n,o){let i=CO(e,t,r,n,e.state.selection.$from);if(e.someProp("handlePaste",l=>l(e,o,i||W.empty)))return!0;if(!i)return!1;let s=x3(i),a=s?e.state.tr.replaceSelectionWith(s,n):e.state.tr.replaceSelection(i);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}Or.paste=(e,t)=>{let r=t;if(e.composing&&!eo)return;let n=Bl?null:r.clipboardData,o=e.input.shiftKey&&e.input.lastKeyCode!=45;n&&Wu(e,n.getData("text/plain"),n.getData("text/html"),o,r)?r.preventDefault():S3(e,r)};class w3{constructor(t,r){this.slice=t,this.move=r}}const PO=Cn?"altKey":"ctrlKey";Cr.dragstart=(e,t)=>{let r=t,n=e.input.mouseDown;if(n&&n.done(),!r.dataTransfer)return;let o=e.state.selection,i=o.empty?null:e.posAtCoords(Qh(r));if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof de?o.to-1:o.to))){if(n&&n.mightDrag)e.dispatch(e.state.tr.setSelection(de.create(e.state.doc,n.mightDrag.pos)));else if(r.target&&r.target.nodeType==1){let c=e.docView.nearestDesc(r.target,!0);c&&c.node.type.spec.draggable&&c!=e.docView&&e.dispatch(e.state.tr.setSelection(de.create(e.state.doc,c.posBefore)))}}let s=e.state.selection.content(),{dom:a,text:l}=TO(e,s);r.dataTransfer.clearData(),r.dataTransfer.setData(Bl?"Text":"text/html",a.innerHTML),r.dataTransfer.effectAllowed="copyMove",Bl||r.dataTransfer.setData("text/plain",l),e.dragging=new w3(s,!r[PO])};Cr.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};Or.dragover=Or.dragenter=(e,t)=>t.preventDefault();Or.drop=(e,t)=>{let r=t,n=e.dragging;if(e.dragging=null,!r.dataTransfer)return;let o=e.posAtCoords(Qh(r));if(!o)return;let i=e.state.doc.resolve(o.pos),s=n&&n.slice;s?e.someProp("transformPasted",h=>{s=h(s,e)}):s=CO(e,r.dataTransfer.getData(Bl?"Text":"text/plain"),Bl?null:r.dataTransfer.getData("text/html"),!1,i);let a=!!(n&&!r[PO]);if(e.someProp("handleDrop",h=>h(e,r,s||W.empty,a))){r.preventDefault();return}if(!s)return;r.preventDefault();let l=s?zL(e.state.doc,i.pos,s):i.pos;l==null&&(l=i.pos);let c=e.state.tr;a&&c.deleteSelection();let u=c.mapping.map(l),d=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,p=c.doc;if(d?c.replaceRangeWith(u,u,s.content.firstChild):c.replaceRange(u,u,s),c.doc.eq(p))return;let f=c.doc.resolve(u);if(d&&de.isSelectable(s.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new de(f));else{let h=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((m,b,y,g)=>h=g),c.setSelection(Jy(e,f,c.doc.resolve(h)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))};Cr.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&oi(e)},20))};Cr.blur=(e,t)=>{let r=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),r.relatedTarget&&e.dom.contains(r.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};Cr.beforeinput=(e,t)=>{if(hr&&eo&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:n}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=n||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",i=>i(e,Us(8,"Backspace")))))return;let{$cursor:o}=e.state.selection;o&&o.pos>0&&e.dispatch(e.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let e in Or)Cr[e]=Or[e];function Ku(e,t){if(e==t)return!0;for(let r in e)if(e[r]!==t[r])return!1;for(let r in t)if(!(r in e))return!1;return!0}class Hf{constructor(t,r){this.toDOM=t,this.spec=r||ea,this.side=this.spec.side||0}map(t,r,n,o){let{pos:i,deleted:s}=t.mapResult(r.from+o,this.side<0?-1:1);return s?null:new Je(i-n,i-n,this)}valid(){return!0}eq(t){return this==t||t instanceof Hf&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Ku(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class Ki{constructor(t,r){this.attrs=t,this.spec=r||ea}map(t,r,n,o){let i=t.map(r.from+o,this.spec.inclusiveStart?-1:1)-n,s=t.map(r.to+o,this.spec.inclusiveEnd?1:-1)-n;return i>=s?null:new Je(i,s,this)}valid(t,r){return r.from=t&&(!i||i(a.spec))&&n.push(a.copy(a.from+o,a.to+o))}for(let s=0;st){let a=this.children[s]+1;this.children[s+2].findInner(t-a,r-a,n,o+a,i)}}map(t,r,n){return this==dr||t.maps.length==0?this:this.mapInner(t,r,0,0,n||ea)}mapInner(t,r,n,o,i){let s;for(let a=0;a{let c=l+n,u;if(u=$O(r,a,c)){for(o||(o=this.children.slice());ia&&d.to=t){this.children[a]==t&&(n=this.children[a+2]);break}let i=t+1,s=i+r.content.size;for(let a=0;ai&&l.type instanceof Ki){let c=Math.max(i,l.from)-i,u=Math.min(s,l.to)-i;co.map(t,r,ea));return Di.from(n)}forChild(t,r){if(r.isLeaf)return Ce.empty;let n=[];for(let o=0;or instanceof Ce)?t:t.reduce((r,n)=>r.concat(n instanceof Ce?n:n.members),[]))}}}function T3(e,t,r,n,o,i,s){let a=e.slice();for(let c=0,u=i;c{let b=m-h-(f-p);for(let y=0;yg+u-d)continue;let v=a[y]+u-d;f>=v?a[y+1]=p<=v?-2:-1:h>=o&&b&&(a[y]+=b,a[y+1]+=b)}d+=b}),u=r.maps[c].map(u,-1)}let l=!1;for(let c=0;c=n.content.size){l=!0;continue}let p=r.map(e[c+1]+i,-1),f=p-o,{index:h,offset:m}=n.content.findIndex(d),b=n.maybeChild(h);if(b&&m==d&&m+b.nodeSize==f){let y=a[c+2].mapInner(r,b,u+1,e[c]+i+1,s);y!=dr?(a[c]=d,a[c+1]=f,a[c+2]=y):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=C3(a,e,t,r,o,i,s),u=Ff(c,n,0,s);t=u.local;for(let d=0;dr&&s.to{let c=$O(e,a,l+r);if(c){i=!0;let u=Ff(c,a,r+l+1,n);u!=dr&&o.push(l,l+a.nodeSize,u)}});let s=zO(i?BO(e):e,-r).sort(ta);for(let a=0;a0;)t++;e.splice(t,0,r)}function zg(e){let t=[];return e.someProp("decorations",r=>{let n=r(e.state);n&&n!=dr&&t.push(n)}),e.cursorWrapper&&t.push(Ce.create(e.state.doc,[e.cursorWrapper.deco])),Di.from(t)}const O3={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},A3=Hr&&Gi<=11;class N3{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class R3{constructor(t,r){this.view=t,this.handleDOMChange=r,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new N3,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(n=>{for(let o=0;oo.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),A3&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,O3)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let r=0;rthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(pS(this.view)){if(this.suppressingSelectionUpdates)return oi(this.view);if(Hr&&Gi<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&la(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let r=new Set,n;for(let i=t.focusNode;i;i=Gu(i))r.add(i);for(let i=t.anchorNode;i;i=Gu(i))if(r.has(i)){n=i;break}let o=n&&this.view.docView.nearestDesc(n);if(o&&o.ignoreMutation({type:"selection",target:n.nodeType==3?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let r=this.pendingRecords();r.length&&(this.queue=[]);let n=t.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&pS(t)&&!this.ignoreSelectionChange(n),i=-1,s=-1,a=!1,l=[];if(t.editable)for(let u=0;u1){let u=l.filter(d=>d.nodeName=="BR");if(u.length==2){let d=u[0],p=u[1];d.parentNode&&d.parentNode.parentNode==p.parentNode?p.remove():d.remove()}}let c=null;i<0&&o&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)-1||o)&&(i>-1&&(t.docView.markDirty(i,s),_3(t)),this.handleDOMChange(i,s,a,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(n)||oi(t),this.currentSelection.set(n))}registerMutation(t,r){if(r.indexOf(t.target)>-1)return null;let n=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(n==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!n||n.ignoreMutation(t))return null;if(t.type=="childList"){for(let u=0;uo;b--){let y=n.childNodes[b-1],g=y.pmViewDesc;if(y.nodeName=="BR"&&!g){i=b;break}if(!g||g.size)break}let d=e.state.doc,p=e.someProp("domParser")||Vy.fromSchema(e.state.schema),f=d.resolve(s),h=null,m=p.parse(n,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:o,to:i,preserveWhitespace:f.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:L3,context:f});if(c&&c[0].pos!=null){let b=c[0].pos,y=c[1]&&c[1].pos;y==null&&(y=b),h={anchor:b+s,head:y+s}}return{doc:m,sel:h,from:s,to:a}}function L3(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(Tr&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let r=document.createElement("div");return r.appendChild(document.createElement("li")),{skip:r}}else if(e.parentNode.lastChild==e||Tr&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const D3=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function P3(e,t,r,n,o){let i=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let T=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,O=Zy(e,T);if(O&&!e.state.selection.eq(O)){if(hr&&eo&&e.input.lastKeyCode===13&&Date.now()-100P(e,Us(13,"Enter"))))return;let _=e.state.tr.setSelection(O);T=="pointer"?_.setMeta("pointer",!0):T=="key"&&_.scrollIntoView(),i&&_.setMeta("composition",i),e.dispatch(_)}return}let s=e.state.doc.resolve(t),a=s.sharedDepth(r);t=s.before(a+1),r=e.state.doc.resolve(r).after(a+1);let l=e.state.selection,c=M3(e,t,r),u=e.state.doc,d=u.slice(c.from,c.to),p,f;e.input.lastKeyCode===8&&Date.now()-100Date.now()-225||eo)&&o.some(T=>T.nodeType==1&&!D3.test(T.nodeName))&&(!h||h.endA>=h.endB)&&e.someProp("handleKeyDown",T=>T(e,Us(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!h)if(n&&l instanceof ue&&!l.empty&&l.$head.sameParent(l.$anchor)&&!e.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))h={start:l.from,endA:l.to,endB:l.to};else{if(c.sel){let T=SS(e,e.state.doc,c.sel);if(T&&!T.eq(e.state.selection)){let O=e.state.tr.setSelection(T);i&&O.setMeta("composition",i),e.dispatch(O)}}return}if(hr&&e.cursorWrapper&&c.sel&&c.sel.anchor==e.cursorWrapper.deco.from&&c.sel.head==c.sel.anchor){let T=h.endB-h.start;c.sel={anchor:c.sel.anchor+T,head:c.sel.anchor+T}}e.input.domChangeCount++,e.state.selection.frome.state.selection.from&&h.start<=e.state.selection.from+2&&e.state.selection.from>=c.from?h.start=e.state.selection.from:h.endA=e.state.selection.to-2&&e.state.selection.to<=c.to&&(h.endB+=e.state.selection.to-h.endA,h.endA=e.state.selection.to)),Hr&&Gi<=11&&h.endB==h.start+1&&h.endA==h.start&&h.start>c.from&&c.doc.textBetween(h.start-c.from-1,h.start-c.from+1)=="  "&&(h.start--,h.endA--,h.endB--);let m=c.doc.resolveNoCache(h.start-c.from),b=c.doc.resolveNoCache(h.endB-c.from),y=u.resolve(h.start),g=m.sameParent(b)&&m.parent.inlineContent&&y.end()>=h.endA,v;if(($l&&e.input.lastIOSEnter>Date.now()-225&&(!g||o.some(T=>T.nodeName=="DIV"||T.nodeName=="P"))||!g&&m.posT(e,Us(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>h.start&&$3(u,h.start,h.endA,m,b)&&e.someProp("handleKeyDown",T=>T(e,Us(8,"Backspace")))){eo&&hr&&e.domObserver.suppressSelectionUpdates();return}hr&&eo&&h.endB==h.start&&(e.input.lastAndroidDelete=Date.now()),eo&&!g&&m.start()!=b.start()&&b.parentOffset==0&&m.depth==b.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==h.endA&&(h.endB-=2,b=c.doc.resolveNoCache(h.endB-c.from),setTimeout(()=>{e.someProp("handleKeyDown",function(T){return T(e,Us(13,"Enter"))})},20));let E=h.start,k=h.endA,x,w,C;if(g){if(m.pos==b.pos)Hr&&Gi<=11&&m.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>oi(e),20)),x=e.state.tr.delete(E,k),w=u.resolve(h.start).marksAcross(u.resolve(h.endA));else if(h.endA==h.endB&&(C=z3(m.parent.content.cut(m.parentOffset,b.parentOffset),y.parent.content.cut(y.parentOffset,h.endA-y.start()))))x=e.state.tr,C.type=="add"?x.addMark(E,k,C.mark):x.removeMark(E,k,C.mark);else if(m.parent.child(m.index()).isText&&m.index()==b.index()-(b.textOffset?0:1)){let T=m.parent.textBetween(m.parentOffset,b.parentOffset);if(e.someProp("handleTextInput",O=>O(e,E,k,T)))return;x=e.state.tr.insertText(T,E,k)}}if(x||(x=e.state.tr.replace(E,k,c.doc.slice(h.start-c.from,h.endB-c.from))),c.sel){let T=SS(e,x.doc,c.sel);T&&!(hr&&eo&&e.composing&&T.empty&&(h.start!=h.endB||e.input.lastAndroidDeletet.content.size?null:Jy(e,t.resolve(r.anchor),t.resolve(r.head))}function z3(e,t){let r=e.firstChild.marks,n=t.firstChild.marks,o=r,i=n,s,a,l;for(let u=0;uu.mark(a.addToSet(u.marks));else if(o.length==0&&i.length==1)a=i[0],s="remove",l=u=>u.mark(a.removeFromSet(u.marks));else return null;let c=[];for(let u=0;ur||$g(s,!0,!1)0&&(t||e.indexAfter(n)==e.node(n).childCount);)n--,o++,t=!1;if(r){let i=e.node(n).maybeChild(e.indexAfter(n));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function B3(e,t,r,n,o){let i=e.findDiffStart(t,r);if(i==null)return null;let{a:s,b:a}=e.findDiffEnd(t,r+e.size,r+t.size);if(o=="end"){let l=Math.max(0,i-Math.min(s,a));n-=s+l-i}if(s=s?i-n:0;i-=l,a=i+(a-s),s=i}else if(a=a?i-n:0;i-=l,s=i+(s-a),a=i}return{start:i,endA:s,endB:a}}class H3{constructor(t,r){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new s3,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=r,this.state=r.state,this.directPlugins=r.plugins||[],this.directPlugins.forEach(AS),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=CS(this),TS(this),this.nodeViews=OS(this),this.docView=sS(this.state.doc,wS(this),zg(this),this.dom,this),this.domObserver=new R3(this,(n,o,i,s)=>P3(this,n,o,i,s)),this.domObserver.start(),a3(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let r in t)this._props[r]=t[r];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&i0(this);let r=this._props;this._props=t,t.plugins&&(t.plugins.forEach(AS),this.directPlugins=t.plugins),this.updateStateInner(t.state,r)}setProps(t){let r={};for(let n in this._props)r[n]=this._props[n];r.state=this.state;for(let n in t)r[n]=t[n];this.update(r)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,r){let n=this.state,o=!1,i=!1;t.storedMarks&&this.composing&&(DO(this),i=!0),this.state=t;let s=n.plugins!=t.plugins||this._props.plugins!=r.plugins;if(s||this._props.plugins!=r.plugins||this._props.nodeViews!=r.nodeViews){let p=OS(this);U3(p,this.nodeViews)&&(this.nodeViews=p,o=!0)}(s||r.handleDOMEvents!=this._props.handleDOMEvents)&&i0(this),this.editable=CS(this),TS(this);let a=zg(this),l=wS(this),c=n.plugins!=t.plugins&&!n.doc.eq(t.doc)?"reset":t.scrollToSelection>n.scrollToSelection?"to selection":"preserve",u=o||!this.docView.matchesNode(t.doc,l,a);(u||!t.selection.eq(n.selection))&&(i=!0);let d=c=="preserve"&&i&&this.dom.style.overflowAnchor==null&&kD(this);if(i){this.domObserver.stop();let p=u&&(Hr||hr)&&!this.composing&&!n.selection.empty&&!t.selection.empty&&F3(n.selection,t.selection);if(u){let f=hr?this.trackWrites=this.domSelectionRange().focusNode:null;(o||!this.docView.update(t.doc,l,a,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=sS(t.doc,l,a,this.dom,this)),f&&!this.trackWrites&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&WD(this))?oi(this,p):(xO(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(n),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():d&&xD(d)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",r=>r(this)))if(this.state.selection instanceof de){let r=this.docView.domAfterPos(this.state.selection.from);r.nodeType==1&&eS(this,r.getBoundingClientRect(),t)}else eS(this,this.coordsAtPos(this.state.selection.head,1),t)}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let r=0;rr.ownerDocument.getSelection()),this._root=r}return t||document}updateRoot(){this._root=null}posAtCoords(t){return AD(this,t)}coordsAtPos(t,r=1){return hO(this,t,r)}domAtPos(t,r=0){return this.docView.domFromPos(t,r)}nodeDOM(t){let r=this.docView.descAt(t);return r?r.nodeDOM:null}posAtDOM(t,r,n=-1){let o=this.docView.posFromDOM(t,r,n);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(t,r){return MD(this,r||this.state,t)}pasteHTML(t,r){return Wu(this,"",t,!1,r||new ClipboardEvent("paste"))}pasteText(t,r){return Wu(this,t,null,!0,r||new ClipboardEvent("paste"))}destroy(){this.docView&&(l3(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],zg(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return this.docView==null}dispatchEvent(t){return u3(this,t)}dispatch(t){let r=this._props.dispatchTransaction;r?r.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){return Tr&&this.root.nodeType===11&&hD(this.dom.ownerDocument)==this.dom?I3(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function wS(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",r=>{if(typeof r=="function"&&(r=r(e.state)),r)for(let n in r)n=="class"?t.class+=" "+r[n]:n=="style"?t.style=(t.style?t.style+";":"")+r[n]:!t[n]&&n!="contenteditable"&&n!="nodeName"&&(t[n]=String(r[n]))}),t.translate||(t.translate="no"),[Je.node(0,e.state.doc.content.size,t)]}function TS(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Je.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function CS(e){return!e.someProp("editable",t=>t(e.state)===!1)}function F3(e,t){let r=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(r)!=t.$anchor.start(r)}function OS(e){let t=Object.create(null);function r(n){for(let o in n)Object.prototype.hasOwnProperty.call(t,o)||(t[o]=n[o])}return e.someProp("nodeViews",r),e.someProp("markViews",r),t}function U3(e,t){let r=0,n=0;for(let o in e){if(e[o]!=t[o])return!0;r++}for(let o in t)n++;return r!=n}function AS(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var V3=e=>{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};const j3=po(V3);var HO=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},ve=(e,t,r)=>(HO(e,t,"read from private field"),r?r.call(e):t.get(e)),Fo=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Ze=(e,t,r,n)=>(HO(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);function G3(e){return!!(e.prev&&e.next&&e.prev.text.full!==e.next.text.full)}function W3(e){return!!(e.prev&&e.next&&e.prev.range.cursor!==e.next.range.cursor)}function K3(e){return!!(!e.prev&&e.next)}function Y3(e){return!!(e.prev&&!e.next)}function q3(e){return!!(e.prev&&e.next&&e.prev.range.from!==e.next.range.from)}function X3(e){return e==="invalid-exit-split"}var Z3=["jump-backward-exit","jump-forward-exit"],J3=["jump-backward-change","jump-forward-change"];function Q3(e){var t,r;return wr(Z3,(t=e.exit)==null?void 0:t.exitReason)||wr(J3,(r=e.change)==null?void 0:r.changeReason)}function NS(e){return!!(e&&e.query.full.length>=e.suggester.matchOffset)}function RS(e){return nr(e)&&e instanceof ue}function zr(e){const{match:t,changeReason:r,exitReason:n}=e;return{...t,changeReason:r,exitReason:n}}function eP(e,t){const{invalidPrefixCharacters:r,validPrefixCharacters:n}=t;return r?!new RegExp(a0(r)).test(e):new RegExp(a0(n)).test(e)}function tP(e){const{text:t,regexp:r,$pos:n,suggester:o}=e,i=n.start();let s;return cc(t,r).forEach(a=>{const l=a.input.slice(Math.max(0,a.index-1),a.index);if(eP(l,o)){const c=a.index+i,u=a[0],d=a[1];if(!oe(u)||!oe(d))return;const p=c+u.length,f=Math.min(p,n.pos),h=f-c;c=n.pos&&(s={range:{from:c,to:p,cursor:f},match:a,query:{partial:u.slice(d.length,h),full:u.slice(d.length)},text:{partial:u.slice(0,h),full:u},textAfter:n.doc.textBetween(p,n.end(),$i,$i),textBefore:n.doc.textBetween(i,c,$i,$i),suggester:o})}}),s}function FO(e){const{$pos:t,suggester:r}=e,{char:n,name:o,startOfLine:i,supportedCharacters:s,matchOffset:a,multiline:l,caseInsensitive:c,unicode:u}=r,d=uP({char:n,matchOffset:a,startOfLine:i,supportedCharacters:s,multiline:l,caseInsensitive:c,unicode:u}),p=t.doc.textBetween(t.before(),t.end(),$i,$i);return tP({suggester:r,text:p,regexp:d,$pos:t,char:n,name:o})}function UO(e){const{state:t,match:r}=e;try{return FO({$pos:t.doc.resolve(r.range.cursor),suggester:r.suggester})}catch{return}}function VO(e){const{prev:t,next:r,state:n}=e;return!r&&t.range.from>=n.doc.nodeSize?{exit:zr({match:t,exitReason:"delete"})}:!r||!t.query.partial?{exit:zr({match:t,exitReason:"invalid-exit-split"})}:t.range.to===r.range.cursor?{exit:zr({match:r,exitReason:"exit-end"})}:t.query.partial?{exit:zr({match:r,exitReason:"exit-split"})}:{}}function rP(e){const{prev:t,next:r,state:n}=e,o=te(),i=UO({state:n,match:t}),{exit:s}=i&&i.query.full!==t.query.full?VO({prev:t,next:i,state:n}):o;return t.range.from=t.range.to)?{exit:zr({match:t,exitReason:"selection-outside"})}:n.pos>t.range.to?{exit:zr({match:t,exitReason:"move-end"})}:n.pos<=t.range.from?{exit:zr({match:t,exitReason:"move-start"})}:{}}function oP(e){const{prev:t,next:r,state:n,$pos:o}=e,i=te();if(!t&&!r)return i;const s={prev:t,next:r};return q3(s)?rP({prev:s.prev,next:s.next,state:n}):K3(s)?{change:zr({match:s.next,changeReason:"start"})}:Y3(s)?nP({$pos:o,match:s.prev,state:n}):G3(s)?{change:zr({match:s.next,changeReason:"change-character"})}:W3(s)?{change:zr({match:s.next,changeReason:n.selection.empty?"move":"selection-inside"})}:i}function _S(e,t){for(let r=e.depth;r>0;r--){const n=e.node(r);if(t.includes(n.type.name))return!0}return!1}function s0(e,t){const{$from:r,$to:n}=e;return jO(e,t)?!0:Uy(r.pos,n.pos).some(o=>iP(r.doc.resolve(o),t))}function jO(e,t){const{$from:r,$to:n}=e,o=new Set((r.marksAcross(n)??[]).map(i=>i.type.name));return t.some(i=>o.has(i))}function iP(e,t){const r=new Set(e.marks().map(n=>n.type.name));return t.some(n=>r.has(n))}function sP(e,t){const{$cursor:r}=t,{validMarks:n,validNodes:o,invalidMarks:i,invalidNodes:s}=e;return!n&&!o&&is(i)&&is(s)?!0:!(n&&!jO(t,n)||o&&!_S(r,o)||!n&&s0(t,i)||!o&&_S(r,s))}function IS(e){const{suggesters:t,$pos:r,selectionEmpty:n}=e;for(const o of t)if(!(o.emptySelectionsOnly&&!n))try{const i=FO({suggester:o,$pos:r});if(!i)continue;const s={$from:r.doc.resolve(i.range.from),$to:r.doc.resolve(i.range.to),$cursor:r};if(sP(o,s)&&o.isValidPosition(s,i))return i}catch{}}function a0(e){return F4(e)?e.source:e}function aP(e){return e?"^":""}function lP(e,t){return`(?:${a0(e)}){${t},}`}function cP(e){return oe(e)?new RegExp(j3(e)):e}function uP(e){const{char:t,matchOffset:r,startOfLine:n,supportedCharacters:o,captureChar:i=!0,caseInsensitive:s=!1,multiline:a=!1,unicode:l=!1}=e,c=`g${a?"m":""}${s?"i":""}${l?"u":""}`;let u=cP(t).source;return i&&(u=`(${u})`),new RegExp(`${aP(n)}${u}${lP(o,r)}`,c)}var dP={appendTransaction:!1,priority:50,ignoredTag:"span",matchOffset:0,disableDecorations:!1,startOfLine:!1,suggestClassName:"suggest",suggestTag:"span",supportedCharacters:/\w+/,validPrefixCharacters:/^[\s\0]?$/,invalidPrefixCharacters:null,ignoredClassName:null,invalidMarks:[],invalidNodes:[],validMarks:null,validNodes:null,isValidPosition:()=>!0,checkNextValidSelection:null,emptySelectionsOnly:!1,caseInsensitive:!1,multiline:!1,unicode:!1,captureChar:!0},GO="__ignore_prosemirror_suggest_update__",qp,Gc,Bt,Ci,Za,mo,Mt,Oi,Ja,WO=class{constructor(e){Fo(this,qp,!1),Fo(this,Gc,!1),Fo(this,Bt,void 0),Fo(this,Ci,void 0),Fo(this,Za,void 0),Fo(this,mo,te()),Fo(this,Mt,Ce.empty),Fo(this,Oi,!1),Fo(this,Ja,!1),this.setMarkRemoved=()=>{Ze(this,Oi,!0)},this.findNextTextSelection=r=>{const n=r.$from.doc,o=Math.min(n.nodeSize-2,r.to+1),i=n.resolve(o),s=ke.findFrom(i,1,!0);if(RS(s))return s},this.ignoreNextExit=()=>{Ze(this,Gc,!0)},this.addIgnored=({from:r,name:n,specific:o=!1})=>{const i=ve(this,Bt).find(u=>u.name===n);if(!i)throw new Error(`No suggester exists for the name provided: ${n}`);const s=oe(i.char)?i.char.length:1,a=r+s,l=i.ignoredClassName?{class:i.ignoredClassName}:{},c=Je.inline(r,a,{nodeName:i.ignoredTag,...l},{name:n,specific:o,char:i.char});Ze(this,Mt,ve(this,Mt).add(this.view.state.doc,[c]))},this.removeIgnored=({from:r,name:n})=>{const o=ve(this,Bt).find(a=>a.name===n);if(!o)throw new Error(`No suggester exists for the name provided: ${n}`);const i=oe(o.char)?o.char.length:1,s=ve(this,Mt).find(r,r+i)[0];!s||s.spec.name!==n||Ze(this,Mt,ve(this,Mt).remove([s]))},this.clearIgnored=r=>{if(!r){Ze(this,Mt,Ce.empty);return}const o=ve(this,Mt).find().filter(({spec:i})=>i.name===r);Ze(this,Mt,ve(this,Mt).remove(o))},this.findMatchAtPosition=(r,n)=>{const o=n?ve(this,Bt).filter(i=>i.name===n):ve(this,Bt);return IS({suggesters:o,$pos:r,docChanged:!1,selectionEmpty:!0})},this.setLastChangeFromAppend=()=>{Ze(this,Ja,!0)};const t=MS();Ze(this,Bt,e.map(t)),Ze(this,Bt,ia(ve(this,Bt),(r,n)=>n.priority-r.priority))}static create(e){return new WO(e)}get decorationSet(){return ve(this,Mt)}get removed(){return ve(this,Oi)}get match(){return ve(this,Ci)?ve(this,Ci):ve(this,Za)&&ve(this,mo).exit?ve(this,Za):void 0}init(e){return this.view=e,this}createProps(e){const{name:t,char:r}=e.suggester;return{view:this.view,addIgnored:this.addIgnored,clearIgnored:this.clearIgnored,ignoreNextExit:this.ignoreNextExit,setMarkRemoved:this.setMarkRemoved,name:t,char:r,...e}}shouldRunExit(){return ve(this,Gc)?(Ze(this,Gc,!1),!1):!0}updateWithNextSelection(e){var t,r,n;const o=this.findNextTextSelection(e.selection);if(o)for(const i of ve(this,Bt)){const s=(t=ve(this,mo).change)==null?void 0:t.suggester.name,a=(r=ve(this,mo).exit)==null?void 0:r.suggester.name;(n=i.checkNextValidSelection)==null||n.call(i,o.$from,e,{change:s,exit:a})}}changeHandler(e,t){const{change:r,exit:n}=ve(this,mo),o=this.match;if(!r&&!n||!NS(o))return;const i=t===(n==null?void 0:n.suggester.appendTransaction)&&this.shouldRunExit(),s=t===(r==null?void 0:r.suggester.appendTransaction);if(!(!i&&!s)){if(r&&n&&Q3({change:r,exit:n})){const a=this.createProps(n),l=this.createProps(r),c=n.range.from{const a=oe(s.char)?s.char.length:1;return i-o!==a});Ze(this,Mt,t.remove(n))}shouldIgnoreMatch({range:e,suggester:{name:t}}){return ve(this,Mt).find().some(({spec:o,from:i})=>i!==e.from?!1:o.specific?o.name===t:!0)}resetState(){Ze(this,mo,te()),Ze(this,Ci,void 0),Ze(this,Oi,!1),Ze(this,Ja,!1)}updateReasons(e){const{$pos:t,state:r}=e,n=ve(this,qp),o=ve(this,Bt),i=r.selection.empty,s=RS(r.selection)?IS({suggesters:o,$pos:t,docChanged:n,selectionEmpty:i}):void 0;Ze(this,Ci,s&&this.shouldIgnoreMatch(s)?void 0:s),Ze(this,mo,oP({next:ve(this,Ci),prev:ve(this,Za),state:r,$pos:t}))}addSuggester(e){const t=ve(this,Bt).find(n=>n.name===e.name),r=MS();if(t)Ze(this,Bt,ve(this,Bt).map(n=>n===t?r(e):n));else{const n=[...ve(this,Bt),r(e)];Ze(this,Bt,ia(n,(o,i)=>i.priority-o.priority))}return()=>this.removeSuggester(e.name)}removeSuggester(e){const t=oe(e)?e:e.name;Ze(this,Bt,ve(this,Bt).filter(r=>r.name!==t)),this.clearIgnored(t)}toJSON(){return this.match}apply(e){const{exit:t,change:r}=ve(this,mo);if(ve(this,Ja)&&(Ze(this,Ja,!1),!(t!=null&&t.suggester.appendTransaction)&&!(r!=null&&r.suggester.appendTransaction)))return this;const{tr:n,state:o}=e,i=n.docChanged||n.selectionSet;return n.getMeta(GO)||!i&&!ve(this,Oi)?this:(Ze(this,qp,n.docChanged),this.mapIgnoredDecorations(n),t&&this.resetState(),Ze(this,Za,ve(this,Ci)),this.updateReasons({$pos:n.selection.$from,state:o}),this)}createDecorations(e){const t=this.match;if(!NS(t))return ve(this,Mt);const{disableDecorations:r}=t.suggester;if(De(r)?r(e,t):r)return ve(this,Mt);const{range:o,suggester:i}=t,{name:s,suggestTag:a,suggestClassName:l}=i,{from:c,to:u}=o;return this.shouldIgnoreMatch(t)?ve(this,Mt):ve(this,Mt).add(e.doc,[Je.inline(c,u,{nodeName:a,class:s?`${l} suggest-${s}`:l},{name:s})])}},pP=WO;qp=new WeakMap;Gc=new WeakMap;Bt=new WeakMap;Ci=new WeakMap;Za=new WeakMap;mo=new WeakMap;Mt=new WeakMap;Oi=new WeakMap;Ja=new WeakMap;function MS(){const e=new Set;return t=>{if(e.has(t.name))throw new Error(`A suggester already exists with the name '${t.name}'. The name provided must be unique.`);const r={...dP,...t};return e.add(t.name),r}}var KO=new Ca("suggest");function ov(e){return KO.getState(e)}function LS(e,t){return ov(e).addSuggester(t)}function DS(e){e.setMeta(GO,!0)}function fP(e,t){return ov(e).removeSuggester(t)}function hP(...e){const t=pP.create(e);return new Po({key:KO,view:r=>(t.init(r),{update:n=>t.changeHandler(n.state.tr,!1)}),state:{init:()=>t,apply:(r,n,o,i)=>t.apply({tr:r,state:i})},appendTransaction:(r,n,o)=>{const i=o.tr;return t.updateWithNextSelection(i),t.changeHandler(i,!0),i.docChanged||i.steps.length>0||i.selectionSet||i.storedMarksSet?(t.setLastChangeFromAppend(),i):null},props:{decorations:r=>t.createDecorations(r)}})}function iv(e,t){const r=Object.getPrototypeOf(t);let n=e.selection,o=e.doc,i=e.storedMarks;const s=te();for(const[a,l]of Object.entries(t))s[a]={value:l};return Object.create(r,{...s,storedMarks:{get(){return i}},selection:{get(){return n}},doc:{get(){return o}},tr:{get(){return n=e.selection,o=e.doc,i=e.storedMarks,e}}})}function Ou(e){return({state:t,dispatch:r,view:n,tr:o})=>e(iv(o,t),r,n)}function PS(e){return t=>{var r;return re(t.dispatch===void 0||t.dispatch===((r=t.view)==null?void 0:r.dispatch),{code:U.NON_CHAINABLE_COMMAND}),e(t)}}function mP(...e){return({state:t,dispatch:r,view:n,tr:o,...i})=>{for(const s of e)if(s({state:t,dispatch:r,view:n,tr:o,...i}))return!0;return!1}}var ln={get isBrowser(){return!!(typeof window<"u"&&typeof window.document<"u"&&window.navigator&&window.navigator.userAgent)},get isJSDOM(){return ln.isBrowser&&window.navigator.userAgent.includes("jsdom")},get isNode(){return typeof process<"u"&&process.versions!=null&&process.versions.node!=null},get isIos(){return ln.isBrowser&&/iPod|iPhone|iPad/.test(navigator.platform)},get isMac(){return ln.isBrowser&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)},get isApple(){return ln.isNode?process.platform==="darwin":ln.isBrowser?/Mac|iPod|iPhone|iPad/.test(window.navigator.platform):!1},get isDevelopment(){return!1},get isTest(){return!1},get isProduction(){return!0}};function go(e,t){var r;const n=jP(e);return((r=n==null?void 0:n.getComputedStyle(e))==null?void 0:r.getPropertyValue(t))??""}function ur(e,t){return Object.assign(e.style,t)}function Uf(e){return nr(e)&&gn(e.nodeType)&&oe(e.nodeName)}function dt(e){return Uf(e)&&e.nodeType===1}function gP(e){return Uf(e)&&e.nodeType===3}function em(e){const{types:t,node:r}=e;if(!r)return!1;const n=o=>o===r.type||o===r.type.name;return ft(t)?t.some(n):n(t)}function yP(e,t){const{tr:r}=t;return e.forEach(n=>{n.steps.forEach(o=>{r.step(o)})}),r}function vP({pos:e,tr:t}){const r=t.doc.nodeAt(e);return r&&t.delete(e,e+r.nodeSize),t}function bP({pos:e,tr:t,content:r}){const n=t.doc.nodeAt(e);return n&&t.replaceWith(e,e+n.nodeSize,r),t}function Vd(e){const{predicate:t,selection:r}=e,n=XO(r)?r.selection.$from:lv(r)?r.$from:r;for(let o=n.depth;o>0;o--){const i=n.node(o),s=o>0?n.before(o):0,a=n.start(o),l=s+i.nodeSize;if(t(i,s))return{pos:s,depth:o,node:i,start:a,end:l}}}function EP(e){const{depth:t}=e,r=t>0?e.before(t):0,n=e.node(t),o=e.start(t),i=r+n.nodeSize;return{pos:r,start:o,node:n,end:i,depth:t}}function kP(e){const t=Vd({predicate:()=>!0,selection:e});return re(t,{message:"No parent node found for the selection provided."}),t}function Mo(e){const{types:t,selection:r}=e;return Vd({predicate:n=>em({types:t,node:n}),selection:r})}function xP(e){const{types:t,selection:r}=e;if(!(!Gd(r)||!em({types:t,node:r.node})))return{pos:r.$from.pos,depth:r.$from.depth,start:r.$from.start(),end:r.$from.pos+r.node.nodeSize,node:r.node}}function sv(e){return lv(e)?e.empty:e.selection.empty}function SP(e){return e.docChanged||e.selectionSet}function YO(e){return!!Yu(e)}function Yu(e){const{state:t,type:r,attrs:n}=e,{selection:o,doc:i}=t,s=oe(r)?i.type.schema.nodes[r]:r;re(s,{code:U.SCHEMA,message:`No node exists for ${r}`});const a=xP({selection:o,types:r})??Vd({predicate:l=>l.type===s,selection:o});return!n||Af(n)||!a||a.node.hasMarkup(s,{...a.node.attrs,...n})?a:void 0}function Vf(...e){return t=>{if(!Ox(e))return!1;const[r,...n]=e;let o=!1;const i=(...l)=>()=>{if(!Ox(l))return!1;o=!0;const[,...c]=l;return Vf(...l)({...t,next:i(...c)})},s=i(...n),a=r({...t,next:s});return o||a?a:s()}}function wP(e,t){const r=new Map,n=te();for(const o of e)for(const[i,s]of Dt(o)){const l=[...r.get(i)??[],s],c=Vf(...l);r.set(i,l),n[i]=t(c)}return n}function TP(e){return wP(e,t=>(r,n,o)=>t({state:r,dispatch:n,view:o,tr:r.tr,next:()=>!1}))}function av(e,t){const r=e.attrs??{};return Object.entries(t).every(([n,o])=>r[n]===o)}function CP(e){return JO(e,[Jo,St,Ut,oo])}function dc(e){return nr(e)}function pc(e,t){return ft(t)?wr(t,e[si]):t===e[si]}function OP(e){return nr(e)&&e instanceof W1}function AP(e,t){return oe(e)?lt(t.nodes,e):e}function qO(e){return nr(e)&&e instanceof Bd}function NP(e,t){return oe(e)?lt(t.marks,e):e}function jd(e){return nr(e)&&e instanceof ji}function RP(e){return nr(e)&&e instanceof I}function _P(e){return nr(e)&&e instanceof Ne}function XO(e){return nr(e)&&e instanceof js}function vs(e){return nr(e)&&e instanceof ue}function IP(e){return nr(e)&&e instanceof xr}function lv(e){return nr(e)&&e instanceof ke}function MP(e){return nr(e)&&e instanceof Dl}function zS(e){const{trState:t,from:r,to:n,type:o,attrs:i={}}=e,{doc:s}=t,a=NP(o,s.type.schema);if(Object.keys(i).length===0)return s.rangeHasMark(r,n,a);let l=!1;return n>r&&s.nodesBetween(r,n,c=>l?!1:(l=(c.marks??[]).some(d=>d.type!==a?!1:av(d,i)),!l)),l}function Gd(e){return nr(e)&&e instanceof de}function jf(e){const{trState:t,type:r,attrs:n={},from:o,to:i}=e,{selection:s,doc:a,storedMarks:l}=t,c=oe(r)?a.type.schema.marks[r]:r;if(re(c,{code:U.SCHEMA,message:`Mark type: ${r} does not exist on the current schema.`}),o&&i)try{return Math.max(o,i)d.type!==r?!1:av(d,n??{})):zS({...e,from:s.from,to:s.to})}function cv(e,t={}){const r=LP(e.type.schema);if(!r)return!1;const{ignoreAttributes:n,ignoreDocAttributes:o}=t;return n?ZO(r,e):o?r.content.eq(e.content):r.eq(e)}function ZO(e,t){if(e===t)return!0;const r=e.type===t.type&&Ne.sameSet(e.marks,t.marks);function n(){if(e.content===t.content)return!0;if(e.content.size!==t.content.size)return!1;const o=[],i=[];e.content.forEach(s=>o.push(s)),t.content.forEach(s=>i.push(s));for(const[s,a]of o.entries()){const l=i[s];if(!l||!ZO(a,l))return!1}return!0}return r&&n()}function LP(e){var t;return((t=e.nodes.doc)==null?void 0:t.createAndFill())??void 0}function tm(e){for(const t of Object.values(e.nodes))if(t.name!=="doc"&&(t.isBlock||t.isTextblock))return t;re(!1,{code:U.SCHEMA,message:"No default block node found for the provided schema."})}function DP(e){return e.type===tm(e.type.schema)}function rm(e){return!!e&&e.type.isBlock&&!e.textContent&&!e.childCount}function ai(e,t,r){const n=e.parent.childAfter(e.parentOffset);if(!n.node)return;const o=oe(t)?t:t.name,i=n.node.marks.find(({type:d})=>d.name===o);let s=e.index(),a=e.start()+n.offset,l=s+1,c=a+n.node.nodeSize;if(!i)return r&&c0&&i.isInSet(e.parent.child(s-1).marks);)s-=1,a-=e.parent.child(s).nodeSize;for(;l{e=h(e,i||r,t)}),i)return e?new ae(Q.from(t.state.schema.text(e.replace(/\r\n?/g,` +`))),0,0):ae.empty;let d=t.someProp("clipboardTextParser",h=>h(e,o,r,t));if(d)l=d;else{let h=o.marks(),{schema:f}=t.state,p=Ur.fromSchema(f);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(g=>{let m=s.appendChild(document.createElement("p"));g&&m.appendChild(p.serializeNode(f.text(g,h)))})}}else t.someProp("transformPastedHTML",d=>{n=d(n,t)}),s=x3(n),Fh&&k3(s);let u=s&&s.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let h=s.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;s=h}if(l||(l=(t.someProp("clipboardParser")||t.someProp("domParser")||pb.fromSchema(t.state.schema)).parseSlice(s,{preserveWhitespace:!!(a||c),context:o,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!b3.test(h.parentNode.nodeName)?{ignore:!0}:null}})),c)l=E3(KS(l,+c[1],+c[2]),c[4]);else if(l=ae.maxOpen(w3(l.content,o),!0),l.openStart||l.openEnd){let d=0,h=0;for(let f=l.content.firstChild;d{l=d(l,t)}),l}const b3=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function w3(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let o=e.node(n).contentMatchAt(e.index(n)),i,s=[];if(t.forEach(l=>{if(!s)return;let a=o.findWrapping(l.type),u;if(!a)return s=null;if(u=s.length&&i.length&&h2(a,i,l,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=f2(s[s.length-1],i.length));let c=d2(l,a);s.push(c),o=o.matchType(c.type),i=a}}),s)return Q.from(s)}return t}function d2(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,Q.from(t));return t}function h2(t,e,n,r,o){if(o1&&(i=0),o=n&&(l=e<0?s.contentMatchAt(0).fillBefore(l,i<=o).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(Q.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(l))}function KS(t,e,n){return e]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=g2().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),o;if((o=r&&p2[r[1].toLowerCase()])&&(t=o.map(i=>"<"+i+">").join("")+t+o.map(i=>"").reverse().join("")),n.innerHTML=t,o)for(let i=0;i=0;l-=2){let a=n.nodes[r[l]];if(!a||a.hasRequiredAttrs())break;o=Q.from(a.create(r[l+1],o)),i++,s++}return new ae(o,i,s)}const lr={},cr={},S3={touchstart:!0,touchmove:!0};class C3{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function T3(t){for(let e in lr){let n=lr[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{_3(t,r)&&!Sb(t,r)&&(t.editable||!(r.type in cr))&&n(t,r)},S3[e]?{passive:!0}:void 0)}ar&&t.dom.addEventListener("input",()=>null),_0(t)}function ks(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function A3(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function _0(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>Sb(t,r))})}function Sb(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function _3(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function R3(t,e){!Sb(t,e)&&lr[e.type]&&(t.editable||!(e.type in cr))&&lr[e.type](t,e)}cr.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!v2(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(Lo&&Kn&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),Nc&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",o=>o(t,Ma(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||y3(t,n)?n.preventDefault():ks(t,"key")};cr.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};cr.keypress=(t,e)=>{let n=e;if(v2(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||oo&&n.metaKey)return;if(t.someProp("handleKeyPress",o=>o(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof Ie)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode);!/[\r\n]/.test(o)&&!t.someProp("handleTextInput",i=>i(t,r.$from.pos,r.$to.pos,o))&&t.dispatch(t.state.tr.insertText(o).scrollIntoView()),n.preventDefault()}};function um(t){return{left:t.clientX,top:t.clientY}}function M3(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function Cb(t,e,n,r,o){if(r==-1)return!1;let i=t.state.doc.resolve(r);for(let s=i.depth+1;s>0;s--)if(t.someProp(e,l=>s>i.depth?l(t,n,i.nodeAfter,i.before(s),o,!0):l(t,n,i.node(s),i.before(s),o,!1)))return!0;return!1}function vc(t,e,n){t.focused||t.focus();let r=t.state.tr.setSelection(e);n=="pointer"&&r.setMeta("pointer",!0),t.dispatch(r)}function O3(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&Le.isSelectable(r)?(vc(t,new Le(n),"pointer"),!0):!1}function I3(t,e){if(e==-1)return!1;let n=t.state.selection,r,o;n instanceof Le&&(r=n.node);let i=t.state.doc.resolve(e);for(let s=i.depth+1;s>0;s--){let l=s>i.depth?i.nodeAfter:i.node(s);if(Le.isSelectable(l)){r&&n.$from.depth>0&&s>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?o=i.before(n.$from.depth):o=i.before(s);break}}return o!=null?(vc(t,Le.create(t.state.doc,o),"pointer"),!0):!1}function L3(t,e,n,r,o){return Cb(t,"handleClickOn",e,n,r)||t.someProp("handleClick",i=>i(t,e,r))||(o?I3(t,n):O3(t,n))}function N3(t,e,n,r){return Cb(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",o=>o(t,e,r))}function $3(t,e,n,r){return Cb(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",o=>o(t,e,r))||D3(t,n,r)}function D3(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(vc(t,Ie.create(r,0,r.content.size),"pointer"),!0):!1;let o=r.resolve(e);for(let i=o.depth+1;i>0;i--){let s=i>o.depth?o.nodeAfter:o.node(i),l=o.before(i);if(s.inlineContent)vc(t,Ie.create(r,l+1,l+1+s.content.size),"pointer");else if(Le.isSelectable(s))vc(t,Le.create(r,l),"pointer");else continue;return!0}}function Tb(t){return Yp(t)}const m2=oo?"metaKey":"ctrlKey";lr.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=Tb(t),o=Date.now(),i="singleClick";o-t.input.lastClick.time<500&&M3(n,t.input.lastClick)&&!n[m2]&&(t.input.lastClick.type=="singleClick"?i="doubleClick":t.input.lastClick.type=="doubleClick"&&(i="tripleClick")),t.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};let s=t.posAtCoords(um(n));s&&(i=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new P3(t,s,n,!!r)):(i=="doubleClick"?N3:$3)(t,s.pos,s.inside,n)?n.preventDefault():ks(t,"pointer"))};class P3{constructor(e,n,r,o){this.view=e,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[m2],this.allowDefault=r.shiftKey;let i,s;if(n.inside>-1)i=e.state.doc.nodeAt(n.inside),s=n.inside;else{let c=e.state.doc.resolve(n.pos);i=c.parent,s=c.depth?c.before():0}const l=o?null:r.target,a=l?e.docView.nearestDesc(l,!0):null;this.target=a?a.dom:null;let{selection:u}=e.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||u instanceof Le&&u.from<=s&&u.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Ho&&!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(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),ks(e,"pointer")}done(){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(()=>zi(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(um(e))),this.updateAllowDefault(e),this.allowDefault||!n?ks(this.view,"pointer"):L3(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||ar&&this.mightDrag&&!this.mightDrag.node.isAtom||Kn&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(vc(this.view,Ue.near(this.view.state.doc.resolve(n.pos)),"pointer"),e.preventDefault()):ks(this.view,"pointer")}move(e){this.updateAllowDefault(e),ks(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}lr.touchstart=t=>{t.input.lastTouch=Date.now(),Tb(t),ks(t,"pointer")};lr.touchmove=t=>{t.input.lastTouch=Date.now(),ks(t,"pointer")};lr.contextmenu=t=>Tb(t);function v2(t,e){return t.composing?!0:ar&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const z3=Lo?5e3:-1;cr.compositionstart=cr.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))t.markCursor=t.state.storedMarks||n.marks(),Yp(t,!0),t.markCursor=null;else if(Yp(t),Ho&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(s.nodeType==3){t.domSelection().collapse(s,s.nodeValue.length);break}else o=s,i=-1}}t.input.composing=!0}y2(t,z3)};cr.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,y2(t,20))};function y2(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>Yp(t),e))}function b2(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=F3());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function F3(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function Yp(t,e=!1){if(!(Lo&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),b2(t),e||t.docView&&t.docView.dirty){let n=kb(t);return n&&!n.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(n)):t.updateState(t.state),!0}return!1}}function B3(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const $c=xr&&As<15||Nc&&P5<604;lr.copy=cr.cut=(t,e)=>{let n=e,r=t.state.selection,o=n.type=="cut";if(r.empty)return;let i=$c?null:n.clipboardData,s=r.content(),{dom:l,text:a}=c2(t,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",l.innerHTML),i.setData("text/plain",a)):B3(t,l),o&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function H3(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function U3(t,e){if(!t.dom.parentNode)return;let n=t.input.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();let o=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Wd(t,r.value,null,o,e):Wd(t,r.textContent,r.innerHTML,o,e)},50)}function Wd(t,e,n,r,o){let i=u2(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",a=>a(t,o,i||ae.empty)))return!0;if(!i)return!1;let s=H3(i),l=s?t.state.tr.replaceSelectionWith(s,r):t.state.tr.replaceSelection(i);return t.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}cr.paste=(t,e)=>{let n=e;if(t.composing&&!Lo)return;let r=$c?null:n.clipboardData,o=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&Wd(t,r.getData("text/plain"),r.getData("text/html"),o,n)?n.preventDefault():U3(t,n)};class W3{constructor(e,n){this.slice=e,this.move=n}}const w2=oo?"altKey":"ctrlKey";lr.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=t.state.selection,i=o.empty?null:t.posAtCoords(um(n));if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof Le?o.to-1:o.to))){if(r&&r.mightDrag)t.dispatch(t.state.tr.setSelection(Le.create(t.state.doc,r.mightDrag.pos)));else if(n.target&&n.target.nodeType==1){let u=t.docView.nearestDesc(n.target,!0);u&&u.node.type.spec.draggable&&u!=t.docView&&t.dispatch(t.state.tr.setSelection(Le.create(t.state.doc,u.posBefore)))}}let s=t.state.selection.content(),{dom:l,text:a}=c2(t,s);n.dataTransfer.clearData(),n.dataTransfer.setData($c?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",$c||n.dataTransfer.setData("text/plain",a),t.dragging=new W3(s,!n[w2])};lr.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};cr.dragover=cr.dragenter=(t,e)=>e.preventDefault();cr.drop=(t,e)=>{let n=e,r=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let o=t.posAtCoords(um(n));if(!o)return;let i=t.state.doc.resolve(o.pos),s=r&&r.slice;s?t.someProp("transformPasted",p=>{s=p(s,t)}):s=u2(t,n.dataTransfer.getData($c?"Text":"text/plain"),$c?null:n.dataTransfer.getData("text/html"),!1,i);let l=!!(r&&!n[w2]);if(t.someProp("handleDrop",p=>p(t,n,s||ae.empty,l))){n.preventDefault();return}if(!s)return;n.preventDefault();let a=s?nP(t.state.doc,i.pos,s):i.pos;a==null&&(a=i.pos);let u=t.state.tr;l&&u.deleteSelection();let c=u.mapping.map(a),d=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,h=u.doc;if(d?u.replaceRangeWith(c,c,s.content.firstChild):u.replaceRange(c,c,s),u.doc.eq(h))return;let f=u.doc.resolve(c);if(d&&Le.isSelectable(s.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(s.content.firstChild))u.setSelection(new Le(f));else{let p=u.mapping.map(a);u.mapping.maps[u.mapping.maps.length-1].forEach((g,m,v,y)=>p=y),u.setSelection(Eb(t,f,u.doc.resolve(p)))}t.focus(),t.dispatch(u.setMeta("uiEvent","drop"))};lr.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&zi(t)},20))};lr.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};lr.beforeinput=(t,e)=>{if(Kn&&Lo&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",i=>i(t,Ma(8,"Backspace")))))return;let{$cursor:o}=t.state.selection;o&&o.pos>0&&t.dispatch(t.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let t in cr)lr[t]=cr[t];function Vd(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class Xp{constructor(e,n){this.toDOM=e,this.spec=n||Ua,this.side=this.spec.side||0}map(e,n,r,o){let{pos:i,deleted:s}=e.mapResult(n.from+o,this.side<0?-1:1);return s?null:new kt(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof Xp&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Vd(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Rs{constructor(e,n){this.attrs=e,this.spec=n||Ua}map(e,n,r,o){let i=e.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,s=e.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=s?null:new kt(i,s,this)}valid(e,n){return n.from=e&&(!i||i(l.spec))&&r.push(l.copy(l.from+o,l.to+o))}for(let s=0;se){let l=this.children[s]+1;this.children[s+2].findInner(e-l,n-l,r,o+l,i)}}map(e,n,r){return this==Vn||e.maps.length==0?this:this.mapInner(e,n,0,0,r||Ua)}mapInner(e,n,r,o,i){let s;for(let l=0;l{let u=a+r,c;if(c=k2(n,l,u)){for(o||(o=this.children.slice());il&&d.to=e){this.children[l]==e&&(r=this.children[l+2]);break}let i=e+1,s=i+n.content.size;for(let l=0;li&&a.type instanceof Rs){let u=Math.max(i,a.from)-i,c=Math.min(s,a.to)-i;uo.map(e,n,Ua));return vs.from(r)}forChild(e,n){if(n.isLeaf)return je.empty;let r=[];for(let o=0;on instanceof je)?e:e.reduce((n,r)=>n.concat(r instanceof je?r:r.members),[]))}}}function V3(t,e,n,r,o,i,s){let l=t.slice();for(let u=0,c=i;u{let m=g-p-(f-h);for(let v=0;vy+c-d)continue;let b=l[v]+c-d;f>=b?l[v+1]=h<=b?-2:-1:p>=o&&m&&(l[v]+=m,l[v+1]+=m)}d+=m}),c=n.maps[u].map(c,-1)}let a=!1;for(let u=0;u=r.content.size){a=!0;continue}let h=n.map(t[u+1]+i,-1),f=h-o,{index:p,offset:g}=r.content.findIndex(d),m=r.maybeChild(p);if(m&&g==d&&g+m.nodeSize==f){let v=l[u+2].mapInner(n,m,c+1,t[u]+i+1,s);v!=Vn?(l[u]=d,l[u+1]=f,l[u+2]=v):(l[u+1]=-2,a=!0)}else a=!0}if(a){let u=j3(l,t,e,n,o,i,s),c=qp(u,r,0,s);e=c.local;for(let d=0;dn&&s.to{let u=k2(t,l,a+n);if(u){i=!0;let c=qp(u,l,n+a+1,r);c!=Vn&&o.push(a,a+l.nodeSize,c)}});let s=x2(i?E2(t):t,-n).sort(Wa);for(let l=0;l0;)e++;t.splice(e,0,n)}function r1(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=Vn&&e.push(r)}),t.cursorWrapper&&e.push(je.create(t.state.doc,[t.cursorWrapper.deco])),vs.from(e)}const G3={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},K3=xr&&As<=11;class Y3{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class X3{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Y3,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;oo.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),K3&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,G3)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;nthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(HS(this.view)){if(this.suppressingSelectionUpdates)return zi(this.view);if(xr&&As<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&qa(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,r;for(let i=e.focusNode;i;i=Ud(i))n.add(i);for(let i=e.anchorNode;i;i=Ud(i))if(n.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&HS(e)&&!this.ignoreSelectionChange(r),i=-1,s=-1,l=!1,a=[];if(e.editable)for(let c=0;c1){let c=a.filter(d=>d.nodeName=="BR");if(c.length==2){let d=c[0],h=c[1];d.parentNode&&d.parentNode.parentNode==h.parentNode?h.remove():d.remove()}}let u=null;i<0&&o&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)-1||o)&&(i>-1&&(e.docView.markDirty(i,s),q3(e)),this.handleDOMChange(i,s,l,a),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||zi(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let c=0;co;m--){let v=r.childNodes[m-1],y=v.pmViewDesc;if(v.nodeName=="BR"&&!y){i=m;break}if(!y||y.size)break}let d=t.state.doc,h=t.someProp("domParser")||pb.fromSchema(t.state.schema),f=d.resolve(s),p=null,g=h.parse(r,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:o,to:i,preserveWhitespace:f.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:J3,context:f});if(u&&u[0].pos!=null){let m=u[0].pos,v=u[1]&&u[1].pos;v==null&&(v=m),p={anchor:m+s,head:v+s}}return{doc:g,sel:p,from:s,to:l}}function J3(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(ar&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||ar&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const ez=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function tz(t,e,n,r,o){let i=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let C=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,O=kb(t,C);if(O&&!t.state.selection.eq(O)){if(Kn&&Lo&&t.input.lastKeyCode===13&&Date.now()-100R(t,Ma(13,"Enter"))))return;let _=t.state.tr.setSelection(O);C=="pointer"?_.setMeta("pointer",!0):C=="key"&&_.scrollIntoView(),i&&_.setMeta("composition",i),t.dispatch(_)}return}let s=t.state.doc.resolve(e),l=s.sharedDepth(n);e=s.before(l+1),n=t.state.doc.resolve(n).after(l+1);let a=t.state.selection,u=Q3(t,e,n),c=t.state.doc,d=c.slice(u.from,u.to),h,f;t.input.lastKeyCode===8&&Date.now()-100Date.now()-225||Lo)&&o.some(C=>C.nodeType==1&&!ez.test(C.nodeName))&&(!p||p.endA>=p.endB)&&t.someProp("handleKeyDown",C=>C(t,Ma(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!p)if(r&&a instanceof Ie&&!a.empty&&a.$head.sameParent(a.$anchor)&&!t.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))p={start:a.from,endA:a.to,endB:a.to};else{if(u.sel){let C=QS(t,t.state.doc,u.sel);if(C&&!C.eq(t.state.selection)){let O=t.state.tr.setSelection(C);i&&O.setMeta("composition",i),t.dispatch(O)}}return}if(Kn&&t.cursorWrapper&&u.sel&&u.sel.anchor==t.cursorWrapper.deco.from&&u.sel.head==u.sel.anchor){let C=p.endB-p.start;u.sel={anchor:u.sel.anchor+C,head:u.sel.anchor+C}}t.input.domChangeCount++,t.state.selection.fromt.state.selection.from&&p.start<=t.state.selection.from+2&&t.state.selection.from>=u.from?p.start=t.state.selection.from:p.endA=t.state.selection.to-2&&t.state.selection.to<=u.to&&(p.endB+=t.state.selection.to-p.endA,p.endA=t.state.selection.to)),xr&&As<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>u.from&&u.doc.textBetween(p.start-u.from-1,p.start-u.from+1)=="  "&&(p.start--,p.endA--,p.endB--);let g=u.doc.resolveNoCache(p.start-u.from),m=u.doc.resolveNoCache(p.endB-u.from),v=c.resolve(p.start),y=g.sameParent(m)&&g.parent.inlineContent&&v.end()>=p.endA,b;if((Nc&&t.input.lastIOSEnter>Date.now()-225&&(!y||o.some(C=>C.nodeName=="DIV"||C.nodeName=="P"))||!y&&g.posC(t,Ma(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>p.start&&rz(c,p.start,p.endA,g,m)&&t.someProp("handleKeyDown",C=>C(t,Ma(8,"Backspace")))){Lo&&Kn&&t.domObserver.suppressSelectionUpdates();return}Kn&&Lo&&p.endB==p.start&&(t.input.lastAndroidDelete=Date.now()),Lo&&!y&&g.start()!=m.start()&&m.parentOffset==0&&g.depth==m.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==p.endA&&(p.endB-=2,m=u.doc.resolveNoCache(p.endB-u.from),setTimeout(()=>{t.someProp("handleKeyDown",function(C){return C(t,Ma(13,"Enter"))})},20));let w=p.start,k=p.endA,x,S,T;if(y){if(g.pos==m.pos)xr&&As<=11&&g.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>zi(t),20)),x=t.state.tr.delete(w,k),S=c.resolve(p.start).marksAcross(c.resolve(p.endA));else if(p.endA==p.endB&&(T=nz(g.parent.content.cut(g.parentOffset,m.parentOffset),v.parent.content.cut(v.parentOffset,p.endA-v.start()))))x=t.state.tr,T.type=="add"?x.addMark(w,k,T.mark):x.removeMark(w,k,T.mark);else if(g.parent.child(g.index()).isText&&g.index()==m.index()-(m.textOffset?0:1)){let C=g.parent.textBetween(g.parentOffset,m.parentOffset);if(t.someProp("handleTextInput",O=>O(t,w,k,C)))return;x=t.state.tr.insertText(C,w,k)}}if(x||(x=t.state.tr.replace(w,k,u.doc.slice(p.start-u.from,p.endB-u.from))),u.sel){let C=QS(t,x.doc,u.sel);C&&!(Kn&&Lo&&t.composing&&C.empty&&(p.start!=p.endB||t.input.lastAndroidDeletee.content.size?null:Eb(t,e.resolve(n.anchor),e.resolve(n.head))}function nz(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,o=n,i=r,s,l,a;for(let c=0;cc.mark(l.addToSet(c.marks));else if(o.length==0&&i.length==1)l=i[0],s="remove",a=c=>c.mark(l.removeFromSet(c.marks));else return null;let u=[];for(let c=0;cn||o1(s,!0,!1)0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,o++,e=!1;if(n){let i=t.node(r).maybeChild(t.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function oz(t,e,n,r,o){let i=t.findDiffStart(e,n);if(i==null)return null;let{a:s,b:l}=t.findDiffEnd(e,n+t.size,n+e.size);if(o=="end"){let a=Math.max(0,i-Math.min(s,l));r-=s+a-i}if(s=s?i-r:0;i-=a,l=i+(l-s),s=i}else if(l=l?i-r:0;i-=a,s=i+(s-l),l=i}return{start:i,endA:s,endB:l}}class iz{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new C3,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(rC),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=tC(this),eC(this),this.nodeViews=nC(this),this.docView=$S(this.state.doc,JS(this),r1(this),this.dom,this),this.domObserver=new X3(this,(r,o,i,s)=>tz(this,r,o,i,s)),this.domObserver.start(),T3(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&_0(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(rC),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){let r=this.state,o=!1,i=!1;e.storedMarks&&this.composing&&(b2(this),i=!0),this.state=e;let s=r.plugins!=e.plugins||this._props.plugins!=n.plugins;if(s||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let h=nC(this);az(h,this.nodeViews)&&(this.nodeViews=h,o=!0)}(s||n.handleDOMEvents!=this._props.handleDOMEvents)&&_0(this),this.editable=tC(this),eC(this);let l=r1(this),a=JS(this),u=r.plugins!=e.plugins&&!r.doc.eq(e.doc)?"reset":e.scrollToSelection>r.scrollToSelection?"to selection":"preserve",c=o||!this.docView.matchesNode(e.doc,a,l);(c||!e.selection.eq(r.selection))&&(i=!0);let d=u=="preserve"&&i&&this.dom.style.overflowAnchor==null&&B5(this);if(i){this.domObserver.stop();let h=c&&(xr||Kn)&&!this.composing&&!r.selection.empty&&!e.selection.empty&&sz(r.selection,e.selection);if(c){let f=Kn?this.trackWrites=this.domSelectionRange().focusNode:null;(o||!this.docView.update(e.doc,a,l,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=$S(e.doc,a,l,this.dom,this)),f&&!this.trackWrites&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&d3(this))?zi(this,h):(s2(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(r),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():d&&H5(d)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof Le){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&RS(this,n.getBoundingClientRect(),e)}else RS(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;nn.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return K5(this,e)}coordsAtPos(e,n=1){return QR(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let o=this.docView.posFromDOM(e,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(e,n){return Q5(this,n||this.state,e)}pasteHTML(e,n){return Wd(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return Wd(this,e,null,!0,n||new ClipboardEvent("paste"))}destroy(){this.docView&&(A3(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],r1(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return this.docView==null}dispatchEvent(e){return R3(this,e)}dispatch(e){let n=this._props.dispatchTransaction;n?n.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){return ar&&this.root.nodeType===11&&L5(this.dom.ownerDocument)==this.dom?Z3(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function JS(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[kt.node(0,t.state.doc.content.size,e)]}function eC(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:kt.widget(t.state.selection.head,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function tC(t){return!t.someProp("editable",e=>e(t.state)===!1)}function sz(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function nC(t){let e=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(e,o)||(e[o]=r[o])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function az(t,e){let n=0,r=0;for(let o in t){if(t[o]!=e[o])return!0;n++}for(let o in e)r++;return n!=r}function rC(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var lz=t=>{if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};const cz=jo(lz);var S2=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},ze=(t,e,n)=>(S2(t,e,"read from private field"),n?n.call(t):e.get(t)),xi=(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)},xt=(t,e,n,r)=>(S2(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);function uz(t){return!!(t.prev&&t.next&&t.prev.text.full!==t.next.text.full)}function dz(t){return!!(t.prev&&t.next&&t.prev.range.cursor!==t.next.range.cursor)}function hz(t){return!!(!t.prev&&t.next)}function fz(t){return!!(t.prev&&!t.next)}function pz(t){return!!(t.prev&&t.next&&t.prev.range.from!==t.next.range.from)}function gz(t){return t==="invalid-exit-split"}var mz=["jump-backward-exit","jump-forward-exit"],vz=["jump-backward-change","jump-forward-change"];function yz(t){var e,n;return sr(mz,(e=t.exit)==null?void 0:e.exitReason)||sr(vz,(n=t.change)==null?void 0:n.changeReason)}function oC(t){return!!(t&&t.query.full.length>=t.suggester.matchOffset)}function iC(t){return Dn(t)&&t instanceof Ie}function yr(t){const{match:e,changeReason:n,exitReason:r}=t;return{...e,changeReason:n,exitReason:r}}function bz(t,e){const{invalidPrefixCharacters:n,validPrefixCharacters:r}=e;return n?!new RegExp(M0(n)).test(t):new RegExp(M0(r)).test(t)}function wz(t){const{text:e,regexp:n,$pos:r,suggester:o}=t,i=r.start();let s;return su(e,n).forEach(l=>{const a=l.input.slice(Math.max(0,l.index-1),l.index);if(bz(a,o)){const u=l.index+i,c=l[0],d=l[1];if(!ke(c)||!ke(d))return;const h=u+c.length,f=Math.min(h,r.pos),p=f-u;u=r.pos&&(s={range:{from:u,to:h,cursor:f},match:l,query:{partial:c.slice(d.length,p),full:c.slice(d.length)},text:{partial:c.slice(0,p),full:c},textAfter:r.doc.textBetween(h,r.end(),ws,ws),textBefore:r.doc.textBetween(i,u,ws,ws),suggester:o})}}),s}function C2(t){const{$pos:e,suggester:n}=t,{char:r,name:o,startOfLine:i,supportedCharacters:s,matchOffset:l,multiline:a,caseInsensitive:u,unicode:c}=n,d=Rz({char:r,matchOffset:l,startOfLine:i,supportedCharacters:s,multiline:a,caseInsensitive:u,unicode:c}),h=e.doc.textBetween(e.before(),e.end(),ws,ws);return wz({suggester:n,text:h,regexp:d,$pos:e,char:r,name:o})}function T2(t){const{state:e,match:n}=t;try{return C2({$pos:e.doc.resolve(n.range.cursor),suggester:n.suggester})}catch{return}}function A2(t){const{prev:e,next:n,state:r}=t;return!n&&e.range.from>=r.doc.nodeSize?{exit:yr({match:e,exitReason:"delete"})}:!n||!e.query.partial?{exit:yr({match:e,exitReason:"invalid-exit-split"})}:e.range.to===n.range.cursor?{exit:yr({match:n,exitReason:"exit-end"})}:e.query.partial?{exit:yr({match:n,exitReason:"exit-split"})}:{}}function xz(t){const{prev:e,next:n,state:r}=t,o=be(),i=T2({state:r,match:e}),{exit:s}=i&&i.query.full!==e.query.full?A2({prev:e,next:i,state:r}):o;return e.range.from=e.range.to)?{exit:yr({match:e,exitReason:"selection-outside"})}:r.pos>e.range.to?{exit:yr({match:e,exitReason:"move-end"})}:r.pos<=e.range.from?{exit:yr({match:e,exitReason:"move-start"})}:{}}function Ez(t){const{prev:e,next:n,state:r,$pos:o}=t,i=be();if(!e&&!n)return i;const s={prev:e,next:n};return pz(s)?xz({prev:s.prev,next:s.next,state:r}):hz(s)?{change:yr({match:s.next,changeReason:"start"})}:fz(s)?kz({$pos:o,match:s.prev,state:r}):uz(s)?{change:yr({match:s.next,changeReason:"change-character"})}:dz(s)?{change:yr({match:s.next,changeReason:r.selection.empty?"move":"selection-inside"})}:i}function sC(t,e){for(let n=t.depth;n>0;n--){const r=t.node(n);if(e.includes(r.type.name))return!0}return!1}function R0(t,e){const{$from:n,$to:r}=t;return _2(t,e)?!0:fb(n.pos,r.pos).some(o=>Sz(n.doc.resolve(o),e))}function _2(t,e){const{$from:n,$to:r}=t,o=new Set((n.marksAcross(r)??[]).map(i=>i.type.name));return e.some(i=>o.has(i))}function Sz(t,e){const n=new Set(t.marks().map(r=>r.type.name));return e.some(r=>n.has(r))}function Cz(t,e){const{$cursor:n}=e,{validMarks:r,validNodes:o,invalidMarks:i,invalidNodes:s}=t;return!r&&!o&&Bs(i)&&Bs(s)?!0:!(r&&!_2(e,r)||o&&!sC(n,o)||!r&&R0(e,i)||!o&&sC(n,s))}function aC(t){const{suggesters:e,$pos:n,selectionEmpty:r}=t;for(const o of e)if(!(o.emptySelectionsOnly&&!r))try{const i=C2({suggester:o,$pos:n});if(!i)continue;const s={$from:n.doc.resolve(i.range.from),$to:n.doc.resolve(i.range.to),$cursor:n};if(Cz(o,s)&&o.isValidPosition(s,i))return i}catch{}}function M0(t){return sD(t)?t.source:t}function Tz(t){return t?"^":""}function Az(t,e){return`(?:${M0(t)}){${e},}`}function _z(t){return ke(t)?new RegExp(cz(t)):t}function Rz(t){const{char:e,matchOffset:n,startOfLine:r,supportedCharacters:o,captureChar:i=!0,caseInsensitive:s=!1,multiline:l=!1,unicode:a=!1}=t,u=`g${l?"m":""}${s?"i":""}${a?"u":""}`;let c=_z(e).source;return i&&(c=`(${c})`),new RegExp(`${Tz(r)}${c}${Az(o,n)}`,u)}var Mz={appendTransaction:!1,priority:50,ignoredTag:"span",matchOffset:0,disableDecorations:!1,startOfLine:!1,suggestClassName:"suggest",suggestTag:"span",supportedCharacters:/\w+/,validPrefixCharacters:/^[\s\0]?$/,invalidPrefixCharacters:null,ignoredClassName:null,invalidMarks:[],invalidNodes:[],validMarks:null,validNodes:null,isValidPosition:()=>!0,checkNextValidSelection:null,emptySelectionsOnly:!1,caseInsensitive:!1,multiline:!1,unicode:!1,captureChar:!0},R2="__ignore_prosemirror_suggest_update__",ip,Uu,gn,ls,Gl,Yo,an,cs,Kl,M2=class{constructor(t){xi(this,ip,!1),xi(this,Uu,!1),xi(this,gn,void 0),xi(this,ls,void 0),xi(this,Gl,void 0),xi(this,Yo,be()),xi(this,an,je.empty),xi(this,cs,!1),xi(this,Kl,!1),this.setMarkRemoved=()=>{xt(this,cs,!0)},this.findNextTextSelection=n=>{const r=n.$from.doc,o=Math.min(r.nodeSize-2,n.to+1),i=r.resolve(o),s=Ue.findFrom(i,1,!0);if(iC(s))return s},this.ignoreNextExit=()=>{xt(this,Uu,!0)},this.addIgnored=({from:n,name:r,specific:o=!1})=>{const i=ze(this,gn).find(c=>c.name===r);if(!i)throw new Error(`No suggester exists for the name provided: ${r}`);const s=ke(i.char)?i.char.length:1,l=n+s,a=i.ignoredClassName?{class:i.ignoredClassName}:{},u=kt.inline(n,l,{nodeName:i.ignoredTag,...a},{name:r,specific:o,char:i.char});xt(this,an,ze(this,an).add(this.view.state.doc,[u]))},this.removeIgnored=({from:n,name:r})=>{const o=ze(this,gn).find(l=>l.name===r);if(!o)throw new Error(`No suggester exists for the name provided: ${r}`);const i=ke(o.char)?o.char.length:1,s=ze(this,an).find(n,n+i)[0];!s||s.spec.name!==r||xt(this,an,ze(this,an).remove([s]))},this.clearIgnored=n=>{if(!n){xt(this,an,je.empty);return}const o=ze(this,an).find().filter(({spec:i})=>i.name===n);xt(this,an,ze(this,an).remove(o))},this.findMatchAtPosition=(n,r)=>{const o=r?ze(this,gn).filter(i=>i.name===r):ze(this,gn);return aC({suggesters:o,$pos:n,docChanged:!1,selectionEmpty:!0})},this.setLastChangeFromAppend=()=>{xt(this,Kl,!0)};const e=lC();xt(this,gn,t.map(e)),xt(this,gn,Ka(ze(this,gn),(n,r)=>r.priority-n.priority))}static create(t){return new M2(t)}get decorationSet(){return ze(this,an)}get removed(){return ze(this,cs)}get match(){return ze(this,ls)?ze(this,ls):ze(this,Gl)&&ze(this,Yo).exit?ze(this,Gl):void 0}init(t){return this.view=t,this}createProps(t){const{name:e,char:n}=t.suggester;return{view:this.view,addIgnored:this.addIgnored,clearIgnored:this.clearIgnored,ignoreNextExit:this.ignoreNextExit,setMarkRemoved:this.setMarkRemoved,name:e,char:n,...t}}shouldRunExit(){return ze(this,Uu)?(xt(this,Uu,!1),!1):!0}updateWithNextSelection(t){var e,n,r;const o=this.findNextTextSelection(t.selection);if(o)for(const i of ze(this,gn)){const s=(e=ze(this,Yo).change)==null?void 0:e.suggester.name,l=(n=ze(this,Yo).exit)==null?void 0:n.suggester.name;(r=i.checkNextValidSelection)==null||r.call(i,o.$from,t,{change:s,exit:l})}}changeHandler(t,e){const{change:n,exit:r}=ze(this,Yo),o=this.match;if(!n&&!r||!oC(o))return;const i=e===(r==null?void 0:r.suggester.appendTransaction)&&this.shouldRunExit(),s=e===(n==null?void 0:n.suggester.appendTransaction);if(!(!i&&!s)){if(n&&r&&yz({change:n,exit:r})){const l=this.createProps(r),a=this.createProps(n),u=r.range.from{const l=ke(s.char)?s.char.length:1;return i-o!==l});xt(this,an,e.remove(r))}shouldIgnoreMatch({range:t,suggester:{name:e}}){return ze(this,an).find().some(({spec:o,from:i})=>i!==t.from?!1:o.specific?o.name===e:!0)}resetState(){xt(this,Yo,be()),xt(this,ls,void 0),xt(this,cs,!1),xt(this,Kl,!1)}updateReasons(t){const{$pos:e,state:n}=t,r=ze(this,ip),o=ze(this,gn),i=n.selection.empty,s=iC(n.selection)?aC({suggesters:o,$pos:e,docChanged:r,selectionEmpty:i}):void 0;xt(this,ls,s&&this.shouldIgnoreMatch(s)?void 0:s),xt(this,Yo,Ez({next:ze(this,ls),prev:ze(this,Gl),state:n,$pos:e}))}addSuggester(t){const e=ze(this,gn).find(r=>r.name===t.name),n=lC();if(e)xt(this,gn,ze(this,gn).map(r=>r===e?n(t):r));else{const r=[...ze(this,gn),n(t)];xt(this,gn,Ka(r,(o,i)=>i.priority-o.priority))}return()=>this.removeSuggester(t.name)}removeSuggester(t){const e=ke(t)?t:t.name;xt(this,gn,ze(this,gn).filter(n=>n.name!==e)),this.clearIgnored(e)}toJSON(){return this.match}apply(t){const{exit:e,change:n}=ze(this,Yo);if(ze(this,Kl)&&(xt(this,Kl,!1),!(e!=null&&e.suggester.appendTransaction)&&!(n!=null&&n.suggester.appendTransaction)))return this;const{tr:r,state:o}=t,i=r.docChanged||r.selectionSet;return r.getMeta(R2)||!i&&!ze(this,cs)?this:(xt(this,ip,r.docChanged),this.mapIgnoredDecorations(r),e&&this.resetState(),xt(this,Gl,ze(this,ls)),this.updateReasons({$pos:r.selection.$from,state:o}),this)}createDecorations(t){const e=this.match;if(!oC(e))return ze(this,an);const{disableDecorations:n}=e.suggester;if(tt(n)?n(t,e):n)return ze(this,an);const{range:o,suggester:i}=e,{name:s,suggestTag:l,suggestClassName:a}=i,{from:u,to:c}=o;return this.shouldIgnoreMatch(e)?ze(this,an):ze(this,an).add(t.doc,[kt.inline(u,c,{nodeName:l,class:s?`${a} suggest-${s}`:a},{name:s})])}},Oz=M2;ip=new WeakMap;Uu=new WeakMap;gn=new WeakMap;ls=new WeakMap;Gl=new WeakMap;Yo=new WeakMap;an=new WeakMap;cs=new WeakMap;Kl=new WeakMap;function lC(){const t=new Set;return e=>{if(t.has(e.name))throw new Error(`A suggester already exists with the name '${e.name}'. The name provided must be unique.`);const n={...Mz,...e};return t.add(e.name),n}}var O2=new gl("suggest");function Rb(t){return O2.getState(t)}function cC(t,e){return Rb(t).addSuggester(e)}function uC(t){t.setMeta(R2,!0)}function Iz(t,e){return Rb(t).removeSuggester(e)}function Lz(...t){const e=Oz.create(t);return new gi({key:O2,view:n=>(e.init(n),{update:r=>e.changeHandler(r.state.tr,!1)}),state:{init:()=>e,apply:(n,r,o,i)=>e.apply({tr:n,state:i})},appendTransaction:(n,r,o)=>{const i=o.tr;return e.updateWithNextSelection(i),e.changeHandler(i,!0),i.docChanged||i.steps.length>0||i.selectionSet||i.storedMarksSet?(e.setLastChangeFromAppend(),i):null},props:{decorations:n=>e.createDecorations(n)}})}function Mb(t,e){const n=Object.getPrototypeOf(e);let r=t.selection,o=t.doc,i=t.storedMarks;const s=be();for(const[l,a]of Object.entries(e))s[l]={value:a};return Object.create(n,{...s,storedMarks:{get(){return i}},selection:{get(){return r}},doc:{get(){return o}},tr:{get(){return r=t.selection,o=t.doc,i=t.storedMarks,t}}})}function Sd(t){return({state:e,dispatch:n,view:r,tr:o})=>t(Mb(o,e),n,r)}function dC(t){return e=>{var n;return we(e.dispatch===void 0||e.dispatch===((n=e.view)==null?void 0:n.dispatch),{code:re.NON_CHAINABLE_COMMAND}),t(e)}}function Nz(...t){return({state:e,dispatch:n,view:r,tr:o,...i})=>{for(const s of t)if(s({state:e,dispatch:n,view:r,tr:o,...i}))return!0;return!1}}var Br={get isBrowser(){return!!(typeof window<"u"&&typeof window.document<"u"&&window.navigator&&window.navigator.userAgent)},get isJSDOM(){return Br.isBrowser&&window.navigator.userAgent.includes("jsdom")},get isNode(){return typeof process<"u"&&process.versions!=null&&process.versions.node!=null},get isIos(){return Br.isBrowser&&/iPod|iPhone|iPad/.test(navigator.platform)},get isMac(){return Br.isBrowser&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)},get isApple(){return Br.isNode?process.platform==="darwin":Br.isBrowser?/Mac|iPod|iPhone|iPad/.test(window.navigator.platform):!1},get isDevelopment(){return!1},get isTest(){return!1},get isProduction(){return!0}};function Xo(t,e){var n;const r=cF(t);return((n=r==null?void 0:r.getComputedStyle(t))==null?void 0:n.getPropertyValue(e))??""}function Wn(t,e){return Object.assign(t.style,e)}function Zp(t){return Dn(t)&&Yr(t.nodeType)&&ke(t.nodeName)}function zt(t){return Zp(t)&&t.nodeType===1}function $z(t){return Zp(t)&&t.nodeType===3}function dm(t){const{types:e,node:n}=t;if(!n)return!1;const r=o=>o===n.type||o===n.type.name;return Bt(e)?e.some(r):r(e)}function Dz(t,e){const{tr:n}=e;return t.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function Pz({pos:t,tr:e}){const n=e.doc.nodeAt(t);return n&&e.delete(t,t+n.nodeSize),e}function zz({pos:t,tr:e,content:n}){const r=e.doc.nodeAt(t);return r&&e.replaceWith(t,t+r.nodeSize,n),e}function Hh(t){const{predicate:e,selection:n}=t,r=N2(n)?n.selection.$from:Lb(n)?n.$from:n;for(let o=r.depth;o>0;o--){const i=r.node(o),s=o>0?r.before(o):0,l=r.start(o),a=s+i.nodeSize;if(e(i,s))return{pos:s,depth:o,node:i,start:l,end:a}}}function Fz(t){const{depth:e}=t,n=e>0?t.before(e):0,r=t.node(e),o=t.start(e),i=n+r.nodeSize;return{pos:n,start:o,node:r,end:i,depth:e}}function Bz(t){const e=Hh({predicate:()=>!0,selection:t});return we(e,{message:"No parent node found for the selection provided."}),e}function hi(t){const{types:e,selection:n}=t;return Hh({predicate:r=>dm({types:e,node:r}),selection:n})}function Hz(t){const{types:e,selection:n}=t;if(!(!Wh(n)||!dm({types:e,node:n.node})))return{pos:n.$from.pos,depth:n.$from.depth,start:n.$from.start(),end:n.$from.pos+n.node.nodeSize,node:n.node}}function Ob(t){return Lb(t)?t.empty:t.selection.empty}function Uz(t){return t.docChanged||t.selectionSet}function I2(t){return!!jd(t)}function jd(t){const{state:e,type:n,attrs:r}=t,{selection:o,doc:i}=e,s=ke(n)?i.type.schema.nodes[n]:n;we(s,{code:re.SCHEMA,message:`No node exists for ${n}`});const l=Hz({selection:o,types:n})??Hh({predicate:a=>a.type===s,selection:o});return!r||Pp(r)||!l||l.node.hasMarkup(s,{...l.node.attrs,...r})?l:void 0}function Qp(...t){return e=>{if(!nS(t))return!1;const[n,...r]=t;let o=!1;const i=(...a)=>()=>{if(!nS(a))return!1;o=!0;const[,...u]=a;return Qp(...a)({...e,next:i(...u)})},s=i(...r),l=n({...e,next:s});return o||l?l:s()}}function Wz(t,e){const n=new Map,r=be();for(const o of t)for(const[i,s]of cn(o)){const a=[...n.get(i)??[],s],u=Qp(...a);n.set(i,a),r[i]=e(u)}return r}function Vz(t){return Wz(t,e=>(n,r,o)=>e({state:n,dispatch:r,view:o,tr:n.tr,next:()=>!1}))}function Ib(t,e){const n=t.attrs??{};return Object.entries(e).every(([r,o])=>n[r]===o)}function jz(t){return D2(t,[Ii,qt,yn,Po])}function lu(t){return Dn(t)}function cu(t,e){return Bt(e)?sr(e,t[Bi]):e===t[Bi]}function Gz(t){return Dn(t)&&t instanceof g0}function Kz(t,e){return ke(t)?Ot(e.nodes,t):t}function L2(t){return Dn(t)&&t instanceof Ph}function Yz(t,e){return ke(t)?Ot(e.marks,t):t}function Uh(t){return Dn(t)&&t instanceof Ts}function Xz(t){return Dn(t)&&t instanceof Q}function qz(t){return Dn(t)&&t instanceof Ke}function N2(t){return Dn(t)&&t instanceof Ia}function Js(t){return Dn(t)&&t instanceof Ie}function Zz(t){return Dn(t)&&t instanceof or}function Lb(t){return Dn(t)&&t instanceof Ue}function Qz(t){return Dn(t)&&t instanceof Oc}function hC(t){const{trState:e,from:n,to:r,type:o,attrs:i={}}=t,{doc:s}=e,l=Yz(o,s.type.schema);if(Object.keys(i).length===0)return s.rangeHasMark(n,r,l);let a=!1;return r>n&&s.nodesBetween(n,r,u=>a?!1:(a=(u.marks??[]).some(d=>d.type!==l?!1:Ib(d,i)),!a)),a}function Wh(t){return Dn(t)&&t instanceof Le}function Jp(t){const{trState:e,type:n,attrs:r={},from:o,to:i}=t,{selection:s,doc:l,storedMarks:a}=e,u=ke(n)?l.type.schema.marks[n]:n;if(we(u,{code:re.SCHEMA,message:`Mark type: ${n} does not exist on the current schema.`}),o&&i)try{return Math.max(o,i)d.type!==n?!1:Ib(d,r??{})):hC({...t,from:s.from,to:s.to})}function Nb(t,e={}){const n=Jz(t.type.schema);if(!n)return!1;const{ignoreAttributes:r,ignoreDocAttributes:o}=e;return r?$2(n,t):o?n.content.eq(t.content):n.eq(t)}function $2(t,e){if(t===e)return!0;const n=t.type===e.type&&Ke.sameSet(t.marks,e.marks);function r(){if(t.content===e.content)return!0;if(t.content.size!==e.content.size)return!1;const o=[],i=[];t.content.forEach(s=>o.push(s)),e.content.forEach(s=>i.push(s));for(const[s,l]of o.entries()){const a=i[s];if(!a||!$2(l,a))return!1}return!0}return n&&r()}function Jz(t){var e;return((e=t.nodes.doc)==null?void 0:e.createAndFill())??void 0}function hm(t){for(const e of Object.values(t.nodes))if(e.name!=="doc"&&(e.isBlock||e.isTextblock))return e;we(!1,{code:re.SCHEMA,message:"No default block node found for the provided schema."})}function eF(t){return t.type===hm(t.type.schema)}function fm(t){return!!t&&t.type.isBlock&&!t.textContent&&!t.childCount}function Hi(t,e,n){const r=t.parent.childAfter(t.parentOffset);if(!r.node)return;const o=ke(e)?e:e.name,i=r.node.marks.find(({type:d})=>d.name===o);let s=t.index(),l=t.start()+r.offset,a=s+1,u=l+r.node.nodeSize;if(!i)return n&&u0&&i.isInSet(t.parent.child(s-1).marks);)s-=1,l-=t.parent.child(s).nodeSize;for(;ae instanceof r)}function PP(e){return Fy(e,({from:r,to:n,prevFrom:o,prevTo:i})=>`${r}_${n}_${o}_${i}`).filter((r,n,o)=>!o.some((i,s)=>n===s?!1:r.prevFrom>=i.prevFrom&&r.prevTo<=i.prevTo&&r.from>=i.from&&r.to<=i.to))}function QO(e,t=[]){const r=[],{steps:n,mapping:o}=e,i=o.invert();n.forEach((a,l)=>{if(!JO(a,t))return;const c=[],u=a.getMap(),d=o.slice(l);if(u.ranges.length===0&&CP(a)){const{from:p,to:f}=a;c.push({from:p,to:f})}else u.forEach((p,f)=>{c.push({from:p,to:f})});c.forEach(p=>{const f=d.map(p.from,-1),h=d.map(p.to);r.push({from:f,to:h,prevFrom:i.map(f,-1),prevTo:i.map(h)})})});const s=ia(r,(a,l)=>a.from-l.from);return PP(s)}function zP(e,t){const r=[],n=QO(e,t);for(const o of n)try{const i=e.doc.resolve(o.from),s=e.doc.resolve(o.to),a=i.blockRange(s);a&&r.push(a)}catch{}return r}function $P(e){var t;return((t=e.content.firstChild)==null?void 0:t.textContent)??""}function BP(e,t){if(!vs(e.selection))return;let{from:r,to:n}=e.selection;const o=(s,a)=>$P(ue.between(e.doc.resolve(s),e.doc.resolve(a)).content());for(let s=o(r-1,r);s&&!t.test(s);r--,s=o(r-1,r));for(let s=o(n,n+1);s&&!t.test(s);n++,s=o(n,n+1));if(r===n)return;const i=e.doc.textBetween(r,n,$y,` +`);return{from:l,to:u,text:c,mark:i}}function D2(t,e){return e.length===0||e.some(n=>t instanceof n)}function tF(t){return hb(t,({from:n,to:r,prevFrom:o,prevTo:i})=>`${n}_${r}_${o}_${i}`).filter((n,r,o)=>!o.some((i,s)=>r===s?!1:n.prevFrom>=i.prevFrom&&n.prevTo<=i.prevTo&&n.from>=i.from&&n.to<=i.to))}function P2(t,e=[]){const n=[],{steps:r,mapping:o}=t,i=o.invert();r.forEach((l,a)=>{if(!D2(l,e))return;const u=[],c=l.getMap(),d=o.slice(a);if(c.ranges.length===0&&jz(l)){const{from:h,to:f}=l;u.push({from:h,to:f})}else c.forEach((h,f)=>{u.push({from:h,to:f})});u.forEach(h=>{const f=d.map(h.from,-1),p=d.map(h.to);n.push({from:f,to:p,prevFrom:i.map(f,-1),prevTo:i.map(p)})})});const s=Ka(n,(l,a)=>l.from-a.from);return tF(s)}function nF(t,e){const n=[],r=P2(t,e);for(const o of r)try{const i=t.doc.resolve(o.from),s=t.doc.resolve(o.to),l=i.blockRange(s);l&&n.push(l)}catch{}return n}function rF(t){var e;return((e=t.content.firstChild)==null?void 0:e.textContent)??""}function oF(t,e){if(!Js(t.selection))return;let{from:n,to:r}=t.selection;const o=(s,l)=>rF(Ie.between(t.doc.resolve(s),t.doc.resolve(l)).content());for(let s=o(n-1,n);s&&!e.test(s);n--,s=o(n-1,n));for(let s=o(r,r+1);s&&!e.test(s);r++,s=o(r,r+1));if(n===r)return;const i=t.doc.textBetween(n,r,cb,` -`);return{from:r,to:n,text:i}}function eA(e){return BP(e,/\W/)}function xl(e,t=0){const r=ft(e)?e[t]:e;return EC(oe(r),`No match string found for match ${e}`),r??""}function HP(e){return vs(e)?e.$cursor:void 0}function FP(e,t){return jd(e)?t?e.type===t.nodes.doc:e.type.name==="doc":!1}function UP(e){return nr(e)&&gn(e.anchor)&&gn(e.head)}function Dn(e,t){const r=t.nodeSize-2,n=0;let o;const i=l=>W4({min:n,max:r,value:l});if(lv(e))return e;if(e==="all")return new xr(t);if(e==="start"?o=n:e==="end"?o=r:MP(e)?o=e.pos:o=e,gn(o))return o=i(o),ue.near(t.resolve(o));if(UP(o)){const l=i(o.anchor),c=i(o.head);return ue.between(t.resolve(l),t.resolve(c))}const s=i(o.from),a=i(o.to);return ue.between(t.resolve(s),t.resolve(a))}var VP=3;function tA(e){const{content:t,schema:r,document:n,stringHandler:o,onError:i,attempts:s=0}=e,a=i&&s<=VP||s===0;if(re(a,{code:U.INVALID_CONTENT,message:"The invalid content has been called recursively more than ${MAX_ATTEMPTS} times. The content is invalid and the error handler has not been able to recover properly."}),oe(t))return re(o,{code:U.INVALID_CONTENT,message:`The string '${t}' was added to the editor, but no \`stringHandler\` was added. Please provide a valid string handler which transforms your content to a \`ProsemirrorNode\` to prevent this error.`}),o({document:n,content:t,schema:r});if(XO(t))return t.doc;if(jd(t))return t;try{return r.nodeFromJSON(t)}catch(l){const c=ZP({schema:r,error:l,json:t}),u=i==null?void 0:i(c);return re(u,{code:U.INVALID_CONTENT,message:`An error occurred when processing the content. Please provide an \`onError\` handler to process the invalid content: ${JSON.stringify(c.invalidContent,null,2)}`}),tA({...e,content:u,attempts:s+1})}}function nm(){const e=iO();if(e)return e;throw new Error(`Unable to retrieve the document from the global scope. +`);return{from:n,to:r,text:i}}function z2(t){return oF(t,/\W/)}function yc(t,e=0){const n=Bt(t)?t[e]:t;return oR(ke(n),`No match string found for match ${t}`),n??""}function iF(t){return Js(t)?t.$cursor:void 0}function sF(t,e){return Uh(t)?e?t.type===e.nodes.doc:t.type.name==="doc":!1}function aF(t){return Dn(t)&&Yr(t.anchor)&&Yr(t.head)}function po(t,e){const n=e.nodeSize-2,r=0;let o;const i=a=>dD({min:r,max:n,value:a});if(Lb(t))return t;if(t==="all")return new or(e);if(t==="start"?o=r:t==="end"?o=n:Qz(t)?o=t.pos:o=t,Yr(o))return o=i(o),Ie.near(e.resolve(o));if(aF(o)){const a=i(o.anchor),u=i(o.head);return Ie.between(e.resolve(a),e.resolve(u))}const s=i(o.from),l=i(o.to);return Ie.between(e.resolve(s),e.resolve(l))}var lF=3;function F2(t){const{content:e,schema:n,document:r,stringHandler:o,onError:i,attempts:s=0}=t,l=i&&s<=lF||s===0;if(we(l,{code:re.INVALID_CONTENT,message:"The invalid content has been called recursively more than ${MAX_ATTEMPTS} times. The content is invalid and the error handler has not been able to recover properly."}),ke(e))return we(o,{code:re.INVALID_CONTENT,message:`The string '${e}' was added to the editor, but no \`stringHandler\` was added. Please provide a valid string handler which transforms your content to a \`ProsemirrorNode\` to prevent this error.`}),o({document:r,content:e,schema:n});if(N2(e))return e.doc;if(Uh(e))return e;try{return n.nodeFromJSON(e)}catch(a){const u=mF({schema:n,error:a,json:e}),c=i==null?void 0:i(u);return we(c,{code:re.INVALID_CONTENT,message:`An error occurred when processing the content. Please provide an \`onError\` handler to process the invalid content: ${JSON.stringify(u.invalidContent,null,2)}`}),F2({...t,content:c,attempts:s+1})}}function pm(){const t=WR();if(t)return t;throw new Error(`Unable to retrieve the document from the global scope. It seems that you are running Remirror in a non-browser environment. Remirror need browser APIs to work. If you are using Jest (or other testing frameworks), make sure that you are using the JSDOM environment (https://jestjs.io/docs/29.0/configuration#testenvironment-string). If you are using Next.js (or other server-side rendering frameworks), please use dynamic import with \`ssr: false\` to load the editor component without rendering it on the server (https://nextjs.org/docs/advanced-features/dynamic-import#with-no-ssr). -If you are using Node.js, you can install JSDOM and Remirror will try to use it automatically, or you can create a fake document and pass it to Remirror`)}function rA(e){var t;return(e==null?void 0:e.defaultView)??(typeof window<"u"?window:void 0)??((t=iO())==null?void 0:t.defaultView)}function jP(e){return rA(e==null?void 0:e.ownerDocument)}function GP(e){const t=rA(e)??nm().defaultView;if(t)return t;throw new Error("Unable to retrieve the window from the global scope")}function WP(e,t=nm()){const r=FP(e,e.type.schema)?e.content:I.from(e);return un.fromSchema(e.type.schema).serializeFragment(r,{document:t})}function KP(e,t){return new(GP(t)).DOMParser().parseFromString(`${e}`,"text/html").body}function YP(e,t=nm()){const r=t.createElement("div");return r.append(WP(e,t)),r.innerHTML}function l0(e){const{content:t,schema:r,document:n,fragment:o=!1,...i}=e,s=KP(t,n),a=Vy.fromSchema(r);return o?a.parseSlice(s,{...$S,...i}).content:a.parse(s,{...$S,...i})}var $S={preserveWhitespace:!1};function om(e,t){const r=Vu(t.defaults());return By({...e},r)}function qP(e,t){let r="";t&&(r=`${t.trim()}`);const n=t5(e);if(!n)return r;const o=(r.endsWith(";")," ");return`${r}${o}${n}`}var XP={remove(e,t){let r=e;for(const n of t)n.invalidParentNode||(r=q4(n.path,r));return r}};function ZP({json:e,schema:t,...r}){const n=new Set(Vu(t.marks)),o=new Set(Vu(t.nodes)),i=nA({json:e,path:[],validNodes:o,validMarks:n});return{json:e,invalidContent:i,transformers:XP,...r}}function nA(e){const{json:t,validMarks:r,validNodes:n,path:o=[]}=e,i={validMarks:r,validNodes:n},s=[],{type:a,marks:l,content:c}=t;let{invalidParentMark:u=!1,invalidParentNode:d=!1}=e;if(l){const p=[];for(const[f,h]of l.entries()){const m=oe(h)?h:h.type;r.has(m)||(p.unshift({name:m,path:[...o,"marks",`${f}`],type:"mark",invalidParentMark:u,invalidParentNode:d}),u=!0)}s.push(...p)}if(n.has(a)||(s.push({name:a,type:"node",path:o,invalidParentMark:u,invalidParentNode:d}),d=!0),c){const p=[];for(const[f,h]of c.entries())p.unshift(...nA({...i,json:h,path:[...o,"content",`${f}`],invalidParentMark:u,invalidParentNode:d}));s.unshift(...p)}return s}function JP(e){return!!(vs(e)&&e.$cursor&&e.$cursor.parentOffset>=e.$cursor.parent.content.size)}function c0(e){return!!(vs(e)&&e.$cursor&&e.$cursor.parentOffset<=0)}function BS(e){const t=ke.atStart(e.$anchor.doc);return!!(c0(e)&&t.anchor===e.anchor)}function QP(e){return({dispatch:t,tr:r})=>{const{type:n,attrs:o=te(),appendText:i,range:s}=e,a=s?ue.between(r.doc.resolve(s.from),r.doc.resolve(s.to)):r.selection,{$from:l,from:c,to:u}=a;let d=l.depth===0?r.doc.type.allowsMarkType(n):!1;return r.doc.nodesBetween(c,u,p=>{if(d)return!1;if(p.inlineContent&&p.type.allowsMarkType(n)){d=!0;return}}),d?(t==null||t(r.addMark(c,u,n.create(o))&&i?r.insertText(i):r),!0):!1}}function ez({tr:e,dispatch:t}){const{$from:r,$to:n}=e.selection,o=r.blockRange(n),i=o&&uc(o);return!gn(i)||!o?!1:(t==null||t(e.lift(o,i).scrollIntoView()),!0)}function oA(e,t={},r){return function(n){const{tr:o,dispatch:i,state:s}=n,a=oe(e)?lt(s.schema.nodes,e):e,{from:l,to:c}=Dn(r??o.selection,o.doc),u=o.doc.resolve(l),d=o.doc.resolve(c),p=u.blockRange(d),f=p&&Gy(p,a,t);return!f||!p?!1:(i==null||i(o.wrap(p,f).scrollIntoView()),!0)}}function iA(e,t={},r){return n=>{const{tr:o,state:i}=n,s=oe(e)?lt(i.schema.nodes,e):e;return Yu({state:o,type:s,attrs:t})?ez(n):oA(e,t,r)(n)}}function qu(e,t,r,n=!0){return function(o){const{tr:i,dispatch:s,state:a}=o,l=oe(e)?lt(a.schema.nodes,e):e,{from:c,to:u}=Dn(r??i.selection,i.doc);let d=!1,p;return i.doc.nodesBetween(c,u,(f,h)=>{if(d)return!1;if(!f.isTextblock||f.hasMarkup(l,t))return;if(f.type===l){d=!0,p=f.attrs;return}const m=i.doc.resolve(h),b=m.index();d=m.parent.canReplaceWith(b,b+1,l),d&&(p=m.parent.attrs)}),d?(s==null||s(i.setBlockType(c,u,l,{...n?p:{},...t}).scrollIntoView()),!0):!1}}function uv(e){return t=>{const{tr:r,state:n}=t,{type:o,attrs:i,preserveAttrs:s=!0}=e,a=Yu({state:r,type:o,attrs:i}),l=e.toggleType??tm(n.schema);if(a)return qu(l,{...s?a.node.attrs:{},...i})(t);const c=Yu({state:r,type:l,attrs:i});return qu(o,{...s?c==null?void 0:c.node.attrs:{},...i})(t)}}function tz(e=0){const t=navigator.userAgent.match(/Chrom(e|ium)\/(\d+)\./);return t?Number.parseInt(lt(t,2),10)>=e:!1}function rz(e,t){let{head:r,empty:n,anchor:o}=e;for(const i of t.steps)r=i.getMap().map(r);n?t.setSelection(ue.near(t.doc.resolve(r))):t.setSelection(ue.between(t.doc.resolve(o),t.doc.resolve(r)))}function nz(e){const{attrs:t={},appendText:r="",content:n="",keepSelection:o=!1,range:i}=e;return({state:s,tr:a,dispatch:l})=>{var c;const u=s.schema,d=Dn(e.selection??i??a.selection,a.doc),p=d.$from.index(),{from:f,to:h,$from:m}=d,b=oe(e.type)?u.nodes[e.type]??u.marks[e.type]:e.type;if(re(oe(e.type)?b:!0,{code:U.SCHEMA,message:`Schema contains no marks or nodes with name ${b}`}),OP(b)){if(!m.parent.canReplaceWith(p,p,b))return!1;a.replaceWith(f,h,b.create(t,n?u.text(n):void 0))}else re(n,{message:"`replaceText` cannot be called without content when using a mark type"}),a.replaceWith(f,h,u.text(n,qO(b)?[b.create(t)]:void 0));return r&&a.insertText(r),o&&rz(s.selection,a),l&&(tz(60)&&((c=document.getSelection())==null||c.empty()),l(a)),!0}}function sA(e,t){const r=e.parent.childAfter(e.parentOffset);if(!r.node)return;const{marks:n,nodeSize:o}=r.node;if(n[0])return n[0].type;const s=e.start()+r.offset+o;return sA(e.doc.resolve(s+1))}function aA(e){return({dispatch:t,tr:r,state:n})=>{const{type:o,expand:i=!0,range:s}=e,a=Dn(e.selection??s??r.selection,r.doc);let{from:l,to:c,$from:u,$to:d}=a;const p=oe(o)?n.schema.marks[o]:o;p!==null&&re(p,{code:U.SCHEMA,message:`Mark type: ${o} does not exist on the current schema.`});const f=p??sA(u);if(!f)return!1;const h=ai(u,f,d);return i&&h&&(l=Math.max(0,Math.min(l,h.from)),c=Math.min(Math.max(c,h.to),r.doc.nodeSize-2)),t==null||t(r.removeMark(l,gn(c)?c:l,qO(p)?p:void 0)),!0}}function oz(e){const t=["command","cmd","meta"];return ln.isMac&&t.push("mod"),t.includes(e)}function iz(e){const t=["control","ctrl"];return ln.isMac||t.push("mod"),t.includes(e)}function sz(e){const t=[];for(let r of e.split("-")){if(r=r.toLowerCase(),oz(r)){t.push({type:"modifier",symbol:"⌘",key:"command",i18n:_t.COMMAND_KEY});continue}if(iz(r)){t.push({type:"modifier",symbol:"⌃",key:"control",i18n:_t.CONTROL_KEY});continue}switch(r){case"shift":t.push({type:"modifier",symbol:"⇧",key:r,i18n:_t.SHIFT_KEY});continue;case"alt":t.push({type:"modifier",symbol:"⌥",key:r,i18n:_t.ALT_KEY});continue;case` -`:case"\r":case"enter":t.push({type:"named",symbol:"↵",key:r,i18n:_t.ENTER_KEY});continue;case"backspace":t.push({type:"named",symbol:"⌫",key:r,i18n:_t.BACKSPACE_KEY});continue;case"delete":t.push({type:"named",symbol:"⌦",key:r,i18n:_t.DELETE_KEY});continue;case"escape":t.push({type:"named",symbol:"␛",key:r,i18n:_t.ESCAPE_KEY});continue;case"tab":t.push({type:"named",symbol:"⇥",key:r,i18n:_t.TAB_KEY});continue;case"capslock":t.push({type:"named",symbol:"⇪",key:r,i18n:_t.CAPS_LOCK_KEY});continue;case"space":t.push({type:"named",symbol:"␣",key:r,i18n:_t.SPACE_KEY});continue;case"pageup":t.push({type:"named",symbol:"⤒",key:r,i18n:_t.PAGE_UP_KEY});continue;case"pagedown":t.push({type:"named",symbol:"⤓",key:r,i18n:_t.PAGE_DOWN_KEY});continue;case"home":t.push({type:"named",key:r,i18n:_t.HOME_KEY});continue;case"end":t.push({type:"named",key:r,i18n:_t.END_KEY});continue;case"arrowleft":t.push({type:"named",symbol:"←",key:r,i18n:_t.ARROW_LEFT_KEY});continue;case"arrowright":t.push({type:"named",symbol:"→",key:r,i18n:_t.ARROW_RIGHT_KEY});continue;case"arrowup":t.push({type:"named",symbol:"→",key:r,i18n:_t.ARROW_UP_KEY});continue;case"arrowdown":t.push({type:"named",symbol:"↓",key:r,i18n:_t.ARROW_DOWN_KEY});continue;default:t.push({type:"char",key:r});continue}}return t}function az(e){const{node:t,predicate:r,descend:n=!0,action:o}=e;re(jd(t),{code:U.INTERNAL,message:'Invalid "node" parameter passed to "findChildren".'}),re(De(r),{code:U.INTERNAL,message:'Invalid "predicate" parameter passed to "findChildren".'});const i=[];return t.descendants((s,a)=>{const l={node:s,pos:a};return r(l)&&(i.push(l),o==null||o(l)),n}),i}function lz(e){const{type:t,...r}=e;return az({...r,predicate:n=>n.node.type===t})}function cz(e,t={}){const{descend:r=!1,predicate:n,StepTypes:o}=t,i=zP(e,o),s=[];for(const a of i){const{start:l,end:c}=a;e.doc.nodesBetween(l,c,(u,d)=>(((n==null?void 0:n(u,d,a))??!0)&&s.push({node:u,pos:d}),r))}return s}function Xu(e){const{regexp:t,type:r,getAttributes:n,ignoreWhitespace:o=!1,beforeDispatch:i,updateCaptured:s,shouldSkip:a,invalidMarks:l}=e;let c;const u=new Oa(t,(d,p,f,h)=>{const{tr:m,schema:b}=d;c||(c=oe(r)?b.marks[r]:r,re(c,{code:U.SCHEMA,message:`Mark type: ${r} does not exist on the current schema.`}));let y=p[1],g=p[0];const v=cA({captureGroup:y,fullMatch:g,end:h,start:f,rule:u,state:d,ignoreWhitespace:o,invalidMarks:l,shouldSkip:a,updateCaptured:s});if(!v)return null;({start:f,end:h,captureGroup:y,fullMatch:g}=v);const E=De(n)?n(p):n;let k=h,x=[];if(y){const w=g.search(/\S/),C=f+g.indexOf(y),T=C+y.length;x=m.storedMarks??[],Tf&&m.delete(f+w,C),k=f+w+y.length}return m.addMark(f,k,c.create(E)),m.setStoredMarks(x),i==null||i({tr:m,match:p,start:f,end:h}),m});return u}function lA(e){const{regexp:t,type:r,getAttributes:n,beforeDispatch:o,shouldSkip:i,ignoreWhitespace:s=!1,updateCaptured:a,invalidMarks:l}=e,c=new Oa(t,(u,d,p,f)=>{const h=De(n)?n(d):n,{tr:m,schema:b}=u,y=oe(r)?b.nodes[r]:r;let g=d[1],v=d[0];const E=cA({captureGroup:g,fullMatch:v,end:f,start:p,rule:c,state:u,ignoreWhitespace:s,invalidMarks:l,shouldSkip:i,updateCaptured:a});if(!E)return null;({start:p,end:f,captureGroup:g,fullMatch:v}=E),re(y,{code:U.SCHEMA,message:`No node exists for ${r} in the schema.`});const k=y.createAndFill(h);return k&&(m.replaceRangeWith(y.isBlock?m.doc.resolve(p).before():p,f,k),o==null||o({tr:m,match:[v,g??""],start:p,end:f})),m});return c}function cA({captureGroup:e,fullMatch:t,end:r,start:n,rule:o,ignoreWhitespace:i,shouldSkip:s,updateCaptured:a,state:l,invalidMarks:c}){var u;if(t==null)return null;const d=(a==null?void 0:a({captureGroup:e,fullMatch:t,start:n,end:r}))??{};e=d.captureGroup??e,t=d.fullMatch??t,n=d.start??n,r=d.end??r;const p=l.doc.resolve(n),f=l.doc.resolve(r);return c&&s0({$from:p,$to:f},c)||o.invalidMarks&&s0({$from:p,$to:f},o.invalidMarks)||i&&(e==null?void 0:e.trim())===""||s!=null&&s({state:l,captureGroup:e,fullMatch:t,start:n,end:r,ruleType:"mark"})||(u=o.shouldSkip)!=null&&u.call(o,{state:l,captureGroup:e,fullMatch:t,start:n,end:r,ruleType:"mark"})?null:{captureGroup:e,end:r,fullMatch:t,start:n}}var uz=function(){const t=Array.prototype.slice.call(arguments).filter(Boolean),r={},n=[];t.forEach(i=>{(i?i.split(" "):[]).forEach(a=>{if(a.startsWith("atm_")){const[,l]=a.split("_");r[l]=a}else n.push(a)})});const o=[];for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&o.push(r[i]);return o.push(...n),o.join(" ")},dz=uz;const uA=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function pz(e,t){let{$cursor:r}=e.selection;return!r||(t?!t.endOfTextblock("backward",e):r.parentOffset>0)?null:r}const dA=(e,t,r)=>{let n=pz(e,r);if(!n)return!1;let o=pA(n);if(!o){let s=n.blockRange(),a=s&&uc(s);return a==null?!1:(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)}let i=o.nodeBefore;if(!i.type.spec.isolating&&mA(e,o,t))return!0;if(n.parent.content.size==0&&(Hl(i,"end")||de.isSelectable(i))){let s=Wy(e.doc,n.before(),n.after(),W.empty);if(s&&s.slice.size{let{$head:n,empty:o}=e.selection,i=n;if(!o)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("backward",e):n.parentOffset>0)return!1;i=pA(n)}let s=i&&i.nodeBefore;return!s||!de.isSelectable(s)?!1:(t&&t(e.tr.setSelection(de.create(e.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function pA(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function hz(e,t){let{$cursor:r}=e.selection;return!r||(t?!t.endOfTextblock("forward",e):r.parentOffset{let n=hz(e,r);if(!n)return!1;let o=fA(n);if(!o)return!1;let i=o.nodeAfter;if(mA(e,o,t))return!0;if(n.parent.content.size==0&&(Hl(i,"start")||de.isSelectable(i))){let s=Wy(e.doc,n.before(),n.after(),W.empty);if(s&&s.slice.size{let{$head:n,empty:o}=e.selection,i=n;if(!o)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("forward",e):n.parentOffset=0;t--){let r=e.node(t);if(e.index(t)+1{let{$head:r,$anchor:n}=e.selection;return!r.parent.type.spec.code||!r.sameParent(n)?!1:(t&&t(e.tr.insertText(` -`).scrollIntoView()),!0)};function dv(e){for(let t=0;t{let{$head:r,$anchor:n}=e.selection;if(!r.parent.type.spec.code||!r.sameParent(n))return!1;let o=r.node(-1),i=r.indexAfter(-1),s=dv(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(t){let a=r.after(),l=e.tr.replaceWith(a,a,s.createAndFill());l.setSelection(ke.near(l.doc.resolve(a),1)),t(l.scrollIntoView())}return!0},vz=(e,t)=>{let r=e.selection,{$from:n,$to:o}=r;if(r instanceof xr||n.parent.inlineContent||o.parent.inlineContent)return!1;let i=dv(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){let s=(!n.parentOffset&&o.index(){let{$cursor:r}=e.selection;if(!r||r.parent.content.size)return!1;if(r.depth>1&&r.after()!=r.end(-1)){let i=r.before();if(bl(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let n=r.blockRange(),o=n&&uc(n);return o==null?!1:(t&&t(e.tr.lift(n,o).scrollIntoView()),!0)};function Ez(e){return(t,r)=>{let{$from:n,$to:o}=t.selection;if(t.selection instanceof de&&t.selection.node.isBlock)return!n.parentOffset||!bl(t.doc,n.pos)?!1:(r&&r(t.tr.split(n.pos).scrollIntoView()),!0);if(!n.parent.isBlock)return!1;if(r){let i=o.parentOffset==o.parent.content.size,s=t.tr;(t.selection instanceof ue||t.selection instanceof xr)&&s.deleteSelection();let a=n.depth==0?null:dv(n.node(-1).contentMatchAt(n.indexAfter(-1))),l=e&&e(o.parent,i),c=l?[l]:i&&a?[{type:a}]:void 0,u=bl(s.doc,s.mapping.map(n.pos),1,c);if(!c&&!u&&bl(s.doc,s.mapping.map(n.pos),1,a?[{type:a}]:void 0)&&(a&&(c=[{type:a}]),u=!0),u&&(s.split(s.mapping.map(n.pos),1,c),!i&&!n.parentOffset&&n.parent.type!=a)){let d=s.mapping.map(n.before()),p=s.doc.resolve(d);a&&n.node(-1).canReplaceWith(p.index(),p.index()+1,a)&&s.setNodeMarkup(s.mapping.map(n.before()),a)}r(s.scrollIntoView())}return!0}}const kz=Ez(),xz=(e,t)=>{let{$from:r,to:n}=e.selection,o,i=r.sharedDepth(n);return i==0?!1:(o=r.before(i),t&&t(e.tr.setSelection(de.create(e.doc,o))),!0)},Sz=(e,t)=>(t&&t(e.tr.setSelection(new xr(e.doc))),!0);function wz(e,t,r){let n=t.nodeBefore,o=t.nodeAfter,i=t.index();return!n||!o||!n.type.compatibleContent(o.type)?!1:!n.content.size&&t.parent.canReplace(i-1,i)?(r&&r(e.tr.delete(t.pos-n.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(i,i+1)||!(o.isTextblock||Hd(e.doc,t.pos))?!1:(r&&r(e.tr.clearIncompatible(t.pos,n.type,n.contentMatchAt(n.childCount)).join(t.pos).scrollIntoView()),!0)}function mA(e,t,r){let n=t.nodeBefore,o=t.nodeAfter,i,s;if(n.type.spec.isolating||o.type.spec.isolating)return!1;if(wz(e,t,r))return!0;let a=t.parent.canReplace(t.index(),t.index()+1);if(a&&(i=(s=n.contentMatchAt(n.childCount)).findWrapping(o.type))&&s.matchType(i[0]||o.type).validEnd){if(r){let d=t.pos+o.nodeSize,p=I.empty;for(let m=i.length-1;m>=0;m--)p=I.from(i[m].create(null,p));p=I.from(n.copy(p));let f=e.tr.step(new St(t.pos-1,d,t.pos,d,new W(p,1,0),i.length,!0)),h=d+2*i.length;Hd(f.doc,h)&&f.join(h),r(f.scrollIntoView())}return!0}let l=ke.findFrom(t,1),c=l&&l.$from.blockRange(l.$to),u=c&&uc(c);if(u!=null&&u>=t.depth)return r&&r(e.tr.lift(c,u).scrollIntoView()),!0;if(a&&Hl(o,"start",!0)&&Hl(n,"end")){let d=n,p=[];for(;p.push(d),!d.isTextblock;)d=d.lastChild;let f=o,h=1;for(;!f.isTextblock;f=f.firstChild)h++;if(d.canReplace(d.childCount,d.childCount,f.content)){if(r){let m=I.empty;for(let y=p.length-1;y>=0;y--)m=I.from(p[y].copy(m));let b=e.tr.step(new St(t.pos-p.length,t.pos+o.nodeSize,t.pos+h,t.pos+o.nodeSize-h,new W(m,p.length,0),0,!0));r(b.scrollIntoView())}return!0}}return!1}function gA(e){return function(t,r){let n=t.selection,o=e<0?n.$from:n.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(r&&r(t.tr.setSelection(ue.create(t.doc,e<0?o.start(i):o.end(i)))),!0):!1}}const Tz=gA(-1),Cz=gA(1);function Oz(e,t,r){for(let n=0;n{if(s)return!1;s=a.inlineContent&&a.type.allowsMarkType(r)}),s)return!0}return!1}function Az(e,t=null){return function(r,n){let{empty:o,$cursor:i,ranges:s}=r.selection;if(o&&!i||!Oz(r.doc,s,e))return!1;if(n)if(i)e.isInSet(r.storedMarks||i.marks())?n(r.tr.removeStoredMark(e)):n(r.tr.addStoredMark(e.create(t)));else{let a=!1,l=r.tr;for(let c=0;!a&&c",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Rz=typeof navigator<"u"&&/Mac/.test(navigator.platform),_z=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var er=0;er<10;er++)as[48+er]=as[96+er]=String(er);for(var er=1;er<=24;er++)as[er+111]="F"+er;for(var er=65;er<=90;er++)as[er]=String.fromCharCode(er+32),Gf[er]=String.fromCharCode(er);for(var Fg in as)Gf.hasOwnProperty(Fg)||(Gf[Fg]=as[Fg]);function Iz(e){var t=Rz&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||_z&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",r=!t&&e.key||(e.shiftKey?Gf:as)[e.keyCode]||e.key||"Unidentified";return r=="Esc"&&(r="Escape"),r=="Del"&&(r="Delete"),r=="Left"&&(r="ArrowLeft"),r=="Up"&&(r="ArrowUp"),r=="Right"&&(r="ArrowRight"),r=="Down"&&(r="ArrowDown"),r}const Mz=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function Lz(e){let t=e.split(/-(?!$)/),r=t[t.length-1];r=="Space"&&(r=" ");let n,o,i,s;for(let a=0;a127)&&(i=as[n.keyCode])&&i!=o){let a=t[Ug(i,n)];if(a&&a(r.state,r.dispatch,r))return!0}}return!1}}function Pz(e){const t=ia(e,(i,s)=>(s.priority??Ue.Low)-(i.priority??Ue.Low)),r=[],n=[];for(const i of t)Vz(i)?r.push(i):n.push(i);let o;return new Po({key:zz,view:i=>(o=i,{}),props:{transformPasted:i=>{var s,a,l;const c=o.state.selection.$from,u=c.node().type.name,d=new Set(c.marks().map(p=>p.type.name));for(const p of r){if((s=p.ignoredNodes)!=null&&s.includes(u)||(a=p.ignoredMarks)!=null&&a.some(g=>d.has(g)))continue;const f=((l=i.content.firstChild)==null?void 0:l.textContent)??"",h=!o.state.selection.empty&&i.content.childCount===1&&f,m=cc(f,p.regexp)[0];if(h&&m&&p.type==="mark"&&p.replaceSelection){const{from:g,to:v}=o.state.selection,E=o.state.doc.slice(g,v),k=E.content.textBetween(0,E.content.size);if(typeof p.replaceSelection!="boolean"?p.replaceSelection(k):p.replaceSelection){const x=[],{getAttributes:w,markType:C}=p,T=De(w)?w(m,!0):w,O=C.create(T);return E.content.forEach(_=>{if(_.isText){const P=O.addToSet(_.marks);x.push(_.mark(P))}}),W.maxOpen(I.fromArray(x))}}const{nodes:b,transformed:y}=Fz(i.content,p,o.state.schema);y&&(i=p.type==="node"&&p.nodeType.isBlock?new W(I.fromArray(b),0,0):new W(I.fromArray(b),i.openStart,i.openEnd))}return Kz(i)},handleDOMEvents:{paste:(i,s)=>{var a,l;const c=s;if(!((l=(a=i.props).editable)!=null&&l.call(a,i.state)))return!1;const{clipboardData:u}=c;if(!u)return!1;const d=[...u.items].map(f=>f.getAsFile()).filter(f=>!!f);if(d.length===0)return!1;const{selection:p}=i.state;for(const{fileHandler:f,regexp:h}of n){const m=h?d.filter(b=>h.test(b.type)):d;if(m.length!==0&&f({event:c,files:m,selection:p,view:i,type:"paste"}))return c.preventDefault(),!0}return!1},drop:(i,s)=>{var a,l,c;const u=s;if(!((l=(a=i.props).editable)!=null&&l.call(a,i.state)))return!1;const{dataTransfer:d,clientX:p,clientY:f}=u;if(!d)return!1;const h=Wz(u);if(h.length===0)return!1;const m=((c=i.posAtCoords({left:p,top:f}))==null?void 0:c.pos)??i.state.selection.anchor;for(const{fileHandler:b,regexp:y}of n){const g=y?h.filter(v=>y.test(v.type)):h;if(g.length!==0&&b({event:u,files:g,pos:m,view:i,type:"drop"}))return u.preventDefault(),!0}return!1}}}})}var zz=new Ca("pasteRule");function Vg(e,t){return function r(n){const{fragment:o,rule:i,nodes:s}=n,{regexp:a,ignoreWhitespace:l,ignoredMarks:c,ignoredNodes:u}=i;let d=!1;return o.forEach(p=>{if(u!=null&&u.includes(p.type.name)||jz(p)){s.push(p);return}if(!p.isText){const m=r({fragment:p.content,rule:i,nodes:[]});d||(d=m.transformed);const b=I.fromArray(m.nodes);p.type.validContent(b)?s.push(p.copy(b)):s.push(...m.nodes);return}if(p.marks.some(m=>Gz(m)||(c==null?void 0:c.includes(m.type.name)))){s.push(p);return}const f=p.text??"";let h=0;for(const m of cc(f,a)){const b=m[1],y=m[0];if(l&&(b==null?void 0:b.trim())===""||!y)return;const g=m.index,v=g+y.length;g>h&&s.push(p.cut(h,g));let E=p.cut(g,v);if(y&&b){const k=y.search(/\S/),x=g+y.indexOf(b),w=x+b.length;k&&s.push(p.cut(g,g+k)),E=p.cut(x,w)}e({nodes:s,rule:i,textNode:E,match:m,schema:t}),d=!0,h=v}f&&h0?[...n.files]:(r=n.items)!=null&&r.length?[...n.items].map(o=>o.getAsFile()).filter(o=>!!o):[]:[]}function Kz(e){const t=W.maxOpen(e.content);return t.openStart({events:{},emit(e,...t){(this.events[e]||[]).forEach(r=>r(...t))},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=(this.events[e]||[]).filter(r=>r!==t)}});var Yz=Object.defineProperty,qz=Object.getOwnPropertyDescriptor,ee=(e,t,r,n)=>{for(var o=n>1?void 0:n?qz(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Yz(t,r,o),o},vA=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},Y=(e,t,r)=>(vA(e,t,"read from private field"),r?r.call(e):t.get(e)),Tt=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Ht=(e,t,r,n)=>(vA(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);function Xz(e,t){return e===t}function FS(e){const{previousOptions:t,update:r,equals:n=Xz}=e,o=Vs({...t,...r}),i=te(),s=Vu(t);for(const l of s){const c=t[l],u=o[l];if(n(c,u)){i[l]={changed:!1};continue}i[l]={changed:!0,previousValue:c,value:u}}const a=l=>{const c=te();for(const u of l){const d=i[u];d!=null&&d.changed&&(c[u]=d.value)}return c};return{changes:Vs(i),options:o,pickChanged:a}}var Zz={[U.DUPLICATE_HELPER_NAMES]:"helper method",[U.DUPLICATE_COMMAND_NAMES]:"command method"};function bA(e){const{name:t,set:r,code:n}=e,o=Zz[n];re(!r.has(t),{code:n,message:`There is a naming conflict for the name: ${t} used in this '${o}'. Please rename or remove from the editor to avoid runtime errors.`}),r.add(t)}function Fl(...e){return Ll(dz(...e).split(" ")).join(" ")}var US="__IGNORE__",Jz="__ALL__",fc=class{constructor(e,...[t]){this["~O"]={},this._mappedHandlers=te(),this.populateMappedHandlers(),this._options=this._initialOptions=OC(e,this.constructor.defaultOptions,t??te(),this.createDefaultHandlerOptions()),this._dynamicKeys=this.getDynamicKeys(),this.init()}get options(){return this._options}get dynamicKeys(){return this._dynamicKeys}get initialOptions(){return this._initialOptions}init(){}getDynamicKeys(){const e=[],{customHandlerKeys:t,handlerKeys:r,staticKeys:n}=this.constructor;for(const o of Vu(this._options))n.includes(o)||r.includes(o)||t.includes(o)||e.push(o);return e}ensureAllKeysAreDynamic(e){}setOptions(e){var t;const r=this.getDynamicOptions();this.ensureAllKeysAreDynamic(e);const{changes:n,options:o,pickChanged:i}=FS({previousOptions:r,update:e});this.updateDynamicOptions(o),(t=this.onSetOptions)==null||t.call(this,{reason:"set",changes:n,options:o,pickChanged:i,initialOptions:this._initialOptions})}resetOptions(){var e;const t=this.getDynamicOptions(),{changes:r,options:n,pickChanged:o}=FS({previousOptions:t,update:this._initialOptions});this.updateDynamicOptions(n),(e=this.onSetOptions)==null||e.call(this,{reason:"reset",options:n,changes:r,pickChanged:o,initialOptions:this._initialOptions})}getDynamicOptions(){return By(this._options,[...this.constructor.customHandlerKeys,...this.constructor.handlerKeys])}updateDynamicOptions(e){this._options={...this._options,...e}}populateMappedHandlers(){for(const e of this.constructor.handlerKeys)this._mappedHandlers[e]=[]}createDefaultHandlerOptions(){const e=te();for(const t of this.constructor.handlerKeys)e[t]=(...r)=>{var n;const{handlerKeyOptions:o}=this.constructor,i=(n=o[t])==null?void 0:n.reducer;let s=i==null?void 0:i.getDefault(...r);for(const[,a]of this._mappedHandlers[t]){const l=a(...r);if(s=i?i.accumulator(s,l,...r):l,Qz(o,s,t))return s}return s};return e}addHandler(e,t,r=Ue.Default){return this._mappedHandlers[e].push([r,t]),this.sortHandlers(e),()=>this._mappedHandlers[e]=this._mappedHandlers[e].filter(([,n])=>n!==t)}hasHandlers(e){return(this._mappedHandlers[e]??[]).length>0}sortHandlers(e){this._mappedHandlers[e]=ia(this._mappedHandlers[e],([t],[r])=>r-t)}addCustomHandler(e,t){var r;return((r=this.onAddCustomHandler)==null?void 0:r.call(this,{[e]:t}))??CC}};fc.defaultOptions={};fc.staticKeys=[];fc.handlerKeys=[];fc.handlerKeyOptions={};fc.customHandlerKeys=[];function Qz(e,t,r){const{[Jz]:n}=e,o=e[r];return!n&&!o?!1:!!(o&&o.earlyReturnValue!==US&&(De(o.earlyReturnValue)?o.earlyReturnValue(t)===!0:t===o.earlyReturnValue)||n&&n.earlyReturnValue!==US&&(De(n.earlyReturnValue)?n.earlyReturnValue(t)===!0:t===n.earlyReturnValue))}var am=class extends fc{constructor(...e){super(e6,...e),this["~E"]={},this._extensions=Fy(this.createExtensions(),t=>t.constructor),this.extensionMap=new Map;for(const t of this._extensions)this.extensionMap.set(t.constructor,t)}get priority(){return this.priorityOverride??this.options.priority??this.constructor.defaultPriority}get constructorName(){return`${vC(this.name)}Extension`}get store(){return re(this._store,{code:U.MANAGER_PHASE_ERROR,message:"An error occurred while attempting to access the 'extension.store' when the Manager has not yet set created the lifecycle methods."}),Vs(this._store,{requireKeys:!0})}get extensions(){return this._extensions}replaceChildExtension(e,t){this.extensionMap.has(e)&&(this.extensionMap.set(e,t),this._extensions=this.extensions.map(r=>t.constructor===e?t:r))}createExtensions(){return[]}getExtension(e){const t=this.extensionMap.get(e);return re(t,{code:U.INVALID_GET_EXTENSION,message:`'${e.name}' does not exist within the preset: '${this.name}'`}),t}isOfType(e){return this.constructor===e}setStore(e){this._store||(this._store=e)}clone(...e){return new this.constructor(...e)}setPriority(e){this.priorityOverride=e}};am.defaultPriority=Ue.Default;var Ye=class extends am{static get[si](){return Vt.PlainExtensionConstructor}get[si](){return Vt.PlainExtension}},bs=class extends am{static get[si](){return Vt.MarkExtensionConstructor}get[si](){return Vt.MarkExtension}get type(){return lt(this.store.schema.marks,this.name)}constructor(...e){super(...e)}};bs.disableExtraAttributes=!1;var or=class extends am{static get[si](){return Vt.NodeExtensionConstructor}get[si](){return Vt.NodeExtension}get type(){return lt(this.store.schema.nodes,this.name)}constructor(...e){super(...e)}};or.disableExtraAttributes=!1;var e6={priority:void 0,extraAttributes:{},disableExtraAttributes:!1,exclude:{}};function EA(e){return dc(e)&&pc(e,[Vt.PlainExtension,Vt.MarkExtension,Vt.NodeExtension])}function t6(e){return dc(e)&&pc(e,[Vt.PlainExtensionConstructor,Vt.MarkExtensionConstructor,Vt.NodeExtensionConstructor])}function kA(e){return dc(e)&&pc(e,Vt.PlainExtension)}function Wd(e){return dc(e)&&pc(e,Vt.NodeExtension)}function lm(e){return dc(e)&&pc(e,Vt.MarkExtension)}function ye(e){return t=>{const{defaultOptions:r,customHandlerKeys:n,handlerKeys:o,staticKeys:i,defaultPriority:s,handlerKeyOptions:a,...l}=e,c=t;r&&(c.defaultOptions=r),s&&(c.defaultPriority=s),a&&(c.handlerKeyOptions=a),c.staticKeys=i??[],c.handlerKeys=o??[],c.customHandlerKeys=n??[];for(const[u,d]of Object.entries(l))c[u]||(c[u]=d);return c}}var r6=class extends Ye{constructor(){super(...arguments),this.attributeList=[],this.attributeObject=te(),this.updateAttributes=(e=!0)=>{this.transformAttributes(),e&&this.store.commands.forceUpdate("attributes")}}get name(){return"attributes"}onCreate(){this.transformAttributes(),this.store.setExtensionStore("updateAttributes",this.updateAttributes)}transformAttributes(){var e,t,r;if(this.attributeObject=te(),(e=this.store.managerSettings.exclude)!=null&&e.attributes){this.store.setStoreKey("attributes",this.attributeObject);return}this.attributeList=[];for(const n of this.store.extensions){if((t=n.options.exclude)!=null&&t.attributes)continue;const o=(r=n.createAttributes)==null?void 0:r.call(n),i={...o,class:Fl(...n.classNames??[],o==null?void 0:o.class)};this.attributeList.unshift(i)}for(const n of this.attributeList)this.attributeObject={...this.attributeObject,...n,class:Fl(this.attributeObject.class,n.class)};this.store.setStoreKey("attributes",this.attributeObject)}};function qe(e={}){return(t,r,n)=>{(t.decoratedHelpers??(t.decoratedHelpers={}))[r]=e}}function Z(e={}){return(t,r,n)=>{(t.decoratedCommands??(t.decoratedCommands={}))[r]=e}}function Nt(e){return(t,r,n)=>{(t.decoratedKeybindings??(t.decoratedKeybindings={}))[r]=e}}var n6=class{constructor(e){this.promiseCreator=e,this.failureHandlers=[],this.successHandlers=[],this.validateHandlers=[],this.generateCommand=()=>t=>{let r=!0;const{view:n,tr:o,dispatch:i}=t;if(!n)return!1;for(const a of this.validateHandlers)if(!a({...t,dispatch:()=>{}})){r=!1;break}return!i||!r?r:(this.promiseCreator(t).then(a=>{this.runHandlers(this.successHandlers,{value:a,state:n.state,tr:n.state.tr,dispatch:n.dispatch,view:n})}).catch(a=>{this.runHandlers(this.failureHandlers,{error:a,state:n.state,tr:n.state.tr,dispatch:n.dispatch,view:n})}),i(o),!0)}}validate(e,t="push"){return this.validateHandlers[t](e),this}success(e,t="push"){return this.successHandlers[t](e),this}failure(e,t="push"){return this.failureHandlers[t](e),this}runHandlers(e,t){var r;for(const n of e)if(!n({...t,dispatch:()=>{}}))break;(r=t.dispatch)==null||r.call(t,t.tr)}};function ls(e){const{type:t,attrs:r,range:n,selection:o}=e;return i=>{const{dispatch:s,tr:a,state:l}=i,c=oe(t)?l.schema.marks[t]:t;if(re(c,{code:U.SCHEMA,message:`Mark type: ${t} does not exist on the current schema.`}),n||o){const{from:u,to:d}=Dn(o??n??a.selection,a.doc);return jf({trState:a,type:t,...n})?s==null||s(a.removeMark(u,d,c)):s==null||s(a.addMark(u,d,c.create(r))),!0}return Ou(Az(c,r))(i)}}function o6(e,t,r){for(const{$from:n,$to:o}of r){let i=n.depth===0?t.type.allowsMarkType(e):!1;if(t.nodesBetween(n.pos,o.pos,s=>{if(i)return!1;i=s.inlineContent&&s.type.allowsMarkType(e)}),i)return!0}return!1}function i6(e,t,r){return({tr:n,dispatch:o,state:i})=>{const s=Dn(r??n.selection,n.doc),a=HP(s),l=oe(e)?i.schema.marks[e]:e;if(re(l,{code:U.SCHEMA,message:`Mark type: ${e} does not exist on the current schema.`}),s.empty&&!a||!o6(l,n.doc,s.ranges))return!1;if(!o)return!0;if(a)return n.removeStoredMark(l),t&&n.addStoredMark(l.create(t)),o(n),!0;let c=!1;for(const{$from:u,$to:d}of s.ranges){if(c)break;c=n.doc.rangeHasMark(u.pos,d.pos,l)}for(const{$from:u,$to:d}of s.ranges)c&&n.removeMark(u.pos,d.pos,l),t&&n.addMark(u.pos,d.pos,l.create(t));return o(n),!0}}function s6(e,t={}){return({tr:r,dispatch:n,state:o})=>{const i=o.schema,s=r.selection,{from:a=s.from,to:l=a??s.to,marks:c={}}=t;if(!n)return!0;r.insertText(e,a,l);const u=lt(r.steps,r.steps.length-1).getMap().map(l);for(const[d,p]of Dt(c))r.addMark(a,u,lt(i.marks,d).create(p));return n(r),!0}}var xe=class extends Ye{constructor(){super(...arguments),this.decorated=new Map,this.forceUpdateTransaction=(e,...t)=>{const{forcedUpdates:r}=this.getCommandMeta(e);return this.setCommandMeta(e,{forcedUpdates:Ll([...r,...t])}),e}}get name(){return"commands"}get transaction(){const e=this.store.getState();this._transaction||(this._transaction=e.tr);const t=this._transaction.before.eq(e.doc),r=!is(this._transaction.steps);if(!t){const n=e.tr;if(r)for(const o of this._transaction.steps)n.step(o);this._transaction=n}return this._transaction}onCreate(){this.store.setStoreKey("getForcedUpdates",this.getForcedUpdates.bind(this))}onView(e){var t;const{extensions:r,helpers:n}=this.store,o=te(),i=new Set;let s=te();const a=c=>{var u;const d=te(),p=()=>c??this.transaction;let f=[];const h=()=>f;for(const[b,y]of Object.entries(o))(u=s[b])!=null&&u.disableChaining||(d[b]=this.chainedFactory({chain:d,command:y.original,getTr:p,getChain:h}));const m=b=>{re(b===p(),{message:"Chaining currently only supports `CommandFunction` methods which do not use the `state.tr` property. Instead you should use the provided `tr` property."})};return d.run=(b={})=>{const y=f;f=[];for(const g of y)if(!g(m)&&b.exitEarly)return;e.dispatch(p())},d.tr=()=>{const b=f;f=[];for(const y of b)y(m);return p()},d.enabled=()=>{for(const b of f)if(!b())return!1;return!0},d.new=b=>a(b),d};for(const c of r){const u=((t=c.createCommands)==null?void 0:t.call(c))??{},d=c.decoratedCommands??{},p={};s={...s,decoratedCommands:d};for(const[f,h]of Object.entries(d)){const m=oe(h.shortcut)&&h.shortcut.startsWith("_|")?{shortcut:n.getNamedShortcut(h.shortcut,c.options)}:void 0;this.updateDecorated(f,{...h,name:c.name,...m}),u[f]=c[f].bind(c),h.active&&(p[f]=()=>{var b;return((b=h.active)==null?void 0:b.call(h,c.options,this.store))??!1})}Af(u)||this.addCommands({active:p,names:i,commands:o,extensionCommands:u})}const l=a();for(const[c,u]of Object.entries(l))a[c]=u;this.store.setStoreKey("commands",o),this.store.setStoreKey("chain",a),this.store.setExtensionStore("commands",o),this.store.setExtensionStore("chain",a)}onStateUpdate({state:e}){this._transaction=e.tr}createPlugin(){return{}}customDispatch(e){return e}insertText(e,t={}){return oe(e)?s6(e,t):this.store.createPlaceholderCommand({promise:e,placeholder:{type:"inline"},onSuccess:(r,n,o)=>this.insertText(r,{...t,...n})(o)}).generateCommand()}selectText(e,t={}){return({tr:r,dispatch:n})=>{const o=Dn(e,r.doc);return r.selection.anchor===o.anchor&&r.selection.head===o.head&&!t.forceUpdate?!1:(n==null||n(r.setSelection(o)),!0)}}selectMark(e){return t=>{const{tr:r}=t,n=ai(r.selection.$from,e);return n?this.store.commands.selectText.original({from:n.from,to:n.to})(t):!1}}delete(e){return({tr:t,dispatch:r})=>{const{from:n,to:o}=e??t.selection;return r==null||r(t.delete(n,o)),!0}}emptyUpdate(e){return({tr:t,dispatch:r})=>(r&&(e==null||e(),r(t)),!0)}forceUpdate(...e){return({tr:t,dispatch:r})=>(r==null||r(this.forceUpdateTransaction(t,...e)),!0)}updateNodeAttributes(e,t){return({tr:r,dispatch:n})=>(n==null||n(r.setNodeMarkup(e,void 0,t)),!0)}setContent(e,t){return r=>{const{tr:n,dispatch:o}=r,i=this.store.manager.createState({content:e,selection:t});return i?(o==null||o(n.replaceRangeWith(0,n.doc.nodeSize-2,i.doc)),!0):!1}}resetContent(){return e=>{const{tr:t,dispatch:r}=e,n=this.store.manager.createEmptyDoc();return n?this.setContent(n)(e):(r==null||r(t.delete(0,t.doc.nodeSize)),!0)}}emptySelection(){return({tr:e,dispatch:t})=>e.selection.empty?!1:(t==null||t(e.setSelection(ue.near(e.selection.$anchor))),!0)}insertNewLine(){return({dispatch:e,tr:t})=>vs(t.selection)?(e==null||e(t.insertText(` -`)),!0):!1}insertNode(e,t={}){return({dispatch:r,tr:n,state:o})=>{var i;const{attrs:s,range:a,selection:l,replaceEmptyParentBlock:c=!1}=t,{from:u,to:d,$from:p}=Dn(l??a??n.selection,n.doc);if(jd(e)||RP(e)){const y=p.before(p.depth);return r==null||r(c&&u===d&&rm(p.parent)?n.replaceWith(y,y+p.parent.nodeSize,e):n.replaceWith(u,d,e)),!0}const f=oe(e)?o.schema.nodes[e]:e;re(f,{code:U.SCHEMA,message:`The requested node type ${e} does not exist in the schema.`});const h=(i=t.marks)==null?void 0:i.map(y=>{if(y instanceof Ne)return y;const g=oe(y)?o.schema.marks[y]:y;return re(g,{code:U.SCHEMA,message:`The requested mark type ${y} does not exist in the schema.`}),g.create()}),m=f.createAndFill(s,oe(t.content)?o.schema.text(t.content):t.content,h);if(!m)return!1;const b=u!==d;return r==null||r(b?n.replaceRangeWith(u,d,m):n.insert(u,m)),!0}}focus(e){return t=>{const{dispatch:r,tr:n}=t,{view:o}=this.store;if(e===!1||o.hasFocus()&&(e===void 0||e===!0))return!1;if(e===void 0||e===!0){const{from:i=0,to:s=i}=n.selection;e={from:i,to:s}}return r&&this.delayedFocus(),this.selectText(e)(t)}}blur(e){return t=>{const{view:r}=this.store;return r.hasFocus()?(requestAnimationFrame(()=>{r.dom.blur()}),e?this.selectText(e)(t):!0):!1}}setBlockNodeType(e,t,r,n=!0){return qu(e,t,r,n)}toggleWrappingNode(e,t,r){return iA(e,t,r)}toggleBlockNodeItem(e){return uv(e)}wrapInNode(e,t,r){return oA(e,t,r)}applyMark(e,t,r){return i6(e,t,r)}toggleMark(e){return ls(e)}removeMark(e){return aA(e)}setMeta(e,t){return({tr:r})=>(r.setMeta(e,t),!0)}selectAll(){return this.selectText("all")}copy(){return e=>e.tr.selection.empty?!1:(e.dispatch&&document.execCommand("copy"),!0)}paste(){return this.store.createPlaceholderCommand({promise:async()=>{var e;return(e=navigator.clipboard)!=null&&e.readText?await navigator.clipboard.readText():""},placeholder:{type:"inline"},onSuccess:(e,t,r)=>this.insertNode(l0({content:e,schema:r.state.schema}),{selection:t})(r)}).generateCommand()}cut(){return e=>e.tr.selection.empty?!1:(e.dispatch&&document.execCommand("cut"),!0)}replaceText(e){return nz(e)}getAllCommandOptions(){const e={};for(const[t,r]of this.decorated)Af(r)||(e[t]=r);return e}getCommandOptions(e){return this.decorated.get(e)}getCommandProp(){return{tr:this.transaction,dispatch:this.store.view.dispatch,state:this.store.view.state,view:this.store.view}}updateDecorated(e,t){if(!t){this.decorated.delete(e);return}const r=this.decorated.get(e)??{name:""};this.decorated.set(e,{...r,...t})}handleIosFocus(){ln.isIos&&this.store.view.dom.focus()}delayedFocus(){this.handleIosFocus(),requestAnimationFrame(()=>{this.store.view.focus(),this.store.view.dispatch(this.transaction.scrollIntoView())})}getForcedUpdates(e){return this.getCommandMeta(e).forcedUpdates}getCommandMeta(e){const t=e.getMeta(this.pluginKey)??{};return{...a6,...t}}setCommandMeta(e,t){const r=this.getCommandMeta(e);e.setMeta(this.pluginKey,{...r,...t})}addCommands(e){const{extensionCommands:t,commands:r,names:n,active:o}=e;for(const[i,s]of Dt(t))bA({name:i,set:n,code:U.DUPLICATE_COMMAND_NAMES}),re(!l6.has(i),{code:U.DUPLICATE_COMMAND_NAMES,message:"The command name you chose is forbidden."}),r[i]=this.createUnchainedCommand(s,o[i])}unchainedFactory(e){return(...t)=>{const{shouldDispatch:r=!0,command:n}=e,{view:o}=this.store,{state:i}=o;let s;return r&&(s=o.dispatch),n(...t)({state:i,dispatch:s,view:o,tr:i.tr})}}createUnchainedCommand(e,t){const r=this.unchainedFactory({command:e});return r.enabled=this.unchainedFactory({command:e,shouldDispatch:!1}),r.isEnabled=r.enabled,r.original=e,r.active=t,r}chainedFactory(e){return(...t)=>{const{chain:r,command:n,getTr:o,getChain:i}=e,s=i(),{view:a}=this.store,{state:l}=a;return s.push(c=>n(...t)({state:l,dispatch:c,view:a,tr:o()})),r}}};ee([Z()],xe.prototype,"customDispatch",1);ee([Z()],xe.prototype,"insertText",1);ee([Z()],xe.prototype,"selectText",1);ee([Z()],xe.prototype,"selectMark",1);ee([Z()],xe.prototype,"delete",1);ee([Z()],xe.prototype,"emptyUpdate",1);ee([Z()],xe.prototype,"forceUpdate",1);ee([Z()],xe.prototype,"updateNodeAttributes",1);ee([Z()],xe.prototype,"setContent",1);ee([Z()],xe.prototype,"resetContent",1);ee([Z()],xe.prototype,"emptySelection",1);ee([Z()],xe.prototype,"insertNewLine",1);ee([Z()],xe.prototype,"insertNode",1);ee([Z()],xe.prototype,"focus",1);ee([Z()],xe.prototype,"blur",1);ee([Z()],xe.prototype,"setBlockNodeType",1);ee([Z()],xe.prototype,"toggleWrappingNode",1);ee([Z()],xe.prototype,"toggleBlockNodeItem",1);ee([Z()],xe.prototype,"wrapInNode",1);ee([Z()],xe.prototype,"applyMark",1);ee([Z()],xe.prototype,"toggleMark",1);ee([Z()],xe.prototype,"removeMark",1);ee([Z()],xe.prototype,"setMeta",1);ee([Z({description:({t:e})=>e(ss.SELECT_ALL_DESCRIPTION),label:({t:e})=>e(ss.SELECT_ALL_LABEL),shortcut:V.SelectAll})],xe.prototype,"selectAll",1);ee([Z({description:({t:e})=>e(ss.COPY_DESCRIPTION),label:({t:e})=>e(ss.COPY_LABEL),shortcut:V.Copy,icon:"fileCopyLine"})],xe.prototype,"copy",1);ee([Z({description:({t:e})=>e(ss.PASTE_DESCRIPTION),label:({t:e})=>e(ss.PASTE_LABEL),shortcut:V.Paste,icon:"clipboardLine"})],xe.prototype,"paste",1);ee([Z({description:({t:e})=>e(ss.CUT_DESCRIPTION),label:({t:e})=>e(ss.CUT_LABEL),shortcut:V.Cut,icon:"scissorsFill"})],xe.prototype,"cut",1);ee([Z()],xe.prototype,"replaceText",1);ee([qe()],xe.prototype,"getAllCommandOptions",1);ee([qe()],xe.prototype,"getCommandOptions",1);ee([qe()],xe.prototype,"getCommandProp",1);xe=ee([ye({defaultPriority:Ue.Highest,defaultOptions:{trackerClassName:"remirror-tracker-position",trackerNodeName:"span"},staticKeys:["trackerClassName","trackerNodeName"]})],xe);var a6={forcedUpdates:[]},l6=new Set(["run","chain","original","raw","enabled","tr","new"]),lo=class extends Ye{constructor(){super(...arguments),this.placeholders=Ce.empty,this.placeholderWidgets=new Map,this.createPlaceholderCommand=e=>{const t=Ml(),{promise:r,placeholder:n,onFailure:o,onSuccess:i}=e;return new n6(r).validate(s=>this.addPlaceholder(t,n)(s)).success(s=>{const{state:a,tr:l,dispatch:c,view:u,value:d}=s,p=this.store.helpers.findPlaceholder(t);if(!p){const f=new Error("The placeholder has been removed");return(o==null?void 0:o({error:f,state:a,tr:l,dispatch:c,view:u}))??!1}return this.removePlaceholder(t)({state:a,tr:l,view:u,dispatch:()=>{}}),i(d,p,{state:a,tr:l,dispatch:c,view:u})}).failure(s=>(this.removePlaceholder(t)({...s,dispatch:()=>{}}),(o==null?void 0:o(s))??!1))}}get name(){return"decorations"}onCreate(){this.store.setExtensionStore("createPlaceholderCommand",this.createPlaceholderCommand)}createPlugin(){return{state:{init:()=>{},apply:e=>{var t,r,n,o,i,s;const{added:a,clearTrackers:l,removed:c,updated:u}=this.getMeta(e);if(l){this.placeholders=Ce.empty;for(const[,d]of this.placeholderWidgets)(r=(t=d.spec).onDestroy)==null||r.call(t,this.store.view,d.spec.element);this.placeholderWidgets.clear();return}this.placeholders=this.placeholders.map(e.mapping,e.doc,{onRemove:d=>{var p,f;const h=this.placeholderWidgets.get(d.id);h&&((f=(p=h.spec).onDestroy)==null||f.call(p,this.store.view,h.spec.element))}});for(const[,d]of this.placeholderWidgets)(o=(n=d.spec).onUpdate)==null||o.call(n,this.store.view,d.from,d.spec.element,d.spec.data);for(const d of a){if(d.type==="inline"){this.addInlinePlaceholder(d,e);continue}if(d.type==="node"){this.addNodePlaceholder(d,e);continue}if(d.type==="widget"){this.addWidgetPlaceholder(d,e);continue}}for(const{id:d,data:p}of u){const f=this.placeholderWidgets.get(d);if(!f)continue;const h=Je.widget(f.from,f.spec.element,{...f.spec,data:p});this.placeholders=this.placeholders.remove([f]).add(e.doc,[h]),this.placeholderWidgets.set(d,h)}for(const d of c){const p=this.placeholders.find(void 0,void 0,h=>h.id===d&&h.__type===Ba),f=this.placeholderWidgets.get(d);f&&((s=(i=f.spec).onDestroy)==null||s.call(i,this.store.view,f.spec.element)),this.placeholders=this.placeholders.remove(p),this.placeholderWidgets.delete(d)}}},props:{decorations:e=>{let t=this.options.decorations(e);t=t.add(e.doc,this.placeholders.find());for(const r of this.store.extensions){if(!r.createDecorations)continue;const n=r.createDecorations(e).find();t=t.add(e.doc,n)}return t},handleDOMEvents:{blur:e=>(this.options.persistentSelectionClass&&e.dispatch(e.state.tr.setMeta(VS,!1)),!1),focus:e=>(this.options.persistentSelectionClass&&e.dispatch(e.state.tr.setMeta(VS,!0)),!1)}}}}updateDecorations(){return({tr:e,dispatch:t})=>(t==null||t(e),!0)}addPlaceholder(e,t,r){return({dispatch:n,tr:o})=>this.addPlaceholderTransaction(e,t,o,!n)?(n==null||n(r?o.deleteSelection():o),!0):!1}updatePlaceholder(e,t){return({dispatch:r,tr:n})=>this.updatePlaceholderTransaction({id:e,data:t,tr:n,checkOnly:!r})?(r==null||r(n),!0):!1}removePlaceholder(e){return({dispatch:t,tr:r})=>this.removePlaceholderTransaction({id:e,tr:r,checkOnly:!t})?(t==null||t(r),!0):!1}clearPlaceholders(){return({tr:e,dispatch:t})=>this.clearPlaceholdersTransaction({tr:e,checkOnly:!t})?(t==null||t(e),!0):!1}findPlaceholder(e){return this.findAllPlaceholders().get(e)}findAllPlaceholders(){const e=new Map,t=this.placeholders.find(void 0,void 0,r=>r.__type===Ba);for(const r of t)e.set(r.spec.id,{from:r.from,to:r.to});return e}createDecorations(e){var t,r,n;const{persistentSelectionClass:o}=this.options;return!o||(t=this.store.view)!=null&&t.hasFocus()||(n=(r=this.store.helpers).isInteracting)!=null&&n.call(r)?Ce.empty:u6(e,Ce.empty,{class:oe(o)?o:"selection"})}onApplyState(){}addWidgetPlaceholder(e,t){const{pos:r,createElement:n,onDestroy:o,onUpdate:i,className:s,nodeName:a,id:l,type:c}=e,u=(n==null?void 0:n(this.store.view,r))??document.createElement(a);u.classList.add(s);const d=Je.widget(r,u,{id:l,__type:Ba,type:c,element:u,onDestroy:o,onUpdate:i});this.placeholderWidgets.set(l,d),this.placeholders=this.placeholders.add(t.doc,[d])}addInlinePlaceholder(e,t){const{from:r=t.selection.from,to:n=t.selection.to,className:o,nodeName:i,id:s,type:a}=e;let l;if(r===n){const c=document.createElement(i);c.classList.add(o),l=Je.widget(r,c,{id:s,type:a,__type:Ba,widget:c})}else l=Je.inline(r,n,{nodeName:i,class:o},{id:s,__type:Ba});this.placeholders=this.placeholders.add(t.doc,[l])}addNodePlaceholder(e,t){const{pos:r,className:n,nodeName:o,id:i}=e,s=gn(r)?t.doc.resolve(r):t.selection.$from,a=gn(r)?s.nodeAfter?{pos:r,end:s.nodeAfter.nodeSize}:void 0:EP(s);if(!a)return;const l=Je.node(a.pos,a.end,{nodeName:o,class:n},{id:i,__type:Ba});this.placeholders=this.placeholders.add(t.doc,[l])}withRequiredBase(e,t){const{placeholderNodeName:r,placeholderClassName:n}=this.options,{nodeName:o=r,className:i,...s}=t,a=(i?[n,i]:[n]).join(" ");return{nodeName:o,className:a,...s,id:e}}getMeta(e){const t=e.getMeta(this.pluginKey)??{};return{...c6,...t}}setMeta(e,t){const r=this.getMeta(e);e.setMeta(this.pluginKey,{...r,...t})}addPlaceholderTransaction(e,t,r,n=!1){if(this.findPlaceholder(e))return!1;if(n)return!0;const{added:i}=this.getMeta(r);return this.setMeta(r,{added:[...i,this.withRequiredBase(e,t)]}),!0}updatePlaceholderTransaction(e){const{id:t,tr:r,checkOnly:n=!1,data:o}=e;if(!this.findPlaceholder(t))return!1;if(n)return!0;const{updated:s}=this.getMeta(r);return this.setMeta(r,{updated:Ll([...s,{id:t,data:o}])}),!0}removePlaceholderTransaction(e){const{id:t,tr:r,checkOnly:n=!1}=e;if(!this.findPlaceholder(t))return!1;if(n)return!0;const{removed:i}=this.getMeta(r);return this.setMeta(r,{removed:Ll([...i,t])}),!0}clearPlaceholdersTransaction(e){const{tr:t,checkOnly:r=!1}=e;return this.getPluginState()===Ce.empty?!1:(r||this.setMeta(t,{clearTrackers:!0}),!0)}};ee([Z()],lo.prototype,"updateDecorations",1);ee([Z()],lo.prototype,"addPlaceholder",1);ee([Z()],lo.prototype,"updatePlaceholder",1);ee([Z()],lo.prototype,"removePlaceholder",1);ee([Z()],lo.prototype,"clearPlaceholders",1);ee([qe()],lo.prototype,"findPlaceholder",1);ee([qe()],lo.prototype,"findAllPlaceholders",1);lo=ee([ye({defaultOptions:{persistentSelectionClass:void 0,placeholderClassName:"placeholder",placeholderNodeName:"span"},staticKeys:["placeholderClassName","placeholderNodeName"],handlerKeys:["decorations"],handlerKeyOptions:{decorations:{reducer:{accumulator:(e,t,r)=>e.add(r.doc,t.find()),getDefault:()=>Ce.empty}}},defaultPriority:Ue.Low})],lo);var c6={added:[],updated:[],clearTrackers:!1,removed:[]},Ba="placeholderDecoration",VS="persistentSelectionFocus";function u6(e,t,r){const{selection:n,doc:o}=e;if(n.empty)return t;const{from:i,to:s}=n,a=Gd(n)?Je.node(i,s,r):Je.inline(i,s,r);return t.add(o,[a])}var u0=class extends Ye{get name(){return"docChanged"}onStateUpdate(e){const{firstUpdate:t,transactions:r,tr:n}=e;t||(r??[n]).some(o=>o==null?void 0:o.docChanged)&&this.options.docChanged(e)}};u0=ee([ye({handlerKeys:["docChanged"],handlerKeyOptions:{docChanged:{earlyReturnValue:!1}},defaultPriority:Ue.Lowest})],u0);var Pn=class extends Ye{get name(){return"helpers"}onCreate(){var e;this.store.setStringHandler("text",this.textToProsemirrorNode.bind(this)),this.store.setStringHandler("html",l0);const t=te(),r=te(),n=te(),o=new Set;for(const i of this.store.extensions){Wd(i)&&(r[i.name]=a=>YO({state:this.store.getState(),type:i.type,attrs:a}),n[i.name]=a=>{var l;return(l=Yu({state:this.store.getState(),type:i.type,attrs:a}))==null?void 0:l.node.attrs}),lm(i)&&(r[i.name]=a=>jf({trState:this.store.getState(),type:i.type,attrs:a}),n[i.name]=a=>{const l=ai(this.store.getState().selection.$from,i.type);if(!l||!a)return l==null?void 0:l.mark.attrs;if(av(l.mark,a))return l.mark.attrs});const s=((e=i.createHelpers)==null?void 0:e.call(i))??{};for(const a of Object.keys(i.decoratedHelpers??{}))s[a]=i[a].bind(i);if(!Af(s))for(const[a,l]of Dt(s))bA({name:a,set:o,code:U.DUPLICATE_HELPER_NAMES}),t[a]=l}this.store.setStoreKey("attrs",n),this.store.setStoreKey("active",r),this.store.setStoreKey("helpers",t),this.store.setExtensionStore("attrs",n),this.store.setExtensionStore("active",r),this.store.setExtensionStore("helpers",t)}isSelectionEmpty(e=this.store.getState()){return sv(e)}isViewEditable(e=this.store.getState()){var t,r;return((r=(t=this.store.view.props).editable)==null?void 0:r.call(t,e))??!1}getStateJSON(e=this.store.getState()){return e.toJSON()}getJSON(e=this.store.getState()){return e.doc.toJSON()}getRemirrorJSON(e=this.store.getState()){return this.getJSON(e)}insertHtml(e,t){return r=>{const{state:n}=r,o=l0({content:e,schema:n.schema,fragment:!0});return this.store.commands.insertNode.original(o,t)(r)}}getText({lineBreakDivider:e=` +If you are using Node.js, you can install JSDOM and Remirror will try to use it automatically, or you can create a fake document and pass it to Remirror`)}function B2(t){var e;return(t==null?void 0:t.defaultView)??(typeof window<"u"?window:void 0)??((e=WR())==null?void 0:e.defaultView)}function cF(t){return B2(t==null?void 0:t.ownerDocument)}function uF(t){const e=B2(t)??pm().defaultView;if(e)return e;throw new Error("Unable to retrieve the window from the global scope")}function dF(t,e=pm()){const n=sF(t,t.type.schema)?t.content:Q.from(t);return Ur.fromSchema(t.type.schema).serializeFragment(n,{document:e})}function hF(t,e){return new(uF(e)).DOMParser().parseFromString(`${t}`,"text/html").body}function fF(t,e=pm()){const n=e.createElement("div");return n.append(dF(t,e)),n.innerHTML}function O0(t){const{content:e,schema:n,document:r,fragment:o=!1,...i}=t,s=hF(e,r),l=pb.fromSchema(n);return o?l.parseSlice(s,{...fC,...i}).content:l.parse(s,{...fC,...i})}var fC={preserveWhitespace:!1};function gm(t,e){const n=Bd(e.defaults());return ub({...t},n)}function pF(t,e){let n="";e&&(n=`${e.trim()}`);const r=wP(t);if(!r)return n;const o=(n.endsWith(";")," ");return`${n}${o}${r}`}var gF={remove(t,e){let n=t;for(const r of e)r.invalidParentNode||(n=pD(r.path,n));return n}};function mF({json:t,schema:e,...n}){const r=new Set(Bd(e.marks)),o=new Set(Bd(e.nodes)),i=H2({json:t,path:[],validNodes:o,validMarks:r});return{json:t,invalidContent:i,transformers:gF,...n}}function H2(t){const{json:e,validMarks:n,validNodes:r,path:o=[]}=t,i={validMarks:n,validNodes:r},s=[],{type:l,marks:a,content:u}=e;let{invalidParentMark:c=!1,invalidParentNode:d=!1}=t;if(a){const h=[];for(const[f,p]of a.entries()){const g=ke(p)?p:p.type;n.has(g)||(h.unshift({name:g,path:[...o,"marks",`${f}`],type:"mark",invalidParentMark:c,invalidParentNode:d}),c=!0)}s.push(...h)}if(r.has(l)||(s.push({name:l,type:"node",path:o,invalidParentMark:c,invalidParentNode:d}),d=!0),u){const h=[];for(const[f,p]of u.entries())h.unshift(...H2({...i,json:p,path:[...o,"content",`${f}`],invalidParentMark:c,invalidParentNode:d}));s.unshift(...h)}return s}function vF(t){return!!(Js(t)&&t.$cursor&&t.$cursor.parentOffset>=t.$cursor.parent.content.size)}function I0(t){return!!(Js(t)&&t.$cursor&&t.$cursor.parentOffset<=0)}function pC(t){const e=Ue.atStart(t.$anchor.doc);return!!(I0(t)&&e.anchor===t.anchor)}function yF(t){return({dispatch:e,tr:n})=>{const{type:r,attrs:o=be(),appendText:i,range:s}=t,l=s?Ie.between(n.doc.resolve(s.from),n.doc.resolve(s.to)):n.selection,{$from:a,from:u,to:c}=l;let d=a.depth===0?n.doc.type.allowsMarkType(r):!1;return n.doc.nodesBetween(u,c,h=>{if(d)return!1;if(h.inlineContent&&h.type.allowsMarkType(r)){d=!0;return}}),d?(e==null||e(n.addMark(u,c,r.create(o))&&i?n.insertText(i):n),!0):!1}}function bF({tr:t,dispatch:e}){const{$from:n,$to:r}=t.selection,o=n.blockRange(r),i=o&&au(o);return!Yr(i)||!o?!1:(e==null||e(t.lift(o,i).scrollIntoView()),!0)}function U2(t,e={},n){return function(r){const{tr:o,dispatch:i,state:s}=r,l=ke(t)?Ot(s.schema.nodes,t):t,{from:a,to:u}=po(n??o.selection,o.doc),c=o.doc.resolve(a),d=o.doc.resolve(u),h=c.blockRange(d),f=h&&mb(h,l,e);return!f||!h?!1:(i==null||i(o.wrap(h,f).scrollIntoView()),!0)}}function W2(t,e={},n){return r=>{const{tr:o,state:i}=r,s=ke(t)?Ot(i.schema.nodes,t):t;return jd({state:o,type:s,attrs:e})?bF(r):U2(t,e,n)(r)}}function Gd(t,e,n,r=!0){return function(o){const{tr:i,dispatch:s,state:l}=o,a=ke(t)?Ot(l.schema.nodes,t):t,{from:u,to:c}=po(n??i.selection,i.doc);let d=!1,h;return i.doc.nodesBetween(u,c,(f,p)=>{if(d)return!1;if(!f.isTextblock||f.hasMarkup(a,e))return;if(f.type===a){d=!0,h=f.attrs;return}const g=i.doc.resolve(p),m=g.index();d=g.parent.canReplaceWith(m,m+1,a),d&&(h=g.parent.attrs)}),d?(s==null||s(i.setBlockType(u,c,a,{...r?h:{},...e}).scrollIntoView()),!0):!1}}function $b(t){return e=>{const{tr:n,state:r}=e,{type:o,attrs:i,preserveAttrs:s=!0}=t,l=jd({state:n,type:o,attrs:i}),a=t.toggleType??hm(r.schema);if(l)return Gd(a,{...s?l.node.attrs:{},...i})(e);const u=jd({state:n,type:a,attrs:i});return Gd(o,{...s?u==null?void 0:u.node.attrs:{},...i})(e)}}function wF(t=0){const e=navigator.userAgent.match(/Chrom(e|ium)\/(\d+)\./);return e?Number.parseInt(Ot(e,2),10)>=t:!1}function xF(t,e){let{head:n,empty:r,anchor:o}=t;for(const i of e.steps)n=i.getMap().map(n);r?e.setSelection(Ie.near(e.doc.resolve(n))):e.setSelection(Ie.between(e.doc.resolve(o),e.doc.resolve(n)))}function kF(t){const{attrs:e={},appendText:n="",content:r="",keepSelection:o=!1,range:i}=t;return({state:s,tr:l,dispatch:a})=>{var u;const c=s.schema,d=po(t.selection??i??l.selection,l.doc),h=d.$from.index(),{from:f,to:p,$from:g}=d,m=ke(t.type)?c.nodes[t.type]??c.marks[t.type]:t.type;if(we(ke(t.type)?m:!0,{code:re.SCHEMA,message:`Schema contains no marks or nodes with name ${m}`}),Gz(m)){if(!g.parent.canReplaceWith(h,h,m))return!1;l.replaceWith(f,p,m.create(e,r?c.text(r):void 0))}else we(r,{message:"`replaceText` cannot be called without content when using a mark type"}),l.replaceWith(f,p,c.text(r,L2(m)?[m.create(e)]:void 0));return n&&l.insertText(n),o&&xF(s.selection,l),a&&(wF(60)&&((u=document.getSelection())==null||u.empty()),a(l)),!0}}function V2(t,e){const n=t.parent.childAfter(t.parentOffset);if(!n.node)return;const{marks:r,nodeSize:o}=n.node;if(r[0])return r[0].type;const s=t.start()+n.offset+o;return V2(t.doc.resolve(s+1))}function j2(t){return({dispatch:e,tr:n,state:r})=>{const{type:o,expand:i=!0,range:s}=t,l=po(t.selection??s??n.selection,n.doc);let{from:a,to:u,$from:c,$to:d}=l;const h=ke(o)?r.schema.marks[o]:o;h!==null&&we(h,{code:re.SCHEMA,message:`Mark type: ${o} does not exist on the current schema.`});const f=h??V2(c);if(!f)return!1;const p=Hi(c,f,d);return i&&p&&(a=Math.max(0,Math.min(a,p.from)),u=Math.min(Math.max(u,p.to),n.doc.nodeSize-2)),e==null||e(n.removeMark(a,Yr(u)?u:a,L2(h)?h:void 0)),!0}}function EF(t){const e=["command","cmd","meta"];return Br.isMac&&e.push("mod"),e.includes(t)}function SF(t){const e=["control","ctrl"];return Br.isMac||e.push("mod"),e.includes(t)}function CF(t){const e=[];for(let n of t.split("-")){if(n=n.toLowerCase(),EF(n)){e.push({type:"modifier",symbol:"⌘",key:"command",i18n:on.COMMAND_KEY});continue}if(SF(n)){e.push({type:"modifier",symbol:"⌃",key:"control",i18n:on.CONTROL_KEY});continue}switch(n){case"shift":e.push({type:"modifier",symbol:"⇧",key:n,i18n:on.SHIFT_KEY});continue;case"alt":e.push({type:"modifier",symbol:"⌥",key:n,i18n:on.ALT_KEY});continue;case` +`:case"\r":case"enter":e.push({type:"named",symbol:"↵",key:n,i18n:on.ENTER_KEY});continue;case"backspace":e.push({type:"named",symbol:"⌫",key:n,i18n:on.BACKSPACE_KEY});continue;case"delete":e.push({type:"named",symbol:"⌦",key:n,i18n:on.DELETE_KEY});continue;case"escape":e.push({type:"named",symbol:"␛",key:n,i18n:on.ESCAPE_KEY});continue;case"tab":e.push({type:"named",symbol:"⇥",key:n,i18n:on.TAB_KEY});continue;case"capslock":e.push({type:"named",symbol:"⇪",key:n,i18n:on.CAPS_LOCK_KEY});continue;case"space":e.push({type:"named",symbol:"␣",key:n,i18n:on.SPACE_KEY});continue;case"pageup":e.push({type:"named",symbol:"⤒",key:n,i18n:on.PAGE_UP_KEY});continue;case"pagedown":e.push({type:"named",symbol:"⤓",key:n,i18n:on.PAGE_DOWN_KEY});continue;case"home":e.push({type:"named",key:n,i18n:on.HOME_KEY});continue;case"end":e.push({type:"named",key:n,i18n:on.END_KEY});continue;case"arrowleft":e.push({type:"named",symbol:"←",key:n,i18n:on.ARROW_LEFT_KEY});continue;case"arrowright":e.push({type:"named",symbol:"→",key:n,i18n:on.ARROW_RIGHT_KEY});continue;case"arrowup":e.push({type:"named",symbol:"→",key:n,i18n:on.ARROW_UP_KEY});continue;case"arrowdown":e.push({type:"named",symbol:"↓",key:n,i18n:on.ARROW_DOWN_KEY});continue;default:e.push({type:"char",key:n});continue}}return e}function TF(t){const{node:e,predicate:n,descend:r=!0,action:o}=t;we(Uh(e),{code:re.INTERNAL,message:'Invalid "node" parameter passed to "findChildren".'}),we(tt(n),{code:re.INTERNAL,message:'Invalid "predicate" parameter passed to "findChildren".'});const i=[];return e.descendants((s,l)=>{const a={node:s,pos:l};return n(a)&&(i.push(a),o==null||o(a)),r}),i}function AF(t){const{type:e,...n}=t;return TF({...n,predicate:r=>r.node.type===e})}function _F(t,e={}){const{descend:n=!1,predicate:r,StepTypes:o}=e,i=nF(t,o),s=[];for(const l of i){const{start:a,end:u}=l;t.doc.nodesBetween(a,u,(c,d)=>(((r==null?void 0:r(c,d,l))??!0)&&s.push({node:c,pos:d}),n))}return s}function Kd(t){const{regexp:e,type:n,getAttributes:r,ignoreWhitespace:o=!1,beforeDispatch:i,updateCaptured:s,shouldSkip:l,invalidMarks:a}=t;let u;const c=new ml(e,(d,h,f,p)=>{const{tr:g,schema:m}=d;u||(u=ke(n)?m.marks[n]:n,we(u,{code:re.SCHEMA,message:`Mark type: ${n} does not exist on the current schema.`}));let v=h[1],y=h[0];const b=K2({captureGroup:v,fullMatch:y,end:p,start:f,rule:c,state:d,ignoreWhitespace:o,invalidMarks:a,shouldSkip:l,updateCaptured:s});if(!b)return null;({start:f,end:p,captureGroup:v,fullMatch:y}=b);const w=tt(r)?r(h):r;let k=p,x=[];if(v){const S=y.search(/\S/),T=f+y.indexOf(v),C=T+v.length;x=g.storedMarks??[],Cf&&g.delete(f+S,T),k=f+S+v.length}return g.addMark(f,k,u.create(w)),g.setStoredMarks(x),i==null||i({tr:g,match:h,start:f,end:p}),g});return c}function G2(t){const{regexp:e,type:n,getAttributes:r,beforeDispatch:o,shouldSkip:i,ignoreWhitespace:s=!1,updateCaptured:l,invalidMarks:a}=t,u=new ml(e,(c,d,h,f)=>{const p=tt(r)?r(d):r,{tr:g,schema:m}=c,v=ke(n)?m.nodes[n]:n;let y=d[1],b=d[0];const w=K2({captureGroup:y,fullMatch:b,end:f,start:h,rule:u,state:c,ignoreWhitespace:s,invalidMarks:a,shouldSkip:i,updateCaptured:l});if(!w)return null;({start:h,end:f,captureGroup:y,fullMatch:b}=w),we(v,{code:re.SCHEMA,message:`No node exists for ${n} in the schema.`});const k=v.createAndFill(p);return k&&(g.replaceRangeWith(v.isBlock?g.doc.resolve(h).before():h,f,k),o==null||o({tr:g,match:[b,y??""],start:h,end:f})),g});return u}function K2({captureGroup:t,fullMatch:e,end:n,start:r,rule:o,ignoreWhitespace:i,shouldSkip:s,updateCaptured:l,state:a,invalidMarks:u}){var c;if(e==null)return null;const d=(l==null?void 0:l({captureGroup:t,fullMatch:e,start:r,end:n}))??{};t=d.captureGroup??t,e=d.fullMatch??e,r=d.start??r,n=d.end??n;const h=a.doc.resolve(r),f=a.doc.resolve(n);return u&&R0({$from:h,$to:f},u)||o.invalidMarks&&R0({$from:h,$to:f},o.invalidMarks)||i&&(t==null?void 0:t.trim())===""||s!=null&&s({state:a,captureGroup:t,fullMatch:e,start:r,end:n,ruleType:"mark"})||(c=o.shouldSkip)!=null&&c.call(o,{state:a,captureGroup:t,fullMatch:e,start:r,end:n,ruleType:"mark"})?null:{captureGroup:t,end:n,fullMatch:e,start:r}}var RF=function(){const e=Array.prototype.slice.call(arguments).filter(Boolean),n={},r=[];e.forEach(i=>{(i?i.split(" "):[]).forEach(l=>{if(l.startsWith("atm_")){const[,a]=l.split("_");n[a]=l}else r.push(l)})});const o=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&o.push(n[i]);return o.push(...r),o.join(" ")},MF=RF;const Y2=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function OF(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const X2=(t,e,n)=>{let r=OF(t,n);if(!r)return!1;let o=q2(r);if(!o){let s=r.blockRange(),l=s&&au(s);return l==null?!1:(e&&e(t.tr.lift(s,l).scrollIntoView()),!0)}let i=o.nodeBefore;if(!i.type.spec.isolating&&J2(t,o,e))return!0;if(r.parent.content.size==0&&(Dc(i,"end")||Le.isSelectable(i))){let s=vb(t.doc,r.before(),r.after(),ae.empty);if(s&&s.slice.size{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;i=q2(r)}let s=i&&i.nodeBefore;return!s||!Le.isSelectable(s)?!1:(e&&e(t.tr.setSelection(Le.create(t.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function q2(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-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 LF(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset{let r=LF(t,n);if(!r)return!1;let o=Z2(r);if(!o)return!1;let i=o.nodeAfter;if(J2(t,o,e))return!0;if(r.parent.content.size==0&&(Dc(i,"start")||Le.isSelectable(i))){let s=vb(t.doc,r.before(),r.after(),ae.empty);if(s&&s.slice.size{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset=0;e--){let n=t.node(e);if(t.index(e)+1{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(` +`).scrollIntoView()),!0)};function Db(t){for(let e=0;e{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=Db(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(e){let l=n.after(),a=t.tr.replaceWith(l,l,s.createAndFill());a.setSelection(Ue.near(a.doc.resolve(l),1)),e(a.scrollIntoView())}return!0},PF=(t,e)=>{let n=t.selection,{$from:r,$to:o}=n;if(n instanceof or||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=Db(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let s=(!r.parentOffset&&o.index(){let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(gc(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&au(r);return o==null?!1:(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)};function FF(t){return(e,n)=>{let{$from:r,$to:o}=e.selection;if(e.selection instanceof Le&&e.selection.node.isBlock)return!r.parentOffset||!gc(e.doc,r.pos)?!1:(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.parent.isBlock)return!1;if(n){let i=o.parentOffset==o.parent.content.size,s=e.tr;(e.selection instanceof Ie||e.selection instanceof or)&&s.deleteSelection();let l=r.depth==0?null:Db(r.node(-1).contentMatchAt(r.indexAfter(-1))),a=t&&t(o.parent,i),u=a?[a]:i&&l?[{type:l}]:void 0,c=gc(s.doc,s.mapping.map(r.pos),1,u);if(!u&&!c&&gc(s.doc,s.mapping.map(r.pos),1,l?[{type:l}]:void 0)&&(l&&(u=[{type:l}]),c=!0),c&&(s.split(s.mapping.map(r.pos),1,u),!i&&!r.parentOffset&&r.parent.type!=l)){let d=s.mapping.map(r.before()),h=s.doc.resolve(d);l&&r.node(-1).canReplaceWith(h.index(),h.index()+1,l)&&s.setNodeMarkup(s.mapping.map(r.before()),l)}n(s.scrollIntoView())}return!0}}const BF=FF(),HF=(t,e)=>{let{$from:n,to:r}=t.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),e&&e(t.tr.setSelection(Le.create(t.doc,o))),!0)},UF=(t,e)=>(e&&e(t.tr.setSelection(new or(t.doc))),!0);function WF(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,i=e.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(o.isTextblock||zh(t.doc,e.pos))?!1:(n&&n(t.tr.clearIncompatible(e.pos,r.type,r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()),!0)}function J2(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,i,s;if(r.type.spec.isolating||o.type.spec.isolating)return!1;if(WF(t,e,n))return!0;let l=e.parent.canReplace(e.index(),e.index()+1);if(l&&(i=(s=r.contentMatchAt(r.childCount)).findWrapping(o.type))&&s.matchType(i[0]||o.type).validEnd){if(n){let d=e.pos+o.nodeSize,h=Q.empty;for(let g=i.length-1;g>=0;g--)h=Q.from(i[g].create(null,h));h=Q.from(r.copy(h));let f=t.tr.step(new qt(e.pos-1,d,e.pos,d,new ae(h,1,0),i.length,!0)),p=d+2*i.length;zh(f.doc,p)&&f.join(p),n(f.scrollIntoView())}return!0}let a=Ue.findFrom(e,1),u=a&&a.$from.blockRange(a.$to),c=u&&au(u);if(c!=null&&c>=e.depth)return n&&n(t.tr.lift(u,c).scrollIntoView()),!0;if(l&&Dc(o,"start",!0)&&Dc(r,"end")){let d=r,h=[];for(;h.push(d),!d.isTextblock;)d=d.lastChild;let f=o,p=1;for(;!f.isTextblock;f=f.firstChild)p++;if(d.canReplace(d.childCount,d.childCount,f.content)){if(n){let g=Q.empty;for(let v=h.length-1;v>=0;v--)g=Q.from(h[v].copy(g));let m=t.tr.step(new qt(e.pos-h.length,e.pos+o.nodeSize,e.pos+p,e.pos+o.nodeSize-p,new ae(g,h.length,0),0,!0));n(m.scrollIntoView())}return!0}}return!1}function eM(t){return function(e,n){let r=e.selection,o=t<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(e.tr.setSelection(Ie.create(e.doc,t<0?o.start(i):o.end(i)))),!0):!1}}const VF=eM(-1),jF=eM(1);function GF(t,e,n){for(let r=0;r{if(s)return!1;s=l.inlineContent&&l.type.allowsMarkType(n)}),s)return!0}return!1}function KF(t,e=null){return function(n,r){let{empty:o,$cursor:i,ranges:s}=n.selection;if(o&&!i||!GF(n.doc,s,t))return!1;if(r)if(i)t.isInSet(n.storedMarks||i.marks())?r(n.tr.removeStoredMark(t)):r(n.tr.addStoredMark(t.create(e)));else{let l=!1,a=n.tr;for(let u=0;!l&&u",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},XF=typeof navigator<"u"&&/Mac/.test(navigator.platform),qF=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Ln=0;Ln<10;Ln++)Us[48+Ln]=Us[96+Ln]=String(Ln);for(var Ln=1;Ln<=24;Ln++)Us[Ln+111]="F"+Ln;for(var Ln=65;Ln<=90;Ln++)Us[Ln]=String.fromCharCode(Ln+32),eg[Ln]=String.fromCharCode(Ln);for(var a1 in Us)eg.hasOwnProperty(a1)||(eg[a1]=Us[a1]);function ZF(t){var e=XF&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||qF&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?eg:Us)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const QF=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function JF(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,o,i,s;for(let l=0;l127)&&(i=Us[r.keyCode])&&i!=o){let l=e[l1(i,r)];if(l&&l(n.state,n.dispatch,n))return!0}}return!1}}function tB(t){const e=Ka(t,(i,s)=>(s.priority??dt.Low)-(i.priority??dt.Low)),n=[],r=[];for(const i of e)lB(i)?n.push(i):r.push(i);let o;return new gi({key:nB,view:i=>(o=i,{}),props:{transformPasted:i=>{var s,l,a;const u=o.state.selection.$from,c=u.node().type.name,d=new Set(u.marks().map(h=>h.type.name));for(const h of n){if((s=h.ignoredNodes)!=null&&s.includes(c)||(l=h.ignoredMarks)!=null&&l.some(y=>d.has(y)))continue;const f=((a=i.content.firstChild)==null?void 0:a.textContent)??"",p=!o.state.selection.empty&&i.content.childCount===1&&f,g=su(f,h.regexp)[0];if(p&&g&&h.type==="mark"&&h.replaceSelection){const{from:y,to:b}=o.state.selection,w=o.state.doc.slice(y,b),k=w.content.textBetween(0,w.content.size);if(typeof h.replaceSelection!="boolean"?h.replaceSelection(k):h.replaceSelection){const x=[],{getAttributes:S,markType:T}=h,C=tt(S)?S(g,!0):S,O=T.create(C);return w.content.forEach(_=>{if(_.isText){const R=O.addToSet(_.marks);x.push(_.mark(R))}}),ae.maxOpen(Q.fromArray(x))}}const{nodes:m,transformed:v}=sB(i.content,h,o.state.schema);v&&(i=h.type==="node"&&h.nodeType.isBlock?new ae(Q.fromArray(m),0,0):new ae(Q.fromArray(m),i.openStart,i.openEnd))}return hB(i)},handleDOMEvents:{paste:(i,s)=>{var l,a;const u=s;if(!((a=(l=i.props).editable)!=null&&a.call(l,i.state)))return!1;const{clipboardData:c}=u;if(!c)return!1;const d=[...c.items].map(f=>f.getAsFile()).filter(f=>!!f);if(d.length===0)return!1;const{selection:h}=i.state;for(const{fileHandler:f,regexp:p}of r){const g=p?d.filter(m=>p.test(m.type)):d;if(g.length!==0&&f({event:u,files:g,selection:h,view:i,type:"paste"}))return u.preventDefault(),!0}return!1},drop:(i,s)=>{var l,a,u;const c=s;if(!((a=(l=i.props).editable)!=null&&a.call(l,i.state)))return!1;const{dataTransfer:d,clientX:h,clientY:f}=c;if(!d)return!1;const p=dB(c);if(p.length===0)return!1;const g=((u=i.posAtCoords({left:h,top:f}))==null?void 0:u.pos)??i.state.selection.anchor;for(const{fileHandler:m,regexp:v}of r){const y=v?p.filter(b=>v.test(b.type)):p;if(y.length!==0&&m({event:c,files:y,pos:g,view:i,type:"drop"}))return c.preventDefault(),!0}return!1}}}})}var nB=new gl("pasteRule");function c1(t,e){return function n(r){const{fragment:o,rule:i,nodes:s}=r,{regexp:l,ignoreWhitespace:a,ignoredMarks:u,ignoredNodes:c}=i;let d=!1;return o.forEach(h=>{if(c!=null&&c.includes(h.type.name)||cB(h)){s.push(h);return}if(!h.isText){const g=n({fragment:h.content,rule:i,nodes:[]});d||(d=g.transformed);const m=Q.fromArray(g.nodes);h.type.validContent(m)?s.push(h.copy(m)):s.push(...g.nodes);return}if(h.marks.some(g=>uB(g)||(u==null?void 0:u.includes(g.type.name)))){s.push(h);return}const f=h.text??"";let p=0;for(const g of su(f,l)){const m=g[1],v=g[0];if(a&&(m==null?void 0:m.trim())===""||!v)return;const y=g.index,b=y+v.length;y>p&&s.push(h.cut(p,y));let w=h.cut(y,b);if(v&&m){const k=v.search(/\S/),x=y+v.indexOf(m),S=x+m.length;k&&s.push(h.cut(y,y+k)),w=h.cut(x,S)}t({nodes:s,rule:i,textNode:w,match:g,schema:e}),d=!0,p=b}f&&p0?[...r.files]:(n=r.items)!=null&&n.length?[...r.items].map(o=>o.getAsFile()).filter(o=>!!o):[]:[]}function hB(t){const e=ae.maxOpen(t.content);return e.openStart({events:{},emit(t,...e){(this.events[t]||[]).forEach(n=>n(...e))},on(t,e){return(this.events[t]=this.events[t]||[]).push(e),()=>this.events[t]=(this.events[t]||[]).filter(n=>n!==e)}});var fB=Object.defineProperty,pB=Object.getOwnPropertyDescriptor,me=(t,e,n,r)=>{for(var o=r>1?void 0:r?pB(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&fB(e,n,o),o},nM=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},le=(t,e,n)=>(nM(t,e,"read from private field"),n?n.call(t):e.get(t)),Qt=(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)},mn=(t,e,n,r)=>(nM(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);function gB(t,e){return t===e}function mC(t){const{previousOptions:e,update:n,equals:r=gB}=t,o=Oa({...e,...n}),i=be(),s=Bd(e);for(const a of s){const u=e[a],c=o[a];if(r(u,c)){i[a]={changed:!1};continue}i[a]={changed:!0,previousValue:u,value:c}}const l=a=>{const u=be();for(const c of a){const d=i[c];d!=null&&d.changed&&(u[c]=d.value)}return u};return{changes:Oa(i),options:o,pickChanged:l}}var mB={[re.DUPLICATE_HELPER_NAMES]:"helper method",[re.DUPLICATE_COMMAND_NAMES]:"command method"};function rM(t){const{name:e,set:n,code:r}=t,o=mB[r];we(!n.has(e),{code:r,message:`There is a naming conflict for the name: ${e} used in this '${o}'. Please rename or remove from the editor to avoid runtime errors.`}),n.add(e)}function Pc(...t){return Mc(MF(...t).split(" ")).join(" ")}var vC="__IGNORE__",vB="__ALL__",uu=class{constructor(t,...[e]){this["~O"]={},this._mappedHandlers=be(),this.populateMappedHandlers(),this._options=this._initialOptions=dR(t,this.constructor.defaultOptions,e??be(),this.createDefaultHandlerOptions()),this._dynamicKeys=this.getDynamicKeys(),this.init()}get options(){return this._options}get dynamicKeys(){return this._dynamicKeys}get initialOptions(){return this._initialOptions}init(){}getDynamicKeys(){const t=[],{customHandlerKeys:e,handlerKeys:n,staticKeys:r}=this.constructor;for(const o of Bd(this._options))r.includes(o)||n.includes(o)||e.includes(o)||t.push(o);return t}ensureAllKeysAreDynamic(t){}setOptions(t){var e;const n=this.getDynamicOptions();this.ensureAllKeysAreDynamic(t);const{changes:r,options:o,pickChanged:i}=mC({previousOptions:n,update:t});this.updateDynamicOptions(o),(e=this.onSetOptions)==null||e.call(this,{reason:"set",changes:r,options:o,pickChanged:i,initialOptions:this._initialOptions})}resetOptions(){var t;const e=this.getDynamicOptions(),{changes:n,options:r,pickChanged:o}=mC({previousOptions:e,update:this._initialOptions});this.updateDynamicOptions(r),(t=this.onSetOptions)==null||t.call(this,{reason:"reset",options:r,changes:n,pickChanged:o,initialOptions:this._initialOptions})}getDynamicOptions(){return ub(this._options,[...this.constructor.customHandlerKeys,...this.constructor.handlerKeys])}updateDynamicOptions(t){this._options={...this._options,...t}}populateMappedHandlers(){for(const t of this.constructor.handlerKeys)this._mappedHandlers[t]=[]}createDefaultHandlerOptions(){const t=be();for(const e of this.constructor.handlerKeys)t[e]=(...n)=>{var r;const{handlerKeyOptions:o}=this.constructor,i=(r=o[e])==null?void 0:r.reducer;let s=i==null?void 0:i.getDefault(...n);for(const[,l]of this._mappedHandlers[e]){const a=l(...n);if(s=i?i.accumulator(s,a,...n):a,yB(o,s,e))return s}return s};return t}addHandler(t,e,n=dt.Default){return this._mappedHandlers[t].push([n,e]),this.sortHandlers(t),()=>this._mappedHandlers[t]=this._mappedHandlers[t].filter(([,r])=>r!==e)}hasHandlers(t){return(this._mappedHandlers[t]??[]).length>0}sortHandlers(t){this._mappedHandlers[t]=Ka(this._mappedHandlers[t],([e],[n])=>n-e)}addCustomHandler(t,e){var n;return((n=this.onAddCustomHandler)==null?void 0:n.call(this,{[t]:e}))??uR}};uu.defaultOptions={};uu.staticKeys=[];uu.handlerKeys=[];uu.handlerKeyOptions={};uu.customHandlerKeys=[];function yB(t,e,n){const{[vB]:r}=t,o=t[n];return!r&&!o?!1:!!(o&&o.earlyReturnValue!==vC&&(tt(o.earlyReturnValue)?o.earlyReturnValue(e)===!0:e===o.earlyReturnValue)||r&&r.earlyReturnValue!==vC&&(tt(r.earlyReturnValue)?r.earlyReturnValue(e)===!0:e===r.earlyReturnValue))}var ym=class extends uu{constructor(...t){super(bB,...t),this["~E"]={},this._extensions=hb(this.createExtensions(),e=>e.constructor),this.extensionMap=new Map;for(const e of this._extensions)this.extensionMap.set(e.constructor,e)}get priority(){return this.priorityOverride??this.options.priority??this.constructor.defaultPriority}get constructorName(){return`${nR(this.name)}Extension`}get store(){return we(this._store,{code:re.MANAGER_PHASE_ERROR,message:"An error occurred while attempting to access the 'extension.store' when the Manager has not yet set created the lifecycle methods."}),Oa(this._store,{requireKeys:!0})}get extensions(){return this._extensions}replaceChildExtension(t,e){this.extensionMap.has(t)&&(this.extensionMap.set(t,e),this._extensions=this.extensions.map(n=>e.constructor===t?e:n))}createExtensions(){return[]}getExtension(t){const e=this.extensionMap.get(t);return we(e,{code:re.INVALID_GET_EXTENSION,message:`'${t.name}' does not exist within the preset: '${this.name}'`}),e}isOfType(t){return this.constructor===t}setStore(t){this._store||(this._store=t)}clone(...t){return new this.constructor(...t)}setPriority(t){this.priorityOverride=t}};ym.defaultPriority=dt.Default;var yt=class extends ym{static get[Bi](){return bn.PlainExtensionConstructor}get[Bi](){return bn.PlainExtension}},ea=class extends ym{static get[Bi](){return bn.MarkExtensionConstructor}get[Bi](){return bn.MarkExtension}get type(){return Ot(this.store.schema.marks,this.name)}constructor(...t){super(...t)}};ea.disableExtraAttributes=!1;var Pn=class extends ym{static get[Bi](){return bn.NodeExtensionConstructor}get[Bi](){return bn.NodeExtension}get type(){return Ot(this.store.schema.nodes,this.name)}constructor(...t){super(...t)}};Pn.disableExtraAttributes=!1;var bB={priority:void 0,extraAttributes:{},disableExtraAttributes:!1,exclude:{}};function oM(t){return lu(t)&&cu(t,[bn.PlainExtension,bn.MarkExtension,bn.NodeExtension])}function wB(t){return lu(t)&&cu(t,[bn.PlainExtensionConstructor,bn.MarkExtensionConstructor,bn.NodeExtensionConstructor])}function iM(t){return lu(t)&&cu(t,bn.PlainExtension)}function Vh(t){return lu(t)&&cu(t,bn.NodeExtension)}function bm(t){return lu(t)&&cu(t,bn.MarkExtension)}function Pe(t){return e=>{const{defaultOptions:n,customHandlerKeys:r,handlerKeys:o,staticKeys:i,defaultPriority:s,handlerKeyOptions:l,...a}=t,u=e;n&&(u.defaultOptions=n),s&&(u.defaultPriority=s),l&&(u.handlerKeyOptions=l),u.staticKeys=i??[],u.handlerKeys=o??[],u.customHandlerKeys=r??[];for(const[c,d]of Object.entries(a))u[c]||(u[c]=d);return u}}var xB=class extends yt{constructor(){super(...arguments),this.attributeList=[],this.attributeObject=be(),this.updateAttributes=(t=!0)=>{this.transformAttributes(),t&&this.store.commands.forceUpdate("attributes")}}get name(){return"attributes"}onCreate(){this.transformAttributes(),this.store.setExtensionStore("updateAttributes",this.updateAttributes)}transformAttributes(){var t,e,n;if(this.attributeObject=be(),(t=this.store.managerSettings.exclude)!=null&&t.attributes){this.store.setStoreKey("attributes",this.attributeObject);return}this.attributeList=[];for(const r of this.store.extensions){if((e=r.options.exclude)!=null&&e.attributes)continue;const o=(n=r.createAttributes)==null?void 0:n.call(r),i={...o,class:Pc(...r.classNames??[],o==null?void 0:o.class)};this.attributeList.unshift(i)}for(const r of this.attributeList)this.attributeObject={...this.attributeObject,...r,class:Pc(this.attributeObject.class,r.class)};this.store.setStoreKey("attributes",this.attributeObject)}};function bt(t={}){return(e,n,r)=>{(e.decoratedHelpers??(e.decoratedHelpers={}))[n]=t}}function de(t={}){return(e,n,r)=>{(e.decoratedCommands??(e.decoratedCommands={}))[n]=t}}function nn(t){return(e,n,r)=>{(e.decoratedKeybindings??(e.decoratedKeybindings={}))[n]=t}}var kB=class{constructor(t){this.promiseCreator=t,this.failureHandlers=[],this.successHandlers=[],this.validateHandlers=[],this.generateCommand=()=>e=>{let n=!0;const{view:r,tr:o,dispatch:i}=e;if(!r)return!1;for(const l of this.validateHandlers)if(!l({...e,dispatch:()=>{}})){n=!1;break}return!i||!n?n:(this.promiseCreator(e).then(l=>{this.runHandlers(this.successHandlers,{value:l,state:r.state,tr:r.state.tr,dispatch:r.dispatch,view:r})}).catch(l=>{this.runHandlers(this.failureHandlers,{error:l,state:r.state,tr:r.state.tr,dispatch:r.dispatch,view:r})}),i(o),!0)}}validate(t,e="push"){return this.validateHandlers[e](t),this}success(t,e="push"){return this.successHandlers[e](t),this}failure(t,e="push"){return this.failureHandlers[e](t),this}runHandlers(t,e){var n;for(const r of t)if(!r({...e,dispatch:()=>{}}))break;(n=e.dispatch)==null||n.call(e,e.tr)}};function Ws(t){const{type:e,attrs:n,range:r,selection:o}=t;return i=>{const{dispatch:s,tr:l,state:a}=i,u=ke(e)?a.schema.marks[e]:e;if(we(u,{code:re.SCHEMA,message:`Mark type: ${e} does not exist on the current schema.`}),r||o){const{from:c,to:d}=po(o??r??l.selection,l.doc);return Jp({trState:l,type:e,...r})?s==null||s(l.removeMark(c,d,u)):s==null||s(l.addMark(c,d,u.create(n))),!0}return Sd(KF(u,n))(i)}}function EB(t,e,n){for(const{$from:r,$to:o}of n){let i=r.depth===0?e.type.allowsMarkType(t):!1;if(e.nodesBetween(r.pos,o.pos,s=>{if(i)return!1;i=s.inlineContent&&s.type.allowsMarkType(t)}),i)return!0}return!1}function SB(t,e,n){return({tr:r,dispatch:o,state:i})=>{const s=po(n??r.selection,r.doc),l=iF(s),a=ke(t)?i.schema.marks[t]:t;if(we(a,{code:re.SCHEMA,message:`Mark type: ${t} does not exist on the current schema.`}),s.empty&&!l||!EB(a,r.doc,s.ranges))return!1;if(!o)return!0;if(l)return r.removeStoredMark(a),e&&r.addStoredMark(a.create(e)),o(r),!0;let u=!1;for(const{$from:c,$to:d}of s.ranges){if(u)break;u=r.doc.rangeHasMark(c.pos,d.pos,a)}for(const{$from:c,$to:d}of s.ranges)u&&r.removeMark(c.pos,d.pos,a),e&&r.addMark(c.pos,d.pos,a.create(e));return o(r),!0}}function CB(t,e={}){return({tr:n,dispatch:r,state:o})=>{const i=o.schema,s=n.selection,{from:l=s.from,to:a=l??s.to,marks:u={}}=e;if(!r)return!0;n.insertText(t,l,a);const c=Ot(n.steps,n.steps.length-1).getMap().map(a);for(const[d,h]of cn(u))n.addMark(l,c,Ot(i.marks,d).create(h));return r(n),!0}}var We=class extends yt{constructor(){super(...arguments),this.decorated=new Map,this.forceUpdateTransaction=(t,...e)=>{const{forcedUpdates:n}=this.getCommandMeta(t);return this.setCommandMeta(t,{forcedUpdates:Mc([...n,...e])}),t}}get name(){return"commands"}get transaction(){const t=this.store.getState();this._transaction||(this._transaction=t.tr);const e=this._transaction.before.eq(t.doc),n=!Bs(this._transaction.steps);if(!e){const r=t.tr;if(n)for(const o of this._transaction.steps)r.step(o);this._transaction=r}return this._transaction}onCreate(){this.store.setStoreKey("getForcedUpdates",this.getForcedUpdates.bind(this))}onView(t){var e;const{extensions:n,helpers:r}=this.store,o=be(),i=new Set;let s=be();const l=u=>{var c;const d=be(),h=()=>u??this.transaction;let f=[];const p=()=>f;for(const[m,v]of Object.entries(o))(c=s[m])!=null&&c.disableChaining||(d[m]=this.chainedFactory({chain:d,command:v.original,getTr:h,getChain:p}));const g=m=>{we(m===h(),{message:"Chaining currently only supports `CommandFunction` methods which do not use the `state.tr` property. Instead you should use the provided `tr` property."})};return d.run=(m={})=>{const v=f;f=[];for(const y of v)if(!y(g)&&m.exitEarly)return;t.dispatch(h())},d.tr=()=>{const m=f;f=[];for(const v of m)v(g);return h()},d.enabled=()=>{for(const m of f)if(!m())return!1;return!0},d.new=m=>l(m),d};for(const u of n){const c=((e=u.createCommands)==null?void 0:e.call(u))??{},d=u.decoratedCommands??{},h={};s={...s,decoratedCommands:d};for(const[f,p]of Object.entries(d)){const g=ke(p.shortcut)&&p.shortcut.startsWith("_|")?{shortcut:r.getNamedShortcut(p.shortcut,u.options)}:void 0;this.updateDecorated(f,{...p,name:u.name,...g}),c[f]=u[f].bind(u),p.active&&(h[f]=()=>{var m;return((m=p.active)==null?void 0:m.call(p,u.options,this.store))??!1})}Pp(c)||this.addCommands({active:h,names:i,commands:o,extensionCommands:c})}const a=l();for(const[u,c]of Object.entries(a))l[u]=c;this.store.setStoreKey("commands",o),this.store.setStoreKey("chain",l),this.store.setExtensionStore("commands",o),this.store.setExtensionStore("chain",l)}onStateUpdate({state:t}){this._transaction=t.tr}createPlugin(){return{}}customDispatch(t){return t}insertText(t,e={}){return ke(t)?CB(t,e):this.store.createPlaceholderCommand({promise:t,placeholder:{type:"inline"},onSuccess:(n,r,o)=>this.insertText(n,{...e,...r})(o)}).generateCommand()}selectText(t,e={}){return({tr:n,dispatch:r})=>{const o=po(t,n.doc);return n.selection.anchor===o.anchor&&n.selection.head===o.head&&!e.forceUpdate?!1:(r==null||r(n.setSelection(o)),!0)}}selectMark(t){return e=>{const{tr:n}=e,r=Hi(n.selection.$from,t);return r?this.store.commands.selectText.original({from:r.from,to:r.to})(e):!1}}delete(t){return({tr:e,dispatch:n})=>{const{from:r,to:o}=t??e.selection;return n==null||n(e.delete(r,o)),!0}}emptyUpdate(t){return({tr:e,dispatch:n})=>(n&&(t==null||t(),n(e)),!0)}forceUpdate(...t){return({tr:e,dispatch:n})=>(n==null||n(this.forceUpdateTransaction(e,...t)),!0)}updateNodeAttributes(t,e){return({tr:n,dispatch:r})=>(r==null||r(n.setNodeMarkup(t,void 0,e)),!0)}setContent(t,e){return n=>{const{tr:r,dispatch:o}=n,i=this.store.manager.createState({content:t,selection:e});return i?(o==null||o(r.replaceRangeWith(0,r.doc.nodeSize-2,i.doc)),!0):!1}}resetContent(){return t=>{const{tr:e,dispatch:n}=t,r=this.store.manager.createEmptyDoc();return r?this.setContent(r)(t):(n==null||n(e.delete(0,e.doc.nodeSize)),!0)}}emptySelection(){return({tr:t,dispatch:e})=>t.selection.empty?!1:(e==null||e(t.setSelection(Ie.near(t.selection.$anchor))),!0)}insertNewLine(){return({dispatch:t,tr:e})=>Js(e.selection)?(t==null||t(e.insertText(` +`)),!0):!1}insertNode(t,e={}){return({dispatch:n,tr:r,state:o})=>{var i;const{attrs:s,range:l,selection:a,replaceEmptyParentBlock:u=!1}=e,{from:c,to:d,$from:h}=po(a??l??r.selection,r.doc);if(Uh(t)||Xz(t)){const v=h.before(h.depth);return n==null||n(u&&c===d&&fm(h.parent)?r.replaceWith(v,v+h.parent.nodeSize,t):r.replaceWith(c,d,t)),!0}const f=ke(t)?o.schema.nodes[t]:t;we(f,{code:re.SCHEMA,message:`The requested node type ${t} does not exist in the schema.`});const p=(i=e.marks)==null?void 0:i.map(v=>{if(v instanceof Ke)return v;const y=ke(v)?o.schema.marks[v]:v;return we(y,{code:re.SCHEMA,message:`The requested mark type ${v} does not exist in the schema.`}),y.create()}),g=f.createAndFill(s,ke(e.content)?o.schema.text(e.content):e.content,p);if(!g)return!1;const m=c!==d;return n==null||n(m?r.replaceRangeWith(c,d,g):r.insert(c,g)),!0}}focus(t){return e=>{const{dispatch:n,tr:r}=e,{view:o}=this.store;if(t===!1||o.hasFocus()&&(t===void 0||t===!0))return!1;if(t===void 0||t===!0){const{from:i=0,to:s=i}=r.selection;t={from:i,to:s}}return n&&this.delayedFocus(),this.selectText(t)(e)}}blur(t){return e=>{const{view:n}=this.store;return n.hasFocus()?(requestAnimationFrame(()=>{n.dom.blur()}),t?this.selectText(t)(e):!0):!1}}setBlockNodeType(t,e,n,r=!0){return Gd(t,e,n,r)}toggleWrappingNode(t,e,n){return W2(t,e,n)}toggleBlockNodeItem(t){return $b(t)}wrapInNode(t,e,n){return U2(t,e,n)}applyMark(t,e,n){return SB(t,e,n)}toggleMark(t){return Ws(t)}removeMark(t){return j2(t)}setMeta(t,e){return({tr:n})=>(n.setMeta(t,e),!0)}selectAll(){return this.selectText("all")}copy(){return t=>t.tr.selection.empty?!1:(t.dispatch&&document.execCommand("copy"),!0)}paste(){return this.store.createPlaceholderCommand({promise:async()=>{var t;return(t=navigator.clipboard)!=null&&t.readText?await navigator.clipboard.readText():""},placeholder:{type:"inline"},onSuccess:(t,e,n)=>this.insertNode(O0({content:t,schema:n.state.schema}),{selection:e})(n)}).generateCommand()}cut(){return t=>t.tr.selection.empty?!1:(t.dispatch&&document.execCommand("cut"),!0)}replaceText(t){return kF(t)}getAllCommandOptions(){const t={};for(const[e,n]of this.decorated)Pp(n)||(t[e]=n);return t}getCommandOptions(t){return this.decorated.get(t)}getCommandProp(){return{tr:this.transaction,dispatch:this.store.view.dispatch,state:this.store.view.state,view:this.store.view}}updateDecorated(t,e){if(!e){this.decorated.delete(t);return}const n=this.decorated.get(t)??{name:""};this.decorated.set(t,{...n,...e})}handleIosFocus(){Br.isIos&&this.store.view.dom.focus()}delayedFocus(){this.handleIosFocus(),requestAnimationFrame(()=>{this.store.view.focus(),this.store.view.dispatch(this.transaction.scrollIntoView())})}getForcedUpdates(t){return this.getCommandMeta(t).forcedUpdates}getCommandMeta(t){const e=t.getMeta(this.pluginKey)??{};return{...TB,...e}}setCommandMeta(t,e){const n=this.getCommandMeta(t);t.setMeta(this.pluginKey,{...n,...e})}addCommands(t){const{extensionCommands:e,commands:n,names:r,active:o}=t;for(const[i,s]of cn(e))rM({name:i,set:r,code:re.DUPLICATE_COMMAND_NAMES}),we(!AB.has(i),{code:re.DUPLICATE_COMMAND_NAMES,message:"The command name you chose is forbidden."}),n[i]=this.createUnchainedCommand(s,o[i])}unchainedFactory(t){return(...e)=>{const{shouldDispatch:n=!0,command:r}=t,{view:o}=this.store,{state:i}=o;let s;return n&&(s=o.dispatch),r(...e)({state:i,dispatch:s,view:o,tr:i.tr})}}createUnchainedCommand(t,e){const n=this.unchainedFactory({command:t});return n.enabled=this.unchainedFactory({command:t,shouldDispatch:!1}),n.isEnabled=n.enabled,n.original=t,n.active=e,n}chainedFactory(t){return(...e)=>{const{chain:n,command:r,getTr:o,getChain:i}=t,s=i(),{view:l}=this.store,{state:a}=l;return s.push(u=>r(...e)({state:a,dispatch:u,view:l,tr:o()})),n}}};me([de()],We.prototype,"customDispatch",1);me([de()],We.prototype,"insertText",1);me([de()],We.prototype,"selectText",1);me([de()],We.prototype,"selectMark",1);me([de()],We.prototype,"delete",1);me([de()],We.prototype,"emptyUpdate",1);me([de()],We.prototype,"forceUpdate",1);me([de()],We.prototype,"updateNodeAttributes",1);me([de()],We.prototype,"setContent",1);me([de()],We.prototype,"resetContent",1);me([de()],We.prototype,"emptySelection",1);me([de()],We.prototype,"insertNewLine",1);me([de()],We.prototype,"insertNode",1);me([de()],We.prototype,"focus",1);me([de()],We.prototype,"blur",1);me([de()],We.prototype,"setBlockNodeType",1);me([de()],We.prototype,"toggleWrappingNode",1);me([de()],We.prototype,"toggleBlockNodeItem",1);me([de()],We.prototype,"wrapInNode",1);me([de()],We.prototype,"applyMark",1);me([de()],We.prototype,"toggleMark",1);me([de()],We.prototype,"removeMark",1);me([de()],We.prototype,"setMeta",1);me([de({description:({t})=>t(Hs.SELECT_ALL_DESCRIPTION),label:({t})=>t(Hs.SELECT_ALL_LABEL),shortcut:oe.SelectAll})],We.prototype,"selectAll",1);me([de({description:({t})=>t(Hs.COPY_DESCRIPTION),label:({t})=>t(Hs.COPY_LABEL),shortcut:oe.Copy,icon:"fileCopyLine"})],We.prototype,"copy",1);me([de({description:({t})=>t(Hs.PASTE_DESCRIPTION),label:({t})=>t(Hs.PASTE_LABEL),shortcut:oe.Paste,icon:"clipboardLine"})],We.prototype,"paste",1);me([de({description:({t})=>t(Hs.CUT_DESCRIPTION),label:({t})=>t(Hs.CUT_LABEL),shortcut:oe.Cut,icon:"scissorsFill"})],We.prototype,"cut",1);me([de()],We.prototype,"replaceText",1);me([bt()],We.prototype,"getAllCommandOptions",1);me([bt()],We.prototype,"getCommandOptions",1);me([bt()],We.prototype,"getCommandProp",1);We=me([Pe({defaultPriority:dt.Highest,defaultOptions:{trackerClassName:"remirror-tracker-position",trackerNodeName:"span"},staticKeys:["trackerClassName","trackerNodeName"]})],We);var TB={forcedUpdates:[]},AB=new Set(["run","chain","original","raw","enabled","tr","new"]),Uo=class extends yt{constructor(){super(...arguments),this.placeholders=je.empty,this.placeholderWidgets=new Map,this.createPlaceholderCommand=t=>{const e=Rc(),{promise:n,placeholder:r,onFailure:o,onSuccess:i}=t;return new kB(n).validate(s=>this.addPlaceholder(e,r)(s)).success(s=>{const{state:l,tr:a,dispatch:u,view:c,value:d}=s,h=this.store.helpers.findPlaceholder(e);if(!h){const f=new Error("The placeholder has been removed");return(o==null?void 0:o({error:f,state:l,tr:a,dispatch:u,view:c}))??!1}return this.removePlaceholder(e)({state:l,tr:a,view:c,dispatch:()=>{}}),i(d,h,{state:l,tr:a,dispatch:u,view:c})}).failure(s=>(this.removePlaceholder(e)({...s,dispatch:()=>{}}),(o==null?void 0:o(s))??!1))}}get name(){return"decorations"}onCreate(){this.store.setExtensionStore("createPlaceholderCommand",this.createPlaceholderCommand)}createPlugin(){return{state:{init:()=>{},apply:t=>{var e,n,r,o,i,s;const{added:l,clearTrackers:a,removed:u,updated:c}=this.getMeta(t);if(a){this.placeholders=je.empty;for(const[,d]of this.placeholderWidgets)(n=(e=d.spec).onDestroy)==null||n.call(e,this.store.view,d.spec.element);this.placeholderWidgets.clear();return}this.placeholders=this.placeholders.map(t.mapping,t.doc,{onRemove:d=>{var h,f;const p=this.placeholderWidgets.get(d.id);p&&((f=(h=p.spec).onDestroy)==null||f.call(h,this.store.view,p.spec.element))}});for(const[,d]of this.placeholderWidgets)(o=(r=d.spec).onUpdate)==null||o.call(r,this.store.view,d.from,d.spec.element,d.spec.data);for(const d of l){if(d.type==="inline"){this.addInlinePlaceholder(d,t);continue}if(d.type==="node"){this.addNodePlaceholder(d,t);continue}if(d.type==="widget"){this.addWidgetPlaceholder(d,t);continue}}for(const{id:d,data:h}of c){const f=this.placeholderWidgets.get(d);if(!f)continue;const p=kt.widget(f.from,f.spec.element,{...f.spec,data:h});this.placeholders=this.placeholders.remove([f]).add(t.doc,[p]),this.placeholderWidgets.set(d,p)}for(const d of u){const h=this.placeholders.find(void 0,void 0,p=>p.id===d&&p.__type===Nl),f=this.placeholderWidgets.get(d);f&&((s=(i=f.spec).onDestroy)==null||s.call(i,this.store.view,f.spec.element)),this.placeholders=this.placeholders.remove(h),this.placeholderWidgets.delete(d)}}},props:{decorations:t=>{let e=this.options.decorations(t);e=e.add(t.doc,this.placeholders.find());for(const n of this.store.extensions){if(!n.createDecorations)continue;const r=n.createDecorations(t).find();e=e.add(t.doc,r)}return e},handleDOMEvents:{blur:t=>(this.options.persistentSelectionClass&&t.dispatch(t.state.tr.setMeta(yC,!1)),!1),focus:t=>(this.options.persistentSelectionClass&&t.dispatch(t.state.tr.setMeta(yC,!0)),!1)}}}}updateDecorations(){return({tr:t,dispatch:e})=>(e==null||e(t),!0)}addPlaceholder(t,e,n){return({dispatch:r,tr:o})=>this.addPlaceholderTransaction(t,e,o,!r)?(r==null||r(n?o.deleteSelection():o),!0):!1}updatePlaceholder(t,e){return({dispatch:n,tr:r})=>this.updatePlaceholderTransaction({id:t,data:e,tr:r,checkOnly:!n})?(n==null||n(r),!0):!1}removePlaceholder(t){return({dispatch:e,tr:n})=>this.removePlaceholderTransaction({id:t,tr:n,checkOnly:!e})?(e==null||e(n),!0):!1}clearPlaceholders(){return({tr:t,dispatch:e})=>this.clearPlaceholdersTransaction({tr:t,checkOnly:!e})?(e==null||e(t),!0):!1}findPlaceholder(t){return this.findAllPlaceholders().get(t)}findAllPlaceholders(){const t=new Map,e=this.placeholders.find(void 0,void 0,n=>n.__type===Nl);for(const n of e)t.set(n.spec.id,{from:n.from,to:n.to});return t}createDecorations(t){var e,n,r;const{persistentSelectionClass:o}=this.options;return!o||(e=this.store.view)!=null&&e.hasFocus()||(r=(n=this.store.helpers).isInteracting)!=null&&r.call(n)?je.empty:RB(t,je.empty,{class:ke(o)?o:"selection"})}onApplyState(){}addWidgetPlaceholder(t,e){const{pos:n,createElement:r,onDestroy:o,onUpdate:i,className:s,nodeName:l,id:a,type:u}=t,c=(r==null?void 0:r(this.store.view,n))??document.createElement(l);c.classList.add(s);const d=kt.widget(n,c,{id:a,__type:Nl,type:u,element:c,onDestroy:o,onUpdate:i});this.placeholderWidgets.set(a,d),this.placeholders=this.placeholders.add(e.doc,[d])}addInlinePlaceholder(t,e){const{from:n=e.selection.from,to:r=e.selection.to,className:o,nodeName:i,id:s,type:l}=t;let a;if(n===r){const u=document.createElement(i);u.classList.add(o),a=kt.widget(n,u,{id:s,type:l,__type:Nl,widget:u})}else a=kt.inline(n,r,{nodeName:i,class:o},{id:s,__type:Nl});this.placeholders=this.placeholders.add(e.doc,[a])}addNodePlaceholder(t,e){const{pos:n,className:r,nodeName:o,id:i}=t,s=Yr(n)?e.doc.resolve(n):e.selection.$from,l=Yr(n)?s.nodeAfter?{pos:n,end:s.nodeAfter.nodeSize}:void 0:Fz(s);if(!l)return;const a=kt.node(l.pos,l.end,{nodeName:o,class:r},{id:i,__type:Nl});this.placeholders=this.placeholders.add(e.doc,[a])}withRequiredBase(t,e){const{placeholderNodeName:n,placeholderClassName:r}=this.options,{nodeName:o=n,className:i,...s}=e,l=(i?[r,i]:[r]).join(" ");return{nodeName:o,className:l,...s,id:t}}getMeta(t){const e=t.getMeta(this.pluginKey)??{};return{..._B,...e}}setMeta(t,e){const n=this.getMeta(t);t.setMeta(this.pluginKey,{...n,...e})}addPlaceholderTransaction(t,e,n,r=!1){if(this.findPlaceholder(t))return!1;if(r)return!0;const{added:i}=this.getMeta(n);return this.setMeta(n,{added:[...i,this.withRequiredBase(t,e)]}),!0}updatePlaceholderTransaction(t){const{id:e,tr:n,checkOnly:r=!1,data:o}=t;if(!this.findPlaceholder(e))return!1;if(r)return!0;const{updated:s}=this.getMeta(n);return this.setMeta(n,{updated:Mc([...s,{id:e,data:o}])}),!0}removePlaceholderTransaction(t){const{id:e,tr:n,checkOnly:r=!1}=t;if(!this.findPlaceholder(e))return!1;if(r)return!0;const{removed:i}=this.getMeta(n);return this.setMeta(n,{removed:Mc([...i,e])}),!0}clearPlaceholdersTransaction(t){const{tr:e,checkOnly:n=!1}=t;return this.getPluginState()===je.empty?!1:(n||this.setMeta(e,{clearTrackers:!0}),!0)}};me([de()],Uo.prototype,"updateDecorations",1);me([de()],Uo.prototype,"addPlaceholder",1);me([de()],Uo.prototype,"updatePlaceholder",1);me([de()],Uo.prototype,"removePlaceholder",1);me([de()],Uo.prototype,"clearPlaceholders",1);me([bt()],Uo.prototype,"findPlaceholder",1);me([bt()],Uo.prototype,"findAllPlaceholders",1);Uo=me([Pe({defaultOptions:{persistentSelectionClass:void 0,placeholderClassName:"placeholder",placeholderNodeName:"span"},staticKeys:["placeholderClassName","placeholderNodeName"],handlerKeys:["decorations"],handlerKeyOptions:{decorations:{reducer:{accumulator:(t,e,n)=>t.add(n.doc,e.find()),getDefault:()=>je.empty}}},defaultPriority:dt.Low})],Uo);var _B={added:[],updated:[],clearTrackers:!1,removed:[]},Nl="placeholderDecoration",yC="persistentSelectionFocus";function RB(t,e,n){const{selection:r,doc:o}=t;if(r.empty)return e;const{from:i,to:s}=r,l=Wh(r)?kt.node(i,s,n):kt.inline(i,s,n);return e.add(o,[l])}var L0=class extends yt{get name(){return"docChanged"}onStateUpdate(t){const{firstUpdate:e,transactions:n,tr:r}=t;e||(n??[r]).some(o=>o==null?void 0:o.docChanged)&&this.options.docChanged(t)}};L0=me([Pe({handlerKeys:["docChanged"],handlerKeyOptions:{docChanged:{earlyReturnValue:!1}},defaultPriority:dt.Lowest})],L0);var go=class extends yt{get name(){return"helpers"}onCreate(){var t;this.store.setStringHandler("text",this.textToProsemirrorNode.bind(this)),this.store.setStringHandler("html",O0);const e=be(),n=be(),r=be(),o=new Set;for(const i of this.store.extensions){Vh(i)&&(n[i.name]=l=>I2({state:this.store.getState(),type:i.type,attrs:l}),r[i.name]=l=>{var a;return(a=jd({state:this.store.getState(),type:i.type,attrs:l}))==null?void 0:a.node.attrs}),bm(i)&&(n[i.name]=l=>Jp({trState:this.store.getState(),type:i.type,attrs:l}),r[i.name]=l=>{const a=Hi(this.store.getState().selection.$from,i.type);if(!a||!l)return a==null?void 0:a.mark.attrs;if(Ib(a.mark,l))return a.mark.attrs});const s=((t=i.createHelpers)==null?void 0:t.call(i))??{};for(const l of Object.keys(i.decoratedHelpers??{}))s[l]=i[l].bind(i);if(!Pp(s))for(const[l,a]of cn(s))rM({name:l,set:o,code:re.DUPLICATE_HELPER_NAMES}),e[l]=a}this.store.setStoreKey("attrs",r),this.store.setStoreKey("active",n),this.store.setStoreKey("helpers",e),this.store.setExtensionStore("attrs",r),this.store.setExtensionStore("active",n),this.store.setExtensionStore("helpers",e)}isSelectionEmpty(t=this.store.getState()){return Ob(t)}isViewEditable(t=this.store.getState()){var e,n;return((n=(e=this.store.view.props).editable)==null?void 0:n.call(e,t))??!1}getStateJSON(t=this.store.getState()){return t.toJSON()}getJSON(t=this.store.getState()){return t.doc.toJSON()}getRemirrorJSON(t=this.store.getState()){return this.getJSON(t)}insertHtml(t,e){return n=>{const{state:r}=n,o=O0({content:t,schema:r.schema,fragment:!0});return this.store.commands.insertNode.original(o,e)(n)}}getText({lineBreakDivider:t=` -`,state:t=this.store.getState()}={}){return t.doc.textBetween(0,t.doc.content.size,e,$i)}getTextBetween(e,t,r=this.store.getState().doc){return r.textBetween(e,t,` +`,state:e=this.store.getState()}={}){return e.doc.textBetween(0,e.doc.content.size,t,ws)}getTextBetween(t,e,n=this.store.getState().doc){return n.textBetween(t,e,` -`,$i)}getHTML(e=this.store.getState()){return YP(e.doc,this.store.document)}textToProsemirrorNode(e){const t=`
${e.content}
`;return this.store.stringHandlers.html({...e,content:t})}};ee([qe()],Pn.prototype,"isSelectionEmpty",1);ee([qe()],Pn.prototype,"isViewEditable",1);ee([qe()],Pn.prototype,"getStateJSON",1);ee([qe()],Pn.prototype,"getJSON",1);ee([qe()],Pn.prototype,"getRemirrorJSON",1);ee([Z()],Pn.prototype,"insertHtml",1);ee([qe()],Pn.prototype,"getText",1);ee([qe()],Pn.prototype,"getTextBetween",1);ee([qe()],Pn.prototype,"getHTML",1);Pn=ee([ye({})],Pn);var d0=class extends Ye{get name(){return"inputRules"}onCreate(){this.store.setExtensionStore("rebuildInputRules",this.rebuildInputRules.bind(this))}createExternalPlugins(){return[this.generateInputRulesPlugin()]}generateInputRulesPlugin(){var e,t;const r=[],n=this.store.markTags[ie.ExcludeInputRules];for(const o of this.store.extensions)if(!((e=this.store.managerSettings.exclude)!=null&&e.inputRules||!o.createInputRules||(t=o.options.exclude)!=null&&t.inputRules))for(const i of o.createInputRules())i.shouldSkip=this.options.shouldSkipInputRule,i.invalidMarks=n,r.push(i);return cD({rules:r})}rebuildInputRules(){this.store.updateExtensionPlugins(this)}};d0=ee([ye({defaultPriority:Ue.Default,handlerKeys:["shouldSkipInputRule"],handlerKeyOptions:{shouldSkipInputRule:{earlyReturnValue:!0}}})],d0);var ro=class extends Ye{constructor(){super(...arguments),this.extraKeyBindings=[],this.backwardMarkExitTracker=new Map,this.keydownHandler=null,this.onAddCustomHandler=({keymap:e})=>{var t,r;if(e)return this.extraKeyBindings=[...this.extraKeyBindings,e],(r=(t=this.store).rebuildKeymap)==null||r.call(t),()=>{var n,o;this.extraKeyBindings=this.extraKeyBindings.filter(i=>i!==e),(o=(n=this.store).rebuildKeymap)==null||o.call(n)}},this.rebuildKeymap=()=>{this.setupKeydownHandler()}}get name(){return"keymap"}get shortcutMap(){const{shortcuts:e}=this.options;return oe(e)?h6[e]:e}onCreate(){this.store.setExtensionStore("rebuildKeymap",this.rebuildKeymap)}createExternalPlugins(){var e;return(e=this.store.managerSettings.exclude)!=null&&e.keymap?[]:(this.setupKeydownHandler(),[new Po({props:{handleKeyDown:(t,r)=>{var n;return(n=this.keydownHandler)==null?void 0:n.call(this,t,r)}}})])}setupKeydownHandler(){const e=this.generateKeymapBindings();this.keydownHandler=pv(e)}generateKeymapBindings(){var e;const t=[],r=this.shortcutMap,n=this.store.getExtension(xe),o=a=>l=>Xp({shortcut:l,map:r,store:this.store,options:a.options});for(const a of this.store.extensions){const l=a.decoratedKeybindings??{};if(!((e=a.options.exclude)!=null&&e.keymap)){a.createKeymap&&t.push(p6(a.createKeymap(o(a)),r));for(const[c,u]of Dt(l)){if(u.isActive&&!u.isActive(a.options,this.store))continue;const d=a[c].bind(a),p=Xp({shortcut:u.shortcut,map:r,options:a.options,store:this.store}),f=De(u.priority)?u.priority(a.options,this.store):u.priority??Ue.Low,h=te();for(const m of p)h[m]=d;t.push([f,h]),u.command&&n.updateDecorated(u.command,{shortcut:p})}}}const i=this.sortKeymaps([...this.extraKeyBindings,...t]);return TP(i)}arrowRightShortcut(e){const t=this.store.markTags[ie.PreventExits],r=this.store.nodeTags[ie.PreventExits];return this.exitMarkForwards(t,r)(e)}arrowLeftShortcut(e){const t=this.store.markTags[ie.PreventExits],r=this.store.nodeTags[ie.PreventExits];return Vf(this.exitNodeBackwards(r),this.exitMarkBackwards(t,r))(e)}backspace(e){const t=this.store.markTags[ie.PreventExits],r=this.store.nodeTags[ie.PreventExits];return Vf(this.exitNodeBackwards(r,!0),this.exitMarkBackwards(t,r,!0))(e)}createKeymap(){const{selectParentNodeOnEscape:e,undoInputRuleOnBackspace:t,excludeBaseKeymap:r}=this.options,n=te();if(!r)for(const[o,i]of Dt(Hg))n[o]=Ou(i);return t&&Hg.Backspace&&(n.Backspace=Ou(im(uD,Hg.Backspace))),e&&(n.Escape=Ou(xz)),[Ue.Low,n]}getNamedShortcut(e,t={}){return e.startsWith("_|")?Xp({shortcut:e,map:this.shortcutMap,store:this.store,options:t}):[e]}onSetOptions(e){var t,r;const{changes:n}=e;(n.excludeBaseKeymap.changed||n.selectParentNodeOnEscape.changed||n.undoInputRuleOnBackspace.changed)&&((r=(t=this.store).rebuildKeymap)==null||r.call(t))}sortKeymaps(e){return ia(e.map(t=>ft(t)?t:[Ue.Default,t]),(t,r)=>r[0]-t[0]).map(t=>t[1])}exitMarkForwards(e,t){return r=>{const{tr:n,dispatch:o}=r;if(!JP(n.selection)||Mo({selection:n.selection,types:t}))return!1;const a=n.selection.$from.marks().filter(l=>!e.includes(l.type.name));if(is(a))return!1;if(!o)return!0;for(const l of a)n.removeStoredMark(l);return o(n.insertText(" ",n.selection.from)),!0}}exitNodeBackwards(e,t=!1){return r=>{const{tr:n}=r;if(!(t?BS:c0)(n.selection))return!1;const i=n.selection.$anchor.node();return!rm(i)||DP(i)||e.includes(i.type.name)?!1:this.store.commands.toggleBlockNodeItem.original({type:i.type})(r)}}exitMarkBackwards(e,t,r=!1){return n=>{const{tr:o,dispatch:i}=n;if(!(r?BS:c0)(o.selection)||this.backwardMarkExitTracker.has(o.selection.anchor))return this.backwardMarkExitTracker.clear(),!1;if(Mo({selection:o.selection,types:t}))return!1;const l=[...o.storedMarks??[],...o.selection.$from.marks()].filter(c=>!e.includes(c.type.name));if(is(l))return!1;if(!i)return!0;for(const c of l)o.removeStoredMark(c);return this.backwardMarkExitTracker.set(o.selection.anchor,!0),i(o),!0}}};ee([Nt({shortcut:"ArrowRight",isActive:e=>e.exitMarksOnArrowPress})],ro.prototype,"arrowRightShortcut",1);ee([Nt({shortcut:"ArrowLeft",isActive:e=>e.exitMarksOnArrowPress})],ro.prototype,"arrowLeftShortcut",1);ee([Nt({shortcut:"Backspace",isActive:e=>e.exitMarksOnArrowPress})],ro.prototype,"backspace",1);ee([qe()],ro.prototype,"getNamedShortcut",1);ro=ee([ye({defaultPriority:Ue.Low,defaultOptions:{shortcuts:"default",undoInputRuleOnBackspace:!0,selectParentNodeOnEscape:!1,excludeBaseKeymap:!1,exitMarksOnArrowPress:!0},customHandlerKeys:["keymap"]})],ro);function d6(e){return wr(Wh(V),e)}function Xp({shortcut:e,map:t,options:r,store:n}){return oe(e)?[p0(e,t)]:ft(e)?e.map(o=>p0(o,t)):(e=e(r,n),Xp({shortcut:e,map:t,options:r,store:n}))}function p0(e,t){return d6(e)?t[e]:e}function p6(e,t){const r={};let n,o;ft(e)?[o,n]=e:n=e;for(const[i,s]of Dt(n))r[p0(i,t)]=s;return Kh(o)?r:[o,r]}var xA={[V.Copy]:"Mod-c",[V.Cut]:"Mod-x",[V.Paste]:"Mod-v",[V.PastePlain]:"Mod-Shift-v",[V.SelectAll]:"Mod-a",[V.Undo]:"Mod-z",[V.Redo]:ln.isMac?"Shift-Mod-z":"Mod-y",[V.Bold]:"Mod-b",[V.Italic]:"Mod-i",[V.Underline]:"Mod-u",[V.Strike]:"Mod-d",[V.Code]:"Mod-`",[V.Paragraph]:"Mod-Shift-0",[V.H1]:"Mod-Shift-1",[V.H2]:"Mod-Shift-2",[V.H3]:"Mod-Shift-3",[V.H4]:"Mod-Shift-4",[V.H5]:"Mod-Shift-5",[V.H6]:"Mod-Shift-6",[V.TaskList]:"Mod-Shift-7",[V.BulletList]:"Mod-Shift-8",[V.OrderedList]:"Mod-Shift-9",[V.Quote]:"Mod->",[V.Divider]:"Mod-Shift-|",[V.Codeblock]:"Mod-Shift-~",[V.ClearFormatting]:"Mod-Shift-C",[V.Superscript]:"Mod-.",[V.Subscript]:"Mod-,",[V.LeftAlignment]:"Mod-Shift-L",[V.CenterAlignment]:"Mod-Shift-E",[V.RightAlignment]:"Mod-Shift-R",[V.JustifyAlignment]:"Mod-Shift-J",[V.InsertLink]:"Mod-k",[V.Find]:"Mod-f",[V.FindBackwards]:"Mod-Shift-f",[V.FindReplace]:"Mod-Shift-H",[V.AddFootnote]:"Mod-Alt-f",[V.AddComment]:"Mod-Alt-m",[V.ContextMenu]:"Mod-Shift-\\",[V.IncreaseFontSize]:"Mod-Shift-.",[V.DecreaseFontSize]:"Mod-Shift-,",[V.IncreaseIndent]:"Tab",[V.DecreaseIndent]:"Shift-Tab",[V.Shortcuts]:"Mod-/",[V.Format]:ln.isMac?"Alt-Shift-f":"Shift-Ctrl-f"},f6={...xA,[V.Strike]:"Mod-Shift-S",[V.Code]:"Mod-Shift-M",[V.Paragraph]:"Mod-Alt-0",[V.H1]:"Mod-Alt-1",[V.H2]:"Mod-Alt-2",[V.H3]:"Mod-Alt-3",[V.H4]:"Mod-Alt-4",[V.H5]:"Mod-Alt-5",[V.H6]:"Mod-Alt-6",[V.OrderedList]:"Mod-Alt-7",[V.BulletList]:"Mod-Alt-8",[V.Quote]:"Mod-Alt-9",[V.ClearFormatting]:"Mod-\\",[V.IncreaseIndent]:"Mod-[",[V.DecreaseIndent]:"Mod-]"},h6={default:xA,googleDoc:f6},m6=class extends Ye{get name(){return"nodeViews"}createPlugin(){const e=[],t=te();for(const r of this.store.extensions){if(!r.createNodeViews)continue;const n=r.createNodeViews();e.unshift(De(n)?{[r.name]:n}:n)}e.unshift(this.store.managerSettings.nodeViews??{});for(const r of e)Object.assign(t,r);return{props:{nodeViews:t}}}},g6=class extends Ye{get name(){return"pasteRules"}createExternalPlugins(){return[this.generatePasteRulesPlugin()]}generatePasteRulesPlugin(){var e,t;const r=[];for(const n of this.store.extensions){if((e=this.store.managerSettings.exclude)!=null&&e.pasteRules||!n.createPasteRules||(t=n.options.exclude)!=null&&t.pasteRules)continue;const o=n.createPasteRules(),i=ft(o)?o:[o];r.push(...i)}return Pz(r)}},Wf=class extends Ye{constructor(){super(...arguments),this.plugins=[],this.managerPlugins=[],this.applyStateHandlers=[],this.initStateHandlers=[],this.appendTransactionHandlers=[],this.pluginKeys=te(),this.stateGetters=new Map,this.getPluginStateCreator=e=>t=>e.getState(t??this.store.getState()),this.getStateByName=e=>{const t=this.stateGetters.get(e);return re(t,{message:"No plugin exists for the requested extension name."}),t()}}get name(){return"plugins"}onCreate(){const{setStoreKey:e,setExtensionStore:t,managerSettings:r,extensions:n}=this.store;this.updateExtensionStore();const{plugins:o=[]}=r;this.updatePlugins(o,this.managerPlugins);for(const i of n)i.onApplyState&&this.applyStateHandlers.push(i.onApplyState.bind(i)),i.onInitState&&this.initStateHandlers.push(i.onInitState.bind(i)),i.onAppendTransaction&&this.appendTransactionHandlers.push(i.onAppendTransaction.bind(i)),this.extractExtensionPlugins(i);this.managerPlugins=o,this.store.setStoreKey("plugins",this.plugins),e("pluginKeys",this.pluginKeys),e("getPluginState",this.getStateByName),t("getPluginState",this.getStateByName)}createPlugin(){return{appendTransaction:(e,t,r)=>{const n=r.tr,o={previousState:t,tr:n,transactions:e,state:r};for(const i of this.appendTransactionHandlers)i(o);return this.options.appendTransaction(o),n.docChanged||n.steps.length>0||n.selectionSet||n.storedMarksSet?n:void 0},state:{init:(e,t)=>{for(const r of this.initStateHandlers)r(t)},apply:(e,t,r,n)=>{const o={previousState:r,state:n,tr:e};for(const i of this.applyStateHandlers)i(o);this.options.applyState(o)}}}}extractExtensionPlugins(e){var t,r;if(!(!e.createPlugin&&!e.createExternalPlugins||(t=this.store.managerSettings.exclude)!=null&&t.plugins||(r=e.options.exclude)!=null&&r.plugins)){if(e.createPlugin){const o=new Ca(e.name);this.pluginKeys[e.name]=o;const i=this.getPluginStateCreator(o);e.pluginKey=o,e.getPluginState=i,this.stateGetters.set(e.name,i),this.stateGetters.set(e.constructor,i);const s={...e.createPlugin(),key:o},a=new Po(s);this.updatePlugins([a],e.plugin?[e.plugin]:void 0),e.plugin=a}if(e.createExternalPlugins){const o=e.createExternalPlugins();this.updatePlugins(o,e.externalPlugins),e.externalPlugins=o}}}updatePlugins(e,t){if(!t||is(t)){this.plugins=[...this.plugins,...e];return}if(e.length!==t.length){this.plugins=[...this.plugins.filter(n=>!t.includes(n)),...e];return}const r=new Map;for(const[n,o]of e.entries())r.set(lt(t,n),o);this.plugins=this.plugins.map(n=>t.includes(n)?r.get(n):n)}updateExtensionStore(){const{setExtensionStore:e}=this.store;e("updatePlugins",this.updatePlugins.bind(this)),e("dispatchPluginUpdate",this.dispatchPluginUpdate.bind(this)),e("updateExtensionPlugins",this.updateExtensionPlugins.bind(this))}updateExtensionPlugins(e){const t=EA(e)?e:t6(e)?this.store.manager.getExtension(e):this.store.extensions.find(r=>r.name===e);re(t,{code:U.INVALID_MANAGER_EXTENSION,message:`The extension ${e} does not exist within the editor.`}),this.extractExtensionPlugins(t),this.store.setStoreKey("plugins",this.plugins),this.dispatchPluginUpdate()}dispatchPluginUpdate(){re(this.store.phase>=Dr.EditorView,{code:U.MANAGER_PHASE_ERROR,message:"`dispatchPluginUpdate` should only be called after the view has been added to the manager."});const{view:e,updateState:t}=this.store,r=e.state.reconfigure({plugins:this.plugins});t(r)}};Wf=ee([ye({defaultPriority:Ue.Highest,handlerKeys:["applyState","appendTransaction"]})],Wf);var f0=class extends Ye{constructor(){super(...arguments),this.dynamicAttributes={marks:te(),nodes:te()}}get name(){return"schema"}onCreate(){const{managerSettings:e,tags:t,markNames:r,nodeNames:n,extensions:o}=this.store,{defaultBlockNode:i,disableExtraAttributes:s,nodeOverride:a,markOverride:l}=e,c=h=>!!(h&&t[ie.Block].includes(h));if(e.schema){const{nodes:h,marks:m}=w6(e.schema);this.addSchema(e.schema,h,m);return}const u=c(i)?{doc:te(),[i]:te()}:te(),d=te(),p=y6({settings:e,gatheredSchemaAttributes:this.gatherExtraAttributes(o),nodeNames:n,markNames:r,tags:t});for(const h of o){p[h.name]={...p[h.name],...h.options.extraAttributes};const m=s===!0||h.options.disableExtraAttributes===!0||h.constructor.disableExtraAttributes===!0;if(Wd(h)){const{spec:b,dynamic:y}=jS({createExtensionSpec:(g,v)=>h.createNodeSpec(g,v),extraAttributes:lt(p,h.name),override:{...a,...h.options.nodeOverride},ignoreExtraAttributes:m,name:h.constructorName,tags:h.tags});h.spec=b,u[h.name]=b,Object.keys(y).length>0&&(this.dynamicAttributes.nodes[h.name]=y)}if(lm(h)){const{spec:b,dynamic:y}=jS({createExtensionSpec:(g,v)=>h.createMarkSpec(g,v),extraAttributes:lt(p,h.name),override:{...l,...h.options.markOverride},ignoreExtraAttributes:m,name:h.constructorName,tags:h.tags??[]});h.spec=b,d[h.name]=b,Object.keys(y).length>0&&(this.dynamicAttributes.marks[h.name]=y)}}const f=new hL({nodes:u,marks:d,topNode:"doc"});this.addSchema(f,u,d)}createPlugin(){return{appendTransaction:(e,t,r)=>{const{tr:n}=r;return!e.some(i=>i.docChanged)||Object.keys(this.dynamicAttributes.nodes).length===0&&Object.keys(this.dynamicAttributes.marks).length===0?null:(n.doc.descendants((i,s)=>(this.checkAndUpdateDynamicNodes(i,s,n),this.checkAndUpdateDynamicMarks(i,s,n),!0)),n.steps.length>0?n:null)}}}addSchema(e,t,r){this.store.setStoreKey("nodes",t),this.store.setStoreKey("marks",r),this.store.setStoreKey("schema",e),this.store.setExtensionStore("schema",e),this.store.setStoreKey("defaultBlockNode",tm(e).name);for(const n of Object.values(e.nodes))if(n.name!=="doc"&&(n.isBlock||n.isTextblock))break}checkAndUpdateDynamicNodes(e,t,r){for(const[n,o]of Dt(this.dynamicAttributes.nodes))if(e.type.name===n)for(const[i,s]of Dt(o)){if(!ns(e.attrs[i]))continue;const a={...e.attrs,[i]:s(e)};r.setNodeMarkup(t,void 0,a),DS(r)}}checkAndUpdateDynamicMarks(e,t,r){for(const[n,o]of Dt(this.dynamicAttributes.marks)){const i=lt(this.store.schema.marks,n),s=e.marks.find(a=>a.type.name===n);if(s)for(const[a,l]of Dt(o)){if(!ns(s.attrs[a]))continue;const c=ai(r.doc.resolve(t),i);if(!c)continue;const{from:u,to:d}=c,p=i.create({...s.attrs,[a]:l(s)});r.removeMark(u,d,i).addMark(u,d,p),DS(r)}}}gatherExtraAttributes(e){const t=[];for(const r of e)r.createSchemaAttributes&&t.push(...r.createSchemaAttributes());return t}};f0=ee([ye({defaultPriority:Ue.Highest})],f0);function y6(e){const{settings:t,gatheredSchemaAttributes:r,nodeNames:n,markNames:o,tags:i}=e,s=te();if(t.disableExtraAttributes)return s;const a=[...r,...t.extraAttributes??[]];for(const l of a??[]){const c=b6({identifiers:l.identifiers,nodeNames:n,markNames:o,tags:i});for(const u of c){const d=s[u]??{};s[u]={...d,...l.attributes}}}return s}function v6(e){return gs(e)&&ft(e.tags)}function b6(e){const{identifiers:t,nodeNames:r,markNames:n,tags:o}=e;if(t==="nodes")return r;if(t==="marks")return n;if(t==="all")return[...r,...n];if(ft(t))return t;re(v6(t),{code:U.EXTENSION_EXTRA_ATTRIBUTES,message:"Invalid value passed as an identifier when creating `extraAttributes`."});const{tags:i=[],names:s=[],behavior:a="any",excludeNames:l,excludeTags:c,type:u}=t,d=new Set,p=u==="mark"?n:u==="node"?r:[...n,...r],f=m=>p.includes(m)&&!(l!=null&&l.includes(m));for(const m of s)f(m)&&d.add(m);const h=new Map;for(const m of i)if(!(c!=null&&c.includes(m)))for(const b of o[m]){if(!f(b))continue;if(a==="any"){d.add(b);continue}const y=h.get(b)??new Set;y.add(m),h.set(b,y)}for(const[m,b]of h)b.size===i.length&&d.add(m);return[...d]}function jS(e){var t;const{createExtensionSpec:r,extraAttributes:n,ignoreExtraAttributes:o,name:i,tags:s,override:a}=e,l=te();function c(b,y){l[b]=y}let u=!1;function d(){u=!0}const p=E6(n,o,d,c),f=k6(n,o),h=x6(n,o),m=r({defaults:p,parse:f,dom:h},a);return re(o||u,{code:U.EXTENSION_SPEC,message:`When creating a node specification you must call the 'defaults', and parse, and 'dom' methods. To avoid this error you can set the static property 'disableExtraAttributes' of '${i}' to 'true'.`}),m.group=[...((t=m.group)==null?void 0:t.split(" "))??[],...s].join(" ")||void 0,{spec:m,dynamic:l}}function fv(e){return oe(e)||De(e)?{default:e}:(re(e,{message:`${kC(e)} is not supported`,code:U.EXTENSION_EXTRA_ATTRIBUTES}),e)}function E6(e,t,r,n){return()=>{r();const o=te();if(t)return o;for(const[i,s]of Dt(e)){let l=fv(s).default;De(l)&&(n(i,l),l=null),o[i]=l===void 0?{}:{default:l}}return o}}function k6(e,t){return r=>{const n=te();if(t)return n;for(const[o,i]of Dt(e)){const{parseDOM:s,...a}=fv(i);if(dt(r)){if(ns(s)){n[o]=r.getAttribute(o)??a.default;continue}if(De(s)){n[o]=s(r)??a.default;continue}n[o]=r.getAttribute(s)??a.default}}return n}}function x6(e,t){return r=>{const n=te();if(t)return n;function o(i,s){if(i){if(oe(i)){n[s]=i;return}if(ft(i)){const[a,l]=i;n[a]=l??r.attrs[s];return}for(const[a,l]of Dt(i))n[a]=l}}for(const[i,s]of Dt(e)){const{toDOM:a,parseDOM:l}=fv(s);if(ns(a)){const c=oe(l)?l:i;n[c]=r.attrs[i];continue}if(De(a)){o(a(r.attrs,S6(r)),i);continue}o(a,i)}return n}}function S6(e){return jd(e)?{node:e}:_P(e)?{mark:e}:{}}function w6(e){const t=te(),r=te();for(const[n,o]of Object.entries(e.nodes))t[n]=o.spec;for(const[n,o]of Object.entries(e.marks))r[n]=o.spec;return{nodes:t,marks:r}}var Ul=class extends Ye{constructor(){super(...arguments),this.onAddCustomHandler=({suggester:e})=>{var t;if(!(!e||(t=this.store.managerSettings.exclude)!=null&&t.suggesters))return LS(this.store.getState(),e)}}get name(){return"suggest"}onCreate(){this.store.setExtensionStore("addSuggester",e=>LS(this.store.getState(),e)),this.store.setExtensionStore("removeSuggester",e=>fP(this.store.getState(),e))}createExternalPlugins(){var e,t;const r=[];for(const n of this.store.extensions){if((e=this.store.managerSettings.exclude)!=null&&e.suggesters)break;if(!n.createSuggesters||(t=n.options.exclude)!=null&&t.suggesters)continue;const o=n.createSuggesters(),i=ft(o)?o:[o];r.push(...i)}return[hP(...r)]}getSuggestState(e){return ov(e??this.store.getState())}getSuggestMethods(){const{addIgnored:e,clearIgnored:t,removeIgnored:r,ignoreNextExit:n,setMarkRemoved:o,findMatchAtPosition:i,findNextTextSelection:s,setLastChangeFromAppend:a}=this.getSuggestState();return{addIgnored:e,clearIgnored:t,removeIgnored:r,ignoreNextExit:n,setMarkRemoved:o,findMatchAtPosition:i,findNextTextSelection:s,setLastChangeFromAppend:a}}isSuggesterActive(e){var t;return wr(ft(e)?e:[e],(t=this.getSuggestState().match)==null?void 0:t.suggester.name)}};ee([qe()],Ul.prototype,"getSuggestState",1);ee([qe()],Ul.prototype,"getSuggestMethods",1);ee([qe()],Ul.prototype,"isSuggesterActive",1);Ul=ee([ye({customHandlerKeys:["suggester"]})],Ul);var h0=class extends Ye{constructor(){super(...arguments),this.allTags=te(),this.plainTags=te(),this.markTags=te(),this.nodeTags=te()}get name(){return"tags"}onCreate(){this.resetTags();for(const e of this.store.extensions)this.updateTagForExtension(e);this.store.setStoreKey("tags",this.allTags),this.store.setExtensionStore("tags",this.allTags),this.store.setStoreKey("plainTags",this.plainTags),this.store.setExtensionStore("plainTags",this.plainTags),this.store.setStoreKey("markTags",this.markTags),this.store.setExtensionStore("markTags",this.markTags),this.store.setStoreKey("nodeTags",this.nodeTags),this.store.setExtensionStore("nodeTags",this.nodeTags)}resetTags(){const e=te(),t=te(),r=te(),n=te();for(const o of Wh(ie))e[o]=[],t[o]=[],r[o]=[],n[o]=[];this.allTags=e,this.plainTags=t,this.markTags=r,this.nodeTags=n}updateTagForExtension(e){var t,r;const n=new Set([...e.tags??[],...((t=e.createTags)==null?void 0:t.call(e))??[],...e.options.extraTags??[],...((r=this.store.managerSettings.extraTags)==null?void 0:r[e.name])??[]]);for(const o of n)re(T6(o),{code:U.EXTENSION,message:`The tag provided by the extension: ${e.constructorName} is not supported by the editor. To add custom tags you can use the 'mutateTag' method.`}),this.allTags[o].push(e.name),kA(e)&&this.plainTags[o].push(e.name),lm(e)&&this.markTags[o].push(e.name),Wd(e)&&this.nodeTags[o].push(e.name);e.tags=[...n]}};h0=ee([ye({defaultPriority:Ue.Highest})],h0);function T6(e){return wr(Wh(ie),e)}var C6=new Ca("remirrorFilePlaceholderPlugin");function O6(){const e=new Po({key:C6,state:{init(){return{set:Ce.empty,payloads:new Map}},apply(t,{set:r,payloads:n}){r=r.map(t.mapping,t.doc);const o=t.getMeta(e);if(o)if(o.type===0){const i=document.createElement("placeholder"),s=Je.widget(o.pos,i,{id:o.id});r=r.add(t.doc,[s]),n.set(o.id,o.payload)}else o.type===1&&(r=r.remove(r.find(void 0,void 0,i=>i.id===o.id)),n.delete(o.id));return{set:r,payloads:n}}},props:{decorations(t){var r;return((r=e.getState(t))==null?void 0:r.set)??null}}});return e}var A6=class extends Ye{get name(){return"upload"}createExternalPlugins(){return[O6()]}};function N6(e={}){e={...{exitMarksOnArrowPress:ro.defaultOptions.exitMarksOnArrowPress,excludeBaseKeymap:ro.defaultOptions.excludeBaseKeymap,selectParentNodeOnEscape:ro.defaultOptions.selectParentNodeOnEscape,undoInputRuleOnBackspace:ro.defaultOptions.undoInputRuleOnBackspace,persistentSelectionClass:lo.defaultOptions.persistentSelectionClass},...e};const r=F1(e,["excludeBaseKeymap","selectParentNodeOnEscape","undoInputRuleOnBackspace"]),n=F1(e,["persistentSelectionClass"]);return[new h0,new f0,new r6,new Wf,new d0,new g6,new m6,new Ul,new xe,new Pn,new ro(r),new u0,new A6,new lo(n)]}var GS=class extends Ye{get name(){return"meta"}onCreate(){if(this.store.setStoreKey("getCommandMeta",this.getCommandMeta.bind(this)),!!this.options.capture)for(const e of this.store.extensions)this.captureCommands(e),this.captureKeybindings(e)}createPlugin(){return{}}captureCommands(e){const t=e.decoratedCommands??{},r=e.createCommands;for(const n of Object.keys(t)){const o=e[n];e[n]=(...i)=>s=>{var a;const l=o(...i)(s);return s.dispatch&&l&&this.setCommandMeta(s.tr,{type:"command",chain:s.dispatch!==((a=s.view)==null?void 0:a.dispatch),name:n,extension:e.name,decorated:!0}),l}}r&&(e.createCommands=()=>{const n=r();for(const[o,i]of Object.entries(n))n[o]=(...s)=>a=>{var l;const c=i(...s)(a);return a.dispatch&&c&&this.setCommandMeta(a.tr,{type:"command",chain:a.dispatch!==((l=a.view)==null?void 0:l.dispatch),name:o,extension:e.name,decorated:!1}),c};return n})}captureKeybindings(e){}getCommandMeta(e){return e.getMeta(this.pluginKey)??[]}setCommandMeta(e,t){const r=this.getCommandMeta(e);e.setMeta(this.pluginKey,[...r,t])}};GS=ee([ye({defaultOptions:{capture:ln.isDevelopment},staticKeys:["capture"],defaultPriority:Ue.Highest})],GS);var Zp,Wc,Jp,Qa,Ai,Qp,ef,R6=class{constructor(e){Tt(this,Zp,Ml()),Tt(this,Wc,void 0),Tt(this,Jp,void 0),Tt(this,Qa,!0),Tt(this,Ai,sm()),Tt(this,Qp,void 0),Tt(this,ef,void 0),this.getState=()=>this.view.state??this.initialEditorState,this.getPreviousState=()=>this.previousState,this.dispatchTransaction=i=>{var s,a;re(!this.manager.destroyed,{code:U.MANAGER_PHASE_ERROR,message:"A transaction was dispatched to a manager that has already been destroyed. Please check your set up, or open an issue."}),i=((a=(s=this.props).onDispatchTransaction)==null?void 0:a.call(s,i,this.getState()))??i;const l=this.getState(),{state:c,transactions:u}=l.applyTransaction(i);Ht(this,Jp,l),this.updateState({state:c,tr:i,transactions:u});const d=this.manager.store.getForcedUpdates(i);is(d)||this.updateViewProps(...d)},this.onChange=(i=te())=>{var s,a;const l=this.eventListenerProps(i);Y(this,Qa)&&Ht(this,Qa,!1),(a=(s=this.props).onChange)==null||a.call(s,l)},this.onBlur=i=>{var s,a;const l=this.eventListenerProps();(a=(s=this.props).onBlur)==null||a.call(s,l,i),Y(this,Ai).emit("blur",l,i)},this.onFocus=i=>{var s,a;const l=this.eventListenerProps();(a=(s=this.props).onFocus)==null||a.call(s,l,i),Y(this,Ai).emit("focus",l,i)},this.setContent=(i,{triggerChange:s=!1}={})=>{const{doc:a}=this.manager.createState({content:i}),l=this.getState(),{state:c}=this.getState().applyTransaction(l.tr.replaceRangeWith(0,l.doc.nodeSize-2,a));if(s)return this.updateState({state:c,triggerChange:s});this.view.updateState(c)},this.clearContent=({triggerChange:i=!1}={})=>{this.setContent(this.manager.createEmptyDoc(),{triggerChange:i})},this.createStateFromContent=(i,s)=>this.manager.createState({content:i,selection:s}),this.focus=i=>{this.manager.store.commands.focus(i)},this.blur=i=>{this.manager.store.commands.blur(i)};const{getProps:t,initialEditorState:r,element:n}=e;if(Ht(this,Wc,t),Ht(this,ef,r),this.manager.attachFramework(this,this.updateListener.bind(this)),this.manager.view)return;const o=this.createView(r,n);this.manager.addView(o)}get addHandler(){return Y(this,Qp)??Ht(this,Qp,Y(this,Ai).on.bind(Y(this,Ai)))}get updatableViewProps(){return{attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0}}get firstRender(){return Y(this,Qa)}get props(){return Y(this,Wc).call(this)}get previousState(){return this.previousStateOverride??Y(this,Jp)??this.initialEditorState}get manager(){return this.props.manager}get view(){return this.manager.view}get uid(){return Y(this,Zp)}get initialEditorState(){return Y(this,ef)}updateListener(e){const{state:t,tr:r}=e;return Y(this,Ai).emit("updated",this.eventListenerProps({state:t,tr:r}))}update(e){const{getProps:t}=e;return Ht(this,Wc,t),this}updateViewProps(...e){const t=F1(this.updatableViewProps,e);this.view.setProps({...this.view.props,...t})}getAttributes(e){var t;const{attributes:r,autoFocus:n,classNames:o=[],label:i,editable:s}=this.props,a=(t=this.manager.store)==null?void 0:t.attributes,l=De(r)?r(this.eventListenerProps()):r;let c={};(n||gn(n))&&(c=e?{autoFocus:!0}:{autofocus:"true"});const u=Ll(Fl(e&&"Prosemirror","remirror-editor",a==null?void 0:a.class,...o).split(" ")).join(" "),d={role:"textbox",...c,"aria-multiline":"true",...s??!0?{}:{"aria-readonly":"true"},"aria-label":i??"",...a,class:u};return SC({...d,...l})}addFocusListeners(){this.view.dom.addEventListener("blur",this.onBlur),this.view.dom.addEventListener("focus",this.onFocus)}removeFocusListeners(){this.view.dom.removeEventListener("blur",this.onBlur),this.view.dom.removeEventListener("focus",this.onFocus)}destroy(){Y(this,Ai).emit("destroy"),this.view&&this.removeFocusListeners()}eventListenerProps(e=te()){const{state:t,tr:r,transactions:n}=e;return{tr:r,transactions:n,internalUpdate:!r,view:this.view,firstRender:Y(this,Qa),state:t??this.getState(),createStateFromContent:this.createStateFromContent,previousState:this.previousState,helpers:this.manager.store.helpers}}get baseOutput(){return{manager:this.manager,...this.manager.store,addHandler:this.addHandler,focus:this.focus,blur:this.blur,uid:Y(this,Zp),view:this.view,getState:this.getState,getPreviousState:this.getPreviousState,getExtension:this.manager.getExtension.bind(this.manager),hasExtension:this.manager.hasExtension.bind(this.manager),clearContent:this.clearContent,setContent:this.setContent}}};Zp=new WeakMap;Wc=new WeakMap;Jp=new WeakMap;Qa=new WeakMap;Ai=new WeakMap;Qp=new WeakMap;ef=new WeakMap;function _6(e,t){const r=[],n=new WeakMap,o=[],i=new WeakMap;let s=[];const a={duplicateMap:i,parentExtensions:o,gatheredExtensions:s,settings:t};for(const d of e)SA(a,{extension:d});s=ia(s,(d,p)=>p.priority-d.priority);const l=new WeakSet,c=new Set;for(const d of s){const p=d.constructor,f=d.name,h=i.get(p);re(h,{message:`No entries were found for the ExtensionConstructor ${d.name}`,code:U.INTERNAL}),!(l.has(p)||c.has(f))&&(l.add(p),c.add(f),r.push(d),n.set(p,d),h.forEach(m=>m==null?void 0:m.replaceChildExtension(p,d)))}const u=[];for(const d of r)I6({extension:d,found:l,missing:u});return re(is(u),{code:U.MISSING_REQUIRED_EXTENSION,message:u.map(({Constructor:d,extension:p})=>`The extension '${p.name}' requires '${d.name} in order to run correctly.`).join(` -`)}),{extensions:r,extensionMap:n}}function SA(e,t){var r;const{gatheredExtensions:n,duplicateMap:o,parentExtensions:i,settings:s}=e,{extension:a,parentExtension:l}=t;let{names:c=[]}=t;re(EA(a),{code:U.INVALID_MANAGER_EXTENSION,message:`An invalid extension: ${a} was provided to the [[\`RemirrorManager\`]].`});const u=a.extensions;if(a.setPriority((r=s.priority)==null?void 0:r[a.name]),n.push(a),M6({duplicateMap:o,extension:a,parentExtension:l}),u.length!==0){if(c.includes(a.name)){`${c.join(" > ")}${a.name}`;return}c=[...c,a.name],i.push(a);for(const d of u)SA(e,{names:c,extension:d,parentExtension:a})}}function I6(e){const{extension:t,found:r,missing:n}=e;if(t.requiredExtensions)for(const o of t.requiredExtensions??[])r.has(o)||n.push({Constructor:o,extension:t})}function M6(e){const{duplicateMap:t,extension:r,parentExtension:n}=e,o=r.constructor,i=t.get(o),s=n?[n]:[];t.set(o,i?[...i,...s]:s)}function L6(e){var t,r,n,o;const{extension:i,nodeNames:s,markNames:a,plainNames:l,store:c,handlers:u}=e;i.setStore(c);const d=(t=i.onCreate)==null?void 0:t.bind(i),p=(r=i.onView)==null?void 0:r.bind(i),f=(n=i.onStateUpdate)==null?void 0:n.bind(i),h=(o=i.onDestroy)==null?void 0:o.bind(i);d&&u.create.push(d),p&&u.view.push(p),f&&u.update.push(f),h&&u.destroy.push(h),lm(i)&&a.push(i.name),Wd(i)&&i.name!=="doc"&&s.push(i.name),kA(i)&&l.push(i.name)}var Ni,Kc,qn,Vo,Yc,tn,Ns,qc,Rs,Xc,_s,Xn,Zc,tf=class{constructor(e,t={}){Tt(this,Ni,void 0),Tt(this,Kc,te()),Tt(this,qn,te()),Tt(this,Vo,void 0),Tt(this,Yc,void 0),Tt(this,tn,Dr.None),Tt(this,Ns,void 0),Tt(this,qc,!0),Tt(this,Rs,{create:[],view:[],update:[],destroy:[]}),Tt(this,Xc,[]),Tt(this,_s,sm()),Tt(this,Xn,void 0),Tt(this,Zc,void 0),this.getState=()=>{var o;return Y(this,tn)>=Dr.EditorView?this.view.state:(re(Y(this,Xn),{code:U.MANAGER_PHASE_ERROR,message:"`getState` can only be called after the `Framework` or the `EditorView` has been added to the manager`. Check your plugins to make sure that the decorations callback uses the state argument."}),(o=Y(this,Xn))==null?void 0:o.initialEditorState)},this.updateState=o=>{const i=this.getState();this.view.updateState(o),this.onStateUpdate({previousState:i,state:o})};const{extensions:r,extensionMap:n}=_6(e,t);Ht(this,Ns,t),Ht(this,Vo,Vs(r)),Ht(this,Yc,n),Ht(this,Ni,this.createExtensionStore()),Ht(this,tn,Dr.Create),this.setupLifecycleHandlers();for(const o of Y(this,Rs).create){const i=o();i&&Y(this,Xc).push(i)}}static create(e,t={}){return new tf([...AC(e),...N6(t.builtin)],t)}get[si](){return Vt.Manager}get destroyed(){return Y(this,tn)===Dr.Destroy}get mounted(){return Y(this,tn)>=Dr.EditorView&&Y(this,tn)Y(this,Vo),enumerable:t},phase:{get:()=>Y(this,tn),enumerable:t},view:{get:()=>this.view,enumerable:t},managerSettings:{get:()=>Vs(Y(this,Ns)),enumerable:t},getState:{value:this.getState,enumerable:t},updateState:{value:this.updateState,enumerable:t},isMounted:{value:()=>this.mounted,enumerable:t},getExtension:{value:this.getExtension.bind(this),enumerable:t},manager:{get:()=>this,enumerable:t},document:{get:()=>this.document,enumerable:t},stringHandlers:{get:()=>Y(this,Kc),enumerable:t},currentState:{get:()=>r??(r=this.getState()),set:o=>{r=o},enumerable:t},previousState:{get:()=>n,set:o=>{n=o},enumerable:t}}),e.getStoreKey=this.getStoreKey.bind(this),e.setStoreKey=this.setStoreKey.bind(this),e.setExtensionStore=this.setExtensionStore.bind(this),e.setStringHandler=this.setStringHandler.bind(this),e}addView(e){if(Y(this,tn)>=Dr.EditorView)return this;Ht(this,qc,!0),Ht(this,tn,Dr.EditorView),Y(this,qn).view=e;for(const t of Y(this,Rs).view){const r=t(e);r&&Y(this,Xc).push(r)}return this}attachFramework(e,t){var r;Y(this,Xn)!==e&&(Y(this,Xn)&&(Y(this,Xn).destroy(),(r=Y(this,Zc))==null||r.call(this)),Ht(this,Xn,e),Ht(this,Zc,this.addHandler("stateUpdate",t)))}createEmptyDoc(){var e;const t=(e=this.schema.nodes.doc)==null?void 0:e.createAndFill();return re(t,{code:U.INVALID_CONTENT,message:"An empty node could not be created due to an invalid schema."}),t}createState(e={}){const{onError:t,defaultSelection:r="end"}=this.settings,{content:n=this.createEmptyDoc(),selection:o=r,stringHandler:i=this.settings.stringHandler}=e,{schema:s,plugins:a}=this.store,l=tA({stringHandler:oe(i)?this.stringHandlers[i]:i,document:this.document,content:n,onError:t,schema:s,selection:o});return js.create({schema:s,doc:l,plugins:a,selection:Dn(o,l)})}addHandler(e,t){return Y(this,_s).on(e,t)}onStateUpdate(e){const t=Y(this,qc);Y(this,Ni).currentState=e.state,Y(this,Ni).previousState=e.previousState,t&&(Ht(this,tn,Dr.Runtime),Ht(this,qc,!1));const r={...e,firstUpdate:t};for(const n of Y(this,Rs).update)n(r);Y(this,_s).emit("stateUpdate",r)}getExtension(e){const t=Y(this,Yc).get(e);return re(t,{code:U.INVALID_MANAGER_EXTENSION,message:`'${e.name}' doesn't exist within this manager. Make sure it is properly added before attempting to use it.`}),t}hasExtension(e){return!!Y(this,Yc).get(e)}clone(){const e=Y(this,Vo).map(r=>r.clone(r.options)),t=tf.create(()=>e,Y(this,Ns));return Y(this,_s).emit("clone",t),t}recreate(e=[],t={}){const r=Y(this,Vo).map(o=>o.clone(o.initialOptions)),n=tf.create(()=>[...r,...e],t);return Y(this,_s).emit("recreate",n),n}destroy(){var e,t,r,n,o,i;Ht(this,tn,Dr.Destroy);for(const s of((e=this.view)==null?void 0:e.state.plugins)??[])(r=(t=s.getState(this.view.state))==null?void 0:t.destroy)==null||r.call(t);(n=Y(this,Xn))==null||n.destroy(),(o=Y(this,Zc))==null||o.call(this);for(const s of Y(this,Xc))s();for(const s of Y(this,Rs).destroy)s();(i=this.view)==null||i.destroy(),Y(this,_s).emit("destroy")}includes(e){const t=[],r=[];for(const n of Y(this,Vo))t.push(n.name,n.constructorName),r.push(n.constructor);return e.every(n=>oe(n)?wr(t,n):wr(r,n))}},D6=tf;Ni=new WeakMap;Kc=new WeakMap;qn=new WeakMap;Vo=new WeakMap;Yc=new WeakMap;tn=new WeakMap;Ns=new WeakMap;qc=new WeakMap;Rs=new WeakMap;Xc=new WeakMap;_s=new WeakMap;Xn=new WeakMap;Zc=new WeakMap;function P6(e,t){return!dc(e)||!pc(e,Vt.Manager)?!1:t?e.includes(t):!0}var z6=Object.defineProperty,$6=Object.getOwnPropertyDescriptor,Kd=(e,t,r,n)=>{for(var o=n>1?void 0:n?$6(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&z6(t,r,o),o},wA=/\S+/g;function TA(e){return e.type.isTextblock?1:e.type.isText?e.textBetween(0,e.nodeSize).length:0}function B6({doc:e},t){let r=0,n=0;return e.nodesBetween(0,e.nodeSize-2,(o,i)=>{if(n>0)return!1;const s=TA(o);return r+s>t?(n=i+1+(t-r),!1):(r+=s,!0)}),n}function H6({doc:e},t){let r=0,n=0;return e.nodesBetween(0,e.nodeSize-2,(o,i)=>{if(n>0)return!1;if(!o.type.isText)return!0;const s=o.textBetween(0,o.nodeSize),a=cc(s,wA);if(r+a.length>t){const l=t-r,c=a[l];return n=i+((c==null?void 0:c.index)??0),!1}return r+=a.length,!0}),n}var cs=class extends Ye{get name(){return"count"}getCountMaximum(){return this.options.maximum}getCharacterCount(e=this.store.getState()){let t=0;return e.doc.nodesBetween(0,e.doc.nodeSize-2,r=>(t+=TA(r),!0)),Math.max(t-1,0)}getWordCount(e=this.store.getState()){const t=this.store.helpers.getText({lineBreakDivider:" ",state:e});return cc(t,wA).length}isCountValid(e=this.store.getState()){const{maximumStrategy:t,maximum:r}=this.options;return r<1?!0:t==="CHARACTERS"?this.store.helpers.getCharacterCount(e)<=r:this.store.helpers.getWordCount(e)<=r}createDecorationSet(e){const{maximum:t=-1,maximumStrategy:r,maximumExceededClassName:n}=this.options,s=(r==="CHARACTERS"?B6:H6)(e,t);return Ce.create(e.doc,[Je.inline(s,e.doc.nodeSize-2,{class:n})])}createExternalPlugins(){const{maximum:e}=this.options,t=new Po({state:{init:(r,n)=>this.isCountValid(n)?{decorationSet:Ce.empty}:{decorationSet:this.createDecorationSet(n)},apply:(r,n,o,i)=>!r.docChanged||e<1?n:this.isCountValid(i)?{decorationSet:Ce.empty}:{decorationSet:this.createDecorationSet(i)}},props:{decorations(r){var n;return((n=t.getState(r))==null?void 0:n.decorationSet)??null}}});return[t]}};Kd([qe()],cs.prototype,"getCountMaximum",1);Kd([qe()],cs.prototype,"getCharacterCount",1);Kd([qe()],cs.prototype,"getWordCount",1);Kd([qe()],cs.prototype,"isCountValid",1);cs=Kd([ye({defaultOptions:{maximum:-1,maximumExceededClassName:"remirror-max-count-exceeded",maximumStrategy:"CHARACTERS"},staticKeys:["maximum","maximumStrategy","maximumExceededClassName"]})],cs);var F6="Expected a function",CA="__lodash_hash_undefined__",U6="[object Function]",V6="[object GeneratorFunction]",j6=/[\\^$.*+?()[\]{}|]/g,G6=/^\[object .+?Constructor\]$/,W6=typeof Zo=="object"&&Zo&&Zo.Object===Object&&Zo,K6=typeof self=="object"&&self&&self.Object===Object&&self,OA=W6||K6||Function("return this")();function Y6(e,t){return e==null?void 0:e[t]}function q6(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var X6=Array.prototype,Z6=Function.prototype,AA=Object.prototype,jg=OA["__core-js_shared__"],WS=function(){var e=/[^.]+$/.exec(jg&&jg.keys&&jg.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),NA=Z6.toString,hv=AA.hasOwnProperty,J6=AA.toString,Q6=RegExp("^"+NA.call(hv).replace(j6,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),e$=X6.splice,t$=RA(OA,"Map"),Zu=RA(Object,"create");function ua(e){var t=-1,r=e?e.length:0;for(this.clear();++t-1}function d$(e,t){var r=this.__data__,n=cm(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}hc.prototype.clear=a$;hc.prototype.delete=l$;hc.prototype.get=c$;hc.prototype.has=u$;hc.prototype.set=d$;function Aa(e){var t=-1,r=e?e.length:0;for(this.clear();++t4&&r.slice(0,4)===Ev&&h8.test(t)&&(t.charAt(4)==="-"?n=y8(t):t=v8(t),o=d8),new o(n,t))}function y8(e){var t=e.slice(5).replace(HA,E8);return Ev+t.charAt(0).toUpperCase()+t.slice(1)}function v8(e){var t=e.slice(4);return HA.test(t)?e:(t=t.replace(m8,b8),t.charAt(0)!=="-"&&(t="-"+t),Ev+t)}function b8(e){return"-"+e.toLowerCase()}function E8(e){return e.charAt(1).toUpperCase()}var k8=x8,ZS=/[#.]/g;function x8(e,t){for(var r=e||"",n=t||"div",o={},i=0,s,a,l;i=48&&t<=57}var jB=GB;function GB(e){var t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}var WB=KB;function KB(e){var t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}var YB=WB,qB=VA,XB=ZB;function ZB(e){return YB(e)||qB(e)}var vp,JB=59,QB=e7;function e7(e){var t="&"+e+";",r;return vp=vp||document.createElement("i"),vp.innerHTML=t,r=vp.textContent,r.charCodeAt(r.length-1)===JB&&e!=="semi"||r===t?!1:r}var ow=FB,iw=UB,t7=VA,r7=jB,jA=XB,n7=QB,o7=y7,i7={}.hasOwnProperty,Ha=String.fromCharCode,s7=Function.prototype,sw={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},a7=9,aw=10,l7=12,c7=32,lw=38,u7=59,d7=60,p7=61,f7=35,h7=88,m7=120,g7=65533,el="named",Sv="hexadecimal",wv="decimal",Tv={};Tv[Sv]=16;Tv[wv]=10;var dm={};dm[el]=jA;dm[wv]=t7;dm[Sv]=r7;var GA=1,WA=2,KA=3,YA=4,qA=5,g0=6,XA=7,Es={};Es[GA]="Named character references must be terminated by a semicolon";Es[WA]="Numeric character references must be terminated by a semicolon";Es[KA]="Named character references cannot be empty";Es[YA]="Numeric character references cannot be empty";Es[qA]="Named character references must be known";Es[g0]="Numeric character references cannot be disallowed";Es[XA]="Numeric character references cannot be outside the permissible Unicode range";function y7(e,t){var r={},n,o;t||(t={});for(o in sw)n=t[o],r[o]=n??sw[o];return(r.position.indent||r.position.start)&&(r.indent=r.position.indent||[],r.position=r.position.start),v7(e,r)}function v7(e,t){var r=t.additional,n=t.nonTerminated,o=t.text,i=t.reference,s=t.warning,a=t.textContext,l=t.referenceContext,c=t.warningContext,u=t.position,d=t.indent||[],p=e.length,f=0,h=-1,m=u.column||1,b=u.line||1,y="",g=[],v,E,k,x,w,C,T,O,_,P,$,B,F,z,G,R,M,L,K;for(typeof r=="string"&&(r=r.charCodeAt(0)),R=q(),O=s?Re:s7,f--,p++;++f65535&&(C-=65536,P+=Ha(C>>>10|55296),C=56320|C&1023),C=P+Ha(C))):z!==el&&O(YA,L)),C?(ae(),R=q(),f=K-1,m+=K-F+1,g.push(C),M=q(),M.offset++,i&&i.call(l,C,{start:R,end:M},e.slice(F-1,K)),R=M):(x=e.slice(F-1,K),y+=x,m+=x.length,f=K-1)}else w===10&&(b++,h++,m=0),w===w?(y+=Ha(w),m++):ae();return g.join("");function q(){return{line:b,column:m,offset:f+(u.offset||0)}}function Re(pe,fe){var ge=q();ge.column+=fe,ge.offset+=fe,s.call(c,Es[pe],ge,pe)}function ae(){y&&(g.push(y),o&&o.call(a,y,{start:R,end:q()}),y="")}}function b7(e){return e>=55296&&e<=57343||e>1114111}function E7(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}var ZA={exports:{}};(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** +`,ws)}getHTML(t=this.store.getState()){return fF(t.doc,this.store.document)}textToProsemirrorNode(t){const e=`
${t.content}
`;return this.store.stringHandlers.html({...t,content:e})}};me([bt()],go.prototype,"isSelectionEmpty",1);me([bt()],go.prototype,"isViewEditable",1);me([bt()],go.prototype,"getStateJSON",1);me([bt()],go.prototype,"getJSON",1);me([bt()],go.prototype,"getRemirrorJSON",1);me([de()],go.prototype,"insertHtml",1);me([bt()],go.prototype,"getText",1);me([bt()],go.prototype,"getTextBetween",1);me([bt()],go.prototype,"getHTML",1);go=me([Pe({})],go);var N0=class extends yt{get name(){return"inputRules"}onCreate(){this.store.setExtensionStore("rebuildInputRules",this.rebuildInputRules.bind(this))}createExternalPlugins(){return[this.generateInputRulesPlugin()]}generateInputRulesPlugin(){var t,e;const n=[],r=this.store.markTags[Ee.ExcludeInputRules];for(const o of this.store.extensions)if(!((t=this.store.managerSettings.exclude)!=null&&t.inputRules||!o.createInputRules||(e=o.options.exclude)!=null&&e.inputRules))for(const i of o.createInputRules())i.shouldSkip=this.options.shouldSkipInputRule,i.invalidMarks=r,n.push(i);return _5({rules:n})}rebuildInputRules(){this.store.updateExtensionPlugins(this)}};N0=me([Pe({defaultPriority:dt.Default,handlerKeys:["shouldSkipInputRule"],handlerKeyOptions:{shouldSkipInputRule:{earlyReturnValue:!0}}})],N0);var $o=class extends yt{constructor(){super(...arguments),this.extraKeyBindings=[],this.backwardMarkExitTracker=new Map,this.keydownHandler=null,this.onAddCustomHandler=({keymap:t})=>{var e,n;if(t)return this.extraKeyBindings=[...this.extraKeyBindings,t],(n=(e=this.store).rebuildKeymap)==null||n.call(e),()=>{var r,o;this.extraKeyBindings=this.extraKeyBindings.filter(i=>i!==t),(o=(r=this.store).rebuildKeymap)==null||o.call(r)}},this.rebuildKeymap=()=>{this.setupKeydownHandler()}}get name(){return"keymap"}get shortcutMap(){const{shortcuts:t}=this.options;return ke(t)?LB[t]:t}onCreate(){this.store.setExtensionStore("rebuildKeymap",this.rebuildKeymap)}createExternalPlugins(){var t;return(t=this.store.managerSettings.exclude)!=null&&t.keymap?[]:(this.setupKeydownHandler(),[new gi({props:{handleKeyDown:(e,n)=>{var r;return(r=this.keydownHandler)==null?void 0:r.call(this,e,n)}}})])}setupKeydownHandler(){const t=this.generateKeymapBindings();this.keydownHandler=Pb(t)}generateKeymapBindings(){var t;const e=[],n=this.shortcutMap,r=this.store.getExtension(We),o=l=>a=>sp({shortcut:a,map:n,store:this.store,options:l.options});for(const l of this.store.extensions){const a=l.decoratedKeybindings??{};if(!((t=l.options.exclude)!=null&&t.keymap)){l.createKeymap&&e.push(OB(l.createKeymap(o(l)),n));for(const[u,c]of cn(a)){if(c.isActive&&!c.isActive(l.options,this.store))continue;const d=l[u].bind(l),h=sp({shortcut:c.shortcut,map:n,options:l.options,store:this.store}),f=tt(c.priority)?c.priority(l.options,this.store):c.priority??dt.Low,p=be();for(const g of h)p[g]=d;e.push([f,p]),c.command&&r.updateDecorated(c.command,{shortcut:h})}}}const i=this.sortKeymaps([...this.extraKeyBindings,...e]);return Vz(i)}arrowRightShortcut(t){const e=this.store.markTags[Ee.PreventExits],n=this.store.nodeTags[Ee.PreventExits];return this.exitMarkForwards(e,n)(t)}arrowLeftShortcut(t){const e=this.store.markTags[Ee.PreventExits],n=this.store.nodeTags[Ee.PreventExits];return Qp(this.exitNodeBackwards(n),this.exitMarkBackwards(e,n))(t)}backspace(t){const e=this.store.markTags[Ee.PreventExits],n=this.store.nodeTags[Ee.PreventExits];return Qp(this.exitNodeBackwards(n,!0),this.exitMarkBackwards(e,n,!0))(t)}createKeymap(){const{selectParentNodeOnEscape:t,undoInputRuleOnBackspace:e,excludeBaseKeymap:n}=this.options,r=be();if(!n)for(const[o,i]of cn(s1))r[o]=Sd(i);return e&&s1.Backspace&&(r.Backspace=Sd(mm(R5,s1.Backspace))),t&&(r.Escape=Sd(HF)),[dt.Low,r]}getNamedShortcut(t,e={}){return t.startsWith("_|")?sp({shortcut:t,map:this.shortcutMap,store:this.store,options:e}):[t]}onSetOptions(t){var e,n;const{changes:r}=t;(r.excludeBaseKeymap.changed||r.selectParentNodeOnEscape.changed||r.undoInputRuleOnBackspace.changed)&&((n=(e=this.store).rebuildKeymap)==null||n.call(e))}sortKeymaps(t){return Ka(t.map(e=>Bt(e)?e:[dt.Default,e]),(e,n)=>n[0]-e[0]).map(e=>e[1])}exitMarkForwards(t,e){return n=>{const{tr:r,dispatch:o}=n;if(!vF(r.selection)||hi({selection:r.selection,types:e}))return!1;const l=r.selection.$from.marks().filter(a=>!t.includes(a.type.name));if(Bs(l))return!1;if(!o)return!0;for(const a of l)r.removeStoredMark(a);return o(r.insertText(" ",r.selection.from)),!0}}exitNodeBackwards(t,e=!1){return n=>{const{tr:r}=n;if(!(e?pC:I0)(r.selection))return!1;const i=r.selection.$anchor.node();return!fm(i)||eF(i)||t.includes(i.type.name)?!1:this.store.commands.toggleBlockNodeItem.original({type:i.type})(n)}}exitMarkBackwards(t,e,n=!1){return r=>{const{tr:o,dispatch:i}=r;if(!(n?pC:I0)(o.selection)||this.backwardMarkExitTracker.has(o.selection.anchor))return this.backwardMarkExitTracker.clear(),!1;if(hi({selection:o.selection,types:e}))return!1;const a=[...o.storedMarks??[],...o.selection.$from.marks()].filter(u=>!t.includes(u.type.name));if(Bs(a))return!1;if(!i)return!0;for(const u of a)o.removeStoredMark(u);return this.backwardMarkExitTracker.set(o.selection.anchor,!0),i(o),!0}}};me([nn({shortcut:"ArrowRight",isActive:t=>t.exitMarksOnArrowPress})],$o.prototype,"arrowRightShortcut",1);me([nn({shortcut:"ArrowLeft",isActive:t=>t.exitMarksOnArrowPress})],$o.prototype,"arrowLeftShortcut",1);me([nn({shortcut:"Backspace",isActive:t=>t.exitMarksOnArrowPress})],$o.prototype,"backspace",1);me([bt()],$o.prototype,"getNamedShortcut",1);$o=me([Pe({defaultPriority:dt.Low,defaultOptions:{shortcuts:"default",undoInputRuleOnBackspace:!0,selectParentNodeOnEscape:!1,excludeBaseKeymap:!1,exitMarksOnArrowPress:!0},customHandlerKeys:["keymap"]})],$o);function MB(t){return sr(rm(oe),t)}function sp({shortcut:t,map:e,options:n,store:r}){return ke(t)?[$0(t,e)]:Bt(t)?t.map(o=>$0(o,e)):(t=t(n,r),sp({shortcut:t,map:e,options:n,store:r}))}function $0(t,e){return MB(t)?e[t]:t}function OB(t,e){const n={};let r,o;Bt(t)?[o,r]=t:r=t;for(const[i,s]of cn(r))n[$0(i,e)]=s;return om(o)?n:[o,n]}var sM={[oe.Copy]:"Mod-c",[oe.Cut]:"Mod-x",[oe.Paste]:"Mod-v",[oe.PastePlain]:"Mod-Shift-v",[oe.SelectAll]:"Mod-a",[oe.Undo]:"Mod-z",[oe.Redo]:Br.isMac?"Shift-Mod-z":"Mod-y",[oe.Bold]:"Mod-b",[oe.Italic]:"Mod-i",[oe.Underline]:"Mod-u",[oe.Strike]:"Mod-d",[oe.Code]:"Mod-`",[oe.Paragraph]:"Mod-Shift-0",[oe.H1]:"Mod-Shift-1",[oe.H2]:"Mod-Shift-2",[oe.H3]:"Mod-Shift-3",[oe.H4]:"Mod-Shift-4",[oe.H5]:"Mod-Shift-5",[oe.H6]:"Mod-Shift-6",[oe.TaskList]:"Mod-Shift-7",[oe.BulletList]:"Mod-Shift-8",[oe.OrderedList]:"Mod-Shift-9",[oe.Quote]:"Mod->",[oe.Divider]:"Mod-Shift-|",[oe.Codeblock]:"Mod-Shift-~",[oe.ClearFormatting]:"Mod-Shift-C",[oe.Superscript]:"Mod-.",[oe.Subscript]:"Mod-,",[oe.LeftAlignment]:"Mod-Shift-L",[oe.CenterAlignment]:"Mod-Shift-E",[oe.RightAlignment]:"Mod-Shift-R",[oe.JustifyAlignment]:"Mod-Shift-J",[oe.InsertLink]:"Mod-k",[oe.Find]:"Mod-f",[oe.FindBackwards]:"Mod-Shift-f",[oe.FindReplace]:"Mod-Shift-H",[oe.AddFootnote]:"Mod-Alt-f",[oe.AddComment]:"Mod-Alt-m",[oe.ContextMenu]:"Mod-Shift-\\",[oe.IncreaseFontSize]:"Mod-Shift-.",[oe.DecreaseFontSize]:"Mod-Shift-,",[oe.IncreaseIndent]:"Tab",[oe.DecreaseIndent]:"Shift-Tab",[oe.Shortcuts]:"Mod-/",[oe.Format]:Br.isMac?"Alt-Shift-f":"Shift-Ctrl-f"},IB={...sM,[oe.Strike]:"Mod-Shift-S",[oe.Code]:"Mod-Shift-M",[oe.Paragraph]:"Mod-Alt-0",[oe.H1]:"Mod-Alt-1",[oe.H2]:"Mod-Alt-2",[oe.H3]:"Mod-Alt-3",[oe.H4]:"Mod-Alt-4",[oe.H5]:"Mod-Alt-5",[oe.H6]:"Mod-Alt-6",[oe.OrderedList]:"Mod-Alt-7",[oe.BulletList]:"Mod-Alt-8",[oe.Quote]:"Mod-Alt-9",[oe.ClearFormatting]:"Mod-\\",[oe.IncreaseIndent]:"Mod-[",[oe.DecreaseIndent]:"Mod-]"},LB={default:sM,googleDoc:IB},NB=class extends yt{get name(){return"nodeViews"}createPlugin(){const t=[],e=be();for(const n of this.store.extensions){if(!n.createNodeViews)continue;const r=n.createNodeViews();t.unshift(tt(r)?{[n.name]:r}:r)}t.unshift(this.store.managerSettings.nodeViews??{});for(const n of t)Object.assign(e,n);return{props:{nodeViews:e}}}},$B=class extends yt{get name(){return"pasteRules"}createExternalPlugins(){return[this.generatePasteRulesPlugin()]}generatePasteRulesPlugin(){var t,e;const n=[];for(const r of this.store.extensions){if((t=this.store.managerSettings.exclude)!=null&&t.pasteRules||!r.createPasteRules||(e=r.options.exclude)!=null&&e.pasteRules)continue;const o=r.createPasteRules(),i=Bt(o)?o:[o];n.push(...i)}return tB(n)}},tg=class extends yt{constructor(){super(...arguments),this.plugins=[],this.managerPlugins=[],this.applyStateHandlers=[],this.initStateHandlers=[],this.appendTransactionHandlers=[],this.pluginKeys=be(),this.stateGetters=new Map,this.getPluginStateCreator=t=>e=>t.getState(e??this.store.getState()),this.getStateByName=t=>{const e=this.stateGetters.get(t);return we(e,{message:"No plugin exists for the requested extension name."}),e()}}get name(){return"plugins"}onCreate(){const{setStoreKey:t,setExtensionStore:e,managerSettings:n,extensions:r}=this.store;this.updateExtensionStore();const{plugins:o=[]}=n;this.updatePlugins(o,this.managerPlugins);for(const i of r)i.onApplyState&&this.applyStateHandlers.push(i.onApplyState.bind(i)),i.onInitState&&this.initStateHandlers.push(i.onInitState.bind(i)),i.onAppendTransaction&&this.appendTransactionHandlers.push(i.onAppendTransaction.bind(i)),this.extractExtensionPlugins(i);this.managerPlugins=o,this.store.setStoreKey("plugins",this.plugins),t("pluginKeys",this.pluginKeys),t("getPluginState",this.getStateByName),e("getPluginState",this.getStateByName)}createPlugin(){return{appendTransaction:(t,e,n)=>{const r=n.tr,o={previousState:e,tr:r,transactions:t,state:n};for(const i of this.appendTransactionHandlers)i(o);return this.options.appendTransaction(o),r.docChanged||r.steps.length>0||r.selectionSet||r.storedMarksSet?r:void 0},state:{init:(t,e)=>{for(const n of this.initStateHandlers)n(e)},apply:(t,e,n,r)=>{const o={previousState:n,state:r,tr:t};for(const i of this.applyStateHandlers)i(o);this.options.applyState(o)}}}}extractExtensionPlugins(t){var e,n;if(!(!t.createPlugin&&!t.createExternalPlugins||(e=this.store.managerSettings.exclude)!=null&&e.plugins||(n=t.options.exclude)!=null&&n.plugins)){if(t.createPlugin){const o=new gl(t.name);this.pluginKeys[t.name]=o;const i=this.getPluginStateCreator(o);t.pluginKey=o,t.getPluginState=i,this.stateGetters.set(t.name,i),this.stateGetters.set(t.constructor,i);const s={...t.createPlugin(),key:o},l=new gi(s);this.updatePlugins([l],t.plugin?[t.plugin]:void 0),t.plugin=l}if(t.createExternalPlugins){const o=t.createExternalPlugins();this.updatePlugins(o,t.externalPlugins),t.externalPlugins=o}}}updatePlugins(t,e){if(!e||Bs(e)){this.plugins=[...this.plugins,...t];return}if(t.length!==e.length){this.plugins=[...this.plugins.filter(r=>!e.includes(r)),...t];return}const n=new Map;for(const[r,o]of t.entries())n.set(Ot(e,r),o);this.plugins=this.plugins.map(r=>e.includes(r)?n.get(r):r)}updateExtensionStore(){const{setExtensionStore:t}=this.store;t("updatePlugins",this.updatePlugins.bind(this)),t("dispatchPluginUpdate",this.dispatchPluginUpdate.bind(this)),t("updateExtensionPlugins",this.updateExtensionPlugins.bind(this))}updateExtensionPlugins(t){const e=oM(t)?t:wB(t)?this.store.manager.getExtension(t):this.store.extensions.find(n=>n.name===t);we(e,{code:re.INVALID_MANAGER_EXTENSION,message:`The extension ${t} does not exist within the editor.`}),this.extractExtensionPlugins(e),this.store.setStoreKey("plugins",this.plugins),this.dispatchPluginUpdate()}dispatchPluginUpdate(){we(this.store.phase>=mr.EditorView,{code:re.MANAGER_PHASE_ERROR,message:"`dispatchPluginUpdate` should only be called after the view has been added to the manager."});const{view:t,updateState:e}=this.store,n=t.state.reconfigure({plugins:this.plugins});e(n)}};tg=me([Pe({defaultPriority:dt.Highest,handlerKeys:["applyState","appendTransaction"]})],tg);var D0=class extends yt{constructor(){super(...arguments),this.dynamicAttributes={marks:be(),nodes:be()}}get name(){return"schema"}onCreate(){const{managerSettings:t,tags:e,markNames:n,nodeNames:r,extensions:o}=this.store,{defaultBlockNode:i,disableExtraAttributes:s,nodeOverride:l,markOverride:a}=t,u=p=>!!(p&&e[Ee.Block].includes(p));if(t.schema){const{nodes:p,marks:g}=WB(t.schema);this.addSchema(t.schema,p,g);return}const c=u(i)?{doc:be(),[i]:be()}:be(),d=be(),h=DB({settings:t,gatheredSchemaAttributes:this.gatherExtraAttributes(o),nodeNames:r,markNames:n,tags:e});for(const p of o){h[p.name]={...h[p.name],...p.options.extraAttributes};const g=s===!0||p.options.disableExtraAttributes===!0||p.constructor.disableExtraAttributes===!0;if(Vh(p)){const{spec:m,dynamic:v}=bC({createExtensionSpec:(y,b)=>p.createNodeSpec(y,b),extraAttributes:Ot(h,p.name),override:{...l,...p.options.nodeOverride},ignoreExtraAttributes:g,name:p.constructorName,tags:p.tags});p.spec=m,c[p.name]=m,Object.keys(v).length>0&&(this.dynamicAttributes.nodes[p.name]=v)}if(bm(p)){const{spec:m,dynamic:v}=bC({createExtensionSpec:(y,b)=>p.createMarkSpec(y,b),extraAttributes:Ot(h,p.name),override:{...a,...p.options.markOverride},ignoreExtraAttributes:g,name:p.constructorName,tags:p.tags??[]});p.spec=m,d[p.name]=m,Object.keys(v).length>0&&(this.dynamicAttributes.marks[p.name]=v)}}const f=new LD({nodes:c,marks:d,topNode:"doc"});this.addSchema(f,c,d)}createPlugin(){return{appendTransaction:(t,e,n)=>{const{tr:r}=n;return!t.some(i=>i.docChanged)||Object.keys(this.dynamicAttributes.nodes).length===0&&Object.keys(this.dynamicAttributes.marks).length===0?null:(r.doc.descendants((i,s)=>(this.checkAndUpdateDynamicNodes(i,s,r),this.checkAndUpdateDynamicMarks(i,s,r),!0)),r.steps.length>0?r:null)}}}addSchema(t,e,n){this.store.setStoreKey("nodes",e),this.store.setStoreKey("marks",n),this.store.setStoreKey("schema",t),this.store.setExtensionStore("schema",t),this.store.setStoreKey("defaultBlockNode",hm(t).name);for(const r of Object.values(t.nodes))if(r.name!=="doc"&&(r.isBlock||r.isTextblock))break}checkAndUpdateDynamicNodes(t,e,n){for(const[r,o]of cn(this.dynamicAttributes.nodes))if(t.type.name===r)for(const[i,s]of cn(o)){if(!Fs(t.attrs[i]))continue;const l={...t.attrs,[i]:s(t)};n.setNodeMarkup(e,void 0,l),uC(n)}}checkAndUpdateDynamicMarks(t,e,n){for(const[r,o]of cn(this.dynamicAttributes.marks)){const i=Ot(this.store.schema.marks,r),s=t.marks.find(l=>l.type.name===r);if(s)for(const[l,a]of cn(o)){if(!Fs(s.attrs[l]))continue;const u=Hi(n.doc.resolve(e),i);if(!u)continue;const{from:c,to:d}=u,h=i.create({...s.attrs,[l]:a(s)});n.removeMark(c,d,i).addMark(c,d,h),uC(n)}}}gatherExtraAttributes(t){const e=[];for(const n of t)n.createSchemaAttributes&&e.push(...n.createSchemaAttributes());return e}};D0=me([Pe({defaultPriority:dt.Highest})],D0);function DB(t){const{settings:e,gatheredSchemaAttributes:n,nodeNames:r,markNames:o,tags:i}=t,s=be();if(e.disableExtraAttributes)return s;const l=[...n,...e.extraAttributes??[]];for(const a of l??[]){const u=zB({identifiers:a.identifiers,nodeNames:r,markNames:o,tags:i});for(const c of u){const d=s[c]??{};s[c]={...d,...a.attributes}}}return s}function PB(t){return Zs(t)&&Bt(t.tags)}function zB(t){const{identifiers:e,nodeNames:n,markNames:r,tags:o}=t;if(e==="nodes")return n;if(e==="marks")return r;if(e==="all")return[...n,...r];if(Bt(e))return e;we(PB(e),{code:re.EXTENSION_EXTRA_ATTRIBUTES,message:"Invalid value passed as an identifier when creating `extraAttributes`."});const{tags:i=[],names:s=[],behavior:l="any",excludeNames:a,excludeTags:u,type:c}=e,d=new Set,h=c==="mark"?r:c==="node"?n:[...r,...n],f=g=>h.includes(g)&&!(a!=null&&a.includes(g));for(const g of s)f(g)&&d.add(g);const p=new Map;for(const g of i)if(!(u!=null&&u.includes(g)))for(const m of o[g]){if(!f(m))continue;if(l==="any"){d.add(m);continue}const v=p.get(m)??new Set;v.add(g),p.set(m,v)}for(const[g,m]of p)m.size===i.length&&d.add(g);return[...d]}function bC(t){var e;const{createExtensionSpec:n,extraAttributes:r,ignoreExtraAttributes:o,name:i,tags:s,override:l}=t,a=be();function u(m,v){a[m]=v}let c=!1;function d(){c=!0}const h=FB(r,o,d,u),f=BB(r,o),p=HB(r,o),g=n({defaults:h,parse:f,dom:p},l);return we(o||c,{code:re.EXTENSION_SPEC,message:`When creating a node specification you must call the 'defaults', and parse, and 'dom' methods. To avoid this error you can set the static property 'disableExtraAttributes' of '${i}' to 'true'.`}),g.group=[...((e=g.group)==null?void 0:e.split(" "))??[],...s].join(" ")||void 0,{spec:g,dynamic:a}}function zb(t){return ke(t)||tt(t)?{default:t}:(we(t,{message:`${iR(t)} is not supported`,code:re.EXTENSION_EXTRA_ATTRIBUTES}),t)}function FB(t,e,n,r){return()=>{n();const o=be();if(e)return o;for(const[i,s]of cn(t)){let a=zb(s).default;tt(a)&&(r(i,a),a=null),o[i]=a===void 0?{}:{default:a}}return o}}function BB(t,e){return n=>{const r=be();if(e)return r;for(const[o,i]of cn(t)){const{parseDOM:s,...l}=zb(i);if(zt(n)){if(Fs(s)){r[o]=n.getAttribute(o)??l.default;continue}if(tt(s)){r[o]=s(n)??l.default;continue}r[o]=n.getAttribute(s)??l.default}}return r}}function HB(t,e){return n=>{const r=be();if(e)return r;function o(i,s){if(i){if(ke(i)){r[s]=i;return}if(Bt(i)){const[l,a]=i;r[l]=a??n.attrs[s];return}for(const[l,a]of cn(i))r[l]=a}}for(const[i,s]of cn(t)){const{toDOM:l,parseDOM:a}=zb(s);if(Fs(l)){const u=ke(a)?a:i;r[u]=n.attrs[i];continue}if(tt(l)){o(l(n.attrs,UB(n)),i);continue}o(l,i)}return r}}function UB(t){return Uh(t)?{node:t}:qz(t)?{mark:t}:{}}function WB(t){const e=be(),n=be();for(const[r,o]of Object.entries(t.nodes))e[r]=o.spec;for(const[r,o]of Object.entries(t.marks))n[r]=o.spec;return{nodes:e,marks:n}}var zc=class extends yt{constructor(){super(...arguments),this.onAddCustomHandler=({suggester:t})=>{var e;if(!(!t||(e=this.store.managerSettings.exclude)!=null&&e.suggesters))return cC(this.store.getState(),t)}}get name(){return"suggest"}onCreate(){this.store.setExtensionStore("addSuggester",t=>cC(this.store.getState(),t)),this.store.setExtensionStore("removeSuggester",t=>Iz(this.store.getState(),t))}createExternalPlugins(){var t,e;const n=[];for(const r of this.store.extensions){if((t=this.store.managerSettings.exclude)!=null&&t.suggesters)break;if(!r.createSuggesters||(e=r.options.exclude)!=null&&e.suggesters)continue;const o=r.createSuggesters(),i=Bt(o)?o:[o];n.push(...i)}return[Lz(...n)]}getSuggestState(t){return Rb(t??this.store.getState())}getSuggestMethods(){const{addIgnored:t,clearIgnored:e,removeIgnored:n,ignoreNextExit:r,setMarkRemoved:o,findMatchAtPosition:i,findNextTextSelection:s,setLastChangeFromAppend:l}=this.getSuggestState();return{addIgnored:t,clearIgnored:e,removeIgnored:n,ignoreNextExit:r,setMarkRemoved:o,findMatchAtPosition:i,findNextTextSelection:s,setLastChangeFromAppend:l}}isSuggesterActive(t){var e;return sr(Bt(t)?t:[t],(e=this.getSuggestState().match)==null?void 0:e.suggester.name)}};me([bt()],zc.prototype,"getSuggestState",1);me([bt()],zc.prototype,"getSuggestMethods",1);me([bt()],zc.prototype,"isSuggesterActive",1);zc=me([Pe({customHandlerKeys:["suggester"]})],zc);var P0=class extends yt{constructor(){super(...arguments),this.allTags=be(),this.plainTags=be(),this.markTags=be(),this.nodeTags=be()}get name(){return"tags"}onCreate(){this.resetTags();for(const t of this.store.extensions)this.updateTagForExtension(t);this.store.setStoreKey("tags",this.allTags),this.store.setExtensionStore("tags",this.allTags),this.store.setStoreKey("plainTags",this.plainTags),this.store.setExtensionStore("plainTags",this.plainTags),this.store.setStoreKey("markTags",this.markTags),this.store.setExtensionStore("markTags",this.markTags),this.store.setStoreKey("nodeTags",this.nodeTags),this.store.setExtensionStore("nodeTags",this.nodeTags)}resetTags(){const t=be(),e=be(),n=be(),r=be();for(const o of rm(Ee))t[o]=[],e[o]=[],n[o]=[],r[o]=[];this.allTags=t,this.plainTags=e,this.markTags=n,this.nodeTags=r}updateTagForExtension(t){var e,n;const r=new Set([...t.tags??[],...((e=t.createTags)==null?void 0:e.call(t))??[],...t.options.extraTags??[],...((n=this.store.managerSettings.extraTags)==null?void 0:n[t.name])??[]]);for(const o of r)we(VB(o),{code:re.EXTENSION,message:`The tag provided by the extension: ${t.constructorName} is not supported by the editor. To add custom tags you can use the 'mutateTag' method.`}),this.allTags[o].push(t.name),iM(t)&&this.plainTags[o].push(t.name),bm(t)&&this.markTags[o].push(t.name),Vh(t)&&this.nodeTags[o].push(t.name);t.tags=[...r]}};P0=me([Pe({defaultPriority:dt.Highest})],P0);function VB(t){return sr(rm(Ee),t)}var jB=new gl("remirrorFilePlaceholderPlugin");function GB(){const t=new gi({key:jB,state:{init(){return{set:je.empty,payloads:new Map}},apply(e,{set:n,payloads:r}){n=n.map(e.mapping,e.doc);const o=e.getMeta(t);if(o)if(o.type===0){const i=document.createElement("placeholder"),s=kt.widget(o.pos,i,{id:o.id});n=n.add(e.doc,[s]),r.set(o.id,o.payload)}else o.type===1&&(n=n.remove(n.find(void 0,void 0,i=>i.id===o.id)),r.delete(o.id));return{set:n,payloads:r}}},props:{decorations(e){var n;return((n=t.getState(e))==null?void 0:n.set)??null}}});return t}var KB=class extends yt{get name(){return"upload"}createExternalPlugins(){return[GB()]}};function YB(t={}){t={...{exitMarksOnArrowPress:$o.defaultOptions.exitMarksOnArrowPress,excludeBaseKeymap:$o.defaultOptions.excludeBaseKeymap,selectParentNodeOnEscape:$o.defaultOptions.selectParentNodeOnEscape,undoInputRuleOnBackspace:$o.defaultOptions.undoInputRuleOnBackspace,persistentSelectionClass:Uo.defaultOptions.persistentSelectionClass},...t};const n=u0(t,["excludeBaseKeymap","selectParentNodeOnEscape","undoInputRuleOnBackspace"]),r=u0(t,["persistentSelectionClass"]);return[new P0,new D0,new xB,new tg,new N0,new $B,new NB,new zc,new We,new go,new $o(n),new L0,new KB,new Uo(r)]}var wC=class extends yt{get name(){return"meta"}onCreate(){if(this.store.setStoreKey("getCommandMeta",this.getCommandMeta.bind(this)),!!this.options.capture)for(const t of this.store.extensions)this.captureCommands(t),this.captureKeybindings(t)}createPlugin(){return{}}captureCommands(t){const e=t.decoratedCommands??{},n=t.createCommands;for(const r of Object.keys(e)){const o=t[r];t[r]=(...i)=>s=>{var l;const a=o(...i)(s);return s.dispatch&&a&&this.setCommandMeta(s.tr,{type:"command",chain:s.dispatch!==((l=s.view)==null?void 0:l.dispatch),name:r,extension:t.name,decorated:!0}),a}}n&&(t.createCommands=()=>{const r=n();for(const[o,i]of Object.entries(r))r[o]=(...s)=>l=>{var a;const u=i(...s)(l);return l.dispatch&&u&&this.setCommandMeta(l.tr,{type:"command",chain:l.dispatch!==((a=l.view)==null?void 0:a.dispatch),name:o,extension:t.name,decorated:!1}),u};return r})}captureKeybindings(t){}getCommandMeta(t){return t.getMeta(this.pluginKey)??[]}setCommandMeta(t,e){const n=this.getCommandMeta(t);t.setMeta(this.pluginKey,[...n,e])}};wC=me([Pe({defaultOptions:{capture:Br.isDevelopment},staticKeys:["capture"],defaultPriority:dt.Highest})],wC);var ap,Wu,lp,Yl,us,cp,up,XB=class{constructor(t){Qt(this,ap,Rc()),Qt(this,Wu,void 0),Qt(this,lp,void 0),Qt(this,Yl,!0),Qt(this,us,vm()),Qt(this,cp,void 0),Qt(this,up,void 0),this.getState=()=>this.view.state??this.initialEditorState,this.getPreviousState=()=>this.previousState,this.dispatchTransaction=i=>{var s,l;we(!this.manager.destroyed,{code:re.MANAGER_PHASE_ERROR,message:"A transaction was dispatched to a manager that has already been destroyed. Please check your set up, or open an issue."}),i=((l=(s=this.props).onDispatchTransaction)==null?void 0:l.call(s,i,this.getState()))??i;const a=this.getState(),{state:u,transactions:c}=a.applyTransaction(i);mn(this,lp,a),this.updateState({state:u,tr:i,transactions:c});const d=this.manager.store.getForcedUpdates(i);Bs(d)||this.updateViewProps(...d)},this.onChange=(i=be())=>{var s,l;const a=this.eventListenerProps(i);le(this,Yl)&&mn(this,Yl,!1),(l=(s=this.props).onChange)==null||l.call(s,a)},this.onBlur=i=>{var s,l;const a=this.eventListenerProps();(l=(s=this.props).onBlur)==null||l.call(s,a,i),le(this,us).emit("blur",a,i)},this.onFocus=i=>{var s,l;const a=this.eventListenerProps();(l=(s=this.props).onFocus)==null||l.call(s,a,i),le(this,us).emit("focus",a,i)},this.setContent=(i,{triggerChange:s=!1}={})=>{const{doc:l}=this.manager.createState({content:i}),a=this.getState(),{state:u}=this.getState().applyTransaction(a.tr.replaceRangeWith(0,a.doc.nodeSize-2,l));if(s)return this.updateState({state:u,triggerChange:s});this.view.updateState(u)},this.clearContent=({triggerChange:i=!1}={})=>{this.setContent(this.manager.createEmptyDoc(),{triggerChange:i})},this.createStateFromContent=(i,s)=>this.manager.createState({content:i,selection:s}),this.focus=i=>{this.manager.store.commands.focus(i)},this.blur=i=>{this.manager.store.commands.blur(i)};const{getProps:e,initialEditorState:n,element:r}=t;if(mn(this,Wu,e),mn(this,up,n),this.manager.attachFramework(this,this.updateListener.bind(this)),this.manager.view)return;const o=this.createView(n,r);this.manager.addView(o)}get addHandler(){return le(this,cp)??mn(this,cp,le(this,us).on.bind(le(this,us)))}get updatableViewProps(){return{attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0}}get firstRender(){return le(this,Yl)}get props(){return le(this,Wu).call(this)}get previousState(){return this.previousStateOverride??le(this,lp)??this.initialEditorState}get manager(){return this.props.manager}get view(){return this.manager.view}get uid(){return le(this,ap)}get initialEditorState(){return le(this,up)}updateListener(t){const{state:e,tr:n}=t;return le(this,us).emit("updated",this.eventListenerProps({state:e,tr:n}))}update(t){const{getProps:e}=t;return mn(this,Wu,e),this}updateViewProps(...t){const e=u0(this.updatableViewProps,t);this.view.setProps({...this.view.props,...e})}getAttributes(t){var e;const{attributes:n,autoFocus:r,classNames:o=[],label:i,editable:s}=this.props,l=(e=this.manager.store)==null?void 0:e.attributes,a=tt(n)?n(this.eventListenerProps()):n;let u={};(r||Yr(r))&&(u=t?{autoFocus:!0}:{autofocus:"true"});const c=Mc(Pc(t&&"Prosemirror","remirror-editor",l==null?void 0:l.class,...o).split(" ")).join(" "),d={role:"textbox",...u,"aria-multiline":"true",...s??!0?{}:{"aria-readonly":"true"},"aria-label":i??"",...l,class:c};return aR({...d,...a})}addFocusListeners(){this.view.dom.addEventListener("blur",this.onBlur),this.view.dom.addEventListener("focus",this.onFocus)}removeFocusListeners(){this.view.dom.removeEventListener("blur",this.onBlur),this.view.dom.removeEventListener("focus",this.onFocus)}destroy(){le(this,us).emit("destroy"),this.view&&this.removeFocusListeners()}eventListenerProps(t=be()){const{state:e,tr:n,transactions:r}=t;return{tr:n,transactions:r,internalUpdate:!n,view:this.view,firstRender:le(this,Yl),state:e??this.getState(),createStateFromContent:this.createStateFromContent,previousState:this.previousState,helpers:this.manager.store.helpers}}get baseOutput(){return{manager:this.manager,...this.manager.store,addHandler:this.addHandler,focus:this.focus,blur:this.blur,uid:le(this,ap),view:this.view,getState:this.getState,getPreviousState:this.getPreviousState,getExtension:this.manager.getExtension.bind(this.manager),hasExtension:this.manager.hasExtension.bind(this.manager),clearContent:this.clearContent,setContent:this.setContent}}};ap=new WeakMap;Wu=new WeakMap;lp=new WeakMap;Yl=new WeakMap;us=new WeakMap;cp=new WeakMap;up=new WeakMap;function qB(t,e){const n=[],r=new WeakMap,o=[],i=new WeakMap;let s=[];const l={duplicateMap:i,parentExtensions:o,gatheredExtensions:s,settings:e};for(const d of t)aM(l,{extension:d});s=Ka(s,(d,h)=>h.priority-d.priority);const a=new WeakSet,u=new Set;for(const d of s){const h=d.constructor,f=d.name,p=i.get(h);we(p,{message:`No entries were found for the ExtensionConstructor ${d.name}`,code:re.INTERNAL}),!(a.has(h)||u.has(f))&&(a.add(h),u.add(f),n.push(d),r.set(h,d),p.forEach(g=>g==null?void 0:g.replaceChildExtension(h,d)))}const c=[];for(const d of n)ZB({extension:d,found:a,missing:c});return we(Bs(c),{code:re.MISSING_REQUIRED_EXTENSION,message:c.map(({Constructor:d,extension:h})=>`The extension '${h.name}' requires '${d.name} in order to run correctly.`).join(` +`)}),{extensions:n,extensionMap:r}}function aM(t,e){var n;const{gatheredExtensions:r,duplicateMap:o,parentExtensions:i,settings:s}=t,{extension:l,parentExtension:a}=e;let{names:u=[]}=e;we(oM(l),{code:re.INVALID_MANAGER_EXTENSION,message:`An invalid extension: ${l} was provided to the [[\`RemirrorManager\`]].`});const c=l.extensions;if(l.setPriority((n=s.priority)==null?void 0:n[l.name]),r.push(l),QB({duplicateMap:o,extension:l,parentExtension:a}),c.length!==0){if(u.includes(l.name)){`${u.join(" > ")}${l.name}`;return}u=[...u,l.name],i.push(l);for(const d of c)aM(t,{names:u,extension:d,parentExtension:l})}}function ZB(t){const{extension:e,found:n,missing:r}=t;if(e.requiredExtensions)for(const o of e.requiredExtensions??[])n.has(o)||r.push({Constructor:o,extension:e})}function QB(t){const{duplicateMap:e,extension:n,parentExtension:r}=t,o=n.constructor,i=e.get(o),s=r?[r]:[];e.set(o,i?[...i,...s]:s)}function JB(t){var e,n,r,o;const{extension:i,nodeNames:s,markNames:l,plainNames:a,store:u,handlers:c}=t;i.setStore(u);const d=(e=i.onCreate)==null?void 0:e.bind(i),h=(n=i.onView)==null?void 0:n.bind(i),f=(r=i.onStateUpdate)==null?void 0:r.bind(i),p=(o=i.onDestroy)==null?void 0:o.bind(i);d&&c.create.push(d),h&&c.view.push(h),f&&c.update.push(f),p&&c.destroy.push(p),bm(i)&&l.push(i.name),Vh(i)&&i.name!=="doc"&&s.push(i.name),iM(i)&&a.push(i.name)}var ds,Vu,_o,Si,ju,Nr,ma,Gu,va,Ku,ya,Ro,Yu,dp=class{constructor(t,e={}){Qt(this,ds,void 0),Qt(this,Vu,be()),Qt(this,_o,be()),Qt(this,Si,void 0),Qt(this,ju,void 0),Qt(this,Nr,mr.None),Qt(this,ma,void 0),Qt(this,Gu,!0),Qt(this,va,{create:[],view:[],update:[],destroy:[]}),Qt(this,Ku,[]),Qt(this,ya,vm()),Qt(this,Ro,void 0),Qt(this,Yu,void 0),this.getState=()=>{var o;return le(this,Nr)>=mr.EditorView?this.view.state:(we(le(this,Ro),{code:re.MANAGER_PHASE_ERROR,message:"`getState` can only be called after the `Framework` or the `EditorView` has been added to the manager`. Check your plugins to make sure that the decorations callback uses the state argument."}),(o=le(this,Ro))==null?void 0:o.initialEditorState)},this.updateState=o=>{const i=this.getState();this.view.updateState(o),this.onStateUpdate({previousState:i,state:o})};const{extensions:n,extensionMap:r}=qB(t,e);mn(this,ma,e),mn(this,Si,Oa(n)),mn(this,ju,r),mn(this,ds,this.createExtensionStore()),mn(this,Nr,mr.Create),this.setupLifecycleHandlers();for(const o of le(this,va).create){const i=o();i&&le(this,Ku).push(i)}}static create(t,e={}){return new dp([...hR(t),...YB(e.builtin)],e)}get[Bi](){return bn.Manager}get destroyed(){return le(this,Nr)===mr.Destroy}get mounted(){return le(this,Nr)>=mr.EditorView&&le(this,Nr)le(this,Si),enumerable:e},phase:{get:()=>le(this,Nr),enumerable:e},view:{get:()=>this.view,enumerable:e},managerSettings:{get:()=>Oa(le(this,ma)),enumerable:e},getState:{value:this.getState,enumerable:e},updateState:{value:this.updateState,enumerable:e},isMounted:{value:()=>this.mounted,enumerable:e},getExtension:{value:this.getExtension.bind(this),enumerable:e},manager:{get:()=>this,enumerable:e},document:{get:()=>this.document,enumerable:e},stringHandlers:{get:()=>le(this,Vu),enumerable:e},currentState:{get:()=>n??(n=this.getState()),set:o=>{n=o},enumerable:e},previousState:{get:()=>r,set:o=>{r=o},enumerable:e}}),t.getStoreKey=this.getStoreKey.bind(this),t.setStoreKey=this.setStoreKey.bind(this),t.setExtensionStore=this.setExtensionStore.bind(this),t.setStringHandler=this.setStringHandler.bind(this),t}addView(t){if(le(this,Nr)>=mr.EditorView)return this;mn(this,Gu,!0),mn(this,Nr,mr.EditorView),le(this,_o).view=t;for(const e of le(this,va).view){const n=e(t);n&&le(this,Ku).push(n)}return this}attachFramework(t,e){var n;le(this,Ro)!==t&&(le(this,Ro)&&(le(this,Ro).destroy(),(n=le(this,Yu))==null||n.call(this)),mn(this,Ro,t),mn(this,Yu,this.addHandler("stateUpdate",e)))}createEmptyDoc(){var t;const e=(t=this.schema.nodes.doc)==null?void 0:t.createAndFill();return we(e,{code:re.INVALID_CONTENT,message:"An empty node could not be created due to an invalid schema."}),e}createState(t={}){const{onError:e,defaultSelection:n="end"}=this.settings,{content:r=this.createEmptyDoc(),selection:o=n,stringHandler:i=this.settings.stringHandler}=t,{schema:s,plugins:l}=this.store,a=F2({stringHandler:ke(i)?this.stringHandlers[i]:i,document:this.document,content:r,onError:e,schema:s,selection:o});return Ia.create({schema:s,doc:a,plugins:l,selection:po(o,a)})}addHandler(t,e){return le(this,ya).on(t,e)}onStateUpdate(t){const e=le(this,Gu);le(this,ds).currentState=t.state,le(this,ds).previousState=t.previousState,e&&(mn(this,Nr,mr.Runtime),mn(this,Gu,!1));const n={...t,firstUpdate:e};for(const r of le(this,va).update)r(n);le(this,ya).emit("stateUpdate",n)}getExtension(t){const e=le(this,ju).get(t);return we(e,{code:re.INVALID_MANAGER_EXTENSION,message:`'${t.name}' doesn't exist within this manager. Make sure it is properly added before attempting to use it.`}),e}hasExtension(t){return!!le(this,ju).get(t)}clone(){const t=le(this,Si).map(n=>n.clone(n.options)),e=dp.create(()=>t,le(this,ma));return le(this,ya).emit("clone",e),e}recreate(t=[],e={}){const n=le(this,Si).map(o=>o.clone(o.initialOptions)),r=dp.create(()=>[...n,...t],e);return le(this,ya).emit("recreate",r),r}destroy(){var t,e,n,r,o,i;mn(this,Nr,mr.Destroy);for(const s of((t=this.view)==null?void 0:t.state.plugins)??[])(n=(e=s.getState(this.view.state))==null?void 0:e.destroy)==null||n.call(e);(r=le(this,Ro))==null||r.destroy(),(o=le(this,Yu))==null||o.call(this);for(const s of le(this,Ku))s();for(const s of le(this,va).destroy)s();(i=this.view)==null||i.destroy(),le(this,ya).emit("destroy")}includes(t){const e=[],n=[];for(const r of le(this,Si))e.push(r.name,r.constructorName),n.push(r.constructor);return t.every(r=>ke(r)?sr(e,r):sr(n,r))}},eH=dp;ds=new WeakMap;Vu=new WeakMap;_o=new WeakMap;Si=new WeakMap;ju=new WeakMap;Nr=new WeakMap;ma=new WeakMap;Gu=new WeakMap;va=new WeakMap;Ku=new WeakMap;ya=new WeakMap;Ro=new WeakMap;Yu=new WeakMap;function tH(t,e){return!lu(t)||!cu(t,bn.Manager)?!1:e?t.includes(e):!0}var nH=Object.defineProperty,rH=Object.getOwnPropertyDescriptor,jh=(t,e,n,r)=>{for(var o=r>1?void 0:r?rH(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&nH(e,n,o),o},lM=/\S+/g;function cM(t){return t.type.isTextblock?1:t.type.isText?t.textBetween(0,t.nodeSize).length:0}function oH({doc:t},e){let n=0,r=0;return t.nodesBetween(0,t.nodeSize-2,(o,i)=>{if(r>0)return!1;const s=cM(o);return n+s>e?(r=i+1+(e-n),!1):(n+=s,!0)}),r}function iH({doc:t},e){let n=0,r=0;return t.nodesBetween(0,t.nodeSize-2,(o,i)=>{if(r>0)return!1;if(!o.type.isText)return!0;const s=o.textBetween(0,o.nodeSize),l=su(s,lM);if(n+l.length>e){const a=e-n,u=l[a];return r=i+((u==null?void 0:u.index)??0),!1}return n+=l.length,!0}),r}var Vs=class extends yt{get name(){return"count"}getCountMaximum(){return this.options.maximum}getCharacterCount(t=this.store.getState()){let e=0;return t.doc.nodesBetween(0,t.doc.nodeSize-2,n=>(e+=cM(n),!0)),Math.max(e-1,0)}getWordCount(t=this.store.getState()){const e=this.store.helpers.getText({lineBreakDivider:" ",state:t});return su(e,lM).length}isCountValid(t=this.store.getState()){const{maximumStrategy:e,maximum:n}=this.options;return n<1?!0:e==="CHARACTERS"?this.store.helpers.getCharacterCount(t)<=n:this.store.helpers.getWordCount(t)<=n}createDecorationSet(t){const{maximum:e=-1,maximumStrategy:n,maximumExceededClassName:r}=this.options,s=(n==="CHARACTERS"?oH:iH)(t,e);return je.create(t.doc,[kt.inline(s,t.doc.nodeSize-2,{class:r})])}createExternalPlugins(){const{maximum:t}=this.options,e=new gi({state:{init:(n,r)=>this.isCountValid(r)?{decorationSet:je.empty}:{decorationSet:this.createDecorationSet(r)},apply:(n,r,o,i)=>!n.docChanged||t<1?r:this.isCountValid(i)?{decorationSet:je.empty}:{decorationSet:this.createDecorationSet(i)}},props:{decorations(n){var r;return((r=e.getState(n))==null?void 0:r.decorationSet)??null}}});return[e]}};jh([bt()],Vs.prototype,"getCountMaximum",1);jh([bt()],Vs.prototype,"getCharacterCount",1);jh([bt()],Vs.prototype,"getWordCount",1);jh([bt()],Vs.prototype,"isCountValid",1);Vs=jh([Pe({defaultOptions:{maximum:-1,maximumExceededClassName:"remirror-max-count-exceeded",maximumStrategy:"CHARACTERS"},staticKeys:["maximum","maximumStrategy","maximumExceededClassName"]})],Vs);var sH="Expected a function",uM="__lodash_hash_undefined__",aH="[object Function]",lH="[object GeneratorFunction]",cH=/[\\^$.*+?()[\]{}|]/g,uH=/^\[object .+?Constructor\]$/,dH=typeof ut=="object"&&ut&&ut.Object===Object&&ut,hH=typeof self=="object"&&self&&self.Object===Object&&self,dM=dH||hH||Function("return this")();function fH(t,e){return t==null?void 0:t[e]}function pH(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}var gH=Array.prototype,mH=Function.prototype,hM=Object.prototype,u1=dM["__core-js_shared__"],xC=function(){var t=/[^.]+$/.exec(u1&&u1.keys&&u1.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),fM=mH.toString,Fb=hM.hasOwnProperty,vH=hM.toString,yH=RegExp("^"+fM.call(Fb).replace(cH,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),bH=gH.splice,wH=pM(dM,"Map"),Yd=pM(Object,"create");function Qa(t){var e=-1,n=t?t.length:0;for(this.clear();++e-1}function MH(t,e){var n=this.__data__,r=wm(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}du.prototype.clear=TH;du.prototype.delete=AH;du.prototype.get=_H;du.prototype.has=RH;du.prototype.set=MH;function vl(t){var e=-1,n=t?t.length:0;for(this.clear();++e4&&n.slice(0,4)===jb&&L6.test(e)&&(e.charAt(4)==="-"?r=D6(e):e=P6(e),o=M6),new o(r,e))}function D6(t){var e=t.slice(5).replace(SM,F6);return jb+e.charAt(0).toUpperCase()+e.slice(1)}function P6(t){var e=t.slice(4);return SM.test(e)?t:(e=e.replace(N6,z6),e.charAt(0)!=="-"&&(e="-"+e),jb+e)}function z6(t){return"-"+t.toLowerCase()}function F6(t){return t.charAt(1).toUpperCase()}var B6=H6,TC=/[#.]/g;function H6(t,e){for(var n=t||"",r=e||"div",o={},i=0,s,l,a;i=48&&e<=57}var cU=uU;function uU(t){var e=typeof t=="string"?t.charCodeAt(0):t;return e>=97&&e<=102||e>=65&&e<=70||e>=48&&e<=57}var dU=hU;function hU(t){var e=typeof t=="string"?t.charCodeAt(0):t;return e>=97&&e<=122||e>=65&&e<=90}var fU=dU,pU=AM,gU=mU;function mU(t){return fU(t)||pU(t)}var Af,vU=59,yU=bU;function bU(t){var e="&"+t+";",n;return Af=Af||document.createElement("i"),Af.innerHTML=e,n=Af.textContent,n.charCodeAt(n.length-1)===vU&&t!=="semi"||n===e?!1:n}var LC=sU,NC=aU,wU=AM,xU=cU,_M=gU,kU=yU,EU=DU,SU={}.hasOwnProperty,$l=String.fromCharCode,CU=Function.prototype,$C={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},TU=9,DC=10,AU=12,_U=32,PC=38,RU=59,MU=60,OU=61,IU=35,LU=88,NU=120,$U=65533,Xl="named",Yb="hexadecimal",Xb="decimal",qb={};qb[Yb]=16;qb[Xb]=10;var km={};km[Xl]=_M;km[Xb]=wU;km[Yb]=xU;var RM=1,MM=2,OM=3,IM=4,LM=5,F0=6,NM=7,ta={};ta[RM]="Named character references must be terminated by a semicolon";ta[MM]="Numeric character references must be terminated by a semicolon";ta[OM]="Named character references cannot be empty";ta[IM]="Numeric character references cannot be empty";ta[LM]="Named character references must be known";ta[F0]="Numeric character references cannot be disallowed";ta[NM]="Numeric character references cannot be outside the permissible Unicode range";function DU(t,e){var n={},r,o;e||(e={});for(o in $C)r=e[o],n[o]=r??$C[o];return(n.position.indent||n.position.start)&&(n.indent=n.position.indent||[],n.position=n.position.start),PU(t,n)}function PU(t,e){var n=e.additional,r=e.nonTerminated,o=e.text,i=e.reference,s=e.warning,l=e.textContext,a=e.referenceContext,u=e.warningContext,c=e.position,d=e.indent||[],h=t.length,f=0,p=-1,g=c.column||1,m=c.line||1,v="",y=[],b,w,k,x,S,T,C,O,_,R,A,E,M,I,N,L,$,D,F;for(typeof n=="string"&&(n=n.charCodeAt(0)),L=U(),O=s?W:CU,f--,h++;++f65535&&(T-=65536,R+=$l(T>>>10|55296),T=56320|T&1023),T=R+$l(T))):I!==Xl&&O(IM,D)),T?(B(),L=U(),f=F-1,g+=F-M+1,y.push(T),$=U(),$.offset++,i&&i.call(a,T,{start:L,end:$},t.slice(M-1,F)),L=$):(x=t.slice(M-1,F),v+=x,g+=x.length,f=F-1)}else S===10&&(m++,p++,g=0),S===S?(v+=$l(S),g++):B();return y.join("");function U(){return{line:m,column:g,offset:f+(c.offset||0)}}function W(H,V){var Y=U();Y.column+=V,Y.offset+=V,s.call(u,ta[H],Y,H)}function B(){v&&(y.push(v),o&&o.call(l,v,{start:L,end:U()}),v="")}}function zU(t){return t>=55296&&t<=57343||t>1114111}function FU(t){return t>=1&&t<=8||t===11||t>=13&&t<=31||t>=127&&t<=159||t>=64976&&t<=65007||(t&65535)===65535||(t&65535)===65534}var $M={exports:{}};(function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** * Prism: Lightweight, robust, elegant syntax highlighting * * @license MIT * @author Lea Verou * @namespace * @public - */var r=function(n){var o=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,s={},a={manual:n.Prism&&n.Prism.manual,disableWorkerMessageHandler:n.Prism&&n.Prism.disableWorkerMessageHandler,util:{encode:function g(v){return v instanceof l?new l(v.type,g(v.content),v.alias):Array.isArray(v)?v.map(g):v.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(k){var g=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(k.stack)||[])[1];if(g){var v=document.getElementsByTagName("script");for(var E in v)if(v[E].src==g)return v[E]}return null}},isActive:function(g,v,E){for(var k="no-"+v;g;){var x=g.classList;if(x.contains(v))return!0;if(x.contains(k))return!1;g=g.parentElement}return!!E}},languages:{plain:s,plaintext:s,text:s,txt:s,extend:function(g,v){var E=a.util.clone(a.languages[g]);for(var k in v)E[k]=v[k];return E},insertBefore:function(g,v,E,k){k=k||a.languages;var x=k[g],w={};for(var C in x)if(x.hasOwnProperty(C)){if(C==v)for(var T in E)E.hasOwnProperty(T)&&(w[T]=E[T]);E.hasOwnProperty(C)||(w[C]=x[C])}var O=k[g];return k[g]=w,a.languages.DFS(a.languages,function(_,P){P===O&&_!=g&&(this[_]=w)}),w},DFS:function g(v,E,k,x){x=x||{};var w=a.util.objId;for(var C in v)if(v.hasOwnProperty(C)){E.call(v,C,v[C],k||C);var T=v[C],O=a.util.type(T);O==="Object"&&!x[w(T)]?(x[w(T)]=!0,g(T,E,null,x)):O==="Array"&&!x[w(T)]&&(x[w(T)]=!0,g(T,E,C,x))}}},plugins:{},highlightAll:function(g,v){a.highlightAllUnder(document,g,v)},highlightAllUnder:function(g,v,E){var k={callback:E,container:g,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};a.hooks.run("before-highlightall",k),k.elements=Array.prototype.slice.apply(k.container.querySelectorAll(k.selector)),a.hooks.run("before-all-elements-highlight",k);for(var x=0,w;w=k.elements[x++];)a.highlightElement(w,v===!0,k.callback)},highlightElement:function(g,v,E){var k=a.util.getLanguage(g),x=a.languages[k];a.util.setLanguage(g,k);var w=g.parentElement;w&&w.nodeName.toLowerCase()==="pre"&&a.util.setLanguage(w,k);var C=g.textContent,T={element:g,language:k,grammar:x,code:C};function O(P){T.highlightedCode=P,a.hooks.run("before-insert",T),T.element.innerHTML=T.highlightedCode,a.hooks.run("after-highlight",T),a.hooks.run("complete",T),E&&E.call(T.element)}if(a.hooks.run("before-sanity-check",T),w=T.element.parentElement,w&&w.nodeName.toLowerCase()==="pre"&&!w.hasAttribute("tabindex")&&w.setAttribute("tabindex","0"),!T.code){a.hooks.run("complete",T),E&&E.call(T.element);return}if(a.hooks.run("before-highlight",T),!T.grammar){O(a.util.encode(T.code));return}if(v&&n.Worker){var _=new Worker(a.filename);_.onmessage=function(P){O(P.data)},_.postMessage(JSON.stringify({language:T.language,code:T.code,immediateClose:!0}))}else O(a.highlight(T.code,T.grammar,T.language))},highlight:function(g,v,E){var k={code:g,grammar:v,language:E};if(a.hooks.run("before-tokenize",k),!k.grammar)throw new Error('The language "'+k.language+'" has no grammar.');return k.tokens=a.tokenize(k.code,k.grammar),a.hooks.run("after-tokenize",k),l.stringify(a.util.encode(k.tokens),k.language)},tokenize:function(g,v){var E=v.rest;if(E){for(var k in E)v[k]=E[k];delete v.rest}var x=new d;return p(x,x.head,g),u(g,x,v,x.head,0),h(x)},hooks:{all:{},add:function(g,v){var E=a.hooks.all;E[g]=E[g]||[],E[g].push(v)},run:function(g,v){var E=a.hooks.all[g];if(!(!E||!E.length))for(var k=0,x;x=E[k++];)x(v)}},Token:l};n.Prism=a;function l(g,v,E,k){this.type=g,this.content=v,this.alias=E,this.length=(k||"").length|0}l.stringify=function g(v,E){if(typeof v=="string")return v;if(Array.isArray(v)){var k="";return v.forEach(function(O){k+=g(O,E)}),k}var x={type:v.type,content:g(v.content,E),tag:"span",classes:["token",v.type],attributes:{},language:E},w=v.alias;w&&(Array.isArray(w)?Array.prototype.push.apply(x.classes,w):x.classes.push(w)),a.hooks.run("wrap",x);var C="";for(var T in x.attributes)C+=" "+T+'="'+(x.attributes[T]||"").replace(/"/g,""")+'"';return"<"+x.tag+' class="'+x.classes.join(" ")+'"'+C+">"+x.content+""};function c(g,v,E,k){g.lastIndex=v;var x=g.exec(E);if(x&&k&&x[1]){var w=x[1].length;x.index+=w,x[0]=x[0].slice(w)}return x}function u(g,v,E,k,x,w){for(var C in E)if(!(!E.hasOwnProperty(C)||!E[C])){var T=E[C];T=Array.isArray(T)?T:[T];for(var O=0;O=w.reach);M+=R.value.length,R=R.next){var L=R.value;if(v.length>g.length)return;if(!(L instanceof l)){var K=1,q;if(B){if(q=c(G,M,g,$),!q||q.index>=g.length)break;var fe=q.index,Re=q.index+q[0].length,ae=M;for(ae+=R.value.length;fe>=ae;)R=R.next,ae+=R.value.length;if(ae-=R.value.length,M=ae,R.value instanceof l)continue;for(var pe=R;pe!==v.tail&&(aew.reach&&(w.reach=gt);var it=R.prev;Ae&&(it=p(v,it,Ae),M+=Ae.length),f(v,it,K);var Ir=new l(C,P?a.tokenize(ge,P):ge,F,ge);if(R=p(v,it,Ir),Te&&p(v,R,Te),K>1){var me={cause:C+","+O,reach:gt};u(g,v,E,R.prev,M,me),w&&me.reach>w.reach&&(w.reach=me.reach)}}}}}}function d(){var g={value:null,prev:null,next:null},v={value:null,prev:g,next:null};g.next=v,this.head=g,this.tail=v,this.length=0}function p(g,v,E){var k=v.next,x={value:E,prev:v,next:k};return v.next=x,k.prev=x,g.length++,x}function f(g,v,E){for(var k=v.next,x=0;x/,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]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(t){t.type==="entity"&&(t.attributes.title=t.content.value.replace(/&/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(r,n){var o={};o["language-"+n]={pattern:/(^$)/i,lookbehind:!0,inside:e.languages[n]},o.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:o}};i["language-"+n]={pattern:/[\s\S]+/,inside:e.languages[n]};var s={};s[r]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return r}),"i"),lookbehind:!0,greedy:!0,inside:i},e.languages.insertBefore("markup","cdata",s)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(t,r){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[r,"language-"+r],inside:e.languages[r]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}var S7=Ov;Ov.displayName="css";Ov.aliases=[];function Ov(e){(function(t){var r=/(?:"(?:\\(?:\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\\((?:"+r.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+r.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+r.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:r,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"))})(e)}var w7=Av;Av.displayName="clike";Av.aliases=[];function Av(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}var T7=Nv;Nv.displayName="javascript";Nv.aliases=["js"];function Nv(e){e.languages.javascript=e.languages.extend("clike",{"class-name":[e.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\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:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}var Qc=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof Zo=="object"?Zo:{},C7=U7();Qc.Prism={manual:!0,disableWorkerMessageHandler:!0};var O7=U8,A7=o7,JA=k7,N7=x7,R7=S7,_7=w7,I7=T7;C7();var Rv={}.hasOwnProperty;function QA(){}QA.prototype=JA;var At=new QA,M7=At;At.highlight=D7;At.register=qd;At.alias=L7;At.registered=P7;At.listLanguages=z7;qd(N7);qd(R7);qd(_7);qd(I7);At.util.encode=H7;At.Token.stringify=$7;function qd(e){if(typeof e!="function"||!e.displayName)throw new Error("Expected `function` for `grammar`, got `"+e+"`");At.languages[e.displayName]===void 0&&e(At)}function L7(e,t){var r=At.languages,n=e,o,i,s,a;t&&(n={},n[e]=t);for(o in n)for(i=n[o],i=typeof i=="string"?[i]:i,s=i.length,a=-1;++aparseInt(Ju(a,2),16)),parseInt(Ju(s[3]||"f",2),16)/255]}const n=Y7.exec(t);if(n){const s=Array.from(n).slice(1);return[...s.slice(0,3).map(a=>parseInt(a,16)),parseInt(s[3]||"ff",16)/255]}const o=q7.exec(t);if(o){const s=Array.from(o).slice(1);return[...s.slice(0,3).map(a=>parseInt(a,10)),parseFloat(s[3]||"1")]}const i=X7.exec(t);if(i){const[s,a,l,c]=Array.from(i).slice(1).map(parseFloat);if(Qo(0,100,a)!==a)throw new eu(e);if(Qo(0,100,l)!==l)throw new eu(e);return[...J7(s,a,l),Number.isNaN(c)?1:c]}throw new eu(e)}function j7(e){let t=5381,r=e.length;for(;r;)t=t*33^e.charCodeAt(--r);return(t>>>0)%2341}const cw=e=>parseInt(e.replace(/_/g,""),36),G7="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((e,t)=>{const r=cw(t.substring(0,3)),n=cw(t.substring(3)).toString(16);let o="";for(let i=0;i<6-n.length;i++)o+="0";return e[r]=`${o}${n}`,e},{});function W7(e){const t=e.toLowerCase().trim(),r=G7[j7(t)];if(!r)throw new eu(e);return`#${r}`}const Ju=(e,t)=>Array.from(Array(t)).map(()=>e).join(""),K7=new RegExp(`^#${Ju("([a-f0-9])",3)}([a-f0-9])?$`,"i"),Y7=new RegExp(`^#${Ju("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),q7=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${Ju(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),X7=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,Z7=/^[a-z]+$/i,uw=e=>Math.round(e*255),J7=(e,t,r)=>{let n=r/100;if(t===0)return[n,n,n].map(uw);const o=(e%360+360)%360/60,i=(1-Math.abs(2*n-1))*(t/100),s=i*(1-Math.abs(o%2-1));let a=0,l=0,c=0;o>=0&&o<1?(a=i,l=s):o>=1&&o<2?(a=s,l=i):o>=2&&o<3?(l=i,c=s):o>=3&&o<4?(l=s,c=i):o>=4&&o<5?(a=s,c=i):o>=5&&o<6&&(a=i,c=s);const u=n-i/2,d=a+u,p=l+u,f=c+u;return[d,p,f].map(uw)};function Q7(e){const[t,r,n,o]=Iv(e).map((d,p)=>p===3?d:d/255),i=Math.max(t,r,n),s=Math.min(t,r,n),a=(i+s)/2;if(i===s)return[0,0,a,o];const l=i-s,c=a>.5?l/(2-i-s):l/(i+s);return[60*(t===i?(r-n)/l+(r.179}function Sl(e){return nH(e)?"#000":"#fff"}const oH="remirror-editor-wrapper",iH="remirror-button-active",sH="remirror-button",aH="remirror-composite",lH="remirror-dialog",cH="remirror-dialog-backdrop",uH="remirror-form",dH="remirror-form-message",pH="remirror-form-label",fH="remirror-form-group",hH="remirror-group",mH="remirror-input",gH="remirror-menu",yH="remirror-menu-pane",vH="remirror-menu-pane-active",bH="remirror-menu-dropdown-label",EH="remirror-menu-pane-icon",kH="remirror-menu-pane-label",xH="remirror-menu-pane-shortcut",SH="remirror-menu-button-left",wH="remirror-menu-button-right",TH="remirror-menu-button-nested-left",CH="remirror-menu-button-nested-right",OH="remirror-menu-button",AH="remirror-menu-bar",NH="remirror-flex-column",RH="remirror-flex-row",_H="remirror-menu-item",IH="remirror-menu-item-row",MH="remirror-menu-item-column",LH="remirror-menu-item-checkbox",DH="remirror-menu-item-radio",PH="remirror-menu-group",zH="remirror-floating-popover",$H="remirror-popover",BH="remirror-animated-popover",HH="remirror-role",FH="remirror-separator",UH="remirror-tab",VH="remirror-tab-list",jH="remirror-tabbable",GH="remirror-toolbar",WH="remirror-tooltip",KH="remirror-table-size-editor",YH="remirror-table-size-editor-body",qH="remirror-table-size-editor-cell",XH="remirror-table-size-editor-cell-selected",ZH="remirror-table-size-editor-footer",JH="remirror-color-picker",QH="remirror-color-picker-cell",eF="remirror-color-picker-cell-selected";var tF=Object.freeze({__proto__:null,ANIMATED_POPOVER:BH,BUTTON:sH,BUTTON_ACTIVE:iH,COLOR_PICKER:JH,COLOR_PICKER_CELL:QH,COLOR_PICKER_CELL_SELECTED:eF,COMPOSITE:aH,DIALOG:lH,DIALOG_BACKDROP:cH,EDITOR_WRAPPER:oH,FLEX_COLUMN:NH,FLEX_ROW:RH,FLOATING_POPOVER:zH,FORM:uH,FORM_GROUP:fH,FORM_LABEL:pH,FORM_MESSAGE:dH,GROUP:hH,INPUT:mH,MENU:gH,MENU_BAR:AH,MENU_BUTTON:OH,MENU_BUTTON_LEFT:SH,MENU_BUTTON_NESTED_LEFT:TH,MENU_BUTTON_NESTED_RIGHT:CH,MENU_BUTTON_RIGHT:wH,MENU_DROPDOWN_LABEL:bH,MENU_GROUP:PH,MENU_ITEM:_H,MENU_ITEM_CHECKBOX:LH,MENU_ITEM_COLUMN:MH,MENU_ITEM_RADIO:DH,MENU_ITEM_ROW:IH,MENU_PANE:yH,MENU_PANE_ACTIVE:vH,MENU_PANE_ICON:EH,MENU_PANE_LABEL:kH,MENU_PANE_SHORTCUT:xH,POPOVER:$H,ROLE:HH,SEPARATOR:FH,TAB:UH,TABBABLE:jH,TABLE_SIZE_EDITOR:KH,TABLE_SIZE_EDITOR_BODY:YH,TABLE_SIZE_EDITOR_CELL:qH,TABLE_SIZE_EDITOR_CELL_SELECTED:XH,TABLE_SIZE_EDITOR_FOOTER:ZH,TAB_LIST:VH,TOOLBAR:GH,TOOLTIP:WH});const rF="remirror-wrap",nF="remirror-language-select-positioner",oF="remirror-language-select-width",iF="remirror-a11y-dark",sF="remirror-atom-dark",aF="remirror-base16-ateliersulphurpool-light",lF="remirror-cb",cF="remirror-darcula",uF="remirror-dracula",dF="remirror-duotone-dark",pF="remirror-duotone-earth",fF="remirror-duotone-forest",hF="remirror-duotone-light",mF="remirror-duotone-sea",gF="remirror-duotone-space",yF="remirror-gh-colors",vF="remirror-hopscotch",bF="remirror-pojoaque",EF="remirror-vs",kF="remirror-xonokai";var y0=Object.freeze({__proto__:null,A11Y_DARK:iF,ATOM_DARK:sF,BASE16_ATELIERSULPHURPOOL_LIGHT:aF,CB:lF,DARCULA:cF,DRACULA:uF,DUOTONE_DARK:dF,DUOTONE_EARTH:pF,DUOTONE_FOREST:fF,DUOTONE_LIGHT:hF,DUOTONE_SEA:mF,DUOTONE_SPACE:gF,GH_COLORS:yF,HOPSCOTCH:vF,LANGUAGE_SELECT_POSITIONER:nF,LANGUAGE_SELECT_WIDTH:oF,POJOAQUE:bF,VS:EF,WRAP:rF,XONOKAI:kF});const xF="remirror-image-loader";var SF=Object.freeze({__proto__:null,IMAGE_LOADER:xF});const wF="remirror-list-item-with-custom-mark",TF="remirror-ul-list-content",CF="remirror-editor",OF="remirror-list-item-marker-container",AF="remirror-list-item-checkbox",NF="remirror-collapsible-list-item-closed",RF="remirror-collapsible-list-item-button",_F="remirror-list-spine";var us=Object.freeze({__proto__:null,COLLAPSIBLE_LIST_ITEM_BUTTON:RF,COLLAPSIBLE_LIST_ITEM_CLOSED:NF,EDITOR:CF,LIST_ITEM_CHECKBOX:AF,LIST_ITEM_MARKER_CONTAINER:OF,LIST_ITEM_WITH_CUSTOM_MARKER:wF,LIST_SPINE:_F,UL_LIST_CONTENT:TF});const IF="remirror-is-empty";var MF=Object.freeze({__proto__:null,IS_EMPTY:IF});const LF="remirror-editor",DF="remirror-positioner",PF="remirror-positioner-widget";var zF=Object.freeze({__proto__:null,EDITOR:LF,POSITIONER:DF,POSITIONER_WIDGET:PF});const $F="remirror-theme";function BF(e={}){const t=[],r={};function n(o,i){if(typeof i=="string"||typeof i=="number"){t.push(`${dw(o)}: ${i};`),r[dw(o)]=i;return}if(!(typeof i!="object"||!i))for(const[s,a]of Object.entries(i))n([...o,s],a)}for(const[o,i]of Object.entries(e))n([o],i);return{css:t.join(` -`),styles:r}}function HF(e){return e.replace(/([a-z])([\dA-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function dw(e){return`--rmr-${e.map(HF).join("-")}`}const Zn={gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]},ei="#000000",Mv="#ffffff",FF="#252103",Lv=Kf(ei,.75),pm="#7963d2",Dv="#bcd263",UF="#fff",VF="#fff",Pv=Zn.gray[1],pw="rgba(10,31,68,0.08)",fw="rgba(10,31,68,0.10)",hw="rgba(10,31,68,0.12)",jF=rf(Kf(ei,.1),.13),zv={background:Mv,border:Lv,foreground:ei,muted:Pv,primary:pm,secondary:Dv,primaryText:UF,secondaryText:VF,text:FF,faded:jF},GF={...zv,background:sn(Mv,.15),border:sn(Lv,.15),foreground:sn(ei,.15),muted:sn(Pv,.15),primary:sn(pm,.15),secondary:sn(Dv,.15),get text(){return Sl(this.background)},get primaryText(){return Sl(this.primary)},get secondaryText(){return Sl(this.secondary)}},WF={...zv,background:sn(Mv,.075),border:sn(Lv,.075),foreground:sn(ei,.075),muted:sn(Pv,.075),primary:sn(pm,.075),secondary:sn(Dv,.075),get text(){return Sl(this.background)},get primaryText(){return Sl(this.primary)},get secondaryText(){return Sl(this.secondary)}},As={color:{...zv,active:GF,hover:WF,shadow1:pw,shadow2:fw,shadow3:hw,backdrop:Kf(ei,.1),outline:Kf(pm,.6),table:{default:{border:rf(ei,.8),cell:rf(ei,.4),controller:Zn.gray[3]},selected:{border:Zn.blue[7],cell:Zn.blue[1],controller:Zn.blue[5]},preselect:{border:Zn.blue[7],cell:rf(ei,.4),controller:Zn.blue[5]},predelete:{border:Zn.red[7],cell:Zn.red[1],controller:Zn.red[5]},mark:"#91919196"}},hue:Zn,radius:{border:"0.25rem",extra:"0.5rem",circle:"50%"},fontFamily:{default:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif',heading:"inherit",mono:"Menlo, monospace"},fontSize:{0:"12px",1:"14px",2:"16px",3:"20px",4:"24px",5:"32px",6:"48px",7:"64px",8:"96px",default:"16px"},space:{1:"4px",2:"8px",3:"16px",4:"32px",5:"64px",6:"128px",7:"256px",8:"512px"},fontWeight:{bold:"700",default:"400",heading:"700"},letterSpacing:{tight:"-1px",default:"normal",loose:"1px",wide:"3px"},lineHeight:{heading:"1.25em",default:"1.5em"},boxShadow:{1:`0 1px 1px ${pw}`,2:`0 1px 1px ${fw}`,3:`0 1px 1px ${hw}`}};var KF=Object.defineProperty,YF=Object.getOwnPropertyDescriptor,mi=(e,t,r,n)=>{for(var o=n>1?void 0:n?YF(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&KF(t,r,o),o},eN=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},ki=(e,t,r)=>(eN(e,t,"read from private field"),r?r.call(e):t.get(e)),Gg=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Wg=(e,t,r,n)=>(eN(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),tN="data-code-block-language";function rN(e,t,r=[]){return e.map(n=>{const o=[...r];return n.type==="element"&&n.properties.className?o.push(...n.properties.className):n.type==="text"&&o.length===0&&t&&o.push(t),n.type==="element"?rN(n.children,t,o):{text:n.value,classes:o}})}function qF(e,t){var r;const{node:n,pos:o}=e,i=Yf({language:(r=n.attrs.language)==null?void 0:r.replace("language-",""),fallback:"markup"}),s=_v.highlight(n.textContent??"",i),a=rN(s,t);let l=o+1;function c(u){const d=l,p=d+u.text.length;return l=p,{...u,from:d,to:p}}return TC(a).map(c)}function mw(e){const{blocks:t,skipLast:r,plainTextClassName:n}=e,o=[];for(const i of t){const s=qF(i,n),a=r?s.length-1:s.length;for(const l of Uy(a)){const c=s[l],u=c==null?void 0:c.classes;if(!c||!(u!=null&&u.length))continue;const d=Je.inline(c.from,c.to,{class:u.join(" ")});o.push(d)}}return o}function XF(e){return!!(e&&nr(e)&&oe(e.language)&&e.language.length>0)}function ZF(e){return t=>({state:{tr:r,selection:n},dispatch:o})=>{if(!XF(t))throw new Error("Invalid attrs passed to the updateAttributes method");const i=Mo({types:e,selection:n});return!i||wC(t,i.node.attrs)?!1:(r.setNodeMarkup(i.pos,e,{...i.node.attrs,...t}),o&&o(r),!0)}}function Yf(e){const{language:t,fallback:r}=e;if(!t)return r;const n=_v.listLanguages();for(const o of n)if(o.toLowerCase()===t.toLowerCase())return o;return r}function JF(e,t){const{language:r,wrap:n}=om(e.attrs,t),{style:o,...i}=t.dom(e);let s=i.style;return n&&(s=qP({whiteSpace:"pre-wrap",wordBreak:"break-all"},s)),["pre",{spellcheck:"false",...i,class:Fl(i.class,`language-${r}`)},["code",{[tN]:r,style:s},0]]}function QF(e){return({pos:t}=te())=>({tr:r,dispatch:n})=>{const{type:o,formatter:i,defaultLanguage:s}=e,{from:a,to:l}=t?{from:t,to:t}:r.selection,c=Mo({types:o,selection:r.selection});if(!c)return!1;const{node:{attrs:u,textContent:d},start:p}=c,f=a-p,h=l-p,m=Yf({language:u.language,fallback:s}),b=i({source:d,language:m,cursorOffset:f});let y;if(f!==h&&(y=i({source:d,language:m,cursorOffset:h})),!b)return!1;const{cursorOffset:g,formatted:v}=b;if(v===d)return!1;const E=p+d.length;r.insertText(v,p,E);const k=p+g,x=y?p+y.cursorOffset:void 0;return r.setSelection(ue.between(r.doc.resolve(k),r.doc.resolve(x??k))),n&&n(r),!0}}function eU(e){var t;return(t=e.getAttribute(tN)??e.classList[0])==null?void 0:t.replace("language-","")}var{DESCRIPTION:tU,LABEL:rU}=P5,nU={icon:"bracesLine",description:({t:e})=>e(tU),label:({t:e})=>e(rU)},Is,tu,ru,oU=class{constructor(e,t){Gg(this,Is,void 0),Gg(this,tu,void 0),Gg(this,ru,!1),Wg(this,tu,e),Wg(this,Is,t)}init(e){const t=lz({node:e.doc,type:ki(this,tu)});return this.refreshDecorationSet(e.doc,t),this}refreshDecorationSet(e,t){const r=mw({blocks:t,skipLast:ki(this,ru),defaultLanguage:ki(this,Is).options.defaultLanguage,plainTextClassName:ki(this,Is).options.plainTextClassName??void 0});this.decorationSet=Ce.create(e,r)}apply(e,t){if(!e.docChanged)return this;this.decorationSet=this.decorationSet.map(e.mapping,e.doc);const r=cz(e,{descend:!0,predicate:n=>n.type===ki(this,tu),StepTypes:[]});return this.updateDecorationSet(e,r),this}updateDecorationSet(e,t){if(t.length===0)return;let r=this.decorationSet;for(const{node:n,pos:o}of t)r=this.decorationSet.remove(this.decorationSet.find(o,o+n.nodeSize));this.decorationSet=r.add(e.doc,mw({blocks:t,skipLast:ki(this,ru),defaultLanguage:ki(this,Is).options.defaultLanguage,plainTextClassName:ki(this,Is).options.plainTextClassName??void 0}))}setDeleted(e){Wg(this,ru,e)}};Is=new WeakMap;tu=new WeakMap;ru=new WeakMap;var zn=class extends or{get name(){return"codeBlock"}createTags(){return[ie.Block,ie.Code]}init(){this.registerLanguages()}createNodeSpec(e,t){const r=/highlight-(?:text|source)-([\da-z]+)/;return{content:"text*",marks:"",defining:!0,draggable:!1,...t,code:!0,attrs:{...e.defaults(),language:{default:this.options.defaultLanguage},wrap:{default:this.options.defaultWrap}},parseDOM:[{tag:"div.highlight",preserveWhitespace:"full",getAttrs:n=>{var o,i;if(!dt(n))return!1;const s=n.querySelector("pre.code");if(!dt(s))return!1;const a=go(s,"white-space")==="pre-wrap",l=(i=(o=n.className.match(r))==null?void 0:o[1])==null?void 0:i.replace("language-","");return{...e.parse(n),language:l,wrap:a}}},{tag:"pre",preserveWhitespace:"full",getAttrs:n=>{if(!dt(n))return!1;const o=n.querySelector("code");if(!dt(o))return!1;const i=go(o,"white-space")==="pre-wrap",s=this.options.getLanguageFromDom(o,n);return{...e.parse(n),language:s,wrap:i}}},...t.parseDOM??[]],toDOM:n=>JF(n,e)}}createAttributes(){return{class:y0[this.options.syntaxTheme.toUpperCase()]}}createInputRules(){const e=/^```([\dA-Za-z]*) $/,t=r=>({language:Yf({language:xl(r,1),fallback:this.options.defaultLanguage})});return[lA({regexp:e,type:this.type,beforeDispatch:({tr:r,start:n})=>{const o=r.doc.resolve(n);r.setSelection(ue.near(o))},getAttributes:t})]}onSetOptions(e){const{changes:t}=e;t.supportedLanguages.changed&&this.registerLanguages(),t.syntaxTheme.changed&&this.store.updateAttributes()}createPlugin(){const e=new oU(this.type,this),t=()=>(e.setDeleted(!0),!1);return{state:{init(r,n){return e.init(n)},apply(r,n,o,i){return e.apply(r,i)}},props:{handleKeyDown:pv({Backspace:t,"Mod-Backspace":t,Delete:t,"Mod-Delete":t,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t}),decorations(){return e.setDeleted(!1),e.decorationSet}}}}toggleCodeBlock(e={}){return uv({type:this.type,toggleType:this.options.toggleName,attrs:{language:this.options.defaultLanguage,...e}})}createCodeBlock(e){return qu(this.type,e)}updateCodeBlock(e){return ZF(this.type)(e)}formatCodeBlock(e){return QF({type:this.type,formatter:this.options.formatter,defaultLanguage:this.options.defaultLanguage})(e)}tabKey({state:e,dispatch:t}){const{selection:r,tr:n,schema:o}=e,{node:i}=kP(r);if(!em({node:i,types:this.type}))return!1;if(r.empty)n.insertText(" ");else{const{from:s,to:a}=r;n.replaceWith(s,a,o.text(" "))}return t&&t(n),!0}backspaceKey({dispatch:e,tr:t,state:r}){if(!t.selection.empty)return!1;const n=Mo({types:this.type,selection:t.selection});if((n==null?void 0:n.start)!==t.selection.from)return!1;const{pos:o,node:i,start:s}=n,a=lt(r.schema.nodes,this.options.toggleName);return i.textContent.trim()===""?t.doc.lastChild===i&&t.doc.firstChild===i?bP({pos:o,tr:t,content:a.create()}):vP({pos:o,tr:t}):s>2?t.setSelection(ue.near(t.doc.resolve(s-2))):(t.insert(0,a.create()),t.setSelection(ue.near(t.doc.resolve(1)))),e&&e(t),!0}enterKey({dispatch:e,tr:t}){if(!(vs(t.selection)&&t.selection.empty))return!1;const{nodeBefore:r,parent:n}=t.selection.$anchor;if(!(r!=null&&r.isText)||!n.type.isTextblock)return!1;const o=/^```([A-Za-z]*)?$/,{text:i,nodeSize:s}=r,{textContent:a}=n;if(!i)return!1;const l=i.match(o),c=a.match(o);if(!l||!c)return!1;const[,u]=l,d=Yf({language:u,fallback:this.options.defaultLanguage}),p=t.selection.$from.before(),f=p+s+1;return t.replaceWith(p,f,this.type.create({language:d})),t.setSelection(ue.near(t.doc.resolve(p+1))),e&&e(t),!0}formatShortcut({tr:e}){const t=this.store.commands;if(!YO({type:this.type,state:e}))return!1;const r=t.formatCodeBlock.isEnabled();return r&&t.formatCodeBlock(),r}registerLanguages(){for(const e of this.options.supportedLanguages)_v.register(e)}};mi([Z(nU)],zn.prototype,"toggleCodeBlock",1);mi([Z()],zn.prototype,"createCodeBlock",1);mi([Z()],zn.prototype,"updateCodeBlock",1);mi([Z()],zn.prototype,"formatCodeBlock",1);mi([Nt({shortcut:"Tab"})],zn.prototype,"tabKey",1);mi([Nt({shortcut:"Backspace"})],zn.prototype,"backspaceKey",1);mi([Nt({shortcut:"Enter"})],zn.prototype,"enterKey",1);mi([Nt({shortcut:V.Format})],zn.prototype,"formatShortcut",1);zn=mi([ye({defaultOptions:{supportedLanguages:[],toggleName:"paragraph",formatter:({source:e})=>({cursorOffset:0,formatted:e}),syntaxTheme:"a11y_dark",defaultLanguage:"markup",defaultWrap:!1,plainTextClassName:"",getLanguageFromDom:eU},staticKeys:["getLanguageFromDom"]})],zn);var iU=Object.defineProperty,sU=Object.getOwnPropertyDescriptor,$v=(e,t,r,n)=>{for(var o=n>1?void 0:n?sU(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&iU(t,r,o),o},nN=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},It=(e,t,r)=>(nN(e,t,"read from private field"),r?r.call(e):t.get(e)),Uo=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},xi=(e,t,r,n)=>(nN(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),nu,ou,tl,iu,nf,su,au,lu,cu,of=class{constructor(e){Uo(this,nu,sm()),Uo(this,ou,[]),Uo(this,tl,new Map),Uo(this,iu,[]),Uo(this,nf,!1),Uo(this,su,void 0),Uo(this,au,void 0),Uo(this,lu,void 0),Uo(this,cu,void 0),this.addListener=(t,r)=>It(this,nu).on(t,r),xi(this,su,e),xi(this,au,e.getActive),xi(this,cu,e.getPosition),xi(this,lu,e.getID),this.hasChanged=e.hasChanged,this.events=e.events??["state","scroll"]}static create(e){return new of(e)}static fromPositioner(e,t){return of.create({...e.basePositioner,...t})}get basePositioner(){return{getActive:It(this,au),getPosition:It(this,cu),hasChanged:this.hasChanged,events:this.events,getID:It(this,lu)}}onActiveChanged(e){this.recentUpdate=e;const t=It(this,au).call(this,e);xi(this,ou,t),xi(this,tl,new Map),xi(this,nf,!1),xi(this,iu,[]);const r=[];for(const[n,o]of t.entries()){const i=this.getID(o,n);It(this,iu).push(i),r.push({setElement:s=>this.addProps({...e,data:o,element:s},n),id:i,data:o})}It(this,nu).emit("update",r)}getID(e,t){var r;return((r=It(this,lu))==null?void 0:r.call(this,e,t))??t.toString()}addProps(e,t){if(It(this,nf)||(It(this,tl).set(t,e),It(this,tl).sizee;return this.clone(r=>({getActive:n=>r.getActive(n).filter(t)}))}},pn=of;nu=new WeakMap;ou=new WeakMap;tl=new WeakMap;iu=new WeakMap;nf=new WeakMap;su=new WeakMap;au=new WeakMap;lu=new WeakMap;cu=new WeakMap;pn.EMPTY=[];function aU(e,t=iN){const{key:r}=(e==null?void 0:e.getMeta(oN))??{};return r===t}function Bv(e){const{tr:t,state:r,previousState:n}=e;return!n||t&&aU(t)?!0:t?SP(t):!r.doc.eq(n.doc)||!r.selection.eq(n.selection)}function Hv(e,t,r={}){const n=t.getBoundingClientRect(),{accountForPadding:o=!1}=r;let i=0,s=0,a=0,l=0;if(dt(t)&&o){const u=Number.parseFloat(go(t,"padding-left").replace("px","")),d=Number.parseFloat(go(t,"padding-right").replace("px","")),p=Number.parseFloat(go(t,"padding-top").replace("px","")),f=Number.parseFloat(go(t,"padding-bottom").replace("px","")),h=Number.parseFloat(go(t,"border-left").replace("px","")),m=Number.parseFloat(go(t,"border-right").replace("px","")),b=Number.parseFloat(go(t,"border-top").replace("px","")),y=Number.parseFloat(go(t,"border-bottom").replace("px","")),g=t.offsetWidth-t.clientWidth,v=t.offsetHeight-t.clientHeight;i+=u+h+(t.dir==="rtl"?g:0),s+=d+m+(t.dir==="rtl"?0:g),a+=p+b,l+=f+y+v}const c=new DOMRect(n.left+i,n.top+a,n.width-s,n.height-l);for(const[u,d]of[[e.top,e.left],[e.top,e.right],[e.bottom,e.left],[e.bottom,e.right]])if(Ax(u,c.top,c.bottom)&&Ax(d,c.left,c.right))return!0;return!1}var lU="remirror-positioner-widget",oN="positionerUpdate",iN="__all_positioners__",sN={y:-999999,x:-999999,width:0,height:0},gw={...sN,left:-999999,top:-999999,bottom:-999999,right:-999999},fm={...sN,rect:{...gw,toJSON:()=>gw},visible:!1},aN=pn.create({hasChanged:Bv,getActive(e){const{state:t}=e;if(!sv(t)||t.selection.$anchor.depth>2)return pn.EMPTY;const r=Vd({predicate:n=>n.type.isBlock,selection:t});return r?[r]:pn.EMPTY},getPosition(e){const{view:t,data:r}=e,n=t.nodeDOM(r.pos);if(!dt(n))return fm;const o=n.getBoundingClientRect(),i=t.dom.getBoundingClientRect(),s=o.height,a=o.width,l=t.dom.scrollLeft+o.left-i.left,c=t.dom.scrollTop+o.top-i.top,u=Hv(o,t.dom);return{y:c,x:l,height:s,width:a,rect:o,visible:u}}}),Fv=aN.clone(({getActive:e})=>({getActive:t=>{const[r]=e(t);return r&&rm(r.node)&&r.node.type===tm(t.state.schema)?[r]:pn.EMPTY}})),cU=Fv.clone(({getPosition:e})=>({getPosition:t=>({...e(t),width:1})})),uU=Fv.clone(({getPosition:e})=>({getPosition:t=>{const{width:r,x:n,y:o,height:i}=e(t);return{...e(t),width:1,x:r+n,rect:new DOMRect(r+n,o,1,i)}}}));function Uv(e){return pn.create({hasChanged:Bv,getActive:t=>{const{state:r,view:n}=t;if(!e(r)||!vs(r.selection))return pn.EMPTY;try{const{head:o,anchor:i}=r.selection;return[{from:n.coordsAtPos(i),to:n.coordsAtPos(o)}]}catch{return pn.EMPTY}},getPosition(t){const{element:r,data:n,view:o}=t,{from:i,to:s}=n,a=r.offsetParent??o.dom,l=a.getBoundingClientRect(),c=Math.abs(s.bottom-i.top),u=c>i.bottom-i.top,d=Math.min(i.left,s.left),p=Math.min(i.top,s.top),f=a.scrollLeft+(u?s.left-l.left:d-l.left),h=a.scrollTop+p-l.top,m=u?1:Math.abs(i.left-s.right),b=new DOMRect(u?s.left:d,p,m,c),y=Hv(b,o.dom);return{rect:b,y:h,x:f,height:c,width:m,visible:y}}})}var lN=Uv(e=>!e.selection.empty),dU=Uv(e=>e.selection.empty),pU=Uv(()=>!0),fU=lN.clone(()=>({getActive:e=>{const{state:t,view:r}=e;if(!t.selection.empty)return pn.EMPTY;const n=eA(t);if(!n)return pn.EMPTY;try{return[{from:r.coordsAtPos(n.from),to:r.coordsAtPos(n.to)}]}catch{return pn.EMPTY}}})),hU={selection:lN,cursor:dU,always:pU,block:aN,emptyBlock:Fv,emptyBlockStart:cU,emptyBlockEnd:uU,nearestWord:fU},Vl=class extends Ye{constructor(){super(...arguments),this.positioners=[],this.onAddCustomHandler=({positioner:e})=>{if(e)return this.positioners=[...this.positioners,e],this.store.commands.forceUpdate(),()=>{this.positioners=this.positioners.filter(t=>t!==e)}}}get name(){return"positioner"}createAttributes(){return{class:zF.EDITOR}}init(){this.onScroll=bC(this.options.scrollDebounce,this.onScroll.bind(this))}createEventHandlers(){return{scroll:()=>(this.onScroll(),!1),hover:(e,t)=>(this.positioner(this.getBaseProps("hover",{hover:t})),!1),contextmenu:(e,t)=>(this.positioner(this.getBaseProps("contextmenu",{contextmenu:t})),!1)}}onStateUpdate(e){this.positioner({...e,previousState:e.firstUpdate?void 0:e.previousState,event:"state",helpers:this.store.helpers})}createDecorations(e){if(this.element??(this.element=this.createElement()),!this.element.hasChildNodes())return Ce.empty;const t=Je.widget(0,this.element,{key:"positioner-widget",side:-1,stopEvent:()=>!0});return Ce.create(e.doc,[t])}forceUpdatePositioners(e=iN){return({tr:t,dispatch:r})=>(r==null||r(t.setMeta(oN,{key:e})),!0)}getPositionerWidget(){return this.element??(this.element=this.createElement())}createElement(){const e=document.createElement("span");return e.dataset.id=lU,e.setAttribute("role","presentation"),e}triggerPositioner(e,t){e.hasChanged(t)&&e.onActiveChanged({...t,view:this.store.view})}positioner(e){for(const t of this.positioners)t.events.includes(e.event)&&this.triggerPositioner(t,e)}getBaseProps(e,t){const r=this.store.getState(),n=this.store.previousState;return{helpers:this.store.helpers,event:e,firstUpdate:!1,previousState:n,state:r,...t}}onScroll(){this.positioner(this.getBaseProps("scroll",{scroll:{scrollTop:this.store.view.dom.scrollTop}}))}};$v([Z()],Vl.prototype,"forceUpdatePositioners",1);$v([qe()],Vl.prototype,"getPositionerWidget",1);Vl=$v([ye({defaultOptions:{scrollDebounce:100},customHandlerKeys:["positioner"],staticKeys:["scrollDebounce"]})],Vl);function v0(e){return oe(e)?hU[e].clone():De(e)?e().clone():e.clone()}function mU(e){const t=S.createContext(null),r=gU(t);return[o=>{const i=e(o);return D.createElement(t.Provider,{value:i},o.children)},r,t]}function gU(e){return(t,r)=>{const n=S.useContext(e),o=yU(n);if(!n)throw new Error("`useContextHook` must be placed inside the `Provider` returned by the `createContextState` method");if(!t)return n;if(typeof t!="function")throw new TypeError("invalid arguments passed to `useContextHook`. This hook must be called with zero arguments, a getter function or a path string.");const i=t(n);if(!o||!r)return i;const s=t(o);return r(s,i)?s:i}}function yU(e){const t=S.useRef();return vU(()=>{t.current=e}),t.current}var vU=typeof document<"u"?S.useLayoutEffect:S.useEffect;function bU(e,t){return mU(r=>{const n=S.useRef(null),o=S.useRef(),i=t==null?void 0:t(r),[s,a]=S.useState(()=>e({get:yw(n),set:vw(o),previousContext:void 0,props:r,state:i})),l=[...Object.values(r),i];return S.useEffect(()=>{l.length!==0&&a(c=>e({get:yw(n),set:vw(o),previousContext:c,props:r,state:i}))},l),n.current=s,o.current=a,s})}function yw(e){return t=>{if(!e.current)throw new Error("`get` called outside of function scope. `get` can only be called within a function.");if(!t)return e.current;if(typeof t!="function")throw new TypeError("Invalid arguments passed to `useContextHook`. The hook must be called with zero arguments, a getter function or a path string.");return t(e.current)}}function vw(e){return t=>{if(!e.current)throw new Error("`set` called outside of function scope. `set` can only be called within a function.");e.current(r=>({...r,...typeof t=="function"?t(r):t}))}}var cN={},uN={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.errorMessages=e.ErrorType=void 0;var t;(function(r){r.MalformedUnicode="MALFORMED_UNICODE",r.MalformedHexadecimal="MALFORMED_HEXADECIMAL",r.CodePointLimit="CODE_POINT_LIMIT",r.OctalDeprecation="OCTAL_DEPRECATION",r.EndOfString="END_OF_STRING"})(t=e.ErrorType||(e.ErrorType={})),e.errorMessages=new Map([[t.MalformedUnicode,"malformed Unicode character escape sequence"],[t.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[t.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[t.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[t.EndOfString,"malformed escape sequence at end of string"]])})(uN);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.unraw=e.errorMessages=e.ErrorType=void 0;const t=uN;Object.defineProperty(e,"ErrorType",{enumerable:!0,get:function(){return t.ErrorType}}),Object.defineProperty(e,"errorMessages",{enumerable:!0,get:function(){return t.errorMessages}});function r(f){return!f.match(/[^a-f0-9]/i)?parseInt(f,16):NaN}function n(f,h,m){const b=r(f);if(Number.isNaN(b)||m!==void 0&&m!==f.length)throw new SyntaxError(t.errorMessages.get(h));return b}function o(f){const h=n(f,t.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(h)}function i(f,h){const m=n(f,t.ErrorType.MalformedUnicode,4);if(h!==void 0){const b=n(h,t.ErrorType.MalformedUnicode,4);return String.fromCharCode(m,b)}return String.fromCharCode(m)}function s(f){return f.charAt(0)==="{"&&f.charAt(f.length-1)==="}"}function a(f){if(!s(f))throw new SyntaxError(t.errorMessages.get(t.ErrorType.MalformedUnicode));const h=f.slice(1,-1),m=n(h,t.ErrorType.MalformedUnicode);try{return String.fromCodePoint(m)}catch(b){throw b instanceof RangeError?new SyntaxError(t.errorMessages.get(t.ErrorType.CodePointLimit)):b}}function l(f,h=!1){if(h)throw new SyntaxError(t.errorMessages.get(t.ErrorType.OctalDeprecation));const m=parseInt(f,8);return String.fromCharCode(m)}const c=new Map([["b","\b"],["f","\f"],["n",` -`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function u(f){return c.get(f)||f}const d=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function p(f,h=!1){return f.replace(d,function(m,b,y,g,v,E,k,x,w){if(b!==void 0)return"\\";if(y!==void 0)return o(y);if(g!==void 0)return a(g);if(v!==void 0)return i(v,E);if(k!==void 0)return i(k);if(x==="0")return"\0";if(x!==void 0)return l(x,!h);if(w!==void 0)return u(w);throw new SyntaxError(t.errorMessages.get(t.ErrorType.EndOfString))})}e.unraw=p,e.default=p})(cN);const EU=po(cN),ti=e=>typeof e=="string",kU=e=>typeof e=="function",bw=new Map;function Vv(e){return[...Array.isArray(e)?e:[e],"en"]}function dN(e,t,r){const n=Vv(e);return qf(()=>Xf("date",n,r),()=>new Intl.DateTimeFormat(n,r)).format(ti(t)?new Date(t):t)}function b0(e,t,r){const n=Vv(e);return qf(()=>Xf("number",n,r),()=>new Intl.NumberFormat(n,r)).format(t)}function Ew(e,t,r,{offset:n=0,...o}){const i=Vv(e),s=t?qf(()=>Xf("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):qf(()=>Xf("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return o[r]??o[s.select(r-n)]??o.other}function qf(e,t){const r=e();let n=bw.get(r);return n||(n=t(),bw.set(r,n)),n}function Xf(e,t,r){const n=t.join("-");return`${e}-${n}-${JSON.stringify(r)}`}const pN=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g,xU=(e,t,r={})=>{t=t||e;const n=i=>ti(i)?r[i]||{style:i}:i,o=(i,s)=>{const a=Object.keys(r).length?n("number"):{},l=b0(t,i,a);return s.replace("#",l)};return{plural:(i,s)=>{const{offset:a=0}=s,l=Ew(t,!1,i,s);return o(i-a,l)},selectordinal:(i,s)=>{const{offset:a=0}=s,l=Ew(t,!0,i,s);return o(i-a,l)},select:(i,s)=>s[i]??s.other,number:(i,s)=>b0(t,i,n(s)),date:(i,s)=>dN(t,i,n(s)),undefined:i=>i}};function SU(e,t,r){return(n,o={})=>{const i=xU(t,r,o),s=l=>Array.isArray(l)?l.reduce((c,u)=>{if(ti(u))return c+u;const[d,p,f]=u;let h={};f!=null&&!ti(f)?Object.keys(f).forEach(b=>{h[b]=s(f[b])}):h=f;const m=i[p](n[d],h);return m==null?c:c+m},""):l,a=s(e);return ti(a)&&pN.test(a)?EU(a.trim()):ti(a)?a.trim():a}}var wU=Object.defineProperty,TU=(e,t,r)=>t in e?wU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,CU=(e,t,r)=>(TU(e,typeof t!="symbol"?t+"":t,r),r);class OU{constructor(){CU(this,"_events",{})}on(t,r){return this._hasEvent(t)||(this._events[t]=[]),this._events[t].push(r),()=>this.removeListener(t,r)}removeListener(t,r){if(!this._hasEvent(t))return;const n=this._events[t].indexOf(r);~n&&this._events[t].splice(n,1)}emit(t,...r){this._hasEvent(t)&&this._events[t].map(n=>n.apply(this,r))}_hasEvent(t){return Array.isArray(this._events[t])}}var AU=Object.defineProperty,NU=(e,t,r)=>t in e?AU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Fa=(e,t,r)=>(NU(e,typeof t!="symbol"?t+"":t,r),r);class RU extends OU{constructor(t){super(),Fa(this,"_locale"),Fa(this,"_locales"),Fa(this,"_localeData"),Fa(this,"_messages"),Fa(this,"_missing"),Fa(this,"t",this._.bind(this)),this._messages={},this._localeData={},t.missing!=null&&(this._missing=t.missing),t.messages!=null&&this.load(t.messages),t.localeData!=null&&this.loadLocaleData(t.localeData),(t.locale!=null||t.locales!=null)&&this.activate(t.locale,t.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}get localeData(){return this._localeData[this._locale]??{}}_loadLocaleData(t,r){this._localeData[t]==null?this._localeData[t]=r:Object.assign(this._localeData[t],r)}loadLocaleData(t,r){r!=null?this._loadLocaleData(t,r):Object.keys(t).forEach(n=>this._loadLocaleData(n,t[n])),this.emit("change")}_load(t,r){this._messages[t]==null?this._messages[t]=r:Object.assign(this._messages[t],r)}load(t,r){r!=null?this._load(t,r):Object.keys(t).forEach(n=>this._load(n,t[n])),this.emit("change")}loadAndActivate({locale:t,locales:r,messages:n}){this._locale=t,this._locales=r||void 0,this._messages[this._locale]=n,this.emit("change")}activate(t,r){this._locale=t,this._locales=r,this.emit("change")}_(t,r={},{message:n,formats:o}={}){ti(t)||(r=t.values||r,n=t.message,t=t.id);const i=!this.messages[t],s=this._missing;if(s&&i)return kU(s)?s(this._locale,t):s;i&&this.emit("missing",{id:t,locale:this._locale});let a=this.messages[t]||n||t;return ti(a)&&pN.test(a)?JSON.parse(`"${a}"`):ti(a)?a:SU(a,this._locale,this._locales)(r,o)}date(t,r){return dN(this._locales||this._locale,t,r)}number(t,r){return b0(this._locales||this._locale,t,r)}}function _U(e={}){return new RU(e)}const hm=_U();function j(e,t){return t?"other":e==1?"one":"other"}function gi(e,t){return t?"other":e==0||e==1?"one":"other"}function qr(e,t){var r=String(e).split("."),n=!r[1];return t?"other":e==1&&n?"one":"other"}function $e(e,t){return"other"}function ks(e,t){return t?"other":e==1?"one":e==2?"two":"other"}const IU=$e,MU=j,LU=gi;function DU(e,t){return t?"other":e>=0&&e<=1?"one":"other"}const PU=j;function zU(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-2);return t?"other":e==0?"zero":e==1?"one":e==2?"two":o>=3&&o<=10?"few":o>=11&&o<=99?"many":"other"}function $U(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-2);return t?"other":e==0?"zero":e==1?"one":e==2?"two":o>=3&&o<=10?"few":o>=11&&o<=99?"many":"other"}function BU(e,t){return t?e==1||e==5||e==7||e==8||e==9||e==10?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e>=0&&e<=1?"one":"other"}const HU=j,FU=qr;function UU(e,t){var r=String(e).split("."),n=r[0],o=n.slice(-1),i=n.slice(-2),s=n.slice(-3);return t?o==1||o==2||o==5||o==7||o==8||i==20||i==50||i==70||i==80?"one":o==3||o==4||s==100||s==200||s==300||s==400||s==500||s==600||s==700||s==800||s==900?"few":n==0||o==6||i==40||i==60||i==90?"many":"other":e==1?"one":"other"}function VU(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-1),i=n&&r[0].slice(-2);return t?(o==2||o==3)&&i!=12&&i!=13?"few":"other":o==1&&i!=11?"one":o>=2&&o<=4&&(i<12||i>14)?"few":n&&o==0||o>=5&&o<=9||i>=11&&i<=14?"many":"other"}const jU=j,GU=j,WU=j,KU=gi,YU=$e;function qU(e,t){return t?e==1||e==5||e==7||e==8||e==9||e==10?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e>=0&&e<=1?"one":"other"}const XU=$e;function ZU(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-1),i=n&&r[0].slice(-2),s=n&&r[0].slice(-6);return t?"other":o==1&&i!=11&&i!=71&&i!=91?"one":o==2&&i!=12&&i!=72&&i!=92?"two":(o==3||o==4||o==9)&&(i<10||i>19)&&(i<70||i>79)&&(i<90||i>99)?"few":e!=0&&n&&s==0?"many":"other"}const JU=j;function QU(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=n.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?"other":i&&s==1&&a!=11||l==1&&c!=11?"one":i&&s>=2&&s<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}function eV(e,t){var r=String(e).split("."),n=!r[1];return t?e==1||e==3?"one":e==2?"two":e==4?"few":"other":e==1&&n?"one":"other"}const tV=j;function rV(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=o.slice(-1);return t?"other":i&&(n==1||n==2||n==3)||i&&s!=4&&s!=6&&s!=9||!i&&a!=4&&a!=6&&a!=9?"one":"other"}const nV=j,oV=j,iV=j;function sV(e,t){var r=String(e).split("."),n=r[0],o=!r[1];return t?"other":e==1&&o?"one":n>=2&&n<=4&&o?"few":o?"other":"many"}function aV(e,t){return t?e==0||e==7||e==8||e==9?"zero":e==1?"one":e==2?"two":e==3||e==4?"few":e==5||e==6?"many":"other":e==0?"zero":e==1?"one":e==2?"two":e==3?"few":e==6?"many":"other"}function lV(e,t){var r=String(e).split("."),n=r[0],o=Number(r[0])==e;return t?"other":e==1||!o&&(n==0||n==1)?"one":"other"}const cV=qr;function uV(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-2),a=o.slice(-2);return t?"other":i&&s==1||a==1?"one":i&&s==2||a==2?"two":i&&(s==3||s==4)||a==3||a==4?"few":"other"}const dV=j,pV=$e,fV=j,hV=j;function mV(e,t){var r=String(e).split("."),n=!r[1],o=Number(r[0])==e,i=o&&r[0].slice(-1),s=o&&r[0].slice(-2);return t?i==1&&s!=11?"one":i==2&&s!=12?"two":i==3&&s!=13?"few":"other":e==1&&n?"one":"other"}const gV=j,yV=j,vV=qr,bV=j;function EV(e,t){return t?"other":e>=0&&e<=1?"one":"other"}function kV(e,t){return t?"other":e>=0&&e<2?"one":"other"}const xV=qr;function SV(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=o.slice(-1);return t?e==1?"one":"other":i&&(n==1||n==2||n==3)||i&&s!=4&&s!=6&&s!=9||!i&&a!=4&&a!=6&&a!=9?"one":"other"}const wV=j;function TV(e,t){return t?e==1?"one":"other":e>=0&&e<2?"one":"other"}const CV=j,OV=qr;function AV(e,t){var r=String(e).split("."),n=Number(r[0])==e;return t?e==1?"one":"other":e==1?"one":e==2?"two":n&&e>=3&&e<=6?"few":n&&e>=7&&e<=10?"many":"other"}function NV(e,t){var r=String(e).split("."),n=Number(r[0])==e;return t?e==1||e==11?"one":e==2||e==12?"two":e==3||e==13?"few":"other":e==1||e==11?"one":e==2||e==12?"two":n&&e>=3&&e<=10||n&&e>=13&&e<=19?"few":"other"}const RV=qr,_V=j;function IV(e,t){return t?e==1?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e>=0&&e<=1?"one":"other"}const MV=gi;function LV(e,t){var r=String(e).split("."),n=r[0],o=!r[1],i=n.slice(-1),s=n.slice(-2);return t?"other":o&&i==1?"one":o&&i==2?"two":o&&(s==0||s==20||s==40||s==60||s==80)?"few":o?"other":"many"}const DV=j,PV=j;function zV(e,t){var r=String(e).split("."),n=r[0],o=!r[1],i=Number(r[0])==e,s=i&&r[0].slice(-1);return t?"other":e==1&&o?"one":n==2&&o?"two":o&&(e<0||e>10)&&i&&s==0?"many":"other"}function $V(e,t){return t?e==1?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e>=0&&e<=1?"one":"other"}function BV(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=n.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?"other":i&&s==1&&a!=11||l==1&&c!=11?"one":i&&s>=2&&s<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}function HV(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-2),a=o.slice(-2);return t?"other":i&&s==1||a==1?"one":i&&s==2||a==2?"two":i&&(s==3||s==4)||a==3||a==4?"few":"other"}function FV(e,t){return t?e==1||e==5?"one":"other":e==1?"one":"other"}function UV(e,t){return t?e==1?"one":"other":e>=0&&e<2?"one":"other"}const VV=qr,jV=$e,GV=$e,WV=$e,KV=qr;function YV(e,t){var r=String(e).split("."),n=r[0],o=Number(r[0])==e,i=n.slice(-1),s=n.slice(-2);return t?"other":o&&i==1&&s!=11||!o?"one":"other"}function qV(e,t){var r=String(e).split("."),n=!r[1];return t?e==11||e==8||e==80||e==800?"many":"other":e==1&&n?"one":"other"}const XV=ks;function ZV(e,t){var r=String(e).split("."),n=r[0],o=!r[1],i=Number(r[0])==e,s=i&&r[0].slice(-1);return t?"other":e==1&&o?"one":n==2&&o?"two":o&&(e<0||e>10)&&i&&s==0?"many":"other"}const JV=$e,QV=$e,ej=j,tj=qr,rj=j,nj=$e,oj=$e;function ij(e,t){var r=String(e).split("."),n=r[0],o=n.slice(-2);return t?n==1?"one":n==0||o>=2&&o<=20||o==40||o==60||o==80?"many":"other":e==1?"one":"other"}function sj(e,t){return t?"other":e>=0&&e<2?"one":"other"}const aj=j,lj=j,cj=$e,uj=$e;function dj(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-1);return t?o==6||o==9||n&&o==0&&e!=0?"many":"other":e==1?"one":"other"}const pj=j,fj=j,hj=$e;function mj(e,t){return t?"other":e>=0&&e<=1?"one":"other"}const gj=$e,yj=j,vj=j;function bj(e,t){return t?"other":e==0?"zero":e==1?"one":"other"}const Ej=j;function kj(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-2),i=n&&r[0].slice(-3),s=n&&r[0].slice(-5),a=n&&r[0].slice(-6);return t?n&&e>=1&&e<=4||o>=1&&o<=4||o>=21&&o<=24||o>=41&&o<=44||o>=61&&o<=64||o>=81&&o<=84?"one":e==5||o==5?"many":"other":e==0?"zero":e==1?"one":o==2||o==22||o==42||o==62||o==82||n&&i==0&&(s>=1e3&&s<=2e4||s==4e4||s==6e4||s==8e4)||e!=0&&a==1e5?"two":o==3||o==23||o==43||o==63||o==83?"few":e!=1&&(o==1||o==21||o==41||o==61||o==81)?"many":"other"}const xj=j;function Sj(e,t){var r=String(e).split("."),n=r[0];return t?"other":e==0?"zero":(n==0||n==1)&&e!=0?"one":"other"}const wj=j,Tj=j,Cj=$e,Oj=gi;function Aj(e,t){return t&&e==1?"one":"other"}function Nj(e,t){var r=String(e).split("."),n=r[1]||"",o=Number(r[0])==e,i=o&&r[0].slice(-1),s=o&&r[0].slice(-2);return t?"other":i==1&&(s<11||s>19)?"one":i>=2&&i<=9&&(s<11||s>19)?"few":n!=0?"many":"other"}function Rj(e,t){var r=String(e).split("."),n=r[1]||"",o=n.length,i=Number(r[0])==e,s=i&&r[0].slice(-1),a=i&&r[0].slice(-2),l=n.slice(-2),c=n.slice(-1);return t?"other":i&&s==0||a>=11&&a<=19||o==2&&l>=11&&l<=19?"zero":s==1&&a!=11||o==2&&c==1&&l!=11||o!=2&&c==1?"one":"other"}const _j=j,Ij=gi,Mj=j;function Lj(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=n.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?s==1&&a!=11?"one":s==2&&a!=12?"two":(s==7||s==8)&&a!=17&&a!=18?"many":"other":i&&s==1&&a!=11||l==1&&c!=11?"one":"other"}const Dj=j,Pj=j;function zj(e,t){var r=String(e).split("."),n=!r[1],o=Number(r[0])==e,i=o&&r[0].slice(-2);return t?e==1?"one":"other":e==1&&n?"one":!n||e==0||i>=2&&i<=19?"few":"other"}function $j(e,t){return t?e==1?"one":e==2||e==3?"two":e==4?"few":"other":e==1?"one":"other"}function Bj(e,t){return t&&e==1?"one":"other"}function Hj(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-2);return t?"other":e==1?"one":e==0||o>=2&&o<=10?"few":o>=11&&o<=19?"many":"other"}const Fj=$e,Uj=j,Vj=ks,jj=j,Gj=j;function Wj(e,t){var r=String(e).split("."),n=Number(r[0])==e;return t?n&&e>=1&&e<=4?"one":"other":e==1?"one":"other"}const Kj=qr,Yj=j,qj=j,Xj=j,Zj=$e,Jj=j,Qj=gi,eG=j,tG=j,rG=j;function nG(e,t){var r=String(e).split("."),n=Number(r[0])==e;return t?e==1||e==5||n&&e>=7&&e<=9?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e==1?"one":"other"}const oG=j,iG=$e,sG=gi,aG=j;function lG(e,t){var r=String(e).split("."),n=r[0],o=!r[1],i=n.slice(-1),s=n.slice(-2);return t?"other":e==1&&o?"one":o&&i>=2&&i<=4&&(s<12||s>14)?"few":o&&n!=1&&(i==0||i==1)||o&&i>=5&&i<=9||o&&s>=12&&s<=14?"many":"other"}function cG(e,t){var r=String(e).split("."),n=r[1]||"",o=n.length,i=Number(r[0])==e,s=i&&r[0].slice(-1),a=i&&r[0].slice(-2),l=n.slice(-2),c=n.slice(-1);return t?"other":i&&s==0||a>=11&&a<=19||o==2&&l>=11&&l<=19?"zero":s==1&&a!=11||o==2&&c==1&&l!=11||o!=2&&c==1?"one":"other"}const uG=j;function dG(e,t){var r=String(e).split("."),n=r[0];return t?"other":n==0||n==1?"one":"other"}const pG=qr,fG=j;function hG(e,t){var r=String(e).split("."),n=!r[1],o=Number(r[0])==e,i=o&&r[0].slice(-2);return t?e==1?"one":"other":e==1&&n?"one":!n||e==0||i>=2&&i<=19?"few":"other"}const mG=j,gG=$e;function yG(e,t){var r=String(e).split("."),n=r[0],o=!r[1],i=n.slice(-1),s=n.slice(-2);return t?"other":o&&i==1&&s!=11?"one":o&&i>=2&&i<=4&&(s<12||s>14)?"few":o&&i==0||o&&i>=5&&i<=9||o&&s>=11&&s<=14?"many":"other"}const vG=j,bG=$e,EG=j;function kG(e,t){var r=String(e).split("."),n=!r[1];return t?e==11||e==8||e==80||e==800?"many":"other":e==1&&n?"one":"other"}function xG(e,t){var r=String(e).split("."),n=!r[1];return t?e==11||e==8||e==80||e==800?"many":"other":e==1&&n?"one":"other"}const SG=j,wG=j,TG=ks,CG=j,OG=$e,AG=$e;function NG(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=n.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?"other":i&&s==1&&a!=11||l==1&&c!=11?"one":i&&s>=2&&s<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}function RG(e,t){var r=String(e).split("."),n=Number(r[0])==e;return t?"other":e>=0&&e<=1?"one":n&&e>=2&&e<=10?"few":"other"}function _G(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"";return t?"other":e==0||e==1||n==0&&o==1?"one":"other"}function IG(e,t){var r=String(e).split("."),n=r[0],o=!r[1];return t?"other":e==1&&o?"one":n>=2&&n<=4&&o?"few":o?"other":"many"}function MG(e,t){var r=String(e).split("."),n=r[0],o=!r[1],i=n.slice(-2);return t?"other":o&&i==1?"one":o&&i==2?"two":o&&(i==3||i==4)||!o?"few":"other"}const LG=ks,DG=ks,PG=ks,zG=ks,$G=ks,BG=j,HG=j;function FG(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-1),i=n&&r[0].slice(-2);return t?e==1?"one":o==4&&i!=14?"many":"other":e==1?"one":"other"}function UG(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=n.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?"other":i&&s==1&&a!=11||l==1&&c!=11?"one":i&&s>=2&&s<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}const VG=j,jG=j,GG=j,WG=$e;function KG(e,t){var r=String(e).split("."),n=!r[1],o=Number(r[0])==e,i=o&&r[0].slice(-1),s=o&&r[0].slice(-2);return t?(i==1||i==2)&&s!=11&&s!=12?"one":"other":e==1&&n?"one":"other"}const YG=qr,qG=j,XG=j,ZG=j,JG=j,QG=$e,eW=gi,tW=j;function rW(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-1);return t?o==6||o==9||e==10?"few":"other":e==1?"one":"other"}function nW(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=o.slice(-1);return t?e==1?"one":"other":i&&(n==1||n==2||n==3)||i&&s!=4&&s!=6&&s!=9||!i&&a!=4&&a!=6&&a!=9?"one":"other"}const oW=j,iW=$e,sW=j,aW=j;function lW(e,t){var r=String(e).split("."),n=Number(r[0])==e;return t?"other":e==0||e==1||n&&e>=11&&e<=99?"one":"other"}const cW=j;function uW(e,t){var r=String(e).split("."),n=r[0],o=!r[1],i=Number(r[0])==e,s=i&&r[0].slice(-1),a=i&&r[0].slice(-2),l=n.slice(-1),c=n.slice(-2);return t?s==3&&a!=13?"few":"other":o&&l==1&&c!=11?"one":o&&l>=2&&l<=4&&(c<12||c>14)?"few":o&&l==0||o&&l>=5&&l<=9||o&&c>=11&&c<=14?"many":"other"}const dW=qr,pW=j,fW=j;function hW(e,t){return t&&e==1?"one":"other"}const mW=j,gW=j,yW=gi,vW=j,bW=$e,EW=j,kW=j,xW=qr,SW=$e,wW=$e,TW=$e;function CW(e,t){return t?"other":e>=0&&e<=1?"one":"other"}const OW=Object.freeze(Object.defineProperty({__proto__:null,_in:IU,af:MU,ak:LU,am:DU,an:PU,ar:zU,ars:$U,as:BU,asa:HU,ast:FU,az:UU,be:VU,bem:jU,bez:GU,bg:WU,bho:KU,bm:YU,bn:qU,bo:XU,br:ZU,brx:JU,bs:QU,ca:eV,ce:tV,ceb:rV,cgg:nV,chr:oV,ckb:iV,cs:sV,cy:aV,da:lV,de:cV,dsb:uV,dv:dV,dz:pV,ee:fV,el:hV,en:mV,eo:gV,es:yV,et:vV,eu:bV,fa:EV,ff:kV,fi:xV,fil:SV,fo:wV,fr:TV,fur:CV,fy:OV,ga:AV,gd:NV,gl:RV,gsw:_V,gu:IV,guw:MV,gv:LV,ha:DV,haw:PV,he:zV,hi:$V,hr:BV,hsb:HV,hu:FV,hy:UV,ia:VV,id:jV,ig:GV,ii:WV,io:KV,is:YV,it:qV,iu:XV,iw:ZV,ja:JV,jbo:QV,jgo:ej,ji:tj,jmc:rj,jv:nj,jw:oj,ka:ij,kab:sj,kaj:aj,kcg:lj,kde:cj,kea:uj,kk:dj,kkj:pj,kl:fj,km:hj,kn:mj,ko:gj,ks:yj,ksb:vj,ksh:bj,ku:Ej,kw:kj,ky:xj,lag:Sj,lb:wj,lg:Tj,lkt:Cj,ln:Oj,lo:Aj,lt:Nj,lv:Rj,mas:_j,mg:Ij,mgo:Mj,mk:Lj,ml:Dj,mn:Pj,mo:zj,mr:$j,ms:Bj,mt:Hj,my:Fj,nah:Uj,naq:Vj,nb:jj,nd:Gj,ne:Wj,nl:Kj,nn:Yj,nnh:qj,no:Xj,nqo:Zj,nr:Jj,nso:Qj,ny:eG,nyn:tG,om:rG,or:nG,os:oG,osa:iG,pa:sG,pap:aG,pl:lG,prg:cG,ps:uG,pt:dG,pt_PT:pG,rm:fG,ro:hG,rof:mG,root:gG,ru:yG,rwk:vG,sah:bG,saq:EG,sc:kG,scn:xG,sd:SG,sdh:wG,se:TG,seh:CG,ses:OG,sg:AG,sh:NG,shi:RG,si:_G,sk:IG,sl:MG,sma:LG,smi:DG,smj:PG,smn:zG,sms:$G,sn:BG,so:HG,sq:FG,sr:UG,ss:VG,ssy:jG,st:GG,su:WG,sv:KG,sw:YG,syr:qG,ta:XG,te:ZG,teo:JG,th:QG,ti:eW,tig:tW,tk:rW,tl:nW,tn:oW,to:iW,tr:sW,ts:aW,tzm:lW,ug:cW,uk:uW,ur:dW,uz:pW,ve:fW,vi:hW,vo:mW,vun:gW,wa:yW,wae:vW,wo:bW,xh:EW,xog:kW,yi:xW,yo:SW,yue:wW,zh:TW,zu:CW},Symbol.toStringTag,{value:"Module"}));var AW=Object.defineProperty,NW=Object.getOwnPropertyDescriptor,RW=Object.getOwnPropertyNames,_W=Object.prototype.hasOwnProperty,kw=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of RW(t))!_W.call(e,o)&&o!==r&&AW(e,o,{get:()=>t[o],enumerable:!(n=NW(t,o))||n.enumerable});return e},IW=(e,t,r)=>(kw(e,t,"default"),r&&kw(r,t,"default")),MW=JSON.parse('{"extension.command.toggle-upper-case.label":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text case"}]],"extension.table.column_count":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"extension.table.row_count":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.toggle-columns.description":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"extension.command.toggle-columns.label":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"extension.command.set-text-direction.label":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"extension.command.set-text-direction.description":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"extension.command.toggle-heading.label":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"extension.command.toggle-callout.description":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"extension.command.toggle-callout.label":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"extension.command.toggle-code-block.description":"Add a code block","extension.command.add-annotation.label":"Add annotation","extension.command.toggle-blockquote.description":"Add blockquote formatting to the selected text","extension.command.toggle-bold.description":"Add bold formatting to the selected text","extension.command.toggle-code.description":"Add inline code formatting to the selected text","keyboard.shortcut.alt":"Alt","keyboard.shortcut.arrowDown":"Arrow Down","keyboard.shortcut.arrowLeft":"Arrow Left","keyboard.shortcut.arrowRight":"Arrow Right","keyboard.shortcut.arrowUp":"Arrow Up","keyboard.shortcut.backspace":"Backspace","ui.text-color.black":"Black","extension.command.toggle-blockquote.label":"Blockquote","ui.text-color.blue":"Blue","ui.text-color.blue.hue":["Blue ",["hue"]],"extension.command.toggle-bold.label":"Bold","extension.command.toggle-bullet-list.description":"Bulleted list","keyboard.shortcut.capsLock":"Caps Lock","extension.command.center-align.label":"Center align","extension.command.toggle-code.label":"Code","extension.command.toggle-code-block.label":"Codeblock","keyboard.shortcut.command":"Command","QcPNd6":"Image description","ogrUzJ":"Add a short description here.","yqdyzr":"Image","6/02F4":"Image source","X8H91v":"Image","zhQ7Zt":"Italic","ZL7E7l":"Underline","keyboard.shortcut.control":"Control","extension.command.convert-paragraph.description":"Convert current block into a paragraph block.","extension.command.convert-paragraph.label":"Convert Paragraph","extension.command.copy.label":"Copy","extension.command.copy.description":"Copy the selected text","extension.command.create-table.description":"Create a table with set number of rows and columns.","extension.command.create-table.label":"Create table","extension.command.cut.label":"Cut","extension.command.cut.description":"Cut the selected text","ui.text-color.cyan":"Cyan","ui.text-color.cyan.hue":["Cyan ",["hue"]],"extension.command.decrease-font-size.label":"Decrease","extension.command.decrease-indent.label":"Decrease indentation","extension.command.decrease-font-size.description":"Decrease the font size.","keyboard.shortcut.delete":"Delete","extension.command.insert-horizontal-rule.label":"Divider","keyboard.shortcut.end":"End","keyboard.shortcut.escape":"Enter","keyboard.shortcut.enter":"Enter","6PjrOF":"Add annotation","OTq5WC":"Center align","oeZ3ox":"Convert current block into a paragraph block.","m1khs+":"Convert Paragraph","w/1U+3":"Copy the selected text","kdodi0":"Copy","k0KR/u":"Create a table with set number of rows and columns.","zrwMyD":"Create table","D/nWxh":"Cut the selected text","jHPv5m":"Cut","5cNgRx":"Decrease the font size.","vyRNWx":"Decrease","Jgiol4":"Decrease indentation","1gJSHH":"Increase the font size","OQXJXz":"Increase","72TLhr":"Increase indentation","HFlfzJ":"Insert Emoji","RPq9fY":"Separate content with a diving horizontal line","OKQF+e":"Divider","zjYb9C":"Insert a new paragraph","4M4sXC":"Insert Paragraph","1Q+eVc":"Justify","ejWWtP":"Left align","wVqrpS":"Paste content into the editor","07v9aw":"Paste","zUYfou":"Redo the most recent action","9Nq9zr":"Redo","0uxaZe":"Remove annotation","iJWZAz":"Right align","g5WpPn":"Select all content within the editor","2+pZDT":"Select all","yChCR1":"Set text case","GMzAC/":"Set the font size for the selected text.","vzEyrv":"Font size","7VCkJ8":"Set the text color for the selected text.","qjWFaR":"Text color","LVWgFu":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"WXwRy1":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"G/o315":"Set the text highlight color for the selected text.","xtHg6d":"Text highlight","1p1W/p":"Add blockquote formatting to the selected text","6+rh6I":"Blockquote","0yB3LV":"Add bold formatting to the selected text","sFMo4Z":"Bold","SMKG/s":"Bulleted list","/BYCMi":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"V+3IBe":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"hbIo4L":"Add a code block","7GkMcx":"Codeblock","2r4JYl":"Add inline code formatting to the selected text","Up8Tpe":"Code","ATHSPS":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"7DC1VE":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"hnrBeo":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"NkZAcw":"Italicize the selected text","2fTW9e":"Italic","c759Ra":"Ordered list","uQwrZu":"Strikethrough the selected text","pT3qly":"Strikethrough","BHk+zu":"Subscript","18BVwM":"Superscript","tOIVCV":"Tasked list","4Janx3":"Underline the selected text","dCHt+D":"Underline","YYAprs":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text case"}]],"tczyZL":"Show hidden whitespace characters in your editor.","0qAX23":"Toggle Whitespace","ezMADU":"Undo the most recent action","N3P7EC":"Undo","2nj/+s":"Update annotation","dWD7u4":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"qXqgVT":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.set-font-size.label":"Font size","ui.text-color.grape":"Grape","ui.text-color.grape.hue":["Grape ",["hue"]],"ui.text-color.gray":"Gray","ui.text-color.gray.hue":["Gray ",["hue"]],"ui.text-color.green":"Green","ui.text-color.green.hue":["Green ",["hue"]],"keyboard.shortcut.home":"Home","extension.command.increase-font-size.label":"Increase","extension.command.increase-indent.label":"Increase indentation","extension.command.increase-font-size.description":"Increase the font size","ui.text-color.indigo":"Indigo","ui.text-color.indigo.hue":["Indigo ",["hue"]],"extension.command.insert-paragraph.description":"Insert a new paragraph","extension.command.insert-emoji.label":"Insert Emoji","extension.command.insert-paragraph.label":"Insert Paragraph","extension.command.toggle-italic.label":"Italic","extension.command.toggle-italic.description":"Italicize the selected text","extension.command.justify-align.label":"Justify","R7NlCw":"Alt","RbDiK5":"Arrow Down","Dgyd+E":"Arrow Left","8pdCk4":"Arrow Right","Gp/343":"Arrow Up","PFPV0A":"Backspace","0IRYvp":"Caps Lock","X7HX0D":"Command","zq0AdD":"Control","8SfToN":"Delete","Ys/uah":"End","3K5hww":"Enter","veQt1j":"Enter","ySv7i+":"Home","e6RUI1":"Page Down","EEJk31":"Page Up","7sbhAU":"Shift","Q4eplT":"Space","SUhVVC":"Tab","extension.command.left-align.label":"Left align","ui.text-color.lime":"Lime","ui.text-color.lime.hue":["Lime ",["hue"]],"react-components.mention-atom-component.zero-items":"No items available","ui.text-color.orange":"Orange","ui.text-color.orange.hue":["Orange ",["hue"]],"extension.command.toggle-ordered-list.label":"Ordered list","keyboard.shortcut.pageDown":"Page Down","keyboard.shortcut.pageUp":"Page Up","extension.command.paste.label":"Paste","extension.command.paste.description":"Paste content into the editor","ui.text-color.pink":"Pink","ui.text-color.pink.hue":["Pink ",["hue"]],"zvMfIA":"No items available","pEjhti":"Static Menu","ui.text-color.red":"Red","ui.text-color.red.hue":["Red ",["hue"]],"extension.command.redo.label":"Redo","extension.command.redo.description":"Redo the most recent action","extension.command.remove-annotation.label":"Remove annotation","extension.command.right-align.label":"Right align","extension.command.select-all.label":"Select all","extension.command.select-all.description":"Select all content within the editor","extension.command.insert-horizontal-rule.description":"Separate content with a diving horizontal line","extension.command.set-casing.label":"Set text case","extension.command.set-font-size.description":"Set the font size for the selected text.","extension.command.set-text-color.description":"Set the text color for the selected text.","extension.command.set-text-highlight.description":"Set the text highlight color for the selected text.","keyboard.shortcut.shift":"Shift","extension.command.toggle-whitespace.description":"Show hidden whitespace characters in your editor.","keyboard.shortcut.space":"Space","extension.command.toggle-strike.label":"Strikethrough","extension.command.toggle-strike.description":"Strikethrough the selected text","extension.command.toggle-subscript.label":"Subscript","extension.command.toggle-superscript.label":"Superscript","keyboard.shortcut.tab":"Tab","extension.command.toggle-task-list.description":"Tasked list","ui.text-color.teal":"Teal","ui.text-color.teal.hue":["Teal ",["hue"]],"extension.command.set-text-color.label":"Text color","extension.command.set-text-highlight.label":"Text highlight","extension.command.toggle-whitespace.label":"Toggle Whitespace","ui.text-color.transparent":"Transparent","slrB1c":"Black","6QML30":"Blue","xw+keN":["Blue ",["hue"]],"38RHqP":"Cyan","D89yPf":["Cyan ",["hue"]],"VjBLnd":"Grape","Rp40yv":["Grape ",["hue"]],"5Dm9D1":"Gray","HGjXjC":["Gray ",["hue"]],"b9fz+n":"Green","18jo3M":["Green ",["hue"]],"CFzqCV":"Indigo","aVlDku":["Indigo ",["hue"]],"04PfLc":"Lime","KRTK6Y":["Lime ",["hue"]],"pSnXFd":"Orange","ve/MJZ":["Orange ",["hue"]],"OvCgDa":"Pink","l7NqyT":["Pink ",["hue"]],"IT9k0j":"Red","AdyJ7/":["Red ",["hue"]],"3D2UWc":"Teal","Dcq0Y1":["Teal ",["hue"]],"bsi2ik":"Transparent","Tj3PRR":"Violet","xxMH5N":["Violet ",["hue"]],"Rum0ah":"White","4gaw/Q":"Yellow","hhauc3":["Yellow ",["hue"]],"extension.command.toggle-underline.label":"Underline","extension.command.toggle-underline.description":"Underline the selected text","extension.command.undo.label":"Undo","extension.command.undo.description":"Undo the most recent action","extension.command.update-annotation.label":"Update annotation","ui.text-color.violet":"Violet","ui.text-color.violet.hue":["Violet ",["hue"]],"ui.text-color.white":"White","ui.text-color.yellow":"Yellow","ui.text-color.yellow.hue":["Yellow ",["hue"]]}'),fN={};IW(fN,OW);hm.loadLocaleData("en",{plurals:fN.en});hm.load("en",MW);hm.activate("en");var LW=Object.defineProperty,DW=Object.getOwnPropertyDescriptor,jv=(e,t,r,n)=>{for(var o=n>1?void 0:n?DW(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&LW(t,r,o),o},jl=class extends or{get name(){return"doc"}createNodeSpec(e,t){const{docAttributes:r,content:n}=this.options,o=te();if(gs(r))for(const[i,s]of Dt(r))o[i]={default:s};else for(const i of r)o[i]={default:null};return{attrs:o,content:n,...t}}setDocAttributes(e){return({tr:t,dispatch:r})=>{if(r){for(const[n,o]of Object.entries(e))t.step(new Qu(n,o));r(t)}return!0}}isDefaultDocNode({state:e=this.store.getState(),options:t}={}){return cv(e.doc,t)}};jv([Z()],jl.prototype,"setDocAttributes",1);jv([qe()],jl.prototype,"isDefaultDocNode",1);jl=jv([ye({defaultOptions:{content:"block+",docAttributes:[]},defaultPriority:Ue.Medium,staticKeys:["content","docAttributes"],disableExtraAttributes:!0})],jl);var hN="SetDocAttribute",mN="RevertSetDocAttribute",Qu=class extends zt{constructor(e,t,r=hN){super(),this.stepType=r,this.key=e,this.value=t}static fromJSON(e,t){return new Qu(t.key,t.value,t.stepType)}apply(e){this.previous=e.attrs[this.key];const t={...e.attrs,[this.key]:this.value};return xt.ok(e.type.create(t,e.content,e.marks))}invert(){return new Qu(this.key,this.previous,mN)}map(){return this}toJSON(){return{stepType:this.stepType,key:this.key,value:this.value}}};try{zt.jsonID(hN,Qu),zt.jsonID(mN,Qu)}catch(e){if(!e.message.startsWith("Duplicate use of step JSON ID"))throw e}var PW=Object.defineProperty,zW=Object.getOwnPropertyDescriptor,gN=(e,t,r,n)=>{for(var o=n>1?void 0:n?zW(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&PW(t,r,o),o};function $W(e,t,r,n){const o=e.docView.posFromDOM(t,r,n);return o===null||o<0?null:o}function BW(e,t){const r=t.target;if(r){const n=$W(e,r,0);if(n!==null){const o=e.state.doc.resolve(n),i=o.node().isLeaf?0:1,s=o.start()-i;return{pos:n,inside:s}}}return e.posAtCoords({left:t.clientX,top:t.clientY})??void 0}var Zf=class extends Ye{constructor(){super(...arguments),this.mousedown=!1,this.mouseover=!1,this.createMouseEventHandler=e=>(t,r)=>{const n=r,o=BW(t,n);if(!o)return!1;const i=[],s=[],{inside:a,pos:l}=o;if(a===-1)return!1;const c=t.state.doc.resolve(l),u=c.depth+1;for(const d of Uy(u,1))i.push({node:d>c.depth&&c.nodeAfter?c.nodeAfter:c.node(d),pos:c.before(d)});for(const{type:d}of c.marksAcross(c)??[]){const p=ai(c,d);p&&s.push(p)}return e(n,{view:t,nodes:i,marks:s,getMark:d=>{const p=oe(d)?t.state.schema.marks[d]:d;return re(p,{code:U.EXTENSION,message:`The mark ${d} being checked does not exist within the editor schema.`}),s.find(f=>f.mark.type===p)},getNode:d=>{var p;const f=oe(d)?t.state.schema.nodes[d]:d;re(f,{code:U.EXTENSION,message:"The node being checked does not exist"});const h=i.find(({node:m})=>m.type===f);if(h)return{...h,isRoot:!!((p=i[0])!=null&&p.node.eq(h.node))}}})}}get name(){return"events"}onView(){var e,t;if(!((e=this.store.managerSettings.exclude)!=null&&e.clickHandler))for(const r of this.store.extensions){if(!r.createEventHandlers||(t=r.options.exclude)!=null&&t.clickHandler)continue;const n=r.createEventHandlers();for(const[o,i]of Dt(n))this.addHandler(o,i)}}createPlugin(){const e=new WeakMap,t=(r,n,o,i,s,a,l,c)=>{const u=this.store.currentState,{schema:d,doc:p}=u,f=p.resolve(i),h=e.has(l),m=HW({$pos:f,handled:h,view:o,state:u});let b=!1;h||(b=r(l,m)||b);const y={...m,pos:i,direct:c,nodeWithPosition:{node:s,pos:a},getNode:g=>{const v=oe(g)?d.nodes[g]:g;return re(v,{code:U.EXTENSION,message:"The node being checked does not exist"}),v===s.type?{node:s,pos:a}:void 0}};return e.set(l,!0),n(l,y)||b};return{props:{handleKeyPress:(r,n)=>this.options.keypress(n)||!1,handleKeyDown:(r,n)=>this.options.keydown(n)||!1,handleTextInput:(r,n,o,i)=>this.options.textInput({from:n,to:o,text:i})||!1,handleClickOn:(r,n,o,i,s,a)=>t(this.options.clickMark,this.options.click,r,n,o,i,s,a),handleDoubleClickOn:(r,n,o,i,s,a)=>t(this.options.doubleClickMark,this.options.doubleClick,r,n,o,i,s,a),handleTripleClickOn:(r,n,o,i,s,a)=>t(this.options.tripleClickMark,this.options.tripleClick,r,n,o,i,s,a),handleDOMEvents:{focus:(r,n)=>this.options.focus(n)||!1,blur:(r,n)=>this.options.blur(n)||!1,mousedown:(r,n)=>(this.startMouseover(),this.options.mousedown(n)||!1),mouseup:(r,n)=>(this.endMouseover(),this.options.mouseup(n)||!1),mouseleave:(r,n)=>(this.mouseover=!1,this.options.mouseleave(n)||!1),mouseenter:(r,n)=>(this.mouseover=!0,this.options.mouseenter(n)||!1),keyup:(r,n)=>this.options.keyup(n)||!1,mouseout:this.createMouseEventHandler((r,n)=>{const o={...n,hovering:!1};return this.options.hover(r,o)||!1}),mouseover:this.createMouseEventHandler((r,n)=>{const o={...n,hovering:!0};return this.options.hover(r,o)||!1}),contextmenu:this.createMouseEventHandler((r,n)=>this.options.contextmenu(r,n)||!1),scroll:(r,n)=>this.options.scroll(n)||!1,copy:(r,n)=>this.options.copy(n)||!1,cut:(r,n)=>this.options.cut(n)||!1,paste:(r,n)=>this.options.paste(n)||!1}},view:r=>{let n=r.editable;const o=this.options;return{update(i){const s=i.editable;s!==n&&(o.editable(s),n=s)}}}}}isInteracting(){return this.mousedown&&this.mouseover}startMouseover(){this.mouseover=!0,!this.mousedown&&(this.mousedown=!0,this.store.document.documentElement.addEventListener("mouseup",()=>{this.endMouseover()},{once:!0}))}endMouseover(){this.mousedown&&(this.mousedown=!1,this.store.commands.emptyUpdate())}};gN([qe()],Zf.prototype,"isInteracting",1);Zf=gN([ye({handlerKeys:["blur","focus","mousedown","mouseup","mouseenter","mouseleave","textInput","keypress","keyup","keydown","click","clickMark","doubleClick","doubleClickMark","tripleClick","tripleClickMark","contextmenu","hover","scroll","copy","cut","paste","editable"],handlerKeyOptions:{blur:{earlyReturnValue:!0},focus:{earlyReturnValue:!0},mousedown:{earlyReturnValue:!0},mouseleave:{earlyReturnValue:!0},mouseup:{earlyReturnValue:!0},click:{earlyReturnValue:!0},doubleClick:{earlyReturnValue:!0},tripleClick:{earlyReturnValue:!0},hover:{earlyReturnValue:!0},contextmenu:{earlyReturnValue:!0},scroll:{earlyReturnValue:!0},copy:{earlyReturnValue:!0},cut:{earlyReturnValue:!0},paste:{earlyReturnValue:!0}},defaultPriority:Ue.High})],Zf);function HW(e){const{handled:t,view:r,$pos:n,state:o}=e,i={getMark:CC,markRanges:[],view:r,state:o};if(t)return i;for(const{type:s}of n.marksAcross(n)??[]){const a=ai(n,s);a&&i.markRanges.push(a)}return i.getMark=s=>{const a=oe(s)?o.schema.marks[s]:s;return re(a,{code:U.EXTENSION,message:`The mark ${s} being checked does not exist within the editor schema.`}),i.markRanges.find(l=>l.mark.type===a)},i}class Et extends ke{constructor(t){super(t,t)}map(t,r){let n=t.resolve(r.map(this.head));return Et.valid(n)?new Et(n):ke.near(n)}content(){return W.empty}eq(t){return t instanceof Et&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,r){if(typeof r.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new Et(t.resolve(r.pos))}getBookmark(){return new Gv(this.anchor)}static valid(t){let r=t.parent;if(r.isTextblock||!FW(t)||!UW(t))return!1;let n=r.type.spec.allowGapCursor;if(n!=null)return n;let o=r.contentMatchAt(t.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(t,r,n=!1){e:for(;;){if(!n&&Et.valid(t))return t;let o=t.pos,i=null;for(let s=t.depth;;s--){let a=t.node(s);if(r>0?t.indexAfter(s)0){i=a.child(r>0?t.indexAfter(s):t.index(s)-1);break}else if(s==0)return null;o+=r;let l=t.doc.resolve(o);if(Et.valid(l))return l}for(;;){let s=r>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!de.isSelectable(i)){t=t.doc.resolve(o+i.nodeSize*r),n=!1;continue e}break}i=s,o+=r;let a=t.doc.resolve(o);if(Et.valid(a))return a}return null}}}Et.prototype.visible=!1;Et.findFrom=Et.findGapCursorFrom;ke.jsonID("gapcursor",Et);class Gv{constructor(t){this.pos=t}map(t){return new Gv(t.map(this.pos))}resolve(t){let r=t.resolve(this.pos);return Et.valid(r)?new Et(r):ke.near(r)}}function FW(e){for(let t=e.depth;t>=0;t--){let r=e.index(t),n=e.node(t);if(r==0){if(n.type.spec.isolating)return!0;continue}for(let o=n.child(r-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function UW(e){for(let t=e.depth;t>=0;t--){let r=e.indexAfter(t),n=e.node(t);if(r==n.childCount){if(n.type.spec.isolating)return!0;continue}for(let o=n.child(r);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function VW(){return new Po({props:{decorations:KW,createSelectionBetween(e,t,r){return t.pos==r.pos&&Et.valid(r)?new Et(r):null},handleClick:GW,handleKeyDown:jW,handleDOMEvents:{beforeinput:WW}}})}const jW=pv({ArrowLeft:bp("horiz",-1),ArrowRight:bp("horiz",1),ArrowUp:bp("vert",-1),ArrowDown:bp("vert",1)});function bp(e,t){const r=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(n,o,i){let s=n.selection,a=t>0?s.$to:s.$from,l=s.empty;if(s instanceof ue){if(!i.endOfTextblock(r)||a.depth==0)return!1;l=!1,a=n.doc.resolve(t>0?a.after():a.before())}let c=Et.findGapCursorFrom(a,t,l);return c?(o&&o(n.tr.setSelection(new Et(c))),!0):!1}}function GW(e,t,r){if(!e||!e.editable)return!1;let n=e.state.doc.resolve(t);if(!Et.valid(n))return!1;let o=e.posAtCoords({left:r.clientX,top:r.clientY});return o&&o.inside>-1&&de.isSelectable(e.state.doc.nodeAt(o.inside))?!1:(e.dispatch(e.state.tr.setSelection(new Et(n))),!0)}function WW(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof Et))return!1;let{$from:r}=e.state.selection,n=r.parent.contentMatchAt(r.index()).findWrapping(e.state.schema.nodes.text);if(!n)return!1;let o=I.empty;for(let s=n.length-1;s>=0;s--)o=I.from(n[s].createAndFill(null,o));let i=e.state.tr.replace(r.pos,r.pos,new W(o,0,0));return i.setSelection(ue.near(i.doc.resolve(r.pos+1))),e.dispatch(i),!1}function KW(e){if(!(e.selection instanceof Et))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",Ce.create(e.doc,[Je.widget(e.selection.head,t,{key:"gapcursor"})])}var YW=Object.defineProperty,qW=Object.getOwnPropertyDescriptor,XW=(e,t,r,n)=>{for(var o=n>1?void 0:n?qW(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&YW(t,r,o),o},E0=class extends Ye{get name(){return"gapCursor"}createExternalPlugins(){return[VW()]}};E0=XW([ye({})],E0);var Jf=200,jt=function(){};jt.prototype.append=function(t){return t.length?(t=jt.from(t),!this.length&&t||t.length=r?jt.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,r))};jt.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};jt.prototype.forEach=function(t,r,n){r===void 0&&(r=0),n===void 0&&(n=this.length),r<=n?this.forEachInner(t,r,n,0):this.forEachInvertedInner(t,r,n,0)};jt.prototype.map=function(t,r,n){r===void 0&&(r=0),n===void 0&&(n=this.length);var o=[];return this.forEach(function(i,s){return o.push(t(i,s))},r,n),o};jt.from=function(t){return t instanceof jt?t:t&&t.length?new yN(t):jt.empty};var yN=function(e){function t(n){e.call(this),this.values=n}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new t(this.values.slice(o,i))},t.prototype.getInner=function(o){return this.values[o]},t.prototype.forEachInner=function(o,i,s,a){for(var l=i;l=s;l--)if(o(this.values[l],a+l)===!1)return!1},t.prototype.leafAppend=function(o){if(this.length+o.length<=Jf)return new t(this.values.concat(o.flatten()))},t.prototype.leafPrepend=function(o){if(this.length+o.length<=Jf)return new t(o.flatten().concat(this.values))},r.length.get=function(){return this.values.length},r.depth.get=function(){return 0},Object.defineProperties(t.prototype,r),t}(jt);jt.empty=new yN([]);var ZW=function(e){function t(r,n){e.call(this),this.left=r,this.right=n,this.length=r.length+n.length,this.depth=Math.max(r.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(n){return na&&this.right.forEachInner(n,Math.max(o-a,0),Math.min(this.length,i)-a,s+a)===!1)return!1},t.prototype.forEachInvertedInner=function(n,o,i,s){var a=this.left.length;if(o>a&&this.right.forEachInvertedInner(n,o-a,Math.max(i,a)-a,s+a)===!1||i=i?this.right.slice(n-i,o-i):this.left.slice(n,i).append(this.right.slice(0,o-i))},t.prototype.leafAppend=function(n){var o=this.right.leafAppend(n);if(o)return new t(this.left,o)},t.prototype.leafPrepend=function(n){var o=this.left.leafPrepend(n);if(o)return new t(o,this.right)},t.prototype.appendInner=function(n){return this.left.depth>=Math.max(this.right.depth,n.depth)+1?new t(this.left,new t(this.right,n)):new t(this,n)},t}(jt);const JW=500;class no{constructor(t,r){this.items=t,this.eventCount=r}popEvent(t,r){if(this.eventCount==0)return null;let n=this.items.length;for(;;n--)if(this.items.get(n-1).selection){--n;break}let o,i;r&&(o=this.remapping(n,this.items.length),i=o.maps.length);let s=t.tr,a,l,c=[],u=[];return this.items.forEach((d,p)=>{if(!d.step){o||(o=this.remapping(n,p+1),i=o.maps.length),i--,u.push(d);return}if(o){u.push(new yo(d.map));let f=d.step.map(o.slice(i)),h;f&&s.maybeStep(f).doc&&(h=s.mapping.maps[s.mapping.maps.length-1],c.push(new yo(h,void 0,void 0,c.length+u.length))),i--,h&&o.appendMap(h,i)}else s.maybeStep(d.step);if(d.selection)return a=o?d.selection.map(o.slice(i)):d.selection,l=new no(this.items.slice(0,n).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:s,selection:a}}addTransform(t,r,n,o){let i=[],s=this.eventCount,a=this.items,l=!o&&a.length?a.get(a.length-1):null;for(let u=0;ueK&&(a=QW(a,c),s-=c),new no(a.append(i),s)}remapping(t,r){let n=new vl;return this.items.forEach((o,i)=>{let s=o.mirrorOffset!=null&&i-o.mirrorOffset>=t?n.maps.length-o.mirrorOffset:void 0;n.appendMap(o.map,s)},t,r),n}addMaps(t){return this.eventCount==0?this:new no(this.items.append(t.map(r=>new yo(r))),this.eventCount)}rebased(t,r){if(!this.eventCount)return this;let n=[],o=Math.max(0,this.items.length-r),i=t.mapping,s=t.steps.length,a=this.eventCount;this.items.forEach(p=>{p.selection&&a--},o);let l=r;this.items.forEach(p=>{let f=i.getMirror(--l);if(f==null)return;s=Math.min(s,f);let h=i.maps[f];if(p.step){let m=t.steps[f].invert(t.docs[f]),b=p.selection&&p.selection.map(i.slice(l+1,f));b&&a++,n.push(new yo(h,m,b))}else n.push(new yo(h))},o);let c=[];for(let p=r;pJW&&(d=d.compress(this.items.length-n.length)),d}emptyItemCount(){let t=0;return this.items.forEach(r=>{r.step||t++}),t}compress(t=this.items.length){let r=this.remapping(0,t),n=r.maps.length,o=[],i=0;return this.items.forEach((s,a)=>{if(a>=t)o.push(s),s.selection&&i++;else if(s.step){let l=s.step.map(r.slice(n)),c=l&&l.getMap();if(n--,c&&r.appendMap(c,n),l){let u=s.selection&&s.selection.map(r.slice(n));u&&i++;let d=new yo(c.invert(),l,u),p,f=o.length-1;(p=o.length&&o[f].merge(d))?o[f]=p:o.push(d)}}else s.map&&n--},this.items.length,0),new no(jt.from(o.reverse()),i)}}no.empty=new no(jt.empty,0);function QW(e,t){let r;return e.forEach((n,o)=>{if(n.selection&&t--==0)return r=o,!1}),e.slice(r)}class yo{constructor(t,r,n,o){this.map=t,this.step=r,this.selection=n,this.mirrorOffset=o}merge(t){if(this.step&&t.step&&!t.selection){let r=t.step.merge(this.step);if(r)return new yo(r.getMap().invert(),r,this.selection)}}}class Ii{constructor(t,r,n,o,i){this.done=t,this.undone=r,this.prevRanges=n,this.prevTime=o,this.prevComposition=i}}const eK=20;function tK(e,t,r,n){let o=r.getMeta(Co),i;if(o)return o.historyState;r.getMeta(nK)&&(e=new Ii(e.done,e.undone,null,0,-1));let s=r.getMeta("appendedTransaction");if(r.steps.length==0)return e;if(s&&s.getMeta(Co))return s.getMeta(Co).redo?new Ii(e.done.addTransform(r,void 0,n,sf(t)),e.undone,xw(r.mapping.maps[r.steps.length-1]),e.prevTime,e.prevComposition):new Ii(e.done,e.undone.addTransform(r,void 0,n,sf(t)),null,e.prevTime,e.prevComposition);if(r.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=r.getMeta("composition"),l=e.prevTime==0||!s&&e.prevComposition!=a&&(e.prevTime<(r.time||0)-n.newGroupDelay||!rK(r,e.prevRanges)),c=s?Kg(e.prevRanges,r.mapping):xw(r.mapping.maps[r.steps.length-1]);return new Ii(e.done.addTransform(r,l?t.selection.getBookmark():void 0,n,sf(t)),no.empty,c,r.time,a??e.prevComposition)}else return(i=r.getMeta("rebased"))?new Ii(e.done.rebased(r,i),e.undone.rebased(r,i),Kg(e.prevRanges,r.mapping),e.prevTime,e.prevComposition):new Ii(e.done.addMaps(r.mapping.maps),e.undone.addMaps(r.mapping.maps),Kg(e.prevRanges,r.mapping),e.prevTime,e.prevComposition)}function rK(e,t){if(!t)return!1;if(!e.docChanged)return!0;let r=!1;return e.mapping.maps[0].forEach((n,o)=>{for(let i=0;i=t[i]&&(r=!0)}),r}function xw(e){let t=[];return e.forEach((r,n,o,i)=>t.push(o,i)),t}function Kg(e,t){if(!e)return null;let r=[];for(let n=0;n{let r=Co.getState(e);return!r||r.done.eventCount==0?!1:(t&&vN(r,e,t,!1),!0)},uu=(e,t)=>{let r=Co.getState(e);return!r||r.undone.eventCount==0?!1:(t&&vN(r,e,t,!0),!0)};function k0(e){let t=Co.getState(e);return t?t.done.eventCount:0}function iK(e){let t=Co.getState(e);return t?t.undone.eventCount:0}var sK=Object.defineProperty,aK=Object.getOwnPropertyDescriptor,Ra=(e,t,r,n)=>{for(var o=n>1?void 0:n?aK(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&sK(t,r,o),o},Lo=class extends Ye{constructor(){super(...arguments),this.wrapMethod=(e,t)=>({state:r,dispatch:n,view:o})=>{const{getState:i,getDispatch:s}=this.options,a=De(i)?i():r,l=De(s)&&n?s():n,c=e(a,l,o);return t==null||t(c),c}}get name(){return"history"}createKeymap(){return{"Mod-y":ln.isMac?()=>!1:this.wrapMethod(uu,this.options.onRedo),"Mod-z":this.wrapMethod(af,this.options.onUndo),"Shift-Mod-z":this.wrapMethod(uu,this.options.onRedo)}}undoShortcut(e){return this.wrapMethod(af,this.options.onUndo)(e)}redoShortcut(e){return this.wrapMethod(uu,this.options.onRedo)(e)}createExternalPlugins(){const{depth:e,newGroupDelay:t}=this.options;return[oK({depth:e,newGroupDelay:t})]}undo(){return PS(this.wrapMethod(af,this.options.onUndo))}redo(){return PS(this.wrapMethod(uu,this.options.onRedo))}undoDepth(e=this.store.getState()){return k0(e)}redoDepth(e=this.store.getState()){return iK(e)}};Ra([Nt({shortcut:V.Undo,command:"undo"})],Lo.prototype,"undoShortcut",1);Ra([Nt({shortcut:V.Redo,command:"redo"})],Lo.prototype,"redoShortcut",1);Ra([Z({disableChaining:!0,description:({t:e})=>e(Pf.UNDO_DESCRIPTION),label:({t:e})=>e(Pf.UNDO_LABEL),icon:"arrowGoBackFill"})],Lo.prototype,"undo",1);Ra([Z({disableChaining:!0,description:({t:e})=>e(Pf.REDO_DESCRIPTION),label:({t:e})=>e(Pf.REDO_LABEL),icon:"arrowGoForwardFill"})],Lo.prototype,"redo",1);Ra([qe()],Lo.prototype,"undoDepth",1);Ra([qe()],Lo.prototype,"redoDepth",1);Lo=Ra([ye({defaultOptions:{depth:100,newGroupDelay:500,getDispatch:void 0,getState:void 0},staticKeys:["depth","newGroupDelay"],handlerKeys:["onUndo","onRedo"]})],Lo);var lK=Object.defineProperty,cK=Object.getOwnPropertyDescriptor,mm=(e,t,r,n)=>{for(var o=n>1?void 0:n?cK(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&lK(t,r,o),o},uK={icon:"paragraph",label:({t:e})=>e(zf.INSERT_LABEL),description:({t:e})=>e(zf.INSERT_DESCRIPTION)},dK={icon:"paragraph",label:({t:e})=>e(zf.CONVERT_LABEL),description:({t:e})=>e(zf.CONVERT_DESCRIPTION)},da=class extends or{get name(){return"paragraph"}createTags(){return[ie.LastNodeCompatible,ie.TextBlock,ie.Block,ie.FormattingNode]}createNodeSpec(e,t){return{content:"inline*",draggable:!1,...t,attrs:{...e.defaults()},parseDOM:[{tag:"p",getAttrs:r=>({...e.parse(r)})},...t.parseDOM??[]],toDOM:r=>["p",e.dom(r),0]}}convertParagraph(e={}){const{attrs:t,selection:r,preserveAttrs:n}=e;return this.store.commands.setBlockNodeType.original(this.type,t,r,n)}insertParagraph(e,t={}){const{selection:r,attrs:n}=t;return this.store.commands.insertNode.original(this.type,{content:e,selection:r,attrs:n})}shortcut(e){return this.convertParagraph()(e)}};mm([Z(dK)],da.prototype,"convertParagraph",1);mm([Z(uK)],da.prototype,"insertParagraph",1);mm([Nt({shortcut:V.Paragraph,command:"convertParagraph"})],da.prototype,"shortcut",1);da=mm([ye({defaultPriority:Ue.Medium})],da);var pK=Object.defineProperty,fK=Object.getOwnPropertyDescriptor,hK=(e,t,r,n)=>{for(var o=n>1?void 0:n?fK(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&pK(t,r,o),o},x0=class extends or{get name(){return"text"}createTags(){return[ie.InlineNode]}createNodeSpec(){return{}}};x0=hK([ye({disableExtraAttributes:!0,defaultPriority:Ue.Medium})],x0);var mK={...jl.defaultOptions,...da.defaultOptions,...Lo.defaultOptions,excludeExtensions:[]};function gK(e={}){e={...mK,...e};const{content:t,depth:r,getDispatch:n,getState:o,newGroupDelay:i,excludeExtensions:s}=e,a={};for(const c of s??[])a[c]=!0;const l=[];if(!a.history){const c=new Lo({depth:r,getDispatch:n,getState:o,newGroupDelay:i});l.push(c)}return a.doc||l.push(new jl({content:t})),a.text||l.push(new x0),a.paragraph||l.push(new da),a.positioner||l.push(new Vl),a.gapCursor||l.push(new E0),a.events||l.push(new Zf),l}var yK=Object.defineProperty,vK=Object.getOwnPropertyDescriptor,bK=(e,t,r,n)=>{for(var o=n>1?void 0:n?vK(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&yK(t,r,o),o},pa=class extends Ye{get name(){return"placeholder"}createAttributes(){return{"aria-placeholder":this.options.placeholder}}createPlugin(){return{state:{init:(e,t)=>({...this.options,empty:cv(t.doc,{ignoreAttributes:!0})}),apply:(e,t,r,n)=>EK({pluginState:t,tr:e,extension:this,state:n})},props:{decorations:e=>kK({state:e,extension:this})}}}onSetOptions(e){const{changes:t}=e;t.placeholder.changed&&this.store.phase>=Dr.EditorView&&this.store.updateAttributes()}};pa=bK([ye({defaultOptions:{emptyNodeClass:MF.IS_EMPTY,placeholder:""}})],pa);function EK(e){const{pluginState:t,extension:r,tr:n,state:o}=e;return n.docChanged?{...r.options,empty:cv(o.doc)}:t}function kK(e){const{extension:t,state:r}=e,{empty:n}=t.pluginKey.getState(r),{emptyNodeClass:o,placeholder:i}=t.options;if(!n)return null;const s=[];return r.doc.descendants((a,l)=>{const c=Je.node(l,l+a.nodeSize,{class:o,"data-placeholder":i});s.push(c)}),Ce.create(r.doc,s)}var bN={exports:{}},bn={},EN={exports:{}},kN={};/** + */var n=function(r){var o=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,s={},l={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function y(b){return b instanceof a?new a(b.type,y(b.content),b.alias):Array.isArray(b)?b.map(y):b.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(k){var y=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(k.stack)||[])[1];if(y){var b=document.getElementsByTagName("script");for(var w in b)if(b[w].src==y)return b[w]}return null}},isActive:function(y,b,w){for(var k="no-"+b;y;){var x=y.classList;if(x.contains(b))return!0;if(x.contains(k))return!1;y=y.parentElement}return!!w}},languages:{plain:s,plaintext:s,text:s,txt:s,extend:function(y,b){var w=l.util.clone(l.languages[y]);for(var k in b)w[k]=b[k];return w},insertBefore:function(y,b,w,k){k=k||l.languages;var x=k[y],S={};for(var T in x)if(x.hasOwnProperty(T)){if(T==b)for(var C in w)w.hasOwnProperty(C)&&(S[C]=w[C]);w.hasOwnProperty(T)||(S[T]=x[T])}var O=k[y];return k[y]=S,l.languages.DFS(l.languages,function(_,R){R===O&&_!=y&&(this[_]=S)}),S},DFS:function y(b,w,k,x){x=x||{};var S=l.util.objId;for(var T in b)if(b.hasOwnProperty(T)){w.call(b,T,b[T],k||T);var C=b[T],O=l.util.type(C);O==="Object"&&!x[S(C)]?(x[S(C)]=!0,y(C,w,null,x)):O==="Array"&&!x[S(C)]&&(x[S(C)]=!0,y(C,w,T,x))}}},plugins:{},highlightAll:function(y,b){l.highlightAllUnder(document,y,b)},highlightAllUnder:function(y,b,w){var k={callback:w,container:y,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};l.hooks.run("before-highlightall",k),k.elements=Array.prototype.slice.apply(k.container.querySelectorAll(k.selector)),l.hooks.run("before-all-elements-highlight",k);for(var x=0,S;S=k.elements[x++];)l.highlightElement(S,b===!0,k.callback)},highlightElement:function(y,b,w){var k=l.util.getLanguage(y),x=l.languages[k];l.util.setLanguage(y,k);var S=y.parentElement;S&&S.nodeName.toLowerCase()==="pre"&&l.util.setLanguage(S,k);var T=y.textContent,C={element:y,language:k,grammar:x,code:T};function O(R){C.highlightedCode=R,l.hooks.run("before-insert",C),C.element.innerHTML=C.highlightedCode,l.hooks.run("after-highlight",C),l.hooks.run("complete",C),w&&w.call(C.element)}if(l.hooks.run("before-sanity-check",C),S=C.element.parentElement,S&&S.nodeName.toLowerCase()==="pre"&&!S.hasAttribute("tabindex")&&S.setAttribute("tabindex","0"),!C.code){l.hooks.run("complete",C),w&&w.call(C.element);return}if(l.hooks.run("before-highlight",C),!C.grammar){O(l.util.encode(C.code));return}if(b&&r.Worker){var _=new Worker(l.filename);_.onmessage=function(R){O(R.data)},_.postMessage(JSON.stringify({language:C.language,code:C.code,immediateClose:!0}))}else O(l.highlight(C.code,C.grammar,C.language))},highlight:function(y,b,w){var k={code:y,grammar:b,language:w};if(l.hooks.run("before-tokenize",k),!k.grammar)throw new Error('The language "'+k.language+'" has no grammar.');return k.tokens=l.tokenize(k.code,k.grammar),l.hooks.run("after-tokenize",k),a.stringify(l.util.encode(k.tokens),k.language)},tokenize:function(y,b){var w=b.rest;if(w){for(var k in w)b[k]=w[k];delete b.rest}var x=new d;return h(x,x.head,y),c(y,x,b,x.head,0),p(x)},hooks:{all:{},add:function(y,b){var w=l.hooks.all;w[y]=w[y]||[],w[y].push(b)},run:function(y,b){var w=l.hooks.all[y];if(!(!w||!w.length))for(var k=0,x;x=w[k++];)x(b)}},Token:a};r.Prism=l;function a(y,b,w,k){this.type=y,this.content=b,this.alias=w,this.length=(k||"").length|0}a.stringify=function y(b,w){if(typeof b=="string")return b;if(Array.isArray(b)){var k="";return b.forEach(function(O){k+=y(O,w)}),k}var x={type:b.type,content:y(b.content,w),tag:"span",classes:["token",b.type],attributes:{},language:w},S=b.alias;S&&(Array.isArray(S)?Array.prototype.push.apply(x.classes,S):x.classes.push(S)),l.hooks.run("wrap",x);var T="";for(var C in x.attributes)T+=" "+C+'="'+(x.attributes[C]||"").replace(/"/g,""")+'"';return"<"+x.tag+' class="'+x.classes.join(" ")+'"'+T+">"+x.content+""};function u(y,b,w,k){y.lastIndex=b;var x=y.exec(w);if(x&&k&&x[1]){var S=x[1].length;x.index+=S,x[0]=x[0].slice(S)}return x}function c(y,b,w,k,x,S){for(var T in w)if(!(!w.hasOwnProperty(T)||!w[T])){var C=w[T];C=Array.isArray(C)?C:[C];for(var O=0;O=S.reach);$+=L.value.length,L=L.next){var D=L.value;if(b.length>y.length)return;if(!(D instanceof a)){var F=1,U;if(E){if(U=u(N,$,y,A),!U||U.index>=y.length)break;var V=U.index,W=U.index+U[0].length,B=$;for(B+=L.value.length;V>=B;)L=L.next,B+=L.value.length;if(B-=L.value.length,$=B,L.value instanceof a)continue;for(var H=L;H!==b.tail&&(BS.reach&&(S.reach=te);var ce=L.prev;X&&(ce=h(b,ce,X),$+=X.length),f(b,ce,F);var Ne=new a(T,R?l.tokenize(Y,R):Y,M,Y);if(L=h(b,ce,Ne),Z&&h(b,L,Z),F>1){var ye={cause:T+","+O,reach:te};c(y,b,w,L.prev,$,ye),S&&ye.reach>S.reach&&(S.reach=ye.reach)}}}}}}function d(){var y={value:null,prev:null,next:null},b={value:null,prev:y,next:null};y.next=b,this.head=y,this.tail=b,this.length=0}function h(y,b,w){var k=b.next,x={value:w,prev:b,next:k};return b.next=x,k.prev=x,y.length++,x}function f(y,b,w){for(var k=b.next,x=0;x/,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(e){e.type==="entity"&&(e.attributes.title=e.content.value.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(n,r){var o={};o["language-"+r]={pattern:/(^$)/i,lookbehind:!0,inside:t.languages[r]},o.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:o}};i["language-"+r]={pattern:/[\s\S]+/,inside:t.languages[r]};var s={};s[n]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:i},t.languages.insertBefore("markup","cdata",s)}}),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}var UU=Qb;Qb.displayName="css";Qb.aliases=[];function Qb(t){(function(e){var n=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.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\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+n.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:n,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var r=e.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(t)}var WU=Jb;Jb.displayName="clike";Jb.aliases=[];function Jb(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:/[{}[\];(),.:]/}}var VU=ew;ew.displayName="javascript";ew.aliases=["js"];function ew(t){t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),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}var qu=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof ut=="object"?ut:{},jU=a7();qu.Prism={manual:!0,disableWorkerMessageHandler:!0};var GU=a9,KU=EU,DM=BU,YU=HU,XU=UU,qU=WU,ZU=VU;jU();var tw={}.hasOwnProperty;function PM(){}PM.prototype=DM;var tn=new PM,QU=tn;tn.highlight=e7;tn.register=Kh;tn.alias=JU;tn.registered=t7;tn.listLanguages=n7;Kh(YU);Kh(XU);Kh(qU);Kh(ZU);tn.util.encode=i7;tn.Token.stringify=r7;function Kh(t){if(typeof t!="function"||!t.displayName)throw new Error("Expected `function` for `grammar`, got `"+t+"`");tn.languages[t.displayName]===void 0&&t(tn)}function JU(t,e){var n=tn.languages,r=t,o,i,s,l;e&&(r={},r[t]=e);for(o in r)for(i=r[o],i=typeof i=="string"?[i]:i,s=i.length,l=-1;++lparseInt(Xd(l,2),16)),parseInt(Xd(s[3]||"f",2),16)/255]}const r=f7.exec(e);if(r){const s=Array.from(r).slice(1);return[...s.slice(0,3).map(l=>parseInt(l,16)),parseInt(s[3]||"ff",16)/255]}const o=p7.exec(e);if(o){const s=Array.from(o).slice(1);return[...s.slice(0,3).map(l=>parseInt(l,10)),parseFloat(s[3]||"1")]}const i=g7.exec(e);if(i){const[s,l,a,u]=Array.from(i).slice(1).map(parseFloat);if(Li(0,100,l)!==l)throw new Zu(t);if(Li(0,100,a)!==a)throw new Zu(t);return[...v7(s,l,a),Number.isNaN(u)?1:u]}throw new Zu(t)}function c7(t){let e=5381,n=t.length;for(;n;)e=e*33^t.charCodeAt(--n);return(e>>>0)%2341}const zC=t=>parseInt(t.replace(/_/g,""),36),u7="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((t,e)=>{const n=zC(e.substring(0,3)),r=zC(e.substring(3)).toString(16);let o="";for(let i=0;i<6-r.length;i++)o+="0";return t[n]=`${o}${r}`,t},{});function d7(t){const e=t.toLowerCase().trim(),n=u7[c7(e)];if(!n)throw new Zu(t);return`#${n}`}const Xd=(t,e)=>Array.from(Array(e)).map(()=>t).join(""),h7=new RegExp(`^#${Xd("([a-f0-9])",3)}([a-f0-9])?$`,"i"),f7=new RegExp(`^#${Xd("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),p7=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${Xd(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),g7=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,m7=/^[a-z]+$/i,FC=t=>Math.round(t*255),v7=(t,e,n)=>{let r=n/100;if(e===0)return[r,r,r].map(FC);const o=(t%360+360)%360/60,i=(1-Math.abs(2*r-1))*(e/100),s=i*(1-Math.abs(o%2-1));let l=0,a=0,u=0;o>=0&&o<1?(l=i,a=s):o>=1&&o<2?(l=s,a=i):o>=2&&o<3?(a=i,u=s):o>=3&&o<4?(a=s,u=i):o>=4&&o<5?(l=s,u=i):o>=5&&o<6&&(l=i,u=s);const c=r-i/2,d=l+c,h=a+c,f=u+c;return[d,h,f].map(FC)};function y7(t){const[e,n,r,o]=rw(t).map((d,h)=>h===3?d:d/255),i=Math.max(e,n,r),s=Math.min(e,n,r),l=(i+s)/2;if(i===s)return[0,0,l,o];const a=i-s,u=l>.5?a/(2-i-s):a/(i+s);return[60*(e===i?(n-r)/a+(n.179}function bc(t){return k7(t)?"#000":"#fff"}const E7="remirror-editor-wrapper",S7="remirror-button-active",C7="remirror-button",T7="remirror-composite",A7="remirror-dialog",_7="remirror-dialog-backdrop",R7="remirror-form",M7="remirror-form-message",O7="remirror-form-label",I7="remirror-form-group",L7="remirror-group",N7="remirror-input",$7="remirror-menu",D7="remirror-menu-pane",P7="remirror-menu-pane-active",z7="remirror-menu-dropdown-label",F7="remirror-menu-pane-icon",B7="remirror-menu-pane-label",H7="remirror-menu-pane-shortcut",U7="remirror-menu-button-left",W7="remirror-menu-button-right",V7="remirror-menu-button-nested-left",j7="remirror-menu-button-nested-right",G7="remirror-menu-button",K7="remirror-menu-bar",Y7="remirror-flex-column",X7="remirror-flex-row",q7="remirror-menu-item",Z7="remirror-menu-item-row",Q7="remirror-menu-item-column",J7="remirror-menu-item-checkbox",eW="remirror-menu-item-radio",tW="remirror-menu-group",nW="remirror-floating-popover",rW="remirror-popover",oW="remirror-animated-popover",iW="remirror-role",sW="remirror-separator",aW="remirror-tab",lW="remirror-tab-list",cW="remirror-tabbable",uW="remirror-toolbar",dW="remirror-tooltip",hW="remirror-table-size-editor",fW="remirror-table-size-editor-body",pW="remirror-table-size-editor-cell",gW="remirror-table-size-editor-cell-selected",mW="remirror-table-size-editor-footer",vW="remirror-color-picker",yW="remirror-color-picker-cell",bW="remirror-color-picker-cell-selected";var wW=Object.freeze({__proto__:null,ANIMATED_POPOVER:oW,BUTTON:C7,BUTTON_ACTIVE:S7,COLOR_PICKER:vW,COLOR_PICKER_CELL:yW,COLOR_PICKER_CELL_SELECTED:bW,COMPOSITE:T7,DIALOG:A7,DIALOG_BACKDROP:_7,EDITOR_WRAPPER:E7,FLEX_COLUMN:Y7,FLEX_ROW:X7,FLOATING_POPOVER:nW,FORM:R7,FORM_GROUP:I7,FORM_LABEL:O7,FORM_MESSAGE:M7,GROUP:L7,INPUT:N7,MENU:$7,MENU_BAR:K7,MENU_BUTTON:G7,MENU_BUTTON_LEFT:U7,MENU_BUTTON_NESTED_LEFT:V7,MENU_BUTTON_NESTED_RIGHT:j7,MENU_BUTTON_RIGHT:W7,MENU_DROPDOWN_LABEL:z7,MENU_GROUP:tW,MENU_ITEM:q7,MENU_ITEM_CHECKBOX:J7,MENU_ITEM_COLUMN:Q7,MENU_ITEM_RADIO:eW,MENU_ITEM_ROW:Z7,MENU_PANE:D7,MENU_PANE_ACTIVE:P7,MENU_PANE_ICON:F7,MENU_PANE_LABEL:B7,MENU_PANE_SHORTCUT:H7,POPOVER:rW,ROLE:iW,SEPARATOR:sW,TAB:aW,TABBABLE:cW,TABLE_SIZE_EDITOR:hW,TABLE_SIZE_EDITOR_BODY:fW,TABLE_SIZE_EDITOR_CELL:pW,TABLE_SIZE_EDITOR_CELL_SELECTED:gW,TABLE_SIZE_EDITOR_FOOTER:mW,TAB_LIST:lW,TOOLBAR:uW,TOOLTIP:dW});const xW="remirror-wrap",kW="remirror-language-select-positioner",EW="remirror-language-select-width",SW="remirror-a11y-dark",CW="remirror-atom-dark",TW="remirror-base16-ateliersulphurpool-light",AW="remirror-cb",_W="remirror-darcula",RW="remirror-dracula",MW="remirror-duotone-dark",OW="remirror-duotone-earth",IW="remirror-duotone-forest",LW="remirror-duotone-light",NW="remirror-duotone-sea",$W="remirror-duotone-space",DW="remirror-gh-colors",PW="remirror-hopscotch",zW="remirror-pojoaque",FW="remirror-vs",BW="remirror-xonokai";var B0=Object.freeze({__proto__:null,A11Y_DARK:SW,ATOM_DARK:CW,BASE16_ATELIERSULPHURPOOL_LIGHT:TW,CB:AW,DARCULA:_W,DRACULA:RW,DUOTONE_DARK:MW,DUOTONE_EARTH:OW,DUOTONE_FOREST:IW,DUOTONE_LIGHT:LW,DUOTONE_SEA:NW,DUOTONE_SPACE:$W,GH_COLORS:DW,HOPSCOTCH:PW,LANGUAGE_SELECT_POSITIONER:kW,LANGUAGE_SELECT_WIDTH:EW,POJOAQUE:zW,VS:FW,WRAP:xW,XONOKAI:BW});const HW="remirror-image-loader";var UW=Object.freeze({__proto__:null,IMAGE_LOADER:HW});const WW="remirror-list-item-with-custom-mark",VW="remirror-ul-list-content",jW="remirror-editor",GW="remirror-list-item-marker-container",KW="remirror-list-item-checkbox",YW="remirror-collapsible-list-item-closed",XW="remirror-collapsible-list-item-button",qW="remirror-list-spine";var js=Object.freeze({__proto__:null,COLLAPSIBLE_LIST_ITEM_BUTTON:XW,COLLAPSIBLE_LIST_ITEM_CLOSED:YW,EDITOR:jW,LIST_ITEM_CHECKBOX:KW,LIST_ITEM_MARKER_CONTAINER:GW,LIST_ITEM_WITH_CUSTOM_MARKER:WW,LIST_SPINE:qW,UL_LIST_CONTENT:VW});const ZW="remirror-is-empty";var QW=Object.freeze({__proto__:null,IS_EMPTY:ZW});const JW="remirror-editor",eV="remirror-positioner",tV="remirror-positioner-widget";var nV=Object.freeze({__proto__:null,EDITOR:JW,POSITIONER:eV,POSITIONER_WIDGET:tV});const rV="remirror-theme";function oV(t={}){const e=[],n={};function r(o,i){if(typeof i=="string"||typeof i=="number"){e.push(`${BC(o)}: ${i};`),n[BC(o)]=i;return}if(!(typeof i!="object"||!i))for(const[s,l]of Object.entries(i))r([...o,s],l)}for(const[o,i]of Object.entries(t))r([o],i);return{css:e.join(` +`),styles:n}}function iV(t){return t.replace(/([a-z])([\dA-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function BC(t){return`--rmr-${t.map(iV).join("-")}`}const Mo={gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]},Ni="#000000",ow="#ffffff",sV="#252103",iw=ng(Ni,.75),Em="#7963d2",sw="#bcd263",aV="#fff",lV="#fff",aw=Mo.gray[1],HC="rgba(10,31,68,0.08)",UC="rgba(10,31,68,0.10)",WC="rgba(10,31,68,0.12)",cV=hp(ng(Ni,.1),.13),lw={background:ow,border:iw,foreground:Ni,muted:aw,primary:Em,secondary:sw,primaryText:aV,secondaryText:lV,text:sV,faded:cV},uV={...lw,background:zr(ow,.15),border:zr(iw,.15),foreground:zr(Ni,.15),muted:zr(aw,.15),primary:zr(Em,.15),secondary:zr(sw,.15),get text(){return bc(this.background)},get primaryText(){return bc(this.primary)},get secondaryText(){return bc(this.secondary)}},dV={...lw,background:zr(ow,.075),border:zr(iw,.075),foreground:zr(Ni,.075),muted:zr(aw,.075),primary:zr(Em,.075),secondary:zr(sw,.075),get text(){return bc(this.background)},get primaryText(){return bc(this.primary)},get secondaryText(){return bc(this.secondary)}},ga={color:{...lw,active:uV,hover:dV,shadow1:HC,shadow2:UC,shadow3:WC,backdrop:ng(Ni,.1),outline:ng(Em,.6),table:{default:{border:hp(Ni,.8),cell:hp(Ni,.4),controller:Mo.gray[3]},selected:{border:Mo.blue[7],cell:Mo.blue[1],controller:Mo.blue[5]},preselect:{border:Mo.blue[7],cell:hp(Ni,.4),controller:Mo.blue[5]},predelete:{border:Mo.red[7],cell:Mo.red[1],controller:Mo.red[5]},mark:"#91919196"}},hue:Mo,radius:{border:"0.25rem",extra:"0.5rem",circle:"50%"},fontFamily:{default:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif',heading:"inherit",mono:"Menlo, monospace"},fontSize:{0:"12px",1:"14px",2:"16px",3:"20px",4:"24px",5:"32px",6:"48px",7:"64px",8:"96px",default:"16px"},space:{1:"4px",2:"8px",3:"16px",4:"32px",5:"64px",6:"128px",7:"256px",8:"512px"},fontWeight:{bold:"700",default:"400",heading:"700"},letterSpacing:{tight:"-1px",default:"normal",loose:"1px",wide:"3px"},lineHeight:{heading:"1.25em",default:"1.5em"},boxShadow:{1:`0 1px 1px ${HC}`,2:`0 1px 1px ${UC}`,3:`0 1px 1px ${WC}`}};var hV=Object.defineProperty,fV=Object.getOwnPropertyDescriptor,Yi=(t,e,n,r)=>{for(var o=r>1?void 0:r?fV(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&hV(e,n,o),o},zM=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},ns=(t,e,n)=>(zM(t,e,"read from private field"),n?n.call(t):e.get(t)),d1=(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)},h1=(t,e,n,r)=>(zM(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),FM="data-code-block-language";function BM(t,e,n=[]){return t.map(r=>{const o=[...n];return r.type==="element"&&r.properties.className?o.push(...r.properties.className):r.type==="text"&&o.length===0&&e&&o.push(e),r.type==="element"?BM(r.children,e,o):{text:r.value,classes:o}})}function pV(t,e){var n;const{node:r,pos:o}=t,i=rg({language:(n=r.attrs.language)==null?void 0:n.replace("language-",""),fallback:"markup"}),s=nw.highlight(r.textContent??"",i),l=BM(s,e);let a=o+1;function u(c){const d=a,h=d+c.text.length;return a=h,{...c,from:d,to:h}}return cR(l).map(u)}function VC(t){const{blocks:e,skipLast:n,plainTextClassName:r}=t,o=[];for(const i of e){const s=pV(i,r),l=n?s.length-1:s.length;for(const a of fb(l)){const u=s[a],c=u==null?void 0:u.classes;if(!u||!(c!=null&&c.length))continue;const d=kt.inline(u.from,u.to,{class:c.join(" ")});o.push(d)}}return o}function gV(t){return!!(t&&Dn(t)&&ke(t.language)&&t.language.length>0)}function mV(t){return e=>({state:{tr:n,selection:r},dispatch:o})=>{if(!gV(e))throw new Error("Invalid attrs passed to the updateAttributes method");const i=hi({types:t,selection:r});return!i||lR(e,i.node.attrs)?!1:(n.setNodeMarkup(i.pos,t,{...i.node.attrs,...e}),o&&o(n),!0)}}function rg(t){const{language:e,fallback:n}=t;if(!e)return n;const r=nw.listLanguages();for(const o of r)if(o.toLowerCase()===e.toLowerCase())return o;return n}function vV(t,e){const{language:n,wrap:r}=gm(t.attrs,e),{style:o,...i}=e.dom(t);let s=i.style;return r&&(s=pF({whiteSpace:"pre-wrap",wordBreak:"break-all"},s)),["pre",{spellcheck:"false",...i,class:Pc(i.class,`language-${n}`)},["code",{[FM]:n,style:s},0]]}function yV(t){return({pos:e}=be())=>({tr:n,dispatch:r})=>{const{type:o,formatter:i,defaultLanguage:s}=t,{from:l,to:a}=e?{from:e,to:e}:n.selection,u=hi({types:o,selection:n.selection});if(!u)return!1;const{node:{attrs:c,textContent:d},start:h}=u,f=l-h,p=a-h,g=rg({language:c.language,fallback:s}),m=i({source:d,language:g,cursorOffset:f});let v;if(f!==p&&(v=i({source:d,language:g,cursorOffset:p})),!m)return!1;const{cursorOffset:y,formatted:b}=m;if(b===d)return!1;const w=h+d.length;n.insertText(b,h,w);const k=h+y,x=v?h+v.cursorOffset:void 0;return n.setSelection(Ie.between(n.doc.resolve(k),n.doc.resolve(x??k))),r&&r(n),!0}}function bV(t){var e;return(e=t.getAttribute(FM)??t.classList[0])==null?void 0:e.replace("language-","")}var{DESCRIPTION:wV,LABEL:xV}=t5,kV={icon:"bracesLine",description:({t})=>t(wV),label:({t})=>t(xV)},ba,Qu,Ju,EV=class{constructor(t,e){d1(this,ba,void 0),d1(this,Qu,void 0),d1(this,Ju,!1),h1(this,Qu,t),h1(this,ba,e)}init(t){const e=AF({node:t.doc,type:ns(this,Qu)});return this.refreshDecorationSet(t.doc,e),this}refreshDecorationSet(t,e){const n=VC({blocks:e,skipLast:ns(this,Ju),defaultLanguage:ns(this,ba).options.defaultLanguage,plainTextClassName:ns(this,ba).options.plainTextClassName??void 0});this.decorationSet=je.create(t,n)}apply(t,e){if(!t.docChanged)return this;this.decorationSet=this.decorationSet.map(t.mapping,t.doc);const n=_F(t,{descend:!0,predicate:r=>r.type===ns(this,Qu),StepTypes:[]});return this.updateDecorationSet(t,n),this}updateDecorationSet(t,e){if(e.length===0)return;let n=this.decorationSet;for(const{node:r,pos:o}of e)n=this.decorationSet.remove(this.decorationSet.find(o,o+r.nodeSize));this.decorationSet=n.add(t.doc,VC({blocks:e,skipLast:ns(this,Ju),defaultLanguage:ns(this,ba).options.defaultLanguage,plainTextClassName:ns(this,ba).options.plainTextClassName??void 0}))}setDeleted(t){h1(this,Ju,t)}};ba=new WeakMap;Qu=new WeakMap;Ju=new WeakMap;var mo=class extends Pn{get name(){return"codeBlock"}createTags(){return[Ee.Block,Ee.Code]}init(){this.registerLanguages()}createNodeSpec(t,e){const n=/highlight-(?:text|source)-([\da-z]+)/;return{content:"text*",marks:"",defining:!0,draggable:!1,...e,code:!0,attrs:{...t.defaults(),language:{default:this.options.defaultLanguage},wrap:{default:this.options.defaultWrap}},parseDOM:[{tag:"div.highlight",preserveWhitespace:"full",getAttrs:r=>{var o,i;if(!zt(r))return!1;const s=r.querySelector("pre.code");if(!zt(s))return!1;const l=Xo(s,"white-space")==="pre-wrap",a=(i=(o=r.className.match(n))==null?void 0:o[1])==null?void 0:i.replace("language-","");return{...t.parse(r),language:a,wrap:l}}},{tag:"pre",preserveWhitespace:"full",getAttrs:r=>{if(!zt(r))return!1;const o=r.querySelector("code");if(!zt(o))return!1;const i=Xo(o,"white-space")==="pre-wrap",s=this.options.getLanguageFromDom(o,r);return{...t.parse(r),language:s,wrap:i}}},...e.parseDOM??[]],toDOM:r=>vV(r,t)}}createAttributes(){return{class:B0[this.options.syntaxTheme.toUpperCase()]}}createInputRules(){const t=/^```([\dA-Za-z]*) $/,e=n=>({language:rg({language:yc(n,1),fallback:this.options.defaultLanguage})});return[G2({regexp:t,type:this.type,beforeDispatch:({tr:n,start:r})=>{const o=n.doc.resolve(r);n.setSelection(Ie.near(o))},getAttributes:e})]}onSetOptions(t){const{changes:e}=t;e.supportedLanguages.changed&&this.registerLanguages(),e.syntaxTheme.changed&&this.store.updateAttributes()}createPlugin(){const t=new EV(this.type,this),e=()=>(t.setDeleted(!0),!1);return{state:{init(n,r){return t.init(r)},apply(n,r,o,i){return t.apply(n,i)}},props:{handleKeyDown:Pb({Backspace:e,"Mod-Backspace":e,Delete:e,"Mod-Delete":e,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e}),decorations(){return t.setDeleted(!1),t.decorationSet}}}}toggleCodeBlock(t={}){return $b({type:this.type,toggleType:this.options.toggleName,attrs:{language:this.options.defaultLanguage,...t}})}createCodeBlock(t){return Gd(this.type,t)}updateCodeBlock(t){return mV(this.type)(t)}formatCodeBlock(t){return yV({type:this.type,formatter:this.options.formatter,defaultLanguage:this.options.defaultLanguage})(t)}tabKey({state:t,dispatch:e}){const{selection:n,tr:r,schema:o}=t,{node:i}=Bz(n);if(!dm({node:i,types:this.type}))return!1;if(n.empty)r.insertText(" ");else{const{from:s,to:l}=n;r.replaceWith(s,l,o.text(" "))}return e&&e(r),!0}backspaceKey({dispatch:t,tr:e,state:n}){if(!e.selection.empty)return!1;const r=hi({types:this.type,selection:e.selection});if((r==null?void 0:r.start)!==e.selection.from)return!1;const{pos:o,node:i,start:s}=r,l=Ot(n.schema.nodes,this.options.toggleName);return i.textContent.trim()===""?e.doc.lastChild===i&&e.doc.firstChild===i?zz({pos:o,tr:e,content:l.create()}):Pz({pos:o,tr:e}):s>2?e.setSelection(Ie.near(e.doc.resolve(s-2))):(e.insert(0,l.create()),e.setSelection(Ie.near(e.doc.resolve(1)))),t&&t(e),!0}enterKey({dispatch:t,tr:e}){if(!(Js(e.selection)&&e.selection.empty))return!1;const{nodeBefore:n,parent:r}=e.selection.$anchor;if(!(n!=null&&n.isText)||!r.type.isTextblock)return!1;const o=/^```([A-Za-z]*)?$/,{text:i,nodeSize:s}=n,{textContent:l}=r;if(!i)return!1;const a=i.match(o),u=l.match(o);if(!a||!u)return!1;const[,c]=a,d=rg({language:c,fallback:this.options.defaultLanguage}),h=e.selection.$from.before(),f=h+s+1;return e.replaceWith(h,f,this.type.create({language:d})),e.setSelection(Ie.near(e.doc.resolve(h+1))),t&&t(e),!0}formatShortcut({tr:t}){const e=this.store.commands;if(!I2({type:this.type,state:t}))return!1;const n=e.formatCodeBlock.isEnabled();return n&&e.formatCodeBlock(),n}registerLanguages(){for(const t of this.options.supportedLanguages)nw.register(t)}};Yi([de(kV)],mo.prototype,"toggleCodeBlock",1);Yi([de()],mo.prototype,"createCodeBlock",1);Yi([de()],mo.prototype,"updateCodeBlock",1);Yi([de()],mo.prototype,"formatCodeBlock",1);Yi([nn({shortcut:"Tab"})],mo.prototype,"tabKey",1);Yi([nn({shortcut:"Backspace"})],mo.prototype,"backspaceKey",1);Yi([nn({shortcut:"Enter"})],mo.prototype,"enterKey",1);Yi([nn({shortcut:oe.Format})],mo.prototype,"formatShortcut",1);mo=Yi([Pe({defaultOptions:{supportedLanguages:[],toggleName:"paragraph",formatter:({source:t})=>({cursorOffset:0,formatted:t}),syntaxTheme:"a11y_dark",defaultLanguage:"markup",defaultWrap:!1,plainTextClassName:"",getLanguageFromDom:bV},staticKeys:["getLanguageFromDom"]})],mo);var SV=Object.defineProperty,CV=Object.getOwnPropertyDescriptor,cw=(t,e,n,r)=>{for(var o=r>1?void 0:r?CV(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&SV(e,n,o),o},HM=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},sn=(t,e,n)=>(HM(t,e,"read from private field"),n?n.call(t):e.get(t)),ki=(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)},rs=(t,e,n,r)=>(HM(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),ed,td,ql,nd,fp,rd,od,id,sd,pp=class{constructor(t){ki(this,ed,vm()),ki(this,td,[]),ki(this,ql,new Map),ki(this,nd,[]),ki(this,fp,!1),ki(this,rd,void 0),ki(this,od,void 0),ki(this,id,void 0),ki(this,sd,void 0),this.addListener=(e,n)=>sn(this,ed).on(e,n),rs(this,rd,t),rs(this,od,t.getActive),rs(this,sd,t.getPosition),rs(this,id,t.getID),this.hasChanged=t.hasChanged,this.events=t.events??["state","scroll"]}static create(t){return new pp(t)}static fromPositioner(t,e){return pp.create({...t.basePositioner,...e})}get basePositioner(){return{getActive:sn(this,od),getPosition:sn(this,sd),hasChanged:this.hasChanged,events:this.events,getID:sn(this,id)}}onActiveChanged(t){this.recentUpdate=t;const e=sn(this,od).call(this,t);rs(this,td,e),rs(this,ql,new Map),rs(this,fp,!1),rs(this,nd,[]);const n=[];for(const[r,o]of e.entries()){const i=this.getID(o,r);sn(this,nd).push(i),n.push({setElement:s=>this.addProps({...t,data:o,element:s},r),id:i,data:o})}sn(this,ed).emit("update",n)}getID(t,e){var n;return((n=sn(this,id))==null?void 0:n.call(this,t,e))??e.toString()}addProps(t,e){if(sn(this,fp)||(sn(this,ql).set(e,t),sn(this,ql).sizet;return this.clone(n=>({getActive:r=>n.getActive(r).filter(e)}))}},Vr=pp;ed=new WeakMap;td=new WeakMap;ql=new WeakMap;nd=new WeakMap;fp=new WeakMap;rd=new WeakMap;od=new WeakMap;id=new WeakMap;sd=new WeakMap;Vr.EMPTY=[];function TV(t,e=WM){const{key:n}=(t==null?void 0:t.getMeta(UM))??{};return n===e}function uw(t){const{tr:e,state:n,previousState:r}=t;return!r||e&&TV(e)?!0:e?Uz(e):!n.doc.eq(r.doc)||!n.selection.eq(r.selection)}function dw(t,e,n={}){const r=e.getBoundingClientRect(),{accountForPadding:o=!1}=n;let i=0,s=0,l=0,a=0;if(zt(e)&&o){const c=Number.parseFloat(Xo(e,"padding-left").replace("px","")),d=Number.parseFloat(Xo(e,"padding-right").replace("px","")),h=Number.parseFloat(Xo(e,"padding-top").replace("px","")),f=Number.parseFloat(Xo(e,"padding-bottom").replace("px","")),p=Number.parseFloat(Xo(e,"border-left").replace("px","")),g=Number.parseFloat(Xo(e,"border-right").replace("px","")),m=Number.parseFloat(Xo(e,"border-top").replace("px","")),v=Number.parseFloat(Xo(e,"border-bottom").replace("px","")),y=e.offsetWidth-e.clientWidth,b=e.offsetHeight-e.clientHeight;i+=c+p+(e.dir==="rtl"?y:0),s+=d+g+(e.dir==="rtl"?0:y),l+=h+m,a+=f+v+b}const u=new DOMRect(r.left+i,r.top+l,r.width-s,r.height-a);for(const[c,d]of[[t.top,t.left],[t.top,t.right],[t.bottom,t.left],[t.bottom,t.right]])if(rS(c,u.top,u.bottom)&&rS(d,u.left,u.right))return!0;return!1}var AV="remirror-positioner-widget",UM="positionerUpdate",WM="__all_positioners__",VM={y:-999999,x:-999999,width:0,height:0},jC={...VM,left:-999999,top:-999999,bottom:-999999,right:-999999},Sm={...VM,rect:{...jC,toJSON:()=>jC},visible:!1},jM=Vr.create({hasChanged:uw,getActive(t){const{state:e}=t;if(!Ob(e)||e.selection.$anchor.depth>2)return Vr.EMPTY;const n=Hh({predicate:r=>r.type.isBlock,selection:e});return n?[n]:Vr.EMPTY},getPosition(t){const{view:e,data:n}=t,r=e.nodeDOM(n.pos);if(!zt(r))return Sm;const o=r.getBoundingClientRect(),i=e.dom.getBoundingClientRect(),s=o.height,l=o.width,a=e.dom.scrollLeft+o.left-i.left,u=e.dom.scrollTop+o.top-i.top,c=dw(o,e.dom);return{y:u,x:a,height:s,width:l,rect:o,visible:c}}}),hw=jM.clone(({getActive:t})=>({getActive:e=>{const[n]=t(e);return n&&fm(n.node)&&n.node.type===hm(e.state.schema)?[n]:Vr.EMPTY}})),_V=hw.clone(({getPosition:t})=>({getPosition:e=>({...t(e),width:1})})),RV=hw.clone(({getPosition:t})=>({getPosition:e=>{const{width:n,x:r,y:o,height:i}=t(e);return{...t(e),width:1,x:n+r,rect:new DOMRect(n+r,o,1,i)}}}));function fw(t){return Vr.create({hasChanged:uw,getActive:e=>{const{state:n,view:r}=e;if(!t(n)||!Js(n.selection))return Vr.EMPTY;try{const{head:o,anchor:i}=n.selection;return[{from:r.coordsAtPos(i),to:r.coordsAtPos(o)}]}catch{return Vr.EMPTY}},getPosition(e){const{element:n,data:r,view:o}=e,{from:i,to:s}=r,l=n.offsetParent??o.dom,a=l.getBoundingClientRect(),u=Math.abs(s.bottom-i.top),c=u>i.bottom-i.top,d=Math.min(i.left,s.left),h=Math.min(i.top,s.top),f=l.scrollLeft+(c?s.left-a.left:d-a.left),p=l.scrollTop+h-a.top,g=c?1:Math.abs(i.left-s.right),m=new DOMRect(c?s.left:d,h,g,u),v=dw(m,o.dom);return{rect:m,y:p,x:f,height:u,width:g,visible:v}}})}var GM=fw(t=>!t.selection.empty),MV=fw(t=>t.selection.empty),OV=fw(()=>!0),IV=GM.clone(()=>({getActive:t=>{const{state:e,view:n}=t;if(!e.selection.empty)return Vr.EMPTY;const r=z2(e);if(!r)return Vr.EMPTY;try{return[{from:n.coordsAtPos(r.from),to:n.coordsAtPos(r.to)}]}catch{return Vr.EMPTY}}})),LV={selection:GM,cursor:MV,always:OV,block:jM,emptyBlock:hw,emptyBlockStart:_V,emptyBlockEnd:RV,nearestWord:IV},Fc=class extends yt{constructor(){super(...arguments),this.positioners=[],this.onAddCustomHandler=({positioner:t})=>{if(t)return this.positioners=[...this.positioners,t],this.store.commands.forceUpdate(),()=>{this.positioners=this.positioners.filter(e=>e!==t)}}}get name(){return"positioner"}createAttributes(){return{class:nV.EDITOR}}init(){this.onScroll=rR(this.options.scrollDebounce,this.onScroll.bind(this))}createEventHandlers(){return{scroll:()=>(this.onScroll(),!1),hover:(t,e)=>(this.positioner(this.getBaseProps("hover",{hover:e})),!1),contextmenu:(t,e)=>(this.positioner(this.getBaseProps("contextmenu",{contextmenu:e})),!1)}}onStateUpdate(t){this.positioner({...t,previousState:t.firstUpdate?void 0:t.previousState,event:"state",helpers:this.store.helpers})}createDecorations(t){if(this.element??(this.element=this.createElement()),!this.element.hasChildNodes())return je.empty;const e=kt.widget(0,this.element,{key:"positioner-widget",side:-1,stopEvent:()=>!0});return je.create(t.doc,[e])}forceUpdatePositioners(t=WM){return({tr:e,dispatch:n})=>(n==null||n(e.setMeta(UM,{key:t})),!0)}getPositionerWidget(){return this.element??(this.element=this.createElement())}createElement(){const t=document.createElement("span");return t.dataset.id=AV,t.setAttribute("role","presentation"),t}triggerPositioner(t,e){t.hasChanged(e)&&t.onActiveChanged({...e,view:this.store.view})}positioner(t){for(const e of this.positioners)e.events.includes(t.event)&&this.triggerPositioner(e,t)}getBaseProps(t,e){const n=this.store.getState(),r=this.store.previousState;return{helpers:this.store.helpers,event:t,firstUpdate:!1,previousState:r,state:n,...e}}onScroll(){this.positioner(this.getBaseProps("scroll",{scroll:{scrollTop:this.store.view.dom.scrollTop}}))}};cw([de()],Fc.prototype,"forceUpdatePositioners",1);cw([bt()],Fc.prototype,"getPositionerWidget",1);Fc=cw([Pe({defaultOptions:{scrollDebounce:100},customHandlerKeys:["positioner"],staticKeys:["scrollDebounce"]})],Fc);function H0(t){return ke(t)?LV[t].clone():tt(t)?t().clone():t.clone()}function NV(t){const e=P.createContext(null),n=$V(e);return[o=>{const i=t(o);return ee.createElement(e.Provider,{value:i},o.children)},n,e]}function $V(t){return(e,n)=>{const r=P.useContext(t),o=DV(r);if(!r)throw new Error("`useContextHook` must be placed inside the `Provider` returned by the `createContextState` method");if(!e)return r;if(typeof e!="function")throw new TypeError("invalid arguments passed to `useContextHook`. This hook must be called with zero arguments, a getter function or a path string.");const i=e(r);if(!o||!n)return i;const s=e(o);return n(s,i)?s:i}}function DV(t){const e=P.useRef();return PV(()=>{e.current=t}),e.current}var PV=typeof document<"u"?P.useLayoutEffect:P.useEffect;function zV(t,e){return NV(n=>{const r=P.useRef(null),o=P.useRef(),i=e==null?void 0:e(n),[s,l]=P.useState(()=>t({get:GC(r),set:KC(o),previousContext:void 0,props:n,state:i})),a=[...Object.values(n),i];return P.useEffect(()=>{a.length!==0&&l(u=>t({get:GC(r),set:KC(o),previousContext:u,props:n,state:i}))},a),r.current=s,o.current=l,s})}function GC(t){return e=>{if(!t.current)throw new Error("`get` called outside of function scope. `get` can only be called within a function.");if(!e)return t.current;if(typeof e!="function")throw new TypeError("Invalid arguments passed to `useContextHook`. The hook must be called with zero arguments, a getter function or a path string.");return e(t.current)}}function KC(t){return e=>{if(!t.current)throw new Error("`set` called outside of function scope. `set` can only be called within a function.");t.current(n=>({...n,...typeof e=="function"?e(n):e}))}}var KM={},YM={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.errorMessages=t.ErrorType=void 0;var e;(function(n){n.MalformedUnicode="MALFORMED_UNICODE",n.MalformedHexadecimal="MALFORMED_HEXADECIMAL",n.CodePointLimit="CODE_POINT_LIMIT",n.OctalDeprecation="OCTAL_DEPRECATION",n.EndOfString="END_OF_STRING"})(e=t.ErrorType||(t.ErrorType={})),t.errorMessages=new Map([[e.MalformedUnicode,"malformed Unicode character escape sequence"],[e.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[e.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[e.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[e.EndOfString,"malformed escape sequence at end of string"]])})(YM);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.unraw=t.errorMessages=t.ErrorType=void 0;const e=YM;Object.defineProperty(t,"ErrorType",{enumerable:!0,get:function(){return e.ErrorType}}),Object.defineProperty(t,"errorMessages",{enumerable:!0,get:function(){return e.errorMessages}});function n(f){return!f.match(/[^a-f0-9]/i)?parseInt(f,16):NaN}function r(f,p,g){const m=n(f);if(Number.isNaN(m)||g!==void 0&&g!==f.length)throw new SyntaxError(e.errorMessages.get(p));return m}function o(f){const p=r(f,e.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(p)}function i(f,p){const g=r(f,e.ErrorType.MalformedUnicode,4);if(p!==void 0){const m=r(p,e.ErrorType.MalformedUnicode,4);return String.fromCharCode(g,m)}return String.fromCharCode(g)}function s(f){return f.charAt(0)==="{"&&f.charAt(f.length-1)==="}"}function l(f){if(!s(f))throw new SyntaxError(e.errorMessages.get(e.ErrorType.MalformedUnicode));const p=f.slice(1,-1),g=r(p,e.ErrorType.MalformedUnicode);try{return String.fromCodePoint(g)}catch(m){throw m instanceof RangeError?new SyntaxError(e.errorMessages.get(e.ErrorType.CodePointLimit)):m}}function a(f,p=!1){if(p)throw new SyntaxError(e.errorMessages.get(e.ErrorType.OctalDeprecation));const g=parseInt(f,8);return String.fromCharCode(g)}const u=new Map([["b","\b"],["f","\f"],["n",` +`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function c(f){return u.get(f)||f}const d=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function h(f,p=!1){return f.replace(d,function(g,m,v,y,b,w,k,x,S){if(m!==void 0)return"\\";if(v!==void 0)return o(v);if(y!==void 0)return l(y);if(b!==void 0)return i(b,w);if(k!==void 0)return i(k);if(x==="0")return"\0";if(x!==void 0)return a(x,!p);if(S!==void 0)return c(S);throw new SyntaxError(e.errorMessages.get(e.ErrorType.EndOfString))})}t.unraw=h,t.default=h})(KM);const FV=jo(KM),$i=t=>typeof t=="string",BV=t=>typeof t=="function",YC=new Map;function pw(t){return[...Array.isArray(t)?t:[t],"en"]}function XM(t,e,n){const r=pw(t);return og(()=>ig("date",r,n),()=>new Intl.DateTimeFormat(r,n)).format($i(e)?new Date(e):e)}function U0(t,e,n){const r=pw(t);return og(()=>ig("number",r,n),()=>new Intl.NumberFormat(r,n)).format(e)}function XC(t,e,n,{offset:r=0,...o}){const i=pw(t),s=e?og(()=>ig("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):og(()=>ig("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return o[n]??o[s.select(n-r)]??o.other}function og(t,e){const n=t();let r=YC.get(n);return r||(r=e(),YC.set(n,r)),r}function ig(t,e,n){const r=e.join("-");return`${t}-${r}-${JSON.stringify(n)}`}const qM=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g,HV=(t,e,n={})=>{e=e||t;const r=i=>$i(i)?n[i]||{style:i}:i,o=(i,s)=>{const l=Object.keys(n).length?r("number"):{},a=U0(e,i,l);return s.replace("#",a)};return{plural:(i,s)=>{const{offset:l=0}=s,a=XC(e,!1,i,s);return o(i-l,a)},selectordinal:(i,s)=>{const{offset:l=0}=s,a=XC(e,!0,i,s);return o(i-l,a)},select:(i,s)=>s[i]??s.other,number:(i,s)=>U0(e,i,r(s)),date:(i,s)=>XM(e,i,r(s)),undefined:i=>i}};function UV(t,e,n){return(r,o={})=>{const i=HV(e,n,o),s=a=>Array.isArray(a)?a.reduce((u,c)=>{if($i(c))return u+c;const[d,h,f]=c;let p={};f!=null&&!$i(f)?Object.keys(f).forEach(m=>{p[m]=s(f[m])}):p=f;const g=i[h](r[d],p);return g==null?u:u+g},""):a,l=s(t);return $i(l)&&qM.test(l)?FV(l.trim()):$i(l)?l.trim():l}}var WV=Object.defineProperty,VV=(t,e,n)=>e in t?WV(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,jV=(t,e,n)=>(VV(t,typeof e!="symbol"?e+"":e,n),n);class GV{constructor(){jV(this,"_events",{})}on(e,n){return this._hasEvent(e)||(this._events[e]=[]),this._events[e].push(n),()=>this.removeListener(e,n)}removeListener(e,n){if(!this._hasEvent(e))return;const r=this._events[e].indexOf(n);~r&&this._events[e].splice(r,1)}emit(e,...n){this._hasEvent(e)&&this._events[e].map(r=>r.apply(this,n))}_hasEvent(e){return Array.isArray(this._events[e])}}var KV=Object.defineProperty,YV=(t,e,n)=>e in t?KV(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Dl=(t,e,n)=>(YV(t,typeof e!="symbol"?e+"":e,n),n);class XV extends GV{constructor(e){super(),Dl(this,"_locale"),Dl(this,"_locales"),Dl(this,"_localeData"),Dl(this,"_messages"),Dl(this,"_missing"),Dl(this,"t",this._.bind(this)),this._messages={},this._localeData={},e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(e.locale!=null||e.locales!=null)&&this.activate(e.locale,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}get localeData(){return this._localeData[this._locale]??{}}_loadLocaleData(e,n){this._localeData[e]==null?this._localeData[e]=n:Object.assign(this._localeData[e],n)}loadLocaleData(e,n){n!=null?this._loadLocaleData(e,n):Object.keys(e).forEach(r=>this._loadLocaleData(r,e[r])),this.emit("change")}_load(e,n){this._messages[e]==null?this._messages[e]=n:Object.assign(this._messages[e],n)}load(e,n){n!=null?this._load(e,n):Object.keys(e).forEach(r=>this._load(r,e[r])),this.emit("change")}loadAndActivate({locale:e,locales:n,messages:r}){this._locale=e,this._locales=n||void 0,this._messages[this._locale]=r,this.emit("change")}activate(e,n){this._locale=e,this._locales=n,this.emit("change")}_(e,n={},{message:r,formats:o}={}){$i(e)||(n=e.values||n,r=e.message,e=e.id);const i=!this.messages[e],s=this._missing;if(s&&i)return BV(s)?s(this._locale,e):s;i&&this.emit("missing",{id:e,locale:this._locale});let l=this.messages[e]||r||e;return $i(l)&&qM.test(l)?JSON.parse(`"${l}"`):$i(l)?l:UV(l,this._locale,this._locales)(n,o)}date(e,n){return XM(this._locales||this._locale,e,n)}number(e,n){return U0(this._locales||this._locale,e,n)}}function qV(t={}){return new XV(t)}const Cm=qV();function se(t,e){return e?"other":t==1?"one":"other"}function Xi(t,e){return e?"other":t==0||t==1?"one":"other"}function Mr(t,e){var n=String(t).split("."),r=!n[1];return e?"other":t==1&&r?"one":"other"}function at(t,e){return"other"}function na(t,e){return e?"other":t==1?"one":t==2?"two":"other"}const ZV=at,QV=se,JV=Xi;function ej(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const tj=se;function nj(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-2);return e?"other":t==0?"zero":t==1?"one":t==2?"two":o>=3&&o<=10?"few":o>=11&&o<=99?"many":"other"}function rj(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-2);return e?"other":t==0?"zero":t==1?"one":t==2?"two":o>=3&&o<=10?"few":o>=11&&o<=99?"many":"other"}function oj(t,e){return e?t==1||t==5||t==7||t==8||t==9||t==10?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}const ij=se,sj=Mr;function aj(t,e){var n=String(t).split("."),r=n[0],o=r.slice(-1),i=r.slice(-2),s=r.slice(-3);return e?o==1||o==2||o==5||o==7||o==8||i==20||i==50||i==70||i==80?"one":o==3||o==4||s==100||s==200||s==300||s==400||s==500||s==600||s==700||s==800||s==900?"few":r==0||o==6||i==40||i==60||i==90?"many":"other":t==1?"one":"other"}function lj(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-1),i=r&&n[0].slice(-2);return e?(o==2||o==3)&&i!=12&&i!=13?"few":"other":o==1&&i!=11?"one":o>=2&&o<=4&&(i<12||i>14)?"few":r&&o==0||o>=5&&o<=9||i>=11&&i<=14?"many":"other"}const cj=se,uj=se,dj=se,hj=Xi,fj=at;function pj(t,e){return e?t==1||t==5||t==7||t==8||t==9||t==10?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}const gj=at;function mj(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-1),i=r&&n[0].slice(-2),s=r&&n[0].slice(-6);return e?"other":o==1&&i!=11&&i!=71&&i!=91?"one":o==2&&i!=12&&i!=72&&i!=92?"two":(o==3||o==4||o==9)&&(i<10||i>19)&&(i<70||i>79)&&(i<90||i>99)?"few":t!=0&&r&&s==0?"many":"other"}const vj=se;function yj(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=r.slice(-2),a=o.slice(-1),u=o.slice(-2);return e?"other":i&&s==1&&l!=11||a==1&&u!=11?"one":i&&s>=2&&s<=4&&(l<12||l>14)||a>=2&&a<=4&&(u<12||u>14)?"few":"other"}function bj(t,e){var n=String(t).split("."),r=!n[1];return e?t==1||t==3?"one":t==2?"two":t==4?"few":"other":t==1&&r?"one":"other"}const wj=se;function xj(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=o.slice(-1);return e?"other":i&&(r==1||r==2||r==3)||i&&s!=4&&s!=6&&s!=9||!i&&l!=4&&l!=6&&l!=9?"one":"other"}const kj=se,Ej=se,Sj=se;function Cj(t,e){var n=String(t).split("."),r=n[0],o=!n[1];return e?"other":t==1&&o?"one":r>=2&&r<=4&&o?"few":o?"other":"many"}function Tj(t,e){return e?t==0||t==7||t==8||t==9?"zero":t==1?"one":t==2?"two":t==3||t==4?"few":t==5||t==6?"many":"other":t==0?"zero":t==1?"one":t==2?"two":t==3?"few":t==6?"many":"other"}function Aj(t,e){var n=String(t).split("."),r=n[0],o=Number(n[0])==t;return e?"other":t==1||!o&&(r==0||r==1)?"one":"other"}const _j=Mr;function Rj(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-2),l=o.slice(-2);return e?"other":i&&s==1||l==1?"one":i&&s==2||l==2?"two":i&&(s==3||s==4)||l==3||l==4?"few":"other"}const Mj=se,Oj=at,Ij=se,Lj=se;function Nj(t,e){var n=String(t).split("."),r=!n[1],o=Number(n[0])==t,i=o&&n[0].slice(-1),s=o&&n[0].slice(-2);return e?i==1&&s!=11?"one":i==2&&s!=12?"two":i==3&&s!=13?"few":"other":t==1&&r?"one":"other"}const $j=se,Dj=se,Pj=Mr,zj=se;function Fj(t,e){return e?"other":t>=0&&t<=1?"one":"other"}function Bj(t,e){return e?"other":t>=0&&t<2?"one":"other"}const Hj=Mr;function Uj(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=o.slice(-1);return e?t==1?"one":"other":i&&(r==1||r==2||r==3)||i&&s!=4&&s!=6&&s!=9||!i&&l!=4&&l!=6&&l!=9?"one":"other"}const Wj=se;function Vj(t,e){return e?t==1?"one":"other":t>=0&&t<2?"one":"other"}const jj=se,Gj=Mr;function Kj(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?t==1?"one":"other":t==1?"one":t==2?"two":r&&t>=3&&t<=6?"few":r&&t>=7&&t<=10?"many":"other"}function Yj(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?t==1||t==11?"one":t==2||t==12?"two":t==3||t==13?"few":"other":t==1||t==11?"one":t==2||t==12?"two":r&&t>=3&&t<=10||r&&t>=13&&t<=19?"few":"other"}const Xj=Mr,qj=se;function Zj(t,e){return e?t==1?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}const Qj=Xi;function Jj(t,e){var n=String(t).split("."),r=n[0],o=!n[1],i=r.slice(-1),s=r.slice(-2);return e?"other":o&&i==1?"one":o&&i==2?"two":o&&(s==0||s==20||s==40||s==60||s==80)?"few":o?"other":"many"}const eG=se,tG=se;function nG(t,e){var n=String(t).split("."),r=n[0],o=!n[1],i=Number(n[0])==t,s=i&&n[0].slice(-1);return e?"other":t==1&&o?"one":r==2&&o?"two":o&&(t<0||t>10)&&i&&s==0?"many":"other"}function rG(t,e){return e?t==1?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}function oG(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=r.slice(-2),a=o.slice(-1),u=o.slice(-2);return e?"other":i&&s==1&&l!=11||a==1&&u!=11?"one":i&&s>=2&&s<=4&&(l<12||l>14)||a>=2&&a<=4&&(u<12||u>14)?"few":"other"}function iG(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-2),l=o.slice(-2);return e?"other":i&&s==1||l==1?"one":i&&s==2||l==2?"two":i&&(s==3||s==4)||l==3||l==4?"few":"other"}function sG(t,e){return e?t==1||t==5?"one":"other":t==1?"one":"other"}function aG(t,e){return e?t==1?"one":"other":t>=0&&t<2?"one":"other"}const lG=Mr,cG=at,uG=at,dG=at,hG=Mr;function fG(t,e){var n=String(t).split("."),r=n[0],o=Number(n[0])==t,i=r.slice(-1),s=r.slice(-2);return e?"other":o&&i==1&&s!=11||!o?"one":"other"}function pG(t,e){var n=String(t).split("."),r=!n[1];return e?t==11||t==8||t==80||t==800?"many":"other":t==1&&r?"one":"other"}const gG=na;function mG(t,e){var n=String(t).split("."),r=n[0],o=!n[1],i=Number(n[0])==t,s=i&&n[0].slice(-1);return e?"other":t==1&&o?"one":r==2&&o?"two":o&&(t<0||t>10)&&i&&s==0?"many":"other"}const vG=at,yG=at,bG=se,wG=Mr,xG=se,kG=at,EG=at;function SG(t,e){var n=String(t).split("."),r=n[0],o=r.slice(-2);return e?r==1?"one":r==0||o>=2&&o<=20||o==40||o==60||o==80?"many":"other":t==1?"one":"other"}function CG(t,e){return e?"other":t>=0&&t<2?"one":"other"}const TG=se,AG=se,_G=at,RG=at;function MG(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-1);return e?o==6||o==9||r&&o==0&&t!=0?"many":"other":t==1?"one":"other"}const OG=se,IG=se,LG=at;function NG(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const $G=at,DG=se,PG=se;function zG(t,e){return e?"other":t==0?"zero":t==1?"one":"other"}const FG=se;function BG(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-2),i=r&&n[0].slice(-3),s=r&&n[0].slice(-5),l=r&&n[0].slice(-6);return e?r&&t>=1&&t<=4||o>=1&&o<=4||o>=21&&o<=24||o>=41&&o<=44||o>=61&&o<=64||o>=81&&o<=84?"one":t==5||o==5?"many":"other":t==0?"zero":t==1?"one":o==2||o==22||o==42||o==62||o==82||r&&i==0&&(s>=1e3&&s<=2e4||s==4e4||s==6e4||s==8e4)||t!=0&&l==1e5?"two":o==3||o==23||o==43||o==63||o==83?"few":t!=1&&(o==1||o==21||o==41||o==61||o==81)?"many":"other"}const HG=se;function UG(t,e){var n=String(t).split("."),r=n[0];return e?"other":t==0?"zero":(r==0||r==1)&&t!=0?"one":"other"}const WG=se,VG=se,jG=at,GG=Xi;function KG(t,e){return e&&t==1?"one":"other"}function YG(t,e){var n=String(t).split("."),r=n[1]||"",o=Number(n[0])==t,i=o&&n[0].slice(-1),s=o&&n[0].slice(-2);return e?"other":i==1&&(s<11||s>19)?"one":i>=2&&i<=9&&(s<11||s>19)?"few":r!=0?"many":"other"}function XG(t,e){var n=String(t).split("."),r=n[1]||"",o=r.length,i=Number(n[0])==t,s=i&&n[0].slice(-1),l=i&&n[0].slice(-2),a=r.slice(-2),u=r.slice(-1);return e?"other":i&&s==0||l>=11&&l<=19||o==2&&a>=11&&a<=19?"zero":s==1&&l!=11||o==2&&u==1&&a!=11||o!=2&&u==1?"one":"other"}const qG=se,ZG=Xi,QG=se;function JG(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=r.slice(-2),a=o.slice(-1),u=o.slice(-2);return e?s==1&&l!=11?"one":s==2&&l!=12?"two":(s==7||s==8)&&l!=17&&l!=18?"many":"other":i&&s==1&&l!=11||a==1&&u!=11?"one":"other"}const eK=se,tK=se;function nK(t,e){var n=String(t).split("."),r=!n[1],o=Number(n[0])==t,i=o&&n[0].slice(-2);return e?t==1?"one":"other":t==1&&r?"one":!r||t==0||i>=2&&i<=19?"few":"other"}function rK(t,e){return e?t==1?"one":t==2||t==3?"two":t==4?"few":"other":t==1?"one":"other"}function oK(t,e){return e&&t==1?"one":"other"}function iK(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-2);return e?"other":t==1?"one":t==0||o>=2&&o<=10?"few":o>=11&&o<=19?"many":"other"}const sK=at,aK=se,lK=na,cK=se,uK=se;function dK(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?r&&t>=1&&t<=4?"one":"other":t==1?"one":"other"}const hK=Mr,fK=se,pK=se,gK=se,mK=at,vK=se,yK=Xi,bK=se,wK=se,xK=se;function kK(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?t==1||t==5||r&&t>=7&&t<=9?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t==1?"one":"other"}const EK=se,SK=at,CK=Xi,TK=se;function AK(t,e){var n=String(t).split("."),r=n[0],o=!n[1],i=r.slice(-1),s=r.slice(-2);return e?"other":t==1&&o?"one":o&&i>=2&&i<=4&&(s<12||s>14)?"few":o&&r!=1&&(i==0||i==1)||o&&i>=5&&i<=9||o&&s>=12&&s<=14?"many":"other"}function _K(t,e){var n=String(t).split("."),r=n[1]||"",o=r.length,i=Number(n[0])==t,s=i&&n[0].slice(-1),l=i&&n[0].slice(-2),a=r.slice(-2),u=r.slice(-1);return e?"other":i&&s==0||l>=11&&l<=19||o==2&&a>=11&&a<=19?"zero":s==1&&l!=11||o==2&&u==1&&a!=11||o!=2&&u==1?"one":"other"}const RK=se;function MK(t,e){var n=String(t).split("."),r=n[0];return e?"other":r==0||r==1?"one":"other"}const OK=Mr,IK=se;function LK(t,e){var n=String(t).split("."),r=!n[1],o=Number(n[0])==t,i=o&&n[0].slice(-2);return e?t==1?"one":"other":t==1&&r?"one":!r||t==0||i>=2&&i<=19?"few":"other"}const NK=se,$K=at;function DK(t,e){var n=String(t).split("."),r=n[0],o=!n[1],i=r.slice(-1),s=r.slice(-2);return e?"other":o&&i==1&&s!=11?"one":o&&i>=2&&i<=4&&(s<12||s>14)?"few":o&&i==0||o&&i>=5&&i<=9||o&&s>=11&&s<=14?"many":"other"}const PK=se,zK=at,FK=se;function BK(t,e){var n=String(t).split("."),r=!n[1];return e?t==11||t==8||t==80||t==800?"many":"other":t==1&&r?"one":"other"}function HK(t,e){var n=String(t).split("."),r=!n[1];return e?t==11||t==8||t==80||t==800?"many":"other":t==1&&r?"one":"other"}const UK=se,WK=se,VK=na,jK=se,GK=at,KK=at;function YK(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=r.slice(-2),a=o.slice(-1),u=o.slice(-2);return e?"other":i&&s==1&&l!=11||a==1&&u!=11?"one":i&&s>=2&&s<=4&&(l<12||l>14)||a>=2&&a<=4&&(u<12||u>14)?"few":"other"}function XK(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?"other":t>=0&&t<=1?"one":r&&t>=2&&t<=10?"few":"other"}function qK(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"";return e?"other":t==0||t==1||r==0&&o==1?"one":"other"}function ZK(t,e){var n=String(t).split("."),r=n[0],o=!n[1];return e?"other":t==1&&o?"one":r>=2&&r<=4&&o?"few":o?"other":"many"}function QK(t,e){var n=String(t).split("."),r=n[0],o=!n[1],i=r.slice(-2);return e?"other":o&&i==1?"one":o&&i==2?"two":o&&(i==3||i==4)||!o?"few":"other"}const JK=na,eY=na,tY=na,nY=na,rY=na,oY=se,iY=se;function sY(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-1),i=r&&n[0].slice(-2);return e?t==1?"one":o==4&&i!=14?"many":"other":t==1?"one":"other"}function aY(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=r.slice(-2),a=o.slice(-1),u=o.slice(-2);return e?"other":i&&s==1&&l!=11||a==1&&u!=11?"one":i&&s>=2&&s<=4&&(l<12||l>14)||a>=2&&a<=4&&(u<12||u>14)?"few":"other"}const lY=se,cY=se,uY=se,dY=at;function hY(t,e){var n=String(t).split("."),r=!n[1],o=Number(n[0])==t,i=o&&n[0].slice(-1),s=o&&n[0].slice(-2);return e?(i==1||i==2)&&s!=11&&s!=12?"one":"other":t==1&&r?"one":"other"}const fY=Mr,pY=se,gY=se,mY=se,vY=se,yY=at,bY=Xi,wY=se;function xY(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-1);return e?o==6||o==9||t==10?"few":"other":t==1?"one":"other"}function kY(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=o.slice(-1);return e?t==1?"one":"other":i&&(r==1||r==2||r==3)||i&&s!=4&&s!=6&&s!=9||!i&&l!=4&&l!=6&&l!=9?"one":"other"}const EY=se,SY=at,CY=se,TY=se;function AY(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?"other":t==0||t==1||r&&t>=11&&t<=99?"one":"other"}const _Y=se;function RY(t,e){var n=String(t).split("."),r=n[0],o=!n[1],i=Number(n[0])==t,s=i&&n[0].slice(-1),l=i&&n[0].slice(-2),a=r.slice(-1),u=r.slice(-2);return e?s==3&&l!=13?"few":"other":o&&a==1&&u!=11?"one":o&&a>=2&&a<=4&&(u<12||u>14)?"few":o&&a==0||o&&a>=5&&a<=9||o&&u>=11&&u<=14?"many":"other"}const MY=Mr,OY=se,IY=se;function LY(t,e){return e&&t==1?"one":"other"}const NY=se,$Y=se,DY=Xi,PY=se,zY=at,FY=se,BY=se,HY=Mr,UY=at,WY=at,VY=at;function jY(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const GY=Object.freeze(Object.defineProperty({__proto__:null,_in:ZV,af:QV,ak:JV,am:ej,an:tj,ar:nj,ars:rj,as:oj,asa:ij,ast:sj,az:aj,be:lj,bem:cj,bez:uj,bg:dj,bho:hj,bm:fj,bn:pj,bo:gj,br:mj,brx:vj,bs:yj,ca:bj,ce:wj,ceb:xj,cgg:kj,chr:Ej,ckb:Sj,cs:Cj,cy:Tj,da:Aj,de:_j,dsb:Rj,dv:Mj,dz:Oj,ee:Ij,el:Lj,en:Nj,eo:$j,es:Dj,et:Pj,eu:zj,fa:Fj,ff:Bj,fi:Hj,fil:Uj,fo:Wj,fr:Vj,fur:jj,fy:Gj,ga:Kj,gd:Yj,gl:Xj,gsw:qj,gu:Zj,guw:Qj,gv:Jj,ha:eG,haw:tG,he:nG,hi:rG,hr:oG,hsb:iG,hu:sG,hy:aG,ia:lG,id:cG,ig:uG,ii:dG,io:hG,is:fG,it:pG,iu:gG,iw:mG,ja:vG,jbo:yG,jgo:bG,ji:wG,jmc:xG,jv:kG,jw:EG,ka:SG,kab:CG,kaj:TG,kcg:AG,kde:_G,kea:RG,kk:MG,kkj:OG,kl:IG,km:LG,kn:NG,ko:$G,ks:DG,ksb:PG,ksh:zG,ku:FG,kw:BG,ky:HG,lag:UG,lb:WG,lg:VG,lkt:jG,ln:GG,lo:KG,lt:YG,lv:XG,mas:qG,mg:ZG,mgo:QG,mk:JG,ml:eK,mn:tK,mo:nK,mr:rK,ms:oK,mt:iK,my:sK,nah:aK,naq:lK,nb:cK,nd:uK,ne:dK,nl:hK,nn:fK,nnh:pK,no:gK,nqo:mK,nr:vK,nso:yK,ny:bK,nyn:wK,om:xK,or:kK,os:EK,osa:SK,pa:CK,pap:TK,pl:AK,prg:_K,ps:RK,pt:MK,pt_PT:OK,rm:IK,ro:LK,rof:NK,root:$K,ru:DK,rwk:PK,sah:zK,saq:FK,sc:BK,scn:HK,sd:UK,sdh:WK,se:VK,seh:jK,ses:GK,sg:KK,sh:YK,shi:XK,si:qK,sk:ZK,sl:QK,sma:JK,smi:eY,smj:tY,smn:nY,sms:rY,sn:oY,so:iY,sq:sY,sr:aY,ss:lY,ssy:cY,st:uY,su:dY,sv:hY,sw:fY,syr:pY,ta:gY,te:mY,teo:vY,th:yY,ti:bY,tig:wY,tk:xY,tl:kY,tn:EY,to:SY,tr:CY,ts:TY,tzm:AY,ug:_Y,uk:RY,ur:MY,uz:OY,ve:IY,vi:LY,vo:NY,vun:$Y,wa:DY,wae:PY,wo:zY,xh:FY,xog:BY,yi:HY,yo:UY,yue:WY,zh:VY,zu:jY},Symbol.toStringTag,{value:"Module"}));var KY=Object.defineProperty,YY=Object.getOwnPropertyDescriptor,XY=Object.getOwnPropertyNames,qY=Object.prototype.hasOwnProperty,qC=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of XY(e))!qY.call(t,o)&&o!==n&&KY(t,o,{get:()=>e[o],enumerable:!(r=YY(e,o))||r.enumerable});return t},ZY=(t,e,n)=>(qC(t,e,"default"),n&&qC(n,e,"default")),QY=JSON.parse('{"extension.command.toggle-upper-case.label":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text case"}]],"extension.table.column_count":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"extension.table.row_count":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.toggle-columns.description":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"extension.command.toggle-columns.label":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"extension.command.set-text-direction.label":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"extension.command.set-text-direction.description":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"extension.command.toggle-heading.label":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"extension.command.toggle-callout.description":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"extension.command.toggle-callout.label":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"extension.command.toggle-code-block.description":"Add a code block","extension.command.add-annotation.label":"Add annotation","extension.command.toggle-blockquote.description":"Add blockquote formatting to the selected text","extension.command.toggle-bold.description":"Add bold formatting to the selected text","extension.command.toggle-code.description":"Add inline code formatting to the selected text","keyboard.shortcut.alt":"Alt","keyboard.shortcut.arrowDown":"Arrow Down","keyboard.shortcut.arrowLeft":"Arrow Left","keyboard.shortcut.arrowRight":"Arrow Right","keyboard.shortcut.arrowUp":"Arrow Up","keyboard.shortcut.backspace":"Backspace","ui.text-color.black":"Black","extension.command.toggle-blockquote.label":"Blockquote","ui.text-color.blue":"Blue","ui.text-color.blue.hue":["Blue ",["hue"]],"extension.command.toggle-bold.label":"Bold","extension.command.toggle-bullet-list.description":"Bulleted list","keyboard.shortcut.capsLock":"Caps Lock","extension.command.center-align.label":"Center align","extension.command.toggle-code.label":"Code","extension.command.toggle-code-block.label":"Codeblock","keyboard.shortcut.command":"Command","QcPNd6":"Image description","ogrUzJ":"Add a short description here.","yqdyzr":"Image","6/02F4":"Image source","X8H91v":"Image","zhQ7Zt":"Italic","ZL7E7l":"Underline","keyboard.shortcut.control":"Control","extension.command.convert-paragraph.description":"Convert current block into a paragraph block.","extension.command.convert-paragraph.label":"Convert Paragraph","extension.command.copy.label":"Copy","extension.command.copy.description":"Copy the selected text","extension.command.create-table.description":"Create a table with set number of rows and columns.","extension.command.create-table.label":"Create table","extension.command.cut.label":"Cut","extension.command.cut.description":"Cut the selected text","ui.text-color.cyan":"Cyan","ui.text-color.cyan.hue":["Cyan ",["hue"]],"extension.command.decrease-font-size.label":"Decrease","extension.command.decrease-indent.label":"Decrease indentation","extension.command.decrease-font-size.description":"Decrease the font size.","keyboard.shortcut.delete":"Delete","extension.command.insert-horizontal-rule.label":"Divider","keyboard.shortcut.end":"End","keyboard.shortcut.escape":"Enter","keyboard.shortcut.enter":"Enter","6PjrOF":"Add annotation","OTq5WC":"Center align","oeZ3ox":"Convert current block into a paragraph block.","m1khs+":"Convert Paragraph","w/1U+3":"Copy the selected text","kdodi0":"Copy","k0KR/u":"Create a table with set number of rows and columns.","zrwMyD":"Create table","D/nWxh":"Cut the selected text","jHPv5m":"Cut","5cNgRx":"Decrease the font size.","vyRNWx":"Decrease","Jgiol4":"Decrease indentation","1gJSHH":"Increase the font size","OQXJXz":"Increase","72TLhr":"Increase indentation","HFlfzJ":"Insert Emoji","RPq9fY":"Separate content with a diving horizontal line","OKQF+e":"Divider","zjYb9C":"Insert a new paragraph","4M4sXC":"Insert Paragraph","1Q+eVc":"Justify","ejWWtP":"Left align","wVqrpS":"Paste content into the editor","07v9aw":"Paste","zUYfou":"Redo the most recent action","9Nq9zr":"Redo","0uxaZe":"Remove annotation","iJWZAz":"Right align","g5WpPn":"Select all content within the editor","2+pZDT":"Select all","yChCR1":"Set text case","GMzAC/":"Set the font size for the selected text.","vzEyrv":"Font size","7VCkJ8":"Set the text color for the selected text.","qjWFaR":"Text color","LVWgFu":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"WXwRy1":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"G/o315":"Set the text highlight color for the selected text.","xtHg6d":"Text highlight","1p1W/p":"Add blockquote formatting to the selected text","6+rh6I":"Blockquote","0yB3LV":"Add bold formatting to the selected text","sFMo4Z":"Bold","SMKG/s":"Bulleted list","/BYCMi":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"V+3IBe":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"hbIo4L":"Add a code block","7GkMcx":"Codeblock","2r4JYl":"Add inline code formatting to the selected text","Up8Tpe":"Code","ATHSPS":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"7DC1VE":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"hnrBeo":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"NkZAcw":"Italicize the selected text","2fTW9e":"Italic","c759Ra":"Ordered list","uQwrZu":"Strikethrough the selected text","pT3qly":"Strikethrough","BHk+zu":"Subscript","18BVwM":"Superscript","tOIVCV":"Tasked list","4Janx3":"Underline the selected text","dCHt+D":"Underline","YYAprs":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text case"}]],"tczyZL":"Show hidden whitespace characters in your editor.","0qAX23":"Toggle Whitespace","ezMADU":"Undo the most recent action","N3P7EC":"Undo","2nj/+s":"Update annotation","dWD7u4":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"qXqgVT":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.set-font-size.label":"Font size","ui.text-color.grape":"Grape","ui.text-color.grape.hue":["Grape ",["hue"]],"ui.text-color.gray":"Gray","ui.text-color.gray.hue":["Gray ",["hue"]],"ui.text-color.green":"Green","ui.text-color.green.hue":["Green ",["hue"]],"keyboard.shortcut.home":"Home","extension.command.increase-font-size.label":"Increase","extension.command.increase-indent.label":"Increase indentation","extension.command.increase-font-size.description":"Increase the font size","ui.text-color.indigo":"Indigo","ui.text-color.indigo.hue":["Indigo ",["hue"]],"extension.command.insert-paragraph.description":"Insert a new paragraph","extension.command.insert-emoji.label":"Insert Emoji","extension.command.insert-paragraph.label":"Insert Paragraph","extension.command.toggle-italic.label":"Italic","extension.command.toggle-italic.description":"Italicize the selected text","extension.command.justify-align.label":"Justify","R7NlCw":"Alt","RbDiK5":"Arrow Down","Dgyd+E":"Arrow Left","8pdCk4":"Arrow Right","Gp/343":"Arrow Up","PFPV0A":"Backspace","0IRYvp":"Caps Lock","X7HX0D":"Command","zq0AdD":"Control","8SfToN":"Delete","Ys/uah":"End","3K5hww":"Enter","veQt1j":"Enter","ySv7i+":"Home","e6RUI1":"Page Down","EEJk31":"Page Up","7sbhAU":"Shift","Q4eplT":"Space","SUhVVC":"Tab","extension.command.left-align.label":"Left align","ui.text-color.lime":"Lime","ui.text-color.lime.hue":["Lime ",["hue"]],"react-components.mention-atom-component.zero-items":"No items available","ui.text-color.orange":"Orange","ui.text-color.orange.hue":["Orange ",["hue"]],"extension.command.toggle-ordered-list.label":"Ordered list","keyboard.shortcut.pageDown":"Page Down","keyboard.shortcut.pageUp":"Page Up","extension.command.paste.label":"Paste","extension.command.paste.description":"Paste content into the editor","ui.text-color.pink":"Pink","ui.text-color.pink.hue":["Pink ",["hue"]],"zvMfIA":"No items available","pEjhti":"Static Menu","ui.text-color.red":"Red","ui.text-color.red.hue":["Red ",["hue"]],"extension.command.redo.label":"Redo","extension.command.redo.description":"Redo the most recent action","extension.command.remove-annotation.label":"Remove annotation","extension.command.right-align.label":"Right align","extension.command.select-all.label":"Select all","extension.command.select-all.description":"Select all content within the editor","extension.command.insert-horizontal-rule.description":"Separate content with a diving horizontal line","extension.command.set-casing.label":"Set text case","extension.command.set-font-size.description":"Set the font size for the selected text.","extension.command.set-text-color.description":"Set the text color for the selected text.","extension.command.set-text-highlight.description":"Set the text highlight color for the selected text.","keyboard.shortcut.shift":"Shift","extension.command.toggle-whitespace.description":"Show hidden whitespace characters in your editor.","keyboard.shortcut.space":"Space","extension.command.toggle-strike.label":"Strikethrough","extension.command.toggle-strike.description":"Strikethrough the selected text","extension.command.toggle-subscript.label":"Subscript","extension.command.toggle-superscript.label":"Superscript","keyboard.shortcut.tab":"Tab","extension.command.toggle-task-list.description":"Tasked list","ui.text-color.teal":"Teal","ui.text-color.teal.hue":["Teal ",["hue"]],"extension.command.set-text-color.label":"Text color","extension.command.set-text-highlight.label":"Text highlight","extension.command.toggle-whitespace.label":"Toggle Whitespace","ui.text-color.transparent":"Transparent","slrB1c":"Black","6QML30":"Blue","xw+keN":["Blue ",["hue"]],"38RHqP":"Cyan","D89yPf":["Cyan ",["hue"]],"VjBLnd":"Grape","Rp40yv":["Grape ",["hue"]],"5Dm9D1":"Gray","HGjXjC":["Gray ",["hue"]],"b9fz+n":"Green","18jo3M":["Green ",["hue"]],"CFzqCV":"Indigo","aVlDku":["Indigo ",["hue"]],"04PfLc":"Lime","KRTK6Y":["Lime ",["hue"]],"pSnXFd":"Orange","ve/MJZ":["Orange ",["hue"]],"OvCgDa":"Pink","l7NqyT":["Pink ",["hue"]],"IT9k0j":"Red","AdyJ7/":["Red ",["hue"]],"3D2UWc":"Teal","Dcq0Y1":["Teal ",["hue"]],"bsi2ik":"Transparent","Tj3PRR":"Violet","xxMH5N":["Violet ",["hue"]],"Rum0ah":"White","4gaw/Q":"Yellow","hhauc3":["Yellow ",["hue"]],"extension.command.toggle-underline.label":"Underline","extension.command.toggle-underline.description":"Underline the selected text","extension.command.undo.label":"Undo","extension.command.undo.description":"Undo the most recent action","extension.command.update-annotation.label":"Update annotation","ui.text-color.violet":"Violet","ui.text-color.violet.hue":["Violet ",["hue"]],"ui.text-color.white":"White","ui.text-color.yellow":"Yellow","ui.text-color.yellow.hue":["Yellow ",["hue"]]}'),ZM={};ZY(ZM,GY);Cm.loadLocaleData("en",{plurals:ZM.en});Cm.load("en",QY);Cm.activate("en");var JY=Object.defineProperty,eX=Object.getOwnPropertyDescriptor,gw=(t,e,n,r)=>{for(var o=r>1?void 0:r?eX(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&JY(e,n,o),o},Bc=class extends Pn{get name(){return"doc"}createNodeSpec(t,e){const{docAttributes:n,content:r}=this.options,o=be();if(Zs(n))for(const[i,s]of cn(n))o[i]={default:s};else for(const i of n)o[i]={default:null};return{attrs:o,content:r,...e}}setDocAttributes(t){return({tr:e,dispatch:n})=>{if(n){for(const[r,o]of Object.entries(t))e.step(new qd(r,o));n(e)}return!0}}isDefaultDocNode({state:t=this.store.getState(),options:e}={}){return Nb(t.doc,e)}};gw([de()],Bc.prototype,"setDocAttributes",1);gw([bt()],Bc.prototype,"isDefaultDocNode",1);Bc=gw([Pe({defaultOptions:{content:"block+",docAttributes:[]},defaultPriority:dt.Medium,staticKeys:["content","docAttributes"],disableExtraAttributes:!0})],Bc);var QM="SetDocAttribute",JM="RevertSetDocAttribute",qd=class extends dn{constructor(t,e,n=QM){super(),this.stepType=n,this.key=t,this.value=e}static fromJSON(t,e){return new qd(e.key,e.value,e.stepType)}apply(t){this.previous=t.attrs[this.key];const e={...t.attrs,[this.key]:this.value};return Xt.ok(t.type.create(e,t.content,t.marks))}invert(){return new qd(this.key,this.previous,JM)}map(){return this}toJSON(){return{stepType:this.stepType,key:this.key,value:this.value}}};try{dn.jsonID(QM,qd),dn.jsonID(JM,qd)}catch(t){if(!t.message.startsWith("Duplicate use of step JSON ID"))throw t}var tX=Object.defineProperty,nX=Object.getOwnPropertyDescriptor,eO=(t,e,n,r)=>{for(var o=r>1?void 0:r?nX(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&tX(e,n,o),o};function rX(t,e,n,r){const o=t.docView.posFromDOM(e,n,r);return o===null||o<0?null:o}function oX(t,e){const n=e.target;if(n){const r=rX(t,n,0);if(r!==null){const o=t.state.doc.resolve(r),i=o.node().isLeaf?0:1,s=o.start()-i;return{pos:r,inside:s}}}return t.posAtCoords({left:e.clientX,top:e.clientY})??void 0}var sg=class extends yt{constructor(){super(...arguments),this.mousedown=!1,this.mouseover=!1,this.createMouseEventHandler=t=>(e,n)=>{const r=n,o=oX(e,r);if(!o)return!1;const i=[],s=[],{inside:l,pos:a}=o;if(l===-1)return!1;const u=e.state.doc.resolve(a),c=u.depth+1;for(const d of fb(c,1))i.push({node:d>u.depth&&u.nodeAfter?u.nodeAfter:u.node(d),pos:u.before(d)});for(const{type:d}of u.marksAcross(u)??[]){const h=Hi(u,d);h&&s.push(h)}return t(r,{view:e,nodes:i,marks:s,getMark:d=>{const h=ke(d)?e.state.schema.marks[d]:d;return we(h,{code:re.EXTENSION,message:`The mark ${d} being checked does not exist within the editor schema.`}),s.find(f=>f.mark.type===h)},getNode:d=>{var h;const f=ke(d)?e.state.schema.nodes[d]:d;we(f,{code:re.EXTENSION,message:"The node being checked does not exist"});const p=i.find(({node:g})=>g.type===f);if(p)return{...p,isRoot:!!((h=i[0])!=null&&h.node.eq(p.node))}}})}}get name(){return"events"}onView(){var t,e;if(!((t=this.store.managerSettings.exclude)!=null&&t.clickHandler))for(const n of this.store.extensions){if(!n.createEventHandlers||(e=n.options.exclude)!=null&&e.clickHandler)continue;const r=n.createEventHandlers();for(const[o,i]of cn(r))this.addHandler(o,i)}}createPlugin(){const t=new WeakMap,e=(n,r,o,i,s,l,a,u)=>{const c=this.store.currentState,{schema:d,doc:h}=c,f=h.resolve(i),p=t.has(a),g=iX({$pos:f,handled:p,view:o,state:c});let m=!1;p||(m=n(a,g)||m);const v={...g,pos:i,direct:u,nodeWithPosition:{node:s,pos:l},getNode:y=>{const b=ke(y)?d.nodes[y]:y;return we(b,{code:re.EXTENSION,message:"The node being checked does not exist"}),b===s.type?{node:s,pos:l}:void 0}};return t.set(a,!0),r(a,v)||m};return{props:{handleKeyPress:(n,r)=>this.options.keypress(r)||!1,handleKeyDown:(n,r)=>this.options.keydown(r)||!1,handleTextInput:(n,r,o,i)=>this.options.textInput({from:r,to:o,text:i})||!1,handleClickOn:(n,r,o,i,s,l)=>e(this.options.clickMark,this.options.click,n,r,o,i,s,l),handleDoubleClickOn:(n,r,o,i,s,l)=>e(this.options.doubleClickMark,this.options.doubleClick,n,r,o,i,s,l),handleTripleClickOn:(n,r,o,i,s,l)=>e(this.options.tripleClickMark,this.options.tripleClick,n,r,o,i,s,l),handleDOMEvents:{focus:(n,r)=>this.options.focus(r)||!1,blur:(n,r)=>this.options.blur(r)||!1,mousedown:(n,r)=>(this.startMouseover(),this.options.mousedown(r)||!1),mouseup:(n,r)=>(this.endMouseover(),this.options.mouseup(r)||!1),mouseleave:(n,r)=>(this.mouseover=!1,this.options.mouseleave(r)||!1),mouseenter:(n,r)=>(this.mouseover=!0,this.options.mouseenter(r)||!1),keyup:(n,r)=>this.options.keyup(r)||!1,mouseout:this.createMouseEventHandler((n,r)=>{const o={...r,hovering:!1};return this.options.hover(n,o)||!1}),mouseover:this.createMouseEventHandler((n,r)=>{const o={...r,hovering:!0};return this.options.hover(n,o)||!1}),contextmenu:this.createMouseEventHandler((n,r)=>this.options.contextmenu(n,r)||!1),scroll:(n,r)=>this.options.scroll(r)||!1,copy:(n,r)=>this.options.copy(r)||!1,cut:(n,r)=>this.options.cut(r)||!1,paste:(n,r)=>this.options.paste(r)||!1}},view:n=>{let r=n.editable;const o=this.options;return{update(i){const s=i.editable;s!==r&&(o.editable(s),r=s)}}}}}isInteracting(){return this.mousedown&&this.mouseover}startMouseover(){this.mouseover=!0,!this.mousedown&&(this.mousedown=!0,this.store.document.documentElement.addEventListener("mouseup",()=>{this.endMouseover()},{once:!0}))}endMouseover(){this.mousedown&&(this.mousedown=!1,this.store.commands.emptyUpdate())}};eO([bt()],sg.prototype,"isInteracting",1);sg=eO([Pe({handlerKeys:["blur","focus","mousedown","mouseup","mouseenter","mouseleave","textInput","keypress","keyup","keydown","click","clickMark","doubleClick","doubleClickMark","tripleClick","tripleClickMark","contextmenu","hover","scroll","copy","cut","paste","editable"],handlerKeyOptions:{blur:{earlyReturnValue:!0},focus:{earlyReturnValue:!0},mousedown:{earlyReturnValue:!0},mouseleave:{earlyReturnValue:!0},mouseup:{earlyReturnValue:!0},click:{earlyReturnValue:!0},doubleClick:{earlyReturnValue:!0},tripleClick:{earlyReturnValue:!0},hover:{earlyReturnValue:!0},contextmenu:{earlyReturnValue:!0},scroll:{earlyReturnValue:!0},copy:{earlyReturnValue:!0},cut:{earlyReturnValue:!0},paste:{earlyReturnValue:!0}},defaultPriority:dt.High})],sg);function iX(t){const{handled:e,view:n,$pos:r,state:o}=t,i={getMark:uR,markRanges:[],view:n,state:o};if(e)return i;for(const{type:s}of r.marksAcross(r)??[]){const l=Hi(r,s);l&&i.markRanges.push(l)}return i.getMark=s=>{const l=ke(s)?o.schema.marks[s]:s;return we(l,{code:re.EXTENSION,message:`The mark ${s} being checked does not exist within the editor schema.`}),i.markRanges.find(a=>a.mark.type===l)},i}class Gt extends Ue{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return Gt.valid(r)?new Gt(r):Ue.near(r)}content(){return ae.empty}eq(e){return e instanceof Gt&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new Gt(e.resolve(n.pos))}getBookmark(){return new mw(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!sX(e)||!aX(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(e.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&Gt.valid(e))return e;let o=e.pos,i=null;for(let s=e.depth;;s--){let l=e.node(s);if(n>0?e.indexAfter(s)0){i=l.child(n>0?e.indexAfter(s):e.index(s)-1);break}else if(s==0)return null;o+=n;let a=e.doc.resolve(o);if(Gt.valid(a))return a}for(;;){let s=n>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!Le.isSelectable(i)){e=e.doc.resolve(o+i.nodeSize*n),r=!1;continue e}break}i=s,o+=n;let l=e.doc.resolve(o);if(Gt.valid(l))return l}return null}}}Gt.prototype.visible=!1;Gt.findFrom=Gt.findGapCursorFrom;Ue.jsonID("gapcursor",Gt);class mw{constructor(e){this.pos=e}map(e){return new mw(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return Gt.valid(n)?new Gt(n):Ue.near(n)}}function sX(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function aX(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function lX(){return new gi({props:{decorations:hX,createSelectionBetween(t,e,n){return e.pos==n.pos&&Gt.valid(n)?new Gt(n):null},handleClick:uX,handleKeyDown:cX,handleDOMEvents:{beforeinput:dX}}})}const cX=Pb({ArrowLeft:_f("horiz",-1),ArrowRight:_f("horiz",1),ArrowUp:_f("vert",-1),ArrowDown:_f("vert",1)});function _f(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,o,i){let s=r.selection,l=e>0?s.$to:s.$from,a=s.empty;if(s instanceof Ie){if(!i.endOfTextblock(n)||l.depth==0)return!1;a=!1,l=r.doc.resolve(e>0?l.after():l.before())}let u=Gt.findGapCursorFrom(l,e,a);return u?(o&&o(r.tr.setSelection(new Gt(u))),!0):!1}}function uX(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!Gt.valid(r))return!1;let o=t.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&Le.isSelectable(t.state.doc.nodeAt(o.inside))?!1:(t.dispatch(t.state.tr.setSelection(new Gt(r))),!0)}function dX(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof Gt))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let o=Q.empty;for(let s=r.length-1;s>=0;s--)o=Q.from(r[s].createAndFill(null,o));let i=t.state.tr.replace(n.pos,n.pos,new ae(o,0,0));return i.setSelection(Ie.near(i.doc.resolve(n.pos+1))),t.dispatch(i),!1}function hX(t){if(!(t.selection instanceof Gt))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",je.create(t.doc,[kt.widget(t.selection.head,e,{key:"gapcursor"})])}var fX=Object.defineProperty,pX=Object.getOwnPropertyDescriptor,gX=(t,e,n,r)=>{for(var o=r>1?void 0:r?pX(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&fX(e,n,o),o},W0=class extends yt{get name(){return"gapCursor"}createExternalPlugins(){return[lX()]}};W0=gX([Pe({})],W0);var ag=200,wn=function(){};wn.prototype.append=function(e){return e.length?(e=wn.from(e),!this.length&&e||e.length=n?wn.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};wn.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};wn.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};wn.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,s){return o.push(e(i,s))},n,r),o};wn.from=function(e){return e instanceof wn?e:e&&e.length?new tO(e):wn.empty};var tO=function(t){function e(r){t.call(this),this.values=r}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(o,i){return o==0&&i==this.length?this:new e(this.values.slice(o,i))},e.prototype.getInner=function(o){return this.values[o]},e.prototype.forEachInner=function(o,i,s,l){for(var a=i;a=s;a--)if(o(this.values[a],l+a)===!1)return!1},e.prototype.leafAppend=function(o){if(this.length+o.length<=ag)return new e(this.values.concat(o.flatten()))},e.prototype.leafPrepend=function(o){if(this.length+o.length<=ag)return new e(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(wn);wn.empty=new tO([]);var mX=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.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(r){return rl&&this.right.forEachInner(r,Math.max(o-l,0),Math.min(this.length,i)-l,s+l)===!1)return!1},e.prototype.forEachInvertedInner=function(r,o,i,s){var l=this.left.length;if(o>l&&this.right.forEachInvertedInner(r,o-l,Math.max(i,l)-l,s+l)===!1||i=i?this.right.slice(r-i,o-i):this.left.slice(r,i).append(this.right.slice(0,o-i))},e.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new e(this.left,o)},e.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new e(o,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(wn);const vX=500;class Do{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,i;n&&(o=this.remapping(r,this.items.length),i=o.maps.length);let s=e.tr,l,a,u=[],c=[];return this.items.forEach((d,h)=>{if(!d.step){o||(o=this.remapping(r,h+1),i=o.maps.length),i--,c.push(d);return}if(o){c.push(new qo(d.map));let f=d.step.map(o.slice(i)),p;f&&s.maybeStep(f).doc&&(p=s.mapping.maps[s.mapping.maps.length-1],u.push(new qo(p,void 0,void 0,u.length+c.length))),i--,p&&o.appendMap(p,i)}else s.maybeStep(d.step);if(d.selection)return l=o?d.selection.map(o.slice(i)):d.selection,a=new Do(this.items.slice(0,r).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:a,transform:s,selection:l}}addTransform(e,n,r,o){let i=[],s=this.eventCount,l=this.items,a=!o&&l.length?l.get(l.length-1):null;for(let c=0;cbX&&(l=yX(l,u),s-=u),new Do(l.append(i),s)}remapping(e,n){let r=new pc;return this.items.forEach((o,i)=>{let s=o.mirrorOffset!=null&&i-o.mirrorOffset>=e?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,s)},e,n),r}addMaps(e){return this.eventCount==0?this:new Do(this.items.append(e.map(n=>new qo(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=e.mapping,s=e.steps.length,l=this.eventCount;this.items.forEach(h=>{h.selection&&l--},o);let a=n;this.items.forEach(h=>{let f=i.getMirror(--a);if(f==null)return;s=Math.min(s,f);let p=i.maps[f];if(h.step){let g=e.steps[f].invert(e.docs[f]),m=h.selection&&h.selection.map(i.slice(a+1,f));m&&l++,r.push(new qo(p,g,m))}else r.push(new qo(p))},o);let u=[];for(let h=n;hvX&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,o=[],i=0;return this.items.forEach((s,l)=>{if(l>=e)o.push(s),s.selection&&i++;else if(s.step){let a=s.step.map(n.slice(r)),u=a&&a.getMap();if(r--,u&&n.appendMap(u,r),a){let c=s.selection&&s.selection.map(n.slice(r));c&&i++;let d=new qo(u.invert(),a,c),h,f=o.length-1;(h=o.length&&o[f].merge(d))?o[f]=h:o.push(d)}}else s.map&&r--},this.items.length,0),new Do(wn.from(o.reverse()),i)}}Do.empty=new Do(wn.empty,0);function yX(t,e){let n;return t.forEach((r,o)=>{if(r.selection&&e--==0)return n=o,!1}),t.slice(n)}class qo{constructor(e,n,r,o){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=o}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new qo(n.getMap().invert(),n,this.selection)}}}class ps{constructor(e,n,r,o,i){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}}const bX=20;function wX(t,e,n,r){let o=n.getMeta(ii),i;if(o)return o.historyState;n.getMeta(kX)&&(t=new ps(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(s&&s.getMeta(ii))return s.getMeta(ii).redo?new ps(t.done.addTransform(n,void 0,r,gp(e)),t.undone,ZC(n.mapping.maps[n.steps.length-1]),t.prevTime,t.prevComposition):new ps(t.done,t.undone.addTransform(n,void 0,r,gp(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let l=n.getMeta("composition"),a=t.prevTime==0||!s&&t.prevComposition!=l&&(t.prevTime<(n.time||0)-r.newGroupDelay||!xX(n,t.prevRanges)),u=s?f1(t.prevRanges,n.mapping):ZC(n.mapping.maps[n.steps.length-1]);return new ps(t.done.addTransform(n,a?e.selection.getBookmark():void 0,r,gp(e)),Do.empty,u,n.time,l??t.prevComposition)}else return(i=n.getMeta("rebased"))?new ps(t.done.rebased(n,i),t.undone.rebased(n,i),f1(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new ps(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),f1(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function xX(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,o)=>{for(let i=0;i=e[i]&&(n=!0)}),n}function ZC(t){let e=[];return t.forEach((n,r,o,i)=>e.push(o,i)),e}function f1(t,e){if(!t)return null;let n=[];for(let r=0;r{let n=ii.getState(t);return!n||n.done.eventCount==0?!1:(e&&nO(n,t,e,!1),!0)},ad=(t,e)=>{let n=ii.getState(t);return!n||n.undone.eventCount==0?!1:(e&&nO(n,t,e,!0),!0)};function V0(t){let e=ii.getState(t);return e?e.done.eventCount:0}function SX(t){let e=ii.getState(t);return e?e.undone.eventCount:0}var CX=Object.defineProperty,TX=Object.getOwnPropertyDescriptor,bl=(t,e,n,r)=>{for(var o=r>1?void 0:r?TX(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&CX(e,n,o),o},fi=class extends yt{constructor(){super(...arguments),this.wrapMethod=(t,e)=>({state:n,dispatch:r,view:o})=>{const{getState:i,getDispatch:s}=this.options,l=tt(i)?i():n,a=tt(s)&&r?s():r,u=t(l,a,o);return e==null||e(u),u}}get name(){return"history"}createKeymap(){return{"Mod-y":Br.isMac?()=>!1:this.wrapMethod(ad,this.options.onRedo),"Mod-z":this.wrapMethod(mp,this.options.onUndo),"Shift-Mod-z":this.wrapMethod(ad,this.options.onRedo)}}undoShortcut(t){return this.wrapMethod(mp,this.options.onUndo)(t)}redoShortcut(t){return this.wrapMethod(ad,this.options.onRedo)(t)}createExternalPlugins(){const{depth:t,newGroupDelay:e}=this.options;return[EX({depth:t,newGroupDelay:e})]}undo(){return dC(this.wrapMethod(mp,this.options.onUndo))}redo(){return dC(this.wrapMethod(ad,this.options.onRedo))}undoDepth(t=this.store.getState()){return V0(t)}redoDepth(t=this.store.getState()){return SX(t)}};bl([nn({shortcut:oe.Undo,command:"undo"})],fi.prototype,"undoShortcut",1);bl([nn({shortcut:oe.Redo,command:"redo"})],fi.prototype,"redoShortcut",1);bl([de({disableChaining:!0,description:({t})=>t(jp.UNDO_DESCRIPTION),label:({t})=>t(jp.UNDO_LABEL),icon:"arrowGoBackFill"})],fi.prototype,"undo",1);bl([de({disableChaining:!0,description:({t})=>t(jp.REDO_DESCRIPTION),label:({t})=>t(jp.REDO_LABEL),icon:"arrowGoForwardFill"})],fi.prototype,"redo",1);bl([bt()],fi.prototype,"undoDepth",1);bl([bt()],fi.prototype,"redoDepth",1);fi=bl([Pe({defaultOptions:{depth:100,newGroupDelay:500,getDispatch:void 0,getState:void 0},staticKeys:["depth","newGroupDelay"],handlerKeys:["onUndo","onRedo"]})],fi);var AX=Object.defineProperty,_X=Object.getOwnPropertyDescriptor,Tm=(t,e,n,r)=>{for(var o=r>1?void 0:r?_X(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&AX(e,n,o),o},RX={icon:"paragraph",label:({t})=>t(Gp.INSERT_LABEL),description:({t})=>t(Gp.INSERT_DESCRIPTION)},MX={icon:"paragraph",label:({t})=>t(Gp.CONVERT_LABEL),description:({t})=>t(Gp.CONVERT_DESCRIPTION)},Ja=class extends Pn{get name(){return"paragraph"}createTags(){return[Ee.LastNodeCompatible,Ee.TextBlock,Ee.Block,Ee.FormattingNode]}createNodeSpec(t,e){return{content:"inline*",draggable:!1,...e,attrs:{...t.defaults()},parseDOM:[{tag:"p",getAttrs:n=>({...t.parse(n)})},...e.parseDOM??[]],toDOM:n=>["p",t.dom(n),0]}}convertParagraph(t={}){const{attrs:e,selection:n,preserveAttrs:r}=t;return this.store.commands.setBlockNodeType.original(this.type,e,n,r)}insertParagraph(t,e={}){const{selection:n,attrs:r}=e;return this.store.commands.insertNode.original(this.type,{content:t,selection:n,attrs:r})}shortcut(t){return this.convertParagraph()(t)}};Tm([de(MX)],Ja.prototype,"convertParagraph",1);Tm([de(RX)],Ja.prototype,"insertParagraph",1);Tm([nn({shortcut:oe.Paragraph,command:"convertParagraph"})],Ja.prototype,"shortcut",1);Ja=Tm([Pe({defaultPriority:dt.Medium})],Ja);var OX=Object.defineProperty,IX=Object.getOwnPropertyDescriptor,LX=(t,e,n,r)=>{for(var o=r>1?void 0:r?IX(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&OX(e,n,o),o},j0=class extends Pn{get name(){return"text"}createTags(){return[Ee.InlineNode]}createNodeSpec(){return{}}};j0=LX([Pe({disableExtraAttributes:!0,defaultPriority:dt.Medium})],j0);var NX={...Bc.defaultOptions,...Ja.defaultOptions,...fi.defaultOptions,excludeExtensions:[]};function $X(t={}){t={...NX,...t};const{content:e,depth:n,getDispatch:r,getState:o,newGroupDelay:i,excludeExtensions:s}=t,l={};for(const u of s??[])l[u]=!0;const a=[];if(!l.history){const u=new fi({depth:n,getDispatch:r,getState:o,newGroupDelay:i});a.push(u)}return l.doc||a.push(new Bc({content:e})),l.text||a.push(new j0),l.paragraph||a.push(new Ja),l.positioner||a.push(new Fc),l.gapCursor||a.push(new W0),l.events||a.push(new sg),a}var DX=Object.defineProperty,PX=Object.getOwnPropertyDescriptor,zX=(t,e,n,r)=>{for(var o=r>1?void 0:r?PX(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&DX(e,n,o),o},el=class extends yt{get name(){return"placeholder"}createAttributes(){return{"aria-placeholder":this.options.placeholder}}createPlugin(){return{state:{init:(t,e)=>({...this.options,empty:Nb(e.doc,{ignoreAttributes:!0})}),apply:(t,e,n,r)=>FX({pluginState:e,tr:t,extension:this,state:r})},props:{decorations:t=>BX({state:t,extension:this})}}}onSetOptions(t){const{changes:e}=t;e.placeholder.changed&&this.store.phase>=mr.EditorView&&this.store.updateAttributes()}};el=zX([Pe({defaultOptions:{emptyNodeClass:QW.IS_EMPTY,placeholder:""}})],el);function FX(t){const{pluginState:e,extension:n,tr:r,state:o}=t;return r.docChanged?{...n.options,empty:Nb(o.doc)}:e}function BX(t){const{extension:e,state:n}=t,{empty:r}=e.pluginKey.getState(n),{emptyNodeClass:o,placeholder:i}=e.options;if(!r)return null;const s=[];return n.doc.descendants((l,a)=>{const u=kt.node(a,a+l.nodeSize,{class:o,"data-placeholder":i});s.push(u)}),je.create(n.doc,s)}var rO={exports:{}},Zr={},oO={exports:{}},iO={};/** * @license React * scheduler.production.min.js * @@ -89,7 +89,7 @@ If you are using Node.js, you can install JSDOM and Remirror will try to use it * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(e){function t(R,M){var L=R.length;R.push(M);e:for(;0>>1,q=R[K];if(0>>1;Ko(pe,L))feo(ge,pe)?(R[K]=ge,R[fe]=L,K=fe):(R[K]=pe,R[ae]=L,K=ae);else if(feo(ge,L))R[K]=ge,R[fe]=L,K=fe;else break e}}return M}function o(R,M){var L=R.sortIndex-M.sortIndex;return L!==0?L:R.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],c=[],u=1,d=null,p=3,f=!1,h=!1,m=!1,b=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(R){for(var M=r(c);M!==null;){if(M.callback===null)n(c);else if(M.startTime<=R)n(c),M.sortIndex=M.expirationTime,t(l,M);else break;M=r(c)}}function E(R){if(m=!1,v(R),!h)if(r(l)!==null)h=!0,z(k);else{var M=r(c);M!==null&&G(E,M.startTime-R)}}function k(R,M){h=!1,m&&(m=!1,y(C),C=-1),f=!0;var L=p;try{for(v(M),d=r(l);d!==null&&(!(d.expirationTime>M)||R&&!_());){var K=d.callback;if(typeof K=="function"){d.callback=null,p=d.priorityLevel;var q=K(d.expirationTime<=M);M=e.unstable_now(),typeof q=="function"?d.callback=q:d===r(l)&&n(l),v(M)}else n(l);d=r(l)}if(d!==null)var Re=!0;else{var ae=r(c);ae!==null&&G(E,ae.startTime-M),Re=!1}return Re}finally{d=null,p=L,f=!1}}var x=!1,w=null,C=-1,T=5,O=-1;function _(){return!(e.unstable_now()-OR||125K?(R.sortIndex=L,t(c,R),r(l)===null&&R===r(c)&&(m?(y(C),C=-1):m=!0,G(E,L-K))):(R.sortIndex=q,t(l,R),h||f||(h=!0,z(k))),R},e.unstable_shouldYield=_,e.unstable_wrapCallback=function(R){var M=p;return function(){var L=p;p=M;try{return R.apply(this,arguments)}finally{p=L}}}})(kN);EN.exports=kN;var xK=EN.exports;/** + */(function(t){function e(L,$){var D=L.length;L.push($);e:for(;0>>1,U=L[F];if(0>>1;Fo(H,D))Vo(Y,H)?(L[F]=Y,L[V]=D,F=V):(L[F]=H,L[B]=D,F=B);else if(Vo(Y,D))L[F]=Y,L[V]=D,F=V;else break e}}return $}function o(L,$){var D=L.sortIndex-$.sortIndex;return D!==0?D:L.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var a=[],u=[],c=1,d=null,h=3,f=!1,p=!1,g=!1,m=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(L){for(var $=n(u);$!==null;){if($.callback===null)r(u);else if($.startTime<=L)r(u),$.sortIndex=$.expirationTime,e(a,$);else break;$=n(u)}}function w(L){if(g=!1,b(L),!p)if(n(a)!==null)p=!0,I(k);else{var $=n(u);$!==null&&N(w,$.startTime-L)}}function k(L,$){p=!1,g&&(g=!1,v(T),T=-1),f=!0;var D=h;try{for(b($),d=n(a);d!==null&&(!(d.expirationTime>$)||L&&!_());){var F=d.callback;if(typeof F=="function"){d.callback=null,h=d.priorityLevel;var U=F(d.expirationTime<=$);$=t.unstable_now(),typeof U=="function"?d.callback=U:d===n(a)&&r(a),b($)}else r(a);d=n(a)}if(d!==null)var W=!0;else{var B=n(u);B!==null&&N(w,B.startTime-$),W=!1}return W}finally{d=null,h=D,f=!1}}var x=!1,S=null,T=-1,C=5,O=-1;function _(){return!(t.unstable_now()-OL||125F?(L.sortIndex=D,e(u,L),n(a)===null&&L===n(u)&&(g?(v(T),T=-1):g=!0,N(w,D-F))):(L.sortIndex=U,e(a,L),p||f||(p=!0,I(k))),L},t.unstable_shouldYield=_,t.unstable_wrapCallback=function(L){var $=h;return function(){var D=h;h=$;try{return L.apply(this,arguments)}finally{h=D}}}})(iO);oO.exports=iO;var HX=oO.exports;/** * @license React * react-dom.production.min.js * @@ -97,14 +97,14 @@ If you are using Node.js, you can install JSDOM and Remirror will try to use it * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var xN=S,yn=xK;function H(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),S0=Object.prototype.hasOwnProperty,SK=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ww={},Tw={};function wK(e){return S0.call(Tw,e)?!0:S0.call(ww,e)?!1:SK.test(e)?Tw[e]=!0:(ww[e]=!0,!1)}function TK(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function CK(e,t,r,n){if(t===null||typeof t>"u"||TK(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Nr(e,t,r,n,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var rr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){rr[e]=new Nr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];rr[t]=new Nr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){rr[e]=new Nr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){rr[e]=new Nr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){rr[e]=new Nr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){rr[e]=new Nr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){rr[e]=new Nr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){rr[e]=new Nr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){rr[e]=new Nr(e,5,!1,e.toLowerCase(),null,!1,!1)});var Wv=/[\-:]([a-z])/g;function Kv(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Wv,Kv);rr[t]=new Nr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Wv,Kv);rr[t]=new Nr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Wv,Kv);rr[t]=new Nr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){rr[e]=new Nr(e,1,!1,e.toLowerCase(),null,!1,!1)});rr.xlinkHref=new Nr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){rr[e]=new Nr(e,1,!1,e.toLowerCase(),null,!0,!0)});function Yv(e,t,r,n){var o=rr.hasOwnProperty(t)?rr[t]:null;(o!==null?o.type!==0:n||!(2a||o[s]!==i[a]){var l=` -`+o[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{Xg=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?du(e):""}function OK(e){switch(e.tag){case 5:return du(e.type);case 16:return du("Lazy");case 13:return du("Suspense");case 19:return du("SuspenseList");case 0:case 2:case 15:return e=Zg(e.type,!1),e;case 11:return e=Zg(e.type.render,!1),e;case 1:return e=Zg(e.type,!0),e;default:return""}}function O0(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case al:return"Fragment";case sl:return"Portal";case w0:return"Profiler";case qv:return"StrictMode";case T0:return"Suspense";case C0:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case TN:return(e.displayName||"Context")+".Consumer";case wN:return(e._context.displayName||"Context")+".Provider";case Xv:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Zv:return t=e.displayName||null,t!==null?t:O0(e.type)||"Memo";case Mi:t=e._payload,e=e._init;try{return O0(e(t))}catch{}}return null}function AK(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return O0(t);case 8:return t===qv?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ds(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ON(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function NK(e){var t=ON(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){n=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(s){n=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function kp(e){e._valueTracker||(e._valueTracker=NK(e))}function AN(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=ON(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Qf(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function A0(e,t){var r=t.checked;return ht({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Ow(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=ds(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function NN(e,t){t=t.checked,t!=null&&Yv(e,"checked",t,!1)}function N0(e,t){NN(e,t);var r=ds(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?R0(e,t.type,r):t.hasOwnProperty("defaultValue")&&R0(e,t.type,ds(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Aw(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function R0(e,t,r){(t!=="number"||Qf(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var pu=Array.isArray;function wl(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=xp.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function td(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Au={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},RK=["Webkit","ms","Moz","O"];Object.keys(Au).forEach(function(e){RK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Au[t]=Au[e]})});function MN(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Au.hasOwnProperty(e)&&Au[e]?(""+t).trim():t+"px"}function LN(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=MN(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var _K=ht({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function M0(e,t){if(t){if(_K[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(H(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(H(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(H(61))}if(t.style!=null&&typeof t.style!="object")throw Error(H(62))}}function L0(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var D0=null;function Jv(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var P0=null,Tl=null,Cl=null;function _w(e){if(e=Jd(e)){if(typeof P0!="function")throw Error(H(280));var t=e.stateNode;t&&(t=Em(t),P0(e.stateNode,e.type,t))}}function DN(e){Tl?Cl?Cl.push(e):Cl=[e]:Tl=e}function PN(){if(Tl){var e=Tl,t=Cl;if(Cl=Tl=null,_w(e),t)for(e=0;e>>=0,e===0?32:31-(UK(e)/VK|0)|0}var Sp=64,wp=4194304;function fu(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function nh(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,o=e.suspendedLanes,i=e.pingedLanes,s=r&268435455;if(s!==0){var a=s&~o;a!==0?n=fu(a):(i&=s,i!==0&&(n=fu(i)))}else s=r&~o,s!==0?n=fu(s):i!==0&&(n=fu(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&o)&&(o=n&-n,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function Xd(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-io(t),e[t]=r}function KK(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=Ru),Hw=String.fromCharCode(32),Fw=!1;function rR(e,t){switch(e){case"keyup":return kY.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nR(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ll=!1;function SY(e,t){switch(e){case"compositionend":return nR(t);case"keypress":return t.which!==32?null:(Fw=!0,Hw);case"textInput":return e=t.data,e===Hw&&Fw?null:e;default:return null}}function wY(e,t){if(ll)return e==="compositionend"||!sb&&rR(e,t)?(e=eR(),cf=nb=Fi=null,ll=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Gw(r)}}function aR(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?aR(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function lR(){for(var e=window,t=Qf();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Qf(e.document)}return t}function ab(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function MY(e){var t=lR(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&aR(r.ownerDocument.documentElement,r)){if(n!==null&&ab(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,i=Math.min(n.start,o);n=n.end===void 0?i:Math.min(n.end,o),!e.extend&&i>n&&(o=n,n=i,i=o),o=Ww(r,i);var s=Ww(r,n);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,cl=null,U0=null,Iu=null,V0=!1;function Kw(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;V0||cl==null||cl!==Qf(n)||(n=cl,"selectionStart"in n&&ab(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Iu&&ad(Iu,n)||(Iu=n,n=sh(U0,"onSelect"),0pl||(e.current=q0[pl],q0[pl]=null,pl--)}function Qe(e,t){pl++,q0[pl]=e.current,e.current=t}var ps={},mr=Ss(ps),Fr=Ss(!1),fa=ps;function Wl(e,t){var r=e.type.contextTypes;if(!r)return ps;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in r)o[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ur(e){return e=e.childContextTypes,e!=null}function lh(){ot(Fr),ot(mr)}function eT(e,t,r){if(mr.current!==ps)throw Error(H(168));Qe(mr,t),Qe(Fr,r)}function yR(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error(H(108,AK(e)||"Unknown",o));return ht({},r,n)}function ch(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ps,fa=mr.current,Qe(mr,e),Qe(Fr,Fr.current),!0}function tT(e,t,r){var n=e.stateNode;if(!n)throw Error(H(169));r?(e=yR(e,t,fa),n.__reactInternalMemoizedMergedChildContext=e,ot(Fr),ot(mr),Qe(mr,e)):ot(Fr),Qe(Fr,r)}var qo=null,km=!1,d1=!1;function vR(e){qo===null?qo=[e]:qo.push(e)}function GY(e){km=!0,vR(e)}function ws(){if(!d1&&qo!==null){d1=!0;var e=0,t=Ve;try{var r=qo;for(Ve=1;e>=s,o-=s,ri=1<<32-io(t)+o|r<C?(T=w,w=null):T=w.sibling;var O=p(y,w,v[C],E);if(O===null){w===null&&(w=T);break}e&&w&&O.alternate===null&&t(y,w),g=i(O,g,C),x===null?k=O:x.sibling=O,x=O,w=T}if(C===v.length)return r(y,w),at&&Ms(y,C),k;if(w===null){for(;CC?(T=w,w=null):T=w.sibling;var _=p(y,w,O.value,E);if(_===null){w===null&&(w=T);break}e&&w&&_.alternate===null&&t(y,w),g=i(_,g,C),x===null?k=_:x.sibling=_,x=_,w=T}if(O.done)return r(y,w),at&&Ms(y,C),k;if(w===null){for(;!O.done;C++,O=v.next())O=d(y,O.value,E),O!==null&&(g=i(O,g,C),x===null?k=O:x.sibling=O,x=O);return at&&Ms(y,C),k}for(w=n(y,w);!O.done;C++,O=v.next())O=f(w,y,C,O.value,E),O!==null&&(e&&O.alternate!==null&&w.delete(O.key===null?C:O.key),g=i(O,g,C),x===null?k=O:x.sibling=O,x=O);return e&&w.forEach(function(P){return t(y,P)}),at&&Ms(y,C),k}function b(y,g,v,E){if(typeof v=="object"&&v!==null&&v.type===al&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Ep:e:{for(var k=v.key,x=g;x!==null;){if(x.key===k){if(k=v.type,k===al){if(x.tag===7){r(y,x.sibling),g=o(x,v.props.children),g.return=y,y=g;break e}}else if(x.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Mi&&lT(k)===x.type){r(y,x.sibling),g=o(x,v.props),g.ref=Mc(y,x,v),g.return=y,y=g;break e}r(y,x);break}else t(y,x);x=x.sibling}v.type===al?(g=na(v.props.children,y.mode,E,v.key),g.return=y,y=g):(E=yf(v.type,v.key,v.props,null,y.mode,E),E.ref=Mc(y,g,v),E.return=y,y=E)}return s(y);case sl:e:{for(x=v.key;g!==null;){if(g.key===x)if(g.tag===4&&g.stateNode.containerInfo===v.containerInfo&&g.stateNode.implementation===v.implementation){r(y,g.sibling),g=o(g,v.children||[]),g.return=y,y=g;break e}else{r(y,g);break}else t(y,g);g=g.sibling}g=b1(v,y.mode,E),g.return=y,y=g}return s(y);case Mi:return x=v._init,b(y,g,x(v._payload),E)}if(pu(v))return h(y,g,v,E);if(Ac(v))return m(y,g,v,E);_p(y,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,g!==null&&g.tag===6?(r(y,g.sibling),g=o(g,v),g.return=y,y=g):(r(y,g),g=v1(v,y.mode,E),g.return=y,y=g),s(y)):r(y,g)}return b}var Yl=CR(!0),OR=CR(!1),Qd={},Ao=Ss(Qd),dd=Ss(Qd),pd=Ss(Qd);function qs(e){if(e===Qd)throw Error(H(174));return e}function gb(e,t){switch(Qe(pd,t),Qe(dd,e),Qe(Ao,Qd),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:I0(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=I0(t,e)}ot(Ao),Qe(Ao,t)}function ql(){ot(Ao),ot(dd),ot(pd)}function AR(e){qs(pd.current);var t=qs(Ao.current),r=I0(t,e.type);t!==r&&(Qe(dd,e),Qe(Ao,r))}function yb(e){dd.current===e&&(ot(Ao),ot(dd))}var ut=Ss(0);function mh(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var p1=[];function vb(){for(var e=0;er?r:4,e(!0);var n=f1.transition;f1.transition={};try{e(!1),t()}finally{Ve=r,f1.transition=n}}function jR(){return Bn().memoizedState}function qY(e,t,r){var n=es(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},GR(e))WR(t,r);else if(r=xR(e,t,r,n),r!==null){var o=Sr();so(r,e,n,o),KR(r,t,n)}}function XY(e,t,r){var n=es(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(GR(e))WR(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,r);if(o.hasEagerState=!0,o.eagerState=a,co(a,s)){var l=t.interleaved;l===null?(o.next=o,hb(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}r=xR(e,t,o,n),r!==null&&(o=Sr(),so(r,e,n,o),KR(r,t,n))}}function GR(e){var t=e.alternate;return e===pt||t!==null&&t===pt}function WR(e,t){Mu=gh=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function KR(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,eb(e,r)}}var yh={readContext:$n,useCallback:ar,useContext:ar,useEffect:ar,useImperativeHandle:ar,useInsertionEffect:ar,useLayoutEffect:ar,useMemo:ar,useReducer:ar,useRef:ar,useState:ar,useDebugValue:ar,useDeferredValue:ar,useTransition:ar,useMutableSource:ar,useSyncExternalStore:ar,useId:ar,unstable_isNewReconciler:!1},ZY={readContext:$n,useCallback:function(e,t){return vo().memoizedState=[e,t===void 0?null:t],e},useContext:$n,useEffect:uT,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,ff(4194308,4,BR.bind(null,t,e),r)},useLayoutEffect:function(e,t){return ff(4194308,4,e,t)},useInsertionEffect:function(e,t){return ff(4,2,e,t)},useMemo:function(e,t){var r=vo();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=vo();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=qY.bind(null,pt,e),[n.memoizedState,e]},useRef:function(e){var t=vo();return e={current:e},t.memoizedState=e},useState:cT,useDebugValue:Sb,useDeferredValue:function(e){return vo().memoizedState=e},useTransition:function(){var e=cT(!1),t=e[0];return e=YY.bind(null,e[1]),vo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=pt,o=vo();if(at){if(r===void 0)throw Error(H(407));r=r()}else{if(r=t(),Gt===null)throw Error(H(349));ma&30||_R(n,t,r)}o.memoizedState=r;var i={value:r,getSnapshot:t};return o.queue=i,uT(MR.bind(null,n,i,e),[e]),n.flags|=2048,md(9,IR.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=vo(),t=Gt.identifierPrefix;if(at){var r=ni,n=ri;r=(n&~(1<<32-io(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=fd++,0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),G0=Object.prototype.hasOwnProperty,UX=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,JC={},eT={};function WX(t){return G0.call(eT,t)?!0:G0.call(JC,t)?!1:UX.test(t)?eT[t]=!0:(JC[t]=!0,!1)}function VX(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function jX(t,e,n,r){if(e===null||typeof e>"u"||VX(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function dr(t,e,n,r,o,i,s){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=s}var $n={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){$n[t]=new dr(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];$n[e]=new dr(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){$n[t]=new dr(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){$n[t]=new dr(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){$n[t]=new dr(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){$n[t]=new dr(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){$n[t]=new dr(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){$n[t]=new dr(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){$n[t]=new dr(t,5,!1,t.toLowerCase(),null,!1,!1)});var vw=/[\-:]([a-z])/g;function yw(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(vw,yw);$n[e]=new dr(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(vw,yw);$n[e]=new dr(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(vw,yw);$n[e]=new dr(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){$n[t]=new dr(t,1,!1,t.toLowerCase(),null,!1,!1)});$n.xlinkHref=new dr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){$n[t]=new dr(t,1,!1,t.toLowerCase(),null,!0,!0)});function bw(t,e,n,r){var o=$n.hasOwnProperty(e)?$n[e]:null;(o!==null?o.type!==0:r||!(2l||o[s]!==i[l]){var a=` +`+o[s].replace(" at new "," at ");return t.displayName&&a.includes("")&&(a=a.replace("",t.displayName)),a}while(1<=s&&0<=l);break}}}finally{m1=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?ld(t):""}function GX(t){switch(t.tag){case 5:return ld(t.type);case 16:return ld("Lazy");case 13:return ld("Suspense");case 19:return ld("SuspenseList");case 0:case 2:case 15:return t=v1(t.type,!1),t;case 11:return t=v1(t.type.render,!1),t;case 1:return t=v1(t.type,!0),t;default:return""}}function q0(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case rc:return"Fragment";case nc:return"Portal";case K0:return"Profiler";case ww:return"StrictMode";case Y0:return"Suspense";case X0:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case cO:return(t.displayName||"Context")+".Consumer";case lO:return(t._context.displayName||"Context")+".Provider";case xw:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case kw:return e=t.displayName||null,e!==null?e:q0(t.type)||"Memo";case gs:e=t._payload,t=t._init;try{return q0(t(e))}catch{}}return null}function KX(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return q0(e);case 8:return e===ww?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Gs(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function dO(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function YX(t){var e=dO(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Mf(t){t._valueTracker||(t._valueTracker=YX(t))}function hO(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=dO(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function lg(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Z0(t,e){var n=e.checked;return Ht({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function nT(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Gs(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function fO(t,e){e=e.checked,e!=null&&bw(t,"checked",e,!1)}function Q0(t,e){fO(t,e);var n=Gs(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?J0(t,e.type,n):e.hasOwnProperty("defaultValue")&&J0(t,e.type,Gs(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function rT(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function J0(t,e,n){(e!=="number"||lg(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var cd=Array.isArray;function wc(t,e,n,r){if(t=t.options,e){e={};for(var o=0;o"+e.valueOf().toString()+"",e=Of.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Qd(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Cd={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},XX=["Webkit","ms","Moz","O"];Object.keys(Cd).forEach(function(t){XX.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Cd[e]=Cd[t]})});function vO(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Cd.hasOwnProperty(t)&&Cd[t]?(""+e).trim():e+"px"}function yO(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=vO(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,o):t[n]=o}}var qX=Ht({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ny(t,e){if(e){if(qX[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ne(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ne(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ne(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ne(62))}}function ry(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var oy=null;function Ew(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var iy=null,xc=null,kc=null;function sT(t){if(t=qh(t)){if(typeof iy!="function")throw Error(ne(280));var e=t.stateNode;e&&(e=Om(e),iy(t.stateNode,t.type,e))}}function bO(t){xc?kc?kc.push(t):kc=[t]:xc=t}function wO(){if(xc){var t=xc,e=kc;if(kc=xc=null,sT(t),e)for(t=0;t>>=0,t===0?32:31-(aq(t)/lq|0)|0}var If=64,Lf=4194304;function ud(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function hg(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,o=t.suspendedLanes,i=t.pingedLanes,s=n&268435455;if(s!==0){var l=s&~o;l!==0?r=ud(l):(i&=s,i!==0&&(r=ud(i)))}else s=n&~o,s!==0?r=ud(s):i!==0&&(r=ud(i));if(r===0)return 0;if(e!==0&&e!==r&&!(e&o)&&(o=r&-r,i=e&-e,o>=i||o===16&&(i&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function Yh(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Fo(e),t[e]=n}function hq(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=Ad),gT=String.fromCharCode(32),mT=!1;function BO(t,e){switch(t){case"keyup":return Bq.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function HO(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var oc=!1;function Uq(t,e){switch(t){case"compositionend":return HO(e);case"keypress":return e.which!==32?null:(mT=!0,gT);case"textInput":return t=e.data,t===gT&&mT?null:t;default:return null}}function Wq(t,e){if(oc)return t==="compositionend"||!Ow&&BO(t,e)?(t=zO(),yp=_w=Es=null,oc=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=wT(n)}}function jO(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?jO(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function GO(){for(var t=window,e=lg();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=lg(t.document)}return e}function Iw(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function Qq(t){var e=GO(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&jO(n.ownerDocument.documentElement,n)){if(r!==null&&Iw(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!t.extend&&i>r&&(o=r,r=i,i=o),o=xT(n,i);var s=xT(n,r);o&&s&&(t.rangeCount!==1||t.anchorNode!==o.node||t.anchorOffset!==o.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(o.node,o.offset),t.removeAllRanges(),i>r?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ic=null,dy=null,Rd=null,hy=!1;function kT(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;hy||ic==null||ic!==lg(r)||(r=ic,"selectionStart"in r&&Iw(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Rd&&oh(Rd,r)||(Rd=r,r=gg(dy,"onSelect"),0lc||(t.current=yy[lc],yy[lc]=null,lc--)}function Et(t,e){lc++,yy[lc]=t.current,t.current=e}var Ks={},Yn=oa(Ks),kr=oa(!1),tl=Ks;function Uc(t,e){var n=t.type.contextTypes;if(!n)return Ks;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=e[i];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=o),o}function Er(t){return t=t.childContextTypes,t!=null}function vg(){_t(kr),_t(Yn)}function RT(t,e,n){if(Yn.current!==Ks)throw Error(ne(168));Et(Yn,e),Et(kr,n)}function tI(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in e))throw Error(ne(108,KX(t)||"Unknown",o));return Ht({},n,r)}function yg(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Ks,tl=Yn.current,Et(Yn,t),Et(kr,kr.current),!0}function MT(t,e,n){var r=t.stateNode;if(!r)throw Error(ne(169));n?(t=tI(t,e,tl),r.__reactInternalMemoizedMergedChildContext=t,_t(kr),_t(Yn),Et(Yn,t)):_t(kr),Et(kr,n)}var Mi=null,Im=!1,O1=!1;function nI(t){Mi===null?Mi=[t]:Mi.push(t)}function uZ(t){Im=!0,nI(t)}function ia(){if(!O1&&Mi!==null){O1=!0;var t=0,e=ht;try{var n=Mi;for(ht=1;t>=s,o-=s,Di=1<<32-Fo(e)+o|n<T?(C=S,S=null):C=S.sibling;var O=h(v,S,b[T],w);if(O===null){S===null&&(S=C);break}t&&S&&O.alternate===null&&e(v,S),y=i(O,y,T),x===null?k=O:x.sibling=O,x=O,S=C}if(T===b.length)return n(v,S),Mt&&wa(v,T),k;if(S===null){for(;TT?(C=S,S=null):C=S.sibling;var _=h(v,S,O.value,w);if(_===null){S===null&&(S=C);break}t&&S&&_.alternate===null&&e(v,S),y=i(_,y,T),x===null?k=_:x.sibling=_,x=_,S=C}if(O.done)return n(v,S),Mt&&wa(v,T),k;if(S===null){for(;!O.done;T++,O=b.next())O=d(v,O.value,w),O!==null&&(y=i(O,y,T),x===null?k=O:x.sibling=O,x=O);return Mt&&wa(v,T),k}for(S=r(v,S);!O.done;T++,O=b.next())O=f(S,v,T,O.value,w),O!==null&&(t&&O.alternate!==null&&S.delete(O.key===null?T:O.key),y=i(O,y,T),x===null?k=O:x.sibling=O,x=O);return t&&S.forEach(function(R){return e(v,R)}),Mt&&wa(v,T),k}function m(v,y,b,w){if(typeof b=="object"&&b!==null&&b.type===rc&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Rf:e:{for(var k=b.key,x=y;x!==null;){if(x.key===k){if(k=b.type,k===rc){if(x.tag===7){n(v,x.sibling),y=o(x,b.props.children),y.return=v,v=y;break e}}else if(x.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===gs&&PT(k)===x.type){n(v,x.sibling),y=o(x,b.props),y.ref=Mu(v,x,b),y.return=v,v=y;break e}n(v,x);break}else e(v,x);x=x.sibling}b.type===rc?(y=ja(b.props.children,v.mode,w,b.key),y.return=v,v=y):(w=Tp(b.type,b.key,b.props,null,v.mode,w),w.ref=Mu(v,y,b),w.return=v,v=w)}return s(v);case nc:e:{for(x=b.key;y!==null;){if(y.key===x)if(y.tag===4&&y.stateNode.containerInfo===b.containerInfo&&y.stateNode.implementation===b.implementation){n(v,y.sibling),y=o(y,b.children||[]),y.return=v,v=y;break e}else{n(v,y);break}else e(v,y);y=y.sibling}y=F1(b,v.mode,w),y.return=v,v=y}return s(v);case gs:return x=b._init,m(v,y,x(b._payload),w)}if(cd(b))return p(v,y,b,w);if(Cu(b))return g(v,y,b,w);Bf(v,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,y!==null&&y.tag===6?(n(v,y.sibling),y=o(y,b),y.return=v,v=y):(n(v,y),y=z1(b,v.mode,w),y.return=v,v=y),s(v)):n(v,y)}return m}var Vc=uI(!0),dI=uI(!1),Zh={},ai=oa(Zh),lh=oa(Zh),ch=oa(Zh);function Pa(t){if(t===Zh)throw Error(ne(174));return t}function Hw(t,e){switch(Et(ch,e),Et(lh,t),Et(ai,Zh),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:ty(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=ty(e,t)}_t(ai),Et(ai,e)}function jc(){_t(ai),_t(lh),_t(ch)}function hI(t){Pa(ch.current);var e=Pa(ai.current),n=ty(e,t.type);e!==n&&(Et(lh,t),Et(ai,n))}function Uw(t){lh.current===t&&(_t(ai),_t(lh))}var Pt=oa(0);function Sg(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var I1=[];function Ww(){for(var t=0;tn?n:4,t(!0);var r=L1.transition;L1.transition={};try{t(!1),e()}finally{ht=n,L1.transition=r}}function _I(){return yo().memoizedState}function pZ(t,e,n){var r=Ds(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},RI(t))MI(e,n);else if(n=sI(t,e,n,r),n!==null){var o=ir();Bo(n,t,r,o),OI(n,e,r)}}function gZ(t,e,n){var r=Ds(t),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(RI(t))MI(e,o);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var s=e.lastRenderedState,l=i(s,n);if(o.hasEagerState=!0,o.eagerState=l,Wo(l,s)){var a=e.interleaved;a===null?(o.next=o,Fw(e)):(o.next=a.next,a.next=o),e.interleaved=o;return}}catch{}finally{}n=sI(t,e,o,r),n!==null&&(o=ir(),Bo(n,t,r,o),OI(n,e,r))}}function RI(t){var e=t.alternate;return t===Ft||e!==null&&e===Ft}function MI(t,e){Md=Cg=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function OI(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,Cw(t,n)}}var Tg={readContext:vo,useCallback:Bn,useContext:Bn,useEffect:Bn,useImperativeHandle:Bn,useInsertionEffect:Bn,useLayoutEffect:Bn,useMemo:Bn,useReducer:Bn,useRef:Bn,useState:Bn,useDebugValue:Bn,useDeferredValue:Bn,useTransition:Bn,useMutableSource:Bn,useSyncExternalStore:Bn,useId:Bn,unstable_isNewReconciler:!1},mZ={readContext:vo,useCallback:function(t,e){return Zo().memoizedState=[t,e===void 0?null:e],t},useContext:vo,useEffect:FT,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,kp(4194308,4,EI.bind(null,e,t),n)},useLayoutEffect:function(t,e){return kp(4194308,4,t,e)},useInsertionEffect:function(t,e){return kp(4,2,t,e)},useMemo:function(t,e){var n=Zo();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Zo();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=pZ.bind(null,Ft,t),[r.memoizedState,t]},useRef:function(t){var e=Zo();return t={current:t},e.memoizedState=t},useState:zT,useDebugValue:Yw,useDeferredValue:function(t){return Zo().memoizedState=t},useTransition:function(){var t=zT(!1),e=t[0];return t=fZ.bind(null,t[1]),Zo().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Ft,o=Zo();if(Mt){if(n===void 0)throw Error(ne(407));n=n()}else{if(n=e(),xn===null)throw Error(ne(349));rl&30||gI(r,e,n)}o.memoizedState=n;var i={value:n,getSnapshot:e};return o.queue=i,FT(vI.bind(null,r,i,t),[t]),r.flags|=2048,hh(9,mI.bind(null,r,i,n,e),void 0,null),n},useId:function(){var t=Zo(),e=xn.identifierPrefix;if(Mt){var n=Pi,r=Di;n=(r&~(1<<32-Fo(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=uh++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=s.createElement(r,{is:n.is}):(e=s.createElement(r),r==="select"&&(s=e,n.multiple?s.multiple=!0:n.size&&(s.size=n.size))):e=s.createElementNS(e,r),e[xo]=t,e[ud]=n,r_(e,t,!1,!1),t.stateNode=e;e:{switch(s=L0(r,n),r){case"dialog":nt("cancel",e),nt("close",e),o=n;break;case"iframe":case"object":case"embed":nt("load",e),o=n;break;case"video":case"audio":for(o=0;oZl&&(t.flags|=128,n=!0,Lc(i,!1),t.lanes=4194304)}else{if(!n)if(e=mh(s),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Lc(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!at)return lr(t),null}else 2*kt()-i.renderingStartTime>Zl&&r!==1073741824&&(t.flags|=128,n=!0,Lc(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(r=i.last,r!==null?r.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=kt(),t.sibling=null,r=ut.current,Qe(ut,n?r&1|2:r&1),t):(lr(t),null);case 22:case 23:return Nb(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?nn&1073741824&&(lr(t),t.subtreeFlags&6&&(t.flags|=8192)):lr(t),null;case 24:return null;case 25:return null}throw Error(H(156,t.tag))}function iq(e,t){switch(cb(t),t.tag){case 1:return Ur(t.type)&&lh(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ql(),ot(Fr),ot(mr),vb(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return yb(t),null;case 13:if(ot(ut),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(H(340));Kl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ot(ut),null;case 4:return ql(),null;case 10:return fb(t.type._context),null;case 22:case 23:return Nb(),null;case 24:return null;default:return null}}var Mp=!1,fr=!1,sq=typeof WeakSet=="function"?WeakSet:Set,J=null;function gl(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){bt(e,t,n)}else r.current=null}function ay(e,t,r){try{r()}catch(n){bt(e,t,n)}}var bT=!1;function aq(e,t){if(j0=oh,e=lR(),ab(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var o=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var s=0,a=-1,l=-1,c=0,u=0,d=e,p=null;t:for(;;){for(var f;d!==r||o!==0&&d.nodeType!==3||(a=s+o),d!==i||n!==0&&d.nodeType!==3||(l=s+n),d.nodeType===3&&(s+=d.nodeValue.length),(f=d.firstChild)!==null;)p=d,d=f;for(;;){if(d===e)break t;if(p===r&&++c===o&&(a=s),p===i&&++u===n&&(l=s),(f=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=f}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(G0={focusedElem:e,selectionRange:r},oh=!1,J=t;J!==null;)if(t=J,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,J=e;else for(;J!==null;){t=J;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var m=h.memoizedProps,b=h.memoizedState,y=t.stateNode,g=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:Jn(t.type,m),b);y.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(H(163))}}catch(E){bt(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,J=e;break}J=t.return}return h=bT,bT=!1,h}function Lu(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&ay(t,r,i)}o=o.next}while(o!==n)}}function wm(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function ly(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function i_(e){var t=e.alternate;t!==null&&(e.alternate=null,i_(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[xo],delete t[ud],delete t[Y0],delete t[VY],delete t[jY])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function s_(e){return e.tag===5||e.tag===3||e.tag===4}function ET(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||s_(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function cy(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=ah));else if(n!==4&&(e=e.child,e!==null))for(cy(e,t,r),e=e.sibling;e!==null;)cy(e,t,r),e=e.sibling}function uy(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(uy(e,t,r),e=e.sibling;e!==null;)uy(e,t,r),e=e.sibling}var Jt=null,Qn=!1;function Si(e,t,r){for(r=r.child;r!==null;)a_(e,t,r),r=r.sibling}function a_(e,t,r){if(Oo&&typeof Oo.onCommitFiberUnmount=="function")try{Oo.onCommitFiberUnmount(gm,r)}catch{}switch(r.tag){case 5:fr||gl(r,t);case 6:var n=Jt,o=Qn;Jt=null,Si(e,t,r),Jt=n,Qn=o,Jt!==null&&(Qn?(e=Jt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Jt.removeChild(r.stateNode));break;case 18:Jt!==null&&(Qn?(e=Jt,r=r.stateNode,e.nodeType===8?u1(e.parentNode,r):e.nodeType===1&&u1(e,r),id(e)):u1(Jt,r.stateNode));break;case 4:n=Jt,o=Qn,Jt=r.stateNode.containerInfo,Qn=!0,Si(e,t,r),Jt=n,Qn=o;break;case 0:case 11:case 14:case 15:if(!fr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&ay(r,t,s),o=o.next}while(o!==n)}Si(e,t,r);break;case 1:if(!fr&&(gl(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){bt(r,t,a)}Si(e,t,r);break;case 21:Si(e,t,r);break;case 22:r.mode&1?(fr=(n=fr)||r.memoizedState!==null,Si(e,t,r),fr=n):Si(e,t,r);break;default:Si(e,t,r)}}function kT(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new sq),t.forEach(function(n){var o=gq.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function Yn(e,t){var r=t.deletions;if(r!==null)for(var n=0;no&&(o=s),n&=~i}if(n=o,n=kt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*cq(n/1960))-n,10e?16:e,Ui===null)var n=!1;else{if(e=Ui,Ui=null,Eh=0,_e&6)throw Error(H(331));var o=_e;for(_e|=4,J=e.current;J!==null;){var i=J,s=i.child;if(J.flags&16){var a=i.deletions;if(a!==null){for(var l=0;lkt()-Ob?ra(e,0):Cb|=r),Vr(e,t)}function m_(e,t){t===0&&(e.mode&1?(t=wp,wp<<=1,!(wp&130023424)&&(wp=4194304)):t=1);var r=Sr();e=ui(e,t),e!==null&&(Xd(e,t,r),Vr(e,r))}function mq(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),m_(e,r)}function gq(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(H(314))}n!==null&&n.delete(t),m_(e,r)}var g_;g_=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Fr.current)$r=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return $r=!1,nq(e,t,r);$r=!!(e.flags&131072)}else $r=!1,at&&t.flags&1048576&&bR(t,dh,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;hf(e,t),e=t.pendingProps;var o=Wl(t,mr.current);Al(t,r),o=Eb(null,t,n,e,o,r);var i=kb();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ur(n)?(i=!0,ch(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,mb(t),o.updater=xm,t.stateNode=o,o._reactInternals=t,ey(t,n,e,r),t=ny(null,t,n,!0,i,r)):(t.tag=0,at&&i&&lb(t),br(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch(hf(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=vq(n),e=Jn(n,e),o){case 0:t=ry(null,t,n,e,r);break e;case 1:t=gT(null,t,n,e,r);break e;case 11:t=hT(null,t,n,e,r);break e;case 14:t=mT(null,t,n,Jn(n.type,e),r);break e}throw Error(H(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Jn(n,o),ry(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Jn(n,o),gT(e,t,n,o,r);case 3:e:{if(QR(t),e===null)throw Error(H(387));n=t.pendingProps,i=t.memoizedState,o=i.element,SR(e,t),hh(t,n,null,r);var s=t.memoizedState;if(n=s.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Xl(Error(H(423)),t),t=yT(e,t,n,r,o);break e}else if(n!==o){o=Xl(Error(H(424)),t),t=yT(e,t,n,r,o);break e}else for(dn=Zi(t.stateNode.containerInfo.firstChild),fn=t,at=!0,to=null,r=OR(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Kl(),n===o){t=di(e,t,r);break e}br(e,t,n,r)}t=t.child}return t;case 5:return AR(t),e===null&&Z0(t),n=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,W0(n,o)?s=null:i!==null&&W0(n,i)&&(t.flags|=32),JR(e,t),br(e,t,s,r),t.child;case 6:return e===null&&Z0(t),null;case 13:return e_(e,t,r);case 4:return gb(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Yl(t,null,n,r):br(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Jn(n,o),hT(e,t,n,o,r);case 7:return br(e,t,t.pendingProps,r),t.child;case 8:return br(e,t,t.pendingProps.children,r),t.child;case 12:return br(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,Qe(ph,n._currentValue),n._currentValue=s,i!==null)if(co(i.value,s)){if(i.children===o.children&&!Fr.current){t=di(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=ii(-1,r&-r),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),J0(i.return,r,t),a.lanes|=r;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(H(341));s.lanes|=r,a=s.alternate,a!==null&&(a.lanes|=r),J0(s,r,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}br(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,Al(t,r),o=$n(o),n=n(o),t.flags|=1,br(e,t,n,r),t.child;case 14:return n=t.type,o=Jn(n,t.pendingProps),o=Jn(n.type,o),mT(e,t,n,o,r);case 15:return XR(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Jn(n,o),hf(e,t),t.tag=1,Ur(n)?(e=!0,ch(t)):e=!1,Al(t,r),TR(t,n,o),ey(t,n,o,r),ny(null,t,n,!0,e,r);case 19:return t_(e,t,r);case 22:return ZR(e,t,r)}throw Error(H(156,t.tag))};function y_(e,t){return VN(e,t)}function yq(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _n(e,t,r,n){return new yq(e,t,r,n)}function _b(e){return e=e.prototype,!(!e||!e.isReactComponent)}function vq(e){if(typeof e=="function")return _b(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Xv)return 11;if(e===Zv)return 14}return 2}function ts(e,t){var r=e.alternate;return r===null?(r=_n(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function yf(e,t,r,n,o,i){var s=2;if(n=e,typeof e=="function")_b(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case al:return na(r.children,o,i,t);case qv:s=8,o|=8;break;case w0:return e=_n(12,r,t,o|2),e.elementType=w0,e.lanes=i,e;case T0:return e=_n(13,r,t,o),e.elementType=T0,e.lanes=i,e;case C0:return e=_n(19,r,t,o),e.elementType=C0,e.lanes=i,e;case CN:return Cm(r,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case wN:s=10;break e;case TN:s=9;break e;case Xv:s=11;break e;case Zv:s=14;break e;case Mi:s=16,n=null;break e}throw Error(H(130,e==null?e:typeof e,""))}return t=_n(s,r,t,o),t.elementType=e,t.type=n,t.lanes=i,t}function na(e,t,r,n){return e=_n(7,e,n,t),e.lanes=r,e}function Cm(e,t,r,n){return e=_n(22,e,n,t),e.elementType=CN,e.lanes=r,e.stateNode={isHidden:!1},e}function v1(e,t,r){return e=_n(6,e,null,t),e.lanes=r,e}function b1(e,t,r){return t=_n(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function bq(e,t,r,n,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Qg(0),this.expirationTimes=Qg(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qg(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Ib(e,t,r,n,o,i,s,a,l){return e=new bq(e,t,r,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=_n(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},mb(i),e}function Eq(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(k_)}catch(e){console.error(e)}}k_(),bN.exports=bn;var ep=bN.exports;const Pp=po(ep);var Tq=Object.defineProperty,Cq=Object.getOwnPropertyDescriptor,Oq=(e,t,r,n)=>{for(var o=n>1?void 0:n?Cq(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Tq(t,r,o),o},x_=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},ne=(e,t,r)=>(x_(e,t,"read from private field"),r?r.call(e):t.get(e)),rn=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},en=(e,t,r,n)=>(x_(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),mu,Aq=class{constructor(){this.portals=new Map,rn(this,mu,sm()),this.on=e=>ne(this,mu).on("update",e),this.once=e=>{const t=ne(this,mu).on("update",r=>{t(),e(r)});return t}}update(){ne(this,mu).emit("update",this.portals)}render({Component:e,container:t}){const r=this.portals.get(t);this.portals.set(t,{Component:e,key:(r==null?void 0:r.key)??Ml()}),this.update()}forceUpdate(){for(const[e,{Component:t}]of this.portals)this.portals.set(e,{Component:t,key:Ml()})}remove(e){this.portals.delete(e),this.update()}};mu=new WeakMap;var Nq=e=>{const{portals:t}=e;return D.createElement(D.Fragment,null,t.map(([r,{Component:n,key:o}])=>ep.createPortal(D.createElement(n,null),r,o)))};function Rq(e){const[t,r]=S.useState(()=>Array.from(e.portals.entries()));return S.useEffect(()=>e.on(n=>{r(Array.from(n.entries()))}),[e]),S.useMemo(()=>t,[t])}var ct,gu,Ds,yu,vf,vu,rl,bu,bf,jo,vr,my,S_=class{constructor({getPosition:e,node:t,portalContainer:r,view:n,ReactComponent:o,options:i}){rn(this,ct,void 0),rn(this,gu,[]),rn(this,Ds,void 0),rn(this,yu,void 0),rn(this,vf,void 0),rn(this,vu,void 0),rn(this,rl,void 0),rn(this,bu,!1),rn(this,bf,void 0),rn(this,jo,void 0),rn(this,vr,void 0),rn(this,my,l=>{l&&(re(ne(this,jo),{code:U.REACT_NODE_VIEW,message:`You have applied a ref to a node view provided for '${ne(this,ct).type.name}' which doesn't support content.`}),l.append(ne(this,jo)))}),this.Component=()=>{const l=ne(this,vf);return re(l,{code:U.REACT_NODE_VIEW,message:`The custom react node view provided for ${ne(this,ct).type.name} doesn't have a valid ReactComponent`}),D.createElement(l,{updateAttributes:this.updateAttributes,selected:this.selected,view:ne(this,Ds),getPosition:ne(this,vu),node:ne(this,ct),forwardRef:ne(this,my),decorations:ne(this,gu)})},this.updateAttributes=l=>{if(!ne(this,Ds).editable)return;const c=ne(this,vu).call(this);if(c==null)return;const u=ne(this,Ds).state.tr.setNodeMarkup(c,void 0,{...ne(this,ct).attrs,...l});ne(this,Ds).dispatch(u)},re(De(e),{message:"You are attempting to use a node view for a mark type. This is not supported yet. Please check your configuration."}),en(this,ct,t),en(this,Ds,n),en(this,yu,r),en(this,vf,o),en(this,vu,e),en(this,rl,i),en(this,vr,this.createDom());const{contentDOM:s,wrapper:a}=this.createContentDom()??{};en(this,bf,s??void 0),en(this,jo,a),ne(this,jo)&&ne(this,vr).append(ne(this,jo)),this.setDomAttributes(ne(this,ct),ne(this,vr)),this.Component.displayName=vC(`${ne(this,ct).type.name}NodeView`),this.renderComponent()}static create(e){const{portalContainer:t,ReactComponent:r,options:n}=e;return(o,i,s)=>new S_({options:n,node:o,view:i,getPosition:s,portalContainer:t,ReactComponent:r})}get selected(){return ne(this,bu)}get contentDOM(){return ne(this,bf)}get dom(){return ne(this,vr)}renderComponent(){ne(this,yu).render({Component:this.Component,container:ne(this,vr)})}createDom(){const{defaultBlockNode:e,defaultInlineNode:t}=ne(this,rl),r=ne(this,ct).isInline?document.createElement(t):document.createElement(e);return r.classList.add(`${Cx(ne(this,ct).type.name)}-node-view-wrapper`),r}createContentDom(){var e,t;if(ne(this,ct).isLeaf)return;const r=(t=(e=ne(this,ct).type.spec).toDOM)==null?void 0:t.call(e,ne(this,ct));if(!r)return;const{contentDOM:n,dom:o}=un.renderSpec(document,r);let i;if(dt(o))return i=o,o===n&&(i=document.createElement("span"),i.classList.add(`${Cx(ne(this,ct).type.name)}-node-view-content-wrapper`),i.append(n)),dt(n),{wrapper:i,contentDOM:n}}update(e,t){return em({types:ne(this,ct).type,node:e})?(ne(this,ct)===e&&ne(this,gu)===t||(ne(this,ct).sameMarkup(e)||this.setDomAttributes(e,ne(this,vr)),en(this,ct,e),en(this,gu,t),this.renderComponent()),!0):!1}setDomAttributes(e,t){const{toDOM:r}=ne(this,ct).type.spec;let n=e.attrs;if(r){const o=r(e);if(oe(o)||_q(o))return;gs(o[1])&&(n=o[1])}for(const[o,i]of Dt(n))t.setAttribute(o,i)}selectNode(){en(this,bu,!0),ne(this,vr)&&ne(this,vr).classList.add(xx),this.renderComponent()}deselectNode(){en(this,bu,!1),ne(this,vr)&&ne(this,vr).classList.remove(xx),this.renderComponent()}destroy(){ne(this,yu).remove(ne(this,vr))}ignoreMutation(e){return e.type==="selection"?!ne(this,ct).type.spec.selectable:ne(this,jo)?!ne(this,jo).contains(e.target):!0}stopEvent(e){var t;if(!ne(this,vr))return!1;if(De(ne(this,rl).stopEvent))return ne(this,rl).stopEvent({event:e});const r=e.target;if(!(ne(this,vr).contains(r)&&!((t=this.contentDOM)!=null&&t.contains(r))))return!1;const o=e.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(r.tagName)||r.isContentEditable)&&!o)return!0;const s=!!ne(this,ct).type.spec.draggable,a=de.isSelectable(ne(this,ct)),l=e.type==="copy",c=e.type==="paste",u=e.type==="cut",d=e.type==="mousedown",p=e.type.startsWith("drag");return!s&&a&&p&&e.preventDefault(),!(p||o||l||c||u||d&&a)}},NT=S_;ct=new WeakMap;gu=new WeakMap;Ds=new WeakMap;yu=new WeakMap;vf=new WeakMap;vu=new WeakMap;rl=new WeakMap;bu=new WeakMap;bf=new WeakMap;jo=new WeakMap;vr=new WeakMap;my=new WeakMap;function _q(e){return Uf(e)||gs(e)&&Uf(e.dom)}var yd=class extends Ye{constructor(){super(...arguments),this.portalContainer=new Aq}get name(){return"reactComponent"}onCreate(){this.store.setStoreKey("portalContainer",this.portalContainer)}createNodeViews(){const e=te(),t=this.store.managerSettings.nodeViewComponents??{};for(const n of this.store.extensions)!n.ReactComponent||!Wd(n)||n.reactComponentEnvironment==="ssr"||(e[n.name]=NT.create({options:this.options,ReactComponent:n.ReactComponent,portalContainer:this.portalContainer}));const r=Dt({...this.options.nodeViewComponents,...t});for(const[n,o]of r)e[n]=NT.create({options:this.options,ReactComponent:o,portalContainer:this.portalContainer});return e}};yd=Oq([ye({defaultOptions:{defaultBlockNode:"div",defaultInlineNode:"span",defaultContentNode:"span",defaultEnvironment:"both",nodeViewComponents:{},stopEvent:null},staticKeys:["defaultBlockNode","defaultInlineNode","defaultContentNode","defaultEnvironment"]})],yd);var Iq=Object.defineProperty,Mq=Object.getOwnPropertyDescriptor,Lq=(e,t,r,n)=>{for(var o=n>1?void 0:n?Mq(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Iq(t,r,o),o},Dq={...pa.defaultOptions,...yd.defaultOptions},Pq=[...pa.staticKeys,...yd.staticKeys],vd=class extends Ye{get name(){return"react"}onSetOptions(e){const{pickChanged:t}=e;this.getExtension(pa).setOptions(t(["placeholder"]))}createExtensions(){const{emptyNodeClass:e,placeholder:t,defaultBlockNode:r,defaultContentNode:n,defaultEnvironment:o,defaultInlineNode:i,nodeViewComponents:s}=this.options;return[new pa({emptyNodeClass:e,placeholder:t,priority:Ue.Low}),new yd({defaultBlockNode:r,defaultContentNode:n,defaultEnvironment:o,defaultInlineNode:i,nodeViewComponents:s})]}};vd=Lq([ye({defaultOptions:Dq,staticKeys:Pq})],vd);var w_={};Object.defineProperty(w_,"__esModule",{value:!0});function zq(){for(var e=[],t=0;t{if(!t.has(e))throw TypeError("Cannot "+r)},E1=(e,t,r)=>(T_(e,t,"read from private field"),r?r.call(e):t.get(e)),$q=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Bq=(e,t,r,n)=>(T_(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);function Hq(){const[,e]=S.useState(te());return S.useCallback(()=>{e(te())},[])}var C_=S.createContext(null);function $o(e){const t=S.useContext(C_),r=S.useRef(Hq());re(t,{code:U.REACT_PROVIDER_CONTEXT});const{addHandler:n}=t;return S.useEffect(()=>{let o=e;if(o){if(gs(o)){const{autoUpdate:i}=o;o=i?()=>r.current():void 0}if(De(o))return n("updated",o)}},[n,e]),t}function Rr(e=!0){return $o({autoUpdate:e}).active}function Fq(e=!1){return $o(e?{autoUpdate:!0}:void 0).attrs}function vc(){return $o().chain.new()}function Wt(){return $o().commands}function Pb(){return $o({autoUpdate:!0}).getState().selection}function tp(e,t=void 0,r){const{getExtension:n}=$o(),o=S.useMemo(()=>n(e),[e,n]);let i;if(De(t)?i=r?[o,...r]:[o,t]:i=t?[o,...Object.values(t)]:[],S.useEffect(()=>{De(t)||!t||o.setOptions(t)},i),S.useEffect(()=>{if(De(t))return t({addHandler:o.addHandler.bind(o),addCustomHandler:o.addCustomHandler.bind(o),extension:o})},i),!t)return o}function Uq(e,t,r){const n=S.useCallback(({addHandler:o})=>o(t,r),[r,t]);return tp(e,n)}function rp(e=!1){return $o(e?{autoUpdate:!0}:void 0).helpers}var[Vq,jq]=bU(({props:e})=>{const t=e.locale??"en",r=e.i18n??hm,n=e.supportedLocales??[t],o=r._.bind(r);return{locale:t,i18n:r,supportedLocales:n,t:o}});function MT(e,t={}){const{core:r,react:n,...o}=t;return P6(e)?e:D6.create(()=>[...AC(e),new vd(n),...gK(r)],o)}function Gq(e,t={}){const r=S.useRef(e),n=S.useRef(t),[o,i]=S.useState(()=>MT(e,t));return r.current=e,n.current=t,S.useEffect(()=>o.addHandler("destroy",()=>{i(()=>MT(r.current,n.current))}),[o]),o}var Wq=typeof kr=="object"&&kr.__esModule&&kr.default?kr.default:kr,nl,Kq=class extends R6{constructor(e){if(super(e),$q(this,nl,void 0),this.rootPropsConfig={called:!1,count:0},this.getRootProps=t=>this.internalGetRootProps(t,null),this.internalGetRootProps=(t,r)=>{this.rootPropsConfig.called=!0;const{refKey:n="ref",ref:o,...i}=t??te();return{[n]:Wq(o,this.onRef),key:this.uid,...i,children:r}},this.onRef=t=>{t&&(this.rootPropsConfig.count+=1,re(this.rootPropsConfig.count<=1,{code:U.REACT_GET_ROOT_PROPS,message:`Called ${this.rootPropsConfig.count} times`}),Bq(this,nl,t),this.onRefLoad())},this.manager.view){this.manager.view.setProps({state:this.manager.view.state,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0});return}this.manager.getExtension(pa).setOptions({placeholder:this.props.placeholder??""})}get name(){return"react"}update(e){return super.update(e),this}createView(e){return new H3(null,{state:e,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0,plugins:[]})}updateState({state:e,...t}){const{triggerChange:r=!0,tr:n,transactions:o}=t;if(this.props.state){const{onChange:i}=this.props;re(i,{code:U.REACT_CONTROLLED,message:"You are required to provide the `onChange` handler when creating a controlled editor."}),re(r,{code:U.REACT_CONTROLLED,message:"Controlled editors do not support `clearContent` or `setContent` where `triggerChange` is `true`. Update the `state` prop instead."}),this.previousStateOverride||(this.previousStateOverride=this.getState()),this.onChange({state:e,tr:n,transactions:o});return}!n&&!o&&(e=e.apply(e.tr.setMeta(Sx,{}))),this.view.updateState(e),r&&(o==null?void 0:o.length)!==0&&this.onChange({state:e,tr:n,transactions:o}),this.manager.onStateUpdate({previousState:this.previousState,state:e,tr:n,transactions:o})}updateControlledState(e,t){this.previousStateOverride=t,e=e.apply(e.tr.setMeta(Sx,{})),this.view.updateState(e),this.manager.onStateUpdate({previousState:this.previousState,state:e}),this.previousStateOverride=void 0}addProsemirrorViewToDom(e,t){this.props.insertPosition==="start"?e.insertBefore(t,e.firstChild):e.append(t)}onRefLoad(){re(E1(this,nl),{code:U.REACT_EDITOR_VIEW,message:"Something went wrong when initializing the text editor. Please check your setup."});const{autoFocus:e}=this.props;this.addProsemirrorViewToDom(E1(this,nl),this.view.dom),e&&this.focus(e),this.onChange(),this.addFocusListeners()}onUpdate(){this.view&&E1(this,nl)&&this.view.setProps({...this.view.props,editable:()=>this.props.editable??!0})}get frameworkOutput(){return{...this.baseOutput,getRootProps:this.getRootProps,portalContainer:this.manager.store.portalContainer}}resetRender(){this.rootPropsConfig.called=!1,this.rootPropsConfig.count=0}};nl=new WeakMap;var O_=typeof document<"u"?S.useLayoutEffect:S.useEffect;function Yq(e){const t=S.useRef();return O_(()=>{t.current=e}),t.current}function qq(e){const{manager:t,state:r}=e,{placeholder:n,editable:o}=e;S.useRef(!0).current&&!ns(n)&&t.getExtension(vd).setOptions({placeholder:n}),S.useEffect(()=>{n!=null&&t.getExtension(vd).setOptions({placeholder:n})},[n,t]);const[s]=S.useState(()=>{if(r)return r;const l=t.createEmptyDoc(),[c,u]=ft(e.initialContent)?e.initialContent:[e.initialContent??l];return t.createState({content:c,selection:u})}),a=Xq({initialEditorState:s,getProps:()=>e});return S.useEffect(()=>()=>{a.destroy()},[a]),S.useEffect(()=>{a.onUpdate()},[o,a]),Zq(a),a.frameworkOutput}function Xq(e){const t=S.useRef(e);t.current=e;const r=S.useMemo(()=>new Kq(t.current),[]);return r.update(e),r}function Zq(e){const{state:t}=e.props,r=S.useRef(!!t),n=Yq(t);O_(()=>{const o=t?r.current===!0:r.current===!1;re(o,{code:U.REACT_CONTROLLED,message:r.current?"You have attempted to switch from a controlled to an uncontrolled editor. Once you set up an editor as a controlled editor it must always provide a `state` prop.":"You have provided a `state` prop to an uncontrolled editor. In order to set up your editor as controlled you must provide the `state` prop from the very first render."}),!(!t||t===n)&&e.updateControlledState(t,n??void 0)},[t,n,e])}function Jq(e={}){const{content:t,document:r,selection:n,extensions:o,...i}=e,s=Gq(o??(()=>[]),i),[a,l]=S.useState(()=>s.createState({selection:n,content:t??s.createEmptyDoc()})),c=S.useCallback(({state:d})=>{l(d)},[]),u=S.useCallback(()=>s.output,[s]);return S.useMemo(()=>({state:a,setState:l,manager:s,onChange:c,getContext:u}),[u,s,c,a])}var LT={doc:!1,selection:!1,storedMark:!1};function Qq(){const[e,t]=S.useState(LT);return Uq(Wf,"applyState",S.useCallback(({tr:r})=>{const n={...LT};r.docChanged&&(n.doc=!0),r.selectionSet&&(n.selection=!0),r.storedMarksSet&&(n.storedMark=!0),t(n)},[])),e}var gy=()=>D.createElement("div",{className:tF.EDITOR_WRAPPER,...$o().getRootProps()}),eX=e=>(e.hook(),null);function tX(e){const{children:t,autoRender:r,i18n:n,locale:o,supportedLocales:i,hooks:s=[],...a}=e,l=qq(a),c=Rq(l.portalContainer),u=r==="start"||r===!0||!t&&ns(r),d=r==="end";return D.createElement(Vq,{i18n:n,locale:o,supportedLocales:i},D.createElement(C_.Provider,{value:l},D.createElement(Nq,{portals:c}),s.map((p,f)=>D.createElement(eX,{hook:p,key:f})),u&&D.createElement(gy,null),t,d&&D.createElement(gy,null)))}const rX={black:"#000",white:"#fff"},bd=rX,nX={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Va=nX,oX={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},ja=oX,iX={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Ga=iX,sX={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Wa=sX,aX={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Ka=aX,lX={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Pc=lX,cX={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},uX=cX;function N(){return N=Object.assign?Object.assign.bind():function(e){for(var t=1;t{t[r]=A_(e[r])}),t}function hn(e,t,r={clone:!0}){const n=r.clone?N({},e):e;return Xo(e)&&Xo(t)&&Object.keys(t).forEach(o=>{o!=="__proto__"&&(Xo(t[o])&&o in e&&Xo(e[o])?n[o]=hn(e[o],t[o],r):r.clone?n[o]=Xo(t[o])?A_(t[o]):t[o]:n[o]=t[o])}),n}function Jl(e){let t="https://mui.com/production-error/?code="+e;for(let r=1;r<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=s.createElement(n,{is:r.is}):(t=s.createElement(n),n==="select"&&(s=t,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):t=s.createElementNS(t,n),t[ti]=e,t[ah]=r,BI(t,e,!1,!1),e.stateNode=t;e:{switch(s=ry(n,r),n){case"dialog":At("cancel",t),At("close",t),o=r;break;case"iframe":case"object":case"embed":At("load",t),o=r;break;case"video":case"audio":for(o=0;oKc&&(e.flags|=128,r=!0,Ou(i,!1),e.lanes=4194304)}else{if(!r)if(t=Sg(s),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Ou(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Mt)return Hn(e),null}else 2*Yt()-i.renderingStartTime>Kc&&n!==1073741824&&(e.flags|=128,r=!0,Ou(i,!1),e.lanes=4194304);i.isBackwards?(s.sibling=e.child,e.child=s):(n=i.last,n!==null?n.sibling=s:e.child=s,i.last=s)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Yt(),e.sibling=null,n=Pt.current,Et(Pt,r?n&1|2:n&1),e):(Hn(e),null);case 22:case 23:return ex(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Dr&1073741824&&(Hn(e),e.subtreeFlags&6&&(e.flags|=8192)):Hn(e),null;case 24:return null;case 25:return null}throw Error(ne(156,e.tag))}function SZ(t,e){switch(Nw(e),e.tag){case 1:return Er(e.type)&&vg(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return jc(),_t(kr),_t(Yn),Ww(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Uw(e),null;case 13:if(_t(Pt),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ne(340));Wc()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return _t(Pt),null;case 4:return jc(),null;case 10:return zw(e.type._context),null;case 22:case 23:return ex(),null;case 24:return null;default:return null}}var Uf=!1,Gn=!1,CZ=typeof WeakSet=="function"?WeakSet:Set,pe=null;function hc(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){jt(t,e,r)}else n.current=null}function My(t,e,n){try{n()}catch(r){jt(t,e,r)}}var YT=!1;function TZ(t,e){if(fy=fg,t=GO(),Iw(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,c=0,d=t,h=null;t:for(;;){for(var f;d!==n||o!==0&&d.nodeType!==3||(l=s+o),d!==i||r!==0&&d.nodeType!==3||(a=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(f=d.firstChild)!==null;)h=d,d=f;for(;;){if(d===t)break t;if(h===n&&++u===o&&(l=s),h===i&&++c===r&&(a=s),(f=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=f}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(py={focusedElem:t,selectionRange:n},fg=!1,pe=e;pe!==null;)if(e=pe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,pe=t;else for(;pe!==null;){e=pe;try{var p=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,m=p.memoizedState,v=e.stateNode,y=v.getSnapshotBeforeUpdate(e.elementType===e.type?g:Oo(e.type,g),m);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=e.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(w){jt(e,e.return,w)}if(t=e.sibling,t!==null){t.return=e.return,pe=t;break}pe=e.return}return p=YT,YT=!1,p}function Od(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&t)===t){var i=o.destroy;o.destroy=void 0,i!==void 0&&My(e,n,i)}o=o.next}while(o!==r)}}function $m(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function Oy(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function WI(t){var e=t.alternate;e!==null&&(t.alternate=null,WI(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[ti],delete e[ah],delete e[vy],delete e[lZ],delete e[cZ])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function VI(t){return t.tag===5||t.tag===3||t.tag===4}function XT(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||VI(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Iy(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=mg));else if(r!==4&&(t=t.child,t!==null))for(Iy(t,e,n),t=t.sibling;t!==null;)Iy(t,e,n),t=t.sibling}function Ly(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(Ly(t,e,n),t=t.sibling;t!==null;)Ly(t,e,n),t=t.sibling}var On=null,Io=!1;function is(t,e,n){for(n=n.child;n!==null;)jI(t,e,n),n=n.sibling}function jI(t,e,n){if(si&&typeof si.onCommitFiberUnmount=="function")try{si.onCommitFiberUnmount(Am,n)}catch{}switch(n.tag){case 5:Gn||hc(n,e);case 6:var r=On,o=Io;On=null,is(t,e,n),On=r,Io=o,On!==null&&(Io?(t=On,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):On.removeChild(n.stateNode));break;case 18:On!==null&&(Io?(t=On,n=n.stateNode,t.nodeType===8?M1(t.parentNode,n):t.nodeType===1&&M1(t,n),nh(t)):M1(On,n.stateNode));break;case 4:r=On,o=Io,On=n.stateNode.containerInfo,Io=!0,is(t,e,n),On=r,Io=o;break;case 0:case 11:case 14:case 15:if(!Gn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&My(n,e,s),o=o.next}while(o!==r)}is(t,e,n);break;case 1:if(!Gn&&(hc(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){jt(n,e,l)}is(t,e,n);break;case 21:is(t,e,n);break;case 22:n.mode&1?(Gn=(r=Gn)||n.memoizedState!==null,is(t,e,n),Gn=r):is(t,e,n);break;default:is(t,e,n)}}function qT(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new CZ),e.forEach(function(r){var o=$Z.bind(null,t,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Ao(t,e){var n=e.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=Yt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*_Z(r/1960))-r,10t?16:t,Ss===null)var r=!1;else{if(t=Ss,Ss=null,Rg=0,Ye&6)throw Error(ne(331));var o=Ye;for(Ye|=4,pe=t.current;pe!==null;){var i=pe,s=i.child;if(pe.flags&16){var l=i.deletions;if(l!==null){for(var a=0;aYt()-Qw?Va(t,0):Zw|=n),Sr(t,e)}function JI(t,e){e===0&&(t.mode&1?(e=Lf,Lf<<=1,!(Lf&130023424)&&(Lf=4194304)):e=1);var n=ir();t=Vi(t,e),t!==null&&(Yh(t,e,n),Sr(t,n))}function NZ(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),JI(t,n)}function $Z(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,o=t.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(ne(314))}r!==null&&r.delete(e),JI(t,n)}var eL;eL=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||kr.current)br=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return br=!1,kZ(t,e,n);br=!!(t.flags&131072)}else br=!1,Mt&&e.flags&1048576&&rI(e,wg,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;Ep(t,e),t=e.pendingProps;var o=Uc(e,Yn.current);Sc(e,n),o=jw(null,e,r,t,o,n);var i=Gw();return e.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Er(r)?(i=!0,yg(e)):i=!1,e.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Bw(e),o.updater=Lm,e.stateNode=o,o._reactInternals=e,Ey(e,r,t,n),e=Ty(null,e,r,!0,i,n)):(e.tag=0,Mt&&i&&Lw(e),tr(null,e,o,n),e=e.child),e;case 16:r=e.elementType;e:{switch(Ep(t,e),t=e.pendingProps,o=r._init,r=o(r._payload),e.type=r,o=e.tag=PZ(r),t=Oo(r,t),o){case 0:e=Cy(null,e,r,t,n);break e;case 1:e=jT(null,e,r,t,n);break e;case 11:e=WT(null,e,r,t,n);break e;case 14:e=VT(null,e,r,Oo(r.type,t),n);break e}throw Error(ne(306,r,""))}return e;case 0:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:Oo(r,o),Cy(t,e,r,o,n);case 1:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:Oo(r,o),jT(t,e,r,o,n);case 3:e:{if(PI(e),t===null)throw Error(ne(387));r=e.pendingProps,i=e.memoizedState,o=i.element,aI(t,e),Eg(e,r,null,n);var s=e.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){o=Gc(Error(ne(423)),e),e=GT(t,e,r,n,o);break e}else if(r!==o){o=Gc(Error(ne(424)),e),e=GT(t,e,r,n,o);break e}else for(Wr=Ls(e.stateNode.containerInfo.firstChild),jr=e,Mt=!0,No=null,n=dI(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Wc(),r===o){e=ji(t,e,n);break e}tr(t,e,r,n)}e=e.child}return e;case 5:return hI(e),t===null&&wy(e),r=e.type,o=e.pendingProps,i=t!==null?t.memoizedProps:null,s=o.children,gy(r,o)?s=null:i!==null&&gy(r,i)&&(e.flags|=32),DI(t,e),tr(t,e,s,n),e.child;case 6:return t===null&&wy(e),null;case 13:return zI(t,e,n);case 4:return Hw(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Vc(e,null,r,n):tr(t,e,r,n),e.child;case 11:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:Oo(r,o),WT(t,e,r,o,n);case 7:return tr(t,e,e.pendingProps,n),e.child;case 8:return tr(t,e,e.pendingProps.children,n),e.child;case 12:return tr(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,o=e.pendingProps,i=e.memoizedProps,s=o.value,Et(xg,r._currentValue),r._currentValue=s,i!==null)if(Wo(i.value,s)){if(i.children===o.children&&!kr.current){e=ji(t,e,n);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var l=i.dependencies;if(l!==null){s=i.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=Fi(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),xy(i.return,n,e),l.lanes|=n;break}a=a.next}}else if(i.tag===10)s=i.type===e.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(ne(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),xy(s,n,e),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}tr(t,e,o.children,n),e=e.child}return e;case 9:return o=e.type,r=e.pendingProps.children,Sc(e,n),o=vo(o),r=r(o),e.flags|=1,tr(t,e,r,n),e.child;case 14:return r=e.type,o=Oo(r,e.pendingProps),o=Oo(r.type,o),VT(t,e,r,o,n);case 15:return NI(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:Oo(r,o),Ep(t,e),e.tag=1,Er(r)?(t=!0,yg(e)):t=!1,Sc(e,n),cI(e,r,o),Ey(e,r,o,n),Ty(null,e,r,!0,t,n);case 19:return FI(t,e,n);case 22:return $I(t,e,n)}throw Error(ne(156,e.tag))};function tL(t,e){return AO(t,e)}function DZ(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function co(t,e,n,r){return new DZ(t,e,n,r)}function nx(t){return t=t.prototype,!(!t||!t.isReactComponent)}function PZ(t){if(typeof t=="function")return nx(t)?1:0;if(t!=null){if(t=t.$$typeof,t===xw)return 11;if(t===kw)return 14}return 2}function Ps(t,e){var n=t.alternate;return n===null?(n=co(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Tp(t,e,n,r,o,i){var s=2;if(r=t,typeof t=="function")nx(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case rc:return ja(n.children,o,i,e);case ww:s=8,o|=8;break;case K0:return t=co(12,n,e,o|2),t.elementType=K0,t.lanes=i,t;case Y0:return t=co(13,n,e,o),t.elementType=Y0,t.lanes=i,t;case X0:return t=co(19,n,e,o),t.elementType=X0,t.lanes=i,t;case uO:return Pm(n,o,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case lO:s=10;break e;case cO:s=9;break e;case xw:s=11;break e;case kw:s=14;break e;case gs:s=16,r=null;break e}throw Error(ne(130,t==null?t:typeof t,""))}return e=co(s,n,e,o),e.elementType=t,e.type=r,e.lanes=i,e}function ja(t,e,n,r){return t=co(7,t,r,e),t.lanes=n,t}function Pm(t,e,n,r){return t=co(22,t,r,e),t.elementType=uO,t.lanes=n,t.stateNode={isHidden:!1},t}function z1(t,e,n){return t=co(6,t,null,e),t.lanes=n,t}function F1(t,e,n){return e=co(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function zZ(t,e,n,r,o){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=b1(0),this.expirationTimes=b1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=b1(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function rx(t,e,n,r,o,i,s,l,a){return t=new zZ(t,e,n,l,a),e===1?(e=1,i===!0&&(e|=8)):e=0,i=co(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Bw(i),t}function FZ(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(iL)}catch(t){console.error(t)}}iL(),rO.exports=Zr;var Qh=rO.exports;const jf=jo(Qh);var VZ=Object.defineProperty,jZ=Object.getOwnPropertyDescriptor,GZ=(t,e,n,r)=>{for(var o=r>1?void 0:r?jZ(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&VZ(e,n,o),o},sL=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},xe=(t,e,n)=>(sL(t,e,"read from private field"),n?n.call(t):e.get(t)),$r=(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)},Lr=(t,e,n,r)=>(sL(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),hd,KZ=class{constructor(){this.portals=new Map,$r(this,hd,vm()),this.on=t=>xe(this,hd).on("update",t),this.once=t=>{const e=xe(this,hd).on("update",n=>{e(),t(n)});return e}}update(){xe(this,hd).emit("update",this.portals)}render({Component:t,container:e}){const n=this.portals.get(e);this.portals.set(e,{Component:t,key:(n==null?void 0:n.key)??Rc()}),this.update()}forceUpdate(){for(const[t,{Component:e}]of this.portals)this.portals.set(t,{Component:e,key:Rc()})}remove(t){this.portals.delete(t),this.update()}};hd=new WeakMap;var YZ=t=>{const{portals:e}=t;return ee.createElement(ee.Fragment,null,e.map(([n,{Component:r,key:o}])=>Qh.createPortal(ee.createElement(r,null),n,o)))};function XZ(t){const[e,n]=P.useState(()=>Array.from(t.portals.entries()));return P.useEffect(()=>t.on(r=>{n(Array.from(r.entries()))}),[t]),P.useMemo(()=>e,[e])}var Dt,fd,ka,pd,Ap,gd,Zl,md,_p,Ci,er,zy,aL=class{constructor({getPosition:t,node:e,portalContainer:n,view:r,ReactComponent:o,options:i}){$r(this,Dt,void 0),$r(this,fd,[]),$r(this,ka,void 0),$r(this,pd,void 0),$r(this,Ap,void 0),$r(this,gd,void 0),$r(this,Zl,void 0),$r(this,md,!1),$r(this,_p,void 0),$r(this,Ci,void 0),$r(this,er,void 0),$r(this,zy,a=>{a&&(we(xe(this,Ci),{code:re.REACT_NODE_VIEW,message:`You have applied a ref to a node view provided for '${xe(this,Dt).type.name}' which doesn't support content.`}),a.append(xe(this,Ci)))}),this.Component=()=>{const a=xe(this,Ap);return we(a,{code:re.REACT_NODE_VIEW,message:`The custom react node view provided for ${xe(this,Dt).type.name} doesn't have a valid ReactComponent`}),ee.createElement(a,{updateAttributes:this.updateAttributes,selected:this.selected,view:xe(this,ka),getPosition:xe(this,gd),node:xe(this,Dt),forwardRef:xe(this,zy),decorations:xe(this,fd)})},this.updateAttributes=a=>{if(!xe(this,ka).editable)return;const u=xe(this,gd).call(this);if(u==null)return;const c=xe(this,ka).state.tr.setNodeMarkup(u,void 0,{...xe(this,Dt).attrs,...a});xe(this,ka).dispatch(c)},we(tt(t),{message:"You are attempting to use a node view for a mark type. This is not supported yet. Please check your configuration."}),Lr(this,Dt,e),Lr(this,ka,r),Lr(this,pd,n),Lr(this,Ap,o),Lr(this,gd,t),Lr(this,Zl,i),Lr(this,er,this.createDom());const{contentDOM:s,wrapper:l}=this.createContentDom()??{};Lr(this,_p,s??void 0),Lr(this,Ci,l),xe(this,Ci)&&xe(this,er).append(xe(this,Ci)),this.setDomAttributes(xe(this,Dt),xe(this,er)),this.Component.displayName=nR(`${xe(this,Dt).type.name}NodeView`),this.renderComponent()}static create(t){const{portalContainer:e,ReactComponent:n,options:r}=t;return(o,i,s)=>new aL({options:r,node:o,view:i,getPosition:s,portalContainer:e,ReactComponent:n})}get selected(){return xe(this,md)}get contentDOM(){return xe(this,_p)}get dom(){return xe(this,er)}renderComponent(){xe(this,pd).render({Component:this.Component,container:xe(this,er)})}createDom(){const{defaultBlockNode:t,defaultInlineNode:e}=xe(this,Zl),n=xe(this,Dt).isInline?document.createElement(e):document.createElement(t);return n.classList.add(`${tS(xe(this,Dt).type.name)}-node-view-wrapper`),n}createContentDom(){var t,e;if(xe(this,Dt).isLeaf)return;const n=(e=(t=xe(this,Dt).type.spec).toDOM)==null?void 0:e.call(t,xe(this,Dt));if(!n)return;const{contentDOM:r,dom:o}=Ur.renderSpec(document,n);let i;if(zt(o))return i=o,o===r&&(i=document.createElement("span"),i.classList.add(`${tS(xe(this,Dt).type.name)}-node-view-content-wrapper`),i.append(r)),zt(r),{wrapper:i,contentDOM:r}}update(t,e){return dm({types:xe(this,Dt).type,node:t})?(xe(this,Dt)===t&&xe(this,fd)===e||(xe(this,Dt).sameMarkup(t)||this.setDomAttributes(t,xe(this,er)),Lr(this,Dt,t),Lr(this,fd,e),this.renderComponent()),!0):!1}setDomAttributes(t,e){const{toDOM:n}=xe(this,Dt).type.spec;let r=t.attrs;if(n){const o=n(t);if(ke(o)||qZ(o))return;Zs(o[1])&&(r=o[1])}for(const[o,i]of cn(r))e.setAttribute(o,i)}selectNode(){Lr(this,md,!0),xe(this,er)&&xe(this,er).classList.add(ZE),this.renderComponent()}deselectNode(){Lr(this,md,!1),xe(this,er)&&xe(this,er).classList.remove(ZE),this.renderComponent()}destroy(){xe(this,pd).remove(xe(this,er))}ignoreMutation(t){return t.type==="selection"?!xe(this,Dt).type.spec.selectable:xe(this,Ci)?!xe(this,Ci).contains(t.target):!0}stopEvent(t){var e;if(!xe(this,er))return!1;if(tt(xe(this,Zl).stopEvent))return xe(this,Zl).stopEvent({event:t});const n=t.target;if(!(xe(this,er).contains(n)&&!((e=this.contentDOM)!=null&&e.contains(n))))return!1;const o=t.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!o)return!0;const s=!!xe(this,Dt).type.spec.draggable,l=Le.isSelectable(xe(this,Dt)),a=t.type==="copy",u=t.type==="paste",c=t.type==="cut",d=t.type==="mousedown",h=t.type.startsWith("drag");return!s&&l&&h&&t.preventDefault(),!(h||o||a||u||c||d&&l)}},oA=aL;Dt=new WeakMap;fd=new WeakMap;ka=new WeakMap;pd=new WeakMap;Ap=new WeakMap;gd=new WeakMap;Zl=new WeakMap;md=new WeakMap;_p=new WeakMap;Ci=new WeakMap;er=new WeakMap;zy=new WeakMap;function qZ(t){return Zp(t)||Zs(t)&&Zp(t.dom)}var ph=class extends yt{constructor(){super(...arguments),this.portalContainer=new KZ}get name(){return"reactComponent"}onCreate(){this.store.setStoreKey("portalContainer",this.portalContainer)}createNodeViews(){const t=be(),e=this.store.managerSettings.nodeViewComponents??{};for(const r of this.store.extensions)!r.ReactComponent||!Vh(r)||r.reactComponentEnvironment==="ssr"||(t[r.name]=oA.create({options:this.options,ReactComponent:r.ReactComponent,portalContainer:this.portalContainer}));const n=cn({...this.options.nodeViewComponents,...e});for(const[r,o]of n)t[r]=oA.create({options:this.options,ReactComponent:o,portalContainer:this.portalContainer});return t}};ph=GZ([Pe({defaultOptions:{defaultBlockNode:"div",defaultInlineNode:"span",defaultContentNode:"span",defaultEnvironment:"both",nodeViewComponents:{},stopEvent:null},staticKeys:["defaultBlockNode","defaultInlineNode","defaultContentNode","defaultEnvironment"]})],ph);var ZZ=Object.defineProperty,QZ=Object.getOwnPropertyDescriptor,JZ=(t,e,n,r)=>{for(var o=r>1?void 0:r?QZ(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&ZZ(e,n,o),o},eQ={...el.defaultOptions,...ph.defaultOptions},tQ=[...el.staticKeys,...ph.staticKeys],gh=class extends yt{get name(){return"react"}onSetOptions(t){const{pickChanged:e}=t;this.getExtension(el).setOptions(e(["placeholder"]))}createExtensions(){const{emptyNodeClass:t,placeholder:e,defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:o,defaultInlineNode:i,nodeViewComponents:s}=this.options;return[new el({emptyNodeClass:t,placeholder:e,priority:dt.Low}),new ph({defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:o,defaultInlineNode:i,nodeViewComponents:s})]}};gh=JZ([Pe({defaultOptions:eQ,staticKeys:tQ})],gh);var lL={};Object.defineProperty(lL,"__esModule",{value:!0});function nQ(){for(var t=[],e=0;e{if(!e.has(t))throw TypeError("Cannot "+n)},B1=(t,e,n)=>(cL(t,e,"read from private field"),n?n.call(t):e.get(t)),rQ=(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)},oQ=(t,e,n,r)=>(cL(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);function iQ(){const[,t]=P.useState(be());return P.useCallback(()=>{t(be())},[])}var uL=P.createContext(null);function vi(t){const e=P.useContext(uL),n=P.useRef(iQ());we(e,{code:re.REACT_PROVIDER_CONTEXT});const{addHandler:r}=e;return P.useEffect(()=>{let o=t;if(o){if(Zs(o)){const{autoUpdate:i}=o;o=i?()=>n.current():void 0}if(tt(o))return r("updated",o)}},[r,t]),e}function hr(t=!0){return vi({autoUpdate:t}).active}function sQ(t=!1){return vi(t?{autoUpdate:!0}:void 0).attrs}function gu(){return vi().chain.new()}function kn(){return vi().commands}function ax(){return vi({autoUpdate:!0}).getState().selection}function Jh(t,e=void 0,n){const{getExtension:r}=vi(),o=P.useMemo(()=>r(t),[t,r]);let i;if(tt(e)?i=n?[o,...n]:[o,e]:i=e?[o,...Object.values(e)]:[],P.useEffect(()=>{tt(e)||!e||o.setOptions(e)},i),P.useEffect(()=>{if(tt(e))return e({addHandler:o.addHandler.bind(o),addCustomHandler:o.addCustomHandler.bind(o),extension:o})},i),!e)return o}function aQ(t,e,n){const r=P.useCallback(({addHandler:o})=>o(e,n),[n,e]);return Jh(t,r)}function ef(t=!1){return vi(t?{autoUpdate:!0}:void 0).helpers}var[lQ,cQ]=zV(({props:t})=>{const e=t.locale??"en",n=t.i18n??Cm,r=t.supportedLocales??[e],o=n._.bind(n);return{locale:e,i18n:n,supportedLocales:r,t:o}});function lA(t,e={}){const{core:n,react:r,...o}=e;return tH(t)?t:eH.create(()=>[...hR(t),new gh(r),...$X(n)],o)}function uQ(t,e={}){const n=P.useRef(t),r=P.useRef(e),[o,i]=P.useState(()=>lA(t,e));return n.current=t,r.current=e,P.useEffect(()=>o.addHandler("destroy",()=>{i(()=>lA(n.current,r.current))}),[o]),o}var dQ=typeof rr=="object"&&rr.__esModule&&rr.default?rr.default:rr,Ql,hQ=class extends XB{constructor(t){if(super(t),rQ(this,Ql,void 0),this.rootPropsConfig={called:!1,count:0},this.getRootProps=e=>this.internalGetRootProps(e,null),this.internalGetRootProps=(e,n)=>{this.rootPropsConfig.called=!0;const{refKey:r="ref",ref:o,...i}=e??be();return{[r]:dQ(o,this.onRef),key:this.uid,...i,children:n}},this.onRef=e=>{e&&(this.rootPropsConfig.count+=1,we(this.rootPropsConfig.count<=1,{code:re.REACT_GET_ROOT_PROPS,message:`Called ${this.rootPropsConfig.count} times`}),oQ(this,Ql,e),this.onRefLoad())},this.manager.view){this.manager.view.setProps({state:this.manager.view.state,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0});return}this.manager.getExtension(el).setOptions({placeholder:this.props.placeholder??""})}get name(){return"react"}update(t){return super.update(t),this}createView(t){return new iz(null,{state:t,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0,plugins:[]})}updateState({state:t,...e}){const{triggerChange:n=!0,tr:r,transactions:o}=e;if(this.props.state){const{onChange:i}=this.props;we(i,{code:re.REACT_CONTROLLED,message:"You are required to provide the `onChange` handler when creating a controlled editor."}),we(n,{code:re.REACT_CONTROLLED,message:"Controlled editors do not support `clearContent` or `setContent` where `triggerChange` is `true`. Update the `state` prop instead."}),this.previousStateOverride||(this.previousStateOverride=this.getState()),this.onChange({state:t,tr:r,transactions:o});return}!r&&!o&&(t=t.apply(t.tr.setMeta(QE,{}))),this.view.updateState(t),n&&(o==null?void 0:o.length)!==0&&this.onChange({state:t,tr:r,transactions:o}),this.manager.onStateUpdate({previousState:this.previousState,state:t,tr:r,transactions:o})}updateControlledState(t,e){this.previousStateOverride=e,t=t.apply(t.tr.setMeta(QE,{})),this.view.updateState(t),this.manager.onStateUpdate({previousState:this.previousState,state:t}),this.previousStateOverride=void 0}addProsemirrorViewToDom(t,e){this.props.insertPosition==="start"?t.insertBefore(e,t.firstChild):t.append(e)}onRefLoad(){we(B1(this,Ql),{code:re.REACT_EDITOR_VIEW,message:"Something went wrong when initializing the text editor. Please check your setup."});const{autoFocus:t}=this.props;this.addProsemirrorViewToDom(B1(this,Ql),this.view.dom),t&&this.focus(t),this.onChange(),this.addFocusListeners()}onUpdate(){this.view&&B1(this,Ql)&&this.view.setProps({...this.view.props,editable:()=>this.props.editable??!0})}get frameworkOutput(){return{...this.baseOutput,getRootProps:this.getRootProps,portalContainer:this.manager.store.portalContainer}}resetRender(){this.rootPropsConfig.called=!1,this.rootPropsConfig.count=0}};Ql=new WeakMap;var dL=typeof document<"u"?P.useLayoutEffect:P.useEffect;function fQ(t){const e=P.useRef();return dL(()=>{e.current=t}),e.current}function pQ(t){const{manager:e,state:n}=t,{placeholder:r,editable:o}=t;P.useRef(!0).current&&!Fs(r)&&e.getExtension(gh).setOptions({placeholder:r}),P.useEffect(()=>{r!=null&&e.getExtension(gh).setOptions({placeholder:r})},[r,e]);const[s]=P.useState(()=>{if(n)return n;const a=e.createEmptyDoc(),[u,c]=Bt(t.initialContent)?t.initialContent:[t.initialContent??a];return e.createState({content:u,selection:c})}),l=gQ({initialEditorState:s,getProps:()=>t});return P.useEffect(()=>()=>{l.destroy()},[l]),P.useEffect(()=>{l.onUpdate()},[o,l]),mQ(l),l.frameworkOutput}function gQ(t){const e=P.useRef(t);e.current=t;const n=P.useMemo(()=>new hQ(e.current),[]);return n.update(t),n}function mQ(t){const{state:e}=t.props,n=P.useRef(!!e),r=fQ(e);dL(()=>{const o=e?n.current===!0:n.current===!1;we(o,{code:re.REACT_CONTROLLED,message:n.current?"You have attempted to switch from a controlled to an uncontrolled editor. Once you set up an editor as a controlled editor it must always provide a `state` prop.":"You have provided a `state` prop to an uncontrolled editor. In order to set up your editor as controlled you must provide the `state` prop from the very first render."}),!(!e||e===r)&&t.updateControlledState(e,r??void 0)},[e,r,t])}function vQ(t={}){const{content:e,document:n,selection:r,extensions:o,...i}=t,s=uQ(o??(()=>[]),i),[l,a]=P.useState(()=>s.createState({selection:r,content:e??s.createEmptyDoc()})),u=P.useCallback(({state:d})=>{a(d)},[]),c=P.useCallback(()=>s.output,[s]);return P.useMemo(()=>({state:l,setState:a,manager:s,onChange:u,getContext:c}),[c,s,u,l])}var cA={doc:!1,selection:!1,storedMark:!1};function yQ(){const[t,e]=P.useState(cA);return aQ(tg,"applyState",P.useCallback(({tr:n})=>{const r={...cA};n.docChanged&&(r.doc=!0),n.selectionSet&&(r.selection=!0),n.storedMarksSet&&(r.storedMark=!0),e(r)},[])),t}var Fy=()=>ee.createElement("div",{className:wW.EDITOR_WRAPPER,...vi().getRootProps()}),bQ=t=>(t.hook(),null);function wQ(t){const{children:e,autoRender:n,i18n:r,locale:o,supportedLocales:i,hooks:s=[],...l}=t,a=pQ(l),u=XZ(a.portalContainer),c=n==="start"||n===!0||!e&&Fs(n),d=n==="end";return ee.createElement(lQ,{i18n:r,locale:o,supportedLocales:i},ee.createElement(uL.Provider,{value:a},ee.createElement(YZ,{portals:u}),s.map((h,f)=>ee.createElement(bQ,{hook:h,key:f})),c&&ee.createElement(Fy,null),e,d&&ee.createElement(Fy,null)))}const xQ={black:"#000",white:"#fff"},mh=xQ,kQ={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},zl=kQ,EQ={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Fl=EQ,SQ={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Bl=SQ,CQ={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Hl=CQ,TQ={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Ul=TQ,AQ={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Lu=AQ,_Q={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},RQ=_Q;function K(){return K=Object.assign?Object.assign.bind():function(t){for(var e=1;e{e[n]=hL(t[n])}),e}function Gr(t,e,n={clone:!0}){const r=n.clone?K({},t):t;return Oi(t)&&Oi(e)&&Object.keys(e).forEach(o=>{o!=="__proto__"&&(Oi(e[o])&&o in t&&Oi(t[o])?r[o]=Gr(t[o],e[o],n):n.clone?r[o]=Oi(e[o])?hL(e[o]):e[o]:r[o]=e[o])}),r}var fL={exports:{}},MQ="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",OQ=MQ,IQ=OQ;function pL(){}function gL(){}gL.resetWarningCache=pL;var LQ=function(){function t(r,o,i,s,l,a){if(a!==IQ){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:gL,resetWarningCache:pL};return n.PropTypes=n,n};fL.exports=LQ();var lx=fL.exports;function Yc(t){let e="https://mui.com/production-error/?code="+t;for(let n=1;nr==null?t:function(...o){t.apply(this,o),r.apply(this,o)},()=>{})}function fX(e,t=166){let r;function n(...o){const i=()=>{e.apply(this,o)};clearTimeout(r),r=setTimeout(i,t)}return n.clear=()=>{clearTimeout(r)},n}function jr(e){return e&&e.ownerDocument||document}function Ed(e){return jr(e).defaultView||window}function yy(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const hX=typeof window<"u"?S.useLayoutEffect:S.useEffect,va=hX;let PT=0;function mX(e){const[t,r]=S.useState(e),n=e||t;return S.useEffect(()=>{t==null&&(PT+=1,r(`mui-${PT}`))},[t]),n}const zT=B1["useId".toString()];function gX(e){if(zT!==void 0){const t=zT();return e??t}return mX(e)}function yX({controlled:e,default:t,name:r,state:n="value"}){const{current:o}=S.useRef(e!==void 0),[i,s]=S.useState(t),a=o?e:i,l=S.useCallback(c=>{o||s(c)},[]);return[a,l]}function Xs(e){const t=S.useRef(e);return va(()=>{t.current=e}),S.useCallback((...r)=>(0,t.current)(...r),[])}function Kr(...e){return S.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{yy(r,t)})},e)}let Fm=!0,vy=!1,$T;const vX={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function bX(e){const{type:t,tagName:r}=e;return!!(r==="INPUT"&&vX[t]&&!e.readOnly||r==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function EX(e){e.metaKey||e.altKey||e.ctrlKey||(Fm=!0)}function k1(){Fm=!1}function kX(){this.visibilityState==="hidden"&&vy&&(Fm=!0)}function xX(e){e.addEventListener("keydown",EX,!0),e.addEventListener("mousedown",k1,!0),e.addEventListener("pointerdown",k1,!0),e.addEventListener("touchstart",k1,!0),e.addEventListener("visibilitychange",kX,!0)}function SX(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return Fm||bX(t)}function R_(){const e=S.useCallback(o=>{o!=null&&xX(o.ownerDocument)},[]),t=S.useRef(!1);function r(){return t.current?(vy=!0,window.clearTimeout($T),$T=window.setTimeout(()=>{vy=!1},100),t.current=!1,!0):!1}function n(o){return SX(o)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:n,onBlur:r,ref:e}}function __(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const wX=e=>{const t=S.useRef({});return S.useEffect(()=>{t.current=e}),t.current},I_=wX;function M_(e,t){const r=N({},t);return Object.keys(e).forEach(n=>{if(n.toString().match(/^(components|slots)$/))r[n]=N({},e[n],r[n]);else if(n.toString().match(/^(componentsProps|slotProps)$/)){const o=e[n]||{},i=t[n];r[n]={},!i||!Object.keys(i)?r[n]=o:!o||!Object.keys(o)?r[n]=i:(r[n]=N({},i),Object.keys(o).forEach(s=>{r[n][s]=M_(o[s],i[s])}))}else r[n]===void 0&&(r[n]=e[n])}),r}function ir(e,t,r=void 0){const n={};return Object.keys(e).forEach(o=>{n[o]=e[o].reduce((i,s)=>{if(s){const a=t(s);a!==""&&i.push(a),r&&r[s]&&i.push(r[s])}return i},[]).join(" ")}),n}const BT=e=>e,TX=()=>{let e=BT;return{configure(t){e=t},generate(t){return e(t)},reset(){e=BT}}},CX=TX(),L_=CX,OX={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Kt(e,t,r="Mui"){const n=OX[t];return n?`${r}-${n}`:`${L_.generate(e)}-${t}`}function Yt(e,t,r="Mui"){const n={};return t.forEach(o=>{n[o]=Kt(e,o,r)}),n}const Ql="$$material";function be(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i=0)&&(r[o]=e[o]);return r}function D_(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var AX=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,NX=D_(function(e){return AX.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function RX(e){if(e.sheet)return e.sheet;for(var t=0;t0?Qt(bc,--Yr):0,ec--,Ct===10&&(ec=1,Vm--),Ct}function mn(){return Ct=Yr2||xd(Ct)>3?"":" "}function VX(e,t){for(;--t&&mn()&&!(Ct<48||Ct>102||Ct>57&&Ct<65||Ct>70&&Ct<97););return np(e,Ef()+(t<6&&No()==32&&mn()==32))}function Ey(e){for(;mn();)switch(Ct){case e:return Yr;case 34:case 39:e!==34&&e!==39&&Ey(Ct);break;case 40:e===41&&Ey(e);break;case 92:mn();break}return Yr}function jX(e,t){for(;mn()&&e+Ct!==47+10;)if(e+Ct===42+42&&No()===47)break;return"/*"+np(t,Yr-1)+"*"+Um(e===47?e:mn())}function GX(e){for(;!xd(No());)mn();return np(e,Yr)}function WX(e){return F_(xf("",null,null,null,[""],e=H_(e),0,[0],e))}function xf(e,t,r,n,o,i,s,a,l){for(var c=0,u=0,d=s,p=0,f=0,h=0,m=1,b=1,y=1,g=0,v="",E=o,k=i,x=n,w=v;b;)switch(h=g,g=mn()){case 40:if(h!=108&&Qt(w,d-1)==58){by(w+=Me(kf(g),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:w+=kf(g);break;case 9:case 10:case 13:case 32:w+=UX(h);break;case 92:w+=VX(Ef()-1,7);continue;case 47:switch(No()){case 42:case 47:zp(KX(jX(mn(),Ef()),t,r),l);break;default:w+="/"}break;case 123*m:a[c++]=bo(w)*y;case 125*m:case 59:case 0:switch(g){case 0:case 125:b=0;case 59+u:y==-1&&(w=Me(w,/\f/g,"")),f>0&&bo(w)-d&&zp(f>32?FT(w+";",n,r,d-1):FT(Me(w," ","")+";",n,r,d-2),l);break;case 59:w+=";";default:if(zp(x=HT(w,t,r,c,u,o,a,v,E=[],k=[],d),i),g===123)if(u===0)xf(w,t,x,x,E,i,d,a,k);else switch(p===99&&Qt(w,3)===110?100:p){case 100:case 108:case 109:case 115:xf(e,x,x,n&&zp(HT(e,x,x,0,0,o,a,v,o,E=[],d),k),o,k,d,a,n?E:k);break;default:xf(w,x,x,x,[""],k,0,a,k)}}c=u=f=0,m=y=1,v=w="",d=s;break;case 58:d=1+bo(w),f=h;default:if(m<1){if(g==123)--m;else if(g==125&&m++==0&&FX()==125)continue}switch(w+=Um(g),g*m){case 38:y=u>0?1:(w+="\f",-1);break;case 44:a[c++]=(bo(w)-1)*y,y=1;break;case 64:No()===45&&(w+=kf(mn())),p=No(),u=d=bo(v=w+=GX(Ef())),g++;break;case 45:h===45&&bo(w)==2&&(m=0)}}return i}function HT(e,t,r,n,o,i,s,a,l,c,u){for(var d=o-1,p=o===0?i:[""],f=Fb(p),h=0,m=0,b=0;h0?p[y]+" "+g:Me(g,/&\f/g,p[y])))&&(l[b++]=v);return jm(e,t,r,o===0?Bb:a,l,c,u)}function KX(e,t,r){return jm(e,t,r,P_,Um(HX()),kd(e,2,-2),0)}function FT(e,t,r,n){return jm(e,t,r,Hb,kd(e,0,n),kd(e,n+1,-1),n)}function Rl(e,t){for(var r="",n=Fb(e),o=0;o6)switch(Qt(e,t+1)){case 109:if(Qt(e,t+4)!==45)break;case 102:return Me(e,/(.+:)(.+)-([^]+)/,"$1"+Ie+"$2-$3$1"+Sh+(Qt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~by(e,"stretch")?U_(Me(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Qt(e,t+1)!==115)break;case 6444:switch(Qt(e,bo(e)-3-(~by(e,"!important")&&10))){case 107:return Me(e,":",":"+Ie)+e;case 101:return Me(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ie+(Qt(e,14)===45?"inline-":"")+"box$3$1"+Ie+"$2$3$1"+cr+"$2box$3")+e}break;case 5936:switch(Qt(e,t+11)){case 114:return Ie+e+cr+Me(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ie+e+cr+Me(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ie+e+cr+Me(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ie+e+cr+e+e}return e}var rZ=function(t,r,n,o){if(t.length>-1&&!t.return)switch(t.type){case Hb:t.return=U_(t.value,t.length);break;case z_:return Rl([zc(t,{value:Me(t.value,"@","@"+Ie)})],o);case Bb:if(t.length)return BX(t.props,function(i){switch($X(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Rl([zc(t,{props:[Me(i,/:(read-\w+)/,":"+Sh+"$1")]})],o);case"::placeholder":return Rl([zc(t,{props:[Me(i,/:(plac\w+)/,":"+Ie+"input-$1")]}),zc(t,{props:[Me(i,/:(plac\w+)/,":"+Sh+"$1")]}),zc(t,{props:[Me(i,/:(plac\w+)/,cr+"input-$1")]})],o)}return""})}},nZ=[rZ],oZ=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(m){var b=m.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var o=t.stylisPlugins||nZ,i={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(m){for(var b=m.getAttribute("data-emotion").split(" "),y=1;yn==null?e:function(...o){e.apply(this,o),n.apply(this,o)},()=>{})}function DQ(t,e=166){let n;function r(...o){const i=()=>{t.apply(this,o)};clearTimeout(n),n=setTimeout(i,e)}return r.clear=()=>{clearTimeout(n)},r}function Cr(t){return t&&t.ownerDocument||document}function vh(t){return Cr(t).defaultView||window}function By(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const PQ=typeof window<"u"?P.useLayoutEffect:P.useEffect,sl=PQ;let dA=0;function zQ(t){const[e,n]=P.useState(t),r=t||e;return P.useEffect(()=>{e==null&&(dA+=1,n(`mui-${dA}`))},[e]),r}const hA=l0["useId".toString()];function FQ(t){if(hA!==void 0){const e=hA();return t??e}return zQ(t)}function BQ({controlled:t,default:e,name:n,state:r="value"}){const{current:o}=P.useRef(t!==void 0),[i,s]=P.useState(e),l=o?t:i,a=P.useCallback(u=>{o||s(u)},[]);return[l,a]}function za(t){const e=P.useRef(t);return sl(()=>{e.current=t}),P.useCallback((...n)=>(0,e.current)(...n),[])}function _r(...t){return P.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{By(n,e)})},t)}let Qm=!0,Hy=!1,fA;const HQ={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function UQ(t){const{type:e,tagName:n}=t;return!!(n==="INPUT"&&HQ[e]&&!t.readOnly||n==="TEXTAREA"&&!t.readOnly||t.isContentEditable)}function WQ(t){t.metaKey||t.altKey||t.ctrlKey||(Qm=!0)}function H1(){Qm=!1}function VQ(){this.visibilityState==="hidden"&&Hy&&(Qm=!0)}function jQ(t){t.addEventListener("keydown",WQ,!0),t.addEventListener("mousedown",H1,!0),t.addEventListener("pointerdown",H1,!0),t.addEventListener("touchstart",H1,!0),t.addEventListener("visibilitychange",VQ,!0)}function GQ(t){const{target:e}=t;try{return e.matches(":focus-visible")}catch{}return Qm||UQ(e)}function vL(){const t=P.useCallback(o=>{o!=null&&jQ(o.ownerDocument)},[]),e=P.useRef(!1);function n(){return e.current?(Hy=!0,window.clearTimeout(fA),fA=window.setTimeout(()=>{Hy=!1},100),e.current=!1,!0):!1}function r(o){return GQ(o)?(e.current=!0,!0):!1}return{isFocusVisibleRef:e,onFocus:r,onBlur:n,ref:t}}function yL(t){const e=t.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}const KQ=t=>{const e=P.useRef({});return P.useEffect(()=>{e.current=t}),e.current},bL=KQ;function wL(t,e){const n=K({},e);return Object.keys(t).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=K({},t[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const o=t[r]||{},i=e[r];n[r]={},!i||!Object.keys(i)?n[r]=o:!o||!Object.keys(o)?n[r]=i:(n[r]=K({},i),Object.keys(o).forEach(s=>{n[r][s]=wL(o[s],i[s])}))}else n[r]===void 0&&(n[r]=t[r])}),n}function zn(t,e,n=void 0){const r={};return Object.keys(t).forEach(o=>{r[o]=t[o].reduce((i,s)=>{if(s){const l=e(s);l!==""&&i.push(l),n&&n[s]&&i.push(n[s])}return i},[]).join(" ")}),r}const pA=t=>t,YQ=()=>{let t=pA;return{configure(e){t=e},generate(e){return t(e)},reset(){t=pA}}},XQ=YQ(),xL=XQ,qQ={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function En(t,e,n="Mui"){const r=qQ[e];return r?`${n}-${r}`:`${xL.generate(t)}-${e}`}function Sn(t,e,n="Mui"){const r={};return e.forEach(o=>{r[o]=En(t,o,n)}),r}const Xc="$$material";function Fe(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,i;for(i=0;i=0)&&(n[o]=t[o]);return n}function kL(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var ZQ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,QQ=kL(function(t){return ZQ.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91});function JQ(t){if(t.sheet)return t.sheet;for(var e=0;e0?In(mu,--Rr):0,qc--,Jt===10&&(qc=1,ev--),Jt}function Kr(){return Jt=Rr2||bh(Jt)>3?"":" "}function hJ(t,e){for(;--e&&Kr()&&!(Jt<48||Jt>102||Jt>57&&Jt<65||Jt>70&&Jt<97););return tf(t,Rp()+(e<6&&li()==32&&Kr()==32))}function Wy(t){for(;Kr();)switch(Jt){case t:return Rr;case 34:case 39:t!==34&&t!==39&&Wy(Jt);break;case 40:t===41&&Wy(t);break;case 92:Kr();break}return Rr}function fJ(t,e){for(;Kr()&&t+Jt!==47+10;)if(t+Jt===42+42&&li()===47)break;return"/*"+tf(e,Rr-1)+"*"+Jm(t===47?t:Kr())}function pJ(t){for(;!bh(li());)Kr();return tf(t,Rr)}function gJ(t){return _L(Op("",null,null,null,[""],t=AL(t),0,[0],t))}function Op(t,e,n,r,o,i,s,l,a){for(var u=0,c=0,d=s,h=0,f=0,p=0,g=1,m=1,v=1,y=0,b="",w=o,k=i,x=r,S=b;m;)switch(p=y,y=Kr()){case 40:if(p!=108&&In(S,d-1)==58){Uy(S+=Je(Mp(y),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:S+=Mp(y);break;case 9:case 10:case 13:case 32:S+=dJ(p);break;case 92:S+=hJ(Rp()-1,7);continue;case 47:switch(li()){case 42:case 47:Gf(mJ(fJ(Kr(),Rp()),e,n),a);break;default:S+="/"}break;case 123*g:l[u++]=Qo(S)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+c:v==-1&&(S=Je(S,/\f/g,"")),f>0&&Qo(S)-d&&Gf(f>32?mA(S+";",r,n,d-1):mA(Je(S," ","")+";",r,n,d-2),a);break;case 59:S+=";";default:if(Gf(x=gA(S,e,n,u,c,o,l,b,w=[],k=[],d),i),y===123)if(c===0)Op(S,e,x,x,w,i,d,l,k);else switch(h===99&&In(S,3)===110?100:h){case 100:case 108:case 109:case 115:Op(t,x,x,r&&Gf(gA(t,x,x,0,0,o,l,b,o,w=[],d),k),o,k,d,l,r?w:k);break;default:Op(S,x,x,x,[""],k,0,l,k)}}u=c=f=0,g=v=1,b=S="",d=s;break;case 58:d=1+Qo(S),f=p;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&uJ()==125)continue}switch(S+=Jm(y),y*g){case 38:v=c>0?1:(S+="\f",-1);break;case 44:l[u++]=(Qo(S)-1)*v,v=1;break;case 64:li()===45&&(S+=Mp(Kr())),h=li(),c=d=Qo(b=S+=pJ(Rp())),y++;break;case 45:p===45&&Qo(S)==2&&(g=0)}}return i}function gA(t,e,n,r,o,i,s,l,a,u,c){for(var d=o-1,h=o===0?i:[""],f=fx(h),p=0,g=0,m=0;p0?h[v]+" "+y:Je(y,/&\f/g,h[v])))&&(a[m++]=b);return tv(t,e,n,o===0?dx:l,a,u,c)}function mJ(t,e,n){return tv(t,e,n,EL,Jm(cJ()),yh(t,2,-2),0)}function mA(t,e,n,r){return tv(t,e,n,hx,yh(t,0,r),yh(t,r+1,-1),r)}function Tc(t,e){for(var n="",r=fx(t),o=0;o6)switch(In(t,e+1)){case 109:if(In(t,e+4)!==45)break;case 102:return Je(t,/(.+:)(.+)-([^]+)/,"$1"+Qe+"$2-$3$1"+Ig+(In(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Uy(t,"stretch")?RL(Je(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(In(t,e+1)!==115)break;case 6444:switch(In(t,Qo(t)-3-(~Uy(t,"!important")&&10))){case 107:return Je(t,":",":"+Qe)+t;case 101:return Je(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Qe+(In(t,14)===45?"inline-":"")+"box$3$1"+Qe+"$2$3$1"+Un+"$2box$3")+t}break;case 5936:switch(In(t,e+11)){case 114:return Qe+t+Un+Je(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return Qe+t+Un+Je(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return Qe+t+Un+Je(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return Qe+t+Un+t+t}return t}var CJ=function(e,n,r,o){if(e.length>-1&&!e.return)switch(e.type){case hx:e.return=RL(e.value,e.length);break;case SL:return Tc([Nu(e,{value:Je(e.value,"@","@"+Qe)})],o);case dx:if(e.length)return lJ(e.props,function(i){switch(aJ(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Tc([Nu(e,{props:[Je(i,/:(read-\w+)/,":"+Ig+"$1")]})],o);case"::placeholder":return Tc([Nu(e,{props:[Je(i,/:(plac\w+)/,":"+Qe+"input-$1")]}),Nu(e,{props:[Je(i,/:(plac\w+)/,":"+Ig+"$1")]}),Nu(e,{props:[Je(i,/:(plac\w+)/,Un+"input-$1")]})],o)}return""})}},TJ=[CJ],AJ=function(e){var n=e.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var m=g.getAttribute("data-emotion");m.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var o=e.stylisPlugins||TJ,i={},s,l=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var m=g.getAttribute("data-emotion").split(" "),v=1;v=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var yZ={animationIterationCount:1,aspectRatio: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},vZ=/[A-Z]|^ms/g,bZ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Y_=function(t){return t.charCodeAt(1)===45},VT=function(t){return t!=null&&typeof t!="boolean"},x1=D_(function(e){return Y_(e)?e:e.replace(vZ,"-$&").toLowerCase()}),jT=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(bZ,function(n,o,i){return Eo={name:o,styles:i,next:Eo},o})}return yZ[t]!==1&&!Y_(t)&&typeof r=="number"&&r!==0?r+"px":r};function Sd(e,t,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return Eo={name:r.name,styles:r.styles,next:Eo},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)Eo={name:n.name,styles:n.styles,next:Eo},n=n.next;var o=r.styles+";";return o}return EZ(e,t,r)}case"function":{if(e!==void 0){var i=Eo,s=r(e);return Eo=i,Sd(e,t,s)}break}}if(t==null)return r;var a=t[r];return a!==void 0?a:r}function EZ(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o96?TZ:CZ},KT=function(t,r,n){var o;if(r){var i=r.shouldForwardProp;o=t.__emotion_forwardProp&&i?function(s){return t.__emotion_forwardProp(s)&&i(s)}:i}return typeof o!="function"&&n&&(o=t.__emotion_forwardProp),o},OZ=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return K_(r,n,o),SZ(function(){return mZ(r,n,o)}),null},AZ=function e(t,r){var n=t.__emotion_real===t,o=n&&t.__emotion_base||t,i,s;r!==void 0&&(i=r.label,s=r.target);var a=KT(t,r,n),l=a||WT(o),c=!l("as");return function(){var u=arguments,d=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&d.push("label:"+i+";"),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{d.push(u[0][0]);for(var p=u.length,f=1;f=4;++r,o-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(o){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var BJ={animationIterationCount:1,aspectRatio: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},HJ=/[A-Z]|^ms/g,UJ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,$L=function(e){return e.charCodeAt(1)===45},yA=function(e){return e!=null&&typeof e!="boolean"},U1=kL(function(t){return $L(t)?t:t.replace(HJ,"-$&").toLowerCase()}),bA=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(UJ,function(r,o,i){return Jo={name:o,styles:i,next:Jo},o})}return BJ[e]!==1&&!$L(e)&&typeof n=="number"&&n!==0?n+"px":n};function wh(t,e,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Jo={name:n.name,styles:n.styles,next:Jo},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Jo={name:r.name,styles:r.styles,next:Jo},r=r.next;var o=n.styles+";";return o}return WJ(t,e,n)}case"function":{if(t!==void 0){var i=Jo,s=n(t);return Jo=i,wh(t,e,s)}break}}if(e==null)return n;var l=e[n];return l!==void 0?l:n}function WJ(t,e,n){var r="";if(Array.isArray(n))for(var o=0;o96?YJ:XJ},kA=function(e,n,r){var o;if(n){var i=n.shouldForwardProp;o=e.__emotion_forwardProp&&i?function(s){return e.__emotion_forwardProp(s)&&i(s)}:i}return typeof o!="function"&&r&&(o=e.__emotion_forwardProp),o},qJ=function(e){var n=e.cache,r=e.serialized,o=e.isStringTag;return NL(n,r,o),GJ(function(){return zJ(n,r,o)}),null},ZJ=function t(e,n){var r=e.__emotion_real===e,o=r&&e.__emotion_base||e,i,s;n!==void 0&&(i=n.label,s=n.target);var l=kA(e,n,r),a=l||xA(o),u=!a("as");return function(){var c=arguments,d=r&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(i!==void 0&&d.push("label:"+i+";"),c[0]==null||c[0].raw===void 0)d.push.apply(d,c);else{d.push(c[0][0]);for(var h=c.length,f=1;f{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},_Z=["values","unit","step"],IZ=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>N({},r,{[n.key]:n.val}),{})};function MZ(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,o=be(e,_Z),i=IZ(t),s=Object.keys(i);function a(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${r})`}function l(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-n/100}${r})`}function c(p,f){const h=s.indexOf(f);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${r}) and (max-width:${(h!==-1&&typeof t[s[h]]=="number"?t[s[h]]:f)-n/100}${r})`}function u(p){return s.indexOf(p)+1`@media (min-width:${Kb[e]}px)`};function uo(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const i=n.breakpoints||YT;return t.reduce((s,a,l)=>(s[i.up(i.keys[l])]=r(t[l]),s),{})}if(typeof t=="object"){const i=n.breakpoints||YT;return Object.keys(t).reduce((s,a)=>{if(Object.keys(i.values||Kb).indexOf(a)!==-1){const l=i.up(a);s[l]=r(t[a],a)}else{const l=a;s[l]=t[l]}return s},{})}return r(t)}function J_(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((n,o)=>{const i=e.up(o);return n[i]={},n},{}))||{}}function Q_(e,t){return e.reduce((r,n)=>{const o=r[n];return(!o||Object.keys(o).length===0)&&delete r[n],r},t)}function PZ(e,...t){const r=J_(e),n=[r,...t].reduce((o,i)=>hn(o,i),{});return Q_(Object.keys(r),n)}function zZ(e,t){if(typeof e!="object")return{};const r={},n=Object.keys(t);return Array.isArray(e)?n.forEach((o,i)=>{i{e[o]!=null&&(r[o]=!0)}),r}function S1({values:e,breakpoints:t,base:r}){const n=r||zZ(e,t),o=Object.keys(n);if(o.length===0)return e;let i;return o.reduce((s,a,l)=>(Array.isArray(e)?(s[a]=e[l]!=null?e[l]:e[i],i=l):typeof e=="object"?(s[a]=e[a]!=null?e[a]:e[i],i=a):s[a]=e,s),{})}function tg(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,e);if(n!=null)return n}return t.split(".").reduce((n,o)=>n&&n[o]!=null?n[o]:null,e)}function Th(e,t,r,n=r){let o;return typeof e=="function"?o=e(r):Array.isArray(e)?o=e[r]||n:o=tg(e,r)||n,t&&(o=t(o,n,e)),o}function Be(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:o}=e,i=s=>{if(s[t]==null)return null;const a=s[t],l=s.theme,c=tg(l,n)||{};return uo(s,a,d=>{let p=Th(c,o,d);return d===p&&typeof d=="string"&&(p=Th(c,o,`${t}${d==="default"?"":Ge(d)}`,d)),r===!1?p:{[r]:p}})};return i.propTypes={},i.filterProps=[t],i}function $Z(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const BZ={m:"margin",p:"padding"},HZ={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},qT={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},FZ=$Z(e=>{if(e.length>2)if(qT[e])e=qT[e];else return[e];const[t,r]=e.split(""),n=BZ[t],o=HZ[r]||"";return Array.isArray(o)?o.map(i=>n+i):[n+o]}),Yb=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],qb=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Yb,...qb];function op(e,t,r,n){var o;const i=(o=tg(e,t,!1))!=null?o:r;return typeof i=="number"?s=>typeof s=="string"?s:i*s:Array.isArray(i)?s=>typeof s=="string"?s:i[s]:typeof i=="function"?i:()=>{}}function Xb(e){return op(e,"spacing",8)}function ba(e,t){if(typeof t=="string"||t==null)return t;const r=Math.abs(t),n=e(r);return t>=0?n:typeof n=="number"?-n:`-${n}`}function UZ(e,t){return r=>e.reduce((n,o)=>(n[o]=ba(t,r),n),{})}function VZ(e,t,r,n){if(t.indexOf(r)===-1)return null;const o=FZ(r),i=UZ(o,n),s=e[r];return uo(e,s,i)}function eI(e,t){const r=Xb(e.theme);return Object.keys(e).map(n=>VZ(e,t,n,r)).reduce(zu,{})}function yt(e){return eI(e,Yb)}yt.propTypes={};yt.filterProps=Yb;function vt(e){return eI(e,qb)}vt.propTypes={};vt.filterProps=qb;function jZ(e=8){if(e.mui)return e;const t=Xb({spacing:e}),r=(...n)=>(n.length===0?[1]:n).map(i=>{const s=t(i);return typeof s=="number"?`${s}px`:s}).join(" ");return r.mui=!0,r}function rg(...e){const t=e.reduce((n,o)=>(o.filterProps.forEach(i=>{n[i]=o}),n),{}),r=n=>Object.keys(n).reduce((o,i)=>t[i]?zu(o,t[i](n)):o,{});return r.propTypes={},r.filterProps=e.reduce((n,o)=>n.concat(o.filterProps),[]),r}function So(e){return typeof e!="number"?e:`${e}px solid`}const GZ=Be({prop:"border",themeKey:"borders",transform:So}),WZ=Be({prop:"borderTop",themeKey:"borders",transform:So}),KZ=Be({prop:"borderRight",themeKey:"borders",transform:So}),YZ=Be({prop:"borderBottom",themeKey:"borders",transform:So}),qZ=Be({prop:"borderLeft",themeKey:"borders",transform:So}),XZ=Be({prop:"borderColor",themeKey:"palette"}),ZZ=Be({prop:"borderTopColor",themeKey:"palette"}),JZ=Be({prop:"borderRightColor",themeKey:"palette"}),QZ=Be({prop:"borderBottomColor",themeKey:"palette"}),eJ=Be({prop:"borderLeftColor",themeKey:"palette"}),ng=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=op(e.theme,"shape.borderRadius",4),r=n=>({borderRadius:ba(t,n)});return uo(e,e.borderRadius,r)}return null};ng.propTypes={};ng.filterProps=["borderRadius"];rg(GZ,WZ,KZ,YZ,qZ,XZ,ZZ,JZ,QZ,eJ,ng);const og=e=>{if(e.gap!==void 0&&e.gap!==null){const t=op(e.theme,"spacing",8),r=n=>({gap:ba(t,n)});return uo(e,e.gap,r)}return null};og.propTypes={};og.filterProps=["gap"];const ig=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=op(e.theme,"spacing",8),r=n=>({columnGap:ba(t,n)});return uo(e,e.columnGap,r)}return null};ig.propTypes={};ig.filterProps=["columnGap"];const sg=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=op(e.theme,"spacing",8),r=n=>({rowGap:ba(t,n)});return uo(e,e.rowGap,r)}return null};sg.propTypes={};sg.filterProps=["rowGap"];const tJ=Be({prop:"gridColumn"}),rJ=Be({prop:"gridRow"}),nJ=Be({prop:"gridAutoFlow"}),oJ=Be({prop:"gridAutoColumns"}),iJ=Be({prop:"gridAutoRows"}),sJ=Be({prop:"gridTemplateColumns"}),aJ=Be({prop:"gridTemplateRows"}),lJ=Be({prop:"gridTemplateAreas"}),cJ=Be({prop:"gridArea"});rg(og,ig,sg,tJ,rJ,nJ,oJ,iJ,sJ,aJ,lJ,cJ);function _l(e,t){return t==="grey"?t:e}const uJ=Be({prop:"color",themeKey:"palette",transform:_l}),dJ=Be({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:_l}),pJ=Be({prop:"backgroundColor",themeKey:"palette",transform:_l});rg(uJ,dJ,pJ);function cn(e){return e<=1&&e!==0?`${e*100}%`:e}const fJ=Be({prop:"width",transform:cn}),Zb=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var n,o;const i=((n=e.theme)==null||(n=n.breakpoints)==null||(n=n.values)==null?void 0:n[r])||Kb[r];return i?((o=e.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:cn(r)}};return uo(e,e.maxWidth,t)}return null};Zb.filterProps=["maxWidth"];const hJ=Be({prop:"minWidth",transform:cn}),mJ=Be({prop:"height",transform:cn}),gJ=Be({prop:"maxHeight",transform:cn}),yJ=Be({prop:"minHeight",transform:cn});Be({prop:"size",cssProperty:"width",transform:cn});Be({prop:"size",cssProperty:"height",transform:cn});const vJ=Be({prop:"boxSizing"});rg(fJ,Zb,hJ,mJ,gJ,yJ,vJ);const bJ={border:{themeKey:"borders",transform:So},borderTop:{themeKey:"borders",transform:So},borderRight:{themeKey:"borders",transform:So},borderBottom:{themeKey:"borders",transform:So},borderLeft:{themeKey:"borders",transform:So},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:ng},color:{themeKey:"palette",transform:_l},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:_l},backgroundColor:{themeKey:"palette",transform:_l},p:{style:vt},pt:{style:vt},pr:{style:vt},pb:{style:vt},pl:{style:vt},px:{style:vt},py:{style:vt},padding:{style:vt},paddingTop:{style:vt},paddingRight:{style:vt},paddingBottom:{style:vt},paddingLeft:{style:vt},paddingX:{style:vt},paddingY:{style:vt},paddingInline:{style:vt},paddingInlineStart:{style:vt},paddingInlineEnd:{style:vt},paddingBlock:{style:vt},paddingBlockStart:{style:vt},paddingBlockEnd:{style:vt},m:{style:yt},mt:{style:yt},mr:{style:yt},mb:{style:yt},ml:{style:yt},mx:{style:yt},my:{style:yt},margin:{style:yt},marginTop:{style:yt},marginRight:{style:yt},marginBottom:{style:yt},marginLeft:{style:yt},marginX:{style:yt},marginY:{style:yt},marginInline:{style:yt},marginInlineStart:{style:yt},marginInlineEnd:{style:yt},marginBlock:{style:yt},marginBlockStart:{style:yt},marginBlockEnd:{style:yt},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:og},rowGap:{style:sg},columnGap:{style:ig},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:cn},maxWidth:{style:Zb},minWidth:{transform:cn},height:{transform:cn},maxHeight:{transform:cn},minHeight:{transform:cn},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},ag=bJ;function EJ(...e){const t=e.reduce((n,o)=>n.concat(Object.keys(o)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function kJ(e,t){return typeof e=="function"?e(t):e}function xJ(){function e(r,n,o,i){const s={[r]:n,theme:o},a=i[r];if(!a)return{[r]:n};const{cssProperty:l=r,themeKey:c,transform:u,style:d}=a;if(n==null)return null;if(c==="typography"&&n==="inherit")return{[r]:n};const p=tg(o,c)||{};return d?d(s):uo(s,n,h=>{let m=Th(p,u,h);return h===m&&typeof h=="string"&&(m=Th(p,u,`${r}${h==="default"?"":Ge(h)}`,h)),l===!1?m:{[l]:m}})}function t(r){var n;const{sx:o,theme:i={}}=r||{};if(!o)return null;const s=(n=i.unstable_sxConfig)!=null?n:ag;function a(l){let c=l;if(typeof l=="function")c=l(i);else if(typeof l!="object")return l;if(!c)return null;const u=J_(i.breakpoints),d=Object.keys(u);let p=u;return Object.keys(c).forEach(f=>{const h=kJ(c[f],i);if(h!=null)if(typeof h=="object")if(s[f])p=zu(p,e(f,h,i,s));else{const m=uo({theme:i},h,b=>({[f]:b}));EJ(m,h)?p[f]=t({sx:h,theme:i}):p=zu(p,m)}else p=zu(p,e(f,h,i,s))}),Q_(d,p)}return Array.isArray(o)?o.map(a):a(o)}return t}const tI=xJ();tI.filterProps=["sx"];const lg=tI,SJ=["breakpoints","palette","spacing","shape"];function cg(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:i={}}=e,s=be(e,SJ),a=MZ(r),l=jZ(o);let c=hn({breakpoints:a,direction:"ltr",components:{},palette:N({mode:"light"},n),spacing:l,shape:N({},DZ,i)},s);return c=t.reduce((u,d)=>hn(u,d),c),c.unstable_sxConfig=N({},ag,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(d){return lg({sx:d,theme:this})},c}function wJ(e){return Object.keys(e).length===0}function Jb(e=null){const t=S.useContext(Gb);return!t||wJ(t)?e:t}const TJ=cg();function Qb(e=TJ){return Jb(e)}const CJ=["sx"],OJ=e=>{var t,r;const n={systemProps:{},otherProps:{}},o=(t=e==null||(r=e.theme)==null?void 0:r.unstable_sxConfig)!=null?t:ag;return Object.keys(e).forEach(i=>{o[i]?n.systemProps[i]=e[i]:n.otherProps[i]=e[i]}),n};function eE(e){const{sx:t}=e,r=be(e,CJ),{systemProps:n,otherProps:o}=OJ(r);let i;return Array.isArray(t)?i=[n,...t]:typeof t=="function"?i=(...s)=>{const a=t(...s);return Xo(a)?N({},n,a):n}:i=N({},n,t),N({},o,{sx:i})}function rI(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ta!=="theme"&&a!=="sx"&&a!=="as"})(lg);return S.forwardRef(function(l,c){const u=Qb(r),d=eE(l),{className:p,component:f="div"}=d,h=be(d,AJ);return A.jsx(i,N({as:f,ref:c,className:Oe(p,o?o(n):n),theme:t&&u[t]||u},h))})}const RJ=["variant"];function XT(e){return e.length===0}function nI(e){const{variant:t}=e,r=be(e,RJ);let n=t||"";return Object.keys(r).sort().forEach(o=>{o==="color"?n+=XT(n)?e[o]:Ge(e[o]):n+=`${XT(n)?o:Ge(o)}${Ge(e[o].toString())}`}),n}const _J=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function IJ(e){return Object.keys(e).length===0}function MJ(e){return typeof e=="string"&&e.charCodeAt(0)>96}const LJ=(e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null,Ch=e=>{const t={};return e&&e.forEach(r=>{const n=nI(r.props);t[n]=r.style}),t},DJ=(e,t)=>{let r=[];return t&&t.components&&t.components[e]&&t.components[e].variants&&(r=t.components[e].variants),Ch(r)},Oh=(e,t,r)=>{const{ownerState:n={}}=e,o=[];return r&&r.forEach(i=>{let s=!0;Object.keys(i.props).forEach(a=>{n[a]!==i.props[a]&&e[a]!==i.props[a]&&(s=!1)}),s&&o.push(t[nI(i.props)])}),o},PJ=(e,t,r,n)=>{var o;const i=r==null||(o=r.components)==null||(o=o[n])==null?void 0:o.variants;return Oh(e,t,i)};function Sf(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const zJ=cg(),$J=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function wf({defaultTheme:e,theme:t,themeId:r}){return IJ(t)?e:t[r]||t}function BJ(e){return e?(t,r)=>r[e]:null}const ZT=({styledArg:e,props:t,defaultTheme:r,themeId:n})=>{const o=e(N({},t,{theme:wf(N({},t,{defaultTheme:r,themeId:n}))}));let i;if(o&&o.variants&&(i=o.variants,delete o.variants),i){const s=Oh(t,Ch(i),i);return[o,...s]}return o};function oI(e={}){const{themeId:t,defaultTheme:r=zJ,rootShouldForwardProp:n=Sf,slotShouldForwardProp:o=Sf}=e,i=s=>lg(N({},s,{theme:wf(N({},s,{defaultTheme:r,themeId:t}))}));return i.__mui_systemSx=!0,(s,a={})=>{RZ(s,E=>E.filter(k=>!(k!=null&&k.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:d,overridesResolver:p=BJ($J(c))}=a,f=be(a,_J),h=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,m=d||!1;let b,y=Sf;c==="Root"||c==="root"?y=n:c?y=o:MJ(s)&&(y=void 0);const g=Z_(s,N({shouldForwardProp:y,label:b},f)),v=(E,...k)=>{const x=k?k.map(O=>{if(typeof O=="function"&&O.__emotion_real!==O)return _=>ZT({styledArg:O,props:_,defaultTheme:r,themeId:t});if(Xo(O)){let _=O,P;return O&&O.variants&&(P=O.variants,delete _.variants,_=$=>{let B=O;return Oh($,Ch(P),P).forEach(z=>{B=hn(B,z)}),B}),_}return O}):[];let w=E;if(Xo(E)){let O;E&&E.variants&&(O=E.variants,delete w.variants,w=_=>{let P=E;return Oh(_,Ch(O),O).forEach(B=>{P=hn(P,B)}),P})}else typeof E=="function"&&E.__emotion_real!==E&&(w=O=>ZT({styledArg:E,props:O,defaultTheme:r,themeId:t}));l&&p&&x.push(O=>{const _=wf(N({},O,{defaultTheme:r,themeId:t})),P=LJ(l,_);if(P){const $={};return Object.entries(P).forEach(([B,F])=>{$[B]=typeof F=="function"?F(N({},O,{theme:_})):F}),p(O,$)}return null}),l&&!h&&x.push(O=>{const _=wf(N({},O,{defaultTheme:r,themeId:t}));return PJ(O,DJ(l,_),_,l)}),m||x.push(i);const C=x.length-k.length;if(Array.isArray(E)&&C>0){const O=new Array(C).fill("");w=[...E,...O],w.raw=[...E.raw,...O]}const T=g(w,...x);return s.muiName&&(T.muiName=s.muiName),T};return g.withConfig&&(v.withConfig=g.withConfig),v}}const HJ=oI(),FJ=HJ;function UJ(e){const{theme:t,name:r,props:n}=e;return!t||!t.components||!t.components[r]||!t.components[r].defaultProps?n:M_(t.components[r].defaultProps,n)}function iI({props:e,name:t,defaultTheme:r,themeId:n}){let o=Qb(r);return n&&(o=o[n]||o),UJ({theme:o,name:t,props:e})}function tE(e,t=0,r=1){return Math.min(Math.max(t,e),r)}function VJ(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),r?`rgb${r.length===4?"a":""}(${r.map((n,o)=>o<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function Ea(e){if(e.type)return e;if(e.charAt(0)==="#")return Ea(VJ(e));const t=e.indexOf("("),r=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(r)===-1)throw new Error(Jl(9,e));let n=e.substring(t+1,e.length-1),o;if(r==="color"){if(n=n.split(" "),o=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o)===-1)throw new Error(Jl(10,o))}else n=n.split(",");return n=n.map(i=>parseFloat(i)),{type:r,values:n,colorSpace:o}}function ug(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.indexOf("rgb")!==-1?n=n.map((o,i)=>i<3?parseInt(o,10):o):t.indexOf("hsl")!==-1&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.indexOf("color")!==-1?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function jJ(e){e=Ea(e);const{values:t}=e,r=t[0],n=t[1]/100,o=t[2]/100,i=n*Math.min(o,1-o),s=(c,u=(c+r/30)%12)=>o-i*Math.max(Math.min(u-3,9-u,1),-1);let a="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(a+="a",l.push(t[3])),ug({type:a,values:l})}function JT(e){e=Ea(e);let t=e.type==="hsl"||e.type==="hsla"?Ea(jJ(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function GJ(e,t){const r=JT(e),n=JT(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function Br(e,t){return e=Ea(e),t=tE(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,ug(e)}function WJ(e,t){if(e=Ea(e),t=tE(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)e.values[r]*=1-t;return ug(e)}function KJ(e,t){if(e=Ea(e),t=tE(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return ug(e)}const YJ=S.createContext(null),sI=YJ;function aI(){return S.useContext(sI)}const qJ=typeof Symbol=="function"&&Symbol.for,XJ=qJ?Symbol.for("mui.nested"):"__THEME_NESTED__";function ZJ(e,t){return typeof t=="function"?t(e):N({},e,t)}function JJ(e){const{children:t,theme:r}=e,n=aI(),o=S.useMemo(()=>{const i=n===null?r:ZJ(n,r);return i!=null&&(i[XJ]=n!==null),i},[r,n]);return A.jsx(sI.Provider,{value:o,children:t})}const QT={};function e2(e,t,r,n=!1){return S.useMemo(()=>{const o=e&&t[e]||t;if(typeof r=="function"){const i=r(o),s=e?N({},t,{[e]:i}):i;return n?()=>s:s}return e?N({},t,{[e]:r}):N({},t,r)},[e,t,r,n])}function QJ(e){const{children:t,theme:r,themeId:n}=e,o=Jb(QT),i=aI()||QT,s=e2(n,o,r),a=e2(n,i,r,!0);return A.jsx(JJ,{theme:a,children:A.jsx(Gb.Provider,{value:s,children:t})})}const eQ=["component","direction","spacing","divider","children","className","useFlexGap"],tQ=cg(),rQ=FJ("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function nQ(e){return iI({props:e,name:"MuiStack",defaultTheme:tQ})}function oQ(e,t){const r=S.Children.toArray(e).filter(Boolean);return r.reduce((n,o,i)=>(n.push(o),i({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],sQ=({ownerState:e,theme:t})=>{let r=N({display:"flex",flexDirection:"column"},uo({theme:t},S1({values:e.direction,breakpoints:t.breakpoints.values}),n=>({flexDirection:n})));if(e.spacing){const n=Xb(t),o=Object.keys(t.breakpoints.values).reduce((l,c)=>((typeof e.spacing=="object"&&e.spacing[c]!=null||typeof e.direction=="object"&&e.direction[c]!=null)&&(l[c]=!0),l),{}),i=S1({values:e.direction,base:o}),s=S1({values:e.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((l,c,u)=>{if(!i[l]){const p=c>0?i[u[c-1]]:"column";i[l]=p}}),r=hn(r,uo({theme:t},s,(l,c)=>e.useFlexGap?{gap:ba(n,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${iQ(c?i[c]:e.direction)}`]:ba(n,l)}}))}return r=PZ(t.breakpoints,r),r};function aQ(e={}){const{createStyledComponent:t=rQ,useThemeProps:r=nQ,componentName:n="MuiStack"}=e,o=()=>ir({root:["root"]},l=>Kt(n,l),{}),i=t(sQ);return S.forwardRef(function(l,c){const u=r(l),d=eE(u),{component:p="div",direction:f="column",spacing:h=0,divider:m,children:b,className:y,useFlexGap:g=!1}=d,v=be(d,eQ),E={direction:f,spacing:h,useFlexGap:g},k=o();return A.jsx(i,N({as:p,ownerState:E,ref:c,className:Oe(k.root,y)},v,{children:m?oQ(b,m):b}))})}function lQ(e,t){return N({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}const cQ=["mode","contrastThreshold","tonalOffset"],t2={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:bd.white,default:bd.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},w1={text:{primary:bd.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:bd.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function r2(e,t,r,n){const o=n.light||n,i=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=KJ(e.main,o):t==="dark"&&(e.dark=WJ(e.main,i)))}function uQ(e="light"){return e==="dark"?{main:Ga[200],light:Ga[50],dark:Ga[400]}:{main:Ga[700],light:Ga[400],dark:Ga[800]}}function dQ(e="light"){return e==="dark"?{main:ja[200],light:ja[50],dark:ja[400]}:{main:ja[500],light:ja[300],dark:ja[700]}}function pQ(e="light"){return e==="dark"?{main:Va[500],light:Va[300],dark:Va[700]}:{main:Va[700],light:Va[400],dark:Va[800]}}function fQ(e="light"){return e==="dark"?{main:Wa[400],light:Wa[300],dark:Wa[700]}:{main:Wa[700],light:Wa[500],dark:Wa[900]}}function hQ(e="light"){return e==="dark"?{main:Ka[400],light:Ka[300],dark:Ka[700]}:{main:Ka[800],light:Ka[500],dark:Ka[900]}}function mQ(e="light"){return e==="dark"?{main:Pc[400],light:Pc[300],dark:Pc[700]}:{main:"#ed6c02",light:Pc[500],dark:Pc[900]}}function gQ(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2}=e,o=be(e,cQ),i=e.primary||uQ(t),s=e.secondary||dQ(t),a=e.error||pQ(t),l=e.info||fQ(t),c=e.success||hQ(t),u=e.warning||mQ(t);function d(m){return GJ(m,w1.text.primary)>=r?w1.text.primary:t2.text.primary}const p=({color:m,name:b,mainShade:y=500,lightShade:g=300,darkShade:v=700})=>{if(m=N({},m),!m.main&&m[y]&&(m.main=m[y]),!m.hasOwnProperty("main"))throw new Error(Jl(11,b?` (${b})`:"",y));if(typeof m.main!="string")throw new Error(Jl(12,b?` (${b})`:"",JSON.stringify(m.main)));return r2(m,"light",g,n),r2(m,"dark",v,n),m.contrastText||(m.contrastText=d(m.main)),m},f={dark:w1,light:t2};return hn(N({common:N({},bd),mode:t,primary:p({color:i,name:"primary"}),secondary:p({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:a,name:"error"}),warning:p({color:u,name:"warning"}),info:p({color:l,name:"info"}),success:p({color:c,name:"success"}),grey:uX,contrastThreshold:r,getContrastText:d,augmentColor:p,tonalOffset:n},f[t]),o)}const yQ=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function vQ(e){return Math.round(e*1e5)/1e5}const n2={textTransform:"uppercase"},o2='"Roboto", "Helvetica", "Arial", sans-serif';function bQ(e,t){const r=typeof t=="function"?t(e):t,{fontFamily:n=o2,fontSize:o=14,fontWeightLight:i=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:d}=r,p=be(r,yQ),f=o/14,h=d||(y=>`${y/c*f}rem`),m=(y,g,v,E,k)=>N({fontFamily:n,fontWeight:y,fontSize:h(g),lineHeight:v},n===o2?{letterSpacing:`${vQ(E/g)}em`}:{},k,u),b={h1:m(i,96,1.167,-1.5),h2:m(i,60,1.2,-.5),h3:m(s,48,1.167,0),h4:m(s,34,1.235,.25),h5:m(s,24,1.334,0),h6:m(a,20,1.6,.15),subtitle1:m(s,16,1.75,.15),subtitle2:m(a,14,1.57,.1),body1:m(s,16,1.5,.15),body2:m(s,14,1.43,.15),button:m(a,14,1.75,.4,n2),caption:m(s,12,1.66,.4),overline:m(s,12,2.66,1,n2),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return hn(N({htmlFontSize:c,pxToRem:h,fontFamily:n,fontSize:o,fontWeightLight:i,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:l},b),p,{clone:!1})}const EQ=.2,kQ=.14,xQ=.12;function st(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${EQ})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${kQ})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${xQ})`].join(",")}const SQ=["none",st(0,2,1,-1,0,1,1,0,0,1,3,0),st(0,3,1,-2,0,2,2,0,0,1,5,0),st(0,3,3,-2,0,3,4,0,0,1,8,0),st(0,2,4,-1,0,4,5,0,0,1,10,0),st(0,3,5,-1,0,5,8,0,0,1,14,0),st(0,3,5,-1,0,6,10,0,0,1,18,0),st(0,4,5,-2,0,7,10,1,0,2,16,1),st(0,5,5,-3,0,8,10,1,0,3,14,2),st(0,5,6,-3,0,9,12,1,0,3,16,2),st(0,6,6,-3,0,10,14,1,0,4,18,3),st(0,6,7,-4,0,11,15,1,0,4,20,3),st(0,7,8,-4,0,12,17,2,0,5,22,4),st(0,7,8,-4,0,13,19,2,0,5,24,4),st(0,7,9,-4,0,14,21,2,0,5,26,4),st(0,8,9,-5,0,15,22,2,0,6,28,5),st(0,8,10,-5,0,16,24,2,0,6,30,5),st(0,8,11,-5,0,17,26,2,0,6,32,5),st(0,9,11,-5,0,18,28,2,0,7,34,6),st(0,9,12,-6,0,19,29,2,0,7,36,6),st(0,10,13,-6,0,20,31,3,0,8,38,7),st(0,10,13,-6,0,21,33,3,0,8,40,7),st(0,10,14,-6,0,22,35,3,0,8,42,7),st(0,11,14,-7,0,23,36,3,0,9,44,8),st(0,11,15,-7,0,24,38,3,0,9,46,8)],wQ=SQ,TQ=["duration","easing","delay"],CQ={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},OQ={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function i2(e){return`${Math.round(e)}ms`}function AQ(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function NQ(e){const t=N({},CQ,e.easing),r=N({},OQ,e.duration);return N({getAutoHeightDuration:AQ,create:(o=["all"],i={})=>{const{duration:s=r.standard,easing:a=t.easeInOut,delay:l=0}=i;return be(i,TQ),(Array.isArray(o)?o:[o]).map(c=>`${c} ${typeof s=="string"?s:i2(s)} ${a} ${typeof l=="string"?l:i2(l)}`).join(",")}},e,{easing:t,duration:r})}const RQ={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},_Q=RQ,IQ=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function rE(e={},...t){const{mixins:r={},palette:n={},transitions:o={},typography:i={}}=e,s=be(e,IQ);if(e.vars)throw new Error(Jl(18));const a=gQ(n),l=cg(e);let c=hn(l,{mixins:lQ(l.breakpoints,r),palette:a,shadows:wQ.slice(),typography:bQ(a,i),transitions:NQ(o),zIndex:N({},_Q)});return c=hn(c,s),c=t.reduce((u,d)=>hn(u,d),c),c.unstable_sxConfig=N({},ag,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(d){return lg({sx:d,theme:this})},c}const MQ=rE(),nE=MQ;function dg(){const e=Qb(nE);return e[Ql]||e}function Xt({props:e,name:t}){return iI({props:e,name:t,defaultTheme:nE,themeId:Ql})}const oE=e=>Sf(e)&&e!=="classes",LQ=oI({themeId:Ql,defaultTheme:nE,rootShouldForwardProp:oE}),et=LQ,DQ=["theme"];function PQ(e){let{theme:t}=e,r=be(e,DQ);const n=t[Ql];return A.jsx(QJ,N({},r,{themeId:n?Ql:void 0,theme:n||t}))}const zQ=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},s2=zQ;function ky(e,t){return ky=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},ky(e,t)}function lI(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ky(e,t)}const a2={disabled:!1},Ah=D.createContext(null);var $Q=function(t){return t.scrollTop},Eu="unmounted",Ps="exited",zs="entering",ol="entered",xy="exiting",vi=function(e){lI(t,e);function t(n,o){var i;i=e.call(this,n,o)||this;var s=o,a=s&&!s.isMounting?n.enter:n.appear,l;return i.appearStatus=null,n.in?a?(l=Ps,i.appearStatus=zs):l=ol:n.unmountOnExit||n.mountOnEnter?l=Eu:l=Ps,i.state={status:l},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var s=o.in;return s&&i.status===Eu?{status:Ps}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(o){var i=null;if(o!==this.props){var s=this.state.status;this.props.in?s!==zs&&s!==ol&&(i=zs):(s===zs||s===ol)&&(i=xy)}this.updateStatus(!1,i)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var o=this.props.timeout,i,s,a;return i=s=a=o,o!=null&&typeof o!="number"&&(i=o.exit,s=o.enter,a=o.appear!==void 0?o.appear:s),{exit:i,enter:s,appear:a}},r.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===zs){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Pp.findDOMNode(this);s&&$Q(s)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ps&&this.setState({status:Eu})},r.performEnter=function(o){var i=this,s=this.props.enter,a=this.context?this.context.isMounting:o,l=this.props.nodeRef?[a]:[Pp.findDOMNode(this),a],c=l[0],u=l[1],d=this.getTimeouts(),p=a?d.appear:d.enter;if(!o&&!s||a2.disabled){this.safeSetState({status:ol},function(){i.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:zs},function(){i.props.onEntering(c,u),i.onTransitionEnd(p,function(){i.safeSetState({status:ol},function(){i.props.onEntered(c,u)})})})},r.performExit=function(){var o=this,i=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:Pp.findDOMNode(this);if(!i||a2.disabled){this.safeSetState({status:Ps},function(){o.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:xy},function(){o.props.onExiting(a),o.onTransitionEnd(s.exit,function(){o.safeSetState({status:Ps},function(){o.props.onExited(a)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},r.setNextCallback=function(o){var i=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,i.nextCallback=null,o(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},r.onTransitionEnd=function(o,i){this.setNextCallback(i);var s=this.props.nodeRef?this.props.nodeRef.current:Pp.findDOMNode(this),a=o==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}o!=null&&setTimeout(this.nextCallback,o)},r.render=function(){var o=this.state.status;if(o===Eu)return null;var i=this.props,s=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var a=be(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return D.createElement(Ah.Provider,{value:null},typeof s=="function"?s(o,a):D.cloneElement(D.Children.only(s),a))},t}(D.Component);vi.contextType=Ah;vi.propTypes={};function Ya(){}vi.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ya,onEntering:Ya,onEntered:Ya,onExit:Ya,onExiting:Ya,onExited:Ya};vi.UNMOUNTED=Eu;vi.EXITED=Ps;vi.ENTERING=zs;vi.ENTERED=ol;vi.EXITING=xy;const cI=vi;function BQ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iE(e,t){var r=function(i){return t&&S.isValidElement(i)?t(i):i},n=Object.create(null);return e&&S.Children.map(e,function(o){return o}).forEach(function(o){n[o.key]=r(o)}),n}function HQ(e,t){e=e||{},t=t||{};function r(u){return u in t?t[u]:e[u]}var n=Object.create(null),o=[];for(var i in e)i in t?o.length&&(n[i]=o,o=[]):o.push(i);var s,a={};for(var l in t){if(n[l])for(s=0;se.scrollTop;function Nh(e,t){var r,n;const{timeout:o,easing:i,style:s={}}=e;return{duration:(r=s.transitionDuration)!=null?r:typeof o=="number"?o:o[t.mode]||0,easing:(n=s.transitionTimingFunction)!=null?n:typeof i=="object"?i[t.mode]:i,delay:s.transitionDelay}}function WQ(e){return Kt("MuiPaper",e)}Yt("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const KQ=["className","component","elevation","square","variant"],YQ=e=>{const{square:t,elevation:r,variant:n,classes:o}=e,i={root:["root",n,!t&&"rounded",n==="elevation"&&`elevation${r}`]};return ir(i,WQ,o)},qQ=et("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],!r.square&&t.rounded,r.variant==="elevation"&&t[`elevation${r.elevation}`]]}})(({theme:e,ownerState:t})=>{var r;return N({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&N({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${Br("#fff",s2(t.elevation))}, ${Br("#fff",s2(t.elevation))})`},e.vars&&{backgroundImage:(r=e.vars.overlays)==null?void 0:r[t.elevation]}))}),XQ=S.forwardRef(function(t,r){const n=Xt({props:t,name:"MuiPaper"}),{className:o,component:i="div",elevation:s=1,square:a=!1,variant:l="elevation"}=n,c=be(n,KQ),u=N({},n,{component:i,elevation:s,square:a,variant:l}),d=YQ(u);return A.jsx(qQ,N({as:i,ownerState:u,className:Oe(d.root,o),ref:r},c))}),ZQ=XQ;function JQ(e){const{className:t,classes:r,pulsate:n=!1,rippleX:o,rippleY:i,rippleSize:s,in:a,onExited:l,timeout:c}=e,[u,d]=S.useState(!1),p=Oe(t,r.ripple,r.rippleVisible,n&&r.ripplePulsate),f={width:s,height:s,top:-(s/2)+i,left:-(s/2)+o},h=Oe(r.child,u&&r.childLeaving,n&&r.childPulsate);return!a&&!u&&d(!0),S.useEffect(()=>{if(!a&&l!=null){const m=setTimeout(l,c);return()=>{clearTimeout(m)}}},[l,a,c]),A.jsx("span",{className:p,style:f,children:A.jsx("span",{className:h})})}const QQ=Yt("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),On=QQ,eee=["center","classes","className"];let pg=e=>e,l2,c2,u2,d2;const Sy=550,tee=80,ree=Wb(l2||(l2=pg` + */function zL(t,e){return Lg(t,e)}const JJ=(t,e)=>{Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))},eee=["values","unit","step"],tee=t=>{const e=Object.keys(t).map(n=>({key:n,val:t[n]}))||[];return e.sort((n,r)=>n.val-r.val),e.reduce((n,r)=>K({},n,{[r.key]:r.val}),{})};function nee(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=t,o=Fe(t,eee),i=tee(e),s=Object.keys(i);function l(h){return`@media (min-width:${typeof e[h]=="number"?e[h]:h}${n})`}function a(h){return`@media (max-width:${(typeof e[h]=="number"?e[h]:h)-r/100}${n})`}function u(h,f){const p=s.indexOf(f);return`@media (min-width:${typeof e[h]=="number"?e[h]:h}${n}) and (max-width:${(p!==-1&&typeof e[s[p]]=="number"?e[s[p]]:f)-r/100}${n})`}function c(h){return s.indexOf(h)+1`@media (min-width:${bx[t]}px)`};function Vo(t,e,n){const r=t.theme||{};if(Array.isArray(e)){const i=r.breakpoints||EA;return e.reduce((s,l,a)=>(s[i.up(i.keys[a])]=n(e[a]),s),{})}if(typeof e=="object"){const i=r.breakpoints||EA;return Object.keys(e).reduce((s,l)=>{if(Object.keys(i.values||bx).indexOf(l)!==-1){const a=i.up(l);s[a]=n(e[l],l)}else{const a=l;s[a]=e[a]}return s},{})}return n(e)}function FL(t={}){var e;return((e=t.keys)==null?void 0:e.reduce((r,o)=>{const i=t.up(o);return r[i]={},r},{}))||{}}function BL(t,e){return t.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},e)}function iee(t,...e){const n=FL(t),r=[n,...e].reduce((o,i)=>Gr(o,i),{});return BL(Object.keys(n),r)}function see(t,e){if(typeof t!="object")return{};const n={},r=Object.keys(e);return Array.isArray(t)?r.forEach((o,i)=>{i{t[o]!=null&&(n[o]=!0)}),n}function W1({values:t,breakpoints:e,base:n}){const r=n||see(t,e),o=Object.keys(r);if(o.length===0)return t;let i;return o.reduce((s,l,a)=>(Array.isArray(t)?(s[l]=t[a]!=null?t[a]:t[i],i=a):typeof t=="object"?(s[l]=t[l]!=null?t[l]:t[i],i=l):s[l]=t,s),{})}function hv(t,e,n=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&n){const r=`vars.${e}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,t);if(r!=null)return r}return e.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,t)}function Ng(t,e,n,r=n){let o;return typeof t=="function"?o=t(n):Array.isArray(t)?o=t[n]||r:o=hv(t,n)||r,e&&(o=e(o,r,t)),o}function lt(t){const{prop:e,cssProperty:n=t.prop,themeKey:r,transform:o}=t,i=s=>{if(s[e]==null)return null;const l=s[e],a=s.theme,u=hv(a,r)||{};return Vo(s,l,d=>{let h=Ng(u,o,d);return d===h&&typeof d=="string"&&(h=Ng(u,o,`${e}${d==="default"?"":pt(d)}`,d)),n===!1?h:{[n]:h}})};return i.propTypes={},i.filterProps=[e],i}function aee(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const lee={m:"margin",p:"padding"},cee={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},SA={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},uee=aee(t=>{if(t.length>2)if(SA[t])t=SA[t];else return[t];const[e,n]=t.split(""),r=lee[e],o=cee[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),wx=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],xx=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...wx,...xx];function nf(t,e,n,r){var o;const i=(o=hv(t,e,!1))!=null?o:n;return typeof i=="number"?s=>typeof s=="string"?s:i*s:Array.isArray(i)?s=>typeof s=="string"?s:i[s]:typeof i=="function"?i:()=>{}}function kx(t){return nf(t,"spacing",8)}function al(t,e){if(typeof e=="string"||e==null)return e;const n=Math.abs(e),r=t(n);return e>=0?r:typeof r=="number"?-r:`-${r}`}function dee(t,e){return n=>t.reduce((r,o)=>(r[o]=al(e,n),r),{})}function hee(t,e,n,r){if(e.indexOf(n)===-1)return null;const o=uee(n),i=dee(o,r),s=t[n];return Vo(t,s,i)}function HL(t,e){const n=kx(t.theme);return Object.keys(t).map(r=>hee(t,e,r,n)).reduce(Nd,{})}function Wt(t){return HL(t,wx)}Wt.propTypes={};Wt.filterProps=wx;function Vt(t){return HL(t,xx)}Vt.propTypes={};Vt.filterProps=xx;function fee(t=8){if(t.mui)return t;const e=kx({spacing:t}),n=(...r)=>(r.length===0?[1]:r).map(i=>{const s=e(i);return typeof s=="number"?`${s}px`:s}).join(" ");return n.mui=!0,n}function fv(...t){const e=t.reduce((r,o)=>(o.filterProps.forEach(i=>{r[i]=o}),r),{}),n=r=>Object.keys(r).reduce((o,i)=>e[i]?Nd(o,e[i](r)):o,{});return n.propTypes={},n.filterProps=t.reduce((r,o)=>r.concat(o.filterProps),[]),n}function ni(t){return typeof t!="number"?t:`${t}px solid`}const pee=lt({prop:"border",themeKey:"borders",transform:ni}),gee=lt({prop:"borderTop",themeKey:"borders",transform:ni}),mee=lt({prop:"borderRight",themeKey:"borders",transform:ni}),vee=lt({prop:"borderBottom",themeKey:"borders",transform:ni}),yee=lt({prop:"borderLeft",themeKey:"borders",transform:ni}),bee=lt({prop:"borderColor",themeKey:"palette"}),wee=lt({prop:"borderTopColor",themeKey:"palette"}),xee=lt({prop:"borderRightColor",themeKey:"palette"}),kee=lt({prop:"borderBottomColor",themeKey:"palette"}),Eee=lt({prop:"borderLeftColor",themeKey:"palette"}),pv=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=nf(t.theme,"shape.borderRadius",4),n=r=>({borderRadius:al(e,r)});return Vo(t,t.borderRadius,n)}return null};pv.propTypes={};pv.filterProps=["borderRadius"];fv(pee,gee,mee,vee,yee,bee,wee,xee,kee,Eee,pv);const gv=t=>{if(t.gap!==void 0&&t.gap!==null){const e=nf(t.theme,"spacing",8),n=r=>({gap:al(e,r)});return Vo(t,t.gap,n)}return null};gv.propTypes={};gv.filterProps=["gap"];const mv=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=nf(t.theme,"spacing",8),n=r=>({columnGap:al(e,r)});return Vo(t,t.columnGap,n)}return null};mv.propTypes={};mv.filterProps=["columnGap"];const vv=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=nf(t.theme,"spacing",8),n=r=>({rowGap:al(e,r)});return Vo(t,t.rowGap,n)}return null};vv.propTypes={};vv.filterProps=["rowGap"];const See=lt({prop:"gridColumn"}),Cee=lt({prop:"gridRow"}),Tee=lt({prop:"gridAutoFlow"}),Aee=lt({prop:"gridAutoColumns"}),_ee=lt({prop:"gridAutoRows"}),Ree=lt({prop:"gridTemplateColumns"}),Mee=lt({prop:"gridTemplateRows"}),Oee=lt({prop:"gridTemplateAreas"}),Iee=lt({prop:"gridArea"});fv(gv,mv,vv,See,Cee,Tee,Aee,_ee,Ree,Mee,Oee,Iee);function Ac(t,e){return e==="grey"?e:t}const Lee=lt({prop:"color",themeKey:"palette",transform:Ac}),Nee=lt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ac}),$ee=lt({prop:"backgroundColor",themeKey:"palette",transform:Ac});fv(Lee,Nee,$ee);function Hr(t){return t<=1&&t!==0?`${t*100}%`:t}const Dee=lt({prop:"width",transform:Hr}),Ex=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=n=>{var r,o;const i=((r=t.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||bx[n];return i?((o=t.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${i}${t.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:Hr(n)}};return Vo(t,t.maxWidth,e)}return null};Ex.filterProps=["maxWidth"];const Pee=lt({prop:"minWidth",transform:Hr}),zee=lt({prop:"height",transform:Hr}),Fee=lt({prop:"maxHeight",transform:Hr}),Bee=lt({prop:"minHeight",transform:Hr});lt({prop:"size",cssProperty:"width",transform:Hr});lt({prop:"size",cssProperty:"height",transform:Hr});const Hee=lt({prop:"boxSizing"});fv(Dee,Ex,Pee,zee,Fee,Bee,Hee);const Uee={border:{themeKey:"borders",transform:ni},borderTop:{themeKey:"borders",transform:ni},borderRight:{themeKey:"borders",transform:ni},borderBottom:{themeKey:"borders",transform:ni},borderLeft:{themeKey:"borders",transform:ni},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:pv},color:{themeKey:"palette",transform:Ac},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Ac},backgroundColor:{themeKey:"palette",transform:Ac},p:{style:Vt},pt:{style:Vt},pr:{style:Vt},pb:{style:Vt},pl:{style:Vt},px:{style:Vt},py:{style:Vt},padding:{style:Vt},paddingTop:{style:Vt},paddingRight:{style:Vt},paddingBottom:{style:Vt},paddingLeft:{style:Vt},paddingX:{style:Vt},paddingY:{style:Vt},paddingInline:{style:Vt},paddingInlineStart:{style:Vt},paddingInlineEnd:{style:Vt},paddingBlock:{style:Vt},paddingBlockStart:{style:Vt},paddingBlockEnd:{style:Vt},m:{style:Wt},mt:{style:Wt},mr:{style:Wt},mb:{style:Wt},ml:{style:Wt},mx:{style:Wt},my:{style:Wt},margin:{style:Wt},marginTop:{style:Wt},marginRight:{style:Wt},marginBottom:{style:Wt},marginLeft:{style:Wt},marginX:{style:Wt},marginY:{style:Wt},marginInline:{style:Wt},marginInlineStart:{style:Wt},marginInlineEnd:{style:Wt},marginBlock:{style:Wt},marginBlockStart:{style:Wt},marginBlockEnd:{style:Wt},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:gv},rowGap:{style:vv},columnGap:{style:mv},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Hr},maxWidth:{style:Ex},minWidth:{transform:Hr},height:{transform:Hr},maxHeight:{transform:Hr},minHeight:{transform:Hr},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},yv=Uee;function Wee(...t){const e=t.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(e);return t.every(r=>n.size===Object.keys(r).length)}function Vee(t,e){return typeof t=="function"?t(e):t}function jee(){function t(n,r,o,i){const s={[n]:r,theme:o},l=i[n];if(!l)return{[n]:r};const{cssProperty:a=n,themeKey:u,transform:c,style:d}=l;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const h=hv(o,u)||{};return d?d(s):Vo(s,r,p=>{let g=Ng(h,c,p);return p===g&&typeof p=="string"&&(g=Ng(h,c,`${n}${p==="default"?"":pt(p)}`,p)),a===!1?g:{[a]:g}})}function e(n){var r;const{sx:o,theme:i={}}=n||{};if(!o)return null;const s=(r=i.unstable_sxConfig)!=null?r:yv;function l(a){let u=a;if(typeof a=="function")u=a(i);else if(typeof a!="object")return a;if(!u)return null;const c=FL(i.breakpoints),d=Object.keys(c);let h=c;return Object.keys(u).forEach(f=>{const p=Vee(u[f],i);if(p!=null)if(typeof p=="object")if(s[f])h=Nd(h,t(f,p,i,s));else{const g=Vo({theme:i},p,m=>({[f]:m}));Wee(g,p)?h[f]=e({sx:p,theme:i}):h=Nd(h,g)}else h=Nd(h,t(f,p,i,s))}),BL(d,h)}return Array.isArray(o)?o.map(l):l(o)}return e}const UL=jee();UL.filterProps=["sx"];const bv=UL,Gee=["breakpoints","palette","spacing","shape"];function wv(t={},...e){const{breakpoints:n={},palette:r={},spacing:o,shape:i={}}=t,s=Fe(t,Gee),l=nee(n),a=fee(o);let u=Gr({breakpoints:l,direction:"ltr",components:{},palette:K({mode:"light"},r),spacing:a,shape:K({},oee,i)},s);return u=e.reduce((c,d)=>Gr(c,d),u),u.unstable_sxConfig=K({},yv,s==null?void 0:s.unstable_sxConfig),u.unstable_sx=function(d){return bv({sx:d,theme:this})},u}function Kee(t){return Object.keys(t).length===0}function Sx(t=null){const e=P.useContext(vx);return!e||Kee(e)?t:e}const Yee=wv();function Cx(t=Yee){return Sx(t)}const Xee=["sx"],qee=t=>{var e,n;const r={systemProps:{},otherProps:{}},o=(e=t==null||(n=t.theme)==null?void 0:n.unstable_sxConfig)!=null?e:yv;return Object.keys(t).forEach(i=>{o[i]?r.systemProps[i]=t[i]:r.otherProps[i]=t[i]}),r};function Tx(t){const{sx:e}=t,n=Fe(t,Xee),{systemProps:r,otherProps:o}=qee(n);let i;return Array.isArray(e)?i=[r,...e]:typeof e=="function"?i=(...s)=>{const l=e(...s);return Oi(l)?K({},r,l):r}:i=K({},r,e),K({},o,{sx:i})}function WL(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;el!=="theme"&&l!=="sx"&&l!=="as"})(bv);return P.forwardRef(function(a,u){const c=Cx(n),d=Tx(a),{className:h,component:f="div"}=d,p=Fe(d,Zee);return j.jsx(i,K({as:f,ref:u,className:Ge(h,o?o(r):r),theme:e&&c[e]||c},p))})}const Jee=["variant"];function CA(t){return t.length===0}function VL(t){const{variant:e}=t,n=Fe(t,Jee);let r=e||"";return Object.keys(n).sort().forEach(o=>{o==="color"?r+=CA(r)?t[o]:pt(t[o]):r+=`${CA(r)?o:pt(o)}${pt(t[o].toString())}`}),r}const ete=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function tte(t){return Object.keys(t).length===0}function nte(t){return typeof t=="string"&&t.charCodeAt(0)>96}const rte=(t,e)=>e.components&&e.components[t]&&e.components[t].styleOverrides?e.components[t].styleOverrides:null,$g=t=>{const e={};return t&&t.forEach(n=>{const r=VL(n.props);e[r]=n.style}),e},ote=(t,e)=>{let n=[];return e&&e.components&&e.components[t]&&e.components[t].variants&&(n=e.components[t].variants),$g(n)},Dg=(t,e,n)=>{const{ownerState:r={}}=t,o=[];return n&&n.forEach(i=>{let s=!0;Object.keys(i.props).forEach(l=>{r[l]!==i.props[l]&&t[l]!==i.props[l]&&(s=!1)}),s&&o.push(e[VL(i.props)])}),o},ite=(t,e,n,r)=>{var o;const i=n==null||(o=n.components)==null||(o=o[r])==null?void 0:o.variants;return Dg(t,e,i)};function Ip(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const ste=wv(),ate=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function Lp({defaultTheme:t,theme:e,themeId:n}){return tte(e)?t:e[n]||e}function lte(t){return t?(e,n)=>n[t]:null}const TA=({styledArg:t,props:e,defaultTheme:n,themeId:r})=>{const o=t(K({},e,{theme:Lp(K({},e,{defaultTheme:n,themeId:r}))}));let i;if(o&&o.variants&&(i=o.variants,delete o.variants),i){const s=Dg(e,$g(i),i);return[o,...s]}return o};function jL(t={}){const{themeId:e,defaultTheme:n=ste,rootShouldForwardProp:r=Ip,slotShouldForwardProp:o=Ip}=t,i=s=>bv(K({},s,{theme:Lp(K({},s,{defaultTheme:n,themeId:e}))}));return i.__mui_systemSx=!0,(s,l={})=>{JJ(s,w=>w.filter(k=>!(k!=null&&k.__mui_systemSx)));const{name:a,slot:u,skipVariantsResolver:c,skipSx:d,overridesResolver:h=lte(ate(u))}=l,f=Fe(l,ete),p=c!==void 0?c:u&&u!=="Root"&&u!=="root"||!1,g=d||!1;let m,v=Ip;u==="Root"||u==="root"?v=r:u?v=o:nte(s)&&(v=void 0);const y=zL(s,K({shouldForwardProp:v,label:m},f)),b=(w,...k)=>{const x=k?k.map(O=>{if(typeof O=="function"&&O.__emotion_real!==O)return _=>TA({styledArg:O,props:_,defaultTheme:n,themeId:e});if(Oi(O)){let _=O,R;return O&&O.variants&&(R=O.variants,delete _.variants,_=A=>{let E=O;return Dg(A,$g(R),R).forEach(I=>{E=Gr(E,I)}),E}),_}return O}):[];let S=w;if(Oi(w)){let O;w&&w.variants&&(O=w.variants,delete S.variants,S=_=>{let R=w;return Dg(_,$g(O),O).forEach(E=>{R=Gr(R,E)}),R})}else typeof w=="function"&&w.__emotion_real!==w&&(S=O=>TA({styledArg:w,props:O,defaultTheme:n,themeId:e}));a&&h&&x.push(O=>{const _=Lp(K({},O,{defaultTheme:n,themeId:e})),R=rte(a,_);if(R){const A={};return Object.entries(R).forEach(([E,M])=>{A[E]=typeof M=="function"?M(K({},O,{theme:_})):M}),h(O,A)}return null}),a&&!p&&x.push(O=>{const _=Lp(K({},O,{defaultTheme:n,themeId:e}));return ite(O,ote(a,_),_,a)}),g||x.push(i);const T=x.length-k.length;if(Array.isArray(w)&&T>0){const O=new Array(T).fill("");S=[...w,...O],S.raw=[...w.raw,...O]}const C=y(S,...x);return s.muiName&&(C.muiName=s.muiName),C};return y.withConfig&&(b.withConfig=y.withConfig),b}}const cte=jL(),ute=cte;function dte(t){const{theme:e,name:n,props:r}=t;return!e||!e.components||!e.components[n]||!e.components[n].defaultProps?r:wL(e.components[n].defaultProps,r)}function GL({props:t,name:e,defaultTheme:n,themeId:r}){let o=Cx(n);return r&&(o=o[r]||o),dte({theme:o,name:e,props:t})}function Ax(t,e=0,n=1){return Math.min(Math.max(e,t),n)}function hte(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function ll(t){if(t.type)return t;if(t.charAt(0)==="#")return ll(hte(t));const e=t.indexOf("("),n=t.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(Yc(9,t));let r=t.substring(e+1,t.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o)===-1)throw new Error(Yc(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}function xv(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.indexOf("rgb")!==-1?r=r.map((o,i)=>i<3?parseInt(o,10):o):e.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),e.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${e}(${r})`}function fte(t){t=ll(t);const{values:e}=t,n=e[0],r=e[1]/100,o=e[2]/100,i=r*Math.min(o,1-o),s=(u,c=(u+n/30)%12)=>o-i*Math.max(Math.min(c-3,9-c,1),-1);let l="rgb";const a=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return t.type==="hsla"&&(l+="a",a.push(e[3])),xv({type:l,values:a})}function AA(t){t=ll(t);let e=t.type==="hsl"||t.type==="hsla"?ll(fte(t)).values:t.values;return e=e.map(n=>(t.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function pte(t,e){const n=AA(t),r=AA(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function wr(t,e){return t=ll(t),e=Ax(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,xv(t)}function gte(t,e){if(t=ll(t),e=Ax(e),t.type.indexOf("hsl")!==-1)t.values[2]*=1-e;else if(t.type.indexOf("rgb")!==-1||t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]*=1-e;return xv(t)}function mte(t,e){if(t=ll(t),e=Ax(e),t.type.indexOf("hsl")!==-1)t.values[2]+=(100-t.values[2])*e;else if(t.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return xv(t)}const vte=P.createContext(null),KL=vte;function YL(){return P.useContext(KL)}const yte=typeof Symbol=="function"&&Symbol.for,bte=yte?Symbol.for("mui.nested"):"__THEME_NESTED__";function wte(t,e){return typeof e=="function"?e(t):K({},t,e)}function xte(t){const{children:e,theme:n}=t,r=YL(),o=P.useMemo(()=>{const i=r===null?n:wte(r,n);return i!=null&&(i[bte]=r!==null),i},[n,r]);return j.jsx(KL.Provider,{value:o,children:e})}const _A={};function RA(t,e,n,r=!1){return P.useMemo(()=>{const o=t&&e[t]||e;if(typeof n=="function"){const i=n(o),s=t?K({},e,{[t]:i}):i;return r?()=>s:s}return t?K({},e,{[t]:n}):K({},e,n)},[t,e,n,r])}function kte(t){const{children:e,theme:n,themeId:r}=t,o=Sx(_A),i=YL()||_A,s=RA(r,o,n),l=RA(r,i,n,!0);return j.jsx(xte,{theme:l,children:j.jsx(vx.Provider,{value:s,children:e})})}const Ete=["component","direction","spacing","divider","children","className","useFlexGap"],Ste=wv(),Cte=ute("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function Tte(t){return GL({props:t,name:"MuiStack",defaultTheme:Ste})}function Ate(t,e){const n=P.Children.toArray(t).filter(Boolean);return n.reduce((r,o,i)=>(r.push(o),i({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],Rte=({ownerState:t,theme:e})=>{let n=K({display:"flex",flexDirection:"column"},Vo({theme:e},W1({values:t.direction,breakpoints:e.breakpoints.values}),r=>({flexDirection:r})));if(t.spacing){const r=kx(e),o=Object.keys(e.breakpoints.values).reduce((a,u)=>((typeof t.spacing=="object"&&t.spacing[u]!=null||typeof t.direction=="object"&&t.direction[u]!=null)&&(a[u]=!0),a),{}),i=W1({values:t.direction,base:o}),s=W1({values:t.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((a,u,c)=>{if(!i[a]){const h=u>0?i[c[u-1]]:"column";i[a]=h}}),n=Gr(n,Vo({theme:e},s,(a,u)=>t.useFlexGap?{gap:al(r,a)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${_te(u?i[u]:t.direction)}`]:al(r,a)}}))}return n=iee(e.breakpoints,n),n};function Mte(t={}){const{createStyledComponent:e=Cte,useThemeProps:n=Tte,componentName:r="MuiStack"}=t,o=()=>zn({root:["root"]},a=>En(r,a),{}),i=e(Rte);return P.forwardRef(function(a,u){const c=n(a),d=Tx(c),{component:h="div",direction:f="column",spacing:p=0,divider:g,children:m,className:v,useFlexGap:y=!1}=d,b=Fe(d,Ete),w={direction:f,spacing:p,useFlexGap:y},k=o();return j.jsx(i,K({as:h,ownerState:w,ref:u,className:Ge(k.root,v)},b,{children:g?Ate(m,g):m}))})}function Ote(t,e){return K({toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}}},e)}const Ite=["mode","contrastThreshold","tonalOffset"],MA={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:mh.white,default:mh.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},V1={text:{primary:mh.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:mh.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function OA(t,e,n,r){const o=r.light||r,i=r.dark||r*1.5;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:e==="light"?t.light=mte(t.main,o):e==="dark"&&(t.dark=gte(t.main,i)))}function Lte(t="light"){return t==="dark"?{main:Bl[200],light:Bl[50],dark:Bl[400]}:{main:Bl[700],light:Bl[400],dark:Bl[800]}}function Nte(t="light"){return t==="dark"?{main:Fl[200],light:Fl[50],dark:Fl[400]}:{main:Fl[500],light:Fl[300],dark:Fl[700]}}function $te(t="light"){return t==="dark"?{main:zl[500],light:zl[300],dark:zl[700]}:{main:zl[700],light:zl[400],dark:zl[800]}}function Dte(t="light"){return t==="dark"?{main:Hl[400],light:Hl[300],dark:Hl[700]}:{main:Hl[700],light:Hl[500],dark:Hl[900]}}function Pte(t="light"){return t==="dark"?{main:Ul[400],light:Ul[300],dark:Ul[700]}:{main:Ul[800],light:Ul[500],dark:Ul[900]}}function zte(t="light"){return t==="dark"?{main:Lu[400],light:Lu[300],dark:Lu[700]}:{main:"#ed6c02",light:Lu[500],dark:Lu[900]}}function Fte(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:r=.2}=t,o=Fe(t,Ite),i=t.primary||Lte(e),s=t.secondary||Nte(e),l=t.error||$te(e),a=t.info||Dte(e),u=t.success||Pte(e),c=t.warning||zte(e);function d(g){return pte(g,V1.text.primary)>=n?V1.text.primary:MA.text.primary}const h=({color:g,name:m,mainShade:v=500,lightShade:y=300,darkShade:b=700})=>{if(g=K({},g),!g.main&&g[v]&&(g.main=g[v]),!g.hasOwnProperty("main"))throw new Error(Yc(11,m?` (${m})`:"",v));if(typeof g.main!="string")throw new Error(Yc(12,m?` (${m})`:"",JSON.stringify(g.main)));return OA(g,"light",y,r),OA(g,"dark",b,r),g.contrastText||(g.contrastText=d(g.main)),g},f={dark:V1,light:MA};return Gr(K({common:K({},mh),mode:e,primary:h({color:i,name:"primary"}),secondary:h({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:l,name:"error"}),warning:h({color:c,name:"warning"}),info:h({color:a,name:"info"}),success:h({color:u,name:"success"}),grey:RQ,contrastThreshold:n,getContrastText:d,augmentColor:h,tonalOffset:r},f[e]),o)}const Bte=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Hte(t){return Math.round(t*1e5)/1e5}const IA={textTransform:"uppercase"},LA='"Roboto", "Helvetica", "Arial", sans-serif';function Ute(t,e){const n=typeof e=="function"?e(t):e,{fontFamily:r=LA,fontSize:o=14,fontWeightLight:i=300,fontWeightRegular:s=400,fontWeightMedium:l=500,fontWeightBold:a=700,htmlFontSize:u=16,allVariants:c,pxToRem:d}=n,h=Fe(n,Bte),f=o/14,p=d||(v=>`${v/u*f}rem`),g=(v,y,b,w,k)=>K({fontFamily:r,fontWeight:v,fontSize:p(y),lineHeight:b},r===LA?{letterSpacing:`${Hte(w/y)}em`}:{},k,c),m={h1:g(i,96,1.167,-1.5),h2:g(i,60,1.2,-.5),h3:g(s,48,1.167,0),h4:g(s,34,1.235,.25),h5:g(s,24,1.334,0),h6:g(l,20,1.6,.15),subtitle1:g(s,16,1.75,.15),subtitle2:g(l,14,1.57,.1),body1:g(s,16,1.5,.15),body2:g(s,14,1.43,.15),button:g(l,14,1.75,.4,IA),caption:g(s,12,1.66,.4),overline:g(s,12,2.66,1,IA),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Gr(K({htmlFontSize:u,pxToRem:p,fontFamily:r,fontSize:o,fontWeightLight:i,fontWeightRegular:s,fontWeightMedium:l,fontWeightBold:a},m),h,{clone:!1})}const Wte=.2,Vte=.14,jte=.12;function Rt(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${Wte})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${Vte})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${jte})`].join(",")}const Gte=["none",Rt(0,2,1,-1,0,1,1,0,0,1,3,0),Rt(0,3,1,-2,0,2,2,0,0,1,5,0),Rt(0,3,3,-2,0,3,4,0,0,1,8,0),Rt(0,2,4,-1,0,4,5,0,0,1,10,0),Rt(0,3,5,-1,0,5,8,0,0,1,14,0),Rt(0,3,5,-1,0,6,10,0,0,1,18,0),Rt(0,4,5,-2,0,7,10,1,0,2,16,1),Rt(0,5,5,-3,0,8,10,1,0,3,14,2),Rt(0,5,6,-3,0,9,12,1,0,3,16,2),Rt(0,6,6,-3,0,10,14,1,0,4,18,3),Rt(0,6,7,-4,0,11,15,1,0,4,20,3),Rt(0,7,8,-4,0,12,17,2,0,5,22,4),Rt(0,7,8,-4,0,13,19,2,0,5,24,4),Rt(0,7,9,-4,0,14,21,2,0,5,26,4),Rt(0,8,9,-5,0,15,22,2,0,6,28,5),Rt(0,8,10,-5,0,16,24,2,0,6,30,5),Rt(0,8,11,-5,0,17,26,2,0,6,32,5),Rt(0,9,11,-5,0,18,28,2,0,7,34,6),Rt(0,9,12,-6,0,19,29,2,0,7,36,6),Rt(0,10,13,-6,0,20,31,3,0,8,38,7),Rt(0,10,13,-6,0,21,33,3,0,8,40,7),Rt(0,10,14,-6,0,22,35,3,0,8,42,7),Rt(0,11,14,-7,0,23,36,3,0,9,44,8),Rt(0,11,15,-7,0,24,38,3,0,9,46,8)],Kte=Gte,Yte=["duration","easing","delay"],Xte={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},qte={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function NA(t){return`${Math.round(t)}ms`}function Zte(t){if(!t)return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function Qte(t){const e=K({},Xte,t.easing),n=K({},qte,t.duration);return K({getAutoHeightDuration:Zte,create:(o=["all"],i={})=>{const{duration:s=n.standard,easing:l=e.easeInOut,delay:a=0}=i;return Fe(i,Yte),(Array.isArray(o)?o:[o]).map(u=>`${u} ${typeof s=="string"?s:NA(s)} ${l} ${typeof a=="string"?a:NA(a)}`).join(",")}},t,{easing:e,duration:n})}const Jte={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},ene=Jte,tne=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function _x(t={},...e){const{mixins:n={},palette:r={},transitions:o={},typography:i={}}=t,s=Fe(t,tne);if(t.vars)throw new Error(Yc(18));const l=Fte(r),a=wv(t);let u=Gr(a,{mixins:Ote(a.breakpoints,n),palette:l,shadows:Kte.slice(),typography:Ute(l,i),transitions:Qte(o),zIndex:K({},ene)});return u=Gr(u,s),u=e.reduce((c,d)=>Gr(c,d),u),u.unstable_sxConfig=K({},yv,s==null?void 0:s.unstable_sxConfig),u.unstable_sx=function(d){return bv({sx:d,theme:this})},u}const nne=_x(),Rx=nne;function kv(){const t=Cx(Rx);return t[Xc]||t}function Tn({props:t,name:e}){return GL({props:t,name:e,defaultTheme:Rx,themeId:Xc})}const Mx=t=>Ip(t)&&t!=="classes",rne=jL({themeId:Xc,defaultTheme:Rx,rootShouldForwardProp:Mx}),St=rne,one=["theme"];function ine(t){let{theme:e}=t,n=Fe(t,one);const r=e[Xc];return j.jsx(kte,K({},n,{themeId:r?Xc:void 0,theme:r||e}))}const sne=t=>{let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,(e/100).toFixed(2)},$A=sne;function Vy(t,e){return Vy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Vy(t,e)}function XL(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Vy(t,e)}const DA={disabled:!1},Pg=ee.createContext(null);var ane=function(e){return e.scrollTop},vd="unmounted",Ea="exited",Sa="entering",Jl="entered",jy="exiting",Zi=function(t){XL(e,t);function e(r,o){var i;i=t.call(this,r,o)||this;var s=o,l=s&&!s.isMounting?r.enter:r.appear,a;return i.appearStatus=null,r.in?l?(a=Ea,i.appearStatus=Sa):a=Jl:r.unmountOnExit||r.mountOnEnter?a=vd:a=Ea,i.state={status:a},i.nextCallback=null,i}e.getDerivedStateFromProps=function(o,i){var s=o.in;return s&&i.status===vd?{status:Ea}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var s=this.state.status;this.props.in?s!==Sa&&s!==Jl&&(i=Sa):(s===Sa||s===Jl)&&(i=jy)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,s,l;return i=s=l=o,o!=null&&typeof o!="number"&&(i=o.exit,s=o.enter,l=o.appear!==void 0?o.appear:s),{exit:i,enter:s,appear:l}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===Sa){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:jf.findDOMNode(this);s&&ane(s)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ea&&this.setState({status:vd})},n.performEnter=function(o){var i=this,s=this.props.enter,l=this.context?this.context.isMounting:o,a=this.props.nodeRef?[l]:[jf.findDOMNode(this),l],u=a[0],c=a[1],d=this.getTimeouts(),h=l?d.appear:d.enter;if(!o&&!s||DA.disabled){this.safeSetState({status:Jl},function(){i.props.onEntered(u)});return}this.props.onEnter(u,c),this.safeSetState({status:Sa},function(){i.props.onEntering(u,c),i.onTransitionEnd(h,function(){i.safeSetState({status:Jl},function(){i.props.onEntered(u,c)})})})},n.performExit=function(){var o=this,i=this.props.exit,s=this.getTimeouts(),l=this.props.nodeRef?void 0:jf.findDOMNode(this);if(!i||DA.disabled){this.safeSetState({status:Ea},function(){o.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:jy},function(){o.props.onExiting(l),o.onTransitionEnd(s.exit,function(){o.safeSetState({status:Ea},function(){o.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,s=!0;return this.nextCallback=function(l){s&&(s=!1,i.nextCallback=null,o(l))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var s=this.props.nodeRef?this.props.nodeRef.current:jf.findDOMNode(this),l=o==null&&!this.props.addEndListener;if(!s||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],u=a[0],c=a[1];this.props.addEndListener(u,c)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===vd)return null;var i=this.props,s=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var l=Fe(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return ee.createElement(Pg.Provider,{value:null},typeof s=="function"?s(o,l):ee.cloneElement(ee.Children.only(s),l))},e}(ee.Component);Zi.contextType=Pg;Zi.propTypes={};function Wl(){}Zi.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Wl,onEntering:Wl,onEntered:Wl,onExit:Wl,onExiting:Wl,onExited:Wl};Zi.UNMOUNTED=vd;Zi.EXITED=Ea;Zi.ENTERING=Sa;Zi.ENTERED=Jl;Zi.EXITING=jy;const qL=Zi;function lne(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ox(t,e){var n=function(i){return e&&P.isValidElement(i)?e(i):i},r=Object.create(null);return t&&P.Children.map(t,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function cne(t,e){t=t||{},e=e||{};function n(c){return c in e?e[c]:t[c]}var r=Object.create(null),o=[];for(var i in t)i in e?o.length&&(r[i]=o,o=[]):o.push(i);var s,l={};for(var a in e){if(r[a])for(s=0;st.scrollTop;function zg(t,e){var n,r;const{timeout:o,easing:i,style:s={}}=t;return{duration:(n=s.transitionDuration)!=null?n:typeof o=="number"?o:o[e.mode]||0,easing:(r=s.transitionTimingFunction)!=null?r:typeof i=="object"?i[e.mode]:i,delay:s.transitionDelay}}function gne(t){return En("MuiPaper",t)}Sn("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const mne=["className","component","elevation","square","variant"],vne=t=>{const{square:e,elevation:n,variant:r,classes:o}=t,i={root:["root",r,!e&&"rounded",r==="elevation"&&`elevation${n}`]};return zn(i,gne,o)},yne=St("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],!n.square&&e.rounded,n.variant==="elevation"&&e[`elevation${n.elevation}`]]}})(({theme:t,ownerState:e})=>{var n;return K({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!e.square&&{borderRadius:t.shape.borderRadius},e.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.divider}`},e.variant==="elevation"&&K({boxShadow:(t.vars||t).shadows[e.elevation]},!t.vars&&t.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${wr("#fff",$A(e.elevation))}, ${wr("#fff",$A(e.elevation))})`},t.vars&&{backgroundImage:(n=t.vars.overlays)==null?void 0:n[e.elevation]}))}),bne=P.forwardRef(function(e,n){const r=Tn({props:e,name:"MuiPaper"}),{className:o,component:i="div",elevation:s=1,square:l=!1,variant:a="elevation"}=r,u=Fe(r,mne),c=K({},r,{component:i,elevation:s,square:l,variant:a}),d=vne(c);return j.jsx(yne,K({as:i,ownerState:c,className:Ge(d.root,o),ref:n},u))}),wne=bne;function xne(t){const{className:e,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:s,in:l,onExited:a,timeout:u}=t,[c,d]=P.useState(!1),h=Ge(e,n.ripple,n.rippleVisible,r&&n.ripplePulsate),f={width:s,height:s,top:-(s/2)+i,left:-(s/2)+o},p=Ge(n.child,c&&n.childLeaving,r&&n.childPulsate);return!l&&!c&&d(!0),P.useEffect(()=>{if(!l&&a!=null){const g=setTimeout(a,u);return()=>{clearTimeout(g)}}},[a,l,u]),j.jsx("span",{className:h,style:f,children:j.jsx("span",{className:p})})}const kne=Sn("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),io=kne,Ene=["center","classes","className"];let Ev=t=>t,PA,zA,FA,BA;const Gy=550,Sne=80,Cne=yx(PA||(PA=Ev` 0% { transform: scale(0); opacity: 0.1; @@ -135,7 +135,7 @@ Error generating stack: `+i.message+` transform: scale(1); opacity: 0.3; } -`)),nee=Wb(c2||(c2=pg` +`)),Tne=yx(zA||(zA=Ev` 0% { opacity: 1; } @@ -143,7 +143,7 @@ Error generating stack: `+i.message+` 100% { opacity: 0; } -`)),oee=Wb(u2||(u2=pg` +`)),Ane=yx(FA||(FA=Ev` 0% { transform: scale(1); } @@ -155,7 +155,7 @@ Error generating stack: `+i.message+` 100% { transform: scale(1); } -`)),iee=et("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),see=et(JQ,{name:"MuiTouchRipple",slot:"Ripple"})(d2||(d2=pg` +`)),_ne=St("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Rne=St(xne,{name:"MuiTouchRipple",slot:"Ripple"})(BA||(BA=Ev` opacity: 0; position: absolute; @@ -198,7 +198,7 @@ Error generating stack: `+i.message+` animation-iteration-count: infinite; animation-delay: 200ms; } -`),On.rippleVisible,ree,Sy,({theme:e})=>e.transitions.easing.easeInOut,On.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,On.child,On.childLeaving,nee,Sy,({theme:e})=>e.transitions.easing.easeInOut,On.childPulsate,oee,({theme:e})=>e.transitions.easing.easeInOut),aee=S.forwardRef(function(t,r){const n=Xt({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:s}=n,a=be(n,eee),[l,c]=S.useState([]),u=S.useRef(0),d=S.useRef(null);S.useEffect(()=>{d.current&&(d.current(),d.current=null)},[l]);const p=S.useRef(!1),f=S.useRef(0),h=S.useRef(null),m=S.useRef(null);S.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]);const b=S.useCallback(E=>{const{pulsate:k,rippleX:x,rippleY:w,rippleSize:C,cb:T}=E;c(O=>[...O,A.jsx(see,{classes:{ripple:Oe(i.ripple,On.ripple),rippleVisible:Oe(i.rippleVisible,On.rippleVisible),ripplePulsate:Oe(i.ripplePulsate,On.ripplePulsate),child:Oe(i.child,On.child),childLeaving:Oe(i.childLeaving,On.childLeaving),childPulsate:Oe(i.childPulsate,On.childPulsate)},timeout:Sy,pulsate:k,rippleX:x,rippleY:w,rippleSize:C},u.current)]),u.current+=1,d.current=T},[i]),y=S.useCallback((E={},k={},x=()=>{})=>{const{pulsate:w=!1,center:C=o||k.pulsate,fakeElement:T=!1}=k;if((E==null?void 0:E.type)==="mousedown"&&p.current){p.current=!1;return}(E==null?void 0:E.type)==="touchstart"&&(p.current=!0);const O=T?null:m.current,_=O?O.getBoundingClientRect():{width:0,height:0,left:0,top:0};let P,$,B;if(C||E===void 0||E.clientX===0&&E.clientY===0||!E.clientX&&!E.touches)P=Math.round(_.width/2),$=Math.round(_.height/2);else{const{clientX:F,clientY:z}=E.touches&&E.touches.length>0?E.touches[0]:E;P=Math.round(F-_.left),$=Math.round(z-_.top)}if(C)B=Math.sqrt((2*_.width**2+_.height**2)/3),B%2===0&&(B+=1);else{const F=Math.max(Math.abs((O?O.clientWidth:0)-P),P)*2+2,z=Math.max(Math.abs((O?O.clientHeight:0)-$),$)*2+2;B=Math.sqrt(F**2+z**2)}E!=null&&E.touches?h.current===null&&(h.current=()=>{b({pulsate:w,rippleX:P,rippleY:$,rippleSize:B,cb:x})},f.current=setTimeout(()=>{h.current&&(h.current(),h.current=null)},tee)):b({pulsate:w,rippleX:P,rippleY:$,rippleSize:B,cb:x})},[o,b]),g=S.useCallback(()=>{y({},{pulsate:!0})},[y]),v=S.useCallback((E,k)=>{if(clearTimeout(f.current),(E==null?void 0:E.type)==="touchend"&&h.current){h.current(),h.current=null,f.current=setTimeout(()=>{v(E,k)});return}h.current=null,c(x=>x.length>0?x.slice(1):x),d.current=k},[]);return S.useImperativeHandle(r,()=>({pulsate:g,start:y,stop:v}),[g,y,v]),A.jsx(iee,N({className:Oe(On.root,i.root,s),ref:m},a,{children:A.jsx(GQ,{component:null,exit:!0,children:l})}))}),lee=aee;function cee(e){return Kt("MuiButtonBase",e)}const uee=Yt("MuiButtonBase",["root","disabled","focusVisible"]),dee=uee,pee=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],fee=e=>{const{disabled:t,focusVisible:r,focusVisibleClassName:n,classes:o}=e,s=ir({root:["root",t&&"disabled",r&&"focusVisible"]},cee,o);return r&&n&&(s.root+=` ${n}`),s},hee=et("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${dee.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),mee=S.forwardRef(function(t,r){const n=Xt({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:s,className:a,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:p=!1,LinkComponent:f="a",onBlur:h,onClick:m,onContextMenu:b,onDragLeave:y,onFocus:g,onFocusVisible:v,onKeyDown:E,onKeyUp:k,onMouseDown:x,onMouseLeave:w,onMouseUp:C,onTouchEnd:T,onTouchMove:O,onTouchStart:_,tabIndex:P=0,TouchRippleProps:$,touchRippleRef:B,type:F}=n,z=be(n,pee),G=S.useRef(null),R=S.useRef(null),M=Kr(R,B),{isFocusVisibleRef:L,onFocus:K,onBlur:q,ref:Re}=R_(),[ae,pe]=S.useState(!1);c&&ae&&pe(!1),S.useImperativeHandle(o,()=>({focusVisible:()=>{pe(!0),G.current.focus()}}),[]);const[fe,ge]=S.useState(!1);S.useEffect(()=>{ge(!0)},[]);const Ae=fe&&!u&&!c;S.useEffect(()=>{ae&&p&&!u&&fe&&R.current.pulsate()},[u,p,ae,fe]);function Te(he,wn,kc=d){return Xs(Ei=>(wn&&wn(Ei),!kc&&R.current&&R.current[he](Ei),!0))}const gt=Te("start",x),it=Te("stop",b),Ir=Te("stop",y),me=Te("stop",C),He=Te("stop",he=>{ae&&he.preventDefault(),w&&w(he)}),Xe=Te("start",_),Gn=Te("stop",T),Xr=Te("stop",O),sr=Te("stop",he=>{q(he),L.current===!1&&pe(!1),h&&h(he)},!1),Bo=Xs(he=>{G.current||(G.current=he.currentTarget),K(he),L.current===!0&&(pe(!0),v&&v(he)),g&&g(he)}),$t=()=>{const he=G.current;return l&&l!=="button"&&!(he.tagName==="A"&&he.href)},Zr=S.useRef(!1),xn=Xs(he=>{p&&!Zr.current&&ae&&R.current&&he.key===" "&&(Zr.current=!0,R.current.stop(he,()=>{R.current.start(he)})),he.target===he.currentTarget&&$t()&&he.key===" "&&he.preventDefault(),E&&E(he),he.target===he.currentTarget&&$t()&&he.key==="Enter"&&!c&&(he.preventDefault(),m&&m(he))}),Wn=Xs(he=>{p&&he.key===" "&&R.current&&ae&&!he.defaultPrevented&&(Zr.current=!1,R.current.stop(he,()=>{R.current.pulsate(he)})),k&&k(he),m&&he.target===he.currentTarget&&$t()&&he.key===" "&&!he.defaultPrevented&&m(he)});let tt=l;tt==="button"&&(z.href||z.to)&&(tt=f);const Jr={};tt==="button"?(Jr.type=F===void 0?"button":F,Jr.disabled=c):(!z.href&&!z.to&&(Jr.role="button"),c&&(Jr["aria-disabled"]=c));const Sn=Kr(r,Re,G),bi=N({},n,{centerRipple:i,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:p,tabIndex:P,focusVisible:ae}),Pa=fee(bi);return A.jsxs(hee,N({as:tt,className:Oe(Pa.root,a),ownerState:bi,onBlur:sr,onClick:m,onContextMenu:it,onFocus:Bo,onKeyDown:xn,onKeyUp:Wn,onMouseDown:gt,onMouseLeave:He,onMouseUp:me,onDragLeave:Ir,onTouchEnd:Gn,onTouchMove:Xr,onTouchStart:Xe,ref:Sn,tabIndex:c?-1:P,type:F},Jr,z,{children:[s,Ae?A.jsx(lee,N({ref:M,center:i},$)):null]}))}),aE=mee;function gee(e){return Kt("MuiIconButton",e)}const yee=Yt("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),vee=yee,bee=["edge","children","className","color","disabled","disableFocusRipple","size"],Eee=e=>{const{classes:t,disabled:r,color:n,edge:o,size:i}=e,s={root:["root",r&&"disabled",n!=="default"&&`color${Ge(n)}`,o&&`edge${Ge(o)}`,`size${Ge(i)}`]};return ir(s,gee,t)},kee=et(aE,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="default"&&t[`color${Ge(r.color)}`],r.edge&&t[`edge${Ge(r.edge)}`],t[`size${Ge(r.size)}`]]}})(({theme:e,ownerState:t})=>N({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Br(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12}),({theme:e,ownerState:t})=>{var r;const n=(r=(e.vars||e).palette)==null?void 0:r[t.color];return N({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&N({color:n==null?void 0:n.main},!t.disableRipple&&{"&:hover":N({},n&&{backgroundColor:e.vars?`rgba(${n.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Br(n.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),t.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},t.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${vee.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),xee=S.forwardRef(function(t,r){const n=Xt({props:t,name:"MuiIconButton"}),{edge:o=!1,children:i,className:s,color:a="default",disabled:l=!1,disableFocusRipple:c=!1,size:u="medium"}=n,d=be(n,bee),p=N({},n,{edge:o,color:a,disabled:l,disableFocusRipple:c,size:u}),f=Eee(p);return A.jsx(kee,N({className:Oe(f.root,s),centerRipple:!0,focusRipple:!c,disabled:l,ref:r,ownerState:p},d,{children:i}))}),See=xee;function wee(e){return Kt("MuiTypography",e)}Yt("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Tee=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Cee=e=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:o,variant:i,classes:s}=e,a={root:["root",i,e.align!=="inherit"&&`align${Ge(t)}`,r&&"gutterBottom",n&&"noWrap",o&&"paragraph"]};return ir(a,wee,s)},Oee=et("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.variant&&t[r.variant],r.align!=="inherit"&&t[`align${Ge(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>N({margin:0},t.variant==="inherit"&&{font:"inherit"},t.variant!=="inherit"&&e.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),p2={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Aee={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Nee=e=>Aee[e]||e,Ree=S.forwardRef(function(t,r){const n=Xt({props:t,name:"MuiTypography"}),o=Nee(n.color),i=eE(N({},n,{color:o})),{align:s="inherit",className:a,component:l,gutterBottom:c=!1,noWrap:u=!1,paragraph:d=!1,variant:p="body1",variantMapping:f=p2}=i,h=be(i,Tee),m=N({},i,{align:s,color:o,className:a,component:l,gutterBottom:c,noWrap:u,paragraph:d,variant:p,variantMapping:f}),b=l||(d?"p":f[p]||p2[p])||"span",y=Cee(m);return A.jsx(Oee,N({as:b,ref:r,ownerState:m,className:Oe(y.root,a)},h))}),ku=Ree;function dI(e){return typeof e=="string"}function xu(e,t,r){return e===void 0||dI(e)?t:N({},t,{ownerState:N({},t.ownerState,r)})}const _ee={disableDefaultClasses:!1},Iee=S.createContext(_ee);function Mee(e){const{disableDefaultClasses:t}=S.useContext(Iee);return r=>t?"":e(r)}function pI(e,t=[]){if(e===void 0)return{};const r={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]=="function"&&!t.includes(n)).forEach(n=>{r[n]=e[n]}),r}function Lee(e,t,r){return typeof e=="function"?e(t,r):e}function f2(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(r=>!(r.match(/^on[A-Z]/)&&typeof e[r]=="function")).forEach(r=>{t[r]=e[r]}),t}function Dee(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:n,externalForwardedProps:o,className:i}=e;if(!t){const f=Oe(o==null?void 0:o.className,n==null?void 0:n.className,i,r==null?void 0:r.className),h=N({},r==null?void 0:r.style,o==null?void 0:o.style,n==null?void 0:n.style),m=N({},r,o,n);return f.length>0&&(m.className=f),Object.keys(h).length>0&&(m.style=h),{props:m,internalRef:void 0}}const s=pI(N({},o,n)),a=f2(n),l=f2(o),c=t(s),u=Oe(c==null?void 0:c.className,r==null?void 0:r.className,i,o==null?void 0:o.className,n==null?void 0:n.className),d=N({},c==null?void 0:c.style,r==null?void 0:r.style,o==null?void 0:o.style,n==null?void 0:n.style),p=N({},c,r,l,a);return u.length>0&&(p.className=u),Object.keys(d).length>0&&(p.style=d),{props:p,internalRef:c.ref}}const Pee=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function pi(e){var t;const{elementType:r,externalSlotProps:n,ownerState:o,skipResolvingSlotProps:i=!1}=e,s=be(e,Pee),a=i?{}:Lee(n,o),{props:l,internalRef:c}=Dee(N({},s,{externalSlotProps:a})),u=Kr(c,a==null?void 0:a.ref,(t=e.additionalProps)==null?void 0:t.ref);return xu(r,N({},l,{ref:u}),o)}function zee(e){const{badgeContent:t,invisible:r=!1,max:n=99,showZero:o=!1}=e,i=I_({badgeContent:t,max:n});let s=r;r===!1&&t===0&&!o&&(s=!0);const{badgeContent:a,max:l=n}=s?i:e,c=a&&Number(a)>l?`${l}+`:a;return{badgeContent:a,invisible:s,max:l,displayValue:c}}const $ee=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Bee(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function Hee(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=n=>e.ownerDocument.querySelector(`input[type="radio"]${n}`);let r=t(`[name="${e.name}"]:checked`);return r||(r=t(`[name="${e.name}"]`)),r!==e}function Fee(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||Hee(e))}function Uee(e){const t=[],r=[];return Array.from(e.querySelectorAll($ee)).forEach((n,o)=>{const i=Bee(n);i===-1||!Fee(n)||(i===0?t.push(n):r.push({documentOrder:o,tabIndex:i,node:n}))}),r.sort((n,o)=>n.tabIndex===o.tabIndex?n.documentOrder-o.documentOrder:n.tabIndex-o.tabIndex).map(n=>n.node).concat(t)}function Vee(){return!0}function jee(e){const{children:t,disableAutoFocus:r=!1,disableEnforceFocus:n=!1,disableRestoreFocus:o=!1,getTabbable:i=Uee,isEnabled:s=Vee,open:a}=e,l=S.useRef(!1),c=S.useRef(null),u=S.useRef(null),d=S.useRef(null),p=S.useRef(null),f=S.useRef(!1),h=S.useRef(null),m=Kr(t.ref,h),b=S.useRef(null);S.useEffect(()=>{!a||!h.current||(f.current=!r)},[r,a]),S.useEffect(()=>{if(!a||!h.current)return;const v=jr(h.current);return h.current.contains(v.activeElement)||(h.current.hasAttribute("tabIndex")||h.current.setAttribute("tabIndex","-1"),f.current&&h.current.focus()),()=>{o||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[a]),S.useEffect(()=>{if(!a||!h.current)return;const v=jr(h.current),E=w=>{b.current=w,!(n||!s()||w.key!=="Tab")&&v.activeElement===h.current&&w.shiftKey&&(l.current=!0,u.current&&u.current.focus())},k=()=>{const w=h.current;if(w===null)return;if(!v.hasFocus()||!s()||l.current){l.current=!1;return}if(w.contains(v.activeElement)||n&&v.activeElement!==c.current&&v.activeElement!==u.current)return;if(v.activeElement!==p.current)p.current=null;else if(p.current!==null)return;if(!f.current)return;let C=[];if((v.activeElement===c.current||v.activeElement===u.current)&&(C=i(h.current)),C.length>0){var T,O;const _=!!((T=b.current)!=null&&T.shiftKey&&((O=b.current)==null?void 0:O.key)==="Tab"),P=C[0],$=C[C.length-1];typeof P!="string"&&typeof $!="string"&&(_?$.focus():P.focus())}else w.focus()};v.addEventListener("focusin",k),v.addEventListener("keydown",E,!0);const x=setInterval(()=>{v.activeElement&&v.activeElement.tagName==="BODY"&&k()},50);return()=>{clearInterval(x),v.removeEventListener("focusin",k),v.removeEventListener("keydown",E,!0)}},[r,n,o,s,a,i]);const y=v=>{d.current===null&&(d.current=v.relatedTarget),f.current=!0,p.current=v.target;const E=t.props.onFocus;E&&E(v)},g=v=>{d.current===null&&(d.current=v.relatedTarget),f.current=!0};return A.jsxs(S.Fragment,{children:[A.jsx("div",{tabIndex:a?0:-1,onFocus:g,ref:c,"data-testid":"sentinelStart"}),S.cloneElement(t,{ref:m,onFocus:y}),A.jsx("div",{tabIndex:a?0:-1,onFocus:g,ref:u,"data-testid":"sentinelEnd"})]})}var Gr="top",Hn="bottom",Fn="right",Wr="left",lE="auto",ip=[Gr,Hn,Fn,Wr],tc="start",wd="end",Gee="clippingParents",fI="viewport",$c="popper",Wee="reference",h2=ip.reduce(function(e,t){return e.concat([t+"-"+tc,t+"-"+wd])},[]),hI=[].concat(ip,[lE]).reduce(function(e,t){return e.concat([t,t+"-"+tc,t+"-"+wd])},[]),Kee="beforeRead",Yee="read",qee="afterRead",Xee="beforeMain",Zee="main",Jee="afterMain",Qee="beforeWrite",ete="write",tte="afterWrite",rte=[Kee,Yee,qee,Xee,Zee,Jee,Qee,ete,tte];function Do(e){return e?(e.nodeName||"").toLowerCase():null}function vn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ka(e){var t=vn(e).Element;return e instanceof t||e instanceof Element}function Ln(e){var t=vn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function cE(e){if(typeof ShadowRoot>"u")return!1;var t=vn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function nte(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},o=t.attributes[r]||{},i=t.elements[r];!Ln(i)||!Do(i)||(Object.assign(i.style,n),Object.keys(o).forEach(function(s){var a=o[s];a===!1?i.removeAttribute(s):i.setAttribute(s,a===!0?"":a)}))})}function ote(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var o=t.elements[n],i=t.attributes[n]||{},s=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),a=s.reduce(function(l,c){return l[c]="",l},{});!Ln(o)||!Do(o)||(Object.assign(o.style,a),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}}const ite={name:"applyStyles",enabled:!0,phase:"write",fn:nte,effect:ote,requires:["computeStyles"]};function Ro(e){return e.split("-")[0]}var oa=Math.max,Rh=Math.min,rc=Math.round;function wy(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function mI(){return!/^((?!chrome|android).)*safari/i.test(wy())}function nc(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),o=1,i=1;t&&Ln(e)&&(o=e.offsetWidth>0&&rc(n.width)/e.offsetWidth||1,i=e.offsetHeight>0&&rc(n.height)/e.offsetHeight||1);var s=ka(e)?vn(e):window,a=s.visualViewport,l=!mI()&&r,c=(n.left+(l&&a?a.offsetLeft:0))/o,u=(n.top+(l&&a?a.offsetTop:0))/i,d=n.width/o,p=n.height/i;return{width:d,height:p,top:u,right:c+d,bottom:u+p,left:c,x:c,y:u}}function uE(e){var t=nc(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function gI(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&cE(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function fi(e){return vn(e).getComputedStyle(e)}function ste(e){return["table","td","th"].indexOf(Do(e))>=0}function Ts(e){return((ka(e)?e.ownerDocument:e.document)||window.document).documentElement}function fg(e){return Do(e)==="html"?e:e.assignedSlot||e.parentNode||(cE(e)?e.host:null)||Ts(e)}function m2(e){return!Ln(e)||fi(e).position==="fixed"?null:e.offsetParent}function ate(e){var t=/firefox/i.test(wy()),r=/Trident/i.test(wy());if(r&&Ln(e)){var n=fi(e);if(n.position==="fixed")return null}var o=fg(e);for(cE(o)&&(o=o.host);Ln(o)&&["html","body"].indexOf(Do(o))<0;){var i=fi(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function sp(e){for(var t=vn(e),r=m2(e);r&&ste(r)&&fi(r).position==="static";)r=m2(r);return r&&(Do(r)==="html"||Do(r)==="body"&&fi(r).position==="static")?t:r||ate(e)||t}function dE(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function $u(e,t,r){return oa(e,Rh(t,r))}function lte(e,t,r){var n=$u(e,t,r);return n>r?r:n}function yI(){return{top:0,right:0,bottom:0,left:0}}function vI(e){return Object.assign({},yI(),e)}function bI(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var cte=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,vI(typeof t!="number"?t:bI(t,ip))};function ute(e){var t,r=e.state,n=e.name,o=e.options,i=r.elements.arrow,s=r.modifiersData.popperOffsets,a=Ro(r.placement),l=dE(a),c=[Wr,Fn].indexOf(a)>=0,u=c?"height":"width";if(!(!i||!s)){var d=cte(o.padding,r),p=uE(i),f=l==="y"?Gr:Wr,h=l==="y"?Hn:Fn,m=r.rects.reference[u]+r.rects.reference[l]-s[l]-r.rects.popper[u],b=s[l]-r.rects.reference[l],y=sp(i),g=y?l==="y"?y.clientHeight||0:y.clientWidth||0:0,v=m/2-b/2,E=d[f],k=g-p[u]-d[h],x=g/2-p[u]/2+v,w=$u(E,x,k),C=l;r.modifiersData[n]=(t={},t[C]=w,t.centerOffset=w-x,t)}}function dte(e){var t=e.state,r=e.options,n=r.element,o=n===void 0?"[data-popper-arrow]":n;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||gI(t.elements.popper,o)&&(t.elements.arrow=o))}const pte={name:"arrow",enabled:!0,phase:"main",fn:ute,effect:dte,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function oc(e){return e.split("-")[1]}var fte={top:"auto",right:"auto",bottom:"auto",left:"auto"};function hte(e,t){var r=e.x,n=e.y,o=t.devicePixelRatio||1;return{x:rc(r*o)/o||0,y:rc(n*o)/o||0}}function g2(e){var t,r=e.popper,n=e.popperRect,o=e.placement,i=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,p=s.x,f=p===void 0?0:p,h=s.y,m=h===void 0?0:h,b=typeof u=="function"?u({x:f,y:m}):{x:f,y:m};f=b.x,m=b.y;var y=s.hasOwnProperty("x"),g=s.hasOwnProperty("y"),v=Wr,E=Gr,k=window;if(c){var x=sp(r),w="clientHeight",C="clientWidth";if(x===vn(r)&&(x=Ts(r),fi(x).position!=="static"&&a==="absolute"&&(w="scrollHeight",C="scrollWidth")),x=x,o===Gr||(o===Wr||o===Fn)&&i===wd){E=Hn;var T=d&&x===k&&k.visualViewport?k.visualViewport.height:x[w];m-=T-n.height,m*=l?1:-1}if(o===Wr||(o===Gr||o===Hn)&&i===wd){v=Fn;var O=d&&x===k&&k.visualViewport?k.visualViewport.width:x[C];f-=O-n.width,f*=l?1:-1}}var _=Object.assign({position:a},c&&fte),P=u===!0?hte({x:f,y:m},vn(r)):{x:f,y:m};if(f=P.x,m=P.y,l){var $;return Object.assign({},_,($={},$[E]=g?"0":"",$[v]=y?"0":"",$.transform=(k.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",$))}return Object.assign({},_,(t={},t[E]=g?m+"px":"",t[v]=y?f+"px":"",t.transform="",t))}function mte(e){var t=e.state,r=e.options,n=r.gpuAcceleration,o=n===void 0?!0:n,i=r.adaptive,s=i===void 0?!0:i,a=r.roundOffsets,l=a===void 0?!0:a,c={placement:Ro(t.placement),variation:oc(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,g2(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,g2(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const gte={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:mte,data:{}};var $p={passive:!0};function yte(e){var t=e.state,r=e.instance,n=e.options,o=n.scroll,i=o===void 0?!0:o,s=n.resize,a=s===void 0?!0:s,l=vn(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",r.update,$p)}),a&&l.addEventListener("resize",r.update,$p),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",r.update,$p)}),a&&l.removeEventListener("resize",r.update,$p)}}const vte={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:yte,data:{}};var bte={left:"right",right:"left",bottom:"top",top:"bottom"};function Tf(e){return e.replace(/left|right|bottom|top/g,function(t){return bte[t]})}var Ete={start:"end",end:"start"};function y2(e){return e.replace(/start|end/g,function(t){return Ete[t]})}function pE(e){var t=vn(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function fE(e){return nc(Ts(e)).left+pE(e).scrollLeft}function kte(e,t){var r=vn(e),n=Ts(e),o=r.visualViewport,i=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;var c=mI();(c||!c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a+fE(e),y:l}}function xte(e){var t,r=Ts(e),n=pE(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=oa(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=oa(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-n.scrollLeft+fE(e),l=-n.scrollTop;return fi(o||r).direction==="rtl"&&(a+=oa(r.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}function hE(e){var t=fi(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function EI(e){return["html","body","#document"].indexOf(Do(e))>=0?e.ownerDocument.body:Ln(e)&&hE(e)?e:EI(fg(e))}function Bu(e,t){var r;t===void 0&&(t=[]);var n=EI(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),i=vn(n),s=o?[i].concat(i.visualViewport||[],hE(n)?n:[]):n,a=t.concat(s);return o?a:a.concat(Bu(fg(s)))}function Ty(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ste(e,t){var r=nc(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function v2(e,t,r){return t===fI?Ty(kte(e,r)):ka(t)?Ste(t,r):Ty(xte(Ts(e)))}function wte(e){var t=Bu(fg(e)),r=["absolute","fixed"].indexOf(fi(e).position)>=0,n=r&&Ln(e)?sp(e):e;return ka(n)?t.filter(function(o){return ka(o)&&gI(o,n)&&Do(o)!=="body"}):[]}function Tte(e,t,r,n){var o=t==="clippingParents"?wte(e):[].concat(t),i=[].concat(o,[r]),s=i[0],a=i.reduce(function(l,c){var u=v2(e,c,n);return l.top=oa(u.top,l.top),l.right=Rh(u.right,l.right),l.bottom=Rh(u.bottom,l.bottom),l.left=oa(u.left,l.left),l},v2(e,s,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function kI(e){var t=e.reference,r=e.element,n=e.placement,o=n?Ro(n):null,i=n?oc(n):null,s=t.x+t.width/2-r.width/2,a=t.y+t.height/2-r.height/2,l;switch(o){case Gr:l={x:s,y:t.y-r.height};break;case Hn:l={x:s,y:t.y+t.height};break;case Fn:l={x:t.x+t.width,y:a};break;case Wr:l={x:t.x-r.width,y:a};break;default:l={x:t.x,y:t.y}}var c=o?dE(o):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case tc:l[c]=l[c]-(t[u]/2-r[u]/2);break;case wd:l[c]=l[c]+(t[u]/2-r[u]/2);break}}return l}function Td(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=n===void 0?e.placement:n,i=r.strategy,s=i===void 0?e.strategy:i,a=r.boundary,l=a===void 0?Gee:a,c=r.rootBoundary,u=c===void 0?fI:c,d=r.elementContext,p=d===void 0?$c:d,f=r.altBoundary,h=f===void 0?!1:f,m=r.padding,b=m===void 0?0:m,y=vI(typeof b!="number"?b:bI(b,ip)),g=p===$c?Wee:$c,v=e.rects.popper,E=e.elements[h?g:p],k=Tte(ka(E)?E:E.contextElement||Ts(e.elements.popper),l,u,s),x=nc(e.elements.reference),w=kI({reference:x,element:v,strategy:"absolute",placement:o}),C=Ty(Object.assign({},v,w)),T=p===$c?C:x,O={top:k.top-T.top+y.top,bottom:T.bottom-k.bottom+y.bottom,left:k.left-T.left+y.left,right:T.right-k.right+y.right},_=e.modifiersData.offset;if(p===$c&&_){var P=_[o];Object.keys(O).forEach(function($){var B=[Fn,Hn].indexOf($)>=0?1:-1,F=[Gr,Hn].indexOf($)>=0?"y":"x";O[$]+=P[F]*B})}return O}function Cte(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=r.boundary,i=r.rootBoundary,s=r.padding,a=r.flipVariations,l=r.allowedAutoPlacements,c=l===void 0?hI:l,u=oc(n),d=u?a?h2:h2.filter(function(h){return oc(h)===u}):ip,p=d.filter(function(h){return c.indexOf(h)>=0});p.length===0&&(p=d);var f=p.reduce(function(h,m){return h[m]=Td(e,{placement:m,boundary:o,rootBoundary:i,padding:s})[Ro(m)],h},{});return Object.keys(f).sort(function(h,m){return f[h]-f[m]})}function Ote(e){if(Ro(e)===lE)return[];var t=Tf(e);return[y2(e),t,y2(t)]}function Ate(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,i=o===void 0?!0:o,s=r.altAxis,a=s===void 0?!0:s,l=r.fallbackPlacements,c=r.padding,u=r.boundary,d=r.rootBoundary,p=r.altBoundary,f=r.flipVariations,h=f===void 0?!0:f,m=r.allowedAutoPlacements,b=t.options.placement,y=Ro(b),g=y===b,v=l||(g||!h?[Tf(b)]:Ote(b)),E=[b].concat(v).reduce(function(ae,pe){return ae.concat(Ro(pe)===lE?Cte(t,{placement:pe,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:m}):pe)},[]),k=t.rects.reference,x=t.rects.popper,w=new Map,C=!0,T=E[0],O=0;O=0,F=B?"width":"height",z=Td(t,{placement:_,boundary:u,rootBoundary:d,altBoundary:p,padding:c}),G=B?$?Fn:Wr:$?Hn:Gr;k[F]>x[F]&&(G=Tf(G));var R=Tf(G),M=[];if(i&&M.push(z[P]<=0),a&&M.push(z[G]<=0,z[R]<=0),M.every(function(ae){return ae})){T=_,C=!1;break}w.set(_,M)}if(C)for(var L=h?3:1,K=function(pe){var fe=E.find(function(ge){var Ae=w.get(ge);if(Ae)return Ae.slice(0,pe).every(function(Te){return Te})});if(fe)return T=fe,"break"},q=L;q>0;q--){var Re=K(q);if(Re==="break")break}t.placement!==T&&(t.modifiersData[n]._skip=!0,t.placement=T,t.reset=!0)}}const Nte={name:"flip",enabled:!0,phase:"main",fn:Ate,requiresIfExists:["offset"],data:{_skip:!1}};function b2(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function E2(e){return[Gr,Fn,Hn,Wr].some(function(t){return e[t]>=0})}function Rte(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,s=Td(t,{elementContext:"reference"}),a=Td(t,{altBoundary:!0}),l=b2(s,n),c=b2(a,o,i),u=E2(l),d=E2(c);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const _te={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Rte};function Ite(e,t,r){var n=Ro(e),o=[Wr,Gr].indexOf(n)>=0?-1:1,i=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,s=i[0],a=i[1];return s=s||0,a=(a||0)*o,[Wr,Fn].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}function Mte(e){var t=e.state,r=e.options,n=e.name,o=r.offset,i=o===void 0?[0,0]:o,s=hI.reduce(function(u,d){return u[d]=Ite(d,t.rects,i),u},{}),a=s[t.placement],l=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=s}const Lte={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Mte};function Dte(e){var t=e.state,r=e.name;t.modifiersData[r]=kI({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Pte={name:"popperOffsets",enabled:!0,phase:"read",fn:Dte,data:{}};function zte(e){return e==="x"?"y":"x"}function $te(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,i=o===void 0?!0:o,s=r.altAxis,a=s===void 0?!1:s,l=r.boundary,c=r.rootBoundary,u=r.altBoundary,d=r.padding,p=r.tether,f=p===void 0?!0:p,h=r.tetherOffset,m=h===void 0?0:h,b=Td(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),y=Ro(t.placement),g=oc(t.placement),v=!g,E=dE(y),k=zte(E),x=t.modifiersData.popperOffsets,w=t.rects.reference,C=t.rects.popper,T=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,O=typeof T=="number"?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,P={x:0,y:0};if(x){if(i){var $,B=E==="y"?Gr:Wr,F=E==="y"?Hn:Fn,z=E==="y"?"height":"width",G=x[E],R=G+b[B],M=G-b[F],L=f?-C[z]/2:0,K=g===tc?w[z]:C[z],q=g===tc?-C[z]:-w[z],Re=t.elements.arrow,ae=f&&Re?uE(Re):{width:0,height:0},pe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:yI(),fe=pe[B],ge=pe[F],Ae=$u(0,w[z],ae[z]),Te=v?w[z]/2-L-Ae-fe-O.mainAxis:K-Ae-fe-O.mainAxis,gt=v?-w[z]/2+L+Ae+ge+O.mainAxis:q+Ae+ge+O.mainAxis,it=t.elements.arrow&&sp(t.elements.arrow),Ir=it?E==="y"?it.clientTop||0:it.clientLeft||0:0,me=($=_==null?void 0:_[E])!=null?$:0,He=G+Te-me-Ir,Xe=G+gt-me,Gn=$u(f?Rh(R,He):R,G,f?oa(M,Xe):M);x[E]=Gn,P[E]=Gn-G}if(a){var Xr,sr=E==="x"?Gr:Wr,Bo=E==="x"?Hn:Fn,$t=x[k],Zr=k==="y"?"height":"width",xn=$t+b[sr],Wn=$t-b[Bo],tt=[Gr,Wr].indexOf(y)!==-1,Jr=(Xr=_==null?void 0:_[k])!=null?Xr:0,Sn=tt?xn:$t-w[Zr]-C[Zr]-Jr+O.altAxis,bi=tt?$t+w[Zr]+C[Zr]-Jr-O.altAxis:Wn,Pa=f&&tt?lte(Sn,$t,bi):$u(f?Sn:xn,$t,f?bi:Wn);x[k]=Pa,P[k]=Pa-$t}t.modifiersData[n]=P}}const Bte={name:"preventOverflow",enabled:!0,phase:"main",fn:$te,requiresIfExists:["offset"]};function Hte(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Fte(e){return e===vn(e)||!Ln(e)?pE(e):Hte(e)}function Ute(e){var t=e.getBoundingClientRect(),r=rc(t.width)/e.offsetWidth||1,n=rc(t.height)/e.offsetHeight||1;return r!==1||n!==1}function Vte(e,t,r){r===void 0&&(r=!1);var n=Ln(t),o=Ln(t)&&Ute(t),i=Ts(t),s=nc(e,o,r),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!r)&&((Do(t)!=="body"||hE(i))&&(a=Fte(t)),Ln(t)?(l=nc(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=fE(i))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function jte(e){var t=new Map,r=new Set,n=[];e.forEach(function(i){t.set(i.name,i)});function o(i){r.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(a){if(!r.has(a)){var l=t.get(a);l&&o(l)}}),n.push(i)}return e.forEach(function(i){r.has(i.name)||o(i)}),n}function Gte(e){var t=jte(e);return rte.reduce(function(r,n){return r.concat(t.filter(function(o){return o.phase===n}))},[])}function Wte(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function Kte(e){var t=e.reduce(function(r,n){var o=r[n.name];return r[n.name]=o?Object.assign({},o,n,{options:Object.assign({},o.options,n.options),data:Object.assign({},o.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var k2={placement:"bottom",modifiers:[],strategy:"absolute"};function x2(){for(var e=arguments.length,t=new Array(e),r=0;r{i||a(Zte(o)||document.body)},[o,i]),va(()=>{if(s&&!i)return yy(r,s),()=>{yy(r,null)}},[r,s,i]),i){if(S.isValidElement(n)){const c={ref:l};return S.cloneElement(n,c)}return A.jsx(S.Fragment,{children:n})}return A.jsx(S.Fragment,{children:s&&ep.createPortal(n,s)})});function Jte(e){return Kt("MuiPopper",e)}Yt("MuiPopper",["root"]);const Qte=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],ere=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function tre(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function Cy(e){return typeof e=="function"?e():e}function rre(e){return e.nodeType!==void 0}const nre=()=>ir({root:["root"]},Mee(Jte)),ore={},ire=S.forwardRef(function(t,r){var n;const{anchorEl:o,children:i,direction:s,disablePortal:a,modifiers:l,open:c,placement:u,popperOptions:d,popperRef:p,slotProps:f={},slots:h={},TransitionProps:m}=t,b=be(t,Qte),y=S.useRef(null),g=Kr(y,r),v=S.useRef(null),E=Kr(v,p),k=S.useRef(E);va(()=>{k.current=E},[E]),S.useImperativeHandle(p,()=>v.current,[]);const x=tre(u,s),[w,C]=S.useState(x),[T,O]=S.useState(Cy(o));S.useEffect(()=>{v.current&&v.current.forceUpdate()}),S.useEffect(()=>{o&&O(Cy(o))},[o]),va(()=>{if(!T||!c)return;const F=R=>{C(R.placement)};let z=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:R})=>{F(R)}}];l!=null&&(z=z.concat(l)),d&&d.modifiers!=null&&(z=z.concat(d.modifiers));const G=Xte(T,y.current,N({placement:x},d,{modifiers:z}));return k.current(G),()=>{G.destroy(),k.current(null)}},[T,a,l,c,d,x]);const _={placement:w};m!==null&&(_.TransitionProps=m);const P=nre(),$=(n=h.root)!=null?n:"div",B=pi({elementType:$,externalSlotProps:f.root,externalForwardedProps:b,additionalProps:{role:"tooltip",ref:g},ownerState:t,className:P.root});return A.jsx($,N({},B,{children:typeof i=="function"?i(_):i}))}),sre=S.forwardRef(function(t,r){const{anchorEl:n,children:o,container:i,direction:s="ltr",disablePortal:a=!1,keepMounted:l=!1,modifiers:c,open:u,placement:d="bottom",popperOptions:p=ore,popperRef:f,style:h,transition:m=!1,slotProps:b={},slots:y={}}=t,g=be(t,ere),[v,E]=S.useState(!0),k=()=>{E(!1)},x=()=>{E(!0)};if(!l&&!u&&(!m||v))return null;let w;if(i)w=i;else if(n){const O=Cy(n);w=O&&rre(O)?jr(O).body:jr(null).body}const C=!u&&l&&(!m||v)?"none":void 0,T=m?{in:u,onEnter:k,onExited:x}:void 0;return A.jsx(xI,{disablePortal:a,container:w,children:A.jsx(ire,N({anchorEl:n,direction:s,disablePortal:a,modifiers:c,ref:r,open:m?!v:u,placement:d,popperOptions:p,popperRef:f,slotProps:b,slots:y},g,{style:N({position:"fixed",top:0,left:0,display:C},h),TransitionProps:T,children:o}))})});function are(e){const t=jr(e);return t.body===e?Ed(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Hu(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function S2(e){return parseInt(Ed(e).getComputedStyle(e).paddingRight,10)||0}function lre(e){const r=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,n=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return r||n}function w2(e,t,r,n,o){const i=[t,r,...n];[].forEach.call(e.children,s=>{const a=i.indexOf(s)===-1,l=!lre(s);a&&l&&Hu(s,o)})}function T1(e,t){let r=-1;return e.some((n,o)=>t(n)?(r=o,!0):!1),r}function cre(e,t){const r=[],n=e.container;if(!t.disableScrollLock){if(are(n)){const s=__(jr(n));r.push({value:n.style.paddingRight,property:"padding-right",el:n}),n.style.paddingRight=`${S2(n)+s}px`;const a=jr(n).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{r.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${S2(l)+s}px`})}let i;if(n.parentNode instanceof DocumentFragment)i=jr(n).body;else{const s=n.parentElement,a=Ed(n);i=(s==null?void 0:s.nodeName)==="HTML"&&a.getComputedStyle(s).overflowY==="scroll"?s:n}r.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{r.forEach(({value:i,el:s,property:a})=>{i?s.style.setProperty(a,i):s.style.removeProperty(a)})}}function ure(e){const t=[];return[].forEach.call(e.children,r=>{r.getAttribute("aria-hidden")==="true"&&t.push(r)}),t}class dre{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,r){let n=this.modals.indexOf(t);if(n!==-1)return n;n=this.modals.length,this.modals.push(t),t.modalRef&&Hu(t.modalRef,!1);const o=ure(r);w2(r,t.mount,t.modalRef,o,!0);const i=T1(this.containers,s=>s.container===r);return i!==-1?(this.containers[i].modals.push(t),n):(this.containers.push({modals:[t],container:r,restore:null,hiddenSiblings:o}),n)}mount(t,r){const n=T1(this.containers,i=>i.modals.indexOf(t)!==-1),o=this.containers[n];o.restore||(o.restore=cre(o,r))}remove(t,r=!0){const n=this.modals.indexOf(t);if(n===-1)return n;const o=T1(this.containers,s=>s.modals.indexOf(t)!==-1),i=this.containers[o];if(i.modals.splice(i.modals.indexOf(t),1),this.modals.splice(n,1),i.modals.length===0)i.restore&&i.restore(),t.modalRef&&Hu(t.modalRef,r),w2(i.container,t.mount,t.modalRef,i.hiddenSiblings,!1),this.containers.splice(o,1);else{const s=i.modals[i.modals.length-1];s.modalRef&&Hu(s.modalRef,!1)}return n}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function pre(e){return typeof e=="function"?e():e}function fre(e){return e?e.props.hasOwnProperty("in"):!1}const hre=new dre;function mre(e){const{container:t,disableEscapeKeyDown:r=!1,disableScrollLock:n=!1,manager:o=hre,closeAfterTransition:i=!1,onTransitionEnter:s,onTransitionExited:a,children:l,onClose:c,open:u,rootRef:d}=e,p=S.useRef({}),f=S.useRef(null),h=S.useRef(null),m=Kr(h,d),[b,y]=S.useState(!u),g=fre(l);let v=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(v=!1);const E=()=>jr(f.current),k=()=>(p.current.modalRef=h.current,p.current.mount=f.current,p.current),x=()=>{o.mount(k(),{disableScrollLock:n}),h.current&&(h.current.scrollTop=0)},w=Xs(()=>{const z=pre(t)||E().body;o.add(k(),z),h.current&&x()}),C=S.useCallback(()=>o.isTopModal(k()),[o]),T=Xs(z=>{f.current=z,z&&(u&&C()?x():h.current&&Hu(h.current,v))}),O=S.useCallback(()=>{o.remove(k(),v)},[v,o]);S.useEffect(()=>()=>{O()},[O]),S.useEffect(()=>{u?w():(!g||!i)&&O()},[u,O,g,i,w]);const _=z=>G=>{var R;(R=z.onKeyDown)==null||R.call(z,G),!(G.key!=="Escape"||!C())&&(r||(G.stopPropagation(),c&&c(G,"escapeKeyDown")))},P=z=>G=>{var R;(R=z.onClick)==null||R.call(z,G),G.target===G.currentTarget&&c&&c(G,"backdropClick")};return{getRootProps:(z={})=>{const G=pI(e);delete G.onTransitionEnter,delete G.onTransitionExited;const R=N({},G,z);return N({role:"presentation"},R,{onKeyDown:_(R),ref:m})},getBackdropProps:(z={})=>{const G=z;return N({"aria-hidden":!0},G,{onClick:P(G),open:u})},getTransitionProps:()=>{const z=()=>{y(!1),s&&s()},G=()=>{y(!0),a&&a(),i&&O()};return{onEnter:DT(z,l==null?void 0:l.props.onEnter),onExited:DT(G,l==null?void 0:l.props.onExited)}},rootRef:m,portalRef:T,isTopModal:C,exited:b,hasTransition:g}}const gre=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],yre=et(sre,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),vre=S.forwardRef(function(t,r){var n;const o=Jb(),i=Xt({props:t,name:"MuiPopper"}),{anchorEl:s,component:a,components:l,componentsProps:c,container:u,disablePortal:d,keepMounted:p,modifiers:f,open:h,placement:m,popperOptions:b,popperRef:y,transition:g,slots:v,slotProps:E}=i,k=be(i,gre),x=(n=v==null?void 0:v.root)!=null?n:l==null?void 0:l.Root,w=N({anchorEl:s,container:u,disablePortal:d,keepMounted:p,modifiers:f,open:h,placement:m,popperOptions:b,popperRef:y,transition:g},k);return A.jsx(yre,N({as:a,direction:o==null?void 0:o.direction,slots:{root:x},slotProps:E??c},w,{ref:r}))}),mE=vre,bre=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Ere={entering:{opacity:1},entered:{opacity:1}},kre=S.forwardRef(function(t,r){const n=dg(),o={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:s=!0,children:a,easing:l,in:c,onEnter:u,onEntered:d,onEntering:p,onExit:f,onExited:h,onExiting:m,style:b,timeout:y=o,TransitionComponent:g=cI}=t,v=be(t,bre),E=S.useRef(null),k=Kr(E,a.ref,r),x=B=>F=>{if(B){const z=E.current;F===void 0?B(z):B(z,F)}},w=x(p),C=x((B,F)=>{uI(B);const z=Nh({style:b,timeout:y,easing:l},{mode:"enter"});B.style.webkitTransition=n.transitions.create("opacity",z),B.style.transition=n.transitions.create("opacity",z),u&&u(B,F)}),T=x(d),O=x(m),_=x(B=>{const F=Nh({style:b,timeout:y,easing:l},{mode:"exit"});B.style.webkitTransition=n.transitions.create("opacity",F),B.style.transition=n.transitions.create("opacity",F),f&&f(B)}),P=x(h),$=B=>{i&&i(E.current,B)};return A.jsx(g,N({appear:s,in:c,nodeRef:E,onEnter:C,onEntered:T,onEntering:w,onExit:_,onExited:P,onExiting:O,addEndListener:$,timeout:y},v,{children:(B,F)=>S.cloneElement(a,N({style:N({opacity:0,visibility:B==="exited"&&!c?"hidden":void 0},Ere[B],b,a.props.style),ref:k},F))}))}),xre=kre;function Sre(e){return Kt("MuiBackdrop",e)}Yt("MuiBackdrop",["root","invisible"]);const wre=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],Tre=e=>{const{classes:t,invisible:r}=e;return ir({root:["root",r&&"invisible"]},Sre,t)},Cre=et("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.invisible&&t.invisible]}})(({ownerState:e})=>N({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),Ore=S.forwardRef(function(t,r){var n,o,i;const s=Xt({props:t,name:"MuiBackdrop"}),{children:a,className:l,component:c="div",components:u={},componentsProps:d={},invisible:p=!1,open:f,slotProps:h={},slots:m={},TransitionComponent:b=xre,transitionDuration:y}=s,g=be(s,wre),v=N({},s,{component:c,invisible:p}),E=Tre(v),k=(n=h.root)!=null?n:d.root;return A.jsx(b,N({in:f,timeout:y},g,{children:A.jsx(Cre,N({"aria-hidden":!0},k,{as:(o=(i=m.root)!=null?i:u.Root)!=null?o:c,className:Oe(E.root,l,k==null?void 0:k.className),ownerState:N({},v,k==null?void 0:k.ownerState),classes:E,ref:r,children:a}))}))}),Are=Ore;function Nre(e){return Kt("MuiBadge",e)}const Rre=Yt("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),wi=Rre,_re=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],C1=10,O1=4,Ire=e=>{const{color:t,anchorOrigin:r,invisible:n,overlap:o,variant:i,classes:s={}}=e,a={root:["root"],badge:["badge",i,n&&"invisible",`anchorOrigin${Ge(r.vertical)}${Ge(r.horizontal)}`,`anchorOrigin${Ge(r.vertical)}${Ge(r.horizontal)}${Ge(o)}`,`overlap${Ge(o)}`,t!=="default"&&`color${Ge(t)}`]};return ir(a,Nre,s)},Mre=et("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),Lre=et("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.badge,t[r.variant],t[`anchorOrigin${Ge(r.anchorOrigin.vertical)}${Ge(r.anchorOrigin.horizontal)}${Ge(r.overlap)}`],r.color!=="default"&&t[`color${Ge(r.color)}`],r.invisible&&t.invisible]}})(({theme:e,ownerState:t})=>N({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:C1*2,lineHeight:1,padding:"0 6px",height:C1*2,borderRadius:C1,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen})},t.color!=="default"&&{backgroundColor:(e.vars||e).palette[t.color].main,color:(e.vars||e).palette[t.color].contrastText},t.variant==="dot"&&{borderRadius:O1,height:O1*2,minWidth:O1*2,padding:0},t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular"&&{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${wi.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}},t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular"&&{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${wi.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}},t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular"&&{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${wi.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}},t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular"&&{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${wi.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}},t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular"&&{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${wi.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}},t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular"&&{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${wi.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}},t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular"&&{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${wi.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}},t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular"&&{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${wi.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}},t.invisible&&{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})})),Dre=S.forwardRef(function(t,r){var n,o,i,s,a,l;const c=Xt({props:t,name:"MuiBadge"}),{anchorOrigin:u={vertical:"top",horizontal:"right"},className:d,component:p,components:f={},componentsProps:h={},children:m,overlap:b="rectangular",color:y="default",invisible:g=!1,max:v=99,badgeContent:E,slots:k,slotProps:x,showZero:w=!1,variant:C="standard"}=c,T=be(c,_re),{badgeContent:O,invisible:_,max:P,displayValue:$}=zee({max:v,invisible:g,badgeContent:E,showZero:w}),B=I_({anchorOrigin:u,color:y,overlap:b,variant:C,badgeContent:E}),F=_||O==null&&C!=="dot",{color:z=y,overlap:G=b,anchorOrigin:R=u,variant:M=C}=F?B:c,L=M!=="dot"?$:void 0,K=N({},c,{badgeContent:O,invisible:F,max:P,displayValue:L,showZero:w,anchorOrigin:R,color:z,overlap:G,variant:M}),q=Ire(K),Re=(n=(o=k==null?void 0:k.root)!=null?o:f.Root)!=null?n:Mre,ae=(i=(s=k==null?void 0:k.badge)!=null?s:f.Badge)!=null?i:Lre,pe=(a=x==null?void 0:x.root)!=null?a:h.root,fe=(l=x==null?void 0:x.badge)!=null?l:h.badge,ge=pi({elementType:Re,externalSlotProps:pe,externalForwardedProps:T,additionalProps:{ref:r,as:p},ownerState:K,className:Oe(pe==null?void 0:pe.className,q.root,d)}),Ae=pi({elementType:ae,externalSlotProps:fe,ownerState:K,className:Oe(q.badge,fe==null?void 0:fe.className)});return A.jsxs(Re,N({},ge,{children:[m,A.jsx(ae,N({},Ae,{children:L}))]}))}),Pre=Dre,zre=rE(),$re=NJ({themeId:Ql,defaultTheme:zre,defaultClassName:"MuiBox-root",generateClassName:L_.generate}),SI=$re;function Bre(e){return Kt("MuiModal",e)}Yt("MuiModal",["root","hidden","backdrop"]);const Hre=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],Fre=e=>{const{open:t,exited:r,classes:n}=e;return ir({root:["root",!t&&r&&"hidden"],backdrop:["backdrop"]},Bre,n)},Ure=et("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.open&&r.exited&&t.hidden]}})(({theme:e,ownerState:t})=>N({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),Vre=et(Are,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),jre=S.forwardRef(function(t,r){var n,o,i,s,a,l;const c=Xt({name:"MuiModal",props:t}),{BackdropComponent:u=Vre,BackdropProps:d,className:p,closeAfterTransition:f=!1,children:h,container:m,component:b,components:y={},componentsProps:g={},disableAutoFocus:v=!1,disableEnforceFocus:E=!1,disableEscapeKeyDown:k=!1,disablePortal:x=!1,disableRestoreFocus:w=!1,disableScrollLock:C=!1,hideBackdrop:T=!1,keepMounted:O=!1,onBackdropClick:_,open:P,slotProps:$,slots:B}=c,F=be(c,Hre),z=N({},c,{closeAfterTransition:f,disableAutoFocus:v,disableEnforceFocus:E,disableEscapeKeyDown:k,disablePortal:x,disableRestoreFocus:w,disableScrollLock:C,hideBackdrop:T,keepMounted:O}),{getRootProps:G,getBackdropProps:R,getTransitionProps:M,portalRef:L,isTopModal:K,exited:q,hasTransition:Re}=mre(N({},z,{rootRef:r})),ae=N({},z,{exited:q}),pe=Fre(ae),fe={};if(h.props.tabIndex===void 0&&(fe.tabIndex="-1"),Re){const{onEnter:me,onExited:He}=M();fe.onEnter=me,fe.onExited=He}const ge=(n=(o=B==null?void 0:B.root)!=null?o:y.Root)!=null?n:Ure,Ae=(i=(s=B==null?void 0:B.backdrop)!=null?s:y.Backdrop)!=null?i:u,Te=(a=$==null?void 0:$.root)!=null?a:g.root,gt=(l=$==null?void 0:$.backdrop)!=null?l:g.backdrop,it=pi({elementType:ge,externalSlotProps:Te,externalForwardedProps:F,getSlotProps:G,additionalProps:{ref:r,as:b},ownerState:ae,className:Oe(p,Te==null?void 0:Te.className,pe==null?void 0:pe.root,!ae.open&&ae.exited&&(pe==null?void 0:pe.hidden))}),Ir=pi({elementType:Ae,externalSlotProps:gt,additionalProps:d,getSlotProps:me=>R(N({},me,{onClick:He=>{_&&_(He),me!=null&&me.onClick&&me.onClick(He)}})),className:Oe(gt==null?void 0:gt.className,d==null?void 0:d.className,pe==null?void 0:pe.backdrop),ownerState:ae});return!O&&!P&&(!Re||q)?null:A.jsx(xI,{ref:L,container:m,disablePortal:x,children:A.jsxs(ge,N({},it,{children:[!T&&u?A.jsx(Ae,N({},Ir)):null,A.jsx(jee,{disableEnforceFocus:E,disableAutoFocus:v,disableRestoreFocus:w,isEnabled:K,open:P,children:S.cloneElement(h,fe)})]}))})}),Gre=jre,Wre=Yt("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),T2=Wre,Kre=aQ({createStyledComponent:et("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>Xt({props:e,name:"MuiStack"})}),Yre=Kre,qre=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Oy(e){return`scale(${e}, ${e**2})`}const Xre={entering:{opacity:1,transform:Oy(1)},entered:{opacity:1,transform:"none"}},A1=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),wI=S.forwardRef(function(t,r){const{addEndListener:n,appear:o=!0,children:i,easing:s,in:a,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:p,onExiting:f,style:h,timeout:m="auto",TransitionComponent:b=cI}=t,y=be(t,qre),g=S.useRef(),v=S.useRef(),E=dg(),k=S.useRef(null),x=Kr(k,i.ref,r),w=F=>z=>{if(F){const G=k.current;z===void 0?F(G):F(G,z)}},C=w(u),T=w((F,z)=>{uI(F);const{duration:G,delay:R,easing:M}=Nh({style:h,timeout:m,easing:s},{mode:"enter"});let L;m==="auto"?(L=E.transitions.getAutoHeightDuration(F.clientHeight),v.current=L):L=G,F.style.transition=[E.transitions.create("opacity",{duration:L,delay:R}),E.transitions.create("transform",{duration:A1?L:L*.666,delay:R,easing:M})].join(","),l&&l(F,z)}),O=w(c),_=w(f),P=w(F=>{const{duration:z,delay:G,easing:R}=Nh({style:h,timeout:m,easing:s},{mode:"exit"});let M;m==="auto"?(M=E.transitions.getAutoHeightDuration(F.clientHeight),v.current=M):M=z,F.style.transition=[E.transitions.create("opacity",{duration:M,delay:G}),E.transitions.create("transform",{duration:A1?M:M*.666,delay:A1?G:G||M*.333,easing:R})].join(","),F.style.opacity=0,F.style.transform=Oy(.75),d&&d(F)}),$=w(p),B=F=>{m==="auto"&&(g.current=setTimeout(F,v.current||0)),n&&n(k.current,F)};return S.useEffect(()=>()=>{clearTimeout(g.current)},[]),A.jsx(b,N({appear:o,in:a,nodeRef:k,onEnter:T,onEntered:O,onEntering:C,onExit:P,onExited:$,onExiting:_,addEndListener:B,timeout:m==="auto"?null:m},y,{children:(F,z)=>S.cloneElement(i,N({style:N({opacity:0,transform:Oy(.75),visibility:F==="exited"&&!a?"hidden":void 0},Xre[F],h,i.props.style),ref:x},z))}))});wI.muiSupportAuto=!0;const Ay=wI,Zre=S.createContext({}),Cd=Zre;function Jre(e){return Kt("MuiList",e)}Yt("MuiList",["root","padding","dense","subheader"]);const Qre=["children","className","component","dense","disablePadding","subheader"],ene=e=>{const{classes:t,disablePadding:r,dense:n,subheader:o}=e;return ir({root:["root",!r&&"padding",n&&"dense",o&&"subheader"]},Jre,t)},tne=et("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disablePadding&&t.padding,r.dense&&t.dense,r.subheader&&t.subheader]}})(({ownerState:e})=>N({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),rne=S.forwardRef(function(t,r){const n=Xt({props:t,name:"MuiList"}),{children:o,className:i,component:s="ul",dense:a=!1,disablePadding:l=!1,subheader:c}=n,u=be(n,Qre),d=S.useMemo(()=>({dense:a}),[a]),p=N({},n,{component:s,dense:a,disablePadding:l}),f=ene(p);return A.jsx(Cd.Provider,{value:d,children:A.jsxs(tne,N({as:s,className:Oe(f.root,i),ref:r,ownerState:p},u,{children:[c,o]}))})}),nne=rne;function one(e){return Kt("MuiListItemIcon",e)}const ine=Yt("MuiListItemIcon",["root","alignItemsFlexStart"]),C2=ine,sne=["className"],ane=e=>{const{alignItems:t,classes:r}=e;return ir({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},one,r)},lne=et("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>N({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},t.alignItems==="flex-start"&&{marginTop:8})),cne=S.forwardRef(function(t,r){const n=Xt({props:t,name:"MuiListItemIcon"}),{className:o}=n,i=be(n,sne),s=S.useContext(Cd),a=N({},n,{alignItems:s.alignItems}),l=ane(a);return A.jsx(lne,N({className:Oe(l.root,o),ownerState:a,ref:r},i))}),une=cne;function dne(e){return Kt("MuiListItemText",e)}const pne=Yt("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),_h=pne,fne=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],hne=e=>{const{classes:t,inset:r,primary:n,secondary:o,dense:i}=e;return ir({root:["root",r&&"inset",i&&"dense",n&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},dne,t)},mne=et("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${_h.primary}`]:t.primary},{[`& .${_h.secondary}`]:t.secondary},t.root,r.inset&&t.inset,r.primary&&r.secondary&&t.multiline,r.dense&&t.dense]}})(({ownerState:e})=>N({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),gne=S.forwardRef(function(t,r){const n=Xt({props:t,name:"MuiListItemText"}),{children:o,className:i,disableTypography:s=!1,inset:a=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:d}=n,p=be(n,fne),{dense:f}=S.useContext(Cd);let h=l??o,m=u;const b=N({},n,{disableTypography:s,inset:a,primary:!!h,secondary:!!m,dense:f}),y=hne(b);return h!=null&&h.type!==ku&&!s&&(h=A.jsx(ku,N({variant:f?"body2":"body1",className:y.primary,component:c!=null&&c.variant?void 0:"span",display:"block"},c,{children:h}))),m!=null&&m.type!==ku&&!s&&(m=A.jsx(ku,N({variant:"body2",className:y.secondary,color:"text.secondary",display:"block"},d,{children:m}))),A.jsxs(mne,N({className:Oe(y.root,i),ownerState:b,ref:r},p,{children:[h,m]}))}),yne=gne,vne=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function N1(e,t,r){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:r?null:e.firstChild}function O2(e,t,r){return e===t?r?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:r?null:e.lastChild}function TI(e,t){if(t===void 0)return!0;let r=e.innerText;return r===void 0&&(r=e.textContent),r=r.trim().toLowerCase(),r.length===0?!1:t.repeating?r[0]===t.keys[0]:r.indexOf(t.keys.join(""))===0}function Bc(e,t,r,n,o,i){let s=!1,a=o(e,t,t?r:!1);for(;a;){if(a===e.firstChild){if(s)return!1;s=!0}const l=n?!1:a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||!TI(a,i)||l)a=o(e,a,r);else return a.focus(),!0}return!1}const bne=S.forwardRef(function(t,r){const{actions:n,autoFocus:o=!1,autoFocusItem:i=!1,children:s,className:a,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu"}=t,p=be(t,vne),f=S.useRef(null),h=S.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});va(()=>{o&&f.current.focus()},[o]),S.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(v,E)=>{const k=!f.current.style.width;if(v.clientHeight{const E=f.current,k=v.key,x=jr(E).activeElement;if(k==="ArrowDown")v.preventDefault(),Bc(E,x,c,l,N1);else if(k==="ArrowUp")v.preventDefault(),Bc(E,x,c,l,O2);else if(k==="Home")v.preventDefault(),Bc(E,null,c,l,N1);else if(k==="End")v.preventDefault(),Bc(E,null,c,l,O2);else if(k.length===1){const w=h.current,C=k.toLowerCase(),T=performance.now();w.keys.length>0&&(T-w.lastTime>500?(w.keys=[],w.repeating=!0,w.previousKeyMatched=!0):w.repeating&&C!==w.keys[0]&&(w.repeating=!1)),w.lastTime=T,w.keys.push(C);const O=x&&!w.repeating&&TI(x,w);w.previousKeyMatched&&(O||Bc(E,x,!1,l,N1,w))?v.preventDefault():w.previousKeyMatched=!1}u&&u(v)},b=Kr(f,r);let y=-1;S.Children.forEach(s,(v,E)=>{if(!S.isValidElement(v)){y===E&&(y+=1,y>=s.length&&(y=-1));return}v.props.disabled||(d==="selectedMenu"&&v.props.selected||y===-1)&&(y=E),y===E&&(v.props.disabled||v.props.muiSkipListHighlight||v.type.muiSkipListHighlight)&&(y+=1,y>=s.length&&(y=-1))});const g=S.Children.map(s,(v,E)=>{if(E===y){const k={};return i&&(k.autoFocus=!0),v.props.tabIndex===void 0&&d==="selectedMenu"&&(k.tabIndex=0),S.cloneElement(v,k)}return v});return A.jsx(nne,N({role:"menu",ref:b,className:a,onKeyDown:m,tabIndex:o?0:-1},p,{children:g}))}),Ene=bne;function kne(e){return Kt("MuiPopover",e)}Yt("MuiPopover",["root","paper"]);const xne=["onEntering"],Sne=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],wne=["slotProps"];function A2(e,t){let r=0;return typeof t=="number"?r=t:t==="center"?r=e.height/2:t==="bottom"&&(r=e.height),r}function N2(e,t){let r=0;return typeof t=="number"?r=t:t==="center"?r=e.width/2:t==="right"&&(r=e.width),r}function R2(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function R1(e){return typeof e=="function"?e():e}const Tne=e=>{const{classes:t}=e;return ir({root:["root"],paper:["paper"]},kne,t)},Cne=et(Gre,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),CI=et(ZQ,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),One=S.forwardRef(function(t,r){var n,o,i;const s=Xt({props:t,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:d="anchorEl",children:p,className:f,container:h,elevation:m=8,marginThreshold:b=16,open:y,PaperProps:g={},slots:v,slotProps:E,transformOrigin:k={vertical:"top",horizontal:"left"},TransitionComponent:x=Ay,transitionDuration:w="auto",TransitionProps:{onEntering:C}={},disableScrollLock:T=!1}=s,O=be(s.TransitionProps,xne),_=be(s,Sne),P=(n=E==null?void 0:E.paper)!=null?n:g,$=S.useRef(),B=Kr($,P.ref),F=N({},s,{anchorOrigin:c,anchorReference:d,elevation:m,marginThreshold:b,externalPaperSlotProps:P,transformOrigin:k,TransitionComponent:x,transitionDuration:w,TransitionProps:O}),z=Tne(F),G=S.useCallback(()=>{if(d==="anchorPosition")return u;const me=R1(l),Xe=(me&&me.nodeType===1?me:jr($.current).body).getBoundingClientRect();return{top:Xe.top+A2(Xe,c.vertical),left:Xe.left+N2(Xe,c.horizontal)}},[l,c.horizontal,c.vertical,u,d]),R=S.useCallback(me=>({vertical:A2(me,k.vertical),horizontal:N2(me,k.horizontal)}),[k.horizontal,k.vertical]),M=S.useCallback(me=>{const He={width:me.offsetWidth,height:me.offsetHeight},Xe=R(He);if(d==="none")return{top:null,left:null,transformOrigin:R2(Xe)};const Gn=G();let Xr=Gn.top-Xe.vertical,sr=Gn.left-Xe.horizontal;const Bo=Xr+He.height,$t=sr+He.width,Zr=Ed(R1(l)),xn=Zr.innerHeight-b,Wn=Zr.innerWidth-b;if(b!==null&&Xrxn){const tt=Bo-xn;Xr-=tt,Xe.vertical+=tt}if(b!==null&&srWn){const tt=$t-Wn;sr-=tt,Xe.horizontal+=tt}return{top:`${Math.round(Xr)}px`,left:`${Math.round(sr)}px`,transformOrigin:R2(Xe)}},[l,d,G,R,b]),[L,K]=S.useState(y),q=S.useCallback(()=>{const me=$.current;if(!me)return;const He=M(me);He.top!==null&&(me.style.top=He.top),He.left!==null&&(me.style.left=He.left),me.style.transformOrigin=He.transformOrigin,K(!0)},[M]);S.useEffect(()=>(T&&window.addEventListener("scroll",q),()=>window.removeEventListener("scroll",q)),[l,T,q]);const Re=(me,He)=>{C&&C(me,He),q()},ae=()=>{K(!1)};S.useEffect(()=>{y&&q()}),S.useImperativeHandle(a,()=>y?{updatePosition:()=>{q()}}:null,[y,q]),S.useEffect(()=>{if(!y)return;const me=fX(()=>{q()}),He=Ed(l);return He.addEventListener("resize",me),()=>{me.clear(),He.removeEventListener("resize",me)}},[l,y,q]);let pe=w;w==="auto"&&!x.muiSupportAuto&&(pe=void 0);const fe=h||(l?jr(R1(l)).body:void 0),ge=(o=v==null?void 0:v.root)!=null?o:Cne,Ae=(i=v==null?void 0:v.paper)!=null?i:CI,Te=pi({elementType:Ae,externalSlotProps:N({},P,{style:L?P.style:N({},P.style,{opacity:0})}),additionalProps:{elevation:m,ref:B},ownerState:F,className:Oe(z.paper,P==null?void 0:P.className)}),gt=pi({elementType:ge,externalSlotProps:(E==null?void 0:E.root)||{},externalForwardedProps:_,additionalProps:{ref:r,slotProps:{backdrop:{invisible:!0}},container:fe,open:y},ownerState:F,className:Oe(z.root,f)}),{slotProps:it}=gt,Ir=be(gt,wne);return A.jsx(ge,N({},Ir,!dI(ge)&&{slotProps:it,disableScrollLock:T},{children:A.jsx(x,N({appear:!0,in:y,onEntering:Re,onExited:ae,timeout:pe},O,{children:A.jsx(Ae,N({},Te,{children:p}))}))}))}),Ane=One;function Nne(e){return Kt("MuiMenu",e)}Yt("MuiMenu",["root","paper","list"]);const Rne=["onEntering"],_ne=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],Ine={vertical:"top",horizontal:"right"},Mne={vertical:"top",horizontal:"left"},Lne=e=>{const{classes:t}=e;return ir({root:["root"],paper:["paper"],list:["list"]},Nne,t)},Dne=et(Ane,{shouldForwardProp:e=>oE(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Pne=et(CI,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),zne=et(Ene,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),$ne=S.forwardRef(function(t,r){var n,o;const i=Xt({props:t,name:"MuiMenu"}),{autoFocus:s=!0,children:a,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:d,open:p,PaperProps:f={},PopoverClasses:h,transitionDuration:m="auto",TransitionProps:{onEntering:b}={},variant:y="selectedMenu",slots:g={},slotProps:v={}}=i,E=be(i.TransitionProps,Rne),k=be(i,_ne),x=dg(),w=x.direction==="rtl",C=N({},i,{autoFocus:s,disableAutoFocusItem:c,MenuListProps:u,onEntering:b,PaperProps:f,transitionDuration:m,TransitionProps:E,variant:y}),T=Lne(C),O=s&&!c&&p,_=S.useRef(null),P=(M,L)=>{_.current&&_.current.adjustStyleForScrollbar(M,x),b&&b(M,L)},$=M=>{M.key==="Tab"&&(M.preventDefault(),d&&d(M,"tabKeyDown"))};let B=-1;S.Children.map(a,(M,L)=>{S.isValidElement(M)&&(M.props.disabled||(y==="selectedMenu"&&M.props.selected||B===-1)&&(B=L))});const F=(n=g.paper)!=null?n:Pne,z=(o=v.paper)!=null?o:f,G=pi({elementType:g.root,externalSlotProps:v.root,ownerState:C,className:[T.root,l]}),R=pi({elementType:F,externalSlotProps:z,ownerState:C,className:T.paper});return A.jsx(Dne,N({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:w?"right":"left"},transformOrigin:w?Ine:Mne,slots:{paper:F,root:g.root},slotProps:{root:G,paper:R},open:p,ref:r,transitionDuration:m,TransitionProps:N({onEntering:P},E),ownerState:C},k,{classes:h,children:A.jsx(zne,N({onKeyDown:$,actions:_,autoFocus:s&&(B===-1||c),autoFocusItem:O,variant:y},u,{className:Oe(T.list,u.className),children:a}))}))}),Bne=$ne;function Hne(e){return Kt("MuiMenuItem",e)}const Fne=Yt("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Hc=Fne,Une=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],Vne=(e,t)=>{const{ownerState:r}=e;return[t.root,r.dense&&t.dense,r.divider&&t.divider,!r.disableGutters&&t.gutters]},jne=e=>{const{disabled:t,dense:r,divider:n,disableGutters:o,selected:i,classes:s}=e,l=ir({root:["root",r&&"dense",t&&"disabled",!o&&"gutters",n&&"divider",i&&"selected"]},Hne,s);return N({},s,l)},Gne=et(aE,{shouldForwardProp:e=>oE(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:Vne})(({theme:e,ownerState:t})=>N({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Hc.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Br(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Hc.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Br(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Hc.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Br(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Br(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Hc.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Hc.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${T2.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${T2.inset}`]:{marginLeft:52},[`& .${_h.root}`]:{marginTop:0,marginBottom:0},[`& .${_h.inset}`]:{paddingLeft:36},[`& .${C2.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&N({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${C2.root} svg`]:{fontSize:"1.25rem"}}))),Wne=S.forwardRef(function(t,r){const n=Xt({props:t,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:s=!1,divider:a=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:p}=n,f=be(n,Une),h=S.useContext(Cd),m=S.useMemo(()=>({dense:s||h.dense||!1,disableGutters:l}),[h.dense,s,l]),b=S.useRef(null);va(()=>{o&&b.current&&b.current.focus()},[o]);const y=N({},n,{dense:m.dense,divider:a,disableGutters:l}),g=jne(n),v=Kr(b,r);let E;return n.disabled||(E=d!==void 0?d:-1),A.jsx(Cd.Provider,{value:m,children:A.jsx(Gne,N({ref:v,role:u,tabIndex:E,component:i,focusVisibleClassName:Oe(g.focusVisible,c),className:Oe(g.root,p)},f,{ownerState:y,classes:g}))})}),Kne=Wne;function Yne(e){return Kt("MuiTooltip",e)}const qne=Yt("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),Vi=qne,Xne=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function Zne(e){return Math.round(e*1e5)/1e5}const Jne=e=>{const{classes:t,disableInteractive:r,arrow:n,touch:o,placement:i}=e,s={popper:["popper",!r&&"popperInteractive",n&&"popperArrow"],tooltip:["tooltip",n&&"tooltipArrow",o&&"touch",`tooltipPlacement${Ge(i.split("-")[0])}`],arrow:["arrow"]};return ir(s,Yne,t)},Qne=et(mE,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.popper,!r.disableInteractive&&t.popperInteractive,r.arrow&&t.popperArrow,!r.open&&t.popperClose]}})(({theme:e,ownerState:t,open:r})=>N({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!r&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${Vi.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Vi.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Vi.arrow}`]:N({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${Vi.arrow}`]:N({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),eoe=et("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.tooltip,r.touch&&t.touch,r.arrow&&t.tooltipArrow,t[`tooltipPlacement${Ge(r.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>N({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:Br(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${Zne(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${Vi.popper}[data-popper-placement*="left"] &`]:N({transformOrigin:"right center"},t.isRtl?N({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):N({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${Vi.popper}[data-popper-placement*="right"] &`]:N({transformOrigin:"left center"},t.isRtl?N({marginRight:"14px"},t.touch&&{marginRight:"24px"}):N({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${Vi.popper}[data-popper-placement*="top"] &`]:N({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${Vi.popper}[data-popper-placement*="bottom"] &`]:N({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),toe=et("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:Br(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let Bp=!1,_1=null,Fc={x:0,y:0};function Hp(e,t){return r=>{t&&t(r),e(r)}}const roe=S.forwardRef(function(t,r){var n,o,i,s,a,l,c,u,d,p,f,h,m,b,y,g,v,E,k;const x=Xt({props:t,name:"MuiTooltip"}),{arrow:w=!1,children:C,components:T={},componentsProps:O={},describeChild:_=!1,disableFocusListener:P=!1,disableHoverListener:$=!1,disableInteractive:B=!1,disableTouchListener:F=!1,enterDelay:z=100,enterNextDelay:G=0,enterTouchDelay:R=700,followCursor:M=!1,id:L,leaveDelay:K=0,leaveTouchDelay:q=1500,onClose:Re,onOpen:ae,open:pe,placement:fe="bottom",PopperComponent:ge,PopperProps:Ae={},slotProps:Te={},slots:gt={},title:it,TransitionComponent:Ir=Ay,TransitionProps:me}=x,He=be(x,Xne),Xe=S.isValidElement(C)?C:A.jsx("span",{children:C}),Gn=dg(),Xr=Gn.direction==="rtl",[sr,Bo]=S.useState(),[$t,Zr]=S.useState(null),xn=S.useRef(!1),Wn=B||M,tt=S.useRef(),Jr=S.useRef(),Sn=S.useRef(),bi=S.useRef(),[Pa,he]=yX({controlled:pe,default:!1,name:"Tooltip",state:"open"});let wn=Pa;const kc=gX(L),Ei=S.useRef(),xc=S.useCallback(()=>{Ei.current!==void 0&&(document.body.style.WebkitUserSelect=Ei.current,Ei.current=void 0),clearTimeout(bi.current)},[]);S.useEffect(()=>()=>{clearTimeout(tt.current),clearTimeout(Jr.current),clearTimeout(Sn.current),xc()},[xc]);const sx=Se=>{clearTimeout(_1),Bp=!0,he(!0),ae&&!wn&&ae(Se)},dp=Xs(Se=>{clearTimeout(_1),_1=setTimeout(()=>{Bp=!1},800+K),he(!1),Re&&wn&&Re(Se),clearTimeout(tt.current),tt.current=setTimeout(()=>{xn.current=!1},Gn.transitions.duration.shortest)}),vg=Se=>{xn.current&&Se.type!=="touchstart"||(sr&&sr.removeAttribute("title"),clearTimeout(Jr.current),clearTimeout(Sn.current),z||Bp&&G?Jr.current=setTimeout(()=>{sx(Se)},Bp?G:z):sx(Se))},ax=Se=>{clearTimeout(Jr.current),clearTimeout(Sn.current),Sn.current=setTimeout(()=>{dp(Se)},K)},{isFocusVisibleRef:lx,onBlur:CM,onFocus:OM,ref:AM}=R_(),[,cx]=S.useState(!1),ux=Se=>{CM(Se),lx.current===!1&&(cx(!1),ax(Se))},dx=Se=>{sr||Bo(Se.currentTarget),OM(Se),lx.current===!0&&(cx(!0),vg(Se))},px=Se=>{xn.current=!0;const Qr=Xe.props;Qr.onTouchStart&&Qr.onTouchStart(Se)},fx=vg,hx=ax,NM=Se=>{px(Se),clearTimeout(Sn.current),clearTimeout(tt.current),xc(),Ei.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",bi.current=setTimeout(()=>{document.body.style.WebkitUserSelect=Ei.current,vg(Se)},R)},RM=Se=>{Xe.props.onTouchEnd&&Xe.props.onTouchEnd(Se),xc(),clearTimeout(Sn.current),Sn.current=setTimeout(()=>{dp(Se)},q)};S.useEffect(()=>{if(!wn)return;function Se(Qr){(Qr.key==="Escape"||Qr.key==="Esc")&&dp(Qr)}return document.addEventListener("keydown",Se),()=>{document.removeEventListener("keydown",Se)}},[dp,wn]);const _M=Kr(Xe.ref,AM,Bo,r);!it&&it!==0&&(wn=!1);const bg=S.useRef(),IM=Se=>{const Qr=Xe.props;Qr.onMouseMove&&Qr.onMouseMove(Se),Fc={x:Se.clientX,y:Se.clientY},bg.current&&bg.current.update()},Sc={},Eg=typeof it=="string";_?(Sc.title=!wn&&Eg&&!$?it:null,Sc["aria-describedby"]=wn?kc:null):(Sc["aria-label"]=Eg?it:null,Sc["aria-labelledby"]=wn&&!Eg?kc:null);const Kn=N({},Sc,He,Xe.props,{className:Oe(He.className,Xe.props.className),onTouchStart:px,ref:_M},M?{onMouseMove:IM}:{}),wc={};F||(Kn.onTouchStart=NM,Kn.onTouchEnd=RM),$||(Kn.onMouseOver=Hp(fx,Kn.onMouseOver),Kn.onMouseLeave=Hp(hx,Kn.onMouseLeave),Wn||(wc.onMouseOver=fx,wc.onMouseLeave=hx)),P||(Kn.onFocus=Hp(dx,Kn.onFocus),Kn.onBlur=Hp(ux,Kn.onBlur),Wn||(wc.onFocus=dx,wc.onBlur=ux));const MM=S.useMemo(()=>{var Se;let Qr=[{name:"arrow",enabled:!!$t,options:{element:$t,padding:4}}];return(Se=Ae.popperOptions)!=null&&Se.modifiers&&(Qr=Qr.concat(Ae.popperOptions.modifiers)),N({},Ae.popperOptions,{modifiers:Qr})},[$t,Ae]),Tc=N({},x,{isRtl:Xr,arrow:w,disableInteractive:Wn,placement:fe,PopperComponentProp:ge,touch:xn.current}),kg=Jne(Tc),mx=(n=(o=gt.popper)!=null?o:T.Popper)!=null?n:Qne,gx=(i=(s=(a=gt.transition)!=null?a:T.Transition)!=null?s:Ir)!=null?i:Ay,yx=(l=(c=gt.tooltip)!=null?c:T.Tooltip)!=null?l:eoe,vx=(u=(d=gt.arrow)!=null?d:T.Arrow)!=null?u:toe,LM=xu(mx,N({},Ae,(p=Te.popper)!=null?p:O.popper,{className:Oe(kg.popper,Ae==null?void 0:Ae.className,(f=(h=Te.popper)!=null?h:O.popper)==null?void 0:f.className)}),Tc),DM=xu(gx,N({},me,(m=Te.transition)!=null?m:O.transition),Tc),PM=xu(yx,N({},(b=Te.tooltip)!=null?b:O.tooltip,{className:Oe(kg.tooltip,(y=(g=Te.tooltip)!=null?g:O.tooltip)==null?void 0:y.className)}),Tc),zM=xu(vx,N({},(v=Te.arrow)!=null?v:O.arrow,{className:Oe(kg.arrow,(E=(k=Te.arrow)!=null?k:O.arrow)==null?void 0:E.className)}),Tc);return A.jsxs(S.Fragment,{children:[S.cloneElement(Xe,Kn),A.jsx(mx,N({as:ge??mE,placement:fe,anchorEl:M?{getBoundingClientRect:()=>({top:Fc.y,left:Fc.x,right:Fc.x,bottom:Fc.y,width:0,height:0})}:sr,popperRef:bg,open:sr?wn:!1,id:kc,transition:!0},wc,LM,{popperOptions:MM,children:({TransitionProps:Se})=>A.jsx(gx,N({timeout:Gn.transitions.duration.shorter},Se,DM,{children:A.jsxs(yx,N({},PM,{children:[it,w?A.jsx(vx,N({},zM,{ref:Zr})):null]}))}))}))]})}),OI=roe;function noe(e){return Kt("MuiToggleButton",e)}const ooe=Yt("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge"]),_2=ooe,ioe=["children","className","color","disabled","disableFocusRipple","fullWidth","onChange","onClick","selected","size","value"],soe=e=>{const{classes:t,fullWidth:r,selected:n,disabled:o,size:i,color:s}=e,a={root:["root",n&&"selected",o&&"disabled",r&&"fullWidth",`size${Ge(i)}`,s]};return ir(a,noe,t)},aoe=et(aE,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`size${Ge(r.size)}`]]}})(({theme:e,ownerState:t})=>{let r=t.color==="standard"?e.palette.text.primary:e.palette[t.color].main,n;return e.vars&&(r=t.color==="standard"?e.vars.palette.text.primary:e.vars.palette[t.color].main,n=t.color==="standard"?e.vars.palette.text.primaryChannel:e.vars.palette[t.color].mainChannel),N({},e.typography.button,{borderRadius:(e.vars||e).shape.borderRadius,padding:11,border:`1px solid ${(e.vars||e).palette.divider}`,color:(e.vars||e).palette.action.active},t.fullWidth&&{width:"100%"},{[`&.${_2.disabled}`]:{color:(e.vars||e).palette.action.disabled,border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Br(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${_2.selected}`]:{color:r,backgroundColor:e.vars?`rgba(${n} / ${e.vars.palette.action.selectedOpacity})`:Br(r,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${n} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Br(r,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${n} / ${e.vars.palette.action.selectedOpacity})`:Br(r,e.palette.action.selectedOpacity)}}}},t.size==="small"&&{padding:7,fontSize:e.typography.pxToRem(13)},t.size==="large"&&{padding:15,fontSize:e.typography.pxToRem(15)})}),loe=S.forwardRef(function(t,r){const n=Xt({props:t,name:"MuiToggleButton"}),{children:o,className:i,color:s="standard",disabled:a=!1,disableFocusRipple:l=!1,fullWidth:c=!1,onChange:u,onClick:d,selected:p,size:f="medium",value:h}=n,m=be(n,ioe),b=N({},n,{color:s,disabled:a,disableFocusRipple:l,fullWidth:c,size:f}),y=soe(b),g=v=>{d&&(d(v,h),v.defaultPrevented)||u&&u(v,h)};return A.jsx(aoe,N({className:Oe(y.root,i),disabled:a,focusRipple:!l,ref:r,onClick:g,onChange:u,value:h,ownerState:b,"aria-pressed":p},m,{children:o}))}),coe=loe;var uoe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 15v2c0 1.054.95 2 2 2h3v2H7a4 4 0 0 1-4-4v-2h2zm13-5l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16 10h2zm-1 2.885L15.753 16h2.492L17 12.885zM3 3h6a3 3 0 0 1 2.235 5A3 3 0 0 1 9 13H3V3zm6 6H5v2h4a1 1 0 0 0 0-2zm8-6a4 4 0 0 1 4 4v2h-2V7a2 2 0 0 0-2-2h-3V3h3zM9 5H5v2h4a1 1 0 1 0 0-2z"}}],doe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"}}],poe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"}}],foe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M12.866 3l9.526 16.5a1 1 0 0 1-.866 1.5H2.474a1 1 0 0 1-.866-1.5L11.134 3a1 1 0 0 1 1.732 0zm-8.66 16h15.588L12 5.5 4.206 19zM11 16h2v2h-2v-2zm0-7h2v5h-2V9z"}}],hoe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 19h18v2H3v-2zm5-6h3l-4 4-4-4h3V3h2v10zm10 0h3l-4 4-4-4h3V3h2v10z"}}],moe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm2 15h14v2H5v-2zm-2-5h18v2H3v-2zm2-5h14v2H5V9z"}}],goe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h18v2H3v-2zm0-5h18v2H3v-2zm0-5h18v2H3V9z"}}],yoe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h14v2H3v-2zm0-5h18v2H3v-2zm0-5h14v2H3V9z"}}],voe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm4 15h14v2H7v-2zm-4-5h18v2H3v-2zm4-5h14v2H7V9z"}}],boe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 3h18v2H3V3zm5 8v10H6V11H3l4-4 4 4H8zm10 0v10h-2V11h-3l4-4 4 4h-3z"}}],Eoe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 11h18v2H3v-2zm15 7v3h-2v-3h-3l4-4 4 4h-3zM8 18v3H6v-3H3l4-4 4 4H8zM18 6h3l-4 4-4-4h3V3h2v3zM8 6h3l-4 4-4-4h3V3h2v3z"}}],koe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M6.75 2.5A4.25 4.25 0 0 1 11 6.75V11H6.75a4.25 4.25 0 1 1 0-8.5zM9 9V6.75A2.25 2.25 0 1 0 6.75 9H9zm-2.25 4H11v4.25A4.25 4.25 0 1 1 6.75 13zm0 2A2.25 2.25 0 1 0 9 17.25V15H6.75zm10.5-12.5a4.25 4.25 0 1 1 0 8.5H13V6.75a4.25 4.25 0 0 1 4.25-4.25zm0 6.5A2.25 2.25 0 1 0 15 6.75V9h2.25zM13 13h4.25A4.25 4.25 0 1 1 13 17.25V13zm2 2v2.25A2.25 2.25 0 1 0 17.25 15H15z"}}],xoe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 16l-6-6h12z"}}],Soe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 7v4L2 6l6-5v4h5a8 8 0 1 1 0 16H4v-2h9a6 6 0 1 0 0-12H8z"}}],woe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 7h-5a6 6 0 1 0 0 12h9v2h-9a8 8 0 1 1 0-16h5V1l6 5-6 5V7z"}}],Toe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 12l6-6v12z"}}],Coe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 12l-6 6V6z"}}],Ooe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 8l6 6H6z"}}],Aoe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13 3v7.267l6.294-3.633 1 1.732-6.293 3.633 6.293 3.635-1 1.732L13 13.732V21h-2v-7.268l-6.294 3.634-1-1.732L9.999 12 3.706 8.366l1-1.732L11 10.267V3z"}}],Noe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14.828 7.757l-5.656 5.657a1 1 0 1 0 1.414 1.414l5.657-5.656A3 3 0 1 0 12 4.929l-5.657 5.657a5 5 0 1 0 7.071 7.07L19.071 12l1.414 1.414-5.657 5.657a7 7 0 1 1-9.9-9.9l5.658-5.656a5 5 0 0 1 7.07 7.07L12 16.244A3 3 0 1 1 7.757 12l5.657-5.657 1.414 1.414z"}}],Roe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 11h4.5a2.5 2.5 0 1 0 0-5H8v5zm10 4.5a4.5 4.5 0 0 1-4.5 4.5H6V4h6.5a4.5 4.5 0 0 1 3.256 7.606A4.498 4.498 0 0 1 18 15.5zM8 13v5h5.5a2.5 2.5 0 1 0 0-5H8z"}}],_oe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 18v-3.7a1.5 1.5 0 0 0-1.5-1.5H2v-1.6h.5A1.5 1.5 0 0 0 4 9.7V6a3 3 0 0 1 3-3h1v2H7a1 1 0 0 0-1 1v4.1A2 2 0 0 1 4.626 12 2 2 0 0 1 6 13.9V18a1 1 0 0 0 1 1h1v2H7a3 3 0 0 1-3-3zm16-3.7V18a3 3 0 0 1-3 3h-1v-2h1a1 1 0 0 0 1-1v-4.1a2 2 0 0 1 1.374-1.9A2 2 0 0 1 18 10.1V6a1 1 0 0 0-1-1h-1V3h1a3 3 0 0 1 3 3v3.7a1.5 1.5 0 0 0 1.5 1.5h.5v1.6h-.5a1.5 1.5 0 0 0-1.5 1.5z"}}],Ioe=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M14 3c.552 0 1 .448 1 1v5h5c.552 0 1 .448 1 1v10c0 .552-.448 1-1 1H10c-.552 0-1-.448-1-1v-5H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h10zm-1 2H5v8h8V5z"}}],Moe=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M11 3c.552 0 1 .448 1 1v2h5c.552 0 1 .448 1 1v5h2c.552 0 1 .448 1 1v7c0 .552-.448 1-1 1h-7c-.552 0-1-.448-1-1v-2H7c-.552 0-1-.448-1-1v-5H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h7zm5 5H8v8h8V8z"}}],Loe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14 3v2H4v13.385L5.763 17H20v-7h2v8a1 1 0 0 1-1 1H6.455L2 22.5V4a1 1 0 0 1 1-1h11zm5 0V0h2v3h3v2h-3v3h-2V5h-3V3h3z"}}],Doe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm-.997-4L6.76 11.757l1.414-1.414 2.829 2.829 5.656-5.657 1.415 1.414L11.003 16z"}}],Poe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M7 7V3a1 1 0 0 1 1-1h13a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-4v3.993c0 .556-.449 1.007-1.007 1.007H3.007A1.006 1.006 0 0 1 2 20.993l.003-12.986C2.003 7.451 2.452 7 3.01 7H7zm2 0h6.993C16.549 7 17 7.449 17 8.007V15h3V4H9v3zm6 2H4.003L4 20h11V9zm-6.497 9l-3.536-3.536 1.414-1.414 2.122 2.122 4.242-4.243 1.414 1.414L8.503 18z"}}],zoe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M6 4v4h12V4h2.007c.548 0 .993.445.993.993v16.014a.994.994 0 0 1-.993.993H3.993A.994.994 0 0 1 3 21.007V4.993C3 4.445 3.445 4 3.993 4H6zm2-2h8v4H8V2z"}}],$oe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7 4V2h10v2h3.007c.548 0 .993.445.993.993v16.014a.994.994 0 0 1-.993.993H3.993A.994.994 0 0 1 3 21.007V4.993C3 4.445 3.445 4 3.993 4H7zm0 2H5v14h14V6h-2v2H7V6zm2-2v2h6V4H9z"}}],Boe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm0-9.414l2.828-2.829 1.415 1.415L13.414 12l2.829 2.828-1.415 1.415L12 13.414l-2.828 2.829-1.415-1.415L10.586 12 7.757 9.172l1.415-1.415L12 10.586z"}}],Hoe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"}}],Foe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"}}],Uoe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M23 12l-7.071 7.071-1.414-1.414L20.172 12l-5.657-5.657 1.414-1.414L23 12zM3.828 12l5.657 5.657-1.414 1.414L1 12l7.071-7.071 1.414 1.414L3.828 12z"}}],Voe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16.95 8.464l1.414-1.414 4.95 4.95-4.95 4.95-1.414-1.414L20.485 12 16.95 8.464zm-9.9 0L3.515 12l3.535 3.536-1.414 1.414L.686 12l4.95-4.95L7.05 8.464z"}}],joe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 6h5v2h-2v13a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V8H2V6h5V3a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v3zm-8 5v6h2v-6H9zm4 0v6h2v-6h-2zM9 4v2h6V4H9z"}}],Goe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 6h5v2h-2v13a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V8H2V6h5V3a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v3zm1 2H6v12h12V8zm-9 3h2v6H9v-6zm4 0h2v6h-2v-6zM9 4v2h6V4H9z"}}],Woe=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M12 3c.552 0 1 .448 1 1v8c.835-.628 1.874-1 3-1 2.761 0 5 2.239 5 5s-2.239 5-5 5c-1.032 0-1.99-.313-2.787-.848L13 20c0 .552-.448 1-1 1H6c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h6zm-1 2H7v14h4V5zm8 10h-6v2h6v-2z"}}],Koe=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 5c.552 0 1 .448 1 1v6c0 .552-.448 1-1 1 .628.835 1 1.874 1 3 0 2.761-2.239 5-5 5s-5-2.239-5-5c0-1.126.372-2.165 1-3H4c-.552 0-1-.448-1-1V6c0-.552.448-1 1-1h16zm-7 10v2h6v-2h-6zm6-8H5v4h14V7z"}}],Yoe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4.583 17.321C3.553 16.227 3 15 3 13.011c0-3.5 2.457-6.637 6.03-8.188l.893 1.378c-3.335 1.804-3.987 4.145-4.247 5.621.537-.278 1.24-.375 1.929-.311 1.804.167 3.226 1.648 3.226 3.489a3.5 3.5 0 0 1-3.5 3.5c-1.073 0-2.099-.49-2.748-1.179zm10 0C13.553 16.227 13 15 13 13.011c0-3.5 2.457-6.637 6.03-8.188l.893 1.378c-3.335 1.804-3.987 4.145-4.247 5.621.537-.278 1.24-.375 1.929-.311 1.804.167 3.226 1.648 3.226 3.489a3.5 3.5 0 0 1-3.5 3.5c-1.073 0-2.099-.49-2.748-1.179z"}}],qoe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19.417 6.679C20.447 7.773 21 9 21 10.989c0 3.5-2.457 6.637-6.03 8.188l-.893-1.378c3.335-1.804 3.987-4.145 4.247-5.621-.537.278-1.24.375-1.929.311-1.804-.167-3.226-1.648-3.226-3.489a3.5 3.5 0 0 1 3.5-3.5c1.073 0 2.099.49 2.748 1.179zm-10 0C10.447 7.773 11 9 11 10.989c0 3.5-2.457 6.637-6.03 8.188l-.893-1.378c3.335-1.804 3.987-4.145 4.247-5.621-.537.278-1.24.375-1.929.311C4.591 12.322 3.17 10.841 3.17 9a3.5 3.5 0 0 1 3.5-3.5c1.073 0 2.099.49 2.748 1.179z"}}],Xoe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 19h16v-7h2v8a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-8h2v7zM14 9h5l-7 7-7-7h5V3h4v6z"}}],Zoe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M16 13l6.964 4.062-2.973.85 2.125 3.681-1.732 1-2.125-3.68-2.223 2.15L16 13zm-2-7h2v2h5a1 1 0 0 1 1 1v4h-2v-3H10v10h4v2H9a1 1 0 0 1-1-1v-5H6v-2h2V9a1 1 0 0 1 1-1h5V6zM4 14v2H2v-2h2zm0-4v2H2v-2h2zm0-4v2H2V6h2zm0-4v2H2V2h2zm4 0v2H6V2h2zm4 0v2h-2V2h2zm4 0v2h-2V2h2z"}}],Joe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 19a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm-5.5 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm11 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zM13 2v2h6v2h-1.968a18.222 18.222 0 0 1-3.621 6.302 14.685 14.685 0 0 0 5.327 3.042l-.536 1.93A16.685 16.685 0 0 1 12 13.726a16.696 16.696 0 0 1-6.202 3.547l-.536-1.929a14.7 14.7 0 0 0 5.327-3.042 18.077 18.077 0 0 1-2.822-4.3h2.24A16.031 16.031 0 0 0 12 10.876a16.168 16.168 0 0 0 2.91-4.876L5 6V4h6V2h2z"}}],Qoe=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 19a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm-5.5 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm11 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zM18 3v2H8v4h9v2H8v4h10v2H6V3h12z"}}],eie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14 10h2v.757a4.5 4.5 0 0 1 7 3.743V20h-2v-5.5c0-1.43-1.175-2.5-2.5-2.5S16 13.07 16 14.5V20h-2V10zm-2-6v2H4v5h8v2H4v5h8v2H2V4h10z"}}],tie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm-1-5h2v2h-2v-2zm0-8h2v6h-2V7z"}}],rie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M10 6v2H5v11h11v-5h2v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm11-3v9l-3.794-3.793-5.999 6-1.414-1.414 5.999-6L12 3h9z"}}],nie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7 6V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-3v3c0 .552-.45 1-1.007 1H4.007A1.001 1.001 0 0 1 3 21l.003-14c0-.552.45-1 1.007-1H7zM5.003 8L5 20h10V8H5.003zM9 6h8v10h2V4H9v2z"}}],oie=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M6 21.5c-1.933 0-3.5-1.567-3.5-3.5s1.567-3.5 3.5-3.5c1.585 0 2.924 1.054 3.355 2.5H15v-2h2V9.242L14.757 7H9V9H3V3h6v2h5.757L18 1.756 22.243 6 19 9.241V15L21 15v6h-6v-2H9.355c-.43 1.446-1.77 2.5-3.355 2.5zm0-5c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zm13 .5h-2v2h2v-2zM18 4.586L16.586 6 18 7.414 19.414 6 18 4.586zM7 5H5v2h2V5z"}}],iie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.246 14H8.754l-1.6 4H5l6-15h2l6 15h-2.154l-1.6-4zm-.8-2L12 5.885 9.554 12h4.892zM3 20h18v2H3v-2z"}}],sie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M10 6v15H8V6H2V4h14v2h-6zm8 8v7h-2v-7h-3v-2h8v2h-3z"}}],aie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11.246 15H4.754l-2 5H.6L7 4h2l6.4 16h-2.154l-2-5zm-.8-2L8 6.885 5.554 13h4.892zM21 12.535V12h2v8h-2v-.535a4 4 0 1 1 0-6.93zM19 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"}}],lie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12.651 14.065L11.605 20H9.574l1.35-7.661-7.41-7.41L4.93 3.515 20.485 19.07l-1.414 1.414-6.42-6.42zm-.878-6.535l.27-1.53h-1.8l-2-2H20v2h-5.927L13.5 9.257 11.773 7.53z"}}],cie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z"}}],uie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 3h2v6h-2V5h-4V3h4zM4 3h4v2H4v4H2V3h2zm16 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z"}}],die=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 18l7.68-6L5 6V4h14v2H8.263L16 12l-7.737 6H19v2H5v-2z"}}],pie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 1v4H4v14h16V3h1.008c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H2.992A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3H6V1h2zm4 7l4 4h-3v4h-2v-4H8l4-4zm6-7v4h-8V3h6V1h2z"}}],fie=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M13 20h-2v-7H4v7H2V4h2v7h7V4h2v16zm8-12v12h-2v-9.796l-2 .536V8.67L19.5 8H21z"}}],hie=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M4 4v7h7V4h2v16h-2v-7H4v7H2V4h2zm14.5 4c2.071 0 3.75 1.679 3.75 3.75 0 .857-.288 1.648-.772 2.28l-.148.18L18.034 18H22v2h-7v-1.556l4.82-5.546c.268-.307.43-.709.43-1.148 0-.966-.784-1.75-1.75-1.75-.918 0-1.671.707-1.744 1.606l-.006.144h-2C14.75 9.679 16.429 8 18.5 8z"}}],mie=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M22 8l-.002 2-2.505 2.883c1.59.435 2.757 1.89 2.757 3.617 0 2.071-1.679 3.75-3.75 3.75-1.826 0-3.347-1.305-3.682-3.033l1.964-.382c.156.806.866 1.415 1.718 1.415.966 0 1.75-.784 1.75-1.75s-.784-1.75-1.75-1.75c-.286 0-.556.069-.794.19l-1.307-1.547L19.35 10H15V8h7zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2z"}}],gie=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M13 20h-2v-7H4v7H2V4h2v7h7V4h2v16zm9-12v8h1.5v2H22v2h-2v-2h-5.5v-1.34l5-8.66H22zm-2 3.133L17.19 16H20v-4.867z"}}],yie=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M22 8v2h-4.323l-.464 2.636c.33-.089.678-.136 1.037-.136 2.21 0 4 1.79 4 4s-1.79 4-4 4c-1.827 0-3.367-1.224-3.846-2.897l1.923-.551c.24.836 1.01 1.448 1.923 1.448 1.105 0 2-.895 2-2s-.895-2-2-2c-.63 0-1.193.292-1.56.748l-1.81-.904L16 8h6zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2z"}}],vie=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M21.097 8l-2.598 4.5c2.21 0 4.001 1.79 4.001 4s-1.79 4-4 4-4-1.79-4-4c0-.736.199-1.426.546-2.019L18.788 8h2.309zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2zm14.5 10.5c-1.105 0-2 .895-2 2s.895 2 2 2 2-.895 2-2-.895-2-2-2z"}}],bie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7.784 14l.42-4H4V8h4.415l.525-5h2.011l-.525 5h3.989l.525-5h2.011l-.525 5H20v2h-3.784l-.42 4H20v2h-4.415l-.525 5h-2.011l.525-5H9.585l-.525 5H7.049l.525-5H4v-2h3.784zm2.011 0h3.99l.42-4h-3.99l-.42 4z"}}],Eie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 11V4h2v17h-2v-8H7v8H5V4h2v7z"}}],kie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 15v3h3v2h-3v3h-2v-3h-3v-2h3v-3h2zm.008-12c.548 0 .992.445.992.993V13h-2V5H4v13.999L14 9l3 3v2.829l-3-3L6.827 19H14v2H2.992A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3h18.016zM8 7a2 2 0 1 1 0 4 2 2 0 0 1 0-4z"}}],xie=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 3c.552 0 1 .448 1 1v1.757l-2 2V5H5v8.1l4-4 4.328 4.329-1.415 1.413L9 11.93l-4 3.999V19h10.533l.708.001 1.329-1.33L18.9 19h.1v-2.758l2-2V20c0 .552-.448 1-1 1H4c-.55 0-1-.45-1-1V4c0-.552.448-1 1-1h16zm1.778 4.808l1.414 1.414L15.414 17l-1.416-.002.002-1.412 7.778-7.778zM15.5 7c.828 0 1.5.672 1.5 1.5s-.672 1.5-1.5 1.5S14 9.328 14 8.5 14.672 7 15.5 7z"}}],Sie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4.828 21l-.02.02-.021-.02H2.992A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3h18.016c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H4.828zM20 15V5H4v14L14 9l6 6zm0 2.828l-6-6L6.828 19H20v-1.172zM8 11a2 2 0 1 1 0-4 2 2 0 0 1 0 4z"}}],wie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h18v2H3v-2zm8-5h10v2H11v-2zm0-5h10v2H11V9zm-8 3.5L7 9v7l-4-3.5z"}}],Tie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h18v2H3v-2zm8-5h10v2H11v-2zm0-5h10v2H11V9zm-4 3.5L3 16V9l4 3.5z"}}],Cie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zM11 7h2v2h-2V7zm0 4h2v6h-2v-6z"}}],Oie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 21v-2h3V5H8V3h8v2h-3v14h3v2H8zM18.05 7.05L23 12l-4.95 4.95-1.414-1.414L20.172 12l-3.536-3.536L18.05 7.05zm-12.1 0l1.414 1.414L3.828 12l3.536 3.536L5.95 16.95 1 12l4.95-4.95z"}}],Aie=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1h-6c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h6zm-1 2h-4v14h4V5zM6 7c2.761 0 5 2.239 5 5s-2.239 5-5 5-5-2.239-5-5 2.239-5 5-5zm1 2H5v1.999L3 11v2l2-.001V15h2v-2.001L9 13v-2l-2-.001V9z"}}],Nie=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M10 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h6zM9 5H5v14h4V5zm9 2c2.761 0 5 2.239 5 5s-2.239 5-5 5-5-2.239-5-5 2.239-5 5-5zm1 2h-2v1.999L15 11v2l2-.001V15h2v-2.001L21 13v-2l-2-.001V9z"}}],Rie=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M12 13c2.761 0 5 2.239 5 5s-2.239 5-5 5-5-2.239-5-5 2.239-5 5-5zm1 2h-2v1.999L9 17v2l2-.001V21h2v-2.001L15 19v-2l-2-.001V15zm7-12c.552 0 1 .448 1 1v6c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h16zM5 5v4h14V5H5z"}}],_ie=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 13c.552 0 1 .448 1 1v6c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1v-6c0-.552.448-1 1-1h16zm-1 2H5v4h14v-4zM12 1c2.761 0 5 2.239 5 5s-2.239 5-5 5-5-2.239-5-5 2.239-5 5-5zm1 2h-2v1.999L9 5v2l2-.001V9h2V6.999L15 7V5l-2-.001V3z"}}],Iie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 20H7v-2h2.927l2.116-12H9V4h8v2h-2.927l-2.116 12H15z"}}],Mie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M11 5H5v14h6V5zm2 0v14h6V5h-6zM4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"}}],Lie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 4h10v2H11V4zM6 7v4H4V7H1l4-4 4 4H6zm0 10h3l-4 4-4-4h3v-4h2v4zm5 1h10v2H11v-2zm-2-7h12v2H9v-2z"}}],Die=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17.657 14.828l-1.414-1.414L17.657 12A4 4 0 1 0 12 6.343l-1.414 1.414-1.414-1.414 1.414-1.414a6 6 0 0 1 8.485 8.485l-1.414 1.414zm-2.829 2.829l-1.414 1.414a6 6 0 1 1-8.485-8.485l1.414-1.414 1.414 1.414L6.343 12A4 4 0 1 0 12 17.657l1.414-1.414 1.414 1.414zm0-9.9l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07z"}}],Pie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17.657 14.828l-1.414-1.414L17.657 12A4 4 0 1 0 12 6.343l-1.414 1.414-1.414-1.414 1.414-1.414a6 6 0 0 1 8.485 8.485l-1.414 1.414zm-2.829 2.829l-1.414 1.414a6 6 0 1 1-8.485-8.485l1.414-1.414 1.414 1.414L6.343 12A4 4 0 1 0 12 17.657l1.414-1.414 1.414 1.414zm0-9.9l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07zM5.775 2.293l1.932-.518L8.742 5.64l-1.931.518-1.036-3.864zm9.483 16.068l1.931-.518 1.036 3.864-1.932.518-1.035-3.864zM2.293 5.775l3.864 1.036-.518 1.931-3.864-1.035.518-1.932zm16.068 9.483l3.864 1.035-.518 1.932-3.864-1.036.518-1.931z"}}],zie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 17h5v2h-3v3h-2v-5zM7 7H2V5h3V2h2v5zm11.364 8.536L16.95 14.12l1.414-1.414a5 5 0 1 0-7.071-7.071L9.879 7.05 8.464 5.636 9.88 4.222a7 7 0 0 1 9.9 9.9l-1.415 1.414zm-2.828 2.828l-1.415 1.414a7 7 0 0 1-9.9-9.9l1.415-1.414L7.05 9.88l-1.414 1.414a5 5 0 1 0 7.071 7.071l1.414-1.414 1.415 1.414zm-.708-10.607l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07z"}}],$ie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18.364 15.536L16.95 14.12l1.414-1.414a5 5 0 1 0-7.071-7.071L9.879 7.05 8.464 5.636 9.88 4.222a7 7 0 0 1 9.9 9.9l-1.415 1.414zm-2.828 2.828l-1.415 1.414a7 7 0 0 1-9.9-9.9l1.415-1.414L7.05 9.88l-1.414 1.414a5 5 0 1 0 7.071 7.071l1.414-1.414 1.415 1.414zm-.708-10.607l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07z"}}],Bie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 4h10v2H11V4zm0 4h6v2h-6V8zm0 6h10v2H11v-2zm0 4h6v2h-6v-2zM3 4h6v6H3V4zm2 2v2h2V6H5zm-2 8h6v6H3v-6zm2 2v2h2v-2H5z"}}],Hie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 4h13v2H8V4zm-5-.5h3v3H3v-3zm0 7h3v3H3v-3zm0 7h3v3H3v-3zM8 11h13v2H8v-2zm0 7h13v2H8v-2z"}}],Fie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 4h13v2H8V4zM5 3v3h1v1H3V6h1V4H3V3h2zM3 14v-2.5h2V11H3v-1h3v2.5H4v.5h2v1H3zm2 5.5H3v-1h2V18H3v-1h3v4H3v-1h2v-.5zM8 11h13v2H8v-2zm0 7h13v2H8v-2z"}}],Uie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 4h13v2H8V4zM4.5 6.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0 6.9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zM8 11h13v2H8v-2zm0 7h13v2H8v-2z"}}],Vie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.243 4.515l-6.738 6.737-.707 2.121-1.04 1.041 2.828 2.829 1.04-1.041 2.122-.707 6.737-6.738-4.242-4.242zm6.364 3.535a1 1 0 0 1 0 1.414l-7.779 7.779-2.12.707-1.415 1.414a1 1 0 0 1-1.414 0l-4.243-4.243a1 1 0 0 1 0-1.414l1.414-1.414.707-2.121 7.779-7.779a1 1 0 0 1 1.414 0l5.657 5.657zm-6.364-.707l1.414 1.414-4.95 4.95-1.414-1.414 4.95-4.95zM4.283 16.89l2.828 2.829-1.414 1.414-4.243-1.414 2.828-2.829z"}}],jie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm4 12.5v-4l2 2 2-2v4h2v-7h-2l-2 2-2-2H5v7h2zm11-3v-4h-2v4h-2l3 3 3-3h-2z"}}],Gie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm1 2v14h16V5H4zm3 10.5H5v-7h2l2 2 2-2h2v7h-2v-4l-2 2-2-2v4zm11-3h2l-3 3-3-3h2v-4h2v4z"}}],Wie=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h16zm-9 2H5v5.999h2V9l3 3-3 3v-2H5v6h6v-2h2v2h6v-6h-2v2l-3-3 3-3v1.999h2V5h-6v2h-2V5zm2 8v2h-2v-2h2zm0-4v2h-2V9h2z"}}],Kie=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M21 20c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h16c.552 0 1 .448 1 1v16zm-2-9V5h-5.999v2H15l-3 3-3-3h2V5H5v6h2v2H5v6h6v-2H9l3-3 3 3h-1.999v2H19v-6h-2v-2h2zm-8 2H9v-2h2v2zm4 0h-2v-2h2v2z"}}],Yie=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M18 3c1.657 0 3 1.343 3 3s-1.343 3-3 3h-3c-1.306 0-2.417-.834-2.829-2H11c-1.1 0-2 .9-2 2v.171c1.166.412 2 1.523 2 2.829 0 1.306-.834 2.417-2 2.829V15c0 1.1.9 2 2 2h1.17c.412-1.165 1.524-2 2.83-2h3c1.657 0 3 1.343 3 3s-1.343 3-3 3h-3c-1.306 0-2.417-.834-2.829-2H11c-2.21 0-4-1.79-4-4H5c-1.657 0-3-1.343-3-3s1.343-3 3-3h2c0-2.21 1.79-4 4-4h1.17c.412-1.165 1.524-2 2.83-2h3zm0 14h-3c-.552 0-1 .448-1 1s.448 1 1 1h3c.552 0 1-.448 1-1s-.448-1-1-1zM8 11H5c-.552 0-1 .448-1 1s.448 1 1 1h3c.552 0 1-.448 1-1s-.448-1-1-1zm10-6h-3c-.552 0-1 .448-1 1s.448 1 1 1h3c.552 0 1-.448 1-1s-.448-1-1-1z"}}],qie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm14 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-7 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}}],Xie=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M10 2c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1H8v2h5V9c0-.552.448-1 1-1h6c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1h-6c-.552 0-1-.448-1-1v-1H8v6h5v-1c0-.552.448-1 1-1h6c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1h-6c-.552 0-1-.448-1-1v-1H7c-.552 0-1-.448-1-1V8H4c-.552 0-1-.448-1-1V3c0-.552.448-1 1-1h6zm9 16h-4v2h4v-2zm0-8h-4v2h4v-2zM9 4H5v2h4V4z"}}],Zie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 1.5c1.321 0 2.484.348 3.447.994.963.645 1.726 1.588 2.249 2.778.522 1.19.804 2.625.804 4.257v4.942c0 1.632-.282 3.068-.804 4.257-.523 1.19-1.286 2.133-2.25 2.778-.962.646-2.125.994-3.446.994-1.321 0-2.484-.348-3.447-.994-.963-.645-1.726-1.588-2.249-2.778-.522-1.19-.804-2.625-.804-4.257V9.529c0-1.632.282-3.068.804-4.257.523-1.19 1.286-2.133 2.25-2.778C9.515 1.848 10.678 1.5 12 1.5zm0 2c-.916 0-1.694.226-2.333.655-.637.427-1.158 1.07-1.532 1.92-.412.94-.635 2.108-.635 3.454v4.942c0 1.346.223 2.514.635 3.453.374.851.895 1.494 1.532 1.921.639.429 1.417.655 2.333.655.916 0 1.694-.226 2.333-.655.637-.427 1.158-1.07 1.532-1.92.412-.94.635-2.108.635-3.454V9.529c0-1.346-.223-2.514-.635-3.453-.374-.851-.895-1.494-1.532-1.921C13.694 3.726 12.916 3.5 12 3.5z"}}],Jie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14 1.5V22h-2V3.704L7.5 4.91V2.839l5-1.339z"}}],Qie=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 7.5a4 4 0 1 0-8 0H6a6 6 0 1 1 10.663 3.776l-7.32 8.723L18 20v2H6v-1.127l9.064-10.802A3.982 3.982 0 0 0 16 7.5z"}}],ese=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18 2v1.362L12.809 9.55a6.501 6.501 0 1 1-7.116 8.028l1.94-.486A4.502 4.502 0 0 0 16.5 16a4.5 4.5 0 0 0-6.505-4.03l-.228.122-.69-1.207L14.855 4 6.5 4V2H18z"}}],tse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 1.5V16h3v2h-3v4h-2v-4H4v-1.102L14 1.5h2zM14 16V5.171L6.968 16H14z"}}],rse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18 2v2H9.3l-.677 6.445a6.5 6.5 0 1 1-2.93 7.133l1.94-.486A4.502 4.502 0 0 0 16.5 16a4.5 4.5 0 0 0-4.5-4.5c-2.022 0-3.278.639-3.96 1.53l-1.575-1.182L7.5 2H18z"}}],nse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14.886 2l-4.438 7.686A6.5 6.5 0 1 1 6.4 12.7L12.576 2h2.31zM12 11.5a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9z"}}],ose=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 2v1.5L10.763 22H8.574l8.013-18H6V2z"}}],ise=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 1.5a5.5 5.5 0 0 1 3.352 9.86C17.24 12.41 18.5 14.32 18.5 16.5c0 3.314-2.91 6-6.5 6s-6.5-2.686-6.5-6c0-2.181 1.261-4.09 3.147-5.141A5.5 5.5 0 0 1 12 1.5zm0 11c-2.52 0-4.5 1.828-4.5 4 0 2.172 1.98 4 4.5 4s4.5-1.828 4.5-4c0-2.172-1.98-4-4.5-4zm0-9a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7z"}}],sse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 1.5a6.5 6.5 0 0 1 5.619 9.77l-6.196 10.729H9.114l4.439-7.686A6.5 6.5 0 1 1 12 1.5zm0 2a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9z"}}],ase=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M14 20v-2.157c1.863-1.192 3.5-3.875 3.5-6.959 0-3.073-2-6.029-5.5-6.029s-5.5 2.956-5.5 6.03c0 3.083 1.637 5.766 3.5 6.958V20H3v-2h4.76C5.666 16.505 4 13.989 4 10.884 4 6.247 7.5 3 12 3s8 3.247 8 7.884c0 3.105-1.666 5.621-3.76 7.116H21v2h-7z"}}],lse=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M15 3c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1h-2v2h4c.552 0 1 .448 1 1v3h2c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1h-6c-.552 0-1-.448-1-1v-4c0-.552.448-1 1-1h2v-2H8v2h2c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1v-4c0-.552.448-1 1-1h2v-3c0-.552.448-1 1-1h4V9H9c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h6zM9 17H5v2h4v-2zm10 0h-4v2h4v-2zM14 5h-4v2h4V5z"}}],cse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 21v-4H7v4H5v-5a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v5h-2zM7 3v4h10V3h2v5a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V3h2zM2 9l4 3-4 3V9zm20 0v6l-4-3 4-3z"}}],use=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 6v15h-2v-5a6 6 0 1 1 0-12h10v2h-3v15h-2V6h-3zm-2 0a4 4 0 1 0 0 8V6z"}}],dse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12.9 6.858l4.242 4.243L7.242 21H3v-4.243l9.9-9.9zm1.414-1.414l2.121-2.122a1 1 0 0 1 1.414 0l2.829 2.829a1 1 0 0 1 0 1.414l-2.122 2.121-4.242-4.242z"}}],pse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.728 9.686l-1.414-1.414L5 17.586V19h1.414l9.314-9.314zm1.414-1.414l1.414-1.414-1.414-1.414-1.414 1.414 1.414 1.414zM7.242 21H3v-4.243L16.435 3.322a1 1 0 0 1 1.414 0l2.829 2.829a1 1 0 0 1 0 1.414L7.243 21z"}}],fse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17.934 3.036l1.732 1L18.531 6H21v2h-2v4h2v2h-2v7h-2v-7h-3.084c-.325 2.862-1.564 5.394-3.37 7.193l-1.562-1.27c1.52-1.438 2.596-3.522 2.917-5.922L10 14v-2l2-.001V8h-2V6h2.467l-1.133-1.964 1.732-1L14.777 6h1.444l1.713-2.964zM5 13.803l-2 .536v-2.071l2-.536V8H3V6h2V3h2v3h2v2H7v3.197l2-.536v2.07l-2 .536V18.5A2.5 2.5 0 0 1 4.5 21H3v-2h1.5a.5.5 0 0 0 .492-.41L5 18.5v-4.697zM17 8h-3v4h3V8z"}}],hse=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M12 19c.828 0 1.5.672 1.5 1.5S12.828 22 12 22s-1.5-.672-1.5-1.5.672-1.5 1.5-1.5zm0-17c3.314 0 6 2.686 6 6 0 2.165-.753 3.29-2.674 4.923C13.399 14.56 13 15.297 13 17h-2c0-2.474.787-3.695 3.031-5.601C15.548 10.11 16 9.434 16 8c0-2.21-1.79-4-4-4S8 5.79 8 8v1H6V8c0-3.314 2.686-6 6-6z"}}],mse=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M21 19v2h-2v-2h2zm-4 0v2h-2v-2h2zm-4 0v2h-2v-2h2zm-4 0v2H7v-2h2zm-4 0v2H3v-2h2zm16-4v2h-2v-2h2zM5 15v2H3v-2h2zm0-4v2H3v-2h2zm11-8c2.687 0 4.882 2.124 4.995 4.783L21 8v5h-2V8c0-1.591-1.255-2.903-2.824-2.995L16 5h-5V3h5zM5 7v2H3V7h2zm0-4v2H3V3h2zm4 0v2H7V3h2z"}}],gse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M9.683 7.562L12 9.88l6.374-6.375a2 2 0 0 1 2.829 0l.707.707L9.683 16.438a4 4 0 1 1-2.121-2.121L9.88 12 7.562 9.683a4 4 0 1 1 2.121-2.121zM6 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 12a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm9.535-6.587l6.375 6.376-.707.707a2 2 0 0 1-2.829 0l-4.96-4.961 2.12-2.122z"}}],yse=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M14 3c.552 0 1 .448 1 1v5h5c.552 0 1 .448 1 1v10c0 .552-.448 1-1 1H10c-.552 0-1-.448-1-1v-5H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h10zm-1 2H5v8h4v-3c0-.552.448-1 1-1h3V5z"}}],vse=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M11 3c.552 0 1 .448 1 1v2h5c.552 0 1 .448 1 1v5h2c.552 0 1 .448 1 1v7c0 .552-.448 1-1 1h-7c-.552 0-1-.448-1-1v-2H7c-.552 0-1-.448-1-1v-5H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h7zm5 5h-4v3c0 .552-.448 1-1 1H8v4h4v-3c0-.552.448-1 1-1h3V8z"}}],bse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M2 11h2v2H2v-2zm4 0h12v2H6v-2zm14 0h2v2h-2v-2z"}}],Ese=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M9.583 17.321C8.553 16.227 8 15 8 13.011c0-3.5 2.457-6.637 6.03-8.188l.893 1.378c-3.335 1.804-3.987 4.145-4.247 5.621.537-.278 1.24-.375 1.929-.311 1.804.167 3.226 1.648 3.226 3.489a3.5 3.5 0 0 1-3.5 3.5c-1.073 0-2.099-.49-2.748-1.179z"}}],kse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14.417 6.679C15.447 7.773 16 9 16 10.989c0 3.5-2.457 6.637-6.03 8.188l-.893-1.378c3.335-1.804 3.987-4.145 4.247-5.621-.537.278-1.24.375-1.929.311C9.591 12.322 8.17 10.841 8.17 9a3.5 3.5 0 0 1 3.5-3.5c1.073 0 2.099.49 2.748 1.179z"}}],xse=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M19 3l4 5h-3v12h-2V8h-3l4-5zm-5 15v2H3v-2h11zm0-7v2H3v-2h11zm-2-7v2H3V4h9z"}}],Sse=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 4v12h3l-4 5-4-5h3V4h2zm-8 14v2H3v-2h9zm2-7v2H3v-2h11zm0-7v2H3V4h11z"}}],wse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 9v4h16V9h2v5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V9h2z"}}],Tse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M17.5 2.5L23 12l-5.5 9.5h-11L1 12l5.5-9.5h11zm-1.153 2H7.653L3.311 12l4.342 7.5h8.694l4.342-7.5-4.342-7.5zM11 15h2v2h-2v-2zm0-8h2v6h-2V7z"}}],Cse=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h16zm-9 2H5v14h6v-4h2v4h6V5h-6v4h-2V5zm4 4l3 3-3 3v-2H9v2l-3-3 3-3v2h6V9z"}}],Ose=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h16zm-1 2H5v5.999L9 11v2H5v6h14v-6h-4v-2l4-.001V5zm-7 1l3 3h-2v6h2l-3 3-3-3h2V9H9l3-3z"}}],Ase=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13 9h-2V6H5V4h14v2h-6v3zm0 6v5h-2v-5h2zM3 11h18v2H3v-2z"}}],Nse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17.154 14c.23.516.346 1.09.346 1.72 0 1.342-.524 2.392-1.571 3.147C14.88 19.622 13.433 20 11.586 20c-1.64 0-3.263-.381-4.87-1.144V16.6c1.52.877 3.075 1.316 4.666 1.316 2.551 0 3.83-.732 3.839-2.197a2.21 2.21 0 0 0-.648-1.603l-.12-.117H3v-2h18v2h-3.846zm-4.078-3H7.629a4.086 4.086 0 0 1-.481-.522C6.716 9.92 6.5 9.246 6.5 8.452c0-1.236.466-2.287 1.397-3.153C8.83 4.433 10.271 4 12.222 4c1.471 0 2.879.328 4.222.984v2.152c-1.2-.687-2.515-1.03-3.946-1.03-2.48 0-3.719.782-3.719 2.346 0 .42.218.786.654 1.099.436.313.974.562 1.613.75.62.18 1.297.414 2.03.699z"}}],Rse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 6v13H9V6H3V4h14v2h-6zm8.55 10.58a.8.8 0 1 0-1.32-.36l-1.154.33A2.001 2.001 0 0 1 19 14a2 2 0 0 1 1.373 3.454L18.744 19H21v1h-4v-1l2.55-2.42z"}}],_se=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5.596 4L10.5 9.928 15.404 4H18l-6.202 7.497L18 18.994V19h-2.59l-4.91-5.934L5.59 19H3v-.006l6.202-7.497L3 4h2.596zM21.55 16.58a.8.8 0 1 0-1.32-.36l-1.155.33A2.001 2.001 0 0 1 21 14a2 2 0 0 1 1.373 3.454L20.744 19H23v1h-4v-1l2.55-2.42z"}}],Ise=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 11h14v2H5z"}}],Mse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 7v13H9V7H3V5h12v2h-4zm8.55-.42a.8.8 0 1 0-1.32-.36l-1.154.33A2.001 2.001 0 0 1 19 4a2 2 0 0 1 1.373 3.454L18.744 9H21v1h-4V9l2.55-2.42z"}}],Lse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5.596 5l4.904 5.928L15.404 5H18l-6.202 7.497L18 19.994V20h-2.59l-4.91-5.934L5.59 20H3v-.006l6.202-7.497L3 5h2.596zM21.55 6.58a.8.8 0 1 0-1.32-.36l-1.155.33A2.001 2.001 0 0 1 21 4a2 2 0 0 1 1.373 3.454L20.744 9H23v1h-4V9l2.55-2.42z"}}],Dse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M13 10v4h6v-4h-6zm-2 0H5v4h6v-4zm2 9h6v-3h-6v3zm-2 0v-3H5v3h6zm2-14v3h6V5h-6zm-2 0H5v3h6V5zM4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"}}],Pse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 8h16V5H4v3zm10 11v-9h-4v9h4zm2 0h4v-9h-4v9zm-8 0v-9H4v9h4zM3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"}}],zse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 5v10H9v-4a4 4 0 1 1 0-8h8v2h-2v10h-2V5h-2zM9 5a2 2 0 1 0 0 4V5zm8 12v-2.5l4 3.5-4 3.5V19H5v-2h12z"}}],$se=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 5v10H9v-4a4 4 0 1 1 0-8h8v2h-2v10h-2V5h-2zM9 5a2 2 0 1 0 0 4V5zM7 17h12v2H7v2.5L3 18l4-3.5V17z"}}],Bse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7 17h10v-2.5l3.5 3.5-3.5 3.5V19H7v2.5L3.5 18 7 14.5V17zm6-11v9h-2V6H5V4h14v2h-6z"}}],Hse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 18h1.5a2.5 2.5 0 1 0 0-5H3v-2h13.5a4.5 4.5 0 1 1 0 9H15v2l-4-3 4-3v2zM3 4h18v2H3V4zm6 14v2H3v-2h6z"}}],Fse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13 6v15h-2V6H5V4h14v2z"}}],Use=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18.5 10l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16.5 10h2zM10 2v2h6v2h-1.968a18.222 18.222 0 0 1-3.62 6.301 14.864 14.864 0 0 0 2.336 1.707l-.751 1.878A17.015 17.015 0 0 1 9 13.725a16.676 16.676 0 0 1-6.201 3.548l-.536-1.929a14.7 14.7 0 0 0 5.327-3.042A18.078 18.078 0 0 1 4.767 8h2.24A16.032 16.032 0 0 0 9 10.877a16.165 16.165 0 0 0 2.91-4.876L2 6V4h6V2h2zm7.5 10.885L16.253 16h2.492L17.5 12.885z"}}],Vse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 15v2a2 2 0 0 0 1.85 1.995L7 19h3v2H7a4 4 0 0 1-4-4v-2h2zm13-5l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16 10h2zm-1 2.885L15.753 16h2.492L17 12.885zM8 2v2h4v7H8v3H6v-3H2V4h4V2h2zm9 1a4 4 0 0 1 4 4v2h-2V7a2 2 0 0 0-2-2h-3V3h3zM6 6H4v3h2V6zm4 0H8v3h2V6z"}}],jse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 3v9a4 4 0 1 0 8 0V3h2v9a6 6 0 1 1-12 0V3h2zM4 20h16v2H4v-2z"}}],Gse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 19h16v-7h2v8a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-8h2v7zM14 9v6h-4V9H5l7-7 7 7h-5z"}}],Wse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 3.993C3 3.445 3.445 3 3.993 3h16.014c.548 0 .993.445.993.993v16.014a.994.994 0 0 1-.993.993H3.993A.994.994 0 0 1 3 20.007V3.993zM5 5v14h14V5H5zm5.622 3.415l4.879 3.252a.4.4 0 0 1 0 .666l-4.88 3.252a.4.4 0 0 1-.621-.332V8.747a.4.4 0 0 1 .622-.332z"}}],Kse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 21v-2h3.662l1.234-7H5v-2h3.249l.881-5H4V3h16v2h-8.839l-.882 5H18v9h3v2H3zm13-9H9.927l-1.235 7H16v-7z"}}];const Yse=Object.freeze(Object.defineProperty({__proto__:null,ab:uoe,addFill:doe,addLine:poe,alertLine:foe,alignBottom:hoe,alignCenter:moe,alignJustify:goe,alignLeft:yoe,alignRight:voe,alignTop:boe,alignVertically:Eoe,appsLine:koe,arrowDownSFill:xoe,arrowGoBackFill:Soe,arrowGoForwardFill:woe,arrowLeftSFill:Toe,arrowRightSFill:Coe,arrowUpSFill:Ooe,asterisk:Aoe,attachment2:Noe,bold:Roe,bracesLine:_oe,bringForward:Ioe,bringToFront:Moe,chatNewLine:Loe,checkboxCircleLine:Doe,checkboxMultipleLine:Poe,clipboardFill:zoe,clipboardLine:$oe,closeCircleLine:Boe,closeFill:Hoe,closeLine:Foe,codeLine:Uoe,codeView:Voe,deleteBinFill:joe,deleteBinLine:Goe,deleteColumn:Woe,deleteRow:Koe,doubleQuotesL:Yoe,doubleQuotesR:qoe,download2Fill:Xoe,dragDropLine:Zoe,emphasis:Qoe,emphasisCn:Joe,englishInput:eie,errorWarningLine:tie,externalLinkFill:rie,fileCopyLine:nie,flowChart:oie,fontColor:iie,fontSize:aie,fontSize2:sie,formatClear:lie,fullscreenExitLine:cie,fullscreenLine:uie,functions:die,galleryUploadLine:pie,h1:fie,h2:hie,h3:mie,h4:gie,h5:yie,h6:vie,hashtag:bie,heading:Eie,imageAddLine:kie,imageEditLine:xie,imageLine:Sie,indentDecrease:wie,indentIncrease:Tie,informationLine:Cie,inputCursorMove:Oie,insertColumnLeft:Aie,insertColumnRight:Nie,insertRowBottom:Rie,insertRowTop:_ie,italic:Iie,layoutColumnLine:Mie,lineHeight:Lie,link:$ie,linkM:Die,linkUnlink:zie,linkUnlinkM:Pie,listCheck:Hie,listCheck2:Bie,listOrdered:Fie,listUnordered:Uie,markPenLine:Vie,markdownFill:jie,markdownLine:Gie,mergeCellsHorizontal:Wie,mergeCellsVertical:Kie,mindMap:Yie,moreFill:qie,nodeTree:Xie,number0:Zie,number1:Jie,number2:Qie,number3:ese,number4:tse,number5:rse,number6:nse,number7:ose,number8:ise,number9:sse,omega:ase,organizationChart:lse,pageSeparator:cse,paragraph:use,pencilFill:dse,pencilLine:pse,pinyinInput:fse,questionMark:hse,roundedCorner:mse,scissorsFill:gse,sendBackward:yse,sendToBack:vse,separator:bse,singleQuotesL:Ese,singleQuotesR:kse,sortAsc:xse,sortDesc:Sse,space:wse,spamLine:Tse,splitCellsHorizontal:Cse,splitCellsVertical:Ose,strikethrough:Nse,strikethrough2:Ase,subscript:_se,subscript2:Rse,subtractLine:Ise,superscript:Lse,superscript2:Mse,table2:Dse,tableLine:Pse,text:Fse,textDirectionL:zse,textDirectionR:$se,textSpacing:Bse,textWrap:Hse,translate:Vse,translate2:Use,underline:jse,upload2Fill:Gse,videoLine:Wse,wubiInput:Kse},Symbol.toStringTag,{value:"Module"}));function qse(e,t=null){return function(r,n){let{$from:o,$to:i}=r.selection,s=o.blockRange(i),a=!1,l=s;if(!s)return!1;if(s.depth>=2&&o.node(s.depth-1).type.compatibleContent(e)&&s.startIndex==0){if(o.index(s.depth-1)==0)return!1;let u=r.doc.resolve(s.start-2);l=new sa(u,u,s.depth),s.endIndex=0;u--)i=I.from(r[u].type.create(r[u].attrs,i));e.step(new St(t.start-(n?2:0),t.end,t.start,t.end,new W(i,0,0),r.length,!0));let s=0;for(let u=0;us.childCount>0&&s.firstChild.type==e);return i?r?n.node(i.depth-1).type==e?Jse(t,r,e,i):Qse(t,r,i):!0:!1}}function Jse(e,t,r,n){let o=e.tr,i=n.end,s=n.$to.end(n.depth);im;h--)f-=o.child(h).nodeSize,n.delete(f-1,f+1);let i=n.doc.resolve(r.start),s=i.nodeAfter;if(n.mapping.map(r.end)!=r.start+i.nodeAfter.nodeSize)return!1;let a=r.startIndex==0,l=r.endIndex==o.childCount,c=i.node(-1),u=i.index(-1);if(!c.canReplace(u+(a?0:1),u+1,s.content.append(l?I.empty:I.from(o))))return!1;let d=i.pos,p=d+s.nodeSize;return n.step(new St(d-(a?1:0),p+(l?1:0),d+1,p-1,new W((a?I.empty:I.from(o.copy(I.empty))).append(l?I.empty:I.from(o.copy(I.empty))),a?0:1,l?0:1),a?0:1)),t(n.scrollIntoView()),!0}var eae=Object.defineProperty,tae=Object.getOwnPropertyDescriptor,jn=(e,t,r,n)=>{for(var o=n>1?void 0:n?tae(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&eae(t,r,o),o};function Ny(e){var t;return!!((t=e.spec.group)!=null&&t.includes(ie.ListContainerNode))}function rae(e){var t;return!!((t=e.spec.group)!=null&&t.includes(ie.ListItemNode))}function fs(e){return Ny(e.type)}function rs(e){return rae(e.type)}function gE(e,t){return r=>{const{dispatch:n,tr:o}=r,i=iv(o,r.state),{$from:s,$to:a}=o.selection,l=s.blockRange(a);if(!l)return!1;const c=Vd({predicate:u=>Ny(u.type),selection:o.selection});if(c&&l.depth-c.depth<=1&&l.startIndex===0){if(c.node.type===e)return RI(t)(r);if(Ny(c.node.type))return e.validContent(c.node.content)?(n==null||n(o.setNodeMarkup(c.pos,e)),!0):nae(o,c,e,t)?(n==null||n(o.scrollIntoView()),!0):!1}return qse(e)(i,n)}}function AI(e,t=["checked"]){return function({tr:r,dispatch:n,state:o}){var i,s;const a=AP(e,o.schema),{$from:l,$to:c}=r.selection;if(Gd(r.selection)&&r.selection.node.isBlock||l.depth<2||!l.sameParent(c))return!1;const u=l.node(-1);if(u.type!==a)return!1;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(n){const m=l.index(-1)>0;let b=I.empty;for(let v=l.depth-(m?1:2);v>=l.depth-3;v--)b=I.from(l.node(v).copy(b));const y=((i=a.contentMatch.defaultType)==null?void 0:i.createAndFill())||void 0;b=b.append(I.from(a.createAndFill(null,y)||void 0));const g=l.indexAfter(-1)!t.includes(m))),p=c.pos===l.end()?u.contentMatchAt(0).defaultType:null,f={...l.node().attrs};r.delete(l.pos,c.pos);const h=p?[{type:a,attrs:d},{type:p,attrs:f}]:[{type:a,attrs:d}];return bl(r.doc,l.pos,2)?(n&&n(r.split(l.pos,2,h).scrollIntoView()),!0):!1}}function nae(e,t,r,n){const o=t.node,i=e.doc.resolve(t.start),s=i.node(-1),a=i.index(-1);if(!s||!s.canReplace(a,a+1,I.from(r.create())))return!1;const l=[];for(let f=0;fb;m--)h-=o.child(m).nodeSize,n.delete(h-1,h+1);const s=n.doc.resolve(r.start),a=s.nodeAfter;if(!a||n.mapping.slice(i).map(r.end)!==r.start+a.nodeSize)return!1;const l=r.startIndex===0,c=r.endIndex===o.childCount,u=s.node(-1),d=s.index(-1);if(!u.canReplace(d+(l?0:1),d+1,a.content.append(c?I.empty:I.from(o))))return!1;const p=s.pos,f=p+a.nodeSize;return n.step(new St(p-(l?1:0),f+(c?1:0),p+1,f-1,new W((l?I.empty:I.from(o.copy(I.empty))).append(c?I.empty:I.from(o.copy(I.empty))),l?0:1,c?0:1),l?0:1)),t(n.scrollIntoView()),!0}function NI(e,t){const r=t||e.selection.$from;let n=[],o,i,s,a;for(let c=r.depth;c>=0;c--){if(i=r.node(c),o=r.index(c),s=i.maybeChild(o-1),a=i.maybeChild(o),s&&a&&s.type.name===a.type.name&&fs(s)){const u=r.before(c+1);n.push(u)}if(o=r.indexAfter(c),s=i.maybeChild(o-1),a=i.maybeChild(o),s&&a&&s.type.name===a.type.name&&fs(s)){const u=r.after(c+1);n.push(u)}}n=[...new Set(n)].sort((c,u)=>u-c);let l=!1;for(const c of n)Hd(e.doc,c)&&(e.join(c),l=!0);return l}function RI(e){return t=>{const{dispatch:r,tr:n}=t,o=iv(n,t.state),i=sae(e,n.selection);return i?(r&&iae(o,r,i),!0):!1}}function sae(e,t){const{$from:r,$to:n}=t;return r.blockRange(n,i=>{var s;return((s=i.firstChild)==null?void 0:s.type)===e})}function Ih(e){const{$from:t,$to:r}=e;return t.blockRange(r,fs)}function aae(e){const t=e.selection.$from,r=t.blockRange();if(!r||!rs(r.parent)||r.startIndex!==0)return!1;const n=t.node(r.depth-2),o=t.index(r.depth),i=t.index(r.depth-1),s=t.index(r.depth-2),a=n.maybeChild(s-1),l=a==null?void 0:a.lastChild;if(o!==0||i!==0)return!1;if(a&&fs(a)&&l&&rs(l))return ic({listType:a.type,itemType:l.type,tr:e});if(rs(n)){const c=n,u=t.node(r.depth-3);if(fs(u))return ic({listType:u.type,itemType:c.type,tr:e})}return!1}function I2({view:e}){if(!e)return!1;{const t=e.state.selection.$cursor;if(!t||t.parentOffset>0)return!1;const r=t.blockRange();if(!r||!rs(r.parent)||r.startIndex!==0)return!1}{const t=e.state.tr;aae(t)&&e.dispatch(t)}{const t=e.state.selection.$cursor;if(!t||t.parentOffset>0)return!1;const r=t.blockRange();if(!r||!rs(r.parent)||r.startIndex!==0)return!1;const n=t.index(r.depth),o=t.index(r.depth-1),i=t.index(r.depth-2),s=r.depth-2>=1&&rs(t.node(r.depth-2));n===0&&o===0&&i<=1&&s&&Zse(r.parent.type)(e.state,e.dispatch)}return dA(e.state,e.dispatch,e),!0}function _I({node:e,mark:t,updateDOM:r,updateMark:n}){const o=document.createElement("label");o.contentEditable="false",o.classList.add(us.LIST_ITEM_MARKER_CONTAINER),o.append(t);const i=document.createElement("div"),s=document.createElement("li");s.classList.add(us.LIST_ITEM_WITH_CUSTOM_MARKER),s.append(o),s.append(i);const a=l=>l.type!==e.type?!1:(e=l,r(e,s),n(e,t),!0);return a(e),{dom:s,contentDOM:i,update:a}}function lae(e,t){const r=e.node(t.depth-1),n=e.node(t.depth-2);return!rs(r)||!fs(n)?!1:{parentItem:r,parentList:n}}function cae(e,t){const r=t.parent,n=t.parent.child(t.endIndex-1),o=t.end,i=t.$to.end(t.depth);return opae(e)?(t==null||t(e.scrollIntoView()),!0):!1;function hae(e,t,r){let n,o,i,s;const a=t.doc;if(r.startIndex>=1){n=e.child(r.startIndex-1),o=e,s=a.resolve(r.start).start(r.depth),i=s+1;for(let l=0;l=1){const c=t.node(r.depth-1),u=t.start(r.depth-1);if(o=c.child(l-1),!fs(o))return!1;s=u+1;for(let d=0;d=r.depth+2?t.end(r.depth+2):r.end-1,a=r.end;return s+1>=a?(n=e.slice(i,a),o=null):(n=e.slice(i,s),o=e.slice(s+1,a-1)),{selectedSlice:n,unselectedSlice:o}}function gae(e){const{$from:t,$to:r}=e.selection,n=Ih(e.selection);if(!n)return!1;const o=e.doc.resolve(n.start).node();if(!fs(o))return!1;const i=hae(o,t,n);if(!i)return!1;const{previousItem:s,previousList:a,previousItemStart:l}=i,{selectedSlice:c,unselectedSlice:u}=mae(e.doc,r,n),d=s.content.append(I.fromArray([o.copy(c.content)])).append(u?u.content:I.empty);e.deleteRange(n.start,n.end);const p=l+s.nodeSize-2,f=s.copy(d);return f.check(),e.replaceRangeWith(l-1,p+1,f),e.setSelection(a===o?ue.between(e.doc.resolve(t.pos),e.doc.resolve(r.pos)):ue.between(e.doc.resolve(t.pos-2),e.doc.resolve(r.pos-2))),!0}var yae=({tr:e,dispatch:t})=>gae(e)?(t==null||t(e.scrollIntoView()),!0):!1,II=class extends Ye{get name(){return"listItemShared"}createKeymap(){const e={Tab:yae,"Shift-Tab":fae,Backspace:I2,"Mod-Backspace":I2};if(ln.isMac){const t={"Ctrl-h":e.Backspace,"Alt-Backspace":e["Mod-Backspace"]};return{...e,...t}}return e}createPlugin(){return{appendTransaction:(e,t,r)=>{const n=r.tr;return NI(n)?n:null}}}},xa=class extends or{get name(){return"listItem"}createTags(){return[ie.ListItemNode]}createNodeSpec(e,t){return{content:"paragraph block*",defining:!0,draggable:!1,...t,attrs:{...e.defaults(),closed:{default:!1},nested:{default:!1}},parseDOM:[{tag:"li",getAttrs:e.parse,priority:Ue.Lowest},...t.parseDOM??[]],toDOM:r=>["li",e.dom(r),0]}}createNodeViews(){return this.options.enableCollapsible?(e,t,r)=>{const n=document.createElement("div");return n.classList.add(us.COLLAPSIBLE_LIST_ITEM_BUTTON),n.contentEditable="false",n.addEventListener("click",()=>{if(n.classList.contains("disabled"))return;const o=r(),i=de.create(t.state.doc,o);return t.dispatch(t.state.tr.setSelection(i)),this.store.commands.toggleListItemClosed(),!0}),_I({mark:n,node:e,updateDOM:vae,updateMark:bae})}:{}}createKeymap(){return{Enter:AI(this.type)}}createExtensions(){return[new II]}toggleListItemClosed(e){return({state:{tr:t,selection:r},dispatch:n})=>{if(!Gd(r)||r.node.type.name!==this.name)return!1;const{node:o,from:i}=r;return e=V1(e)?e:!o.attrs.closed,n==null||n(t.setNodeMarkup(i,void 0,{...o.attrs,closed:e})),!0}}liftListItemOutOfList(e){return RI(e??this.type)}};jn([Z()],xa.prototype,"toggleListItemClosed",1);jn([Z()],xa.prototype,"liftListItemOutOfList",1);xa=jn([ye({defaultOptions:{enableCollapsible:!1},staticKeys:["enableCollapsible"]})],xa);function vae(e,t){e.attrs.closed?t.classList.add(us.COLLAPSIBLE_LIST_ITEM_CLOSED):t.classList.remove(us.COLLAPSIBLE_LIST_ITEM_CLOSED)}function bae(e,t){e.childCount<=1?t.classList.add("disabled"):t.classList.remove("disabled")}var Od=class extends or{get name(){return"bulletList"}createTags(){return[ie.Block,ie.ListContainerNode]}createNodeSpec(e,t){return{content:"listItem+",...t,attrs:e.defaults(),parseDOM:[{tag:"ul",getAttrs:e.parse},...t.parseDOM??[]],toDOM:r=>["ul",e.dom(r),0]}}createNodeViews(){return this.options.enableSpine?(e,t,r)=>{var n;const o=document.createElement("div");o.style.position="relative";const i=r(),s=t.state.doc.resolve(i+1),a=s.node(s.depth-1);if(!(((n=a==null?void 0:a.type)==null?void 0:n.name)!=="listItem")){const u=document.createElement("div");u.contentEditable="false",u.classList.add(us.LIST_SPINE),u.addEventListener("click",d=>{const p=r(),f=t.state.doc.resolve(p+1),h=f.start(f.depth-1),m=de.create(t.state.doc,h-1);t.dispatch(t.state.tr.setSelection(m)),this.store.commands.toggleListItemClosed(),d.preventDefault(),d.stopPropagation()}),o.append(u)}const c=document.createElement("ul");return c.classList.add(us.UL_LIST_CONTENT),o.append(c),{dom:o,contentDOM:c}}:{}}createExtensions(){return[new xa({priority:Ue.Low,enableCollapsible:this.options.enableSpine})]}toggleBulletList(){return gE(this.type,lt(this.store.schema.nodes,"listItem"))}listShortcut(e){return this.toggleBulletList()(e)}createInputRules(){const e=/^\s*([*+-])\s$/;return[Xh(e,this.type),new Oa(e,(t,r,n,o)=>{const i=t.tr;return i.deleteRange(n,o),ic({listType:this.type,itemType:lt(this.store.schema.nodes,"listItem"),tr:i})?i:null})]}};jn([Z({icon:"listUnordered",label:({t:e})=>e(Yy.BULLET_LIST_LABEL)})],Od.prototype,"toggleBulletList",1);jn([Nt({shortcut:V.BulletList,command:"toggleBulletList"})],Od.prototype,"listShortcut",1);Od=jn([ye({defaultOptions:{enableSpine:!1},staticKeys:["enableSpine"]})],Od);var Ad=class extends or{get name(){return"orderedList"}createTags(){return[ie.Block,ie.ListContainerNode]}createNodeSpec(e,t){return{content:"listItem+",...t,attrs:{...e.defaults(),order:{default:1}},parseDOM:[{tag:"ol",getAttrs:r=>dt(r)?{...e.parse(r),order:+(r.getAttribute("start")??1)}:{}},...t.parseDOM??[]],toDOM:r=>{const n=e.dom(r);return r.attrs.order===1?["ol",n,0]:["ol",{...n,start:r.attrs.order},0]}}}createExtensions(){return[new xa({priority:Ue.Low})]}toggleOrderedList(){return gE(this.type,lt(this.store.schema.nodes,"listItem"))}listShortcut(e){return this.toggleOrderedList()(e)}createInputRules(){const e=/^(\d+)\.\s$/;return[Xh(e,this.type,t=>({order:+lt(t,1)}),(t,r)=>r.childCount+r.attrs.order===+lt(t,1)),new Oa(e,(t,r,n,o)=>{const i=t.tr;if(i.deleteRange(n,o),!ic({listType:this.type,itemType:lt(this.store.schema.nodes,"listItem"),tr:i}))return null;const a=+lt(r,1);if(a!==1){const l=Mo({selection:i.selection,types:this.type});l&&i.setNodeMarkup(l.pos,void 0,{order:a})}return i})]}};jn([Z({icon:"listOrdered",label:({t:e})=>e(Yy.ORDERED_LIST_LABEL)})],Ad.prototype,"toggleOrderedList",1);jn([Nt({shortcut:V.OrderedList,command:"toggleOrderedList"})],Ad.prototype,"listShortcut",1);Ad=jn([ye({})],Ad);var MI=class extends or{get name(){return"taskListItem"}createTags(){return[ie.ListItemNode]}createNodeSpec(e,t){return{content:"paragraph block*",defining:!0,draggable:!1,...t,attrs:{...e.defaults(),checked:{default:!1}},parseDOM:[{tag:"li[data-task-list-item]",getAttrs:r=>{let n=!1;return dt(r)&&r.getAttribute("data-checked")!==null&&(n=!0),{checked:n,...e.parse(r)}},priority:Ue.Medium},...t.parseDOM??[]],toDOM:r=>["li",{...e.dom(r),"data-task-list-item":"","data-checked":r.attrs.checked?"":void 0},0]}}createNodeViews(){return(e,t,r)=>{const n=document.createElement("input");return n.type="checkbox",n.classList.add(us.LIST_ITEM_CHECKBOX),n.contentEditable="false",n.addEventListener("click",o=>{t.editable||o.preventDefault()}),n.addEventListener("change",()=>{const o=r(),i=t.state.doc.resolve(o+1);this.store.commands.toggleCheckboxChecked({$pos:i})}),n.checked=e.attrs.checked,_I({node:e,mark:n,updateDOM:Eae,updateMark:kae})}}createKeymap(){return{Enter:AI(this.type)}}createExtensions(){return[new II]}toggleCheckboxChecked(e){let t,r;return typeof e=="boolean"?t=e:e&&(t=e.checked,r=e.$pos),({tr:n,dispatch:o})=>{const i=Mo({selection:r??n.selection.$from,types:this.type});if(!i)return!1;const{node:s,pos:a}=i,l={...s.attrs,checked:t??!s.attrs.checked};return o==null||o(n.setNodeMarkup(a,void 0,l)),!0}}createInputRules(){const e=/^\s*(\[( ?|x|X)]\s)$/;return[Xh(e,this.type,t=>({checked:["x","X"].includes(xl(t,2))})),new Oa(e,(t,r,n,o)=>{const i=t.tr;if(i.deleteRange(n,o),!ic({listType:lt(this.store.schema.nodes,"taskList"),itemType:this.type,tr:i}))return null;const a=["x","X"].includes(xl(r,2));if(a){const l=Mo({selection:i.selection,types:this.type});l&&i.setNodeMarkup(l.pos,void 0,{checked:a})}return i})]}};jn([Z()],MI.prototype,"toggleCheckboxChecked",1);function Eae(e,t){e.attrs.checked?t.setAttribute("data-checked",""):t.removeAttribute("data-checked"),t.setAttribute("data-task-list-item","")}function kae(e,t){t.checked=!!e.attrs.checked}var LI=class extends or{get name(){return"taskList"}createTags(){return[ie.Block,ie.ListContainerNode]}createNodeSpec(e,t){return{content:"taskListItem+",...t,attrs:e.defaults(),parseDOM:[{tag:"ul[data-task-list]",getAttrs:e.parse,priority:Ue.Medium},...t.parseDOM??[]],toDOM:r=>["ul",{...e.dom(r),"data-task-list":""},0]}}createExtensions(){return[new MI({})]}toggleTaskList(){return gE(this.type,lt(this.store.schema.nodes,"taskListItem"))}listShortcut(e){return this.toggleTaskList()(e)}};jn([Z({icon:"checkboxMultipleLine",label:({t:e})=>e(Yy.TASK_LIST_LABEL)})],LI.prototype,"toggleTaskList",1);jn([Nt({shortcut:V.TaskList,command:"toggleTaskList"})],LI.prototype,"listShortcut",1);var ho,xae=(e=document)=>ho||(ho=e.createElement("div"),ho.setAttribute("id","a11y-status-message"),ho.setAttribute("role","status"),ho.setAttribute("aria-live","polite"),ho.setAttribute("aria-relevant","additions text"),Object.assign(ho.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.append(ho),ho);bC(500,()=>{xae().textContent=""});function M2(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function L2(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function I1(e,t){if(e.clientHeightt||i>e&&s=t&&a>=r?i-e-n:s>t&&ar?s-t+o:0}var Sae=function(e,t){var r=window,n=t.scrollMode,o=t.block,i=t.inline,s=t.boundary,a=t.skipOverflowHiddenElements,l=typeof s=="function"?s:function(He){return He!==s};if(!M2(e))throw new TypeError("Invalid target");for(var c,u,d=document.scrollingElement||document.documentElement,p=[],f=e;M2(f)&&l(f);){if((f=(u=(c=f).parentElement)==null?c.getRootNode().host||null:u)===d){p.push(f);break}f!=null&&f===document.body&&I1(f)&&!I1(document.documentElement)||f!=null&&I1(f,a)&&p.push(f)}for(var h=r.visualViewport?r.visualViewport.width:innerWidth,m=r.visualViewport?r.visualViewport.height:innerHeight,b=window.scrollX||pageXOffset,y=window.scrollY||pageYOffset,g=e.getBoundingClientRect(),v=g.height,E=g.width,k=g.top,x=g.right,w=g.bottom,C=g.left,T=o==="start"||o==="nearest"?k:o==="end"?w:k+v/2,O=i==="center"?C+E/2:i==="end"?x:C,_=[],P=0;P=0&&C>=0&&w<=m&&x<=h&&k>=G&&w<=M&&C>=L&&x<=R)return _;var K=getComputedStyle($),q=parseInt(K.borderLeftWidth,10),Re=parseInt(K.borderTopWidth,10),ae=parseInt(K.borderRightWidth,10),pe=parseInt(K.borderBottomWidth,10),fe=0,ge=0,Ae="offsetWidth"in $?$.offsetWidth-$.clientWidth-q-ae:0,Te="offsetHeight"in $?$.offsetHeight-$.clientHeight-Re-pe:0,gt="offsetWidth"in $?$.offsetWidth===0?0:z/$.offsetWidth:0,it="offsetHeight"in $?$.offsetHeight===0?0:F/$.offsetHeight:0;if(d===$)fe=o==="start"?T:o==="end"?T-m:o==="nearest"?Fp(y,y+m,m,Re,pe,y+T,y+T+v,v):T-m/2,ge=i==="start"?O:i==="center"?O-h/2:i==="end"?O-h:Fp(b,b+h,h,q,ae,b+O,b+O+E,E),fe=Math.max(0,fe+y),ge=Math.max(0,ge+b);else{fe=o==="start"?T-G-Re:o==="end"?T-M+pe+Te:o==="nearest"?Fp(G,M,F,Re,pe+Te,T,T+v,v):T-(G+F/2)+Te/2,ge=i==="start"?O-L-q:i==="center"?O-(L+z/2)+Ae/2:i==="end"?O-R+ae+Ae:Fp(L,R,z,q,ae+Ae,O,O+E,E);var Ir=$.scrollLeft,me=$.scrollTop;T+=me-(fe=Math.max(0,Math.min(me+fe/it,$.scrollHeight-F/it+Te))),O+=Ir-(ge=Math.max(0,Math.min(Ir+ge/gt,$.scrollWidth-z/gt+Ae)))}_.push({el:$,top:fe,left:ge})}return _};typeof kr=="object"&&kr.__esModule&&kr.default&&kr.default;Yh(Sae);var wae=typeof document<"u"?S.useLayoutEffect:S.useEffect;function Tae(e){const t=S.useRef();return wae(()=>{t.current=e}),t.current}function Cae(e,t){const[r,n]=S.useState([]),[o,i]=S.useState(()=>v0(e)),[s,a]=S.useState([]),l=S.useRef(e),c=Tae(o);return l.current=e,tp(Vl,({addCustomHandler:u})=>{const d=v0(l.current),p=u("positioner",d);return i(d),p},t),S.useLayoutEffect(()=>{const u=o.addListener("update",p=>{const f=[];for(const{id:h,data:m,setElement:b}of p){const y=g=>{g&&b(g)};f.push({id:h,data:m,ref:y})}a(f)}),d=o.addListener("done",p=>{n(p)});return c!=null&&c.recentUpdate&&o.onActiveChanged(c==null?void 0:c.recentUpdate),()=>{u(),d()}},[o,c]),S.useMemo(()=>{const u=[];for(const[d,{ref:p,data:f,id:h}]of s.entries()){const m=r[d],{element:b,position:y={}}=m??{},g={...fm,...SC(y)};u.push({ref:p,element:b,data:f,key:h,...g})}return u},[s,r])}function DI(e,t){const r=t==null||V1(t)?[e]:t,n=V1(t)?t:!0,o=S.useRef(Ml()),s=Cae(e,r)[0];return S.useMemo(()=>s&&n?{...s,active:!0}:{...fm,ref:void 0,data:{},active:!1,key:o.current},[n,s])}function M1(e,t){return De(e)?e(t):e}function Oae(e){return oe(e[0])}function Aae(e,t){var r;return oe(e)?e:ft(e)?Oae(e)?e[0]??"":((r=e.find(n=>wC(n.attrs,t))??e[0])==null?void 0:r.shortcut)??"":e.shortcut}var Nae={title:e=>j4(e),upper:e=>e.toLocaleUpperCase(),lower:e=>e.toLocaleLowerCase()};function Rae(e,t){const{casing:r="title",namedAsSymbol:n=!1,modifierAsSymbol:o=!0,separator:i=" ",t:s}=t,a=sz(e),l=[],c=Nae[r];for(const u of a){if(u.type==="char"){l.push(c(u.key));continue}if(u.type==="named"){const p=n===!0||ft(n)&&wr(n,u.key)?u.symbol??s(u.i18n):s(u.i18n);l.push(c(p));continue}const d=o===!0||ft(o)&&wr(o,u.key)?u.symbol:s(u.i18n);l.push(c(d))}return l.join(i)}var PI=({commandName:e,active:t,enabled:r,attrs:n})=>{const{t:o}=jq(),{getCommandOptions:i}=rp(),s=i(e),{description:a,label:l,icon:c,shortcut:u}=s||{},d=S.useMemo(()=>({active:t,attrs:n,enabled:r,t:o}),[t,n,r,o]),p=S.useMemo(()=>{if(u)return Rae(Aae(u,n??{}),{t:o,separator:""})},[u,n,o]);return S.useMemo(()=>({description:M1(a,d),label:M1(l,d),icon:M1(c,d),shortcut:p}),[d,a,l,c,p])},_ae={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},zI=S.createContext(_ae);zI.Provider;function $I(e){return e.map((t,r)=>S.createElement(t.tag,{key:r,...t.attr},$I(t.child??[])))}var hg=e=>{const{name:t}=e;return D.createElement(Iae,{...e},$I(Yse[t]))},Iae=e=>{const t=r=>{const n=e.size??r.size??"1em";let o;r.className&&(o=r.className),e.className&&(o=(o?`${o} `:"")+e.className);const{title:i,...s}=e;return D.createElement("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",...r.attr,...s,className:o,style:{color:e.color??r.color,...r.style,...e.style},height:n,width:n,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},i&&D.createElement("title",null,i),e.children)};return D.createElement(zI.Consumer,null,t)},Mae=e=>gs(e)?!!e.name:!1,Lae=({icon:e})=>oe(e)?D.createElement(hg,{name:e,size:"1rem"}):e,Dae=({icon:e,children:t})=>{if(!Mae(e))return D.createElement(D.Fragment,null,t);const{sub:r,sup:n}=e,o=r??n,i=r!==void 0;return o===void 0?D.createElement(D.Fragment,null,t):D.createElement(Pre,{anchorOrigin:{vertical:i?"bottom":"top",horizontal:"right"},badgeContent:o,sx:{"& > .MuiBadge-badge":{bgcolor:"background.paper",color:"text.secondary",minWidth:12,height:12,margin:"2px 0",padding:"1px"}}},t)},mt=({commandName:e,active:t=!1,enabled:r,attrs:n,onSelect:o,onChange:i,icon:s,displayShortcut:a=!0,"aria-label":l,label:c,...u})=>{const d=S.useCallback((g,v)=>{o(),i==null||i(g,v)},[o,i]),p=S.useCallback(g=>{g.preventDefault()},[]),f=PI({commandName:e,active:t,enabled:r,attrs:n});let h=null;f.icon&&(h=oe(f.icon)?f.icon:f.icon.name);const m=l??f.label??"",b=c??m,y=a&&f.shortcut?` (${f.shortcut})`:"";return D.createElement(OI,{title:`${b}${y}`},D.createElement(SI,{component:"span",sx:{"&:not(:first-of-type)":{marginLeft:"-1px"}}},D.createElement(coe,{"aria-label":m,selected:t,disabled:!r,onMouseDown:p,color:"primary",size:"small",sx:{padding:"6px 12px","&.Mui-selected":{backgroundColor:"primary.main",color:"primary.contrastText"},"&.Mui-selected:hover":{backgroundColor:"primary.dark",color:"primary.contrastText"},"&:not(:first-of-type)":{borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},"&:not(:last-of-type)":{borderTopRightRadius:0,borderBottomRightRadius:0}},...u,value:e,onChange:d},D.createElement(Dae,{icon:f.icon},D.createElement(Lae,{icon:s??h})))))},Pae=({icon:e})=>oe(e)?D.createElement(hg,{name:e,size:"1rem"}):e,BI=({label:e,"aria-label":t,icon:r,children:n,onClose:o,...i})=>{const s=S.useRef(Ml()),[a,l]=S.useState(null),c=!!a,u=S.useCallback(f=>{f.preventDefault()},[]),d=S.useCallback(f=>{l(f.currentTarget)},[]),p=S.useCallback((f,h)=>{l(null),o==null||o(f,h)},[o]);return D.createElement(D.Fragment,null,D.createElement(OI,{title:e??t},D.createElement(See,{"aria-label":t,"aria-controls":c?s.current:void 0,"aria-haspopup":!0,"aria-expanded":c?"true":void 0,onMouseDown:u,onClick:d,size:"small",sx:f=>({border:`1px solid ${f.palette.divider}`,borderRadius:`${f.shape.borderRadius}px`,padding:"6px 12px","&:not(:first-of-type)":{marginLeft:"-1px",borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},"&:not(:last-of-type)":{borderTopRightRadius:0,borderBottomRightRadius:0}})},r&&D.createElement(Pae,{icon:r}),D.createElement(hg,{name:"arrowDownSFill",size:"1rem"}))),D.createElement(Bne,{...i,id:s.current,anchorEl:a,open:c,onClose:p},n))},zae=e=>{const{insertHorizontalRule:t}=Wt();Pb();const r=S.useCallback(()=>{t.enabled()&&t()},[t]),n=t.enabled();return D.createElement(mt,{...e,commandName:"insertHorizontalRule",enabled:n,onSelect:r})},$ae=e=>{const{redo:t}=Wt(),{redoDepth:r}=rp(!0),n=S.useCallback(()=>{t.enabled()&&t()},[t]),o=r()>0;return D.createElement(mt,{...e,commandName:"redo",active:!1,enabled:o,onSelect:n})},Bae=e=>{const{toggleBlockquote:t}=Wt(),r=S.useCallback(()=>{t.enabled()&&t()},[t]),n=Rr().blockquote(),o=t.enabled();return D.createElement(mt,{...e,commandName:"toggleBlockquote",active:n,enabled:o,onSelect:r})},yE=e=>{const{toggleBold:t}=Wt(),r=S.useCallback(()=>{t.enabled()&&t()},[t]),n=Rr().bold(),o=t.enabled();return D.createElement(mt,{...e,commandName:"toggleBold",active:n,enabled:o,onSelect:r})},Hae=e=>{const{toggleBulletList:t}=Wt(),r=S.useCallback(()=>{t.enabled()&&t()},[t]),n=Rr().bulletList(),o=t.enabled();return D.createElement(mt,{...e,commandName:"toggleBulletList",active:n,enabled:o,onSelect:r})},Fae=({attrs:e={},...t})=>{const{toggleCodeBlock:r}=Wt(),n=S.useCallback(()=>{r.enabled(e)&&r(e)},[r,e]),o=Rr().codeBlock(),i=r.enabled(e);return D.createElement(mt,{...t,commandName:"toggleCodeBlock",active:o,enabled:i,attrs:e,onSelect:n})},vE=e=>{const{toggleCode:t}=Wt(),r=S.useCallback(()=>{t.enabled()&&t()},[t]),n=Rr().code(),o=t.enabled();return D.createElement(mt,{...e,commandName:"toggleCode",active:n,enabled:o,onSelect:r})},L1=({attrs:e,...t})=>{const{toggleHeading:r}=Wt(),n=S.useCallback(()=>{r.enabled(e)&&r(e)},[r,e]),o=Rr().heading(e),i=r.enabled(e);return D.createElement(mt,{...t,commandName:"toggleHeading",active:o,enabled:i,attrs:e,onSelect:n})},bE=e=>{const{toggleItalic:t}=Wt(),r=S.useCallback(()=>{t.enabled()&&t()},[t]),n=Rr().italic(),o=t.enabled();return D.createElement(mt,{...e,commandName:"toggleItalic",active:n,enabled:o,onSelect:r})},Uae=e=>{const{toggleOrderedList:t}=Wt(),r=S.useCallback(()=>{t.enabled()&&t()},[t]),n=Rr().orderedList(),o=t.enabled();return D.createElement(mt,{...e,commandName:"toggleOrderedList",active:n,enabled:o,onSelect:r})},Vae=e=>{const{toggleStrike:t}=Wt(),r=S.useCallback(()=>{t.enabled()&&t()},[t]),n=Rr().strike(),o=t.enabled();return D.createElement(mt,{...e,commandName:"toggleStrike",active:n,enabled:o,onSelect:r})},EE=e=>{const{toggleUnderline:t}=Wt(),r=S.useCallback(()=>{t.enabled()&&t()},[t]),n=Rr().underline(),o=t.enabled();return D.createElement(mt,{...e,commandName:"toggleUnderline",active:n,enabled:o,onSelect:r})},jae=e=>{const{undo:t}=Wt(),{undoDepth:r}=rp(!0),n=S.useCallback(()=>{t.enabled()&&t()},[t]),o=r()>0;return D.createElement(mt,{...e,commandName:"undo",active:!1,enabled:o,onSelect:n})},An=e=>D.createElement(SI,{sx:{display:"flex",alignItems:"center",width:"fit-content",bgcolor:"background.paper",color:"text.secondary"},...e}),Gae=({children:e})=>D.createElement(An,null,D.createElement(yE,null),D.createElement(bE,null),D.createElement(EE,null),D.createElement(Vae,null),D.createElement(vE,null),e),Wae=({icon:e})=>e?D.createElement(une,null,oe(e)?D.createElement(hg,{name:e,size:"1rem"}):D.createElement(D.Fragment,null,e)):null,kE=({commandName:e,active:t=!1,enabled:r,attrs:n,onSelect:o,onClick:i,icon:s,displayShortcut:a=!0,label:l,description:c,displayDescription:u=!0,...d})=>{const p=S.useCallback(g=>{o(),i==null||i(g)},[o,i]),f=S.useCallback(g=>{g.preventDefault()},[]),h=PI({commandName:e,active:t,enabled:r,attrs:n});let m=null;h.icon&&(m=oe(h.icon)?h.icon:h.icon.name);const b=l??h.label??"",y=u&&(c??h.description);return D.createElement(Kne,{selected:t,disabled:!r,onMouseDown:f,...d,onClick:p},s!==null&&D.createElement(Wae,{icon:s??m}),D.createElement(yne,{primary:b,secondary:y}),a&&h.shortcut&&D.createElement(ku,{variant:"body2",color:"text.secondary",sx:{ml:2}},h.shortcut))},Up=({attrs:e,...t})=>{const{toggleHeading:r}=Wt(),n=S.useCallback(()=>{r.enabled(e)&&r(e)},[r,e]),o=Rr().heading(e),i=r.enabled(e);return D.createElement(kE,{...t,commandName:"toggleHeading",active:o,enabled:i,attrs:e,onSelect:n})},Kae={level:1},Yae={level:2},D2={level:3},qae={level:4},Xae={level:5},Zae={level:6},Jae=({showAll:e=!1,children:t})=>D.createElement(An,null,D.createElement(L1,{attrs:Kae}),D.createElement(L1,{attrs:Yae}),e?D.createElement(BI,{"aria-label":"More heading options"},D.createElement(Up,{attrs:D2}),D.createElement(Up,{attrs:qae}),D.createElement(Up,{attrs:Xae}),D.createElement(Up,{attrs:Zae})):D.createElement(L1,{attrs:D2}),t),Qae=({children:e})=>D.createElement(An,null,D.createElement(jae,null),D.createElement($ae,null),e);typeof kr=="object"&&kr.__esModule&&kr.default&&kr.default;var ele=e=>{const t=rp().getPositionerWidget();return ep.createPortal(D.createElement(D.Fragment,null,e.children),t)},HI=S.createContext({});function tle(e={}){const t=S.useContext(HI),r=S.useMemo(()=>OC(t,e.theme??{}),[t,e.theme]),n=S.useMemo(()=>BF(r).styles,[r]),o=Fl($F,e.className);return S.useMemo(()=>({style:n,className:o,theme:r}),[n,o,r])}var rle=e=>{var t,r,n,o,i,s,a,l;const{children:c,as:u="div"}=e,{theme:d,style:p,className:f}=tle({theme:e.theme??As}),h=rE({palette:{primary:{main:((t=d.color)==null?void 0:t.primary)??As.color.primary,dark:((n=(r=d.color)==null?void 0:r.hover)==null?void 0:n.primary)??As.color.hover.primary,contrastText:((o=d.color)==null?void 0:o.primaryText)??As.color.primaryText},secondary:{main:((i=d.color)==null?void 0:i.secondary)??As.color.secondary,dark:((a=(s=d.color)==null?void 0:s.hover)==null?void 0:a.secondary)??As.color.hover.secondary,contrastText:((l=d.color)==null?void 0:l.secondaryText)??As.color.secondaryText}}});return D.createElement(PQ,{theme:h},D.createElement(HI.Provider,{value:d},D.createElement(u,{style:p,className:f},c)))},FI=e=>D.createElement(Yre,{direction:"row",spacing:1,sx:{backgroundColor:"background.paper",overflowX:"auto"},...e}),nle=[{name:"offset",options:{offset:[0,8]}}],ole=({positioner:e="selection",children:t,...r})=>{const{ref:n,x:o,y:i,width:s,height:a,active:l}=DI(()=>v0(e),[e]),[c,u]=S.useState(null),d=S.useMemo(()=>({position:"absolute",pointerEvents:"none",left:o,top:i,width:s,height:a}),[o,i,s,a]),p=S.useCallback(f=>{u(f),n==null||n(f)},[n]);return D.createElement(D.Fragment,null,D.createElement("div",{ref:p,style:d}),D.createElement(mE,{placement:"top",modifiers:nle,...r,open:l,anchorEl:c},D.createElement(FI,null,t?D.createElement(D.Fragment,null,t):D.createElement(Gae,null))))},ile=({languages:e=[],className:t="",offset:r={x:0,y:0},onLanguageChange:n,onPointerDownSelect:o,onSelectChange:i})=>{var s;const a=DI(ale,[]),{getExtension:l,getState:c}=$o(),{focus:u,updateCodeBlock:d}=Wt(),p=l(zn).options,[f]=S.useState(()=>{const E=new Map;return p.supportedLanguages.forEach(k=>{k.aliases.forEach(x=>!e.some(w=>w.displayName===x)&&E.set(x,k.displayName))}),E}),[h]=S.useState([...e,{displayName:p.defaultLanguage},...p.supportedLanguages]),{selection:m}=c(),[b,y]=S.useState("auto"),g=(s=Mo({selection:m,types:"codeBlock"}))==null?void 0:s.node.attrs.language,v=S.useMemo(()=>{const E=f.get(g);return E||(p.supportedLanguages.some(k=>g===k.displayName)?g:p.defaultLanguage)},[f,p.defaultLanguage,p.supportedLanguages,g]);return S.useEffect(()=>{var E;const k=a.element;if(n!=null&&n(v,k,y))return;if((w=>w&&w.nodeName==="SELECT"||!1)(k)){const w=(E=k.options[k.selectedIndex])==null?void 0:E.dataset.width;y(w?`${w}px`:"auto")}},[a.element,v,n]),D.createElement(ele,null,D.createElement("select",{ref:a.ref,className:t,onBlur:()=>u(),onChange:E=>{var k;i!=null&&i(E,y)||(y(`${(k=E.target.options[E.target.selectedIndex])==null?void 0:k.dataset.width}px`),d({language:E.target.dataset.value||E.target.value}))},onPointerDown:o,style:{"--w":b,"--x":`${a.x+r.x}px`,"--y":`${a.y+r.y}px`,display:g?"block":"none"},value:v},g?sle(h):null))},sle=w$(e=>Fy(e.map(({displayName:r,value:n})=>({displayName:r,value:n||r})),"displayName").sort((r,n)=>r.displayName>n.displayName?1:r.displayName{const n=document.createElement("select"),o=document.createElement("option");let i="0px";return n.append(o),document.body.append(n),o.textContent=r.displayName,i=String(n.getBoundingClientRect().width),n.remove(),{...r,width:i}}).map(({displayName:r,value:n,width:o})=>D.createElement("option",{key:r,"data-value":n,"data-width":o,value:r},r)));function ale(){return pn.create({getActive(e){const{selection:t}=e.state,r=Mo({selection:t,types:"codeBlock"});return r?[{codeBlockResult:r}]:pn.EMPTY},getPosition(e){const{data:t,view:r}=e,{pos:n}=t.codeBlockResult,o=r.nodeDOM(n);if(!o||!dt(o))return fm;const i=o.getBoundingClientRect(),s=r.dom.getBoundingClientRect(),a=r.dom.scrollLeft+i.left-s.left,l=r.dom.scrollTop+i.top-s.top,c=Hv(i,r.dom);return{height:0,rect:i,visible:c,width:0,x:a,y:l}},hasChanged:Bv})}var Rt=Yh(wh),xE=wt` +`),io.rippleVisible,Cne,Gy,({theme:t})=>t.transitions.easing.easeInOut,io.ripplePulsate,({theme:t})=>t.transitions.duration.shorter,io.child,io.childLeaving,Tne,Gy,({theme:t})=>t.transitions.easing.easeInOut,io.childPulsate,Ane,({theme:t})=>t.transitions.easing.easeInOut),Mne=P.forwardRef(function(e,n){const r=Tn({props:e,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:s}=r,l=Fe(r,Ene),[a,u]=P.useState([]),c=P.useRef(0),d=P.useRef(null);P.useEffect(()=>{d.current&&(d.current(),d.current=null)},[a]);const h=P.useRef(!1),f=P.useRef(0),p=P.useRef(null),g=P.useRef(null);P.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]);const m=P.useCallback(w=>{const{pulsate:k,rippleX:x,rippleY:S,rippleSize:T,cb:C}=w;u(O=>[...O,j.jsx(Rne,{classes:{ripple:Ge(i.ripple,io.ripple),rippleVisible:Ge(i.rippleVisible,io.rippleVisible),ripplePulsate:Ge(i.ripplePulsate,io.ripplePulsate),child:Ge(i.child,io.child),childLeaving:Ge(i.childLeaving,io.childLeaving),childPulsate:Ge(i.childPulsate,io.childPulsate)},timeout:Gy,pulsate:k,rippleX:x,rippleY:S,rippleSize:T},c.current)]),c.current+=1,d.current=C},[i]),v=P.useCallback((w={},k={},x=()=>{})=>{const{pulsate:S=!1,center:T=o||k.pulsate,fakeElement:C=!1}=k;if((w==null?void 0:w.type)==="mousedown"&&h.current){h.current=!1;return}(w==null?void 0:w.type)==="touchstart"&&(h.current=!0);const O=C?null:g.current,_=O?O.getBoundingClientRect():{width:0,height:0,left:0,top:0};let R,A,E;if(T||w===void 0||w.clientX===0&&w.clientY===0||!w.clientX&&!w.touches)R=Math.round(_.width/2),A=Math.round(_.height/2);else{const{clientX:M,clientY:I}=w.touches&&w.touches.length>0?w.touches[0]:w;R=Math.round(M-_.left),A=Math.round(I-_.top)}if(T)E=Math.sqrt((2*_.width**2+_.height**2)/3),E%2===0&&(E+=1);else{const M=Math.max(Math.abs((O?O.clientWidth:0)-R),R)*2+2,I=Math.max(Math.abs((O?O.clientHeight:0)-A),A)*2+2;E=Math.sqrt(M**2+I**2)}w!=null&&w.touches?p.current===null&&(p.current=()=>{m({pulsate:S,rippleX:R,rippleY:A,rippleSize:E,cb:x})},f.current=setTimeout(()=>{p.current&&(p.current(),p.current=null)},Sne)):m({pulsate:S,rippleX:R,rippleY:A,rippleSize:E,cb:x})},[o,m]),y=P.useCallback(()=>{v({},{pulsate:!0})},[v]),b=P.useCallback((w,k)=>{if(clearTimeout(f.current),(w==null?void 0:w.type)==="touchend"&&p.current){p.current(),p.current=null,f.current=setTimeout(()=>{b(w,k)});return}p.current=null,u(x=>x.length>0?x.slice(1):x),d.current=k},[]);return P.useImperativeHandle(n,()=>({pulsate:y,start:v,stop:b}),[y,v,b]),j.jsx(_ne,K({className:Ge(io.root,i.root,s),ref:g},l,{children:j.jsx(pne,{component:null,exit:!0,children:a})}))}),One=Mne;function Ine(t){return En("MuiButtonBase",t)}const Lne=Sn("MuiButtonBase",["root","disabled","focusVisible"]),Nne=Lne,$ne=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],Dne=t=>{const{disabled:e,focusVisible:n,focusVisibleClassName:r,classes:o}=t,s=zn({root:["root",e&&"disabled",n&&"focusVisible"]},Ine,o);return n&&r&&(s.root+=` ${r}`),s},Pne=St("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Nne.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),zne=P.forwardRef(function(e,n){const r=Tn({props:e,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:s,className:l,component:a="button",disabled:u=!1,disableRipple:c=!1,disableTouchRipple:d=!1,focusRipple:h=!1,LinkComponent:f="a",onBlur:p,onClick:g,onContextMenu:m,onDragLeave:v,onFocus:y,onFocusVisible:b,onKeyDown:w,onKeyUp:k,onMouseDown:x,onMouseLeave:S,onMouseUp:T,onTouchEnd:C,onTouchMove:O,onTouchStart:_,tabIndex:R=0,TouchRippleProps:A,touchRippleRef:E,type:M}=r,I=Fe(r,$ne),N=P.useRef(null),L=P.useRef(null),$=_r(L,E),{isFocusVisibleRef:D,onFocus:F,onBlur:U,ref:W}=vL(),[B,H]=P.useState(!1);u&&B&&H(!1),P.useImperativeHandle(o,()=>({focusVisible:()=>{H(!0),N.current.focus()}}),[]);const[V,Y]=P.useState(!1);P.useEffect(()=>{Y(!0)},[]);const X=V&&!c&&!u;P.useEffect(()=>{B&&h&&!c&&V&&L.current.pulsate()},[c,h,B,V]);function Z(ie,Te,Ze=d){return za(Xe=>(Te&&Te(Xe),!Ze&&L.current&&L.current[ie](Xe),!0))}const te=Z("start",x),ce=Z("stop",m),Ne=Z("stop",v),ye=Z("stop",T),Me=Z("stop",ie=>{B&&ie.preventDefault(),S&&S(ie)}),Ce=Z("start",_),mt=Z("stop",C),Lt=Z("stop",O),wt=Z("stop",ie=>{U(ie),D.current===!1&&H(!1),p&&p(ie)},!1),qn=za(ie=>{N.current||(N.current=ie.currentTarget),F(ie),D.current===!0&&(H(!0),b&&b(ie)),y&&y(ie)}),Nt=()=>{const ie=N.current;return a&&a!=="button"&&!(ie.tagName==="A"&&ie.href)},An=P.useRef(!1),hn=za(ie=>{h&&!An.current&&B&&L.current&&ie.key===" "&&(An.current=!0,L.current.stop(ie,()=>{L.current.start(ie)})),ie.target===ie.currentTarget&&Nt()&&ie.key===" "&&ie.preventDefault(),w&&w(ie),ie.target===ie.currentTarget&&Nt()&&ie.key==="Enter"&&!u&&(ie.preventDefault(),g&&g(ie))}),fn=za(ie=>{h&&ie.key===" "&&L.current&&B&&!ie.defaultPrevented&&(An.current=!1,L.current.stop(ie,()=>{L.current.pulsate(ie)})),k&&k(ie),g&&ie.target===ie.currentTarget&&Nt()&&ie.key===" "&&!ie.defaultPrevented&&g(ie)});let qe=a;qe==="button"&&(I.href||I.to)&&(qe=f);const _n={};qe==="button"?(_n.type=M===void 0?"button":M,_n.disabled=u):(!I.href&&!I.to&&(_n.role="button"),u&&(_n["aria-disabled"]=u));const q=_r(n,W,N),he=K({},r,{centerRipple:i,component:a,disabled:u,disableRipple:c,disableTouchRipple:d,focusRipple:h,tabIndex:R,focusVisible:B}),ve=Dne(he);return j.jsxs(Pne,K({as:qe,className:Ge(ve.root,l),ownerState:he,onBlur:wt,onClick:g,onContextMenu:ce,onFocus:qn,onKeyDown:hn,onKeyUp:fn,onMouseDown:te,onMouseLeave:Me,onMouseUp:ye,onDragLeave:Ne,onTouchEnd:mt,onTouchMove:Lt,onTouchStart:Ce,ref:q,tabIndex:u?-1:R,type:M},_n,I,{children:[s,X?j.jsx(One,K({ref:$,center:i},A)):null]}))}),Lx=zne;function Fne(t){return En("MuiIconButton",t)}const Bne=Sn("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),Hne=Bne,Une=["edge","children","className","color","disabled","disableFocusRipple","size"],Wne=t=>{const{classes:e,disabled:n,color:r,edge:o,size:i}=t,s={root:["root",n&&"disabled",r!=="default"&&`color${pt(r)}`,o&&`edge${pt(o)}`,`size${pt(i)}`]};return zn(s,Fne,e)},Vne=St(Lx,{name:"MuiIconButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="default"&&e[`color${pt(n.color)}`],n.edge&&e[`edge${pt(n.edge)}`],e[`size${pt(n.size)}`]]}})(({theme:t,ownerState:e})=>K({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!e.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:wr(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12}),({theme:t,ownerState:e})=>{var n;const r=(n=(t.vars||t).palette)==null?void 0:n[e.color];return K({},e.color==="inherit"&&{color:"inherit"},e.color!=="inherit"&&e.color!=="default"&&K({color:r==null?void 0:r.main},!e.disableRipple&&{"&:hover":K({},r&&{backgroundColor:t.vars?`rgba(${r.mainChannel} / ${t.vars.palette.action.hoverOpacity})`:wr(r.main,t.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),e.size==="small"&&{padding:5,fontSize:t.typography.pxToRem(18)},e.size==="large"&&{padding:12,fontSize:t.typography.pxToRem(28)},{[`&.${Hne.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})}),jne=P.forwardRef(function(e,n){const r=Tn({props:e,name:"MuiIconButton"}),{edge:o=!1,children:i,className:s,color:l="default",disabled:a=!1,disableFocusRipple:u=!1,size:c="medium"}=r,d=Fe(r,Une),h=K({},r,{edge:o,color:l,disabled:a,disableFocusRipple:u,size:c}),f=Wne(h);return j.jsx(Vne,K({className:Ge(f.root,s),centerRipple:!0,focusRipple:!u,disabled:a,ref:n,ownerState:h},d,{children:i}))}),Gne=jne;function Kne(t){return En("MuiTypography",t)}Sn("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Yne=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Xne=t=>{const{align:e,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:s}=t,l={root:["root",i,t.align!=="inherit"&&`align${pt(e)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return zn(l,Kne,s)},qne=St("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.variant&&e[n.variant],n.align!=="inherit"&&e[`align${pt(n.align)}`],n.noWrap&&e.noWrap,n.gutterBottom&&e.gutterBottom,n.paragraph&&e.paragraph]}})(({theme:t,ownerState:e})=>K({margin:0},e.variant==="inherit"&&{font:"inherit"},e.variant!=="inherit"&&t.typography[e.variant],e.align!=="inherit"&&{textAlign:e.align},e.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.gutterBottom&&{marginBottom:"0.35em"},e.paragraph&&{marginBottom:16})),HA={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Zne={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Qne=t=>Zne[t]||t,Jne=P.forwardRef(function(e,n){const r=Tn({props:e,name:"MuiTypography"}),o=Qne(r.color),i=Tx(K({},r,{color:o})),{align:s="inherit",className:l,component:a,gutterBottom:u=!1,noWrap:c=!1,paragraph:d=!1,variant:h="body1",variantMapping:f=HA}=i,p=Fe(i,Yne),g=K({},i,{align:s,color:o,className:l,component:a,gutterBottom:u,noWrap:c,paragraph:d,variant:h,variantMapping:f}),m=a||(d?"p":f[h]||HA[h])||"span",v=Xne(g);return j.jsx(qne,K({as:m,ref:n,ownerState:g,className:Ge(v.root,l)},p))}),yd=Jne;function QL(t){return typeof t=="string"}function bd(t,e,n){return t===void 0||QL(t)?e:K({},e,{ownerState:K({},e.ownerState,n)})}const ere={disableDefaultClasses:!1},tre=P.createContext(ere);function nre(t){const{disableDefaultClasses:e}=P.useContext(tre);return n=>e?"":t(n)}function JL(t,e=[]){if(t===void 0)return{};const n={};return Object.keys(t).filter(r=>r.match(/^on[A-Z]/)&&typeof t[r]=="function"&&!e.includes(r)).forEach(r=>{n[r]=t[r]}),n}function rre(t,e,n){return typeof t=="function"?t(e,n):t}function UA(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(n=>!(n.match(/^on[A-Z]/)&&typeof t[n]=="function")).forEach(n=>{e[n]=t[n]}),e}function ore(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=t;if(!e){const f=Ge(o==null?void 0:o.className,r==null?void 0:r.className,i,n==null?void 0:n.className),p=K({},n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),g=K({},n,o,r);return f.length>0&&(g.className=f),Object.keys(p).length>0&&(g.style=p),{props:g,internalRef:void 0}}const s=JL(K({},o,r)),l=UA(r),a=UA(o),u=e(s),c=Ge(u==null?void 0:u.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),d=K({},u==null?void 0:u.style,n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),h=K({},u,n,a,l);return c.length>0&&(h.className=c),Object.keys(d).length>0&&(h.style=d),{props:h,internalRef:u.ref}}const ire=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Gi(t){var e;const{elementType:n,externalSlotProps:r,ownerState:o,skipResolvingSlotProps:i=!1}=t,s=Fe(t,ire),l=i?{}:rre(r,o),{props:a,internalRef:u}=ore(K({},s,{externalSlotProps:l})),c=_r(u,l==null?void 0:l.ref,(e=t.additionalProps)==null?void 0:e.ref);return bd(n,K({},a,{ref:c}),o)}function sre(t){const{badgeContent:e,invisible:n=!1,max:r=99,showZero:o=!1}=t,i=bL({badgeContent:e,max:r});let s=n;n===!1&&e===0&&!o&&(s=!0);const{badgeContent:l,max:a=r}=s?i:t,u=l&&Number(l)>a?`${a}+`:l;return{badgeContent:l,invisible:s,max:a,displayValue:u}}const are=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function lre(t){const e=parseInt(t.getAttribute("tabindex")||"",10);return Number.isNaN(e)?t.contentEditable==="true"||(t.nodeName==="AUDIO"||t.nodeName==="VIDEO"||t.nodeName==="DETAILS")&&t.getAttribute("tabindex")===null?0:t.tabIndex:e}function cre(t){if(t.tagName!=="INPUT"||t.type!=="radio"||!t.name)return!1;const e=r=>t.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=e(`[name="${t.name}"]:checked`);return n||(n=e(`[name="${t.name}"]`)),n!==t}function ure(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||cre(t))}function dre(t){const e=[],n=[];return Array.from(t.querySelectorAll(are)).forEach((r,o)=>{const i=lre(r);i===-1||!ure(r)||(i===0?e.push(r):n.push({documentOrder:o,tabIndex:i,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(e)}function hre(){return!0}function fre(t){const{children:e,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=dre,isEnabled:s=hre,open:l}=t,a=P.useRef(!1),u=P.useRef(null),c=P.useRef(null),d=P.useRef(null),h=P.useRef(null),f=P.useRef(!1),p=P.useRef(null),g=_r(e.ref,p),m=P.useRef(null);P.useEffect(()=>{!l||!p.current||(f.current=!n)},[n,l]),P.useEffect(()=>{if(!l||!p.current)return;const b=Cr(p.current);return p.current.contains(b.activeElement)||(p.current.hasAttribute("tabIndex")||p.current.setAttribute("tabIndex","-1"),f.current&&p.current.focus()),()=>{o||(d.current&&d.current.focus&&(a.current=!0,d.current.focus()),d.current=null)}},[l]),P.useEffect(()=>{if(!l||!p.current)return;const b=Cr(p.current),w=S=>{m.current=S,!(r||!s()||S.key!=="Tab")&&b.activeElement===p.current&&S.shiftKey&&(a.current=!0,c.current&&c.current.focus())},k=()=>{const S=p.current;if(S===null)return;if(!b.hasFocus()||!s()||a.current){a.current=!1;return}if(S.contains(b.activeElement)||r&&b.activeElement!==u.current&&b.activeElement!==c.current)return;if(b.activeElement!==h.current)h.current=null;else if(h.current!==null)return;if(!f.current)return;let T=[];if((b.activeElement===u.current||b.activeElement===c.current)&&(T=i(p.current)),T.length>0){var C,O;const _=!!((C=m.current)!=null&&C.shiftKey&&((O=m.current)==null?void 0:O.key)==="Tab"),R=T[0],A=T[T.length-1];typeof R!="string"&&typeof A!="string"&&(_?A.focus():R.focus())}else S.focus()};b.addEventListener("focusin",k),b.addEventListener("keydown",w,!0);const x=setInterval(()=>{b.activeElement&&b.activeElement.tagName==="BODY"&&k()},50);return()=>{clearInterval(x),b.removeEventListener("focusin",k),b.removeEventListener("keydown",w,!0)}},[n,r,o,s,l,i]);const v=b=>{d.current===null&&(d.current=b.relatedTarget),f.current=!0,h.current=b.target;const w=e.props.onFocus;w&&w(b)},y=b=>{d.current===null&&(d.current=b.relatedTarget),f.current=!0};return j.jsxs(P.Fragment,{children:[j.jsx("div",{tabIndex:l?0:-1,onFocus:y,ref:u,"data-testid":"sentinelStart"}),P.cloneElement(e,{ref:g,onFocus:v}),j.jsx("div",{tabIndex:l?0:-1,onFocus:y,ref:c,"data-testid":"sentinelEnd"})]})}var Tr="top",bo="bottom",wo="right",Ar="left",Nx="auto",rf=[Tr,bo,wo,Ar],Zc="start",xh="end",pre="clippingParents",eN="viewport",$u="popper",gre="reference",WA=rf.reduce(function(t,e){return t.concat([e+"-"+Zc,e+"-"+xh])},[]),tN=[].concat(rf,[Nx]).reduce(function(t,e){return t.concat([e,e+"-"+Zc,e+"-"+xh])},[]),mre="beforeRead",vre="read",yre="afterRead",bre="beforeMain",wre="main",xre="afterMain",kre="beforeWrite",Ere="write",Sre="afterWrite",Cre=[mre,vre,yre,bre,wre,xre,kre,Ere,Sre];function pi(t){return t?(t.nodeName||"").toLowerCase():null}function qr(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function cl(t){var e=qr(t).Element;return t instanceof e||t instanceof Element}function fo(t){var e=qr(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function $x(t){if(typeof ShadowRoot>"u")return!1;var e=qr(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Tre(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},o=e.attributes[n]||{},i=e.elements[n];!fo(i)||!pi(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(s){var l=o[s];l===!1?i.removeAttribute(s):i.setAttribute(s,l===!0?"":l)}))})}function Are(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var o=e.elements[r],i=e.attributes[r]||{},s=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),l=s.reduce(function(a,u){return a[u]="",a},{});!fo(o)||!pi(o)||(Object.assign(o.style,l),Object.keys(i).forEach(function(a){o.removeAttribute(a)}))})}}const _re={name:"applyStyles",enabled:!0,phase:"write",fn:Tre,effect:Are,requires:["computeStyles"]};function ci(t){return t.split("-")[0]}var Ga=Math.max,Fg=Math.min,Qc=Math.round;function Ky(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function nN(){return!/^((?!chrome|android).)*safari/i.test(Ky())}function Jc(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),o=1,i=1;e&&fo(t)&&(o=t.offsetWidth>0&&Qc(r.width)/t.offsetWidth||1,i=t.offsetHeight>0&&Qc(r.height)/t.offsetHeight||1);var s=cl(t)?qr(t):window,l=s.visualViewport,a=!nN()&&n,u=(r.left+(a&&l?l.offsetLeft:0))/o,c=(r.top+(a&&l?l.offsetTop:0))/i,d=r.width/o,h=r.height/i;return{width:d,height:h,top:c,right:u+d,bottom:c+h,left:u,x:u,y:c}}function Dx(t){var e=Jc(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function rN(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&$x(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Ki(t){return qr(t).getComputedStyle(t)}function Rre(t){return["table","td","th"].indexOf(pi(t))>=0}function sa(t){return((cl(t)?t.ownerDocument:t.document)||window.document).documentElement}function Sv(t){return pi(t)==="html"?t:t.assignedSlot||t.parentNode||($x(t)?t.host:null)||sa(t)}function VA(t){return!fo(t)||Ki(t).position==="fixed"?null:t.offsetParent}function Mre(t){var e=/firefox/i.test(Ky()),n=/Trident/i.test(Ky());if(n&&fo(t)){var r=Ki(t);if(r.position==="fixed")return null}var o=Sv(t);for($x(o)&&(o=o.host);fo(o)&&["html","body"].indexOf(pi(o))<0;){var i=Ki(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||e&&i.willChange==="filter"||e&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function of(t){for(var e=qr(t),n=VA(t);n&&Rre(n)&&Ki(n).position==="static";)n=VA(n);return n&&(pi(n)==="html"||pi(n)==="body"&&Ki(n).position==="static")?e:n||Mre(t)||e}function Px(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function $d(t,e,n){return Ga(t,Fg(e,n))}function Ore(t,e,n){var r=$d(t,e,n);return r>n?n:r}function oN(){return{top:0,right:0,bottom:0,left:0}}function iN(t){return Object.assign({},oN(),t)}function sN(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var Ire=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,iN(typeof e!="number"?e:sN(e,rf))};function Lre(t){var e,n=t.state,r=t.name,o=t.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,l=ci(n.placement),a=Px(l),u=[Ar,wo].indexOf(l)>=0,c=u?"height":"width";if(!(!i||!s)){var d=Ire(o.padding,n),h=Dx(i),f=a==="y"?Tr:Ar,p=a==="y"?bo:wo,g=n.rects.reference[c]+n.rects.reference[a]-s[a]-n.rects.popper[c],m=s[a]-n.rects.reference[a],v=of(i),y=v?a==="y"?v.clientHeight||0:v.clientWidth||0:0,b=g/2-m/2,w=d[f],k=y-h[c]-d[p],x=y/2-h[c]/2+b,S=$d(w,x,k),T=a;n.modifiersData[r]=(e={},e[T]=S,e.centerOffset=S-x,e)}}function Nre(t){var e=t.state,n=t.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=e.elements.popper.querySelector(o),!o)||rN(e.elements.popper,o)&&(e.elements.arrow=o))}const $re={name:"arrow",enabled:!0,phase:"main",fn:Lre,effect:Nre,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function eu(t){return t.split("-")[1]}var Dre={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Pre(t,e){var n=t.x,r=t.y,o=e.devicePixelRatio||1;return{x:Qc(n*o)/o||0,y:Qc(r*o)/o||0}}function jA(t){var e,n=t.popper,r=t.popperRect,o=t.placement,i=t.variation,s=t.offsets,l=t.position,a=t.gpuAcceleration,u=t.adaptive,c=t.roundOffsets,d=t.isFixed,h=s.x,f=h===void 0?0:h,p=s.y,g=p===void 0?0:p,m=typeof c=="function"?c({x:f,y:g}):{x:f,y:g};f=m.x,g=m.y;var v=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),b=Ar,w=Tr,k=window;if(u){var x=of(n),S="clientHeight",T="clientWidth";if(x===qr(n)&&(x=sa(n),Ki(x).position!=="static"&&l==="absolute"&&(S="scrollHeight",T="scrollWidth")),x=x,o===Tr||(o===Ar||o===wo)&&i===xh){w=bo;var C=d&&x===k&&k.visualViewport?k.visualViewport.height:x[S];g-=C-r.height,g*=a?1:-1}if(o===Ar||(o===Tr||o===bo)&&i===xh){b=wo;var O=d&&x===k&&k.visualViewport?k.visualViewport.width:x[T];f-=O-r.width,f*=a?1:-1}}var _=Object.assign({position:l},u&&Dre),R=c===!0?Pre({x:f,y:g},qr(n)):{x:f,y:g};if(f=R.x,g=R.y,a){var A;return Object.assign({},_,(A={},A[w]=y?"0":"",A[b]=v?"0":"",A.transform=(k.devicePixelRatio||1)<=1?"translate("+f+"px, "+g+"px)":"translate3d("+f+"px, "+g+"px, 0)",A))}return Object.assign({},_,(e={},e[w]=y?g+"px":"",e[b]=v?f+"px":"",e.transform="",e))}function zre(t){var e=t.state,n=t.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,s=i===void 0?!0:i,l=n.roundOffsets,a=l===void 0?!0:l,u={placement:ci(e.placement),variation:eu(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,jA(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:a})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,jA(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Fre={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:zre,data:{}};var Kf={passive:!0};function Bre(t){var e=t.state,n=t.instance,r=t.options,o=r.scroll,i=o===void 0?!0:o,s=r.resize,l=s===void 0?!0:s,a=qr(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&u.forEach(function(c){c.addEventListener("scroll",n.update,Kf)}),l&&a.addEventListener("resize",n.update,Kf),function(){i&&u.forEach(function(c){c.removeEventListener("scroll",n.update,Kf)}),l&&a.removeEventListener("resize",n.update,Kf)}}const Hre={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Bre,data:{}};var Ure={left:"right",right:"left",bottom:"top",top:"bottom"};function Np(t){return t.replace(/left|right|bottom|top/g,function(e){return Ure[e]})}var Wre={start:"end",end:"start"};function GA(t){return t.replace(/start|end/g,function(e){return Wre[e]})}function zx(t){var e=qr(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Fx(t){return Jc(sa(t)).left+zx(t).scrollLeft}function Vre(t,e){var n=qr(t),r=sa(t),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,l=0,a=0;if(o){i=o.width,s=o.height;var u=nN();(u||!u&&e==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:i,height:s,x:l+Fx(t),y:a}}function jre(t){var e,n=sa(t),r=zx(t),o=(e=t.ownerDocument)==null?void 0:e.body,i=Ga(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=Ga(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+Fx(t),a=-r.scrollTop;return Ki(o||n).direction==="rtl"&&(l+=Ga(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:l,y:a}}function Bx(t){var e=Ki(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function aN(t){return["html","body","#document"].indexOf(pi(t))>=0?t.ownerDocument.body:fo(t)&&Bx(t)?t:aN(Sv(t))}function Dd(t,e){var n;e===void 0&&(e=[]);var r=aN(t),o=r===((n=t.ownerDocument)==null?void 0:n.body),i=qr(r),s=o?[i].concat(i.visualViewport||[],Bx(r)?r:[]):r,l=e.concat(s);return o?l:l.concat(Dd(Sv(s)))}function Yy(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Gre(t,e){var n=Jc(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function KA(t,e,n){return e===eN?Yy(Vre(t,n)):cl(e)?Gre(e,n):Yy(jre(sa(t)))}function Kre(t){var e=Dd(Sv(t)),n=["absolute","fixed"].indexOf(Ki(t).position)>=0,r=n&&fo(t)?of(t):t;return cl(r)?e.filter(function(o){return cl(o)&&rN(o,r)&&pi(o)!=="body"}):[]}function Yre(t,e,n,r){var o=e==="clippingParents"?Kre(t):[].concat(e),i=[].concat(o,[n]),s=i[0],l=i.reduce(function(a,u){var c=KA(t,u,r);return a.top=Ga(c.top,a.top),a.right=Fg(c.right,a.right),a.bottom=Fg(c.bottom,a.bottom),a.left=Ga(c.left,a.left),a},KA(t,s,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function lN(t){var e=t.reference,n=t.element,r=t.placement,o=r?ci(r):null,i=r?eu(r):null,s=e.x+e.width/2-n.width/2,l=e.y+e.height/2-n.height/2,a;switch(o){case Tr:a={x:s,y:e.y-n.height};break;case bo:a={x:s,y:e.y+e.height};break;case wo:a={x:e.x+e.width,y:l};break;case Ar:a={x:e.x-n.width,y:l};break;default:a={x:e.x,y:e.y}}var u=o?Px(o):null;if(u!=null){var c=u==="y"?"height":"width";switch(i){case Zc:a[u]=a[u]-(e[c]/2-n[c]/2);break;case xh:a[u]=a[u]+(e[c]/2-n[c]/2);break}}return a}function kh(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=r===void 0?t.placement:r,i=n.strategy,s=i===void 0?t.strategy:i,l=n.boundary,a=l===void 0?pre:l,u=n.rootBoundary,c=u===void 0?eN:u,d=n.elementContext,h=d===void 0?$u:d,f=n.altBoundary,p=f===void 0?!1:f,g=n.padding,m=g===void 0?0:g,v=iN(typeof m!="number"?m:sN(m,rf)),y=h===$u?gre:$u,b=t.rects.popper,w=t.elements[p?y:h],k=Yre(cl(w)?w:w.contextElement||sa(t.elements.popper),a,c,s),x=Jc(t.elements.reference),S=lN({reference:x,element:b,strategy:"absolute",placement:o}),T=Yy(Object.assign({},b,S)),C=h===$u?T:x,O={top:k.top-C.top+v.top,bottom:C.bottom-k.bottom+v.bottom,left:k.left-C.left+v.left,right:C.right-k.right+v.right},_=t.modifiersData.offset;if(h===$u&&_){var R=_[o];Object.keys(O).forEach(function(A){var E=[wo,bo].indexOf(A)>=0?1:-1,M=[Tr,bo].indexOf(A)>=0?"y":"x";O[A]+=R[M]*E})}return O}function Xre(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=n.boundary,i=n.rootBoundary,s=n.padding,l=n.flipVariations,a=n.allowedAutoPlacements,u=a===void 0?tN:a,c=eu(r),d=c?l?WA:WA.filter(function(p){return eu(p)===c}):rf,h=d.filter(function(p){return u.indexOf(p)>=0});h.length===0&&(h=d);var f=h.reduce(function(p,g){return p[g]=kh(t,{placement:g,boundary:o,rootBoundary:i,padding:s})[ci(g)],p},{});return Object.keys(f).sort(function(p,g){return f[p]-f[g]})}function qre(t){if(ci(t)===Nx)return[];var e=Np(t);return[GA(t),e,GA(e)]}function Zre(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,l=s===void 0?!0:s,a=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,p=f===void 0?!0:f,g=n.allowedAutoPlacements,m=e.options.placement,v=ci(m),y=v===m,b=a||(y||!p?[Np(m)]:qre(m)),w=[m].concat(b).reduce(function(B,H){return B.concat(ci(H)===Nx?Xre(e,{placement:H,boundary:c,rootBoundary:d,padding:u,flipVariations:p,allowedAutoPlacements:g}):H)},[]),k=e.rects.reference,x=e.rects.popper,S=new Map,T=!0,C=w[0],O=0;O=0,M=E?"width":"height",I=kh(e,{placement:_,boundary:c,rootBoundary:d,altBoundary:h,padding:u}),N=E?A?wo:Ar:A?bo:Tr;k[M]>x[M]&&(N=Np(N));var L=Np(N),$=[];if(i&&$.push(I[R]<=0),l&&$.push(I[N]<=0,I[L]<=0),$.every(function(B){return B})){C=_,T=!1;break}S.set(_,$)}if(T)for(var D=p?3:1,F=function(H){var V=w.find(function(Y){var X=S.get(Y);if(X)return X.slice(0,H).every(function(Z){return Z})});if(V)return C=V,"break"},U=D;U>0;U--){var W=F(U);if(W==="break")break}e.placement!==C&&(e.modifiersData[r]._skip=!0,e.placement=C,e.reset=!0)}}const Qre={name:"flip",enabled:!0,phase:"main",fn:Zre,requiresIfExists:["offset"],data:{_skip:!1}};function YA(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function XA(t){return[Tr,wo,bo,Ar].some(function(e){return t[e]>=0})}function Jre(t){var e=t.state,n=t.name,r=e.rects.reference,o=e.rects.popper,i=e.modifiersData.preventOverflow,s=kh(e,{elementContext:"reference"}),l=kh(e,{altBoundary:!0}),a=YA(s,r),u=YA(l,o,i),c=XA(a),d=XA(u);e.modifiersData[n]={referenceClippingOffsets:a,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const eoe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Jre};function toe(t,e,n){var r=ci(t),o=[Ar,Tr].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,s=i[0],l=i[1];return s=s||0,l=(l||0)*o,[Ar,wo].indexOf(r)>=0?{x:l,y:s}:{x:s,y:l}}function noe(t){var e=t.state,n=t.options,r=t.name,o=n.offset,i=o===void 0?[0,0]:o,s=tN.reduce(function(c,d){return c[d]=toe(d,e.rects,i),c},{}),l=s[e.placement],a=l.x,u=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=a,e.modifiersData.popperOffsets.y+=u),e.modifiersData[r]=s}const roe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:noe};function ooe(t){var e=t.state,n=t.name;e.modifiersData[n]=lN({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const ioe={name:"popperOffsets",enabled:!0,phase:"read",fn:ooe,data:{}};function soe(t){return t==="x"?"y":"x"}function aoe(t){var e=t.state,n=t.options,r=t.name,o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,l=s===void 0?!1:s,a=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,h=n.tether,f=h===void 0?!0:h,p=n.tetherOffset,g=p===void 0?0:p,m=kh(e,{boundary:a,rootBoundary:u,padding:d,altBoundary:c}),v=ci(e.placement),y=eu(e.placement),b=!y,w=Px(v),k=soe(w),x=e.modifiersData.popperOffsets,S=e.rects.reference,T=e.rects.popper,C=typeof g=="function"?g(Object.assign({},e.rects,{placement:e.placement})):g,O=typeof C=="number"?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),_=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,R={x:0,y:0};if(x){if(i){var A,E=w==="y"?Tr:Ar,M=w==="y"?bo:wo,I=w==="y"?"height":"width",N=x[w],L=N+m[E],$=N-m[M],D=f?-T[I]/2:0,F=y===Zc?S[I]:T[I],U=y===Zc?-T[I]:-S[I],W=e.elements.arrow,B=f&&W?Dx(W):{width:0,height:0},H=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:oN(),V=H[E],Y=H[M],X=$d(0,S[I],B[I]),Z=b?S[I]/2-D-X-V-O.mainAxis:F-X-V-O.mainAxis,te=b?-S[I]/2+D+X+Y+O.mainAxis:U+X+Y+O.mainAxis,ce=e.elements.arrow&&of(e.elements.arrow),Ne=ce?w==="y"?ce.clientTop||0:ce.clientLeft||0:0,ye=(A=_==null?void 0:_[w])!=null?A:0,Me=N+Z-ye-Ne,Ce=N+te-ye,mt=$d(f?Fg(L,Me):L,N,f?Ga($,Ce):$);x[w]=mt,R[w]=mt-N}if(l){var Lt,wt=w==="x"?Tr:Ar,qn=w==="x"?bo:wo,Nt=x[k],An=k==="y"?"height":"width",hn=Nt+m[wt],fn=Nt-m[qn],qe=[Tr,Ar].indexOf(v)!==-1,_n=(Lt=_==null?void 0:_[k])!=null?Lt:0,q=qe?hn:Nt-S[An]-T[An]-_n+O.altAxis,he=qe?Nt+S[An]+T[An]-_n-O.altAxis:fn,ve=f&&qe?Ore(q,Nt,he):$d(f?q:hn,Nt,f?he:fn);x[k]=ve,R[k]=ve-Nt}e.modifiersData[r]=R}}const loe={name:"preventOverflow",enabled:!0,phase:"main",fn:aoe,requiresIfExists:["offset"]};function coe(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function uoe(t){return t===qr(t)||!fo(t)?zx(t):coe(t)}function doe(t){var e=t.getBoundingClientRect(),n=Qc(e.width)/t.offsetWidth||1,r=Qc(e.height)/t.offsetHeight||1;return n!==1||r!==1}function hoe(t,e,n){n===void 0&&(n=!1);var r=fo(e),o=fo(e)&&doe(e),i=sa(e),s=Jc(t,o,n),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(r||!r&&!n)&&((pi(e)!=="body"||Bx(i))&&(l=uoe(e)),fo(e)?(a=Jc(e,!0),a.x+=e.clientLeft,a.y+=e.clientTop):i&&(a.x=Fx(i))),{x:s.left+l.scrollLeft-a.x,y:s.top+l.scrollTop-a.y,width:s.width,height:s.height}}function foe(t){var e=new Map,n=new Set,r=[];t.forEach(function(i){e.set(i.name,i)});function o(i){n.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(l){if(!n.has(l)){var a=e.get(l);a&&o(a)}}),r.push(i)}return t.forEach(function(i){n.has(i.name)||o(i)}),r}function poe(t){var e=foe(t);return Cre.reduce(function(n,r){return n.concat(e.filter(function(o){return o.phase===r}))},[])}function goe(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function moe(t){var e=t.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var qA={placement:"bottom",modifiers:[],strategy:"absolute"};function ZA(){for(var t=arguments.length,e=new Array(t),n=0;n{i||l(woe(o)||document.body)},[o,i]),sl(()=>{if(s&&!i)return By(n,s),()=>{By(n,null)}},[n,s,i]),i){if(P.isValidElement(r)){const u={ref:a};return P.cloneElement(r,u)}return j.jsx(P.Fragment,{children:r})}return j.jsx(P.Fragment,{children:s&&Qh.createPortal(r,s)})});function xoe(t){return En("MuiPopper",t)}Sn("MuiPopper",["root"]);const koe=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],Eoe=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function Soe(t,e){if(e==="ltr")return t;switch(t){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return t}}function Xy(t){return typeof t=="function"?t():t}function Coe(t){return t.nodeType!==void 0}const Toe=()=>zn({root:["root"]},nre(xoe)),Aoe={},_oe=P.forwardRef(function(e,n){var r;const{anchorEl:o,children:i,direction:s,disablePortal:l,modifiers:a,open:u,placement:c,popperOptions:d,popperRef:h,slotProps:f={},slots:p={},TransitionProps:g}=e,m=Fe(e,koe),v=P.useRef(null),y=_r(v,n),b=P.useRef(null),w=_r(b,h),k=P.useRef(w);sl(()=>{k.current=w},[w]),P.useImperativeHandle(h,()=>b.current,[]);const x=Soe(c,s),[S,T]=P.useState(x),[C,O]=P.useState(Xy(o));P.useEffect(()=>{b.current&&b.current.forceUpdate()}),P.useEffect(()=>{o&&O(Xy(o))},[o]),sl(()=>{if(!C||!u)return;const M=L=>{T(L.placement)};let I=[{name:"preventOverflow",options:{altBoundary:l}},{name:"flip",options:{altBoundary:l}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:L})=>{M(L)}}];a!=null&&(I=I.concat(a)),d&&d.modifiers!=null&&(I=I.concat(d.modifiers));const N=boe(C,v.current,K({placement:x},d,{modifiers:I}));return k.current(N),()=>{N.destroy(),k.current(null)}},[C,l,a,u,d,x]);const _={placement:S};g!==null&&(_.TransitionProps=g);const R=Toe(),A=(r=p.root)!=null?r:"div",E=Gi({elementType:A,externalSlotProps:f.root,externalForwardedProps:m,additionalProps:{role:"tooltip",ref:y},ownerState:e,className:R.root});return j.jsx(A,K({},E,{children:typeof i=="function"?i(_):i}))}),Roe=P.forwardRef(function(e,n){const{anchorEl:r,children:o,container:i,direction:s="ltr",disablePortal:l=!1,keepMounted:a=!1,modifiers:u,open:c,placement:d="bottom",popperOptions:h=Aoe,popperRef:f,style:p,transition:g=!1,slotProps:m={},slots:v={}}=e,y=Fe(e,Eoe),[b,w]=P.useState(!0),k=()=>{w(!1)},x=()=>{w(!0)};if(!a&&!c&&(!g||b))return null;let S;if(i)S=i;else if(r){const O=Xy(r);S=O&&Coe(O)?Cr(O).body:Cr(null).body}const T=!c&&a&&(!g||b)?"none":void 0,C=g?{in:c,onEnter:k,onExited:x}:void 0;return j.jsx(cN,{disablePortal:l,container:S,children:j.jsx(_oe,K({anchorEl:r,direction:s,disablePortal:l,modifiers:u,ref:n,open:g?!b:c,placement:d,popperOptions:h,popperRef:f,slotProps:m,slots:v},y,{style:K({position:"fixed",top:0,left:0,display:T},p),TransitionProps:C,children:o}))})});function Moe(t){const e=Cr(t);return e.body===t?vh(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function Pd(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function QA(t){return parseInt(vh(t).getComputedStyle(t).paddingRight,10)||0}function Ooe(t){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(t.tagName)!==-1,r=t.tagName==="INPUT"&&t.getAttribute("type")==="hidden";return n||r}function JA(t,e,n,r,o){const i=[e,n,...r];[].forEach.call(t.children,s=>{const l=i.indexOf(s)===-1,a=!Ooe(s);l&&a&&Pd(s,o)})}function j1(t,e){let n=-1;return t.some((r,o)=>e(r)?(n=o,!0):!1),n}function Ioe(t,e){const n=[],r=t.container;if(!e.disableScrollLock){if(Moe(r)){const s=yL(Cr(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${QA(r)+s}px`;const l=Cr(r).querySelectorAll(".mui-fixed");[].forEach.call(l,a=>{n.push({value:a.style.paddingRight,property:"padding-right",el:a}),a.style.paddingRight=`${QA(a)+s}px`})}let i;if(r.parentNode instanceof DocumentFragment)i=Cr(r).body;else{const s=r.parentElement,l=vh(r);i=(s==null?void 0:s.nodeName)==="HTML"&&l.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{n.forEach(({value:i,el:s,property:l})=>{i?s.style.setProperty(l,i):s.style.removeProperty(l)})}}function Loe(t){const e=[];return[].forEach.call(t.children,n=>{n.getAttribute("aria-hidden")==="true"&&e.push(n)}),e}class Noe{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,n){let r=this.modals.indexOf(e);if(r!==-1)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&Pd(e.modalRef,!1);const o=Loe(n);JA(n,e.mount,e.modalRef,o,!0);const i=j1(this.containers,s=>s.container===n);return i!==-1?(this.containers[i].modals.push(e),r):(this.containers.push({modals:[e],container:n,restore:null,hiddenSiblings:o}),r)}mount(e,n){const r=j1(this.containers,i=>i.modals.indexOf(e)!==-1),o=this.containers[r];o.restore||(o.restore=Ioe(o,n))}remove(e,n=!0){const r=this.modals.indexOf(e);if(r===-1)return r;const o=j1(this.containers,s=>s.modals.indexOf(e)!==-1),i=this.containers[o];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(r,1),i.modals.length===0)i.restore&&i.restore(),e.modalRef&&Pd(e.modalRef,n),JA(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(o,1);else{const s=i.modals[i.modals.length-1];s.modalRef&&Pd(s.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}function $oe(t){return typeof t=="function"?t():t}function Doe(t){return t?t.props.hasOwnProperty("in"):!1}const Poe=new Noe;function zoe(t){const{container:e,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:o=Poe,closeAfterTransition:i=!1,onTransitionEnter:s,onTransitionExited:l,children:a,onClose:u,open:c,rootRef:d}=t,h=P.useRef({}),f=P.useRef(null),p=P.useRef(null),g=_r(p,d),[m,v]=P.useState(!c),y=Doe(a);let b=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&(b=!1);const w=()=>Cr(f.current),k=()=>(h.current.modalRef=p.current,h.current.mount=f.current,h.current),x=()=>{o.mount(k(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},S=za(()=>{const I=$oe(e)||w().body;o.add(k(),I),p.current&&x()}),T=P.useCallback(()=>o.isTopModal(k()),[o]),C=za(I=>{f.current=I,I&&(c&&T()?x():p.current&&Pd(p.current,b))}),O=P.useCallback(()=>{o.remove(k(),b)},[b,o]);P.useEffect(()=>()=>{O()},[O]),P.useEffect(()=>{c?S():(!y||!i)&&O()},[c,O,y,i,S]);const _=I=>N=>{var L;(L=I.onKeyDown)==null||L.call(I,N),!(N.key!=="Escape"||!T())&&(n||(N.stopPropagation(),u&&u(N,"escapeKeyDown")))},R=I=>N=>{var L;(L=I.onClick)==null||L.call(I,N),N.target===N.currentTarget&&u&&u(N,"backdropClick")};return{getRootProps:(I={})=>{const N=JL(t);delete N.onTransitionEnter,delete N.onTransitionExited;const L=K({},N,I);return K({role:"presentation"},L,{onKeyDown:_(L),ref:g})},getBackdropProps:(I={})=>{const N=I;return K({"aria-hidden":!0},N,{onClick:R(N),open:c})},getTransitionProps:()=>{const I=()=>{v(!1),s&&s()},N=()=>{v(!0),l&&l(),i&&O()};return{onEnter:uA(I,a==null?void 0:a.props.onEnter),onExited:uA(N,a==null?void 0:a.props.onExited)}},rootRef:g,portalRef:C,isTopModal:T,exited:m,hasTransition:y}}const Foe=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],Boe=St(Roe,{name:"MuiPopper",slot:"Root",overridesResolver:(t,e)=>e.root})({}),Hoe=P.forwardRef(function(e,n){var r;const o=Sx(),i=Tn({props:e,name:"MuiPopper"}),{anchorEl:s,component:l,components:a,componentsProps:u,container:c,disablePortal:d,keepMounted:h,modifiers:f,open:p,placement:g,popperOptions:m,popperRef:v,transition:y,slots:b,slotProps:w}=i,k=Fe(i,Foe),x=(r=b==null?void 0:b.root)!=null?r:a==null?void 0:a.Root,S=K({anchorEl:s,container:c,disablePortal:d,keepMounted:h,modifiers:f,open:p,placement:g,popperOptions:m,popperRef:v,transition:y},k);return j.jsx(Boe,K({as:l,direction:o==null?void 0:o.direction,slots:{root:x},slotProps:w??u},S,{ref:n}))}),Hx=Hoe,Uoe=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Woe={entering:{opacity:1},entered:{opacity:1}},Voe=P.forwardRef(function(e,n){const r=kv(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:s=!0,children:l,easing:a,in:u,onEnter:c,onEntered:d,onEntering:h,onExit:f,onExited:p,onExiting:g,style:m,timeout:v=o,TransitionComponent:y=qL}=e,b=Fe(e,Uoe),w=P.useRef(null),k=_r(w,l.ref,n),x=E=>M=>{if(E){const I=w.current;M===void 0?E(I):E(I,M)}},S=x(h),T=x((E,M)=>{ZL(E);const I=zg({style:m,timeout:v,easing:a},{mode:"enter"});E.style.webkitTransition=r.transitions.create("opacity",I),E.style.transition=r.transitions.create("opacity",I),c&&c(E,M)}),C=x(d),O=x(g),_=x(E=>{const M=zg({style:m,timeout:v,easing:a},{mode:"exit"});E.style.webkitTransition=r.transitions.create("opacity",M),E.style.transition=r.transitions.create("opacity",M),f&&f(E)}),R=x(p),A=E=>{i&&i(w.current,E)};return j.jsx(y,K({appear:s,in:u,nodeRef:w,onEnter:T,onEntered:C,onEntering:S,onExit:_,onExited:R,onExiting:O,addEndListener:A,timeout:v},b,{children:(E,M)=>P.cloneElement(l,K({style:K({opacity:0,visibility:E==="exited"&&!u?"hidden":void 0},Woe[E],m,l.props.style),ref:k},M))}))}),joe=Voe;function Goe(t){return En("MuiBackdrop",t)}Sn("MuiBackdrop",["root","invisible"]);const Koe=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],Yoe=t=>{const{classes:e,invisible:n}=t;return zn({root:["root",n&&"invisible"]},Goe,e)},Xoe=St("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.invisible&&e.invisible]}})(({ownerState:t})=>K({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})),qoe=P.forwardRef(function(e,n){var r,o,i;const s=Tn({props:e,name:"MuiBackdrop"}),{children:l,className:a,component:u="div",components:c={},componentsProps:d={},invisible:h=!1,open:f,slotProps:p={},slots:g={},TransitionComponent:m=joe,transitionDuration:v}=s,y=Fe(s,Koe),b=K({},s,{component:u,invisible:h}),w=Yoe(b),k=(r=p.root)!=null?r:d.root;return j.jsx(m,K({in:f,timeout:v},y,{children:j.jsx(Xoe,K({"aria-hidden":!0},k,{as:(o=(i=g.root)!=null?i:c.Root)!=null?o:u,className:Ge(w.root,a,k==null?void 0:k.className),ownerState:K({},b,k==null?void 0:k.ownerState),classes:w,ref:n,children:l}))}))}),Zoe=qoe;function Qoe(t){return En("MuiBadge",t)}const Joe=Sn("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),ss=Joe,eie=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],G1=10,K1=4,tie=t=>{const{color:e,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:s={}}=t,l={root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${pt(n.vertical)}${pt(n.horizontal)}`,`anchorOrigin${pt(n.vertical)}${pt(n.horizontal)}${pt(o)}`,`overlap${pt(o)}`,e!=="default"&&`color${pt(e)}`]};return zn(l,Qoe,s)},nie=St("span",{name:"MuiBadge",slot:"Root",overridesResolver:(t,e)=>e.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),rie=St("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.badge,e[n.variant],e[`anchorOrigin${pt(n.anchorOrigin.vertical)}${pt(n.anchorOrigin.horizontal)}${pt(n.overlap)}`],n.color!=="default"&&e[`color${pt(n.color)}`],n.invisible&&e.invisible]}})(({theme:t,ownerState:e})=>K({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(12),minWidth:G1*2,lineHeight:1,padding:"0 6px",height:G1*2,borderRadius:G1,zIndex:1,transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.enteringScreen})},e.color!=="default"&&{backgroundColor:(t.vars||t).palette[e.color].main,color:(t.vars||t).palette[e.color].contrastText},e.variant==="dot"&&{borderRadius:K1,height:K1*2,minWidth:K1*2,padding:0},e.anchorOrigin.vertical==="top"&&e.anchorOrigin.horizontal==="right"&&e.overlap==="rectangular"&&{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${ss.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}},e.anchorOrigin.vertical==="bottom"&&e.anchorOrigin.horizontal==="right"&&e.overlap==="rectangular"&&{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${ss.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}},e.anchorOrigin.vertical==="top"&&e.anchorOrigin.horizontal==="left"&&e.overlap==="rectangular"&&{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${ss.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}},e.anchorOrigin.vertical==="bottom"&&e.anchorOrigin.horizontal==="left"&&e.overlap==="rectangular"&&{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${ss.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}},e.anchorOrigin.vertical==="top"&&e.anchorOrigin.horizontal==="right"&&e.overlap==="circular"&&{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${ss.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}},e.anchorOrigin.vertical==="bottom"&&e.anchorOrigin.horizontal==="right"&&e.overlap==="circular"&&{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${ss.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}},e.anchorOrigin.vertical==="top"&&e.anchorOrigin.horizontal==="left"&&e.overlap==="circular"&&{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${ss.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}},e.anchorOrigin.vertical==="bottom"&&e.anchorOrigin.horizontal==="left"&&e.overlap==="circular"&&{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${ss.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}},e.invisible&&{transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.leavingScreen})})),oie=P.forwardRef(function(e,n){var r,o,i,s,l,a;const u=Tn({props:e,name:"MuiBadge"}),{anchorOrigin:c={vertical:"top",horizontal:"right"},className:d,component:h,components:f={},componentsProps:p={},children:g,overlap:m="rectangular",color:v="default",invisible:y=!1,max:b=99,badgeContent:w,slots:k,slotProps:x,showZero:S=!1,variant:T="standard"}=u,C=Fe(u,eie),{badgeContent:O,invisible:_,max:R,displayValue:A}=sre({max:b,invisible:y,badgeContent:w,showZero:S}),E=bL({anchorOrigin:c,color:v,overlap:m,variant:T,badgeContent:w}),M=_||O==null&&T!=="dot",{color:I=v,overlap:N=m,anchorOrigin:L=c,variant:$=T}=M?E:u,D=$!=="dot"?A:void 0,F=K({},u,{badgeContent:O,invisible:M,max:R,displayValue:D,showZero:S,anchorOrigin:L,color:I,overlap:N,variant:$}),U=tie(F),W=(r=(o=k==null?void 0:k.root)!=null?o:f.Root)!=null?r:nie,B=(i=(s=k==null?void 0:k.badge)!=null?s:f.Badge)!=null?i:rie,H=(l=x==null?void 0:x.root)!=null?l:p.root,V=(a=x==null?void 0:x.badge)!=null?a:p.badge,Y=Gi({elementType:W,externalSlotProps:H,externalForwardedProps:C,additionalProps:{ref:n,as:h},ownerState:F,className:Ge(H==null?void 0:H.className,U.root,d)}),X=Gi({elementType:B,externalSlotProps:V,ownerState:F,className:Ge(U.badge,V==null?void 0:V.className)});return j.jsxs(W,K({},Y,{children:[g,j.jsx(B,K({},X,{children:D}))]}))}),iie=oie,sie=_x(),aie=Qee({themeId:Xc,defaultTheme:sie,defaultClassName:"MuiBox-root",generateClassName:xL.generate}),uN=aie;function lie(t){return En("MuiModal",t)}Sn("MuiModal",["root","hidden","backdrop"]);const cie=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],uie=t=>{const{open:e,exited:n,classes:r}=t;return zn({root:["root",!e&&n&&"hidden"],backdrop:["backdrop"]},lie,r)},die=St("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.open&&n.exited&&e.hidden]}})(({theme:t,ownerState:e})=>K({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!e.open&&e.exited&&{visibility:"hidden"})),hie=St(Zoe,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,e)=>e.backdrop})({zIndex:-1}),fie=P.forwardRef(function(e,n){var r,o,i,s,l,a;const u=Tn({name:"MuiModal",props:e}),{BackdropComponent:c=hie,BackdropProps:d,className:h,closeAfterTransition:f=!1,children:p,container:g,component:m,components:v={},componentsProps:y={},disableAutoFocus:b=!1,disableEnforceFocus:w=!1,disableEscapeKeyDown:k=!1,disablePortal:x=!1,disableRestoreFocus:S=!1,disableScrollLock:T=!1,hideBackdrop:C=!1,keepMounted:O=!1,onBackdropClick:_,open:R,slotProps:A,slots:E}=u,M=Fe(u,cie),I=K({},u,{closeAfterTransition:f,disableAutoFocus:b,disableEnforceFocus:w,disableEscapeKeyDown:k,disablePortal:x,disableRestoreFocus:S,disableScrollLock:T,hideBackdrop:C,keepMounted:O}),{getRootProps:N,getBackdropProps:L,getTransitionProps:$,portalRef:D,isTopModal:F,exited:U,hasTransition:W}=zoe(K({},I,{rootRef:n})),B=K({},I,{exited:U}),H=uie(B),V={};if(p.props.tabIndex===void 0&&(V.tabIndex="-1"),W){const{onEnter:ye,onExited:Me}=$();V.onEnter=ye,V.onExited=Me}const Y=(r=(o=E==null?void 0:E.root)!=null?o:v.Root)!=null?r:die,X=(i=(s=E==null?void 0:E.backdrop)!=null?s:v.Backdrop)!=null?i:c,Z=(l=A==null?void 0:A.root)!=null?l:y.root,te=(a=A==null?void 0:A.backdrop)!=null?a:y.backdrop,ce=Gi({elementType:Y,externalSlotProps:Z,externalForwardedProps:M,getSlotProps:N,additionalProps:{ref:n,as:m},ownerState:B,className:Ge(h,Z==null?void 0:Z.className,H==null?void 0:H.root,!B.open&&B.exited&&(H==null?void 0:H.hidden))}),Ne=Gi({elementType:X,externalSlotProps:te,additionalProps:d,getSlotProps:ye=>L(K({},ye,{onClick:Me=>{_&&_(Me),ye!=null&&ye.onClick&&ye.onClick(Me)}})),className:Ge(te==null?void 0:te.className,d==null?void 0:d.className,H==null?void 0:H.backdrop),ownerState:B});return!O&&!R&&(!W||U)?null:j.jsx(cN,{ref:D,container:g,disablePortal:x,children:j.jsxs(Y,K({},ce,{children:[!C&&c?j.jsx(X,K({},Ne)):null,j.jsx(fre,{disableEnforceFocus:w,disableAutoFocus:b,disableRestoreFocus:S,isEnabled:F,open:R,children:P.cloneElement(p,V)})]}))})}),pie=fie,gie=Sn("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),e_=gie,mie=Mte({createStyledComponent:St("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root}),useThemeProps:t=>Tn({props:t,name:"MuiStack"})}),vie=mie,yie=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function qy(t){return`scale(${t}, ${t**2})`}const bie={entering:{opacity:1,transform:qy(1)},entered:{opacity:1,transform:"none"}},Y1=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),dN=P.forwardRef(function(e,n){const{addEndListener:r,appear:o=!0,children:i,easing:s,in:l,onEnter:a,onEntered:u,onEntering:c,onExit:d,onExited:h,onExiting:f,style:p,timeout:g="auto",TransitionComponent:m=qL}=e,v=Fe(e,yie),y=P.useRef(),b=P.useRef(),w=kv(),k=P.useRef(null),x=_r(k,i.ref,n),S=M=>I=>{if(M){const N=k.current;I===void 0?M(N):M(N,I)}},T=S(c),C=S((M,I)=>{ZL(M);const{duration:N,delay:L,easing:$}=zg({style:p,timeout:g,easing:s},{mode:"enter"});let D;g==="auto"?(D=w.transitions.getAutoHeightDuration(M.clientHeight),b.current=D):D=N,M.style.transition=[w.transitions.create("opacity",{duration:D,delay:L}),w.transitions.create("transform",{duration:Y1?D:D*.666,delay:L,easing:$})].join(","),a&&a(M,I)}),O=S(u),_=S(f),R=S(M=>{const{duration:I,delay:N,easing:L}=zg({style:p,timeout:g,easing:s},{mode:"exit"});let $;g==="auto"?($=w.transitions.getAutoHeightDuration(M.clientHeight),b.current=$):$=I,M.style.transition=[w.transitions.create("opacity",{duration:$,delay:N}),w.transitions.create("transform",{duration:Y1?$:$*.666,delay:Y1?N:N||$*.333,easing:L})].join(","),M.style.opacity=0,M.style.transform=qy(.75),d&&d(M)}),A=S(h),E=M=>{g==="auto"&&(y.current=setTimeout(M,b.current||0)),r&&r(k.current,M)};return P.useEffect(()=>()=>{clearTimeout(y.current)},[]),j.jsx(m,K({appear:o,in:l,nodeRef:k,onEnter:C,onEntered:O,onEntering:T,onExit:R,onExited:A,onExiting:_,addEndListener:E,timeout:g==="auto"?null:g},v,{children:(M,I)=>P.cloneElement(i,K({style:K({opacity:0,transform:qy(.75),visibility:M==="exited"&&!l?"hidden":void 0},bie[M],p,i.props.style),ref:x},I))}))});dN.muiSupportAuto=!0;const Zy=dN,wie=P.createContext({}),Eh=wie;function xie(t){return En("MuiList",t)}Sn("MuiList",["root","padding","dense","subheader"]);const kie=["children","className","component","dense","disablePadding","subheader"],Eie=t=>{const{classes:e,disablePadding:n,dense:r,subheader:o}=t;return zn({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},xie,e)},Sie=St("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disablePadding&&e.padding,n.dense&&e.dense,n.subheader&&e.subheader]}})(({ownerState:t})=>K({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})),Cie=P.forwardRef(function(e,n){const r=Tn({props:e,name:"MuiList"}),{children:o,className:i,component:s="ul",dense:l=!1,disablePadding:a=!1,subheader:u}=r,c=Fe(r,kie),d=P.useMemo(()=>({dense:l}),[l]),h=K({},r,{component:s,dense:l,disablePadding:a}),f=Eie(h);return j.jsx(Eh.Provider,{value:d,children:j.jsxs(Sie,K({as:s,className:Ge(f.root,i),ref:n,ownerState:h},c,{children:[u,o]}))})}),Tie=Cie;function Aie(t){return En("MuiListItemIcon",t)}const _ie=Sn("MuiListItemIcon",["root","alignItemsFlexStart"]),t_=_ie,Rie=["className"],Mie=t=>{const{alignItems:e,classes:n}=t;return zn({root:["root",e==="flex-start"&&"alignItemsFlexStart"]},Aie,n)},Oie=St("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.alignItems==="flex-start"&&e.alignItemsFlexStart]}})(({theme:t,ownerState:e})=>K({minWidth:56,color:(t.vars||t).palette.action.active,flexShrink:0,display:"inline-flex"},e.alignItems==="flex-start"&&{marginTop:8})),Iie=P.forwardRef(function(e,n){const r=Tn({props:e,name:"MuiListItemIcon"}),{className:o}=r,i=Fe(r,Rie),s=P.useContext(Eh),l=K({},r,{alignItems:s.alignItems}),a=Mie(l);return j.jsx(Oie,K({className:Ge(a.root,o),ownerState:l,ref:n},i))}),Lie=Iie;function Nie(t){return En("MuiListItemText",t)}const $ie=Sn("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),Bg=$ie,Die=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],Pie=t=>{const{classes:e,inset:n,primary:r,secondary:o,dense:i}=t;return zn({root:["root",n&&"inset",i&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},Nie,e)},zie=St("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Bg.primary}`]:e.primary},{[`& .${Bg.secondary}`]:e.secondary},e.root,n.inset&&e.inset,n.primary&&n.secondary&&e.multiline,n.dense&&e.dense]}})(({ownerState:t})=>K({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},t.primary&&t.secondary&&{marginTop:6,marginBottom:6},t.inset&&{paddingLeft:56})),Fie=P.forwardRef(function(e,n){const r=Tn({props:e,name:"MuiListItemText"}),{children:o,className:i,disableTypography:s=!1,inset:l=!1,primary:a,primaryTypographyProps:u,secondary:c,secondaryTypographyProps:d}=r,h=Fe(r,Die),{dense:f}=P.useContext(Eh);let p=a??o,g=c;const m=K({},r,{disableTypography:s,inset:l,primary:!!p,secondary:!!g,dense:f}),v=Pie(m);return p!=null&&p.type!==yd&&!s&&(p=j.jsx(yd,K({variant:f?"body2":"body1",className:v.primary,component:u!=null&&u.variant?void 0:"span",display:"block"},u,{children:p}))),g!=null&&g.type!==yd&&!s&&(g=j.jsx(yd,K({variant:"body2",className:v.secondary,color:"text.secondary",display:"block"},d,{children:g}))),j.jsxs(zie,K({className:Ge(v.root,i),ownerState:m,ref:n},h,{children:[p,g]}))}),Bie=Fie,Hie=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function X1(t,e,n){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:n?null:t.firstChild}function n_(t,e,n){return t===e?n?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:n?null:t.lastChild}function hN(t,e){if(e===void 0)return!0;let n=t.innerText;return n===void 0&&(n=t.textContent),n=n.trim().toLowerCase(),n.length===0?!1:e.repeating?n[0]===e.keys[0]:n.indexOf(e.keys.join(""))===0}function Du(t,e,n,r,o,i){let s=!1,l=o(t,e,e?n:!1);for(;l;){if(l===t.firstChild){if(s)return!1;s=!0}const a=r?!1:l.disabled||l.getAttribute("aria-disabled")==="true";if(!l.hasAttribute("tabindex")||!hN(l,i)||a)l=o(t,l,n);else return l.focus(),!0}return!1}const Uie=P.forwardRef(function(e,n){const{actions:r,autoFocus:o=!1,autoFocusItem:i=!1,children:s,className:l,disabledItemsFocusable:a=!1,disableListWrap:u=!1,onKeyDown:c,variant:d="selectedMenu"}=e,h=Fe(e,Hie),f=P.useRef(null),p=P.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});sl(()=>{o&&f.current.focus()},[o]),P.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(b,w)=>{const k=!f.current.style.width;if(b.clientHeight{const w=f.current,k=b.key,x=Cr(w).activeElement;if(k==="ArrowDown")b.preventDefault(),Du(w,x,u,a,X1);else if(k==="ArrowUp")b.preventDefault(),Du(w,x,u,a,n_);else if(k==="Home")b.preventDefault(),Du(w,null,u,a,X1);else if(k==="End")b.preventDefault(),Du(w,null,u,a,n_);else if(k.length===1){const S=p.current,T=k.toLowerCase(),C=performance.now();S.keys.length>0&&(C-S.lastTime>500?(S.keys=[],S.repeating=!0,S.previousKeyMatched=!0):S.repeating&&T!==S.keys[0]&&(S.repeating=!1)),S.lastTime=C,S.keys.push(T);const O=x&&!S.repeating&&hN(x,S);S.previousKeyMatched&&(O||Du(w,x,!1,a,X1,S))?b.preventDefault():S.previousKeyMatched=!1}c&&c(b)},m=_r(f,n);let v=-1;P.Children.forEach(s,(b,w)=>{if(!P.isValidElement(b)){v===w&&(v+=1,v>=s.length&&(v=-1));return}b.props.disabled||(d==="selectedMenu"&&b.props.selected||v===-1)&&(v=w),v===w&&(b.props.disabled||b.props.muiSkipListHighlight||b.type.muiSkipListHighlight)&&(v+=1,v>=s.length&&(v=-1))});const y=P.Children.map(s,(b,w)=>{if(w===v){const k={};return i&&(k.autoFocus=!0),b.props.tabIndex===void 0&&d==="selectedMenu"&&(k.tabIndex=0),P.cloneElement(b,k)}return b});return j.jsx(Tie,K({role:"menu",ref:m,className:l,onKeyDown:g,tabIndex:o?0:-1},h,{children:y}))}),Wie=Uie;function Vie(t){return En("MuiPopover",t)}Sn("MuiPopover",["root","paper"]);const jie=["onEntering"],Gie=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],Kie=["slotProps"];function r_(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.height/2:e==="bottom"&&(n=t.height),n}function o_(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.width/2:e==="right"&&(n=t.width),n}function i_(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function q1(t){return typeof t=="function"?t():t}const Yie=t=>{const{classes:e}=t;return zn({root:["root"],paper:["paper"]},Vie,e)},Xie=St(pie,{name:"MuiPopover",slot:"Root",overridesResolver:(t,e)=>e.root})({}),fN=St(wne,{name:"MuiPopover",slot:"Paper",overridesResolver:(t,e)=>e.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),qie=P.forwardRef(function(e,n){var r,o,i;const s=Tn({props:e,name:"MuiPopover"}),{action:l,anchorEl:a,anchorOrigin:u={vertical:"top",horizontal:"left"},anchorPosition:c,anchorReference:d="anchorEl",children:h,className:f,container:p,elevation:g=8,marginThreshold:m=16,open:v,PaperProps:y={},slots:b,slotProps:w,transformOrigin:k={vertical:"top",horizontal:"left"},TransitionComponent:x=Zy,transitionDuration:S="auto",TransitionProps:{onEntering:T}={},disableScrollLock:C=!1}=s,O=Fe(s.TransitionProps,jie),_=Fe(s,Gie),R=(r=w==null?void 0:w.paper)!=null?r:y,A=P.useRef(),E=_r(A,R.ref),M=K({},s,{anchorOrigin:u,anchorReference:d,elevation:g,marginThreshold:m,externalPaperSlotProps:R,transformOrigin:k,TransitionComponent:x,transitionDuration:S,TransitionProps:O}),I=Yie(M),N=P.useCallback(()=>{if(d==="anchorPosition")return c;const ye=q1(a),Ce=(ye&&ye.nodeType===1?ye:Cr(A.current).body).getBoundingClientRect();return{top:Ce.top+r_(Ce,u.vertical),left:Ce.left+o_(Ce,u.horizontal)}},[a,u.horizontal,u.vertical,c,d]),L=P.useCallback(ye=>({vertical:r_(ye,k.vertical),horizontal:o_(ye,k.horizontal)}),[k.horizontal,k.vertical]),$=P.useCallback(ye=>{const Me={width:ye.offsetWidth,height:ye.offsetHeight},Ce=L(Me);if(d==="none")return{top:null,left:null,transformOrigin:i_(Ce)};const mt=N();let Lt=mt.top-Ce.vertical,wt=mt.left-Ce.horizontal;const qn=Lt+Me.height,Nt=wt+Me.width,An=vh(q1(a)),hn=An.innerHeight-m,fn=An.innerWidth-m;if(m!==null&&Lthn){const qe=qn-hn;Lt-=qe,Ce.vertical+=qe}if(m!==null&&wtfn){const qe=Nt-fn;wt-=qe,Ce.horizontal+=qe}return{top:`${Math.round(Lt)}px`,left:`${Math.round(wt)}px`,transformOrigin:i_(Ce)}},[a,d,N,L,m]),[D,F]=P.useState(v),U=P.useCallback(()=>{const ye=A.current;if(!ye)return;const Me=$(ye);Me.top!==null&&(ye.style.top=Me.top),Me.left!==null&&(ye.style.left=Me.left),ye.style.transformOrigin=Me.transformOrigin,F(!0)},[$]);P.useEffect(()=>(C&&window.addEventListener("scroll",U),()=>window.removeEventListener("scroll",U)),[a,C,U]);const W=(ye,Me)=>{T&&T(ye,Me),U()},B=()=>{F(!1)};P.useEffect(()=>{v&&U()}),P.useImperativeHandle(l,()=>v?{updatePosition:()=>{U()}}:null,[v,U]),P.useEffect(()=>{if(!v)return;const ye=DQ(()=>{U()}),Me=vh(a);return Me.addEventListener("resize",ye),()=>{ye.clear(),Me.removeEventListener("resize",ye)}},[a,v,U]);let H=S;S==="auto"&&!x.muiSupportAuto&&(H=void 0);const V=p||(a?Cr(q1(a)).body:void 0),Y=(o=b==null?void 0:b.root)!=null?o:Xie,X=(i=b==null?void 0:b.paper)!=null?i:fN,Z=Gi({elementType:X,externalSlotProps:K({},R,{style:D?R.style:K({},R.style,{opacity:0})}),additionalProps:{elevation:g,ref:E},ownerState:M,className:Ge(I.paper,R==null?void 0:R.className)}),te=Gi({elementType:Y,externalSlotProps:(w==null?void 0:w.root)||{},externalForwardedProps:_,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:V,open:v},ownerState:M,className:Ge(I.root,f)}),{slotProps:ce}=te,Ne=Fe(te,Kie);return j.jsx(Y,K({},Ne,!QL(Y)&&{slotProps:ce,disableScrollLock:C},{children:j.jsx(x,K({appear:!0,in:v,onEntering:W,onExited:B,timeout:H},O,{children:j.jsx(X,K({},Z,{children:h}))}))}))}),Zie=qie;function Qie(t){return En("MuiMenu",t)}Sn("MuiMenu",["root","paper","list"]);const Jie=["onEntering"],ese=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],tse={vertical:"top",horizontal:"right"},nse={vertical:"top",horizontal:"left"},rse=t=>{const{classes:e}=t;return zn({root:["root"],paper:["paper"],list:["list"]},Qie,e)},ose=St(Zie,{shouldForwardProp:t=>Mx(t)||t==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(t,e)=>e.root})({}),ise=St(fN,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,e)=>e.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),sse=St(Wie,{name:"MuiMenu",slot:"List",overridesResolver:(t,e)=>e.list})({outline:0}),ase=P.forwardRef(function(e,n){var r,o;const i=Tn({props:e,name:"MuiMenu"}),{autoFocus:s=!0,children:l,className:a,disableAutoFocusItem:u=!1,MenuListProps:c={},onClose:d,open:h,PaperProps:f={},PopoverClasses:p,transitionDuration:g="auto",TransitionProps:{onEntering:m}={},variant:v="selectedMenu",slots:y={},slotProps:b={}}=i,w=Fe(i.TransitionProps,Jie),k=Fe(i,ese),x=kv(),S=x.direction==="rtl",T=K({},i,{autoFocus:s,disableAutoFocusItem:u,MenuListProps:c,onEntering:m,PaperProps:f,transitionDuration:g,TransitionProps:w,variant:v}),C=rse(T),O=s&&!u&&h,_=P.useRef(null),R=($,D)=>{_.current&&_.current.adjustStyleForScrollbar($,x),m&&m($,D)},A=$=>{$.key==="Tab"&&($.preventDefault(),d&&d($,"tabKeyDown"))};let E=-1;P.Children.map(l,($,D)=>{P.isValidElement($)&&($.props.disabled||(v==="selectedMenu"&&$.props.selected||E===-1)&&(E=D))});const M=(r=y.paper)!=null?r:ise,I=(o=b.paper)!=null?o:f,N=Gi({elementType:y.root,externalSlotProps:b.root,ownerState:T,className:[C.root,a]}),L=Gi({elementType:M,externalSlotProps:I,ownerState:T,className:C.paper});return j.jsx(ose,K({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:S?"right":"left"},transformOrigin:S?tse:nse,slots:{paper:M,root:y.root},slotProps:{root:N,paper:L},open:h,ref:n,transitionDuration:g,TransitionProps:K({onEntering:R},w),ownerState:T},k,{classes:p,children:j.jsx(sse,K({onKeyDown:A,actions:_,autoFocus:s&&(E===-1||u),autoFocusItem:O,variant:v},c,{className:Ge(C.list,c.className),children:l}))}))}),lse=ase;function cse(t){return En("MuiMenuItem",t)}const use=Sn("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Pu=use,dse=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],hse=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.divider&&e.divider,!n.disableGutters&&e.gutters]},fse=t=>{const{disabled:e,dense:n,divider:r,disableGutters:o,selected:i,classes:s}=t,a=zn({root:["root",n&&"dense",e&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},cse,s);return K({},s,a)},pse=St(Lx,{shouldForwardProp:t=>Mx(t)||t==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:hse})(({theme:t,ownerState:e})=>K({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Pu.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:wr(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Pu.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:wr(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Pu.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:wr(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:wr(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${Pu.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Pu.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${e_.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${e_.inset}`]:{marginLeft:52},[`& .${Bg.root}`]:{marginTop:0,marginBottom:0},[`& .${Bg.inset}`]:{paddingLeft:36},[`& .${t_.root}`]:{minWidth:36}},!e.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},e.dense&&K({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{[`& .${t_.root} svg`]:{fontSize:"1.25rem"}}))),gse=P.forwardRef(function(e,n){const r=Tn({props:e,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:s=!1,divider:l=!1,disableGutters:a=!1,focusVisibleClassName:u,role:c="menuitem",tabIndex:d,className:h}=r,f=Fe(r,dse),p=P.useContext(Eh),g=P.useMemo(()=>({dense:s||p.dense||!1,disableGutters:a}),[p.dense,s,a]),m=P.useRef(null);sl(()=>{o&&m.current&&m.current.focus()},[o]);const v=K({},r,{dense:g.dense,divider:l,disableGutters:a}),y=fse(r),b=_r(m,n);let w;return r.disabled||(w=d!==void 0?d:-1),j.jsx(Eh.Provider,{value:g,children:j.jsx(pse,K({ref:b,role:c,tabIndex:w,component:i,focusVisibleClassName:Ge(y.focusVisible,u),className:Ge(y.root,h)},f,{ownerState:v,classes:y}))})}),mse=gse;function vse(t){return En("MuiTooltip",t)}const yse=Sn("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),Cs=yse,bse=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function wse(t){return Math.round(t*1e5)/1e5}const xse=t=>{const{classes:e,disableInteractive:n,arrow:r,touch:o,placement:i}=t,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${pt(i.split("-")[0])}`],arrow:["arrow"]};return zn(s,vse,e)},kse=St(Hx,{name:"MuiTooltip",slot:"Popper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.popper,!n.disableInteractive&&e.popperInteractive,n.arrow&&e.popperArrow,!n.open&&e.popperClose]}})(({theme:t,ownerState:e,open:n})=>K({zIndex:(t.vars||t).zIndex.tooltip,pointerEvents:"none"},!e.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},e.arrow&&{[`&[data-popper-placement*="bottom"] .${Cs.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Cs.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Cs.arrow}`]:K({},e.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${Cs.arrow}`]:K({},e.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),Ese=St("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.tooltip,n.touch&&e.touch,n.arrow&&e.tooltipArrow,e[`tooltipPlacement${pt(n.placement.split("-")[0])}`]]}})(({theme:t,ownerState:e})=>K({backgroundColor:t.vars?t.vars.palette.Tooltip.bg:wr(t.palette.grey[700],.92),borderRadius:(t.vars||t).shape.borderRadius,color:(t.vars||t).palette.common.white,fontFamily:t.typography.fontFamily,padding:"4px 8px",fontSize:t.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:t.typography.fontWeightMedium},e.arrow&&{position:"relative",margin:0},e.touch&&{padding:"8px 16px",fontSize:t.typography.pxToRem(14),lineHeight:`${wse(16/14)}em`,fontWeight:t.typography.fontWeightRegular},{[`.${Cs.popper}[data-popper-placement*="left"] &`]:K({transformOrigin:"right center"},e.isRtl?K({marginLeft:"14px"},e.touch&&{marginLeft:"24px"}):K({marginRight:"14px"},e.touch&&{marginRight:"24px"})),[`.${Cs.popper}[data-popper-placement*="right"] &`]:K({transformOrigin:"left center"},e.isRtl?K({marginRight:"14px"},e.touch&&{marginRight:"24px"}):K({marginLeft:"14px"},e.touch&&{marginLeft:"24px"})),[`.${Cs.popper}[data-popper-placement*="top"] &`]:K({transformOrigin:"center bottom",marginBottom:"14px"},e.touch&&{marginBottom:"24px"}),[`.${Cs.popper}[data-popper-placement*="bottom"] &`]:K({transformOrigin:"center top",marginTop:"14px"},e.touch&&{marginTop:"24px"})})),Sse=St("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(t,e)=>e.arrow})(({theme:t})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t.vars?t.vars.palette.Tooltip.bg:wr(t.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let Yf=!1,Z1=null,zu={x:0,y:0};function Xf(t,e){return n=>{e&&e(n),t(n)}}const Cse=P.forwardRef(function(e,n){var r,o,i,s,l,a,u,c,d,h,f,p,g,m,v,y,b,w,k;const x=Tn({props:e,name:"MuiTooltip"}),{arrow:S=!1,children:T,components:C={},componentsProps:O={},describeChild:_=!1,disableFocusListener:R=!1,disableHoverListener:A=!1,disableInteractive:E=!1,disableTouchListener:M=!1,enterDelay:I=100,enterNextDelay:N=0,enterTouchDelay:L=700,followCursor:$=!1,id:D,leaveDelay:F=0,leaveTouchDelay:U=1500,onClose:W,onOpen:B,open:H,placement:V="bottom",PopperComponent:Y,PopperProps:X={},slotProps:Z={},slots:te={},title:ce,TransitionComponent:Ne=Zy,TransitionProps:ye}=x,Me=Fe(x,bse),Ce=P.isValidElement(T)?T:j.jsx("span",{children:T}),mt=kv(),Lt=mt.direction==="rtl",[wt,qn]=P.useState(),[Nt,An]=P.useState(null),hn=P.useRef(!1),fn=E||$,qe=P.useRef(),_n=P.useRef(),q=P.useRef(),he=P.useRef(),[ve,ie]=BQ({controlled:H,default:!1,name:"Tooltip",state:"open"});let Te=ve;const Ze=FQ(D),Xe=P.useRef(),nt=P.useCallback(()=>{Xe.current!==void 0&&(document.body.style.WebkitUserSelect=Xe.current,Xe.current=void 0),clearTimeout(he.current)},[]);P.useEffect(()=>()=>{clearTimeout(qe.current),clearTimeout(_n.current),clearTimeout(q.current),nt()},[nt]);const rt=$e=>{clearTimeout(Z1),Yf=!0,ie(!0),B&&!Te&&B($e)},Be=za($e=>{clearTimeout(Z1),Z1=setTimeout(()=>{Yf=!1},800+F),ie(!1),W&&Te&&W($e),clearTimeout(qe.current),qe.current=setTimeout(()=>{hn.current=!1},mt.transitions.duration.shortest)}),Kt=$e=>{hn.current&&$e.type!=="touchstart"||(wt&&wt.removeAttribute("title"),clearTimeout(_n.current),clearTimeout(q.current),I||Yf&&N?_n.current=setTimeout(()=>{rt($e)},Yf?N:I):rt($e))},Co=$e=>{clearTimeout(_n.current),clearTimeout(q.current),q.current=setTimeout(()=>{Be($e)},F)},{isFocusVisibleRef:la,onBlur:yi,onFocus:uf,ref:Iv}=vL(),[,df]=P.useState(!1),Tl=$e=>{yi($e),la.current===!1&&(df(!1),Co($e))},Qi=$e=>{wt||qn($e.currentTarget),uf($e),la.current===!0&&(df(!0),Kt($e))},Al=$e=>{hn.current=!0;const Qn=Ce.props;Qn.onTouchStart&&Qn.onTouchStart($e)},_l=Kt,Rl=Co,ca=$e=>{Al($e),clearTimeout(q.current),clearTimeout(qe.current),nt(),Xe.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",he.current=setTimeout(()=>{document.body.style.WebkitUserSelect=Xe.current,Kt($e)},L)},Lv=$e=>{Ce.props.onTouchEnd&&Ce.props.onTouchEnd($e),nt(),clearTimeout(q.current),q.current=setTimeout(()=>{Be($e)},U)};P.useEffect(()=>{if(!Te)return;function $e(Qn){(Qn.key==="Escape"||Qn.key==="Esc")&&Be(Qn)}return document.addEventListener("keydown",$e),()=>{document.removeEventListener("keydown",$e)}},[Be,Te]);const Nv=_r(Ce.ref,Iv,qn,n);!ce&&ce!==0&&(Te=!1);const bu=P.useRef(),$v=$e=>{const Qn=Ce.props;Qn.onMouseMove&&Qn.onMouseMove($e),zu={x:$e.clientX,y:$e.clientY},bu.current&&bu.current.update()},ua={},Ml=typeof ce=="string";_?(ua.title=!Te&&Ml&&!A?ce:null,ua["aria-describedby"]=Te?Ze:null):(ua["aria-label"]=Ml?ce:null,ua["aria-labelledby"]=Te&&!Ml?Ze:null);const Zn=K({},ua,Me,Ce.props,{className:Ge(Me.className,Ce.props.className),onTouchStart:Al,ref:Nv},$?{onMouseMove:$v}:{}),Or={};M||(Zn.onTouchStart=ca,Zn.onTouchEnd=Lv),A||(Zn.onMouseOver=Xf(_l,Zn.onMouseOver),Zn.onMouseLeave=Xf(Rl,Zn.onMouseLeave),fn||(Or.onMouseOver=_l,Or.onMouseLeave=Rl)),R||(Zn.onFocus=Xf(Qi,Zn.onFocus),Zn.onBlur=Xf(Tl,Zn.onBlur),fn||(Or.onFocus=Qi,Or.onBlur=Tl));const Dv=P.useMemo(()=>{var $e;let Qn=[{name:"arrow",enabled:!!Nt,options:{element:Nt,padding:4}}];return($e=X.popperOptions)!=null&&$e.modifiers&&(Qn=Qn.concat(X.popperOptions.modifiers)),K({},X.popperOptions,{modifiers:Qn})},[Nt,X]),da=K({},x,{isRtl:Lt,arrow:S,disableInteractive:fn,placement:V,PopperComponentProp:Y,touch:hn.current}),wu=xse(da),hf=(r=(o=te.popper)!=null?o:C.Popper)!=null?r:kse,ff=(i=(s=(l=te.transition)!=null?l:C.Transition)!=null?s:Ne)!=null?i:Zy,eo=(a=(u=te.tooltip)!=null?u:C.Tooltip)!=null?a:Ese,pf=(c=(d=te.arrow)!=null?d:C.Arrow)!=null?c:Sse,Pv=bd(hf,K({},X,(h=Z.popper)!=null?h:O.popper,{className:Ge(wu.popper,X==null?void 0:X.className,(f=(p=Z.popper)!=null?p:O.popper)==null?void 0:f.className)}),da),zv=bd(ff,K({},ye,(g=Z.transition)!=null?g:O.transition),da),Fv=bd(eo,K({},(m=Z.tooltip)!=null?m:O.tooltip,{className:Ge(wu.tooltip,(v=(y=Z.tooltip)!=null?y:O.tooltip)==null?void 0:v.className)}),da),Bv=bd(pf,K({},(b=Z.arrow)!=null?b:O.arrow,{className:Ge(wu.arrow,(w=(k=Z.arrow)!=null?k:O.arrow)==null?void 0:w.className)}),da);return j.jsxs(P.Fragment,{children:[P.cloneElement(Ce,Zn),j.jsx(hf,K({as:Y??Hx,placement:V,anchorEl:$?{getBoundingClientRect:()=>({top:zu.y,left:zu.x,right:zu.x,bottom:zu.y,width:0,height:0})}:wt,popperRef:bu,open:wt?Te:!1,id:Ze,transition:!0},Or,Pv,{popperOptions:Dv,children:({TransitionProps:$e})=>j.jsx(ff,K({timeout:mt.transitions.duration.shorter},$e,zv,{children:j.jsxs(eo,K({},Fv,{children:[ce,S?j.jsx(pf,K({},Bv,{ref:An})):null]}))}))}))]})}),pN=Cse;function Tse(t){return En("MuiToggleButton",t)}const Ase=Sn("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge"]),s_=Ase,_se=["children","className","color","disabled","disableFocusRipple","fullWidth","onChange","onClick","selected","size","value"],Rse=t=>{const{classes:e,fullWidth:n,selected:r,disabled:o,size:i,color:s}=t,l={root:["root",r&&"selected",o&&"disabled",n&&"fullWidth",`size${pt(i)}`,s]};return zn(l,Tse,e)},Mse=St(Lx,{name:"MuiToggleButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`size${pt(n.size)}`]]}})(({theme:t,ownerState:e})=>{let n=e.color==="standard"?t.palette.text.primary:t.palette[e.color].main,r;return t.vars&&(n=e.color==="standard"?t.vars.palette.text.primary:t.vars.palette[e.color].main,r=e.color==="standard"?t.vars.palette.text.primaryChannel:t.vars.palette[e.color].mainChannel),K({},t.typography.button,{borderRadius:(t.vars||t).shape.borderRadius,padding:11,border:`1px solid ${(t.vars||t).palette.divider}`,color:(t.vars||t).palette.action.active},e.fullWidth&&{width:"100%"},{[`&.${s_.disabled}`]:{color:(t.vars||t).palette.action.disabled,border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:wr(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${s_.selected}`]:{color:n,backgroundColor:t.vars?`rgba(${r} / ${t.vars.palette.action.selectedOpacity})`:wr(n,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${r} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:wr(n,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${r} / ${t.vars.palette.action.selectedOpacity})`:wr(n,t.palette.action.selectedOpacity)}}}},e.size==="small"&&{padding:7,fontSize:t.typography.pxToRem(13)},e.size==="large"&&{padding:15,fontSize:t.typography.pxToRem(15)})}),Ose=P.forwardRef(function(e,n){const r=Tn({props:e,name:"MuiToggleButton"}),{children:o,className:i,color:s="standard",disabled:l=!1,disableFocusRipple:a=!1,fullWidth:u=!1,onChange:c,onClick:d,selected:h,size:f="medium",value:p}=r,g=Fe(r,_se),m=K({},r,{color:s,disabled:l,disableFocusRipple:a,fullWidth:u,size:f}),v=Rse(m),y=b=>{d&&(d(b,p),b.defaultPrevented)||c&&c(b,p)};return j.jsx(Mse,K({className:Ge(v.root,i),disabled:l,focusRipple:!a,ref:n,onClick:y,onChange:c,value:p,ownerState:m,"aria-pressed":h},g,{children:o}))}),Ise=Ose;var Lse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 15v2c0 1.054.95 2 2 2h3v2H7a4 4 0 0 1-4-4v-2h2zm13-5l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16 10h2zm-1 2.885L15.753 16h2.492L17 12.885zM3 3h6a3 3 0 0 1 2.235 5A3 3 0 0 1 9 13H3V3zm6 6H5v2h4a1 1 0 0 0 0-2zm8-6a4 4 0 0 1 4 4v2h-2V7a2 2 0 0 0-2-2h-3V3h3zM9 5H5v2h4a1 1 0 1 0 0-2z"}}],Nse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"}}],$se=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"}}],Dse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M12.866 3l9.526 16.5a1 1 0 0 1-.866 1.5H2.474a1 1 0 0 1-.866-1.5L11.134 3a1 1 0 0 1 1.732 0zm-8.66 16h15.588L12 5.5 4.206 19zM11 16h2v2h-2v-2zm0-7h2v5h-2V9z"}}],Pse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 19h18v2H3v-2zm5-6h3l-4 4-4-4h3V3h2v10zm10 0h3l-4 4-4-4h3V3h2v10z"}}],zse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm2 15h14v2H5v-2zm-2-5h18v2H3v-2zm2-5h14v2H5V9z"}}],Fse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h18v2H3v-2zm0-5h18v2H3v-2zm0-5h18v2H3V9z"}}],Bse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h14v2H3v-2zm0-5h18v2H3v-2zm0-5h14v2H3V9z"}}],Hse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm4 15h14v2H7v-2zm-4-5h18v2H3v-2zm4-5h14v2H7V9z"}}],Use=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 3h18v2H3V3zm5 8v10H6V11H3l4-4 4 4H8zm10 0v10h-2V11h-3l4-4 4 4h-3z"}}],Wse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 11h18v2H3v-2zm15 7v3h-2v-3h-3l4-4 4 4h-3zM8 18v3H6v-3H3l4-4 4 4H8zM18 6h3l-4 4-4-4h3V3h2v3zM8 6h3l-4 4-4-4h3V3h2v3z"}}],Vse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M6.75 2.5A4.25 4.25 0 0 1 11 6.75V11H6.75a4.25 4.25 0 1 1 0-8.5zM9 9V6.75A2.25 2.25 0 1 0 6.75 9H9zm-2.25 4H11v4.25A4.25 4.25 0 1 1 6.75 13zm0 2A2.25 2.25 0 1 0 9 17.25V15H6.75zm10.5-12.5a4.25 4.25 0 1 1 0 8.5H13V6.75a4.25 4.25 0 0 1 4.25-4.25zm0 6.5A2.25 2.25 0 1 0 15 6.75V9h2.25zM13 13h4.25A4.25 4.25 0 1 1 13 17.25V13zm2 2v2.25A2.25 2.25 0 1 0 17.25 15H15z"}}],jse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 16l-6-6h12z"}}],Gse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 7v4L2 6l6-5v4h5a8 8 0 1 1 0 16H4v-2h9a6 6 0 1 0 0-12H8z"}}],Kse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 7h-5a6 6 0 1 0 0 12h9v2h-9a8 8 0 1 1 0-16h5V1l6 5-6 5V7z"}}],Yse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 12l6-6v12z"}}],Xse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 12l-6 6V6z"}}],qse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 8l6 6H6z"}}],Zse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13 3v7.267l6.294-3.633 1 1.732-6.293 3.633 6.293 3.635-1 1.732L13 13.732V21h-2v-7.268l-6.294 3.634-1-1.732L9.999 12 3.706 8.366l1-1.732L11 10.267V3z"}}],Qse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14.828 7.757l-5.656 5.657a1 1 0 1 0 1.414 1.414l5.657-5.656A3 3 0 1 0 12 4.929l-5.657 5.657a5 5 0 1 0 7.071 7.07L19.071 12l1.414 1.414-5.657 5.657a7 7 0 1 1-9.9-9.9l5.658-5.656a5 5 0 0 1 7.07 7.07L12 16.244A3 3 0 1 1 7.757 12l5.657-5.657 1.414 1.414z"}}],Jse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 11h4.5a2.5 2.5 0 1 0 0-5H8v5zm10 4.5a4.5 4.5 0 0 1-4.5 4.5H6V4h6.5a4.5 4.5 0 0 1 3.256 7.606A4.498 4.498 0 0 1 18 15.5zM8 13v5h5.5a2.5 2.5 0 1 0 0-5H8z"}}],eae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 18v-3.7a1.5 1.5 0 0 0-1.5-1.5H2v-1.6h.5A1.5 1.5 0 0 0 4 9.7V6a3 3 0 0 1 3-3h1v2H7a1 1 0 0 0-1 1v4.1A2 2 0 0 1 4.626 12 2 2 0 0 1 6 13.9V18a1 1 0 0 0 1 1h1v2H7a3 3 0 0 1-3-3zm16-3.7V18a3 3 0 0 1-3 3h-1v-2h1a1 1 0 0 0 1-1v-4.1a2 2 0 0 1 1.374-1.9A2 2 0 0 1 18 10.1V6a1 1 0 0 0-1-1h-1V3h1a3 3 0 0 1 3 3v3.7a1.5 1.5 0 0 0 1.5 1.5h.5v1.6h-.5a1.5 1.5 0 0 0-1.5 1.5z"}}],tae=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M14 3c.552 0 1 .448 1 1v5h5c.552 0 1 .448 1 1v10c0 .552-.448 1-1 1H10c-.552 0-1-.448-1-1v-5H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h10zm-1 2H5v8h8V5z"}}],nae=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M11 3c.552 0 1 .448 1 1v2h5c.552 0 1 .448 1 1v5h2c.552 0 1 .448 1 1v7c0 .552-.448 1-1 1h-7c-.552 0-1-.448-1-1v-2H7c-.552 0-1-.448-1-1v-5H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h7zm5 5H8v8h8V8z"}}],rae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14 3v2H4v13.385L5.763 17H20v-7h2v8a1 1 0 0 1-1 1H6.455L2 22.5V4a1 1 0 0 1 1-1h11zm5 0V0h2v3h3v2h-3v3h-2V5h-3V3h3z"}}],oae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm-.997-4L6.76 11.757l1.414-1.414 2.829 2.829 5.656-5.657 1.415 1.414L11.003 16z"}}],iae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M7 7V3a1 1 0 0 1 1-1h13a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-4v3.993c0 .556-.449 1.007-1.007 1.007H3.007A1.006 1.006 0 0 1 2 20.993l.003-12.986C2.003 7.451 2.452 7 3.01 7H7zm2 0h6.993C16.549 7 17 7.449 17 8.007V15h3V4H9v3zm6 2H4.003L4 20h11V9zm-6.497 9l-3.536-3.536 1.414-1.414 2.122 2.122 4.242-4.243 1.414 1.414L8.503 18z"}}],sae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M6 4v4h12V4h2.007c.548 0 .993.445.993.993v16.014a.994.994 0 0 1-.993.993H3.993A.994.994 0 0 1 3 21.007V4.993C3 4.445 3.445 4 3.993 4H6zm2-2h8v4H8V2z"}}],aae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7 4V2h10v2h3.007c.548 0 .993.445.993.993v16.014a.994.994 0 0 1-.993.993H3.993A.994.994 0 0 1 3 21.007V4.993C3 4.445 3.445 4 3.993 4H7zm0 2H5v14h14V6h-2v2H7V6zm2-2v2h6V4H9z"}}],lae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm0-9.414l2.828-2.829 1.415 1.415L13.414 12l2.829 2.828-1.415 1.415L12 13.414l-2.828 2.829-1.415-1.415L10.586 12 7.757 9.172l1.415-1.415L12 10.586z"}}],cae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"}}],uae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"}}],dae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M23 12l-7.071 7.071-1.414-1.414L20.172 12l-5.657-5.657 1.414-1.414L23 12zM3.828 12l5.657 5.657-1.414 1.414L1 12l7.071-7.071 1.414 1.414L3.828 12z"}}],hae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16.95 8.464l1.414-1.414 4.95 4.95-4.95 4.95-1.414-1.414L20.485 12 16.95 8.464zm-9.9 0L3.515 12l3.535 3.536-1.414 1.414L.686 12l4.95-4.95L7.05 8.464z"}}],fae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 6h5v2h-2v13a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V8H2V6h5V3a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v3zm-8 5v6h2v-6H9zm4 0v6h2v-6h-2zM9 4v2h6V4H9z"}}],pae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 6h5v2h-2v13a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V8H2V6h5V3a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v3zm1 2H6v12h12V8zm-9 3h2v6H9v-6zm4 0h2v6h-2v-6zM9 4v2h6V4H9z"}}],gae=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M12 3c.552 0 1 .448 1 1v8c.835-.628 1.874-1 3-1 2.761 0 5 2.239 5 5s-2.239 5-5 5c-1.032 0-1.99-.313-2.787-.848L13 20c0 .552-.448 1-1 1H6c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h6zm-1 2H7v14h4V5zm8 10h-6v2h6v-2z"}}],mae=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 5c.552 0 1 .448 1 1v6c0 .552-.448 1-1 1 .628.835 1 1.874 1 3 0 2.761-2.239 5-5 5s-5-2.239-5-5c0-1.126.372-2.165 1-3H4c-.552 0-1-.448-1-1V6c0-.552.448-1 1-1h16zm-7 10v2h6v-2h-6zm6-8H5v4h14V7z"}}],vae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4.583 17.321C3.553 16.227 3 15 3 13.011c0-3.5 2.457-6.637 6.03-8.188l.893 1.378c-3.335 1.804-3.987 4.145-4.247 5.621.537-.278 1.24-.375 1.929-.311 1.804.167 3.226 1.648 3.226 3.489a3.5 3.5 0 0 1-3.5 3.5c-1.073 0-2.099-.49-2.748-1.179zm10 0C13.553 16.227 13 15 13 13.011c0-3.5 2.457-6.637 6.03-8.188l.893 1.378c-3.335 1.804-3.987 4.145-4.247 5.621.537-.278 1.24-.375 1.929-.311 1.804.167 3.226 1.648 3.226 3.489a3.5 3.5 0 0 1-3.5 3.5c-1.073 0-2.099-.49-2.748-1.179z"}}],yae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19.417 6.679C20.447 7.773 21 9 21 10.989c0 3.5-2.457 6.637-6.03 8.188l-.893-1.378c3.335-1.804 3.987-4.145 4.247-5.621-.537.278-1.24.375-1.929.311-1.804-.167-3.226-1.648-3.226-3.489a3.5 3.5 0 0 1 3.5-3.5c1.073 0 2.099.49 2.748 1.179zm-10 0C10.447 7.773 11 9 11 10.989c0 3.5-2.457 6.637-6.03 8.188l-.893-1.378c3.335-1.804 3.987-4.145 4.247-5.621-.537.278-1.24.375-1.929.311C4.591 12.322 3.17 10.841 3.17 9a3.5 3.5 0 0 1 3.5-3.5c1.073 0 2.099.49 2.748 1.179z"}}],bae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 19h16v-7h2v8a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-8h2v7zM14 9h5l-7 7-7-7h5V3h4v6z"}}],wae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M16 13l6.964 4.062-2.973.85 2.125 3.681-1.732 1-2.125-3.68-2.223 2.15L16 13zm-2-7h2v2h5a1 1 0 0 1 1 1v4h-2v-3H10v10h4v2H9a1 1 0 0 1-1-1v-5H6v-2h2V9a1 1 0 0 1 1-1h5V6zM4 14v2H2v-2h2zm0-4v2H2v-2h2zm0-4v2H2V6h2zm0-4v2H2V2h2zm4 0v2H6V2h2zm4 0v2h-2V2h2zm4 0v2h-2V2h2z"}}],xae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 19a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm-5.5 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm11 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zM13 2v2h6v2h-1.968a18.222 18.222 0 0 1-3.621 6.302 14.685 14.685 0 0 0 5.327 3.042l-.536 1.93A16.685 16.685 0 0 1 12 13.726a16.696 16.696 0 0 1-6.202 3.547l-.536-1.929a14.7 14.7 0 0 0 5.327-3.042 18.077 18.077 0 0 1-2.822-4.3h2.24A16.031 16.031 0 0 0 12 10.876a16.168 16.168 0 0 0 2.91-4.876L5 6V4h6V2h2z"}}],kae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 19a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm-5.5 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm11 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zM18 3v2H8v4h9v2H8v4h10v2H6V3h12z"}}],Eae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14 10h2v.757a4.5 4.5 0 0 1 7 3.743V20h-2v-5.5c0-1.43-1.175-2.5-2.5-2.5S16 13.07 16 14.5V20h-2V10zm-2-6v2H4v5h8v2H4v5h8v2H2V4h10z"}}],Sae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm-1-5h2v2h-2v-2zm0-8h2v6h-2V7z"}}],Cae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M10 6v2H5v11h11v-5h2v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm11-3v9l-3.794-3.793-5.999 6-1.414-1.414 5.999-6L12 3h9z"}}],Tae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7 6V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-3v3c0 .552-.45 1-1.007 1H4.007A1.001 1.001 0 0 1 3 21l.003-14c0-.552.45-1 1.007-1H7zM5.003 8L5 20h10V8H5.003zM9 6h8v10h2V4H9v2z"}}],Aae=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M6 21.5c-1.933 0-3.5-1.567-3.5-3.5s1.567-3.5 3.5-3.5c1.585 0 2.924 1.054 3.355 2.5H15v-2h2V9.242L14.757 7H9V9H3V3h6v2h5.757L18 1.756 22.243 6 19 9.241V15L21 15v6h-6v-2H9.355c-.43 1.446-1.77 2.5-3.355 2.5zm0-5c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zm13 .5h-2v2h2v-2zM18 4.586L16.586 6 18 7.414 19.414 6 18 4.586zM7 5H5v2h2V5z"}}],_ae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.246 14H8.754l-1.6 4H5l6-15h2l6 15h-2.154l-1.6-4zm-.8-2L12 5.885 9.554 12h4.892zM3 20h18v2H3v-2z"}}],Rae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M10 6v15H8V6H2V4h14v2h-6zm8 8v7h-2v-7h-3v-2h8v2h-3z"}}],Mae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11.246 15H4.754l-2 5H.6L7 4h2l6.4 16h-2.154l-2-5zm-.8-2L8 6.885 5.554 13h4.892zM21 12.535V12h2v8h-2v-.535a4 4 0 1 1 0-6.93zM19 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"}}],Oae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12.651 14.065L11.605 20H9.574l1.35-7.661-7.41-7.41L4.93 3.515 20.485 19.07l-1.414 1.414-6.42-6.42zm-.878-6.535l.27-1.53h-1.8l-2-2H20v2h-5.927L13.5 9.257 11.773 7.53z"}}],Iae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z"}}],Lae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 3h2v6h-2V5h-4V3h4zM4 3h4v2H4v4H2V3h2zm16 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z"}}],Nae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 18l7.68-6L5 6V4h14v2H8.263L16 12l-7.737 6H19v2H5v-2z"}}],$ae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 1v4H4v14h16V3h1.008c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H2.992A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3H6V1h2zm4 7l4 4h-3v4h-2v-4H8l4-4zm6-7v4h-8V3h6V1h2z"}}],Dae=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M13 20h-2v-7H4v7H2V4h2v7h7V4h2v16zm8-12v12h-2v-9.796l-2 .536V8.67L19.5 8H21z"}}],Pae=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M4 4v7h7V4h2v16h-2v-7H4v7H2V4h2zm14.5 4c2.071 0 3.75 1.679 3.75 3.75 0 .857-.288 1.648-.772 2.28l-.148.18L18.034 18H22v2h-7v-1.556l4.82-5.546c.268-.307.43-.709.43-1.148 0-.966-.784-1.75-1.75-1.75-.918 0-1.671.707-1.744 1.606l-.006.144h-2C14.75 9.679 16.429 8 18.5 8z"}}],zae=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M22 8l-.002 2-2.505 2.883c1.59.435 2.757 1.89 2.757 3.617 0 2.071-1.679 3.75-3.75 3.75-1.826 0-3.347-1.305-3.682-3.033l1.964-.382c.156.806.866 1.415 1.718 1.415.966 0 1.75-.784 1.75-1.75s-.784-1.75-1.75-1.75c-.286 0-.556.069-.794.19l-1.307-1.547L19.35 10H15V8h7zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2z"}}],Fae=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M13 20h-2v-7H4v7H2V4h2v7h7V4h2v16zm9-12v8h1.5v2H22v2h-2v-2h-5.5v-1.34l5-8.66H22zm-2 3.133L17.19 16H20v-4.867z"}}],Bae=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M22 8v2h-4.323l-.464 2.636c.33-.089.678-.136 1.037-.136 2.21 0 4 1.79 4 4s-1.79 4-4 4c-1.827 0-3.367-1.224-3.846-2.897l1.923-.551c.24.836 1.01 1.448 1.923 1.448 1.105 0 2-.895 2-2s-.895-2-2-2c-.63 0-1.193.292-1.56.748l-1.81-.904L16 8h6zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2z"}}],Hae=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M21.097 8l-2.598 4.5c2.21 0 4.001 1.79 4.001 4s-1.79 4-4 4-4-1.79-4-4c0-.736.199-1.426.546-2.019L18.788 8h2.309zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2zm14.5 10.5c-1.105 0-2 .895-2 2s.895 2 2 2 2-.895 2-2-.895-2-2-2z"}}],Uae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7.784 14l.42-4H4V8h4.415l.525-5h2.011l-.525 5h3.989l.525-5h2.011l-.525 5H20v2h-3.784l-.42 4H20v2h-4.415l-.525 5h-2.011l.525-5H9.585l-.525 5H7.049l.525-5H4v-2h3.784zm2.011 0h3.99l.42-4h-3.99l-.42 4z"}}],Wae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 11V4h2v17h-2v-8H7v8H5V4h2v7z"}}],Vae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 15v3h3v2h-3v3h-2v-3h-3v-2h3v-3h2zm.008-12c.548 0 .992.445.992.993V13h-2V5H4v13.999L14 9l3 3v2.829l-3-3L6.827 19H14v2H2.992A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3h18.016zM8 7a2 2 0 1 1 0 4 2 2 0 0 1 0-4z"}}],jae=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 3c.552 0 1 .448 1 1v1.757l-2 2V5H5v8.1l4-4 4.328 4.329-1.415 1.413L9 11.93l-4 3.999V19h10.533l.708.001 1.329-1.33L18.9 19h.1v-2.758l2-2V20c0 .552-.448 1-1 1H4c-.55 0-1-.45-1-1V4c0-.552.448-1 1-1h16zm1.778 4.808l1.414 1.414L15.414 17l-1.416-.002.002-1.412 7.778-7.778zM15.5 7c.828 0 1.5.672 1.5 1.5s-.672 1.5-1.5 1.5S14 9.328 14 8.5 14.672 7 15.5 7z"}}],Gae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4.828 21l-.02.02-.021-.02H2.992A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3h18.016c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H4.828zM20 15V5H4v14L14 9l6 6zm0 2.828l-6-6L6.828 19H20v-1.172zM8 11a2 2 0 1 1 0-4 2 2 0 0 1 0 4z"}}],Kae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h18v2H3v-2zm8-5h10v2H11v-2zm0-5h10v2H11V9zm-8 3.5L7 9v7l-4-3.5z"}}],Yae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h18v2H3v-2zm8-5h10v2H11v-2zm0-5h10v2H11V9zm-4 3.5L3 16V9l4 3.5z"}}],Xae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zM11 7h2v2h-2V7zm0 4h2v6h-2v-6z"}}],qae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 21v-2h3V5H8V3h8v2h-3v14h3v2H8zM18.05 7.05L23 12l-4.95 4.95-1.414-1.414L20.172 12l-3.536-3.536L18.05 7.05zm-12.1 0l1.414 1.414L3.828 12l3.536 3.536L5.95 16.95 1 12l4.95-4.95z"}}],Zae=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1h-6c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h6zm-1 2h-4v14h4V5zM6 7c2.761 0 5 2.239 5 5s-2.239 5-5 5-5-2.239-5-5 2.239-5 5-5zm1 2H5v1.999L3 11v2l2-.001V15h2v-2.001L9 13v-2l-2-.001V9z"}}],Qae=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M10 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h6zM9 5H5v14h4V5zm9 2c2.761 0 5 2.239 5 5s-2.239 5-5 5-5-2.239-5-5 2.239-5 5-5zm1 2h-2v1.999L15 11v2l2-.001V15h2v-2.001L21 13v-2l-2-.001V9z"}}],Jae=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M12 13c2.761 0 5 2.239 5 5s-2.239 5-5 5-5-2.239-5-5 2.239-5 5-5zm1 2h-2v1.999L9 17v2l2-.001V21h2v-2.001L15 19v-2l-2-.001V15zm7-12c.552 0 1 .448 1 1v6c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h16zM5 5v4h14V5H5z"}}],ele=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 13c.552 0 1 .448 1 1v6c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1v-6c0-.552.448-1 1-1h16zm-1 2H5v4h14v-4zM12 1c2.761 0 5 2.239 5 5s-2.239 5-5 5-5-2.239-5-5 2.239-5 5-5zm1 2h-2v1.999L9 5v2l2-.001V9h2V6.999L15 7V5l-2-.001V3z"}}],tle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 20H7v-2h2.927l2.116-12H9V4h8v2h-2.927l-2.116 12H15z"}}],nle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M11 5H5v14h6V5zm2 0v14h6V5h-6zM4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"}}],rle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 4h10v2H11V4zM6 7v4H4V7H1l4-4 4 4H6zm0 10h3l-4 4-4-4h3v-4h2v4zm5 1h10v2H11v-2zm-2-7h12v2H9v-2z"}}],ole=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17.657 14.828l-1.414-1.414L17.657 12A4 4 0 1 0 12 6.343l-1.414 1.414-1.414-1.414 1.414-1.414a6 6 0 0 1 8.485 8.485l-1.414 1.414zm-2.829 2.829l-1.414 1.414a6 6 0 1 1-8.485-8.485l1.414-1.414 1.414 1.414L6.343 12A4 4 0 1 0 12 17.657l1.414-1.414 1.414 1.414zm0-9.9l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07z"}}],ile=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17.657 14.828l-1.414-1.414L17.657 12A4 4 0 1 0 12 6.343l-1.414 1.414-1.414-1.414 1.414-1.414a6 6 0 0 1 8.485 8.485l-1.414 1.414zm-2.829 2.829l-1.414 1.414a6 6 0 1 1-8.485-8.485l1.414-1.414 1.414 1.414L6.343 12A4 4 0 1 0 12 17.657l1.414-1.414 1.414 1.414zm0-9.9l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07zM5.775 2.293l1.932-.518L8.742 5.64l-1.931.518-1.036-3.864zm9.483 16.068l1.931-.518 1.036 3.864-1.932.518-1.035-3.864zM2.293 5.775l3.864 1.036-.518 1.931-3.864-1.035.518-1.932zm16.068 9.483l3.864 1.035-.518 1.932-3.864-1.036.518-1.931z"}}],sle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 17h5v2h-3v3h-2v-5zM7 7H2V5h3V2h2v5zm11.364 8.536L16.95 14.12l1.414-1.414a5 5 0 1 0-7.071-7.071L9.879 7.05 8.464 5.636 9.88 4.222a7 7 0 0 1 9.9 9.9l-1.415 1.414zm-2.828 2.828l-1.415 1.414a7 7 0 0 1-9.9-9.9l1.415-1.414L7.05 9.88l-1.414 1.414a5 5 0 1 0 7.071 7.071l1.414-1.414 1.415 1.414zm-.708-10.607l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07z"}}],ale=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18.364 15.536L16.95 14.12l1.414-1.414a5 5 0 1 0-7.071-7.071L9.879 7.05 8.464 5.636 9.88 4.222a7 7 0 0 1 9.9 9.9l-1.415 1.414zm-2.828 2.828l-1.415 1.414a7 7 0 0 1-9.9-9.9l1.415-1.414L7.05 9.88l-1.414 1.414a5 5 0 1 0 7.071 7.071l1.414-1.414 1.415 1.414zm-.708-10.607l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07z"}}],lle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 4h10v2H11V4zm0 4h6v2h-6V8zm0 6h10v2H11v-2zm0 4h6v2h-6v-2zM3 4h6v6H3V4zm2 2v2h2V6H5zm-2 8h6v6H3v-6zm2 2v2h2v-2H5z"}}],cle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 4h13v2H8V4zm-5-.5h3v3H3v-3zm0 7h3v3H3v-3zm0 7h3v3H3v-3zM8 11h13v2H8v-2zm0 7h13v2H8v-2z"}}],ule=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 4h13v2H8V4zM5 3v3h1v1H3V6h1V4H3V3h2zM3 14v-2.5h2V11H3v-1h3v2.5H4v.5h2v1H3zm2 5.5H3v-1h2V18H3v-1h3v4H3v-1h2v-.5zM8 11h13v2H8v-2zm0 7h13v2H8v-2z"}}],dle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 4h13v2H8V4zM4.5 6.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0 6.9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zM8 11h13v2H8v-2zm0 7h13v2H8v-2z"}}],hle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.243 4.515l-6.738 6.737-.707 2.121-1.04 1.041 2.828 2.829 1.04-1.041 2.122-.707 6.737-6.738-4.242-4.242zm6.364 3.535a1 1 0 0 1 0 1.414l-7.779 7.779-2.12.707-1.415 1.414a1 1 0 0 1-1.414 0l-4.243-4.243a1 1 0 0 1 0-1.414l1.414-1.414.707-2.121 7.779-7.779a1 1 0 0 1 1.414 0l5.657 5.657zm-6.364-.707l1.414 1.414-4.95 4.95-1.414-1.414 4.95-4.95zM4.283 16.89l2.828 2.829-1.414 1.414-4.243-1.414 2.828-2.829z"}}],fle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm4 12.5v-4l2 2 2-2v4h2v-7h-2l-2 2-2-2H5v7h2zm11-3v-4h-2v4h-2l3 3 3-3h-2z"}}],ple=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm1 2v14h16V5H4zm3 10.5H5v-7h2l2 2 2-2h2v7h-2v-4l-2 2-2-2v4zm11-3h2l-3 3-3-3h2v-4h2v4z"}}],gle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h16zm-9 2H5v5.999h2V9l3 3-3 3v-2H5v6h6v-2h2v2h6v-6h-2v2l-3-3 3-3v1.999h2V5h-6v2h-2V5zm2 8v2h-2v-2h2zm0-4v2h-2V9h2z"}}],mle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M21 20c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h16c.552 0 1 .448 1 1v16zm-2-9V5h-5.999v2H15l-3 3-3-3h2V5H5v6h2v2H5v6h6v-2H9l3-3 3 3h-1.999v2H19v-6h-2v-2h2zm-8 2H9v-2h2v2zm4 0h-2v-2h2v2z"}}],vle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M18 3c1.657 0 3 1.343 3 3s-1.343 3-3 3h-3c-1.306 0-2.417-.834-2.829-2H11c-1.1 0-2 .9-2 2v.171c1.166.412 2 1.523 2 2.829 0 1.306-.834 2.417-2 2.829V15c0 1.1.9 2 2 2h1.17c.412-1.165 1.524-2 2.83-2h3c1.657 0 3 1.343 3 3s-1.343 3-3 3h-3c-1.306 0-2.417-.834-2.829-2H11c-2.21 0-4-1.79-4-4H5c-1.657 0-3-1.343-3-3s1.343-3 3-3h2c0-2.21 1.79-4 4-4h1.17c.412-1.165 1.524-2 2.83-2h3zm0 14h-3c-.552 0-1 .448-1 1s.448 1 1 1h3c.552 0 1-.448 1-1s-.448-1-1-1zM8 11H5c-.552 0-1 .448-1 1s.448 1 1 1h3c.552 0 1-.448 1-1s-.448-1-1-1zm10-6h-3c-.552 0-1 .448-1 1s.448 1 1 1h3c.552 0 1-.448 1-1s-.448-1-1-1z"}}],yle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm14 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-7 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}}],ble=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M10 2c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1H8v2h5V9c0-.552.448-1 1-1h6c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1h-6c-.552 0-1-.448-1-1v-1H8v6h5v-1c0-.552.448-1 1-1h6c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1h-6c-.552 0-1-.448-1-1v-1H7c-.552 0-1-.448-1-1V8H4c-.552 0-1-.448-1-1V3c0-.552.448-1 1-1h6zm9 16h-4v2h4v-2zm0-8h-4v2h4v-2zM9 4H5v2h4V4z"}}],wle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 1.5c1.321 0 2.484.348 3.447.994.963.645 1.726 1.588 2.249 2.778.522 1.19.804 2.625.804 4.257v4.942c0 1.632-.282 3.068-.804 4.257-.523 1.19-1.286 2.133-2.25 2.778-.962.646-2.125.994-3.446.994-1.321 0-2.484-.348-3.447-.994-.963-.645-1.726-1.588-2.249-2.778-.522-1.19-.804-2.625-.804-4.257V9.529c0-1.632.282-3.068.804-4.257.523-1.19 1.286-2.133 2.25-2.778C9.515 1.848 10.678 1.5 12 1.5zm0 2c-.916 0-1.694.226-2.333.655-.637.427-1.158 1.07-1.532 1.92-.412.94-.635 2.108-.635 3.454v4.942c0 1.346.223 2.514.635 3.453.374.851.895 1.494 1.532 1.921.639.429 1.417.655 2.333.655.916 0 1.694-.226 2.333-.655.637-.427 1.158-1.07 1.532-1.92.412-.94.635-2.108.635-3.454V9.529c0-1.346-.223-2.514-.635-3.453-.374-.851-.895-1.494-1.532-1.921C13.694 3.726 12.916 3.5 12 3.5z"}}],xle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14 1.5V22h-2V3.704L7.5 4.91V2.839l5-1.339z"}}],kle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 7.5a4 4 0 1 0-8 0H6a6 6 0 1 1 10.663 3.776l-7.32 8.723L18 20v2H6v-1.127l9.064-10.802A3.982 3.982 0 0 0 16 7.5z"}}],Ele=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18 2v1.362L12.809 9.55a6.501 6.501 0 1 1-7.116 8.028l1.94-.486A4.502 4.502 0 0 0 16.5 16a4.5 4.5 0 0 0-6.505-4.03l-.228.122-.69-1.207L14.855 4 6.5 4V2H18z"}}],Sle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 1.5V16h3v2h-3v4h-2v-4H4v-1.102L14 1.5h2zM14 16V5.171L6.968 16H14z"}}],Cle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18 2v2H9.3l-.677 6.445a6.5 6.5 0 1 1-2.93 7.133l1.94-.486A4.502 4.502 0 0 0 16.5 16a4.5 4.5 0 0 0-4.5-4.5c-2.022 0-3.278.639-3.96 1.53l-1.575-1.182L7.5 2H18z"}}],Tle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14.886 2l-4.438 7.686A6.5 6.5 0 1 1 6.4 12.7L12.576 2h2.31zM12 11.5a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9z"}}],Ale=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 2v1.5L10.763 22H8.574l8.013-18H6V2z"}}],_le=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 1.5a5.5 5.5 0 0 1 3.352 9.86C17.24 12.41 18.5 14.32 18.5 16.5c0 3.314-2.91 6-6.5 6s-6.5-2.686-6.5-6c0-2.181 1.261-4.09 3.147-5.141A5.5 5.5 0 0 1 12 1.5zm0 11c-2.52 0-4.5 1.828-4.5 4 0 2.172 1.98 4 4.5 4s4.5-1.828 4.5-4c0-2.172-1.98-4-4.5-4zm0-9a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7z"}}],Rle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 1.5a6.5 6.5 0 0 1 5.619 9.77l-6.196 10.729H9.114l4.439-7.686A6.5 6.5 0 1 1 12 1.5zm0 2a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9z"}}],Mle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M14 20v-2.157c1.863-1.192 3.5-3.875 3.5-6.959 0-3.073-2-6.029-5.5-6.029s-5.5 2.956-5.5 6.03c0 3.083 1.637 5.766 3.5 6.958V20H3v-2h4.76C5.666 16.505 4 13.989 4 10.884 4 6.247 7.5 3 12 3s8 3.247 8 7.884c0 3.105-1.666 5.621-3.76 7.116H21v2h-7z"}}],Ole=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M15 3c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1h-2v2h4c.552 0 1 .448 1 1v3h2c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1h-6c-.552 0-1-.448-1-1v-4c0-.552.448-1 1-1h2v-2H8v2h2c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1v-4c0-.552.448-1 1-1h2v-3c0-.552.448-1 1-1h4V9H9c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h6zM9 17H5v2h4v-2zm10 0h-4v2h4v-2zM14 5h-4v2h4V5z"}}],Ile=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 21v-4H7v4H5v-5a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v5h-2zM7 3v4h10V3h2v5a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V3h2zM2 9l4 3-4 3V9zm20 0v6l-4-3 4-3z"}}],Lle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 6v15h-2v-5a6 6 0 1 1 0-12h10v2h-3v15h-2V6h-3zm-2 0a4 4 0 1 0 0 8V6z"}}],Nle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12.9 6.858l4.242 4.243L7.242 21H3v-4.243l9.9-9.9zm1.414-1.414l2.121-2.122a1 1 0 0 1 1.414 0l2.829 2.829a1 1 0 0 1 0 1.414l-2.122 2.121-4.242-4.242z"}}],$le=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.728 9.686l-1.414-1.414L5 17.586V19h1.414l9.314-9.314zm1.414-1.414l1.414-1.414-1.414-1.414-1.414 1.414 1.414 1.414zM7.242 21H3v-4.243L16.435 3.322a1 1 0 0 1 1.414 0l2.829 2.829a1 1 0 0 1 0 1.414L7.243 21z"}}],Dle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17.934 3.036l1.732 1L18.531 6H21v2h-2v4h2v2h-2v7h-2v-7h-3.084c-.325 2.862-1.564 5.394-3.37 7.193l-1.562-1.27c1.52-1.438 2.596-3.522 2.917-5.922L10 14v-2l2-.001V8h-2V6h2.467l-1.133-1.964 1.732-1L14.777 6h1.444l1.713-2.964zM5 13.803l-2 .536v-2.071l2-.536V8H3V6h2V3h2v3h2v2H7v3.197l2-.536v2.07l-2 .536V18.5A2.5 2.5 0 0 1 4.5 21H3v-2h1.5a.5.5 0 0 0 .492-.41L5 18.5v-4.697zM17 8h-3v4h3V8z"}}],Ple=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M12 19c.828 0 1.5.672 1.5 1.5S12.828 22 12 22s-1.5-.672-1.5-1.5.672-1.5 1.5-1.5zm0-17c3.314 0 6 2.686 6 6 0 2.165-.753 3.29-2.674 4.923C13.399 14.56 13 15.297 13 17h-2c0-2.474.787-3.695 3.031-5.601C15.548 10.11 16 9.434 16 8c0-2.21-1.79-4-4-4S8 5.79 8 8v1H6V8c0-3.314 2.686-6 6-6z"}}],zle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M21 19v2h-2v-2h2zm-4 0v2h-2v-2h2zm-4 0v2h-2v-2h2zm-4 0v2H7v-2h2zm-4 0v2H3v-2h2zm16-4v2h-2v-2h2zM5 15v2H3v-2h2zm0-4v2H3v-2h2zm11-8c2.687 0 4.882 2.124 4.995 4.783L21 8v5h-2V8c0-1.591-1.255-2.903-2.824-2.995L16 5h-5V3h5zM5 7v2H3V7h2zm0-4v2H3V3h2zm4 0v2H7V3h2z"}}],Fle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M9.683 7.562L12 9.88l6.374-6.375a2 2 0 0 1 2.829 0l.707.707L9.683 16.438a4 4 0 1 1-2.121-2.121L9.88 12 7.562 9.683a4 4 0 1 1 2.121-2.121zM6 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 12a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm9.535-6.587l6.375 6.376-.707.707a2 2 0 0 1-2.829 0l-4.96-4.961 2.12-2.122z"}}],Ble=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M14 3c.552 0 1 .448 1 1v5h5c.552 0 1 .448 1 1v10c0 .552-.448 1-1 1H10c-.552 0-1-.448-1-1v-5H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h10zm-1 2H5v8h4v-3c0-.552.448-1 1-1h3V5z"}}],Hle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M11 3c.552 0 1 .448 1 1v2h5c.552 0 1 .448 1 1v5h2c.552 0 1 .448 1 1v7c0 .552-.448 1-1 1h-7c-.552 0-1-.448-1-1v-2H7c-.552 0-1-.448-1-1v-5H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h7zm5 5h-4v3c0 .552-.448 1-1 1H8v4h4v-3c0-.552.448-1 1-1h3V8z"}}],Ule=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M2 11h2v2H2v-2zm4 0h12v2H6v-2zm14 0h2v2h-2v-2z"}}],Wle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M9.583 17.321C8.553 16.227 8 15 8 13.011c0-3.5 2.457-6.637 6.03-8.188l.893 1.378c-3.335 1.804-3.987 4.145-4.247 5.621.537-.278 1.24-.375 1.929-.311 1.804.167 3.226 1.648 3.226 3.489a3.5 3.5 0 0 1-3.5 3.5c-1.073 0-2.099-.49-2.748-1.179z"}}],Vle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14.417 6.679C15.447 7.773 16 9 16 10.989c0 3.5-2.457 6.637-6.03 8.188l-.893-1.378c3.335-1.804 3.987-4.145 4.247-5.621-.537.278-1.24.375-1.929.311C9.591 12.322 8.17 10.841 8.17 9a3.5 3.5 0 0 1 3.5-3.5c1.073 0 2.099.49 2.748 1.179z"}}],jle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M19 3l4 5h-3v12h-2V8h-3l4-5zm-5 15v2H3v-2h11zm0-7v2H3v-2h11zm-2-7v2H3V4h9z"}}],Gle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 4v12h3l-4 5-4-5h3V4h2zm-8 14v2H3v-2h9zm2-7v2H3v-2h11zm0-7v2H3V4h11z"}}],Kle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 9v4h16V9h2v5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V9h2z"}}],Yle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M17.5 2.5L23 12l-5.5 9.5h-11L1 12l5.5-9.5h11zm-1.153 2H7.653L3.311 12l4.342 7.5h8.694l4.342-7.5-4.342-7.5zM11 15h2v2h-2v-2zm0-8h2v6h-2V7z"}}],Xle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h16zm-9 2H5v14h6v-4h2v4h6V5h-6v4h-2V5zm4 4l3 3-3 3v-2H9v2l-3-3 3-3v2h6V9z"}}],qle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h16zm-1 2H5v5.999L9 11v2H5v6h14v-6h-4v-2l4-.001V5zm-7 1l3 3h-2v6h2l-3 3-3-3h2V9H9l3-3z"}}],Zle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13 9h-2V6H5V4h14v2h-6v3zm0 6v5h-2v-5h2zM3 11h18v2H3v-2z"}}],Qle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17.154 14c.23.516.346 1.09.346 1.72 0 1.342-.524 2.392-1.571 3.147C14.88 19.622 13.433 20 11.586 20c-1.64 0-3.263-.381-4.87-1.144V16.6c1.52.877 3.075 1.316 4.666 1.316 2.551 0 3.83-.732 3.839-2.197a2.21 2.21 0 0 0-.648-1.603l-.12-.117H3v-2h18v2h-3.846zm-4.078-3H7.629a4.086 4.086 0 0 1-.481-.522C6.716 9.92 6.5 9.246 6.5 8.452c0-1.236.466-2.287 1.397-3.153C8.83 4.433 10.271 4 12.222 4c1.471 0 2.879.328 4.222.984v2.152c-1.2-.687-2.515-1.03-3.946-1.03-2.48 0-3.719.782-3.719 2.346 0 .42.218.786.654 1.099.436.313.974.562 1.613.75.62.18 1.297.414 2.03.699z"}}],Jle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 6v13H9V6H3V4h14v2h-6zm8.55 10.58a.8.8 0 1 0-1.32-.36l-1.154.33A2.001 2.001 0 0 1 19 14a2 2 0 0 1 1.373 3.454L18.744 19H21v1h-4v-1l2.55-2.42z"}}],ece=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5.596 4L10.5 9.928 15.404 4H18l-6.202 7.497L18 18.994V19h-2.59l-4.91-5.934L5.59 19H3v-.006l6.202-7.497L3 4h2.596zM21.55 16.58a.8.8 0 1 0-1.32-.36l-1.155.33A2.001 2.001 0 0 1 21 14a2 2 0 0 1 1.373 3.454L20.744 19H23v1h-4v-1l2.55-2.42z"}}],tce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 11h14v2H5z"}}],nce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 7v13H9V7H3V5h12v2h-4zm8.55-.42a.8.8 0 1 0-1.32-.36l-1.154.33A2.001 2.001 0 0 1 19 4a2 2 0 0 1 1.373 3.454L18.744 9H21v1h-4V9l2.55-2.42z"}}],rce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5.596 5l4.904 5.928L15.404 5H18l-6.202 7.497L18 19.994V20h-2.59l-4.91-5.934L5.59 20H3v-.006l6.202-7.497L3 5h2.596zM21.55 6.58a.8.8 0 1 0-1.32-.36l-1.155.33A2.001 2.001 0 0 1 21 4a2 2 0 0 1 1.373 3.454L20.744 9H23v1h-4V9l2.55-2.42z"}}],oce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M13 10v4h6v-4h-6zm-2 0H5v4h6v-4zm2 9h6v-3h-6v3zm-2 0v-3H5v3h6zm2-14v3h6V5h-6zm-2 0H5v3h6V5zM4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"}}],ice=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 8h16V5H4v3zm10 11v-9h-4v9h4zm2 0h4v-9h-4v9zm-8 0v-9H4v9h4zM3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"}}],sce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 5v10H9v-4a4 4 0 1 1 0-8h8v2h-2v10h-2V5h-2zM9 5a2 2 0 1 0 0 4V5zm8 12v-2.5l4 3.5-4 3.5V19H5v-2h12z"}}],lce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 5v10H9v-4a4 4 0 1 1 0-8h8v2h-2v10h-2V5h-2zM9 5a2 2 0 1 0 0 4V5zM7 17h12v2H7v2.5L3 18l4-3.5V17z"}}],cce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7 17h10v-2.5l3.5 3.5-3.5 3.5V19H7v2.5L3.5 18 7 14.5V17zm6-11v9h-2V6H5V4h14v2h-6z"}}],uce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 18h1.5a2.5 2.5 0 1 0 0-5H3v-2h13.5a4.5 4.5 0 1 1 0 9H15v2l-4-3 4-3v2zM3 4h18v2H3V4zm6 14v2H3v-2h6z"}}],dce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13 6v15h-2V6H5V4h14v2z"}}],hce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18.5 10l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16.5 10h2zM10 2v2h6v2h-1.968a18.222 18.222 0 0 1-3.62 6.301 14.864 14.864 0 0 0 2.336 1.707l-.751 1.878A17.015 17.015 0 0 1 9 13.725a16.676 16.676 0 0 1-6.201 3.548l-.536-1.929a14.7 14.7 0 0 0 5.327-3.042A18.078 18.078 0 0 1 4.767 8h2.24A16.032 16.032 0 0 0 9 10.877a16.165 16.165 0 0 0 2.91-4.876L2 6V4h6V2h2zm7.5 10.885L16.253 16h2.492L17.5 12.885z"}}],fce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 15v2a2 2 0 0 0 1.85 1.995L7 19h3v2H7a4 4 0 0 1-4-4v-2h2zm13-5l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16 10h2zm-1 2.885L15.753 16h2.492L17 12.885zM8 2v2h4v7H8v3H6v-3H2V4h4V2h2zm9 1a4 4 0 0 1 4 4v2h-2V7a2 2 0 0 0-2-2h-3V3h3zM6 6H4v3h2V6zm4 0H8v3h2V6z"}}],pce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 3v9a4 4 0 1 0 8 0V3h2v9a6 6 0 1 1-12 0V3h2zM4 20h16v2H4v-2z"}}],gce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 19h16v-7h2v8a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-8h2v7zM14 9v6h-4V9H5l7-7 7 7h-5z"}}],mce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 3.993C3 3.445 3.445 3 3.993 3h16.014c.548 0 .993.445.993.993v16.014a.994.994 0 0 1-.993.993H3.993A.994.994 0 0 1 3 20.007V3.993zM5 5v14h14V5H5zm5.622 3.415l4.879 3.252a.4.4 0 0 1 0 .666l-4.88 3.252a.4.4 0 0 1-.621-.332V8.747a.4.4 0 0 1 .622-.332z"}}],vce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 21v-2h3.662l1.234-7H5v-2h3.249l.881-5H4V3h16v2h-8.839l-.882 5H18v9h3v2H3zm13-9H9.927l-1.235 7H16v-7z"}}];const yce=Object.freeze(Object.defineProperty({__proto__:null,ab:Lse,addFill:Nse,addLine:$se,alertLine:Dse,alignBottom:Pse,alignCenter:zse,alignJustify:Fse,alignLeft:Bse,alignRight:Hse,alignTop:Use,alignVertically:Wse,appsLine:Vse,arrowDownSFill:jse,arrowGoBackFill:Gse,arrowGoForwardFill:Kse,arrowLeftSFill:Yse,arrowRightSFill:Xse,arrowUpSFill:qse,asterisk:Zse,attachment2:Qse,bold:Jse,bracesLine:eae,bringForward:tae,bringToFront:nae,chatNewLine:rae,checkboxCircleLine:oae,checkboxMultipleLine:iae,clipboardFill:sae,clipboardLine:aae,closeCircleLine:lae,closeFill:cae,closeLine:uae,codeLine:dae,codeView:hae,deleteBinFill:fae,deleteBinLine:pae,deleteColumn:gae,deleteRow:mae,doubleQuotesL:vae,doubleQuotesR:yae,download2Fill:bae,dragDropLine:wae,emphasis:kae,emphasisCn:xae,englishInput:Eae,errorWarningLine:Sae,externalLinkFill:Cae,fileCopyLine:Tae,flowChart:Aae,fontColor:_ae,fontSize:Mae,fontSize2:Rae,formatClear:Oae,fullscreenExitLine:Iae,fullscreenLine:Lae,functions:Nae,galleryUploadLine:$ae,h1:Dae,h2:Pae,h3:zae,h4:Fae,h5:Bae,h6:Hae,hashtag:Uae,heading:Wae,imageAddLine:Vae,imageEditLine:jae,imageLine:Gae,indentDecrease:Kae,indentIncrease:Yae,informationLine:Xae,inputCursorMove:qae,insertColumnLeft:Zae,insertColumnRight:Qae,insertRowBottom:Jae,insertRowTop:ele,italic:tle,layoutColumnLine:nle,lineHeight:rle,link:ale,linkM:ole,linkUnlink:sle,linkUnlinkM:ile,listCheck:cle,listCheck2:lle,listOrdered:ule,listUnordered:dle,markPenLine:hle,markdownFill:fle,markdownLine:ple,mergeCellsHorizontal:gle,mergeCellsVertical:mle,mindMap:vle,moreFill:yle,nodeTree:ble,number0:wle,number1:xle,number2:kle,number3:Ele,number4:Sle,number5:Cle,number6:Tle,number7:Ale,number8:_le,number9:Rle,omega:Mle,organizationChart:Ole,pageSeparator:Ile,paragraph:Lle,pencilFill:Nle,pencilLine:$le,pinyinInput:Dle,questionMark:Ple,roundedCorner:zle,scissorsFill:Fle,sendBackward:Ble,sendToBack:Hle,separator:Ule,singleQuotesL:Wle,singleQuotesR:Vle,sortAsc:jle,sortDesc:Gle,space:Kle,spamLine:Yle,splitCellsHorizontal:Xle,splitCellsVertical:qle,strikethrough:Qle,strikethrough2:Zle,subscript:ece,subscript2:Jle,subtractLine:tce,superscript:rce,superscript2:nce,table2:oce,tableLine:ice,text:dce,textDirectionL:sce,textDirectionR:lce,textSpacing:cce,textWrap:uce,translate:fce,translate2:hce,underline:pce,upload2Fill:gce,videoLine:mce,wubiInput:vce},Symbol.toStringTag,{value:"Module"}));function bce(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),l=!1,a=s;if(!s)return!1;if(s.depth>=2&&o.node(s.depth-1).type.compatibleContent(t)&&s.startIndex==0){if(o.index(s.depth-1)==0)return!1;let c=n.doc.resolve(s.start-2);a=new Ya(c,c,s.depth),s.endIndex=0;c--)i=Q.from(n[c].type.create(n[c].attrs,i));t.step(new qt(e.start-(r?2:0),e.end,e.start,e.end,new ae(i,0,0),n.length,!0));let s=0;for(let c=0;cs.childCount>0&&s.firstChild.type==t);return i?n?r.node(i.depth-1).type==t?kce(e,n,t,i):Ece(e,n,i):!0:!1}}function kce(t,e,n,r){let o=t.tr,i=r.end,s=r.$to.end(r.depth);ig;p--)f-=o.child(p).nodeSize,r.delete(f-1,f+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let l=n.startIndex==0,a=n.endIndex==o.childCount,u=i.node(-1),c=i.index(-1);if(!u.canReplace(c+(l?0:1),c+1,s.content.append(a?Q.empty:Q.from(o))))return!1;let d=i.pos,h=d+s.nodeSize;return r.step(new qt(d-(l?1:0),h+(a?1:0),d+1,h-1,new ae((l?Q.empty:Q.from(o.copy(Q.empty))).append(a?Q.empty:Q.from(o.copy(Q.empty))),l?0:1,a?0:1),l?0:1)),e(r.scrollIntoView()),!0}var Sce=Object.defineProperty,Cce=Object.getOwnPropertyDescriptor,So=(t,e,n,r)=>{for(var o=r>1?void 0:r?Cce(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&Sce(e,n,o),o};function Qy(t){var e;return!!((e=t.spec.group)!=null&&e.includes(Ee.ListContainerNode))}function Tce(t){var e;return!!((e=t.spec.group)!=null&&e.includes(Ee.ListItemNode))}function Ys(t){return Qy(t.type)}function zs(t){return Tce(t.type)}function Ux(t,e){return n=>{const{dispatch:r,tr:o}=n,i=Mb(o,n.state),{$from:s,$to:l}=o.selection,a=s.blockRange(l);if(!a)return!1;const u=Hh({predicate:c=>Qy(c.type),selection:o.selection});if(u&&a.depth-u.depth<=1&&a.startIndex===0){if(u.node.type===t)return vN(e)(n);if(Qy(u.node.type))return t.validContent(u.node.content)?(r==null||r(o.setNodeMarkup(u.pos,t)),!0):Ace(o,u,t,e)?(r==null||r(o.scrollIntoView()),!0):!1}return bce(t)(i,r)}}function gN(t,e=["checked"]){return function({tr:n,dispatch:r,state:o}){var i,s;const l=Kz(t,o.schema),{$from:a,$to:u}=n.selection;if(Wh(n.selection)&&n.selection.node.isBlock||a.depth<2||!a.sameParent(u))return!1;const c=a.node(-1);if(c.type!==l)return!1;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==l||a.index(-2)!==a.node(-2).childCount-1)return!1;if(r){const g=a.index(-1)>0;let m=Q.empty;for(let b=a.depth-(g?1:2);b>=a.depth-3;b--)m=Q.from(a.node(b).copy(m));const v=((i=l.contentMatch.defaultType)==null?void 0:i.createAndFill())||void 0;m=m.append(Q.from(l.createAndFill(null,v)||void 0));const y=a.indexAfter(-1)!e.includes(g))),h=u.pos===a.end()?c.contentMatchAt(0).defaultType:null,f={...a.node().attrs};n.delete(a.pos,u.pos);const p=h?[{type:l,attrs:d},{type:h,attrs:f}]:[{type:l,attrs:d}];return gc(n.doc,a.pos,2)?(r&&r(n.split(a.pos,2,p).scrollIntoView()),!0):!1}}function Ace(t,e,n,r){const o=e.node,i=t.doc.resolve(e.start),s=i.node(-1),l=i.index(-1);if(!s||!s.canReplace(l,l+1,Q.from(n.create())))return!1;const a=[];for(let f=0;fm;g--)p-=o.child(g).nodeSize,r.delete(p-1,p+1);const s=r.doc.resolve(n.start),l=s.nodeAfter;if(!l||r.mapping.slice(i).map(n.end)!==n.start+l.nodeSize)return!1;const a=n.startIndex===0,u=n.endIndex===o.childCount,c=s.node(-1),d=s.index(-1);if(!c.canReplace(d+(a?0:1),d+1,l.content.append(u?Q.empty:Q.from(o))))return!1;const h=s.pos,f=h+l.nodeSize;return r.step(new qt(h-(a?1:0),f+(u?1:0),h+1,f-1,new ae((a?Q.empty:Q.from(o.copy(Q.empty))).append(u?Q.empty:Q.from(o.copy(Q.empty))),a?0:1,u?0:1),a?0:1)),e(r.scrollIntoView()),!0}function mN(t,e){const n=e||t.selection.$from;let r=[],o,i,s,l;for(let u=n.depth;u>=0;u--){if(i=n.node(u),o=n.index(u),s=i.maybeChild(o-1),l=i.maybeChild(o),s&&l&&s.type.name===l.type.name&&Ys(s)){const c=n.before(u+1);r.push(c)}if(o=n.indexAfter(u),s=i.maybeChild(o-1),l=i.maybeChild(o),s&&l&&s.type.name===l.type.name&&Ys(s)){const c=n.after(u+1);r.push(c)}}r=[...new Set(r)].sort((u,c)=>c-u);let a=!1;for(const u of r)zh(t.doc,u)&&(t.join(u),a=!0);return a}function vN(t){return e=>{const{dispatch:n,tr:r}=e,o=Mb(r,e.state),i=Mce(t,r.selection);return i?(n&&Rce(o,n,i),!0):!1}}function Mce(t,e){const{$from:n,$to:r}=e;return n.blockRange(r,i=>{var s;return((s=i.firstChild)==null?void 0:s.type)===t})}function Hg(t){const{$from:e,$to:n}=t;return e.blockRange(n,Ys)}function Oce(t){const e=t.selection.$from,n=e.blockRange();if(!n||!zs(n.parent)||n.startIndex!==0)return!1;const r=e.node(n.depth-2),o=e.index(n.depth),i=e.index(n.depth-1),s=e.index(n.depth-2),l=r.maybeChild(s-1),a=l==null?void 0:l.lastChild;if(o!==0||i!==0)return!1;if(l&&Ys(l)&&a&&zs(a))return tu({listType:l.type,itemType:a.type,tr:t});if(zs(r)){const u=r,c=e.node(n.depth-3);if(Ys(c))return tu({listType:c.type,itemType:u.type,tr:t})}return!1}function a_({view:t}){if(!t)return!1;{const e=t.state.selection.$cursor;if(!e||e.parentOffset>0)return!1;const n=e.blockRange();if(!n||!zs(n.parent)||n.startIndex!==0)return!1}{const e=t.state.tr;Oce(e)&&t.dispatch(e)}{const e=t.state.selection.$cursor;if(!e||e.parentOffset>0)return!1;const n=e.blockRange();if(!n||!zs(n.parent)||n.startIndex!==0)return!1;const r=e.index(n.depth),o=e.index(n.depth-1),i=e.index(n.depth-2),s=n.depth-2>=1&&zs(e.node(n.depth-2));r===0&&o===0&&i<=1&&s&&xce(n.parent.type)(t.state,t.dispatch)}return X2(t.state,t.dispatch,t),!0}function yN({node:t,mark:e,updateDOM:n,updateMark:r}){const o=document.createElement("label");o.contentEditable="false",o.classList.add(js.LIST_ITEM_MARKER_CONTAINER),o.append(e);const i=document.createElement("div"),s=document.createElement("li");s.classList.add(js.LIST_ITEM_WITH_CUSTOM_MARKER),s.append(o),s.append(i);const l=a=>a.type!==t.type?!1:(t=a,n(t,s),r(t,e),!0);return l(t),{dom:s,contentDOM:i,update:l}}function Ice(t,e){const n=t.node(e.depth-1),r=t.node(e.depth-2);return!zs(n)||!Ys(r)?!1:{parentItem:n,parentList:r}}function Lce(t,e){const n=e.parent,r=e.parent.child(e.endIndex-1),o=e.end,i=e.$to.end(e.depth);return oDce(t)?(e==null||e(t.scrollIntoView()),!0):!1;function zce(t,e,n){let r,o,i,s;const l=e.doc;if(n.startIndex>=1){r=t.child(n.startIndex-1),o=t,s=l.resolve(n.start).start(n.depth),i=s+1;for(let a=0;a=1){const u=e.node(n.depth-1),c=e.start(n.depth-1);if(o=u.child(a-1),!Ys(o))return!1;s=c+1;for(let d=0;d=n.depth+2?e.end(n.depth+2):n.end-1,l=n.end;return s+1>=l?(r=t.slice(i,l),o=null):(r=t.slice(i,s),o=t.slice(s+1,l-1)),{selectedSlice:r,unselectedSlice:o}}function Bce(t){const{$from:e,$to:n}=t.selection,r=Hg(t.selection);if(!r)return!1;const o=t.doc.resolve(r.start).node();if(!Ys(o))return!1;const i=zce(o,e,r);if(!i)return!1;const{previousItem:s,previousList:l,previousItemStart:a}=i,{selectedSlice:u,unselectedSlice:c}=Fce(t.doc,n,r),d=s.content.append(Q.fromArray([o.copy(u.content)])).append(c?c.content:Q.empty);t.deleteRange(r.start,r.end);const h=a+s.nodeSize-2,f=s.copy(d);return f.check(),t.replaceRangeWith(a-1,h+1,f),t.setSelection(l===o?Ie.between(t.doc.resolve(e.pos),t.doc.resolve(n.pos)):Ie.between(t.doc.resolve(e.pos-2),t.doc.resolve(n.pos-2))),!0}var Hce=({tr:t,dispatch:e})=>Bce(t)?(e==null||e(t.scrollIntoView()),!0):!1,bN=class extends yt{get name(){return"listItemShared"}createKeymap(){const t={Tab:Hce,"Shift-Tab":Pce,Backspace:a_,"Mod-Backspace":a_};if(Br.isMac){const e={"Ctrl-h":t.Backspace,"Alt-Backspace":t["Mod-Backspace"]};return{...t,...e}}return t}createPlugin(){return{appendTransaction:(t,e,n)=>{const r=n.tr;return mN(r)?r:null}}}},ul=class extends Pn{get name(){return"listItem"}createTags(){return[Ee.ListItemNode]}createNodeSpec(t,e){return{content:"paragraph block*",defining:!0,draggable:!1,...e,attrs:{...t.defaults(),closed:{default:!1},nested:{default:!1}},parseDOM:[{tag:"li",getAttrs:t.parse,priority:dt.Lowest},...e.parseDOM??[]],toDOM:n=>["li",t.dom(n),0]}}createNodeViews(){return this.options.enableCollapsible?(t,e,n)=>{const r=document.createElement("div");return r.classList.add(js.COLLAPSIBLE_LIST_ITEM_BUTTON),r.contentEditable="false",r.addEventListener("click",()=>{if(r.classList.contains("disabled"))return;const o=n(),i=Le.create(e.state.doc,o);return e.dispatch(e.state.tr.setSelection(i)),this.store.commands.toggleListItemClosed(),!0}),yN({mark:r,node:t,updateDOM:Uce,updateMark:Wce})}:{}}createKeymap(){return{Enter:gN(this.type)}}createExtensions(){return[new bN]}toggleListItemClosed(t){return({state:{tr:e,selection:n},dispatch:r})=>{if(!Wh(n)||n.node.type.name!==this.name)return!1;const{node:o,from:i}=n;return t=h0(t)?t:!o.attrs.closed,r==null||r(e.setNodeMarkup(i,void 0,{...o.attrs,closed:t})),!0}}liftListItemOutOfList(t){return vN(t??this.type)}};So([de()],ul.prototype,"toggleListItemClosed",1);So([de()],ul.prototype,"liftListItemOutOfList",1);ul=So([Pe({defaultOptions:{enableCollapsible:!1},staticKeys:["enableCollapsible"]})],ul);function Uce(t,e){t.attrs.closed?e.classList.add(js.COLLAPSIBLE_LIST_ITEM_CLOSED):e.classList.remove(js.COLLAPSIBLE_LIST_ITEM_CLOSED)}function Wce(t,e){t.childCount<=1?e.classList.add("disabled"):e.classList.remove("disabled")}var Sh=class extends Pn{get name(){return"bulletList"}createTags(){return[Ee.Block,Ee.ListContainerNode]}createNodeSpec(t,e){return{content:"listItem+",...e,attrs:t.defaults(),parseDOM:[{tag:"ul",getAttrs:t.parse},...e.parseDOM??[]],toDOM:n=>["ul",t.dom(n),0]}}createNodeViews(){return this.options.enableSpine?(t,e,n)=>{var r;const o=document.createElement("div");o.style.position="relative";const i=n(),s=e.state.doc.resolve(i+1),l=s.node(s.depth-1);if(!(((r=l==null?void 0:l.type)==null?void 0:r.name)!=="listItem")){const c=document.createElement("div");c.contentEditable="false",c.classList.add(js.LIST_SPINE),c.addEventListener("click",d=>{const h=n(),f=e.state.doc.resolve(h+1),p=f.start(f.depth-1),g=Le.create(e.state.doc,p-1);e.dispatch(e.state.tr.setSelection(g)),this.store.commands.toggleListItemClosed(),d.preventDefault(),d.stopPropagation()}),o.append(c)}const u=document.createElement("ul");return u.classList.add(js.UL_LIST_CONTENT),o.append(u),{dom:o,contentDOM:u}}:{}}createExtensions(){return[new ul({priority:dt.Low,enableCollapsible:this.options.enableSpine})]}toggleBulletList(){return Ux(this.type,Ot(this.store.schema.nodes,"listItem"))}listShortcut(t){return this.toggleBulletList()(t)}createInputRules(){const t=/^\s*([*+-])\s$/;return[am(t,this.type),new ml(t,(e,n,r,o)=>{const i=e.tr;return i.deleteRange(r,o),tu({listType:this.type,itemType:Ot(this.store.schema.nodes,"listItem"),tr:i})?i:null})]}};So([de({icon:"listUnordered",label:({t})=>t(bb.BULLET_LIST_LABEL)})],Sh.prototype,"toggleBulletList",1);So([nn({shortcut:oe.BulletList,command:"toggleBulletList"})],Sh.prototype,"listShortcut",1);Sh=So([Pe({defaultOptions:{enableSpine:!1},staticKeys:["enableSpine"]})],Sh);var Ch=class extends Pn{get name(){return"orderedList"}createTags(){return[Ee.Block,Ee.ListContainerNode]}createNodeSpec(t,e){return{content:"listItem+",...e,attrs:{...t.defaults(),order:{default:1}},parseDOM:[{tag:"ol",getAttrs:n=>zt(n)?{...t.parse(n),order:+(n.getAttribute("start")??1)}:{}},...e.parseDOM??[]],toDOM:n=>{const r=t.dom(n);return n.attrs.order===1?["ol",r,0]:["ol",{...r,start:n.attrs.order},0]}}}createExtensions(){return[new ul({priority:dt.Low})]}toggleOrderedList(){return Ux(this.type,Ot(this.store.schema.nodes,"listItem"))}listShortcut(t){return this.toggleOrderedList()(t)}createInputRules(){const t=/^(\d+)\.\s$/;return[am(t,this.type,e=>({order:+Ot(e,1)}),(e,n)=>n.childCount+n.attrs.order===+Ot(e,1)),new ml(t,(e,n,r,o)=>{const i=e.tr;if(i.deleteRange(r,o),!tu({listType:this.type,itemType:Ot(this.store.schema.nodes,"listItem"),tr:i}))return null;const l=+Ot(n,1);if(l!==1){const a=hi({selection:i.selection,types:this.type});a&&i.setNodeMarkup(a.pos,void 0,{order:l})}return i})]}};So([de({icon:"listOrdered",label:({t})=>t(bb.ORDERED_LIST_LABEL)})],Ch.prototype,"toggleOrderedList",1);So([nn({shortcut:oe.OrderedList,command:"toggleOrderedList"})],Ch.prototype,"listShortcut",1);Ch=So([Pe({})],Ch);var wN=class extends Pn{get name(){return"taskListItem"}createTags(){return[Ee.ListItemNode]}createNodeSpec(t,e){return{content:"paragraph block*",defining:!0,draggable:!1,...e,attrs:{...t.defaults(),checked:{default:!1}},parseDOM:[{tag:"li[data-task-list-item]",getAttrs:n=>{let r=!1;return zt(n)&&n.getAttribute("data-checked")!==null&&(r=!0),{checked:r,...t.parse(n)}},priority:dt.Medium},...e.parseDOM??[]],toDOM:n=>["li",{...t.dom(n),"data-task-list-item":"","data-checked":n.attrs.checked?"":void 0},0]}}createNodeViews(){return(t,e,n)=>{const r=document.createElement("input");return r.type="checkbox",r.classList.add(js.LIST_ITEM_CHECKBOX),r.contentEditable="false",r.addEventListener("click",o=>{e.editable||o.preventDefault()}),r.addEventListener("change",()=>{const o=n(),i=e.state.doc.resolve(o+1);this.store.commands.toggleCheckboxChecked({$pos:i})}),r.checked=t.attrs.checked,yN({node:t,mark:r,updateDOM:Vce,updateMark:jce})}}createKeymap(){return{Enter:gN(this.type)}}createExtensions(){return[new bN]}toggleCheckboxChecked(t){let e,n;return typeof t=="boolean"?e=t:t&&(e=t.checked,n=t.$pos),({tr:r,dispatch:o})=>{const i=hi({selection:n??r.selection.$from,types:this.type});if(!i)return!1;const{node:s,pos:l}=i,a={...s.attrs,checked:e??!s.attrs.checked};return o==null||o(r.setNodeMarkup(l,void 0,a)),!0}}createInputRules(){const t=/^\s*(\[( ?|x|X)]\s)$/;return[am(t,this.type,e=>({checked:["x","X"].includes(yc(e,2))})),new ml(t,(e,n,r,o)=>{const i=e.tr;if(i.deleteRange(r,o),!tu({listType:Ot(this.store.schema.nodes,"taskList"),itemType:this.type,tr:i}))return null;const l=["x","X"].includes(yc(n,2));if(l){const a=hi({selection:i.selection,types:this.type});a&&i.setNodeMarkup(a.pos,void 0,{checked:l})}return i})]}};So([de()],wN.prototype,"toggleCheckboxChecked",1);function Vce(t,e){t.attrs.checked?e.setAttribute("data-checked",""):e.removeAttribute("data-checked"),e.setAttribute("data-task-list-item","")}function jce(t,e){e.checked=!!t.attrs.checked}var xN=class extends Pn{get name(){return"taskList"}createTags(){return[Ee.Block,Ee.ListContainerNode]}createNodeSpec(t,e){return{content:"taskListItem+",...e,attrs:t.defaults(),parseDOM:[{tag:"ul[data-task-list]",getAttrs:t.parse,priority:dt.Medium},...e.parseDOM??[]],toDOM:n=>["ul",{...t.dom(n),"data-task-list":""},0]}}createExtensions(){return[new wN({})]}toggleTaskList(){return Ux(this.type,Ot(this.store.schema.nodes,"taskListItem"))}listShortcut(t){return this.toggleTaskList()(t)}};So([de({icon:"checkboxMultipleLine",label:({t})=>t(bb.TASK_LIST_LABEL)})],xN.prototype,"toggleTaskList",1);So([nn({shortcut:oe.TaskList,command:"toggleTaskList"})],xN.prototype,"listShortcut",1);var Ko,Gce=(t=document)=>Ko||(Ko=t.createElement("div"),Ko.setAttribute("id","a11y-status-message"),Ko.setAttribute("role","status"),Ko.setAttribute("aria-live","polite"),Ko.setAttribute("aria-relevant","additions text"),Object.assign(Ko.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),t.body.append(Ko),Ko);rR(500,()=>{Gce().textContent=""});function l_(t){return typeof t=="object"&&t!=null&&t.nodeType===1}function c_(t,e){return(!e||t!=="hidden")&&t!=="visible"&&t!=="clip"}function Q1(t,e){if(t.clientHeighte||i>t&&s=e&&l>=n?i-t-r:s>e&&ln?s-e+o:0}var Kce=function(t,e){var n=window,r=e.scrollMode,o=e.block,i=e.inline,s=e.boundary,l=e.skipOverflowHiddenElements,a=typeof s=="function"?s:function(Me){return Me!==s};if(!l_(t))throw new TypeError("Invalid target");for(var u,c,d=document.scrollingElement||document.documentElement,h=[],f=t;l_(f)&&a(f);){if((f=(c=(u=f).parentElement)==null?u.getRootNode().host||null:c)===d){h.push(f);break}f!=null&&f===document.body&&Q1(f)&&!Q1(document.documentElement)||f!=null&&Q1(f,l)&&h.push(f)}for(var p=n.visualViewport?n.visualViewport.width:innerWidth,g=n.visualViewport?n.visualViewport.height:innerHeight,m=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,y=t.getBoundingClientRect(),b=y.height,w=y.width,k=y.top,x=y.right,S=y.bottom,T=y.left,C=o==="start"||o==="nearest"?k:o==="end"?S:k+b/2,O=i==="center"?T+w/2:i==="end"?x:T,_=[],R=0;R=0&&T>=0&&S<=g&&x<=p&&k>=N&&S<=$&&T>=D&&x<=L)return _;var F=getComputedStyle(A),U=parseInt(F.borderLeftWidth,10),W=parseInt(F.borderTopWidth,10),B=parseInt(F.borderRightWidth,10),H=parseInt(F.borderBottomWidth,10),V=0,Y=0,X="offsetWidth"in A?A.offsetWidth-A.clientWidth-U-B:0,Z="offsetHeight"in A?A.offsetHeight-A.clientHeight-W-H:0,te="offsetWidth"in A?A.offsetWidth===0?0:I/A.offsetWidth:0,ce="offsetHeight"in A?A.offsetHeight===0?0:M/A.offsetHeight:0;if(d===A)V=o==="start"?C:o==="end"?C-g:o==="nearest"?qf(v,v+g,g,W,H,v+C,v+C+b,b):C-g/2,Y=i==="start"?O:i==="center"?O-p/2:i==="end"?O-p:qf(m,m+p,p,U,B,m+O,m+O+w,w),V=Math.max(0,V+v),Y=Math.max(0,Y+m);else{V=o==="start"?C-N-W:o==="end"?C-$+H+Z:o==="nearest"?qf(N,$,M,W,H+Z,C,C+b,b):C-(N+M/2)+Z/2,Y=i==="start"?O-D-U:i==="center"?O-(D+I/2)+X/2:i==="end"?O-L+B+X:qf(D,L,I,U,B+X,O,O+w,w);var Ne=A.scrollLeft,ye=A.scrollTop;C+=ye-(V=Math.max(0,Math.min(ye+V/ce,A.scrollHeight-M/ce+Z))),O+=Ne-(Y=Math.max(0,Math.min(Ne+Y/te,A.scrollWidth-I/te+X)))}_.push({el:A,top:V,left:Y})}return _};typeof rr=="object"&&rr.__esModule&&rr.default&&rr.default;im(Kce);var Yce=typeof document<"u"?P.useLayoutEffect:P.useEffect;function Xce(t){const e=P.useRef();return Yce(()=>{e.current=t}),e.current}function qce(t,e){const[n,r]=P.useState([]),[o,i]=P.useState(()=>H0(t)),[s,l]=P.useState([]),a=P.useRef(t),u=Xce(o);return a.current=t,Jh(Fc,({addCustomHandler:c})=>{const d=H0(a.current),h=c("positioner",d);return i(d),h},e),P.useLayoutEffect(()=>{const c=o.addListener("update",h=>{const f=[];for(const{id:p,data:g,setElement:m}of h){const v=y=>{y&&m(y)};f.push({id:p,data:g,ref:v})}l(f)}),d=o.addListener("done",h=>{r(h)});return u!=null&&u.recentUpdate&&o.onActiveChanged(u==null?void 0:u.recentUpdate),()=>{c(),d()}},[o,u]),P.useMemo(()=>{const c=[];for(const[d,{ref:h,data:f,id:p}]of s.entries()){const g=n[d],{element:m,position:v={}}=g??{},y={...Sm,...aR(v)};c.push({ref:h,element:m,data:f,key:p,...y})}return c},[s,n])}function kN(t,e){const n=e==null||h0(e)?[t]:e,r=h0(e)?e:!0,o=P.useRef(Rc()),s=qce(t,n)[0];return P.useMemo(()=>s&&r?{...s,active:!0}:{...Sm,ref:void 0,data:{},active:!1,key:o.current},[r,s])}function J1(t,e){return tt(t)?t(e):t}function Zce(t){return ke(t[0])}function Qce(t,e){var n;return ke(t)?t:Bt(t)?Zce(t)?t[0]??"":((n=t.find(r=>lR(r.attrs,e))??t[0])==null?void 0:n.shortcut)??"":t.shortcut}var Jce={title:t=>cD(t),upper:t=>t.toLocaleUpperCase(),lower:t=>t.toLocaleLowerCase()};function eue(t,e){const{casing:n="title",namedAsSymbol:r=!1,modifierAsSymbol:o=!0,separator:i=" ",t:s}=e,l=CF(t),a=[],u=Jce[n];for(const c of l){if(c.type==="char"){a.push(u(c.key));continue}if(c.type==="named"){const h=r===!0||Bt(r)&&sr(r,c.key)?c.symbol??s(c.i18n):s(c.i18n);a.push(u(h));continue}const d=o===!0||Bt(o)&&sr(o,c.key)?c.symbol:s(c.i18n);a.push(u(d))}return a.join(i)}var EN=({commandName:t,active:e,enabled:n,attrs:r})=>{const{t:o}=cQ(),{getCommandOptions:i}=ef(),s=i(t),{description:l,label:a,icon:u,shortcut:c}=s||{},d=P.useMemo(()=>({active:e,attrs:r,enabled:n,t:o}),[e,r,n,o]),h=P.useMemo(()=>{if(c)return eue(Qce(c,r??{}),{t:o,separator:""})},[c,r,o]);return P.useMemo(()=>({description:J1(l,d),label:J1(a,d),icon:J1(u,d),shortcut:h}),[d,l,a,u,h])},tue={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},SN=P.createContext(tue);SN.Provider;function CN(t){return t.map((e,n)=>P.createElement(e.tag,{key:n,...e.attr},CN(e.child??[])))}var Cv=t=>{const{name:e}=t;return ee.createElement(nue,{...t},CN(yce[e]))},nue=t=>{const e=n=>{const r=t.size??n.size??"1em";let o;n.className&&(o=n.className),t.className&&(o=(o?`${o} `:"")+t.className);const{title:i,...s}=t;return ee.createElement("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",...n.attr,...s,className:o,style:{color:t.color??n.color,...n.style,...t.style},height:r,width:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},i&&ee.createElement("title",null,i),t.children)};return ee.createElement(SN.Consumer,null,e)},rue=t=>Zs(t)?!!t.name:!1,oue=({icon:t})=>ke(t)?ee.createElement(Cv,{name:t,size:"1rem"}):t,iue=({icon:t,children:e})=>{if(!rue(t))return ee.createElement(ee.Fragment,null,e);const{sub:n,sup:r}=t,o=n??r,i=n!==void 0;return o===void 0?ee.createElement(ee.Fragment,null,e):ee.createElement(iie,{anchorOrigin:{vertical:i?"bottom":"top",horizontal:"right"},badgeContent:o,sx:{"& > .MuiBadge-badge":{bgcolor:"background.paper",color:"text.secondary",minWidth:12,height:12,margin:"2px 0",padding:"1px"}}},e)},It=({commandName:t,active:e=!1,enabled:n,attrs:r,onSelect:o,onChange:i,icon:s,displayShortcut:l=!0,"aria-label":a,label:u,...c})=>{const d=P.useCallback((y,b)=>{o(),i==null||i(y,b)},[o,i]),h=P.useCallback(y=>{y.preventDefault()},[]),f=EN({commandName:t,active:e,enabled:n,attrs:r});let p=null;f.icon&&(p=ke(f.icon)?f.icon:f.icon.name);const g=a??f.label??"",m=u??g,v=l&&f.shortcut?` (${f.shortcut})`:"";return ee.createElement(pN,{title:`${m}${v}`},ee.createElement(uN,{component:"span",sx:{"&:not(:first-of-type)":{marginLeft:"-1px"}}},ee.createElement(Ise,{"aria-label":g,selected:e,disabled:!n,onMouseDown:h,color:"primary",size:"small",sx:{padding:"6px 12px","&.Mui-selected":{backgroundColor:"primary.main",color:"primary.contrastText"},"&.Mui-selected:hover":{backgroundColor:"primary.dark",color:"primary.contrastText"},"&:not(:first-of-type)":{borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},"&:not(:last-of-type)":{borderTopRightRadius:0,borderBottomRightRadius:0}},...c,value:t,onChange:d},ee.createElement(iue,{icon:f.icon},ee.createElement(oue,{icon:s??p})))))},sue=({icon:t})=>ke(t)?ee.createElement(Cv,{name:t,size:"1rem"}):t,TN=({label:t,"aria-label":e,icon:n,children:r,onClose:o,...i})=>{const s=P.useRef(Rc()),[l,a]=P.useState(null),u=!!l,c=P.useCallback(f=>{f.preventDefault()},[]),d=P.useCallback(f=>{a(f.currentTarget)},[]),h=P.useCallback((f,p)=>{a(null),o==null||o(f,p)},[o]);return ee.createElement(ee.Fragment,null,ee.createElement(pN,{title:t??e},ee.createElement(Gne,{"aria-label":e,"aria-controls":u?s.current:void 0,"aria-haspopup":!0,"aria-expanded":u?"true":void 0,onMouseDown:c,onClick:d,size:"small",sx:f=>({border:`1px solid ${f.palette.divider}`,borderRadius:`${f.shape.borderRadius}px`,padding:"6px 12px","&:not(:first-of-type)":{marginLeft:"-1px",borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},"&:not(:last-of-type)":{borderTopRightRadius:0,borderBottomRightRadius:0}})},n&&ee.createElement(sue,{icon:n}),ee.createElement(Cv,{name:"arrowDownSFill",size:"1rem"}))),ee.createElement(lse,{...i,id:s.current,anchorEl:l,open:u,onClose:h},r))},aue=t=>{const{insertHorizontalRule:e}=kn();ax();const n=P.useCallback(()=>{e.enabled()&&e()},[e]),r=e.enabled();return ee.createElement(It,{...t,commandName:"insertHorizontalRule",enabled:r,onSelect:n})},lue=t=>{const{redo:e}=kn(),{redoDepth:n}=ef(!0),r=P.useCallback(()=>{e.enabled()&&e()},[e]),o=n()>0;return ee.createElement(It,{...t,commandName:"redo",active:!1,enabled:o,onSelect:r})},cue=t=>{const{toggleBlockquote:e}=kn(),n=P.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().blockquote(),o=e.enabled();return ee.createElement(It,{...t,commandName:"toggleBlockquote",active:r,enabled:o,onSelect:n})},Wx=t=>{const{toggleBold:e}=kn(),n=P.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().bold(),o=e.enabled();return ee.createElement(It,{...t,commandName:"toggleBold",active:r,enabled:o,onSelect:n})},uue=t=>{const{toggleBulletList:e}=kn(),n=P.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().bulletList(),o=e.enabled();return ee.createElement(It,{...t,commandName:"toggleBulletList",active:r,enabled:o,onSelect:n})},due=({attrs:t={},...e})=>{const{toggleCodeBlock:n}=kn(),r=P.useCallback(()=>{n.enabled(t)&&n(t)},[n,t]),o=hr().codeBlock(),i=n.enabled(t);return ee.createElement(It,{...e,commandName:"toggleCodeBlock",active:o,enabled:i,attrs:t,onSelect:r})},Vx=t=>{const{toggleCode:e}=kn(),n=P.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().code(),o=e.enabled();return ee.createElement(It,{...t,commandName:"toggleCode",active:r,enabled:o,onSelect:n})},e0=({attrs:t,...e})=>{const{toggleHeading:n}=kn(),r=P.useCallback(()=>{n.enabled(t)&&n(t)},[n,t]),o=hr().heading(t),i=n.enabled(t);return ee.createElement(It,{...e,commandName:"toggleHeading",active:o,enabled:i,attrs:t,onSelect:r})},jx=t=>{const{toggleItalic:e}=kn(),n=P.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().italic(),o=e.enabled();return ee.createElement(It,{...t,commandName:"toggleItalic",active:r,enabled:o,onSelect:n})},hue=t=>{const{toggleOrderedList:e}=kn(),n=P.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().orderedList(),o=e.enabled();return ee.createElement(It,{...t,commandName:"toggleOrderedList",active:r,enabled:o,onSelect:n})},fue=t=>{const{toggleStrike:e}=kn(),n=P.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().strike(),o=e.enabled();return ee.createElement(It,{...t,commandName:"toggleStrike",active:r,enabled:o,onSelect:n})},Gx=t=>{const{toggleUnderline:e}=kn(),n=P.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().underline(),o=e.enabled();return ee.createElement(It,{...t,commandName:"toggleUnderline",active:r,enabled:o,onSelect:n})},pue=t=>{const{undo:e}=kn(),{undoDepth:n}=ef(!0),r=P.useCallback(()=>{e.enabled()&&e()},[e]),o=n()>0;return ee.createElement(It,{...t,commandName:"undo",active:!1,enabled:o,onSelect:r})},so=t=>ee.createElement(uN,{sx:{display:"flex",alignItems:"center",width:"fit-content",bgcolor:"background.paper",color:"text.secondary"},...t}),gue=({children:t})=>ee.createElement(so,null,ee.createElement(Wx,null),ee.createElement(jx,null),ee.createElement(Gx,null),ee.createElement(fue,null),ee.createElement(Vx,null),t),mue=({icon:t})=>t?ee.createElement(Lie,null,ke(t)?ee.createElement(Cv,{name:t,size:"1rem"}):ee.createElement(ee.Fragment,null,t)):null,Kx=({commandName:t,active:e=!1,enabled:n,attrs:r,onSelect:o,onClick:i,icon:s,displayShortcut:l=!0,label:a,description:u,displayDescription:c=!0,...d})=>{const h=P.useCallback(y=>{o(),i==null||i(y)},[o,i]),f=P.useCallback(y=>{y.preventDefault()},[]),p=EN({commandName:t,active:e,enabled:n,attrs:r});let g=null;p.icon&&(g=ke(p.icon)?p.icon:p.icon.name);const m=a??p.label??"",v=c&&(u??p.description);return ee.createElement(mse,{selected:e,disabled:!n,onMouseDown:f,...d,onClick:h},s!==null&&ee.createElement(mue,{icon:s??g}),ee.createElement(Bie,{primary:m,secondary:v}),l&&p.shortcut&&ee.createElement(yd,{variant:"body2",color:"text.secondary",sx:{ml:2}},p.shortcut))},Zf=({attrs:t,...e})=>{const{toggleHeading:n}=kn(),r=P.useCallback(()=>{n.enabled(t)&&n(t)},[n,t]),o=hr().heading(t),i=n.enabled(t);return ee.createElement(Kx,{...e,commandName:"toggleHeading",active:o,enabled:i,attrs:t,onSelect:r})},vue={level:1},yue={level:2},u_={level:3},bue={level:4},wue={level:5},xue={level:6},kue=({showAll:t=!1,children:e})=>ee.createElement(so,null,ee.createElement(e0,{attrs:vue}),ee.createElement(e0,{attrs:yue}),t?ee.createElement(TN,{"aria-label":"More heading options"},ee.createElement(Zf,{attrs:u_}),ee.createElement(Zf,{attrs:bue}),ee.createElement(Zf,{attrs:wue}),ee.createElement(Zf,{attrs:xue})):ee.createElement(e0,{attrs:u_}),e),Eue=({children:t})=>ee.createElement(so,null,ee.createElement(pue,null),ee.createElement(lue,null),t);typeof rr=="object"&&rr.__esModule&&rr.default&&rr.default;var Sue=t=>{const e=ef().getPositionerWidget();return Qh.createPortal(ee.createElement(ee.Fragment,null,t.children),e)},AN=P.createContext({});function Cue(t={}){const e=P.useContext(AN),n=P.useMemo(()=>dR(e,t.theme??{}),[e,t.theme]),r=P.useMemo(()=>oV(n).styles,[n]),o=Pc(rV,t.className);return P.useMemo(()=>({style:r,className:o,theme:n}),[r,o,n])}var Tue=t=>{var e,n,r,o,i,s,l,a;const{children:u,as:c="div"}=t,{theme:d,style:h,className:f}=Cue({theme:t.theme??ga}),p=_x({palette:{primary:{main:((e=d.color)==null?void 0:e.primary)??ga.color.primary,dark:((r=(n=d.color)==null?void 0:n.hover)==null?void 0:r.primary)??ga.color.hover.primary,contrastText:((o=d.color)==null?void 0:o.primaryText)??ga.color.primaryText},secondary:{main:((i=d.color)==null?void 0:i.secondary)??ga.color.secondary,dark:((l=(s=d.color)==null?void 0:s.hover)==null?void 0:l.secondary)??ga.color.hover.secondary,contrastText:((a=d.color)==null?void 0:a.secondaryText)??ga.color.secondaryText}}});return ee.createElement(ine,{theme:p},ee.createElement(AN.Provider,{value:d},ee.createElement(c,{style:h,className:f},u)))},_N=t=>ee.createElement(vie,{direction:"row",spacing:1,sx:{backgroundColor:"background.paper",overflowX:"auto"},...t}),Aue=[{name:"offset",options:{offset:[0,8]}}],_ue=({positioner:t="selection",children:e,...n})=>{const{ref:r,x:o,y:i,width:s,height:l,active:a}=kN(()=>H0(t),[t]),[u,c]=P.useState(null),d=P.useMemo(()=>({position:"absolute",pointerEvents:"none",left:o,top:i,width:s,height:l}),[o,i,s,l]),h=P.useCallback(f=>{c(f),r==null||r(f)},[r]);return ee.createElement(ee.Fragment,null,ee.createElement("div",{ref:h,style:d}),ee.createElement(Hx,{placement:"top",modifiers:Aue,...n,open:a,anchorEl:u},ee.createElement(_N,null,e?ee.createElement(ee.Fragment,null,e):ee.createElement(gue,null))))},Rue=({languages:t=[],className:e="",offset:n={x:0,y:0},onLanguageChange:r,onPointerDownSelect:o,onSelectChange:i})=>{var s;const l=kN(Oue,[]),{getExtension:a,getState:u}=vi(),{focus:c,updateCodeBlock:d}=kn(),h=a(mo).options,[f]=P.useState(()=>{const w=new Map;return h.supportedLanguages.forEach(k=>{k.aliases.forEach(x=>!t.some(S=>S.displayName===x)&&w.set(x,k.displayName))}),w}),[p]=P.useState([...t,{displayName:h.defaultLanguage},...h.supportedLanguages]),{selection:g}=u(),[m,v]=P.useState("auto"),y=(s=hi({selection:g,types:"codeBlock"}))==null?void 0:s.node.attrs.language,b=P.useMemo(()=>{const w=f.get(y);return w||(h.supportedLanguages.some(k=>y===k.displayName)?y:h.defaultLanguage)},[f,h.defaultLanguage,h.supportedLanguages,y]);return P.useEffect(()=>{var w;const k=l.element;if(r!=null&&r(b,k,v))return;if((S=>S&&S.nodeName==="SELECT"||!1)(k)){const S=(w=k.options[k.selectedIndex])==null?void 0:w.dataset.width;v(S?`${S}px`:"auto")}},[l.element,b,r]),ee.createElement(Sue,null,ee.createElement("select",{ref:l.ref,className:e,onBlur:()=>c(),onChange:w=>{var k;i!=null&&i(w,v)||(v(`${(k=w.target.options[w.target.selectedIndex])==null?void 0:k.dataset.width}px`),d({language:w.target.dataset.value||w.target.value}))},onPointerDown:o,style:{"--w":m,"--x":`${l.x+n.x}px`,"--y":`${l.y+n.y}px`,display:y?"block":"none"},value:b},y?Mue(p):null))},Mue=WH(t=>hb(t.map(({displayName:n,value:r})=>({displayName:n,value:r||n})),"displayName").sort((n,r)=>n.displayName>r.displayName?1:n.displayName{const r=document.createElement("select"),o=document.createElement("option");let i="0px";return r.append(o),document.body.append(r),o.textContent=n.displayName,i=String(r.getBoundingClientRect().width),r.remove(),{...n,width:i}}).map(({displayName:n,value:r,width:o})=>ee.createElement("option",{key:n,"data-value":r,"data-width":o,value:n},n)));function Oue(){return Vr.create({getActive(t){const{selection:e}=t.state,n=hi({selection:e,types:"codeBlock"});return n?[{codeBlockResult:n}]:Vr.EMPTY},getPosition(t){const{data:e,view:n}=t,{pos:r}=e.codeBlockResult,o=n.nodeDOM(r);if(!o||!zt(o))return Sm;const i=o.getBoundingClientRect(),s=n.dom.getBoundingClientRect(),l=n.dom.scrollLeft+i.left-s.left,a=n.dom.scrollTop+i.top-s.top,u=dw(i,n.dom);return{height:0,rect:i,visible:u,width:0,x:l,y:a}},hasChanged:uw})}var rn=im(Lg),Yx=Zt` /** * Styles extracted from: packages/remirror__theme/src/components-theme.ts */ @@ -777,9 +777,9 @@ Error generating stack: `+i.message+` .remirror-color-picker-cell-selected { } -`;Rt.div` - ${xE} -`;var SE=wt` +`;rn.div` + ${Yx} +`;var Xx=Zt` /** * Styles extracted from: packages/remirror__theme/src/core-theme.ts */ @@ -844,9 +844,9 @@ Error generating stack: `+i.message+` border: 2px solid #8cf; pointer-events: none; } -`;Rt.div` - ${SE} -`;var wE=wt` +`;rn.div` + ${Xx} +`;var qx=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-blockquote-theme.ts */ @@ -860,9 +860,9 @@ Error generating stack: `+i.message+` .remirror-editor.ProseMirror blockquote p { color: #888; } -`;Rt.div` - ${wE} -`;var TE=wt` +`;rn.div` + ${qx} +`;var Zx=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-callout-theme.ts */ @@ -897,9 +897,9 @@ Error generating stack: `+i.message+` .remirror-editor div[data-callout-type='blank'] { background: #f8f8f8; } -`;Rt.div` - ${TE} -`;var CE=wt` +`;rn.div` + ${Zx} +`;var Qx=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-code-block-theme.ts */ @@ -3695,18 +3695,18 @@ Error generating stack: `+i.message+` top: auto; bottom: 0.4em; } -`;Rt.div` - ${CE} -`;var OE=wt` +`;rn.div` + ${Qx} +`;var Jx=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-count-theme.ts */ .remirror-editor span.remirror-max-count-exceeded { background-color: var(--rmr-hue-red-4); } -`;Rt.div` - ${OE} -`;var AE=wt` +`;rn.div` + ${Jx} +`;var ek=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-emoji-theme.ts */ @@ -3763,9 +3763,9 @@ Error generating stack: `+i.message+` font-size: 1.25em; padding-right: 5px; } -`;Rt.div` - ${AE} -`;var NE=wt` +`;rn.div` + ${ek} +`;var tk=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-file-theme.ts */ @@ -3816,9 +3816,9 @@ Error generating stack: `+i.message+` align-items: center; color: #000; } -`;Rt.div` - ${NE} -`;var RE=wt` +`;rn.div` + ${tk} +`;var nk=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-gap-cursor-theme.ts */ @@ -3845,9 +3845,9 @@ Error generating stack: `+i.message+` .remirror-editor.ProseMirror.ProseMirror-focused .ProseMirror-gapcursor { display: block; } -`;Rt.div` - ${RE} -`;var _E=wt` +`;rn.div` + ${nk} +`;var rk=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-image-theme.ts */ @@ -3868,9 +3868,9 @@ Error generating stack: `+i.message+` transform: rotate(360deg); } } -`;Rt.div` - ${_E} -`;var IE=wt` +`;rn.div` + ${rk} +`;var ok=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-list-theme.ts */ @@ -3964,9 +3964,9 @@ Error generating stack: `+i.message+` .remirror-list-spine:hover { border-left-color: var(--rmr-color-primary); } -`;Rt.div` - ${IE} -`;var ME=wt` +`;rn.div` + ${ok} +`;var ik=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-mention-atom-theme.ts */ @@ -4030,17 +4030,17 @@ Error generating stack: `+i.message+` font-size: 1.25em; padding-right: 5px; } -`;Rt.div` - ${ME} -`;var LE=wt` +`;rn.div` + ${ik} +`;var sk=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-node-formatting-theme.ts */ .remirror-editor.ProseMirror { } -`;Rt.div` - ${LE} -`;var DE=wt` +`;rn.div` + ${sk} +`;var ak=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-placeholder-theme.ts */ @@ -4052,9 +4052,9 @@ Error generating stack: `+i.message+` font-style: italic; content: attr(data-placeholder); } -`;Rt.div` - ${DE} -`;var PE=wt` +`;rn.div` + ${ak} +`;var lk=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-positioner-theme.ts */ @@ -4080,9 +4080,9 @@ Error generating stack: `+i.message+` height: 0; position: absolute; } -`;Rt.div` - ${PE} -`;var zE=wt` +`;rn.div` + ${lk} +`;var ck=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-tables-theme.ts */ @@ -4448,9 +4448,9 @@ Error generating stack: `+i.message+` .remirror-table-show-predelete.remirror-table-preselect-all th.remirror-table-controller { background-color: var(--rmr-color-table-predelete-controller) !important; } -`;Rt.div` - ${zE} -`;var $E=wt` +`;rn.div` + ${ck} +`;var uk=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-whitespace-theme.ts */ @@ -4479,9 +4479,9 @@ Error generating stack: `+i.message+` .remirror-editor.ProseMirror .whitespace--p:before { content: '¶'; } -`;Rt.div` - ${$E} -`;var BE=wt` +`;rn.div` + ${uk} +`;var dk=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-yjs-theme.ts */ @@ -4524,9 +4524,9 @@ Error generating stack: `+i.message+` .remirror-editor #y-functions > * { display: inline-block; } -`;Rt.div` - ${BE} -`;var HE=wt` +`;rn.div` + ${dk} +`;var hk=Zt` /** * Styles extracted from: packages/remirror__theme/src/theme.ts */ @@ -4827,291 +4827,1401 @@ Error generating stack: `+i.message+` margin: 0; /* margin-bottom: var(--rmr-space-2); */ } -`;Rt.div` - ${HE} -`;wt` - ${xE} - ${SE} - ${wE} - ${TE} - ${CE} - ${OE} - ${AE} - ${NE} - ${RE} - ${_E} - ${IE} - ${ME} - ${LE} - ${DE} - ${PE} - ${zE} - ${$E} - ${BE} - ${HE} -`;var lle=Rt.div` - ${xE} - ${SE} - ${wE} - ${TE} - ${CE} - ${OE} - ${AE} - ${NE} - ${RE} - ${_E} - ${IE} - ${ME} - ${LE} - ${DE} - ${PE} - ${zE} - ${$E} - ${BE} - ${HE} -`,cle=Object.defineProperty,ule=Object.getOwnPropertyDescriptor,UI=(e,t,r,n)=>{for(var o=n>1?void 0:n?ule(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&cle(t,r,o),o},FE=class extends or{get name(){return"blockquote"}createTags(){return[ie.Block,ie.FormattingNode]}createNodeSpec(e,t){return{content:"block+",defining:!0,draggable:!1,...t,attrs:e.defaults(),parseDOM:[{tag:"blockquote",getAttrs:e.parse,priority:100},...t.parseDOM??[]],toDOM:r=>["blockquote",e.dom(r),0]}}toggleBlockquote(){return iA(this.type)}shortcut(e){return this.toggleBlockquote()(e)}createInputRules(){return[Xh(/^\s*>\s$/,this.type)]}createPasteRules(){return{type:"node",nodeType:this.type,regexp:/^\s*>\s$/,startOfTextBlock:!0}}};UI([Z({icon:"doubleQuotesL",description:({t:e})=>e(jx.DESCRIPTION),label:({t:e})=>e(jx.LABEL)})],FE.prototype,"toggleBlockquote",1);UI([Nt({shortcut:"Ctrl->",command:"toggleBlockquote"})],FE.prototype,"shortcut",1);var dle=Object.defineProperty,ple=Object.getOwnPropertyDescriptor,ap=(e,t,r,n)=>{for(var o=n>1?void 0:n?ple(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&dle(t,r,o),o},fle={icon:"bold",label:({t:e})=>e(Gx.LABEL),description:({t:e})=>e(Gx.DESCRIPTION)},Sa=class extends bs{get name(){return"bold"}createTags(){return[ie.FormattingMark,ie.FontStyle]}createMarkSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"strong",getAttrs:e.parse},{tag:"b",getAttrs:r=>dt(r)&&r.style.fontWeight!=="normal"?e.parse(r):!1},{style:"font-weight",getAttrs:r=>oe(r)&&/^(bold(er)?|[5-9]\d{2,})$/.test(r)?null:!1},...t.parseDOM??[]],toDOM:r=>{const{weight:n}=this.options;return n?["strong",{"font-weight":n.toString()},0]:["strong",e.dom(r),0]}}}createInputRules(){return[Xu({regexp:/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,type:this.type,ignoreWhitespace:!0})]}toggleBold(e){return ls({type:this.type,selection:e})}setBold(e){return({tr:t,dispatch:r})=>{const{from:n,to:o}=Dn(e??t.selection,t.doc);return r==null||r(t.addMark(n,o,this.type.create())),!0}}removeBold(e){return({tr:t,dispatch:r})=>{const{from:n,to:o}=Dn(e??t.selection,t.doc);return t.doc.rangeHasMark(n,o,this.type)?(r==null||r(t.removeMark(n,o,this.type)),!0):!1}}shortcut(e){return this.toggleBold()(e)}};ap([Z(fle)],Sa.prototype,"toggleBold",1);ap([Z()],Sa.prototype,"setBold",1);ap([Z()],Sa.prototype,"removeBold",1);ap([Nt({shortcut:V.Bold,command:"toggleBold"})],Sa.prototype,"shortcut",1);Sa=ap([ye({defaultOptions:{weight:void 0},staticKeys:["weight"]})],Sa);var hle=Object.defineProperty,mle=Object.getOwnPropertyDescriptor,UE=(e,t,r,n)=>{for(var o=n>1?void 0:n?mle(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&hle(t,r,o),o},{DESCRIPTION:gle,LABEL:yle}=B5,vle={icon:"codeLine",description:({t:e})=>e(gle),label:({t:e})=>e(yle)},Nd=class extends bs{get name(){return"code"}createTags(){return[ie.Code,ie.ExcludeInputRules]}createMarkSpec(e,t){return{excludes:"_",...t,attrs:e.defaults(),parseDOM:[{tag:"code",getAttrs:e.parse},...t.parseDOM??[]],toDOM:r=>["code",{spellcheck:"false",...e.dom(r)},0]}}createKeymap(){return{"Mod-`":ls({type:this.type})}}keyboardShortcut(e){return this.toggleCode()(e)}toggleCode(){return ls({type:this.type})}createInputRules(){return[Xu({regexp:new RegExp(`(?:\`)([^\`${$y}]+)(?:\`)$`),type:this.type,ignoreWhitespace:!0})]}createPasteRules(){return[{type:"mark",regexp:/`([^`]+)`/g,markType:this.type}]}};UE([Nt({shortcut:V.Code,command:"toggleCode"})],Nd.prototype,"keyboardShortcut",1);UE([Z(vle)],Nd.prototype,"toggleCode",1);Nd=UE([ye({})],Nd);var VI=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},Le=(e,t,r)=>(VI(e,t,"read from private field"),r?r.call(e):t.get(e)),il=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Ri=(e,t,r,n)=>(VI(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),ble='',Ele='',kle=encodeURIComponent(ble),xle=encodeURIComponent(Ele),Lr,Sle=class{constructor(e){il(this,Lr,void 0);const t=document.createElement("div"),r=document.createElement("div");this.dom=t,Ri(this,Lr,r),this.type=e,this.createHandle(e)}createHandle(e){switch(ur(this.dom,{position:"absolute",pointerEvents:"auto",display:"flex",alignItems:"center",justifyContent:"center",zIndex:"100"}),ur(Le(this,Lr),{opacity:"0",transition:"opacity 300ms ease-in 0s"}),Le(this,Lr).dataset.dragging="",e){case 0:ur(this.dom,{right:"0px",top:"0px",height:"100%",width:"15px",cursor:"col-resize"}),ur(Le(this,Lr),{width:" 4px",height:"36px",maxHeight:"50%",boxSizing:"content-box",background:"rgba(0, 0, 0, 0.65)",border:"1px solid rgba(255, 255, 255, 0.5)",borderRadius:"6px"});break;case 1:ur(this.dom,{left:"0px",top:"0px",height:"100%",width:"15px",cursor:"col-resize"}),ur(Le(this,Lr),{width:" 4px",height:"36px",maxHeight:"50%",boxSizing:"content-box",background:"rgba(0, 0, 0, 0.65)",border:"1px solid rgba(255, 255, 255, 0.5)",borderRadius:"6px"});break;case 2:ur(this.dom,{bottom:"0px",width:"100%",height:"14px",cursor:"row-resize"}),ur(Le(this,Lr),{width:" 42px",height:"4px",boxSizing:"content-box",maxWidth:"50%",background:"rgba(0, 0, 0, 0.65)",border:"1px solid rgba(255, 255, 255, 0.5)",borderRadius:"6px"});break;case 3:ur(this.dom,{right:"-1px",bottom:"-2px",width:"30px",height:"30px",cursor:"nwse-resize",zIndex:"101"}),ur(Le(this,Lr),{height:"22px",width:"22px",backgroundRepeat:"no-repeat",backgroundImage:`url("data:image/svg+xml,${xle}") `});break;case 4:ur(this.dom,{left:"-1px",bottom:"-2px",width:"30px",height:"30px",cursor:"nesw-resize",zIndex:"101"}),ur(Le(this,Lr),{height:"22px",width:"22px",backgroundRepeat:"no-repeat",backgroundImage:`url("data:image/svg+xml,${kle}") `});break}this.dom.append(Le(this,Lr))}setHandleVisibility(e){const t=e||!!Le(this,Lr).dataset.dragging;Le(this,Lr).style.opacity=t?"1":"0"}dataSetDragging(e){Le(this,Lr).dataset.dragging=e?"true":""}};Lr=new WeakMap;var Vp=50,jI=(e=>(e[e.Fixed=0]="Fixed",e[e.Flexible=1]="Flexible",e))(jI||{}),$s,Bs,Hs,Go,Fs,wle=class{constructor({node:e,view:t,getPos:r,aspectRatio:n=0,options:o,initialSize:i}){il(this,$s,void 0),il(this,Bs,void 0),il(this,Hs,[]),il(this,Go,void 0),il(this,Fs,void 0);const s=this.createWrapper(e,i),a=this.createElement({node:e,view:t,getPos:r,options:o}),c=(n===1?[0,1,2,3,4]:[0,1]).map(p=>new Sle(p));for(const p of c){const f=h=>{this.startResizing(h,t,r,p)};p.dom.addEventListener("mousedown",f),Le(this,Hs).push(()=>p.dom.removeEventListener("mousedown",f)),s.append(p.dom)}const u=()=>{c.forEach(p=>p.setHandleVisibility(!0))},d=()=>{c.forEach(p=>p.setHandleVisibility(!1))};s.addEventListener("mouseover",u),s.addEventListener("mouseout",d),Le(this,Hs).push(()=>s.removeEventListener("mouseover",u),()=>s.removeEventListener("mouseout",d)),s.append(a),this.dom=s,Ri(this,Bs,e),Ri(this,$s,a),this.aspectRatio=n}createWrapper(e,t){const r=document.createElement("div");return r.classList.add("remirror-resizable-view"),r.style.position="relative",t?ur(r,{width:P2(t.width),aspectRatio:`${t.width} / ${t.height}`}):ur(r,{width:P2(e.attrs.width),aspectRatio:`${e.attrs.width} / ${e.attrs.height}`}),ur(r,{maxWidth:"100%",minWidth:`${Vp}px`,verticalAlign:"bottom",display:"inline-block",lineHeight:"0",transition:"width 0.15s ease-out, height 0.15s ease-out"}),r}startResizing(e,t,r,n){var o,i;e.preventDefault(),n.dataSetDragging(!0),Le(this,$s).style.pointerEvents="none";const s=e.pageX,a=e.pageY,l=((o=Le(this,$s))==null?void 0:o.getBoundingClientRect().width)||0,c=((i=Le(this,$s))==null?void 0:i.getBoundingClientRect().height)||0,u=U1(100,!1,p=>{const f=p.pageX,h=p.pageY,m=f-s,b=h-a;let y=null,g=null;if(this.aspectRatio===0&&l&&c)switch(n.type){case 0:case 3:y=l+m,g=c/l*y;break;case 1:case 4:y=l-m,g=c/l*y;break;case 2:g=c+b,y=l/c*g;break}else if(this.aspectRatio===1)switch(n.type){case 0:y=l+m;break;case 1:y=l-m;break;case 2:g=c+b;break;case 3:y=l+m,g=c+b;break;case 4:y=l-m,g=c+b;break}typeof y=="number"&&y{p.preventDefault(),n.dataSetDragging(!1),n.setHandleVisibility(!1),Le(this,$s).style.pointerEvents="auto",document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",d);const f=r(),h=t.state.tr.setNodeMarkup(f,void 0,{...Le(this,Bs).attrs,width:Le(this,Go),height:Le(this,Fs)});t.dispatch(h)};document.addEventListener("mousemove",u),document.addEventListener("mouseup",d),Le(this,Hs).push(()=>document.removeEventListener("mousemove",u)),Le(this,Hs).push(()=>document.removeEventListener("mouseup",d))}update(e){return e.type!==Le(this,Bs).type||this.aspectRatio===0&&e.attrs.width&&e.attrs.width!==Le(this,Go)||this.aspectRatio===1&&e.attrs.width&&e.attrs.height&&e.attrs.width!==Le(this,Go)&&e.attrs.height!==Le(this,Fs)||!Tle(Le(this,Bs),e,["width","height"])?!1:(Ri(this,Bs,e),Ri(this,Go,e.attrs.width),Ri(this,Fs,e.attrs.height),!0)}destroy(){Le(this,Hs).forEach(e=>e())}};$s=new WeakMap;Bs=new WeakMap;Hs=new WeakMap;Go=new WeakMap;Fs=new WeakMap;function Tle(e,t,r){return e===t||Cle(e,t,r)&&e.content.eq(t.content)}function Cle(e,t,r){const n=e.attrs,o=t.attrs,i={};for(const a of r)i[a]=null;e.attrs={...n,...i},t.attrs={...o,...i};const s=e.sameMarkup(t);return e.attrs=n,t.attrs=o,s}function P2(e){return typeof e=="number"?`${e}px`:e||void 0}var Ole=Object.defineProperty,Ale=Object.getOwnPropertyDescriptor,GI=(e,t,r,n)=>{for(var o=n>1?void 0:n?Ale(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Ole(t,r,o),o},Mh=class extends or{get name(){return"hardBreak"}createTags(){return[ie.InlineNode]}createNodeSpec(e,t){return{inline:!0,selectable:!1,atom:!0,leafText:()=>` -`,...t,attrs:e.defaults(),parseDOM:[{tag:"br",getAttrs:e.parse},...t.parseDOM??[]],toDOM:r=>["br",e.dom(r)]}}createKeymap(){const e=mP(Ou(hA),()=>(this.store.commands.insertHardBreak(),!0));return{"Mod-Enter":e,"Shift-Enter":e}}insertHardBreak(){return e=>{const{tr:t,dispatch:r}=e;return r==null||r(t.replaceSelectionWith(this.type.create()).scrollIntoView()),!0}}};GI([Z()],Mh.prototype,"insertHardBreak",1);Mh=GI([ye({defaultPriority:Ue.Low})],Mh);var Nle=Object.defineProperty,Rle=Object.getOwnPropertyDescriptor,WI=(e,t,r,n)=>{for(var o=n>1?void 0:n?Rle(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Nle(t,r,o),o},{LABEL:_le}=F5,Ile={icon:({attrs:e})=>`h${(e==null?void 0:e.level)??"1"}`,label:({t:e,attrs:t})=>e({..._le,values:{level:t==null?void 0:t.level}})},Mle=[V.H1,V.H2,V.H3,V.H4,V.H5,V.H6],Lh=class extends or{get name(){return"heading"}createTags(){return[ie.Block,ie.TextBlock,ie.FormattingNode]}createNodeSpec(e,t){return{content:"inline*",defining:!0,draggable:!1,...t,attrs:{...e.defaults(),level:{default:this.options.defaultLevel}},parseDOM:[...this.options.levels.map(r=>({tag:`h${r}`,getAttrs:n=>({...e.parse(n),level:r})})),...t.parseDOM??[]],toDOM:r=>this.options.levels.includes(r.attrs.level)?[`h${r.attrs.level}`,e.dom(r),0]:[`h${this.options.defaultLevel}`,e.dom(r),0]}}toggleHeading(e={}){return uv({type:this.type,toggleType:"paragraph",attrs:e})}createKeymap(e){const t=this.store.getExtension(xe),r=te(),n=[];for(const o of this.options.levels){const i=Mle[o-1]??V.H1;r[i]=qu(this.type,{level:o}),n.push({attrs:{level:o},shortcut:e(i)[0]})}return t.updateDecorated("toggleHeading",{shortcut:n}),r}createInputRules(){return this.options.levels.map(e=>dD(new RegExp(`^(#{1,${e}})\\s$`),this.type,()=>({level:e})))}createPasteRules(){return this.options.levels.map(e=>({type:"node",nodeType:this.type,regexp:new RegExp(`^#{${e}}\\s([\\s\\w]+)$`),getAttributes:()=>({level:e}),startOfTextBlock:!0}))}};WI([Z(Ile)],Lh.prototype,"toggleHeading",1);Lh=WI([ye({defaultOptions:{levels:[1,2,3,4,5,6],defaultLevel:1},staticKeys:["defaultLevel","levels"]})],Lh);var Lle=Object.defineProperty,Dle=Object.getOwnPropertyDescriptor,KI=(e,t,r,n)=>{for(var o=n>1?void 0:n?Dle(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Lle(t,r,o),o},Ple={icon:"separator",label:({t:e})=>e(Wx.LABEL),description:({t:e})=>e(Wx.DESCRIPTION)},Dh=class extends or{get name(){return"horizontalRule"}createTags(){return[ie.Block]}createNodeSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"hr",getAttrs:e.parse},...t.parseDOM??[]],toDOM:r=>["hr",e.dom(r)]}}insertHorizontalRule(){return e=>{const{tr:t,dispatch:r}=e,n=t.selection.$anchor,o=n.parent;return o.type.name==="doc"||o.isAtom||o.isLeaf?!1:(r&&(t.selection.empty&&rm(o)&&t.insert(n.pos+1,o),t.replaceSelectionWith(this.type.create()),this.updateFromNodeSelection(t),r(t.scrollIntoView())),!0)}}createInputRules(){return[lA({regexp:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type,beforeDispatch:({tr:e})=>{this.updateFromNodeSelection(e)}})]}updateFromNodeSelection(e){if(!Gd(e.selection)||e.selection.node.type.name!==this.name)return;const t=e.selection.$from.pos+1,{insertionNode:r}=this.options;if(!r)return;const n=this.store.schema.nodes[r];re(n,{code:U.EXTENSION,message:`'${r}' node provided as the insertionNode to the '${this.constructorName}' does not exist.`});const o=n.create();e.insert(t,o),e.setSelection(ue.near(e.doc.resolve(t+1)))}};KI([Z(Ple)],Dh.prototype,"insertHorizontalRule",1);Dh=KI([ye({defaultOptions:{insertionNode:"paragraph"}})],Dh);var zle=Object.defineProperty,$le=Object.getOwnPropertyDescriptor,VE=(e,t,r,n)=>{for(var o=n>1?void 0:n?$le(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&zle(t,r,o),o},Ble=class extends wle{constructor(e,t,r){super({node:e,view:t,getPos:r,aspectRatio:jI.Fixed})}createElement({node:e}){const t=document.createElement("img");return t.setAttribute("src",e.attrs.src),ur(t,{width:"100%",minWidth:"50px",objectFit:"contain"}),t}},Rd=class extends or{get name(){return"image"}createTags(){return[ie.InlineNode,ie.Media]}createNodeSpec(e,t){const{preferPastedTextContent:r}=this.options;return{inline:!0,draggable:!0,selectable:!1,...t,attrs:{...e.defaults(),alt:{default:""},crop:{default:null},height:{default:null},width:{default:null},rotate:{default:null},src:{default:null},title:{default:""},fileName:{default:null},resizable:{default:!1}},parseDOM:[{tag:"img[src]",getAttrs:n=>{var o;if(dt(n)){const i=Fle({element:n,parse:e.parse});return r&&((o=i.src)!=null&&o.startsWith("file:///"))?!1:i}return{}}},...t.parseDOM??[]],toDOM:n=>{const o=om(n.attrs,e);return["img",{...e.dom(n),...o}]}}}insertImage(e,t){return({tr:r,dispatch:n})=>{const{from:o,to:i}=Dn(t??r.selection,r.doc),s=this.type.create(e);return n==null||n(r.replaceRangeWith(o,i,s)),!0}}uploadImage(e,t){const{updatePlaceholder:r,destroyPlaceholder:n,createPlaceholder:o}=this.options;return i=>{const{tr:s}=i;let a=s.selection.from;return this.store.createPlaceholderCommand({promise:e,placeholder:{type:"widget",get pos(){return a},createElement:(l,c)=>{const u=o(l,c);return t==null||t(u),u},onUpdate:(l,c,u,d)=>{r(l,c,u,d)},onDestroy:(l,c)=>{n(l,c)}},onSuccess:(l,c,u)=>this.insertImage(l,c)(u)}).validate(({tr:l,dispatch:c})=>{const u=JC(l.doc,a,this.type);return u==null?!1:(a=u,l.selection.empty||c==null||c(l.deleteSelection()),!0)},"unshift").generateCommand()(i)}}fileUploadFileHandler(e,t,r){var n;const{preferPastedTextContent:o,uploadHandler:i}=this.options;if(o&&jle(t)&&((n=t.clipboardData)!=null&&n.getData("text/plain")))return!1;const{commands:s,chain:a}=this.store,l=e.map((u,d)=>({file:u,progress:p=>{s.updatePlaceholder(c[d],p)}})),c=i(l);gn(r)&&a.selectText(r);for(const u of c)a.uploadImage(u);return a.run(),!0}createPasteRules(){return[{type:"file",regexp:/image/i,fileHandler:e=>{const t=e.type==="drop"?e.pos:void 0;return this.fileUploadFileHandler(e.files,e.event,t)}}]}createNodeViews(){return this.options.enableResizing?(e,t,r)=>new Ble(e,t,r):{}}};VE([Z()],Rd.prototype,"insertImage",1);VE([Z()],Rd.prototype,"uploadImage",1);Rd=VE([ye({defaultOptions:{createPlaceholder:Ule,updatePlaceholder:()=>{},destroyPlaceholder:()=>{},uploadHandler:Vle,enableResizing:!1,preferPastedTextContent:!0}})],Rd);function Hle(e){let{width:t,height:r}=e.style;return t=t||e.getAttribute("width")||"",r=r||e.getAttribute("height")||"",{width:t,height:r}}function Fle({element:e,parse:t}){const{width:r,height:n}=Hle(e);return{...t(e),alt:e.getAttribute("alt")??"",height:Number.parseInt(n||"0",10)||null,src:e.getAttribute("src")??null,title:e.getAttribute("title")??"",width:Number.parseInt(r||"0",10)||null,fileName:e.getAttribute("data-file-name")??null}}function Ule(e,t){const r=document.createElement("div");return r.classList.add(SF.IMAGE_LOADER),r}function Vle(e){re(e.length>0,{code:U.EXTENSION,message:"The upload handler was applied for the image extension without any valid files"});let t=0;const r=[];for(const{file:n,progress:o}of e)r.push(()=>new Promise(i=>{const s=new FileReader;s.addEventListener("load",a=>{var l;t+=1,o(t/e.length),i({src:(l=a.target)==null?void 0:l.result,fileName:n.name})},{once:!0}),s.readAsDataURL(n)}));return r}function jle(e){return e.clipboardData!==void 0}var Gle=Object.defineProperty,Wle=Object.getOwnPropertyDescriptor,jE=(e,t,r,n)=>{for(var o=n>1?void 0:n?Wle(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Gle(t,r,o),o},Kle={icon:"italic",label:({t:e})=>e(Kx.LABEL),description:({t:e})=>e(Kx.DESCRIPTION)},_d=class extends bs{get name(){return"italic"}createTags(){return[ie.FontStyle,ie.FormattingMark]}createMarkSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"i",getAttrs:e.parse},{tag:"em",getAttrs:e.parse},{style:"font-style=italic"},...t.parseDOM??[]],toDOM:r=>["em",e.dom(r),0]}}createKeymap(){return{"Mod-i":ls({type:this.type})}}createInputRules(){return[Xu({regexp:/(?:^|[^*])\*([^*]+)\*$/,type:this.type,ignoreWhitespace:!0,updateCaptured:({fullMatch:e,start:t})=>e.startsWith("*")?{}:{fullMatch:e.slice(1),start:t+1}}),Xu({regexp:/(?:^|\W)_([^_]+)_$/,type:this.type,ignoreWhitespace:!0,updateCaptured:({fullMatch:e,start:t})=>e.startsWith("_")?{}:{fullMatch:e.slice(1),start:t+1}})]}createPasteRules(){return[{type:"mark",markType:this.type,regexp:/(?:^|\W)_([^_]+)_/g},{type:"mark",markType:this.type,regexp:/\*([^*]+)\*/g}]}toggleItalic(e){return ls({type:this.type,selection:e})}shortcut(e){return this.toggleItalic()(e)}};jE([Z(Kle)],_d.prototype,"toggleItalic",1);jE([Nt({shortcut:V.Italic,command:"toggleItalic"})],_d.prototype,"shortcut",1);_d=jE([ye({})],_d);var YI={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(typeof self<"u"?self:Zo,function(){return function(r){function n(i){if(o[i])return o[i].exports;var s=o[i]={i,l:!1,exports:{}};return r[i].call(s.exports,s,s.exports,n),s.l=!0,s.exports}var o={};return n.m=r,n.c=o,n.d=function(i,s,a){n.o(i,s)||Object.defineProperty(i,s,{configurable:!1,enumerable:!0,get:a})},n.n=function(i){var s=i&&i.__esModule?function(){return i.default}:function(){return i};return n.d(s,"a",s),s},n.o=function(i,s){return Object.prototype.hasOwnProperty.call(i,s)},n.p="",n(n.s=0)}([function(r,n,o){function i(){throw new TypeError("The given URL is not a string. Please verify your string|array.")}function s(c){typeof c!="string"&&i();for(var u=0,d=0,p=0,f=c.length,h=0;f--&&++h&&!(u&&-1p?"":c.slice(p,u)}var a=["/",":","?","#"],l=[".","/","@"];r.exports=function(c){if(typeof c=="string")return s(c);if(Array.isArray(c)){var u=[],d,p=0;for(d=c.length;p{for(var o=n>1?void 0:n?Zle(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Xle(t,r,o),o},Jle=["com","de","net","org","uk","cn","ga","nl","cf","ml","tk","ru","br","gq","xyz","fr","eu","info","co","au","ca","it","in","ch","pl","es","online","us","top","be","jp","biz","se","at","dk","cz","za","me","ir","icu","shop","kr","site","mx","hu","io","cc","club","no","cyou"],z2="updateLink",Qle=/(?:(?:(?:https?|ftp):)?\/\/)?(?:\S+(?::\S*)?@)?(?:(?:[\da-z\u00A1-\uFFFF][\w\u00A1-\uFFFF-]{0,62})?[\da-z\u00A1-\uFFFF]\.)*(?:(?:\d(?!\.)|[a-z\u00A1-\uFFFF])(?:[\da-z\u00A1-\uFFFF][\w\u00A1-\uFFFF-]{0,62})?[\da-z\u00A1-\uFFFF]\.)+[a-z\u00A1-\uFFFF]{2,}(?::\d{2,5})?(?:[#/?]\S*)?/gi,wa=class extends bs{constructor(){super(...arguments),this._autoLinkRegexNonGlobal=void 0}get name(){return"link"}createTags(){return[ie.Link,ie.ExcludeInputRules]}createMarkSpec(e,t){const r="data-link-auto",n=o=>{const{defaultTarget:i,supportedTargets:s}=this.options,a=i?[...s,i]:s;return o&&wr(a,o)?{target:o}:void 0};return{inclusive:!1,excludes:"_",...t,attrs:{...e.defaults(),href:{},target:{default:this.options.defaultTarget},auto:{default:!1}},parseDOM:[{tag:"a[href]",getAttrs:o=>{if(!dt(o))return!1;const i=o.getAttribute("href"),s=o.textContent,a=this.options.autoLink&&(o.hasAttribute(r)||i===s||(i==null?void 0:i.replace(`${this.options.defaultProtocol}//`,""))===s);return{...e.parse(o),href:i,auto:a,...n(o.getAttribute("target"))}}},...t.parseDOM??[]],toDOM:o=>{const{auto:i,target:s,...a}=om(o.attrs,e),l=o.attrs.auto?{[r]:""}:{},c="noopener noreferrer nofollow";return["a",{...e.dom(o),...a,rel:c,...l,...n(o.attrs.target)},0]}}}onCreate(){const{autoLinkRegex:e}=this.options;this._autoLinkRegexNonGlobal=new RegExp(`^${e.source}$`,e.flags.replace("g",""))}shortcut({tr:e}){let t="",{from:r,to:n,empty:o,$from:i}=e.selection,s=!1;const a=ai(i,this.type);if(o){const l=a??eA(e);if(!l)return!1;({text:t,from:r,to:n}=l),s=!0}return r===n?!1:(s||(t=e.doc.textBetween(r,n)),this.options.onActivateLink(t),this.options.onShortcut({activeLink:a?{attrs:a.mark.attrs,from:a.from,to:a.to}:void 0,selectedText:t,from:r,to:n}),!0)}updateLink(e,t){return r=>{const{tr:n}=r;return!(vs(n.selection)&&!sv(n.selection)||IP(n.selection)||jf({trState:n,type:this.type}))&&!t?!1:(n.setMeta(this.name,{command:z2,attrs:e,range:t}),QP({type:this.type,attrs:e,range:t})(r))}}selectLink(){return this.store.commands.selectMark.original(this.type)}removeLink(e){return t=>{const{tr:r}=t;return jf({trState:r,type:this.type,...e})?aA({type:this.type,expand:!0,range:e})(t):!1}}createPasteRules(){return[{type:"mark",regexp:this.options.autoLinkRegex,markType:this.type,getAttributes:(e,t)=>({href:this.buildHref(xl(e)),auto:!t}),transformMatch:e=>{const t=xl(e);return!t||!this.isValidUrl(t)?!1:t}}]}createEventHandlers(){return{clickMark:(e,t)=>{const r=t.getMark(this.type);if(!r)return;const n=r.mark.attrs,o={...n,...r};if(this.options.onClick(e,o))return!0;if(!this.store.view.editable)return;let i=!1;if(this.options.openLinkOnClick){i=!0;const s=n.href;window.open(s,"_blank")}return this.options.selectTextOnClick&&(i=!0,this.store.commands.selectText(r)),i}}}createPlugin(){return{appendTransaction:(e,t,r)=>{if(e.filter(f=>!!f.getMeta(this.name)).forEach(f=>{const h=f.getMeta(this.name);if(h.command===z2){const{range:m,attrs:b}=h,{selection:y,doc:g}=r,v={range:m,selection:y,doc:g,attrs:b},{from:E,to:k}=m??y;this.options.onUpdateLink(g.textBetween(E,k),v)}}),!this.options.autoLink||k0(t)-k0(r)===1||!e.some(f=>f.docChanged))return;const s=yP(e,t),a=QO(s,[St,Ut]),{mapping:l}=s,{tr:c,doc:u}=r,{updateLink:d,removeLink:p}=this.store.chain(c);if(a.forEach(({prevFrom:f,prevTo:h,from:m,to:b})=>{const y=[],g=b-m===2,v=this.getLinkMarksInRange(t.doc,f,h,!0).filter(E=>E.mark.type===this.type).map(({from:E,to:k,text:x})=>({mappedFrom:l.map(E),mappedTo:l.map(k),text:x,from:E,to:k}));v.forEach(({mappedFrom:E,mappedTo:k,from:x,to:w},C)=>this.getLinkMarksInRange(u,E,k,!0).filter(T=>T.mark.type===this.type).forEach(T=>{const O=t.doc.textBetween(x,w,void 0," "),_=u.textBetween(T.from,T.to+1,void 0," ").trim(),P=this.isValidUrl(O);this.isValidUrl(_)||(P&&(p({from:T.from,to:T.to}).tr(),v.splice(C,1)),!g&&m===b&&this.findAutoLinks(_).map(B=>this.addLinkProperties({...B,from:E+B.start,to:E+B.end})).forEach(({attrs:B,range:F,text:z})=>{d(B,F).tr(),y.push({attrs:B,range:F,text:z})}))})),this.findTextBlocksInRange(u,{from:m,to:b}).forEach(({text:E,positionStart:k})=>{this.findAutoLinks(E).map(x=>this.addLinkProperties({...x,from:k+x.start+1,to:k+x.end+1})).filter(({range:x})=>{const w=m>=x.from&&m<=x.to,C=b>=x.from&&b<=x.to;return w||C||g}).filter(({range:x})=>this.getLinkMarksInRange(c.doc,x.from,x.to,!1).length===0).filter(({range:{from:x},text:w})=>!v.some(({text:C,mappedFrom:T})=>T===x&&C===w)).forEach(({attrs:x,text:w,range:C})=>{d(x,C).tr(),y.push({attrs:x,range:C,text:w})})}),window.requestAnimationFrame(()=>{y.forEach(({attrs:E,range:k,text:x})=>{const{doc:w,selection:C}=c;this.options.onUpdateLink(x,{attrs:E,doc:w,range:k,selection:C})})})}),c.steps.length!==0)return c}}}buildHref(e){return this.options.extractHref({url:e,defaultProtocol:this.options.defaultProtocol})}getLinkMarksInRange(e,t,r,n){const o=[];if(t===r){const i=Math.max(t-1,0),s=e.resolve(i),a=ai(s,this.type);(a==null?void 0:a.mark.attrs.auto)===n&&o.push(a)}else e.nodesBetween(t,r,(i,s)=>{const l=(i.marks??[]).find(({type:c,attrs:u})=>c===this.type&&u.auto===n);l&&o.push({from:s,to:s+i.nodeSize,mark:l,text:i.textContent})});return o}findTextBlocksInRange(e,t){const r=[];return e.nodesBetween(t.from,t.to,(n,o)=>{!n.isTextblock||!n.type.allowsMarkType(this.type)||r.push({node:n,pos:o})}),r.map(n=>({text:e.textBetween(n.pos,n.pos+n.node.nodeSize,void 0," "),positionStart:n.pos}))}addLinkProperties({from:e,to:t,href:r,...n}){return{...n,range:{from:e,to:t},attrs:{href:r,auto:!0}}}findAutoLinks(e){if(this.options.findAutoLinks)return this.options.findAutoLinks(e,this.options.defaultProtocol);const t=[];for(const r of cc(e,this.options.autoLinkRegex)){const n=xl(r);if(!n)continue;const o=this.buildHref(n);!this.isValidTLD(o)&&!o.startsWith("tel:")||t.push({text:n,href:o,start:r.index,end:r.index+n.length})}return t}isValidUrl(e){var t;return this.options.isValidUrl?this.options.isValidUrl(e,this.options.defaultProtocol):this.isValidTLD(this.buildHref(e))&&!!((t=this._autoLinkRegexNonGlobal)!=null&&t.test(e))}isValidTLD(e){const{autoLinkAllowedTLDs:t}=this.options;if(t.length===0)return!0;const r=qle(e);if(r==="")return!0;const n=K4(r.split("."));return t.includes(n)}};lp([Nt({shortcut:V.InsertLink})],wa.prototype,"shortcut",1);lp([Z()],wa.prototype,"updateLink",1);lp([Z()],wa.prototype,"selectLink",1);lp([Z()],wa.prototype,"removeLink",1);wa=lp([ye({defaultOptions:{autoLink:!1,defaultProtocol:"",selectTextOnClick:!1,openLinkOnClick:!1,autoLinkRegex:Qle,autoLinkAllowedTLDs:Jle,findAutoLinks:void 0,isValidUrl:void 0,defaultTarget:null,supportedTargets:[],extractHref:ece},staticKeys:["autoLinkRegex"],handlerKeyOptions:{onClick:{earlyReturnValue:!0}},handlerKeys:["onActivateLink","onShortcut","onUpdateLink","onClick"],defaultPriority:Ue.Medium})],wa);function ece({url:e,defaultProtocol:t}){const r=/^((?:https?|ftp)?:)\/\//.test(e);return!r&&e.includes("@")?`mailto:${e}`:r?e:`${t}//${e}`}function tce(e){for(var t=1;t0&&e[t-1]===` -`;)t--;return e.substring(0,t)}var oce=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function GE(e){return WE(e,oce)}var qI=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function XI(e){return WE(e,qI)}function ice(e){return JI(e,qI)}var ZI=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function sce(e){return WE(e,ZI)}function ace(e){return JI(e,ZI)}function WE(e,t){return t.indexOf(e.nodeName)>=0}function JI(e,t){return e.getElementsByTagName&&t.some(function(r){return e.getElementsByTagName(r).length})}var gr={};gr.paragraph={filter:"p",replacement:function(e){return` - -`+e+` - -`}};gr.lineBreak={filter:"br",replacement:function(e,t,r){return r.br+` -`}};gr.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function(e,t,r){var n=Number(t.nodeName.charAt(1));if(r.headingStyle==="setext"&&n<3){var o=Ry(n===1?"=":"-",e.length);return` - -`+e+` +`;rn.div` + ${hk} +`;Zt` + ${Yx} + ${Xx} + ${qx} + ${Zx} + ${Qx} + ${Jx} + ${ek} + ${tk} + ${nk} + ${rk} + ${ok} + ${ik} + ${sk} + ${ak} + ${lk} + ${ck} + ${uk} + ${dk} + ${hk} +`;var Iue=rn.div` + ${Yx} + ${Xx} + ${qx} + ${Zx} + ${Qx} + ${Jx} + ${ek} + ${tk} + ${nk} + ${rk} + ${ok} + ${ik} + ${sk} + ${ak} + ${lk} + ${ck} + ${uk} + ${dk} + ${hk} +`,Lue=Object.defineProperty,Nue=Object.getOwnPropertyDescriptor,RN=(t,e,n,r)=>{for(var o=r>1?void 0:r?Nue(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&Lue(e,n,o),o},fk=class extends Pn{get name(){return"blockquote"}createTags(){return[Ee.Block,Ee.FormattingNode]}createNodeSpec(t,e){return{content:"block+",defining:!0,draggable:!1,...e,attrs:t.defaults(),parseDOM:[{tag:"blockquote",getAttrs:t.parse,priority:100},...e.parseDOM??[]],toDOM:n=>["blockquote",t.dom(n),0]}}toggleBlockquote(){return W2(this.type)}shortcut(t){return this.toggleBlockquote()(t)}createInputRules(){return[am(/^\s*>\s$/,this.type)]}createPasteRules(){return{type:"node",nodeType:this.type,regexp:/^\s*>\s$/,startOfTextBlock:!0}}};RN([de({icon:"doubleQuotesL",description:({t})=>t(bS.DESCRIPTION),label:({t})=>t(bS.LABEL)})],fk.prototype,"toggleBlockquote",1);RN([nn({shortcut:"Ctrl->",command:"toggleBlockquote"})],fk.prototype,"shortcut",1);var $ue=Object.defineProperty,Due=Object.getOwnPropertyDescriptor,sf=(t,e,n,r)=>{for(var o=r>1?void 0:r?Due(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&$ue(e,n,o),o},Pue={icon:"bold",label:({t})=>t(wS.LABEL),description:({t})=>t(wS.DESCRIPTION)},dl=class extends ea{get name(){return"bold"}createTags(){return[Ee.FormattingMark,Ee.FontStyle]}createMarkSpec(t,e){return{...e,attrs:t.defaults(),parseDOM:[{tag:"strong",getAttrs:t.parse},{tag:"b",getAttrs:n=>zt(n)&&n.style.fontWeight!=="normal"?t.parse(n):!1},{style:"font-weight",getAttrs:n=>ke(n)&&/^(bold(er)?|[5-9]\d{2,})$/.test(n)?null:!1},...e.parseDOM??[]],toDOM:n=>{const{weight:r}=this.options;return r?["strong",{"font-weight":r.toString()},0]:["strong",t.dom(n),0]}}}createInputRules(){return[Kd({regexp:/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,type:this.type,ignoreWhitespace:!0})]}toggleBold(t){return Ws({type:this.type,selection:t})}setBold(t){return({tr:e,dispatch:n})=>{const{from:r,to:o}=po(t??e.selection,e.doc);return n==null||n(e.addMark(r,o,this.type.create())),!0}}removeBold(t){return({tr:e,dispatch:n})=>{const{from:r,to:o}=po(t??e.selection,e.doc);return e.doc.rangeHasMark(r,o,this.type)?(n==null||n(e.removeMark(r,o,this.type)),!0):!1}}shortcut(t){return this.toggleBold()(t)}};sf([de(Pue)],dl.prototype,"toggleBold",1);sf([de()],dl.prototype,"setBold",1);sf([de()],dl.prototype,"removeBold",1);sf([nn({shortcut:oe.Bold,command:"toggleBold"})],dl.prototype,"shortcut",1);dl=sf([Pe({defaultOptions:{weight:void 0},staticKeys:["weight"]})],dl);var zue=Object.defineProperty,Fue=Object.getOwnPropertyDescriptor,pk=(t,e,n,r)=>{for(var o=r>1?void 0:r?Fue(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&zue(e,n,o),o},{DESCRIPTION:Bue,LABEL:Hue}=o5,Uue={icon:"codeLine",description:({t})=>t(Bue),label:({t})=>t(Hue)},Th=class extends ea{get name(){return"code"}createTags(){return[Ee.Code,Ee.ExcludeInputRules]}createMarkSpec(t,e){return{excludes:"_",...e,attrs:t.defaults(),parseDOM:[{tag:"code",getAttrs:t.parse},...e.parseDOM??[]],toDOM:n=>["code",{spellcheck:"false",...t.dom(n)},0]}}createKeymap(){return{"Mod-`":Ws({type:this.type})}}keyboardShortcut(t){return this.toggleCode()(t)}toggleCode(){return Ws({type:this.type})}createInputRules(){return[Kd({regexp:new RegExp(`(?:\`)([^\`${cb}]+)(?:\`)$`),type:this.type,ignoreWhitespace:!0})]}createPasteRules(){return[{type:"mark",regexp:/`([^`]+)`/g,markType:this.type}]}};pk([nn({shortcut:oe.Code,command:"toggleCode"})],Th.prototype,"keyboardShortcut",1);pk([de(Uue)],Th.prototype,"toggleCode",1);Th=pk([Pe({})],Th);var MN=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},et=(t,e,n)=>(MN(t,e,"read from private field"),n?n.call(t):e.get(t)),ec=(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)},hs=(t,e,n,r)=>(MN(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Wue='',Vue='',jue=encodeURIComponent(Wue),Gue=encodeURIComponent(Vue),gr,Kue=class{constructor(t){ec(this,gr,void 0);const e=document.createElement("div"),n=document.createElement("div");this.dom=e,hs(this,gr,n),this.type=t,this.createHandle(t)}createHandle(t){switch(Wn(this.dom,{position:"absolute",pointerEvents:"auto",display:"flex",alignItems:"center",justifyContent:"center",zIndex:"100"}),Wn(et(this,gr),{opacity:"0",transition:"opacity 300ms ease-in 0s"}),et(this,gr).dataset.dragging="",t){case 0:Wn(this.dom,{right:"0px",top:"0px",height:"100%",width:"15px",cursor:"col-resize"}),Wn(et(this,gr),{width:" 4px",height:"36px",maxHeight:"50%",boxSizing:"content-box",background:"rgba(0, 0, 0, 0.65)",border:"1px solid rgba(255, 255, 255, 0.5)",borderRadius:"6px"});break;case 1:Wn(this.dom,{left:"0px",top:"0px",height:"100%",width:"15px",cursor:"col-resize"}),Wn(et(this,gr),{width:" 4px",height:"36px",maxHeight:"50%",boxSizing:"content-box",background:"rgba(0, 0, 0, 0.65)",border:"1px solid rgba(255, 255, 255, 0.5)",borderRadius:"6px"});break;case 2:Wn(this.dom,{bottom:"0px",width:"100%",height:"14px",cursor:"row-resize"}),Wn(et(this,gr),{width:" 42px",height:"4px",boxSizing:"content-box",maxWidth:"50%",background:"rgba(0, 0, 0, 0.65)",border:"1px solid rgba(255, 255, 255, 0.5)",borderRadius:"6px"});break;case 3:Wn(this.dom,{right:"-1px",bottom:"-2px",width:"30px",height:"30px",cursor:"nwse-resize",zIndex:"101"}),Wn(et(this,gr),{height:"22px",width:"22px",backgroundRepeat:"no-repeat",backgroundImage:`url("data:image/svg+xml,${Gue}") `});break;case 4:Wn(this.dom,{left:"-1px",bottom:"-2px",width:"30px",height:"30px",cursor:"nesw-resize",zIndex:"101"}),Wn(et(this,gr),{height:"22px",width:"22px",backgroundRepeat:"no-repeat",backgroundImage:`url("data:image/svg+xml,${jue}") `});break}this.dom.append(et(this,gr))}setHandleVisibility(t){const e=t||!!et(this,gr).dataset.dragging;et(this,gr).style.opacity=e?"1":"0"}dataSetDragging(t){et(this,gr).dataset.dragging=t?"true":""}};gr=new WeakMap;var Qf=50,ON=(t=>(t[t.Fixed=0]="Fixed",t[t.Flexible=1]="Flexible",t))(ON||{}),Ca,Ta,Aa,Ti,_a,Yue=class{constructor({node:t,view:e,getPos:n,aspectRatio:r=0,options:o,initialSize:i}){ec(this,Ca,void 0),ec(this,Ta,void 0),ec(this,Aa,[]),ec(this,Ti,void 0),ec(this,_a,void 0);const s=this.createWrapper(t,i),l=this.createElement({node:t,view:e,getPos:n,options:o}),u=(r===1?[0,1,2,3,4]:[0,1]).map(h=>new Kue(h));for(const h of u){const f=p=>{this.startResizing(p,e,n,h)};h.dom.addEventListener("mousedown",f),et(this,Aa).push(()=>h.dom.removeEventListener("mousedown",f)),s.append(h.dom)}const c=()=>{u.forEach(h=>h.setHandleVisibility(!0))},d=()=>{u.forEach(h=>h.setHandleVisibility(!1))};s.addEventListener("mouseover",c),s.addEventListener("mouseout",d),et(this,Aa).push(()=>s.removeEventListener("mouseover",c),()=>s.removeEventListener("mouseout",d)),s.append(l),this.dom=s,hs(this,Ta,t),hs(this,Ca,l),this.aspectRatio=r}createWrapper(t,e){const n=document.createElement("div");return n.classList.add("remirror-resizable-view"),n.style.position="relative",e?Wn(n,{width:d_(e.width),aspectRatio:`${e.width} / ${e.height}`}):Wn(n,{width:d_(t.attrs.width),aspectRatio:`${t.attrs.width} / ${t.attrs.height}`}),Wn(n,{maxWidth:"100%",minWidth:`${Qf}px`,verticalAlign:"bottom",display:"inline-block",lineHeight:"0",transition:"width 0.15s ease-out, height 0.15s ease-out"}),n}startResizing(t,e,n,r){var o,i;t.preventDefault(),r.dataSetDragging(!0),et(this,Ca).style.pointerEvents="none";const s=t.pageX,l=t.pageY,a=((o=et(this,Ca))==null?void 0:o.getBoundingClientRect().width)||0,u=((i=et(this,Ca))==null?void 0:i.getBoundingClientRect().height)||0,c=d0(100,!1,h=>{const f=h.pageX,p=h.pageY,g=f-s,m=p-l;let v=null,y=null;if(this.aspectRatio===0&&a&&u)switch(r.type){case 0:case 3:v=a+g,y=u/a*v;break;case 1:case 4:v=a-g,y=u/a*v;break;case 2:y=u+m,v=a/u*y;break}else if(this.aspectRatio===1)switch(r.type){case 0:v=a+g;break;case 1:v=a-g;break;case 2:y=u+m;break;case 3:v=a+g,y=u+m;break;case 4:v=a-g,y=u+m;break}typeof v=="number"&&v{h.preventDefault(),r.dataSetDragging(!1),r.setHandleVisibility(!1),et(this,Ca).style.pointerEvents="auto",document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",d);const f=n(),p=e.state.tr.setNodeMarkup(f,void 0,{...et(this,Ta).attrs,width:et(this,Ti),height:et(this,_a)});e.dispatch(p)};document.addEventListener("mousemove",c),document.addEventListener("mouseup",d),et(this,Aa).push(()=>document.removeEventListener("mousemove",c)),et(this,Aa).push(()=>document.removeEventListener("mouseup",d))}update(t){return t.type!==et(this,Ta).type||this.aspectRatio===0&&t.attrs.width&&t.attrs.width!==et(this,Ti)||this.aspectRatio===1&&t.attrs.width&&t.attrs.height&&t.attrs.width!==et(this,Ti)&&t.attrs.height!==et(this,_a)||!Xue(et(this,Ta),t,["width","height"])?!1:(hs(this,Ta,t),hs(this,Ti,t.attrs.width),hs(this,_a,t.attrs.height),!0)}destroy(){et(this,Aa).forEach(t=>t())}};Ca=new WeakMap;Ta=new WeakMap;Aa=new WeakMap;Ti=new WeakMap;_a=new WeakMap;function Xue(t,e,n){return t===e||que(t,e,n)&&t.content.eq(e.content)}function que(t,e,n){const r=t.attrs,o=e.attrs,i={};for(const l of n)i[l]=null;t.attrs={...r,...i},e.attrs={...o,...i};const s=t.sameMarkup(e);return t.attrs=r,e.attrs=o,s}function d_(t){return typeof t=="number"?`${t}px`:t||void 0}var Zue=Object.defineProperty,Que=Object.getOwnPropertyDescriptor,IN=(t,e,n,r)=>{for(var o=r>1?void 0:r?Que(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&Zue(e,n,o),o},Ug=class extends Pn{get name(){return"hardBreak"}createTags(){return[Ee.InlineNode]}createNodeSpec(t,e){return{inline:!0,selectable:!1,atom:!0,leafText:()=>` +`,...e,attrs:t.defaults(),parseDOM:[{tag:"br",getAttrs:t.parse},...e.parseDOM??[]],toDOM:n=>["br",t.dom(n)]}}createKeymap(){const t=Nz(Sd(Q2),()=>(this.store.commands.insertHardBreak(),!0));return{"Mod-Enter":t,"Shift-Enter":t}}insertHardBreak(){return t=>{const{tr:e,dispatch:n}=t;return n==null||n(e.replaceSelectionWith(this.type.create()).scrollIntoView()),!0}}};IN([de()],Ug.prototype,"insertHardBreak",1);Ug=IN([Pe({defaultPriority:dt.Low})],Ug);var Jue=Object.defineProperty,ede=Object.getOwnPropertyDescriptor,LN=(t,e,n,r)=>{for(var o=r>1?void 0:r?ede(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&Jue(e,n,o),o},{LABEL:tde}=s5,nde={icon:({attrs:t})=>`h${(t==null?void 0:t.level)??"1"}`,label:({t,attrs:e})=>t({...tde,values:{level:e==null?void 0:e.level}})},rde=[oe.H1,oe.H2,oe.H3,oe.H4,oe.H5,oe.H6],Wg=class extends Pn{get name(){return"heading"}createTags(){return[Ee.Block,Ee.TextBlock,Ee.FormattingNode]}createNodeSpec(t,e){return{content:"inline*",defining:!0,draggable:!1,...e,attrs:{...t.defaults(),level:{default:this.options.defaultLevel}},parseDOM:[...this.options.levels.map(n=>({tag:`h${n}`,getAttrs:r=>({...t.parse(r),level:n})})),...e.parseDOM??[]],toDOM:n=>this.options.levels.includes(n.attrs.level)?[`h${n.attrs.level}`,t.dom(n),0]:[`h${this.options.defaultLevel}`,t.dom(n),0]}}toggleHeading(t={}){return $b({type:this.type,toggleType:"paragraph",attrs:t})}createKeymap(t){const e=this.store.getExtension(We),n=be(),r=[];for(const o of this.options.levels){const i=rde[o-1]??oe.H1;n[i]=Gd(this.type,{level:o}),r.push({attrs:{level:o},shortcut:t(i)[0]})}return e.updateDecorated("toggleHeading",{shortcut:r}),n}createInputRules(){return this.options.levels.map(t=>M5(new RegExp(`^(#{1,${t}})\\s$`),this.type,()=>({level:t})))}createPasteRules(){return this.options.levels.map(t=>({type:"node",nodeType:this.type,regexp:new RegExp(`^#{${t}}\\s([\\s\\w]+)$`),getAttributes:()=>({level:t}),startOfTextBlock:!0}))}};LN([de(nde)],Wg.prototype,"toggleHeading",1);Wg=LN([Pe({defaultOptions:{levels:[1,2,3,4,5,6],defaultLevel:1},staticKeys:["defaultLevel","levels"]})],Wg);var ode=Object.defineProperty,ide=Object.getOwnPropertyDescriptor,NN=(t,e,n,r)=>{for(var o=r>1?void 0:r?ide(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&ode(e,n,o),o},sde={icon:"separator",label:({t})=>t(xS.LABEL),description:({t})=>t(xS.DESCRIPTION)},Vg=class extends Pn{get name(){return"horizontalRule"}createTags(){return[Ee.Block]}createNodeSpec(t,e){return{...e,attrs:t.defaults(),parseDOM:[{tag:"hr",getAttrs:t.parse},...e.parseDOM??[]],toDOM:n=>["hr",t.dom(n)]}}insertHorizontalRule(){return t=>{const{tr:e,dispatch:n}=t,r=e.selection.$anchor,o=r.parent;return o.type.name==="doc"||o.isAtom||o.isLeaf?!1:(n&&(e.selection.empty&&fm(o)&&e.insert(r.pos+1,o),e.replaceSelectionWith(this.type.create()),this.updateFromNodeSelection(e),n(e.scrollIntoView())),!0)}}createInputRules(){return[G2({regexp:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type,beforeDispatch:({tr:t})=>{this.updateFromNodeSelection(t)}})]}updateFromNodeSelection(t){if(!Wh(t.selection)||t.selection.node.type.name!==this.name)return;const e=t.selection.$from.pos+1,{insertionNode:n}=this.options;if(!n)return;const r=this.store.schema.nodes[n];we(r,{code:re.EXTENSION,message:`'${n}' node provided as the insertionNode to the '${this.constructorName}' does not exist.`});const o=r.create();t.insert(e,o),t.setSelection(Ie.near(t.doc.resolve(e+1)))}};NN([de(sde)],Vg.prototype,"insertHorizontalRule",1);Vg=NN([Pe({defaultOptions:{insertionNode:"paragraph"}})],Vg);var ade=Object.defineProperty,lde=Object.getOwnPropertyDescriptor,gk=(t,e,n,r)=>{for(var o=r>1?void 0:r?lde(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&ade(e,n,o),o},cde=class extends Yue{constructor(t,e,n){super({node:t,view:e,getPos:n,aspectRatio:ON.Fixed})}createElement({node:t}){const e=document.createElement("img");return e.setAttribute("src",t.attrs.src),Wn(e,{width:"100%",minWidth:"50px",objectFit:"contain"}),e}},Ah=class extends Pn{get name(){return"image"}createTags(){return[Ee.InlineNode,Ee.Media]}createNodeSpec(t,e){const{preferPastedTextContent:n}=this.options;return{inline:!0,draggable:!0,selectable:!1,...e,attrs:{...t.defaults(),alt:{default:""},crop:{default:null},height:{default:null},width:{default:null},rotate:{default:null},src:{default:null},title:{default:""},fileName:{default:null},resizable:{default:!1}},parseDOM:[{tag:"img[src]",getAttrs:r=>{var o;if(zt(r)){const i=dde({element:r,parse:t.parse});return n&&((o=i.src)!=null&&o.startsWith("file:///"))?!1:i}return{}}},...e.parseDOM??[]],toDOM:r=>{const o=gm(r.attrs,t);return["img",{...t.dom(r),...o}]}}}insertImage(t,e){return({tr:n,dispatch:r})=>{const{from:o,to:i}=po(e??n.selection,n.doc),s=this.type.create(t);return r==null||r(n.replaceRangeWith(o,i,s)),!0}}uploadImage(t,e){const{updatePlaceholder:n,destroyPlaceholder:r,createPlaceholder:o}=this.options;return i=>{const{tr:s}=i;let l=s.selection.from;return this.store.createPlaceholderCommand({promise:t,placeholder:{type:"widget",get pos(){return l},createElement:(a,u)=>{const c=o(a,u);return e==null||e(c),c},onUpdate:(a,u,c,d)=>{n(a,u,c,d)},onDestroy:(a,u)=>{r(a,u)}},onSuccess:(a,u,c)=>this.insertImage(a,u)(c)}).validate(({tr:a,dispatch:u})=>{const c=DR(a.doc,l,this.type);return c==null?!1:(l=c,a.selection.empty||u==null||u(a.deleteSelection()),!0)},"unshift").generateCommand()(i)}}fileUploadFileHandler(t,e,n){var r;const{preferPastedTextContent:o,uploadHandler:i}=this.options;if(o&&pde(e)&&((r=e.clipboardData)!=null&&r.getData("text/plain")))return!1;const{commands:s,chain:l}=this.store,a=t.map((c,d)=>({file:c,progress:h=>{s.updatePlaceholder(u[d],h)}})),u=i(a);Yr(n)&&l.selectText(n);for(const c of u)l.uploadImage(c);return l.run(),!0}createPasteRules(){return[{type:"file",regexp:/image/i,fileHandler:t=>{const e=t.type==="drop"?t.pos:void 0;return this.fileUploadFileHandler(t.files,t.event,e)}}]}createNodeViews(){return this.options.enableResizing?(t,e,n)=>new cde(t,e,n):{}}};gk([de()],Ah.prototype,"insertImage",1);gk([de()],Ah.prototype,"uploadImage",1);Ah=gk([Pe({defaultOptions:{createPlaceholder:hde,updatePlaceholder:()=>{},destroyPlaceholder:()=>{},uploadHandler:fde,enableResizing:!1,preferPastedTextContent:!0}})],Ah);function ude(t){let{width:e,height:n}=t.style;return e=e||t.getAttribute("width")||"",n=n||t.getAttribute("height")||"",{width:e,height:n}}function dde({element:t,parse:e}){const{width:n,height:r}=ude(t);return{...e(t),alt:t.getAttribute("alt")??"",height:Number.parseInt(r||"0",10)||null,src:t.getAttribute("src")??null,title:t.getAttribute("title")??"",width:Number.parseInt(n||"0",10)||null,fileName:t.getAttribute("data-file-name")??null}}function hde(t,e){const n=document.createElement("div");return n.classList.add(UW.IMAGE_LOADER),n}function fde(t){we(t.length>0,{code:re.EXTENSION,message:"The upload handler was applied for the image extension without any valid files"});let e=0;const n=[];for(const{file:r,progress:o}of t)n.push(()=>new Promise(i=>{const s=new FileReader;s.addEventListener("load",l=>{var a;e+=1,o(e/t.length),i({src:(a=l.target)==null?void 0:a.result,fileName:r.name})},{once:!0}),s.readAsDataURL(r)}));return n}function pde(t){return t.clipboardData!==void 0}var gde=Object.defineProperty,mde=Object.getOwnPropertyDescriptor,mk=(t,e,n,r)=>{for(var o=r>1?void 0:r?mde(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&gde(e,n,o),o},vde={icon:"italic",label:({t})=>t(kS.LABEL),description:({t})=>t(kS.DESCRIPTION)},_h=class extends ea{get name(){return"italic"}createTags(){return[Ee.FontStyle,Ee.FormattingMark]}createMarkSpec(t,e){return{...e,attrs:t.defaults(),parseDOM:[{tag:"i",getAttrs:t.parse},{tag:"em",getAttrs:t.parse},{style:"font-style=italic"},...e.parseDOM??[]],toDOM:n=>["em",t.dom(n),0]}}createKeymap(){return{"Mod-i":Ws({type:this.type})}}createInputRules(){return[Kd({regexp:/(?:^|[^*])\*([^*]+)\*$/,type:this.type,ignoreWhitespace:!0,updateCaptured:({fullMatch:t,start:e})=>t.startsWith("*")?{}:{fullMatch:t.slice(1),start:e+1}}),Kd({regexp:/(?:^|\W)_([^_]+)_$/,type:this.type,ignoreWhitespace:!0,updateCaptured:({fullMatch:t,start:e})=>t.startsWith("_")?{}:{fullMatch:t.slice(1),start:e+1}})]}createPasteRules(){return[{type:"mark",markType:this.type,regexp:/(?:^|\W)_([^_]+)_/g},{type:"mark",markType:this.type,regexp:/\*([^*]+)\*/g}]}toggleItalic(t){return Ws({type:this.type,selection:t})}shortcut(t){return this.toggleItalic()(t)}};mk([de(vde)],_h.prototype,"toggleItalic",1);mk([nn({shortcut:oe.Italic,command:"toggleItalic"})],_h.prototype,"shortcut",1);_h=mk([Pe({})],_h);var $N={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(typeof self<"u"?self:ut,function(){return function(n){function r(i){if(o[i])return o[i].exports;var s=o[i]={i,l:!1,exports:{}};return n[i].call(s.exports,s,s.exports,r),s.l=!0,s.exports}var o={};return r.m=n,r.c=o,r.d=function(i,s,l){r.o(i,s)||Object.defineProperty(i,s,{configurable:!1,enumerable:!0,get:l})},r.n=function(i){var s=i&&i.__esModule?function(){return i.default}:function(){return i};return r.d(s,"a",s),s},r.o=function(i,s){return Object.prototype.hasOwnProperty.call(i,s)},r.p="",r(r.s=0)}([function(n,r,o){function i(){throw new TypeError("The given URL is not a string. Please verify your string|array.")}function s(u){typeof u!="string"&&i();for(var c=0,d=0,h=0,f=u.length,p=0;f--&&++p&&!(c&&-1h?"":u.slice(h,c)}var l=["/",":","?","#"],a=[".","/","@"];n.exports=function(u){if(typeof u=="string")return s(u);if(Array.isArray(u)){var c=[],d,h=0;for(d=u.length;h{for(var o=r>1?void 0:r?xde(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&wde(e,n,o),o},kde=["com","de","net","org","uk","cn","ga","nl","cf","ml","tk","ru","br","gq","xyz","fr","eu","info","co","au","ca","it","in","ch","pl","es","online","us","top","be","jp","biz","se","at","dk","cz","za","me","ir","icu","shop","kr","site","mx","hu","io","cc","club","no","cyou"],h_="updateLink",Ede=/(?:(?:(?:https?|ftp):)?\/\/)?(?:\S+(?::\S*)?@)?(?:(?:[\da-z\u00A1-\uFFFF][\w\u00A1-\uFFFF-]{0,62})?[\da-z\u00A1-\uFFFF]\.)*(?:(?:\d(?!\.)|[a-z\u00A1-\uFFFF])(?:[\da-z\u00A1-\uFFFF][\w\u00A1-\uFFFF-]{0,62})?[\da-z\u00A1-\uFFFF]\.)+[a-z\u00A1-\uFFFF]{2,}(?::\d{2,5})?(?:[#/?]\S*)?/gi,hl=class extends ea{constructor(){super(...arguments),this._autoLinkRegexNonGlobal=void 0}get name(){return"link"}createTags(){return[Ee.Link,Ee.ExcludeInputRules]}createMarkSpec(t,e){const n="data-link-auto",r=o=>{const{defaultTarget:i,supportedTargets:s}=this.options,l=i?[...s,i]:s;return o&&sr(l,o)?{target:o}:void 0};return{inclusive:!1,excludes:"_",...e,attrs:{...t.defaults(),href:{},target:{default:this.options.defaultTarget},auto:{default:!1}},parseDOM:[{tag:"a[href]",getAttrs:o=>{if(!zt(o))return!1;const i=o.getAttribute("href"),s=o.textContent,l=this.options.autoLink&&(o.hasAttribute(n)||i===s||(i==null?void 0:i.replace(`${this.options.defaultProtocol}//`,""))===s);return{...t.parse(o),href:i,auto:l,...r(o.getAttribute("target"))}}},...e.parseDOM??[]],toDOM:o=>{const{auto:i,target:s,...l}=gm(o.attrs,t),a=o.attrs.auto?{[n]:""}:{},u="noopener noreferrer nofollow";return["a",{...t.dom(o),...l,rel:u,...a,...r(o.attrs.target)},0]}}}onCreate(){const{autoLinkRegex:t}=this.options;this._autoLinkRegexNonGlobal=new RegExp(`^${t.source}$`,t.flags.replace("g",""))}shortcut({tr:t}){let e="",{from:n,to:r,empty:o,$from:i}=t.selection,s=!1;const l=Hi(i,this.type);if(o){const a=l??z2(t);if(!a)return!1;({text:e,from:n,to:r}=a),s=!0}return n===r?!1:(s||(e=t.doc.textBetween(n,r)),this.options.onActivateLink(e),this.options.onShortcut({activeLink:l?{attrs:l.mark.attrs,from:l.from,to:l.to}:void 0,selectedText:e,from:n,to:r}),!0)}updateLink(t,e){return n=>{const{tr:r}=n;return!(Js(r.selection)&&!Ob(r.selection)||Zz(r.selection)||Jp({trState:r,type:this.type}))&&!e?!1:(r.setMeta(this.name,{command:h_,attrs:t,range:e}),yF({type:this.type,attrs:t,range:e})(n))}}selectLink(){return this.store.commands.selectMark.original(this.type)}removeLink(t){return e=>{const{tr:n}=e;return Jp({trState:n,type:this.type,...t})?j2({type:this.type,expand:!0,range:t})(e):!1}}createPasteRules(){return[{type:"mark",regexp:this.options.autoLinkRegex,markType:this.type,getAttributes:(t,e)=>({href:this.buildHref(yc(t)),auto:!e}),transformMatch:t=>{const e=yc(t);return!e||!this.isValidUrl(e)?!1:e}}]}createEventHandlers(){return{clickMark:(t,e)=>{const n=e.getMark(this.type);if(!n)return;const r=n.mark.attrs,o={...r,...n};if(this.options.onClick(t,o))return!0;if(!this.store.view.editable)return;let i=!1;if(this.options.openLinkOnClick){i=!0;const s=r.href;window.open(s,"_blank")}return this.options.selectTextOnClick&&(i=!0,this.store.commands.selectText(n)),i}}}createPlugin(){return{appendTransaction:(t,e,n)=>{if(t.filter(f=>!!f.getMeta(this.name)).forEach(f=>{const p=f.getMeta(this.name);if(p.command===h_){const{range:g,attrs:m}=p,{selection:v,doc:y}=n,b={range:g,selection:v,doc:y,attrs:m},{from:w,to:k}=g??v;this.options.onUpdateLink(y.textBetween(w,k),b)}}),!this.options.autoLink||V0(e)-V0(n)===1||!t.some(f=>f.docChanged))return;const s=Dz(t,e),l=P2(s,[qt,yn]),{mapping:a}=s,{tr:u,doc:c}=n,{updateLink:d,removeLink:h}=this.store.chain(u);if(l.forEach(({prevFrom:f,prevTo:p,from:g,to:m})=>{const v=[],y=m-g===2,b=this.getLinkMarksInRange(e.doc,f,p,!0).filter(w=>w.mark.type===this.type).map(({from:w,to:k,text:x})=>({mappedFrom:a.map(w),mappedTo:a.map(k),text:x,from:w,to:k}));b.forEach(({mappedFrom:w,mappedTo:k,from:x,to:S},T)=>this.getLinkMarksInRange(c,w,k,!0).filter(C=>C.mark.type===this.type).forEach(C=>{const O=e.doc.textBetween(x,S,void 0," "),_=c.textBetween(C.from,C.to+1,void 0," ").trim(),R=this.isValidUrl(O);this.isValidUrl(_)||(R&&(h({from:C.from,to:C.to}).tr(),b.splice(T,1)),!y&&g===m&&this.findAutoLinks(_).map(E=>this.addLinkProperties({...E,from:w+E.start,to:w+E.end})).forEach(({attrs:E,range:M,text:I})=>{d(E,M).tr(),v.push({attrs:E,range:M,text:I})}))})),this.findTextBlocksInRange(c,{from:g,to:m}).forEach(({text:w,positionStart:k})=>{this.findAutoLinks(w).map(x=>this.addLinkProperties({...x,from:k+x.start+1,to:k+x.end+1})).filter(({range:x})=>{const S=g>=x.from&&g<=x.to,T=m>=x.from&&m<=x.to;return S||T||y}).filter(({range:x})=>this.getLinkMarksInRange(u.doc,x.from,x.to,!1).length===0).filter(({range:{from:x},text:S})=>!b.some(({text:T,mappedFrom:C})=>C===x&&T===S)).forEach(({attrs:x,text:S,range:T})=>{d(x,T).tr(),v.push({attrs:x,range:T,text:S})})}),window.requestAnimationFrame(()=>{v.forEach(({attrs:w,range:k,text:x})=>{const{doc:S,selection:T}=u;this.options.onUpdateLink(x,{attrs:w,doc:S,range:k,selection:T})})})}),u.steps.length!==0)return u}}}buildHref(t){return this.options.extractHref({url:t,defaultProtocol:this.options.defaultProtocol})}getLinkMarksInRange(t,e,n,r){const o=[];if(e===n){const i=Math.max(e-1,0),s=t.resolve(i),l=Hi(s,this.type);(l==null?void 0:l.mark.attrs.auto)===r&&o.push(l)}else t.nodesBetween(e,n,(i,s)=>{const a=(i.marks??[]).find(({type:u,attrs:c})=>u===this.type&&c.auto===r);a&&o.push({from:s,to:s+i.nodeSize,mark:a,text:i.textContent})});return o}findTextBlocksInRange(t,e){const n=[];return t.nodesBetween(e.from,e.to,(r,o)=>{!r.isTextblock||!r.type.allowsMarkType(this.type)||n.push({node:r,pos:o})}),n.map(r=>({text:t.textBetween(r.pos,r.pos+r.node.nodeSize,void 0," "),positionStart:r.pos}))}addLinkProperties({from:t,to:e,href:n,...r}){return{...r,range:{from:t,to:e},attrs:{href:n,auto:!0}}}findAutoLinks(t){if(this.options.findAutoLinks)return this.options.findAutoLinks(t,this.options.defaultProtocol);const e=[];for(const n of su(t,this.options.autoLinkRegex)){const r=yc(n);if(!r)continue;const o=this.buildHref(r);!this.isValidTLD(o)&&!o.startsWith("tel:")||e.push({text:r,href:o,start:n.index,end:n.index+r.length})}return e}isValidUrl(t){var e;return this.options.isValidUrl?this.options.isValidUrl(t,this.options.defaultProtocol):this.isValidTLD(this.buildHref(t))&&!!((e=this._autoLinkRegexNonGlobal)!=null&&e.test(t))}isValidTLD(t){const{autoLinkAllowedTLDs:e}=this.options;if(e.length===0)return!0;const n=bde(t);if(n==="")return!0;const r=hD(n.split("."));return e.includes(r)}};af([nn({shortcut:oe.InsertLink})],hl.prototype,"shortcut",1);af([de()],hl.prototype,"updateLink",1);af([de()],hl.prototype,"selectLink",1);af([de()],hl.prototype,"removeLink",1);hl=af([Pe({defaultOptions:{autoLink:!1,defaultProtocol:"",selectTextOnClick:!1,openLinkOnClick:!1,autoLinkRegex:Ede,autoLinkAllowedTLDs:kde,findAutoLinks:void 0,isValidUrl:void 0,defaultTarget:null,supportedTargets:[],extractHref:Sde},staticKeys:["autoLinkRegex"],handlerKeyOptions:{onClick:{earlyReturnValue:!0}},handlerKeys:["onActivateLink","onShortcut","onUpdateLink","onClick"],defaultPriority:dt.Medium})],hl);function Sde({url:t,defaultProtocol:e}){const n=/^((?:https?|ftp)?:)\/\//.test(t);return!n&&t.includes("@")?`mailto:${t}`:n?t:`${e}//${t}`}function Cde(t){for(var e=1;e0&&t[e-1]===` +`;)e--;return t.substring(0,e)}var _de=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function vk(t){return yk(t,_de)}var DN=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function PN(t){return yk(t,DN)}function Rde(t){return FN(t,DN)}var zN=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function Mde(t){return yk(t,zN)}function Ode(t){return FN(t,zN)}function yk(t,e){return e.indexOf(t.nodeName)>=0}function FN(t,e){return t.getElementsByTagName&&e.some(function(n){return t.getElementsByTagName(n).length})}var Xn={};Xn.paragraph={filter:"p",replacement:function(t){return` + +`+t+` + +`}};Xn.lineBreak={filter:"br",replacement:function(t,e,n){return n.br+` +`}};Xn.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function(t,e,n){var r=Number(e.nodeName.charAt(1));if(n.headingStyle==="setext"&&r<3){var o=Jy(r===1?"=":"-",t.length);return` + +`+t+` `+o+` `}else return` -`+Ry("#",n)+" "+e+` +`+Jy("#",r)+" "+t+` -`}};gr.blockquote={filter:"blockquote",replacement:function(e){return e=e.replace(/^\n+|\n+$/g,""),e=e.replace(/^/gm,"> "),` +`}};Xn.blockquote={filter:"blockquote",replacement:function(t){return t=t.replace(/^\n+|\n+$/g,""),t=t.replace(/^/gm,"> "),` -`+e+` +`+t+` -`}};gr.list={filter:["ul","ol"],replacement:function(e,t){var r=t.parentNode;return r.nodeName==="LI"&&r.lastElementChild===t?` -`+e:` +`}};Xn.list={filter:["ul","ol"],replacement:function(t,e){var n=e.parentNode;return n.nodeName==="LI"&&n.lastElementChild===e?` +`+t:` -`+e+` +`+t+` -`}};gr.listItem={filter:"li",replacement:function(e,t,r){e=e.replace(/^\n+/,"").replace(/\n+$/,` +`}};Xn.listItem={filter:"li",replacement:function(t,e,n){t=t.replace(/^\n+/,"").replace(/\n+$/,` `).replace(/\n/gm,` - `);var n=r.bulletListMarker+" ",o=t.parentNode;if(o.nodeName==="OL"){var i=o.getAttribute("start"),s=Array.prototype.indexOf.call(o.children,t);n=(i?Number(i)+s:s+1)+". "}return n+e+(t.nextSibling&&!/\n$/.test(e)?` -`:"")}};gr.indentedCodeBlock={filter:function(e,t){return t.codeBlockStyle==="indented"&&e.nodeName==="PRE"&&e.firstChild&&e.firstChild.nodeName==="CODE"},replacement:function(e,t,r){return` + `);var r=n.bulletListMarker+" ",o=e.parentNode;if(o.nodeName==="OL"){var i=o.getAttribute("start"),s=Array.prototype.indexOf.call(o.children,e);r=(i?Number(i)+s:s+1)+". "}return r+t+(e.nextSibling&&!/\n$/.test(t)?` +`:"")}};Xn.indentedCodeBlock={filter:function(t,e){return e.codeBlockStyle==="indented"&&t.nodeName==="PRE"&&t.firstChild&&t.firstChild.nodeName==="CODE"},replacement:function(t,e,n){return` - `+t.firstChild.textContent.replace(/\n/g,` + `+e.firstChild.textContent.replace(/\n/g,` `)+` -`}};gr.fencedCodeBlock={filter:function(e,t){return t.codeBlockStyle==="fenced"&&e.nodeName==="PRE"&&e.firstChild&&e.firstChild.nodeName==="CODE"},replacement:function(e,t,r){for(var n=t.firstChild.getAttribute("class")||"",o=(n.match(/language-(\S+)/)||[null,""])[1],i=t.firstChild.textContent,s=r.fence.charAt(0),a=3,l=new RegExp("^"+s+"{3,}","gm"),c;c=l.exec(i);)c[0].length>=a&&(a=c[0].length+1);var u=Ry(s,a);return` +`}};Xn.fencedCodeBlock={filter:function(t,e){return e.codeBlockStyle==="fenced"&&t.nodeName==="PRE"&&t.firstChild&&t.firstChild.nodeName==="CODE"},replacement:function(t,e,n){for(var r=e.firstChild.getAttribute("class")||"",o=(r.match(/language-(\S+)/)||[null,""])[1],i=e.firstChild.textContent,s=n.fence.charAt(0),l=3,a=new RegExp("^"+s+"{3,}","gm"),u;u=a.exec(i);)u[0].length>=l&&(l=u[0].length+1);var c=Jy(s,l);return` -`+u+o+` +`+c+o+` `+i.replace(/\n$/,"")+` -`+u+` +`+c+` -`}};gr.horizontalRule={filter:"hr",replacement:function(e,t,r){return` +`}};Xn.horizontalRule={filter:"hr",replacement:function(t,e,n){return` -`+r.hr+` +`+n.hr+` -`}};gr.inlineLink={filter:function(e,t){return t.linkStyle==="inlined"&&e.nodeName==="A"&&e.getAttribute("href")},replacement:function(e,t){var r=t.getAttribute("href"),n=Ph(t.getAttribute("title"));return n&&(n=' "'+n+'"'),"["+e+"]("+r+n+")"}};gr.referenceLink={filter:function(e,t){return t.linkStyle==="referenced"&&e.nodeName==="A"&&e.getAttribute("href")},replacement:function(e,t,r){var n=t.getAttribute("href"),o=Ph(t.getAttribute("title"));o&&(o=' "'+o+'"');var i,s;switch(r.linkReferenceStyle){case"collapsed":i="["+e+"][]",s="["+e+"]: "+n+o;break;case"shortcut":i="["+e+"]",s="["+e+"]: "+n+o;break;default:var a=this.references.length+1;i="["+e+"]["+a+"]",s="["+a+"]: "+n+o}return this.references.push(s),i},references:[],append:function(e){var t="";return this.references.length&&(t=` +`}};Xn.inlineLink={filter:function(t,e){return e.linkStyle==="inlined"&&t.nodeName==="A"&&t.getAttribute("href")},replacement:function(t,e){var n=e.getAttribute("href"),r=jg(e.getAttribute("title"));return r&&(r=' "'+r+'"'),"["+t+"]("+n+r+")"}};Xn.referenceLink={filter:function(t,e){return e.linkStyle==="referenced"&&t.nodeName==="A"&&t.getAttribute("href")},replacement:function(t,e,n){var r=e.getAttribute("href"),o=jg(e.getAttribute("title"));o&&(o=' "'+o+'"');var i,s;switch(n.linkReferenceStyle){case"collapsed":i="["+t+"][]",s="["+t+"]: "+r+o;break;case"shortcut":i="["+t+"]",s="["+t+"]: "+r+o;break;default:var l=this.references.length+1;i="["+t+"]["+l+"]",s="["+l+"]: "+r+o}return this.references.push(s),i},references:[],append:function(t){var e="";return this.references.length&&(e=` `+this.references.join(` `)+` -`,this.references=[]),t}};gr.emphasis={filter:["em","i"],replacement:function(e,t,r){return e.trim()?r.emDelimiter+e+r.emDelimiter:""}};gr.strong={filter:["strong","b"],replacement:function(e,t,r){return e.trim()?r.strongDelimiter+e+r.strongDelimiter:""}};gr.code={filter:function(e){var t=e.previousSibling||e.nextSibling,r=e.parentNode.nodeName==="PRE"&&!t;return e.nodeName==="CODE"&&!r},replacement:function(e){if(!e)return"";e=e.replace(/\r?\n|\r/g," ");for(var t=/^`|^ .*?[^ ].* $|`$/.test(e)?" ":"",r="`",n=e.match(/`+/gm)||[];n.indexOf(r)!==-1;)r=r+"`";return r+t+e+t+r}};gr.image={filter:"img",replacement:function(e,t){var r=Ph(t.getAttribute("alt")),n=t.getAttribute("src")||"",o=Ph(t.getAttribute("title")),i=o?' "'+o+'"':"";return n?"!["+r+"]("+n+i+")":""}};function Ph(e){return e?e.replace(/(\n+\s*)+/g,` -`):""}function QI(e){this.options=e,this._keep=[],this._remove=[],this.blankRule={replacement:e.blankReplacement},this.keepReplacement=e.keepReplacement,this.defaultRule={replacement:e.defaultReplacement},this.array=[];for(var t in e.rules)this.array.push(e.rules[t])}QI.prototype={add:function(e,t){this.array.unshift(t)},keep:function(e){this._keep.unshift({filter:e,replacement:this.keepReplacement})},remove:function(e){this._remove.unshift({filter:e,replacement:function(){return""}})},forNode:function(e){if(e.isBlank)return this.blankRule;var t;return(t=D1(this.array,e,this.options))||(t=D1(this._keep,e,this.options))||(t=D1(this._remove,e,this.options))?t:this.defaultRule},forEach:function(e){for(var t=0;t-1)return!0}else if(typeof n=="function"){if(n.call(e,t,r))return!0}else throw new TypeError("`filter` needs to be a string, array, or function")}function cce(e){var t=e.element,r=e.isBlock,n=e.isVoid,o=e.isPre||function(d){return d.nodeName==="PRE"};if(!(!t.firstChild||o(t))){for(var i=null,s=!1,a=null,l=$2(a,t,o);l!==t;){if(l.nodeType===3||l.nodeType===4){var c=l.data.replace(/[ \r\n\t]+/g," ");if((!i||/ $/.test(i.data))&&!s&&c[0]===" "&&(c=c.substr(1)),!c){l=P1(l);continue}l.data=c,i=l}else if(l.nodeType===1)r(l)||l.nodeName==="BR"?(i&&(i.data=i.data.replace(/ $/,"")),i=null,s=!1):n(l)||o(l)?(i=null,s=!0):i&&(s=!1);else{l=P1(l);continue}var u=$2(a,l,o);a=l,l=u}i&&(i.data=i.data.replace(/ $/,""),i.data||P1(i))}}function P1(e){var t=e.nextSibling||e.parentNode;return e.parentNode.removeChild(e),t}function $2(e,t,r){return e&&e.parentNode===t||r(t)?t.nextSibling||t.parentNode:t.firstChild||t.nextSibling||t.parentNode}var eM=typeof window<"u"?window:{};function uce(){var e=eM.DOMParser,t=!1;try{new e().parseFromString("","text/html")&&(t=!0)}catch{}return t}function dce(){var e=function(){};return pce()?e.prototype.parseFromString=function(t){var r=new window.ActiveXObject("htmlfile");return r.designMode="on",r.open(),r.write(t),r.close(),r}:e.prototype.parseFromString=function(t){var r=document.implementation.createHTMLDocument("");return r.open(),r.write(t),r.close(),r},e}function pce(){var e=!1;try{document.implementation.createHTMLDocument("").open()}catch{window.ActiveXObject&&(e=!0)}return e}var fce=uce()?eM.DOMParser:dce();function hce(e,t){var r;if(typeof e=="string"){var n=mce().parseFromString(''+e+"","text/html");r=n.getElementById("turndown-root")}else r=e.cloneNode(!0);return cce({element:r,isBlock:GE,isVoid:XI,isPre:t.preformattedCode?gce:null}),r}var z1;function mce(){return z1=z1||new fce,z1}function gce(e){return e.nodeName==="PRE"||e.nodeName==="CODE"}function yce(e,t){return e.isBlock=GE(e),e.isCode=e.nodeName==="CODE"||e.parentNode.isCode,e.isBlank=vce(e),e.flankingWhitespace=bce(e,t),e}function vce(e){return!XI(e)&&!sce(e)&&/^\s*$/i.test(e.textContent)&&!ice(e)&&!ace(e)}function bce(e,t){if(e.isBlock||t.preformattedCode&&e.isCode)return{leading:"",trailing:""};var r=Ece(e.textContent);return r.leadingAscii&&B2("left",e,t)&&(r.leading=r.leadingNonAscii),r.trailingAscii&&B2("right",e,t)&&(r.trailing=r.trailingNonAscii),{leading:r.leading,trailing:r.trailing}}function Ece(e){var t=e.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/);return{leading:t[1],leadingAscii:t[2],leadingNonAscii:t[3],trailing:t[4],trailingNonAscii:t[5],trailingAscii:t[6]}}function B2(e,t,r){var n,o,i;return e==="left"?(n=t.previousSibling,o=/ $/):(n=t.nextSibling,o=/^ /),n&&(n.nodeType===3?i=o.test(n.nodeValue):r.preformattedCode&&n.nodeName==="CODE"?i=!1:n.nodeType===1&&!GE(n)&&(i=o.test(n.textContent))),i}var kce=Array.prototype.reduce,xce=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function Id(e){if(!(this instanceof Id))return new Id(e);var t={rules:gr,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:" ",preformattedCode:!1,blankReplacement:function(r,n){return n.isBlock?` - -`:""},keepReplacement:function(r,n){return n.isBlock?` - -`+n.outerHTML+` - -`:n.outerHTML},defaultReplacement:function(r,n){return n.isBlock?` - -`+r+` - -`:r}};this.options=tce({},t,e),this.rules=new QI(this.options)}Id.prototype={turndown:function(e){if(!Tce(e))throw new TypeError(e+" is not a string, or an element/document/fragment node.");if(e==="")return"";var t=tM.call(this,new hce(e,this.options));return Sce.call(this,t)},use:function(e){if(Array.isArray(e))for(var t=0;t"']/,Oce=new RegExp(oM.source,"g"),iM=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Ace=new RegExp(iM.source,"g"),Nce={"&":"&","<":"<",">":">",'"':""","'":"'"},H2=e=>Nce[e];function pr(e,t){if(t){if(oM.test(e))return e.replace(Oce,H2)}else if(iM.test(e))return e.replace(Ace,H2);return e}const Rce=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function sM(e){return e.replace(Rce,(t,r)=>(r=r.toLowerCase(),r==="colon"?":":r.charAt(0)==="#"?r.charAt(1)==="x"?String.fromCharCode(parseInt(r.substring(2),16)):String.fromCharCode(+r.substring(1)):""))}const _ce=/(^|[^\[])\^/g;function Ke(e,t){e=typeof e=="string"?e:e.source,t=t||"";const r={replace:(n,o)=>(o=o.source||o,o=o.replace(_ce,"$1"),e=e.replace(n,o),r),getRegex:()=>new RegExp(e,t)};return r}const Ice=/[^\w:]/g,Mce=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function F2(e,t,r){if(e){let n;try{n=decodeURIComponent(sM(r)).replace(Ice,"").toLowerCase()}catch{return null}if(n.indexOf("javascript:")===0||n.indexOf("vbscript:")===0||n.indexOf("data:")===0)return null}t&&!Mce.test(r)&&(r=zce(t,r));try{r=encodeURI(r).replace(/%25/g,"%")}catch{return null}return r}const jp={},Lce=/^[^:]+:\/*[^/]*$/,Dce=/^([^:]+:)[\s\S]*$/,Pce=/^([^:]+:\/*[^/]*)[\s\S]*$/;function zce(e,t){jp[" "+e]||(Lce.test(e)?jp[" "+e]=e+"/":jp[" "+e]=Cf(e,"/",!0)),e=jp[" "+e];const r=e.indexOf(":")===-1;return t.substring(0,2)==="//"?r?t:e.replace(Dce,"$1")+t:t.charAt(0)==="/"?r?t:e.replace(Pce,"$1")+t:e+t}const zh={exec:function(){}};function U2(e,t){const r=e.replace(/\|/g,(i,s,a)=>{let l=!1,c=s;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),n=r.split(/ \|/);let o=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length1;)t&1&&(r+=e),t>>=1,e+=e;return r+e}function j2(e,t,r,n){const o=t.href,i=t.title?pr(t.title):null,s=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){n.state.inLink=!0;const a={type:"link",raw:r,href:o,title:i,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,a}return{type:"image",raw:r,href:o,title:i,text:pr(s)}}function Hce(e,t){const r=e.match(/^(\s+)(?:```)/);if(r===null)return t;const n=r[1];return t.split(` -`).map(o=>{const i=o.match(/^\s+/);if(i===null)return o;const[s]=i;return s.length>=n.length?o.slice(n.length):o}).join(` -`)}class KE{constructor(t){this.options=t||Ma}space(t){const r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){const r=this.rules.block.code.exec(t);if(r){const n=r[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Cf(n,` -`)}}}fences(t){const r=this.rules.block.fences.exec(t);if(r){const n=r[0],o=Hce(n,r[3]||"");return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline._escapes,"$1"):r[2],text:o}}}heading(t){const r=this.rules.block.heading.exec(t);if(r){let n=r[2].trim();if(/#$/.test(n)){const o=Cf(n,"#");(this.options.pedantic||!o||/ $/.test(o))&&(n=o.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){const r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:r[0]}}blockquote(t){const r=this.rules.block.blockquote.exec(t);if(r){const n=r[0].replace(/^ *>[ \t]?/gm,""),o=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(n);return this.lexer.state.top=o,{type:"blockquote",raw:r[0],tokens:i,text:n}}}list(t){let r=this.rules.block.list.exec(t);if(r){let n,o,i,s,a,l,c,u,d,p,f,h,m=r[1].trim();const b=m.length>1,y={type:"list",raw:"",ordered:b,start:b?+m.slice(0,-1):"",loose:!1,items:[]};m=b?`\\d{1,9}\\${m.slice(-1)}`:`\\${m}`,this.options.pedantic&&(m=b?m:"[*+-]");const g=new RegExp(`^( {0,3}${m})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;t&&(h=!1,!(!(r=g.exec(t))||this.rules.block.hr.test(t)));){if(n=r[0],t=t.substring(n.length),u=r[2].split(` -`,1)[0].replace(/^\t+/,E=>" ".repeat(3*E.length)),d=t.split(` -`,1)[0],this.options.pedantic?(s=2,f=u.trimLeft()):(s=r[2].search(/[^ ]/),s=s>4?1:s,f=u.slice(s),s+=r[1].length),l=!1,!u&&/^ *$/.test(d)&&(n+=d+` -`,t=t.substring(d.length+1),h=!0),!h){const E=new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),k=new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),x=new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\`\`\`|~~~)`),w=new RegExp(`^ {0,${Math.min(3,s-1)}}#`);for(;t&&(p=t.split(` -`,1)[0],d=p,this.options.pedantic&&(d=d.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(x.test(d)||w.test(d)||E.test(d)||k.test(t)));){if(d.search(/[^ ]/)>=s||!d.trim())f+=` -`+d.slice(s);else{if(l||u.search(/[^ ]/)>=4||x.test(u)||w.test(u)||k.test(u))break;f+=` -`+d}!l&&!d.trim()&&(l=!0),n+=p+` -`,t=t.substring(p.length+1),u=d.slice(s)}}y.loose||(c?y.loose=!0:/\n *\n *$/.test(n)&&(c=!0)),this.options.gfm&&(o=/^\[[ xX]\] /.exec(f),o&&(i=o[0]!=="[ ] ",f=f.replace(/^\[[ xX]\] +/,""))),y.items.push({type:"list_item",raw:n,task:!!o,checked:i,loose:!1,text:f}),y.raw+=n}y.items[y.items.length-1].raw=n.trimRight(),y.items[y.items.length-1].text=f.trimRight(),y.raw=y.raw.trimRight();const v=y.items.length;for(a=0;ax.type==="space"),k=E.length>0&&E.some(x=>/\n.*\n/.test(x.raw));y.loose=k}if(y.loose)for(a=0;a$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline._escapes,"$1"):r[3];return{type:"def",tag:n,raw:r[0],href:o,title:i}}}table(t){const r=this.rules.block.table.exec(t);if(r){const n={type:"table",header:U2(r[1]).map(o=>({text:o})),align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:r[3]&&r[3].trim()?r[3].replace(/\n[ \t]*$/,"").split(` -`):[]};if(n.header.length===n.align.length){n.raw=r[0];let o=n.align.length,i,s,a,l;for(i=0;i({text:c}));for(o=n.header.length,s=0;s/i.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):pr(r[0]):r[0]}}link(t){const r=this.rules.inline.link.exec(t);if(r){const n=r[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;const s=Cf(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{const s=$ce(r[2],"()");if(s>-1){const l=(r[0].indexOf("!")===0?5:4)+r[1].length+s;r[2]=r[2].substring(0,s),r[0]=r[0].substring(0,l).trim(),r[3]=""}}let o=r[2],i="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);s&&(o=s[1],i=s[3])}else i=r[3]?r[3].slice(1,-1):"";return o=o.trim(),/^$/.test(n)?o=o.slice(1):o=o.slice(1,-1)),j2(r,{href:o&&o.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},r[0],this.lexer)}}reflink(t,r){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let o=(n[2]||n[1]).replace(/\s+/g," ");if(o=r[o.toLowerCase()],!o){const i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return j2(n,o,n[0],this.lexer)}}emStrong(t,r,n=""){let o=this.rules.inline.emStrong.lDelim.exec(t);if(!o||o[3]&&n.match(/[\p{L}\p{N}]/u))return;const i=o[1]||o[2]||"";if(!i||i&&(n===""||this.rules.inline.punctuation.exec(n))){const s=o[0].length-1;let a,l,c=s,u=0;const d=o[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(d.lastIndex=0,r=r.slice(-1*t.length+s);(o=d.exec(r))!=null;){if(a=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!a)continue;if(l=a.length,o[3]||o[4]){c+=l;continue}else if((o[5]||o[6])&&s%3&&!((s+l)%3)){u+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+u);const p=t.slice(0,s+o.index+(o[0].length-a.length)+l);if(Math.min(s,l)%2){const h=p.slice(1,-1);return{type:"em",raw:p,text:h,tokens:this.lexer.inlineTokens(h)}}const f=p.slice(2,-2);return{type:"strong",raw:p,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){const r=this.rules.inline.code.exec(t);if(r){let n=r[2].replace(/\n/g," ");const o=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return o&&i&&(n=n.substring(1,n.length-1)),n=pr(n,!0),{type:"codespan",raw:r[0],text:n}}}br(t){const r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){const r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t,r){const n=this.rules.inline.autolink.exec(t);if(n){let o,i;return n[2]==="@"?(o=pr(this.options.mangle?r(n[1]):n[1]),i="mailto:"+o):(o=pr(n[1]),i=o),{type:"link",raw:n[0],text:o,href:i,tokens:[{type:"text",raw:o,text:o}]}}}url(t,r){let n;if(n=this.rules.inline.url.exec(t)){let o,i;if(n[2]==="@")o=pr(this.options.mangle?r(n[0]):n[0]),i="mailto:"+o;else{let s;do s=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(s!==n[0]);o=pr(n[0]),n[1]==="www."?i="http://"+n[0]:i=n[0]}return{type:"link",raw:n[0],text:o,href:i,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(t,r){const n=this.rules.inline.text.exec(t);if(n){let o;return this.lexer.state.inRawBlock?o=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):pr(n[0]):n[0]:o=pr(this.options.smartypants?r(n[0]):n[0]),{type:"text",raw:n[0],text:o}}}}const ce={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}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\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 *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:zh,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};ce._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;ce._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;ce.def=Ke(ce.def).replace("label",ce._label).replace("title",ce._title).getRegex();ce.bullet=/(?:[*+-]|\d{1,9}[.)])/;ce.listItemStart=Ke(/^( *)(bull) */).replace("bull",ce.bullet).getRegex();ce.list=Ke(ce.list).replace(/bull/g,ce.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ce.def.source+")").getRegex();ce._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";ce._comment=/|$)/;ce.html=Ke(ce.html,"i").replace("comment",ce._comment).replace("tag",ce._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();ce.paragraph=Ke(ce._paragraph).replace("hr",ce.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",ce._tag).getRegex();ce.blockquote=Ke(ce.blockquote).replace("paragraph",ce.paragraph).getRegex();ce.normal={...ce};ce.gfm={...ce.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};ce.gfm.table=Ke(ce.gfm.table).replace("hr",ce.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",ce._tag).getRegex();ce.gfm.paragraph=Ke(ce._paragraph).replace("hr",ce.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",ce.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",ce._tag).getRegex();ce.pedantic={...ce.normal,html:Ke(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ce._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:zh,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ke(ce.normal._paragraph).replace("hr",ce.hr).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",ce.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const Q={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:zh,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:zh,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~";Q.punctuation=Ke(Q.punctuation).replace(/punctuation/g,Q._punctuation).getRegex();Q.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;Q.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g;Q._comment=Ke(ce._comment).replace("(?:-->|$)","-->").getRegex();Q.emStrong.lDelim=Ke(Q.emStrong.lDelim).replace(/punct/g,Q._punctuation).getRegex();Q.emStrong.rDelimAst=Ke(Q.emStrong.rDelimAst,"g").replace(/punct/g,Q._punctuation).getRegex();Q.emStrong.rDelimUnd=Ke(Q.emStrong.rDelimUnd,"g").replace(/punct/g,Q._punctuation).getRegex();Q._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;Q._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;Q._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])?)+(?![-_])/;Q.autolink=Ke(Q.autolink).replace("scheme",Q._scheme).replace("email",Q._email).getRegex();Q._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;Q.tag=Ke(Q.tag).replace("comment",Q._comment).replace("attribute",Q._attribute).getRegex();Q._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;Q._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;Q._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;Q.link=Ke(Q.link).replace("label",Q._label).replace("href",Q._href).replace("title",Q._title).getRegex();Q.reflink=Ke(Q.reflink).replace("label",Q._label).replace("ref",ce._label).getRegex();Q.nolink=Ke(Q.nolink).replace("ref",ce._label).getRegex();Q.reflinkSearch=Ke(Q.reflinkSearch,"g").replace("reflink",Q.reflink).replace("nolink",Q.nolink).getRegex();Q.normal={...Q};Q.pedantic={...Q.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:Ke(/^!?\[(label)\]\((.*?)\)/).replace("label",Q._label).getRegex(),reflink:Ke(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Q._label).getRegex()};Q.gfm={...Q.normal,escape:Ke(Q.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]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),t+="&#"+n+";";return t}class hs{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ma,this.options.tokenizer=this.options.tokenizer||new KE,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const r={block:ce.normal,inline:Q.normal};this.options.pedantic?(r.block=ce.pedantic,r.inline=Q.pedantic):this.options.gfm&&(r.block=ce.gfm,this.options.breaks?r.inline=Q.breaks:r.inline=Q.gfm),this.tokenizer.rules=r}static get rules(){return{block:ce,inline:Q}}static lex(t,r){return new hs(r).lex(t)}static lexInline(t,r){return new hs(r).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,` -`),this.blockTokens(t,this.tokens);let r;for(;r=this.inlineQueue.shift();)this.inlineTokens(r.src,r.tokens);return this.tokens}blockTokens(t,r=[]){this.options.pedantic?t=t.replace(/\t/g," ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(a,l,c)=>l+" ".repeat(c.length));let n,o,i,s;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(n=a.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))){if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length),n.raw.length===1&&r.length>0?r[r.length-1].raw+=` -`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length),o=r[r.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` -`+n.raw,o.text+=` -`+n.text,this.inlineQueue[this.inlineQueue.length-1].src=o.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length),o=r[r.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` -`+n.raw,o.text+=` -`+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(i=t,this.options.extensions&&this.options.extensions.startBlock){let a=1/0;const l=t.slice(1);let c;this.options.extensions.startBlock.forEach(function(u){c=u.call({lexer:this},l),typeof c=="number"&&c>=0&&(a=Math.min(a,c))}),a<1/0&&a>=0&&(i=t.substring(0,a+1))}if(this.state.top&&(n=this.tokenizer.paragraph(i))){o=r[r.length-1],s&&o.type==="paragraph"?(o.raw+=` -`+n.raw,o.text+=` -`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):r.push(n),s=i.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length),o=r[r.length-1],o&&o.type==="text"?(o.raw+=` -`+n.raw,o.text+=` -`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):r.push(n);continue}if(t){const a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let n,o,i,s=t,a,l,c;if(this.tokens.links){const u=Object.keys(this.tokens.links);if(u.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)u.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+V2("a",a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,a.index)+"["+V2("a",a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.escapedEmSt.exec(s))!=null;)s=s.slice(0,a.index+a[0].length-2)+"++"+s.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;t;)if(l||(c=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(u=>(n=u.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))){if(n=this.tokenizer.escape(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.tag(t)){t=t.substring(n.raw.length),o=r[r.length-1],o&&n.type==="text"&&o.type==="text"?(o.raw+=n.raw,o.text+=n.text):r.push(n);continue}if(n=this.tokenizer.link(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(n.raw.length),o=r[r.length-1],o&&n.type==="text"&&o.type==="text"?(o.raw+=n.raw,o.text+=n.text):r.push(n);continue}if(n=this.tokenizer.emStrong(t,s,c)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.codespan(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.br(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.del(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.autolink(t,G2)){t=t.substring(n.raw.length),r.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(t,G2))){t=t.substring(n.raw.length),r.push(n);continue}if(i=t,this.options.extensions&&this.options.extensions.startInline){let u=1/0;const d=t.slice(1);let p;this.options.extensions.startInline.forEach(function(f){p=f.call({lexer:this},d),typeof p=="number"&&p>=0&&(u=Math.min(u,p))}),u<1/0&&u>=0&&(i=t.substring(0,u+1))}if(n=this.tokenizer.inlineText(i,Fce)){t=t.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(c=n.raw.slice(-1)),l=!0,o=r[r.length-1],o&&o.type==="text"?(o.raw+=n.raw,o.text+=n.text):r.push(n);continue}if(t){const u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return r}}class YE{constructor(t){this.options=t||Ma}code(t,r,n){const o=(r||"").match(/\S*/)[0];if(this.options.highlight){const i=this.options.highlight(t,o);i!=null&&i!==t&&(n=!0,t=i)}return t=t.replace(/\n$/,"")+` -`,o?'
'+(n?t:pr(t,!0))+`
-`:"
"+(n?t:pr(t,!0))+`
-`}blockquote(t){return`
-${t}
-`}html(t){return t}heading(t,r,n,o){if(this.options.headerIds){const i=this.options.headerPrefix+o.slug(n);return`${t} -`}return`${t} +`,this.references=[]),e}};Xn.emphasis={filter:["em","i"],replacement:function(t,e,n){return t.trim()?n.emDelimiter+t+n.emDelimiter:""}};Xn.strong={filter:["strong","b"],replacement:function(t,e,n){return t.trim()?n.strongDelimiter+t+n.strongDelimiter:""}};Xn.code={filter:function(t){var e=t.previousSibling||t.nextSibling,n=t.parentNode.nodeName==="PRE"&&!e;return t.nodeName==="CODE"&&!n},replacement:function(t){if(!t)return"";t=t.replace(/\r?\n|\r/g," ");for(var e=/^`|^ .*?[^ ].* $|`$/.test(t)?" ":"",n="`",r=t.match(/`+/gm)||[];r.indexOf(n)!==-1;)n=n+"`";return n+e+t+e+n}};Xn.image={filter:"img",replacement:function(t,e){var n=jg(e.getAttribute("alt")),r=e.getAttribute("src")||"",o=jg(e.getAttribute("title")),i=o?' "'+o+'"':"";return r?"!["+n+"]("+r+i+")":""}};function jg(t){return t?t.replace(/(\n+\s*)+/g,` +`):""}function BN(t){this.options=t,this._keep=[],this._remove=[],this.blankRule={replacement:t.blankReplacement},this.keepReplacement=t.keepReplacement,this.defaultRule={replacement:t.defaultReplacement},this.array=[];for(var e in t.rules)this.array.push(t.rules[e])}BN.prototype={add:function(t,e){this.array.unshift(e)},keep:function(t){this._keep.unshift({filter:t,replacement:this.keepReplacement})},remove:function(t){this._remove.unshift({filter:t,replacement:function(){return""}})},forNode:function(t){if(t.isBlank)return this.blankRule;var e;return(e=t0(this.array,t,this.options))||(e=t0(this._keep,t,this.options))||(e=t0(this._remove,t,this.options))?e:this.defaultRule},forEach:function(t){for(var e=0;e-1)return!0}else if(typeof r=="function"){if(r.call(t,e,n))return!0}else throw new TypeError("`filter` needs to be a string, array, or function")}function Lde(t){var e=t.element,n=t.isBlock,r=t.isVoid,o=t.isPre||function(d){return d.nodeName==="PRE"};if(!(!e.firstChild||o(e))){for(var i=null,s=!1,l=null,a=f_(l,e,o);a!==e;){if(a.nodeType===3||a.nodeType===4){var u=a.data.replace(/[ \r\n\t]+/g," ");if((!i||/ $/.test(i.data))&&!s&&u[0]===" "&&(u=u.substr(1)),!u){a=n0(a);continue}a.data=u,i=a}else if(a.nodeType===1)n(a)||a.nodeName==="BR"?(i&&(i.data=i.data.replace(/ $/,"")),i=null,s=!1):r(a)||o(a)?(i=null,s=!0):i&&(s=!1);else{a=n0(a);continue}var c=f_(l,a,o);l=a,a=c}i&&(i.data=i.data.replace(/ $/,""),i.data||n0(i))}}function n0(t){var e=t.nextSibling||t.parentNode;return t.parentNode.removeChild(t),e}function f_(t,e,n){return t&&t.parentNode===e||n(e)?e.nextSibling||e.parentNode:e.firstChild||e.nextSibling||e.parentNode}var HN=typeof window<"u"?window:{};function Nde(){var t=HN.DOMParser,e=!1;try{new t().parseFromString("","text/html")&&(e=!0)}catch{}return e}function $de(){var t=function(){};return Dde()?t.prototype.parseFromString=function(e){var n=new window.ActiveXObject("htmlfile");return n.designMode="on",n.open(),n.write(e),n.close(),n}:t.prototype.parseFromString=function(e){var n=document.implementation.createHTMLDocument("");return n.open(),n.write(e),n.close(),n},t}function Dde(){var t=!1;try{document.implementation.createHTMLDocument("").open()}catch{window.ActiveXObject&&(t=!0)}return t}var Pde=Nde()?HN.DOMParser:$de();function zde(t,e){var n;if(typeof t=="string"){var r=Fde().parseFromString(''+t+"","text/html");n=r.getElementById("turndown-root")}else n=t.cloneNode(!0);return Lde({element:n,isBlock:vk,isVoid:PN,isPre:e.preformattedCode?Bde:null}),n}var r0;function Fde(){return r0=r0||new Pde,r0}function Bde(t){return t.nodeName==="PRE"||t.nodeName==="CODE"}function Hde(t,e){return t.isBlock=vk(t),t.isCode=t.nodeName==="CODE"||t.parentNode.isCode,t.isBlank=Ude(t),t.flankingWhitespace=Wde(t,e),t}function Ude(t){return!PN(t)&&!Mde(t)&&/^\s*$/i.test(t.textContent)&&!Rde(t)&&!Ode(t)}function Wde(t,e){if(t.isBlock||e.preformattedCode&&t.isCode)return{leading:"",trailing:""};var n=Vde(t.textContent);return n.leadingAscii&&p_("left",t,e)&&(n.leading=n.leadingNonAscii),n.trailingAscii&&p_("right",t,e)&&(n.trailing=n.trailingNonAscii),{leading:n.leading,trailing:n.trailing}}function Vde(t){var e=t.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/);return{leading:e[1],leadingAscii:e[2],leadingNonAscii:e[3],trailing:e[4],trailingNonAscii:e[5],trailingAscii:e[6]}}function p_(t,e,n){var r,o,i;return t==="left"?(r=e.previousSibling,o=/ $/):(r=e.nextSibling,o=/^ /),r&&(r.nodeType===3?i=o.test(r.nodeValue):n.preformattedCode&&r.nodeName==="CODE"?i=!1:r.nodeType===1&&!vk(r)&&(i=o.test(r.textContent))),i}var jde=Array.prototype.reduce,Gde=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function Rh(t){if(!(this instanceof Rh))return new Rh(t);var e={rules:Xn,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:" ",preformattedCode:!1,blankReplacement:function(n,r){return r.isBlock?` + +`:""},keepReplacement:function(n,r){return r.isBlock?` + +`+r.outerHTML+` + +`:r.outerHTML},defaultReplacement:function(n,r){return r.isBlock?` + +`+n+` + +`:n}};this.options=Cde({},e,t),this.rules=new BN(this.options)}Rh.prototype={turndown:function(t){if(!Xde(t))throw new TypeError(t+" is not a string, or an element/document/fragment node.");if(t==="")return"";var e=UN.call(this,new zde(t,this.options));return Kde.call(this,e)},use:function(t){if(Array.isArray(t))for(var e=0;e"']/,Zde=new RegExp(jN.source,"g"),GN=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Qde=new RegExp(GN.source,"g"),Jde={"&":"&","<":"<",">":">",'"':""","'":"'"},g_=t=>Jde[t];function jn(t,e){if(e){if(jN.test(t))return t.replace(Zde,g_)}else if(GN.test(t))return t.replace(Qde,g_);return t}const ehe=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function KN(t){return t.replace(ehe,(e,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const the=/(^|[^\[])\^/g;function vt(t,e){t=typeof t=="string"?t:t.source,e=e||"";const n={replace:(r,o)=>(o=o.source||o,o=o.replace(the,"$1"),t=t.replace(r,o),n),getRegex:()=>new RegExp(t,e)};return n}const nhe=/[^\w:]/g,rhe=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function m_(t,e,n){if(t){let r;try{r=decodeURIComponent(KN(n)).replace(nhe,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}e&&!rhe.test(n)&&(n=ahe(e,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const Jf={},ohe=/^[^:]+:\/*[^/]*$/,ihe=/^([^:]+:)[\s\S]*$/,she=/^([^:]+:\/*[^/]*)[\s\S]*$/;function ahe(t,e){Jf[" "+t]||(ohe.test(t)?Jf[" "+t]=t+"/":Jf[" "+t]=$p(t,"/",!0)),t=Jf[" "+t];const n=t.indexOf(":")===-1;return e.substring(0,2)==="//"?n?e:t.replace(ihe,"$1")+e:e.charAt(0)==="/"?n?e:t.replace(she,"$1")+e:t+e}const Gg={exec:function(){}};function v_(t,e){const n=t.replace(/\|/g,(i,s,l)=>{let a=!1,u=s;for(;--u>=0&&l[u]==="\\";)a=!a;return a?"|":" |"}),r=n.split(/ \|/);let o=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>e)r.splice(e);else for(;r.length1;)e&1&&(n+=t),e>>=1,t+=t;return n+t}function b_(t,e,n,r){const o=e.href,i=e.title?jn(e.title):null,s=t[1].replace(/\\([\[\]])/g,"$1");if(t[0].charAt(0)!=="!"){r.state.inLink=!0;const l={type:"link",raw:n,href:o,title:i,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,l}return{type:"image",raw:n,href:o,title:i,text:jn(s)}}function uhe(t,e){const n=t.match(/^(\s+)(?:```)/);if(n===null)return e;const r=n[1];return e.split(` +`).map(o=>{const i=o.match(/^\s+/);if(i===null)return o;const[s]=i;return s.length>=r.length?o.slice(r.length):o}).join(` +`)}class bk{constructor(e){this.options=e||kl}space(e){const n=this.rules.block.newline.exec(e);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(e){const n=this.rules.block.code.exec(e);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:$p(r,` +`)}}}fences(e){const n=this.rules.block.fences.exec(e);if(n){const r=n[0],o=uhe(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:o}}}heading(e){const n=this.rules.block.heading.exec(e);if(n){let r=n[2].trim();if(/#$/.test(r)){const o=$p(r,"#");(this.options.pedantic||!o||/ $/.test(o))&&(r=o.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const n=this.rules.block.hr.exec(e);if(n)return{type:"hr",raw:n[0]}}blockquote(e){const n=this.rules.block.blockquote.exec(e);if(n){const r=n[0].replace(/^ *>[ \t]?/gm,""),o=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(r);return this.lexer.state.top=o,{type:"blockquote",raw:n[0],tokens:i,text:r}}}list(e){let n=this.rules.block.list.exec(e);if(n){let r,o,i,s,l,a,u,c,d,h,f,p,g=n[1].trim();const 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:"[*+-]");const y=new RegExp(`^( {0,3}${g})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;e&&(p=!1,!(!(n=y.exec(e))||this.rules.block.hr.test(e)));){if(r=n[0],e=e.substring(r.length),c=n[2].split(` +`,1)[0].replace(/^\t+/,w=>" ".repeat(3*w.length)),d=e.split(` +`,1)[0],this.options.pedantic?(s=2,f=c.trimLeft()):(s=n[2].search(/[^ ]/),s=s>4?1:s,f=c.slice(s),s+=n[1].length),a=!1,!c&&/^ *$/.test(d)&&(r+=d+` +`,e=e.substring(d.length+1),p=!0),!p){const w=new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),k=new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),x=new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\`\`\`|~~~)`),S=new RegExp(`^ {0,${Math.min(3,s-1)}}#`);for(;e&&(h=e.split(` +`,1)[0],d=h,this.options.pedantic&&(d=d.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(x.test(d)||S.test(d)||w.test(d)||k.test(e)));){if(d.search(/[^ ]/)>=s||!d.trim())f+=` +`+d.slice(s);else{if(a||c.search(/[^ ]/)>=4||x.test(c)||S.test(c)||k.test(c))break;f+=` +`+d}!a&&!d.trim()&&(a=!0),r+=h+` +`,e=e.substring(h.length+1),c=d.slice(s)}}v.loose||(u?v.loose=!0:/\n *\n *$/.test(r)&&(u=!0)),this.options.gfm&&(o=/^\[[ xX]\] /.exec(f),o&&(i=o[0]!=="[ ] ",f=f.replace(/^\[[ xX]\] +/,""))),v.items.push({type:"list_item",raw:r,task:!!o,checked:i,loose:!1,text:f}),v.raw+=r}v.items[v.items.length-1].raw=r.trimRight(),v.items[v.items.length-1].text=f.trimRight(),v.raw=v.raw.trimRight();const b=v.items.length;for(l=0;lx.type==="space"),k=w.length>0&&w.some(x=>/\n.*\n/.test(x.raw));v.loose=k}if(v.loose)for(l=0;l$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:o,title:i}}}table(e){const n=this.rules.block.table.exec(e);if(n){const r={type:"table",header:v_(n[1]).map(o=>({text:o})),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(` +`):[]};if(r.header.length===r.align.length){r.raw=n[0];let o=r.align.length,i,s,l,a;for(i=0;i({text:u}));for(o=r.header.length,s=0;s/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):jn(n[0]):n[0]}}link(e){const n=this.rules.inline.link.exec(e);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;const s=$p(r.slice(0,-1),"\\");if((r.length-s.length)%2===0)return}else{const s=lhe(n[2],"()");if(s>-1){const a=(n[0].indexOf("!")===0?5:4)+n[1].length+s;n[2]=n[2].substring(0,s),n[0]=n[0].substring(0,a).trim(),n[3]=""}}let o=n[2],i="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);s&&(o=s[1],i=s[3])}else i=n[3]?n[3].slice(1,-1):"";return o=o.trim(),/^$/.test(r)?o=o.slice(1):o=o.slice(1,-1)),b_(n,{href:o&&o.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(e,n){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let o=(r[2]||r[1]).replace(/\s+/g," ");if(o=n[o.toLowerCase()],!o){const i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return b_(r,o,r[0],this.lexer)}}emStrong(e,n,r=""){let o=this.rules.inline.emStrong.lDelim.exec(e);if(!o||o[3]&&r.match(/[\p{L}\p{N}]/u))return;const i=o[1]||o[2]||"";if(!i||i&&(r===""||this.rules.inline.punctuation.exec(r))){const s=o[0].length-1;let l,a,u=s,c=0;const d=o[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(d.lastIndex=0,n=n.slice(-1*e.length+s);(o=d.exec(n))!=null;){if(l=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!l)continue;if(a=l.length,o[3]||o[4]){u+=a;continue}else if((o[5]||o[6])&&s%3&&!((s+a)%3)){c+=a;continue}if(u-=a,u>0)continue;a=Math.min(a,a+u+c);const h=e.slice(0,s+o.index+(o[0].length-l.length)+a);if(Math.min(s,a)%2){const p=h.slice(1,-1);return{type:"em",raw:h,text:p,tokens:this.lexer.inlineTokens(p)}}const f=h.slice(2,-2);return{type:"strong",raw:h,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(e){const n=this.rules.inline.code.exec(e);if(n){let r=n[2].replace(/\n/g," ");const o=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return o&&i&&(r=r.substring(1,r.length-1)),r=jn(r,!0),{type:"codespan",raw:n[0],text:r}}}br(e){const n=this.rules.inline.br.exec(e);if(n)return{type:"br",raw:n[0]}}del(e){const n=this.rules.inline.del.exec(e);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(e,n){const r=this.rules.inline.autolink.exec(e);if(r){let o,i;return r[2]==="@"?(o=jn(this.options.mangle?n(r[1]):r[1]),i="mailto:"+o):(o=jn(r[1]),i=o),{type:"link",raw:r[0],text:o,href:i,tokens:[{type:"text",raw:o,text:o}]}}}url(e,n){let r;if(r=this.rules.inline.url.exec(e)){let o,i;if(r[2]==="@")o=jn(this.options.mangle?n(r[0]):r[0]),i="mailto:"+o;else{let s;do s=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0];while(s!==r[0]);o=jn(r[0]),r[1]==="www."?i="http://"+r[0]:i=r[0]}return{type:"link",raw:r[0],text:o,href:i,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(e,n){const r=this.rules.inline.text.exec(e);if(r){let o;return this.lexer.state.inRawBlock?o=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):jn(r[0]):r[0]:o=jn(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:o}}}}const Re={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}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\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 *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Gg,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};Re._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;Re._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;Re.def=vt(Re.def).replace("label",Re._label).replace("title",Re._title).getRegex();Re.bullet=/(?:[*+-]|\d{1,9}[.)])/;Re.listItemStart=vt(/^( *)(bull) */).replace("bull",Re.bullet).getRegex();Re.list=vt(Re.list).replace(/bull/g,Re.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Re.def.source+")").getRegex();Re._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";Re._comment=/|$)/;Re.html=vt(Re.html,"i").replace("comment",Re._comment).replace("tag",Re._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();Re.paragraph=vt(Re._paragraph).replace("hr",Re.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",Re._tag).getRegex();Re.blockquote=vt(Re.blockquote).replace("paragraph",Re.paragraph).getRegex();Re.normal={...Re};Re.gfm={...Re.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};Re.gfm.table=vt(Re.gfm.table).replace("hr",Re.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",Re._tag).getRegex();Re.gfm.paragraph=vt(Re._paragraph).replace("hr",Re.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Re.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",Re._tag).getRegex();Re.pedantic={...Re.normal,html:vt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Re._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:Gg,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:vt(Re.normal._paragraph).replace("hr",Re.hr).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",Re.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const ge={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Gg,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:Gg,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~";ge.punctuation=vt(ge.punctuation).replace(/punctuation/g,ge._punctuation).getRegex();ge.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;ge.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g;ge._comment=vt(Re._comment).replace("(?:-->|$)","-->").getRegex();ge.emStrong.lDelim=vt(ge.emStrong.lDelim).replace(/punct/g,ge._punctuation).getRegex();ge.emStrong.rDelimAst=vt(ge.emStrong.rDelimAst,"g").replace(/punct/g,ge._punctuation).getRegex();ge.emStrong.rDelimUnd=vt(ge.emStrong.rDelimUnd,"g").replace(/punct/g,ge._punctuation).getRegex();ge._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;ge._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;ge._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])?)+(?![-_])/;ge.autolink=vt(ge.autolink).replace("scheme",ge._scheme).replace("email",ge._email).getRegex();ge._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;ge.tag=vt(ge.tag).replace("comment",ge._comment).replace("attribute",ge._attribute).getRegex();ge._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;ge._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;ge._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;ge.link=vt(ge.link).replace("label",ge._label).replace("href",ge._href).replace("title",ge._title).getRegex();ge.reflink=vt(ge.reflink).replace("label",ge._label).replace("ref",Re._label).getRegex();ge.nolink=vt(ge.nolink).replace("ref",Re._label).getRegex();ge.reflinkSearch=vt(ge.reflinkSearch,"g").replace("reflink",ge.reflink).replace("nolink",ge.nolink).getRegex();ge.normal={...ge};ge.pedantic={...ge.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:vt(/^!?\[(label)\]\((.*?)\)/).replace("label",ge._label).getRegex(),reflink:vt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ge._label).getRegex()};ge.gfm={...ge.normal,escape:vt(ge.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]*?(?:(?=[\\.5&&(r="x"+r.toString(16)),e+="&#"+r+";";return e}class Xs{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||kl,this.options.tokenizer=this.options.tokenizer||new bk,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={block:Re.normal,inline:ge.normal};this.options.pedantic?(n.block=Re.pedantic,n.inline=ge.pedantic):this.options.gfm&&(n.block=Re.gfm,this.options.breaks?n.inline=ge.breaks:n.inline=ge.gfm),this.tokenizer.rules=n}static get rules(){return{block:Re,inline:ge}}static lex(e,n){return new Xs(n).lex(e)}static lexInline(e,n){return new Xs(n).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,` +`),this.blockTokens(e,this.tokens);let n;for(;n=this.inlineQueue.shift();)this.inlineTokens(n.src,n.tokens);return this.tokens}blockTokens(e,n=[]){this.options.pedantic?e=e.replace(/\t/g," ").replace(/^ +$/gm,""):e=e.replace(/^( *)(\t+)/gm,(l,a,u)=>a+" ".repeat(u.length));let r,o,i,s;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(l=>(r=l.call({lexer:this},e,n))?(e=e.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=` +`:n.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` +`+r.raw,o.text+=` +`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` +`+r.raw,o.text+=` +`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),n.push(r);continue}if(i=e,this.options.extensions&&this.options.extensions.startBlock){let l=1/0;const a=e.slice(1);let u;this.options.extensions.startBlock.forEach(function(c){u=c.call({lexer:this},a),typeof u=="number"&&u>=0&&(l=Math.min(l,u))}),l<1/0&&l>=0&&(i=e.substring(0,l+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){o=n[n.length-1],s&&o.type==="paragraph"?(o.raw+=` +`+r.raw,o.text+=` +`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r),s=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length),o=n[n.length-1],o&&o.type==="text"?(o.raw+=` +`+r.raw,o.text+=` +`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(e){const l="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){let r,o,i,s=e,l,a,u;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)c.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,l.index)+"["+y_("a",l[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,l.index)+"["+y_("a",l[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(l=this.tokenizer.rules.inline.escapedEmSt.exec(s))!=null;)s=s.slice(0,l.index+l[0].length-2)+"++"+s.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(a||(u=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(r=c.call({lexer:this},e,n))?(e=e.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(e,s,u)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(e,w_)){e=e.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e,w_))){e=e.substring(r.raw.length),n.push(r);continue}if(i=e,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const d=e.slice(1);let h;this.options.extensions.startInline.forEach(function(f){h=f.call({lexer:this},d),typeof h=="number"&&h>=0&&(c=Math.min(c,h))}),c<1/0&&c>=0&&(i=e.substring(0,c+1))}if(r=this.tokenizer.inlineText(i,dhe)){e=e.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(u=r.raw.slice(-1)),a=!0,o=n[n.length-1],o&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(e){const c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}}class wk{constructor(e){this.options=e||kl}code(e,n,r){const o=(n||"").match(/\S*/)[0];if(this.options.highlight){const i=this.options.highlight(e,o);i!=null&&i!==e&&(r=!0,e=i)}return e=e.replace(/\n$/,"")+` +`,o?'
'+(r?e:jn(e,!0))+`
+`:"
"+(r?e:jn(e,!0))+`
+`}blockquote(e){return`
+${e}
+`}html(e){return e}heading(e,n,r,o){if(this.options.headerIds){const i=this.options.headerPrefix+o.slug(r);return`${e} +`}return`${e} `}hr(){return this.options.xhtml?`
`:`
-`}list(t,r,n){const o=r?"ol":"ul",i=r&&n!==1?' start="'+n+'"':"";return"<"+o+i+`> -`+t+" -`}listitem(t){return`
  • ${t}
  • -`}checkbox(t){return" "}paragraph(t){return`

    ${t}

    -`}table(t,r){return r&&(r=`${r}`),` +`}list(e,n,r){const o=n?"ol":"ul",i=n&&r!==1?' start="'+r+'"':"";return"<"+o+i+`> +`+e+" +`}listitem(e){return`
  • ${e}
  • +`}checkbox(e){return" "}paragraph(e){return`

    ${e}

    +`}table(e,n){return n&&(n=`${n}`),`
    -`+t+` -`+r+`
    -`}tablerow(t){return` -${t} -`}tablecell(t,r){const n=r.header?"th":"td";return(r.align?`<${n} align="${r.align}">`:`<${n}>`)+t+` -`}strong(t){return`${t}`}em(t){return`${t}`}codespan(t){return`${t}`}br(){return this.options.xhtml?"
    ":"
    "}del(t){return`${t}`}link(t,r,n){if(t=F2(this.options.sanitize,this.options.baseUrl,t),t===null)return n;let o='",o}image(t,r,n){if(t=F2(this.options.sanitize,this.options.baseUrl,t),t===null)return n;let o=`${n}":">",o}text(t){return t}}class aM{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,r,n){return""+n}image(t,r,n){return""+n}br(){return""}}class lM{constructor(){this.seen={}}serialize(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(t,r){let n=t,o=0;if(this.seen.hasOwnProperty(n)){o=this.seen[t];do o++,n=t+"-"+o;while(this.seen.hasOwnProperty(n))}return r||(this.seen[t]=o,this.seen[n]=0),n}slug(t,r={}){const n=this.serialize(t);return this.getNextSafeSlug(n,r.dryrun)}}class ms{constructor(t){this.options=t||Ma,this.options.renderer=this.options.renderer||new YE,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new aM,this.slugger=new lM}static parse(t,r){return new ms(r).parse(t)}static parseInline(t,r){return new ms(r).parseInline(t)}parse(t,r=!0){let n="",o,i,s,a,l,c,u,d,p,f,h,m,b,y,g,v,E,k,x;const w=t.length;for(o=0;o0&&g.tokens[0].type==="paragraph"?(g.tokens[0].text=k+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&g.tokens[0].tokens[0].type==="text"&&(g.tokens[0].tokens[0].text=k+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:k}):y+=k),y+=this.parse(g.tokens,b),p+=this.renderer.listitem(y,E,v);n+=this.renderer.list(p,h,m);continue}case"html":{n+=this.renderer.html(f.text);continue}case"paragraph":{n+=this.renderer.paragraph(this.parseInline(f.tokens));continue}case"text":{for(p=f.tokens?this.parseInline(f.tokens):f.text;o+1{if(n.message+=` -Please report this to https://github.com/markedjs/marked.`,e){const o="

    An error occurred:

    "+pr(n.message+"",!0)+"
    ";if(t)return Promise.resolve(o);if(r){r(null,o);return}return o}if(t)return Promise.reject(n);if(r){r(n);return}throw n}}function cM(e,t){return(r,n,o)=>{typeof n=="function"&&(o=n,n=null);const i={...n};n={...le.defaults,...i};const s=Uce(n.silent,n.async,o);if(typeof r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(Bce(n),n.hooks&&(n.hooks.options=n),o){const a=n.highlight;let l;try{n.hooks&&(r=n.hooks.preprocess(r)),l=e(r,n)}catch(d){return s(d)}const c=function(d){let p;if(!d)try{n.walkTokens&&le.walkTokens(l,n.walkTokens),p=t(l,n),n.hooks&&(p=n.hooks.postprocess(p))}catch(f){d=f}return n.highlight=a,d?s(d):o(null,p)};if(!a||a.length<3||(delete n.highlight,!l.length))return c();let u=0;le.walkTokens(l,function(d){d.type==="code"&&(u++,setTimeout(()=>{a(d.text,d.lang,function(p,f){if(p)return c(p);f!=null&&f!==d.text&&(d.text=f,d.escaped=!0),u--,u===0&&c()})},0))}),u===0&&c();return}if(n.async)return Promise.resolve(n.hooks?n.hooks.preprocess(r):r).then(a=>e(a,n)).then(a=>n.walkTokens?Promise.all(le.walkTokens(a,n.walkTokens)).then(()=>a):a).then(a=>t(a,n)).then(a=>n.hooks?n.hooks.postprocess(a):a).catch(s);try{n.hooks&&(r=n.hooks.preprocess(r));const a=e(r,n);n.walkTokens&&le.walkTokens(a,n.walkTokens);let l=t(a,n);return n.hooks&&(l=n.hooks.postprocess(l)),l}catch(a){return s(a)}}}function le(e,t,r){return cM(hs.lex,ms.parse)(e,t,r)}le.options=le.setOptions=function(e){return le.defaults={...le.defaults,...e},Cce(le.defaults),le};le.getDefaults=nM;le.defaults=Ma;le.use=function(...e){const t=le.defaults.extensions||{renderers:{},childTokens:{}};e.forEach(r=>{const n={...r};if(n.async=le.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if(o.renderer){const i=t.renderers[o.name];i?t.renderers[o.name]=function(...s){let a=o.renderer.apply(this,s);return a===!1&&(a=i.apply(this,s)),a}:t.renderers[o.name]=o.renderer}if(o.tokenizer){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");t[o.level]?t[o.level].unshift(o.tokenizer):t[o.level]=[o.tokenizer],o.start&&(o.level==="block"?t.startBlock?t.startBlock.push(o.start):t.startBlock=[o.start]:o.level==="inline"&&(t.startInline?t.startInline.push(o.start):t.startInline=[o.start]))}o.childTokens&&(t.childTokens[o.name]=o.childTokens)}),n.extensions=t),r.renderer){const o=le.defaults.renderer||new YE;for(const i in r.renderer){const s=o[i];o[i]=(...a)=>{let l=r.renderer[i].apply(o,a);return l===!1&&(l=s.apply(o,a)),l}}n.renderer=o}if(r.tokenizer){const o=le.defaults.tokenizer||new KE;for(const i in r.tokenizer){const s=o[i];o[i]=(...a)=>{let l=r.tokenizer[i].apply(o,a);return l===!1&&(l=s.apply(o,a)),l}}n.tokenizer=o}if(r.hooks){const o=le.defaults.hooks||new $h;for(const i in r.hooks){const s=o[i];$h.passThroughHooks.has(i)?o[i]=a=>{if(le.defaults.async)return Promise.resolve(r.hooks[i].call(o,a)).then(c=>s.call(o,c));const l=r.hooks[i].call(o,a);return s.call(o,l)}:o[i]=(...a)=>{let l=r.hooks[i].apply(o,a);return l===!1&&(l=s.apply(o,a)),l}}n.hooks=o}if(r.walkTokens){const o=le.defaults.walkTokens;n.walkTokens=function(i){let s=[];return s.push(r.walkTokens.call(this,i)),o&&(s=s.concat(o.call(this,i))),s}}le.setOptions(n)})};le.walkTokens=function(e,t){let r=[];for(const n of e)switch(r=r.concat(t.call(le,n)),n.type){case"table":{for(const o of n.header)r=r.concat(le.walkTokens(o.tokens,t));for(const o of n.rows)for(const i of o)r=r.concat(le.walkTokens(i.tokens,t));break}case"list":{r=r.concat(le.walkTokens(n.items,t));break}default:le.defaults.extensions&&le.defaults.extensions.childTokens&&le.defaults.extensions.childTokens[n.type]?le.defaults.extensions.childTokens[n.type].forEach(function(o){r=r.concat(le.walkTokens(n[o],t))}):n.tokens&&(r=r.concat(le.walkTokens(n.tokens,t)))}return r};le.parseInline=cM(hs.lexInline,ms.parseInline);le.Parser=ms;le.parser=ms.parse;le.Renderer=YE;le.TextRenderer=aM;le.Lexer=hs;le.lexer=hs.lex;le.Tokenizer=KE;le.Slugger=lM;le.Hooks=$h;le.parse=le;le.options;le.setOptions;le.use;le.walkTokens;le.parseInline;ms.parse;hs.lex;var Vce=Object.defineProperty,jce=Object.getOwnPropertyDescriptor,mg=(e,t,r,n)=>{for(var o=n>1?void 0:n?jce(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Vce(t,r,o),o},Gce=Yh(Id);function Wce(e){return Yce.turndown(e)}function $1(e){const t=e.parentNode;if(!dt(t))return!1;if(t.nodeName==="THEAD")return!0;if(t.nodeName!=="TABLE"&&!uM(t))return!1;const r=[...e.childNodes];return r.every(n=>n.nodeName==="TH")&&r.some(n=>!!n.textContent)}function Bh(e){return dt(e)&&e.matches("th[data-controller-cell]")}function Kce(e){const t=e.parentNode;return!dt(t)||t.nodeName!=="TABLE"&&!uM(t)?!1:[...e.childNodes].every(n=>Bh(n))}function uM(e){var t;if(e.nodeName!=="TBODY")return!1;const r=e.previousSibling;return r?dt(r)&&r.nodeName==="THEAD"&&!((t=r.textContent)!=null&&t.trim()):!0}function W2(e){const t=e.closest("table");if(!t)return!1;const{parentNode:r}=t;return r?!!r.closest("table"):!0}function K2(e,t){var r;const n=[];for(const s of((r=t.parentNode)==null?void 0:r.childNodes)??[])Bh(s)||n.push(s);return`${(n.indexOf(t)===0?"| ":" ")+e.trim()} |`}var Yce=new Gce({codeBlockStyle:"fenced",headingStyle:"atx"}).addRule("taskListItems",{filter:e=>e.nodeName==="LI"&&e.hasAttribute("data-task-list-item"),replacement:(e,t)=>`- ${t.hasAttribute("data-checked")?"[x]":"[ ]"} ${e.trimStart()}`}).addRule("tableCell",{filter:["th","td"],replacement:(e,t)=>Bh(t)?"":K2(e,t)}).addRule("tableRow",{filter:"tr",replacement:(e,t)=>{let r="";const n={left:":--",right:"--:",center:":-:"},o=[...t.childNodes].filter(i=>!Bh(i));if($1(t))for(const i of o){if(!dt(i))continue;let s="---";const a=(i.getAttribute("align")??"").toLowerCase();a&&(s=n[a]||s),r+=K2(s,i)}return` -${e}${r?` -${r}`:""}`}}).addRule("table",{filter:e=>{if(e.nodeName!=="TABLE"||W2(e))return!1;const t=[...e.rows].filter(r=>!Kce(r));return $1(t[0])},replacement:e=>(e=e.replace(` +`+e+` +`+n+` +`}tablerow(e){return` +${e} +`}tablecell(e,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+e+` +`}strong(e){return`${e}`}em(e){return`${e}`}codespan(e){return`${e}`}br(){return this.options.xhtml?"
    ":"
    "}del(e){return`${e}`}link(e,n,r){if(e=m_(this.options.sanitize,this.options.baseUrl,e),e===null)return r;let o='
    ",o}image(e,n,r){if(e=m_(this.options.sanitize,this.options.baseUrl,e),e===null)return r;let o=`${r}":">",o}text(e){return e}}class YN{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,n,r){return""+r}image(e,n,r){return""+r}br(){return""}}class XN{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,n){let r=e,o=0;if(this.seen.hasOwnProperty(r)){o=this.seen[e];do o++,r=e+"-"+o;while(this.seen.hasOwnProperty(r))}return n||(this.seen[e]=o,this.seen[r]=0),r}slug(e,n={}){const r=this.serialize(e);return this.getNextSafeSlug(r,n.dryrun)}}class qs{constructor(e){this.options=e||kl,this.options.renderer=this.options.renderer||new wk,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new YN,this.slugger=new XN}static parse(e,n){return new qs(n).parse(e)}static parseInline(e,n){return new qs(n).parseInline(e)}parse(e,n=!0){let r="",o,i,s,l,a,u,c,d,h,f,p,g,m,v,y,b,w,k,x;const S=e.length;for(o=0;o0&&y.tokens[0].type==="paragraph"?(y.tokens[0].text=k+" "+y.tokens[0].text,y.tokens[0].tokens&&y.tokens[0].tokens.length>0&&y.tokens[0].tokens[0].type==="text"&&(y.tokens[0].tokens[0].text=k+" "+y.tokens[0].tokens[0].text)):y.tokens.unshift({type:"text",text:k}):v+=k),v+=this.parse(y.tokens,m),h+=this.renderer.listitem(v,w,b);r+=this.renderer.list(h,p,g);continue}case"html":{r+=this.renderer.html(f.text);continue}case"paragraph":{r+=this.renderer.paragraph(this.parseInline(f.tokens));continue}case"text":{for(h=f.tokens?this.parseInline(f.tokens):f.text;o+1{if(r.message+=` +Please report this to https://github.com/markedjs/marked.`,t){const o="

    An error occurred:

    "+jn(r.message+"",!0)+"
    ";if(e)return Promise.resolve(o);if(n){n(null,o);return}return o}if(e)return Promise.reject(r);if(n){n(r);return}throw r}}function qN(t,e){return(n,r,o)=>{typeof r=="function"&&(o=r,r=null);const i={...r};r={..._e.defaults,...i};const s=hhe(r.silent,r.async,o);if(typeof n>"u"||n===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(che(r),r.hooks&&(r.hooks.options=r),o){const l=r.highlight;let a;try{r.hooks&&(n=r.hooks.preprocess(n)),a=t(n,r)}catch(d){return s(d)}const u=function(d){let h;if(!d)try{r.walkTokens&&_e.walkTokens(a,r.walkTokens),h=e(a,r),r.hooks&&(h=r.hooks.postprocess(h))}catch(f){d=f}return r.highlight=l,d?s(d):o(null,h)};if(!l||l.length<3||(delete r.highlight,!a.length))return u();let c=0;_e.walkTokens(a,function(d){d.type==="code"&&(c++,setTimeout(()=>{l(d.text,d.lang,function(h,f){if(h)return u(h);f!=null&&f!==d.text&&(d.text=f,d.escaped=!0),c--,c===0&&u()})},0))}),c===0&&u();return}if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(n):n).then(l=>t(l,r)).then(l=>r.walkTokens?Promise.all(_e.walkTokens(l,r.walkTokens)).then(()=>l):l).then(l=>e(l,r)).then(l=>r.hooks?r.hooks.postprocess(l):l).catch(s);try{r.hooks&&(n=r.hooks.preprocess(n));const l=t(n,r);r.walkTokens&&_e.walkTokens(l,r.walkTokens);let a=e(l,r);return r.hooks&&(a=r.hooks.postprocess(a)),a}catch(l){return s(l)}}}function _e(t,e,n){return qN(Xs.lex,qs.parse)(t,e,n)}_e.options=_e.setOptions=function(t){return _e.defaults={..._e.defaults,...t},qde(_e.defaults),_e};_e.getDefaults=VN;_e.defaults=kl;_e.use=function(...t){const e=_e.defaults.extensions||{renderers:{},childTokens:{}};t.forEach(n=>{const r={...n};if(r.async=_e.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if(o.renderer){const i=e.renderers[o.name];i?e.renderers[o.name]=function(...s){let l=o.renderer.apply(this,s);return l===!1&&(l=i.apply(this,s)),l}:e.renderers[o.name]=o.renderer}if(o.tokenizer){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");e[o.level]?e[o.level].unshift(o.tokenizer):e[o.level]=[o.tokenizer],o.start&&(o.level==="block"?e.startBlock?e.startBlock.push(o.start):e.startBlock=[o.start]:o.level==="inline"&&(e.startInline?e.startInline.push(o.start):e.startInline=[o.start]))}o.childTokens&&(e.childTokens[o.name]=o.childTokens)}),r.extensions=e),n.renderer){const o=_e.defaults.renderer||new wk;for(const i in n.renderer){const s=o[i];o[i]=(...l)=>{let a=n.renderer[i].apply(o,l);return a===!1&&(a=s.apply(o,l)),a}}r.renderer=o}if(n.tokenizer){const o=_e.defaults.tokenizer||new bk;for(const i in n.tokenizer){const s=o[i];o[i]=(...l)=>{let a=n.tokenizer[i].apply(o,l);return a===!1&&(a=s.apply(o,l)),a}}r.tokenizer=o}if(n.hooks){const o=_e.defaults.hooks||new Kg;for(const i in n.hooks){const s=o[i];Kg.passThroughHooks.has(i)?o[i]=l=>{if(_e.defaults.async)return Promise.resolve(n.hooks[i].call(o,l)).then(u=>s.call(o,u));const a=n.hooks[i].call(o,l);return s.call(o,a)}:o[i]=(...l)=>{let a=n.hooks[i].apply(o,l);return a===!1&&(a=s.apply(o,l)),a}}r.hooks=o}if(n.walkTokens){const o=_e.defaults.walkTokens;r.walkTokens=function(i){let s=[];return s.push(n.walkTokens.call(this,i)),o&&(s=s.concat(o.call(this,i))),s}}_e.setOptions(r)})};_e.walkTokens=function(t,e){let n=[];for(const r of t)switch(n=n.concat(e.call(_e,r)),r.type){case"table":{for(const o of r.header)n=n.concat(_e.walkTokens(o.tokens,e));for(const o of r.rows)for(const i of o)n=n.concat(_e.walkTokens(i.tokens,e));break}case"list":{n=n.concat(_e.walkTokens(r.items,e));break}default:_e.defaults.extensions&&_e.defaults.extensions.childTokens&&_e.defaults.extensions.childTokens[r.type]?_e.defaults.extensions.childTokens[r.type].forEach(function(o){n=n.concat(_e.walkTokens(r[o],e))}):r.tokens&&(n=n.concat(_e.walkTokens(r.tokens,e)))}return n};_e.parseInline=qN(Xs.lexInline,qs.parseInline);_e.Parser=qs;_e.parser=qs.parse;_e.Renderer=wk;_e.TextRenderer=YN;_e.Lexer=Xs;_e.lexer=Xs.lex;_e.Tokenizer=bk;_e.Slugger=XN;_e.Hooks=Kg;_e.parse=_e;_e.options;_e.setOptions;_e.use;_e.walkTokens;_e.parseInline;qs.parse;Xs.lex;var fhe=Object.defineProperty,phe=Object.getOwnPropertyDescriptor,Tv=(t,e,n,r)=>{for(var o=r>1?void 0:r?phe(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&fhe(e,n,o),o},ghe=im(Rh);function mhe(t){return yhe.turndown(t)}function o0(t){const e=t.parentNode;if(!zt(e))return!1;if(e.nodeName==="THEAD")return!0;if(e.nodeName!=="TABLE"&&!ZN(e))return!1;const n=[...t.childNodes];return n.every(r=>r.nodeName==="TH")&&n.some(r=>!!r.textContent)}function Yg(t){return zt(t)&&t.matches("th[data-controller-cell]")}function vhe(t){const e=t.parentNode;return!zt(e)||e.nodeName!=="TABLE"&&!ZN(e)?!1:[...t.childNodes].every(r=>Yg(r))}function ZN(t){var e;if(t.nodeName!=="TBODY")return!1;const n=t.previousSibling;return n?zt(n)&&n.nodeName==="THEAD"&&!((e=n.textContent)!=null&&e.trim()):!0}function x_(t){const e=t.closest("table");if(!e)return!1;const{parentNode:n}=e;return n?!!n.closest("table"):!0}function k_(t,e){var n;const r=[];for(const s of((n=e.parentNode)==null?void 0:n.childNodes)??[])Yg(s)||r.push(s);return`${(r.indexOf(e)===0?"| ":" ")+t.trim()} |`}var yhe=new ghe({codeBlockStyle:"fenced",headingStyle:"atx"}).addRule("taskListItems",{filter:t=>t.nodeName==="LI"&&t.hasAttribute("data-task-list-item"),replacement:(t,e)=>`- ${e.hasAttribute("data-checked")?"[x]":"[ ]"} ${t.trimStart()}`}).addRule("tableCell",{filter:["th","td"],replacement:(t,e)=>Yg(e)?"":k_(t,e)}).addRule("tableRow",{filter:"tr",replacement:(t,e)=>{let n="";const r={left:":--",right:"--:",center:":-:"},o=[...e.childNodes].filter(i=>!Yg(i));if(o0(e))for(const i of o){if(!zt(i))continue;let s="---";const l=(i.getAttribute("align")??"").toLowerCase();l&&(s=r[l]||s),n+=k_(s,i)}return` +${t}${n?` +${n}`:""}`}}).addRule("table",{filter:t=>{if(t.nodeName!=="TABLE"||x_(t))return!1;const e=[...t.rows].filter(n=>!vhe(n));return o0(e[0])},replacement:t=>(t=t.replace(` `,` `),` -${e} +${t} -`)}).addRule("tableSection",{filter:["thead","tbody","tfoot"],replacement:function(e){return e}}).keep(e=>e.nodeName==="TABLE"&&!$1(e.rows[0])).keep(e=>e.nodeName==="TABLE"&&W2(e)).addRule("strikethrough",{filter:["del","s","strike"],replacement:function(e){return`~${e}~`}}).addRule("fencedCodeBlock",{filter:(e,t)=>!!(t.codeBlockStyle==="fenced"&&e.nodeName==="PRE"&&e.firstChild&&e.firstChild.nodeName==="CODE"),replacement:(e,t,r)=>{var n,o;re(dt(t.firstChild),{code:U.EXTENSION,message:`Invalid node \`${(n=t.firstChild)==null?void 0:n.nodeName}\` encountered for codeblock when converting html to markdown.`});const s=((o=(t.firstChild.getAttribute("class")??"").match(/(?:lang|language)-(\S+)/))==null?void 0:o[1])??t.firstChild.getAttribute("data-code-block-language")??"";return` +`)}).addRule("tableSection",{filter:["thead","tbody","tfoot"],replacement:function(t){return t}}).keep(t=>t.nodeName==="TABLE"&&!o0(t.rows[0])).keep(t=>t.nodeName==="TABLE"&&x_(t)).addRule("strikethrough",{filter:["del","s","strike"],replacement:function(t){return`~${t}~`}}).addRule("fencedCodeBlock",{filter:(t,e)=>!!(e.codeBlockStyle==="fenced"&&t.nodeName==="PRE"&&t.firstChild&&t.firstChild.nodeName==="CODE"),replacement:(t,e,n)=>{var r,o;we(zt(e.firstChild),{code:re.EXTENSION,message:`Invalid node \`${(r=e.firstChild)==null?void 0:r.nodeName}\` encountered for codeblock when converting html to markdown.`});const s=((o=(e.firstChild.getAttribute("class")??"").match(/(?:lang|language)-(\S+)/))==null?void 0:o[1])??e.firstChild.getAttribute("data-code-block-language")??"";return` -${r.fence}${s} -${t.firstChild.textContent} -${r.fence} +${n.fence}${s} +${e.firstChild.textContent} +${n.fence} -`}});le.use({renderer:{list(e,t,r){return t?`
      -${e}
    -`:`
      -${e}
    -`},listitem(e,t,r){return t?`
  • ${e}
  • -`:`
  • ${e}
  • -`}}});function qce(e,t){return le(e,{gfm:!0,smartLists:!0,xhtml:!0,sanitizer:t})}function Xce(e){re(typeof document,{code:U.EXTENSION,message:"Attempting to sanitize html within a non-browser environment. Please provide your own `sanitizeHtml` method to the `MarkdownExtension`."});const t=new DOMParser().parseFromString(`${e}`,"text/html");return t.normalize(),dM(t.body),t.body.innerHTML}function dM(e){if(!gP(e)){if(!dt(e)||/^(script|iframe|object|embed|svg)$/i.test(e.tagName))return e==null?void 0:e.remove();for(const{name:t}of e.attributes)/^(class|id|name|href|src|alt|align|valign)$/i.test(t)||e.attributes.removeNamedItem(t);for(const t of e.childNodes)dM(t)}}var sc=class extends Ye{get name(){return"markdown"}onCreate(){this.store.setStringHandler("markdown",this.markdownToProsemirrorNode.bind(this))}createPlugin(){return{props:{clipboardTextSerializer:this.options.copyAsMarkdown?t=>{const r=document.createElement("div"),n=un.fromSchema(this.store.schema);return r.append(n.serializeFragment(t.content)),this.options.htmlToMarkdown(r.innerHTML)}:void 0}}}markdownToProsemirrorNode(e){return this.store.stringHandlers.html({...e,content:this.options.markdownToHtml(e.content,this.options.htmlSanitizer)})}insertMarkdown(e,t){return r=>{const{state:n}=r;let o=this.options.markdownToHtml(e,this.options.htmlSanitizer);o=!(t!=null&&t.alwaysWrapInBlock)&&o.startsWith("

    <")&&o.endsWith(`

    -`)?o.slice(3,-5):`
    ${o}
    `;const i=this.store.stringHandlers.html({content:o,schema:n.schema,fragment:!0});return this.store.commands.insertNode.original(i,{...t,replaceEmptyParentBlock:!0})(r)}}getMarkdown(e){return this.options.htmlToMarkdown(this.store.helpers.getHTML(e))}toggleBoldMarkdown(){return e=>!1}};mg([Z()],sc.prototype,"insertMarkdown",1);mg([qe()],sc.prototype,"getMarkdown",1);mg([Z()],sc.prototype,"toggleBoldMarkdown",1);sc=mg([ye({defaultOptions:{htmlToMarkdown:Wce,markdownToHtml:qce,htmlSanitizer:Xce,activeNodes:[ie.Code],copyAsMarkdown:!1},staticKeys:["htmlToMarkdown","markdownToHtml","htmlSanitizer"]})],sc);var Zce=Object.defineProperty,Jce=Object.getOwnPropertyDescriptor,qE=(e,t,r,n)=>{for(var o=n>1?void 0:n?Jce(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Zce(t,r,o),o},Qce={icon:"strikethrough",label:({t:e})=>e(Yx.LABEL),description:({t:e})=>e(Yx.DESCRIPTION)},Md=class extends bs{get name(){return"strike"}createTags(){return[ie.FontStyle,ie.FormattingMark]}createMarkSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"s",getAttrs:e.parse},{tag:"del",getAttrs:e.parse},{tag:"strike",getAttrs:e.parse},{style:"text-decoration",getAttrs:r=>r==="line-through"?{}:!1},...t.parseDOM??[]],toDOM:r=>["s",e.dom(r),0]}}toggleStrike(){return ls({type:this.type})}shortcut(e){return this.toggleStrike()(e)}createInputRules(){return[Xu({regexp:/~([^~]+)~$/,type:this.type,ignoreWhitespace:!0})]}createPasteRules(){return[{regexp:/~([^~]+)~/g,type:"mark",markType:this.type}]}};qE([Z(Qce)],Md.prototype,"toggleStrike",1);qE([Nt({shortcut:V.Strike,command:"toggleStrike"})],Md.prototype,"shortcut",1);Md=qE([ye({})],Md);var Y2=new Ca("trailingNode");function eue(e){const{ignoredNodes:t=[],nodeName:r="paragraph"}=e??{},n=Ll([...t,r]);let o,i;return new Po({key:Y2,appendTransaction(s,a,l){const{doc:c,tr:u}=l,d=Y2.getState(l),p=c.content.size;if(d)return u.insert(p,o.create())},state:{init:(s,{doc:a,schema:l})=>{var c;const u=l.nodes[r];if(!u)throw new Error(`Invalid node being used for trailing node extension: '${r}'`);return o=u,i=Object.values(l.nodes).map(d=>d).filter(d=>!n.includes(d.name)),wr(i,(c=a.lastChild)==null?void 0:c.type)},apply:(s,a)=>{var l;return s.docChanged?wr(i,(l=s.doc.lastChild)==null?void 0:l.type):a}}})}var tue=Object.defineProperty,rue=Object.getOwnPropertyDescriptor,nue=(e,t,r,n)=>{for(var o=n>1?void 0:n?rue(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&tue(t,r,o),o},_y=class extends Ye{get name(){return"trailingNode"}onSetOptions(e){const{changes:t}=e;(t.disableTags.changed||t.ignoredNodes.changed||t.nodeName.changed)&&this.store.updateExtensionPlugins(this)}createExternalPlugins(){const{tags:e}=this.store,{disableTags:t,nodeName:r}=this.options,n=t?[...this.options.ignoredNodes]:[...this.options.ignoredNodes,...e.lastNodeCompatible];return[eue({ignoredNodes:n,nodeName:r})]}};_y=nue([ye({defaultOptions:{ignoredNodes:[],disableTags:!1,nodeName:"paragraph"}})],_y);var oue=Object.defineProperty,iue=Object.getOwnPropertyDescriptor,XE=(e,t,r,n)=>{for(var o=n>1?void 0:n?iue(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&oue(t,r,o),o},sue={icon:"underline",label:({t:e})=>e(qx.LABEL),description:({t:e})=>e(qx.DESCRIPTION)},Ld=class extends bs{get name(){return"underline"}createTags(){return[ie.FontStyle,ie.FormattingMark]}createMarkSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"u",getAttrs:e.parse},{style:"text-decoration",getAttrs:r=>r==="underline"?{}:!1},...t.parseDOM??[]],toDOM:r=>["u",e.dom(r),0]}}toggleUnderline(e){return ls({type:this.type,selection:e})}shortcut(e){return this.toggleUnderline()(e)}};XE([Z(sue)],Ld.prototype,"toggleUnderline",1);XE([Nt({shortcut:V.Underline,command:"toggleUnderline"})],Ld.prototype,"shortcut",1);Ld=XE([ye({})],Ld);/* +`}});_e.use({renderer:{list(t,e,n){return e?`
      +${t}
    +`:`
      +${t}
    +`},listitem(t,e,n){return e?`
  • ${t}
  • +`:`
  • ${t}
  • +`}}});function bhe(t,e){return _e(t,{gfm:!0,smartLists:!0,xhtml:!0,sanitizer:e})}function whe(t){we(typeof document,{code:re.EXTENSION,message:"Attempting to sanitize html within a non-browser environment. Please provide your own `sanitizeHtml` method to the `MarkdownExtension`."});const e=new DOMParser().parseFromString(`${t}`,"text/html");return e.normalize(),QN(e.body),e.body.innerHTML}function QN(t){if(!$z(t)){if(!zt(t)||/^(script|iframe|object|embed|svg)$/i.test(t.tagName))return t==null?void 0:t.remove();for(const{name:e}of t.attributes)/^(class|id|name|href|src|alt|align|valign)$/i.test(e)||t.attributes.removeNamedItem(e);for(const e of t.childNodes)QN(e)}}var nu=class extends yt{get name(){return"markdown"}onCreate(){this.store.setStringHandler("markdown",this.markdownToProsemirrorNode.bind(this))}createPlugin(){return{props:{clipboardTextSerializer:this.options.copyAsMarkdown?e=>{const n=document.createElement("div"),r=Ur.fromSchema(this.store.schema);return n.append(r.serializeFragment(e.content)),this.options.htmlToMarkdown(n.innerHTML)}:void 0}}}markdownToProsemirrorNode(t){return this.store.stringHandlers.html({...t,content:this.options.markdownToHtml(t.content,this.options.htmlSanitizer)})}insertMarkdown(t,e){return n=>{const{state:r}=n;let o=this.options.markdownToHtml(t,this.options.htmlSanitizer);o=!(e!=null&&e.alwaysWrapInBlock)&&o.startsWith("

    <")&&o.endsWith(`

    +`)?o.slice(3,-5):`
    ${o}
    `;const i=this.store.stringHandlers.html({content:o,schema:r.schema,fragment:!0});return this.store.commands.insertNode.original(i,{...e,replaceEmptyParentBlock:!0})(n)}}getMarkdown(t){return this.options.htmlToMarkdown(this.store.helpers.getHTML(t))}toggleBoldMarkdown(){return t=>!1}};Tv([de()],nu.prototype,"insertMarkdown",1);Tv([bt()],nu.prototype,"getMarkdown",1);Tv([de()],nu.prototype,"toggleBoldMarkdown",1);nu=Tv([Pe({defaultOptions:{htmlToMarkdown:mhe,markdownToHtml:bhe,htmlSanitizer:whe,activeNodes:[Ee.Code],copyAsMarkdown:!1},staticKeys:["htmlToMarkdown","markdownToHtml","htmlSanitizer"]})],nu);var xhe=Object.defineProperty,khe=Object.getOwnPropertyDescriptor,xk=(t,e,n,r)=>{for(var o=r>1?void 0:r?khe(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&xhe(e,n,o),o},Ehe={icon:"strikethrough",label:({t})=>t(ES.LABEL),description:({t})=>t(ES.DESCRIPTION)},Mh=class extends ea{get name(){return"strike"}createTags(){return[Ee.FontStyle,Ee.FormattingMark]}createMarkSpec(t,e){return{...e,attrs:t.defaults(),parseDOM:[{tag:"s",getAttrs:t.parse},{tag:"del",getAttrs:t.parse},{tag:"strike",getAttrs:t.parse},{style:"text-decoration",getAttrs:n=>n==="line-through"?{}:!1},...e.parseDOM??[]],toDOM:n=>["s",t.dom(n),0]}}toggleStrike(){return Ws({type:this.type})}shortcut(t){return this.toggleStrike()(t)}createInputRules(){return[Kd({regexp:/~([^~]+)~$/,type:this.type,ignoreWhitespace:!0})]}createPasteRules(){return[{regexp:/~([^~]+)~/g,type:"mark",markType:this.type}]}};xk([de(Ehe)],Mh.prototype,"toggleStrike",1);xk([nn({shortcut:oe.Strike,command:"toggleStrike"})],Mh.prototype,"shortcut",1);Mh=xk([Pe({})],Mh);var E_=new gl("trailingNode");function She(t){const{ignoredNodes:e=[],nodeName:n="paragraph"}=t??{},r=Mc([...e,n]);let o,i;return new gi({key:E_,appendTransaction(s,l,a){const{doc:u,tr:c}=a,d=E_.getState(a),h=u.content.size;if(d)return c.insert(h,o.create())},state:{init:(s,{doc:l,schema:a})=>{var u;const c=a.nodes[n];if(!c)throw new Error(`Invalid node being used for trailing node extension: '${n}'`);return o=c,i=Object.values(a.nodes).map(d=>d).filter(d=>!r.includes(d.name)),sr(i,(u=l.lastChild)==null?void 0:u.type)},apply:(s,l)=>{var a;return s.docChanged?sr(i,(a=s.doc.lastChild)==null?void 0:a.type):l}}})}var Che=Object.defineProperty,The=Object.getOwnPropertyDescriptor,Ahe=(t,e,n,r)=>{for(var o=r>1?void 0:r?The(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&Che(e,n,o),o},eb=class extends yt{get name(){return"trailingNode"}onSetOptions(t){const{changes:e}=t;(e.disableTags.changed||e.ignoredNodes.changed||e.nodeName.changed)&&this.store.updateExtensionPlugins(this)}createExternalPlugins(){const{tags:t}=this.store,{disableTags:e,nodeName:n}=this.options,r=e?[...this.options.ignoredNodes]:[...this.options.ignoredNodes,...t.lastNodeCompatible];return[She({ignoredNodes:r,nodeName:n})]}};eb=Ahe([Pe({defaultOptions:{ignoredNodes:[],disableTags:!1,nodeName:"paragraph"}})],eb);var _he=Object.defineProperty,Rhe=Object.getOwnPropertyDescriptor,kk=(t,e,n,r)=>{for(var o=r>1?void 0:r?Rhe(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&_he(e,n,o),o},Mhe={icon:"underline",label:({t})=>t(SS.LABEL),description:({t})=>t(SS.DESCRIPTION)},Oh=class extends ea{get name(){return"underline"}createTags(){return[Ee.FontStyle,Ee.FormattingMark]}createMarkSpec(t,e){return{...e,attrs:t.defaults(),parseDOM:[{tag:"u",getAttrs:t.parse},{style:"text-decoration",getAttrs:n=>n==="underline"?{}:!1},...e.parseDOM??[]],toDOM:n=>["u",t.dom(n),0]}}toggleUnderline(t){return Ws({type:this.type,selection:t})}shortcut(t){return this.toggleUnderline()(t)}};kk([de(Mhe)],Oh.prototype,"toggleUnderline",1);kk([nn({shortcut:oe.Underline,command:"toggleUnderline"})],Oh.prototype,"shortcut",1);Oh=kk([Pe({})],Oh);/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */const q2={};function aue(e,t){if(q2[e])return;const r=document.createElement("style"),n=lue(e)/1e4,o=cue({h:Math.abs(n),s:.6,v:.6}),i=uue(o);r.type="text/css",r.textContent=` - .remirror-editor-wrapper .${t}${e}::before { - content: '[${e}]'; + */const S_={};function Ohe(t,e){if(S_[t])return;const n=document.createElement("style"),r=Ihe(t)/1e4,o=Lhe({h:Math.abs(r),s:.6,v:.6}),i=Nhe(o);n.type="text/css",n.textContent=` + .remirror-editor-wrapper .${e}${t}::before { + content: '[${t}]'; font-family: monospace; font-size: 90%; color: ${i}; } - .remirror-editor-wrapper .${t}${e}::after { - content: '[/${e}]'; + .remirror-editor-wrapper .${e}${t}::after { + content: '[/${t}]'; font-family: monospace; font-size: 90%; color: ${i}; } - `,document.head.appendChild(r),q2[e]=!0}function lue(e){let t=0;if(!e||e.length===0)return t;for(let r=0;r{for(var o=n>1?void 0:n?pue(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&due(t,r,o),o};const Of="__editor_";let ac=class extends bs{get name(){return"className"}constructor(e){super(e);for(const t of e.classNames||[])aue(t,Of)}createTags(){return[ie.FormattingMark]}createMarkSpec(e,t){return{...t,attrs:{...e.defaults(),className:{}},parseDOM:[{tag:"*",getAttrs:r=>{var n;if(!dt(r))return!1;for(let o of r.classList)if(o.startsWith(Of)&&(o=o.substring(Of.length)),((n=this.options.classNames)==null?void 0:n.indexOf(o))>=0)return{...e.parse(r),className:o};return!1}},...t.parseDOM??[]],toDOM:r=>{const{className:n,...o}=om(r.attrs,e),i=e.dom(r),s=i.className,a=fue(n,s);return["span",{...o,...i,class:a},0]}}}setClassName(e,t){return this.store.commands.applyMark.original(this.type,{className:e},t)}removeClassName(e){return this.store.commands.removeMark.original({type:this.type,selection:e,expand:!0})}};ZE([Z({})],ac.prototype,"setClassName",1);ZE([Z({})],ac.prototype,"removeClassName",1);ac=ZE([ye({defaultOptions:{}})],ac);function fue(e,t){return e&&(e=`${Of}${e}`),e&&t?`${e} ${t}`:e||t}/* + `,document.head.appendChild(n),S_[t]=!0}function Ihe(t){let e=0;if(!t||t.length===0)return e;for(let n=0;n{for(var o=r>1?void 0:r?Dhe(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&$he(e,n,o),o};const Dp="__editor_";let ru=class extends ea{get name(){return"className"}constructor(t){super(t);for(const e of t.classNames||[])Ohe(e,Dp)}createTags(){return[Ee.FormattingMark]}createMarkSpec(t,e){return{...e,attrs:{...t.defaults(),className:{}},parseDOM:[{tag:"*",getAttrs:n=>{var r;if(!zt(n))return!1;for(let o of n.classList)if(o.startsWith(Dp)&&(o=o.substring(Dp.length)),((r=this.options.classNames)==null?void 0:r.indexOf(o))>=0)return{...t.parse(n),className:o};return!1}},...e.parseDOM??[]],toDOM:n=>{const{className:r,...o}=gm(n.attrs,t),i=t.dom(n),s=i.className,l=Phe(r,s);return["span",{...o,...i,class:l},0]}}}setClassName(t,e){return this.store.commands.applyMark.original(this.type,{className:t},e)}removeClassName(t){return this.store.commands.removeMark.original({type:this.type,selection:t,expand:!0})}};Ek([de({})],ru.prototype,"setClassName",1);Ek([de({})],ru.prototype,"removeClassName",1);ru=Ek([Pe({defaultOptions:{}})],ru);function Phe(t,e){return t&&(t=`${Dp}${t}`),t&&e?`${t} ${e}`:t||e}/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */function pM(e){const[t,r]=S.useState(e),n=S.useRef(e);return n.current=t,[t,r,n]}JE.displayName="abap";JE.aliases=[];function JE(e){e.languages.abap={comment:/^\*.*/m,string:/(`|')(?:\\.|(?!\1)[^\\\r\n])*\1/,"string-template":{pattern:/([|}])(?:\\.|[^\\|{\r\n])*(?=[|{])/,lookbehind:!0,alias:"string"},"eol-comment":{pattern:/(^|\s)".*/m,lookbehind:!0,alias:"comment"},keyword:{pattern:/(\s|\.|^)(?:\*-INPUT|\?TO|ABAP-SOURCE|ABBREVIATED|ABS|ABSTRACT|ACCEPT|ACCEPTING|ACCESSPOLICY|ACCORDING|ACOS|ACTIVATION|ACTUAL|ADD|ADD-CORRESPONDING|ADJACENT|AFTER|ALIAS|ALIASES|ALIGN|ALL|ALLOCATE|ALPHA|ANALYSIS|ANALYZER|AND|ANY|APPEND|APPENDAGE|APPENDING|APPLICATION|ARCHIVE|AREA|ARITHMETIC|AS|ASCENDING|ASIN|ASPECT|ASSERT|ASSIGN|ASSIGNED|ASSIGNING|ASSOCIATION|ASYNCHRONOUS|AT|ATAN|ATTRIBUTES|AUTHORITY|AUTHORITY-CHECK|AVG|BACK|BACKGROUND|BACKUP|BACKWARD|BADI|BASE|BEFORE|BEGIN|BETWEEN|BIG|BINARY|BINDING|BIT|BIT-AND|BIT-NOT|BIT-OR|BIT-XOR|BLACK|BLANK|BLANKS|BLOB|BLOCK|BLOCKS|BLUE|BOUND|BOUNDARIES|BOUNDS|BOXED|BREAK-POINT|BT|BUFFER|BY|BYPASSING|BYTE|BYTE-CA|BYTE-CN|BYTE-CO|BYTE-CS|BYTE-NA|BYTE-NS|BYTE-ORDER|C|CA|CALL|CALLING|CASE|CAST|CASTING|CATCH|CEIL|CENTER|CENTERED|CHAIN|CHAIN-INPUT|CHAIN-REQUEST|CHANGE|CHANGING|CHANNELS|CHAR-TO-HEX|CHARACTER|CHARLEN|CHECK|CHECKBOX|CIRCULAR|CI_|CLASS|CLASS-CODING|CLASS-DATA|CLASS-EVENTS|CLASS-METHODS|CLASS-POOL|CLEANUP|CLEAR|CLIENT|CLOB|CLOCK|CLOSE|CN|CNT|CO|COALESCE|CODE|CODING|COLLECT|COLOR|COLUMN|COLUMNS|COL_BACKGROUND|COL_GROUP|COL_HEADING|COL_KEY|COL_NEGATIVE|COL_NORMAL|COL_POSITIVE|COL_TOTAL|COMMENT|COMMENTS|COMMIT|COMMON|COMMUNICATION|COMPARING|COMPONENT|COMPONENTS|COMPRESSION|COMPUTE|CONCAT|CONCATENATE|COND|CONDENSE|CONDITION|CONNECT|CONNECTION|CONSTANTS|CONTEXT|CONTEXTS|CONTINUE|CONTROL|CONTROLS|CONV|CONVERSION|CONVERT|COPIES|COPY|CORRESPONDING|COS|COSH|COUNT|COUNTRY|COVER|CP|CPI|CREATE|CREATING|CRITICAL|CS|CURRENCY|CURRENCY_CONVERSION|CURRENT|CURSOR|CURSOR-SELECTION|CUSTOMER|CUSTOMER-FUNCTION|DANGEROUS|DATA|DATABASE|DATAINFO|DATASET|DATE|DAYLIGHT|DBMAXLEN|DD\/MM\/YY|DD\/MM\/YYYY|DDMMYY|DEALLOCATE|DECIMALS|DECIMAL_SHIFT|DECLARATIONS|DEEP|DEFAULT|DEFERRED|DEFINE|DEFINING|DEFINITION|DELETE|DELETING|DEMAND|DEPARTMENT|DESCENDING|DESCRIBE|DESTINATION|DETAIL|DIALOG|DIRECTORY|DISCONNECT|DISPLAY|DISPLAY-MODE|DISTANCE|DISTINCT|DIV|DIVIDE|DIVIDE-CORRESPONDING|DIVISION|DO|DUMMY|DUPLICATE|DUPLICATES|DURATION|DURING|DYNAMIC|DYNPRO|E|EACH|EDIT|EDITOR-CALL|ELSE|ELSEIF|EMPTY|ENABLED|ENABLING|ENCODING|END|END-ENHANCEMENT-SECTION|END-LINES|END-OF-DEFINITION|END-OF-FILE|END-OF-PAGE|END-OF-SELECTION|ENDAT|ENDCASE|ENDCATCH|ENDCHAIN|ENDCLASS|ENDDO|ENDENHANCEMENT|ENDEXEC|ENDFOR|ENDFORM|ENDFUNCTION|ENDIAN|ENDIF|ENDING|ENDINTERFACE|ENDLOOP|ENDMETHOD|ENDMODULE|ENDON|ENDPROVIDE|ENDSELECT|ENDTRY|ENDWHILE|ENGINEERING|ENHANCEMENT|ENHANCEMENT-POINT|ENHANCEMENT-SECTION|ENHANCEMENTS|ENTRIES|ENTRY|ENVIRONMENT|EQ|EQUAL|EQUIV|ERRORMESSAGE|ERRORS|ESCAPE|ESCAPING|EVENT|EVENTS|EXACT|EXCEPT|EXCEPTION|EXCEPTION-TABLE|EXCEPTIONS|EXCLUDE|EXCLUDING|EXEC|EXECUTE|EXISTS|EXIT|EXIT-COMMAND|EXP|EXPAND|EXPANDING|EXPIRATION|EXPLICIT|EXPONENT|EXPORT|EXPORTING|EXTEND|EXTENDED|EXTENSION|EXTRACT|FAIL|FETCH|FIELD|FIELD-GROUPS|FIELD-SYMBOL|FIELD-SYMBOLS|FIELDS|FILE|FILTER|FILTER-TABLE|FILTERS|FINAL|FIND|FIRST|FIRST-LINE|FIXED-POINT|FKEQ|FKGE|FLOOR|FLUSH|FONT|FOR|FORM|FORMAT|FORWARD|FOUND|FRAC|FRAME|FRAMES|FREE|FRIENDS|FROM|FUNCTION|FUNCTION-POOL|FUNCTIONALITY|FURTHER|GAPS|GE|GENERATE|GET|GIVING|GKEQ|GKGE|GLOBAL|GRANT|GREATER|GREEN|GROUP|GROUPS|GT|HANDLE|HANDLER|HARMLESS|HASHED|HAVING|HDB|HEAD-LINES|HEADER|HEADERS|HEADING|HELP-ID|HELP-REQUEST|HIDE|HIGH|HINT|HOLD|HOTSPOT|I|ICON|ID|IDENTIFICATION|IDENTIFIER|IDS|IF|IGNORE|IGNORING|IMMEDIATELY|IMPLEMENTATION|IMPLEMENTATIONS|IMPLEMENTED|IMPLICIT|IMPORT|IMPORTING|IN|INACTIVE|INCL|INCLUDE|INCLUDES|INCLUDING|INCREMENT|INDEX|INDEX-LINE|INFOTYPES|INHERITING|INIT|INITIAL|INITIALIZATION|INNER|INOUT|INPUT|INSERT|INSTANCES|INTENSIFIED|INTERFACE|INTERFACE-POOL|INTERFACES|INTERNAL|INTERVALS|INTO|INVERSE|INVERTED-DATE|IS|ISO|ITERATOR|ITNO|JOB|JOIN|KEEP|KEEPING|KERNEL|KEY|KEYS|KEYWORDS|KIND|LANGUAGE|LAST|LATE|LAYOUT|LE|LEADING|LEAVE|LEFT|LEFT-JUSTIFIED|LEFTPLUS|LEFTSPACE|LEGACY|LENGTH|LESS|LET|LEVEL|LEVELS|LIKE|LINE|LINE-COUNT|LINE-SELECTION|LINE-SIZE|LINEFEED|LINES|LIST|LIST-PROCESSING|LISTBOX|LITTLE|LLANG|LOAD|LOAD-OF-PROGRAM|LOB|LOCAL|LOCALE|LOCATOR|LOG|LOG-POINT|LOG10|LOGFILE|LOGICAL|LONG|LOOP|LOW|LOWER|LPAD|LPI|LT|M|MAIL|MAIN|MAJOR-ID|MAPPING|MARGIN|MARK|MASK|MATCH|MATCHCODE|MAX|MAXIMUM|MEDIUM|MEMBERS|MEMORY|MESH|MESSAGE|MESSAGE-ID|MESSAGES|MESSAGING|METHOD|METHODS|MIN|MINIMUM|MINOR-ID|MM\/DD\/YY|MM\/DD\/YYYY|MMDDYY|MOD|MODE|MODIF|MODIFIER|MODIFY|MODULE|MOVE|MOVE-CORRESPONDING|MULTIPLY|MULTIPLY-CORRESPONDING|NA|NAME|NAMETAB|NATIVE|NB|NE|NESTED|NESTING|NEW|NEW-LINE|NEW-PAGE|NEW-SECTION|NEXT|NO|NO-DISPLAY|NO-EXTENSION|NO-GAP|NO-GAPS|NO-GROUPING|NO-HEADING|NO-SCROLLING|NO-SIGN|NO-TITLE|NO-TOPOFPAGE|NO-ZERO|NODE|NODES|NON-UNICODE|NON-UNIQUE|NOT|NP|NS|NULL|NUMBER|NUMOFCHAR|O|OBJECT|OBJECTS|OBLIGATORY|OCCURRENCE|OCCURRENCES|OCCURS|OF|OFF|OFFSET|OLE|ON|ONLY|OPEN|OPTION|OPTIONAL|OPTIONS|OR|ORDER|OTHER|OTHERS|OUT|OUTER|OUTPUT|OUTPUT-LENGTH|OVERFLOW|OVERLAY|PACK|PACKAGE|PAD|PADDING|PAGE|PAGES|PARAMETER|PARAMETER-TABLE|PARAMETERS|PART|PARTIALLY|PATTERN|PERCENTAGE|PERFORM|PERFORMING|PERSON|PF|PF-STATUS|PINK|PLACES|POOL|POSITION|POS_HIGH|POS_LOW|PRAGMAS|PRECOMPILED|PREFERRED|PRESERVING|PRIMARY|PRINT|PRINT-CONTROL|PRIORITY|PRIVATE|PROCEDURE|PROCESS|PROGRAM|PROPERTY|PROTECTED|PROVIDE|PUBLIC|PUSHBUTTON|PUT|QUEUE-ONLY|QUICKINFO|RADIOBUTTON|RAISE|RAISING|RANGE|RANGES|RAW|READ|READ-ONLY|READER|RECEIVE|RECEIVED|RECEIVER|RECEIVING|RED|REDEFINITION|REDUCE|REDUCED|REF|REFERENCE|REFRESH|REGEX|REJECT|REMOTE|RENAMING|REPLACE|REPLACEMENT|REPLACING|REPORT|REQUEST|REQUESTED|RESERVE|RESET|RESOLUTION|RESPECTING|RESPONSIBLE|RESULT|RESULTS|RESUMABLE|RESUME|RETRY|RETURN|RETURNCODE|RETURNING|RIGHT|RIGHT-JUSTIFIED|RIGHTPLUS|RIGHTSPACE|RISK|RMC_COMMUNICATION_FAILURE|RMC_INVALID_STATUS|RMC_SYSTEM_FAILURE|ROLE|ROLLBACK|ROUND|ROWS|RTTI|RUN|SAP|SAP-SPOOL|SAVING|SCALE_PRESERVING|SCALE_PRESERVING_SCIENTIFIC|SCAN|SCIENTIFIC|SCIENTIFIC_WITH_LEADING_ZERO|SCREEN|SCROLL|SCROLL-BOUNDARY|SCROLLING|SEARCH|SECONDARY|SECONDS|SECTION|SELECT|SELECT-OPTIONS|SELECTION|SELECTION-SCREEN|SELECTION-SET|SELECTION-SETS|SELECTION-TABLE|SELECTIONS|SELECTOR|SEND|SEPARATE|SEPARATED|SET|SHARED|SHIFT|SHORT|SHORTDUMP-ID|SIGN|SIGN_AS_POSTFIX|SIMPLE|SIN|SINGLE|SINH|SIZE|SKIP|SKIPPING|SMART|SOME|SORT|SORTABLE|SORTED|SOURCE|SPACE|SPECIFIED|SPLIT|SPOOL|SPOTS|SQL|SQLSCRIPT|SQRT|STABLE|STAMP|STANDARD|START-OF-SELECTION|STARTING|STATE|STATEMENT|STATEMENTS|STATIC|STATICS|STATUSINFO|STEP-LOOP|STOP|STRLEN|STRUCTURE|STRUCTURES|STYLE|SUBKEY|SUBMATCHES|SUBMIT|SUBROUTINE|SUBSCREEN|SUBSTRING|SUBTRACT|SUBTRACT-CORRESPONDING|SUFFIX|SUM|SUMMARY|SUMMING|SUPPLIED|SUPPLY|SUPPRESS|SWITCH|SWITCHSTATES|SYMBOL|SYNCPOINTS|SYNTAX|SYNTAX-CHECK|SYNTAX-TRACE|SYSTEM-CALL|SYSTEM-EXCEPTIONS|SYSTEM-EXIT|TAB|TABBED|TABLE|TABLES|TABLEVIEW|TABSTRIP|TAN|TANH|TARGET|TASK|TASKS|TEST|TESTING|TEXT|TEXTPOOL|THEN|THROW|TIME|TIMES|TIMESTAMP|TIMEZONE|TITLE|TITLE-LINES|TITLEBAR|TO|TOKENIZATION|TOKENS|TOP-LINES|TOP-OF-PAGE|TRACE-FILE|TRACE-TABLE|TRAILING|TRANSACTION|TRANSFER|TRANSFORMATION|TRANSLATE|TRANSPORTING|TRMAC|TRUNC|TRUNCATE|TRUNCATION|TRY|TYPE|TYPE-POOL|TYPE-POOLS|TYPES|ULINE|UNASSIGN|UNDER|UNICODE|UNION|UNIQUE|UNIT|UNIT_CONVERSION|UNIX|UNPACK|UNTIL|UNWIND|UP|UPDATE|UPPER|USER|USER-COMMAND|USING|UTF-8|VALID|VALUE|VALUE-REQUEST|VALUES|VARY|VARYING|VERIFICATION-MESSAGE|VERSION|VIA|VIEW|VISIBLE|WAIT|WARNING|WHEN|WHENEVER|WHERE|WHILE|WIDTH|WINDOW|WINDOWS|WITH|WITH-HEADING|WITH-TITLE|WITHOUT|WORD|WORK|WRITE|WRITER|X|XML|XOR|XSD|XSTRLEN|YELLOW|YES|YYMMDD|Z|ZERO|ZONE)(?![\w-])/i,lookbehind:!0},number:/\b\d+\b/,operator:{pattern:/(\s)(?:\*\*?|<[=>]?|>=?|\?=|[-+\/=])(?=\s)/,lookbehind:!0},"string-operator":{pattern:/(\s)&&?(?=\s)/,lookbehind:!0,alias:"keyword"},"token-operator":[{pattern:/(\w)(?:->?|=>|[~|{}])(?=\w)/,lookbehind:!0,alias:"punctuation"},{pattern:/[|{}]/,alias:"punctuation"}],punctuation:/[,.:()]/}}_r.displayName="clike";_r.aliases=[];function _r(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}Cs.displayName="javascript";Cs.aliases=["js"];function Cs(e){e.register(_r),e.languages.javascript=e.languages.extend("clike",{"class-name":[e.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}QE.displayName="actionscript";QE.aliases=[];function QE(e){e.register(Cs),e.languages.actionscript=e.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<>?>?|[!=]=?)=?|[~?@]/}),e.languages.actionscript["class-name"].alias="function",delete e.languages.actionscript.parameter,delete e.languages.actionscript["literal-property"],e.languages.markup&&e.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:e.languages.markup}})}ek.displayName="bash";ek.aliases=["sh","shell"];function ek(e){(function(t){var r="\\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},o={bash:n,environment:{pattern:RegExp("\\$"+r),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("(\\{)"+r),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+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+r),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:o},{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:o},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:o.entity}}],environment:{pattern:RegExp("\\$?"+r),alias:"constant"},variable:o.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=t.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],s=o.variable[1].inside,a=0;a?^\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:/[,;:()]/}}rk.displayName="batch";rk.aliases=[];function rk(e){(function(t){var r=/%%?[~:\w]+%?|!\S+!/,n={pattern:/\/[a-z?]+(?=[ :]|$):?|-[a-z]\b|--[a-z-]+\b/im,alias:"attr-name",inside:{punctuation:/:/}},o=/"(?:[\\"]"|[^"])*"(?!")/,i=/(?:\b|-)\d+\b/;t.languages.batch={comment:[/^::.*/m,{pattern:/((?:^|[&(])[ \t]*)rem\b(?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0}],label:{pattern:/^:.*/m,alias:"property"},command:[{pattern:/((?:^|[&(])[ \t]*)for(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* \S+ in \([^)]+\) do/im,lookbehind:!0,inside:{keyword:/\b(?:do|in)\b|^for\b/i,string:o,parameter:n,variable:r,number:i,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*)if(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:not )?(?:cmdextversion \d+|defined \w+|errorlevel \d+|exist \S+|(?:"[^"]*"|(?!")(?:(?!==)\S)+)?(?:==| (?:equ|geq|gtr|leq|lss|neq) )(?:"[^"]*"|[^\s"]\S*))/im,lookbehind:!0,inside:{keyword:/\b(?:cmdextversion|defined|errorlevel|exist|not)\b|^if\b/i,string:o,parameter:n,variable:r,number:i,operator:/\^|==|\b(?:equ|geq|gtr|leq|lss|neq)\b/i}},{pattern:/((?:^|[&()])[ \t]*)else\b/im,lookbehind:!0,inside:{keyword:/^else\b/i}},{pattern:/((?:^|[&(])[ \t]*)set(?: \/[a-z](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0,inside:{keyword:/^set\b/i,string:o,parameter:n,variable:[r,/\w+(?=(?:[*\/%+\-&^|]|<<|>>)?=)/],number:i,operator:/[*\/%+\-&^|]=?|<<=?|>>=?|[!~_=]/,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*@?)\w+\b(?:"(?:[\\"]"|[^"])*"(?!")|[^"^&)\r\n]|\^(?:\r\n|[\s\S]))*/m,lookbehind:!0,inside:{keyword:/^\w+\b/,string:o,parameter:n,label:{pattern:/(^\s*):\S+/m,lookbehind:!0,alias:"property"},variable:r,number:i,operator:/\^/}}],operator:/[&@]/,punctuation:/[()']/}})(e)}cp.displayName="c";cp.aliases=[];function cp(e){e.register(_r),e.languages.c=e.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),e.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),e.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},e.languages.c.string],char:e.languages.c.char,comment:e.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:e.languages.c}}}}),e.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete e.languages.c.boolean}nk.displayName="clojure";nk.aliases=[];function nk(e){e.languages.clojure={comment:{pattern:/;.*/,greedy:!0},string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},char:/\\\w+/,symbol:{pattern:/(^|[\s()\[\]{},])::?[\w*+!?'<>=/.-]+/,lookbehind:!0},keyword:{pattern:/(\()(?:-|->|->>|\.|\.\.|\*|\/|\+|<|<=|=|==|>|>=|accessor|agent|agent-errors|aget|alength|all-ns|alter|and|append-child|apply|array-map|aset|aset-boolean|aset-byte|aset-char|aset-double|aset-float|aset-int|aset-long|aset-short|assert|assoc|await|await-for|bean|binding|bit-and|bit-not|bit-or|bit-shift-left|bit-shift-right|bit-xor|boolean|branch\?|butlast|byte|cast|char|children|class|clear-agent-errors|comment|commute|comp|comparator|complement|concat|cond|conj|cons|constantly|construct-proxy|contains\?|count|create-ns|create-struct|cycle|dec|declare|def|def-|definline|definterface|defmacro|defmethod|defmulti|defn|defn-|defonce|defproject|defprotocol|defrecord|defstruct|deftype|deref|difference|disj|dissoc|distinct|do|doall|doc|dorun|doseq|dosync|dotimes|doto|double|down|drop|drop-while|edit|end\?|ensure|eval|every\?|false\?|ffirst|file-seq|filter|find|find-doc|find-ns|find-var|first|float|flush|fn|fnseq|for|frest|gensym|get|get-proxy-class|hash-map|hash-set|identical\?|identity|if|if-let|if-not|import|in-ns|inc|index|insert-child|insert-left|insert-right|inspect-table|inspect-tree|instance\?|int|interleave|intersection|into|into-array|iterate|join|key|keys|keyword|keyword\?|last|lazy-cat|lazy-cons|left|lefts|let|line-seq|list|list\*|load|load-file|locking|long|loop|macroexpand|macroexpand-1|make-array|make-node|map|map-invert|map\?|mapcat|max|max-key|memfn|merge|merge-with|meta|min|min-key|monitor-enter|name|namespace|neg\?|new|newline|next|nil\?|node|not|not-any\?|not-every\?|not=|ns|ns-imports|ns-interns|ns-map|ns-name|ns-publics|ns-refers|ns-resolve|ns-unmap|nth|nthrest|or|parse|partial|path|peek|pop|pos\?|pr|pr-str|print|print-str|println|println-str|prn|prn-str|project|proxy|proxy-mappings|quot|quote|rand|rand-int|range|re-find|re-groups|re-matcher|re-matches|re-pattern|re-seq|read|read-line|recur|reduce|ref|ref-set|refer|rem|remove|remove-method|remove-ns|rename|rename-keys|repeat|replace|replicate|resolve|rest|resultset-seq|reverse|rfirst|right|rights|root|rrest|rseq|second|select|select-keys|send|send-off|seq|seq-zip|seq\?|set|set!|short|slurp|some|sort|sort-by|sorted-map|sorted-map-by|sorted-set|special-symbol\?|split-at|split-with|str|string\?|struct|struct-map|subs|subvec|symbol|symbol\?|sync|take|take-nth|take-while|test|throw|time|to-array|to-array-2d|tree-seq|true\?|try|union|up|update-proxy|val|vals|var|var-get|var-set|var\?|vector|vector-zip|vector\?|when|when-first|when-let|when-not|with-local-vars|with-meta|with-open|with-out-str|xml-seq|xml-zip|zero\?|zipmap|zipper)(?=[\s)]|$)/,lookbehind:!0},boolean:/\b(?:false|nil|true)\b/,number:{pattern:/(^|[^\w$@])(?:\d+(?:[/.]\d+)?(?:e[+-]?\d+)?|0x[a-f0-9]+|[1-9]\d?r[a-z0-9]+)[lmn]?(?![\w$@])/i,lookbehind:!0},function:{pattern:/((?:^|[^'])\()[\w*+!?'<>=/.-]+(?=[\s)]|$)/,lookbehind:!0},operator:/[#@^`~]/,punctuation:/[{}\[\](),]/}}ok.displayName="cmake";ok.aliases=[];function ok(e){e.languages.cmake={comment:/#.*/,string:{pattern:/"(?:[^\\"]|\\.)*"/,greedy:!0,inside:{interpolation:{pattern:/\$\{(?:[^{}$]|\$\{[^{}$]*\})*\}/,inside:{punctuation:/\$\{|\}/,variable:/\w+/}}}},variable:/\b(?:CMAKE_\w+|\w+_(?:(?:BINARY|SOURCE)_DIR|DESCRIPTION|HOMEPAGE_URL|ROOT|VERSION(?:_MAJOR|_MINOR|_PATCH|_TWEAK)?)|(?:ANDROID|APPLE|BORLAND|BUILD_SHARED_LIBS|CACHE|CPACK_(?:ABSOLUTE_DESTINATION_FILES|COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY|ERROR_ON_ABSOLUTE_INSTALL_DESTINATION|INCLUDE_TOPLEVEL_DIRECTORY|INSTALL_DEFAULT_DIRECTORY_PERMISSIONS|INSTALL_SCRIPT|PACKAGING_INSTALL_PREFIX|SET_DESTDIR|WARN_ON_ABSOLUTE_INSTALL_DESTINATION)|CTEST_(?:BINARY_DIRECTORY|BUILD_COMMAND|BUILD_NAME|BZR_COMMAND|BZR_UPDATE_OPTIONS|CHANGE_ID|CHECKOUT_COMMAND|CONFIGURATION_TYPE|CONFIGURE_COMMAND|COVERAGE_COMMAND|COVERAGE_EXTRA_FLAGS|CURL_OPTIONS|CUSTOM_(?:COVERAGE_EXCLUDE|ERROR_EXCEPTION|ERROR_MATCH|ERROR_POST_CONTEXT|ERROR_PRE_CONTEXT|MAXIMUM_FAILED_TEST_OUTPUT_SIZE|MAXIMUM_NUMBER_OF_(?:ERRORS|WARNINGS)|MAXIMUM_PASSED_TEST_OUTPUT_SIZE|MEMCHECK_IGNORE|POST_MEMCHECK|POST_TEST|PRE_MEMCHECK|PRE_TEST|TESTS_IGNORE|WARNING_EXCEPTION|WARNING_MATCH)|CVS_CHECKOUT|CVS_COMMAND|CVS_UPDATE_OPTIONS|DROP_LOCATION|DROP_METHOD|DROP_SITE|DROP_SITE_CDASH|DROP_SITE_PASSWORD|DROP_SITE_USER|EXTRA_COVERAGE_GLOB|GIT_COMMAND|GIT_INIT_SUBMODULES|GIT_UPDATE_CUSTOM|GIT_UPDATE_OPTIONS|HG_COMMAND|HG_UPDATE_OPTIONS|LABELS_FOR_SUBPROJECTS|MEMORYCHECK_(?:COMMAND|COMMAND_OPTIONS|SANITIZER_OPTIONS|SUPPRESSIONS_FILE|TYPE)|NIGHTLY_START_TIME|P4_CLIENT|P4_COMMAND|P4_OPTIONS|P4_UPDATE_OPTIONS|RUN_CURRENT_SCRIPT|SCP_COMMAND|SITE|SOURCE_DIRECTORY|SUBMIT_URL|SVN_COMMAND|SVN_OPTIONS|SVN_UPDATE_OPTIONS|TEST_LOAD|TEST_TIMEOUT|TRIGGER_SITE|UPDATE_COMMAND|UPDATE_OPTIONS|UPDATE_VERSION_ONLY|USE_LAUNCHERS)|CYGWIN|ENV|EXECUTABLE_OUTPUT_PATH|GHS-MULTI|IOS|LIBRARY_OUTPUT_PATH|MINGW|MSVC(?:10|11|12|14|60|70|71|80|90|_IDE|_TOOLSET_VERSION|_VERSION)?|MSYS|PROJECT_NAME|UNIX|WIN32|WINCE|WINDOWS_PHONE|WINDOWS_STORE|XCODE))\b/,property:/\b(?:cxx_\w+|(?:ARCHIVE_OUTPUT_(?:DIRECTORY|NAME)|COMPILE_DEFINITIONS|COMPILE_PDB_NAME|COMPILE_PDB_OUTPUT_DIRECTORY|EXCLUDE_FROM_DEFAULT_BUILD|IMPORTED_(?:IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_LANGUAGES|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|NO_SONAME|OBJECTS|SONAME)|INTERPROCEDURAL_OPTIMIZATION|LIBRARY_OUTPUT_DIRECTORY|LIBRARY_OUTPUT_NAME|LINK_FLAGS|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|MAP_IMPORTED_CONFIG|OSX_ARCHITECTURES|OUTPUT_NAME|PDB_NAME|PDB_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_NAME|STATIC_LIBRARY_FLAGS|VS_CSHARP|VS_DOTNET_REFERENCEPROP|VS_DOTNET_REFERENCE|VS_GLOBAL_SECTION_POST|VS_GLOBAL_SECTION_PRE|VS_GLOBAL|XCODE_ATTRIBUTE)_\w+|\w+_(?:CLANG_TIDY|COMPILER_LAUNCHER|CPPCHECK|CPPLINT|INCLUDE_WHAT_YOU_USE|OUTPUT_NAME|POSTFIX|VISIBILITY_PRESET)|ABSTRACT|ADDITIONAL_MAKE_CLEAN_FILES|ADVANCED|ALIASED_TARGET|ALLOW_DUPLICATE_CUSTOM_TARGETS|ANDROID_(?:ANT_ADDITIONAL_OPTIONS|API|API_MIN|ARCH|ASSETS_DIRECTORIES|GUI|JAR_DEPENDENCIES|NATIVE_LIB_DEPENDENCIES|NATIVE_LIB_DIRECTORIES|PROCESS_MAX|PROGUARD|PROGUARD_CONFIG_PATH|SECURE_PROPS_PATH|SKIP_ANT_STEP|STL_TYPE)|ARCHIVE_OUTPUT_DIRECTORY|ATTACHED_FILES|ATTACHED_FILES_ON_FAIL|AUTOGEN_(?:BUILD_DIR|ORIGIN_DEPENDS|PARALLEL|SOURCE_GROUP|TARGETS_FOLDER|TARGET_DEPENDS)|AUTOMOC|AUTOMOC_(?:COMPILER_PREDEFINES|DEPEND_FILTERS|EXECUTABLE|MACRO_NAMES|MOC_OPTIONS|SOURCE_GROUP|TARGETS_FOLDER)|AUTORCC|AUTORCC_EXECUTABLE|AUTORCC_OPTIONS|AUTORCC_SOURCE_GROUP|AUTOUIC|AUTOUIC_EXECUTABLE|AUTOUIC_OPTIONS|AUTOUIC_SEARCH_PATHS|BINARY_DIR|BUILDSYSTEM_TARGETS|BUILD_RPATH|BUILD_RPATH_USE_ORIGIN|BUILD_WITH_INSTALL_NAME_DIR|BUILD_WITH_INSTALL_RPATH|BUNDLE|BUNDLE_EXTENSION|CACHE_VARIABLES|CLEAN_NO_CUSTOM|COMMON_LANGUAGE_RUNTIME|COMPATIBLE_INTERFACE_(?:BOOL|NUMBER_MAX|NUMBER_MIN|STRING)|COMPILE_(?:DEFINITIONS|FEATURES|FLAGS|OPTIONS|PDB_NAME|PDB_OUTPUT_DIRECTORY)|COST|CPACK_DESKTOP_SHORTCUTS|CPACK_NEVER_OVERWRITE|CPACK_PERMANENT|CPACK_STARTUP_SHORTCUTS|CPACK_START_MENU_SHORTCUTS|CPACK_WIX_ACL|CROSSCOMPILING_EMULATOR|CUDA_EXTENSIONS|CUDA_PTX_COMPILATION|CUDA_RESOLVE_DEVICE_SYMBOLS|CUDA_SEPARABLE_COMPILATION|CUDA_STANDARD|CUDA_STANDARD_REQUIRED|CXX_EXTENSIONS|CXX_STANDARD|CXX_STANDARD_REQUIRED|C_EXTENSIONS|C_STANDARD|C_STANDARD_REQUIRED|DEBUG_CONFIGURATIONS|DEFINE_SYMBOL|DEFINITIONS|DEPENDS|DEPLOYMENT_ADDITIONAL_FILES|DEPLOYMENT_REMOTE_DIRECTORY|DISABLED|DISABLED_FEATURES|ECLIPSE_EXTRA_CPROJECT_CONTENTS|ECLIPSE_EXTRA_NATURES|ENABLED_FEATURES|ENABLED_LANGUAGES|ENABLE_EXPORTS|ENVIRONMENT|EXCLUDE_FROM_ALL|EXCLUDE_FROM_DEFAULT_BUILD|EXPORT_NAME|EXPORT_PROPERTIES|EXTERNAL_OBJECT|EchoString|FAIL_REGULAR_EXPRESSION|FIND_LIBRARY_USE_LIB32_PATHS|FIND_LIBRARY_USE_LIB64_PATHS|FIND_LIBRARY_USE_LIBX32_PATHS|FIND_LIBRARY_USE_OPENBSD_VERSIONING|FIXTURES_CLEANUP|FIXTURES_REQUIRED|FIXTURES_SETUP|FOLDER|FRAMEWORK|Fortran_FORMAT|Fortran_MODULE_DIRECTORY|GENERATED|GENERATOR_FILE_NAME|GENERATOR_IS_MULTI_CONFIG|GHS_INTEGRITY_APP|GHS_NO_SOURCE_GROUP_FILE|GLOBAL_DEPENDS_DEBUG_MODE|GLOBAL_DEPENDS_NO_CYCLES|GNUtoMS|HAS_CXX|HEADER_FILE_ONLY|HELPSTRING|IMPLICIT_DEPENDS_INCLUDE_TRANSFORM|IMPORTED|IMPORTED_(?:COMMON_LANGUAGE_RUNTIME|CONFIGURATIONS|GLOBAL|IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_(?:LANGUAGES|LIBRARIES|MULTIPLICITY)|LOCATION|NO_SONAME|OBJECTS|SONAME)|IMPORT_PREFIX|IMPORT_SUFFIX|INCLUDE_DIRECTORIES|INCLUDE_REGULAR_EXPRESSION|INSTALL_NAME_DIR|INSTALL_RPATH|INSTALL_RPATH_USE_LINK_PATH|INTERFACE_(?:AUTOUIC_OPTIONS|COMPILE_DEFINITIONS|COMPILE_FEATURES|COMPILE_OPTIONS|INCLUDE_DIRECTORIES|LINK_DEPENDS|LINK_DIRECTORIES|LINK_LIBRARIES|LINK_OPTIONS|POSITION_INDEPENDENT_CODE|SOURCES|SYSTEM_INCLUDE_DIRECTORIES)|INTERPROCEDURAL_OPTIMIZATION|IN_TRY_COMPILE|IOS_INSTALL_COMBINED|JOB_POOLS|JOB_POOL_COMPILE|JOB_POOL_LINK|KEEP_EXTENSION|LABELS|LANGUAGE|LIBRARY_OUTPUT_DIRECTORY|LINKER_LANGUAGE|LINK_(?:DEPENDS|DEPENDS_NO_SHARED|DIRECTORIES|FLAGS|INTERFACE_LIBRARIES|INTERFACE_MULTIPLICITY|LIBRARIES|OPTIONS|SEARCH_END_STATIC|SEARCH_START_STATIC|WHAT_YOU_USE)|LISTFILE_STACK|LOCATION|MACOSX_BUNDLE|MACOSX_BUNDLE_INFO_PLIST|MACOSX_FRAMEWORK_INFO_PLIST|MACOSX_PACKAGE_LOCATION|MACOSX_RPATH|MACROS|MANUALLY_ADDED_DEPENDENCIES|MEASUREMENT|MODIFIED|NAME|NO_SONAME|NO_SYSTEM_FROM_IMPORTED|OBJECT_DEPENDS|OBJECT_OUTPUTS|OSX_ARCHITECTURES|OUTPUT_NAME|PACKAGES_FOUND|PACKAGES_NOT_FOUND|PARENT_DIRECTORY|PASS_REGULAR_EXPRESSION|PDB_NAME|PDB_OUTPUT_DIRECTORY|POSITION_INDEPENDENT_CODE|POST_INSTALL_SCRIPT|PREDEFINED_TARGETS_FOLDER|PREFIX|PRE_INSTALL_SCRIPT|PRIVATE_HEADER|PROCESSORS|PROCESSOR_AFFINITY|PROJECT_LABEL|PUBLIC_HEADER|REPORT_UNDEFINED_PROPERTIES|REQUIRED_FILES|RESOURCE|RESOURCE_LOCK|RULE_LAUNCH_COMPILE|RULE_LAUNCH_CUSTOM|RULE_LAUNCH_LINK|RULE_MESSAGES|RUNTIME_OUTPUT_DIRECTORY|RUN_SERIAL|SKIP_AUTOGEN|SKIP_AUTOMOC|SKIP_AUTORCC|SKIP_AUTOUIC|SKIP_BUILD_RPATH|SKIP_RETURN_CODE|SOURCES|SOURCE_DIR|SOVERSION|STATIC_LIBRARY_FLAGS|STATIC_LIBRARY_OPTIONS|STRINGS|SUBDIRECTORIES|SUFFIX|SYMBOLIC|TARGET_ARCHIVES_MAY_BE_SHARED_LIBS|TARGET_MESSAGES|TARGET_SUPPORTS_SHARED_LIBS|TESTS|TEST_INCLUDE_FILE|TEST_INCLUDE_FILES|TIMEOUT|TIMEOUT_AFTER_MATCH|TYPE|USE_FOLDERS|VALUE|VARIABLES|VERSION|VISIBILITY_INLINES_HIDDEN|VS_(?:CONFIGURATION_TYPE|COPY_TO_OUT_DIR|DEBUGGER_(?:COMMAND|COMMAND_ARGUMENTS|ENVIRONMENT|WORKING_DIRECTORY)|DEPLOYMENT_CONTENT|DEPLOYMENT_LOCATION|DOTNET_REFERENCES|DOTNET_REFERENCES_COPY_LOCAL|INCLUDE_IN_VSIX|IOT_STARTUP_TASK|KEYWORD|RESOURCE_GENERATOR|SCC_AUXPATH|SCC_LOCALPATH|SCC_PROJECTNAME|SCC_PROVIDER|SDK_REFERENCES|SHADER_(?:DISABLE_OPTIMIZATIONS|ENABLE_DEBUG|ENTRYPOINT|FLAGS|MODEL|OBJECT_FILE_NAME|OUTPUT_HEADER_FILE|TYPE|VARIABLE_NAME)|STARTUP_PROJECT|TOOL_OVERRIDE|USER_PROPS|WINRT_COMPONENT|WINRT_EXTENSIONS|WINRT_REFERENCES|XAML_TYPE)|WILL_FAIL|WIN32_EXECUTABLE|WINDOWS_EXPORT_ALL_SYMBOLS|WORKING_DIRECTORY|WRAP_EXCLUDE|XCODE_(?:EMIT_EFFECTIVE_PLATFORM_NAME|EXPLICIT_FILE_TYPE|FILE_ATTRIBUTES|LAST_KNOWN_FILE_TYPE|PRODUCT_TYPE|SCHEME_(?:ADDRESS_SANITIZER|ADDRESS_SANITIZER_USE_AFTER_RETURN|ARGUMENTS|DISABLE_MAIN_THREAD_CHECKER|DYNAMIC_LIBRARY_LOADS|DYNAMIC_LINKER_API_USAGE|ENVIRONMENT|EXECUTABLE|GUARD_MALLOC|MAIN_THREAD_CHECKER_STOP|MALLOC_GUARD_EDGES|MALLOC_SCRIBBLE|MALLOC_STACK|THREAD_SANITIZER(?:_STOP)?|UNDEFINED_BEHAVIOUR_SANITIZER(?:_STOP)?|ZOMBIE_OBJECTS))|XCTEST)\b/,keyword:/\b(?:add_compile_definitions|add_compile_options|add_custom_command|add_custom_target|add_definitions|add_dependencies|add_executable|add_library|add_link_options|add_subdirectory|add_test|aux_source_directory|break|build_command|build_name|cmake_host_system_information|cmake_minimum_required|cmake_parse_arguments|cmake_policy|configure_file|continue|create_test_sourcelist|ctest_build|ctest_configure|ctest_coverage|ctest_empty_binary_directory|ctest_memcheck|ctest_read_custom_files|ctest_run_script|ctest_sleep|ctest_start|ctest_submit|ctest_test|ctest_update|ctest_upload|define_property|else|elseif|enable_language|enable_testing|endforeach|endfunction|endif|endmacro|endwhile|exec_program|execute_process|export|export_library_dependencies|file|find_file|find_library|find_package|find_path|find_program|fltk_wrap_ui|foreach|function|get_cmake_property|get_directory_property|get_filename_component|get_property|get_source_file_property|get_target_property|get_test_property|if|include|include_directories|include_external_msproject|include_guard|include_regular_expression|install|install_files|install_programs|install_targets|link_directories|link_libraries|list|load_cache|load_command|macro|make_directory|mark_as_advanced|math|message|option|output_required_files|project|qt_wrap_cpp|qt_wrap_ui|remove|remove_definitions|return|separate_arguments|set|set_directory_properties|set_property|set_source_files_properties|set_target_properties|set_tests_properties|site_name|source_group|string|subdir_depends|subdirs|target_compile_definitions|target_compile_features|target_compile_options|target_include_directories|target_link_directories|target_link_libraries|target_link_options|target_sources|try_compile|try_run|unset|use_mangled_mesa|utility_source|variable_requires|variable_watch|while|write_file)(?=\s*\()\b/,boolean:/\b(?:FALSE|OFF|ON|TRUE)\b/,namespace:/\b(?:INTERFACE|PRIVATE|PROPERTIES|PUBLIC|SHARED|STATIC|TARGET_OBJECTS)\b/,operator:/\b(?:AND|DEFINED|EQUAL|GREATER|LESS|MATCHES|NOT|OR|STREQUAL|STRGREATER|STRLESS|VERSION_EQUAL|VERSION_GREATER|VERSION_LESS)\b/,inserted:{pattern:/\b\w+::\w+\b/,alias:"class-name"},number:/\b\d+(?:\.\d+)*\b/,function:/\b[a-z_]\w*(?=\s*\()\b/i,punctuation:/[()>}]|\$[<{]/}}ik.displayName="cobol";ik.aliases=[];function ik(e){e.languages.cobol={comment:{pattern:/\*>.*|(^[ \t]*)\*.*/m,lookbehind:!0,greedy:!0},string:{pattern:/[xzgn]?(?:"(?:[^\r\n"]|"")*"(?!")|'(?:[^\r\n']|'')*'(?!'))/i,greedy:!0},level:{pattern:/(^[ \t]*)\d+\b/m,lookbehind:!0,greedy:!0,alias:"number"},"class-name":{pattern:/(\bpic(?:ture)?\s+)(?:(?:[-\w$/,:*+<>]|\.(?!\s|$))(?:\(\d+\))?)+/i,lookbehind:!0,inside:{number:{pattern:/(\()\d+/,lookbehind:!0},punctuation:/[()]/}},keyword:{pattern:/(^|[^\w-])(?:ABORT|ACCEPT|ACCESS|ADD|ADDRESS|ADVANCING|AFTER|ALIGNED|ALL|ALPHABET|ALPHABETIC|ALPHABETIC-LOWER|ALPHABETIC-UPPER|ALPHANUMERIC|ALPHANUMERIC-EDITED|ALSO|ALTER|ALTERNATE|ANY|ARE|AREA|AREAS|AS|ASCENDING|ASCII|ASSIGN|ASSOCIATED-DATA|ASSOCIATED-DATA-LENGTH|AT|ATTRIBUTE|AUTHOR|AUTO|AUTO-SKIP|BACKGROUND-COLOR|BACKGROUND-COLOUR|BASIS|BEEP|BEFORE|BEGINNING|BELL|BINARY|BIT|BLANK|BLINK|BLOCK|BOTTOM|BOUNDS|BY|BYFUNCTION|BYTITLE|CALL|CANCEL|CAPABLE|CCSVERSION|CD|CF|CH|CHAINING|CHANGED|CHANNEL|CHARACTER|CHARACTERS|CLASS|CLASS-ID|CLOCK-UNITS|CLOSE|CLOSE-DISPOSITION|COBOL|CODE|CODE-SET|COL|COLLATING|COLUMN|COM-REG|COMMA|COMMITMENT|COMMON|COMMUNICATION|COMP|COMP-1|COMP-2|COMP-3|COMP-4|COMP-5|COMPUTATIONAL|COMPUTATIONAL-1|COMPUTATIONAL-2|COMPUTATIONAL-3|COMPUTATIONAL-4|COMPUTATIONAL-5|COMPUTE|CONFIGURATION|CONTAINS|CONTENT|CONTINUE|CONTROL|CONTROL-POINT|CONTROLS|CONVENTION|CONVERTING|COPY|CORR|CORRESPONDING|COUNT|CRUNCH|CURRENCY|CURSOR|DATA|DATA-BASE|DATE|DATE-COMPILED|DATE-WRITTEN|DAY|DAY-OF-WEEK|DBCS|DE|DEBUG-CONTENTS|DEBUG-ITEM|DEBUG-LINE|DEBUG-NAME|DEBUG-SUB-1|DEBUG-SUB-2|DEBUG-SUB-3|DEBUGGING|DECIMAL-POINT|DECLARATIVES|DEFAULT|DEFAULT-DISPLAY|DEFINITION|DELETE|DELIMITED|DELIMITER|DEPENDING|DESCENDING|DESTINATION|DETAIL|DFHRESP|DFHVALUE|DISABLE|DISK|DISPLAY|DISPLAY-1|DIVIDE|DIVISION|DONTCARE|DOUBLE|DOWN|DUPLICATES|DYNAMIC|EBCDIC|EGCS|EGI|ELSE|EMI|EMPTY-CHECK|ENABLE|END|END-ACCEPT|END-ADD|END-CALL|END-COMPUTE|END-DELETE|END-DIVIDE|END-EVALUATE|END-IF|END-MULTIPLY|END-OF-PAGE|END-PERFORM|END-READ|END-RECEIVE|END-RETURN|END-REWRITE|END-SEARCH|END-START|END-STRING|END-SUBTRACT|END-UNSTRING|END-WRITE|ENDING|ENTER|ENTRY|ENTRY-PROCEDURE|ENVIRONMENT|EOL|EOP|EOS|ERASE|ERROR|ESCAPE|ESI|EVALUATE|EVENT|EVERY|EXCEPTION|EXCLUSIVE|EXHIBIT|EXIT|EXPORT|EXTEND|EXTENDED|EXTERNAL|FD|FILE|FILE-CONTROL|FILLER|FINAL|FIRST|FOOTING|FOR|FOREGROUND-COLOR|FOREGROUND-COLOUR|FROM|FULL|FUNCTION|FUNCTION-POINTER|FUNCTIONNAME|GENERATE|GIVING|GLOBAL|GO|GOBACK|GRID|GROUP|HEADING|HIGH-VALUE|HIGH-VALUES|HIGHLIGHT|I-O|I-O-CONTROL|ID|IDENTIFICATION|IF|IMPLICIT|IMPORT|IN|INDEX|INDEXED|INDICATE|INITIAL|INITIALIZE|INITIATE|INPUT|INPUT-OUTPUT|INSPECT|INSTALLATION|INTEGER|INTO|INVALID|INVOKE|IS|JUST|JUSTIFIED|KANJI|KEPT|KEY|KEYBOARD|LABEL|LANGUAGE|LAST|LB|LD|LEADING|LEFT|LEFTLINE|LENGTH|LENGTH-CHECK|LIBACCESS|LIBPARAMETER|LIBRARY|LIMIT|LIMITS|LINAGE|LINAGE-COUNTER|LINE|LINE-COUNTER|LINES|LINKAGE|LIST|LOCAL|LOCAL-STORAGE|LOCK|LONG-DATE|LONG-TIME|LOW-VALUE|LOW-VALUES|LOWER|LOWLIGHT|MEMORY|MERGE|MESSAGE|MMDDYYYY|MODE|MODULES|MORE-LABELS|MOVE|MULTIPLE|MULTIPLY|NAMED|NATIONAL|NATIONAL-EDITED|NATIVE|NEGATIVE|NETWORK|NEXT|NO|NO-ECHO|NULL|NULLS|NUMBER|NUMERIC|NUMERIC-DATE|NUMERIC-EDITED|NUMERIC-TIME|OBJECT-COMPUTER|OCCURS|ODT|OF|OFF|OMITTED|ON|OPEN|OPTIONAL|ORDER|ORDERLY|ORGANIZATION|OTHER|OUTPUT|OVERFLOW|OVERLINE|OWN|PACKED-DECIMAL|PADDING|PAGE|PAGE-COUNTER|PASSWORD|PERFORM|PF|PH|PIC|PICTURE|PLUS|POINTER|PORT|POSITION|POSITIVE|PRINTER|PRINTING|PRIVATE|PROCEDURE|PROCEDURE-POINTER|PROCEDURES|PROCEED|PROCESS|PROGRAM|PROGRAM-ID|PROGRAM-LIBRARY|PROMPT|PURGE|QUEUE|QUOTE|QUOTES|RANDOM|RD|READ|READER|REAL|RECEIVE|RECEIVED|RECORD|RECORDING|RECORDS|RECURSIVE|REDEFINES|REEL|REF|REFERENCE|REFERENCES|RELATIVE|RELEASE|REMAINDER|REMARKS|REMOTE|REMOVAL|REMOVE|RENAMES|REPLACE|REPLACING|REPORT|REPORTING|REPORTS|REQUIRED|RERUN|RESERVE|RESET|RETURN|RETURN-CODE|RETURNING|REVERSE-VIDEO|REVERSED|REWIND|REWRITE|RF|RH|RIGHT|ROUNDED|RUN|SAME|SAVE|SCREEN|SD|SEARCH|SECTION|SECURE|SECURITY|SEGMENT|SEGMENT-LIMIT|SELECT|SEND|SENTENCE|SEPARATE|SEQUENCE|SEQUENTIAL|SET|SHARED|SHAREDBYALL|SHAREDBYRUNUNIT|SHARING|SHIFT-IN|SHIFT-OUT|SHORT-DATE|SIGN|SIZE|SORT|SORT-CONTROL|SORT-CORE-SIZE|SORT-FILE-SIZE|SORT-MERGE|SORT-MESSAGE|SORT-MODE-SIZE|SORT-RETURN|SOURCE|SOURCE-COMPUTER|SPACE|SPACES|SPECIAL-NAMES|STANDARD|STANDARD-1|STANDARD-2|START|STATUS|STOP|STRING|SUB-QUEUE-1|SUB-QUEUE-2|SUB-QUEUE-3|SUBTRACT|SUM|SUPPRESS|SYMBOL|SYMBOLIC|SYNC|SYNCHRONIZED|TABLE|TALLY|TALLYING|TAPE|TASK|TERMINAL|TERMINATE|TEST|TEXT|THEN|THREAD|THREAD-LOCAL|THROUGH|THRU|TIME|TIMER|TIMES|TITLE|TO|TODAYS-DATE|TODAYS-NAME|TOP|TRAILING|TRUNCATED|TYPE|TYPEDEF|UNDERLINE|UNIT|UNSTRING|UNTIL|UP|UPON|USAGE|USE|USING|VALUE|VALUES|VARYING|VIRTUAL|WAIT|WHEN|WHEN-COMPILED|WITH|WORDS|WORKING-STORAGE|WRITE|YEAR|YYYYDDD|YYYYMMDD|ZERO-FILL|ZEROES|ZEROS)(?![\w-])/i,lookbehind:!0},boolean:{pattern:/(^|[^\w-])(?:false|true)(?![\w-])/i,lookbehind:!0},number:{pattern:/(^|[^\w-])(?:[+-]?(?:(?:\d+(?:[.,]\d+)?|[.,]\d+)(?:e[+-]?\d+)?|zero))(?![\w-])/i,lookbehind:!0},operator:[/<>|[<>]=?|[=+*/&]/,{pattern:/(^|[^\w-])(?:-|and|equal|greater|less|not|or|than)(?![\w-])/i,lookbehind:!0}],punctuation:/[.:,()]/}}sk.displayName="coffeescript";sk.aliases=["coffee"];function sk(e){e.register(Cs),function(t){var r=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};t.languages.coffeescript=t.languages.extend("javascript",{comment:r,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),t.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:r,interpolation:n}}}),t.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:t.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),t.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete t.languages.coffeescript["template-string"],t.languages.coffee=t.languages.coffeescript}(e)}ak.displayName="cpp";ak.aliases=[];function ak(e){e.register(cp),function(t){var r=/\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 r.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 r.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:r,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"])}(e)}lk.displayName="csharp";lk.aliases=["cs","dotnet"];function lk(e){e.register(_r),function(t){function r(L,K){return L.replace(/<<(\d+)>>/g,function(q,Re){return"(?:"+K[+Re]+")"})}function n(L,K,q){return RegExp(r(L,K),q||"")}function o(L,K){for(var q=0;q>/g,function(){return"(?:"+L+")"});return L.replace(/<>/g,"[^\\s\\S]")}var i={type:"bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",typeDeclaration:"class enum interface record struct",contextual:"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*{)",other:"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 s(L){return"\\b(?:"+L.trim().replace(/ /g,"|")+")\\b"}var a=s(i.typeDeclaration),l=RegExp(s(i.type+" "+i.typeDeclaration+" "+i.contextual+" "+i.other)),c=s(i.typeDeclaration+" "+i.contextual+" "+i.other),u=s(i.type+" "+i.typeDeclaration+" "+i.other),d=o(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),p=o(/\((?:[^()]|<>)*\)/.source,2),f=/@?\b[A-Za-z_]\w*\b/.source,h=r(/<<0>>(?:\s*<<1>>)?/.source,[f,d]),m=r(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[c,h]),b=/\[\s*(?:,\s*)*\]/.source,y=r(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[m,b]),g=r(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[d,p,b]),v=r(/\(<<0>>+(?:,<<0>>+)+\)/.source,[g]),E=r(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[v,m,b]),k={keyword:l,punctuation:/[<>()?,.:[\]]/},x=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,w=/"(?:\\.|[^\\"\r\n])*"/.source,C=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;t.languages.csharp=t.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[C]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[w]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[m]),lookbehind:!0,inside:k},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[f,E]),lookbehind:!0,inside:k},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[f]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[a,h]),lookbehind:!0,inside:k},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[m]),lookbehind:!0,inside:k},{pattern:n(/(\bwhere\s+)<<0>>/.source,[f]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[y]),lookbehind:!0,inside:k},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[E,u,f]),inside:k}],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,[f]),lookbehind:!0,alias:"punctuation"}}),t.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[f]),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:k},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[E,m]),inside:k,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[E]),lookbehind:!0,inside:k,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[f,d]),inside:{function:n(/^<<0>>/.source,[f]),generic:{pattern:RegExp(d),alias:"class-name",inside:k}}},"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,[a,h,f,E,l.source,p,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[h,p]),lookbehind:!0,greedy:!0,inside:t.languages.csharp},keyword:l,"class-name":{pattern:RegExp(E),greedy:!0,inside:k},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 T=w+"|"+x,O=r(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[T]),_=o(r(/[^"'/()]|<<0>>|\(<>*\)/.source,[O]),2),P=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,$=r(/<<0>>(?:\s*\(<<1>>*\))?/.source,[m,_]);t.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[P,$]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[P]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[_]),inside:t.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var B=/:[^}\r\n]+/.source,F=o(r(/[^"'/()]|<<0>>|\(<>*\)/.source,[O]),2),z=r(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[F,B]),G=o(r(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[T]),2),R=r(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[G,B]);function M(L,K){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[L]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[K,B]),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,[z]),lookbehind:!0,greedy:!0,inside:M(z,F)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[R]),lookbehind:!0,greedy:!0,inside:M(R,G)}],char:{pattern:RegExp(x),greedy:!0}}),t.languages.dotnet=t.languages.cs=t.languages.csharp}(e)}up.displayName="css";up.aliases=[];function up(e){(function(t){var r=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+r.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+r.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+r.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+r.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:r,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"))})(e)}ck.displayName="csv";ck.aliases=[];function ck(e){e.languages.csv={value:/[^\r\n,"]+|"(?:[^"]|"")*"(?!")/,punctuation:/,/}}uk.displayName="d";uk.aliases=[];function uk(e){e.register(_r),e.languages.d=e.languages.extend("clike",{comment:[{pattern:/^\s*#!.+/,greedy:!0},{pattern:RegExp(/(^|[^\\])/.source+"(?:"+[/\/\+(?:\/\+(?:[^+]|\+(?!\/))*\+\/|(?!\/\+)[\s\S])*?\+\//.source,/\/\/.*/.source,/\/\*[\s\S]*?\*\//.source].join("|")+")"),lookbehind:!0,greedy:!0}],string:[{pattern:RegExp([/\b[rx]"(?:\\[\s\S]|[^\\"])*"[cwd]?/.source,/\bq"(?:\[[\s\S]*?\]|\([\s\S]*?\)|<[\s\S]*?>|\{[\s\S]*?\})"/.source,/\bq"((?!\d)\w+)$[\s\S]*?^\1"/.source,/\bq"(.)[\s\S]*?\2"/.source,/(["`])(?:\\[\s\S]|(?!\3)[^\\])*\3[cwd]?/.source].join("|"),"m"),greedy:!0},{pattern:/\bq\{(?:\{[^{}]*\}|[^{}])*\}/,greedy:!0,alias:"token-string"}],keyword:/\$|\b(?:__(?:(?:DATE|EOF|FILE|FUNCTION|LINE|MODULE|PRETTY_FUNCTION|TIMESTAMP|TIME|VENDOR|VERSION)__|gshared|parameters|traits|vector)|abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|dstring|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|inout|int|interface|invariant|ireal|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|ptrdiff_t|public|pure|real|ref|return|scope|shared|short|size_t|static|string|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|wstring)\b/,number:[/\b0x\.?[a-f\d_]+(?:(?!\.\.)\.[a-f\d_]*)?(?:p[+-]?[a-f\d_]+)?[ulfi]{0,4}/i,{pattern:/((?:\.\.)?)(?:\b0b\.?|\b|\.)\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:e[+-]?\d[\d_]*)?[ulfi]{0,4}/i,lookbehind:!0}],operator:/\|[|=]?|&[&=]?|\+[+=]?|-[-=]?|\.?\.\.|=[>=]?|!(?:i[ns]\b|<>?=?|>=?|=)?|\bi[ns]\b|(?:<[<>]?|>>?>?|\^\^|[*\/%^~])=?/}),e.languages.insertBefore("d","string",{char:/'(?:\\(?:\W|\w+)|[^\\])'/}),e.languages.insertBefore("d","keyword",{property:/\B@\w*/}),e.languages.insertBefore("d","function",{register:{pattern:/\b(?:[ABCD][LHX]|E?(?:BP|DI|SI|SP)|[BS]PL|[ECSDGF]S|CR[0234]|[DS]IL|DR[012367]|E[ABCD]X|X?MM[0-7]|R(?:1[0-5]|[89])[BWD]?|R[ABCD]X|R[BS]P|R[DS]I|TR[3-7]|XMM(?:1[0-5]|[89])|YMM(?:1[0-5]|\d))\b|\bST(?:\([0-7]\)|\b)/,alias:"variable"}})}dk.displayName="dart";dk.aliases=[];function dk(e){e.register(_r),function(t){var r=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],n=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,o={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:/\./}}}};t.languages.dart=t.languages.extend("clike",{"class-name":[o,{pattern:RegExp(n+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:o.inside}],keyword:r,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),t.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:t.languages.dart}}},string:/[\s\S]+/}},string:void 0}),t.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),t.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":o,keyword:r,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(e)}Ec.displayName="markup";Ec.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function Ec(e){e.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"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(t){t.type==="entity"&&(t.attributes.title=t.content.value.replace(/&/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(r,n){var o={};o["language-"+n]={pattern:/(^$)/i,lookbehind:!0,inside:e.languages[n]},o.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:o}};i["language-"+n]={pattern:/[\s\S]+/,inside:e.languages[n]};var s={};s[r]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return r}),"i"),lookbehind:!0,greedy:!0,inside:i},e.languages.insertBefore("markup","cdata",s)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(t,r){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[r,"language-"+r],inside:e.languages[r]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}La.displayName="markup-templating";La.aliases=[];function La(e){e.register(Ec),function(t){function r(n,o){return"___"+n.toUpperCase()+o+"___"}Object.defineProperties(t.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,o,i,s){if(n.language===o){var a=n.tokenStack=[];n.code=n.code.replace(i,function(l){if(typeof s=="function"&&!s(l))return l;for(var c=a.length,u;n.code.indexOf(u=r(o,c))!==-1;)++c;return a[c]=l,u}),n.grammar=t.languages.markup}}},tokenizePlaceholders:{value:function(n,o){if(n.language!==o||!n.tokenStack)return;n.grammar=t.languages[o];var i=0,s=Object.keys(n.tokenStack);function a(l){for(var c=0;c=s.length);c++){var u=l[c];if(typeof u=="string"||u.content&&typeof u.content=="string"){var d=s[i],p=n.tokenStack[d],f=typeof u=="string"?u:u.content,h=r(o,d),m=f.indexOf(h);if(m>-1){++i;var b=f.substring(0,m),y=new t.Token(o,t.tokenize(p,n.grammar),"language-"+o,p),g=f.substring(m+h.length),v=[];b&&v.push.apply(v,a([b])),v.push(y),g&&v.push.apply(v,a([g])),typeof u=="string"?l.splice.apply(l,[c,1].concat(v)):u.content=v}}else u.content&&a(u.content)}return l}a(n.tokens)}}})}(e)}pk.displayName="django";pk.aliases=["jinja2"];function pk(e){e.register(La),function(t){t.languages.django={comment:/^\{#[\s\S]*?#\}$/,tag:{pattern:/(^\{%[+-]?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%][+-]?|[+-]?[}%]\}$/,alias:"punctuation"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},filter:{pattern:/(\|)\w+/,lookbehind:!0,alias:"function"},test:{pattern:/(\bis\s+(?:not\s+)?)(?!not\b)\w+/,lookbehind:!0,alias:"function"},function:/\b[a-z_]\w+(?=\s*\()/i,keyword:/\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,number:/\b\d+(?:\.\d+)?\b/,boolean:/[Ff]alse|[Nn]one|[Tt]rue/,variable:/\b\w+\b/,punctuation:/[{}[\](),.:;]/};var r=/\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\}/g,n=t.languages["markup-templating"];t.hooks.add("before-tokenize",function(o){n.buildPlaceholders(o,"django",r)}),t.hooks.add("after-tokenize",function(o){n.tokenizePlaceholders(o,"django")}),t.languages.jinja2=t.languages.django,t.hooks.add("before-tokenize",function(o){n.buildPlaceholders(o,"jinja2",r)}),t.hooks.add("after-tokenize",function(o){n.tokenizePlaceholders(o,"jinja2")})}(e)}fk.displayName="docker";fk.aliases=["dockerfile"];function fk(e){(function(t){var r=/\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source,n=/(?:[ \t]+(?![ \t])(?:)?|)/.source.replace(//g,function(){return r}),o=/"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"|'(?:[^'\\\r\n]|\\(?:\r\n|[\s\S]))*'/.source,i=/--[\w-]+=(?:|(?!["'])(?:[^\s\\]|\\.)+)/.source.replace(//g,function(){return o}),s={pattern:RegExp(o),greedy:!0},a={pattern:/(^[ \t]*)#.*/m,lookbehind:!0,greedy:!0};function l(c,u){return c=c.replace(//g,function(){return i}).replace(//g,function(){return n}),RegExp(c,u)}t.languages.docker={instruction:{pattern:/(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,lookbehind:!0,greedy:!0,inside:{options:{pattern:l(/(^(?:ONBUILD)?\w+)(?:)*/.source,"i"),lookbehind:!0,greedy:!0,inside:{property:{pattern:/(^|\s)--[\w-]+/,lookbehind:!0},string:[s,{pattern:/(=)(?!["'])(?:[^\s\\]|\\.)+/,lookbehind:!0}],operator:/\\$/m,punctuation:/=/}},keyword:[{pattern:l(/(^(?:ONBUILD)?HEALTHCHECK(?:)*)(?:CMD|NONE)\b/.source,"i"),lookbehind:!0,greedy:!0},{pattern:l(/(^(?:ONBUILD)?FROM(?:)*(?!--)[^ \t\\]+)AS/.source,"i"),lookbehind:!0,greedy:!0},{pattern:l(/(^ONBUILD)\w+/.source,"i"),lookbehind:!0,greedy:!0},{pattern:/^\w+/,greedy:!0}],comment:a,string:s,variable:/\$(?:\w+|\{[^{}"'\\]*\})/,operator:/\\$/m}},comment:a},t.languages.dockerfile=t.languages.docker})(e)}hk.displayName="eiffel";hk.aliases=[];function hk(e){e.languages.eiffel={comment:/--.*/,string:[{pattern:/"([^[]*)\[[\s\S]*?\]\1"/,greedy:!0},{pattern:/"([^{]*)\{[\s\S]*?\}\1"/,greedy:!0},{pattern:/"(?:%(?:(?!\n)\s)*\n\s*%|%\S|[^%"\r\n])*"/,greedy:!0}],char:/'(?:%.|[^%'\r\n])+'/,keyword:/\b(?:across|agent|alias|all|and|as|assign|attached|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,boolean:/\b(?:False|True)\b/i,"class-name":/\b[A-Z][\dA-Z_]*\b/,number:[/\b0[xcb][\da-f](?:_*[\da-f])*\b/i,/(?:\b\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*\b|\b\d(?:_*\d)*\b\.?/i],punctuation:/:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,operator:/\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/}}mk.displayName="ejs";mk.aliases=["eta"];function mk(e){e.register(Cs),e.register(La),function(t){t.languages.ejs={delimiter:{pattern:/^<%[-_=]?|[-_]?%>$/,alias:"punctuation"},comment:/^#[\s\S]*/,"language-javascript":{pattern:/[\s\S]+/,inside:t.languages.javascript}},t.hooks.add("before-tokenize",function(r){var n=/<%(?!%)[\s\S]+?%>/g;t.languages["markup-templating"].buildPlaceholders(r,"ejs",n)}),t.hooks.add("after-tokenize",function(r){t.languages["markup-templating"].tokenizePlaceholders(r,"ejs")}),t.languages.eta=t.languages.ejs}(e)}gk.displayName="elixir";gk.aliases=[];function gk(e){e.languages.elixir={doc:{pattern:/@(?:doc|moduledoc)\s+(?:("""|''')[\s\S]*?\1|("|')(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2)/,inside:{attribute:/^@\w+/,string:/['"][\s\S]+/}},comment:{pattern:/#.*/,greedy:!0},regex:{pattern:/~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,greedy:!0},string:[{pattern:/~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|#(?!\{)|[^#\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,greedy:!0,inside:{}},{pattern:/("""|''')[\s\S]*?\1/,greedy:!0,inside:{}},{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{}}],atom:{pattern:/(^|[^:]):\w+/,lookbehind:!0,alias:"symbol"},module:{pattern:/\b[A-Z]\w*\b/,alias:"class-name"},"attr-name":/\b\w+\??:(?!:)/,argument:{pattern:/(^|[^&])&\d+/,lookbehind:!0,alias:"variable"},attribute:{pattern:/@\w+/,alias:"variable"},function:/\b[_a-zA-Z]\w*[?!]?(?:(?=\s*(?:\.\s*)?\()|(?=\/\d))/,number:/\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,keyword:/\b(?:after|alias|and|case|catch|cond|def(?:callback|delegate|exception|impl|macro|module|n|np|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|quote|raise|require|rescue|try|unless|unquote|use|when)\b/,boolean:/\b(?:false|nil|true)\b/,operator:[/\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,{pattern:/([^<])<(?!<)/,lookbehind:!0},{pattern:/([^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,%\[\]{}()]/},e.languages.elixir.string.forEach(function(t){t.inside={interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:e.languages.elixir}}}})}yk.displayName="elm";yk.aliases=[];function yk(e){e.languages.elm={comment:/--.*|\{-[\s\S]*?-\}/,char:{pattern:/'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+|u\{[0-9a-fA-F]+\}))'/,greedy:!0},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:[^\\"\r\n]|\\.)*"/,greedy:!0}],"import-statement":{pattern:/(^[\t ]*)import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m,lookbehind:!0,inside:{keyword:/\b(?:as|exposing|import)\b/}},keyword:/\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/,builtin:/\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i,operator:/\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/,hvariable:/\b(?:[A-Z]\w*\.)*[a-z]\w*\b/,constant:/\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/,punctuation:/[{}[\]|(),.:]/}}vk.displayName="erlang";vk.aliases=[];function vk(e){e.languages.erlang={comment:/%.+/,string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},"quoted-function":{pattern:/'(?:\\.|[^\\'\r\n])+'(?=\()/,alias:"function"},"quoted-atom":{pattern:/'(?:\\.|[^\\'\r\n])+'/,alias:"atom"},boolean:/\b(?:false|true)\b/,keyword:/\b(?:after|begin|case|catch|end|fun|if|of|receive|try|when)\b/,number:[/\$\\?./,/\b\d+#[a-z0-9]+/i,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i],function:/\b[a-z][\w@]*(?=\()/,variable:{pattern:/(^|[^@])(?:\b|\?)[A-Z_][\w@]*/,lookbehind:!0},operator:[/[=\/<>:]=|=[:\/]=|\+\+?|--?|[=*\/!]|\b(?:and|andalso|band|bnot|bor|bsl|bsr|bxor|div|not|or|orelse|rem|xor)\b/,{pattern:/(^|[^<])<(?!<)/,lookbehind:!0},{pattern:/(^|[^>])>(?!>)/,lookbehind:!0}],atom:/\b[a-z][\w@]*/,punctuation:/[()[\]{}:;,.#|]|<<|>>/}}bk.displayName="fortran";bk.aliases=[];function bk(e){e.languages.fortran={"quoted-number":{pattern:/[BOZ](['"])[A-F0-9]+\1/i,alias:"number"},string:{pattern:/(?:\b\w+_)?(['"])(?:\1\1|&(?:\r\n?|\n)(?:[ \t]*!.*(?:\r\n?|\n)|(?![ \t]*!))|(?!\1).)*(?:\1|&)/,inside:{comment:{pattern:/(&(?:\r\n?|\n)\s*)!.*/,lookbehind:!0}}},comment:{pattern:/!.*/,greedy:!0},boolean:/\.(?:FALSE|TRUE)\.(?:_\w+)?/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[ED][+-]?\d+)?(?:_\w+)?/i,keyword:[/\b(?:CHARACTER|COMPLEX|DOUBLE ?PRECISION|INTEGER|LOGICAL|REAL)\b/i,/\b(?:END ?)?(?:BLOCK ?DATA|DO|FILE|FORALL|FUNCTION|IF|INTERFACE|MODULE(?! PROCEDURE)|PROGRAM|SELECT|SUBROUTINE|TYPE|WHERE)\b/i,/\b(?:ALLOCATABLE|ALLOCATE|BACKSPACE|CALL|CASE|CLOSE|COMMON|CONTAINS|CONTINUE|CYCLE|DATA|DEALLOCATE|DIMENSION|DO|END|EQUIVALENCE|EXIT|EXTERNAL|FORMAT|GO ?TO|IMPLICIT(?: NONE)?|INQUIRE|INTENT|INTRINSIC|MODULE PROCEDURE|NAMELIST|NULLIFY|OPEN|OPTIONAL|PARAMETER|POINTER|PRINT|PRIVATE|PUBLIC|READ|RETURN|REWIND|SAVE|SELECT|STOP|TARGET|WHILE|WRITE)\b/i,/\b(?:ASSIGNMENT|DEFAULT|ELEMENTAL|ELSE|ELSEIF|ELSEWHERE|ENTRY|IN|INCLUDE|INOUT|KIND|NULL|ONLY|OPERATOR|OUT|PURE|RECURSIVE|RESULT|SEQUENCE|STAT|THEN|USE)\b/i],operator:[/\*\*|\/\/|=>|[=\/]=|[<>]=?|::|[+\-*=%]|\.[A-Z]+\./i,{pattern:/(^|(?!\().)\/(?!\))/,lookbehind:!0}],punctuation:/\(\/|\/\)|[(),;:&]/}}Ek.displayName="fsharp";Ek.aliases=[];function Ek(e){e.register(_r),e.languages.fsharp=e.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\(\*(?!\))[\s\S]*?\*\)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?/,greedy:!0},"class-name":{pattern:/(\b(?:exception|inherit|interface|new|of|type)\s+|\w\s*:\s*|\s:\??>\s*)[.\w]+\b(?:\s*(?:->|\*)\s*[.\w]+\b)*(?!\s*[:.])/,lookbehind:!0,inside:{operator:/->|\*/,punctuation:/\./}},keyword:/\b(?:let|return|use|yield)(?:!\B|\b)|\b(?:abstract|and|as|asr|assert|atomic|base|begin|break|checked|class|component|const|constraint|constructor|continue|default|delegate|do|done|downcast|downto|eager|elif|else|end|event|exception|extern|external|false|finally|fixed|for|fun|function|functor|global|if|in|include|inherit|inline|interface|internal|land|lazy|lor|lsl|lsr|lxor|match|member|method|mixin|mod|module|mutable|namespace|new|not|null|object|of|open|or|override|parallel|private|process|protected|public|pure|rec|sealed|select|sig|static|struct|tailcall|then|to|trait|true|try|type|upcast|val|virtual|void|volatile|when|while|with)\b/,number:[/\b0x[\da-fA-F]+(?:LF|lf|un)?\b/,/\b0b[01]+(?:uy|y)?\b/,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i,/\b\d+(?:[IlLsy]|UL|u[lsy]?)?\b/],operator:/([<>~&^])\1\1|([*.:<>&])\2|<-|->|[!=:]=|?|\??(?:<=|>=|<>|[-+*/%=<>])\??|[!?^&]|~[+~-]|:>|:\?>?/}),e.languages.insertBefore("fsharp","keyword",{preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(^#)\b(?:else|endif|if|light|line|nowarn)\b/,lookbehind:!0,alias:"keyword"}}}}),e.languages.insertBefore("fsharp","punctuation",{"computation-expression":{pattern:/\b[_a-z]\w*(?=\s*\{)/i,alias:"keyword"}}),e.languages.insertBefore("fsharp","string",{annotation:{pattern:/\[<.+?>\]/,greedy:!0,inside:{punctuation:/^\[<|>\]$/,"class-name":{pattern:/^\w+$|(^|;\s*)[A-Z]\w*(?=\()/,lookbehind:!0},"annotation-content":{pattern:/[\s\S]+/,inside:e.languages.fsharp}}},char:{pattern:/'(?:[^\\']|\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8}))'B?/,greedy:!0}})}kk.displayName="git";kk.aliases=[];function kk(e){e.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m}}xk.displayName="go";xk.aliases=[];function xk(e){e.register(_r),e.languages.go=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),e.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete e.languages.go["class-name"]}Sk.displayName="gradle";Sk.aliases=[];function Sk(e){e.register(_r),function(t){var r={pattern:/((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}};t.languages.gradle=t.languages.extend("clike",{string:{pattern:/'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,greedy:!0},keyword:/\b(?:apply|def|dependencies|else|if|implementation|import|plugin|plugins|project|repositories|repository|sourceSets|tasks|val)\b/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),t.languages.insertBefore("gradle","string",{shebang:{pattern:/#!.+/,alias:"comment",greedy:!0},"interpolation-string":{pattern:/"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0,inside:{interpolation:r,string:/[\s\S]+/}}}),t.languages.insertBefore("gradle","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),t.languages.insertBefore("gradle","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),r.inside.expression.inside=t.languages.gradle}(e)}wk.displayName="graphql";wk.aliases=[];function wk(e){e.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:e.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},e.hooks.add("after-tokenize",function(r){if(r.language!=="graphql")return;var n=r.tokens.filter(function(b){return typeof b!="string"&&b.type!=="comment"&&b.type!=="scalar"}),o=0;function i(b){return n[o+b]}function s(b,y){y=y||0;for(var g=0;g0)){var f=a(/^\{$/,/^\}$/);if(f===-1)continue;for(var h=o;h=0&&l(m,"variable-input")}}}}})}Tk.displayName="groovy";Tk.aliases=[];function Tk(e){e.register(_r),function(t){var r={pattern:/((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}};t.languages.groovy=t.languages.extend("clike",{string:{pattern:/'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,greedy:!0},keyword:/\b(?:abstract|as|assert|boolean|break|byte|case|catch|char|class|const|continue|def|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|in|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),t.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment",greedy:!0},"interpolation-string":{pattern:/"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0,inside:{interpolation:r,string:/[\s\S]+/}}}),t.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),t.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),r.inside.expression.inside=t.languages.groovy}(e)}Ck.displayName="handlebars";Ck.aliases=["hbs","mustache"];function Ck(e){e.register(La),function(t){t.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},t.hooks.add("before-tokenize",function(r){var n=/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g;t.languages["markup-templating"].buildPlaceholders(r,"handlebars",n)}),t.hooks.add("after-tokenize",function(r){t.languages["markup-templating"].tokenizePlaceholders(r,"handlebars")}),t.languages.hbs=t.languages.handlebars,t.languages.mustache=t.languages.handlebars}(e)}Ok.displayName="ignore";Ok.aliases=["gitignore","hgignore","npmignore"];function Ok(e){(function(t){t.languages.ignore={comment:/^#.*/m,entry:{pattern:/\S(?:.*(?:(?:\\ )|\S))?/,alias:"string",inside:{operator:/^!|\*\*?|\?/,regex:{pattern:/(^|[^\\])\[[^\[\]]*\]/,lookbehind:!0},punctuation:/\//}}},t.languages.gitignore=t.languages.ignore,t.languages.hgignore=t.languages.ignore,t.languages.npmignore=t.languages.ignore})(e)}gg.displayName="java";gg.aliases=[];function gg(e){e.register(_r),function(t){var r=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,o={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};t.languages.java=t.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[o,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:o.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:o.inside}],keyword:r,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},constant:/\b[A-Z][A-Z_\d]+\b/}),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":o,keyword:r,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:o.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:o.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,function(){return r.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(e)}Ak.displayName="json";Ak.aliases=["webmanifest"];function Ak(e){e.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},e.languages.webmanifest=e.languages.json}Nk.displayName="jsx";Nk.aliases=[];function Nk(e){e.register(Cs),e.register(Ec),function(t){var r=t.util.clone(t.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,o=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,i=/(?:\{*\.{3}(?:[^{}]|)*\})/.source;function s(c,u){return c=c.replace(//g,function(){return n}).replace(//g,function(){return o}).replace(//g,function(){return i}),RegExp(c,u)}i=s(i).source,t.languages.jsx=t.languages.extend("markup",r),t.languages.jsx.tag.pattern=s(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),t.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,t.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,t.languages.jsx.tag.inside.comment=r.comment,t.languages.insertBefore("inside","attr-name",{spread:{pattern:s(//.source),inside:t.languages.jsx}},t.languages.jsx.tag),t.languages.insertBefore("inside","special-attr",{script:{pattern:s(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:t.languages.jsx}}},t.languages.jsx.tag);var a=function(c){return c?typeof c=="string"?c:typeof c.content=="string"?c.content:c.content.map(a).join(""):""},l=function(c){for(var u=[],d=0;d0&&u[u.length-1].tagName===a(p.content[0].content[1])&&u.pop():p.content[p.content.length-1].content==="/>"||u.push({tagName:a(p.content[0].content[1]),openedBraces:0}):u.length>0&&p.type==="punctuation"&&p.content==="{"?u[u.length-1].openedBraces++:u.length>0&&u[u.length-1].openedBraces>0&&p.type==="punctuation"&&p.content==="}"?u[u.length-1].openedBraces--:f=!0),(f||typeof p=="string")&&u.length>0&&u[u.length-1].openedBraces===0){var h=a(p);d0&&(typeof c[d-1]=="string"||c[d-1].type==="plain-text")&&(h=a(c[d-1])+h,c.splice(d-1,1),d--),c[d]=new t.Token("plain-text",h,null,h)}p.content&&typeof p.content!="string"&&l(p.content)}};t.hooks.add("after-tokenize",function(c){c.language!=="jsx"&&c.language!=="tsx"||l(c.tokens)})}(e)}Rk.displayName="kotlin";Rk.aliases=["kt","kts"];function Rk(e){e.register(_r),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 r={"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:r},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:r},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}(e)}_k.displayName="latex";_k.aliases=["context","tex"];function _k(e){(function(t){var r=/\\(?:[^a-z()[\]]|[a-z*]+)/i,n={"equation-command":{pattern:r,alias:"regex"}};t.languages.latex={comment:/%.*/,cdata:{pattern:/(\\begin\{((?:lstlisting|verbatim)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0},equation:[{pattern:/\$\$(?:\\[\s\S]|[^\\$])+\$\$|\$(?:\\[\s\S]|[^\\$])+\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/,inside:n,alias:"string"},{pattern:/(\\begin\{((?:align|eqnarray|equation|gather|math|multline)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0,inside:n,alias:"string"}],keyword:{pattern:/(\\(?:begin|cite|documentclass|end|label|ref|usepackage)(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0},url:{pattern:/(\\url\{)[^}]+(?=\})/,lookbehind:!0},headline:{pattern:/(\\(?:chapter|frametitle|paragraph|part|section|subparagraph|subsection|subsubparagraph|subsubsection|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0,alias:"class-name"},function:{pattern:r,alias:"selector"},punctuation:/[[\]{}&]/},t.languages.tex=t.languages.latex,t.languages.context=t.languages.latex})(e)}Ik.displayName="liquid";Ik.aliases=[];function Ik(e){e.register(La),e.languages.liquid={comment:{pattern:/(^\{%\s*comment\s*%\})[\s\S]+(?=\{%\s*endcomment\s*%\}$)/,lookbehind:!0},delimiter:{pattern:/^\{(?:\{\{|[%\{])-?|-?(?:\}\}|[%\}])\}$/,alias:"punctuation"},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},keyword:/\b(?:as|assign|break|(?:end)?(?:capture|case|comment|for|form|if|paginate|raw|style|tablerow|unless)|continue|cycle|decrement|echo|else|elsif|in|include|increment|limit|liquid|offset|range|render|reversed|section|when|with)\b/,object:/\b(?:address|all_country_option_tags|article|block|blog|cart|checkout|collection|color|country|country_option_tags|currency|current_page|current_tags|customer|customer_address|date|discount_allocation|discount_application|external_video|filter|filter_value|font|forloop|fulfillment|generic_file|gift_card|group|handle|image|line_item|link|linklist|localization|location|measurement|media|metafield|model|model_source|order|page|page_description|page_image|page_title|part|policy|product|product_option|recommendations|request|robots|routes|rule|script|search|selling_plan|selling_plan_allocation|selling_plan_group|shipping_method|shop|shop_locale|sitemap|store_availability|tax_line|template|theme|transaction|unit_price_measurement|user_agent|variant|video|video_source)\b/,function:[{pattern:/(\|\s*)\w+/,lookbehind:!0,alias:"filter"},{pattern:/(\.\s*)(?:first|last|size)/,lookbehind:!0}],boolean:/\b(?:false|nil|true)\b/,range:{pattern:/\.\./,alias:"operator"},number:/\b\d+(?:\.\d+)?\b/,operator:/[!=]=|<>|[<>]=?|[|?:=-]|\b(?:and|contains(?=\s)|or)\b/,punctuation:/[.,\[\]()]/,empty:{pattern:/\bempty\b/,alias:"keyword"}},e.hooks.add("before-tokenize",function(t){var r=/\{%\s*comment\s*%\}[\s\S]*?\{%\s*endcomment\s*%\}|\{(?:%[\s\S]*?%|\{\{[\s\S]*?\}\}|\{[\s\S]*?\})\}/g,n=!1;e.languages["markup-templating"].buildPlaceholders(t,"liquid",r,function(o){var i=/^\{%-?\s*(\w+)/.exec(o);if(i){var s=i[1];if(s==="raw"&&!n)return n=!0,!0;if(s==="endraw")return n=!1,!0}return!n})}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"liquid")})}Mk.displayName="lisp";Mk.aliases=["elisp","emacs","emacs-lisp"];function Mk(e){(function(t){function r(h){return RegExp(/(\()/.source+"(?:"+h+")"+/(?=[\s\)])/.source)}function n(h){return RegExp(/([\s([])/.source+"(?:"+h+")"+/(?=[\s)])/.source)}var o=/(?!\d)[-+*/~!@$%^=<>{}\w]+/.source,i="&"+o,s="(\\()",a="(?=\\))",l="(?=\\s)",c=/(?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\))*\))*\))*/.source,u={heading:{pattern:/;;;.*/,alias:["comment","title"]},comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0,inside:{argument:/[-A-Z]+(?=[.,\s])/,symbol:RegExp("`"+o+"'")}},"quoted-symbol":{pattern:RegExp("#?'"+o),alias:["variable","symbol"]},"lisp-property":{pattern:RegExp(":"+o),alias:"property"},splice:{pattern:RegExp(",@?"+o),alias:["symbol","variable"]},keyword:[{pattern:RegExp(s+"(?:and|(?:cl-)?letf|cl-loop|cond|cons|error|if|(?:lexical-)?let\\*?|message|not|null|or|provide|require|setq|unless|use-package|when|while)"+l),lookbehind:!0},{pattern:RegExp(s+"(?:append|by|collect|concat|do|finally|for|in|return)"+l),lookbehind:!0}],declare:{pattern:r(/declare/.source),lookbehind:!0,alias:"keyword"},interactive:{pattern:r(/interactive/.source),lookbehind:!0,alias:"keyword"},boolean:{pattern:n(/nil|t/.source),lookbehind:!0},number:{pattern:n(/[-+]?\d+(?:\.\d*)?/.source),lookbehind:!0},defvar:{pattern:RegExp(s+"def(?:const|custom|group|var)\\s+"+o),lookbehind:!0,inside:{keyword:/^def[a-z]+/,variable:RegExp(o)}},defun:{pattern:RegExp(s+/(?:cl-)?(?:defmacro|defun\*?)\s+/.source+o+/\s+\(/.source+c+/\)/.source),lookbehind:!0,greedy:!0,inside:{keyword:/^(?:cl-)?def\S+/,arguments:null,function:{pattern:RegExp("(^\\s)"+o),lookbehind:!0},punctuation:/[()]/}},lambda:{pattern:RegExp(s+"lambda\\s+\\(\\s*(?:&?"+o+"(?:\\s+&?"+o+")*\\s*)?\\)"),lookbehind:!0,greedy:!0,inside:{keyword:/^lambda/,arguments:null,punctuation:/[()]/}},car:{pattern:RegExp(s+o),lookbehind:!0},punctuation:[/(?:['`,]?\(|[)\[\]])/,{pattern:/(\s)\.(?=\s)/,lookbehind:!0}]},d={"lisp-marker":RegExp(i),varform:{pattern:RegExp(/\(/.source+o+/\s+(?=\S)/.source+c+/\)/.source),inside:u},argument:{pattern:RegExp(/(^|[\s(])/.source+o),lookbehind:!0,alias:"variable"},rest:u},p="\\S+(?:\\s+\\S+)*",f={pattern:RegExp(s+c+a),lookbehind:!0,inside:{"rest-vars":{pattern:RegExp("&(?:body|rest)\\s+"+p),inside:d},"other-marker-vars":{pattern:RegExp("&(?:aux|optional)\\s+"+p),inside:d},keys:{pattern:RegExp("&key\\s+"+p+"(?:\\s+&allow-other-keys)?"),inside:d},argument:{pattern:RegExp(o),alias:"variable"},punctuation:/[()]/}};u.lambda.inside.arguments=f,u.defun.inside.arguments=t.util.clone(f),u.defun.inside.arguments.inside.sublist=f,t.languages.lisp=u,t.languages.elisp=u,t.languages.emacs=u,t.languages["emacs-lisp"]=u})(e)}Lk.displayName="lua";Lk.aliases=[];function Lk(e){e.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}}Dk.displayName="makefile";Dk.aliases=[];function Dk(e){e.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}}Pk.displayName="markdown";Pk.aliases=["md"];function Pk(e){e.register(Ec),function(t){var r=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(a){return a=a.replace(//g,function(){return r}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+a+")")}var o=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return o}),s=/\|?[ \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+s+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+s+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(o),inside:t.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+s+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(o),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(a){["url","bold","italic","strike","code-snippet"].forEach(function(l){a!==l&&(t.languages.markdown[a].inside.content.inside[l]=t.languages.markdown[l])})}),t.hooks.add("after-tokenize",function(a){if(a.language!=="markdown"&&a.language!=="md")return;function l(c){if(!(!c||typeof c=="string"))for(var u=0,d=c.length;u]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}$k.displayName="perl";$k.aliases=[];function $k(e){(function(t){var r=/(?:\((?:[^()\\]|\\[\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,r].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,r].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,r+/\s*/.source+r].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:/[{}[\];(),:]/}})(e)}Bk.displayName="php";Bk.aliases=[];function Bk(e){e.register(La),function(t){var r=/\/\*[\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*\()/],o=/\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}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;t.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:r,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:o,operator:i,punctuation:s};var a={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:t.languages.php},l=[{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:l,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:r,string:l,"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:o,operator:i,punctuation:s}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),t.hooks.add("before-tokenize",function(c){if(/<\?/.test(c.code)){var u=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;t.languages["markup-templating"].buildPlaceholders(c,"php",u)}}),t.hooks.add("after-tokenize",function(c){t.languages["markup-templating"].tokenizePlaceholders(c,"php")})}(e)}Hk.displayName="sql";Hk.aliases=[];function Hk(e){e.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}}Fk.displayName="plsql";Fk.aliases=[];function Fk(e){e.register(Hk),e.languages.plsql=e.languages.extend("sql",{comment:{pattern:/\/\*[\s\S]*?\*\/|--.*/,greedy:!0},keyword:/\b(?:A|ACCESSIBLE|ADD|AGENT|AGGREGATE|ALL|ALTER|AND|ANY|ARRAY|AS|ASC|AT|ATTRIBUTE|AUTHID|AVG|BEGIN|BETWEEN|BFILE_BASE|BINARY|BLOB_BASE|BLOCK|BODY|BOTH|BOUND|BULK|BY|BYTE|C|CALL|CALLING|CASCADE|CASE|CHAR|CHARACTER|CHARSET|CHARSETFORM|CHARSETID|CHAR_BASE|CHECK|CLOB_BASE|CLONE|CLOSE|CLUSTER|CLUSTERS|COLAUTH|COLLECT|COLUMNS|COMMENT|COMMIT|COMMITTED|COMPILED|COMPRESS|CONNECT|CONSTANT|CONSTRUCTOR|CONTEXT|CONTINUE|CONVERT|COUNT|CRASH|CREATE|CREDENTIAL|CURRENT|CURSOR|CUSTOMDATUM|DANGLING|DATA|DATE|DATE_BASE|DAY|DECLARE|DEFAULT|DEFINE|DELETE|DESC|DETERMINISTIC|DIRECTORY|DISTINCT|DOUBLE|DROP|DURATION|ELEMENT|ELSE|ELSIF|EMPTY|END|ESCAPE|EXCEPT|EXCEPTION|EXCEPTIONS|EXCLUSIVE|EXECUTE|EXISTS|EXIT|EXTERNAL|FETCH|FINAL|FIRST|FIXED|FLOAT|FOR|FORALL|FORCE|FROM|FUNCTION|GENERAL|GOTO|GRANT|GROUP|HASH|HAVING|HEAP|HIDDEN|HOUR|IDENTIFIED|IF|IMMEDIATE|IMMUTABLE|IN|INCLUDING|INDEX|INDEXES|INDICATOR|INDICES|INFINITE|INSERT|INSTANTIABLE|INT|INTERFACE|INTERSECT|INTERVAL|INTO|INVALIDATE|IS|ISOLATION|JAVA|LANGUAGE|LARGE|LEADING|LENGTH|LEVEL|LIBRARY|LIKE|LIKE2|LIKE4|LIKEC|LIMIT|LIMITED|LOCAL|LOCK|LONG|LOOP|MAP|MAX|MAXLEN|MEMBER|MERGE|MIN|MINUS|MINUTE|MOD|MODE|MODIFY|MONTH|MULTISET|MUTABLE|NAME|NAN|NATIONAL|NATIVE|NCHAR|NEW|NOCOMPRESS|NOCOPY|NOT|NOWAIT|NULL|NUMBER_BASE|OBJECT|OCICOLL|OCIDATE|OCIDATETIME|OCIDURATION|OCIINTERVAL|OCILOBLOCATOR|OCINUMBER|OCIRAW|OCIREF|OCIREFCURSOR|OCIROWID|OCISTRING|OCITYPE|OF|OLD|ON|ONLY|OPAQUE|OPEN|OPERATOR|OPTION|OR|ORACLE|ORADATA|ORDER|ORGANIZATION|ORLANY|ORLVARY|OTHERS|OUT|OVERLAPS|OVERRIDING|PACKAGE|PARALLEL_ENABLE|PARAMETER|PARAMETERS|PARENT|PARTITION|PASCAL|PERSISTABLE|PIPE|PIPELINED|PLUGGABLE|POLYMORPHIC|PRAGMA|PRECISION|PRIOR|PRIVATE|PROCEDURE|PUBLIC|RAISE|RANGE|RAW|READ|RECORD|REF|REFERENCE|RELIES_ON|REM|REMAINDER|RENAME|RESOURCE|RESULT|RESULT_CACHE|RETURN|RETURNING|REVERSE|REVOKE|ROLLBACK|ROW|SAMPLE|SAVE|SAVEPOINT|SB1|SB2|SB4|SECOND|SEGMENT|SELECT|SELF|SEPARATE|SEQUENCE|SERIALIZABLE|SET|SHARE|SHORT|SIZE|SIZE_T|SOME|SPARSE|SQL|SQLCODE|SQLDATA|SQLNAME|SQLSTATE|STANDARD|START|STATIC|STDDEV|STORED|STRING|STRUCT|STYLE|SUBMULTISET|SUBPARTITION|SUBSTITUTABLE|SUBTYPE|SUM|SYNONYM|TABAUTH|TABLE|TDO|THE|THEN|TIME|TIMESTAMP|TIMEZONE_ABBR|TIMEZONE_HOUR|TIMEZONE_MINUTE|TIMEZONE_REGION|TO|TRAILING|TRANSACTION|TRANSACTIONAL|TRUSTED|TYPE|UB1|UB2|UB4|UNDER|UNION|UNIQUE|UNPLUG|UNSIGNED|UNTRUSTED|UPDATE|USE|USING|VALIST|VALUE|VALUES|VARIABLE|VARIANCE|VARRAY|VARYING|VIEW|VIEWS|VOID|WHEN|WHERE|WHILE|WITH|WORK|WRAPPED|WRITE|YEAR|ZONE)\b/i,operator:/:=?|=>|[<>^~!]=|\.\.|\|\||\*\*|[-+*/%<>=@]/}),e.languages.insertBefore("plsql","operator",{label:{pattern:/<<\s*\w+\s*>>/,alias:"symbol"}})}Uk.displayName="powershell";Uk.aliases=[];function Uk(e){(function(t){var r=t.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};r.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:r},boolean:r.boolean,variable:r.variable}})(e)}Vk.displayName="protobuf";Vk.aliases=[];function Vk(e){e.register(_r),function(t){var r=/\b(?:bool|bytes|double|s?fixed(?:32|64)|float|[su]?int(?:32|64)|string)\b/;t.languages.protobuf=t.languages.extend("clike",{"class-name":[{pattern:/(\b(?:enum|extend|message|service)\s+)[A-Za-z_]\w*(?=\s*\{)/,lookbehind:!0},{pattern:/(\b(?:rpc\s+\w+|returns)\s*\(\s*(?:stream\s+)?)\.?[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*(?=\s*\))/,lookbehind:!0}],keyword:/\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|returns|rpc(?=\s+\w)|service|stream|syntax|to)\b(?!\s*=\s*\d)/,function:/\b[a-z_]\w*(?=\s*\()/i}),t.languages.insertBefore("protobuf","operator",{map:{pattern:/\bmap<\s*[\w.]+\s*,\s*[\w.]+\s*>(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/[<>.,]/,builtin:r}},builtin:r,"positional-class-name":{pattern:/(?:\b|\B\.)[a-z_]\w*(?:\.[a-z_]\w*)*(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/\./}},annotation:{pattern:/(\[\s*)[a-z_]\w*(?=\s*=)/i,lookbehind:!0}})}(e)}jk.displayName="python";jk.aliases=["py"];function jk(e){e.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![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:/[{}[\];(),.:]/},e.languages.python["string-interpolation"].inside.interpolation.inside.rest=e.languages.python,e.languages.py=e.languages.python}Gk.displayName="regex";Gk.aliases=[];function Gk(e){(function(t){var r={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]|.)/,o={pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},i={pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},s="(?:[^\\\\-]|"+n.source+")",a=RegExp(s+"-"+s),l={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:a,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":r,"char-set":i,escape:n}},"special-escape":r,"char-set":o,backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":l}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),t.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var r={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("|")+")",o=/(?:"(?:\\.|[^"\\\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:r,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:r,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+o),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+o+/(?=:(?!:))/.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:r,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:r,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:r,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:r,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:r,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}(e)}Kk.displayName="rust";Kk.aliases=[];function Kk(e){(function(t){for(var r=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,n=0;n<2;n++)r=r.replace(//g,function(){return r});r=r.replace(//g,function(){return/[^\s\S]/.source}),t.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+r),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})(e)}Yk.displayName="sass";Yk.aliases=[];function Yk(e){e.register(up),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 r=/\$[-\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:r,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:r,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}})}(e)}qk.displayName="scala";qk.aliases=[];function qk(e){e.register(gg),e.languages.scala=e.languages.extend("java",{"triple-quoted-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:/<-|=>|\b(?:abstract|case|catch|class|def|derives|do|else|enum|extends|extension|final|finally|for|forSome|given|if|implicit|import|infix|inline|lazy|match|new|null|object|opaque|open|override|package|private|protected|return|sealed|self|super|this|throw|trait|transparent|try|type|using|val|var|while|with|yield)\b/,number:/\b0x(?:[\da-f]*\.)?[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e\d+)?[dfl]?/i,builtin:/\b(?:Any|AnyRef|AnyVal|Boolean|Byte|Char|Double|Float|Int|Long|Nothing|Short|String|Unit)\b/,symbol:/'[^\d\s\\]\w*/}),e.languages.insertBefore("scala","triple-quoted-string",{"string-interpolation":{pattern:/\b[a-z]\w*(?:"""(?:[^$]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*?"""|"(?:[^$"\r\n]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*")/i,greedy:!0,inside:{id:{pattern:/^\w+/,greedy:!0,alias:"function"},escape:{pattern:/\\\$"|\$[$"]/,greedy:!0,alias:"symbol"},interpolation:{pattern:/\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,greedy:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.scala}}},string:/[\s\S]+/}}}),delete e.languages.scala["class-name"],delete e.languages.scala.function,delete e.languages.scala.constant}Xk.displayName="scss";Xk.aliases=[];function Xk(e){e.register(up),e.languages.scss=e.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),e.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),e.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),e.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),e.languages.scss.atrule.inside.rest=e.languages.scss}Zk.displayName="smalltalk";Zk.aliases=[];function Zk(e){e.languages.smalltalk={comment:{pattern:/"(?:""|[^"])*"/,greedy:!0},char:{pattern:/\$./,greedy:!0},string:{pattern:/'(?:''|[^'])*'/,greedy:!0},symbol:/#[\da-z]+|#(?:-|([+\/\\*~<>=@%|&?!])\1?)|#(?=\()/i,"block-arguments":{pattern:/(\[\s*):[^\[|]*\|/,lookbehind:!0,inside:{variable:/:[\da-z]+/i,punctuation:/\|/}},"temporary-variables":{pattern:/\|[^|]+\|/,inside:{variable:/[\da-z]+/i,punctuation:/\|/}},keyword:/\b(?:new|nil|self|super)\b/,boolean:/\b(?:false|true)\b/,number:[/\d+r-?[\dA-Z]+(?:\.[\dA-Z]+)?(?:e-?\d+)?/,/\b\d+(?:\.\d+)?(?:e-?\d+)?/],operator:/[<=]=?|:=|~[~=]|\/\/?|\\\\|>[>=]?|[!^+\-*&|,@]/,punctuation:/[.;:?\[\](){}]/}}Jk.displayName="swift";Jk.aliases=[];function Jk(e){e.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},e.languages.swift["string-literal"].forEach(function(t){t.inside.interpolation.inside=e.languages.swift})}Qk.displayName="toml";Qk.aliases=[];function Qk(e){(function(t){var r=/(?:[\w-]+|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*")/.source;function n(o){return o.replace(/__/g,function(){return r})}t.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp(n(/(^[\t ]*\[\s*(?:\[\s*)?)__(?:\s*\.\s*__)*(?=\s*\])/.source),"m"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern:RegExp(n(/(^[\t ]*|[{,]\s*)__(?:\s*\.\s*__)*(?=\s*=)/.source),"m"),lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},date:[{pattern:/\b\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?\b/i,alias:"number"},{pattern:/\b\d{2}:\d{2}:\d{2}(?:\.\d+)?\b/,alias:"number"}],number:/(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\b\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?\b(?:inf|nan)\b/,boolean:/\b(?:false|true)\b/,punctuation:/[.,=[\]{}]/}})(e)}ex.displayName="typescript";ex.aliases=["ts"];function ex(e){e.register(Cs),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 r=t.languages.extend("typescript",{});delete r["class-name"],t.languages.typescript["class-name"].inside=r,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:r}}}}),t.languages.ts=t.languages.typescript}(e)}tx.displayName="unrealscript";tx.aliases=["uc","uscript"];function tx(e){e.languages.unrealscript={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},category:{pattern:/(\b(?:(?:autoexpand|hide|show)categories|var)\s*\()[^()]+(?=\))/,lookbehind:!0,greedy:!0,alias:"property"},metadata:{pattern:/(\w\s*)<\s*\w+\s*=[^<>|=\r\n]+(?:\|\s*\w+\s*=[^<>|=\r\n]+)*>/,lookbehind:!0,greedy:!0,inside:{property:/\b\w+(?=\s*=)/,operator:/=/,punctuation:/[<>|]/}},macro:{pattern:/`\w+/,alias:"property"},"class-name":{pattern:/(\b(?:class|enum|extends|interface|state(?:\(\))?|struct|within)\s+)\w+/,lookbehind:!0},keyword:/\b(?:abstract|actor|array|auto|autoexpandcategories|bool|break|byte|case|class|classgroup|client|coerce|collapsecategories|config|const|continue|default|defaultproperties|delegate|dependson|deprecated|do|dontcollapsecategories|editconst|editinlinenew|else|enum|event|exec|export|extends|final|float|for|forcescriptorder|foreach|function|goto|guid|hidecategories|hidedropdown|if|ignores|implements|inherits|input|int|interface|iterator|latent|local|material|name|native|nativereplication|noexport|nontransient|noteditinlinenew|notplaceable|operator|optional|out|pawn|perobjectconfig|perobjectlocalized|placeable|postoperator|preoperator|private|protected|reliable|replication|return|server|showcategories|simulated|singular|state|static|string|struct|structdefault|structdefaultproperties|switch|texture|transient|travel|unreliable|until|var|vector|while|within)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/>>|<<|--|\+\+|\*\*|[-+*/~!=<>$@]=?|&&?|\|\|?|\^\^?|[?:%]|\b(?:ClockwiseFrom|Cross|Dot)\b/,punctuation:/[()[\]{};,.]/},e.languages.uc=e.languages.uscript=e.languages.unrealscript}rx.displayName="yaml";rx.aliases=["yml"];function rx(e){(function(t){var r=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,o="(?:"+n.source+"(?:[ ]+"+r.source+")?|"+r.source+"(?:[ ]+"+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}),s=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function a(l,c){c=(c||"").replace(/m/g,"")+"m";var u=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return o}).replace(/<>/g,function(){return l});return RegExp(u,c)}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 o})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,function(){return o}).replace(/<>/g,function(){return"(?:"+i+"|"+s+")"})),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(s),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:r,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},t.languages.yml=t.languages.yaml})(e)}nx.displayName="zig";nx.aliases=[];function nx(e){(function(t){function r(c){return function(){return c}}var n=/\b(?:align|allowzero|and|anyframe|anytype|asm|async|await|break|cancel|catch|comptime|const|continue|defer|else|enum|errdefer|error|export|extern|fn|for|if|inline|linksection|nakedcc|noalias|nosuspend|null|or|orelse|packed|promise|pub|resume|return|stdcallcc|struct|suspend|switch|test|threadlocal|try|undefined|union|unreachable|usingnamespace|var|volatile|while)\b/,o="\\b(?!"+n.source+")(?!\\d)\\w+\\b",i=/align\s*\((?:[^()]|\([^()]*\))*\)/.source,s=/(?:\?|\bpromise->|(?:\[[^[\]]*\]|\*(?!\*)|\*\*)(?:\s*|\s*const\b|\s*volatile\b|\s*allowzero\b)*)/.source.replace(//g,r(i)),a=/(?:\bpromise\b|(?:\berror\.)?(?:\.)*(?!\s+))/.source.replace(//g,r(o)),l="(?!\\s)(?:!?\\s*(?:"+s+"\\s*)*"+a+")+";t.languages.zig={comment:[{pattern:/\/\/[/!].*/,alias:"doc-comment"},/\/{2}.*/],string:[{pattern:/(^|[^\\@])c?"(?:[^"\\\r\n]|\\.)*"/,lookbehind:!0,greedy:!0},{pattern:/([\r\n])([ \t]+c?\\{2}).*(?:(?:\r\n?|\n)\2.*)*/,lookbehind:!0,greedy:!0}],char:{pattern:/(^|[^\\])'(?:[^'\\\r\n]|[\uD800-\uDFFF]{2}|\\(?:.|x[a-fA-F\d]{2}|u\{[a-fA-F\d]{1,6}\}))'/,lookbehind:!0,greedy:!0},builtin:/\B@(?!\d)\w+(?=\s*\()/,label:{pattern:/(\b(?:break|continue)\s*:\s*)\w+\b|\b(?!\d)\w+\b(?=\s*:\s*(?:\{|while\b))/,lookbehind:!0},"class-name":[/\b(?!\d)\w+(?=\s*=\s*(?:(?:extern|packed)\s+)?(?:enum|struct|union)\s*[({])/,{pattern:RegExp(/(:\s*)(?=\s*(?:\s*)?[=;,)])|(?=\s*(?:\s*)?\{)/.source.replace(//g,r(l)).replace(//g,r(i))),lookbehind:!0,inside:null},{pattern:RegExp(/(\)\s*)(?=\s*(?:\s*)?;)/.source.replace(//g,r(l)).replace(//g,r(i))),lookbehind:!0,inside:null}],"builtin-type":{pattern:/\b(?:anyerror|bool|c_u?(?:int|long|longlong|short)|c_longdouble|c_void|comptime_(?:float|int)|f(?:16|32|64|128)|[iu](?:8|16|32|64|128|size)|noreturn|type|void)\b/,alias:"keyword"},keyword:n,function:/\b(?!\d)\w+(?=\s*\()/,number:/\b(?:0b[01]+|0o[0-7]+|0x[a-fA-F\d]+(?:\.[a-fA-F\d]*)?(?:[pP][+-]?[a-fA-F\d]+)?|\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)\b/,boolean:/\b(?:false|true)\b/,operator:/\.[*?]|\.{2,3}|[-=]>|\*\*|\+\+|\|\||(?:<<|>>|[-+*]%|[-+*/%^&|<>!=])=?|[?~]/,punctuation:/[.:,;(){}[\]]/},t.languages.zig["class-name"].forEach(function(c){c.inside===null&&(c.inside=t.languages.zig)})})(e)}/* + */function JN(t){const[e,n]=P.useState(t),r=P.useRef(t);return r.current=e,[e,n,r]}Sk.displayName="abap";Sk.aliases=[];function Sk(t){t.languages.abap={comment:/^\*.*/m,string:/(`|')(?:\\.|(?!\1)[^\\\r\n])*\1/,"string-template":{pattern:/([|}])(?:\\.|[^\\|{\r\n])*(?=[|{])/,lookbehind:!0,alias:"string"},"eol-comment":{pattern:/(^|\s)".*/m,lookbehind:!0,alias:"comment"},keyword:{pattern:/(\s|\.|^)(?:\*-INPUT|\?TO|ABAP-SOURCE|ABBREVIATED|ABS|ABSTRACT|ACCEPT|ACCEPTING|ACCESSPOLICY|ACCORDING|ACOS|ACTIVATION|ACTUAL|ADD|ADD-CORRESPONDING|ADJACENT|AFTER|ALIAS|ALIASES|ALIGN|ALL|ALLOCATE|ALPHA|ANALYSIS|ANALYZER|AND|ANY|APPEND|APPENDAGE|APPENDING|APPLICATION|ARCHIVE|AREA|ARITHMETIC|AS|ASCENDING|ASIN|ASPECT|ASSERT|ASSIGN|ASSIGNED|ASSIGNING|ASSOCIATION|ASYNCHRONOUS|AT|ATAN|ATTRIBUTES|AUTHORITY|AUTHORITY-CHECK|AVG|BACK|BACKGROUND|BACKUP|BACKWARD|BADI|BASE|BEFORE|BEGIN|BETWEEN|BIG|BINARY|BINDING|BIT|BIT-AND|BIT-NOT|BIT-OR|BIT-XOR|BLACK|BLANK|BLANKS|BLOB|BLOCK|BLOCKS|BLUE|BOUND|BOUNDARIES|BOUNDS|BOXED|BREAK-POINT|BT|BUFFER|BY|BYPASSING|BYTE|BYTE-CA|BYTE-CN|BYTE-CO|BYTE-CS|BYTE-NA|BYTE-NS|BYTE-ORDER|C|CA|CALL|CALLING|CASE|CAST|CASTING|CATCH|CEIL|CENTER|CENTERED|CHAIN|CHAIN-INPUT|CHAIN-REQUEST|CHANGE|CHANGING|CHANNELS|CHAR-TO-HEX|CHARACTER|CHARLEN|CHECK|CHECKBOX|CIRCULAR|CI_|CLASS|CLASS-CODING|CLASS-DATA|CLASS-EVENTS|CLASS-METHODS|CLASS-POOL|CLEANUP|CLEAR|CLIENT|CLOB|CLOCK|CLOSE|CN|CNT|CO|COALESCE|CODE|CODING|COLLECT|COLOR|COLUMN|COLUMNS|COL_BACKGROUND|COL_GROUP|COL_HEADING|COL_KEY|COL_NEGATIVE|COL_NORMAL|COL_POSITIVE|COL_TOTAL|COMMENT|COMMENTS|COMMIT|COMMON|COMMUNICATION|COMPARING|COMPONENT|COMPONENTS|COMPRESSION|COMPUTE|CONCAT|CONCATENATE|COND|CONDENSE|CONDITION|CONNECT|CONNECTION|CONSTANTS|CONTEXT|CONTEXTS|CONTINUE|CONTROL|CONTROLS|CONV|CONVERSION|CONVERT|COPIES|COPY|CORRESPONDING|COS|COSH|COUNT|COUNTRY|COVER|CP|CPI|CREATE|CREATING|CRITICAL|CS|CURRENCY|CURRENCY_CONVERSION|CURRENT|CURSOR|CURSOR-SELECTION|CUSTOMER|CUSTOMER-FUNCTION|DANGEROUS|DATA|DATABASE|DATAINFO|DATASET|DATE|DAYLIGHT|DBMAXLEN|DD\/MM\/YY|DD\/MM\/YYYY|DDMMYY|DEALLOCATE|DECIMALS|DECIMAL_SHIFT|DECLARATIONS|DEEP|DEFAULT|DEFERRED|DEFINE|DEFINING|DEFINITION|DELETE|DELETING|DEMAND|DEPARTMENT|DESCENDING|DESCRIBE|DESTINATION|DETAIL|DIALOG|DIRECTORY|DISCONNECT|DISPLAY|DISPLAY-MODE|DISTANCE|DISTINCT|DIV|DIVIDE|DIVIDE-CORRESPONDING|DIVISION|DO|DUMMY|DUPLICATE|DUPLICATES|DURATION|DURING|DYNAMIC|DYNPRO|E|EACH|EDIT|EDITOR-CALL|ELSE|ELSEIF|EMPTY|ENABLED|ENABLING|ENCODING|END|END-ENHANCEMENT-SECTION|END-LINES|END-OF-DEFINITION|END-OF-FILE|END-OF-PAGE|END-OF-SELECTION|ENDAT|ENDCASE|ENDCATCH|ENDCHAIN|ENDCLASS|ENDDO|ENDENHANCEMENT|ENDEXEC|ENDFOR|ENDFORM|ENDFUNCTION|ENDIAN|ENDIF|ENDING|ENDINTERFACE|ENDLOOP|ENDMETHOD|ENDMODULE|ENDON|ENDPROVIDE|ENDSELECT|ENDTRY|ENDWHILE|ENGINEERING|ENHANCEMENT|ENHANCEMENT-POINT|ENHANCEMENT-SECTION|ENHANCEMENTS|ENTRIES|ENTRY|ENVIRONMENT|EQ|EQUAL|EQUIV|ERRORMESSAGE|ERRORS|ESCAPE|ESCAPING|EVENT|EVENTS|EXACT|EXCEPT|EXCEPTION|EXCEPTION-TABLE|EXCEPTIONS|EXCLUDE|EXCLUDING|EXEC|EXECUTE|EXISTS|EXIT|EXIT-COMMAND|EXP|EXPAND|EXPANDING|EXPIRATION|EXPLICIT|EXPONENT|EXPORT|EXPORTING|EXTEND|EXTENDED|EXTENSION|EXTRACT|FAIL|FETCH|FIELD|FIELD-GROUPS|FIELD-SYMBOL|FIELD-SYMBOLS|FIELDS|FILE|FILTER|FILTER-TABLE|FILTERS|FINAL|FIND|FIRST|FIRST-LINE|FIXED-POINT|FKEQ|FKGE|FLOOR|FLUSH|FONT|FOR|FORM|FORMAT|FORWARD|FOUND|FRAC|FRAME|FRAMES|FREE|FRIENDS|FROM|FUNCTION|FUNCTION-POOL|FUNCTIONALITY|FURTHER|GAPS|GE|GENERATE|GET|GIVING|GKEQ|GKGE|GLOBAL|GRANT|GREATER|GREEN|GROUP|GROUPS|GT|HANDLE|HANDLER|HARMLESS|HASHED|HAVING|HDB|HEAD-LINES|HEADER|HEADERS|HEADING|HELP-ID|HELP-REQUEST|HIDE|HIGH|HINT|HOLD|HOTSPOT|I|ICON|ID|IDENTIFICATION|IDENTIFIER|IDS|IF|IGNORE|IGNORING|IMMEDIATELY|IMPLEMENTATION|IMPLEMENTATIONS|IMPLEMENTED|IMPLICIT|IMPORT|IMPORTING|IN|INACTIVE|INCL|INCLUDE|INCLUDES|INCLUDING|INCREMENT|INDEX|INDEX-LINE|INFOTYPES|INHERITING|INIT|INITIAL|INITIALIZATION|INNER|INOUT|INPUT|INSERT|INSTANCES|INTENSIFIED|INTERFACE|INTERFACE-POOL|INTERFACES|INTERNAL|INTERVALS|INTO|INVERSE|INVERTED-DATE|IS|ISO|ITERATOR|ITNO|JOB|JOIN|KEEP|KEEPING|KERNEL|KEY|KEYS|KEYWORDS|KIND|LANGUAGE|LAST|LATE|LAYOUT|LE|LEADING|LEAVE|LEFT|LEFT-JUSTIFIED|LEFTPLUS|LEFTSPACE|LEGACY|LENGTH|LESS|LET|LEVEL|LEVELS|LIKE|LINE|LINE-COUNT|LINE-SELECTION|LINE-SIZE|LINEFEED|LINES|LIST|LIST-PROCESSING|LISTBOX|LITTLE|LLANG|LOAD|LOAD-OF-PROGRAM|LOB|LOCAL|LOCALE|LOCATOR|LOG|LOG-POINT|LOG10|LOGFILE|LOGICAL|LONG|LOOP|LOW|LOWER|LPAD|LPI|LT|M|MAIL|MAIN|MAJOR-ID|MAPPING|MARGIN|MARK|MASK|MATCH|MATCHCODE|MAX|MAXIMUM|MEDIUM|MEMBERS|MEMORY|MESH|MESSAGE|MESSAGE-ID|MESSAGES|MESSAGING|METHOD|METHODS|MIN|MINIMUM|MINOR-ID|MM\/DD\/YY|MM\/DD\/YYYY|MMDDYY|MOD|MODE|MODIF|MODIFIER|MODIFY|MODULE|MOVE|MOVE-CORRESPONDING|MULTIPLY|MULTIPLY-CORRESPONDING|NA|NAME|NAMETAB|NATIVE|NB|NE|NESTED|NESTING|NEW|NEW-LINE|NEW-PAGE|NEW-SECTION|NEXT|NO|NO-DISPLAY|NO-EXTENSION|NO-GAP|NO-GAPS|NO-GROUPING|NO-HEADING|NO-SCROLLING|NO-SIGN|NO-TITLE|NO-TOPOFPAGE|NO-ZERO|NODE|NODES|NON-UNICODE|NON-UNIQUE|NOT|NP|NS|NULL|NUMBER|NUMOFCHAR|O|OBJECT|OBJECTS|OBLIGATORY|OCCURRENCE|OCCURRENCES|OCCURS|OF|OFF|OFFSET|OLE|ON|ONLY|OPEN|OPTION|OPTIONAL|OPTIONS|OR|ORDER|OTHER|OTHERS|OUT|OUTER|OUTPUT|OUTPUT-LENGTH|OVERFLOW|OVERLAY|PACK|PACKAGE|PAD|PADDING|PAGE|PAGES|PARAMETER|PARAMETER-TABLE|PARAMETERS|PART|PARTIALLY|PATTERN|PERCENTAGE|PERFORM|PERFORMING|PERSON|PF|PF-STATUS|PINK|PLACES|POOL|POSITION|POS_HIGH|POS_LOW|PRAGMAS|PRECOMPILED|PREFERRED|PRESERVING|PRIMARY|PRINT|PRINT-CONTROL|PRIORITY|PRIVATE|PROCEDURE|PROCESS|PROGRAM|PROPERTY|PROTECTED|PROVIDE|PUBLIC|PUSHBUTTON|PUT|QUEUE-ONLY|QUICKINFO|RADIOBUTTON|RAISE|RAISING|RANGE|RANGES|RAW|READ|READ-ONLY|READER|RECEIVE|RECEIVED|RECEIVER|RECEIVING|RED|REDEFINITION|REDUCE|REDUCED|REF|REFERENCE|REFRESH|REGEX|REJECT|REMOTE|RENAMING|REPLACE|REPLACEMENT|REPLACING|REPORT|REQUEST|REQUESTED|RESERVE|RESET|RESOLUTION|RESPECTING|RESPONSIBLE|RESULT|RESULTS|RESUMABLE|RESUME|RETRY|RETURN|RETURNCODE|RETURNING|RIGHT|RIGHT-JUSTIFIED|RIGHTPLUS|RIGHTSPACE|RISK|RMC_COMMUNICATION_FAILURE|RMC_INVALID_STATUS|RMC_SYSTEM_FAILURE|ROLE|ROLLBACK|ROUND|ROWS|RTTI|RUN|SAP|SAP-SPOOL|SAVING|SCALE_PRESERVING|SCALE_PRESERVING_SCIENTIFIC|SCAN|SCIENTIFIC|SCIENTIFIC_WITH_LEADING_ZERO|SCREEN|SCROLL|SCROLL-BOUNDARY|SCROLLING|SEARCH|SECONDARY|SECONDS|SECTION|SELECT|SELECT-OPTIONS|SELECTION|SELECTION-SCREEN|SELECTION-SET|SELECTION-SETS|SELECTION-TABLE|SELECTIONS|SELECTOR|SEND|SEPARATE|SEPARATED|SET|SHARED|SHIFT|SHORT|SHORTDUMP-ID|SIGN|SIGN_AS_POSTFIX|SIMPLE|SIN|SINGLE|SINH|SIZE|SKIP|SKIPPING|SMART|SOME|SORT|SORTABLE|SORTED|SOURCE|SPACE|SPECIFIED|SPLIT|SPOOL|SPOTS|SQL|SQLSCRIPT|SQRT|STABLE|STAMP|STANDARD|START-OF-SELECTION|STARTING|STATE|STATEMENT|STATEMENTS|STATIC|STATICS|STATUSINFO|STEP-LOOP|STOP|STRLEN|STRUCTURE|STRUCTURES|STYLE|SUBKEY|SUBMATCHES|SUBMIT|SUBROUTINE|SUBSCREEN|SUBSTRING|SUBTRACT|SUBTRACT-CORRESPONDING|SUFFIX|SUM|SUMMARY|SUMMING|SUPPLIED|SUPPLY|SUPPRESS|SWITCH|SWITCHSTATES|SYMBOL|SYNCPOINTS|SYNTAX|SYNTAX-CHECK|SYNTAX-TRACE|SYSTEM-CALL|SYSTEM-EXCEPTIONS|SYSTEM-EXIT|TAB|TABBED|TABLE|TABLES|TABLEVIEW|TABSTRIP|TAN|TANH|TARGET|TASK|TASKS|TEST|TESTING|TEXT|TEXTPOOL|THEN|THROW|TIME|TIMES|TIMESTAMP|TIMEZONE|TITLE|TITLE-LINES|TITLEBAR|TO|TOKENIZATION|TOKENS|TOP-LINES|TOP-OF-PAGE|TRACE-FILE|TRACE-TABLE|TRAILING|TRANSACTION|TRANSFER|TRANSFORMATION|TRANSLATE|TRANSPORTING|TRMAC|TRUNC|TRUNCATE|TRUNCATION|TRY|TYPE|TYPE-POOL|TYPE-POOLS|TYPES|ULINE|UNASSIGN|UNDER|UNICODE|UNION|UNIQUE|UNIT|UNIT_CONVERSION|UNIX|UNPACK|UNTIL|UNWIND|UP|UPDATE|UPPER|USER|USER-COMMAND|USING|UTF-8|VALID|VALUE|VALUE-REQUEST|VALUES|VARY|VARYING|VERIFICATION-MESSAGE|VERSION|VIA|VIEW|VISIBLE|WAIT|WARNING|WHEN|WHENEVER|WHERE|WHILE|WIDTH|WINDOW|WINDOWS|WITH|WITH-HEADING|WITH-TITLE|WITHOUT|WORD|WORK|WRITE|WRITER|X|XML|XOR|XSD|XSTRLEN|YELLOW|YES|YYMMDD|Z|ZERO|ZONE)(?![\w-])/i,lookbehind:!0},number:/\b\d+\b/,operator:{pattern:/(\s)(?:\*\*?|<[=>]?|>=?|\?=|[-+\/=])(?=\s)/,lookbehind:!0},"string-operator":{pattern:/(\s)&&?(?=\s)/,lookbehind:!0,alias:"keyword"},"token-operator":[{pattern:/(\w)(?:->?|=>|[~|{}])(?=\w)/,lookbehind:!0,alias:"punctuation"},{pattern:/[|{}]/,alias:"punctuation"}],punctuation:/[,.:()]/}}fr.displayName="clike";fr.aliases=[];function fr(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:/[{}[\];(),.:]/}}aa.displayName="javascript";aa.aliases=["js"];function aa(t){t.register(fr),t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside: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}Ck.displayName="actionscript";Ck.aliases=[];function Ck(t){t.register(aa),t.languages.actionscript=t.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<>?>?|[!=]=?)=?|[~?@]/}),t.languages.actionscript["class-name"].alias="function",delete t.languages.actionscript.parameter,delete t.languages.actionscript["literal-property"],t.languages.markup&&t.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:t.languages.markup}})}Tk.displayName="bash";Tk.aliases=["sh","shell"];function Tk(t){(function(e){var n="\\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",r={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},o={bash:r,environment:{pattern:RegExp("\\$"+n),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("(\\{)"+n),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+n),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:o},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:o},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:o.entity}}],environment:{pattern:RegExp("\\$?"+n),alias:"constant"},variable:o.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=e.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],s=o.variable[1].inside,l=0;l?^\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:/[,;:()]/}}_k.displayName="batch";_k.aliases=[];function _k(t){(function(e){var n=/%%?[~:\w]+%?|!\S+!/,r={pattern:/\/[a-z?]+(?=[ :]|$):?|-[a-z]\b|--[a-z-]+\b/im,alias:"attr-name",inside:{punctuation:/:/}},o=/"(?:[\\"]"|[^"])*"(?!")/,i=/(?:\b|-)\d+\b/;e.languages.batch={comment:[/^::.*/m,{pattern:/((?:^|[&(])[ \t]*)rem\b(?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0}],label:{pattern:/^:.*/m,alias:"property"},command:[{pattern:/((?:^|[&(])[ \t]*)for(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* \S+ in \([^)]+\) do/im,lookbehind:!0,inside:{keyword:/\b(?:do|in)\b|^for\b/i,string:o,parameter:r,variable:n,number:i,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*)if(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:not )?(?:cmdextversion \d+|defined \w+|errorlevel \d+|exist \S+|(?:"[^"]*"|(?!")(?:(?!==)\S)+)?(?:==| (?:equ|geq|gtr|leq|lss|neq) )(?:"[^"]*"|[^\s"]\S*))/im,lookbehind:!0,inside:{keyword:/\b(?:cmdextversion|defined|errorlevel|exist|not)\b|^if\b/i,string:o,parameter:r,variable:n,number:i,operator:/\^|==|\b(?:equ|geq|gtr|leq|lss|neq)\b/i}},{pattern:/((?:^|[&()])[ \t]*)else\b/im,lookbehind:!0,inside:{keyword:/^else\b/i}},{pattern:/((?:^|[&(])[ \t]*)set(?: \/[a-z](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0,inside:{keyword:/^set\b/i,string:o,parameter:r,variable:[n,/\w+(?=(?:[*\/%+\-&^|]|<<|>>)?=)/],number:i,operator:/[*\/%+\-&^|]=?|<<=?|>>=?|[!~_=]/,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*@?)\w+\b(?:"(?:[\\"]"|[^"])*"(?!")|[^"^&)\r\n]|\^(?:\r\n|[\s\S]))*/m,lookbehind:!0,inside:{keyword:/^\w+\b/,string:o,parameter:r,label:{pattern:/(^\s*):\S+/m,lookbehind:!0,alias:"property"},variable:n,number:i,operator:/\^/}}],operator:/[&@]/,punctuation:/[()']/}})(t)}lf.displayName="c";lf.aliases=[];function lf(t){t.register(fr),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}Rk.displayName="clojure";Rk.aliases=[];function Rk(t){t.languages.clojure={comment:{pattern:/;.*/,greedy:!0},string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},char:/\\\w+/,symbol:{pattern:/(^|[\s()\[\]{},])::?[\w*+!?'<>=/.-]+/,lookbehind:!0},keyword:{pattern:/(\()(?:-|->|->>|\.|\.\.|\*|\/|\+|<|<=|=|==|>|>=|accessor|agent|agent-errors|aget|alength|all-ns|alter|and|append-child|apply|array-map|aset|aset-boolean|aset-byte|aset-char|aset-double|aset-float|aset-int|aset-long|aset-short|assert|assoc|await|await-for|bean|binding|bit-and|bit-not|bit-or|bit-shift-left|bit-shift-right|bit-xor|boolean|branch\?|butlast|byte|cast|char|children|class|clear-agent-errors|comment|commute|comp|comparator|complement|concat|cond|conj|cons|constantly|construct-proxy|contains\?|count|create-ns|create-struct|cycle|dec|declare|def|def-|definline|definterface|defmacro|defmethod|defmulti|defn|defn-|defonce|defproject|defprotocol|defrecord|defstruct|deftype|deref|difference|disj|dissoc|distinct|do|doall|doc|dorun|doseq|dosync|dotimes|doto|double|down|drop|drop-while|edit|end\?|ensure|eval|every\?|false\?|ffirst|file-seq|filter|find|find-doc|find-ns|find-var|first|float|flush|fn|fnseq|for|frest|gensym|get|get-proxy-class|hash-map|hash-set|identical\?|identity|if|if-let|if-not|import|in-ns|inc|index|insert-child|insert-left|insert-right|inspect-table|inspect-tree|instance\?|int|interleave|intersection|into|into-array|iterate|join|key|keys|keyword|keyword\?|last|lazy-cat|lazy-cons|left|lefts|let|line-seq|list|list\*|load|load-file|locking|long|loop|macroexpand|macroexpand-1|make-array|make-node|map|map-invert|map\?|mapcat|max|max-key|memfn|merge|merge-with|meta|min|min-key|monitor-enter|name|namespace|neg\?|new|newline|next|nil\?|node|not|not-any\?|not-every\?|not=|ns|ns-imports|ns-interns|ns-map|ns-name|ns-publics|ns-refers|ns-resolve|ns-unmap|nth|nthrest|or|parse|partial|path|peek|pop|pos\?|pr|pr-str|print|print-str|println|println-str|prn|prn-str|project|proxy|proxy-mappings|quot|quote|rand|rand-int|range|re-find|re-groups|re-matcher|re-matches|re-pattern|re-seq|read|read-line|recur|reduce|ref|ref-set|refer|rem|remove|remove-method|remove-ns|rename|rename-keys|repeat|replace|replicate|resolve|rest|resultset-seq|reverse|rfirst|right|rights|root|rrest|rseq|second|select|select-keys|send|send-off|seq|seq-zip|seq\?|set|set!|short|slurp|some|sort|sort-by|sorted-map|sorted-map-by|sorted-set|special-symbol\?|split-at|split-with|str|string\?|struct|struct-map|subs|subvec|symbol|symbol\?|sync|take|take-nth|take-while|test|throw|time|to-array|to-array-2d|tree-seq|true\?|try|union|up|update-proxy|val|vals|var|var-get|var-set|var\?|vector|vector-zip|vector\?|when|when-first|when-let|when-not|with-local-vars|with-meta|with-open|with-out-str|xml-seq|xml-zip|zero\?|zipmap|zipper)(?=[\s)]|$)/,lookbehind:!0},boolean:/\b(?:false|nil|true)\b/,number:{pattern:/(^|[^\w$@])(?:\d+(?:[/.]\d+)?(?:e[+-]?\d+)?|0x[a-f0-9]+|[1-9]\d?r[a-z0-9]+)[lmn]?(?![\w$@])/i,lookbehind:!0},function:{pattern:/((?:^|[^'])\()[\w*+!?'<>=/.-]+(?=[\s)]|$)/,lookbehind:!0},operator:/[#@^`~]/,punctuation:/[{}\[\](),]/}}Mk.displayName="cmake";Mk.aliases=[];function Mk(t){t.languages.cmake={comment:/#.*/,string:{pattern:/"(?:[^\\"]|\\.)*"/,greedy:!0,inside:{interpolation:{pattern:/\$\{(?:[^{}$]|\$\{[^{}$]*\})*\}/,inside:{punctuation:/\$\{|\}/,variable:/\w+/}}}},variable:/\b(?:CMAKE_\w+|\w+_(?:(?:BINARY|SOURCE)_DIR|DESCRIPTION|HOMEPAGE_URL|ROOT|VERSION(?:_MAJOR|_MINOR|_PATCH|_TWEAK)?)|(?:ANDROID|APPLE|BORLAND|BUILD_SHARED_LIBS|CACHE|CPACK_(?:ABSOLUTE_DESTINATION_FILES|COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY|ERROR_ON_ABSOLUTE_INSTALL_DESTINATION|INCLUDE_TOPLEVEL_DIRECTORY|INSTALL_DEFAULT_DIRECTORY_PERMISSIONS|INSTALL_SCRIPT|PACKAGING_INSTALL_PREFIX|SET_DESTDIR|WARN_ON_ABSOLUTE_INSTALL_DESTINATION)|CTEST_(?:BINARY_DIRECTORY|BUILD_COMMAND|BUILD_NAME|BZR_COMMAND|BZR_UPDATE_OPTIONS|CHANGE_ID|CHECKOUT_COMMAND|CONFIGURATION_TYPE|CONFIGURE_COMMAND|COVERAGE_COMMAND|COVERAGE_EXTRA_FLAGS|CURL_OPTIONS|CUSTOM_(?:COVERAGE_EXCLUDE|ERROR_EXCEPTION|ERROR_MATCH|ERROR_POST_CONTEXT|ERROR_PRE_CONTEXT|MAXIMUM_FAILED_TEST_OUTPUT_SIZE|MAXIMUM_NUMBER_OF_(?:ERRORS|WARNINGS)|MAXIMUM_PASSED_TEST_OUTPUT_SIZE|MEMCHECK_IGNORE|POST_MEMCHECK|POST_TEST|PRE_MEMCHECK|PRE_TEST|TESTS_IGNORE|WARNING_EXCEPTION|WARNING_MATCH)|CVS_CHECKOUT|CVS_COMMAND|CVS_UPDATE_OPTIONS|DROP_LOCATION|DROP_METHOD|DROP_SITE|DROP_SITE_CDASH|DROP_SITE_PASSWORD|DROP_SITE_USER|EXTRA_COVERAGE_GLOB|GIT_COMMAND|GIT_INIT_SUBMODULES|GIT_UPDATE_CUSTOM|GIT_UPDATE_OPTIONS|HG_COMMAND|HG_UPDATE_OPTIONS|LABELS_FOR_SUBPROJECTS|MEMORYCHECK_(?:COMMAND|COMMAND_OPTIONS|SANITIZER_OPTIONS|SUPPRESSIONS_FILE|TYPE)|NIGHTLY_START_TIME|P4_CLIENT|P4_COMMAND|P4_OPTIONS|P4_UPDATE_OPTIONS|RUN_CURRENT_SCRIPT|SCP_COMMAND|SITE|SOURCE_DIRECTORY|SUBMIT_URL|SVN_COMMAND|SVN_OPTIONS|SVN_UPDATE_OPTIONS|TEST_LOAD|TEST_TIMEOUT|TRIGGER_SITE|UPDATE_COMMAND|UPDATE_OPTIONS|UPDATE_VERSION_ONLY|USE_LAUNCHERS)|CYGWIN|ENV|EXECUTABLE_OUTPUT_PATH|GHS-MULTI|IOS|LIBRARY_OUTPUT_PATH|MINGW|MSVC(?:10|11|12|14|60|70|71|80|90|_IDE|_TOOLSET_VERSION|_VERSION)?|MSYS|PROJECT_NAME|UNIX|WIN32|WINCE|WINDOWS_PHONE|WINDOWS_STORE|XCODE))\b/,property:/\b(?:cxx_\w+|(?:ARCHIVE_OUTPUT_(?:DIRECTORY|NAME)|COMPILE_DEFINITIONS|COMPILE_PDB_NAME|COMPILE_PDB_OUTPUT_DIRECTORY|EXCLUDE_FROM_DEFAULT_BUILD|IMPORTED_(?:IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_LANGUAGES|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|NO_SONAME|OBJECTS|SONAME)|INTERPROCEDURAL_OPTIMIZATION|LIBRARY_OUTPUT_DIRECTORY|LIBRARY_OUTPUT_NAME|LINK_FLAGS|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|MAP_IMPORTED_CONFIG|OSX_ARCHITECTURES|OUTPUT_NAME|PDB_NAME|PDB_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_NAME|STATIC_LIBRARY_FLAGS|VS_CSHARP|VS_DOTNET_REFERENCEPROP|VS_DOTNET_REFERENCE|VS_GLOBAL_SECTION_POST|VS_GLOBAL_SECTION_PRE|VS_GLOBAL|XCODE_ATTRIBUTE)_\w+|\w+_(?:CLANG_TIDY|COMPILER_LAUNCHER|CPPCHECK|CPPLINT|INCLUDE_WHAT_YOU_USE|OUTPUT_NAME|POSTFIX|VISIBILITY_PRESET)|ABSTRACT|ADDITIONAL_MAKE_CLEAN_FILES|ADVANCED|ALIASED_TARGET|ALLOW_DUPLICATE_CUSTOM_TARGETS|ANDROID_(?:ANT_ADDITIONAL_OPTIONS|API|API_MIN|ARCH|ASSETS_DIRECTORIES|GUI|JAR_DEPENDENCIES|NATIVE_LIB_DEPENDENCIES|NATIVE_LIB_DIRECTORIES|PROCESS_MAX|PROGUARD|PROGUARD_CONFIG_PATH|SECURE_PROPS_PATH|SKIP_ANT_STEP|STL_TYPE)|ARCHIVE_OUTPUT_DIRECTORY|ATTACHED_FILES|ATTACHED_FILES_ON_FAIL|AUTOGEN_(?:BUILD_DIR|ORIGIN_DEPENDS|PARALLEL|SOURCE_GROUP|TARGETS_FOLDER|TARGET_DEPENDS)|AUTOMOC|AUTOMOC_(?:COMPILER_PREDEFINES|DEPEND_FILTERS|EXECUTABLE|MACRO_NAMES|MOC_OPTIONS|SOURCE_GROUP|TARGETS_FOLDER)|AUTORCC|AUTORCC_EXECUTABLE|AUTORCC_OPTIONS|AUTORCC_SOURCE_GROUP|AUTOUIC|AUTOUIC_EXECUTABLE|AUTOUIC_OPTIONS|AUTOUIC_SEARCH_PATHS|BINARY_DIR|BUILDSYSTEM_TARGETS|BUILD_RPATH|BUILD_RPATH_USE_ORIGIN|BUILD_WITH_INSTALL_NAME_DIR|BUILD_WITH_INSTALL_RPATH|BUNDLE|BUNDLE_EXTENSION|CACHE_VARIABLES|CLEAN_NO_CUSTOM|COMMON_LANGUAGE_RUNTIME|COMPATIBLE_INTERFACE_(?:BOOL|NUMBER_MAX|NUMBER_MIN|STRING)|COMPILE_(?:DEFINITIONS|FEATURES|FLAGS|OPTIONS|PDB_NAME|PDB_OUTPUT_DIRECTORY)|COST|CPACK_DESKTOP_SHORTCUTS|CPACK_NEVER_OVERWRITE|CPACK_PERMANENT|CPACK_STARTUP_SHORTCUTS|CPACK_START_MENU_SHORTCUTS|CPACK_WIX_ACL|CROSSCOMPILING_EMULATOR|CUDA_EXTENSIONS|CUDA_PTX_COMPILATION|CUDA_RESOLVE_DEVICE_SYMBOLS|CUDA_SEPARABLE_COMPILATION|CUDA_STANDARD|CUDA_STANDARD_REQUIRED|CXX_EXTENSIONS|CXX_STANDARD|CXX_STANDARD_REQUIRED|C_EXTENSIONS|C_STANDARD|C_STANDARD_REQUIRED|DEBUG_CONFIGURATIONS|DEFINE_SYMBOL|DEFINITIONS|DEPENDS|DEPLOYMENT_ADDITIONAL_FILES|DEPLOYMENT_REMOTE_DIRECTORY|DISABLED|DISABLED_FEATURES|ECLIPSE_EXTRA_CPROJECT_CONTENTS|ECLIPSE_EXTRA_NATURES|ENABLED_FEATURES|ENABLED_LANGUAGES|ENABLE_EXPORTS|ENVIRONMENT|EXCLUDE_FROM_ALL|EXCLUDE_FROM_DEFAULT_BUILD|EXPORT_NAME|EXPORT_PROPERTIES|EXTERNAL_OBJECT|EchoString|FAIL_REGULAR_EXPRESSION|FIND_LIBRARY_USE_LIB32_PATHS|FIND_LIBRARY_USE_LIB64_PATHS|FIND_LIBRARY_USE_LIBX32_PATHS|FIND_LIBRARY_USE_OPENBSD_VERSIONING|FIXTURES_CLEANUP|FIXTURES_REQUIRED|FIXTURES_SETUP|FOLDER|FRAMEWORK|Fortran_FORMAT|Fortran_MODULE_DIRECTORY|GENERATED|GENERATOR_FILE_NAME|GENERATOR_IS_MULTI_CONFIG|GHS_INTEGRITY_APP|GHS_NO_SOURCE_GROUP_FILE|GLOBAL_DEPENDS_DEBUG_MODE|GLOBAL_DEPENDS_NO_CYCLES|GNUtoMS|HAS_CXX|HEADER_FILE_ONLY|HELPSTRING|IMPLICIT_DEPENDS_INCLUDE_TRANSFORM|IMPORTED|IMPORTED_(?:COMMON_LANGUAGE_RUNTIME|CONFIGURATIONS|GLOBAL|IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_(?:LANGUAGES|LIBRARIES|MULTIPLICITY)|LOCATION|NO_SONAME|OBJECTS|SONAME)|IMPORT_PREFIX|IMPORT_SUFFIX|INCLUDE_DIRECTORIES|INCLUDE_REGULAR_EXPRESSION|INSTALL_NAME_DIR|INSTALL_RPATH|INSTALL_RPATH_USE_LINK_PATH|INTERFACE_(?:AUTOUIC_OPTIONS|COMPILE_DEFINITIONS|COMPILE_FEATURES|COMPILE_OPTIONS|INCLUDE_DIRECTORIES|LINK_DEPENDS|LINK_DIRECTORIES|LINK_LIBRARIES|LINK_OPTIONS|POSITION_INDEPENDENT_CODE|SOURCES|SYSTEM_INCLUDE_DIRECTORIES)|INTERPROCEDURAL_OPTIMIZATION|IN_TRY_COMPILE|IOS_INSTALL_COMBINED|JOB_POOLS|JOB_POOL_COMPILE|JOB_POOL_LINK|KEEP_EXTENSION|LABELS|LANGUAGE|LIBRARY_OUTPUT_DIRECTORY|LINKER_LANGUAGE|LINK_(?:DEPENDS|DEPENDS_NO_SHARED|DIRECTORIES|FLAGS|INTERFACE_LIBRARIES|INTERFACE_MULTIPLICITY|LIBRARIES|OPTIONS|SEARCH_END_STATIC|SEARCH_START_STATIC|WHAT_YOU_USE)|LISTFILE_STACK|LOCATION|MACOSX_BUNDLE|MACOSX_BUNDLE_INFO_PLIST|MACOSX_FRAMEWORK_INFO_PLIST|MACOSX_PACKAGE_LOCATION|MACOSX_RPATH|MACROS|MANUALLY_ADDED_DEPENDENCIES|MEASUREMENT|MODIFIED|NAME|NO_SONAME|NO_SYSTEM_FROM_IMPORTED|OBJECT_DEPENDS|OBJECT_OUTPUTS|OSX_ARCHITECTURES|OUTPUT_NAME|PACKAGES_FOUND|PACKAGES_NOT_FOUND|PARENT_DIRECTORY|PASS_REGULAR_EXPRESSION|PDB_NAME|PDB_OUTPUT_DIRECTORY|POSITION_INDEPENDENT_CODE|POST_INSTALL_SCRIPT|PREDEFINED_TARGETS_FOLDER|PREFIX|PRE_INSTALL_SCRIPT|PRIVATE_HEADER|PROCESSORS|PROCESSOR_AFFINITY|PROJECT_LABEL|PUBLIC_HEADER|REPORT_UNDEFINED_PROPERTIES|REQUIRED_FILES|RESOURCE|RESOURCE_LOCK|RULE_LAUNCH_COMPILE|RULE_LAUNCH_CUSTOM|RULE_LAUNCH_LINK|RULE_MESSAGES|RUNTIME_OUTPUT_DIRECTORY|RUN_SERIAL|SKIP_AUTOGEN|SKIP_AUTOMOC|SKIP_AUTORCC|SKIP_AUTOUIC|SKIP_BUILD_RPATH|SKIP_RETURN_CODE|SOURCES|SOURCE_DIR|SOVERSION|STATIC_LIBRARY_FLAGS|STATIC_LIBRARY_OPTIONS|STRINGS|SUBDIRECTORIES|SUFFIX|SYMBOLIC|TARGET_ARCHIVES_MAY_BE_SHARED_LIBS|TARGET_MESSAGES|TARGET_SUPPORTS_SHARED_LIBS|TESTS|TEST_INCLUDE_FILE|TEST_INCLUDE_FILES|TIMEOUT|TIMEOUT_AFTER_MATCH|TYPE|USE_FOLDERS|VALUE|VARIABLES|VERSION|VISIBILITY_INLINES_HIDDEN|VS_(?:CONFIGURATION_TYPE|COPY_TO_OUT_DIR|DEBUGGER_(?:COMMAND|COMMAND_ARGUMENTS|ENVIRONMENT|WORKING_DIRECTORY)|DEPLOYMENT_CONTENT|DEPLOYMENT_LOCATION|DOTNET_REFERENCES|DOTNET_REFERENCES_COPY_LOCAL|INCLUDE_IN_VSIX|IOT_STARTUP_TASK|KEYWORD|RESOURCE_GENERATOR|SCC_AUXPATH|SCC_LOCALPATH|SCC_PROJECTNAME|SCC_PROVIDER|SDK_REFERENCES|SHADER_(?:DISABLE_OPTIMIZATIONS|ENABLE_DEBUG|ENTRYPOINT|FLAGS|MODEL|OBJECT_FILE_NAME|OUTPUT_HEADER_FILE|TYPE|VARIABLE_NAME)|STARTUP_PROJECT|TOOL_OVERRIDE|USER_PROPS|WINRT_COMPONENT|WINRT_EXTENSIONS|WINRT_REFERENCES|XAML_TYPE)|WILL_FAIL|WIN32_EXECUTABLE|WINDOWS_EXPORT_ALL_SYMBOLS|WORKING_DIRECTORY|WRAP_EXCLUDE|XCODE_(?:EMIT_EFFECTIVE_PLATFORM_NAME|EXPLICIT_FILE_TYPE|FILE_ATTRIBUTES|LAST_KNOWN_FILE_TYPE|PRODUCT_TYPE|SCHEME_(?:ADDRESS_SANITIZER|ADDRESS_SANITIZER_USE_AFTER_RETURN|ARGUMENTS|DISABLE_MAIN_THREAD_CHECKER|DYNAMIC_LIBRARY_LOADS|DYNAMIC_LINKER_API_USAGE|ENVIRONMENT|EXECUTABLE|GUARD_MALLOC|MAIN_THREAD_CHECKER_STOP|MALLOC_GUARD_EDGES|MALLOC_SCRIBBLE|MALLOC_STACK|THREAD_SANITIZER(?:_STOP)?|UNDEFINED_BEHAVIOUR_SANITIZER(?:_STOP)?|ZOMBIE_OBJECTS))|XCTEST)\b/,keyword:/\b(?:add_compile_definitions|add_compile_options|add_custom_command|add_custom_target|add_definitions|add_dependencies|add_executable|add_library|add_link_options|add_subdirectory|add_test|aux_source_directory|break|build_command|build_name|cmake_host_system_information|cmake_minimum_required|cmake_parse_arguments|cmake_policy|configure_file|continue|create_test_sourcelist|ctest_build|ctest_configure|ctest_coverage|ctest_empty_binary_directory|ctest_memcheck|ctest_read_custom_files|ctest_run_script|ctest_sleep|ctest_start|ctest_submit|ctest_test|ctest_update|ctest_upload|define_property|else|elseif|enable_language|enable_testing|endforeach|endfunction|endif|endmacro|endwhile|exec_program|execute_process|export|export_library_dependencies|file|find_file|find_library|find_package|find_path|find_program|fltk_wrap_ui|foreach|function|get_cmake_property|get_directory_property|get_filename_component|get_property|get_source_file_property|get_target_property|get_test_property|if|include|include_directories|include_external_msproject|include_guard|include_regular_expression|install|install_files|install_programs|install_targets|link_directories|link_libraries|list|load_cache|load_command|macro|make_directory|mark_as_advanced|math|message|option|output_required_files|project|qt_wrap_cpp|qt_wrap_ui|remove|remove_definitions|return|separate_arguments|set|set_directory_properties|set_property|set_source_files_properties|set_target_properties|set_tests_properties|site_name|source_group|string|subdir_depends|subdirs|target_compile_definitions|target_compile_features|target_compile_options|target_include_directories|target_link_directories|target_link_libraries|target_link_options|target_sources|try_compile|try_run|unset|use_mangled_mesa|utility_source|variable_requires|variable_watch|while|write_file)(?=\s*\()\b/,boolean:/\b(?:FALSE|OFF|ON|TRUE)\b/,namespace:/\b(?:INTERFACE|PRIVATE|PROPERTIES|PUBLIC|SHARED|STATIC|TARGET_OBJECTS)\b/,operator:/\b(?:AND|DEFINED|EQUAL|GREATER|LESS|MATCHES|NOT|OR|STREQUAL|STRGREATER|STRLESS|VERSION_EQUAL|VERSION_GREATER|VERSION_LESS)\b/,inserted:{pattern:/\b\w+::\w+\b/,alias:"class-name"},number:/\b\d+(?:\.\d+)*\b/,function:/\b[a-z_]\w*(?=\s*\()\b/i,punctuation:/[()>}]|\$[<{]/}}Ok.displayName="cobol";Ok.aliases=[];function Ok(t){t.languages.cobol={comment:{pattern:/\*>.*|(^[ \t]*)\*.*/m,lookbehind:!0,greedy:!0},string:{pattern:/[xzgn]?(?:"(?:[^\r\n"]|"")*"(?!")|'(?:[^\r\n']|'')*'(?!'))/i,greedy:!0},level:{pattern:/(^[ \t]*)\d+\b/m,lookbehind:!0,greedy:!0,alias:"number"},"class-name":{pattern:/(\bpic(?:ture)?\s+)(?:(?:[-\w$/,:*+<>]|\.(?!\s|$))(?:\(\d+\))?)+/i,lookbehind:!0,inside:{number:{pattern:/(\()\d+/,lookbehind:!0},punctuation:/[()]/}},keyword:{pattern:/(^|[^\w-])(?:ABORT|ACCEPT|ACCESS|ADD|ADDRESS|ADVANCING|AFTER|ALIGNED|ALL|ALPHABET|ALPHABETIC|ALPHABETIC-LOWER|ALPHABETIC-UPPER|ALPHANUMERIC|ALPHANUMERIC-EDITED|ALSO|ALTER|ALTERNATE|ANY|ARE|AREA|AREAS|AS|ASCENDING|ASCII|ASSIGN|ASSOCIATED-DATA|ASSOCIATED-DATA-LENGTH|AT|ATTRIBUTE|AUTHOR|AUTO|AUTO-SKIP|BACKGROUND-COLOR|BACKGROUND-COLOUR|BASIS|BEEP|BEFORE|BEGINNING|BELL|BINARY|BIT|BLANK|BLINK|BLOCK|BOTTOM|BOUNDS|BY|BYFUNCTION|BYTITLE|CALL|CANCEL|CAPABLE|CCSVERSION|CD|CF|CH|CHAINING|CHANGED|CHANNEL|CHARACTER|CHARACTERS|CLASS|CLASS-ID|CLOCK-UNITS|CLOSE|CLOSE-DISPOSITION|COBOL|CODE|CODE-SET|COL|COLLATING|COLUMN|COM-REG|COMMA|COMMITMENT|COMMON|COMMUNICATION|COMP|COMP-1|COMP-2|COMP-3|COMP-4|COMP-5|COMPUTATIONAL|COMPUTATIONAL-1|COMPUTATIONAL-2|COMPUTATIONAL-3|COMPUTATIONAL-4|COMPUTATIONAL-5|COMPUTE|CONFIGURATION|CONTAINS|CONTENT|CONTINUE|CONTROL|CONTROL-POINT|CONTROLS|CONVENTION|CONVERTING|COPY|CORR|CORRESPONDING|COUNT|CRUNCH|CURRENCY|CURSOR|DATA|DATA-BASE|DATE|DATE-COMPILED|DATE-WRITTEN|DAY|DAY-OF-WEEK|DBCS|DE|DEBUG-CONTENTS|DEBUG-ITEM|DEBUG-LINE|DEBUG-NAME|DEBUG-SUB-1|DEBUG-SUB-2|DEBUG-SUB-3|DEBUGGING|DECIMAL-POINT|DECLARATIVES|DEFAULT|DEFAULT-DISPLAY|DEFINITION|DELETE|DELIMITED|DELIMITER|DEPENDING|DESCENDING|DESTINATION|DETAIL|DFHRESP|DFHVALUE|DISABLE|DISK|DISPLAY|DISPLAY-1|DIVIDE|DIVISION|DONTCARE|DOUBLE|DOWN|DUPLICATES|DYNAMIC|EBCDIC|EGCS|EGI|ELSE|EMI|EMPTY-CHECK|ENABLE|END|END-ACCEPT|END-ADD|END-CALL|END-COMPUTE|END-DELETE|END-DIVIDE|END-EVALUATE|END-IF|END-MULTIPLY|END-OF-PAGE|END-PERFORM|END-READ|END-RECEIVE|END-RETURN|END-REWRITE|END-SEARCH|END-START|END-STRING|END-SUBTRACT|END-UNSTRING|END-WRITE|ENDING|ENTER|ENTRY|ENTRY-PROCEDURE|ENVIRONMENT|EOL|EOP|EOS|ERASE|ERROR|ESCAPE|ESI|EVALUATE|EVENT|EVERY|EXCEPTION|EXCLUSIVE|EXHIBIT|EXIT|EXPORT|EXTEND|EXTENDED|EXTERNAL|FD|FILE|FILE-CONTROL|FILLER|FINAL|FIRST|FOOTING|FOR|FOREGROUND-COLOR|FOREGROUND-COLOUR|FROM|FULL|FUNCTION|FUNCTION-POINTER|FUNCTIONNAME|GENERATE|GIVING|GLOBAL|GO|GOBACK|GRID|GROUP|HEADING|HIGH-VALUE|HIGH-VALUES|HIGHLIGHT|I-O|I-O-CONTROL|ID|IDENTIFICATION|IF|IMPLICIT|IMPORT|IN|INDEX|INDEXED|INDICATE|INITIAL|INITIALIZE|INITIATE|INPUT|INPUT-OUTPUT|INSPECT|INSTALLATION|INTEGER|INTO|INVALID|INVOKE|IS|JUST|JUSTIFIED|KANJI|KEPT|KEY|KEYBOARD|LABEL|LANGUAGE|LAST|LB|LD|LEADING|LEFT|LEFTLINE|LENGTH|LENGTH-CHECK|LIBACCESS|LIBPARAMETER|LIBRARY|LIMIT|LIMITS|LINAGE|LINAGE-COUNTER|LINE|LINE-COUNTER|LINES|LINKAGE|LIST|LOCAL|LOCAL-STORAGE|LOCK|LONG-DATE|LONG-TIME|LOW-VALUE|LOW-VALUES|LOWER|LOWLIGHT|MEMORY|MERGE|MESSAGE|MMDDYYYY|MODE|MODULES|MORE-LABELS|MOVE|MULTIPLE|MULTIPLY|NAMED|NATIONAL|NATIONAL-EDITED|NATIVE|NEGATIVE|NETWORK|NEXT|NO|NO-ECHO|NULL|NULLS|NUMBER|NUMERIC|NUMERIC-DATE|NUMERIC-EDITED|NUMERIC-TIME|OBJECT-COMPUTER|OCCURS|ODT|OF|OFF|OMITTED|ON|OPEN|OPTIONAL|ORDER|ORDERLY|ORGANIZATION|OTHER|OUTPUT|OVERFLOW|OVERLINE|OWN|PACKED-DECIMAL|PADDING|PAGE|PAGE-COUNTER|PASSWORD|PERFORM|PF|PH|PIC|PICTURE|PLUS|POINTER|PORT|POSITION|POSITIVE|PRINTER|PRINTING|PRIVATE|PROCEDURE|PROCEDURE-POINTER|PROCEDURES|PROCEED|PROCESS|PROGRAM|PROGRAM-ID|PROGRAM-LIBRARY|PROMPT|PURGE|QUEUE|QUOTE|QUOTES|RANDOM|RD|READ|READER|REAL|RECEIVE|RECEIVED|RECORD|RECORDING|RECORDS|RECURSIVE|REDEFINES|REEL|REF|REFERENCE|REFERENCES|RELATIVE|RELEASE|REMAINDER|REMARKS|REMOTE|REMOVAL|REMOVE|RENAMES|REPLACE|REPLACING|REPORT|REPORTING|REPORTS|REQUIRED|RERUN|RESERVE|RESET|RETURN|RETURN-CODE|RETURNING|REVERSE-VIDEO|REVERSED|REWIND|REWRITE|RF|RH|RIGHT|ROUNDED|RUN|SAME|SAVE|SCREEN|SD|SEARCH|SECTION|SECURE|SECURITY|SEGMENT|SEGMENT-LIMIT|SELECT|SEND|SENTENCE|SEPARATE|SEQUENCE|SEQUENTIAL|SET|SHARED|SHAREDBYALL|SHAREDBYRUNUNIT|SHARING|SHIFT-IN|SHIFT-OUT|SHORT-DATE|SIGN|SIZE|SORT|SORT-CONTROL|SORT-CORE-SIZE|SORT-FILE-SIZE|SORT-MERGE|SORT-MESSAGE|SORT-MODE-SIZE|SORT-RETURN|SOURCE|SOURCE-COMPUTER|SPACE|SPACES|SPECIAL-NAMES|STANDARD|STANDARD-1|STANDARD-2|START|STATUS|STOP|STRING|SUB-QUEUE-1|SUB-QUEUE-2|SUB-QUEUE-3|SUBTRACT|SUM|SUPPRESS|SYMBOL|SYMBOLIC|SYNC|SYNCHRONIZED|TABLE|TALLY|TALLYING|TAPE|TASK|TERMINAL|TERMINATE|TEST|TEXT|THEN|THREAD|THREAD-LOCAL|THROUGH|THRU|TIME|TIMER|TIMES|TITLE|TO|TODAYS-DATE|TODAYS-NAME|TOP|TRAILING|TRUNCATED|TYPE|TYPEDEF|UNDERLINE|UNIT|UNSTRING|UNTIL|UP|UPON|USAGE|USE|USING|VALUE|VALUES|VARYING|VIRTUAL|WAIT|WHEN|WHEN-COMPILED|WITH|WORDS|WORKING-STORAGE|WRITE|YEAR|YYYYDDD|YYYYMMDD|ZERO-FILL|ZEROES|ZEROS)(?![\w-])/i,lookbehind:!0},boolean:{pattern:/(^|[^\w-])(?:false|true)(?![\w-])/i,lookbehind:!0},number:{pattern:/(^|[^\w-])(?:[+-]?(?:(?:\d+(?:[.,]\d+)?|[.,]\d+)(?:e[+-]?\d+)?|zero))(?![\w-])/i,lookbehind:!0},operator:[/<>|[<>]=?|[=+*/&]/,{pattern:/(^|[^\w-])(?:-|and|equal|greater|less|not|or|than)(?![\w-])/i,lookbehind:!0}],punctuation:/[.:,()]/}}Ik.displayName="coffeescript";Ik.aliases=["coffee"];function Ik(t){t.register(aa),function(e){var n=/#(?!\{).+/,r={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:n,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:r}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:n,interpolation:r}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:r}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(t)}Lk.displayName="cpp";Lk.aliases=[];function Lk(t){t.register(lf),function(e){var n=/\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/,r=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,function(){return n.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,function(){return n.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:n,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,function(){return r})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(t)}Nk.displayName="csharp";Nk.aliases=["cs","dotnet"];function Nk(t){t.register(fr),function(e){function n(D,F){return D.replace(/<<(\d+)>>/g,function(U,W){return"(?:"+F[+W]+")"})}function r(D,F,U){return RegExp(n(D,F),U||"")}function o(D,F){for(var U=0;U>/g,function(){return"(?:"+D+")"});return D.replace(/<>/g,"[^\\s\\S]")}var i={type:"bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",typeDeclaration:"class enum interface record struct",contextual:"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*{)",other:"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 s(D){return"\\b(?:"+D.trim().replace(/ /g,"|")+")\\b"}var l=s(i.typeDeclaration),a=RegExp(s(i.type+" "+i.typeDeclaration+" "+i.contextual+" "+i.other)),u=s(i.typeDeclaration+" "+i.contextual+" "+i.other),c=s(i.type+" "+i.typeDeclaration+" "+i.other),d=o(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),h=o(/\((?:[^()]|<>)*\)/.source,2),f=/@?\b[A-Za-z_]\w*\b/.source,p=n(/<<0>>(?:\s*<<1>>)?/.source,[f,d]),g=n(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[u,p]),m=/\[\s*(?:,\s*)*\]/.source,v=n(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[g,m]),y=n(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[d,h,m]),b=n(/\(<<0>>+(?:,<<0>>+)+\)/.source,[y]),w=n(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[b,g,m]),k={keyword:a,punctuation:/[<>()?,.:[\]]/},x=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,S=/"(?:\\.|[^\\"\r\n])*"/.source,T=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:r(/(^|[^$\\])<<0>>/.source,[T]),lookbehind:!0,greedy:!0},{pattern:r(/(^|[^@$\\])<<0>>/.source,[S]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:r(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[g]),lookbehind:!0,inside:k},{pattern:r(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[f,w]),lookbehind:!0,inside:k},{pattern:r(/(\busing\s+)<<0>>(?=\s*=)/.source,[f]),lookbehind:!0},{pattern:r(/(\b<<0>>\s+)<<1>>/.source,[l,p]),lookbehind:!0,inside:k},{pattern:r(/(\bcatch\s*\(\s*)<<0>>/.source,[g]),lookbehind:!0,inside:k},{pattern:r(/(\bwhere\s+)<<0>>/.source,[f]),lookbehind:!0},{pattern:r(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[v]),lookbehind:!0,inside:k},{pattern:r(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[w,c,f]),inside:k}],keyword:a,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:r(/([(,]\s*)<<0>>(?=\s*:)/.source,[f]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:r(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[f]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:r(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[h]),lookbehind:!0,alias:"class-name",inside:k},"return-type":{pattern:r(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[w,g]),inside:k,alias:"class-name"},"constructor-invocation":{pattern:r(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[w]),lookbehind:!0,inside:k,alias:"class-name"},"generic-method":{pattern:r(/<<0>>\s*<<1>>(?=\s*\()/.source,[f,d]),inside:{function:r(/^<<0>>/.source,[f]),generic:{pattern:RegExp(d),alias:"class-name",inside:k}}},"type-list":{pattern:r(/\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,[l,p,f,w,a.source,h,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:r(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[p,h]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:a,"class-name":{pattern:RegExp(w),greedy:!0,inside:k},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+"|"+x,O=n(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[C]),_=o(n(/[^"'/()]|<<0>>|\(<>*\)/.source,[O]),2),R=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,A=n(/<<0>>(?:\s*\(<<1>>*\))?/.source,[g,_]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:r(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[R,A]),lookbehind:!0,greedy:!0,inside:{target:{pattern:r(/^<<0>>(?=\s*:)/.source,[R]),alias:"keyword"},"attribute-arguments":{pattern:r(/\(<<0>>*\)/.source,[_]),inside:e.languages.csharp},"class-name":{pattern:RegExp(g),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var E=/:[^}\r\n]+/.source,M=o(n(/[^"'/()]|<<0>>|\(<>*\)/.source,[O]),2),I=n(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[M,E]),N=o(n(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[C]),2),L=n(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[N,E]);function $(D,F){return{interpolation:{pattern:r(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[D]),lookbehind:!0,inside:{"format-string":{pattern:r(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[F,E]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:r(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[I]),lookbehind:!0,greedy:!0,inside:$(I,M)},{pattern:r(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[L]),lookbehind:!0,greedy:!0,inside:$(L,N)}],char:{pattern:RegExp(x),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(t)}cf.displayName="css";cf.aliases=[];function cf(t){(function(e){var n=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+n.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+n.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:n,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var r=e.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(t)}$k.displayName="csv";$k.aliases=[];function $k(t){t.languages.csv={value:/[^\r\n,"]+|"(?:[^"]|"")*"(?!")/,punctuation:/,/}}Dk.displayName="d";Dk.aliases=[];function Dk(t){t.register(fr),t.languages.d=t.languages.extend("clike",{comment:[{pattern:/^\s*#!.+/,greedy:!0},{pattern:RegExp(/(^|[^\\])/.source+"(?:"+[/\/\+(?:\/\+(?:[^+]|\+(?!\/))*\+\/|(?!\/\+)[\s\S])*?\+\//.source,/\/\/.*/.source,/\/\*[\s\S]*?\*\//.source].join("|")+")"),lookbehind:!0,greedy:!0}],string:[{pattern:RegExp([/\b[rx]"(?:\\[\s\S]|[^\\"])*"[cwd]?/.source,/\bq"(?:\[[\s\S]*?\]|\([\s\S]*?\)|<[\s\S]*?>|\{[\s\S]*?\})"/.source,/\bq"((?!\d)\w+)$[\s\S]*?^\1"/.source,/\bq"(.)[\s\S]*?\2"/.source,/(["`])(?:\\[\s\S]|(?!\3)[^\\])*\3[cwd]?/.source].join("|"),"m"),greedy:!0},{pattern:/\bq\{(?:\{[^{}]*\}|[^{}])*\}/,greedy:!0,alias:"token-string"}],keyword:/\$|\b(?:__(?:(?:DATE|EOF|FILE|FUNCTION|LINE|MODULE|PRETTY_FUNCTION|TIMESTAMP|TIME|VENDOR|VERSION)__|gshared|parameters|traits|vector)|abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|dstring|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|inout|int|interface|invariant|ireal|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|ptrdiff_t|public|pure|real|ref|return|scope|shared|short|size_t|static|string|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|wstring)\b/,number:[/\b0x\.?[a-f\d_]+(?:(?!\.\.)\.[a-f\d_]*)?(?:p[+-]?[a-f\d_]+)?[ulfi]{0,4}/i,{pattern:/((?:\.\.)?)(?:\b0b\.?|\b|\.)\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:e[+-]?\d[\d_]*)?[ulfi]{0,4}/i,lookbehind:!0}],operator:/\|[|=]?|&[&=]?|\+[+=]?|-[-=]?|\.?\.\.|=[>=]?|!(?:i[ns]\b|<>?=?|>=?|=)?|\bi[ns]\b|(?:<[<>]?|>>?>?|\^\^|[*\/%^~])=?/}),t.languages.insertBefore("d","string",{char:/'(?:\\(?:\W|\w+)|[^\\])'/}),t.languages.insertBefore("d","keyword",{property:/\B@\w*/}),t.languages.insertBefore("d","function",{register:{pattern:/\b(?:[ABCD][LHX]|E?(?:BP|DI|SI|SP)|[BS]PL|[ECSDGF]S|CR[0234]|[DS]IL|DR[012367]|E[ABCD]X|X?MM[0-7]|R(?:1[0-5]|[89])[BWD]?|R[ABCD]X|R[BS]P|R[DS]I|TR[3-7]|XMM(?:1[0-5]|[89])|YMM(?:1[0-5]|\d))\b|\bST(?:\([0-7]\)|\b)/,alias:"variable"}})}Pk.displayName="dart";Pk.aliases=[];function Pk(t){t.register(fr),function(e){var n=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],r=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,o={pattern:RegExp(r+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};e.languages.dart=e.languages.extend("clike",{"class-name":[o,{pattern:RegExp(r+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:o.inside}],keyword:n,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),e.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.dart}}},string:/[\s\S]+/}},string:void 0}),e.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),e.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":o,keyword:n,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(t)}vu.displayName="markup";vu.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function vu(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"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},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(e){e.type==="entity"&&(e.attributes.title=e.content.value.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(n,r){var o={};o["language-"+r]={pattern:/(^$)/i,lookbehind:!0,inside:t.languages[r]},o.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:o}};i["language-"+r]={pattern:/[\s\S]+/,inside:t.languages[r]};var s={};s[n]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:i},t.languages.insertBefore("markup","cdata",s)}}),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}El.displayName="markup-templating";El.aliases=[];function El(t){t.register(vu),function(e){function n(r,o){return"___"+r.toUpperCase()+o+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(r,o,i,s){if(r.language===o){var l=r.tokenStack=[];r.code=r.code.replace(i,function(a){if(typeof s=="function"&&!s(a))return a;for(var u=l.length,c;r.code.indexOf(c=n(o,u))!==-1;)++u;return l[u]=a,c}),r.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(r,o){if(r.language!==o||!r.tokenStack)return;r.grammar=e.languages[o];var i=0,s=Object.keys(r.tokenStack);function l(a){for(var u=0;u=s.length);u++){var c=a[u];if(typeof c=="string"||c.content&&typeof c.content=="string"){var d=s[i],h=r.tokenStack[d],f=typeof c=="string"?c:c.content,p=n(o,d),g=f.indexOf(p);if(g>-1){++i;var m=f.substring(0,g),v=new e.Token(o,e.tokenize(h,r.grammar),"language-"+o,h),y=f.substring(g+p.length),b=[];m&&b.push.apply(b,l([m])),b.push(v),y&&b.push.apply(b,l([y])),typeof c=="string"?a.splice.apply(a,[u,1].concat(b)):c.content=b}}else c.content&&l(c.content)}return a}l(r.tokens)}}})}(t)}zk.displayName="django";zk.aliases=["jinja2"];function zk(t){t.register(El),function(e){e.languages.django={comment:/^\{#[\s\S]*?#\}$/,tag:{pattern:/(^\{%[+-]?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%][+-]?|[+-]?[}%]\}$/,alias:"punctuation"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},filter:{pattern:/(\|)\w+/,lookbehind:!0,alias:"function"},test:{pattern:/(\bis\s+(?:not\s+)?)(?!not\b)\w+/,lookbehind:!0,alias:"function"},function:/\b[a-z_]\w+(?=\s*\()/i,keyword:/\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,number:/\b\d+(?:\.\d+)?\b/,boolean:/[Ff]alse|[Nn]one|[Tt]rue/,variable:/\b\w+\b/,punctuation:/[{}[\](),.:;]/};var n=/\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\}/g,r=e.languages["markup-templating"];e.hooks.add("before-tokenize",function(o){r.buildPlaceholders(o,"django",n)}),e.hooks.add("after-tokenize",function(o){r.tokenizePlaceholders(o,"django")}),e.languages.jinja2=e.languages.django,e.hooks.add("before-tokenize",function(o){r.buildPlaceholders(o,"jinja2",n)}),e.hooks.add("after-tokenize",function(o){r.tokenizePlaceholders(o,"jinja2")})}(t)}Fk.displayName="docker";Fk.aliases=["dockerfile"];function Fk(t){(function(e){var n=/\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source,r=/(?:[ \t]+(?![ \t])(?:)?|)/.source.replace(//g,function(){return n}),o=/"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"|'(?:[^'\\\r\n]|\\(?:\r\n|[\s\S]))*'/.source,i=/--[\w-]+=(?:|(?!["'])(?:[^\s\\]|\\.)+)/.source.replace(//g,function(){return o}),s={pattern:RegExp(o),greedy:!0},l={pattern:/(^[ \t]*)#.*/m,lookbehind:!0,greedy:!0};function a(u,c){return u=u.replace(//g,function(){return i}).replace(//g,function(){return r}),RegExp(u,c)}e.languages.docker={instruction:{pattern:/(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,lookbehind:!0,greedy:!0,inside:{options:{pattern:a(/(^(?:ONBUILD)?\w+)(?:)*/.source,"i"),lookbehind:!0,greedy:!0,inside:{property:{pattern:/(^|\s)--[\w-]+/,lookbehind:!0},string:[s,{pattern:/(=)(?!["'])(?:[^\s\\]|\\.)+/,lookbehind:!0}],operator:/\\$/m,punctuation:/=/}},keyword:[{pattern:a(/(^(?:ONBUILD)?HEALTHCHECK(?:)*)(?:CMD|NONE)\b/.source,"i"),lookbehind:!0,greedy:!0},{pattern:a(/(^(?:ONBUILD)?FROM(?:)*(?!--)[^ \t\\]+)AS/.source,"i"),lookbehind:!0,greedy:!0},{pattern:a(/(^ONBUILD)\w+/.source,"i"),lookbehind:!0,greedy:!0},{pattern:/^\w+/,greedy:!0}],comment:l,string:s,variable:/\$(?:\w+|\{[^{}"'\\]*\})/,operator:/\\$/m}},comment:l},e.languages.dockerfile=e.languages.docker})(t)}Bk.displayName="eiffel";Bk.aliases=[];function Bk(t){t.languages.eiffel={comment:/--.*/,string:[{pattern:/"([^[]*)\[[\s\S]*?\]\1"/,greedy:!0},{pattern:/"([^{]*)\{[\s\S]*?\}\1"/,greedy:!0},{pattern:/"(?:%(?:(?!\n)\s)*\n\s*%|%\S|[^%"\r\n])*"/,greedy:!0}],char:/'(?:%.|[^%'\r\n])+'/,keyword:/\b(?:across|agent|alias|all|and|as|assign|attached|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,boolean:/\b(?:False|True)\b/i,"class-name":/\b[A-Z][\dA-Z_]*\b/,number:[/\b0[xcb][\da-f](?:_*[\da-f])*\b/i,/(?:\b\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*\b|\b\d(?:_*\d)*\b\.?/i],punctuation:/:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,operator:/\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/}}Hk.displayName="ejs";Hk.aliases=["eta"];function Hk(t){t.register(aa),t.register(El),function(e){e.languages.ejs={delimiter:{pattern:/^<%[-_=]?|[-_]?%>$/,alias:"punctuation"},comment:/^#[\s\S]*/,"language-javascript":{pattern:/[\s\S]+/,inside:e.languages.javascript}},e.hooks.add("before-tokenize",function(n){var r=/<%(?!%)[\s\S]+?%>/g;e.languages["markup-templating"].buildPlaceholders(n,"ejs",r)}),e.hooks.add("after-tokenize",function(n){e.languages["markup-templating"].tokenizePlaceholders(n,"ejs")}),e.languages.eta=e.languages.ejs}(t)}Uk.displayName="elixir";Uk.aliases=[];function Uk(t){t.languages.elixir={doc:{pattern:/@(?:doc|moduledoc)\s+(?:("""|''')[\s\S]*?\1|("|')(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2)/,inside:{attribute:/^@\w+/,string:/['"][\s\S]+/}},comment:{pattern:/#.*/,greedy:!0},regex:{pattern:/~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,greedy:!0},string:[{pattern:/~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|#(?!\{)|[^#\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,greedy:!0,inside:{}},{pattern:/("""|''')[\s\S]*?\1/,greedy:!0,inside:{}},{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{}}],atom:{pattern:/(^|[^:]):\w+/,lookbehind:!0,alias:"symbol"},module:{pattern:/\b[A-Z]\w*\b/,alias:"class-name"},"attr-name":/\b\w+\??:(?!:)/,argument:{pattern:/(^|[^&])&\d+/,lookbehind:!0,alias:"variable"},attribute:{pattern:/@\w+/,alias:"variable"},function:/\b[_a-zA-Z]\w*[?!]?(?:(?=\s*(?:\.\s*)?\()|(?=\/\d))/,number:/\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,keyword:/\b(?:after|alias|and|case|catch|cond|def(?:callback|delegate|exception|impl|macro|module|n|np|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|quote|raise|require|rescue|try|unless|unquote|use|when)\b/,boolean:/\b(?:false|nil|true)\b/,operator:[/\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,{pattern:/([^<])<(?!<)/,lookbehind:!0},{pattern:/([^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,%\[\]{}()]/},t.languages.elixir.string.forEach(function(e){e.inside={interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:t.languages.elixir}}}})}Wk.displayName="elm";Wk.aliases=[];function Wk(t){t.languages.elm={comment:/--.*|\{-[\s\S]*?-\}/,char:{pattern:/'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+|u\{[0-9a-fA-F]+\}))'/,greedy:!0},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:[^\\"\r\n]|\\.)*"/,greedy:!0}],"import-statement":{pattern:/(^[\t ]*)import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m,lookbehind:!0,inside:{keyword:/\b(?:as|exposing|import)\b/}},keyword:/\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/,builtin:/\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i,operator:/\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/,hvariable:/\b(?:[A-Z]\w*\.)*[a-z]\w*\b/,constant:/\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/,punctuation:/[{}[\]|(),.:]/}}Vk.displayName="erlang";Vk.aliases=[];function Vk(t){t.languages.erlang={comment:/%.+/,string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},"quoted-function":{pattern:/'(?:\\.|[^\\'\r\n])+'(?=\()/,alias:"function"},"quoted-atom":{pattern:/'(?:\\.|[^\\'\r\n])+'/,alias:"atom"},boolean:/\b(?:false|true)\b/,keyword:/\b(?:after|begin|case|catch|end|fun|if|of|receive|try|when)\b/,number:[/\$\\?./,/\b\d+#[a-z0-9]+/i,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i],function:/\b[a-z][\w@]*(?=\()/,variable:{pattern:/(^|[^@])(?:\b|\?)[A-Z_][\w@]*/,lookbehind:!0},operator:[/[=\/<>:]=|=[:\/]=|\+\+?|--?|[=*\/!]|\b(?:and|andalso|band|bnot|bor|bsl|bsr|bxor|div|not|or|orelse|rem|xor)\b/,{pattern:/(^|[^<])<(?!<)/,lookbehind:!0},{pattern:/(^|[^>])>(?!>)/,lookbehind:!0}],atom:/\b[a-z][\w@]*/,punctuation:/[()[\]{}:;,.#|]|<<|>>/}}jk.displayName="fortran";jk.aliases=[];function jk(t){t.languages.fortran={"quoted-number":{pattern:/[BOZ](['"])[A-F0-9]+\1/i,alias:"number"},string:{pattern:/(?:\b\w+_)?(['"])(?:\1\1|&(?:\r\n?|\n)(?:[ \t]*!.*(?:\r\n?|\n)|(?![ \t]*!))|(?!\1).)*(?:\1|&)/,inside:{comment:{pattern:/(&(?:\r\n?|\n)\s*)!.*/,lookbehind:!0}}},comment:{pattern:/!.*/,greedy:!0},boolean:/\.(?:FALSE|TRUE)\.(?:_\w+)?/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[ED][+-]?\d+)?(?:_\w+)?/i,keyword:[/\b(?:CHARACTER|COMPLEX|DOUBLE ?PRECISION|INTEGER|LOGICAL|REAL)\b/i,/\b(?:END ?)?(?:BLOCK ?DATA|DO|FILE|FORALL|FUNCTION|IF|INTERFACE|MODULE(?! PROCEDURE)|PROGRAM|SELECT|SUBROUTINE|TYPE|WHERE)\b/i,/\b(?:ALLOCATABLE|ALLOCATE|BACKSPACE|CALL|CASE|CLOSE|COMMON|CONTAINS|CONTINUE|CYCLE|DATA|DEALLOCATE|DIMENSION|DO|END|EQUIVALENCE|EXIT|EXTERNAL|FORMAT|GO ?TO|IMPLICIT(?: NONE)?|INQUIRE|INTENT|INTRINSIC|MODULE PROCEDURE|NAMELIST|NULLIFY|OPEN|OPTIONAL|PARAMETER|POINTER|PRINT|PRIVATE|PUBLIC|READ|RETURN|REWIND|SAVE|SELECT|STOP|TARGET|WHILE|WRITE)\b/i,/\b(?:ASSIGNMENT|DEFAULT|ELEMENTAL|ELSE|ELSEIF|ELSEWHERE|ENTRY|IN|INCLUDE|INOUT|KIND|NULL|ONLY|OPERATOR|OUT|PURE|RECURSIVE|RESULT|SEQUENCE|STAT|THEN|USE)\b/i],operator:[/\*\*|\/\/|=>|[=\/]=|[<>]=?|::|[+\-*=%]|\.[A-Z]+\./i,{pattern:/(^|(?!\().)\/(?!\))/,lookbehind:!0}],punctuation:/\(\/|\/\)|[(),;:&]/}}Gk.displayName="fsharp";Gk.aliases=[];function Gk(t){t.register(fr),t.languages.fsharp=t.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\(\*(?!\))[\s\S]*?\*\)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?/,greedy:!0},"class-name":{pattern:/(\b(?:exception|inherit|interface|new|of|type)\s+|\w\s*:\s*|\s:\??>\s*)[.\w]+\b(?:\s*(?:->|\*)\s*[.\w]+\b)*(?!\s*[:.])/,lookbehind:!0,inside:{operator:/->|\*/,punctuation:/\./}},keyword:/\b(?:let|return|use|yield)(?:!\B|\b)|\b(?:abstract|and|as|asr|assert|atomic|base|begin|break|checked|class|component|const|constraint|constructor|continue|default|delegate|do|done|downcast|downto|eager|elif|else|end|event|exception|extern|external|false|finally|fixed|for|fun|function|functor|global|if|in|include|inherit|inline|interface|internal|land|lazy|lor|lsl|lsr|lxor|match|member|method|mixin|mod|module|mutable|namespace|new|not|null|object|of|open|or|override|parallel|private|process|protected|public|pure|rec|sealed|select|sig|static|struct|tailcall|then|to|trait|true|try|type|upcast|val|virtual|void|volatile|when|while|with)\b/,number:[/\b0x[\da-fA-F]+(?:LF|lf|un)?\b/,/\b0b[01]+(?:uy|y)?\b/,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i,/\b\d+(?:[IlLsy]|UL|u[lsy]?)?\b/],operator:/([<>~&^])\1\1|([*.:<>&])\2|<-|->|[!=:]=|?|\??(?:<=|>=|<>|[-+*/%=<>])\??|[!?^&]|~[+~-]|:>|:\?>?/}),t.languages.insertBefore("fsharp","keyword",{preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(^#)\b(?:else|endif|if|light|line|nowarn)\b/,lookbehind:!0,alias:"keyword"}}}}),t.languages.insertBefore("fsharp","punctuation",{"computation-expression":{pattern:/\b[_a-z]\w*(?=\s*\{)/i,alias:"keyword"}}),t.languages.insertBefore("fsharp","string",{annotation:{pattern:/\[<.+?>\]/,greedy:!0,inside:{punctuation:/^\[<|>\]$/,"class-name":{pattern:/^\w+$|(^|;\s*)[A-Z]\w*(?=\()/,lookbehind:!0},"annotation-content":{pattern:/[\s\S]+/,inside:t.languages.fsharp}}},char:{pattern:/'(?:[^\\']|\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8}))'B?/,greedy:!0}})}Kk.displayName="git";Kk.aliases=[];function Kk(t){t.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m}}Yk.displayName="go";Yk.aliases=[];function Yk(t){t.register(fr),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"]}Xk.displayName="gradle";Xk.aliases=[];function Xk(t){t.register(fr),function(e){var n={pattern:/((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}};e.languages.gradle=e.languages.extend("clike",{string:{pattern:/'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,greedy:!0},keyword:/\b(?:apply|def|dependencies|else|if|implementation|import|plugin|plugins|project|repositories|repository|sourceSets|tasks|val)\b/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),e.languages.insertBefore("gradle","string",{shebang:{pattern:/#!.+/,alias:"comment",greedy:!0},"interpolation-string":{pattern:/"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}}}),e.languages.insertBefore("gradle","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),e.languages.insertBefore("gradle","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),n.inside.expression.inside=e.languages.gradle}(t)}qk.displayName="graphql";qk.aliases=[];function qk(t){t.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:t.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},t.hooks.add("after-tokenize",function(n){if(n.language!=="graphql")return;var r=n.tokens.filter(function(m){return typeof m!="string"&&m.type!=="comment"&&m.type!=="scalar"}),o=0;function i(m){return r[o+m]}function s(m,v){v=v||0;for(var y=0;y0)){var f=l(/^\{$/,/^\}$/);if(f===-1)continue;for(var p=o;p=0&&a(g,"variable-input")}}}}})}Zk.displayName="groovy";Zk.aliases=[];function Zk(t){t.register(fr),function(e){var n={pattern:/((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}};e.languages.groovy=e.languages.extend("clike",{string:{pattern:/'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,greedy:!0},keyword:/\b(?:abstract|as|assert|boolean|break|byte|case|catch|char|class|const|continue|def|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|in|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),e.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment",greedy:!0},"interpolation-string":{pattern:/"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}}}),e.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),e.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),n.inside.expression.inside=e.languages.groovy}(t)}Qk.displayName="handlebars";Qk.aliases=["hbs","mustache"];function Qk(t){t.register(El),function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",function(n){var r=/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g;e.languages["markup-templating"].buildPlaceholders(n,"handlebars",r)}),e.hooks.add("after-tokenize",function(n){e.languages["markup-templating"].tokenizePlaceholders(n,"handlebars")}),e.languages.hbs=e.languages.handlebars,e.languages.mustache=e.languages.handlebars}(t)}Jk.displayName="ignore";Jk.aliases=["gitignore","hgignore","npmignore"];function Jk(t){(function(e){e.languages.ignore={comment:/^#.*/m,entry:{pattern:/\S(?:.*(?:(?:\\ )|\S))?/,alias:"string",inside:{operator:/^!|\*\*?|\?/,regex:{pattern:/(^|[^\\])\[[^\[\]]*\]/,lookbehind:!0},punctuation:/\//}}},e.languages.gitignore=e.languages.ignore,e.languages.hgignore=e.languages.ignore,e.languages.npmignore=e.languages.ignore})(t)}Av.displayName="java";Av.aliases=[];function Av(t){t.register(fr),function(e){var n=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,r=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,o={pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[o,{pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:o.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+r+/[A-Z]\w*\b/.source),lookbehind:!0,inside:o.inside}],keyword:n,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":o,keyword:n,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+r+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:o.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+r+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:o.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,function(){return n.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(t)}eE.displayName="json";eE.aliases=["webmanifest"];function eE(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}tE.displayName="jsx";tE.aliases=[];function tE(t){t.register(aa),t.register(vu),function(e){var n=e.util.clone(e.languages.javascript),r=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,o=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,i=/(?:\{*\.{3}(?:[^{}]|)*\})/.source;function s(u,c){return u=u.replace(//g,function(){return r}).replace(//g,function(){return o}).replace(//g,function(){return i}),RegExp(u,c)}i=s(i).source,e.languages.jsx=e.languages.extend("markup",n),e.languages.jsx.tag.pattern=s(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=n.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:s(//.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:s(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var l=function(u){return u?typeof u=="string"?u:typeof u.content=="string"?u.content:u.content.map(l).join(""):""},a=function(u){for(var c=[],d=0;d0&&c[c.length-1].tagName===l(h.content[0].content[1])&&c.pop():h.content[h.content.length-1].content==="/>"||c.push({tagName:l(h.content[0].content[1]),openedBraces:0}):c.length>0&&h.type==="punctuation"&&h.content==="{"?c[c.length-1].openedBraces++:c.length>0&&c[c.length-1].openedBraces>0&&h.type==="punctuation"&&h.content==="}"?c[c.length-1].openedBraces--:f=!0),(f||typeof h=="string")&&c.length>0&&c[c.length-1].openedBraces===0){var p=l(h);d0&&(typeof u[d-1]=="string"||u[d-1].type==="plain-text")&&(p=l(u[d-1])+p,u.splice(d-1,1),d--),u[d]=new e.Token("plain-text",p,null,p)}h.content&&typeof h.content!="string"&&a(h.content)}};e.hooks.add("after-tokenize",function(u){u.language!=="jsx"&&u.language!=="tsx"||a(u.tokens)})}(t)}nE.displayName="kotlin";nE.aliases=["kt","kts"];function nE(t){t.register(fr),function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var n={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:n},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:n},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(t)}rE.displayName="latex";rE.aliases=["context","tex"];function rE(t){(function(e){var n=/\\(?:[^a-z()[\]]|[a-z*]+)/i,r={"equation-command":{pattern:n,alias:"regex"}};e.languages.latex={comment:/%.*/,cdata:{pattern:/(\\begin\{((?:lstlisting|verbatim)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0},equation:[{pattern:/\$\$(?:\\[\s\S]|[^\\$])+\$\$|\$(?:\\[\s\S]|[^\\$])+\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/,inside:r,alias:"string"},{pattern:/(\\begin\{((?:align|eqnarray|equation|gather|math|multline)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0,inside:r,alias:"string"}],keyword:{pattern:/(\\(?:begin|cite|documentclass|end|label|ref|usepackage)(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0},url:{pattern:/(\\url\{)[^}]+(?=\})/,lookbehind:!0},headline:{pattern:/(\\(?:chapter|frametitle|paragraph|part|section|subparagraph|subsection|subsubparagraph|subsubsection|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0,alias:"class-name"},function:{pattern:n,alias:"selector"},punctuation:/[[\]{}&]/},e.languages.tex=e.languages.latex,e.languages.context=e.languages.latex})(t)}oE.displayName="liquid";oE.aliases=[];function oE(t){t.register(El),t.languages.liquid={comment:{pattern:/(^\{%\s*comment\s*%\})[\s\S]+(?=\{%\s*endcomment\s*%\}$)/,lookbehind:!0},delimiter:{pattern:/^\{(?:\{\{|[%\{])-?|-?(?:\}\}|[%\}])\}$/,alias:"punctuation"},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},keyword:/\b(?:as|assign|break|(?:end)?(?:capture|case|comment|for|form|if|paginate|raw|style|tablerow|unless)|continue|cycle|decrement|echo|else|elsif|in|include|increment|limit|liquid|offset|range|render|reversed|section|when|with)\b/,object:/\b(?:address|all_country_option_tags|article|block|blog|cart|checkout|collection|color|country|country_option_tags|currency|current_page|current_tags|customer|customer_address|date|discount_allocation|discount_application|external_video|filter|filter_value|font|forloop|fulfillment|generic_file|gift_card|group|handle|image|line_item|link|linklist|localization|location|measurement|media|metafield|model|model_source|order|page|page_description|page_image|page_title|part|policy|product|product_option|recommendations|request|robots|routes|rule|script|search|selling_plan|selling_plan_allocation|selling_plan_group|shipping_method|shop|shop_locale|sitemap|store_availability|tax_line|template|theme|transaction|unit_price_measurement|user_agent|variant|video|video_source)\b/,function:[{pattern:/(\|\s*)\w+/,lookbehind:!0,alias:"filter"},{pattern:/(\.\s*)(?:first|last|size)/,lookbehind:!0}],boolean:/\b(?:false|nil|true)\b/,range:{pattern:/\.\./,alias:"operator"},number:/\b\d+(?:\.\d+)?\b/,operator:/[!=]=|<>|[<>]=?|[|?:=-]|\b(?:and|contains(?=\s)|or)\b/,punctuation:/[.,\[\]()]/,empty:{pattern:/\bempty\b/,alias:"keyword"}},t.hooks.add("before-tokenize",function(e){var n=/\{%\s*comment\s*%\}[\s\S]*?\{%\s*endcomment\s*%\}|\{(?:%[\s\S]*?%|\{\{[\s\S]*?\}\}|\{[\s\S]*?\})\}/g,r=!1;t.languages["markup-templating"].buildPlaceholders(e,"liquid",n,function(o){var i=/^\{%-?\s*(\w+)/.exec(o);if(i){var s=i[1];if(s==="raw"&&!r)return r=!0,!0;if(s==="endraw")return r=!1,!0}return!r})}),t.hooks.add("after-tokenize",function(e){t.languages["markup-templating"].tokenizePlaceholders(e,"liquid")})}iE.displayName="lisp";iE.aliases=["elisp","emacs","emacs-lisp"];function iE(t){(function(e){function n(p){return RegExp(/(\()/.source+"(?:"+p+")"+/(?=[\s\)])/.source)}function r(p){return RegExp(/([\s([])/.source+"(?:"+p+")"+/(?=[\s)])/.source)}var o=/(?!\d)[-+*/~!@$%^=<>{}\w]+/.source,i="&"+o,s="(\\()",l="(?=\\))",a="(?=\\s)",u=/(?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\))*\))*\))*/.source,c={heading:{pattern:/;;;.*/,alias:["comment","title"]},comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0,inside:{argument:/[-A-Z]+(?=[.,\s])/,symbol:RegExp("`"+o+"'")}},"quoted-symbol":{pattern:RegExp("#?'"+o),alias:["variable","symbol"]},"lisp-property":{pattern:RegExp(":"+o),alias:"property"},splice:{pattern:RegExp(",@?"+o),alias:["symbol","variable"]},keyword:[{pattern:RegExp(s+"(?:and|(?:cl-)?letf|cl-loop|cond|cons|error|if|(?:lexical-)?let\\*?|message|not|null|or|provide|require|setq|unless|use-package|when|while)"+a),lookbehind:!0},{pattern:RegExp(s+"(?:append|by|collect|concat|do|finally|for|in|return)"+a),lookbehind:!0}],declare:{pattern:n(/declare/.source),lookbehind:!0,alias:"keyword"},interactive:{pattern:n(/interactive/.source),lookbehind:!0,alias:"keyword"},boolean:{pattern:r(/nil|t/.source),lookbehind:!0},number:{pattern:r(/[-+]?\d+(?:\.\d*)?/.source),lookbehind:!0},defvar:{pattern:RegExp(s+"def(?:const|custom|group|var)\\s+"+o),lookbehind:!0,inside:{keyword:/^def[a-z]+/,variable:RegExp(o)}},defun:{pattern:RegExp(s+/(?:cl-)?(?:defmacro|defun\*?)\s+/.source+o+/\s+\(/.source+u+/\)/.source),lookbehind:!0,greedy:!0,inside:{keyword:/^(?:cl-)?def\S+/,arguments:null,function:{pattern:RegExp("(^\\s)"+o),lookbehind:!0},punctuation:/[()]/}},lambda:{pattern:RegExp(s+"lambda\\s+\\(\\s*(?:&?"+o+"(?:\\s+&?"+o+")*\\s*)?\\)"),lookbehind:!0,greedy:!0,inside:{keyword:/^lambda/,arguments:null,punctuation:/[()]/}},car:{pattern:RegExp(s+o),lookbehind:!0},punctuation:[/(?:['`,]?\(|[)\[\]])/,{pattern:/(\s)\.(?=\s)/,lookbehind:!0}]},d={"lisp-marker":RegExp(i),varform:{pattern:RegExp(/\(/.source+o+/\s+(?=\S)/.source+u+/\)/.source),inside:c},argument:{pattern:RegExp(/(^|[\s(])/.source+o),lookbehind:!0,alias:"variable"},rest:c},h="\\S+(?:\\s+\\S+)*",f={pattern:RegExp(s+u+l),lookbehind:!0,inside:{"rest-vars":{pattern:RegExp("&(?:body|rest)\\s+"+h),inside:d},"other-marker-vars":{pattern:RegExp("&(?:aux|optional)\\s+"+h),inside:d},keys:{pattern:RegExp("&key\\s+"+h+"(?:\\s+&allow-other-keys)?"),inside:d},argument:{pattern:RegExp(o),alias:"variable"},punctuation:/[()]/}};c.lambda.inside.arguments=f,c.defun.inside.arguments=e.util.clone(f),c.defun.inside.arguments.inside.sublist=f,e.languages.lisp=c,e.languages.elisp=c,e.languages.emacs=c,e.languages["emacs-lisp"]=c})(t)}sE.displayName="lua";sE.aliases=[];function sE(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:/[\[\](){},;]|\.+|:+/}}aE.displayName="makefile";aE.aliases=[];function aE(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:/[:;(){}]/}}lE.displayName="markdown";lE.aliases=["md"];function lE(t){t.register(vu),function(e){var n=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function r(l){return l=l.replace(//g,function(){return n}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+l+")")}var o=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return o}),s=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+s+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+s+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(o),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+s+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(o),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:r(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:r(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:r(/(~~?)(?:(?!~))+\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:r(/!?\[(?:(?!\]))+\](?:\([^\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(l){["url","bold","italic","strike","code-snippet"].forEach(function(a){l!==a&&(e.languages.markdown[l].inside.content.inside[a]=e.languages.markdown[a])})}),e.hooks.add("after-tokenize",function(l){if(l.language!=="markdown"&&l.language!=="md")return;function a(u){if(!(!u||typeof u=="string"))for(var c=0,d=u.length;c]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete t.languages.objectivec["class-name"],t.languages.objc=t.languages.objectivec}uE.displayName="perl";uE.aliases=[];function uE(t){(function(e){var n=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;e.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,n].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,n].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,n+/\s*/.source+n].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)}dE.displayName="php";dE.aliases=[];function dE(t){t.register(El),function(e){var n=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,r=[{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*\()/],o=/\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}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:n,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:r,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:o,operator:i,punctuation:s};var l={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},a=[{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:l}},{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:l}}];e.languages.insertBefore("php","variable",{string:a,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:n,string:a,"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:r,number:o,operator:i,punctuation:s}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",function(u){if(/<\?/.test(u.code)){var c=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;e.languages["markup-templating"].buildPlaceholders(u,"php",c)}}),e.hooks.add("after-tokenize",function(u){e.languages["markup-templating"].tokenizePlaceholders(u,"php")})}(t)}hE.displayName="sql";hE.aliases=[];function hE(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:/[;[\]()`,.]/}}fE.displayName="plsql";fE.aliases=[];function fE(t){t.register(hE),t.languages.plsql=t.languages.extend("sql",{comment:{pattern:/\/\*[\s\S]*?\*\/|--.*/,greedy:!0},keyword:/\b(?:A|ACCESSIBLE|ADD|AGENT|AGGREGATE|ALL|ALTER|AND|ANY|ARRAY|AS|ASC|AT|ATTRIBUTE|AUTHID|AVG|BEGIN|BETWEEN|BFILE_BASE|BINARY|BLOB_BASE|BLOCK|BODY|BOTH|BOUND|BULK|BY|BYTE|C|CALL|CALLING|CASCADE|CASE|CHAR|CHARACTER|CHARSET|CHARSETFORM|CHARSETID|CHAR_BASE|CHECK|CLOB_BASE|CLONE|CLOSE|CLUSTER|CLUSTERS|COLAUTH|COLLECT|COLUMNS|COMMENT|COMMIT|COMMITTED|COMPILED|COMPRESS|CONNECT|CONSTANT|CONSTRUCTOR|CONTEXT|CONTINUE|CONVERT|COUNT|CRASH|CREATE|CREDENTIAL|CURRENT|CURSOR|CUSTOMDATUM|DANGLING|DATA|DATE|DATE_BASE|DAY|DECLARE|DEFAULT|DEFINE|DELETE|DESC|DETERMINISTIC|DIRECTORY|DISTINCT|DOUBLE|DROP|DURATION|ELEMENT|ELSE|ELSIF|EMPTY|END|ESCAPE|EXCEPT|EXCEPTION|EXCEPTIONS|EXCLUSIVE|EXECUTE|EXISTS|EXIT|EXTERNAL|FETCH|FINAL|FIRST|FIXED|FLOAT|FOR|FORALL|FORCE|FROM|FUNCTION|GENERAL|GOTO|GRANT|GROUP|HASH|HAVING|HEAP|HIDDEN|HOUR|IDENTIFIED|IF|IMMEDIATE|IMMUTABLE|IN|INCLUDING|INDEX|INDEXES|INDICATOR|INDICES|INFINITE|INSERT|INSTANTIABLE|INT|INTERFACE|INTERSECT|INTERVAL|INTO|INVALIDATE|IS|ISOLATION|JAVA|LANGUAGE|LARGE|LEADING|LENGTH|LEVEL|LIBRARY|LIKE|LIKE2|LIKE4|LIKEC|LIMIT|LIMITED|LOCAL|LOCK|LONG|LOOP|MAP|MAX|MAXLEN|MEMBER|MERGE|MIN|MINUS|MINUTE|MOD|MODE|MODIFY|MONTH|MULTISET|MUTABLE|NAME|NAN|NATIONAL|NATIVE|NCHAR|NEW|NOCOMPRESS|NOCOPY|NOT|NOWAIT|NULL|NUMBER_BASE|OBJECT|OCICOLL|OCIDATE|OCIDATETIME|OCIDURATION|OCIINTERVAL|OCILOBLOCATOR|OCINUMBER|OCIRAW|OCIREF|OCIREFCURSOR|OCIROWID|OCISTRING|OCITYPE|OF|OLD|ON|ONLY|OPAQUE|OPEN|OPERATOR|OPTION|OR|ORACLE|ORADATA|ORDER|ORGANIZATION|ORLANY|ORLVARY|OTHERS|OUT|OVERLAPS|OVERRIDING|PACKAGE|PARALLEL_ENABLE|PARAMETER|PARAMETERS|PARENT|PARTITION|PASCAL|PERSISTABLE|PIPE|PIPELINED|PLUGGABLE|POLYMORPHIC|PRAGMA|PRECISION|PRIOR|PRIVATE|PROCEDURE|PUBLIC|RAISE|RANGE|RAW|READ|RECORD|REF|REFERENCE|RELIES_ON|REM|REMAINDER|RENAME|RESOURCE|RESULT|RESULT_CACHE|RETURN|RETURNING|REVERSE|REVOKE|ROLLBACK|ROW|SAMPLE|SAVE|SAVEPOINT|SB1|SB2|SB4|SECOND|SEGMENT|SELECT|SELF|SEPARATE|SEQUENCE|SERIALIZABLE|SET|SHARE|SHORT|SIZE|SIZE_T|SOME|SPARSE|SQL|SQLCODE|SQLDATA|SQLNAME|SQLSTATE|STANDARD|START|STATIC|STDDEV|STORED|STRING|STRUCT|STYLE|SUBMULTISET|SUBPARTITION|SUBSTITUTABLE|SUBTYPE|SUM|SYNONYM|TABAUTH|TABLE|TDO|THE|THEN|TIME|TIMESTAMP|TIMEZONE_ABBR|TIMEZONE_HOUR|TIMEZONE_MINUTE|TIMEZONE_REGION|TO|TRAILING|TRANSACTION|TRANSACTIONAL|TRUSTED|TYPE|UB1|UB2|UB4|UNDER|UNION|UNIQUE|UNPLUG|UNSIGNED|UNTRUSTED|UPDATE|USE|USING|VALIST|VALUE|VALUES|VARIABLE|VARIANCE|VARRAY|VARYING|VIEW|VIEWS|VOID|WHEN|WHERE|WHILE|WITH|WORK|WRAPPED|WRITE|YEAR|ZONE)\b/i,operator:/:=?|=>|[<>^~!]=|\.\.|\|\||\*\*|[-+*/%<>=@]/}),t.languages.insertBefore("plsql","operator",{label:{pattern:/<<\s*\w+\s*>>/,alias:"symbol"}})}pE.displayName="powershell";pE.aliases=[];function pE(t){(function(e){var n=e.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};n.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:n},boolean:n.boolean,variable:n.variable}})(t)}gE.displayName="protobuf";gE.aliases=[];function gE(t){t.register(fr),function(e){var n=/\b(?:bool|bytes|double|s?fixed(?:32|64)|float|[su]?int(?:32|64)|string)\b/;e.languages.protobuf=e.languages.extend("clike",{"class-name":[{pattern:/(\b(?:enum|extend|message|service)\s+)[A-Za-z_]\w*(?=\s*\{)/,lookbehind:!0},{pattern:/(\b(?:rpc\s+\w+|returns)\s*\(\s*(?:stream\s+)?)\.?[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*(?=\s*\))/,lookbehind:!0}],keyword:/\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|returns|rpc(?=\s+\w)|service|stream|syntax|to)\b(?!\s*=\s*\d)/,function:/\b[a-z_]\w*(?=\s*\()/i}),e.languages.insertBefore("protobuf","operator",{map:{pattern:/\bmap<\s*[\w.]+\s*,\s*[\w.]+\s*>(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/[<>.,]/,builtin:n}},builtin:n,"positional-class-name":{pattern:/(?:\b|\B\.)[a-z_]\w*(?:\.[a-z_]\w*)*(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/\./}},annotation:{pattern:/(\[\s*)[a-z_]\w*(?=\s*=)/i,lookbehind:!0}})}(t)}mE.displayName="python";mE.aliases=["py"];function mE(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}vE.displayName="regex";vE.aliases=[];function vE(t){(function(e){var n={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},r=/\\(?: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]|.)/,o={pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},i={pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},s="(?:[^\\\\-]|"+r.source+")",l=RegExp(s+"-"+s),a={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:l,inside:{escape:r,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":n,"char-set":i,escape:r}},"special-escape":n,"char-set":o,backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":a}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:r,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var n={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var r="(?:"+[/([^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("|")+")",o=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+r+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:n,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:n,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+o),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+o+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+r),greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:n,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:n,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+r),greedy:!0,inside:{interpolation:n,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:n,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(t)}bE.displayName="rust";bE.aliases=[];function bE(t){(function(e){for(var n=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,r=0;r<2;r++)n=n.replace(//g,function(){return n});n=n.replace(//g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+n),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string})(t)}wE.displayName="sass";wE.aliases=[];function wE(t){t.register(cf),function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var n=/\$[-\w]+|#\{\$[-\w]+\}/,r=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:n,operator:r}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:n,operator:r,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(t)}xE.displayName="scala";xE.aliases=[];function xE(t){t.register(Av),t.languages.scala=t.languages.extend("java",{"triple-quoted-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:/<-|=>|\b(?:abstract|case|catch|class|def|derives|do|else|enum|extends|extension|final|finally|for|forSome|given|if|implicit|import|infix|inline|lazy|match|new|null|object|opaque|open|override|package|private|protected|return|sealed|self|super|this|throw|trait|transparent|try|type|using|val|var|while|with|yield)\b/,number:/\b0x(?:[\da-f]*\.)?[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e\d+)?[dfl]?/i,builtin:/\b(?:Any|AnyRef|AnyVal|Boolean|Byte|Char|Double|Float|Int|Long|Nothing|Short|String|Unit)\b/,symbol:/'[^\d\s\\]\w*/}),t.languages.insertBefore("scala","triple-quoted-string",{"string-interpolation":{pattern:/\b[a-z]\w*(?:"""(?:[^$]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*?"""|"(?:[^$"\r\n]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*")/i,greedy:!0,inside:{id:{pattern:/^\w+/,greedy:!0,alias:"function"},escape:{pattern:/\\\$"|\$[$"]/,greedy:!0,alias:"symbol"},interpolation:{pattern:/\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,greedy:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:t.languages.scala}}},string:/[\s\S]+/}}}),delete t.languages.scala["class-name"],delete t.languages.scala.function,delete t.languages.scala.constant}kE.displayName="scss";kE.aliases=[];function kE(t){t.register(cf),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}EE.displayName="smalltalk";EE.aliases=[];function EE(t){t.languages.smalltalk={comment:{pattern:/"(?:""|[^"])*"/,greedy:!0},char:{pattern:/\$./,greedy:!0},string:{pattern:/'(?:''|[^'])*'/,greedy:!0},symbol:/#[\da-z]+|#(?:-|([+\/\\*~<>=@%|&?!])\1?)|#(?=\()/i,"block-arguments":{pattern:/(\[\s*):[^\[|]*\|/,lookbehind:!0,inside:{variable:/:[\da-z]+/i,punctuation:/\|/}},"temporary-variables":{pattern:/\|[^|]+\|/,inside:{variable:/[\da-z]+/i,punctuation:/\|/}},keyword:/\b(?:new|nil|self|super)\b/,boolean:/\b(?:false|true)\b/,number:[/\d+r-?[\dA-Z]+(?:\.[\dA-Z]+)?(?:e-?\d+)?/,/\b\d+(?:\.\d+)?(?:e-?\d+)?/],operator:/[<=]=?|:=|~[~=]|\/\/?|\\\\|>[>=]?|[!^+\-*&|,@]/,punctuation:/[.;:?\[\](){}]/}}SE.displayName="swift";SE.aliases=[];function SE(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]*)?(?:\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})}CE.displayName="toml";CE.aliases=[];function CE(t){(function(e){var n=/(?:[\w-]+|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*")/.source;function r(o){return o.replace(/__/g,function(){return n})}e.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp(r(/(^[\t ]*\[\s*(?:\[\s*)?)__(?:\s*\.\s*__)*(?=\s*\])/.source),"m"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern:RegExp(r(/(^[\t ]*|[{,]\s*)__(?:\s*\.\s*__)*(?=\s*=)/.source),"m"),lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},date:[{pattern:/\b\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?\b/i,alias:"number"},{pattern:/\b\d{2}:\d{2}:\d{2}(?:\.\d+)?\b/,alias:"number"}],number:/(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\b\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?\b(?:inf|nan)\b/,boolean:/\b(?:false|true)\b/,punctuation:/[.,=[\]{}]/}})(t)}TE.displayName="typescript";TE.aliases=["ts"];function TE(t){t.register(aa),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var n=e.languages.extend("typescript",{});delete n["class-name"],e.languages.typescript["class-name"].inside=n,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n}}}}),e.languages.ts=e.languages.typescript}(t)}AE.displayName="unrealscript";AE.aliases=["uc","uscript"];function AE(t){t.languages.unrealscript={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},category:{pattern:/(\b(?:(?:autoexpand|hide|show)categories|var)\s*\()[^()]+(?=\))/,lookbehind:!0,greedy:!0,alias:"property"},metadata:{pattern:/(\w\s*)<\s*\w+\s*=[^<>|=\r\n]+(?:\|\s*\w+\s*=[^<>|=\r\n]+)*>/,lookbehind:!0,greedy:!0,inside:{property:/\b\w+(?=\s*=)/,operator:/=/,punctuation:/[<>|]/}},macro:{pattern:/`\w+/,alias:"property"},"class-name":{pattern:/(\b(?:class|enum|extends|interface|state(?:\(\))?|struct|within)\s+)\w+/,lookbehind:!0},keyword:/\b(?:abstract|actor|array|auto|autoexpandcategories|bool|break|byte|case|class|classgroup|client|coerce|collapsecategories|config|const|continue|default|defaultproperties|delegate|dependson|deprecated|do|dontcollapsecategories|editconst|editinlinenew|else|enum|event|exec|export|extends|final|float|for|forcescriptorder|foreach|function|goto|guid|hidecategories|hidedropdown|if|ignores|implements|inherits|input|int|interface|iterator|latent|local|material|name|native|nativereplication|noexport|nontransient|noteditinlinenew|notplaceable|operator|optional|out|pawn|perobjectconfig|perobjectlocalized|placeable|postoperator|preoperator|private|protected|reliable|replication|return|server|showcategories|simulated|singular|state|static|string|struct|structdefault|structdefaultproperties|switch|texture|transient|travel|unreliable|until|var|vector|while|within)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/>>|<<|--|\+\+|\*\*|[-+*/~!=<>$@]=?|&&?|\|\|?|\^\^?|[?:%]|\b(?:ClockwiseFrom|Cross|Dot)\b/,punctuation:/[()[\]{};,.]/},t.languages.uc=t.languages.uscript=t.languages.unrealscript}_E.displayName="yaml";_E.aliases=["yml"];function _E(t){(function(e){var n=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,o="(?:"+r.source+"(?:[ ]+"+n.source+")?|"+n.source+"(?:[ ]+"+r.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}),s=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function l(a,u){u=(u||"").replace(/m/g,"")+"m";var c=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return o}).replace(/<>/g,function(){return a});return RegExp(c,u)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,function(){return o})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,function(){return o}).replace(/<>/g,function(){return"(?:"+i+"|"+s+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:l(/\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:l(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:l(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:l(s),lookbehind:!0,greedy:!0},number:{pattern:l(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:r,important:n,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml})(t)}RE.displayName="zig";RE.aliases=[];function RE(t){(function(e){function n(u){return function(){return u}}var r=/\b(?:align|allowzero|and|anyframe|anytype|asm|async|await|break|cancel|catch|comptime|const|continue|defer|else|enum|errdefer|error|export|extern|fn|for|if|inline|linksection|nakedcc|noalias|nosuspend|null|or|orelse|packed|promise|pub|resume|return|stdcallcc|struct|suspend|switch|test|threadlocal|try|undefined|union|unreachable|usingnamespace|var|volatile|while)\b/,o="\\b(?!"+r.source+")(?!\\d)\\w+\\b",i=/align\s*\((?:[^()]|\([^()]*\))*\)/.source,s=/(?:\?|\bpromise->|(?:\[[^[\]]*\]|\*(?!\*)|\*\*)(?:\s*|\s*const\b|\s*volatile\b|\s*allowzero\b)*)/.source.replace(//g,n(i)),l=/(?:\bpromise\b|(?:\berror\.)?(?:\.)*(?!\s+))/.source.replace(//g,n(o)),a="(?!\\s)(?:!?\\s*(?:"+s+"\\s*)*"+l+")+";e.languages.zig={comment:[{pattern:/\/\/[/!].*/,alias:"doc-comment"},/\/{2}.*/],string:[{pattern:/(^|[^\\@])c?"(?:[^"\\\r\n]|\\.)*"/,lookbehind:!0,greedy:!0},{pattern:/([\r\n])([ \t]+c?\\{2}).*(?:(?:\r\n?|\n)\2.*)*/,lookbehind:!0,greedy:!0}],char:{pattern:/(^|[^\\])'(?:[^'\\\r\n]|[\uD800-\uDFFF]{2}|\\(?:.|x[a-fA-F\d]{2}|u\{[a-fA-F\d]{1,6}\}))'/,lookbehind:!0,greedy:!0},builtin:/\B@(?!\d)\w+(?=\s*\()/,label:{pattern:/(\b(?:break|continue)\s*:\s*)\w+\b|\b(?!\d)\w+\b(?=\s*:\s*(?:\{|while\b))/,lookbehind:!0},"class-name":[/\b(?!\d)\w+(?=\s*=\s*(?:(?:extern|packed)\s+)?(?:enum|struct|union)\s*[({])/,{pattern:RegExp(/(:\s*)(?=\s*(?:\s*)?[=;,)])|(?=\s*(?:\s*)?\{)/.source.replace(//g,n(a)).replace(//g,n(i))),lookbehind:!0,inside:null},{pattern:RegExp(/(\)\s*)(?=\s*(?:\s*)?;)/.source.replace(//g,n(a)).replace(//g,n(i))),lookbehind:!0,inside:null}],"builtin-type":{pattern:/\b(?:anyerror|bool|c_u?(?:int|long|longlong|short)|c_longdouble|c_void|comptime_(?:float|int)|f(?:16|32|64|128)|[iu](?:8|16|32|64|128|size)|noreturn|type|void)\b/,alias:"keyword"},keyword:r,function:/\b(?!\d)\w+(?=\s*\()/,number:/\b(?:0b[01]+|0o[0-7]+|0x[a-fA-F\d]+(?:\.[a-fA-F\d]*)?(?:[pP][+-]?[a-fA-F\d]+)?|\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)\b/,boolean:/\b(?:false|true)\b/,operator:/\.[*?]|\.{2,3}|[-=]>|\*\*|\+\+|\|\||(?:<<|>>|[-+*]%|[-+*/%^&|<>!=])=?|[?~]/,punctuation:/[.:,;(){}[\]]/},e.languages.zig["class-name"].forEach(function(u){u.inside===null&&(u.inside=e.languages.zig)})})(t)}/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */const hue=[JE,QE,ek,tk,rk,cp,nk,ok,ik,sk,ak,lk,up,ck,uk,dk,pk,fk,hk,mk,gk,yk,vk,bk,Ek,kk,xk,Sk,wk,Tk,Ck,Ok,gg,Cs,Ak,Nk,Rk,_k,Ik,Mk,Lk,Dk,Pk,Ec,zk,$k,Bk,Fk,Uk,Vk,jk,Gk,Wk,Kk,Yk,qk,Xk,Zk,Jk,Qk,ex,tx,rx,nx];/* + */const zhe=[Sk,Ck,Tk,Ak,_k,lf,Rk,Mk,Ok,Ik,Lk,Nk,cf,$k,Dk,Pk,zk,Fk,Bk,Hk,Uk,Wk,Vk,jk,Gk,Kk,Yk,Xk,qk,Zk,Qk,Jk,Av,aa,eE,tE,nE,rE,oE,iE,sE,aE,lE,vu,cE,uE,dE,fE,pE,gE,mE,vE,yE,bE,wE,xE,kE,EE,SE,CE,TE,AE,_E,RE];/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */function mue(e,t,r){if(!e)return;const n=`${t}/api/assets/${r}/`;if(e.startsWith(n)){const o=e.substring(n.length).split(/[/?]+/);return o.length<1?null:{id:o[0]}}return null}function gue(e,t,r){if(!e)return;const n=`${t}/api/content/${r}/`;if(e.startsWith(n)){const o=e.substring(n.length).split(/[/?]+/);return o.length<2?null:{schemaName:o[0],id:o[1]}}return null}function ox(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Da=ox();function fM(e){Da=e}const hM=/[&<>"']/,yue=new RegExp(hM.source,"g"),mM=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,vue=new RegExp(mM.source,"g"),bue={"&":"&","<":"<",">":">",'"':""","'":"'"},X2=e=>bue[e];function on(e,t){if(t){if(hM.test(e))return e.replace(yue,X2)}else if(mM.test(e))return e.replace(vue,X2);return e}const Eue=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function kue(e){return e.replace(Eue,(t,r)=>(r=r.toLowerCase(),r==="colon"?":":r.charAt(0)==="#"?r.charAt(1)==="x"?String.fromCharCode(parseInt(r.substring(2),16)):String.fromCharCode(+r.substring(1)):""))}const xue=/(^|[^\[])\^/g;function ze(e,t){e=typeof e=="string"?e:e.source,t=t||"";const r={replace:(n,o)=>(o=typeof o=="object"&&"source"in o?o.source:o,o=o.replace(xue,"$1"),e=e.replace(n,o),r),getRegex:()=>new RegExp(e,t)};return r}function Z2(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const Hh={exec:()=>null};function J2(e,t){const r=e.replace(/\|/g,(i,s,a)=>{let l=!1,c=s;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),n=r.split(/ \|/);let o=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length{const i=o.match(/^\s+/);if(i===null)return o;const[s]=i;return s.length>=n.length?o.slice(n.length):o}).join(` -`)}class Fh{constructor(t){Fe(this,"options");Fe(this,"rules");Fe(this,"lexer");this.options=t||Da}space(t){const r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){const r=this.rules.block.code.exec(t);if(r){const n=r[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Gp(n,` -`)}}}fences(t){const r=this.rules.block.fences.exec(t);if(r){const n=r[0],o=wue(n,r[3]||"");return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline._escapes,"$1"):r[2],text:o}}}heading(t){const r=this.rules.block.heading.exec(t);if(r){let n=r[2].trim();if(/#$/.test(n)){const o=Gp(n,"#");(this.options.pedantic||!o||/ $/.test(o))&&(n=o.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){const r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:r[0]}}blockquote(t){const r=this.rules.block.blockquote.exec(t);if(r){const n=Gp(r[0].replace(/^ *>[ \t]?/gm,""),` -`),o=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(n);return this.lexer.state.top=o,{type:"blockquote",raw:r[0],tokens:i,text:n}}}list(t){let r=this.rules.block.list.exec(t);if(r){let n=r[1].trim();const o=n.length>1,i={type:"list",raw:"",ordered:o,start:o?+n.slice(0,-1):"",loose:!1,items:[]};n=o?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=o?n:"[*+-]");const s=new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`);let a="",l="",c=!1;for(;t;){let u=!1;if(!(r=s.exec(t))||this.rules.block.hr.test(t))break;a=r[0],t=t.substring(a.length);let d=r[2].split(` -`,1)[0].replace(/^\t+/,y=>" ".repeat(3*y.length)),p=t.split(` -`,1)[0],f=0;this.options.pedantic?(f=2,l=d.trimStart()):(f=r[2].search(/[^ ]/),f=f>4?1:f,l=d.slice(f),f+=r[1].length);let h=!1;if(!d&&/^ *$/.test(p)&&(a+=p+` -`,t=t.substring(p.length+1),u=!0),!u){const y=new RegExp(`^ {0,${Math.min(3,f-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),g=new RegExp(`^ {0,${Math.min(3,f-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),v=new RegExp(`^ {0,${Math.min(3,f-1)}}(?:\`\`\`|~~~)`),E=new RegExp(`^ {0,${Math.min(3,f-1)}}#`);for(;t;){const k=t.split(` -`,1)[0];if(p=k,this.options.pedantic&&(p=p.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),v.test(p)||E.test(p)||y.test(p)||g.test(t))break;if(p.search(/[^ ]/)>=f||!p.trim())l+=` -`+p.slice(f);else{if(h||d.search(/[^ ]/)>=4||v.test(d)||E.test(d)||g.test(d))break;l+=` -`+p}!h&&!p.trim()&&(h=!0),a+=k+` -`,t=t.substring(k.length+1),d=p.slice(f)}}i.loose||(c?i.loose=!0:/\n *\n *$/.test(a)&&(c=!0));let m=null,b;this.options.gfm&&(m=/^\[[ xX]\] /.exec(l),m&&(b=m[0]!=="[ ] ",l=l.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:a,task:!!m,checked:b,loose:!1,text:l,tokens:[]}),i.raw+=a}i.items[i.items.length-1].raw=a.trimEnd(),i.items[i.items.length-1].text=l.trimEnd(),i.raw=i.raw.trimEnd();for(let u=0;uf.type==="space"),p=d.length>0&&d.some(f=>/\n.*\n/.test(f.raw));i.loose=p}if(i.loose)for(let u=0;u$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline._escapes,"$1"):r[3];return{type:"def",tag:n,raw:r[0],href:o,title:i}}}table(t){const r=this.rules.block.table.exec(t);if(r){if(!/[:|]/.test(r[2]))return;const n={type:"table",raw:r[0],header:J2(r[1]).map(o=>({text:o,tokens:[]})),align:r[2].replace(/^\||\| *$/g,"").split("|"),rows:r[3]&&r[3].trim()?r[3].replace(/\n[ \t]*$/,"").split(` -`):[]};if(n.header.length===n.align.length){let o=n.align.length,i,s,a,l;for(i=0;i({text:c,tokens:[]}));for(o=n.header.length,s=0;s/i.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){const r=this.rules.inline.link.exec(t);if(r){const n=r[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;const s=Gp(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{const s=Sue(r[2],"()");if(s>-1){const l=(r[0].indexOf("!")===0?5:4)+r[1].length+s;r[2]=r[2].substring(0,s),r[0]=r[0].substring(0,l).trim(),r[3]=""}}let o=r[2],i="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);s&&(o=s[1],i=s[3])}else i=r[3]?r[3].slice(1,-1):"";return o=o.trim(),/^$/.test(n)?o=o.slice(1):o=o.slice(1,-1)),Q2(r,{href:o&&o.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},r[0],this.lexer)}}reflink(t,r){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let o=(n[2]||n[1]).replace(/\s+/g," ");if(o=r[o.toLowerCase()],!o){const i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return Q2(n,o,n[0],this.lexer)}}emStrong(t,r,n=""){let o=this.rules.inline.emStrong.lDelim.exec(t);if(!o||o[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(o[1]||o[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const s=[...o[0]].length-1;let a,l,c=s,u=0;const d=o[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(d.lastIndex=0,r=r.slice(-1*t.length+s);(o=d.exec(r))!=null;){if(a=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!a)continue;if(l=[...a].length,o[3]||o[4]){c+=l;continue}else if((o[5]||o[6])&&s%3&&!((s+l)%3)){u+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+u);const p=[...o[0]][0].length,f=t.slice(0,s+o.index+p+l);if(Math.min(s,l)%2){const m=f.slice(1,-1);return{type:"em",raw:f,text:m,tokens:this.lexer.inlineTokens(m)}}const h=f.slice(2,-2);return{type:"strong",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){const r=this.rules.inline.code.exec(t);if(r){let n=r[2].replace(/\n/g," ");const o=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return o&&i&&(n=n.substring(1,n.length-1)),n=on(n,!0),{type:"codespan",raw:r[0],text:n}}}br(t){const r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){const r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){const r=this.rules.inline.autolink.exec(t);if(r){let n,o;return r[2]==="@"?(n=on(r[1]),o="mailto:"+n):(n=on(r[1]),o=n),{type:"link",raw:r[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let n,o;if(r[2]==="@")n=on(r[0]),o="mailto:"+n;else{let i;do i=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0];while(i!==r[0]);n=on(r[0]),r[1]==="www."?o="http://"+r[0]:o=r[0]}return{type:"link",raw:r[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){const r=this.rules.inline.text.exec(t);if(r){let n;return this.lexer.state.inRawBlock?n=r[0]:n=on(r[0]),{type:"text",raw:r[0],text:n}}}}const se={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}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\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 *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Hh,lheading:/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};se._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;se._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;se.def=ze(se.def).replace("label",se._label).replace("title",se._title).getRegex();se.bullet=/(?:[*+-]|\d{1,9}[.)])/;se.listItemStart=ze(/^( *)(bull) */).replace("bull",se.bullet).getRegex();se.list=ze(se.list).replace(/bull/g,se.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+se.def.source+")").getRegex();se._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";se._comment=/|$)/;se.html=ze(se.html,"i").replace("comment",se._comment).replace("tag",se._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();se.lheading=ze(se.lheading).replace(/bull/g,se.bullet).getRegex();se.paragraph=ze(se._paragraph).replace("hr",se.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").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",se._tag).getRegex();se.blockquote=ze(se.blockquote).replace("paragraph",se.paragraph).getRegex();se.normal={...se};se.gfm={...se.normal,table:"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};se.gfm.table=ze(se.gfm.table).replace("hr",se.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").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",se._tag).getRegex();se.gfm.paragraph=ze(se._paragraph).replace("hr",se.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",se.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",se._tag).getRegex();se.pedantic={...se.normal,html:ze(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",se._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:Hh,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ze(se.normal._paragraph).replace("hr",se.hr).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",se.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const X={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Hh,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:Hh,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`^|~";X.punctuation=ze(X.punctuation,"u").replace(/punctuation/g,X._punctuation).getRegex();X.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g;X.anyPunctuation=/\\[punct]/g;X._escapes=/\\([punct])/g;X._comment=ze(se._comment).replace("(?:-->|$)","-->").getRegex();X.emStrong.lDelim=ze(X.emStrong.lDelim,"u").replace(/punct/g,X._punctuation).getRegex();X.emStrong.rDelimAst=ze(X.emStrong.rDelimAst,"gu").replace(/punct/g,X._punctuation).getRegex();X.emStrong.rDelimUnd=ze(X.emStrong.rDelimUnd,"gu").replace(/punct/g,X._punctuation).getRegex();X.anyPunctuation=ze(X.anyPunctuation,"gu").replace(/punct/g,X._punctuation).getRegex();X._escapes=ze(X._escapes,"gu").replace(/punct/g,X._punctuation).getRegex();X._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;X._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])?)+(?![-_])/;X.autolink=ze(X.autolink).replace("scheme",X._scheme).replace("email",X._email).getRegex();X._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;X.tag=ze(X.tag).replace("comment",X._comment).replace("attribute",X._attribute).getRegex();X._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;X._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;X._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;X.link=ze(X.link).replace("label",X._label).replace("href",X._href).replace("title",X._title).getRegex();X.reflink=ze(X.reflink).replace("label",X._label).replace("ref",se._label).getRegex();X.nolink=ze(X.nolink).replace("ref",se._label).getRegex();X.reflinkSearch=ze(X.reflinkSearch,"g").replace("reflink",X.reflink).replace("nolink",X.nolink).getRegex();X.normal={...X};X.pedantic={...X.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:ze(/^!?\[(label)\]\((.*?)\)/).replace("label",X._label).getRegex(),reflink:ze(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",X._label).getRegex()};X.gfm={...X.normal,escape:ze(X.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]*?(?:(?=[\\l+" ".repeat(c.length));let n,o,i,s;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(n=a.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))){if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length),n.raw.length===1&&r.length>0?r[r.length-1].raw+=` -`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length),o=r[r.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` -`+n.raw,o.text+=` -`+n.text,this.inlineQueue[this.inlineQueue.length-1].src=o.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length),o=r[r.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` -`+n.raw,o.text+=` -`+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(i=t,this.options.extensions&&this.options.extensions.startBlock){let a=1/0;const l=t.slice(1);let c;this.options.extensions.startBlock.forEach(u=>{c=u.call({lexer:this},l),typeof c=="number"&&c>=0&&(a=Math.min(a,c))}),a<1/0&&a>=0&&(i=t.substring(0,a+1))}if(this.state.top&&(n=this.tokenizer.paragraph(i))){o=r[r.length-1],s&&o.type==="paragraph"?(o.raw+=` -`+n.raw,o.text+=` -`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):r.push(n),s=i.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length),o=r[r.length-1],o&&o.type==="text"?(o.raw+=` -`+n.raw,o.text+=` -`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):r.push(n);continue}if(t){const a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let n,o,i,s=t,a,l,c;if(this.tokens.links){const u=Object.keys(this.tokens.links);if(u.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)u.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,a.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(l||(c=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(u=>(n=u.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))){if(n=this.tokenizer.escape(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.tag(t)){t=t.substring(n.raw.length),o=r[r.length-1],o&&n.type==="text"&&o.type==="text"?(o.raw+=n.raw,o.text+=n.text):r.push(n);continue}if(n=this.tokenizer.link(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(n.raw.length),o=r[r.length-1],o&&n.type==="text"&&o.type==="text"?(o.raw+=n.raw,o.text+=n.text):r.push(n);continue}if(n=this.tokenizer.emStrong(t,s,c)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.codespan(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.br(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.del(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.autolink(t)){t=t.substring(n.raw.length),r.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(t))){t=t.substring(n.raw.length),r.push(n);continue}if(i=t,this.options.extensions&&this.options.extensions.startInline){let u=1/0;const d=t.slice(1);let p;this.options.extensions.startInline.forEach(f=>{p=f.call({lexer:this},d),typeof p=="number"&&p>=0&&(u=Math.min(u,p))}),u<1/0&&u>=0&&(i=t.substring(0,u+1))}if(n=this.tokenizer.inlineText(i)){t=t.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(c=n.raw.slice(-1)),l=!0,o=r[r.length-1],o&&o.type==="text"?(o.raw+=n.raw,o.text+=n.text):r.push(n);continue}if(t){const u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return r}}class Uh{constructor(t){Fe(this,"options");this.options=t||Da}code(t,r,n){var i;const o=(i=(r||"").match(/^\S*/))==null?void 0:i[0];return t=t.replace(/\n$/,"")+` -`,o?'
    '+(n?t:on(t,!0))+`
    -`:"
    "+(n?t:on(t,!0))+`
    -`}blockquote(t){return`
    -${t}
    -`}html(t,r){return t}heading(t,r,n){return`${t} + */function Fhe(t,e,n){if(!t)return;const r=`${e}/api/assets/${n}/`;if(t.startsWith(r)){const o=t.substring(r.length).split(/[/?]+/);return o.length<1?null:{id:o[0]}}return null}function Bhe(t,e,n){if(!t)return;const r=`${e}/api/content/${n}/`;if(t.startsWith(r)){const o=t.substring(r.length).split(/[/?]+/);return o.length<2?null:{schemaName:o[0],id:o[1]}}return null}function ME(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Sl=ME();function e$(t){Sl=t}const t$=/[&<>"']/,Hhe=new RegExp(t$.source,"g"),n$=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Uhe=new RegExp(n$.source,"g"),Whe={"&":"&","<":"<",">":">",'"':""","'":"'"},C_=t=>Whe[t];function Pr(t,e){if(e){if(t$.test(t))return t.replace(Hhe,C_)}else if(n$.test(t))return t.replace(Uhe,C_);return t}const Vhe=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function jhe(t){return t.replace(Vhe,(e,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const Ghe=/(^|[^\[])\^/g;function st(t,e){t=typeof t=="string"?t:t.source,e=e||"";const n={replace:(r,o)=>(o=typeof o=="object"&&"source"in o?o.source:o,o=o.replace(Ghe,"$1"),t=t.replace(r,o),n),getRegex:()=>new RegExp(t,e)};return n}function T_(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const Xg={exec:()=>null};function A_(t,e){const n=t.replace(/\|/g,(i,s,l)=>{let a=!1,u=s;for(;--u>=0&&l[u]==="\\";)a=!a;return a?"|":" |"}),r=n.split(/ \|/);let o=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length{const i=o.match(/^\s+/);if(i===null)return o;const[s]=i;return s.length>=r.length?o.slice(r.length):o}).join(` +`)}class qg{constructor(e){ct(this,"options");ct(this,"rules");ct(this,"lexer");this.options=e||Sl}space(e){const n=this.rules.block.newline.exec(e);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(e){const n=this.rules.block.code.exec(e);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:ep(r,` +`)}}}fences(e){const n=this.rules.block.fences.exec(e);if(n){const r=n[0],o=Yhe(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:o}}}heading(e){const n=this.rules.block.heading.exec(e);if(n){let r=n[2].trim();if(/#$/.test(r)){const o=ep(r,"#");(this.options.pedantic||!o||/ $/.test(o))&&(r=o.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const n=this.rules.block.hr.exec(e);if(n)return{type:"hr",raw:n[0]}}blockquote(e){const n=this.rules.block.blockquote.exec(e);if(n){const r=ep(n[0].replace(/^ *>[ \t]?/gm,""),` +`),o=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(r);return this.lexer.state.top=o,{type:"blockquote",raw:n[0],tokens:i,text:r}}}list(e){let n=this.rules.block.list.exec(e);if(n){let r=n[1].trim();const o=r.length>1,i={type:"list",raw:"",ordered:o,start:o?+r.slice(0,-1):"",loose:!1,items:[]};r=o?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=o?r:"[*+-]");const s=new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`);let l="",a="",u=!1;for(;e;){let c=!1;if(!(n=s.exec(e))||this.rules.block.hr.test(e))break;l=n[0],e=e.substring(l.length);let d=n[2].split(` +`,1)[0].replace(/^\t+/,v=>" ".repeat(3*v.length)),h=e.split(` +`,1)[0],f=0;this.options.pedantic?(f=2,a=d.trimStart()):(f=n[2].search(/[^ ]/),f=f>4?1:f,a=d.slice(f),f+=n[1].length);let p=!1;if(!d&&/^ *$/.test(h)&&(l+=h+` +`,e=e.substring(h.length+1),c=!0),!c){const v=new RegExp(`^ {0,${Math.min(3,f-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),y=new RegExp(`^ {0,${Math.min(3,f-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),b=new RegExp(`^ {0,${Math.min(3,f-1)}}(?:\`\`\`|~~~)`),w=new RegExp(`^ {0,${Math.min(3,f-1)}}#`);for(;e;){const k=e.split(` +`,1)[0];if(h=k,this.options.pedantic&&(h=h.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),b.test(h)||w.test(h)||v.test(h)||y.test(e))break;if(h.search(/[^ ]/)>=f||!h.trim())a+=` +`+h.slice(f);else{if(p||d.search(/[^ ]/)>=4||b.test(d)||w.test(d)||y.test(d))break;a+=` +`+h}!p&&!h.trim()&&(p=!0),l+=k+` +`,e=e.substring(k.length+1),d=h.slice(f)}}i.loose||(u?i.loose=!0:/\n *\n *$/.test(l)&&(u=!0));let g=null,m;this.options.gfm&&(g=/^\[[ xX]\] /.exec(a),g&&(m=g[0]!=="[ ] ",a=a.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:l,task:!!g,checked:m,loose:!1,text:a,tokens:[]}),i.raw+=l}i.items[i.items.length-1].raw=l.trimEnd(),i.items[i.items.length-1].text=a.trimEnd(),i.raw=i.raw.trimEnd();for(let c=0;cf.type==="space"),h=d.length>0&&d.some(f=>/\n.*\n/.test(f.raw));i.loose=h}if(i.loose)for(let c=0;c$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:o,title:i}}}table(e){const n=this.rules.block.table.exec(e);if(n){if(!/[:|]/.test(n[2]))return;const r={type:"table",raw:n[0],header:A_(n[1]).map(o=>({text:o,tokens:[]})),align:n[2].replace(/^\||\| *$/g,"").split("|"),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(` +`):[]};if(r.header.length===r.align.length){let o=r.align.length,i,s,l,a;for(i=0;i({text:u,tokens:[]}));for(o=r.header.length,s=0;s/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(e){const n=this.rules.inline.link.exec(e);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;const s=ep(r.slice(0,-1),"\\");if((r.length-s.length)%2===0)return}else{const s=Khe(n[2],"()");if(s>-1){const a=(n[0].indexOf("!")===0?5:4)+n[1].length+s;n[2]=n[2].substring(0,s),n[0]=n[0].substring(0,a).trim(),n[3]=""}}let o=n[2],i="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);s&&(o=s[1],i=s[3])}else i=n[3]?n[3].slice(1,-1):"";return o=o.trim(),/^$/.test(r)?o=o.slice(1):o=o.slice(1,-1)),__(n,{href:o&&o.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(e,n){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let o=(r[2]||r[1]).replace(/\s+/g," ");if(o=n[o.toLowerCase()],!o){const i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return __(r,o,r[0],this.lexer)}}emStrong(e,n,r=""){let o=this.rules.inline.emStrong.lDelim.exec(e);if(!o||o[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(o[1]||o[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const s=[...o[0]].length-1;let l,a,u=s,c=0;const d=o[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(d.lastIndex=0,n=n.slice(-1*e.length+s);(o=d.exec(n))!=null;){if(l=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!l)continue;if(a=[...l].length,o[3]||o[4]){u+=a;continue}else if((o[5]||o[6])&&s%3&&!((s+a)%3)){c+=a;continue}if(u-=a,u>0)continue;a=Math.min(a,a+u+c);const h=[...o[0]][0].length,f=e.slice(0,s+o.index+h+a);if(Math.min(s,a)%2){const g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}const p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){const n=this.rules.inline.code.exec(e);if(n){let r=n[2].replace(/\n/g," ");const o=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return o&&i&&(r=r.substring(1,r.length-1)),r=Pr(r,!0),{type:"codespan",raw:n[0],text:r}}}br(e){const n=this.rules.inline.br.exec(e);if(n)return{type:"br",raw:n[0]}}del(e){const n=this.rules.inline.del.exec(e);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(e){const n=this.rules.inline.autolink.exec(e);if(n){let r,o;return n[2]==="@"?(r=Pr(n[1]),o="mailto:"+r):(r=Pr(n[1]),o=r),{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}url(e){let n;if(n=this.rules.inline.url.exec(e)){let r,o;if(n[2]==="@")r=Pr(n[0]),o="mailto:"+r;else{let i;do i=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(i!==n[0]);r=Pr(n[0]),n[1]==="www."?o="http://"+n[0]:o=n[0]}return{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){const n=this.rules.inline.text.exec(e);if(n){let r;return this.lexer.state.inRawBlock?r=n[0]:r=Pr(n[0]),{type:"text",raw:n[0],text:r}}}}const Se={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}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\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 *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Xg,lheading:/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};Se._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;Se._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;Se.def=st(Se.def).replace("label",Se._label).replace("title",Se._title).getRegex();Se.bullet=/(?:[*+-]|\d{1,9}[.)])/;Se.listItemStart=st(/^( *)(bull) */).replace("bull",Se.bullet).getRegex();Se.list=st(Se.list).replace(/bull/g,Se.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Se.def.source+")").getRegex();Se._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";Se._comment=/|$)/;Se.html=st(Se.html,"i").replace("comment",Se._comment).replace("tag",Se._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();Se.lheading=st(Se.lheading).replace(/bull/g,Se.bullet).getRegex();Se.paragraph=st(Se._paragraph).replace("hr",Se.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").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",Se._tag).getRegex();Se.blockquote=st(Se.blockquote).replace("paragraph",Se.paragraph).getRegex();Se.normal={...Se};Se.gfm={...Se.normal,table:"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};Se.gfm.table=st(Se.gfm.table).replace("hr",Se.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").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",Se._tag).getRegex();Se.gfm.paragraph=st(Se._paragraph).replace("hr",Se.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Se.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",Se._tag).getRegex();Se.pedantic={...Se.normal,html:st(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Se._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:Xg,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:st(Se.normal._paragraph).replace("hr",Se.hr).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",Se.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const ue={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Xg,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:Xg,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`^|~";ue.punctuation=st(ue.punctuation,"u").replace(/punctuation/g,ue._punctuation).getRegex();ue.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g;ue.anyPunctuation=/\\[punct]/g;ue._escapes=/\\([punct])/g;ue._comment=st(Se._comment).replace("(?:-->|$)","-->").getRegex();ue.emStrong.lDelim=st(ue.emStrong.lDelim,"u").replace(/punct/g,ue._punctuation).getRegex();ue.emStrong.rDelimAst=st(ue.emStrong.rDelimAst,"gu").replace(/punct/g,ue._punctuation).getRegex();ue.emStrong.rDelimUnd=st(ue.emStrong.rDelimUnd,"gu").replace(/punct/g,ue._punctuation).getRegex();ue.anyPunctuation=st(ue.anyPunctuation,"gu").replace(/punct/g,ue._punctuation).getRegex();ue._escapes=st(ue._escapes,"gu").replace(/punct/g,ue._punctuation).getRegex();ue._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;ue._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])?)+(?![-_])/;ue.autolink=st(ue.autolink).replace("scheme",ue._scheme).replace("email",ue._email).getRegex();ue._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;ue.tag=st(ue.tag).replace("comment",ue._comment).replace("attribute",ue._attribute).getRegex();ue._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;ue._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;ue._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;ue.link=st(ue.link).replace("label",ue._label).replace("href",ue._href).replace("title",ue._title).getRegex();ue.reflink=st(ue.reflink).replace("label",ue._label).replace("ref",Se._label).getRegex();ue.nolink=st(ue.nolink).replace("ref",Se._label).getRegex();ue.reflinkSearch=st(ue.reflinkSearch,"g").replace("reflink",ue.reflink).replace("nolink",ue.nolink).getRegex();ue.normal={...ue};ue.pedantic={...ue.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:st(/^!?\[(label)\]\((.*?)\)/).replace("label",ue._label).getRegex(),reflink:st(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ue._label).getRegex()};ue.gfm={...ue.normal,escape:st(ue.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]*?(?:(?=[\\a+" ".repeat(u.length));let r,o,i,s;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(l=>(r=l.call({lexer:this},e,n))?(e=e.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=` +`:n.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` +`+r.raw,o.text+=` +`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` +`+r.raw,o.text+=` +`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),n.push(r);continue}if(i=e,this.options.extensions&&this.options.extensions.startBlock){let l=1/0;const a=e.slice(1);let u;this.options.extensions.startBlock.forEach(c=>{u=c.call({lexer:this},a),typeof u=="number"&&u>=0&&(l=Math.min(l,u))}),l<1/0&&l>=0&&(i=e.substring(0,l+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){o=n[n.length-1],s&&o.type==="paragraph"?(o.raw+=` +`+r.raw,o.text+=` +`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r),s=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length),o=n[n.length-1],o&&o.type==="text"?(o.raw+=` +`+r.raw,o.text+=` +`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(e){const l="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){let r,o,i,s=e,l,a,u;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)c.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(l=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,l.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(a||(u=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(r=c.call({lexer:this},e,n))?(e=e.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(e,s,u)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),n.push(r);continue}if(i=e,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const d=e.slice(1);let h;this.options.extensions.startInline.forEach(f=>{h=f.call({lexer:this},d),typeof h=="number"&&h>=0&&(c=Math.min(c,h))}),c<1/0&&c>=0&&(i=e.substring(0,c+1))}if(r=this.tokenizer.inlineText(i)){e=e.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(u=r.raw.slice(-1)),a=!0,o=n[n.length-1],o&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(e){const c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}}class Zg{constructor(e){ct(this,"options");this.options=e||Sl}code(e,n,r){var i;const o=(i=(n||"").match(/^\S*/))==null?void 0:i[0];return e=e.replace(/\n$/,"")+` +`,o?'
    '+(r?e:Pr(e,!0))+`
    +`:"
    "+(r?e:Pr(e,!0))+`
    +`}blockquote(e){return`
    +${e}
    +`}html(e,n){return e}heading(e,n,r){return`${e} `}hr(){return`
    -`}list(t,r,n){const o=r?"ol":"ul",i=r&&n!==1?' start="'+n+'"':"";return"<"+o+i+`> -`+t+" -`}listitem(t,r,n){return`
  • ${t}
  • -`}checkbox(t){return"'}paragraph(t){return`

    ${t}

    -`}table(t,r){return r&&(r=`${r}`),` +`}list(e,n,r){const o=n?"ol":"ul",i=n&&r!==1?' start="'+r+'"':"";return"<"+o+i+`> +`+e+" +`}listitem(e,n,r){return`
  • ${e}
  • +`}checkbox(e){return"'}paragraph(e){return`

    ${e}

    +`}table(e,n){return n&&(n=`${n}`),`
    -`+t+` -`+r+`
    -`}tablerow(t){return` -${t} -`}tablecell(t,r){const n=r.header?"th":"td";return(r.align?`<${n} align="${r.align}">`:`<${n}>`)+t+` -`}strong(t){return`${t}`}em(t){return`${t}`}codespan(t){return`${t}`}br(){return"
    "}del(t){return`${t}`}link(t,r,n){const o=Z2(t);if(o===null)return n;t=o;let i='
    ",i}image(t,r,n){const o=Z2(t);if(o===null)return n;t=o;let i=`${n}0&&p.tokens[0].type==="paragraph"?(p.tokens[0].text=b+" "+p.tokens[0].text,p.tokens[0].tokens&&p.tokens[0].tokens.length>0&&p.tokens[0].tokens[0].type==="text"&&(p.tokens[0].tokens[0].text=b+" "+p.tokens[0].tokens[0].text)):p.tokens.unshift({type:"text",text:b+" "}):m+=b+" "}m+=this.parse(p.tokens,c),u+=this.renderer.listitem(m,h,!!f)}n+=this.renderer.list(u,a,l);continue}case"html":{const s=i;n+=this.renderer.html(s.text,s.block);continue}case"paragraph":{const s=i;n+=this.renderer.paragraph(this.parseInline(s.tokens));continue}case"text":{let s=i,a=s.tokens?this.parseInline(s.tokens):s.text;for(;o+1{n=n.concat(this.walkTokens(a[l],r))}):a.tokens&&(n=n.concat(this.walkTokens(a.tokens,r)))}}return n}use(...t){const r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{const o={...n};if(o.async=this.defaults.async||o.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const s=r.renderers[i.name];s?r.renderers[i.name]=function(...a){let l=i.renderer.apply(this,a);return l===!1&&(l=s.apply(this,a)),l}:r.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const s=r[i.level];s?s.unshift(i.tokenizer):r[i.level]=[i.tokenizer],i.start&&(i.level==="block"?r.startBlock?r.startBlock.push(i.start):r.startBlock=[i.start]:i.level==="inline"&&(r.startInline?r.startInline.push(i.start):r.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(r.childTokens[i.name]=i.childTokens)}),o.extensions=r),n.renderer){const i=this.defaults.renderer||new Uh(this.defaults);for(const s in n.renderer){const a=n.renderer[s],l=s,c=i[l];i[l]=(...u)=>{let d=a.apply(i,u);return d===!1&&(d=c.apply(i,u)),d||""}}o.renderer=i}if(n.tokenizer){const i=this.defaults.tokenizer||new Fh(this.defaults);for(const s in n.tokenizer){const a=n.tokenizer[s],l=s,c=i[l];i[l]=(...u)=>{let d=a.apply(i,u);return d===!1&&(d=c.apply(i,u)),d}}o.tokenizer=i}if(n.hooks){const i=this.defaults.hooks||new Fu;for(const s in n.hooks){const a=n.hooks[s],l=s,c=i[l];Fu.passThroughHooks.has(s)?i[l]=u=>{if(this.defaults.async)return Promise.resolve(a.call(i,u)).then(p=>c.call(i,p));const d=a.call(i,u);return c.call(i,d)}:i[l]=(...u)=>{let d=a.apply(i,u);return d===!1&&(d=c.apply(i,u)),d}}o.hooks=i}if(n.walkTokens){const i=this.defaults.walkTokens,s=n.walkTokens;o.walkTokens=function(a){let l=[];return l.push(s.call(this,a)),i&&(l=l.concat(i.call(this,a))),l}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return wo.lex(t,r??this.defaults)}parser(t,r){return To.parse(t,r??this.defaults)}}Pd=new WeakSet,Iy=function(t,r){return(n,o)=>{const i={...o},s={...this.defaults,...i};this.defaults.async===!0&&i.async===!1&&(s.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),s.async=!0);const a=pp(this,jh,gM).call(this,!!s.silent,!!s.async);if(typeof n>"u"||n===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(n):n).then(l=>t(l,s)).then(l=>s.walkTokens?Promise.all(this.walkTokens(l,s.walkTokens)).then(()=>l):l).then(l=>r(l,s)).then(l=>s.hooks?s.hooks.postprocess(l):l).catch(a);try{s.hooks&&(n=s.hooks.preprocess(n));const l=t(n,s);s.walkTokens&&this.walkTokens(l,s.walkTokens);let c=r(l,s);return s.hooks&&(c=s.hooks.postprocess(c)),c}catch(l){return a(l)}}},jh=new WeakSet,gM=function(t,r){return n=>{if(n.message+=` -Please report this to https://github.com/markedjs/marked.`,t){const o="

    An error occurred:

    "+on(n.message+"",!0)+"
    ";return r?Promise.resolve(o):o}if(r)return Promise.reject(n);throw n}};const Ta=new Tue;function Pe(e,t){return Ta.parse(e,t)}Pe.options=Pe.setOptions=function(e){return Ta.setOptions(e),Pe.defaults=Ta.defaults,fM(Pe.defaults),Pe};Pe.getDefaults=ox;Pe.defaults=Da;Pe.use=function(...e){return Ta.use(...e),Pe.defaults=Ta.defaults,fM(Pe.defaults),Pe};Pe.walkTokens=function(e,t){return Ta.walkTokens(e,t)};Pe.parseInline=Ta.parseInline;Pe.Parser=To;Pe.parser=To.parse;Pe.Renderer=Uh;Pe.TextRenderer=ix;Pe.Lexer=wo;Pe.lexer=wo.lex;Pe.Tokenizer=Fh;Pe.Hooks=Fu;Pe.parse=Pe;Pe.options;Pe.setOptions;Pe.use;Pe.walkTokens;Pe.parseInline;To.parse;wo.lex;/* +`+e+` +`+n+` +`}tablerow(e){return` +${e} +`}tablecell(e,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+e+` +`}strong(e){return`${e}`}em(e){return`${e}`}codespan(e){return`${e}`}br(){return"
    "}del(e){return`${e}`}link(e,n,r){const o=T_(e);if(o===null)return r;e=o;let i='
    ",i}image(e,n,r){const o=T_(e);if(o===null)return r;e=o;let i=`${r}0&&h.tokens[0].type==="paragraph"?(h.tokens[0].text=m+" "+h.tokens[0].text,h.tokens[0].tokens&&h.tokens[0].tokens.length>0&&h.tokens[0].tokens[0].type==="text"&&(h.tokens[0].tokens[0].text=m+" "+h.tokens[0].tokens[0].text)):h.tokens.unshift({type:"text",text:m+" "}):g+=m+" "}g+=this.parse(h.tokens,u),c+=this.renderer.listitem(g,p,!!f)}r+=this.renderer.list(c,l,a);continue}case"html":{const s=i;r+=this.renderer.html(s.text,s.block);continue}case"paragraph":{const s=i;r+=this.renderer.paragraph(this.parseInline(s.tokens));continue}case"text":{let s=i,l=s.tokens?this.parseInline(s.tokens):s.text;for(;o+1{r=r.concat(this.walkTokens(l[a],n))}):l.tokens&&(r=r.concat(this.walkTokens(l.tokens,n)))}}return r}use(...e){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{const o={...r};if(o.async=this.defaults.async||o.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const s=n.renderers[i.name];s?n.renderers[i.name]=function(...l){let a=i.renderer.apply(this,l);return a===!1&&(a=s.apply(this,l)),a}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const s=n[i.level];s?s.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&(i.level==="block"?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:i.level==="inline"&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),o.extensions=n),r.renderer){const i=this.defaults.renderer||new Zg(this.defaults);for(const s in r.renderer){const l=r.renderer[s],a=s,u=i[a];i[a]=(...c)=>{let d=l.apply(i,c);return d===!1&&(d=u.apply(i,c)),d||""}}o.renderer=i}if(r.tokenizer){const i=this.defaults.tokenizer||new qg(this.defaults);for(const s in r.tokenizer){const l=r.tokenizer[s],a=s,u=i[a];i[a]=(...c)=>{let d=l.apply(i,c);return d===!1&&(d=u.apply(i,c)),d}}o.tokenizer=i}if(r.hooks){const i=this.defaults.hooks||new zd;for(const s in r.hooks){const l=r.hooks[s],a=s,u=i[a];zd.passThroughHooks.has(s)?i[a]=c=>{if(this.defaults.async)return Promise.resolve(l.call(i,c)).then(h=>u.call(i,h));const d=l.call(i,c);return u.call(i,d)}:i[a]=(...c)=>{let d=l.apply(i,c);return d===!1&&(d=u.apply(i,c)),d}}o.hooks=i}if(r.walkTokens){const i=this.defaults.walkTokens,s=r.walkTokens;o.walkTokens=function(l){let a=[];return a.push(s.call(this,l)),i&&(a=a.concat(i.call(this,l))),a}}this.defaults={...this.defaults,...o}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,n){return ri.lex(e,n??this.defaults)}parser(e,n){return oi.parse(e,n??this.defaults)}}Nh=new WeakSet,tb=function(e,n){return(r,o)=>{const i={...o},s={...this.defaults,...i};this.defaults.async===!0&&i.async===!1&&(s.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),s.async=!0);const l=xf(this,tm,r$).call(this,!!s.silent,!!s.async);if(typeof r>"u"||r===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(r):r).then(a=>e(a,s)).then(a=>s.walkTokens?Promise.all(this.walkTokens(a,s.walkTokens)).then(()=>a):a).then(a=>n(a,s)).then(a=>s.hooks?s.hooks.postprocess(a):a).catch(l);try{s.hooks&&(r=s.hooks.preprocess(r));const a=e(r,s);s.walkTokens&&this.walkTokens(a,s.walkTokens);let u=n(a,s);return s.hooks&&(u=s.hooks.postprocess(u)),u}catch(a){return l(a)}}},tm=new WeakSet,r$=function(e,n){return r=>{if(r.message+=` +Please report this to https://github.com/markedjs/marked.`,e){const o="

    An error occurred:

    "+Pr(r.message+"",!0)+"
    ";return n?Promise.resolve(o):o}if(n)return Promise.reject(r);throw r}};const fl=new Xhe;function it(t,e){return fl.parse(t,e)}it.options=it.setOptions=function(t){return fl.setOptions(t),it.defaults=fl.defaults,e$(it.defaults),it};it.getDefaults=ME;it.defaults=Sl;it.use=function(...t){return fl.use(...t),it.defaults=fl.defaults,e$(it.defaults),it};it.walkTokens=function(t,e){return fl.walkTokens(t,e)};it.parseInline=fl.parseInline;it.Parser=oi;it.parser=oi.parse;it.Renderer=Zg;it.TextRenderer=OE;it.Lexer=ri;it.lexer=ri.lex;it.Tokenizer=qg;it.Hooks=zd;it.parse=it;it.options;it.setOptions;it.use;it.walkTokens;it.parseInline;oi.parse;ri.lex;/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */const yM=/[&<>"']/,Cue=new RegExp(yM.source,"g"),vM=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Oue=new RegExp(vM.source,"g"),Aue={"&":"&","<":"<",">":">",'"':""","'":"'"},eC=e=>Aue[e];function tC(e,t){if(t){if(yM.test(e))return e.replace(Cue,eC)}else if(vM.test(e))return e.replace(Oue,eC);return e}/* + */const o$=/[&<>"']/,qhe=new RegExp(o$.source,"g"),i$=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Zhe=new RegExp(i$.source,"g"),Qhe={"&":"&","<":"<",">":">",'"':""","'":"'"},R_=t=>Qhe[t];function M_(t,e){if(e){if(o$.test(t))return t.replace(qhe,R_)}else if(i$.test(t))return t.replace(Zhe,R_);return t}/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */const Nue=Yh(Id),yg=new Nue({hr:"---",codeBlockStyle:"fenced"});yg.addRule("link2",{filter:(e,t)=>t.linkStyle==="inlined"&&e.nodeName==="A"&&!!e.getAttribute("href"),replacement:function(e,t){const r=t,n=r.getAttribute("href");if(!n)return"";const o=My(r.getAttribute("title"));return o?`[${e}](${n} '${o}')`:`[${e}](${n})`}});yg.addRule("img2",{filter:"img",replacement:(e,t)=>{const r=t,n=r.getAttribute("src")||"";if(!n)return"";const o=My(r.getAttribute("alt")),i=My(r.getAttribute("title"));return i?`![${o}](${n} '${i}')`:`![${o}](${n})`}});const Rue="data-code-block-language";yg.addRule("code2",{filter:(e,t)=>t.codeBlockStyle==="fenced"&&e.nodeName==="PRE"&&e.firstChild!==null&&e.firstChild.nodeName==="CODE",replacement:function(e,t,r){const n=t.firstChild.getAttribute(Rue),o=t.firstChild.textContent,i=r.fence.charAt(0);let s=3;const a=new RegExp("^"+i+"{3,}","gm");let l;for(;l=a.exec(o);)l[0].length>=s&&(s=l[0].length+1);const c=Mue(i,s);return` + */const Jhe=im(Rh),_v=new Jhe({hr:"---",codeBlockStyle:"fenced"});_v.addRule("link2",{filter:(t,e)=>e.linkStyle==="inlined"&&t.nodeName==="A"&&!!t.getAttribute("href"),replacement:function(t,e){const n=e,r=n.getAttribute("href");if(!r)return"";const o=nb(n.getAttribute("title"));return o?`[${t}](${r} '${o}')`:`[${t}](${r})`}});_v.addRule("img2",{filter:"img",replacement:(t,e)=>{const n=e,r=n.getAttribute("src")||"";if(!r)return"";const o=nb(n.getAttribute("alt")),i=nb(n.getAttribute("title"));return i?`![${o}](${r} '${i}')`:`![${o}](${r})`}});const efe="data-code-block-language";_v.addRule("code2",{filter:(t,e)=>e.codeBlockStyle==="fenced"&&t.nodeName==="PRE"&&t.firstChild!==null&&t.firstChild.nodeName==="CODE",replacement:function(t,e,n){const r=e.firstChild.getAttribute(efe),o=e.firstChild.textContent,i=n.fence.charAt(0);let s=3;const l=new RegExp("^"+i+"{3,}","gm");let a;for(;a=l.exec(o);)a[0].length>=s&&(s=a[0].length+1);const u=rfe(i,s);return` -${c}${n} +${u}${r} ${o.replace(/\n$/,"")} -${c} +${u} -`}});function My(e){return(e==null?void 0:e.replace(/(\n+\s*)+/g,` -`))||""}Pe.use({renderer:{code:(e,t,r)=>{var o;const n=(o=(t||"").match(/^\S*/))==null?void 0:o[0];return e=e.replace(/\n$/,""),r||(e=tC(e,!0)),n?`
    ${e}
    -`:`
    ${e}
    -`}}});function _ue(e){return yg.turndown(e)}function Iue(e){return Pe(e,{gfm:!0})}function Mue(e,t){return Array(t+1).join(e)}/* +`}});function nb(t){return(t==null?void 0:t.replace(/(\n+\s*)+/g,` +`))||""}it.use({renderer:{code:(t,e,n)=>{var o;const r=(o=(e||"").match(/^\S*/))==null?void 0:o[0];return t=t.replace(/\n$/,""),n||(t=M_(t,!0)),r?`
    ${t}
    +`:`
    ${t}
    +`}}});function tfe(t){return _v.turndown(t)}function nfe(t){return it(t,{gfm:!0})}function rfe(t,e){return Array(e+1).join(t)}/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */const hi=e=>{const{type:t}=e;return t==="Assets"?A.jsxs("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 28 28",children:[A.jsx("path",{d:"M21.875 28h-15.75c-3.413 0-6.125-2.713-6.125-6.125v-15.75c0-3.413 2.712-6.125 6.125-6.125h15.75c3.412 0 6.125 2.712 6.125 6.125v15.75c0 3.412-2.713 6.125-6.125 6.125zM6.125 1.75c-2.45 0-4.375 1.925-4.375 4.375v15.75c0 2.45 1.925 4.375 4.375 4.375h15.75c2.45 0 4.375-1.925 4.375-4.375v-15.75c0-2.45-1.925-4.375-4.375-4.375h-15.75z"}),A.jsx("path",{d:"M21.088 23.537h-11.988c-0.35 0-0.612-0.175-0.787-0.525s-0.088-0.7 0.088-0.962l8.225-9.713c0.175-0.175 0.438-0.35 0.7-0.35s0.525 0.175 0.7 0.35l5.25 7.525c0.088 0.087 0.088 0.175 0.088 0.262 0.438 1.225 0.087 2.012-0.175 2.45-0.613 0.875-1.925 0.963-2.1 0.963zM11.025 21.787h10.15c0.175 0 0.612-0.088 0.7-0.262 0.088-0.088 0.088-0.35 0-0.7l-4.55-6.475-6.3 7.438z"}),A.jsx("path",{d:"M9.1 13.737c-2.1 0-3.85-1.75-3.85-3.85s1.75-3.85 3.85-3.85 3.85 1.75 3.85 3.85-1.663 3.85-3.85 3.85zM9.1 7.788c-1.138 0-2.1 0.875-2.1 2.1s0.962 2.1 2.1 2.1 2.1-0.962 2.1-2.1-0.875-2.1-2.1-2.1z"})]}):t==="Contents"?A.jsxs("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 28 28",children:[A.jsx("path",{d:"M21.875 28h-15.75c-3.413 0-6.125-2.713-6.125-6.125v-15.75c0-3.413 2.712-6.125 6.125-6.125h15.75c3.412 0 6.125 2.712 6.125 6.125v15.75c0 3.412-2.713 6.125-6.125 6.125zM6.125 1.75c-2.45 0-4.375 1.925-4.375 4.375v15.75c0 2.45 1.925 4.375 4.375 4.375h15.75c2.45 0 4.375-1.925 4.375-4.375v-15.75c0-2.45-1.925-4.375-4.375-4.375h-15.75z"}),A.jsx("path",{d:"M13.125 12.25h-5.775c-1.575 0-2.888-1.313-2.888-2.888v-2.013c0-1.575 1.313-2.888 2.888-2.888h5.775c1.575 0 2.887 1.313 2.887 2.888v2.013c0 1.575-1.312 2.888-2.887 2.888zM7.35 6.212c-0.613 0-1.138 0.525-1.138 1.138v2.012c0 0.612 0.525 1.138 1.138 1.138h5.775c0.612 0 1.138-0.525 1.138-1.138v-2.013c0-0.612-0.525-1.138-1.138-1.138h-5.775z"}),A.jsx("path",{d:"M22.662 16.713h-17.325c-0.525 0-0.875-0.35-0.875-0.875s0.35-0.875 0.875-0.875h17.237c0.525 0 0.875 0.35 0.875 0.875s-0.35 0.875-0.787 0.875z"}),A.jsx("path",{d:"M15.138 21.262h-9.8c-0.525 0-0.875-0.35-0.875-0.875s0.35-0.875 0.875-0.875h9.713c0.525 0 0.875 0.35 0.875 0.875s-0.35 0.875-0.787 0.875z"})]}):t==="Check"?A.jsx("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",width:"1rem",height:"1rem",children:A.jsx("path",{d:"M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"})}):t==="Cancel"?A.jsx("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",width:"1rem",height:"1rem",children:A.jsx("path",{d:"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"})}):t==="Edit"?A.jsx("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1rem",height:"1rem",children:A.jsx("path",{d:"M15.728 9.686l-1.414-1.414L5 17.586V19h1.414l9.314-9.314zm1.414-1.414l1.414-1.414-1.414-1.414-1.414 1.414 1.414 1.414zM7.242 21H3v-4.243L16.435 3.322a1 1 0 0 1 1.414 0l2.829 2.829a1 1 0 0 1 0 1.414L7.243 21z"})}):null},Lue=({node:e})=>{const t=tp(Dd),r=e.attrs.contentId,n=e.attrs.contentTitle,o=e.attrs.schemaName,i=t.options.onEditContent;return A.jsxs("div",{className:"squidex-editor-content-link",children:[A.jsx("button",{type:"button",className:"squidex-editor-button",onClick:()=>i(o,r),children:A.jsx(hi,{type:"Contents"})}),A.jsx("div",{className:"squidex-editor-content-schema",children:o}),A.jsx("div",{className:"squidex-editor-content-name",children:n})]})};var Due=Object.defineProperty,Pue=Object.getOwnPropertyDescriptor,bM=(e,t,r,n)=>{for(var o=n>1?void 0:n?Pue(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Due(t,r,o),o};let Dd=class extends or{constructor(t){super({...t,disableExtraAttributes:!0});Fe(this,"ReactComponent",Lue)}get name(){return"contentLink"}createTags(){return[ie.InlineNode,ie.Media]}createNodeSpec(){return{inline:!0,attrs:{contentId:{default:""},contentTitle:{default:""},schemaName:{default:""}},toDOM:t=>["a",{href:`${this.options.baseUrl}/api/content/${this.options.appName}/${t.attrs.schemaName}/${t.attrs.contentId}`},t.attrs.contentTitle],parseDOM:[{tag:"a[href]",getAttrs:t=>{const r=t.getAttribute("href");if(!r)return!1;const n=gue(r,this.options.baseUrl,this.options.appName);return n?{contentId:n.id,contentTitle:t.innerText,schemaName:n.schemaName}:!1},priority:1e5}]}}addContent(t,r){return this.store.commands.insertNode.original(this.type,{attrs:{contentId:t.id,contentTitle:t.title,schemaName:t.schemaName},selection:r})}};bM([Z({})],Dd.prototype,"addContent",1);Dd=bM([ye({defaultOptions:{}})],Dd);const zue=e=>{const{appName:t,baseUrl:r,onEditNode:n,onEditAsset:o,node:i,getPosition:s}=e,a=mue(i.attrs.src,r,t);return A.jsxs("div",{style:{position:"relative"},className:"squidex-editor-image-view",children:[A.jsx("img",{className:"squidex-editor-image-element",src:i.attrs.src}),A.jsxs("div",{className:"squidex-editor-image-buttons",children:[A.jsx("button",{type:"button",className:"squidex-editor-button",onClick:()=>n({node:i,getPos:s}),children:A.jsx(hi,{type:"Edit"})}),a&&A.jsx("button",{type:"button",className:"squidex-editor-button",onClick:()=>o(a.id),children:A.jsx(hi,{type:"Assets"})})]}),a&&A.jsx("div",{className:"squidex-editor-image-info",children:"Asset"})]})};/* + */const xo=t=>{const{type:e}=t;return e==="Assets"?j.jsxs("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 28 28",children:[j.jsx("path",{d:"M21.875 28h-15.75c-3.413 0-6.125-2.713-6.125-6.125v-15.75c0-3.413 2.712-6.125 6.125-6.125h15.75c3.412 0 6.125 2.712 6.125 6.125v15.75c0 3.412-2.713 6.125-6.125 6.125zM6.125 1.75c-2.45 0-4.375 1.925-4.375 4.375v15.75c0 2.45 1.925 4.375 4.375 4.375h15.75c2.45 0 4.375-1.925 4.375-4.375v-15.75c0-2.45-1.925-4.375-4.375-4.375h-15.75z"}),j.jsx("path",{d:"M21.088 23.537h-11.988c-0.35 0-0.612-0.175-0.787-0.525s-0.088-0.7 0.088-0.962l8.225-9.713c0.175-0.175 0.438-0.35 0.7-0.35s0.525 0.175 0.7 0.35l5.25 7.525c0.088 0.087 0.088 0.175 0.088 0.262 0.438 1.225 0.087 2.012-0.175 2.45-0.613 0.875-1.925 0.963-2.1 0.963zM11.025 21.787h10.15c0.175 0 0.612-0.088 0.7-0.262 0.088-0.088 0.088-0.35 0-0.7l-4.55-6.475-6.3 7.438z"}),j.jsx("path",{d:"M9.1 13.737c-2.1 0-3.85-1.75-3.85-3.85s1.75-3.85 3.85-3.85 3.85 1.75 3.85 3.85-1.663 3.85-3.85 3.85zM9.1 7.788c-1.138 0-2.1 0.875-2.1 2.1s0.962 2.1 2.1 2.1 2.1-0.962 2.1-2.1-0.875-2.1-2.1-2.1z"})]}):e==="Contents"?j.jsxs("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 28 28",children:[j.jsx("path",{d:"M21.875 28h-15.75c-3.413 0-6.125-2.713-6.125-6.125v-15.75c0-3.413 2.712-6.125 6.125-6.125h15.75c3.412 0 6.125 2.712 6.125 6.125v15.75c0 3.412-2.713 6.125-6.125 6.125zM6.125 1.75c-2.45 0-4.375 1.925-4.375 4.375v15.75c0 2.45 1.925 4.375 4.375 4.375h15.75c2.45 0 4.375-1.925 4.375-4.375v-15.75c0-2.45-1.925-4.375-4.375-4.375h-15.75z"}),j.jsx("path",{d:"M13.125 12.25h-5.775c-1.575 0-2.888-1.313-2.888-2.888v-2.013c0-1.575 1.313-2.888 2.888-2.888h5.775c1.575 0 2.887 1.313 2.887 2.888v2.013c0 1.575-1.312 2.888-2.887 2.888zM7.35 6.212c-0.613 0-1.138 0.525-1.138 1.138v2.012c0 0.612 0.525 1.138 1.138 1.138h5.775c0.612 0 1.138-0.525 1.138-1.138v-2.013c0-0.612-0.525-1.138-1.138-1.138h-5.775z"}),j.jsx("path",{d:"M22.662 16.713h-17.325c-0.525 0-0.875-0.35-0.875-0.875s0.35-0.875 0.875-0.875h17.237c0.525 0 0.875 0.35 0.875 0.875s-0.35 0.875-0.787 0.875z"}),j.jsx("path",{d:"M15.138 21.262h-9.8c-0.525 0-0.875-0.35-0.875-0.875s0.35-0.875 0.875-0.875h9.713c0.525 0 0.875 0.35 0.875 0.875s-0.35 0.875-0.787 0.875z"})]}):e==="Check"?j.jsx("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",width:"1rem",height:"1rem",children:j.jsx("path",{d:"M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"})}):e==="Cancel"?j.jsx("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",width:"1rem",height:"1rem",children:j.jsx("path",{d:"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"})}):e==="Edit"?j.jsx("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1rem",height:"1rem",children:j.jsx("path",{d:"M15.728 9.686l-1.414-1.414L5 17.586V19h1.414l9.314-9.314zm1.414-1.414l1.414-1.414-1.414-1.414-1.414 1.414 1.414 1.414zM7.242 21H3v-4.243L16.435 3.322a1 1 0 0 1 1.414 0l2.829 2.829a1 1 0 0 1 0 1.414L7.243 21z"})}):e==="Preview"?j.jsxs("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"200 200 724 724",width:"1.2rem",height:"1rem",children:[j.jsx("path",{d:"M545 793.6H243.8c-11 0-20-9-20-20V250.4c0-11 9-20 20-20h432.4c11 0 20 9 20 20v131.8c0 11 9 20 20 20s20-9 20-20V250.4c0-33.1-26.9-60-60-60H243.8c-33.1 0-60 26.9-60 60v523.2c0 33.1 26.9 60 60 60H545c11 0 20-9 20-20s-8.9-20-20-20z"}),j.jsx("path",{d:"M834.6 789.8l-88.8-91.7c23.4-28.7 37.5-65.4 37.5-105.3 0-92.1-74.9-167-167-167s-167 74.9-167 167 74.9 167 167 167c37.8 0 72.7-12.6 100.7-33.9l89 91.8c3.9 4 9.1 6 14.3 6 5 0 10.1-1.9 14-5.7 7.8-7.6 8-20.3 0.3-28.2z m-218.4-69.9c-70 0-127-57-127-127s57-127 127-127 127 57 127 127-57 127-127 127zM565 382.2c0-11-9-20-20-20H308.7c-11 0-20 9-20 20s9 20 20 20H545c11.1 0 20-9 20-20zM443.5 493.5c0-11-9-20-20-20H308.7c-11 0-20 9-20 20s9 20 20 20h114.8c11.1 0 20-8.9 20-20zM308.7 584.8c-11 0-20 9-20 20s9 20 20 20h61.7c11 0 20-9 20-20s-9-20-20-20h-61.7z"})]}):j.jsx("span",{style:{height:"16px",lineHeight:"16px"},children:e})},ofe=({node:t})=>{const e=Jh(Ih),n=t.attrs.contentId,r=t.attrs.contentTitle,o=t.attrs.schemaName,i=e.options.onEditContent;return j.jsxs("div",{className:"squidex-editor-content-link",children:[j.jsx("button",{type:"button",className:"squidex-editor-button",onClick:()=>i(o,n),children:j.jsx(xo,{type:"Contents"})}),j.jsx("div",{className:"squidex-editor-content-schema",children:o}),j.jsx("div",{className:"squidex-editor-content-name",children:r})]})};var ife=Object.defineProperty,sfe=Object.getOwnPropertyDescriptor,s$=(t,e,n,r)=>{for(var o=r>1?void 0:r?sfe(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&ife(e,n,o),o};let Ih=class extends Pn{constructor(e){super({...e,disableExtraAttributes:!0});ct(this,"ReactComponent",ofe)}get name(){return"contentLink"}createTags(){return[Ee.InlineNode,Ee.Media]}createNodeSpec(){return{inline:!0,attrs:{contentId:{default:""},contentTitle:{default:""},schemaName:{default:""}},toDOM:e=>["a",{href:`${this.options.baseUrl}/api/content/${this.options.appName}/${e.attrs.schemaName}/${e.attrs.contentId}`},e.attrs.contentTitle],parseDOM:[{tag:"a[href]",getAttrs:e=>{const n=e.getAttribute("href");if(!n)return!1;const r=Bhe(n,this.options.baseUrl,this.options.appName);return r?{contentId:r.id,contentTitle:e.innerText,schemaName:r.schemaName}:!1},priority:1e5}]}}addContent(e,n){return this.store.commands.insertNode.original(this.type,{attrs:{contentId:e.id,contentTitle:e.title,schemaName:e.schemaName},selection:n})}};s$([de({})],Ih.prototype,"addContent",1);Ih=s$([Pe({defaultOptions:{}})],Ih);const afe=t=>{const{appName:e,baseUrl:n,onEditNode:r,onEditAsset:o,node:i,getPosition:s}=t,l=Fhe(i.attrs.src,n,e);return j.jsxs("div",{style:{position:"relative"},className:"squidex-editor-image-view",children:[j.jsx("img",{className:"squidex-editor-image-element",src:i.attrs.src}),j.jsxs("div",{className:"squidex-editor-image-buttons",children:[j.jsx("button",{type:"button",className:"squidex-editor-button",onClick:()=>r({node:i,getPos:s}),children:j.jsx(xo,{type:"Edit"})}),l&&j.jsx("button",{type:"button",className:"squidex-editor-button",onClick:()=>o(l.id),children:j.jsx(xo,{type:"Assets"})})]}),l&&j.jsx("div",{className:"squidex-editor-image-info",children:"Asset"})]})};/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */class $ue extends Ye{get name(){return"htmlCopy"}createPlugin(){return{props:{clipboardTextSerializer:this.options.copyAsHtml?r=>{const n=document.createElement("div");return n.append(un.fromSchema(this.store.schema).serializeFragment(r.content)),n.innerHTML}:void 0}}}}/* + */class lfe extends yt{get name(){return"htmlCopy"}createPlugin(){return{props:{clipboardTextSerializer:this.options.copyAsHtml?n=>{const r=document.createElement("div");return r.append(Ur.fromSchema(this.store.schema).serializeFragment(n.content)),r.innerHTML}:void 0}}}}/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */const Bue=({mode:e,onChange:t,state:r,value:n})=>{const{setContent:o}=$o(),{getMarkdown:i,getHTML:s}=rp(),a=S.useRef(null),l=S.useRef(!1),c=S.useRef(0),u=Qq();return S.useEffect(()=>{c.current+=1},[u]),S.useEffect(()=>{l.current=!!n&&n.length>0,a.current!==n&&(a.current=n,o(n||""),c.current=-1)},[o,n]),S.useEffect(()=>{if(!t)return;function d(){switch(e){case"Markdown":return i(r);default:return s(r)}}if(c.current<=0)return;let p=d().trim();p&&p.length>0&&Hue.indexOf(p)>=0&&(p=""),a.current!==p&&(!l.current&&p.length===0?t(void 0):t(p),a.current=p,l.current=!!p&&p.length>0)},[s,i,e,t,r]),null},Hue=["

    ",'

    ','

    '],Fue=({node:e,getPosition:t,view:r})=>{const n=S.useCallback(o=>{const i=r.state.tr.setNodeAttribute(t(),"html",o.target.value);r.dispatch(i)},[t,r]);return A.jsxs("div",{className:"squidex-editor-html",children:[A.jsx("div",{className:"squidex-editor-html-label",children:"Plain HTML"}),A.jsx("textarea",{spellCheck:"false",value:e.attrs.content,onChange:n})]})};var Uue=Object.defineProperty,Vue=Object.getOwnPropertyDescriptor,EM=(e,t,r,n)=>{for(var o=n>1?void 0:n?Vue(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Uue(t,r,o),o};let Vh=class extends or{constructor(){super({disableExtraAttributes:!0});Fe(this,"ReactComponent",Fue)}get name(){return"plainHtml"}createTags(){return[ie.Block,ie.TextBlock,ie.FormattingNode]}createNodeSpec(){return{attrs:{html:{default:""}},toDOM:t=>{const r=t.attrs.html;return["div",{class:"__editor_html"},...jue(r)]},parseDOM:[{tag:"div[class~=__editor_html]",getAttrs:t=>({content:t.innerHTML}),priority:1e4}]}}insertPlainHtml(t){return this.store.commands.insertNode.original(this.type,{attrs:{content:""},selection:t})}};EM([Z({})],Vh.prototype,"insertPlainHtml",1);Vh=EM([ye({defaultOptions:{}})],Vh);function jue(e){if(!e)return[""];const t=document.createElement("div");return t.innerHTML=e,kM(t)}function Gue(e){const t={};for(let r=0;r{const t=vc(),r=S.useCallback(async()=>{const n=await e();Kue(n)&&n.length>0&&t.insertText(n),t.run()},[t,e]);return A.jsx(mt,{commandName:"addImage",enabled:!0,onSelect:r,label:"Add AI generated Text",icon:A.jsx("span",{style:{height:"16px",lineHeight:"16px"},children:"AI"})})};function Kue(e){return typeof e=="string"||e instanceof String}const xM=e=>{const t=S.useRef(null);return S.useEffect(()=>{const r=window.requestAnimationFrame(()=>{var n;(n=t.current)==null||n.focus()});return()=>{window.cancelAnimationFrame(r)}},[]),A.jsx("input",{className:"squidex-editor-input",ref:t,...e})};/* + */const cfe=({mode:t,onChange:e,state:n,value:r})=>{const{setContent:o}=vi(),{getMarkdown:i,getHTML:s}=ef(),l=P.useRef(null),a=P.useRef(!1),u=P.useRef(0),c=yQ();return P.useEffect(()=>{u.current+=1},[c]),P.useEffect(()=>{a.current=!!r&&r.length>0,l.current!==r&&(l.current=r,o(r||""),u.current=-1)},[o,r]),P.useEffect(()=>{if(!e)return;function d(){switch(t){case"Markdown":return i(n);default:return s(n)}}if(u.current<=0)return;let h=d().trim();h&&h.length>0&&ufe.indexOf(h)>=0&&(h=""),l.current!==h&&(!a.current&&h.length===0?e(void 0):e(h),l.current=h,a.current=!!h&&h.length>0)},[s,i,t,e,n]),null},ufe=["

    ",'

    ','

    '],dfe=({node:t,getPosition:e,view:n})=>{const r=P.useCallback(o=>{const i=n.state.tr.setNodeAttribute(e(),"html",o.target.value);n.dispatch(i)},[e,n]);return j.jsxs("div",{className:"squidex-editor-html",children:[j.jsx("div",{className:"squidex-editor-html-label",children:"Plain HTML"}),j.jsx("textarea",{spellCheck:"false",value:t.attrs.content,onChange:r})]})};var hfe=Object.defineProperty,ffe=Object.getOwnPropertyDescriptor,a$=(t,e,n,r)=>{for(var o=r>1?void 0:r?ffe(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&hfe(e,n,o),o};let Qg=class extends Pn{constructor(){super({disableExtraAttributes:!0});ct(this,"ReactComponent",dfe)}get name(){return"plainHtml"}createTags(){return[Ee.Block,Ee.TextBlock,Ee.FormattingNode]}createNodeSpec(){return{attrs:{html:{default:""}},toDOM:e=>{const n=e.attrs.html;return["div",{class:"__editor_html"},...pfe(n)]},parseDOM:[{tag:"div[class~=__editor_html]",getAttrs:e=>({content:e.innerHTML}),priority:1e4}]}}insertPlainHtml(e){return this.store.commands.insertNode.original(this.type,{attrs:{content:""},selection:e})}};a$([de({})],Qg.prototype,"insertPlainHtml",1);Qg=a$([Pe({defaultOptions:{}})],Qg);function pfe(t){if(!t)return[""];const e=document.createElement("div");return e.innerHTML=t,l$(e)}function gfe(t){const e={};for(let n=0;n{const e=P.useRef(null);return P.useEffect(()=>{const n=window.requestAnimationFrame(()=>{var r;(r=e.current)==null||r.focus()});return()=>{window.cancelAnimationFrame(n)}},[]),j.jsx("input",{className:"squidex-editor-input",ref:e,...t})};/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */const SM=({children:e,title:t})=>A.jsxs("div",{className:"squidex-editor-modal-wrapper",children:[A.jsx("div",{className:"squidex-editor-modal-backdrop"}),A.jsxs("div",{className:"squidex-editor-modal-window",children:[t&&A.jsx("div",{className:"squidex-editor-modal-title",children:t}),A.jsx("div",{className:"squidex-editor-modal-body",children:e})]})]}),Yue=({onSelectAssets:e})=>{const t=vc(),r=S.useCallback(async()=>{const n=await e();for(const o of n){if(o.mimeType.startsWith("image/")){const i={src:o.src,alt:o.alt,title:o.fileName};t.insertImage(i)}else t.insertText(o.fileName,{marks:{link:{href:o.src}}});t.insertText(" ")}t.run()},[t,e]);return A.jsx(mt,{commandName:"addImage",enabled:!0,onSelect:r,label:"Add Asset",icon:A.jsx(hi,{type:"Assets"})})},que=({onSelectContents:e})=>{const t=vc(),r=S.useCallback(async()=>{const n=await e();for(const o of n)t.addContent(o);t.run()},[t,e]);return A.jsx(mt,{commandName:"addContent",enabled:!0,onSelect:r,label:"Add Content",icon:A.jsx(hi,{type:"Contents"})})},Xue=()=>{const e=vc(),t=S.useCallback(async()=>{e.insertPlainHtml().run()},[e]);return A.jsx(mt,{commandName:"addImage",enabled:!0,onSelect:t,label:"Add HTML",icon:A.jsx("span",{style:{height:"16px",lineHeight:"16px"},children:"HTML"})})},Zue=({attrs:e,...t})=>{const{setClassName:r}=Wt(),n=S.useCallback(()=>{r(e.className)},[e.className,r]),o=Rr().className(e);return A.jsx(kE,{...t,commandName:"toggleClass",active:o,attrs:e,enabled:!0,onSelect:n,label:(e==null?void 0:e.className)||"No Class"})},Jue=({...e})=>{const{removeClassName:t}=Wt(),r=S.useCallback(()=>{t()},[t]),n=!Rr().className();return A.jsx(kE,{...e,commandName:"removeClass",active:n,attrs:{},enabled:!0,onSelect:r,label:"No Class"})},Que=()=>{const e=tp(ac);return!e.options.classNames||e.options.classNames.length===0?null:A.jsxs(BI,{"aria-label":"Class Name",icon:A.jsx("span",{style:{height:"14px",lineHeight:"14px",fontSize:"14px"},children:"Class"}),children:[A.jsx(Jue,{}),e.options.classNames.map(t=>A.jsx(Zue,{attrs:{className:t}},t))]})},ede=()=>{const e=tp(cs);return A.jsxs("div",{className:"squidex-editor-counter",children:["Words: ",A.jsx("strong",{children:e.getWordCount()}),", Characters: ",A.jsx("strong",{children:e.getCharacterCount()})]})},wM=({onEdit:e})=>{const t=vc(),n=Rr().link(),o=Pb(),i=S.useCallback(()=>{t.removeLink().focus().run()},[t]);return A.jsxs(A.Fragment,{children:[A.jsx(mt,{commandName:"updateLink",enabled:!o.empty,label:"Add or Edit Link",onSelect:e,icon:"link"}),A.jsx(mt,{commandName:"removeLink",enabled:n,label:"Remove Link",onSelect:i,icon:"linkUnlink"})]})},tde=({onClose:e})=>{const[t,r,n]=pM(""),o=vc(),i=Fq(!0).link(),s=(i==null?void 0:i.href)??"",a=Pb();S.useEffect(()=>{r(s)},[s,a,r]);const l=S.useCallback(()=>{const d=n.current;d?o.updateLink({href:d,auto:!1}):o.removeLink(),o.focus(a.to).run(),e()},[o,n,e,a.to]),c=S.useCallback(d=>{r(d.target.value)},[r]),u=S.useCallback(d=>{const{code:p}=d;p==="Enter"&&l(),p==="Escape"&&e()},[e,l]);return A.jsxs(SM,{title:"Change Link",children:[A.jsx(xM,{value:t,onChange:c,onKeyDown:u,placeholder:"Enter Link..."}),A.jsxs(An,{children:[A.jsx(mt,{commandName:"submitLink",enabled:!0,onSelect:l,icon:A.jsx(hi,{type:"Check"})}),A.jsx(mt,{commandName:"cancelLink",enabled:!0,onSelect:e,icon:A.jsx(hi,{type:"Cancel"})})]})]})},rde=({onClose:e,node:t})=>{const[r,n,o]=pM(""),i=Wt();S.useEffect(()=>{n(t.node.attrs.title||"")},[t,n]);const s=S.useCallback(c=>{n(c.target.value)},[n]),a=S.useCallback(()=>{i.updateNodeAttributes(t.getPos()||0,{...t.node.attrs||{},title:o.current}),e()},[i,t,e,o]),l=S.useCallback(c=>{const{code:u}=c;u==="Enter"&&a(),u==="Escape"&&e()},[e,a]);return A.jsxs(SM,{title:"Change Image Title",children:[A.jsx(xM,{value:r,onChange:s,onKeyDown:l,placeholder:"Enter Title..."}),A.jsxs(An,{children:[A.jsx(mt,{commandName:"submitLink",enabled:!0,onSelect:a,icon:A.jsx(hi,{type:"Check"})}),A.jsx(mt,{commandName:"cancelLink",enabled:!0,onSelect:e,icon:A.jsx(hi,{type:"Cancel"})})]})]})};const nde=e=>{const{appName:t,classNames:r,canSelectAIText:n,canSelectAssets:o,canSelectContents:i,isDisabled:s,mode:a,onChange:l,onEditAsset:c,onEditContent:u,onSelectAIText:d,onSelectAssets:p,onSelectContents:f,onUpload:h,value:m}=e,b=S.useMemo(()=>{let P=e.baseUrl;return P.endsWith("/")&&(P=P.substring(0,P.length-1)),P},[e.baseUrl]),[y,g]=S.useState(),[v,E]=S.useState(!1),k=S.useCallback(()=>{E(!0)},[]),x=S.useCallback(()=>{E(!1)},[]),w=S.useCallback(()=>{g(null)},[]),C=S.useCallback(()=>[new FE,new Sa({}),new Od({enableSpine:!0}),new ac({classNames:r}),new zn({supportedLanguages:hue}),new Nd,new Dd({appName:t,baseUrl:b,onEditContent:u}),new cs({}),new Mh,new Lh({}),new Dh,new $ue({copyAsHtml:a==="Html"}),new Rd({uploadHandler:h}),new _d,new wa({autoLink:!0}),new xa({enableCollapsible:!0}),new sc({copyAsMarkdown:a==="Markdown",htmlToMarkdown:_ue,markdownToHtml:Iue}),new Ad,new Vh,new Md,new _y,new Ld],[t,b,r,a,u,h]),{manager:T,state:O,setState:_}=Jq({stringHandler:a==="Markdown"?"markdown":"html",content:m,nodeViewComponents:{image:P=>A.jsx(zue,{...P,appName:t,baseUrl:b,onEditNode:g,onEditAsset:c})},extensions:C});return A.jsx(lle,{children:A.jsx(rle,{theme:{color:{primary:"#3389ff",active:{primary:"#3389ff"}}},children:A.jsxs(tX,{classNames:s?["squidex-editor-disabled"]:[],manager:T,state:O,onChange:P=>_(P.state),children:[A.jsx("div",{className:"squidex-editor-menu",children:A.jsxs(FI,{children:[A.jsx(Qae,{}),A.jsx(Jae,{showAll:!0}),A.jsxs(An,{children:[A.jsx(yE,{}),A.jsx(bE,{}),A.jsx(EE,{}),A.jsx(vE,{})]}),A.jsxs(An,{children:[A.jsx(Bae,{}),A.jsx(Fae,{}),A.jsx(zae,{})]}),A.jsxs(An,{children:[A.jsx(Hae,{}),A.jsx(Uae,{})]}),a==="Html"&&r&&r.length>0&&A.jsx(An,{children:A.jsx(Que,{})}),A.jsx(An,{children:A.jsx(wM,{onEdit:k})}),A.jsxs(An,{children:[o&&p&&A.jsx(Yue,{onSelectAssets:p}),i&&f&&A.jsx(que,{onSelectContents:f}),n&&d&&A.jsx(Wue,{onSelectAIText:d})]}),a==="Html"&&A.jsx(An,{children:A.jsx(Xue,{})})]})}),A.jsx(Bue,{mode:a,onChange:l,state:O,value:m}),A.jsx(gy,{}),v?A.jsx(tde,{onClose:x}):y?A.jsx(rde,{node:y,onClose:w}):A.jsx(ode,{onLinkModal:k}),A.jsx(ile,{offset:{x:5,y:5},className:Fl(y0.LANGUAGE_SELECT_POSITIONER,y0.LANGUAGE_SELECT_WIDTH)}),A.jsx(ede,{})]})})})},ode=({onLinkModal:e})=>Rr().codeBlock()?null:A.jsxs(ole,{className:"squidex-editor-floating",children:[A.jsx(yE,{}),A.jsx(bE,{}),A.jsx(EE,{}),A.jsx(vE,{}),A.jsx(wM,{onEdit:e})]});var TM,rC=ep;TM=rC.createRoot,rC.hydrateRoot;class ide{constructor(t,r){Fe(this,"root");this.element=t,this.props=r,this.root=TM(this.element),this.render()}update(t){this.props={...this.props,...t},this.render()}setValue(t){this.update({value:t})}setIsDisabled(t){this.update({isDisabled:t})}destroy(){this.root.unmount()}render(){this.root.render(A.jsx(nde,{...this.props}))}}window.SquidexEditorWrapper=ide; + */const u$=({children:t,title:e})=>j.jsxs("div",{className:"squidex-editor-modal-wrapper",children:[j.jsx("div",{className:"squidex-editor-modal-backdrop"}),j.jsxs("div",{className:"squidex-editor-modal-window",children:[e&&j.jsx("div",{className:"squidex-editor-modal-title",children:e}),j.jsx("div",{className:"squidex-editor-modal-body",children:t})]})]}),mfe=({onSelectAIText:t})=>{const e=gu(),n=P.useCallback(async()=>{const r=await t();vfe(r)&&r.length>0&&e.insertText(r),e.run()},[e,t]);return j.jsx(It,{commandName:"addImage",enabled:!0,onSelect:n,label:"Add AI generated Text",icon:j.jsx(xo,{type:"AI"})})};function vfe(t){return typeof t=="string"||t instanceof String}const yfe=({onSelectAssets:t})=>{const e=gu(),n=P.useCallback(async()=>{const r=await t();for(const o of r){if(o.mimeType.startsWith("image/")){const i={src:o.src,alt:o.alt,title:o.fileName};e.insertImage(i)}else e.insertText(o.fileName,{marks:{link:{href:o.src}}});e.insertText(" ")}e.run()},[e,t]);return j.jsx(It,{commandName:"addImage",enabled:!0,onSelect:n,label:"Add Asset",icon:j.jsx(xo,{type:"Assets"})})},bfe=({onSelectContents:t})=>{const e=gu(),n=P.useCallback(async()=>{const r=await t();for(const o of r)e.addContent(o);e.run()},[e,t]);return j.jsx(It,{commandName:"addContent",enabled:!0,onSelect:n,label:"Add Content",icon:j.jsx(xo,{type:"Contents"})})},wfe=()=>{const t=gu(),e=P.useCallback(async()=>{t.insertPlainHtml().run()},[t]);return j.jsx(It,{commandName:"addImage",enabled:!0,onSelect:e,label:"Add HTML",icon:j.jsx(xo,{type:"HTML"})})},xfe=({attrs:t,...e})=>{const{setClassName:n}=kn(),r=P.useCallback(()=>{n(t.className)},[t.className,n]),o=hr().className(t);return j.jsx(Kx,{...e,commandName:"toggleClass",active:o,attrs:t,enabled:!0,onSelect:r,label:(t==null?void 0:t.className)||"No Class"})},kfe=({...t})=>{const{removeClassName:e}=kn(),n=P.useCallback(()=>{e()},[e]),r=!hr().className();return j.jsx(Kx,{...t,commandName:"removeClass",active:r,attrs:{},enabled:!0,onSelect:n,label:"No Class"})},Efe=()=>{const t=Jh(ru);return!t.options.classNames||t.options.classNames.length===0?null:j.jsxs(TN,{"aria-label":"Class Name",icon:j.jsx("span",{style:{height:"14px",lineHeight:"14px",fontSize:"14px"},children:"Class"}),children:[j.jsx(kfe,{}),t.options.classNames.map(e=>j.jsx(xfe,{attrs:{className:e}},e))]})},Sfe=()=>{const t=Jh(Vs);return j.jsxs("div",{className:"squidex-editor-counter",children:["Words: ",j.jsx("strong",{children:t.getWordCount()}),", Characters: ",j.jsx("strong",{children:t.getCharacterCount()})]})},d$=({onEdit:t})=>{const e=gu(),r=hr().link(),o=ax(),i=P.useCallback(()=>{e.removeLink().focus().run()},[e]);return j.jsxs(j.Fragment,{children:[j.jsx(It,{commandName:"updateLink",enabled:!o.empty,label:"Add or Edit Link",onSelect:t,icon:"link"}),j.jsx(It,{commandName:"removeLink",enabled:r,label:"Remove Link",onSelect:i,icon:"linkUnlink"})]})},Cfe=({onClose:t})=>{const[e,n,r]=JN(""),o=gu(),i=sQ(!0).link(),s=(i==null?void 0:i.href)??"",l=ax();P.useEffect(()=>{n(s)},[s,l,n]);const a=P.useCallback(()=>{const d=r.current;d?o.updateLink({href:d,auto:!1}):o.removeLink(),o.focus(l.to).run(),t()},[o,r,t,l.to]),u=P.useCallback(d=>{n(d.target.value)},[n]),c=P.useCallback(d=>{const{code:h}=d;h==="Enter"&&a(),h==="Escape"&&t()},[t,a]);return j.jsxs(u$,{title:"Change Link",children:[j.jsx(c$,{value:e,onChange:u,onKeyDown:c,placeholder:"Enter Link..."}),j.jsxs(so,{children:[j.jsx(It,{commandName:"submitLink",enabled:!0,onSelect:a,icon:j.jsx(xo,{type:"Check"})}),j.jsx(It,{commandName:"cancelLink",enabled:!0,onSelect:t,icon:j.jsx(xo,{type:"Cancel"})})]})]})};var ou={},IE={},h$={exports:{}};(function(t,e){(function(){var n="ace",r=function(){return this}();!r&&typeof window<"u"&&(r=window);var o=function(c,d,h){if(typeof c!="string"){o.original?o.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(h=d),o.modules[c]||(o.payloads[c]=h,o.modules[c]=null)};o.modules={},o.payloads={};var i=function(c,d,h){if(typeof d=="string"){var f=a(c,d);if(f!=null)return h&&h(),f}else if(Object.prototype.toString.call(d)==="[object Array]"){for(var p=[],g=0,m=d.length;ga.length)&&(l=a.length),l-=s.length;var u=a.indexOf(s,l);return u!==-1&&u===l}),String.prototype.repeat||i(String.prototype,"repeat",function(s){for(var l="",a=this;s>0;)s&1&&(l+=a),(s>>=1)&&(a+=a);return l}),String.prototype.includes||i(String.prototype,"includes",function(s,l){return this.indexOf(s,l)!=-1}),Object.assign||(Object.assign=function(s){if(s==null)throw new TypeError("Cannot convert undefined or null to object");for(var l=Object(s),a=1;a>>0,u=arguments[1],c=u>>0,d=c<0?Math.max(a+c,0):Math.min(c,a),h=arguments[2],f=h===void 0?a:h>>0,p=f<0?Math.max(a+f,0):Math.min(f,a);d0;)a&1&&(u+=l),(a>>=1)&&(l+=l);return u};var i=/^\s\s*/,s=/\s\s*$/;r.stringTrimLeft=function(l){return l.replace(i,"")},r.stringTrimRight=function(l){return l.replace(s,"")},r.copyObject=function(l){var a={};for(var u in l)a[u]=l[u];return a},r.copyArray=function(l){for(var a=[],u=0,c=l.length;u=0?parseFloat((l.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((l.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=l.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(l.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(l.split(" Chrome/")[1])||void 0,r.isEdge=parseFloat(l.split(" Edge/")[1])||void 0,r.isAIR=l.indexOf("AdobeAIR")>=0,r.isAndroid=l.indexOf("Android")>=0,r.isChromeOS=l.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(l)&&!window.MSStream,r.isIOS&&(r.isMac=!0),r.isMobile=r.isIOS||r.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(n,r,o){var i=n("./useragent"),s="http://www.w3.org/1999/xhtml";r.buildDom=function h(f,p,g){if(typeof f=="string"&&f){var m=document.createTextNode(f);return p&&p.appendChild(m),m}if(!Array.isArray(f))return f&&f.appendChild&&p&&p.appendChild(f),f;if(typeof f[0]!="string"||!f[0]){for(var v=[],y=0;y"u")){if(a){if(p)u();else if(p===!1)return a.push([h,f])}if(!l){var g=p;!p||!p.getRootNode?g=document:(g=p.getRootNode(),(!g||g==p)&&(g=document));var m=g.ownerDocument||g;if(f&&r.hasCssString(f,g))return null;f&&(h+=` +/*# sourceURL=ace/css/`+f+" */");var v=r.createElement("style");v.appendChild(m.createTextNode(h)),f&&(v.id=f),g==m&&(g=r.getDocumentHead(m)),g.insertBefore(v,g.firstChild)}}}if(r.importCssString=c,r.importCssStylsheet=function(h,f){r.buildDom(["link",{rel:"stylesheet",href:h}],r.getDocumentHead(f))},r.scrollbarWidth=function(h){var f=r.createElement("ace_inner");f.style.width="100%",f.style.minWidth="0px",f.style.height="200px",f.style.display="block";var p=r.createElement("ace_outer"),g=p.style;g.position="absolute",g.left="-10000px",g.overflow="hidden",g.width="200px",g.minWidth="0px",g.height="150px",g.display="block",p.appendChild(f);var m=h&&h.documentElement||document&&document.documentElement;if(!m)return 0;m.appendChild(p);var v=f.offsetWidth;g.overflow="scroll";var y=f.offsetWidth;return v===y&&(y=p.clientWidth),m.removeChild(p),v-y},r.computedStyle=function(h,f){return window.getComputedStyle(h,"")||{}},r.setStyle=function(h,f,p){h[f]!==p&&(h[f]=p)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=i.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,i.isChromeOS&&(r.HI_DPI=!1),typeof document<"u"){var d=document.createElement("div");r.HI_DPI&&d.style.transform!==void 0&&(r.HAS_CSS_TRANSFORMS=!0),!i.isEdge&&typeof d.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),d=null}r.HAS_CSS_TRANSFORMS?r.translate=function(h,f,p){h.style.transform="translate("+Math.round(f)+"px, "+Math.round(p)+"px)"}:r.translate=function(h,f,p){h.style.top=Math.round(p)+"px",h.style.left=Math.round(f)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(n,r,o){/* +* based on code from: +* +* @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. +* Available via the MIT or new BSD license. +* see: http://github.com/jrburke/requirejs for details +*/var i=n("./dom");r.get=function(s,l){var a=new XMLHttpRequest;a.open("GET",s,!0),a.onreadystatechange=function(){a.readyState===4&&l(a.responseText)},a.send(null)},r.loadScript=function(s,l){var a=i.getDocumentHead(),u=document.createElement("script");u.src=s,a.appendChild(u),u.onload=u.onreadystatechange=function(c,d){(d||!u.readyState||u.readyState=="loaded"||u.readyState=="complete")&&(u=u.onload=u.onreadystatechange=null,d||l())}},r.qualifyURL=function(s){var l=document.createElement("a");return l.href=s,l.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(n,r,o){r.inherits=function(i,s){i.super_=s,i.prototype=Object.create(s.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}})},r.mixin=function(i,s){for(var l in s)i[l]=s[l];return i},r.implement=function(i,s){r.mixin(i,s)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(n,r,o){var i={},s=function(){this.propagationStopped=!0},l=function(){this.defaultPrevented=!0};i._emit=i._dispatchEvent=function(a,u){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var c=this._eventRegistry[a]||[],d=this._defaultHandlers[a];if(!(!c.length&&!d)){(typeof u!="object"||!u)&&(u={}),u.type||(u.type=a),u.stopPropagation||(u.stopPropagation=s),u.preventDefault||(u.preventDefault=l),c=c.slice();for(var h=0;h1&&(v=g[g.length-2]);var b=u[p+"Path"];return b==null?b=u.basePath:m=="/"&&(p=m=""),b&&b.slice(-1)!="/"&&(b+="/"),b+p+m+v+this.get("suffix")},r.setModuleUrl=function(f,p){return u.$moduleUrls[f]=p};var c=function(f,p){if(f==="ace/theme/textmate"||f==="./theme/textmate")return p(null,n("./theme/textmate"));if(d)return d(f,p);console.error("loader is not configured")},d;r.setLoader=function(f){d=f},r.dynamicModules=Object.create(null),r.$loading={},r.$loaded={},r.loadModule=function(f,p){var g,m;Array.isArray(f)&&(m=f[0],f=f[1]);var v=function(y){if(y&&!r.$loading[f])return p&&p(y);if(r.$loading[f]||(r.$loading[f]=[]),r.$loading[f].push(p),!(r.$loading[f].length>1)){var b=function(){c(f,function(w,k){k&&(r.$loaded[f]=k),r._emit("load.module",{name:f,module:k});var x=r.$loading[f];r.$loading[f]=null,x.forEach(function(S){S&&S(k)})})};if(!r.get("packaged"))return b();s.loadScript(r.moduleUrl(f,m),b),h()}};if(r.dynamicModules[f])r.dynamicModules[f]().then(function(y){y.default?v(y.default):v(y)});else{try{g=this.$require(f)}catch{}v(g||r.$loaded[f])}},r.$require=function(f){if(typeof o.require=="function"){var p="require";return o[p](f)}},r.setModuleLoader=function(f,p){r.dynamicModules[f]=p};var h=function(){!u.basePath&&!u.workerPath&&!u.modePath&&!u.themePath&&!Object.keys(u.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),h=function(){})};r.version="1.31.1"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(n,r,o){n("./lib/fixoldbrowsers");var i=n("./config");i.setLoader(function(u,c){n([u],function(d){c(null,d)})});var s=function(){return this||typeof window<"u"&&window}();o.exports=function(u){i.init=l,i.$require=n,u.require=n},l(!0);function l(u){if(!(!s||!s.document)){i.set("packaged",u||n.packaged||o.packaged||s.define&&(void 0).packaged);var c={},d="",h=document.currentScript||document._currentScript,f=h&&h.ownerDocument||document;h&&h.src&&(d=h.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var p=f.getElementsByTagName("script"),g=0;g ["+this.end.row+"/"+this.end.column+"]"},l.prototype.contains=function(a,u){return this.compare(a,u)==0},l.prototype.compareRange=function(a){var u,c=a.end,d=a.start;return u=this.compare(c.row,c.column),u==1?(u=this.compare(d.row,d.column),u==1?2:u==0?1:0):u==-1?-2:(u=this.compare(d.row,d.column),u==-1?-1:u==1?42:0)},l.prototype.comparePoint=function(a){return this.compare(a.row,a.column)},l.prototype.containsRange=function(a){return this.comparePoint(a.start)==0&&this.comparePoint(a.end)==0},l.prototype.intersects=function(a){var u=this.compareRange(a);return u==-1||u==0||u==1},l.prototype.isEnd=function(a,u){return this.end.row==a&&this.end.column==u},l.prototype.isStart=function(a,u){return this.start.row==a&&this.start.column==u},l.prototype.setStart=function(a,u){typeof a=="object"?(this.start.column=a.column,this.start.row=a.row):(this.start.row=a,this.start.column=u)},l.prototype.setEnd=function(a,u){typeof a=="object"?(this.end.column=a.column,this.end.row=a.row):(this.end.row=a,this.end.column=u)},l.prototype.inside=function(a,u){return this.compare(a,u)==0?!(this.isEnd(a,u)||this.isStart(a,u)):!1},l.prototype.insideStart=function(a,u){return this.compare(a,u)==0?!this.isEnd(a,u):!1},l.prototype.insideEnd=function(a,u){return this.compare(a,u)==0?!this.isStart(a,u):!1},l.prototype.compare=function(a,u){return!this.isMultiLine()&&a===this.start.row?uthis.end.column?1:0:athis.end.row?1:this.start.row===a?u>=this.start.column?0:-1:this.end.row===a?u<=this.end.column?0:1:0},l.prototype.compareStart=function(a,u){return this.start.row==a&&this.start.column==u?-1:this.compare(a,u)},l.prototype.compareEnd=function(a,u){return this.end.row==a&&this.end.column==u?1:this.compare(a,u)},l.prototype.compareInside=function(a,u){return this.end.row==a&&this.end.column==u?1:this.start.row==a&&this.start.column==u?-1:this.compare(a,u)},l.prototype.clipRows=function(a,u){if(this.end.row>u)var c={row:u+1,column:0};else if(this.end.rowu)var d={row:u+1,column:0};else if(this.start.row1?(T++,T>4&&(T=1)):T=1,s.isIE){var M=Math.abs(E.clientX-C)>5||Math.abs(E.clientY-O)>5;(!_||M)&&(T=1),_&&clearTimeout(_),_=setTimeout(function(){_=null},w[T-1]||600),T==1&&(C=E.clientX,O=E.clientY)}if(E._clicks=T,k[x]("mousedown",E),T>4)T=0;else if(T>1)return k[x](R[T],E)}Array.isArray(b)||(b=[b]),b.forEach(function(E){f(E,"mousedown",A,S)})};var g=function(b){return 0|(b.ctrlKey?1:0)|(b.altKey?2:0)|(b.shiftKey?4:0)|(b.metaKey?8:0)};r.getModifierString=function(b){return i.KEY_MODS[g(b)]};function m(b,w,k){var x=g(w);if(!s.isMac&&l){if(w.getModifierState&&(w.getModifierState("OS")||w.getModifierState("Win"))&&(x|=8),l.altGr)if((3&x)!=3)l.altGr=0;else return;if(k===18||k===17){var S="location"in w?w.location:w.keyLocation;if(k===17&&S===1)l[k]==1&&(a=w.timeStamp);else if(k===18&&x===3&&S===2){var T=w.timeStamp-a;T<50&&(l.altGr=!0)}}}if(k in i.MODIFIER_KEYS&&(k=-1),!x&&k===13){var S="location"in w?w.location:w.keyLocation;if(S===3&&(b(w,x,-k),w.defaultPrevented))return}if(s.isChromeOS&&x&8){if(b(w,x,k),w.defaultPrevented)return;x&=-9}return!x&&!(k in i.FUNCTION_KEYS)&&!(k in i.PRINTABLE_KEYS)?!1:b(w,x,k)}r.addCommandKeyListener=function(b,w,k){if(s.isOldGecko||s.isOpera&&!("KeyboardEvent"in window)){var x=null;f(b,"keydown",function(T){x=T.keyCode},k),f(b,"keypress",function(T){return m(w,T,x)},k)}else{var S=null;f(b,"keydown",function(T){l[T.keyCode]=(l[T.keyCode]||0)+1;var C=m(w,T,T.keyCode);return S=T.defaultPrevented,C},k),f(b,"keypress",function(T){S&&(T.ctrlKey||T.altKey||T.shiftKey||T.metaKey)&&(r.stopEvent(T),S=null)},k),f(b,"keyup",function(T){l[T.keyCode]=null},k),l||(v(),f(window,"focus",v))}};function v(){l=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!s.isOldIE){var y=1;r.nextTick=function(b,w){w=w||window;var k="zero-timeout-message-"+y++,x=function(S){S.data==k&&(r.stopPropagation(S),p(w,"message",x),b())};f(w,"message",x),w.postMessage(k,"*")}}r.$idleBlocked=!1,r.onIdle=function(b,w){return setTimeout(function k(){r.$idleBlocked?setTimeout(k,100):b()},w)},r.$idleBlockId=null,r.blockIdle=function(b){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},b||100)},r.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),r.nextFrame?r.nextFrame=r.nextFrame.bind(window):r.nextFrame=function(b){setTimeout(b,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(n,r,o){var i;o.exports={lineMode:!1,pasteCancelled:function(){return i&&i>Date.now()-50?!0:i=!1},cancel:function(){i=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(n,r,o){var i=n("../lib/event"),s=n("../config").nls,l=n("../lib/useragent"),a=n("../lib/dom"),u=n("../lib/lang"),c=n("../clipboard"),d=l.isChrome<18,h=l.isIE,f=l.isChrome>63,p=400,g=n("../lib/keys"),m=g.KEY_MODS,v=l.isIOS,y=v?/\s/:/\n/,b=l.isMobile,w=function(k,x){var S=a.createElement("textarea");S.className="ace_text-input",S.setAttribute("wrap","off"),S.setAttribute("autocorrect","off"),S.setAttribute("autocapitalize","off"),S.setAttribute("spellcheck",!1),S.style.opacity="0",k.insertBefore(S,k.firstChild);var T=!1,C=!1,O=!1,_=!1,R="";b||(S.style.fontSize="1px");var A=!1,E=!1,M="",I=0,N=0,L=0,$=Number.MAX_SAFE_INTEGER,D=Number.MIN_SAFE_INTEGER,F=0;try{var U=document.activeElement===S}catch{}this.setNumberOfExtraLines=function(q){if($=Number.MAX_SAFE_INTEGER,D=Number.MIN_SAFE_INTEGER,q<0){F=0;return}F=q},this.setAriaOptions=function(q){if(q.activeDescendant?(S.setAttribute("aria-haspopup","true"),S.setAttribute("aria-autocomplete",q.inline?"both":"list"),S.setAttribute("aria-activedescendant",q.activeDescendant)):(S.setAttribute("aria-haspopup","false"),S.setAttribute("aria-autocomplete","both"),S.removeAttribute("aria-activedescendant")),q.role&&S.setAttribute("role",q.role),q.setLabel&&(S.setAttribute("aria-roledescription",s("editor")),x.session)){var he=x.session.selection.cursor.row;S.setAttribute("aria-label",s("Cursor at row $0",[he+1]))}},this.setAriaOptions({role:"textbox"}),i.addListener(S,"blur",function(q){E||(x.onBlur(q),U=!1)},x),i.addListener(S,"focus",function(q){if(!E){if(U=!0,l.isEdge)try{if(!document.hasFocus())return}catch{}x.onFocus(q),l.isEdge?setTimeout(B):B()}},x),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:x.renderer.enableKeyboardAccessibility}),R||f||this.$focusScroll=="browser")return S.focus({preventScroll:!0});var q=S.style.top;S.style.position="fixed",S.style.top="0px";try{var he=S.getBoundingClientRect().top!=0}catch{return}var ve=[];if(he)for(var ie=S.parentElement;ie&&ie.nodeType==1;)ve.push(ie),ie.setAttribute("ace_nocontext",!0),!ie.parentElement&&ie.getRootNode?ie=ie.getRootNode().host:ie=ie.parentElement;S.focus({preventScroll:!0}),he&&ve.forEach(function(Te){Te.removeAttribute("ace_nocontext")}),setTimeout(function(){S.style.position="",S.style.top=="0px"&&(S.style.top=q)},0)},this.blur=function(){S.blur()},this.isFocused=function(){return U},x.on("beforeEndOperation",function(){var q=x.curOp,he=q&&q.command&&q.command.name;if(he!="insertstring"){var ve=he&&(q.docChanged||q.selectionChanged);O&&ve&&(M=S.value="",wt()),B()}});var W=function(q,he){for(var ve=he,ie=1;ie<=q-$&&ie<2*F+1;ie++)ve+=x.session.getLine(q-ie).length+1;return ve},B=v?function(q){if(!(!U||T&&!q||_)){q||(q="");var he=` + ab`+q+`cde fg +`;he!=S.value&&(S.value=M=he);var ve=4,ie=4+(q.length||(x.selection.isEmpty()?0:1));(I!=ve||N!=ie)&&S.setSelectionRange(ve,ie),I=ve,N=ie}}:function(){if(!(O||_)&&!(!U&&!X)){O=!0;var q=0,he=0,ve="";if(x.session){var ie=x.selection,Te=ie.getRange(),Ze=ie.cursor.row;Ze===D+1?($=D+1,D=$+2*F):Ze===$-1?(D=$-1,$=D-2*F):(Ze<$-1||Ze>D+1)&&($=Ze>F?Ze-F:0,D=Ze>F?Ze+F:2*F);for(var Xe=[],nt=$;nt<=D;nt++)Xe.push(x.session.getLine(nt));if(ve=Xe.join(` +`),q=W(Te.start.row,Te.start.column),he=W(Te.end.row,Te.end.column),Te.start.row<$){var rt=x.session.getLine($-1);q=Te.start.row<$-1?0:q,he+=rt.length+1,ve=rt+` +`+ve}else if(Te.end.row>D){var Be=x.session.getLine(D+1);he=Te.end.row>D+1?Be.length:Te.end.column,he+=ve.length+1,ve=ve+` +`+Be}else b&&Ze>0&&(ve=` +`+ve,he+=1,q+=1);ve.length>p&&(q=M.length&&q.value===M&&M&&q.selectionEnd!==N},V=function(q){O||(T?T=!1:H(S)?(x.selectAll(),B()):b&&S.selectionStart!=I&&B())},Y=null;this.setInputHandler=function(q){Y=q},this.getInputHandler=function(){return Y};var X=!1,Z=function(q,he){if(X&&(X=!1),C)return B(),q&&x.onPaste(q),C=!1,"";for(var ve=S.selectionStart,ie=S.selectionEnd,Te=I,Ze=M.length-N,Xe=q,nt=q.length-ve,rt=q.length-ie,Be=0;Te>0&&M[Be]==q[Be];)Be++,Te--;for(Xe=Xe.slice(Be),Be=1;Ze>0&&M.length-Be>I-1&&M[M.length-Be]==q[q.length-Be];)Be++,Ze--;nt-=Be-1,rt-=Be-1;var Kt=Xe.length-Be+1;if(Kt<0&&(Te=-Kt,Kt=0),Xe=Xe.slice(0,Kt),!he&&!Xe&&!nt&&!Te&&!Ze&&!rt)return"";_=!0;var Co=!1;return l.isAndroid&&Xe==". "&&(Xe=" ",Co=!0),Xe&&!Te&&!Ze&&!nt&&!rt||A?x.onTextInput(Xe):x.onTextInput(Xe,{extendLeft:Te,extendRight:Ze,restoreStart:nt,restoreEnd:rt}),_=!1,M=q,I=ve,N=ie,L=rt,Co?` +`:Xe},te=function(q){if(O)return Lt();if(q&&q.inputType){if(q.inputType=="historyUndo")return x.execCommand("undo");if(q.inputType=="historyRedo")return x.execCommand("redo")}var he=S.value,ve=Z(he,!0);(he.length>p+100||y.test(ve)||b&&I<1&&I==N)&&B()},ce=function(q,he,ve){var ie=q.clipboardData||window.clipboardData;if(!(!ie||d)){var Te=h||ve?"Text":"text/plain";try{return he?ie.setData(Te,he)!==!1:ie.getData(Te)}catch(Ze){if(!ve)return ce(Ze,he,!0)}}},Ne=function(q,he){var ve=x.getCopyText();if(!ve)return i.preventDefault(q);ce(q,ve)?(v&&(B(ve),T=ve,setTimeout(function(){T=!1},10)),he?x.onCut():x.onCopy(),i.preventDefault(q)):(T=!0,S.value=ve,S.select(),setTimeout(function(){T=!1,B(),he?x.onCut():x.onCopy()}))},ye=function(q){Ne(q,!0)},Me=function(q){Ne(q,!1)},Ce=function(q){var he=ce(q);c.pasteCancelled()||(typeof he=="string"?(he&&x.onPaste(he,q),l.isIE&&setTimeout(B),i.preventDefault(q)):(S.value="",C=!0))};i.addCommandKeyListener(S,x.onCommandKey.bind(x),x),i.addListener(S,"select",V,x),i.addListener(S,"input",te,x),i.addListener(S,"cut",ye,x),i.addListener(S,"copy",Me,x),i.addListener(S,"paste",Ce,x),(!("oncut"in S)||!("oncopy"in S)||!("onpaste"in S))&&i.addListener(k,"keydown",function(q){if(!(l.isMac&&!q.metaKey||!q.ctrlKey))switch(q.keyCode){case 67:Me(q);break;case 86:Ce(q);break;case 88:ye(q);break}},x);var mt=function(q){if(!(O||!x.onCompositionStart||x.$readOnly)&&(O={},!A)){q.data&&(O.useTextareaForIME=!1),setTimeout(Lt,0),x._signal("compositionStart"),x.on("mousedown",qn);var he=x.getSelectionRange();he.end.row=he.start.row,he.end.column=he.start.column,O.markerRange=he,O.selectionStart=I,x.onCompositionStart(O),O.useTextareaForIME?(M=S.value="",I=0,N=0):(S.msGetInputContext&&(O.context=S.msGetInputContext()),S.getInputContext&&(O.context=S.getInputContext()))}},Lt=function(){if(!(!O||!x.onCompositionUpdate||x.$readOnly)){if(A)return qn();if(O.useTextareaForIME)x.onCompositionUpdate(S.value);else{var q=S.value;Z(q),O.markerRange&&(O.context&&(O.markerRange.start.column=O.selectionStart=O.context.compositionStartOffset),O.markerRange.end.column=O.markerRange.start.column+N-O.selectionStart+L)}}},wt=function(q){!x.onCompositionEnd||x.$readOnly||(O=!1,x.onCompositionEnd(),x.off("mousedown",qn),q&&te())};function qn(){E=!0,S.blur(),S.focus(),E=!1}var Nt=u.delayedCall(Lt,50).schedule.bind(null,null);function An(q){q.keyCode==27&&S.value.lengthN&&M[rt]==` +`?Be=g.end:ntN&&M.slice(0,rt).split(` +`).length>2?Be=g.down:rt>N&&M[rt-1]==" "?(Be=g.right,Kt=m.option):(rt>N||rt==N&&N!=I&&nt==rt)&&(Be=g.right),nt!==rt&&(Kt|=m.shift),Be){var Co=he.onCommandKey({},Kt,Be);if(!Co&&he.commands){Be=g.keyCodeToString(Be);var la=he.commands.findKeyCommand(Kt,Be);la&&he.execCommand(la)}I=nt,N=rt,B("")}}};document.addEventListener("selectionchange",Ze),he.on("destroy",function(){document.removeEventListener("selectionchange",Ze)})}this.destroy=function(){S.parentElement&&S.parentElement.removeChild(S)}};r.TextInput=w,r.$setUserAgentForTests=function(k,x){b=k,v=x}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(n,r,o){var i=n("../lib/useragent"),s=0,l=550,a=function(){function d(h){h.$clickSelection=null;var f=h.editor;f.setDefaultHandler("mousedown",this.onMouseDown.bind(h)),f.setDefaultHandler("dblclick",this.onDoubleClick.bind(h)),f.setDefaultHandler("tripleclick",this.onTripleClick.bind(h)),f.setDefaultHandler("quadclick",this.onQuadClick.bind(h)),f.setDefaultHandler("mousewheel",this.onMouseWheel.bind(h));var p=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];p.forEach(function(g){h[g]=this[g]},this),h.selectByLines=this.extendSelectionBy.bind(h,"getLineRange"),h.selectByWords=this.extendSelectionBy.bind(h,"getWordRange")}return d.prototype.onMouseDown=function(h){var f=h.inSelection(),p=h.getDocumentPosition();this.mousedownEvent=h;var g=this.editor,m=h.getButton();if(m!==0){var v=g.getSelectionRange(),y=v.isEmpty();(y||m==1)&&g.selection.moveToPosition(p),m==2&&(g.textInput.onContextMenu(h.domEvent),i.isMozilla||h.preventDefault());return}if(this.mousedownEvent.time=Date.now(),f&&!g.isFocused()&&(g.focus(),this.$focusTimeout&&!this.$clickSelection&&!g.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(h);return}return this.captureMouse(h),this.startSelect(p,h.domEvent._clicks>1),h.preventDefault()},d.prototype.startSelect=function(h,f){h=h||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var p=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?p.selection.selectToPosition(h):f||p.selection.moveToPosition(h),f||this.select(),p.setStyle("ace_selecting"),this.setState("select"))},d.prototype.select=function(){var h,f=this.editor,p=f.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var g=this.$clickSelection.comparePoint(p);if(g==-1)h=this.$clickSelection.end;else if(g==1)h=this.$clickSelection.start;else{var m=c(this.$clickSelection,p);p=m.cursor,h=m.anchor}f.selection.setSelectionAnchor(h.row,h.column)}f.selection.selectToPosition(p),f.renderer.scrollCursorIntoView()},d.prototype.extendSelectionBy=function(h){var f,p=this.editor,g=p.renderer.screenToTextCoordinates(this.x,this.y),m=p.selection[h](g.row,g.column);if(this.$clickSelection){var v=this.$clickSelection.comparePoint(m.start),y=this.$clickSelection.comparePoint(m.end);if(v==-1&&y<=0)f=this.$clickSelection.end,(m.end.row!=g.row||m.end.column!=g.column)&&(g=m.start);else if(y==1&&v>=0)f=this.$clickSelection.start,(m.start.row!=g.row||m.start.column!=g.column)&&(g=m.end);else if(v==-1&&y==1)g=m.end,f=m.start;else{var b=c(this.$clickSelection,g);g=b.cursor,f=b.anchor}p.selection.setSelectionAnchor(f.row,f.column)}p.selection.selectToPosition(g),p.renderer.scrollCursorIntoView()},d.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},d.prototype.focusWait=function(){var h=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),f=Date.now();(h>s||f-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},d.prototype.onDoubleClick=function(h){var f=h.getDocumentPosition(),p=this.editor,g=p.session,m=g.getBracketRange(f);m?(m.isEmpty()&&(m.start.column--,m.end.column++),this.setState("select")):(m=p.selection.getWordRange(f.row,f.column),this.setState("selectByWords")),this.$clickSelection=m,this.select()},d.prototype.onTripleClick=function(h){var f=h.getDocumentPosition(),p=this.editor;this.setState("selectByLines");var g=p.getSelectionRange();g.isMultiLine()&&g.contains(f.row,f.column)?(this.$clickSelection=p.selection.getLineRange(g.start.row),this.$clickSelection.end=p.selection.getLineRange(g.end.row).end):this.$clickSelection=p.selection.getLineRange(f.row),this.select()},d.prototype.onQuadClick=function(h){var f=this.editor;f.selectAll(),this.$clickSelection=f.getSelectionRange(),this.setState("selectAll")},d.prototype.onMouseWheel=function(h){if(!h.getAccelKey()){h.getShiftKey()&&h.wheelY&&!h.wheelX&&(h.wheelX=h.wheelY,h.wheelY=0);var f=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var p=this.$lastScroll,g=h.domEvent.timeStamp,m=g-p.t,v=m?h.wheelX/m:p.vx,y=m?h.wheelY/m:p.vy;m=1&&f.renderer.isScrollableBy(h.wheelX*h.speed,0)&&(w=!0),b<=1&&f.renderer.isScrollableBy(0,h.wheelY*h.speed)&&(w=!0),w)p.allowed=g;else if(g-p.allowed=p.length&&(p=void 0),{value:p&&p[v++],done:!p}}};throw new TypeError(g?"Object is not iterable.":"Symbol.iterator is not defined.")},l=n("./lib/dom"),a=n("./range").Range,u="ace_tooltip",c=function(){function p(g){this.isOpen=!1,this.$element=null,this.$parentNode=g}return p.prototype.$init=function(){return this.$element=l.createElement("div"),this.$element.className=u,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},p.prototype.getElement=function(){return this.$element||this.$init()},p.prototype.setText=function(g){this.getElement().textContent=g},p.prototype.setHtml=function(g){this.getElement().innerHTML=g},p.prototype.setPosition=function(g,m){this.getElement().style.left=g+"px",this.getElement().style.top=m+"px"},p.prototype.setClassName=function(g){l.addCssClass(this.getElement(),g)},p.prototype.setTheme=function(g){this.$element.className=u+" "+(g.isDark?"ace_dark ":"")+(g.cssClass||"")},p.prototype.show=function(g,m,v){g!=null&&this.setText(g),m!=null&&v!=null&&this.setPosition(m,v),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},p.prototype.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=u,this.isOpen=!1)},p.prototype.getHeight=function(){return this.getElement().offsetHeight},p.prototype.getWidth=function(){return this.getElement().offsetWidth},p.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},p}(),d=function(){function p(){this.popups=[]}return p.prototype.addPopup=function(g){this.popups.push(g),this.updatePopups()},p.prototype.removePopup=function(g){var m=this.popups.indexOf(g);m!==-1&&(this.popups.splice(m,1),this.updatePopups())},p.prototype.updatePopups=function(){var g,m,v,y;this.popups.sort(function(_,R){return R.priority-_.priority});var b=[];try{for(var w=s(this.popups),k=w.next();!k.done;k=w.next()){var x=k.value,S=!0;try{for(var T=(v=void 0,s(b)),C=T.next();!C.done;C=T.next()){var O=C.value;if(this.doPopupsOverlap(O,x)){S=!1;break}}}catch(_){v={error:_}}finally{try{C&&!C.done&&(y=T.return)&&y.call(T)}finally{if(v)throw v.error}}S?b.push(x):x.hide()}}catch(_){g={error:_}}finally{try{k&&!k.done&&(m=w.return)&&m.call(w)}finally{if(g)throw g.error}}},p.prototype.doPopupsOverlap=function(g,m){var v=g.getElement().getBoundingClientRect(),y=m.getElement().getBoundingClientRect();return v.lefty.left&&v.topy.top},p}(),h=new d;r.popupManager=h,r.Tooltip=c;var f=function(p){i(g,p);function g(m){m===void 0&&(m=document.body);var v=p.call(this,m)||this;v.timeout=void 0,v.lastT=0,v.idleTime=350,v.lastEvent=void 0,v.onMouseOut=v.onMouseOut.bind(v),v.onMouseMove=v.onMouseMove.bind(v),v.waitForHover=v.waitForHover.bind(v),v.hide=v.hide.bind(v);var y=v.getElement();return y.style.whiteSpace="pre-wrap",y.style.pointerEvents="auto",y.addEventListener("mouseout",v.onMouseOut),y.tabIndex=-1,y.addEventListener("blur",(function(){y.contains(document.activeElement)||this.hide()}).bind(v)),v}return g.prototype.addToEditor=function(m){m.on("mousemove",this.onMouseMove),m.on("mousedown",this.hide),m.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},g.prototype.removeFromEditor=function(m){m.off("mousemove",this.onMouseMove),m.off("mousedown",this.hide),m.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},g.prototype.onMouseMove=function(m,v){this.lastEvent=m,this.lastT=Date.now();var y=v.$mouseHandler.isMousePressed;if(this.isOpen){var b=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(b.row,b.column)||y||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||y||(this.lastEvent=m,this.timeout=setTimeout(this.waitForHover,this.idleTime))},g.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var m=Date.now()-this.lastT;if(this.idleTime-m>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-m);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},g.prototype.isOutsideOfText=function(m){var v=m.editor,y=m.getDocumentPosition(),b=v.session.getLine(y.row);if(y.column==b.length){var w=v.renderer.pixelToScreenCoordinates(m.clientX,m.clientY),k=v.session.documentToScreenPosition(y.row,y.column);if(k.column!=w.column||k.row!=w.row)return!0}return!1},g.prototype.setDataProvider=function(m){this.$gatherData=m},g.prototype.showForRange=function(m,v,y,b){if(!(b&&b!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var w=m.renderer;this.isOpen||(h.addPopup(this),this.$registerCloseEvents(),this.setTheme(w.theme)),this.isOpen=!0,this.addMarker(v,m.session),this.range=a.fromPoints(v.start,v.end);var k=this.getElement();k.innerHTML="",k.appendChild(y),k.style.display="block";var x=w.textToScreenCoordinates(v.start.row,v.start.column),S=k.clientHeight,T=w.scroller.getBoundingClientRect(),C=!0;x.pageY-S<0&&(C=!1),C?x.pageY-=S:x.pageY+=w.lineHeight,k.style.maxWidth=T.width-(x.pageX-T.left)+"px",this.setPosition(x.pageX,x.pageY)}},g.prototype.addMarker=function(m,v){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=v,this.marker=v&&v.addMarker(m,"ace_highlight-marker","text")},g.prototype.hide=function(m){!m&&document.activeElement==this.getElement()||m&&m.target&&(m.type!="keydown"||m.ctrlKey||m.metaKey)&&this.$element.contains(m.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,h.removePopup(this)))},g.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("mousewheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},g.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("mousewheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},g.prototype.onMouseOut=function(m){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!m.relatedTarget||m.relatedTarget==this.getElement()||m&&m.currentTarget.contains(m.relatedTarget)||m.relatedTarget.classList.contains("ace_content")||this.hide())},g}(c);r.HoverTooltip=f}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(n,r,o){var i=this&&this.__extends||function(){var f=function(p,g){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,v){m.__proto__=v}||function(m,v){for(var y in v)Object.prototype.hasOwnProperty.call(v,y)&&(m[y]=v[y])},f(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");f(p,g);function m(){this.constructor=p}p.prototype=g===null?Object.create(g):(m.prototype=g.prototype,new m)}}(),s=this&&this.__values||function(f){var p=typeof Symbol=="function"&&Symbol.iterator,g=p&&f[p],m=0;if(g)return g.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&m>=f.length&&(f=void 0),{value:f&&f[m++],done:!f}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")},l=n("../lib/dom"),a=n("../lib/event"),u=n("../tooltip").Tooltip,c=n("../config").nls;function d(f){var p=f.editor,g=p.renderer.$gutterLayer,m=new h(p);f.editor.setDefaultHandler("guttermousedown",function(x){if(!(!p.isFocused()||x.getButton()!=0)){var S=g.getRegion(x);if(S!="foldWidgets"){var T=x.getDocumentPosition().row,C=p.session.selection;if(x.getShiftKey())C.selectTo(T,0);else{if(x.domEvent.detail==2)return p.selectAll(),x.preventDefault();f.$clickSelection=p.selection.getLineRange(T)}return f.setState("selectByLines"),f.captureMouse(x),x.preventDefault()}}});var v,y;function b(){var x=y.getDocumentPosition().row,S=p.session.getLength();if(x==S){var T=p.renderer.pixelToScreenCoordinates(0,y.y).row,C=y.$pos;if(T>p.session.documentToScreenRow(C.row,C.column))return w()}if(m.showTooltip(x),!!m.isOpen)if(p.on("mousewheel",w),f.$tooltipFollowsMouse)k(y);else{var O=y.getGutterRow(),_=g.$lines.get(O);if(_){var R=_.element.querySelector(".ace_gutter_annotation"),A=R.getBoundingClientRect(),E=m.getElement().style;E.left=A.right+"px",E.top=A.bottom+"px"}else k(y)}}function w(){v&&(v=clearTimeout(v)),m.isOpen&&(m.hideTooltip(),p.off("mousewheel",w))}function k(x){m.setPosition(x.x,x.y)}f.editor.setDefaultHandler("guttermousemove",function(x){var S=x.domEvent.target||x.domEvent.srcElement;if(l.hasCssClass(S,"ace_fold-widget"))return w();m.isOpen&&f.$tooltipFollowsMouse&&k(x),y=x,!v&&(v=setTimeout(function(){v=null,y&&!f.isMousePressed?b():w()},50))}),a.addListener(p.renderer.$gutter,"mouseout",function(x){y=null,!(!m.isOpen||v)&&(v=setTimeout(function(){v=null,w()},50))},p),p.on("changeSession",w),p.on("input",w)}r.GutterHandler=d;var h=function(f){i(p,f);function p(g){var m=f.call(this,g.container)||this;return m.editor=g,m}return p.prototype.setPosition=function(g,m){var v=window.innerWidth||document.documentElement.clientWidth,y=window.innerHeight||document.documentElement.clientHeight,b=this.getWidth(),w=this.getHeight();g+=15,m+=15,g+b>v&&(g-=g+b-v),m+w>y&&(m-=20+w),u.prototype.setPosition.call(this,g,m)},Object.defineProperty(p,"annotationLabels",{get:function(){return{error:{singular:c("error"),plural:c("errors")},warning:{singular:c("warning"),plural:c("warnings")},info:{singular:c("information message"),plural:c("information messages")}}},enumerable:!1,configurable:!0}),p.prototype.showTooltip=function(g){var m=this.editor.renderer.$gutterLayer,v=m.$annotations[g],y;v?y={text:Array.from(v.text),type:Array.from(v.type)}:y={text:[],type:[]};var b=m.session.getFoldLine(g);if(b&&m.$showFoldedAnnotations){for(var w={error:[],warning:[],info:[]},k,x=g+1;x<=b.end.row;x++)if(m.$annotations[x])for(var S=0;S ").concat(y.text[x]);O[y.type[x].replace("_fold","")].push(R)}var A=[].concat(O.error,O.warning,O.info).join("
    ");this.setHtml(A),this.$element.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.editor._signal("showGutterTooltip",this)},p.prototype.hideTooltip=function(){this.$element.removeAttribute("aria-live"),this.hide(),this.editor._signal("hideGutterTooltip",this)},p.annotationsToSummaryString=function(g){var m,v,y=[],b=["error","warning","info"];try{for(var w=s(b),k=w.next();!k.done;k=w.next()){var x=k.value;if(g[x].length){var S=g[x].length===1?p.annotationLabels[x].singular:p.annotationLabels[x].plural;y.push("".concat(g[x].length," ").concat(S))}}}catch(T){m={error:T}}finally{try{k&&!k.done&&(v=w.return)&&v.call(w)}finally{if(m)throw m.error}}return y.join(", ")},p}(u);r.GutterTooltip=h}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,r,o){var i=n("../lib/event"),s=n("../lib/useragent"),l=function(){function a(u,c){this.domEvent=u,this.editor=c,this.x=this.clientX=u.clientX,this.y=this.clientY=u.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return a.prototype.stopPropagation=function(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},a.prototype.preventDefault=function(){i.preventDefault(this.domEvent),this.defaultPrevented=!0},a.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},a.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},a.prototype.getGutterRow=function(){var u=this.getDocumentPosition().row,c=this.editor.session.documentToScreenRow(u,0),d=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return c-d},a.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var u=this.editor,c=u.getSelectionRange();if(c.isEmpty())this.$inSelection=!1;else{var d=this.getDocumentPosition();this.$inSelection=c.contains(d.row,d.column)}return this.$inSelection},a.prototype.getButton=function(){return i.getButton(this.domEvent)},a.prototype.getShiftKey=function(){return this.domEvent.shiftKey},a.prototype.getAccelKey=function(){return s.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},a}();r.MouseEvent=l}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(n,r,o){var i=n("../lib/dom"),s=n("../lib/event"),l=n("../lib/useragent"),a=200,u=200,c=5;function d(f){var p=f.editor,g=i.createElement("div");g.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",g.textContent=" ";var m=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];m.forEach(function(W){f[W]=this[W]},this),p.on("mousedown",this.onMouseDown.bind(f));var v=p.container,y,b,w,k,x,S,T=0,C,O,_,R,A;this.onDragStart=function(W){if(this.cancelDrag||!v.draggable){var B=this;return setTimeout(function(){B.startSelect(),B.captureMouse(W)},0),W.preventDefault()}x=p.getSelectionRange();var H=W.dataTransfer;H.effectAllowed=p.getReadOnly()?"copy":"copyMove",p.container.appendChild(g),H.setDragImage&&H.setDragImage(g,0,0),setTimeout(function(){p.container.removeChild(g)}),H.clearData(),H.setData("Text",p.session.getTextRange()),O=!0,this.setState("drag")},this.onDragEnd=function(W){if(v.draggable=!1,O=!1,this.setState(null),!p.getReadOnly()){var B=W.dataTransfer.dropEffect;!C&&B=="move"&&p.session.remove(p.getSelectionRange()),p.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(W){if(!(p.getReadOnly()||!F(W.dataTransfer)))return b=W.clientX,w=W.clientY,y||N(),T++,W.dataTransfer.dropEffect=C=U(W),s.preventDefault(W)},this.onDragOver=function(W){if(!(p.getReadOnly()||!F(W.dataTransfer)))return b=W.clientX,w=W.clientY,y||(N(),T++),$!==null&&($=null),W.dataTransfer.dropEffect=C=U(W),s.preventDefault(W)},this.onDragLeave=function(W){if(T--,T<=0&&y)return L(),C=null,s.preventDefault(W)},this.onDrop=function(W){if(S){var B=W.dataTransfer;if(O)switch(C){case"move":x.contains(S.row,S.column)?x={start:S,end:S}:x=p.moveText(x,S);break;case"copy":x=p.moveText(x,S,!0);break}else{var H=B.getData("Text");x={start:S,end:p.session.insert(S,H)},p.focus(),C=null}return L(),s.preventDefault(W)}},s.addListener(v,"dragstart",this.onDragStart.bind(f),p),s.addListener(v,"dragend",this.onDragEnd.bind(f),p),s.addListener(v,"dragenter",this.onDragEnter.bind(f),p),s.addListener(v,"dragover",this.onDragOver.bind(f),p),s.addListener(v,"dragleave",this.onDragLeave.bind(f),p),s.addListener(v,"drop",this.onDrop.bind(f),p);function E(W,B){var H=Date.now(),V=!B||W.row!=B.row,Y=!B||W.column!=B.column;if(!R||V||Y)p.moveCursorToPosition(W),R=H,A={x:b,y:w};else{var X=h(A.x,A.y,b,w);X>c?R=null:H-R>=u&&(p.renderer.scrollCursorIntoView(),R=null)}}function M(W,B){var H=Date.now(),V=p.renderer.layerConfig.lineHeight,Y=p.renderer.layerConfig.characterWidth,X=p.renderer.scroller.getBoundingClientRect(),Z={x:{left:b-X.left,right:X.right-b},y:{top:w-X.top,bottom:X.bottom-w}},te=Math.min(Z.x.left,Z.x.right),ce=Math.min(Z.y.top,Z.y.bottom),Ne={row:W.row,column:W.column};te/Y<=2&&(Ne.column+=Z.x.left=a&&p.renderer.scrollCursorIntoView(Ne):_=H:_=null}function I(){var W=S;S=p.renderer.screenToTextCoordinates(b,w),E(S,W),M(S,W)}function N(){x=p.selection.toOrientedRange(),y=p.session.addMarker(x,"ace_selection",p.getSelectionStyle()),p.clearSelection(),p.isFocused()&&p.renderer.$cursorLayer.setBlinking(!1),clearInterval(k),I(),k=setInterval(I,20),T=0,s.addListener(document,"mousemove",D)}function L(){clearInterval(k),p.session.removeMarker(y),y=null,p.selection.fromOrientedRange(x),p.isFocused()&&!O&&p.$resetCursorStyle(),x=null,S=null,T=0,_=null,R=null,s.removeListener(document,"mousemove",D)}var $=null;function D(){$==null&&($=setTimeout(function(){$!=null&&y&&L()},20))}function F(W){var B=W.types;return!B||Array.prototype.some.call(B,function(H){return H=="text/plain"||H=="Text"})}function U(W){var B=["copy","copymove","all","uninitialized"],H=["move","copymove","linkmove","all","uninitialized"],V=l.isMac?W.altKey:W.ctrlKey,Y="uninitialized";try{Y=W.dataTransfer.effectAllowed.toLowerCase()}catch{}var X="none";return V&&B.indexOf(Y)>=0?X="copy":H.indexOf(Y)>=0?X="move":B.indexOf(Y)>=0&&(X="copy"),X}}(function(){this.dragWait=function(){var f=Date.now()-this.mousedownEvent.time;f>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var f=this.editor.container;f.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(f){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var f=this.editor,p=f.container;p.draggable=!0,f.renderer.$cursorLayer.setBlinking(!1),f.setStyle("ace_dragging");var g=l.isWin?"default":"move";f.renderer.setCursorStyle(g),this.setState("dragReady")},this.onMouseDrag=function(f){var p=this.editor.container;if(l.isIE&&this.state=="dragReady"){var g=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);g>3&&p.dragDrop()}if(this.state==="dragWait"){var g=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);g>0&&(p.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(f){if(this.$dragEnabled){this.mousedownEvent=f;var p=this.editor,g=f.inSelection(),m=f.getButton(),v=f.domEvent.detail||1;if(v===1&&m===0&&g){if(f.editor.inMultiSelectMode&&(f.getAccelKey()||f.getShiftKey()))return;this.mousedownEvent.time=Date.now();var y=f.domEvent.target||f.domEvent.srcElement;if("unselectable"in y&&(y.unselectable="on"),p.getDragDelay()){if(l.isWebKit){this.cancelDrag=!0;var b=p.container;b.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(f,this.onMouseDrag.bind(this)),f.defaultPrevented=!0}}}}).call(d.prototype);function h(f,p,g,m){return Math.sqrt(Math.pow(g-f,2)+Math.pow(m-p,2))}r.DragdropHandler=d}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(n,r,o){var i=n("./mouse_event").MouseEvent,s=n("../lib/event"),l=n("../lib/dom");r.addTouchListeners=function(a,u){var c="scroll",d,h,f,p,g,m,v=0,y,b=0,w=0,k=0,x,S;function T(){var E=window.navigator&&window.navigator.clipboard,M=!1,I=function(){var L=u.getCopyText(),$=u.session.getUndoManager().hasUndo();S.replaceChild(l.buildDom(M?["span",!L&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],L&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],L&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],E&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],$&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),S.firstChild)},N=function(L){var $=L.target.getAttribute("action");if($=="more"||!M)return M=!M,I();$=="paste"?E.readText().then(function(D){u.execCommand($,D)}):$&&(($=="cut"||$=="copy")&&(E?E.writeText(u.getCopyText()):document.execCommand("copy")),u.execCommand($)),S.firstChild.style.display="none",M=!1,$!="openCommandPalette"&&u.focus()};S=l.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(L){c="menu",L.stopPropagation(),L.preventDefault(),u.textInput.focus()},ontouchend:function(L){L.stopPropagation(),L.preventDefault(),N(L)},onclick:N},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],u.container)}function C(){S||T();var E=u.selection.cursor,M=u.renderer.textToScreenCoordinates(E.row,E.column),I=u.renderer.textToScreenCoordinates(0,0).pageX,N=u.renderer.scrollLeft,L=u.container.getBoundingClientRect();S.style.top=M.pageY-L.top-3+"px",M.pageX-L.left=2?u.selection.getLineRange(y.row):u.session.getBracketRange(y);E&&!E.isEmpty()?u.selection.setRange(E):u.selection.selectWord(),c="wait"}s.addListener(a,"contextmenu",function(E){if(x){var M=u.textInput.getElement();M.focus()}},u),s.addListener(a,"touchstart",function(E){var M=E.touches;if(g||M.length>1){clearTimeout(g),g=null,f=-1,c="zoom";return}x=u.$mouseHandler.isMousePressed=!0;var I=u.renderer.layerConfig.lineHeight,N=u.renderer.layerConfig.lineHeight,L=E.timeStamp;p=L;var $=M[0],D=$.clientX,F=$.clientY;Math.abs(d-D)+Math.abs(h-F)>I&&(f=-1),d=E.clientX=D,h=E.clientY=F,w=k=0;var U=new i(E,u);if(y=U.getDocumentPosition(),L-f<500&&M.length==1&&!v)b++,E.preventDefault(),E.button=0,R();else{b=0;var W=u.selection.cursor,B=u.selection.isEmpty()?W:u.selection.anchor,H=u.renderer.$cursorLayer.getPixelPosition(W,!0),V=u.renderer.$cursorLayer.getPixelPosition(B,!0),Y=u.renderer.scroller.getBoundingClientRect(),X=u.renderer.layerConfig.offset,Z=u.renderer.scrollLeft,te=function(ye,Me){return ye=ye/N,Me=Me/I-.75,ye*ye+Me*Me};if(E.clientXNe?"cursor":"anchor"),Ne<3.5?c="anchor":ce<3.5?c="cursor":c="scroll",g=setTimeout(_,450)}f=L},u),s.addListener(a,"touchend",function(E){x=u.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),c=="zoom"?(c="",v=0):g?(u.selection.moveToPosition(y),v=0,C()):c=="scroll"?(A(),O()):C(),clearTimeout(g),g=null},u),s.addListener(a,"touchmove",function(E){g&&(clearTimeout(g),g=null);var M=E.touches;if(!(M.length>1||c=="zoom")){var I=M[0],N=d-I.clientX,L=h-I.clientY;if(c=="wait")if(N*N+L*L>4)c="cursor";else return E.preventDefault();d=I.clientX,h=I.clientY,E.clientX=I.clientX,E.clientY=I.clientY;var $=E.timeStamp,D=$-p;if(p=$,c=="scroll"){var F=new i(E,u);F.speed=1,F.wheelX=N,F.wheelY=L,10*Math.abs(N)0)if(Ne==16){for(Ce=Me;Ce-1){for(Ce=Me;Ce=0&&V[wt]==x;wt--)B[wt]=i}}}function D(W,B,H){if(!(s=W){for(X=Y+1;X=W;)X++;for(Z=Y,te=X-1;Z=B.length||(X=H[V-1])!=m&&X!=v||(Z=B[V+1])!=m&&Z!=v?y:(l&&(Z=v),Z==X?Z:y);case T:return X=V>0?H[V-1]:b,X==m&&V+10&&H[V-1]==m)return m;if(l)return y;for(ce=V+1,te=B.length;ce=1425&&Ne<=2303||Ne==64286;if(X=B[ce],ye&&(X==g||X==k))return g}return V<1||(X=B[V-1])==b?y:H[V-1];case b:return l=!1,a=!0,i;case w:return u=!0,y;case _:case R:case E:case M:case A:l=!1;case I:return y}}function U(W){var B=W.charCodeAt(0),H=B>>8;return H==0?B>191?p:N[B]:H==5?/[\u0591-\u05f4]/.test(W)?g:p:H==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(W)?O:/[\u0660-\u0669\u066b-\u066c]/.test(W)?v:B==1642?C:/[\u06f0-\u06f9]/.test(W)?m:k:H==32&&B<=8287?L[B&255]:H==254&&B>=65136?k:y}r.L=p,r.R=g,r.EN=m,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(W,B,H){if(W.length<2)return{};var V=W.split(""),Y=new Array(V.length),X=new Array(V.length),Z=[];i=H?f:h,$(V,Z,V.length,B);for(var te=0;tek&&B[te]<_||B[te]===y||B[te]===I)?Z[te]=r.ON_R:te>0&&V[te-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(V[te])&&(Z[te-1]=Z[te]=r.R_H,te++);V[V.length-1]===r.DOT&&(Z[V.length-1]=r.B),V[0]==="‫"&&(Z[0]=r.RLE);for(var te=0;te=0&&(c=this.session.$docRowCache[h])}return c},u.prototype.getSplitIndex=function(){var c=0,d=this.session.$screenRowCache;if(d.length)for(var h,f=this.session.$getRowCacheIndex(d,this.currentRow);this.currentRow-c>0&&(h=this.session.$getRowCacheIndex(d,this.currentRow-c-1),h===f);)f=h,c++;else c=this.currentRow;return c},u.prototype.updateRowLine=function(c,d){c===void 0&&(c=this.getDocumentRow());var h=c===this.session.getLength()-1,f=h?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(c),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var p=this.session.$wrapData[c];p&&(d===void 0&&(d=this.getSplitIndex()),d>0&&p.length?(this.wrapIndent=p.indent,this.wrapOffset=this.wrapIndent*this.charWidths[i.L],this.line=dd?this.session.getOverwrite()?c:c-1:d,f=i.getVisualFromLogicalIdx(h,this.bidiMap),p=this.bidiMap.bidiLevels,g=0;!this.session.getOverwrite()&&c<=d&&p[f]%2!==0&&f++;for(var m=0;md&&p[f]%2===0&&(g+=this.charWidths[p[f]]),this.wrapIndent&&(g+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(g+=this.rtlLineOffset),g},u.prototype.getSelections=function(c,d){var h=this.bidiMap,f=h.bidiLevels,p,g=[],m=0,v=Math.min(c,d)-this.wrapIndent,y=Math.max(c,d)-this.wrapIndent,b=!1,w=!1,k=0;this.wrapIndent&&(m+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var x,S=0;S=v&&xf+m/2;){if(f+=m,p===g.length-1){m=0;break}m=this.charWidths[g[++p]]}return p>0&&g[p-1]%2!==0&&g[p]%2===0?(h0&&g[p-1]%2===0&&g[p]%2!==0?d=1+(h>f?this.bidiMap.logicalFromVisual[p]:this.bidiMap.logicalFromVisual[p-1]):this.isRtlDir&&p===g.length-1&&m===0&&g[p-1]%2===0||!this.isRtlDir&&p===0&&g[p]%2!==0?d=1+this.bidiMap.logicalFromVisual[p]:(p>0&&g[p-1]%2!==0&&m!==0&&p--,d=this.bidiMap.logicalFromVisual[p]),d===0&&this.isRtlDir&&d++,d+this.wrapIndent},u}();r.BidiHandler=a}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(n,r,o){var i=n("./lib/oop"),s=n("./lib/lang"),l=n("./lib/event_emitter").EventEmitter,a=n("./range").Range,u=function(){function c(d){this.session=d,this.doc=d.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var h=this;this.cursor.on("change",function(f){h.$cursorChanged=!0,h.$silent||h._emit("changeCursor"),!h.$isEmpty&&!h.$silent&&h._emit("changeSelection"),!h.$keepDesiredColumnOnChange&&f.old.column!=f.value.column&&(h.$desiredColumn=null)}),this.anchor.on("change",function(){h.$anchorChanged=!0,!h.$isEmpty&&!h.$silent&&h._emit("changeSelection")})}return c.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},c.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},c.prototype.getCursor=function(){return this.lead.getPosition()},c.prototype.setAnchor=function(d,h){this.$isEmpty=!1,this.anchor.setPosition(d,h)},c.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},c.prototype.getSelectionLead=function(){return this.lead.getPosition()},c.prototype.isBackwards=function(){var d=this.anchor,h=this.lead;return d.row>h.row||d.row==h.row&&d.column>h.column},c.prototype.getRange=function(){var d=this.anchor,h=this.lead;return this.$isEmpty?a.fromPoints(h,h):this.isBackwards()?a.fromPoints(h,d):a.fromPoints(d,h)},c.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},c.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},c.prototype.setRange=function(d,h){var f=h?d.end:d.start,p=h?d.start:d.end;this.$setSelection(f.row,f.column,p.row,p.column)},c.prototype.$setSelection=function(d,h,f,p){if(!this.$silent){var g=this.$isEmpty,m=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(d,h),this.cursor.setPosition(f,p),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||g!=this.$isEmpty||m)&&this._emit("changeSelection")}},c.prototype.$moveSelection=function(d){var h=this.lead;this.$isEmpty&&this.setSelectionAnchor(h.row,h.column),d.call(this)},c.prototype.selectTo=function(d,h){this.$moveSelection(function(){this.moveCursorTo(d,h)})},c.prototype.selectToPosition=function(d){this.$moveSelection(function(){this.moveCursorToPosition(d)})},c.prototype.moveTo=function(d,h){this.clearSelection(),this.moveCursorTo(d,h)},c.prototype.moveToPosition=function(d){this.clearSelection(),this.moveCursorToPosition(d)},c.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},c.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},c.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},c.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},c.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},c.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},c.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},c.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},c.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},c.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},c.prototype.getWordRange=function(d,h){if(typeof h>"u"){var f=d||this.lead;d=f.row,h=f.column}return this.session.getWordRange(d,h)},c.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},c.prototype.selectAWord=function(){var d=this.getCursor(),h=this.session.getAWordRange(d.row,d.column);this.setSelectionRange(h)},c.prototype.getLineRange=function(d,h){var f=typeof d=="number"?d:this.lead.row,p,g=this.session.getFoldLine(f);return g?(f=g.start.row,p=g.end.row):p=f,h===!0?new a(f,0,p,this.session.getLine(p).length):new a(f,0,p+1,0)},c.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},c.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},c.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},c.prototype.wouldMoveIntoSoftTab=function(d,h,f){var p=d.column,g=d.column+h;return f<0&&(p=d.column-h,g=d.column),this.session.isTabStop(d)&&this.doc.getLine(d.row).slice(p,g).split(" ").length-1==h},c.prototype.moveCursorLeft=function(){var d=this.lead.getPosition(),h;if(h=this.session.getFoldAt(d.row,d.column,-1))this.moveCursorTo(h.start.row,h.start.column);else if(d.column===0)d.row>0&&this.moveCursorTo(d.row-1,this.doc.getLine(d.row-1).length);else{var f=this.session.getTabSize();this.wouldMoveIntoSoftTab(d,f,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-f):this.moveCursorBy(0,-1)}},c.prototype.moveCursorRight=function(){var d=this.lead.getPosition(),h;if(h=this.session.getFoldAt(d.row,d.column,1))this.moveCursorTo(h.end.row,h.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(h.column=p)}}this.moveCursorTo(h.row,h.column)},c.prototype.moveCursorFileEnd=function(){var d=this.doc.getLength()-1,h=this.doc.getLine(d).length;this.moveCursorTo(d,h)},c.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},c.prototype.moveCursorLongWordRight=function(){var d=this.lead.row,h=this.lead.column,f=this.doc.getLine(d),p=f.substring(h);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var g=this.session.getFoldAt(d,h,1);if(g){this.moveCursorTo(g.end.row,g.end.column);return}if(this.session.nonTokenRe.exec(p)&&(h+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,p=f.substring(h)),h>=f.length){this.moveCursorTo(d,f.length),this.moveCursorRight(),d0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(g)&&(h-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(d,h)},c.prototype.$shortWordEndIndex=function(d){var h=0,f,p=/\s/,g=this.session.tokenRe;if(g.lastIndex=0,this.session.tokenRe.exec(d))h=this.session.tokenRe.lastIndex;else{for(;(f=d[h])&&p.test(f);)h++;if(h<1){for(g.lastIndex=0;(f=d[h])&&!g.test(f);)if(g.lastIndex=0,h++,p.test(f))if(h>2){h--;break}else{for(;(f=d[h])&&p.test(f);)h++;if(h>2)break}}}return g.lastIndex=0,h},c.prototype.moveCursorShortWordRight=function(){var d=this.lead.row,h=this.lead.column,f=this.doc.getLine(d),p=f.substring(h),g=this.session.getFoldAt(d,h,1);if(g)return this.moveCursorTo(g.end.row,g.end.column);if(h==f.length){var m=this.doc.getLength();do d++,p=this.doc.getLine(d);while(d0&&/^\s*$/.test(p));h=p.length,/\s+$/.test(p)||(p="")}var g=s.stringReverse(p),m=this.$shortWordEndIndex(g);return this.moveCursorTo(d,h-m)},c.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},c.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},c.prototype.moveCursorBy=function(d,h){var f=this.session.documentToScreenPosition(this.lead.row,this.lead.column),p;if(h===0&&(d!==0&&(this.session.$bidiHandler.isBidiRow(f.row,this.lead.row)?(p=this.session.$bidiHandler.getPosLeft(f.column),f.column=Math.round(p/this.session.$bidiHandler.charWidths[0])):p=f.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?f.column=this.$desiredColumn:this.$desiredColumn=f.column),d!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var g=this.session.lineWidgets[this.lead.row];d<0?d-=g.rowsAbove||0:d>0&&(d+=g.rowCount-(g.rowsAbove||0))}var m=this.session.screenToDocumentPosition(f.row+d,f.column,p);d!==0&&h===0&&m.row===this.lead.row&&(m.column,this.lead.column),this.moveCursorTo(m.row,m.column+h,h===0)},c.prototype.moveCursorToPosition=function(d){this.moveCursorTo(d.row,d.column)},c.prototype.moveCursorTo=function(d,h,f){var p=this.session.getFoldAt(d,h,1);p&&(d=p.start.row,h=p.start.column),this.$keepDesiredColumnOnChange=!0;var g=this.session.getLine(d);/[\uDC00-\uDFFF]/.test(g.charAt(h))&&g.charAt(h-1)&&(this.lead.row==d&&this.lead.column==h+1?h=h-1:h=h+1),this.lead.setPosition(d,h),this.$keepDesiredColumnOnChange=!1,f||(this.$desiredColumn=null)},c.prototype.moveCursorToScreen=function(d,h,f){var p=this.session.screenToDocumentPosition(d,h);this.moveCursorTo(p.row,p.column,f)},c.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},c.prototype.fromOrientedRange=function(d){this.setSelectionRange(d,d.cursor==d.start),this.$desiredColumn=d.desiredColumn||this.$desiredColumn},c.prototype.toOrientedRange=function(d){var h=this.getRange();return d?(d.start.column=h.start.column,d.start.row=h.start.row,d.end.column=h.end.column,d.end.row=h.end.row):d=h,d.cursor=this.isBackwards()?d.start:d.end,d.desiredColumn=this.$desiredColumn,d},c.prototype.getRangeOfMovements=function(d){var h=this.getCursor();try{d(this);var f=this.getCursor();return a.fromPoints(h,f)}catch{return a.fromPoints(h,h)}finally{this.moveCursorToPosition(h)}},c.prototype.toJSON=function(){if(this.rangeCount)var d=this.ranges.map(function(h){var f=h.clone();return f.isBackwards=h.cursor==h.start,f});else{var d=this.getRange();d.isBackwards=this.isBackwards()}return d},c.prototype.fromJSON=function(d){if(d.start==null)if(this.rangeList&&d.length>1){this.toSingleRange(d[0]);for(var h=d.length;h--;){var f=a.fromPoints(d[h].start,d[h].end);d[h].isBackwards&&(f.cursor=f.start),this.addRange(f,!0)}return}else d=d[0];this.rangeList&&this.toSingleRange(d),this.setSelectionRange(d,d.isBackwards)},c.prototype.isEqual=function(d){if((d.length||this.rangeCount)&&d.length!=this.rangeCount)return!1;if(!d.length||!this.ranges)return this.getRange().isEqual(d);for(var h=this.ranges.length;h--;)if(!this.ranges[h].isEqual(d[h]))return!1;return!0},c}();u.prototype.setSelectionAnchor=u.prototype.setAnchor,u.prototype.getSelectionAnchor=u.prototype.getAnchor,u.prototype.setSelectionRange=u.prototype.setRange,i.implement(u.prototype,l),r.Selection=u}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(n,r,o){var i=n("./lib/report_error").reportError,s=2e3,l=function(){function a(u){this.states=u,this.regExps={},this.matchMappings={};for(var c in this.states){for(var d=this.states[c],h=[],f=0,p=this.matchMappings[c]={defaultToken:"text"},g="g",m=[],v=0;v1?y.onMatch=this.$applyToken:y.onMatch=y.token),w>1&&(/\\\d/.test(y.regex)?b=y.regex.replace(/\\([0-9]+)/g,function(k,x){return"\\"+(parseInt(x,10)+f+1)}):(w=1,b=this.removeCapturingGroups(y.regex)),!y.splitRegex&&typeof y.token!="string"&&m.push(y)),p[f]=v,f+=w,h.push(b),y.onMatch||(y.onMatch=null)}}h.length||(p[0]=0,h.push("$")),m.forEach(function(k){k.splitRegex=this.createSplitterRegexp(k.regex,g)},this),this.regExps[c]=new RegExp("("+h.join(")|(")+")|($)",g)}}return a.prototype.$setMaxTokenCount=function(u){s=u|0},a.prototype.$applyToken=function(u){var c=this.splitRegex.exec(u).slice(1),d=this.token.apply(this,c);if(typeof d=="string")return[{type:d,value:u}];for(var h=[],f=0,p=d.length;fy){var C=u.substring(y,T-S.length);w.type==k?w.value+=C:(w.type&&v.push(w),w={type:k,value:C})}for(var O=0;Os){for(b>2*u.length&&this.reportError("infinite loop with in ace tokenizer",{startState:c,line:u});y1&&d[0]!==h&&d.unshift("#tmp",h),{tokens:v,state:d.length?d:h}},a}();l.prototype.reportError=i,r.Tokenizer=l}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(n,r,o){var i=n("../lib/deep_copy").deepCopy,s=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(u,c){if(!c){for(var d in u)this.$rules[d]=u[d];return}for(var d in u){for(var h=u[d],f=0;f=this.$rowTokens.length;){if(this.$row+=1,a||(a=this.$session.getLength()),this.$row>=a)return this.$row=a-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},l.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},l.prototype.getCurrentTokenRow=function(){return this.$row},l.prototype.getCurrentTokenColumn=function(){var a=this.$rowTokens,u=this.$tokenIndex,c=a[u].start;if(c!==void 0)return c;for(c=0;u>0;)u-=1,c+=a[u].value.length;return c},l.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},l.prototype.getCurrentTokenRange=function(){var a=this.$rowTokens[this.$tokenIndex],u=this.getCurrentTokenColumn();return new i(this.$row,u,this.$row,u+a.value.length)},l}();r.TokenIterator=s}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,r,o){var i=n("../../lib/oop"),s=n("../behaviour").Behaviour,l=n("../../token_iterator").TokenIterator,a=n("../../lib/lang"),u=["text","paren.rparen","rparen","paren","punctuation.operator"],c=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],d,h={},f={'"':'"',"'":"'"},p=function(v){var y=-1;if(v.multiSelect&&(y=v.selection.index,h.rangeCount!=v.multiSelect.rangeCount&&(h={rangeCount:v.multiSelect.rangeCount})),h[y])return d=h[y];d=h[y]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},g=function(v,y,b,w){var k=v.end.row-v.start.row;return{text:b+y+w,selection:[0,v.start.column+1,k,v.end.column+(k?0:1)]}},m=function(v){v=v||{},this.add("braces","insertion",function(y,b,w,k,x){var S=w.getCursorPosition(),T=k.doc.getLine(S.row);if(x=="{"){p(w);var C=w.getSelectionRange(),O=k.doc.getTextRange(C);if(O!==""&&O!=="{"&&w.getWrapBehavioursEnabled())return g(C,O,"{","}");if(m.isSaneInsertion(w,k))return/[\]\}\)]/.test(T[S.column])||w.inMultiSelectMode||v.braces?(m.recordAutoInsert(w,k,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(w,k,"{"),{text:"{",selection:[1,1]})}else if(x=="}"){p(w);var _=T.substring(S.column,S.column+1);if(_=="}"){var R=k.$findOpeningBracket("}",{column:S.column+1,row:S.row});if(R!==null&&m.isAutoInsertedClosing(S,T,x))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(x==` +`||x==`\r +`){p(w);var A="";m.isMaybeInsertedClosing(S,T)&&(A=a.stringRepeat("}",d.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var _=T.substring(S.column,S.column+1);if(_==="}"){var E=k.findMatchingBracket({row:S.row,column:S.column+1},"}");if(!E)return null;var M=this.$getIndent(k.getLine(E.row))}else if(A)var M=this.$getIndent(T);else{m.clearMaybeInsertedClosing();return}var I=M+k.getTabString();return{text:` +`+I+` +`+M+A,selection:[1,I.length,1,I.length]}}else m.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(y,b,w,k,x){var S=k.doc.getTextRange(x);if(!x.isMultiLine()&&S=="{"){p(w);var T=k.doc.getLine(x.start.row),C=T.substring(x.end.column,x.end.column+1);if(C=="}")return x.end.column++,x;d.maybeInsertedBrackets--}}),this.add("parens","insertion",function(y,b,w,k,x){if(x=="("){p(w);var S=w.getSelectionRange(),T=k.doc.getTextRange(S);if(T!==""&&w.getWrapBehavioursEnabled())return g(S,T,"(",")");if(m.isSaneInsertion(w,k))return m.recordAutoInsert(w,k,")"),{text:"()",selection:[1,1]}}else if(x==")"){p(w);var C=w.getCursorPosition(),O=k.doc.getLine(C.row),_=O.substring(C.column,C.column+1);if(_==")"){var R=k.$findOpeningBracket(")",{column:C.column+1,row:C.row});if(R!==null&&m.isAutoInsertedClosing(C,O,x))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(y,b,w,k,x){var S=k.doc.getTextRange(x);if(!x.isMultiLine()&&S=="("){p(w);var T=k.doc.getLine(x.start.row),C=T.substring(x.start.column+1,x.start.column+2);if(C==")")return x.end.column++,x}}),this.add("brackets","insertion",function(y,b,w,k,x){if(x=="["){p(w);var S=w.getSelectionRange(),T=k.doc.getTextRange(S);if(T!==""&&w.getWrapBehavioursEnabled())return g(S,T,"[","]");if(m.isSaneInsertion(w,k))return m.recordAutoInsert(w,k,"]"),{text:"[]",selection:[1,1]}}else if(x=="]"){p(w);var C=w.getCursorPosition(),O=k.doc.getLine(C.row),_=O.substring(C.column,C.column+1);if(_=="]"){var R=k.$findOpeningBracket("]",{column:C.column+1,row:C.row});if(R!==null&&m.isAutoInsertedClosing(C,O,x))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(y,b,w,k,x){var S=k.doc.getTextRange(x);if(!x.isMultiLine()&&S=="["){p(w);var T=k.doc.getLine(x.start.row),C=T.substring(x.start.column+1,x.start.column+2);if(C=="]")return x.end.column++,x}}),this.add("string_dquotes","insertion",function(y,b,w,k,x){var S=k.$mode.$quotes||f;if(x.length==1&&S[x]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(x)!=-1)return;p(w);var T=x,C=w.getSelectionRange(),O=k.doc.getTextRange(C);if(O!==""&&(O.length!=1||!S[O])&&w.getWrapBehavioursEnabled())return g(C,O,T,T);if(!O){var _=w.getCursorPosition(),R=k.doc.getLine(_.row),A=R.substring(_.column-1,_.column),E=R.substring(_.column,_.column+1),M=k.getTokenAt(_.row,_.column),I=k.getTokenAt(_.row,_.column+1);if(A=="\\"&&M&&/escape/.test(M.type))return null;var N=M&&/string|escape/.test(M.type),L=!I||/string|escape/.test(I.type),$;if(E==T)$=N!==L,$&&/string\.end/.test(I.type)&&($=!1);else{if(N&&!L||N&&L)return null;var D=k.$mode.tokenRe;D.lastIndex=0;var F=D.test(A);D.lastIndex=0;var U=D.test(E),W=k.$mode.$pairQuotesAfter,B=W&&W[T]&&W[T].test(A);if(!B&&F||U||E&&!/[\s;,.})\]\\]/.test(E))return null;var H=R[_.column-2];if(A==T&&(H==T||D.test(H)))return null;$=!0}return{text:$?T+T:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(y,b,w,k,x){var S=k.$mode.$quotes||f,T=k.doc.getTextRange(x);if(!x.isMultiLine()&&S.hasOwnProperty(T)){p(w);var C=k.doc.getLine(x.start.row),O=C.substring(x.start.column+1,x.start.column+2);if(O==T)return x.end.column++,x}}),v.closeDocComment!==!1&&this.add("doc comment end","insertion",function(y,b,w,k,x){if(y==="doc-start"&&(x===` +`||x===`\r +`)&&w.selection.isEmpty()){var S=w.getCursorPosition(),T=k.doc.getLine(S.row),C=k.doc.getLine(S.row+1),O=this.$getIndent(T);if(/\s*\*/.test(C))return/^\s*\*/.test(T)?{text:x+O+"* ",selection:[1,3+O.length,1,3+O.length]}:{text:x+O+" * ",selection:[1,3+O.length,1,3+O.length]};if(/\/\*\*/.test(T.substring(0,S.column)))return{text:x+O+" * "+x+" "+O+"*/",selection:[1,4+O.length,1,4+O.length]}}})};m.isSaneInsertion=function(v,y){var b=v.getCursorPosition(),w=new l(y,b.row,b.column);if(!this.$matchTokenType(w.getCurrentToken()||"text",u)){if(/[)}\]]/.test(v.session.getLine(b.row)[b.column]))return!0;var k=new l(y,b.row,b.column+1);if(!this.$matchTokenType(k.getCurrentToken()||"text",u))return!1}return w.stepForward(),w.getCurrentTokenRow()!==b.row||this.$matchTokenType(w.getCurrentToken()||"text",c)},m.$matchTokenType=function(v,y){return y.indexOf(v.type||v)>-1},m.recordAutoInsert=function(v,y,b){var w=v.getCursorPosition(),k=y.doc.getLine(w.row);this.isAutoInsertedClosing(w,k,d.autoInsertedLineEnd[0])||(d.autoInsertedBrackets=0),d.autoInsertedRow=w.row,d.autoInsertedLineEnd=b+k.substr(w.column),d.autoInsertedBrackets++},m.recordMaybeInsert=function(v,y,b){var w=v.getCursorPosition(),k=y.doc.getLine(w.row);this.isMaybeInsertedClosing(w,k)||(d.maybeInsertedBrackets=0),d.maybeInsertedRow=w.row,d.maybeInsertedLineStart=k.substr(0,w.column)+b,d.maybeInsertedLineEnd=k.substr(w.column),d.maybeInsertedBrackets++},m.isAutoInsertedClosing=function(v,y,b){return d.autoInsertedBrackets>0&&v.row===d.autoInsertedRow&&b===d.autoInsertedLineEnd[0]&&y.substr(v.column)===d.autoInsertedLineEnd},m.isMaybeInsertedClosing=function(v,y){return d.maybeInsertedBrackets>0&&v.row===d.maybeInsertedRow&&y.substr(v.column)===d.maybeInsertedLineEnd&&y.substr(0,v.column)==d.maybeInsertedLineStart},m.popAutoInsertedClosing=function(){d.autoInsertedLineEnd=d.autoInsertedLineEnd.substr(1),d.autoInsertedBrackets--},m.clearMaybeInsertedClosing=function(){d&&(d.maybeInsertedBrackets=0,d.maybeInsertedRow=-1)},i.inherits(m,s),r.CstyleBehaviour=m}),ace.define("ace/unicode",["require","exports","module"],function(n,r,o){for(var i=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],s=0,l=[],a=0;a2?H%x!=x-1:H%x==0}}else{if(!this.blockComment)return!1;var T=this.blockComment.start,C=this.blockComment.end,O=new RegExp("^(\\s*)(?:"+c.escapeRegExp(T)+")"),_=new RegExp("(?:"+c.escapeRegExp(C)+")\\s*$"),R=function($,D){E($,D)||(!b||/\S/.test($))&&(y.insertInLine({row:D,column:$.length},C),y.insertInLine({row:D,column:k},T))},A=function($,D){var F;(F=$.match(_))&&y.removeInLine(D,$.length-F[0].length,$.length),(F=$.match(O))&&y.removeInLine(D,F[1].length,F[0].length)},E=function($,D){if(O.test($))return!0;for(var F=g.getTokens(D),U=0;U$.length&&(L=$.length)}),k==1/0&&(k=L,b=!1,w=!1),S&&k%x!=0&&(k=Math.floor(k/x)*x),N(w?A:R)},this.toggleBlockComment=function(p,g,m,v){var y=this.blockComment;if(y){!y.start&&y[0]&&(y=y[0]);var b=new d(g,v.row,v.column),w=b.getCurrentToken();g.selection;var k=g.selection.toOrientedRange(),x,S;if(w&&/comment/.test(w.type)){for(var T,C;w&&/comment/.test(w.type);){var O=w.value.indexOf(y.start);if(O!=-1){var _=b.getCurrentTokenRow(),R=b.getCurrentTokenColumn()+O;T=new h(_,R,_,R+y.start.length);break}w=b.stepBackward()}for(var b=new d(g,v.row,v.column),w=b.getCurrentToken();w&&/comment/.test(w.type);){var O=w.value.indexOf(y.end);if(O!=-1){var _=b.getCurrentTokenRow(),R=b.getCurrentTokenColumn()+O;C=new h(_,R,_,R+y.end.length);break}w=b.stepForward()}C&&g.remove(C),T&&(g.remove(T),x=T.start.row,S=-y.start.length)}else S=y.start.length,x=m.start.row,g.insert(m.end,y.end),g.insert(m.start,y.start);k.start.row==x&&(k.start.column+=S),k.end.row==x&&(k.end.column+=S),g.selection.fromOrientedRange(k)}},this.getNextLineIndent=function(p,g,m){return this.$getIndent(g)},this.checkOutdent=function(p,g,m){return!1},this.autoOutdent=function(p,g,m){},this.$getIndent=function(p){return p.match(/^\s*/)[0]},this.createWorker=function(p){return null},this.createModeDelegates=function(p){this.$embeds=[],this.$modes={};for(var g in p)if(p[g]){var m=p[g],v=m.prototype.$id,y=i.$modes[v];y||(i.$modes[v]=y=new m),i.$modes[g]||(i.$modes[g]=y),this.$embeds.push(g),this.$modes[g]=y}for(var b=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],g=0;g"u"?this.setPosition(h.row,h.column):this.setPosition(h,f)}return c.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},c.prototype.getDocument=function(){return this.document},c.prototype.onChange=function(d){if(!(d.start.row==d.end.row&&d.start.row!=this.row)&&!(d.start.row>this.row)){var h=u(d,{row:this.row,column:this.column},this.$insertRight);this.setPosition(h.row,h.column,!0)}},c.prototype.setPosition=function(d,h,f){var p;if(f?p={row:d,column:h}:p=this.$clipPositionToDocument(d,h),!(this.row==p.row&&this.column==p.column)){var g={row:this.row,column:this.column};this.row=p.row,this.column=p.column,this._signal("change",{old:g,value:p})}},c.prototype.detach=function(){this.document.off("change",this.$onChange)},c.prototype.attach=function(d){this.document=d||this.document,this.document.on("change",this.$onChange)},c.prototype.$clipPositionToDocument=function(d,h){var f={};return d>=this.document.getLength()?(f.row=Math.max(0,this.document.getLength()-1),f.column=this.document.getLine(f.row).length):d<0?(f.row=0,f.column=0):(f.row=d,f.column=Math.min(this.document.getLine(f.row).length,Math.max(0,h))),h<0&&(f.column=0),f},c}();l.prototype.$insertRight=!1,i.implement(l.prototype,s);function a(c,d,h){var f=h?c.column<=d.column:c.column=p&&(h=p-1,f=void 0);var g=this.getLine(h);return f==null&&(f=g.length),f=Math.min(Math.max(f,0),g.length),{row:h,column:f}},d.prototype.clonePos=function(h){return{row:h.row,column:h.column}},d.prototype.pos=function(h,f){return{row:h,column:f}},d.prototype.$clipPosition=function(h){var f=this.getLength();return h.row>=f?(h.row=Math.max(0,f-1),h.column=this.getLine(f-1).length):(h.row=Math.max(0,h.row),h.column=Math.min(Math.max(h.column,0),this.getLine(h.row).length)),h},d.prototype.insertFullLines=function(h,f){h=Math.min(Math.max(h,0),this.getLength());var p=0;h0,g=f=0&&this.applyDelta({start:this.pos(h,this.getLine(h).length),end:this.pos(h+1,0),action:"remove",lines:["",""]})},d.prototype.replace=function(h,f){if(h instanceof a||(h=a.fromPoints(h.start,h.end)),f.length===0&&h.isEmpty())return h.start;if(f==this.getTextRange(h))return h.end;this.remove(h);var p;return f?p=this.insert(h.start,f):p=h.start,p},d.prototype.applyDeltas=function(h){for(var f=0;f=0;f--)this.revertDelta(h[f])},d.prototype.applyDelta=function(h,f){var p=h.action=="insert";(p?h.lines.length<=1&&!h.lines[0]:!a.comparePoints(h.start,h.end))||(p&&h.lines.length>2e4?this.$splitAndapplyLargeDelta(h,2e4):(s(this.$lines,h,f),this._signal("change",h)))},d.prototype.$safeApplyDelta=function(h){var f=this.$lines.length;(h.action=="remove"&&h.start.row20){d.running=setTimeout(d.$worker,20);break}}d.currentLine=f,p==-1&&(p=f),m<=p&&d.fireUpdateEvent(m,p)}}}return a.prototype.setTokenizer=function(u){this.tokenizer=u,this.lines=[],this.states=[],this.start(0)},a.prototype.setDocument=function(u){this.doc=u,this.lines=[],this.states=[],this.stop()},a.prototype.fireUpdateEvent=function(u,c){var d={first:u,last:c};this._signal("update",{data:d})},a.prototype.start=function(u){this.currentLine=Math.min(u||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},a.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},a.prototype.$updateOnChange=function(u){var c=u.start.row,d=u.end.row-c;if(d===0)this.lines[c]=null;else if(u.action=="remove")this.lines.splice(c,d+1,null),this.states.splice(c,d+1,null);else{var h=Array(d+1);h.unshift(c,1),this.lines.splice.apply(this.lines,h),this.states.splice.apply(this.states,h)}this.currentLine=Math.min(c,this.currentLine,this.doc.getLength()),this.stop()},a.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},a.prototype.getTokens=function(u){return this.lines[u]||this.$tokenizeRow(u)},a.prototype.getState=function(u){return this.currentLine==u&&this.$tokenizeRow(u),this.states[u]||"start"},a.prototype.$tokenizeRow=function(u){var c=this.doc.getLine(u),d=this.states[u-1],h=this.tokenizer.getLineTokens(c,d,u);return this.states[u]+""!=h.state+""?(this.states[u]=h.state,this.lines[u+1]=null,this.currentLine>u+1&&(this.currentLine=u+1)):this.currentLine==u&&(this.currentLine=u+1),this.lines[u]=h.tokens},a.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},a}();i.implement(l.prototype,s),r.BackgroundTokenizer=l}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(n,r,o){var i=n("./lib/lang"),s=n("./range").Range,l=function(){function a(u,c,d){d===void 0&&(d="text"),this.setRegexp(u),this.clazz=c,this.type=d}return a.prototype.setRegexp=function(u){this.regExp+""!=u+""&&(this.regExp=u,this.cache=[])},a.prototype.update=function(u,c,d,h){if(this.regExp)for(var f=h.firstRow,p=h.lastRow,g={},m=f;m<=p;m++){var v=this.cache[m];v==null&&(v=i.getMatchOffsets(d.getLine(m),this.regExp),v.length>this.MAX_RANGES&&(v=v.slice(0,this.MAX_RANGES)),v=v.map(function(k){return new s(m,k.offset,m,k.offset+k.length)}),this.cache[m]=v.length?v:"");for(var y=v.length;y--;){var b=v[y].toScreenRange(d),w=b.toString();g[w]||(g[w]=!0,c.drawSingleLineMarker(u,b,this.clazz,h))}}},a}();l.prototype.MAX_RANGES=500,r.SearchHighlight=l}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(n,r,o){var i=function(){function k(){this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return k.prototype.addSession=function(x){this.$session=x},k.prototype.add=function(x,S,T){if(!this.$fromUndo&&x!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),S===!1||!this.lastDeltas){this.lastDeltas=[];var C=this.$undoStack.length;C>this.$undoDepth-1&&this.$undoStack.splice(0,C-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),x.id=this.$rev=++this.$maxRev}(x.action=="remove"||x.action=="insert")&&(this.$lastDelta=x),this.lastDeltas.push(x)}},k.prototype.addSelection=function(x,S){this.selections.push({value:x,rev:S||this.$rev})},k.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},k.prototype.markIgnored=function(x,S){S==null&&(S=this.$rev+1);for(var T=this.$undoStack,C=T.length;C--;){var O=T[C][0];if(O.id<=x)break;O.id0},k.prototype.canRedo=function(){return this.$redoStack.length>0},k.prototype.bookmark=function(x){x==null&&(x=this.$rev),this.mark=x},k.prototype.isAtBookmark=function(){return this.$rev===this.mark},k.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},k.prototype.fromJSON=function(x){this.reset(),this.$undoStack=x.$undoStack,this.$redoStack=x.$redoStack},k.prototype.$prettyPrint=function(x){return x?d(x):d(this.$undoStack)+` +--- +`+d(this.$redoStack)},k}();i.prototype.hasUndo=i.prototype.canUndo,i.prototype.hasRedo=i.prototype.canRedo,i.prototype.isClean=i.prototype.isAtBookmark,i.prototype.markClean=i.prototype.bookmark;function s(k,x){for(var S=x;S--;){var T=k[S];if(T&&!T[0].ignore){for(;S"+k.end.row+":"+k.end.column}function f(k,x){var S=k.action=="insert",T=x.action=="insert";if(S&&T)if(a(x.start,k.end)>=0)m(x,k,-1);else if(a(x.start,k.start)<=0)m(k,x,1);else return null;else if(S&&!T)if(a(x.start,k.end)>=0)m(x,k,-1);else if(a(x.end,k.start)<=0)m(k,x,-1);else return null;else if(!S&&T)if(a(x.start,k.start)>=0)m(x,k,1);else if(a(x.start,k.start)<=0)m(k,x,1);else return null;else if(!S&&!T)if(a(x.start,k.start)>=0)m(x,k,1);else if(a(x.end,k.start)<=0)m(k,x,-1);else return null;return[x,k]}function p(k,x){for(var S=k.length;S--;)for(var T=0;T=0?m(k,x,-1):(a(k.start,x.start)<=0||m(k,l.fromPoints(x.start,k.start),-1),m(x,k,1));else if(!S&&T)a(x.start,k.end)>=0?m(x,k,-1):(a(x.start,k.start)<=0||m(x,l.fromPoints(k.start,x.start),-1),m(k,x,1));else if(!S&&!T)if(a(x.start,k.end)>=0)m(x,k,-1);else if(a(x.end,k.start)<=0)m(k,x,-1);else{var C,O;return a(k.start,x.start)<0&&(C=k,k=y(k,x.start)),a(k.end,x.end)>0&&(O=y(k,x.end)),v(x.end,k.start,k.end,-1),O&&!C&&(k.lines=O.lines,k.start=O.start,k.end=O.end,O=k),[x,C,O].filter(Boolean)}return[x,k]}function m(k,x,S){v(k.start,x.start,x.end,S),v(k.end,x.start,x.end,S)}function v(k,x,S,T){k.row==(T==1?x:S).row&&(k.column+=T*(S.column-x.column)),k.row+=T*(S.row-x.row)}function y(k,x){var S=k.lines,T=k.end;k.end=u(x);var C=k.end.row-k.start.row,O=S.splice(C,S.length),_=C?x.column:x.column-k.start.column;S.push(O[0].substring(0,_)),O[0]=O[0].substr(_);var R={start:u(x),end:T,lines:O,action:k.action};return R}function b(k,x){x=c(x);for(var S=k.length;S--;){for(var T=k[S],C=0;Cthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(a),this.folds.sort(function(u,c){return-u.range.compareEnd(c.start.row,c.start.column)}),this.range.compareEnd(a.start.row,a.start.column)>0?(this.end.row=a.end.row,this.end.column=a.end.column):this.range.compareStart(a.end.row,a.end.column)<0&&(this.start.row=a.start.row,this.start.column=a.start.column)}else if(a.start.row==this.end.row)this.folds.push(a),this.end.row=a.end.row,this.end.column=a.end.column;else if(a.end.row==this.start.row)this.folds.unshift(a),this.start.row=a.start.row,this.start.column=a.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");a.foldLine=this},l.prototype.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},l.prototype.walk=function(a,u,c){var d=0,h=this.folds,f,p,g,m=!0;u==null&&(u=this.end.row,c=this.end.column);for(var v=0;v0)){var m=s(u,p.start);return g===0?c&&m!==0?-f-2:f:m>0||m===0&&!c?f:-f-1}}return-f-1},a.prototype.add=function(u){var c=!u.isEmpty(),d=this.pointIndex(u.start,c);d<0&&(d=-d-1);var h=this.pointIndex(u.end,c,d);return h<0?h=-h-1:h++,this.ranges.splice(d,h-d,u)},a.prototype.addList=function(u){for(var c=[],d=u.length;d--;)c.push.apply(c,this.add(u[d]));return c},a.prototype.substractPoint=function(u){var c=this.pointIndex(u);if(c>=0)return this.ranges.splice(c,1)},a.prototype.merge=function(){var u=[],c=this.ranges;c=c.sort(function(g,m){return s(g.start,m.start)});for(var d=c[0],h,f=1;f=0},a.prototype.containsPoint=function(u){return this.pointIndex(u)>=0},a.prototype.rangeAtPoint=function(u){var c=this.pointIndex(u);if(c>=0)return this.ranges[c]},a.prototype.clipRows=function(u,c){var d=this.ranges;if(d[0].start.row>c||d[d.length-1].start.row=h)break}if(u.action=="insert")for(var y=f-h,b=-c.column+d.column;gh)break;if(v.start.row==h&&v.start.column>=c.column&&(v.start.column==c.column&&this.$bias<=0||(v.start.column+=b,v.start.row+=y)),v.end.row==h&&v.end.column>=c.column){if(v.end.column==c.column&&this.$bias<0)continue;v.end.column==c.column&&b>0&&gv.start.column&&v.end.column==p[g+1].start.column&&(v.end.column-=b),v.end.column+=b,v.end.row+=y}}else for(var y=h-f,b=c.column-d.column;gf)break;v.end.rowc.column)&&(v.end.column=c.column,v.end.row=c.row):(v.end.column+=b,v.end.row+=y):v.end.row>f&&(v.end.row+=y),v.start.rowc.column)&&(v.start.column=c.column,v.start.row=c.row):(v.start.column+=b,v.start.row+=y):v.start.row>f&&(v.start.row+=y)}if(y!=0&&g=d)return g;if(g.end.row>d)return null}return null},this.getNextFoldLine=function(d,h){var f=this.$foldData,p=0;for(h&&(p=f.indexOf(h)),p==-1&&(p=0),p;p=d)return g}return null},this.getFoldedRowCount=function(d,h){for(var f=this.$foldData,p=h-d+1,g=0;g=h){y=d?p-=h-y:p=0);break}else v>=d&&(y>=d?p-=v-y:p-=v-d+1)}return p},this.$addFoldLine=function(d){return this.$foldData.push(d),this.$foldData.sort(function(h,f){return h.start.row-f.start.row}),d},this.addFold=function(d,h){var f=this.$foldData,p=!1,g;d instanceof l?g=d:(g=new l(h,d),g.collapseChildren=h.collapseChildren),this.$clipRangeToDocument(g.range);var m=g.start.row,v=g.start.column,y=g.end.row,b=g.end.column,w=this.getFoldAt(m,v,1),k=this.getFoldAt(y,b,-1);if(w&&k==w)return w.addSubFold(g);w&&!w.range.isStart(m,v)&&this.removeFold(w),k&&!k.range.isEnd(y,b)&&this.removeFold(k);var x=this.getFoldsInRange(g.range);x.length>0&&(this.removeFolds(x),g.collapseChildren||x.forEach(function(O){g.addSubFold(O)}));for(var S=0;S0&&this.foldAll(d.start.row+1,d.end.row,d.collapseChildren-1),d.subFolds=[]},this.expandFolds=function(d){d.forEach(function(h){this.expandFold(h)},this)},this.unfold=function(d,h){var f,p;if(d==null)f=new i(0,0,this.getLength(),0),h==null&&(h=!0);else if(typeof d=="number")f=new i(d,0,d,this.getLine(d).length);else if("row"in d)f=i.fromPoints(d,d);else{if(Array.isArray(d))return p=[],d.forEach(function(m){p=p.concat(this.unfold(m))},this),p;f=d}p=this.getFoldsInRangeList(f);for(var g=p;p.length==1&&i.comparePoints(p[0].start,f.start)<0&&i.comparePoints(p[0].end,f.end)>0;)this.expandFolds(p),p=this.getFoldsInRangeList(f);if(h!=!1?this.removeFolds(p):this.expandFolds(p),g.length)return g},this.isRowFolded=function(d,h){return!!this.getFoldLine(d,h)},this.getRowFoldEnd=function(d,h){var f=this.getFoldLine(d,h);return f?f.end.row:d},this.getRowFoldStart=function(d,h){var f=this.getFoldLine(d,h);return f?f.start.row:d},this.getFoldDisplayLine=function(d,h,f,p,g){p==null&&(p=d.start.row),g==null&&(g=0),h==null&&(h=d.end.row),f==null&&(f=this.getLine(h).length);var m=this.doc,v="";return d.walk(function(y,b,w,k){if(!(bb)break;while(g&&v.test(g.type)&&!/^comment.start/.test(g.type));g=p.stepBackward()}else g=p.getCurrentToken();return y.end.row=p.getCurrentTokenRow(),y.end.column=p.getCurrentTokenColumn(),/^comment.end/.test(g.type)||(y.end.column+=g.value.length-2),y}},this.foldAll=function(d,h,f,p){f==null&&(f=1e5);var g=this.foldWidgets;if(g){h=h||this.getLength(),d=d||0;for(var m=d;m=d&&(m=v.end.row,v.collapseChildren=f,this.addFold("...",v))}}},this.foldToLevel=function(d){for(this.foldAll();d-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var d=this;this.foldAll(null,null,null,function(h){for(var f=d.getTokens(h),p=0;p=0;){var m=f[p];if(m==null&&(m=f[p]=this.getFoldWidget(p)),m=="start"){var v=this.getFoldWidgetRange(p);if(g||(g=v),v&&v.end.row>=d)break}p--}return{range:p!==-1&&v,firstRange:g}},this.onFoldWidgetClick=function(d,h){h instanceof u&&(h=h.domEvent);var f={children:h.shiftKey,all:h.ctrlKey||h.metaKey,siblings:h.altKey},p=this.$toggleFoldWidget(d,f);if(!p){var g=h.target||h.srcElement;g&&/ace_fold-widget/.test(g.className)&&(g.className+=" ace_invalid")}},this.$toggleFoldWidget=function(d,h){if(this.getFoldWidget){var f=this.getFoldWidget(d),p=this.getLine(d),g=f==="end"?-1:1,m=this.getFoldAt(d,g===-1?0:p.length,g);if(m)return h.children||h.all?this.removeFold(m):this.expandFold(m),m;var v=this.getFoldWidgetRange(d,!0);if(v&&!v.isMultiLine()&&(m=this.getFoldAt(v.start.row,v.start.column,1),m&&v.isEqual(m.range)))return this.removeFold(m),m;if(h.siblings){var y=this.getParentFoldRangeData(d);if(y.range)var b=y.range.start.row+1,w=y.range.end.row;this.foldAll(b,w,h.all?1e4:0)}else h.children?(w=v?v.end.row:this.getLength(),this.foldAll(d+1,w,h.all?1e4:0)):v&&(h.all&&(v.collapseChildren=1e4),this.addFold("...",v));return v}},this.toggleFoldWidget=function(d){var h=this.selection.getCursor().row;h=this.getRowFoldStart(h);var f=this.$toggleFoldWidget(h,{});if(!f){var p=this.getParentFoldRangeData(h,!0);if(f=p.range||p.firstRange,f){h=f.start.row;var g=this.getFoldAt(h,this.getLine(h).length,1);g?this.removeFold(g):this.addFold("...",f)}}},this.updateFoldWidgets=function(d){var h=d.start.row,f=d.end.row-h;if(f===0)this.foldWidgets[h]=null;else if(d.action=="remove")this.foldWidgets.splice(h,f+1,null);else{var p=Array(f+1);p.unshift(h,1),this.foldWidgets.splice.apply(this.foldWidgets,p)}},this.tokenizerUpdateFoldWidgets=function(d){var h=d.data;h.first!=h.last&&this.foldWidgets.length>h.first&&this.foldWidgets.splice(h.first,this.foldWidgets.length)}}r.Folding=c}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(n,r,o){var i=n("../token_iterator").TokenIterator,s=n("../range").Range;function l(){this.findMatchingBracket=function(a,u){if(a.column==0)return null;var c=u||this.getLine(a.row).charAt(a.column-1);if(c=="")return null;var d=c.match(/([\(\[\{])|([\)\]\}])/);return d?d[1]?this.$findClosingBracket(d[1],a):this.$findOpeningBracket(d[2],a):null},this.getBracketRange=function(a){var u=this.getLine(a.row),c=!0,d,h=u.charAt(a.column-1),f=h&&h.match(/([\(\[\{])|([\)\]\}])/);if(f||(h=u.charAt(a.column),a={row:a.row,column:a.column+1},f=h&&h.match(/([\(\[\{])|([\)\]\}])/),c=!1),!f)return null;if(f[1]){var p=this.$findClosingBracket(f[1],a);if(!p)return null;d=s.fromPoints(a,p),c||(d.end.column++,d.start.column--),d.cursor=d.end}else{var p=this.$findOpeningBracket(f[2],a);if(!p)return null;d=s.fromPoints(p,a),c||(d.start.column++,d.end.column--),d.cursor=d.start}return d},this.getMatchingBracketRanges=function(a,u){var c=this.getLine(a.row),d=/([\(\[\{])|([\)\]\}])/,h=!u&&c.charAt(a.column-1),f=h&&h.match(d);if(f||(h=(u===void 0||u)&&c.charAt(a.column),a={row:a.row,column:a.column+1},f=h&&h.match(d)),!f)return null;var p=new s(a.row,a.column-1,a.row,a.column),g=f[1]?this.$findClosingBracket(f[1],a):this.$findOpeningBracket(f[2],a);if(!g)return[p];var m=new s(g.row,g.column,g.row,g.column+1);return[p,m]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(a,u,c){var d=this.$brackets[a],h=1,f=new i(this,u.row,u.column),p=f.getCurrentToken();if(p||(p=f.stepForward()),!!p){c||(c=new RegExp("(\\.?"+p.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var g=u.column-f.getCurrentTokenColumn()-2,m=p.value;;){for(;g>=0;){var v=m.charAt(g);if(v==d){if(h-=1,h==0)return{row:f.getCurrentTokenRow(),column:g+f.getCurrentTokenColumn()}}else v==a&&(h+=1);g-=1}do p=f.stepBackward();while(p&&!c.test(p.type));if(p==null)break;m=p.value,g=m.length-1}return null}},this.$findClosingBracket=function(a,u,c){var d=this.$brackets[a],h=1,f=new i(this,u.row,u.column),p=f.getCurrentToken();if(p||(p=f.stepForward()),!!p){c||(c=new RegExp("(\\.?"+p.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var g=u.column-f.getCurrentTokenColumn();;){for(var m=p.value,v=m.length;g"?d=!0:u.type.indexOf("tag-name")!==-1&&(c=!0));while(u&&!c);return u},this.$findClosingTag=function(a,u){var c,d=u.value,h=u.value,f=0,p=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);u=a.stepForward();var g=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+u.value.length),m=!1;do if(c=u,u=a.stepForward(),u){if(u.value===">"&&!m){var v=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);m=!0}if(u.type.indexOf("tag-name")!==-1){if(d=u.value,h===d){if(c.value==="<")f++;else if(c.value==="")var w=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);else return}}}else if(h===d&&u.value==="/>"&&(f--,f<0))var y=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2),b=y,w=b,v=new s(g.end.row,g.end.column,g.end.row,g.end.column+1)}while(u&&f>=0);if(p&&v&&y&&w&&g&&b)return{openTag:new s(p.start.row,p.start.column,v.end.row,v.end.column),closeTag:new s(y.start.row,y.start.column,w.end.row,w.end.column),openTagName:g,closeTagName:b}},this.$findOpeningTag=function(a,u){var c=a.getCurrentToken(),d=u.value,h=0,f=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn(),g=p+2,m=new s(f,p,f,g);a.stepForward();var v=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+u.value.length);if(u=a.stepForward(),!(!u||u.value!==">")){var y=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);a.stepBackward(),a.stepBackward();do if(u=c,f=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn(),g=p+u.value.length,c=a.stepBackward(),u){if(u.type.indexOf("tag-name")!==-1){if(d===u.value)if(c.value==="<"){if(h++,h>0){var b=new s(f,p,f,g),w=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);do u=a.stepForward();while(u&&u.value!==">");var k=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1)}}else c.value===""){for(var x=0,S=c;S;){if(S.type.indexOf("tag-name")!==-1&&S.value===d){h--;break}else if(S.value==="<")break;S=a.stepBackward(),x++}for(var T=0;TE&&(this.$docRowCache.splice(E,A),this.$screenRowCache.splice(E,A))},_.prototype.$getRowCacheIndex=function(R,A){for(var E=0,M=R.length-1;E<=M;){var I=E+M>>1,N=R[I];if(A>N)E=I+1;else if(A=A));N++);return M=E[N],M?(M.index=N,M.start=I-M.value.length,M):null},_.prototype.setUndoManager=function(R){if(this.$undoManager=R,this.$informUndoManager&&this.$informUndoManager.cancel(),R){var A=this;R.addSession(this),this.$syncInformUndoManager=function(){A.$informUndoManager.cancel(),A.mergeUndoDeltas=!1},this.$informUndoManager=s.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},_.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},_.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},_.prototype.getTabString=function(){return this.getUseSoftTabs()?s.stringRepeat(" ",this.getTabSize()):" "},_.prototype.setUseSoftTabs=function(R){this.setOption("useSoftTabs",R)},_.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},_.prototype.setTabSize=function(R){this.setOption("tabSize",R)},_.prototype.getTabSize=function(){return this.$tabSize},_.prototype.isTabStop=function(R){return this.$useSoftTabs&&R.column%this.$tabSize===0},_.prototype.setNavigateWithinSoftTabs=function(R){this.setOption("navigateWithinSoftTabs",R)},_.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},_.prototype.setOverwrite=function(R){this.setOption("overwrite",R)},_.prototype.getOverwrite=function(){return this.$overwrite},_.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},_.prototype.addGutterDecoration=function(R,A){this.$decorations[R]||(this.$decorations[R]=""),this.$decorations[R]+=" "+A,this._signal("changeBreakpoint",{})},_.prototype.removeGutterDecoration=function(R,A){this.$decorations[R]=(this.$decorations[R]||"").replace(" "+A,""),this._signal("changeBreakpoint",{})},_.prototype.getBreakpoints=function(){return this.$breakpoints},_.prototype.setBreakpoints=function(R){this.$breakpoints=[];for(var A=0;A0&&(M=!!E.charAt(A-1).match(this.tokenRe)),M||(M=!!E.charAt(A).match(this.tokenRe)),M)var I=this.tokenRe;else if(/^\s+$/.test(E.slice(A-1,A+1)))var I=/\s/;else var I=this.nonTokenRe;var N=A;if(N>0){do N--;while(N>=0&&E.charAt(N).match(I));N++}for(var L=A;LR&&(R=A.screenWidth)}),this.lineWidgetWidth=R},_.prototype.$computeWidth=function(R){if(this.$modified||R){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var A=this.doc.getAllLines(),E=this.$rowLengthCache,M=0,I=0,N=this.$foldData[I],L=N?N.start.row:1/0,$=A.length,D=0;D<$;D++){if(D>L){if(D=N.end.row+1,D>=$)break;N=this.$foldData[I++],L=N?N.start.row:1/0}E[D]==null&&(E[D]=this.$getStringScreenWidth(A[D])[0]),E[D]>M&&(M=E[D])}this.screenWidth=M}},_.prototype.getLine=function(R){return this.doc.getLine(R)},_.prototype.getLines=function(R,A){return this.doc.getLines(R,A)},_.prototype.getLength=function(){return this.doc.getLength()},_.prototype.getTextRange=function(R){return this.doc.getTextRange(R||this.selection.getRange())},_.prototype.insert=function(R,A){return this.doc.insert(R,A)},_.prototype.remove=function(R){return this.doc.remove(R)},_.prototype.removeFullLines=function(R,A){return this.doc.removeFullLines(R,A)},_.prototype.undoChanges=function(R,A){if(R.length){this.$fromUndo=!0;for(var E=R.length-1;E!=-1;E--){var M=R[E];M.action=="insert"||M.action=="remove"?this.doc.revertDelta(M):M.folds&&this.addFolds(M.folds)}!A&&this.$undoSelect&&(R.selectionBefore?this.selection.fromJSON(R.selectionBefore):this.selection.setRange(this.$getUndoSelection(R,!0))),this.$fromUndo=!1}},_.prototype.redoChanges=function(R,A){if(R.length){this.$fromUndo=!0;for(var E=0;ER.end.column&&(N.start.column+=$),N.end.row==R.end.row&&N.end.column>R.end.column&&(N.end.column+=$)),L&&N.start.row>=R.end.row&&(N.start.row+=L,N.end.row+=L)}if(N.end=this.insert(N.start,M),I.length){var D=R.start,F=N.start,L=F.row-D.row,$=F.column-D.column;this.addFolds(I.map(function(B){return B=B.clone(),B.start.row==D.row&&(B.start.column+=$),B.end.row==D.row&&(B.end.column+=$),B.start.row+=L,B.end.row+=L,B}))}return N},_.prototype.indentRows=function(R,A,E){E=E.replace(/\t/g,this.getTabString());for(var M=R;M<=A;M++)this.doc.insertInLine({row:M,column:0},E)},_.prototype.outdentRows=function(R){for(var A=R.collapseRows(),E=new h(0,0,0,0),M=this.getTabSize(),I=A.start.row;I<=A.end.row;++I){var N=this.getLine(I);E.start.row=I,E.end.row=I;for(var L=0;L0){var M=this.getRowFoldEnd(A+E);if(M>this.doc.getLength()-1)return 0;var I=M-A}else{R=this.$clipRowToDocument(R),A=this.$clipRowToDocument(A);var I=A-R+1}var N=new h(R,0,A,Number.MAX_VALUE),L=this.getFoldsInRange(N).map(function(D){return D=D.clone(),D.start.row+=I,D.end.row+=I,D}),$=E==0?this.doc.getLines(R,A):this.doc.removeFullLines(R,A);return this.doc.insertFullLines(R+I,$),L.length&&this.addFolds(L),I},_.prototype.moveLinesUp=function(R,A){return this.$moveLines(R,A,-1)},_.prototype.moveLinesDown=function(R,A){return this.$moveLines(R,A,1)},_.prototype.duplicateLines=function(R,A){return this.$moveLines(R,A,0)},_.prototype.$clipRowToDocument=function(R){return Math.max(0,Math.min(R,this.doc.getLength()-1))},_.prototype.$clipColumnToRow=function(R,A){return A<0?0:Math.min(this.doc.getLine(R).length,A)},_.prototype.$clipPositionToDocument=function(R,A){if(A=Math.max(0,A),R<0)R=0,A=0;else{var E=this.doc.getLength();R>=E?(R=E-1,A=this.doc.getLine(E-1).length):A=Math.min(this.doc.getLine(R).length,A)}return{row:R,column:A}},_.prototype.$clipRangeToDocument=function(R){R.start.row<0?(R.start.row=0,R.start.column=0):R.start.column=this.$clipColumnToRow(R.start.row,R.start.column);var A=this.doc.getLength()-1;return R.end.row>A?(R.end.row=A,R.end.column=this.doc.getLine(A).length):R.end.column=this.$clipColumnToRow(R.end.row,R.end.column),R},_.prototype.setUseWrapMode=function(R){if(R!=this.$useWrapMode){if(this.$useWrapMode=R,this.$modified=!0,this.$resetRowCache(0),R){var A=this.getLength();this.$wrapData=Array(A),this.$updateWrapData(0,A-1)}this._signal("changeWrapMode")}},_.prototype.getUseWrapMode=function(){return this.$useWrapMode},_.prototype.setWrapLimitRange=function(R,A){(this.$wrapLimitRange.min!==R||this.$wrapLimitRange.max!==A)&&(this.$wrapLimitRange={min:R,max:A},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},_.prototype.adjustWrapLimit=function(R,A){var E=this.$wrapLimitRange;E.max<0&&(E={min:A,max:A});var M=this.$constrainWrapLimit(R,E.min,E.max);return M!=this.$wrapLimit&&M>1?(this.$wrapLimit=M,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},_.prototype.$constrainWrapLimit=function(R,A,E){return A&&(R=Math.max(A,R)),E&&(R=Math.min(E,R)),R},_.prototype.getWrapLimit=function(){return this.$wrapLimit},_.prototype.setWrapLimit=function(R){this.setWrapLimitRange(R,R)},_.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},_.prototype.$updateInternalDataOnChange=function(R){var A=this.$useWrapMode,E=R.action,M=R.start,I=R.end,N=M.row,L=I.row,$=L-N,D=null;if(this.$updating=!0,$!=0)if(E==="remove"){this[A?"$wrapData":"$rowLengthCache"].splice(N,$);var F=this.$foldData;D=this.getFoldsInRange(R),this.removeFolds(D);var U=this.getFoldLine(I.row),W=0;if(U){U.addRemoveChars(I.row,I.column,M.column-I.column),U.shiftRow(-$);var B=this.getFoldLine(N);B&&B!==U&&(B.merge(U),U=B),W=F.indexOf(U)+1}for(W;W=I.row&&U.shiftRow(-$)}L=N}else{var H=Array($);H.unshift(N,0);var V=A?this.$wrapData:this.$rowLengthCache;V.splice.apply(V,H);var F=this.$foldData,U=this.getFoldLine(N),W=0;if(U){var Y=U.range.compareInside(M.row,M.column);Y==0?(U=U.split(M.row,M.column),U&&(U.shiftRow($),U.addRemoveChars(L,0,I.column-M.column))):Y==-1&&(U.addRemoveChars(N,0,I.column-M.column),U.shiftRow($)),W=F.indexOf(U)+1}for(W;W=N&&U.shiftRow($)}}else{$=Math.abs(R.start.column-R.end.column),E==="remove"&&(D=this.getFoldsInRange(R),this.removeFolds(D),$=-$);var U=this.getFoldLine(N);U&&U.addRemoveChars(N,M.column,$)}return A&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,A?this.$updateWrapData(N,L):this.$updateRowLengthCache(N,L),D},_.prototype.$updateRowLengthCache=function(R,A,E){this.$rowLengthCache[R]=null,this.$rowLengthCache[A]=null},_.prototype.$updateWrapData=function(R,A){var E=this.doc.getAllLines(),M=this.getTabSize(),I=this.$wrapData,N=this.$wrapLimit,L,$,D=R;for(A=Math.min(A,E.length-1);D<=A;)$=this.getFoldLine(D,$),$?(L=[],$.walk((function(F,U,W,B){var H;if(F!=null){H=this.$getDisplayTokens(F,L.length),H[0]=w;for(var V=1;VA-B;){var H=N+A-B;if(R[H-1]>=S&&R[H]>=S){W(H);continue}if(R[H]==w||R[H]==k){for(H;H!=N-1&&R[H]!=w;H--);if(H>N){W(H);continue}for(H=N+A,H;H>2)),N-1);H>V&&R[H]V&&R[H]V&&R[H]==x;)H--}else for(;H>V&&R[H]V){W(++H);continue}H=N+A,R[H]==b&&H--,W(H-B)}return M},_.prototype.$getDisplayTokens=function(R,A){var E=[],M;A=A||0;for(var I=0;I39&&N<48||N>57&&N<64?E.push(x):N>=4352&&O(N)?E.push(y,b):E.push(y)}return E},_.prototype.$getStringScreenWidth=function(R,A,E){if(A==0)return[0,0];A==null&&(A=1/0),E=E||0;var M,I;for(I=0;I=4352&&O(M)?E+=2:E+=1,!(E>A));I++);return[E,I]},_.prototype.getRowLength=function(R){var A=1;return this.lineWidgets&&(A+=this.lineWidgets[R]&&this.lineWidgets[R].rowCount||0),!this.$useWrapMode||!this.$wrapData[R]?A:this.$wrapData[R].length+A},_.prototype.getRowLineCount=function(R){return!this.$useWrapMode||!this.$wrapData[R]?1:this.$wrapData[R].length+1},_.prototype.getRowWrapIndent=function(R){if(this.$useWrapMode){var A=this.screenToDocumentPosition(R,Number.MAX_VALUE),E=this.$wrapData[A.row];return E.length&&E[0]=0)var $=F[U],I=this.$docRowCache[U],B=R>F[W-1];else var B=!W;for(var H=this.getLength()-1,V=this.getNextFoldLine(I),Y=V?V.start.row:1/0;$<=R&&(D=this.getRowLength(I),!($+D>R||I>=H));)$+=D,I++,I>Y&&(I=V.end.row+1,V=this.getNextFoldLine(I,V),Y=V?V.start.row:1/0),B&&(this.$docRowCache.push(I),this.$screenRowCache.push($));if(V&&V.start.row<=I)M=this.getFoldDisplayLine(V),I=V.start.row;else{if($+D<=R||I>H)return{row:H,column:this.getLine(H).length};M=this.getLine(I),V=null}var X=0,Z=Math.floor(R-$);if(this.$useWrapMode){var te=this.$wrapData[I];te&&(L=te[Z],Z>0&&te.length&&(X=te.indent,N=te[Z-1]||te[te.length-1],M=M.substring(N)))}return E!==void 0&&this.$bidiHandler.isBidiRow($+Z,I,Z)&&(A=this.$bidiHandler.offsetToCol(E)),N+=this.$getStringScreenWidth(M,A-X)[1],this.$useWrapMode&&N>=L&&(N=L-1),V?V.idxToPosition(N):{row:I,column:N}},_.prototype.documentToScreenPosition=function(R,A){if(typeof A>"u")var E=this.$clipPositionToDocument(R.row,R.column);else E=this.$clipPositionToDocument(R,A);R=E.row,A=E.column;var M=0,I=null,N=null;N=this.getFoldAt(R,A,1),N&&(R=N.start.row,A=N.start.column);var L,$=0,D=this.$docRowCache,F=this.$getRowCacheIndex(D,R),U=D.length;if(U&&F>=0)var $=D[F],M=this.$screenRowCache[F],W=R>D[U-1];else var W=!U;for(var B=this.getNextFoldLine($),H=B?B.start.row:1/0;$=H){if(L=B.end.row+1,L>R)break;B=this.getNextFoldLine(L,B),H=B?B.start.row:1/0}else L=$+1;M+=this.getRowLength($),$=L,W&&(this.$docRowCache.push($),this.$screenRowCache.push(M))}var V="";B&&$>=H?(V=this.getFoldDisplayLine(B,R,A),I=B.start.row):(V=this.getLine(R).substring(0,A),I=R);var Y=0;if(this.$useWrapMode){var X=this.$wrapData[I];if(X){for(var Z=0;V.length>=X[Z];)M++,Z++;V=V.substring(X[Z-1]||0,V.length),Y=Z>0?X.indent:0}}return this.lineWidgets&&this.lineWidgets[$]&&this.lineWidgets[$].rowsAbove&&(M+=this.lineWidgets[$].rowsAbove),{row:M,column:Y+this.$getStringScreenWidth(V)[0]}},_.prototype.documentToScreenColumn=function(R,A){return this.documentToScreenPosition(R,A).column},_.prototype.documentToScreenRow=function(R,A){return this.documentToScreenPosition(R,A).row},_.prototype.getScreenLength=function(){var R=0,A=null;if(this.$useWrapMode)for(var I=this.$wrapData.length,N=0,M=0,A=this.$foldData[M++],L=A?A.start.row:1/0;NL&&(N=A.end.row+1,A=this.$foldData[M++],L=A?A.start.row:1/0)}else{R=this.getLength();for(var E=this.$foldData,M=0;ME));N++);return[M,N]})},_.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},_}();v.$uid=0,v.prototype.$modes=a.$modes,v.prototype.getValue=v.prototype.toString,v.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},v.prototype.$overwrite=!1,v.prototype.$mode=null,v.prototype.$modeId=null,v.prototype.$scrollTop=0,v.prototype.$scrollLeft=0,v.prototype.$wrapLimit=80,v.prototype.$useWrapMode=!1,v.prototype.$wrapLimitRange={min:null,max:null},v.prototype.lineWidgets=null,v.prototype.isFullWidth=O,i.implement(v.prototype,u);var y=1,b=2,w=3,k=4,x=9,S=10,T=11,C=12;function O(_){return _<4352?!1:_>=4352&&_<=4447||_>=4515&&_<=4519||_>=4602&&_<=4607||_>=9001&&_<=9002||_>=11904&&_<=11929||_>=11931&&_<=12019||_>=12032&&_<=12245||_>=12272&&_<=12283||_>=12288&&_<=12350||_>=12353&&_<=12438||_>=12441&&_<=12543||_>=12549&&_<=12589||_>=12593&&_<=12686||_>=12688&&_<=12730||_>=12736&&_<=12771||_>=12784&&_<=12830||_>=12832&&_<=12871||_>=12880&&_<=13054||_>=13056&&_<=19903||_>=19968&&_<=42124||_>=42128&&_<=42182||_>=43360&&_<=43388||_>=44032&&_<=55203||_>=55216&&_<=55238||_>=55243&&_<=55291||_>=63744&&_<=64255||_>=65040&&_<=65049||_>=65072&&_<=65106||_>=65108&&_<=65126||_>=65128&&_<=65131||_>=65281&&_<=65376||_>=65504&&_<=65510}n("./edit_session/folding").Folding.call(v.prototype),n("./edit_session/bracket_match").BracketMatch.call(v.prototype),a.defineOptions(v.prototype,"session",{wrap:{set:function(_){if(!_||_=="off"?_=!1:_=="free"?_=!0:_=="printMargin"?_=-1:typeof _=="string"&&(_=parseInt(_,10)||!1),this.$wrap!=_)if(this.$wrap=_,!_)this.setUseWrapMode(!1);else{var R=typeof _=="number"?_:null;this.setWrapLimitRange(R,R),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(_){_=_=="auto"?this.$mode.type!="text":_!="text",_!=this.$wrapAsCode&&(this.$wrapAsCode=_,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(_){this.$useWorker=_,this.$stopWorker(),_&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(_){_=parseInt(_),_>0&&this.$tabSize!==_&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=_,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(_){this.setFoldStyle(_)},handlesSet:!0},overwrite:{set:function(_){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(_){this.doc.setNewLineMode(_)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(_){this.setMode(_)},get:function(){return this.$modeId},handlesSet:!0}}),r.EditSession=v}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(n,r,o){var i=n("./lib/lang"),s=n("./lib/oop"),l=n("./range").Range,a=function(){function c(){this.$options={}}return c.prototype.set=function(d){return s.mixin(this.$options,d),this},c.prototype.getOptions=function(){return i.copyObject(this.$options)},c.prototype.setOptions=function(d){this.$options=d},c.prototype.find=function(d){var h=this.$options,f=this.$matchIterator(d,h);if(!f)return!1;var p=null;return f.forEach(function(g,m,v,y){return p=new l(g,m,v,y),m==y&&h.start&&h.start.start&&h.skipCurrent!=!1&&p.isEqual(h.start)?(p=null,!1):!0}),p},c.prototype.findAll=function(d){var h=this.$options;if(!h.needle)return[];this.$assembleRegExp(h);var f=h.range,p=f?d.getLines(f.start.row,f.end.row):d.doc.getAllLines(),g=[],m=h.re;if(h.$isMultiLine){var v=m.length,y=p.length-v,b;e:for(var w=m.offset||0;w<=y;w++){for(var k=0;kT||(g.push(b=new l(w,T,w+v-1,C)),v>2&&(w=w+v-2))}}else for(var O=0;OE&&g[k].end.row==M;)k--;for(g=g.slice(O,k+1),O=0,k=g.length;O=y;T--)if(x(T,Number.MAX_VALUE,S))return;if(h.wrap!=!1){for(T=b,y=v.row;T>=y;T--)if(x(T,Number.MAX_VALUE,S))return}}};else var w=function(T){var C=v.row;if(!x(C,v.column,T)){for(C=C+1;C<=b;C++)if(x(C,0,T))return;if(h.wrap!=!1){for(C=y,b=v.row;C<=b;C++)if(x(C,0,T))return}}};if(h.$isMultiLine)var k=f.length,x=function(S,T,C){var O=p?S-k+1:S;if(!(O<0||O+k>d.getLength())){var _=d.getLine(O),R=_.search(f[0]);if(!(!p&&RT)&&C(O,R,O+k-1,E))return!0}}};else if(p)var x=function(T,C,O){var _=d.getLine(T),R=[],A,E=0;for(f.lastIndex=0;A=f.exec(_);){var M=A[0].length;if(E=A.index,!M){if(E>=_.length)break;f.lastIndex=E+=1}if(A.index+M>C)break;R.push(A.index,M)}for(var I=R.length-1;I>=0;I-=2){var N=R[I-1],M=R[I];if(O(T,N,T,N+M))return!0}};else var x=function(T,C,O){var _=d.getLine(T),R,A;for(f.lastIndex=C;A=f.exec(_);){var E=A[0].length;if(R=A.index,O(T,R,T,R+E))return!0;if(!E&&(f.lastIndex=R+=1,R>=_.length))return!1}};return{forEach:w}},c}();function u(c,d){var h=i.supportsLookbehind();function f(v,y){y===void 0&&(y=!0);var b=h&&d.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return b.test(v)||d.regExp?h&&d.$supportsUnicodeFlag?y?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var p=Array.from(c),g=p[0],m=p[p.length-1];return f(g)+c+f(m,!1)}r.Search=a}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,r,o){var i=this&&this.__extends||function(){var h=function(f,p){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,m){g.__proto__=m}||function(g,m){for(var v in m)Object.prototype.hasOwnProperty.call(m,v)&&(g[v]=m[v])},h(f,p)};return function(f,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");h(f,p);function g(){this.constructor=f}f.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}}(),s=n("../lib/keys"),l=n("../lib/useragent"),a=s.KEY_MODS,u=function(){function h(f,p){this.$init(f,p,!1)}return h.prototype.$init=function(f,p,g){this.platform=p||(l.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(f),this.$singleCommand=g},h.prototype.addCommand=function(f){this.commands[f.name]&&this.removeCommand(f),this.commands[f.name]=f,f.bindKey&&this._buildKeyHash(f)},h.prototype.removeCommand=function(f,p){var g=f&&(typeof f=="string"?f:f.name);f=this.commands[g],p||delete this.commands[g];var m=this.commandKeyBinding;for(var v in m){var y=m[v];if(y==f)delete m[v];else if(Array.isArray(y)){var b=y.indexOf(f);b!=-1&&(y.splice(b,1),y.length==1&&(m[v]=y[0]))}}},h.prototype.bindKey=function(f,p,g){if(typeof f=="object"&&f&&(g==null&&(g=f.position),f=f[this.platform]),!!f){if(typeof p=="function")return this.addCommand({exec:p,bindKey:f,name:p.name||f});f.split("|").forEach(function(m){var v="";if(m.indexOf(" ")!=-1){var y=m.split(/\s+/);m=y.pop(),y.forEach(function(k){var x=this.parseKeys(k),S=a[x.hashId]+x.key;v+=(v?" ":"")+S,this._addCommandToBinding(v,"chainKeys")},this),v+=" "}var b=this.parseKeys(m),w=a[b.hashId]+b.key;this._addCommandToBinding(v+w,p,g)},this)}},h.prototype._addCommandToBinding=function(f,p,g){var m=this.commandKeyBinding,v;if(!p)delete m[f];else if(!m[f]||this.$singleCommand)m[f]=p;else{Array.isArray(m[f])?(v=m[f].indexOf(p))!=-1&&m[f].splice(v,1):m[f]=[m[f]],typeof g!="number"&&(g=c(p));var y=m[f];for(v=0;vg)break}y.splice(v,0,p)}},h.prototype.addCommands=function(f){f&&Object.keys(f).forEach(function(p){var g=f[p];if(g){if(typeof g=="string")return this.bindKey(g,p);typeof g=="function"&&(g={exec:g}),typeof g=="object"&&(g.name||(g.name=p),this.addCommand(g))}},this)},h.prototype.removeCommands=function(f){Object.keys(f).forEach(function(p){this.removeCommand(f[p])},this)},h.prototype.bindKeys=function(f){Object.keys(f).forEach(function(p){this.bindKey(p,f[p])},this)},h.prototype._buildKeyHash=function(f){this.bindKey(f.bindKey,f)},h.prototype.parseKeys=function(f){var p=f.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(w){return w}),g=p.pop(),m=s[g];if(s.FUNCTION_KEYS[m])g=s.FUNCTION_KEYS[m].toLowerCase();else if(p.length){if(p.length==1&&p[0]=="shift")return{key:g.toUpperCase(),hashId:-1}}else return{key:g,hashId:-1};for(var v=0,y=p.length;y--;){var b=s.KEY_MODS[p[y]];if(b==null)return typeof console<"u"&&console.error("invalid modifier "+p[y]+" in "+f),!1;v|=b}return{key:g,hashId:v}},h.prototype.findKeyCommand=function(f,p){var g=a[f]+p;return this.commandKeyBinding[g]},h.prototype.handleKeyboard=function(f,p,g,m){if(!(m<0)){var v=a[p]+g,y=this.commandKeyBinding[v];return f.$keyChain&&(f.$keyChain+=" "+v,y=this.commandKeyBinding[f.$keyChain]||y),y&&(y=="chainKeys"||y[y.length-1]=="chainKeys")?(f.$keyChain=f.$keyChain||v,{command:"null"}):(f.$keyChain&&((!p||p==4)&&g.length==1?f.$keyChain=f.$keyChain.slice(0,-v.length-1):(p==-1||m>0)&&(f.$keyChain="")),{command:y})}},h.prototype.getStatusText=function(f,p){return p.$keyChain||""},h}();function c(h){return typeof h=="object"&&h.bindKey&&h.bindKey.position||(h.isDefault?-100:0)}var d=function(h){i(f,h);function f(p,g){var m=h.call(this,p,g)||this;return m.$singleCommand=!0,m}return f}(u);d.call=function(h,f,p){u.prototype.$init.call(h,f,p,!0)},u.call=function(h,f,p){u.prototype.$init.call(h,f,p,!1)},r.HashHandler=d,r.MultiHashHandler=u}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(n,r,o){var i=this&&this.__extends||function(){var c=function(d,h){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,p){f.__proto__=p}||function(f,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(f[g]=p[g])},c(d,h)};return function(d,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");c(d,h);function f(){this.constructor=d}d.prototype=h===null?Object.create(h):(f.prototype=h.prototype,new f)}}(),s=n("../lib/oop"),l=n("../keyboard/hash_handler").MultiHashHandler,a=n("../lib/event_emitter").EventEmitter,u=function(c){i(d,c);function d(h,f){var p=c.call(this,f,h)||this;return p.byName=p.commands,p.setDefaultHandler("exec",function(g){return g.args?g.command.exec(g.editor,g.args,g.event,!1):g.command.exec(g.editor,{},g.event,!0)}),p}return d.prototype.exec=function(h,f,p){if(Array.isArray(h)){for(var g=h.length;g--;)if(this.exec(h[g],f,p))return!0;return!1}if(typeof h=="string"&&(h=this.commands[h]),!h||f&&f.$readOnly&&!h.readOnly||this.$checkCommandState!=!1&&h.isAvailable&&!h.isAvailable(f))return!1;var m={editor:f,command:h,args:p};return m.returnValue=this._emit("exec",m),this._signal("afterExec",m),m.returnValue!==!1},d.prototype.toggleRecording=function(h){if(!this.$inReplay)return h&&h._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(f){this.macro.push([f.command,f.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},d.prototype.replay=function(h){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(h);try{this.$inReplay=!0,this.macro.forEach(function(f){typeof f=="string"?this.exec(f,h):this.exec(f[0],h,f[1])},this)}finally{this.$inReplay=!1}}},d.prototype.trimMacro=function(h){return h.map(function(f){return typeof f[0]!="string"&&(f[0]=f[0].name),f[1]||(f=f[0]),f})},d}(l);s.implement(u.prototype,a),r.CommandManager=u}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(n,r,o){var i=n("../lib/lang"),s=n("../config"),l=n("../range").Range;function a(c,d){return{win:c,mac:d}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(c){s.loadModule("ace/ext/settings_menu",function(d){d.init(c),c.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(c){s.loadModule("ace/ext/error_marker",function(d){d.showErrorMarker(c,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(c){s.loadModule("ace/ext/error_marker",function(d){d.showErrorMarker(c,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(c){c.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(c){c.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(c,d){typeof d=="number"&&!isNaN(d)&&c.gotoLine(d),c.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(c){c.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(c){c.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(c){c.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(c){c.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(c){c.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(c){c.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(c){c.session.foldAll(),c.session.unfold(c.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(c){c.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(c){c.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(c){c.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(c){c.selection.isEmpty()?c.selection.selectWord():c.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(c){c.selection.isEmpty()?c.selection.selectWord():c.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(c){s.loadModule("ace/ext/searchbox",function(d){d.Search(c)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(c){c.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(c){c.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(c){c.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(c){c.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(c,d){c.navigateUp(d.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(c){c.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(c){c.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(c){c.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(c,d){c.navigateDown(d.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(c){c.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(c){c.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(c){c.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(c){c.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(c){c.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(c,d){c.navigateLeft(d.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(c){c.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(c){c.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(c){c.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(c){c.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(c){c.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(c,d){c.navigateRight(d.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(c){c.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(c){c.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(c){c.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(c){c.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(c){c.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(c){c.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(c){c.renderer.scrollBy(0,-2*c.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(c){c.renderer.scrollBy(0,2*c.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(c){c.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(c){c.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(c){c.commands.toggleRecording(c)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(c){c.commands.replay(c)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(c){c.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(c){c.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(c){c.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(c){},readOnly:!0},{name:"cut",description:"Cut",exec:function(c){var d=c.$copyWithEmptySelection&&c.selection.isEmpty(),h=d?c.selection.getLineRange():c.selection.getRange();c._emit("cut",h),h.isEmpty()||c.session.remove(h),c.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(c,d){c.$handlePaste(d)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(c){c.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(c){c.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(c){c.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(c){c.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(c){c.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(c){c.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(c){c.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(c){s.loadModule("ace/ext/searchbox",function(d){d.Search(c,!0)})}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(c){c.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(c){c.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(c){c.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(c){c.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(c){c.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(c){c.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(c){c.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(c){c.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(c){if(c.selection.isEmpty())c.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(c){c.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(c){c.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(c){var d=c.selection.getRange();d.start.column=0,c.session.remove(d)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(c){var d=c.selection.getRange();d.end.column=Number.MAX_VALUE,c.session.remove(d)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(c){c.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(c){c.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(c){c.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(c){c.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(c){c.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(c){c.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(c,d){c.insert(d)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(c,d){c.insert(i.stringRepeat(d.text||"",d.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(c){c.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(c){c.transposeLetters()},multiSelectAction:function(c){c.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(c){c.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(c){c.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(c){c.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(c){var d=c.selection.getRange();d.start.column=d.end.column=0,d.end.row++,c.selection.setRange(d,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(c){c.openLink()}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(c){for(var d=c.selection.isBackwards(),h=d?c.selection.getSelectionLead():c.selection.getSelectionAnchor(),f=d?c.selection.getSelectionAnchor():c.selection.getSelectionLead(),p=c.session.doc.getLine(h.row).length,g=c.session.doc.getTextRange(c.selection.getRange()),m=g.replace(/\n\s*/," ").length,v=c.session.doc.getLine(h.row),y=h.row+1;y<=f.row+1;y++){var b=i.stringTrimLeft(i.stringTrimRight(c.session.doc.getLine(y)));b.length!==0&&(b=" "+b),v+=b}f.row+10?(c.selection.moveCursorTo(h.row,h.column),c.selection.selectTo(h.row,h.column+m)):(p=c.session.doc.getLine(h.row).length>p?p+1:p,c.selection.moveCursorTo(h.row,p))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(c){var d=c.session.doc.getLength()-1,h=c.session.doc.getLine(d).length,f=c.selection.rangeList.ranges,p=[];f.length<1&&(f=[c.selection.getRange()]);for(var g=0;gu[c].column&&c++,f.unshift(c,0),u.splice.apply(u,f),this.$updateRows()}}},l.prototype.$updateRows=function(){var a=this.session.lineWidgets;if(a){var u=!0;a.forEach(function(c,d){if(c)for(u=!1,c.row=d;c.$oldWidget;)c.$oldWidget.row=d,c=c.$oldWidget}),u&&(this.session.lineWidgets=null)}},l.prototype.$registerLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var u=this.session.lineWidgets[a.row];return u&&(a.$oldWidget=u,u.el&&u.el.parentNode&&(u.el.parentNode.removeChild(u.el),u._inDocument=!1)),this.session.lineWidgets[a.row]=a,a},l.prototype.addLineWidget=function(a){if(this.$registerLineWidget(a),a.session=this.session,!this.editor)return a;var u=this.editor.renderer;a.html&&!a.el&&(a.el=i.createElement("div"),a.el.innerHTML=a.html),a.text&&!a.el&&(a.el=i.createElement("div"),a.el.textContent=a.text),a.el&&(i.addCssClass(a.el,"ace_lineWidgetContainer"),a.className&&i.addCssClass(a.el,a.className),a.el.style.position="absolute",a.el.style.zIndex=5,u.container.appendChild(a.el),a._inDocument=!0,a.coverGutter||(a.el.style.zIndex=3),a.pixelHeight==null&&(a.pixelHeight=a.el.offsetHeight)),a.rowCount==null&&(a.rowCount=a.pixelHeight/u.layerConfig.lineHeight);var c=this.session.getFoldAt(a.row,0);if(a.$fold=c,c){var d=this.session.lineWidgets;a.row==c.end.row&&!d[c.start.row]?d[c.start.row]=a:a.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,u),this.onWidgetChanged(a),a},l.prototype.removeLineWidget=function(a){if(a._inDocument=!1,a.session=null,a.el&&a.el.parentNode&&a.el.parentNode.removeChild(a.el),a.editor&&a.editor.destroy)try{a.editor.destroy()}catch{}if(this.session.lineWidgets){var u=this.session.lineWidgets[a.row];if(u==a)this.session.lineWidgets[a.row]=a.$oldWidget,a.$oldWidget&&this.onWidgetChanged(a.$oldWidget);else for(;u;){if(u.$oldWidget==a){u.$oldWidget=a.$oldWidget;break}u=u.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows()},l.prototype.getWidgetsAtRow=function(a){for(var u=this.session.lineWidgets,c=u&&u[a],d=[];c;)d.push(c),c=c.$oldWidget;return d},l.prototype.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull()},l.prototype.measureWidgets=function(a,u){var c=this.session._changedWidgets,d=u.layerConfig;if(!(!c||!c.length)){for(var h=1/0,f=0;f0&&!d[h];)h--;this.firstRow=c.firstRow,this.lastRow=c.lastRow,u.$cursorLayer.config=c;for(var p=h;p<=f;p++){var g=d[p];if(!(!g||!g.el)){if(g.hidden){g.el.style.top=-100-(g.pixelHeight||0)+"px";continue}g._inDocument||(g._inDocument=!0,u.container.appendChild(g.el));var m=u.$cursorLayer.getPixelPosition({row:p,column:0},!0).top;g.coverLine||(m+=c.lineHeight*this.session.getRowLineCount(g.row)),g.el.style.top=m-c.offset+"px";var v=g.coverGutter?0:u.gutterWidth;g.fixedWidth||(v-=u.scrollLeft),g.el.style.left=v+"px",g.fullWidth&&g.screenWidth&&(g.el.style.minWidth=c.width+2*c.padding+"px"),g.fixedWidth?g.el.style.right=u.scrollBar.getWidth()+"px":g.el.style.right=""}}}},l}();r.LineWidgets=s}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(n,r,o){var i=n("../lib/keys"),s=n("../mouse/default_gutter_handler").GutterTooltip,l=function(){function u(c){this.editor=c,this.gutterLayer=c.renderer.$gutterLayer,this.element=c.renderer.$gutter,this.lines=c.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new s(this.editor)}return u.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},u.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},u.prototype.$onGutterKeyDown=function(c){if(this.annotationTooltip.isOpen){c.preventDefault(),c.keyCode===i.escape&&this.annotationTooltip.hideTooltip();return}if(c.target===this.element){if(c.keyCode!=i.enter)return;c.preventDefault();var d=this.editor.getCursorPosition().row;this.editor.isRowVisible(d)||this.editor.scrollToLine(d,!0,!0),setTimeout((function(){var h=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),f=this.$findNearestFoldWidget(h),p=this.$findNearestAnnotation(h);if(!(f===null&&p===null)){if(f===null&&p!==null){this.activeRowIndex=p,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(f!==null&&p===null){this.activeRowIndex=f,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(p-h)0||c+d=0&&this.$isFoldWidgetVisible(c-d))return c-d;if(c+d<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(c+d))return c+d}return null},u.prototype.$findNearestAnnotation=function(c){if(this.$isAnnotationVisible(c))return c;for(var d=0;c-d>0||c+d=0&&this.$isAnnotationVisible(c-d))return c-d;if(c+d<=this.lines.getLength()-1&&this.$isAnnotationVisible(c+d))return c+d}return null},u.prototype.$focusFoldWidget=function(c){if(c!=null){var d=this.$getFoldWidget(c);d.classList.add(this.editor.renderer.keyboardFocusClassName),d.focus()}},u.prototype.$focusAnnotation=function(c){if(c!=null){var d=this.$getAnnotation(c);d.classList.add(this.editor.renderer.keyboardFocusClassName),d.focus()}},u.prototype.$blurFoldWidget=function(c){var d=this.$getFoldWidget(c);d.classList.remove(this.editor.renderer.keyboardFocusClassName),d.blur()},u.prototype.$blurAnnotation=function(c){var d=this.$getAnnotation(c);d.classList.remove(this.editor.renderer.keyboardFocusClassName),d.blur()},u.prototype.$moveFoldWidgetUp=function(){for(var c=this.activeRowIndex;c>0;)if(c--,this.$isFoldWidgetVisible(c)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=c,this.$focusFoldWidget(this.activeRowIndex);return}},u.prototype.$moveFoldWidgetDown=function(){for(var c=this.activeRowIndex;c0;)if(c--,this.$isAnnotationVisible(c)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=c,this.$focusAnnotation(this.activeRowIndex);return}},u.prototype.$moveAnnotationDown=function(){for(var c=this.activeRowIndex;c=A.length&&(A=void 0),{value:A&&A[I++],done:!A}}};throw new TypeError(E?"Object is not iterable.":"Symbol.iterator is not defined.")},s=n("./lib/oop"),l=n("./lib/dom"),a=n("./lib/lang"),u=n("./lib/useragent"),c=n("./keyboard/textinput").TextInput,d=n("./mouse/mouse_handler").MouseHandler,h=n("./mouse/fold_handler").FoldHandler,f=n("./keyboard/keybinding").KeyBinding,p=n("./edit_session").EditSession,g=n("./search").Search,m=n("./range").Range,v=n("./lib/event_emitter").EventEmitter,y=n("./commands/command_manager").CommandManager,b=n("./commands/default_commands").commands,w=n("./config"),k=n("./token_iterator").TokenIterator,x=n("./line_widgets").LineWidgets,S=n("./keyboard/gutter_handler").GutterKeyboardHandler,T=n("./config").nls,C=n("./clipboard"),O=n("./lib/keys"),_=function(){function A(E,M,I){this.$toDestroy=[];var N=E.getContainerElement();this.container=N,this.renderer=E,this.id="editor"+ ++A.$uid,this.commands=new y(u.isMac?"mac":"win",b),typeof document=="object"&&(this.textInput=new c(E.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new d(this),new h(this)),this.keyBinding=new f(this),this.$search=new g().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=a.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(L,$){$._$emitInputEvent.schedule(31)}),this.setSession(M||I&&I.session||new p("")),w.resetOptions(this),I&&this.setOptions(I),w._signal("editor",this)}return A.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=a.delayedCall(this.endOperation.bind(this,!0)),this.on("change",(function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}).bind(this),!0),this.on("changeSelection",(function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}).bind(this),!0)},A.prototype.startOperation=function(E){if(this.curOp){if(!E||this.curOp.command)return;this.prevOp=this.curOp}E||(this.previousCommand=null,E={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:E.command||{},args:E.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},A.prototype.endOperation=function(E){if(this.curOp&&this.session){if(E&&E.returnValue===!1||!this.session)return this.curOp=null;if(E==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var M=this.curOp.command,I=M&&M.scrollIntoView;if(I){switch(I){case"center-animate":I="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var N=this.selection.getRange(),L=this.renderer.layerConfig;(N.start.row>=L.lastRow||N.end.row<=L.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}I=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}var $=this.selection.toJSON();this.curOp.selectionAfter=$,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection($),this.prevOp=this.curOp,this.curOp=null}},A.prototype.$historyTracker=function(E){if(this.$mergeUndoDeltas){var M=this.prevOp,I=this.$mergeableCommands,N=M.command&&E.command.name==M.command.name;if(E.command.name=="insertstring"){var L=E.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),N=N&&this.mergeNextCommand&&(!/\s/.test(L)||/\s/.test(M.args)),this.mergeNextCommand=!0}else N=N&&I.indexOf(E.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(N=!1),N?this.session.mergeUndoDeltas=!0:I.indexOf(E.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},A.prototype.setKeyboardHandler=function(E,M){if(E&&typeof E=="string"&&E!="ace"){this.$keybindingId=E;var I=this;w.loadModule(["keybinding",E],function(N){I.$keybindingId==E&&I.keyBinding.setKeyboardHandler(N&&N.handler),M&&M()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(E),M&&M()},A.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},A.prototype.setSession=function(E){if(this.session!=E){this.curOp&&this.endOperation(),this.curOp={};var M=this.session;if(M){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var I=this.session.getSelection();I.off("changeCursor",this.$onCursorChange),I.off("changeSelection",this.$onSelectionChange)}this.session=E,E?(this.$onDocumentChange=this.onDocumentChange.bind(this),E.on("change",this.$onDocumentChange),this.renderer.setSession(E),this.$onChangeMode=this.onChangeMode.bind(this),E.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),E.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),E.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),E.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),E.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),E.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=E.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(E)),this._signal("changeSession",{session:E,oldSession:M}),this.curOp=null,M&&M._signal("changeEditor",{oldEditor:this}),E&&E._signal("changeEditor",{editor:this}),E&&!E.destroyed&&E.bgTokenizer.scheduleStart()}},A.prototype.getSession=function(){return this.session},A.prototype.setValue=function(E,M){return this.session.doc.setValue(E),M?M==1?this.navigateFileEnd():M==-1&&this.navigateFileStart():this.selectAll(),E},A.prototype.getValue=function(){return this.session.getValue()},A.prototype.getSelection=function(){return this.selection},A.prototype.resize=function(E){this.renderer.onResize(E)},A.prototype.setTheme=function(E,M){this.renderer.setTheme(E,M)},A.prototype.getTheme=function(){return this.renderer.getTheme()},A.prototype.setStyle=function(E){this.renderer.setStyle(E)},A.prototype.unsetStyle=function(E){this.renderer.unsetStyle(E)},A.prototype.getFontSize=function(){return this.getOption("fontSize")||l.computedStyle(this.container).fontSize},A.prototype.setFontSize=function(E){this.setOption("fontSize",E)},A.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var E=this;this.$highlightPending=!0,setTimeout(function(){E.$highlightPending=!1;var M=E.session;if(!(!M||M.destroyed)){M.$bracketHighlight&&(M.$bracketHighlight.markerIds.forEach(function(B){M.removeMarker(B)}),M.$bracketHighlight=null);var I=E.getCursorPosition(),N=E.getKeyboardHandler(),L=N&&N.$getDirectionForHighlight&&N.$getDirectionForHighlight(E),$=M.getMatchingBracketRanges(I,L);if(!$){var D=new k(M,I.row,I.column),F=D.getCurrentToken();if(F&&/\b(?:tag-open|tag-name)/.test(F.type)){var U=M.getMatchingTags(I);U&&($=[U.openTagName,U.closeTagName])}}if(!$&&M.$mode.getMatching&&($=M.$mode.getMatching(E.session)),!$){E.getHighlightIndentGuides()&&E.renderer.$textLayer.$highlightIndentGuide();return}var W="ace_bracket";Array.isArray($)?$.length==1&&(W="ace_error_bracket"):$=[$],$.length==2&&(m.comparePoints($[0].end,$[1].start)==0?$=[m.fromPoints($[0].start,$[1].end)]:m.comparePoints($[0].start,$[1].end)==0&&($=[m.fromPoints($[1].start,$[0].end)])),M.$bracketHighlight={ranges:$,markerIds:$.map(function(B){return M.addMarker(B,W,"text")})},E.getHighlightIndentGuides()&&E.renderer.$textLayer.$highlightIndentGuide()}},50)}},A.prototype.focus=function(){this.textInput.focus()},A.prototype.isFocused=function(){return this.textInput.isFocused()},A.prototype.blur=function(){this.textInput.blur()},A.prototype.onFocus=function(E){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",E))},A.prototype.onBlur=function(E){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",E))},A.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},A.prototype.onDocumentChange=function(E){var M=this.session.$useWrapMode,I=E.start.row==E.end.row?E.end.row:1/0;this.renderer.updateLines(E.start.row,I,M),this._signal("change",E),this.$cursorChange()},A.prototype.onTokenizerUpdate=function(E){var M=E.data;this.renderer.updateLines(M.first,M.last)},A.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},A.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},A.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},A.prototype.$updateHighlightActiveLine=function(){var E=this.getSession(),M;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(M=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(M=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(M=!1)),E.$highlightLineMarker&&!M)E.removeMarker(E.$highlightLineMarker.id),E.$highlightLineMarker=null;else if(!E.$highlightLineMarker&&M){var I=new m(M.row,M.column,M.row,1/0);I.id=E.addMarker(I,"ace_active-line","screenLine"),E.$highlightLineMarker=I}else M&&(E.$highlightLineMarker.start.row=M.row,E.$highlightLineMarker.end.row=M.row,E.$highlightLineMarker.start.column=M.column,E._signal("changeBackMarker"))},A.prototype.onSelectionChange=function(E){var M=this.session;if(M.$selectionMarker&&M.removeMarker(M.$selectionMarker),M.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var I=this.selection.getRange(),N=this.getSelectionStyle();M.$selectionMarker=M.addMarker(I,"ace_selection",N)}var L=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(L),this._signal("changeSelection")},A.prototype.$getSelectionHighLightRegexp=function(){var E=this.session,M=this.getSelectionRange();if(!(M.isEmpty()||M.isMultiLine())){var I=M.start.column,N=M.end.column,L=E.getLine(M.start.row),$=L.substring(I,N);if(!($.length>5e3||!/[\w\d]/.test($))){var D=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:$}),F=L.substring(I-1,N+1);if(D.test(F))return D}}},A.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},A.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},A.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},A.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},A.prototype.onChangeMode=function(E){this.renderer.updateText(),this._emit("changeMode",E)},A.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},A.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},A.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},A.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},A.prototype.getCopyText=function(){var E=this.getSelectedText(),M=this.session.doc.getNewLineCharacter(),I=!1;if(!E&&this.$copyWithEmptySelection){I=!0;for(var N=this.selection.getAllRanges(),L=0;LB.search(/\S|$/)){var F=B.substr(L.column).search(/\S|$/);I.doc.removeInLine(L.row,L.column,L.column+F)}}this.clearSelection();var U=L.column,W=I.getState(L.row),B=I.getLine(L.row),H=N.checkOutdent(W,B,E);if(I.insert(L,E),$&&$.selection&&($.selection.length==2?this.selection.setSelectionRange(new m(L.row,U+$.selection[0],L.row,U+$.selection[1])):this.selection.setSelectionRange(new m(L.row+$.selection[0],$.selection[1],L.row+$.selection[2],$.selection[3]))),this.$enableAutoIndent){if(I.getDocument().isNewLine(E)){var V=N.getNextLineIndent(W,B.slice(0,L.column),I.getTabString());I.insert({row:L.row+1,column:0},V)}H&&N.autoOutdent(W,I,L.row)}},A.prototype.autoIndent=function(){var E=this.session,M=E.getMode(),I,N;if(this.selection.isEmpty())I=0,N=E.doc.getLength()-1;else{var L=this.getSelectionRange();I=L.start.row,N=L.end.row}for(var $="",D="",F="",U,W,B,H=E.getTabString(),V=I;V<=N;V++)V>0&&($=E.getState(V-1),D=E.getLine(V-1),F=M.getNextLineIndent($,D,H)),U=E.getLine(V),W=M.$getIndent(U),F!==W&&(W.length>0&&(B=new m(V,0,V,W.length),E.remove(B)),F.length>0&&E.insert({row:V,column:0},F)),M.autoOutdent($,E,V)},A.prototype.onTextInput=function(E,M){if(!M)return this.keyBinding.onTextInput(E);this.startOperation({command:{name:"insertstring"}});var I=this.applyComposition.bind(this,E,M);this.selection.rangeCount?this.forEachSelection(I):I(),this.endOperation()},A.prototype.applyComposition=function(E,M){if(M.extendLeft||M.extendRight){var I=this.selection.getRange();I.start.column-=M.extendLeft,I.end.column+=M.extendRight,I.start.column<0&&(I.start.row--,I.start.column+=this.session.getLine(I.start.row).length+1),this.selection.setRange(I),!E&&!I.isEmpty()&&this.remove()}if((E||!this.selection.isEmpty())&&this.insert(E,!0),M.restoreStart||M.restoreEnd){var I=this.selection.getRange();I.start.column-=M.restoreStart,I.end.column-=M.restoreEnd,this.selection.setRange(I)}},A.prototype.onCommandKey=function(E,M,I){return this.keyBinding.onCommandKey(E,M,I)},A.prototype.setOverwrite=function(E){this.session.setOverwrite(E)},A.prototype.getOverwrite=function(){return this.session.getOverwrite()},A.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},A.prototype.setScrollSpeed=function(E){this.setOption("scrollSpeed",E)},A.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},A.prototype.setDragDelay=function(E){this.setOption("dragDelay",E)},A.prototype.getDragDelay=function(){return this.getOption("dragDelay")},A.prototype.setSelectionStyle=function(E){this.setOption("selectionStyle",E)},A.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},A.prototype.setHighlightActiveLine=function(E){this.setOption("highlightActiveLine",E)},A.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},A.prototype.setHighlightGutterLine=function(E){this.setOption("highlightGutterLine",E)},A.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},A.prototype.setHighlightSelectedWord=function(E){this.setOption("highlightSelectedWord",E)},A.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},A.prototype.setAnimatedScroll=function(E){this.renderer.setAnimatedScroll(E)},A.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},A.prototype.setShowInvisibles=function(E){this.renderer.setShowInvisibles(E)},A.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},A.prototype.setDisplayIndentGuides=function(E){this.renderer.setDisplayIndentGuides(E)},A.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},A.prototype.setHighlightIndentGuides=function(E){this.renderer.setHighlightIndentGuides(E)},A.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},A.prototype.setShowPrintMargin=function(E){this.renderer.setShowPrintMargin(E)},A.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},A.prototype.setPrintMarginColumn=function(E){this.renderer.setPrintMarginColumn(E)},A.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},A.prototype.setReadOnly=function(E){this.setOption("readOnly",E)},A.prototype.getReadOnly=function(){return this.getOption("readOnly")},A.prototype.setBehavioursEnabled=function(E){this.setOption("behavioursEnabled",E)},A.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},A.prototype.setWrapBehavioursEnabled=function(E){this.setOption("wrapBehavioursEnabled",E)},A.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},A.prototype.setShowFoldWidgets=function(E){this.setOption("showFoldWidgets",E)},A.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},A.prototype.setFadeFoldWidgets=function(E){this.setOption("fadeFoldWidgets",E)},A.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},A.prototype.remove=function(E){this.selection.isEmpty()&&(E=="left"?this.selection.selectLeft():this.selection.selectRight());var M=this.getSelectionRange();if(this.getBehavioursEnabled()){var I=this.session,N=I.getState(M.start.row),L=I.getMode().transformAction(N,"deletion",this,I,M);if(M.end.column===0){var $=I.getTextRange(M);if($[$.length-1]==` +`){var D=I.getLine(M.end.row);/^\s+$/.test(D)&&(M.end.column=D.length)}}L&&(M=L)}this.session.remove(M),this.clearSelection()},A.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},A.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},A.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},A.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var E=this.getSelectionRange();E.start.column==E.end.column&&E.start.row==E.end.row&&(E.end.column=0,E.end.row++),this.session.remove(E),this.clearSelection()},A.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var E=this.getCursorPosition();this.insert(` +`),this.moveCursorToPosition(E)},A.prototype.setGhostText=function(E,M){this.session.widgetManager||(this.session.widgetManager=new x(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(E,M)},A.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},A.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var E=this.getCursorPosition(),M=E.column;if(M!==0){var I=this.session.getLine(E.row),N,L;MF.toLowerCase()?1:0});for(var L=new m(0,0,0,0),N=E.first;N<=E.last;N++){var $=M.getLine(N);L.start.row=N,L.end.row=N,L.end.column=$.length,M.replace(L,I[N-E.first])}},A.prototype.toggleCommentLines=function(){var E=this.session.getState(this.getCursorPosition().row),M=this.$getSelectedRows();this.session.getMode().toggleCommentLines(E,this.session,M.first,M.last)},A.prototype.toggleBlockComment=function(){var E=this.getCursorPosition(),M=this.session.getState(E.row),I=this.getSelectionRange();this.session.getMode().toggleBlockComment(M,this.session,I,E)},A.prototype.getNumberAt=function(E,M){var I=/[\-]?[0-9]+(?:\.[0-9]+)?/g;I.lastIndex=0;for(var N=this.session.getLine(E);I.lastIndex=M){var $={value:L[0],start:L.index,end:L.index+L[0].length};return $}}return null},A.prototype.modifyNumber=function(E){var M=this.selection.getCursor().row,I=this.selection.getCursor().column,N=new m(M,I-1,M,I),L=this.session.getTextRange(N);if(!isNaN(parseFloat(L))&&isFinite(L)){var $=this.getNumberAt(M,I);if($){var D=$.value.indexOf(".")>=0?$.start+$.value.indexOf(".")+1:$.end,F=$.start+$.value.length-D,U=parseFloat($.value);U*=Math.pow(10,F),D!==$.end&&I=D&&$<=F&&(I=ce,U.selection.clearSelection(),U.moveCursorTo(E,D+N),U.selection.selectTo(E,F+N)),D=F});for(var W=this.$toggleWordPairs,B,H=0;H=F&&D<=U&&V.match(/((?:https?|ftp):\/\/[\S]+)/)){W=V.replace(/[\s:.,'";}\]]+$/,"");break}F=U}}catch(Y){I={error:Y}}finally{try{H&&!H.done&&(N=B.return)&&N.call(B)}finally{if(I)throw I.error}}return W},A.prototype.openLink=function(){var E=this.selection.getCursor(),M=this.findLinkAt(E.row,E.column);return M&&window.open(M,"_blank"),M!=null},A.prototype.removeLines=function(){var E=this.$getSelectedRows();this.session.removeFullLines(E.first,E.last),this.clearSelection()},A.prototype.duplicateSelection=function(){var E=this.selection,M=this.session,I=E.getRange(),N=E.isBackwards();if(I.isEmpty()){var L=I.start.row;M.duplicateLines(L,L)}else{var $=N?I.start:I.end,D=M.insert($,M.getTextRange(I),!1);I.start=$,I.end=D,E.setSelectionRange(I,N)}},A.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},A.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},A.prototype.moveText=function(E,M,I){return this.session.moveText(E,M,I)},A.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},A.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},A.prototype.$moveLines=function(E,M){var I,N,L=this.selection;if(!L.inMultiSelectMode||this.inVirtualSelectionMode){var $=L.toOrientedRange();I=this.$getSelectedRows($),N=this.session.$moveLines(I.first,I.last,M?0:E),M&&E==-1&&(N=0),$.moveBy(N,0),L.fromOrientedRange($)}else{var D=L.rangeList.ranges;L.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var F=0,U=0,W=D.length,B=0;BY+1)break;Y=X.last}for(B--,F=this.session.$moveLines(V,Y,M?0:E),M&&E==-1&&(H=B+1);H<=B;)D[H].moveBy(F,0),H++;M||(F=0),U+=F}L.fromOrientedRange(L.ranges[0]),L.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},A.prototype.$getSelectedRows=function(E){return E=(E||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(E.start.row),last:this.session.getRowFoldEnd(E.end.row)}},A.prototype.onCompositionStart=function(E){this.renderer.showComposition(E)},A.prototype.onCompositionUpdate=function(E){this.renderer.setCompositionText(E)},A.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},A.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},A.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},A.prototype.isRowVisible=function(E){return E>=this.getFirstVisibleRow()&&E<=this.getLastVisibleRow()},A.prototype.isRowFullyVisible=function(E){return E>=this.renderer.getFirstFullyVisibleRow()&&E<=this.renderer.getLastFullyVisibleRow()},A.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},A.prototype.$moveByPage=function(E,M){var I=this.renderer,N=this.renderer.layerConfig,L=E*Math.floor(N.height/N.lineHeight);M===!0?this.selection.$moveSelection(function(){this.moveCursorBy(L,0)}):M===!1&&(this.selection.moveCursorBy(L,0),this.selection.clearSelection());var $=I.scrollTop;I.scrollBy(0,L*N.lineHeight),M!=null&&I.scrollCursorIntoView(null,.5),I.animateScrolling($)},A.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},A.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},A.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},A.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},A.prototype.scrollPageDown=function(){this.$moveByPage(1)},A.prototype.scrollPageUp=function(){this.$moveByPage(-1)},A.prototype.scrollToRow=function(E){this.renderer.scrollToRow(E)},A.prototype.scrollToLine=function(E,M,I,N){this.renderer.scrollToLine(E,M,I,N)},A.prototype.centerSelection=function(){var E=this.getSelectionRange(),M={row:Math.floor(E.start.row+(E.end.row-E.start.row)/2),column:Math.floor(E.start.column+(E.end.column-E.start.column)/2)};this.renderer.alignCursor(M,.5)},A.prototype.getCursorPosition=function(){return this.selection.getCursor()},A.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},A.prototype.getSelectionRange=function(){return this.selection.getRange()},A.prototype.selectAll=function(){this.selection.selectAll()},A.prototype.clearSelection=function(){this.selection.clearSelection()},A.prototype.moveCursorTo=function(E,M){this.selection.moveCursorTo(E,M)},A.prototype.moveCursorToPosition=function(E){this.selection.moveCursorToPosition(E)},A.prototype.jumpToMatching=function(E,M){var I=this.getCursorPosition(),N=new k(this.session,I.row,I.column),L=N.getCurrentToken(),$=0;L&&L.type.indexOf("tag-name")!==-1&&(L=N.stepBackward());var D=L||N.stepForward();if(D){var F,U=!1,W={},B=I.column-D.start,H,V={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(D.value.match(/[{}()\[\]]/g)){for(;B1?W[D.value]++:L.value==="=0;--$)this.$tryReplace(I[$],E)&&N++;return this.selection.setSelectionRange(L),N},A.prototype.$tryReplace=function(E,M){var I=this.session.getTextRange(E);return M=this.$search.replace(I,M),M!==null?(E.end=this.session.replace(E,M),E):null},A.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},A.prototype.find=function(E,M,I){M||(M={}),typeof E=="string"||E instanceof RegExp?M.needle=E:typeof E=="object"&&s.mixin(M,E);var N=this.selection.getRange();M.needle==null&&(E=this.session.getTextRange(N)||this.$search.$options.needle,E||(N=this.session.getWordRange(N.start.row,N.start.column),E=this.session.getTextRange(N)),this.$search.set({needle:E})),this.$search.set(M),M.start||this.$search.set({start:N});var L=this.$search.find(this.session);if(M.preventScroll)return L;if(L)return this.revealRange(L,I),L;M.backwards?N.start=N.end:N.end=N.start,this.selection.setRange(N)},A.prototype.findNext=function(E,M){this.find({skipCurrent:!0,backwards:!1},E,M)},A.prototype.findPrevious=function(E,M){this.find(E,{skipCurrent:!0,backwards:!0},M)},A.prototype.revealRange=function(E,M){this.session.unfold(E),this.selection.setSelectionRange(E);var I=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(E.start,E.end,.5),M!==!1&&this.renderer.animateScrolling(I)},A.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},A.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},A.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(E){E.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},A.prototype.setAutoScrollEditorIntoView=function(E){if(E){var M,I=this,N=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var L=this.$scrollAnchor;L.style.cssText="position:absolute",this.container.insertBefore(L,this.container.firstChild);var $=this.on("changeSelection",function(){N=!0}),D=this.renderer.on("beforeRender",function(){N&&(M=I.renderer.container.getBoundingClientRect())}),F=this.renderer.on("afterRender",function(){if(N&&M&&(I.isFocused()||I.searchBox&&I.searchBox.isFocused())){var U=I.renderer,W=U.$cursorLayer.$pixelPos,B=U.layerConfig,H=W.top-B.offset;W.top>=0&&H+M.top<0?N=!0:W.topwindow.innerHeight?N=!1:N=null,N!=null&&(L.style.top=H+"px",L.style.left=W.left+"px",L.style.height=B.lineHeight+"px",L.scrollIntoView(N)),N=M=null}});this.setAutoScrollEditorIntoView=function(U){U||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",$),this.renderer.off("afterRender",F),this.renderer.off("beforeRender",D))}}},A.prototype.$resetCursorStyle=function(){var E=this.$cursorStyle||"ace",M=this.renderer.$cursorLayer;M&&(M.setSmoothBlinking(/smooth/.test(E)),M.isBlinking=!this.$readOnly&&E!="wide",l.setCssClass(M.element,"ace_slim-cursors",/slim/.test(E)))},A.prototype.prompt=function(E,M,I){var N=this;w.loadModule("ace/ext/prompt",function(L){L.prompt(N,E,M,I)})},A}();_.$uid=0,_.prototype.curOp=null,_.prototype.prevOp={},_.prototype.$mergeableCommands=["backspace","del","insertstring"],_.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],s.implement(_.prototype,v),w.defineOptions(_.prototype,"editor",{selectionStyle:{set:function(A){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:A})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(A){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(A){this.textInput.setReadOnly(A),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(A){this.textInput.setCopyWithEmptySelection(A)},initialValue:!1},cursorStyle:{set:function(A){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(A){this.setAutoScrollEditorIntoView(A)}},keyboardHandler:{set:function(A){this.setKeyboardHandler(A)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(A){this.session.setValue(A)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(A){this.setSession(A)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(A){this.renderer.$gutterLayer.setShowLineNumbers(A),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),A&&this.$relativeLineNumbers?R.attach(this):R.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(A){this.$showLineNumbers&&A?R.attach(this):R.detach(this)}},placeholder:{set:function(A){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var E=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(E&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),l.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!E&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),l.addCssClass(this.container,"ace_hasPlaceholder");var M=l.createElement("div");M.className="ace_placeholder",M.textContent=this.$placeholder||"",this.renderer.placeholderNode=M,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!E&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(A){var E={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(N){N.blur(),N.renderer.scroller.focus()},readOnly:!0},M=function(N){if(N.target==this.renderer.scroller&&N.keyCode===O.enter){N.preventDefault();var L=this.getCursorPosition().row;this.isRowVisible(L)||this.scrollToLine(L,!0,!0),this.focus()}},I;A?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(u.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",T("editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",T("Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",M.bind(this)),this.commands.addCommand(E),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",T("editor")),this.renderer.$gutter.setAttribute("aria-label",T("Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),I||(I=new S(this)),I.addListener()):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",M.bind(this)),this.commands.removeCommand(E),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),I&&I.removeListener())},initialValue:!1},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var R={getText:function(A,E){return(Math.abs(A.selection.lead.row-E)||E+1+(E<9?"·":""))+""},getWidth:function(A,E,M){return Math.max(E.toString().length,(M.lastRow+1).toString().length,2)*M.characterWidth},update:function(A,E){E.renderer.$loop.schedule(E.renderer.CHANGE_GUTTER)},attach:function(A){A.renderer.$gutterLayer.$renderer=this,A.on("changeSelection",this.update),this.update(null,A)},detach:function(A){A.renderer.$gutterLayer.$renderer==this&&(A.renderer.$gutterLayer.$renderer=null),A.off("changeSelection",this.update),this.update(null,A)}};r.Editor=_}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(n,r,o){var i=n("../lib/dom"),s=function(){function l(a,u){this.element=a,this.canvasHeight=u||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return l.prototype.moveContainer=function(a){i.translate(this.element,0,-(a.firstRowScreen*a.lineHeight%this.canvasHeight)-a.offset*this.$offsetCoefficient)},l.prototype.pageChanged=function(a,u){return Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)!==Math.floor(u.firstRowScreen*u.lineHeight/this.canvasHeight)},l.prototype.computeLineTop=function(a,u,c){var d=u.firstRowScreen*u.lineHeight,h=Math.floor(d/this.canvasHeight),f=c.documentToScreenRow(a,0)*u.lineHeight;return f-h*this.canvasHeight},l.prototype.computeLineHeight=function(a,u,c){return u.lineHeight*c.getRowLineCount(a)},l.prototype.getLength=function(){return this.cells.length},l.prototype.get=function(a){return this.cells[a]},l.prototype.shift=function(){this.$cacheCell(this.cells.shift())},l.prototype.pop=function(){this.$cacheCell(this.cells.pop())},l.prototype.push=function(a){if(Array.isArray(a)){this.cells.push.apply(this.cells,a);for(var u=i.createFragment(this.element),c=0;cb&&(x=y.end.row+1,y=g.getNextFoldLine(x,y),b=y?y.start.row:1/0),x>v){for(;this.$lines.getLength()>k+1;)this.$lines.pop();break}w=this.$lines.get(++k),w?w.row=x:(w=this.$lines.createCell(x,p,this.session,h),this.$lines.push(w)),this.$renderCell(w,p,y,x),x++}this._signal("afterRender"),this.$updateGutterWidth(p)},f.prototype.$updateGutterWidth=function(p){var g=this.session,m=g.gutterRenderer||this.$renderer,v=g.$firstLineNumber,y=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||g.$useWrapMode)&&(y=g.getLength()+v-1);var b=m?m.getWidth(g,y,p):y.toString().length*p.characterWidth,w=this.$padding||this.$computePadding();b+=w.left+w.right,b!==this.gutterWidth&&!isNaN(b)&&(this.gutterWidth=b,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",b))},f.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var p=this.session.selection.getCursor();this.$cursorRow!==p.row&&(this.$cursorRow=p.row)}},f.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var p=this.session.selection.cursor.row;if(this.$cursorRow=p,!(this.$cursorCell&&this.$cursorCell.row==p)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var g=this.$lines.cells;this.$cursorCell=null;for(var m=0;m=this.$cursorRow){if(v.row>this.$cursorRow){var y=this.session.getFoldLine(this.$cursorRow);if(m>0&&y&&y.start.row==g[m-1].row)v=g[m-1];else break}v.element.className="ace_gutter-active-line "+v.element.className,this.$cursorCell=v;break}}}}},f.prototype.scrollLines=function(p){var g=this.config;if(this.config=p,this.$updateCursorRow(),this.$lines.pageChanged(g,p))return this.update(p);this.$lines.moveContainer(p);var m=Math.min(p.lastRow+p.gutterOffset,this.session.getLength()-1),v=this.oldLastRow;if(this.oldLastRow=m,!g||v0;y--)this.$lines.shift();if(v>m)for(var y=this.session.getFoldedRowCount(m+1,v);y>0;y--)this.$lines.pop();p.firstRowv&&this.$lines.push(this.$renderLines(p,v+1,m)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(p)},f.prototype.$renderLines=function(p,g,m){for(var v=[],y=g,b=this.session.getNextFoldLine(y),w=b?b.start.row:1/0;y>w&&(y=b.end.row+1,b=this.session.getNextFoldLine(y,b),w=b?b.start.row:1/0),!(y>m);){var k=this.$lines.createCell(y,p,this.session,h);this.$renderCell(k,p,b,y),v.push(k),y++}return v},f.prototype.$renderCell=function(p,g,m,v){var y=p.element,b=this.session,w=y.childNodes[0],k=y.childNodes[1],x=y.childNodes[2],S=x.firstChild,T=b.$firstLineNumber,C=b.$breakpoints,O=b.$decorations,_=b.gutterRenderer||this.$renderer,R=this.$showFoldWidgets&&b.foldWidgets,A=m?m.start.row:Number.MAX_VALUE,E=g.lineHeight+"px",M=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",I=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",N=(_?_.getText(b,v):v+T).toString();if(this.$highlightGutterLine&&(v==this.$cursorRow||m&&v=A&&this.$cursorRow<=m.end.row)&&(M+="ace_gutter-active-line ",this.$cursorCell!=p&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=p)),C[v]&&(M+=C[v]),O[v]&&(M+=O[v]),this.$annotations[v]&&v!==A&&(M+=this.$annotations[v].className),R){var L=R[v];L==null&&(L=R[v]=b.getFoldWidget(v))}if(L){var $="ace_fold-widget ace_"+L,D=L=="start"&&v==A&&vm.right-g.right)return"foldWidgets"},f}();d.prototype.$fixedWidth=!1,d.prototype.$highlightGutterLine=!0,d.prototype.$renderer="",d.prototype.$showLineNumbers=!0,d.prototype.$showFoldWidgets=!0,s.implement(d.prototype,a);function h(f){var p=document.createTextNode("");f.appendChild(p);var g=i.createElement("span");f.appendChild(g);var m=i.createElement("span");f.appendChild(m);var v=i.createElement("span");return m.appendChild(v),f}r.Gutter=d}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(n,r,o){var i=n("../range").Range,s=n("../lib/dom"),l=function(){function u(c){this.element=s.createElement("div"),this.element.className="ace_layer ace_marker-layer",c.appendChild(this.element)}return u.prototype.setPadding=function(c){this.$padding=c},u.prototype.setSession=function(c){this.session=c},u.prototype.setMarkers=function(c){this.markers=c},u.prototype.elt=function(c,d){var h=this.i!=-1&&this.element.childNodes[this.i];h?this.i++:(h=document.createElement("div"),this.element.appendChild(h),this.i=-1),h.style.cssText=d,h.className=c},u.prototype.update=function(c){if(c){this.config=c,this.i=0;var d;for(var h in this.markers){var f=this.markers[h];if(!f.range){f.update(d,this,this.session,c);continue}var p=f.range.clipRows(c.firstRow,c.lastRow);if(!p.isEmpty())if(p=p.toScreenRange(this.session),f.renderer){var g=this.$getTop(p.start.row,c),m=this.$padding+p.start.column*c.characterWidth;f.renderer(d,p,m,g,c)}else f.type=="fullLine"?this.drawFullLineMarker(d,p,f.clazz,c):f.type=="screenLine"?this.drawScreenLineMarker(d,p,f.clazz,c):p.isMultiLine()?f.type=="text"?this.drawTextMarker(d,p,f.clazz,c):this.drawMultiLineMarker(d,p,f.clazz,c):this.drawSingleLineMarker(d,p,f.clazz+" ace_start ace_br15",c)}if(this.i!=-1)for(;this.ik,y==v),f,y==v?0:1,p)},u.prototype.drawMultiLineMarker=function(c,d,h,f,p){var g=this.$padding,m=f.lineHeight,v=this.$getTop(d.start.row,f),y=g+d.start.column*f.characterWidth;if(p=p||"",this.session.$bidiHandler.isBidiRow(d.start.row)){var b=d.clone();b.end.row=b.start.row,b.end.column=this.session.getLine(b.start.row).length,this.drawBidiSingleLineMarker(c,b,h+" ace_br1 ace_start",f,null,p)}else this.elt(h+" ace_br1 ace_start","height:"+m+"px;right:0;top:"+v+"px;left:"+y+"px;"+(p||""));if(this.session.$bidiHandler.isBidiRow(d.end.row)){var b=d.clone();b.start.row=b.end.row,b.start.column=0,this.drawBidiSingleLineMarker(c,b,h+" ace_br12",f,null,p)}else{v=this.$getTop(d.end.row,f);var w=d.end.column*f.characterWidth;this.elt(h+" ace_br12","height:"+m+"px;width:"+w+"px;top:"+v+"px;left:"+g+"px;"+(p||""))}if(m=(d.end.row-d.start.row-1)*f.lineHeight,!(m<=0)){v=this.$getTop(d.start.row+1,f);var k=(d.start.column?1:0)|(d.end.column?0:8);this.elt(h+(k?" ace_br"+k:""),"height:"+m+"px;right:0;top:"+v+"px;left:"+g+"px;"+(p||""))}},u.prototype.drawSingleLineMarker=function(c,d,h,f,p,g){if(this.session.$bidiHandler.isBidiRow(d.start.row))return this.drawBidiSingleLineMarker(c,d,h,f,p,g);var m=f.lineHeight,v=(d.end.column+(p||0)-d.start.column)*f.characterWidth,y=this.$getTop(d.start.row,f),b=this.$padding+d.start.column*f.characterWidth;this.elt(h,"height:"+m+"px;width:"+v+"px;top:"+y+"px;left:"+b+"px;"+(g||""))},u.prototype.drawBidiSingleLineMarker=function(c,d,h,f,p,g){var m=f.lineHeight,v=this.$getTop(d.start.row,f),y=this.$padding,b=this.session.$bidiHandler.getSelections(d.start.column,d.end.column);b.forEach(function(w){this.elt(h,"height:"+m+"px;width:"+(w.width+(p||0))+"px;top:"+v+"px;left:"+(y+w.left)+"px;"+(g||""))},this)},u.prototype.drawFullLineMarker=function(c,d,h,f,p){var g=this.$getTop(d.start.row,f),m=f.lineHeight;d.start.row!=d.end.row&&(m+=this.$getTop(d.end.row,f)-g),this.elt(h,"height:"+m+"px;top:"+g+"px;left:0;right:0;"+(p||""))},u.prototype.drawScreenLineMarker=function(c,d,h,f,p){var g=this.$getTop(d.start.row,f),m=f.lineHeight;this.elt(h,"height:"+m+"px;top:"+g+"px;left:0;right:0;"+(p||""))},u}();l.prototype.$padding=0;function a(u,c,d,h){return(u?1:0)|(c?2:0)|(d?4:0)|(h?8:0)}r.Marker=l}),ace.define("ace/layer/text_util",["require","exports","module"],function(n,r,o){var i=new Set(["text","rparen","lparen"]);r.isTextToken=function(s){return i.has(s)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/dom"),l=n("../lib/lang"),a=n("./lines").Lines,u=n("../lib/event_emitter").EventEmitter,c=n("../config").nls,d=n("./text_util").isTextToken,h=function(){function f(p){this.dom=s,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",p.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)}return f.prototype.$updateEolChar=function(){var p=this.session.doc,g=p.getNewLineCharacter()==` +`&&p.getNewLineMode()!="windows",m=g?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=m)return this.EOL_CHAR=m,!0},f.prototype.setPadding=function(p){this.$padding=p,this.element.style.margin="0 "+p+"px"},f.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},f.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},f.prototype.$setFontMetrics=function(p){this.$fontMetrics=p,this.$fontMetrics.on("changeCharacterSize",(function(g){this._signal("changeCharacterSize",g)}).bind(this)),this.$pollSizeChanges()},f.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},f.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},f.prototype.setSession=function(p){this.session=p,p&&this.$computeTabString()},f.prototype.setShowInvisibles=function(p){return this.showInvisibles==p?!1:(this.showInvisibles=p,typeof p=="string"?(this.showSpaces=/tab/i.test(p),this.showTabs=/space/i.test(p),this.showEOL=/eol/i.test(p)):this.showSpaces=this.showTabs=this.showEOL=p,this.$computeTabString(),!0)},f.prototype.setDisplayIndentGuides=function(p){return this.displayIndentGuides==p?!1:(this.displayIndentGuides=p,this.$computeTabString(),!0)},f.prototype.setHighlightIndentGuides=function(p){return this.$highlightIndentGuides===p?!1:(this.$highlightIndentGuides=p,p)},f.prototype.$computeTabString=function(){var p=this.session.getTabSize();this.tabSize=p;for(var g=this.$tabStrings=[0],m=1;mT&&(x=S.end.row+1,S=this.session.getNextFoldLine(x,S),T=S?S.start.row:1/0),!(x>y);){var C=b[w++];if(C){this.dom.removeChildren(C),this.$renderLine(C,x,x==T?S:!1),k&&(C.style.top=this.$lines.computeLineTop(x,p,this.session)+"px");var O=p.lineHeight*this.session.getRowLength(x)+"px";C.style.height!=O&&(k=!0,C.style.height=O)}x++}if(k)for(;w0;y--)this.$lines.shift();if(g.lastRow>p.lastRow)for(var y=this.session.getFoldedRowCount(p.lastRow+1,g.lastRow);y>0;y--)this.$lines.pop();p.firstRowg.lastRow&&this.$lines.push(this.$renderLinesFragment(p,g.lastRow+1,p.lastRow)),this.$highlightIndentGuide()},f.prototype.$renderLinesFragment=function(p,g,m){for(var v=[],y=g,b=this.session.getNextFoldLine(y),w=b?b.start.row:1/0;y>w&&(y=b.end.row+1,b=this.session.getNextFoldLine(y,b),w=b?b.start.row:1/0),!(y>m);){var k=this.$lines.createCell(y,p,this.session),x=k.element;this.dom.removeChildren(x),s.setStyle(x.style,"height",this.$lines.computeLineHeight(y,p,this.session)+"px"),s.setStyle(x.style,"top",this.$lines.computeLineTop(y,p,this.session)+"px"),this.$renderLine(x,y,y==w?b:!1),this.$useLineGroups()?x.className="ace_line_group":x.className="ace_line",v.push(k),y++}return v},f.prototype.update=function(p){this.$lines.moveContainer(p),this.config=p;for(var g=p.firstRow,m=p.lastRow,v=this.$lines;v.getLength();)v.pop();v.push(this.$renderLinesFragment(p,g,m))},f.prototype.$renderToken=function(p,g,m,v){for(var y=this,b=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,w=this.dom.createFragment(this.element),k,x=0;k=b.exec(v);){var S=k[1],T=k[2],C=k[3],O=k[4],_=k[5];if(!(!y.showSpaces&&T)){var R=x!=k.index?v.slice(x,k.index):"";if(x=k.index+k[0].length,R&&w.appendChild(this.dom.createTextNode(R,this.element)),S){var A=y.session.getScreenTabSize(g+k.index);w.appendChild(y.$tabStrings[A].cloneNode(!0)),g+=A-1}else if(T)if(y.showSpaces){var E=this.dom.createElement("span");E.className="ace_invisible ace_invisible_space",E.textContent=l.stringRepeat(y.SPACE_CHAR,T.length),w.appendChild(E)}else w.appendChild(this.dom.createTextNode(T,this.element));else if(C){var E=this.dom.createElement("span");E.className="ace_invisible ace_invisible_space ace_invalid",E.textContent=l.stringRepeat(y.SPACE_CHAR,C.length),w.appendChild(E)}else if(O){g+=1;var E=this.dom.createElement("span");E.style.width=y.config.characterWidth*2+"px",E.className=y.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",E.textContent=y.showSpaces?y.SPACE_CHAR:O,w.appendChild(E)}else if(_){g+=1;var E=this.dom.createElement("span");E.style.width=y.config.characterWidth*2+"px",E.className="ace_cjk",E.textContent=_,w.appendChild(E)}}}if(w.appendChild(this.dom.createTextNode(x?v.slice(x):v,this.element)),d(m.type))p.appendChild(w);else{var M="ace_"+m.type.replace(/\./g," ace_"),E=this.dom.createElement("span");m.type=="fold"&&(E.style.width=m.value.length*this.config.characterWidth+"px",E.setAttribute("title",c("Unfold code"))),E.className=M,E.appendChild(w),p.appendChild(E)}return g+v.length},f.prototype.renderIndentGuide=function(p,g,m){var v=g.search(this.$indentGuideRe);if(v<=0||v>=m)return g;if(g[0]==" "){v-=v%this.tabSize;for(var y=v/this.tabSize,b=0;bb[w].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&p[g.row]!==""&&g.column===p[g.row].length){this.$highlightIndentGuideMarker.dir=1;for(var w=g.row+1;w0){for(var y=0;y=this.$highlightIndentGuideMarker.start+1){if(v.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(v,g)}}else for(var m=p.length-1;m>=0;m--){var v=p[m];if(this.$highlightIndentGuideMarker.end&&v.row=b;)w=this.$renderToken(k,w,S,T.substring(0,b-v)),T=T.substring(b-v),v=b,k=this.$createLineElement(),p.appendChild(k),k.appendChild(this.dom.createTextNode(l.stringRepeat(" ",m.indent),this.element)),y++,w=0,b=m[y]||Number.MAX_VALUE;T.length!=0&&(v+=T.length,w=this.$renderToken(k,w,S,T))}}m[m.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(k,w,null,"",!0)},f.prototype.$renderSimpleLine=function(p,g){for(var m=0,v=0;vthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(p,m,y,b);m=this.$renderToken(p,m,y,b)}}},f.prototype.$renderOverflowMessage=function(p,g,m,v,y){m&&this.$renderToken(p,g,m,v.slice(0,this.MAX_LINE_LENGTH-g));var b=this.dom.createElement("span");b.className="ace_inline_button ace_keyword ace_toggle_wrap",b.textContent=y?"":"",p.appendChild(b)},f.prototype.$renderLine=function(p,g,m){if(!m&&m!=!1&&(m=this.session.getFoldLine(g)),m)var v=this.$getFoldLineTokens(g,m);else var v=this.session.getTokens(g);var y=p;if(v.length){var b=this.session.getRowSplitData(g);if(b&&b.length){this.$renderWrappedLine(p,v,b);var y=p.lastChild}else{var y=p;this.$useLineGroups()&&(y=this.$createLineElement(),p.appendChild(y)),this.$renderSimpleLine(y,v)}}else this.$useLineGroups()&&(y=this.$createLineElement(),p.appendChild(y));if(this.showEOL&&y){m&&(g=m.end.row);var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_eol",w.textContent=g==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,y.appendChild(w)}},f.prototype.$getFoldLineTokens=function(p,g){var m=this.session,v=[];function y(w,k,x){for(var S=0,T=0;T+w[S].value.lengthx-k&&(C=C.substring(0,x-k)),v.push({type:w[S].type,value:C}),T=k+C.length,S+=1}for(;Tx?v.push({type:w[S].type,value:C.substring(0,x-T)}):v.push(w[S]),T+=C.length,S+=1}}var b=m.getTokens(p);return g.walk(function(w,k,x,S,T){w!=null?v.push({type:"fold",value:w}):(T&&(b=m.getTokens(k)),b.length&&y(b,S,x))},g.end.row,this.session.getLine(g.end.row).length),v},f.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},f}();h.prototype.EOF_CHAR="¶",h.prototype.EOL_CHAR_LF="¬",h.prototype.EOL_CHAR_CRLF="¤",h.prototype.EOL_CHAR=h.prototype.EOL_CHAR_LF,h.prototype.TAB_CHAR="—",h.prototype.SPACE_CHAR="·",h.prototype.$padding=0,h.prototype.MAX_LINE_LENGTH=1e4,h.prototype.showInvisibles=!1,h.prototype.showSpaces=!1,h.prototype.showTabs=!1,h.prototype.showEOL=!1,h.prototype.displayIndentGuides=!0,h.prototype.$highlightIndentGuides=!0,h.prototype.$tabStrings=[],h.prototype.destroy={},h.prototype.onChangeTabSize=h.prototype.$computeTabString,i.implement(h.prototype,u),r.Text=h}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(n,r,o){var i=n("../lib/dom"),s=function(){function l(a){this.element=i.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),i.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return l.prototype.$updateOpacity=function(a){for(var u=this.cursors,c=u.length;c--;)i.setStyle(u[c].style,"opacity",a?"":"0")},l.prototype.$startCssAnimation=function(){for(var a=this.cursors,u=a.length;u--;)a[u].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&i.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},l.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,i.removeCssClass(this.element,"ace_animate-blinking")},l.prototype.setPadding=function(a){this.$padding=a},l.prototype.setSession=function(a){this.session=a},l.prototype.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},l.prototype.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},l.prototype.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,i.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.restartTimer())},l.prototype.addCursor=function(){var a=i.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},l.prototype.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},l.prototype.hideCursor=function(){this.isVisible=!1,i.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},l.prototype.showCursor=function(){this.isVisible=!0,i.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},l.prototype.restartTimer=function(){var a=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,i.removeCssClass(this.element,"ace_smooth-blinking")),a(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&i.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),i.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var u=(function(){this.timeoutId=setTimeout(function(){a(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){a(!0),u()},this.blinkInterval),u()}},l.prototype.getPixelPosition=function(a,u){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var c=this.session.documentToScreenPosition(a),d=this.$padding+(this.session.$bidiHandler.isBidiRow(c.row,a.row)?this.session.$bidiHandler.getPosLeft(c.column):c.column*this.config.characterWidth),h=(c.row-(u?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:d,top:h}},l.prototype.isCursorInView=function(a,u){return a.top>=0&&a.topa.height+a.offset||f.top<0)&&c>1)){var p=this.cursors[d++]||this.addCursor(),g=p.style;this.drawCursor?this.drawCursor(p,f,a,u[c],this.session):this.isCursorInView(f,a)?(i.setStyle(g,"display","block"),i.translate(p,f.left,f.top),i.setStyle(g,"width",Math.round(a.characterWidth)+"px"),i.setStyle(g,"height",a.lineHeight+"px")):i.setStyle(g,"display","none")}}for(;this.cursors.length>d;)this.removeCursor();var m=this.session.getOverwrite();this.$setOverwrite(m),this.$pixelPos=f,this.restartTimer()},l.prototype.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?i.addCssClass(this.element,"ace_overwrite-cursors"):i.removeCssClass(this.element,"ace_overwrite-cursors"))},l.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},l}();s.prototype.$padding=0,s.prototype.drawCursor=null,r.Cursor=s}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,r,o){var i=this&&this.__extends||function(){var p=function(g,m){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(v[b]=y[b])},p(g,m)};return function(g,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");p(g,m);function v(){this.constructor=g}g.prototype=m===null?Object.create(m):(v.prototype=m.prototype,new v)}}(),s=n("./lib/oop"),l=n("./lib/dom"),a=n("./lib/event"),u=n("./lib/event_emitter").EventEmitter,c=32768,d=function(){function p(g,m){this.element=l.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+m,this.inner=l.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),g.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addListener(this.element,"scroll",this.onScroll.bind(this)),a.addListener(this.element,"mousedown",a.preventDefault)}return p.prototype.setVisible=function(g){this.element.style.display=g?"":"none",this.isVisible=g,this.coeff=1},p}();s.implement(d.prototype,u);var h=function(p){i(g,p);function g(m,v){var y=p.call(this,m,"-v")||this;return y.scrollTop=0,y.scrollHeight=0,v.$scrollbarWidth=y.width=l.scrollbarWidth(m.ownerDocument),y.inner.style.width=y.element.style.width=(y.width||15)+5+"px",y.$minWidth=0,y}return g.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var m=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-m)/(this.coeff-m)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},g.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},g.prototype.setHeight=function(m){this.element.style.height=m+"px"},g.prototype.setScrollHeight=function(m){this.scrollHeight=m,m>c?(this.coeff=c/m,m=c):this.coeff!=1&&(this.coeff=1),this.inner.style.height=m+"px"},g.prototype.setScrollTop=function(m){this.scrollTop!=m&&(this.skipEvent=!0,this.scrollTop=m,this.element.scrollTop=m*this.coeff)},g}(d);h.prototype.setInnerHeight=h.prototype.setScrollHeight;var f=function(p){i(g,p);function g(m,v){var y=p.call(this,m,"-h")||this;return y.scrollLeft=0,y.height=v.$scrollbarWidth,y.inner.style.height=y.element.style.height=(y.height||15)+5+"px",y}return g.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},g.prototype.getHeight=function(){return this.isVisible?this.height:0},g.prototype.setWidth=function(m){this.element.style.width=m+"px"},g.prototype.setInnerWidth=function(m){this.inner.style.width=m+"px"},g.prototype.setScrollWidth=function(m){this.inner.style.width=m+"px"},g.prototype.setScrollLeft=function(m){this.scrollLeft!=m&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=m)},g}(d);r.ScrollBar=h,r.ScrollBarV=h,r.ScrollBarH=f,r.VScrollBar=h,r.HScrollBar=f}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,r,o){var i=this&&this.__extends||function(){var f=function(p,g){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,v){m.__proto__=v}||function(m,v){for(var y in v)Object.prototype.hasOwnProperty.call(v,y)&&(m[y]=v[y])},f(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");f(p,g);function m(){this.constructor=p}p.prototype=g===null?Object.create(g):(m.prototype=g.prototype,new m)}}(),s=n("./lib/oop"),l=n("./lib/dom"),a=n("./lib/event"),u=n("./lib/event_emitter").EventEmitter;l.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{ + position: absolute; + background: rgba(128, 128, 128, 0.6); + -moz-box-sizing: border-box; + box-sizing: border-box; + border: 1px solid #bbb; + border-radius: 2px; + z-index: 8; +} +.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h { + position: absolute; + z-index: 6; + background: none; + overflow: hidden!important; +} +.ace_editor>.ace_sb-v { + z-index: 6; + right: 0; + top: 0; + width: 12px; +} +.ace_editor>.ace_sb-v div { + z-index: 8; + right: 0; + width: 100%; +} +.ace_editor>.ace_sb-h { + bottom: 0; + left: 0; + height: 12px; +} +.ace_editor>.ace_sb-h div { + bottom: 0; + height: 100%; +} +.ace_editor>.ace_sb_grabbed { + z-index: 8; + background: #000; +}`,"ace_scrollbar.css",!1);var c=function(){function f(p,g){this.element=l.createElement("div"),this.element.className="ace_sb"+g,this.inner=l.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,p.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return f.prototype.setVisible=function(p){this.element.style.display=p?"":"none",this.isVisible=p,this.coeff=1},f}();s.implement(c.prototype,u);var d=function(f){i(p,f);function p(g,m){var v=f.call(this,g,"-v")||this;return v.scrollTop=0,v.scrollHeight=0,v.parent=g,v.width=v.VScrollWidth,v.renderer=m,v.inner.style.width=v.element.style.width=(v.width||15)+"px",v.$minWidth=0,v}return p.prototype.onMouseDown=function(g,m){if(g==="mousedown"&&!(a.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var v=this,y=m.clientY,b=function(O){y=O.clientY},w=function(){clearInterval(T)},k=m.clientY,x=this.thumbTop,S=function(){if(y!==void 0){var O=v.scrollTopFromThumbTop(x+y-k);O!==v.scrollTop&&v._emit("scroll",{data:O})}};a.capture(this.inner,b,w);var T=setInterval(S,20);return a.preventDefault(m)}var C=m.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(C)}),a.preventDefault(m)}},p.prototype.getHeight=function(){return this.height},p.prototype.scrollTopFromThumbTop=function(g){var m=g*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return m=m>>0,m<0?m=0:m>this.pageHeight-this.viewHeight&&(m=this.pageHeight-this.viewHeight),m},p.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},p.prototype.setHeight=function(g){this.height=Math.max(0,g),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},p.prototype.setScrollHeight=function(g,m){this.pageHeight===g&&!m||(this.pageHeight=g,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},p.prototype.setScrollTop=function(g){this.scrollTop=g,g<0&&(g=0),this.thumbTop=g*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},p}(c);d.prototype.setInnerHeight=d.prototype.setScrollHeight;var h=function(f){i(p,f);function p(g,m){var v=f.call(this,g,"-h")||this;return v.scrollLeft=0,v.scrollWidth=0,v.height=v.HScrollHeight,v.inner.style.height=v.element.style.height=(v.height||12)+"px",v.renderer=m,v}return p.prototype.onMouseDown=function(g,m){if(g==="mousedown"&&!(a.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var v=this,y=m.clientX,b=function(O){y=O.clientX},w=function(){clearInterval(T)},k=m.clientX,x=this.thumbLeft,S=function(){if(y!==void 0){var O=v.scrollLeftFromThumbLeft(x+y-k);O!==v.scrollLeft&&v._emit("scroll",{data:O})}};a.capture(this.inner,b,w);var T=setInterval(S,20);return a.preventDefault(m)}var C=m.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(C)}),a.preventDefault(m)}},p.prototype.getHeight=function(){return this.isVisible?this.height:0},p.prototype.scrollLeftFromThumbLeft=function(g){var m=g*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return m=m>>0,m<0?m=0:m>this.pageWidth-this.viewWidth&&(m=this.pageWidth-this.viewWidth),m},p.prototype.setWidth=function(g){this.width=Math.max(0,g),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},p.prototype.setScrollWidth=function(g,m){this.pageWidth===g&&!m||(this.pageWidth=g,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},p.prototype.setScrollLeft=function(g){this.scrollLeft=g,g<0&&(g=0),this.thumbLeft=g*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},p}(c);h.prototype.setInnerWidth=h.prototype.setScrollWidth,r.ScrollBar=d,r.ScrollBarV=d,r.ScrollBarH=h,r.VScrollBar=d,r.HScrollBar=h}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(n,r,o){var i=n("./lib/event"),s=function(){function l(a,u){this.onRender=a,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=u||window;var c=this;this._flush=function(d){c.pending=!1;var h=c.changes;if(h&&(i.blockIdle(100),c.changes=0,c.onRender(h)),c.changes){if(c.$recursionLimit--<0)return;c.schedule()}else c.$recursionLimit=2}}return l.prototype.schedule=function(a){this.changes=this.changes|a,this.changes&&!this.pending&&(i.nextFrame(this._flush),this.pending=!0)},l.prototype.clear=function(a){var u=this.changes;return this.changes=0,u},l}();r.RenderLoop=s}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/dom"),l=n("../lib/lang"),a=n("../lib/event"),u=n("../lib/useragent"),c=n("../lib/event_emitter").EventEmitter,d=512,h=typeof ResizeObserver=="function",f=200,p=function(){function g(m){this.el=s.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=s.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=s.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),m.appendChild(this.el),this.$measureNode.textContent=l.stringRepeat("X",d),this.$characterSize={width:0,height:0},h?this.$addObserver():this.checkForSizeChanges()}return g.prototype.$setMeasureNodeStyles=function(m,v){m.width=m.height="auto",m.left=m.top="0px",m.visibility="hidden",m.position="absolute",m.whiteSpace="pre",u.isIE<8?m["font-family"]="inherit":m.font="inherit",m.overflow=v?"hidden":"visible"},g.prototype.checkForSizeChanges=function(m){if(m===void 0&&(m=this.$measureSizes()),m&&(this.$characterSize.width!==m.width||this.$characterSize.height!==m.height)){this.$measureNode.style.fontWeight="bold";var v=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=m,this.charSizes=Object.create(null),this.allowBoldFonts=v&&v.width===m.width&&v.height===m.height,this._emit("changeCharacterSize",{data:m})}},g.prototype.$addObserver=function(){var m=this;this.$observer=new window.ResizeObserver(function(v){m.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},g.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var m=this;return this.$pollSizeChangesTimer=a.onIdle(function v(){m.checkForSizeChanges(),a.onIdle(v,500)},500)},g.prototype.setPolling=function(m){m?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},g.prototype.$measureSizes=function(m){var v={height:(m||this.$measureNode).clientHeight,width:(m||this.$measureNode).clientWidth/d};return v.width===0||v.height===0?null:v},g.prototype.$measureCharWidth=function(m){this.$main.textContent=l.stringRepeat(m,d);var v=this.$main.getBoundingClientRect();return v.width/d},g.prototype.getCharacterWidth=function(m){var v=this.charSizes[m];return v===void 0&&(v=this.charSizes[m]=this.$measureCharWidth(m)/this.$characterSize.width),v},g.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},g.prototype.$getZoom=function(m){return!m||!m.parentElement?1:(window.getComputedStyle(m).zoom||1)*this.$getZoom(m.parentElement)},g.prototype.$initTransformMeasureNodes=function(){var m=function(v,y){return["div",{style:"position: absolute;top:"+v+"px;left:"+y+"px;"}]};this.els=s.buildDom([m(0,0),m(f,0),m(0,f),m(f,f)],this.el)},g.prototype.transformCoordinates=function(m,v){if(m){var y=this.$getZoom(this.el);m=x(1/y,m)}function b(D,F,U){var W=D[1]*F[0]-D[0]*F[1];return[(-F[1]*U[0]+F[0]*U[1])/W,(+D[1]*U[0]-D[0]*U[1])/W]}function w(D,F){return[D[0]-F[0],D[1]-F[1]]}function k(D,F){return[D[0]+F[0],D[1]+F[1]]}function x(D,F){return[D*F[0],D*F[1]]}this.els||this.$initTransformMeasureNodes();function S(D){var F=D.getBoundingClientRect();return[F.left,F.top]}var T=S(this.els[0]),C=S(this.els[1]),O=S(this.els[2]),_=S(this.els[3]),R=b(w(_,C),w(_,O),w(k(C,O),k(_,T))),A=x(1+R[0],w(C,T)),E=x(1+R[1],w(O,T));if(v){var M=v,I=R[0]*M[0]/f+R[1]*M[1]/f+1,N=k(x(M[0],A),x(M[1],E));return k(x(1/I/f,N),T)}var L=w(m,T),$=b(w(A,x(R[0],L)),w(E,x(R[1],L)),L);return x(f,$)},g}();p.prototype.$characterSize={width:0,height:0},i.implement(p.prototype,c),r.FontMetrics=p}),ace.define("ace/css/editor-css",["require","exports","module"],function(n,r,o){o.exports=` +.ace_br1 {border-top-left-radius : 3px;} +.ace_br2 {border-top-right-radius : 3px;} +.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;} +.ace_br4 {border-bottom-right-radius: 3px;} +.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;} +.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;} +.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;} +.ace_br8 {border-bottom-left-radius : 3px;} +.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;} +.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;} +.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;} +.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} +.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} +.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} +.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} + + +.ace_editor { + position: relative; + overflow: hidden; + padding: 0; + font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace; + direction: ltr; + text-align: left; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} + +.ace_scroller { + position: absolute; + overflow: hidden; + top: 0; + bottom: 0; + background-color: inherit; + -ms-user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + user-select: none; + cursor: text; +} + +.ace_content { + position: absolute; + box-sizing: border-box; + min-width: 100%; + contain: style size layout; + font-variant-ligatures: no-common-ligatures; +} + +.ace_keyboard-focus:focus { + box-shadow: inset 0 0 0 2px #5E9ED6; + outline: none; +} + +.ace_dragging .ace_scroller:before{ + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + content: ''; + background: rgba(250, 250, 250, 0.01); + z-index: 1000; +} +.ace_dragging.ace_dark .ace_scroller:before{ + background: rgba(0, 0, 0, 0.01); +} + +.ace_gutter { + position: absolute; + overflow : hidden; + width: auto; + top: 0; + bottom: 0; + left: 0; + cursor: default; + z-index: 4; + -ms-user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + user-select: none; + contain: style size layout; +} + +.ace_gutter-active-line { + position: absolute; + left: 0; + right: 0; +} + +.ace_scroller.ace_scroll-left:after { + content: ""; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset; + pointer-events: none; +} + +.ace_gutter-cell, .ace_gutter-cell_svg-icons { + position: absolute; + top: 0; + left: 0; + right: 0; + padding-left: 19px; + padding-right: 6px; + background-repeat: no-repeat; +} + +.ace_gutter-cell_svg-icons .ace_gutter_annotation { + margin-left: -14px; + float: left; +} + +.ace_gutter-cell .ace_gutter_annotation { + margin-left: -19px; + float: left; +} + +.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg=="); + background-repeat: no-repeat; + background-position: 2px center; +} + +.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg=="); + background-repeat: no-repeat; + background-position: 2px center; +} + +.ace_gutter-cell.ace_info, .ace_icon.ace_info { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII="); + background-repeat: no-repeat; + background-position: 2px center; +} +.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC"); +} + +.ace_icon_svg.ace_error { + -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+"); + background-color: crimson; +} +.ace_icon_svg.ace_warning { + -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg=="); + background-color: darkorange; +} +.ace_icon_svg.ace_info { + -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg=="); + background-color: royalblue; +} + +.ace_icon_svg.ace_error_fold { + -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4="); + background-color: crimson; +} +.ace_icon_svg.ace_warning_fold { + -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4="); + background-color: darkorange; +} + +.ace_scrollbar { + contain: strict; + position: absolute; + right: 0; + bottom: 0; + z-index: 6; +} + +.ace_scrollbar-inner { + position: absolute; + cursor: text; + left: 0; + top: 0; +} + +.ace_scrollbar-v{ + overflow-x: hidden; + overflow-y: scroll; + top: 0; +} + +.ace_scrollbar-h { + overflow-x: scroll; + overflow-y: hidden; + left: 0; +} + +.ace_print-margin { + position: absolute; + height: 100%; +} + +.ace_text-input { + position: absolute; + z-index: 0; + width: 0.5em; + height: 1em; + opacity: 0; + background: transparent; + -moz-appearance: none; + appearance: none; + border: none; + resize: none; + outline: none; + overflow: hidden; + font: inherit; + padding: 0 1px; + margin: 0 -1px; + contain: strict; + -ms-user-select: text; + -moz-user-select: text; + -webkit-user-select: text; + user-select: text; + /*with \`pre-line\` chrome inserts   instead of space*/ + white-space: pre!important; +} +.ace_text-input.ace_composition { + background: transparent; + color: inherit; + z-index: 1000; + opacity: 1; +} +.ace_composition_placeholder { color: transparent } +.ace_composition_marker { + border-bottom: 1px solid; + position: absolute; + border-radius: 0; + margin-top: 1px; +} + +[ace_nocontext=true] { + transform: none!important; + filter: none!important; + clip-path: none!important; + mask : none!important; + contain: none!important; + perspective: none!important; + mix-blend-mode: initial!important; + z-index: auto; +} + +.ace_layer { + z-index: 1; + position: absolute; + overflow: hidden; + /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/ + word-wrap: normal; + white-space: pre; + height: 100%; + width: 100%; + box-sizing: border-box; + /* setting pointer-events: auto; on node under the mouse, which changes + during scroll, will break mouse wheel scrolling in Safari */ + pointer-events: none; +} + +.ace_gutter-layer { + position: relative; + width: auto; + text-align: right; + pointer-events: auto; + height: 1000000px; + contain: style size layout; +} + +.ace_text-layer { + font: inherit !important; + position: absolute; + height: 1000000px; + width: 1000000px; + contain: style size layout; +} + +.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group { + contain: style size layout; + position: absolute; + top: 0; + left: 0; + right: 0; +} + +.ace_hidpi .ace_text-layer, +.ace_hidpi .ace_gutter-layer, +.ace_hidpi .ace_content, +.ace_hidpi .ace_gutter { + contain: strict; +} +.ace_hidpi .ace_text-layer > .ace_line, +.ace_hidpi .ace_text-layer > .ace_line_group { + contain: strict; +} + +.ace_cjk { + display: inline-block; + text-align: center; +} + +.ace_cursor-layer { + z-index: 4; +} + +.ace_cursor { + z-index: 4; + position: absolute; + box-sizing: border-box; + border-left: 2px solid; + /* workaround for smooth cursor repaintng whole screen in chrome */ + transform: translatez(0); +} + +.ace_multiselect .ace_cursor { + border-left-width: 1px; +} + +.ace_slim-cursors .ace_cursor { + border-left-width: 1px; +} + +.ace_overwrite-cursors .ace_cursor { + border-left-width: 0; + border-bottom: 1px solid; +} + +.ace_hidden-cursors .ace_cursor { + opacity: 0.2; +} + +.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor { + opacity: 0; +} + +.ace_smooth-blinking .ace_cursor { + transition: opacity 0.18s; +} + +.ace_animate-blinking .ace_cursor { + animation-duration: 1000ms; + animation-timing-function: step-end; + animation-name: blink-ace-animate; + animation-iteration-count: infinite; +} + +.ace_animate-blinking.ace_smooth-blinking .ace_cursor { + animation-duration: 1000ms; + animation-timing-function: ease-in-out; + animation-name: blink-ace-animate-smooth; +} + +@keyframes blink-ace-animate { + from, to { opacity: 1; } + 60% { opacity: 0; } +} + +@keyframes blink-ace-animate-smooth { + from, to { opacity: 1; } + 45% { opacity: 1; } + 60% { opacity: 0; } + 85% { opacity: 0; } +} + +.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack { + position: absolute; + z-index: 3; +} + +.ace_marker-layer .ace_selection { + position: absolute; + z-index: 5; +} + +.ace_marker-layer .ace_bracket { + position: absolute; + z-index: 6; +} + +.ace_marker-layer .ace_error_bracket { + position: absolute; + border-bottom: 1px solid #DE5555; + border-radius: 0; +} + +.ace_marker-layer .ace_active-line { + position: absolute; + z-index: 2; +} + +.ace_marker-layer .ace_selected-word { + position: absolute; + z-index: 4; + box-sizing: border-box; +} + +.ace_line .ace_fold { + box-sizing: border-box; + + display: inline-block; + height: 11px; + margin-top: -2px; + vertical-align: middle; + + background-image: + url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), + url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII="); + background-repeat: no-repeat, repeat-x; + background-position: center center, top left; + color: transparent; + + border: 1px solid black; + border-radius: 2px; + + cursor: pointer; + pointer-events: auto; +} + +.ace_dark .ace_fold { +} + +.ace_fold:hover{ + background-image: + url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), + url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC"); +} + +.ace_tooltip { + background-color: #f5f5f5; + border: 1px solid gray; + border-radius: 1px; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); + color: black; + max-width: 100%; + padding: 3px 4px; + position: fixed; + z-index: 999999; + box-sizing: border-box; + cursor: default; + white-space: pre; + word-wrap: break-word; + line-height: normal; + font-style: normal; + font-weight: normal; + letter-spacing: normal; + pointer-events: none; +} + +.ace_tooltip.ace_dark { + background-color: #636363; + color: #fff; +} + +.ace_tooltip:focus { + outline: 1px solid #5E9ED6; +} + +.ace_icon { + display: inline-block; + width: 18px; + vertical-align: top; +} + +.ace_icon_svg { + display: inline-block; + width: 12px; + vertical-align: top; + -webkit-mask-repeat: no-repeat; + -webkit-mask-size: 12px; + -webkit-mask-position: center; +} + +.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons { + padding-right: 13px; +} + +.ace_fold-widget { + box-sizing: border-box; + + margin: 0 -12px 0 1px; + display: none; + width: 11px; + vertical-align: top; + + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg=="); + background-repeat: no-repeat; + background-position: center; + + border-radius: 3px; + + border: 1px solid transparent; + cursor: pointer; +} + +.ace_folding-enabled .ace_fold-widget { + display: inline-block; +} + +.ace_fold-widget.ace_end { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg=="); +} + +.ace_fold-widget.ace_closed { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA=="); +} + +.ace_fold-widget:hover { + border: 1px solid rgba(0, 0, 0, 0.3); + background-color: rgba(255, 255, 255, 0.2); + box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7); +} + +.ace_fold-widget:active { + border: 1px solid rgba(0, 0, 0, 0.4); + background-color: rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8); +} +/** + * Dark version for fold widgets + */ +.ace_dark .ace_fold-widget { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC"); +} +.ace_dark .ace_fold-widget.ace_end { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg=="); +} +.ace_dark .ace_fold-widget.ace_closed { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg=="); +} +.ace_dark .ace_fold-widget:hover { + box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); + background-color: rgba(255, 255, 255, 0.1); +} +.ace_dark .ace_fold-widget:active { + box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); +} + +.ace_inline_button { + border: 1px solid lightgray; + display: inline-block; + margin: -1px 8px; + padding: 0 5px; + pointer-events: auto; + cursor: pointer; +} +.ace_inline_button:hover { + border-color: gray; + background: rgba(200,200,200,0.2); + display: inline-block; + pointer-events: auto; +} + +.ace_fold-widget.ace_invalid { + background-color: #FFB4B4; + border-color: #DE5555; +} + +.ace_fade-fold-widgets .ace_fold-widget { + transition: opacity 0.4s ease 0.05s; + opacity: 0; +} + +.ace_fade-fold-widgets:hover .ace_fold-widget { + transition: opacity 0.05s ease 0.05s; + opacity:1; +} + +.ace_underline { + text-decoration: underline; +} + +.ace_bold { + font-weight: bold; +} + +.ace_nobold .ace_bold { + font-weight: normal; +} + +.ace_italic { + font-style: italic; +} + + +.ace_error-marker { + background-color: rgba(255, 0, 0,0.2); + position: absolute; + z-index: 9; +} + +.ace_highlight-marker { + background-color: rgba(255, 255, 0,0.2); + position: absolute; + z-index: 8; +} + +.ace_mobile-menu { + position: absolute; + line-height: 1.5; + border-radius: 4px; + -ms-user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + user-select: none; + background: white; + box-shadow: 1px 3px 2px grey; + border: 1px solid #dcdcdc; + color: black; +} +.ace_dark > .ace_mobile-menu { + background: #333; + color: #ccc; + box-shadow: 1px 3px 2px grey; + border: 1px solid #444; + +} +.ace_mobile-button { + padding: 2px; + cursor: pointer; + overflow: hidden; +} +.ace_mobile-button:hover { + background-color: #eee; + opacity:1; +} +.ace_mobile-button:active { + background-color: #ddd; +} + +.ace_placeholder { + font-family: arial; + transform: scale(0.9); + transform-origin: left; + white-space: pre; + opacity: 0.7; + margin: 0 10px; +} + +.ace_ghost_text { + opacity: 0.5; + font-style: italic; + white-space: pre; +} + +.ace_screenreader-only { + position:absolute; + left:-10000px; + top:auto; + width:1px; + height:1px; + overflow:hidden; +}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(n,r,o){var i=n("../lib/dom"),s=n("../lib/oop"),l=n("../lib/event_emitter").EventEmitter,a=function(){function u(c,d){this.canvas=i.createElement("canvas"),this.renderer=d,this.pixelRatio=1,this.maxHeight=d.layerConfig.maxHeight,this.lineHeight=d.layerConfig.lineHeight,this.canvasHeight=c.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=c.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},c.element.appendChild(this.canvas)}return u.prototype.$updateDecorators=function(c){var d=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(c){this.maxHeight=c.maxHeight,this.lineHeight=c.lineHeight,this.canvasHeight=c.height;var h=(c.lastRow+1)*this.lineHeight;hR.priority?1:0}var g=this.renderer.session.$annotations;if(f.clearRect(0,0,this.canvas.width,this.canvas.height),g){var m={info:1,warning:2,error:3};g.forEach(function(_){_.priority=m[_.type]||null}),g=g.sort(p);for(var v=this.renderer.session.$foldData,y=0;ythis.canvasHeight&&(C=this.canvasHeight-this.halfMinDecorationHeight),x=Math.round(C-this.halfMinDecorationHeight),S=Math.round(C+this.halfMinDecorationHeight)}f.fillStyle=d[g[y].type]||null,f.fillRect(0,k,this.canvasWidth,S-x)}}var O=this.renderer.session.selection.getCursor();if(O){var w=this.compensateFoldRows(O.row,v),k=Math.round((O.row-w)*this.lineHeight*this.heightRatio);f.fillStyle="rgba(0, 0, 0, 0.5)",f.fillRect(0,k,this.canvasWidth,2)}},u.prototype.compensateFoldRows=function(c,d){var h=0;if(d&&d.length>0)for(var f=0;fd[f].start.row&&c=d[f].end.row&&(h+=d[f].end.row-d[f].start.row);return h},u}();s.implement(a.prototype,l),r.Decorator=a}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent"],function(n,r,o){var i=n("./lib/oop"),s=n("./lib/dom"),l=n("./lib/lang"),a=n("./config"),u=n("./layer/gutter").Gutter,c=n("./layer/marker").Marker,d=n("./layer/text").Text,h=n("./layer/cursor").Cursor,f=n("./scrollbar").HScrollBar,p=n("./scrollbar").VScrollBar,g=n("./scrollbar_custom").HScrollBar,m=n("./scrollbar_custom").VScrollBar,v=n("./renderloop").RenderLoop,y=n("./layer/font_metrics").FontMetrics,b=n("./lib/event_emitter").EventEmitter,w=n("./css/editor-css"),k=n("./layer/decorators").Decorator,x=n("./lib/useragent");s.importCssString(w,"ace_editor.css",!1);var S=function(){function T(C,O){var _=this;this.container=C||s.createElement("div"),s.addCssClass(this.container,"ace_editor"),s.HI_DPI&&s.addCssClass(this.container,"ace_hidpi"),this.setTheme(O),a.get("useStrictCSP")==null&&a.set("useStrictCSP",!1),this.$gutter=s.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=s.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=s.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new u(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new c(this.content);var R=this.$textLayer=new d(this.content);this.canvas=R.element,this.$markerFront=new c(this.content),this.$cursorLayer=new h(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new p(this.container,this),this.scrollBarH=new f(this.container,this),this.scrollBarV.on("scroll",function(A){_.$scrollAnimation||_.session.setScrollTop(A.data-_.scrollMargin.top)}),this.scrollBarH.on("scroll",function(A){_.$scrollAnimation||_.session.setScrollLeft(A.data-_.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new y(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(A){_.updateCharacterSize(),_.onResize(!0,_.gutterWidth,_.$size.width,_.$size.height),_._signal("changeCharacterSize",A)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!x.isIOS,this.$loop=new v(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),a.resetOptions(this),a._signal("renderer",this)}return T.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),s.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},T.prototype.setSession=function(C){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=C,C&&this.scrollMargin.top&&C.getScrollTop()<=0&&C.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(C),this.$markerBack.setSession(C),this.$markerFront.setSession(C),this.$gutterLayer.setSession(C),this.$textLayer.setSession(C),C&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},T.prototype.updateLines=function(C,O,_){if(O===void 0&&(O=1/0),this.$changedLines?(this.$changedLines.firstRow>C&&(this.$changedLines.firstRow=C),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},T.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},T.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},T.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},T.prototype.updateFull=function(C){C?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},T.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},T.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},T.prototype.onResize=function(C,O,_,R){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=C?1:0;var A=this.container;R||(R=A.clientHeight||A.scrollHeight),_||(_=A.clientWidth||A.scrollWidth);var E=this.$updateCachedSize(C,O,_,R);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!_&&!R)return this.resizing=0;C&&(this.$gutterLayer.$padding=null),C?this.$renderChanges(E|this.$changes,!0):this.$loop.schedule(E|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},T.prototype.$updateCachedSize=function(C,O,_,R){R-=this.$extraHeight||0;var A=0,E=this.$size,M={width:E.width,height:E.height,scrollerHeight:E.scrollerHeight,scrollerWidth:E.scrollerWidth};if(R&&(C||E.height!=R)&&(E.height=R,A|=this.CHANGE_SIZE,E.scrollerHeight=E.height,this.$horizScroll&&(E.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(E.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",A=A|this.CHANGE_SCROLL),_&&(C||E.width!=_)){A|=this.CHANGE_SIZE,E.width=_,O==null&&(O=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=O,s.setStyle(this.scrollBarH.element.style,"left",O+"px"),s.setStyle(this.scroller.style,"left",O+this.margin.left+"px"),E.scrollerWidth=Math.max(0,_-O-this.scrollBarV.getWidth()-this.margin.h),s.setStyle(this.$gutter.style,"left",this.margin.left+"px");var I=this.scrollBarV.getWidth()+"px";s.setStyle(this.scrollBarH.element.style,"right",I),s.setStyle(this.scroller.style,"right",I),s.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(E.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||C)&&(A|=this.CHANGE_FULL)}return E.$dirty=!_||!R,A&&this._signal("resize",M),A},T.prototype.onGutterResize=function(C){var O=this.$showGutter?C:0;O!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,O,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},T.prototype.adjustWrapLimit=function(){var C=this.$size.scrollerWidth-this.$padding*2,O=Math.floor(C/this.characterWidth);return this.session.adjustWrapLimit(O,this.$showPrintMargin&&this.$printMarginColumn)},T.prototype.setAnimatedScroll=function(C){this.setOption("animatedScroll",C)},T.prototype.getAnimatedScroll=function(){return this.$animatedScroll},T.prototype.setShowInvisibles=function(C){this.setOption("showInvisibles",C),this.session.$bidiHandler.setShowInvisibles(C)},T.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},T.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},T.prototype.setDisplayIndentGuides=function(C){this.setOption("displayIndentGuides",C)},T.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},T.prototype.setHighlightIndentGuides=function(C){this.setOption("highlightIndentGuides",C)},T.prototype.setShowPrintMargin=function(C){this.setOption("showPrintMargin",C)},T.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},T.prototype.setPrintMarginColumn=function(C){this.setOption("printMarginColumn",C)},T.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},T.prototype.getShowGutter=function(){return this.getOption("showGutter")},T.prototype.setShowGutter=function(C){return this.setOption("showGutter",C)},T.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},T.prototype.setFadeFoldWidgets=function(C){this.setOption("fadeFoldWidgets",C)},T.prototype.setHighlightGutterLine=function(C){this.setOption("highlightGutterLine",C)},T.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},T.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var C=s.createElement("div");C.className="ace_layer ace_print-margin-layer",this.$printMarginEl=s.createElement("div"),this.$printMarginEl.className="ace_print-margin",C.appendChild(this.$printMarginEl),this.content.insertBefore(C,this.content.firstChild)}var O=this.$printMarginEl.style;O.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",O.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},T.prototype.getContainerElement=function(){return this.container},T.prototype.getMouseEventTarget=function(){return this.scroller},T.prototype.getTextAreaContainer=function(){return this.container},T.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var C=this.textarea.style,O=this.$composition;if(!this.$keepTextAreaAtCursor&&!O){s.translate(this.textarea,-100,0);return}var _=this.$cursorLayer.$pixelPos;if(_){O&&O.markerRange&&(_=this.$cursorLayer.getPixelPosition(O.markerRange.start,!0));var R=this.layerConfig,A=_.top,E=_.left;A-=R.offset;var M=O&&O.useTextareaForIME||x.isMobile?this.lineHeight:1;if(A<0||A>R.height-M){s.translate(this.textarea,0,0);return}var I=1,N=this.$size.height-M;if(!O)A+=this.lineHeight;else if(O.useTextareaForIME){var L=this.textarea.value;I=this.characterWidth*this.session.$getStringScreenWidth(L)[0]}else A+=this.lineHeight+2;E-=this.scrollLeft,E>this.$size.scrollerWidth-I&&(E=this.$size.scrollerWidth-I),E+=this.gutterWidth+this.margin.left,s.setStyle(C,"height",M+"px"),s.setStyle(C,"width",I+"px"),s.translate(this.textarea,Math.min(E,this.$size.scrollerWidth-I),Math.min(A,N))}}},T.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},T.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},T.prototype.getLastFullyVisibleRow=function(){var C=this.layerConfig,O=C.lastRow,_=this.session.documentToScreenRow(O,0)*C.lineHeight;return _-this.session.getScrollTop()>C.height-C.lineHeight?O-1:O},T.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},T.prototype.setPadding=function(C){this.$padding=C,this.$textLayer.setPadding(C),this.$cursorLayer.setPadding(C),this.$markerFront.setPadding(C),this.$markerBack.setPadding(C),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},T.prototype.setScrollMargin=function(C,O,_,R){var A=this.scrollMargin;A.top=C|0,A.bottom=O|0,A.right=R|0,A.left=_|0,A.v=A.top+A.bottom,A.h=A.left+A.right,A.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-A.top),this.updateFull()},T.prototype.setMargin=function(C,O,_,R){var A=this.margin;A.top=C|0,A.bottom=O|0,A.right=R|0,A.left=_|0,A.v=A.top+A.bottom,A.h=A.left+A.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},T.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},T.prototype.setHScrollBarAlwaysVisible=function(C){this.setOption("hScrollBarAlwaysVisible",C)},T.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},T.prototype.setVScrollBarAlwaysVisible=function(C){this.setOption("vScrollBarAlwaysVisible",C)},T.prototype.$updateScrollBarV=function(){var C=this.layerConfig.maxHeight,O=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(C-=(O-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>C-O&&(C=this.scrollTop+O,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(C+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},T.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},T.prototype.freeze=function(){this.$frozen=!0},T.prototype.unfreeze=function(){this.$frozen=!1},T.prototype.$renderChanges=function(C,O){if(this.$changes&&(C|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!C&&!O){this.$changes|=C;return}if(this.$size.$dirty)return this.$changes|=C,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",C),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var _=this.layerConfig;if(C&this.CHANGE_FULL||C&this.CHANGE_SIZE||C&this.CHANGE_TEXT||C&this.CHANGE_LINES||C&this.CHANGE_SCROLL||C&this.CHANGE_H_SCROLL){if(C|=this.$computeLayerConfig()|this.$loop.clear(),_.firstRow!=this.layerConfig.firstRow&&_.firstRowScreen==this.layerConfig.firstRowScreen){var R=this.scrollTop+(_.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;R>0&&(this.scrollTop=R,C=C|this.CHANGE_SCROLL,C|=this.$computeLayerConfig()|this.$loop.clear())}_=this.layerConfig,this.$updateScrollBarV(),C&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),s.translate(this.content,-this.scrollLeft,-_.offset);var A=_.width+2*this.$padding+"px",E=_.minHeight+"px";s.setStyle(this.content.style,"width",A),s.setStyle(this.content.style,"height",E)}if(C&this.CHANGE_H_SCROLL&&(s.translate(this.content,-this.scrollLeft,-_.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),C&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(_),this.$showGutter&&this.$gutterLayer.update(_),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(_),this.$markerBack.update(_),this.$markerFront.update(_),this.$cursorLayer.update(_),this.$moveTextAreaToCursor(),this._signal("afterRender",C);return}if(C&this.CHANGE_SCROLL){this.$changedLines=null,C&this.CHANGE_TEXT||C&this.CHANGE_LINES?this.$textLayer.update(_):this.$textLayer.scrollLines(_),this.$showGutter&&(C&this.CHANGE_GUTTER||C&this.CHANGE_LINES?this.$gutterLayer.update(_):this.$gutterLayer.scrollLines(_)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(_),this.$markerBack.update(_),this.$markerFront.update(_),this.$cursorLayer.update(_),this.$moveTextAreaToCursor(),this._signal("afterRender",C);return}C&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(_),this.$showGutter&&this.$gutterLayer.update(_),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(_)):C&this.CHANGE_LINES?((this.$updateLines()||C&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(_),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(_)):C&this.CHANGE_TEXT||C&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(_),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(_)):C&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(_),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(_)),C&this.CHANGE_CURSOR&&(this.$cursorLayer.update(_),this.$moveTextAreaToCursor()),C&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(_),C&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(_),this._signal("afterRender",C)},T.prototype.$autosize=function(){var C=this.session.getScreenLength()*this.lineHeight,O=this.$maxLines*this.lineHeight,_=Math.min(O,Math.max((this.$minLines||1)*this.lineHeight,C))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(_+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&_>this.$maxPixelHeight&&(_=this.$maxPixelHeight);var R=_<=2*this.lineHeight,A=!R&&C>O;if(_!=this.desiredHeight||this.$size.height!=this.desiredHeight||A!=this.$vScroll){A!=this.$vScroll&&(this.$vScroll=A,this.scrollBarV.setVisible(A));var E=this.container.clientWidth;this.container.style.height=_+"px",this.$updateCachedSize(!0,this.$gutterWidth,E,_),this.desiredHeight=_,this._signal("autosize")}},T.prototype.$computeLayerConfig=function(){var C=this.session,O=this.$size,_=O.height<=2*this.lineHeight,R=this.session.getScreenLength(),A=R*this.lineHeight,E=this.$getLongestLine(),M=!_&&(this.$hScrollBarAlwaysVisible||O.scrollerWidth-E-2*this.$padding<0),I=this.$horizScroll!==M;I&&(this.$horizScroll=M,this.scrollBarH.setVisible(M));var N=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var L=O.scrollerHeight+this.lineHeight,$=!this.$maxLines&&this.$scrollPastEnd?(O.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;A+=$;var D=this.scrollMargin;this.session.setScrollTop(Math.max(-D.top,Math.min(this.scrollTop,A-O.scrollerHeight+D.bottom))),this.session.setScrollLeft(Math.max(-D.left,Math.min(this.scrollLeft,E+2*this.$padding-O.scrollerWidth+D.right)));var F=!_&&(this.$vScrollBarAlwaysVisible||O.scrollerHeight-A+$<0||this.scrollTop>D.top),U=N!==F;U&&(this.$vScroll=F,this.scrollBarV.setVisible(F));var W=this.scrollTop%this.lineHeight,B=Math.ceil(L/this.lineHeight)-1,H=Math.max(0,Math.round((this.scrollTop-W)/this.lineHeight)),V=H+B,Y,X,Z=this.lineHeight;H=C.screenToDocumentRow(H,0);var te=C.getFoldLine(H);te&&(H=te.start.row),Y=C.documentToScreenRow(H,0),X=C.getRowLength(H)*Z,V=Math.min(C.screenToDocumentRow(V,0),C.getLength()-1),L=O.scrollerHeight+C.getRowLength(V)*Z+X,W=this.scrollTop-Y*Z;var ce=0;return(this.layerConfig.width!=E||I)&&(ce=this.CHANGE_H_SCROLL),(I||U)&&(ce|=this.$updateCachedSize(!0,this.gutterWidth,O.width,O.height),this._signal("scrollbarVisibilityChanged"),U&&(E=this.$getLongestLine())),this.layerConfig={width:E,padding:this.$padding,firstRow:H,firstRowScreen:Y,lastRow:V,lineHeight:Z,characterWidth:this.characterWidth,minHeight:L,maxHeight:A,offset:W,gutterOffset:Z?Math.max(0,Math.ceil((W+O.height-O.scrollerHeight)/Z)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(E-this.$padding),ce},T.prototype.$updateLines=function(){if(this.$changedLines){var C=this.$changedLines.firstRow,O=this.$changedLines.lastRow;this.$changedLines=null;var _=this.layerConfig;if(!(C>_.lastRow+1)&&!(O<_.firstRow)){if(O===1/0){this.$showGutter&&this.$gutterLayer.update(_),this.$textLayer.update(_);return}return this.$textLayer.updateLines(_,C,O),!0}}},T.prototype.$getLongestLine=function(){var C=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(C+=1),this.$textLayer&&C>this.$textLayer.MAX_LINE_LENGTH&&(C=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(C*this.characterWidth))},T.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},T.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},T.prototype.addGutterDecoration=function(C,O){this.$gutterLayer.addGutterDecoration(C,O)},T.prototype.removeGutterDecoration=function(C,O){this.$gutterLayer.removeGutterDecoration(C,O)},T.prototype.updateBreakpoints=function(C){this.$loop.schedule(this.CHANGE_GUTTER)},T.prototype.setAnnotations=function(C){this.$gutterLayer.setAnnotations(C),this.$loop.schedule(this.CHANGE_GUTTER)},T.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},T.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},T.prototype.showCursor=function(){this.$cursorLayer.showCursor()},T.prototype.scrollSelectionIntoView=function(C,O,_){this.scrollCursorIntoView(C,_),this.scrollCursorIntoView(O,_)},T.prototype.scrollCursorIntoView=function(C,O,_){if(this.$size.scrollerHeight!==0){var R=this.$cursorLayer.getPixelPosition(C),A=R.left,E=R.top,M=_&&_.top||0,I=_&&_.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var N=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;N+M>E?(O&&N+M>E+this.lineHeight&&(E-=O*this.$size.scrollerHeight),E===0&&(E=-this.scrollMargin.top),this.session.setScrollTop(E)):N+this.$size.scrollerHeight-I=1-this.scrollMargin.top||O>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||C<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||C>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},T.prototype.pixelToScreenCoordinates=function(C,O){var _;if(this.$hasCssTransforms){_={top:0,left:0};var R=this.$fontMetrics.transformCoordinates([C,O]);C=R[1]-this.gutterWidth-this.margin.left,O=R[0]}else _=this.scroller.getBoundingClientRect();var A=C+this.scrollLeft-_.left-this.$padding,E=A/this.characterWidth,M=Math.floor((O+this.scrollTop-_.top)/this.lineHeight),I=this.$blockCursor?Math.floor(E):Math.round(E);return{row:M,column:I,side:E-I>0?1:-1,offsetX:A}},T.prototype.screenToTextCoordinates=function(C,O){var _;if(this.$hasCssTransforms){_={top:0,left:0};var R=this.$fontMetrics.transformCoordinates([C,O]);C=R[1]-this.gutterWidth-this.margin.left,O=R[0]}else _=this.scroller.getBoundingClientRect();var A=C+this.scrollLeft-_.left-this.$padding,E=A/this.characterWidth,M=this.$blockCursor?Math.floor(E):Math.round(E),I=Math.floor((O+this.scrollTop-_.top)/this.lineHeight);return this.session.screenToDocumentPosition(I,Math.max(M,0),A)},T.prototype.textToScreenCoordinates=function(C,O){var _=this.scroller.getBoundingClientRect(),R=this.session.documentToScreenPosition(C,O),A=this.$padding+(this.session.$bidiHandler.isBidiRow(R.row,C)?this.session.$bidiHandler.getPosLeft(R.column):Math.round(R.column*this.characterWidth)),E=R.row*this.lineHeight;return{pageX:_.left+A-this.scrollLeft,pageY:_.top+E-this.scrollTop}},T.prototype.visualizeFocus=function(){s.addCssClass(this.container,"ace_focus")},T.prototype.visualizeBlur=function(){s.removeCssClass(this.container,"ace_focus")},T.prototype.showComposition=function(C){this.$composition=C,C.cssText||(C.cssText=this.textarea.style.cssText),C.useTextareaForIME==null&&(C.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(s.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):C.markerId=this.session.addMarker(C.markerRange,"ace_composition_marker","text")},T.prototype.setCompositionText=function(C){var O=this.session.selection.cursor;this.addToken(C,"composition_placeholder",O.row,O.column),this.$moveTextAreaToCursor()},T.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),s.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var C=this.session.selection.cursor;this.removeExtraToken(C.row,C.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},T.prototype.setGhostText=function(C,O){var _=this.session.selection.cursor,R=O||{row:_.row,column:_.column};this.removeGhostText();var A=C.split(` +`);this.addToken(A[0],"ghost_text",R.row,R.column),this.$ghostText={text:C,position:{row:R.row,column:R.column}},A.length>1&&(this.$ghostTextWidget={text:A.slice(1).join(` +`),row:R.row,column:R.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget))},T.prototype.removeGhostText=function(){if(this.$ghostText){var C=this.$ghostText.position;this.removeExtraToken(C.row,C.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},T.prototype.addToken=function(C,O,_,R){var A=this.session;A.bgTokenizer.lines[_]=null;var E={type:O,value:C},M=A.getTokens(_);if(R==null||!M.length)M.push(E);else for(var I=0,N=0;N1||Math.abs(C.$size.height-R)>1?C.$resizeTimer.delay():C.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},T}();S.prototype.CHANGE_CURSOR=1,S.prototype.CHANGE_MARKER=2,S.prototype.CHANGE_GUTTER=4,S.prototype.CHANGE_SCROLL=8,S.prototype.CHANGE_LINES=16,S.prototype.CHANGE_TEXT=32,S.prototype.CHANGE_SIZE=64,S.prototype.CHANGE_MARKER_BACK=128,S.prototype.CHANGE_MARKER_FRONT=256,S.prototype.CHANGE_FULL=512,S.prototype.CHANGE_H_SCROLL=1024,S.prototype.$changes=0,S.prototype.$padding=null,S.prototype.$frozen=!1,S.prototype.STEPS=8,i.implement(S.prototype,b),a.defineOptions(S.prototype,"renderer",{useResizeObserver:{set:function(T){!T&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):T&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(T){this.$textLayer.setShowInvisibles(T)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(T){typeof T=="number"&&(this.$printMarginColumn=T),this.$showPrintMargin=!!T,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(T){this.$gutter.style.display=T?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(T){this.$gutterLayer.$useSvgGutterIcons=T},initialValue:!1},showFoldedAnnotations:{set:function(T){this.$gutterLayer.$showFoldedAnnotations=T},initialValue:!1},fadeFoldWidgets:{set:function(T){s.setCssClass(this.$gutter,"ace_fade-fold-widgets",T)},initialValue:!1},showFoldWidgets:{set:function(T){this.$gutterLayer.setShowFoldWidgets(T),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(T){this.$textLayer.setDisplayIndentGuides(T)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(T){this.$textLayer.setHighlightIndentGuides(T)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(T){this.$gutterLayer.setHighlightGutterLine(T),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(T){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(T){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(T){typeof T=="number"&&(T=T+"px"),this.container.style.fontSize=T,this.updateFontSize()},initialValue:12},fontFamily:{set:function(T){this.container.style.fontFamily=T,this.updateFontSize()}},maxLines:{set:function(T){this.updateFull()}},minLines:{set:function(T){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(T){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(T){T=+T||0,this.$scrollPastEnd!=T&&(this.$scrollPastEnd=T,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(T){this.$gutterLayer.$fixedWidth=!!T,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(T){this.$updateCustomScrollbar(T)},initialValue:!1},theme:{set:function(T){this.setTheme(T)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!x.isMobile&&!x.isIE}}),r.VirtualRenderer=S}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/net"),l=n("../lib/event_emitter").EventEmitter,a=n("../config");function u(f){var p="importScripts('"+s.qualifyURL(f)+"');";try{return new Blob([p],{type:"application/javascript"})}catch{var g=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,m=new g;return m.append(p),m.getBlob("application/javascript")}}function c(f){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var p=u(f),g=window.URL||window.webkitURL,m=g.createObjectURL(p);return new Worker(m)}return new Worker(f)}var d=function(f){f.postMessage||(f=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=f,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){i.implement(this,l),this.$createWorkerFromOldConfig=function(f,p,g,m,v){if(n.nameToUrl&&!n.toUrl&&(n.toUrl=n.nameToUrl),a.get("packaged")||!n.toUrl)m=m||a.moduleUrl(p,"worker");else{var y=this.$normalizePath;m=m||y(n.toUrl("ace/worker/worker.js",null,"_"));var b={};f.forEach(function(w){b[w]=y(n.toUrl(w,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=c(m),v&&this.send("importScripts",v),this.$worker.postMessage({init:!0,tlns:b,module:p,classname:g}),this.$worker},this.onMessage=function(f){var p=f.data;switch(p.type){case"event":this._signal(p.name,{data:p.data});break;case"call":var g=this.callbacks[p.id];g&&(g(p.data),delete this.callbacks[p.id]);break;case"error":this.reportError(p.data);break;case"log":window.console&&console.log&&console.log.apply(console,p.data);break}},this.reportError=function(f){window.console&&console.error&&console.error(f)},this.$normalizePath=function(f){return s.qualifyURL(f)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(f){f.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(f,p){this.$worker.postMessage({command:f,args:p})},this.call=function(f,p,g){if(g){var m=this.callbackId++;this.callbacks[m]=g,p.push(m)}this.send(f,p)},this.emit=function(f,p){try{p.data&&p.data.err&&(p.data.err={message:p.data.err.message,stack:p.data.err.stack,code:p.data.err.code}),this.$worker&&this.$worker.postMessage({event:f,data:{data:p.data}})}catch(g){console.error(g.stack)}},this.attachToDocument=function(f){this.$doc&&this.terminate(),this.$doc=f,this.call("setValue",[f.getValue()]),f.on("change",this.changeListener,!0)},this.changeListener=function(f){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),f.action=="insert"?this.deltaQueue.push(f.start,f.lines):this.deltaQueue.push(f.start,f.end)},this.$sendDeltaQueue=function(){var f=this.deltaQueue;f&&(this.deltaQueue=null,f.length>50&&f.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:f}))}}).call(d.prototype);var h=function(f,p,g){var m=null,v=!1,y=Object.create(l),b=[],w=new d({messageBuffer:b,terminate:function(){},postMessage:function(x){b.push(x),m&&(v?setTimeout(k):k())}});w.setEmitSync=function(x){v=x};var k=function(){var x=b.shift();x.command?m[x.command].apply(m,x.args):x.event&&y._signal(x.event,x.data)};return y.postMessage=function(x){w.onMessage({data:x})},y.callback=function(x,S){this.postMessage({type:"call",id:S,data:x})},y.emit=function(x,S){this.postMessage({type:"event",name:x,data:S})},a.loadModule(["worker",p],function(x){for(m=new x[g](y);b.length;)k()}),w};r.UIWorkerClient=h,r.WorkerClient=d,r.createWorker=c}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(n,r,o){var i=n("./range").Range,s=n("./lib/event_emitter").EventEmitter,l=n("./lib/oop"),a=function(){function u(c,d,h,f,p,g){var m=this;this.length=d,this.session=c,this.doc=c.getDocument(),this.mainClass=p,this.othersClass=g,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=f,this.$onCursorChange=function(){setTimeout(function(){m.onCursorChange()})},this.$pos=h;var v=c.getUndoManager().$undoStack||c.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=v.length,this.setup(),c.selection.on("changeCursor",this.$onCursorChange)}return u.prototype.setup=function(){var c=this,d=this.doc,h=this.session;this.selectionBefore=h.selection.toJSON(),h.selection.inMultiSelectMode&&h.selection.toSingleRange(),this.pos=d.createAnchor(this.$pos.row,this.$pos.column);var f=this.pos;f.$insertRight=!0,f.detach(),f.markerId=h.addMarker(new i(f.row,f.column,f.row,f.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(p){var g=d.createAnchor(p.row,p.column);g.$insertRight=!0,g.detach(),c.others.push(g)}),h.setUndoSelect(!1)},u.prototype.showOtherMarkers=function(){if(!this.othersActive){var c=this.session,d=this;this.othersActive=!0,this.others.forEach(function(h){h.markerId=c.addMarker(new i(h.row,h.column,h.row,h.column+d.length),d.othersClass,null,!1)})}},u.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var c=0;c=this.pos.column&&d.start.column<=this.pos.column+this.length+1,p=d.start.column-this.pos.column;if(this.updateAnchors(c),f&&(this.length+=h),f&&!this.session.$fromUndo){if(c.action==="insert")for(var g=this.others.length-1;g>=0;g--){var m=this.others[g],v={row:m.row,column:m.column+p};this.doc.insertMergedLines(v,c.lines)}else if(c.action==="remove")for(var g=this.others.length-1;g>=0;g--){var m=this.others[g],v={row:m.row,column:m.column+p};this.doc.remove(new i(v.row,v.column,v.row,v.column-h))}}this.$updating=!1,this.updateMarkers()}},u.prototype.updateAnchors=function(c){this.pos.onChange(c);for(var d=this.others.length;d--;)this.others[d].onChange(c);this.updateMarkers()},u.prototype.updateMarkers=function(){if(!this.$updating){var c=this,d=this.session,h=function(p,g){d.removeMarker(p.markerId),p.markerId=d.addMarker(new i(p.row,p.column,p.row,p.column+c.length),g,null,!1)};h(this.pos,this.mainClass);for(var f=this.others.length;f--;)h(this.others[f],this.othersClass)}},u.prototype.onCursorChange=function(c){if(!(this.$updating||!this.session)){var d=this.session.selection.getCursor();d.row===this.pos.row&&d.column>=this.pos.column&&d.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",c)):(this.hideOtherMarkers(),this._emit("cursorLeave",c))}},u.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},u.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var c=this.session.getUndoManager(),d=(c.$undoStack||c.$undostack).length-this.$undoStackDepth,h=0;h1?s.multiSelect.joinSelections():s.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(s){s.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(s){s.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(s){s.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],r.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(s){s.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(s){return s&&s.inMultiSelectMode}}];var i=n("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new i(r.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(n,r,o){var i=n("./range_list").RangeList,s=n("./range").Range,l=n("./selection").Selection,a=n("./mouse/multi_select_handler").onMouseDown,u=n("./lib/event"),c=n("./lib/lang"),d=n("./commands/multi_select_commands");r.commands=d.defaultCommands.concat(d.multiSelectCommands);var h=n("./search").Search,f=new h;function p(w,k,x){return f.$options.wrap=!0,f.$options.needle=k,f.$options.backwards=x==-1,f.find(w)}var g=n("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(g.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(w,k){if(w){if(!this.inMultiSelectMode&&this.rangeCount===0){var x=this.toOrientedRange();if(this.rangeList.add(x),this.rangeList.add(w),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),k||this.fromOrientedRange(w);this.rangeList.removeAll(),this.rangeList.add(x),this.$onAddRange(x)}w.cursor||(w.cursor=w.end);var S=this.rangeList.add(w);return this.$onAddRange(w),S.length&&this.$onRemoveRange(S),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),k||this.fromOrientedRange(w)}},this.toSingleRange=function(w){w=w||this.ranges[0];var k=this.rangeList.removeAll();k.length&&this.$onRemoveRange(k),w&&this.fromOrientedRange(w)},this.substractPoint=function(w){var k=this.rangeList.substractPoint(w);if(k)return this.$onRemoveRange(k),k[0]},this.mergeOverlappingRanges=function(){var w=this.rangeList.merge();w.length&&this.$onRemoveRange(w)},this.$onAddRange=function(w){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(w),this._signal("addRange",{range:w})},this.$onRemoveRange=function(w){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var k=this.rangeList.ranges.pop();w.push(k),this.rangeCount=0}for(var x=w.length;x--;){var S=this.ranges.indexOf(w[x]);this.ranges.splice(S,1)}this._signal("removeRange",{ranges:w}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),k=k||this.ranges[0],k&&!k.isEqual(this.getRange())&&this.fromOrientedRange(k)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new i,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var w=this.ranges.length?this.ranges:[this.getRange()],k=[],x=0;x1){var w=this.rangeList.ranges,k=w[w.length-1],x=s.fromPoints(w[0].start,k.end);this.toSingleRange(),this.setSelectionRange(x,k.cursor==k.start)}else{var S=this.session.documentToScreenPosition(this.cursor),T=this.session.documentToScreenPosition(this.anchor),C=this.rectangularRangeBlock(S,T);C.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(w,k,x){var S=[],T=w.column0;)$--;if($>0)for(var D=0;S[D].isEmpty();)D++;for(var F=$;F>=D;F--)S[F].isEmpty()&&S.splice(F,1)}return S}}).call(l.prototype);var m=n("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(w){w.cursor||(w.cursor=w.end);var k=this.getSelectionStyle();return w.marker=this.session.addMarker(w,"ace_selection",k),this.session.$selectionMarkers.push(w),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,w},this.removeSelectionMarker=function(w){if(w.marker){this.session.removeMarker(w.marker);var k=this.session.$selectionMarkers.indexOf(w);k!=-1&&this.session.$selectionMarkers.splice(k,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(w){for(var k=this.session.$selectionMarkers,x=w.length;x--;){var S=w[x];if(S.marker){this.session.removeMarker(S.marker);var T=k.indexOf(S);T!=-1&&k.splice(T,1)}}this.session.selectionMarkerCount=k.length},this.$onAddRange=function(w){this.addSelectionMarker(w.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(w){this.removeSelectionMarkers(w.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(w){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(d.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(w){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(d.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(w){var k=w.command,x=w.editor;if(x.multiSelect){if(k.multiSelectAction)k.multiSelectAction=="forEach"?S=x.forEachSelection(k,w.args):k.multiSelectAction=="forEachLine"?S=x.forEachSelection(k,w.args,!0):k.multiSelectAction=="single"?(x.exitMultiSelectMode(),S=k.exec(x,w.args||{})):S=k.multiSelectAction(x,w.args||{});else{var S=k.exec(x,w.args||{});x.multiSelect.addRange(x.multiSelect.toOrientedRange()),x.multiSelect.mergeOverlappingRanges()}return S}},this.forEachSelection=function(w,k,x){if(!this.inVirtualSelectionMode){var S=x&&x.keepOrder,T=x==!0||x&&x.$byLines,C=this.session,O=this.selection,_=O.rangeList,R=(S?O:_).ranges,A;if(!R.length)return w.exec?w.exec(this,k||{}):w(this,k||{});var E=O._eventRegistry;O._eventRegistry={};var M=new l(C);this.inVirtualSelectionMode=!0;for(var I=R.length;I--;){if(T)for(;I>0&&R[I].start.row==R[I-1].end.row;)I--;M.fromOrientedRange(R[I]),M.index=I,this.selection=C.selection=M;var N=w.exec?w.exec(this,k||{}):w(this,k||{});!A&&N!==void 0&&(A=N),M.toOrientedRange(R[I])}M.detach(),this.selection=C.selection=O,this.inVirtualSelectionMode=!1,O._eventRegistry=E,O.mergeOverlappingRanges(),O.ranges[0]&&O.fromOrientedRange(O.ranges[0]);var L=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),L&&L.from==L.to&&this.renderer.animateScrolling(L.from),A}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var w="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var k=this.multiSelect.rangeList.ranges,x=[],S=0;S0);O<0&&(O=0),_>=A&&(_=A-1)}var M=this.session.removeFullLines(O,_);M=this.$reAlignText(M,R),this.session.insert({row:O,column:0},M.join(` +`)+` +`),R||(C.start.column=0,C.end.column=M[M.length-1].length),this.selection.setRange(C)}else{T.forEach(function($){k.substractPoint($.cursor)});var I=0,N=1/0,L=x.map(function($){var D=$.cursor,F=w.getLine(D.row),U=F.substr(D.column).search(/\S/g);return U==-1&&(U=0),D.column>I&&(I=D.column),UW?w.insert(F,c.stringRepeat(" ",U-W)):w.remove(new s(F.row,F.column,F.row,F.column-U+W)),$.start.column=$.end.column=I,$.start.row=$.end.row=F.row,$.cursor=$.end}),k.fromOrientedRange(x[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(w,k){var x=!0,S=!0,T,C,O;return w.map(function(M){var I=M.match(/(\s*)(.*?)(\s*)([=:].*)/);return I?T==null?(T=I[1].length,C=I[2].length,O=I[3].length,I):(T+C+O!=I[1].length+I[2].length+I[3].length&&(S=!1),T!=I[1].length&&(x=!1),T>I[1].length&&(T=I[1].length),CI[3].length&&(O=I[3].length),I):[M]}).map(k?R:x?S?A:R:E);function _(M){return c.stringRepeat(" ",M)}function R(M){return M[2]?_(T)+M[2]+_(C-M[2].length+O)+M[4].replace(/^([=:])\s+/,"$1 "):M[0]}function A(M){return M[2]?_(T+C-M[2].length)+M[2]+_(O)+M[4].replace(/^([=:])\s+/,"$1 "):M[0]}function E(M){return M[2]?_(T)+M[2]+_(O)+M[4].replace(/^([=:])\s+/,"$1 "):M[0]}}}).call(m.prototype);function v(w,k){return w.row==k.row&&w.column==k.column}r.onSessionChange=function(w){var k=w.session;k&&!k.multiSelect&&(k.$selectionMarkers=[],k.selection.$initRangeList(),k.multiSelect=k.selection),this.multiSelect=k&&k.multiSelect;var x=w.oldSession;x&&(x.multiSelect.off("addRange",this.$onAddRange),x.multiSelect.off("removeRange",this.$onRemoveRange),x.multiSelect.off("multiSelect",this.$onMultiSelect),x.multiSelect.off("singleSelect",this.$onSingleSelect),x.multiSelect.lead.off("change",this.$checkMultiselectChange),x.multiSelect.anchor.off("change",this.$checkMultiselectChange)),k&&(k.multiSelect.on("addRange",this.$onAddRange),k.multiSelect.on("removeRange",this.$onRemoveRange),k.multiSelect.on("multiSelect",this.$onMultiSelect),k.multiSelect.on("singleSelect",this.$onSingleSelect),k.multiSelect.lead.on("change",this.$checkMultiselectChange),k.multiSelect.anchor.on("change",this.$checkMultiselectChange)),k&&this.inMultiSelectMode!=k.selection.inMultiSelectMode&&(k.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function y(w){w.$multiselectOnSessionChange||(w.$onAddRange=w.$onAddRange.bind(w),w.$onRemoveRange=w.$onRemoveRange.bind(w),w.$onMultiSelect=w.$onMultiSelect.bind(w),w.$onSingleSelect=w.$onSingleSelect.bind(w),w.$multiselectOnSessionChange=r.onSessionChange.bind(w),w.$checkMultiselectChange=w.$checkMultiselectChange.bind(w),w.$multiselectOnSessionChange(w),w.on("changeSession",w.$multiselectOnSessionChange),w.on("mousedown",a),w.commands.addCommands(d.defaultCommands),b(w))}function b(w){if(!w.textInput)return;var k=w.textInput.getElement(),x=!1;u.addListener(k,"keydown",function(T){var C=T.keyCode==18&&!(T.ctrlKey||T.shiftKey||T.metaKey);w.$blockSelectEnabled&&C?x||(w.renderer.setMouseCursor("crosshair"),x=!0):x&&S()},w),u.addListener(k,"keyup",S,w),u.addListener(k,"blur",S,w);function S(T){x&&(w.renderer.setMouseCursor(""),x=!1)}}r.MultiSelect=y,n("./config").defineOptions(m.prototype,"editor",{enableMultiselect:{set:function(w){y(this),w?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function(w){this.$blockSelectEnabled=w},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(n,r,o){var i=n("../../range").Range,s=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(l,a,u){var c=l.getLine(u);return this.foldingStartMarker.test(c)?"start":a=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(c)?"end":""},this.getFoldWidgetRange=function(l,a,u){return null},this.indentationBlock=function(l,a,u){var c=/\S/,d=l.getLine(a),h=d.search(c);if(h!=-1){for(var f=u||d.length,p=l.getLength(),g=a,m=a;++ag){var b=l.getLine(m).length;return new i(g,f,m,b)}}},this.openingBracketBlock=function(l,a,u,c,d){var h={row:u,column:c+1},f=l.$findClosingBracket(a,h,d);if(f){var p=l.foldWidgets[f.row];return p==null&&(p=l.getFoldWidget(f.row)),p=="start"&&f.row>h.row&&(f.row--,f.column=l.getLine(f.row).length),i.fromPoints(h,f)}},this.closingBracketBlock=function(l,a,u,c,d){var h={row:u,column:c},f=l.$findOpeningBracket(a,h);if(f)return f.column++,h.column--,i.fromPoints(f,h)}}).call(s.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(n,r,o){var i=n("../line_widgets").LineWidgets,s=n("../lib/dom"),l=n("../range").Range,a=n("../config").nls;function u(d,h,f){for(var p=0,g=d.length-1;p<=g;){var m=p+g>>1,v=f(h,d[m]);if(v>0)p=m+1;else if(v<0)g=m-1;else return m}return-(p+1)}function c(d,h,f){var p=d.getAnnotations().sort(l.comparePoints);if(p.length){var g=u(p,{row:h,column:-1},l.comparePoints);g<0&&(g=-g-1),g>=p.length?g=f>0?0:p.length-1:g===0&&f<0&&(g=p.length-1);var m=p[g];if(!(!m||!f)){if(m.row===h){do m=p[g+=f];while(m&&m.row===h);if(!m)return p.slice()}var v=[];h=m.row;do v[f<0?"unshift":"push"](m),m=p[g+=f];while(m&&m.row==h);return v.length&&v}}}r.showErrorMarker=function(d,h){var f=d.session;f.widgetManager||(f.widgetManager=new i(f),f.widgetManager.attach(d));var p=d.getCursorPosition(),g=p.row,m=f.widgetManager.getWidgetsAtRow(g).filter(function(C){return C.type=="errorMarker"})[0];m?m.destroy():g-=h;var v=c(f,g,h),y;if(v){var b=v[0];p.column=(b.pos&&typeof b.column!="number"?b.pos.sc:b.column)||0,p.row=b.row,y=d.renderer.$gutterLayer.$annotations[p.row]}else{if(m)return;y={text:[a("Looks good!")],className:"ace_ok"}}d.session.unfold(p.row),d.selection.moveToPosition(p);var w={row:p.row,fixedWidth:!0,coverGutter:!0,el:s.createElement("div"),type:"errorMarker"},k=w.el.appendChild(s.createElement("div")),x=w.el.appendChild(s.createElement("div"));x.className="error_widget_arrow "+y.className;var S=d.renderer.$cursorLayer.getPixelPosition(p).left;x.style.left=S+d.renderer.gutterWidth-5+"px",w.el.className="error_widget_wrapper",k.className="error_widget "+y.className,k.innerHTML=y.text.join("
    "),k.appendChild(s.createElement("div"));var T=function(C,O,_){if(O===0&&(_==="esc"||_==="return"))return w.destroy(),{command:"null"}};w.destroy=function(){d.$mouseHandler.isMousePressed||(d.keyBinding.removeKeyboardHandler(T),f.widgetManager.removeLineWidget(w),d.off("changeSelection",w.destroy),d.off("changeSession",w.destroy),d.off("mouseup",w.destroy),d.off("change",w.destroy))},d.keyBinding.addKeyboardHandler(T),d.on("changeSelection",w.destroy),d.on("changeSession",w.destroy),d.on("mouseup",w.destroy),d.on("change",w.destroy),d.session.widgetManager.addLineWidget(w),w.el.onmousedown=d.focus.bind(d),d.renderer.scrollCursorIntoView(null,.5,{bottom:w.el.offsetHeight})},s.importCssString(` + .error_widget_wrapper { + background: inherit; + color: inherit; + border:none + } + .error_widget { + border-top: solid 2px; + border-bottom: solid 2px; + margin: 5px 0; + padding: 10px 40px; + white-space: pre-wrap; + } + .error_widget.ace_error, .error_widget_arrow.ace_error{ + border-color: #ff5a5a + } + .error_widget.ace_warning, .error_widget_arrow.ace_warning{ + border-color: #F1D817 + } + .error_widget.ace_info, .error_widget_arrow.ace_info{ + border-color: #5a5a5a + } + .error_widget.ace_ok, .error_widget_arrow.ace_ok{ + border-color: #5aaa5a + } + .error_widget_arrow { + position: absolute; + border: solid 5px; + border-top-color: transparent!important; + border-right-color: transparent!important; + border-left-color: transparent!important; + top: -5px; + } +`,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(n,r,o){n("./loader_build")(r);var i=n("./lib/dom"),s=n("./range").Range,l=n("./editor").Editor,a=n("./edit_session").EditSession,u=n("./undomanager").UndoManager,c=n("./virtual_renderer").VirtualRenderer;n("./worker/worker_client"),n("./keyboard/hash_handler"),n("./placeholder"),n("./multi_select"),n("./mode/folding/fold_mode"),n("./theme/textmate"),n("./ext/error_marker"),r.config=n("./config"),r.edit=function(d,h){if(typeof d=="string"){var f=d;if(d=document.getElementById(f),!d)throw new Error("ace.edit can't find div #"+f)}if(d&&d.env&&d.env.editor instanceof l)return d.env.editor;var p="";if(d&&/input|textarea/i.test(d.tagName)){var g=d;p=g.value,d=i.createElement("pre"),g.parentNode.replaceChild(d,g)}else d&&(p=d.textContent,d.innerHTML="");var m=r.createEditSession(p),v=new l(new c(d),m,h),y={document:m,editor:v,onResize:v.resize.bind(v,null)};return g&&(y.textarea=g),v.on("destroy",function(){y.editor.container.env=null}),v.container.env=v.env=y,v},r.createEditSession=function(d,h){var f=new a(d,h);return f.setUndoManager(new u),f},r.Range=s,r.Editor=l,r.EditSession=a,r.UndoManager=u,r.VirtualRenderer=c,r.version=r.config.version}),function(){ace.require(["ace/ace"],function(n){n&&(n.config.init(!0),n.define=ace.define);var r=function(){return this}();!r&&typeof window<"u"&&(r=window),!r&&typeof self<"u"&&(r=self),r.ace||(r.ace=n);for(var o in n)n.hasOwnProperty(o)&&(r.ace[o]=n[o]);r.ace.default=r.ace,t&&(t.exports=r.ace)})}()})(h$);var Jg=h$.exports,em={exports:{}};em.exports;(function(t,e){var n=200,r="__lodash_hash_undefined__",o=1,i=2,s=9007199254740991,l="[object Arguments]",a="[object Array]",u="[object AsyncFunction]",c="[object Boolean]",d="[object Date]",h="[object Error]",f="[object Function]",p="[object GeneratorFunction]",g="[object Map]",m="[object Number]",v="[object Null]",y="[object Object]",b="[object Promise]",w="[object Proxy]",k="[object RegExp]",x="[object Set]",S="[object String]",T="[object Symbol]",C="[object Undefined]",O="[object WeakMap]",_="[object ArrayBuffer]",R="[object DataView]",A="[object Float32Array]",E="[object Float64Array]",M="[object Int8Array]",I="[object Int16Array]",N="[object Int32Array]",L="[object Uint8Array]",$="[object Uint8ClampedArray]",D="[object Uint16Array]",F="[object Uint32Array]",U=/[\\^$.*+?()[\]{}|]/g,W=/^\[object .+?Constructor\]$/,B=/^(?:0|[1-9]\d*)$/,H={};H[A]=H[E]=H[M]=H[I]=H[N]=H[L]=H[$]=H[D]=H[F]=!0,H[l]=H[a]=H[_]=H[c]=H[R]=H[d]=H[h]=H[f]=H[g]=H[m]=H[y]=H[k]=H[x]=H[S]=H[O]=!1;var V=typeof ut=="object"&&ut&&ut.Object===Object&&ut,Y=typeof self=="object"&&self&&self.Object===Object&&self,X=V||Y||Function("return this")(),Z=e&&!e.nodeType&&e,te=Z&&!0&&t&&!t.nodeType&&t,ce=te&&te.exports===Z,Ne=ce&&V.process,ye=function(){try{return Ne&&Ne.binding&&Ne.binding("util")}catch{}}(),Me=ye&&ye.isTypedArray;function Ce(z,G){for(var J=-1,fe=z==null?0:z.length,Ct=0,De=[];++J-1}function Bv(z,G){var J=this.__data__,fe=mf(J,z);return fe<0?(++this.size,J.push([z,G])):J[fe][1]=G,this}eo.prototype.clear=pf,eo.prototype.delete=Pv,eo.prototype.get=zv,eo.prototype.has=Fv,eo.prototype.set=Bv;function $e(z){var G=-1,J=z==null?0:z.length;for(this.clear();++Gpn))return!1;var $t=De.get(z);if($t&&De.get(G))return $t==G;var Ir=-1,To=!0,Fn=J&i?new gf:void 0;for(De.set(z,G),De.set(G,z);++Ir-1&&z%1==0&&z-1&&z%1==0&&z<=s}function jE(z){var G=typeof z;return z!=null&&(G=="object"||G=="function")}function ku(z){return z!=null&&typeof z=="object"}var GE=Me?qn(Me):B$;function e4(z){return Q$(z)?D$(z):H$(z)}function t4(){return[]}function n4(){return!1}t.exports=J$})(em,em.exports);var f$=em.exports,zo={};Object.defineProperty(zo,"__esModule",{value:!0});zo.getAceInstance=zo.debounce=zo.editorEvents=zo.editorOptions=void 0;var Tfe=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];zo.editorOptions=Tfe;var Afe=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];zo.editorEvents=Afe;var _fe=function(){var t;return typeof window>"u"?(ut.window={},t=Jg,delete ut.window):window.ace?(t=window.ace,t.acequire=window.ace.require||window.ace.acequire):t=Jg,t};zo.getAceInstance=_fe;var Rfe=function(t,e){var n=null;return function(){var r=this,o=arguments;clearTimeout(n),n=setTimeout(function(){t.apply(r,o)},e)}};zo.debounce=Rfe;var Mfe=ut&&ut.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),rb=ut&&ut.__assign||function(){return rb=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&this.handleMarkers(x);var O=this.editor.$options;tc.editorOptions.forEach(function(_){O.hasOwnProperty(_)?n.editor.setOption(_,n.props[_]):n.props[_]&&console.warn("ReactAce: editor option ".concat(_," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}),this.handleOptions(this.props),Array.isArray(w)&&w.forEach(function(_){typeof _.exec=="string"?n.editor.commands.bindKey(_.bindKey,_.exec):n.editor.commands.addCommand(_)}),y&&this.editor.setKeyboardHandler("ace/keyboard/"+y),o&&(this.refEditor.className+=" "+o),b&&b(this.editor),this.editor.resize(),a&&this.editor.focus()},e.prototype.componentDidUpdate=function(n){for(var r=n,o=this.props,i=0;i 0!";if(d!=this.$splits){if(d>this.$splits){for(;this.$splitsd;)h=this.$editors[this.$splits-1],this.$container.removeChild(h.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(d){return this.$editors[d]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(d){this.$editors.forEach(function(h){h.setTheme(d)})},this.setKeyboardHandler=function(d){this.$editors.forEach(function(h){h.setKeyboardHandler(d)})},this.forEach=function(d,h){this.$editors.forEach(d,h)},this.$fontSize="",this.setFontSize=function(d){this.$fontSize=d,this.forEach(function(h){h.setFontSize(d)})},this.$cloneSession=function(d){var h=new u(d.getDocument(),d.getMode()),f=d.getUndoManager();return h.setUndoManager(f),h.setTabSize(d.getTabSize()),h.setUseSoftTabs(d.getUseSoftTabs()),h.setOverwrite(d.getOverwrite()),h.setBreakpoints(d.getBreakpoints()),h.setUseWrapMode(d.getUseWrapMode()),h.setUseWorker(d.getUseWorker()),h.setWrapLimitRange(d.$wrapLimitRange.min,d.$wrapLimitRange.max),h.$foldData=d.$cloneFoldData(),h},this.setSession=function(d,h){var f;h==null?f=this.$cEditor:f=this.$editors[h];var p=this.$editors.some(function(g){return g.session===d});return p&&(d=this.$cloneSession(d)),f.setSession(d),d},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(d){this.$orientation!=d&&(this.$orientation=d,this.resize())},this.resize=function(){var d=this.$container.clientWidth,h=this.$container.clientHeight,f;if(this.$orientation==this.BESIDE)for(var p=d/this.$splits,g=0;g-1}function cpe(t,e){var n=this.__data__,r=Mv(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}yu.prototype.clear=ipe;yu.prototype.delete=spe;yu.prototype.get=ape;yu.prototype.has=lpe;yu.prototype.set=cpe;function Cl(t){var e=-1,n=t?t.length:0;for(this.clear();++e0&&n.handleMarkers(L,R);for(var E=0;E"u"&&(this.Diff_Timeout<=0?a=Number.MAX_VALUE:a=new Date().getTime()+this.Diff_Timeout*1e3);var u=a;if(i==null||s==null)throw new Error("Null input. (diff_main)");if(i==s)return i?[new e.Diff(o,i)]:[];typeof l>"u"&&(l=!0);var c=l,d=this.diff_commonPrefix(i,s),h=i.substring(0,d);i=i.substring(d),s=s.substring(d),d=this.diff_commonSuffix(i,s);var f=i.substring(i.length-d);i=i.substring(0,i.length-d),s=s.substring(0,s.length-d);var p=this.diff_compute_(i,s,c,u);return h&&p.unshift(new e.Diff(o,h)),f&&p.push(new e.Diff(o,f)),this.diff_cleanupMerge(p),p},e.prototype.diff_compute_=function(i,s,l,a){var u;if(!i)return[new e.Diff(r,s)];if(!s)return[new e.Diff(n,i)];var c=i.length>s.length?i:s,d=i.length>s.length?s:i,h=c.indexOf(d);if(h!=-1)return u=[new e.Diff(r,c.substring(0,h)),new e.Diff(o,d),new e.Diff(r,c.substring(h+d.length))],i.length>s.length&&(u[0][0]=u[2][0]=n),u;if(d.length==1)return[new e.Diff(n,i),new e.Diff(r,s)];var f=this.diff_halfMatch_(i,s);if(f){var p=f[0],g=f[1],m=f[2],v=f[3],y=f[4],b=this.diff_main(p,m,l,a),w=this.diff_main(g,v,l,a);return b.concat([new e.Diff(o,y)],w)}return l&&i.length>100&&s.length>100?this.diff_lineMode_(i,s,a):this.diff_bisect_(i,s,a)},e.prototype.diff_lineMode_=function(i,s,l){var a=this.diff_linesToChars_(i,s);i=a.chars1,s=a.chars2;var u=a.lineArray,c=this.diff_main(i,s,!1,l);this.diff_charsToLines_(c,u),this.diff_cleanupSemantic(c),c.push(new e.Diff(o,""));for(var d=0,h=0,f=0,p="",g="";d=1&&f>=1){c.splice(d-h-f,h+f),d=d-h-f;for(var m=this.diff_main(p,g,!1,l),v=m.length-1;v>=0;v--)c.splice(d,0,m[v]);d=d+m.length}f=0,h=0,p="",g="";break}d++}return c.pop(),c},e.prototype.diff_bisect_=function(i,s,l){for(var a=i.length,u=s.length,c=Math.ceil((a+u)/2),d=c,h=2*c,f=new Array(h),p=new Array(h),g=0;gl);x++){for(var S=-x+y;S<=x-b;S+=2){var T=d+S,C;S==-x||S!=x&&f[T-1]a)b+=2;else if(O>u)y+=2;else if(v){var _=d+m-S;if(_>=0&&_=R)return this.diff_bisectSplit_(i,s,C,O,l)}}}for(var A=-x+w;A<=x-k;A+=2){var _=d+A,R;A==-x||A!=x&&p[_-1]a)k+=2;else if(E>u)w+=2;else if(!v){var T=d+m-A;if(T>=0&&T=R)return this.diff_bisectSplit_(i,s,C,O,l)}}}}return[new e.Diff(n,i),new e.Diff(r,s)]},e.prototype.diff_bisectSplit_=function(i,s,l,a,u){var c=i.substring(0,l),d=s.substring(0,a),h=i.substring(l),f=s.substring(a),p=this.diff_main(c,d,!1,u),g=this.diff_main(h,f,!1,u);return p.concat(g)},e.prototype.diff_linesToChars_=function(i,s){var l=[],a={};l[0]="";function u(f){for(var p="",g=0,m=-1,v=l.length;ma?i=i.substring(l-a):ls.length?i:s,a=i.length>s.length?s:i;if(l.length<4||a.length*2=b.length?[C,O,_,R,T]:null}var d=c(l,a,Math.ceil(l.length/4)),h=c(l,a,Math.ceil(l.length/2)),f;if(!d&&!h)return null;h?d?f=d[4].length>h[4].length?d:h:f=h:f=d;var p,g,m,v;i.length>s.length?(p=f[0],g=f[1],m=f[2],v=f[3]):(m=f[0],v=f[1],p=f[2],g=f[3]);var y=f[4];return[p,g,m,v,y]},e.prototype.diff_cleanupSemantic=function(i){for(var s=!1,l=[],a=0,u=null,c=0,d=0,h=0,f=0,p=0;c0?l[a-1]:-1,d=0,h=0,f=0,p=0,u=null,s=!0)),c++;for(s&&this.diff_cleanupMerge(i),this.diff_cleanupSemanticLossless(i),c=1;c=y?(v>=g.length/2||v>=m.length/2)&&(i.splice(c,0,new e.Diff(o,m.substring(0,v))),i[c-1][1]=g.substring(0,g.length-v),i[c+1][1]=m.substring(v),c++):(y>=g.length/2||y>=m.length/2)&&(i.splice(c,0,new e.Diff(o,g.substring(0,y))),i[c-1][0]=r,i[c-1][1]=m.substring(0,m.length-y),i[c+1][0]=n,i[c+1][1]=g.substring(y),c++),c++}c++}},e.prototype.diff_cleanupSemanticLossless=function(i){function s(y,b){if(!y||!b)return 6;var w=y.charAt(y.length-1),k=b.charAt(0),x=w.match(e.nonAlphaNumericRegex_),S=k.match(e.nonAlphaNumericRegex_),T=x&&w.match(e.whitespaceRegex_),C=S&&k.match(e.whitespaceRegex_),O=T&&w.match(e.linebreakRegex_),_=C&&k.match(e.linebreakRegex_),R=O&&y.match(e.blanklineEndRegex_),A=_&&b.match(e.blanklineStartRegex_);return R||A?5:O||_?4:x&&!T&&C?3:T||C?2:x||S?1:0}for(var l=1;l=m&&(m=v,f=a,p=u,g=c)}i[l-1][1]!=f&&(f?i[l-1][1]=f:(i.splice(l-1,1),l--),i[l][1]=p,g?i[l+1][1]=g:(i.splice(l+1,1),l--))}l++}},e.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,e.whitespaceRegex_=/\s/,e.linebreakRegex_=/[\r\n]/,e.blanklineEndRegex_=/\n\r?\n$/,e.blanklineStartRegex_=/^\r?\n\r?\n/,e.prototype.diff_cleanupEfficiency=function(i){for(var s=!1,l=[],a=0,u=null,c=0,d=!1,h=!1,f=!1,p=!1;c0?l[a-1]:-1,f=p=!1),s=!0)),c++;s&&this.diff_cleanupMerge(i)},e.prototype.diff_cleanupMerge=function(i){i.push(new e.Diff(o,""));for(var s=0,l=0,a=0,u="",c="",d;s1?(l!==0&&a!==0&&(d=this.diff_commonPrefix(c,u),d!==0&&(s-l-a>0&&i[s-l-a-1][0]==o?i[s-l-a-1][1]+=c.substring(0,d):(i.splice(0,0,new e.Diff(o,c.substring(0,d))),s++),c=c.substring(d),u=u.substring(d)),d=this.diff_commonSuffix(c,u),d!==0&&(i[s][1]=c.substring(c.length-d)+i[s][1],c=c.substring(0,c.length-d),u=u.substring(0,u.length-d))),s-=l+a,i.splice(s,l+a),u.length&&(i.splice(s,0,new e.Diff(n,u)),s++),c.length&&(i.splice(s,0,new e.Diff(r,c)),s++),s++):s!==0&&i[s-1][0]==o?(i[s-1][1]+=i[s][1],i.splice(s,1)):s++,a=0,l=0,u="",c="";break}i[i.length-1][1]===""&&i.pop();var h=!1;for(s=1;ss));d++)u=l,c=a;return i.length!=d&&i[d][0]===n?c:c+(s-u)},e.prototype.diff_prettyHtml=function(i){for(var s=[],l=/&/g,a=//g,c=/\n/g,d=0;d");switch(h){case r:s[d]=''+p+"";break;case n:s[d]=''+p+"";break;case o:s[d]=""+p+"";break}}return s.join("")},e.prototype.diff_text1=function(i){for(var s=[],l=0;lthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var a=this.match_alphabet_(s),u=this;function c(C,O){var _=C/s.length,R=Math.abs(l-O);return u.Match_Distance?_+R/u.Match_Distance:R?1:_}var d=this.Match_Threshold,h=i.indexOf(s,l);h!=-1&&(d=Math.min(c(0,h),d),h=i.lastIndexOf(s,l+s.length),h!=-1&&(d=Math.min(c(0,h),d)));var f=1<=b;x--){var S=a[i.charAt(x-1)];if(y===0?k[x]=(k[x+1]<<1|1)&S:k[x]=(k[x+1]<<1|1)&S|((v[x+1]|v[x])<<1|1)|v[x+1],k[x]&f){var T=c(y,x-1);if(T<=d)if(d=T,h=x-1,h>l)b=Math.max(1,2*l-h);else break}}if(c(y+1,l)>d)break;v=k}return h},e.prototype.match_alphabet_=function(i){for(var s={},l=0;l"u")a=i,u=this.diff_main(a,s,!0),u.length>2&&(this.diff_cleanupSemantic(u),this.diff_cleanupEfficiency(u));else if(i&&typeof i=="object"&&typeof s>"u"&&typeof l>"u")u=i,a=this.diff_text1(u);else if(typeof i=="string"&&s&&typeof s=="object"&&typeof l>"u")a=i,u=s;else if(typeof i=="string"&&typeof s=="string"&&l&&typeof l=="object")a=i,u=l;else throw new Error("Unknown call format to patch_make.");if(u.length===0)return[];for(var c=[],d=new e.patch_obj,h=0,f=0,p=0,g=a,m=a,v=0;v=2*this.Patch_Margin&&h&&(this.patch_addContext_(d,g),c.push(d),d=new e.patch_obj,h=0,g=m,f=p);break}y!==r&&(f+=b.length),y!==n&&(p+=b.length)}return h&&(this.patch_addContext_(d,g),c.push(d)),c},e.prototype.patch_deepCopy=function(i){for(var s=[],l=0;lthis.Match_MaxBits?(f=this.match_main(s,h.substring(0,this.Match_MaxBits),d),f!=-1&&(p=this.match_main(s,h.substring(h.length-this.Match_MaxBits),d+h.length-this.Match_MaxBits),(p==-1||f>=p)&&(f=-1))):f=this.match_main(s,h,d),f==-1)u[c]=!1,a-=i[c].length2-i[c].length1;else{u[c]=!0,a=f-d;var g;if(p==-1?g=s.substring(f,f+h.length):g=s.substring(f,p+this.Match_MaxBits),h==g)s=s.substring(0,f)+this.diff_text2(i[c].diffs)+s.substring(f+h.length);else{var m=this.diff_main(h,g,!1);if(h.length>this.Match_MaxBits&&this.diff_levenshtein(m)/h.length>this.Patch_DeleteThreshold)u[c]=!1;else{this.diff_cleanupSemanticLossless(m);for(var v=0,y,b=0;bc[0][1].length){var d=s-c[0][1].length;c[0][1]=l.substring(c[0][1].length)+c[0][1],u.start1-=d,u.start2-=d,u.length1+=d,u.length2+=d}if(u=i[i.length-1],c=u.diffs,c.length==0||c[c.length-1][0]!=o)c.push(new e.Diff(o,l)),u.length1+=s,u.length2+=s;else if(s>c[c.length-1][1].length){var d=s-c[c.length-1][1].length;c[c.length-1][1]+=l.substring(0,d),u.length1+=d,u.length2+=d}return l},e.prototype.patch_splitMax=function(i){for(var s=this.Match_MaxBits,l=0;l2*s?(h.length1+=g.length,u+=g.length,f=!1,h.diffs.push(new e.Diff(p,g)),a.diffs.shift()):(g=g.substring(0,s-h.length1-this.Patch_Margin),h.length1+=g.length,u+=g.length,p===o?(h.length2+=g.length,c+=g.length):f=!1,h.diffs.push(new e.Diff(p,g)),g==a.diffs[0][1]?a.diffs.shift():a.diffs[0][1]=a.diffs[0][1].substring(g.length))}d=this.diff_text2(h.diffs),d=d.substring(d.length-this.Patch_Margin);var m=this.diff_text1(a.diffs).substring(0,this.Patch_Margin);m!==""&&(h.length1+=m.length,h.length2+=m.length,h.diffs.length!==0&&h.diffs[h.diffs.length-1][0]===o?h.diffs[h.diffs.length-1][1]+=m:h.diffs.push(new e.Diff(o,m))),f||i.splice(++l,0,h)}}},e.prototype.patch_toText=function(i){for(var s=[],l=0;l/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function\\*?)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:a},{regex:"",token:"empty",next:"no_regex"}],start:[s.getStartRule("doc-start"),d("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[d("function_arguments"),{token:"variable.parameter",regex:a},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!h||!h.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(m,v,y){if(this.next=m=="{"?this.nextState:"",m=="{"&&y.length)y.unshift("start",v);else if(m=="}"&&y.length&&(y.shift(),this.next=y.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return m=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:g},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+a+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=.+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!h||h.jsx!=!1)&&c.call(this)),this.embedRules(s,"doc-",[s.getEndRule("no_regex")]),this.normalizeRules()};i.inherits(u,l);function c(){var h=a.replace("\\d","\\d\\-"),f={onMatch:function(g,m,v){var y=g.charAt(1)=="/"?2:1;return y==1?(m!=this.nextState?v.unshift(this.next,this.nextState,0):v.unshift(this.next),v[2]++):y==2&&m==this.nextState&&(v[1]--,(!v[1]||v[1]<0)&&(v.shift(),v.shift())),[{type:"meta.tag.punctuation."+(y==1?"":"end-")+"tag-open.xml",value:g.slice(0,y)},{type:"meta.tag.tag-name.xml",value:g.substr(y)}]},regex:"",onMatch:function(g,m,v){return m==v[0]&&v.shift(),g.length==2&&(v[0]==this.nextState&&v[1]--,(!v[1]||v[1]<0)&&v.splice(0,2)),this.next=v[0]||"start",[{type:this.token,value:g}]},nextState:"jsx"},p,d("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:h},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},f],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function d(h){return[{token:"comment",regex:/\/\*/,next:[s.getTagRule(),{token:"comment",regex:"\\*\\/",next:h||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[s.getTagRule(),{token:"comment",regex:"$|^",next:h||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}r.JavaScriptHighlightRules=u}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("./text_highlight_rules").TextHighlightRules,l=function(a){var u="[_:a-zA-ZÀ-￿][-_:.a-zA-Z0-9À-￿]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+u+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+u+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:u},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===l&&this.normalizeRules()};(function(){this.embedTagRules=function(a,u,c){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+c+".tag-name.xml"],regex:"(<)("+c+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:u+"start"}]}),this.$rules[c+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(d,h,f){return f.splice(0),this.token}}],this.embedRules(a,u,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+c+".tag-name.xml"],regex:"(|$))",next:c+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(s.prototype),i.inherits(l,s),r.XmlHighlightRules=l}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/lang"),l=n("./css_highlight_rules").CssHighlightRules,a=n("./javascript_highlight_rules").JavaScriptHighlightRules,u=n("./xml_highlight_rules").XmlHighlightRules,c=s.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),d=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(h,f){var p=c[f];return["meta.tag.punctuation."+(h=="<"?"":"end-")+"tag-open.xml","meta.tag"+(p?"."+p:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(l,"css-","style"),this.embedTagRules(new a({jsx:!1}).getRules(),"js-","script"),this.constructor===d&&this.normalizeRules()};i.inherits(d,u),r.HtmlHighlightRules=d}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(n,r,o){var i=n("../config").$modes,s=n("../lib/oop"),l=n("../lib/lang"),a=n("./text_highlight_rules").TextHighlightRules,u=n("./html_highlight_rules").HtmlHighlightRules,c=function(h){return"(?:[^"+l.escapeRegExp(h)+"\\\\]|\\\\.)*"},d=function(){u.call(this);var h={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(p,g,m,v){var y=p.match(/^(\s*)([`~]+)(.*)/),b=/[\w-]+|$/.exec(y[3])[0];return i[b]||(b=""),m.unshift("githubblock",[],[y[1],y[2],b],g),this.token},next:"githubblock"},f=[{token:"support.function",regex:".*",onMatch:function(p,g,m,v){var y=m[1],b=m[2][0],w=m[2][1],k=m[2][2],x=/^(\s*)(`+|~+)\s*$/.exec(p);if(x&&x[1].length=w.length&&x[2][0]==w[0])return m.splice(0,3),this.next=m.shift(),this.token;if(this.next="",k&&i[k]){var S=i[k].getTokenizer().getLineTokens(p,y.slice(0));return m[1]=S.state,S.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(p){return"markup.heading."+p.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},h,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+c("]")+")(\\]\\s*\\[)("+c("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+c("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+c('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:`(<)((?:https?|ftp|dict):[^'">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)`}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},h,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:f}),this.normalizeRules()};s.inherits(d,a),r.MarkdownHighlightRules=d}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(n,r,o){var i=n("../../lib/oop"),s=n("./fold_mode").FoldMode,l=n("../../range").Range,a=r.FoldMode=function(){};i.inherits(a,s),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(u,c,d){var h=u.getLine(d);return this.foldingStartMarker.test(h)?h[0]=="`"&&u.bgTokenizer.getState(d)=="start"?"end":"start":""},this.getFoldWidgetRange=function(u,c,d){var h=u.getLine(d),f=h.length,p=u.getLength(),g=d,m=d;if(!h.match(this.foldingStartMarker))return;if(h[0]=="`")if(u.bgTokenizer.getState(d)!=="start"){for(;++d0&&(h=u.getLine(d),!(h[0]=="`"&h.substring(0,3)=="```")););return new l(d,h.length,g,0)}var v;function y(T){return v=u.getTokens(T)[0],v&&v.type.lastIndexOf(b,0)===0}var b="markup.heading";function w(){var T=v.value[0];return T=="="?6:T=="-"?5:7-v.value.search(/[^#]|$/)}if(y(d)){for(var k=w();++d=k)break}if(m=d-(!v||["=","-"].indexOf(v.value[0])==-1?1:2),m>g)for(;m>g&&/^\s*$/.test(u.getLine(m));)m--;if(m>g){var S=u.getLine(m).length;return new l(g,f,m,S)}}}}).call(a.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,r,o){var i=n("../range").Range,s=function(){};(function(){this.checkOutdent=function(l,a){return/^\s+$/.test(l)?/^\s*\}/.test(a):!1},this.autoOutdent=function(l,a){var u=l.getLine(a),c=u.match(/^(\s*\})/);if(!c)return 0;var d=c[1].length,h=l.findMatchingBracket({row:a,column:d});if(!h||h.row==a)return 0;var f=this.$getIndent(l.getLine(h.row));l.replace(new i(a,0,a,d-1),f)},this.$getIndent=function(l){return l.match(/^\s*/)[0]}}).call(s.prototype),r.MatchingBraceOutdent=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,r,o){var i=n("../../lib/oop"),s=n("../../range").Range,l=n("./fold_mode").FoldMode,a=r.FoldMode=function(u){u&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+u.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+u.end)))};i.inherits(a,l),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(u,c,d){var h=u.getLine(d);if(this.singleLineBlockCommentRe.test(h)&&!this.startRegionRe.test(h)&&!this.tripleStarBlockCommentRe.test(h))return"";var f=this._getFoldWidgetBase(u,c,d);return!f&&this.startRegionRe.test(h)?"start":f},this.getFoldWidgetRange=function(u,c,d,h){var f=u.getLine(d);if(this.startRegionRe.test(f))return this.getCommentRegionBlock(u,f,d);var m=f.match(this.foldingStartMarker);if(m){var p=m.index;if(m[1])return this.openingBracketBlock(u,m[1],d,p);var g=u.getCommentFoldRange(d,p+m[0].length,1);return g&&!g.isMultiLine()&&(h?g=this.getSectionRange(u,d):c!="all"&&(g=null)),g}if(c!=="markbegin"){var m=f.match(this.foldingStopMarker);if(m){var p=m.index+m[0].length;return m[1]?this.closingBracketBlock(u,m[1],d,p):u.getCommentFoldRange(d,p,-1)}}},this.getSectionRange=function(u,c){var d=u.getLine(c),h=d.search(/\S/),f=c,p=d.length;c=c+1;for(var g=c,m=u.getLength();++cv)break;var y=this.getFoldWidgetRange(u,"all",c);if(y){if(y.start.row<=f)break;if(y.isMultiLine())c=y.end.row;else if(h==v)break}g=c}}return new s(f,p,g,u.getLine(g).length)},this.getCommentRegionBlock=function(u,c,d){for(var h=c.search(/\s*$/),f=u.getLength(),p=d,g=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++dp)return new s(p,h,y,c.length)}}).call(a.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(n,r,o){var i=n("../lib/oop"),s=n("./text").Mode,l=n("./javascript_highlight_rules").JavaScriptHighlightRules,a=n("./matching_brace_outdent").MatchingBraceOutdent,u=n("../worker/worker_client").WorkerClient,c=n("./behaviour/cstyle").CstyleBehaviour,d=n("./folding/cstyle").FoldMode,h=function(){this.HighlightRules=l,this.$outdent=new a,this.$behaviour=new c,this.foldingRules=new d};i.inherits(h,s),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(f,p,g){var m=this.$getIndent(p),v=this.getTokenizer().getLineTokens(p,f),y=v.tokens,b=v.state;if(y.length&&y[y.length-1].type=="comment")return m;if(f=="start"||f=="no_regex"){var w=p.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);w&&(m+=g)}else if(f=="doc-start"){if(b=="start"||b=="no_regex")return"";var w=p.match(/^\s*(\/?)\*/);w&&(w[1]&&(m+=" "),m+="* ")}return m},this.checkOutdent=function(f,p,g){return this.$outdent.checkOutdent(p,g)},this.autoOutdent=function(f,p,g){this.$outdent.autoOutdent(p,g)},this.createWorker=function(f){var p=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return p.attachToDocument(f.getDocument()),p.on("annotate",function(g){f.setAnnotations(g.data)}),p.on("terminate",function(){f.clearAnnotations()}),p},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(h.prototype),r.Mode=h}),ace.define("ace/mode/css_completions",["require","exports","module"],function(n,r,o){var i={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},s=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var l=document.createElement("c").style;for(var a in l)if(typeof l[a]=="string"){var u=a.replace(/[A-Z]/g,function(c){return"-"+c.toLowerCase()});i.hasOwnProperty(u)||(i[u]=1)}}this.completionsDefined=!0},this.getCompletions=function(l,a,u,c){if(this.completionsDefined||this.defineCompletions(),l==="ruleset"||a.$mode.$id=="ace/mode/scss"){var d=a.getLine(u.row).substr(0,u.column),h=/\([^)]*$/.test(d);return h&&(d=d.substr(d.lastIndexOf("(")+1)),/:[^;]+$/.test(d)?this.getPropertyValueCompletions(l,a,u,c):this.getPropertyCompletions(l,a,u,c,h)}return[]},this.getPropertyCompletions=function(l,a,u,c,d){d=d||!1;var h=Object.keys(i);return h.map(function(f){return{caption:f,snippet:f+": $0"+(d?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(l,a,u,c){var d=a.getLine(u.row).substr(0,u.column),h=(/([\w\-]+):[^:]*$/.exec(d)||{})[1];if(!h)return[];var f=[];return h in i&&typeof i[h]=="object"&&(f=Object.keys(i[h])),f.map(function(p){return{caption:p,snippet:p,meta:"property value",score:1e6}})}}).call(s.prototype),r.CssCompletions=s}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(n,r,o){var i=n("../../lib/oop");n("../behaviour").Behaviour;var s=n("./cstyle").CstyleBehaviour,l=n("../../token_iterator").TokenIterator,a=function(){this.inherit(s),this.add("colon","insertion",function(u,c,d,h,f){if(f===":"&&d.selection.isEmpty()){var p=d.getCursorPosition(),g=new l(h,p.row,p.column),m=g.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=g.stepBackward()),m&&m.type==="support.type"){var v=h.doc.getLine(p.row),y=v.substring(p.column,p.column+1);if(y===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(v.substring(p.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(u,c,d,h,f){var p=h.doc.getTextRange(f);if(!f.isMultiLine()&&p===":"){var g=d.getCursorPosition(),m=new l(h,g.row,g.column),v=m.getCurrentToken();if(v&&v.value.match(/\s+/)&&(v=m.stepBackward()),v&&v.type==="support.type"){var y=h.doc.getLine(f.start.row),b=y.substring(f.end.column,f.end.column+1);if(b===";")return f.end.column++,f}}}),this.add("semicolon","insertion",function(u,c,d,h,f){if(f===";"&&d.selection.isEmpty()){var p=d.getCursorPosition(),g=h.doc.getLine(p.row),m=g.substring(p.column,p.column+1);if(m===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(u,c,d,h,f){if(f==="!"&&d.selection.isEmpty()){var p=d.getCursorPosition(),g=h.doc.getLine(p.row);if(/^\s*(;|}|$)/.test(g.substring(p.column)))return{text:"!important",selection:[10,10]}}})};i.inherits(a,s),r.CssBehaviour=a}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(n,r,o){var i=n("../lib/oop"),s=n("./text").Mode,l=n("./css_highlight_rules").CssHighlightRules,a=n("./matching_brace_outdent").MatchingBraceOutdent,u=n("../worker/worker_client").WorkerClient,c=n("./css_completions").CssCompletions,d=n("./behaviour/css").CssBehaviour,h=n("./folding/cstyle").FoldMode,f=function(){this.HighlightRules=l,this.$outdent=new a,this.$behaviour=new d,this.$completer=new c,this.foldingRules=new h};i.inherits(f,s),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(p,g,m){var v=this.$getIndent(g),y=this.getTokenizer().getLineTokens(g,p).tokens;if(y.length&&y[y.length-1].type=="comment")return v;var b=g.match(/^.*\{\s*$/);return b&&(v+=m),v},this.checkOutdent=function(p,g,m){return this.$outdent.checkOutdent(g,m)},this.autoOutdent=function(p,g,m){this.$outdent.autoOutdent(g,m)},this.getCompletions=function(p,g,m,v){return this.$completer.getCompletions(p,g,m,v)},this.createWorker=function(p){var g=new u(["ace"],"ace/mode/css_worker","Worker");return g.attachToDocument(p.getDocument()),g.on("annotate",function(m){p.setAnnotations(m.data)}),g.on("terminate",function(){p.clearAnnotations()}),g},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(f.prototype),r.Mode=f}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,r,o){var i=n("../../lib/oop"),s=n("../behaviour").Behaviour,l=n("../../token_iterator").TokenIterator;n("../../lib/lang");function a(c,d){return c&&c.type.lastIndexOf(d+".xml")>-1}var u=function(){this.add("string_dquotes","insertion",function(c,d,h,f,p){if(p=='"'||p=="'"){var g=p,m=f.doc.getTextRange(h.getSelectionRange());if(m!==""&&m!=="'"&&m!='"'&&h.getWrapBehavioursEnabled())return{text:g+m+g,selection:!1};var v=h.getCursorPosition(),y=f.doc.getLine(v.row),b=y.substring(v.column,v.column+1),w=new l(f,v.row,v.column),k=w.getCurrentToken();if(b==g&&(a(k,"attribute-value")||a(k,"string")))return{text:"",selection:[1,1]};if(k||(k=w.stepBackward()),!k)return;for(;a(k,"tag-whitespace")||a(k,"whitespace");)k=w.stepBackward();var x=!b||b.match(/\s/);if(a(k,"attribute-equals")&&(x||b==">")||a(k,"decl-attribute-equals")&&(x||b=="?"))return{text:g+g,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(c,d,h,f,p){var g=f.doc.getTextRange(p);if(!p.isMultiLine()&&(g=='"'||g=="'")){var m=f.doc.getLine(p.start.row),v=m.substring(p.start.column+1,p.start.column+2);if(v==g)return p.end.column++,p}}),this.add("autoclosing","insertion",function(c,d,h,f,p){if(p==">"){var g=h.getSelectionRange().start,m=new l(f,g.row,g.column),v=m.getCurrentToken()||m.stepBackward();if(!v||!(a(v,"tag-name")||a(v,"tag-whitespace")||a(v,"attribute-name")||a(v,"attribute-equals")||a(v,"attribute-value"))||a(v,"reference.attribute-value"))return;if(a(v,"attribute-value")){var y=m.getCurrentTokenColumn()+v.value.length;if(g.column/.test(f.getLine(g.row).slice(g.column)))return;for(;!a(v,"tag-name");)if(v=m.stepBackward(),v.value=="<"){v=m.stepForward();break}var w=m.getCurrentTokenRow(),k=m.getCurrentTokenColumn();if(a(m.stepBackward(),"end-tag-open"))return;var x=v.value;return w==g.row&&(x=x.substring(0,g.column-k)),this.voidElements.hasOwnProperty(x.toLowerCase())?void 0:{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(c,d,h,f,p){if(p==` +`){var g=h.getCursorPosition(),m=f.getLine(g.row),v=new l(f,g.row,g.column),y=v.getCurrentToken();if(y&&y.type.indexOf("tag-close")!==-1){if(y.value=="/>")return;for(;y&&y.type.indexOf("tag-name")===-1;)y=v.stepBackward();if(!y)return;var b=y.value,w=v.getCurrentTokenRow();if(y=v.stepBackward(),!y||y.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[b]){var k=f.getTokenAt(g.row,g.column+1),m=f.getLine(w),x=this.$getIndent(m),S=x+f.getTabString();return k&&k.value==="-1}(function(){this.getFoldWidget=function(d,h,f){var p=this._getFirstTagInLine(d,f);return p?p.closing||!p.tagName&&p.selfClosing?h==="markbeginend"?"end":"":!p.tagName||p.selfClosing||this.voidElements.hasOwnProperty(p.tagName.toLowerCase())||this._findEndTagInLine(d,f,p.tagName,p.end.column)?"":"start":this.getCommentFoldWidget(d,f)},this.getCommentFoldWidget=function(d,h){return/comment/.test(d.getState(h))&&/";break}return p}else if(c(m,"tag-close"))return p.selfClosing=m.value=="/>",p;p.start.column+=m.value.length}return null},this._findEndTagInLine=function(d,h,f,p){for(var g=d.getTokens(h),m=0,v=0;v-1}function h(g,m){for(var v=new i(g,m.row,m.column),y=v.getCurrentToken();y&&!d(y,"tag-name");)y=v.stepBackward();if(y)return y.value}function f(g,m){for(var v=new i(g,m.row,m.column),y=v.getCurrentToken();y&&!d(y,"attribute-name");)y=v.stepBackward();if(y)return y.value}var p=function(){};(function(){this.getCompletions=function(g,m,v,y){var b=m.getTokenAt(v.row,v.column);if(!b)return[];if(d(b,"tag-name")||d(b,"tag-open")||d(b,"end-tag-open"))return this.getTagCompletions(g,m,v,y);if(d(b,"tag-whitespace")||d(b,"attribute-name"))return this.getAttributeCompletions(g,m,v,y);if(d(b,"attribute-value"))return this.getAttributeValueCompletions(g,m,v,y);var w=m.getLine(v.row).substr(0,v.column);return/&[a-z]*$/i.test(w)?this.getHTMLEntityCompletions(g,m,v,y):[]},this.getTagCompletions=function(g,m,v,y){return c.map(function(b){return{value:b,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(g,m,v,y){var b=h(m,v);if(!b)return[];var w=a;return b in u&&(w=w.concat(Object.keys(u[b]))),w.map(function(k){return{caption:k,snippet:k+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(g,m,v,y){var b=h(m,v),w=f(m,v);if(!b)return[];var k=[];return b in u&&w in u[b]&&typeof u[b][w]=="object"&&(k=Object.keys(u[b][w])),k.map(function(x){return{caption:x,snippet:x,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(g,m,v,y){var b=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return b.map(function(w){return{caption:w,snippet:w,meta:"html entity",score:1e6}})}}).call(p.prototype),r.HtmlCompletions=p}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/lang"),l=n("./text").Mode,a=n("./javascript").Mode,u=n("./css").Mode,c=n("./html_highlight_rules").HtmlHighlightRules,d=n("./behaviour/xml").XmlBehaviour,h=n("./folding/html").FoldMode,f=n("./html_completions").HtmlCompletions,p=n("../worker/worker_client").WorkerClient,g=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],m=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(y){this.fragmentContext=y&&y.fragmentContext,this.HighlightRules=c,this.$behaviour=new d,this.$completer=new f,this.createModeDelegates({"js-":a,"css-":u}),this.foldingRules=new h(this.voidElements,s.arrayToMap(m))};i.inherits(v,l),(function(){this.blockComment={start:""},this.voidElements=s.arrayToMap(g),this.getNextLineIndent=function(y,b,w){return this.$getIndent(b)},this.checkOutdent=function(y,b,w){return!1},this.getCompletions=function(y,b,w,k){return this.$completer.getCompletions(y,b,w,k)},this.createWorker=function(y){if(this.constructor==v){var b=new p(["ace"],"ace/mode/html_worker","Worker");return b.attachToDocument(y.getDocument()),this.fragmentContext&&b.call("setOptions",[{context:this.fragmentContext}]),b.on("error",function(w){y.setAnnotations(w.data)}),b.on("terminate",function(){y.clearAnnotations()}),b}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(v.prototype),r.Mode=v}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("./text_highlight_rules").TextHighlightRules,l=r.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set|function|declare|readonly",a=r.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",u=function(){var c=this.createKeywordMapper({keyword:l,"support.function.builtin":a,"invalid.deprecated":"debugger"},"identifier"),d="(?:(?:[1-9]\\d*)|(?:0))",h="(?:\\.\\d+)",f="(?:\\d+)",p="(?:(?:"+f+"?"+h+")|(?:"+f+"\\.))",g="(?:(?:"+p+"|"+f+"))",m="(?:"+g+"|"+p+")",v="(?:&"+f+")",y="[a-zA-Z_][a-zA-Z0-9_]*",b="(?:"+y+"(?==))",w="(?:\\$(?:SHLVL|\\$|\\!|\\?))",k="(?:"+y+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string.start",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$`"\\]|$)/},{include:"variables"},{token:"keyword.operator",regex:/`/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\$'",push:[{token:"constant.language.escape",regex:/\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(x,S,T){var C=x[2]=="-"?"indentedHeredoc":"heredoc",O=x.split(this.splitRegex);return T.push(C,O[4]),[{type:"constant",value:O[1]},{type:"text",value:O[2]},{type:"string",value:O[3]},{type:"support.class",value:O[4]},{type:"string",value:O[5]}]},rules:{heredoc:[{onMatch:function(x,S,T){return x===T[1]?(T.shift(),T.shift(),this.next=T[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(x,S,T){return x===T[1]?(T.shift(),T.shift(),this.next=T[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(x,S){return S[0]==="heredoc"||S[0]==="indentedHeredoc"?S[0]:x}},{token:["keyword","text","text","text","variable"],regex:/(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/},{token:"variable.language",regex:w},{token:"variable",regex:b},{include:"variables"},{token:"support.function",regex:k},{token:"support.function",regex:v},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:m},{token:"constant.numeric",regex:d+"\\b"},{token:c,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};i.inherits(u,s),r.ShHighlightRules=u}),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"],function(n,r,o){var i=n("../lib/oop"),s=n("./text").Mode,l=n("./sh_highlight_rules").ShHighlightRules,a=n("../range").Range,u=n("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=l,this.foldingRules=new u,this.$behaviour=this.$defaultBehaviour};i.inherits(c,s),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(h,f,p){var g=this.$getIndent(f),m=this.getTokenizer().getLineTokens(f,h),v=m.tokens;if(v.length&&v[v.length-1].type=="comment")return g;if(h=="start"){var y=f.match(/^.*[\{\(\[:]\s*$/);y&&(g+=p)}return g};var d={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(h,f,p){if(p!==`\r +`&&p!=="\r"&&p!==` +`)return!1;var g=this.getTokenizer().getLineTokens(f.trim(),h).tokens;if(!g)return!1;do var m=g.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&d[m.value]:!1},this.autoOutdent=function(h,f,p){p+=1;var g=this.$getIndent(f.getLine(p)),m=f.getTabString();g.slice(-m.length)==m&&f.remove(new a(p,g.length-m.length,p,g.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}).call(c.prototype),r.Mode=c}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/lang"),l=n("./text").Mode,a=n("./xml_highlight_rules").XmlHighlightRules,u=n("./behaviour/xml").XmlBehaviour,c=n("./folding/xml").FoldMode,d=n("../worker/worker_client").WorkerClient,h=function(){this.HighlightRules=a,this.$behaviour=new u,this.foldingRules=new c};i.inherits(h,l),(function(){this.voidElements=s.arrayToMap([]),this.blockComment={start:""},this.createWorker=function(f){var p=new d(["ace"],"ace/mode/xml_worker","Worker");return p.attachToDocument(f.getDocument()),p.on("error",function(g){f.setAnnotations(g.data)}),p.on("terminate",function(){f.clearAnnotations()}),p},this.$id="ace/mode/xml"}).call(h.prototype),r.Mode=h}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(n,r,o){var i=n("../lib/oop"),s=n("./behaviour/cstyle").CstyleBehaviour,l=n("./text").Mode,a=n("./markdown_highlight_rules").MarkdownHighlightRules,u=n("./folding/markdown").FoldMode,c=function(){this.HighlightRules=a,this.createModeDelegates({javascript:n("./javascript").Mode,html:n("./html").Mode,bash:n("./sh").Mode,sh:n("./sh").Mode,xml:n("./xml").Mode,css:n("./css").Mode}),this.foldingRules=new u,this.$behaviour=new s({braces:!0})};i.inherits(c,l),(function(){this.type="text",this.blockComment={start:""},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(d,h,f){if(d=="listblock"){var p=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(h);if(!p)return"";var g=p[2];return g||(g=parseInt(p[3],10)+1+"."),p[1]+g+p[4]}else return this.$getIndent(h)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(c.prototype),r.Mode=c}),function(){ace.require(["ace/mode/markdown"],function(n){t&&(t.exports=n)})}()})(Vpe);var jpe={exports:{}};(function(t,e){ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("./text_highlight_rules").TextHighlightRules,l=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},l.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};i.inherits(l,s),l.getTagRule=function(a){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},l.getStartRule=function(a){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:a}},l.getEndRule=function(a){return{token:"comment.doc",regex:"\\*\\/",next:a}},r.JsDocCommentHighlightRules=l}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,l=n("./text_highlight_rules").TextHighlightRules,a="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*",u=function(h){var f=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),p="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",g="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[s.getStartRule("doc-start"),d("no_regex"),{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+a+")(\\.)(prototype)(\\.)("+a+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function\\*?)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function\\*?)(\\s+)("+a+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(:)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+p+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:f,regex:a},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function\\*?)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:a},{regex:"",token:"empty",next:"no_regex"}],start:[s.getStartRule("doc-start"),d("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[d("function_arguments"),{token:"variable.parameter",regex:a},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!h||!h.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(m,v,y){if(this.next=m=="{"?this.nextState:"",m=="{"&&y.length)y.unshift("start",v);else if(m=="}"&&y.length&&(y.shift(),this.next=y.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return m=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:g},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+a+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=.+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!h||h.jsx!=!1)&&c.call(this)),this.embedRules(s,"doc-",[s.getEndRule("no_regex")]),this.normalizeRules()};i.inherits(u,l);function c(){var h=a.replace("\\d","\\d\\-"),f={onMatch:function(g,m,v){var y=g.charAt(1)=="/"?2:1;return y==1?(m!=this.nextState?v.unshift(this.next,this.nextState,0):v.unshift(this.next),v[2]++):y==2&&m==this.nextState&&(v[1]--,(!v[1]||v[1]<0)&&(v.shift(),v.shift())),[{type:"meta.tag.punctuation."+(y==1?"":"end-")+"tag-open.xml",value:g.slice(0,y)},{type:"meta.tag.tag-name.xml",value:g.substr(y)}]},regex:"",onMatch:function(g,m,v){return m==v[0]&&v.shift(),g.length==2&&(v[0]==this.nextState&&v[1]--,(!v[1]||v[1]<0)&&v.splice(0,2)),this.next=v[0]||"start",[{type:this.token,value:g}]},nextState:"jsx"},p,d("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:h},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},f],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function d(h){return[{token:"comment",regex:/\/\*/,next:[s.getTagRule(),{token:"comment",regex:"\\*\\/",next:h||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[s.getTagRule(),{token:"comment",regex:"$|^",next:h||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}r.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,r,o){var i=n("../range").Range,s=function(){};(function(){this.checkOutdent=function(l,a){return/^\s+$/.test(l)?/^\s*\}/.test(a):!1},this.autoOutdent=function(l,a){var u=l.getLine(a),c=u.match(/^(\s*\})/);if(!c)return 0;var d=c[1].length,h=l.findMatchingBracket({row:a,column:d});if(!h||h.row==a)return 0;var f=this.$getIndent(l.getLine(h.row));l.replace(new i(a,0,a,d-1),f)},this.$getIndent=function(l){return l.match(/^\s*/)[0]}}).call(s.prototype),r.MatchingBraceOutdent=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,r,o){var i=n("../../lib/oop"),s=n("../../range").Range,l=n("./fold_mode").FoldMode,a=r.FoldMode=function(u){u&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+u.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+u.end)))};i.inherits(a,l),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(u,c,d){var h=u.getLine(d);if(this.singleLineBlockCommentRe.test(h)&&!this.startRegionRe.test(h)&&!this.tripleStarBlockCommentRe.test(h))return"";var f=this._getFoldWidgetBase(u,c,d);return!f&&this.startRegionRe.test(h)?"start":f},this.getFoldWidgetRange=function(u,c,d,h){var f=u.getLine(d);if(this.startRegionRe.test(f))return this.getCommentRegionBlock(u,f,d);var m=f.match(this.foldingStartMarker);if(m){var p=m.index;if(m[1])return this.openingBracketBlock(u,m[1],d,p);var g=u.getCommentFoldRange(d,p+m[0].length,1);return g&&!g.isMultiLine()&&(h?g=this.getSectionRange(u,d):c!="all"&&(g=null)),g}if(c!=="markbegin"){var m=f.match(this.foldingStopMarker);if(m){var p=m.index+m[0].length;return m[1]?this.closingBracketBlock(u,m[1],d,p):u.getCommentFoldRange(d,p,-1)}}},this.getSectionRange=function(u,c){var d=u.getLine(c),h=d.search(/\S/),f=c,p=d.length;c=c+1;for(var g=c,m=u.getLength();++cv)break;var y=this.getFoldWidgetRange(u,"all",c);if(y){if(y.start.row<=f)break;if(y.isMultiLine())c=y.end.row;else if(h==v)break}g=c}}return new s(f,p,g,u.getLine(g).length)},this.getCommentRegionBlock=function(u,c,d){for(var h=c.search(/\s*$/),f=u.getLength(),p=d,g=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++dp)return new s(p,h,y,c.length)}}).call(a.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(n,r,o){var i=n("../lib/oop"),s=n("./text").Mode,l=n("./javascript_highlight_rules").JavaScriptHighlightRules,a=n("./matching_brace_outdent").MatchingBraceOutdent,u=n("../worker/worker_client").WorkerClient,c=n("./behaviour/cstyle").CstyleBehaviour,d=n("./folding/cstyle").FoldMode,h=function(){this.HighlightRules=l,this.$outdent=new a,this.$behaviour=new c,this.foldingRules=new d};i.inherits(h,s),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(f,p,g){var m=this.$getIndent(p),v=this.getTokenizer().getLineTokens(p,f),y=v.tokens,b=v.state;if(y.length&&y[y.length-1].type=="comment")return m;if(f=="start"||f=="no_regex"){var w=p.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);w&&(m+=g)}else if(f=="doc-start"){if(b=="start"||b=="no_regex")return"";var w=p.match(/^\s*(\/?)\*/);w&&(w[1]&&(m+=" "),m+="* ")}return m},this.checkOutdent=function(f,p,g){return this.$outdent.checkOutdent(p,g)},this.autoOutdent=function(f,p,g){this.$outdent.autoOutdent(p,g)},this.createWorker=function(f){var p=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return p.attachToDocument(f.getDocument()),p.on("annotate",function(g){f.setAnnotations(g.data)}),p.on("terminate",function(){f.clearAnnotations()}),p},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(h.prototype),r.Mode=h}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop");n("../lib/lang");var s=n("./text_highlight_rules").TextHighlightRules,l=r.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",a=r.supportFunction="rgb|rgba|url|attr|counter|counters",u=r.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",c=r.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",d=r.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",h=r.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",f=r.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=r.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",g=function(){var m=this.createKeywordMapper({"support.function":a,"support.constant":u,"support.type":l,"support.constant.color":c,"support.constant.fonts":d},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:h},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+h+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:h},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:f},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:m,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};i.inherits(g,s),r.CssHighlightRules=g}),ace.define("ace/mode/css_completions",["require","exports","module"],function(n,r,o){var i={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},s=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var l=document.createElement("c").style;for(var a in l)if(typeof l[a]=="string"){var u=a.replace(/[A-Z]/g,function(c){return"-"+c.toLowerCase()});i.hasOwnProperty(u)||(i[u]=1)}}this.completionsDefined=!0},this.getCompletions=function(l,a,u,c){if(this.completionsDefined||this.defineCompletions(),l==="ruleset"||a.$mode.$id=="ace/mode/scss"){var d=a.getLine(u.row).substr(0,u.column),h=/\([^)]*$/.test(d);return h&&(d=d.substr(d.lastIndexOf("(")+1)),/:[^;]+$/.test(d)?this.getPropertyValueCompletions(l,a,u,c):this.getPropertyCompletions(l,a,u,c,h)}return[]},this.getPropertyCompletions=function(l,a,u,c,d){d=d||!1;var h=Object.keys(i);return h.map(function(f){return{caption:f,snippet:f+": $0"+(d?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(l,a,u,c){var d=a.getLine(u.row).substr(0,u.column),h=(/([\w\-]+):[^:]*$/.exec(d)||{})[1];if(!h)return[];var f=[];return h in i&&typeof i[h]=="object"&&(f=Object.keys(i[h])),f.map(function(p){return{caption:p,snippet:p,meta:"property value",score:1e6}})}}).call(s.prototype),r.CssCompletions=s}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(n,r,o){var i=n("../../lib/oop");n("../behaviour").Behaviour;var s=n("./cstyle").CstyleBehaviour,l=n("../../token_iterator").TokenIterator,a=function(){this.inherit(s),this.add("colon","insertion",function(u,c,d,h,f){if(f===":"&&d.selection.isEmpty()){var p=d.getCursorPosition(),g=new l(h,p.row,p.column),m=g.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=g.stepBackward()),m&&m.type==="support.type"){var v=h.doc.getLine(p.row),y=v.substring(p.column,p.column+1);if(y===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(v.substring(p.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(u,c,d,h,f){var p=h.doc.getTextRange(f);if(!f.isMultiLine()&&p===":"){var g=d.getCursorPosition(),m=new l(h,g.row,g.column),v=m.getCurrentToken();if(v&&v.value.match(/\s+/)&&(v=m.stepBackward()),v&&v.type==="support.type"){var y=h.doc.getLine(f.start.row),b=y.substring(f.end.column,f.end.column+1);if(b===";")return f.end.column++,f}}}),this.add("semicolon","insertion",function(u,c,d,h,f){if(f===";"&&d.selection.isEmpty()){var p=d.getCursorPosition(),g=h.doc.getLine(p.row),m=g.substring(p.column,p.column+1);if(m===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(u,c,d,h,f){if(f==="!"&&d.selection.isEmpty()){var p=d.getCursorPosition(),g=h.doc.getLine(p.row);if(/^\s*(;|}|$)/.test(g.substring(p.column)))return{text:"!important",selection:[10,10]}}})};i.inherits(a,s),r.CssBehaviour=a}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(n,r,o){var i=n("../lib/oop"),s=n("./text").Mode,l=n("./css_highlight_rules").CssHighlightRules,a=n("./matching_brace_outdent").MatchingBraceOutdent,u=n("../worker/worker_client").WorkerClient,c=n("./css_completions").CssCompletions,d=n("./behaviour/css").CssBehaviour,h=n("./folding/cstyle").FoldMode,f=function(){this.HighlightRules=l,this.$outdent=new a,this.$behaviour=new d,this.$completer=new c,this.foldingRules=new h};i.inherits(f,s),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(p,g,m){var v=this.$getIndent(g),y=this.getTokenizer().getLineTokens(g,p).tokens;if(y.length&&y[y.length-1].type=="comment")return v;var b=g.match(/^.*\{\s*$/);return b&&(v+=m),v},this.checkOutdent=function(p,g,m){return this.$outdent.checkOutdent(g,m)},this.autoOutdent=function(p,g,m){this.$outdent.autoOutdent(g,m)},this.getCompletions=function(p,g,m,v){return this.$completer.getCompletions(p,g,m,v)},this.createWorker=function(p){var g=new u(["ace"],"ace/mode/css_worker","Worker");return g.attachToDocument(p.getDocument()),g.on("annotate",function(m){p.setAnnotations(m.data)}),g.on("terminate",function(){p.clearAnnotations()}),g},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(f.prototype),r.Mode=f}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("./text_highlight_rules").TextHighlightRules,l=function(a){var u="[_:a-zA-ZÀ-￿][-_:.a-zA-Z0-9À-￿]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+u+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+u+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:u},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===l&&this.normalizeRules()};(function(){this.embedTagRules=function(a,u,c){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+c+".tag-name.xml"],regex:"(<)("+c+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:u+"start"}]}),this.$rules[c+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(d,h,f){return f.splice(0),this.token}}],this.embedRules(a,u,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+c+".tag-name.xml"],regex:"(|$))",next:c+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(s.prototype),i.inherits(l,s),r.XmlHighlightRules=l}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/lang"),l=n("./css_highlight_rules").CssHighlightRules,a=n("./javascript_highlight_rules").JavaScriptHighlightRules,u=n("./xml_highlight_rules").XmlHighlightRules,c=s.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),d=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(h,f){var p=c[f];return["meta.tag.punctuation."+(h=="<"?"":"end-")+"tag-open.xml","meta.tag"+(p?"."+p:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(l,"css-","style"),this.embedTagRules(new a({jsx:!1}).getRules(),"js-","script"),this.constructor===d&&this.normalizeRules()};i.inherits(d,u),r.HtmlHighlightRules=d}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,r,o){var i=n("../../lib/oop"),s=n("../behaviour").Behaviour,l=n("../../token_iterator").TokenIterator;n("../../lib/lang");function a(c,d){return c&&c.type.lastIndexOf(d+".xml")>-1}var u=function(){this.add("string_dquotes","insertion",function(c,d,h,f,p){if(p=='"'||p=="'"){var g=p,m=f.doc.getTextRange(h.getSelectionRange());if(m!==""&&m!=="'"&&m!='"'&&h.getWrapBehavioursEnabled())return{text:g+m+g,selection:!1};var v=h.getCursorPosition(),y=f.doc.getLine(v.row),b=y.substring(v.column,v.column+1),w=new l(f,v.row,v.column),k=w.getCurrentToken();if(b==g&&(a(k,"attribute-value")||a(k,"string")))return{text:"",selection:[1,1]};if(k||(k=w.stepBackward()),!k)return;for(;a(k,"tag-whitespace")||a(k,"whitespace");)k=w.stepBackward();var x=!b||b.match(/\s/);if(a(k,"attribute-equals")&&(x||b==">")||a(k,"decl-attribute-equals")&&(x||b=="?"))return{text:g+g,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(c,d,h,f,p){var g=f.doc.getTextRange(p);if(!p.isMultiLine()&&(g=='"'||g=="'")){var m=f.doc.getLine(p.start.row),v=m.substring(p.start.column+1,p.start.column+2);if(v==g)return p.end.column++,p}}),this.add("autoclosing","insertion",function(c,d,h,f,p){if(p==">"){var g=h.getSelectionRange().start,m=new l(f,g.row,g.column),v=m.getCurrentToken()||m.stepBackward();if(!v||!(a(v,"tag-name")||a(v,"tag-whitespace")||a(v,"attribute-name")||a(v,"attribute-equals")||a(v,"attribute-value"))||a(v,"reference.attribute-value"))return;if(a(v,"attribute-value")){var y=m.getCurrentTokenColumn()+v.value.length;if(g.column/.test(f.getLine(g.row).slice(g.column)))return;for(;!a(v,"tag-name");)if(v=m.stepBackward(),v.value=="<"){v=m.stepForward();break}var w=m.getCurrentTokenRow(),k=m.getCurrentTokenColumn();if(a(m.stepBackward(),"end-tag-open"))return;var x=v.value;return w==g.row&&(x=x.substring(0,g.column-k)),this.voidElements.hasOwnProperty(x.toLowerCase())?void 0:{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(c,d,h,f,p){if(p==` +`){var g=h.getCursorPosition(),m=f.getLine(g.row),v=new l(f,g.row,g.column),y=v.getCurrentToken();if(y&&y.type.indexOf("tag-close")!==-1){if(y.value=="/>")return;for(;y&&y.type.indexOf("tag-name")===-1;)y=v.stepBackward();if(!y)return;var b=y.value,w=v.getCurrentTokenRow();if(y=v.stepBackward(),!y||y.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[b]){var k=f.getTokenAt(g.row,g.column+1),m=f.getLine(w),x=this.$getIndent(m),S=x+f.getTabString();return k&&k.value==="-1}(function(){this.getFoldWidget=function(d,h,f){var p=this._getFirstTagInLine(d,f);return p?p.closing||!p.tagName&&p.selfClosing?h==="markbeginend"?"end":"":!p.tagName||p.selfClosing||this.voidElements.hasOwnProperty(p.tagName.toLowerCase())||this._findEndTagInLine(d,f,p.tagName,p.end.column)?"":"start":this.getCommentFoldWidget(d,f)},this.getCommentFoldWidget=function(d,h){return/comment/.test(d.getState(h))&&/";break}return p}else if(c(m,"tag-close"))return p.selfClosing=m.value=="/>",p;p.start.column+=m.value.length}return null},this._findEndTagInLine=function(d,h,f,p){for(var g=d.getTokens(h),m=0,v=0;v-1}function h(g,m){for(var v=new i(g,m.row,m.column),y=v.getCurrentToken();y&&!d(y,"tag-name");)y=v.stepBackward();if(y)return y.value}function f(g,m){for(var v=new i(g,m.row,m.column),y=v.getCurrentToken();y&&!d(y,"attribute-name");)y=v.stepBackward();if(y)return y.value}var p=function(){};(function(){this.getCompletions=function(g,m,v,y){var b=m.getTokenAt(v.row,v.column);if(!b)return[];if(d(b,"tag-name")||d(b,"tag-open")||d(b,"end-tag-open"))return this.getTagCompletions(g,m,v,y);if(d(b,"tag-whitespace")||d(b,"attribute-name"))return this.getAttributeCompletions(g,m,v,y);if(d(b,"attribute-value"))return this.getAttributeValueCompletions(g,m,v,y);var w=m.getLine(v.row).substr(0,v.column);return/&[a-z]*$/i.test(w)?this.getHTMLEntityCompletions(g,m,v,y):[]},this.getTagCompletions=function(g,m,v,y){return c.map(function(b){return{value:b,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(g,m,v,y){var b=h(m,v);if(!b)return[];var w=a;return b in u&&(w=w.concat(Object.keys(u[b]))),w.map(function(k){return{caption:k,snippet:k+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(g,m,v,y){var b=h(m,v),w=f(m,v);if(!b)return[];var k=[];return b in u&&w in u[b]&&typeof u[b][w]=="object"&&(k=Object.keys(u[b][w])),k.map(function(x){return{caption:x,snippet:x,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(g,m,v,y){var b=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return b.map(function(w){return{caption:w,snippet:w,meta:"html entity",score:1e6}})}}).call(p.prototype),r.HtmlCompletions=p}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/lang"),l=n("./text").Mode,a=n("./javascript").Mode,u=n("./css").Mode,c=n("./html_highlight_rules").HtmlHighlightRules,d=n("./behaviour/xml").XmlBehaviour,h=n("./folding/html").FoldMode,f=n("./html_completions").HtmlCompletions,p=n("../worker/worker_client").WorkerClient,g=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],m=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(y){this.fragmentContext=y&&y.fragmentContext,this.HighlightRules=c,this.$behaviour=new d,this.$completer=new f,this.createModeDelegates({"js-":a,"css-":u}),this.foldingRules=new h(this.voidElements,s.arrayToMap(m))};i.inherits(v,l),(function(){this.blockComment={start:""},this.voidElements=s.arrayToMap(g),this.getNextLineIndent=function(y,b,w){return this.$getIndent(b)},this.checkOutdent=function(y,b,w){return!1},this.getCompletions=function(y,b,w,k){return this.$completer.getCompletions(y,b,w,k)},this.createWorker=function(y){if(this.constructor==v){var b=new p(["ace"],"ace/mode/html_worker","Worker");return b.attachToDocument(y.getDocument()),this.fragmentContext&&b.call("setOptions",[{context:this.fragmentContext}]),b.on("error",function(w){y.setAnnotations(w.data)}),b.on("terminate",function(){y.clearAnnotations()}),b}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(v.prototype),r.Mode=v}),function(){ace.require(["ace/mode/html"],function(n){t&&(t.exports=n)})}()})(jpe);var Gpe={exports:{}};(function(t,e){ace.define("ace/theme/github-css",["require","exports","module"],function(n,r,o){o.exports=`/* CSS style content from github's default pygments highlighter template. + Cursor and selection styles from textmate.css. */ +.ace-github .ace_gutter { + background: #e8e8e8; + color: #AAA; +} + +.ace-github { + background: #fff; + color: #000; +} + +.ace-github .ace_keyword { + font-weight: bold; +} + +.ace-github .ace_string { + color: #D14; +} + +.ace-github .ace_variable.ace_class { + color: teal; +} + +.ace-github .ace_constant.ace_numeric { + color: #099; +} + +.ace-github .ace_constant.ace_buildin { + color: #0086B3; +} + +.ace-github .ace_support.ace_function { + color: #0086B3; +} + +.ace-github .ace_comment { + color: #998; + font-style: italic; +} + +.ace-github .ace_variable.ace_language { + color: #0086B3; +} + +.ace-github .ace_paren { + font-weight: bold; +} + +.ace-github .ace_boolean { + font-weight: bold; +} + +.ace-github .ace_string.ace_regexp { + color: #009926; + font-weight: normal; +} + +.ace-github .ace_variable.ace_instance { + color: teal; +} + +.ace-github .ace_constant.ace_language { + font-weight: bold; +} + +.ace-github .ace_cursor { + color: black; +} + +.ace-github.ace_focus .ace_marker-layer .ace_active-line { + background: rgb(255, 255, 204); +} +.ace-github .ace_marker-layer .ace_active-line { + background: rgb(245, 245, 245); +} + +.ace-github .ace_marker-layer .ace_selection { + background: rgb(181, 213, 255); +} + +.ace-github.ace_multiselect .ace_selection.ace_start { + box-shadow: 0 0 3px 0px white; +} +/* bold keywords cause cursor issues for some fonts */ +/* this disables bold style for editor and keeps for static highlighter */ +.ace-github.ace_nobold .ace_line > span { + font-weight: normal !important; +} + +.ace-github .ace_marker-layer .ace_step { + background: rgb(252, 255, 0); +} + +.ace-github .ace_marker-layer .ace_stack { + background: rgb(164, 229, 101); +} + +.ace-github .ace_marker-layer .ace_bracket { + margin: -1px 0 0 -1px; + border: 1px solid rgb(192, 192, 192); +} + +.ace-github .ace_gutter-active-line { + background-color : rgba(0, 0, 0, 0.07); +} + +.ace-github .ace_marker-layer .ace_selected-word { + background: rgb(250, 250, 255); + border: 1px solid rgb(200, 200, 250); +} + +.ace-github .ace_invisible { + color: #BFBFBF +} + +.ace-github .ace_print-margin { + width: 1px; + background: #e8e8e8; +} + +.ace-github .ace_indent-guide { + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y; +} + +.ace-github .ace_indent-guide-active { + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y; +} +`}),ace.define("ace/theme/github",["require","exports","module","ace/theme/github-css","ace/lib/dom"],function(n,r,o){r.isDark=!1,r.cssClass="ace-github",r.cssText=n("./github-css");var i=n("../lib/dom");i.importCssString(r.cssText,r.cssClass,!1)}),function(){ace.require(["ace/theme/github"],function(n){t&&(t.exports=n)})}()})(Gpe);const Kpe=({mode:t,value:e})=>{const n=P.useMemo(()=>t==="Markdown"?{value:e,mode:"markdown"}:{value:Ype(e||""),mode:"html"},[t,e]);return j.jsx(Wpe,{mode:n.mode,value:n.value,height:"100%",width:"100%",readOnly:!0,wrapEnabled:!0})},F_=" ";function Ype(t){let e="",n="";return t.split(/>\s*{r.match(/^\/\w/)&&(n=n.substring(F_.length)),e+=n+"<"+r+`>\r +`,r.match(/^]*[^/]$/)&&!r.startsWith("input")&&(n+=F_)}),e.substring(1,e.length-3)}const Xpe=({onClose:t,node:e})=>{const[n,r,o]=JN(""),i=kn();P.useEffect(()=>{r(e.node.attrs.title||"")},[e,r]);const s=P.useCallback(u=>{r(u.target.value)},[r]),l=P.useCallback(()=>{i.updateNodeAttributes(e.getPos()||0,{...e.node.attrs||{},title:o.current}),t()},[i,e,t,o]),a=P.useCallback(u=>{const{code:c}=u;c==="Enter"&&l(),c==="Escape"&&t()},[t,l]);return j.jsxs(u$,{title:"Change Image Title",children:[j.jsx(c$,{value:n,onChange:s,onKeyDown:a,placeholder:"Enter Title..."}),j.jsxs(so,{children:[j.jsx(It,{commandName:"submitLink",enabled:!0,onSelect:l,icon:j.jsx(xo,{type:"Check"})}),j.jsx(It,{commandName:"cancelLink",enabled:!0,onSelect:t,icon:j.jsx(xo,{type:"Cancel"})})]})]})};const qpe=t=>{const{appName:e,classNames:n,canSelectAIText:r,canSelectAssets:o,canSelectContents:i,isDisabled:s,mode:l,onChange:a,onEditAsset:u,onEditContent:c,onSelectAIText:d,onSelectAssets:h,onSelectContents:f,onUpload:p,value:g}=t,m=P.useMemo(()=>{let M=t.baseUrl;return M.endsWith("/")&&(M=M.substring(0,M.length-1)),M},[t.baseUrl]),[v,y]=P.useState(),[b,w]=P.useState(!1),[k,x]=P.useState(!1),S=P.useCallback(()=>{w(!0)},[]),T=P.useCallback(()=>{w(!1)},[]),C=P.useCallback(()=>{y(null)},[]),O=P.useCallback(()=>{x(M=>!M)},[]),_=P.useCallback(()=>[new fk,new dl({}),new Sh({enableSpine:!0}),new ru({classNames:n}),new mo({supportedLanguages:zhe}),new Th,new Ih({appName:e,baseUrl:m,onEditContent:c}),new Vs({}),new Ug,new Wg({}),new Vg,new lfe({copyAsHtml:l==="Html"}),new Ah({uploadHandler:p}),new _h,new hl({autoLink:!0}),new ul({enableCollapsible:!0}),new nu({copyAsMarkdown:l==="Markdown",htmlToMarkdown:tfe,markdownToHtml:nfe}),new Ch,new Qg,new Mh,new eb,new Oh],[e,m,n,l,c,p]),{manager:R,state:A,setState:E}=vQ({stringHandler:l==="Markdown"?"markdown":"html",content:g,nodeViewComponents:{image:M=>j.jsx(afe,{...M,appName:e,baseUrl:m,onEditNode:y,onEditAsset:u})},extensions:_});return j.jsx(Iue,{children:j.jsx(Tue,{theme:{color:{primary:"#3389ff",active:{primary:"#3389ff"}}},children:j.jsxs(wQ,{classNames:s?["squidex-editor-disabled"]:[],manager:R,state:A,onChange:M=>E(M.state),children:[j.jsx("div",{className:"squidex-editor-menu",children:j.jsxs(_N,{children:[j.jsxs("fieldset",{disabled:k,className:"MuiStack-root",children:[j.jsx(Eue,{}),j.jsx(kue,{showAll:!0}),j.jsxs(so,{children:[j.jsx(Wx,{}),j.jsx(jx,{}),j.jsx(Gx,{}),j.jsx(Vx,{})]}),j.jsxs(so,{children:[j.jsx(cue,{}),j.jsx(due,{}),j.jsx(aue,{})]}),j.jsxs(so,{children:[j.jsx(uue,{}),j.jsx(hue,{})]}),l==="Html"&&n&&n.length>0&&j.jsx(so,{children:j.jsx(Efe,{})}),j.jsx(so,{children:j.jsx(d$,{onEdit:S})}),j.jsxs(so,{children:[o&&h&&j.jsx(yfe,{onSelectAssets:h}),i&&f&&j.jsx(bfe,{onSelectContents:f}),r&&d&&j.jsx(mfe,{onSelectAIText:d})]}),l==="Html"&&j.jsx(so,{children:j.jsx(wfe,{})})]}),j.jsx(It,{commandName:"toggleMarkup",enabled:!0,onSelect:O,label:"Show Markup (readonly)",icon:j.jsx(xo,{type:"Preview"})})]})}),j.jsxs("div",{className:"squidex-editor-main",children:[j.jsx(cfe,{mode:l,onChange:a,state:A,value:g}),j.jsx(Fy,{}),k&&j.jsx(Kpe,{value:g,mode:l}),b?j.jsx(Cfe,{onClose:T}):v?j.jsx(Xpe,{node:v,onClose:C}):j.jsx(Zpe,{onLinkModal:S}),j.jsx(Rue,{offset:{x:5,y:5},className:Pc(B0.LANGUAGE_SELECT_POSITIONER,B0.LANGUAGE_SELECT_WIDTH)})]}),j.jsx(Sfe,{})]})})})},Zpe=({onLinkModal:t})=>hr().codeBlock()?null:j.jsxs(_ue,{className:"squidex-editor-floating",children:[j.jsx(Wx,{}),j.jsx(jx,{}),j.jsx(Gx,{}),j.jsx(Vx,{}),j.jsx(d$,{onEdit:t})]});var S$,B_=Qh;S$=B_.createRoot,B_.hydrateRoot;class Qpe{constructor(e,n){ct(this,"root");this.element=e,this.props=n,this.root=S$(this.element),this.render()}update(e){this.props={...this.props,...e},this.render()}setValue(e){this.update({value:e})}setIsDisabled(e){this.update({isDisabled:e})}destroy(){this.root.unmount()}render(){this.root.render(j.jsx(qpe,{...this.props}))}}window.SquidexEditorWrapper=Qpe; diff --git a/frontend/src/app/features/administration/pages/event-consumers/event-consumers-page.component.html b/frontend/src/app/features/administration/pages/event-consumers/event-consumers-page.component.html index 458f6407c..6b081ff69 100644 --- a/frontend/src/app/features/administration/pages/event-consumers/event-consumers-page.component.html +++ b/frontend/src/app/features/administration/pages/event-consumers/event-consumers-page.component.html @@ -40,7 +40,7 @@ - +
    - + diff --git a/frontend/src/app/features/administration/pages/restore/restore-page.component.html b/frontend/src/app/features/administration/pages/restore/restore-page.component.html index 498f1b64d..0cd2ebfcf 100644 --- a/frontend/src/app/features/administration/pages/restore/restore-page.component.html +++ b/frontend/src/app/features/administration/pages/restore/restore-page.component.html @@ -68,7 +68,7 @@ - + - + \ No newline at end of file diff --git a/frontend/src/app/features/administration/pages/users/users-page.component.html b/frontend/src/app/features/administration/pages/users/users-page.component.html index e94072f7d..fa79460ac 100644 --- a/frontend/src/app/features/administration/pages/users/users-page.component.html +++ b/frontend/src/app/features/administration/pages/users/users-page.component.html @@ -56,7 +56,7 @@ - + - + \ No newline at end of file diff --git a/frontend/src/app/features/assets/pages/assets-page.component.html b/frontend/src/app/features/assets/pages/assets-page.component.html index 8529a5ddc..da90a5bf6 100644 --- a/frontend/src/app/features/assets/pages/assets-page.component.html +++ b/frontend/src/app/features/assets/pages/assets-page.component.html @@ -71,7 +71,7 @@ - + - + diff --git a/frontend/src/app/features/content/pages/content/content-page.component.html b/frontend/src/app/features/content/pages/content/content-page.component.html index 3cad2e815..cb5b929d6 100644 --- a/frontend/src/app/features/content/pages/content/content-page.component.html +++ b/frontend/src/app/features/content/pages/content/content-page.component.html @@ -172,7 +172,7 @@ - + - + diff --git a/frontend/src/app/features/content/pages/contents/contents-page.component.html b/frontend/src/app/features/content/pages/contents/contents-page.component.html index 1a140e247..8398ec8f1 100644 --- a/frontend/src/app/features/content/pages/contents/contents-page.component.html +++ b/frontend/src/app/features/content/pages/contents/contents-page.component.html @@ -143,7 +143,7 @@ - + - + diff --git a/frontend/src/app/features/rules/pages/rule/rule-page.component.html b/frontend/src/app/features/rules/pages/rule/rule-page.component.html index 970a68fc2..81eb75613 100644 --- a/frontend/src/app/features/rules/pages/rule/rule-page.component.html +++ b/frontend/src/app/features/rules/pages/rule/rule-page.component.html @@ -155,7 +155,7 @@ - + - + diff --git a/frontend/src/app/features/rules/pages/rules/rules-page.component.html b/frontend/src/app/features/rules/pages/rules/rules-page.component.html index f50fa80eb..b3cbe0ecf 100644 --- a/frontend/src/app/features/rules/pages/rules/rules-page.component.html +++ b/frontend/src/app/features/rules/pages/rules/rules-page.component.html @@ -41,7 +41,7 @@ - + - + diff --git a/frontend/src/app/features/schemas/pages/schema/schema-page.component.html b/frontend/src/app/features/schemas/pages/schema/schema-page.component.html index 907935d9a..26756c00c 100644 --- a/frontend/src/app/features/schemas/pages/schema/schema-page.component.html +++ b/frontend/src/app/features/schemas/pages/schema/schema-page.component.html @@ -106,7 +106,7 @@ - + - + diff --git a/frontend/src/app/features/settings/pages/asset-scripts/asset-scripts-page.component.html b/frontend/src/app/features/settings/pages/asset-scripts/asset-scripts-page.component.html index 1a811c849..1748363c4 100644 --- a/frontend/src/app/features/settings/pages/asset-scripts/asset-scripts-page.component.html +++ b/frontend/src/app/features/settings/pages/asset-scripts/asset-scripts-page.component.html @@ -35,7 +35,7 @@ - + - + diff --git a/frontend/src/app/features/settings/pages/backups/backups-page.component.html b/frontend/src/app/features/settings/pages/backups/backups-page.component.html index b95775d46..f9c99b0f7 100644 --- a/frontend/src/app/features/settings/pages/backups/backups-page.component.html +++ b/frontend/src/app/features/settings/pages/backups/backups-page.component.html @@ -33,7 +33,7 @@ - + - + diff --git a/frontend/src/app/features/settings/pages/clients/clients-page.component.html b/frontend/src/app/features/settings/pages/clients/clients-page.component.html index 56a6769de..01f0ad91b 100644 --- a/frontend/src/app/features/settings/pages/clients/clients-page.component.html +++ b/frontend/src/app/features/settings/pages/clients/clients-page.component.html @@ -26,7 +26,7 @@ - + - + \ No newline at end of file diff --git a/frontend/src/app/features/settings/pages/contributors/contributors-page.component.html b/frontend/src/app/features/settings/pages/contributors/contributors-page.component.html index 60cf7bd1c..1505fcb43 100644 --- a/frontend/src/app/features/settings/pages/contributors/contributors-page.component.html +++ b/frontend/src/app/features/settings/pages/contributors/contributors-page.component.html @@ -54,7 +54,7 @@ - + - + \ No newline at end of file diff --git a/frontend/src/app/features/settings/pages/languages/languages-page.component.html b/frontend/src/app/features/settings/pages/languages/languages-page.component.html index 17eb5466a..606464414 100644 --- a/frontend/src/app/features/settings/pages/languages/languages-page.component.html +++ b/frontend/src/app/features/settings/pages/languages/languages-page.component.html @@ -25,7 +25,7 @@ - + - + diff --git a/frontend/src/app/features/settings/pages/more/more-page.component.html b/frontend/src/app/features/settings/pages/more/more-page.component.html index 90a29452c..23cf5ee1a 100644 --- a/frontend/src/app/features/settings/pages/more/more-page.component.html +++ b/frontend/src/app/features/settings/pages/more/more-page.component.html @@ -128,7 +128,7 @@ - + - + \ No newline at end of file diff --git a/frontend/src/app/features/settings/pages/plans/plans-page.component.html b/frontend/src/app/features/settings/pages/plans/plans-page.component.html index 877fa0e6a..4400d64ce 100644 --- a/frontend/src/app/features/settings/pages/plans/plans-page.component.html +++ b/frontend/src/app/features/settings/pages/plans/plans-page.component.html @@ -49,7 +49,7 @@ - + - + diff --git a/frontend/src/app/features/settings/pages/roles/roles-page.component.html b/frontend/src/app/features/settings/pages/roles/roles-page.component.html index 94cdf0762..0ef61ef0e 100644 --- a/frontend/src/app/features/settings/pages/roles/roles-page.component.html +++ b/frontend/src/app/features/settings/pages/roles/roles-page.component.html @@ -39,7 +39,7 @@ - + - + diff --git a/frontend/src/app/features/settings/pages/settings/settings-page.component.html b/frontend/src/app/features/settings/pages/settings/settings-page.component.html index cc131e138..7a6a26ff9 100644 --- a/frontend/src/app/features/settings/pages/settings/settings-page.component.html +++ b/frontend/src/app/features/settings/pages/settings/settings-page.component.html @@ -147,7 +147,7 @@ - + - + \ No newline at end of file diff --git a/frontend/src/app/features/settings/pages/templates/templates-page.component.html b/frontend/src/app/features/settings/pages/templates/templates-page.component.html index ad02b60d2..4bdd282bc 100644 --- a/frontend/src/app/features/settings/pages/templates/templates-page.component.html +++ b/frontend/src/app/features/settings/pages/templates/templates-page.component.html @@ -21,7 +21,7 @@ - + - + diff --git a/frontend/src/app/features/settings/pages/workflows/workflows-page.component.html b/frontend/src/app/features/settings/pages/workflows/workflows-page.component.html index f961b851d..9efe5c09c 100644 --- a/frontend/src/app/features/settings/pages/workflows/workflows-page.component.html +++ b/frontend/src/app/features/settings/pages/workflows/workflows-page.component.html @@ -36,7 +36,7 @@ - + - + diff --git a/frontend/src/app/features/teams/pages/contributors/contributors-page.component.html b/frontend/src/app/features/teams/pages/contributors/contributors-page.component.html index 1c78339dd..7d03105c2 100644 --- a/frontend/src/app/features/teams/pages/contributors/contributors-page.component.html +++ b/frontend/src/app/features/teams/pages/contributors/contributors-page.component.html @@ -43,7 +43,7 @@ - + - + \ No newline at end of file diff --git a/frontend/src/app/features/teams/pages/more/more-page.component.html b/frontend/src/app/features/teams/pages/more/more-page.component.html index cbcecb592..90c07d436 100644 --- a/frontend/src/app/features/teams/pages/more/more-page.component.html +++ b/frontend/src/app/features/teams/pages/more/more-page.component.html @@ -29,7 +29,7 @@ - + - + \ No newline at end of file diff --git a/frontend/src/app/features/teams/pages/plans/plans-page.component.html b/frontend/src/app/features/teams/pages/plans/plans-page.component.html index 938b5d5b9..a8d3ce189 100644 --- a/frontend/src/app/features/teams/pages/plans/plans-page.component.html +++ b/frontend/src/app/features/teams/pages/plans/plans-page.component.html @@ -45,7 +45,7 @@ - + - + diff --git a/frontend/src/app/framework/angular/layout.component.html b/frontend/src/app/framework/angular/layout.component.html index 1455e24c8..18f012642 100644 --- a/frontend/src/app/framework/angular/layout.component.html +++ b/frontend/src/app/framework/angular/layout.component.html @@ -94,7 +94,7 @@ @@ -114,8 +114,4 @@ - - - - \ No newline at end of file diff --git a/frontend/src/app/framework/angular/layout.component.ts b/frontend/src/app/framework/angular/layout.component.ts index c9758855e..21cf9fa5c 100644 --- a/frontend/src/app/framework/angular/layout.component.ts +++ b/frontend/src/app/framework/angular/layout.component.ts @@ -5,10 +5,11 @@ * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. */ -import { AfterViewInit, booleanAttribute, ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, Input, numberAttribute, OnDestroy, OnInit, Optional, Renderer2, ViewChild } from '@angular/core'; +import { AfterViewInit, booleanAttribute, ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, ElementRef, Input, numberAttribute, OnDestroy, OnInit, Optional, Renderer2, ViewChild } from '@angular/core'; import { ActivatedRoute, NavigationEnd, QueryParamsHandling, Router } from '@angular/router'; import { concat, defer, filter, map, of } from 'rxjs'; import { LayoutContainerDirective } from './layout-container.directive'; +import { SidebarMenuDirective } from './template.directive'; @Component({ selector: 'sqx-layout', @@ -66,6 +67,9 @@ export class LayoutComponent implements OnInit, OnDestroy, AfterViewInit { @ViewChild('panel', { static: false }) public panel!: ElementRef; + @ContentChild(SidebarMenuDirective) + public sidebarMenuTemplate?: SidebarMenuDirective; + public isCollapsed = false; public isMinimized = false; diff --git a/frontend/src/app/framework/angular/template.directive.ts b/frontend/src/app/framework/angular/template.directive.ts new file mode 100644 index 000000000..bb66f7e18 --- /dev/null +++ b/frontend/src/app/framework/angular/template.directive.ts @@ -0,0 +1,21 @@ +/* + * Squidex Headless CMS + * + * @license + * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. + */ + +/* eslint-disable @angular-eslint/directive-selector */ + +import { Directive, TemplateRef } from '@angular/core'; + +@Directive({ + selector: '[sidebarMenu]', +}) +export class SidebarMenuDirective { + constructor( + public readonly templateRef: TemplateRef, + ) { + console.log('FAsd'); + } +} \ No newline at end of file diff --git a/frontend/src/app/framework/declarations.ts b/frontend/src/app/framework/declarations.ts index 2962ec7c2..6f7d8935f 100644 --- a/frontend/src/app/framework/declarations.ts +++ b/frontend/src/app/framework/declarations.ts @@ -13,8 +13,8 @@ export * from './angular/external-link.directive'; export * from './angular/forms/confirm-click.directive'; export * from './angular/forms/control-errors-messages.component'; export * from './angular/forms/control-errors.component'; -export * from './angular/forms/copy.directive'; export * from './angular/forms/copy-global.directive'; +export * from './angular/forms/copy.directive'; export * from './angular/forms/editable-title.component'; export * from './angular/forms/editors/autocomplete.component'; export * from './angular/forms/editors/checkbox-group.component'; @@ -53,18 +53,18 @@ export * from './angular/language-selector.component'; export * from './angular/layout-container.directive'; export * from './angular/layout.component'; export * from './angular/list-view.component'; -export * from './angular/long-hover.directive'; export * from './angular/loader.component'; +export * from './angular/long-hover.directive'; export * from './angular/markdown.directive'; export * from './angular/modals/dialog-renderer.component'; export * from './angular/modals/modal-dialog.component'; export * from './angular/modals/modal-placement.directive'; export * from './angular/modals/modal.directive'; export * from './angular/modals/root-view.component'; +export * from './angular/modals/tooltip.directive'; export * from './angular/modals/tour-step.directive'; export * from './angular/modals/tour-template.component'; export * from './angular/modals/tour.service'; -export * from './angular/modals/tooltip.directive'; export * from './angular/pager.component'; export * from './angular/pipes/colors.pipes'; export * from './angular/pipes/date-time.pipes'; @@ -90,6 +90,7 @@ export * from './angular/sync-scrolling.directive'; export * from './angular/sync-width.directive'; export * from './angular/tab-router-link.directive'; export * from './angular/template-wrapper.directive'; +export * from './angular/template.directive'; export * from './angular/title.component'; export * from './angular/toolbar.component'; export * from './angular/video-player.component'; diff --git a/frontend/src/app/framework/module.ts b/frontend/src/app/framework/module.ts index 697e0d0f7..ffdfbbefb 100644 --- a/frontend/src/app/framework/module.ts +++ b/frontend/src/app/framework/module.ts @@ -12,7 +12,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { RouterModule } from '@angular/router'; import { ColorPickerModule } from 'ngx-color-picker'; import { TourService as BaseTourService } from 'ngx-ui-tour-core'; -import { AnalyticsService, AutocompleteComponent, AvatarComponent, CachingInterceptor, CanDeactivateGuard, CheckboxGroupComponent, ClipboardService, CodeComponent, CodeEditorComponent, ColorPickerComponent, CompensateScrollbarDirective, ConfirmClickDirective, ControlErrorsComponent, ControlErrorsMessagesComponent, CopyDirective, CopyGlobalDirective, DarkenPipe, DatePipe, DateTimeEditorComponent, DayOfWeekPipe, DayPipe, DialogRendererComponent, DialogService, DisplayNamePipe, DropdownComponent, DropdownMenuComponent, DurationPipe, EditableTitleComponent, ExternalLinkDirective, FileDropDirective, FileSizePipe, FocusOnInitDirective, FormAlertComponent, FormErrorComponent, FormHintComponent, FromNowPipe, FullDateTimePipe, GlobalErrorHandler, HighlightPipe, HoverBackgroundDirective, IfOnceDirective, ImageSourceDirective, ImageUrlDirective, IndeterminateValueDirective, ISODatePipe, JoinPipe, KeysPipe, KNumberPipe, LanguageSelectorComponent, LayoutComponent, LayoutContainerDirective, LightenPipe, ListViewComponent, LoaderComponent, LoadingInterceptor, LoadingService, LocalizedInputComponent, LocalStoreService, LongHoverDirective, MarkdownDirective, MarkdownInlinePipe, MarkdownPipe, MessageBus, ModalDialogComponent, ModalDirective, ModalPlacementDirective, MonthPipe, PagerComponent, ParentLinkDirective, ProgressBarComponent, RadioGroupComponent, ResizedDirective, ResizeService, ResourceLoaderService, RootViewComponent, SafeHtmlPipe, SafeResourceUrlPipe, SafeUrlPipe, ScrollActiveDirective, ShortcutComponent, ShortcutDirective, ShortcutService, ShortDatePipe, ShortTimePipe, StarsComponent, StatusIconComponent, StopClickDirective, StopDragDirective, StringColorPipe, SyncScollingDirective, SyncWidthDirective, TabRouterlinkDirective, TagEditorComponent, TemplateWrapperDirective, TempService, TitleComponent, TitleService, ToggleComponent, ToolbarComponent, TooltipDirective, TourService, TourStepDirective, TourTemplateComponent, TransformInputDirective, TranslatePipe, VideoPlayerComponent } from './declarations'; +import { AnalyticsService, AutocompleteComponent, AvatarComponent, CachingInterceptor, CanDeactivateGuard, CheckboxGroupComponent, ClipboardService, CodeComponent, CodeEditorComponent, ColorPickerComponent, CompensateScrollbarDirective, ConfirmClickDirective, ControlErrorsComponent, ControlErrorsMessagesComponent, CopyDirective, CopyGlobalDirective, DarkenPipe, DatePipe, DateTimeEditorComponent, DayOfWeekPipe, DayPipe, DialogRendererComponent, DialogService, DisplayNamePipe, DropdownComponent, DropdownMenuComponent, DurationPipe, EditableTitleComponent, ExternalLinkDirective, FileDropDirective, FileSizePipe, FocusOnInitDirective, FormAlertComponent, FormErrorComponent, FormHintComponent, FromNowPipe, FullDateTimePipe, GlobalErrorHandler, HighlightPipe, HoverBackgroundDirective, IfOnceDirective, ImageSourceDirective, ImageUrlDirective, IndeterminateValueDirective, ISODatePipe, JoinPipe, KeysPipe, KNumberPipe, LanguageSelectorComponent, LayoutComponent, LayoutContainerDirective, LightenPipe, ListViewComponent, LoaderComponent, LoadingInterceptor, LoadingService, LocalizedInputComponent, LocalStoreService, LongHoverDirective, MarkdownDirective, MarkdownInlinePipe, MarkdownPipe, MessageBus, ModalDialogComponent, ModalDirective, ModalPlacementDirective, MonthPipe, PagerComponent, ParentLinkDirective, ProgressBarComponent, RadioGroupComponent, ResizedDirective, ResizeService, ResourceLoaderService, RootViewComponent, SafeHtmlPipe, SafeResourceUrlPipe, SafeUrlPipe, ScrollActiveDirective, ShortcutComponent, ShortcutDirective, ShortcutService, ShortDatePipe, ShortTimePipe, SidebarMenuDirective, StarsComponent, StatusIconComponent, StopClickDirective, StopDragDirective, StringColorPipe, SyncScollingDirective, SyncWidthDirective, TabRouterlinkDirective, TagEditorComponent, TemplateWrapperDirective, TempService, TitleComponent, TitleService, ToggleComponent, ToolbarComponent, TooltipDirective, TourService, TourStepDirective, TourTemplateComponent, TransformInputDirective, TranslatePipe, VideoPlayerComponent } from './declarations'; @NgModule({ imports: [ @@ -94,6 +94,7 @@ import { AnalyticsService, AutocompleteComponent, AvatarComponent, CachingInterc ShortcutDirective, ShortDatePipe, ShortTimePipe, + SidebarMenuDirective, StarsComponent, StatusIconComponent, StopClickDirective, @@ -105,8 +106,8 @@ import { AnalyticsService, AutocompleteComponent, AvatarComponent, CachingInterc TagEditorComponent, TemplateWrapperDirective, TitleComponent, - ToolbarComponent, ToggleComponent, + ToolbarComponent, TooltipDirective, TourStepDirective, TourTemplateComponent, @@ -188,6 +189,7 @@ import { AnalyticsService, AutocompleteComponent, AvatarComponent, CachingInterc ShortcutDirective, ShortDatePipe, ShortTimePipe, + SidebarMenuDirective, StarsComponent, StatusIconComponent, StopClickDirective, diff --git a/frontend/src/app/shared/components/tour-hint.directive.ts b/frontend/src/app/shared/components/tour-hint.directive.ts index 3600d17b3..05efc6908 100644 --- a/frontend/src/app/shared/components/tour-hint.directive.ts +++ b/frontend/src/app/shared/components/tour-hint.directive.ts @@ -39,6 +39,10 @@ export class TourHintDirective implements OnInit { ) { } + public ngOnDestroy() { + return; + } + public ngOnInit() { if (!this.anchorId) { return;