From adfef5e7a527babc10f0e515d90a4771454578b3 Mon Sep 17 00:00:00 2001 From: Naveen M K Date: Sat, 11 Nov 2023 02:22:43 +0530 Subject: [PATCH] Add option to run examples directly with binder (#3427) * Add option to run examples directly with binder The minified JS is from https://github.com/naveen521kk/manim-binder * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * slight style changes * update the js file to fix on chrome Signed-off-by: Naveen M K * show the run button as an cursor * make the video to be 100% of the width * Update manim/utils/docbuild/manim_directive.py Co-authored-by: Benjamin Hackl * Add a "Make interactive" button instead of "Run" button Clicking on the "Make interactive" button show the code-editor and "run" button * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update margin for run interactive button --------- Signed-off-by: Naveen M K Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Benjamin Hackl --- docs/source/_static/custom.css | 19 ++++++++++++ docs/source/_static/manim-binder.min.js | 3 ++ .../_static/manim-binder.min.js.LICENSE.txt | 6 ++++ docs/source/_static/manim-binder.min.js.map | 1 + docs/source/conf.py | 4 +-- manim/utils/docbuild/manim_directive.py | 30 ++++++++++++++++++- 6 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 docs/source/_static/manim-binder.min.js create mode 100644 docs/source/_static/manim-binder.min.js.LICENSE.txt create mode 100644 docs/source/_static/manim-binder.min.js.map diff --git a/docs/source/_static/custom.css b/docs/source/_static/custom.css index 59e8cb3e35..2b17007fdc 100644 --- a/docs/source/_static/custom.css +++ b/docs/source/_static/custom.css @@ -82,3 +82,22 @@ h4, h5, h6{ .sidebar-tree a.internal.reference { display: table-cell; } + +.manim-binder-button { + text-transform: capitalize; + padding: 10px 20px; + margin: 10px 0; +} + +.manim-binder-wrapper { + background-color: var(--color-code-background); + color: var(--color-code-foreground); +} + +.manim-binder-title { + margin-top: 0; +} + +.manim-binder-button-wrapper { + margin: 0px 10px; +} diff --git a/docs/source/_static/manim-binder.min.js b/docs/source/_static/manim-binder.min.js new file mode 100644 index 0000000000..2e076c9645 --- /dev/null +++ b/docs/source/_static/manim-binder.min.js @@ -0,0 +1,3 @@ +/*! For license information please see manim-binder.min.js.LICENSE.txt */ +(()=>{var __webpack_modules__={5067:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActivityMonitor=void 0;const n=i(6424);t.ActivityMonitor=class{constructor(e){this._timer=-1,this._timeout=-1,this._isDisposed=!1,this._activityStopped=new n.Signal(this),e.signal.connect(this._onSignalFired,this),this._timeout=e.timeout||1e3}get activityStopped(){return this._activityStopped}get timeout(){return this._timeout}set timeout(e){this._timeout=e}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed||(this._isDisposed=!0,n.Signal.clearData(this))}_onSignalFired(e,t){clearTimeout(this._timer),this._sender=e,this._args=t,this._timer=setTimeout((()=>{this._activityStopped.emit({sender:this._sender,args:this._args})}),this._timeout)}}},4251:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var s=Object.getOwnPropertyDescriptor(t,i);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,s)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),s=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),s(i(5067),t),s(i(6742),t),s(i(5366),t),s(i(6470),t),s(i(5675),t),s(i(5571),t),s(i(1735),t),s(i(1152),t),s(i(5248),t)},6742:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5366:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownCodeBlocks=void 0,function(e){e.CODE_BLOCK_MARKER="```";const t=[".markdown",".mdown",".mkdn",".md",".mkd",".mdwn",".mdtxt",".mdtext",".text",".txt",".Rmd"];class i{constructor(e){this.startLine=e,this.code="",this.endLine=-1}}e.MarkdownCodeBlock=i,e.isMarkdown=function(e){return t.indexOf(e)>-1},e.findMarkdownCodeBlocks=function(t){if(!t||""===t)return[];const n=t.split("\n"),s=[];let r=null;for(let t=0;te===t||n&&e===n))},e.isDisabled=function(t){const i=t.indexOf(":");let n="";return-1!==i&&(n=t.slice(0,i)),e.disabled.some((e=>e===t||n&&e===n))}}(Extension=PageConfig.Extension||(PageConfig.Extension={}))})(PageConfig=exports.PageConfig||(exports.PageConfig={}))},5675:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PathExt=void 0;const n=i(2005);!function(e){function t(e){return 0===e.indexOf("/")&&(e=e.slice(1)),e}e.join=function(...e){const i=n.posix.join(...e);return"."===i?"":t(i)},e.basename=function(e,t){return n.posix.basename(e,t)},e.dirname=function(e){const i=t(n.posix.dirname(e));return"."===i?"":i},e.extname=function(e){return n.posix.extname(e)},e.normalize=function(e){return""===e?"":t(n.posix.normalize(e))},e.resolve=function(...e){return t(n.posix.resolve(...e))},e.relative=function(e,i){return t(n.posix.relative(e,i))},e.normalizeExtension=function(e){return e.length>0&&0!==e.indexOf(".")&&(e=`.${e}`),e},e.removeSlash=t}(t.PathExt||(t.PathExt={}))},5571:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.signalToPromise=void 0;const n=i(3911);t.signalToPromise=function(e,t){const i=new n.PromiseDelegate;function s(){e.disconnect(r)}function r(e,t){s(),i.resolve([e,t])}return e.connect(r),(null!=t?t:0)>0&&setTimeout((()=>{s(),i.reject(`Signal not emitted within ${t} ms.`)}),t),i.promise}},1735:(e,t)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.Text=void 0,(i=t.Text||(t.Text={})).jsIndexToCharIndex=function(e,t){return e},i.charIndexToJsIndex=function(e,t){return e},i.camelCase=function(e,t=!1){return e.replace(/^(\w)|[\s-_:]+(\w)/g,(function(e,i,n){return n?n.toUpperCase():t?i.toUpperCase():i.toLowerCase()}))},i.titleCase=function(e){return(e||"").toLowerCase().split(" ").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" ")}},1152:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Time=void 0;const i=[{name:"years",milliseconds:31536e6},{name:"months",milliseconds:2592e6},{name:"days",milliseconds:864e5},{name:"hours",milliseconds:36e5},{name:"minutes",milliseconds:6e4},{name:"seconds",milliseconds:1e3}];var n;(n=t.Time||(t.Time={})).formatHuman=function(e){const t=document.documentElement.lang||"en",n=new Intl.RelativeTimeFormat(t,{numeric:"auto"}),s=new Date(e).getTime()-Date.now();for(let e of i){const t=Math.ceil(s/e.milliseconds);if(0!==t)return n.format(t,e.name)}return n.format(0,"seconds")},n.format=function(e){const t=document.documentElement.lang||"en";return new Intl.DateTimeFormat(t,{dateStyle:"short",timeStyle:"short"}).format(new Date(e))}},5248:function(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.URLExt=void 0;const s=i(2005),r=n(i(2296));!function(e){function t(e){if("undefined"!=typeof document&&document){const t=document.createElement("a");return t.href=e,t}return(0,r.default)(e)}function i(...e){let t=(0,r.default)(e[0],{});const i=""===t.protocol&&t.slashes;i&&(t=(0,r.default)(e[0],"https:"+e[0]));const n=`${i?"":t.protocol}${t.slashes?"//":""}${t.auth}${t.auth?"@":""}${t.host}`,o=s.posix.join(`${n&&"/"!==t.pathname[0]?"/":""}${t.pathname}`,...e.slice(1));return`${n}${"."===o?"":o}`}e.parse=t,e.getHostName=function(e){return(0,r.default)(e).hostname},e.normalize=function(e){return e&&t(e).toString()},e.join=i,e.encodeParts=function(e){return i(...e.split("/").map(encodeURIComponent))},e.objectToQueryString=function(e){const t=Object.keys(e).filter((e=>e.length>0));return t.length?"?"+t.map((t=>{const i=encodeURIComponent(String(e[t]));return t+(i?"="+i:"")})).join("&"):""},e.queryStringToObject=function(e){return e.replace(/^\?/,"").split("&").reduce(((e,t)=>{const[i,n]=t.split("=");return i.length>0&&(e[i]=decodeURIComponent(n||"")),e}),{})},e.isLocal=function(e){const{protocol:i}=t(e);return(!i||0!==e.toLowerCase().indexOf(i))&&0!==e.indexOf("/")}}(t.URLExt||(t.URLExt={}))},7524:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseManager=void 0;const n=i(6424),s=i(538);t.BaseManager=class{constructor(e){var t;this._isDisposed=!1,this._disposed=new n.Signal(this),this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:s.ServerConnection.makeSettings()}get disposed(){return this._disposed}get isDisposed(){return this._isDisposed}get isActive(){return!0}dispose(){this.isDisposed||(this._disposed.emit(void 0),n.Signal.clearData(this))}}},4011:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BuildManager=void 0;const n=i(4251),s=i(538);t.BuildManager=class{constructor(e={}){var t;this._url="",this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:s.ServerConnection.makeSettings();const{baseUrl:i,appUrl:r}=this.serverSettings;this._url=n.URLExt.join(i,r,"api/build")}get isAvailable(){return"true"===n.PageConfig.getOption("buildAvailable").toLowerCase()}get shouldCheck(){return"true"===n.PageConfig.getOption("buildCheck").toLowerCase()}getStatus(){const{_url:e,serverSettings:t}=this;return s.ServerConnection.makeRequest(e,{},t).then((e=>{if(200!==e.status)throw new s.ServerConnection.ResponseError(e);return e.json()})).then((e=>{if("string"!=typeof e.status)throw new Error("Invalid data");if("string"!=typeof e.message)throw new Error("Invalid data");return e}))}build(){const{_url:e,serverSettings:t}=this;return s.ServerConnection.makeRequest(e,{method:"POST"},t).then((e=>{if(400===e.status)throw new s.ServerConnection.ResponseError(e,"Build aborted");if(200!==e.status){const t=`Build failed with ${e.status}.\n\n If you are experiencing the build failure after installing an extension (or trying to include previously installed extension after updating JupyterLab) please check the extension repository for new installation instructions as many extensions migrated to the prebuilt extensions system which no longer requires rebuilding JupyterLab (but uses a different installation procedure, typically involving a package manager such as 'pip' or 'conda').\n\n If you specifically intended to install a source extension, please run 'jupyter lab build' on the server for full output.`;throw new s.ServerConnection.ResponseError(e,t)}}))}cancel(){const{_url:e,serverSettings:t}=this;return s.ServerConnection.makeRequest(e,{method:"DELETE"},t).then((e=>{if(204!==e.status)throw new s.ServerConnection.ResponseError(e)}))}}},7302:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigWithDefaults=t.ConfigSection=void 0;const n=i(4251),s=i(5247);(t.ConfigSection||(t.ConfigSection={})).create=function(e){const t=new r(e);return t.load().then((()=>t))};class r{constructor(e){var t;this._url="unknown";const i=this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:s.ServerConnection.makeSettings();this._url=n.URLExt.join(i.baseUrl,"api/config",encodeURIComponent(e.name))}get data(){return this._data}async load(){const e=await s.ServerConnection.makeRequest(this._url,{},this.serverSettings);if(200!==e.status)throw await s.ServerConnection.ResponseError.create(e);this._data=await e.json()}async update(e){this._data={...this._data,...e};const t={method:"PATCH",body:JSON.stringify(e)},i=await s.ServerConnection.makeRequest(this._url,t,this.serverSettings);if(200!==i.status)throw await s.ServerConnection.ResponseError.create(i);return this._data=await i.json(),this._data}}t.ConfigWithDefaults=class{constructor(e){var t,i;this._className="",this._section=e.section,this._defaults=null!==(t=e.defaults)&&void 0!==t?t:{},this._className=null!==(i=e.className)&&void 0!==i?i:""}get(e){const t=this._classData();return e in t?t[e]:this._defaults[e]}set(e,t){const i={};if(i[e]=t,this._className){const e={};return e[this._className]=i,this._section.update(e)}return this._section.update(i)}_classData(){const e=this._section.data;return this._className&&this._className in e?e[this._className]:e}}},1708:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var s=Object.getOwnPropertyDescriptor(t,i);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,s)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return s(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Drive=t.ContentsManager=t.Contents=void 0;const o=i(4251),a=i(6424),l=i(5247),h=r(i(3394));var c,d;(d=t.Contents||(t.Contents={})).validateContentsModel=function(e){h.validateContentsModel(e)},d.validateCheckpointModel=function(e){h.validateCheckpointModel(e)},t.ContentsManager=class{constructor(e={}){var t,i;this._isDisposed=!1,this._additionalDrives=new Map,this._fileChanged=new a.Signal(this);const n=this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:l.ServerConnection.makeSettings();this._defaultDrive=null!==(i=e.defaultDrive)&&void 0!==i?i:new u({serverSettings:n}),this._defaultDrive.fileChanged.connect(this._onFileChanged,this)}get fileChanged(){return this._fileChanged}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,a.Signal.clearData(this))}addDrive(e){this._additionalDrives.set(e.name,e),e.fileChanged.connect(this._onFileChanged,this)}getSharedModelFactory(e){var t;const[i]=this._driveForPath(e);return null!==(t=null==i?void 0:i.sharedModelFactory)&&void 0!==t?t:null}localPath(e){const t=e.split("/"),i=t[0].split(":");return 1!==i.length&&this._additionalDrives.has(i[0])?o.PathExt.join(i.slice(1).join(":"),...t.slice(1)):o.PathExt.removeSlash(e)}normalize(e){const t=e.split(":");return 1===t.length?o.PathExt.normalize(e):`${t[0]}:${o.PathExt.normalize(t.slice(1).join(":"))}`}resolvePath(e,t){const i=this.driveName(e),n=this.localPath(e),s=o.PathExt.resolve("/",n,t);return i?`${i}:${s}`:s}driveName(e){const t=e.split("/")[0].split(":");return 1===t.length?"":this._additionalDrives.has(t[0])?t[0]:""}get(e,t){const[i,n]=this._driveForPath(e);return i.get(n,t).then((e=>{const t=[];if("directory"===e.type&&e.content){for(const n of e.content)t.push({...n,path:this._toGlobalPath(i,n.path)});return{...e,path:this._toGlobalPath(i,n),content:t,serverPath:e.path}}return{...e,path:this._toGlobalPath(i,n),serverPath:e.path}}))}getDownloadUrl(e){const[t,i]=this._driveForPath(e);return t.getDownloadUrl(i)}newUntitled(e={}){if(e.path){const t=this.normalize(e.path),[i,n]=this._driveForPath(t);return i.newUntitled({...e,path:n}).then((e=>({...e,path:o.PathExt.join(t,e.name),serverPath:e.path})))}return this._defaultDrive.newUntitled(e)}delete(e){const[t,i]=this._driveForPath(e);return t.delete(i)}rename(e,t){const[i,n]=this._driveForPath(e),[s,r]=this._driveForPath(t);if(i!==s)throw Error("ContentsManager: renaming files must occur within a Drive");return i.rename(n,r).then((e=>({...e,path:this._toGlobalPath(i,r),serverPath:e.path})))}save(e,t={}){const i=this.normalize(e),[n,s]=this._driveForPath(e);return n.save(s,{...t,path:s}).then((e=>({...e,path:i,serverPath:e.path})))}copy(e,t){const[i,n]=this._driveForPath(e),[s,r]=this._driveForPath(t);if(i===s)return i.copy(n,r).then((e=>({...e,path:this._toGlobalPath(i,e.path),serverPath:e.path})));throw Error("Copying files between drives is not currently implemented")}createCheckpoint(e){const[t,i]=this._driveForPath(e);return t.createCheckpoint(i)}listCheckpoints(e){const[t,i]=this._driveForPath(e);return t.listCheckpoints(i)}restoreCheckpoint(e,t){const[i,n]=this._driveForPath(e);return i.restoreCheckpoint(n,t)}deleteCheckpoint(e,t){const[i,n]=this._driveForPath(e);return i.deleteCheckpoint(n,t)}_toGlobalPath(e,t){return e===this._defaultDrive?o.PathExt.removeSlash(t):`${e.name}:${o.PathExt.removeSlash(t)}`}_driveForPath(e){const t=this.driveName(e),i=this.localPath(e);return t?[this._additionalDrives.get(t),i]:[this._defaultDrive,i]}_onFileChanged(e,t){var i,n;if(e===this._defaultDrive)this._fileChanged.emit(t);else{let s=null,r=null;(null===(i=t.newValue)||void 0===i?void 0:i.path)&&(s={...t.newValue,path:this._toGlobalPath(e,t.newValue.path)}),(null===(n=t.oldValue)||void 0===n?void 0:n.path)&&(r={...t.oldValue,path:this._toGlobalPath(e,t.oldValue.path)}),this._fileChanged.emit({type:t.type,newValue:s,oldValue:r})}}};class u{constructor(e={}){var t,i,n;this._isDisposed=!1,this._fileChanged=new a.Signal(this),this.name=null!==(t=e.name)&&void 0!==t?t:"Default",this._apiEndpoint=null!==(i=e.apiEndpoint)&&void 0!==i?i:"api/contents",this.serverSettings=null!==(n=e.serverSettings)&&void 0!==n?n:l.ServerConnection.makeSettings()}get fileChanged(){return this._fileChanged}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,a.Signal.clearData(this))}async get(e,t){let i=this._getUrl(e);if(t){"notebook"===t.type&&delete t.format;const e=t.content?"1":"0",n={...t,content:e};i+=o.URLExt.objectToQueryString(n)}const n=this.serverSettings,s=await l.ServerConnection.makeRequest(i,{},n);if(200!==s.status)throw await l.ServerConnection.ResponseError.create(s);const r=await s.json();return h.validateContentsModel(r),r}getDownloadUrl(e){const t=this.serverSettings.baseUrl;let i=o.URLExt.join(t,"files",o.URLExt.encodeParts(e));const n=document.cookie.match("\\b_xsrf=([^;]*)\\b");if(n){const e=new URL(i);e.searchParams.append("_xsrf",n[1]),i=e.toString()}return Promise.resolve(i)}async newUntitled(e={}){var t;let i="{}";e&&(e.ext&&(e.ext=c.normalizeExtension(e.ext)),i=JSON.stringify(e));const n=this.serverSettings,s=this._getUrl(null!==(t=e.path)&&void 0!==t?t:""),r={method:"POST",body:i},o=await l.ServerConnection.makeRequest(s,r,n);if(201!==o.status)throw await l.ServerConnection.ResponseError.create(o);const a=await o.json();return h.validateContentsModel(a),this._fileChanged.emit({type:"new",oldValue:null,newValue:a}),a}async delete(e){const t=this._getUrl(e),i=this.serverSettings,n=await l.ServerConnection.makeRequest(t,{method:"DELETE"},i);if(204!==n.status)throw await l.ServerConnection.ResponseError.create(n);this._fileChanged.emit({type:"delete",oldValue:{path:e},newValue:null})}async rename(e,t){const i=this.serverSettings,n=this._getUrl(e),s={method:"PATCH",body:JSON.stringify({path:t})},r=await l.ServerConnection.makeRequest(n,s,i);if(200!==r.status)throw await l.ServerConnection.ResponseError.create(r);const o=await r.json();return h.validateContentsModel(o),this._fileChanged.emit({type:"rename",oldValue:{path:e},newValue:o}),o}async save(e,t={}){const i=this.serverSettings,n=this._getUrl(e),s={method:"PUT",body:JSON.stringify(t)},r=await l.ServerConnection.makeRequest(n,s,i);if(200!==r.status&&201!==r.status)throw await l.ServerConnection.ResponseError.create(r);const o=await r.json();return h.validateContentsModel(o),this._fileChanged.emit({type:"save",oldValue:null,newValue:o}),o}async copy(e,t){const i=this.serverSettings,n=this._getUrl(t),s={method:"POST",body:JSON.stringify({copy_from:e})},r=await l.ServerConnection.makeRequest(n,s,i);if(201!==r.status)throw await l.ServerConnection.ResponseError.create(r);const o=await r.json();return h.validateContentsModel(o),this._fileChanged.emit({type:"new",oldValue:null,newValue:o}),o}async createCheckpoint(e){const t=this._getUrl(e,"checkpoints"),i=await l.ServerConnection.makeRequest(t,{method:"POST"},this.serverSettings);if(201!==i.status)throw await l.ServerConnection.ResponseError.create(i);const n=await i.json();return h.validateCheckpointModel(n),n}async listCheckpoints(e){const t=this._getUrl(e,"checkpoints"),i=await l.ServerConnection.makeRequest(t,{},this.serverSettings);if(200!==i.status)throw await l.ServerConnection.ResponseError.create(i);const n=await i.json();if(!Array.isArray(n))throw new Error("Invalid Checkpoint list");for(let e=0;eo.URLExt.encodeParts(e))),i=this.serverSettings.baseUrl;return o.URLExt.join(i,this._apiEndpoint,...t)}}t.Drive=u,function(e){e.normalizeExtension=function(e){return e.length>0&&0!==e.indexOf(".")&&(e=`.${e}`),e}}(c||(c={}))},3394:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateCheckpointModel=t.validateContentsModel=void 0;const n=i(3247);t.validateContentsModel=function(e){(0,n.validateProperty)(e,"name","string"),(0,n.validateProperty)(e,"path","string"),(0,n.validateProperty)(e,"type","string"),(0,n.validateProperty)(e,"created","string"),(0,n.validateProperty)(e,"last_modified","string"),(0,n.validateProperty)(e,"mimetype","object"),(0,n.validateProperty)(e,"content","object"),(0,n.validateProperty)(e,"format","object")},t.validateCheckpointModel=function(e){(0,n.validateProperty)(e,"id","string"),(0,n.validateProperty)(e,"last_modified","string")}},5657:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventManager=void 0;const n=i(4251),s=i(9044),r=i(6424),o=i(538),a="api/events";t.EventManager=class{constructor(e={}){var t;this._socket=null,this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:o.ServerConnection.makeSettings(),this._poll=new s.Poll({factory:()=>this._subscribe()}),this._stream=new r.Stream(this),this._poll.start()}get isDisposed(){return this._poll.isDisposed}get stream(){return this._stream}dispose(){if(this.isDisposed)return;this._poll.dispose();const e=this._socket;e&&(this._socket=null,e.onopen=()=>{},e.onerror=()=>{},e.onmessage=()=>{},e.onclose=()=>{},e.close()),r.Signal.clearData(this),this._stream.stop()}async emit(e){const{serverSettings:t}=this,{baseUrl:i,token:s}=t,{makeRequest:r,ResponseError:l}=o.ServerConnection,h=n.URLExt.join(i,a)+(s?`?token=${s}`:""),c={body:JSON.stringify(e),method:"POST"},d=await r(h,c,t);if(204!==d.status)throw new l(d)}_subscribe(){return new Promise(((e,t)=>{if(this.isDisposed)return;const{token:i,WebSocket:s,wsUrl:r}=this.serverSettings,o=n.URLExt.join(r,a,"subscribe")+(i?`?token=${encodeURIComponent(i)}`:""),l=this._socket=new s(o),h=this._stream;l.onclose=()=>t(new Error("EventManager socket closed")),l.onmessage=e=>e.data&&h.emit(JSON.parse(e.data))}))}}},5247:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var s=Object.getOwnPropertyDescriptor(t,i);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,s)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),s=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),s(i(7524),t),s(i(7302),t),s(i(1708),t),s(i(5657),t),s(i(5674),t),s(i(3490),t),s(i(7797),t),s(i(538),t),s(i(3561),t),s(i(9188),t),s(i(3185),t),s(i(1014),t),s(i(9090),t),s(i(6624),t)},8341:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var s=Object.getOwnPropertyDescriptor(t,i);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,s)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return s(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CommHandler=void 0;const o=i(1122),a=r(i(1736));class l extends o.DisposableDelegate{constructor(e,t,i,n){super(n),this._target="",this._id="",this._id=t,this._target=e,this._kernel=i}get commId(){return this._id}get targetName(){return this._target}get onClose(){return this._onClose}set onClose(e){this._onClose=e}get onMsg(){return this._onMsg}set onMsg(e){this._onMsg=e}open(e,t,i=[]){if(this.isDisposed||this._kernel.isDisposed)throw new Error("Cannot open");const n=a.createMessage({msgType:"comm_open",channel:"shell",username:this._kernel.username,session:this._kernel.clientId,content:{comm_id:this._id,target_name:this._target,data:null!=e?e:{}},metadata:t,buffers:i});return this._kernel.sendShellMessage(n,!1,!0)}send(e,t,i=[],n=!0){if(this.isDisposed||this._kernel.isDisposed)throw new Error("Cannot send");const s=a.createMessage({msgType:"comm_msg",channel:"shell",username:this._kernel.username,session:this._kernel.clientId,content:{comm_id:this._id,data:e},metadata:t,buffers:i});return this._kernel.sendShellMessage(s,!1,n)}close(e,t,i=[]){if(this.isDisposed||this._kernel.isDisposed)throw new Error("Cannot close");const n=a.createMessage({msgType:"comm_close",channel:"shell",username:this._kernel.username,session:this._kernel.clientId,content:{comm_id:this._id,data:null!=e?e:{}},metadata:t,buffers:i}),s=this._kernel.sendShellMessage(n,!1,!0),r=this._onClose;return r&&r(a.createMessage({msgType:"comm_close",channel:"iopub",username:this._kernel.username,session:this._kernel.clientId,content:{comm_id:this._id,data:null!=e?e:{}},metadata:t,buffers:i})),this.dispose(),s}}t.CommHandler=l},5306:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var s=Object.getOwnPropertyDescriptor(t,i);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,s)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return s(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.KernelConnection=void 0;const o=i(4251),a=i(3911),l=i(6424),h=i(5247),c=i(8341),d=r(i(1736)),u=i(217),p=i(8206),f=r(i(776)),m=i(3490),g=r(i(9753)),v="_RESTARTING_";class O{constructor(e){var t,i,n,s;this._createSocket=(e=!0)=>{this._errorIfDisposed(),this._clearSocket(),this._updateConnectionStatus("connecting");const t=this.serverSettings,i=o.URLExt.join(t.wsUrl,g.KERNEL_SERVICE_URL,encodeURIComponent(this._id)),n=i.replace(/^((?:\w+:)?\/\/)(?:[^@\/]+@)/,"$1");console.debug(`Starting WebSocket: ${n}`);let s=o.URLExt.join(i,"channels?session_id="+encodeURIComponent(this._clientId));const r=t.token;t.appendToken&&""!==r&&(s+=`&token=${encodeURIComponent(r)}`);const a=e?this._supportedProtocols:[];this._ws=new t.WebSocket(s,a),this._ws.binaryType="arraybuffer";let l=!1;const c=async e=>{var i,n;if(!this._isDisposed){this._reason="",this._model=void 0;try{const i=await g.getKernelModel(this._id,t);this._model=i,"dead"===(null==i?void 0:i.execution_state)?this._updateStatus("dead"):this._onWSClose(e)}catch(t){if(t instanceof h.ServerConnection.NetworkError||503===(null===(i=t.response)||void 0===i?void 0:i.status)||424===(null===(n=t.response)||void 0===n?void 0:n.status)){const t=1e3*b.getRandomIntInclusive(10,30);setTimeout(c,t,e)}else this._reason="Kernel died unexpectedly",this._updateStatus("dead")}}},d=async e=>{l||(l=!0,await c(e))};this._ws.onmessage=this._onWSMessage,this._ws.onopen=this._onWSOpen,this._ws.onclose=d,this._ws.onerror=d},this._onWSOpen=e=>{if(""!==this._ws.protocol&&!this._supportedProtocols.includes(this._ws.protocol))throw console.log("Server selected unknown kernel wire protocol:",this._ws.protocol),this._updateStatus("dead"),new Error(`Unknown kernel wire protocol: ${this._ws.protocol}`);this._selectedProtocol=this._ws.protocol,this._ws.onclose=this._onWSClose,this._ws.onerror=this._onWSClose,this._updateConnectionStatus("connected")},this._onWSMessage=e=>{let t;try{t=(0,p.deserialize)(e.data,this._ws.protocol),f.validateMessage(t)}catch(e){throw e.message=`Kernel message validation error: ${e.message}`,e}this._kernelSession=t.header.session,this._msgChain=this._msgChain.then((()=>this._handleMessage(t))).catch((e=>{e.message.startsWith("Canceled future for ")&&console.error(e)})),this._anyMessage.emit({msg:t,direction:"recv"})},this._onWSClose=e=>{this.isDisposed||this._reconnect()},this._id="",this._name="",this._status="unknown",this._connectionStatus="connecting",this._kernelSession="",this._isDisposed=!1,this._ws=null,this._username="",this._reconnectLimit=7,this._reconnectAttempt=0,this._reconnectTimeout=null,this._supportedProtocols=Object.values(d.supportedKernelWebSocketProtocols),this._selectedProtocol="",this._futures=new Map,this._comms=new Map,this._targetRegistry=Object.create(null),this._info=new a.PromiseDelegate,this._pendingMessages=[],this._statusChanged=new l.Signal(this),this._connectionStatusChanged=new l.Signal(this),this._disposed=new l.Signal(this),this._iopubMessage=new l.Signal(this),this._anyMessage=new l.Signal(this),this._pendingInput=new l.Signal(this),this._unhandledMessage=new l.Signal(this),this._displayIdToParentIds=new Map,this._msgIdToDisplayIds=new Map,this._msgChain=Promise.resolve(),this._hasPendingInput=!1,this._reason="",this._noOp=()=>{},this._name=e.model.name,this._id=e.model.id,this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:h.ServerConnection.makeSettings(),this._clientId=null!==(i=e.clientId)&&void 0!==i?i:a.UUID.uuid4(),this._username=null!==(n=e.username)&&void 0!==n?n:"",this.handleComms=null===(s=e.handleComms)||void 0===s||s,this._createSocket()}get disposed(){return this._disposed}get statusChanged(){return this._statusChanged}get connectionStatusChanged(){return this._connectionStatusChanged}get iopubMessage(){return this._iopubMessage}get unhandledMessage(){return this._unhandledMessage}get model(){return this._model||{id:this.id,name:this.name,reason:this._reason}}get anyMessage(){return this._anyMessage}get pendingInput(){return this._pendingInput}get id(){return this._id}get name(){return this._name}get username(){return this._username}get clientId(){return this._clientId}get status(){return this._status}get connectionStatus(){return this._connectionStatus}get isDisposed(){return this._isDisposed}get info(){return this._info.promise}get spec(){return this._specPromise||(this._specPromise=m.KernelSpecAPI.getSpecs(this.serverSettings).then((e=>e.kernelspecs[this._name]))),this._specPromise}clone(e={}){return new O({model:this.model,username:this.username,serverSettings:this.serverSettings,handleComms:!1,...e})}dispose(){this.isDisposed||(this._isDisposed=!0,this._disposed.emit(),this._updateConnectionStatus("disconnected"),this._clearKernelState(),this._pendingMessages=[],this._clearSocket(),l.Signal.clearData(this))}sendShellMessage(e,t=!1,i=!0){return this._sendKernelShellControl(u.KernelShellFutureHandler,e,t,i)}sendControlMessage(e,t=!1,i=!0){return this._sendKernelShellControl(u.KernelControlFutureHandler,e,t,i)}_sendKernelShellControl(e,t,i=!1,n=!0){this._sendMessage(t),this._anyMessage.emit({msg:t,direction:"send"});const s=new e((()=>{const e=t.header.msg_id;this._futures.delete(e);const i=this._msgIdToDisplayIds.get(e);i&&(i.forEach((t=>{const i=this._displayIdToParentIds.get(t);if(i){const n=i.indexOf(e);if(-1===n)return;1===i.length?this._displayIdToParentIds.delete(t):(i.splice(n,1),this._displayIdToParentIds.set(t,i))}})),this._msgIdToDisplayIds.delete(e))}),t,i,n,this);return this._futures.set(t.header.msg_id,s),s}_sendMessage(e,t=!0){if("dead"===this.status)throw new Error("Kernel is dead");if((""===this._kernelSession||this._kernelSession===v)&&d.isInfoRequestMsg(e)){if("connected"===this.connectionStatus)return void this._ws.send((0,p.serialize)(e,this._ws.protocol));throw new Error("Could not send message: status is not connected")}if(t&&this._pendingMessages.length>0)this._pendingMessages.push(e);else if("connected"===this.connectionStatus&&this._kernelSession!==v)this._ws.send((0,p.serialize)(e,this._ws.protocol));else{if(!t)throw new Error("Could not send message");this._pendingMessages.push(e)}}async interrupt(){if(this.hasPendingInput=!1,"dead"===this.status)throw new Error("Kernel is dead");return g.interruptKernel(this.id,this.serverSettings)}async restart(){if("dead"===this.status)throw new Error("Kernel is dead");this._updateStatus("restarting"),this._clearKernelState(),this._kernelSession=v,await g.restartKernel(this.id,this.serverSettings),await this.reconnect(),this.hasPendingInput=!1}reconnect(){this._errorIfDisposed();const e=new a.PromiseDelegate,t=(i,n)=>{"connected"===n?(e.resolve(),this.connectionStatusChanged.disconnect(t,this)):"disconnected"===n&&(e.reject(new Error("Kernel connection disconnected")),this.connectionStatusChanged.disconnect(t,this))};return this.connectionStatusChanged.connect(t,this),this._reconnectAttempt=0,this._reconnect(),e.promise}async shutdown(){"dead"!==this.status&&await g.shutdownKernel(this.id,this.serverSettings),this.handleShutdown()}handleShutdown(){this._updateStatus("dead"),this.dispose()}async requestKernelInfo(){const e=d.createMessage({msgType:"kernel_info_request",channel:"shell",username:this._username,session:this._clientId,content:{}});let t;try{t=await b.handleShellMessage(this,e)}catch(e){if(this.isDisposed)return;throw e}if(this._errorIfDisposed(),t)return void 0===t.content.status&&(t.content.status="ok"),"ok"!==t.content.status?(this._info.reject("Kernel info reply errored"),t):(this._info.resolve(t.content),this._kernelSession=t.header.session,t)}requestComplete(e){const t=d.createMessage({msgType:"complete_request",channel:"shell",username:this._username,session:this._clientId,content:e});return b.handleShellMessage(this,t)}requestInspect(e){const t=d.createMessage({msgType:"inspect_request",channel:"shell",username:this._username,session:this._clientId,content:e});return b.handleShellMessage(this,t)}requestHistory(e){const t=d.createMessage({msgType:"history_request",channel:"shell",username:this._username,session:this._clientId,content:e});return b.handleShellMessage(this,t)}requestExecute(e,t=!0,i){const n=d.createMessage({msgType:"execute_request",channel:"shell",username:this._username,session:this._clientId,content:{silent:!1,store_history:!0,user_expressions:{},allow_stdin:!0,stop_on_error:!1,...e},metadata:i});return this.sendShellMessage(n,!0,t)}requestDebug(e,t=!0){const i=d.createMessage({msgType:"debug_request",channel:"control",username:this._username,session:this._clientId,content:e});return this.sendControlMessage(i,!0,t)}requestIsComplete(e){const t=d.createMessage({msgType:"is_complete_request",channel:"shell",username:this._username,session:this._clientId,content:e});return b.handleShellMessage(this,t)}requestCommInfo(e){const t=d.createMessage({msgType:"comm_info_request",channel:"shell",username:this._username,session:this._clientId,content:e});return b.handleShellMessage(this,t)}sendInputReply(e,t){const i=d.createMessage({msgType:"input_reply",channel:"stdin",username:this._username,session:this._clientId,content:e});i.parent_header=t,this._sendMessage(i),this._anyMessage.emit({msg:i,direction:"send"}),this.hasPendingInput=!1}createComm(e,t=a.UUID.uuid4()){if(!this.handleComms)throw new Error("Comms are disabled on this kernel connection");if(this._comms.has(t))throw new Error("Comm is already created");const i=new c.CommHandler(e,t,this,(()=>{this._unregisterComm(t)}));return this._comms.set(t,i),i}hasComm(e){return this._comms.has(e)}registerCommTarget(e,t){this.handleComms&&(this._targetRegistry[e]=t)}removeCommTarget(e,t){this.handleComms&&(this.isDisposed||this._targetRegistry[e]!==t||delete this._targetRegistry[e])}registerMessageHook(e,t){var i;const n=null===(i=this._futures)||void 0===i?void 0:i.get(e);n&&n.registerMessageHook(t)}removeMessageHook(e,t){var i;const n=null===(i=this._futures)||void 0===i?void 0:i.get(e);n&&n.removeMessageHook(t)}removeInputGuard(){this.hasPendingInput=!1}async _handleDisplayId(e,t){var i,n;const s=t.parent_header.msg_id;let r=this._displayIdToParentIds.get(e);if(r){const e={header:a.JSONExt.deepCopy(t.header),parent_header:a.JSONExt.deepCopy(t.parent_header),metadata:a.JSONExt.deepCopy(t.metadata),content:a.JSONExt.deepCopy(t.content),channel:t.channel,buffers:t.buffers?t.buffers.slice():[]};e.header.msg_type="update_display_data",await Promise.all(r.map((async t=>{const i=this._futures&&this._futures.get(t);i&&await i.handleMsg(e)})))}if("update_display_data"===t.header.msg_type)return!0;r=null!==(i=this._displayIdToParentIds.get(e))&&void 0!==i?i:[],-1===r.indexOf(s)&&r.push(s),this._displayIdToParentIds.set(e,r);const o=null!==(n=this._msgIdToDisplayIds.get(s))&&void 0!==n?n:[];return-1===o.indexOf(s)&&o.push(s),this._msgIdToDisplayIds.set(s,o),!1}_clearSocket(){null!==this._ws&&(this._ws.onopen=this._noOp,this._ws.onclose=this._noOp,this._ws.onerror=this._noOp,this._ws.onmessage=this._noOp,this._ws.close(),this._ws=null)}_updateStatus(e){this._status!==e&&"dead"!==this._status&&(this._status=e,b.logKernelStatus(this),this._statusChanged.emit(e),"dead"===e&&this.dispose())}_sendPending(){for(;"connected"===this.connectionStatus&&this._kernelSession!==v&&this._pendingMessages.length>0;)this._sendMessage(this._pendingMessages[0],!1),this._pendingMessages.shift()}_clearKernelState(){this._kernelSession="",this._pendingMessages=[],this._futures.forEach((e=>{e.dispose()})),this._comms.forEach((e=>{e.dispose()})),this._msgChain=Promise.resolve(),this._futures=new Map,this._comms=new Map,this._displayIdToParentIds.clear(),this._msgIdToDisplayIds.clear()}_assertCurrentMessage(e){if(this._errorIfDisposed(),e.header.session!==this._kernelSession)throw new Error(`Canceling handling of old message: ${e.header.msg_type}`)}async _handleCommOpen(e){this._assertCurrentMessage(e);const t=e.content,i=new c.CommHandler(t.target_name,t.comm_id,this,(()=>{this._unregisterComm(t.comm_id)}));this._comms.set(t.comm_id,i);try{const n=await b.loadObject(t.target_name,t.target_module,this._targetRegistry);await n(i,e)}catch(e){throw i.close(),console.error("Exception opening new comm"),e}}async _handleCommClose(e){this._assertCurrentMessage(e);const t=e.content,i=this._comms.get(t.comm_id);if(!i)return void console.error("Comm not found for comm id "+t.comm_id);this._unregisterComm(i.commId);const n=i.onClose;n&&await n(e),i.dispose()}async _handleCommMsg(e){this._assertCurrentMessage(e);const t=e.content,i=this._comms.get(t.comm_id);if(!i)return;const n=i.onMsg;n&&await n(e)}_unregisterComm(e){this._comms.delete(e)}_updateConnectionStatus(e){if(this._connectionStatus!==e){if(this._connectionStatus=e,"connecting"!==e&&(this._reconnectAttempt=0,clearTimeout(this._reconnectTimeout)),"dead"!==this.status)if("connected"===e){let e=this._kernelSession===v,t=this.requestKernelInfo(),i=!1,n=()=>{i||(i=!0,e&&this._kernelSession===v&&(this._kernelSession=""),clearTimeout(s),this._pendingMessages.length>0&&this._sendPending())};t.then(n);let s=setTimeout(n,3e3)}else this._updateStatus("unknown");this._connectionStatusChanged.emit(e)}}async _handleMessage(e){var t,i;let n=!1;if(e.parent_header&&"iopub"===e.channel&&(d.isDisplayDataMsg(e)||d.isUpdateDisplayDataMsg(e)||d.isExecuteResultMsg(e))){const i=(null!==(t=e.content.transient)&&void 0!==t?t:{}).display_id;i&&(n=await this._handleDisplayId(i,e),this._assertCurrentMessage(e))}if(!n&&e.parent_header){const t=e.parent_header,n=null===(i=this._futures)||void 0===i?void 0:i.get(t.msg_id);if(n)await n.handleMsg(e),this._assertCurrentMessage(e);else{const i=t.session===this.clientId;"iopub"!==e.channel&&i&&this._unhandledMessage.emit(e)}}if("iopub"===e.channel){switch(e.header.msg_type){case"status":{const t=e.content.execution_state;"restarting"===t&&Promise.resolve().then((async()=>{this._updateStatus("autorestarting"),this._clearKernelState(),await this.reconnect()})),this._updateStatus(t);break}case"comm_open":this.handleComms&&await this._handleCommOpen(e);break;case"comm_msg":this.handleComms&&await this._handleCommMsg(e);break;case"comm_close":this.handleComms&&await this._handleCommClose(e)}this.isDisposed||(this._assertCurrentMessage(e),this._iopubMessage.emit(e))}}_reconnect(){if(this._errorIfDisposed(),clearTimeout(this._reconnectTimeout),this._reconnectAttempt{if(t){if("undefined"==typeof requirejs)throw new Error("requirejs not found");requirejs([t],(i=>{void 0===i[e]?s(new Error(`Object '${e}' not found in module '${t}'`)):n(i[e])}),s)}else(null==i?void 0:i[e])?n(i[e]):s(new Error(`Object '${e}' not found in registry`))}))},e.getRandomIntInclusive=function(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e}}(b||(b={}))},217:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var s=Object.getOwnPropertyDescriptor(t,i);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,s)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return s(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.KernelShellFutureHandler=t.KernelControlFutureHandler=t.KernelFutureHandler=void 0;const o=i(3911),a=i(1122),l=r(i(1736));class h extends a.DisposableDelegate{constructor(e,t,i,n,s){super(e),this._status=0,this._stdin=c.noOp,this._iopub=c.noOp,this._reply=c.noOp,this._done=new o.PromiseDelegate,this._hooks=new c.HookList,this._disposeOnDone=!0,this._msg=t,i||this._setFlag(c.KernelFutureFlag.GotReply),this._disposeOnDone=n,this._kernel=s}get msg(){return this._msg}get done(){return this._done.promise}get onReply(){return this._reply}set onReply(e){this._reply=e}get onIOPub(){return this._iopub}set onIOPub(e){this._iopub=e}get onStdin(){return this._stdin}set onStdin(e){this._stdin=e}registerMessageHook(e){if(this.isDisposed)throw new Error("Kernel future is disposed");this._hooks.add(e)}removeMessageHook(e){this.isDisposed||this._hooks.remove(e)}sendInputReply(e,t){this._kernel.sendInputReply(e,t)}dispose(){this._stdin=c.noOp,this._iopub=c.noOp,this._reply=c.noOp,this._hooks=null,this._testFlag(c.KernelFutureFlag.IsDone)||(this._done.promise.catch((()=>{})),this._done.reject(new Error(`Canceled future for ${this.msg.header.msg_type} message before replies were done`))),super.dispose()}async handleMsg(e){switch(e.channel){case"control":case"shell":e.channel===this.msg.channel&&e.parent_header.msg_id===this.msg.header.msg_id&&await this._handleReply(e);break;case"stdin":await this._handleStdin(e);break;case"iopub":await this._handleIOPub(e)}}async _handleReply(e){const t=this._reply;t&&await t(e),this._replyMsg=e,this._setFlag(c.KernelFutureFlag.GotReply),this._testFlag(c.KernelFutureFlag.GotIdle)&&this._handleDone()}async _handleStdin(e){this._kernel.hasPendingInput=!0;const t=this._stdin;t&&await t(e)}async _handleIOPub(e){const t=await this._hooks.process(e),i=this._iopub;t&&i&&await i(e),l.isStatusMsg(e)&&"idle"===e.content.execution_state&&(this._setFlag(c.KernelFutureFlag.GotIdle),this._testFlag(c.KernelFutureFlag.GotReply)&&this._handleDone())}_handleDone(){this._testFlag(c.KernelFutureFlag.IsDone)||(this._setFlag(c.KernelFutureFlag.IsDone),this._done.resolve(this._replyMsg),this._disposeOnDone&&this.dispose())}_testFlag(e){return 0!=(this._status&e)}_setFlag(e){this._status|=e}}var c;t.KernelFutureHandler=h,t.KernelControlFutureHandler=class extends h{},t.KernelShellFutureHandler=class extends h{},function(e){e.noOp=()=>{};const t="function"==typeof requestAnimationFrame?requestAnimationFrame:setImmediate;let i;e.HookList=class{constructor(){this._hooks=[]}add(e){this.remove(e),this._hooks.push(e)}remove(e){const t=this._hooks.indexOf(e);t>=0&&(this._hooks[t]=null,this._scheduleCompact())}async process(e){await this._processing;const t=new o.PromiseDelegate;let i;this._processing=t.promise;for(let n=this._hooks.length-1;n>=0;n--){const s=this._hooks[n];if(null!==s){try{i=await s(e)}catch(e){i=!0,console.error(e)}if(!1===i)return t.resolve(void 0),!1}}return t.resolve(void 0),!0}_scheduleCompact(){this._compactScheduled||(this._compactScheduled=!0,t((()=>{this._processing=this._processing.then((()=>{this._compactScheduled=!1,this._compact()}))})))}_compact(){let e=0;for(let t=0,i=this._hooks.length;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2298:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KernelManager=void 0;const n=i(9044),s=i(6424),r=i(5247),o=i(7524),a=i(9753),l=i(5306);class h extends o.BaseManager{constructor(e={}){var t;super(e),this._isReady=!1,this._kernelConnections=new Set,this._models=new Map,this._runningChanged=new s.Signal(this),this._connectionFailure=new s.Signal(this),this._pollModels=new n.Poll({auto:!1,factory:()=>this.requestRunning(),frequency:{interval:1e4,backoff:!0,max:3e5},name:"@jupyterlab/services:KernelManager#models",standby:null!==(t=e.standby)&&void 0!==t?t:"when-hidden"}),this._ready=(async()=>{await this._pollModels.start(),await this._pollModels.tick,this._isReady=!0})()}get isReady(){return this._isReady}get ready(){return this._ready}get runningChanged(){return this._runningChanged}get connectionFailure(){return this._connectionFailure}dispose(){this.isDisposed||(this._models.clear(),this._kernelConnections.forEach((e=>e.dispose())),this._pollModels.dispose(),super.dispose())}connectTo(e){var t;const{id:i}=e.model;let n=null===(t=e.handleComms)||void 0===t||t;if(void 0===e.handleComms)for(const e of this._kernelConnections)if(e.id===i&&e.handleComms){n=!1;break}const s=new l.KernelConnection({handleComms:n,...e,serverSettings:this.serverSettings});return this._onStarted(s),this._models.has(i)||this.refreshRunning().catch((()=>{})),s}running(){return this._models.values()}async refreshRunning(){await this._pollModels.refresh(),await this._pollModels.tick}async startNew(e={},t={}){const i=await(0,a.startNew)(e,this.serverSettings);return this.connectTo({...t,model:i})}async shutdown(e){await(0,a.shutdownKernel)(e,this.serverSettings),await this.refreshRunning()}async shutdownAll(){await this.refreshRunning(),await Promise.all([...this._models.keys()].map((e=>(0,a.shutdownKernel)(e,this.serverSettings)))),await this.refreshRunning()}async findById(e){return this._models.has(e)||await this.refreshRunning(),this._models.get(e)}async requestRunning(){var e,t;let i;try{i=await(0,a.listRunning)(this.serverSettings)}catch(i){throw(i instanceof r.ServerConnection.NetworkError||503===(null===(e=i.response)||void 0===e?void 0:e.status)||424===(null===(t=i.response)||void 0===t?void 0:t.status))&&this._connectionFailure.emit(i),i}this.isDisposed||this._models.size===i.length&&i.every((e=>{const t=this._models.get(e.id);return!!t&&t.connections===e.connections&&t.execution_state===e.execution_state&&t.last_activity===e.last_activity&&t.name===e.name&&t.reason===e.reason&&t.traceback===e.traceback}))||(this._models=new Map(i.map((e=>[e.id,e]))),this._kernelConnections.forEach((e=>{this._models.has(e.id)||e.handleShutdown()})),this._runningChanged.emit(i))}_onStarted(e){this._kernelConnections.add(e),e.statusChanged.connect(this._onStatusChanged,this),e.disposed.connect(this._onDisposed,this)}_onDisposed(e){this._kernelConnections.delete(e),this.refreshRunning().catch((()=>{}))}_onStatusChanged(e,t){"dead"===t&&this.refreshRunning().catch((()=>{}))}}t.KernelManager=h,function(e){e.NoopManager=class extends e{constructor(){super(...arguments),this._readyPromise=new Promise((()=>{}))}get isActive(){return!1}get parentReady(){return super.ready}async startNew(e={},t={}){return Promise.reject(new Error("Not implemented in no-op Kernel Manager"))}connectTo(e){throw new Error("Not implemented in no-op Kernel Manager")}async shutdown(e){return Promise.reject(new Error("Not implemented in no-op Kernel Manager"))}get ready(){return this.parentReady.then((()=>this._readyPromise))}async requestRunning(){return Promise.resolve()}}}(h=t.KernelManager||(t.KernelManager={}))},1736:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportedKernelWebSocketProtocols=t.isInputReplyMsg=t.isInputRequestMsg=t.isDebugReplyMsg=t.isDebugRequestMsg=t.isExecuteReplyMsg=t.isInfoRequestMsg=t.isCommMsgMsg=t.isCommCloseMsg=t.isCommOpenMsg=t.isDebugEventMsg=t.isClearOutputMsg=t.isStatusMsg=t.isErrorMsg=t.isExecuteResultMsg=t.isExecuteInputMsg=t.isUpdateDisplayDataMsg=t.isDisplayDataMsg=t.isStreamMsg=t.createMessage=void 0;const n=i(3911);t.createMessage=function(e){var t,i,s,r,o;return{buffers:null!==(t=e.buffers)&&void 0!==t?t:[],channel:e.channel,content:e.content,header:{date:(new Date).toISOString(),msg_id:null!==(i=e.msgId)&&void 0!==i?i:n.UUID.uuid4(),msg_type:e.msgType,session:e.session,username:null!==(s=e.username)&&void 0!==s?s:"",version:"5.2"},metadata:null!==(r=e.metadata)&&void 0!==r?r:{},parent_header:null!==(o=e.parentHeader)&&void 0!==o?o:{}}},t.isStreamMsg=function(e){return"stream"===e.header.msg_type},t.isDisplayDataMsg=function(e){return"display_data"===e.header.msg_type},t.isUpdateDisplayDataMsg=function(e){return"update_display_data"===e.header.msg_type},t.isExecuteInputMsg=function(e){return"execute_input"===e.header.msg_type},t.isExecuteResultMsg=function(e){return"execute_result"===e.header.msg_type},t.isErrorMsg=function(e){return"error"===e.header.msg_type},t.isStatusMsg=function(e){return"status"===e.header.msg_type},t.isClearOutputMsg=function(e){return"clear_output"===e.header.msg_type},t.isDebugEventMsg=function(e){return"debug_event"===e.header.msg_type},t.isCommOpenMsg=function(e){return"comm_open"===e.header.msg_type},t.isCommCloseMsg=function(e){return"comm_close"===e.header.msg_type},t.isCommMsgMsg=function(e){return"comm_msg"===e.header.msg_type},t.isInfoRequestMsg=function(e){return"kernel_info_request"===e.header.msg_type},t.isExecuteReplyMsg=function(e){return"execute_reply"===e.header.msg_type},t.isDebugRequestMsg=function(e){return"debug_request"===e.header.msg_type},t.isDebugReplyMsg=function(e){return"debug_reply"===e.header.msg_type},t.isInputRequestMsg=function(e){return"input_request"===e.header.msg_type},t.isInputReplyMsg=function(e){return"input_reply"===e.header.msg_type},(t.supportedKernelWebSocketProtocols||(t.supportedKernelWebSocketProtocols={})).v1KernelWebsocketJupyterOrg="v1.kernel.websocket.jupyter.org"},9753:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getKernelModel=t.shutdownKernel=t.interruptKernel=t.restartKernel=t.startNew=t.listRunning=t.KERNEL_SERVICE_URL=void 0;const n=i(538),s=i(4251),r=i(776);t.KERNEL_SERVICE_URL="api/kernels",t.listRunning=async function(e=n.ServerConnection.makeSettings()){const i=s.URLExt.join(e.baseUrl,t.KERNEL_SERVICE_URL),o=await n.ServerConnection.makeRequest(i,{},e);if(200!==o.status)throw await n.ServerConnection.ResponseError.create(o);const a=await o.json();return(0,r.validateModels)(a),a},t.startNew=async function(e={},i=n.ServerConnection.makeSettings()){const o=s.URLExt.join(i.baseUrl,t.KERNEL_SERVICE_URL),a={method:"POST",body:JSON.stringify(e)},l=await n.ServerConnection.makeRequest(o,a,i);if(201!==l.status)throw await n.ServerConnection.ResponseError.create(l);const h=await l.json();return(0,r.validateModel)(h),h},t.restartKernel=async function(e,i=n.ServerConnection.makeSettings()){const o=s.URLExt.join(i.baseUrl,t.KERNEL_SERVICE_URL,encodeURIComponent(e),"restart"),a=await n.ServerConnection.makeRequest(o,{method:"POST"},i);if(200!==a.status)throw await n.ServerConnection.ResponseError.create(a);const l=await a.json();(0,r.validateModel)(l)},t.interruptKernel=async function(e,i=n.ServerConnection.makeSettings()){const r=s.URLExt.join(i.baseUrl,t.KERNEL_SERVICE_URL,encodeURIComponent(e),"interrupt"),o=await n.ServerConnection.makeRequest(r,{method:"POST"},i);if(204!==o.status)throw await n.ServerConnection.ResponseError.create(o)},t.shutdownKernel=async function(e,i=n.ServerConnection.makeSettings()){const r=s.URLExt.join(i.baseUrl,t.KERNEL_SERVICE_URL,encodeURIComponent(e)),o=await n.ServerConnection.makeRequest(r,{method:"DELETE"},i);if(404===o.status){const t=`The kernel "${e}" does not exist on the server`;console.warn(t)}else if(204!==o.status)throw await n.ServerConnection.ResponseError.create(o)},t.getKernelModel=async function(e,i=n.ServerConnection.makeSettings()){const o=s.URLExt.join(i.baseUrl,t.KERNEL_SERVICE_URL,encodeURIComponent(e)),a=await n.ServerConnection.makeRequest(o,{},i);if(404===a.status)return;if(200!==a.status)throw await n.ServerConnection.ResponseError.create(a);const l=await a.json();return(0,r.validateModel)(l),l}},8206:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var s=Object.getOwnPropertyDescriptor(t,i);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,s)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return s(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.deserialize=t.serialize=void 0;const o=r(i(1736));var a;t.serialize=function(e,t=""){return t===o.supportedKernelWebSocketProtocols.v1KernelWebsocketJupyterOrg?a.serializeV1KernelWebsocketJupyterOrg(e):a.serializeDefault(e)},t.deserialize=function(e,t=""){return t===o.supportedKernelWebSocketProtocols.v1KernelWebsocketJupyterOrg?a.deserializeV1KernelWebsocketJupyterOrg(e):a.deserializeDefault(e)},function(e){e.deserializeV1KernelWebsocketJupyterOrg=function(e){let t;const i=new DataView(e),n=Number(i.getBigUint64(0,!0));let s=[];for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateModels=t.validateModel=t.validateMessage=void 0;const n=i(3247),s=["username","version","session","msg_id","msg_type"],r={stream:{name:"string",text:"string"},display_data:{data:"object",metadata:"object"},execute_input:{code:"string",execution_count:"number"},execute_result:{execution_count:"number",data:"object",metadata:"object"},error:{ename:"string",evalue:"string",traceback:"object"},status:{execution_state:["string",["starting","idle","busy","restarting","dead"]]},clear_output:{wait:"boolean"},comm_open:{comm_id:"string",target_name:"string",data:"object"},comm_msg:{comm_id:"string",data:"object"},comm_close:{comm_id:"string"},shutdown_reply:{restart:"boolean"}};function o(e){(0,n.validateProperty)(e,"name","string"),(0,n.validateProperty)(e,"id","string")}t.validateMessage=function(e){(0,n.validateProperty)(e,"metadata","object"),(0,n.validateProperty)(e,"content","object"),(0,n.validateProperty)(e,"channel","string"),function(e){for(let t=0;to(e)))}},3490:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var s=Object.getOwnPropertyDescriptor(t,i);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,s)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return s(t,e),t},o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),t.KernelSpecAPI=t.KernelSpec=void 0;const a=r(i(6060));t.KernelSpec=a;const l=r(i(1598));t.KernelSpecAPI=l,o(i(7307),t)},6060:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7307:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var s=Object.getOwnPropertyDescriptor(t,i);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,s)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return s(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.KernelSpecManager=void 0;const o=i(3911),a=i(9044),l=i(6424),h=r(i(1598)),c=i(7524);class d extends c.BaseManager{constructor(e={}){var t;super(e),this._isReady=!1,this._connectionFailure=new l.Signal(this),this._specs=null,this._specsChanged=new l.Signal(this),this._ready=Promise.all([this.requestSpecs()]).then((e=>{})).catch((e=>{})).then((()=>{this.isDisposed||(this._isReady=!0)})),this._pollSpecs=new a.Poll({auto:!1,factory:()=>this.requestSpecs(),frequency:{interval:61e3,backoff:!0,max:3e5},name:"@jupyterlab/services:KernelSpecManager#specs",standby:null!==(t=e.standby)&&void 0!==t?t:"when-hidden"}),this.ready.then((()=>{this._pollSpecs.start()}))}get isReady(){return this._isReady}get ready(){return this._ready}get specs(){return this._specs}get specsChanged(){return this._specsChanged}get connectionFailure(){return this._connectionFailure}dispose(){this._pollSpecs.dispose(),super.dispose()}async refreshSpecs(){await this._pollSpecs.refresh(),await this._pollSpecs.tick}async requestSpecs(){const e=await h.getSpecs(this.serverSettings);this.isDisposed||o.JSONExt.deepEqual(e,this._specs)||(this._specs=e,this._specsChanged.emit(e))}}t.KernelSpecManager=d},1598:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSpecs=void 0;const n=i(538),s=i(4286),r=i(4251);t.getSpecs=async function(e=n.ServerConnection.makeSettings()){const t=r.URLExt.join(e.baseUrl,"api/kernelspecs"),i=await n.ServerConnection.makeRequest(t,{},e);if(200!==i.status)throw await n.ServerConnection.ResponseError.create(i);const o=await i.json();return(0,s.validateSpecModels)(o)}},4286:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSpecModels=t.validateSpecModel=void 0;const n=i(3247);function s(e){const t=e.spec;if(!t)throw new Error("Invalid kernel spec");(0,n.validateProperty)(e,"name","string"),(0,n.validateProperty)(e,"resources","object"),(0,n.validateProperty)(t,"language","string"),(0,n.validateProperty)(t,"display_name","string"),(0,n.validateProperty)(t,"argv","array");let i=null;t.hasOwnProperty("metadata")&&((0,n.validateProperty)(t,"metadata","object"),i=t.metadata);let s=null;return t.hasOwnProperty("env")&&((0,n.validateProperty)(t,"env","object"),s=t.env),{name:e.name,resources:e.resources,language:t.language,display_name:t.display_name,argv:t.argv,metadata:i,env:s}}t.validateSpecModel=s,t.validateSpecModels=function(e){if(!e.hasOwnProperty("kernelspecs"))throw new Error("No kernelspecs found");let t=Object.keys(e.kernelspecs);const i=Object.create(null);let n=e.default;for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceManager=void 0;const n=i(6424),s=i(4011),r=i(1708),o=i(5657),a=i(5674),l=i(3490),h=i(6624),c=i(538),d=i(3561),u=i(9188),p=i(3185),f=i(1014),m=i(9090);t.ServiceManager=class{constructor(e={}){var t,i;this._isDisposed=!1,this._connectionFailure=new n.Signal(this),this._isReady=!1;const g=e.defaultDrive,v=null!==(t=e.serverSettings)&&void 0!==t?t:c.ServerConnection.makeSettings(),O={defaultDrive:g,serverSettings:v,standby:null!==(i=e.standby)&&void 0!==i?i:"when-hidden"};this.serverSettings=v,this.contents=e.contents||new r.ContentsManager(O),this.events=e.events||new o.EventManager(O),this.kernels=e.kernels||new a.KernelManager(O),this.sessions=e.sessions||new d.SessionManager({...O,kernelManager:this.kernels}),this.settings=e.settings||new u.SettingManager(O),this.terminals=e.terminals||new p.TerminalManager(O),this.builder=e.builder||new s.BuildManager(O),this.workspaces=e.workspaces||new m.WorkspaceManager(O),this.nbconvert=e.nbconvert||new h.NbConvertManager(O),this.kernelspecs=e.kernelspecs||new l.KernelSpecManager(O),this.user=e.user||new f.UserManager(O),this.kernelspecs.connectionFailure.connect(this._onConnectionFailure,this),this.sessions.connectionFailure.connect(this._onConnectionFailure,this),this.terminals.connectionFailure.connect(this._onConnectionFailure,this);const b=[this.sessions.ready,this.kernelspecs.ready];this.terminals.isAvailable()&&b.push(this.terminals.ready),this._readyPromise=Promise.all(b).then((()=>{this._isReady=!0}))}get connectionFailure(){return this._connectionFailure}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,n.Signal.clearData(this),this.contents.dispose(),this.events.dispose(),this.sessions.dispose(),this.terminals.dispose())}get isReady(){return this._isReady}get ready(){return this._readyPromise}_onConnectionFailure(e,t){this._connectionFailure.emit(t)}}},6624:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NbConvertManager=void 0;const n=i(4251),s=i(538),r=i(3911);t.NbConvertManager=class{constructor(e={}){var t;this._exportFormats=null,this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:s.ServerConnection.makeSettings()}async fetchExportFormats(){this._requestingFormats=new r.PromiseDelegate,this._exportFormats=null;const e=this.serverSettings.baseUrl,t=n.URLExt.join(e,"api/nbconvert"),{serverSettings:i}=this,o=await s.ServerConnection.makeRequest(t,{},i);if(200!==o.status)throw await s.ServerConnection.ResponseError.create(o);const a=await o.json(),l={};return Object.keys(a).forEach((function(e){const t=a[e].output_mimetype;l[e]={output_mimetype:t}})),this._exportFormats=l,this._requestingFormats.resolve(l),l}async getExportFormats(e=!0){return this._requestingFormats?this._requestingFormats.promise:e||!this._exportFormats?await this.fetchExportFormats():this._exportFormats}}},538:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServerConnection=void 0;const n=i(4251);let s;var r,o;s="undefined"==typeof window?i(8354):WebSocket,function(e){e.makeSettings=function(e){return o.makeSettings(e)},e.makeRequest=function(e,t,i){return o.handleRequest(e,t,i)};class t extends Error{static async create(e){try{const i=await e.json(),{message:n,traceback:s}=i;return s&&console.error(s),new t(e,null!=n?n:t._defaultMessage(e),null!=s?s:"")}catch(i){return console.debug(i),new t(e)}}constructor(e,i=t._defaultMessage(e),n=""){super(i),this.response=e,this.traceback=n}static _defaultMessage(e){return`Invalid response: ${e.status} ${e.statusText}`}}e.ResponseError=t;class i extends TypeError{constructor(e){super(e.message),this.stack=e.stack}}e.NetworkError=i}(r=t.ServerConnection||(t.ServerConnection={})),function(e){e.makeSettings=function(e={}){var t;const i=n.PageConfig.getBaseUrl(),r=n.PageConfig.getWsUrl(),o=n.URLExt.normalize(e.baseUrl)||i;let a=e.wsUrl;return a||o!==i||(a=r),a||0!==o.indexOf("http")||(a="ws"+o.slice(4)),a=null!=a?a:r,{init:{cache:"no-store",credentials:"same-origin"},fetch,Headers,Request,WebSocket:s,token:n.PageConfig.getToken(),appUrl:n.PageConfig.getOption("appUrl"),appendToken:"undefined"==typeof window||"undefined"!=typeof process&&void 0!==(null===(t=null===process||void 0===process?void 0:{})||void 0===t?void 0:t.JEST_WORKER_ID)||n.URLExt.getHostName(i)!==n.URLExt.getHostName(a),...e,baseUrl:o,wsUrl:a}},e.handleRequest=function(e,t,i){var n;if(0!==e.indexOf(i.baseUrl))throw new Error("Can only be used for notebook server requests");"no-store"===(null!==(n=t.cache)&&void 0!==n?n:i.init.cache)&&(e+=(/\?/.test(e)?"&":"?")+(new Date).getTime());const s=new i.Request(e,{...i.init,...t});let o=!1;if(i.token&&(o=!0,s.headers.append("Authorization",`token ${i.token}`)),"undefined"!=typeof document&&(null===document||void 0===document?void 0:document.cookie)){const e=function(e){const t=document.cookie.match("\\b_xsrf=([^;]*)\\b");return null==t?void 0:t[1]}();void 0!==e&&(o=!0,s.headers.append("X-XSRFToken",e))}return!s.headers.has("Content-Type")&&o&&s.headers.set("Content-Type","application/json"),i.fetch.call(null,s).catch((e=>{throw new r.NetworkError(e)}))}}(o||(o={}))},6512:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SessionConnection=void 0;const n=i(6424),s=i(5247),r=i(1975),o=i(3911);t.SessionConnection=class{constructor(e){var t,i,r,a;this._id="",this._path="",this._name="",this._type="",this._kernel=null,this._isDisposed=!1,this._disposed=new n.Signal(this),this._kernelChanged=new n.Signal(this),this._statusChanged=new n.Signal(this),this._connectionStatusChanged=new n.Signal(this),this._pendingInput=new n.Signal(this),this._iopubMessage=new n.Signal(this),this._unhandledMessage=new n.Signal(this),this._anyMessage=new n.Signal(this),this._propertyChanged=new n.Signal(this),this._id=e.model.id,this._name=e.model.name,this._path=e.model.path,this._type=e.model.type,this._username=null!==(t=e.username)&&void 0!==t?t:"",this._clientId=null!==(i=e.clientId)&&void 0!==i?i:o.UUID.uuid4(),this._connectToKernel=e.connectToKernel,this._kernelConnectionOptions=null!==(r=e.kernelConnectionOptions)&&void 0!==r?r:{},this.serverSettings=null!==(a=e.serverSettings)&&void 0!==a?a:s.ServerConnection.makeSettings(),this.setupKernel(e.model.kernel)}get disposed(){return this._disposed}get kernelChanged(){return this._kernelChanged}get statusChanged(){return this._statusChanged}get connectionStatusChanged(){return this._connectionStatusChanged}get pendingInput(){return this._pendingInput}get iopubMessage(){return this._iopubMessage}get unhandledMessage(){return this._unhandledMessage}get anyMessage(){return this._anyMessage}get propertyChanged(){return this._propertyChanged}get id(){return this._id}get kernel(){return this._kernel}get path(){return this._path}get type(){return this._type}get name(){return this._name}get model(){return{id:this.id,kernel:this.kernel&&{id:this.kernel.id,name:this.kernel.name},path:this._path,type:this._type,name:this._name}}get isDisposed(){return this._isDisposed}update(e){const t=this.model;if(this._path=e.path,this._name=e.name,this._type=e.type,null===this._kernel&&null!==e.kernel||null!==this._kernel&&null===e.kernel||null!==this._kernel&&null!==e.kernel&&this._kernel.id!==e.kernel.id){null!==this._kernel&&this._kernel.dispose();const t=this._kernel||null;this.setupKernel(e.kernel);const i=this._kernel||null;this._kernelChanged.emit({name:"kernel",oldValue:t,newValue:i})}this._handleModelChange(t)}dispose(){if(!this.isDisposed){if(this._isDisposed=!0,this._disposed.emit(),this._kernel){this._kernel.dispose();const e=this._kernel;this._kernel=null;const t=this._kernel;this._kernelChanged.emit({name:"kernel",oldValue:e,newValue:t})}n.Signal.clearData(this)}}async setPath(e){if(this.isDisposed)throw new Error("Session is disposed");await this._patch({path:e})}async setName(e){if(this.isDisposed)throw new Error("Session is disposed");await this._patch({name:e})}async setType(e){if(this.isDisposed)throw new Error("Session is disposed");await this._patch({type:e})}async changeKernel(e){if(this.isDisposed)throw new Error("Session is disposed");return await this._patch({kernel:e}),this.kernel}async shutdown(){if(this.isDisposed)throw new Error("Session is disposed");await(0,r.shutdownSession)(this.id,this.serverSettings),this.dispose()}setupKernel(e){if(null===e)return void(this._kernel=null);const t=this._connectToKernel({...this._kernelConnectionOptions,model:e,username:this._username,clientId:this._clientId,serverSettings:this.serverSettings});this._kernel=t,t.statusChanged.connect(this.onKernelStatus,this),t.connectionStatusChanged.connect(this.onKernelConnectionStatus,this),t.pendingInput.connect(this.onPendingInput,this),t.unhandledMessage.connect(this.onUnhandledMessage,this),t.iopubMessage.connect(this.onIOPubMessage,this),t.anyMessage.connect(this.onAnyMessage,this)}onKernelStatus(e,t){this._statusChanged.emit(t)}onKernelConnectionStatus(e,t){this._connectionStatusChanged.emit(t)}onPendingInput(e,t){this._pendingInput.emit(t)}onIOPubMessage(e,t){this._iopubMessage.emit(t)}onUnhandledMessage(e,t){this._unhandledMessage.emit(t)}onAnyMessage(e,t){this._anyMessage.emit(t)}async _patch(e){const t=await(0,r.updateSession)({...e,id:this._id},this.serverSettings);return this.update(t),t}_handleModelChange(e){e.name!==this._name&&this._propertyChanged.emit("name"),e.type!==this._type&&this._propertyChanged.emit("type"),e.path!==this._path&&this._propertyChanged.emit("path")}}},3561:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var s=Object.getOwnPropertyDescriptor(t,i);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,s)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return s(t,e),t},o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),t.SessionAPI=t.Session=void 0;const a=r(i(7993));t.Session=a;const l=r(i(1975));t.SessionAPI=l,o(i(8137),t)},8137:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SessionManager=void 0;const n=i(9044),s=i(6424),r=i(538),o=i(7524),a=i(6512),l=i(1975);class h extends o.BaseManager{constructor(e){var t;super(e),this._isReady=!1,this._sessionConnections=new Set,this._models=new Map,this._runningChanged=new s.Signal(this),this._connectionFailure=new s.Signal(this),this._connectToKernel=e=>this._kernelManager.connectTo(e),this._kernelManager=e.kernelManager,this._pollModels=new n.Poll({auto:!1,factory:()=>this.requestRunning(),frequency:{interval:1e4,backoff:!0,max:3e5},name:"@jupyterlab/services:SessionManager#models",standby:null!==(t=e.standby)&&void 0!==t?t:"when-hidden"}),this._ready=(async()=>{await this._pollModels.start(),await this._pollModels.tick,this._kernelManager.isActive&&await this._kernelManager.ready,this._isReady=!0})()}get isReady(){return this._isReady}get ready(){return this._ready}get runningChanged(){return this._runningChanged}get connectionFailure(){return this._connectionFailure}dispose(){this.isDisposed||(this._models.clear(),this._sessionConnections.forEach((e=>e.dispose())),this._pollModels.dispose(),super.dispose())}connectTo(e){const t=new a.SessionConnection({...e,connectToKernel:this._connectToKernel,serverSettings:this.serverSettings});return this._onStarted(t),this._models.has(e.model.id)||this.refreshRunning().catch((()=>{})),t}running(){return this._models.values()}async refreshRunning(){await this._pollModels.refresh(),await this._pollModels.tick}async startNew(e,t={}){const i=await(0,l.startSession)(e,this.serverSettings);return await this.refreshRunning(),this.connectTo({...t,model:i})}async shutdown(e){await(0,l.shutdownSession)(e,this.serverSettings),await this.refreshRunning()}async shutdownAll(){await this.refreshRunning(),await Promise.all([...this._models.keys()].map((e=>(0,l.shutdownSession)(e,this.serverSettings)))),await this.refreshRunning()}async stopIfNeeded(e){try{const t=(await(0,l.listRunning)(this.serverSettings)).filter((t=>t.path===e));if(1===t.length){const e=t[0].id;await this.shutdown(e)}}catch(e){}}async findById(e){return this._models.has(e)||await this.refreshRunning(),this._models.get(e)}async findByPath(e){for(const t of this._models.values())if(t.path===e)return t;await this.refreshRunning();for(const t of this._models.values())if(t.path===e)return t}async requestRunning(){var e,t;let i;try{i=await(0,l.listRunning)(this.serverSettings)}catch(i){throw(i instanceof r.ServerConnection.NetworkError||503===(null===(e=i.response)||void 0===e?void 0:e.status)||424===(null===(t=i.response)||void 0===t?void 0:t.status))&&this._connectionFailure.emit(i),i}this.isDisposed||this._models.size===i.length&&i.every((e=>{var t,i,n,s;const r=this._models.get(e.id);return!!r&&(null===(t=r.kernel)||void 0===t?void 0:t.id)===(null===(i=e.kernel)||void 0===i?void 0:i.id)&&(null===(n=r.kernel)||void 0===n?void 0:n.name)===(null===(s=e.kernel)||void 0===s?void 0:s.name)&&r.name===e.name&&r.path===e.path&&r.type===e.type}))||(this._models=new Map(i.map((e=>[e.id,e]))),this._sessionConnections.forEach((e=>{this._models.has(e.id)?e.update(this._models.get(e.id)):e.dispose()})),this._runningChanged.emit(i))}_onStarted(e){this._sessionConnections.add(e),e.disposed.connect(this._onDisposed,this),e.propertyChanged.connect(this._onChanged,this),e.kernelChanged.connect(this._onChanged,this)}_onDisposed(e){this._sessionConnections.delete(e),this.refreshRunning().catch((()=>{}))}_onChanged(){this.refreshRunning().catch((()=>{}))}}t.SessionManager=h,function(e){e.NoopManager=class extends e{constructor(){super(...arguments),this._readyPromise=new Promise((()=>{}))}get isActive(){return!1}get parentReady(){return super.ready}async startNew(e,t={}){return Promise.reject(new Error("Not implemented in no-op Session Manager"))}connectTo(e){throw Error("Not implemented in no-op Session Manager")}get ready(){return this.parentReady.then((()=>this._readyPromise))}async shutdown(e){return Promise.reject(new Error("Not implemented in no-op Session Manager"))}async requestRunning(){return Promise.resolve()}}}(h=t.SessionManager||(t.SessionManager={}))},1975:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateSession=t.startSession=t.getSessionModel=t.shutdownSession=t.getSessionUrl=t.listRunning=t.SESSION_SERVICE_URL=void 0;const n=i(538),s=i(4251),r=i(9590);function o(e,i){return s.URLExt.join(e,t.SESSION_SERVICE_URL,i)}t.SESSION_SERVICE_URL="api/sessions",t.listRunning=async function(e=n.ServerConnection.makeSettings()){const i=s.URLExt.join(e.baseUrl,t.SESSION_SERVICE_URL),o=await n.ServerConnection.makeRequest(i,{},e);if(200!==o.status)throw await n.ServerConnection.ResponseError.create(o);const a=await o.json();if(!Array.isArray(a))throw new Error("Invalid Session list");return a.forEach((e=>{(0,r.updateLegacySessionModel)(e),(0,r.validateModel)(e)})),a},t.getSessionUrl=o,t.shutdownSession=async function(e,t=n.ServerConnection.makeSettings()){var i;const s=o(t.baseUrl,e),r=await n.ServerConnection.makeRequest(s,{method:"DELETE"},t);if(404===r.status){const t=null!==(i=(await r.json()).message)&&void 0!==i?i:`The session "${e}"" does not exist on the server`;console.warn(t)}else{if(410===r.status)throw new n.ServerConnection.ResponseError(r,"The kernel was deleted but the session was not");if(204!==r.status)throw await n.ServerConnection.ResponseError.create(r)}},t.getSessionModel=async function(e,t=n.ServerConnection.makeSettings()){const i=o(t.baseUrl,e),s=await n.ServerConnection.makeRequest(i,{},t);if(200!==s.status)throw await n.ServerConnection.ResponseError.create(s);const a=await s.json();return(0,r.updateLegacySessionModel)(a),(0,r.validateModel)(a),a},t.startSession=async function(e,i=n.ServerConnection.makeSettings()){const o=s.URLExt.join(i.baseUrl,t.SESSION_SERVICE_URL),a={method:"POST",body:JSON.stringify(e)},l=await n.ServerConnection.makeRequest(o,a,i);if(201!==l.status)throw await n.ServerConnection.ResponseError.create(l);const h=await l.json();return(0,r.updateLegacySessionModel)(h),(0,r.validateModel)(h),h},t.updateSession=async function(e,t=n.ServerConnection.makeSettings()){const i=o(t.baseUrl,e.id),s={method:"PATCH",body:JSON.stringify(e)},a=await n.ServerConnection.makeRequest(i,s,t);if(200!==a.status)throw await n.ServerConnection.ResponseError.create(a);const l=await a.json();return(0,r.updateLegacySessionModel)(l),(0,r.validateModel)(l),l}},7993:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9590:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateModels=t.updateLegacySessionModel=t.validateModel=void 0;const n=i(776),s=i(3247);function r(e){(0,s.validateProperty)(e,"id","string"),(0,s.validateProperty)(e,"type","string"),(0,s.validateProperty)(e,"name","string"),(0,s.validateProperty)(e,"path","string"),(0,s.validateProperty)(e,"kernel","object"),(0,n.validateModel)(e.kernel)}t.validateModel=r,t.updateLegacySessionModel=function(e){void 0===e.path&&void 0!==e.notebook&&(e.path=e.notebook.path,e.type="notebook",e.name="")},t.validateModels=function(e){if(!Array.isArray(e))throw new Error("Invalid session list");e.forEach((e=>r(e)))}},9188:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SettingManager=void 0;const n=i(4251),s=i(5895),r=i(538);class o extends s.DataConnector{constructor(e={}){var t;super(),this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:r.ServerConnection.makeSettings()}async fetch(e){if(!e)throw new Error("Plugin `id` parameter is required for settings fetch.");const{serverSettings:t}=this,{baseUrl:i,appUrl:n}=t,{makeRequest:s,ResponseError:o}=r.ServerConnection,l=i+n,h=a.url(l,e),c=await s(h,{},t);if(200!==c.status)throw await o.create(c);return c.json()}async list(e){var t,i,n,s;const{serverSettings:o}=this,{baseUrl:l,appUrl:h}=o,{makeRequest:c,ResponseError:d}=r.ServerConnection,u=l+h,p=a.url(u,"","ids"===e),f=await c(p,{},o);if(200!==f.status)throw new d(f);const m=await f.json(),g=null!==(i=null===(t=null==m?void 0:m.settings)||void 0===t?void 0:t.map((e=>e.id)))&&void 0!==i?i:[];let v=[];return e||(v=null!==(s=null===(n=null==m?void 0:m.settings)||void 0===n?void 0:n.map((e=>(e.data={composite:{},user:{}},e))))&&void 0!==s?s:[]),{ids:g,values:v}}async save(e,t){const{serverSettings:i}=this,{baseUrl:n,appUrl:s}=i,{makeRequest:o,ResponseError:l}=r.ServerConnection,h=n+s,c=a.url(h,e),d={body:JSON.stringify({raw:t}),method:"PUT"},u=await o(c,d,i);if(204!==u.status)throw new l(u)}}var a;t.SettingManager=o,function(e){e.url=function(e,t,i){const s=i?n.URLExt.objectToQueryString({ids_only:!0}):"";return`${n.URLExt.join(e,"api/settings",t)}${s}`}}(a||(a={}))},8354:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=WebSocket},7685:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalConnection=void 0;const n=i(4251),s=i(3911),r=i(6424),o=i(5247),a=i(7384);class l{constructor(e){var t;this._createSocket=()=>{this._errorIfDisposed(),this._clearSocket(),this._updateConnectionStatus("connecting");const e=this._name,t=this.serverSettings;let i=n.URLExt.join(t.wsUrl,"terminals","websocket",encodeURIComponent(e));const s=t.token;t.appendToken&&""!==s&&(i+=`?token=${encodeURIComponent(s)}`),this._ws=new t.WebSocket(i),this._ws.onmessage=this._onWSMessage,this._ws.onclose=this._onWSClose,this._ws.onerror=this._onWSClose},this._onWSMessage=e=>{if(this._isDisposed)return;const t=JSON.parse(e.data);"disconnect"===t[0]&&this.dispose(),"connecting"!==this._connectionStatus?this._messageReceived.emit({type:t[0],content:t.slice(1)}):"setup"===t[0]&&this._updateConnectionStatus("connected")},this._onWSClose=e=>{console.warn(`Terminal websocket closed: ${e.code}`),this.isDisposed||this._reconnect()},this._connectionStatus="connecting",this._connectionStatusChanged=new r.Signal(this),this._isDisposed=!1,this._disposed=new r.Signal(this),this._messageReceived=new r.Signal(this),this._reconnectTimeout=null,this._ws=null,this._noOp=()=>{},this._reconnectLimit=7,this._reconnectAttempt=0,this._pendingMessages=[],this._name=e.model.name,this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:o.ServerConnection.makeSettings(),this._createSocket()}get disposed(){return this._disposed}get messageReceived(){return this._messageReceived}get name(){return this._name}get model(){return{name:this._name}}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed||(this._isDisposed=!0,this._disposed.emit(),this._updateConnectionStatus("disconnected"),this._clearSocket(),r.Signal.clearData(this))}send(e){this._sendMessage(e)}_sendMessage(e,t=!0){if(!this._isDisposed&&e.content)if("connected"===this.connectionStatus&&this._ws){const t=[e.type,...e.content];this._ws.send(JSON.stringify(t))}else{if(!t)throw new Error(`Could not send message: ${JSON.stringify(e)}`);this._pendingMessages.push(e)}}_sendPending(){for(;"connected"===this.connectionStatus&&this._pendingMessages.length>0;)this._sendMessage(this._pendingMessages[0],!1),this._pendingMessages.shift()}reconnect(){this._errorIfDisposed();const e=new s.PromiseDelegate,t=(i,n)=>{"connected"===n?(e.resolve(),this.connectionStatusChanged.disconnect(t,this)):"disconnected"===n&&(e.reject(new Error("Terminal connection disconnected")),this.connectionStatusChanged.disconnect(t,this))};return this.connectionStatusChanged.connect(t,this),this._reconnectAttempt=0,this._reconnect(),e.promise}_reconnect(){if(this._errorIfDisposed(),clearTimeout(this._reconnectTimeout),this._reconnectAttempt{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalManager=void 0;const n=i(9044),s=i(6424),r=i(5247),o=i(7524),a=i(7384),l=i(7685);class h extends o.BaseManager{constructor(e={}){var t;if(super(e),this._isReady=!1,this._names=[],this._terminalConnections=new Set,this._runningChanged=new s.Signal(this),this._connectionFailure=new s.Signal(this),!this.isAvailable())return this._ready=Promise.reject("Terminals unavailable"),void this._ready.catch((e=>{}));this._pollModels=new n.Poll({auto:!1,factory:()=>this.requestRunning(),frequency:{interval:1e4,backoff:!0,max:3e5},name:"@jupyterlab/services:TerminalManager#models",standby:null!==(t=e.standby)&&void 0!==t?t:"when-hidden"}),this._ready=(async()=>{await this._pollModels.start(),await this._pollModels.tick,this._isReady=!0})()}get isReady(){return this._isReady}get ready(){return this._ready}get runningChanged(){return this._runningChanged}get connectionFailure(){return this._connectionFailure}dispose(){this.isDisposed||(this._names.length=0,this._terminalConnections.forEach((e=>e.dispose())),this._pollModels.dispose(),super.dispose())}isAvailable(){return(0,a.isAvailable)()}connectTo(e){const t=new l.TerminalConnection({...e,serverSettings:this.serverSettings});return this._onStarted(t),this._names.includes(e.model.name)||this.refreshRunning().catch((()=>{})),t}running(){return this._models[Symbol.iterator]()}async refreshRunning(){await this._pollModels.refresh(),await this._pollModels.tick}async startNew(e){const t=await(0,a.startNew)(this.serverSettings,null==e?void 0:e.name,null==e?void 0:e.cwd);return await this.refreshRunning(),this.connectTo({model:t})}async shutdown(e){await(0,a.shutdownTerminal)(e,this.serverSettings),await this.refreshRunning()}async shutdownAll(){await this.refreshRunning(),await Promise.all(this._names.map((e=>(0,a.shutdownTerminal)(e,this.serverSettings)))),await this.refreshRunning()}async requestRunning(){var e,t;let i;try{i=await(0,a.listRunning)(this.serverSettings)}catch(i){throw(i instanceof r.ServerConnection.NetworkError||503===(null===(e=i.response)||void 0===e?void 0:e.status)||424===(null===(t=i.response)||void 0===t?void 0:t.status))&&this._connectionFailure.emit(i),i}if(this.isDisposed)return;const n=i.map((({name:e})=>e)).sort();n!==this._names&&(this._names=n,this._terminalConnections.forEach((e=>{n.includes(e.name)||e.dispose()})),this._runningChanged.emit(this._models))}_onStarted(e){this._terminalConnections.add(e),e.disposed.connect(this._onDisposed,this)}_onDisposed(e){this._terminalConnections.delete(e),this.refreshRunning().catch((()=>{}))}get _models(){return this._names.map((e=>({name:e})))}}t.TerminalManager=h,function(e){e.NoopManager=class extends e{constructor(){super(...arguments),this._readyPromise=new Promise((()=>{}))}get isActive(){return!1}get parentReady(){return super.ready}get ready(){return this.parentReady.then((()=>this._readyPromise))}async startNew(e){return Promise.reject(new Error("Not implemented in no-op Terminal Manager"))}connectTo(e){throw Error("Not implemented in no-op Terminal Manager")}async shutdown(e){return Promise.reject(new Error("Not implemented in no-op Terminal Manager"))}async requestRunning(){return Promise.resolve()}}}(h=t.TerminalManager||(t.TerminalManager={}))},7384:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shutdownTerminal=t.listRunning=t.startNew=t.isAvailable=t.TERMINAL_SERVICE_URL=void 0;const n=i(4251),s=i(538);function r(){return"true"===String(n.PageConfig.getOption("terminalsAvailable")).toLowerCase()}var o;t.TERMINAL_SERVICE_URL="api/terminals",t.isAvailable=r,t.startNew=async function(e=s.ServerConnection.makeSettings(),i,r){o.errorIfNotAvailable();const a=n.URLExt.join(e.baseUrl,t.TERMINAL_SERVICE_URL),l={method:"POST",body:JSON.stringify({name:i,cwd:r})},h=await s.ServerConnection.makeRequest(a,l,e);if(200!==h.status)throw await s.ServerConnection.ResponseError.create(h);return await h.json()},t.listRunning=async function(e=s.ServerConnection.makeSettings()){o.errorIfNotAvailable();const i=n.URLExt.join(e.baseUrl,t.TERMINAL_SERVICE_URL),r=await s.ServerConnection.makeRequest(i,{},e);if(200!==r.status)throw await s.ServerConnection.ResponseError.create(r);const a=await r.json();if(!Array.isArray(a))throw new Error("Invalid terminal list");return a},t.shutdownTerminal=async function(e,i=s.ServerConnection.makeSettings()){var r;o.errorIfNotAvailable();const a=n.URLExt.join(i.baseUrl,t.TERMINAL_SERVICE_URL,e),l=await s.ServerConnection.makeRequest(a,{method:"DELETE"},i);if(404===l.status){const t=null!==(r=(await l.json()).message)&&void 0!==r?r:`The terminal session "${e}"" does not exist on the server`;console.warn(t)}else if(204!==l.status)throw await s.ServerConnection.ResponseError.create(l)},function(e){e.errorIfNotAvailable=function(){if(!r())throw new Error("Terminals Unavailable")}}(o||(o={}))},3828:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAvailable=void 0;const n=i(7384);Object.defineProperty(t,"isAvailable",{enumerable:!0,get:function(){return n.isAvailable}})},1014:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserManager=void 0;const n=i(4251),s=i(3911),r=i(9044),o=i(6424),a=i(538),l=i(7524),h="@jupyterlab/services:UserManager#user";class c extends l.BaseManager{constructor(e={}){var t;super(e),this._isReady=!1,this._userChanged=new o.Signal(this),this._connectionFailure=new o.Signal(this),this._ready=this.requestUser().then((()=>{this.isDisposed||(this._isReady=!0)})).catch((e=>new Promise((()=>{})))),this._pollSpecs=new r.Poll({auto:!1,factory:()=>this.requestUser(),frequency:{interval:61e3,backoff:!0,max:3e5},name:h,standby:null!==(t=e.standby)&&void 0!==t?t:"when-hidden"}),this.ready.then((()=>{this._pollSpecs.start()}))}get isReady(){return this._isReady}get ready(){return this._ready}get identity(){return this._identity}get permissions(){return this._permissions}get userChanged(){return this._userChanged}get connectionFailure(){return this._connectionFailure}dispose(){this._pollSpecs.dispose(),super.dispose()}async refreshUser(){await this._pollSpecs.refresh(),await this._pollSpecs.tick}async requestUser(){if(this.isDisposed)return;const{baseUrl:e}=this.serverSettings,{makeRequest:t,ResponseError:i}=a.ServerConnection,r=n.URLExt.join(e,"api/me"),o=await t(r,{},this.serverSettings);if(200!==o.status)throw await i.create(o);const l={identity:this._identity,permissions:this._permissions},c=await o.json(),u=c.identity,{localStorage:p}=window,f=p.getItem(h);if(f&&(!u.initials||!u.color)){const e=JSON.parse(f);u.initials=u.initials||e.initials||u.name.substring(0,1),u.color=u.color||e.color||d.getRandomColor()}s.JSONExt.deepEqual(c,l)||(this._identity=u,this._permissions=c.permissions,p.setItem(h,JSON.stringify(u)),this._userChanged.emit(c))}}var d;t.UserManager=c,function(e){const t=["var(--jp-collaborator-color1)","var(--jp-collaborator-color2)","var(--jp-collaborator-color3)","var(--jp-collaborator-color4)","var(--jp-collaborator-color5)","var(--jp-collaborator-color6)","var(--jp-collaborator-color7)"];e.getRandomColor=()=>t[Math.floor(Math.random()*t.length)]}(d||(d={}))},3247:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateProperty=void 0,t.validateProperty=function(e,t,i,n=[]){if(!e.hasOwnProperty(t))throw Error(`Missing property '${t}'`);const s=e[t];if(void 0!==i){let e=!0;switch(i){case"array":e=Array.isArray(s);break;case"object":e=void 0!==s;break;default:e=typeof s===i}if(!e)throw new Error(`Property '${t}' is not of type '${i}'`);if(n.length>0){let e=!0;switch(i){case"string":case"number":case"boolean":e=n.includes(s);break;default:e=n.findIndex((e=>e===s))>=0}if(!e)throw new Error(`Property '${t}' is not one of the valid values ${JSON.stringify(n)}`)}}}},9090:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceManager=void 0;const n=i(4251),s=i(5895),r=i(538);class o extends s.DataConnector{constructor(e={}){var t;super(),this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:r.ServerConnection.makeSettings()}async fetch(e){const{serverSettings:t}=this,{baseUrl:i,appUrl:n}=t,{makeRequest:s,ResponseError:o}=r.ServerConnection,l=i+n,h=a.url(l,e),c=await s(h,{},t);if(200!==c.status)throw await o.create(c);return c.json()}async list(){const{serverSettings:e}=this,{baseUrl:t,appUrl:i}=e,{makeRequest:n,ResponseError:s}=r.ServerConnection,o=t+i,l=a.url(o,""),h=await n(l,{},e);if(200!==h.status)throw await s.create(h);return(await h.json()).workspaces}async remove(e){const{serverSettings:t}=this,{baseUrl:i,appUrl:n}=t,{makeRequest:s,ResponseError:o}=r.ServerConnection,l=i+n,h=a.url(l,e),c=await s(h,{method:"DELETE"},t);if(204!==c.status)throw await o.create(c)}async save(e,t){const{serverSettings:i}=this,{baseUrl:n,appUrl:s}=i,{makeRequest:o,ResponseError:l}=r.ServerConnection,h=n+s,c=a.url(h,e),d={body:JSON.stringify(t),method:"PUT"},u=await o(c,d,i);if(204!==u.status)throw await l.create(u)}}var a;t.WorkspaceManager=o,function(e){e.url=function(e,t){return n.URLExt.join(e,"api/workspaces",t)}}(a||(a={}))},1150:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataConnector=void 0,t.DataConnector=class{async list(e){throw new Error("DataConnector#list method has not been implemented.")}async remove(e){throw new Error("DataConnector#remove method has not been implemented.")}async save(e,t){throw new Error("DataConnector#save method has not been implemented.")}}},5895:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var s=Object.getOwnPropertyDescriptor(t,i);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,s)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),s=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),s(i(1150),t),s(i(4995),t),s(i(2763),t),s(i(4611),t),s(i(2594),t)},4995:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2763:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RestorablePool=void 0;const n=i(3911),s=i(4050),r=i(6424);var o;t.RestorablePool=class{constructor(e){this._added=new r.Signal(this),this._current=null,this._currentChanged=new r.Signal(this),this._hasRestored=!1,this._isDisposed=!1,this._objects=new Set,this._restore=null,this._restored=new n.PromiseDelegate,this._updated=new r.Signal(this),this.namespace=e.namespace}get added(){return this._added}get current(){return this._current}set current(e){this._current!==e&&null!==e&&this._objects.has(e)&&(this._current=e,this._currentChanged.emit(this._current))}get currentChanged(){return this._currentChanged}get isDisposed(){return this._isDisposed}get restored(){return this._restored.promise}get size(){return this._objects.size}get updated(){return this._updated}async add(e){var t,i;if(e.isDisposed){const t="A disposed object cannot be added.";throw console.warn(t,e),new Error(t)}if(this._objects.has(e)){const t="This object already exists in the pool.";throw console.warn(t,e),new Error(t)}if(this._objects.add(e),e.disposed.connect(this._onInstanceDisposed,this),!o.injectedProperty.get(e)){if(this._restore){const{connector:n}=this._restore,s=this._restore.name(e);if(s){const r=`${this.namespace}:${s}`,a=null===(i=(t=this._restore).args)||void 0===i?void 0:i.call(t,e);o.nameProperty.set(e,r),await n.save(r,{data:a})}}this._added.emit(e)}}dispose(){this.isDisposed||(this._current=null,this._isDisposed=!0,this._objects.clear(),r.Signal.clearData(this))}find(e){const t=this._objects.values();for(const i of t)if(e(i))return i}forEach(e){this._objects.forEach(e)}filter(e){const t=[];return this.forEach((i=>{e(i)&&t.push(i)})),t}inject(e){return o.injectedProperty.set(e,!0),this.add(e)}has(e){return this._objects.has(e)}async restore(e){if(this._hasRestored)throw new Error("This pool has already been restored.");this._hasRestored=!0;const{command:t,connector:i,registry:n,when:s}=e,r=this.namespace,o=s?[i.list(r)].concat(s):[i.list(r)];this._restore=e;const[a]=await Promise.all(o),l=await Promise.all(a.ids.map((async(e,s)=>{const r=a.values[s],o=r&&r.data;return void 0===o?i.remove(e):n.execute(t,o).catch((()=>i.remove(e)))})));return this._restored.resolve(),l}async save(e){var t,i;const n=o.injectedProperty.get(e);if(!this._restore||!this.has(e)||n)return;const{connector:s}=this._restore,r=this._restore.name(e),a=o.nameProperty.get(e),l=r?`${this.namespace}:${r}`:"";if(a&&a!==l&&await s.remove(a),o.nameProperty.set(e,l),l){const n=null===(i=(t=this._restore).args)||void 0===i?void 0:i.call(t,e);await s.save(l,{data:n})}a!==l&&this._updated.emit(e)}_onInstanceDisposed(e){if(this._objects.delete(e),e===this._current&&(this._current=null,this._currentChanged.emit(this._current)),o.injectedProperty.get(e))return;if(!this._restore)return;const{connector:t}=this._restore,i=o.nameProperty.get(e);i&&t.remove(i)}},function(e){e.injectedProperty=new s.AttachedProperty({name:"injected",create:()=>!1}),e.nameProperty=new s.AttachedProperty({name:"name",create:()=>""})}(o||(o={}))},4611:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StateDB=void 0;const n=i(6424);class s{constructor(e={}){this._changed=new n.Signal(this);const{connector:t,transform:i}=e;this._connector=t||new s.Connector,this._ready=i?i.then((e=>{const{contents:t,type:i}=e;switch(i){case"cancel":default:return;case"clear":return this._clear();case"merge":return this._merge(t||{});case"overwrite":return this._overwrite(t||{})}})):Promise.resolve(void 0)}get changed(){return this._changed}async clear(){await this._ready,await this._clear()}async fetch(e){return await this._ready,this._fetch(e)}async list(e){return await this._ready,this._list(e)}async remove(e){await this._ready,await this._remove(e),this._changed.emit({id:e,type:"remove"})}async save(e,t){await this._ready,await this._save(e,t),this._changed.emit({id:e,type:"save"})}async toJSON(){await this._ready;const{ids:e,values:t}=await this._list();return t.reduce(((t,i,n)=>(t[e[n]]=i,t)),{})}async _clear(){await Promise.all((await this._list()).ids.map((e=>this._remove(e))))}async _fetch(e){const t=await this._connector.fetch(e);if(t)return JSON.parse(t).v}async _list(e=""){const{ids:t,values:i}=await this._connector.list(e);return{ids:t,values:i.map((e=>JSON.parse(e).v))}}async _merge(e){await Promise.all(Object.keys(e).map((t=>e[t]&&this._save(t,e[t]))))}async _overwrite(e){await this._clear(),await this._merge(e)}async _remove(e){return this._connector.remove(e)}async _save(e,t){return this._connector.save(e,JSON.stringify({v:t}))}}t.StateDB=s,function(e){e.Connector=class{constructor(){this._storage={}}async fetch(e){return this._storage[e]}async list(e=""){return Object.keys(this._storage).reduce(((t,i)=>(""!==e&&e!==i.split(":")[0]||(t.ids.push(i),t.values.push(this._storage[i])),t)),{ids:[],values:[]})}async remove(e){delete this._storage[e]}async save(e,t){this._storage[e]=t}}}(s=t.StateDB||(t.StateDB={}))},2594:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IStateDB=void 0;const n=i(3911);t.IStateDB=new n.Token("@jupyterlab/coreutils:IStateDB",'A service for the JupyterLab state database.\n Use this if you want to store data that will persist across page loads.\n See "state database" for more information.')},7564:(e,t,i)=>{"use strict";var n,s,r;function*o(){}function a(e,t){let i=0;for(const n of e)if(t(n,i++))return n}function l(e,t){let i;for(const n of e)void 0!==i?t(n,i)>0&&(i=n):i=n;return i}function h(e,t){let i=0;for(const n of e)if(!1===t(n,i++))return!1;return!0}function c(e,t){let i=0;for(const n of e)if(t(n,i++))return!0;return!1}function*d(e,t){let i=0;for(const n of e)yield t(n,i++)}function*u(e){if("function"==typeof e.retro)yield*e.retro();else for(let t=e.length-1;t>-1;t--)yield e[t]}i.d(t,{Fp:()=>l,G:()=>c,RO:()=>n,UI:()=>d,cS:()=>o,kf:()=>r,kh:()=>u,sE:()=>a,yW:()=>h}),function(e){function t(e,t,i=0,n=-1){let s,r=e.length;if(0===r)return-1;i=i<0?Math.max(0,i+r):Math.min(i,r-1),s=(n=n<0?Math.max(0,n+r):Math.min(n,r-1))=i)return;let n=e[t];for(let n=t+1;n0;){let n=a>>1,s=o+n;i(e[s],t)<0?(o=s+1,a-=n+1):a=n}return o},e.upperBound=function(e,t,i,n=0,s=-1){let r=e.length;if(0===r)return 0;let o=n=n<0?Math.max(0,n+r):Math.min(n,r-1),a=(s=s<0?Math.max(0,s+r):Math.min(s,r-1))-n+1;for(;a>0;){let n=a>>1,s=o+n;i(e[s],t)>0?a=n:(o=s+1,a-=n+1)}return o},e.shallowEqual=function(e,t,i){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0,s=e.length;n=o&&(i=s<0?o-1:o),void 0===n?n=s<0?-1:o:n<0?n=Math.max(n+o,s<0?-1:0):n>=o&&(n=s<0?o-1:o),r=s<0&&n>=i||s>0&&i>=n?0:s<0?Math.floor((n-i+1)/s+1):Math.floor((n-i-1)/s+1);let a=[];for(let t=0;t=(n=n<0?Math.max(0,n+s):Math.min(n,s-1)))return;let o=n-i+1;if(t>0?t%=o:t<0&&(t=(t%o+o)%o),0===t)return;let a=i+t;r(e,i,a-1),r(e,a,n),r(e,i,n)},e.fill=function(e,t,i=0,n=-1){let s,r=e.length;if(0!==r){i=i<0?Math.max(0,i+r):Math.min(i,r-1),s=(n=n<0?Math.max(0,n+r):Math.min(n,r-1))t;--i)e[i]=e[i-1];e[t]=i},e.removeAt=o,e.removeFirstOf=function(e,i,n=0,s=-1){let r=t(e,i,n,s);return-1!==r&&o(e,r),r},e.removeLastOf=function(e,t,n=-1,s=0){let r=i(e,t,n,s);return-1!==r&&o(e,r),r},e.removeAllOf=function(e,t,i=0,n=-1){let s=e.length;if(0===s)return 0;i=i<0?Math.max(0,i+s):Math.min(i,s-1),n=n<0?Math.max(0,n+s):Math.min(n,s-1);let r=0;for(let o=0;o=i&&o<=n&&e[o]===t||n=i)&&e[o]===t?r++:r>0&&(e[o-r]=e[o]);return r>0&&(e.length=s-r),r},e.removeFirstWhere=function(e,t,i=0,s=-1){let r,a=n(e,t,i,s);return-1!==a&&(r=o(e,a)),{index:a,value:r}},e.removeLastWhere=function(e,t,i=-1,n=0){let r,a=s(e,t,i,n);return-1!==a&&(r=o(e,a)),{index:a,value:r}},e.removeAllWhere=function(e,t,i=0,n=-1){let s=e.length;if(0===s)return 0;i=i<0?Math.max(0,i+s):Math.min(i,s-1),n=n<0?Math.max(0,n+s):Math.min(n,s-1);let r=0;for(let o=0;o=i&&o<=n&&t(e[o],o)||n=i)&&t(e[o],o)?r++:r>0&&(e[o-r]=e[o]);return r>0&&(e.length=s-r),r}}(n||(n={})),function(e){e.rangeLength=function(e,t,i){return 0===i?1/0:e>t&&i>0||et?1:0}}(r||(r={}))},3911:function(e,t){!function(e){"use strict";e.JSONExt=void 0,function(e){function t(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e}function i(e){return Array.isArray(e)}function n(e,s){if(e===s)return!0;if(t(e)||t(s))return!1;let r=i(e),o=i(s);return r===o&&(r&&o?function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let i=0,s=e.length;i>>0),e[i]=255&t,t>>>=8}e.Random=void 0,(e.Random||(e.Random={})).getRandomValues=(()=>{const e="undefined"!=typeof window&&(window.crypto||window.msCrypto)||null;return e&&"function"==typeof e.getRandomValues?function(t){return e.getRandomValues(t)}:t})(),e.UUID=void 0,(e.UUID||(e.UUID={})).uuid4=function(e){const t=new Uint8Array(16),i=new Array(256);for(let e=0;e<16;++e)i[e]="0"+e.toString(16);for(let e=16;e<256;++e)i[e]=e.toString(16);return function(){return e(t),t[6]=64|15&t[6],t[8]=128|63&t[8],i[t[0]]+i[t[1]]+i[t[2]]+i[t[3]]+"-"+i[t[4]]+i[t[5]]+"-"+i[t[6]]+i[t[7]]+"-"+i[t[8]]+i[t[9]]+"-"+i[t[10]]+i[t[11]]+i[t[12]]+i[t[13]]+i[t[14]]+i[t[15]]}}(e.Random.getRandomValues),e.MimeData=class{constructor(){this._types=[],this._values=[]}types(){return this._types.slice()}hasData(e){return-1!==this._types.indexOf(e)}getData(e){let t=this._types.indexOf(e);return-1!==t?this._values[t]:void 0}setData(e,t){this.clearData(e),this._types.push(e),this._values.push(t)}clearData(e){let t=this._types.indexOf(e);-1!==t&&(this._types.splice(t,1),this._values.splice(t,1))}clear(){this._types.length=0,this._values.length=0}},e.PromiseDelegate=class{constructor(){this.promise=new Promise(((e,t)=>{this._resolve=e,this._reject=t}))}resolve(e){(0,this._resolve)(e)}reject(e){(0,this._reject)(e)}},e.Token=class{constructor(e,t){this.name=e,this.description=null!=t?t:"",this._tokenStructuralPropertyT=null}}}(t)},1122:(e,t,i)=>{"use strict";i.r(t),i.d(t,{DisposableDelegate:()=>s,DisposableSet:()=>o,ObservableDisposableDelegate:()=>r,ObservableDisposableSet:()=>a});var n=i(6424);class s{constructor(e){this._fn=e}get isDisposed(){return!this._fn}dispose(){if(!this._fn)return;let e=this._fn;this._fn=null,e()}}class r extends s{constructor(){super(...arguments),this._disposed=new n.Signal(this)}get disposed(){return this._disposed}dispose(){this.isDisposed||(super.dispose(),this._disposed.emit(void 0),n.Signal.clearData(this))}}class o{constructor(){this._isDisposed=!1,this._items=new Set}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed||(this._isDisposed=!0,this._items.forEach((e=>{e.dispose()})),this._items.clear())}contains(e){return this._items.has(e)}add(e){this._items.add(e)}remove(e){this._items.delete(e)}clear(){this._items.clear()}}!function(e){e.from=function(t){let i=new e;for(const e of t)i.add(e);return i}}(o||(o={}));class a extends o{constructor(){super(...arguments),this._disposed=new n.Signal(this)}get disposed(){return this._disposed}dispose(){this.isDisposed||(super.dispose(),this._disposed.emit(void 0),n.Signal.clearData(this))}}!function(e){e.from=function(t){let i=new e;for(const e of t)i.add(e);return i}}(a||(a={}))},9044:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Debouncer:()=>l,Poll:()=>o,RateLimiter:()=>a,Throttler:()=>h});var n,s=i(3911),r=i(6424);class o{constructor(e){var t;this._disposed=new r.Signal(this),this._lingered=0,this._tick=new s.PromiseDelegate,this._ticked=new r.Signal(this),this._factory=e.factory,this._linger=null!==(t=e.linger)&&void 0!==t?t:n.DEFAULT_LINGER,this._standby=e.standby||n.DEFAULT_STANDBY,this._state={...n.DEFAULT_STATE,timestamp:(new Date).getTime()};const i=e.frequency||{},o=Math.max(i.interval||0,i.max||0,n.DEFAULT_FREQUENCY.max);this.frequency={...n.DEFAULT_FREQUENCY,...i,max:o},this.name=e.name||n.DEFAULT_NAME,"auto"in e&&!e.auto||setTimeout((()=>this.start()))}get disposed(){return this._disposed}get frequency(){return this._frequency}set frequency(e){if(this.isDisposed||s.JSONExt.deepEqual(e,this.frequency||{}))return;let{backoff:t,interval:i,max:n}=e;if(i=Math.round(i),n=Math.round(n),"number"==typeof t&&t<1)throw new Error("Poll backoff growth factor must be at least 1");if((i<0||i>n)&&i!==o.NEVER)throw new Error("Poll interval must be between 0 and max");if(n>o.MAX_INTERVAL&&n!==o.NEVER)throw new Error(`Max interval must be less than ${o.MAX_INTERVAL}`);this._frequency={backoff:t,interval:i,max:n}}get isDisposed(){return"disposed"===this.state.phase}get standby(){return this._standby}set standby(e){this.isDisposed||this.standby===e||(this._standby=e)}get state(){return this._state}get tick(){return this._tick.promise}get ticked(){return this._ticked}async*[Symbol.asyncIterator](){for(;!this.isDisposed;)yield this.state,await this.tick.catch((()=>{}))}dispose(){this.isDisposed||(this._state={...n.DISPOSED_STATE,timestamp:(new Date).getTime()},this._tick.promise.catch((e=>{})),this._tick.reject(new Error(`Poll (${this.name}) is disposed.`)),this._disposed.emit(void 0),r.Signal.clearData(this))}refresh(){return this.schedule({cancel:({phase:e})=>"refreshed"===e,interval:o.IMMEDIATE,phase:"refreshed"})}async schedule(e={}){if(this.isDisposed)return;if(e.cancel&&e.cancel(this.state))return;const t=this._tick,i=new s.PromiseDelegate,n={interval:this.frequency.interval,payload:null,phase:"standby",timestamp:(new Date).getTime(),...e};this._state=n,this._tick=i,clearTimeout(this._timeout),this._ticked.emit(this.state),t.resolve(this),await t.promise,n.interval!==o.NEVER?this._timeout=setTimeout((()=>{this.isDisposed||this.tick!==i.promise||this._execute()}),n.interval):this._timeout=void 0}start(){return this.schedule({cancel:({phase:e})=>"constructed"!==e&&"standby"!==e&&"stopped"!==e,interval:o.IMMEDIATE,phase:"started"})}stop(){return this.schedule({cancel:({phase:e})=>"stopped"===e,interval:o.NEVER,phase:"stopped"})}get hidden(){return n.hidden}_execute(){let e="function"==typeof this.standby?this.standby():this.standby;if("never"===e?e=!1:"when-hidden"===e&&(this.hidden?e=++this._lingered>this._linger:(this._lingered=0,e=!1)),e)return void this.schedule();const t=this.tick;this._factory(this.state).then((e=>{this.isDisposed||this.tick!==t||this.schedule({payload:e,phase:"rejected"===this.state.phase?"reconnected":"resolved"})})).catch((e=>{this.isDisposed||this.tick!==t||this.schedule({interval:n.sleep(this.frequency,this.state),payload:e,phase:"rejected"})}))}}!function(e){e.IMMEDIATE=0,e.MAX_INTERVAL=2147483647,e.NEVER=1/0}(o||(o={})),function(e){e.DEFAULT_BACKOFF=3,e.DEFAULT_FREQUENCY={backoff:!0,interval:1e3,max:3e4},e.DEFAULT_LINGER=1,e.DEFAULT_NAME="unknown",e.DEFAULT_STANDBY="when-hidden",e.DEFAULT_STATE={interval:o.NEVER,payload:null,phase:"constructed",timestamp:new Date(0).getTime()},e.DISPOSED_STATE={interval:o.NEVER,payload:null,phase:"disposed",timestamp:new Date(0).getTime()},e.sleep=function(t,i){const{backoff:n,interval:s,max:r}=t;if(s===o.NEVER)return s;const a=!0===n?e.DEFAULT_BACKOFF:!1===n?1:n,l=function(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e}(s,i.interval*a);return Math.min(r,l)},e.hidden="undefined"!=typeof document&&(document.addEventListener("visibilitychange",(()=>{e.hidden="hidden"===document.visibilityState})),document.addEventListener("pagehide",(()=>{e.hidden="hidden"===document.visibilityState})),"hidden"===document.visibilityState)}(n||(n={}));class a{constructor(e,t=500){this.args=void 0,this.payload=null,this.limit=t,this.poll=new o({auto:!1,factory:async()=>{const{args:t}=this;return this.args=void 0,e(...t)},frequency:{backoff:!1,interval:o.NEVER,max:o.NEVER},standby:"never"}),this.payload=new s.PromiseDelegate,this.poll.ticked.connect(((e,t)=>{const{payload:i}=this;return"resolved"===t.phase?(this.payload=new s.PromiseDelegate,void i.resolve(t.payload)):"rejected"===t.phase||"stopped"===t.phase?(this.payload=new s.PromiseDelegate,i.promise.catch((e=>{})),void i.reject(t.payload)):void 0}),this)}get isDisposed(){return null===this.payload}dispose(){this.isDisposed||(this.args=void 0,this.payload=null,this.poll.dispose())}async stop(){return this.poll.stop()}}class l extends a{invoke(...e){return this.args=e,this.poll.schedule({interval:this.limit,phase:"invoked"}),this.payload.promise}}class h extends a{constructor(e,t){super(e,"number"==typeof t?t:t&&t.limit),this._trailing=!1,"number"!=typeof t&&t&&"trailing"===t.edge&&(this._trailing=!0),this._interval=this._trailing?this.limit:o.IMMEDIATE}invoke(...e){const t="invoked"!==this.poll.state.phase;return(t||this._trailing)&&(this.args=e),t&&this.poll.schedule({interval:this._interval,phase:"invoked"}),this.payload.promise}}},4050:(e,t,i)=>{"use strict";i.r(t),i.d(t,{AttachedProperty:()=>n});class n{constructor(e){this._pid=s.nextPID(),this.name=e.name,this._create=e.create,this._coerce=e.coerce||null,this._compare=e.compare||null,this._changed=e.changed||null}get(e){let t,i=s.ensureMap(e);return t=this._pid in i?i[this._pid]:i[this._pid]=this._createValue(e),t}set(e,t){let i,n=s.ensureMap(e);i=this._pid in n?n[this._pid]:n[this._pid]=this._createValue(e);let r=this._coerceValue(e,t);this._maybeNotify(e,i,n[this._pid]=r)}coerce(e){let t,i=s.ensureMap(e);t=this._pid in i?i[this._pid]:i[this._pid]=this._createValue(e);let n=this._coerceValue(e,t);this._maybeNotify(e,t,i[this._pid]=n)}_createValue(e){return(0,this._create)(e)}_coerceValue(e,t){let i=this._coerce;return i?i(e,t):t}_compareValue(e,t){let i=this._compare;return i?i(e,t):e===t}_maybeNotify(e,t,i){let n=this._changed;n&&!this._compareValue(t,i)&&n(e,t,i)}}var s;!function(e){e.clearData=function(e){s.ownerData.delete(e)}}(n||(n={})),function(e){e.ownerData=new WeakMap,e.nextPID=(()=>{let e=0;return()=>`pid-${`${Math.random()}`.slice(2)}-${e++}`})(),e.ensureMap=function(t){let i=e.ownerData.get(t);return i||(i=Object.create(null),e.ownerData.set(t,i),i)}}(s||(s={}))},6424:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Signal:()=>o,Stream:()=>a});var n,s=i(7564),r=i(3911);class o{constructor(e){this.sender=e}connect(e,t){return n.connect(this,e,t)}disconnect(e,t){return n.disconnect(this,e,t)}emit(e){n.emit(this,e)}}!function(e){e.disconnectBetween=function(e,t){n.disconnectBetween(e,t)},e.disconnectSender=function(e){n.disconnectSender(e)},e.disconnectReceiver=function(e){n.disconnectReceiver(e)},e.disconnectAll=function(e){n.disconnectAll(e)},e.clearData=function(e){n.disconnectAll(e)},e.getExceptionHandler=function(){return n.exceptionHandler},e.setExceptionHandler=function(e){let t=n.exceptionHandler;return n.exceptionHandler=e,t}}(o||(o={}));class a extends o{constructor(){super(...arguments),this._pending=new r.PromiseDelegate}async*[Symbol.asyncIterator](){let e=this._pending;for(;;)try{const{args:t,next:i}=await e.promise;e=i,yield t}catch(e){return}}emit(e){const t=this._pending,i=this._pending=new r.PromiseDelegate;t.resolve({args:e,next:i}),super.emit(e)}stop(){this._pending.promise.catch((()=>{})),this._pending.reject("stop"),this._pending=new r.PromiseDelegate}}!function(e){function t(e){let t=n.get(e);if(t&&0!==t.length){for(const e of t){if(!e.signal)continue;let t=e.thisArg||e.slot;e.signal=null,c(r.get(t))}c(t)}}function i(e){let t=r.get(e);if(t&&0!==t.length){for(const e of t){if(!e.signal)continue;let t=e.signal.sender;e.signal=null,c(n.get(t))}c(t)}}e.exceptionHandler=e=>{console.error(e)},e.connect=function(e,t,i){i=i||void 0;let s=n.get(e.sender);if(s||(s=[],n.set(e.sender,s)),l(s,e,t,i))return!1;let o=i||t,a=r.get(o);a||(a=[],r.set(o,a));let h={signal:e,slot:t,thisArg:i};return s.push(h),a.push(h),!0},e.disconnect=function(e,t,i){i=i||void 0;let s=n.get(e.sender);if(!s||0===s.length)return!1;let o=l(s,e,t,i);if(!o)return!1;let a=i||t,h=r.get(a);return o.signal=null,c(s),c(h),!0},e.disconnectBetween=function(e,t){let i=n.get(e);if(!i||0===i.length)return;let s=r.get(t);if(s&&0!==s.length){for(const t of s)t.signal&&t.signal.sender===e&&(t.signal=null);c(i),c(s)}},e.disconnectSender=t,e.disconnectReceiver=i,e.disconnectAll=function(e){t(e),i(e)},e.emit=function(e,t){let i=n.get(e.sender);if(i&&0!==i.length)for(let n=0,s=i.length;ne.signal===t&&e.slot===i&&e.thisArg===n))}function h(t,i){let{signal:n,slot:s,thisArg:r}=t;try{s.call(r,n.sender,i)}catch(t){e.exceptionHandler(t)}}function c(e){0===o.size&&a(d),o.add(e)}function d(){o.forEach(u),o.clear()}function u(e){s.RO.removeAllWhere(e,p)}function p(e){return null===e.signal}}(n||(n={}))},2454:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===i}(e)}(e)},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?a((i=e,Array.isArray(i)?[]:{}),e,t):e;var i}function s(e,t,i){return e.concat(t).map((function(e){return n(e,i)}))}function r(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,i,l){(l=l||{}).arrayMerge=l.arrayMerge||s,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=n;var h=Array.isArray(i);return h===Array.isArray(e)?h?l.arrayMerge(e,i,l):function(e,t,i){var s={};return i.isMergeableObject(e)&&r(e).forEach((function(t){s[t]=n(e[t],i)})),r(t).forEach((function(r){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,r)||(o(e,r)&&i.isMergeableObject(t[r])?s[r]=function(e,t){if(!t.customMerge)return a;var i=t.customMerge(e);return"function"==typeof i?i:a}(r,i)(e[r],t[r],i):s[r]=n(t[r],i))})),s}(e,i,l):n(i,l)}a.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,i){return a(e,i,t)}),{})};var l=a;e.exports=l},8002:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attributeNames=t.elementNames=void 0,t.elementNames=new Map([["altglyph","altGlyph"],["altglyphdef","altGlyphDef"],["altglyphitem","altGlyphItem"],["animatecolor","animateColor"],["animatemotion","animateMotion"],["animatetransform","animateTransform"],["clippath","clipPath"],["feblend","feBlend"],["fecolormatrix","feColorMatrix"],["fecomponenttransfer","feComponentTransfer"],["fecomposite","feComposite"],["feconvolvematrix","feConvolveMatrix"],["fediffuselighting","feDiffuseLighting"],["fedisplacementmap","feDisplacementMap"],["fedistantlight","feDistantLight"],["fedropshadow","feDropShadow"],["feflood","feFlood"],["fefunca","feFuncA"],["fefuncb","feFuncB"],["fefuncg","feFuncG"],["fefuncr","feFuncR"],["fegaussianblur","feGaussianBlur"],["feimage","feImage"],["femerge","feMerge"],["femergenode","feMergeNode"],["femorphology","feMorphology"],["feoffset","feOffset"],["fepointlight","fePointLight"],["fespecularlighting","feSpecularLighting"],["fespotlight","feSpotLight"],["fetile","feTile"],["feturbulence","feTurbulence"],["foreignobject","foreignObject"],["glyphref","glyphRef"],["lineargradient","linearGradient"],["radialgradient","radialGradient"],["textpath","textPath"]]),t.attributeNames=new Map([["definitionurl","definitionURL"],["attributename","attributeName"],["attributetype","attributeType"],["basefrequency","baseFrequency"],["baseprofile","baseProfile"],["calcmode","calcMode"],["clippathunits","clipPathUnits"],["diffuseconstant","diffuseConstant"],["edgemode","edgeMode"],["filterunits","filterUnits"],["glyphref","glyphRef"],["gradienttransform","gradientTransform"],["gradientunits","gradientUnits"],["kernelmatrix","kernelMatrix"],["kernelunitlength","kernelUnitLength"],["keypoints","keyPoints"],["keysplines","keySplines"],["keytimes","keyTimes"],["lengthadjust","lengthAdjust"],["limitingconeangle","limitingConeAngle"],["markerheight","markerHeight"],["markerunits","markerUnits"],["markerwidth","markerWidth"],["maskcontentunits","maskContentUnits"],["maskunits","maskUnits"],["numoctaves","numOctaves"],["pathlength","pathLength"],["patterncontentunits","patternContentUnits"],["patterntransform","patternTransform"],["patternunits","patternUnits"],["pointsatx","pointsAtX"],["pointsaty","pointsAtY"],["pointsatz","pointsAtZ"],["preservealpha","preserveAlpha"],["preserveaspectratio","preserveAspectRatio"],["primitiveunits","primitiveUnits"],["refx","refX"],["refy","refY"],["repeatcount","repeatCount"],["repeatdur","repeatDur"],["requiredextensions","requiredExtensions"],["requiredfeatures","requiredFeatures"],["specularconstant","specularConstant"],["specularexponent","specularExponent"],["spreadmethod","spreadMethod"],["startoffset","startOffset"],["stddeviation","stdDeviation"],["stitchtiles","stitchTiles"],["surfacescale","surfaceScale"],["systemlanguage","systemLanguage"],["tablevalues","tableValues"],["targetx","targetX"],["targety","targetY"],["textlength","textLength"],["viewbox","viewBox"],["viewtarget","viewTarget"],["xchannelselector","xChannelSelector"],["ychannelselector","yChannelSelector"],["zoomandpan","zoomAndPan"]])},2721:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i";case a.Comment:return"\x3c!--"+e.data+"--\x3e";case a.CDATA:return function(e){return""}(e);case a.Script:case a.Style:case a.Tag:return function(e,t){var i;"foreign"===t.xmlMode&&(e.name=null!==(i=h.elementNames.get(e.name))&&void 0!==i?i:e.name,e.parent&&f.has(e.parent.name)&&(t=n(n({},t),{xmlMode:!1}))),!t.xmlMode&&m.has(e.name)&&(t=n(n({},t),{xmlMode:"foreign"}));var s="<"+e.name,r=function(e,t){if(e)return Object.keys(e).map((function(i){var n,s,r=null!==(n=e[i])&&void 0!==n?n:"";return"foreign"===t.xmlMode&&(i=null!==(s=h.attributeNames.get(i))&&void 0!==s?s:i),t.emptyAttrs||t.xmlMode||""!==r?i+'="'+(!1!==t.decodeEntities?l.encodeXML(r):r.replace(/"/g,"""))+'"':i})).join(" ")}(e.attribs,t);return r&&(s+=" "+r),0===e.children.length&&(t.xmlMode?!1!==t.selfClosingTags:t.selfClosingTags&&d.has(e.name))?(t.xmlMode||(s+=" "),s+="/>"):(s+=">",e.children.length>0&&(s+=u(e.children,t)),!t.xmlMode&&d.has(e.name)||(s+="")),s}(e,t);case a.Text:return function(e,t){var i=e.data||"";return!1===t.decodeEntities||!t.xmlMode&&e.parent&&c.has(e.parent.name)||(i=l.encodeXML(i)),i}(e,t)}}t.default=u;var f=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),m=new Set(["svg","math"])},3706:(e,t)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(i=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===i.Tag||e.type===i.Script||e.type===i.Style},t.Root=i.Root,t.Text=i.Text,t.Directive=i.Directive,t.Comment=i.Comment,t.Script=i.Script,t.Style=i.Style,t.Tag=i.Tag,t.CDATA=i.CDATA,t.Doctype=i.Doctype},9425:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var s=Object.getOwnPropertyDescriptor(t,i);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,s)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),s=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var r=i(3706),o=i(4862);s(i(4862),t);var a=/\s+/g,l={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1,xmlMode:!1},h=function(){function e(e,t,i){this.dom=[],this.root=new o.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(i=t,t=l),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:l,this.elementCB=null!=i?i:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new o.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var i=this.options.xmlMode?r.ElementType.Tag:void 0,n=new o.Element(e,t,void 0,i);this.addNode(n),this.tagStack.push(n)},e.prototype.ontext=function(e){var t=this.options.normalizeWhitespace,i=this.lastNode;if(i&&i.type===r.ElementType.Text)t?i.data=(i.data+e).replace(a," "):i.data+=e,this.options.withEndIndices&&(i.endIndex=this.parser.endIndex);else{t&&(e=e.replace(a," "));var n=new o.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===r.ElementType.Comment)this.lastNode.data+=e;else{var t=new o.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new o.Text(""),t=new o.NodeWithChildren(r.ElementType.CDATA,[e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var i=new o.ProcessingInstruction(e,t);this.addNode(i)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],i=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),i&&(e.prev=i,i.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=h,t.default=h},4862:function(e,t,i){"use strict";var n,s=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(l);t.NodeWithChildren=p;var f=function(e){function t(t){return e.call(this,o.ElementType.Root,t)||this}return s(t,e),t}(p);t.Document=f;var m=function(e){function t(t,i,n,s){void 0===n&&(n=[]),void 0===s&&(s="script"===t?o.ElementType.Script:"style"===t?o.ElementType.Style:o.ElementType.Tag);var r=e.call(this,s,n)||this;return r.name=t,r.attribs=i,r}return s(t,e),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var i,n;return{name:t,value:e.attribs[t],namespace:null===(i=e["x-attribsNamespace"])||void 0===i?void 0:i[t],prefix:null===(n=e["x-attribsPrefix"])||void 0===n?void 0:n[t]}}))},enumerable:!1,configurable:!0}),t}(p);function g(e){return(0,o.isTag)(e)}function v(e){return e.type===o.ElementType.CDATA}function O(e){return e.type===o.ElementType.Text}function b(e){return e.type===o.ElementType.Comment}function _(e){return e.type===o.ElementType.Directive}function y(e){return e.type===o.ElementType.Root}function w(e,t){var i;if(void 0===t&&(t=!1),O(e))i=new c(e.data);else if(b(e))i=new d(e.data);else if(g(e)){var n=t?x(e.children):[],s=new m(e.name,r({},e.attribs),n);n.forEach((function(e){return e.parent=s})),null!=e.namespace&&(s.namespace=e.namespace),e["x-attribsNamespace"]&&(s["x-attribsNamespace"]=r({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(s["x-attribsPrefix"]=r({},e["x-attribsPrefix"])),i=s}else if(v(e)){n=t?x(e.children):[];var a=new p(o.ElementType.CDATA,n);n.forEach((function(e){return e.parent=a})),i=a}else if(y(e)){n=t?x(e.children):[];var l=new f(n);n.forEach((function(e){return e.parent=l})),e["x-mode"]&&(l["x-mode"]=e["x-mode"]),i=l}else{if(!_(e))throw new Error("Not implemented yet: ".concat(e.type));var h=new u(e.name,e.data);null!=e["x-name"]&&(h["x-name"]=e["x-name"],h["x-publicId"]=e["x-publicId"],h["x-systemId"]=e["x-systemId"]),i=h}return i.startIndex=e.startIndex,i.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(i.sourceCodeLocation=e.sourceCodeLocation),i}function x(e){for(var t=e.map((function(e){return w(e,!0)})),i=1;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFeed=void 0;var n=i(3017),s=i(9319);t.getFeed=function(e){var t=l(d,e);return t?"feed"===t.name?function(e){var t,i=e.children,n={type:"atom",items:(0,s.getElementsByTagName)("entry",i).map((function(e){var t,i=e.children,n={media:a(i)};c(n,"id","id",i),c(n,"title","title",i);var s=null===(t=l("link",i))||void 0===t?void 0:t.attribs.href;s&&(n.link=s);var r=h("summary",i)||h("content",i);r&&(n.description=r);var o=h("updated",i);return o&&(n.pubDate=new Date(o)),n}))};c(n,"id","id",i),c(n,"title","title",i);var r=null===(t=l("link",i))||void 0===t?void 0:t.attribs.href;r&&(n.link=r),c(n,"description","subtitle",i);var o=h("updated",i);return o&&(n.updated=new Date(o)),c(n,"author","email",i,!0),n}(t):function(e){var t,i,n=null!==(i=null===(t=l("channel",e.children))||void 0===t?void 0:t.children)&&void 0!==i?i:[],r={type:e.name.substr(0,3),id:"",items:(0,s.getElementsByTagName)("item",e.children).map((function(e){var t=e.children,i={media:a(t)};c(i,"id","guid",t),c(i,"title","title",t),c(i,"link","link",t),c(i,"description","description",t);var n=h("pubDate",t);return n&&(i.pubDate=new Date(n)),i}))};c(r,"title","title",n),c(r,"link","link",n),c(r,"description","description",n);var o=h("lastBuildDate",n);return o&&(r.updated=new Date(o)),c(r,"author","managingEditor",n,!0),r}(t):null};var r=["url","type","lang"],o=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function a(e){return(0,s.getElementsByTagName)("media:content",e).map((function(e){for(var t=e.attribs,i={medium:t.medium,isDefault:!!t.isDefault},n=0,s=r;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uniqueSort=t.compareDocumentPosition=t.removeSubsets=void 0;var n=i(9425);function s(e,t){var i=[],s=[];if(e===t)return 0;for(var r=(0,n.hasChildren)(e)?e:e.parent;r;)i.unshift(r),r=r.parent;for(r=(0,n.hasChildren)(t)?t:t.parent;r;)s.unshift(r),r=r.parent;for(var o=Math.min(i.length,s.length),a=0;ah.indexOf(d)?l===t?20:4:l===e?10:2}t.removeSubsets=function(e){for(var t=e.length;--t>=0;){var i=e[t];if(t>0&&e.lastIndexOf(i,t-1)>=0)e.splice(t,1);else for(var n=i.parent;n;n=n.parent)if(e.includes(n)){e.splice(t,1);break}}return e},t.compareDocumentPosition=s,t.uniqueSort=function(e){return(e=e.filter((function(e,t,i){return!i.includes(e,t+1)}))).sort((function(e,t){var i=s(e,t);return 2&i?-1:4&i?1:0})),e}},5030:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),s=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),t.hasChildren=t.isDocument=t.isComment=t.isText=t.isCDATA=t.isTag=void 0,s(i(3017),t),s(i(8563),t),s(i(378),t),s(i(1446),t),s(i(9319),t),s(i(6850),t),s(i(9904),t);var r=i(9425);Object.defineProperty(t,"isTag",{enumerable:!0,get:function(){return r.isTag}}),Object.defineProperty(t,"isCDATA",{enumerable:!0,get:function(){return r.isCDATA}}),Object.defineProperty(t,"isText",{enumerable:!0,get:function(){return r.isText}}),Object.defineProperty(t,"isComment",{enumerable:!0,get:function(){return r.isComment}}),Object.defineProperty(t,"isDocument",{enumerable:!0,get:function(){return r.isDocument}}),Object.defineProperty(t,"hasChildren",{enumerable:!0,get:function(){return r.hasChildren}})},9319:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getElementsByTagType=t.getElementsByTagName=t.getElementById=t.getElements=t.testElement=void 0;var n=i(9425),s=i(1446),r={tag_name:function(e){return"function"==typeof e?function(t){return(0,n.isTag)(t)&&e(t.name)}:"*"===e?n.isTag:function(t){return(0,n.isTag)(t)&&t.name===e}},tag_type:function(e){return"function"==typeof e?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return"function"==typeof e?function(t){return(0,n.isText)(t)&&e(t.data)}:function(t){return(0,n.isText)(t)&&t.data===e}}};function o(e,t){return"function"==typeof t?function(i){return(0,n.isTag)(i)&&t(i.attribs[e])}:function(i){return(0,n.isTag)(i)&&i.attribs[e]===t}}function a(e,t){return function(i){return e(i)||t(i)}}function l(e){var t=Object.keys(e).map((function(t){var i=e[t];return Object.prototype.hasOwnProperty.call(r,t)?r[t](i):o(t,i)}));return 0===t.length?null:t.reduce(a)}t.testElement=function(e,t){var i=l(e);return!i||i(t)},t.getElements=function(e,t,i,n){void 0===n&&(n=1/0);var r=l(e);return r?(0,s.filter)(r,t,i,n):[]},t.getElementById=function(e,t,i){return void 0===i&&(i=!0),Array.isArray(t)||(t=[t]),(0,s.findOne)(o("id",e),t,i)},t.getElementsByTagName=function(e,t,i,n){return void 0===i&&(i=!0),void 0===n&&(n=1/0),(0,s.filter)(r.tag_name(e),t,i,n)},t.getElementsByTagType=function(e,t,i,n){return void 0===i&&(i=!0),void 0===n&&(n=1/0),(0,s.filter)(r.tag_type(e),t,i,n)}},378:(e,t)=>{"use strict";function i(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var t=e.parent.children;t.splice(t.lastIndexOf(e),1)}}Object.defineProperty(t,"__esModule",{value:!0}),t.prepend=t.prependChild=t.append=t.appendChild=t.replaceElement=t.removeElement=void 0,t.removeElement=i,t.replaceElement=function(e,t){var i=t.prev=e.prev;i&&(i.next=t);var n=t.next=e.next;n&&(n.prev=t);var s=t.parent=e.parent;if(s){var r=s.children;r[r.lastIndexOf(e)]=t}},t.appendChild=function(e,t){if(i(t),t.next=null,t.parent=e,e.children.push(t)>1){var n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null},t.append=function(e,t){i(t);var n=e.parent,s=e.next;if(t.next=s,t.prev=e,e.next=t,t.parent=n,s){if(s.prev=t,n){var r=n.children;r.splice(r.lastIndexOf(s),0,t)}}else n&&n.children.push(t)},t.prependChild=function(e,t){if(i(t),t.parent=e,t.prev=null,1!==e.children.unshift(t)){var n=e.children[1];n.prev=t,t.next=n}else t.next=null},t.prepend=function(e,t){i(t);var n=e.parent;if(n){var s=n.children;s.splice(s.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}},1446:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findAll=t.existsOne=t.findOne=t.findOneChild=t.find=t.filter=void 0;var n=i(9425);function s(e,t,i,r){for(var o=[],a=0,l=t;a0){var c=s(e,h.children,i,r);if(o.push.apply(o,c),(r-=c.length)<=0)break}}return o}t.filter=function(e,t,i,n){return void 0===i&&(i=!0),void 0===n&&(n=1/0),Array.isArray(t)||(t=[t]),s(e,t,i,n)},t.find=s,t.findOneChild=function(e,t){return t.find(e)},t.findOne=function e(t,i,s){void 0===s&&(s=!0);for(var r=null,o=0;o0&&(r=e(t,a.children)))}return r},t.existsOne=function e(t,i){return i.some((function(i){return(0,n.isTag)(i)&&(t(i)||i.children.length>0&&e(t,i.children))}))},t.findAll=function(e,t){for(var i,s,r=[],o=t.filter(n.isTag);s=o.shift();){var a=null===(i=s.children)||void 0===i?void 0:i.filter(n.isTag);a&&a.length>0&&o.unshift.apply(o,a),e(s)&&r.push(s)}return r}},3017:function(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.innerText=t.textContent=t.getText=t.getInnerHTML=t.getOuterHTML=void 0;var s=i(9425),r=n(i(2721)),o=i(3706);function a(e,t){return(0,r.default)(e,t)}t.getOuterHTML=a,t.getInnerHTML=function(e,t){return(0,s.hasChildren)(e)?e.children.map((function(e){return a(e,t)})).join(""):""},t.getText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,s.isTag)(t)?"br"===t.name?"\n":e(t.children):(0,s.isCDATA)(t)?e(t.children):(0,s.isText)(t)?t.data:""},t.textContent=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,s.hasChildren)(t)&&!(0,s.isComment)(t)?e(t.children):(0,s.isText)(t)?t.data:""},t.innerText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,s.hasChildren)(t)&&(t.type===o.ElementType.Tag||(0,s.isCDATA)(t))?e(t.children):(0,s.isText)(t)?t.data:""}},8563:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prevElementSibling=t.nextElementSibling=t.getName=t.hasAttrib=t.getAttributeValue=t.getSiblings=t.getParent=t.getChildren=void 0;var n=i(9425),s=[];function r(e){var t;return null!==(t=e.children)&&void 0!==t?t:s}function o(e){return e.parent||null}t.getChildren=r,t.getParent=o,t.getSiblings=function(e){var t=o(e);if(null!=t)return r(t);for(var i=[e],n=e.prev,s=e.next;null!=n;)i.unshift(n),n=n.prev;for(;null!=s;)i.push(s),s=s.next;return i},t.getAttributeValue=function(e,t){var i;return null===(i=e.attribs)||void 0===i?void 0:i[t]},t.hasAttrib=function(e,t){return null!=e.attribs&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&null!=e.attribs[t]},t.getName=function(e){return e.name},t.nextElementSibling=function(e){for(var t=e.next;null!==t&&!(0,n.isTag)(t);)t=t.next;return t},t.prevElementSibling=function(e){for(var t=e.prev;null!==t&&!(0,n.isTag)(t);)t=t.prev;return t}},4080:function(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeHTML=t.decodeHTMLStrict=t.decodeXML=void 0;var s=n(i(2810)),r=n(i(2836)),o=n(i(8689)),a=n(i(7826)),l=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;function h(e){var t=d(e);return function(e){return String(e).replace(l,t)}}t.decodeXML=h(o.default),t.decodeHTMLStrict=h(s.default);var c=function(e,t){return e65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+String.fromCharCode(e)};t.default=function(e){return e>=55296&&e<=57343||e>1114111?"�":(e in s.default&&(e=s.default[e]),r(e))}},956:function(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.escapeUTF8=t.escape=t.encodeNonAsciiHTML=t.encodeHTML=t.encodeXML=void 0;var s=c(n(i(8689)).default),r=d(s);t.encodeXML=g(s);var o,a,l=c(n(i(2810)).default),h=d(l);function c(e){return Object.keys(e).sort().reduce((function(t,i){return t[e[i]]="&"+i+";",t}),{})}function d(e){for(var t=[],i=[],n=0,s=Object.keys(e);n1?p(e):e.charCodeAt(0)).toString(16).toUpperCase()+";"}var m=new RegExp(r.source+"|"+u.source,"g");function g(e){return function(t){return t.replace(m,(function(t){return e[t]||f(t)}))}}t.escape=function(e){return e.replace(m,f)},t.escapeUTF8=function(e){return e.replace(r,f)}},2593:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXMLStrict=t.decodeHTML5Strict=t.decodeHTML4Strict=t.decodeHTML5=t.decodeHTML4=t.decodeHTMLStrict=t.decodeHTML=t.decodeXML=t.encodeHTML5=t.encodeHTML4=t.escapeUTF8=t.escape=t.encodeNonAsciiHTML=t.encodeHTML=t.encodeXML=t.encode=t.decodeStrict=t.decode=void 0;var n=i(4080),s=i(956);t.decode=function(e,t){return(!t||t<=0?n.decodeXML:n.decodeHTML)(e)},t.decodeStrict=function(e,t){return(!t||t<=0?n.decodeXML:n.decodeHTMLStrict)(e)},t.encode=function(e,t){return(!t||t<=0?s.encodeXML:s.encodeHTML)(e)};var r=i(956);Object.defineProperty(t,"encodeXML",{enumerable:!0,get:function(){return r.encodeXML}}),Object.defineProperty(t,"encodeHTML",{enumerable:!0,get:function(){return r.encodeHTML}}),Object.defineProperty(t,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return r.encodeNonAsciiHTML}}),Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return r.escape}}),Object.defineProperty(t,"escapeUTF8",{enumerable:!0,get:function(){return r.escapeUTF8}}),Object.defineProperty(t,"encodeHTML4",{enumerable:!0,get:function(){return r.encodeHTML}}),Object.defineProperty(t,"encodeHTML5",{enumerable:!0,get:function(){return r.encodeHTML}});var o=i(4080);Object.defineProperty(t,"decodeXML",{enumerable:!0,get:function(){return o.decodeXML}}),Object.defineProperty(t,"decodeHTML",{enumerable:!0,get:function(){return o.decodeHTML}}),Object.defineProperty(t,"decodeHTMLStrict",{enumerable:!0,get:function(){return o.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML4",{enumerable:!0,get:function(){return o.decodeHTML}}),Object.defineProperty(t,"decodeHTML5",{enumerable:!0,get:function(){return o.decodeHTML}}),Object.defineProperty(t,"decodeHTML4Strict",{enumerable:!0,get:function(){return o.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML5Strict",{enumerable:!0,get:function(){return o.decodeHTMLStrict}}),Object.defineProperty(t,"decodeXMLStrict",{enumerable:!0,get:function(){return o.decodeXML}})},3419:e=>{"use strict";e.exports=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}},995:function(e,t,i){"use strict";var n,s=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&r(t,e,i);return o(t,e),t},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.parseFeed=t.FeedHandler=void 0;var h,c,d=l(i(9425)),u=a(i(5030)),p=i(7361);!function(e){e[e.image=0]="image",e[e.audio=1]="audio",e[e.video=2]="video",e[e.document=3]="document",e[e.executable=4]="executable"}(h||(h={})),function(e){e[e.sample=0]="sample",e[e.full=1]="full",e[e.nonstop=2]="nonstop"}(c||(c={}));var f=function(e){function t(t,i){return"object"==typeof t&&(i=t=void 0),e.call(this,t,i)||this}return s(t,e),t.prototype.onend=function(){var e,t,i=v(y,this.dom);if(i){var n={};if("feed"===i.name){var s=i.children;n.type="atom",_(n,"id","id",s),_(n,"title","title",s);var r=b("href",v("link",s));r&&(n.link=r),_(n,"description","subtitle",s),(o=O("updated",s))&&(n.updated=new Date(o)),_(n,"author","email",s,!0),n.items=g("entry",s).map((function(e){var t={},i=e.children;_(t,"id","id",i),_(t,"title","title",i);var n=b("href",v("link",i));n&&(t.link=n);var s=O("summary",i)||O("content",i);s&&(t.description=s);var r=O("updated",i);return r&&(t.pubDate=new Date(r)),t.media=m(i),t}))}else{var o;s=null!==(t=null===(e=v("channel",i.children))||void 0===e?void 0:e.children)&&void 0!==t?t:[],n.type=i.name.substr(0,3),n.id="",_(n,"title","title",s),_(n,"link","link",s),_(n,"description","description",s),(o=O("lastBuildDate",s))&&(n.updated=new Date(o)),_(n,"author","managingEditor",s,!0),n.items=g("item",i.children).map((function(e){var t={},i=e.children;_(t,"id","guid",i),_(t,"title","title",i),_(t,"link","link",i),_(t,"description","description",i);var n=O("pubDate",i);return n&&(t.pubDate=new Date(n)),t.media=m(i),t}))}this.feed=n,this.handleCallback(null)}else this.handleCallback(new Error("couldn't find root of feed"))},t}(d.default);function m(e){return g("media:content",e).map((function(e){var t={medium:e.attribs.medium,isDefault:!!e.attribs.isDefault};return e.attribs.url&&(t.url=e.attribs.url),e.attribs.fileSize&&(t.fileSize=parseInt(e.attribs.fileSize,10)),e.attribs.type&&(t.type=e.attribs.type),e.attribs.expression&&(t.expression=e.attribs.expression),e.attribs.bitrate&&(t.bitrate=parseInt(e.attribs.bitrate,10)),e.attribs.framerate&&(t.framerate=parseInt(e.attribs.framerate,10)),e.attribs.samplingrate&&(t.samplingrate=parseInt(e.attribs.samplingrate,10)),e.attribs.channels&&(t.channels=parseInt(e.attribs.channels,10)),e.attribs.duration&&(t.duration=parseInt(e.attribs.duration,10)),e.attribs.height&&(t.height=parseInt(e.attribs.height,10)),e.attribs.width&&(t.width=parseInt(e.attribs.width,10)),e.attribs.lang&&(t.lang=e.attribs.lang),t}))}function g(e,t){return u.getElementsByTagName(e,t,!0)}function v(e,t){return u.getElementsByTagName(e,t,!0,1)[0]}function O(e,t,i){return void 0===i&&(i=!1),u.getText(u.getElementsByTagName(e,t,i,1)).trim()}function b(e,t){return t?t.attribs[e]:null}function _(e,t,i,n,s){void 0===s&&(s=!1);var r=O(i,n,s);r&&(e[t]=r)}function y(e){return"rss"===e||"feed"===e||"rdf:RDF"===e}t.FeedHandler=f,t.parseFeed=function(e,t){void 0===t&&(t={xmlMode:!0});var i=new f(t);return new p.Parser(i,t).end(e),i.feed}},7361:function(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var s=n(i(1941)),r=new Set(["input","option","optgroup","select","button","datalist","textarea"]),o=new Set(["p"]),a={tr:new Set(["tr","th","td"]),th:new Set(["th"]),td:new Set(["thead","th","td"]),body:new Set(["head","link","script"]),li:new Set(["li"]),p:o,h1:o,h2:o,h3:o,h4:o,h5:o,h6:o,select:r,input:r,output:r,button:r,datalist:r,textarea:r,option:new Set(["option"]),optgroup:new Set(["optgroup","option"]),dd:new Set(["dt","dd"]),dt:new Set(["dt","dd"]),address:o,article:o,aside:o,blockquote:o,details:o,div:o,dl:o,fieldset:o,figcaption:o,figure:o,footer:o,form:o,header:o,hr:o,main:o,nav:o,ol:o,pre:o,section:o,table:o,ul:o,rt:new Set(["rt","rp"]),rp:new Set(["rt","rp"]),tbody:new Set(["thead","tbody"]),tfoot:new Set(["thead","tbody"])},l=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),h=new Set(["math","svg"]),c=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),d=/\s|\//,u=function(){function e(e,t){var i,n,r,o,a;void 0===t&&(t={}),this.startIndex=0,this.endIndex=null,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.options=t,this.cbs=null!=e?e:{},this.lowerCaseTagNames=null!==(i=t.lowerCaseTags)&&void 0!==i?i:!t.xmlMode,this.lowerCaseAttributeNames=null!==(n=t.lowerCaseAttributeNames)&&void 0!==n?n:!t.xmlMode,this.tokenizer=new(null!==(r=t.Tokenizer)&&void 0!==r?r:s.default)(this.options,this),null===(a=(o=this.cbs).onparserinit)||void 0===a||a.call(o,this)}return e.prototype.updatePosition=function(e){null===this.endIndex?this.tokenizer.sectionStart<=e?this.startIndex=0:this.startIndex=this.tokenizer.sectionStart-e:this.startIndex=this.endIndex+1,this.endIndex=this.tokenizer.getAbsoluteIndex()},e.prototype.ontext=function(e){var t,i;this.updatePosition(1),this.endIndex--,null===(i=(t=this.cbs).ontext)||void 0===i||i.call(t,e)},e.prototype.onopentagname=function(e){var t,i;if(this.lowerCaseTagNames&&(e=e.toLowerCase()),this.tagname=e,!this.options.xmlMode&&Object.prototype.hasOwnProperty.call(a,e))for(var n=void 0;this.stack.length>0&&a[e].has(n=this.stack[this.stack.length-1]);)this.onclosetag(n);!this.options.xmlMode&&l.has(e)||(this.stack.push(e),h.has(e)?this.foreignContext.push(!0):c.has(e)&&this.foreignContext.push(!1)),null===(i=(t=this.cbs).onopentagname)||void 0===i||i.call(t,e),this.cbs.onopentag&&(this.attribs={})},e.prototype.onopentagend=function(){var e,t;this.updatePosition(1),this.attribs&&(null===(t=(e=this.cbs).onopentag)||void 0===t||t.call(e,this.tagname,this.attribs),this.attribs=null),!this.options.xmlMode&&this.cbs.onclosetag&&l.has(this.tagname)&&this.cbs.onclosetag(this.tagname),this.tagname=""},e.prototype.onclosetag=function(e){if(this.updatePosition(1),this.lowerCaseTagNames&&(e=e.toLowerCase()),(h.has(e)||c.has(e))&&this.foreignContext.pop(),!this.stack.length||!this.options.xmlMode&&l.has(e))this.options.xmlMode||"br"!==e&&"p"!==e||(this.onopentagname(e),this.closeCurrentTag());else{var t=this.stack.lastIndexOf(e);if(-1!==t)if(this.cbs.onclosetag)for(t=this.stack.length-t;t--;)this.cbs.onclosetag(this.stack.pop());else this.stack.length=t;else"p"!==e||this.options.xmlMode||(this.onopentagname(e),this.closeCurrentTag())}},e.prototype.onselfclosingtag=function(){this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?this.closeCurrentTag():this.onopentagend()},e.prototype.closeCurrentTag=function(){var e,t,i=this.tagname;this.onopentagend(),this.stack[this.stack.length-1]===i&&(null===(t=(e=this.cbs).onclosetag)||void 0===t||t.call(e,i),this.stack.pop())},e.prototype.onattribname=function(e){this.lowerCaseAttributeNames&&(e=e.toLowerCase()),this.attribname=e},e.prototype.onattribdata=function(e){this.attribvalue+=e},e.prototype.onattribend=function(e){var t,i;null===(i=(t=this.cbs).onattribute)||void 0===i||i.call(t,this.attribname,this.attribvalue,e),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribname="",this.attribvalue=""},e.prototype.getInstructionName=function(e){var t=e.search(d),i=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(i=i.toLowerCase()),i},e.prototype.ondeclaration=function(e){if(this.cbs.onprocessinginstruction){var t=this.getInstructionName(e);this.cbs.onprocessinginstruction("!"+t,"!"+e)}},e.prototype.onprocessinginstruction=function(e){if(this.cbs.onprocessinginstruction){var t=this.getInstructionName(e);this.cbs.onprocessinginstruction("?"+t,"?"+e)}},e.prototype.oncomment=function(e){var t,i,n,s;this.updatePosition(4),null===(i=(t=this.cbs).oncomment)||void 0===i||i.call(t,e),null===(s=(n=this.cbs).oncommentend)||void 0===s||s.call(n)},e.prototype.oncdata=function(e){var t,i,n,s,r,o;this.updatePosition(1),this.options.xmlMode||this.options.recognizeCDATA?(null===(i=(t=this.cbs).oncdatastart)||void 0===i||i.call(t),null===(s=(n=this.cbs).ontext)||void 0===s||s.call(n,e),null===(o=(r=this.cbs).oncdataend)||void 0===o||o.call(r)):this.oncomment("[CDATA["+e+"]]")},e.prototype.onerror=function(e){var t,i;null===(i=(t=this.cbs).onerror)||void 0===i||i.call(t,e)},e.prototype.onend=function(){var e,t;if(this.cbs.onclosetag)for(var i=this.stack.length;i>0;this.cbs.onclosetag(this.stack[--i]));null===(t=(e=this.cbs).onend)||void 0===t||t.call(e)},e.prototype.reset=function(){var e,t,i,n;null===(t=(e=this.cbs).onreset)||void 0===t||t.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack=[],null===(n=(i=this.cbs).onparserinit)||void 0===n||n.call(i,this)},e.prototype.parseComplete=function(e){this.reset(),this.end(e)},e.prototype.write=function(e){this.tokenizer.write(e)},e.prototype.end=function(e){this.tokenizer.end(e)},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){this.tokenizer.resume()},e.prototype.parseChunk=function(e){this.write(e)},e.prototype.done=function(e){this.end(e)},e}();t.Parser=u},1941:function(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(i(7826)),r=n(i(2810)),o=n(i(2836)),a=n(i(8689));function l(e){return" "===e||"\n"===e||"\t"===e||"\f"===e||"\r"===e}function h(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"}function c(e,t,i){var n=e.toLowerCase();return e===n?function(e,s){s===n?e._state=t:(e._state=i,e._index--)}:function(s,r){r===n||r===e?s._state=t:(s._state=i,s._index--)}}function d(e,t){var i=e.toLowerCase();return function(n,s){s===i||s===e?n._state=t:(n._state=3,n._index--)}}var u=c("C",24,16),p=c("D",25,16),f=c("A",26,16),m=c("T",27,16),g=c("A",28,16),v=d("R",35),O=d("I",36),b=d("P",37),_=d("T",38),y=c("R",40,1),w=c("I",41,1),x=c("P",42,1),S=c("T",43,1),k=d("Y",45),T=d("L",46),C=d("E",47),P=c("Y",49,1),M=c("L",50,1),E=c("E",51,1),A=d("I",54),R=d("T",55),D=d("L",56),I=d("E",57),q=c("I",58,1),L=c("T",59,1),N=c("L",60,1),B=c("E",61,1),$=c("#",63,64),Q=c("X",66,65),z=function(){function e(e,t){var i;this._state=1,this.buffer="",this.sectionStart=0,this._index=0,this.bufferOffset=0,this.baseState=1,this.special=1,this.running=!0,this.ended=!1,this.cbs=t,this.xmlMode=!!(null==e?void 0:e.xmlMode),this.decodeEntities=null===(i=null==e?void 0:e.decodeEntities)||void 0===i||i}return e.prototype.reset=function(){this._state=1,this.buffer="",this.sectionStart=0,this._index=0,this.bufferOffset=0,this.baseState=1,this.special=1,this.running=!0,this.ended=!1},e.prototype.write=function(e){this.ended&&this.cbs.onerror(Error(".write() after done!")),this.buffer+=e,this.parse()},e.prototype.end=function(e){this.ended&&this.cbs.onerror(Error(".end() after done!")),e&&this.write(e),this.ended=!0,this.running&&this.finish()},e.prototype.pause=function(){this.running=!1},e.prototype.resume=function(){this.running=!0,this._indexthis.sectionStart&&this.cbs.ontext(this.getSection()),this._state=2,this.sectionStart=this._index):!this.decodeEntities||"&"!==e||1!==this.special&&4!==this.special||(this._index>this.sectionStart&&this.cbs.ontext(this.getSection()),this.baseState=1,this._state=62,this.sectionStart=this._index)},e.prototype.isTagStartChar=function(e){return h(e)||this.xmlMode&&!l(e)&&"/"!==e&&">"!==e},e.prototype.stateBeforeTagName=function(e){"/"===e?this._state=5:"<"===e?(this.cbs.ontext(this.getSection()),this.sectionStart=this._index):">"===e||1!==this.special||l(e)?this._state=1:"!"===e?(this._state=15,this.sectionStart=this._index+1):"?"===e?(this._state=17,this.sectionStart=this._index+1):this.isTagStartChar(e)?(this._state=this.xmlMode||"s"!==e&&"S"!==e?this.xmlMode||"t"!==e&&"T"!==e?3:52:32,this.sectionStart=this._index):this._state=1},e.prototype.stateInTagName=function(e){("/"===e||">"===e||l(e))&&(this.emitToken("onopentagname"),this._state=8,this._index--)},e.prototype.stateBeforeClosingTagName=function(e){l(e)||(">"===e?this._state=1:1!==this.special?4===this.special||"s"!==e&&"S"!==e?4!==this.special||"t"!==e&&"T"!==e?(this._state=1,this._index--):this._state=53:this._state=33:this.isTagStartChar(e)?(this._state=6,this.sectionStart=this._index):(this._state=20,this.sectionStart=this._index))},e.prototype.stateInClosingTagName=function(e){(">"===e||l(e))&&(this.emitToken("onclosetag"),this._state=7,this._index--)},e.prototype.stateAfterClosingTagName=function(e){">"===e&&(this._state=1,this.sectionStart=this._index+1)},e.prototype.stateBeforeAttributeName=function(e){">"===e?(this.cbs.onopentagend(),this._state=1,this.sectionStart=this._index+1):"/"===e?this._state=4:l(e)||(this._state=9,this.sectionStart=this._index)},e.prototype.stateInSelfClosingTag=function(e){">"===e?(this.cbs.onselfclosingtag(),this._state=1,this.sectionStart=this._index+1,this.special=1):l(e)||(this._state=8,this._index--)},e.prototype.stateInAttributeName=function(e){("="===e||"/"===e||">"===e||l(e))&&(this.cbs.onattribname(this.getSection()),this.sectionStart=-1,this._state=10,this._index--)},e.prototype.stateAfterAttributeName=function(e){"="===e?this._state=11:"/"===e||">"===e?(this.cbs.onattribend(void 0),this._state=8,this._index--):l(e)||(this.cbs.onattribend(void 0),this._state=9,this.sectionStart=this._index)},e.prototype.stateBeforeAttributeValue=function(e){'"'===e?(this._state=12,this.sectionStart=this._index+1):"'"===e?(this._state=13,this.sectionStart=this._index+1):l(e)||(this._state=14,this.sectionStart=this._index,this._index--)},e.prototype.handleInAttributeValue=function(e,t){e===t?(this.emitToken("onattribdata"),this.cbs.onattribend(t),this._state=8):this.decodeEntities&&"&"===e&&(this.emitToken("onattribdata"),this.baseState=this._state,this._state=62,this.sectionStart=this._index)},e.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,'"')},e.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,"'")},e.prototype.stateInAttributeValueNoQuotes=function(e){l(e)||">"===e?(this.emitToken("onattribdata"),this.cbs.onattribend(null),this._state=8,this._index--):this.decodeEntities&&"&"===e&&(this.emitToken("onattribdata"),this.baseState=this._state,this._state=62,this.sectionStart=this._index)},e.prototype.stateBeforeDeclaration=function(e){this._state="["===e?23:"-"===e?18:16},e.prototype.stateInDeclaration=function(e){">"===e&&(this.cbs.ondeclaration(this.getSection()),this._state=1,this.sectionStart=this._index+1)},e.prototype.stateInProcessingInstruction=function(e){">"===e&&(this.cbs.onprocessinginstruction(this.getSection()),this._state=1,this.sectionStart=this._index+1)},e.prototype.stateBeforeComment=function(e){"-"===e?(this._state=19,this.sectionStart=this._index+1):this._state=16},e.prototype.stateInComment=function(e){"-"===e&&(this._state=21)},e.prototype.stateInSpecialComment=function(e){">"===e&&(this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index)),this._state=1,this.sectionStart=this._index+1)},e.prototype.stateAfterComment1=function(e){this._state="-"===e?22:19},e.prototype.stateAfterComment2=function(e){">"===e?(this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index-2)),this._state=1,this.sectionStart=this._index+1):"-"!==e&&(this._state=19)},e.prototype.stateBeforeCdata6=function(e){"["===e?(this._state=29,this.sectionStart=this._index+1):(this._state=16,this._index--)},e.prototype.stateInCdata=function(e){"]"===e&&(this._state=30)},e.prototype.stateAfterCdata1=function(e){this._state="]"===e?31:29},e.prototype.stateAfterCdata2=function(e){">"===e?(this.cbs.oncdata(this.buffer.substring(this.sectionStart,this._index-2)),this._state=1,this.sectionStart=this._index+1):"]"!==e&&(this._state=29)},e.prototype.stateBeforeSpecialS=function(e){"c"===e||"C"===e?this._state=34:"t"===e||"T"===e?this._state=44:(this._state=3,this._index--)},e.prototype.stateBeforeSpecialSEnd=function(e){2!==this.special||"c"!==e&&"C"!==e?3!==this.special||"t"!==e&&"T"!==e?this._state=1:this._state=48:this._state=39},e.prototype.stateBeforeSpecialLast=function(e,t){("/"===e||">"===e||l(e))&&(this.special=t),this._state=3,this._index--},e.prototype.stateAfterSpecialLast=function(e,t){">"===e||l(e)?(this.special=1,this._state=6,this.sectionStart=this._index-t,this._index--):this._state=1},e.prototype.parseFixedEntity=function(e){if(void 0===e&&(e=this.xmlMode?a.default:r.default),this.sectionStart+1=2;){var i=this.buffer.substr(e,t);if(Object.prototype.hasOwnProperty.call(o.default,i))return this.emitPartial(o.default[i]),void(this.sectionStart+=t+1);t--}},e.prototype.stateInNamedEntity=function(e){";"===e?(this.parseFixedEntity(),1===this.baseState&&this.sectionStart+1"9")&&!h(e)&&(this.xmlMode||this.sectionStart+1===this._index||(1!==this.baseState?"="!==e&&this.parseFixedEntity(o.default):this.parseLegacyEntity()),this._state=this.baseState,this._index--)},e.prototype.decodeNumericEntity=function(e,t,i){var n=this.sectionStart+e;if(n!==this._index){var r=this.buffer.substring(n,this._index),o=parseInt(r,t);this.emitPartial(s.default(o)),this.sectionStart=i?this._index+1:this._index}this._state=this.baseState},e.prototype.stateInNumericEntity=function(e){";"===e?this.decodeNumericEntity(2,10,!0):(e<"0"||e>"9")&&(this.xmlMode?this._state=this.baseState:this.decodeNumericEntity(2,10,!1),this._index--)},e.prototype.stateInHexEntity=function(e){";"===e?this.decodeNumericEntity(3,16,!0):(e<"a"||e>"f")&&(e<"A"||e>"F")&&(e<"0"||e>"9")&&(this.xmlMode?this._state=this.baseState:this.decodeNumericEntity(3,16,!1),this._index--)},e.prototype.cleanup=function(){this.sectionStart<0?(this.buffer="",this.bufferOffset+=this._index,this._index=0):this.running&&(1===this._state?(this.sectionStart!==this._index&&this.cbs.ontext(this.buffer.substr(this.sectionStart)),this.buffer="",this.bufferOffset+=this._index,this._index=0):this.sectionStart===this._index?(this.buffer="",this.bufferOffset+=this._index,this._index=0):(this.buffer=this.buffer.substr(this.sectionStart),this._index-=this.sectionStart,this.bufferOffset+=this.sectionStart),this.sectionStart=0)},e.prototype.parse=function(){for(;this._index{"use strict";function i(e){return"[object Object]"===Object.prototype.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=function(e){var t,n;return!1!==i(e)&&(void 0===(t=e.constructor)||!1!==i(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}},6145:(e,t,i)=>{var n,s=/[&<>"'`]/g,r=RegExp(s.source),o="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g,a="object"==typeof self&&self&&self.Object===Object&&self,l=o||a||Function("return this")(),h=(n={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},function(e){return null==n?void 0:n[e]}),c=Object.prototype.toString,d=l.Symbol,u=d?d.prototype:void 0,p=u?u.toString:void 0;e.exports=function(e){var t;return(e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==c.call(e)}(e))return p?p.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t))&&r.test(e)?e.replace(s,h):e}},6965:e=>{"use strict";function t(e){return"number"==typeof e||!!/^0x[0-9a-f]+$/i.test(e)||/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}function i(e,t){return"constructor"===t&&"function"==typeof e[t]||"__proto__"===t}e.exports=function(e,n){n||(n={});var s={bools:{},strings:{},unknownFn:null};"function"==typeof n.unknown&&(s.unknownFn=n.unknown),"boolean"==typeof n.boolean&&n.boolean?s.allBools=!0:[].concat(n.boolean).filter(Boolean).forEach((function(e){s.bools[e]=!0}));var r={};function o(e){return r[e].some((function(e){return s.bools[e]}))}Object.keys(n.alias||{}).forEach((function(e){r[e]=[].concat(n.alias[e]),r[e].forEach((function(t){r[t]=[e].concat(r[e].filter((function(e){return t!==e})))}))})),[].concat(n.string).filter(Boolean).forEach((function(e){s.strings[e]=!0,r[e]&&[].concat(r[e]).forEach((function(e){s.strings[e]=!0}))}));var a=n.default||{},l={_:[]};function h(e,t,n){for(var r=e,o=0;o=l)return g;n=i(d),s=[],","===n.slice(-1)?(n=n.replace(u,""),O()):v()}function v(){for(i(h),r="",o="in descriptor";;){if(a=e.charAt(m),"in descriptor"===o)if(t(a))r&&(s.push(r),r="",o="after descriptor");else{if(","===a)return m+=1,r&&s.push(r),void O();if("("===a)r+=a,o="in parens";else{if(""===a)return r&&s.push(r),void O();r+=a}}else if("in parens"===o)if(")"===a)r+=a,o="in descriptor";else{if(""===a)return s.push(r),void O();r+=a}else if("after descriptor"===o)if(t(a));else{if(""===a)return void O();o="in descriptor",m-=1}m+=1}}function O(){var t,i,r,o,a,l,h,c,d,u=!1,m={};for(o=0;o{"use strict";function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function i(e,t){for(var i,n="",s=0,r=-1,o=0,a=0;a<=e.length;++a){if(a2){var l=n.lastIndexOf("/");if(l!==n.length-1){-1===l?(n="",s=0):s=(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),r=a,o=0;continue}}else if(2===n.length||1===n.length){n="",s=0,r=a,o=0;continue}t&&(n.length>0?n+="/..":n="..",s=2)}else n.length>0?n+="/"+e.slice(r+1,a):n=e.slice(r+1,a),s=a-r-1;r=a,o=0}else 46===i&&-1!==o?++o:o=-1}return n}var n={resolve:function(){for(var e,n="",s=!1,r=arguments.length-1;r>=-1&&!s;r--){var o;r>=0?o=arguments[r]:(void 0===e&&(e=process.cwd()),o=e),t(o),0!==o.length&&(n=o+"/"+n,s=47===o.charCodeAt(0))}return n=i(n,!s),s?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(e){if(t(e),0===e.length)return".";var n=47===e.charCodeAt(0),s=47===e.charCodeAt(e.length-1);return 0!==(e=i(e,!n)).length||n||(e="."),e.length>0&&s&&(e+="/"),n?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,i=0;i0&&(void 0===e?e=s:e+="/"+s)}return void 0===e?".":n.normalize(e)},relative:function(e,i){if(t(e),t(i),e===i)return"";if((e=n.resolve(e))===(i=n.resolve(i)))return"";for(var s=1;sh){if(47===i.charCodeAt(a+d))return i.slice(a+d+1);if(0===d)return i.slice(a+d)}else o>h&&(47===e.charCodeAt(s+d)?c=d:0===d&&(c=0));break}var u=e.charCodeAt(s+d);if(u!==i.charCodeAt(a+d))break;47===u&&(c=d)}var p="";for(d=s+c+1;d<=r;++d)d!==r&&47!==e.charCodeAt(d)||(0===p.length?p+="..":p+="/..");return p.length>0?p+i.slice(a+c):(a+=c,47===i.charCodeAt(a)&&++a,i.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var i=e.charCodeAt(0),n=47===i,s=-1,r=!0,o=e.length-1;o>=1;--o)if(47===(i=e.charCodeAt(o))){if(!r){s=o;break}}else r=!1;return-1===s?n?"/":".":n&&1===s?"//":e.slice(0,s)},basename:function(e,i){if(void 0!==i&&"string"!=typeof i)throw new TypeError('"ext" argument must be a string');t(e);var n,s=0,r=-1,o=!0;if(void 0!==i&&i.length>0&&i.length<=e.length){if(i.length===e.length&&i===e)return"";var a=i.length-1,l=-1;for(n=e.length-1;n>=0;--n){var h=e.charCodeAt(n);if(47===h){if(!o){s=n+1;break}}else-1===l&&(o=!1,l=n+1),a>=0&&(h===i.charCodeAt(a)?-1==--a&&(r=n):(a=-1,r=l))}return s===r?r=l:-1===r&&(r=e.length),e.slice(s,r)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!o){s=n+1;break}}else-1===r&&(o=!1,r=n+1);return-1===r?"":e.slice(s,r)},extname:function(e){t(e);for(var i=-1,n=0,s=-1,r=!0,o=0,a=e.length-1;a>=0;--a){var l=e.charCodeAt(a);if(47!==l)-1===s&&(r=!1,s=a+1),46===l?-1===i?i=a:1!==o&&(o=1):-1!==i&&(o=-1);else if(!r){n=a+1;break}}return-1===i||-1===s||0===o||1===o&&i===s-1&&i===n+1?"":e.slice(i,s)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var i=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return i?i===t.root?i+n:i+"/"+n:n}(0,e)},parse:function(e){t(e);var i={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return i;var n,s=e.charCodeAt(0),r=47===s;r?(i.root="/",n=1):n=0;for(var o=-1,a=0,l=-1,h=!0,c=e.length-1,d=0;c>=n;--c)if(47!==(s=e.charCodeAt(c)))-1===l&&(h=!1,l=c+1),46===s?-1===o?o=c:1!==d&&(d=1):-1!==o&&(d=-1);else if(!h){a=c+1;break}return-1===o||-1===l||0===d||1===d&&o===l-1&&o===a+1?-1!==l&&(i.base=i.name=0===a&&r?e.slice(1,l):e.slice(a,l)):(0===a&&r?(i.name=e.slice(1,o),i.base=e.slice(1,l)):(i.name=e.slice(a,o),i.base=e.slice(a,l)),i.ext=e.slice(o,l)),a>0?i.dir=e.slice(0,a-1):r&&(i.dir="/"),i},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,e.exports=n},1435:e=>{var t=String,i=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}};e.exports=i(),e.exports.createColors=i},7983:(e,t,i)=>{"use strict";let n=i(9930);class s extends n{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}e.exports=s,s.default=s,n.registerAtRule(s)},1044:(e,t,i)=>{"use strict";let n=i(322);class s extends n{constructor(e){super(e),this.type="comment"}}e.exports=s,s.default=s},9930:(e,t,i)=>{"use strict";let n,s,r,o,{isClean:a,my:l}=i(2450),h=i(9026),c=i(1044),d=i(322);function u(e){return e.map((e=>(e.nodes&&(e.nodes=u(e.nodes)),delete e.source,e)))}function p(e){if(e[a]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)p(t)}class f extends d{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,i,n=this.getIterator();for(;this.indexes[n]"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...i)=>e[t](...i.map((e=>"function"==typeof e?(t,i)=>e(t.toProxy(),i):e))):"every"===t||"some"===t?i=>e[t](((e,...t)=>i(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,i)=>(e[t]===i||(e[t]=i,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let i,n=this.index(e),s=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let e of s)this.proxyOf.nodes.splice(n+1,0,e);for(let e in this.indexes)i=this.indexes[e],n(e[l]||f.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[a]&&p(e),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e)))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let i in this.indexes)t=this.indexes[i],t>=e&&(this.indexes[i]=t-1);return this.markDirty(),this}replaceValues(e,t,i){return i||(i=t,t={}),this.walkDecls((n=>{t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,i))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,i)=>{let n;try{n=e(t,i)}catch(e){throw t.addToError(e)}return!1!==n&&t.walk&&(n=t.walk(e)),n}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((i,n)=>{if("atrule"===i.type&&e.test(i.name))return t(i,n)})):this.walk(((i,n)=>{if("atrule"===i.type&&i.name===e)return t(i,n)})):(t=e,this.walk(((e,i)=>{if("atrule"===e.type)return t(e,i)})))}walkComments(e){return this.walk(((t,i)=>{if("comment"===t.type)return e(t,i)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((i,n)=>{if("decl"===i.type&&e.test(i.prop))return t(i,n)})):this.walk(((i,n)=>{if("decl"===i.type&&i.prop===e)return t(i,n)})):(t=e,this.walk(((e,i)=>{if("decl"===e.type)return t(e,i)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((i,n)=>{if("rule"===i.type&&e.test(i.selector))return t(i,n)})):this.walk(((i,n)=>{if("rule"===i.type&&i.selector===e)return t(i,n)})):(t=e,this.walk(((e,i)=>{if("rule"===e.type)return t(e,i)})))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}f.registerParse=e=>{n=e},f.registerRule=e=>{s=e},f.registerAtRule=e=>{r=e},f.registerRoot=e=>{o=e},e.exports=f,f.default=f,f.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,r.prototype):"rule"===e.type?Object.setPrototypeOf(e,s.prototype):"decl"===e.type?Object.setPrototypeOf(e,h.prototype):"comment"===e.type?Object.setPrototypeOf(e,c.prototype):"root"===e.type&&Object.setPrototypeOf(e,o.prototype),e[l]=!0,e.nodes&&e.nodes.forEach((e=>{f.rebuild(e)}))}},2604:(e,t,i)=>{"use strict";let n=i(1435),s=i(2940);class r extends Error{constructor(e,t,i,n,s,o){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),n&&(this.source=n),o&&(this.plugin=o),void 0!==t&&void 0!==i&&("number"==typeof t?(this.line=t,this.column=i):(this.line=t.line,this.column=t.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=n.isColorSupported),s&&e&&(t=s(t));let i,r,o=t.split(/\r?\n/),a=Math.max(this.line-3,0),l=Math.min(this.line+2,o.length),h=String(l).length;if(e){let{bold:e,gray:t,red:s}=n.createColors(!0);i=t=>e(s(t)),r=e=>t(e)}else i=r=e=>e;return o.slice(a,l).map(((e,t)=>{let n=a+1+t,s=" "+(" "+n).slice(-h)+" | ";if(n===this.line){let t=r(s.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(s)+e+"\n "+t+i("^")}return" "+r(s)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}e.exports=r,r.default=r},9026:(e,t,i)=>{"use strict";let n=i(322);class s extends n{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}e.exports=s,s.default=s},2900:(e,t,i)=>{"use strict";let n,s,r=i(9930);class o extends r{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new n(new s,this,e).stringify()}}o.registerLazyResult=e=>{n=e},o.registerProcessor=e=>{s=e},e.exports=o,o.default=o},4899:(e,t,i)=>{"use strict";let n=i(9026),s=i(2764),r=i(1044),o=i(7983),a=i(6970),l=i(4539),h=i(4146);function c(e,t){if(Array.isArray(e))return e.map((e=>c(e)));let{inputs:i,...d}=e;if(i){t=[];for(let e of i){let i={...e,__proto__:a.prototype};i.map&&(i.map={...i.map,__proto__:s.prototype}),t.push(i)}}if(d.nodes&&(d.nodes=e.nodes.map((e=>c(e,t)))),d.source){let{inputId:e,...i}=d.source;d.source=i,null!=e&&(d.source.input=t[e])}if("root"===d.type)return new l(d);if("decl"===d.type)return new n(d);if("rule"===d.type)return new h(d);if("comment"===d.type)return new r(d);if("atrule"===d.type)return new o(d);throw new Error("Unknown node type: "+e.type)}e.exports=c,c.default=c},6970:(e,t,i)=>{"use strict";let{SourceMapConsumer:n,SourceMapGenerator:s}=i(9059),{fileURLToPath:r,pathToFileURL:o}=i(415),{isAbsolute:a,resolve:l}=i(2666),{nanoid:h}=i(8845),c=i(2940),d=i(2604),u=i(2764),p=Symbol("fromOffsetCache"),f=Boolean(n&&s),m=Boolean(l&&a);class g{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!m||/^\w+:\/\//.test(t.from)||a(t.from)?this.file=t.from:this.file=l(t.from)),m&&f){let e=new u(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}error(e,t,i,n={}){let s,r,a;if(t&&"object"==typeof t){let e=t,n=i;if("number"==typeof e.offset){let n=this.fromOffset(e.offset);t=n.line,i=n.col}else t=e.line,i=e.column;if("number"==typeof n.offset){let e=this.fromOffset(n.offset);r=e.line,a=e.col}else r=n.line,a=n.column}else if(!i){let e=this.fromOffset(t);t=e.line,i=e.col}let l=this.origin(t,i,r,a);return s=l?new d(e,void 0===l.endLine?l.line:{column:l.column,line:l.line},void 0===l.endLine?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,n.plugin):new d(e,void 0===r?t:{column:i,line:t},void 0===r?i:{column:a,line:r},this.css,this.file,n.plugin),s.input={column:i,endColumn:a,endLine:r,line:t,source:this.css},this.file&&(o&&(s.input.url=o(this.file).toString()),s.input.file=this.file),s}fromOffset(e){let t,i;if(this[p])i=this[p];else{let e=this.css.split("\n");i=new Array(e.length);let t=0;for(let n=0,s=e.length;n=t)n=i.length-1;else{let t,s=i.length-2;for(;n>1),e=i[t+1])){n=t;break}n=t+1}}return{col:e-i[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:l(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,i,n){if(!this.map)return!1;let s,l,h=this.map.consumer(),c=h.originalPositionFor({column:t,line:e});if(!c.source)return!1;"number"==typeof i&&(s=h.originalPositionFor({column:n,line:i})),l=a(c.source)?o(c.source):new URL(c.source,this.map.consumer().sourceRoot||o(this.map.mapFile));let d={column:c.column,endColumn:s&&s.column,endLine:s&&s.line,line:c.line,url:l.toString()};if("file:"===l.protocol){if(!r)throw new Error("file: protocol is not available in this PostCSS build");d.file=r(l)}let u=h.sourceContentFor(c.source);return u&&(d.source=u),d}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}e.exports=g,g.default=g,c&&c.registerInput&&c.registerInput(g)},427:(e,t,i)=>{"use strict";let{isClean:n,my:s}=i(2450),r=i(4342),o=i(9573),a=i(9930),l=i(2900),h=(i(5411),i(165)),c=i(6214),d=i(4539);const u={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},p={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},f={Once:!0,postcssPlugin:!0,prepare:!0},m=0;function g(e){return"object"==typeof e&&"function"==typeof e.then}function v(e){let t=!1,i=u[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[i,i+"-"+t,m,i+"Exit",i+"Exit-"+t]:t?[i,i+"-"+t,i+"Exit",i+"Exit-"+t]:e.append?[i,m,i+"Exit"]:[i,i+"Exit"]}function O(e){let t;return t="document"===e.type?["Document",m,"DocumentExit"]:"root"===e.type?["Root",m,"RootExit"]:v(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function b(e){return e[n]=!1,e.nodes&&e.nodes.forEach((e=>b(e))),e}let _={};class y{constructor(e,t,i){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof y||t instanceof h)n=b(t.root),t.map&&(void 0===i.map&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=t.map);else{let e=c;i.syntax&&(e=i.syntax.parse),i.parser&&(e=i.parser),e.parse&&(e=e.parse);try{n=e(t,i)}catch(e){this.processed=!0,this.error=e}n&&!n[s]&&a.rebuild(n)}else n=b(t);this.result=new h(e,n,i),this.helpers={..._,postcss:_,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let i=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?i.postcssVersion:(e.plugin=i.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,i)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,i])};for(let t of this.plugins)if("object"==typeof t)for(let i in t){if(!p[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!f[i])if("object"==typeof t[i])for(let n in t[i])e(t,"*"===n?i:i+"-"+n.toLowerCase(),t[i][n]);else"function"==typeof t[i]&&e(t,i,t[i])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e0;){let e=this.visitTick(t);if(g(e))try{await e}catch(e){let i=t[t.length-1].node;throw this.handleError(e,i)}}}if(this.listeners.OnceExit)for(let[t,i]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>i(e,this.helpers)));await Promise.all(t)}else await i(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return g(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=o;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new r(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(g(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[n];)e[n]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[i,n]of e){let e;this.result.lastPlugin=i;try{e=n(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(g(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:i,visitors:s}=t;if("root"!==i.type&&"document"!==i.type&&!i.parent)return void e.pop();if(s.length>0&&t.visitorIndex{e[n]||this.walkSync(e)}));else{let t=this.listeners[i];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}y.registerPostcss=e=>{_=e},e.exports=y,y.default=y,d.registerLazyResult(y),l.registerLazyResult(y)},6065:e=>{"use strict";let t={comma:e=>t.split(e,[","],!0),space:e=>t.split(e,[" ","\n","\t"]),split(e,t,i){let n=[],s="",r=!1,o=0,a=!1,l="",h=!1;for(let i of e)h?h=!1:"\\"===i?h=!0:a?i===l&&(a=!1):'"'===i||"'"===i?(a=!0,l=i):"("===i?o+=1:")"===i?o>0&&(o-=1):0===o&&t.includes(i)&&(r=!0),r?(""!==s&&n.push(s.trim()),s="",r=!1):s+=i;return(i||""!==s)&&n.push(s.trim()),n}};e.exports=t,t.default=t},4342:(e,t,i)=>{"use strict";let{SourceMapConsumer:n,SourceMapGenerator:s}=i(9059),{dirname:r,relative:o,resolve:a,sep:l}=i(2666),{pathToFileURL:h}=i(415),c=i(6970),d=Boolean(n&&s),u=Boolean(r&&a&&o&&l);e.exports=class{constructor(e,t,i,n){this.stringify=e,this.mapOpts=i.map||{},this.root=t,this.opts=i,this.css=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,i=this.toUrl(this.path(e.file)),s=e.root||r(e.file);!1===this.mapOpts.sourcesContent?(t=new n(e.text),t.sourcesContent&&(t.sourcesContent=t.sourcesContent.map((()=>null)))):t=e.consumer(),this.map.applySourceMap(t,i,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/(\n)?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&d&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=s.fromSourceMap(e)}else this.map=new s({file:this.outputFile()}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new s({file:this.outputFile()});let e,t,i=1,n=1,r="",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((s,a,l)=>{if(this.css+=s,a&&"end"!==l&&(o.generated.line=i,o.generated.column=n-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=r,o.original.line=1,o.original.column=0,this.map.addMapping(o))),e=s.match(/\n/g),e?(i+=e.length,t=s.lastIndexOf("\n"),n=s.length-t):n+=s.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=i,o.generated.column=n-2,this.map.addMapping(o)):(o.source=r,o.original.line=1,o.original.column=0,o.generated.line=i,o.generated.column=n-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let i=this.opts.to?r(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(i=r(a(i,this.mapOpts.annotation)));let n=o(i,e);return this.memoizedPaths.set(e,n),n}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new c(this.css,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let i=t.source.input.from;if(i&&!e[i]){e[i]=!0;let n=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(n,t.source.input.css)}}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(h){let t=h(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===l&&(e=e.replace(/\\/g,"/"));let i=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,i),i}}},7744:(e,t,i)=>{"use strict";let n=i(4342),s=i(9573),r=(i(5411),i(6214));const o=i(165);class a{constructor(e,t,i){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=i,this._map=void 0;let a=s;this.result=new o(this._processor,r,this._opts),this.result.css=t;let l=this;Object.defineProperty(this.result,"root",{get:()=>l.root});let h=new n(a,r,this._opts,t);if(h.isMap()){let[e,t]=h.generate();e&&(this.result.css=e),t&&(this.result.map=t)}}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=r;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}}e.exports=a,a.default=a},322:(e,t,i)=>{"use strict";let{isClean:n,my:s}=i(2450),r=i(2604),o=i(9906),a=i(9573);function l(e,t){let i=new e.constructor;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if("proxyCache"===n)continue;let s=e[n],r=typeof s;"parent"===n&&"object"===r?t&&(i[n]=t):"source"===n?i[n]=s:Array.isArray(s)?i[n]=s.map((e=>l(e,i))):("object"===r&&null!==s&&(s=l(s)),i[n]=s)}return i}class h{constructor(e={}){this.raws={},this[n]=!1,this[s]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let i of e[t])"function"==typeof i.clone?this.append(i.clone()):this.append(i)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=l(this);for(let i in e)t[i]=e[i];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:i,start:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:i.column,line:i.line},t)}return new r(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,i)=>(e[t]===i||(e[t]=i,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[n]){this[n]=!1;let e=this;for(;e=e.parent;)e[n]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let i=this.source.start;if(e.index)i=this.positionInside(e.index,t);else if(e.word){let n=(t=this.toString()).indexOf(e.word);-1!==n&&(i=this.positionInside(n,t))}return i}positionInside(e,t){let i=t||this.toString(),n=this.source.start.column,s=this.source.start.line;for(let t=0;t"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof n&&n.toJSON)i[e]=n.toJSON(null,t);else if("source"===e){let r=t.get(n.input);null==r&&(r=s,t.set(n.input,s),s++),i[e]={end:n.end,inputId:r,start:n.start}}else i[e]=n}return n&&(i.inputs=[...t.keys()].map((e=>e.toJSON()))),i}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=a){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,i){let n={node:this};for(let e in i)n[e]=i[e];return e.warn(t,n)}get proxyOf(){return this}}e.exports=h,h.default=h},6214:(e,t,i)=>{"use strict";let n=i(9930),s=i(6992),r=i(6970);function o(e,t){let i=new r(e,t),n=new s(i);try{n.parse()}catch(e){throw e}return n.root}e.exports=o,o.default=o,n.registerParse(o)},6992:(e,t,i)=>{"use strict";let n=i(9026),s=i(9985),r=i(1044),o=i(7983),a=i(4539),l=i(4146);const h={empty:!0,space:!0};e.exports=class{constructor(e){this.input=e,this.root=new a,this.current=this.root,this.spaces="",this.semicolon=!1,this.customProperty=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,i,n,s=new o;s.name=e[1].slice(1),""===s.name&&this.unnamedAtrule(s,e),this.init(s,e[2]);let r=!1,a=!1,l=[],h=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?h.push("("===t?")":"]"):"{"===t&&h.length>0?h.push("}"):t===h[h.length-1]&&h.pop(),0===h.length){if(";"===t){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(l.length>0){for(n=l.length-1,i=l[n];i&&"space"===i[0];)i=l[--n];i&&(s.source.end=this.getPosition(i[3]||i[2]),s.source.end.offset++)}this.end(e);break}l.push(e)}else l.push(e);if(this.tokenizer.endOfFile()){r=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(s.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(s,"params",l),r&&(e=l[l.length-1],s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),a&&(s.nodes=[],this.current=s)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let i,n=0;for(let s=t-1;s>=0&&(i=e[s],"space"===i[0]||(n+=1,2!==n));s--);throw this.input.error("Missed semicolon","word"===i[0]?i[3]+1:i[2])}colon(e){let t,i,n,s=0;for(let[r,o]of e.entries()){if(t=o,i=t[0],"("===i&&(s+=1),")"===i&&(s-=1),0===s&&":"===i){if(n){if("word"===n[0]&&"progid"===n[1])continue;return r}this.doubleColon(t)}n=t}return!1}comment(e){let t=new r;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let i=e[1].slice(2,-2);if(/^\s*$/.test(i))t.text="",t.raws.left=i,t.raws.right="";else{let e=i.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=s(this.input)}decl(e,t){let i=new n;this.init(i,e[0][2]);let s,r=e[e.length-1];for(";"===r[0]&&(this.semicolon=!0,e.pop()),i.source.end=this.getPosition(r[3]||r[2]||function(e){for(let t=e.length-1;t>=0;t--){let i=e[t],n=i[3]||i[2];if(n)return n}}(e)),i.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),i.raws.before+=e.shift()[1];for(i.source.start=this.getPosition(e[0][2]),i.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;i.prop+=e.shift()[1]}for(i.raws.between="";e.length;){if(s=e.shift(),":"===s[0]){i.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),i.raws.between+=s[1]}"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let o,a=[];for(;e.length&&(o=e[0][0],"space"===o||"comment"===o);)a.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],"!important"===s[1].toLowerCase()){i.important=!0;let n=this.stringFrom(e,t);n=this.spacesFromEnd(e)+n," !important"!==n&&(i.raws.important=n);break}if("important"===s[1].toLowerCase()){let n=e.slice(0),s="";for(let e=t;e>0;e--){let t=n[e][0];if(0===s.trim().indexOf("!")&&"space"!==t)break;s=n.pop()[1]+s}0===s.trim().indexOf("!")&&(i.important=!0,i.raws.important=s,e=n)}if("space"!==s[0]&&"comment"!==s[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(i.raws.between+=a.map((e=>e[1])).join(""),a=[]),this.raw(i,"value",a.concat(e),t),i.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new l;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,i=null,n=!1,s=null,r=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(i=l[0],a.push(l),"("===i||"["===i)s||(s=l),r.push("("===i?")":"]");else if(o&&n&&"{"===i)s||(s=l),r.push("}");else if(0===r.length){if(";"===i){if(n)return void this.decl(a,o);break}if("{"===i)return void this.rule(a);if("}"===i){this.tokenizer.back(a.pop()),t=!0;break}":"===i&&(n=!0)}else i===r[r.length-1]&&(r.pop(),0===r.length&&(s=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),r.length>0&&this.unclosedBracket(s),t&&n){if(!o)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,i,n){let s,r,o,a,l=i.length,c="",d=!0;for(let e=0;ee+t[1]),"");e.raws[t]={raw:n,value:c}}e[t]=c}rule(e){e.pop();let t=new l;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,i="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)i=e.pop()[1]+i;return i}spacesAndCommentsFromStart(e){let t,i="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)i+=e.shift()[1];return i}spacesFromEnd(e){let t,i="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)i=e.pop()[1]+i;return i}stringFrom(e,t){let i="";for(let n=t;n{"use strict";let n=i(2604),s=i(9026),r=i(427),o=i(9930),a=i(540),l=i(9573),h=i(4899),c=i(2900),d=i(860),u=i(1044),p=i(7983),f=i(165),m=i(6970),g=i(6214),v=i(6065),O=i(4146),b=i(4539),_=i(322);function y(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new a(e)}y.plugin=function(e,t){let i,n=!1;function s(...i){console&&console.warn&&!n&&(n=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),{}.LANG&&{}.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let s=t(...i);return s.postcssPlugin=e,s.postcssVersion=(new a).version,s}return Object.defineProperty(s,"postcss",{get:()=>(i||(i=s()),i)}),s.process=function(e,t,i){return y([s(i)]).process(e,t)},s},y.stringify=l,y.parse=g,y.fromJSON=h,y.list=v,y.comment=e=>new u(e),y.atRule=e=>new p(e),y.decl=e=>new s(e),y.rule=e=>new O(e),y.root=e=>new b(e),y.document=e=>new c(e),y.CssSyntaxError=n,y.Declaration=s,y.Container=o,y.Processor=a,y.Document=c,y.Comment=u,y.Warning=d,y.AtRule=p,y.Result=f,y.Input=m,y.Rule=O,y.Root=b,y.Node=_,r.registerPostcss(y),e.exports=y,y.default=y},2764:(e,t,i)=>{"use strict";let{SourceMapConsumer:n,SourceMapGenerator:s}=i(9059),{existsSync:r,readFileSync:o}=i(1336),{dirname:a,join:l}=i(2666);class h{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let i=t.map?t.map.prev:void 0,n=this.loadMap(t.from,i);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=a(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new n(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let i=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+i)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let i=e.lastIndexOf(t.pop()),n=e.indexOf("*/",i);i>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(i,n)))}loadFile(e){if(this.root=a(e),r(e))return this.mapFile=e,o(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof n)return s.fromSourceMap(t).toString();if(t instanceof s)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let i=t(e);if(i){let e=this.loadFile(i);if(!e)throw new Error("Unable to load previous source map: "+i.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=l(a(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}e.exports=h,h.default=h},540:(e,t,i)=>{"use strict";let n=i(7744),s=i(427),r=i(2900),o=i(4539);class a{constructor(e=[]){this.version="8.4.31",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let i of e)if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"==typeof i&&Array.isArray(i.plugins))t=t.concat(i.plugins);else if("object"==typeof i&&i.postcssPlugin)t.push(i);else if("function"==typeof i)t.push(i);else if("object"!=typeof i||!i.parse&&!i.stringify)throw new Error(i+" is not a PostCSS plugin");return t}process(e,t={}){return 0===this.plugins.length&&void 0===t.parser&&void 0===t.stringifier&&void 0===t.syntax?new n(this,e,t):new s(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}e.exports=a,a.default=a,o.registerProcessor(a),r.registerProcessor(a)},165:(e,t,i)=>{"use strict";let n=i(860);class s{constructor(e,t,i){this.processor=e,this.messages=[],this.root=t,this.opts=i,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let i=new n(e,t);return this.messages.push(i),i}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}}e.exports=s,s.default=s},4539:(e,t,i)=>{"use strict";let n,s,r=i(9930);class o extends r{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,i){let n=super.normalize(e);if(t)if("prepend"===i)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of n)e.raws.before=t.raws.before;return n}removeChild(e,t){let i=this.index(e);return!t&&0===i&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(e)}toResult(e={}){return new n(new s,this,e).stringify()}}o.registerLazyResult=e=>{n=e},o.registerProcessor=e=>{s=e},e.exports=o,o.default=o,r.registerRoot(o)},4146:(e,t,i)=>{"use strict";let n=i(9930),s=i(6065);class r extends n{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return s.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,i=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(i)}}e.exports=r,r.default=r,n.registerRule(r)},9906:e=>{"use strict";const t={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class i{constructor(e){this.builder=e}atrule(e,t){let i="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?i+=e.raws.afterName:n&&(i+=" "),e.nodes)this.block(e,i+n);else{let s=(e.raws.between||"")+(t?";":"");this.builder(i+n+s,e)}}beforeAfter(e,t){let i;i="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let n=e.parent,s=0;for(;n&&"root"!==n.type;)s+=1,n=n.parent;if(i.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e0&&"comment"===e.nodes[t].type;)t-=1;let i=this.raw(e,"semicolon");for(let n=0;n{if(s=e.raws[i],void 0!==s)return!1}))}var a;return void 0===s&&(s=t[n]),o.rawCache[n]=s,s}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let i;return e.walkComments((e=>{if(void 0!==e.raws.before)return i=e.raws.before,i.includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1})),void 0===i?i=this.raw(t,null,"beforeDecl"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeDecl(e,t){let i;return e.walkDecls((e=>{if(void 0!==e.raws.before)return i=e.raws.before,i.includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1})),void 0===i?i=this.raw(t,null,"beforeRule"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((i=>{if(i.nodes&&(i.parent!==e||e.first!==i)&&void 0!==i.raws.before)return t=i.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((i=>{let n=i.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==i.raws.before){let e=i.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let i=e[t],n=e.raws[t];return n&&n.value===i?n.raw:i}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}e.exports=i,i.default=i},9573:(e,t,i)=>{"use strict";let n=i(9906);function s(e,t){new n(t).stringify(e)}e.exports=s,s.default=s},2450:e=>{"use strict";e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")},9985:e=>{"use strict";const t="'".charCodeAt(0),i='"'.charCodeAt(0),n="\\".charCodeAt(0),s="/".charCodeAt(0),r="\n".charCodeAt(0),o=" ".charCodeAt(0),a="\f".charCodeAt(0),l="\t".charCodeAt(0),h="\r".charCodeAt(0),c="[".charCodeAt(0),d="]".charCodeAt(0),u="(".charCodeAt(0),p=")".charCodeAt(0),f="{".charCodeAt(0),m="}".charCodeAt(0),g=";".charCodeAt(0),v="*".charCodeAt(0),O=":".charCodeAt(0),b="@".charCodeAt(0),_=/[\t\n\f\r "#'()/;[\\\]{}]/g,y=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,w=/.[\r\n"'(/\\]/,x=/[\da-f]/i;e.exports=function(e,S={}){let k,T,C,P,M,E,A,R,D,I,q=e.css.valueOf(),L=S.ignoreErrors,N=q.length,B=0,$=[],Q=[];function z(t){throw e.error("Unclosed "+t,B)}return{back:function(e){Q.push(e)},endOfFile:function(){return 0===Q.length&&B>=N},nextToken:function(e){if(Q.length)return Q.pop();if(B>=N)return;let S=!!e&&e.ignoreUnclosed;switch(k=q.charCodeAt(B),k){case r:case o:case l:case h:case a:T=B;do{T+=1,k=q.charCodeAt(T)}while(k===o||k===r||k===l||k===h||k===a);I=["space",q.slice(B,T)],B=T-1;break;case c:case d:case f:case m:case O:case g:case p:{let e=String.fromCharCode(k);I=[e,e,B];break}case u:if(R=$.length?$.pop()[1]:"",D=q.charCodeAt(B+1),"url"===R&&D!==t&&D!==i&&D!==o&&D!==r&&D!==l&&D!==a&&D!==h){T=B;do{if(E=!1,T=q.indexOf(")",T+1),-1===T){if(L||S){T=B;break}z("bracket")}for(A=T;q.charCodeAt(A-1)===n;)A-=1,E=!E}while(E);I=["brackets",q.slice(B,T+1),B,T],B=T}else T=q.indexOf(")",B+1),P=q.slice(B,T+1),-1===T||w.test(P)?I=["(","(",B]:(I=["brackets",P,B,T],B=T);break;case t:case i:C=k===t?"'":'"',T=B;do{if(E=!1,T=q.indexOf(C,T+1),-1===T){if(L||S){T=B+1;break}z("string")}for(A=T;q.charCodeAt(A-1)===n;)A-=1,E=!E}while(E);I=["string",q.slice(B,T+1),B,T],B=T;break;case b:_.lastIndex=B+1,_.test(q),T=0===_.lastIndex?q.length-1:_.lastIndex-2,I=["at-word",q.slice(B,T+1),B,T],B=T;break;case n:for(T=B,M=!0;q.charCodeAt(T+1)===n;)T+=1,M=!M;if(k=q.charCodeAt(T+1),M&&k!==s&&k!==o&&k!==r&&k!==l&&k!==h&&k!==a&&(T+=1,x.test(q.charAt(T)))){for(;x.test(q.charAt(T+1));)T+=1;q.charCodeAt(T+1)===o&&(T+=1)}I=["word",q.slice(B,T+1),B,T],B=T;break;default:k===s&&q.charCodeAt(B+1)===v?(T=q.indexOf("*/",B+2)+1,0===T&&(L||S?T=q.length:z("comment")),I=["comment",q.slice(B,T+1),B,T],B=T):(y.lastIndex=B+1,y.test(q),T=0===y.lastIndex?q.length-1:y.lastIndex-2,I=["word",q.slice(B,T+1),B,T],$.push(I),B=T)}return B++,I},position:function(){return B}}}},5411:e=>{"use strict";let t={};e.exports=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}},860:e=>{"use strict";class t{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}e.exports=t,t.default=t},8878:(e,t)=>{"use strict";var i=Object.prototype.hasOwnProperty;function n(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function s(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var n,r,o=[];for(r in"string"!=typeof t&&(t="?"),e)if(i.call(e,r)){if((n=e[r])||null!=n&&!isNaN(n)||(n=""),r=s(r),n=s(n),null===r||null===n)continue;o.push(r+"="+n)}return o.length?t+o.join("&"):""},t.parse=function(e){for(var t,i=/([^=?#&]+)=?([^&]*)/g,s={};t=i.exec(e);){var r=n(t[1]),o=n(t[2]);null===r||null===o||r in s||(s[r]=o)}return s}},1384:e=>{"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},1622:(e,t,i)=>{const n=i(1659),s=i(3419),{isPlainObject:r}=i(3056),o=i(2454),a=i(9382),{parse:l}=i(5356),h=["img","audio","video","picture","svg","object","map","iframe","embed"],c=["script","style"];function d(e,t){e&&Object.keys(e).forEach((function(i){t(e[i],i)}))}function u(e,t){return{}.hasOwnProperty.call(e,t)}function p(e,t){const i=[];return d(e,(function(e){t(e)&&i.push(e)})),i}e.exports=m;const f=/^[^\0\t\n\f\r /<=>]+$/;function m(e,t,i){if(null==e)return"";let v="",O="";function b(e,t){const i=this;this.tag=e,this.attribs=t||{},this.tagPosition=v.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){M.length&&(M[M.length-1].text+=i.text)},this.updateParentNodeMediaChildren=function(){M.length&&h.includes(this.tag)&&M[M.length-1].mediaChildren.push(this.tag)}}(t=Object.assign({},m.defaults,t)).parser=Object.assign({},g,t.parser),c.forEach((function(e){!1!==t.allowedTags&&(t.allowedTags||[]).indexOf(e)>-1&&!t.allowVulnerableTags&&console.warn(`\n\n⚠️ Your \`allowedTags\` option includes, \`${e}\`, which is inherently\nvulnerable to XSS attacks. Please remove it from \`allowedTags\`.\nOr, to disable this warning, add the \`allowVulnerableTags\` option\nand ensure you are accounting for this risk.\n\n`)}));const _=t.nonTextTags||["script","style","textarea","option"];let y,w;t.allowedAttributes&&(y={},w={},d(t.allowedAttributes,(function(e,t){y[t]=[];const i=[];e.forEach((function(e){"string"==typeof e&&e.indexOf("*")>=0?i.push(s(e).replace(/\\\*/g,".*")):y[t].push(e)})),i.length&&(w[t]=new RegExp("^("+i.join("|")+")$"))})));const x={},S={},k={};d(t.allowedClasses,(function(e,t){y&&(u(y,t)||(y[t]=[]),y[t].push("class")),x[t]=[],k[t]=[];const i=[];e.forEach((function(e){"string"==typeof e&&e.indexOf("*")>=0?i.push(s(e).replace(/\\\*/g,".*")):e instanceof RegExp?k[t].push(e):x[t].push(e)})),i.length&&(S[t]=new RegExp("^("+i.join("|")+")$"))}));const T={};let C,P,M,E,A,R,D;d(t.transformTags,(function(e,t){let i;"function"==typeof e?i=e:"string"==typeof e&&(i=m.simpleTransform(e)),"*"===t?C=i:T[t]=i}));let I=!1;L();const q=new n.Parser({onopentag:function(e,i){if(t.enforceHtmlBoundary&&"html"===e&&L(),R)return void D++;const n=new b(e,i);M.push(n);let s=!1;const h=!!n.text;let c;if(u(T,e)&&(c=T[e](e,i),n.attribs=i=c.attribs,void 0!==c.text&&(n.innerText=c.text),e!==c.tagName&&(n.name=e=c.tagName,A[P]=c.tagName)),C&&(c=C(e,i),n.attribs=i=c.attribs,e!==c.tagName&&(n.name=e=c.tagName,A[P]=c.tagName)),(!1!==t.allowedTags&&-1===(t.allowedTags||[]).indexOf(e)||"recursiveEscape"===t.disallowedTagsMode&&!function(e){for(const t in e)if(u(e,t))return!1;return!0}(E)||null!=t.nestingLimit&&P>=t.nestingLimit)&&(s=!0,E[P]=!0,"discard"===t.disallowedTagsMode&&-1!==_.indexOf(e)&&(R=!0,D=1),E[P]=!0),P++,s){if("discard"===t.disallowedTagsMode)return;O=v,v=""}v+="<"+e,"script"===e&&(t.allowedScriptHostnames||t.allowedScriptDomains)&&(n.innerText=""),(!y||u(y,e)||y["*"])&&d(i,(function(i,s){if(!f.test(s))return void delete n.attribs[s];let h=!1;if(!y||u(y,e)&&-1!==y[e].indexOf(s)||y["*"]&&-1!==y["*"].indexOf(s)||u(w,e)&&w[e].test(s)||w["*"]&&w["*"].test(s))h=!0;else if(y&&y[e])for(const t of y[e])if(r(t)&&t.name&&t.name===s){h=!0;let e="";if(!0===t.multiple){const n=i.split(" ");for(const i of n)-1!==t.values.indexOf(i)&&(""===e?e=i:e+=" "+i)}else t.values.indexOf(i)>=0&&(e=i);i=e}if(h){if(-1!==t.allowedSchemesAppliedToAttributes.indexOf(s)&&B(e,i))return void delete n.attribs[s];if("script"===e&&"src"===s){let e=!0;try{const n=$(i);if(t.allowedScriptHostnames||t.allowedScriptDomains){const i=(t.allowedScriptHostnames||[]).find((function(e){return e===n.url.hostname})),s=(t.allowedScriptDomains||[]).find((function(e){return n.url.hostname===e||n.url.hostname.endsWith(`.${e}`)}));e=i||s}}catch(t){e=!1}if(!e)return void delete n.attribs[s]}if("iframe"===e&&"src"===s){let e=!0;try{const n=$(i);if(n.isRelativeUrl)e=u(t,"allowIframeRelativeUrls")?t.allowIframeRelativeUrls:!t.allowedIframeHostnames&&!t.allowedIframeDomains;else if(t.allowedIframeHostnames||t.allowedIframeDomains){const i=(t.allowedIframeHostnames||[]).find((function(e){return e===n.url.hostname})),s=(t.allowedIframeDomains||[]).find((function(e){return n.url.hostname===e||n.url.hostname.endsWith(`.${e}`)}));e=i||s}}catch(t){e=!1}if(!e)return void delete n.attribs[s]}if("srcset"===s)try{let e=a(i);if(e.forEach((function(e){B("srcset",e.url)&&(e.evil=!0)})),e=p(e,(function(e){return!e.evil})),!e.length)return void delete n.attribs[s];i=p(e,(function(e){return!e.evil})).map((function(e){if(!e.url)throw new Error("URL missing");return e.url+(e.w?` ${e.w}w`:"")+(e.h?` ${e.h}h`:"")+(e.d?` ${e.d}x`:"")})).join(", "),n.attribs[s]=i}catch(e){return void delete n.attribs[s]}if("class"===s){const t=x[e],r=x["*"],a=S[e],l=k[e],h=[a,S["*"]].concat(l).filter((function(e){return e}));if(!(c=i,d=t&&r?o(t,r):t||r,m=h,i=d?(c=c.split(/\s+/)).filter((function(e){return-1!==d.indexOf(e)||m.some((function(t){return t.test(e)}))})).join(" "):c).length)return void delete n.attribs[s]}if("style"===s)try{if(i=function(e){return e.nodes[0].nodes.reduce((function(e,t){return e.push(`${t.prop}:${t.value}${t.important?" !important":""}`),e}),[]).join(";")}(function(e,t){if(!t)return e;const i=e.nodes[0];let n;return n=t[i.selector]&&t["*"]?o(t[i.selector],t["*"]):t[i.selector]||t["*"],n&&(e.nodes[0].nodes=i.nodes.reduce(function(e){return function(t,i){return u(e,i.prop)&&e[i.prop].some((function(e){return e.test(i.value)}))&&t.push(i),t}}(n),[])),e}(l(e+" {"+i+"}"),t.allowedStyles)),0===i.length)return void delete n.attribs[s]}catch(e){return void delete n.attribs[s]}v+=" "+s,i&&i.length&&(v+='="'+N(i,!0)+'"')}else delete n.attribs[s];var c,d,m})),-1!==t.selfClosing.indexOf(e)?v+=" />":(v+=">",!n.innerText||h||t.textFilter||(v+=N(n.innerText),I=!0)),s&&(v=O+N(v),O="")},ontext:function(e){if(R)return;const i=M[M.length-1];let n;if(i&&(n=i.tag,e=void 0!==i.innerText?i.innerText:e),"discard"!==t.disallowedTagsMode||"script"!==n&&"style"!==n){const i=N(e,!1);t.textFilter&&!I?v+=t.textFilter(i,n):I||(v+=i)}else v+=e;M.length&&(M[M.length-1].text+=e)},onclosetag:function(e){if(R){if(D--,D)return;R=!1}const i=M.pop();if(!i)return;if(i.tag!==e)return void M.push(i);R=!!t.enforceHtmlBoundary&&"html"===e,P--;const n=E[P];if(n){if(delete E[P],"discard"===t.disallowedTagsMode)return void i.updateParentNodeText();O=v,v=""}A[P]&&(e=A[P],delete A[P]),t.exclusiveFilter&&t.exclusiveFilter(i)?v=v.substr(0,i.tagPosition):(i.updateParentNodeMediaChildren(),i.updateParentNodeText(),-1===t.selfClosing.indexOf(e)?(v+="",n&&(v=O+N(v),O=""),I=!1):n&&(v=O,O=""))}},t.parser);return q.write(e),q.end(),v;function L(){v="",P=0,M=[],E={},A={},R=!1,D=0}function N(e,i){return"string"!=typeof e&&(e+=""),t.parser.decodeEntities&&(e=e.replace(/&/g,"&").replace(//g,">"),i&&(e=e.replace(/"/g,"""))),e=e.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(//g,">"),i&&(e=e.replace(/"/g,""")),e}function B(e,i){for(i=i.replace(/[\x00-\x20]+/g,"");;){const e=i.indexOf("\x3c!--");if(-1===e)break;const t=i.indexOf("--\x3e",e+4);if(-1===t)break;i=i.substring(0,e)+i.substring(t+3)}const n=i.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!n)return!!i.match(/^[/\\]{2}/)&&!t.allowProtocolRelative;const s=n[1].toLowerCase();return u(t.allowedSchemesByTag,e)?-1===t.allowedSchemesByTag[e].indexOf(s):!t.allowedSchemes||-1===t.allowedSchemes.indexOf(s)}function $(e){if((e=e.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//")).startsWith("relative:"))throw new Error("relative: exploit attempt");let t="relative://relative-site";for(let e=0;e<100;e++)t+=`/${e}`;const i=new URL(e,t);return{isRelativeUrl:i&&"relative-site"===i.hostname&&"relative:"===i.protocol,url:i}}}const g={decodeEntities:!0};m.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1},m.simpleTransform=function(e,t,i){return i=void 0===i||i,t=t||{},function(n,s){let r;if(i)for(r in t)s[r]=t[r];else s=t;return{tagName:e,attribs:s}}}},2296:(e,t,i)=>{"use strict";var n=i(1384),s=i(8878),r=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,o=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,l=/:\d+$/,h=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,c=/^[a-zA-Z]:/;function d(e){return(e||"").toString().replace(r,"")}var u=[["#","hash"],["?","query"],function(e,t){return m(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],p={hash:1,query:1};function f(e){var t,n=("undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:{}).location||{},s={},r=typeof(e=e||n);if("blob:"===e.protocol)s=new v(unescape(e.pathname),{});else if("string"===r)for(t in s=new v(e,{}),p)delete s[t];else if("object"===r){for(t in e)t in p||(s[t]=e[t]);void 0===s.slashes&&(s.slashes=a.test(e.href))}return s}function m(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function g(e,t){e=(e=d(e)).replace(o,""),t=t||{};var i,n=h.exec(e),s=n[1]?n[1].toLowerCase():"",r=!!n[2],a=!!n[3],l=0;return r?a?(i=n[2]+n[3]+n[4],l=n[2].length+n[3].length):(i=n[2]+n[4],l=n[2].length):a?(i=n[3]+n[4],l=n[3].length):i=n[4],"file:"===s?l>=2&&(i=i.slice(2)):m(s)?i=n[4]:s?r&&(i=i.slice(2)):l>=2&&m(t.protocol)&&(i=n[4]),{protocol:s,slashes:r||m(s),slashesCount:l,rest:i}}function v(e,t,i){if(e=(e=d(e)).replace(o,""),!(this instanceof v))return new v(e,t,i);var r,a,l,h,p,O,b=u.slice(),_=typeof t,y=this,w=0;for("object"!==_&&"string"!==_&&(i=t,t=null),i&&"function"!=typeof i&&(i=s.parse),r=!(a=g(e||"",t=f(t))).protocol&&!a.slashes,y.slashes=a.slashes||r&&t.slashes,y.protocol=a.protocol||t.protocol||"",e=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||c.test(e))||!a.slashes&&(a.protocol||a.slashesCount<2||!m(y.protocol)))&&(b[3]=[/(.*)/,"pathname"]);w{},1336:()=>{},2666:()=>{},9059:()=>{},415:()=>{},8845:e=>{e.exports={nanoid:(e=21)=>{let t="",i=e;for(;i--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(i=t)=>{let n="",s=i;for(;s--;)n+=e[Math.random()*e.length|0];return n}}},6399:e=>{"use strict";e.exports=JSON.parse('{"0":65533,"128":8364,"130":8218,"131":402,"132":8222,"133":8230,"134":8224,"135":8225,"136":710,"137":8240,"138":352,"139":8249,"140":338,"142":381,"145":8216,"146":8217,"147":8220,"148":8221,"149":8226,"150":8211,"151":8212,"152":732,"153":8482,"154":353,"155":8250,"156":339,"158":382,"159":376}')},2810:e=>{"use strict";e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"⁡","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"\'","ApplyFunction":"⁡","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"⁣","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"⁣","InvisibleTimes":"⁢","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"⁢","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"‎","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"​","NegativeThickSpace":"​","NegativeThinSpace":"​","NegativeVeryThinSpace":"​","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"⁠","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"‏","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"­","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":"  ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"​","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"‍","zwnj":"‌"}')},2836:e=>{"use strict";e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Acirc":"Â","acirc":"â","acute":"´","AElig":"Æ","aelig":"æ","Agrave":"À","agrave":"à","amp":"&","AMP":"&","Aring":"Å","aring":"å","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","brvbar":"¦","Ccedil":"Ç","ccedil":"ç","cedil":"¸","cent":"¢","copy":"©","COPY":"©","curren":"¤","deg":"°","divide":"÷","Eacute":"É","eacute":"é","Ecirc":"Ê","ecirc":"ê","Egrave":"È","egrave":"è","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","frac12":"½","frac14":"¼","frac34":"¾","gt":">","GT":">","Iacute":"Í","iacute":"í","Icirc":"Î","icirc":"î","iexcl":"¡","Igrave":"Ì","igrave":"ì","iquest":"¿","Iuml":"Ï","iuml":"ï","laquo":"«","lt":"<","LT":"<","macr":"¯","micro":"µ","middot":"·","nbsp":" ","not":"¬","Ntilde":"Ñ","ntilde":"ñ","Oacute":"Ó","oacute":"ó","Ocirc":"Ô","ocirc":"ô","Ograve":"Ò","ograve":"ò","ordf":"ª","ordm":"º","Oslash":"Ø","oslash":"ø","Otilde":"Õ","otilde":"õ","Ouml":"Ö","ouml":"ö","para":"¶","plusmn":"±","pound":"£","quot":"\\"","QUOT":"\\"","raquo":"»","reg":"®","REG":"®","sect":"§","shy":"­","sup1":"¹","sup2":"²","sup3":"³","szlig":"ß","THORN":"Þ","thorn":"þ","times":"×","Uacute":"Ú","uacute":"ú","Ucirc":"Û","ucirc":"û","Ugrave":"Ù","ugrave":"ù","uml":"¨","Uuml":"Ü","uuml":"ü","Yacute":"Ý","yacute":"ý","yen":"¥","yuml":"ÿ"}')},8689:e=>{"use strict";e.exports=JSON.parse('{"amp":"&","apos":"\'","gt":">","lt":"<","quot":"\\""}')}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var i=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(i.exports,i,i.exports,__webpack_require__),i.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var i in t)__webpack_require__.o(t,i)&&!__webpack_require__.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};(()=>{"use strict";class e{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){let s=[];return this.decompose(0,e,s,2),n.length&&n.decompose(0,n.length,s,3),this.decompose(t,this.length,s,1),i.from(s,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){let n=[];return this.decompose(e,t,n,0),i.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),n=new r(this),s=new r(e);for(let e=t,r=t;;){if(n.next(e),s.next(e),e=0,n.lineBreak!=s.lineBreak||n.done!=s.done||n.value!=s.value)return!1;if(r+=n.value.length,n.done||r>=i)return!0}}iter(e=1){return new r(this,e)}iterRange(e,t=this.length){return new o(this,e,t)}iterLines(e,t){let i;if(null==e)i=this.iter();else{null==t&&(t=this.lines+1);let n=this.line(e).from;i=this.iterRange(n,Math.max(n,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new a(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(n){if(0==n.length)throw new RangeError("A document must have at least one line");return 1!=n.length||n[0]?n.length<=32?new t(n):i.from(t.split(n,[])):e.empty}}class t extends e{constructor(e,t=function(e){let t=-1;for(let i of e)t+=i.length+1;return t}(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,n){for(let s=0;;s++){let r=this.text[s],o=n+r.length;if((t?i:o)>=e)return new l(n,o,i,r);n=o+1,i++}}decompose(e,i,r,o){let a=e<=0&&i>=this.length?this:new t(s(this.text,e,i),Math.min(i,this.length)-Math.max(0,e));if(1&o){let e=r.pop(),i=n(a.text,e.text.slice(),0,a.length);if(i.length<=32)r.push(new t(i,e.length+a.length));else{let e=i.length>>1;r.push(new t(i.slice(0,e)),new t(i.slice(e)))}}else r.push(a)}replace(e,r,o){if(!(o instanceof t))return super.replace(e,r,o);let a=n(this.text,n(o.text,s(this.text,0,e)),r),l=this.length+o.length-(r-e);return a.length<=32?new t(a,l):i.from(t.split(a,[]),l)}sliceString(e,t=this.length,i="\n"){let n="";for(let s=0,r=0;s<=t&&re&&r&&(n+=i),es&&(n+=o.slice(Math.max(0,e-s),t-s)),s=a+1}return n}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,i){let n=[],s=-1;for(let r of e)n.push(r),s+=r.length+1,32==n.length&&(i.push(new t(n,s)),n=[],s=-1);return s>-1&&i.push(new t(n,s)),i}}class i extends e{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,i,n){for(let s=0;;s++){let r=this.children[s],o=n+r.length,a=i+r.lines-1;if((t?a:o)>=e)return r.lineInner(e,t,i,n);n=o+1,i=a+1}}decompose(e,t,i,n){for(let s=0,r=0;r<=t&&s=r){let s=n&((r<=e?1:0)|(a>=t?2:0));r>=e&&a<=t&&!s?i.push(o):o.decompose(e-r,t-r,i,s)}r=a+1}}replace(e,t,n){if(n.lines=r&&t<=a){let l=o.replace(e-r,t-r,n),h=this.lines-o.lines+l.lines;if(l.lines>4&&l.lines>h>>6){let r=this.children.slice();return r[s]=l,new i(r,this.length-(t-e)+n.length)}return super.replace(r,a,l)}r=a+1}return super.replace(e,t,n)}sliceString(e,t=this.length,i="\n"){let n="";for(let s=0,r=0;se&&s&&(n+=i),er&&(n+=o.sliceString(e-r,t-r,i)),r=a+1}return n}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof i))return 0;let n=0,[s,r,o,a]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,r+=t){if(s==o||r==a)return n;let i=this.children[s],l=e.children[r];if(i!=l)return n+i.scanIdentical(l,t);n+=i.length+1}}static from(e,n=e.reduce(((e,t)=>e+t.length+1),-1)){let s=0;for(let t of e)s+=t.lines;if(s<32){let i=[];for(let t of e)t.flatten(i);return new t(i,n)}let r=Math.max(32,s>>5),o=r<<1,a=r>>1,l=[],h=0,c=-1,d=[];function u(e){let n;if(e.lines>o&&e instanceof i)for(let t of e.children)u(t);else e.lines>a&&(h>a||!h)?(p(),l.push(e)):e instanceof t&&h&&(n=d[d.length-1])instanceof t&&e.lines+n.lines<=32?(h+=e.lines,c+=e.length+1,d[d.length-1]=new t(n.text.concat(e.text),n.length+1+e.length)):(h+e.lines>r&&p(),h+=e.lines,c+=e.length+1,d.push(e))}function p(){0!=h&&(l.push(1==d.length?d[0]:i.from(d,c)),c=-1,h=d.length=0)}for(let t of e)u(t);return p(),1==l.length?l[0]:new i(l,n)}}function n(e,t,i=0,n=1e9){for(let s=0,r=0,o=!0;r=i&&(l>n&&(a=a.slice(0,n-s)),s0?1:(e instanceof t?e.text.length:e.children.length)<<1]}nextInner(e,i){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,s=this.nodes[n],r=this.offsets[n],o=r>>1,a=s instanceof t?s.text.length:s.children.length;if(o==(i>0?a:0)){if(0==n)return this.done=!0,this.value="",this;i>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&r)==(i>0?0:1)){if(this.offsets[n]+=i,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(s instanceof t){let t=s.text[o+(i<0?-1:0)];if(this.offsets[n]+=i,t.length>Math.max(0,e))return this.value=0==e?t:i>0?t.slice(e):t.slice(0,t.length-e),this;e-=t.length}else{let r=s.children[o+(i<0?-1:0)];e>r.length?(e-=r.length,this.offsets[n]+=i):(i<0&&this.offsets[n]--,this.nodes.push(r),this.offsets.push(i>0?1:(r instanceof t?r.text.length:r.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class o{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new r(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:n}=this.cursor.next(e);return this.pos+=(n.length+e)*t,this.value=n.length<=i?n:t<0?n.slice(n.length-i):n.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class a{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:n}=this.inner.next(e);return t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=n,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(e.prototype[Symbol.iterator]=function(){return this.iter()},r.prototype[Symbol.iterator]=o.prototype[Symbol.iterator]=a.prototype[Symbol.iterator]=function(){return this});class l{constructor(e,t,i,n){this.from=e,this.to=t,this.number=i,this.text=n}get length(){return this.to-this.from}}let h="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((e=>e?parseInt(e,36):1));for(let e=1;ee)return h[t-1]<=e;return!1}function d(e){return e>=127462&&e<=127487}const u=8205;function p(e,t,i=!0,n=!0){return(i?f:m)(e,t,n)}function f(e,t,i){if(t==e.length)return t;t&&g(e.charCodeAt(t))&&v(e.charCodeAt(t-1))&&t--;let n=O(e,t);for(t+=_(n);t=0&&d(O(e,n));)i++,n-=2;if(i%2==0)break;t+=2}}}return t}function m(e,t,i){for(;t>0;){let n=f(e,t-2,i);if(n=56320&&e<57344}function v(e){return e>=55296&&e<56320}function O(e,t){let i=e.charCodeAt(t);if(!v(i)||t+1==e.length)return i;let n=e.charCodeAt(t+1);return g(n)?n-56320+(i-55296<<10)+65536:i}function b(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function _(e){return e<65536?1:2}const y=/\r\n?|\n/;var w=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(w||(w={}));class x{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return s+(e-n);s+=o}else{if(i!=w.Simple&&l>=e&&(i==w.TrackDel&&ne||i==w.TrackBefore&&ne))return null;if(l>e||l==e&&t<0&&!o)return e==n||t<0?s:s+a;s+=a}n=l}if(e>n)throw new RangeError(`Position ${e} is out of range for changeset of length ${n}`);return s}touchesRange(e,t=e){for(let i=0,n=0;i=0&&n<=t&&s>=e)return!(nt)||"cover";n=s}return!1}toString(){let e="";for(let t=0;t=0?":"+n:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some((e=>"number"!=typeof e)))throw new RangeError("Invalid JSON representation of ChangeDesc");return new x(e)}static create(e){return new x(e)}}class S extends x{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return C(this,((t,i,n,s,r)=>e=e.replace(n,n+(i-t),r)),!1),e}mapDesc(e,t=!1){return P(this,e,t,!0)}invert(t){let i=this.sections.slice(),n=[];for(let s=0,r=0;s=0){i[s]=a,i[s+1]=o;let l=s>>1;for(;n.length0&&T(i,t,s.text),s.forward(e),o+=e}let l=e[r++];for(;o>1].toJSON()))}return e}static of(t,i,n){let s=[],r=[],o=0,a=null;function l(e=!1){if(!e&&!s.length)return;oa||t<0||a>i)throw new RangeError(`Invalid change range ${t} to ${a} (in doc of length ${i})`);let d=c?"string"==typeof c?e.of(c.split(n||y)):c:e.empty,u=d.length;if(t==a&&0==u)return;to&&k(s,t-o,-1),k(s,a-t,u),T(r,s,d),o=a}}(t),l(!a),a}static empty(e){return new S(e?[e,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let i=[],n=[];for(let s=0;st&&"string"!=typeof e)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==r.length)i.push(r[0],0);else{for(;n.length=0&&i<=0&&i==e[s+1]?e[s]+=t:0==t&&0==e[s]?e[s+1]+=i:n?(e[s]+=t,e[s+1]+=i):e.push(t,i)}function T(t,i,n){if(0==n.length)return;let s=i.length-2>>1;if(s>1])),!(n||a==t.sections.length||t.sections[a+1]<0);)l=t.sections[a++],h=t.sections[a++];i(r,c,o,d,u),r=c,o=d}}}function P(e,t,i,n=!1){let s=[],r=n?[]:null,o=new E(e),a=new E(t);for(let e=-1;;)if(-1==o.ins&&-1==a.ins){let e=Math.min(o.len,a.len);k(s,e,-1),o.forward(e),a.forward(e)}else if(a.ins>=0&&(o.ins<0||e==o.i||0==o.off&&(a.len=0&&e=0)){if(o.done&&a.done)return r?S.createSet(s,r):x.create(s);throw new Error("Mismatched change set lengths")}{let t=0,i=o.len;for(;i;)if(-1==a.ins){let e=Math.min(i,a.len);t+=e,i-=e,a.forward(e)}else{if(!(0==a.ins&&a.lent||o.ins>=0&&o.len>t)&&(e||n.length>i),r.forward2(t),o.forward(t)}}else k(n,0,o.ins,e),s&&T(s,n,o.text),o.next()}}class E{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return i>=t.length?e.empty:t[i]}textBit(t){let{inserted:i}=this.set,n=this.i-2>>1;return n>=i.length&&!t?e.empty:i[n].slice(this.off,null==t?void 0:this.off+t)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){-1==this.ins?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class A{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let e=7&this.flags;return 7==e?null:e}get goalColumn(){let e=this.flags>>6;return 16777215==e?void 0:e}map(e,t=-1){let i,n;return this.empty?i=n=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),n=e.mapPos(this.to,-1)),i==this.from&&n==this.to?this:new A(i,n,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return R.range(e,t);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return R.range(this.anchor,i)}eq(e){return this.anchor==e.anchor&&this.head==e.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||"number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid JSON representation for SelectionRange");return R.range(e.anchor,e.head)}static create(e,t,i){return new A(e,t,i)}}class R{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:R.create(this.ranges.map((i=>i.map(e,t))),this.mainIndex)}eq(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let t=0;te.toJSON())),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||"number"!=typeof e.main||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new R(e.ranges.map((e=>A.fromJSON(e))),e.main)}static single(e,t=e){return new R([R.range(e,t)],0)}static create(e,t=0){if(0==e.length)throw new RangeError("A selection needs at least one range");for(let i=0,n=0;ne?8:0)|s)}static normalized(e,t=0){let i=e[t];e.sort(((e,t)=>e.from-t.from)),t=e.indexOf(i);for(let i=1;in.head?R.range(o,r):R.range(r,o))}}return new R(e,t)}}function D(e,t){for(let i of e.ranges)if(i.to>t)throw new RangeError("Selection points outside of document")}let I=0;class q{constructor(e,t,i,n,s){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=n,this.id=I++,this.default=e([]),this.extensions="function"==typeof s?s(this):s}get reader(){return this}static define(e={}){return new q(e.combine||(e=>e),e.compareInput||((e,t)=>e===t),e.compare||(e.combine?(e,t)=>e===t:L),!!e.static,e.enables)}of(e){return new N([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new N(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new N(e,this,2,t)}from(e,t){return t||(t=e=>e),this.compute([e],(i=>t(i.field(e))))}}function L(e,t){return e==t||e.length==t.length&&e.every(((e,i)=>e===t[i]))}class N{constructor(e,t,i,n){this.dependencies=e,this.facet=t,this.type=i,this.value=n,this.id=I++}dynamicSlot(e){var t;let i=this.value,n=this.facet.compareInput,s=this.id,r=e[s]>>1,o=2==this.type,a=!1,l=!1,h=[];for(let i of this.dependencies)"doc"==i?a=!0:"selection"==i?l=!0:0==(1&(null!==(t=e[i.id])&&void 0!==t?t:1))&&h.push(e[i.id]);return{create:e=>(e.values[r]=i(e),1),update(e,t){if(a&&t.docChanged||l&&(t.docChanged||t.selection)||$(e,h)){let t=i(e);if(o?!B(t,e.values[r],n):!n(t,e.values[r]))return e.values[r]=t,1}return 0},reconfigure:(e,t)=>{let a,l=t.config.address[s];if(null!=l){let s=G(t,l);if(this.dependencies.every((i=>i instanceof q?t.facet(i)===e.facet(i):!(i instanceof j)||t.field(i,!1)==e.field(i,!1)))||(o?B(a=i(e),s,n):n(a=i(e),s)))return e.values[r]=s,0}else a=i(e);return e.values[r]=a,1}}}}function B(e,t,i){if(e.length!=t.length)return!1;for(let n=0;ne[t.id])),s=i.map((e=>e.type)),r=n.filter((e=>!(1&e))),o=e[t.id]>>1;function a(e){let i=[];for(let t=0;te===t),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(z).find((e=>e.field==this));return((null==t?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,i)=>{let n=e.values[t],s=this.updateF(n,i);return this.compareF(n,s)?0:(e.values[t]=s,1)},reconfigure:(e,i)=>null!=i.config.address[this.id]?(e.values[t]=i.field(this),0):(e.values[t]=this.create(e),1)}}init(e){return[this,z.of({field:this,create:e})]}get extension(){return this}}function W(e){return t=>new U(t,e)}const V={highest:W(0),high:W(1),default:W(2),low:W(3),lowest:W(4)};class U{constructor(e,t){this.inner=e,this.prec=t}}class F{of(e){return new H(this,e)}reconfigure(e){return F.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class H{constructor(e,t){this.compartment=e,this.inner=t}}class X{constructor(e,t,i,n,s,r){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=n,this.staticValues=s,this.facets=r,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,i){let n=[],s=Object.create(null),r=new Map;for(let i of function(e,t,i){let n=[[],[],[],[],[]],s=new Map;return function e(r,o){let a=s.get(r);if(null!=a){if(a<=o)return;let e=n[a].indexOf(r);e>-1&&n[a].splice(e,1),r instanceof H&&i.delete(r.compartment)}if(s.set(r,o),Array.isArray(r))for(let t of r)e(t,o);else if(r instanceof H){if(i.has(r.compartment))throw new RangeError("Duplicate use of compartment in extensions");let n=t.get(r.compartment)||r.inner;i.set(r.compartment,n),e(n,o)}else if(r instanceof U)e(r.inner,r.prec);else if(r instanceof j)n[o].push(r),r.provides&&e(r.provides,o);else if(r instanceof N)n[o].push(r),r.facet.extensions&&e(r.facet.extensions,2);else{let t=r.extension;if(!t)throw new Error(`Unrecognized extension value in extension set (${r}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);e(t,o)}}(e,2),n.reduce(((e,t)=>e.concat(t)))}(e,t,r))i instanceof j?n.push(i):(s[i.facet.id]||(s[i.facet.id]=[])).push(i);let o=Object.create(null),a=[],l=[];for(let e of n)o[e.id]=l.length<<1,l.push((t=>e.slot(t)));let h=null==i?void 0:i.config.facets;for(let e in s){let t=s[e],n=t[0].facet,r=h&&h[e]||[];if(t.every((e=>0==e.type)))if(o[n.id]=a.length<<1|1,L(r,t))a.push(i.facet(n));else{let e=n.combine(t.map((e=>e.value)));a.push(i&&n.compare(e,i.facet(n))?i.facet(n):e)}else{for(let e of t)0==e.type?(o[e.id]=a.length<<1|1,a.push(e.value)):(o[e.id]=l.length<<1,l.push((t=>e.dynamicSlot(t))));o[n.id]=l.length<<1,l.push((e=>Q(e,n,t)))}}let c=l.map((e=>e(o)));return new X(e,r,c,o,a,s)}}function Y(e,t){if(1&t)return 2;let i=t>>1,n=e.status[i];if(4==n)throw new Error("Cyclic dependency between fields and/or facets");if(2&n)return n;e.status[i]=4;let s=e.computeSlot(e,e.config.dynamicSlots[i]);return e.status[i]=2|s}function G(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}const Z=q.define(),K=q.define({combine:e=>e.some((e=>e)),static:!0}),J=q.define({combine:e=>e.length?e[0]:void 0,static:!0}),ee=q.define(),te=q.define(),ie=q.define(),ne=q.define({combine:e=>!!e.length&&e[0]});class se{constructor(e,t){this.type=e,this.value=t}static define(){return new re}}class re{of(e){return new se(this,e)}}class oe{constructor(e){this.map=e}of(e){return new ae(this,e)}}class ae{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return void 0===t?void 0:t==this.value?this:new ae(this.type,t)}is(e){return this.type==e}static define(e={}){return new oe(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let n of e){let e=n.map(t);e&&i.push(e)}return i}}ae.reconfigure=ae.define(),ae.appendConfig=ae.define();class le{constructor(e,t,i,n,s,r){this.startState=e,this.changes=t,this.selection=i,this.effects=n,this.annotations=s,this.scrollIntoView=r,this._doc=null,this._state=null,i&&D(i,t.newLength),s.some((e=>e.type==le.time))||(this.annotations=s.concat(le.time.of(Date.now())))}static create(e,t,i,n,s,r){return new le(e,t,i,n,s,r)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(le.userEvent);return!(!t||!(t==e||t.length>e.length&&t.slice(0,e.length)==e&&"."==t[e.length]))}}function he(e,t){let i=[];for(let n=0,s=0;;){let r,o;if(n=e[n]))r=e[n++],o=e[n++];else{if(!(s=0;s--){let r=i[s](e);r&&Object.keys(r).length&&(n=ce(n,de(t,r,e.changes.newLength),!0))}return n==e?e:le.create(t,e.changes,e.selection,n.effects,n.annotations,n.scrollIntoView)}(i?function(e){let t=e.startState,i=!0;for(let n of t.facet(ee)){let t=n(e);if(!1===t){i=!1;break}Array.isArray(t)&&(i=!0===i?t:he(i,t))}if(!0!==i){let n,s;if(!1===i)s=e.changes.invertedDesc,n=S.empty(t.doc.length);else{let t=e.changes.filter(i);n=t.changes,s=t.filtered.mapDesc(t.changes).invertedDesc}e=le.create(t,n,e.selection&&e.selection.map(s),ae.mapEffects(e.effects,s),e.annotations,e.scrollIntoView)}let n=t.facet(te);for(let i=n.length-1;i>=0;i--){let s=n[i](e);e=s instanceof le?s:Array.isArray(s)&&1==s.length&&s[0]instanceof le?s[0]:ue(t,fe(s),!1)}return e}(s):s)}le.time=se.define(),le.userEvent=se.define(),le.addToHistory=se.define(),le.remote=se.define();const pe=[];function fe(e){return null==e?pe:Array.isArray(e)?e:[e]}var me=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}(me||(me={}));const ge=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let ve;try{ve=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(e){}class Oe{constructor(e,t,i,n,s,r){this.config=e,this.doc=t,this.selection=i,this.values=n,this.status=e.statusTemplate.slice(),this.computeSlot=s,r&&(r._state=this);for(let e=0;es.set(t,e))),i=null),s.set(t.value.compartment,t.value.extension)):t.is(ae.reconfigure)?(i=null,n=t.value):t.is(ae.appendConfig)&&(i=null,n=fe(n).concat(t.value));i?t=e.startState.values.slice():(i=X.resolve(n,s,this),t=new Oe(i,this.doc,this.selection,i.dynamicSlots.map((()=>null)),((e,t)=>t.reconfigure(e,this)),null).values),new Oe(i,e.newDoc,e.newSelection,t,((t,i)=>i.update(t,e)),e)}replaceSelection(e){return"string"==typeof e&&(e=this.toText(e)),this.changeByRange((t=>({changes:{from:t.from,to:t.to,insert:e},range:R.cursor(t.from+e.length)})))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),n=this.changes(i.changes),s=[i.range],r=fe(i.effects);for(let i=1;is.spec.fromJSON(r,e))))}return Oe.create({doc:e.doc,selection:R.fromJSON(e.selection),extensions:t.extensions?n.concat([t.extensions]):n})}static create(t={}){let i=X.resolve(t.extensions||[],new Map),n=t.doc instanceof e?t.doc:e.of((t.doc||"").split(i.staticFacet(Oe.lineSeparator)||y)),s=t.selection?t.selection instanceof R?t.selection:R.single(t.selection.anchor,t.selection.head):R.single(0);return D(s,n.length),i.staticFacet(K)||(s=s.asSingle()),new Oe(i,n,s,i.dynamicSlots.map((()=>null)),((e,t)=>t.create(e)),null)}get tabSize(){return this.facet(Oe.tabSize)}get lineBreak(){return this.facet(Oe.lineSeparator)||"\n"}get readOnly(){return this.facet(ne)}phrase(e,...t){for(let t of this.facet(Oe.phrases))if(Object.prototype.hasOwnProperty.call(t,e)){e=t[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,((e,i)=>{if("$"==i)return"$";let n=+(i||1);return!n||n>t.length?e:t[n-1]}))),e}languageDataAt(e,t,i=-1){let n=[];for(let s of this.facet(Z))for(let r of s(this,t,i))Object.prototype.hasOwnProperty.call(r,e)&&n.push(r[e]);return n}charCategorizer(e){return t=this.languageDataAt("wordChars",e).join(""),e=>{if(!/\S/.test(e))return me.Space;if(function(e){if(ve)return ve.test(e);for(let t=0;t"€"&&(i.toUpperCase()!=i.toLowerCase()||ge.test(i)))return!0}return!1}(e))return me.Word;for(let i=0;i-1)return me.Word;return me.Other};var t}wordAt(e){let{text:t,from:i,length:n}=this.doc.lineAt(e),s=this.charCategorizer(e),r=e-i,o=e-i;for(;r>0;){let e=p(t,r,!1);if(s(t.slice(e,r))!=me.Word)break;r=e}for(;oe.length?e[0]:4}),Oe.lineSeparator=J,Oe.readOnly=ne,Oe.phrases=q.define({compare(e,t){let i=Object.keys(e),n=Object.keys(t);return i.length==n.length&&i.every((i=>e[i]==t[i]))}}),Oe.languageData=Z,Oe.changeFilter=ee,Oe.transactionFilter=te,Oe.transactionExtender=ie,F.reconfigure=ae.define();class _e{eq(e){return this==e}range(e,t=e){return ye.create(e,t,this)}}_e.prototype.startSide=_e.prototype.endSide=0,_e.prototype.point=!1,_e.prototype.mapMode=w.TrackDel;class ye{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new ye(e,t,i)}}function we(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class xe{constructor(e,t,i,n){this.from=e,this.to=t,this.value=i,this.maxPoint=n}get length(){return this.to[this.to.length-1]}findIndex(e,t,i,n=0){let s=i?this.to:this.from;for(let r=n,o=s.length;;){if(r==o)return r;let n=r+o>>1,a=s[n]-e||(i?this.value[n].endSide:this.value[n].startSide)-t;if(n==r)return a>=0?r:o;a>=0?o=n:r=n+1}}between(e,t,i,n){for(let s=this.findIndex(t,-1e9,!0),r=this.findIndex(i,1e9,!1,s);sh||l==h&&c.startSide>0&&c.endSide<=0)continue;(h-l||c.endSide-c.startSide)<0||(r<0&&(r=l),c.point&&(o=Math.max(o,h-l)),i.push(c),n.push(l-r),s.push(h-r))}return{mapped:i.length?new xe(n,s,i,o):null,pos:r}}}class Se{constructor(e,t,i,n){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=n}static create(e,t,i,n){return new Se(e,t,i,n)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:i=!1,filterFrom:n=0,filterTo:s=this.length}=e,r=e.filter;if(0==t.length&&!r)return this;if(i&&(t=t.slice().sort(we)),this.isEmpty)return t.length?Se.of(t):this;let o=new Ce(this,null,-1).goto(0),a=0,l=[],h=new ke;for(;o.value||a=0){let e=t[a++];h.addInner(e.from,e.to,e.value)||l.push(e)}else 1==o.rangeIndex&&o.chunkIndexthis.chunkEnd(o.chunkIndex)||so.to||s=s&&e<=s+r.length&&!1===r.between(s,e-s,t-s,i))return}this.nextLayer.between(e,t,i)}}iter(e=0){return Pe.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Pe.from(e).goto(t)}static compare(e,t,i,n,s=-1){let r=e.filter((e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=s)),o=t.filter((e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=s)),a=Te(r,o,i),l=new Ee(r,a,s),h=new Ee(o,a,s);i.iterGaps(((e,t,i)=>Ae(l,e,h,t,i,n))),i.empty&&0==i.length&&Ae(l,0,h,0,0,n)}static eq(e,t,i=0,n){null==n&&(n=999999999);let s=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0)),r=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0));if(s.length!=r.length)return!1;if(!s.length)return!0;let o=Te(s,r),a=new Ee(s,o,0).goto(i),l=new Ee(r,o,0).goto(i);for(;;){if(a.to!=l.to||!Re(a.active,l.active)||a.point&&(!l.point||!a.point.eq(l.point)))return!1;if(a.to>n)return!0;a.next(),l.next()}}static spans(e,t,i,n,s=-1){let r=new Ee(e,null,s).goto(t),o=t,a=r.openStart;for(;;){let e=Math.min(r.to,i);if(r.point){let i=r.activeForPoint(r.to),s=r.pointFromo&&(n.span(o,e,r.active,a),a=r.openEnd(e));if(r.to>i)return a+(r.point&&r.to>i?1:0);o=r.to,r.next()}}static of(e,t=!1){let i=new ke;for(let n of e instanceof ye?[e]:t?function(e){if(e.length>1)for(let t=e[0],i=1;i0)return e.slice().sort(we);t=n}return e}(e):e)i.add(n.from,n.to,n.value);return i.finish()}}Se.empty=new Se([],[],null,-1),Se.empty.nextLayer=Se.empty;class ke{finishChunk(e){this.chunks.push(new xe(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,i){this.addInner(e,t,i)||(this.nextLayer||(this.nextLayer=new ke)).add(e,t,i)}addInner(e,t,i){let n=e-this.lastTo||i.startSide-this.last.endSide;if(n<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(n<0||(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=t,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),0))}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let i=t.value.length-1;return this.last=t.value[i],this.lastFrom=t.from[i]+e,this.lastTo=t.to[i]+e,!0}finish(){return this.finishInner(Se.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;let t=Se.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function Te(e,t,i){let n=new Map;for(let t of e)for(let e=0;e=this.minPoint)break}}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&n.push(new Ce(r,t,i,s));return 1==n.length?n[0]:new Pe(n)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let i of this.heap)i.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)Me(this.heap,e);return this.next(),this}forward(e,t){for(let i of this.heap)i.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)Me(this.heap,e);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),Me(this.heap,0)}}}function Me(e,t){for(let i=e[t];;){let n=1+(t<<1);if(n>=e.length)break;let s=e[n];if(n+1=0&&(s=e[n+1],n++),i.compare(s)<0)break;e[n]=i,e[t]=s,t=n}}class Ee{constructor(e,t,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Pe.from(e,t,i)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){De(this.active,e),De(this.activeTo,e),De(this.activeRank,e),this.minActive=qe(this.active,this.activeTo)}addActive(e){let t=0,{value:i,to:n,rank:s}=this.cursor;for(;t-1&&(this.activeTo[n]-this.cursor.from||this.active[n].endSide-this.cursor.startSide)<0){if(this.activeTo[n]>e){this.to=this.activeTo[n],this.endSide=this.active[n].endSide;break}this.removeActive(n),i&&De(i,n)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let e=this.cursor.value;if(e.point){if(!(t&&this.cursor.to==this.to&&this.cursor.from=0&&i[t]=0&&!(this.activeRank[i]e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&t.push(this.active[i]);return t.reverse()}openEnd(e){let t=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)t++;return t}}function Ae(e,t,i,n,s,r){e.goto(t),i.goto(n);let o=n+s,a=n,l=n-t;for(;;){let t=e.to+l-i.to||e.endSide-i.endSide,n=t<0?e.to+l:i.to,s=Math.min(n,o);if(e.point||i.point?e.point&&i.point&&(e.point==i.point||e.point.eq(i.point))&&Re(e.activeForPoint(e.to),i.activeForPoint(i.to))||r.comparePoint(a,s,e.point,i.point):s>a&&!Re(e.active,i.active)&&r.compareRange(a,s,e.active,i.active),n>o)break;a=n,t<=0&&e.next(),t>=0&&i.next()}}function Re(e,t){if(e.length!=t.length)return!1;for(let i=0;i=t;i--)e[i+1]=e[i];e[t]=i}function qe(e,t){let i=-1,n=1e9;for(let s=0;s=t)return n;if(n==e.length)break;s+=9==e.charCodeAt(n)?i-s%i:1,n=p(e,n)}return!0===n?-1:e.length}const Be="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),$e="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Qe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class ze{constructor(e,t){this.rules=[];let{finish:i}=t||{};function n(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function s(e,t,r,o){let a=[],l=/^@(\w+)\b/.exec(e[0]),h=l&&"keyframes"==l[1];if(l&&null==t)return r.push(e[0]+";");for(let i in t){let o=t[i];if(/&/.test(i))s(i.split(/,\s*/).map((t=>e.map((e=>t.replace(/&/,e))))).reduce(((e,t)=>e.concat(t))),o,r);else if(o&&"object"==typeof o){if(!l)throw new RangeError("The value of a property ("+i+") should be a primitive value.");s(n(i),o,a,h)}else null!=o&&a.push(i.replace(/_.*/,"").replace(/[A-Z]/g,(e=>"-"+e.toLowerCase()))+": "+o+";")}(a.length||h)&&r.push((!i||l||o?e:e.map(i)).join(", ")+" {"+a.join(" ")+"}")}for(let t in e)s(n(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=Qe[Be]||1;return Qe[Be]=e+1,"ͼ"+e.toString(36)}static mount(e,t,i){let n=e[$e],s=i&&i.nonce;n?s&&n.setNonce(s):n=new We(e,s),n.mount(Array.isArray(t)?t:[t])}}let je=new Map;class We{constructor(e,t){let i=e.ownerDocument||e,n=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&n.CSSStyleSheet){let t=je.get(i);if(t)return e.adoptedStyleSheets=[t.sheet,...e.adoptedStyleSheets],e[$e]=t;this.sheet=new n.CSSStyleSheet,e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets],je.set(i,this)}else{this.styleTag=i.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);let n=e.head||e;n.insertBefore(this.styleTag,n.firstChild)}this.modules=[],e[$e]=this}mount(e){let t=this.sheet,i=0,n=0;for(let s=0;s-1&&(this.modules.splice(o,1),n--,o=-1),-1==o){if(this.modules.splice(n++,0,r),t)for(let e=0;e",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Fe="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),He="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Xe=0;Xe<10;Xe++)Ve[48+Xe]=Ve[96+Xe]=String(Xe);for(Xe=1;Xe<=24;Xe++)Ve[Xe+111]="F"+Xe;for(Xe=65;Xe<=90;Xe++)Ve[Xe]=String.fromCharCode(Xe+32),Ue[Xe]=String.fromCharCode(Xe);for(var Ye in Ve)Ue.hasOwnProperty(Ye)||(Ue[Ye]=Ve[Ye]);function Ge(e){let t;return t=11==e.nodeType?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function Ze(e,t){return!!t&&(e==t||e.contains(1!=t.nodeType?t.parentNode:t))}function Ke(e,t){if(!t.anchorNode)return!1;try{return Ze(e,t.anchorNode)}catch(e){return!1}}function Je(e){return 3==e.nodeType?ct(e,0,e.nodeValue.length).getClientRects():1==e.nodeType?e.getClientRects():[]}function et(e,t,i,n){return!!i&&(it(e,t,i,n,-1)||it(e,t,i,n,1))}function tt(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function it(e,t,i,n,s){for(;;){if(e==i&&t==n)return!0;if(t==(s<0?0:nt(e))){if("DIV"==e.nodeName)return!1;let i=e.parentNode;if(!i||1!=i.nodeType)return!1;t=tt(e)+(s<0?0:1),e=i}else{if(1!=e.nodeType)return!1;if(1==(e=e.childNodes[t+(s<0?-1:0)]).nodeType&&"false"==e.contentEditable)return!1;t=s<0?nt(e):0}}}function nt(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function st(e,t){let i=t?e.left:e.right;return{left:i,right:i,top:e.top,bottom:e.bottom}}function rt(e){return{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}class ot{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:i}=e;this.set(t,Math.min(e.anchorOffset,t?nt(t):0),i,Math.min(e.focusOffset,i?nt(i):0))}set(e,t,i,n){this.anchorNode=e,this.anchorOffset=t,this.focusNode=i,this.focusOffset=n}}let at,lt=null;function ht(e){if(e.setActive)return e.setActive();if(lt)return e.focus(lt);let t=[];for(let i=e;i&&(t.push(i,i.scrollTop,i.scrollLeft),i!=i.ownerDocument);i=i.parentNode);if(e.focus(null==lt?{get preventScroll(){return lt={preventScroll:!0},!0}}:void 0),!lt){lt=!1;for(let e=0;eMath.max(1,e.scrollHeight-e.clientHeight-4)}class ft{constructor(e,t,i=!0){this.node=e,this.offset=t,this.precise=i}static before(e,t){return new ft(e.parentNode,tt(e),t)}static after(e,t){return new ft(e.parentNode,tt(e)+1,t)}}const mt=[];class gt{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let i of this.children){if(i==e)return t;t+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,t){if(2&this.flags){let i,n=this.dom,s=null;for(let r of this.children){if(7&r.flags){if(!r.dom&&(i=s?s.nextSibling:n.firstChild)){let e=gt.get(i);(!e||!e.parent&&e.canReuseDOM(r))&&r.reuseDOM(i)}r.sync(e,t),r.flags&=-8}if(i=s?s.nextSibling:n.firstChild,t&&!t.written&&t.node==n&&i!=r.dom&&(t.written=!0),r.dom.parentNode==n)for(;i&&i!=r.dom;)i=vt(i);else n.insertBefore(r.dom,i);s=r.dom}for(i=s?s.nextSibling:n.firstChild,i&&t&&t.node==n&&(t.written=!0);i;)i=vt(i)}else if(1&this.flags)for(let i of this.children)7&i.flags&&(i.sync(e,t),i.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,t){let i;if(e==this.dom)i=this.dom.childNodes[t];else{let n=0==nt(e)?0:0==t?-1:1;for(;;){let t=e.parentNode;if(t==this.dom)break;0==n&&t.firstChild!=t.lastChild&&(n=e==t.firstChild?-1:1),e=t}i=n<0?e:e.nextSibling}if(i==this.dom.firstChild)return 0;for(;i&&!gt.get(i);)i=i.nextSibling;if(!i)return this.length;for(let e=0,t=0;;e++){let n=this.children[e];if(n.dom==i)return t;t+=n.length+n.breakAfter}}domBoundsAround(e,t,i=0){let n=-1,s=-1,r=-1,o=-1;for(let a=0,l=i,h=i;at)return i.domBoundsAround(e,t,l);if(c>=e&&-1==n&&(n=a,s=l),l>t&&i.dom.parentNode==this.dom){r=a,o=h;break}h=c,l=c+i.breakAfter}return{from:s,to:o<0?i+this.length:o,startDOM:(n?this.children[n-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:r=0?this.children[r].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),1&t.flags)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,7&this.flags&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,i=mt){this.markDirty();for(let i=e;ithis.pos||e==this.pos&&(t>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function bt(e,t,i,n,s,r,o,a,l){let{children:h}=e,c=h.length?h[t]:null,d=r.length?r[r.length-1]:null,u=d?d.breakAfter:o;if(!(t==n&&c&&!o&&!u&&r.length<2&&c.merge(i,s,r.length?d:null,0==i,a,l))){if(n0&&(!o&&r.length&&c.merge(i,c.length,r[0],!1,a,0)?c.breakAfter=r.shift().breakAfter:(i2);var Rt={mac:At||/Mac/.test(yt.platform),windows:/Win/.test(yt.platform),linux:/Linux|X11/.test(yt.platform),ie:Tt,ie_version:St?wt.documentMode||6:kt?+kt[1]:xt?+xt[1]:0,gecko:Ct,gecko_version:Ct?+(/Firefox\/(\d+)/.exec(yt.userAgent)||[0,0])[1]:0,chrome:!!Pt,chrome_version:Pt?+Pt[1]:0,ios:At,android:/Android\b/.test(yt.userAgent),webkit:Mt,safari:Et,webkit_version:Mt?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=wt.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class Dt extends gt{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){3==e.nodeType&&this.createDOM(e)}merge(e,t,i){return!(8&this.flags||i&&(!(i instanceof Dt)||this.length-(t-e)+i.length>256||8&i.flags)||(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(t),this.markDirty(),0))}split(e){let t=new Dt(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=8&this.flags,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new ft(this.dom,e)}domBoundsAround(e,t,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return function(e,t,i){let n=e.nodeValue.length;t>n&&(t=n);let s=t,r=t,o=0;0==t&&i<0||t==n&&i>=0?Rt.chrome||Rt.gecko||(t?(s--,o=1):r=0)?0:a.length-1];return Rt.safari&&!o&&0==l.width&&(l=Array.prototype.find.call(a,(e=>e.width))||l),o?st(l,o<0):l||null}(this.dom,e,t)}}class It extends gt{constructor(e,t=[],i=0){super(),this.mark=e,this.children=t,this.length=i;for(let e of t)e.setParent(this)}setAttrs(e){if(ut(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!(8&(this.flags|e.flags))}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,i,n,s,r){return!(i&&(!(i instanceof It&&i.mark.eq(this.mark))||e&&s<=0||te&&t.push(i=e&&(n=s),i=o,s++}let r=this.length-e;return this.length=e,n>-1&&(this.children.length=n,this.markDirty()),new It(this.mark,t,r)}domAtPos(e){return Nt(this,e)}coordsAt(e,t){return $t(this,e,t)}}class qt extends gt{static create(e,t,i){return new qt(e,t,i)}constructor(e,t,i){super(),this.widget=e,this.length=t,this.side=i,this.prevWidget=null}split(e){let t=qt.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}getSide(){return this.side}merge(e,t,i,n,s,r){return!(i&&(!(i instanceof qt&&this.widget.compare(i.widget))||e>0&&s<=0||t0)?ft.before(this.dom):ft.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let i=this.widget.coordsAt(this.dom,e,t);if(i)return i;let n=this.dom.getClientRects(),s=null;if(!n.length)return null;let r=this.side?this.side<0:e>0;for(let t=r?n.length-1:0;s=n[t],!(e>0?0==t:t==n.length-1||s.top0?ft.before(this.dom):ft.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return e.empty}get isHidden(){return!0}}function Nt(e,t){let i=e.dom,{children:n}=e,s=0;for(let e=0;se&&t0;e--){let t=n[e-1];if(t.dom.parentNode==i)return t.domAtPos(t.length)}for(let e=s;e0&&t instanceof It&&s.length&&(n=s[s.length-1])instanceof It&&n.mark.eq(t.mark)?Bt(n,t.children[0],i-1):(s.push(t),t.setParent(e)),e.length+=t.length}function $t(e,t,i){let n=null,s=-1,r=null,o=-1;!function e(t,a){for(let l=0,h=0;l=a&&(c.children.length?e(c,a-h):(!r||r.isHidden&&i>0)&&(d>a||h==d&&c.getSide()>0)?(r=c,o=a-h):(h-1?1:0)!=s.length-(i&&s.indexOf(i)>-1?1:0))return!1;for(let r of n)if(r!=i&&(-1==s.indexOf(r)||e[r]!==t[r]))return!1;return!0}function Wt(e,t,i){let n=!1;if(t)for(let s in t)i&&s in i||(n=!0,"style"==s?e.style.cssText="":e.removeAttribute(s));if(i)for(let s in i)t&&t[s]==i[s]||(n=!0,"style"==s?e.style.cssText=i[s]:e.setAttribute(s,i[s]));return n}function Vt(e){let t=Object.create(null);for(let i=0;i0&&0==this.children[i-1].length;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){jt(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){Bt(this,e,t)}addLineDeco(e){let t=e.spec.attributes,i=e.spec.class;t&&(this.attrs=Qt(t,this.attrs||{})),i&&(this.attrs=Qt({class:i},this.attrs||{}))}domAtPos(e){return Nt(this,e)}reuseDOM(e){"DIV"==e.nodeName&&(this.setDOM(e),this.flags|=6)}sync(e,t){var i;this.dom?4&this.flags&&(ut(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(Wt(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let n=this.dom.lastChild;for(;n&>.get(n)instanceof It;)n=n.lastChild;if(!(n&&this.length&&("BR"==n.nodeName||0!=(null===(i=gt.get(n))||void 0===i?void 0:i.isEditable)||Rt.ios&&this.children.some((e=>e instanceof Dt))))){let e=document.createElement("BR");e.cmIgnore=!0,this.dom.appendChild(e)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let e,t=0;for(let i of this.children){if(!(i instanceof Dt)||/[^ -~]/.test(i.text))return null;let n=Je(i.dom);if(1!=n.length)return null;t+=n[0].width,e=n[0].height}return t?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length,textHeight:e}:null}coordsAt(e,t){let i=$t(this,e,t);if(!this.children.length&&i&&this.parent){let{heightOracle:e}=this.parent.view.viewState,t=i.bottom-i.top;if(Math.abs(t-e.lineHeight)<2&&e.textHeight=t){if(s instanceof Ut)return s;if(r>t)break}n=r+s.breakAfter}return null}}class Ft extends gt{constructor(e,t,i){super(),this.widget=e,this.length=t,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(e,t,i,n,s,r){return!(i&&(!(i instanceof Ft&&this.widget.compare(i.widget))||e>0&&s<=0||t0)}}class Ht{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,i){return null}get isHidden(){return!1}destroy(e){}}var Xt=function(e){return e[e.Text=0]="Text",e[e.WidgetBefore=1]="WidgetBefore",e[e.WidgetAfter=2]="WidgetAfter",e[e.WidgetRange=3]="WidgetRange",e}(Xt||(Xt={}));class Yt extends _e{constructor(e,t,i,n){super(),this.startSide=e,this.endSide=t,this.widget=i,this.spec=n}get heightRelevant(){return!1}static mark(e){return new Gt(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),i=!!e.block;return t+=i&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new Kt(e,t,t,i,e.widget||null,!1)}static replace(e){let t,i,n=!!e.block;if(e.isBlockGap)t=-5e8,i=4e8;else{let{start:s,end:r}=Jt(e,n);t=(s?n?-3e8:-1:5e8)-1,i=1+(r?n?2e8:1:-6e8)}return new Kt(e,t,i,n,e.widget||null,!0)}static line(e){return new Zt(e)}static set(e,t=!1){return Se.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}Yt.none=Se.empty;class Gt extends Yt{constructor(e){let{start:t,end:i}=Jt(e);super(t?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,i;return this==e||e instanceof Gt&&this.tagName==e.tagName&&(this.class||(null===(t=this.attrs)||void 0===t?void 0:t.class))==(e.class||(null===(i=e.attrs)||void 0===i?void 0:i.class))&&jt(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}Gt.prototype.point=!1;class Zt extends Yt{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Zt&&this.spec.class==e.spec.class&&jt(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}Zt.prototype.mapMode=w.TrackBefore,Zt.prototype.point=!0;class Kt extends Yt{constructor(e,t,i,n,s,r){super(t,i,s,e),this.block=n,this.isReplace=r,this.mapMode=n?t<=0?w.TrackBefore:w.TrackAfter:w.TrackDel}get type(){return this.startSide!=this.endSide?Xt.WidgetRange:this.startSide<=0?Xt.WidgetBefore:Xt.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Kt&&((t=this.widget)==(i=e.widget)||!!(t&&i&&t.compare(i)))&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide;var t,i}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}function Jt(e,t=!1){let{inclusiveStart:i,inclusiveEnd:n}=e;return null==i&&(i=e.inclusive),null==n&&(n=e.inclusive),{start:null!=i?i:t,end:null!=n?n:t}}function ei(e,t,i,n=0){let s=i.length-1;s>=0&&i[s]+n>=e?i[s]=Math.max(i[s],t):i.push(e,t)}Kt.prototype.point=!0;class ti{constructor(e,t,i,n){this.doc=e,this.pos=t,this.end=i,this.disallowBlockEffectsFor=n,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Ft&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Ut),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(ii(new Lt(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||e&&this.content.length&&this.content[this.content.length-1]instanceof Ft||this.getLine()}buildText(e,t,i){for(;e>0;){if(this.textOff==this.text.length){let{value:t,lineBreak:i,done:n}=this.cursor.next(this.skip);if(this.skip=0,n)throw new Error("Ran out of text content when drawing inline views");if(i){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}this.text=t,this.textOff=0}let n=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-i)),this.getLine().append(ii(new Dt(this.text.slice(this.textOff,this.textOff+n)),t),i),this.atCursorPos=!0,this.textOff+=n,e-=n,i=0}}span(e,t,i,n){this.buildText(t-e,i,n),this.pos=t,this.openStart<0&&(this.openStart=n)}point(e,t,i,n,s,r){if(this.disallowBlockEffectsFor[r]&&i instanceof Kt){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let o=t-e;if(i instanceof Kt)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Ft(i.widget||new ni("div"),o,i));else{let r=qt.create(i.widget||new ni("span"),o,o?0:i.startSide),a=this.atCursorPos&&!r.isEditable&&s<=n.length&&(e0),l=!r.isEditable&&(en.length||i.startSide<=0),h=this.getLine();2!=this.pendingBuffer||a||r.isEditable||(this.pendingBuffer=0),this.flushBuffer(n),a&&(h.append(ii(new Lt(1),n),s),s=n.length+Math.max(0,s-n.length)),h.append(ii(r,n),s),this.atCursorPos=l,this.pendingBuffer=l?en.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=n.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);o&&(this.textOff+o<=this.text.length?this.textOff+=o:(this.skip+=o-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=s)}static build(e,t,i,n,s){let r=new ti(e,t,i,s);return r.openEnd=Se.spans(n,t,i,r),r.openStart<0&&(r.openStart=r.openEnd),r.finish(r.openEnd),r}}function ii(e,t){for(let i of t)e=new It(i,[e],e.length);return e}class ni extends Ht{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}const si=q.define(),ri=q.define(),oi=q.define(),ai=q.define(),li=q.define(),hi=q.define(),ci=q.define(),di=q.define({combine:e=>e.some((e=>e))}),ui=q.define({combine:e=>e.some((e=>e))});class pi{constructor(e,t="nearest",i="nearest",n=5,s=5){this.range=e,this.y=t,this.x=i,this.yMargin=n,this.xMargin=s}map(e){return e.empty?this:new pi(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin)}}const fi=ae.define({map:(e,t)=>e.map(t)});function mi(e,t,i){let n=e.facet(ai);n.length?n[0](t):window.onerror?window.onerror(String(t),i,void 0,void 0,t):i?console.error(i+":",t):console.error(t)}const gi=q.define({combine:e=>!e.length||e[0]});let vi=0;const Oi=q.define();class bi{constructor(e,t,i,n,s){this.id=e,this.create=t,this.domEventHandlers=i,this.domEventObservers=n,this.extension=s(this)}static define(e,t){const{eventHandlers:i,eventObservers:n,provide:s,decorations:r}=t||{};return new bi(vi++,e,i,n,(e=>{let t=[Oi.of(e)];return r&&t.push(xi.of((t=>{let i=t.plugin(e);return i?r(i):Yt.none}))),s&&t.push(s(e)),t}))}static fromClass(e,t){return bi.define((t=>new e(t)),t)}}class _i{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(mi(e.state,t,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(e){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){mi(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(null===(t=this.value)||void 0===t?void 0:t.destroy)try{this.value.destroy()}catch(t){mi(e.state,t,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const yi=q.define(),wi=q.define(),xi=q.define(),Si=q.define(),ki=q.define();function Ti(e,t,i){let n=e.state.facet(ki);if(!n.length)return n;let s=n.map((t=>t instanceof Function?t(e):t)),r=[];return Se.spans(s,t,i,{point(){},span(e,t,i,n){let s=r;for(let r=i.length-1;r>=0;r--,n--){let o,a=i[r].spec.bidiIsolate;if(null!=a)if(n>0&&s.length&&(o=s[s.length-1]).to==e&&o.direction==a)o.to=t,s=o.inner;else{let i={from:e,to:t,direction:a,inner:[]};s.push(i),s=i.inner}}}}),r}const Ci=q.define();function Pi(e){let t=0,i=0,n=0,s=0;for(let r of e.state.facet(Ci)){let o=r(e);o&&(null!=o.left&&(t=Math.max(t,o.left)),null!=o.right&&(i=Math.max(i,o.right)),null!=o.top&&(n=Math.max(n,o.top)),null!=o.bottom&&(s=Math.max(s,o.bottom)))}return{left:t,right:i,top:n,bottom:s}}const Mi=q.define();class Ei{constructor(e,t,i,n){this.fromA=e,this.toA=t,this.fromB=i,this.toB=n}join(e){return new Ei(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,i=this;for(;t>0;t--){let n=e[t-1];if(!(n.fromA>i.toA)){if(n.toAh)break;s+=2}if(!a)return i;new Ei(a.fromA,a.toA,a.fromB,a.toB).addToSet(i),r=a.toA,o=a.toB}}}class Ai{constructor(e,t,i){this.view=e,this.state=t,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=S.empty(this.startState.doc.length);for(let e of i)this.changes=this.changes.compose(e.changes);let n=[];this.changes.iterChangedRanges(((e,t,i,s)=>n.push(new Ei(e,t,i,s)))),this.changedRanges=n}static create(e,t,i){return new Ai(e,t,i)}get viewportChanged(){return(4&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(10&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((e=>e.selection))}get empty(){return 0==this.flags&&0==this.transactions.length}}var Ri=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(Ri||(Ri={}));const Di=Ri.LTR,Ii=Ri.RTL;function qi(e){let t=[];for(let i=0;i=t){if(o.level==i)return r;(s<0||(0!=n?n<0?o.fromt:e[s].level>o.level))&&(s=r)}}if(s<0)throw new RangeError("Index out of range");return s}}function ji(e,t){if(e.length!=t.length)return!1;for(let i=0;il&&o.push(new zi(l,f.from,u)),Ui(e,f.direction==Di!=!(u%2)?n+1:n,s,f.inner,f.from,f.to,o),l=f.to),p=f.to}else{if(p==i||(t?Wi[p]!=a:Wi[p]==a))break;p++}d?Vi(e,l,p,n+1,s,d,o):lt;){let i=!0,c=!1;if(!h||l>r[h-1].to){let e=Wi[l-1];e!=a&&(i=!1,c=16==e)}let d=i||1!=a?null:[],u=i?n:n+1,p=l;e:for(;;)if(h&&p==r[h-1].to){if(c)break e;let f=r[--h];if(!i)for(let e=f.from,i=h;;){if(e==t)break e;if(!i||r[i-1].to!=e){if(Wi[e-1]==a)break e;break}e=r[--i].from}d?d.push(f):(f.to=0;e-=3)if($i[e+1]==-i){let t=$i[e+2],i=2&t?s:4&t?1&t?r:s:0;i&&(Wi[o]=Wi[$i[e]]=i),a=e;break}}else{if(189==$i.length)break;$i[a++]=o,$i[a++]=t,$i[a++]=l}else if(2==(n=Wi[o])||1==n){let e=n==s;l=e?0:1;for(let t=a-3;t>=0;t-=3){let i=$i[t+2];if(2&i)break;if(e)$i[t+2]|=2;else{if(4&i)break;$i[t+2]|=4}}}}}(e,s,r,n,a),function(e,t,i,n){for(let s=0,r=n;s<=i.length;s++){let o=s?i[s-1].to:e,a=sl;)t==r&&(t=i[--n].from,r=n?i[n-1].to:e),Wi[--t]=c;l=o}else r=o,l++}}}(s,r,n,a),Vi(e,s,r,t,i,n,o)}function Fi(e){return[new zi(0,e,0)]}let Hi="";function Xi(e,t,i,n,s){var r;let o=n.head-e.from,a=-1;if(0==o){if(!s||!e.length)return null;t[0].level!=i&&(o=t[0].side(!1,i),a=0)}else if(o==e.length){if(s)return null;let e=t[t.length-1];e.level!=i&&(o=e.side(!0,i),a=t.length-1)}a<0&&(a=zi.find(t,o,null!==(r=n.bidiLevel)&&void 0!==r?r:-1,n.assoc));let l=t[a];o==l.side(s,i)&&(l=t[a+=s?1:-1],o=l.side(!s,i));let h=s==(l.dir==i),c=p(e.text,o,h);if(Hi=e.text.slice(Math.min(o,c),Math.max(o,c)),c!=l.side(s,i))return R.cursor(c+e.from,h?-1:1,l.level);let d=a==(s?t.length-1:0)?null:t[a+(s?1:-1)];return d||l.level==i?d&&d.level0&&i.length&&(i.every((({fromA:e,toA:t})=>tthis.minWidthTo))?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);let n=-1;this.view.inputState.composing>=0&&((null===(t=this.domChanged)||void 0===t?void 0:t.newSel)?n=this.domChanged.newSel.head:function(e,t){let i=!1;return t&&e.iterChangedRanges(((e,n)=>{et.from&&(i=!0)})),i}(e.changes,this.hasComposition)||e.selectionSet||(n=e.state.selection.main.head));let s=n>-1?function(e,t,i){let n=Zi(e,i);if(!n)return null;let{node:s,from:r,to:o}=n,a=s.nodeValue;if(/[\n\r]/.test(a))return null;if(e.state.doc.sliceString(n.from,n.to)!=a)return null;let l=t.invertedDesc,h=new Ei(l.mapPos(r),l.mapPos(o),r,o),c=[];for(let t=s.parentNode;;t=t.parentNode){let i=gt.get(t);if(i instanceof It)c.push({node:t,deco:i.mark});else{if(i instanceof Ut||"DIV"==t.nodeName&&t.parentNode==e.contentDOM)return{range:h,text:s,marks:c,line:t};if(t==e.contentDOM)return null;c.push({node:t,deco:new Gt({inclusive:!0,attributes:Vt(t),tagName:t.tagName.toLowerCase()})})}}}(this.view,e.changes,n):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:t,to:n}=this.hasComposition;i=new Ei(t,n,e.changes.mapPos(t,-1),e.changes.mapPos(n,1)).addToSet(i.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(Rt.ie||Rt.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let r=function(e,t,i){let n=new Ji;return Se.compare(e,t,i,n),n.changes}(this.decorations,this.updateDeco(),e.changes);return i=Ei.extendWithRanges(i,r),!!(7&this.flags||0!=i.length)&&(this.updateInner(i,e.startState.doc.length,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,i);let{observer:n}=this.view;n.ignore((()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let e=Rt.chrome||Rt.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,e),this.flags&=-8,e&&(e.written||n.selectionRange.focusNode!=e.node)&&(this.forceSelection=!0),this.dom.style.height=""})),this.markedForComposition.forEach((e=>e.flags&=-9));let s=[];if(this.view.viewport.from||this.view.viewport.to=0?n[e]:null;if(!t)break;let r,o,a,l,{fromA:h,toA:c,fromB:d,toB:u}=t;if(i&&i.range.fromBd){let e=ti.build(this.view.state.doc,d,i.range.fromB,this.decorations,this.dynamicDecorationMap),t=ti.build(this.view.state.doc,i.range.toB,u,this.decorations,this.dynamicDecorationMap);o=e.breakAtStart,a=e.openStart,l=t.openEnd;let n=this.compositionView(i);t.breakAtStart?n.breakAfter=1:t.content.length&&n.merge(n.length,n.length,t.content[0],!1,t.openStart,0)&&(n.breakAfter=t.content[0].breakAfter,t.content.shift()),e.content.length&&n.merge(0,0,e.content[e.content.length-1],!0,0,e.openEnd)&&e.content.pop(),r=e.content.concat(n).concat(t.content)}else({content:r,breakAtStart:o,openStart:a,openEnd:l}=ti.build(this.view.state.doc,d,u,this.decorations,this.dynamicDecorationMap));let{i:p,off:f}=s.findPos(c,1),{i:m,off:g}=s.findPos(h,-1);bt(this,m,g,p,f,r,o,a,l)}i&&this.fixCompositionDOM(i)}compositionView(e){let t=new Dt(e.text.nodeValue);t.flags|=8;for(let{deco:i}of e.marks)t=new It(i,[t],t.length);let i=new Ut;return i.append(t,0),i}fixCompositionDOM(e){let t=(e,t)=>{t.flags|=8|(t.children.some((e=>7&e.flags))?1:0),this.markedForComposition.add(t);let i=gt.get(e);i&&i!=t&&(i.dom=null),t.setDOM(e)},i=this.childPos(e.range.fromB,1),n=this.children[i.i];t(e.line,n);for(let s=e.marks.length-1;s>=-1;s--)i=n.childPos(i.off,1),n=n.children[i.i],t(s>=0?e.marks[s].node:e.text,n)}updateSelection(e=!1,t=!1){!e&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let i=this.view.root.activeElement,n=i==this.dom,s=!n&&Ke(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(n||t||s))return;let r=this.forceSelection;this.forceSelection=!1;let o=this.view.state.selection.main,a=this.moveToLine(this.domAtPos(o.anchor)),l=o.empty?a:this.moveToLine(this.domAtPos(o.head));if(Rt.gecko&&o.empty&&!this.hasComposition&&1==(h=a).node.nodeType&&h.node.firstChild&&(0==h.offset||"false"==h.node.childNodes[h.offset-1].contentEditable)&&(h.offset==h.node.childNodes.length||"false"==h.node.childNodes[h.offset].contentEditable)){let e=document.createTextNode("");this.view.observer.ignore((()=>a.node.insertBefore(e,a.node.childNodes[a.offset]||null))),a=l=new ft(e,0),r=!0}var h;let c=this.view.observer.selectionRange;!r&&c.focusNode&&et(a.node,a.offset,c.anchorNode,c.anchorOffset)&&et(l.node,l.offset,c.focusNode,c.focusOffset)||(this.view.observer.ignore((()=>{Rt.android&&Rt.chrome&&this.dom.contains(c.focusNode)&&function(e,t){for(let i=e;i&&i!=t;i=i.assignedSlot||i.parentNode)if(1==i.nodeType&&"false"==i.contentEditable)return!0;return!1}(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let e=Ge(this.view.root);if(e)if(o.empty){if(Rt.gecko){let e=(t=a.node,n=a.offset,1!=t.nodeType?0:(n&&"false"==t.childNodes[n-1].contentEditable?1:0)|(no.head&&([a,l]=[l,a]),t.setEnd(l.node,l.offset),t.setStart(a.node,a.offset),e.removeAllRanges(),e.addRange(t)}var t,n;s&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())})),this.view.observer.setSelectionRange(a,l)),this.impreciseAnchor=a.precise?null:new ft(c.anchorNode,c.anchorOffset),this.impreciseHead=l.precise?null:new ft(c.focusNode,c.focusOffset)}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,i=Ge(e.root),{anchorNode:n,anchorOffset:s}=e.observer.selectionRange;if(!(i&&t.empty&&t.assoc&&i.modify))return;let r=Ut.find(this,t.head);if(!r)return;let o=r.posAtStart;if(t.head==o||t.head==o+r.length)return;let a=this.coordsAt(t.head,-1),l=this.coordsAt(t.head,1);if(!a||!l||a.bottom>l.top)return;let h=this.domAtPos(t.head+t.assoc);i.collapse(h.node,h.offset),i.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let c=e.observer.selectionRange;e.docView.posFromDOM(c.anchorNode,c.anchorOffset)!=t.from&&i.collapse(n,s)}moveToLine(e){let t,i=this.dom;if(e.node!=i)return e;for(let n=e.offset;!t&&n=0;n--){let e=gt.get(i.childNodes[n]);e instanceof Ut&&(t=e.domAtPos(e.length))}return t?new ft(t.node,t.offset,!0):e}nearest(e){for(let t=e;t;){let e=gt.get(t);if(e&&e.rootView==this)return e;t=t.parentNode}return null}posFromDOM(e,t){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,t)+i.posAtStart}domAtPos(e){let{i:t,off:i}=this.childCursor().findPos(e,-1);for(;t=0;r--){let o=this.children[r],a=s-o.breakAfter,l=a-o.length;if(ae||o.covers(1))&&(!i||o instanceof Ut&&!(i instanceof Ut&&t>=0))&&(i=o,n=l),s=l}return i?i.coordsAt(e-n,t):null}coordsForChar(e){let{i:t,off:i}=this.childPos(e,1),n=this.children[t];if(!(n instanceof Ut))return null;for(;n.children.length;){let{i:e,off:t}=n.childPos(i,1);for(;;e++){if(e==n.children.length)return null;if((n=n.children[e]).length)break}i=t}if(!(n instanceof Dt))return null;let s=p(n.text,i);if(s==i)return null;let r=ct(n.dom,i,s).getClientRects();for(let e=0;eMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,o=-1,a=this.view.textDirection==Ri.LTR;for(let e=0,l=0;ln)break;if(e>=i){let i=h.dom.getBoundingClientRect();if(t.push(i.height),r){let t=h.dom.lastChild,n=t?Je(t):[];if(n.length){let t=n[n.length-1],r=a?t.right-i.left:i.right-t.left;r>o&&(o=r,this.minWidth=s,this.minWidthFrom=e,this.minWidthTo=c)}}}e=c+h.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return"rtl"==getComputedStyle(this.children[t].dom).direction?Ri.RTL:Ri.LTR}measureTextSize(){for(let e of this.children)if(e instanceof Ut){let t=e.measureTextSize();if(t)return t}let e,t,i,n=document.createElement("div");return n.className="cm-line",n.style.width="99999px",n.style.position="absolute",n.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((()=>{this.dom.appendChild(n);let s=Je(n.firstChild)[0];e=n.getBoundingClientRect().height,t=s?s.width/27:7,i=s?s.height:e,n.remove()})),{lineHeight:e,charWidth:t,textHeight:i}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new Ot(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let i=0,n=0;;n++){let s=n==t.viewports.length?null:t.viewports[n],r=s?s.from-1:this.length;if(r>i){let n=(t.lineBlockAt(r).bottom-t.lineBlockAt(i).top)/this.view.scaleY;e.push(Yt.replace({widget:new Gi(n),block:!0,inclusive:!0,isBlockGap:!0}).range(i,r))}if(!s)break;i=s.to+1}return Yt.set(e)}updateDeco(){let e=this.view.state.facet(xi).map(((e,t)=>(this.dynamicDecorationMap[t]="function"==typeof e)?e(this.view):e));for(let t=e.length;ti.anchor?-1:1);if(!n)return;!i.empty&&(t=this.coordsAt(i.anchor,i.anchor>i.head?-1:1))&&(n={left:Math.min(n.left,t.left),top:Math.min(n.top,t.top),right:Math.max(n.right,t.right),bottom:Math.max(n.bottom,t.bottom)});let s=Pi(this.view),r={left:n.left-s.left,top:n.top-s.top,right:n.right+s.right,bottom:n.bottom+s.bottom};!function(e,t,i,n,s,r,o,a){let l=e.ownerDocument,h=l.defaultView||window;for(let c=e,d=!1;c&&!d;)if(1==c.nodeType){let e,u=c==l.body,p=1,f=1;if(u)e=rt(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(d=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let t=c.getBoundingClientRect();p=t.width/c.offsetWidth,f=t.height/c.offsetHeight,e={left:t.left,right:t.left+c.clientWidth*p,top:t.top,bottom:t.top+c.clientHeight*f}}let m=0,g=0;if("nearest"==s)t.top0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+g+o)):t.bottom>e.bottom&&(g=t.bottom-e.bottom+o,i<0&&t.top-g0&&t.right>e.right+m&&(m=t.right-e.right+m+r)):t.right>e.right&&(m=t.right-e.right+r,i<0&&t.left0))break;i=i.childNodes[n-1],n=nt(i)}if(i>=0)for(let n=e,s=t;;){if(3==n.nodeType)return{node:n,offset:s};if(!(1==n.nodeType&&s=0))break;n=n.childNodes[s],s=0}return null}let Ji=class{constructor(){this.changes=[]}compareRange(e,t){ei(e,t,this.changes)}comparePoint(e,t){ei(e,t,this.changes)}};function en(e,t){return t.left>e?t.left-e:Math.max(0,e-t.right)}function tn(e,t){return t.top>e?t.top-e:Math.max(0,e-t.bottom)}function nn(e,t){return e.topt.top+1}function sn(e,t){return te.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function on(e,t,i){let n,s,r,o,a,l,h,c,d=!1;for(let u=e.firstChild;u;u=u.nextSibling){let e=Je(u);for(let p=0;pg||o==g&&r>m){n=u,s=f,r=m,o=g;let a=g?i0?p0)}0==m?i>f.bottom&&(!h||h.bottomf.top)&&(l=u,c=f):h&&nn(h,f)?h=rn(h,f.bottom):c&&nn(c,f)&&(c=sn(c,f.top))}}if(h&&h.bottom>=i?(n=a,s=h):c&&c.top<=i&&(n=l,s=c),!n)return{node:e,offset:0};let u=Math.max(s.left,Math.min(s.right,t));return 3==n.nodeType?an(n,u,i):d&&"false"!=n.contentEditable?on(n,u,i):{node:e,offset:Array.prototype.indexOf.call(e.childNodes,n)+(t>=(s.left+s.right)/2?1:0)}}function an(e,t,i){let n=e.nodeValue.length,s=-1,r=1e9,o=0;for(let a=0;ai?h.top-i:i-h.bottom)-1;if(h.left-1<=t&&h.right+1>=t&&c=(h.left+h.right)/2,n=i;if((Rt.chrome||Rt.gecko)&&ct(e,a).getBoundingClientRect().left==h.right&&(n=!i),c<=0)return{node:e,offset:a+(n?1:0)};s=a+(n?1:0),r=c}}}return{node:e,offset:s>-1?s:o>0?e.nodeValue.length:0}}function ln(e,t,i,n=-1){var s,r;let o,a=e.contentDOM.getBoundingClientRect(),l=a.top+e.viewState.paddingTop,{docHeight:h}=e.viewState,{x:c,y:d}=t,u=d-l;if(u<0)return 0;if(u>h)return e.state.doc.length;for(let t=e.viewState.heightOracle.textHeight/2,s=!1;o=e.elementAtHeight(u),o.type!=Xt.Text;)for(;u=n>0?o.bottom+t:o.top-t,!(u>=0&&u<=h);){if(s)return i?null:0;s=!0,n=-n}d=l+u;let p=o.from;if(pe.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:i?null:hn(e,a,o,c,d);let f=e.dom.ownerDocument,m=e.root.elementFromPoint?e.root:f,g=m.elementFromPoint(c,d);g&&!e.contentDOM.contains(g)&&(g=null),g||(c=Math.max(a.left+1,Math.min(a.right-1,c)),g=m.elementFromPoint(c,d),g&&!e.contentDOM.contains(g)&&(g=null));let v,O=-1;if(g&&0!=(null===(s=e.docView.nearest(g))||void 0===s?void 0:s.isEditable))if(f.caretPositionFromPoint){let e=f.caretPositionFromPoint(c,d);e&&({offsetNode:v,offset:O}=e)}else if(f.caretRangeFromPoint){let t=f.caretRangeFromPoint(c,d);t&&(({startContainer:v,startOffset:O}=t),(!e.contentDOM.contains(v)||Rt.safari&&function(e,t,i){let n;if(3!=e.nodeType||t!=(n=e.nodeValue.length))return!1;for(let t=e.nextSibling;t;t=t.nextSibling)if(1!=t.nodeType||"BR"!=t.nodeName)return!1;return ct(e,n-1,n).getBoundingClientRect().left>i}(v,O,c)||Rt.chrome&&function(e,t,i){if(0!=t)return!1;for(let t=e;;){let e=t.parentNode;if(!e||1!=e.nodeType||e.firstChild!=t)return!1;if(e.classList.contains("cm-line"))break;t=e}return i-(1==e.nodeType?e.getBoundingClientRect():ct(e,0,Math.max(e.nodeValue.length,1)).getBoundingClientRect()).left>5}(v,O,c))&&(v=void 0))}if(!v||!e.docView.dom.contains(v)){let t=Ut.find(e.docView,p);if(!t)return u>o.top+o.height/2?o.to:o.from;({node:v,offset:O}=on(t.dom,c,d))}let b=e.docView.nearest(v);if(!b)return null;if(b.isWidget&&1==(null===(r=b.dom)||void 0===r?void 0:r.nodeType)){let e=b.dom.getBoundingClientRect();return t.y1.5*e.defaultLineHeight){let t=e.viewState.heightOracle.textHeight;r+=Math.floor((s-i.top-.5*(e.defaultLineHeight-t))/t)*e.viewState.heightOracle.lineLength}let o=e.state.sliceDoc(i.from,i.to);return i.from+Ne(o,r,e.state.tabSize)}function cn(e,t){let i=e.lineBlockAt(t);if(Array.isArray(i.type))for(let e of i.type)if(e.to>t||e.to==t&&(e.to==i.to||e.type==Xt.Text))return e;return i}function dn(e,t,i,n){let s=e.state.doc.lineAt(t.head),r=e.bidiSpans(s),o=e.textDirectionAt(s.from);for(let a=t,l=null;;){let t=Xi(s,r,o,a,i),h=Hi;if(!t){if(s.number==(i?e.state.doc.lines:1))return a;h="\n",s=e.state.doc.line(s.number+(i?1:-1)),r=e.bidiSpans(s),t=R.cursor(i?s.from:s.to)}if(l){if(!l(h))return a}else{if(!n)return t;l=n(h)}a=t}}function un(e,t,i){for(;;){let n=0;for(let s of e)s.between(t-1,t+1,((e,s,r)=>{if(t>e&&tt(e))),i.from,t.head>i.from?-1:1);return n==i.from?i:R.cursor(n,nnull)),Rt.gecko&&function(e){zn.has(e)||(zn.add(e),e.addEventListener("copy",(()=>{})),e.addEventListener("cut",(()=>{})))}(e.contentDOM.ownerDocument)}handleEvent(e){(function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let i,n=t.target;n!=e.contentDOM;n=n.parentNode)if(!n||11==n.nodeType||(i=gt.get(n))&&i.ignoreEvent(t))return!1;return!0})(this.view,e)&&!this.ignoreDuringComposition(e)&&("keydown"==e.type&&this.keydown(e)||this.runHandlers(e.type,e))}runHandlers(e,t){let i=this.handlers[e];if(i){for(let e of i.observers)e(this.view,t);for(let e of i.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=gn(e),i=this.handlers,n=this.view.contentDOM;for(let e in t)if("scroll"!=e){let s=!t[e].handlers.length,r=i[e];r&&s!=!r.handlers.length&&(n.removeEventListener(e,this.handleEvent),r=null),r||n.addEventListener(e,this.handleEvent,{passive:s})}for(let e in i)"scroll"==e||t[e]||n.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&Date.now()t.keyCode==e.keyCode)))&&!e.ctrlKey||On.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(229!=e.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=t||e,setTimeout((()=>this.flushIOSKey()),250),!0)}flushIOSKey(){let e=this.pendingIOSKey;return!!e&&(this.pendingIOSKey=void 0,dt(this.view.contentDOM,e.key,e.keyCode))}ignoreDuringComposition(e){return!!/^key/.test(e.type)&&(this.composing>0||!!(Rt.safari&&!Rt.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function mn(e,t){return(i,n)=>{try{return t.call(e,n,i)}catch(e){mi(i.state,e)}}}function gn(e){let t=Object.create(null);function i(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec;if(e&&e.domEventHandlers)for(let n in e.domEventHandlers){let s=e.domEventHandlers[n];s&&i(n).handlers.push(mn(t.value,s))}if(e&&e.domEventObservers)for(let n in e.domEventObservers){let s=e.domEventObservers[n];s&&i(n).observers.push(mn(t.value,s))}}for(let e in wn)i(e).handlers.push(wn[e]);for(let e in xn)i(e).observers.push(xn[e]);return t}const vn=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],On="dthko",bn=[16,17,18,20,91,92,224,225];function _n(e){return.7*Math.max(0,e)+8}class yn{constructor(e,t,i,n){this.view=e,this.startEvent=t,this.style=i,this.mustSelect=n,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParent=function(e){let t=e.ownerDocument;for(let i=e.parentNode;i&&i!=t.body;)if(1==i.nodeType){if(i.scrollHeight>i.clientHeight||i.scrollWidth>i.clientWidth)return i;i=i.assignedSlot||i.parentNode}else{if(11!=i.nodeType)break;i=i.host}return null}(e.contentDOM),this.atoms=e.state.facet(Si).map((t=>t(e)));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Oe.allowMultipleSelections)&&function(e,t){let i=e.state.facet(si);return i.length?i[0](t):Rt.mac?t.metaKey:t.ctrlKey}(e,t),this.dragging=!(!function(e,t){let{main:i}=e.state.selection;if(i.empty)return!1;let n=Ge(e.root);if(!n||0==n.rangeCount)return!0;let s=n.getRangeAt(0).getClientRects();for(let e=0;e=t.clientX&&i.top<=t.clientY&&i.bottom>=t.clientY)return!0}return!1}(e,t)||1!=qn(t))&&null}start(e){!1===this.dragging&&this.select(e)}move(e){var t,i,n;if(0==e.buttons)return this.destroy();if(this.dragging||null==this.dragging&&(i=this.startEvent,n=e,Math.max(Math.abs(i.clientX-n.clientX),Math.abs(i.clientY-n.clientY))<10))return;this.select(this.lastEvent=e);let s=0,r=0,o=(null===(t=this.scrollParent)||void 0===t?void 0:t.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},a=Pi(this.view);e.clientX-a.left<=o.left+6?s=-_n(o.left-e.clientX):e.clientX+a.right>=o.right-6&&(s=_n(e.clientX-o.right)),e.clientY-a.top<=o.top+6?r=-_n(o.top-e.clientY):e.clientY+a.bottom>=o.bottom-6&&(r=_n(e.clientY-o.bottom)),this.setScrollSpeed(s,r)}up(e){null==this.dragging&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval((()=>this.scroll()),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),!1===this.dragging&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let i=0;ithis.select(this.lastEvent)),20)}}const wn=Object.create(null),xn=Object.create(null),Sn=Rt.ie&&Rt.ie_version<15||Rt.ios&&Rt.webkit_version<604;function kn(e,t){let i,{state:n}=e,s=1,r=n.toText(t),o=r.lines==n.selection.ranges.length;if(null!=Nn&&n.selection.ranges.every((e=>e.empty))&&Nn==r.toString()){let e=-1;i=n.changeByRange((i=>{let a=n.doc.lineAt(i.from);if(a.from==e)return{range:i};e=a.from;let l=n.toText((o?r.line(s++).text:t)+n.lineBreak);return{changes:{from:a.from,insert:l},range:R.cursor(i.from+l.length)}}))}else i=o?n.changeByRange((e=>{let t=r.line(s++);return{changes:{from:e.from,to:e.to,insert:t.text},range:R.cursor(e.from+t.length)}})):n.replaceSelection(r);e.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}function Tn(e,t,i,n){if(1==n)return R.cursor(t,i);if(2==n)return function(e,t,i=1){let n=e.charCategorizer(t),s=e.doc.lineAt(t),r=t-s.from;if(0==s.length)return R.cursor(t);0==r?i=1:r==s.length&&(i=-1);let o=r,a=r;i<0?o=p(s.text,r,!1):a=p(s.text,r);let l=n(s.text.slice(o,a));for(;o>0;){let e=p(s.text,o,!1);if(n(s.text.slice(e,o))!=l)break;o=e}for(;a{e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft},wn.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),27==t.keyCode&&(e.inputState.lastEscPress=Date.now()),!1),xn.touchstart=(e,t)=>{e.inputState.lastTouchTime=Date.now(),e.inputState.setSelectionOrigin("select.pointer")},xn.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")},wn.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let i=null;for(let n of e.state.facet(oi))if(i=n(e,t),i)break;if(i||0!=t.button||(i=function(e,t){let i=En(e,t),n=qn(t),s=e.state.selection;return{update(e){e.docChanged&&(i.pos=e.changes.mapPos(i.pos),s=s.map(e.changes))},get(t,r,o){let a,l=En(e,t),h=Tn(e,l.pos,l.bias,n);if(i.pos!=l.pos&&!r){let t=Tn(e,i.pos,i.bias,n),s=Math.min(t.from,h.from),r=Math.max(t.to,h.to);h=s1&&(a=function(e,t){for(let i=0;i=t)return R.create(e.ranges.slice(0,i).concat(e.ranges.slice(i+1)),e.mainIndex==i?0:e.mainIndex-(e.mainIndex>i?1:0))}return null}(s,l.pos))?a:o?s.addRange(h):R.create([h])}}}(e,t)),i){let n=!e.hasFocus;e.inputState.startMouseSelection(new yn(e,t,i,n)),n&&e.observer.ignore((()=>ht(e.contentDOM)));let s=e.inputState.mouseSelection;if(s)return s.start(t),!1===s.dragging}return!1};let Cn=(e,t)=>e>=t.top&&e<=t.bottom,Pn=(e,t,i)=>Cn(t,i)&&e>=i.left&&e<=i.right;function Mn(e,t,i,n){let s=Ut.find(e.docView,t);if(!s)return 1;let r=t-s.posAtStart;if(0==r)return 1;if(r==s.length)return-1;let o=s.coordsAt(r,-1);if(o&&Pn(i,n,o))return-1;let a=s.coordsAt(r,1);return a&&Pn(i,n,a)?1:o&&Cn(n,o)?-1:1}function En(e,t){let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:i,bias:Mn(e,i,t.clientX,t.clientY)}}const An=Rt.ie&&Rt.ie_version<=11;let Rn=null,Dn=0,In=0;function qn(e){if(!An)return e.detail;let t=Rn,i=In;return Rn=e,In=Date.now(),Dn=!t||i>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(Dn+1)%3:1}function Ln(e,t,i,n){if(!i)return;let s=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{mouseSelection:r}=e.inputState,o=n&&r&&r.dragging&&function(e,t){let i=e.state.facet(ri);return i.length?i[0](t):Rt.mac?!t.altKey:!t.ctrlKey}(e,t)?{from:r.dragging.from,to:r.dragging.to}:null,a={from:s,insert:i},l=e.state.changes(o?[o,a]:a);e.focus(),e.dispatch({changes:l,selection:{anchor:l.mapPos(s,-1),head:l.mapPos(s,1)},userEvent:o?"move.drop":"input.drop"})}wn.dragstart=(e,t)=>{let{selection:{main:i}}=e.state,{mouseSelection:n}=e.inputState;return n&&(n.dragging=i),t.dataTransfer&&(t.dataTransfer.setData("Text",e.state.sliceDoc(i.from,i.to)),t.dataTransfer.effectAllowed="copyMove"),!1},wn.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let i=t.dataTransfer.files;if(i&&i.length){let n=Array(i.length),s=0,r=()=>{++s==i.length&&Ln(e,t,n.filter((e=>null!=e)).join(e.state.lineBreak),!1)};for(let e=0;e{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(n[e]=t.result),r()},t.readAsText(i[e])}return!0}{let i=t.dataTransfer.getData("Text");if(i)return Ln(e,t,i,!0),!0}return!1},wn.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let i=Sn?null:t.clipboardData;return i?(kn(e,i.getData("text/plain")||i.getData("text/uri-text")),!0):(function(e){let t=e.dom.parentNode;if(!t)return;let i=t.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus(),setTimeout((()=>{e.focus(),i.remove(),kn(e,i.value)}),50)}(e),!1)};let Nn=null;wn.copy=wn.cut=(e,t)=>{let{text:i,ranges:n,linewise:s}=function(e){let t=[],i=[],n=!1;for(let n of e.selection.ranges)n.empty||(t.push(e.sliceDoc(n.from,n.to)),i.push(n));if(!t.length){let s=-1;for(let{from:n}of e.selection.ranges){let r=e.doc.lineAt(n);r.number>s&&(t.push(r.text),i.push({from:r.from,to:Math.min(e.doc.length,r.to+1)})),s=r.number}n=!0}return{text:t.join(e.lineBreak),ranges:i,linewise:n}}(e.state);if(!i&&!s)return!1;Nn=s?i:null,"cut"!=t.type||e.state.readOnly||e.dispatch({changes:n,scrollIntoView:!0,userEvent:"delete.cut"});let r=Sn?null:t.clipboardData;return r?(r.clearData(),r.setData("text/plain",i),!0):(function(e,t){let i=e.dom.parentNode;if(!i)return;let n=i.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=t,n.focus(),n.selectionEnd=t.length,n.selectionStart=0,setTimeout((()=>{n.remove(),e.focus()}),50)}(e,i),!1)};const Bn=se.define();function $n(e,t){let i=[];for(let n of e.facet(ci)){let s=n(e,t);s&&i.push(s)}return i?e.update({effects:i,annotations:Bn.of(!0)}):null}function Qn(e){setTimeout((()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let i=$n(e.state,t);i?e.dispatch(i):e.update([])}}),10)}xn.focus=e=>{e.inputState.lastFocusTime=Date.now(),e.scrollDOM.scrollTop||!e.inputState.lastScrollTop&&!e.inputState.lastScrollLeft||(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),Qn(e)},xn.blur=e=>{e.observer.clearSelectionRange(),Qn(e)},xn.compositionstart=xn.compositionupdate=e=>{null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0)},xn.compositionend=e=>{e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,Rt.chrome&&Rt.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then((()=>e.observer.flush())):setTimeout((()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])}),50)},xn.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},wn.beforeinput=(e,t)=>{var i;let n;if(Rt.chrome&&Rt.android&&(n=vn.find((e=>e.inputType==t.inputType)))&&(e.observer.delayAndroidKey(n.key,n.keyCode),"Backspace"==n.key||"Delete"==n.key)){let t=(null===(i=window.visualViewport)||void 0===i?void 0:i.height)||0;setTimeout((()=>{var i;((null===(i=window.visualViewport)||void 0===i?void 0:i.height)||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())}),100)}return!1};const zn=new Set,jn=["pre-wrap","normal","pre-line","break-spaces"];class Wn{constructor(t){this.lineWrapping=t,this.doc=e.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,t){let i=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((t-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return jn.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let i=0;i-1,a=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=o;if(this.lineWrapping=o,this.lineHeight=t,this.charWidth=i,this.textHeight=n,this.lineLength=s,a){this.heightSamples={};for(let e=0;e0}set outdated(e){this.flags=(e?2:0)|-3&this.flags}setHeight(e,t){this.height!=t&&(Math.abs(this.height-t)>Hn&&(e.heightChanged=!0),this.height=t)}replace(e,t,i){return Xn.of(i)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,i,n){let s=this,r=i.doc;for(let o=n.length-1;o>=0;o--){let{fromA:a,toA:l,fromB:h,toB:c}=n[o],d=s.lineAt(a,Fn.ByPosNoHeight,i.setDoc(t),0,0),u=d.to>=l?d:s.lineAt(l,Fn.ByPosNoHeight,i,0,0);for(c+=u.to-l,l=u.to;o>0&&d.from<=n[o-1].toA;)a=n[o-1].fromA,h=n[o-1].fromB,o--,a2*s){let s=e[t-1];s.break?e.splice(--t,1,s.left,null,s.right):e.splice(--t,1,s.left,s.right),i+=1+s.break,n-=s.size}else{if(!(s>2*n))break;{let t=e[i];t.break?e.splice(i,1,t.left,null,t.right):e.splice(i,1,t.left,t.right),i+=2+t.break,s-=t.size}}else if(n=s&&r(this.blockAt(0,i,n,s))}updateHeight(e,t=0,i=!1,n){return n&&n.from<=t&&n.more&&this.setHeight(e,n.heights[n.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Gn extends Yn{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,i,n){return new Un(n,this.length,i,this.height,this.breaks)}replace(e,t,i){let n=i[0];return 1==i.length&&(n instanceof Gn||n instanceof Zn&&4&n.flags)&&Math.abs(this.length-n.length)<10?(n instanceof Zn?n=new Gn(n.length,this.height):n.height=this.height,this.outdated||(n.outdated=!1),n):Xn.of(i)}updateHeight(e,t=0,i=!1,n){return n&&n.from<=t&&n.more?this.setHeight(e,n.heights[n.index++]):(i||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Zn extends Xn{constructor(e){super(e,0)}heightMetrics(e,t){let i,n=e.doc.lineAt(t).number,s=e.doc.lineAt(t+this.length).number,r=s-n+1,o=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*r);i=t/r,this.length>r+1&&(o=(this.height-t)/(this.length-r-1))}else i=this.height/r;return{firstLine:n,lastLine:s,perLine:i,perChar:o}}blockAt(e,t,i,n){let{firstLine:s,lastLine:r,perLine:o,perChar:a}=this.heightMetrics(t,n);if(t.lineWrapping){let s=n+Math.round(Math.max(0,Math.min(1,(e-i)/this.height))*this.length),r=t.doc.lineAt(s),l=o+r.length*a,h=Math.max(i,e-l/2);return new Un(r.from,r.length,h,l,0)}{let n=Math.max(0,Math.min(r-s,Math.floor((e-i)/o))),{from:a,length:l}=t.doc.line(s+n);return new Un(a,l,i+o*n,o,0)}}lineAt(e,t,i,n,s){if(t==Fn.ByHeight)return this.blockAt(e,i,n,s);if(t==Fn.ByPosNoHeight){let{from:t,to:n}=i.doc.lineAt(e);return new Un(t,n-t,0,0,0)}let{firstLine:r,perLine:o,perChar:a}=this.heightMetrics(i,s),l=i.doc.lineAt(e),h=o+l.length*a,c=l.number-r,d=n+o*c+a*(l.from-s-c);return new Un(l.from,l.length,Math.max(n,Math.min(d,n+this.height-h)),h,0)}forEachLine(e,t,i,n,s,r){e=Math.max(e,s),t=Math.min(t,s+this.length);let{firstLine:o,perLine:a,perChar:l}=this.heightMetrics(i,s);for(let h=e,c=n;h<=t;){let t=i.doc.lineAt(h);if(h==e){let i=t.number-o;c+=a*i+l*(e-s-i)}let n=a+l*t.length;r(new Un(t.from,t.length,c,n,0)),c+=n,h=t.to+1}}replace(e,t,i){let n=this.length-t;if(n>0){let e=i[i.length-1];e instanceof Zn?i[i.length-1]=new Zn(e.length+n):i.push(null,new Zn(n-1))}if(e>0){let t=i[0];t instanceof Zn?i[0]=new Zn(e+t.length):i.unshift(new Zn(e-1),null)}return Xn.of(i)}decomposeLeft(e,t){t.push(new Zn(e-1),null)}decomposeRight(e,t){t.push(null,new Zn(this.length-e-1))}updateHeight(e,t=0,i=!1,n){let s=t+this.length;if(n&&n.from<=t+this.length&&n.more){let i=[],r=Math.max(t,n.from),o=-1;for(n.from>t&&i.push(new Zn(n.from-t-1).updateHeight(e,t));r<=s&&n.more;){let t=e.doc.lineAt(r).length;i.length&&i.push(null);let s=n.heights[n.index++];-1==o?o=s:Math.abs(s-o)>=Hn&&(o=-2);let a=new Gn(t,s);a.outdated=!1,i.push(a),r+=t+1}r<=s&&i.push(null,new Zn(s-r).updateHeight(e,r));let a=Xn.of(i);return(o<0||Math.abs(a.height-this.height)>=Hn||Math.abs(o-this.heightMetrics(e,t).perLine)>=Hn)&&(e.heightChanged=!0),a}return(i||this.outdated)&&(this.setHeight(e,e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class Kn extends Xn{constructor(e,t,i){super(e.length+t+i.length,e.height+i.height,t|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return 1&this.flags}blockAt(e,t,i,n){let s=i+this.left.height;return eo))return l;let h=t==Fn.ByPosNoHeight?Fn.ByPosNoHeight:Fn.ByPos;return a?l.join(this.right.lineAt(o,h,i,r,o)):this.left.lineAt(o,h,i,n,s).join(l)}forEachLine(e,t,i,n,s,r){let o=n+this.left.height,a=s+this.left.length+this.break;if(this.break)e=a&&this.right.forEachLine(e,t,i,o,a,r);else{let l=this.lineAt(a,Fn.ByPos,i,n,s);e=e&&l.from<=t&&r(l),t>l.to&&this.right.forEachLine(l.to+1,t,i,o,a,r)}}replace(e,t,i){let n=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-n,t-n,i));let s=[];e>0&&this.decomposeLeft(e,s);let r=s.length;for(let e of i)s.push(e);if(e>0&&Jn(s,r-1),t=i&&t.push(null)),e>i&&this.right.decomposeLeft(e-i,t)}decomposeRight(e,t){let i=this.left.length,n=i+this.break;if(e>=n)return this.right.decomposeRight(e-n,t);e2*t.size||t.size>2*e.size?Xn.of(this.break?[e,null,t]:[e,t]):(this.left=e,this.right=t,this.height=e.height+t.height,this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,i=!1,n){let{left:s,right:r}=this,o=t+s.length+this.break,a=null;return n&&n.from<=t+s.length&&n.more?a=s=s.updateHeight(e,t,i,n):s.updateHeight(e,t,i),n&&n.from<=o+r.length&&n.more?a=r=r.updateHeight(e,o,i,n):r.updateHeight(e,o,i),a?this.balanced(s,r):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Jn(e,t){let i,n;null==e[t]&&(i=e[t-1])instanceof Zn&&(n=e[t+1])instanceof Zn&&e.splice(t-1,3,new Zn(i.length+1+n.length))}class es{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Gn?i.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new Gn(e-this.pos,-1)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,i){if(e=5)&&this.addLineDeco(n,s,r)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new Gn(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let i=new Zn(t-e);return this.oracle.doc.lineAt(e).to==t&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Gn)return e;let t=new Gn(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,i){let n=this.ensureLine();n.length+=i,n.collapsed+=i,n.widgetHeight=Math.max(n.widgetHeight,e),n.breaks+=t,this.writtenTo=this.pos=this.pos+i}finish(e){let t=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof Gn||this.isCovered?(this.writtenToi.clientHeight||i.scrollWidth>i.clientWidth)&&"visible"!=n.overflow){let n=i.getBoundingClientRect();r=Math.max(r,n.left),o=Math.min(o,n.right),a=Math.max(a,n.top),l=t==e.parentNode?n.bottom:Math.min(l,n.bottom)}t="absolute"==n.position||"fixed"==n.position?i.offsetParent:i.parentNode}else{if(11!=t.nodeType)break;t=t.host}return{left:r-i.left,right:Math.max(r,o)-i.left,top:a-(i.top+t),bottom:Math.max(a,l)-(i.top+t)}}function ns(e,t){let i=e.getBoundingClientRect();return{left:0,right:i.right-i.left,top:t,bottom:i.bottom-(i.top+t)}}class ss{constructor(e,t,i){this.from=e,this.to=t,this.size=i}static same(e,t){if(e.length!=t.length)return!1;for(let i=0;i"function"!=typeof e&&"cm-lineWrapping"==e.class));this.heightOracle=new Wn(i),this.stateDeco=t.facet(xi).filter((e=>"function"!=typeof e)),this.heightMap=Xn.empty().applyChanges(this.stateDeco,e.empty,this.heightOracle.setDoc(t.doc),[new Ei(0,0,0,t.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Yt.set(this.lineGaps.map((e=>e.draw(this,!1)))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let i=0;i<=1;i++){let n=i?t.head:t.anchor;if(!e.some((({from:e,to:t})=>n>=e&&n<=t))){let{from:t,to:i}=this.lineBlockAt(n);e.push(new as(t,i))}}this.viewports=e.sort(((e,t)=>e.from-t.from)),this.scaler=this.heightMap.height<=7e6?ds:new us(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,(e=>{this.viewportLines.push(1==this.scaler.scale?e:ps(e,this.scaler))}))}update(e,t=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(xi).filter((e=>"function"!=typeof e));let n=e.changedRanges,s=Ei.extendWithRanges(n,function(e,t,i){let n=new ts;return Se.compare(e,t,i,n,0),n.changes}(i,this.stateDeco,e?e.changes:S.empty(this.state.doc.length))),r=this.heightMap.height,o=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),this.heightMap.height!=r&&(e.flags|=2),o?(this.scrollAnchorPos=e.changes.mapPos(o.from,-1),this.scrollAnchorHeight=o.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,t));let l=!e.changes.empty||2&e.flags||a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,this.updateForViewport(),l&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(ui)&&(this.mustEnforceCursorAssoc=!0)}measure(t){let i=t.contentDOM,n=window.getComputedStyle(i),s=this.heightOracle,r=n.whiteSpace;this.defaultTextDirection="rtl"==n.direction?Ri.RTL:Ri.LTR;let o=this.heightOracle.mustRefreshForWrapping(r),a=i.getBoundingClientRect(),l=o||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let h=0,c=0;if(a.width&&a.height){let e=a.width/i.offsetWidth,t=a.height/i.offsetHeight;(e>.995&&e<1.005||!isFinite(e)||Math.abs(a.width-i.offsetWidth)<1)&&(e=1),(t>.995&&t<1.005||!isFinite(t)||Math.abs(a.height-i.offsetHeight)<1)&&(t=1),this.scaleX==e&&this.scaleY==t||(this.scaleX=e,this.scaleY=t,h|=8,o=l=!0)}let d=(parseInt(n.paddingTop)||0)*this.scaleY,u=(parseInt(n.paddingBottom)||0)*this.scaleY;this.paddingTop==d&&this.paddingBottom==u||(this.paddingTop=d,this.paddingBottom=u,h|=10),this.editorWidth!=t.scrollDOM.clientWidth&&(s.lineWrapping&&(l=!0),this.editorWidth=t.scrollDOM.clientWidth,h|=8);let p=t.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=p&&(this.scrollAnchorHeight=-1,this.scrollTop=p),this.scrolledToBottom=pt(t.scrollDOM);let f=(this.printing?ns:is)(i,this.paddingTop),m=f.top-this.pixelViewport.top,g=f.bottom-this.pixelViewport.bottom;this.pixelViewport=f;let v=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(v!=this.inView&&(this.inView=v,v&&(l=!0)),!this.inView&&!this.scrollTarget)return 0;let O=a.width;if(this.contentDOMWidth==O&&this.editorHeight==t.scrollDOM.clientHeight||(this.contentDOMWidth=a.width,this.editorHeight=t.scrollDOM.clientHeight,h|=8),l){let i=t.docView.measureVisibleLineHeights(this.viewport);if(s.mustRefreshForHeights(i)&&(o=!0),o||s.lineWrapping&&Math.abs(O-this.contentDOMWidth)>s.charWidth){let{lineHeight:e,charWidth:n,textHeight:a}=t.docView.measureTextSize();o=e>0&&s.refresh(r,e,n,a,O/n,i),o&&(t.docView.minWidth=0,h|=8)}m>0&&g>0?c=Math.max(m,g):m<0&&g<0&&(c=Math.min(m,g)),s.heightChanged=!1;for(let n of this.viewports){let r=n.from==this.viewport.from?i:t.docView.measureVisibleLineHeights(n);this.heightMap=(o?Xn.empty().applyChanges(this.stateDeco,e.empty,this.heightOracle,[new Ei(0,0,0,t.state.doc.length)]):this.heightMap).updateHeight(s,0,o,new Vn(n.from,r))}s.heightChanged&&(h|=2)}let b=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return b&&(this.viewport=this.getViewport(c,this.scrollTarget)),this.updateForViewport(),(2&h||b)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,t)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),n=this.heightMap,s=this.heightOracle,{visibleTop:r,visibleBottom:o}=this,a=new as(n.lineAt(r-1e3*i,Fn.ByHeight,s,0,0).from,n.lineAt(o+1e3*(1-i),Fn.ByHeight,s,0,0).to);if(t){let{head:e}=t.range;if(ea.to){let i,r=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),o=n.lineAt(e,Fn.ByPos,s,0,0);i="center"==t.y?(o.top+o.bottom)/2-r/2:"start"==t.y||"nearest"==t.y&&e=o+Math.max(10,Math.min(i,250)))&&n>r-2e3&&s>1,r=n<<1;if(this.defaultTextDirection!=Ri.LTR&&!i)return[];let o=[],a=(n,r,l,h)=>{if(r-nn&&ee.from>=l.from&&e.to<=l.to&&Math.abs(e.from-n)e.fromt))));if(!u){if(re.from<=r&&e.to>=r))){let e=t.moveToLineBoundary(R.cursor(r),!1,!0).head;e>n&&(r=e)}u=new ss(n,r,this.gapSize(l,n,r,h))}o.push(u)};for(let e of this.viewportLines){if(e.lengthe.from&&a(e.from,s,e,t),oe.draw(this,this.heightOracle.lineWrapping)))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];Se.spans(e,this.viewport.from,this.viewport.to,{span(e,i){t.push({from:e,to:i})},point(){}},20);let i=t.length!=this.visibleRanges.length||this.visibleRanges.some(((e,i)=>e.from!=t[i].from||e.to!=t[i].to));return this.visibleRanges=t,i?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find((t=>t.from<=e&&t.to>=e))||ps(this.heightMap.lineAt(e,Fn.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return ps(this.heightMap.lineAt(this.scaler.fromDOM(e),Fn.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return ps(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class as{constructor(e,t){this.from=e,this.to=t}}function ls(e,t,i){let n=[],s=e,r=0;return Se.spans(i,e,t,{span(){},point(e,t){e>s&&(n.push({from:s,to:e}),r+=e-s),s=t}},20),s=1)return t[t.length-1].to;let n=Math.floor(e*i);for(let e=0;;e++){let{from:i,to:s}=t[e],r=s-i;if(n<=r)return i+n;n-=r}}function cs(e,t){let i=0;for(let{from:n,to:s}of e.ranges){if(t<=s){i+=t-n;break}i+=s-n}return i/e.total}const ds={toDOM:e=>e,fromDOM:e=>e,scale:1};class us{constructor(e,t,i){let n=0,s=0,r=0;this.viewports=i.map((({from:i,to:s})=>{let r=t.lineAt(i,Fn.ByPos,e,0,0).top,o=t.lineAt(s,Fn.ByPos,e,0,0).bottom;return n+=o-r,{from:i,to:s,top:r,bottom:o,domTop:0,domBottom:0}})),this.scale=(7e6-n)/(t.height-n);for(let e of this.viewports)e.domTop=r+(e.top-s)*this.scale,r=e.domBottom=e.domTop+(e.bottom-e.top),s=e.bottom}toDOM(e){for(let t=0,i=0,n=0;;t++){let s=tps(e,t))):e._content)}const fs=q.define({combine:e=>e.join(" ")}),ms=q.define({combine:e=>e.indexOf(!0)>-1}),gs=ze.newName(),vs=ze.newName(),Os=ze.newName(),bs={"&light":"."+vs,"&dark":"."+Os};function _s(e,t,i){return new ze(t,{finish:t=>/&/.test(t)?t.replace(/&\w*/,(t=>{if("&"==t)return e;if(!i||!i[t])throw new RangeError(`Unsupported selector: ${t}`);return i[t]})):e+" "+t})}const ys=_s("."+gs,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},bs),ws="￿";class xs{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(Oe.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=ws}readRange(e,t){if(!e)return this;let i=e.parentNode;for(let n=e;;){this.findPointBefore(i,n);let e=this.text.length;this.readNode(n);let s=n.nextSibling;if(s==t)break;let r=gt.get(n),o=gt.get(s);(r&&o?r.breakAfter:(r?r.breakAfter:ks(n))||ks(s)&&("BR"!=n.nodeName||n.cmIgnore)&&this.text.length>e)&&this.lineBreak(),n=s}return this.findPointBefore(i,t),this}readTextNode(e){let t=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,t.length));for(let i=0,n=this.lineSeparator?null:/\r\n?|\n/g;;){let s,r=-1,o=1;if(this.lineSeparator?(r=t.indexOf(this.lineSeparator,i),o=this.lineSeparator.length):(s=n.exec(t))&&(r=s.index,o=s[0].length),this.append(t.slice(i,r<0?t.length:r)),r<0)break;if(this.lineBreak(),o>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=o-1);i=r+o}}readNode(e){if(e.cmIgnore)return;let t=gt.get(e),i=t&&t.overrideDOMText;if(null!=i){this.findPointInside(e,i.length);for(let e=i.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else 3==e.nodeType?this.readTextNode(e):"BR"==e.nodeName?e.nextSibling&&this.lineBreak():1==e.nodeType&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==t&&(i.pos=this.text.length)}findPointInside(e,t){for(let i of this.points)(3==e.nodeType?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(Ss(e,i.node,i.offset)?t:0))}}function Ss(e,t,i){for(;;){if(!t||i-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,i,0))){let t=s||r?[]:function(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:i,anchorOffset:n,focusNode:s,focusOffset:r}=e.observer.selectionRange;return i&&(t.push(new Ts(i,n)),s==i&&r==n||t.push(new Ts(s,r))),t}(e),i=new xs(t,e.state);i.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=i.text,this.newSel=function(e,t){if(0==e.length)return null;let i=e[0].pos,n=2==e.length?e[1].pos:i;return i>-1&&n>-1?R.single(i+t,n+t):null}(t,this.bounds.from)}else{let t=e.observer.selectionRange,i=s&&s.node==t.focusNode&&s.offset==t.focusOffset||!Ze(e.contentDOM,t.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),n=r&&r.node==t.anchorNode&&r.offset==t.anchorOffset||!Ze(e.contentDOM,t.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset);this.newSel=R.single(n,i)}}}function Ps(t,i){let n,{newSel:s}=i,r=t.state.selection.main,o=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(i.bounds){let{from:s,to:a}=i.bounds,l=r.from,h=null;(8===o||Rt.android&&i.text.length0&&a>0&&e.charCodeAt(o-1)==t.charCodeAt(a-1);)o--,a--;return"end"==n&&(i-=o+Math.max(0,r-Math.min(o,a))-r),o=o?r-i:0,a=r+(a-o),o=r):a=a?r-i:0,o=r+(o-a),a=r),{from:r,toA:o,toB:a}}(t.state.doc.sliceString(s,a,ws),i.text,l-s,h);c&&(Rt.chrome&&13==o&&c.toB==c.from+2&&i.text.slice(c.from,c.toB)==ws+ws&&c.toB--,n={from:s+c.from,to:s+c.toA,insert:e.of(i.text.slice(c.from,c.toB).split(ws))})}else s&&(!t.hasFocus&&t.state.facet(gi)||s.main.eq(r))&&(s=null);if(!n&&!s)return!1;if(!n&&i.typeOver&&!r.empty&&s&&s.main.empty?n={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,r.to)}:n&&n.from>=r.from&&n.to<=r.to&&(n.from!=r.from||n.to!=r.to)&&r.to-r.from-(n.to-n.from)<=4?n={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,r.to))}:(Rt.mac||Rt.android)&&n&&n.from==n.to&&n.from==r.head-1&&/^\. ?$/.test(n.insert.toString())&&"off"==t.contentDOM.getAttribute("autocorrect")?(s&&2==n.insert.length&&(s=R.single(s.main.anchor-1,s.main.head-1)),n={from:r.from,to:r.to,insert:e.of([" "])}):Rt.chrome&&n&&n.from==n.to&&n.from==r.head&&"\n "==n.insert.toString()&&t.lineWrapping&&(s&&(s=R.single(s.main.anchor-1,s.main.head-1)),n={from:r.from,to:r.to,insert:e.of([" "])}),n){if(Rt.ios&&t.inputState.flushIOSKey())return!0;if(Rt.android&&(n.from==r.from&&n.to==r.to&&1==n.insert.length&&2==n.insert.lines&&dt(t.contentDOM,"Enter",13)||(n.from==r.from-1&&n.to==r.to&&0==n.insert.length||8==o&&n.insert.lengthr.head)&&dt(t.contentDOM,"Backspace",8)||n.from==r.from&&n.to==r.to+1&&0==n.insert.length&&dt(t.contentDOM,"Delete",46)))return!0;let e,i=n.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let a=()=>e||(e=function(e,t,i){let n,s=e.state,r=s.selection.main;if(t.from>=r.from&&t.to<=r.to&&t.to-t.from>=(r.to-r.from)/3&&(!i||i.main.empty&&i.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let i=r.fromt.to?s.sliceDoc(t.to,r.to):"";n=s.replaceSelection(e.state.toText(i+t.insert.sliceString(0,void 0,e.state.lineBreak)+o))}else{let o=s.changes(t),a=i&&i.main.to<=o.newLength?i.main:void 0;if(s.selection.ranges.length>1&&e.inputState.composing>=0&&t.to<=r.to&&t.to>=r.to-10){let l,h=e.state.sliceDoc(t.from,t.to),c=i&&Zi(e,i.main.head);if(c){let e=t.insert.length-(t.to-t.from);l={from:c.from,to:c.to-e}}else l=e.state.doc.lineAt(r.head);let d=r.to-t.to,u=r.to-r.from;n=s.changeByRange((i=>{if(i.from==r.from&&i.to==r.to)return{changes:o,range:a||i.map(o)};let n=i.to-d,c=n-h.length;if(i.to-i.from!=u||e.state.sliceDoc(c,n)!=h||i.to>=l.from&&i.from<=l.to)return{range:i};let p=s.changes({from:c,to:n,insert:t.insert}),f=i.to-r.to;return{changes:p,range:a?R.range(Math.max(0,a.anchor+f),Math.max(0,a.head+f)):i.map(p)}}))}else n={changes:o,selection:a&&s.selection.replaceRange(a)}}let o="input.type";return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,o+=".compose",e.inputState.compositionFirstChange&&(o+=".start",e.inputState.compositionFirstChange=!1)),s.update(n,{userEvent:o,scrollIntoView:!0})}(t,n,s));return t.state.facet(hi).some((e=>e(t,n.from,n.to,i,a)))||t.dispatch(a()),!0}if(s&&!s.main.eq(r)){let e=!1,i="select";return t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&(e=!0),i=t.inputState.lastSelectionOrigin),t.dispatch({selection:s,scrollIntoView:e,userEvent:i}),!0}return!1}const Ms={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Es=Rt.ie&&Rt.ie_version<=11;class As{constructor(e){this.view=e,this.active=!1,this.selectionRange=new ot,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver((t=>{for(let e of t)this.queue.push(e);(Rt.ie&&Rt.ie_version<=11||Rt.ios&&e.composing)&&t.some((e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length))?this.flushSoon():this.flush()})),Es&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver((()=>{var e;(null===(e=this.view.docView)||void 0===e?void 0:e.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))}),{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout((()=>{this.resizeTimeout=-1,this.view.requestMeasure()}),50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout((()=>{this.view.viewState.printing=!1,this.view.requestMeasure()}),500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some(((t,i)=>t!=e[i])))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,n=this.selectionRange;if(i.state.facet(gi)?i.root.activeElement!=this.dom:!Ke(i.dom,n))return;let s=n.anchorNode&&i.docView.nearest(n.anchorNode);s&&s.ignoreEvent(e)?t||(this.selectionChanged=!1):(Rt.ie&&Rt.ie_version<=11||Rt.android&&Rt.chrome)&&!i.state.selection.main.empty&&n.focusNode&&et(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Rt.safari&&11==e.root.nodeType&&function(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom&&function(e){let t=null;function i(e){e.preventDefault(),e.stopImmediatePropagation(),t=e.getTargetRanges()[0]}if(e.contentDOM.addEventListener("beforeinput",i,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",i,!0),!t)return null;let n=t.startContainer,s=t.startOffset,r=t.endContainer,o=t.endOffset,a=e.docView.domAtPos(e.state.selection.main.anchor);return et(a.node,a.offset,r,o)&&([n,s,r,o]=[r,o,n,s]),{anchorNode:n,anchorOffset:s,focusNode:r,focusOffset:o}}(this.view)||Ge(e.root);if(!t||this.selectionRange.eq(t))return!1;let i=Ke(this.dom,t);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let e=this.delayedAndroidKey;e&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&dt(this.dom,e.key,e.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}this.delayedAndroidKey&&"Enter"!=e||(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()})))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,i=-1,n=!1;for(let s of e){let e=this.readMutation(s);e&&(e.typeOver&&(n=!0),-1==t?({from:t,to:i}=e):(t=Math.min(e.from,t),i=Math.max(e.to,i)))}return{from:t,to:i,typeOver:n}}readChange(){let{from:e,to:t,typeOver:i}=this.processRecords(),n=this.selectionChanged&&Ke(this.dom,this.selectionRange);if(e<0&&!n)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new Cs(this.view,e,t,i);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let i=this.view.state,n=Ps(this.view,t);return this.view.state==i&&this.view.update([]),n}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty("attributes"==e.type),"attributes"==e.type&&(t.flags|=4),"childList"==e.type){let i=Rs(t,e.previousSibling||e.target.previousSibling,-1),n=Rs(t,e.nextSibling||e.target.nextSibling,1);return{from:i?t.posAfter(i):t.posAtStart,to:n?t.posBefore(n):t.posAtEnd,typeOver:!1}}return"characterData"==e.type?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,t,i;this.stop(),null===(e=this.intersection)||void 0===e||e.disconnect(),null===(t=this.gapIntersection)||void 0===t||t.disconnect(),null===(i=this.resizeScroll)||void 0===i||i.disconnect();for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function Rs(e,t,i){for(;t;){let n=gt.get(t);if(n&&n.parent==e)return n;let s=t.parentNode;t=s!=e.dom?s:i>0?t.nextSibling:t.previousSibling}return null}class Ds{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM);let{dispatch:t}=e;this.dispatchTransactions=e.dispatchTransactions||t&&(e=>e.forEach((e=>t(e,this))))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||function(e){for(;e;){if(e&&(9==e.nodeType||11==e.nodeType&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}(e.parent)||document,this.viewState=new os(e.state||Oe.create(e)),this.plugins=this.state.facet(Oi).map((e=>new _i(e)));for(let e of this.plugins)e.update(this);this.observer=new As(this),this.inputState=new fn(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Yi(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}dispatch(...e){let t=1==e.length&&e[0]instanceof le?e:1==e.length&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t,i=!1,n=!1,s=this.state;for(let t of e){if(t.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=t.state}if(this.destroyed)return void(this.viewState.state=s);let r=this.hasFocus,o=0,a=null;e.some((e=>e.annotation(Bn)))?(this.inputState.notifiedFocused=r,o=1):r!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=r,a=$n(s,r),a||(o=1));let l=this.observer.delayedAndroidKey,h=null;if(l?(this.observer.clearDelayedAndroidKey(),h=this.observer.readChange(),(h&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(h=null)):this.observer.clear(),s.facet(Oe.phrases)!=this.state.facet(Oe.phrases))return this.setState(s);t=Ai.create(this,s,e),t.flags|=o;let c=this.viewState.scrollTarget;try{this.updateState=2;for(let t of e){if(c&&(c=c.map(t.changes)),t.scrollIntoView){let{main:e}=t.state.selection;c=new pi(e.empty?e:R.cursor(e.head,e.head>e.anchor?-1:1))}for(let e of t.effects)e.is(fi)&&(c=e.value)}this.viewState.update(t,c),this.bidiCache=Ls.update(this.bidiCache,t.changes),t.empty||(this.updatePlugins(t),this.inputState.update(t)),i=this.docView.update(t),this.state.facet(Mi)!=this.styleModules&&this.mountStyles(),n=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(i,e.some((e=>e.isUserEvent("select.pointer"))))}finally{this.updateState=0}if(t.startState.facet(fs)!=t.state.facet(fs)&&(this.viewState.mustMeasureContent=!0),(i||n||c||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!t.empty)for(let e of this.state.facet(li))e(t);(a||h)&&Promise.resolve().then((()=>{a&&this.state==a.startState&&this.dispatch(a),h&&!Ps(this,h)&&l.force&&dt(this.contentDOM,l.key,l.keyCode)}))}setState(e){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=e);this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new os(e),this.plugins=e.facet(Oi).map((e=>new _i(e))),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView=new Yi(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Oi),i=e.state.facet(Oi);if(t!=i){let n=[];for(let s of i){let i=t.indexOf(s);if(i<0)n.push(new _i(s));else{let t=this.plugins[i];t.mustUpdate=e,n.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=n,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,i=this.scrollDOM,n=i.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:r}=this.viewState;Math.abs(n-this.viewState.scrollTop)>1&&(r=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(r<0)if(pt(i))s=-1,r=this.viewState.heightMap.height;else{let e=this.viewState.scrollAnchorAt(n);s=e.from,r=e.top}this.updateState=1;let o=this.viewState.measure(this);if(!o&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(e>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let a=[];4&o||([this.measureRequests,a]=[a,this.measureRequests]);let l=a.map((e=>{try{return e.read(this)}catch(e){return mi(this.state,e),qs}})),h=Ai.create(this,this.state,[]),c=!1;h.flags|=o,t?t.flags|=o:t=h,this.updateState=2,h.empty||(this.updatePlugins(h),this.inputState.update(h),this.updateAttrs(),c=this.docView.update(h));for(let e=0;e1||e<-1){n+=e,i.scrollTop=n/this.scaleY,r=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(li))e(t)}get themeClasses(){return gs+" "+(this.state.facet(ms)?Os:vs)+" "+this.state.facet(fs)}updateAttrs(){let e=Ns(this,yi,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(gi)?"true":"false",class:"cm-content",style:`${Rt.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),Ns(this,wi,t);let i=this.observer.ignore((()=>{let i=Wt(this.contentDOM,this.contentAttrs,t),n=Wt(this.dom,this.editorAttrs,e);return i||n}));return this.editorAttrs=e,this.contentAttrs=t,i}showAnnouncements(e){let t=!0;for(let i of e)for(let e of i.effects)e.is(Ds.announce)&&(t&&(this.announceDOM.textContent=""),t=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=e.value)}mountStyles(){this.styleModules=this.state.facet(Mi);let e=this.state.facet(Ds.cspNonce);ze.mount(this.root,this.styleModules.concat(ys).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame((()=>this.measure()))),e){if(this.measureRequests.indexOf(e)>-1)return;if(null!=e.key)for(let t=0;tt.spec==e))||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,i){return pn(this,e,dn(this,e,t,i))}moveByGroup(e,t){return pn(this,e,dn(this,e,t,(t=>function(e,t,i){let n=e.state.charCategorizer(t),s=n(i);return e=>{let t=n(e);return s==me.Space&&(s=t),s==t}}(this,e.head,t))))}moveToLineBoundary(e,t,i=!0){return function(e,t,i,n){let s=cn(e,t.head),r=n&&s.type==Xt.Text&&(e.lineWrapping||s.widgetLineBreaks)?e.coordsAtPos(t.assoc<0&&t.head>s.from?t.head-1:t.head):null;if(r){let t=e.dom.getBoundingClientRect(),n=e.textDirectionAt(s.from),o=e.posAtCoords({x:i==(n==Ri.LTR)?t.right-1:t.left+1,y:(r.top+r.bottom)/2});if(null!=o)return R.cursor(o,i?-1:1)}return R.cursor(i?s.to:s.from,i?-1:1)}(this,e,t,i)}moveVertically(e,t,i){return pn(this,e,function(e,t,i,n){let s=t.head,r=i?1:-1;if(s==(i?e.state.doc.length:0))return R.cursor(s,t.assoc);let o,a=t.goalColumn,l=e.contentDOM.getBoundingClientRect(),h=e.coordsAtPos(s,t.assoc||-1),c=e.documentTop;if(h)null==a&&(a=h.left-l.left),o=r<0?h.top:h.bottom;else{let t=e.viewState.lineBlockAt(s);null==a&&(a=Math.min(l.right-l.left,e.defaultCharacterWidth*(s-t.from))),o=(r<0?t.top:t.bottom)+c}let d=l.left+a,u=null!=n?n:e.viewState.heightOracle.textHeight>>1;for(let t=0;;t+=10){let i=o+(u+t)*r,n=ln(e,{x:d,y:i},!1,r);if(il.bottom||(r<0?ns)){let t=e.docView.coordsForChar(n),s=!t||i0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(di)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Is)return Fi(e.length);let t,i=this.textDirectionAt(e.from);for(let n of this.bidiCache)if(n.from==e.from&&n.dir==i&&(n.fresh||ji(n.isolates,t=Ti(this,e.from,e.to))))return n.order;t||(t=Ti(this,e.from,e.to));let n=function(e,t,i){if(!e)return[new zi(0,0,t==Ii?1:0)];if(t==Di&&!i.length&&!Qi.test(e))return Fi(e.length);if(i.length)for(;e.length>Wi.length;)Wi[Wi.length]=256;let n=[],s=t==Di?0:1;return Ui(e,s,s,i,0,e.length,n),n}(e.text,i,t);return this.bidiCache.push(new Ls(e.from,e.to,i,t,!0,n)),n}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Rt.safari&&(null===(e=this.inputState)||void 0===e?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore((()=>{ht(this.contentDOM),this.docView.updateSelection()}))}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((9==e.nodeType?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return fi.of(new pi("number"==typeof e?R.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}static domEventHandlers(e){return bi.define((()=>({})),{eventHandlers:e})}static domEventObservers(e){return bi.define((()=>({})),{eventObservers:e})}static theme(e,t){let i=ze.newName(),n=[fs.of(i),Mi.of(_s(`.${i}`,e))];return t&&t.dark&&n.push(ms.of(!0)),n}static baseTheme(e){return V.lowest(Mi.of(_s("."+gs,e,bs)))}static findFromDOM(e){var t;let i=e.querySelector(".cm-content"),n=i&>.get(i)||gt.get(e);return(null===(t=null==n?void 0:n.rootView)||void 0===t?void 0:t.view)||null}}Ds.styleModule=Mi,Ds.inputHandler=hi,Ds.focusChangeEffect=ci,Ds.perLineTextDirection=di,Ds.exceptionSink=ai,Ds.updateListener=li,Ds.editable=gi,Ds.mouseSelectionStyle=oi,Ds.dragMovesSelection=ri,Ds.clickAddsSelectionRange=si,Ds.decorations=xi,Ds.atomicRanges=Si,Ds.bidiIsolatedRanges=ki,Ds.scrollMargins=Ci,Ds.darkTheme=ms,Ds.cspNonce=q.define({combine:e=>e.length?e[0]:""}),Ds.contentAttributes=wi,Ds.editorAttributes=yi,Ds.lineWrapping=Ds.contentAttributes.of({class:"cm-lineWrapping"}),Ds.announce=ae.define();const Is=4096,qs={};class Ls{constructor(e,t,i,n,s,r){this.from=e,this.to=t,this.dir=i,this.isolates=n,this.fresh=s,this.order=r}static update(e,t){if(t.empty&&!e.some((e=>e.fresh)))return e;let i=[],n=e.length?e[e.length-1].dir:Ri.LTR;for(let s=Math.max(0,e.length-10);s=0;s--){let t=n[s],r="function"==typeof t?t(e):t;r&&Qt(r,i)}return i}const Bs=Rt.mac?"mac":Rt.windows?"win":Rt.linux?"linux":"key";function $s(e,t,i){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==i&&t.shiftKey&&(e="Shift-"+e),e}const Qs=V.default(Ds.domEventHandlers({keydown:(e,t)=>Fs(Ws(t.state),e,t,"editor")})),zs=q.define({enables:Qs}),js=new WeakMap;function Ws(e){let t=e.facet(zs),i=js.get(t);return i||js.set(t,i=function(e,t=Bs){let i=Object.create(null),n=Object.create(null),s=(e,t)=>{let i=n[e];if(null==i)n[e]=t;else if(i!=t)throw new Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},r=(e,n,r,o,a)=>{var l,h;let c=i[e]||(i[e]=Object.create(null)),d=n.split(/ (?!$)/).map((e=>function(e,t){const i=e.split(/-(?!$)/);let n,s,r,o,a=i[i.length-1];"Space"==a&&(a=" ");for(let e=0;e{let n=Vs={view:t,prefix:i,scope:e};return setTimeout((()=>{Vs==n&&(Vs=null)}),Us),!0}]})}let u=d.join(" ");s(u,!1);let p=c[u]||(c[u]={preventDefault:!1,stopPropagation:!1,run:(null===(h=null===(l=c._any)||void 0===l?void 0:l.run)||void 0===h?void 0:h.slice())||[]});r&&p.run.push(r),o&&(p.preventDefault=!0),a&&(p.stopPropagation=!0)};for(let n of e){let e=n.scope?n.scope.split(" "):["editor"];if(n.any)for(let t of e){let e=i[t]||(i[t]=Object.create(null));e._any||(e._any={preventDefault:!1,stopPropagation:!1,run:[]});for(let t in e)e[t].run.push(n.any)}let s=n[t]||n.key;if(s)for(let t of e)r(t,s,n.run,n.preventDefault,n.stopPropagation),n.shift&&r(t,"Shift-"+s,n.shift,n.preventDefault,n.stopPropagation)}return i}(t.reduce(((e,t)=>e.concat(t)),[]))),i}let Vs=null;const Us=4e3;function Fs(e,t,i,n){let s=function(e){var t=!(Fe&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||He&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?Ue:Ve)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(t),r=_(O(s,0))==s.length&&" "!=s,o="",a=!1,l=!1,h=!1;Vs&&Vs.view==i&&Vs.scope==n&&(o=Vs.prefix+" ",bn.indexOf(t.keyCode)<0&&(l=!0,Vs=null));let c,d,u=new Set,p=e=>{if(e){for(let n of e.run)if(!u.has(n)&&(u.add(n),n(i,t)))return e.stopPropagation&&(h=!0),!0;e.preventDefault&&(e.stopPropagation&&(h=!0),l=!0)}return!1},f=e[n];return f&&(p(f[o+$s(s,t,!r)])?a=!0:r&&(t.altKey||t.metaKey||t.ctrlKey)&&!(Rt.windows&&t.ctrlKey&&t.altKey)&&(c=Ve[t.keyCode])&&c!=s?(p(f[o+$s(c,t,!0)])||t.shiftKey&&(d=Ue[t.keyCode])!=s&&d!=c&&p(f[o+$s(d,t,!1)]))&&(a=!0):r&&t.shiftKey&&p(f[o+$s(s,t,!0)])&&(a=!0),!a&&p(f._any)&&(a=!0)),l&&(a=!0),a&&h&&t.stopPropagation(),a}class Hs{constructor(e,t,i,n,s){this.className=e,this.left=t,this.top=i,this.width=n,this.height=s}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className==this.className&&(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",null!=this.width&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,i){if(i.empty){let n=e.coordsAtPos(i.head,i.assoc||1);if(!n)return[];let s=Xs(e);return[new Hs(t,n.left-s.left,n.top-s.top,null,n.bottom-n.top)]}return function(e,t,i){if(i.to<=e.viewport.from||i.from>=e.viewport.to)return[];let n=Math.max(i.from,e.viewport.from),s=Math.min(i.to,e.viewport.to),r=e.textDirection==Ri.LTR,o=e.contentDOM,a=o.getBoundingClientRect(),l=Xs(e),h=o.querySelector(".cm-line"),c=h&&window.getComputedStyle(h),d=a.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),u=a.right-(c?parseInt(c.paddingRight):0),p=cn(e,n),f=cn(e,s),m=p.type==Xt.Text?p:null,g=f.type==Xt.Text?f:null;if(m&&(e.lineWrapping||p.widgetLineBreaks)&&(m=Ys(e,n,m)),g&&(e.lineWrapping||f.widgetLineBreaks)&&(g=Ys(e,s,g)),m&&g&&m.from==g.from)return O(b(i.from,i.to,m));{let t=m?b(i.from,null,m):_(p,!1),n=g?b(null,i.to,g):_(f,!0),s=[];return(m||p).to<(g||f).from-(m&&g?1:0)||p.widgetLineBreaks>1&&t.bottom+e.defaultLineHeight/2h&&n.from=r)break;a>s&&l(Math.max(e,s),null==t&&e<=h,Math.min(a,r),null==i&&a>=c,o.dir)}if(s=n.to+1,s>=r)break}return 0==a.length&&l(h,null==t,c,null==i,e.textDirection),{top:s,bottom:o,horizontal:a}}function _(e,t){let i=a.top+(t?e.top:e.bottom);return{top:i,bottom:i,horizontal:[]}}}(e,t,i)}}function Xs(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==Ri.LTR?t.left:t.right-e.scrollDOM.clientWidth*e.scaleX)-e.scrollDOM.scrollLeft*e.scaleX,top:t.top-e.scrollDOM.scrollTop*e.scaleY}}function Ys(e,t,i){let n=R.cursor(t);return{from:Math.max(i.from,e.moveToLineBoundary(n,!1,!0).from),to:Math.min(i.to,e.moveToLineBoundary(n,!0,!0).from),type:Xt.Text}}class Gs{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(Zs)!=e.state.facet(Zs)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}setOrder(e){let t=0,i=e.facet(Zs);for(;t{return i=e,n=this.drawn[t],!(i.constructor==n.constructor&&i.eq(n));var i,n}))){let t=this.dom.firstChild,i=0;for(let n of e)n.update&&t&&n.constructor&&this.drawn[i].constructor&&n.update(t,this.drawn[i])?(t=t.nextSibling,i++):this.dom.insertBefore(n.draw(),t);for(;t;){let e=t.nextSibling;t.remove(),t=e}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Zs=q.define();function Ks(e){return[bi.define((t=>new Gs(t,e))),Zs.of(e)]}const Js=!Rt.ios,er=q.define({combine:e=>be(e,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})});function tr(e={}){return[er.of(e),nr,rr,ar,ui.of(!0)]}function ir(e){return e.startState.facet(er)!=e.state.facet(er)}const nr=Ks({above:!0,markers(e){let{state:t}=e,i=t.facet(er),n=[];for(let s of t.selection.ranges){let r=s==t.selection.main;if(s.empty?!r||Js:i.drawRangeCursor){let t=r?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",i=s.empty?s:R.cursor(s.head,s.head>s.anchor?-1:1);for(let s of Hs.forRange(e,t,i))n.push(s)}}return n},update(e,t){e.transactions.some((e=>e.selection))&&(t.style.animationName="cm-blink"==t.style.animationName?"cm-blink2":"cm-blink");let i=ir(e);return i&&sr(e.state,t),e.docChanged||e.selectionSet||i},mount(e,t){sr(t.state,e)},class:"cm-cursorLayer"});function sr(e,t){t.style.animationDuration=e.facet(er).cursorBlinkRate+"ms"}const rr=Ks({above:!1,markers:e=>e.state.selection.ranges.map((t=>t.empty?[]:Hs.forRange(e,"cm-selectionBackground",t))).reduce(((e,t)=>e.concat(t))),update:(e,t)=>e.docChanged||e.selectionSet||e.viewportChanged||ir(e),class:"cm-selectionLayer"}),or={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};Js&&(or[".cm-line"].caretColor="transparent !important");const ar=V.highest(Ds.theme(or)),lr=ae.define({map:(e,t)=>null==e?null:t.mapPos(e)}),hr=j.define({create:()=>null,update:(e,t)=>(null!=e&&(e=t.changes.mapPos(e)),t.effects.reduce(((e,t)=>t.is(lr)?t.value:e),e))}),cr=bi.fromClass(class{constructor(e){this.view=e,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(e){var t;let i=e.state.field(hr);null==i?null!=this.cursor&&(null===(t=this.cursor)||void 0===t||t.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(e.startState.field(hr)!=i||e.docChanged||e.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:e}=this,t=e.state.field(hr),i=null!=t&&e.coordsAtPos(t);if(!i)return null;let n=e.scrollDOM.getBoundingClientRect();return{left:i.left-n.left+e.scrollDOM.scrollLeft*e.scaleX,top:i.top-n.top+e.scrollDOM.scrollTop*e.scaleY,height:i.bottom-i.top}}drawCursor(e){if(this.cursor){let{scaleX:t,scaleY:i}=this.view;e?(this.cursor.style.left=e.left/t+"px",this.cursor.style.top=e.top/i+"px",this.cursor.style.height=e.height/i+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(e){this.view.state.field(hr)!=e&&this.view.dispatch({effects:lr.of(e)})}},{eventObservers:{dragover(e){this.setDropPos(this.view.posAtCoords({x:e.clientX,y:e.clientY}))},dragleave(e){e.target!=this.view.contentDOM&&this.view.contentDOM.contains(e.relatedTarget)||this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function dr(e,t,i,n,s){t.lastIndex=0;for(let r,o=e.iterRange(i,n),a=i;!o.next().done;a+=o.value.length)if(!o.lineBreak)for(;r=t.exec(o.value);)s(a+r.index,r)}class ur{constructor(e){const{regexp:t,decoration:i,decorate:n,boundary:s,maxLength:r=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,n)this.addMatch=(e,t,i,s)=>n(s,i,i+e[0].length,e,t);else if("function"==typeof i)this.addMatch=(e,t,n,s)=>{let r=i(e,t,n);r&&s(n,n+e[0].length,r)};else{if(!i)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=(e,t,n,s)=>s(n,n+e[0].length,i)}this.boundary=s,this.maxLength=r}createDeco(e){let t=new ke,i=t.add.bind(t);for(let{from:t,to:n}of function(e,t){let i=e.visibleRanges;if(1==i.length&&i[0].from==e.viewport.from&&i[0].to==e.viewport.to)return i;let n=[];for(let{from:s,to:r}of i)s=Math.max(e.state.doc.lineAt(s).from,s-t),r=Math.min(e.state.doc.lineAt(r).to,r+t),n.length&&n[n.length-1].to>=s?n[n.length-1].to=r:n.push({from:s,to:r});return n}(e,this.maxLength))dr(e.state.doc,this.regexp,t,n,((t,n)=>this.addMatch(n,e,t,i)));return t.finish()}updateDeco(e,t){let i=1e9,n=-1;return e.docChanged&&e.changes.iterChanges(((t,s,r,o)=>{o>e.view.viewport.from&&r1e3?this.createDeco(e.view):n>-1?this.updateRange(e.view,t.map(e.changes),i,n):t}updateRange(e,t,i,n){for(let s of e.visibleRanges){let r=Math.max(s.from,i),o=Math.min(s.to,n);if(o>r){let i=e.state.doc.lineAt(r),n=i.toi.from;r--)if(this.boundary.test(i.text[r-1-i.from])){a=r;break}for(;oc.push(i.range(e,t));if(i==n)for(this.regexp.lastIndex=a-i.from;(h=this.regexp.exec(i.text))&&h.indexthis.addMatch(i,e,t,d)));t=t.update({filterFrom:a,filterTo:l,filter:(e,t)=>el,add:c})}}return t}}const pr=null!=/x/.unicode?"gu":"g",fr=new RegExp("[\0-\b\n--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\ufeff-]",pr),mr={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let gr=null;const vr=q.define({combine(e){let t=be(e,{render:null,specialChars:fr,addSpecialChars:null});return(t.replaceTabs=!function(){var e;if(null==gr&&"undefined"!=typeof document&&document.body){let t=document.body.style;gr=null!=(null!==(e=t.tabSize)&&void 0!==e?e:t.MozTabSize)}return gr||!1}())&&(t.specialChars=new RegExp("\t|"+t.specialChars.source,pr)),t.addSpecialChars&&(t.specialChars=new RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,pr)),t}});function Or(e={}){return[vr.of(e),br||(br=bi.fromClass(class{constructor(e){this.view=e,this.decorations=Yt.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(e.state.facet(vr)),this.decorations=this.decorator.createDeco(e)}makeDecorator(e){return new ur({regexp:e.specialChars,decoration:(t,i,n)=>{let{doc:s}=i.state,r=O(t[0],0);if(9==r){let e=s.lineAt(n),t=i.state.tabSize,r=Le(e.text,t,n-e.from);return Yt.replace({widget:new yr((t-r%t)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[r]||(this.decorationCache[r]=Yt.replace({widget:new _r(e,r)}))},boundary:e.replaceTabs?void 0:/[^]/})}update(e){let t=e.state.facet(vr);e.startState.facet(vr)!=t?(this.decorator=this.makeDecorator(t),this.decorations=this.decorator.createDeco(e.view)):this.decorations=this.decorator.updateDeco(e,this.decorations)}},{decorations:e=>e.decorations}))]}let br=null;class _r extends Ht{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=function(e){return e>=32?"•":10==e?"␤":String.fromCharCode(9216+e)}(this.code),i=e.state.phrase("Control character")+" "+(mr[this.code]||"0x"+this.code.toString(16)),n=this.options.render&&this.options.render(this.code,i,t);if(n)return n;let s=document.createElement("span");return s.textContent=t,s.title=i,s.setAttribute("aria-label",i),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class yr extends Ht{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent="\t",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}const wr=Yt.line({class:"cm-activeLine"}),xr=bi.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=-1,i=[];for(let n of e.state.selection.ranges){let s=e.lineBlockAt(n.head);s.from>t&&(i.push(wr.range(s.from)),t=s.from)}return Yt.set(i)}},{decorations:e=>e.decorations}),Sr=2e3;function kr(e,t){let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),n=e.state.doc.lineAt(i),s=i-n.from,r=s>Sr?-1:s==n.length?function(e,t){let i=e.coordsAtPos(e.viewport.from);return i?Math.round(Math.abs((i.left-t)/e.defaultCharacterWidth)):-1}(e,t.clientX):Le(n.text,e.state.tabSize,i-n.from);return{line:n.number,col:r,off:s}}function Tr(e){let t=(null==e?void 0:e.eventFilter)||(e=>e.altKey&&0==e.button);return Ds.mouseSelectionStyle.of(((e,i)=>t(i)?function(e,t){let i=kr(e,t),n=e.state.selection;return i?{update(e){if(e.docChanged){let t=e.changes.mapPos(e.startState.doc.line(i.line).from),s=e.state.doc.lineAt(t);i={line:s.number,col:i.col,off:Math.min(i.off,s.length)},n=n.map(e.changes)}},get(t,s,r){let o=kr(e,t);if(!o)return n;let a=function(e,t,i){let n=Math.min(t.line,i.line),s=Math.max(t.line,i.line),r=[];if(t.off>Sr||i.off>Sr||t.col<0||i.col<0){let o=Math.min(t.off,i.off),a=Math.max(t.off,i.off);for(let t=n;t<=s;t++){let i=e.doc.line(t);i.length<=a&&r.push(R.range(i.from+o,i.to+a))}}else{let o=Math.min(t.col,i.col),a=Math.max(t.col,i.col);for(let t=n;t<=s;t++){let i=e.doc.line(t),n=Ne(i.text,o,e.tabSize,!0);if(n<0)r.push(R.cursor(i.to));else{let t=Ne(i.text,a,e.tabSize);r.push(R.range(i.from+n,i.from+t))}}}return r}(e.state,i,o);return a.length?r?R.create(a.concat(n.ranges)):R.create(a):n}}:null}(e,i):null))}const Cr={Alt:[18,e=>!!e.altKey],Control:[17,e=>!!e.ctrlKey],Shift:[16,e=>!!e.shiftKey],Meta:[91,e=>!!e.metaKey]},Pr={style:"cursor: crosshair"};function Mr(e={}){let[t,i]=Cr[e.key||"Alt"],n=bi.fromClass(class{constructor(e){this.view=e,this.isDown=!1}set(e){this.isDown!=e&&(this.isDown=e,this.view.update([]))}},{eventObservers:{keydown(e){this.set(e.keyCode==t||i(e))},keyup(e){e.keyCode!=t&&i(e)||this.set(!1)},mousemove(e){this.set(i(e))}}});return[n,Ds.contentAttributes.of((e=>{var t;return(null===(t=e.plugin(n))||void 0===t?void 0:t.isDown)?Pr:null}))]}const Er="-10000px";class Ar{constructor(e,t,i){this.facet=t,this.createTooltipView=i,this.input=e.state.facet(t),this.tooltips=this.input.filter((e=>e)),this.tooltipViews=this.tooltips.map(i)}update(e,t){var i;let n=e.state.facet(this.facet),s=n.filter((e=>e));if(n===this.input){for(let t of this.tooltipViews)t.update&&t.update(e);return!1}let r=[],o=t?[]:null;for(let i=0;it[i]=e)),t.length=o.length),this.input=n,this.tooltips=s,this.tooltipViews=r,!0}}function Rr(e){let{win:t}=e;return{top:0,left:0,bottom:t.innerHeight,right:t.innerWidth}}const Dr=q.define({combine:e=>{var t,i,n;return{position:Rt.ios?"absolute":(null===(t=e.find((e=>e.position)))||void 0===t?void 0:t.position)||"fixed",parent:(null===(i=e.find((e=>e.parent)))||void 0===i?void 0:i.parent)||null,tooltipSpace:(null===(n=e.find((e=>e.tooltipSpace)))||void 0===n?void 0:n.tooltipSpace)||Rr}}}),Ir=new WeakMap,qr=bi.fromClass(class{constructor(e){this.view=e,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(Dr);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new Ar(e,Br,(e=>this.createTooltip(e))),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver((e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&this.measureSoon()}),{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let e of this.manager.tooltipViews)this.intersectionObserver.observe(e.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout((()=>{this.measureTimeout=-1,this.maybeMeasure()}),50))}update(e){e.transactions.length&&(this.lastTransaction=Date.now());let t=this.manager.update(e,this.above);t&&this.observeIntersection();let i=t||e.geometryChanged,n=e.state.facet(Dr);if(n.position!=this.position&&!this.madeAbsolute){this.position=n.position;for(let e of this.manager.tooltipViews)e.dom.style.position=this.position;i=!0}if(n.parent!=this.parent){this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer();for(let e of this.manager.tooltipViews)this.container.appendChild(e.dom);i=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);i&&this.maybeMeasure()}createTooltip(e){let t=e.create(this.view);if(t.dom.classList.add("cm-tooltip"),e.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let e=document.createElement("div");e.className="cm-tooltip-arrow",t.dom.appendChild(e)}return t.dom.style.position=this.position,t.dom.style.top=Er,t.dom.style.left="0px",this.container.appendChild(t.dom),t.mount&&t.mount(this.view),t}destroy(){var e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let t of this.manager.tooltipViews)t.dom.remove(),null===(e=t.destroy)||void 0===e||e.call(t);this.parent&&this.container.remove(),null===(t=this.intersectionObserver)||void 0===t||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let e=this.view.dom.getBoundingClientRect(),t=1,i=1,n=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:e}=this.manager.tooltipViews[0];if(Rt.gecko)n=e.offsetParent!=this.container.ownerDocument.body;else if(1!=this.view.scaleX||1!=this.view.scaleY)n=!0;else if(e.style.top==Er&&"0px"==e.style.left){let t=e.getBoundingClientRect();n=Math.abs(t.top+1e4)>1||Math.abs(t.left)>1}}if(n||"absolute"==this.position)if(this.parent){let e=this.parent.getBoundingClientRect();e.width&&e.height&&(t=e.width/this.parent.offsetWidth,i=e.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:i}=this.view.viewState);return{editor:e,parent:this.parent?this.container.getBoundingClientRect():e,pos:this.manager.tooltips.map(((e,t)=>{let i=this.manager.tooltipViews[t];return i.getCoords?i.getCoords(e.pos):this.view.coordsAtPos(e.pos)})),size:this.manager.tooltipViews.map((({dom:e})=>e.getBoundingClientRect())),space:this.view.state.facet(Dr).tooltipSpace(this.view),scaleX:t,scaleY:i,makeAbsolute:n}}writeMeasure(e){var t;if(e.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let e of this.manager.tooltipViews)e.dom.style.position="absolute"}let{editor:i,space:n,scaleX:s,scaleY:r}=e,o=[];for(let a=0;a=Math.min(i.bottom,n.bottom)||d.rightMath.min(i.right,n.right)+.1){c.style.top=Er;continue}let p=l.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,f=p?7:0,m=u.right-u.left,g=null!==(t=Ir.get(h))&&void 0!==t?t:u.bottom-u.top,v=h.offset||Nr,O=this.view.textDirection==Ri.LTR,b=u.width>n.right-n.left?O?n.left:n.right-u.width:O?Math.min(d.left-(p?14:0)+v.x,n.right-m):Math.max(n.left,d.left-m+(p?14:0)-v.x),_=this.above[a];!l.strictSide&&(_?d.top-(u.bottom-u.top)-v.yn.bottom)&&_==n.bottom-d.bottom>d.top-n.top&&(_=this.above[a]=!_);let y=(_?d.top-n.top:n.bottom-d.bottom)-f;if(yb&&e.topw&&(w=_?e.top-g-2-f:e.bottom+f+2);if("absolute"==this.position?(c.style.top=(w-e.parent.top)/r+"px",c.style.left=(b-e.parent.left)/s+"px"):(c.style.top=w/r+"px",c.style.left=b/s+"px"),p){let e=d.left+(O?v.x:-v.x)-(b+14-7);p.style.left=e/s+"px"}!0!==h.overlap&&o.push({left:b,top:w,right:x,bottom:w+g}),c.classList.toggle("cm-tooltip-above",_),c.classList.toggle("cm-tooltip-below",!_),h.positioned&&h.positioned(e.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let e of this.manager.tooltipViews)e.dom.style.top=Er}},{eventObservers:{scroll(){this.maybeMeasure()}}}),Lr=Ds.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Nr={x:0,y:0},Br=q.define({enables:[qr,Lr]}),$r=q.define();class Qr{static create(e){return new Qr(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new Ar(e,$r,(e=>this.createHostedView(e)))}createHostedView(e){let t=e.create(this.view);return t.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(t.dom),this.mounted&&t.mount&&t.mount(this.view),t}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)null===(e=t.destroy)||void 0===e||e.call(t)}passProp(e){let t;for(let i of this.manager.tooltipViews){let n=i[e];if(void 0!==n)if(void 0===t)t=n;else if(t!==n)return}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const zr=Br.compute([$r],(e=>{let t=e.facet($r).filter((e=>e));return 0===t.length?null:{pos:Math.min(...t.map((e=>e.pos))),end:Math.max(...t.filter((e=>null!=e.end)).map((e=>e.end))),create:Qr.create,above:t[0].above,arrow:t.some((e=>e.arrow))}}));class jr{constructor(e,t,i,n,s){this.view=e,this.source=t,this.field=i,this.setHover=n,this.hoverTime=s,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout((()=>this.startHover()),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active)return;let e=Date.now()-this.lastMove.time;ei.bottom||t.xi.right+e.defaultCharacterWidth)return;let r=e.bidiSpans(e.state.doc.lineAt(n)).find((e=>e.from<=n&&e.to>=n)),o=r&&r.dir==Ri.RTL?-1:1;s=t.x{this.pending==t&&(this.pending=null,i&&e.dispatch({effects:this.setHover.of(i)}))}),(t=>mi(e.state,t,"hover tooltip")))}else r&&e.dispatch({effects:this.setHover.of(r)})}mousemove(e){var t;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let i=this.active;if(i&&!Wr(this.lastMove.target)||this.pending){let{pos:n}=i||this.pending,s=null!==(t=null==i?void 0:i.end)&&void 0!==t?t:n;(n==s?this.view.posAtCoords(this.lastMove)==n:function(e,t,i,n,s,r){let o=e.scrollDOM.getBoundingClientRect(),a=e.documentTop+e.documentPadding.top+e.contentHeight;if(o.left>n||o.rights||Math.min(o.bottom,a)=t&&l<=i}(this.view,n,s,e.clientX,e.clientY))||(this.view.dispatch({effects:this.setHover.of(null)}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1,this.active&&!Wr(e.relatedTarget)&&this.view.dispatch({effects:this.setHover.of(null)})}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}function Wr(e){for(let t=e;t;t=t.parentNode)if(1==t.nodeType&&t.classList.contains("cm-tooltip"))return!0;return!1}function Vr(e,t={}){let i=ae.define(),n=j.define({create:()=>null,update(e,n){if(e&&(t.hideOnChange&&(n.docChanged||n.selection)||t.hideOn&&t.hideOn(n,e)))return null;if(e&&n.docChanged){let t=n.changes.mapPos(e.pos,-1,w.TrackDel);if(null==t)return null;let i=Object.assign(Object.create(null),e);i.pos=t,null!=e.end&&(i.end=n.changes.mapPos(e.end)),e=i}for(let t of n.effects)t.is(i)&&(e=t.value),t.is(Fr)&&(e=null);return e},provide:e=>$r.from(e)});return[n,bi.define((s=>new jr(s,e,n,i,t.hoverTime||300))),zr]}function Ur(e,t){let i=e.plugin(qr);if(!i)return null;let n=i.manager.tooltips.indexOf(t);return n<0?null:i.manager.tooltipViews[n]}const Fr=ae.define(),Hr=q.define({combine(e){let t,i;for(let n of e)t=t||n.topContainer,i=i||n.bottomContainer;return{topContainer:t,bottomContainer:i}}});function Xr(e,t){let i=e.plugin(Yr),n=i?i.specs.indexOf(t):-1;return n>-1?i.panels[n]:null}const Yr=bi.fromClass(class{constructor(e){this.input=e.state.facet(Kr),this.specs=this.input.filter((e=>e)),this.panels=this.specs.map((t=>t(e)));let t=e.state.facet(Hr);this.top=new Gr(e,!0,t.topContainer),this.bottom=new Gr(e,!1,t.bottomContainer),this.top.sync(this.panels.filter((e=>e.top))),this.bottom.sync(this.panels.filter((e=>!e.top)));for(let e of this.panels)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}update(e){let t=e.state.facet(Hr);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new Gr(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new Gr(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let i=e.state.facet(Kr);if(i!=this.input){let t=i.filter((e=>e)),n=[],s=[],r=[],o=[];for(let i of t){let t,a=this.specs.indexOf(i);a<0?(t=i(e.view),o.push(t)):(t=this.panels[a],t.update&&t.update(e)),n.push(t),(t.top?s:r).push(t)}this.specs=t,this.panels=n,this.top.sync(s),this.bottom.sync(r);for(let e of o)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}else for(let t of this.panels)t.update&&t.update(e)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:e=>Ds.scrollMargins.of((t=>{let i=t.plugin(e);return i&&{top:i.top.scrollMargin(),bottom:i.bottom.scrollMargin()}}))});class Gr{constructor(e,t,i){this.view=e,this.top=t,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let e=this.container||this.view.dom;e.insertBefore(this.dom,this.top?e.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=Zr(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=Zr(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function Zr(e){let t=e.nextSibling;return e.remove(),t}const Kr=q.define({enables:Yr});class Jr extends _e{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Jr.prototype.elementClass="",Jr.prototype.toDOM=void 0,Jr.prototype.mapMode=w.TrackBefore,Jr.prototype.startSide=Jr.prototype.endSide=-1,Jr.prototype.point=!0;const eo=q.define(),to={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Se.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},io=q.define();function no(e){return[ro(),io.of(Object.assign(Object.assign({},to),e))]}const so=q.define({combine:e=>e.some((e=>e))});function ro(e){let t=[oo];return e&&!1===e.fixed&&t.push(so.of(!0)),t}const oo=bi.fromClass(class{constructor(e){this.view=e,this.prevViewport=e.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=e.state.facet(io).map((t=>new co(e,t)));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!e.state.facet(so),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}update(e){if(this.updateGutters(e)){let t=this.prevViewport,i=e.view.viewport,n=Math.min(t.to,i.to)-Math.max(t.from,i.from);this.syncGutters(n<.8*(i.to-i.from))}e.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(so)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&this.dom.remove();let i=Se.iter(this.view.state.facet(eo),this.view.viewport.from),n=[],s=this.gutters.map((e=>new ho(e,this.view.viewport,-this.view.documentPadding.top)));for(let e of this.view.viewportLineBlocks)if(n.length&&(n=[]),Array.isArray(e.type)){let t=!0;for(let r of e.type)if(r.type==Xt.Text&&t){lo(i,n,r.from);for(let e of s)e.line(this.view,r,n);t=!1}else if(r.widget)for(let e of s)e.widget(this.view,r)}else if(e.type==Xt.Text){lo(i,n,e.from);for(let t of s)t.line(this.view,e,n)}else if(e.widget)for(let t of s)t.widget(this.view,e);for(let e of s)e.finish();e&&this.view.scrollDOM.insertBefore(this.dom,t)}updateGutters(e){let t=e.startState.facet(io),i=e.state.facet(io),n=e.docChanged||e.heightChanged||e.viewportChanged||!Se.eq(e.startState.facet(eo),e.state.facet(eo),e.view.viewport.from,e.view.viewport.to);if(t==i)for(let t of this.gutters)t.update(e)&&(n=!0);else{n=!0;let s=[];for(let n of i){let i=t.indexOf(n);i<0?s.push(new co(this.view,n)):(this.gutters[i].update(e),s.push(this.gutters[i]))}for(let e of this.gutters)e.dom.remove(),s.indexOf(e)<0&&e.destroy();for(let e of s)this.dom.appendChild(e.dom);this.gutters=s}return n}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove()}},{provide:e=>Ds.scrollMargins.of((t=>{let i=t.plugin(e);return i&&0!=i.gutters.length&&i.fixed?t.textDirection==Ri.LTR?{left:i.dom.offsetWidth*t.scaleX}:{right:i.dom.offsetWidth*t.scaleX}:null}))});function ao(e){return Array.isArray(e)?e:[e]}function lo(e,t,i){for(;e.value&&e.from<=i;)e.from==i&&t.push(e.value),e.next()}class ho{constructor(e,t,i){this.gutter=e,this.height=i,this.i=0,this.cursor=Se.iter(e.markers,t.from)}addElement(e,t,i){let{gutter:n}=this,s=(t.top-this.height)/e.scaleY,r=t.height/e.scaleY;if(this.i==n.elements.length){let t=new uo(e,r,s,i);n.elements.push(t),n.dom.appendChild(t.dom)}else n.elements[this.i].update(e,r,s,i);this.height=t.bottom,this.i++}line(e,t,i){let n=[];lo(this.cursor,n,t.from),i.length&&(n=n.concat(i));let s=this.gutter.config.lineMarker(e,t,n);s&&n.unshift(s);let r=this.gutter;(0!=n.length||r.config.renderEmptyElements)&&this.addElement(e,t,n)}widget(e,t){let i=this.gutter.config.widgetMarker(e,t.widget,t);i&&this.addElement(e,t,[i])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class co{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in t.domEventHandlers)this.dom.addEventListener(i,(n=>{let s,r=n.target;if(r!=this.dom&&this.dom.contains(r)){for(;r.parentNode!=this.dom;)r=r.parentNode;let e=r.getBoundingClientRect();s=(e.top+e.bottom)/2}else s=n.clientY;let o=e.lineBlockAtHeight(s-e.documentTop);t.domEventHandlers[i](e,o,n)&&n.preventDefault()}));this.markers=ao(t.markers(e)),t.initialSpacer&&(this.spacer=new uo(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=ao(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let i=e.view.viewport;return!Se.eq(this.markers,t,i.from,i.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(e)}destroy(){for(let e of this.elements)e.destroy()}}class uo{constructor(e,t,i,n){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,i,n)}update(e,t,i,n){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),function(e,t){if(e.length!=t.length)return!1;for(let i=0;ibe(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let i=Object.assign({},e);for(let e in t){let n=i[e],s=t[e];i[e]=n?(e,t,i)=>n(e,t,i)||s(e,t,i):s}return i}})});class mo extends Jr{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function go(e,t){return e.state.facet(fo).formatNumber(t,e.state)}const vo=io.compute([fo],(e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:e=>e.state.facet(po),lineMarker:(e,t,i)=>i.some((e=>e.toDOM))?null:new mo(go(e,e.state.doc.lineAt(t.from).number)),widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet(fo)!=e.state.facet(fo),initialSpacer:e=>new mo(go(e,bo(e.state.doc.lines))),updateSpacer(e,t){let i=go(t.view,bo(t.view.state.doc.lines));return i==e.number?e:new mo(i)},domEventHandlers:e.facet(fo).domEventHandlers})));function Oo(e={}){return[fo.of(e),ro(),vo]}function bo(e){let t=9;for(;t{let t=[],i=-1;for(let n of e.selection.ranges){let s=e.doc.lineAt(n.head).from;s>i&&(i=s,t.push(_o.range(s)))}return Se.of(t)})),wo=1024;let xo=0;class So{constructor(e,t){this.from=e,this.to=t}}class ko{constructor(e={}){this.id=xo++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=Po.match(e)),t=>{let i=e(t);return void 0===i?null:[this,i]}}}ko.closedBy=new ko({deserialize:e=>e.split(" ")}),ko.openedBy=new ko({deserialize:e=>e.split(" ")}),ko.group=new ko({deserialize:e=>e.split(" ")}),ko.contextHash=new ko({perNode:!0}),ko.lookAhead=new ko({perNode:!0}),ko.mounted=new ko({perNode:!0});class To{constructor(e,t,i){this.tree=e,this.overlay=t,this.parser=i}static get(e){return e&&e.props&&e.props[ko.mounted.id]}}const Co=Object.create(null);class Po{constructor(e,t,i,n=0){this.name=e,this.props=t,this.id=i,this.flags=n}static define(e){let t=e.props&&e.props.length?Object.create(null):Co,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(null==e.name?8:0),n=new Po(e.name||"",t,e.id,i);if(e.props)for(let i of e.props)if(Array.isArray(i)||(i=i(n)),i){if(i[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[i[0].id]=i[1]}return n}prop(e){return this.props[e.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(e){if("string"==typeof e){if(this.name==e)return!0;let t=this.prop(ko.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let n of i.split(" "))t[n]=e[i];return e=>{for(let i=e.prop(ko.group),n=-1;n<(i?i.length:0);n++){let s=t[n<0?e.name:i[n]];if(s)return s}}}}Po.none=new Po("",Object.create(null),0,8);class Mo{constructor(e){this.types=e;for(let t=0;t=t){let o=new $o(r.tree,r.overlay[0].from+e.from,0,null);(s||(s=[n])).push(No(o,t,i,!1))}}return s?Vo(s):n}(this,e,t)}iterate(e){let{enter:t,leave:i,from:n=0,to:s=this.length}=e,r=e.mode||0,o=(r&Ro.IncludeAnonymous)>0;for(let e=this.cursor(r|Ro.IncludeAnonymous);;){let r=!1;if(e.from<=s&&e.to>=n&&(!o&&e.type.isAnonymous||!1!==t(e))){if(e.firstChild())continue;r=!0}for(;r&&i&&(o||!e.type.isAnonymous)&&i(e),!e.nextSibling();){if(!e.parent())return;r=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:Go(Po.none,this.children,this.positions,0,this.children.length,0,this.length,((e,t,i)=>new Do(this.type,e,t,i,this.propValues)),e.makeTree||((e,t,i)=>new Do(Po.none,e,t,i)))}static build(e){return function(e){var t;let{buffer:i,nodeSet:n,maxBufferLength:s=wo,reused:r=[],minRepeatType:o=n.types.length}=e,a=Array.isArray(i)?new Io(i,i.length):i,l=n.types,h=0,c=0;function d(e,t,i,m,g){let{id:v,start:O,end:b,size:_}=a,y=c;for(;_<0;){if(a.next(),-1==_){let t=r[v];return i.push(t),void m.push(O-e)}if(-3==_)return void(h=v);if(-4==_)return void(c=v);throw new RangeError(`Unrecognized record size: ${_}`)}let w,x,S=l[v],k=O-e;if(b-O<=s&&(x=function(e,t){let i=a.fork(),n=0,r=0,l=0,h=i.end-s,c={size:0,start:0,skip:0};e:for(let s=i.pos-e;i.pos>s;){let e=i.size;if(i.id==t&&e>=0){c.size=n,c.start=r,c.skip=l,l+=4,n+=4,i.next();continue}let a=i.pos-e;if(e<0||a=o?4:0,u=i.start;for(i.next();i.pos>a;){if(i.size<0){if(-3!=i.size)break e;d+=4}else i.id>=o&&(d+=4);i.next()}r=u,n+=e,l+=d}return(t<0||n==e)&&(c.size=n,c.start=r,c.skip=l),c.size>4?c:void 0}(a.pos-t,g))){let t=new Uint16Array(x.size-x.skip),i=a.pos-x.size,s=t.length;for(;a.pos>i;)s=f(x.start,t,s);w=new qo(t,b-x.start,n),k=x.start-e}else{let e=a.pos-_;a.next();let t=[],i=[],n=v>=o?v:-1,r=0,l=b;for(;a.pos>e;)n>=0&&a.id==n&&a.size>=0?(a.end<=l-s&&(u(t,i,O,r,a.end,l,n,y),r=t.length,l=a.end),a.next()):d(O,e,t,i,n);if(n>=0&&r>0&&r-1&&r>0){let e=function(e){return(t,i,n)=>{let s,r,o=0,a=t.length-1;if(a>=0&&(s=t[a])instanceof Do){if(!a&&s.type==e&&s.length==n)return s;(r=s.prop(ko.lookAhead))&&(o=i[a]+s.length+r)}return p(e,t,i,n,o)}}(S);w=Go(S,t,i,0,t.length,0,b-O,e,e)}else w=p(S,t,i,b-O,y-b)}i.push(w),m.push(k)}function u(e,t,i,s,r,o,a,l){let h=[],c=[];for(;e.length>s;)h.push(e.pop()),c.push(t.pop()+i-r);e.push(p(n.types[a],h,c,o-r,l-o)),t.push(r-i)}function p(e,t,i,n,s=0,r){if(h){let e=[ko.contextHash,h];r=r?[e].concat(r):[e]}if(s>25){let e=[ko.lookAhead,s];r=r?[e].concat(r):[e]}return new Do(e,t,i,n,r)}function f(e,t,i){let{id:n,start:s,end:r,size:l}=a;if(a.next(),l>=0&&n4){let n=a.pos-(l-4);for(;a.pos>n;)i=f(e,t,i)}t[--i]=o,t[--i]=r-e,t[--i]=s-e,t[--i]=n}else-3==l?h=n:-4==l&&(c=n);return i}let m=[],g=[];for(;a.pos>0;)d(e.start||0,e.bufferStart||0,m,g,-1);let v=null!==(t=e.length)&&void 0!==t?t:m.length?g[0]+m[0].length:0;return new Do(l[e.topID],m.reverse(),g.reverse(),v)}(e)}}Do.empty=new Do(Po.none,[],[],0);class Io{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Io(this.buffer,this.index)}}class qo{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return Po.none}toString(){let e=[];for(let t=0;t0));a=r[a+3]);return o}slice(e,t,i){let n=this.buffer,s=new Uint16Array(t-e),r=0;for(let o=e,a=0;o=t&&it;case 1:return i<=t&&n>t;case 2:return n>t;case 4:return!0}}function No(e,t,i,n){for(var s;e.from==e.to||(i<1?e.from>=t:e.from>t)||(i>-1?e.to<=t:e.to0?o.length:-1;e!=l;e+=t){let l=o[e],h=a[e]+r.from;if(Lo(n,i,h,h+l.length))if(l instanceof qo){if(s&Ro.ExcludeBuffers)continue;let o=l.findChild(0,l.buffer.length,t,i-h,n);if(o>-1)return new Wo(new jo(r,l,e,h),null,o)}else if(s&Ro.IncludeAnonymous||!l.type.isAnonymous||Ho(l)){let o;if(!(s&Ro.IgnoreMounts)&&(o=To.get(l))&&!o.overlay)return new $o(o.tree,h,e,r);let a=new $o(l,h,e,r);return s&Ro.IncludeAnonymous||!a.type.isAnonymous?a:a.nextChild(t<0?l.children.length-1:0,t,i,n)}}if(s&Ro.IncludeAnonymous||!r.type.isAnonymous)return null;if(e=r.index>=0?r.index+t:t<0?-1:r._parent._tree.children.length,r=r._parent,!r)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,i=0){let n;if(!(i&Ro.IgnoreOverlays)&&(n=To.get(this._tree))&&n.overlay){let i=e-this.from;for(let{from:e,to:s}of n.overlay)if((t>0?e<=i:e=i:s>i))return new $o(n.tree,n.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function Qo(e,t,i,n){let s=e.cursor(),r=[];if(!s.firstChild())return r;if(null!=i)for(;!s.type.is(i);)if(!s.nextSibling())return r;for(;;){if(null!=n&&s.type.is(n))return r;if(s.type.is(t)&&r.push(s.node),!s.nextSibling())return null==n?r:[]}}function zo(e,t,i=t.length-1){for(let n=e.parent;i>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(t[i]&&t[i]!=n.name)return!1;i--}}return!0}class jo{constructor(e,t,i,n){this.parent=e,this.buffer=t,this.index=i,this.start=n}}class Wo extends Bo{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,i){super(),this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:n}=this.context,s=n.findChild(this.index+4,n.buffer[this.index+3],e,t-this.context.start,i);return s<0?null:new Wo(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,i=0){if(i&Ro.ExcludeBuffers)return null;let{buffer:n}=this.context,s=n.findChild(this.index+4,n.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new Wo(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Wo(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new Wo(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,n=this.index+4,s=i.buffer[this.index+3];if(s>n){let r=i.buffer[this.index+1];e.push(i.slice(n,s,r)),t.push(0)}return new Do(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Vo(e){if(!e.length)return null;if(1==e.length)return e[0];let t=0,i=e[0];for(let n=1;ni.from||s.to0){if(this.index-1)for(let n=t+e,s=e<0?-1:i._tree.children.length;n!=s;n+=e){let e=i._tree.children[n];if(this.mode&Ro.IncludeAnonymous||e instanceof qo||!e.type.isAnonymous||Ho(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let r=e;r;r=r._parent)if(r.index==n){if(n==this.index)return r;t=r,i=s+1;break e}n=this.stack[--s]}for(let e=i;e=0;s--){if(s<0)return zo(this.node,e,n);let r=i[t.buffer[this.stack[s]]];if(!r.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}}function Ho(e){return e.children.some((e=>e instanceof qo||!e.type.isAnonymous||Ho(e)))}const Xo=new WeakMap;function Yo(e,t){if(!e.isAnonymous||t instanceof qo||t.type!=e)return 1;let i=Xo.get(t);if(null==i){i=1;for(let n of t.children){if(n.type!=e||!(n instanceof Do)){i=1;break}i+=Yo(e,n)}Xo.set(t,i)}return i}function Go(e,t,i,n,s,r,o,a,l){let h=0;for(let i=n;i=c)break;f+=t}if(h==s+1){if(f>c){let e=i[s];t(e.children,e.positions,0,e.children.length,n[s]+a);continue}d.push(i[s])}else{let t=n[h-1]+i[h-1].length-p;d.push(Go(e,i,n,s,h,p,t,null,l))}u.push(p+a-r)}}(t,i,n,s,0),(a||l)(d,u,o)}class Zo{constructor(){this.map=new WeakMap}setBuffer(e,t,i){let n=this.map.get(e);n||this.map.set(e,n=new Map),n.set(t,i)}getBuffer(e,t){let i=this.map.get(e);return i&&i.get(t)}set(e,t){e instanceof Wo?this.setBuffer(e.context.buffer,e.index,t):e instanceof $o&&this.map.set(e.tree,t)}get(e){return e instanceof Wo?this.getBuffer(e.context.buffer,e.index):e instanceof $o?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Ko{constructor(e,t,i,n,s=!1,r=!1){this.from=e,this.to=t,this.tree=i,this.offset=n,this.open=(s?1:0)|(r?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(e,t=[],i=!1){let n=[new Ko(0,e.length,e,0,!1,i)];for(let i of t)i.to>e.length&&n.push(i);return n}static applyChanges(e,t,i=128){if(!t.length)return e;let n=[],s=1,r=e.length?e[0]:null;for(let o=0,a=0,l=0;;o++){let h=o=i)for(;r&&r.from=t.from||c<=t.to||l){let e=Math.max(t.from,a)-l,i=Math.min(t.to,c)-l;t=e>=i?null:new Ko(e,i,t.tree,t.offset+l,o>0,!!h)}if(t&&n.push(t),r.to>c)break;r=snew So(e.from,e.to))):[new So(0,0)]:[new So(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let n=this.startParse(e,t,i);for(;;){let e=n.advance();if(e)return e}}}class ea{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new ko({perNode:!0});let ta=0;class ia{constructor(e,t,i){this.set=e,this.base=t,this.modified=i,this.id=ta++}static define(e){if(null==e?void 0:e.base)throw new Error("Can not derive from a modified tag");let t=new ia([],null,[]);if(t.set.push(t),e)for(let i of e.set)t.set.push(i);return t}static defineModifier(){let e=new sa;return t=>t.modified.indexOf(e)>-1?t:sa.get(t.base||t,t.modified.concat(e).sort(((e,t)=>e.id-t.id)))}}let na=0;class sa{constructor(){this.instances=[],this.id=na++}static get(e,t){if(!t.length)return e;let i=t[0].instances.find((i=>{return i.base==e&&(n=t,s=i.modified,n.length==s.length&&n.every(((e,t)=>e==s[t])));var n,s}));if(i)return i;let n=[],s=new ia(n,e,t);for(let e of t)e.instances.push(s);let r=function(e){let t=[[]];for(let i=0;it.length-e.length))}(t);for(let t of e.set)if(!t.modified.length)for(let e of r)n.push(sa.get(t,e));return s}}function ra(e){let t=Object.create(null);for(let i in e){let n=e[i];Array.isArray(n)||(n=[n]);for(let e of i.split(" "))if(e){let i=[],s=2,r=e;for(let t=0;;){if("..."==r&&t>0&&t+3==e.length){s=1;break}let n=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(r);if(!n)throw new RangeError("Invalid path: "+e);if(i.push("*"==n[0]?"":'"'==n[0][0]?JSON.parse(n[0]):n[0]),t+=n[0].length,t==e.length)break;let o=e[t++];if(t==e.length&&"!"==o){s=0;break}if("/"!=o)throw new RangeError("Invalid path: "+e);r=e.slice(t)}let o=i.length-1,a=i[o];if(!a)throw new RangeError("Invalid path: "+e);let l=new aa(n,s,o>0?i.slice(0,o):null);t[a]=l.sort(t[a])}}return oa.add(t)}const oa=new ko;class aa{constructor(e,t,i,n){this.tags=e,this.mode=t,this.context=i,this.next=n}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(e){return!e||e.depth{let t=s;for(let n of e)for(let e of n.set){let n=i[e.id];if(n){t=t?t+" "+n:n;break}}return t},scope:n}}function ha(e,t,i,n=0,s=e.length){let r=new ca(n,Array.isArray(t)?t:[t],i);r.highlightRange(e.cursor(),n,s,"",r.highlighters),r.flush(s)}aa.empty=new aa([],2,null);class ca{constructor(e,t,i){this.at=e,this.highlighters=t,this.span=i,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,i,n,s){let{type:r,from:o,to:a}=e;if(o>=i||a<=t)return;r.isTop&&(s=this.highlighters.filter((e=>!e.scope||e.scope(r))));let l=n,h=function(e){let t=e.type.prop(oa);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}(e)||aa.empty,c=function(e,t){let i=null;for(let n of e){let e=n.style(t);e&&(i=i?i+" "+e:e)}return i}(s,h.tags);if(c&&(l&&(l+=" "),l+=c,1==h.mode&&(n+=(n?" ":"")+c)),this.startSpan(Math.max(t,o),l),h.opaque)return;let d=e.tree&&e.tree.prop(ko.mounted);if(d&&d.overlay){let r=e.node.enter(d.overlay[0].from+o,1),h=this.highlighters.filter((e=>!e.scope||e.scope(d.tree.type))),c=e.firstChild();for(let u=0,p=o;;u++){let f=u=m)&&e.nextSibling()););if(!f||m>i)break;p=f.to+o,p>t&&(this.highlightRange(r.cursor(),Math.max(t,f.from+o),Math.min(i,p),"",h),this.startSpan(Math.min(i,p),l))}c&&e.parent()}else if(e.firstChild()){d&&(n="");do{if(!(e.to<=t)){if(e.from>=i)break;this.highlightRange(e,t,i,n,s),this.startSpan(Math.min(i,e.to),l)}}while(e.nextSibling());e.parent()}}}const da=ia.define,ua=da(),pa=da(),fa=da(pa),ma=da(pa),ga=da(),va=da(ga),Oa=da(ga),ba=da(),_a=da(ba),ya=da(),wa=da(),xa=da(),Sa=da(xa),ka=da(),Ta={comment:ua,lineComment:da(ua),blockComment:da(ua),docComment:da(ua),name:pa,variableName:da(pa),typeName:fa,tagName:da(fa),propertyName:ma,attributeName:da(ma),className:da(pa),labelName:da(pa),namespace:da(pa),macroName:da(pa),literal:ga,string:va,docString:da(va),character:da(va),attributeValue:da(va),number:Oa,integer:da(Oa),float:da(Oa),bool:da(ga),regexp:da(ga),escape:da(ga),color:da(ga),url:da(ga),keyword:ya,self:da(ya),null:da(ya),atom:da(ya),unit:da(ya),modifier:da(ya),operatorKeyword:da(ya),controlKeyword:da(ya),definitionKeyword:da(ya),moduleKeyword:da(ya),operator:wa,derefOperator:da(wa),arithmeticOperator:da(wa),logicOperator:da(wa),bitwiseOperator:da(wa),compareOperator:da(wa),updateOperator:da(wa),definitionOperator:da(wa),typeOperator:da(wa),controlOperator:da(wa),punctuation:xa,separator:da(xa),bracket:Sa,angleBracket:da(Sa),squareBracket:da(Sa),paren:da(Sa),brace:da(Sa),content:ba,heading:_a,heading1:da(_a),heading2:da(_a),heading3:da(_a),heading4:da(_a),heading5:da(_a),heading6:da(_a),contentSeparator:da(ba),list:da(ba),quote:da(ba),emphasis:da(ba),strong:da(ba),link:da(ba),monospace:da(ba),strikethrough:da(ba),inserted:da(),deleted:da(),changed:da(),invalid:da(),meta:ka,documentMeta:da(ka),annotation:da(ka),processingInstruction:da(ka),definition:ia.defineModifier(),constant:ia.defineModifier(),function:ia.defineModifier(),standard:ia.defineModifier(),local:ia.defineModifier(),special:ia.defineModifier()};var Ca;la([{tag:Ta.link,class:"tok-link"},{tag:Ta.heading,class:"tok-heading"},{tag:Ta.emphasis,class:"tok-emphasis"},{tag:Ta.strong,class:"tok-strong"},{tag:Ta.keyword,class:"tok-keyword"},{tag:Ta.atom,class:"tok-atom"},{tag:Ta.bool,class:"tok-bool"},{tag:Ta.url,class:"tok-url"},{tag:Ta.labelName,class:"tok-labelName"},{tag:Ta.inserted,class:"tok-inserted"},{tag:Ta.deleted,class:"tok-deleted"},{tag:Ta.literal,class:"tok-literal"},{tag:Ta.string,class:"tok-string"},{tag:Ta.number,class:"tok-number"},{tag:[Ta.regexp,Ta.escape,Ta.special(Ta.string)],class:"tok-string2"},{tag:Ta.variableName,class:"tok-variableName"},{tag:Ta.local(Ta.variableName),class:"tok-variableName tok-local"},{tag:Ta.definition(Ta.variableName),class:"tok-variableName tok-definition"},{tag:Ta.special(Ta.variableName),class:"tok-variableName2"},{tag:Ta.definition(Ta.propertyName),class:"tok-propertyName tok-definition"},{tag:Ta.typeName,class:"tok-typeName"},{tag:Ta.namespace,class:"tok-namespace"},{tag:Ta.className,class:"tok-className"},{tag:Ta.macroName,class:"tok-macroName"},{tag:Ta.propertyName,class:"tok-propertyName"},{tag:Ta.operator,class:"tok-operator"},{tag:Ta.comment,class:"tok-comment"},{tag:Ta.meta,class:"tok-meta"},{tag:Ta.invalid,class:"tok-invalid"},{tag:Ta.punctuation,class:"tok-punctuation"}]);const Pa=new ko;const Ma=new ko;class Ea{constructor(e,t,i=[],n=""){this.data=e,this.name=n,Oe.prototype.hasOwnProperty("tree")||Object.defineProperty(Oe.prototype,"tree",{get(){return Da(this)}}),this.parser=t,this.extension=[ja.of(this),Oe.languageData.of(((e,t,i)=>{let n=Aa(e,t,i),s=n.type.prop(Pa);if(!s)return[];let r=e.facet(s),o=n.type.prop(Ma);if(o){let s=n.resolve(t-n.from,i);for(let t of o)if(t.test(s,e)){let i=e.facet(t.facet);return"replace"==t.type?i:i.concat(r)}}return r}))].concat(i)}isActiveAt(e,t,i=-1){return Aa(e,t,i).type.prop(Pa)==this.data}findRegions(e){let t=e.facet(ja);if((null==t?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let i=[],n=(e,t)=>{if(e.prop(Pa)==this.data)return void i.push({from:t,to:t+e.length});let s=e.prop(ko.mounted);if(s){if(s.tree.prop(Pa)==this.data){if(s.overlay)for(let e of s.overlay)i.push({from:e.from+t,to:e.to+t});else i.push({from:t,to:t+e.length});return}if(s.overlay){let e=i.length;if(n(s.tree,s.overlay[0].from+t),i.length>e)return}}for(let i=0;ie.concat(i):void 0}));var i;return new Ra(t,e.parser.configure({props:[Pa.add((e=>e.isTop?t:void 0))]}),e.name)}configure(e,t){return new Ra(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Da(e){let t=e.field(Ea.state,!1);return t?t.tree:Do.empty}class Ia{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let i=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-i,t-i)}}let qa=null;class La{constructor(e,t,i=[],n,s,r,o,a){this.parser=e,this.state=t,this.fragments=i,this.tree=n,this.treeLen=s,this.viewport=r,this.skipped=o,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,i){return new La(e,t,[],Do.empty,0,i,[],null)}startParse(){return this.parser.startParse(new Ia(this.state.doc),this.fragments)}work(e,t){return null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=Do.empty&&this.isDone(null!=t?t:this.state.doc.length)?(this.takeTree(),!0):this.withContext((()=>{var i;if("number"==typeof e){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||(this.parse=this.startParse()),null!=t&&(null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&t=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext((()=>{for(;!(t=this.parse.advance()););})),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(Ko.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=qa;qa=this;try{return e()}finally{qa=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=Na(e,t.from,t.to);return e}changes(e,t){let{fragments:i,tree:n,treeLen:s,viewport:r,skipped:o}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges(((e,i,n,s)=>t.push({fromA:e,toA:i,fromB:n,toB:s}))),i=Ko.applyChanges(i,t),n=Do.empty,s=0,r={from:e.mapPos(r.from,-1),to:e.mapPos(r.to,1)},this.skipped.length){o=[];for(let t of this.skipped){let i=e.mapPos(t.from,1),n=e.mapPos(t.to,-1);ie.from&&(this.fragments=Na(this.fragments,i,n),this.skipped.splice(t--,1))}return!(this.skipped.length>=t||(this.reset(),0))}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends Jo{createParse(t,i,n){let s=n[0].from,r=n[n.length-1].to;return{parsedPos:s,advance(){let t=qa;if(t){for(let e of n)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=r,new Do(Po.none,[],[],r-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&0==t[0].from&&t[0].to>=e}static get(){return qa}}function Na(e,t,i){return Ko.applyChanges(e,[{fromA:t,toA:i,fromB:t,toB:i}])}class Ba{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,i)||t.takeTree(),new Ba(t)}static init(e){let t=Math.min(3e3,e.doc.length),i=La.create(e.facet(ja).parser,e,{from:0,to:t});return i.work(20,t)||i.takeTree(),new Ba(i)}}Ea.state=j.define({create:Ba.init,update(e,t){for(let e of t.effects)if(e.is(Ea.setState))return e.value;return t.startState.facet(ja)!=t.state.facet(ja)?Ba.init(t.state):e.apply(t)}});let $a=e=>{let t=setTimeout((()=>e()),500);return()=>clearTimeout(t)};"undefined"!=typeof requestIdleCallback&&($a=e=>{let t=-1,i=setTimeout((()=>{t=requestIdleCallback(e,{timeout:400})}),100);return()=>t<0?clearTimeout(i):cancelIdleCallback(t)});const Qa="undefined"!=typeof navigator&&(null===(Ca=navigator.scheduling)||void 0===Ca?void 0:Ca.isInputPending)?()=>navigator.scheduling.isInputPending():null,za=bi.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(Ea.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Ea.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=$a(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEndn+1e3,a=s.context.work((()=>Qa&&Qa()||Date.now()>r),n+(o?0:1e5));this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:Ea.setState.of(new Ba(s.context))})),this.chunkBudget>0&&(!a||o)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then((()=>this.scheduleWork())).catch((e=>mi(this.view.state,e))).then((()=>this.workScheduled--)),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),ja=q.define({combine:e=>e.length?e[0]:null,enables:e=>[Ea.state,za,Ds.contentAttributes.compute([e],(t=>{let i=t.facet(e);return i&&i.name?{"data-language":i.name}:{}}))]});class Wa{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const Va=q.define(),Ua=q.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some((e=>e!=t[0])))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function Fa(e){let t=e.facet(Ua);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function Ha(e,t){let i="",n=e.tabSize,s=e.facet(Ua)[0];if("\t"==s){for(;t>=n;)i+="\t",t-=n;s=" "}for(let e=0;e=t?function(e,t,i){let n=t.resolveStack(i),s=n.node.enterUnfinishedNodesBefore(i);if(s!=n.node){let e=[];for(let t=s;t!=n.node;t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)n={node:e[t],next:n}}return Za(n,e,i)}(e,i,t):null}class Ya{constructor(e,t={}){this.state=e,this.options=t,this.unit=Fa(e)}lineAt(e,t=1){let i=this.state.doc.lineAt(e),{simulateBreak:n,simulateDoubleBreak:s}=this.options;return null!=n&&n>=i.from&&n<=i.to?s&&n==e?{text:"",from:e}:(t<0?n-1&&(s+=r-this.countColumn(i,i.search(/\S|$/))),s}countColumn(e,t=e.length){return Le(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:i,from:n}=this.lineAt(e,t),s=this.options.overrideIndentation;if(s){let e=s(n);if(e>-1)return e}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Ga=new ko;function Za(e,t,i){for(let n=e;n;n=n.next){let e=Ka(n.node);if(e)return e(el.create(t,i,n))}return 0}function Ka(e){let t=e.type.prop(Ga);if(t)return t;let i,n=e.firstChild;if(n&&(i=n.type.prop(ko.closedBy))){let t=e.lastChild,n=t&&i.indexOf(t.name)>-1;return e=>nl(e,!0,1,void 0,n&&!function(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}(e)?t.from:void 0)}return null==e.parent?Ja:null}function Ja(){return 0}class el extends Ya{constructor(e,t,i){super(e.state,e.options),this.base=e,this.pos=t,this.context=i}get node(){return this.context.node}static create(e,t,i){return new el(e,t,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(t.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(tl(i,e))break;t=this.state.doc.lineAt(i.from)}return this.lineIndent(t.from)}continue(){return Za(this.context.next,this.base,this.pos)}}function tl(e,t){for(let i=t;i;i=i.parent)if(e==i)return!0;return!1}function il({closing:e,align:t=!0,units:i=1}){return n=>nl(n,t,i,e)}function nl(e,t,i,n,s){let r=e.textAfter,o=r.match(/^\s*/)[0].length,a=n&&r.slice(o,o+n.length)==n||s==e.pos+o,l=t?function(e){let t=e.node,i=t.childAfter(t.from),n=t.lastChild;if(!i)return null;let s=e.options.simulateBreak,r=e.state.doc.lineAt(i.from),o=null==s||s<=r.from?r.to:Math.min(r.to,s);for(let e=i.to;;){let s=t.childAfter(e);if(!s||s==n)return null;if(!s.type.isSkipped)return s.fromi)continue;if(s&&o.from=t&&n.to>i&&(s=n)}}return s}(e,t,i)}function ll(e,t){let i=t.mapPos(e.from,1),n=t.mapPos(e.to,-1);return i>=n?void 0:{from:i,to:n}}const hl=ae.define({map:ll}),cl=ae.define({map:ll});function dl(e){let t=[];for(let{head:i}of e.state.selection.ranges)t.some((e=>e.from<=i&&e.to>=i))||t.push(e.lineBlockAt(i));return t}const ul=j.define({create:()=>Yt.none,update(e,t){e=e.map(t.changes);for(let i of t.effects)if(i.is(hl)&&!fl(e,i.value.from,i.value.to)){let{preparePlaceholder:n}=t.state.facet(bl),s=n?Yt.replace({widget:new xl(n(t.state,i.value))}):wl;e=e.update({add:[s.range(i.value.from,i.value.to)]})}else i.is(cl)&&(e=e.update({filter:(e,t)=>i.value.from!=e||i.value.to!=t,filterFrom:i.value.from,filterTo:i.value.to}));if(t.selection){let i=!1,{head:n}=t.selection.main;e.between(n,n,((e,t)=>{en&&(i=!0)})),i&&(e=e.update({filterFrom:n,filterTo:n,filter:(e,t)=>t<=n||e>=n}))}return e},provide:e=>Ds.decorations.from(e),toJSON(e,t){let i=[];return e.between(0,t.doc.length,((e,t)=>{i.push(e,t)})),i},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw new RangeError("Invalid JSON for fold state");let t=[];for(let i=0;i{(!s||s.from>e)&&(s={from:e,to:t})})),s}function fl(e,t,i){let n=!1;return e.between(t,t,((e,s)=>{e==t&&s==i&&(n=!0)})),n}function ml(e,t){return e.field(ul,!1)?t:t.concat(ae.appendConfig.of(_l()))}function gl(e,t,i=!0){let n=e.state.doc.lineAt(t.from).number,s=e.state.doc.lineAt(t.to).number;return Ds.announce.of(`${e.state.phrase(i?"Folded lines":"Unfolded lines")} ${n} ${e.state.phrase("to")} ${s}.`)}const vl=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:e=>{for(let t of dl(e)){let i=al(e.state,t.from,t.to);if(i)return e.dispatch({effects:ml(e.state,[hl.of(i),gl(e,i)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:e=>{if(!e.state.field(ul,!1))return!1;let t=[];for(let i of dl(e)){let n=pl(e.state,i.from,i.to);n&&t.push(cl.of(n),gl(e,n,!1))}return t.length&&e.dispatch({effects:t}),t.length>0}},{key:"Ctrl-Alt-[",run:e=>{let{state:t}=e,i=[];for(let n=0;n{let t=e.state.field(ul,!1);if(!t||!t.size)return!1;let i=[];return t.between(0,e.state.doc.length,((e,t)=>{i.push(cl.of({from:e,to:t}))})),e.dispatch({effects:i}),!0}}],Ol={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},bl=q.define({combine:e=>be(e,Ol)});function _l(e){let t=[ul,Cl];return e&&t.push(bl.of(e)),t}function yl(e,t){let{state:i}=e,n=i.facet(bl),s=t=>{let i=e.lineBlockAt(e.posAtDOM(t.target)),n=pl(e.state,i.from,i.to);n&&e.dispatch({effects:cl.of(n)}),t.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(e,s,t);let r=document.createElement("span");return r.textContent=n.placeholderText,r.setAttribute("aria-label",i.phrase("folded code")),r.title=i.phrase("unfold"),r.className="cm-foldPlaceholder",r.onclick=s,r}const wl=Yt.replace({widget:new class extends Ht{toDOM(e){return yl(e,null)}}});class xl extends Ht{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return yl(e,this.value)}}const Sl={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class kl extends Jr{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function Tl(e={}){let t=Object.assign(Object.assign({},Sl),e),i=new kl(t,!0),n=new kl(t,!1),s=bi.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(ja)!=e.state.facet(ja)||e.startState.field(ul,!1)!=e.state.field(ul,!1)||Da(e.startState)!=Da(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new ke;for(let s of e.viewportLineBlocks){let r=pl(e.state,s.from,s.to)?n:al(e.state,s.from,s.to)?i:null;r&&t.add(s.from,s.from,r)}return t.finish()}}),{domEventHandlers:r}=t;return[s,no({class:"cm-foldGutter",markers(e){var t;return(null===(t=e.plugin(s))||void 0===t?void 0:t.markers)||Se.empty},initialSpacer:()=>new kl(t,!1),domEventHandlers:Object.assign(Object.assign({},r),{click:(e,t,i)=>{if(r.click&&r.click(e,t,i))return!0;let n=pl(e.state,t.from,t.to);if(n)return e.dispatch({effects:cl.of(n)}),!0;let s=al(e.state,t.from,t.to);return!!s&&(e.dispatch({effects:hl.of(s)}),!0)}})}),_l()]}const Cl=Ds.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Pl{constructor(e,t){let i;function n(e){let t=ze.newName();return(i||(i=Object.create(null)))["."+t]=e,t}this.specs=e;const s="string"==typeof t.all?t.all:t.all?n(t.all):void 0,r=t.scope;this.scope=r instanceof Ea?e=>e.prop(Pa)==r.data:r?e=>e==r:void 0,this.style=la(e.map((e=>({tag:e.tag,class:e.class||n(Object.assign({},e,{tag:null}))}))),{all:s}).style,this.module=i?new ze(i):null,this.themeType=t.themeType}static define(e,t){return new Pl(e,t||{})}}const Ml=q.define(),El=q.define({combine:e=>e.length?[e[0]]:null});function Al(e){let t=e.facet(Ml);return t.length?t:e.facet(El)}function Rl(e,t){let i,n=[Il];return e instanceof Pl&&(e.module&&n.push(Ds.styleModule.of(e.module)),i=e.themeType),(null==t?void 0:t.fallback)?n.push(El.of(e)):i?n.push(Ml.computeN([Ds.darkTheme],(t=>t.facet(Ds.darkTheme)==("dark"==i)?[e]:[]))):n.push(Ml.of(e)),n}class Dl{constructor(e){this.markCache=Object.create(null),this.tree=Da(e.state),this.decorations=this.buildDeco(e,Al(e.state))}update(e){let t=Da(e.state),i=Al(e.state),n=i!=Al(e.startState);t.length{i.add(e,t,this.markCache[n]||(this.markCache[n]=Yt.mark({class:n})))}),n,s);return i.finish()}}const Il=V.high(bi.fromClass(Dl,{decorations:e=>e.decorations})),ql=Pl.define([{tag:Ta.meta,color:"#404740"},{tag:Ta.link,textDecoration:"underline"},{tag:Ta.heading,textDecoration:"underline",fontWeight:"bold"},{tag:Ta.emphasis,fontStyle:"italic"},{tag:Ta.strong,fontWeight:"bold"},{tag:Ta.strikethrough,textDecoration:"line-through"},{tag:Ta.keyword,color:"#708"},{tag:[Ta.atom,Ta.bool,Ta.url,Ta.contentSeparator,Ta.labelName],color:"#219"},{tag:[Ta.literal,Ta.inserted],color:"#164"},{tag:[Ta.string,Ta.deleted],color:"#a11"},{tag:[Ta.regexp,Ta.escape,Ta.special(Ta.string)],color:"#e40"},{tag:Ta.definition(Ta.variableName),color:"#00f"},{tag:Ta.local(Ta.variableName),color:"#30a"},{tag:[Ta.typeName,Ta.namespace],color:"#085"},{tag:Ta.className,color:"#167"},{tag:[Ta.special(Ta.variableName),Ta.macroName],color:"#256"},{tag:Ta.definition(Ta.propertyName),color:"#00c"},{tag:Ta.comment,color:"#940"},{tag:Ta.invalid,color:"#f00"}]),Ll=Ds.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),Nl=1e4,Bl="()[]{}",$l=q.define({combine:e=>be(e,{afterCursor:!0,brackets:Bl,maxScanDistance:Nl,renderMatch:jl})}),Ql=Yt.mark({class:"cm-matchingBracket"}),zl=Yt.mark({class:"cm-nonmatchingBracket"});function jl(e){let t=[],i=e.matched?Ql:zl;return t.push(i.range(e.start.from,e.start.to)),e.end&&t.push(i.range(e.end.from,e.end.to)),t}const Wl=j.define({create:()=>Yt.none,update(e,t){if(!t.docChanged&&!t.selection)return e;let i=[],n=t.state.facet($l);for(let e of t.state.selection.ranges){if(!e.empty)continue;let s=Yl(t.state,e.head,-1,n)||e.head>0&&Yl(t.state,e.head-1,1,n)||n.afterCursor&&(Yl(t.state,e.head,1,n)||e.headDs.decorations.from(e)}),Vl=[Wl,Ll];function Ul(e={}){return[$l.of(e),Vl]}const Fl=new ko;function Hl(e,t,i){let n=e.prop(t<0?ko.openedBy:ko.closedBy);if(n)return n;if(1==e.name.length){let n=i.indexOf(e.name);if(n>-1&&n%2==(t<0?1:0))return[i[n+t]]}return null}function Xl(e){let t=e.type.prop(Fl);return t?t(e.node):e}function Yl(e,t,i,n={}){let s=n.maxScanDistance||Nl,r=n.brackets||Bl,o=Da(e),a=o.resolveInner(t,i);for(let e=a;e;e=e.parent){let n=Hl(e.type,i,r);if(n&&e.from0?t>=s.from&&ts.from&&t<=s.to))return Gl(0,0,i,e,s,n,r)}}return function(e,t,i,n,s,r,o){let a=i<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),l=o.indexOf(a);if(l<0||l%2==0!=i>0)return null;let h={from:i<0?t-1:t,to:i>0?t+1:t},c=e.doc.iterRange(t,i>0?e.doc.length:0),d=0;for(let e=0;!c.next().done&&e<=r;){let r=c.value;i<0&&(e+=r.length);let a=t+e*i;for(let e=i>0?0:r.length-1,t=i>0?r.length:-1;e!=t;e+=i){let t=o.indexOf(r[e]);if(!(t<0||n.resolveInner(a+e,1).type!=s))if(t%2==0==i>0)d++;else{if(1==d)return{start:h,end:{from:a+e,to:a+e+1},matched:t>>1==l>>1};d--}}i>0&&(e+=r.length)}return c.done?{start:h,matched:!1}:null}(e,t,i,o,a.type,s,r)}function Gl(e,t,i,n,s,r,o){let a=n.parent,l={from:s.from,to:s.to},h=0,c=null==a?void 0:a.cursor();if(c&&(i<0?c.childBefore(n.from):c.childAfter(n.to)))do{if(i<0?c.to<=n.from:c.from>=n.to){if(0==h&&r.indexOf(c.type.name)>-1&&c.from-1||(Jl.push(e),console.warn(t))}function ih(e,t){let i=[];for(let n of t.split(" ")){let t=[];for(let i of n.split(".")){let n=e[i]||Ta[i];n?"function"==typeof n?t.length?t=t.map(n):th(i,`Modifier ${i} used at start of tag`):t.length?th(i,`Tag ${i} used as modifier`):t=Array.isArray(n)?n:[n]:th(i,`Unknown highlighting tag ${i}`)}for(let e of t)i.push(e)}if(!i.length)return 0;let n=t.replace(/ /g,"_"),s=Po.define({id:Kl.length,name:n,props:[ra({[n]:i})]});return Kl.push(s),s.id}function nh(e,t){return({state:i,dispatch:n})=>{if(i.readOnly)return!1;let s=e(t,i);return!!s&&(n(i.update(s)),!0)}}const sh=nh(ch,0),rh=nh(hh,0),oh=nh(((e,t)=>hh(e,t,function(e){let t=[];for(let i of e.selection.ranges){let n=e.doc.lineAt(i.from),s=i.to<=n.to?n:e.doc.lineAt(i.to),r=t.length-1;r>=0&&t[r].to>n.from?t[r].to=s.to:t.push({from:n.from+/^\s*/.exec(n.text)[0].length,to:s.to})}return t}(t))),0);function ah(e,t){let i=e.languageDataAt("commentTokens",t);return i.length?i[0]:{}}const lh=50;function hh(e,t,i=t.selection.ranges){let n=i.map((e=>ah(t,e.from).block));if(!n.every((e=>e)))return null;let s=i.map(((e,i)=>function(e,{open:t,close:i},n,s){let r,o,a=e.sliceDoc(n-lh,n),l=e.sliceDoc(s,s+lh),h=/\s*$/.exec(a)[0].length,c=/^\s*/.exec(l)[0].length,d=a.length-h;if(a.slice(d-t.length,d)==t&&l.slice(c,c+i.length)==i)return{open:{pos:n-h,margin:h&&1},close:{pos:s+c,margin:c&&1}};s-n<=2*lh?r=o=e.sliceDoc(n,s):(r=e.sliceDoc(n,n+lh),o=e.sliceDoc(s-lh,s));let u=/^\s*/.exec(r)[0].length,p=/\s*$/.exec(o)[0].length,f=o.length-p-i.length;return r.slice(u,u+t.length)==t&&o.slice(f,f+i.length)==i?{open:{pos:n+u+t.length,margin:/\s/.test(r.charAt(u+t.length))?1:0},close:{pos:s-p-i.length,margin:/\s/.test(o.charAt(f-1))?1:0}}:null}(t,n[i],e.from,e.to)));if(2!=e&&!s.every((e=>e)))return{changes:t.changes(i.map(((e,t)=>s[t]?[]:[{from:e.from,insert:n[t].open+" "},{from:e.to,insert:" "+n[t].close}])))};if(1!=e&&s.some((e=>e))){let e=[];for(let t,i=0;is&&(e==r||r>l.from)){s=l.from;let e=/^\s*/.exec(l.text)[0].length,t=e==l.length,i=l.text.slice(e,e+a.length)==a?e:-1;ee.comment<0&&(!e.empty||e.single)))){let e=[];for(let{line:t,token:i,indent:s,empty:r,single:o}of n)!o&&r||e.push({from:t.from+s,insert:i+" "});let i=t.changes(e);return{changes:i,selection:t.selection.map(i,1)}}if(1!=e&&n.some((e=>e.comment>=0))){let e=[];for(let{line:t,comment:i,token:s}of n)if(i>=0){let n=t.from+i,r=n+s.length;" "==t.text[r-t.from]&&r++,e.push({from:n,to:r})}return{changes:e}}return null}const dh=se.define(),uh=se.define(),ph=q.define(),fh=q.define({combine:e=>be(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(i,n)=>e(i,n)||t(i,n)})}),mh=j.define({create:()=>Rh.empty,update(e,t){let i=t.state.facet(fh),n=t.annotation(dh);if(n){let s=t.docChanged?R.single(function(e){let t=0;return e.iterChangedRanges(((e,i)=>t=i)),t}(t.changes)):void 0,r=wh.fromTransaction(t,s),o=n.side,a=0==o?e.undone:e.done;return a=r?xh(a,a.length,i.minDepth,r):Ch(a,t.startState.selection),new Rh(0==o?n.rest:a,0==o?a:n.rest)}let s=t.annotation(uh);if("full"!=s&&"before"!=s||(e=e.isolate()),!1===t.annotation(le.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let r=wh.fromTransaction(t),o=t.annotation(le.time),a=t.annotation(le.userEvent);return r?e=e.addChanges(r,o,a,i,t):t.selection&&(e=e.addSelection(t.startState.selection,o,a,i.newGroupDelay)),"full"!=s&&"after"!=s||(e=e.isolate()),e},toJSON:e=>({done:e.done.map((e=>e.toJSON())),undone:e.undone.map((e=>e.toJSON()))}),fromJSON:e=>new Rh(e.done.map(wh.fromJSON),e.undone.map(wh.fromJSON))});function gh(e={}){return[mh,fh.of(e),Ds.domEventHandlers({beforeinput(e,t){let i="historyUndo"==e.inputType?Oh:"historyRedo"==e.inputType?bh:null;return!!i&&(e.preventDefault(),i(t))}})]}function vh(e,t){return function({state:i,dispatch:n}){if(!t&&i.readOnly)return!1;let s=i.field(mh,!1);if(!s)return!1;let r=s.pop(e,i,t);return!!r&&(n(r),!0)}}const Oh=vh(0,!1),bh=vh(1,!1),_h=vh(0,!0),yh=vh(1,!0);class wh{constructor(e,t,i,n,s){this.changes=e,this.effects=t,this.mapped=i,this.startSelection=n,this.selectionsAfter=s}setSelAfter(e){return new wh(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,i;return{changes:null===(e=this.changes)||void 0===e?void 0:e.toJSON(),mapped:null===(t=this.mapped)||void 0===t?void 0:t.toJSON(),startSelection:null===(i=this.startSelection)||void 0===i?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map((e=>e.toJSON()))}}static fromJSON(e){return new wh(e.changes&&S.fromJSON(e.changes),[],e.mapped&&x.fromJSON(e.mapped),e.startSelection&&R.fromJSON(e.startSelection),e.selectionsAfter.map(R.fromJSON))}static fromTransaction(e,t){let i=kh;for(let t of e.startState.facet(ph)){let n=t(e);n.length&&(i=i.concat(n))}return!i.length&&e.changes.empty?null:new wh(e.changes.invert(e.startState.doc),i,void 0,t||e.startState.selection,kh)}static selection(e){return new wh(void 0,kh,void 0,void 0,e)}}function xh(e,t,i,n){let s=t+1>i+20?t-i-1:0,r=e.slice(s,t);return r.push(n),r}function Sh(e,t){return e.length?t.length?e.concat(t):e:t}const kh=[],Th=200;function Ch(e,t){if(e.length){let i=e[e.length-1],n=i.selectionsAfter.slice(Math.max(0,i.selectionsAfter.length-Th));return n.length&&n[n.length-1].eq(t)?e:(n.push(t),xh(e,e.length-1,1e9,i.setSelAfter(n)))}return[wh.selection([t])]}function Ph(e){let t=e[e.length-1],i=e.slice();return i[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),i}function Mh(e,t){if(!e.length)return e;let i=e.length,n=kh;for(;i;){let s=Eh(e[i-1],t,n);if(s.changes&&!s.changes.empty||s.effects.length){let t=e.slice(0,i);return t[i-1]=s,t}t=s.mapped,i--,n=s.selectionsAfter}return n.length?[wh.selection(n)]:kh}function Eh(e,t,i){let n=Sh(e.selectionsAfter.length?e.selectionsAfter.map((e=>e.map(t))):kh,i);if(!e.changes)return wh.selection(n);let s=e.changes.map(t),r=t.mapDesc(e.changes,!0),o=e.mapped?e.mapped.composeDesc(r):r;return new wh(s,ae.mapEffects(e.effects,t),o,e.startSelection.map(r),n)}const Ah=/^(input\.type|delete)($|\.)/;class Rh{constructor(e,t,i=0,n=void 0){this.done=e,this.undone=t,this.prevTime=i,this.prevUserEvent=n}isolate(){return this.prevTime?new Rh(this.done,this.undone):this}addChanges(e,t,i,n,s){let r=this.done,o=r[r.length-1];return r=o&&o.changes&&!o.changes.empty&&e.changes&&(!i||Ah.test(i))&&(!o.selectionsAfter.length&&t-this.prevTimei.push(e,t))),t.iterChangedRanges(((e,t,s,r)=>{for(let e=0;e=t&&s<=o&&(n=!0)}})),n}(o.changes,e.changes))||"input.type.compose"==i)?xh(r,r.length-1,n.minDepth,new wh(e.changes.compose(o.changes),Sh(e.effects,o.effects),o.mapped,o.startSelection,kh)):xh(r,r.length,n.minDepth,e),new Rh(r,kh,t,i)}addSelection(e,t,i,n){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:kh;return s.length>0&&t-this.prevTimee.empty!=o.ranges[t].empty)).length)?this:new Rh(Ch(this.done,e),this.undone,t,i);var r,o}addMapping(e){return new Rh(Mh(this.done,e),Mh(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,i){let n=0==e?this.done:this.undone;if(0==n.length)return null;let s=n[n.length-1];if(i&&s.selectionsAfter.length)return t.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:dh.of({side:e,rest:Ph(n)}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let i=1==n.length?kh:n.slice(0,n.length-1);return s.mapped&&(i=Mh(i,s.mapped)),t.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:dh.of({side:e,rest:i}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}return null}}Rh.empty=new Rh(kh,kh);const Dh=[{key:"Mod-z",run:Oh,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:bh,preventDefault:!0},{linux:"Ctrl-Shift-z",run:bh,preventDefault:!0},{key:"Mod-u",run:_h,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:yh,preventDefault:!0}];function Ih(e,t){return R.create(e.ranges.map(t),e.mainIndex)}function qh(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function Lh({state:e,dispatch:t},i){let n=Ih(e.selection,i);return!n.eq(e.selection)&&(t(qh(e,n)),!0)}function Nh(e,t){return R.cursor(t?e.to:e.from)}function Bh(e,t){return Lh(e,(i=>i.empty?e.moveByChar(i,t):Nh(i,t)))}function $h(e){return e.textDirectionAt(e.state.selection.main.head)==Ri.LTR}const Qh=e=>Bh(e,!$h(e)),zh=e=>Bh(e,$h(e));function jh(e,t){return Lh(e,(i=>i.empty?e.moveByGroup(i,t):Nh(i,t)))}function Wh(e,t,i){if(t.type.prop(i))return!0;let n=t.to-t.from;return n&&(n>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function Vh(e,t,i){let n,s,r=Da(e).resolveInner(t.head),o=i?ko.closedBy:ko.openedBy;for(let n=t.head;;){let t=i?r.childAfter(n):r.childBefore(n);if(!t)break;Wh(e,t,o)?r=t:n=i?t.to:t.from}return s=r.type.prop(o)&&(n=i?Yl(e,r.from,1):Yl(e,r.to,-1))&&n.matched?i?n.end.to:n.end.from:i?r.to:r.from,R.cursor(s,i?-1:1)}function Uh(e,t){return Lh(e,(i=>{if(!i.empty)return Nh(i,t);let n=e.moveVertically(i,t);return n.head!=i.head?n:e.moveToLineBoundary(i,t)}))}"undefined"!=typeof Intl&&Intl.Segmenter;const Fh=e=>Uh(e,!1),Hh=e=>Uh(e,!0);function Xh(e){let t,i=e.scrollDOM.clientHeighti.empty?e.moveVertically(i,t,n.height):Nh(i,t)));if(r.eq(s.selection))return!1;if(n.selfScroll){let t=e.coordsAtPos(s.selection.main.head),o=e.scrollDOM.getBoundingClientRect(),a=o.top+n.marginTop,l=o.bottom-n.marginBottom;t&&t.top>a&&t.bottomYh(e,!1),Zh=e=>Yh(e,!0);function Kh(e,t,i){let n=e.lineBlockAt(t.head),s=e.moveToLineBoundary(t,i);if(s.head==t.head&&s.head!=(i?n.to:n.from)&&(s=e.moveToLineBoundary(t,i,!1)),!i&&s.head==n.from&&n.length){let i=/^\s*/.exec(e.state.sliceDoc(n.from,Math.min(n.from+100,n.to)))[0].length;i&&t.head!=n.from+i&&(s=R.cursor(n.from+i))}return s}function Jh(e,t){let i=Ih(e.state.selection,(e=>{let i=t(e);return R.range(e.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)}));return!i.eq(e.state.selection)&&(e.dispatch(qh(e.state,i)),!0)}function ec(e,t){return Jh(e,(i=>e.moveByChar(i,t)))}const tc=e=>ec(e,!$h(e)),ic=e=>ec(e,$h(e));function nc(e,t){return Jh(e,(i=>e.moveByGroup(i,t)))}function sc(e,t){return Jh(e,(i=>e.moveVertically(i,t)))}const rc=e=>sc(e,!1),oc=e=>sc(e,!0);function ac(e,t){return Jh(e,(i=>e.moveVertically(i,t,Xh(e).height)))}const lc=e=>ac(e,!1),hc=e=>ac(e,!0),cc=({state:e,dispatch:t})=>(t(qh(e,{anchor:0})),!0),dc=({state:e,dispatch:t})=>(t(qh(e,{anchor:e.doc.length})),!0),uc=({state:e,dispatch:t})=>(t(qh(e,{anchor:e.selection.main.anchor,head:0})),!0),pc=({state:e,dispatch:t})=>(t(qh(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0);function fc(e,t){if(e.state.readOnly)return!1;let i="delete.selection",{state:n}=e,s=n.changeByRange((n=>{let{from:s,to:r}=n;if(s==r){let o=t(n);os&&(i="delete.forward",o=mc(e,o,!0)),s=Math.min(s,o),r=Math.max(r,o)}else s=mc(e,s,!1),r=mc(e,r,!0);return s==r?{range:n}:{changes:{from:s,to:r},range:R.cursor(s,st(e))))n.between(t,t,((e,n)=>{et&&(t=i?n:e)}));return t}const gc=(e,t)=>fc(e,(i=>{let n,s,r=i.from,{state:o}=e,a=o.doc.lineAt(r);if(!t&&r>a.from&&rgc(e,!1),Oc=e=>gc(e,!0),bc=(e,t)=>fc(e,(i=>{let n=i.head,{state:s}=e,r=s.doc.lineAt(n),o=s.charCategorizer(n);for(let e=null;;){if(n==(t?r.to:r.from)){n==i.head&&r.number!=(t?s.doc.lines:1)&&(n+=t?1:-1);break}let a=p(r.text,n-r.from,t)+r.from,l=r.text.slice(Math.min(n,a)-r.from,Math.max(n,a)-r.from),h=o(l);if(null!=e&&h!=e)break;" "==l&&n==i.head||(e=h),n=a}return n})),_c=e=>bc(e,!1);function yc(e){let t=[],i=-1;for(let n of e.selection.ranges){let s=e.doc.lineAt(n.from),r=e.doc.lineAt(n.to);if(n.empty||n.to!=r.from||(r=e.doc.lineAt(n.to-1)),i>=s.number){let e=t[t.length-1];e.to=r.to,e.ranges.push(n)}else t.push({from:s.from,to:r.to,ranges:[n]});i=r.number+1}return t}function wc(e,t,i){if(e.readOnly)return!1;let n=[],s=[];for(let t of yc(e)){if(i?t.to==e.doc.length:0==t.from)continue;let r=e.doc.lineAt(i?t.to+1:t.from-1),o=r.length+1;if(i){n.push({from:t.to,to:r.to},{from:t.from,insert:r.text+e.lineBreak});for(let i of t.ranges)s.push(R.range(Math.min(e.doc.length,i.anchor+o),Math.min(e.doc.length,i.head+o)))}else{n.push({from:r.from,to:t.from},{from:t.to,insert:e.lineBreak+r.text});for(let e of t.ranges)s.push(R.range(e.anchor-o,e.head-o))}}return!!n.length&&(t(e.update({changes:n,scrollIntoView:!0,selection:R.create(s,e.selection.mainIndex),userEvent:"move.line"})),!0)}function xc(e,t,i){if(e.readOnly)return!1;let n=[];for(let t of yc(e))i?n.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):n.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});return t(e.update({changes:n,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Sc=kc(!1);function kc(t){return({state:i,dispatch:n})=>{if(i.readOnly)return!1;let s=i.changeByRange((n=>{let{from:s,to:r}=n,o=i.doc.lineAt(s),a=!t&&s==r&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let i,n=Da(e).resolveInner(t),s=n.childBefore(t),r=n.childAfter(t);return s&&r&&s.to<=t&&r.from>=t&&(i=s.type.prop(ko.closedBy))&&i.indexOf(r.name)>-1&&e.doc.lineAt(s.to).from==e.doc.lineAt(r.from).from&&!/\S/.test(e.sliceDoc(s.to,r.from))?{from:s.to,to:r.from}:null}(i,s);t&&(s=r=(r<=o.to?o:i.doc.lineAt(r)).to);let l=new Ya(i,{simulateBreak:s,simulateDoubleBreak:!!a}),h=Xa(l,s);for(null==h&&(h=Le(/^\s*/.exec(i.doc.lineAt(s).text)[0],i.tabSize));ro.from&&s{let s=[];for(let r=n.from;r<=n.to;){let o=e.doc.lineAt(r);o.number>i&&(n.empty||n.to>o.from)&&(t(o,s,n),i=o.number),r=o.to+1}let r=e.changes(s);return{changes:s,range:R.range(r.mapPos(n.anchor,1),r.mapPos(n.head,1))}}))}const Cc=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>Lh(e,(t=>Vh(e.state,t,!$h(e)))),shift:e=>Jh(e,(t=>Vh(e.state,t,!$h(e))))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>Lh(e,(t=>Vh(e.state,t,$h(e)))),shift:e=>Jh(e,(t=>Vh(e.state,t,$h(e))))},{key:"Alt-ArrowUp",run:({state:e,dispatch:t})=>wc(e,t,!1)},{key:"Shift-Alt-ArrowUp",run:({state:e,dispatch:t})=>xc(e,t,!1)},{key:"Alt-ArrowDown",run:({state:e,dispatch:t})=>wc(e,t,!0)},{key:"Shift-Alt-ArrowDown",run:({state:e,dispatch:t})=>xc(e,t,!0)},{key:"Escape",run:({state:e,dispatch:t})=>{let i=e.selection,n=null;return i.ranges.length>1?n=R.create([i.main]):i.main.empty||(n=R.create([R.cursor(i.main.head)])),!!n&&(t(qh(e,n)),!0)}},{key:"Mod-Enter",run:kc(!0)},{key:"Alt-l",mac:"Ctrl-l",run:({state:e,dispatch:t})=>{let i=yc(e).map((({from:t,to:i})=>R.range(t,Math.min(i+1,e.doc.length))));return t(e.update({selection:R.create(i),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:e,dispatch:t})=>{let i=Ih(e.selection,(t=>{var i;for(let n=Da(e).resolveStack(t.from,1);n;n=n.next){let{node:e}=n;if((e.from=t.to||e.to>t.to&&e.from<=t.from)&&(null===(i=e.parent)||void 0===i?void 0:i.parent))return R.range(e.to,e.from)}return t}));return t(qh(e,i)),!0},preventDefault:!0},{key:"Mod-[",run:({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(Tc(e,((t,i)=>{let n=/^\s*/.exec(t.text)[0];if(!n)return;let s=Le(n,e.tabSize),r=0,o=Ha(e,Math.max(0,s-Fa(e)));for(;r!e.readOnly&&(t(e.update(Tc(e,((t,i)=>{i.push({from:t.from,insert:e.facet(Ua)})})),{userEvent:"input.indent"})),!0)},{key:"Mod-Alt-\\",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=Object.create(null),n=new Ya(e,{overrideIndentation:e=>{let t=i[e];return null==t?-1:t}}),s=Tc(e,((t,s,r)=>{let o=Xa(n,t.from);if(null==o)return;/\S/.test(t.text)||(o=0);let a=/^\s*/.exec(t.text)[0],l=Ha(e,o);(a!=l||r.from{if(e.state.readOnly)return!1;let{state:t}=e,i=t.changes(yc(t).map((({from:e,to:i})=>(e>0?e--:ie.moveVertically(t,!0))).map(i);return e.dispatch({changes:i,selection:n,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:e,dispatch:t})=>function(e,t,i){let n=!1,s=Ih(e.selection,(t=>{let s=Yl(e,t.head,-1)||Yl(e,t.head,1)||t.head>0&&Yl(e,t.head-1,1)||t.head{let{state:t}=e,i=t.doc.lineAt(t.selection.main.from),n=ah(e.state,i.from);return n.line?sh(e):!!n.block&&oh(e)}},{key:"Alt-A",run:rh}].concat([{key:"ArrowLeft",run:Qh,shift:tc,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:e=>jh(e,!$h(e)),shift:e=>nc(e,!$h(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>Lh(e,(t=>Kh(e,t,!$h(e)))),shift:e=>Jh(e,(t=>Kh(e,t,!$h(e)))),preventDefault:!0},{key:"ArrowRight",run:zh,shift:ic,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>jh(e,$h(e)),shift:e=>nc(e,$h(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>Lh(e,(t=>Kh(e,t,$h(e)))),shift:e=>Jh(e,(t=>Kh(e,t,$h(e)))),preventDefault:!0},{key:"ArrowUp",run:Fh,shift:rc,preventDefault:!0},{mac:"Cmd-ArrowUp",run:cc,shift:uc},{mac:"Ctrl-ArrowUp",run:Gh,shift:lc},{key:"ArrowDown",run:Hh,shift:oc,preventDefault:!0},{mac:"Cmd-ArrowDown",run:dc,shift:pc},{mac:"Ctrl-ArrowDown",run:Zh,shift:hc},{key:"PageUp",run:Gh,shift:lc},{key:"PageDown",run:Zh,shift:hc},{key:"Home",run:e=>Lh(e,(t=>Kh(e,t,!1))),shift:e=>Jh(e,(t=>Kh(e,t,!1))),preventDefault:!0},{key:"Mod-Home",run:cc,shift:uc},{key:"End",run:e=>Lh(e,(t=>Kh(e,t,!0))),shift:e=>Jh(e,(t=>Kh(e,t,!0))),preventDefault:!0},{key:"Mod-End",run:dc,shift:pc},{key:"Enter",run:Sc},{key:"Mod-a",run:({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:vc,shift:vc},{key:"Delete",run:Oc},{key:"Mod-Backspace",mac:"Alt-Backspace",run:_c},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>bc(e,!0)},{mac:"Mod-Backspace",run:e=>fc(e,(t=>{let i=e.moveToLineBoundary(t,!1).head;return t.head>i?i:Math.max(0,t.head-1)}))},{mac:"Mod-Delete",run:e=>fc(e,(t=>{let i=e.moveToLineBoundary(t,!0).head;return t.headLh(e,(t=>R.cursor(e.lineBlockAt(t.head).from,1))),shift:e=>Jh(e,(t=>R.cursor(e.lineBlockAt(t.head).from)))},{key:"Ctrl-e",run:e=>Lh(e,(t=>R.cursor(e.lineBlockAt(t.head).to,-1))),shift:e=>Jh(e,(t=>R.cursor(e.lineBlockAt(t.head).to)))},{key:"Ctrl-d",run:Oc},{key:"Ctrl-h",run:vc},{key:"Ctrl-k",run:e=>fc(e,(t=>{let i=e.lineBlockAt(t.head).to;return t.head{if(t.readOnly)return!1;let n=t.changeByRange((t=>({changes:{from:t.from,to:t.to,insert:e.of(["",""])},range:R.cursor(t.from)})));return i(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=e.changeByRange((t=>{if(!t.empty||0==t.from||t.from==e.doc.length)return{range:t};let i=t.from,n=e.doc.lineAt(i),s=i==n.from?i-1:p(n.text,i-n.from,!1)+n.from,r=i==n.to?i+1:p(n.text,i-n.from,!0)+n.from;return{changes:{from:s,to:r,insert:e.doc.slice(i,r).append(e.doc.slice(s,i))},range:R.cursor(r)}}));return!i.changes.empty&&(t(e.update(i,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:Zh}].map((e=>({mac:e.key,run:e.run,shift:e.shift})))));function Pc(){var e=arguments[0];"string"==typeof e&&(e=document.createElement(e));var t=1,i=arguments[1];if(i&&"object"==typeof i&&null==i.nodeType&&!Array.isArray(i)){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var s=i[n];"string"==typeof s?e.setAttribute(n,s):null!=s&&(e[n]=s)}t++}for(;te.normalize("NFKD"):e=>e;class Ac{constructor(e,t,i=0,n=e.length,s,r){this.test=r,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,n),this.bufferStart=i,this.normalize=s?e=>s(Ec(e)):Ec,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return O(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=b(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=_(e);let n=this.normalize(t);for(let e=0,s=i;;e++){let r=n.charCodeAt(e),o=this.match(r,s);if(e==n.length-1){if(o)return this.value=o,this;break}s==i&&ethis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let i=this.curLineStart+t.index,n=i+t[0].length;if(this.matchPos=Bc(this.text,n+(i==n?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,n,t)))return this.value={from:i,to:n,match:t},this;e=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length=i||n.to<=t){let n=new Lc(t,e.sliceString(t,i));return qc.set(e,n),n}if(n.from==t&&n.to==i)return n;let{text:s,from:r}=n;return r>t&&(s=e.sliceString(t,r)+s,r=t),n.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,i=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,i,t)))return this.value={from:e,to:i,match:t},this.matchPos=Bc(this.text,i+(e==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Lc.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function Bc(e,t){if(t>=e.length)return t;let i,n=e.lineAt(t);for(;t=56320&&i<57344;)t++;return t}function $c(e){let t=Pc("input",{class:"cm-textfield",name:"line",value:String(e.state.doc.lineAt(e.state.selection.main.head).number)});function i(){let i=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!i)return;let{state:n}=e,s=n.doc.lineAt(n.selection.main.head),[,r,o,a,l]=i,h=a?+a.slice(1):0,c=o?+o:s.number;if(o&&l){let e=c/100;r&&(e=e*("-"==r?-1:1)+s.number/n.doc.lines),c=Math.round(n.doc.lines*e)}else o&&r&&(c=c*("-"==r?-1:1)+s.number);let d=n.doc.line(Math.max(1,Math.min(n.doc.lines,c))),u=R.cursor(d.from+Math.max(0,Math.min(h,d.length)));e.dispatch({effects:[Qc.of(!1),Ds.scrollIntoView(u.from,{y:"center"})],selection:u}),e.focus()}return{dom:Pc("form",{class:"cm-gotoLine",onkeydown:t=>{27==t.keyCode?(t.preventDefault(),e.dispatch({effects:Qc.of(!1)}),e.focus()):13==t.keyCode&&(t.preventDefault(),i())},onsubmit:e=>{e.preventDefault(),i()}},Pc("label",e.state.phrase("Go to line"),": ",t)," ",Pc("button",{class:"cm-button",type:"submit"},e.state.phrase("go")))}}"undefined"!=typeof Symbol&&(Ic.prototype[Symbol.iterator]=Nc.prototype[Symbol.iterator]=function(){return this});const Qc=ae.define(),zc=j.define({create:()=>!0,update(e,t){for(let i of t.effects)i.is(Qc)&&(e=i.value);return e},provide:e=>Kr.from(e,(e=>e?$c:null))}),jc=Ds.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),Wc={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Vc=q.define({combine:e=>be(e,Wc,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})});function Uc(e){let t=[Gc,Yc];return e&&t.push(Vc.of(e)),t}const Fc=Yt.mark({class:"cm-selectionMatch"}),Hc=Yt.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Xc(e,t,i,n){return!(0!=i&&e(t.sliceDoc(i-1,i))==me.Word||n!=t.doc.length&&e(t.sliceDoc(n,n+1))==me.Word)}const Yc=bi.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(Vc),{state:i}=e,n=i.selection;if(n.ranges.length>1)return Yt.none;let s,r=n.main,o=null;if(r.empty){if(!t.highlightWordAroundCursor)return Yt.none;let e=i.wordAt(r.head);if(!e)return Yt.none;o=i.charCategorizer(r.head),s=i.sliceDoc(e.from,e.to)}else{let e=r.to-r.from;if(e200)return Yt.none;if(t.wholeWords){if(s=i.sliceDoc(r.from,r.to),o=i.charCategorizer(r.head),!Xc(o,i,r.from,r.to)||!function(e,t,i,n){return e(t.sliceDoc(i,i+1))==me.Word&&e(t.sliceDoc(n-1,n))==me.Word}(o,i,r.from,r.to))return Yt.none}else if(s=i.sliceDoc(r.from,r.to).trim(),!s)return Yt.none}let a=[];for(let n of e.visibleRanges){let e=new Ac(i.doc,s,n.from,n.to);for(;!e.next().done;){let{from:n,to:s}=e.value;if((!o||Xc(o,i,n,s))&&(r.empty&&n<=r.from&&s>=r.to?a.push(Hc.range(n,s)):(n>=r.to||s<=r.from)&&a.push(Fc.range(n,s)),a.length>t.maxMatches))return Yt.none}}return Yt.set(a)}},{decorations:e=>e.decorations}),Gc=Ds.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),Zc=q.define({combine:e=>be(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new Td(e),scrollToMatch:e=>Ds.scrollIntoView(e)})});class Kc{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,Dc),!0}catch(e){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,((e,t)=>"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\"))}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new rd(this):new td(this)}getCursor(e,t=0,i){let n=e.doc?e:Oe.create({doc:e});return null==i&&(i=n.doc.length),this.regexp?id(this,n,t,i):ed(this,n,t,i)}}class Jc{constructor(e){this.spec=e}}function ed(e,t,i,n){return new Ac(t.doc,e.unquoted,i,n,e.caseSensitive?void 0:e=>e.toLowerCase(),e.wholeWord?function(e,t){return(i,n,s,r)=>((r>i||r+s.length=t)return null;n.push(i.value)}return n}highlight(e,t,i,n){let s=ed(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)n(s.value.from,s.value.to)}}function id(e,t,i,n){return new Ic(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?(s=t.charCategorizer(t.selection.main.head),(e,t,i)=>!i[0].length||(s(nd(i.input,i.index))!=me.Word||s(sd(i.input,i.index))!=me.Word)&&(s(sd(i.input,i.index+i[0].length))!=me.Word||s(nd(i.input,i.index+i[0].length))!=me.Word)):void 0},i,n);var s}function nd(e,t){return e.slice(p(e,t,!1),t)}function sd(e,t){return e.slice(t,p(e,t))}class rd extends Jc{nextMatch(e,t,i){let n=id(this.spec,e,i,e.doc.length).next();return n.done&&(n=id(this.spec,e,0,t).next()),n.done?null:n.value}prevMatchInRange(e,t,i){for(let n=1;;n++){let s=Math.max(t,i-1e4*n),r=id(this.spec,e,s,i),o=null;for(;!r.next().done;)o=r.value;if(o&&(s==t||o.from>s+10))return o;if(s==t)return null}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,((t,i)=>"$"==i?"$":"&"==i?e.match[0]:"0"!=i&&+i=t)return null;n.push(i.value)}return n}highlight(e,t,i,n){let s=id(this.spec,e,Math.max(0,t-250),Math.min(i+250,e.doc.length));for(;!s.next().done;)n(s.value.from,s.value.to)}}const od=ae.define(),ad=ae.define(),ld=j.define({create:e=>new hd(_d(e).create(),null),update(e,t){for(let i of t.effects)i.is(od)?e=new hd(i.value.create(),e.panel):i.is(ad)&&(e=new hd(e.query,i.value?bd:null));return e},provide:e=>Kr.from(e,(e=>e.panel))});class hd{constructor(e,t){this.query=e,this.panel=t}}const cd=Yt.mark({class:"cm-searchMatch"}),dd=Yt.mark({class:"cm-searchMatch cm-searchMatch-selected"}),ud=bi.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(ld))}update(e){let t=e.state.field(ld);(t!=e.startState.field(ld)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return Yt.none;let{view:i}=this,n=new ke;for(let t=0,s=i.visibleRanges,r=s.length;ts[t+1].from-500;)a=s[++t].to;e.highlight(i.state,o,a,((e,t)=>{let s=i.state.selection.ranges.some((i=>i.from==e&&i.to==t));n.add(e,t,s?dd:cd)}))}return n.finish()}},{decorations:e=>e.decorations});function pd(e){return t=>{let i=t.state.field(ld,!1);return i&&i.query.spec.valid?e(t,i):xd(t)}}const fd=pd(((e,{query:t})=>{let{to:i}=e.state.selection.main,n=t.nextMatch(e.state,i,i);if(!n)return!1;let s=R.single(n.from,n.to),r=e.state.facet(Zc);return e.dispatch({selection:s,effects:[Ed(e,n),r.scrollToMatch(s.main,e)],userEvent:"select.search"}),wd(e),!0})),md=pd(((e,{query:t})=>{let{state:i}=e,{from:n}=i.selection.main,s=t.prevMatch(i,n,n);if(!s)return!1;let r=R.single(s.from,s.to),o=e.state.facet(Zc);return e.dispatch({selection:r,effects:[Ed(e,s),o.scrollToMatch(r.main,e)],userEvent:"select.search"}),wd(e),!0})),gd=pd(((e,{query:t})=>{let i=t.matchAll(e.state,1e3);return!(!i||!i.length||(e.dispatch({selection:R.create(i.map((e=>R.range(e.from,e.to)))),userEvent:"select.search.matches"}),0))})),vd=pd(((e,{query:t})=>{let{state:i}=e,{from:n,to:s}=i.selection.main;if(i.readOnly)return!1;let r=t.nextMatch(i,n,n);if(!r)return!1;let o,a,l=[],h=[];if(r.from==n&&r.to==s&&(a=i.toText(t.getReplacement(r)),l.push({from:r.from,to:r.to,insert:a}),r=t.nextMatch(i,r.from,r.to),h.push(Ds.announce.of(i.phrase("replaced match on line $",i.doc.lineAt(n).number)+"."))),r){let t=0==l.length||l[0].from>=r.to?0:r.to-r.from-a.length;o=R.single(r.from-t,r.to-t),h.push(Ed(e,r)),h.push(i.facet(Zc).scrollToMatch(o.main,e))}return e.dispatch({changes:l,selection:o,effects:h,userEvent:"input.replace"}),!0})),Od=pd(((e,{query:t})=>{if(e.state.readOnly)return!1;let i=t.matchAll(e.state,1e9).map((e=>{let{from:i,to:n}=e;return{from:i,to:n,insert:t.getReplacement(e)}}));if(!i.length)return!1;let n=e.state.phrase("replaced $ matches",i.length)+".";return e.dispatch({changes:i,effects:Ds.announce.of(n),userEvent:"input.replace.all"}),!0}));function bd(e){return e.state.facet(Zc).createPanel(e)}function _d(e,t){var i,n,s,r,o;let a=e.selection.main,l=a.empty||a.to>a.from+100?"":e.sliceDoc(a.from,a.to);if(t&&!l)return t;let h=e.facet(Zc);return new Kc({search:(null!==(i=null==t?void 0:t.literal)&&void 0!==i?i:h.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:null!==(n=null==t?void 0:t.caseSensitive)&&void 0!==n?n:h.caseSensitive,literal:null!==(s=null==t?void 0:t.literal)&&void 0!==s?s:h.literal,regexp:null!==(r=null==t?void 0:t.regexp)&&void 0!==r?r:h.regexp,wholeWord:null!==(o=null==t?void 0:t.wholeWord)&&void 0!==o?o:h.wholeWord})}function yd(e){let t=Xr(e,bd);return t&&t.dom.querySelector("[main-field]")}function wd(e){let t=yd(e);t&&t==e.root.activeElement&&t.select()}const xd=e=>{let t=e.state.field(ld,!1);if(t&&t.panel){let i=yd(e);if(i&&i!=e.root.activeElement){let n=_d(e.state,t.query.spec);n.valid&&e.dispatch({effects:od.of(n)}),i.focus(),i.select()}}else e.dispatch({effects:[ad.of(!0),t?od.of(_d(e.state,t.query.spec)):ae.appendConfig.of(Rd)]});return!0},Sd=e=>{let t=e.state.field(ld,!1);if(!t||!t.panel)return!1;let i=Xr(e,bd);return i&&i.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:ad.of(!1)}),!0},kd=[{key:"Mod-f",run:xd,scope:"editor search-panel"},{key:"F3",run:fd,shift:md,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:fd,shift:md,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Sd,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:e,dispatch:t})=>{let i=e.selection;if(i.ranges.length>1||i.main.empty)return!1;let{from:n,to:s}=i.main,r=[],o=0;for(let t=new Ac(e.doc,e.sliceDoc(n,s));!t.next().done;){if(r.length>1e3)return!1;t.value.from==n&&(o=r.length),r.push(R.range(t.value.from,t.value.to))}return t(e.update({selection:R.create(r,o),userEvent:"select.search.matches"})),!0}},{key:"Alt-g",run:e=>{let t=Xr(e,$c);if(!t){let i=[Qc.of(!0)];null==e.state.field(zc,!1)&&i.push(ae.appendConfig.of([zc,jc])),e.dispatch({effects:i}),t=Xr(e,$c)}return t&&t.dom.querySelector("input").select(),!0}},{key:"Mod-d",run:({state:e,dispatch:t})=>{let{ranges:i}=e.selection;if(i.some((e=>e.from===e.to)))return(({state:e,dispatch:t})=>{let{selection:i}=e,n=R.create(i.ranges.map((t=>e.wordAt(t.head)||R.cursor(t.head))),i.mainIndex);return!n.eq(i)&&(t(e.update({selection:n})),!0)})({state:e,dispatch:t});let n=e.sliceDoc(i[0].from,i[0].to);if(e.selection.ranges.some((t=>e.sliceDoc(t.from,t.to)!=n)))return!1;let s=function(e,t){let{main:i,ranges:n}=e.selection,s=e.wordAt(i.head),r=s&&s.from==i.from&&s.to==i.to;for(let i=!1,s=new Ac(e.doc,t,n[n.length-1].to);;){if(s.next(),!s.done){if(i&&n.some((e=>e.from==s.value.from)))continue;if(r){let t=e.wordAt(s.value.from);if(!t||t.from!=s.value.from||t.to!=s.value.to)continue}return s.value}if(i)return null;s=new Ac(e.doc,t,0,Math.max(0,n[n.length-1].from-1)),i=!0}}(e,n);return!!s&&(t(e.update({selection:e.selection.addRange(R.range(s.from,s.to),!1),effects:Ds.scrollIntoView(s.to)})),!0)},preventDefault:!0}];class Td{constructor(e){this.view=e;let t=this.query=e.state.field(ld).query.spec;function i(e,t,i){return Pc("button",{class:"cm-button",name:e,onclick:t,type:"button"},i)}this.commit=this.commit.bind(this),this.searchField=Pc("input",{value:t.search,placeholder:Cd(e,"Find"),"aria-label":Cd(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Pc("input",{value:t.replace,placeholder:Cd(e,"Replace"),"aria-label":Cd(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Pc("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=Pc("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=Pc("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit}),this.dom=Pc("div",{onkeydown:e=>this.keydown(e),class:"cm-search"},[this.searchField,i("next",(()=>fd(e)),[Cd(e,"next")]),i("prev",(()=>md(e)),[Cd(e,"previous")]),i("select",(()=>gd(e)),[Cd(e,"all")]),Pc("label",null,[this.caseField,Cd(e,"match case")]),Pc("label",null,[this.reField,Cd(e,"regexp")]),Pc("label",null,[this.wordField,Cd(e,"by word")]),...e.state.readOnly?[]:[Pc("br"),this.replaceField,i("replace",(()=>vd(e)),[Cd(e,"replace")]),i("replaceAll",(()=>Od(e)),[Cd(e,"replace all")])],Pc("button",{name:"close",onclick:()=>Sd(e),"aria-label":Cd(e,"close"),type:"button"},["×"])])}commit(){let e=new Kc({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:od.of(e)}))}keydown(e){var t,i;i=e,Fs(Ws((t=this.view).state),i,t,"search-panel")?e.preventDefault():13==e.keyCode&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?md:fd)(this.view)):13==e.keyCode&&e.target==this.replaceField&&(e.preventDefault(),vd(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(od)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Zc).top}}function Cd(e,t){return e.state.phrase(t)}const Pd=30,Md=/[\s\.,:;?!]/;function Ed(e,{from:t,to:i}){let n=e.state.doc.lineAt(t),s=e.state.doc.lineAt(i).to,r=Math.max(n.from,t-Pd),o=Math.min(s,i+Pd),a=e.state.sliceDoc(r,o);if(r!=n.from)for(let e=0;ea.length-Pd;e--)if(!Md.test(a[e-1])&&Md.test(a[e])){a=a.slice(0,e);break}return Ds.announce.of(`${e.state.phrase("current match")}. ${a} ${e.state.phrase("on line")} ${n.number}.`)}const Ad=Ds.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),Rd=[ld,V.low(ud),Ad];class Dd{constructor(e,t,i){this.state=e,this.pos=t,this.explicit=i,this.abortListeners=[]}tokenBefore(e){let t=Da(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),i=Math.max(t.from,this.pos-250),n=t.text.slice(i-t.from,this.pos-t.from),s=n.search($d(e,!1));return s<0?null:{from:i+s,to:this.pos,text:n.slice(s)}}get aborted(){return null==this.abortListeners}addEventListener(e,t){"abort"==e&&this.abortListeners&&this.abortListeners.push(t)}}function Id(e){let t=Object.keys(e).join(""),i=/\w/.test(t);return i&&(t=t.replace(/\w/g,"")),`[${i?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function qd(e){let t=e.map((e=>"string"==typeof e?{label:e}:e)),[i,n]=t.every((e=>/^\w+$/.test(e.label)))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),i=Object.create(null);for(let{label:n}of e){t[n[0]]=!0;for(let e=1;e{let s=e.matchBefore(n);return s||e.explicit?{from:s?s.from:e.pos,options:t,validFor:i}:null}}function Ld(e,t){return i=>{for(let t=Da(i.state).resolveInner(i.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(i)}}class Nd{constructor(e,t,i,n){this.completion=e,this.source=t,this.match=i,this.score=n}}function Bd(e){return e.selection.main.from}function $d(e,t){var i;let{source:n}=e,s=t&&"^"!=n[0],r="$"!=n[n.length-1];return s||r?new RegExp(`${s?"^":""}(?:${n})${r?"$":""}`,null!==(i=e.flags)&&void 0!==i?i:e.ignoreCase?"i":""):e}const Qd=se.define(),zd=new WeakMap;function jd(e){if(!Array.isArray(e))return e;let t=zd.get(e);return t||zd.set(e,t=qd(e)),t}const Wd=ae.define(),Vd=ae.define();class Ud{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t=48&&l<=57||l>=97&&l<=122?2:l>=65&&l<=90?1:0:(y=b(l))!=y.toLowerCase()?1:y!=y.toUpperCase()?2:0;(!n||1==w&&m||0==v&&0!=w)&&(t[c]==l||i[c]==l&&(d=!0)?r[c++]=n:r.length&&(g=!1)),v=w,n+=_(l)}return c==a&&0==r[0]&&g?this.result((d?-200:0)-100,r,e):u==a&&0==p?this.ret(-200-e.length+(f==e.length?0:-100),[0,f]):o>-1?this.ret(-700-e.length,[o,o+this.pattern.length]):u==a?this.ret(-900-e.length,[p,f]):c==a?this.result((d?-200:0)-100-700+(g?0:-1100),r,e):2!=t.length&&this.result((n[0]?-700:0)-200-1100,n,e)}result(e,t,i){let n=[],s=0;for(let e of t){let t=e+(this.astral?_(O(i,e)):1);s&&n[s-1]==e?n[s-1]=t:(n[s++]=e,n[s++]=t)}return this.ret(e-i.length,n)}}const Fd=q.define({combine:e=>be(e,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Xd,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>i=>Hd(e(i),t(i)),optionClass:(e,t)=>i=>Hd(e(i),t(i)),addToOptions:(e,t)=>e.concat(t)})});function Hd(e,t){return e?t?e+" "+t:e:t}function Xd(e,t,i,n,s,r){let o,a,l=e.textDirection==Ri.RTL,h=l,c=!1,d="top",u=t.left-s.left,p=s.right-t.right,f=n.right-n.left,m=n.bottom-n.top;if(h&&u=m||e>t.top?o=i.bottom-t.top:(d="bottom",o=t.bottom-i.top)}return{style:`${d}: ${o/((t.bottom-t.top)/r.offsetHeight)}px; max-width: ${a/((t.right-t.left)/r.offsetWidth)}px`,class:"cm-completionInfo-"+(c?l?"left-narrow":"right-narrow":h?"left":"right")}}function Yd(e,t,i){if(e<=i)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/i);return{from:e*i,to:(e+1)*i}}let n=Math.floor((e-t)/i);return{from:e-(n+1)*i,to:e-n*i}}class Gd{constructor(e,t,i){this.view=e,this.stateField=t,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass="";let n=e.state.field(t),{options:s,selected:r}=n.open,o=e.state.facet(Fd);this.optionContent=function(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement("div");return t.classList.add("cm-completionIcon"),e.type&&t.classList.add(...e.type.split(/\s+/g).map((e=>"cm-completionIcon-"+e))),t.setAttribute("aria-hidden","true"),t},position:20}),t.push({render(e,t,i){let n=document.createElement("span");n.className="cm-completionLabel";let s=e.displayLabel||e.label,r=0;for(let e=0;er&&n.appendChild(document.createTextNode(s.slice(r,t)));let a=n.appendChild(document.createElement("span"));a.appendChild(document.createTextNode(s.slice(t,o))),a.className="cm-completionMatchedText",r=o}return re.position-t.position)).map((e=>e.render))}(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=Yd(s.length,r,o.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",(i=>{let{options:n}=e.state.field(t).open;for(let t,s=i.target;s&&s!=this.dom;s=s.parentNode)if("LI"==s.nodeName&&(t=/-(\d+)$/.exec(s.id))&&+t[1]{let i=e.state.field(this.stateField,!1);i&&i.tooltip&&e.state.facet(Fd).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:Vd.of(null)})})),this.showOptions(s,n.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)}))}update(e){var t;let i=e.state.field(this.stateField),n=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),i!=n){let{options:s,selected:r,disabled:o}=i.open;n.open&&n.open.options==s||(this.range=Yd(s.length,r,e.state.facet(Fd).maxRenderedOptions),this.showOptions(s,i.id)),this.updateSel(),o!=(null===(t=n.open)||void 0===t?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!o)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(" "))e&&this.dom.classList.remove(e);for(let e of t.split(" "))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected=this.range.to)&&(this.range=Yd(t.options.length,t.selected,this.view.state.facet(Fd).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:i}=t.options[t.selected],{info:n}=i;if(!n)return;let s="string"==typeof n?document.createTextNode(n):n(i);if(!s)return;"then"in s?s.then((t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,i)})).catch((e=>mi(this.view.state,e,"completion info"))):this.addInfoPane(s,i)}}addInfoPane(e,t){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",null!=e.nodeType)i.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:n}=e;i.appendChild(t),this.infoDestroy=n||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let i=this.list.firstChild,n=this.range.from;i;i=i.nextSibling,n++)"LI"==i.nodeName&&i.id?n==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),t=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected"):n--;return t&&function(e,t){let i=e.getBoundingClientRect(),n=t.getBoundingClientRect(),s=i.height/e.offsetHeight;n.topi.bottom&&(e.scrollTop+=(n.bottom-i.bottom)/s)}(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),n=e.getBoundingClientRect(),s=this.space;if(!s){let e=this.dom.ownerDocument.defaultView||window;s={left:0,top:0,right:e.innerWidth,bottom:e.innerHeight}}return n.top>Math.min(s.bottom,t.bottom)-10||n.bottomi.from||0==i.from)&&(s=e,"string"!=typeof l&&l.header?n.appendChild(l.header(l)):n.appendChild(document.createElement("completion-section")).textContent=e)}const h=n.appendChild(document.createElement("li"));h.id=t+"-"+r,h.setAttribute("role","option");let c=this.optionClass(o);c&&(h.className=c);for(let e of this.optionContent){let t=e(o,this.view.state,a);t&&h.appendChild(t)}}return i.from&&n.classList.add("cm-completionListIncompleteTop"),i.tonew Gd(i,e,t)}function Kd(e){return 100*(e.boost||0)+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}class Jd{constructor(e,t,i,n,s,r){this.options=e,this.attrs=t,this.tooltip=i,this.timestamp=n,this.selected=s,this.disabled=r}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new Jd(this.options,iu(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,i,n,s){let r=function(e,t){let i=[],n=null,s=e=>{i.push(e);let{section:t}=e.completion;if(t){n||(n=[]);let e="string"==typeof t?t:t.name;n.some((t=>t.name==e))||n.push("string"==typeof t?{name:e}:t)}};for(let n of e)if(n.hasResult()){let e=n.result.getMatch;if(!1===n.result.filter)for(let t of n.result.options)s(new Nd(t,n.source,e?e(t):[],1e9-i.length));else{let i=new Ud(t.sliceDoc(n.from,n.to));for(let t of n.result.options)if(i.match(t.label)){let r=t.displayLabel?e?e(t,i.matched):[]:i.matched;s(new Nd(t,n.source,r,i.score+(t.boost||0)))}}}if(n){let e=Object.create(null),t=0,s=(e,t)=>{var i,n;return(null!==(i=e.rank)&&void 0!==i?i:1e9)-(null!==(n=t.rank)&&void 0!==n?n:1e9)||(e.namet.score-e.score||a(e.completion,t.completion)))){let t=e.completion;!o||o.label!=t.label||o.detail!=t.detail||null!=o.type&&null!=t.type&&o.type!=t.type||o.apply!=t.apply||o.boost!=t.boost?r.push(e):Kd(e.completion)>Kd(o)&&(r[r.length-1]=e),o=e.completion}return r}(e,t);if(!r.length)return n&&e.some((e=>1==e.state))?new Jd(n.options,n.attrs,n.tooltip,n.timestamp,n.selected,!0):null;let o=t.facet(Fd).selectOnOpen?0:-1;if(n&&n.selected!=o&&-1!=n.selected){let e=n.options[n.selected].completion;for(let t=0;tt.hasResult()?Math.min(e,t.from):e),1e8),create:du,above:s.aboveCursor},n?n.timestamp:Date.now(),o,!1)}map(e){return new Jd(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class eu{constructor(e,t,i){this.active=e,this.id=t,this.open=i}static start(){return new eu(nu,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,i=t.facet(Fd),n=(i.override||t.languageDataAt("autocomplete",Bd(t)).map(jd)).map((t=>(this.active.find((e=>e.source==t))||new ru(t,this.active.some((e=>0!=e.state))?1:0)).update(e,i)));n.length==this.active.length&&n.every(((e,t)=>e==this.active[t]))&&(n=this.active);let s=this.open;s&&e.docChanged&&(s=s.map(e.changes)),e.selection||n.some((t=>t.hasResult()&&e.changes.touchesRange(t.from,t.to)))||!function(e,t){if(e==t)return!0;for(let i=0,n=0;;){for(;i1==e.state))&&(s=null),!s&&n.every((e=>1!=e.state))&&n.some((e=>e.hasResult()))&&(n=n.map((e=>e.hasResult()?new ru(e.source,0):e)));for(let t of e.effects)t.is(lu)&&(s=s&&s.setSelected(t.value,this.id));return n==this.active&&s==this.open?this:new eu(n,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:tu}}const tu={"aria-autocomplete":"list"};function iu(e,t){let i={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(i["aria-activedescendant"]=e+"-"+t),i}const nu=[];function su(e){return e.isUserEvent("input.type")?"input":e.isUserEvent("delete.backward")?"delete":null}class ru{constructor(e,t,i=-1){this.source=e,this.state=t,this.explicitPos=i}hasResult(){return!1}update(e,t){let i=su(e),n=this;i?n=n.handleUserEvent(e,i,t):e.docChanged?n=n.handleChange(e):e.selection&&0!=n.state&&(n=new ru(n.source,0));for(let t of e.effects)if(t.is(Wd))n=new ru(n.source,1,t.value?Bd(e.state):-1);else if(t.is(Vd))n=new ru(n.source,0);else if(t.is(au))for(let e of t.value)e.source==n.source&&(n=e);return n}handleUserEvent(e,t,i){return"delete"!=t&&i.activateOnTyping?new ru(this.source,1):this.map(e.changes)}handleChange(e){return e.changes.touchesRange(Bd(e.startState))?new ru(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new ru(this.source,this.state,e.mapPos(this.explicitPos))}}class ou extends ru{constructor(e,t,i,n,s){super(e,2,t),this.result=i,this.from=n,this.to=s}hasResult(){return!0}handleUserEvent(e,t,i){var n;let s=e.changes.mapPos(this.from),r=e.changes.mapPos(this.to,1),o=Bd(e.state);if((this.explicitPos<0?o<=s:or||"delete"==t&&Bd(e.startState)==this.from)return new ru(this.source,"input"==t&&i.activateOnTyping?1:0);let a,l=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return function(e,t,i,n){if(!e)return!1;let s=t.sliceDoc(i,n);return"function"==typeof e?e(s,i,n,t):$d(e,!0).test(s)}(this.result.validFor,e.state,s,r)?new ou(this.source,l,this.result,s,r):this.result.update&&(a=this.result.update(this.result,s,r,new Dd(e.state,o,l>=0)))?new ou(this.source,l,a,a.from,null!==(n=a.to)&&void 0!==n?n:Bd(e.state)):new ru(this.source,1,l)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new ru(this.source,0):this.map(e.changes)}map(e){return e.empty?this:new ou(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}}const au=ae.define({map:(e,t)=>e.map((e=>e.map(t)))}),lu=ae.define(),hu=j.define({create:()=>eu.start(),update:(e,t)=>e.update(t),provide:e=>[Br.from(e,(e=>e.tooltip)),Ds.contentAttributes.from(e,(e=>e.attrs))]});function cu(e,t){const i=t.completion.apply||t.completion.label;let n=e.state.field(hu).active.find((e=>e.source==t.source));return n instanceof ou&&("string"==typeof i?e.dispatch(Object.assign(Object.assign({},function(e,t,i,n){let{main:s}=e.selection,r=i-s.from,o=n-s.from;return Object.assign(Object.assign({},e.changeByRange((a=>a!=s&&i!=n&&e.sliceDoc(a.from+r,a.from+o)!=e.sliceDoc(i,n)?{range:a}:{changes:{from:a.from+r,to:n==s.from?a.to:a.from+o,insert:t},range:R.cursor(a.from+r+t.length)}))),{scrollIntoView:!0,userEvent:"input.complete"})}(e.state,i,n.from,n.to)),{annotations:Qd.of(t.completion)})):i(e,t.completion,n.from,n.to),!0)}const du=Zd(hu,cu);function uu(e,t="option"){return i=>{let n=i.state.field(hu,!1);if(!n||!n.open||n.open.disabled||Date.now()-n.open.timestamp-1?n.open.selected+r*(e?1:-1):e?0:o-1;return a<0?a="page"==t?0:o-1:a>=o&&(a="page"==t?o-1:0),i.dispatch({effects:lu.of(a)}),!0}}class pu{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const fu=bi.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let t of e.state.field(hu).active)1==t.state&&this.startQuery(t)}update(e){let t=e.state.field(hu);if(!e.selectionSet&&!e.docChanged&&e.startState.field(hu)==t)return;let i=e.transactions.some((e=>(e.selection||e.docChanged)&&!su(e)));for(let t=0;t50&&Date.now()-n.time>1e3){for(let e of n.context.abortListeners)try{e()}catch(e){mi(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=t.active.some((e=>1==e.state&&!this.running.some((t=>t.active.source==e.source))))?setTimeout((()=>this.startUpdate()),50):-1,0!=this.composing)for(let t of e.transactions)"input"==su(t)?this.composing=2:2==this.composing&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:e}=this.view,t=e.field(hu);for(let e of t.active)1!=e.state||this.running.some((t=>t.active.source==e.source))||this.startQuery(e)}startQuery(e){let{state:t}=this.view,i=Bd(t),n=new Dd(t,i,e.explicitPos==i),s=new pu(e,n);this.running.push(s),Promise.resolve(e.source(n)).then((e=>{s.context.aborted||(s.done=e||null,this.scheduleAccept())}),(e=>{this.view.dispatch({effects:Vd.of(null)}),mi(this.view.state,e)}))}scheduleAccept(){this.running.every((e=>void 0!==e.done))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(Fd).updateSyncTime))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],i=this.view.state.facet(Fd);for(let n=0;ne.source==s.active.source));if(r&&1==r.state)if(null==s.done){let e=new ru(s.active.source,0);for(let t of s.updates)e=e.update(t,i);1!=e.state&&t.push(e)}else this.startQuery(r)}t.length&&this.view.dispatch({effects:au.of(t)})}},{eventHandlers:{blur(e){let t=this.view.state.field(hu,!1);if(t&&t.tooltip&&this.view.state.facet(Fd).closeOnBlur){let i=t.open&&Ur(this.view,t.open.tooltip);i&&i.dom.contains(e.relatedTarget)||this.view.dispatch({effects:Vd.of(null)})}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:Wd.of(!1)})),20),this.composing=0}}}),mu=Ds.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class gu{constructor(e,t,i,n){this.field=e,this.line=t,this.from=i,this.to=n}}class vu{constructor(e,t,i){this.field=e,this.from=t,this.to=i}map(e){let t=e.mapPos(this.from,-1,w.TrackDel),i=e.mapPos(this.to,1,w.TrackDel);return null==t||null==i?null:new vu(this.field,t,i)}}class Ou{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let i=[],n=[t],s=e.doc.lineAt(t),r=/^\s*/.exec(s.text)[0];for(let s of this.lines){if(i.length){let i=r,o=/^\t*/.exec(s)[0].length;for(let t=0;tnew vu(e.field,n[e.line]+e.from,n[e.line]+e.to)));return{text:i,ranges:o}}static parse(e){let t,i=[],n=[],s=[];for(let r of e.split(/\r\n?|\n/)){for(;t=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(r);){let e=t[1]?+t[1]:null,o=t[2]||t[3]||"",a=-1;for(let t=0;t=a&&e.field++}s.push(new gu(a,n.length,t.index,t.index+o.length)),r=r.slice(0,t.index)+o+r.slice(t.index+t[0].length)}for(let e;e=/\\([{}])/.exec(r);){r=r.slice(0,e.index)+e[1]+r.slice(e.index+e[0].length);for(let t of s)t.line==n.length&&t.from>e.index&&(t.from--,t.to--)}n.push(r)}return new Ou(n,s)}}let bu=Yt.widget({widget:new class extends Ht{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),_u=Yt.mark({class:"cm-snippetField"});class yu{constructor(e,t){this.ranges=e,this.active=t,this.deco=Yt.set(e.map((e=>(e.from==e.to?bu:_u).range(e.from,e.to))))}map(e){let t=[];for(let i of this.ranges){let n=i.map(e);if(!n)return null;t.push(n)}return new yu(t,this.active)}selectionInsideField(e){return e.ranges.every((e=>this.ranges.some((t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))))}}const wu=ae.define({map:(e,t)=>e&&e.map(t)}),xu=ae.define(),Su=j.define({create:()=>null,update(e,t){for(let i of t.effects){if(i.is(wu))return i.value;if(i.is(xu)&&e)return new yu(e.ranges,i.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>Ds.decorations.from(e,(e=>e?e.deco:Yt.none))});function ku(e,t){return R.create(e.filter((e=>e.field==t)).map((e=>R.range(e.from,e.to))))}function Tu(t){let i=Ou.parse(t);return(t,n,s,r)=>{let{text:o,ranges:a}=i.instantiate(t.state,s),l={changes:{from:s,to:r,insert:e.of(o)},scrollIntoView:!0,annotations:n?Qd.of(n):void 0};if(a.length&&(l.selection=ku(a,0)),a.length>1){let e=new yu(a,0),i=l.effects=[wu.of(e)];void 0===t.state.field(Su,!1)&&i.push(ae.appendConfig.of([Su,Eu,Ru,mu]))}t.dispatch(t.state.update(l))}}function Cu(e){return({state:t,dispatch:i})=>{let n=t.field(Su,!1);if(!n||e<0&&0==n.active)return!1;let s=n.active+e,r=e>0&&!n.ranges.some((t=>t.field==s+e));return i(t.update({selection:ku(n.ranges,s),effects:wu.of(r?null:new yu(n.ranges,s)),scrollIntoView:!0})),!0}}const Pu=[{key:"Tab",run:Cu(1),shift:Cu(-1)},{key:"Escape",run:({state:e,dispatch:t})=>!!e.field(Su,!1)&&(t(e.update({effects:wu.of(null)})),!0)}],Mu=q.define({combine:e=>e.length?e[0]:Pu}),Eu=V.highest(zs.compute([Mu],(e=>e.facet(Mu))));function Au(e,t){return Object.assign(Object.assign({},t),{apply:Tu(e)})}const Ru=Ds.domEventHandlers({mousedown(e,t){let i,n=t.state.field(Su,!1);if(!n||null==(i=t.posAtCoords({x:e.clientX,y:e.clientY})))return!1;let s=n.ranges.find((e=>e.from<=i&&e.to>=i));return!(!s||s.field==n.active||(t.dispatch({selection:ku(n.ranges,s.field),effects:wu.of(n.ranges.some((e=>e.field>s.field))?new yu(n.ranges,s.field):null),scrollIntoView:!0}),0))}}),Du={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Iu=ae.define({map(e,t){let i=t.mapPos(e,-1,w.TrackAfter);return null==i?void 0:i}}),qu=new class extends _e{};qu.startSide=1,qu.endSide=-1;const Lu=j.define({create:()=>Se.empty,update(e,t){if(t.selection){let i=t.state.doc.lineAt(t.selection.main.head).from,n=t.startState.doc.lineAt(t.startState.selection.main.head).from;i!=t.changes.mapPos(n,-1)&&(e=Se.empty)}e=e.map(t.changes);for(let i of t.effects)i.is(Iu)&&(e=e.update({add:[qu.range(i.value,i.value+1)]}));return e}}),Nu="()[]{}<>";function Bu(e){for(let t=0;t<8;t+=2)if(Nu.charCodeAt(t)==e)return Nu.charAt(t+1);return b(e<128?e:e+1)}function $u(e,t){return e.languageDataAt("closeBrackets",t)[0]||Du}const Qu="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),zu=Ds.inputHandler.of(((e,t,i,n)=>{if((Qu?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let s=e.state.selection.main;if(n.length>2||2==n.length&&1==_(O(n,0))||t!=s.from||i!=s.to)return!1;let r=function(e,t){let i=$u(e,e.selection.main.head),n=i.brackets||Du.brackets;for(let s of n){let r=Bu(O(s,0));if(t==s)return r==s?Hu(e,s,n.indexOf(s+s+s)>-1,i):Uu(e,s,r,i.before||Du.before);if(t==r&&Wu(e,e.selection.main.from))return Fu(e,0,r)}return null}(e.state,n);return!!r&&(e.dispatch(r),!0)})),ju=[{key:"Backspace",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=$u(e,e.selection.main.head).brackets||Du.brackets,n=null,s=e.changeByRange((t=>{if(t.empty){let n=function(e,t){let i=e.sliceString(t-2,t);return _(O(i,0))==i.length?i:i.slice(1)}(e.doc,t.head);for(let s of i)if(s==n&&Vu(e.doc,t.head)==Bu(O(s,0)))return{changes:{from:t.head-s.length,to:t.head+s.length},range:R.cursor(t.head-s.length)}}return{range:n=t}}));return n||t(e.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!n}}];function Wu(e,t){let i=!1;return e.field(Lu).between(0,e.doc.length,(e=>{e==t&&(i=!0)})),i}function Vu(e,t){let i=e.sliceString(t,t+2);return i.slice(0,_(O(i,0)))}function Uu(e,t,i,n){let s=null,r=e.changeByRange((r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:i,from:r.to}],effects:Iu.of(r.to+t.length),range:R.range(r.anchor+t.length,r.head+t.length)};let o=Vu(e.doc,r.head);return!o||/\s/.test(o)||n.indexOf(o)>-1?{changes:{insert:t+i,from:r.head},effects:Iu.of(r.head+t.length),range:R.cursor(r.head+t.length)}:{range:s=r}}));return s?null:e.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function Fu(e,t,i){let n=null,s=e.changeByRange((t=>t.empty&&Vu(e.doc,t.head)==i?{changes:{from:t.head,to:t.head+i.length,insert:i},range:R.cursor(t.head+i.length)}:n={range:t}));return n?null:e.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function Hu(e,t,i,n){let s=n.stringPrefixes||Du.stringPrefixes,r=null,o=e.changeByRange((n=>{if(!n.empty)return{changes:[{insert:t,from:n.from},{insert:t,from:n.to}],effects:Iu.of(n.to+t.length),range:R.range(n.anchor+t.length,n.head+t.length)};let o,a=n.head,l=Vu(e.doc,a);if(l==t){if(Xu(e,a))return{changes:{insert:t+t,from:a},effects:Iu.of(a+t.length),range:R.cursor(a+t.length)};if(Wu(e,a)){let n=i&&e.sliceDoc(a,a+3*t.length)==t+t+t?t+t+t:t;return{changes:{from:a,to:a+n.length,insert:n},range:R.cursor(a+n.length)}}}else{if(i&&e.sliceDoc(a-2*t.length,a)==t+t&&(o=Yu(e,a-2*t.length,s))>-1&&Xu(e,o))return{changes:{insert:t+t+t+t,from:a},effects:Iu.of(a+t.length),range:R.cursor(a+t.length)};if(e.charCategorizer(a)(l)!=me.Word&&Yu(e,a,s)>-1&&!function(e,t,i,n){let s=Da(e).resolveInner(t,-1),r=n.reduce(((e,t)=>Math.max(e,t.length)),0);for(let o=0;o<5;o++){let o=e.sliceDoc(s.from,Math.min(s.to,s.from+i.length+r)),a=o.indexOf(i);if(!a||a>-1&&n.indexOf(o.slice(0,a))>-1){let t=s.firstChild;for(;t&&t.from==s.from&&t.to-t.from>i.length+a;){if(e.sliceDoc(t.to-i.length,t.to)==i)return!1;t=t.firstChild}return!0}let l=s.to==t&&s.parent;if(!l)break;s=l}return!1}(e,a,t,s))return{changes:{insert:t+t,from:a},effects:Iu.of(a+t.length),range:R.cursor(a+t.length)}}return{range:r=n}}));return r?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Xu(e,t){let i=Da(e).resolveInner(t+1);return i.parent&&i.from==t}function Yu(e,t,i){let n=e.charCategorizer(t);if(n(e.sliceDoc(t-1,t))!=me.Word)return t;for(let s of i){let i=t-s.length;if(e.sliceDoc(i,t)==s&&n(e.sliceDoc(i-1,i))!=me.Word)return i}return-1}function Gu(e={}){return[hu,Fd.of(e),fu,Ku,mu]}const Zu=[{key:"Ctrl-Space",run:e=>!!e.state.field(hu,!1)&&(e.dispatch({effects:Wd.of(!0)}),!0)},{key:"Escape",run:e=>{let t=e.state.field(hu,!1);return!(!t||!t.active.some((e=>0!=e.state))||(e.dispatch({effects:Vd.of(null)}),0))}},{key:"ArrowDown",run:uu(!0)},{key:"ArrowUp",run:uu(!1)},{key:"PageDown",run:uu(!0,"page")},{key:"PageUp",run:uu(!1,"page")},{key:"Enter",run:e=>{let t=e.state.field(hu,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestampe.facet(Fd).defaultKeymap?[Zu]:[])));class Ju{constructor(e,t,i){this.from=e,this.to=t,this.diagnostic=i}}class ep{constructor(e,t,i){this.diagnostics=e,this.panel=t,this.selected=i}static init(e,t,i){let n=e,s=i.facet(dp).markerFilter;s&&(n=s(n));let r=Yt.set(n.map((e=>e.from==e.to||e.from==e.to-1&&i.doc.lineAt(e.from).to==e.from?Yt.widget({widget:new fp(e),diagnostic:e}).range(e.from):Yt.mark({attributes:{class:"cm-lintRange cm-lintRange-"+e.severity+(e.markClass?" "+e.markClass:"")},diagnostic:e}).range(e.from,e.to))),!0);return new ep(r,t,tp(r))}}function tp(e,t=null,i=0){let n=null;return e.between(i,1e9,((e,i,{spec:s})=>{if(!t||s.diagnostic==t)return n=new Ju(e,i,s.diagnostic),!1})),n}const ip=ae.define(),np=ae.define(),sp=ae.define(),rp=j.define({create:()=>new ep(Yt.none,null,null),update(e,t){if(t.docChanged){let i=e.diagnostics.map(t.changes),n=null;if(e.selected){let s=t.changes.mapPos(e.selected.from,1);n=tp(i,e.selected.diagnostic,s)||tp(i,null,s)}e=new ep(i,e.panel,n)}for(let i of t.effects)i.is(ip)?e=ep.init(i.value,e.panel,t.state):i.is(np)?e=new ep(e.diagnostics,i.value?gp.open:null,e.selected):i.is(sp)&&(e=new ep(e.diagnostics,e.panel,i.value));return e},provide:e=>[Kr.from(e,(e=>e.panel)),Ds.decorations.from(e,(e=>e.diagnostics))]}),op=Yt.mark({class:"cm-lintRange cm-lintRange-active"});function ap(e,t,i){let{diagnostics:n}=e.state.field(rp),s=[],r=2e8,o=0;n.between(t-(i<0?1:0),t+(i>0?1:0),((e,n,{spec:a})=>{t>=e&&t<=n&&(e==n||(t>e||i>0)&&(t({dom:lp(e,s)})}:null}function lp(e,t){return Pc("ul",{class:"cm-tooltip-lint"},t.map((t=>pp(e,t,!1))))}const hp=e=>{let t=e.state.field(rp,!1);return!(!t||!t.panel||(e.dispatch({effects:np.of(!1)}),0))},cp=[{key:"Mod-Shift-m",run:e=>{let t=e.state.field(rp,!1);var i,n;t&&t.panel||e.dispatch({effects:(i=e.state,n=[np.of(!0)],i.field(rp,!1)?n:n.concat(ae.appendConfig.of(bp)))});let s=Xr(e,gp.open);return s&&s.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:e=>{let t=e.state.field(rp,!1);if(!t)return!1;let i=e.state.selection.main,n=t.diagnostics.iter(i.to+1);return!(!n.value&&(n=t.diagnostics.iter(0),!n.value||n.from==i.from&&n.to==i.to)||(e.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0}),0))}}],dp=q.define({combine:e=>Object.assign({sources:e.map((e=>e.source))},be(e.map((e=>e.config)),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:(e,t)=>e?t?i=>e(i)||t(i):e:t}))});function up(e){let t=[];if(e)e:for(let{name:i}of e){for(let e=0;ee.toLowerCase()==n.toLowerCase()))){t.push(n);continue e}}t.push("")}return t}function pp(e,t,i){var n;let s=i?up(t.actions):[];return Pc("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},Pc("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage():t.message),null===(n=t.actions)||void 0===n?void 0:n.map(((i,n)=>{let r=!1,o=n=>{if(n.preventDefault(),r)return;r=!0;let s=tp(e.state.field(rp).diagnostics,t);s&&i.apply(e,s.from,s.to)},{name:a}=i,l=s[n]?a.indexOf(s[n]):-1,h=l<0?a:[a.slice(0,l),Pc("u",a.slice(l,l+1)),a.slice(l+1)];return Pc("button",{type:"button",class:"cm-diagnosticAction",onclick:o,onmousedown:o,"aria-label":` Action: ${a}${l<0?"":` (access key "${s[n]})"`}.`},h)})),t.source&&Pc("div",{class:"cm-diagnosticSource"},t.source))}class fp extends Ht{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return Pc("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class mp{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=pp(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class gp{constructor(e){this.view=e,this.items=[],this.list=Pc("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t=>{if(27==t.keyCode)hp(this.view),this.view.focus();else if(38==t.keyCode||33==t.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==t.keyCode||34==t.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==t.keyCode)this.moveSelection(0);else if(35==t.keyCode)this.moveSelection(this.items.length-1);else if(13==t.keyCode)this.view.focus();else{if(!(t.keyCode>=65&&t.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:i}=this.items[this.selectedIndex],n=up(i.actions);for(let s=0;s{for(let t=0;thp(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(rp).selected;if(!e)return-1;for(let t=0;t{let a,l=-1;for(let e=i;ei&&(this.items.splice(i,l-i),n=!0)),t&&a.diagnostic==t.diagnostic?a.dom.hasAttribute("aria-selected")||(a.dom.setAttribute("aria-selected","true"),s=a):a.dom.hasAttribute("aria-selected")&&a.dom.removeAttribute("aria-selected"),i++}));i({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let i=t.height/this.list.offsetHeight;e.topt.bottom&&(this.list.scrollTop+=(e.bottom-t.bottom)/i)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),n&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)t();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=tp(this.view.state.field(rp).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:sp.of(t)})}static open(e){return new gp(e)}}function vp(e){return function(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(e)}')`}(``,'width="6" height="3"')}const Op=Ds.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:vp("#d11")},".cm-lintRange-warning":{backgroundImage:vp("orange")},".cm-lintRange-info":{backgroundImage:vp("#999")},".cm-lintRange-hint":{backgroundImage:vp("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),bp=[rp,Ds.decorations.compute([rp],(e=>{let{selected:t,panel:i}=e.field(rp);return t&&i&&t.from!=t.to?Yt.set([op.range(t.from,t.to)]):Yt.none})),Vr(ap,{hideOn:function(e,t){let i=e.startState.doc.lineAt(t.pos);return!(!e.effects.some((e=>e.is(ip)))&&!e.changes.touchesRange(i.from,i.to))}}),Op],_p=(()=>[Oo(),yo,Or(),gh(),Tl(),tr(),[hr,cr],Oe.allowMultipleSelections.of(!0),Oe.transactionFilter.of((e=>{if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;let t=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!t.length)return e;let i=e.newDoc,{head:n}=e.newSelection.main,s=i.lineAt(n);if(n>s.from+200)return e;let r=i.sliceString(s.from,n);if(!t.some((e=>e.test(r))))return e;let{state:o}=e,a=-1,l=[];for(let{head:e}of o.selection.ranges){let t=o.doc.lineAt(e);if(t.from==a)continue;a=t.from;let i=Xa(o,t.from);if(null==i)continue;let n=/^\s*/.exec(t.text)[0],s=Ha(o,i);n!=s&&l.push({from:t.from,to:t.from+n.length,insert:s})}return l.length?[e,{changes:l,sequential:!0}]:e})),Rl(ql,{fallback:!0}),Ul(),[zu,Lu],Gu(),Tr(),Mr(),xr,Uc(),zs.of([...ju,...Cc,...kd,...Dh,...vl,...Zu,...cp])])();class yp{constructor(e,t,i,n,s,r,o,a,l,h=0,c){this.p=e,this.stack=t,this.state=i,this.reducePos=n,this.pos=s,this.score=r,this.buffer=o,this.bufferBase=a,this.curContext=l,this.lookAhead=h,this.parent=c}toString(){return`[${this.stack.filter(((e,t)=>t%3==0)).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,i=0){let n=e.parser.context;return new yp(e,[],t,i,i,0,[],0,n?new wp(n,n.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let i=e>>19,n=65535&e,{parser:s}=this.p,r=s.dynamicPrecedence(n);if(r&&(this.score+=r),0==i)return this.pushState(s.getGoto(this.state,n,!0),this.reducePos),n=2e3&&!(null===(t=this.p.parser.nodeSet.types[n])||void 0===t?void 0:t.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=l):this.p.lastBigReductionSizeo;)this.stack.pop();this.reduceContext(n,a)}storeNode(e,t,i,n=4,s=!1){if(0==e&&(!this.stack.length||this.stack[this.stack.length-1]0&&0==e.buffer[n-4]&&e.buffer[n-1]>-1){if(t==i)return;if(e.buffer[n-2]>=t)return void(e.buffer[n-2]=i)}}if(s&&this.pos!=i){let s=this.buffer.length;if(s>0&&0!=this.buffer[s-4])for(;s>0&&this.buffer[s-2]>i;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,n>4&&(n-=4);this.buffer[s]=e,this.buffer[s+1]=t,this.buffer[s+2]=i,this.buffer[s+3]=n}else this.buffer.push(e,t,i,n)}shift(e,t,i,n){if(131072&e)this.pushState(65535&e,this.pos);else if(0==(262144&e)){let s=e,{parser:r}=this.p;(n>this.pos||t<=r.maxNode)&&(this.pos=n,r.stateFlag(s,1)||(this.reducePos=n)),this.pushState(s,i),this.shiftContext(t,i),t<=r.maxNode&&this.buffer.push(t,i,n,4)}else this.pos=n,this.shiftContext(t,i),t<=this.p.parser.maxNode&&this.buffer.push(t,i,n,4)}apply(e,t,i,n){65536&e?this.reduce(e):this.shift(e,t,i,n)}useNode(e,t){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let n=this.pos;this.reducePos=this.pos=n+e.length,this.pushState(t,n),this.buffer.push(i,n,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let i=e.buffer.slice(t),n=e.bufferBase+t;for(;e&&n==e.bufferBase;)e=e.parent;return new yp(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,n,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,i?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new xp(this);;){let i=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(0==i)return!1;if(0==(65536&i))return!0;t.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let i=[];for(let n,s=0;s1&t&&e==n))||i.push(t[e],n)}t=i}let i=[];for(let e=0;e>19,n=65535&t,s=this.stack.length-3*i;if(s<0||e.getGoto(this.stack[s],n,!1)<0){let e=this.findForcedReduction();if(null==e)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],i=(n,s)=>{if(!t.includes(n))return t.push(n),e.allActions(n,(t=>{if(393216&t);else if(65536&t){let i=(t>>19)-s;if(i>1){let n=65535&t,s=this.stack.length-3*i;if(s>=0&&e.getGoto(this.stack[s],n,!1)>=0)return i<<19|65536|n}}else{let e=i(t,s+1);if(null!=e)return e}}))};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:e}=this.p;return 65535==e.data[e.stateSlot(this.state,1)]&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class wp{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class xp{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=65535&e,i=e>>19;0==i?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(i-1);let n=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=n}}class Sp{constructor(e,t,i){this.stack=e,this.pos=t,this.index=i,this.buffer=e.buffer,0==this.index&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new Sp(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;null!=e&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new Sp(this.stack,this.pos,this.index)}}function kp(e,t=Uint16Array){if("string"!=typeof e)return e;let i=null;for(let n=0,s=0;n=92&&t--,t>=34&&t--;let s=t-32;if(s>=46&&(s-=46,i=!0),r+=s,i)break;r*=46}i?i[s++]=r:i=new t(r)}return i}class Tp{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Cp=new Tp;class Pp{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Cp,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let i=this.range,n=this.rangeIndex,s=this.pos+e;for(;si.to:s>=i.to;){if(n==this.ranges.length-1)return null;let e=this.ranges[++n];s+=e.from-i.to,i=e}return s}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t,i,n=this.chunkOff+e;if(n>=0&&n=this.chunk2Pos&&tn.to&&(this.chunk2=this.chunk2.slice(0,n.to-t)),i=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),i}acceptToken(e,t=0){let i=t?this.resolveOffset(t,-1):this.pos;if(null==i||i=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=Cp,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let i="";for(let n of this.ranges){if(n.from>=t)break;n.to>e&&(i+=this.input.read(Math.max(n.from,e),Math.min(n.to,t)))}return i}}class Mp{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:i}=t.p;!function(e,t,i,n,s,r){let o=0,a=1<0){let i=e[n];if(l.allows(i)&&(-1==t.token.value||t.token.value==i||Rp(i,t.token.value,s,r))){t.acceptToken(i);break}}let n=t.next,h=0,c=e[o+2];if(!(t.next<0&&c>h&&65535==e[i+3*c-3]&&65535==e[i+3*c-3])){for(;h>1,r=i+s+(s<<1),a=e[r],l=e[r+1]||65536;if(n=l)){o=e[r+2],t.advance();continue e}h=s+1}}break}o=e[i+3*c-1]}}(this.data,e,t,this.id,i.data,i.tokenPrecTable)}}Mp.prototype.contextual=Mp.prototype.fallback=Mp.prototype.extend=!1,Mp.prototype.fallback=Mp.prototype.extend=!1;class Ep{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function Ap(e,t,i){for(let n,s=t;65535!=(n=e[s]);s++)if(n==i)return s-t;return-1}function Rp(e,t,i,n){let s=Ap(i,n,t);return s<0||Ap(i,n,e)t)&&!n.type.isError)return i<0?Math.max(0,Math.min(n.to-1,t-25)):Math.min(e.length,Math.max(n.from+1,t+25));if(i<0?n.prevSibling():n.nextSibling())break;if(!n.parent())return i<0?0:e.length}}class Lp{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?qp(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?qp(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=r,null;if(s instanceof Do){if(r==e){if(r=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(r),this.index.push(0))}else this.index[t]++,this.nextStart=r+s.length}}}class Np{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map((e=>new Tp))}getActions(e){let t=0,i=null,{parser:n}=e.p,{tokenizers:s}=n,r=n.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,a=0;for(let n=0;nh.end+25&&(a=Math.max(h.lookAhead,a)),0!=h.value)){let n=t;if(h.extended>-1&&(t=this.addActions(e,h.extended,h.end,t)),t=this.addActions(e,h.value,h.end,t),!l.extend&&(i=h,t>n))break}}for(;this.actions.length>t;)this.actions.pop();return a&&e.setLookAhead(a),i||e.pos!=this.stream.end||(i=new Tp,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,t=this.addActions(e,i.value,i.end,t)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new Tp,{pos:i,p:n}=e;return t.start=i,t.end=Math.min(i+1,n.stream.end),t.value=i==n.stream.end?n.parser.eofTerm:0,t}updateCachedToken(e,t,i){let n=this.stream.clipPos(i.pos);if(t.token(this.stream.reset(n,e),i),e.value>-1){let{parser:t}=i.p;for(let n=0;n=0&&i.p.parser.dialect.allows(s>>1)){0==(1&s)?e.value=s>>1:e.extended=s>>1;break}}}else e.value=0,e.end=this.stream.clipPos(n+1)}putAction(e,t,i,n){for(let t=0;t4*e.bufferLength?new Lp(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e,t,i=this.stacks,n=this.minStackPos,s=this.stacks=[];if(this.bigReductionCount>300&&1==i.length){let[e]=i;for(;e.forceReduce()&&e.stack.length&&e.stack[e.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let r=0;rn)s.push(o);else{if(this.advanceStack(o,s,i))continue;{e||(e=[],t=[]),e.push(o);let i=this.tokens.getMainToken(o);t.push(i.value,i.end)}}break}}if(!s.length){let t=e&&function(e){let t=null;for(let i of e){let e=i.p.stoppedAt;(i.pos==i.p.stream.end||null!=e&&i.pos>e)&&i.p.parser.stateFlag(i.state,2)&&(!t||t.scorethis.stoppedAt?e[0]:this.runRecovery(e,t,s);if(i)return Dp&&console.log("Force-finish "+this.stackID(i)),this.stackToTree(i.forceAll())}if(this.recovering){let e=1==this.recovering?1:3*this.recovering;if(s.length>e)for(s.sort(((e,t)=>t.score-e.score));s.length>e;)s.pop();s.some((e=>e.reducePos>n))&&this.recovering--}else if(s.length>1){e:for(let e=0;e500&&n.buffer.length>500){if(!((t.score-n.score||t.buffer.length-n.buffer.length)>0)){s.splice(e--,1);continue e}s.splice(i--,1)}}}s.length>12&&s.splice(12,s.length-12)}this.minStackPos=s[0].pos;for(let e=1;e ":"";if(null!=this.stoppedAt&&n>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,i=t?e.curContext.hash:0;for(let o=this.fragments.nodeAt(n);o;){let n=this.parser.nodeSet.types[o.type.id]==o.type?s.getGoto(e.state,o.type.id):-1;if(n>-1&&o.length&&(!t||(o.prop(ko.contextHash)||0)==i))return e.useNode(o,n),Dp&&console.log(r+this.stackID(e)+` (via reuse of ${s.getName(o.type.id)})`),!0;if(!(o instanceof Do)||0==o.children.length||o.positions[0]>0)break;let a=o.children[0];if(!(a instanceof Do&&0==o.positions[0]))break;o=a}}let o=s.stateSlot(e.state,4);if(o>0)return e.reduce(o),Dp&&console.log(r+this.stackID(e)+` (via always-reduce ${s.getName(65535&o)})`),!0;if(e.stack.length>=9e3)for(;e.stack.length>6e3&&e.forceReduce(););let a=this.tokens.getActions(e);for(let o=0;on?t.push(u):i.push(u)}return!1}advanceFully(e,t){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return $p(e,t),!0}}runRecovery(e,t,i){let n=null,s=!1;for(let r=0;r ":"";if(o.deadEnd){if(s)continue;if(s=!0,o.restart(),Dp&&console.log(h+this.stackID(o)+" (restarted)"),this.advanceFully(o,i))continue}let c=o.split(),d=h;for(let e=0;c.forceReduce()&&e<10&&(Dp&&console.log(d+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,i));e++)Dp&&(d=this.stackID(c)+" -> ");for(let e of o.recoverByInsert(a))Dp&&console.log(h+this.stackID(e)+" (via recover-insert)"),this.advanceFully(e,i);this.stream.end>o.pos?(l==o.pos&&(l++,a=0),o.recoverByDelete(a,l),Dp&&console.log(h+this.stackID(o)+` (via recover-delete ${this.parser.getName(a)})`),$p(o,i)):(!n||n.scoree;class jp extends Jo{constructor(e){if(super(),this.wrappers=[],14!=e.version)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let i=0;ie.topRules[t][1])),n=[];for(let e=0;e=0)s(n,e,t[i++]);else{let r=t[i+-n];for(let o=-n;o>0;o--)s(t[i++],e,r);i++}}}this.nodeSet=new Mo(t.map(((t,s)=>Po.define({name:s>=this.minRepeatTerm?void 0:t,id:s,props:n[s],top:i.indexOf(s)>-1,error:0==s,skipped:e.skippedNodes&&e.skippedNodes.indexOf(s)>-1})))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=wo;let r=kp(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e"number"==typeof e?new Mp(r,e):e)),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,i){let n=new Bp(this,e,t,i);for(let s of this.wrappers)n=s(n,e,t,i);return n}getGoto(e,t,i=!1){let n=this.goto;if(t>=n[0])return-1;for(let s=n[t+1];;){let t=n[s++],r=1&t,o=n[s++];if(r&&i)return o;for(let i=s+(t>>1);s0}validAction(e,t){return!!this.allActions(e,(e=>e==t||null))}allActions(e,t){let i=this.stateSlot(e,4),n=i?t(i):void 0;for(let i=this.stateSlot(e,1);null==n;i+=3){if(65535==this.data[i]){if(1!=this.data[i+1])break;i=Wp(this.data,i+2)}n=t(Wp(this.data,i+1))}return n}nextStates(e){let t=[];for(let i=this.stateSlot(e,1);;i+=3){if(65535==this.data[i]){if(1!=this.data[i+1])break;i=Wp(this.data,i+2)}if(0==(1&this.data[i+2])){let e=this.data[i+1];t.some(((t,i)=>1&i&&t==e))||t.push(this.data[i],e)}}return t}configure(e){let t=Object.assign(Object.create(jp.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=i}return e.tokenizers&&(t.tokenizers=this.tokenizers.map((t=>{let i=e.tokenizers.find((e=>e.from==t));return i?i.to:t}))),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map(((i,n)=>{let s=e.specializers.find((e=>e.from==i.external));if(!s)return i;let r=Object.assign(Object.assign({},i),{external:s.to});return t.specializers[n]=Vp(r),r}))),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),null!=e.strict&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),null!=e.bufferLength&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return null==t?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),i=t.map((()=>!1));if(e)for(let n of e.split(" ")){let e=t.indexOf(n);e>=0&&(i[e]=!0)}let n=null;for(let e=0;ee.external(i,n)<<1|t}return e.get}const Up=new Set([27,51,52,270,67,133,58,59,251,64,65,74,62,63,154,155,158,115]);function Fp(e){return 10==e||13==e}const Hp=new Ep(((e,t)=>{let i;if(e.next<0)e.acceptToken(206);else if(t.context.depth<0)Fp(e.next)&&e.acceptToken(205,1);else if(((i=e.peek(-1))<0||Fp(i))&&t.canShift(204)){let t=0;for(;32==e.next||9==e.next;)e.advance(),t++;10!=e.next&&13!=e.next&&35!=e.next||e.acceptToken(204,-t)}else Fp(e.next)&&e.acceptToken(203,1)}),{contextual:!0}),Xp=new Ep(((e,t)=>{let i=t.context.depth;if(i<0)return;let n=e.peek(-1);if(10==n||13==n){let t=0,n=0;for(;;){if(32==e.next)t++;else{if(9!=e.next)break;t+=8-t%8}e.advance(),n++}t!=i&&10!=e.next&&13!=e.next&&35!=e.next&&(t0),this.strict=!1!==e.strict}}({start:Gp,reduce:(e,t)=>e.depth<0&&Up.has(t)?e.parent:e,shift:(e,t,i,n)=>201==t?new Yp(e,function(e){let t=0;for(let i=0;ie.hash}),Kp=new Ep((e=>{for(let t=0;t<5;t++){if(e.next!="print".charCodeAt(t))return;e.advance()}if(!/\w/.test(String.fromCharCode(e.next)))for(let t=0;;t++){let i=e.peek(t);if(32!=i&&9!=i)return void(40!=i&&46!=i&&10!=i&&13!=i&&35!=i&&e.acceptToken(1))}}));function Jp(e,t,i,n,s){return new Ep((r=>{let o=r.pos;for(;!(r.next<0);)if(123==r.next){if(123!=r.peek(1)){if(r.pos==o)return void r.acceptToken(n,1);break}r.advance(2)}else if(92==r.next)r.advance(),r.next>=0&&r.advance();else{if(r.next==e&&(1==t||r.peek(1)==e&&r.peek(2)==e)){if(r.pos==o)return void r.acceptToken(s,t);break}r.advance()}r.pos>o&&r.acceptToken(i)}))}const ef=Jp(39,1,207,2,208),tf=Jp(34,1,209,3,210),nf=Jp(39,3,211,4,212),sf=Jp(34,3,213,5,214),rf=ra({'async "*" "**" FormatConversion FormatSpec':Ta.modifier,"for while if elif else try except finally return raise break continue with pass assert await yield match case":Ta.controlKeyword,"in not and or is del":Ta.operatorKeyword,"from def class global nonlocal lambda":Ta.definitionKeyword,import:Ta.moduleKeyword,"with as print":Ta.keyword,Boolean:Ta.bool,None:Ta.null,VariableName:Ta.variableName,"CallExpression/VariableName":Ta.function(Ta.variableName),"FunctionDefinition/VariableName":Ta.function(Ta.definition(Ta.variableName)),"ClassDefinition/VariableName":Ta.definition(Ta.className),PropertyName:Ta.propertyName,"CallExpression/MemberExpression/PropertyName":Ta.function(Ta.propertyName),Comment:Ta.lineComment,Number:Ta.number,String:Ta.string,FormatString:Ta.special(Ta.string),UpdateOp:Ta.updateOperator,"ArithOp!":Ta.arithmeticOperator,BitOp:Ta.bitwiseOperator,CompareOp:Ta.compareOperator,AssignOp:Ta.definitionOperator,Ellipsis:Ta.punctuation,At:Ta.meta,"( )":Ta.paren,"[ ]":Ta.squareBracket,"{ }":Ta.brace,".":Ta.derefOperator,", ;":Ta.separator}),of={__proto__:null,await:48,or:58,and:60,in:64,not:66,is:68,if:74,else:76,lambda:80,yield:98,from:100,async:106,for:108,None:168,True:170,False:170,del:184,pass:188,break:192,continue:196,return:200,raise:208,import:212,as:214,global:218,nonlocal:220,assert:224,type:229,elif:242,while:246,try:252,except:254,finally:256,with:260,def:264,class:274,match:285,case:291},af=jp.deserialize({version:14,states:"#&jO`Q#yOOP$bOSOOO%kQ&nO'#HcOOQS'#Cq'#CqOOQS'#Cr'#CrO'ZQ#xO'#CpO(|Q&nO'#HbOOQS'#Hc'#HcOOQS'#DW'#DWOOQS'#Hb'#HbO)jQ#xO'#DaO)}Q#xO'#DhO*_Q#xO'#DlOOQS'#Dw'#DwO*rO,UO'#DwO*zO7[O'#DwO+SOWO'#DxO+_O`O'#DxO+jOpO'#DxO+uO!bO'#DxO-wQ&nO'#HSOOQS'#HS'#HSO'ZQ#xO'#HRO/ZQ&nO'#HROOQS'#Ee'#EeO/rQ#xO'#EfOOQS'#HQ'#HQO/|Q#xO'#HPOOQV'#HP'#HPO0XQ#xO'#F]OOQS'#Ge'#GeO0^Q#xO'#F[OOQV'#IY'#IYOOQV'#HO'#HOOOQV'#Ft'#FtQ`Q#yOOO'ZQ#xO'#CsO0lQ#xO'#DPO0sQ#xO'#DTO1RQ#xO'#HgO1cQ&nO'#EYO'ZQ#xO'#EZOOQS'#E]'#E]OOQS'#E_'#E_OOQS'#Ea'#EaO1wQ#xO'#EcO2_Q#xO'#EgO0XQ#xO'#EiO2rQ&nO'#EiO0XQ#xO'#ElO/rQ#xO'#EoO0XQ#xO'#EqO/rQ#xO'#EwO/rQ#xO'#EzO2}Q#xO'#E|O3UQ#xO'#FRO3aQ#xO'#E}O/rQ#xO'#FRO0XQ#xO'#FTO0XQ#xO'#FYO3fQ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.Z-TQ/U.[R/u/TQ$cyQ(d%pR+V(eQ/T.YR0f0[R#VZR#[[R%_!nQ%]!nV*u(O*v,z!]!qQ!s#r$P$b$q$}%S%T%U%V%W%X%r%w%}&O&t'a'x)W)c)|+R+[,[-Z0Y1OR%b!pQ&W#cQ&Z#gQ&]#jQ&_#mR-`+lQ(}&WQ)P&ZQ)R&]Q)T&_Q+p)OQ+q)QQ+r)SQ+s)UQ.^-`R/V._Q$m!SQ&{$aQ*R'bR,`*SQ#zmQ$f!PQ$i!QR'T$hQ)h'SR+|)kQ)h'SQ+{)jR+|)kR$k!RR)u'YXqOs*W,dQ$s!WR'c$tQ$z!ZR'd$uR*k'pQ*i'pV-|,s-}.lQ.{.RQ/i.uR/j.vU.t.R.u.vQ/n.xQ/y/^Q0O/dU0Q/f0R0bQ0V/kQ0e0WQ0g0]U0i0^0k0sQ0t0mQ0x0rR0y0uR/m.wR/{/^",nodeNames:"⚠ print { { { { Comment Script AssignStatement * BinaryExpression BitOp BitOp BitOp BitOp ArithOp ArithOp @ ArithOp ** UnaryExpression ArithOp BitOp AwaitExpression await ) ( ParenthesizedExpression BinaryExpression or and CompareOp in not is UnaryExpression ConditionalExpression if else LambdaExpression lambda ParamList VariableName AssignOp , : NamedExpression AssignOp YieldExpression yield from TupleExpression ComprehensionExpression async for LambdaExpression ] [ ArrayExpression ArrayComprehensionExpression } { DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression CallExpression ArgList AssignOp MemberExpression . PropertyName Number String FormatString FormatReplacement FormatConversion FormatSpec FormatReplacement FormatReplacement FormatReplacement FormatReplacement ContinuedString Ellipsis None Boolean TypeDef AssignOp UpdateStatement UpdateOp ExpressionStatement DeleteStatement del PassStatement pass BreakStatement break ContinueStatement continue ReturnStatement return YieldStatement PrintStatement RaiseStatement raise ImportStatement import as ScopeStatement global nonlocal AssertStatement assert TypeDefinition type TypeParamList TypeParam StatementGroup ; IfStatement Body elif WhileStatement while ForStatement TryStatement try except finally WithStatement with FunctionDefinition def ParamList AssignOp TypeDef ClassDefinition class DecoratedStatement Decorator At MatchStatement match MatchBody MatchClause case CapturePattern LiteralPattern ArithOp ArithOp AsPattern OrPattern LogicOp AttributePattern SequencePattern MappingPattern StarPattern ClassPattern PatternArgList KeywordPattern KeywordPattern Guard",maxTerm:283,context:Zp,nodeProps:[["group",-15,8,88,90,91,93,95,97,99,101,102,103,105,108,111,113,"Statement Statement",-22,10,20,23,27,42,51,52,58,59,62,63,64,65,66,69,72,73,74,82,83,84,85,"Expression",-10,117,119,122,124,125,129,131,136,138,141,"Statement",-9,146,147,150,151,153,154,155,156,157,"Pattern"],["openedBy",25,"(",56,"[",60,"{"],["closedBy",26,")",57,"]",61,"}"]],propSources:[rf],skippedNodes:[0,6],repeatNodeCount:38,tokenData:"%-W#sR!`OX%TXY=|Y[%T[]=|]p%Tpq=|qr@_rsDOst!+|tu%Tuv!Nnvw#!|wx#$Wxy#:Uyz#;Yz{#<^{|#>x|}#@S}!O#AW!O!P#Ci!P!Q#N_!Q!R$!y!R![$&w![!]$1e!]!^$3s!^!_$4w!_!`$7c!`!a$8m!a!b%T!b!c$;U!c!d$W!e!h$W#V#Y$Q<%lO$Xc&r!b&jS&mW%p!TOX%TXY=|Y[%T[]=|]p%Tpq=|qr%Trs&Vsw%Twx/Xx#O%T#O#P?d#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#s?i[&r!bOY%TYZ=|Z]%T]^=|^#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=P;=`<%l8^<%lO%T!q@hd&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!_%T!_!`Av!`#O%T#O#P7o#P#T%T#T#UBz#U#f%T#f#gBz#g#hBz#h#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T!qBR]oR&r!b&jS&mWOr%Trs&Vsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<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atchClause"]);function cf(e){return(t,i,n)=>{if(n)return!1;let s=t.node.getChild("VariableName");return s&&i(s,e),!0}}const df={FunctionDefinition:cf("function"),ClassDefinition:cf("class"),ForStatement(e,t,i){if(i)for(let i=e.node.firstChild;i;i=i.nextSibling)if("VariableName"==i.name)t(i,"variable");else if("in"==i.name)break},ImportStatement(e,t){var i,n;let{node:s}=e,r="from"==(null===(i=s.firstChild)||void 0===i?void 0:i.name);for(let e=s.getChild("import");e;e=e.nextSibling)"VariableName"==e.name&&"as"!=(null===(n=e.nextSibling)||void 0===n?void 0:n.name)&&t(e,r?"variable":"namespace")},AssignStatement(e,t){for(let i=e.node.firstChild;i;i=i.nextSibling)if("VariableName"==i.name)t(i,"variable");else if(":"==i.name||"AssignOp"==i.name)break},ParamList(e,t){for(let i=null,n=e.node.firstChild;n;n=n.nextSibling)"VariableName"!=n.name||i&&/\*|AssignOp/.test(i.name)||t(n,"variable"),i=n},CapturePattern:cf("variable"),AsPattern:cf("variable"),__proto__:null};function uf(e,t){let i=lf.get(t);if(i)return i;let n=[],s=!0;function r(t,i){let s=e.sliceString(t.from,t.to);n.push({label:s,type:i})}return t.cursor(Ro.IncludeAnonymous).iterate((t=>{if(t.name){let e=df[t.name];if(e&&e(t,r,s)||!s&&hf.has(t.name))return!1;s=!1}else if(t.to-t.from>8192){for(let i of uf(e,t.node))n.push(i);return!1}})),lf.set(t,n),n}const pf=/^[\w\xa1-\uffff][\w\d\xa1-\uffff]*$/,ff=["String","FormatString","Comment","PropertyName"];function mf(e){let t=Da(e.state).resolveInner(e.pos,-1);if(ff.indexOf(t.name)>-1)return null;let i="VariableName"==t.name||t.to-t.from<20&&pf.test(e.state.sliceDoc(t.from,t.to));if(!i&&!e.explicit)return null;let n=[];for(let i=t;i;i=i.parent)hf.has(i.name)&&(n=n.concat(uf(e.state.doc,i)));return{options:n,from:i?t.from:e.pos,validFor:pf}}const gf=["__annotations__","__builtins__","__debug__","__doc__","__import__","__name__","__loader__","__package__","__spec__","False","None","True"].map((e=>({label:e,type:"constant"}))).concat(["ArithmeticError","AssertionError","AttributeError","BaseException","BlockingIOError","BrokenPipeError","BufferError","BytesWarning","ChildProcessError","ConnectionAbortedError","ConnectionError","ConnectionRefusedError","ConnectionResetError","DeprecationWarning","EOFError","Ellipsis","EncodingWarning","EnvironmentError","Exception","FileExistsError","FileNotFoundError","FloatingPointError","FutureWarning","GeneratorExit","IOError","ImportError","ImportWarning","IndentationError","IndexError","InterruptedError","IsADirectoryError","KeyError","KeyboardInterrupt","LookupError","MemoryError","ModuleNotFoundError","NameError","NotADirectoryError","NotImplemented","NotImplementedError","OSError","OverflowError","PendingDeprecationWarning","PermissionError","ProcessLookupError","RecursionError","ReferenceError","ResourceWarning","RuntimeError","RuntimeWarning","StopAsyncIteration","StopIteration","SyntaxError","SyntaxWarning","SystemError","SystemExit","TabError","TimeoutError","TypeError","UnboundLocalError","UnicodeDecodeError","UnicodeEncodeError","UnicodeError","UnicodeTranslateError","UnicodeWarning","UserWarning","ValueError","Warning","ZeroDivisionError"].map((e=>({label:e,type:"type"})))).concat(["bool","bytearray","bytes","classmethod","complex","float","frozenset","int","list","map","memoryview","object","range","set","staticmethod","str","super","tuple","type"].map((e=>({label:e,type:"class"})))).concat(["abs","aiter","all","anext","any","ascii","bin","breakpoint","callable","chr","compile","delattr","dict","dir","divmod","enumerate","eval","exec","exit","filter","format","getattr","globals","hasattr","hash","help","hex","id","input","isinstance","issubclass","iter","len","license","locals","max","min","next","oct","open","ord","pow","print","property","quit","repr","reversed","round","setattr","slice","sorted","sum","vars","zip"].map((e=>({label:e,type:"function"})))),vf=[Au("def ${name}(${params}):\n\t${}",{label:"def",detail:"function",type:"keyword"}),Au("for ${name} in ${collection}:\n\t${}",{label:"for",detail:"loop",type:"keyword"}),Au("while ${}:\n\t${}",{label:"while",detail:"loop",type:"keyword"}),Au("try:\n\t${}\nexcept ${error}:\n\t${}",{label:"try",detail:"/ except block",type:"keyword"}),Au("if ${}:\n\t\n",{label:"if",detail:"block",type:"keyword"}),Au("if ${}:\n\t${}\nelse:\n\t${}",{label:"if",detail:"/ else block",type:"keyword"}),Au("class ${name}:\n\tdef __init__(self, ${params}):\n\t\t\t${}",{label:"class",detail:"definition",type:"keyword"}),Au("import ${module}",{label:"import",detail:"statement",type:"keyword"}),Au("from ${module} import ${names}",{label:"from",detail:"import",type:"keyword"})],Of=Ld(ff,qd(gf.concat(vf)));function bf(e,t){let i=e.baseIndentFor(t),n=e.lineAt(e.pos,-1),s=n.from+n.text.length;return/^\s*($|#)/.test(n.text)&&e.node.toi?null:i+e.unit}const _f=Ra.define({name:"python",parser:af.configure({props:[Ga.add({Body:e=>{var t;return null!==(t=bf(e,e.node))&&void 0!==t?t:e.continue()},IfStatement:e=>/^\s*(else:|elif )/.test(e.textAfter)?e.baseIndent:e.continue(),TryStatement:e=>/^\s*(except |finally:|else:)/.test(e.textAfter)?e.baseIndent:e.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":il({closing:")"}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":il({closing:"}"}),"ArrayExpression ArrayComprehensionExpression":il({closing:"]"}),"String FormatString":()=>null,Script:e=>{if(e.pos+/\s*/.exec(e.textAfter)[0].length>=e.node.to){let t=null;for(let i=e.node,n=i.to;i=i.lastChild,i&&i.to==n;)"Body"==i.type.name&&(t=i);if(t){let i=bf(e,t);if(null!=i)return i}}return e.continue()}}),rl.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":function(e){let t=e.firstChild,i=e.lastChild;return t&&t.to({from:e.from+1,to:e.to-(e.to==t.doc.length?0:1)})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""'],stringPrefixes:["f","fr","rf","r","u","b","br","rb","F","FR","RF","R","U","B","BR","RB"]},commentTokens:{line:"#"},indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/}}),yf="#e06c75",wf="#abb2bf",xf="#7d8799",Sf="#d19a66",kf="#2c313a",Tf="#282c34",Cf="#353a42",Pf="#528bff",Mf=[Ds.theme({"&":{color:wf,backgroundColor:Tf},".cm-content":{caretColor:Pf},".cm-cursor, .cm-dropCursor":{borderLeftColor:Pf},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:"#3E4451"},".cm-panels":{backgroundColor:"#21252b",color:wf},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:Tf,color:xf,border:"none"},".cm-activeLineGutter":{backgroundColor:kf},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Cf},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Cf,borderBottomColor:Cf},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:kf,color:wf}}},{dark:!0}),Rl(Pl.define([{tag:Ta.keyword,color:"#c678dd"},{tag:[Ta.name,Ta.deleted,Ta.character,Ta.propertyName,Ta.macroName],color:yf},{tag:[Ta.function(Ta.variableName),Ta.labelName],color:"#61afef"},{tag:[Ta.color,Ta.constant(Ta.name),Ta.standard(Ta.name)],color:Sf},{tag:[Ta.definition(Ta.name),Ta.separator],color:wf},{tag:[Ta.typeName,Ta.className,Ta.number,Ta.changed,Ta.annotation,Ta.modifier,Ta.self,Ta.namespace],color:"#e5c07b"},{tag:[Ta.operator,Ta.operatorKeyword,Ta.url,Ta.escape,Ta.regexp,Ta.link,Ta.special(Ta.string)],color:"#56b6c2"},{tag:[Ta.meta,Ta.comment],color:xf},{tag:Ta.strong,fontWeight:"bold"},{tag:Ta.emphasis,fontStyle:"italic"},{tag:Ta.strikethrough,textDecoration:"line-through"},{tag:Ta.link,color:xf,textDecoration:"underline"},{tag:Ta.heading,fontWeight:"bold",color:yf},{tag:[Ta.atom,Ta.bool,Ta.special(Ta.variableName)],color:Sf},{tag:[Ta.processingInstruction,Ta.string,Ta.inserted],color:"#98c379"},{tag:Ta.invalid,color:"#ffffff"}]))];var Ef,Af,Rf,Df,If,qf,Lf,Nf,Bf,$f=__webpack_require__(5247),Qf=__webpack_require__(5895),zf=__webpack_require__(6424),jf=__webpack_require__(7564),Wf=__webpack_require__(3911);!function(e){e.copyText=function(e){const t=document.body,i=n=>{n.preventDefault(),n.stopPropagation(),n.clipboardData.setData("text",e),t.removeEventListener("copy",i,!0)};t.addEventListener("copy",i,!0),document.execCommand("copy")}}(Ef||(Ef={})),(Bf=Af||(Af={})).boxSizing=function(e){let t=window.getComputedStyle(e),i=parseFloat(t.borderTopWidth)||0,n=parseFloat(t.borderLeftWidth)||0,s=parseFloat(t.borderRightWidth)||0,r=parseFloat(t.borderBottomWidth)||0,o=parseFloat(t.paddingTop)||0,a=parseFloat(t.paddingLeft)||0,l=parseFloat(t.paddingRight)||0,h=parseFloat(t.paddingBottom)||0;return{borderTop:i,borderLeft:n,borderRight:s,borderBottom:r,paddingTop:o,paddingLeft:a,paddingRight:l,paddingBottom:h,horizontalSum:n+a+l+s,verticalSum:i+o+h+r}},Bf.sizeLimits=function(e){let t=window.getComputedStyle(e),i=parseFloat(t.minWidth)||0,n=parseFloat(t.minHeight)||0,s=parseFloat(t.maxWidth)||1/0,r=parseFloat(t.maxHeight)||1/0;return s=Math.max(i,s),r=Math.max(n,r),{minWidth:i,minHeight:n,maxWidth:s,maxHeight:r}},Bf.hitTest=function(e,t,i){let n=e.getBoundingClientRect();return t>=n.left&&t=n.top&&i=i.bottom||(n.topi.bottom&&n.height>=i.height?e.scrollTop-=i.top-n.top:(n.topi.height||n.bottom>i.bottom&&n.height{let e=Element.prototype;return e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector||function(e){let t=this,i=t.ownerDocument?t.ownerDocument.querySelectorAll(e):[];return-1!==Array.prototype.indexOf.call(i,t)}})(),e.calculateSingle=function(e){let h=0,c=0,d=0;function u(t){let i=e.match(t);return null!==i&&(e=e.slice(i[0].length),!0)}for(e=(e=e.split(",",1)[0]).replace(l," $1 ");e.length>0;)if(u(t))h++;else if(u(i))c++;else if(u(n))c++;else if(u(r))d++;else if(u(o))c++;else if(u(s))d++;else if(!u(a))return 0;return h=Math.min(h,255),c=Math.min(c,255),d=Math.min(d,255),h<<16|c<<8|d};const t=/^#[^\s\+>~#\.\[:]+/,i=/^\.[^\s\+>~#\.\[:]+/,n=/^\[[^\]]+\]/,s=/^[^\s\+>~#\.\[:]+/,r=/^(::[^\s\+>~#\.\[:]+|:first-line|:first-letter|:before|:after)/,o=/^:[^\s\+>~#\.\[:]+/,a=/^[\s\+>~\*]+/,l=/:not\(([^\)]+)\)/g}(If||(If={}));class Vf{constructor(){this._first=null,this._last=null,this._size=0}get isEmpty(){return 0===this._size}get size(){return this._size}get length(){return this._size}get first(){return this._first?this._first.value:void 0}get last(){return this._last?this._last.value:void 0}get firstNode(){return this._first}get lastNode(){return this._last}*[Symbol.iterator](){let e=this._first;for(;e;)yield e.value,e=e.next}*retro(){let e=this._last;for(;e;)yield e.value,e=e.prev}*nodes(){let e=this._first;for(;e;)yield e,e=e.next}*retroNodes(){let e=this._last;for(;e;)yield e,e=e.prev}assign(e){this.clear();for(const t of e)this.addLast(t)}push(e){this.addLast(e)}pop(){return this.removeLast()}shift(e){this.addFirst(e)}unshift(){return this.removeFirst()}addFirst(e){let t=new qf.LinkedListNode(this,e);return this._first?(t.next=this._first,this._first.prev=t,this._first=t):(this._first=t,this._last=t),this._size++,t}addLast(e){let t=new qf.LinkedListNode(this,e);return this._last?(t.prev=this._last,this._last.next=t,this._last=t):(this._first=t,this._last=t),this._size++,t}insertBefore(e,t){if(!t||t===this._first)return this.addFirst(e);if(!(t instanceof qf.LinkedListNode)||t.list!==this)throw new Error("Reference node is not owned by the list.");let i=new qf.LinkedListNode(this,e),n=t,s=n.prev;return i.next=n,i.prev=s,n.prev=i,s.next=i,this._size++,i}insertAfter(e,t){if(!t||t===this._last)return this.addLast(e);if(!(t instanceof qf.LinkedListNode)||t.list!==this)throw new Error("Reference node is not owned by the list.");let i=new qf.LinkedListNode(this,e),n=t,s=n.next;return i.next=s,i.prev=n,n.next=i,s.prev=i,this._size++,i}removeFirst(){let e=this._first;if(e)return e===this._last?(this._first=null,this._last=null):(this._first=e.next,this._first.prev=null),e.list=null,e.next=null,e.prev=null,this._size--,e.value}removeLast(){let e=this._last;if(e)return e===this._first?(this._first=null,this._last=null):(this._last=e.prev,this._last.next=null),e.list=null,e.next=null,e.prev=null,this._size--,e.value}removeNode(e){if(!(e instanceof qf.LinkedListNode)||e.list!==this)throw new Error("Node is not owned by the list.");let t=e;t===this._first&&t===this._last?(this._first=null,this._last=null):t===this._first?(this._first=t.next,this._first.prev=null):t===this._last?(this._last=t.prev,this._last.next=null):(t.next.prev=t.prev,t.prev.next=t.next),t.list=null,t.next=null,t.prev=null,this._size--}clear(){let e=this._first;for(;e;){let t=e.next;e.list=null,e.prev=null,e.next=null,e=t}this._first=null,this._last=null,this._size=0}}!function(e){e.from=function(t){let i=new e;return i.assign(t),i}}(Vf||(Vf={})),function(e){e.LinkedListNode=class{constructor(e,t){this.list=null,this.next=null,this.prev=null,this.list=e,this.value=t}}}(qf||(qf={}));class Uf{constructor(e){this.type=e}get isConflatable(){return!1}conflate(e){return!1}}class Ff extends Uf{get isConflatable(){return!0}conflate(e){return!0}}!function(e){let t=null;const i=(n=Promise.resolve(),e=>{let t=!1;return n.then((()=>!t&&e())),()=>{t=!0}});var n;function s(e,t){let i=o.get(e);if(!i||0===i.length)return void c(e,t);let n=(0,jf.yW)((0,jf.kh)(i),(i=>!i||function(e,t,i){let n=!0;try{n="function"==typeof e?e(t,i):e.messageHook(t,i)}catch(e){l(e)}return n}(i,e,t)));n&&c(e,t)}e.sendMessage=s,e.postMessage=function(e,t){t.isConflatable&&(0,jf.G)(r,(i=>i.handler===e&&!!i.msg&&i.msg.type===t.type&&!!i.msg.isConflatable&&i.msg.conflate(t)))||d(e,t)},e.installMessageHook=function(e,t){let i=o.get(e);i&&-1!==i.indexOf(t)||(i?i.push(t):o.set(e,[t]))},e.removeMessageHook=function(e,t){let i=o.get(e);if(!i)return;let n=i.indexOf(t);-1!==n&&(i[n]=null,p(i))},e.clearData=function(e){let t=o.get(e);t&&t.length>0&&(jf.RO.fill(t,null),p(t));for(const t of r)t.handler===e&&(t.handler=null,t.msg=null)},e.flush=function(){h||null===t||(t(),t=null,h=!0,u(),h=!1)},e.getExceptionHandler=function(){return l},e.setExceptionHandler=function(e){let t=l;return l=e,t};const r=new Vf,o=new WeakMap,a=new Set;let l=e=>{console.error(e)},h=!1;function c(e,t){try{e.processMessage(t)}catch(e){l(e)}}function d(e,n){r.addLast({handler:e,msg:n}),null===t&&(t=i(u))}function u(){if(t=null,r.isEmpty)return;let e={handler:null,msg:null};for(r.addLast(e);;){let t=r.removeFirst();if(t===e)return;t.handler&&t.msg&&s(t.handler,t.msg)}}function p(e){0===a.size&&i(f),a.add(e)}function f(){a.forEach(m),a.clear()}function m(e){jf.RO.removeAllWhere(e,g)}function g(e){return null===e}}(Lf||(Lf={}));var Hf,Xf=__webpack_require__(4050),Yf=__webpack_require__(1122);class Gf{constructor(e){this._onScrollFrame=()=>{if(!this._scrollTarget)return;let{element:e,edge:t,distance:i}=this._scrollTarget,n=Hf.SCROLL_EDGE_SIZE-i,s=Math.pow(n/Hf.SCROLL_EDGE_SIZE,2),r=Math.max(1,Math.round(s*Hf.SCROLL_EDGE_SIZE));switch(t){case"top":e.scrollTop-=r;break;case"left":e.scrollLeft-=r;break;case"right":e.scrollLeft+=r;break;case"bottom":e.scrollTop+=r}requestAnimationFrame(this._onScrollFrame)},this._disposed=!1,this._dropAction="none",this._override=null,this._currentTarget=null,this._currentElement=null,this._promise=null,this._scrollTarget=null,this._resolve=null,this.document=e.document||document,this.mimeData=e.mimeData,this.dragImage=e.dragImage||null,this.proposedAction=e.proposedAction||"copy",this.supportedActions=e.supportedActions||"all",this.source=e.source||null}dispose(){if(!this._disposed){if(this._disposed=!0,this._currentTarget){let e=new PointerEvent("pointerup",{bubbles:!0,cancelable:!0,clientX:-1,clientY:-1});Hf.dispatchDragLeave(this,this._currentTarget,null,e)}this._finalize("none")}}get isDisposed(){return this._disposed}start(e,t){if(this._disposed)return Promise.resolve("none");if(this._promise)return this._promise;this._addListeners(),this._attachDragImage(e,t),this._promise=new Promise((e=>{this._resolve=e}));let i=new PointerEvent("pointermove",{bubbles:!0,cancelable:!0,clientX:e,clientY:t});return document.dispatchEvent(i),this._promise}handleEvent(e){switch(e.type){case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"keydown":this._evtKeyDown(e);break;default:e.preventDefault(),e.stopPropagation()}}moveDragImage(e,t){this.dragImage&&(this.dragImage.style.transform=`translate(${e}px, ${t}px)`)}_evtPointerMove(e){e.preventDefault(),e.stopPropagation(),this._updateCurrentTarget(e),this._updateDragScroll(e),this.moveDragImage(e.clientX,e.clientY)}_evtPointerUp(e){if(e.preventDefault(),e.stopPropagation(),0!==e.button)return;if(this._updateCurrentTarget(e),!this._currentTarget)return void this._finalize("none");if("none"===this._dropAction)return Hf.dispatchDragLeave(this,this._currentTarget,null,e),void this._finalize("none");let t=Hf.dispatchDrop(this,this._currentTarget,e);this._finalize(t)}_evtKeyDown(e){e.preventDefault(),e.stopPropagation(),27===e.keyCode&&this.dispose()}_addListeners(){document.addEventListener("pointerdown",this,!0),document.addEventListener("pointermove",this,!0),document.addEventListener("pointerup",this,!0),document.addEventListener("pointerenter",this,!0),document.addEventListener("pointerleave",this,!0),document.addEventListener("pointerover",this,!0),document.addEventListener("pointerout",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("keyup",this,!0),document.addEventListener("keypress",this,!0),document.addEventListener("contextmenu",this,!0)}_removeListeners(){document.removeEventListener("pointerdown",this,!0),document.removeEventListener("pointermove",this,!0),document.removeEventListener("pointerup",this,!0),document.removeEventListener("pointerenter",this,!0),document.removeEventListener("pointerleave",this,!0),document.removeEventListener("pointerover",this,!0),document.removeEventListener("pointerout",this,!0),document.removeEventListener("keydown",this,!0),document.removeEventListener("keyup",this,!0),document.removeEventListener("keypress",this,!0),document.removeEventListener("contextmenu",this,!0)}_updateDragScroll(e){let t=Hf.findScrollTarget(e);(this._scrollTarget||t)&&(this._scrollTarget||setTimeout(this._onScrollFrame,500),this._scrollTarget=t)}_updateCurrentTarget(e){let t=this._currentTarget,i=this._currentTarget,n=this._currentElement,s=Hf.findElementBehidBackdrop(e,this.document);this._currentElement=s,s!==n&&s!==i&&Hf.dispatchDragExit(this,i,s,e),s!==n&&s!==i&&(i=Hf.dispatchDragEnter(this,s,i,e)),i!==t&&(this._currentTarget=i,Hf.dispatchDragLeave(this,t,i,e));let r=Hf.dispatchDragOver(this,i,e);this._setDropAction(r)}_attachDragImage(e,t){if(!this.dragImage)return;this.dragImage.classList.add("lm-mod-drag-image");let i=this.dragImage.style;i.pointerEvents="none",i.position="fixed",i.transform=`translate(${e}px, ${t}px)`,(this.document instanceof Document?this.document.body:this.document.firstElementChild).appendChild(this.dragImage)}_detachDragImage(){if(!this.dragImage)return;let e=this.dragImage.parentNode;e&&e.removeChild(this.dragImage)}_setDropAction(e){if(e=Hf.validateAction(e,this.supportedActions),!this._override||this._dropAction!==e)switch(e){case"none":this._dropAction=e,this._override=Gf.overrideCursor("no-drop",this.document);break;case"copy":this._dropAction=e,this._override=Gf.overrideCursor("copy",this.document);break;case"link":this._dropAction=e,this._override=Gf.overrideCursor("alias",this.document);break;case"move":this._dropAction=e,this._override=Gf.overrideCursor("move",this.document)}}_finalize(e){let t=this._resolve;this._removeListeners(),this._detachDragImage(),this._override&&(this._override.dispose(),this._override=null),this.mimeData.clear(),this._disposed=!0,this._dropAction="none",this._currentTarget=null,this._currentElement=null,this._scrollTarget=null,this._promise=null,this._resolve=null,t&&t(e)}}function Zf(){return em.keyboardLayout}!function(e){class t extends DragEvent{constructor(e,t){super(t.type,{bubbles:!0,cancelable:!0,altKey:e.altKey,button:e.button,clientX:e.clientX,clientY:e.clientY,ctrlKey:e.ctrlKey,detail:0,metaKey:e.metaKey,relatedTarget:t.related,screenX:e.screenX,screenY:e.screenY,shiftKey:e.shiftKey,view:window});const{drag:i}=t;this.dropAction="none",this.mimeData=i.mimeData,this.proposedAction=i.proposedAction,this.supportedActions=i.supportedActions,this.source=i.source}}e.Event=t,e.overrideCursor=function(e,t=document){return Hf.overrideCursor(e,t)}}(Gf||(Gf={})),function(e){function t(t,n=document){if(i&&t==i.event)return i.element;e.cursorBackdrop.style.zIndex="-1000";const s=n.elementFromPoint(t.clientX,t.clientY);return e.cursorBackdrop.style.zIndex="",i={event:t,element:s},s}e.SCROLL_EDGE_SIZE=20,e.validateAction=function(e,t){return n[e]&s[t]?e:"none"},e.findElementBehidBackdrop=t;let i=null;e.findScrollTarget=function(i){let n=i.clientX,s=i.clientY,r=t(i);for(;r;r=r.parentElement){if(!r.hasAttribute("data-lm-dragscroll"))continue;let t=0,i=0;r===document.body&&(t=window.pageXOffset,i=window.pageYOffset);let o=r.getBoundingClientRect(),a=o.top+i,l=o.left+t,h=l+o.width,c=a+o.height;if(n=h||s=c)continue;let d,u=n-l+1,p=s-a+1,f=h-n,m=c-s,g=Math.min(u,p,f,m);if(g>e.SCROLL_EDGE_SIZE)continue;switch(g){case m:d="bottom";break;case p:d="top";break;case f:d="right";break;case u:d="left";break;default:throw"unreachable"}let v,O=r.scrollWidth-r.clientWidth,b=r.scrollHeight-r.clientHeight;switch(d){case"top":v=b>0&&r.scrollTop>0;break;case"left":v=O>0&&r.scrollLeft>0;break;case"right":v=O>0&&r.scrollLeft0&&r.scrollTop{n===o&&e.cursorBackdrop.isConnected&&(document.removeEventListener("pointermove",r,!0),s.removeChild(e.cursorBackdrop))}))};let o=0;e.cursorBackdrop=function(){const e=document.createElement("div");return e.classList.add("lm-cursor-backdrop"),e}()}(Hf||(Hf={}));class Kf{constructor(e,t,i=[]){this.name=e,this._codes=t,this._keys=Kf.extractKeys(t),this._modifierKeys=Kf.convertToKeySet(i)}keys(){return Object.keys(this._keys)}isValidKey(e){return e in this._keys}isModifierKey(e){return e in this._modifierKeys}keyForKeydownEvent(e){return this._codes[e.keyCode]||""}}!function(e){e.extractKeys=function(e){let t=Object.create(null);for(let i in e)t[e[i]]=!0;return t},e.convertToKeySet=function(e){let t=Object(null);for(let i=0,n=e.length;i{this._commands.delete(e),this._commandChanged.emit({id:e,type:"removed"})}))}notifyCommandChanged(e){if(void 0!==e&&!this._commands.has(e))throw new Error(`Command '${e}' is not registered.`);this._commandChanged.emit({id:e,type:e?"changed":"many-changed"})}describedBy(e,t=Wf.JSONExt.emptyObject){var i;let n=this._commands.get(e);return Promise.resolve(null!==(i=null==n?void 0:n.describedBy.call(void 0,t))&&void 0!==i?i:{args:null})}label(e,t=Wf.JSONExt.emptyObject){var i;let n=this._commands.get(e);return null!==(i=null==n?void 0:n.label.call(void 0,t))&&void 0!==i?i:""}mnemonic(e,t=Wf.JSONExt.emptyObject){let i=this._commands.get(e);return i?i.mnemonic.call(void 0,t):-1}icon(e,t=Wf.JSONExt.emptyObject){var i;return null===(i=this._commands.get(e))||void 0===i?void 0:i.icon.call(void 0,t)}iconClass(e,t=Wf.JSONExt.emptyObject){let i=this._commands.get(e);return i?i.iconClass.call(void 0,t):""}iconLabel(e,t=Wf.JSONExt.emptyObject){let i=this._commands.get(e);return i?i.iconLabel.call(void 0,t):""}caption(e,t=Wf.JSONExt.emptyObject){let i=this._commands.get(e);return i?i.caption.call(void 0,t):""}usage(e,t=Wf.JSONExt.emptyObject){let i=this._commands.get(e);return i?i.usage.call(void 0,t):""}className(e,t=Wf.JSONExt.emptyObject){let i=this._commands.get(e);return i?i.className.call(void 0,t):""}dataset(e,t=Wf.JSONExt.emptyObject){let i=this._commands.get(e);return i?i.dataset.call(void 0,t):{}}isEnabled(e,t=Wf.JSONExt.emptyObject){let i=this._commands.get(e);return!!i&&i.isEnabled.call(void 0,t)}isToggled(e,t=Wf.JSONExt.emptyObject){let i=this._commands.get(e);return!!i&&i.isToggled.call(void 0,t)}isToggleable(e,t=Wf.JSONExt.emptyObject){let i=this._commands.get(e);return!!i&&i.isToggleable}isVisible(e,t=Wf.JSONExt.emptyObject){let i=this._commands.get(e);return!!i&&i.isVisible.call(void 0,t)}execute(e,t=Wf.JSONExt.emptyObject){let i,n=this._commands.get(e);if(!n)return Promise.reject(new Error(`Command '${e}' not registered.`));try{i=n.execute.call(void 0,t)}catch(e){i=Promise.reject(e)}let s=Promise.resolve(i);return this._commandExecuted.emit({id:e,args:t,result:s}),s}addKeyBinding(e){let t=tm.createKeyBinding(e);return this._keyBindings.push(t),this._keyBindingChanged.emit({binding:t,type:"added"}),new Yf.DisposableDelegate((()=>{jf.RO.removeFirstOf(this._keyBindings,t),this._keyBindingChanged.emit({binding:t,type:"removed"})}))}processKeydownEvent(e){if(this._replaying||lm.isModifierKeyPressed(e))return;let t=lm.keystrokeForKeydownEvent(e);if(!t)return this._replayKeydownEvents(),void this._clearPendingState();this._keystrokes.push(t);let{exact:i,partial:n}=tm.matchKeyBinding(this._keyBindings,this._keystrokes,e);return i||n?(e.preventDefault(),e.stopPropagation(),i&&!n?(this._executeKeyBinding(i),void this._clearPendingState()):(i&&(this._exactKeyMatch=i),this._keydownEvents.push(e),void this._startTimer())):(this._replayKeydownEvents(),void this._clearPendingState())}_startTimer(){this._clearTimer(),this._timerID=window.setTimeout((()=>{this._onPendingTimeout()}),tm.CHORD_TIMEOUT)}_clearTimer(){0!==this._timerID&&(clearTimeout(this._timerID),this._timerID=0)}_replayKeydownEvents(){0!==this._keydownEvents.length&&(this._replaying=!0,this._keydownEvents.forEach(tm.replayKeyEvent),this._replaying=!1)}_executeKeyBinding(e){let{command:t,args:i}=e;if(this.hasCommand(t)&&this.isEnabled(t,i))this.execute(t,i);else{let i=this.hasCommand(t)?"enabled":"registered",n=`Cannot execute key binding '${e.keys.join(", ")}':`,s=`command '${t}' is not ${i}.`;console.warn(`${n} ${s}`)}}_clearPendingState(){this._clearTimer(),this._exactKeyMatch=null,this._keystrokes.length=0,this._keydownEvents.length=0}_onPendingTimeout(){this._timerID=0,this._exactKeyMatch?this._executeKeyBinding(this._exactKeyMatch):this._replayKeydownEvents(),this._clearPendingState()}}!function(e){function t(e){let t="",i=!1,n=!1,s=!1,r=!1;for(let o of e.split(/\s+/))"Accel"===o?Rf.IS_MAC?n=!0:s=!0:"Alt"===o?i=!0:"Cmd"===o?n=!0:"Ctrl"===o?s=!0:"Shift"===o?r=!0:o.length>0&&(t=o);return{cmd:n,ctrl:s,alt:i,shift:r,key:t}}function i(e){let i="",n=t(e);return n.ctrl&&(i+="Ctrl "),n.alt&&(i+="Alt "),n.shift&&(i+="Shift "),n.cmd&&Rf.IS_MAC&&(i+="Cmd "),i+n.key}e.parseKeystroke=t,e.normalizeKeystroke=i,e.normalizeKeys=function(e){let t;return t=Rf.IS_WIN?e.winKeys||e.keys:Rf.IS_MAC?e.macKeys||e.keys:e.linuxKeys||e.keys,t.map(i)},e.formatKeystroke=function(e){return"string"==typeof e?i(e):e.map(i).join(", ");function i(e){let i=[],n=Rf.IS_MAC?" ":"+",s=t(e);return s.ctrl&&i.push("Ctrl"),s.alt&&i.push("Alt"),s.shift&&i.push("Shift"),Rf.IS_MAC&&s.cmd&&i.push("Cmd"),i.push(s.key),i.map(tm.formatKey).join(n)}},e.isModifierKeyPressed=function(e){let t=Zf(),i=t.keyForKeydownEvent(e);return t.isModifierKey(i)},e.keystrokeForKeydownEvent=function(e){let t=Zf(),i=t.keyForKeydownEvent(e);if(!i||t.isModifierKey(i))return"";let n=[];return e.ctrlKey&&n.push("Ctrl"),e.altKey&&n.push("Alt"),e.shiftKey&&n.push("Shift"),e.metaKey&&Rf.IS_MAC&&n.push("Cmd"),n.push(i),n.join(" ")}}(lm||(lm={})),function(e){e.CHORD_TIMEOUT=1e3,e.createCommand=function(e){return{execute:e.execute,describedBy:h("function"==typeof e.describedBy?e.describedBy:{args:null,...e.describedBy},(()=>({args:null}))),label:h(e.label,n),mnemonic:h(e.mnemonic,s),icon:h(e.icon,l),iconClass:h(e.iconClass,n),iconLabel:h(e.iconLabel,n),caption:h(e.caption,n),usage:h(e.usage,n),className:h(e.className,n),dataset:h(e.dataset,a),isEnabled:e.isEnabled||r,isToggled:e.isToggled||o,isToggleable:e.isToggleable||!!e.isToggled,isVisible:e.isVisible||r}},e.createKeyBinding=function(e){return{keys:lm.normalizeKeys(e),selector:c(e),command:e.command,args:e.args||Wf.JSONExt.emptyObject}},e.matchKeyBinding=function(e,t,i){let n=null,s=!1,r=1/0,o=0;for(let a=0,l=e.length;ar)continue;let p=Df.calculateSpecificity(l.selector);(!n||c=o)&&(n=l,r=c,o=p)}return{exact:n,partial:s}},e.replayKeyEvent=function(e){e.target.dispatchEvent(function(e){let t=document.createEvent("Event"),i=e.bubbles||!0,n=e.cancelable||!0;return t.initEvent(e.type||"keydown",i,n),t.key=e.key||"",t.keyCode=e.keyCode||0,t.which=e.keyCode||0,t.ctrlKey=e.ctrlKey||!1,t.altKey=e.altKey||!1,t.shiftKey=e.shiftKey||!1,t.metaKey=e.metaKey||!1,t.view=e.view||window,t}(e))},e.formatKey=function(e){return Rf.IS_MAC?t.hasOwnProperty(e)?t[e]:e:i.hasOwnProperty(e)?i[e]:e};const t={Backspace:"⌫",Tab:"⇥",Enter:"⏎",Shift:"⇧",Ctrl:"⌃",Alt:"⌥",Escape:"⎋",PageUp:"⇞",PageDown:"⇟",End:"↘",Home:"↖",ArrowLeft:"←",ArrowUp:"↑",ArrowRight:"→",ArrowDown:"↓",Delete:"⌦",Cmd:"⌘"},i={Escape:"Esc",PageUp:"Page Up",PageDown:"Page Down",ArrowLeft:"Left",ArrowUp:"Up",ArrowRight:"Right",ArrowDown:"Down",Delete:"Del"},n=()=>"",s=()=>-1,r=()=>!0,o=()=>!1,a=()=>({}),l=()=>{};function h(e,t){return void 0===e?t:"function"==typeof e?e:()=>e}function c(e){if(-1!==e.selector.indexOf(","))throw new Error(`Selector cannot contain commas: ${e.selector}`);if(!Df.isValid(e.selector))throw new Error(`Invalid selector: ${e.selector}`);return e.selector}function d(e,t){if(e.lengtht.length?2:1}function u(e,t){let i=t.target,n=t.currentTarget;for(let t=0;null!==i;i=i.parentElement,++t){if(i.hasAttribute("data-lm-suppress-shortcuts"))return-1;if(Df.matches(i,e))return t;if(i===n)return-1}return-1}}(tm||(tm={}));class hm{constructor(e){this.type="text",this.content=e}}class cm{constructor(e,t,i,n){this.type="element",this.tag=e,this.attrs=t,this.children=i,this.renderer=n}}function dm(e){let t,i={},n=[];for(let e=1,r=arguments.length;e=n;--r){const n=t[r],o=s?e.lastChild:e.childNodes[r];"text"===n.type||(n.renderer&&n.renderer.unrender?n.renderer.unrender(o,{attrs:n.attrs,children:n.children}):i(o,n.children,0,!1)),s&&e.removeChild(o)}}e.hostMap=new WeakMap,e.asContentArray=function(e){return e?e instanceof Array?e:[e]:[]},e.createDOMNode=t,e.updateContent=function e(n,r,o){if(r===o)return;let a=function(e,t){let i=e.firstChild,n=Object.create(null);for(let e of t)"element"===e.type&&e.attrs.key&&(n[e.attrs.key]={vNode:e,element:i}),i=i.nextSibling;return n}(n,r),l=r.slice(),h=n.firstChild,c=o.length;for(let i=0;i=l.length){t(o[i],n);continue}let r=l[i],c=o[i];if(r===c){h=h.nextSibling;continue}if("text"===r.type&&"text"===c.type){h.textContent!==c.content&&(h.textContent=c.content),h=h.nextSibling;continue}if("text"===r.type||"text"===c.type){jf.RO.insert(l,i,c),t(c,n,h);continue}if(!r.renderer!=!c.renderer){jf.RO.insert(l,i,c),t(c,n,h);continue}let d=c.attrs.key;if(d&&d in a){let e=a[d];e.vNode!==r&&(jf.RO.move(l,l.indexOf(e.vNode,i+1),i),n.insertBefore(e.element,h),r=e.vNode,h=e.element)}if(r===c){h=h.nextSibling;continue}let u=r.attrs.key;u&&u!==d?(jf.RO.insert(l,i,c),t(c,n,h)):r.tag===c.tag?(s(h,r.attrs,c.attrs),c.renderer?c.renderer.render(h,{attrs:c.attrs,children:c.children}):e(h,r.children,c.children),h=h.nextSibling):(jf.RO.insert(l,i,c),t(c,n,h))}i(n,l,c,!0)};const n={key:!0,className:!0,htmlFor:!0,dataset:!0,style:!0};function s(e,t,i){if(t===i)return;let s;for(s in t)s in n||s in i||("on"===s.substr(0,2)?e[s]=null:e.removeAttribute(s));for(s in i)s in n||t[s]===i[s]||("on"===s.substr(0,2)?e[s]=i[s]:e.setAttribute(s,i[s]));t.className!==i.className&&(void 0!==i.className?e.setAttribute("class",i.className):e.removeAttribute("class")),t.htmlFor!==i.htmlFor&&(void 0!==i.htmlFor?e.setAttribute("for",i.htmlFor):e.removeAttribute("for")),t.dataset!==i.dataset&&function(e,t,i){for(let n in t)n in i||e.removeAttribute(`data-${n}`);for(let n in i)t[n]!==i[n]&&e.setAttribute(`data-${n}`,i[n])}(e,t.dataset||{},i.dataset||{}),t.style!==i.style&&function(e,t,i){let n,s=e.style;for(n in t)n in i||(s[n]="");for(n in i)t[n]!==i[n]&&(s[n]=i[n])}(e,t.style||{},i.style||{})}}(nm||(nm={}));class um{constructor(){this.sizeHint=0,this.minSize=0,this.maxSize=1/0,this.stretch=1,this.size=0,this.done=!1}}!function(e){e.calc=function(e,t){let i=e.length;if(0===i)return t;let n=0,s=0,r=0,o=0,a=0;for(let t=0;t0&&(o+=i.stretch,a++)}if(t===r)return 0;if(t<=n){for(let t=0;t=s){for(let t=0;t0&&n>l;){let t=n,s=o;for(let r=0;r0&&n>l;){let t=n/h;for(let s=0;s0&&n>l;){let t=n,s=o;for(let r=0;r=i.maxSize?(n-=i.maxSize-i.size,o-=i.stretch,i.size=i.maxSize,i.done=!0,h--,a--):(n-=l,i.size+=l)}}for(;h>0&&n>l;){let t=n/h;for(let s=0;s=i.maxSize?(n-=i.maxSize-i.size,i.size=i.maxSize,i.done=!0,h--):(n-=t,i.size+=t))}}}return 0},e.adjust=function(e,t,i){0!==e.length&&0!==i&&(i>0?function(e,t,i){let n=0;for(let i=0;i<=t;++i){let t=e[i];n+=t.maxSize-t.size}let s=0;for(let i=t+1,n=e.length;i=0&&r>0;--i){let t=e[i],n=t.maxSize-t.size;n>=r?(t.sizeHint=t.size+r,r=0):(t.sizeHint=t.size+n,r-=n)}let o=i;for(let i=t+1,n=e.length;i0;++i){let t=e[i],n=t.size-t.minSize;n>=o?(t.sizeHint=t.size-o,o=0):(t.sizeHint=t.size-n,o-=n)}}(e,t,i):function(e,t,i){let n=0;for(let i=t+1,s=e.length;i0;++i){let t=e[i],n=t.maxSize-t.size;n>=r?(t.sizeHint=t.size+r,r=0):(t.sizeHint=t.size+n,r-=n)}let o=i;for(let i=t;i>=0&&o>0;--i){let t=e[i],n=t.size-t.minSize;n>=o?(t.sizeHint=t.size-o,o=0):(t.sizeHint=t.size-n,o-=n)}}(e,t,-i))}}(sm||(sm={}));class pm{constructor(e){this._label="",this._caption="",this._mnemonic=-1,this._icon=void 0,this._iconClass="",this._iconLabel="",this._className="",this._closable=!1,this._changed=new zf.Signal(this),this._isDisposed=!1,this.owner=e.owner,void 0!==e.label&&(this._label=e.label),void 0!==e.mnemonic&&(this._mnemonic=e.mnemonic),void 0!==e.icon&&(this._icon=e.icon),void 0!==e.iconClass&&(this._iconClass=e.iconClass),void 0!==e.iconLabel&&(this._iconLabel=e.iconLabel),void 0!==e.caption&&(this._caption=e.caption),void 0!==e.className&&(this._className=e.className),void 0!==e.closable&&(this._closable=e.closable),this._dataset=e.dataset||{}}get changed(){return this._changed}get label(){return this._label}set label(e){this._label!==e&&(this._label=e,this._changed.emit(void 0))}get mnemonic(){return this._mnemonic}set mnemonic(e){this._mnemonic!==e&&(this._mnemonic=e,this._changed.emit(void 0))}get icon(){return this._icon}set icon(e){this._icon!==e&&(this._icon=e,this._changed.emit(void 0))}get iconClass(){return this._iconClass}set iconClass(e){this._iconClass!==e&&(this._iconClass=e,this._changed.emit(void 0))}get iconLabel(){return this._iconLabel}set iconLabel(e){this._iconLabel!==e&&(this._iconLabel=e,this._changed.emit(void 0))}get caption(){return this._caption}set caption(e){this._caption!==e&&(this._caption=e,this._changed.emit(void 0))}get className(){return this._className}set className(e){this._className!==e&&(this._className=e,this._changed.emit(void 0))}get closable(){return this._closable}set closable(e){this._closable!==e&&(this._closable=e,this._changed.emit(void 0))}get dataset(){return this._dataset}set dataset(e){this._dataset!==e&&(this._dataset=e,this._changed.emit(void 0))}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,zf.Signal.clearData(this))}}class fm{constructor(e={}){this._flags=0,this._layout=null,this._parent=null,this._disposed=new zf.Signal(this),this._hiddenMode=fm.HiddenMode.Display,this.node=rm.createNode(e),this.addClass("lm-Widget")}dispose(){this.isDisposed||(this.setFlag(fm.Flag.IsDisposed),this._disposed.emit(void 0),this.parent?this.parent=null:this.isAttached&&fm.detach(this),this._layout&&(this._layout.dispose(),this._layout=null),this.title.dispose(),zf.Signal.clearData(this),Lf.clearData(this),Xf.AttachedProperty.clearData(this))}get disposed(){return this._disposed}get isDisposed(){return this.testFlag(fm.Flag.IsDisposed)}get isAttached(){return this.testFlag(fm.Flag.IsAttached)}get isHidden(){return this.testFlag(fm.Flag.IsHidden)}get isVisible(){return this.testFlag(fm.Flag.IsVisible)}get title(){return rm.titleProperty.get(this)}get id(){return this.node.id}set id(e){this.node.id=e}get dataset(){return this.node.dataset}get hiddenMode(){return this._hiddenMode}set hiddenMode(e){this._hiddenMode!==e&&(this.isHidden&&this._toggleHidden(!1),e==fm.HiddenMode.Scale?this.node.style.willChange="transform":this.node.style.willChange="auto",this._hiddenMode=e,this.isHidden&&this._toggleHidden(!0))}get parent(){return this._parent}set parent(e){if(this._parent!==e){if(e&&this.contains(e))throw new Error("Invalid parent widget.");if(this._parent&&!this._parent.isDisposed){let e=new fm.ChildMessage("child-removed",this);Lf.sendMessage(this._parent,e)}if(this._parent=e,this._parent&&!this._parent.isDisposed){let e=new fm.ChildMessage("child-added",this);Lf.sendMessage(this._parent,e)}this.isDisposed||Lf.sendMessage(this,fm.Msg.ParentChanged)}}get layout(){return this._layout}set layout(e){if(this._layout!==e){if(this.testFlag(fm.Flag.DisallowLayout))throw new Error("Cannot set widget layout.");if(this._layout)throw new Error("Cannot change widget layout.");if(e.parent)throw new Error("Cannot change layout parent.");this._layout=e,e.parent=this}}*children(){this._layout&&(yield*this._layout)}contains(e){for(let t=e;t;t=t._parent)if(t===this)return!0;return!1}hasClass(e){return this.node.classList.contains(e)}addClass(e){this.node.classList.add(e)}removeClass(e){this.node.classList.remove(e)}toggleClass(e,t){return!0===t?(this.node.classList.add(e),!0):!1===t?(this.node.classList.remove(e),!1):this.node.classList.toggle(e)}update(){Lf.postMessage(this,fm.Msg.UpdateRequest)}fit(){Lf.postMessage(this,fm.Msg.FitRequest)}activate(){Lf.postMessage(this,fm.Msg.ActivateRequest)}close(){Lf.sendMessage(this,fm.Msg.CloseRequest)}show(){if(this.testFlag(fm.Flag.IsHidden)&&(!this.isAttached||this.parent&&!this.parent.isVisible||Lf.sendMessage(this,fm.Msg.BeforeShow),this.clearFlag(fm.Flag.IsHidden),this._toggleHidden(!1),!this.isAttached||this.parent&&!this.parent.isVisible||Lf.sendMessage(this,fm.Msg.AfterShow),this.parent)){let e=new fm.ChildMessage("child-shown",this);Lf.sendMessage(this.parent,e)}}hide(){if(!this.testFlag(fm.Flag.IsHidden)&&(!this.isAttached||this.parent&&!this.parent.isVisible||Lf.sendMessage(this,fm.Msg.BeforeHide),this.setFlag(fm.Flag.IsHidden),this._toggleHidden(!0),!this.isAttached||this.parent&&!this.parent.isVisible||Lf.sendMessage(this,fm.Msg.AfterHide),this.parent)){let e=new fm.ChildMessage("child-hidden",this);Lf.sendMessage(this.parent,e)}}setHidden(e){e?this.hide():this.show()}testFlag(e){return 0!=(this._flags&e)}setFlag(e){this._flags|=e}clearFlag(e){this._flags&=~e}processMessage(e){switch(e.type){case"resize":this.notifyLayout(e),this.onResize(e);break;case"update-request":this.notifyLayout(e),this.onUpdateRequest(e);break;case"fit-request":this.notifyLayout(e),this.onFitRequest(e);break;case"before-show":this.notifyLayout(e),this.onBeforeShow(e);break;case"after-show":this.setFlag(fm.Flag.IsVisible),this.notifyLayout(e),this.onAfterShow(e);break;case"before-hide":this.notifyLayout(e),this.onBeforeHide(e);break;case"after-hide":this.clearFlag(fm.Flag.IsVisible),this.notifyLayout(e),this.onAfterHide(e);break;case"before-attach":this.notifyLayout(e),this.onBeforeAttach(e);break;case"after-attach":this.isHidden||this.parent&&!this.parent.isVisible||this.setFlag(fm.Flag.IsVisible),this.setFlag(fm.Flag.IsAttached),this.notifyLayout(e),this.onAfterAttach(e);break;case"before-detach":this.notifyLayout(e),this.onBeforeDetach(e);break;case"after-detach":this.clearFlag(fm.Flag.IsVisible),this.clearFlag(fm.Flag.IsAttached),this.notifyLayout(e),this.onAfterDetach(e);break;case"activate-request":this.notifyLayout(e),this.onActivateRequest(e);break;case"close-request":this.notifyLayout(e),this.onCloseRequest(e);break;case"child-added":this.notifyLayout(e),this.onChildAdded(e);break;case"child-removed":this.notifyLayout(e),this.onChildRemoved(e);break;default:this.notifyLayout(e)}}notifyLayout(e){this._layout&&this._layout.processParentMessage(e)}onCloseRequest(e){this.parent?this.parent=null:this.isAttached&&fm.detach(this)}onResize(e){}onUpdateRequest(e){}onFitRequest(e){}onActivateRequest(e){}onBeforeShow(e){}onAfterShow(e){}onBeforeHide(e){}onAfterHide(e){}onBeforeAttach(e){}onAfterAttach(e){}onBeforeDetach(e){}onAfterDetach(e){}onChildAdded(e){}onChildRemoved(e){}_toggleHidden(e){if(e)switch(this._hiddenMode){case fm.HiddenMode.Display:this.addClass("lm-mod-hidden");break;case fm.HiddenMode.Scale:this.node.style.transform="scale(0)",this.node.setAttribute("aria-hidden","true");break;case fm.HiddenMode.ContentVisibility:this.node.style.contentVisibility="hidden",this.node.style.zIndex="-1"}else switch(this._hiddenMode){case fm.HiddenMode.Display:this.removeClass("lm-mod-hidden");break;case fm.HiddenMode.Scale:this.node.style.transform="",this.node.removeAttribute("aria-hidden");break;case fm.HiddenMode.ContentVisibility:this.node.style.contentVisibility="",this.node.style.zIndex=""}}}!function(e){var t,i,n;(t=e.HiddenMode||(e.HiddenMode={}))[t.Display=0]="Display",t[t.Scale=1]="Scale",t[t.ContentVisibility=2]="ContentVisibility",(i=e.Flag||(e.Flag={}))[i.IsDisposed=1]="IsDisposed",i[i.IsAttached=2]="IsAttached",i[i.IsHidden=4]="IsHidden",i[i.IsVisible=8]="IsVisible",i[i.DisallowLayout=16]="DisallowLayout",(n=e.Msg||(e.Msg={})).BeforeShow=new Uf("before-show"),n.AfterShow=new Uf("after-show"),n.BeforeHide=new Uf("before-hide"),n.AfterHide=new Uf("after-hide"),n.BeforeAttach=new Uf("before-attach"),n.AfterAttach=new Uf("after-attach"),n.BeforeDetach=new Uf("before-detach"),n.AfterDetach=new Uf("after-detach"),n.ParentChanged=new Uf("parent-changed"),n.UpdateRequest=new Ff("update-request"),n.FitRequest=new Ff("fit-request"),n.ActivateRequest=new Ff("activate-request"),n.CloseRequest=new Ff("close-request"),e.ChildMessage=class extends Uf{constructor(e,t){super(e),this.child=t}};class s extends Uf{constructor(e,t){super("resize"),this.width=e,this.height=t}}e.ResizeMessage=s,function(e){e.UnknownSize=new e(-1,-1)}(s=e.ResizeMessage||(e.ResizeMessage={})),e.attach=function(t,i,n=null){if(t.parent)throw new Error("Cannot attach a child widget.");if(t.isAttached||t.node.isConnected)throw new Error("Widget is already attached.");if(!i.isConnected)throw new Error("Host is not attached.");Lf.sendMessage(t,e.Msg.BeforeAttach),i.insertBefore(t.node,n),Lf.sendMessage(t,e.Msg.AfterAttach)},e.detach=function(t){if(t.parent)throw new Error("Cannot detach a child widget.");if(!t.isAttached||!t.node.isConnected)throw new Error("Widget is not attached.");Lf.sendMessage(t,e.Msg.BeforeDetach),t.node.parentNode.removeChild(t.node),Lf.sendMessage(t,e.Msg.AfterDetach)}}(fm||(fm={})),function(e){e.titleProperty=new Xf.AttachedProperty({name:"title",create:e=>new pm({owner:e})}),e.createNode=function(e){return e.node||document.createElement(e.tag||"div")}}(rm||(rm={}));class mm{constructor(e={}){this._disposed=!1,this._parent=null,this._fitPolicy=e.fitPolicy||"set-min-size"}dispose(){this._parent=null,this._disposed=!0,zf.Signal.clearData(this),Xf.AttachedProperty.clearData(this)}get isDisposed(){return this._disposed}get parent(){return this._parent}set parent(e){if(this._parent!==e){if(this._parent)throw new Error("Cannot change parent widget.");if(e.layout!==this)throw new Error("Invalid parent widget.");this._parent=e,this.init()}}get fitPolicy(){return this._fitPolicy}set fitPolicy(e){if(this._fitPolicy!==e&&(this._fitPolicy=e,this._parent)){let e=this._parent.node.style;e.minWidth="",e.minHeight="",e.maxWidth="",e.maxHeight="",this._parent.fit()}}processParentMessage(e){switch(e.type){case"resize":this.onResize(e);break;case"update-request":this.onUpdateRequest(e);break;case"fit-request":this.onFitRequest(e);break;case"before-show":this.onBeforeShow(e);break;case"after-show":this.onAfterShow(e);break;case"before-hide":this.onBeforeHide(e);break;case"after-hide":this.onAfterHide(e);break;case"before-attach":this.onBeforeAttach(e);break;case"after-attach":this.onAfterAttach(e);break;case"before-detach":this.onBeforeDetach(e);break;case"after-detach":this.onAfterDetach(e);break;case"child-removed":this.onChildRemoved(e);break;case"child-shown":this.onChildShown(e);break;case"child-hidden":this.onChildHidden(e)}}init(){for(const e of this)e.parent=this.parent}onResize(e){for(const e of this)Lf.sendMessage(e,fm.ResizeMessage.UnknownSize)}onUpdateRequest(e){for(const e of this)Lf.sendMessage(e,fm.ResizeMessage.UnknownSize)}onBeforeAttach(e){for(const t of this)Lf.sendMessage(t,e)}onAfterAttach(e){for(const t of this)Lf.sendMessage(t,e)}onBeforeDetach(e){for(const t of this)Lf.sendMessage(t,e)}onAfterDetach(e){for(const t of this)Lf.sendMessage(t,e)}onBeforeShow(e){for(const t of this)t.isHidden||Lf.sendMessage(t,e)}onAfterShow(e){for(const t of this)t.isHidden||Lf.sendMessage(t,e)}onBeforeHide(e){for(const t of this)t.isHidden||Lf.sendMessage(t,e)}onAfterHide(e){for(const t of this)t.isHidden||Lf.sendMessage(t,e)}onChildRemoved(e){this.removeWidget(e.child)}onFitRequest(e){}onChildShown(e){}onChildHidden(e){}}!function(e){e.getHorizontalAlignment=function(e){return om.horizontalAlignmentProperty.get(e)},e.setHorizontalAlignment=function(e,t){om.horizontalAlignmentProperty.set(e,t)},e.getVerticalAlignment=function(e){return om.verticalAlignmentProperty.get(e)},e.setVerticalAlignment=function(e,t){om.verticalAlignmentProperty.set(e,t)}}(mm||(mm={}));class gm{constructor(e){this._top=NaN,this._left=NaN,this._width=NaN,this._height=NaN,this._minWidth=0,this._minHeight=0,this._maxWidth=1/0,this._maxHeight=1/0,this._disposed=!1,this.widget=e,this.widget.node.style.position="absolute",this.widget.node.style.contain="strict"}dispose(){if(this._disposed)return;this._disposed=!0;let e=this.widget.node.style;e.position="",e.top="",e.left="",e.width="",e.height="",e.contain=""}get minWidth(){return this._minWidth}get minHeight(){return this._minHeight}get maxWidth(){return this._maxWidth}get maxHeight(){return this._maxHeight}get isDisposed(){return this._disposed}get isHidden(){return this.widget.isHidden}get isVisible(){return this.widget.isVisible}get isAttached(){return this.widget.isAttached}fit(){let e=Af.sizeLimits(this.widget.node);this._minWidth=e.minWidth,this._minHeight=e.minHeight,this._maxWidth=e.maxWidth,this._maxHeight=e.maxHeight}update(e,t,i,n){let s=Math.max(this._minWidth,Math.min(i,this._maxWidth)),r=Math.max(this._minHeight,Math.min(n,this._maxHeight));if(s"center",changed:t}),e.verticalAlignmentProperty=new Xf.AttachedProperty({name:"verticalAlignment",create:()=>"top",changed:t})}(om||(om={}));class vm extends mm{constructor(){super(...arguments),this._widgets=[]}dispose(){for(;this._widgets.length>0;)this._widgets.pop().dispose();super.dispose()}get widgets(){return this._widgets}*[Symbol.iterator](){yield*this._widgets}addWidget(e){this.insertWidget(this._widgets.length,e)}insertWidget(e,t){t.parent=this.parent;let i=this._widgets.indexOf(t),n=Math.max(0,Math.min(e,this._widgets.length));if(-1===i)return jf.RO.insert(this._widgets,n,t),void(this.parent&&this.attachWidget(n,t));n===this._widgets.length&&n--,i!==n&&(jf.RO.move(this._widgets,i,n),this.parent&&this.moveWidget(i,n,t))}removeWidget(e){this.removeWidgetAt(this._widgets.indexOf(e))}removeWidgetAt(e){let t=jf.RO.removeAt(this._widgets,e);t&&this.parent&&this.detachWidget(e,t)}init(){super.init();let e=0;for(const t of this)this.attachWidget(e++,t)}attachWidget(e,t){let i=this.parent.node.children[e];this.parent.isAttached&&Lf.sendMessage(t,fm.Msg.BeforeAttach),this.parent.node.insertBefore(t.node,i),this.parent.isAttached&&Lf.sendMessage(t,fm.Msg.AfterAttach)}moveWidget(e,t,i){this.parent.isAttached&&Lf.sendMessage(i,fm.Msg.BeforeDetach),this.parent.node.removeChild(i.node),this.parent.isAttached&&Lf.sendMessage(i,fm.Msg.AfterDetach);let n=this.parent.node.children[t];this.parent.isAttached&&Lf.sendMessage(i,fm.Msg.BeforeAttach),this.parent.node.insertBefore(i.node,n),this.parent.isAttached&&Lf.sendMessage(i,fm.Msg.AfterAttach)}detachWidget(e,t){this.parent.isAttached&&Lf.sendMessage(t,fm.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&Lf.sendMessage(t,fm.Msg.AfterDetach)}}!function(e){e.clampDimension=function(e){return Math.max(0,Math.floor(e))}}(am||(am={}));var Om,bm,_m,ym,wm,xm,Sm,km,Tm,Cm,Pm=am;class Mm extends vm{constructor(e){super(),this.widgetOffset=0,this._fixed=0,this._spacing=4,this._dirty=!1,this._hasNormedSizes=!1,this._sizers=[],this._items=[],this._handles=[],this._box=null,this._alignment="start",this._orientation="horizontal",this.renderer=e.renderer,void 0!==e.orientation&&(this._orientation=e.orientation),void 0!==e.alignment&&(this._alignment=e.alignment),void 0!==e.spacing&&(this._spacing=am.clampDimension(e.spacing))}dispose(){for(const e of this._items)e.dispose();this._box=null,this._items.length=0,this._sizers.length=0,this._handles.length=0,super.dispose()}get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this.parent&&(this.parent.dataset.orientation=e,this.parent.fit()))}get alignment(){return this._alignment}set alignment(e){this._alignment!==e&&(this._alignment=e,this.parent&&(this.parent.dataset.alignment=e,this.parent.update()))}get spacing(){return this._spacing}set spacing(e){e=am.clampDimension(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())}get handles(){return this._handles}absoluteSizes(){return this._sizers.map((e=>e.size))}relativeSizes(){return Om.normalize(this._sizers.map((e=>e.size)))}setRelativeSizes(e,t=!0){let i=this._sizers.length,n=e.slice(0,i);for(;n.length0&&(e.sizeHint=e.size);sm.adjust(this._sizers,e,i),this.parent&&this.parent.update()}}init(){this.parent.dataset.orientation=this.orientation,this.parent.dataset.alignment=this.alignment,super.init()}attachWidget(e,t){let i=new gm(t),n=Om.createHandle(this.renderer),s=Om.averageSize(this._sizers),r=Om.createSizer(s);jf.RO.insert(this._items,e,i),jf.RO.insert(this._sizers,e,r),jf.RO.insert(this._handles,e,n),this.parent.isAttached&&Lf.sendMessage(t,fm.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.node.appendChild(n),this.parent.isAttached&&Lf.sendMessage(t,fm.Msg.AfterAttach),this.parent.fit()}moveWidget(e,t,i){jf.RO.move(this._items,e,t),jf.RO.move(this._sizers,e,t),jf.RO.move(this._handles,e,t),this.parent.fit()}detachWidget(e,t){let i=jf.RO.removeAt(this._items,e),n=jf.RO.removeAt(this._handles,e);jf.RO.removeAt(this._sizers,e),this.parent.isAttached&&Lf.sendMessage(t,fm.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.node.removeChild(n),this.parent.isAttached&&Lf.sendMessage(t,fm.Msg.AfterDetach),i.dispose(),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}updateItemPosition(e,t,i,n,s,r,o){const a=this._items[e];if(a.isHidden)return;let l=this._handles[e].style;t?(i+=this.widgetOffset,a.update(i,n,o,s),i+=o,l.top=`${n}px`,l.left=`${i}px`,l.width=`${this._spacing}px`,l.height=`${s}px`):(n+=this.widgetOffset,a.update(i,n,r,o),n+=o,l.top=`${n}px`,l.left=`${i}px`,l.width=`${r}px`,l.height=`${this._spacing}px`)}_fit(){let e=0,t=-1;for(let i=0,n=this._items.length;i0&&(r.sizeHint=r.size),t.isHidden?(r.minSize=0,r.maxSize=0):(t.fit(),r.stretch=Mm.getStretch(t.widget),i?(r.minSize=t.minWidth,r.maxSize=t.maxWidth,n+=t.minWidth,s=Math.max(s,t.minHeight)):(r.minSize=t.minHeight,r.maxSize=t.maxHeight,s+=t.minHeight,n=Math.max(n,t.minWidth)))}let r=this._box=Af.boxSizing(this.parent.node);n+=r.horizontalSum,s+=r.verticalSum;let o=this.parent.node.style;o.minWidth=`${n}px`,o.minHeight=`${s}px`,this._dirty=!0,this.parent.parent&&Lf.sendMessage(this.parent.parent,fm.Msg.FitRequest),this._dirty&&Lf.sendMessage(this.parent,fm.Msg.UpdateRequest)}_update(e,t){this._dirty=!1;let i=0;for(let e=0,t=this._items.length;e0){let e;if(e=h?Math.max(0,r-this._fixed):Math.max(0,o-this._fixed),this._hasNormedSizes){for(let t of this._sizers)t.sizeHint*=e;this._hasNormedSizes=!1}let t=sm.calc(this._sizers,e);if(t>0)switch(this._alignment){case"start":break;case"center":a=0,l=t/2;break;case"end":a=0,l=t;break;case"justify":a=t/i,l=0;break;default:throw"unreachable"}}for(let e=0,t=this._items.length;e0,coerce:(e,t)=>Math.max(0,Math.floor(t)),changed:function(e){e.parent&&e.parent.layout instanceof Mm&&e.parent.fit()}}),e.createSizer=function(e){let t=new um;return t.sizeHint=Math.floor(e),t},e.createHandle=function(e){let t=e.createHandle();return t.style.position="absolute",t.style.contain="style",t},e.averageSize=function(e){return e.reduce(((e,t)=>e+t.size),0)/e.length||0},e.normalize=function(e){let t=e.length;if(0===t)return[];let i=e.reduce(((e,t)=>e+Math.abs(t)),0);return 0===i?e.map((e=>1/t)):e.map((e=>e/i))}}(Om||(Om={}));class Em extends Mm{constructor(e){super({...e,orientation:e.orientation||"vertical"}),this._titles=[],this.titleSpace=e.titleSpace||22}get titleSpace(){return this.widgetOffset}set titleSpace(e){e=Pm.clampDimension(e),this.widgetOffset!==e&&(this.widgetOffset=e,this.parent&&this.parent.fit())}get titles(){return this._titles}dispose(){this.isDisposed||(this._titles.length=0,super.dispose())}updateTitle(e,t){const i=this._titles[e],n=i.classList.contains("lm-mod-expanded"),s=bm.createTitle(this.renderer,t.title,n);this._titles[e]=s,this.parent.node.replaceChild(s,i)}insertWidget(e,t){t.id||(t.id=`id-${Wf.UUID.uuid4()}`),super.insertWidget(e,t)}attachWidget(e,t){const i=bm.createTitle(this.renderer,t.title);jf.RO.insert(this._titles,e,i),this.parent.node.appendChild(i),t.node.setAttribute("role","region"),t.node.setAttribute("aria-labelledby",i.id),super.attachWidget(e,t)}moveWidget(e,t,i){jf.RO.move(this._titles,e,t),super.moveWidget(e,t,i)}detachWidget(e,t){const i=jf.RO.removeAt(this._titles,e);this.parent.node.removeChild(i),super.detachWidget(e,t)}updateItemPosition(e,t,i,n,s,r,o){const a=this._titles[e].style;a.top=`${n}px`,a.left=`${i}px`,a.height=`${this.widgetOffset}px`,a.width=t?`${s}px`:`${r}px`,super.updateItemPosition(e,t,i,n,s,r,o)}}!function(e){e.createTitle=function(e,t,i=!0){const n=e.createSectionTitle(t);return n.style.position="absolute",n.style.contain="strict",n.setAttribute("aria-label",`${t.label} Section`),n.setAttribute("aria-expanded",i?"true":"false"),n.setAttribute("aria-controls",t.owner.id),i&&n.classList.add("lm-mod-expanded"),n}}(bm||(bm={}));class Am extends fm{constructor(e={}){super(),this.addClass("lm-Panel"),this.layout=_m.createLayout(e)}get widgets(){return this.layout.widgets}addWidget(e){this.layout.addWidget(e)}insertWidget(e,t){this.layout.insertWidget(e,t)}}!function(e){e.createLayout=function(e){return e.layout||new vm}}(_m||(_m={}));class Rm extends Am{constructor(e={}){super({layout:ym.createLayout(e)}),this._handleMoved=new zf.Signal(this),this._pressData=null,this.addClass("lm-SplitPanel")}dispose(){this._releaseMouse(),super.dispose()}get orientation(){return this.layout.orientation}set orientation(e){this.layout.orientation=e}get alignment(){return this.layout.alignment}set alignment(e){this.layout.alignment=e}get spacing(){return this.layout.spacing}set spacing(e){this.layout.spacing=e}get renderer(){return this.layout.renderer}get handleMoved(){return this._handleMoved}get handles(){return this.layout.handles}relativeSizes(){return this.layout.relativeSizes()}setRelativeSizes(e,t=!0){this.layout.setRelativeSizes(e,t)}handleEvent(e){switch(e.type){case"pointerdown":this._evtPointerDown(e);break;case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"keydown":this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("pointerdown",this)}onAfterDetach(e){this.node.removeEventListener("pointerdown",this),this._releaseMouse()}onChildAdded(e){e.child.addClass("lm-SplitPanel-child"),this._releaseMouse()}onChildRemoved(e){e.child.removeClass("lm-SplitPanel-child"),this._releaseMouse()}_evtKeyDown(e){this._pressData&&(e.preventDefault(),e.stopPropagation()),27===e.keyCode&&this._releaseMouse()}_evtPointerDown(e){if(0!==e.button)return;let t,i=this.layout,n=jf.RO.findFirstIndex(i.handles,(t=>t.contains(e.target)));if(-1===n)return;e.preventDefault(),e.stopPropagation(),document.addEventListener("pointerup",this,!0),document.addEventListener("pointermove",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("contextmenu",this,!0);let s=i.handles[n],r=s.getBoundingClientRect();t="horizontal"===i.orientation?e.clientX-r.left:e.clientY-r.top;let o=window.getComputedStyle(s),a=Gf.overrideCursor(o.cursor);this._pressData={index:n,delta:t,override:a}}_evtPointerMove(e){let t;e.preventDefault(),e.stopPropagation();let i=this.layout,n=this.node.getBoundingClientRect();t="horizontal"===i.orientation?e.clientX-n.left-this._pressData.delta:e.clientY-n.top-this._pressData.delta,i.moveHandle(this._pressData.index,t)}_evtPointerUp(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this._releaseMouse())}_releaseMouse(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,this._handleMoved.emit(),document.removeEventListener("keydown",this,!0),document.removeEventListener("pointerup",this,!0),document.removeEventListener("pointermove",this,!0),document.removeEventListener("contextmenu",this,!0))}}!function(e){class t{createHandle(){let e=document.createElement("div");return e.className="lm-SplitPanel-handle",e}}e.Renderer=t,e.defaultRenderer=new t,e.getStretch=function(e){return Mm.getStretch(e)},e.setStretch=function(e,t){Mm.setStretch(e,t)}}(Rm||(Rm={})),function(e){e.createLayout=function(e){return e.layout||new Mm({renderer:e.renderer||Rm.defaultRenderer,orientation:e.orientation,alignment:e.alignment,spacing:e.spacing})}}(ym||(ym={}));class Dm extends Rm{constructor(e={}){super({...e,layout:wm.createLayout(e)}),this._widgetSizesCache=new WeakMap,this._expansionToggled=new zf.Signal(this),this.addClass("lm-AccordionPanel")}get renderer(){return this.layout.renderer}get titleSpace(){return this.layout.titleSpace}set titleSpace(e){this.layout.titleSpace=e}get titles(){return this.layout.titles}get expansionToggled(){return this._expansionToggled}addWidget(e){super.addWidget(e),e.title.changed.connect(this._onTitleChanged,this)}collapse(e){const t=this.layout.widgets[e];t&&!t.isHidden&&this._toggleExpansion(e)}expand(e){const t=this.layout.widgets[e];t&&t.isHidden&&this._toggleExpansion(e)}insertWidget(e,t){super.insertWidget(e,t),t.title.changed.connect(this._onTitleChanged,this)}handleEvent(e){switch(super.handleEvent(e),e.type){case"click":this._evtClick(e);break;case"keydown":this._eventKeyDown(e)}}onBeforeAttach(e){this.node.addEventListener("click",this),this.node.addEventListener("keydown",this),super.onBeforeAttach(e)}onAfterDetach(e){super.onAfterDetach(e),this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this)}_onTitleChanged(e){const t=jf.RO.findFirstIndex(this.widgets,(t=>t.contains(e.owner)));t>=0&&(this.layout.updateTitle(t,e.owner),this.update())}_computeWidgetSize(e){const t=this.layout,i=t.widgets[e];if(!i)return;const n=i.isHidden,s=t.absoluteSizes(),r=(n?-1:1)*this.spacing,o=s.reduce(((e,t)=>e+t));let a=[...s];if(n){const t=this._widgetSizesCache.get(i);if(!t)return;a[e]+=t;const n=a.map((e=>e-t>0)).lastIndexOf(!0);-1===n?a.forEach(((i,n)=>{n!==e&&(a[n]-=s[n]/o*(t-r))})):a[n]-=t-r}else{const t=s[e];this._widgetSizesCache.set(i,t),a[e]=0;const n=a.map((e=>e>0)).lastIndexOf(!0);if(-1===n)return;a[n]=s[n]+t+r}return a.map((e=>e/(o+r)))}_evtClick(e){const t=e.target;if(t){const i=jf.RO.findFirstIndex(this.titles,(e=>e.contains(t)));i>=0&&(e.preventDefault(),e.stopPropagation(),this._toggleExpansion(i))}}_eventKeyDown(e){if(e.defaultPrevented)return;const t=e.target;let i=!1;if(t){const n=jf.RO.findFirstIndex(this.titles,(e=>e.contains(t)));if(n>=0){const s=e.keyCode.toString();if(e.key.match(/Space|Enter/)||s.match(/13|32/))t.click(),i=!0;else if("horizontal"===this.orientation?e.key.match(/ArrowLeft|ArrowRight/)||s.match(/37|39/):e.key.match(/ArrowUp|ArrowDown/)||s.match(/38|40/)){const t=e.key.match(/ArrowLeft|ArrowUp/)||s.match(/37|38/)?-1:1,r=this.titles.length,o=(n+r+t)%r;this.titles[o].focus(),i=!0}else"End"===e.key||"35"===s?(this.titles[this.titles.length-1].focus(),i=!0):"Home"!==e.key&&"36"!==s||(this.titles[0].focus(),i=!0)}i&&e.preventDefault()}}_toggleExpansion(e){const t=this.titles[e],i=this.layout.widgets[e],n=this._computeWidgetSize(e);n&&this.setRelativeSizes(n,!1),i.isHidden?(t.classList.add("lm-mod-expanded"),t.setAttribute("aria-expanded","true"),i.show()):(t.classList.remove("lm-mod-expanded"),t.setAttribute("aria-expanded","false"),i.hide()),this._expansionToggled.emit(e)}}!function(e){class t extends Rm.Renderer{constructor(){super(),this.titleClassName="lm-AccordionPanel-title",this._titleID=0,this._titleKeys=new WeakMap,this._uuid=++t._nInstance}createCollapseIcon(e){return document.createElement("span")}createSectionTitle(e){const t=document.createElement("h3");t.setAttribute("tabindex","0"),t.id=this.createTitleKey(e),t.className=this.titleClassName;for(const i in e.dataset)t.dataset[i]=e.dataset[i];t.appendChild(this.createCollapseIcon(e)).className="lm-AccordionPanel-titleCollapser";const i=t.appendChild(document.createElement("span"));return i.className="lm-AccordionPanel-titleLabel",i.textContent=e.label,i.title=e.caption||e.label,t}createTitleKey(e){let t=this._titleKeys.get(e);return void 0===t&&(t=`title-key-${this._uuid}-${this._titleID++}`,this._titleKeys.set(e,t)),t}}t._nInstance=0,e.Renderer=t,e.defaultRenderer=new t}(Dm||(Dm={})),function(e){e.createLayout=function(e){return e.layout||new Em({renderer:e.renderer||Dm.defaultRenderer,orientation:e.orientation,alignment:e.alignment,spacing:e.spacing,titleSpace:e.titleSpace})}}(wm||(wm={}));class Im extends vm{constructor(e={}){super(),this._fixed=0,this._spacing=4,this._dirty=!1,this._sizers=[],this._items=[],this._box=null,this._alignment="start",this._direction="top-to-bottom",void 0!==e.direction&&(this._direction=e.direction),void 0!==e.alignment&&(this._alignment=e.alignment),void 0!==e.spacing&&(this._spacing=Pm.clampDimension(e.spacing))}dispose(){for(const e of this._items)e.dispose();this._box=null,this._items.length=0,this._sizers.length=0,super.dispose()}get direction(){return this._direction}set direction(e){this._direction!==e&&(this._direction=e,this.parent&&(this.parent.dataset.direction=e,this.parent.fit()))}get alignment(){return this._alignment}set alignment(e){this._alignment!==e&&(this._alignment=e,this.parent&&(this.parent.dataset.alignment=e,this.parent.update()))}get spacing(){return this._spacing}set spacing(e){e=Pm.clampDimension(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())}init(){this.parent.dataset.direction=this.direction,this.parent.dataset.alignment=this.alignment,super.init()}attachWidget(e,t){jf.RO.insert(this._items,e,new gm(t)),jf.RO.insert(this._sizers,e,new um),this.parent.isAttached&&Lf.sendMessage(t,fm.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.isAttached&&Lf.sendMessage(t,fm.Msg.AfterAttach),this.parent.fit()}moveWidget(e,t,i){jf.RO.move(this._items,e,t),jf.RO.move(this._sizers,e,t),this.parent.update()}detachWidget(e,t){let i=jf.RO.removeAt(this._items,e);jf.RO.removeAt(this._sizers,e),this.parent.isAttached&&Lf.sendMessage(t,fm.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&Lf.sendMessage(t,fm.Msg.AfterDetach),i.dispose(),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_fit(){let e=0;for(let t=0,i=this._items.length;t0)switch(this._alignment){case"start":break;case"center":l=0,h=n/2;break;case"end":l=0,h=n;break;case"justify":l=n/i,h=0;break;default:throw"unreachable"}for(let e=0,t=this._items.length;e0,coerce:(e,t)=>Math.max(0,Math.floor(t)),changed:t}),e.sizeBasisProperty=new Xf.AttachedProperty({name:"sizeBasis",create:()=>0,coerce:(e,t)=>Math.max(0,Math.floor(t)),changed:t}),e.isHorizontal=function(e){return"left-to-right"===e||"right-to-left"===e},e.clampSpacing=function(e){return Math.max(0,Math.floor(e))}}(xm||(xm={}));class qm extends Am{constructor(e={}){super({layout:Sm.createLayout(e)}),this.addClass("lm-BoxPanel")}get direction(){return this.layout.direction}set direction(e){this.layout.direction=e}get alignment(){return this.layout.alignment}set alignment(e){this.layout.alignment=e}get spacing(){return this.layout.spacing}set spacing(e){this.layout.spacing=e}onChildAdded(e){e.child.addClass("lm-BoxPanel-child")}onChildRemoved(e){e.child.removeClass("lm-BoxPanel-child")}}!function(e){e.getStretch=function(e){return Im.getStretch(e)},e.setStretch=function(e,t){Im.setStretch(e,t)},e.getSizeBasis=function(e){return Im.getSizeBasis(e)},e.setSizeBasis=function(e,t){Im.setSizeBasis(e,t)}}(qm||(qm={})),function(e){e.createLayout=function(e){return e.layout||new Im(e)}}(Sm||(Sm={}));class Lm extends fm{constructor(e){super({node:km.createNode()}),this._activeIndex=-1,this._items=[],this._results=null,this.addClass("lm-CommandPalette"),this.setFlag(fm.Flag.DisallowLayout),this.commands=e.commands,this.renderer=e.renderer||Lm.defaultRenderer,this.commands.commandChanged.connect(this._onGenericChange,this),this.commands.keyBindingChanged.connect(this._onGenericChange,this)}dispose(){this._items.length=0,this._results=null,super.dispose()}get searchNode(){return this.node.getElementsByClassName("lm-CommandPalette-search")[0]}get inputNode(){return this.node.getElementsByClassName("lm-CommandPalette-input")[0]}get contentNode(){return this.node.getElementsByClassName("lm-CommandPalette-content")[0]}get items(){return this._items}addItem(e){let t=km.createItem(this.commands,e);return this._items.push(t),this.refresh(),t}addItems(e){const t=e.map((e=>km.createItem(this.commands,e)));return t.forEach((e=>this._items.push(e))),this.refresh(),t}removeItem(e){this.removeItemAt(this._items.indexOf(e))}removeItemAt(e){jf.RO.removeAt(this._items,e)&&this.refresh()}clearItems(){0!==this._items.length&&(this._items.length=0,this.refresh())}refresh(){this._results=null,""!==this.inputNode.value?this.node.getElementsByClassName("lm-close-icon")[0].style.display="inherit":this.node.getElementsByClassName("lm-close-icon")[0].style.display="none",this.update()}handleEvent(e){switch(e.type){case"click":this._evtClick(e);break;case"keydown":this._evtKeyDown(e);break;case"input":this.refresh();break;case"focus":case"blur":this._toggleFocused()}}onBeforeAttach(e){this.node.addEventListener("click",this),this.node.addEventListener("keydown",this),this.node.addEventListener("input",this),this.node.addEventListener("focus",this,!0),this.node.addEventListener("blur",this,!0)}onAfterDetach(e){this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this),this.node.removeEventListener("input",this),this.node.removeEventListener("focus",this,!0),this.node.removeEventListener("blur",this,!0)}onAfterShow(e){this.update(),super.onAfterShow(e)}onActivateRequest(e){if(this.isAttached){let e=this.inputNode;e.focus(),e.select()}}onUpdateRequest(e){if(this.isHidden)return;let t=this.inputNode.value,i=this.contentNode,n=this._results;if(n||(n=this._results=km.search(this._items,t),this._activeIndex=t?jf.RO.findFirstIndex(n,km.canActivate):-1),!t&&0===n.length)return void im.render(null,i);if(t&&0===n.length){let e=this.renderer.renderEmptyMessage({query:t});return void im.render(e,i)}let s=this.renderer,r=this._activeIndex,o=new Array(n.length);for(let e=0,t=n.length;e=n.length)i.scrollTop=0;else{let e=i.children[r];Af.scrollIntoViewIfNeeded(i,e)}}_evtClick(e){if(0!==e.button)return;if(e.target.classList.contains("lm-close-icon"))return this.inputNode.value="",void this.refresh();let t=jf.RO.findFirstIndex(this.contentNode.children,(t=>t.contains(e.target)));-1!==t&&(e.preventDefault(),e.stopPropagation(),this._execute(t))}_evtKeyDown(e){if(!(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey))switch(e.keyCode){case 13:e.preventDefault(),e.stopPropagation(),this._execute(this._activeIndex);break;case 38:e.preventDefault(),e.stopPropagation(),this._activatePreviousItem();break;case 40:e.preventDefault(),e.stopPropagation(),this._activateNextItem()}}_activateNextItem(){if(!this._results||0===this._results.length)return;let e=this._activeIndex,t=this._results.length,i=ee-t)),h=r.slice(0,l),c=r.slice(l);for(let e=0,t=c.length;ei.command===e&&Wf.JSONExt.deepEqual(i.args,t)))||null}}}(km||(km={}));class Nm extends fm{constructor(e){super({node:Tm.createNode()}),this._childIndex=-1,this._activeIndex=-1,this._openTimerID=0,this._closeTimerID=0,this._items=[],this._childMenu=null,this._parentMenu=null,this._aboutToClose=new zf.Signal(this),this._menuRequested=new zf.Signal(this),this.addClass("lm-Menu"),this.setFlag(fm.Flag.DisallowLayout),this.commands=e.commands,this.renderer=e.renderer||Nm.defaultRenderer}dispose(){this.close(),this._items.length=0,super.dispose()}get aboutToClose(){return this._aboutToClose}get menuRequested(){return this._menuRequested}get parentMenu(){return this._parentMenu}get childMenu(){return this._childMenu}get rootMenu(){let e=this;for(;e._parentMenu;)e=e._parentMenu;return e}get leafMenu(){let e=this;for(;e._childMenu;)e=e._childMenu;return e}get contentNode(){return this.node.getElementsByClassName("lm-Menu-content")[0]}get activeItem(){return this._items[this._activeIndex]||null}set activeItem(e){this.activeIndex=e?this._items.indexOf(e):-1}get activeIndex(){return this._activeIndex}set activeIndex(e){(e<0||e>=this._items.length)&&(e=-1),-1===e||Tm.canActivate(this._items[e])||(e=-1),this._activeIndex!==e&&(this._activeIndex=e,this._activeIndex>=0&&this.contentNode.childNodes[this._activeIndex]&&this.contentNode.childNodes[this._activeIndex].focus(),this.update())}get items(){return this._items}activateNextItem(){let e=this._items.length,t=this._activeIndex,i=t{this.activeIndex=e}})}im.render(r,this.contentNode)}onCloseRequest(e){this._cancelOpenTimer(),this._cancelCloseTimer(),this.activeIndex=-1;let t=this._childMenu;t&&(this._childIndex=-1,this._childMenu=null,t._parentMenu=null,t.close());let i=this._parentMenu;i&&(this._parentMenu=null,i._childIndex=-1,i._childMenu=null,i.activate()),this.isAttached&&this._aboutToClose.emit(void 0),super.onCloseRequest(e)}_evtKeyDown(e){e.preventDefault(),e.stopPropagation();let t=e.keyCode;if(13===t)return void this.triggerActiveItem();if(27===t)return void this.close();if(37===t)return void(this._parentMenu?this.close():this._menuRequested.emit("previous"));if(38===t)return void this.activatePreviousItem();if(39===t){let e=this.activeItem;return void(e&&"submenu"===e.type?this.triggerActiveItem():this.rootMenu._menuRequested.emit("next"))}if(40===t)return void this.activateNextItem();let i=Zf().keyForKeydownEvent(e);if(!i)return;let n=this._activeIndex+1,s=Tm.findMnemonic(this._items,i,n);-1===s.index||s.multiple?-1!==s.index?this.activeIndex=s.index:-1!==s.auto&&(this.activeIndex=s.auto):(this.activeIndex=s.index,this.triggerActiveItem())}_evtMouseUp(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this.triggerActiveItem())}_evtMouseMove(e){let t=jf.RO.findFirstIndex(this.contentNode.children,(t=>Af.hitTest(t,e.clientX,e.clientY)));if(t===this._activeIndex)return;if(this.activeIndex=t,t=this.activeIndex,t===this._childIndex)return this._cancelOpenTimer(),void this._cancelCloseTimer();-1!==this._childIndex&&this._startCloseTimer(),this._cancelOpenTimer();let i=this.activeItem;i&&"submenu"===i.type&&i.submenu&&this._startOpenTimer()}_evtMouseEnter(e){for(let e=this._parentMenu;e;e=e._parentMenu)e._cancelOpenTimer(),e._cancelCloseTimer(),e.activeIndex=e._childIndex}_evtMouseLeave(e){if(this._cancelOpenTimer(),!this._childMenu)return void(this.activeIndex=-1);let{clientX:t,clientY:i}=e;Af.hitTest(this._childMenu.node,t,i)?this._cancelCloseTimer():(this.activeIndex=-1,this._startCloseTimer())}_evtMouseDown(e){this._parentMenu||(Tm.hitTestMenus(this,e.clientX,e.clientY)?(e.preventDefault(),e.stopPropagation()):this.close())}_openChildMenu(e=!1){let t=this.activeItem;if(!t||"submenu"!==t.type||!t.submenu)return void this._closeChildMenu();let i=t.submenu;if(i===this._childMenu)return;Nm.saveWindowData(),this._closeChildMenu(),this._childMenu=i,this._childIndex=this._activeIndex,i._parentMenu=this,Lf.sendMessage(this,fm.Msg.UpdateRequest);let n=this.contentNode.children[this._activeIndex];Tm.openSubmenu(i,n),e&&(i.activeIndex=-1,i.activateNextItem()),i.activate()}_closeChildMenu(){this._childMenu&&this._childMenu.close()}_startOpenTimer(){0===this._openTimerID&&(this._openTimerID=window.setTimeout((()=>{this._openTimerID=0,this._openChildMenu()}),Tm.TIMER_DELAY))}_startCloseTimer(){0===this._closeTimerID&&(this._closeTimerID=window.setTimeout((()=>{this._closeTimerID=0,this._closeChildMenu()}),Tm.TIMER_DELAY))}_cancelOpenTimer(){0!==this._openTimerID&&(clearTimeout(this._openTimerID),this._openTimerID=0)}_cancelCloseTimer(){0!==this._closeTimerID&&(clearTimeout(this._closeTimerID),this._closeTimerID=0)}static saveWindowData(){Tm.saveWindowData()}}!function(e){class t{renderItem(e){let t=this.createItemClass(e),i=this.createItemDataset(e),n=this.createItemARIA(e);return dm.li({className:t,dataset:i,tabindex:"0",onfocus:e.onfocus,...n},this.renderIcon(e),this.renderLabel(e),this.renderShortcut(e),this.renderSubmenu(e))}renderIcon(e){let t=this.createIconClass(e);return dm.div({className:t},e.item.icon,e.item.iconLabel)}renderLabel(e){let t=this.formatLabel(e);return dm.div({className:"lm-Menu-itemLabel"},t)}renderShortcut(e){let t=this.formatShortcut(e);return dm.div({className:"lm-Menu-itemShortcut"},t)}renderSubmenu(e){return dm.div({className:"lm-Menu-itemSubmenuIcon"})}createItemClass(e){let t="lm-Menu-item";e.item.isEnabled||(t+=" lm-mod-disabled"),e.item.isToggled&&(t+=" lm-mod-toggled"),e.item.isVisible||(t+=" lm-mod-hidden"),e.active&&(t+=" lm-mod-active"),e.collapsed&&(t+=" lm-mod-collapsed");let i=e.item.className;return i&&(t+=` ${i}`),t}createItemDataset(e){let t,{type:i,command:n,dataset:s}=e.item;return t="command"===i?{...s,type:i,command:n}:{...s,type:i},t}createIconClass(e){let t="lm-Menu-itemIcon",i=e.item.iconClass;return i?`${t} ${i}`:t}createItemARIA(e){let t={};switch(e.item.type){case"separator":t.role="presentation";break;case"submenu":t["aria-haspopup"]="true",e.item.isEnabled||(t["aria-disabled"]="true");break;default:e.item.isEnabled||(t["aria-disabled"]="true"),t.role="menuitem"}return t}formatLabel(e){let{label:t,mnemonic:i}=e.item;if(i<0||i>=t.length)return t;let n=t.slice(0,i),s=t.slice(i+1),r=t[i];return[n,dm.span({className:"lm-Menu-itemMnemonic"},r),s]}formatShortcut(e){let t=e.item.keyBinding;return t?lm.formatKeystroke(t.keys):null}}e.Renderer=t,e.defaultRenderer=new t}(Nm||(Nm={})),function(e){e.TIMER_DELAY=300,e.SUBMENU_OVERLAP=3;let t=null,i=0;function n(){return i>0?(i--,t):r()}function s(e){return"separator"!==e.type&&e.isEnabled&&e.isVisible}function r(){return{pageXOffset:window.pageXOffset,pageYOffset:window.pageYOffset,clientWidth:document.documentElement.clientWidth,clientHeight:document.documentElement.clientHeight}}e.saveWindowData=function(){t=r(),i++},e.createNode=function(){let e=document.createElement("div"),t=document.createElement("ul");return t.className="lm-Menu-content",e.appendChild(t),t.setAttribute("role","menu"),e.tabIndex=0,e},e.canActivate=s,e.createItem=function(e,t){return new o(e.commands,t)},e.hitTestMenus=function(e,t,i){for(let n=e;n;n=n.childMenu)if(Af.hitTest(n.node,t,i))return!0;return!1},e.computeCollapsed=function(e){let t=new Array(e.length);jf.RO.fill(t,!1);let i=0,n=e.length;for(;i=0;--s){let i=e[s];if(i.isVisible){if("separator"!==i.type)break;t[s]=!0}}let r=!1;for(;++ia+h&&(t=a+h-f),!r&&i+m>l+c&&(i>l+c?i=l+c-m:i-=m),p.transform=`translate(${Math.max(0,t)}px, ${Math.max(0,i)}px`,p.opacity="1"},e.openSubmenu=function(t,i){const s=n();let r=s.pageXOffset,o=s.pageYOffset,a=s.clientWidth,l=s.clientHeight;Lf.sendMessage(t,fm.Msg.UpdateRequest);let h=l,c=t.node,d=c.style;d.opacity="0",d.maxHeight=`${h}px`,fm.attach(t,document.body);let{width:u,height:p}=c.getBoundingClientRect(),f=Af.boxSizing(t.node),m=i.getBoundingClientRect(),g=m.right-e.SUBMENU_OVERLAP;g+u>r+a&&(g=m.left+e.SUBMENU_OVERLAP-u);let v=m.top-f.borderTop-f.paddingTop;v+p>o+l&&(v=m.bottom+f.borderBottom+f.paddingBottom-p),d.transform=`translate(${Math.max(0,g)}px, ${Math.max(0,v)}px`,d.opacity="1"},e.findMnemonic=function(e,t,i){let n=-1,r=-1,o=!1,a=t.toUpperCase();for(let t=0,l=e.length;t=0&&ui.command===e&&Wf.JSONExt.deepEqual(i.args,t)))||null}return null}}}(Tm||(Tm={})),function(e){function t(e,t){let i=e.rank,n=t.rank;return i!==n?i=this._titles.length)&&(e=-1),this._currentIndex===e)return;let t=this._currentIndex,i=this._titles[t]||null,n=e,s=this._titles[n]||null;this._currentIndex=n,this._previousTitle=i,this.update(),this._currentChanged.emit({previousIndex:t,previousTitle:i,currentIndex:n,currentTitle:s})}get name(){return this._name}set name(e){this._name=e,e?this.contentNode.setAttribute("aria-label",e):this.contentNode.removeAttribute("aria-label")}get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._releaseMouse(),this._orientation=e,this.dataset.orientation=e,this.contentNode.setAttribute("aria-orientation",e))}get addButtonEnabled(){return this._addButtonEnabled}set addButtonEnabled(e){this._addButtonEnabled!==e&&(this._addButtonEnabled=e,e?this.addButtonNode.classList.remove("lm-mod-hidden"):this.addButtonNode.classList.add("lm-mod-hidden"))}get titles(){return this._titles}get contentNode(){return this.node.getElementsByClassName("lm-TabBar-content")[0]}get addButtonNode(){return this.node.getElementsByClassName("lm-TabBar-addButton")[0]}addTab(e){return this.insertTab(this._titles.length,e)}insertTab(e,t){this._releaseMouse();let i=Qm.asTitle(t),n=this._titles.indexOf(i),s=Math.max(0,Math.min(e,this._titles.length));return-1===n?(jf.RO.insert(this._titles,s,i),i.changed.connect(this._onTitleChanged,this),this.update(),this._adjustCurrentForInsert(s,i),i):(s===this._titles.length&&s--,n===s||(jf.RO.move(this._titles,n,s),this.update(),this._adjustCurrentForMove(n,s)),i)}removeTab(e){this.removeTabAt(this._titles.indexOf(e))}removeTabAt(e){this._releaseMouse();let t=jf.RO.removeAt(this._titles,e);t&&(t.changed.disconnect(this._onTitleChanged,this),t===this._previousTitle&&(this._previousTitle=null),this.update(),this._adjustCurrentForRemove(e,t))}clearTabs(){if(0===this._titles.length)return;this._releaseMouse();for(let e of this._titles)e.changed.disconnect(this._onTitleChanged,this);let e=this.currentIndex,t=this.currentTitle;this._currentIndex=-1,this._previousTitle=null,this._titles.length=0,this.update(),-1!==e&&this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:-1,currentTitle:null})}releaseMouse(){this._releaseMouse()}handleEvent(e){switch(e.type){case"pointerdown":this._evtPointerDown(e);break;case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"dblclick":this._evtDblClick(e);break;case"keydown":e.eventPhase===Event.CAPTURING_PHASE?this._evtKeyDownCapturing(e):this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("pointerdown",this),this.node.addEventListener("dblclick",this),this.node.addEventListener("keydown",this)}onAfterDetach(e){this.node.removeEventListener("pointerdown",this),this.node.removeEventListener("dblclick",this),this.node.removeEventListener("keydown",this),this._releaseMouse()}onUpdateRequest(e){var t;let i=this._titles,n=this.renderer,s=this.currentTitle,r=new Array(i.length);const o=null!==(t=this._getCurrentTabindex())&&void 0!==t?t:this._currentIndex>-1?this._currentIndex:0;for(let e=0,t=i.length;eAf.hitTest(t,e.clientX,e.clientY)));if(-1===i)return;let n=this.titles[i],s=t[i].querySelector(".lm-TabBar-tabLabel");if(s&&s.contains(e.target)){let e=n.label||"",t=s.innerHTML;s.innerHTML="";let i=document.createElement("input");i.classList.add("lm-TabBar-tabInput"),i.value=e,s.appendChild(i);let r=()=>{i.removeEventListener("blur",r),s.innerHTML=t,this.node.addEventListener("keydown",this)};i.addEventListener("dblclick",(e=>e.stopPropagation())),i.addEventListener("blur",r),i.addEventListener("keydown",(e=>{"Enter"===e.key?(""!==i.value&&(n.label=n.caption=i.value),r()):"Escape"===e.key&&r()})),this.node.removeEventListener("keydown",this),i.select(),i.focus(),s.children.length>0&&s.children[0].focus()}}_evtKeyDownCapturing(e){e.eventPhase===Event.CAPTURING_PHASE&&(e.preventDefault(),e.stopPropagation(),"Escape"===e.key&&this._releaseMouse())}_evtKeyDown(e){var t,i,n;if("Tab"!==e.key&&e.eventPhase!==Event.CAPTURING_PHASE)if("Enter"===e.key||"Spacebar"===e.key||" "===e.key){const t=document.activeElement;if(this.addButtonEnabled&&this.addButtonNode.contains(t))e.preventDefault(),e.stopPropagation(),this._addRequested.emit();else{const i=jf.RO.findFirstIndex(this.contentNode.children,(e=>e.contains(t)));i>=0&&(e.preventDefault(),e.stopPropagation(),this.currentIndex=i)}}else if(Bm.includes(e.key)){const s=[...this.contentNode.children];if(this.addButtonEnabled&&s.push(this.addButtonNode),s.length<=1)return;e.preventDefault(),e.stopPropagation();let r,o=s.indexOf(document.activeElement);-1===o&&(o=this._currentIndex),"ArrowRight"===e.key&&"horizontal"===this._orientation||"ArrowDown"===e.key&&"vertical"===this._orientation?r=null!==(t=s[o+1])&&void 0!==t?t:s[0]:"ArrowLeft"===e.key&&"horizontal"===this._orientation||"ArrowUp"===e.key&&"vertical"===this._orientation?r=null!==(i=s[o-1])&&void 0!==i?i:s[s.length-1]:"Home"===e.key?r=s[0]:"End"===e.key&&(r=s[s.length-1]),r&&(null===(n=s[o])||void 0===n||n.setAttribute("tabindex","-1"),null==r||r.setAttribute("tabindex","0"),r.focus())}}_evtPointerDown(e){if(0!==e.button&&1!==e.button)return;if(this._dragData)return;if(e.target.classList.contains("lm-TabBar-tabInput"))return;let t=this.addButtonEnabled&&this.addButtonNode.contains(e.target),i=this.contentNode.children,n=jf.RO.findFirstIndex(i,(t=>Af.hitTest(t,e.clientX,e.clientY)));if(-1===n&&!t)return;if(e.preventDefault(),e.stopPropagation(),this._dragData={tab:i[n],index:n,pressX:e.clientX,pressY:e.clientY,tabPos:-1,tabSize:-1,tabPressPos:-1,targetIndex:-1,tabLayout:null,contentRect:null,override:null,dragActive:!1,dragAborted:!1,detachRequested:!1},this.document.addEventListener("pointerup",this,!0),1===e.button||t)return;let s=i[n].querySelector(this.renderer.closeIconSelector);s&&s.contains(e.target)||(this.tabsMovable&&(this.document.addEventListener("pointermove",this,!0),this.document.addEventListener("keydown",this,!0),this.document.addEventListener("contextmenu",this,!0)),this.allowDeselect&&this.currentIndex===n?this.currentIndex=-1:this.currentIndex=n,-1!==this.currentIndex&&this._tabActivateRequested.emit({index:this.currentIndex,title:this.currentTitle}))}_evtPointerMove(e){let t=this._dragData;if(!t)return;e.preventDefault(),e.stopPropagation();let i=this.contentNode.children;if(t.dragActive||Qm.dragExceeded(t,e)){if(!t.dragActive){let e=t.tab.getBoundingClientRect();"horizontal"===this._orientation?(t.tabPos=t.tab.offsetLeft,t.tabSize=e.width,t.tabPressPos=t.pressX-e.left):(t.tabPos=t.tab.offsetTop,t.tabSize=e.height,t.tabPressPos=t.pressY-e.top),t.tabPressOffset={x:t.pressX-e.left,y:t.pressY-e.top},t.tabLayout=Qm.snapTabLayout(i,this._orientation),t.contentRect=this.contentNode.getBoundingClientRect(),t.override=Gf.overrideCursor("default"),t.tab.classList.add("lm-mod-dragging"),this.addClass("lm-mod-dragging"),t.dragActive=!0}if(!t.detachRequested&&Qm.detachExceeded(t,e)){t.detachRequested=!0;let n=t.index,s=e.clientX,r=e.clientY,o=i[n],a=this._titles[n];if(this._tabDetachRequested.emit({index:n,title:a,tab:o,clientX:s,clientY:r,offset:t.tabPressOffset}),t.dragAborted)return}Qm.layoutTabs(i,t,e,this._orientation)}}_evtPointerUp(e){if(0!==e.button&&1!==e.button)return;const t=this._dragData;if(!t)return;if(e.preventDefault(),e.stopPropagation(),this.document.removeEventListener("pointermove",this,!0),this.document.removeEventListener("pointerup",this,!0),this.document.removeEventListener("keydown",this,!0),this.document.removeEventListener("contextmenu",this,!0),!t.dragActive){if(this._dragData=null,this.addButtonEnabled&&this.addButtonNode.contains(e.target))return void this._addRequested.emit(void 0);let i=this.contentNode.children,n=jf.RO.findFirstIndex(i,(t=>Af.hitTest(t,e.clientX,e.clientY)));if(n!==t.index)return;let s=this._titles[n];if(!s.closable)return;if(1===e.button)return void this._tabCloseRequested.emit({index:n,title:s});let r=i[n].querySelector(this.renderer.closeIconSelector);return r&&r.contains(e.target)?void this._tabCloseRequested.emit({index:n,title:s}):void 0}if(0!==e.button)return;Qm.finalizeTabPosition(t,this._orientation),t.tab.classList.remove("lm-mod-dragging");let i=Qm.parseTransitionDuration(t.tab);setTimeout((()=>{if(t.dragAborted)return;this._dragData=null,Qm.resetTabPositions(this.contentNode.children,this._orientation),t.override.dispose(),this.removeClass("lm-mod-dragging");let e=t.index,i=t.targetIndex;-1!==i&&e!==i&&(jf.RO.move(this._titles,e,i),this._adjustCurrentForMove(e,i),this._tabMoved.emit({fromIndex:e,toIndex:i,title:this._titles[i]}),Lf.sendMessage(this,fm.Msg.UpdateRequest))}),i)}_releaseMouse(){let e=this._dragData;e&&(this._dragData=null,this.document.removeEventListener("pointermove",this,!0),this.document.removeEventListener("pointerup",this,!0),this.document.removeEventListener("keydown",this,!0),this.document.removeEventListener("contextmenu",this,!0),e.dragAborted=!0,e.dragActive&&(Qm.resetTabPositions(this.contentNode.children,this._orientation),e.override.dispose(),e.tab.classList.remove("lm-mod-dragging"),this.removeClass("lm-mod-dragging")))}_adjustCurrentForInsert(e,t){let i=this.currentTitle,n=this._currentIndex,s=this.insertBehavior;if("select-tab"===s||"select-tab-if-needed"===s&&-1===n)return this._currentIndex=e,this._previousTitle=i,void this._currentChanged.emit({previousIndex:n,previousTitle:i,currentIndex:e,currentTitle:t});n>=e&&this._currentIndex++}_adjustCurrentForMove(e,t){this._currentIndex===e?this._currentIndex=t:this._currentIndex=t?this._currentIndex++:this._currentIndex>e&&this._currentIndex<=t&&this._currentIndex--}_adjustCurrentForRemove(e,t){let i=this._currentIndex,n=this.removeBehavior;if(i===e){if(0===this._titles.length)return this._currentIndex=-1,void this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:-1,currentTitle:null});if("select-tab-after"===n)return this._currentIndex=Math.min(e,this._titles.length-1),void this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:this._currentIndex,currentTitle:this.currentTitle});if("select-tab-before"===n)return this._currentIndex=Math.max(0,e-1),void this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:this._currentIndex,currentTitle:this.currentTitle});if("select-previous-tab"===n)return this._previousTitle?(this._currentIndex=this._titles.indexOf(this._previousTitle),this._previousTitle=null):this._currentIndex=Math.min(e,this._titles.length-1),void this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:this._currentIndex,currentTitle:this.currentTitle});this._currentIndex=-1,this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:-1,currentTitle:null})}else i>e&&this._currentIndex--}_onTitleChanged(e){this.update()}}var Qm,zm,jm,Wm,Vm,Um,Fm,Hm;!function(e){class t{constructor(){this.closeIconSelector=".lm-TabBar-tabCloseIcon",this._tabID=0,this._tabKeys=new WeakMap,this._uuid=++t._nInstance}renderTab(e){let t=e.title.caption,i=this.createTabKey(e),n=i,s=this.createTabStyle(e),r=this.createTabClass(e),o=this.createTabDataset(e),a=this.createTabARIA(e);return e.title.closable?dm.li({id:n,key:i,className:r,title:t,style:s,dataset:o,...a},this.renderIcon(e),this.renderLabel(e),this.renderCloseIcon(e)):dm.li({id:n,key:i,className:r,title:t,style:s,dataset:o,...a},this.renderIcon(e),this.renderLabel(e))}renderIcon(e){const{title:t}=e;let i=this.createIconClass(e);return dm.div({className:i},t.icon,t.iconLabel)}renderLabel(e){return dm.div({className:"lm-TabBar-tabLabel"},e.title.label)}renderCloseIcon(e){return dm.div({className:"lm-TabBar-tabCloseIcon"})}createTabKey(e){let t=this._tabKeys.get(e.title);return void 0===t&&(t=`tab-key-${this._uuid}-${this._tabID++}`,this._tabKeys.set(e.title,t)),t}createTabStyle(e){return{zIndex:`${e.zIndex}`}}createTabClass(e){let t="lm-TabBar-tab";return e.title.className&&(t+=` ${e.title.className}`),e.title.closable&&(t+=" lm-mod-closable"),e.current&&(t+=" lm-mod-current"),t}createTabDataset(e){return e.title.dataset}createTabARIA(e){var t;return{role:"tab","aria-selected":e.current.toString(),tabindex:`${null!==(t=e.tabIndex)&&void 0!==t?t:"-1"}`}}createIconClass(e){let t="lm-TabBar-tabIcon",i=e.title.iconClass;return i?`${t} ${i}`:t}}t._nInstance=0,e.Renderer=t,e.defaultRenderer=new t,e.addButtonSelector=".lm-TabBar-addButton"}($m||($m={})),function(e){e.DRAG_THRESHOLD=5,e.DETACH_THRESHOLD=20,e.createNode=function(){let e=document.createElement("div"),t=document.createElement("ul");t.setAttribute("role","tablist"),t.className="lm-TabBar-content",e.appendChild(t);let i=document.createElement("div");return i.className="lm-TabBar-addButton lm-mod-hidden",i.setAttribute("tabindex","-1"),e.appendChild(i),e},e.asTitle=function(e){return e instanceof pm?e:new pm(e)},e.parseTransitionDuration=function(e){let t=window.getComputedStyle(e);return 1e3*(parseFloat(t.transitionDuration)||0)},e.snapTabLayout=function(e,t){let i=new Array(e.length);for(let n=0,s=e.length;n=e.DRAG_THRESHOLD||s>=e.DRAG_THRESHOLD},e.detachExceeded=function(t,i){let n=t.contentRect;return i.clientX=n.right+e.DETACH_THRESHOLD||i.clientY=n.bottom+e.DETACH_THRESHOLD},e.layoutTabs=function(e,t,i,n){let s,r,o,a;"horizontal"===n?(s=t.pressX,r=i.clientX-t.contentRect.left,o=i.clientX,a=t.contentRect.width):(s=t.pressY,r=i.clientY-t.contentRect.top,o=i.clientY,a=t.contentRect.height);let l=t.index,h=r-t.tabPressPos,c=h+t.tabSize;for(let i=0,r=e.length;i>1);if(it.index&&c>u)r=-t.tabSize-d.margin+"px",l=Math.max(l,i);else if(i===t.index){let e=o-s,i=a-(t.tabPos+t.tabSize);r=`${Math.max(-t.tabPos,Math.min(e,i))}px`}else r="";"horizontal"===n?e[i].style.left=r:e[i].style.top=r}t.targetIndex=l},e.finalizeTabPosition=function(e,t){let i,n;if(i="horizontal"===t?e.contentRect.width:e.contentRect.height,e.targetIndex===e.index)n=0;else if(e.targetIndex>e.index){let t=e.tabLayout[e.targetIndex];n=t.pos+t.size-e.tabSize-e.tabPos}else n=e.tabLayout[e.targetIndex].pos-e.tabPos;let s=i-(e.tabPos+e.tabSize),r=Math.max(-e.tabPos,Math.min(n,s));"horizontal"===t?e.tab.style.left=`${r}px`:e.tab.style.top=`${r}px`},e.resetTabPositions=function(e,t){for(const i of e)"horizontal"===t?i.style.left="":i.style.top=""}}(Qm||(Qm={}));class Xm extends mm{constructor(e){super(),this._spacing=4,this._dirty=!1,this._root=null,this._box=null,this._items=new Map,this.renderer=e.renderer,void 0!==e.spacing&&(this._spacing=Pm.clampDimension(e.spacing)),this._document=e.document||document,this._hiddenMode=void 0!==e.hiddenMode?e.hiddenMode:fm.HiddenMode.Display}dispose(){let e=this[Symbol.iterator]();this._items.forEach((e=>{e.dispose()})),this._box=null,this._root=null,this._items.clear();for(const t of e)t.dispose();super.dispose()}get hiddenMode(){return this._hiddenMode}set hiddenMode(e){if(this._hiddenMode!==e){this._hiddenMode=e;for(const e of this.tabBars())if(e.titles.length>1)for(const t of e.titles)t.owner.hiddenMode=this._hiddenMode}}get spacing(){return this._spacing}set spacing(e){e=Pm.clampDimension(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())}get isEmpty(){return null===this._root}[Symbol.iterator](){return this._root?this._root.iterAllWidgets():(0,jf.cS)()}widgets(){return this._root?this._root.iterUserWidgets():(0,jf.cS)()}selectedWidgets(){return this._root?this._root.iterSelectedWidgets():(0,jf.cS)()}tabBars(){return this._root?this._root.iterTabBars():(0,jf.cS)()}handles(){return this._root?this._root.iterHandles():(0,jf.cS)()}moveHandle(e,t,i){let n=e.classList.contains("lm-mod-hidden");if(!this._root||n)return;let s,r=this._root.findSplitNode(e);r&&(s="horizontal"===r.node.orientation?t-e.offsetLeft:i-e.offsetTop,0!==s&&(r.node.holdSizes(),sm.adjust(r.node.sizers,r.index,s),this.parent&&this.parent.update()))}saveLayout(){return this._root?(this._root.holdAllSizes(),{main:this._root.createConfig()}):{main:null}}restoreLayout(e){let t,i=new Set;t=e.main?zm.normalizeAreaConfig(e.main,i):null;let n=this.widgets(),s=this.tabBars(),r=this.handles();this._root=null;for(const e of n)i.has(e)||(e.parent=null);for(const e of s)e.dispose();for(const e of r)e.parentNode&&e.parentNode.removeChild(e);for(const e of i)e.parent=this.parent;this._root=t?zm.realizeAreaConfig(t,{createTabBar:e=>this._createTabBar(),createHandle:()=>this._createHandle()},this._document):null,this.parent&&(i.forEach((e=>{this.attachWidget(e)})),this.parent.fit())}addWidget(e,t={}){let i=t.ref||null,n=t.mode||"tab-after",s=null;if(this._root&&i&&(s=this._root.findTabNode(i)),i&&!s)throw new Error("Reference widget is not in the layout.");switch(e.parent=this.parent,n){case"tab-after":this._insertTab(e,i,s,!0);break;case"tab-before":this._insertTab(e,i,s,!1);break;case"split-top":this._insertSplit(e,i,s,"vertical",!1);break;case"split-left":this._insertSplit(e,i,s,"horizontal",!1);break;case"split-right":this._insertSplit(e,i,s,"horizontal",!0);break;case"split-bottom":this._insertSplit(e,i,s,"vertical",!0);break;case"merge-top":this._insertSplit(e,i,s,"vertical",!1,!0);break;case"merge-left":this._insertSplit(e,i,s,"horizontal",!1,!0);break;case"merge-right":this._insertSplit(e,i,s,"horizontal",!0,!0);break;case"merge-bottom":this._insertSplit(e,i,s,"vertical",!0,!0)}this.parent&&(this.attachWidget(e),this.parent.fit())}removeWidget(e){this._removeWidget(e),this.parent&&(this.detachWidget(e),this.parent.fit())}hitTestTabAreas(e,t){if(!this._root||!this.parent||!this.parent.isVisible)return null;this._box||(this._box=Af.boxSizing(this.parent.node));let i=this.parent.node.getBoundingClientRect(),n=e-i.left-this._box.borderLeft,s=t-i.top-this._box.borderTop,r=this._root.hitTestTabNodes(n,s);if(!r)return null;let{tabBar:o,top:a,left:l,width:h,height:c}=r,d=this._box.borderLeft+this._box.borderRight,u=this._box.borderTop+this._box.borderBottom;return{tabBar:o,x:n,y:s,top:a,left:l,right:i.width-d-(l+h),bottom:i.height-u-(a+c),width:h,height:c}}init(){super.init();for(const e of this)this.attachWidget(e);for(const e of this.handles())this.parent.node.appendChild(e);this.parent.fit()}attachWidget(e){this.parent.node!==e.node.parentNode&&(this._items.set(e,new gm(e)),this.parent.isAttached&&Lf.sendMessage(e,fm.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.isAttached&&Lf.sendMessage(e,fm.Msg.AfterAttach))}detachWidget(e){if(this.parent.node!==e.node.parentNode)return;this.parent.isAttached&&Lf.sendMessage(e,fm.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&Lf.sendMessage(e,fm.Msg.AfterDetach);let t=this._items.get(e);t&&(this._items.delete(e),t.dispose())}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_removeWidget(e){if(!this._root)return;let t=this._root.findTabNode(e);if(!t)return;if(zm.removeAria(e),t.tabBar.titles.length>1)return t.tabBar.removeTab(e.title),void(this._hiddenMode===fm.HiddenMode.Scale&&1==t.tabBar.titles.length&&(t.tabBar.titles[0].owner.hiddenMode=fm.HiddenMode.Display));if(t.tabBar.dispose(),this._root===t)return void(this._root=null);this._root.holdAllSizes();let i=t.parent;t.parent=null;let n=jf.RO.removeFirstOf(i.children,t),s=jf.RO.removeAt(i.handles,n);if(jf.RO.removeAt(i.sizers,n),s.parentNode&&s.parentNode.removeChild(s),i.children.length>1)return void i.syncHandles();let r=i.parent;i.parent=null;let o=i.children[0],a=i.handles[0];if(i.children.length=0,i.handles.length=0,i.sizers.length=0,a.parentNode&&a.parentNode.removeChild(a),this._root===i)return o.parent=null,void(this._root=o);let l=r,h=l.children.indexOf(i);if(o instanceof zm.TabLayoutNode)return o.parent=l,void(l.children[h]=o);let c=jf.RO.removeAt(l.handles,h);jf.RO.removeAt(l.children,h),jf.RO.removeAt(l.sizers,h),c.parentNode&&c.parentNode.removeChild(c);for(let e=0,t=o.children.length;e=i.length)&&(n=0),{type:"tab-area",widgets:i,currentIndex:n}}(t,i):function(t,i){let n=t.orientation,s=[],r=[];for(let o=0,a=t.children.length;o{let l=s(n,i,r),h=t(e.sizes[a]),c=i.createHandle();o.children.push(l),o.handles.push(c),o.sizers.push(h),l.parent=o})),o.syncHandles(),o.normalizeSizes(),o}(r,o,a),l};class i{constructor(e){this.parent=null,this._top=0,this._left=0,this._width=0,this._height=0;let t=new um,i=new um;t.stretch=0,i.stretch=1,this.tabBar=e,this.sizers=[t,i]}get top(){return this._top}get left(){return this._left}get width(){return this._width}get height(){return this._height}*iterAllWidgets(){yield this.tabBar,yield*this.iterUserWidgets()}*iterUserWidgets(){for(const e of this.tabBar.titles)yield e.owner}*iterSelectedWidgets(){let e=this.tabBar.currentTitle;e&&(yield e.owner)}*iterTabBars(){yield this.tabBar}*iterHandles(){}findTabNode(e){return-1!==this.tabBar.titles.indexOf(e.title)?this:null}findSplitNode(e){return null}findFirstTabNode(){return this}hitTestTabNodes(e,t){return e=this._left+this._width||t=this._top+this._height?null:this}createConfig(){return{type:"tab-area",widgets:this.tabBar.titles.map((e=>e.owner)),currentIndex:this.tabBar.currentIndex}}holdAllSizes(){}fit(e,t){let i=0,n=0,s=t.get(this.tabBar),r=this.tabBar.currentTitle,o=r?t.get(r.owner):void 0,[a,l]=this.sizers;return s&&s.fit(),o&&o.fit(),s&&!s.isHidden?(i=Math.max(i,s.minWidth),n+=s.minHeight,a.minSize=s.minHeight,a.maxSize=s.maxHeight):(a.minSize=0,a.maxSize=0),o&&!o.isHidden?(i=Math.max(i,o.minWidth),n+=o.minHeight,l.minSize=o.minHeight,l.maxSize=1/0):(l.minSize=0,l.maxSize=1/0),{minWidth:i,minHeight:n,maxWidth:1/0,maxHeight:1/0}}update(e,t,i,n,s,r){this._top=t,this._left=e,this._width=i,this._height=n;let o=r.get(this.tabBar),a=this.tabBar.currentTitle,l=a?r.get(a.owner):void 0;if(sm.calc(this.sizers,n),o&&!o.isHidden){let n=this.sizers[0].size;o.update(e,t,i,n),t+=n}if(l&&!l.isHidden){let n=this.sizers[1].size;l.update(e,t,i,n)}}}e.TabLayoutNode=i;class n{constructor(e){this.parent=null,this.normalized=!1,this.children=[],this.sizers=[],this.handles=[],this.orientation=e}*iterAllWidgets(){for(const e of this.children)yield*e.iterAllWidgets()}*iterUserWidgets(){for(const e of this.children)yield*e.iterUserWidgets()}*iterSelectedWidgets(){for(const e of this.children)yield*e.iterSelectedWidgets()}*iterTabBars(){for(const e of this.children)yield*e.iterTabBars()}*iterHandles(){yield*this.handles;for(const e of this.children)yield*e.iterHandles()}findTabNode(e){for(let t=0,i=this.children.length;te.createConfig())),sizes:t}}syncHandles(){this.handles.forEach(((e,t)=>{e.setAttribute("data-orientation",this.orientation),t===this.handles.length-1?e.classList.add("lm-mod-hidden"):e.classList.remove("lm-mod-hidden")}))}holdSizes(){for(const e of this.sizers)e.sizeHint=e.size}holdAllSizes(){for(const e of this.children)e.holdAllSizes();this.holdSizes()}normalizeSizes(){let e=this.sizers.length;if(0===e)return;this.holdSizes();let t=this.sizers.reduce(((e,t)=>e+t.sizeHint),0);if(0===t)for(const t of this.sizers)t.size=t.sizeHint=1/e;else for(const e of this.sizers)e.size=e.sizeHint/=t;this.normalized=!0}createNormalizedSizes(){let e=this.sizers.length;if(0===e)return[];let t=this.sizers.map((e=>e.size)),i=t.reduce(((e,t)=>e+t),0);if(0===i)for(let i=t.length-1;i>-1;i--)t[i]=1/e;else for(let e=t.length-1;e>-1;e--)t[e]/=i;return t}fit(e,t){let i="horizontal"===this.orientation,n=Math.max(0,this.children.length-1)*e,s=i?n:0,r=i?0:n;for(let n=0,o=this.children.length;nthis._createTabBar(),createHandle:()=>this._createHandle()};this.layout=new Xm({document:this._document,renderer:t,spacing:e.spacing,hiddenMode:e.hiddenMode}),this.overlay=e.overlay||new Ym.Overlay,this.node.appendChild(this.overlay.node)}dispose(){this._releaseMouse(),this.overlay.hide(0),this._drag&&this._drag.dispose(),super.dispose()}get hiddenMode(){return this.layout.hiddenMode}set hiddenMode(e){this.layout.hiddenMode=e}get layoutModified(){return this._layoutModified}get addRequested(){return this._addRequested}get renderer(){return this.layout.renderer}get spacing(){return this.layout.spacing}set spacing(e){this.layout.spacing=e}get mode(){return this._mode}set mode(e){if(this._mode===e)return;this._mode=e,this.dataset.mode=e;let t=this.layout;switch(e){case"multiple-document":for(const e of t.tabBars())e.show();break;case"single-document":t.restoreLayout(jm.createSingleDocumentConfig(this));break;default:throw"unreachable"}Lf.postMessage(this,jm.LayoutModified)}get tabsMovable(){return this._tabsMovable}set tabsMovable(e){this._tabsMovable=e;for(const t of this.tabBars())t.tabsMovable=e}get tabsConstrained(){return this._tabsConstrained}set tabsConstrained(e){this._tabsConstrained=e}get addButtonEnabled(){return this._addButtonEnabled}set addButtonEnabled(e){this._addButtonEnabled=e;for(const t of this.tabBars())t.addButtonEnabled=e}get isEmpty(){return this.layout.isEmpty}*widgets(){yield*this.layout.widgets()}*selectedWidgets(){yield*this.layout.selectedWidgets()}*tabBars(){yield*this.layout.tabBars()}*handles(){yield*this.layout.handles()}selectWidget(e){let t=(0,jf.sE)(this.tabBars(),(t=>-1!==t.titles.indexOf(e.title)));if(!t)throw new Error("Widget is not contained in the dock panel.");t.currentTitle=e.title}activateWidget(e){this.selectWidget(e),e.activate()}saveLayout(){return this.layout.saveLayout()}restoreLayout(e){this._mode="multiple-document",this.layout.restoreLayout(e),(Rf.IS_EDGE||Rf.IS_IE)&&Lf.flush(),Lf.postMessage(this,jm.LayoutModified)}addWidget(e,t={}){"single-document"===this._mode?this.layout.addWidget(e):this.layout.addWidget(e,t),Lf.postMessage(this,jm.LayoutModified)}processMessage(e){"layout-modified"===e.type?this._layoutModified.emit(void 0):super.processMessage(e)}handleEvent(e){switch(e.type){case"lm-dragenter":this._evtDragEnter(e);break;case"lm-dragleave":this._evtDragLeave(e);break;case"lm-dragover":this._evtDragOver(e);break;case"lm-drop":this._evtDrop(e);break;case"pointerdown":this._evtPointerDown(e);break;case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"keydown":this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("lm-dragenter",this),this.node.addEventListener("lm-dragleave",this),this.node.addEventListener("lm-dragover",this),this.node.addEventListener("lm-drop",this),this.node.addEventListener("pointerdown",this)}onAfterDetach(e){this.node.removeEventListener("lm-dragenter",this),this.node.removeEventListener("lm-dragleave",this),this.node.removeEventListener("lm-dragover",this),this.node.removeEventListener("lm-drop",this),this.node.removeEventListener("pointerdown",this),this._releaseMouse()}onChildAdded(e){jm.isGeneratedTabBarProperty.get(e.child)||e.child.addClass("lm-DockPanel-widget")}onChildRemoved(e){jm.isGeneratedTabBarProperty.get(e.child)||(e.child.removeClass("lm-DockPanel-widget"),Lf.postMessage(this,jm.LayoutModified))}_evtDragEnter(e){e.mimeData.hasData("application/vnd.lumino.widget-factory")&&(e.preventDefault(),e.stopPropagation())}_evtDragLeave(e){e.preventDefault(),this._tabsConstrained&&e.source!==this||(e.stopPropagation(),this.overlay.hide(1))}_evtDragOver(e){e.preventDefault(),this._tabsConstrained&&e.source!==this||"invalid"===this._showOverlay(e.clientX,e.clientY)?e.dropAction="none":(e.stopPropagation(),e.dropAction=e.proposedAction)}_evtDrop(e){if(e.preventDefault(),this.overlay.hide(0),"none"===e.proposedAction)return void(e.dropAction="none");let{clientX:t,clientY:i}=e,{zone:n,target:s}=jm.findDropTarget(this,t,i,this._edges);if(this._tabsConstrained&&e.source!==this||"invalid"===n)return void(e.dropAction="none");let r=e.mimeData.getData("application/vnd.lumino.widget-factory");if("function"!=typeof r)return void(e.dropAction="none");let o=r();if(!(o instanceof fm))return void(e.dropAction="none");if(o.contains(this))return void(e.dropAction="none");let a=s?jm.getDropRef(s.tabBar):null;switch(n){case"root-all":this.addWidget(o);break;case"root-top":this.addWidget(o,{mode:"split-top"});break;case"root-left":this.addWidget(o,{mode:"split-left"});break;case"root-right":this.addWidget(o,{mode:"split-right"});break;case"root-bottom":this.addWidget(o,{mode:"split-bottom"});break;case"widget-all":case"widget-tab":this.addWidget(o,{mode:"tab-after",ref:a});break;case"widget-top":this.addWidget(o,{mode:"split-top",ref:a});break;case"widget-left":this.addWidget(o,{mode:"split-left",ref:a});break;case"widget-right":this.addWidget(o,{mode:"split-right",ref:a});break;case"widget-bottom":this.addWidget(o,{mode:"split-bottom",ref:a});break;default:throw"unreachable"}e.dropAction=e.proposedAction,e.stopPropagation(),this.activateWidget(o)}_evtKeyDown(e){e.preventDefault(),e.stopPropagation(),27===e.keyCode&&(this._releaseMouse(),Lf.postMessage(this,jm.LayoutModified))}_evtPointerDown(e){if(0!==e.button)return;let t=this.layout,i=e.target,n=(0,jf.sE)(t.handles(),(e=>e.contains(i)));if(!n)return;e.preventDefault(),e.stopPropagation(),this._document.addEventListener("keydown",this,!0),this._document.addEventListener("pointerup",this,!0),this._document.addEventListener("pointermove",this,!0),this._document.addEventListener("contextmenu",this,!0);let s=n.getBoundingClientRect(),r=e.clientX-s.left,o=e.clientY-s.top,a=window.getComputedStyle(n),l=Gf.overrideCursor(a.cursor,this._document);this._pressData={handle:n,deltaX:r,deltaY:o,override:l}}_evtPointerMove(e){if(!this._pressData)return;e.preventDefault(),e.stopPropagation();let t=this.node.getBoundingClientRect(),i=e.clientX-t.left-this._pressData.deltaX,n=e.clientY-t.top-this._pressData.deltaY;this.layout.moveHandle(this._pressData.handle,i,n)}_evtPointerUp(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this._releaseMouse(),Lf.postMessage(this,jm.LayoutModified))}_releaseMouse(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,this._document.removeEventListener("keydown",this,!0),this._document.removeEventListener("pointerup",this,!0),this._document.removeEventListener("pointermove",this,!0),this._document.removeEventListener("contextmenu",this,!0))}_showOverlay(e,t){let i,n,s,r,{zone:o,target:a}=jm.findDropTarget(this,e,t,this._edges);if("invalid"===o)return this.overlay.hide(100),o;let l=Af.boxSizing(this.node),h=this.node.getBoundingClientRect();switch(o){case"root-all":i=l.paddingTop,n=l.paddingLeft,s=l.paddingRight,r=l.paddingBottom;break;case"root-top":i=l.paddingTop,n=l.paddingLeft,s=l.paddingRight,r=h.height*jm.GOLDEN_RATIO;break;case"root-left":i=l.paddingTop,n=l.paddingLeft,s=h.width*jm.GOLDEN_RATIO,r=l.paddingBottom;break;case"root-right":i=l.paddingTop,n=h.width*jm.GOLDEN_RATIO,s=l.paddingRight,r=l.paddingBottom;break;case"root-bottom":i=h.height*jm.GOLDEN_RATIO,n=l.paddingLeft,s=l.paddingRight,r=l.paddingBottom;break;case"widget-all":i=a.top,n=a.left,s=a.right,r=a.bottom;break;case"widget-top":i=a.top,n=a.left,s=a.right,r=a.bottom+a.height/2;break;case"widget-left":i=a.top,n=a.left,s=a.right+a.width/2,r=a.bottom;break;case"widget-right":i=a.top,n=a.left+a.width/2,s=a.right,r=a.bottom;break;case"widget-bottom":i=a.top+a.height/2,n=a.left,s=a.right,r=a.bottom;break;case"widget-tab":{const e=a.tabBar.node.getBoundingClientRect().height;i=a.top,n=a.left,s=a.right,r=a.bottom+a.height-e;break}default:throw"unreachable"}return this.overlay.show({top:i,left:n,right:s,bottom:r}),o}_createTabBar(){let e=this._renderer.createTabBar(this._document);return jm.isGeneratedTabBarProperty.set(e,!0),"single-document"===this._mode&&e.hide(),e.tabsMovable=this._tabsMovable,e.allowDeselect=!1,e.addButtonEnabled=this._addButtonEnabled,e.removeBehavior="select-previous-tab",e.insertBehavior="select-tab-if-needed",e.tabMoved.connect(this._onTabMoved,this),e.currentChanged.connect(this._onCurrentChanged,this),e.tabCloseRequested.connect(this._onTabCloseRequested,this),e.tabDetachRequested.connect(this._onTabDetachRequested,this),e.tabActivateRequested.connect(this._onTabActivateRequested,this),e.addRequested.connect(this._onTabAddRequested,this),e}_createHandle(){return this._renderer.createHandle()}_onTabMoved(){Lf.postMessage(this,jm.LayoutModified)}_onCurrentChanged(e,t){let{previousTitle:i,currentTitle:n}=t;i&&i.owner.hide(),n&&n.owner.show(),(Rf.IS_EDGE||Rf.IS_IE)&&Lf.flush(),Lf.postMessage(this,jm.LayoutModified)}_onTabAddRequested(e){this._addRequested.emit(e)}_onTabActivateRequested(e,t){t.title.owner.activate()}_onTabCloseRequested(e,t){t.title.owner.close()}_onTabDetachRequested(e,t){if(this._drag)return;e.releaseMouse();let{title:i,tab:n,clientX:s,clientY:r,offset:o}=t,a=new Wf.MimeData;a.setData("application/vnd.lumino.widget-factory",(()=>i.owner));let l=n.cloneNode(!0);o&&(l.style.top=`-${o.y}px`,l.style.left=`-${o.x}px`),this._drag=new Gf({document:this._document,mimeData:a,dragImage:l,proposedAction:"move",supportedActions:"move",source:this}),n.classList.add("lm-mod-hidden"),this._drag.start(s,r).then((()=>{this._drag=null,n.classList.remove("lm-mod-hidden")}))}}!function(e){e.Overlay=class{constructor(){this._timer=-1,this._hidden=!0,this.node=document.createElement("div"),this.node.classList.add("lm-DockPanel-overlay"),this.node.classList.add("lm-mod-hidden"),this.node.style.position="absolute",this.node.style.contain="strict"}show(e){let t=this.node.style;t.top=`${e.top}px`,t.left=`${e.left}px`,t.right=`${e.right}px`,t.bottom=`${e.bottom}px`,clearTimeout(this._timer),this._timer=-1,this._hidden&&(this._hidden=!1,this.node.classList.remove("lm-mod-hidden"))}hide(e){if(!this._hidden)return e<=0?(clearTimeout(this._timer),this._timer=-1,this._hidden=!0,void this.node.classList.add("lm-mod-hidden")):void(-1===this._timer&&(this._timer=window.setTimeout((()=>{this._timer=-1,this._hidden=!0,this.node.classList.add("lm-mod-hidden")}),e)))}};class t{createTabBar(e){let t=new $m({document:e});return t.addClass("lm-DockPanel-tabBar"),t}createHandle(){let e=document.createElement("div");return e.className="lm-DockPanel-handle",e}}e.Renderer=t,e.defaultRenderer=new t}(Ym||(Ym={})),function(e){e.GOLDEN_RATIO=.618,e.DEFAULT_EDGES={top:12,right:40,bottom:40,left:40},e.LayoutModified=new Ff("layout-modified"),e.isGeneratedTabBarProperty=new Xf.AttachedProperty({name:"isGeneratedTabBar",create:()=>!1}),e.createSingleDocumentConfig=function(e){if(e.isEmpty)return{main:null};let t=Array.from(e.widgets()),i=e.selectedWidgets().next().value,n=i?t.indexOf(i):-1;return{main:{type:"tab-area",widgets:t,currentIndex:n}}},e.findDropTarget=function(e,t,i,n){if(!Af.hitTest(e.node,t,i))return{zone:"invalid",target:null};let s=e.layout;if(s.isEmpty)return{zone:"root-all",target:null};if("multiple-document"===e.mode){let s=e.node.getBoundingClientRect(),r=t-s.left+1,o=i-s.top+1,a=s.right-t,l=s.bottom-i;switch(Math.min(o,a,l,r)){case o:if(od&&l>d&&a>u&&h>u)return{zone:"widget-all",target:r};switch(o/=d,a/=u,l/=d,h/=u,Math.min(o,a,l,h)){case o:c="widget-left";break;case a:c="widget-top";break;case l:c="widget-right";break;case h:c="widget-bottom";break;default:throw"unreachable"}return{zone:c,target:r}},e.getDropRef=function(e){return 0===e.titles.length?null:e.currentTitle?e.currentTitle.owner:e.titles[e.titles.length-1].owner}}(jm||(jm={}));class Gm{constructor(){this._counter=0,this._widgets=[],this._activeWidget=null,this._currentWidget=null,this._numbers=new Map,this._nodes=new Map,this._activeChanged=new zf.Signal(this),this._currentChanged=new zf.Signal(this)}dispose(){if(!(this._counter<0)){this._counter=-1,zf.Signal.clearData(this);for(const e of this._widgets)e.node.removeEventListener("focus",this,!0),e.node.removeEventListener("blur",this,!0);this._activeWidget=null,this._currentWidget=null,this._nodes.clear(),this._numbers.clear(),this._widgets.length=0}}get currentChanged(){return this._currentChanged}get activeChanged(){return this._activeChanged}get isDisposed(){return this._counter<0}get currentWidget(){return this._currentWidget}get activeWidget(){return this._activeWidget}get widgets(){return this._widgets}focusNumber(e){let t=this._numbers.get(e);return void 0===t?-1:t}has(e){return this._numbers.has(e)}add(e){if(this._numbers.has(e))return;let t=e.node.contains(document.activeElement),i=t?this._counter++:-1;this._widgets.push(e),this._numbers.set(e,i),this._nodes.set(e.node,e),e.node.addEventListener("focus",this,!0),e.node.addEventListener("blur",this,!0),e.disposed.connect(this._onWidgetDisposed,this),t&&this._setWidgets(e,e)}remove(e){if(!this._numbers.has(e))return;if(e.disposed.disconnect(this._onWidgetDisposed,this),e.node.removeEventListener("focus",this,!0),e.node.removeEventListener("blur",this,!0),jf.RO.removeFirstOf(this._widgets,e),this._nodes.delete(e.node),this._numbers.delete(e),this._currentWidget!==e)return;let t=this._widgets.filter((e=>-1!==this._numbers.get(e))),i=(0,jf.Fp)(t,((e,t)=>this._numbers.get(e)-this._numbers.get(t)))||null;this._setWidgets(i,null)}handleEvent(e){switch(e.type){case"focus":this._evtFocus(e);break;case"blur":this._evtBlur(e)}}_setWidgets(e,t){let i=this._currentWidget;this._currentWidget=e;let n=this._activeWidget;this._activeWidget=t,i!==e&&this._currentChanged.emit({oldValue:i,newValue:e}),n!==t&&this._activeChanged.emit({oldValue:n,newValue:t})}_evtFocus(e){let t=this._nodes.get(e.currentTarget);t!==this._currentWidget&&this._numbers.set(t,this._counter++),this._setWidgets(t,t)}_evtBlur(e){let t=this._nodes.get(e.currentTarget),i=e.relatedTarget;i&&(t.node.contains(i)||(0,jf.sE)(this._widgets,(e=>e.node.contains(i))))||this._setWidgets(this._currentWidget,null)}_onWidgetDisposed(e){this.remove(e)}}class Zm extends mm{constructor(e={}){super(e),this._dirty=!1,this._rowSpacing=4,this._columnSpacing=4,this._items=[],this._rowStarts=[],this._columnStarts=[],this._rowSizers=[new um],this._columnSizers=[new um],this._box=null,void 0!==e.rowCount&&Wm.reallocSizers(this._rowSizers,e.rowCount),void 0!==e.columnCount&&Wm.reallocSizers(this._columnSizers,e.columnCount),void 0!==e.rowSpacing&&(this._rowSpacing=Wm.clampValue(e.rowSpacing)),void 0!==e.columnSpacing&&(this._columnSpacing=Wm.clampValue(e.columnSpacing))}dispose(){for(const e of this._items){let t=e.widget;e.dispose(),t.dispose()}this._box=null,this._items.length=0,this._rowStarts.length=0,this._rowSizers.length=0,this._columnStarts.length=0,this._columnSizers.length=0,super.dispose()}get rowCount(){return this._rowSizers.length}set rowCount(e){e!==this.rowCount&&(Wm.reallocSizers(this._rowSizers,e),this.parent&&this.parent.fit())}get columnCount(){return this._columnSizers.length}set columnCount(e){e!==this.columnCount&&(Wm.reallocSizers(this._columnSizers,e),this.parent&&this.parent.fit())}get rowSpacing(){return this._rowSpacing}set rowSpacing(e){e=Wm.clampValue(e),this._rowSpacing!==e&&(this._rowSpacing=e,this.parent&&this.parent.fit())}get columnSpacing(){return this._columnSpacing}set columnSpacing(e){e=Wm.clampValue(e),this._columnSpacing!==e&&(this._columnSpacing=e,this.parent&&this.parent.fit())}rowStretch(e){let t=this._rowSizers[e];return t?t.stretch:-1}setRowStretch(e,t){let i=this._rowSizers[e];i&&(t=Wm.clampValue(t),i.stretch!==t&&(i.stretch=t,this.parent&&this.parent.update()))}columnStretch(e){let t=this._columnSizers[e];return t?t.stretch:-1}setColumnStretch(e,t){let i=this._columnSizers[e];i&&(t=Wm.clampValue(t),i.stretch!==t&&(i.stretch=t,this.parent&&this.parent.update()))}*[Symbol.iterator](){for(const e of this._items)yield e.widget}addWidget(e){-1===jf.RO.findFirstIndex(this._items,(t=>t.widget===e))&&(this._items.push(new gm(e)),this.parent&&this.attachWidget(e))}removeWidget(e){let t=jf.RO.findFirstIndex(this._items,(t=>t.widget===e));if(-1===t)return;let i=jf.RO.removeAt(this._items,t);this.parent&&this.detachWidget(e),i.dispose()}init(){super.init();for(const e of this)this.attachWidget(e)}attachWidget(e){this.parent.isAttached&&Lf.sendMessage(e,fm.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.isAttached&&Lf.sendMessage(e,fm.Msg.AfterAttach),this.parent.fit()}detachWidget(e){this.parent.isAttached&&Lf.sendMessage(e,fm.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&Lf.sendMessage(e,fm.Msg.AfterDetach),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_fit(){for(let e=0,t=this.rowCount;e!e.isHidden));for(let t=0,i=e.length;t({row:0,column:0,rowSpan:1,columnSpan:1}),changed:function(e){e.parent&&e.parent.layout instanceof Zm&&e.parent.fit()}}),e.normalizeConfig=function(e){return{row:Math.max(0,Math.floor(e.row||0)),column:Math.max(0,Math.floor(e.column||0)),rowSpan:Math.max(1,Math.floor(e.rowSpan||0)),columnSpan:Math.max(1,Math.floor(e.columnSpan||0))}},e.clampValue=function(e){return Math.max(0,Math.floor(e))},e.rowSpanCmp=function(t,i){let n=e.cellConfigProperty.get(t.widget),s=e.cellConfigProperty.get(i.widget);return n.rowSpan-s.rowSpan},e.columnSpanCmp=function(t,i){let n=e.cellConfigProperty.get(t.widget),s=e.cellConfigProperty.get(i.widget);return n.columnSpan-s.columnSpan},e.reallocSizers=function(e,t){for(t=Math.max(1,Math.floor(t));e.lengtht&&(e.length=t)},e.distributeMin=function(e,t,i,n){if(i=n)return;let r=(n-s)/(i-t+1);for(let n=t;n<=i;++n)e[n].minSize+=r}}(Wm||(Wm={}));class Km extends fm{constructor(e={}){super({node:Vm.createNode()}),this._activeIndex=-1,this._tabFocusIndex=0,this._menus=[],this._childMenu=null,this._overflowMenu=null,this._menuItemSizes=[],this._overflowIndex=-1,this.addClass("lm-MenuBar"),this.setFlag(fm.Flag.DisallowLayout),this.renderer=e.renderer||Km.defaultRenderer,this._forceItemsPosition=e.forceItemsPosition||{forceX:!0,forceY:!0},this._overflowMenuOptions=e.overflowMenuOptions||{isVisible:!0}}dispose(){this._closeChildMenu(),this._menus.length=0,super.dispose()}get childMenu(){return this._childMenu}get overflowIndex(){return this._overflowIndex}get overflowMenu(){return this._overflowMenu}get contentNode(){return this.node.getElementsByClassName("lm-MenuBar-content")[0]}get activeMenu(){return this._menus[this._activeIndex]||null}set activeMenu(e){this.activeIndex=e?this._menus.indexOf(e):-1}get activeIndex(){return this._activeIndex}set activeIndex(e){(e<0||e>=this._menus.length)&&(e=-1),this._activeIndex!==e&&(this._activeIndex=e,-1!==e&&(this._tabFocusIndex=e),this._activeIndex>=0&&this.contentNode.childNodes[this._activeIndex]&&this.contentNode.childNodes[this._activeIndex].focus(),this.update())}get menus(){return this._menus}openActiveMenu(){-1!==this._activeIndex&&(this._openChildMenu(),this._childMenu&&(this._childMenu.activeIndex=-1,this._childMenu.activateNextItem()))}addMenu(e,t=!0){this.insertMenu(this._menus.length,e,t)}insertMenu(e,t,i=!0){this._closeChildMenu();let n=this._menus.indexOf(t),s=Math.max(0,Math.min(e,this._menus.length));if(-1===n)return jf.RO.insert(this._menus,s,t),t.addClass("lm-MenuBar-menu"),t.aboutToClose.connect(this._onMenuAboutToClose,this),t.menuRequested.connect(this._onMenuMenuRequested,this),t.title.changed.connect(this._onTitleChanged,this),void(i&&this.update());s===this._menus.length&&s--,n!==s&&(jf.RO.move(this._menus,n,s),i&&this.update())}removeMenu(e,t=!0){this.removeMenuAt(this._menus.indexOf(e),t)}removeMenuAt(e,t=!0){this._closeChildMenu();let i=jf.RO.removeAt(this._menus,e);i&&(i.aboutToClose.disconnect(this._onMenuAboutToClose,this),i.menuRequested.disconnect(this._onMenuMenuRequested,this),i.title.changed.disconnect(this._onTitleChanged,this),i.removeClass("lm-MenuBar-menu"),t&&this.update())}clearMenus(){if(0!==this._menus.length){this._closeChildMenu();for(let e of this._menus)e.aboutToClose.disconnect(this._onMenuAboutToClose,this),e.menuRequested.disconnect(this._onMenuMenuRequested,this),e.title.changed.disconnect(this._onTitleChanged,this),e.removeClass("lm-MenuBar-menu");this._menus.length=0,this.update()}}handleEvent(e){switch(e.type){case"keydown":this._evtKeyDown(e);break;case"mousedown":this._evtMouseDown(e);break;case"mousemove":this._evtMouseMove(e);break;case"mouseleave":this._evtMouseLeave(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("keydown",this),this.node.addEventListener("mousedown",this),this.node.addEventListener("mousemove",this),this.node.addEventListener("mouseleave",this),this.node.addEventListener("contextmenu",this)}onAfterDetach(e){this.node.removeEventListener("keydown",this),this.node.removeEventListener("mousedown",this),this.node.removeEventListener("mousemove",this),this.node.removeEventListener("mouseleave",this),this.node.removeEventListener("contextmenu",this),this._closeChildMenu()}onActivateRequest(e){this.isAttached&&(this.activeIndex=0)}onResize(e){this.update(),super.onResize(e)}onUpdateRequest(e){var t;let i=this._menus,n=this.renderer,s=this._activeIndex,r=this._tabFocusIndex>=0&&this._tabFocusIndex-1?this._overflowIndex:i.length,a=0,l=!1;o=null!==this._overflowMenu?o-1:o;let h=new Array(o);for(let e=0;e{this.activeIndex=e}}),a+=this._menuItemSizes[e],i[e].title.label===this._overflowMenuOptions.title&&(l=!0,o--);if(this._overflowMenuOptions.isVisible)if(this._overflowIndex>-1&&!l){if(null===this._overflowMenu){const e=null!==(t=this._overflowMenuOptions.title)&&void 0!==t?t:"...";this._overflowMenu=new Nm({commands:new lm}),this._overflowMenu.title.label=e,this._overflowMenu.title.mnemonic=0,this.addMenu(this._overflowMenu,!1)}for(let e=i.length-2;e>=o;e--){const t=this.menus[e];t.title.mnemonic=0,this._overflowMenu.insertItem(0,{type:"submenu",submenu:t}),this.removeMenu(t,!1)}h[o]=n.renderItem({title:this._overflowMenu.title,active:o===s&&0!==i[o].items.length,tabbable:o===r,onfocus:()=>{this.activeIndex=o}}),o++}else if(null!==this._overflowMenu){let e=this._overflowMenu.items,t=this.node.offsetWidth,s=this._overflowMenu.items.length;for(let l=0;lthis._menuItemSizes[s]){let t=e[0].submenu;this._overflowMenu.removeItemAt(0),this.insertMenu(o,t,!1),h[o]=n.renderItem({title:t.title,active:!1,tabbable:o===r,onfocus:()=>{this.activeIndex=o}}),o++}}0===this._overflowMenu.items.length&&(this.removeMenu(this._overflowMenu,!1),h.pop(),this._overflowMenu=null,this._overflowIndex=-1)}im.render(h,this.contentNode),this._updateOverflowIndex()}_updateOverflowIndex(){if(!this._overflowMenuOptions.isVisible)return;const e=this.contentNode.childNodes;let t=this.node.offsetWidth,i=0,n=-1,s=e.length;if(0==this._menuItemSizes.length)for(let r=0;rt&&-1===n&&(n=r)}else for(let e=0;et){n=e;break}this._overflowIndex=n}_evtKeyDown(e){let t=e.keyCode;if(9===t)return void(this.activeIndex=-1);if(e.preventDefault(),e.stopPropagation(),13===t||32===t||38===t||40===t)return void this.openActiveMenu();if(27===t)return this._closeChildMenu(),this.activeIndex=-1,void this.node.blur();if(37===t){let e=this._activeIndex,t=this._menus.length;return void(this.activeIndex=0===e?t-1:e-1)}if(39===t){let e=this._activeIndex,t=this._menus.length;return void(this.activeIndex=e===t-1?0:e+1)}let i=Zf().keyForKeydownEvent(e);if(!i)return;let n=this._activeIndex+1,s=Vm.findMnemonic(this._menus,i,n);-1===s.index||s.multiple?-1!==s.index?this.activeIndex=s.index:-1!==s.auto&&(this.activeIndex=s.auto):(this.activeIndex=s.index,this.openActiveMenu())}_evtMouseDown(e){if(!Af.hitTest(this.node,e.clientX,e.clientY))return;e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation();let t=jf.RO.findFirstIndex(this.contentNode.children,(t=>Af.hitTest(t,e.clientX,e.clientY)));if(-1!==t){if(0===e.button)if(this._childMenu)this._closeChildMenu(),this.activeIndex=t;else{const e=this._positionForMenu(t);Nm.saveWindowData(),this.activeIndex=t,this._openChildMenu(e)}}else this._closeChildMenu()}_evtMouseMove(e){let t=jf.RO.findFirstIndex(this.contentNode.children,(t=>Af.hitTest(t,e.clientX,e.clientY)));if(t===this._activeIndex)return;if(-1===t&&this._childMenu)return;const i=t>=0&&this._childMenu?this._positionForMenu(t):null;Nm.saveWindowData(),this.activeIndex=t,i&&this._openChildMenu(i)}_positionForMenu(e){let t=this.contentNode.children[e],{left:i,bottom:n}=t.getBoundingClientRect();return{top:n,left:i}}_evtMouseLeave(e){this._childMenu||(this.activeIndex=-1)}_openChildMenu(e={}){let t=this.activeMenu;if(!t)return void this._closeChildMenu();let i=this._childMenu;if(i===t)return;this._childMenu=t,i?i.close():document.addEventListener("mousedown",this,!0),Lf.sendMessage(this,fm.Msg.UpdateRequest);let{left:n,top:s}=e;void 0!==n&&void 0!==s||({left:n,top:s}=this._positionForMenu(this._activeIndex)),i||this.addClass("lm-mod-active"),t.items.length>0&&t.open(n,s,this._forceItemsPosition)}_closeChildMenu(){if(!this._childMenu)return;this.removeClass("lm-mod-active"),document.removeEventListener("mousedown",this,!0);let e=this._childMenu;this._childMenu=null,e.close(),this.activeIndex=-1}_onMenuAboutToClose(e){e===this._childMenu&&(this.removeClass("lm-mod-active"),document.removeEventListener("mousedown",this,!0),this._childMenu=null,this.activeIndex=-1)}_onMenuMenuRequested(e,t){if(e!==this._childMenu)return;let i=this._activeIndex,n=this._menus.length;switch(t){case"next":this.activeIndex=i===n-1?0:i+1;break;case"previous":this.activeIndex=0===i?n-1:i-1}this.openActiveMenu()}_onTitleChanged(){this.update()}}!function(e){class t{renderItem(e){let t=this.createItemClass(e),i=this.createItemDataset(e),n=this.createItemARIA(e);return dm.li({className:t,dataset:i,tabindex:e.tabbable?"0":"-1",onfocus:e.onfocus,...n},this.renderIcon(e),this.renderLabel(e))}renderIcon(e){let t=this.createIconClass(e);return dm.div({className:t},e.title.icon,e.title.iconLabel)}renderLabel(e){let t=this.formatLabel(e);return dm.div({className:"lm-MenuBar-itemLabel"},t)}createItemClass(e){let t="lm-MenuBar-item";return e.title.className&&(t+=` ${e.title.className}`),e.active&&(t+=" lm-mod-active"),t}createItemDataset(e){return e.title.dataset}createItemARIA(e){return{role:"menuitem","aria-haspopup":"true"}}createIconClass(e){let t="lm-MenuBar-itemIcon",i=e.title.iconClass;return i?`${t} ${i}`:t}formatLabel(e){let{label:t,mnemonic:i}=e.title;if(i<0||i>=t.length)return t;let n=t.slice(0,i),s=t.slice(i+1),r=t[i];return[n,dm.span({className:"lm-MenuBar-itemMnemonic"},r),s]}}e.Renderer=t,e.defaultRenderer=new t}(Km||(Km={})),function(e){e.createNode=function(){let e=document.createElement("div"),t=document.createElement("ul");return t.className="lm-MenuBar-content",e.appendChild(t),t.setAttribute("role","menubar"),e},e.findMnemonic=function(e,t,i){let n=-1,s=-1,r=!1,o=t.toUpperCase();for(let t=0,a=e.length;t=0&&c1&&this.widgets.forEach((e=>{e.hiddenMode=this._hiddenMode})))}dispose(){for(const e of this._items)e.dispose();this._box=null,this._items.length=0,super.dispose()}attachWidget(e,t){this._hiddenMode===fm.HiddenMode.Scale&&this._items.length>0?(1===this._items.length&&(this.widgets[0].hiddenMode=fm.HiddenMode.Scale),t.hiddenMode=fm.HiddenMode.Scale):t.hiddenMode=fm.HiddenMode.Display,jf.RO.insert(this._items,e,new gm(t)),this.parent.isAttached&&Lf.sendMessage(t,fm.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.isAttached&&Lf.sendMessage(t,fm.Msg.AfterAttach),this.parent.fit()}moveWidget(e,t,i){jf.RO.move(this._items,e,t),this.parent.update()}detachWidget(e,t){let i=jf.RO.removeAt(this._items,e);this.parent.isAttached&&Lf.sendMessage(t,fm.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&Lf.sendMessage(t,fm.Msg.AfterDetach),i.widget.node.style.zIndex="",this._hiddenMode===fm.HiddenMode.Scale&&(t.hiddenMode=fm.HiddenMode.Display,1===this._items.length&&(this._items[0].widget.hiddenMode=fm.HiddenMode.Display)),i.dispose(),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_fit(){let e=0,t=0;for(let i=0,n=this._items.length;i{t.newValue!==this.currentWidget&&(i.current=t.newValue)}),this),i.added.connect(((e,t)=>{this._widgetAdded.emit(t)}),this),i.currentChanged.connect(((e,n)=>{null===n&&t.currentWidget?i.current=t.currentWidget:(this.onCurrentChanged(n),this._currentChanged.emit(n))}),this),i.updated.connect(((e,t)=>{this._widgetUpdated.emit(t)}),this)}get currentChanged(){return this._currentChanged}get currentWidget(){return this._pool.current||null}get restored(){return this._deferred?Promise.resolve():this._pool.restored}get size(){return this._pool.size}get widgetAdded(){return this._widgetAdded}get widgetUpdated(){return this._widgetUpdated}async add(e){this._focusTracker.add(e),await this._pool.add(e),this._focusTracker.activeWidget||(this._pool.current=e)}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,this._pool.dispose(),this._focusTracker.dispose(),zf.Signal.clearData(this))}find(e){return this._pool.find(e)}forEach(e){return this._pool.forEach(e)}filter(e){return this._pool.filter(e)}inject(e){return this._pool.inject(e)}has(e){return this._pool.has(e)}async restore(e){const t=this._deferred;return t?(this._deferred=null,this._pool.restore(t)):e?this._pool.restore(e):void console.warn("No options provided to restore the tracker.")}defer(e){this._deferred=e}async save(e){return this._pool.save(e)}onCurrentChanged(e){}}function tg(e){return e.replace("-","_")}class ig{constructor(e){e=e||{},this._defaults={domain:"messages",locale:document.documentElement.getAttribute("lang")||"en",pluralFunc:function(e){return{nplurals:2,plural:1!=e?1:0}},contextDelimiter:String.fromCharCode(4),stringsPrefix:""},this._locale=(e.locale||this._defaults.locale).replace("_","-"),this._domain=tg(e.domain||this._defaults.domain),this._contextDelimiter=e.contextDelimiter||this._defaults.contextDelimiter,this._stringsPrefix=e.stringsPrefix||this._defaults.stringsPrefix,this._pluralFuncs={},this._dictionary={},this._pluralForms={},e.messages&&(this._dictionary[this._domain]={},this._dictionary[this._domain][this._locale]=e.messages),e.pluralForms&&(this._pluralForms[this._locale]=e.pluralForms)}setContextDelimiter(e){this._contextDelimiter=e}getContextDelimiter(){return this._contextDelimiter}setLocale(e){this._locale=e.replace("_","-")}getLocale(){return this._locale}setDomain(e){this._domain=tg(e)}getDomain(){return this._domain}setStringsPrefix(e){this._stringsPrefix=e}getStringsPrefix(){return this._stringsPrefix}static strfmt(e,...t){return e.replace(/%%/g,"%% ").replace(/%(\d+)/g,(function(e,i){return t[i-1]})).replace(/%% /g,"%")}loadJSON(e,t){if(!e[""]||!e[""].language||!e[""].pluralForms)throw new Error(`Wrong jsonData, it must have an empty key ("") with "language" and "pluralForms" information: ${e}`);t=tg(t);let i=e[""],n=JSON.parse(JSON.stringify(e));delete n[""],this.setMessages(t||this._defaults.domain,i.language,n,i.pluralForms)}__(e,...t){return this.gettext(e,...t)}_n(e,t,i,...n){return this.ngettext(e,t,i,...n)}_p(e,t,...i){return this.pgettext(e,t,...i)}_np(e,t,i,n,...s){return this.npgettext(e,t,i,n,...s)}gettext(e,...t){return this.dcnpgettext("","",e,"",0,...t)}ngettext(e,t,i,...n){return this.dcnpgettext("","",e,t,i,...n)}pgettext(e,t,...i){return this.dcnpgettext("",e,t,"",0,...i)}npgettext(e,t,i,n,...s){return this.dcnpgettext("",e,t,i,n,...s)}dcnpgettext(e,t,i,n,s,...r){let o;e=tg(e)||this._domain;let a=t?t+this._contextDelimiter+i:i,l={pluralForm:!1},h=!1,c=this._locale,d=this.expandLocale(this._locale);for(let t in d)if(c=d[t],h=this._dictionary[e]&&this._dictionary[e][c]&&this._dictionary[e][c][a],h=n?h&&this._dictionary[e][c][a].length>1:h&&1==this._dictionary[e][c][a].length,h){l.locale=c;break}if(h?o=this._dictionary[e][c][a]:(o=[i],l.pluralFunc=this._defaults.pluralFunc),!n)return this.t(o,s,l,...r);l.pluralForm=!0;let u=h?o:[i,n];return this.t(u,s,l,...r)}expandLocale(e){let t=[e],i=e.lastIndexOf("-");for(;i>0;)e=e.slice(0,i),t.push(e),i=e.lastIndexOf("-");return t}getPluralFunc(e){if(!new RegExp("^\\s*nplurals\\s*=\\s*[0-9]+\\s*;\\s*plural\\s*=\\s*(?:\\s|[-\\?\\|&=!<>+*/%:;n0-9_()])+").test(e))throw new Error(ig.strfmt('The plural form "%1" is not valid',e));return new Function("n","let plural, nplurals; "+e+" return { nplurals: nplurals, plural: (plural === true ? 1 : (plural ? plural : 0)) };")}removeContext(e){return-1!==e.indexOf(this._contextDelimiter)?e.split(this._contextDelimiter)[1]:e}t(e,t,i,...n){if(!i.pluralForm)return this._stringsPrefix+ig.strfmt(this.removeContext(e[0]),...n);let s;return i.pluralFunc?s=i.pluralFunc(t):(this._pluralFuncs[i.locale||""]||(this._pluralFuncs[i.locale||""]=this.getPluralFunc(this._pluralForms[i.locale||""])),s=this._pluralFuncs[i.locale||""](t)),(void 0===!s.plural||s.plural>s.nplurals||e.length<=s.plural)&&(s.plural=0),this._stringsPrefix+ig.strfmt(this.removeContext(e[s.plural]),...[t].concat(n))}setMessages(e,t,i,n){e=tg(e),n&&(this._pluralForms[t]=n),this._dictionary[e]||(this._dictionary[e]={}),this._dictionary[e][t]=i}}const ng=new class{constructor(e){this.languageCode="en",this._languageBundle=e}load(e){return this._languageBundle}}(new class{__(e,...t){return this.gettext(e,...t)}_n(e,t,i,...n){return this.ngettext(e,t,i,...n)}_p(e,t,...i){return this.pgettext(e,t,...i)}_np(e,t,i,n,...s){return this.npgettext(e,t,i,n,...s)}gettext(e,...t){return ig.strfmt(e,...t)}ngettext(e,t,i,...n){return ig.strfmt(1==i?e:t,...[i].concat(n))}pgettext(e,t,...i){return ig.strfmt(t,...i)}npgettext(e,t,i,n,...s){return this.ngettext(t,i,n,...s)}dcnpgettext(e,t,i,n,s,...r){return this.ngettext(i,n,s,...r)}});new Wf.Token("@jupyterlab/translation:ITranslatorConnector","A service to connect to the server translation endpoint."),new Wf.Token("@jupyterlab/translation:ITranslator","A service to translate strings.");const sg="jp-OutputArea-child",rg="jp-OutputArea-output",og="jp-OutputArea-prompt";class ag extends fm{constructor(e){var t,i,n,s;super(),this.outputLengthChanged=new zf.Signal(this),this._onIOPub=e=>{const t=this.model,i=e.header.msg_type;let n;const s=(e.content.transient||{}).display_id;let r;switch(i){case"execute_result":case"display_data":case"stream":case"error":n={...e.content,output_type:i},t.add(n);break;case"clear_output":{const i=e.content.wait;t.clear(i);break}case"update_display_data":if(n={...e.content,output_type:"display_data"},r=this._displayIdMap.get(s),r)for(const e of r)t.set(e,n)}s&&"display_data"===i&&(r=this._displayIdMap.get(s)||[],r.push(t.length-1),this._displayIdMap.set(s,r))},this._onExecuteReply=e=>{const t=this.model,i=e.content;if("ok"!==i.status)return;const n=i&&i.payload;if(!n||!n.length)return;const s=n.filter((e=>"page"===e.source));if(!s.length)return;const r={output_type:"display_data",data:JSON.parse(JSON.stringify(s[0])).data,metadata:{}};t.add(r)},this._displayIdMap=new Map,this._minHeightTimeout=null,this._inputRequested=new zf.Signal(this),this._toggleScrolling=new zf.Signal(this),this._outputTracker=new eg({namespace:Wf.UUID.uuid4()}),this._inputHistoryScope="global",super.layout=new vm,this.addClass("jp-OutputArea"),this.contentFactory=null!==(t=e.contentFactory)&&void 0!==t?t:ag.defaultContentFactory,this.rendermime=e.rendermime,this._maxNumberOutputs=null!==(i=e.maxNumberOutputs)&&void 0!==i?i:1/0,this._translator=null!==(n=e.translator)&&void 0!==n?n:ng,this._inputHistoryScope=null!==(s=e.inputHistoryScope)&&void 0!==s?s:"global";const r=this.model=e.model;for(let e=0;e{$f.KernelMessage.isInputRequestMsg(t)&&this.onInputRequest(t,e)})}get inputRequested(){return this._inputRequested}get maxNumberOutputs(){return this._maxNumberOutputs}set maxNumberOutputs(e){if(e<=0)return void console.warn("OutputArea.maxNumberOutputs must be strictly positive.");const t=this._maxNumberOutputs;this._maxNumberOutputs=e,t{this._toggleScrolling.emit()})),this.node.appendChild(e)}_moveDisplayIdIndices(e,t){this._displayIdMap.forEach((i=>{const n=e+t;for(let s=i.length-1;s>=0;--s){const r=i[s];r>=e&&r=n&&(i[s]-=t)}}))}onStateChanged(e,t){const i=Math.min(this.model.length,this._maxNumberOutputs);if(t){if(t>=this._maxNumberOutputs)return;this._setOutput(t,this.model.get(t))}else for(let e=0;e{this.isDisposed||(this.node.style.minHeight="")}),50)}onInputRequest(e,t){const i=this.contentFactory,n=e.content.prompt,s=e.content.password,r=new Am;r.addClass(sg),r.addClass("jp-OutputArea-stdin-item");const o=i.createOutputPrompt();o.addClass(og),r.addWidget(o);const a=i.createStdin({parent_header:e.header,prompt:n,password:s,future:t,translator:this._translator,inputHistoryScope:this._inputHistoryScope});a.addClass(rg),r.addWidget(a),this.model.length>=this.maxNumberOutputs&&(this.maxNumberOutputs=this.model.length),this.layout.addWidget(r),this._inputRequested.emit(),a.value.then((e=>{this.model.length>=this.maxNumberOutputs&&(this.maxNumberOutputs=this.model.length+1),this.model.add({output_type:"stream",name:"stdin",text:e+"\n"}),r.dispose()}))}_setOutput(e,t){if(e>=this._maxNumberOutputs)return;const i=this.layout.widgets[e],n=i.widgets?i.widgets[1]:i,s=this.rendermime.preferredMimeType(t.data,t.trusted?"any":"ensure");cg.currentPreferredMimetype.get(n)===s&&ag.isIsolated(s,t.metadata)===n instanceof cg.IsolatedRenderer?n.renderModel(t):(this.layout.widgets[e].dispose(),this._insertOutput(e,t))}_insertOutput(e,t){if(e>this._maxNumberOutputs)return;const i=this.layout;if(e===this._maxNumberOutputs){const t=new cg.TrimmedOutputs(this._maxNumberOutputs,(()=>{const e=this._maxNumberOutputs;this._maxNumberOutputs=1/0,this._showTrimmedOutputs(e)}));i.insertWidget(e,this._wrappedOutput(t))}else{let n=this.createOutputItem(t);n?n.toggleClass("jp-OutputArea-executeResult",null!==t.executionCount):n=new fm,this._outputTracker.has(n)||this._outputTracker.add(n),i.insertWidget(e,n)}}get outputTracker(){return this._outputTracker}_showTrimmedOutputs(e){this.widgets[e].dispose();for(let t=e;t{const t=document.createElement("pre"),n=this._translator.load("jupyterlab");t.textContent=n.__("Javascript Error: %1",e.message),i.node.appendChild(t),i.node.className="lm-Widget jp-RenderedText",i.node.setAttribute("data-mime-type","application/vnd.jupyter.stderr")})),i}_wrappedOutput(e,t=null){const i=new cg.OutputPanel;i.addClass(sg);const n=this.contentFactory.createOutputPrompt();return n.executionCount=t,n.addClass(og),i.addWidget(n),e.addClass(rg),i.addWidget(e),i}}!function(e){e.execute=async function(e,t,i,n){var s;let r=!0;n&&Array.isArray(n.tags)&&-1!==n.tags.indexOf("raises-exception")&&(r=!1);const o={code:e,stop_on_error:r},a=null===(s=i.session)||void 0===s?void 0:s.kernel;if(!a)throw new Error("Session has no kernel.");const l=a.requestExecute(o,!1,n);return t.future=l,l.done},e.isIsolated=function(e,t){const i=t[e];return i&&void 0!==i.isolated?!!i.isolated:!!t.isolated};class t{createOutputPrompt(){return new lg}createStdin(e){return new hg(e)}}e.ContentFactory=t,e.defaultContentFactory=new t}(ag||(ag={}));class lg extends fm{constructor(){super(),this._executionCount=null,this.addClass("jp-OutputPrompt")}get executionCount(){return this._executionCount}set executionCount(e){this._executionCount=e,this.node.textContent=null===e?"":`[${e}]:`}}class hg extends fm{static _historyIx(e,t){const i=hg._history.get(e);if(!i)return;const n=i.length;return t<=0?n+t:void 0}static _historyAt(e,t){const i=hg._history.get(e);if(!i)return;const n=i.length,s=hg._historyIx(e,t);return void 0!==s&&s1e3&&i.shift()}static _historySearch(e,t,i,n=!0){const s=hg._history.get(e),r=s.length,o=hg._historyIx(e,i),a=e=>-1!==e.search(t);if(void 0!==o)if(n){if(0===o)return;const e=s.slice(0,o).findLastIndex(a);if(-1!==e)return e-r}else{if(o>=r-1)return;const e=s.slice(o+1).findIndex(a);if(-1!==e)return e-r+o+1}}constructor(e){var t;super({node:cg.createInputWidgetNode(e.prompt,e.password)}),this._promise=new Wf.PromiseDelegate,this.addClass("jp-Stdin"),this._future=e.future,this._historyIndex=0,this._historyKey="session"===e.inputHistoryScope?e.parent_header.session:"",this._historyPat="",this._parentHeader=e.parent_header,this._password=e.password,this._trans=(null!==(t=e.translator)&&void 0!==t?t:ng).load("jupyterlab"),this._value=e.prompt+" ",this._input=this.node.getElementsByTagName("input")[0],this._input.placeholder=this._trans.__("↑↓ for history. Search history with c-↑/c-↓"),hg._history.has(this._historyKey)||hg._history.set(this._historyKey,[])}get value(){return this._promise.promise.then((()=>this._value))}handleEvent(e){const t=this._input;if("keydown"===e.type)if("Enter"===e.key)this.resetSearch(),this._future.sendInputReply({status:"ok",value:t.value},this._parentHeader),this._password?this._value+="········":(this._value+=t.value,hg._historyPush(this._historyKey,t.value)),this._promise.resolve(void 0);else if("Escape"===e.key)this.resetSearch(),t.blur();else if(!e.ctrlKey||"ArrowUp"!==e.key&&"ArrowDown"!==e.key){if("ArrowUp"===e.key){this.resetSearch();const i=hg._historyAt(this._historyKey,this._historyIndex-1);i&&(0===this._historyIndex&&(this._valueCache=t.value),this._setInputValue(i),--this._historyIndex,e.preventDefault())}else if("ArrowDown"===e.key)if(this.resetSearch(),0===this._historyIndex);else if(-1===this._historyIndex)this._setInputValue(this._valueCache),++this._historyIndex;else{const e=hg._historyAt(this._historyKey,this._historyIndex+1);e&&(this._setInputValue(e),++this._historyIndex)}}else{""===this._historyPat&&(this._historyPat=t.value);const i="ArrowUp"===e.key,n=hg._historySearch(this._historyKey,this._historyPat,this._historyIndex,i);if(void 0!==n){const i=hg._historyAt(this._historyKey,n);void 0!==i&&(0===this._historyIndex&&(this._valueCache=t.value),this._setInputValue(i),this._historyIndex=n,e.preventDefault())}}}resetSearch(){this._historyPat=""}onAfterAttach(e){this._input.addEventListener("keydown",this),this._input.focus()}onBeforeDetach(e){this._input.removeEventListener("keydown",this)}_setInputValue(e){this._input.value=e,this._input.setSelectionRange(e.length,e.length)}}var cg,dg,ug,pg,fg;function mg(e){return"execute_result"===e.output_type}function gg(e){return"display_data"===e.output_type}function vg(e){return"stream"===e.output_type}hg._history=new Map,function(e){e.createInputWidgetNode=function(e,t){const i=document.createElement("div"),n=document.createElement("pre");n.className="jp-Stdin-prompt",n.textContent=e;const s=document.createElement("input");return s.className="jp-Stdin-input",t&&(s.type="password"),i.appendChild(n),n.appendChild(s),i},e.IsolatedRenderer=class extends fm{constructor(e){super({node:document.createElement("iframe")}),this.addClass("jp-mod-isolated"),this._wrapped=e;const t=this.node;t.frameBorder="0",t.scrolling="auto",t.addEventListener("load",(()=>{t.contentDocument.open(),t.contentDocument.write(this._wrapped.node.innerHTML),t.contentDocument.close();const e=t.contentDocument.body;t.style.height=`${e.scrollHeight}px`,t.heightChangeObserver=new ResizeObserver((()=>{t.style.height=`${e.scrollHeight}px`})),t.heightChangeObserver.observe(e)}))}renderModel(e){return this._wrapped.renderModel(e)}},e.currentPreferredMimetype=new Xf.AttachedProperty({name:"preferredMimetype",create:e=>""}),e.OutputPanel=class extends Am{constructor(e){super(e)}_onContext(e){this.node.focus()}onAfterAttach(e){super.onAfterAttach(e),this.node.addEventListener("contextmenu",this._onContext.bind(this))}onBeforeDetach(e){super.onAfterDetach(e),this.node.removeEventListener("contextmenu",this._onContext.bind(this))}},e.TrimmedOutputs=class extends fm{constructor(e,t){const i=document.createElement("div"),n=`The first ${e} are displayed`;i.insertAdjacentHTML("afterbegin",`\n
Show more outputs
\n
`),super({node:i}),this._onClick=t,this.addClass("jp-TrimmedOutputs"),this.addClass("jp-RenderedHTMLCommon")}handleEvent(e){"click"===e.type&&this._onClick(e)}onAfterAttach(e){super.onAfterAttach(e),this.node.addEventListener("click",this)}onBeforeDetach(e){super.onBeforeDetach(e),this.node.removeEventListener("click",this)}}}(cg||(cg={}));class Og{constructor(e={}){if(this._array=[],this._isDisposed=!1,this._changed=new zf.Signal(this),e.values)for(const t of e.values)this._array.push(t);this._itemCmp=e.itemCmp||dg.itemCmp}get type(){return"List"}get changed(){return this._changed}get length(){return this._array.length}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed||(this._isDisposed=!0,zf.Signal.clearData(this),this.clear())}[Symbol.iterator](){return this._array[Symbol.iterator]()}get(e){return this._array[e]}set(e,t){const i=this._array[e];if(void 0===t)throw new Error("Cannot set an undefined item");(0,this._itemCmp)(i,t)||(this._array[e]=t,this._changed.emit({type:"set",oldIndex:e,newIndex:e,oldValues:[i],newValues:[t]}))}push(e){const t=this._array.push(e);return this._changed.emit({type:"add",oldIndex:-1,newIndex:this.length-1,oldValues:[],newValues:[e]}),t}insert(e,t){e===this._array.length?this._array.push(t):jf.RO.insert(this._array,e,t),this._changed.emit({type:"add",oldIndex:-2,newIndex:e,oldValues:[],newValues:[t]})}removeValue(e){const t=this._itemCmp,i=jf.RO.findFirstIndex(this._array,(i=>t(i,e)));return this.remove(i),i}remove(e){const t=jf.RO.removeAt(this._array,e);if(void 0!==t)return this._changed.emit({type:"remove",oldIndex:e,newIndex:-1,newValues:[],oldValues:[t]}),t}clear(){const e=this._array.slice();this._array.length=0,this._changed.emit({type:"remove",oldIndex:0,newIndex:0,newValues:[],oldValues:e})}move(e,t){if(this.length<=1||e===t)return;const i=[this._array[e]];jf.RO.move(this._array,e,t),this._changed.emit({type:"move",oldIndex:e,newIndex:t,oldValues:i,newValues:i})}pushAll(e){const t=this.length;for(const t of e)this._array.push(t);return this._changed.emit({type:"add",oldIndex:-1,newIndex:t,oldValues:[],newValues:Array.from(e)}),this.length}insertAll(e,t){const i=e;for(const i of t)jf.RO.insert(this._array,e++,i);this._changed.emit({type:"add",oldIndex:-2,newIndex:i,oldValues:[],newValues:Array.from(t)})}removeRange(e,t){const i=this._array.slice(e,t);for(let i=e;i{e.push(i)})),e}values(){const e=[];return this._map.forEach(((t,i)=>{e.push(t)})),e}delete(e){const t=this._map.get(e);return this._map.delete(e)&&this._changed.emit({type:"remove",key:e,oldValue:t,newValue:void 0}),t}clear(){const e=this.keys();for(let t=0;te.toJSON())))}_add(e){const t=this._trusted;if(e=Wf.JSONExt.deepCopy(e),fg.normalize(e),vg(e)&&this._lastStream&&e.name===this._lastName&&this.shouldCombine({value:e,lastModel:this.list.get(this.length-1)})){this._lastStream+=e.text,this._lastStream=fg.removeOverwrittenChars(this._lastStream),e.text=this._lastStream;const i=this._createItem({value:e,trusted:t}),n=this.length-1,s=this.list.get(n);return this.list.set(n,i),s.dispose(),this.length}vg(e)&&(e.text=fg.removeOverwrittenChars(e.text));const i=this._createItem({value:e,trusted:t});return vg(e)?(this._lastStream=e.text,this._lastName=e.name):this._lastStream="",this.list.push(i)}shouldCombine(e){return!0}_createItem(e){return this.contentFactory.createOutputModel(e)}_onListChanged(e,t){switch(t.type){case"add":t.newValues.forEach((e=>{e.changed.connect(this._onGenericChange,this)}));break;case"remove":t.oldValues.forEach((e=>{e.changed.disconnect(this._onGenericChange,this)}));break;case"set":t.newValues.forEach((e=>{e.changed.connect(this._onGenericChange,this)})),t.oldValues.forEach((e=>{e.changed.disconnect(this._onGenericChange,this)}))}this._changed.emit(t)}_onGenericChange(e){let t,i=null;for(t=0;t-1;){const t=e.match(/^(.*)\r+/m)[1];let i=e.match(/\r+(.*)$/m)[1];i+=t.slice(i.length,t.length),e=e.replace(/\r+.*$/m,"\r").replace(/^.*\r/m,i)}return e}(function(e){let t=e;do{t=(e=t).replace(/[^\n]\x08/gm,"")}while(t.length{const n=e[t],s=e[i];return n.rank!==s.rank?n.rank-s.rank:n.id-s.id}))}}(Pg||(Pg={}));var Rg=__webpack_require__(6145),Dg=__webpack_require__.n(Rg);const Ig=/(\$\$?|\\(?:begin|end)\{[a-z]*\*?\}|\\[{}$]|[{}]|(?:\n\s*)+|@@\d+@@|\\\\(?:\(|\)|\[|\]))/i;function qg(e,t,i,n,s){let r=s.slice(e,t+1).join("").replace(/&/g,"&").replace(//g,">");for(navigator&&"Microsoft Internet Explorer"===navigator.appName&&(r=r.replace(/(%[^\n]*)\n/g,"$1
\n"));t>e;)s[t]="",t--;return s[e]="@@"+n.length+"@@",i&&(r=i(r)),n.push(r),s}function Lg(e){let{host:t,source:i,trusted:n,sanitizer:s,resolver:r,linkHandler:o,shouldTypeset:a,latexTypesetter:l,translator:h}=e;h=h||ng;const c=null==h?void 0:h.load("jupyterlab");let d,u=i;if(!i)return t.textContent="",Promise.resolve(void 0);if(n||(u=`${i}`,i=s.sanitize(i)),t.innerHTML=i,t.getElementsByTagName("script").length>0)if(n)zg.evalInnerHTMLScriptTags(t);else{const e=document.createElement("div"),i=document.createElement("pre");i.textContent=c.__("This HTML output contains inline scripts. Are you sure that you want to run arbitrary Javascript within your JupyterLab session?");const n=document.createElement("button");n.textContent=c.__("Run"),n.onclick=e=>{t.innerHTML=u,zg.evalInnerHTMLScriptTags(t),t.firstChild&&t.removeChild(t.firstChild)},e.appendChild(i),e.appendChild(n),t.insertBefore(e,t.firstChild)}return zg.handleDefaults(t,r),d=r?zg.handleUrls(t,r,o):Promise.resolve(void 0),d.then((()=>{a&&l&&l.typeset(t)}))}async function Ng(e){const{host:t,source:i,markdownParser:n,...s}=e;if(!i)return void(t.textContent="");let r="";if(n){const e=function(e){const t=[];let i,n=null,s=null,r=null,o=0;e.includes("`")||e.includes("~~~")?(e=e.replace(/~/g,"~T").replace(/^(?`{3,}|(~T){3,})[^`\n]*\n([\s\S]*?)^\k`*$/gm,(e=>e.replace(/\$/g,"~D"))).replace(/(^|[^\\])(`+)([^\n]*?[^`\n])\2(?!`)/gm,(e=>e.replace(/\$/g,"~D"))),i=e=>e.replace(/~([TD])/g,((e,t)=>"T"===t?"~":"$"))):i=e=>e;let a=e.replace(/\r\n?/g,"\n").split(Ig);for(let e=1,l=a.length;e{let i=a[t];return"\\\\("===i.substr(0,3)&&"\\\\)"===i.substr(i.length-3)?i="\\("+i.substring(3,i.length-3)+"\\)":"\\\\["===i.substr(0,3)&&"\\\\]"===i.substr(i.length-3)&&(i="\\["+i.substring(3,i.length-3)+"\\]"),i}))}else r=`
${i}
`;var o,a;await Lg({host:t,source:r,...s}),zg.headerAnchors(t)}function Bg(e,t){var i,n;const s=e.cloneNode();s.textContent=null===(i=e.textContent)||void 0===i?void 0:i.slice(0,t);const r=e.cloneNode();return r.textContent=null===(n=e.textContent)||void 0===n?void 0:n.slice(t),{pre:s,post:r}}function*$g(e){var t;let i,n=0;for(let s of e)i=n+((null===(t=s.textContent)||void 0===t?void 0:t.length)||0),yield{node:s,start:n,end:i,isText:s.nodeType===Node.TEXT_NODE},n=i}function Qg(e){var t,i;const{host:n,sanitizer:s,source:r}=e,o=s.sanitize(zg.ansiSpan(r),{allowedTags:["span"]}),a=document.createElement("pre"),l=document.createElement("pre");l.innerHTML=o;const h=l.textContent;if(h){const e=null===(i=null===(t=s.getAutolink)||void 0===t?void 0:t.call(s))||void 0===i||i?function(e){const t="\\u0000-\\u0020\\u007f-\\u009f",i=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|data:|www\\.)[^\\s"+t+'"]{2,}[^\\s'+t+"\"'(){}\\[\\],:;.!?]","ug"),n=[];let s,r=0;for(;null!=(s=i.exec(e));){s.index!==r&&n.push(document.createTextNode(e.slice(r,s.index)));let t=s[0];const i=t.slice(-1),o=-1!==[">","<"].indexOf(i)?t.length-1:t.length,a=document.createElement("a");t=t.slice(0,o),a.href=t.startsWith("www.")?"https://"+t:t,a.rel="noopener",a.target="_blank",a.appendChild(document.createTextNode(t.slice(0,o))),n.push(a),r=s.index+o}return r!==e.length&&n.push(document.createTextNode(e.slice(r,e.length))),n}(h):[document.createTextNode(o)];let n=!1;const r=[],c=Array.from(l.childNodes);for(let t of function*(e,t){var i,n;let s=$g(e),r=$g(t),o=s.next(),a=r.next();for(;!o.done&&!a.done;){let e=o.value,t=a.value;if(e.isText&&e.start<=t.start&&e.end>=t.end)yield[null,t.node],a=r.next();else if(t.isText&&t.start<=e.start&&t.end>=e.end)yield[e.node,null],o=s.next();else if(e.end===t.end&&e.start===t.start)yield[e.node,t.node],o=s.next(),a=r.next();else if(e.end>t.end){let{pre:n,post:s}=Bg(e.node,t.end-e.start);t.starte.end))throw new Error(`Unexpected intersection: ${JSON.stringify(e)} ${JSON.stringify(t)}`);{let{pre:i,post:r}=Bg(t.node,e.end-t.start);e.start{const s=decodeURIComponent(n);return i&&i.handleLink(e,s,r),t.getDownloadUrl(n)})).then((t=>{e.href=t+r})).catch((t=>{e.href=""}))}e.evalInnerHTMLScriptTags=function(e){const t=Array.from(e.getElementsByTagName("script"));for(const e of t){if(!e.parentNode)continue;const t=document.createElement("script"),i=e.attributes;for(let e=0,n=i.length;e{}))},e.headerAnchors=function(e){const t=["h1","h2","h3","h4","h5","h6"];for(const i of t){const t=e.getElementsByTagName(i);for(let e=0;e"),a.push(e),a.push("")):a.push(e)}}function r(e){let t,i,n;const s=e.shift();if(2===s&&e.length>=3){if(t=e.shift(),i=e.shift(),n=e.shift(),[t,i,n].some((e=>e<0||255=1))throw new RangeError("Invalid extended color specification");{const s=e.shift();if(s<0)throw new RangeError("Color index must be >= 0");if(s<16)return s;if(s<232)t=Math.floor((s-16)/36),t=t>0?55+40*t:0,i=Math.floor((s-16)%36/6),i=i>0?55+40*i:0,n=(s-16)%6,n=n>0?55+40*n:0;else{if(!(s<256))throw new RangeError("Color index must be < 256");t=i=n=10*(s-232)+8}}}return[t,i,n]}e.ansiSpan=function(e){const t=/\x1b\[(.*?)([@-~])/g;let i,n=[],o=[],a=!1,l=!1,h=!1;const c=[],d=[];let u=0;for(e=Dg()(e),e+="";i=t.exec(e);){if("m"===i[2]){const e=i[1].split(";");for(let t=0;t]+xmlns=[^>]+svg")<0&&(i=i.replace("new Vg(e)},{safe:!0,mimeTypes:["text/markdown"],defaultRank:60,createRenderer:e=>new Hg(e)},{safe:!0,mimeTypes:["text/latex"],defaultRank:70,createRenderer:e=>new Ug(e)},{safe:!1,mimeTypes:["image/svg+xml"],defaultRank:80,createRenderer:e=>new Xg(e)},{safe:!0,mimeTypes:["image/bmp","image/png","image/jpeg","image/gif","image/webp"],defaultRank:90,createRenderer:e=>new Fg(e)},{safe:!1,mimeTypes:["text/javascript","application/javascript"],defaultRank:110,createRenderer:e=>new Gg(e)},{safe:!0,mimeTypes:["text/plain","application/vnd.jupyter.stdout","application/vnd.jupyter.stderr"],defaultRank:120,createRenderer:e=>new Yg(e)}];var Kg=function(e,t,i,n){return new(i||(i=Promise))((function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((n=n.apply(e,t||[])).next())}))};const Jg={cell:"manim-binder-cell",input:"manim-binder-input",button:"manim-binder-button",output:"manim-binder-output",wrapper:"manim-binder-wrapper",title:"manim-binder-title",meta:"manim-binder-meta",buttonWrapper:"manim-binder-button-wrapper"};!function(e){let t="ManimCommunity/jupyter_examples",i="main",n=60,s="manim-notebook-kernel",r="python3",o=Jg,a="https://mybinder.org",l=!1,h=null,c=null,d=null,u=null;function p(t){if(void 0!==e){const i=(new Date).getTime()+60*n*1e3,r=JSON.stringify({settings:t,timestamp:i});e.localStorage.setItem(s,r)}const i=$f.ServerConnection.makeSettings(t);return c=new $f.KernelManager({serverSettings:i}),u=new $f.ContentsManager({serverSettings:i}),c.startNew({name:r}).then((e=>e))}function f(e,t="",i=""){const n=document.createElement(e);return n.className=t,n.textContent=i,n}function m(e,t){return Kg(this,void 0,void 0,(function*(){const i=h.requestExecute({code:"from manim import *"});yield i.done,console.log("Import done. Now running code"),e.future=h.requestExecute({code:t}),e.model.add({output_type:"stream",name:"loading",text:"Loading..."}),e.model.clear(!0)}))}function g(n,r){if(h)return n.model.clear(),n.model.add({output_type:"stream",name:"loading",text:"Loading..."}),void m(n,r);const o=a.split("//")[1],c=l?"Reconnecting to":"Launching";n.model.clear(),n.model.add({output_type:"stream",name:"stdout",text:`${c} Docker container on ${o}...`}),new Promise(((n,r)=>function(){if(void 0!==e){const t=e.localStorage.getItem(s);if(t){l=!0;const{settings:i,timestamp:n}=JSON.parse(t);if(n&&(new Date).getTime(){const i=new EventSource(n);i.onerror=e=>{i.close(),t(new Error("Unable to connect to Binder"))};let s=null;i.onmessage=({data:n})=>{const r=JSON.parse(n);if(r.phase&&r.phase!=s&&(s=r.phase.toLowerCase()),"failed"==r.phase)i.close(),t(new Error(r));else if("ready"==r.phase){i.close();const t={baseUrl:r.url,wsUrl:`ws${r.url.slice(4)}`,token:r.token};e(t)}}}))}(t,i,a).then((e=>p(e)))}().then(n).catch(r))).then((e=>{h=e,m(n,r)})).catch((()=>{h=null,void 0!==e&&(l=!1,e.localStorage.removeItem(s)),n.model.clear(),n.model.add({output_type:"stream",name:"failure",text:"Failed to connect to kernel"})}))}e.initManimBinder=function({repo:l,branch:h,storage_expire:c,storage_key:p,kernel_type:m,class_names:v,binder_url:O}={}){t=l||t,i=h||i,n=c||n,s=p||s,r=m||r,o=v||o,a=O||a,function(){const e=document.createElement("style");e.textContent=`\n .${o.wrapper} {\n padding: 10px;\n }\n\n .${o.title} {\n text-align: center;\n display: flex;\n justify-content: space-between;\n }\n\n .${o.meta} {\n font-size: 0.75rem;\n font-weight: 400;\n padding-top: 0.1rem;\n color: #666;\n }\n\n .${o.button} {\n cursor: pointer;\n }\n `,document.head.appendChild(e)}(),[...document.querySelectorAll("[data-manim-binder]")].forEach((t=>function(t){const i=t.getAttribute("data-manim-classname");if(!i)return void console.error("No manim classname provided.");const n=f("div",o.buttonWrapper);t.replaceWith(n);const s=f("button",o.button,"Make interactive");n.appendChild(s),s.addEventListener("click",(s=>{let r=t.textContent||"";r+="\n\n# don't remove below command for run button to work",r+=`\n%manim -qm -v WARNING ${i}`,function(t,i=""){const n=new ag({model:new wg({trusted:!0}),rendermime:new Ag({initialFactories:(d||(d=Zg.filter((t=>!t.mimeTypes.includes("text/latex")||void 0!==e&&e.MathJax))),d)})}),s=f("div",o.wrapper);t.replaceWith(s);const r=f("h4",o.title,"Try out manim!");s.appendChild(r);const l=f("span",o.meta,"Python 3 · via ");r.appendChild(l);const h=f("a","","Binder");h.setAttribute("href",a),l.appendChild(h);const c=f("div",o.cell);s.appendChild(c);const p=f("div",o.input);c.appendChild(p);const m=f("button",o.button,"Run");c.appendChild(m);const v=f("div",o.output);c.appendChild(v),Lf.sendMessage(n,fm.Msg.BeforeAttach),v.appendChild(n.node),Lf.sendMessage(n,fm.Msg.AfterAttach),n.model.changed.connect((()=>{v.querySelectorAll("video").forEach((e=>Kg(this,void 0,void 0,(function*(){console.log("fixing video");const t=e.getAttribute("src");if(!t)return void console.error("no src for the video.");e.style.maxWidth="100%";const i=yield u.get(t);if(!i.mimetype.startsWith("video/"))return void console.error("not a video");const n=atob(i.content),s=new ArrayBuffer(n.length),r=new Uint8Array(s);for(let e=0;e(g(n,O.state.doc.toString()),!0)},{key:"Ctrl-Enter",run:()=>(g(n,O.state.doc.toString()),!0)}]),zs.of([...Cc,...Dh])],parent:p});O.contentDOM.setAttribute("data-enable-grammarly","false"),O.dispatch({changes:{from:0,to:O.state.doc.length,insert:i.trim()}}),m.addEventListener("click",(e=>g(n,O.state.doc.toString())))}(n,r)}))}(t)))}}(window)})()})(); +//# sourceMappingURL=manim-binder.min.js.map diff --git a/docs/source/_static/manim-binder.min.js.LICENSE.txt b/docs/source/_static/manim-binder.min.js.LICENSE.txt new file mode 100644 index 0000000000..fe4c1fe307 --- /dev/null +++ b/docs/source/_static/manim-binder.min.js.LICENSE.txt @@ -0,0 +1,6 @@ +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ diff --git a/docs/source/_static/manim-binder.min.js.map b/docs/source/_static/manim-binder.min.js.map new file mode 100644 index 0000000000..25b36df03d --- /dev/null +++ b/docs/source/_static/manim-binder.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"manim-binder.min.js","mappings":";2DAGAA,OAAOC,eAAeC,EAAS,aAAc,CAAEC,OAAO,IACtDD,EAAQE,qBAAkB,EAC1B,MAAMC,EAAc,EAAQ,MAiE5BH,EAAQE,gBA7DR,MAII,WAAAE,CAAYC,GACRC,KAAKC,QAAU,EACfD,KAAKE,UAAY,EACjBF,KAAKG,aAAc,EACnBH,KAAKI,i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ACA,MACA,OACA,KACA,WACA,SACA,SACA,IACA,MACA,WACA,IACA,UACA,IACA,OACA,UACA,SACA,QACA,SACA,OACA,SACA,SACA,MACA,UACA,MACA,QACA,QACA,KACA,WACA,QACA,KACA,QACA,OACA,KACA,QACA,KACA,IACA,KACA,MACA,QACA,OAIJM,kBAAmB,CACf,IAAK,CACD,QACA,MACA,YACA,SACA,KACA,QACA,WACA,UACA,YACA,OACA,aACA,QACA,QACA,aAGJp7D,EAAG,CACC,YACA,SACA,OACA,WACA,OACA,MACA,QACA,WACA,SACA,QAEJ+8J,KAAM,CACF,YACA,MACA,SACA,OACA,SACA,QACA,YAGJ+P,MAAO,CACH,WACA,WACA,OACA,aACA,QACA,UACA,OAEJE,IAAK,CAAC,OACNr8H,WAAY,CAAC,QACbmgD,GAAI,CAAC,SACL7gD,OAAQ,CACJ,YACA,0BACA,6BACA,WACA,OACA,WACA,OACA,SAEJg9H,OAAQ,CAAC,SAAU,SACnB/E,QAAS,CAAC,SACVpgH,IAAK,CAAC,QAAS,OAAQ,UAAW,OAAQ,SAAU,SACpDqlH,SAAU,CAAC,QAAS,OAAQ,UAAW,OAAQ,SAAU,SACzDl9I,QAAS,CACL,UACA,UACA,WACA,OACA,QACA,aACA,QAEJttB,KAAM,CAAC,SACPygG,IAAK,CAAC,OAAQ,YACdxyD,QAAS,CAAC,QACVn0C,IAAK,CAAC,WACNo0C,IAAK,CAAC,SACNC,GAAI,CAAC,WACLC,SAAU,CAAC,YACX6rG,KAAM,CAAC,QAAS,OAAQ,QACxBzrG,KAAM,CACF,SACA,eACA,UACA,SACA,OACA,cAEJ1B,GAAI,CAAC,SACLC,GAAI,CAAC,SACLC,GAAI,CAAC,SACLC,GAAI,CAAC,SACLC,GAAI,CAAC,SACLC,GAAI,CAAC,SACLsB,GAAI,CAAC,QAAS,UAAW,OAAQ,SACjCk8H,OAAQ,CACJ,QACA,cACA,SACA,eACA,cACA,SAEJztG,IAAK,CACD,QACA,MACA,SACA,SACA,SACA,Q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AAG,IAEP,MAAME,EAAK,IAAIztG,GAAW,CACtBvuC,WAAY,CACRsgF,G7B0FL,IAAI/mB,GAAgB+1B,GAAgB,CACvCA,GAAe/3J,KAAK6gE,GAAG,CAAE6jJ,aAAcjtD,KACvCM,GAAe/3J,KAAK6gE,GAAG,CAAE6jJ,aAAc7sD,O6B1F/BiB,GACA1pC,KACA,KACA,MAAU,CACN,CACIj5H,IAAK,cACLo3F,IAAK,KACD5/D,EAAQy0L,EAAYqC,EAAGn9L,MAAMib,IAAIrkC,aAC1B,IAGf,CACI/H,IAAK,aACLo3F,IAAK,KACD5/D,EAAQy0L,EAAYqC,EAAGn9L,MAAMib,IAAIrkC,aAC1B,MAInB,MAAU,IAAI,MAAkB,MAEpCw/B,OAAQmmL,IAEZY,EAAG70H,WAAWrW,aAAa,wBAAyB,SAEpDkrI,EAAGjmH,SAAS,CACRr4B,QAAS,CACLjsE,KAAM,EACNC,GAAIsqN,EAAGn9L,MAAMib,IAAI5uC,OACjBm9B,OAAQ/9B,EAAKoxC,UAKrB2/K,EAAQltL,iBAAiB,SAFR9uB,GAAM6lB,EAAQy0L,EAAYqC,EAAGn9L,MAAMib,IAAIrkC,aAG5D,CAyGQymN,CAAWtB,EAAYtwN,EAAK,GAGpC,CAW+B6xN,CAA4BvD,IAC3D,CAEH,CA1SD,CA0SG/8L","sources":["webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+coreutils@6.0.7/node_modules/@jupyterlab/coreutils/lib/activitymonitor.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+coreutils@6.0.7/node_modules/@jupyterlab/coreutils/lib/index.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+coreutils@6.0.7/node_modules/@jupyterlab/coreutils/lib/interfaces.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+coreutils@6.0.7/node_modules/@jupyterlab/coreutils/lib/markdowncodeblocks.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+coreutils@6.0.7/node_modules/@jupyterlab/coreutils/lib/pageconfig.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+coreutils@6.0.7/node_modules/@jupyterlab/coreutils/lib/path.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+coreutils@6.0.7/node_modules/@jupyterlab/coreutils/lib/signal.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+coreutils@6.0.7/node_modules/@jupyterlab/coreutils/lib/text.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+coreutils@6.0.7/node_modules/@jupyterlab/coreutils/lib/time.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+coreutils@6.0.7/node_modules/@jupyterlab/coreutils/lib/url.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/basemanager.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/builder/index.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/config/index.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/contents/index.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/contents/validate.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/event/index.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/index.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/kernel/comm.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/kernel/default.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/kernel/future.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/kernel/index.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/kernel/kernel.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/kernel/manager.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/kernel/messages.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/kernel/restapi.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/kernel/serialize.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/kernel/validate.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/kernelspec/index.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/kernelspec/kernelspec.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/kernelspec/manager.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/kernelspec/restapi.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/kernelspec/validate.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/manager.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/nbconvert/index.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/serverconnection.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/session/default.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/session/index.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/session/manager.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/session/restapi.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/session/session.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/session/validate.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/setting/index.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/shim/ws.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/terminal/default.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/terminal/index.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/terminal/manager.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/terminal/restapi.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/terminal/terminal.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/user/index.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/validate.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+services@7.0.7_react@18.2.0/node_modules/@jupyterlab/services/lib/workspace/index.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+statedb@4.0.7/node_modules/@jupyterlab/statedb/lib/dataconnector.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+statedb@4.0.7/node_modules/@jupyterlab/statedb/lib/index.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+statedb@4.0.7/node_modules/@jupyterlab/statedb/lib/interfaces.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+statedb@4.0.7/node_modules/@jupyterlab/statedb/lib/restorablepool.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+statedb@4.0.7/node_modules/@jupyterlab/statedb/lib/statedb.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+statedb@4.0.7/node_modules/@jupyterlab/statedb/lib/tokens.js","webpack://manim-binder/./node_modules/.pnpm/@lumino+algorithm@2.0.1/node_modules/@lumino/algorithm/dist/index.es6.js","webpack://manim-binder/./node_modules/.pnpm/@lumino+coreutils@2.1.2/node_modules/@lumino/coreutils/dist/index.js","webpack://manim-binder/./node_modules/.pnpm/@lumino+disposable@2.1.2/node_modules/@lumino/disposable/dist/index.es6.js","webpack://manim-binder/./node_modules/.pnpm/@lumino+polling@2.1.2/node_modules/@lumino/polling/dist/index.es6.js","webpack://manim-binder/./node_modules/.pnpm/@lumino+properties@2.0.1/node_modules/@lumino/properties/dist/index.es6.js","webpack://manim-binder/./node_modules/.pnpm/@lumino+signaling@2.1.2/node_modules/@lumino/signaling/dist/index.es6.js","webpack://manim-binder/./node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js","webpack://manim-binder/./node_modules/.pnpm/dom-serializer@1.4.1/node_modules/dom-serializer/lib/foreignNames.js","webpack://manim-binder/./node_modules/.pnpm/dom-serializer@1.4.1/node_modules/dom-serializer/lib/index.js","webpack://manim-binder/./node_modules/.pnpm/domelementtype@2.3.0/node_modules/domelementtype/lib/index.js","webpack://manim-binder/./node_modules/.pnpm/domhandler@4.3.1/node_modules/domhandler/lib/index.js","webpack://manim-binder/./node_modules/.pnpm/domhandler@4.3.1/node_modules/domhandler/lib/node.js","webpack://manim-binder/./node_modules/.pnpm/domutils@2.8.0/node_modules/domutils/lib/feeds.js","webpack://manim-binder/./node_modules/.pnpm/domutils@2.8.0/node_modules/domutils/lib/helpers.js","webpack://manim-binder/./node_modules/.pnpm/domutils@2.8.0/node_modules/domutils/lib/index.js","webpack://manim-binder/./node_modules/.pnpm/domutils@2.8.0/node_modules/domutils/lib/legacy.js","webpack://manim-binder/./node_modules/.pnpm/domutils@2.8.0/node_modules/domutils/lib/manipulation.js","webpack://manim-binder/./node_modules/.pnpm/domutils@2.8.0/node_modules/domutils/lib/querying.js","webpack://manim-binder/./node_modules/.pnpm/domutils@2.8.0/node_modules/domutils/lib/stringify.js","webpack://manim-binder/./node_modules/.pnpm/domutils@2.8.0/node_modules/domutils/lib/traversal.js","webpack://manim-binder/./node_modules/.pnpm/entities@2.2.0/node_modules/entities/lib/decode.js","webpack://manim-binder/./node_modules/.pnpm/entities@2.2.0/node_modules/entities/lib/decode_codepoint.js","webpack://manim-binder/./node_modules/.pnpm/entities@2.2.0/node_modules/entities/lib/encode.js","webpack://manim-binder/./node_modules/.pnpm/entities@2.2.0/node_modules/entities/lib/index.js","webpack://manim-binder/./node_modules/.pnpm/escape-string-regexp@4.0.0/node_modules/escape-string-regexp/index.js","webpack://manim-binder/./node_modules/.pnpm/htmlparser2@6.1.0/node_modules/htmlparser2/lib/FeedHandler.js","webpack://manim-binder/./node_modules/.pnpm/htmlparser2@6.1.0/node_modules/htmlparser2/lib/Parser.js","webpack://manim-binder/./node_modules/.pnpm/htmlparser2@6.1.0/node_modules/htmlparser2/lib/Tokenizer.js","webpack://manim-binder/./node_modules/.pnpm/htmlparser2@6.1.0/node_modules/htmlparser2/lib/index.js","webpack://manim-binder/./node_modules/.pnpm/is-plain-object@5.0.0/node_modules/is-plain-object/dist/is-plain-object.js","webpack://manim-binder/./node_modules/.pnpm/lodash.escape@4.0.1/node_modules/lodash.escape/index.js","webpack://manim-binder/./node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/index.js","webpack://manim-binder/./node_modules/.pnpm/parse-srcset@1.0.2/node_modules/parse-srcset/src/parse-srcset.js","webpack://manim-binder/./node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.js","webpack://manim-binder/./node_modules/.pnpm/picocolors@1.0.0/node_modules/picocolors/picocolors.browser.js","webpack://manim-binder/./node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/at-rule.js","webpack://manim-binder/./node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/comment.js","webpack://manim-binder/./node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/container.js","webpack://manim-binder/./node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/css-syntax-error.js","webpack://manim-binder/./node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/declaration.js","webpack://manim-binder/./node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/document.js","webpack://manim-binder/./node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/fromJSON.js","webpack://manim-binder/./node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/input.js","webpack://manim-binder/./node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/lazy-result.js","webpack://manim-binder/./node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/list.js","webpack://manim-binder/./node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/map-generator.js","webpack://manim-binder/./node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/no-work-result.js","webpack://manim-binder/./node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/node.js","webpack://manim-binder/./node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/parse.js","webpack://manim-binder/./node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/parser.js","webpack://manim-binder/./node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/postcss.js","webpack://manim-binder/./node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/previous-map.js","webpack://manim-binder/./node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/processor.js","webpack://manim-binder/./node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/result.js","webpack://manim-binder/./node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/root.js","webpack://manim-binder/./node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/rule.js","webpack://manim-binder/./node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/stringifier.js","webpack://manim-binder/./node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/stringify.js","webpack://manim-binder/./node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/symbols.js","webpack://manim-binder/./node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/tokenize.js","webpack://manim-binder/./node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/warn-once.js","webpack://manim-binder/./node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/warning.js","webpack://manim-binder/./node_modules/.pnpm/querystringify@2.2.0/node_modules/querystringify/index.js","webpack://manim-binder/./node_modules/.pnpm/requires-port@1.0.0/node_modules/requires-port/index.js","webpack://manim-binder/./node_modules/.pnpm/sanitize-html@2.7.3/node_modules/sanitize-html/index.js","webpack://manim-binder/./node_modules/.pnpm/url-parse@1.5.10/node_modules/url-parse/index.js","webpack://manim-binder/./node_modules/.pnpm/nanoid@3.3.6/node_modules/nanoid/non-secure/index.cjs","webpack://manim-binder/webpack/bootstrap","webpack://manim-binder/webpack/runtime/compat get default export","webpack://manim-binder/webpack/runtime/define property getters","webpack://manim-binder/webpack/runtime/global","webpack://manim-binder/webpack/runtime/hasOwnProperty shorthand","webpack://manim-binder/webpack/runtime/make namespace object","webpack://manim-binder/./node_modules/.pnpm/@codemirror+state@6.3.1/node_modules/@codemirror/state/dist/index.js","webpack://manim-binder/./node_modules/.pnpm/style-mod@4.1.0/node_modules/style-mod/src/style-mod.js","webpack://manim-binder/./node_modules/.pnpm/w3c-keyname@2.2.8/node_modules/w3c-keyname/index.js","webpack://manim-binder/./node_modules/.pnpm/@codemirror+view@6.21.4/node_modules/@codemirror/view/dist/index.js","webpack://manim-binder/./node_modules/.pnpm/@lezer+common@1.1.0/node_modules/@lezer/common/dist/index.js","webpack://manim-binder/./node_modules/.pnpm/@lezer+highlight@1.1.6/node_modules/@lezer/highlight/dist/index.js","webpack://manim-binder/./node_modules/.pnpm/@codemirror+language@6.9.2/node_modules/@codemirror/language/dist/index.js","webpack://manim-binder/./node_modules/.pnpm/@codemirror+commands@6.3.0/node_modules/@codemirror/commands/dist/index.js","webpack://manim-binder/./node_modules/.pnpm/crelt@1.0.6/node_modules/crelt/index.js","webpack://manim-binder/./node_modules/.pnpm/@codemirror+search@6.5.4/node_modules/@codemirror/search/dist/index.js","webpack://manim-binder/./node_modules/.pnpm/@codemirror+autocomplete@6.10.2_@codemirror+language@6.9.2_@codemirror+state@6.3.1_@codemirro_qlo7c5orcxst6mqbb4ug325pdq/node_modules/@codemirror/autocomplete/dist/index.js","webpack://manim-binder/./node_modules/.pnpm/@codemirror+lint@6.4.2/node_modules/@codemirror/lint/dist/index.js","webpack://manim-binder/./node_modules/.pnpm/codemirror@6.0.1_@lezer+common@1.1.0/node_modules/codemirror/dist/index.js","webpack://manim-binder/./node_modules/.pnpm/@lezer+lr@1.3.13/node_modules/@lezer/lr/dist/index.js","webpack://manim-binder/./node_modules/.pnpm/@lezer+python@1.1.9/node_modules/@lezer/python/dist/index.js","webpack://manim-binder/./node_modules/.pnpm/@codemirror+lang-python@6.1.3_@codemirror+state@6.3.1_@codemirror+view@6.21.4_@lezer+common@1.1.0/node_modules/@codemirror/lang-python/dist/index.js","webpack://manim-binder/./node_modules/.pnpm/@codemirror+theme-one-dark@6.1.2/node_modules/@codemirror/theme-one-dark/dist/index.js","webpack://manim-binder/./node_modules/.pnpm/@lumino+domutils@2.0.1/node_modules/@lumino/domutils/dist/index.es6.js","webpack://manim-binder/./node_modules/.pnpm/@lumino+collections@2.0.1/node_modules/@lumino/collections/dist/index.es6.js","webpack://manim-binder/./node_modules/.pnpm/@lumino+messaging@2.0.1/node_modules/@lumino/messaging/dist/index.es6.js","webpack://manim-binder/./node_modules/.pnpm/@lumino+dragdrop@2.1.3/node_modules/@lumino/dragdrop/dist/index.es6.js","webpack://manim-binder/./node_modules/.pnpm/@lumino+keyboard@2.0.1/node_modules/@lumino/keyboard/dist/index.es6.js","webpack://manim-binder/./node_modules/.pnpm/@lumino+commands@2.1.3/node_modules/@lumino/commands/dist/index.es6.js","webpack://manim-binder/./node_modules/.pnpm/@lumino+virtualdom@2.0.1/node_modules/@lumino/virtualdom/dist/index.es6.js","webpack://manim-binder/./node_modules/.pnpm/@lumino+widgets@2.3.0/node_modules/@lumino/widgets/dist/index.es6.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+apputils@4.1.7/node_modules/@jupyterlab/apputils/lib/widgettracker.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+translation@4.0.7_react@18.2.0/node_modules/@jupyterlab/translation/lib/utils.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+translation@4.0.7_react@18.2.0/node_modules/@jupyterlab/translation/lib/gettext.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+translation@4.0.7_react@18.2.0/node_modules/@jupyterlab/translation/lib/base.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+translation@4.0.7_react@18.2.0/node_modules/@jupyterlab/translation/lib/tokens.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+outputarea@4.0.7_react@18.2.0/node_modules/@jupyterlab/outputarea/lib/widget.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+observables@5.0.7/node_modules/@jupyterlab/observables/lib/observablelist.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+observables@5.0.7/node_modules/@jupyterlab/observables/lib/observablemap.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+rendermime@4.0.7_react@18.2.0/node_modules/@jupyterlab/rendermime/lib/outputmodel.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+outputarea@4.0.7_react@18.2.0/node_modules/@jupyterlab/outputarea/lib/model.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+nbformat@4.0.7/node_modules/@jupyterlab/nbformat/lib/index.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+observables@5.0.7/node_modules/@jupyterlab/observables/lib/observablejson.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+apputils@4.1.7/node_modules/@jupyterlab/apputils/lib/sanitizer.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+rendermime@4.0.7_react@18.2.0/node_modules/@jupyterlab/rendermime/lib/mimemodel.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+rendermime@4.0.7_react@18.2.0/node_modules/@jupyterlab/rendermime/lib/registry.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+rendermime@4.0.7_react@18.2.0/node_modules/@jupyterlab/rendermime/lib/latex.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+rendermime@4.0.7_react@18.2.0/node_modules/@jupyterlab/rendermime/lib/renderers.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+rendermime@4.0.7_react@18.2.0/node_modules/@jupyterlab/rendermime/lib/widgets.js","webpack://manim-binder/./node_modules/.pnpm/@jupyterlab+rendermime@4.0.7_react@18.2.0/node_modules/@jupyterlab/rendermime/lib/factories.js","webpack://manim-binder/./src/main.ts"],"sourcesContent":["\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ActivityMonitor = void 0;\nconst signaling_1 = require(\"@lumino/signaling\");\n/**\n * A class that monitors activity on a signal.\n */\nclass ActivityMonitor {\n /**\n * Construct a new activity monitor.\n */\n constructor(options) {\n this._timer = -1;\n this._timeout = -1;\n this._isDisposed = false;\n this._activityStopped = new signaling_1.Signal(this);\n options.signal.connect(this._onSignalFired, this);\n this._timeout = options.timeout || 1000;\n }\n /**\n * A signal emitted when activity has ceased.\n */\n get activityStopped() {\n return this._activityStopped;\n }\n /**\n * The timeout associated with the monitor, in milliseconds.\n */\n get timeout() {\n return this._timeout;\n }\n set timeout(value) {\n this._timeout = value;\n }\n /**\n * Test whether the monitor has been disposed.\n *\n * #### Notes\n * This is a read-only property.\n */\n get isDisposed() {\n return this._isDisposed;\n }\n /**\n * Dispose of the resources used by the activity monitor.\n */\n dispose() {\n if (this._isDisposed) {\n return;\n }\n this._isDisposed = true;\n signaling_1.Signal.clearData(this);\n }\n /**\n * A signal handler for the monitored signal.\n */\n _onSignalFired(sender, args) {\n clearTimeout(this._timer);\n this._sender = sender;\n this._args = args;\n this._timer = setTimeout(() => {\n this._activityStopped.emit({\n sender: this._sender,\n args: this._args\n });\n }, this._timeout);\n }\n}\nexports.ActivityMonitor = ActivityMonitor;\n//# sourceMappingURL=activitymonitor.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/**\n * @packageDocumentation\n * @module coreutils\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./activitymonitor\"), exports);\n__exportStar(require(\"./interfaces\"), exports);\n__exportStar(require(\"./markdowncodeblocks\"), exports);\n__exportStar(require(\"./pageconfig\"), exports);\n__exportStar(require(\"./path\"), exports);\n__exportStar(require(\"./signal\"), exports);\n__exportStar(require(\"./text\"), exports);\n__exportStar(require(\"./time\"), exports);\n__exportStar(require(\"./url\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=interfaces.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MarkdownCodeBlocks = void 0;\n/**\n * The namespace for code block functions which help\n * in extract code from markdown text\n */\nvar MarkdownCodeBlocks;\n(function (MarkdownCodeBlocks) {\n MarkdownCodeBlocks.CODE_BLOCK_MARKER = '```';\n const markdownExtensions = [\n '.markdown',\n '.mdown',\n '.mkdn',\n '.md',\n '.mkd',\n '.mdwn',\n '.mdtxt',\n '.mdtext',\n '.text',\n '.txt',\n '.Rmd'\n ];\n class MarkdownCodeBlock {\n constructor(startLine) {\n this.startLine = startLine;\n this.code = '';\n this.endLine = -1;\n }\n }\n MarkdownCodeBlocks.MarkdownCodeBlock = MarkdownCodeBlock;\n /**\n * Check whether the given file extension is a markdown extension\n * @param extension - A file extension\n *\n * @returns true/false depending on whether this is a supported markdown extension\n */\n function isMarkdown(extension) {\n return markdownExtensions.indexOf(extension) > -1;\n }\n MarkdownCodeBlocks.isMarkdown = isMarkdown;\n /**\n * Construct all code snippets from current text\n * (this could be potentially optimized if we can cache and detect differences)\n * @param text - A string to parse codeblocks from\n *\n * @returns An array of MarkdownCodeBlocks.\n */\n function findMarkdownCodeBlocks(text) {\n if (!text || text === '') {\n return [];\n }\n const lines = text.split('\\n');\n const codeBlocks = [];\n let currentBlock = null;\n for (let lineIndex = 0; lineIndex < lines.length; lineIndex++) {\n const line = lines[lineIndex];\n const lineContainsMarker = line.indexOf(MarkdownCodeBlocks.CODE_BLOCK_MARKER) === 0;\n const constructingBlock = currentBlock != null;\n // Skip this line if it is not part of any code block and doesn't contain a marker.\n if (!lineContainsMarker && !constructingBlock) {\n continue;\n }\n // Check if we are already constructing a code block.\n if (!constructingBlock) {\n // Start constructing a new code block.\n currentBlock = new MarkdownCodeBlock(lineIndex);\n // Check whether this is a single line code block of the form ```a = 10```.\n const firstIndex = line.indexOf(MarkdownCodeBlocks.CODE_BLOCK_MARKER);\n const lastIndex = line.lastIndexOf(MarkdownCodeBlocks.CODE_BLOCK_MARKER);\n const isSingleLine = firstIndex !== lastIndex;\n if (isSingleLine) {\n currentBlock.code = line.substring(firstIndex + MarkdownCodeBlocks.CODE_BLOCK_MARKER.length, lastIndex);\n currentBlock.endLine = lineIndex;\n codeBlocks.push(currentBlock);\n currentBlock = null;\n }\n }\n else if (currentBlock) {\n if (lineContainsMarker) {\n // End of block, finish it up.\n currentBlock.endLine = lineIndex - 1;\n codeBlocks.push(currentBlock);\n currentBlock = null;\n }\n else {\n // Append the current line.\n currentBlock.code += line + '\\n';\n }\n }\n }\n return codeBlocks;\n }\n MarkdownCodeBlocks.findMarkdownCodeBlocks = findMarkdownCodeBlocks;\n})(MarkdownCodeBlocks = exports.MarkdownCodeBlocks || (exports.MarkdownCodeBlocks = {}));\n//# sourceMappingURL=markdowncodeblocks.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PageConfig = void 0;\nconst coreutils_1 = require(\"@lumino/coreutils\");\nconst minimist_1 = __importDefault(require(\"minimist\"));\nconst url_1 = require(\"./url\");\n/**\n * The namespace for `PageConfig` functions.\n */\nvar PageConfig;\n(function (PageConfig) {\n /**\n * Get global configuration data for the Jupyter application.\n *\n * @param name - The name of the configuration option.\n *\n * @returns The config value or an empty string if not found.\n *\n * #### Notes\n * All values are treated as strings.\n * For browser based applications, it is assumed that the page HTML\n * includes a script tag with the id `jupyter-config-data` containing the\n * configuration as valid JSON. In order to support the classic Notebook,\n * we fall back on checking for `body` data of the given `name`.\n *\n * For node applications, it is assumed that the process was launched\n * with a `--jupyter-config-data` option pointing to a JSON settings\n * file.\n */\n function getOption(name) {\n if (configData) {\n return configData[name] || getBodyData(name);\n }\n configData = Object.create(null);\n let found = false;\n // Use script tag if available.\n if (typeof document !== 'undefined' && document) {\n const el = document.getElementById('jupyter-config-data');\n if (el) {\n configData = JSON.parse(el.textContent || '');\n found = true;\n }\n }\n // Otherwise use CLI if given.\n if (!found && typeof process !== 'undefined' && process.argv) {\n try {\n const cli = (0, minimist_1.default)(process.argv.slice(2));\n const path = require('path');\n let fullPath = '';\n if ('jupyter-config-data' in cli) {\n fullPath = path.resolve(cli['jupyter-config-data']);\n }\n else if ('JUPYTER_CONFIG_DATA' in process.env) {\n fullPath = path.resolve(process.env['JUPYTER_CONFIG_DATA']);\n }\n if (fullPath) {\n // Force Webpack to ignore this require.\n // eslint-disable-next-line\n configData = eval('require')(fullPath);\n }\n }\n catch (e) {\n console.error(e);\n }\n }\n if (!coreutils_1.JSONExt.isObject(configData)) {\n configData = Object.create(null);\n }\n else {\n for (const key in configData) {\n // PageConfig expects strings\n if (typeof configData[key] !== 'string') {\n configData[key] = JSON.stringify(configData[key]);\n }\n }\n }\n return configData[name] || getBodyData(name);\n }\n PageConfig.getOption = getOption;\n /**\n * Set global configuration data for the Jupyter application.\n *\n * @param name - The name of the configuration option.\n * @param value - The value to set the option to.\n *\n * @returns The last config value or an empty string if it doesn't exist.\n */\n function setOption(name, value) {\n const last = getOption(name);\n configData[name] = value;\n return last;\n }\n PageConfig.setOption = setOption;\n /**\n * Get the base url for a Jupyter application, or the base url of the page.\n */\n function getBaseUrl() {\n return url_1.URLExt.normalize(getOption('baseUrl') || '/');\n }\n PageConfig.getBaseUrl = getBaseUrl;\n /**\n * Get the tree url for a JupyterLab application.\n */\n function getTreeUrl() {\n return url_1.URLExt.join(getBaseUrl(), getOption('treeUrl'));\n }\n PageConfig.getTreeUrl = getTreeUrl;\n /**\n * Get the base url for sharing links (usually baseUrl)\n */\n function getShareUrl() {\n return url_1.URLExt.normalize(getOption('shareUrl') || getBaseUrl());\n }\n PageConfig.getShareUrl = getShareUrl;\n /**\n * Get the tree url for shareable links.\n * Usually the same as treeUrl,\n * but overrideable e.g. when sharing with JupyterHub.\n */\n function getTreeShareUrl() {\n return url_1.URLExt.normalize(url_1.URLExt.join(getShareUrl(), getOption('treeUrl')));\n }\n PageConfig.getTreeShareUrl = getTreeShareUrl;\n /**\n * Create a new URL given an optional mode and tree path.\n *\n * This is used to create URLS when the mode or tree path change as the user\n * changes mode or the current document in the main area. If fields in\n * options are omitted, the value in PageConfig will be used.\n *\n * @param options - IGetUrlOptions for the new path.\n */\n function getUrl(options) {\n var _a, _b, _c, _d;\n let path = options.toShare ? getShareUrl() : getBaseUrl();\n const mode = (_a = options.mode) !== null && _a !== void 0 ? _a : getOption('mode');\n const workspace = (_b = options.workspace) !== null && _b !== void 0 ? _b : getOption('workspace');\n const labOrDoc = mode === 'single-document' ? 'doc' : 'lab';\n path = url_1.URLExt.join(path, labOrDoc);\n if (workspace !== PageConfig.defaultWorkspace) {\n path = url_1.URLExt.join(path, 'workspaces', encodeURIComponent((_c = getOption('workspace')) !== null && _c !== void 0 ? _c : PageConfig.defaultWorkspace));\n }\n const treePath = (_d = options.treePath) !== null && _d !== void 0 ? _d : getOption('treePath');\n if (treePath) {\n path = url_1.URLExt.join(path, 'tree', url_1.URLExt.encodeParts(treePath));\n }\n return path;\n }\n PageConfig.getUrl = getUrl;\n PageConfig.defaultWorkspace = 'default';\n /**\n * Get the base websocket url for a Jupyter application, or an empty string.\n */\n function getWsUrl(baseUrl) {\n let wsUrl = getOption('wsUrl');\n if (!wsUrl) {\n baseUrl = baseUrl ? url_1.URLExt.normalize(baseUrl) : getBaseUrl();\n if (baseUrl.indexOf('http') !== 0) {\n return '';\n }\n wsUrl = 'ws' + baseUrl.slice(4);\n }\n return url_1.URLExt.normalize(wsUrl);\n }\n PageConfig.getWsUrl = getWsUrl;\n /**\n * Returns the URL converting this notebook to a certain\n * format with nbconvert.\n */\n function getNBConvertURL({ path, format, download }) {\n const notebookPath = url_1.URLExt.encodeParts(path);\n const url = url_1.URLExt.join(getBaseUrl(), 'nbconvert', format, notebookPath);\n if (download) {\n return url + '?download=true';\n }\n return url;\n }\n PageConfig.getNBConvertURL = getNBConvertURL;\n /**\n * Get the authorization token for a Jupyter application.\n */\n function getToken() {\n return getOption('token') || getBodyData('jupyterApiToken');\n }\n PageConfig.getToken = getToken;\n /**\n * Get the Notebook version info [major, minor, patch].\n */\n function getNotebookVersion() {\n const notebookVersion = getOption('notebookVersion');\n if (notebookVersion === '') {\n return [0, 0, 0];\n }\n return JSON.parse(notebookVersion);\n }\n PageConfig.getNotebookVersion = getNotebookVersion;\n /**\n * Private page config data for the Jupyter application.\n */\n let configData = null;\n /**\n * Get a url-encoded item from `body.data` and decode it\n * We should never have any encoded URLs anywhere else in code\n * until we are building an actual request.\n */\n function getBodyData(key) {\n if (typeof document === 'undefined' || !document.body) {\n return '';\n }\n const val = document.body.dataset[key];\n if (typeof val === 'undefined') {\n return '';\n }\n return decodeURIComponent(val);\n }\n /**\n * The namespace for page config `Extension` functions.\n */\n let Extension;\n (function (Extension) {\n /**\n * Populate an array from page config.\n *\n * @param key - The page config key (e.g., `deferredExtensions`).\n *\n * #### Notes\n * This is intended for `deferredExtensions` and `disabledExtensions`.\n */\n function populate(key) {\n try {\n const raw = getOption(key);\n if (raw) {\n return JSON.parse(raw);\n }\n }\n catch (error) {\n console.warn(`Unable to parse ${key}.`, error);\n }\n return [];\n }\n /**\n * The collection of deferred extensions in page config.\n */\n Extension.deferred = populate('deferredExtensions');\n /**\n * The collection of disabled extensions in page config.\n */\n Extension.disabled = populate('disabledExtensions');\n /**\n * Returns whether a plugin is deferred.\n *\n * @param id - The plugin ID.\n */\n function isDeferred(id) {\n // Check for either a full plugin id match or an extension\n // name match.\n const separatorIndex = id.indexOf(':');\n let extName = '';\n if (separatorIndex !== -1) {\n extName = id.slice(0, separatorIndex);\n }\n return Extension.deferred.some(val => val === id || (extName && val === extName));\n }\n Extension.isDeferred = isDeferred;\n /**\n * Returns whether a plugin is disabled.\n *\n * @param id - The plugin ID.\n */\n function isDisabled(id) {\n // Check for either a full plugin id match or an extension\n // name match.\n const separatorIndex = id.indexOf(':');\n let extName = '';\n if (separatorIndex !== -1) {\n extName = id.slice(0, separatorIndex);\n }\n return Extension.disabled.some(val => val === id || (extName && val === extName));\n }\n Extension.isDisabled = isDisabled;\n })(Extension = PageConfig.Extension || (PageConfig.Extension = {}));\n})(PageConfig = exports.PageConfig || (exports.PageConfig = {}));\n//# sourceMappingURL=pageconfig.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PathExt = void 0;\nconst path_1 = require(\"path\");\n/**\n * The namespace for path-related functions.\n *\n * Note that Jupyter server paths do not start with a leading slash.\n */\nvar PathExt;\n(function (PathExt) {\n /**\n * Join all arguments together and normalize the resulting path.\n * Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown.\n *\n * @param paths - The string paths to join.\n */\n function join(...paths) {\n const path = path_1.posix.join(...paths);\n return path === '.' ? '' : removeSlash(path);\n }\n PathExt.join = join;\n /**\n * Return the last portion of a path. Similar to the Unix basename command.\n * Often used to extract the file name from a fully qualified path.\n *\n * @param path - The path to evaluate.\n *\n * @param ext - An extension to remove from the result.\n */\n function basename(path, ext) {\n return path_1.posix.basename(path, ext);\n }\n PathExt.basename = basename;\n /**\n * Get the directory name of a path, similar to the Unix dirname command.\n * When an empty path is given, returns the root path.\n *\n * @param path - The file path.\n */\n function dirname(path) {\n const dir = removeSlash(path_1.posix.dirname(path));\n return dir === '.' ? '' : dir;\n }\n PathExt.dirname = dirname;\n /**\n * Get the extension of the path.\n *\n * @param path - The file path.\n *\n * @returns the extension of the file.\n *\n * #### Notes\n * The extension is the string from the last occurrence of the `.`\n * character to end of string in the last portion of the path, inclusive.\n * If there is no `.` in the last portion of the path, or if the first\n * character of the basename of path [[basename]] is `.`, then an\n * empty string is returned.\n */\n function extname(path) {\n return path_1.posix.extname(path);\n }\n PathExt.extname = extname;\n /**\n * Normalize a string path, reducing '..' and '.' parts.\n * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.\n * When an empty path is given, returns the root path.\n *\n * @param path - The string path to normalize.\n */\n function normalize(path) {\n if (path === '') {\n return '';\n }\n return removeSlash(path_1.posix.normalize(path));\n }\n PathExt.normalize = normalize;\n /**\n * Resolve a sequence of paths or path segments into an absolute path.\n * The root path in the application has no leading slash, so it is removed.\n *\n * @param parts - The paths to join.\n *\n * #### Notes\n * The right-most parameter is considered \\{to\\}. Other parameters are considered an array of \\{from\\}.\n *\n * Starting from leftmost \\{from\\} parameter, resolves \\{to\\} to an absolute path.\n *\n * If \\{to\\} isn't already absolute, \\{from\\} arguments are prepended in right to left order, until an absolute path is found. If after using all \\{from\\} paths still no absolute path is found, the current working directory is used as well. The resulting path is normalized, and trailing slashes are removed unless the path gets resolved to the root directory.\n */\n function resolve(...parts) {\n return removeSlash(path_1.posix.resolve(...parts));\n }\n PathExt.resolve = resolve;\n /**\n * Solve the relative path from \\{from\\} to \\{to\\}.\n *\n * @param from - The source path.\n *\n * @param to - The target path.\n *\n * #### Notes\n * If from and to each resolve to the same path (after calling\n * path.resolve() on each), a zero-length string is returned.\n * If a zero-length string is passed as from or to, `/`\n * will be used instead of the zero-length strings.\n */\n function relative(from, to) {\n return removeSlash(path_1.posix.relative(from, to));\n }\n PathExt.relative = relative;\n /**\n * Normalize a file extension to be of the type `'.foo'`.\n *\n * @param extension - the file extension.\n *\n * #### Notes\n * Adds a leading dot if not present and converts to lower case.\n */\n function normalizeExtension(extension) {\n if (extension.length > 0 && extension.indexOf('.') !== 0) {\n extension = `.${extension}`;\n }\n return extension;\n }\n PathExt.normalizeExtension = normalizeExtension;\n /**\n * Remove the leading slash from a path.\n *\n * @param path: the path from which to remove a leading slash.\n */\n function removeSlash(path) {\n if (path.indexOf('/') === 0) {\n path = path.slice(1);\n }\n return path;\n }\n PathExt.removeSlash = removeSlash;\n})(PathExt = exports.PathExt || (exports.PathExt = {}));\n//# sourceMappingURL=path.js.map","\"use strict\";\n/*\n * Copyright (c) Jupyter Development Team.\n * Distributed under the terms of the Modified BSD License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.signalToPromise = void 0;\nconst coreutils_1 = require(\"@lumino/coreutils\");\n/**\n * Convert a signal into a promise for the first emitted value.\n *\n * @param signal - The signal we are listening to.\n * @param timeout - Timeout to wait for signal in ms (not timeout if not defined or 0)\n *\n * @returns a Promise that resolves with a `(sender, args)` pair.\n */\nfunction signalToPromise(signal, timeout) {\n const waitForSignal = new coreutils_1.PromiseDelegate();\n function cleanup() {\n signal.disconnect(slot);\n }\n function slot(sender, args) {\n cleanup();\n waitForSignal.resolve([sender, args]);\n }\n signal.connect(slot);\n if ((timeout !== null && timeout !== void 0 ? timeout : 0) > 0) {\n setTimeout(() => {\n cleanup();\n waitForSignal.reject(`Signal not emitted within ${timeout} ms.`);\n }, timeout);\n }\n return waitForSignal.promise;\n}\nexports.signalToPromise = signalToPromise;\n//# sourceMappingURL=signal.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Text = void 0;\n/**\n * The namespace for text-related functions.\n */\nvar Text;\n(function (Text) {\n // javascript stores text as utf16 and string indices use \"code units\",\n // which stores high-codepoint characters as \"surrogate pairs\",\n // which occupy two indices in the javascript string.\n // We need to translate cursor_pos in the Jupyter protocol (in characters)\n // to js offset (with surrogate pairs taking two spots).\n const HAS_SURROGATES = '𝐚'.length > 1;\n /**\n * Convert a javascript string index into a unicode character offset\n *\n * @param jsIdx - The javascript string index (counting surrogate pairs)\n *\n * @param text - The text in which the offset is calculated\n *\n * @returns The unicode character offset\n */\n function jsIndexToCharIndex(jsIdx, text) {\n if (HAS_SURROGATES) {\n // not using surrogates, nothing to do\n return jsIdx;\n }\n let charIdx = jsIdx;\n for (let i = 0; i + 1 < text.length && i < jsIdx; i++) {\n const charCode = text.charCodeAt(i);\n // check for surrogate pair\n if (charCode >= 0xd800 && charCode <= 0xdbff) {\n const nextCharCode = text.charCodeAt(i + 1);\n if (nextCharCode >= 0xdc00 && nextCharCode <= 0xdfff) {\n charIdx--;\n i++;\n }\n }\n }\n return charIdx;\n }\n Text.jsIndexToCharIndex = jsIndexToCharIndex;\n /**\n * Convert a unicode character offset to a javascript string index.\n *\n * @param charIdx - The index in unicode characters\n *\n * @param text - The text in which the offset is calculated\n *\n * @returns The js-native index\n */\n function charIndexToJsIndex(charIdx, text) {\n if (HAS_SURROGATES) {\n // not using surrogates, nothing to do\n return charIdx;\n }\n let jsIdx = charIdx;\n for (let i = 0; i + 1 < text.length && i < jsIdx; i++) {\n const charCode = text.charCodeAt(i);\n // check for surrogate pair\n if (charCode >= 0xd800 && charCode <= 0xdbff) {\n const nextCharCode = text.charCodeAt(i + 1);\n if (nextCharCode >= 0xdc00 && nextCharCode <= 0xdfff) {\n jsIdx++;\n i++;\n }\n }\n }\n return jsIdx;\n }\n Text.charIndexToJsIndex = charIndexToJsIndex;\n /**\n * Given a 'snake-case', 'snake_case', 'snake:case', or\n * 'snake case' string, will return the camel case version: 'snakeCase'.\n *\n * @param str: the snake-case input string.\n *\n * @param upper: default = false. If true, the first letter of the\n * returned string will be capitalized.\n *\n * @returns the camel case version of the input string.\n */\n function camelCase(str, upper = false) {\n return str.replace(/^(\\w)|[\\s-_:]+(\\w)/g, function (match, p1, p2) {\n if (p2) {\n return p2.toUpperCase();\n }\n else {\n return upper ? p1.toUpperCase() : p1.toLowerCase();\n }\n });\n }\n Text.camelCase = camelCase;\n /**\n * Given a string, title case the words in the string.\n *\n * @param str: the string to title case.\n *\n * @returns the same string, but with each word capitalized.\n */\n function titleCase(str) {\n return (str || '')\n .toLowerCase()\n .split(' ')\n .map(word => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ');\n }\n Text.titleCase = titleCase;\n})(Text = exports.Text || (exports.Text = {}));\n//# sourceMappingURL=text.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Time = void 0;\n/**\n * A list of time units with their associated value in milliseconds.\n */\nconst UNITS = [\n { name: 'years', milliseconds: 365 * 24 * 60 * 60 * 1000 },\n { name: 'months', milliseconds: 30 * 24 * 60 * 60 * 1000 },\n { name: 'days', milliseconds: 24 * 60 * 60 * 1000 },\n { name: 'hours', milliseconds: 60 * 60 * 1000 },\n { name: 'minutes', milliseconds: 60 * 1000 },\n { name: 'seconds', milliseconds: 1000 }\n];\n/**\n * The namespace for date functions.\n */\nvar Time;\n(function (Time) {\n /**\n * Convert a timestring to a human readable string (e.g. 'two minutes ago').\n *\n * @param value - The date timestring or date object.\n *\n * @returns A formatted date.\n */\n function formatHuman(value) {\n const lang = document.documentElement.lang || 'en';\n const formatter = new Intl.RelativeTimeFormat(lang, { numeric: 'auto' });\n const delta = new Date(value).getTime() - Date.now();\n for (let unit of UNITS) {\n const amount = Math.ceil(delta / unit.milliseconds);\n if (amount === 0) {\n continue;\n }\n return formatter.format(amount, unit.name);\n }\n return formatter.format(0, 'seconds');\n }\n Time.formatHuman = formatHuman;\n /**\n * Convenient helper to convert a timestring to a date format.\n *\n * @param value - The date timestring or date object.\n *\n * @returns A formatted date.\n */\n function format(value) {\n const lang = document.documentElement.lang || 'en';\n const formatter = new Intl.DateTimeFormat(lang, {\n dateStyle: 'short',\n timeStyle: 'short'\n });\n return formatter.format(new Date(value));\n }\n Time.format = format;\n})(Time = exports.Time || (exports.Time = {}));\n//# sourceMappingURL=time.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.URLExt = void 0;\nconst path_1 = require(\"path\");\nconst url_parse_1 = __importDefault(require(\"url-parse\"));\n/**\n * The namespace for URL-related functions.\n */\nvar URLExt;\n(function (URLExt) {\n /**\n * Parse a url into a URL object.\n *\n * @param urlString - The URL string to parse.\n *\n * @returns A URL object.\n */\n function parse(url) {\n if (typeof document !== 'undefined' && document) {\n const a = document.createElement('a');\n a.href = url;\n return a;\n }\n return (0, url_parse_1.default)(url);\n }\n URLExt.parse = parse;\n /**\n * Parse URL and retrieve hostname\n *\n * @param url - The URL string to parse\n *\n * @returns a hostname string value\n */\n function getHostName(url) {\n return (0, url_parse_1.default)(url).hostname;\n }\n URLExt.getHostName = getHostName;\n function normalize(url) {\n return url && parse(url).toString();\n }\n URLExt.normalize = normalize;\n /**\n * Join a sequence of url components and normalizes as in node `path.join`.\n *\n * @param parts - The url components.\n *\n * @returns the joined url.\n */\n function join(...parts) {\n let u = (0, url_parse_1.default)(parts[0], {});\n // Schema-less URL can be only parsed as relative to a base URL\n // see https://github.com/unshiftio/url-parse/issues/219#issuecomment-1002219326\n const isSchemaLess = u.protocol === '' && u.slashes;\n if (isSchemaLess) {\n u = (0, url_parse_1.default)(parts[0], 'https:' + parts[0]);\n }\n const prefix = `${isSchemaLess ? '' : u.protocol}${u.slashes ? '//' : ''}${u.auth}${u.auth ? '@' : ''}${u.host}`;\n // If there was a prefix, then the first path must start at the root.\n const path = path_1.posix.join(`${!!prefix && u.pathname[0] !== '/' ? '/' : ''}${u.pathname}`, ...parts.slice(1));\n return `${prefix}${path === '.' ? '' : path}`;\n }\n URLExt.join = join;\n /**\n * Encode the components of a multi-segment url.\n *\n * @param url - The url to encode.\n *\n * @returns the encoded url.\n *\n * #### Notes\n * Preserves the `'/'` separators.\n * Should not include the base url, since all parts are escaped.\n */\n function encodeParts(url) {\n return join(...url.split('/').map(encodeURIComponent));\n }\n URLExt.encodeParts = encodeParts;\n /**\n * Return a serialized object string suitable for a query.\n *\n * @param object - The source object.\n *\n * @returns an encoded url query.\n *\n * #### Notes\n * Modified version of [stackoverflow](http://stackoverflow.com/a/30707423).\n */\n function objectToQueryString(value) {\n const keys = Object.keys(value).filter(key => key.length > 0);\n if (!keys.length) {\n return '';\n }\n return ('?' +\n keys\n .map(key => {\n const content = encodeURIComponent(String(value[key]));\n return key + (content ? '=' + content : '');\n })\n .join('&'));\n }\n URLExt.objectToQueryString = objectToQueryString;\n /**\n * Return a parsed object that represents the values in a query string.\n */\n function queryStringToObject(value) {\n return value\n .replace(/^\\?/, '')\n .split('&')\n .reduce((acc, val) => {\n const [key, value] = val.split('=');\n if (key.length > 0) {\n acc[key] = decodeURIComponent(value || '');\n }\n return acc;\n }, {});\n }\n URLExt.queryStringToObject = queryStringToObject;\n /**\n * Test whether the url is a local url.\n *\n * #### Notes\n * This function returns `false` for any fully qualified url, including\n * `data:`, `file:`, and `//` protocol URLs.\n */\n function isLocal(url) {\n const { protocol } = parse(url);\n return ((!protocol || url.toLowerCase().indexOf(protocol) !== 0) &&\n url.indexOf('/') !== 0);\n }\n URLExt.isLocal = isLocal;\n})(URLExt = exports.URLExt || (exports.URLExt = {}));\n//# sourceMappingURL=url.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BaseManager = void 0;\nconst signaling_1 = require(\"@lumino/signaling\");\nconst serverconnection_1 = require(\"./serverconnection\");\nclass BaseManager {\n constructor(options) {\n var _a;\n this._isDisposed = false;\n this._disposed = new signaling_1.Signal(this);\n this.serverSettings =\n (_a = options.serverSettings) !== null && _a !== void 0 ? _a : serverconnection_1.ServerConnection.makeSettings();\n }\n /**\n * A signal emitted when the delegate is disposed.\n */\n get disposed() {\n return this._disposed;\n }\n /**\n * Test whether the delegate has been disposed.\n */\n get isDisposed() {\n return this._isDisposed;\n }\n /**\n * Whether the manager is active.\n */\n get isActive() {\n return true;\n }\n /**\n * Dispose of the delegate and invoke the callback function.\n */\n dispose() {\n if (this.isDisposed) {\n return;\n }\n this._disposed.emit(undefined);\n signaling_1.Signal.clearData(this);\n }\n}\nexports.BaseManager = BaseManager;\n//# sourceMappingURL=basemanager.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BuildManager = void 0;\nconst coreutils_1 = require(\"@jupyterlab/coreutils\");\nconst serverconnection_1 = require(\"../serverconnection\");\n/**\n * The url for the lab build service.\n */\nconst BUILD_SETTINGS_URL = 'api/build';\n/**\n * The build API service manager.\n */\nclass BuildManager {\n /**\n * Create a new setting manager.\n */\n constructor(options = {}) {\n var _a;\n this._url = '';\n this.serverSettings =\n (_a = options.serverSettings) !== null && _a !== void 0 ? _a : serverconnection_1.ServerConnection.makeSettings();\n const { baseUrl, appUrl } = this.serverSettings;\n this._url = coreutils_1.URLExt.join(baseUrl, appUrl, BUILD_SETTINGS_URL);\n }\n /**\n * Test whether the build service is available.\n */\n get isAvailable() {\n return coreutils_1.PageConfig.getOption('buildAvailable').toLowerCase() === 'true';\n }\n /**\n * Test whether to check build status automatically.\n */\n get shouldCheck() {\n return coreutils_1.PageConfig.getOption('buildCheck').toLowerCase() === 'true';\n }\n /**\n * Get whether the application should be built.\n */\n getStatus() {\n const { _url, serverSettings } = this;\n const promise = serverconnection_1.ServerConnection.makeRequest(_url, {}, serverSettings);\n return promise\n .then(response => {\n if (response.status !== 200) {\n throw new serverconnection_1.ServerConnection.ResponseError(response);\n }\n return response.json();\n })\n .then(data => {\n if (typeof data.status !== 'string') {\n throw new Error('Invalid data');\n }\n if (typeof data.message !== 'string') {\n throw new Error('Invalid data');\n }\n return data;\n });\n }\n /**\n * Build the application.\n */\n build() {\n const { _url, serverSettings } = this;\n const init = { method: 'POST' };\n const promise = serverconnection_1.ServerConnection.makeRequest(_url, init, serverSettings);\n return promise.then(response => {\n if (response.status === 400) {\n throw new serverconnection_1.ServerConnection.ResponseError(response, 'Build aborted');\n }\n if (response.status !== 200) {\n const message = `Build failed with ${response.status}.\n\n If you are experiencing the build failure after installing an extension (or trying to include previously installed extension after updating JupyterLab) please check the extension repository for new installation instructions as many extensions migrated to the prebuilt extensions system which no longer requires rebuilding JupyterLab (but uses a different installation procedure, typically involving a package manager such as 'pip' or 'conda').\n\n If you specifically intended to install a source extension, please run 'jupyter lab build' on the server for full output.`;\n throw new serverconnection_1.ServerConnection.ResponseError(response, message);\n }\n });\n }\n /**\n * Cancel an active build.\n */\n cancel() {\n const { _url, serverSettings } = this;\n const init = { method: 'DELETE' };\n const promise = serverconnection_1.ServerConnection.makeRequest(_url, init, serverSettings);\n return promise.then(response => {\n if (response.status !== 204) {\n throw new serverconnection_1.ServerConnection.ResponseError(response);\n }\n });\n }\n}\nexports.BuildManager = BuildManager;\n//# sourceMappingURL=index.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ConfigWithDefaults = exports.ConfigSection = void 0;\nconst coreutils_1 = require(\"@jupyterlab/coreutils\");\nconst __1 = require(\"..\");\n/**\n * The url for the config service.\n */\nconst SERVICE_CONFIG_URL = 'api/config';\n/**\n * The namespace for ConfigSection statics.\n */\nvar ConfigSection;\n(function (ConfigSection) {\n /**\n * Create a config section.\n *\n * @returns A Promise that is fulfilled with the config section is loaded.\n */\n function create(options) {\n const section = new DefaultConfigSection(options);\n return section.load().then(() => {\n return section;\n });\n }\n ConfigSection.create = create;\n})(ConfigSection = exports.ConfigSection || (exports.ConfigSection = {}));\n/**\n * Implementation of the Configurable data section.\n */\nclass DefaultConfigSection {\n /**\n * Construct a new config section.\n */\n constructor(options) {\n var _a;\n this._url = 'unknown';\n const settings = (this.serverSettings =\n (_a = options.serverSettings) !== null && _a !== void 0 ? _a : __1.ServerConnection.makeSettings());\n this._url = coreutils_1.URLExt.join(settings.baseUrl, SERVICE_CONFIG_URL, encodeURIComponent(options.name));\n }\n /**\n * Get the data for this section.\n */\n get data() {\n return this._data;\n }\n /**\n * Load the initial data for this section.\n *\n * #### Notes\n * Uses the [Jupyter Notebook API](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter-server/jupyter_server/main/jupyter_server/services/api/api.yaml#!/config).\n *\n * The promise is fulfilled on a valid response and rejected otherwise.\n */\n async load() {\n const response = await __1.ServerConnection.makeRequest(this._url, {}, this.serverSettings);\n if (response.status !== 200) {\n const err = await __1.ServerConnection.ResponseError.create(response);\n throw err;\n }\n this._data = await response.json();\n }\n /**\n * Modify the stored config values.\n *\n * #### Notes\n * Uses the [Jupyter Notebook API](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter-server/jupyter_server/main/jupyter_server/services/api/api.yaml#!/config).\n *\n * The promise is fulfilled on a valid response and rejected otherwise.\n *\n * Updates the local data immediately, sends the change to the server,\n * and updates the local data with the response, and fulfils the promise\n * with that data.\n */\n async update(newdata) {\n this._data = { ...this._data, ...newdata };\n const init = {\n method: 'PATCH',\n body: JSON.stringify(newdata)\n };\n const response = await __1.ServerConnection.makeRequest(this._url, init, this.serverSettings);\n if (response.status !== 200) {\n const err = await __1.ServerConnection.ResponseError.create(response);\n throw err;\n }\n this._data = await response.json();\n return this._data;\n }\n}\n/**\n * Configurable object with defaults.\n */\nclass ConfigWithDefaults {\n /**\n * Create a new config with defaults.\n */\n constructor(options) {\n var _a, _b;\n this._className = '';\n this._section = options.section;\n this._defaults = (_a = options.defaults) !== null && _a !== void 0 ? _a : {};\n this._className = (_b = options.className) !== null && _b !== void 0 ? _b : '';\n }\n /**\n * Get data from the config section or fall back to defaults.\n */\n get(key) {\n const data = this._classData();\n return key in data ? data[key] : this._defaults[key];\n }\n /**\n * Set a config value.\n *\n * #### Notes\n * Uses the [Jupyter Notebook API](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter-server/jupyter_server/main/jupyter_server/services/api/api.yaml#!/config).\n *\n * The promise is fulfilled on a valid response and rejected otherwise.\n *\n * Sends the update to the server, and changes our local copy of the data\n * immediately.\n */\n set(key, value) {\n const d = {};\n d[key] = value;\n if (this._className) {\n const d2 = {};\n d2[this._className] = d;\n return this._section.update(d2);\n }\n else {\n return this._section.update(d);\n }\n }\n /**\n * Get data from the Section with our classname, if available.\n *\n * #### Notes\n * If we have no classname, get all of the data in the Section\n */\n _classData() {\n const data = this._section.data;\n if (this._className && this._className in data) {\n return data[this._className];\n }\n return data;\n }\n}\nexports.ConfigWithDefaults = ConfigWithDefaults;\n//# sourceMappingURL=index.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Drive = exports.ContentsManager = exports.Contents = void 0;\nconst coreutils_1 = require(\"@jupyterlab/coreutils\");\nconst signaling_1 = require(\"@lumino/signaling\");\nconst __1 = require(\"..\");\nconst validate = __importStar(require(\"./validate\"));\n/**\n * The url for the default drive service.\n */\nconst SERVICE_DRIVE_URL = 'api/contents';\n/**\n * The url for the file access.\n */\nconst FILES_URL = 'files';\n/**\n * A namespace for contents interfaces.\n */\nvar Contents;\n(function (Contents) {\n /**\n * Validates an IModel, throwing an error if it does not pass.\n */\n function validateContentsModel(contents) {\n validate.validateContentsModel(contents);\n }\n Contents.validateContentsModel = validateContentsModel;\n /**\n * Validates an ICheckpointModel, throwing an error if it does not pass.\n */\n function validateCheckpointModel(checkpoint) {\n validate.validateCheckpointModel(checkpoint);\n }\n Contents.validateCheckpointModel = validateCheckpointModel;\n})(Contents = exports.Contents || (exports.Contents = {}));\n/**\n * A contents manager that passes file operations to the server.\n * Multiple servers implementing the `IDrive` interface can be\n * attached to the contents manager, so that the same session can\n * perform file operations on multiple backends.\n *\n * This includes checkpointing with the normal file operations.\n */\nclass ContentsManager {\n /**\n * Construct a new contents manager object.\n *\n * @param options - The options used to initialize the object.\n */\n constructor(options = {}) {\n var _a, _b;\n this._isDisposed = false;\n this._additionalDrives = new Map();\n this._fileChanged = new signaling_1.Signal(this);\n const serverSettings = (this.serverSettings =\n (_a = options.serverSettings) !== null && _a !== void 0 ? _a : __1.ServerConnection.makeSettings());\n this._defaultDrive = (_b = options.defaultDrive) !== null && _b !== void 0 ? _b : new Drive({ serverSettings });\n this._defaultDrive.fileChanged.connect(this._onFileChanged, this);\n }\n /**\n * A signal emitted when a file operation takes place.\n */\n get fileChanged() {\n return this._fileChanged;\n }\n /**\n * Test whether the manager has been disposed.\n */\n get isDisposed() {\n return this._isDisposed;\n }\n /**\n * Dispose of the resources held by the manager.\n */\n dispose() {\n if (this.isDisposed) {\n return;\n }\n this._isDisposed = true;\n signaling_1.Signal.clearData(this);\n }\n /**\n * Add an `IDrive` to the manager.\n */\n addDrive(drive) {\n this._additionalDrives.set(drive.name, drive);\n drive.fileChanged.connect(this._onFileChanged, this);\n }\n /**\n * Given a path, get a shared model factory from the\n * relevant backend. Returns `null` if the backend\n * does not provide one.\n */\n getSharedModelFactory(path) {\n var _a;\n const [drive] = this._driveForPath(path);\n return (_a = drive === null || drive === void 0 ? void 0 : drive.sharedModelFactory) !== null && _a !== void 0 ? _a : null;\n }\n /**\n * Given a path of the form `drive:local/portion/of/it.txt`\n * get the local part of it.\n *\n * @param path: the path.\n *\n * @returns The local part of the path.\n */\n localPath(path) {\n const parts = path.split('/');\n const firstParts = parts[0].split(':');\n if (firstParts.length === 1 || !this._additionalDrives.has(firstParts[0])) {\n return coreutils_1.PathExt.removeSlash(path);\n }\n return coreutils_1.PathExt.join(firstParts.slice(1).join(':'), ...parts.slice(1));\n }\n /**\n * Normalize a global path. Reduces '..' and '.' parts, and removes\n * leading slashes from the local part of the path, while retaining\n * the drive name if it exists.\n *\n * @param path: the path.\n *\n * @returns The normalized path.\n */\n normalize(path) {\n const parts = path.split(':');\n if (parts.length === 1) {\n return coreutils_1.PathExt.normalize(path);\n }\n return `${parts[0]}:${coreutils_1.PathExt.normalize(parts.slice(1).join(':'))}`;\n }\n /**\n * Resolve a global path, starting from the root path. Behaves like\n * posix-path.resolve, with 3 differences:\n * - will never prepend cwd\n * - if root has a drive name, the result is prefixed with \":\"\n * - before adding drive name, leading slashes are removed\n *\n * @param path: the path.\n *\n * @returns The normalized path.\n */\n resolvePath(root, path) {\n const driveName = this.driveName(root);\n const localPath = this.localPath(root);\n const resolved = coreutils_1.PathExt.resolve('/', localPath, path);\n return driveName ? `${driveName}:${resolved}` : resolved;\n }\n /**\n * Given a path of the form `drive:local/portion/of/it.txt`\n * get the name of the drive. If the path is missing\n * a drive portion, returns an empty string.\n *\n * @param path: the path.\n *\n * @returns The drive name for the path, or the empty string.\n */\n driveName(path) {\n const parts = path.split('/');\n const firstParts = parts[0].split(':');\n if (firstParts.length === 1) {\n return '';\n }\n if (this._additionalDrives.has(firstParts[0])) {\n return firstParts[0];\n }\n return '';\n }\n /**\n * Get a file or directory.\n *\n * @param path: The path to the file.\n *\n * @param options: The options used to fetch the file.\n *\n * @returns A promise which resolves with the file content.\n */\n get(path, options) {\n const [drive, localPath] = this._driveForPath(path);\n return drive.get(localPath, options).then(contentsModel => {\n const listing = [];\n if (contentsModel.type === 'directory' && contentsModel.content) {\n for (const item of contentsModel.content) {\n listing.push({ ...item, path: this._toGlobalPath(drive, item.path) });\n }\n return {\n ...contentsModel,\n path: this._toGlobalPath(drive, localPath),\n content: listing,\n serverPath: contentsModel.path\n };\n }\n else {\n return {\n ...contentsModel,\n path: this._toGlobalPath(drive, localPath),\n serverPath: contentsModel.path\n };\n }\n });\n }\n /**\n * Get an encoded download url given a file path.\n *\n * @param path - An absolute POSIX file path on the server.\n *\n * #### Notes\n * It is expected that the path contains no relative paths.\n *\n * The returned URL may include a query parameter.\n */\n getDownloadUrl(path) {\n const [drive, localPath] = this._driveForPath(path);\n return drive.getDownloadUrl(localPath);\n }\n /**\n * Create a new untitled file or directory in the specified directory path.\n *\n * @param options: The options used to create the file.\n *\n * @returns A promise which resolves with the created file content when the\n * file is created.\n */\n newUntitled(options = {}) {\n if (options.path) {\n const globalPath = this.normalize(options.path);\n const [drive, localPath] = this._driveForPath(globalPath);\n return drive\n .newUntitled({ ...options, path: localPath })\n .then(contentsModel => {\n return {\n ...contentsModel,\n path: coreutils_1.PathExt.join(globalPath, contentsModel.name),\n serverPath: contentsModel.path\n };\n });\n }\n else {\n return this._defaultDrive.newUntitled(options);\n }\n }\n /**\n * Delete a file.\n *\n * @param path - The path to the file.\n *\n * @returns A promise which resolves when the file is deleted.\n */\n delete(path) {\n const [drive, localPath] = this._driveForPath(path);\n return drive.delete(localPath);\n }\n /**\n * Rename a file or directory.\n *\n * @param path - The original file path.\n *\n * @param newPath - The new file path.\n *\n * @returns A promise which resolves with the new file contents model when\n * the file is renamed.\n */\n rename(path, newPath) {\n const [drive1, path1] = this._driveForPath(path);\n const [drive2, path2] = this._driveForPath(newPath);\n if (drive1 !== drive2) {\n throw Error('ContentsManager: renaming files must occur within a Drive');\n }\n return drive1.rename(path1, path2).then(contentsModel => {\n return {\n ...contentsModel,\n path: this._toGlobalPath(drive1, path2),\n serverPath: contentsModel.path\n };\n });\n }\n /**\n * Save a file.\n *\n * @param path - The desired file path.\n *\n * @param options - Optional overrides to the model.\n *\n * @returns A promise which resolves with the file content model when the\n * file is saved.\n *\n * #### Notes\n * Ensure that `model.content` is populated for the file.\n */\n save(path, options = {}) {\n const globalPath = this.normalize(path);\n const [drive, localPath] = this._driveForPath(path);\n return drive\n .save(localPath, { ...options, path: localPath })\n .then(contentsModel => {\n return {\n ...contentsModel,\n path: globalPath,\n serverPath: contentsModel.path\n };\n });\n }\n /**\n * Copy a file into a given directory.\n *\n * @param path - The original file path.\n *\n * @param toDir - The destination directory path.\n *\n * @returns A promise which resolves with the new contents model when the\n * file is copied.\n *\n * #### Notes\n * The server will select the name of the copied file.\n */\n copy(fromFile, toDir) {\n const [drive1, path1] = this._driveForPath(fromFile);\n const [drive2, path2] = this._driveForPath(toDir);\n if (drive1 === drive2) {\n return drive1.copy(path1, path2).then(contentsModel => {\n return {\n ...contentsModel,\n path: this._toGlobalPath(drive1, contentsModel.path),\n serverPath: contentsModel.path\n };\n });\n }\n else {\n throw Error('Copying files between drives is not currently implemented');\n }\n }\n /**\n * Create a checkpoint for a file.\n *\n * @param path - The path of the file.\n *\n * @returns A promise which resolves with the new checkpoint model when the\n * checkpoint is created.\n */\n createCheckpoint(path) {\n const [drive, localPath] = this._driveForPath(path);\n return drive.createCheckpoint(localPath);\n }\n /**\n * List available checkpoints for a file.\n *\n * @param path - The path of the file.\n *\n * @returns A promise which resolves with a list of checkpoint models for\n * the file.\n */\n listCheckpoints(path) {\n const [drive, localPath] = this._driveForPath(path);\n return drive.listCheckpoints(localPath);\n }\n /**\n * Restore a file to a known checkpoint state.\n *\n * @param path - The path of the file.\n *\n * @param checkpointID - The id of the checkpoint to restore.\n *\n * @returns A promise which resolves when the checkpoint is restored.\n */\n restoreCheckpoint(path, checkpointID) {\n const [drive, localPath] = this._driveForPath(path);\n return drive.restoreCheckpoint(localPath, checkpointID);\n }\n /**\n * Delete a checkpoint for a file.\n *\n * @param path - The path of the file.\n *\n * @param checkpointID - The id of the checkpoint to delete.\n *\n * @returns A promise which resolves when the checkpoint is deleted.\n */\n deleteCheckpoint(path, checkpointID) {\n const [drive, localPath] = this._driveForPath(path);\n return drive.deleteCheckpoint(localPath, checkpointID);\n }\n /**\n * Given a drive and a local path, construct a fully qualified\n * path. The inverse of `_driveForPath`.\n *\n * @param drive: an `IDrive`.\n *\n * @param localPath: the local path on the drive.\n *\n * @returns the fully qualified path.\n */\n _toGlobalPath(drive, localPath) {\n if (drive === this._defaultDrive) {\n return coreutils_1.PathExt.removeSlash(localPath);\n }\n else {\n return `${drive.name}:${coreutils_1.PathExt.removeSlash(localPath)}`;\n }\n }\n /**\n * Given a path, get the `IDrive to which it refers,\n * where the path satisfies the pattern\n * `'driveName:path/to/file'`. If there is no `driveName`\n * prepended to the path, it returns the default drive.\n *\n * @param path: a path to a file.\n *\n * @returns A tuple containing an `IDrive` object for the path,\n * and a local path for that drive.\n */\n _driveForPath(path) {\n const driveName = this.driveName(path);\n const localPath = this.localPath(path);\n if (driveName) {\n return [this._additionalDrives.get(driveName), localPath];\n }\n else {\n return [this._defaultDrive, localPath];\n }\n }\n /**\n * Respond to fileChanged signals from the drives attached to\n * the manager. This prepends the drive name to the path if necessary,\n * and then forwards the signal.\n */\n _onFileChanged(sender, args) {\n var _a, _b;\n if (sender === this._defaultDrive) {\n this._fileChanged.emit(args);\n }\n else {\n let newValue = null;\n let oldValue = null;\n if ((_a = args.newValue) === null || _a === void 0 ? void 0 : _a.path) {\n newValue = {\n ...args.newValue,\n path: this._toGlobalPath(sender, args.newValue.path)\n };\n }\n if ((_b = args.oldValue) === null || _b === void 0 ? void 0 : _b.path) {\n oldValue = {\n ...args.oldValue,\n path: this._toGlobalPath(sender, args.oldValue.path)\n };\n }\n this._fileChanged.emit({\n type: args.type,\n newValue,\n oldValue\n });\n }\n }\n}\nexports.ContentsManager = ContentsManager;\n/**\n * A default implementation for an `IDrive`, talking to the\n * server using the Jupyter REST API.\n */\nclass Drive {\n /**\n * Construct a new contents manager object.\n *\n * @param options - The options used to initialize the object.\n */\n constructor(options = {}) {\n var _a, _b, _c;\n this._isDisposed = false;\n this._fileChanged = new signaling_1.Signal(this);\n this.name = (_a = options.name) !== null && _a !== void 0 ? _a : 'Default';\n this._apiEndpoint = (_b = options.apiEndpoint) !== null && _b !== void 0 ? _b : SERVICE_DRIVE_URL;\n this.serverSettings =\n (_c = options.serverSettings) !== null && _c !== void 0 ? _c : __1.ServerConnection.makeSettings();\n }\n /**\n * A signal emitted when a file operation takes place.\n */\n get fileChanged() {\n return this._fileChanged;\n }\n /**\n * Test whether the manager has been disposed.\n */\n get isDisposed() {\n return this._isDisposed;\n }\n /**\n * Dispose of the resources held by the manager.\n */\n dispose() {\n if (this.isDisposed) {\n return;\n }\n this._isDisposed = true;\n signaling_1.Signal.clearData(this);\n }\n /**\n * Get a file or directory.\n *\n * @param localPath: The path to the file.\n *\n * @param options: The options used to fetch the file.\n *\n * @returns A promise which resolves with the file content.\n *\n * Uses the [Jupyter Notebook API](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter-server/jupyter_server/main/jupyter_server/services/api/api.yaml#!/contents) and validates the response model.\n */\n async get(localPath, options) {\n let url = this._getUrl(localPath);\n if (options) {\n // The notebook type cannot take an format option.\n if (options.type === 'notebook') {\n delete options['format'];\n }\n const content = options.content ? '1' : '0';\n const params = { ...options, content };\n url += coreutils_1.URLExt.objectToQueryString(params);\n }\n const settings = this.serverSettings;\n const response = await __1.ServerConnection.makeRequest(url, {}, settings);\n if (response.status !== 200) {\n const err = await __1.ServerConnection.ResponseError.create(response);\n throw err;\n }\n const data = await response.json();\n validate.validateContentsModel(data);\n return data;\n }\n /**\n * Get an encoded download url given a file path.\n *\n * @param localPath - An absolute POSIX file path on the server.\n *\n * #### Notes\n * It is expected that the path contains no relative paths.\n *\n * The returned URL may include a query parameter.\n */\n getDownloadUrl(localPath) {\n const baseUrl = this.serverSettings.baseUrl;\n let url = coreutils_1.URLExt.join(baseUrl, FILES_URL, coreutils_1.URLExt.encodeParts(localPath));\n const xsrfTokenMatch = document.cookie.match('\\\\b_xsrf=([^;]*)\\\\b');\n if (xsrfTokenMatch) {\n const fullUrl = new URL(url);\n fullUrl.searchParams.append('_xsrf', xsrfTokenMatch[1]);\n url = fullUrl.toString();\n }\n return Promise.resolve(url);\n }\n /**\n * Create a new untitled file or directory in the specified directory path.\n *\n * @param options: The options used to create the file.\n *\n * @returns A promise which resolves with the created file content when the\n * file is created.\n *\n * #### Notes\n * Uses the [Jupyter Notebook API](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter-server/jupyter_server/main/jupyter_server/services/api/api.yaml#!/contents) and validates the response model.\n */\n async newUntitled(options = {}) {\n var _a;\n let body = '{}';\n if (options) {\n if (options.ext) {\n options.ext = Private.normalizeExtension(options.ext);\n }\n body = JSON.stringify(options);\n }\n const settings = this.serverSettings;\n const url = this._getUrl((_a = options.path) !== null && _a !== void 0 ? _a : '');\n const init = {\n method: 'POST',\n body\n };\n const response = await __1.ServerConnection.makeRequest(url, init, settings);\n if (response.status !== 201) {\n const err = await __1.ServerConnection.ResponseError.create(response);\n throw err;\n }\n const data = await response.json();\n validate.validateContentsModel(data);\n this._fileChanged.emit({\n type: 'new',\n oldValue: null,\n newValue: data\n });\n return data;\n }\n /**\n * Delete a file.\n *\n * @param localPath - The path to the file.\n *\n * @returns A promise which resolves when the file is deleted.\n *\n * #### Notes\n * Uses the [Jupyter Notebook API](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter-server/jupyter_server/main/jupyter_server/services/api/api.yaml#!/contents).\n */\n async delete(localPath) {\n const url = this._getUrl(localPath);\n const settings = this.serverSettings;\n const init = { method: 'DELETE' };\n const response = await __1.ServerConnection.makeRequest(url, init, settings);\n // TODO: update IPEP27 to specify errors more precisely, so\n // that error types can be detected here with certainty.\n if (response.status !== 204) {\n const err = await __1.ServerConnection.ResponseError.create(response);\n throw err;\n }\n this._fileChanged.emit({\n type: 'delete',\n oldValue: { path: localPath },\n newValue: null\n });\n }\n /**\n * Rename a file or directory.\n *\n * @param oldLocalPath - The original file path.\n *\n * @param newLocalPath - The new file path.\n *\n * @returns A promise which resolves with the new file contents model when\n * the file is renamed.\n *\n * #### Notes\n * Uses the [Jupyter Notebook API](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter-server/jupyter_server/main/jupyter_server/services/api/api.yaml#!/contents) and validates the response model.\n */\n async rename(oldLocalPath, newLocalPath) {\n const settings = this.serverSettings;\n const url = this._getUrl(oldLocalPath);\n const init = {\n method: 'PATCH',\n body: JSON.stringify({ path: newLocalPath })\n };\n const response = await __1.ServerConnection.makeRequest(url, init, settings);\n if (response.status !== 200) {\n const err = await __1.ServerConnection.ResponseError.create(response);\n throw err;\n }\n const data = await response.json();\n validate.validateContentsModel(data);\n this._fileChanged.emit({\n type: 'rename',\n oldValue: { path: oldLocalPath },\n newValue: data\n });\n return data;\n }\n /**\n * Save a file.\n *\n * @param localPath - The desired file path.\n *\n * @param options - Optional overrides to the model.\n *\n * @returns A promise which resolves with the file content model when the\n * file is saved.\n *\n * #### Notes\n * Ensure that `model.content` is populated for the file.\n *\n * Uses the [Jupyter Notebook API](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter-server/jupyter_server/main/jupyter_server/services/api/api.yaml#!/contents) and validates the response model.\n */\n async save(localPath, options = {}) {\n const settings = this.serverSettings;\n const url = this._getUrl(localPath);\n const init = {\n method: 'PUT',\n body: JSON.stringify(options)\n };\n const response = await __1.ServerConnection.makeRequest(url, init, settings);\n // will return 200 for an existing file and 201 for a new file\n if (response.status !== 200 && response.status !== 201) {\n const err = await __1.ServerConnection.ResponseError.create(response);\n throw err;\n }\n const data = await response.json();\n validate.validateContentsModel(data);\n this._fileChanged.emit({\n type: 'save',\n oldValue: null,\n newValue: data\n });\n return data;\n }\n /**\n * Copy a file into a given directory.\n *\n * @param localPath - The original file path.\n *\n * @param toDir - The destination directory path.\n *\n * @returns A promise which resolves with the new contents model when the\n * file is copied.\n *\n * #### Notes\n * The server will select the name of the copied file.\n *\n * Uses the [Jupyter Notebook API](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter-server/jupyter_server/main/jupyter_server/services/api/api.yaml#!/contents) and validates the response model.\n */\n async copy(fromFile, toDir) {\n const settings = this.serverSettings;\n const url = this._getUrl(toDir);\n const init = {\n method: 'POST',\n body: JSON.stringify({ copy_from: fromFile })\n };\n const response = await __1.ServerConnection.makeRequest(url, init, settings);\n if (response.status !== 201) {\n const err = await __1.ServerConnection.ResponseError.create(response);\n throw err;\n }\n const data = await response.json();\n validate.validateContentsModel(data);\n this._fileChanged.emit({\n type: 'new',\n oldValue: null,\n newValue: data\n });\n return data;\n }\n /**\n * Create a checkpoint for a file.\n *\n * @param localPath - The path of the file.\n *\n * @returns A promise which resolves with the new checkpoint model when the\n * checkpoint is created.\n *\n * #### Notes\n * Uses the [Jupyter Notebook API](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter-server/jupyter_server/main/jupyter_server/services/api/api.yaml#!/contents) and validates the response model.\n */\n async createCheckpoint(localPath) {\n const url = this._getUrl(localPath, 'checkpoints');\n const init = { method: 'POST' };\n const response = await __1.ServerConnection.makeRequest(url, init, this.serverSettings);\n if (response.status !== 201) {\n const err = await __1.ServerConnection.ResponseError.create(response);\n throw err;\n }\n const data = await response.json();\n validate.validateCheckpointModel(data);\n return data;\n }\n /**\n * List available checkpoints for a file.\n *\n * @param localPath - The path of the file.\n *\n * @returns A promise which resolves with a list of checkpoint models for\n * the file.\n *\n * #### Notes\n * Uses the [Jupyter Notebook API](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter-server/jupyter_server/main/jupyter_server/services/api/api.yaml#!/contents) and validates the response model.\n */\n async listCheckpoints(localPath) {\n const url = this._getUrl(localPath, 'checkpoints');\n const response = await __1.ServerConnection.makeRequest(url, {}, this.serverSettings);\n if (response.status !== 200) {\n const err = await __1.ServerConnection.ResponseError.create(response);\n throw err;\n }\n const data = await response.json();\n if (!Array.isArray(data)) {\n throw new Error('Invalid Checkpoint list');\n }\n for (let i = 0; i < data.length; i++) {\n validate.validateCheckpointModel(data[i]);\n }\n return data;\n }\n /**\n * Restore a file to a known checkpoint state.\n *\n * @param localPath - The path of the file.\n *\n * @param checkpointID - The id of the checkpoint to restore.\n *\n * @returns A promise which resolves when the checkpoint is restored.\n *\n * #### Notes\n * Uses the [Jupyter Notebook API](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter-server/jupyter_server/main/jupyter_server/services/api/api.yaml#!/contents).\n */\n async restoreCheckpoint(localPath, checkpointID) {\n const url = this._getUrl(localPath, 'checkpoints', checkpointID);\n const init = { method: 'POST' };\n const response = await __1.ServerConnection.makeRequest(url, init, this.serverSettings);\n if (response.status !== 204) {\n const err = await __1.ServerConnection.ResponseError.create(response);\n throw err;\n }\n }\n /**\n * Delete a checkpoint for a file.\n *\n * @param localPath - The path of the file.\n *\n * @param checkpointID - The id of the checkpoint to delete.\n *\n * @returns A promise which resolves when the checkpoint is deleted.\n *\n * #### Notes\n * Uses the [Jupyter Notebook API](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter-server/jupyter_server/main/jupyter_server/services/api/api.yaml#!/contents).\n */\n async deleteCheckpoint(localPath, checkpointID) {\n const url = this._getUrl(localPath, 'checkpoints', checkpointID);\n const init = { method: 'DELETE' };\n const response = await __1.ServerConnection.makeRequest(url, init, this.serverSettings);\n if (response.status !== 204) {\n const err = await __1.ServerConnection.ResponseError.create(response);\n throw err;\n }\n }\n /**\n * Get a REST url for a file given a path.\n */\n _getUrl(...args) {\n const parts = args.map(path => coreutils_1.URLExt.encodeParts(path));\n const baseUrl = this.serverSettings.baseUrl;\n return coreutils_1.URLExt.join(baseUrl, this._apiEndpoint, ...parts);\n }\n}\nexports.Drive = Drive;\n/**\n * A namespace for module private data.\n */\nvar Private;\n(function (Private) {\n /**\n * Normalize a file extension to be of the type `'.foo'`.\n *\n * Adds a leading dot if not present and converts to lower case.\n */\n function normalizeExtension(extension) {\n if (extension.length > 0 && extension.indexOf('.') !== 0) {\n extension = `.${extension}`;\n }\n return extension;\n }\n Private.normalizeExtension = normalizeExtension;\n})(Private || (Private = {}));\n//# sourceMappingURL=index.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateCheckpointModel = exports.validateContentsModel = void 0;\nconst validate_1 = require(\"../validate\");\n/**\n * Validate an `Contents.IModel` object.\n */\nfunction validateContentsModel(model) {\n (0, validate_1.validateProperty)(model, 'name', 'string');\n (0, validate_1.validateProperty)(model, 'path', 'string');\n (0, validate_1.validateProperty)(model, 'type', 'string');\n (0, validate_1.validateProperty)(model, 'created', 'string');\n (0, validate_1.validateProperty)(model, 'last_modified', 'string');\n (0, validate_1.validateProperty)(model, 'mimetype', 'object');\n (0, validate_1.validateProperty)(model, 'content', 'object');\n (0, validate_1.validateProperty)(model, 'format', 'object');\n}\nexports.validateContentsModel = validateContentsModel;\n/**\n * Validate an `Contents.ICheckpointModel` object.\n */\nfunction validateCheckpointModel(model) {\n (0, validate_1.validateProperty)(model, 'id', 'string');\n (0, validate_1.validateProperty)(model, 'last_modified', 'string');\n}\nexports.validateCheckpointModel = validateCheckpointModel;\n//# sourceMappingURL=validate.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EventManager = void 0;\nconst coreutils_1 = require(\"@jupyterlab/coreutils\");\nconst polling_1 = require(\"@lumino/polling\");\nconst signaling_1 = require(\"@lumino/signaling\");\nconst serverconnection_1 = require(\"../serverconnection\");\n/**\n * The url for the jupyter-server events service.\n */\nconst SERVICE_EVENTS_URL = 'api/events';\n/**\n * The events API service manager.\n */\nclass EventManager {\n /**\n * Create a new event manager.\n */\n constructor(options = {}) {\n var _a;\n this._socket = null;\n this.serverSettings =\n (_a = options.serverSettings) !== null && _a !== void 0 ? _a : serverconnection_1.ServerConnection.makeSettings();\n // If subscription fails, the poll attempts to reconnect and backs off.\n this._poll = new polling_1.Poll({ factory: () => this._subscribe() });\n this._stream = new signaling_1.Stream(this);\n // Subscribe to the events socket.\n void this._poll.start();\n }\n /**\n * Whether the event manager is disposed.\n */\n get isDisposed() {\n return this._poll.isDisposed;\n }\n /**\n * An event stream that emits and yields each new event.\n */\n get stream() {\n return this._stream;\n }\n /**\n * Dispose the event manager.\n */\n dispose() {\n if (this.isDisposed) {\n return;\n }\n // Clean up poll.\n this._poll.dispose();\n // Clean up socket.\n const socket = this._socket;\n if (socket) {\n this._socket = null;\n socket.onopen = () => undefined;\n socket.onerror = () => undefined;\n socket.onmessage = () => undefined;\n socket.onclose = () => undefined;\n socket.close();\n }\n // Clean up stream.\n signaling_1.Signal.clearData(this);\n this._stream.stop();\n }\n /**\n * Post an event request to be emitted by the event bus.\n */\n async emit(event) {\n const { serverSettings } = this;\n const { baseUrl, token } = serverSettings;\n const { makeRequest, ResponseError } = serverconnection_1.ServerConnection;\n const url = coreutils_1.URLExt.join(baseUrl, SERVICE_EVENTS_URL) +\n (token ? `?token=${token}` : '');\n const init = { body: JSON.stringify(event), method: 'POST' };\n const response = await makeRequest(url, init, serverSettings);\n if (response.status !== 204) {\n throw new ResponseError(response);\n }\n }\n /**\n * Subscribe to event bus emissions.\n */\n _subscribe() {\n return new Promise((_, reject) => {\n if (this.isDisposed) {\n return;\n }\n const { token, WebSocket, wsUrl } = this.serverSettings;\n const url = coreutils_1.URLExt.join(wsUrl, SERVICE_EVENTS_URL, 'subscribe') +\n (token ? `?token=${encodeURIComponent(token)}` : '');\n const socket = (this._socket = new WebSocket(url));\n const stream = this._stream;\n socket.onclose = () => reject(new Error('EventManager socket closed'));\n socket.onmessage = msg => msg.data && stream.emit(JSON.parse(msg.data));\n });\n }\n}\nexports.EventManager = EventManager;\n//# sourceMappingURL=index.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/**\n * @packageDocumentation\n * @module services\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./basemanager\"), exports);\n__exportStar(require(\"./config\"), exports);\n__exportStar(require(\"./contents\"), exports);\n__exportStar(require(\"./event\"), exports);\n__exportStar(require(\"./kernel\"), exports);\n__exportStar(require(\"./kernelspec\"), exports);\n__exportStar(require(\"./manager\"), exports);\n__exportStar(require(\"./serverconnection\"), exports);\n__exportStar(require(\"./session\"), exports);\n__exportStar(require(\"./setting\"), exports);\n__exportStar(require(\"./terminal\"), exports);\n__exportStar(require(\"./user\"), exports);\n__exportStar(require(\"./workspace\"), exports);\n__exportStar(require(\"./nbconvert\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CommHandler = void 0;\nconst disposable_1 = require(\"@lumino/disposable\");\nconst KernelMessage = __importStar(require(\"./messages\"));\n/**\n * Comm channel handler.\n */\nclass CommHandler extends disposable_1.DisposableDelegate {\n /**\n * Construct a new comm channel.\n */\n constructor(target, id, kernel, disposeCb) {\n super(disposeCb);\n this._target = '';\n this._id = '';\n this._id = id;\n this._target = target;\n this._kernel = kernel;\n }\n /**\n * The unique id for the comm channel.\n */\n get commId() {\n return this._id;\n }\n /**\n * The target name for the comm channel.\n */\n get targetName() {\n return this._target;\n }\n /**\n * Get the callback for a comm close event.\n *\n * #### Notes\n * This is called when the comm is closed from either the server or client.\n *\n * **See also:** [[ICommClose]], [[close]]\n */\n get onClose() {\n return this._onClose;\n }\n /**\n * Set the callback for a comm close event.\n *\n * #### Notes\n * This is called when the comm is closed from either the server or client. If\n * the function returns a promise, and the kernel was closed from the server,\n * kernel message processing will pause until the returned promise is\n * fulfilled.\n *\n * **See also:** [[close]]\n */\n set onClose(cb) {\n this._onClose = cb;\n }\n /**\n * Get the callback for a comm message received event.\n */\n get onMsg() {\n return this._onMsg;\n }\n /**\n * Set the callback for a comm message received event.\n *\n * #### Notes\n * This is called when a comm message is received. If the function returns a\n * promise, kernel message processing will pause until it is fulfilled.\n */\n set onMsg(cb) {\n this._onMsg = cb;\n }\n /**\n * Open a comm with optional data and metadata.\n *\n * #### Notes\n * This sends a `comm_open` message to the server.\n *\n * **See also:** [[ICommOpen]]\n */\n open(data, metadata, buffers = []) {\n if (this.isDisposed || this._kernel.isDisposed) {\n throw new Error('Cannot open');\n }\n const msg = KernelMessage.createMessage({\n msgType: 'comm_open',\n channel: 'shell',\n username: this._kernel.username,\n session: this._kernel.clientId,\n content: {\n comm_id: this._id,\n target_name: this._target,\n data: data !== null && data !== void 0 ? data : {}\n },\n metadata,\n buffers\n });\n return this._kernel.sendShellMessage(msg, false, true);\n }\n /**\n * Send a `comm_msg` message to the kernel.\n *\n * #### Notes\n * This is a no-op if the comm has been closed.\n *\n * **See also:** [[ICommMsg]]\n */\n send(data, metadata, buffers = [], disposeOnDone = true) {\n if (this.isDisposed || this._kernel.isDisposed) {\n throw new Error('Cannot send');\n }\n const msg = KernelMessage.createMessage({\n msgType: 'comm_msg',\n channel: 'shell',\n username: this._kernel.username,\n session: this._kernel.clientId,\n content: {\n comm_id: this._id,\n data: data\n },\n metadata,\n buffers\n });\n return this._kernel.sendShellMessage(msg, false, disposeOnDone);\n }\n /**\n * Close the comm.\n *\n * #### Notes\n * This will send a `comm_close` message to the kernel, and call the\n * `onClose` callback if set.\n *\n * This is a no-op if the comm is already closed.\n *\n * **See also:** [[ICommClose]], [[onClose]]\n */\n close(data, metadata, buffers = []) {\n if (this.isDisposed || this._kernel.isDisposed) {\n throw new Error('Cannot close');\n }\n const msg = KernelMessage.createMessage({\n msgType: 'comm_close',\n channel: 'shell',\n username: this._kernel.username,\n session: this._kernel.clientId,\n content: {\n comm_id: this._id,\n data: data !== null && data !== void 0 ? data : {}\n },\n metadata,\n buffers\n });\n const future = this._kernel.sendShellMessage(msg, false, true);\n const onClose = this._onClose;\n if (onClose) {\n const ioMsg = KernelMessage.createMessage({\n msgType: 'comm_close',\n channel: 'iopub',\n username: this._kernel.username,\n session: this._kernel.clientId,\n content: {\n comm_id: this._id,\n data: data !== null && data !== void 0 ? data : {}\n },\n metadata,\n buffers\n });\n // In the future, we may want to communicate back to the user the possible\n // promise returned from onClose.\n void onClose(ioMsg);\n }\n this.dispose();\n return future;\n }\n}\nexports.CommHandler = CommHandler;\n//# sourceMappingURL=comm.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.KernelConnection = void 0;\nconst coreutils_1 = require(\"@jupyterlab/coreutils\");\nconst coreutils_2 = require(\"@lumino/coreutils\");\nconst signaling_1 = require(\"@lumino/signaling\");\nconst __1 = require(\"..\");\nconst comm_1 = require(\"./comm\");\nconst KernelMessage = __importStar(require(\"./messages\"));\nconst future_1 = require(\"./future\");\nconst serialize_1 = require(\"./serialize\");\nconst validate = __importStar(require(\"./validate\"));\nconst kernelspec_1 = require(\"../kernelspec\");\nconst restapi = __importStar(require(\"./restapi\"));\nconst KERNEL_INFO_TIMEOUT = 3000;\nconst RESTARTING_KERNEL_SESSION = '_RESTARTING_';\nconst STARTING_KERNEL_SESSION = '';\n/**\n * Implementation of the Kernel object.\n *\n * #### Notes\n * Messages from the server are handled in the order they were received and\n * asynchronously. Any message handler can return a promise, and message\n * handling will pause until the promise is fulfilled.\n */\nclass KernelConnection {\n /**\n * Construct a kernel object.\n */\n constructor(options) {\n var _a, _b, _c, _d;\n /**\n * Create the kernel websocket connection and add socket status handlers.\n */\n this._createSocket = (useProtocols = true) => {\n this._errorIfDisposed();\n // Make sure the socket is clear\n this._clearSocket();\n // Update the connection status to reflect opening a new connection.\n this._updateConnectionStatus('connecting');\n const settings = this.serverSettings;\n const partialUrl = coreutils_1.URLExt.join(settings.wsUrl, restapi.KERNEL_SERVICE_URL, encodeURIComponent(this._id));\n // Strip any authentication from the display string.\n const display = partialUrl.replace(/^((?:\\w+:)?\\/\\/)(?:[^@\\/]+@)/, '$1');\n console.debug(`Starting WebSocket: ${display}`);\n let url = coreutils_1.URLExt.join(partialUrl, 'channels?session_id=' + encodeURIComponent(this._clientId));\n // If token authentication is in use.\n const token = settings.token;\n if (settings.appendToken && token !== '') {\n url = url + `&token=${encodeURIComponent(token)}`;\n }\n // Try opening the websocket with our list of subprotocols.\n // If the server doesn't handle subprotocols,\n // the accepted protocol will be ''.\n // But we cannot send '' as a subprotocol, so if connection fails,\n // reconnect without subprotocols.\n const supportedProtocols = useProtocols ? this._supportedProtocols : [];\n this._ws = new settings.WebSocket(url, supportedProtocols);\n // Ensure incoming binary messages are not Blobs\n this._ws.binaryType = 'arraybuffer';\n let alreadyCalledOnclose = false;\n const getKernelModel = async (evt) => {\n var _a, _b;\n if (this._isDisposed) {\n return;\n }\n this._reason = '';\n this._model = undefined;\n try {\n const model = await restapi.getKernelModel(this._id, settings);\n this._model = model;\n if ((model === null || model === void 0 ? void 0 : model.execution_state) === 'dead') {\n this._updateStatus('dead');\n }\n else {\n this._onWSClose(evt);\n }\n }\n catch (err) {\n // Try again, if there is a network failure\n // Handle network errors, as well as cases where we are on a\n // JupyterHub and the server is not running. JupyterHub returns a\n // 503 (<2.0) or 424 (>2.0) in that case.\n if (err instanceof __1.ServerConnection.NetworkError ||\n ((_a = err.response) === null || _a === void 0 ? void 0 : _a.status) === 503 ||\n ((_b = err.response) === null || _b === void 0 ? void 0 : _b.status) === 424) {\n const timeout = Private.getRandomIntInclusive(10, 30) * 1e3;\n setTimeout(getKernelModel, timeout, evt);\n }\n else {\n this._reason = 'Kernel died unexpectedly';\n this._updateStatus('dead');\n }\n }\n return;\n };\n const earlyClose = async (evt) => {\n // If the websocket was closed early, that could mean\n // that the kernel is actually dead. Try getting\n // information about the kernel from the API call,\n // if that fails, then assume the kernel is dead,\n // otherwise just follow the typical websocket closed\n // protocol.\n if (alreadyCalledOnclose) {\n return;\n }\n alreadyCalledOnclose = true;\n await getKernelModel(evt);\n return;\n };\n this._ws.onmessage = this._onWSMessage;\n this._ws.onopen = this._onWSOpen;\n this._ws.onclose = earlyClose;\n this._ws.onerror = earlyClose;\n };\n // Make websocket callbacks arrow functions so they bind `this`.\n /**\n * Handle a websocket open event.\n */\n this._onWSOpen = (evt) => {\n if (this._ws.protocol !== '' &&\n !this._supportedProtocols.includes(this._ws.protocol)) {\n console.log('Server selected unknown kernel wire protocol:', this._ws.protocol);\n this._updateStatus('dead');\n throw new Error(`Unknown kernel wire protocol: ${this._ws.protocol}`);\n }\n // Remember the kernel wire protocol selected by the server.\n this._selectedProtocol = this._ws.protocol;\n this._ws.onclose = this._onWSClose;\n this._ws.onerror = this._onWSClose;\n this._updateConnectionStatus('connected');\n };\n /**\n * Handle a websocket message, validating and routing appropriately.\n */\n this._onWSMessage = (evt) => {\n // Notify immediately if there is an error with the message.\n let msg;\n try {\n msg = (0, serialize_1.deserialize)(evt.data, this._ws.protocol);\n validate.validateMessage(msg);\n }\n catch (error) {\n error.message = `Kernel message validation error: ${error.message}`;\n // We throw the error so that it bubbles up to the top, and displays the right stack.\n throw error;\n }\n // Update the current kernel session id\n this._kernelSession = msg.header.session;\n // Handle the message asynchronously, in the order received.\n this._msgChain = this._msgChain\n .then(() => {\n // Return so that any promises from handling a message are fulfilled\n // before proceeding to the next message.\n return this._handleMessage(msg);\n })\n .catch(error => {\n // Log any errors in handling the message, thus resetting the _msgChain\n // promise so we can process more messages.\n // Ignore the \"Canceled\" errors that are thrown during kernel dispose.\n if (error.message.startsWith('Canceled future for ')) {\n console.error(error);\n }\n });\n // Emit the message receive signal\n this._anyMessage.emit({ msg, direction: 'recv' });\n };\n /**\n * Handle a websocket close event.\n */\n this._onWSClose = (evt) => {\n if (!this.isDisposed) {\n this._reconnect();\n }\n };\n this._id = '';\n this._name = '';\n this._status = 'unknown';\n this._connectionStatus = 'connecting';\n this._kernelSession = '';\n this._isDisposed = false;\n /**\n * Websocket to communicate with kernel.\n */\n this._ws = null;\n this._username = '';\n this._reconnectLimit = 7;\n this._reconnectAttempt = 0;\n this._reconnectTimeout = null;\n this._supportedProtocols = Object.values(KernelMessage.supportedKernelWebSocketProtocols);\n this._selectedProtocol = '';\n this._futures = new Map();\n this._comms = new Map();\n this._targetRegistry = Object.create(null);\n this._info = new coreutils_2.PromiseDelegate();\n this._pendingMessages = [];\n this._statusChanged = new signaling_1.Signal(this);\n this._connectionStatusChanged = new signaling_1.Signal(this);\n this._disposed = new signaling_1.Signal(this);\n this._iopubMessage = new signaling_1.Signal(this);\n this._anyMessage = new signaling_1.Signal(this);\n this._pendingInput = new signaling_1.Signal(this);\n this._unhandledMessage = new signaling_1.Signal(this);\n this._displayIdToParentIds = new Map();\n this._msgIdToDisplayIds = new Map();\n this._msgChain = Promise.resolve();\n this._hasPendingInput = false;\n this._reason = '';\n this._noOp = () => {\n /* no-op */\n };\n this._name = options.model.name;\n this._id = options.model.id;\n this.serverSettings =\n (_a = options.serverSettings) !== null && _a !== void 0 ? _a : __1.ServerConnection.makeSettings();\n this._clientId = (_b = options.clientId) !== null && _b !== void 0 ? _b : coreutils_2.UUID.uuid4();\n this._username = (_c = options.username) !== null && _c !== void 0 ? _c : '';\n this.handleComms = (_d = options.handleComms) !== null && _d !== void 0 ? _d : true;\n this._createSocket();\n }\n get disposed() {\n return this._disposed;\n }\n /**\n * A signal emitted when the kernel status changes.\n */\n get statusChanged() {\n return this._statusChanged;\n }\n /**\n * A signal emitted when the kernel status changes.\n */\n get connectionStatusChanged() {\n return this._connectionStatusChanged;\n }\n /**\n * A signal emitted for iopub kernel messages.\n *\n * #### Notes\n * This signal is emitted after the iopub message is handled asynchronously.\n */\n get iopubMessage() {\n return this._iopubMessage;\n }\n /**\n * A signal emitted for unhandled kernel message.\n *\n * #### Notes\n * This signal is emitted for a message that was not handled. It is emitted\n * during the asynchronous message handling code.\n */\n get unhandledMessage() {\n return this._unhandledMessage;\n }\n /**\n * The kernel model\n */\n get model() {\n return (this._model || {\n id: this.id,\n name: this.name,\n reason: this._reason\n });\n }\n /**\n * A signal emitted for any kernel message.\n *\n * #### Notes\n * This signal is emitted when a message is received, before it is handled\n * asynchronously.\n *\n * This message is emitted when a message is queued for sending (either in\n * the websocket buffer, or our own pending message buffer). The message may\n * actually be sent across the wire at a later time.\n *\n * The message emitted in this signal should not be modified in any way.\n */\n get anyMessage() {\n return this._anyMessage;\n }\n /**\n * A signal emitted when a kernel has pending inputs from the user.\n */\n get pendingInput() {\n return this._pendingInput;\n }\n /**\n * The id of the server-side kernel.\n */\n get id() {\n return this._id;\n }\n /**\n * The name of the server-side kernel.\n */\n get name() {\n return this._name;\n }\n /**\n * The client username.\n */\n get username() {\n return this._username;\n }\n /**\n * The client unique id.\n */\n get clientId() {\n return this._clientId;\n }\n /**\n * The current status of the kernel.\n */\n get status() {\n return this._status;\n }\n /**\n * The current connection status of the kernel connection.\n */\n get connectionStatus() {\n return this._connectionStatus;\n }\n /**\n * Test whether the kernel has been disposed.\n */\n get isDisposed() {\n return this._isDisposed;\n }\n /**\n * The cached kernel info.\n *\n * @returns A promise that resolves to the kernel info.\n */\n get info() {\n return this._info.promise;\n }\n /**\n * The kernel spec.\n *\n * @returns A promise that resolves to the kernel spec.\n */\n get spec() {\n if (this._specPromise) {\n return this._specPromise;\n }\n this._specPromise = kernelspec_1.KernelSpecAPI.getSpecs(this.serverSettings).then(specs => {\n return specs.kernelspecs[this._name];\n });\n return this._specPromise;\n }\n /**\n * Clone the current kernel with a new clientId.\n */\n clone(options = {}) {\n return new KernelConnection({\n model: this.model,\n username: this.username,\n serverSettings: this.serverSettings,\n // handleComms defaults to false since that is safer\n handleComms: false,\n ...options\n });\n }\n /**\n * Dispose of the resources held by the kernel.\n */\n dispose() {\n if (this.isDisposed) {\n return;\n }\n this._isDisposed = true;\n this._disposed.emit();\n this._updateConnectionStatus('disconnected');\n this._clearKernelState();\n this._pendingMessages = [];\n this._clearSocket();\n // Clear Lumino signals\n signaling_1.Signal.clearData(this);\n }\n /**\n * Send a shell message to the kernel.\n *\n * #### Notes\n * Send a message to the kernel's shell channel, yielding a future object\n * for accepting replies.\n *\n * If `expectReply` is given and `true`, the future is disposed when both a\n * shell reply and an idle status message are received. If `expectReply`\n * is not given or is `false`, the future is resolved when an idle status\n * message is received.\n * If `disposeOnDone` is not given or is `true`, the Future is disposed at this point.\n * If `disposeOnDone` is given and `false`, it is up to the caller to dispose of the Future.\n *\n * All replies are validated as valid kernel messages.\n *\n * If the kernel status is `dead`, this will throw an error.\n */\n sendShellMessage(msg, expectReply = false, disposeOnDone = true) {\n return this._sendKernelShellControl(future_1.KernelShellFutureHandler, msg, expectReply, disposeOnDone);\n }\n /**\n * Send a control message to the kernel.\n *\n * #### Notes\n * Send a message to the kernel's control channel, yielding a future object\n * for accepting replies.\n *\n * If `expectReply` is given and `true`, the future is disposed when both a\n * control reply and an idle status message are received. If `expectReply`\n * is not given or is `false`, the future is resolved when an idle status\n * message is received.\n * If `disposeOnDone` is not given or is `true`, the Future is disposed at this point.\n * If `disposeOnDone` is given and `false`, it is up to the caller to dispose of the Future.\n *\n * All replies are validated as valid kernel messages.\n *\n * If the kernel status is `dead`, this will throw an error.\n */\n sendControlMessage(msg, expectReply = false, disposeOnDone = true) {\n return this._sendKernelShellControl(future_1.KernelControlFutureHandler, msg, expectReply, disposeOnDone);\n }\n _sendKernelShellControl(ctor, msg, expectReply = false, disposeOnDone = true) {\n this._sendMessage(msg);\n this._anyMessage.emit({ msg, direction: 'send' });\n const future = new ctor(() => {\n const msgId = msg.header.msg_id;\n this._futures.delete(msgId);\n // Remove stored display id information.\n const displayIds = this._msgIdToDisplayIds.get(msgId);\n if (!displayIds) {\n return;\n }\n displayIds.forEach(displayId => {\n const msgIds = this._displayIdToParentIds.get(displayId);\n if (msgIds) {\n const idx = msgIds.indexOf(msgId);\n if (idx === -1) {\n return;\n }\n if (msgIds.length === 1) {\n this._displayIdToParentIds.delete(displayId);\n }\n else {\n msgIds.splice(idx, 1);\n this._displayIdToParentIds.set(displayId, msgIds);\n }\n }\n });\n this._msgIdToDisplayIds.delete(msgId);\n }, msg, expectReply, disposeOnDone, this);\n this._futures.set(msg.header.msg_id, future);\n return future;\n }\n /**\n * Send a message on the websocket.\n *\n * If queue is true, queue the message for later sending if we cannot send\n * now. Otherwise throw an error.\n *\n * #### Notes\n * As an exception to the queueing, if we are sending a kernel_info_request\n * message while we think the kernel is restarting, we send the message\n * immediately without queueing. This is so that we can trigger a message\n * back, which will then clear the kernel restarting state.\n */\n _sendMessage(msg, queue = true) {\n if (this.status === 'dead') {\n throw new Error('Kernel is dead');\n }\n // If we have a kernel_info_request and we are starting or restarting, send the\n // kernel_info_request immediately if we can, and if not throw an error so\n // we can retry later. On restarting we do this because we must get at least one message\n // from the kernel to reset the kernel session (thus clearing the restart\n // status sentinel).\n if ((this._kernelSession === STARTING_KERNEL_SESSION ||\n this._kernelSession === RESTARTING_KERNEL_SESSION) &&\n KernelMessage.isInfoRequestMsg(msg)) {\n if (this.connectionStatus === 'connected') {\n this._ws.send((0, serialize_1.serialize)(msg, this._ws.protocol));\n return;\n }\n else {\n throw new Error('Could not send message: status is not connected');\n }\n }\n // If there are pending messages, add to the queue so we keep messages in order\n if (queue && this._pendingMessages.length > 0) {\n this._pendingMessages.push(msg);\n return;\n }\n // Send if the ws allows it, otherwise queue the message.\n if (this.connectionStatus === 'connected' &&\n this._kernelSession !== RESTARTING_KERNEL_SESSION) {\n this._ws.send((0, serialize_1.serialize)(msg, this._ws.protocol));\n }\n else if (queue) {\n this._pendingMessages.push(msg);\n }\n else {\n throw new Error('Could not send message');\n }\n }\n /**\n * Interrupt a kernel.\n *\n * #### Notes\n * Uses the [Jupyter Notebook API](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter-server/jupyter_server/main/jupyter_server/services/api/api.yaml#!/kernels).\n *\n * The promise is fulfilled on a valid response and rejected otherwise.\n *\n * It is assumed that the API call does not mutate the kernel id or name.\n *\n * The promise will be rejected if the kernel status is `Dead` or if the\n * request fails or the response is invalid.\n */\n async interrupt() {\n this.hasPendingInput = false;\n if (this.status === 'dead') {\n throw new Error('Kernel is dead');\n }\n return restapi.interruptKernel(this.id, this.serverSettings);\n }\n /**\n * Request a kernel restart.\n *\n * #### Notes\n * Uses the [Jupyter Notebook API](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter-server/jupyter_server/main/jupyter_server/services/api/api.yaml#!/kernels)\n * and validates the response model.\n *\n * Any existing Future or Comm objects are cleared once the kernel has\n * actually be restarted.\n *\n * The promise is fulfilled on a valid server response (after the kernel restarts)\n * and rejected otherwise.\n *\n * It is assumed that the API call does not mutate the kernel id or name.\n *\n * The promise will be rejected if the request fails or the response is\n * invalid.\n */\n async restart() {\n if (this.status === 'dead') {\n throw new Error('Kernel is dead');\n }\n this._updateStatus('restarting');\n this._clearKernelState();\n this._kernelSession = RESTARTING_KERNEL_SESSION;\n await restapi.restartKernel(this.id, this.serverSettings);\n // Reconnect to the kernel to address cases where kernel ports\n // have changed during the restart.\n await this.reconnect();\n this.hasPendingInput = false;\n }\n /**\n * Reconnect to a kernel.\n *\n * #### Notes\n * This may try multiple times to reconnect to a kernel, and will sever any\n * existing connection.\n */\n reconnect() {\n this._errorIfDisposed();\n const result = new coreutils_2.PromiseDelegate();\n // Set up a listener for the connection status changing, which accepts or\n // rejects after the retries are done.\n const fulfill = (sender, status) => {\n if (status === 'connected') {\n result.resolve();\n this.connectionStatusChanged.disconnect(fulfill, this);\n }\n else if (status === 'disconnected') {\n result.reject(new Error('Kernel connection disconnected'));\n this.connectionStatusChanged.disconnect(fulfill, this);\n }\n };\n this.connectionStatusChanged.connect(fulfill, this);\n // Reset the reconnect limit so we start the connection attempts fresh\n this._reconnectAttempt = 0;\n // Start the reconnection process, which will also clear any existing\n // connection.\n this._reconnect();\n // Return the promise that should resolve on connection or reject if the\n // retries don't work.\n return result.promise;\n }\n /**\n * Shutdown a kernel.\n *\n * #### Notes\n * Uses the [Jupyter Notebook API](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter-server/jupyter_server/main/jupyter_server/services/api/api.yaml#!/kernels).\n *\n * The promise is fulfilled on a valid response and rejected otherwise.\n *\n * On a valid response, disposes this kernel connection.\n *\n * If the kernel is already `dead`, disposes this kernel connection without\n * a server request.\n */\n async shutdown() {\n if (this.status !== 'dead') {\n await restapi.shutdownKernel(this.id, this.serverSettings);\n }\n this.handleShutdown();\n }\n /**\n * Handles a kernel shutdown.\n *\n * #### Notes\n * This method should be called if we know from outside information that a\n * kernel is dead (for example, we cannot find the kernel model on the\n * server).\n */\n handleShutdown() {\n this._updateStatus('dead');\n this.dispose();\n }\n /**\n * Send a `kernel_info_request` message.\n *\n * #### Notes\n * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#kernel-info).\n *\n * Fulfills with the `kernel_info_response` content when the shell reply is\n * received and validated.\n */\n async requestKernelInfo() {\n const msg = KernelMessage.createMessage({\n msgType: 'kernel_info_request',\n channel: 'shell',\n username: this._username,\n session: this._clientId,\n content: {}\n });\n let reply;\n try {\n reply = (await Private.handleShellMessage(this, msg));\n }\n catch (e) {\n // If we rejected because the future was disposed, ignore and return.\n if (this.isDisposed) {\n return;\n }\n else {\n throw e;\n }\n }\n this._errorIfDisposed();\n if (!reply) {\n return;\n }\n // Kernels sometimes do not include a status field on kernel_info_reply\n // messages, so set a default for now.\n // See https://github.com/jupyterlab/jupyterlab/issues/6760\n if (reply.content.status === undefined) {\n reply.content.status = 'ok';\n }\n if (reply.content.status !== 'ok') {\n this._info.reject('Kernel info reply errored');\n return reply;\n }\n this._info.resolve(reply.content);\n this._kernelSession = reply.header.session;\n return reply;\n }\n /**\n * Send a `complete_request` message.\n *\n * #### Notes\n * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#completion).\n *\n * Fulfills with the `complete_reply` content when the shell reply is\n * received and validated.\n */\n requestComplete(content) {\n const msg = KernelMessage.createMessage({\n msgType: 'complete_request',\n channel: 'shell',\n username: this._username,\n session: this._clientId,\n content\n });\n return Private.handleShellMessage(this, msg);\n }\n /**\n * Send an `inspect_request` message.\n *\n * #### Notes\n * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#introspection).\n *\n * Fulfills with the `inspect_reply` content when the shell reply is\n * received and validated.\n */\n requestInspect(content) {\n const msg = KernelMessage.createMessage({\n msgType: 'inspect_request',\n channel: 'shell',\n username: this._username,\n session: this._clientId,\n content: content\n });\n return Private.handleShellMessage(this, msg);\n }\n /**\n * Send a `history_request` message.\n *\n * #### Notes\n * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#history).\n *\n * Fulfills with the `history_reply` content when the shell reply is\n * received and validated.\n */\n requestHistory(content) {\n const msg = KernelMessage.createMessage({\n msgType: 'history_request',\n channel: 'shell',\n username: this._username,\n session: this._clientId,\n content\n });\n return Private.handleShellMessage(this, msg);\n }\n /**\n * Send an `execute_request` message.\n *\n * #### Notes\n * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#execute).\n *\n * Future `onReply` is called with the `execute_reply` content when the\n * shell reply is received and validated. The future will resolve when\n * this message is received and the `idle` iopub status is received.\n * The future will also be disposed at this point unless `disposeOnDone`\n * is specified and `false`, in which case it is up to the caller to dispose\n * of the future.\n *\n * **See also:** [[IExecuteReply]]\n */\n requestExecute(content, disposeOnDone = true, metadata) {\n const defaults = {\n silent: false,\n store_history: true,\n user_expressions: {},\n allow_stdin: true,\n stop_on_error: false\n };\n const msg = KernelMessage.createMessage({\n msgType: 'execute_request',\n channel: 'shell',\n username: this._username,\n session: this._clientId,\n content: { ...defaults, ...content },\n metadata\n });\n return this.sendShellMessage(msg, true, disposeOnDone);\n }\n /**\n * Send an experimental `debug_request` message.\n *\n * @hidden\n *\n * #### Notes\n * Debug messages are experimental messages that are not in the official\n * kernel message specification. As such, this function is *NOT* considered\n * part of the public API, and may change without notice.\n */\n requestDebug(content, disposeOnDone = true) {\n const msg = KernelMessage.createMessage({\n msgType: 'debug_request',\n channel: 'control',\n username: this._username,\n session: this._clientId,\n content\n });\n return this.sendControlMessage(msg, true, disposeOnDone);\n }\n /**\n * Send an `is_complete_request` message.\n *\n * #### Notes\n * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#code-completeness).\n *\n * Fulfills with the `is_complete_response` content when the shell reply is\n * received and validated.\n */\n requestIsComplete(content) {\n const msg = KernelMessage.createMessage({\n msgType: 'is_complete_request',\n channel: 'shell',\n username: this._username,\n session: this._clientId,\n content\n });\n return Private.handleShellMessage(this, msg);\n }\n /**\n * Send a `comm_info_request` message.\n *\n * #### Notes\n * Fulfills with the `comm_info_reply` content when the shell reply is\n * received and validated.\n */\n requestCommInfo(content) {\n const msg = KernelMessage.createMessage({\n msgType: 'comm_info_request',\n channel: 'shell',\n username: this._username,\n session: this._clientId,\n content\n });\n return Private.handleShellMessage(this, msg);\n }\n /**\n * Send an `input_reply` message.\n *\n * #### Notes\n * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#messages-on-the-stdin-router-dealer-sockets).\n */\n sendInputReply(content, parent_header) {\n const msg = KernelMessage.createMessage({\n msgType: 'input_reply',\n channel: 'stdin',\n username: this._username,\n session: this._clientId,\n content\n });\n msg.parent_header = parent_header;\n this._sendMessage(msg);\n this._anyMessage.emit({ msg, direction: 'send' });\n this.hasPendingInput = false;\n }\n /**\n * Create a new comm.\n *\n * #### Notes\n * If a client-side comm already exists with the given commId, an error is thrown.\n * If the kernel does not handle comms, an error is thrown.\n */\n createComm(targetName, commId = coreutils_2.UUID.uuid4()) {\n if (!this.handleComms) {\n throw new Error('Comms are disabled on this kernel connection');\n }\n if (this._comms.has(commId)) {\n throw new Error('Comm is already created');\n }\n const comm = new comm_1.CommHandler(targetName, commId, this, () => {\n this._unregisterComm(commId);\n });\n this._comms.set(commId, comm);\n return comm;\n }\n /**\n * Check if a comm exists.\n */\n hasComm(commId) {\n return this._comms.has(commId);\n }\n /**\n * Register a comm target handler.\n *\n * @param targetName - The name of the comm target.\n *\n * @param callback - The callback invoked for a comm open message.\n *\n * @returns A disposable used to unregister the comm target.\n *\n * #### Notes\n * Only one comm target can be registered to a target name at a time, an\n * existing callback for the same target name will be overridden. A registered\n * comm target handler will take precedence over a comm which specifies a\n * `target_module`.\n *\n * If the callback returns a promise, kernel message processing will pause\n * until the returned promise is fulfilled.\n */\n registerCommTarget(targetName, callback) {\n if (!this.handleComms) {\n return;\n }\n this._targetRegistry[targetName] = callback;\n }\n /**\n * Remove a comm target handler.\n *\n * @param targetName - The name of the comm target to remove.\n *\n * @param callback - The callback to remove.\n *\n * #### Notes\n * The comm target is only removed if the callback argument matches.\n */\n removeCommTarget(targetName, callback) {\n if (!this.handleComms) {\n return;\n }\n if (!this.isDisposed && this._targetRegistry[targetName] === callback) {\n delete this._targetRegistry[targetName];\n }\n }\n /**\n * Register an IOPub message hook.\n *\n * @param msg_id - The parent_header message id the hook will intercept.\n *\n * @param hook - The callback invoked for the message.\n *\n * #### Notes\n * The IOPub hook system allows you to preempt the handlers for IOPub\n * messages that are responses to a given message id.\n *\n * The most recently registered hook is run first. A hook can return a\n * boolean or a promise to a boolean, in which case all kernel message\n * processing pauses until the promise is fulfilled. If a hook return value\n * resolves to false, any later hooks will not run and the function will\n * return a promise resolving to false. If a hook throws an error, the error\n * is logged to the console and the next hook is run. If a hook is\n * registered during the hook processing, it will not run until the next\n * message. If a hook is removed during the hook processing, it will be\n * deactivated immediately.\n *\n * See also [[IFuture.registerMessageHook]].\n */\n registerMessageHook(msgId, hook) {\n var _a;\n const future = (_a = this._futures) === null || _a === void 0 ? void 0 : _a.get(msgId);\n if (future) {\n future.registerMessageHook(hook);\n }\n }\n /**\n * Remove an IOPub message hook.\n *\n * @param msg_id - The parent_header message id the hook intercepted.\n *\n * @param hook - The callback invoked for the message.\n *\n */\n removeMessageHook(msgId, hook) {\n var _a;\n const future = (_a = this._futures) === null || _a === void 0 ? void 0 : _a.get(msgId);\n if (future) {\n future.removeMessageHook(hook);\n }\n }\n /**\n * Remove the input guard, if any.\n */\n removeInputGuard() {\n this.hasPendingInput = false;\n }\n /**\n * Handle a message with a display id.\n *\n * @returns Whether the message was handled.\n */\n async _handleDisplayId(displayId, msg) {\n var _a, _b;\n const msgId = msg.parent_header.msg_id;\n let parentIds = this._displayIdToParentIds.get(displayId);\n if (parentIds) {\n // We've seen it before, update existing outputs with same display_id\n // by handling display_data as update_display_data.\n const updateMsg = {\n header: coreutils_2.JSONExt.deepCopy(msg.header),\n parent_header: coreutils_2.JSONExt.deepCopy(msg.parent_header),\n metadata: coreutils_2.JSONExt.deepCopy(msg.metadata),\n content: coreutils_2.JSONExt.deepCopy(msg.content),\n channel: msg.channel,\n buffers: msg.buffers ? msg.buffers.slice() : []\n };\n updateMsg.header.msg_type = 'update_display_data';\n await Promise.all(parentIds.map(async (parentId) => {\n const future = this._futures && this._futures.get(parentId);\n if (future) {\n await future.handleMsg(updateMsg);\n }\n }));\n }\n // We're done here if it's update_display.\n if (msg.header.msg_type === 'update_display_data') {\n // It's an update, don't proceed to the normal display.\n return true;\n }\n // Regular display_data with id, record it for future updating\n // in _displayIdToParentIds for future lookup.\n parentIds = (_a = this._displayIdToParentIds.get(displayId)) !== null && _a !== void 0 ? _a : [];\n if (parentIds.indexOf(msgId) === -1) {\n parentIds.push(msgId);\n }\n this._displayIdToParentIds.set(displayId, parentIds);\n // Add to our map of display ids for this message.\n const displayIds = (_b = this._msgIdToDisplayIds.get(msgId)) !== null && _b !== void 0 ? _b : [];\n if (displayIds.indexOf(msgId) === -1) {\n displayIds.push(msgId);\n }\n this._msgIdToDisplayIds.set(msgId, displayIds);\n // Let the message propagate to the intended recipient.\n return false;\n }\n /**\n * Forcefully clear the socket state.\n *\n * #### Notes\n * This will clear all socket state without calling any handlers and will\n * not update the connection status. If you call this method, you are\n * responsible for updating the connection status as needed and recreating\n * the socket if you plan to reconnect.\n */\n _clearSocket() {\n if (this._ws !== null) {\n // Clear the websocket event handlers and the socket itself.\n this._ws.onopen = this._noOp;\n this._ws.onclose = this._noOp;\n this._ws.onerror = this._noOp;\n this._ws.onmessage = this._noOp;\n this._ws.close();\n this._ws = null;\n }\n }\n /**\n * Handle status iopub messages from the kernel.\n */\n _updateStatus(status) {\n if (this._status === status || this._status === 'dead') {\n return;\n }\n this._status = status;\n Private.logKernelStatus(this);\n this._statusChanged.emit(status);\n if (status === 'dead') {\n this.dispose();\n }\n }\n /**\n * Send pending messages to the kernel.\n */\n _sendPending() {\n // We check to make sure we are still connected each time. For\n // example, if a websocket buffer overflows, it may close, so we should\n // stop sending messages.\n while (this.connectionStatus === 'connected' &&\n this._kernelSession !== RESTARTING_KERNEL_SESSION &&\n this._pendingMessages.length > 0) {\n this._sendMessage(this._pendingMessages[0], false);\n // We shift the message off the queue after the message is sent so that\n // if there is an exception, the message is still pending.\n this._pendingMessages.shift();\n }\n }\n /**\n * Clear the internal state.\n */\n _clearKernelState() {\n this._kernelSession = '';\n this._pendingMessages = [];\n this._futures.forEach(future => {\n future.dispose();\n });\n this._comms.forEach(comm => {\n comm.dispose();\n });\n this._msgChain = Promise.resolve();\n this._futures = new Map();\n this._comms = new Map();\n this._displayIdToParentIds.clear();\n this._msgIdToDisplayIds.clear();\n }\n /**\n * Check to make sure it is okay to proceed to handle a message.\n *\n * #### Notes\n * Because we handle messages asynchronously, before a message is handled the\n * kernel might be disposed or restarted (and have a different session id).\n * This function throws an error in each of these cases. This is meant to be\n * called at the start of an asynchronous message handler to cancel message\n * processing if the message no longer is valid.\n */\n _assertCurrentMessage(msg) {\n this._errorIfDisposed();\n if (msg.header.session !== this._kernelSession) {\n throw new Error(`Canceling handling of old message: ${msg.header.msg_type}`);\n }\n }\n /**\n * Handle a `comm_open` kernel message.\n */\n async _handleCommOpen(msg) {\n this._assertCurrentMessage(msg);\n const content = msg.content;\n const comm = new comm_1.CommHandler(content.target_name, content.comm_id, this, () => {\n this._unregisterComm(content.comm_id);\n });\n this._comms.set(content.comm_id, comm);\n try {\n const target = await Private.loadObject(content.target_name, content.target_module, this._targetRegistry);\n await target(comm, msg);\n }\n catch (e) {\n // Close the comm asynchronously. We cannot block message processing on\n // kernel messages to wait for another kernel message.\n comm.close();\n console.error('Exception opening new comm');\n throw e;\n }\n }\n /**\n * Handle 'comm_close' kernel message.\n */\n async _handleCommClose(msg) {\n this._assertCurrentMessage(msg);\n const content = msg.content;\n const comm = this._comms.get(content.comm_id);\n if (!comm) {\n console.error('Comm not found for comm id ' + content.comm_id);\n return;\n }\n this._unregisterComm(comm.commId);\n const onClose = comm.onClose;\n if (onClose) {\n // tslint:disable-next-line:await-promise\n await onClose(msg);\n }\n comm.dispose();\n }\n /**\n * Handle a 'comm_msg' kernel message.\n */\n async _handleCommMsg(msg) {\n this._assertCurrentMessage(msg);\n const content = msg.content;\n const comm = this._comms.get(content.comm_id);\n if (!comm) {\n return;\n }\n const onMsg = comm.onMsg;\n if (onMsg) {\n // tslint:disable-next-line:await-promise\n await onMsg(msg);\n }\n }\n /**\n * Unregister a comm instance.\n */\n _unregisterComm(commId) {\n this._comms.delete(commId);\n }\n /**\n * Handle connection status changes.\n */\n _updateConnectionStatus(connectionStatus) {\n if (this._connectionStatus === connectionStatus) {\n return;\n }\n this._connectionStatus = connectionStatus;\n // If we are not 'connecting', reset any reconnection attempts.\n if (connectionStatus !== 'connecting') {\n this._reconnectAttempt = 0;\n clearTimeout(this._reconnectTimeout);\n }\n if (this.status !== 'dead') {\n if (connectionStatus === 'connected') {\n let restarting = this._kernelSession === RESTARTING_KERNEL_SESSION;\n // Send a kernel info request to make sure we send at least one\n // message to get kernel status back. Always request kernel info\n // first, to get kernel status back and ensure iopub is fully\n // established. If we are restarting, this message will skip the queue\n // and be sent immediately.\n let p = this.requestKernelInfo();\n // Send any pending messages after the kernelInfo resolves, or after a\n // timeout as a failsafe.\n let sendPendingCalled = false;\n let sendPendingOnce = () => {\n if (sendPendingCalled) {\n return;\n }\n sendPendingCalled = true;\n if (restarting && this._kernelSession === RESTARTING_KERNEL_SESSION) {\n // We were restarting and a message didn't arrive to set the\n // session, but we just assume the restart succeeded and send any\n // pending messages.\n // FIXME: it would be better to retry the kernel_info_request here\n this._kernelSession = '';\n }\n clearTimeout(timeoutHandle);\n if (this._pendingMessages.length > 0) {\n this._sendPending();\n }\n };\n void p.then(sendPendingOnce);\n // FIXME: if sent while zmq subscriptions are not established,\n // kernelInfo may not resolve, so use a timeout to ensure we don't hang forever.\n // It may be preferable to retry kernelInfo rather than give up after one timeout.\n let timeoutHandle = setTimeout(sendPendingOnce, KERNEL_INFO_TIMEOUT);\n }\n else {\n // If the connection is down, then we do not know what is happening\n // with the kernel, so set the status to unknown.\n this._updateStatus('unknown');\n }\n }\n // Notify others that the connection status changed.\n this._connectionStatusChanged.emit(connectionStatus);\n }\n async _handleMessage(msg) {\n var _a, _b;\n let handled = false;\n // Check to see if we have a display_id we need to reroute.\n if (msg.parent_header &&\n msg.channel === 'iopub' &&\n (KernelMessage.isDisplayDataMsg(msg) ||\n KernelMessage.isUpdateDisplayDataMsg(msg) ||\n KernelMessage.isExecuteResultMsg(msg))) {\n // display_data messages may re-route based on their display_id.\n const transient = ((_a = msg.content.transient) !== null && _a !== void 0 ? _a : {});\n const displayId = transient['display_id'];\n if (displayId) {\n handled = await this._handleDisplayId(displayId, msg);\n // The await above may make this message out of date, so check again.\n this._assertCurrentMessage(msg);\n }\n }\n if (!handled && msg.parent_header) {\n const parentHeader = msg.parent_header;\n const future = (_b = this._futures) === null || _b === void 0 ? void 0 : _b.get(parentHeader.msg_id);\n if (future) {\n await future.handleMsg(msg);\n this._assertCurrentMessage(msg);\n }\n else {\n // If the message was sent by us and was not iopub, it is orphaned.\n const owned = parentHeader.session === this.clientId;\n if (msg.channel !== 'iopub' && owned) {\n this._unhandledMessage.emit(msg);\n }\n }\n }\n if (msg.channel === 'iopub') {\n switch (msg.header.msg_type) {\n case 'status': {\n // Updating the status is synchronous, and we call no async user code\n const executionState = msg.content\n .execution_state;\n if (executionState === 'restarting') {\n // The kernel has been auto-restarted by the server. After\n // processing for this message is completely done, we want to\n // handle this restart, so we don't await, but instead schedule\n // the work as a microtask (i.e., in a promise resolution). We\n // schedule this here so that it comes before any microtasks that\n // might be scheduled in the status signal emission below.\n void Promise.resolve().then(async () => {\n this._updateStatus('autorestarting');\n this._clearKernelState();\n // We must reconnect since the kernel connection information may have\n // changed, and the server only refreshes its zmq connection when a new\n // websocket is opened.\n await this.reconnect();\n });\n }\n this._updateStatus(executionState);\n break;\n }\n case 'comm_open':\n if (this.handleComms) {\n await this._handleCommOpen(msg);\n }\n break;\n case 'comm_msg':\n if (this.handleComms) {\n await this._handleCommMsg(msg);\n }\n break;\n case 'comm_close':\n if (this.handleComms) {\n await this._handleCommClose(msg);\n }\n break;\n default:\n break;\n }\n // If the message was a status dead message, we might have disposed ourselves.\n if (!this.isDisposed) {\n this._assertCurrentMessage(msg);\n // the message wouldn't be emitted if we were disposed anyway.\n this._iopubMessage.emit(msg);\n }\n }\n }\n /**\n * Attempt a connection if we have not exhausted connection attempts.\n */\n _reconnect() {\n this._errorIfDisposed();\n // Clear any existing reconnection attempt\n clearTimeout(this._reconnectTimeout);\n // Update the connection status and schedule a possible reconnection.\n if (this._reconnectAttempt < this._reconnectLimit) {\n this._updateConnectionStatus('connecting');\n // The first reconnect attempt should happen immediately, and subsequent\n // attempts should pick a random number in a growing range so that we\n // don't overload the server with synchronized reconnection attempts\n // across multiple kernels.\n const timeout = Private.getRandomIntInclusive(0, 1e3 * (Math.pow(2, this._reconnectAttempt) - 1));\n console.warn(`Connection lost, reconnecting in ${Math.floor(timeout / 1000)} seconds.`);\n // Try reconnection with subprotocols if the server had supported them.\n // Otherwise, try reconnection without subprotocols.\n const useProtocols = this._selectedProtocol !== '' ? true : false;\n this._reconnectTimeout = setTimeout(this._createSocket, timeout, useProtocols);\n this._reconnectAttempt += 1;\n }\n else {\n this._updateConnectionStatus('disconnected');\n }\n // Clear the websocket event handlers and the socket itself.\n this._clearSocket();\n }\n /**\n * Utility function to throw an error if this instance is disposed.\n */\n _errorIfDisposed() {\n if (this.isDisposed) {\n throw new Error('Kernel connection is disposed');\n }\n }\n get hasPendingInput() {\n return this._hasPendingInput;\n }\n set hasPendingInput(value) {\n this._hasPendingInput = value;\n this._pendingInput.emit(value);\n }\n}\nexports.KernelConnection = KernelConnection;\n/**\n * A private namespace for the Kernel.\n */\nvar Private;\n(function (Private) {\n /**\n * Log the current kernel status.\n */\n function logKernelStatus(kernel) {\n switch (kernel.status) {\n case 'idle':\n case 'busy':\n case 'unknown':\n return;\n default:\n console.debug(`Kernel: ${kernel.status} (${kernel.id})`);\n break;\n }\n }\n Private.logKernelStatus = logKernelStatus;\n /**\n * Send a kernel message to the kernel and resolve the reply message.\n */\n async function handleShellMessage(kernel, msg) {\n const future = kernel.sendShellMessage(msg, true);\n return future.done;\n }\n Private.handleShellMessage = handleShellMessage;\n /**\n * Try to load an object from a module or a registry.\n *\n * Try to load an object from a module asynchronously if a module\n * is specified, otherwise tries to load an object from the global\n * registry, if the global registry is provided.\n *\n * #### Notes\n * Loading a module uses requirejs.\n */\n function loadObject(name, moduleName, registry) {\n return new Promise((resolve, reject) => {\n // Try loading the module using require.js\n if (moduleName) {\n if (typeof requirejs === 'undefined') {\n throw new Error('requirejs not found');\n }\n requirejs([moduleName], (mod) => {\n if (mod[name] === void 0) {\n const msg = `Object '${name}' not found in module '${moduleName}'`;\n reject(new Error(msg));\n }\n else {\n resolve(mod[name]);\n }\n }, reject);\n }\n else {\n if (registry === null || registry === void 0 ? void 0 : registry[name]) {\n resolve(registry[name]);\n }\n else {\n reject(new Error(`Object '${name}' not found in registry`));\n }\n }\n });\n }\n Private.loadObject = loadObject;\n /**\n * Get a random integer between min and max, inclusive of both.\n *\n * #### Notes\n * From\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random#Getting_a_random_integer_between_two_values_inclusive\n *\n * From the MDN page: It might be tempting to use Math.round() to accomplish\n * that, but doing so would cause your random numbers to follow a non-uniform\n * distribution, which may not be acceptable for your needs.\n */\n function getRandomIntInclusive(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n }\n Private.getRandomIntInclusive = getRandomIntInclusive;\n})(Private || (Private = {}));\n//# sourceMappingURL=default.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.KernelShellFutureHandler = exports.KernelControlFutureHandler = exports.KernelFutureHandler = void 0;\nconst coreutils_1 = require(\"@lumino/coreutils\");\nconst disposable_1 = require(\"@lumino/disposable\");\nconst KernelMessage = __importStar(require(\"./messages\"));\n/**\n * Implementation of a kernel future.\n *\n * If a reply is expected, the Future is considered done when both a `reply`\n * message and an `idle` iopub status message have been received. Otherwise, it\n * is considered done when the `idle` status is received.\n *\n */\nclass KernelFutureHandler extends disposable_1.DisposableDelegate {\n /**\n * Construct a new KernelFutureHandler.\n */\n constructor(cb, msg, expectReply, disposeOnDone, kernel) {\n super(cb);\n this._status = 0;\n this._stdin = Private.noOp;\n this._iopub = Private.noOp;\n this._reply = Private.noOp;\n this._done = new coreutils_1.PromiseDelegate();\n this._hooks = new Private.HookList();\n this._disposeOnDone = true;\n this._msg = msg;\n if (!expectReply) {\n this._setFlag(Private.KernelFutureFlag.GotReply);\n }\n this._disposeOnDone = disposeOnDone;\n this._kernel = kernel;\n }\n /**\n * Get the original outgoing message.\n */\n get msg() {\n return this._msg;\n }\n /**\n * A promise that resolves when the future is done.\n */\n get done() {\n return this._done.promise;\n }\n /**\n * Get the reply handler.\n */\n get onReply() {\n return this._reply;\n }\n /**\n * Set the reply handler.\n */\n set onReply(cb) {\n this._reply = cb;\n }\n /**\n * Get the iopub handler.\n */\n get onIOPub() {\n return this._iopub;\n }\n /**\n * Set the iopub handler.\n */\n set onIOPub(cb) {\n this._iopub = cb;\n }\n /**\n * Get the stdin handler.\n */\n get onStdin() {\n return this._stdin;\n }\n /**\n * Set the stdin handler.\n */\n set onStdin(cb) {\n this._stdin = cb;\n }\n /**\n * Register hook for IOPub messages.\n *\n * @param hook - The callback invoked for an IOPub message.\n *\n * #### Notes\n * The IOPub hook system allows you to preempt the handlers for IOPub\n * messages handled by the future.\n *\n * The most recently registered hook is run first. A hook can return a\n * boolean or a promise to a boolean, in which case all kernel message\n * processing pauses until the promise is fulfilled. If a hook return value\n * resolves to false, any later hooks will not run and the function will\n * return a promise resolving to false. If a hook throws an error, the error\n * is logged to the console and the next hook is run. If a hook is\n * registered during the hook processing, it will not run until the next\n * message. If a hook is removed during the hook processing, it will be\n * deactivated immediately.\n */\n registerMessageHook(hook) {\n if (this.isDisposed) {\n throw new Error('Kernel future is disposed');\n }\n this._hooks.add(hook);\n }\n /**\n * Remove a hook for IOPub messages.\n *\n * @param hook - The hook to remove.\n *\n * #### Notes\n * If a hook is removed during the hook processing, it will be deactivated immediately.\n */\n removeMessageHook(hook) {\n if (this.isDisposed) {\n return;\n }\n this._hooks.remove(hook);\n }\n /**\n * Send an `input_reply` message.\n */\n sendInputReply(content, parent_header) {\n this._kernel.sendInputReply(content, parent_header);\n }\n /**\n * Dispose and unregister the future.\n */\n dispose() {\n this._stdin = Private.noOp;\n this._iopub = Private.noOp;\n this._reply = Private.noOp;\n this._hooks = null;\n if (!this._testFlag(Private.KernelFutureFlag.IsDone)) {\n // TODO: Uncomment the following logging code, and check for any tests that trigger it.\n // let status = [];\n // if (!this._testFlag(Private.KernelFutureFlag.GotIdle)) {\n // status.push('idle');\n // }\n // if (!this._testFlag(Private.KernelFutureFlag.GotReply)) {\n // status.push('reply');\n // }\n // console.warn(\n // `*************** DISPOSED BEFORE DONE: K${this._kernel.id.slice(\n // 0,\n // 6\n // )} M${this._msg.header.msg_id.slice(0, 6)} missing ${status.join(' ')}`\n // );\n // Reject the `done` promise, but catch its error here in case no one else\n // is waiting for the promise to resolve. This prevents the error from\n // being displayed in the console, but does not prevent it from being\n // caught by a client who is waiting for it.\n this._done.promise.catch(() => {\n /* no-op */\n });\n this._done.reject(new Error(`Canceled future for ${this.msg.header.msg_type} message before replies were done`));\n }\n super.dispose();\n }\n /**\n * Handle an incoming kernel message.\n */\n async handleMsg(msg) {\n switch (msg.channel) {\n case 'control':\n case 'shell':\n if (msg.channel === this.msg.channel &&\n msg.parent_header.msg_id === this.msg.header.msg_id) {\n await this._handleReply(msg);\n }\n break;\n case 'stdin':\n await this._handleStdin(msg);\n break;\n case 'iopub':\n await this._handleIOPub(msg);\n break;\n default:\n break;\n }\n }\n async _handleReply(msg) {\n const reply = this._reply;\n if (reply) {\n // tslint:disable-next-line:await-promise\n await reply(msg);\n }\n this._replyMsg = msg;\n this._setFlag(Private.KernelFutureFlag.GotReply);\n if (this._testFlag(Private.KernelFutureFlag.GotIdle)) {\n this._handleDone();\n }\n }\n async _handleStdin(msg) {\n this._kernel.hasPendingInput = true;\n const stdin = this._stdin;\n if (stdin) {\n // tslint:disable-next-line:await-promise\n await stdin(msg);\n }\n }\n async _handleIOPub(msg) {\n const process = await this._hooks.process(msg);\n const iopub = this._iopub;\n if (process && iopub) {\n // tslint:disable-next-line:await-promise\n await iopub(msg);\n }\n if (KernelMessage.isStatusMsg(msg) &&\n msg.content.execution_state === 'idle') {\n this._setFlag(Private.KernelFutureFlag.GotIdle);\n if (this._testFlag(Private.KernelFutureFlag.GotReply)) {\n this._handleDone();\n }\n }\n }\n _handleDone() {\n if (this._testFlag(Private.KernelFutureFlag.IsDone)) {\n return;\n }\n this._setFlag(Private.KernelFutureFlag.IsDone);\n this._done.resolve(this._replyMsg);\n if (this._disposeOnDone) {\n this.dispose();\n }\n }\n /**\n * Test whether the given future flag is set.\n */\n _testFlag(flag) {\n // tslint:disable-next-line\n return (this._status & flag) !== 0;\n }\n /**\n * Set the given future flag.\n */\n _setFlag(flag) {\n // tslint:disable-next-line\n this._status |= flag;\n }\n}\nexports.KernelFutureHandler = KernelFutureHandler;\nclass KernelControlFutureHandler extends KernelFutureHandler {\n}\nexports.KernelControlFutureHandler = KernelControlFutureHandler;\nclass KernelShellFutureHandler extends KernelFutureHandler {\n}\nexports.KernelShellFutureHandler = KernelShellFutureHandler;\nvar Private;\n(function (Private) {\n /**\n * A no-op function.\n */\n Private.noOp = () => {\n /* no-op */\n };\n /**\n * Defer a computation.\n *\n * #### NOTES\n * We can't just use requestAnimationFrame since it is not available in node.\n * This implementation is from Phosphor:\n * https://github.com/phosphorjs/phosphor/blob/e88e4321289bb1198f3098e7bda40736501f2ed8/tests/test-messaging/src/index.spec.ts#L63\n */\n const defer = (() => {\n const ok = typeof requestAnimationFrame === 'function';\n return ok ? requestAnimationFrame : setImmediate;\n })();\n class HookList {\n constructor() {\n this._hooks = [];\n }\n /**\n * Register a hook.\n *\n * @param hook - The callback to register.\n */\n add(hook) {\n this.remove(hook);\n this._hooks.push(hook);\n }\n /**\n * Remove a hook, if it exists in the hook list.\n *\n * @param hook - The callback to remove.\n */\n remove(hook) {\n const index = this._hooks.indexOf(hook);\n if (index >= 0) {\n this._hooks[index] = null;\n this._scheduleCompact();\n }\n }\n /**\n * Process a message through the hooks.\n *\n * @returns a promise resolving to false if any hook resolved as false,\n * otherwise true\n *\n * #### Notes\n * The most recently registered hook is run first. A hook can return a\n * boolean or a promise to a boolean, in which case processing pauses until\n * the promise is fulfilled. If a hook return value resolves to false, any\n * later hooks will not run and the function will return a promise resolving\n * to false. If a hook throws an error, the error is logged to the console\n * and the next hook is run. If a hook is registered during the hook\n * processing, it will not run until the next message. If a hook is removed\n * during the hook processing, it will be deactivated immediately.\n */\n async process(msg) {\n // Wait until we can start a new process run.\n await this._processing;\n // Start the next process run.\n const processing = new coreutils_1.PromiseDelegate();\n this._processing = processing.promise;\n let continueHandling;\n // Call the end hook (most recently-added) first. Starting at the end also\n // guarantees that hooks added during the processing will not be run in\n // this process run.\n for (let i = this._hooks.length - 1; i >= 0; i--) {\n const hook = this._hooks[i];\n // If the hook has been removed, continue to the next one.\n if (hook === null) {\n continue;\n }\n // Execute the hook and log any errors.\n try {\n // tslint:disable-next-line:await-promise\n continueHandling = await hook(msg);\n }\n catch (err) {\n continueHandling = true;\n console.error(err);\n }\n // If the hook resolved to false, stop processing and return.\n if (continueHandling === false) {\n processing.resolve(undefined);\n return false;\n }\n }\n // All hooks returned true (or errored out), so return true.\n processing.resolve(undefined);\n return true;\n }\n /**\n * Schedule a cleanup of the list, removing any hooks that have been nulled out.\n */\n _scheduleCompact() {\n if (!this._compactScheduled) {\n this._compactScheduled = true;\n // Schedule a compaction in between processing runs. We do the\n // scheduling in an animation frame to rate-limit our compactions. If we\n // need to compact more frequently, we can change this to directly\n // schedule the compaction.\n defer(() => {\n this._processing = this._processing.then(() => {\n this._compactScheduled = false;\n this._compact();\n });\n });\n }\n }\n /**\n * Compact the list, removing any nulls.\n */\n _compact() {\n let numNulls = 0;\n for (let i = 0, len = this._hooks.length; i < len; i++) {\n const hook = this._hooks[i];\n if (this._hooks[i] === null) {\n numNulls++;\n }\n else {\n this._hooks[i - numNulls] = hook;\n }\n }\n this._hooks.length -= numNulls;\n }\n }\n Private.HookList = HookList;\n /**\n * Bit flags for the kernel future state.\n */\n let KernelFutureFlag;\n (function (KernelFutureFlag) {\n KernelFutureFlag[KernelFutureFlag[\"GotReply\"] = 1] = \"GotReply\";\n KernelFutureFlag[KernelFutureFlag[\"GotIdle\"] = 2] = \"GotIdle\";\n KernelFutureFlag[KernelFutureFlag[\"IsDone\"] = 4] = \"IsDone\";\n KernelFutureFlag[KernelFutureFlag[\"DisposeOnDone\"] = 8] = \"DisposeOnDone\";\n })(KernelFutureFlag = Private.KernelFutureFlag || (Private.KernelFutureFlag = {}));\n})(Private || (Private = {}));\n//# sourceMappingURL=future.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.KernelConnection = exports.KernelAPI = exports.KernelMessage = exports.Kernel = void 0;\n// Namespace some of our modules for convenience and backwards compatibility.\nconst Kernel = __importStar(require(\"./kernel\"));\nexports.Kernel = Kernel;\nconst KernelMessage = __importStar(require(\"./messages\"));\nexports.KernelMessage = KernelMessage;\nconst KernelAPI = __importStar(require(\"./restapi\"));\nexports.KernelAPI = KernelAPI;\nconst default_1 = require(\"./default\");\nObject.defineProperty(exports, \"KernelConnection\", { enumerable: true, get: function () { return default_1.KernelConnection; } });\n__exportStar(require(\"./manager\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=kernel.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.KernelManager = void 0;\nconst polling_1 = require(\"@lumino/polling\");\nconst signaling_1 = require(\"@lumino/signaling\");\nconst __1 = require(\"..\");\nconst basemanager_1 = require(\"../basemanager\");\nconst restapi_1 = require(\"./restapi\");\nconst default_1 = require(\"./default\");\n/**\n * An implementation of a kernel manager.\n */\nclass KernelManager extends basemanager_1.BaseManager {\n /**\n * Construct a new kernel manager.\n *\n * @param options - The default options for kernel.\n */\n constructor(options = {}) {\n var _a;\n super(options);\n this._isReady = false;\n this._kernelConnections = new Set();\n this._models = new Map();\n this._runningChanged = new signaling_1.Signal(this);\n this._connectionFailure = new signaling_1.Signal(this);\n // Start model and specs polling with exponential backoff.\n this._pollModels = new polling_1.Poll({\n auto: false,\n factory: () => this.requestRunning(),\n frequency: {\n interval: 10 * 1000,\n backoff: true,\n max: 300 * 1000\n },\n name: `@jupyterlab/services:KernelManager#models`,\n standby: (_a = options.standby) !== null && _a !== void 0 ? _a : 'when-hidden'\n });\n // Initialize internal data.\n this._ready = (async () => {\n await this._pollModels.start();\n await this._pollModels.tick;\n this._isReady = true;\n })();\n }\n /**\n * Test whether the manager is ready.\n */\n get isReady() {\n return this._isReady;\n }\n /**\n * A promise that fulfills when the manager is ready.\n */\n get ready() {\n return this._ready;\n }\n /**\n * A signal emitted when the running kernels change.\n */\n get runningChanged() {\n return this._runningChanged;\n }\n /**\n * A signal emitted when there is a connection failure.\n */\n get connectionFailure() {\n return this._connectionFailure;\n }\n /**\n * Dispose of the resources used by the manager.\n */\n dispose() {\n if (this.isDisposed) {\n return;\n }\n this._models.clear();\n this._kernelConnections.forEach(x => x.dispose());\n this._pollModels.dispose();\n super.dispose();\n }\n /**\n * Connect to an existing kernel.\n *\n * @returns The new kernel connection.\n *\n * #### Notes\n * This will use the manager's server settings and ignore any server\n * settings passed in the options.\n */\n connectTo(options) {\n var _a;\n const { id } = options.model;\n let handleComms = (_a = options.handleComms) !== null && _a !== void 0 ? _a : true;\n // By default, handle comms only if no other kernel connection is.\n if (options.handleComms === undefined) {\n for (const kc of this._kernelConnections) {\n if (kc.id === id && kc.handleComms) {\n handleComms = false;\n break;\n }\n }\n }\n const kernelConnection = new default_1.KernelConnection({\n handleComms,\n ...options,\n serverSettings: this.serverSettings\n });\n this._onStarted(kernelConnection);\n if (!this._models.has(id)) {\n // We trust the user to connect to an existing kernel, but we verify\n // asynchronously.\n void this.refreshRunning().catch(() => {\n /* no-op */\n });\n }\n return kernelConnection;\n }\n /**\n * Create an iterator over the most recent running kernels.\n *\n * @returns A new iterator over the running kernels.\n */\n running() {\n return this._models.values();\n }\n /**\n * Force a refresh of the running kernels.\n *\n * @returns A promise that resolves when the running list has been refreshed.\n *\n * #### Notes\n * This is not typically meant to be called by the user, since the\n * manager maintains its own internal state.\n */\n async refreshRunning() {\n await this._pollModels.refresh();\n await this._pollModels.tick;\n }\n /**\n * Start a new kernel.\n *\n * @param createOptions - The kernel creation options\n *\n * @param connectOptions - The kernel connection options\n *\n * @returns A promise that resolves with the kernel connection.\n *\n * #### Notes\n * The manager `serverSettings` will be always be used.\n */\n async startNew(createOptions = {}, connectOptions = {}) {\n const model = await (0, restapi_1.startNew)(createOptions, this.serverSettings);\n return this.connectTo({\n ...connectOptions,\n model\n });\n }\n /**\n * Shut down a kernel by id.\n *\n * @param id - The id of the target kernel.\n *\n * @returns A promise that resolves when the operation is complete.\n */\n async shutdown(id) {\n await (0, restapi_1.shutdownKernel)(id, this.serverSettings);\n await this.refreshRunning();\n }\n /**\n * Shut down all kernels.\n *\n * @returns A promise that resolves when all of the kernels are shut down.\n */\n async shutdownAll() {\n // Update the list of models to make sure our list is current.\n await this.refreshRunning();\n // Shut down all models.\n await Promise.all([...this._models.keys()].map(id => (0, restapi_1.shutdownKernel)(id, this.serverSettings)));\n // Update the list of models to clear out our state.\n await this.refreshRunning();\n }\n /**\n * Find a kernel by id.\n *\n * @param id - The id of the target kernel.\n *\n * @returns A promise that resolves with the kernel's model.\n */\n async findById(id) {\n if (this._models.has(id)) {\n return this._models.get(id);\n }\n await this.refreshRunning();\n return this._models.get(id);\n }\n /**\n * Execute a request to the server to poll running kernels and update state.\n */\n async requestRunning() {\n var _a, _b;\n let models;\n try {\n models = await (0, restapi_1.listRunning)(this.serverSettings);\n }\n catch (err) {\n // Handle network errors, as well as cases where we are on a\n // JupyterHub and the server is not running. JupyterHub returns a\n // 503 (<2.0) or 424 (>2.0) in that case.\n if (err instanceof __1.ServerConnection.NetworkError ||\n ((_a = err.response) === null || _a === void 0 ? void 0 : _a.status) === 503 ||\n ((_b = err.response) === null || _b === void 0 ? void 0 : _b.status) === 424) {\n this._connectionFailure.emit(err);\n }\n throw err;\n }\n if (this.isDisposed) {\n return;\n }\n if (this._models.size === models.length &&\n models.every(model => {\n const existing = this._models.get(model.id);\n if (!existing) {\n return false;\n }\n return (existing.connections === model.connections &&\n existing.execution_state === model.execution_state &&\n existing.last_activity === model.last_activity &&\n existing.name === model.name &&\n existing.reason === model.reason &&\n existing.traceback === model.traceback);\n })) {\n // Identical models list (presuming models does not contain duplicate\n // ids), so just return\n return;\n }\n this._models = new Map(models.map(x => [x.id, x]));\n // For any kernel connection to a kernel that doesn't exist, notify it of\n // the shutdown.\n this._kernelConnections.forEach(kc => {\n if (!this._models.has(kc.id)) {\n kc.handleShutdown();\n }\n });\n this._runningChanged.emit(models);\n }\n /**\n * Handle a kernel starting.\n */\n _onStarted(kernelConnection) {\n this._kernelConnections.add(kernelConnection);\n kernelConnection.statusChanged.connect(this._onStatusChanged, this);\n kernelConnection.disposed.connect(this._onDisposed, this);\n }\n _onDisposed(kernelConnection) {\n this._kernelConnections.delete(kernelConnection);\n // A dispose emission could mean the server session is deleted, or that\n // the kernel JS object is disposed and the kernel still exists on the\n // server, so we refresh from the server to make sure we reflect the\n // server state.\n void this.refreshRunning().catch(() => {\n /* no-op */\n });\n }\n _onStatusChanged(kernelConnection, status) {\n if (status === 'dead') {\n // We asynchronously update our list of kernels, which asynchronously\n // will dispose them. We do not want to immediately dispose them because\n // there may be other signal handlers that want to be called.\n void this.refreshRunning().catch(() => {\n /* no-op */\n });\n }\n }\n}\nexports.KernelManager = KernelManager;\n/**\n * The namespace for `KernelManager` class statics.\n */\n(function (KernelManager) {\n /**\n * A no-op kernel manager to be used when starting kernels.\n */\n class NoopManager extends KernelManager {\n constructor() {\n super(...arguments);\n this._readyPromise = new Promise(() => {\n /* no-op */\n });\n }\n /**\n * Whether the manager is active.\n */\n get isActive() {\n return false;\n }\n /**\n * Used for testing.\n */\n get parentReady() {\n return super.ready;\n }\n /**\n * Start a new kernel - throws an error since it is not supported.\n */\n async startNew(createOptions = {}, connectOptions = {}) {\n return Promise.reject(new Error('Not implemented in no-op Kernel Manager'));\n }\n /**\n * Connect to an existing kernel - throws an error since it is not supported.\n */\n connectTo(options) {\n throw new Error('Not implemented in no-op Kernel Manager');\n }\n /**\n * Shut down a kernel by id - throws an error since it is not supported.\n */\n async shutdown(id) {\n return Promise.reject(new Error('Not implemented in no-op Kernel Manager'));\n }\n /**\n * A promise that fulfills when the manager is ready (never).\n */\n get ready() {\n return this.parentReady.then(() => this._readyPromise);\n }\n /**\n * Execute a request to the server to poll running kernels and update state.\n */\n async requestRunning() {\n return Promise.resolve();\n }\n }\n KernelManager.NoopManager = NoopManager;\n})(KernelManager = exports.KernelManager || (exports.KernelManager = {}));\n//# sourceMappingURL=manager.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.supportedKernelWebSocketProtocols = exports.isInputReplyMsg = exports.isInputRequestMsg = exports.isDebugReplyMsg = exports.isDebugRequestMsg = exports.isExecuteReplyMsg = exports.isInfoRequestMsg = exports.isCommMsgMsg = exports.isCommCloseMsg = exports.isCommOpenMsg = exports.isDebugEventMsg = exports.isClearOutputMsg = exports.isStatusMsg = exports.isErrorMsg = exports.isExecuteResultMsg = exports.isExecuteInputMsg = exports.isUpdateDisplayDataMsg = exports.isDisplayDataMsg = exports.isStreamMsg = exports.createMessage = void 0;\nconst coreutils_1 = require(\"@lumino/coreutils\");\nfunction createMessage(options) {\n var _a, _b, _c, _d, _e;\n return {\n buffers: (_a = options.buffers) !== null && _a !== void 0 ? _a : [],\n channel: options.channel,\n content: options.content,\n header: {\n date: new Date().toISOString(),\n msg_id: (_b = options.msgId) !== null && _b !== void 0 ? _b : coreutils_1.UUID.uuid4(),\n msg_type: options.msgType,\n session: options.session,\n username: (_c = options.username) !== null && _c !== void 0 ? _c : '',\n version: '5.2'\n },\n metadata: (_d = options.metadata) !== null && _d !== void 0 ? _d : {},\n parent_header: (_e = options.parentHeader) !== null && _e !== void 0 ? _e : {}\n };\n}\nexports.createMessage = createMessage;\n/**\n * Test whether a kernel message is a `'stream'` message.\n */\nfunction isStreamMsg(msg) {\n return msg.header.msg_type === 'stream';\n}\nexports.isStreamMsg = isStreamMsg;\n/**\n * Test whether a kernel message is an `'display_data'` message.\n */\nfunction isDisplayDataMsg(msg) {\n return msg.header.msg_type === 'display_data';\n}\nexports.isDisplayDataMsg = isDisplayDataMsg;\n/**\n * Test whether a kernel message is an `'update_display_data'` message.\n */\nfunction isUpdateDisplayDataMsg(msg) {\n return msg.header.msg_type === 'update_display_data';\n}\nexports.isUpdateDisplayDataMsg = isUpdateDisplayDataMsg;\n/**\n * Test whether a kernel message is an `'execute_input'` message.\n */\nfunction isExecuteInputMsg(msg) {\n return msg.header.msg_type === 'execute_input';\n}\nexports.isExecuteInputMsg = isExecuteInputMsg;\n/**\n * Test whether a kernel message is an `'execute_result'` message.\n */\nfunction isExecuteResultMsg(msg) {\n return msg.header.msg_type === 'execute_result';\n}\nexports.isExecuteResultMsg = isExecuteResultMsg;\n/**\n * Test whether a kernel message is an `'error'` message.\n */\nfunction isErrorMsg(msg) {\n return msg.header.msg_type === 'error';\n}\nexports.isErrorMsg = isErrorMsg;\n/**\n * Test whether a kernel message is a `'status'` message.\n */\nfunction isStatusMsg(msg) {\n return msg.header.msg_type === 'status';\n}\nexports.isStatusMsg = isStatusMsg;\n/**\n * Test whether a kernel message is a `'clear_output'` message.\n */\nfunction isClearOutputMsg(msg) {\n return msg.header.msg_type === 'clear_output';\n}\nexports.isClearOutputMsg = isClearOutputMsg;\n/**\n * Test whether a kernel message is an experimental `'debug_event'` message.\n *\n * @hidden\n *\n * #### Notes\n * Debug messages are experimental messages that are not in the official\n * kernel message specification. As such, this is *NOT* considered\n * part of the public API, and may change without notice.\n */\nfunction isDebugEventMsg(msg) {\n return msg.header.msg_type === 'debug_event';\n}\nexports.isDebugEventMsg = isDebugEventMsg;\n/**\n * Test whether a kernel message is a `'comm_open'` message.\n */\nfunction isCommOpenMsg(msg) {\n return msg.header.msg_type === 'comm_open';\n}\nexports.isCommOpenMsg = isCommOpenMsg;\n/**\n * Test whether a kernel message is a `'comm_close'` message.\n */\nfunction isCommCloseMsg(msg) {\n return msg.header.msg_type === 'comm_close';\n}\nexports.isCommCloseMsg = isCommCloseMsg;\n/**\n * Test whether a kernel message is a `'comm_msg'` message.\n */\nfunction isCommMsgMsg(msg) {\n return msg.header.msg_type === 'comm_msg';\n}\nexports.isCommMsgMsg = isCommMsgMsg;\n/**\n * Test whether a kernel message is a `'kernel_info_request'` message.\n */\nfunction isInfoRequestMsg(msg) {\n return msg.header.msg_type === 'kernel_info_request';\n}\nexports.isInfoRequestMsg = isInfoRequestMsg;\n/**\n * Test whether a kernel message is an `'execute_reply'` message.\n */\nfunction isExecuteReplyMsg(msg) {\n return msg.header.msg_type === 'execute_reply';\n}\nexports.isExecuteReplyMsg = isExecuteReplyMsg;\n/**\n * Test whether a kernel message is an experimental `'debug_request'` message.\n *\n * @hidden\n *\n * #### Notes\n * Debug messages are experimental messages that are not in the official\n * kernel message specification. As such, this is *NOT* considered\n * part of the public API, and may change without notice.\n */\nfunction isDebugRequestMsg(msg) {\n return msg.header.msg_type === 'debug_request';\n}\nexports.isDebugRequestMsg = isDebugRequestMsg;\n/**\n * Test whether a kernel message is an experimental `'debug_reply'` message.\n *\n * @hidden\n *\n * #### Notes\n * Debug messages are experimental messages that are not in the official\n * kernel message specification. As such, this is *NOT* considered\n * part of the public API, and may change without notice.\n */\nfunction isDebugReplyMsg(msg) {\n return msg.header.msg_type === 'debug_reply';\n}\nexports.isDebugReplyMsg = isDebugReplyMsg;\n/**\n * Test whether a kernel message is an `'input_request'` message.\n */\nfunction isInputRequestMsg(msg) {\n return msg.header.msg_type === 'input_request';\n}\nexports.isInputRequestMsg = isInputRequestMsg;\n/**\n * Test whether a kernel message is an `'input_reply'` message.\n */\nfunction isInputReplyMsg(msg) {\n return msg.header.msg_type === 'input_reply';\n}\nexports.isInputReplyMsg = isInputReplyMsg;\n// ///////////////////////////////////////////////\n// Message (de)serialization\n// ///////////////////////////////////////////////\n/**\n * The list of supported kernel wire protocols over websocket.\n */\nvar supportedKernelWebSocketProtocols;\n(function (supportedKernelWebSocketProtocols) {\n supportedKernelWebSocketProtocols[\"v1KernelWebsocketJupyterOrg\"] = \"v1.kernel.websocket.jupyter.org\";\n})(supportedKernelWebSocketProtocols = exports.supportedKernelWebSocketProtocols || (exports.supportedKernelWebSocketProtocols = {}));\n//# sourceMappingURL=messages.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getKernelModel = exports.shutdownKernel = exports.interruptKernel = exports.restartKernel = exports.startNew = exports.listRunning = exports.KERNEL_SERVICE_URL = void 0;\nconst serverconnection_1 = require(\"../serverconnection\");\nconst coreutils_1 = require(\"@jupyterlab/coreutils\");\nconst validate_1 = require(\"./validate\");\n/**\n * The url for the kernel service.\n */\nexports.KERNEL_SERVICE_URL = 'api/kernels';\n/**\n * Fetch the running kernels.\n *\n * @param settings - The optional server settings.\n *\n * @returns A promise that resolves with the list of running kernels.\n *\n * #### Notes\n * Uses the [Jupyter Notebook API](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter-server/jupyter_server/main/jupyter_server/services/api/api.yaml#!/kernels) and validates the response model.\n *\n * The promise is fulfilled on a valid response and rejected otherwise.\n */\nasync function listRunning(settings = serverconnection_1.ServerConnection.makeSettings()) {\n const url = coreutils_1.URLExt.join(settings.baseUrl, exports.KERNEL_SERVICE_URL);\n const response = await serverconnection_1.ServerConnection.makeRequest(url, {}, settings);\n if (response.status !== 200) {\n const err = await serverconnection_1.ServerConnection.ResponseError.create(response);\n throw err;\n }\n const data = await response.json();\n (0, validate_1.validateModels)(data);\n return data;\n}\nexports.listRunning = listRunning;\n/**\n * Start a new kernel.\n *\n * @param options - The options used to create the kernel.\n *\n * @returns A promise that resolves with a kernel connection object.\n *\n * #### Notes\n * Uses the [Jupyter Notebook API](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter-server/jupyter_server/main/jupyter_server/services/api/api.yaml#!/kernels) and validates the response model.\n *\n * The promise is fulfilled on a valid response and rejected otherwise.\n */\nasync function startNew(options = {}, settings = serverconnection_1.ServerConnection.makeSettings()) {\n const url = coreutils_1.URLExt.join(settings.baseUrl, exports.KERNEL_SERVICE_URL);\n const init = {\n method: 'POST',\n body: JSON.stringify(options)\n };\n const response = await serverconnection_1.ServerConnection.makeRequest(url, init, settings);\n if (response.status !== 201) {\n const err = await serverconnection_1.ServerConnection.ResponseError.create(response);\n throw err;\n }\n const data = await response.json();\n (0, validate_1.validateModel)(data);\n return data;\n}\nexports.startNew = startNew;\n/**\n * Restart a kernel.\n *\n * #### Notes\n * Uses the [Jupyter Notebook API](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter-server/jupyter_server/main/jupyter_server/services/api/api.yaml#!/kernels) and validates the response model.\n *\n * The promise is fulfilled on a valid response (and thus after a restart) and rejected otherwise.\n */\nasync function restartKernel(id, settings = serverconnection_1.ServerConnection.makeSettings()) {\n const url = coreutils_1.URLExt.join(settings.baseUrl, exports.KERNEL_SERVICE_URL, encodeURIComponent(id), 'restart');\n const init = { method: 'POST' };\n const response = await serverconnection_1.ServerConnection.makeRequest(url, init, settings);\n if (response.status !== 200) {\n const err = await serverconnection_1.ServerConnection.ResponseError.create(response);\n throw err;\n }\n const data = await response.json();\n (0, validate_1.validateModel)(data);\n}\nexports.restartKernel = restartKernel;\n/**\n * Interrupt a kernel.\n *\n * #### Notes\n * Uses the [Jupyter Notebook API](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter-server/jupyter_server/main/jupyter_server/services/api/api.yaml#!/kernels) and validates the response model.\n *\n * The promise is fulfilled on a valid response and rejected otherwise.\n */\nasync function interruptKernel(id, settings = serverconnection_1.ServerConnection.makeSettings()) {\n const url = coreutils_1.URLExt.join(settings.baseUrl, exports.KERNEL_SERVICE_URL, encodeURIComponent(id), 'interrupt');\n const init = { method: 'POST' };\n const response = await serverconnection_1.ServerConnection.makeRequest(url, init, settings);\n if (response.status !== 204) {\n const err = await serverconnection_1.ServerConnection.ResponseError.create(response);\n throw err;\n }\n}\nexports.interruptKernel = interruptKernel;\n/**\n * Shut down a kernel.\n *\n * @param id - The id of the running kernel.\n *\n * @param settings - The server settings for the request.\n *\n * @returns A promise that resolves when the kernel is shut down.\n *\n *\n * #### Notes\n * Uses the [Jupyter Notebook API](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter-server/jupyter_server/main/jupyter_server/services/api/api.yaml#!/kernels) and validates the response model.\n *\n * The promise is fulfilled on a valid response and rejected otherwise.\n */\nasync function shutdownKernel(id, settings = serverconnection_1.ServerConnection.makeSettings()) {\n const url = coreutils_1.URLExt.join(settings.baseUrl, exports.KERNEL_SERVICE_URL, encodeURIComponent(id));\n const init = { method: 'DELETE' };\n const response = await serverconnection_1.ServerConnection.makeRequest(url, init, settings);\n if (response.status === 404) {\n const msg = `The kernel \"${id}\" does not exist on the server`;\n console.warn(msg);\n }\n else if (response.status !== 204) {\n const err = await serverconnection_1.ServerConnection.ResponseError.create(response);\n throw err;\n }\n}\nexports.shutdownKernel = shutdownKernel;\n/**\n * Get a full kernel model from the server by kernel id string.\n *\n * #### Notes\n * Uses the [Jupyter Notebook API](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter-server/jupyter_server/main/jupyter_server/services/api/api.yaml#!/kernels) and validates the response model.\n *\n * The promise is fulfilled on a valid response and rejected otherwise.\n */\nasync function getKernelModel(id, settings = serverconnection_1.ServerConnection.makeSettings()) {\n const url = coreutils_1.URLExt.join(settings.baseUrl, exports.KERNEL_SERVICE_URL, encodeURIComponent(id));\n const response = await serverconnection_1.ServerConnection.makeRequest(url, {}, settings);\n if (response.status === 404) {\n return undefined;\n }\n else if (response.status !== 200) {\n const err = await serverconnection_1.ServerConnection.ResponseError.create(response);\n throw err;\n }\n const data = await response.json();\n (0, validate_1.validateModel)(data);\n return data;\n}\nexports.getKernelModel = getKernelModel;\n//# sourceMappingURL=restapi.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.deserialize = exports.serialize = void 0;\nconst KernelMessage = __importStar(require(\"./messages\"));\n/**\n * Serialize a kernel message for transport.\n */\nfunction serialize(msg, protocol = '') {\n switch (protocol) {\n case KernelMessage.supportedKernelWebSocketProtocols\n .v1KernelWebsocketJupyterOrg:\n return Private.serializeV1KernelWebsocketJupyterOrg(msg);\n default:\n return Private.serializeDefault(msg);\n }\n}\nexports.serialize = serialize;\n/**\n * Deserialize and return the unpacked message.\n */\nfunction deserialize(data, protocol = '') {\n switch (protocol) {\n case KernelMessage.supportedKernelWebSocketProtocols\n .v1KernelWebsocketJupyterOrg:\n return Private.deserializeV1KernelWebsocketJupyterOrg(data);\n default:\n return Private.deserializeDefault(data);\n }\n}\nexports.deserialize = deserialize;\nvar Private;\n(function (Private) {\n /**\n * Deserialize and return the unpacked message.\n * Protocol `v1.kernel.websocket.jupyter.org`\n */\n function deserializeV1KernelWebsocketJupyterOrg(binMsg) {\n let msg;\n const data = new DataView(binMsg);\n const offsetNumber = Number(data.getBigUint64(0, true /* littleEndian */));\n let offsets = [];\n for (let i = 0; i < offsetNumber; i++) {\n // WARNING: we cast our 64-bit unsigned int to a number!\n // so offsets cannot index up to 2**64 bytes\n offsets.push(Number(data.getBigUint64(8 * (i + 1), true /* littleEndian */)));\n }\n const decoder = new TextDecoder('utf8');\n const channel = decoder.decode(binMsg.slice(offsets[0], offsets[1]));\n const header = JSON.parse(decoder.decode(binMsg.slice(offsets[1], offsets[2])));\n const parent_header = JSON.parse(decoder.decode(binMsg.slice(offsets[2], offsets[3])));\n const metadata = JSON.parse(decoder.decode(binMsg.slice(offsets[3], offsets[4])));\n const content = JSON.parse(decoder.decode(binMsg.slice(offsets[4], offsets[5])));\n let buffers = [];\n for (let i = 5; i < offsets.length - 1; i++) {\n buffers.push(new DataView(binMsg.slice(offsets[i], offsets[i + 1])));\n }\n msg = {\n channel,\n header,\n parent_header,\n metadata,\n content,\n buffers\n };\n return msg;\n }\n Private.deserializeV1KernelWebsocketJupyterOrg = deserializeV1KernelWebsocketJupyterOrg;\n /**\n * Serialize a kernel message for transport.\n * Protocol `v1.kernel.websocket.jupyter.org`\n */\n function serializeV1KernelWebsocketJupyterOrg(msg) {\n const header = JSON.stringify(msg.header);\n const parentHeader = msg.parent_header == null ? '{}' : JSON.stringify(msg.parent_header);\n const metadata = JSON.stringify(msg.metadata);\n const content = JSON.stringify(msg.content);\n const buffers = msg.buffers !== undefined ? msg.buffers : [];\n const offsetNumber = 1 + 4 + buffers.length + 1;\n let offsets = [];\n offsets.push(8 * (1 + offsetNumber));\n offsets.push(msg.channel.length + offsets[offsets.length - 1]);\n const encoder = new TextEncoder();\n const channelEncoded = encoder.encode(msg.channel);\n const headerEncoded = encoder.encode(header);\n const parentHeaderEncoded = encoder.encode(parentHeader);\n const metadataEncoded = encoder.encode(metadata);\n const contentEncoded = encoder.encode(content);\n const binMsgNoBuff = new Uint8Array(channelEncoded.length +\n headerEncoded.length +\n parentHeaderEncoded.length +\n metadataEncoded.length +\n contentEncoded.length);\n binMsgNoBuff.set(channelEncoded);\n binMsgNoBuff.set(headerEncoded, channelEncoded.length);\n binMsgNoBuff.set(parentHeaderEncoded, channelEncoded.length + headerEncoded.length);\n binMsgNoBuff.set(metadataEncoded, channelEncoded.length + headerEncoded.length + parentHeaderEncoded.length);\n binMsgNoBuff.set(contentEncoded, channelEncoded.length +\n headerEncoded.length +\n parentHeaderEncoded.length +\n metadataEncoded.length);\n for (let length of [\n headerEncoded.length,\n parentHeaderEncoded.length,\n metadataEncoded.length,\n contentEncoded.length\n ]) {\n offsets.push(length + offsets[offsets.length - 1]);\n }\n let buffersByteLength = 0;\n for (let buffer of buffers) {\n let length = buffer.byteLength;\n offsets.push(length + offsets[offsets.length - 1]);\n buffersByteLength += length;\n }\n const binMsg = new Uint8Array(8 * (1 + offsetNumber) + binMsgNoBuff.byteLength + buffersByteLength);\n const word = new ArrayBuffer(8);\n const data = new DataView(word);\n data.setBigUint64(0, BigInt(offsetNumber), true /* littleEndian */);\n binMsg.set(new Uint8Array(word), 0);\n for (let i = 0; i < offsets.length; i++) {\n data.setBigUint64(0, BigInt(offsets[i]), true /* littleEndian */);\n binMsg.set(new Uint8Array(word), 8 * (i + 1));\n }\n binMsg.set(binMsgNoBuff, offsets[0]);\n for (let i = 0; i < buffers.length; i++) {\n const buffer = buffers[i];\n binMsg.set(new Uint8Array(ArrayBuffer.isView(buffer) ? buffer.buffer : buffer), offsets[5 + i]);\n }\n return binMsg.buffer;\n }\n Private.serializeV1KernelWebsocketJupyterOrg = serializeV1KernelWebsocketJupyterOrg;\n /**\n * Deserialize and return the unpacked message.\n * Default protocol\n *\n * #### Notes\n * Handles JSON blob strings and binary messages.\n */\n function deserializeDefault(data) {\n let value;\n if (typeof data === 'string') {\n value = JSON.parse(data);\n }\n else {\n value = deserializeBinary(data);\n }\n return value;\n }\n Private.deserializeDefault = deserializeDefault;\n /**\n * Serialize a kernel message for transport.\n * Default protocol\n *\n * #### Notes\n * If there is binary content, an `ArrayBuffer` is returned,\n * otherwise the message is converted to a JSON string.\n */\n function serializeDefault(msg) {\n var _a;\n let value;\n if ((_a = msg.buffers) === null || _a === void 0 ? void 0 : _a.length) {\n value = serializeBinary(msg);\n }\n else {\n value = JSON.stringify(msg);\n }\n return value;\n }\n Private.serializeDefault = serializeDefault;\n /**\n * Deserialize a binary message to a Kernel Message.\n */\n function deserializeBinary(buf) {\n const data = new DataView(buf);\n // read the header: 1 + nbufs 32b integers\n const nbufs = data.getUint32(0);\n const offsets = [];\n if (nbufs < 2) {\n throw new Error('Invalid incoming Kernel Message');\n }\n for (let i = 1; i <= nbufs; i++) {\n offsets.push(data.getUint32(i * 4));\n }\n const jsonBytes = new Uint8Array(buf.slice(offsets[0], offsets[1]));\n const msg = JSON.parse(new TextDecoder('utf8').decode(jsonBytes));\n // the remaining chunks are stored as DataViews in msg.buffers\n msg.buffers = [];\n for (let i = 1; i < nbufs; i++) {\n const start = offsets[i];\n const stop = offsets[i + 1] || buf.byteLength;\n msg.buffers.push(new DataView(buf.slice(start, stop)));\n }\n return msg;\n }\n /**\n * Implement the binary serialization protocol.\n *\n * Serialize Kernel message to ArrayBuffer.\n */\n function serializeBinary(msg) {\n const offsets = [];\n const buffers = [];\n const encoder = new TextEncoder();\n let origBuffers = [];\n if (msg.buffers !== undefined) {\n origBuffers = msg.buffers;\n delete msg['buffers'];\n }\n const jsonUtf8 = encoder.encode(JSON.stringify(msg));\n buffers.push(jsonUtf8.buffer);\n for (let i = 0; i < origBuffers.length; i++) {\n // msg.buffers elements could be either views or ArrayBuffers\n // buffers elements are ArrayBuffers\n const b = origBuffers[i];\n buffers.push(ArrayBuffer.isView(b) ? b.buffer : b);\n }\n const nbufs = buffers.length;\n offsets.push(4 * (nbufs + 1));\n for (let i = 0; i + 1 < buffers.length; i++) {\n offsets.push(offsets[offsets.length - 1] + buffers[i].byteLength);\n }\n const msgBuf = new Uint8Array(offsets[offsets.length - 1] + buffers[buffers.length - 1].byteLength);\n // use DataView.setUint32 for network byte-order\n const view = new DataView(msgBuf.buffer);\n // write nbufs to first 4 bytes\n view.setUint32(0, nbufs);\n // write offsets to next 4 * nbufs bytes\n for (let i = 0; i < offsets.length; i++) {\n view.setUint32(4 * (i + 1), offsets[i]);\n }\n // write all the buffers at their respective offsets\n for (let i = 0; i < buffers.length; i++) {\n msgBuf.set(new Uint8Array(buffers[i]), offsets[i]);\n }\n return msgBuf.buffer;\n }\n})(Private || (Private = {}));\n//# sourceMappingURL=serialize.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateModels = exports.validateModel = exports.validateMessage = void 0;\nconst validate_1 = require(\"../validate\");\n/**\n * Required fields for `IKernelHeader`.\n */\nconst HEADER_FIELDS = ['username', 'version', 'session', 'msg_id', 'msg_type'];\n/**\n * Required fields and types for contents of various types of `kernel.IMessage`\n * messages on the iopub channel.\n */\nconst IOPUB_CONTENT_FIELDS = {\n stream: { name: 'string', text: 'string' },\n display_data: { data: 'object', metadata: 'object' },\n execute_input: { code: 'string', execution_count: 'number' },\n execute_result: {\n execution_count: 'number',\n data: 'object',\n metadata: 'object'\n },\n error: { ename: 'string', evalue: 'string', traceback: 'object' },\n status: {\n execution_state: [\n 'string',\n ['starting', 'idle', 'busy', 'restarting', 'dead']\n ]\n },\n clear_output: { wait: 'boolean' },\n comm_open: { comm_id: 'string', target_name: 'string', data: 'object' },\n comm_msg: { comm_id: 'string', data: 'object' },\n comm_close: { comm_id: 'string' },\n shutdown_reply: { restart: 'boolean' } // Emitted by the IPython kernel.\n};\n/**\n * Validate the header of a kernel message.\n */\nfunction validateHeader(header) {\n for (let i = 0; i < HEADER_FIELDS.length; i++) {\n (0, validate_1.validateProperty)(header, HEADER_FIELDS[i], 'string');\n }\n}\n/**\n * Validate a kernel message object.\n */\nfunction validateMessage(msg) {\n (0, validate_1.validateProperty)(msg, 'metadata', 'object');\n (0, validate_1.validateProperty)(msg, 'content', 'object');\n (0, validate_1.validateProperty)(msg, 'channel', 'string');\n validateHeader(msg.header);\n if (msg.channel === 'iopub') {\n validateIOPubContent(msg);\n }\n}\nexports.validateMessage = validateMessage;\n/**\n * Validate content an kernel message on the iopub channel.\n */\nfunction validateIOPubContent(msg) {\n if (msg.channel === 'iopub') {\n const fields = IOPUB_CONTENT_FIELDS[msg.header.msg_type];\n // Check for unknown message type.\n if (fields === undefined) {\n return;\n }\n const names = Object.keys(fields);\n const content = msg.content;\n for (let i = 0; i < names.length; i++) {\n let args = fields[names[i]];\n if (!Array.isArray(args)) {\n args = [args];\n }\n (0, validate_1.validateProperty)(content, names[i], ...args);\n }\n }\n}\n/**\n * Validate a `Kernel.IModel` object.\n */\nfunction validateModel(model) {\n (0, validate_1.validateProperty)(model, 'name', 'string');\n (0, validate_1.validateProperty)(model, 'id', 'string');\n}\nexports.validateModel = validateModel;\n/**\n * Validate an array of `IModel` objects.\n */\nfunction validateModels(models) {\n if (!Array.isArray(models)) {\n throw new Error('Invalid kernel list');\n }\n models.forEach(d => validateModel(d));\n}\nexports.validateModels = validateModels;\n//# sourceMappingURL=validate.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.KernelSpecAPI = exports.KernelSpec = void 0;\nconst KernelSpec = __importStar(require(\"./kernelspec\"));\nexports.KernelSpec = KernelSpec;\nconst KernelSpecAPI = __importStar(require(\"./restapi\"));\nexports.KernelSpecAPI = KernelSpecAPI;\n__exportStar(require(\"./manager\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=kernelspec.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.KernelSpecManager = void 0;\nconst coreutils_1 = require(\"@lumino/coreutils\");\nconst polling_1 = require(\"@lumino/polling\");\nconst signaling_1 = require(\"@lumino/signaling\");\nconst restapi = __importStar(require(\"./restapi\"));\nconst basemanager_1 = require(\"../basemanager\");\n/**\n * An implementation of a kernel spec manager.\n */\nclass KernelSpecManager extends basemanager_1.BaseManager {\n /**\n * Construct a new kernel spec manager.\n *\n * @param options - The default options for kernel.\n */\n constructor(options = {}) {\n var _a;\n super(options);\n this._isReady = false;\n this._connectionFailure = new signaling_1.Signal(this);\n this._specs = null;\n this._specsChanged = new signaling_1.Signal(this);\n // Initialize internal data.\n this._ready = Promise.all([this.requestSpecs()])\n .then(_ => undefined)\n .catch(_ => undefined)\n .then(() => {\n if (this.isDisposed) {\n return;\n }\n this._isReady = true;\n });\n this._pollSpecs = new polling_1.Poll({\n auto: false,\n factory: () => this.requestSpecs(),\n frequency: {\n interval: 61 * 1000,\n backoff: true,\n max: 300 * 1000\n },\n name: `@jupyterlab/services:KernelSpecManager#specs`,\n standby: (_a = options.standby) !== null && _a !== void 0 ? _a : 'when-hidden'\n });\n void this.ready.then(() => {\n void this._pollSpecs.start();\n });\n }\n /**\n * Test whether the manager is ready.\n */\n get isReady() {\n return this._isReady;\n }\n /**\n * A promise that fulfills when the manager is ready.\n */\n get ready() {\n return this._ready;\n }\n /**\n * Get the most recently fetched kernel specs.\n */\n get specs() {\n return this._specs;\n }\n /**\n * A signal emitted when the specs change.\n */\n get specsChanged() {\n return this._specsChanged;\n }\n /**\n * A signal emitted when there is a connection failure.\n */\n get connectionFailure() {\n return this._connectionFailure;\n }\n /**\n * Dispose of the resources used by the manager.\n */\n dispose() {\n this._pollSpecs.dispose();\n super.dispose();\n }\n /**\n * Force a refresh of the specs from the server.\n *\n * @returns A promise that resolves when the specs are fetched.\n *\n * #### Notes\n * This is intended to be called only in response to a user action,\n * since the manager maintains its internal state.\n */\n async refreshSpecs() {\n await this._pollSpecs.refresh();\n await this._pollSpecs.tick;\n }\n /**\n * Execute a request to the server to poll specs and update state.\n */\n async requestSpecs() {\n const specs = await restapi.getSpecs(this.serverSettings);\n if (this.isDisposed) {\n return;\n }\n if (!coreutils_1.JSONExt.deepEqual(specs, this._specs)) {\n this._specs = specs;\n this._specsChanged.emit(specs);\n }\n }\n}\nexports.KernelSpecManager = KernelSpecManager;\n//# sourceMappingURL=manager.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSpecs = void 0;\nconst serverconnection_1 = require(\"../serverconnection\");\nconst validate_1 = require(\"./validate\");\nconst coreutils_1 = require(\"@jupyterlab/coreutils\");\n/**\n * The url for the kernelspec service.\n */\nconst KERNELSPEC_SERVICE_URL = 'api/kernelspecs';\n/**\n * Fetch all of the kernel specs.\n *\n * @param settings - The optional server settings.\n * @param useCache - Whether to use the cache. If false, always request.\n *\n * @returns A promise that resolves with the kernel specs.\n *\n * #### Notes\n * Uses the [Jupyter Notebook API](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter-server/jupyter_server/main/jupyter_server/services/api/api.yaml#!/kernelspecs).\n */\nasync function getSpecs(settings = serverconnection_1.ServerConnection.makeSettings()) {\n const url = coreutils_1.URLExt.join(settings.baseUrl, KERNELSPEC_SERVICE_URL);\n const response = await serverconnection_1.ServerConnection.makeRequest(url, {}, settings);\n if (response.status !== 200) {\n const err = await serverconnection_1.ServerConnection.ResponseError.create(response);\n throw err;\n }\n const data = await response.json();\n return (0, validate_1.validateSpecModels)(data);\n}\nexports.getSpecs = getSpecs;\n//# sourceMappingURL=restapi.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateSpecModels = exports.validateSpecModel = void 0;\nconst validate_1 = require(\"../validate\");\n/**\n * Validate a server kernelspec model to a client side model.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nfunction validateSpecModel(data) {\n const spec = data.spec;\n if (!spec) {\n throw new Error('Invalid kernel spec');\n }\n (0, validate_1.validateProperty)(data, 'name', 'string');\n (0, validate_1.validateProperty)(data, 'resources', 'object');\n (0, validate_1.validateProperty)(spec, 'language', 'string');\n (0, validate_1.validateProperty)(spec, 'display_name', 'string');\n (0, validate_1.validateProperty)(spec, 'argv', 'array');\n let metadata = null;\n if (spec.hasOwnProperty('metadata')) {\n (0, validate_1.validateProperty)(spec, 'metadata', 'object');\n metadata = spec.metadata;\n }\n let env = null;\n if (spec.hasOwnProperty('env')) {\n (0, validate_1.validateProperty)(spec, 'env', 'object');\n env = spec.env;\n }\n return {\n name: data.name,\n resources: data.resources,\n language: spec.language,\n display_name: spec.display_name,\n argv: spec.argv,\n metadata,\n env\n };\n}\nexports.validateSpecModel = validateSpecModel;\n/**\n * Validate a `Kernel.ISpecModels` object.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nfunction validateSpecModels(data) {\n if (!data.hasOwnProperty('kernelspecs')) {\n throw new Error('No kernelspecs found');\n }\n let keys = Object.keys(data.kernelspecs);\n const kernelspecs = Object.create(null);\n let defaultSpec = data.default;\n for (let i = 0; i < keys.length; i++) {\n const ks = data.kernelspecs[keys[i]];\n try {\n kernelspecs[keys[i]] = validateSpecModel(ks);\n }\n catch (err) {\n // Remove the errant kernel spec.\n console.warn(`Removing errant kernel spec: ${keys[i]}`);\n }\n }\n keys = Object.keys(kernelspecs);\n if (!keys.length) {\n throw new Error('No valid kernelspecs found');\n }\n if (!defaultSpec ||\n typeof defaultSpec !== 'string' ||\n !(defaultSpec in kernelspecs)) {\n defaultSpec = keys[0];\n console.warn(`Default kernel not found, using '${keys[0]}'`);\n }\n return {\n default: defaultSpec,\n kernelspecs\n };\n}\nexports.validateSpecModels = validateSpecModels;\n//# sourceMappingURL=validate.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ServiceManager = void 0;\nconst signaling_1 = require(\"@lumino/signaling\");\nconst builder_1 = require(\"./builder\");\nconst contents_1 = require(\"./contents\");\nconst event_1 = require(\"./event\");\nconst kernel_1 = require(\"./kernel\");\nconst kernelspec_1 = require(\"./kernelspec\");\nconst nbconvert_1 = require(\"./nbconvert\");\nconst serverconnection_1 = require(\"./serverconnection\");\nconst session_1 = require(\"./session\");\nconst setting_1 = require(\"./setting\");\nconst terminal_1 = require(\"./terminal\");\nconst user_1 = require(\"./user\");\nconst workspace_1 = require(\"./workspace\");\n/**\n * A Jupyter services manager.\n */\nclass ServiceManager {\n /**\n * Construct a new services provider.\n */\n constructor(options = {}) {\n var _a, _b;\n this._isDisposed = false;\n this._connectionFailure = new signaling_1.Signal(this);\n this._isReady = false;\n const defaultDrive = options.defaultDrive;\n const serverSettings = (_a = options.serverSettings) !== null && _a !== void 0 ? _a : serverconnection_1.ServerConnection.makeSettings();\n const standby = (_b = options.standby) !== null && _b !== void 0 ? _b : 'when-hidden';\n const normalized = { defaultDrive, serverSettings, standby };\n this.serverSettings = serverSettings;\n this.contents = options.contents || new contents_1.ContentsManager(normalized);\n this.events = options.events || new event_1.EventManager(normalized);\n this.kernels = options.kernels || new kernel_1.KernelManager(normalized);\n this.sessions =\n options.sessions ||\n new session_1.SessionManager({\n ...normalized,\n kernelManager: this.kernels\n });\n this.settings = options.settings || new setting_1.SettingManager(normalized);\n this.terminals = options.terminals || new terminal_1.TerminalManager(normalized);\n this.builder = options.builder || new builder_1.BuildManager(normalized);\n this.workspaces = options.workspaces || new workspace_1.WorkspaceManager(normalized);\n this.nbconvert = options.nbconvert || new nbconvert_1.NbConvertManager(normalized);\n this.kernelspecs = options.kernelspecs || new kernelspec_1.KernelSpecManager(normalized);\n this.user = options.user || new user_1.UserManager(normalized);\n // Proxy all connection failures from the individual service managers.\n this.kernelspecs.connectionFailure.connect(this._onConnectionFailure, this);\n this.sessions.connectionFailure.connect(this._onConnectionFailure, this);\n this.terminals.connectionFailure.connect(this._onConnectionFailure, this);\n // Define promises that need to be resolved before service manager is ready.\n const readyList = [this.sessions.ready, this.kernelspecs.ready];\n if (this.terminals.isAvailable()) {\n readyList.push(this.terminals.ready);\n }\n this._readyPromise = Promise.all(readyList).then(() => {\n this._isReady = true;\n });\n }\n /**\n * A signal emitted when there is a connection failure with the kernel.\n */\n get connectionFailure() {\n return this._connectionFailure;\n }\n /**\n * Test whether the service manager is disposed.\n */\n get isDisposed() {\n return this._isDisposed;\n }\n /**\n * Dispose of the resources used by the manager.\n */\n dispose() {\n if (this.isDisposed) {\n return;\n }\n this._isDisposed = true;\n signaling_1.Signal.clearData(this);\n this.contents.dispose();\n this.events.dispose();\n this.sessions.dispose();\n this.terminals.dispose();\n }\n /**\n * Test whether the manager is ready.\n */\n get isReady() {\n return this._isReady;\n }\n /**\n * A promise that fulfills when the manager is ready.\n */\n get ready() {\n return this._readyPromise;\n }\n _onConnectionFailure(sender, err) {\n this._connectionFailure.emit(err);\n }\n}\nexports.ServiceManager = ServiceManager;\n//# sourceMappingURL=manager.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NbConvertManager = void 0;\nconst coreutils_1 = require(\"@jupyterlab/coreutils\");\nconst serverconnection_1 = require(\"../serverconnection\");\nconst coreutils_2 = require(\"@lumino/coreutils\");\n/**\n * The url for the lab nbconvert service.\n */\nconst NBCONVERT_SETTINGS_URL = 'api/nbconvert';\n/**\n * The nbconvert API service manager.\n */\nclass NbConvertManager {\n /**\n * Create a new nbconvert manager.\n */\n constructor(options = {}) {\n var _a;\n this._exportFormats = null;\n this.serverSettings =\n (_a = options.serverSettings) !== null && _a !== void 0 ? _a : serverconnection_1.ServerConnection.makeSettings();\n }\n /**\n * Fetch and cache the export formats from the expensive nbconvert handler.\n */\n async fetchExportFormats() {\n this._requestingFormats = new coreutils_2.PromiseDelegate();\n this._exportFormats = null;\n const base = this.serverSettings.baseUrl;\n const url = coreutils_1.URLExt.join(base, NBCONVERT_SETTINGS_URL);\n const { serverSettings } = this;\n const response = await serverconnection_1.ServerConnection.makeRequest(url, {}, serverSettings);\n if (response.status !== 200) {\n const err = await serverconnection_1.ServerConnection.ResponseError.create(response);\n throw err;\n }\n const data = await response.json();\n const exportList = {};\n const keys = Object.keys(data);\n keys.forEach(function (key) {\n const mimeType = data[key].output_mimetype;\n exportList[key] = { output_mimetype: mimeType };\n });\n this._exportFormats = exportList;\n this._requestingFormats.resolve(exportList);\n return exportList;\n }\n /**\n * Get the list of export formats, preferring pre-cached ones.\n */\n async getExportFormats(force = true) {\n if (this._requestingFormats) {\n return this._requestingFormats.promise;\n }\n if (force || !this._exportFormats) {\n return await this.fetchExportFormats();\n }\n return this._exportFormats;\n }\n}\nexports.NbConvertManager = NbConvertManager;\n//# sourceMappingURL=index.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ServerConnection = void 0;\nconst coreutils_1 = require(\"@jupyterlab/coreutils\");\nlet WEBSOCKET;\nif (typeof window === 'undefined') {\n // Mangle the require statements so it does not get picked up in the\n // browser assets.\n WEBSOCKET = require('ws');\n}\nelse {\n WEBSOCKET = WebSocket;\n}\n/**\n * The namespace for ServerConnection functions.\n *\n * #### Notes\n * This is only intended to manage communication with the Jupyter server.\n *\n * The default values can be used in a JupyterLab or Jupyter Notebook context.\n *\n * We use `token` authentication if available, falling back on an XSRF\n * cookie if one has been provided on the `document`.\n *\n * A content type of `'application/json'` is added when using authentication\n * and there is no body data to allow the server to prevent malicious forms.\n */\nvar ServerConnection;\n(function (ServerConnection) {\n /**\n * Create a settings object given a subset of options.\n *\n * @param options - An optional partial set of options.\n *\n * @returns The full settings object.\n */\n function makeSettings(options) {\n return Private.makeSettings(options);\n }\n ServerConnection.makeSettings = makeSettings;\n /**\n * Make an request to the notebook server.\n *\n * @param url - The url for the request.\n *\n * @param init - The initialization options for the request.\n *\n * @param settings - The server settings to apply to the request.\n *\n * @returns a Promise that resolves with the response.\n *\n * @throws If the url of the request is not a notebook server url.\n *\n * #### Notes\n * The `url` must start with `settings.baseUrl`. The `init` settings are\n * merged with `settings.init`, with `init` taking precedence.\n * The headers in the two objects are not merged.\n * If there is no body data, we set the content type to `application/json`\n * because it is required by the Notebook server.\n */\n function makeRequest(url, init, settings) {\n return Private.handleRequest(url, init, settings);\n }\n ServerConnection.makeRequest = makeRequest;\n /**\n * A wrapped error for a fetch response.\n */\n class ResponseError extends Error {\n /**\n * Create a ResponseError from a response, handling the traceback and message\n * as appropriate.\n *\n * @param response The response object.\n *\n * @returns A promise that resolves with a `ResponseError` object.\n */\n static async create(response) {\n try {\n const data = await response.json();\n const { message, traceback } = data;\n if (traceback) {\n console.error(traceback);\n }\n return new ResponseError(response, message !== null && message !== void 0 ? message : ResponseError._defaultMessage(response), traceback !== null && traceback !== void 0 ? traceback : '');\n }\n catch (e) {\n console.debug(e);\n return new ResponseError(response);\n }\n }\n /**\n * Create a new response error.\n */\n constructor(response, message = ResponseError._defaultMessage(response), traceback = '') {\n super(message);\n this.response = response;\n this.traceback = traceback;\n }\n static _defaultMessage(response) {\n return `Invalid response: ${response.status} ${response.statusText}`;\n }\n }\n ServerConnection.ResponseError = ResponseError;\n /**\n * A wrapped error for a network error.\n */\n class NetworkError extends TypeError {\n /**\n * Create a new network error.\n */\n constructor(original) {\n super(original.message);\n this.stack = original.stack;\n }\n }\n ServerConnection.NetworkError = NetworkError;\n})(ServerConnection = exports.ServerConnection || (exports.ServerConnection = {}));\n/**\n * The namespace for module private data.\n */\nvar Private;\n(function (Private) {\n /**\n * Handle the server connection settings, returning a new value.\n */\n function makeSettings(options = {}) {\n var _a;\n const pageBaseUrl = coreutils_1.PageConfig.getBaseUrl();\n const pageWsUrl = coreutils_1.PageConfig.getWsUrl();\n const baseUrl = coreutils_1.URLExt.normalize(options.baseUrl) || pageBaseUrl;\n let wsUrl = options.wsUrl;\n // Prefer the default wsUrl if we are using the default baseUrl.\n if (!wsUrl && baseUrl === pageBaseUrl) {\n wsUrl = pageWsUrl;\n }\n // Otherwise convert the baseUrl to a wsUrl if possible.\n if (!wsUrl && baseUrl.indexOf('http') === 0) {\n wsUrl = 'ws' + baseUrl.slice(4);\n }\n // Otherwise fall back on the default wsUrl.\n wsUrl = wsUrl !== null && wsUrl !== void 0 ? wsUrl : pageWsUrl;\n return {\n init: { cache: 'no-store', credentials: 'same-origin' },\n fetch,\n Headers,\n Request,\n WebSocket: WEBSOCKET,\n token: coreutils_1.PageConfig.getToken(),\n appUrl: coreutils_1.PageConfig.getOption('appUrl'),\n appendToken: typeof window === 'undefined' ||\n (typeof process !== 'undefined' &&\n ((_a = process === null || process === void 0 ? void 0 : process.env) === null || _a === void 0 ? void 0 : _a.JEST_WORKER_ID) !== undefined) ||\n coreutils_1.URLExt.getHostName(pageBaseUrl) !== coreutils_1.URLExt.getHostName(wsUrl),\n ...options,\n baseUrl,\n wsUrl\n };\n }\n Private.makeSettings = makeSettings;\n /**\n * Handle a request.\n *\n * @param url - The url for the request.\n *\n * @param init - The overrides for the request init.\n *\n * @param settings - The settings object for the request.\n *\n * #### Notes\n * The `url` must start with `settings.baseUrl`. The `init` settings\n * take precedence over `settings.init`.\n */\n function handleRequest(url, init, settings) {\n var _a;\n // Handle notebook server requests.\n if (url.indexOf(settings.baseUrl) !== 0) {\n throw new Error('Can only be used for notebook server requests');\n }\n // Use explicit cache buster when `no-store` is set since\n // not all browsers use it properly.\n const cache = (_a = init.cache) !== null && _a !== void 0 ? _a : settings.init.cache;\n if (cache === 'no-store') {\n // https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest#Bypassing_the_cache\n url += (/\\?/.test(url) ? '&' : '?') + new Date().getTime();\n }\n const request = new settings.Request(url, { ...settings.init, ...init });\n // Handle authentication. Authentication can be overdetermined by\n // settings token and XSRF token.\n let authenticated = false;\n if (settings.token) {\n authenticated = true;\n request.headers.append('Authorization', `token ${settings.token}`);\n }\n if (typeof document !== 'undefined' && (document === null || document === void 0 ? void 0 : document.cookie)) {\n const xsrfToken = getCookie('_xsrf');\n if (xsrfToken !== undefined) {\n authenticated = true;\n request.headers.append('X-XSRFToken', xsrfToken);\n }\n }\n // Set the content type if there is no given data and we are\n // using an authenticated connection.\n if (!request.headers.has('Content-Type') && authenticated) {\n request.headers.set('Content-Type', 'application/json');\n }\n // Use `call` to avoid a `TypeError` in the browser.\n return settings.fetch.call(null, request).catch((e) => {\n // Convert the TypeError into a more specific error.\n throw new ServerConnection.NetworkError(e);\n });\n // TODO: *this* is probably where we need a system-wide connectionFailure\n // signal we can hook into.\n }\n Private.handleRequest = handleRequest;\n /**\n * Get a cookie from the document.\n */\n function getCookie(name) {\n // From http://www.tornadoweb.org/en/stable/guide/security.html\n const matches = document.cookie.match('\\\\b' + name + '=([^;]*)\\\\b');\n return matches === null || matches === void 0 ? void 0 : matches[1];\n }\n})(Private || (Private = {}));\n//# sourceMappingURL=serverconnection.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SessionConnection = void 0;\nconst signaling_1 = require(\"@lumino/signaling\");\nconst __1 = require(\"..\");\nconst restapi_1 = require(\"./restapi\");\nconst coreutils_1 = require(\"@lumino/coreutils\");\n/**\n * Session object for accessing the session REST api. The session\n * should be used to start kernels and then shut them down -- for\n * all other kernel operations, the kernel object should be used.\n */\nclass SessionConnection {\n /**\n * Construct a new session.\n */\n constructor(options) {\n var _a, _b, _c, _d;\n this._id = '';\n this._path = '';\n this._name = '';\n this._type = '';\n this._kernel = null;\n this._isDisposed = false;\n this._disposed = new signaling_1.Signal(this);\n this._kernelChanged = new signaling_1.Signal(this);\n this._statusChanged = new signaling_1.Signal(this);\n this._connectionStatusChanged = new signaling_1.Signal(this);\n this._pendingInput = new signaling_1.Signal(this);\n this._iopubMessage = new signaling_1.Signal(this);\n this._unhandledMessage = new signaling_1.Signal(this);\n this._anyMessage = new signaling_1.Signal(this);\n this._propertyChanged = new signaling_1.Signal(this);\n this._id = options.model.id;\n this._name = options.model.name;\n this._path = options.model.path;\n this._type = options.model.type;\n this._username = (_a = options.username) !== null && _a !== void 0 ? _a : '';\n this._clientId = (_b = options.clientId) !== null && _b !== void 0 ? _b : coreutils_1.UUID.uuid4();\n this._connectToKernel = options.connectToKernel;\n this._kernelConnectionOptions = (_c = options.kernelConnectionOptions) !== null && _c !== void 0 ? _c : {};\n this.serverSettings =\n (_d = options.serverSettings) !== null && _d !== void 0 ? _d : __1.ServerConnection.makeSettings();\n this.setupKernel(options.model.kernel);\n }\n /**\n * A signal emitted when the session is disposed.\n */\n get disposed() {\n return this._disposed;\n }\n /**\n * A signal emitted when the kernel changes.\n */\n get kernelChanged() {\n return this._kernelChanged;\n }\n /**\n * A signal proxied from the connection about the kernel status.\n */\n get statusChanged() {\n return this._statusChanged;\n }\n /**\n * A signal proxied from the kernel about the connection status.\n */\n get connectionStatusChanged() {\n return this._connectionStatusChanged;\n }\n /**\n * A signal proxied from the kernel pending input.\n */\n get pendingInput() {\n return this._pendingInput;\n }\n /**\n * A signal proxied from the kernel about iopub kernel messages.\n */\n get iopubMessage() {\n return this._iopubMessage;\n }\n /**\n * A signal proxied from the kernel for an unhandled kernel message.\n */\n get unhandledMessage() {\n return this._unhandledMessage;\n }\n /**\n * A signal proxied from the kernel emitted for any kernel message.\n *\n * #### Notes\n * The behavior is undefined if the message is modified during message\n * handling. As such, it should be treated as read-only.\n */\n get anyMessage() {\n return this._anyMessage;\n }\n /**\n * A signal emitted when a session property changes.\n */\n get propertyChanged() {\n return this._propertyChanged;\n }\n /**\n * Get the session id.\n */\n get id() {\n return this._id;\n }\n /**\n * Get the session kernel connection object.\n *\n * #### Notes\n * This is a read-only property, and can be altered by [changeKernel].\n */\n get kernel() {\n return this._kernel;\n }\n /**\n * Get the session path.\n */\n get path() {\n return this._path;\n }\n /**\n * Get the session type.\n */\n get type() {\n return this._type;\n }\n /**\n * Get the session name.\n */\n get name() {\n return this._name;\n }\n /**\n * Get the model associated with the session.\n */\n get model() {\n return {\n id: this.id,\n kernel: this.kernel && { id: this.kernel.id, name: this.kernel.name },\n path: this._path,\n type: this._type,\n name: this._name\n };\n }\n /**\n * Test whether the session has been disposed.\n */\n get isDisposed() {\n return this._isDisposed;\n }\n /**\n * Update the session based on a session model from the server.\n *\n * #### Notes\n * This only updates this session connection instance. Use `setPath`,\n * `setName`, `setType`, and `changeKernel` to change the session values on\n * the server.\n */\n update(model) {\n const oldModel = this.model;\n this._path = model.path;\n this._name = model.name;\n this._type = model.type;\n if ((this._kernel === null && model.kernel !== null) ||\n (this._kernel !== null && model.kernel === null) ||\n (this._kernel !== null &&\n model.kernel !== null &&\n this._kernel.id !== model.kernel.id)) {\n if (this._kernel !== null) {\n this._kernel.dispose();\n }\n const oldValue = this._kernel || null;\n this.setupKernel(model.kernel);\n const newValue = this._kernel || null;\n this._kernelChanged.emit({ name: 'kernel', oldValue, newValue });\n }\n this._handleModelChange(oldModel);\n }\n /**\n * Dispose of the resources held by the session.\n */\n dispose() {\n if (this.isDisposed) {\n return;\n }\n this._isDisposed = true;\n this._disposed.emit();\n if (this._kernel) {\n this._kernel.dispose();\n const oldValue = this._kernel;\n this._kernel = null;\n const newValue = this._kernel;\n this._kernelChanged.emit({ name: 'kernel', oldValue, newValue });\n }\n signaling_1.Signal.clearData(this);\n }\n /**\n * Change the session path.\n *\n * @param path - The new session path.\n *\n * @returns A promise that resolves when the session has renamed.\n *\n * #### Notes\n * This uses the Jupyter REST API, and the response is validated.\n * The promise is fulfilled on a valid response and rejected otherwise.\n */\n async setPath(path) {\n if (this.isDisposed) {\n throw new Error('Session is disposed');\n }\n await this._patch({ path });\n }\n /**\n * Change the session name.\n */\n async setName(name) {\n if (this.isDisposed) {\n throw new Error('Session is disposed');\n }\n await this._patch({ name });\n }\n /**\n * Change the session type.\n */\n async setType(type) {\n if (this.isDisposed) {\n throw new Error('Session is disposed');\n }\n await this._patch({ type });\n }\n /**\n * Change the kernel.\n *\n * @param options - The name or id of the new kernel.\n *\n * #### Notes\n * This shuts down the existing kernel and creates a new kernel,\n * keeping the existing session ID and session path.\n */\n async changeKernel(options) {\n if (this.isDisposed) {\n throw new Error('Session is disposed');\n }\n await this._patch({ kernel: options });\n return this.kernel;\n }\n /**\n * Kill the kernel and shutdown the session.\n *\n * @returns - The promise fulfilled on a valid response from the server.\n *\n * #### Notes\n * Uses the [Jupyter Notebook API](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter-server/jupyter_server/main/jupyter_server/services/api/api.yaml#!/sessions), and validates the response.\n * Disposes of the session and emits a [sessionDied] signal on success.\n */\n async shutdown() {\n if (this.isDisposed) {\n throw new Error('Session is disposed');\n }\n await (0, restapi_1.shutdownSession)(this.id, this.serverSettings);\n this.dispose();\n }\n /**\n * Create a new kernel connection and connect to its signals.\n *\n * #### Notes\n * This method is not meant to be subclassed.\n */\n setupKernel(model) {\n if (model === null) {\n this._kernel = null;\n return;\n }\n const kc = this._connectToKernel({\n ...this._kernelConnectionOptions,\n model,\n username: this._username,\n clientId: this._clientId,\n serverSettings: this.serverSettings\n });\n this._kernel = kc;\n kc.statusChanged.connect(this.onKernelStatus, this);\n kc.connectionStatusChanged.connect(this.onKernelConnectionStatus, this);\n kc.pendingInput.connect(this.onPendingInput, this);\n kc.unhandledMessage.connect(this.onUnhandledMessage, this);\n kc.iopubMessage.connect(this.onIOPubMessage, this);\n kc.anyMessage.connect(this.onAnyMessage, this);\n }\n /**\n * Handle to changes in the Kernel status.\n */\n onKernelStatus(sender, state) {\n this._statusChanged.emit(state);\n }\n /**\n * Handle to changes in the Kernel status.\n */\n onKernelConnectionStatus(sender, state) {\n this._connectionStatusChanged.emit(state);\n }\n /**\n * Handle a change in the pendingInput.\n */\n onPendingInput(sender, state) {\n this._pendingInput.emit(state);\n }\n /**\n * Handle iopub kernel messages.\n */\n onIOPubMessage(sender, msg) {\n this._iopubMessage.emit(msg);\n }\n /**\n * Handle unhandled kernel messages.\n */\n onUnhandledMessage(sender, msg) {\n this._unhandledMessage.emit(msg);\n }\n /**\n * Handle any kernel messages.\n */\n onAnyMessage(sender, args) {\n this._anyMessage.emit(args);\n }\n /**\n * Send a PATCH to the server, updating the session path or the kernel.\n */\n async _patch(body) {\n const model = await (0, restapi_1.updateSession)({ ...body, id: this._id }, this.serverSettings);\n this.update(model);\n return model;\n }\n /**\n * Handle a change to the model.\n */\n _handleModelChange(oldModel) {\n if (oldModel.name !== this._name) {\n this._propertyChanged.emit('name');\n }\n if (oldModel.type !== this._type) {\n this._propertyChanged.emit('type');\n }\n if (oldModel.path !== this._path) {\n this._propertyChanged.emit('path');\n }\n }\n}\nexports.SessionConnection = SessionConnection;\n//# sourceMappingURL=default.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SessionAPI = exports.Session = void 0;\nconst Session = __importStar(require(\"./session\"));\nexports.Session = Session;\nconst SessionAPI = __importStar(require(\"./restapi\"));\nexports.SessionAPI = SessionAPI;\n__exportStar(require(\"./manager\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SessionManager = void 0;\nconst polling_1 = require(\"@lumino/polling\");\nconst signaling_1 = require(\"@lumino/signaling\");\nconst serverconnection_1 = require(\"../serverconnection\");\nconst basemanager_1 = require(\"../basemanager\");\nconst default_1 = require(\"./default\");\nconst restapi_1 = require(\"./restapi\");\n/**\n * An implementation of a session manager.\n */\nclass SessionManager extends basemanager_1.BaseManager {\n /**\n * Construct a new session manager.\n *\n * @param options - The default options for each session.\n */\n constructor(options) {\n var _a;\n super(options);\n this._isReady = false;\n this._sessionConnections = new Set();\n this._models = new Map();\n this._runningChanged = new signaling_1.Signal(this);\n this._connectionFailure = new signaling_1.Signal(this);\n // We define these here so they bind `this` correctly\n this._connectToKernel = (options) => {\n return this._kernelManager.connectTo(options);\n };\n this._kernelManager = options.kernelManager;\n // Start model polling with exponential backoff.\n this._pollModels = new polling_1.Poll({\n auto: false,\n factory: () => this.requestRunning(),\n frequency: {\n interval: 10 * 1000,\n backoff: true,\n max: 300 * 1000\n },\n name: `@jupyterlab/services:SessionManager#models`,\n standby: (_a = options.standby) !== null && _a !== void 0 ? _a : 'when-hidden'\n });\n // Initialize internal data.\n this._ready = (async () => {\n await this._pollModels.start();\n await this._pollModels.tick;\n if (this._kernelManager.isActive) {\n await this._kernelManager.ready;\n }\n this._isReady = true;\n })();\n }\n /**\n * Test whether the manager is ready.\n */\n get isReady() {\n return this._isReady;\n }\n /**\n * A promise that fulfills when the manager is ready.\n */\n get ready() {\n return this._ready;\n }\n /**\n * A signal emitted when the running sessions change.\n */\n get runningChanged() {\n return this._runningChanged;\n }\n /**\n * A signal emitted when there is a connection failure.\n */\n get connectionFailure() {\n return this._connectionFailure;\n }\n /**\n * Dispose of the resources used by the manager.\n */\n dispose() {\n if (this.isDisposed) {\n return;\n }\n this._models.clear();\n this._sessionConnections.forEach(x => x.dispose());\n this._pollModels.dispose();\n super.dispose();\n }\n /*\n * Connect to a running session. See also [[connectToSession]].\n */\n connectTo(options) {\n const sessionConnection = new default_1.SessionConnection({\n ...options,\n connectToKernel: this._connectToKernel,\n serverSettings: this.serverSettings\n });\n this._onStarted(sessionConnection);\n if (!this._models.has(options.model.id)) {\n // We trust the user to connect to an existing session, but we verify\n // asynchronously.\n void this.refreshRunning().catch(() => {\n /* no-op */\n });\n }\n return sessionConnection;\n }\n /**\n * Create an iterator over the most recent running sessions.\n *\n * @returns A new iterator over the running sessions.\n */\n running() {\n return this._models.values();\n }\n /**\n * Force a refresh of the running sessions.\n *\n * @returns A promise that with the list of running sessions.\n *\n * #### Notes\n * This is not typically meant to be called by the user, since the\n * manager maintains its own internal state.\n */\n async refreshRunning() {\n await this._pollModels.refresh();\n await this._pollModels.tick;\n }\n /**\n * Start a new session. See also [[startNewSession]].\n *\n * @param createOptions - Options for creating the session\n *\n * @param connectOptions - Options for connecting to the session\n */\n async startNew(createOptions, connectOptions = {}) {\n const model = await (0, restapi_1.startSession)(createOptions, this.serverSettings);\n await this.refreshRunning();\n return this.connectTo({ ...connectOptions, model });\n }\n /**\n * Shut down a session by id.\n */\n async shutdown(id) {\n await (0, restapi_1.shutdownSession)(id, this.serverSettings);\n await this.refreshRunning();\n }\n /**\n * Shut down all sessions.\n *\n * @returns A promise that resolves when all of the kernels are shut down.\n */\n async shutdownAll() {\n // Update the list of models to make sure our list is current.\n await this.refreshRunning();\n // Shut down all models.\n await Promise.all([...this._models.keys()].map(id => (0, restapi_1.shutdownSession)(id, this.serverSettings)));\n // Update the list of models to clear out our state.\n await this.refreshRunning();\n }\n /**\n * Find a session associated with a path and stop it if it is the only session\n * using that kernel.\n *\n * @param path - The path in question.\n *\n * @returns A promise that resolves when the relevant sessions are stopped.\n */\n async stopIfNeeded(path) {\n try {\n const sessions = await (0, restapi_1.listRunning)(this.serverSettings);\n const matches = sessions.filter(value => value.path === path);\n if (matches.length === 1) {\n const id = matches[0].id;\n await this.shutdown(id);\n }\n }\n catch (error) {\n /* Always succeed. */\n }\n }\n /**\n * Find a session by id.\n */\n async findById(id) {\n if (this._models.has(id)) {\n return this._models.get(id);\n }\n await this.refreshRunning();\n return this._models.get(id);\n }\n /**\n * Find a session by path.\n */\n async findByPath(path) {\n for (const m of this._models.values()) {\n if (m.path === path) {\n return m;\n }\n }\n await this.refreshRunning();\n for (const m of this._models.values()) {\n if (m.path === path) {\n return m;\n }\n }\n return undefined;\n }\n /**\n * Execute a request to the server to poll running kernels and update state.\n */\n async requestRunning() {\n var _a, _b;\n let models;\n try {\n models = await (0, restapi_1.listRunning)(this.serverSettings);\n }\n catch (err) {\n // Handle network errors, as well as cases where we are on a\n // JupyterHub and the server is not running. JupyterHub returns a\n // 503 (<2.0) or 424 (>2.0) in that case.\n if (err instanceof serverconnection_1.ServerConnection.NetworkError ||\n ((_a = err.response) === null || _a === void 0 ? void 0 : _a.status) === 503 ||\n ((_b = err.response) === null || _b === void 0 ? void 0 : _b.status) === 424) {\n this._connectionFailure.emit(err);\n }\n throw err;\n }\n if (this.isDisposed) {\n return;\n }\n if (this._models.size === models.length &&\n models.every(model => {\n var _a, _b, _c, _d;\n const existing = this._models.get(model.id);\n if (!existing) {\n return false;\n }\n return (((_a = existing.kernel) === null || _a === void 0 ? void 0 : _a.id) === ((_b = model.kernel) === null || _b === void 0 ? void 0 : _b.id) &&\n ((_c = existing.kernel) === null || _c === void 0 ? void 0 : _c.name) === ((_d = model.kernel) === null || _d === void 0 ? void 0 : _d.name) &&\n existing.name === model.name &&\n existing.path === model.path &&\n existing.type === model.type);\n })) {\n // Identical models list (presuming models does not contain duplicate\n // ids), so just return\n return;\n }\n this._models = new Map(models.map(x => [x.id, x]));\n this._sessionConnections.forEach(sc => {\n if (this._models.has(sc.id)) {\n sc.update(this._models.get(sc.id));\n }\n else {\n sc.dispose();\n }\n });\n this._runningChanged.emit(models);\n }\n /**\n * Handle a session starting.\n */\n _onStarted(sessionConnection) {\n this._sessionConnections.add(sessionConnection);\n sessionConnection.disposed.connect(this._onDisposed, this);\n sessionConnection.propertyChanged.connect(this._onChanged, this);\n sessionConnection.kernelChanged.connect(this._onChanged, this);\n }\n _onDisposed(sessionConnection) {\n this._sessionConnections.delete(sessionConnection);\n // A session termination emission could mean the server session is deleted,\n // or that the session JS object is disposed and the session still exists on\n // the server, so we refresh from the server to make sure we reflect the\n // server state.\n void this.refreshRunning().catch(() => {\n /* no-op */\n });\n }\n _onChanged() {\n void this.refreshRunning().catch(() => {\n /* no-op */\n });\n }\n}\nexports.SessionManager = SessionManager;\n/**\n * The namespace for `SessionManager` class statics.\n */\n(function (SessionManager) {\n /**\n * A no-op session manager to be used when starting sessions is not supported.\n */\n class NoopManager extends SessionManager {\n constructor() {\n super(...arguments);\n this._readyPromise = new Promise(() => {\n /* no-op */\n });\n }\n /**\n * Whether the manager is active.\n */\n get isActive() {\n return false;\n }\n /**\n * Used for testing.\n */\n get parentReady() {\n return super.ready;\n }\n /**\n * Start a new session - throw an error since it is not supported.\n */\n async startNew(createOptions, connectOptions = {}) {\n return Promise.reject(new Error('Not implemented in no-op Session Manager'));\n }\n /*\n * Connect to a running session - throw an error since it is not supported.\n */\n connectTo(options) {\n throw Error('Not implemented in no-op Session Manager');\n }\n /**\n * A promise that fulfills when the manager is ready (never).\n */\n get ready() {\n return this.parentReady.then(() => this._readyPromise);\n }\n /**\n * Shut down a session by id - throw an error since it is not supported.\n */\n async shutdown(id) {\n return Promise.reject(new Error('Not implemented in no-op Session Manager'));\n }\n /**\n * Execute a request to the server to poll running sessions and update state.\n */\n async requestRunning() {\n return Promise.resolve();\n }\n }\n SessionManager.NoopManager = NoopManager;\n})(SessionManager = exports.SessionManager || (exports.SessionManager = {}));\n//# sourceMappingURL=manager.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.updateSession = exports.startSession = exports.getSessionModel = exports.shutdownSession = exports.getSessionUrl = exports.listRunning = exports.SESSION_SERVICE_URL = void 0;\nconst serverconnection_1 = require(\"../serverconnection\");\nconst coreutils_1 = require(\"@jupyterlab/coreutils\");\nconst validate_1 = require(\"./validate\");\n/**\n * The url for the session service.\n */\nexports.SESSION_SERVICE_URL = 'api/sessions';\n/**\n * List the running sessions.\n */\nasync function listRunning(settings = serverconnection_1.ServerConnection.makeSettings()) {\n const url = coreutils_1.URLExt.join(settings.baseUrl, exports.SESSION_SERVICE_URL);\n const response = await serverconnection_1.ServerConnection.makeRequest(url, {}, settings);\n if (response.status !== 200) {\n const err = await serverconnection_1.ServerConnection.ResponseError.create(response);\n throw err;\n }\n const data = await response.json();\n if (!Array.isArray(data)) {\n throw new Error('Invalid Session list');\n }\n data.forEach(m => {\n (0, validate_1.updateLegacySessionModel)(m);\n (0, validate_1.validateModel)(m);\n });\n return data;\n}\nexports.listRunning = listRunning;\n/**\n * Get a session url.\n */\nfunction getSessionUrl(baseUrl, id) {\n return coreutils_1.URLExt.join(baseUrl, exports.SESSION_SERVICE_URL, id);\n}\nexports.getSessionUrl = getSessionUrl;\n/**\n * Shut down a session by id.\n */\nasync function shutdownSession(id, settings = serverconnection_1.ServerConnection.makeSettings()) {\n var _a;\n const url = getSessionUrl(settings.baseUrl, id);\n const init = { method: 'DELETE' };\n const response = await serverconnection_1.ServerConnection.makeRequest(url, init, settings);\n if (response.status === 404) {\n const data = await response.json();\n const msg = (_a = data.message) !== null && _a !== void 0 ? _a : `The session \"${id}\"\" does not exist on the server`;\n console.warn(msg);\n }\n else if (response.status === 410) {\n throw new serverconnection_1.ServerConnection.ResponseError(response, 'The kernel was deleted but the session was not');\n }\n else if (response.status !== 204) {\n const err = await serverconnection_1.ServerConnection.ResponseError.create(response);\n throw err;\n }\n}\nexports.shutdownSession = shutdownSession;\n/**\n * Get a full session model from the server by session id string.\n */\nasync function getSessionModel(id, settings = serverconnection_1.ServerConnection.makeSettings()) {\n const url = getSessionUrl(settings.baseUrl, id);\n const response = await serverconnection_1.ServerConnection.makeRequest(url, {}, settings);\n if (response.status !== 200) {\n const err = await serverconnection_1.ServerConnection.ResponseError.create(response);\n throw err;\n }\n const data = await response.json();\n (0, validate_1.updateLegacySessionModel)(data);\n (0, validate_1.validateModel)(data);\n return data;\n}\nexports.getSessionModel = getSessionModel;\n/**\n * Create a new session, or return an existing session if the session path\n * already exists.\n */\nasync function startSession(options, settings = serverconnection_1.ServerConnection.makeSettings()) {\n const url = coreutils_1.URLExt.join(settings.baseUrl, exports.SESSION_SERVICE_URL);\n const init = {\n method: 'POST',\n body: JSON.stringify(options)\n };\n const response = await serverconnection_1.ServerConnection.makeRequest(url, init, settings);\n if (response.status !== 201) {\n const err = await serverconnection_1.ServerConnection.ResponseError.create(response);\n throw err;\n }\n const data = await response.json();\n (0, validate_1.updateLegacySessionModel)(data);\n (0, validate_1.validateModel)(data);\n return data;\n}\nexports.startSession = startSession;\n/**\n * Send a PATCH to the server, updating the session path or the kernel.\n */\nasync function updateSession(model, settings = serverconnection_1.ServerConnection.makeSettings()) {\n const url = getSessionUrl(settings.baseUrl, model.id);\n const init = {\n method: 'PATCH',\n body: JSON.stringify(model)\n };\n const response = await serverconnection_1.ServerConnection.makeRequest(url, init, settings);\n if (response.status !== 200) {\n const err = await serverconnection_1.ServerConnection.ResponseError.create(response);\n throw err;\n }\n const data = await response.json();\n (0, validate_1.updateLegacySessionModel)(data);\n (0, validate_1.validateModel)(data);\n return data;\n}\nexports.updateSession = updateSession;\n//# sourceMappingURL=restapi.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=session.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateModels = exports.updateLegacySessionModel = exports.validateModel = void 0;\nconst validate_1 = require(\"../kernel/validate\");\nconst validate_2 = require(\"../validate\");\n/**\n * Validate an `Session.IModel` object.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nfunction validateModel(data) {\n (0, validate_2.validateProperty)(data, 'id', 'string');\n (0, validate_2.validateProperty)(data, 'type', 'string');\n (0, validate_2.validateProperty)(data, 'name', 'string');\n (0, validate_2.validateProperty)(data, 'path', 'string');\n (0, validate_2.validateProperty)(data, 'kernel', 'object');\n (0, validate_1.validateModel)(data.kernel);\n}\nexports.validateModel = validateModel;\n/**\n * Update model from legacy session data.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nfunction updateLegacySessionModel(data) {\n if (data.path === undefined && data.notebook !== undefined) {\n data.path = data.notebook.path;\n data.type = 'notebook';\n data.name = '';\n }\n}\nexports.updateLegacySessionModel = updateLegacySessionModel;\n/**\n * Validate an array of `Session.IModel` objects.\n */\nfunction validateModels(models) {\n if (!Array.isArray(models)) {\n throw new Error('Invalid session list');\n }\n models.forEach(d => validateModel(d));\n}\nexports.validateModels = validateModels;\n//# sourceMappingURL=validate.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SettingManager = void 0;\nconst coreutils_1 = require(\"@jupyterlab/coreutils\");\nconst statedb_1 = require(\"@jupyterlab/statedb\");\nconst serverconnection_1 = require(\"../serverconnection\");\n/**\n * The url for the lab settings service.\n */\nconst SERVICE_SETTINGS_URL = 'api/settings';\n/**\n * The settings API service manager.\n */\nclass SettingManager extends statedb_1.DataConnector {\n /**\n * Create a new setting manager.\n */\n constructor(options = {}) {\n var _a;\n super();\n this.serverSettings =\n (_a = options.serverSettings) !== null && _a !== void 0 ? _a : serverconnection_1.ServerConnection.makeSettings();\n }\n /**\n * Fetch a plugin's settings.\n *\n * @param id - The plugin's ID.\n *\n * @returns A promise that resolves if successful.\n */\n async fetch(id) {\n if (!id) {\n throw new Error('Plugin `id` parameter is required for settings fetch.');\n }\n const { serverSettings } = this;\n const { baseUrl, appUrl } = serverSettings;\n const { makeRequest, ResponseError } = serverconnection_1.ServerConnection;\n const base = baseUrl + appUrl;\n const url = Private.url(base, id);\n const response = await makeRequest(url, {}, serverSettings);\n if (response.status !== 200) {\n const err = await ResponseError.create(response);\n throw err;\n }\n // Assert what type the server response is returning.\n return response.json();\n }\n /**\n * Fetch the list of all plugin setting bundles.\n *\n * @returns A promise that resolves if successful.\n */\n async list(query) {\n var _a, _b, _c, _d;\n const { serverSettings } = this;\n const { baseUrl, appUrl } = serverSettings;\n const { makeRequest, ResponseError } = serverconnection_1.ServerConnection;\n const base = baseUrl + appUrl;\n const url = Private.url(base, '', query === 'ids');\n const response = await makeRequest(url, {}, serverSettings);\n if (response.status !== 200) {\n throw new ResponseError(response);\n }\n const json = await response.json();\n const ids = (_b = (_a = json === null || json === void 0 ? void 0 : json['settings']) === null || _a === void 0 ? void 0 : _a.map((plugin) => plugin.id)) !== null && _b !== void 0 ? _b : [];\n let values = [];\n if (!query) {\n values =\n (_d = (_c = json === null || json === void 0 ? void 0 : json['settings']) === null || _c === void 0 ? void 0 : _c.map((plugin) => {\n plugin.data = { composite: {}, user: {} };\n return plugin;\n })) !== null && _d !== void 0 ? _d : [];\n }\n return { ids, values };\n }\n /**\n * Save a plugin's settings.\n *\n * @param id - The plugin's ID.\n *\n * @param raw - The user setting values as a raw string of JSON with comments.\n *\n * @returns A promise that resolves if successful.\n */\n async save(id, raw) {\n const { serverSettings } = this;\n const { baseUrl, appUrl } = serverSettings;\n const { makeRequest, ResponseError } = serverconnection_1.ServerConnection;\n const base = baseUrl + appUrl;\n const url = Private.url(base, id);\n // NOTE: 'raw' is JSON5 (not valid JSON), so we encode it as a string in a valid JSON body\n const init = { body: JSON.stringify({ raw }), method: 'PUT' };\n const response = await makeRequest(url, init, serverSettings);\n if (response.status !== 204) {\n throw new ResponseError(response);\n }\n }\n}\nexports.SettingManager = SettingManager;\n/**\n * A namespace for private data.\n */\nvar Private;\n(function (Private) {\n /**\n * Get the url for a plugin's settings.\n */\n function url(base, id, idsOnly) {\n const idsOnlyParam = idsOnly\n ? coreutils_1.URLExt.objectToQueryString({ ids_only: true })\n : '';\n return `${coreutils_1.URLExt.join(base, SERVICE_SETTINGS_URL, id)}${idsOnlyParam}`;\n }\n Private.url = url;\n})(Private || (Private = {}));\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright (c) Jupyter Development Team.\n * Distributed under the terms of the Modified BSD License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = WebSocket;\n//# sourceMappingURL=ws.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TerminalConnection = void 0;\nconst coreutils_1 = require(\"@jupyterlab/coreutils\");\nconst coreutils_2 = require(\"@lumino/coreutils\");\nconst signaling_1 = require(\"@lumino/signaling\");\nconst __1 = require(\"..\");\nconst restapi_1 = require(\"./restapi\");\n/**\n * An implementation of a terminal interface.\n */\nclass TerminalConnection {\n /**\n * Construct a new terminal session.\n */\n constructor(options) {\n var _a;\n /**\n * Create the terminal websocket connection and add socket status handlers.\n *\n * #### Notes\n * You are responsible for updating the connection status as appropriate.\n */\n this._createSocket = () => {\n this._errorIfDisposed();\n // Make sure the socket is clear\n this._clearSocket();\n // Update the connection status to reflect opening a new connection.\n this._updateConnectionStatus('connecting');\n const name = this._name;\n const settings = this.serverSettings;\n let url = coreutils_1.URLExt.join(settings.wsUrl, 'terminals', 'websocket', encodeURIComponent(name));\n // If token authentication is in use.\n const token = settings.token;\n if (settings.appendToken && token !== '') {\n url = url + `?token=${encodeURIComponent(token)}`;\n }\n this._ws = new settings.WebSocket(url);\n this._ws.onmessage = this._onWSMessage;\n this._ws.onclose = this._onWSClose;\n this._ws.onerror = this._onWSClose;\n };\n // Websocket messages events are defined as variables to bind `this`\n this._onWSMessage = (event) => {\n if (this._isDisposed) {\n return;\n }\n const data = JSON.parse(event.data);\n // Handle a disconnect message.\n if (data[0] === 'disconnect') {\n this.dispose();\n }\n if (this._connectionStatus === 'connecting') {\n // After reconnection, ignore all messages until a 'setup' message\n // before we are truly connected. Setting the connection status to\n // connected only then means that if we do not get a setup message\n // before our retry timeout, we will delete the websocket and try again.\n if (data[0] === 'setup') {\n this._updateConnectionStatus('connected');\n }\n return;\n }\n this._messageReceived.emit({\n type: data[0],\n content: data.slice(1)\n });\n };\n this._onWSClose = (event) => {\n console.warn(`Terminal websocket closed: ${event.code}`);\n if (!this.isDisposed) {\n this._reconnect();\n }\n };\n this._connectionStatus = 'connecting';\n this._connectionStatusChanged = new signaling_1.Signal(this);\n this._isDisposed = false;\n this._disposed = new signaling_1.Signal(this);\n this._messageReceived = new signaling_1.Signal(this);\n this._reconnectTimeout = null;\n this._ws = null;\n this._noOp = () => {\n /* no-op */\n };\n this._reconnectLimit = 7;\n this._reconnectAttempt = 0;\n this._pendingMessages = [];\n this._name = options.model.name;\n this.serverSettings =\n (_a = options.serverSettings) !== null && _a !== void 0 ? _a : __1.ServerConnection.makeSettings();\n this._createSocket();\n }\n /**\n * A signal emitted when the session is disposed.\n */\n get disposed() {\n return this._disposed;\n }\n /**\n * A signal emitted when a message is received from the server.\n */\n get messageReceived() {\n return this._messageReceived;\n }\n /**\n * Get the name of the terminal session.\n */\n get name() {\n return this._name;\n }\n /**\n * Get the model for the terminal session.\n */\n get model() {\n return { name: this._name };\n }\n /**\n * Test whether the session is disposed.\n */\n get isDisposed() {\n return this._isDisposed;\n }\n /**\n * Dispose of the resources held by the session.\n */\n dispose() {\n if (this._isDisposed) {\n return;\n }\n this._isDisposed = true;\n this._disposed.emit();\n this._updateConnectionStatus('disconnected');\n this._clearSocket();\n signaling_1.Signal.clearData(this);\n }\n /**\n * Send a message to the terminal session.\n *\n * #### Notes\n * If the connection is down, the message will be queued for sending when\n * the connection comes back up.\n */\n send(message) {\n this._sendMessage(message);\n }\n /**\n * Send a message on the websocket, or possibly queue for later sending.\n *\n * @param queue - whether to queue the message if it cannot be sent\n */\n _sendMessage(message, queue = true) {\n if (this._isDisposed || !message.content) {\n return;\n }\n if (this.connectionStatus === 'connected' && this._ws) {\n const msg = [message.type, ...message.content];\n this._ws.send(JSON.stringify(msg));\n }\n else if (queue) {\n this._pendingMessages.push(message);\n }\n else {\n throw new Error(`Could not send message: ${JSON.stringify(message)}`);\n }\n }\n /**\n * Send pending messages to the kernel.\n */\n _sendPending() {\n // We check to make sure we are still connected each time. For\n // example, if a websocket buffer overflows, it may close, so we should\n // stop sending messages.\n while (this.connectionStatus === 'connected' &&\n this._pendingMessages.length > 0) {\n this._sendMessage(this._pendingMessages[0], false);\n // We shift the message off the queue after the message is sent so that\n // if there is an exception, the message is still pending.\n this._pendingMessages.shift();\n }\n }\n /**\n * Reconnect to a terminal.\n *\n * #### Notes\n * This may try multiple times to reconnect to a terminal, and will sever\n * any existing connection.\n */\n reconnect() {\n this._errorIfDisposed();\n const result = new coreutils_2.PromiseDelegate();\n // Set up a listener for the connection status changing, which accepts or\n // rejects after the retries are done.\n const fulfill = (sender, status) => {\n if (status === 'connected') {\n result.resolve();\n this.connectionStatusChanged.disconnect(fulfill, this);\n }\n else if (status === 'disconnected') {\n result.reject(new Error('Terminal connection disconnected'));\n this.connectionStatusChanged.disconnect(fulfill, this);\n }\n };\n this.connectionStatusChanged.connect(fulfill, this);\n // Reset the reconnect limit so we start the connection attempts fresh\n this._reconnectAttempt = 0;\n // Start the reconnection process, which will also clear any existing\n // connection.\n this._reconnect();\n // Return the promise that should resolve on connection or reject if the\n // retries don't work.\n return result.promise;\n }\n /**\n * Attempt a connection if we have not exhausted connection attempts.\n */\n _reconnect() {\n this._errorIfDisposed();\n // Clear any existing reconnection attempt\n clearTimeout(this._reconnectTimeout);\n // Update the connection status and schedule a possible reconnection.\n if (this._reconnectAttempt < this._reconnectLimit) {\n this._updateConnectionStatus('connecting');\n // The first reconnect attempt should happen immediately, and subsequent\n // attempts should pick a random number in a growing range so that we\n // don't overload the server with synchronized reconnection attempts\n // across multiple kernels.\n const timeout = Private.getRandomIntInclusive(0, 1e3 * (Math.pow(2, this._reconnectAttempt) - 1));\n console.error(`Connection lost, reconnecting in ${Math.floor(timeout / 1000)} seconds.`);\n this._reconnectTimeout = setTimeout(this._createSocket, timeout);\n this._reconnectAttempt += 1;\n }\n else {\n this._updateConnectionStatus('disconnected');\n }\n // Clear the websocket event handlers and the socket itself.\n this._clearSocket();\n }\n /**\n * Forcefully clear the socket state.\n *\n * #### Notes\n * This will clear all socket state without calling any handlers and will\n * not update the connection status. If you call this method, you are\n * responsible for updating the connection status as needed and recreating\n * the socket if you plan to reconnect.\n */\n _clearSocket() {\n if (this._ws !== null) {\n // Clear the websocket event handlers and the socket itself.\n this._ws.onopen = this._noOp;\n this._ws.onclose = this._noOp;\n this._ws.onerror = this._noOp;\n this._ws.onmessage = this._noOp;\n this._ws.close();\n this._ws = null;\n }\n }\n /**\n * Shut down the terminal session.\n */\n async shutdown() {\n await (0, restapi_1.shutdownTerminal)(this.name, this.serverSettings);\n this.dispose();\n }\n /**\n * Clone the current terminal connection.\n */\n clone() {\n return new TerminalConnection(this);\n }\n /**\n * Handle connection status changes.\n */\n _updateConnectionStatus(connectionStatus) {\n if (this._connectionStatus === connectionStatus) {\n return;\n }\n this._connectionStatus = connectionStatus;\n // If we are not 'connecting', stop any reconnection attempts.\n if (connectionStatus !== 'connecting') {\n this._reconnectAttempt = 0;\n clearTimeout(this._reconnectTimeout);\n }\n // Send the pending messages if we just connected.\n if (connectionStatus === 'connected') {\n this._sendPending();\n }\n // Notify others that the connection status changed.\n this._connectionStatusChanged.emit(connectionStatus);\n }\n /**\n * Utility function to throw an error if this instance is disposed.\n */\n _errorIfDisposed() {\n if (this.isDisposed) {\n throw new Error('Terminal connection is disposed');\n }\n }\n /**\n * A signal emitted when the terminal connection status changes.\n */\n get connectionStatusChanged() {\n return this._connectionStatusChanged;\n }\n /**\n * The current connection status of the terminal connection.\n */\n get connectionStatus() {\n return this._connectionStatus;\n }\n}\nexports.TerminalConnection = TerminalConnection;\nvar Private;\n(function (Private) {\n /**\n * Get the url for a terminal.\n */\n function getTermUrl(baseUrl, name) {\n return coreutils_1.URLExt.join(baseUrl, restapi_1.TERMINAL_SERVICE_URL, encodeURIComponent(name));\n }\n Private.getTermUrl = getTermUrl;\n /**\n * Get a random integer between min and max, inclusive of both.\n *\n * #### Notes\n * From\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random#Getting_a_random_integer_between_two_values_inclusive\n *\n * From the MDN page: It might be tempting to use Math.round() to accomplish\n * that, but doing so would cause your random numbers to follow a non-uniform\n * distribution, which may not be acceptable for your needs.\n */\n function getRandomIntInclusive(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n }\n Private.getRandomIntInclusive = getRandomIntInclusive;\n})(Private || (Private = {}));\n//# sourceMappingURL=default.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TerminalAPI = exports.Terminal = void 0;\nconst Terminal = __importStar(require(\"./terminal\"));\nexports.Terminal = Terminal;\nconst TerminalAPI = __importStar(require(\"./restapi\"));\nexports.TerminalAPI = TerminalAPI;\n__exportStar(require(\"./manager\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TerminalManager = void 0;\nconst polling_1 = require(\"@lumino/polling\");\nconst signaling_1 = require(\"@lumino/signaling\");\nconst __1 = require(\"..\");\nconst basemanager_1 = require(\"../basemanager\");\nconst restapi_1 = require(\"./restapi\");\nconst default_1 = require(\"./default\");\n/**\n * A terminal session manager.\n */\nclass TerminalManager extends basemanager_1.BaseManager {\n /**\n * Construct a new terminal manager.\n */\n constructor(options = {}) {\n var _a;\n super(options);\n this._isReady = false;\n // As an optimization, we unwrap the models to just store the names.\n this._names = [];\n this._terminalConnections = new Set();\n this._runningChanged = new signaling_1.Signal(this);\n this._connectionFailure = new signaling_1.Signal(this);\n // Check if terminals are available\n if (!this.isAvailable()) {\n this._ready = Promise.reject('Terminals unavailable');\n this._ready.catch(_ => undefined);\n return;\n }\n // Start polling with exponential backoff.\n this._pollModels = new polling_1.Poll({\n auto: false,\n factory: () => this.requestRunning(),\n frequency: {\n interval: 10 * 1000,\n backoff: true,\n max: 300 * 1000\n },\n name: `@jupyterlab/services:TerminalManager#models`,\n standby: (_a = options.standby) !== null && _a !== void 0 ? _a : 'when-hidden'\n });\n // Initialize internal data.\n this._ready = (async () => {\n await this._pollModels.start();\n await this._pollModels.tick;\n this._isReady = true;\n })();\n }\n /**\n * Test whether the manager is ready.\n */\n get isReady() {\n return this._isReady;\n }\n /**\n * A promise that fulfills when the manager is ready.\n */\n get ready() {\n return this._ready;\n }\n /**\n * A signal emitted when the running terminals change.\n */\n get runningChanged() {\n return this._runningChanged;\n }\n /**\n * A signal emitted when there is a connection failure.\n */\n get connectionFailure() {\n return this._connectionFailure;\n }\n /**\n * Dispose of the resources used by the manager.\n */\n dispose() {\n if (this.isDisposed) {\n return;\n }\n this._names.length = 0;\n this._terminalConnections.forEach(x => x.dispose());\n this._pollModels.dispose();\n super.dispose();\n }\n /**\n * Whether the terminal service is available.\n */\n isAvailable() {\n return (0, restapi_1.isAvailable)();\n }\n /*\n * Connect to a running terminal.\n *\n * @param options - The options used to connect to the terminal.\n *\n * @returns The new terminal connection instance.\n *\n * #### Notes\n * The manager `serverSettings` will be used.\n */\n connectTo(options) {\n const terminalConnection = new default_1.TerminalConnection({\n ...options,\n serverSettings: this.serverSettings\n });\n this._onStarted(terminalConnection);\n if (!this._names.includes(options.model.name)) {\n // We trust the user to connect to an existing session, but we verify\n // asynchronously.\n void this.refreshRunning().catch(() => {\n /* no-op */\n });\n }\n return terminalConnection;\n }\n /**\n * Create an iterator over the most recent running terminals.\n *\n * @returns A new iterator over the running terminals.\n */\n running() {\n return this._models[Symbol.iterator]();\n }\n /**\n * Force a refresh of the running terminals.\n *\n * @returns A promise that with the list of running terminals.\n *\n * #### Notes\n * This is intended to be called only in response to a user action,\n * since the manager maintains its internal state.\n */\n async refreshRunning() {\n await this._pollModels.refresh();\n await this._pollModels.tick;\n }\n /**\n * Create a new terminal session.\n *\n * @param options - The options used to create the terminal.\n *\n * @returns A promise that resolves with the terminal connection instance.\n *\n * #### Notes\n * The manager `serverSettings` will be used unless overridden in the\n * options.\n */\n async startNew(options) {\n const model = await (0, restapi_1.startNew)(this.serverSettings, options === null || options === void 0 ? void 0 : options.name, options === null || options === void 0 ? void 0 : options.cwd);\n await this.refreshRunning();\n return this.connectTo({ model });\n }\n /**\n * Shut down a terminal session by name.\n */\n async shutdown(name) {\n await (0, restapi_1.shutdownTerminal)(name, this.serverSettings);\n await this.refreshRunning();\n }\n /**\n * Shut down all terminal sessions.\n *\n * @returns A promise that resolves when all of the sessions are shut down.\n */\n async shutdownAll() {\n // Update the list of models to make sure our list is current.\n await this.refreshRunning();\n // Shut down all models.\n await Promise.all(this._names.map(name => (0, restapi_1.shutdownTerminal)(name, this.serverSettings)));\n // Update the list of models to clear out our state.\n await this.refreshRunning();\n }\n /**\n * Execute a request to the server to poll running terminals and update state.\n */\n async requestRunning() {\n var _a, _b;\n let models;\n try {\n models = await (0, restapi_1.listRunning)(this.serverSettings);\n }\n catch (err) {\n // Handle network errors, as well as cases where we are on a\n // JupyterHub and the server is not running. JupyterHub returns a\n // 503 (<2.0) or 424 (>2.0) in that case.\n if (err instanceof __1.ServerConnection.NetworkError ||\n ((_a = err.response) === null || _a === void 0 ? void 0 : _a.status) === 503 ||\n ((_b = err.response) === null || _b === void 0 ? void 0 : _b.status) === 424) {\n this._connectionFailure.emit(err);\n }\n throw err;\n }\n if (this.isDisposed) {\n return;\n }\n const names = models.map(({ name }) => name).sort();\n if (names === this._names) {\n // Identical models list, so just return\n return;\n }\n this._names = names;\n this._terminalConnections.forEach(tc => {\n if (!names.includes(tc.name)) {\n tc.dispose();\n }\n });\n this._runningChanged.emit(this._models);\n }\n /**\n * Handle a session starting.\n */\n _onStarted(terminalConnection) {\n this._terminalConnections.add(terminalConnection);\n terminalConnection.disposed.connect(this._onDisposed, this);\n }\n /**\n * Handle a session terminating.\n */\n _onDisposed(terminalConnection) {\n this._terminalConnections.delete(terminalConnection);\n // Update the running models to make sure we reflect the server state\n void this.refreshRunning().catch(() => {\n /* no-op */\n });\n }\n get _models() {\n return this._names.map(name => {\n return { name };\n });\n }\n}\nexports.TerminalManager = TerminalManager;\n/**\n * The namespace for TerminalManager statics.\n */\n(function (TerminalManager) {\n /**\n * A no-op terminal manager to be used when starting terminals is not supported.\n */\n class NoopManager extends TerminalManager {\n constructor() {\n super(...arguments);\n this._readyPromise = new Promise(() => {\n /* no-op */\n });\n }\n /**\n * Whether the manager is active.\n */\n get isActive() {\n return false;\n }\n /**\n * Used for testing.\n */\n get parentReady() {\n return super.ready;\n }\n /**\n * A promise that fulfills when the manager is ready (never).\n */\n get ready() {\n return this.parentReady.then(() => this._readyPromise);\n }\n /**\n * Create a new terminal session - throw an error since it is not supported.\n *\n */\n async startNew(options) {\n return Promise.reject(new Error('Not implemented in no-op Terminal Manager'));\n }\n /*\n * Connect to a running terminal - throw an error since it is not supported.\n */\n connectTo(options) {\n throw Error('Not implemented in no-op Terminal Manager');\n }\n /**\n * Shut down a session by id - throw an error since it is not supported.\n */\n async shutdown(id) {\n return Promise.reject(new Error('Not implemented in no-op Terminal Manager'));\n }\n /**\n * Execute a request to the server to poll running sessions and update state.\n */\n async requestRunning() {\n return Promise.resolve();\n }\n }\n TerminalManager.NoopManager = NoopManager;\n})(TerminalManager = exports.TerminalManager || (exports.TerminalManager = {}));\n//# sourceMappingURL=manager.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.shutdownTerminal = exports.listRunning = exports.startNew = exports.isAvailable = exports.TERMINAL_SERVICE_URL = void 0;\nconst coreutils_1 = require(\"@jupyterlab/coreutils\");\nconst serverconnection_1 = require(\"../serverconnection\");\n/**\n * The url for the terminal service.\n */\nexports.TERMINAL_SERVICE_URL = 'api/terminals';\n/**\n * Whether the terminal service is available.\n */\nfunction isAvailable() {\n const available = String(coreutils_1.PageConfig.getOption('terminalsAvailable'));\n return available.toLowerCase() === 'true';\n}\nexports.isAvailable = isAvailable;\n/**\n * Start a new terminal session.\n *\n * @param settings - The server settings to use.\n *\n * @param name - The name of the target terminal.\n *\n * @param cwd - The path in which the terminal will start.\n *\n * @returns A promise that resolves with the session model.\n */\nasync function startNew(settings = serverconnection_1.ServerConnection.makeSettings(), name, cwd) {\n Private.errorIfNotAvailable();\n const url = coreutils_1.URLExt.join(settings.baseUrl, exports.TERMINAL_SERVICE_URL);\n const init = {\n method: 'POST',\n body: JSON.stringify({ name, cwd })\n };\n const response = await serverconnection_1.ServerConnection.makeRequest(url, init, settings);\n if (response.status !== 200) {\n const err = await serverconnection_1.ServerConnection.ResponseError.create(response);\n throw err;\n }\n const data = await response.json();\n // TODO: Validate model\n return data;\n}\nexports.startNew = startNew;\n/**\n * List the running terminal sessions.\n *\n * @param settings - The server settings to use.\n *\n * @returns A promise that resolves with the list of running session models.\n */\nasync function listRunning(settings = serverconnection_1.ServerConnection.makeSettings()) {\n Private.errorIfNotAvailable();\n const url = coreutils_1.URLExt.join(settings.baseUrl, exports.TERMINAL_SERVICE_URL);\n const response = await serverconnection_1.ServerConnection.makeRequest(url, {}, settings);\n if (response.status !== 200) {\n const err = await serverconnection_1.ServerConnection.ResponseError.create(response);\n throw err;\n }\n const data = await response.json();\n if (!Array.isArray(data)) {\n throw new Error('Invalid terminal list');\n }\n // TODO: validate each model\n return data;\n}\nexports.listRunning = listRunning;\n/**\n * Shut down a terminal session by name.\n *\n * @param name - The name of the target session.\n *\n * @param settings - The server settings to use.\n *\n * @returns A promise that resolves when the session is shut down.\n */\nasync function shutdownTerminal(name, settings = serverconnection_1.ServerConnection.makeSettings()) {\n var _a;\n Private.errorIfNotAvailable();\n const url = coreutils_1.URLExt.join(settings.baseUrl, exports.TERMINAL_SERVICE_URL, name);\n const init = { method: 'DELETE' };\n const response = await serverconnection_1.ServerConnection.makeRequest(url, init, settings);\n if (response.status === 404) {\n const data = await response.json();\n const msg = (_a = data.message) !== null && _a !== void 0 ? _a : `The terminal session \"${name}\"\" does not exist on the server`;\n console.warn(msg);\n }\n else if (response.status !== 204) {\n const err = await serverconnection_1.ServerConnection.ResponseError.create(response);\n throw err;\n }\n}\nexports.shutdownTerminal = shutdownTerminal;\nvar Private;\n(function (Private) {\n /**\n * Throw an error if terminals are not available.\n */\n function errorIfNotAvailable() {\n if (!isAvailable()) {\n throw new Error('Terminals Unavailable');\n }\n }\n Private.errorIfNotAvailable = errorIfNotAvailable;\n})(Private || (Private = {}));\n//# sourceMappingURL=restapi.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isAvailable = void 0;\nconst restapi_1 = require(\"./restapi\");\nObject.defineProperty(exports, \"isAvailable\", { enumerable: true, get: function () { return restapi_1.isAvailable; } });\n//# sourceMappingURL=terminal.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UserManager = void 0;\nconst coreutils_1 = require(\"@jupyterlab/coreutils\");\nconst coreutils_2 = require(\"@lumino/coreutils\");\nconst polling_1 = require(\"@lumino/polling\");\nconst signaling_1 = require(\"@lumino/signaling\");\nconst serverconnection_1 = require(\"../serverconnection\");\nconst basemanager_1 = require(\"../basemanager\");\n/**\n * The url for the lab workspaces service.\n */\nconst SERVICE_USER_URL = 'api/me';\n/**\n * The service's ID.\n * Used to uniquely identify the poll, and\n * the item in local storage.\n */\nconst SERVICE_ID = '@jupyterlab/services:UserManager#user';\n/**\n * The user API service manager.\n */\nclass UserManager extends basemanager_1.BaseManager {\n /**\n * Create a new user manager.\n */\n constructor(options = {}) {\n var _a;\n super(options);\n this._isReady = false;\n this._userChanged = new signaling_1.Signal(this);\n this._connectionFailure = new signaling_1.Signal(this);\n // Initialize internal data.\n this._ready = this.requestUser()\n .then(() => {\n if (this.isDisposed) {\n return;\n }\n this._isReady = true;\n })\n .catch(_ => \n // Return a promise that will never resolve, so user service is never ready\n // This typically occurs when the backend has no user service\n new Promise(() => {\n // no-op\n }));\n this._pollSpecs = new polling_1.Poll({\n auto: false,\n factory: () => this.requestUser(),\n frequency: {\n interval: 61 * 1000,\n backoff: true,\n max: 300 * 1000\n },\n name: SERVICE_ID,\n standby: (_a = options.standby) !== null && _a !== void 0 ? _a : 'when-hidden'\n });\n void this.ready.then(() => {\n void this._pollSpecs.start();\n });\n }\n /**\n * Test whether the manager is ready.\n */\n get isReady() {\n return this._isReady;\n }\n /**\n * A promise that fulfills when the manager is ready.\n */\n get ready() {\n return this._ready;\n }\n /**\n * Get the most recently fetched identity.\n */\n get identity() {\n return this._identity;\n }\n /**\n * Get the most recently fetched permissions.\n */\n get permissions() {\n return this._permissions;\n }\n /**\n * A signal emitted when the user changes.\n */\n get userChanged() {\n return this._userChanged;\n }\n /**\n * A signal emitted when there is a connection failure.\n */\n get connectionFailure() {\n return this._connectionFailure;\n }\n /**\n * Dispose of the resources used by the manager.\n */\n dispose() {\n this._pollSpecs.dispose();\n super.dispose();\n }\n /**\n * Force a refresh of the specs from the server.\n *\n * @returns A promise that resolves when the specs are fetched.\n *\n * #### Notes\n * This is intended to be called only in response to a user action,\n * since the manager maintains its internal state.\n */\n async refreshUser() {\n await this._pollSpecs.refresh();\n await this._pollSpecs.tick;\n }\n /**\n * Execute a request to the server to poll the user and update state.\n */\n async requestUser() {\n if (this.isDisposed) {\n return;\n }\n const { baseUrl } = this.serverSettings;\n const { makeRequest, ResponseError } = serverconnection_1.ServerConnection;\n const url = coreutils_1.URLExt.join(baseUrl, SERVICE_USER_URL);\n const response = await makeRequest(url, {}, this.serverSettings);\n if (response.status !== 200) {\n const err = await ResponseError.create(response);\n throw err;\n }\n const oldUser = {\n identity: this._identity,\n permissions: this._permissions\n };\n const newUser = await response.json();\n const identity = newUser.identity;\n // store the color and initials for the user\n // this info is not provided by the server\n const { localStorage } = window;\n const data = localStorage.getItem(SERVICE_ID);\n if (data && (!identity.initials || !identity.color)) {\n const localUser = JSON.parse(data);\n identity.initials =\n identity.initials ||\n localUser.initials ||\n identity.name.substring(0, 1);\n identity.color =\n identity.color || localUser.color || Private.getRandomColor();\n }\n if (!coreutils_2.JSONExt.deepEqual(newUser, oldUser)) {\n this._identity = identity;\n this._permissions = newUser.permissions;\n localStorage.setItem(SERVICE_ID, JSON.stringify(identity));\n this._userChanged.emit(newUser);\n }\n }\n}\nexports.UserManager = UserManager;\n/**\n * A namespace for module-private functionality.\n *\n * Note: We do not want to export this function\n * to move it to css variables in the Theme.\n */\nvar Private;\n(function (Private) {\n /**\n * Predefined colors for users\n */\n const userColors = [\n 'var(--jp-collaborator-color1)',\n 'var(--jp-collaborator-color2)',\n 'var(--jp-collaborator-color3)',\n 'var(--jp-collaborator-color4)',\n 'var(--jp-collaborator-color5)',\n 'var(--jp-collaborator-color6)',\n 'var(--jp-collaborator-color7)'\n ];\n /**\n * Get a random color from the list of colors.\n */\n Private.getRandomColor = () => userColors[Math.floor(Math.random() * userColors.length)];\n})(Private || (Private = {}));\n//# sourceMappingURL=index.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateProperty = void 0;\n/**\n * Validate a property as being on an object, and optionally\n * of a given type and among a given set of values.\n */\nfunction validateProperty(\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nobject, name, typeName, values = []) {\n if (!object.hasOwnProperty(name)) {\n throw Error(`Missing property '${name}'`);\n }\n const value = object[name];\n if (typeName !== void 0) {\n let valid = true;\n switch (typeName) {\n case 'array':\n valid = Array.isArray(value);\n break;\n case 'object':\n valid = typeof value !== 'undefined';\n break;\n default:\n valid = typeof value === typeName;\n }\n if (!valid) {\n throw new Error(`Property '${name}' is not of type '${typeName}'`);\n }\n if (values.length > 0) {\n let valid = true;\n switch (typeName) {\n case 'string':\n case 'number':\n case 'boolean':\n valid = values.includes(value);\n break;\n default:\n valid = values.findIndex(v => v === value) >= 0;\n break;\n }\n if (!valid) {\n throw new Error(`Property '${name}' is not one of the valid values ${JSON.stringify(values)}`);\n }\n }\n }\n}\nexports.validateProperty = validateProperty;\n//# sourceMappingURL=validate.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WorkspaceManager = void 0;\nconst coreutils_1 = require(\"@jupyterlab/coreutils\");\nconst statedb_1 = require(\"@jupyterlab/statedb\");\nconst serverconnection_1 = require(\"../serverconnection\");\n/**\n * The url for the lab workspaces service.\n */\nconst SERVICE_WORKSPACES_URL = 'api/workspaces';\n/**\n * The workspaces API service manager.\n */\nclass WorkspaceManager extends statedb_1.DataConnector {\n /**\n * Create a new workspace manager.\n */\n constructor(options = {}) {\n var _a;\n super();\n this.serverSettings =\n (_a = options.serverSettings) !== null && _a !== void 0 ? _a : serverconnection_1.ServerConnection.makeSettings();\n }\n /**\n * Fetch a workspace.\n *\n * @param id - The workspace's ID.\n *\n * @returns A promise that resolves if successful.\n */\n async fetch(id) {\n const { serverSettings } = this;\n const { baseUrl, appUrl } = serverSettings;\n const { makeRequest, ResponseError } = serverconnection_1.ServerConnection;\n const base = baseUrl + appUrl;\n const url = Private.url(base, id);\n const response = await makeRequest(url, {}, serverSettings);\n if (response.status !== 200) {\n const err = await ResponseError.create(response);\n throw err;\n }\n return response.json();\n }\n /**\n * Fetch the list of workspace IDs that exist on the server.\n *\n * @returns A promise that resolves if successful.\n */\n async list() {\n const { serverSettings } = this;\n const { baseUrl, appUrl } = serverSettings;\n const { makeRequest, ResponseError } = serverconnection_1.ServerConnection;\n const base = baseUrl + appUrl;\n const url = Private.url(base, '');\n const response = await makeRequest(url, {}, serverSettings);\n if (response.status !== 200) {\n const err = await ResponseError.create(response);\n throw err;\n }\n const result = await response.json();\n return result.workspaces;\n }\n /**\n * Remove a workspace from the server.\n *\n * @param id - The workspaces's ID.\n *\n * @returns A promise that resolves if successful.\n */\n async remove(id) {\n const { serverSettings } = this;\n const { baseUrl, appUrl } = serverSettings;\n const { makeRequest, ResponseError } = serverconnection_1.ServerConnection;\n const base = baseUrl + appUrl;\n const url = Private.url(base, id);\n const init = { method: 'DELETE' };\n const response = await makeRequest(url, init, serverSettings);\n if (response.status !== 204) {\n const err = await ResponseError.create(response);\n throw err;\n }\n }\n /**\n * Save a workspace.\n *\n * @param id - The workspace's ID.\n *\n * @param workspace - The workspace being saved.\n *\n * @returns A promise that resolves if successful.\n */\n async save(id, workspace) {\n const { serverSettings } = this;\n const { baseUrl, appUrl } = serverSettings;\n const { makeRequest, ResponseError } = serverconnection_1.ServerConnection;\n const base = baseUrl + appUrl;\n const url = Private.url(base, id);\n const init = { body: JSON.stringify(workspace), method: 'PUT' };\n const response = await makeRequest(url, init, serverSettings);\n if (response.status !== 204) {\n const err = await ResponseError.create(response);\n throw err;\n }\n }\n}\nexports.WorkspaceManager = WorkspaceManager;\n/**\n * A namespace for private data.\n */\nvar Private;\n(function (Private) {\n /**\n * Get the url for a workspace.\n */\n function url(base, id) {\n return coreutils_1.URLExt.join(base, SERVICE_WORKSPACES_URL, id);\n }\n Private.url = url;\n})(Private || (Private = {}));\n//# sourceMappingURL=index.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DataConnector = void 0;\n/**\n * An abstract class that adheres to the data connector interface.\n *\n * @typeparam T - The basic entity response type a service's connector.\n *\n * @typeparam U - The basic entity request type, which is conventionally the\n * same as the response type but may be different if a service's implementation\n * requires input data to be different from output responses. Defaults to `T`.\n *\n * @typeparam V - The basic token applied to a request, conventionally a string\n * ID or filter, but may be set to a different type when an implementation\n * requires it. Defaults to `string`.\n *\n * @typeparam W - The type of the optional `query` parameter of the `list`\n * method. Defaults to `string`.\n *\n * #### Notes\n * The only abstract method in this class is the `fetch` method, which must be\n * reimplemented by all subclasses. The `remove` and `save` methods have a\n * default implementation that returns a promise that will always reject. This\n * class is a convenience superclass for connectors that only need to `fetch`.\n */\nclass DataConnector {\n /**\n * Retrieve the list of items available from the data connector.\n *\n * @param query - The optional query filter to apply to the connector request.\n *\n * @returns A promise that always rejects with an error.\n *\n * #### Notes\n * Subclasses should reimplement if they support a back-end that can list.\n */\n async list(query) {\n throw new Error('DataConnector#list method has not been implemented.');\n }\n /**\n * Remove a value using the data connector.\n *\n * @param id - The identifier for the data being removed.\n *\n * @returns A promise that always rejects with an error.\n *\n * #### Notes\n * Subclasses should reimplement if they support a back-end that can remove.\n */\n async remove(id) {\n throw new Error('DataConnector#remove method has not been implemented.');\n }\n /**\n * Save a value using the data connector.\n *\n * @param id - The identifier for the data being saved.\n *\n * @param value - The data being saved.\n *\n * @returns A promise that always rejects with an error.\n *\n * #### Notes\n * Subclasses should reimplement if they support a back-end that can save.\n */\n async save(id, value) {\n throw new Error('DataConnector#save method has not been implemented.');\n }\n}\nexports.DataConnector = DataConnector;\n//# sourceMappingURL=dataconnector.js.map","\"use strict\";\n/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|----------------------------------------------------------------------------*/\n/**\n * @packageDocumentation\n * @module statedb\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./dataconnector\"), exports);\n__exportStar(require(\"./interfaces\"), exports);\n__exportStar(require(\"./restorablepool\"), exports);\n__exportStar(require(\"./statedb\"), exports);\n__exportStar(require(\"./tokens\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=interfaces.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RestorablePool = void 0;\nconst coreutils_1 = require(\"@lumino/coreutils\");\nconst properties_1 = require(\"@lumino/properties\");\nconst signaling_1 = require(\"@lumino/signaling\");\n/**\n * An object pool that supports restoration.\n *\n * @typeparam T - The type of object being tracked.\n */\nclass RestorablePool {\n /**\n * Create a new restorable pool.\n *\n * @param options - The instantiation options for a restorable pool.\n */\n constructor(options) {\n this._added = new signaling_1.Signal(this);\n this._current = null;\n this._currentChanged = new signaling_1.Signal(this);\n this._hasRestored = false;\n this._isDisposed = false;\n this._objects = new Set();\n this._restore = null;\n this._restored = new coreutils_1.PromiseDelegate();\n this._updated = new signaling_1.Signal(this);\n this.namespace = options.namespace;\n }\n /**\n * A signal emitted when an object object is added.\n *\n * #### Notes\n * This signal will only fire when an object is added to the pool.\n * It will not fire if an object injected into the pool.\n */\n get added() {\n return this._added;\n }\n /**\n * The current object.\n *\n * #### Notes\n * The restorable pool does not set `current`. It is intended for client use.\n *\n * If `current` is set to an object that does not exist in the pool, it is a\n * no-op.\n */\n get current() {\n return this._current;\n }\n set current(obj) {\n if (this._current === obj) {\n return;\n }\n if (obj !== null && this._objects.has(obj)) {\n this._current = obj;\n this._currentChanged.emit(this._current);\n }\n }\n /**\n * A signal emitted when the current widget changes.\n */\n get currentChanged() {\n return this._currentChanged;\n }\n /**\n * Test whether the pool is disposed.\n */\n get isDisposed() {\n return this._isDisposed;\n }\n /**\n * A promise resolved when the restorable pool has been restored.\n */\n get restored() {\n return this._restored.promise;\n }\n /**\n * The number of objects held by the pool.\n */\n get size() {\n return this._objects.size;\n }\n /**\n * A signal emitted when an object is updated.\n */\n get updated() {\n return this._updated;\n }\n /**\n * Add a new object to the pool.\n *\n * @param obj - The object object being added.\n *\n * #### Notes\n * The object passed into the pool is added synchronously; its existence in\n * the pool can be checked with the `has()` method. The promise this method\n * returns resolves after the object has been added and saved to an underlying\n * restoration connector, if one is available.\n */\n async add(obj) {\n var _a, _b;\n if (obj.isDisposed) {\n const warning = 'A disposed object cannot be added.';\n console.warn(warning, obj);\n throw new Error(warning);\n }\n if (this._objects.has(obj)) {\n const warning = 'This object already exists in the pool.';\n console.warn(warning, obj);\n throw new Error(warning);\n }\n this._objects.add(obj);\n obj.disposed.connect(this._onInstanceDisposed, this);\n if (Private.injectedProperty.get(obj)) {\n return;\n }\n if (this._restore) {\n const { connector } = this._restore;\n const objName = this._restore.name(obj);\n if (objName) {\n const name = `${this.namespace}:${objName}`;\n const data = (_b = (_a = this._restore).args) === null || _b === void 0 ? void 0 : _b.call(_a, obj);\n Private.nameProperty.set(obj, name);\n await connector.save(name, { data });\n }\n }\n // Emit the added signal.\n this._added.emit(obj);\n }\n /**\n * Dispose of the resources held by the pool.\n *\n * #### Notes\n * Disposing a pool does not affect the underlying data in the data connector,\n * it simply disposes the client-side pool without making any connector calls.\n */\n dispose() {\n if (this.isDisposed) {\n return;\n }\n this._current = null;\n this._isDisposed = true;\n this._objects.clear();\n signaling_1.Signal.clearData(this);\n }\n /**\n * Find the first object in the pool that satisfies a filter function.\n *\n * @param - fn The filter function to call on each object.\n */\n find(fn) {\n const values = this._objects.values();\n for (const value of values) {\n if (fn(value)) {\n return value;\n }\n }\n return undefined;\n }\n /**\n * Iterate through each object in the pool.\n *\n * @param fn - The function to call on each object.\n */\n forEach(fn) {\n this._objects.forEach(fn);\n }\n /**\n * Filter the objects in the pool based on a predicate.\n *\n * @param fn - The function by which to filter.\n */\n filter(fn) {\n const filtered = [];\n this.forEach(obj => {\n if (fn(obj)) {\n filtered.push(obj);\n }\n });\n return filtered;\n }\n /**\n * Inject an object into the restorable pool without the pool handling its\n * restoration lifecycle.\n *\n * @param obj - The object to inject into the pool.\n */\n inject(obj) {\n Private.injectedProperty.set(obj, true);\n return this.add(obj);\n }\n /**\n * Check if this pool has the specified object.\n *\n * @param obj - The object whose existence is being checked.\n */\n has(obj) {\n return this._objects.has(obj);\n }\n /**\n * Restore the objects in this pool's namespace.\n *\n * @param options - The configuration options that describe restoration.\n *\n * @returns A promise that resolves when restoration has completed.\n *\n * #### Notes\n * This function should almost never be invoked by client code. Its primary\n * use case is to be invoked by a layout restorer plugin that handles\n * multiple restorable pools and, when ready, asks them each to restore their\n * respective objects.\n */\n async restore(options) {\n if (this._hasRestored) {\n throw new Error('This pool has already been restored.');\n }\n this._hasRestored = true;\n const { command, connector, registry, when } = options;\n const namespace = this.namespace;\n const promises = when\n ? [connector.list(namespace)].concat(when)\n : [connector.list(namespace)];\n this._restore = options;\n const [saved] = await Promise.all(promises);\n const values = await Promise.all(saved.ids.map(async (id, index) => {\n const value = saved.values[index];\n const args = value && value.data;\n if (args === undefined) {\n return connector.remove(id);\n }\n // Execute the command and if it fails, delete the state restore data.\n return registry\n .execute(command, args)\n .catch(() => connector.remove(id));\n }));\n this._restored.resolve();\n return values;\n }\n /**\n * Save the restore data for a given object.\n *\n * @param obj - The object being saved.\n */\n async save(obj) {\n var _a, _b;\n const injected = Private.injectedProperty.get(obj);\n if (!this._restore || !this.has(obj) || injected) {\n return;\n }\n const { connector } = this._restore;\n const objName = this._restore.name(obj);\n const oldName = Private.nameProperty.get(obj);\n const newName = objName ? `${this.namespace}:${objName}` : '';\n if (oldName && oldName !== newName) {\n await connector.remove(oldName);\n }\n // Set the name property irrespective of whether the new name is null.\n Private.nameProperty.set(obj, newName);\n if (newName) {\n const data = (_b = (_a = this._restore).args) === null || _b === void 0 ? void 0 : _b.call(_a, obj);\n await connector.save(newName, { data });\n }\n if (oldName !== newName) {\n this._updated.emit(obj);\n }\n }\n /**\n * Clean up after disposed objects.\n */\n _onInstanceDisposed(obj) {\n this._objects.delete(obj);\n if (obj === this._current) {\n this._current = null;\n this._currentChanged.emit(this._current);\n }\n if (Private.injectedProperty.get(obj)) {\n return;\n }\n if (!this._restore) {\n return;\n }\n const { connector } = this._restore;\n const name = Private.nameProperty.get(obj);\n if (name) {\n void connector.remove(name);\n }\n }\n}\nexports.RestorablePool = RestorablePool;\n/*\n * A namespace for private data.\n */\nvar Private;\n(function (Private) {\n /**\n * An attached property to indicate whether an object has been injected.\n */\n Private.injectedProperty = new properties_1.AttachedProperty({\n name: 'injected',\n create: () => false\n });\n /**\n * An attached property for an object's ID.\n */\n Private.nameProperty = new properties_1.AttachedProperty({\n name: 'name',\n create: () => ''\n });\n})(Private || (Private = {}));\n//# sourceMappingURL=restorablepool.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StateDB = void 0;\nconst signaling_1 = require(\"@lumino/signaling\");\n/**\n * The default concrete implementation of a state database.\n */\nclass StateDB {\n /**\n * Create a new state database.\n *\n * @param options - The instantiation options for a state database.\n */\n constructor(options = {}) {\n this._changed = new signaling_1.Signal(this);\n const { connector, transform } = options;\n this._connector = connector || new StateDB.Connector();\n if (!transform) {\n this._ready = Promise.resolve(undefined);\n }\n else {\n this._ready = transform.then(transformation => {\n const { contents, type } = transformation;\n switch (type) {\n case 'cancel':\n return;\n case 'clear':\n return this._clear();\n case 'merge':\n return this._merge(contents || {});\n case 'overwrite':\n return this._overwrite(contents || {});\n default:\n return;\n }\n });\n }\n }\n /**\n * A signal that emits the change type any time a value changes.\n */\n get changed() {\n return this._changed;\n }\n /**\n * Clear the entire database.\n */\n async clear() {\n await this._ready;\n await this._clear();\n }\n /**\n * Retrieve a saved bundle from the database.\n *\n * @param id - The identifier used to retrieve a data bundle.\n *\n * @returns A promise that bears a data payload if available.\n *\n * #### Notes\n * The `id` values of stored items in the state database are formatted:\n * `'namespace:identifier'`, which is the same convention that command\n * identifiers in JupyterLab use as well. While this is not a technical\n * requirement for `fetch()`, `remove()`, and `save()`, it *is* necessary for\n * using the `list(namespace: string)` method.\n *\n * The promise returned by this method may be rejected if an error occurs in\n * retrieving the data. Non-existence of an `id` will succeed with the `value`\n * `undefined`.\n */\n async fetch(id) {\n await this._ready;\n return this._fetch(id);\n }\n /**\n * Retrieve all the saved bundles for a namespace.\n *\n * @param filter - The namespace prefix to retrieve.\n *\n * @returns A promise that bears a collection of payloads for a namespace.\n *\n * #### Notes\n * Namespaces are entirely conventional entities. The `id` values of stored\n * items in the state database are formatted: `'namespace:identifier'`, which\n * is the same convention that command identifiers in JupyterLab use as well.\n *\n * If there are any errors in retrieving the data, they will be logged to the\n * console in order to optimistically return any extant data without failing.\n * This promise will always succeed.\n */\n async list(namespace) {\n await this._ready;\n return this._list(namespace);\n }\n /**\n * Remove a value from the database.\n *\n * @param id - The identifier for the data being removed.\n *\n * @returns A promise that is rejected if remove fails and succeeds otherwise.\n */\n async remove(id) {\n await this._ready;\n await this._remove(id);\n this._changed.emit({ id, type: 'remove' });\n }\n /**\n * Save a value in the database.\n *\n * @param id - The identifier for the data being saved.\n *\n * @param value - The data being saved.\n *\n * @returns A promise that is rejected if saving fails and succeeds otherwise.\n *\n * #### Notes\n * The `id` values of stored items in the state database are formatted:\n * `'namespace:identifier'`, which is the same convention that command\n * identifiers in JupyterLab use as well. While this is not a technical\n * requirement for `fetch()`, `remove()`, and `save()`, it *is* necessary for\n * using the `list(namespace: string)` method.\n */\n async save(id, value) {\n await this._ready;\n await this._save(id, value);\n this._changed.emit({ id, type: 'save' });\n }\n /**\n * Return a serialized copy of the state database's entire contents.\n *\n * @returns A promise that resolves with the database contents as JSON.\n */\n async toJSON() {\n await this._ready;\n const { ids, values } = await this._list();\n return values.reduce((acc, val, idx) => {\n acc[ids[idx]] = val;\n return acc;\n }, {});\n }\n /**\n * Clear the entire database.\n */\n async _clear() {\n await Promise.all((await this._list()).ids.map(id => this._remove(id)));\n }\n /**\n * Fetch a value from the database.\n */\n async _fetch(id) {\n const value = await this._connector.fetch(id);\n if (value) {\n return JSON.parse(value).v;\n }\n }\n /**\n * Fetch a list from the database.\n */\n async _list(namespace = '') {\n const { ids, values } = await this._connector.list(namespace);\n return {\n ids,\n values: values.map(val => JSON.parse(val).v)\n };\n }\n /**\n * Merge data into the state database.\n */\n async _merge(contents) {\n await Promise.all(Object.keys(contents).map(key => contents[key] && this._save(key, contents[key])));\n }\n /**\n * Overwrite the entire database with new contents.\n */\n async _overwrite(contents) {\n await this._clear();\n await this._merge(contents);\n }\n /**\n * Remove a key in the database.\n */\n async _remove(id) {\n return this._connector.remove(id);\n }\n /**\n * Save a key and its value in the database.\n */\n async _save(id, value) {\n return this._connector.save(id, JSON.stringify({ v: value }));\n }\n}\nexports.StateDB = StateDB;\n/**\n * A namespace for StateDB statics.\n */\n(function (StateDB) {\n /**\n * An in-memory string key/value data connector.\n */\n class Connector {\n constructor() {\n this._storage = {};\n }\n /**\n * Retrieve an item from the data connector.\n */\n async fetch(id) {\n return this._storage[id];\n }\n /**\n * Retrieve the list of items available from the data connector.\n *\n * @param namespace - If not empty, only keys whose first token before `:`\n * exactly match `namespace` will be returned, e.g. `foo` in `foo:bar`.\n */\n async list(namespace = '') {\n return Object.keys(this._storage).reduce((acc, val) => {\n if (namespace === '' ? true : namespace === val.split(':')[0]) {\n acc.ids.push(val);\n acc.values.push(this._storage[val]);\n }\n return acc;\n }, { ids: [], values: [] });\n }\n /**\n * Remove a value using the data connector.\n */\n async remove(id) {\n delete this._storage[id];\n }\n /**\n * Save a value using the data connector.\n */\n async save(id, value) {\n this._storage[id] = value;\n }\n }\n StateDB.Connector = Connector;\n})(StateDB = exports.StateDB || (exports.StateDB = {}));\n//# sourceMappingURL=statedb.js.map","\"use strict\";\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.IStateDB = void 0;\nconst coreutils_1 = require(\"@lumino/coreutils\");\n/**\n * The default state database token.\n */\nexports.IStateDB = new coreutils_1.Token('@jupyterlab/coreutils:IStateDB', `A service for the JupyterLab state database.\n Use this if you want to store data that will persist across page loads.\n See \"state database\" for more information.`);\n//# sourceMappingURL=tokens.js.map","// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/*-----------------------------------------------------------------------------\n| Copyright (c) 2014-2017, PhosphorJS Contributors\n|\n| Distributed under the terms of the BSD 3-Clause License.\n|\n| The full license is in the file LICENSE, distributed with this software.\n|----------------------------------------------------------------------------*/\n/**\n * The namespace for array-specific algorithms.\n */\nvar ArrayExt;\n(function (ArrayExt) {\n /**\n * Find the index of the first occurrence of a value in an array.\n *\n * @param array - The array-like object to search.\n *\n * @param value - The value to locate in the array. Values are\n * compared using strict `===` equality.\n *\n * @param start - The index of the first element in the range to be\n * searched, inclusive. The default value is `0`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @param stop - The index of the last element in the range to be\n * searched, inclusive. The default value is `-1`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @returns The index of the first occurrence of the value, or `-1`\n * if the value is not found.\n *\n * #### Notes\n * If `stop < start` the search will wrap at the end of the array.\n *\n * #### Complexity\n * Linear.\n *\n * #### Undefined Behavior\n * A `start` or `stop` which is non-integral.\n *\n * #### Example\n * ```typescript\n * import { ArrayExt } from '@lumino/algorithm';\n *\n * let data = ['one', 'two', 'three', 'four', 'one'];\n * ArrayExt.firstIndexOf(data, 'red'); // -1\n * ArrayExt.firstIndexOf(data, 'one'); // 0\n * ArrayExt.firstIndexOf(data, 'one', 1); // 4\n * ArrayExt.firstIndexOf(data, 'two', 2); // -1\n * ArrayExt.firstIndexOf(data, 'two', 2, 1); // 1\n * ```\n */\n function firstIndexOf(array, value, start = 0, stop = -1) {\n let n = array.length;\n if (n === 0) {\n return -1;\n }\n if (start < 0) {\n start = Math.max(0, start + n);\n }\n else {\n start = Math.min(start, n - 1);\n }\n if (stop < 0) {\n stop = Math.max(0, stop + n);\n }\n else {\n stop = Math.min(stop, n - 1);\n }\n let span;\n if (stop < start) {\n span = stop + 1 + (n - start);\n }\n else {\n span = stop - start + 1;\n }\n for (let i = 0; i < span; ++i) {\n let j = (start + i) % n;\n if (array[j] === value) {\n return j;\n }\n }\n return -1;\n }\n ArrayExt.firstIndexOf = firstIndexOf;\n /**\n * Find the index of the last occurrence of a value in an array.\n *\n * @param array - The array-like object to search.\n *\n * @param value - The value to locate in the array. Values are\n * compared using strict `===` equality.\n *\n * @param start - The index of the first element in the range to be\n * searched, inclusive. The default value is `-1`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @param stop - The index of the last element in the range to be\n * searched, inclusive. The default value is `0`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @returns The index of the last occurrence of the value, or `-1`\n * if the value is not found.\n *\n * #### Notes\n * If `start < stop` the search will wrap at the front of the array.\n *\n * #### Complexity\n * Linear.\n *\n * #### Undefined Behavior\n * A `start` or `stop` which is non-integral.\n *\n * #### Example\n * ```typescript\n * import { ArrayExt } from '@lumino/algorithm';\n *\n * let data = ['one', 'two', 'three', 'four', 'one'];\n * ArrayExt.lastIndexOf(data, 'red'); // -1\n * ArrayExt.lastIndexOf(data, 'one'); // 4\n * ArrayExt.lastIndexOf(data, 'one', 1); // 0\n * ArrayExt.lastIndexOf(data, 'two', 0); // -1\n * ArrayExt.lastIndexOf(data, 'two', 0, 1); // 1\n * ```\n */\n function lastIndexOf(array, value, start = -1, stop = 0) {\n let n = array.length;\n if (n === 0) {\n return -1;\n }\n if (start < 0) {\n start = Math.max(0, start + n);\n }\n else {\n start = Math.min(start, n - 1);\n }\n if (stop < 0) {\n stop = Math.max(0, stop + n);\n }\n else {\n stop = Math.min(stop, n - 1);\n }\n let span;\n if (start < stop) {\n span = start + 1 + (n - stop);\n }\n else {\n span = start - stop + 1;\n }\n for (let i = 0; i < span; ++i) {\n let j = (start - i + n) % n;\n if (array[j] === value) {\n return j;\n }\n }\n return -1;\n }\n ArrayExt.lastIndexOf = lastIndexOf;\n /**\n * Find the index of the first value which matches a predicate.\n *\n * @param array - The array-like object to search.\n *\n * @param fn - The predicate function to apply to the values.\n *\n * @param start - The index of the first element in the range to be\n * searched, inclusive. The default value is `0`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @param stop - The index of the last element in the range to be\n * searched, inclusive. The default value is `-1`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @returns The index of the first matching value, or `-1` if no\n * matching value is found.\n *\n * #### Notes\n * If `stop < start` the search will wrap at the end of the array.\n *\n * #### Complexity\n * Linear.\n *\n * #### Undefined Behavior\n * A `start` or `stop` which is non-integral.\n *\n * Modifying the length of the array while searching.\n *\n * #### Example\n * ```typescript\n * import { ArrayExt } from '@lumino/algorithm';\n *\n * function isEven(value: number): boolean {\n * return value % 2 === 0;\n * }\n *\n * let data = [1, 2, 3, 4, 3, 2, 1];\n * ArrayExt.findFirstIndex(data, isEven); // 1\n * ArrayExt.findFirstIndex(data, isEven, 4); // 5\n * ArrayExt.findFirstIndex(data, isEven, 6); // -1\n * ArrayExt.findFirstIndex(data, isEven, 6, 5); // 1\n * ```\n */\n function findFirstIndex(array, fn, start = 0, stop = -1) {\n let n = array.length;\n if (n === 0) {\n return -1;\n }\n if (start < 0) {\n start = Math.max(0, start + n);\n }\n else {\n start = Math.min(start, n - 1);\n }\n if (stop < 0) {\n stop = Math.max(0, stop + n);\n }\n else {\n stop = Math.min(stop, n - 1);\n }\n let span;\n if (stop < start) {\n span = stop + 1 + (n - start);\n }\n else {\n span = stop - start + 1;\n }\n for (let i = 0; i < span; ++i) {\n let j = (start + i) % n;\n if (fn(array[j], j)) {\n return j;\n }\n }\n return -1;\n }\n ArrayExt.findFirstIndex = findFirstIndex;\n /**\n * Find the index of the last value which matches a predicate.\n *\n * @param object - The array-like object to search.\n *\n * @param fn - The predicate function to apply to the values.\n *\n * @param start - The index of the first element in the range to be\n * searched, inclusive. The default value is `-1`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @param stop - The index of the last element in the range to be\n * searched, inclusive. The default value is `0`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @returns The index of the last matching value, or `-1` if no\n * matching value is found.\n *\n * #### Notes\n * If `start < stop` the search will wrap at the front of the array.\n *\n * #### Complexity\n * Linear.\n *\n * #### Undefined Behavior\n * A `start` or `stop` which is non-integral.\n *\n * Modifying the length of the array while searching.\n *\n * #### Example\n * ```typescript\n * import { ArrayExt } from '@lumino/algorithm';\n *\n * function isEven(value: number): boolean {\n * return value % 2 === 0;\n * }\n *\n * let data = [1, 2, 3, 4, 3, 2, 1];\n * ArrayExt.findLastIndex(data, isEven); // 5\n * ArrayExt.findLastIndex(data, isEven, 4); // 3\n * ArrayExt.findLastIndex(data, isEven, 0); // -1\n * ArrayExt.findLastIndex(data, isEven, 0, 1); // 5\n * ```\n */\n function findLastIndex(array, fn, start = -1, stop = 0) {\n let n = array.length;\n if (n === 0) {\n return -1;\n }\n if (start < 0) {\n start = Math.max(0, start + n);\n }\n else {\n start = Math.min(start, n - 1);\n }\n if (stop < 0) {\n stop = Math.max(0, stop + n);\n }\n else {\n stop = Math.min(stop, n - 1);\n }\n let d;\n if (start < stop) {\n d = start + 1 + (n - stop);\n }\n else {\n d = start - stop + 1;\n }\n for (let i = 0; i < d; ++i) {\n let j = (start - i + n) % n;\n if (fn(array[j], j)) {\n return j;\n }\n }\n return -1;\n }\n ArrayExt.findLastIndex = findLastIndex;\n /**\n * Find the first value which matches a predicate.\n *\n * @param array - The array-like object to search.\n *\n * @param fn - The predicate function to apply to the values.\n *\n * @param start - The index of the first element in the range to be\n * searched, inclusive. The default value is `0`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @param stop - The index of the last element in the range to be\n * searched, inclusive. The default value is `-1`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @returns The first matching value, or `undefined` if no matching\n * value is found.\n *\n * #### Notes\n * If `stop < start` the search will wrap at the end of the array.\n *\n * #### Complexity\n * Linear.\n *\n * #### Undefined Behavior\n * A `start` or `stop` which is non-integral.\n *\n * Modifying the length of the array while searching.\n *\n * #### Example\n * ```typescript\n * import { ArrayExt } from '@lumino/algorithm';\n *\n * function isEven(value: number): boolean {\n * return value % 2 === 0;\n * }\n *\n * let data = [1, 2, 3, 4, 3, 2, 1];\n * ArrayExt.findFirstValue(data, isEven); // 2\n * ArrayExt.findFirstValue(data, isEven, 2); // 4\n * ArrayExt.findFirstValue(data, isEven, 6); // undefined\n * ArrayExt.findFirstValue(data, isEven, 6, 5); // 2\n * ```\n */\n function findFirstValue(array, fn, start = 0, stop = -1) {\n let index = findFirstIndex(array, fn, start, stop);\n return index !== -1 ? array[index] : undefined;\n }\n ArrayExt.findFirstValue = findFirstValue;\n /**\n * Find the last value which matches a predicate.\n *\n * @param object - The array-like object to search.\n *\n * @param fn - The predicate function to apply to the values.\n *\n * @param start - The index of the first element in the range to be\n * searched, inclusive. The default value is `-1`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @param stop - The index of the last element in the range to be\n * searched, inclusive. The default value is `0`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @returns The last matching value, or `undefined` if no matching\n * value is found.\n *\n * #### Notes\n * If `start < stop` the search will wrap at the front of the array.\n *\n * #### Complexity\n * Linear.\n *\n * #### Undefined Behavior\n * A `start` or `stop` which is non-integral.\n *\n * Modifying the length of the array while searching.\n *\n * #### Example\n * ```typescript\n * import { ArrayExt } from '@lumino/algorithm';\n *\n * function isEven(value: number): boolean {\n * return value % 2 === 0;\n * }\n *\n * let data = [1, 2, 3, 4, 3, 2, 1];\n * ArrayExt.findLastValue(data, isEven); // 2\n * ArrayExt.findLastValue(data, isEven, 4); // 4\n * ArrayExt.findLastValue(data, isEven, 0); // undefined\n * ArrayExt.findLastValue(data, isEven, 0, 1); // 2\n * ```\n */\n function findLastValue(array, fn, start = -1, stop = 0) {\n let index = findLastIndex(array, fn, start, stop);\n return index !== -1 ? array[index] : undefined;\n }\n ArrayExt.findLastValue = findLastValue;\n /**\n * Find the index of the first element which compares `>=` to a value.\n *\n * @param array - The sorted array-like object to search.\n *\n * @param value - The value to locate in the array.\n *\n * @param fn - The 3-way comparison function to apply to the values.\n * It should return `< 0` if an element is less than a value, `0` if\n * an element is equal to a value, or `> 0` if an element is greater\n * than a value.\n *\n * @param start - The index of the first element in the range to be\n * searched, inclusive. The default value is `0`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @param stop - The index of the last element in the range to be\n * searched, inclusive. The default value is `-1`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @returns The index of the first element which compares `>=` to the\n * value, or `length` if there is no such element. If the computed\n * index for `stop` is less than `start`, then the computed index\n * for `start` is returned.\n *\n * #### Notes\n * The array must already be sorted in ascending order according to\n * the comparison function.\n *\n * #### Complexity\n * Logarithmic.\n *\n * #### Undefined Behavior\n * Searching a range which is not sorted in ascending order.\n *\n * A `start` or `stop` which is non-integral.\n *\n * Modifying the length of the array while searching.\n *\n * #### Example\n * ```typescript\n * import { ArrayExt } from '@lumino/algorithm';\n *\n * function numberCmp(a: number, b: number): number {\n * return a - b;\n * }\n *\n * let data = [0, 3, 4, 7, 7, 9];\n * ArrayExt.lowerBound(data, 0, numberCmp); // 0\n * ArrayExt.lowerBound(data, 6, numberCmp); // 3\n * ArrayExt.lowerBound(data, 7, numberCmp); // 3\n * ArrayExt.lowerBound(data, -1, numberCmp); // 0\n * ArrayExt.lowerBound(data, 10, numberCmp); // 6\n * ```\n */\n function lowerBound(array, value, fn, start = 0, stop = -1) {\n let n = array.length;\n if (n === 0) {\n return 0;\n }\n if (start < 0) {\n start = Math.max(0, start + n);\n }\n else {\n start = Math.min(start, n - 1);\n }\n if (stop < 0) {\n stop = Math.max(0, stop + n);\n }\n else {\n stop = Math.min(stop, n - 1);\n }\n let begin = start;\n let span = stop - start + 1;\n while (span > 0) {\n let half = span >> 1;\n let middle = begin + half;\n if (fn(array[middle], value) < 0) {\n begin = middle + 1;\n span -= half + 1;\n }\n else {\n span = half;\n }\n }\n return begin;\n }\n ArrayExt.lowerBound = lowerBound;\n /**\n * Find the index of the first element which compares `>` than a value.\n *\n * @param array - The sorted array-like object to search.\n *\n * @param value - The value to locate in the array.\n *\n * @param fn - The 3-way comparison function to apply to the values.\n * It should return `< 0` if an element is less than a value, `0` if\n * an element is equal to a value, or `> 0` if an element is greater\n * than a value.\n *\n * @param start - The index of the first element in the range to be\n * searched, inclusive. The default value is `0`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @param stop - The index of the last element in the range to be\n * searched, inclusive. The default value is `-1`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @returns The index of the first element which compares `>` than the\n * value, or `length` if there is no such element. If the computed\n * index for `stop` is less than `start`, then the computed index\n * for `start` is returned.\n *\n * #### Notes\n * The array must already be sorted in ascending order according to\n * the comparison function.\n *\n * #### Complexity\n * Logarithmic.\n *\n * #### Undefined Behavior\n * Searching a range which is not sorted in ascending order.\n *\n * A `start` or `stop` which is non-integral.\n *\n * Modifying the length of the array while searching.\n *\n * #### Example\n * ```typescript\n * import { ArrayExt } from '@lumino/algorithm';\n *\n * function numberCmp(a: number, b: number): number {\n * return a - b;\n * }\n *\n * let data = [0, 3, 4, 7, 7, 9];\n * ArrayExt.upperBound(data, 0, numberCmp); // 1\n * ArrayExt.upperBound(data, 6, numberCmp); // 3\n * ArrayExt.upperBound(data, 7, numberCmp); // 5\n * ArrayExt.upperBound(data, -1, numberCmp); // 0\n * ArrayExt.upperBound(data, 10, numberCmp); // 6\n * ```\n */\n function upperBound(array, value, fn, start = 0, stop = -1) {\n let n = array.length;\n if (n === 0) {\n return 0;\n }\n if (start < 0) {\n start = Math.max(0, start + n);\n }\n else {\n start = Math.min(start, n - 1);\n }\n if (stop < 0) {\n stop = Math.max(0, stop + n);\n }\n else {\n stop = Math.min(stop, n - 1);\n }\n let begin = start;\n let span = stop - start + 1;\n while (span > 0) {\n let half = span >> 1;\n let middle = begin + half;\n if (fn(array[middle], value) > 0) {\n span = half;\n }\n else {\n begin = middle + 1;\n span -= half + 1;\n }\n }\n return begin;\n }\n ArrayExt.upperBound = upperBound;\n /**\n * Test whether two arrays are shallowly equal.\n *\n * @param a - The first array-like object to compare.\n *\n * @param b - The second array-like object to compare.\n *\n * @param fn - The comparison function to apply to the elements. It\n * should return `true` if the elements are \"equal\". The default\n * compares elements using strict `===` equality.\n *\n * @returns Whether the two arrays are shallowly equal.\n *\n * #### Complexity\n * Linear.\n *\n * #### Undefined Behavior\n * Modifying the length of the arrays while comparing.\n *\n * #### Example\n * ```typescript\n * import { ArrayExt } from '@lumino/algorithm';\n *\n * let d1 = [0, 3, 4, 7, 7, 9];\n * let d2 = [0, 3, 4, 7, 7, 9];\n * let d3 = [42];\n * ArrayExt.shallowEqual(d1, d2); // true\n * ArrayExt.shallowEqual(d2, d3); // false\n * ```\n */\n function shallowEqual(a, b, fn) {\n // Check for object identity first.\n if (a === b) {\n return true;\n }\n // Bail early if the lengths are different.\n if (a.length !== b.length) {\n return false;\n }\n // Compare each element for equality.\n for (let i = 0, n = a.length; i < n; ++i) {\n if (fn ? !fn(a[i], b[i]) : a[i] !== b[i]) {\n return false;\n }\n }\n // The array are shallowly equal.\n return true;\n }\n ArrayExt.shallowEqual = shallowEqual;\n /**\n * Create a slice of an array subject to an optional step.\n *\n * @param array - The array-like object of interest.\n *\n * @param options - The options for configuring the slice.\n *\n * @returns A new array with the specified values.\n *\n * @throws An exception if the slice `step` is `0`.\n *\n * #### Complexity\n * Linear.\n *\n * #### Undefined Behavior\n * A `start`, `stop`, or `step` which is non-integral.\n *\n * #### Example\n * ```typescript\n * import { ArrayExt } from '@lumino/algorithm';\n *\n * let data = [0, 3, 4, 7, 7, 9];\n * ArrayExt.slice(data); // [0, 3, 4, 7, 7, 9]\n * ArrayExt.slice(data, { start: 2 }); // [4, 7, 7, 9]\n * ArrayExt.slice(data, { start: 0, stop: 4 }); // [0, 3, 4, 7]\n * ArrayExt.slice(data, { step: 2 }); // [0, 4, 7]\n * ArrayExt.slice(data, { step: -1 }); // [9, 7, 7, 4, 3, 0]\n * ```\n */\n function slice(array, options = {}) {\n // Extract the options.\n let { start, stop, step } = options;\n // Set up the `step` value.\n if (step === undefined) {\n step = 1;\n }\n // Validate the step size.\n if (step === 0) {\n throw new Error('Slice `step` cannot be zero.');\n }\n // Look up the length of the array.\n let n = array.length;\n // Set up the `start` value.\n if (start === undefined) {\n start = step < 0 ? n - 1 : 0;\n }\n else if (start < 0) {\n start = Math.max(start + n, step < 0 ? -1 : 0);\n }\n else if (start >= n) {\n start = step < 0 ? n - 1 : n;\n }\n // Set up the `stop` value.\n if (stop === undefined) {\n stop = step < 0 ? -1 : n;\n }\n else if (stop < 0) {\n stop = Math.max(stop + n, step < 0 ? -1 : 0);\n }\n else if (stop >= n) {\n stop = step < 0 ? n - 1 : n;\n }\n // Compute the slice length.\n let length;\n if ((step < 0 && stop >= start) || (step > 0 && start >= stop)) {\n length = 0;\n }\n else if (step < 0) {\n length = Math.floor((stop - start + 1) / step + 1);\n }\n else {\n length = Math.floor((stop - start - 1) / step + 1);\n }\n // Compute the sliced result.\n let result = [];\n for (let i = 0; i < length; ++i) {\n result[i] = array[start + i * step];\n }\n // Return the result.\n return result;\n }\n ArrayExt.slice = slice;\n /**\n * Move an element in an array from one index to another.\n *\n * @param array - The mutable array-like object of interest.\n *\n * @param fromIndex - The index of the element to move. Negative\n * values are taken as an offset from the end of the array.\n *\n * @param toIndex - The target index of the element. Negative\n * values are taken as an offset from the end of the array.\n *\n * #### Complexity\n * Linear.\n *\n * #### Undefined Behavior\n * A `fromIndex` or `toIndex` which is non-integral.\n *\n * #### Example\n * ```typescript\n * import { ArrayExt } from from '@lumino/algorithm';\n *\n * let data = [0, 1, 2, 3, 4];\n * ArrayExt.move(data, 1, 2); // [0, 2, 1, 3, 4]\n * ArrayExt.move(data, 4, 2); // [0, 2, 4, 1, 3]\n * ```\n */\n function move(array, fromIndex, toIndex) {\n let n = array.length;\n if (n <= 1) {\n return;\n }\n if (fromIndex < 0) {\n fromIndex = Math.max(0, fromIndex + n);\n }\n else {\n fromIndex = Math.min(fromIndex, n - 1);\n }\n if (toIndex < 0) {\n toIndex = Math.max(0, toIndex + n);\n }\n else {\n toIndex = Math.min(toIndex, n - 1);\n }\n if (fromIndex === toIndex) {\n return;\n }\n let value = array[fromIndex];\n let d = fromIndex < toIndex ? 1 : -1;\n for (let i = fromIndex; i !== toIndex; i += d) {\n array[i] = array[i + d];\n }\n array[toIndex] = value;\n }\n ArrayExt.move = move;\n /**\n * Reverse an array in-place.\n *\n * @param array - The mutable array-like object of interest.\n *\n * @param start - The index of the first element in the range to be\n * reversed, inclusive. The default value is `0`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @param stop - The index of the last element in the range to be\n * reversed, inclusive. The default value is `-1`. Negative values\n * are taken as an offset from the end of the array.\n *\n * #### Complexity\n * Linear.\n *\n * #### Undefined Behavior\n * A `start` or `stop` index which is non-integral.\n *\n * #### Example\n * ```typescript\n * import { ArrayExt } from '@lumino/algorithm';\n *\n * let data = [0, 1, 2, 3, 4];\n * ArrayExt.reverse(data, 1, 3); // [0, 3, 2, 1, 4]\n * ArrayExt.reverse(data, 3); // [0, 3, 2, 4, 1]\n * ArrayExt.reverse(data); // [1, 4, 2, 3, 0]\n * ```\n */\n function reverse(array, start = 0, stop = -1) {\n let n = array.length;\n if (n <= 1) {\n return;\n }\n if (start < 0) {\n start = Math.max(0, start + n);\n }\n else {\n start = Math.min(start, n - 1);\n }\n if (stop < 0) {\n stop = Math.max(0, stop + n);\n }\n else {\n stop = Math.min(stop, n - 1);\n }\n while (start < stop) {\n let a = array[start];\n let b = array[stop];\n array[start++] = b;\n array[stop--] = a;\n }\n }\n ArrayExt.reverse = reverse;\n /**\n * Rotate the elements of an array in-place.\n *\n * @param array - The mutable array-like object of interest.\n *\n * @param delta - The amount of rotation to apply to the elements. A\n * positive value will rotate the elements to the left. A negative\n * value will rotate the elements to the right.\n *\n * @param start - The index of the first element in the range to be\n * rotated, inclusive. The default value is `0`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @param stop - The index of the last element in the range to be\n * rotated, inclusive. The default value is `-1`. Negative values\n * are taken as an offset from the end of the array.\n *\n * #### Complexity\n * Linear.\n *\n * #### Undefined Behavior\n * A `delta`, `start`, or `stop` which is non-integral.\n *\n * #### Example\n * ```typescript\n * import { ArrayExt } from '@lumino/algorithm';\n *\n * let data = [0, 1, 2, 3, 4];\n * ArrayExt.rotate(data, 2); // [2, 3, 4, 0, 1]\n * ArrayExt.rotate(data, -2); // [0, 1, 2, 3, 4]\n * ArrayExt.rotate(data, 10); // [0, 1, 2, 3, 4]\n * ArrayExt.rotate(data, 9); // [4, 0, 1, 2, 3]\n * ArrayExt.rotate(data, 2, 1, 3); // [4, 2, 0, 1, 3]\n * ```\n */\n function rotate(array, delta, start = 0, stop = -1) {\n let n = array.length;\n if (n <= 1) {\n return;\n }\n if (start < 0) {\n start = Math.max(0, start + n);\n }\n else {\n start = Math.min(start, n - 1);\n }\n if (stop < 0) {\n stop = Math.max(0, stop + n);\n }\n else {\n stop = Math.min(stop, n - 1);\n }\n if (start >= stop) {\n return;\n }\n let length = stop - start + 1;\n if (delta > 0) {\n delta = delta % length;\n }\n else if (delta < 0) {\n delta = ((delta % length) + length) % length;\n }\n if (delta === 0) {\n return;\n }\n let pivot = start + delta;\n reverse(array, start, pivot - 1);\n reverse(array, pivot, stop);\n reverse(array, start, stop);\n }\n ArrayExt.rotate = rotate;\n /**\n * Fill an array with a static value.\n *\n * @param array - The mutable array-like object to fill.\n *\n * @param value - The static value to use to fill the array.\n *\n * @param start - The index of the first element in the range to be\n * filled, inclusive. The default value is `0`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @param stop - The index of the last element in the range to be\n * filled, inclusive. The default value is `-1`. Negative values\n * are taken as an offset from the end of the array.\n *\n * #### Notes\n * If `stop < start` the fill will wrap at the end of the array.\n *\n * #### Complexity\n * Linear.\n *\n * #### Undefined Behavior\n * A `start` or `stop` which is non-integral.\n *\n * #### Example\n * ```typescript\n * import { ArrayExt } from '@lumino/algorithm';\n *\n * let data = ['one', 'two', 'three', 'four'];\n * ArrayExt.fill(data, 'r'); // ['r', 'r', 'r', 'r']\n * ArrayExt.fill(data, 'g', 1); // ['r', 'g', 'g', 'g']\n * ArrayExt.fill(data, 'b', 2, 3); // ['r', 'g', 'b', 'b']\n * ArrayExt.fill(data, 'z', 3, 1); // ['z', 'z', 'b', 'z']\n * ```\n */\n function fill(array, value, start = 0, stop = -1) {\n let n = array.length;\n if (n === 0) {\n return;\n }\n if (start < 0) {\n start = Math.max(0, start + n);\n }\n else {\n start = Math.min(start, n - 1);\n }\n if (stop < 0) {\n stop = Math.max(0, stop + n);\n }\n else {\n stop = Math.min(stop, n - 1);\n }\n let span;\n if (stop < start) {\n span = stop + 1 + (n - start);\n }\n else {\n span = stop - start + 1;\n }\n for (let i = 0; i < span; ++i) {\n array[(start + i) % n] = value;\n }\n }\n ArrayExt.fill = fill;\n /**\n * Insert a value into an array at a specific index.\n *\n * @param array - The array of interest.\n *\n * @param index - The index at which to insert the value. Negative\n * values are taken as an offset from the end of the array.\n *\n * @param value - The value to set at the specified index.\n *\n * #### Complexity\n * Linear.\n *\n * #### Undefined Behavior\n * An `index` which is non-integral.\n *\n * #### Example\n * ```typescript\n * import { ArrayExt } from '@lumino/algorithm';\n *\n * let data = [0, 1, 2];\n * ArrayExt.insert(data, 0, -1); // [-1, 0, 1, 2]\n * ArrayExt.insert(data, 2, 12); // [-1, 0, 12, 1, 2]\n * ArrayExt.insert(data, -1, 7); // [-1, 0, 12, 1, 7, 2]\n * ArrayExt.insert(data, 6, 19); // [-1, 0, 12, 1, 7, 2, 19]\n * ```\n */\n function insert(array, index, value) {\n let n = array.length;\n if (index < 0) {\n index = Math.max(0, index + n);\n }\n else {\n index = Math.min(index, n);\n }\n for (let i = n; i > index; --i) {\n array[i] = array[i - 1];\n }\n array[index] = value;\n }\n ArrayExt.insert = insert;\n /**\n * Remove and return a value at a specific index in an array.\n *\n * @param array - The array of interest.\n *\n * @param index - The index of the value to remove. Negative values\n * are taken as an offset from the end of the array.\n *\n * @returns The value at the specified index, or `undefined` if the\n * index is out of range.\n *\n * #### Complexity\n * Linear.\n *\n * #### Undefined Behavior\n * An `index` which is non-integral.\n *\n * #### Example\n * ```typescript\n * import { ArrayExt } from '@lumino/algorithm';\n *\n * let data = [0, 12, 23, 39, 14, 12, 75];\n * ArrayExt.removeAt(data, 2); // 23\n * ArrayExt.removeAt(data, -2); // 12\n * ArrayExt.removeAt(data, 10); // undefined;\n * ```\n */\n function removeAt(array, index) {\n let n = array.length;\n if (index < 0) {\n index += n;\n }\n if (index < 0 || index >= n) {\n return undefined;\n }\n let value = array[index];\n for (let i = index + 1; i < n; ++i) {\n array[i - 1] = array[i];\n }\n array.length = n - 1;\n return value;\n }\n ArrayExt.removeAt = removeAt;\n /**\n * Remove the first occurrence of a value from an array.\n *\n * @param array - The array of interest.\n *\n * @param value - The value to remove from the array. Values are\n * compared using strict `===` equality.\n *\n * @param start - The index of the first element in the range to be\n * searched, inclusive. The default value is `0`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @param stop - The index of the last element in the range to be\n * searched, inclusive. The default value is `-1`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @returns The index of the removed value, or `-1` if the value\n * is not contained in the array.\n *\n * #### Notes\n * If `stop < start` the search will wrap at the end of the array.\n *\n * #### Complexity\n * Linear.\n *\n * #### Example\n * ```typescript\n * import { ArrayExt } from '@lumino/algorithm';\n *\n * let data = [0, 12, 23, 39, 14, 12, 75];\n * ArrayExt.removeFirstOf(data, 12); // 1\n * ArrayExt.removeFirstOf(data, 17); // -1\n * ArrayExt.removeFirstOf(data, 39, 3); // -1\n * ArrayExt.removeFirstOf(data, 39, 3, 2); // 2\n * ```\n */\n function removeFirstOf(array, value, start = 0, stop = -1) {\n let index = firstIndexOf(array, value, start, stop);\n if (index !== -1) {\n removeAt(array, index);\n }\n return index;\n }\n ArrayExt.removeFirstOf = removeFirstOf;\n /**\n * Remove the last occurrence of a value from an array.\n *\n * @param array - The array of interest.\n *\n * @param value - The value to remove from the array. Values are\n * compared using strict `===` equality.\n *\n * @param start - The index of the first element in the range to be\n * searched, inclusive. The default value is `-1`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @param stop - The index of the last element in the range to be\n * searched, inclusive. The default value is `0`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @returns The index of the removed value, or `-1` if the value\n * is not contained in the array.\n *\n * #### Notes\n * If `start < stop` the search will wrap at the end of the array.\n *\n * #### Complexity\n * Linear.\n *\n * #### Example\n * ```typescript\n * import { ArrayExt } from '@lumino/algorithm';\n *\n * let data = [0, 12, 23, 39, 14, 12, 75];\n * ArrayExt.removeLastOf(data, 12); // 5\n * ArrayExt.removeLastOf(data, 17); // -1\n * ArrayExt.removeLastOf(data, 39, 2); // -1\n * ArrayExt.removeLastOf(data, 39, 2, 3); // 3\n * ```\n */\n function removeLastOf(array, value, start = -1, stop = 0) {\n let index = lastIndexOf(array, value, start, stop);\n if (index !== -1) {\n removeAt(array, index);\n }\n return index;\n }\n ArrayExt.removeLastOf = removeLastOf;\n /**\n * Remove all occurrences of a value from an array.\n *\n * @param array - The array of interest.\n *\n * @param value - The value to remove from the array. Values are\n * compared using strict `===` equality.\n *\n * @param start - The index of the first element in the range to be\n * searched, inclusive. The default value is `0`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @param stop - The index of the last element in the range to be\n * searched, inclusive. The default value is `-1`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @returns The number of elements removed from the array.\n *\n * #### Notes\n * If `stop < start` the search will conceptually wrap at the end of\n * the array, however the array will be traversed front-to-back.\n *\n * #### Complexity\n * Linear.\n *\n * #### Example\n * ```typescript\n * import { ArrayExt } from '@lumino/algorithm';\n *\n * let data = [14, 12, 23, 39, 14, 12, 19, 14];\n * ArrayExt.removeAllOf(data, 12); // 2\n * ArrayExt.removeAllOf(data, 17); // 0\n * ArrayExt.removeAllOf(data, 14, 1, 4); // 1\n * ```\n */\n function removeAllOf(array, value, start = 0, stop = -1) {\n let n = array.length;\n if (n === 0) {\n return 0;\n }\n if (start < 0) {\n start = Math.max(0, start + n);\n }\n else {\n start = Math.min(start, n - 1);\n }\n if (stop < 0) {\n stop = Math.max(0, stop + n);\n }\n else {\n stop = Math.min(stop, n - 1);\n }\n let count = 0;\n for (let i = 0; i < n; ++i) {\n if (start <= stop && i >= start && i <= stop && array[i] === value) {\n count++;\n }\n else if (stop < start &&\n (i <= stop || i >= start) &&\n array[i] === value) {\n count++;\n }\n else if (count > 0) {\n array[i - count] = array[i];\n }\n }\n if (count > 0) {\n array.length = n - count;\n }\n return count;\n }\n ArrayExt.removeAllOf = removeAllOf;\n /**\n * Remove the first occurrence of a value which matches a predicate.\n *\n * @param array - The array of interest.\n *\n * @param fn - The predicate function to apply to the values.\n *\n * @param start - The index of the first element in the range to be\n * searched, inclusive. The default value is `0`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @param stop - The index of the last element in the range to be\n * searched, inclusive. The default value is `-1`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @returns The removed `{ index, value }`, which will be `-1` and\n * `undefined` if the value is not contained in the array.\n *\n * #### Notes\n * If `stop < start` the search will wrap at the end of the array.\n *\n * #### Complexity\n * Linear.\n *\n * #### Example\n * ```typescript\n * import { ArrayExt } from '@lumino/algorithm';\n *\n * function isEven(value: number): boolean {\n * return value % 2 === 0;\n * }\n *\n * let data = [0, 12, 23, 39, 14, 12, 75];\n * ArrayExt.removeFirstWhere(data, isEven); // { index: 0, value: 0 }\n * ArrayExt.removeFirstWhere(data, isEven, 2); // { index: 3, value: 14 }\n * ArrayExt.removeFirstWhere(data, isEven, 4); // { index: -1, value: undefined }\n * ```\n */\n function removeFirstWhere(array, fn, start = 0, stop = -1) {\n let value;\n let index = findFirstIndex(array, fn, start, stop);\n if (index !== -1) {\n value = removeAt(array, index);\n }\n return { index, value };\n }\n ArrayExt.removeFirstWhere = removeFirstWhere;\n /**\n * Remove the last occurrence of a value which matches a predicate.\n *\n * @param array - The array of interest.\n *\n * @param fn - The predicate function to apply to the values.\n *\n * @param start - The index of the first element in the range to be\n * searched, inclusive. The default value is `-1`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @param stop - The index of the last element in the range to be\n * searched, inclusive. The default value is `0`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @returns The removed `{ index, value }`, which will be `-1` and\n * `undefined` if the value is not contained in the array.\n *\n * #### Notes\n * If `start < stop` the search will wrap at the end of the array.\n *\n * #### Complexity\n * Linear.\n *\n * #### Example\n * ```typescript\n * import { ArrayExt } from '@lumino/algorithm';\n *\n * function isEven(value: number): boolean {\n * return value % 2 === 0;\n * }\n *\n * let data = [0, 12, 23, 39, 14, 12, 75];\n * ArrayExt.removeLastWhere(data, isEven); // { index: 5, value: 12 }\n * ArrayExt.removeLastWhere(data, isEven, 2); // { index: 1, value: 12 }\n * ArrayExt.removeLastWhere(data, isEven, 2, 1); // { index: -1, value: undefined }\n * ```\n */\n function removeLastWhere(array, fn, start = -1, stop = 0) {\n let value;\n let index = findLastIndex(array, fn, start, stop);\n if (index !== -1) {\n value = removeAt(array, index);\n }\n return { index, value };\n }\n ArrayExt.removeLastWhere = removeLastWhere;\n /**\n * Remove all occurrences of values which match a predicate.\n *\n * @param array - The array of interest.\n *\n * @param fn - The predicate function to apply to the values.\n *\n * @param start - The index of the first element in the range to be\n * searched, inclusive. The default value is `0`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @param stop - The index of the last element in the range to be\n * searched, inclusive. The default value is `-1`. Negative values\n * are taken as an offset from the end of the array.\n *\n * @returns The number of elements removed from the array.\n *\n * #### Notes\n * If `stop < start` the search will conceptually wrap at the end of\n * the array, however the array will be traversed front-to-back.\n *\n * #### Complexity\n * Linear.\n *\n * #### Example\n * ```typescript\n * import { ArrayExt } from '@lumino/algorithm';\n *\n * function isEven(value: number): boolean {\n * return value % 2 === 0;\n * }\n *\n * function isNegative(value: number): boolean {\n * return value < 0;\n * }\n *\n * let data = [0, 12, -13, -9, 23, 39, 14, -15, 12, 75];\n * ArrayExt.removeAllWhere(data, isEven); // 4\n * ArrayExt.removeAllWhere(data, isNegative, 0, 3); // 2\n * ```\n */\n function removeAllWhere(array, fn, start = 0, stop = -1) {\n let n = array.length;\n if (n === 0) {\n return 0;\n }\n if (start < 0) {\n start = Math.max(0, start + n);\n }\n else {\n start = Math.min(start, n - 1);\n }\n if (stop < 0) {\n stop = Math.max(0, stop + n);\n }\n else {\n stop = Math.min(stop, n - 1);\n }\n let count = 0;\n for (let i = 0; i < n; ++i) {\n if (start <= stop && i >= start && i <= stop && fn(array[i], i)) {\n count++;\n }\n else if (stop < start && (i <= stop || i >= start) && fn(array[i], i)) {\n count++;\n }\n else if (count > 0) {\n array[i - count] = array[i];\n }\n }\n if (count > 0) {\n array.length = n - count;\n }\n return count;\n }\n ArrayExt.removeAllWhere = removeAllWhere;\n})(ArrayExt || (ArrayExt = {}));\n\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/*-----------------------------------------------------------------------------\n| Copyright (c) 2014-2017, PhosphorJS Contributors\n|\n| Distributed under the terms of the BSD 3-Clause License.\n|\n| The full license is in the file LICENSE, distributed with this software.\n|----------------------------------------------------------------------------*/\n/**\n * Chain together several iterables.\n *\n * @deprecated\n *\n * @param objects - The iterable objects of interest.\n *\n * @returns An iterator which yields the values of the iterables\n * in the order in which they are supplied.\n *\n * #### Example\n * ```typescript\n * import { chain } from '@lumino/algorithm';\n *\n * let data1 = [1, 2, 3];\n * let data2 = [4, 5, 6];\n *\n * let stream = chain(data1, data2);\n *\n * Array.from(stream); // [1, 2, 3, 4, 5, 6]\n * ```\n */\nfunction* chain(...objects) {\n for (const object of objects) {\n yield* object;\n }\n}\n\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/*-----------------------------------------------------------------------------\n| Copyright (c) 2014-2017, PhosphorJS Contributors\n|\n| Distributed under the terms of the BSD 3-Clause License.\n|\n| The full license is in the file LICENSE, distributed with this software.\n|----------------------------------------------------------------------------*/\n/**\n * Create an empty iterator.\n *\n * @returns A new iterator which yields nothing.\n *\n * #### Example\n * ```typescript\n * import { empty } from '@lumino/algorithm';\n *\n * let stream = empty();\n *\n * Array.from(stream); // []\n * ```\n */\n// eslint-disable-next-line require-yield\nfunction* empty() {\n return;\n}\n\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/*-----------------------------------------------------------------------------\n| Copyright (c) 2014-2017, PhosphorJS Contributors\n|\n| Distributed under the terms of the BSD 3-Clause License.\n|\n| The full license is in the file LICENSE, distributed with this software.\n|----------------------------------------------------------------------------*/\n/**\n * Enumerate an iterable object.\n *\n * @param object - The iterable object of interest.\n *\n * @param start - The starting enum value. The default is `0`.\n *\n * @returns An iterator which yields the enumerated values.\n *\n * #### Example\n * ```typescript\n * import { enumerate } from '@lumino/algorithm';\n *\n * let data = ['foo', 'bar', 'baz'];\n *\n * let stream = enumerate(data, 1);\n *\n * Array.from(stream); // [[1, 'foo'], [2, 'bar'], [3, 'baz']]\n * ```\n */\nfunction* enumerate(object, start = 0) {\n for (const value of object) {\n yield [start++, value];\n }\n}\n\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/*-----------------------------------------------------------------------------\n| Copyright (c) 2014-2017, PhosphorJS Contributors\n|\n| Distributed under the terms of the BSD 3-Clause License.\n|\n| The full license is in the file LICENSE, distributed with this software.\n|----------------------------------------------------------------------------*/\n/**\n * Filter an iterable for values which pass a test.\n *\n * @param object - The iterable object of interest.\n *\n * @param fn - The predicate function to invoke for each value.\n *\n * @returns An iterator which yields the values which pass the test.\n *\n * #### Example\n * ```typescript\n * import { filter } from '@lumino/algorithm';\n *\n * let data = [1, 2, 3, 4, 5, 6];\n *\n * let stream = filter(data, value => value % 2 === 0);\n *\n * Array.from(stream); // [2, 4, 6]\n * ```\n */\nfunction* filter(object, fn) {\n let index = 0;\n for (const value of object) {\n if (fn(value, index++)) {\n yield value;\n }\n }\n}\n\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/*-----------------------------------------------------------------------------\n| Copyright (c) 2014-2017, PhosphorJS Contributors\n|\n| Distributed under the terms of the BSD 3-Clause License.\n|\n| The full license is in the file LICENSE, distributed with this software.\n|----------------------------------------------------------------------------*/\n/**\n * Find the first value in an iterable which matches a predicate.\n *\n * @param object - The iterable object to search.\n *\n * @param fn - The predicate function to apply to the values.\n *\n * @returns The first matching value, or `undefined` if no matching\n * value is found.\n *\n * #### Complexity\n * Linear.\n *\n * #### Example\n * ```typescript\n * import { find } from '@lumino/algorithm';\n *\n * interface IAnimal { species: string, name: string };\n *\n * function isCat(value: IAnimal): boolean {\n * return value.species === 'cat';\n * }\n *\n * let data: IAnimal[] = [\n * { species: 'dog', name: 'spot' },\n * { species: 'cat', name: 'fluffy' },\n * { species: 'alligator', name: 'pocho' }\n * ];\n *\n * find(data, isCat).name; // 'fluffy'\n * ```\n */\nfunction find(object, fn) {\n let index = 0;\n for (const value of object) {\n if (fn(value, index++)) {\n return value;\n }\n }\n return undefined;\n}\n/**\n * Find the index of the first value which matches a predicate.\n *\n * @param object - The iterable object to search.\n *\n * @param fn - The predicate function to apply to the values.\n *\n * @returns The index of the first matching value, or `-1` if no\n * matching value is found.\n *\n * #### Complexity\n * Linear.\n *\n * #### Example\n * ```typescript\n * import { findIndex } from '@lumino/algorithm';\n *\n * interface IAnimal { species: string, name: string };\n *\n * function isCat(value: IAnimal): boolean {\n * return value.species === 'cat';\n * }\n *\n * let data: IAnimal[] = [\n * { species: 'dog', name: 'spot' },\n * { species: 'cat', name: 'fluffy' },\n * { species: 'alligator', name: 'pocho' }\n * ];\n *\n * findIndex(data, isCat); // 1\n * ```\n */\nfunction findIndex(object, fn) {\n let index = 0;\n for (const value of object) {\n if (fn(value, index++)) {\n return index - 1;\n }\n }\n return -1;\n}\n/**\n * Find the minimum value in an iterable.\n *\n * @param object - The iterable object to search.\n *\n * @param fn - The 3-way comparison function to apply to the values.\n * It should return `< 0` if the first value is less than the second.\n * `0` if the values are equivalent, or `> 0` if the first value is\n * greater than the second.\n *\n * @returns The minimum value in the iterable. If multiple values are\n * equivalent to the minimum, the left-most value is returned. If\n * the iterable is empty, this returns `undefined`.\n *\n * #### Complexity\n * Linear.\n *\n * #### Example\n * ```typescript\n * import { min } from '@lumino/algorithm';\n *\n * function numberCmp(a: number, b: number): number {\n * return a - b;\n * }\n *\n * min([7, 4, 0, 3, 9, 4], numberCmp); // 0\n * ```\n */\nfunction min(object, fn) {\n let result = undefined;\n for (const value of object) {\n if (result === undefined) {\n result = value;\n continue;\n }\n if (fn(value, result) < 0) {\n result = value;\n }\n }\n return result;\n}\n/**\n * Find the maximum value in an iterable.\n *\n * @param object - The iterable object to search.\n *\n * @param fn - The 3-way comparison function to apply to the values.\n * It should return `< 0` if the first value is less than the second.\n * `0` if the values are equivalent, or `> 0` if the first value is\n * greater than the second.\n *\n * @returns The maximum value in the iterable. If multiple values are\n * equivalent to the maximum, the left-most value is returned. If\n * the iterable is empty, this returns `undefined`.\n *\n * #### Complexity\n * Linear.\n *\n * #### Example\n * ```typescript\n * import { max } from '@lumino/algorithm';\n *\n * function numberCmp(a: number, b: number): number {\n * return a - b;\n * }\n *\n * max([7, 4, 0, 3, 9, 4], numberCmp); // 9\n * ```\n */\nfunction max(object, fn) {\n let result = undefined;\n for (const value of object) {\n if (result === undefined) {\n result = value;\n continue;\n }\n if (fn(value, result) > 0) {\n result = value;\n }\n }\n return result;\n}\n/**\n * Find the minimum and maximum values in an iterable.\n *\n * @param object - The iterable object to search.\n *\n * @param fn - The 3-way comparison function to apply to the values.\n * It should return `< 0` if the first value is less than the second.\n * `0` if the values are equivalent, or `> 0` if the first value is\n * greater than the second.\n *\n * @returns A 2-tuple of the `[min, max]` values in the iterable. If\n * multiple values are equivalent, the left-most values are returned.\n * If the iterable is empty, this returns `undefined`.\n *\n * #### Complexity\n * Linear.\n *\n * #### Example\n * ```typescript\n * import { minmax } from '@lumino/algorithm';\n *\n * function numberCmp(a: number, b: number): number {\n * return a - b;\n * }\n *\n * minmax([7, 4, 0, 3, 9, 4], numberCmp); // [0, 9]\n * ```\n */\nfunction minmax(object, fn) {\n let empty = true;\n let vmin;\n let vmax;\n for (const value of object) {\n if (empty) {\n vmin = value;\n vmax = value;\n empty = false;\n }\n else if (fn(value, vmin) < 0) {\n vmin = value;\n }\n else if (fn(value, vmax) > 0) {\n vmax = value;\n }\n }\n return empty ? undefined : [vmin, vmax];\n}\n\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/*-----------------------------------------------------------------------------\n| Copyright (c) 2014-2017, PhosphorJS Contributors\n|\n| Distributed under the terms of the BSD 3-Clause License.\n|\n| The full license is in the file LICENSE, distributed with this software.\n|----------------------------------------------------------------------------*/\n/**\n * Create an array from an iterable of values.\n *\n * @deprecated\n *\n * @param object - The iterable object of interest.\n *\n * @returns A new array of values from the given object.\n *\n * #### Example\n * ```typescript\n * import { toArray } from '@lumino/algorithm';\n *\n * let stream = [1, 2, 3, 4, 5, 6][Symbol.iterator]();\n *\n * toArray(stream); // [1, 2, 3, 4, 5, 6];\n * ```\n */\nfunction toArray(object) {\n return Array.from(object);\n}\n/**\n * Create an object from an iterable of key/value pairs.\n *\n * @param object - The iterable object of interest.\n *\n * @returns A new object mapping keys to values.\n *\n * #### Example\n * ```typescript\n * import { toObject } from '@lumino/algorithm';\n *\n * let data: [string, number][] = [['one', 1], ['two', 2], ['three', 3]];\n *\n * toObject(data); // { one: 1, two: 2, three: 3 }\n * ```\n */\nfunction toObject(object) {\n const result = {};\n for (const [key, value] of object) {\n result[key] = value;\n }\n return result;\n}\n/**\n * Invoke a function for each value in an iterable.\n *\n * @deprecated\n *\n * @param object - The iterable object of interest.\n *\n * @param fn - The callback function to invoke for each value.\n *\n * #### Notes\n * Iteration can be terminated early by returning `false` from the\n * callback function.\n *\n * #### Complexity\n * Linear.\n *\n * #### Example\n * ```typescript\n * import { each } from '@lumino/algorithm';\n *\n * let data = [5, 7, 0, -2, 9];\n *\n * each(data, value => { console.log(value); });\n * ```\n */\nfunction each(object, fn) {\n let index = 0;\n for (const value of object) {\n if (false === fn(value, index++)) {\n return;\n }\n }\n}\n/**\n * Test whether all values in an iterable satisfy a predicate.\n *\n * @param object - The iterable object of interest.\n *\n * @param fn - The predicate function to invoke for each value.\n *\n * @returns `true` if all values pass the test, `false` otherwise.\n *\n * #### Notes\n * Iteration terminates on the first `false` predicate result.\n *\n * #### Complexity\n * Linear.\n *\n * #### Example\n * ```typescript\n * import { every } from '@lumino/algorithm';\n *\n * let data = [5, 7, 1];\n *\n * every(data, value => value % 2 === 0); // false\n * every(data, value => value % 2 === 1); // true\n * ```\n */\nfunction every(object, fn) {\n let index = 0;\n for (const value of object) {\n if (false === fn(value, index++)) {\n return false;\n }\n }\n return true;\n}\n/**\n * Test whether any value in an iterable satisfies a predicate.\n *\n * @param object - The iterable object of interest.\n *\n * @param fn - The predicate function to invoke for each value.\n *\n * @returns `true` if any value passes the test, `false` otherwise.\n *\n * #### Notes\n * Iteration terminates on the first `true` predicate result.\n *\n * #### Complexity\n * Linear.\n *\n * #### Example\n * ```typescript\n * import { some } from '@lumino/algorithm';\n *\n * let data = [5, 7, 1];\n *\n * some(data, value => value === 7); // true\n * some(data, value => value === 3); // false\n * ```\n */\nfunction some(object, fn) {\n let index = 0;\n for (const value of object) {\n if (fn(value, index++)) {\n return true;\n }\n }\n return false;\n}\n\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/*-----------------------------------------------------------------------------\n| Copyright (c) 2014-2017, PhosphorJS Contributors\n|\n| Distributed under the terms of the BSD 3-Clause License.\n|\n| The full license is in the file LICENSE, distributed with this software.\n|----------------------------------------------------------------------------*/\n/**\n * Transform the values of an iterable with a mapping function.\n *\n * @param object - The iterable object of interest.\n *\n * @param fn - The mapping function to invoke for each value.\n *\n * @returns An iterator which yields the transformed values.\n *\n * #### Example\n * ```typescript\n * import { map } from '@lumino/algorithm';\n *\n * let data = [1, 2, 3];\n *\n * let stream = map(data, value => value * 2);\n *\n * Array.from(stream); // [2, 4, 6]\n * ```\n */\nfunction* map(object, fn) {\n let index = 0;\n for (const value of object) {\n yield fn(value, index++);\n }\n}\n\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/*-----------------------------------------------------------------------------\n| Copyright (c) 2014-2017, PhosphorJS Contributors\n|\n| Distributed under the terms of the BSD 3-Clause License.\n|\n| The full license is in the file LICENSE, distributed with this software.\n|----------------------------------------------------------------------------*/\n/**\n * Create an iterator of evenly spaced values.\n *\n * @param start - The starting value for the range, inclusive.\n *\n * @param stop - The stopping value for the range, exclusive.\n *\n * @param step - The distance between each value.\n *\n * @returns An iterator which produces evenly spaced values.\n *\n * #### Notes\n * In the single argument form of `range(stop)`, `start` defaults to\n * `0` and `step` defaults to `1`.\n *\n * In the two argument form of `range(start, stop)`, `step` defaults\n * to `1`.\n *\n * #### Example\n * ```typescript\n * import { range } from '@lumino/algorithm';\n *\n * let stream = range(2, 4);\n *\n * Array.from(stream); // [2, 3]\n * ```\n */\nfunction* range(start, stop, step) {\n if (stop === undefined) {\n stop = start;\n start = 0;\n step = 1;\n }\n else if (step === undefined) {\n step = 1;\n }\n const length = Private.rangeLength(start, stop, step);\n for (let index = 0; index < length; index++) {\n yield start + step * index;\n }\n}\n/**\n * The namespace for the module implementation details.\n */\nvar Private;\n(function (Private) {\n /**\n * Compute the effective length of a range.\n *\n * @param start - The starting value for the range, inclusive.\n *\n * @param stop - The stopping value for the range, exclusive.\n *\n * @param step - The distance between each value.\n *\n * @returns The number of steps need to traverse the range.\n */\n function rangeLength(start, stop, step) {\n if (step === 0) {\n return Infinity;\n }\n if (start > stop && step > 0) {\n return 0;\n }\n if (start < stop && step < 0) {\n return 0;\n }\n return Math.ceil((stop - start) / step);\n }\n Private.rangeLength = rangeLength;\n})(Private || (Private = {}));\n\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/*-----------------------------------------------------------------------------\n| Copyright (c) 2014-2017, PhosphorJS Contributors\n|\n| Distributed under the terms of the BSD 3-Clause License.\n|\n| The full license is in the file LICENSE, distributed with this software.\n|----------------------------------------------------------------------------*/\nfunction reduce(object, fn, initial) {\n // Setup the iterator and fetch the first value.\n const it = object[Symbol.iterator]();\n let index = 0;\n let first = it.next();\n // An empty iterator and no initial value is an error.\n if (first.done && initial === undefined) {\n throw new TypeError('Reduce of empty iterable with no initial value.');\n }\n // If the iterator is empty, return the initial value.\n if (first.done) {\n return initial;\n }\n // If the iterator has a single item and no initial value, the\n // reducer is not invoked and the first item is the return value.\n let second = it.next();\n if (second.done && initial === undefined) {\n return first.value;\n }\n // If iterator has a single item and an initial value is provided,\n // the reducer is invoked and that result is the return value.\n if (second.done) {\n return fn(initial, first.value, index++);\n }\n // Setup the initial accumlated value.\n let accumulator;\n if (initial === undefined) {\n accumulator = fn(first.value, second.value, index++);\n }\n else {\n accumulator = fn(fn(initial, first.value, index++), second.value, index++);\n }\n // Iterate the rest of the values, updating the accumulator.\n let next;\n while (!(next = it.next()).done) {\n accumulator = fn(accumulator, next.value, index++);\n }\n // Return the final accumulated value.\n return accumulator;\n}\n\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/*-----------------------------------------------------------------------------\n| Copyright (c) 2014-2017, PhosphorJS Contributors\n|\n| Distributed under the terms of the BSD 3-Clause License.\n|\n| The full license is in the file LICENSE, distributed with this software.\n|----------------------------------------------------------------------------*/\n/**\n * Create an iterator which repeats a value a number of times.\n *\n * @deprecated\n *\n * @param value - The value to repeat.\n *\n * @param count - The number of times to repeat the value.\n *\n * @returns A new iterator which repeats the specified value.\n *\n * #### Example\n * ```typescript\n * import { repeat } from '@lumino/algorithm';\n *\n * let stream = repeat(7, 3);\n *\n * Array.from(stream); // [7, 7, 7]\n * ```\n */\nfunction* repeat(value, count) {\n while (0 < count--) {\n yield value;\n }\n}\n/**\n * Create an iterator which yields a value a single time.\n *\n * @deprecated\n *\n * @param value - The value to wrap in an iterator.\n *\n * @returns A new iterator which yields the value a single time.\n *\n * #### Example\n * ```typescript\n * import { once } from '@lumino/algorithm';\n *\n * let stream = once(7);\n *\n * Array.from(stream); // [7]\n * ```\n */\nfunction* once(value) {\n yield value;\n}\n\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/*-----------------------------------------------------------------------------\n| Copyright (c) 2014-2017, PhosphorJS Contributors\n|\n| Distributed under the terms of the BSD 3-Clause License.\n|\n| The full license is in the file LICENSE, distributed with this software.\n|----------------------------------------------------------------------------*/\n/**\n * Create an iterator for a retroable object.\n *\n * @param object - The retroable or array-like object of interest.\n *\n * @returns An iterator which traverses the object's values in reverse.\n *\n * #### Example\n * ```typescript\n * import { retro } from '@lumino/algorithm';\n *\n * let data = [1, 2, 3, 4, 5, 6];\n *\n * let stream = retro(data);\n *\n * Array.from(stream); // [6, 5, 4, 3, 2, 1]\n * ```\n */\nfunction* retro(object) {\n if (typeof object.retro === 'function') {\n yield* object.retro();\n }\n else {\n for (let index = object.length - 1; index > -1; index--) {\n yield object[index];\n }\n }\n}\n\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/*-----------------------------------------------------------------------------\n| Copyright (c) 2014-2017, PhosphorJS Contributors\n|\n| Distributed under the terms of the BSD 3-Clause License.\n|\n| The full license is in the file LICENSE, distributed with this software.\n|----------------------------------------------------------------------------*/\n/**\n * Topologically sort an iterable of edges.\n *\n * @param edges - The iterable object of edges to sort.\n * An edge is represented as a 2-tuple of `[fromNode, toNode]`.\n *\n * @returns The topologically sorted array of nodes.\n *\n * #### Notes\n * If a cycle is present in the graph, the cycle will be ignored and\n * the return value will be only approximately sorted.\n *\n * #### Example\n * ```typescript\n * import { topologicSort } from '@lumino/algorithm';\n *\n * let data = [\n * ['d', 'e'],\n * ['c', 'd'],\n * ['a', 'b'],\n * ['b', 'c']\n * ];\n *\n * topologicSort(data); // ['a', 'b', 'c', 'd', 'e']\n * ```\n */\nfunction topologicSort(edges) {\n // Setup the shared sorting state.\n let sorted = [];\n let visited = new Set();\n let graph = new Map();\n // Add the edges to the graph.\n for (const edge of edges) {\n addEdge(edge);\n }\n // Visit each node in the graph.\n for (const [k] of graph) {\n visit(k);\n }\n // Return the sorted results.\n return sorted;\n // Add an edge to the graph.\n function addEdge(edge) {\n let [fromNode, toNode] = edge;\n let children = graph.get(toNode);\n if (children) {\n children.push(fromNode);\n }\n else {\n graph.set(toNode, [fromNode]);\n }\n }\n // Recursively visit the node.\n function visit(node) {\n if (visited.has(node)) {\n return;\n }\n visited.add(node);\n let children = graph.get(node);\n if (children) {\n for (const child of children) {\n visit(child);\n }\n }\n sorted.push(node);\n }\n}\n\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/*-----------------------------------------------------------------------------\n| Copyright (c) 2014-2017, PhosphorJS Contributors\n|\n| Distributed under the terms of the BSD 3-Clause License.\n|\n| The full license is in the file LICENSE, distributed with this software.\n|----------------------------------------------------------------------------*/\n/**\n * Iterate over an iterable using a stepped increment.\n *\n * @param object - The iterable object of interest.\n *\n * @param step - The distance to step on each iteration. A value\n * of less than `1` will behave the same as a value of `1`.\n *\n * @returns An iterator which traverses the iterable step-wise.\n *\n * #### Example\n * ```typescript\n * import { stride } from '@lumino/algorithm';\n *\n * let data = [1, 2, 3, 4, 5, 6];\n *\n * let stream = stride(data, 2);\n *\n * Array.from(stream); // [1, 3, 5];\n * ```\n */\nfunction* stride(object, step) {\n let count = 0;\n for (const value of object) {\n if (0 === count++ % step) {\n yield value;\n }\n }\n}\n\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/*-----------------------------------------------------------------------------\n| Copyright (c) 2014-2017, PhosphorJS Contributors\n|\n| Distributed under the terms of the BSD 3-Clause License.\n|\n| The full license is in the file LICENSE, distributed with this software.\n|----------------------------------------------------------------------------*/\n/**\n * The namespace for string-specific algorithms.\n */\nvar StringExt;\n(function (StringExt) {\n /**\n * Find the indices of characters in a source text.\n *\n * @param source - The source text which should be searched.\n *\n * @param query - The characters to locate in the source text.\n *\n * @param start - The index to start the search.\n *\n * @returns The matched indices, or `null` if there is no match.\n *\n * #### Complexity\n * Linear on `sourceText`.\n *\n * #### Notes\n * In order for there to be a match, all of the characters in `query`\n * **must** appear in `source` in the order given by `query`.\n *\n * Characters are matched using strict `===` equality.\n */\n function findIndices(source, query, start = 0) {\n let indices = new Array(query.length);\n for (let i = 0, j = start, n = query.length; i < n; ++i, ++j) {\n j = source.indexOf(query[i], j);\n if (j === -1) {\n return null;\n }\n indices[i] = j;\n }\n return indices;\n }\n StringExt.findIndices = findIndices;\n /**\n * A string matcher which uses a sum-of-squares algorithm.\n *\n * @param source - The source text which should be searched.\n *\n * @param query - The characters to locate in the source text.\n *\n * @param start - The index to start the search.\n *\n * @returns The match result, or `null` if there is no match.\n * A lower `score` represents a stronger match.\n *\n * #### Complexity\n * Linear on `sourceText`.\n *\n * #### Notes\n * This scoring algorithm uses a sum-of-squares approach to determine\n * the score. In order for there to be a match, all of the characters\n * in `query` **must** appear in `source` in order. The index of each\n * matching character is squared and added to the score. This means\n * that early and consecutive character matches are preferred, while\n * late matches are heavily penalized.\n */\n function matchSumOfSquares(source, query, start = 0) {\n let indices = findIndices(source, query, start);\n if (!indices) {\n return null;\n }\n let score = 0;\n for (let i = 0, n = indices.length; i < n; ++i) {\n let j = indices[i] - start;\n score += j * j;\n }\n return { score, indices };\n }\n StringExt.matchSumOfSquares = matchSumOfSquares;\n /**\n * A string matcher which uses a sum-of-deltas algorithm.\n *\n * @param source - The source text which should be searched.\n *\n * @param query - The characters to locate in the source text.\n *\n * @param start - The index to start the search.\n *\n * @returns The match result, or `null` if there is no match.\n * A lower `score` represents a stronger match.\n *\n * #### Complexity\n * Linear on `sourceText`.\n *\n * #### Notes\n * This scoring algorithm uses a sum-of-deltas approach to determine\n * the score. In order for there to be a match, all of the characters\n * in `query` **must** appear in `source` in order. The delta between\n * the indices are summed to create the score. This means that groups\n * of matched characters are preferred, while fragmented matches are\n * penalized.\n */\n function matchSumOfDeltas(source, query, start = 0) {\n let indices = findIndices(source, query, start);\n if (!indices) {\n return null;\n }\n let score = 0;\n let last = start - 1;\n for (let i = 0, n = indices.length; i < n; ++i) {\n let j = indices[i];\n score += j - last - 1;\n last = j;\n }\n return { score, indices };\n }\n StringExt.matchSumOfDeltas = matchSumOfDeltas;\n /**\n * Highlight the matched characters of a source text.\n *\n * @param source - The text which should be highlighted.\n *\n * @param indices - The indices of the matched characters. They must\n * appear in increasing order and must be in bounds of the source.\n *\n * @param fn - The function to apply to the matched chunks.\n *\n * @returns An array of unmatched and highlighted chunks.\n */\n function highlight(source, indices, fn) {\n // Set up the result array.\n let result = [];\n // Set up the counter variables.\n let k = 0;\n let last = 0;\n let n = indices.length;\n // Iterator over each index.\n while (k < n) {\n // Set up the chunk indices.\n let i = indices[k];\n let j = indices[k];\n // Advance the right chunk index until it's non-contiguous.\n while (++k < n && indices[k] === j + 1) {\n j++;\n }\n // Extract the unmatched text.\n if (last < i) {\n result.push(source.slice(last, i));\n }\n // Extract and highlight the matched text.\n if (i < j + 1) {\n result.push(fn(source.slice(i, j + 1)));\n }\n // Update the last visited index.\n last = j + 1;\n }\n // Extract any remaining unmatched text.\n if (last < source.length) {\n result.push(source.slice(last));\n }\n // Return the highlighted result.\n return result;\n }\n StringExt.highlight = highlight;\n /**\n * A 3-way string comparison function.\n *\n * @param a - The first string of interest.\n *\n * @param b - The second string of interest.\n *\n * @returns `-1` if `a < b`, else `1` if `a > b`, else `0`.\n */\n function cmp(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n }\n StringExt.cmp = cmp;\n})(StringExt || (StringExt = {}));\n\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/*-----------------------------------------------------------------------------\n| Copyright (c) 2014-2017, PhosphorJS Contributors\n|\n| Distributed under the terms of the BSD 3-Clause License.\n|\n| The full license is in the file LICENSE, distributed with this software.\n|----------------------------------------------------------------------------*/\n/**\n * Take a fixed number of items from an iterable.\n *\n * @param object - The iterable object of interest.\n *\n * @param count - The number of items to take from the iterable.\n *\n * @returns An iterator which yields the specified number of items\n * from the source iterable.\n *\n * #### Notes\n * The returned iterator will exhaust early if the source iterable\n * contains an insufficient number of items.\n *\n * #### Example\n * ```typescript\n * import { take } from '@lumino/algorithm';\n *\n * let stream = take([5, 4, 3, 2, 1, 0, -1], 3);\n *\n * Array.from(stream); // [5, 4, 3]\n * ```\n */\nfunction* take(object, count) {\n if (count < 1) {\n return;\n }\n const it = object[Symbol.iterator]();\n let item;\n while (0 < count-- && !(item = it.next()).done) {\n yield item.value;\n }\n}\n\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/*-----------------------------------------------------------------------------\n| Copyright (c) 2014-2017, PhosphorJS Contributors\n|\n| Distributed under the terms of the BSD 3-Clause License.\n|\n| The full license is in the file LICENSE, distributed with this software.\n|----------------------------------------------------------------------------*/\n/**\n * Iterate several iterables in lockstep.\n *\n * @param objects - The iterable objects of interest.\n *\n * @returns An iterator which yields successive tuples of values where\n * each value is taken in turn from the provided iterables. It will\n * be as long as the shortest provided iterable.\n *\n * #### Example\n * ```typescript\n * import { zip } from '@lumino/algorithm';\n *\n * let data1 = [1, 2, 3];\n * let data2 = [4, 5, 6];\n *\n * let stream = zip(data1, data2);\n *\n * Array.from(stream); // [[1, 4], [2, 5], [3, 6]]\n * ```\n */\nfunction* zip(...objects) {\n const iters = objects.map(obj => obj[Symbol.iterator]());\n let tuple = iters.map(it => it.next());\n for (; every(tuple, item => !item.done); tuple = iters.map(it => it.next())) {\n yield tuple.map(item => item.value);\n }\n}\n\nexport { ArrayExt, StringExt, chain, each, empty, enumerate, every, filter, find, findIndex, map, max, min, minmax, once, range, reduce, repeat, retro, some, stride, take, toArray, toObject, topologicSort, zip };\n//# sourceMappingURL=index.es6.js.map\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.lumino_coreutils = {}));\n})(this, (function (exports) { 'use strict';\n\n // Copyright (c) Jupyter Development Team.\n // Distributed under the terms of the Modified BSD License.\n /*-----------------------------------------------------------------------------\n | Copyright (c) 2014-2017, PhosphorJS Contributors\n |\n | Distributed under the terms of the BSD 3-Clause License.\n |\n | The full license is in the file LICENSE, distributed with this software.\n |----------------------------------------------------------------------------*/\n /**\n * The namespace for JSON-specific functions.\n */\n exports.JSONExt = void 0;\n (function (JSONExt) {\n /**\n * A shared frozen empty JSONObject\n */\n JSONExt.emptyObject = Object.freeze({});\n /**\n * A shared frozen empty JSONArray\n */\n JSONExt.emptyArray = Object.freeze([]);\n /**\n * Test whether a JSON value is a primitive.\n *\n * @param value - The JSON value of interest.\n *\n * @returns `true` if the value is a primitive,`false` otherwise.\n */\n function isPrimitive(value) {\n return (value === null ||\n typeof value === 'boolean' ||\n typeof value === 'number' ||\n typeof value === 'string');\n }\n JSONExt.isPrimitive = isPrimitive;\n function isArray(value) {\n return Array.isArray(value);\n }\n JSONExt.isArray = isArray;\n function isObject(value) {\n return !isPrimitive(value) && !isArray(value);\n }\n JSONExt.isObject = isObject;\n /**\n * Compare two JSON values for deep equality.\n *\n * @param first - The first JSON value of interest.\n *\n * @param second - The second JSON value of interest.\n *\n * @returns `true` if the values are equivalent, `false` otherwise.\n */\n function deepEqual(first, second) {\n // Check referential and primitive equality first.\n if (first === second) {\n return true;\n }\n // If one is a primitive, the `===` check ruled out the other.\n if (isPrimitive(first) || isPrimitive(second)) {\n return false;\n }\n // Test whether they are arrays.\n let a1 = isArray(first);\n let a2 = isArray(second);\n // Bail if the types are different.\n if (a1 !== a2) {\n return false;\n }\n // If they are both arrays, compare them.\n if (a1 && a2) {\n return deepArrayEqual(first, second);\n }\n // At this point, they must both be objects.\n return deepObjectEqual(first, second);\n }\n JSONExt.deepEqual = deepEqual;\n /**\n * Create a deep copy of a JSON value.\n *\n * @param value - The JSON value to copy.\n *\n * @returns A deep copy of the given JSON value.\n */\n function deepCopy(value) {\n // Do nothing for primitive values.\n if (isPrimitive(value)) {\n return value;\n }\n // Deep copy an array.\n if (isArray(value)) {\n return deepArrayCopy(value);\n }\n // Deep copy an object.\n return deepObjectCopy(value);\n }\n JSONExt.deepCopy = deepCopy;\n /**\n * Compare two JSON arrays for deep equality.\n */\n function deepArrayEqual(first, second) {\n // Check referential equality first.\n if (first === second) {\n return true;\n }\n // Test the arrays for equal length.\n if (first.length !== second.length) {\n return false;\n }\n // Compare the values for equality.\n for (let i = 0, n = first.length; i < n; ++i) {\n if (!deepEqual(first[i], second[i])) {\n return false;\n }\n }\n // At this point, the arrays are equal.\n return true;\n }\n /**\n * Compare two JSON objects for deep equality.\n */\n function deepObjectEqual(first, second) {\n // Check referential equality first.\n if (first === second) {\n return true;\n }\n // Check for the first object's keys in the second object.\n for (let key in first) {\n if (first[key] !== undefined && !(key in second)) {\n return false;\n }\n }\n // Check for the second object's keys in the first object.\n for (let key in second) {\n if (second[key] !== undefined && !(key in first)) {\n return false;\n }\n }\n // Compare the values for equality.\n for (let key in first) {\n // Get the values.\n let firstValue = first[key];\n let secondValue = second[key];\n // If both are undefined, ignore the key.\n if (firstValue === undefined && secondValue === undefined) {\n continue;\n }\n // If only one value is undefined, the objects are not equal.\n if (firstValue === undefined || secondValue === undefined) {\n return false;\n }\n // Compare the values.\n if (!deepEqual(firstValue, secondValue)) {\n return false;\n }\n }\n // At this point, the objects are equal.\n return true;\n }\n /**\n * Create a deep copy of a JSON array.\n */\n function deepArrayCopy(value) {\n let result = new Array(value.length);\n for (let i = 0, n = value.length; i < n; ++i) {\n result[i] = deepCopy(value[i]);\n }\n return result;\n }\n /**\n * Create a deep copy of a JSON object.\n */\n function deepObjectCopy(value) {\n let result = {};\n for (let key in value) {\n // Ignore undefined values.\n let subvalue = value[key];\n if (subvalue === undefined) {\n continue;\n }\n result[key] = deepCopy(subvalue);\n }\n return result;\n }\n })(exports.JSONExt || (exports.JSONExt = {}));\n\n // Copyright (c) Jupyter Development Team.\n // Distributed under the terms of the Modified BSD License.\n /*-----------------------------------------------------------------------------\n | Copyright (c) 2014-2017, PhosphorJS Contributors\n |\n | Distributed under the terms of the BSD 3-Clause License.\n |\n | The full license is in the file LICENSE, distributed with this software.\n |----------------------------------------------------------------------------*/\n /**\n * An object which stores MIME data for general application use.\n *\n * #### Notes\n * This class does not attempt to enforce \"correctness\" of MIME types\n * and their associated data. Since this class is designed to transfer\n * arbitrary data and objects within the same application, it assumes\n * that the user provides correct and accurate data.\n */\n class MimeData {\n constructor() {\n this._types = [];\n this._values = [];\n }\n /**\n * Get an array of the MIME types contained within the dataset.\n *\n * @returns A new array of the MIME types, in order of insertion.\n */\n types() {\n return this._types.slice();\n }\n /**\n * Test whether the dataset has an entry for the given type.\n *\n * @param mime - The MIME type of interest.\n *\n * @returns `true` if the dataset contains a value for the given\n * MIME type, `false` otherwise.\n */\n hasData(mime) {\n return this._types.indexOf(mime) !== -1;\n }\n /**\n * Get the data value for the given MIME type.\n *\n * @param mime - The MIME type of interest.\n *\n * @returns The value for the given MIME type, or `undefined` if\n * the dataset does not contain a value for the type.\n */\n getData(mime) {\n let i = this._types.indexOf(mime);\n return i !== -1 ? this._values[i] : undefined;\n }\n /**\n * Set the data value for the given MIME type.\n *\n * @param mime - The MIME type of interest.\n *\n * @param data - The data value for the given MIME type.\n *\n * #### Notes\n * This will overwrite any previous entry for the MIME type.\n */\n setData(mime, data) {\n this.clearData(mime);\n this._types.push(mime);\n this._values.push(data);\n }\n /**\n * Remove the data entry for the given MIME type.\n *\n * @param mime - The MIME type of interest.\n *\n * #### Notes\n * This is a no-op if there is no entry for the given MIME type.\n */\n clearData(mime) {\n let i = this._types.indexOf(mime);\n if (i !== -1) {\n this._types.splice(i, 1);\n this._values.splice(i, 1);\n }\n }\n /**\n * Remove all data entries from the dataset.\n */\n clear() {\n this._types.length = 0;\n this._values.length = 0;\n }\n }\n\n // Copyright (c) Jupyter Development Team.\n // Distributed under the terms of the Modified BSD License.\n /*-----------------------------------------------------------------------------\n | Copyright (c) 2014-2017, PhosphorJS Contributors\n |\n | Distributed under the terms of the BSD 3-Clause License.\n |\n | The full license is in the file LICENSE, distributed with this software.\n |----------------------------------------------------------------------------*/\n /**\n * A class which wraps a promise into a delegate object.\n *\n * #### Notes\n * This class is useful when the logic to resolve or reject a promise\n * cannot be defined at the point where the promise is created.\n */\n class PromiseDelegate {\n /**\n * Construct a new promise delegate.\n */\n constructor() {\n this.promise = new Promise((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n });\n }\n /**\n * Resolve the wrapped promise with the given value.\n *\n * @param value - The value to use for resolving the promise.\n */\n resolve(value) {\n let resolve = this._resolve;\n resolve(value);\n }\n /**\n * Reject the wrapped promise with the given value.\n *\n * @reason - The reason for rejecting the promise.\n */\n reject(reason) {\n let reject = this._reject;\n reject(reason);\n }\n }\n\n // Copyright (c) Jupyter Development Team.\n // Distributed under the terms of the Modified BSD License.\n /*-----------------------------------------------------------------------------\n | Copyright (c) 2014-2017, PhosphorJS Contributors\n |\n | Distributed under the terms of the BSD 3-Clause License.\n |\n | The full license is in the file LICENSE, distributed with this software.\n |----------------------------------------------------------------------------*/\n /**\n * A runtime object which captures compile-time type information.\n *\n * #### Notes\n * A token captures the compile-time type of an interface or class in\n * an object which can be used at runtime in a type-safe fashion.\n */\n class Token {\n /**\n * Construct a new token.\n *\n * @param name - A human readable name for the token.\n * @param description - Token purpose description for documentation.\n */\n constructor(name, description) {\n this.name = name;\n this.description = description !== null && description !== void 0 ? description : '';\n this._tokenStructuralPropertyT = null;\n }\n }\n\n // Copyright (c) Jupyter Development Team.\n // Distributed under the terms of the Modified BSD License.\n /*-----------------------------------------------------------------------------\n | Copyright (c) 2014-2017, PhosphorJS Contributors\n |\n | Distributed under the terms of the BSD 3-Clause License.\n |\n | The full license is in the file LICENSE, distributed with this software.\n |----------------------------------------------------------------------------*/\n // Fallback\n function fallbackRandomValues(buffer) {\n let value = 0;\n for (let i = 0, n = buffer.length; i < n; ++i) {\n if (i % 4 === 0) {\n value = (Math.random() * 0xffffffff) >>> 0;\n }\n buffer[i] = value & 0xff;\n value >>>= 8;\n }\n }\n\n // Copyright (c) Jupyter Development Team.\n // Distributed under the terms of the Modified BSD License.\n /*-----------------------------------------------------------------------------\n | Copyright (c) 2014-2017, PhosphorJS Contributors\n |\n | Distributed under the terms of the BSD 3-Clause License.\n |\n | The full license is in the file LICENSE, distributed with this software.\n |----------------------------------------------------------------------------*/\n /**\n * The namespace for random number related functionality.\n */\n exports.Random = void 0;\n (function (Random) {\n /**\n * A function which generates random bytes.\n *\n * @param buffer - The `Uint8Array` to fill with random bytes.\n *\n * #### Notes\n * A cryptographically strong random number generator will be used if\n * available. Otherwise, `Math.random` will be used as a fallback for\n * randomness.\n *\n * The following RNGs are supported, listed in order of precedence:\n * - `window.crypto.getRandomValues`\n * - `window.msCrypto.getRandomValues`\n * - `require('crypto').randomFillSync\n * - `require('crypto').randomBytes\n * - `Math.random`\n */\n Random.getRandomValues = (() => {\n // Look up the crypto module if available.\n const crypto = (typeof window !== 'undefined' && (window.crypto || window.msCrypto)) ||\n null;\n // Modern browsers and IE 11\n if (crypto && typeof crypto.getRandomValues === 'function') {\n return function getRandomValues(buffer) {\n return crypto.getRandomValues(buffer);\n };\n }\n // Fallback\n return fallbackRandomValues;\n })();\n })(exports.Random || (exports.Random = {}));\n\n // Copyright (c) Jupyter Development Team.\n // Distributed under the terms of the Modified BSD License.\n /*-----------------------------------------------------------------------------\n | Copyright (c) 2014-2017, PhosphorJS Contributors\n |\n | Distributed under the terms of the BSD 3-Clause License.\n |\n | The full license is in the file LICENSE, distributed with this software.\n |----------------------------------------------------------------------------*/\n /**\n * A function which creates a function that generates UUID v4 identifiers.\n *\n * @returns A new function that creates a UUID v4 string.\n *\n * #### Notes\n * This implementation complies with RFC 4122.\n *\n * This uses `Random.getRandomValues()` for random bytes, which in\n * turn will use the underlying `crypto` module of the platform if\n * it is available. The fallback for randomness is `Math.random`.\n */\n function uuid4Factory(getRandomValues) {\n // Create a 16 byte array to hold the random values.\n const bytes = new Uint8Array(16);\n // Create a look up table from bytes to hex strings.\n const lut = new Array(256);\n // Pad the single character hex digits with a leading zero.\n for (let i = 0; i < 16; ++i) {\n lut[i] = '0' + i.toString(16);\n }\n // Populate the rest of the hex digits.\n for (let i = 16; i < 256; ++i) {\n lut[i] = i.toString(16);\n }\n // Return a function which generates the UUID.\n return function uuid4() {\n // Get a new batch of random values.\n getRandomValues(bytes);\n // Set the UUID version number to 4.\n bytes[6] = 0x40 | (bytes[6] & 0x0f);\n // Set the clock sequence bit to the RFC spec.\n bytes[8] = 0x80 | (bytes[8] & 0x3f);\n // Assemble the UUID string.\n return (lut[bytes[0]] +\n lut[bytes[1]] +\n lut[bytes[2]] +\n lut[bytes[3]] +\n '-' +\n lut[bytes[4]] +\n lut[bytes[5]] +\n '-' +\n lut[bytes[6]] +\n lut[bytes[7]] +\n '-' +\n lut[bytes[8]] +\n lut[bytes[9]] +\n '-' +\n lut[bytes[10]] +\n lut[bytes[11]] +\n lut[bytes[12]] +\n lut[bytes[13]] +\n lut[bytes[14]] +\n lut[bytes[15]]);\n };\n }\n\n // Copyright (c) Jupyter Development Team.\n // Distributed under the terms of the Modified BSD License.\n /*-----------------------------------------------------------------------------\n | Copyright (c) 2014-2017, PhosphorJS Contributors\n |\n | Distributed under the terms of the BSD 3-Clause License.\n |\n | The full license is in the file LICENSE, distributed with this software.\n |----------------------------------------------------------------------------*/\n /**\n * The namespace for UUID related functionality.\n */\n exports.UUID = void 0;\n (function (UUID) {\n /**\n * A function which generates UUID v4 identifiers.\n *\n * @returns A new UUID v4 string.\n *\n * #### Notes\n * This implementation complies with RFC 4122.\n *\n * This uses `Random.getRandomValues()` for random bytes, which in\n * turn will use the underlying `crypto` module of the platform if\n * it is available. The fallback for randomness is `Math.random`.\n */\n UUID.uuid4 = uuid4Factory(exports.Random.getRandomValues);\n })(exports.UUID || (exports.UUID = {}));\n\n exports.MimeData = MimeData;\n exports.PromiseDelegate = PromiseDelegate;\n exports.Token = Token;\n\n}));\n//# sourceMappingURL=index.js.map\n","import { Signal } from '@lumino/signaling';\n\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/*-----------------------------------------------------------------------------\n| Copyright (c) 2014-2017, PhosphorJS Contributors\n|\n| Distributed under the terms of the BSD 3-Clause License.\n|\n| The full license is in the file LICENSE, distributed with this software.\n|----------------------------------------------------------------------------*/\n/**\n * @packageDocumentation\n * @module disposable\n */\n/**\n * A disposable object which delegates to a callback function.\n */\nclass DisposableDelegate {\n /**\n * Construct a new disposable delegate.\n *\n * @param fn - The callback function to invoke on dispose.\n */\n constructor(fn) {\n this._fn = fn;\n }\n /**\n * Test whether the delegate has been disposed.\n */\n get isDisposed() {\n return !this._fn;\n }\n /**\n * Dispose of the delegate and invoke the callback function.\n */\n dispose() {\n if (!this._fn) {\n return;\n }\n let fn = this._fn;\n this._fn = null;\n fn();\n }\n}\n/**\n * An observable disposable object which delegates to a callback function.\n */\nclass ObservableDisposableDelegate extends DisposableDelegate {\n constructor() {\n super(...arguments);\n this._disposed = new Signal(this);\n }\n /**\n * A signal emitted when the delegate is disposed.\n */\n get disposed() {\n return this._disposed;\n }\n /**\n * Dispose of the delegate and invoke the callback function.\n */\n dispose() {\n if (this.isDisposed) {\n return;\n }\n super.dispose();\n this._disposed.emit(undefined);\n Signal.clearData(this);\n }\n}\n/**\n * An object which manages a collection of disposable items.\n */\nclass DisposableSet {\n constructor() {\n this._isDisposed = false;\n this._items = new Set();\n }\n /**\n * Test whether the set has been disposed.\n */\n get isDisposed() {\n return this._isDisposed;\n }\n /**\n * Dispose of the set and the items it contains.\n *\n * #### Notes\n * Items are disposed in the order they are added to the set.\n */\n dispose() {\n if (this._isDisposed) {\n return;\n }\n this._isDisposed = true;\n this._items.forEach(item => {\n item.dispose();\n });\n this._items.clear();\n }\n /**\n * Test whether the set contains a specific item.\n *\n * @param item - The item of interest.\n *\n * @returns `true` if the set contains the item, `false` otherwise.\n */\n contains(item) {\n return this._items.has(item);\n }\n /**\n * Add a disposable item to the set.\n *\n * @param item - The item to add to the set.\n *\n * #### Notes\n * If the item is already contained in the set, this is a no-op.\n */\n add(item) {\n this._items.add(item);\n }\n /**\n * Remove a disposable item from the set.\n *\n * @param item - The item to remove from the set.\n *\n * #### Notes\n * If the item is not contained in the set, this is a no-op.\n */\n remove(item) {\n this._items.delete(item);\n }\n /**\n * Remove all items from the set.\n */\n clear() {\n this._items.clear();\n }\n}\n/**\n * The namespace for the `DisposableSet` class statics.\n */\n(function (DisposableSet) {\n /**\n * Create a disposable set from an iterable of items.\n *\n * @param items - The iterable object of interest.\n *\n * @returns A new disposable initialized with the given items.\n */\n function from(items) {\n let set = new DisposableSet();\n for (const item of items) {\n set.add(item);\n }\n return set;\n }\n DisposableSet.from = from;\n})(DisposableSet || (DisposableSet = {}));\n/**\n * An observable object which manages a collection of disposable items.\n */\nclass ObservableDisposableSet extends DisposableSet {\n constructor() {\n super(...arguments);\n this._disposed = new Signal(this);\n }\n /**\n * A signal emitted when the set is disposed.\n */\n get disposed() {\n return this._disposed;\n }\n /**\n * Dispose of the set and the items it contains.\n *\n * #### Notes\n * Items are disposed in the order they are added to the set.\n */\n dispose() {\n if (this.isDisposed) {\n return;\n }\n super.dispose();\n this._disposed.emit(undefined);\n Signal.clearData(this);\n }\n}\n/**\n * The namespace for the `ObservableDisposableSet` class statics.\n */\n(function (ObservableDisposableSet) {\n /**\n * Create an observable disposable set from an iterable of items.\n *\n * @param items - The iterable object of interest.\n *\n * @returns A new disposable initialized with the given items.\n */\n function from(items) {\n let set = new ObservableDisposableSet();\n for (const item of items) {\n set.add(item);\n }\n return set;\n }\n ObservableDisposableSet.from = from;\n})(ObservableDisposableSet || (ObservableDisposableSet = {}));\n\nexport { DisposableDelegate, DisposableSet, ObservableDisposableDelegate, ObservableDisposableSet };\n//# sourceMappingURL=index.es6.js.map\n","import { PromiseDelegate, JSONExt } from '@lumino/coreutils';\nimport { Signal } from '@lumino/signaling';\n\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/**\n * A class that wraps an asynchronous function to poll at a regular interval\n * with exponential increases to the interval length if the poll fails.\n *\n * @typeparam T - The resolved type of the factory's promises.\n * Defaults to `any`.\n *\n * @typeparam U - The rejected type of the factory's promises.\n * Defaults to `any`.\n *\n * @typeparam V - An optional type to extend the phases supported by a poll.\n * Defaults to `standby`, which already exists in the `Phase` type.\n */\nclass Poll {\n /**\n * Instantiate a new poll with exponential backoff in case of failure.\n *\n * @param options - The poll instantiation options.\n */\n constructor(options) {\n var _a;\n this._disposed = new Signal(this);\n this._lingered = 0;\n this._tick = new PromiseDelegate();\n this._ticked = new Signal(this);\n this._factory = options.factory;\n this._linger = (_a = options.linger) !== null && _a !== void 0 ? _a : Private.DEFAULT_LINGER;\n this._standby = options.standby || Private.DEFAULT_STANDBY;\n this._state = { ...Private.DEFAULT_STATE, timestamp: new Date().getTime() };\n // Normalize poll frequency `max` to be the greater of\n // default `max`, `options.frequency.max`, or `options.frequency.interval`.\n const frequency = options.frequency || {};\n const max = Math.max(frequency.interval || 0, frequency.max || 0, Private.DEFAULT_FREQUENCY.max);\n this.frequency = { ...Private.DEFAULT_FREQUENCY, ...frequency, ...{ max } };\n this.name = options.name || Private.DEFAULT_NAME;\n if ('auto' in options ? options.auto : true) {\n setTimeout(() => this.start());\n }\n }\n /**\n * A signal emitted when the poll is disposed.\n */\n get disposed() {\n return this._disposed;\n }\n /**\n * The polling frequency parameters.\n */\n get frequency() {\n return this._frequency;\n }\n set frequency(frequency) {\n if (this.isDisposed || JSONExt.deepEqual(frequency, this.frequency || {})) {\n return;\n }\n let { backoff, interval, max } = frequency;\n interval = Math.round(interval);\n max = Math.round(max);\n if (typeof backoff === 'number' && backoff < 1) {\n throw new Error('Poll backoff growth factor must be at least 1');\n }\n if ((interval < 0 || interval > max) && interval !== Poll.NEVER) {\n throw new Error('Poll interval must be between 0 and max');\n }\n if (max > Poll.MAX_INTERVAL && max !== Poll.NEVER) {\n throw new Error(`Max interval must be less than ${Poll.MAX_INTERVAL}`);\n }\n this._frequency = { backoff, interval, max };\n }\n /**\n * Whether the poll is disposed.\n */\n get isDisposed() {\n return this.state.phase === 'disposed';\n }\n /**\n * Indicates when the poll switches to standby.\n */\n get standby() {\n return this._standby;\n }\n set standby(standby) {\n if (this.isDisposed || this.standby === standby) {\n return;\n }\n this._standby = standby;\n }\n /**\n * The poll state, which is the content of the current poll tick.\n */\n get state() {\n return this._state;\n }\n /**\n * A promise that resolves when the poll next ticks.\n */\n get tick() {\n return this._tick.promise;\n }\n /**\n * A signal emitted when the poll ticks and fires off a new request.\n */\n get ticked() {\n return this._ticked;\n }\n /**\n * Return an async iterator that yields every tick.\n */\n async *[Symbol.asyncIterator]() {\n while (!this.isDisposed) {\n yield this.state;\n await this.tick.catch(() => undefined);\n }\n }\n /**\n * Dispose the poll.\n */\n dispose() {\n if (this.isDisposed) {\n return;\n }\n this._state = {\n ...Private.DISPOSED_STATE,\n timestamp: new Date().getTime()\n };\n this._tick.promise.catch(_ => undefined);\n this._tick.reject(new Error(`Poll (${this.name}) is disposed.`));\n this._disposed.emit(undefined);\n Signal.clearData(this);\n }\n /**\n * Refreshes the poll. Schedules `refreshed` tick if necessary.\n *\n * @returns A promise that resolves after tick is scheduled and never rejects.\n *\n * #### Notes\n * The returned promise resolves after the tick is scheduled, but before\n * the polling action is run. To wait until after the poll action executes,\n * await the `poll.tick` promise: `await poll.refresh(); await poll.tick;`\n */\n refresh() {\n return this.schedule({\n cancel: ({ phase }) => phase === 'refreshed',\n interval: Poll.IMMEDIATE,\n phase: 'refreshed'\n });\n }\n /**\n * Schedule the next poll tick.\n *\n * @param next - The next poll state data to schedule. Defaults to standby.\n *\n * @param next.cancel - Cancels state transition if function returns `true`.\n *\n * @returns A promise that resolves when the next poll state is active.\n *\n * #### Notes\n * This method is not meant to be invoked by user code typically. It is public\n * to allow poll instances to be composed into classes that schedule ticks.\n */\n async schedule(next = {}) {\n if (this.isDisposed) {\n return;\n }\n // Check if the phase transition should be canceled.\n if (next.cancel && next.cancel(this.state)) {\n return;\n }\n // Update poll state.\n const pending = this._tick;\n const scheduled = new PromiseDelegate();\n const state = {\n interval: this.frequency.interval,\n payload: null,\n phase: 'standby',\n timestamp: new Date().getTime(),\n ...next\n };\n this._state = state;\n this._tick = scheduled;\n // Clear the schedule if possible.\n clearTimeout(this._timeout);\n // Emit ticked signal, resolve pending promise, and await its settlement.\n this._ticked.emit(this.state);\n pending.resolve(this);\n await pending.promise;\n if (state.interval === Poll.NEVER) {\n this._timeout = undefined;\n return;\n }\n // Schedule next execution and cache its timeout handle.\n const execute = () => {\n if (this.isDisposed || this.tick !== scheduled.promise) {\n return;\n }\n this._execute();\n };\n // Cache the handle in case it needs to be unscheduled.\n this._timeout = setTimeout(execute, state.interval);\n }\n /**\n * Starts the poll. Schedules `started` tick if necessary.\n *\n * @returns A promise that resolves after tick is scheduled and never rejects.\n */\n start() {\n return this.schedule({\n cancel: ({ phase }) => phase !== 'constructed' && phase !== 'standby' && phase !== 'stopped',\n interval: Poll.IMMEDIATE,\n phase: 'started'\n });\n }\n /**\n * Stops the poll. Schedules `stopped` tick if necessary.\n *\n * @returns A promise that resolves after tick is scheduled and never rejects.\n */\n stop() {\n return this.schedule({\n cancel: ({ phase }) => phase === 'stopped',\n interval: Poll.NEVER,\n phase: 'stopped'\n });\n }\n /**\n * Whether the poll is hidden.\n *\n * #### Notes\n * This property is only relevant in a browser context.\n */\n get hidden() {\n return Private.hidden;\n }\n /**\n * Execute a new poll factory promise or stand by if necessary.\n */\n _execute() {\n let standby = typeof this.standby === 'function' ? this.standby() : this.standby;\n // Check if execution should proceed, linger, or stand by.\n if (standby === 'never') {\n standby = false;\n }\n else if (standby === 'when-hidden') {\n if (this.hidden) {\n standby = ++this._lingered > this._linger;\n }\n else {\n this._lingered = 0;\n standby = false;\n }\n }\n // If in standby mode schedule next tick without calling the factory.\n if (standby) {\n void this.schedule();\n return;\n }\n const pending = this.tick;\n this._factory(this.state)\n .then((resolved) => {\n if (this.isDisposed || this.tick !== pending) {\n return;\n }\n void this.schedule({\n payload: resolved,\n phase: this.state.phase === 'rejected' ? 'reconnected' : 'resolved'\n });\n })\n .catch((rejected) => {\n if (this.isDisposed || this.tick !== pending) {\n return;\n }\n void this.schedule({\n interval: Private.sleep(this.frequency, this.state),\n payload: rejected,\n phase: 'rejected'\n });\n });\n }\n}\n/**\n * A namespace for `Poll` types, interfaces, and statics.\n */\n(function (Poll) {\n /**\n * An interval value in ms that indicates the poll should tick immediately.\n */\n Poll.IMMEDIATE = 0;\n /**\n * Delays are 32-bit integers in many browsers so intervals need to be capped.\n *\n * #### Notes\n * https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout#Maximum_delay_value\n */\n Poll.MAX_INTERVAL = 2147483647;\n /**\n * An interval value that indicates the poll should never tick.\n */\n Poll.NEVER = Infinity;\n})(Poll || (Poll = {}));\n/**\n * A namespace for private module data.\n */\nvar Private;\n(function (Private) {\n /**\n * The default backoff growth rate if `backoff` is `true`.\n */\n Private.DEFAULT_BACKOFF = 3;\n /**\n * The default polling frequency.\n */\n Private.DEFAULT_FREQUENCY = {\n backoff: true,\n interval: 1000,\n max: 30 * 1000\n };\n /**\n * The default number of times to `linger` when a poll is hidden.\n */\n Private.DEFAULT_LINGER = 1;\n /**\n * The default poll name.\n */\n Private.DEFAULT_NAME = 'unknown';\n /**\n * The default poll standby behavior.\n */\n Private.DEFAULT_STANDBY = 'when-hidden';\n /**\n * The first poll tick state's default values superseded in constructor.\n */\n Private.DEFAULT_STATE = {\n interval: Poll.NEVER,\n payload: null,\n phase: 'constructed',\n timestamp: new Date(0).getTime()\n };\n /**\n * The disposed tick state values.\n */\n Private.DISPOSED_STATE = {\n interval: Poll.NEVER,\n payload: null,\n phase: 'disposed',\n timestamp: new Date(0).getTime()\n };\n /**\n * Returns the number of milliseconds to sleep before the next tick.\n *\n * @param frequency - The poll's base frequency.\n * @param last - The poll's last tick.\n */\n function sleep(frequency, last) {\n const { backoff, interval, max } = frequency;\n if (interval === Poll.NEVER) {\n return interval;\n }\n const growth = backoff === true ? Private.DEFAULT_BACKOFF : backoff === false ? 1 : backoff;\n const random = getRandomIntInclusive(interval, last.interval * growth);\n return Math.min(max, random);\n }\n Private.sleep = sleep;\n /**\n * Keep track of whether the document is hidden. This flag is only relevant in\n * a browser context.\n *\n * Listen to `visibilitychange` event to set the `hidden` flag.\n *\n * Listening to `pagehide` is also necessary because Safari support for\n * `visibilitychange` events is partial, cf.\n * https://developer.mozilla.org/docs/Web/API/Document/visibilitychange_event\n */\n Private.hidden = (() => {\n if (typeof document === 'undefined') {\n return false;\n }\n document.addEventListener('visibilitychange', () => {\n Private.hidden = document.visibilityState === 'hidden';\n });\n document.addEventListener('pagehide', () => {\n Private.hidden = document.visibilityState === 'hidden';\n });\n return document.visibilityState === 'hidden';\n })();\n /**\n * Get a random integer between min and max, inclusive of both.\n *\n * #### Notes\n * From\n * https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Math/random#Getting_a_random_integer_between_two_values_inclusive\n *\n * From the MDN page: It might be tempting to use Math.round() to accomplish\n * that, but doing so would cause your random numbers to follow a non-uniform\n * distribution, which may not be acceptable for your needs.\n */\n function getRandomIntInclusive(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n }\n})(Private || (Private = {}));\n\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/**\n * A base class to implement rate limiters with different invocation strategies.\n *\n * @typeparam T - The resolved type of the underlying function.\n *\n * @typeparam U - The rejected type of the underlying function.\n *\n * @typeparam V - Arguments for the underlying function.\n */\nclass RateLimiter {\n /**\n * Instantiate a rate limiter.\n *\n * @param fn - The function to rate limit.\n *\n * @param limit - The rate limit; defaults to 500ms.\n */\n constructor(fn, limit = 500) {\n /**\n * Arguments for the underlying function.\n */\n this.args = undefined;\n /**\n * A promise that resolves on each successful invocation.\n */\n this.payload = null;\n this.limit = limit;\n this.poll = new Poll({\n auto: false,\n factory: async () => {\n const { args } = this;\n this.args = undefined;\n return fn(...args);\n },\n frequency: { backoff: false, interval: Poll.NEVER, max: Poll.NEVER },\n standby: 'never'\n });\n this.payload = new PromiseDelegate();\n this.poll.ticked.connect((_, state) => {\n const { payload } = this;\n if (state.phase === 'resolved') {\n this.payload = new PromiseDelegate();\n payload.resolve(state.payload);\n return;\n }\n if (state.phase === 'rejected' || state.phase === 'stopped') {\n this.payload = new PromiseDelegate();\n payload.promise.catch(_ => undefined);\n payload.reject(state.payload);\n return;\n }\n }, this);\n }\n /**\n * Whether the rate limiter is disposed.\n */\n get isDisposed() {\n return this.payload === null;\n }\n /**\n * Disposes the rate limiter.\n */\n dispose() {\n if (this.isDisposed) {\n return;\n }\n this.args = undefined;\n this.payload = null;\n this.poll.dispose();\n }\n /**\n * Stop the function if it is mid-flight.\n */\n async stop() {\n return this.poll.stop();\n }\n}\n/**\n * Wraps and debounces a function that can be called multiple times and only\n * executes the underlying function one `interval` after the last invocation.\n *\n * @typeparam T - The resolved type of the underlying function. Defaults to any.\n *\n * @typeparam U - The rejected type of the underlying function. Defaults to any.\n *\n * @typeparam V - Arguments for the underlying function. Defaults to any[].\n */\nclass Debouncer extends RateLimiter {\n /**\n * Invokes the function and only executes after rate limit has elapsed.\n * Each invocation resets the timer.\n */\n invoke(...args) {\n this.args = args;\n void this.poll.schedule({ interval: this.limit, phase: 'invoked' });\n return this.payload.promise;\n }\n}\n/**\n * Wraps and throttles a function that can be called multiple times and only\n * executes the underlying function once per `interval`.\n *\n * @typeparam T - The resolved type of the underlying function. Defaults to any.\n *\n * @typeparam U - The rejected type of the underlying function. Defaults to any.\n *\n * @typeparam V - Arguments for the underlying function. Defaults to any[].\n */\nclass Throttler extends RateLimiter {\n /**\n * Instantiate a throttler.\n *\n * @param fn - The function being throttled.\n *\n * @param options - Throttling configuration or throttling limit in ms.\n *\n * #### Notes\n * The `edge` defaults to `leading`; the `limit` defaults to `500`.\n */\n constructor(fn, options) {\n super(fn, typeof options === 'number' ? options : options && options.limit);\n this._trailing = false;\n if (typeof options !== 'number' && options && options.edge === 'trailing') {\n this._trailing = true;\n }\n this._interval = this._trailing ? this.limit : Poll.IMMEDIATE;\n }\n /**\n * Throttles function invocations if one is currently in flight.\n */\n invoke(...args) {\n const idle = this.poll.state.phase !== 'invoked';\n if (idle || this._trailing) {\n this.args = args;\n }\n if (idle) {\n void this.poll.schedule({ interval: this._interval, phase: 'invoked' });\n }\n return this.payload.promise;\n }\n}\n\nexport { Debouncer, Poll, RateLimiter, Throttler };\n//# sourceMappingURL=index.es6.js.map\n","// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/*-----------------------------------------------------------------------------\n| Copyright (c) 2014-2017, PhosphorJS Contributors\n|\n| Distributed under the terms of the BSD 3-Clause License.\n|\n| The full license is in the file LICENSE, distributed with this software.\n|----------------------------------------------------------------------------*/\n/**\n * @packageDocumentation\n * @module properties\n */\n/**\n * A class which attaches a value to an external object.\n *\n * #### Notes\n * Attached properties are used to extend the state of an object with\n * semantic data from an unrelated class. They also encapsulate value\n * creation, coercion, and notification.\n *\n * Because attached property values are stored in a hash table, which\n * in turn is stored in a WeakMap keyed on the owner object, there is\n * non-trivial storage overhead involved in their use. The pattern is\n * therefore best used for the storage of rare data.\n */\nclass AttachedProperty {\n /**\n * Construct a new attached property.\n *\n * @param options - The options for initializing the property.\n */\n constructor(options) {\n this._pid = Private.nextPID();\n this.name = options.name;\n this._create = options.create;\n this._coerce = options.coerce || null;\n this._compare = options.compare || null;\n this._changed = options.changed || null;\n }\n /**\n * Get the current value of the property for a given owner.\n *\n * @param owner - The property owner of interest.\n *\n * @returns The current value of the property.\n *\n * #### Notes\n * If the value has not yet been set, the default value will be\n * computed and assigned as the current value of the property.\n */\n get(owner) {\n let value;\n let map = Private.ensureMap(owner);\n if (this._pid in map) {\n value = map[this._pid];\n }\n else {\n value = map[this._pid] = this._createValue(owner);\n }\n return value;\n }\n /**\n * Set the current value of the property for a given owner.\n *\n * @param owner - The property owner of interest.\n *\n * @param value - The value for the property.\n *\n * #### Notes\n * If the value has not yet been set, the default value will be\n * computed and used as the previous value for the comparison.\n */\n set(owner, value) {\n let oldValue;\n let map = Private.ensureMap(owner);\n if (this._pid in map) {\n oldValue = map[this._pid];\n }\n else {\n oldValue = map[this._pid] = this._createValue(owner);\n }\n let newValue = this._coerceValue(owner, value);\n this._maybeNotify(owner, oldValue, (map[this._pid] = newValue));\n }\n /**\n * Explicitly coerce the current property value for a given owner.\n *\n * @param owner - The property owner of interest.\n *\n * #### Notes\n * If the value has not yet been set, the default value will be\n * computed and used as the previous value for the comparison.\n */\n coerce(owner) {\n let oldValue;\n let map = Private.ensureMap(owner);\n if (this._pid in map) {\n oldValue = map[this._pid];\n }\n else {\n oldValue = map[this._pid] = this._createValue(owner);\n }\n let newValue = this._coerceValue(owner, oldValue);\n this._maybeNotify(owner, oldValue, (map[this._pid] = newValue));\n }\n /**\n * Get or create the default value for the given owner.\n */\n _createValue(owner) {\n let create = this._create;\n return create(owner);\n }\n /**\n * Coerce the value for the given owner.\n */\n _coerceValue(owner, value) {\n let coerce = this._coerce;\n return coerce ? coerce(owner, value) : value;\n }\n /**\n * Compare the old value and new value for equality.\n */\n _compareValue(oldValue, newValue) {\n let compare = this._compare;\n return compare ? compare(oldValue, newValue) : oldValue === newValue;\n }\n /**\n * Run the change notification if the given values are different.\n */\n _maybeNotify(owner, oldValue, newValue) {\n let changed = this._changed;\n if (changed && !this._compareValue(oldValue, newValue)) {\n changed(owner, oldValue, newValue);\n }\n }\n}\n/**\n * The namespace for the `AttachedProperty` class statics.\n */\n(function (AttachedProperty) {\n /**\n * Clear the stored property data for the given owner.\n *\n * @param owner - The property owner of interest.\n *\n * #### Notes\n * This will clear all property values for the owner, but it will\n * **not** run the change notification for any of the properties.\n */\n function clearData(owner) {\n Private.ownerData.delete(owner);\n }\n AttachedProperty.clearData = clearData;\n})(AttachedProperty || (AttachedProperty = {}));\n/**\n * The namespace for the module implementation details.\n */\nvar Private;\n(function (Private) {\n /**\n * A weak mapping of property owner to property map.\n */\n Private.ownerData = new WeakMap();\n /**\n * A function which computes successive unique property ids.\n */\n Private.nextPID = (() => {\n let id = 0;\n return () => {\n let rand = Math.random();\n let stem = `${rand}`.slice(2);\n return `pid-${stem}-${id++}`;\n };\n })();\n /**\n * Lookup the data map for the property owner.\n *\n * This will create the map if one does not already exist.\n */\n function ensureMap(owner) {\n let map = Private.ownerData.get(owner);\n if (map) {\n return map;\n }\n map = Object.create(null);\n Private.ownerData.set(owner, map);\n return map;\n }\n Private.ensureMap = ensureMap;\n})(Private || (Private = {}));\n\nexport { AttachedProperty };\n//# sourceMappingURL=index.es6.js.map\n","import { find, ArrayExt } from '@lumino/algorithm';\nimport { PromiseDelegate } from '@lumino/coreutils';\n\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/*-----------------------------------------------------------------------------\n| Copyright (c) 2014-2017, PhosphorJS Contributors\n|\n| Distributed under the terms of the BSD 3-Clause License.\n|\n| The full license is in the file LICENSE, distributed with this software.\n|----------------------------------------------------------------------------*/\n/**\n * @packageDocumentation\n * @module signaling\n */\n/**\n * A concrete implementation of `ISignal`.\n *\n * #### Example\n * ```typescript\n * import { ISignal, Signal } from '@lumino/signaling';\n *\n * class SomeClass {\n *\n * constructor(name: string) {\n * this.name = name;\n * }\n *\n * readonly name: string;\n *\n * get valueChanged: ISignal {\n * return this._valueChanged;\n * }\n *\n * get value(): number {\n * return this._value;\n * }\n *\n * set value(value: number) {\n * if (value === this._value) {\n * return;\n * }\n * this._value = value;\n * this._valueChanged.emit(value);\n * }\n *\n * private _value = 0;\n * private _valueChanged = new Signal(this);\n * }\n *\n * function logger(sender: SomeClass, value: number): void {\n * console.log(sender.name, value);\n * }\n *\n * let m1 = new SomeClass('foo');\n * let m2 = new SomeClass('bar');\n *\n * m1.valueChanged.connect(logger);\n * m2.valueChanged.connect(logger);\n *\n * m1.value = 42; // logs: foo 42\n * m2.value = 17; // logs: bar 17\n * ```\n */\nclass Signal {\n /**\n * Construct a new signal.\n *\n * @param sender - The sender which owns the signal.\n */\n constructor(sender) {\n this.sender = sender;\n }\n /**\n * Connect a slot to the signal.\n *\n * @param slot - The slot to invoke when the signal is emitted.\n *\n * @param thisArg - The `this` context for the slot. If provided,\n * this must be a non-primitive object.\n *\n * @returns `true` if the connection succeeds, `false` otherwise.\n */\n connect(slot, thisArg) {\n return Private.connect(this, slot, thisArg);\n }\n /**\n * Disconnect a slot from the signal.\n *\n * @param slot - The slot to disconnect from the signal.\n *\n * @param thisArg - The `this` context for the slot. If provided,\n * this must be a non-primitive object.\n *\n * @returns `true` if the connection is removed, `false` otherwise.\n */\n disconnect(slot, thisArg) {\n return Private.disconnect(this, slot, thisArg);\n }\n /**\n * Emit the signal and invoke the connected slots.\n *\n * @param args - The args to pass to the connected slots.\n *\n * #### Notes\n * Slots are invoked synchronously in connection order.\n *\n * Exceptions thrown by connected slots will be caught and logged.\n */\n emit(args) {\n Private.emit(this, args);\n }\n}\n/**\n * The namespace for the `Signal` class statics.\n */\n(function (Signal) {\n /**\n * Remove all connections between a sender and receiver.\n *\n * @param sender - The sender object of interest.\n *\n * @param receiver - The receiver object of interest.\n *\n * #### Notes\n * If a `thisArg` is provided when connecting a signal, that object\n * is considered the receiver. Otherwise, the `slot` is considered\n * the receiver.\n */\n function disconnectBetween(sender, receiver) {\n Private.disconnectBetween(sender, receiver);\n }\n Signal.disconnectBetween = disconnectBetween;\n /**\n * Remove all connections where the given object is the sender.\n *\n * @param sender - The sender object of interest.\n */\n function disconnectSender(sender) {\n Private.disconnectSender(sender);\n }\n Signal.disconnectSender = disconnectSender;\n /**\n * Remove all connections where the given object is the receiver.\n *\n * @param receiver - The receiver object of interest.\n *\n * #### Notes\n * If a `thisArg` is provided when connecting a signal, that object\n * is considered the receiver. Otherwise, the `slot` is considered\n * the receiver.\n */\n function disconnectReceiver(receiver) {\n Private.disconnectReceiver(receiver);\n }\n Signal.disconnectReceiver = disconnectReceiver;\n /**\n * Remove all connections where an object is the sender or receiver.\n *\n * @param object - The object of interest.\n *\n * #### Notes\n * If a `thisArg` is provided when connecting a signal, that object\n * is considered the receiver. Otherwise, the `slot` is considered\n * the receiver.\n */\n function disconnectAll(object) {\n Private.disconnectAll(object);\n }\n Signal.disconnectAll = disconnectAll;\n /**\n * Clear all signal data associated with the given object.\n *\n * @param object - The object for which the data should be cleared.\n *\n * #### Notes\n * This removes all signal connections and any other signal data\n * associated with the object.\n */\n function clearData(object) {\n Private.disconnectAll(object);\n }\n Signal.clearData = clearData;\n /**\n * Get the signal exception handler.\n *\n * @returns The current exception handler.\n *\n * #### Notes\n * The default exception handler is `console.error`.\n */\n function getExceptionHandler() {\n return Private.exceptionHandler;\n }\n Signal.getExceptionHandler = getExceptionHandler;\n /**\n * Set the signal exception handler.\n *\n * @param handler - The function to use as the exception handler.\n *\n * @returns The old exception handler.\n *\n * #### Notes\n * The exception handler is invoked when a slot throws an exception.\n */\n function setExceptionHandler(handler) {\n let old = Private.exceptionHandler;\n Private.exceptionHandler = handler;\n return old;\n }\n Signal.setExceptionHandler = setExceptionHandler;\n})(Signal || (Signal = {}));\n/**\n * A concrete implementation of `IStream`.\n *\n * #### Example\n * ```typescript\n * import { IStream, Stream } from '@lumino/signaling';\n *\n * class SomeClass {\n *\n * constructor(name: string) {\n * this.name = name;\n * }\n *\n * readonly name: string;\n *\n * get pings(): IStream {\n * return this._pings;\n * }\n *\n * ping(value: string) {\n * this._pings.emit(value);\n * }\n *\n * private _pings = new Stream(this);\n * }\n *\n * let m1 = new SomeClass('foo');\n *\n * m1.pings.connect((_, value: string) => {\n * console.log('connect', value);\n * });\n *\n * void (async () => {\n * for await (const ping of m1.pings) {\n * console.log('iterator', ping);\n * }\n * })();\n *\n * m1.ping('alpha'); // logs: connect alpha\n * // logs: iterator alpha\n * m1.ping('beta'); // logs: connect beta\n * // logs: iterator beta\n * ```\n */\nclass Stream extends Signal {\n constructor() {\n super(...arguments);\n this._pending = new PromiseDelegate();\n }\n /**\n * Return an async iterator that yields every emission.\n */\n async *[Symbol.asyncIterator]() {\n let pending = this._pending;\n while (true) {\n try {\n const { args, next } = await pending.promise;\n pending = next;\n yield args;\n }\n catch (_) {\n return; // Any promise rejection stops the iterator.\n }\n }\n }\n /**\n * Emit the signal, invoke the connected slots, and yield the emission.\n *\n * @param args - The args to pass to the connected slots.\n */\n emit(args) {\n const pending = this._pending;\n const next = (this._pending = new PromiseDelegate());\n pending.resolve({ args, next });\n super.emit(args);\n }\n /**\n * Stop the stream's async iteration.\n */\n stop() {\n this._pending.promise.catch(() => undefined);\n this._pending.reject('stop');\n this._pending = new PromiseDelegate();\n }\n}\n/**\n * The namespace for the module implementation details.\n */\nvar Private;\n(function (Private) {\n /**\n * The signal exception handler function.\n */\n Private.exceptionHandler = (err) => {\n console.error(err);\n };\n /**\n * Connect a slot to a signal.\n *\n * @param signal - The signal of interest.\n *\n * @param slot - The slot to invoke when the signal is emitted.\n *\n * @param thisArg - The `this` context for the slot. If provided,\n * this must be a non-primitive object.\n *\n * @returns `true` if the connection succeeds, `false` otherwise.\n */\n function connect(signal, slot, thisArg) {\n // Coerce a `null` `thisArg` to `undefined`.\n thisArg = thisArg || undefined;\n // Ensure the sender's array of receivers is created.\n let receivers = receiversForSender.get(signal.sender);\n if (!receivers) {\n receivers = [];\n receiversForSender.set(signal.sender, receivers);\n }\n // Bail if a matching connection already exists.\n if (findConnection(receivers, signal, slot, thisArg)) {\n return false;\n }\n // Choose the best object for the receiver.\n let receiver = thisArg || slot;\n // Ensure the receiver's array of senders is created.\n let senders = sendersForReceiver.get(receiver);\n if (!senders) {\n senders = [];\n sendersForReceiver.set(receiver, senders);\n }\n // Create a new connection and add it to the end of each array.\n let connection = { signal, slot, thisArg };\n receivers.push(connection);\n senders.push(connection);\n // Indicate a successful connection.\n return true;\n }\n Private.connect = connect;\n /**\n * Disconnect a slot from a signal.\n *\n * @param signal - The signal of interest.\n *\n * @param slot - The slot to disconnect from the signal.\n *\n * @param thisArg - The `this` context for the slot. If provided,\n * this must be a non-primitive object.\n *\n * @returns `true` if the connection is removed, `false` otherwise.\n */\n function disconnect(signal, slot, thisArg) {\n // Coerce a `null` `thisArg` to `undefined`.\n thisArg = thisArg || undefined;\n // Lookup the list of receivers, and bail if none exist.\n let receivers = receiversForSender.get(signal.sender);\n if (!receivers || receivers.length === 0) {\n return false;\n }\n // Bail if no matching connection exits.\n let connection = findConnection(receivers, signal, slot, thisArg);\n if (!connection) {\n return false;\n }\n // Choose the best object for the receiver.\n let receiver = thisArg || slot;\n // Lookup the array of senders, which is now known to exist.\n let senders = sendersForReceiver.get(receiver);\n // Clear the connection and schedule cleanup of the arrays.\n connection.signal = null;\n scheduleCleanup(receivers);\n scheduleCleanup(senders);\n // Indicate a successful disconnection.\n return true;\n }\n Private.disconnect = disconnect;\n /**\n * Remove all connections between a sender and receiver.\n *\n * @param sender - The sender object of interest.\n *\n * @param receiver - The receiver object of interest.\n */\n function disconnectBetween(sender, receiver) {\n // If there are no receivers, there is nothing to do.\n let receivers = receiversForSender.get(sender);\n if (!receivers || receivers.length === 0) {\n return;\n }\n // If there are no senders, there is nothing to do.\n let senders = sendersForReceiver.get(receiver);\n if (!senders || senders.length === 0) {\n return;\n }\n // Clear each connection between the sender and receiver.\n for (const connection of senders) {\n // Skip connections which have already been cleared.\n if (!connection.signal) {\n continue;\n }\n // Clear the connection if it matches the sender.\n if (connection.signal.sender === sender) {\n connection.signal = null;\n }\n }\n // Schedule a cleanup of the senders and receivers.\n scheduleCleanup(receivers);\n scheduleCleanup(senders);\n }\n Private.disconnectBetween = disconnectBetween;\n /**\n * Remove all connections where the given object is the sender.\n *\n * @param sender - The sender object of interest.\n */\n function disconnectSender(sender) {\n // If there are no receivers, there is nothing to do.\n let receivers = receiversForSender.get(sender);\n if (!receivers || receivers.length === 0) {\n return;\n }\n // Clear each receiver connection.\n for (const connection of receivers) {\n // Skip connections which have already been cleared.\n if (!connection.signal) {\n continue;\n }\n // Choose the best object for the receiver.\n let receiver = connection.thisArg || connection.slot;\n // Clear the connection.\n connection.signal = null;\n // Cleanup the array of senders, which is now known to exist.\n scheduleCleanup(sendersForReceiver.get(receiver));\n }\n // Schedule a cleanup of the receivers.\n scheduleCleanup(receivers);\n }\n Private.disconnectSender = disconnectSender;\n /**\n * Remove all connections where the given object is the receiver.\n *\n * @param receiver - The receiver object of interest.\n */\n function disconnectReceiver(receiver) {\n // If there are no senders, there is nothing to do.\n let senders = sendersForReceiver.get(receiver);\n if (!senders || senders.length === 0) {\n return;\n }\n // Clear each sender connection.\n for (const connection of senders) {\n // Skip connections which have already been cleared.\n if (!connection.signal) {\n continue;\n }\n // Lookup the sender for the connection.\n let sender = connection.signal.sender;\n // Clear the connection.\n connection.signal = null;\n // Cleanup the array of receivers, which is now known to exist.\n scheduleCleanup(receiversForSender.get(sender));\n }\n // Schedule a cleanup of the list of senders.\n scheduleCleanup(senders);\n }\n Private.disconnectReceiver = disconnectReceiver;\n /**\n * Remove all connections where an object is the sender or receiver.\n *\n * @param object - The object of interest.\n */\n function disconnectAll(object) {\n // Remove all connections where the given object is the sender.\n disconnectSender(object);\n // Remove all connections where the given object is the receiver.\n disconnectReceiver(object);\n }\n Private.disconnectAll = disconnectAll;\n /**\n * Emit a signal and invoke its connected slots.\n *\n * @param signal - The signal of interest.\n *\n * @param args - The args to pass to the connected slots.\n *\n * #### Notes\n * Slots are invoked synchronously in connection order.\n *\n * Exceptions thrown by connected slots will be caught and logged.\n */\n function emit(signal, args) {\n // If there are no receivers, there is nothing to do.\n let receivers = receiversForSender.get(signal.sender);\n if (!receivers || receivers.length === 0) {\n return;\n }\n // Invoke the slots for connections with a matching signal.\n // Any connections added during emission are not invoked.\n for (let i = 0, n = receivers.length; i < n; ++i) {\n let connection = receivers[i];\n if (connection.signal === signal) {\n invokeSlot(connection, args);\n }\n }\n }\n Private.emit = emit;\n /**\n * A weak mapping of sender to array of receiver connections.\n */\n const receiversForSender = new WeakMap();\n /**\n * A weak mapping of receiver to array of sender connections.\n */\n const sendersForReceiver = new WeakMap();\n /**\n * A set of connection arrays which are pending cleanup.\n */\n const dirtySet = new Set();\n /**\n * A function to schedule an event loop callback.\n */\n const schedule = (() => {\n let ok = typeof requestAnimationFrame === 'function';\n return ok ? requestAnimationFrame : setImmediate;\n })();\n /**\n * Find a connection which matches the given parameters.\n */\n function findConnection(connections, signal, slot, thisArg) {\n return find(connections, connection => connection.signal === signal &&\n connection.slot === slot &&\n connection.thisArg === thisArg);\n }\n /**\n * Invoke a slot with the given parameters.\n *\n * The connection is assumed to be valid.\n *\n * Exceptions in the slot will be caught and logged.\n */\n function invokeSlot(connection, args) {\n let { signal, slot, thisArg } = connection;\n try {\n slot.call(thisArg, signal.sender, args);\n }\n catch (err) {\n Private.exceptionHandler(err);\n }\n }\n /**\n * Schedule a cleanup of a connection array.\n *\n * This will add the array to the dirty set and schedule a deferred\n * cleanup of the array contents. On cleanup, any connection with a\n * `null` signal will be removed from the array.\n */\n function scheduleCleanup(array) {\n if (dirtySet.size === 0) {\n schedule(cleanupDirtySet);\n }\n dirtySet.add(array);\n }\n /**\n * Cleanup the connection lists in the dirty set.\n *\n * This function should only be invoked asynchronously, when the\n * stack frame is guaranteed to not be on the path of user code.\n */\n function cleanupDirtySet() {\n dirtySet.forEach(cleanupConnections);\n dirtySet.clear();\n }\n /**\n * Cleanup the dirty connections in a connections array.\n *\n * This will remove any connection with a `null` signal.\n *\n * This function should only be invoked asynchronously, when the\n * stack frame is guaranteed to not be on the path of user code.\n */\n function cleanupConnections(connections) {\n ArrayExt.removeAllWhere(connections, isDeadConnection);\n }\n /**\n * Test whether a connection is dead.\n *\n * A dead connection has a `null` signal.\n */\n function isDeadConnection(connection) {\n return connection.signal === null;\n }\n})(Private || (Private = {}));\n\nexport { Signal, Stream };\n//# sourceMappingURL=index.es6.js.map\n","'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn Object.propertyIsEnumerable.call(target, symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.attributeNames = exports.elementNames = void 0;\nexports.elementNames = new Map([\n [\"altglyph\", \"altGlyph\"],\n [\"altglyphdef\", \"altGlyphDef\"],\n [\"altglyphitem\", \"altGlyphItem\"],\n [\"animatecolor\", \"animateColor\"],\n [\"animatemotion\", \"animateMotion\"],\n [\"animatetransform\", \"animateTransform\"],\n [\"clippath\", \"clipPath\"],\n [\"feblend\", \"feBlend\"],\n [\"fecolormatrix\", \"feColorMatrix\"],\n [\"fecomponenttransfer\", \"feComponentTransfer\"],\n [\"fecomposite\", \"feComposite\"],\n [\"feconvolvematrix\", \"feConvolveMatrix\"],\n [\"fediffuselighting\", \"feDiffuseLighting\"],\n [\"fedisplacementmap\", \"feDisplacementMap\"],\n [\"fedistantlight\", \"feDistantLight\"],\n [\"fedropshadow\", \"feDropShadow\"],\n [\"feflood\", \"feFlood\"],\n [\"fefunca\", \"feFuncA\"],\n [\"fefuncb\", \"feFuncB\"],\n [\"fefuncg\", \"feFuncG\"],\n [\"fefuncr\", \"feFuncR\"],\n [\"fegaussianblur\", \"feGaussianBlur\"],\n [\"feimage\", \"feImage\"],\n [\"femerge\", \"feMerge\"],\n [\"femergenode\", \"feMergeNode\"],\n [\"femorphology\", \"feMorphology\"],\n [\"feoffset\", \"feOffset\"],\n [\"fepointlight\", \"fePointLight\"],\n [\"fespecularlighting\", \"feSpecularLighting\"],\n [\"fespotlight\", \"feSpotLight\"],\n [\"fetile\", \"feTile\"],\n [\"feturbulence\", \"feTurbulence\"],\n [\"foreignobject\", \"foreignObject\"],\n [\"glyphref\", \"glyphRef\"],\n [\"lineargradient\", \"linearGradient\"],\n [\"radialgradient\", \"radialGradient\"],\n [\"textpath\", \"textPath\"],\n]);\nexports.attributeNames = new Map([\n [\"definitionurl\", \"definitionURL\"],\n [\"attributename\", \"attributeName\"],\n [\"attributetype\", \"attributeType\"],\n [\"basefrequency\", \"baseFrequency\"],\n [\"baseprofile\", \"baseProfile\"],\n [\"calcmode\", \"calcMode\"],\n [\"clippathunits\", \"clipPathUnits\"],\n [\"diffuseconstant\", \"diffuseConstant\"],\n [\"edgemode\", \"edgeMode\"],\n [\"filterunits\", \"filterUnits\"],\n [\"glyphref\", \"glyphRef\"],\n [\"gradienttransform\", \"gradientTransform\"],\n [\"gradientunits\", \"gradientUnits\"],\n [\"kernelmatrix\", \"kernelMatrix\"],\n [\"kernelunitlength\", \"kernelUnitLength\"],\n [\"keypoints\", \"keyPoints\"],\n [\"keysplines\", \"keySplines\"],\n [\"keytimes\", \"keyTimes\"],\n [\"lengthadjust\", \"lengthAdjust\"],\n [\"limitingconeangle\", \"limitingConeAngle\"],\n [\"markerheight\", \"markerHeight\"],\n [\"markerunits\", \"markerUnits\"],\n [\"markerwidth\", \"markerWidth\"],\n [\"maskcontentunits\", \"maskContentUnits\"],\n [\"maskunits\", \"maskUnits\"],\n [\"numoctaves\", \"numOctaves\"],\n [\"pathlength\", \"pathLength\"],\n [\"patterncontentunits\", \"patternContentUnits\"],\n [\"patterntransform\", \"patternTransform\"],\n [\"patternunits\", \"patternUnits\"],\n [\"pointsatx\", \"pointsAtX\"],\n [\"pointsaty\", \"pointsAtY\"],\n [\"pointsatz\", \"pointsAtZ\"],\n [\"preservealpha\", \"preserveAlpha\"],\n [\"preserveaspectratio\", \"preserveAspectRatio\"],\n [\"primitiveunits\", \"primitiveUnits\"],\n [\"refx\", \"refX\"],\n [\"refy\", \"refY\"],\n [\"repeatcount\", \"repeatCount\"],\n [\"repeatdur\", \"repeatDur\"],\n [\"requiredextensions\", \"requiredExtensions\"],\n [\"requiredfeatures\", \"requiredFeatures\"],\n [\"specularconstant\", \"specularConstant\"],\n [\"specularexponent\", \"specularExponent\"],\n [\"spreadmethod\", \"spreadMethod\"],\n [\"startoffset\", \"startOffset\"],\n [\"stddeviation\", \"stdDeviation\"],\n [\"stitchtiles\", \"stitchTiles\"],\n [\"surfacescale\", \"surfaceScale\"],\n [\"systemlanguage\", \"systemLanguage\"],\n [\"tablevalues\", \"tableValues\"],\n [\"targetx\", \"targetX\"],\n [\"targety\", \"targetY\"],\n [\"textlength\", \"textLength\"],\n [\"viewbox\", \"viewBox\"],\n [\"viewtarget\", \"viewTarget\"],\n [\"xchannelselector\", \"xChannelSelector\"],\n [\"ychannelselector\", \"yChannelSelector\"],\n [\"zoomandpan\", \"zoomAndPan\"],\n]);\n","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/*\n * Module dependencies\n */\nvar ElementType = __importStar(require(\"domelementtype\"));\nvar entities_1 = require(\"entities\");\n/**\n * Mixed-case SVG and MathML tags & attributes\n * recognized by the HTML parser.\n *\n * @see https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inforeign\n */\nvar foreignNames_1 = require(\"./foreignNames\");\nvar unencodedElements = new Set([\n \"style\",\n \"script\",\n \"xmp\",\n \"iframe\",\n \"noembed\",\n \"noframes\",\n \"plaintext\",\n \"noscript\",\n]);\n/**\n * Format attributes\n */\nfunction formatAttributes(attributes, opts) {\n if (!attributes)\n return;\n return Object.keys(attributes)\n .map(function (key) {\n var _a, _b;\n var value = (_a = attributes[key]) !== null && _a !== void 0 ? _a : \"\";\n if (opts.xmlMode === \"foreign\") {\n /* Fix up mixed-case attribute names */\n key = (_b = foreignNames_1.attributeNames.get(key)) !== null && _b !== void 0 ? _b : key;\n }\n if (!opts.emptyAttrs && !opts.xmlMode && value === \"\") {\n return key;\n }\n return key + \"=\\\"\" + (opts.decodeEntities !== false\n ? entities_1.encodeXML(value)\n : value.replace(/\"/g, \""\")) + \"\\\"\";\n })\n .join(\" \");\n}\n/**\n * Self-enclosing tags\n */\nvar singleTag = new Set([\n \"area\",\n \"base\",\n \"basefont\",\n \"br\",\n \"col\",\n \"command\",\n \"embed\",\n \"frame\",\n \"hr\",\n \"img\",\n \"input\",\n \"isindex\",\n \"keygen\",\n \"link\",\n \"meta\",\n \"param\",\n \"source\",\n \"track\",\n \"wbr\",\n]);\n/**\n * Renders a DOM node or an array of DOM nodes to a string.\n *\n * Can be thought of as the equivalent of the `outerHTML` of the passed node(s).\n *\n * @param node Node to be rendered.\n * @param options Changes serialization behavior\n */\nfunction render(node, options) {\n if (options === void 0) { options = {}; }\n var nodes = \"length\" in node ? node : [node];\n var output = \"\";\n for (var i = 0; i < nodes.length; i++) {\n output += renderNode(nodes[i], options);\n }\n return output;\n}\nexports.default = render;\nfunction renderNode(node, options) {\n switch (node.type) {\n case ElementType.Root:\n return render(node.children, options);\n case ElementType.Directive:\n case ElementType.Doctype:\n return renderDirective(node);\n case ElementType.Comment:\n return renderComment(node);\n case ElementType.CDATA:\n return renderCdata(node);\n case ElementType.Script:\n case ElementType.Style:\n case ElementType.Tag:\n return renderTag(node, options);\n case ElementType.Text:\n return renderText(node, options);\n }\n}\nvar foreignModeIntegrationPoints = new Set([\n \"mi\",\n \"mo\",\n \"mn\",\n \"ms\",\n \"mtext\",\n \"annotation-xml\",\n \"foreignObject\",\n \"desc\",\n \"title\",\n]);\nvar foreignElements = new Set([\"svg\", \"math\"]);\nfunction renderTag(elem, opts) {\n var _a;\n // Handle SVG / MathML in HTML\n if (opts.xmlMode === \"foreign\") {\n /* Fix up mixed-case element names */\n elem.name = (_a = foreignNames_1.elementNames.get(elem.name)) !== null && _a !== void 0 ? _a : elem.name;\n /* Exit foreign mode at integration points */\n if (elem.parent &&\n foreignModeIntegrationPoints.has(elem.parent.name)) {\n opts = __assign(__assign({}, opts), { xmlMode: false });\n }\n }\n if (!opts.xmlMode && foreignElements.has(elem.name)) {\n opts = __assign(__assign({}, opts), { xmlMode: \"foreign\" });\n }\n var tag = \"<\" + elem.name;\n var attribs = formatAttributes(elem.attribs, opts);\n if (attribs) {\n tag += \" \" + attribs;\n }\n if (elem.children.length === 0 &&\n (opts.xmlMode\n ? // In XML mode or foreign mode, and user hasn't explicitly turned off self-closing tags\n opts.selfClosingTags !== false\n : // User explicitly asked for self-closing tags, even in HTML mode\n opts.selfClosingTags && singleTag.has(elem.name))) {\n if (!opts.xmlMode)\n tag += \" \";\n tag += \"/>\";\n }\n else {\n tag += \">\";\n if (elem.children.length > 0) {\n tag += render(elem.children, opts);\n }\n if (opts.xmlMode || !singleTag.has(elem.name)) {\n tag += \"\";\n }\n }\n return tag;\n}\nfunction renderDirective(elem) {\n return \"<\" + elem.data + \">\";\n}\nfunction renderText(elem, opts) {\n var data = elem.data || \"\";\n // If entities weren't decoded, no need to encode them back\n if (opts.decodeEntities !== false &&\n !(!opts.xmlMode &&\n elem.parent &&\n unencodedElements.has(elem.parent.name))) {\n data = entities_1.encodeXML(data);\n }\n return data;\n}\nfunction renderCdata(elem) {\n return \"\";\n}\nfunction renderComment(elem) {\n return \"\";\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Doctype = exports.CDATA = exports.Tag = exports.Style = exports.Script = exports.Comment = exports.Directive = exports.Text = exports.Root = exports.isTag = exports.ElementType = void 0;\n/** Types of elements found in htmlparser2's DOM */\nvar ElementType;\n(function (ElementType) {\n /** Type for the root element of a document */\n ElementType[\"Root\"] = \"root\";\n /** Type for Text */\n ElementType[\"Text\"] = \"text\";\n /** Type for */\n ElementType[\"Directive\"] = \"directive\";\n /** Type for */\n ElementType[\"Comment\"] = \"comment\";\n /** Type for