aldehyde 0.2.258 → 0.2.259
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/controls/tree-select/navigation-tree.d.ts.map +1 -1
- package/lib/controls/tree-select/navigation-tree.js +4 -3
- package/lib/controls/tree-select/navigation-tree.js.map +1 -1
- package/lib/table/query-table.d.ts.map +1 -1
- package/lib/table/query-table.js +1 -1
- package/lib/table/query-table.js.map +1 -1
- package/lib/tmpl/interface.d.ts +1 -0
- package/lib/tmpl/interface.d.ts.map +1 -1
- package/lib/tmpl/interface.js.map +1 -1
- package/package.json +1 -1
- package/src/aldehyde/controls/tree-select/navigation-tree.tsx +5 -5
- package/src/aldehyde/table/query-table.tsx +0 -1
- package/src/aldehyde/tmpl/interface.tsx +1 -0
- package/dist/bundle.04a76d4f726f7257b62e.js +0 -2
- package/dist/bundle.04a76d4f726f7257b62e.js.LICENSE.txt +0 -5
- package/dist/bundle.04a76d4f726f7257b62e.js.gz +0 -0
- package/dist/bundle.0ba97fb9aed3256959a1.js +0 -75
- package/dist/bundle.0ba97fb9aed3256959a1.js.LICENSE.txt +0 -8
- package/dist/bundle.0ba97fb9aed3256959a1.js.gz +0 -0
- package/dist/bundle.0cdb895a99048cda0139.js +0 -1
- package/dist/bundle.0cdb895a99048cda0139.js.gz +0 -0
- package/dist/bundle.118048608e8ab47050ab.js +0 -1
- package/dist/bundle.118048608e8ab47050ab.js.gz +0 -0
- package/dist/bundle.22564bca4d0f6fbabf69.js +0 -1
- package/dist/bundle.22564bca4d0f6fbabf69.js.gz +0 -0
- package/dist/bundle.27227d2415dfad58bab4.js +0 -1
- package/dist/bundle.27227d2415dfad58bab4.js.gz +0 -0
- package/dist/bundle.334162ac2c2d6bf397cb.js +0 -2
- package/dist/bundle.334162ac2c2d6bf397cb.js.LICENSE.txt +0 -20
- package/dist/bundle.334162ac2c2d6bf397cb.js.gz +0 -0
- package/dist/bundle.3b6c5fe034cbb723c7f3.js +0 -1
- package/dist/bundle.3b6c5fe034cbb723c7f3.js.gz +0 -0
- package/dist/bundle.3f109b3f90f09c23e8d2.js +0 -2
- package/dist/bundle.3f109b3f90f09c23e8d2.js.LICENSE.txt +0 -1
- package/dist/bundle.3f109b3f90f09c23e8d2.js.gz +0 -0
- package/dist/bundle.420a3c4b880bec7c9395.js +0 -2
- package/dist/bundle.420a3c4b880bec7c9395.js.LICENSE.txt +0 -25
- package/dist/bundle.420a3c4b880bec7c9395.js.gz +0 -0
- package/dist/bundle.4b96ffe1f62e4f94c131.js +0 -1
- package/dist/bundle.4b96ffe1f62e4f94c131.js.gz +0 -0
- package/dist/bundle.4c54741832df8c763776.js +0 -1
- package/dist/bundle.4c54741832df8c763776.js.gz +0 -0
- package/dist/bundle.4e74b367562f2fcc557e.js +0 -2
- package/dist/bundle.4e74b367562f2fcc557e.js.LICENSE.txt +0 -1
- package/dist/bundle.4e74b367562f2fcc557e.js.gz +0 -0
- package/dist/bundle.51b107a74d3e9e38daaa.js +0 -2
- package/dist/bundle.51b107a74d3e9e38daaa.js.LICENSE.txt +0 -10
- package/dist/bundle.51b107a74d3e9e38daaa.js.gz +0 -0
- package/dist/bundle.548e656e773307824959.js +0 -1
- package/dist/bundle.548e656e773307824959.js.gz +0 -0
- package/dist/bundle.54b2a31d011f6c769e7c.js +0 -1
- package/dist/bundle.54b2a31d011f6c769e7c.js.gz +0 -0
- package/dist/bundle.593c12023e54a91e8a0b.js +0 -1
- package/dist/bundle.593c12023e54a91e8a0b.js.gz +0 -0
- package/dist/bundle.5ae6eceb7934e46e6d45.js +0 -13
- package/dist/bundle.5ae6eceb7934e46e6d45.js.gz +0 -0
- package/dist/bundle.5d22c4c1586e95424e26.js +0 -1
- package/dist/bundle.5d22c4c1586e95424e26.js.gz +0 -0
- package/dist/bundle.61f9eb72cb7b4666013c.js +0 -2
- package/dist/bundle.61f9eb72cb7b4666013c.js.LICENSE.txt +0 -16
- package/dist/bundle.61f9eb72cb7b4666013c.js.gz +0 -0
- package/dist/bundle.699d5561bf119bdb97fc.js +0 -1
- package/dist/bundle.699d5561bf119bdb97fc.js.gz +0 -0
- package/dist/bundle.6a7337d14083532e943d.js +0 -2
- package/dist/bundle.6a7337d14083532e943d.js.LICENSE.txt +0 -9
- package/dist/bundle.6a7337d14083532e943d.js.gz +0 -0
- package/dist/bundle.79831dc7a84e75f07975.js +0 -2
- package/dist/bundle.79831dc7a84e75f07975.js.LICENSE.txt +0 -14
- package/dist/bundle.79831dc7a84e75f07975.js.gz +0 -0
- package/dist/bundle.7dda8c43f58b4e01000d.js +0 -1
- package/dist/bundle.7dda8c43f58b4e01000d.js.gz +0 -0
- package/dist/bundle.84924d3443cdf0ef3a08.js +0 -2
- package/dist/bundle.84924d3443cdf0ef3a08.js.LICENSE.txt +0 -5
- package/dist/bundle.84924d3443cdf0ef3a08.js.gz +0 -0
- package/dist/bundle.866fb447979af51deaf0.js +0 -2
- package/dist/bundle.866fb447979af51deaf0.js.LICENSE.txt +0 -17
- package/dist/bundle.866fb447979af51deaf0.js.gz +0 -0
- package/dist/bundle.874b3f088098a51fe779.js +0 -1
- package/dist/bundle.874b3f088098a51fe779.js.gz +0 -0
- package/dist/bundle.8f008042855b35daf44f.js +0 -1
- package/dist/bundle.8f008042855b35daf44f.js.gz +0 -0
- package/dist/bundle.8fba396651ab9131e760.js +0 -2
- package/dist/bundle.8fba396651ab9131e760.js.LICENSE.txt +0 -22
- package/dist/bundle.8fba396651ab9131e760.js.gz +0 -0
- package/dist/bundle.a22410e1dd80ca8e1dad.js +0 -1
- package/dist/bundle.a22410e1dd80ca8e1dad.js.gz +0 -0
- package/dist/bundle.a26a56462550fc7dcb76.js +0 -2
- package/dist/bundle.a26a56462550fc7dcb76.js.LICENSE.txt +0 -5
- package/dist/bundle.a26a56462550fc7dcb76.js.gz +0 -0
- package/dist/bundle.b28c0f5f2d452df6637a.js +0 -1
- package/dist/bundle.b28c0f5f2d452df6637a.js.gz +0 -0
- package/dist/bundle.b59913b5eca7fc9cf658.js +0 -2
- package/dist/bundle.b59913b5eca7fc9cf658.js.LICENSE.txt +0 -50
- package/dist/bundle.b59913b5eca7fc9cf658.js.gz +0 -0
- package/dist/bundle.b5d9f43fb90d9c6b39a9.js +0 -2
- package/dist/bundle.b5d9f43fb90d9c6b39a9.js.LICENSE.txt +0 -8
- package/dist/bundle.b5d9f43fb90d9c6b39a9.js.gz +0 -0
- package/dist/bundle.c987651cbacb95e92e9a.js +0 -1
- package/dist/bundle.c987651cbacb95e92e9a.js.gz +0 -0
- package/dist/bundle.d67ab9f0b5662beefec1.js +0 -2
- package/dist/bundle.d67ab9f0b5662beefec1.js.LICENSE.txt +0 -9
- package/dist/bundle.d67ab9f0b5662beefec1.js.gz +0 -0
- package/dist/bundle.df15389f0df80bb5c1f8.js +0 -2
- package/dist/bundle.df15389f0df80bb5c1f8.js.LICENSE.txt +0 -8
- package/dist/bundle.df15389f0df80bb5c1f8.js.gz +0 -0
- package/dist/bundle.e9df92a889fa6911eb3a.js +0 -1
- package/dist/bundle.ebe7ebdb4845f80a5dd4.js +0 -2
- package/dist/bundle.ebe7ebdb4845f80a5dd4.js.LICENSE.txt +0 -7
- package/dist/bundle.ebe7ebdb4845f80a5dd4.js.gz +0 -0
- package/dist/bundle.f4c743816a267bced7bb.js +0 -1
- package/dist/bundle.f4c743816a267bced7bb.js.gz +0 -0
- package/dist/bundle.f6fe12d30504559f5f27.js +0 -2
- package/dist/bundle.f6fe12d30504559f5f27.js.LICENSE.txt +0 -6
- package/dist/bundle.f6fe12d30504559f5f27.js.gz +0 -0
- package/dist/css/chemstruc-graph-3996ceb0836a84cd2d4f.css +0 -12
- package/dist/css/chemstruc-graph-3996ceb0836a84cd2d4f.css.gz +0 -0
- package/dist/css/common-4fdc190a7145b69314ce.css +0 -56
- package/dist/css/html-editor-draft-5e8e152675ab7d201c00.css +0 -886
- package/dist/css/html-editor-draft-5e8e152675ab7d201c00.css.gz +0 -0
- package/dist/css/main-d4de6792432b484dddeb.css +0 -1169
- package/dist/css/main-d4de6792432b484dddeb.css.gz +0 -0
- package/dist/images/login-bg-027de94b.png +0 -0
- package/dist/images/welcome-8bf57aea.png +0 -0
- package/dist/index.html +0 -4
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/*! *****************************************************************************
|
|
2
|
-
Copyright (c) Microsoft Corporation.
|
|
3
|
-
|
|
4
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
-
purpose with or without fee is hereby granted.
|
|
6
|
-
|
|
7
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
-
***************************************************************************** */
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkaldehyde=self.webpackChunkaldehyde||[]).push([[112],{15874:function(e,t,n){n.d(t,{EI:function(){return D},KB:function(){return I},Lv:function(){return ae},Oh:function(){return B},SG:function(){return Se},WD:function(){return U},Xt:function(){return S},Yy:function(){return A},Zt:function(){return ve},_v:function(){return T},b_:function(){return j},bj:function(){return d},f7:function(){return G},jU:function(){return Ie},mv:function(){return p},mz:function(){return E},tp:function(){return P},y9:function(){return pe}});var o,r=n(90365),i=n(6585),s=n(1371),l=n(43720),a=n(97417);const c=new r.uY;const u=new r.uY;class f{constructor(e,t,n=[],o=""){this.data=e,this.name=o,i.$t.prototype.hasOwnProperty("tree")||Object.defineProperty(i.$t.prototype,"tree",{get(){return p(this)}}),this.parser=t,this.extension=[x.of(this),i.$t.languageData.of(((e,t,n)=>{let o=h(e,t,n),r=o.type.prop(c);if(!r)return[];let i=e.facet(r),s=o.type.prop(u);if(s){let r=o.resolve(t-o.from,n);for(let t of s)if(t.test(r,e)){let n=e.facet(t.facet);return"replace"==t.type?n:n.concat(i)}}return i}))].concat(n)}isActiveAt(e,t,n=-1){return h(e,t,n).type.prop(c)==this.data}findRegions(e){let t=e.facet(x);if((null==t?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],o=(e,t)=>{if(e.prop(c)==this.data)return void n.push({from:t,to:t+e.length});let i=e.prop(r.uY.mounted);if(i){if(i.tree.prop(c)==this.data){if(i.overlay)for(let e of i.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}if(i.overlay){let e=n.length;if(o(i.tree,i.overlay[0].from+t),n.length>e)return}}for(let n=0;n<e.children.length;n++){let i=e.children[n];i instanceof r.PH&&o(i,e.positions[n]+t)}};return o(p(e),0),n}get allowsNesting(){return!0}}function h(e,t,n){let o=e.facet(x),i=p(e).topNode;if(!o||o.allowsNesting)for(let e=i;e;e=e.enter(t,n,r.Qj.ExcludeBuffers))e.type.isTop&&(i=e);return i}f.setState=i.Pe.define();class d extends f{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(e){let t=(n=e.languageData,i.sj.define({combine:n?e=>e.concat(n):void 0}));var n;return new d(t,e.parser.configure({props:[c.add((e=>e.isTop?t:void 0))]}),e.name)}configure(e,t){return new d(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function p(e){let t=e.field(f.state,!1);return t?t.tree:r.PH.empty}class m{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 n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let g=null;class v{constructor(e,t,n=[],o,r,i,s,l){this.parser=e,this.state=t,this.fragments=n,this.tree=o,this.treeLen=r,this.viewport=i,this.skipped=s,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new v(e,t,[],r.PH.empty,0,n,[],null)}startParse(){return this.parser.startParse(new m(this.state.doc),this.fragments)}work(e,t){return null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=r.PH.empty&&this.isDone(null!=t?t:this.state.doc.length)?(this.takeTree(),!0):this.withContext((()=>{var n;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.state.doc.length&&this.parse.stopAt(t);;){let o=this.parse.advance();if(o){if(this.fragments=this.withoutTempSkipped(r.rr.addTree(o,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!==(n=this.parse.stoppedAt)&&void 0!==n?n:this.state.doc.length,this.tree=o,this.parse=null,!(this.treeLen<(null!=t?t:this.state.doc.length)))return!0;this.parse=this.startParse()}if(e())return!1}}))}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=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(r.rr.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=g;g=this;try{return e()}finally{g=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=y(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:o,treeLen:i,viewport:s,skipped:l}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges(((e,n,o,r)=>t.push({fromA:e,toA:n,fromB:o,toB:r}))),n=r.rr.applyChanges(n,t),o=r.PH.empty,i=0,s={from:e.mapPos(s.from,-1),to:e.mapPos(s.to,1)},this.skipped.length){l=[];for(let t of this.skipped){let n=e.mapPos(t.from,1),o=e.mapPos(t.to,-1);n<o&&l.push({from:n,to:o})}}}return new v(this.parser,t,n,o,i,s,l,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let t=0;t<this.skipped.length;t++){let{from:n,to:o}=this.skipped[t];n<e.to&&o>e.from&&(this.fragments=y(this.fragments,n,o),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 r.iX{createParse(t,n,o){let i=o[0].from,s=o[o.length-1].to;return{parsedPos:i,advance(){let t=g;if(t){for(let e of o)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=s,new r.PH(r.Z6.none,[],[],s-i)},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 g}}function y(e,t,n){return r.rr.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}class k{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),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new k(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=v.create(e.facet(x).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new k(n)}}f.state=i.sU.define({create:k.init,update(e,t){for(let e of t.effects)if(e.is(f.setState))return e.value;return t.startState.facet(x)!=t.state.facet(x)?k.init(t.state):e.apply(t)}});let b=e=>{let t=setTimeout((()=>e()),500);return()=>clearTimeout(t)};"undefined"!=typeof requestIdleCallback&&(b=e=>{let t=-1,n=setTimeout((()=>{t=requestIdleCallback(e,{timeout:400})}),100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});const w="undefined"!=typeof navigator&&(null===(o=navigator.scheduling)||void 0===o?void 0:o.isInputPending)?()=>navigator.scheduling.isInputPending():null,O=s.Z9.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(f.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(f.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=b(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:o}}=this.view,r=n.field(f.state);if(r.tree==r.context.tree&&r.context.isDone(o+1e5))return;let i=Date.now()+Math.min(this.chunkBudget,100,e&&!w?Math.max(25,e.timeRemaining()-5):1e9),s=r.context.treeLen<o&&n.doc.length>o+1e3,l=r.context.work((()=>w&&w()||Date.now()>i),o+(s?0:1e5));this.chunkBudget-=Date.now()-t,(l||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:f.setState.of(new k(r.context))})),this.chunkBudget>0&&(!l||s)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then((()=>this.scheduleWork())).catch((e=>(0,s.c_)(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()}}}),x=i.sj.define({combine(e){return e.length?e[0]:null},enables:e=>[f.state,O,s.Lz.contentAttributes.compute([e],(t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}}))]});class A{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const C=i.sj.define(),S=i.sj.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 P(e){let t=e.facet(S);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function D(e,t){let n="",o=e.tabSize,r=e.facet(S)[0];if("\t"==r){for(;t>=o;)n+="\t",t-=o;r=" "}for(let e=0;e<t;e++)n+=r;return n}function T(e,t){e instanceof i.$t&&(e=new I(e));for(let n of e.state.facet(C)){let o=n(e,t);if(void 0!==o)return o}let n=p(e.state);return n.length>=t?function(e,t,n){let o=t.resolveStack(n),r=t.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(r!=o.node){let e=[];for(let t=r;t&&(t.from!=o.node.from||t.type!=o.node.type);t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)o={node:e[t],next:o}}return M(o,e,n)}(e,n,t):null}class I{constructor(e,t={}){this.state=e,this.options=t,this.unit=P(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:o,simulateDoubleBreak:r}=this.options;return null!=o&&o>=n.from&&o<=n.to?r&&o==e?{text:"",from:e}:(t<0?o<e:o<=e)?{text:n.text.slice(o-n.from),from:o}:{text:n.text.slice(0,o-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:n,from:o}=this.lineAt(e,t);return n.slice(e-o,Math.min(n.length,e+100-o))}column(e,t=1){let{text:n,from:o}=this.lineAt(e,t),r=this.countColumn(n,e-o),i=this.options.overrideIndentation?this.options.overrideIndentation(o):-1;return i>-1&&(r+=i-this.countColumn(n,n.search(/\S|$/))),r}countColumn(e,t=e.length){return(0,i.y$)(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:o}=this.lineAt(e,t),r=this.options.overrideIndentation;if(r){let e=r(o);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const B=new r.uY;function M(e,t,n){for(let o=e;o;o=o.next){let e=Q(o.node);if(e)return e(L.create(t,n,o))}return 0}function Q(e){let t=e.type.prop(B);if(t)return t;let n,o=e.firstChild;if(o&&(n=o.type.prop(r.uY.closedBy))){let t=e.lastChild,o=t&&n.indexOf(t.name)>-1;return e=>function(e,t,n,o,r){let i=e.textAfter,s=i.match(/^\s*/)[0].length,l=o&&i.slice(s,s+o.length)==o||r==e.pos+s,a=t?function(e){let t=e.node,n=t.childAfter(t.from),o=t.lastChild;if(!n)return null;let r=e.options.simulateBreak,i=e.state.doc.lineAt(n.from),s=null==r||r<=i.from?i.to:Math.min(i.to,r);for(let e=n.to;;){let r=t.childAfter(e);if(!r||r==o)return null;if(!r.type.isSkipped){if(r.from>=s)return null;let e=/^ */.exec(i.text.slice(n.to-i.from))[0].length;return{from:n.from,to:n.to+e}}e=r.to}}(e):null;return a?l?e.column(a.from):e.column(a.to):e.baseIndent+(l?0:e.unit*n)}(e,!0,1,void 0,o&&!function(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}(e)?t.from:void 0)}return null==e.parent?R:null}function R(){return 0}class L extends I{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new L(e,t,n)}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 n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(_(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return M(this.context.next,this.base,this.pos)}}function _(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function E({except:e,units:t=1}={}){return n=>{let o=e&&e.test(n.textAfter);return n.baseIndent+(o?0:t*n.unit)}}const N=200;function U(){return i.$t.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 n=e.newDoc,{head:o}=e.newSelection.main,r=n.lineAt(o);if(o>r.from+N)return e;let i=n.sliceString(r.from,o);if(!t.some((e=>e.test(i))))return e;let{state:s}=e,l=-1,a=[];for(let{head:e}of s.selection.ranges){let t=s.doc.lineAt(e);if(t.from==l)continue;l=t.from;let n=T(s,t.from);if(null==n)continue;let o=/^\s*/.exec(t.text)[0],r=D(s,n);o!=r&&a.push({from:t.from,to:t.from+o.length,insert:r})}return a.length?[e,{changes:a,sequential:!0}]:e}))}const F=i.sj.define(),j=new r.uY;function z(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function $(e,t,n){for(let o of e.facet(F)){let r=o(e,t,n);if(r)return r}return function(e,t,n){let o=p(e);if(o.length<n)return null;let r=null;for(let i=o.resolveStack(n,1);i;i=i.next){let s=i.node;if(s.to<=n||s.from>n)continue;if(r&&s.from<t)break;let l=s.type.prop(j);if(l&&(s.to<o.length-50||o.length==e.doc.length||!z(s))){let o=l(s,e);o&&o.from<=n&&o.from>=t&&o.to>n&&(r=o)}}return r}(e,t,n)}function Z(e,t){let n=t.mapPos(e.from,1),o=t.mapPos(e.to,-1);return n>=o?void 0:{from:n,to:o}}const q=i.Pe.define({map:Z}),V=i.Pe.define({map:Z});function H(e){let t=[];for(let{head:n}of e.state.selection.ranges)t.some((e=>e.from<=n&&e.to>=n))||t.push(e.lineBlockAt(n));return t}const W=i.sU.define({create(){return s.NZ.none},update(e,t){e=e.map(t.changes);for(let n of t.effects)if(n.is(q)&&!J(e,n.value.from,n.value.to)){let{preparePlaceholder:o}=t.state.facet(te),r=o?s.NZ.replace({widget:new ie(o(t.state,n.value))}):re;e=e.update({add:[r.range(n.value.from,n.value.to)]})}else n.is(V)&&(e=e.update({filter:(e,t)=>n.value.from!=e||n.value.to!=t,filterFrom:n.value.from,filterTo:n.value.to}));if(t.selection){let n=!1,{head:o}=t.selection.main;e.between(o,o,((e,t)=>{e<o&&t>o&&(n=!0)})),n&&(e=e.update({filterFrom:o,filterTo:o,filter:(e,t)=>t<=o||e>=o}))}return e},provide:e=>s.Lz.decorations.from(e),toJSON(e,t){let n=[];return e.between(0,t.doc.length,((e,t)=>{n.push(e,t)})),n},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw new RangeError("Invalid JSON for fold state");let t=[];for(let n=0;n<e.length;){let o=e[n++],r=e[n++];if("number"!=typeof o||"number"!=typeof r)throw new RangeError("Invalid JSON for fold state");t.push(re.range(o,r))}return s.NZ.set(t,!0)}});function X(e,t,n){var o;let r=null;return null===(o=e.field(W,!1))||void 0===o||o.between(t,n,((e,t)=>{(!r||r.from>e)&&(r={from:e,to:t})})),r}function J(e,t,n){let o=!1;return e.between(t,t,((e,r)=>{e==t&&r==n&&(o=!0)})),o}function Y(e,t){return e.field(W,!1)?t:t.concat(i.Pe.appendConfig.of(ne()))}function K(e,t,n=!0){let o=e.state.doc.lineAt(t.from).number,r=e.state.doc.lineAt(t.to).number;return s.Lz.announce.of(`${e.state.phrase(n?"Folded lines":"Unfolded lines")} ${o} ${e.state.phrase("to")} ${r}.`)}const G=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:e=>{for(let t of H(e)){let n=$(e.state,t.from,t.to);if(n)return e.dispatch({effects:Y(e.state,[q.of(n),K(e,n)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:e=>{if(!e.state.field(W,!1))return!1;let t=[];for(let n of H(e)){let o=X(e.state,n.from,n.to);o&&t.push(V.of(o),K(e,o,!1))}return t.length&&e.dispatch({effects:t}),t.length>0}},{key:"Ctrl-Alt-[",run:e=>{let{state:t}=e,n=[];for(let o=0;o<t.doc.length;){let r=e.lineBlockAt(o),i=$(t,r.from,r.to);i&&n.push(q.of(i)),o=(i?e.lineBlockAt(i.to):r).to+1}return n.length&&e.dispatch({effects:Y(e.state,n)}),!!n.length}},{key:"Ctrl-Alt-]",run:e=>{let t=e.state.field(W,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,((e,t)=>{n.push(V.of({from:e,to:t}))})),e.dispatch({effects:n}),!0}}],ee={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},te=i.sj.define({combine(e){return(0,i.QR)(e,ee)}});function ne(e){let t=[W,ce];return e&&t.push(te.of(e)),t}function oe(e,t){let{state:n}=e,o=n.facet(te),r=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),o=X(e.state,n.from,n.to);o&&e.dispatch({effects:V.of(o)}),t.preventDefault()};if(o.placeholderDOM)return o.placeholderDOM(e,r,t);let i=document.createElement("span");return i.textContent=o.placeholderText,i.setAttribute("aria-label",n.phrase("folded code")),i.title=n.phrase("unfold"),i.className="cm-foldPlaceholder",i.onclick=r,i}const re=s.NZ.replace({widget:new class extends s.xO{toDOM(e){return oe(e,null)}}});class ie extends s.xO{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return oe(e,this.value)}}const se={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class le extends s.wJ{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 ae(e={}){let t=Object.assign(Object.assign({},se),e),n=new le(t,!0),o=new le(t,!1),r=s.Z9.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(x)!=e.state.facet(x)||e.startState.field(W,!1)!=e.state.field(W,!1)||p(e.startState)!=p(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new i.vB;for(let r of e.viewportLineBlocks){let i=X(e.state,r.from,r.to)?o:$(e.state,r.from,r.to)?n:null;i&&t.add(r.from,r.from,i)}return t.finish()}}),{domEventHandlers:l}=t;return[r,(0,s.cU)({class:"cm-foldGutter",markers(e){var t;return(null===(t=e.plugin(r))||void 0===t?void 0:t.markers)||i.om.empty},initialSpacer(){return new le(t,!1)},domEventHandlers:Object.assign(Object.assign({},l),{click:(e,t,n)=>{if(l.click&&l.click(e,t,n))return!0;let o=X(e.state,t.from,t.to);if(o)return e.dispatch({effects:V.of(o)}),!0;let r=$(e.state,t.from,t.to);return!!r&&(e.dispatch({effects:q.of(r)}),!0)}})}),ne()]}const ce=s.Lz.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 ue{constructor(e,t){let n;function o(e){let t=a.G.newName();return(n||(n=Object.create(null)))["."+t]=e,t}this.specs=e;const r="string"==typeof t.all?t.all:t.all?o(t.all):void 0,i=t.scope;this.scope=i instanceof f?e=>e.prop(c)==i.data:i?e=>e==i:void 0,this.style=(0,l.az)(e.map((e=>({tag:e.tag,class:e.class||o(Object.assign({},e,{tag:null}))}))),{all:r}).style,this.module=n?new a.G(n):null,this.themeType=t.themeType}static define(e,t){return new ue(e,t||{})}}const fe=i.sj.define(),he=i.sj.define({combine(e){return e.length?[e[0]]:null}});function de(e){let t=e.facet(fe);return t.length?t:e.facet(he)}function pe(e,t){let n,o=[ge];return e instanceof ue&&(e.module&&o.push(s.Lz.styleModule.of(e.module)),n=e.themeType),(null==t?void 0:t.fallback)?o.push(he.of(e)):n?o.push(fe.computeN([s.Lz.darkTheme],(t=>t.facet(s.Lz.darkTheme)==("dark"==n)?[e]:[]))):o.push(fe.of(e)),o}class me{constructor(e){this.markCache=Object.create(null),this.tree=p(e.state),this.decorations=this.buildDeco(e,de(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=p(e.state),n=de(e.state),o=n!=de(e.startState),{viewport:r}=e.view,i=e.changes.mapPos(this.decoratedTo,1);t.length<r.to&&!o&&t.type==this.tree.type&&i>=r.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=i):(t!=this.tree||e.viewportChanged||o)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=r.to)}buildDeco(e,t){if(!t||!this.tree.length)return s.NZ.none;let n=new i.vB;for(let{from:o,to:r}of e.visibleRanges)(0,l.DM)(this.tree,t,((e,t,o)=>{n.add(e,t,this.markCache[o]||(this.markCache[o]=s.NZ.mark({class:o})))}),o,r);return n.finish()}}const ge=i.Nb.high(s.Z9.fromClass(me,{decorations:e=>e.decorations})),ve=ue.define([{tag:l._A.meta,color:"#404740"},{tag:l._A.link,textDecoration:"underline"},{tag:l._A.heading,textDecoration:"underline",fontWeight:"bold"},{tag:l._A.emphasis,fontStyle:"italic"},{tag:l._A.strong,fontWeight:"bold"},{tag:l._A.strikethrough,textDecoration:"line-through"},{tag:l._A.keyword,color:"#708"},{tag:[l._A.atom,l._A.bool,l._A.url,l._A.contentSeparator,l._A.labelName],color:"#219"},{tag:[l._A.literal,l._A.inserted],color:"#164"},{tag:[l._A.string,l._A.deleted],color:"#a11"},{tag:[l._A.regexp,l._A.escape,l._A.special(l._A.string)],color:"#e40"},{tag:l._A.definition(l._A.variableName),color:"#00f"},{tag:l._A.local(l._A.variableName),color:"#30a"},{tag:[l._A.typeName,l._A.namespace],color:"#085"},{tag:l._A.className,color:"#167"},{tag:[l._A.special(l._A.variableName),l._A.macroName],color:"#256"},{tag:l._A.definition(l._A.propertyName),color:"#00c"},{tag:l._A.comment,color:"#940"},{tag:l._A.invalid,color:"#f00"}]),ye=s.Lz.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),ke=1e4,be="()[]{}",we=i.sj.define({combine(e){return(0,i.QR)(e,{afterCursor:!0,brackets:be,maxScanDistance:ke,renderMatch:Ae})}}),Oe=s.NZ.mark({class:"cm-matchingBracket"}),xe=s.NZ.mark({class:"cm-nonmatchingBracket"});function Ae(e){let t=[],n=e.matched?Oe:xe;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}const Ce=[i.sU.define({create(){return s.NZ.none},update(e,t){if(!t.docChanged&&!t.selection)return e;let n=[],o=t.state.facet(we);for(let e of t.state.selection.ranges){if(!e.empty)continue;let r=Ie(t.state,e.head,-1,o)||e.head>0&&Ie(t.state,e.head-1,1,o)||o.afterCursor&&(Ie(t.state,e.head,1,o)||e.head<t.state.doc.length&&Ie(t.state,e.head+1,-1,o));r&&(n=n.concat(o.renderMatch(r,t.state)))}return s.NZ.set(n,!0)},provide:e=>s.Lz.decorations.from(e)}),ye];function Se(e={}){return[we.of(e),Ce]}const Pe=new r.uY;function De(e,t,n){let o=e.prop(t<0?r.uY.openedBy:r.uY.closedBy);if(o)return o;if(1==e.name.length){let o=n.indexOf(e.name);if(o>-1&&o%2==(t<0?1:0))return[n[o+t]]}return null}function Te(e){let t=e.type.prop(Pe);return t?t(e.node):e}function Ie(e,t,n,o={}){let r=o.maxScanDistance||ke,i=o.brackets||be,s=p(e),l=s.resolveInner(t,n);for(let e=l;e;e=e.parent){let o=De(e.type,n,i);if(o&&e.from<e.to){let r=Te(e);if(r&&(n>0?t>=r.from&&t<r.to:t>r.from&&t<=r.to))return Be(0,0,n,e,r,o,i)}}return function(e,t,n,o,r,i,s){let l=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),a=s.indexOf(l);if(a<0||a%2==0!=n>0)return null;let c={from:n<0?t-1:t,to:n>0?t+1:t},u=e.doc.iterRange(t,n>0?e.doc.length:0),f=0;for(let e=0;!u.next().done&&e<=i;){let i=u.value;n<0&&(e+=i.length);let l=t+e*n;for(let e=n>0?0:i.length-1,t=n>0?i.length:-1;e!=t;e+=n){let t=s.indexOf(i[e]);if(!(t<0||o.resolveInner(l+e,1).type!=r))if(t%2==0==n>0)f++;else{if(1==f)return{start:c,end:{from:l+e,to:l+e+1},matched:t>>1==a>>1};f--}}n>0&&(e+=i.length)}return u.done?{start:c,matched:!1}:null}(e,t,n,s,l.type,r,i)}function Be(e,t,n,o,r,i,s){let l=o.parent,a={from:r.from,to:r.to},c=0,u=null==l?void 0:l.cursor();if(u&&(n<0?u.childBefore(o.from):u.childAfter(o.to)))do{if(n<0?u.to<=o.from:u.from>=o.to){if(0==c&&i.indexOf(u.type.name)>-1&&u.from<u.to){let e=Te(u);return{start:a,end:e?{from:e.from,to:e.to}:void 0,matched:!0}}if(De(u.type,n,s))c++;else if(De(u.type,-n,s)){if(0==c){let e=Te(u);return{start:a,end:e&&e.from<e.to?{from:e.from,to:e.to}:void 0,matched:!1}}c--}}}while(n<0?u.prevSibling():u.nextSibling());return{start:a,matched:!1}}const Me=Object.create(null),Qe=[r.Z6.none],Re=[],Le=Object.create(null),_e=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])_e[e]=Ne(Me,t);function Ee(e,t){Re.indexOf(e)>-1||(Re.push(e),console.warn(t))}function Ne(e,t){let n=[];for(let o of t.split(" ")){let t=[];for(let n of o.split(".")){let o=e[n]||l._A[n];o?"function"==typeof o?t.length?t=t.map(o):Ee(n,`Modifier ${n} used at start of tag`):t.length?Ee(n,`Tag ${n} used as modifier`):t=Array.isArray(o)?o:[o]:Ee(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let o=t.replace(/ /g,"_"),i=o+" "+n.map((e=>e.id)),s=Le[i];if(s)return s.id;let a=Le[i]=r.Z6.define({id:Qe.length,name:o,props:[(0,l.pn)({[o]:n})]});return Qe.push(a),a.id}s.OP.RTL,s.OP.LTR},47404:function(e,t,n){n.d(t,{Ar:function(){return c},Bc:function(){return re},OO:function(){return de},et:function(){return a},wm:function(){return K},yU:function(){return he}});var o=n(6585),r=n(1371),i=n(15874);class s{constructor(e,t,n,o){this.state=e,this.pos=t,this.explicit=n,this.view=o,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=(0,i.mv)(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),n=Math.max(t.from,this.pos-250),o=t.text.slice(n-t.from,this.pos-t.from),r=o.search(h(e,!1));return r<0?null:{from:n+r,to:this.pos,text:o.slice(r)}}get aborted(){return null==this.abortListeners}addEventListener(e,t,n){"abort"==e&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}}function l(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function a(e){let t=e.map((e=>"string"==typeof e?{label:e}:e)),[n,o]=t.every((e=>/^\w+$/.test(e.label)))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),n=Object.create(null);for(let{label:o}of e){t[o[0]]=!0;for(let e=1;e<o.length;e++)n[o[e]]=!0}let o=l(t)+l(n)+"*$";return[new RegExp("^"+o),new RegExp(o)]}(t);return e=>{let r=e.matchBefore(o);return r||e.explicit?{from:r?r.from:e.pos,options:t,validFor:n}:null}}function c(e,t){return n=>{for(let t=(0,i.mv)(n.state).resolveInner(n.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(n)}}class u{constructor(e,t,n,o){this.completion=e,this.source=t,this.match=n,this.score=o}}function f(e){return e.selection.main.from}function h(e,t){var n;let{source:o}=e,r=t&&"^"!=o[0],i="$"!=o[o.length-1];return r||i?new RegExp(`${r?"^":""}(?:${o})${i?"$":""}`,null!==(n=e.flags)&&void 0!==n?n:e.ignoreCase?"i":""):e}const d=o.YH.define(),p=new WeakMap;function m(e){if(!Array.isArray(e))return e;let t=p.get(e);return t||p.set(e,t=a(e)),t}const g=o.Pe.define(),v=o.Pe.define();class y{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<e.length;){let n=(0,o.vS)(e,t),r=(0,o.Fh)(n);this.chars.push(n);let i=e.slice(t,t+r),s=i.toUpperCase();this.folded.push((0,o.vS)(s==i?i.toLowerCase():s,0)),t+=r}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(0==this.pattern.length)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:r,precise:i,byWord:s}=this;if(1==t.length){let r=(0,o.vS)(e,0),i=(0,o.Fh)(r),s=i==e.length?0:-100;if(r==t[0]);else{if(r!=n[0])return null;s+=-200}return this.ret(s,[0,i])}let l=e.indexOf(this.pattern);if(0==l)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let a=t.length,c=0;if(l<0){for(let i=0,s=Math.min(e.length,200);i<s&&c<a;){let s=(0,o.vS)(e,i);s!=t[c]&&s!=n[c]||(r[c++]=i),i+=(0,o.Fh)(s)}if(c<a)return null}let u=0,f=0,h=!1,d=0,p=-1,m=-1,g=/[a-z]/.test(e),v=!0;for(let r=0,c=Math.min(e.length,200),y=0;r<c&&f<a;){let c=(0,o.vS)(e,r);l<0&&(u<a&&c==t[u]&&(i[u++]=r),d<a&&(c==t[d]||c==n[d]?(0==d&&(p=r),m=r+1,d++):d=0));let k,b=c<255?c>=48&&c<=57||c>=97&&c<=122?2:c>=65&&c<=90?1:0:(k=(0,o.MK)(c))!=k.toLowerCase()?1:k!=k.toUpperCase()?2:0;(!r||1==b&&g||0==y&&0!=b)&&(t[f]==c||n[f]==c&&(h=!0)?s[f++]=r:s.length&&(v=!1)),y=b,r+=(0,o.Fh)(c)}return f==a&&0==s[0]&&v?this.result((h?-200:0)-100,s,e):d==a&&0==p?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):l>-1?this.ret(-700-e.length,[l,l+this.pattern.length]):d==a?this.ret(-900-e.length,[p,m]):f==a?this.result((h?-200:0)-100-700+(v?0:-1100),s,e):2==t.length?null:this.result((r[0]?-700:0)-200-1100,r,e)}result(e,t,n){let r=[],i=0;for(let e of t){let t=e+(this.astral?(0,o.Fh)((0,o.vS)(n,e)):1);i&&r[i-1]==e?r[i-1]=t:(r[i++]=e,r[i++]=t)}return this.ret(e-n.length,r)}}class k{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return null==n?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}}const b=o.sj.define({combine(e){return(0,o.QR)(e,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:O,filterStrict:!1,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)=>n=>w(e(n),t(n)),optionClass:(e,t)=>n=>w(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function w(e,t){return e?t?e+" "+t:e:t}function O(e,t,n,o,i,s){let l,a,c=e.textDirection==r.OP.RTL,u=c,f=!1,h="top",d=t.left-i.left,p=i.right-t.right,m=o.right-o.left,g=o.bottom-o.top;if(u&&d<Math.min(m,p)?u=!1:!u&&p<Math.min(m,d)&&(u=!0),m<=(u?d:p))l=Math.max(i.top,Math.min(n.top,i.bottom-g))-t.top,a=Math.min(400,u?d:p);else{f=!0,a=Math.min(400,(c?t.right:i.right-t.left)-30);let e=i.bottom-t.bottom;e>=g||e>t.top?l=n.bottom-t.top:(h="bottom",l=t.bottom-n.top)}return{style:`${h}: ${l/((t.bottom-t.top)/s.offsetHeight)}px; max-width: ${a/((t.right-t.left)/s.offsetWidth)}px`,class:"cm-completionInfo-"+(f?c?"left-narrow":"right-narrow":u?"left":"right")}}function x(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let o=Math.floor((e-t)/n);return{from:e-(o+1)*n,to:e-o*n}}class A{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass="";let o=e.state.field(t),{options:r,selected:i}=o.open,s=e.state.facet(b);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,n,o){let r=document.createElement("span");r.className="cm-completionLabel";let i=e.displayLabel||e.label,s=0;for(let e=0;e<o.length;){let t=o[e++],n=o[e++];t>s&&r.appendChild(document.createTextNode(i.slice(s,t)));let l=r.appendChild(document.createElement("span"));l.appendChild(document.createTextNode(i.slice(t,n))),l.className="cm-completionMatchedText",s=n}return s<i.length&&r.appendChild(document.createTextNode(i.slice(s))),r},position:50},{render(e){if(!e.detail)return null;let t=document.createElement("span");return t.className="cm-completionDetail",t.textContent=e.detail,t},position:80}),t.sort(((e,t)=>e.position-t.position)).map((e=>e.render))}(s),this.optionClass=s.optionClass,this.tooltipClass=s.tooltipClass,this.range=x(r.length,i,s.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",(n=>{let{options:o}=e.state.field(t).open;for(let t,r=n.target;r&&r!=this.dom;r=r.parentNode)if("LI"==r.nodeName&&(t=/-(\d+)$/.exec(r.id))&&+t[1]<o.length)return this.applyCompletion(e,o[+t[1]]),void n.preventDefault()})),this.dom.addEventListener("focusout",(t=>{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(b).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:v.of(null)})})),this.showOptions(r,o.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 n=e.state.field(this.stateField),o=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=o){let{options:r,selected:i,disabled:s}=n.open;o.open&&o.open.options==r||(this.range=x(r.length,i,e.state.facet(b).maxRenderedOptions),this.showOptions(r,n.id)),this.updateSel(),s!=(null===(t=o.open)||void 0===t?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!s)}}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.from||t.selected>=this.range.to)&&(this.range=x(t.options.length,t.selected,this.view.state.facet(b).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:n}=t.options[t.selected],{info:o}=n;if(!o)return;let i="string"==typeof o?document.createTextNode(o):o(n);if(!i)return;"then"in i?i.then((t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,n)})).catch((e=>(0,r.c_)(this.view.state,e,"completion info"))):this.addInfoPane(i,n)}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",null!=e.nodeType)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:o}=e;n.appendChild(t),this.infoDestroy=o||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,o=this.range.from;n;n=n.nextSibling,o++)"LI"==n.nodeName&&n.id?o==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected"):o--;return t&&function(e,t){let n=e.getBoundingClientRect(),o=t.getBoundingClientRect(),r=n.height/e.offsetHeight;o.top<n.top?e.scrollTop-=(n.top-o.top)/r:o.bottom>n.bottom&&(e.scrollTop+=(o.bottom-n.bottom)/r)}(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),o=e.getBoundingClientRect(),r=this.space;if(!r){let e=this.dom.ownerDocument.documentElement;r={left:0,top:0,right:e.clientWidth,bottom:e.clientHeight}}return o.top>Math.min(r.bottom,t.bottom)-10||o.bottom<Math.max(r.top,t.top)+10?null:this.view.state.facet(b).positionInfo(this.view,t,o,n,r,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,n){const o=document.createElement("ul");o.id=t,o.setAttribute("role","listbox"),o.setAttribute("aria-expanded","true"),o.setAttribute("aria-label",this.view.state.phrase("Completions")),o.addEventListener("mousedown",(e=>{e.target==o&&e.preventDefault()}));let r=null;for(let i=n.from;i<n.to;i++){let{completion:s,match:l}=e[i],{section:a}=s;if(a){let e="string"==typeof a?a:a.name;e!=r&&(i>n.from||0==n.from)&&(r=e,"string"!=typeof a&&a.header?o.appendChild(a.header(a)):o.appendChild(document.createElement("completion-section")).textContent=e)}const c=o.appendChild(document.createElement("li"));c.id=t+"-"+i,c.setAttribute("role","option");let u=this.optionClass(s);u&&(c.className=u);for(let e of this.optionContent){let t=e(s,this.view.state,this.view,l);t&&c.appendChild(t)}}return n.from&&o.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&o.classList.add("cm-completionListIncompleteBottom"),o}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function C(e,t){return n=>new A(n,e,t)}function S(e){return 100*(e.boost||0)+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}class P{constructor(e,t,n,o,r,i){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=o,this.selected=r,this.disabled=i}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new P(this.options,B(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,o,r,i){if(o&&!i&&e.some((e=>e.isPending)))return o.setDisabled();let s=function(e,t){let n=[],o=null,r=e=>{n.push(e);let{section:t}=e.completion;if(t){o||(o=[]);let e="string"==typeof t?t:t.name;o.some((t=>t.name==e))||o.push("string"==typeof t?{name:e}:t)}},i=t.facet(b);for(let o of e)if(o.hasResult()){let e=o.result.getMatch;if(!1===o.result.filter)for(let t of o.result.options)r(new u(t,o.source,e?e(t):[],1e9-n.length));else{let n,s=t.sliceDoc(o.from,o.to),l=i.filterStrict?new k(s):new y(s);for(let t of o.result.options)if(n=l.match(t.label)){let i=t.displayLabel?e?e(t,n.matched):[]:n.matched;r(new u(t,o.source,i,n.score+(t.boost||0)))}}}if(o){let e=Object.create(null),t=0,r=(e,t)=>{var n,o;return(null!==(n=e.rank)&&void 0!==n?n:1e9)-(null!==(o=t.rank)&&void 0!==o?o:1e9)||(e.name<t.name?-1:1)};for(let n of o.sort(r))t-=1e5,e[n.name]=t;for(let t of n){let{section:n}=t.completion;n&&(t.score+=e["string"==typeof n?n:n.name])}}let s=[],l=null,a=i.compareCompletions;for(let e of n.sort(((e,t)=>t.score-e.score||a(e.completion,t.completion)))){let t=e.completion;!l||l.label!=t.label||l.detail!=t.detail||null!=l.type&&null!=t.type&&l.type!=t.type||l.apply!=t.apply||l.boost!=t.boost?s.push(e):S(e.completion)>S(l)&&(s[s.length-1]=e),l=e.completion}return s}(e,t);if(!s.length)return o&&e.some((e=>e.isPending))?o.setDisabled():null;let l=t.facet(b).selectOnOpen?0:-1;if(o&&o.selected!=l&&-1!=o.selected){let e=o.options[o.selected].completion;for(let t=0;t<s.length;t++)if(s[t].completion==e){l=t;break}}return new P(s,B(n,l),{pos:e.reduce(((e,t)=>t.hasResult()?Math.min(e,t.from):e),1e8),create:F,above:r.aboveCursor},o?o.timestamp:Date.now(),l,!1)}map(e){return new P(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new P(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class D{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new D(M,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,n=t.facet(b),o=(n.override||t.languageDataAt("autocomplete",f(t)).map(m)).map((t=>(this.active.find((e=>e.source==t))||new R(t,this.active.some((e=>0!=e.state))?1:0)).update(e,n)));o.length==this.active.length&&o.every(((e,t)=>e==this.active[t]))&&(o=this.active);let r=this.open,i=e.effects.some((e=>e.is(_)));r&&e.docChanged&&(r=r.map(e.changes)),e.selection||o.some((t=>t.hasResult()&&e.changes.touchesRange(t.from,t.to)))||!function(e,t){if(e==t)return!0;for(let n=0,o=0;;){for(;n<e.length&&!e[n].hasResult();)n++;for(;o<t.length&&!t[o].hasResult();)o++;let r=n==e.length,i=o==t.length;if(r||i)return r==i;if(e[n++].result!=t[o++].result)return!1}}(o,this.active)||i?r=P.build(o,t,this.id,r,n,i):r&&r.disabled&&!o.some((e=>e.isPending))&&(r=null),!r&&o.every((e=>!e.isPending))&&o.some((e=>e.hasResult()))&&(o=o.map((e=>e.hasResult()?new R(e.source,0):e)));for(let t of e.effects)t.is(E)&&(r=r&&r.setSelected(t.value,this.id));return o==this.active&&r==this.open?this:new D(o,this.id,r)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?T:I}}const T={"aria-autocomplete":"list"},I={};function B(e,t){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(n["aria-activedescendant"]=e+"-"+t),n}const M=[];function Q(e,t){if(e.isUserEvent("input.complete")){let n=e.annotation(d);if(n&&t.activateOnCompletion(n))return 12}let n=e.isUserEvent("input.type");return n&&t.activateOnTyping?5:n?1:e.isUserEvent("delete.backward")?2:e.selection?8:e.docChanged?16:0}class R{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return 1==this.state}update(e,t){let n=Q(e,t),o=this;(8&n||16&n&&this.touches(e))&&(o=new R(o.source,0)),4&n&&0==o.state&&(o=new R(this.source,1)),o=o.updateFor(e,n);for(let t of e.effects)if(t.is(g))o=new R(o.source,1,t.value);else if(t.is(v))o=new R(o.source,0);else if(t.is(_))for(let e of t.value)e.source==o.source&&(o=e);return o}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(f(e.state))}}class L extends R{constructor(e,t,n,o,r,i){super(e,3,t),this.limit=n,this.result=o,this.from=r,this.to=i}hasResult(){return!0}updateFor(e,t){var n;if(!(3&t))return this.map(e.changes);let o=this.result;o.map&&!e.changes.empty&&(o=o.map(o,e.changes));let r=e.changes.mapPos(this.from),i=e.changes.mapPos(this.to,1),l=f(e.state);if(l>i||!o||2&t&&(f(e.startState)==this.from||l<this.limit))return new R(this.source,4&t?1:0);let a=e.changes.mapPos(this.limit);return function(e,t,n,o){if(!e)return!1;let r=t.sliceDoc(n,o);return"function"==typeof e?e(r,n,o,t):h(e,!0).test(r)}(o.validFor,e.state,r,i)?new L(this.source,this.explicit,a,o,r,i):o.update&&(o=o.update(o,r,i,new s(e.state,l,!1)))?new L(this.source,this.explicit,a,o,o.from,null!==(n=o.to)&&void 0!==n?n:f(e.state)):new R(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new L(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new R(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}const _=o.Pe.define({map(e,t){return e.map((e=>e.map(t)))}}),E=o.Pe.define(),N=o.sU.define({create(){return D.start()},update(e,t){return e.update(t)},provide:e=>[r.DK.from(e,(e=>e.tooltip)),r.Lz.contentAttributes.from(e,(e=>e.attrs))]});function U(e,t){const n=t.completion.apply||t.completion.label;let r=e.state.field(N).active.find((e=>e.source==t.source));return r instanceof L&&("string"==typeof n?e.dispatch(Object.assign(Object.assign({},function(e,t,n,r){let{main:i}=e.selection,s=n-i.from,l=r-i.from;return Object.assign(Object.assign({},e.changeByRange((a=>{if(a!=i&&n!=r&&e.sliceDoc(a.from+s,a.from+l)!=e.sliceDoc(n,r))return{range:a};let c=e.toText(t);return{changes:{from:a.from+s,to:r==i.from?a.to:a.from+l,insert:c},range:o.OF.cursor(a.from+s+c.length)}}))),{scrollIntoView:!0,userEvent:"input.complete"})}(e.state,n,r.from,r.to)),{annotations:d.of(t.completion)})):n(e,t.completion,r.from,r.to),!0)}const F=C(N,U);function j(e,t="option"){return n=>{let o=n.state.field(N,!1);if(!o||!o.open||o.open.disabled||Date.now()-o.open.timestamp<n.state.facet(b).interactionDelay)return!1;let i,s=1;"page"==t&&(i=(0,r.Eg)(n,o.open.tooltip))&&(s=Math.max(2,Math.floor(i.dom.offsetHeight/i.dom.querySelector("li").offsetHeight)-1));let{length:l}=o.open.options,a=o.open.selected>-1?o.open.selected+s*(e?1:-1):e?0:l-1;return a<0?a="page"==t?0:l-1:a>=l&&(a="page"==t?l-1:0),n.dispatch({effects:E.of(a)}),!0}}const z=e=>!!e.state.field(N,!1)&&(e.dispatch({effects:g.of(!0)}),!0);class ${constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const Z=r.Z9.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(N).active)t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(N),n=e.state.facet(b);if(!e.selectionSet&&!e.docChanged&&e.startState.field(N)==t)return;let o=e.transactions.some((e=>{let t=Q(e,n);return 8&t||(e.selection||e.docChanged)&&!(3&t)}));for(let t=0;t<this.running.length;t++){let n=this.running[t];if(o||n.context.abortOnDocChange&&e.docChanged||n.updates.length+e.transactions.length>50&&Date.now()-n.time>1e3){for(let e of n.context.abortListeners)try{e()}catch(e){(0,r.c_)(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some((e=>e.effects.some((e=>e.is(g)))))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some((e=>e.isPending&&!this.running.some((t=>t.active.source==e.source))))?setTimeout((()=>this.startUpdate()),i):-1,0!=this.composing)for(let t of e.transactions)t.isUserEvent("input.type")?this.composing=2:2==this.composing&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(N);for(let e of t.active)e.isPending&&!this.running.some((t=>t.active.source==e.source))&&this.startQuery(e);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(b).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=f(t),o=new s(t,n,e.explicit,this.view),i=new $(e,o);this.running.push(i),Promise.resolve(e.source(o)).then((e=>{i.context.aborted||(i.done=e||null,this.scheduleAccept())}),(e=>{this.view.dispatch({effects:v.of(null)}),(0,r.c_)(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(b).updateSyncTime))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],n=this.view.state.facet(b),o=this.view.state.field(N);for(let r=0;r<this.running.length;r++){let i=this.running[r];if(void 0===i.done)continue;if(this.running.splice(r--,1),i.done){let o=f(i.updates.length?i.updates[0].startState:this.view.state),r=Math.min(o,i.done.from+(i.active.explicit?0:1)),s=new L(i.active.source,i.active.explicit,r,i.done,i.done.from,null!==(e=i.done.to)&&void 0!==e?e:o);for(let e of i.updates)s=s.update(e,n);if(s.hasResult()){t.push(s);continue}}let s=o.active.find((e=>e.source==i.active.source));if(s&&s.isPending)if(null==i.done){let e=new R(i.active.source,0);for(let t of i.updates)e=e.update(t,n);e.isPending||t.push(e)}else this.startQuery(s)}(t.length||o.open&&o.open.disabled)&&this.view.dispatch({effects:_.of(t)})}},{eventHandlers:{blur(e){let t=this.view.state.field(N,!1);if(t&&t.tooltip&&this.view.state.facet(b).closeOnBlur){let n=t.open&&(0,r.Eg)(this.view,t.open.tooltip);n&&n.dom.contains(e.relatedTarget)||setTimeout((()=>this.view.dispatch({effects:v.of(null)})),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:g.of(!1)})),20),this.composing=0}}}),q="object"==typeof navigator&&/Win/.test(navigator.platform),V=o.Nb.highest(r.Lz.domEventHandlers({keydown(e,t){let n=t.state.field(N,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&(!q||!e.altKey)||e.metaKey)return!1;let o=n.open.options[n.open.selected],r=n.active.find((e=>e.source==o.source)),i=o.completion.commitCharacters||r.result.commitCharacters;return i&&i.indexOf(e.key)>-1&&U(t,o),!1}})),H=r.Lz.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",whiteSpace:"pre-line"},".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"}}}),W={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},X=o.Pe.define({map(e,t){let n=t.mapPos(e,-1,o.iR.TrackAfter);return null==n?void 0:n}}),J=new class extends o.FB{};J.startSide=1,J.endSide=-1;const Y=o.sU.define({create(){return o.om.empty},update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(X)&&(e=e.update({add:[J.range(n.value,n.value+1)]}));return e}});function K(){return[oe,Y]}const G="()[]{}<>«»»«[]{}";function ee(e){for(let t=0;t<16;t+=2)if(G.charCodeAt(t)==e)return G.charAt(t+1);return(0,o.MK)(e<128?e:e+1)}function te(e,t){return e.languageDataAt("closeBrackets",t)[0]||W}const ne="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),oe=r.Lz.inputHandler.of(((e,t,n,r)=>{if((ne?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let i=e.state.selection.main;if(r.length>2||2==r.length&&1==(0,o.Fh)((0,o.vS)(r,0))||t!=i.from||n!=i.to)return!1;let s=function(e,t){let n=te(e,e.selection.main.head),r=n.brackets||W.brackets;for(let i of r){let s=ee((0,o.vS)(i,0));if(t==i)return s==i?ce(e,i,r.indexOf(i+i+i)>-1,n):le(e,i,s,n.before||W.before);if(t==s&&ie(e,e.selection.main.from))return ae(e,0,s)}return null}(e.state,r);return!!s&&(e.dispatch(s),!0)})),re=[{key:"Backspace",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=te(e,e.selection.main.head).brackets||W.brackets,r=null,i=e.changeByRange((t=>{if(t.empty){let r=function(e,t){let n=e.sliceString(t-2,t);return(0,o.Fh)((0,o.vS)(n,0))==n.length?n:n.slice(1)}(e.doc,t.head);for(let i of n)if(i==r&&se(e.doc,t.head)==ee((0,o.vS)(i,0)))return{changes:{from:t.head-i.length,to:t.head+i.length},range:o.OF.cursor(t.head-i.length)}}return{range:r=t}}));return r||t(e.update(i,{scrollIntoView:!0,userEvent:"delete.backward"})),!r}}];function ie(e,t){let n=!1;return e.field(Y).between(0,e.doc.length,(e=>{e==t&&(n=!0)})),n}function se(e,t){let n=e.sliceString(t,t+2);return n.slice(0,(0,o.Fh)((0,o.vS)(n,0)))}function le(e,t,n,r){let i=null,s=e.changeByRange((s=>{if(!s.empty)return{changes:[{insert:t,from:s.from},{insert:n,from:s.to}],effects:X.of(s.to+t.length),range:o.OF.range(s.anchor+t.length,s.head+t.length)};let l=se(e.doc,s.head);return!l||/\s/.test(l)||r.indexOf(l)>-1?{changes:{insert:t+n,from:s.head},effects:X.of(s.head+t.length),range:o.OF.cursor(s.head+t.length)}:{range:i=s}}));return i?null:e.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function ae(e,t,n){let r=null,i=e.changeByRange((t=>t.empty&&se(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:o.OF.cursor(t.head+n.length)}:r={range:t}));return r?null:e.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function ce(e,t,n,r){let s=r.stringPrefixes||W.stringPrefixes,l=null,a=e.changeByRange((r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:X.of(r.to+t.length),range:o.OF.range(r.anchor+t.length,r.head+t.length)};let a,c=r.head,u=se(e.doc,c);if(u==t){if(ue(e,c))return{changes:{insert:t+t,from:c},effects:X.of(c+t.length),range:o.OF.cursor(c+t.length)};if(ie(e,c)){let r=n&&e.sliceDoc(c,c+3*t.length)==t+t+t?t+t+t:t;return{changes:{from:c,to:c+r.length,insert:r},range:o.OF.cursor(c+r.length)}}}else{if(n&&e.sliceDoc(c-2*t.length,c)==t+t&&(a=fe(e,c-2*t.length,s))>-1&&ue(e,a))return{changes:{insert:t+t+t+t,from:c},effects:X.of(c+t.length),range:o.OF.cursor(c+t.length)};if(e.charCategorizer(c)(u)!=o.Je.Word&&fe(e,c,s)>-1&&!function(e,t,n,o){let r=(0,i.mv)(e).resolveInner(t,-1),s=o.reduce(((e,t)=>Math.max(e,t.length)),0);for(let i=0;i<5;i++){let i=e.sliceDoc(r.from,Math.min(r.to,r.from+n.length+s)),l=i.indexOf(n);if(!l||l>-1&&o.indexOf(i.slice(0,l))>-1){let t=r.firstChild;for(;t&&t.from==r.from&&t.to-t.from>n.length+l;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let a=r.to==t&&r.parent;if(!a)break;r=a}return!1}(e,c,t,s))return{changes:{insert:t+t,from:c},effects:X.of(c+t.length),range:o.OF.cursor(c+t.length)}}return{range:l=r}}));return l?null:e.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function ue(e,t){let n=(0,i.mv)(e).resolveInner(t+1);return n.parent&&n.from==t}function fe(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=o.Je.Word)return t;for(let i of n){let n=t-i.length;if(e.sliceDoc(n,t)==i&&r(e.sliceDoc(n-1,n))!=o.Je.Word)return n}return-1}function he(e={}){return[V,N,b.of(e),Z,pe,H]}const de=[{key:"Ctrl-Space",run:z},{mac:"Alt-`",run:z},{key:"Escape",run:e=>{let t=e.state.field(N,!1);return!(!t||!t.active.some((e=>0!=e.state))||(e.dispatch({effects:v.of(null)}),0))}},{key:"ArrowDown",run:j(!0)},{key:"ArrowUp",run:j(!1)},{key:"PageDown",run:j(!0,"page")},{key:"PageUp",run:j(!1,"page")},{key:"Enter",run:e=>{let t=e.state.field(N,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(b).interactionDelay)&&U(e,t.open.options[t.open.selected])}}],pe=o.Nb.highest(r.w4.computeN([b],(e=>e.facet(b).defaultKeymap?[de]:[])))},49075:function(e,t,n){n.d(t,{ll:function(){return U}});var o=n(15874),r=n(43720),i=n(48820),s=n(47404);const l=20,a=21;function c(e){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57}function u(e,t,n){for(let o=!1;;){if(e.next<0)return;if(e.next==t&&!o)return void e.advance();o=n&&!o&&92==e.next,e.advance()}}function f(e,t){for(;95==e.next||c(e.next);)null!=t&&(t+=String.fromCharCode(e.next)),e.advance();return t}function h(e,t){for(;48==e.next||49==e.next;)e.advance();t&&e.next==t&&e.advance()}function d(e,t){for(;;){if(46==e.next){if(t)break;t=!0}else if(e.next<48||e.next>57)break;e.advance()}if(69==e.next||101==e.next)for(e.advance(),43!=e.next&&45!=e.next||e.advance();e.next>=48&&e.next<=57;)e.advance()}function p(e){for(;!(e.next<0||10==e.next);)e.advance()}function m(e,t){for(let n=0;n<t.length;n++)if(t.charCodeAt(n)==e)return!0;return!1}const g=" \t\r\n";function v(e,t,n){let o=Object.create(null);o.true=o.false=5,o.null=o.unknown=6;for(let t of e.split(" "))t&&(o[t]=l);for(let e of t.split(" "))e&&(o[e]=a);for(let e of(n||"").split(" "))e&&(o[e]=24);return o}const y={backslashEscapes:!1,hashComments:!1,spaceAfterDashes:!1,slashComments:!1,doubleQuotedStrings:!1,doubleDollarQuotedStrings:!1,unquotedBitLiterals:!1,treatBitsAsBytes:!1,charSetCasts:!1,plsqlQuotingMechanism:!1,operatorChars:"*+-%<>!=&|~^/",specialVar:"?",identifierQuotes:'"',caseInsensitiveIdentifiers:!1,words:v("absolute action add after all allocate alter and any are as asc assertion at authorization before begin between both breadth by call cascade cascaded case cast catalog check close collate collation column commit condition connect connection constraint constraints constructor continue corresponding count create cross cube current current_date current_default_transform_group current_transform_group_for_type current_path current_role current_time current_timestamp current_user cursor cycle data day deallocate declare default deferrable deferred delete depth deref desc describe descriptor deterministic diagnostics disconnect distinct do domain drop dynamic each else elseif end end-exec equals escape except exception exec execute exists exit external fetch first for foreign found from free full function general get global go goto grant group grouping handle having hold hour identity if immediate in indicator initially inner inout input insert intersect into is isolation join key language last lateral leading leave left level like limit local localtime localtimestamp locator loop map match method minute modifies module month names natural nesting new next no none not of old on only open option or order ordinality out outer output overlaps pad parameter partial path prepare preserve primary prior privileges procedure public read reads recursive redo ref references referencing relative release repeat resignal restrict result return returns revoke right role rollback rollup routine row rows savepoint schema scroll search second section select session session_user set sets signal similar size some space specific specifictype sql sqlexception sqlstate sqlwarning start state static system_user table temporary then timezone_hour timezone_minute to trailing transaction translation treat trigger under undo union unique unnest until update usage user using value values view when whenever where while with without work write year zone ","array binary bit boolean char character clob date decimal double float int integer interval large national nchar nclob numeric object precision real smallint time timestamp varchar varying ")};function k(e){return new i.Lu((t=>{var n;let{next:o}=t;if(t.advance(),m(o,g)){for(;m(t.next,g);)t.advance();t.acceptToken(36)}else if(36==o&&e.doubleDollarQuotedStrings){let e=f(t,"");36==t.next&&(t.advance(),function(e,t){e:for(;;){if(e.next<0)return;if(36==e.next){e.advance();for(let n=0;n<t.length;n++){if(e.next!=t.charCodeAt(n))continue e;e.advance()}if(36==e.next)return void e.advance()}else e.advance()}}(t,e),t.acceptToken(3))}else if(39==o||34==o&&e.doubleQuotedStrings)u(t,o,e.backslashEscapes),t.acceptToken(3);else if(35==o&&e.hashComments||47==o&&47==t.next&&e.slashComments)p(t),t.acceptToken(1);else if(45!=o||45!=t.next||e.spaceAfterDashes&&32!=t.peek(1))if(47==o&&42==t.next){t.advance();for(let e=1;;){let n=t.next;if(t.next<0)break;if(t.advance(),42==n&&47==t.next){if(e--,t.advance(),!e)break}else 47==n&&42==t.next&&(e++,t.advance())}t.acceptToken(2)}else if(101!=o&&69!=o||39!=t.next)if(110!=o&&78!=o||39!=t.next||!e.charSetCasts)if(95==o&&e.charSetCasts)for(let n=0;;n++){if(39==t.next&&n>1){t.advance(),u(t,39,e.backslashEscapes),t.acceptToken(3);break}if(!c(t.next))break;t.advance()}else if(e.plsqlQuotingMechanism&&(113==o||81==o)&&39==t.next&&t.peek(1)>0&&!m(t.peek(1),g)){let e=t.peek(1);t.advance(2),function(e,t){let n="[{<(".indexOf(String.fromCharCode(t)),o=n<0?t:"]}>)".charCodeAt(n);for(;;){if(e.next<0)return;if(e.next==o&&39==e.peek(1))return void e.advance(2);e.advance()}}(t,e),t.acceptToken(3)}else if(40==o)t.acceptToken(7);else if(41==o)t.acceptToken(8);else if(123==o)t.acceptToken(9);else if(125==o)t.acceptToken(10);else if(91==o)t.acceptToken(11);else if(93==o)t.acceptToken(12);else if(59==o)t.acceptToken(13);else if(e.unquotedBitLiterals&&48==o&&98==t.next)t.advance(),h(t),t.acceptToken(22);else if(98!=o&&66!=o||39!=t.next&&34!=t.next){if(48==o&&(120==t.next||88==t.next)||(120==o||88==o)&&39==t.next){let e=39==t.next;for(t.advance();(r=t.next)>=48&&r<=57||r>=97&&r<=102||r>=65&&r<=70;)t.advance();e&&39==t.next&&t.advance(),t.acceptToken(4)}else if(46==o&&t.next>=48&&t.next<=57)d(t,!0),t.acceptToken(4);else if(46==o)t.acceptToken(14);else if(o>=48&&o<=57)d(t,!1),t.acceptToken(4);else if(m(o,e.operatorChars)){for(;m(t.next,e.operatorChars);)t.advance();t.acceptToken(15)}else if(m(o,e.specialVar))t.next==o&&t.advance(),function(e){if(39==e.next||34==e.next||96==e.next){let t=e.next;e.advance(),u(e,t,!1)}else f(e)}(t),t.acceptToken(17);else if(m(o,e.identifierQuotes))u(t,o,!1),t.acceptToken(19);else if(58==o||44==o)t.acceptToken(16);else if(c(o)){let r=f(t,String.fromCharCode(o));t.acceptToken(46==t.next||46==t.peek(-r.length-1)?18:null!==(n=e.words[r.toLowerCase()])&&void 0!==n?n:18)}}else{const n=t.next;t.advance(),e.treatBitsAsBytes?(u(t,n,e.backslashEscapes),t.acceptToken(23)):(h(t,n),t.acceptToken(22))}else t.advance(),u(t,39,e.backslashEscapes),t.acceptToken(3);else t.advance(),u(t,39,!0),t.acceptToken(3);else p(t),t.acceptToken(1);var r}))}const b=k(y),w=i.U1.deserialize({version:14,states:"%vQ]QQOOO#wQRO'#DSO$OQQO'#CwO%eQQO'#CxO%lQQO'#CyO%sQQO'#CzOOQQ'#DS'#DSOOQQ'#C}'#C}O'UQRO'#C{OOQQ'#Cv'#CvOOQQ'#C|'#C|Q]QQOOQOQQOOO'`QQO'#DOO(xQRO,59cO)PQQO,59cO)UQQO'#DSOOQQ,59d,59dO)cQQO,59dOOQQ,59e,59eO)jQQO,59eOOQQ,59f,59fO)qQQO,59fOOQQ-E6{-E6{OOQQ,59b,59bOOQQ-E6z-E6zOOQQ,59j,59jOOQQ-E6|-E6|O+VQRO1G.}O+^QQO,59cOOQQ1G/O1G/OOOQQ1G/P1G/POOQQ1G/Q1G/QP+kQQO'#C}O+rQQO1G.}O)PQQO,59cO,PQQO'#Cw",stateData:",[~OtOSPOSQOS~ORUOSUOTUOUUOVROXSOZTO]XO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O^]ORvXSvXTvXUvXVvXXvXZvX]vX_vX`vXavXbvXcvXdvXevXfvXgvXhvX~OsvX~P!jOa_Ob_Oc_O~ORUOSUOTUOUUOVROXSOZTO^tO_UO`UOa`Ob`Oc`OdUOeUOfUOgUOhUO~OWaO~P$ZOYcO~P$ZO[eO~P$ZORUOSUOTUOUUOVROXSOZTO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O]hOsoX~P%zOajObjOcjO~O^]ORkaSkaTkaUkaVkaXkaZka]ka_ka`kaakabkackadkaekafkagkahka~Oska~P'kO^]O~OWvXYvX[vX~P!jOWnO~P$ZOYoO~P$ZO[pO~P$ZO^]ORkiSkiTkiUkiVkiXkiZki]ki_ki`kiakibkickidkiekifkigkihki~Oski~P)xOWkaYka[ka~P'kO]hO~P$ZOWkiYki[ki~P)xOasObsOcsO~O",goto:"#hwPPPPPPPPPPPPPPPPPPPPPPPPPPx||||!Y!^!d!xPPP#[TYOZeUORSTWZbdfqT[OZQZORiZSWOZQbRQdSQfTZgWbdfqQ^PWk^lmrQl_Qm`RrseVORSTWZbdfq",nodeNames:"⚠ LineComment BlockComment String Number Bool Null ( ) { } [ ] ; . Operator Punctuation SpecialVar Identifier QuotedIdentifier Keyword Type Bits Bytes Builtin Script Statement CompositeIdentifier Parens Braces Brackets Statement",maxTerm:38,nodeProps:[["isolate",-4,1,2,3,19,""]],skippedNodes:[0,1,2],repeatNodeCount:3,tokenData:"RORO",tokenizers:[0,b],topRules:{Script:[0,25]},tokenPrec:0});function O(e){let t=e.cursor().moveTo(e.from,-1);for(;/Comment/.test(t.name);)t.moveTo(t.from,-1);return t.node}function x(e,t){let n=e.sliceString(t.from,t.to),o=/^([`'"])(.*)\1$/.exec(n);return o?o[2]:n}function A(e){return e&&("Identifier"==e.name||"QuotedIdentifier"==e.name)}function C(e,t){if("CompositeIdentifier"==t.name){let n=[];for(let o=t.firstChild;o;o=o.nextSibling)A(o)&&n.push(x(e,o));return n}return[x(e,t)]}function S(e,t){for(let n=[];;){if(!t||"."!=t.name)return n;let o=O(t);if(!A(o))return n;n.unshift(x(e,o)),t=O(o)}}const P=new Set("where group having order union intersect except all distinct limit offset fetch for".split(" ")),D=/^\w*$/,T=/^[`'"]?\w*[`'"]?$/;function I(e){return e.self&&"string"==typeof e.self.label}class B{constructor(e,t){this.idQuote=e,this.idCaseInsensitive=t,this.list=[],this.children=void 0}child(e){let t=this.children||(this.children=Object.create(null));return t[e]||(e&&!this.list.some((t=>t.label==e))&&this.list.push(M(e,"type",this.idQuote,this.idCaseInsensitive)),t[e]=new B(this.idQuote,this.idCaseInsensitive))}maybeChild(e){return this.children?this.children[e]:null}addCompletion(e){let t=this.list.findIndex((t=>t.label==e.label));t>-1?this.list[t]=e:this.list.push(e)}addCompletions(e){for(let t of e)this.addCompletion("string"==typeof t?M(t,"property",this.idQuote,this.idCaseInsensitive):t)}addNamespace(e){Array.isArray(e)?this.addCompletions(e):I(e)?this.addNamespace(e.children):this.addNamespaceObject(e)}addNamespaceObject(e){for(let t of Object.keys(e)){let n=e[t],o=null,r=t.replace(/\\?\./g,(e=>"."==e?"\0":e)).split("\0"),i=this;I(n)&&(o=n.self,n=n.children);for(let e=0;e<r.length;e++)o&&e==r.length-1&&i.addCompletion(o),i=i.child(r[e].replace(/\\\./g,"."));i.addNamespace(n)}}}function M(e,t,n,o){return new RegExp("^[a-z_][a-z_\\d]*$",o?"i":"").test(e)?{label:e,type:t}:{label:e,type:t,apply:n+e+n}}let Q=w.configure({props:[o.Oh.add({Statement:(0,o.mz)()}),o.b_.add({Statement(e,t){return{from:Math.min(e.from+100,t.doc.lineAt(e.from).to),to:e.to}},BlockComment(e){return{from:e.from+2,to:e.to-2}}}),(0,r.pn)({Keyword:r._A.keyword,Type:r._A.typeName,Builtin:r._A.standard(r._A.name),Bits:r._A.number,Bytes:r._A.string,Bool:r._A.bool,Null:r._A.null,Number:r._A.number,String:r._A.string,Identifier:r._A.name,QuotedIdentifier:r._A.special(r._A.string),SpecialVar:r._A.special(r._A.name),LineComment:r._A.lineComment,BlockComment:r._A.blockComment,Operator:r._A.operator,"Semi Punctuation":r._A.punctuation,"( )":r._A.paren,"{ }":r._A.brace,"[ ]":r._A.squareBracket})]});class R{constructor(e,t,n){this.dialect=e,this.language=t,this.spec=n}get extension(){return this.language.extension}static define(e){let t=function(e,t,n,o){let r={};for(let t in y)r[t]=(e.hasOwnProperty(t)?e:y)[t];return t&&(r.words=v(t,n||"",o)),r}(e,e.keywords,e.types,e.builtin),n=o.bj.define({name:"sql",parser:Q.configure({tokenizers:[{from:b,to:k(t)}]}),languageData:{commentTokens:{line:"--",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"`"]}}});return new R(t,n,e)}}function L(e,t){return{label:e,type:t,boost:-1}}function _(e,t=!1,n){return function(e,t,n){let o=Object.keys(e).map((o=>{return n(t?o.toUpperCase():o,(r=e[o])==a?"type":r==l?"keyword":"variable");var r}));return(0,s.Ar)(["QuotedIdentifier","SpecialVar","String","LineComment","BlockComment","."],(0,s.et)(o))}(e.dialect.words,t,n||L)}function E(e){return e.schema?function(e,t,n,r,i,s){var l;let a=(null===(l=null==s?void 0:s.spec.identifierQuotes)||void 0===l?void 0:l[0])||'"',c=new B(a,!!(null==s?void 0:s.spec.caseInsensitiveIdentifiers)),u=i?c.child(i):null;return c.addNamespace(e),t&&(u||c).addCompletions(t),n&&c.addCompletions(n),u&&c.addCompletions(u.list),r&&c.addCompletions((u||c).child(r).list),e=>{let{parents:t,from:n,quoted:i,empty:s,aliases:l}=function(e,t){let n=(0,o.mv)(e).resolveInner(t,-1),r=function(e,t){let n;for(let e=t;!n;e=e.parent){if(!e)return null;"Statement"==e.name&&(n=e)}let o=null;for(let t=n.firstChild,r=!1,i=null;t;t=t.nextSibling){let n="Keyword"==t.name?e.sliceString(t.from,t.to).toLowerCase():null,s=null;if(r)if("as"==n&&i&&A(t.nextSibling))s=x(e,t.nextSibling);else{if(n&&P.has(n))break;i&&A(t)&&(s=x(e,t))}else r="from"==n;s&&(o||(o=Object.create(null)),o[s]=C(e,i)),i=/Identifier$/.test(t.name)?t:null}return o}(e.doc,n);return"Identifier"==n.name||"QuotedIdentifier"==n.name||"Keyword"==n.name?{from:n.from,quoted:"QuotedIdentifier"==n.name?e.doc.sliceString(n.from,n.from+1):null,parents:S(e.doc,O(n)),aliases:r}:"."==n.name?{from:t,quoted:null,parents:S(e.doc,n),aliases:r}:{from:t,quoted:null,parents:[],empty:!0,aliases:r}}(e.state,e.pos);if(s&&!e.explicit)return null;l&&1==t.length&&(t=l[t[0]]||t);let a=c;for(let e of t){for(;!a.children||!a.children[e];)if(a==c&&u)a=u;else{if(a!=u||!r)return null;a=a.child(r)}let t=a.maybeChild(e);if(!t)return null;a=t}let f=i&&e.state.sliceDoc(e.pos,e.pos+1)==i,h=a.list;return a==c&&l&&(h=h.concat(Object.keys(l).map((e=>({label:e,type:"constant"}))))),{from:n,to:f?e.pos+1:void 0,options:(d=i,p=h,d?p.map((e=>Object.assign(Object.assign({},e),{label:e.label[0]==d?e.label:d+e.label+d,apply:void 0}))):p),validFor:i?T:D};var d,p}}(e.schema,e.tables,e.schemas,e.defaultTable,e.defaultSchema,e.dialect||F):()=>null}function N(e){return e.schema?(e.dialect||F).language.data.of({autocomplete:E(e)}):[]}function U(e={}){let t=e.dialect||F;return new o.Yy(t.language,[N(e),t.language.data.of({autocomplete:_(t,e.upperCaseKeywords,e.keywordCompletion)})])}const F=R.define({})},54136:function(e,t,n){n.d(t,{oQ:function(){return rt}});var o=n(1371),r=n(6585),i=n(15874),s=n(90365);function l(e,t){return({state:n,dispatch:o})=>{if(n.readOnly)return!1;let r=e(t,n);return!!r&&(o(n.update(r)),!0)}}const a=l(p,0),c=l(d,0),u=l(((e,t)=>d(e,t,function(e){let t=[];for(let n of e.selection.ranges){let o=e.doc.lineAt(n.from),r=n.to<=o.to?o:e.doc.lineAt(n.to);r.from>o.from&&r.from==n.to&&(r=n.to==o.to+1?o:e.doc.lineAt(n.to-1));let i=t.length-1;i>=0&&t[i].to>o.from?t[i].to=r.to:t.push({from:o.from+/^\s*/.exec(o.text)[0].length,to:r.to})}return t}(t))),0);function f(e,t){let n=e.languageDataAt("commentTokens",t);return n.length?n[0]:{}}const h=50;function d(e,t,n=t.selection.ranges){let o=n.map((e=>f(t,e.from).block));if(!o.every((e=>e)))return null;let r=n.map(((e,n)=>function(e,{open:t,close:n},o,r){let i,s,l=e.sliceDoc(o-h,o),a=e.sliceDoc(r,r+h),c=/\s*$/.exec(l)[0].length,u=/^\s*/.exec(a)[0].length,f=l.length-c;if(l.slice(f-t.length,f)==t&&a.slice(u,u+n.length)==n)return{open:{pos:o-c,margin:c&&1},close:{pos:r+u,margin:u&&1}};r-o<=2*h?i=s=e.sliceDoc(o,r):(i=e.sliceDoc(o,o+h),s=e.sliceDoc(r-h,r));let d=/^\s*/.exec(i)[0].length,p=/\s*$/.exec(s)[0].length,m=s.length-p-n.length;return i.slice(d,d+t.length)==t&&s.slice(m,m+n.length)==n?{open:{pos:o+d+t.length,margin:/\s/.test(i.charAt(d+t.length))?1:0},close:{pos:r-p-n.length,margin:/\s/.test(s.charAt(m-1))?1:0}}:null}(t,o[n],e.from,e.to)));if(2!=e&&!r.every((e=>e)))return{changes:t.changes(n.map(((e,t)=>r[t]?[]:[{from:e.from,insert:o[t].open+" "},{from:e.to,insert:" "+o[t].close}])))};if(1!=e&&r.some((e=>e))){let e=[];for(let t,n=0;n<r.length;n++)if(t=r[n]){let r=o[n],{open:i,close:s}=t;e.push({from:i.pos-r.open.length,to:i.pos+i.margin},{from:s.pos-s.margin,to:s.pos+r.close.length})}return{changes:e}}return null}function p(e,t,n=t.selection.ranges){let o=[],r=-1;for(let{from:e,to:i}of n){let n=o.length,s=1e9,l=f(t,e).line;if(l){for(let n=e;n<=i;){let a=t.doc.lineAt(n);if(a.from>r&&(e==i||i>a.from)){r=a.from;let e=/^\s*/.exec(a.text)[0].length,t=e==a.length,n=a.text.slice(e,e+l.length)==l?e:-1;e<a.text.length&&e<s&&(s=e),o.push({line:a,comment:n,token:l,indent:e,empty:t,single:!1})}n=a.to+1}if(s<1e9)for(let e=n;e<o.length;e++)o[e].indent<o[e].line.text.length&&(o[e].indent=s);o.length==n+1&&(o[n].single=!0)}}if(2!=e&&o.some((e=>e.comment<0&&(!e.empty||e.single)))){let e=[];for(let{line:t,token:n,indent:r,empty:i,single:s}of o)!s&&i||e.push({from:t.from+r,insert:n+" "});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(1!=e&&o.some((e=>e.comment>=0))){let e=[];for(let{line:t,comment:n,token:r}of o)if(n>=0){let o=t.from+n,i=o+r.length;" "==t.text[i-t.from]&&i++,e.push({from:o,to:i})}return{changes:e}}return null}const m=r.YH.define(),g=r.YH.define(),v=r.sj.define(),y=r.sj.define({combine(e){return(0,r.QR)(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,o)=>e(n,o)||t(n,o)})}}),k=r.sU.define({create(){return _.empty},update(e,t){let n=t.state.facet(y),o=t.annotation(m);if(o){let r=S.fromTransaction(t,o.selection),i=o.side,s=0==i?e.undone:e.done;return s=r?P(s,s.length,n.minDepth,r):B(s,t.startState.selection),new _(0==i?o.rest:s,0==i?s:o.rest)}let i=t.annotation(g);if("full"!=i&&"before"!=i||(e=e.isolate()),!1===t.annotation(r.ZX.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let s=S.fromTransaction(t),l=t.annotation(r.ZX.time),a=t.annotation(r.ZX.userEvent);return s?e=e.addChanges(s,l,a,n,t):t.selection&&(e=e.addSelection(t.startState.selection,l,a,n.newGroupDelay)),"full"!=i&&"after"!=i||(e=e.isolate()),e},toJSON(e){return{done:e.done.map((e=>e.toJSON())),undone:e.undone.map((e=>e.toJSON()))}},fromJSON(e){return new _(e.done.map(S.fromJSON),e.undone.map(S.fromJSON))}});function b(e={}){return[k,y.of(e),o.Lz.domEventHandlers({beforeinput(e,t){let n="historyUndo"==e.inputType?O:"historyRedo"==e.inputType?x:null;return!!n&&(e.preventDefault(),n(t))}})]}function w(e,t){return function({state:n,dispatch:o}){if(!t&&n.readOnly)return!1;let r=n.field(k,!1);if(!r)return!1;let i=r.pop(e,n,t);return!!i&&(o(i),!0)}}const O=w(0,!1),x=w(1,!1),A=w(0,!0),C=w(1,!0);class S{constructor(e,t,n,o,r){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=o,this.selectionsAfter=r}setSelAfter(e){return new S(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;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===(n=this.startSelection)||void 0===n?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map((e=>e.toJSON()))}}static fromJSON(e){return new S(e.changes&&r.VR.fromJSON(e.changes),[],e.mapped&&r.Gu.fromJSON(e.mapped),e.startSelection&&r.OF.fromJSON(e.startSelection),e.selectionsAfter.map(r.OF.fromJSON))}static fromTransaction(e,t){let n=T;for(let t of e.startState.facet(v)){let o=t(e);o.length&&(n=n.concat(o))}return!n.length&&e.changes.empty?null:new S(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,T)}static selection(e){return new S(void 0,T,void 0,void 0,e)}}function P(e,t,n,o){let r=t+1>n+20?t-n-1:0,i=e.slice(r,t);return i.push(o),i}function D(e,t){return e.length?t.length?e.concat(t):e:t}const T=[],I=200;function B(e,t){if(e.length){let n=e[e.length-1],o=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-I));return o.length&&o[o.length-1].eq(t)?e:(o.push(t),P(e,e.length-1,1e9,n.setSelAfter(o)))}return[S.selection([t])]}function M(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function Q(e,t){if(!e.length)return e;let n=e.length,o=T;for(;n;){let r=R(e[n-1],t,o);if(r.changes&&!r.changes.empty||r.effects.length){let t=e.slice(0,n);return t[n-1]=r,t}t=r.mapped,n--,o=r.selectionsAfter}return o.length?[S.selection(o)]:T}function R(e,t,n){let o=D(e.selectionsAfter.length?e.selectionsAfter.map((e=>e.map(t))):T,n);if(!e.changes)return S.selection(o);let i=e.changes.map(t),s=t.mapDesc(e.changes,!0),l=e.mapped?e.mapped.composeDesc(s):s;return new S(i,r.Pe.mapEffects(e.effects,t),l,e.startSelection.map(s),o)}const L=/^(input\.type|delete)($|\.)/;class _{constructor(e,t,n=0,o=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=o}isolate(){return this.prevTime?new _(this.done,this.undone):this}addChanges(e,t,n,o,i){let s=this.done,l=s[s.length-1];return s=l&&l.changes&&!l.changes.empty&&e.changes&&(!n||L.test(n))&&(!l.selectionsAfter.length&&t-this.prevTime<o.newGroupDelay&&o.joinToEvent(i,function(e,t){let n=[],o=!1;return e.iterChangedRanges(((e,t)=>n.push(e,t))),t.iterChangedRanges(((e,t,r,i)=>{for(let e=0;e<n.length;){let t=n[e++],s=n[e++];i>=t&&r<=s&&(o=!0)}})),o}(l.changes,e.changes))||"input.type.compose"==n)?P(s,s.length-1,o.minDepth,new S(e.changes.compose(l.changes),D(r.Pe.mapEffects(e.effects,l.changes),l.effects),l.mapped,l.startSelection,T)):P(s,s.length,o.minDepth,e),new _(s,T,t,n)}addSelection(e,t,n,o){let r=this.done.length?this.done[this.done.length-1].selectionsAfter:T;return r.length>0&&t-this.prevTime<o&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&(i=r[r.length-1],s=e,i.ranges.length==s.ranges.length&&0===i.ranges.filter(((e,t)=>e.empty!=s.ranges[t].empty)).length)?this:new _(B(this.done,e),this.undone,t,n);var i,s}addMapping(e){return new _(Q(this.done,e),Q(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let o=0==e?this.done:this.undone;if(0==o.length)return null;let r=o[o.length-1],i=r.selectionsAfter[0]||t.selection;if(n&&r.selectionsAfter.length)return t.update({selection:r.selectionsAfter[r.selectionsAfter.length-1],annotations:m.of({side:e,rest:M(o),selection:i}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0});if(r.changes){let n=1==o.length?T:o.slice(0,o.length-1);return r.mapped&&(n=Q(n,r.mapped)),t.update({changes:r.changes,selection:r.startSelection,effects:r.effects,annotations:m.of({side:e,rest:n,selection:i}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}return null}}_.empty=new _(T,T);const E=[{key:"Mod-z",run:O,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:x,preventDefault:!0},{linux:"Ctrl-Shift-z",run:x,preventDefault:!0},{key:"Mod-u",run:A,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:C,preventDefault:!0}];function N(e,t){return r.OF.create(e.ranges.map(t),e.mainIndex)}function U(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function F({state:e,dispatch:t},n){let o=N(e.selection,n);return!o.eq(e.selection,!0)&&(t(U(e,o)),!0)}function j(e,t){return r.OF.cursor(t?e.to:e.from)}function z(e,t){return F(e,(n=>n.empty?e.moveByChar(n,t):j(n,t)))}function $(e){return e.textDirectionAt(e.state.selection.main.head)==o.OP.LTR}const Z=e=>z(e,!$(e)),q=e=>z(e,$(e));function V(e,t){return F(e,(n=>n.empty?e.moveByGroup(n,t):j(n,t)))}function H(e,t,n){if(t.type.prop(n))return!0;let o=t.to-t.from;return o&&(o>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function W(e,t,n){let o,l,a=(0,i.mv)(e).resolveInner(t.head),c=n?s.uY.closedBy:s.uY.openedBy;for(let o=t.head;;){let t=n?a.childAfter(o):a.childBefore(o);if(!t)break;H(e,t,c)?a=t:o=n?t.to:t.from}return l=a.type.prop(c)&&(o=n?(0,i.jU)(e,a.from,1):(0,i.jU)(e,a.to,-1))&&o.matched?n?o.end.to:o.end.from:n?a.to:a.from,r.OF.cursor(l,n?-1:1)}function X(e,t){return F(e,(n=>{if(!n.empty)return j(n,t);let o=e.moveVertically(n,t);return o.head!=n.head?o:e.moveToLineBoundary(n,t)}))}"undefined"!=typeof Intl&&Intl.Segmenter;const J=e=>X(e,!1),Y=e=>X(e,!0);function K(e){let t,n=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,r=0,i=0;if(n){for(let t of e.state.facet(o.Lz.scrollMargins)){let n=t(e);(null==n?void 0:n.top)&&(r=Math.max(null==n?void 0:n.top,r)),(null==n?void 0:n.bottom)&&(i=Math.max(null==n?void 0:n.bottom,i))}t=e.scrollDOM.clientHeight-r-i}else t=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:r,marginBottom:i,selfScroll:n,height:Math.max(e.defaultLineHeight,t-5)}}function G(e,t){let n,r=K(e),{state:i}=e,s=N(i.selection,(n=>n.empty?e.moveVertically(n,t,r.height):j(n,t)));if(s.eq(i.selection))return!1;if(r.selfScroll){let t=e.coordsAtPos(i.selection.main.head),l=e.scrollDOM.getBoundingClientRect(),a=l.top+r.marginTop,c=l.bottom-r.marginBottom;t&&t.top>a&&t.bottom<c&&(n=o.Lz.scrollIntoView(s.main.head,{y:"start",yMargin:t.top-a}))}return e.dispatch(U(i,s),{effects:n}),!0}const ee=e=>G(e,!1),te=e=>G(e,!0);function ne(e,t,n){let o=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?o.to:o.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==o.from&&o.length){let n=/^\s*/.exec(e.state.sliceDoc(o.from,Math.min(o.from+100,o.to)))[0].length;n&&t.head!=o.from+n&&(i=r.OF.cursor(o.from+n))}return i}function oe(e,t){let n=N(e.state.selection,(e=>{let n=t(e);return r.OF.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)}));return!n.eq(e.state.selection)&&(e.dispatch(U(e.state,n)),!0)}function re(e,t){return oe(e,(n=>e.moveByChar(n,t)))}const ie=e=>re(e,!$(e)),se=e=>re(e,$(e));function le(e,t){return oe(e,(n=>e.moveByGroup(n,t)))}function ae(e,t){return oe(e,(n=>e.moveVertically(n,t)))}const ce=e=>ae(e,!1),ue=e=>ae(e,!0);function fe(e,t){return oe(e,(n=>e.moveVertically(n,t,K(e).height)))}const he=e=>fe(e,!1),de=e=>fe(e,!0),pe=({state:e,dispatch:t})=>(t(U(e,{anchor:0})),!0),me=({state:e,dispatch:t})=>(t(U(e,{anchor:e.doc.length})),!0),ge=({state:e,dispatch:t})=>(t(U(e,{anchor:e.selection.main.anchor,head:0})),!0),ve=({state:e,dispatch:t})=>(t(U(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0);function ye(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:i}=e,s=i.changeByRange((o=>{let{from:i,to:s}=o;if(i==s){let r=t(o);r<i?(n="delete.backward",r=ke(e,r,!1)):r>i&&(n="delete.forward",r=ke(e,r,!0)),i=Math.min(i,r),s=Math.max(s,r)}else i=ke(e,i,!1),s=ke(e,s,!0);return i==s?{range:o}:{changes:{from:i,to:s},range:r.OF.cursor(i,i<o.head?-1:1)}}));return!s.changes.empty&&(e.dispatch(i.update(s,{scrollIntoView:!0,userEvent:n,effects:"delete.selection"==n?o.Lz.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function ke(e,t,n){if(e instanceof o.Lz)for(let r of e.state.facet(o.Lz.atomicRanges).map((t=>t(e))))r.between(t,t,((e,o)=>{e<t&&o>t&&(t=n?o:e)}));return t}const be=(e,t,n)=>ye(e,(o=>{let s,l,a=o.from,{state:c}=e,u=c.doc.lineAt(a);if(n&&!t&&a>u.from&&a<u.from+200&&!/[^ \t]/.test(s=u.text.slice(0,a-u.from))){if("\t"==s[s.length-1])return a-1;let e=(0,r.y$)(s,c.tabSize)%(0,i.tp)(c)||(0,i.tp)(c);for(let t=0;t<e&&" "==s[s.length-1-t];t++)a--;l=a}else l=(0,r.zK)(u.text,a-u.from,t,t)+u.from,l==a&&u.number!=(t?c.doc.lines:1)?l+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(u.text.slice(l-u.from,a-u.from))&&(l=(0,r.zK)(u.text,l-u.from,!1,!1)+u.from);return l})),we=e=>be(e,!1,!0),Oe=e=>be(e,!0,!1),xe=(e,t)=>ye(e,(n=>{let o=n.head,{state:i}=e,s=i.doc.lineAt(o),l=i.charCategorizer(o);for(let e=null;;){if(o==(t?s.to:s.from)){o==n.head&&s.number!=(t?i.doc.lines:1)&&(o+=t?1:-1);break}let a=(0,r.zK)(s.text,o-s.from,t)+s.from,c=s.text.slice(Math.min(o,a)-s.from,Math.max(o,a)-s.from),u=l(c);if(null!=e&&u!=e)break;" "==c&&o==n.head||(e=u),o=a}return o})),Ae=e=>xe(e,!1);function Ce(e){let t=[],n=-1;for(let o of e.selection.ranges){let r=e.doc.lineAt(o.from),i=e.doc.lineAt(o.to);if(o.empty||o.to!=i.from||(i=e.doc.lineAt(o.to-1)),n>=r.number){let e=t[t.length-1];e.to=i.to,e.ranges.push(o)}else t.push({from:r.from,to:i.to,ranges:[o]});n=i.number+1}return t}function Se(e,t,n){if(e.readOnly)return!1;let o=[],i=[];for(let t of Ce(e)){if(n?t.to==e.doc.length:0==t.from)continue;let s=e.doc.lineAt(n?t.to+1:t.from-1),l=s.length+1;if(n){o.push({from:t.to,to:s.to},{from:t.from,insert:s.text+e.lineBreak});for(let n of t.ranges)i.push(r.OF.range(Math.min(e.doc.length,n.anchor+l),Math.min(e.doc.length,n.head+l)))}else{o.push({from:s.from,to:t.from},{from:t.to,insert:e.lineBreak+s.text});for(let e of t.ranges)i.push(r.OF.range(e.anchor-l,e.head-l))}}return!!o.length&&(t(e.update({changes:o,scrollIntoView:!0,selection:r.OF.create(i,e.selection.mainIndex),userEvent:"move.line"})),!0)}function Pe(e,t,n){if(e.readOnly)return!1;let o=[];for(let t of Ce(e))n?o.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):o.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});return t(e.update({changes:o,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const De=Te(!1);function Te(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let o=t.changeByRange((n=>{let{from:o,to:l}=n,a=t.doc.lineAt(o),c=!e&&o==l&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n,o=(0,i.mv)(e).resolveInner(t),r=o.childBefore(t),l=o.childAfter(t);return r&&l&&r.to<=t&&l.from>=t&&(n=r.type.prop(s.uY.closedBy))&&n.indexOf(l.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(l.from).from&&!/\S/.test(e.sliceDoc(r.to,l.from))?{from:r.to,to:l.from}:null}(t,o);e&&(o=l=(l<=a.to?a:t.doc.lineAt(l)).to);let u=new i.KB(t,{simulateBreak:o,simulateDoubleBreak:!!c}),f=(0,i._v)(u,o);for(null==f&&(f=(0,r.y$)(/^\s*/.exec(t.doc.lineAt(o).text)[0],t.tabSize));l<a.to&&/\s/.test(a.text[l-a.from]);)l++;c?({from:o,to:l}=c):o>a.from&&o<a.from+100&&!/\S/.test(a.text.slice(0,o))&&(o=a.from);let h=["",(0,i.EI)(t,f)];return c&&h.push((0,i.EI)(t,u.lineIndent(a.from,-1))),{changes:{from:o,to:l,insert:r.EY.of(h)},range:r.OF.cursor(o+1+h[1].length)}}));return n(t.update(o,{scrollIntoView:!0,userEvent:"input"})),!0}}function Ie(e,t){let n=-1;return e.changeByRange((o=>{let i=[];for(let r=o.from;r<=o.to;){let s=e.doc.lineAt(r);s.number>n&&(o.empty||o.to>s.from)&&(t(s,i,o),n=s.number),r=s.to+1}let s=e.changes(i);return{changes:i,range:r.OF.range(s.mapPos(o.anchor,1),s.mapPos(o.head,1))}}))}const Be=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>F(e,(t=>W(e.state,t,!$(e)))),shift:e=>oe(e,(t=>W(e.state,t,!$(e))))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>F(e,(t=>W(e.state,t,$(e)))),shift:e=>oe(e,(t=>W(e.state,t,$(e))))},{key:"Alt-ArrowUp",run:({state:e,dispatch:t})=>Se(e,t,!1)},{key:"Shift-Alt-ArrowUp",run:({state:e,dispatch:t})=>Pe(e,t,!1)},{key:"Alt-ArrowDown",run:({state:e,dispatch:t})=>Se(e,t,!0)},{key:"Shift-Alt-ArrowDown",run:({state:e,dispatch:t})=>Pe(e,t,!0)},{key:"Escape",run:({state:e,dispatch:t})=>{let n=e.selection,o=null;return n.ranges.length>1?o=r.OF.create([n.main]):n.main.empty||(o=r.OF.create([r.OF.cursor(n.main.head)])),!!o&&(t(U(e,o)),!0)}},{key:"Mod-Enter",run:Te(!0)},{key:"Alt-l",mac:"Ctrl-l",run:({state:e,dispatch:t})=>{let n=Ce(e).map((({from:t,to:n})=>r.OF.range(t,Math.min(n+1,e.doc.length))));return t(e.update({selection:r.OF.create(n),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:e,dispatch:t})=>{let n=N(e.selection,(t=>{let n=(0,i.mv)(e),o=n.resolveStack(t.from,1);if(t.empty){let e=n.resolveStack(t.from,-1);e.node.from>=o.node.from&&e.node.to<=o.node.to&&(o=e)}for(let e=o;e;e=e.next){let{node:n}=e;if((n.from<t.from&&n.to>=t.to||n.to>t.to&&n.from<=t.from)&&e.next)return r.OF.range(n.to,n.from)}return t}));return!n.eq(e.selection)&&(t(U(e,n)),!0)},preventDefault:!0},{key:"Mod-[",run:({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(Ie(e,((t,n)=>{let o=/^\s*/.exec(t.text)[0];if(!o)return;let s=(0,r.y$)(o,e.tabSize),l=0,a=(0,i.EI)(e,Math.max(0,s-(0,i.tp)(e)));for(;l<o.length&&l<a.length&&o.charCodeAt(l)==a.charCodeAt(l);)l++;n.push({from:t.from+l,to:t.from+o.length,insert:a.slice(l)})})),{userEvent:"delete.dedent"})),!0)},{key:"Mod-]",run:({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(Ie(e,((t,n)=>{n.push({from:t.from,insert:e.facet(i.Xt)})})),{userEvent:"input.indent"})),!0)},{key:"Mod-Alt-\\",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),o=new i.KB(e,{overrideIndentation:e=>{let t=n[e];return null==t?-1:t}}),r=Ie(e,((t,r,s)=>{let l=(0,i._v)(o,t.from);if(null==l)return;/\S/.test(t.text)||(l=0);let a=/^\s*/.exec(t.text)[0],c=(0,i.EI)(e,l);(a!=c||s.from<t.from+a.length)&&(n[t.from]=l,r.push({from:t.from,to:t.from+a.length,insert:c}))}));return r.changes.empty||t(e.update(r,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(Ce(t).map((({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n})))),o=N(t.selection,(t=>{let n;if(e.lineWrapping){let o=e.lineBlockAt(t.head),r=e.coordsAtPos(t.head,t.assoc||1);r&&(n=o.bottom+e.documentTop-r.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)})).map(n);return e.dispatch({changes:n,selection:o,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:e,dispatch:t})=>function(e,t,n){let o=!1,s=N(e.selection,(t=>{let s=(0,i.jU)(e,t.head,-1)||(0,i.jU)(e,t.head,1)||t.head>0&&(0,i.jU)(e,t.head-1,1)||t.head<e.doc.length&&(0,i.jU)(e,t.head+1,-1);if(!s||!s.end)return t;o=!0;let l=s.start.from==t.head?s.end.to:s.end.from;return n?r.OF.range(t.anchor,l):r.OF.cursor(l)}));return!!o&&(t(U(e,s)),!0)}(e,t,!1)},{key:"Mod-/",run:e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),o=f(e.state,n.from);return o.line?a(e):!!o.block&&u(e)}},{key:"Alt-A",run:c},{key:"Ctrl-m",mac:"Shift-Alt-m",run:e=>(e.setTabFocusMode(),!0)}].concat([{key:"ArrowLeft",run:Z,shift:ie,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:e=>V(e,!$(e)),shift:e=>le(e,!$(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>F(e,(t=>ne(e,t,!$(e)))),shift:e=>oe(e,(t=>ne(e,t,!$(e)))),preventDefault:!0},{key:"ArrowRight",run:q,shift:se,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>V(e,$(e)),shift:e=>le(e,$(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>F(e,(t=>ne(e,t,$(e)))),shift:e=>oe(e,(t=>ne(e,t,$(e)))),preventDefault:!0},{key:"ArrowUp",run:J,shift:ce,preventDefault:!0},{mac:"Cmd-ArrowUp",run:pe,shift:ge},{mac:"Ctrl-ArrowUp",run:ee,shift:he},{key:"ArrowDown",run:Y,shift:ue,preventDefault:!0},{mac:"Cmd-ArrowDown",run:me,shift:ve},{mac:"Ctrl-ArrowDown",run:te,shift:de},{key:"PageUp",run:ee,shift:he},{key:"PageDown",run:te,shift:de},{key:"Home",run:e=>F(e,(t=>ne(e,t,!1))),shift:e=>oe(e,(t=>ne(e,t,!1))),preventDefault:!0},{key:"Mod-Home",run:pe,shift:ge},{key:"End",run:e=>F(e,(t=>ne(e,t,!0))),shift:e=>oe(e,(t=>ne(e,t,!0))),preventDefault:!0},{key:"Mod-End",run:me,shift:ve},{key:"Enter",run:De,shift:De},{key:"Mod-a",run:({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:we,shift:we},{key:"Delete",run:Oe},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Ae},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>xe(e,!0)},{mac:"Mod-Backspace",run:e=>ye(e,(t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}))},{mac:"Mod-Delete",run:e=>ye(e,(t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}))}].concat([{key:"Ctrl-b",run:Z,shift:ie,preventDefault:!0},{key:"Ctrl-f",run:q,shift:se},{key:"Ctrl-p",run:J,shift:ce},{key:"Ctrl-n",run:Y,shift:ue},{key:"Ctrl-a",run:e=>F(e,(t=>r.OF.cursor(e.lineBlockAt(t.head).from,1))),shift:e=>oe(e,(t=>r.OF.cursor(e.lineBlockAt(t.head).from)))},{key:"Ctrl-e",run:e=>F(e,(t=>r.OF.cursor(e.lineBlockAt(t.head).to,-1))),shift:e=>oe(e,(t=>r.OF.cursor(e.lineBlockAt(t.head).to)))},{key:"Ctrl-d",run:Oe},{key:"Ctrl-h",run:we},{key:"Ctrl-k",run:e=>ye(e,(t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}))},{key:"Ctrl-Alt-h",run:Ae},{key:"Ctrl-o",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:r.EY.of(["",""])},range:r.OF.cursor(e.from)})));return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange((t=>{if(!t.empty||0==t.from||t.from==e.doc.length)return{range:t};let n=t.from,o=e.doc.lineAt(n),i=n==o.from?n-1:(0,r.zK)(o.text,n-o.from,!1)+o.from,s=n==o.to?n+1:(0,r.zK)(o.text,n-o.from,!0)+o.from;return{changes:{from:i,to:s,insert:e.doc.slice(n,s).append(e.doc.slice(i,n))},range:r.OF.cursor(s)}}));return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:te}].map((e=>({mac:e.key,run:e.run,shift:e.shift})))));var Me=n(54528),Qe=n(47404),Re=n(93748);class Le{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class _e{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let i=e,s=n.facet(He).markerFilter;s&&(i=s(i,n));let l=e.slice().sort(((e,t)=>e.from-t.from||e.to-t.to)),a=new r.vB,c=[],u=0;for(let e=0;;){let t,r,i=e==l.length?null:l[e];if(!i&&!c.length)break;for(c.length?(t=u,r=c.reduce(((e,t)=>Math.min(e,t.to)),i&&i.from>t?i.from:1e8)):(t=i.from,r=i.to,c.push(i),e++);e<l.length;){let n=l[e];if(n.from!=t||!(n.to>n.from||n.to==t)){r=Math.min(n.from,r);break}c.push(n),e++,r=Math.min(n.to,r)}let s=nt(c);if(c.some((e=>e.from==e.to||e.from==e.to-1&&n.doc.lineAt(e.from).to==e.from)))a.add(t,t,o.NZ.widget({widget:new Je(s),diagnostics:c.slice()}));else{let e=c.reduce(((e,t)=>t.markClass?e+" "+t.markClass:e),"");a.add(t,r,o.NZ.mark({class:"cm-lintRange cm-lintRange-"+s+e,diagnostics:c.slice(),inclusiveEnd:c.some((e=>e.to>r))}))}u=r;for(let e=0;e<c.length;e++)c[e].to<=u&&c.splice(e--,1)}let f=a.finish();return new _e(f,t,Ee(f))}}function Ee(e,t=null,n=0){let o=null;return e.between(n,1e9,((e,n,{spec:r})=>{if(!(t&&r.diagnostics.indexOf(t)<0))if(o){if(r.diagnostics.indexOf(o.diagnostic)<0)return!1;o=new Le(o.from,n,o.diagnostic)}else o=new Le(e,n,t||r.diagnostics[0])})),o}const Ne=r.Pe.define(),Ue=r.Pe.define(),Fe=r.Pe.define(),je=r.sU.define({create(){return new _e(o.NZ.none,null,null)},update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),o=null,r=e.panel;if(e.selected){let r=t.changes.mapPos(e.selected.from,1);o=Ee(n,e.selected.diagnostic,r)||Ee(n,null,r)}!n.size&&r&&t.state.facet(He).autoPanel&&(r=null),e=new _e(n,r,o)}for(let n of t.effects)if(n.is(Ne)){let o=t.state.facet(He).autoPanel?n.value.length?Ke.open:null:e.panel;e=_e.init(n.value,o,t.state)}else n.is(Ue)?e=new _e(e.diagnostics,n.value?Ke.open:null,e.selected):n.is(Fe)&&(e=new _e(e.diagnostics,e.panel,n.value));return e},provide:e=>[o.S7.from(e,(e=>e.panel)),o.Lz.decorations.from(e,(e=>e.diagnostics))]}),ze=o.NZ.mark({class:"cm-lintRange cm-lintRange-active"});function $e(e,t,n){let o,{diagnostics:r}=e.state.field(je),i=-1,s=-1;r.between(t-(n<0?1:0),t+(n>0?1:0),((e,r,{spec:l})=>{if(t>=e&&t<=r&&(e==r||(t>e||n>0)&&(t<r||n<0)))return o=l.diagnostics,i=e,s=r,!1}));let l=e.state.facet(He).tooltipFilter;return o&&l&&(o=l(o,e.state)),o?{pos:i,end:s,above:e.state.doc.lineAt(i).to<s,create(){return{dom:Ze(e,o)}}}:null}function Ze(e,t){return(0,Re.A)("ul",{class:"cm-tooltip-lint"},t.map((t=>Xe(e,t,!1))))}const qe=e=>{let t=e.state.field(je,!1);return!(!t||!t.panel||(e.dispatch({effects:Ue.of(!1)}),0))},Ve=[{key:"Mod-Shift-m",run:e=>{let t=e.state.field(je,!1);var n,i;t&&t.panel||e.dispatch({effects:(n=e.state,i=[Ue.of(!0)],n.field(je,!1)?i:i.concat(r.Pe.appendConfig.of(ot)))});let s=(0,o.ld)(e,Ke.open);return s&&s.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:e=>{let t=e.state.field(je,!1);if(!t)return!1;let n=e.state.selection.main,o=t.diagnostics.iter(n.to+1);return!(!o.value&&(o=t.diagnostics.iter(0),!o.value||o.from==n.from&&o.to==n.to)||(e.dispatch({selection:{anchor:o.from,head:o.to},scrollIntoView:!0}),0))}}],He=r.sj.define({combine(e){return Object.assign({sources:e.map((e=>e.source)).filter((e=>null!=e))},(0,r.QR)(e.map((e=>e.config)),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t}))}});function We(e){let t=[];if(e)e:for(let{name:n}of e){for(let e=0;e<n.length;e++){let o=n[e];if(/[a-zA-Z]/.test(o)&&!t.some((e=>e.toLowerCase()==o.toLowerCase()))){t.push(o);continue e}}t.push("")}return t}function Xe(e,t,n){var o;let r=n?We(t.actions):[];return(0,Re.A)("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},(0,Re.A)("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage(e):t.message),null===(o=t.actions)||void 0===o?void 0:o.map(((n,o)=>{let i=!1,s=o=>{if(o.preventDefault(),i)return;i=!0;let r=Ee(e.state.field(je).diagnostics,t);r&&n.apply(e,r.from,r.to)},{name:l}=n,a=r[o]?l.indexOf(r[o]):-1,c=a<0?l:[l.slice(0,a),(0,Re.A)("u",l.slice(a,a+1)),l.slice(a+1)];return(0,Re.A)("button",{type:"button",class:"cm-diagnosticAction",onclick:s,onmousedown:s,"aria-label":` Action: ${l}${a<0?"":` (access key "${r[o]})"`}.`},c)})),t.source&&(0,Re.A)("div",{class:"cm-diagnosticSource"},t.source))}class Je extends o.xO{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return(0,Re.A)("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class Ye{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=Xe(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Ke{constructor(e){this.view=e,this.items=[],this.list=(0,Re.A)("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t=>{if(27==t.keyCode)qe(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:n}=this.items[this.selectedIndex],o=We(n.actions);for(let r=0;r<o.length;r++)if(o[r].toUpperCase().charCodeAt(0)==t.keyCode){let t=Ee(this.view.state.field(je).diagnostics,n);t&&n.actions[r].apply(e,t.from,t.to)}}}t.preventDefault()},onclick:e=>{for(let t=0;t<this.items.length;t++)this.items[t].dom.contains(e.target)&&this.moveSelection(t)}}),this.dom=(0,Re.A)("div",{class:"cm-panel-lint"},this.list,(0,Re.A)("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>qe(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(je).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(je),n=0,o=!1,r=null,i=new Set;for(e.between(0,this.view.state.doc.length,((e,s,{spec:l})=>{for(let e of l.diagnostics){if(i.has(e))continue;i.add(e);let s,l=-1;for(let t=n;t<this.items.length;t++)if(this.items[t].diagnostic==e){l=t;break}l<0?(s=new Ye(this.view,e),this.items.splice(n,0,s),o=!0):(s=this.items[l],l>n&&(this.items.splice(n,l-n),o=!0)),t&&s.diagnostic==t.diagnostic?s.dom.hasAttribute("aria-selected")||(s.dom.setAttribute("aria-selected","true"),r=s):s.dom.hasAttribute("aria-selected")&&s.dom.removeAttribute("aria-selected"),n++}}));n<this.items.length&&!(1==this.items.length&&this.items[0].diagnostic.from<0);)o=!0,this.items.pop();0==this.items.length&&(this.items.push(new Ye(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),o=!0),r?(this.list.setAttribute("aria-activedescendant",r.id),this.view.requestMeasure({key:this,read:()=>({sel:r.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let n=t.height/this.list.offsetHeight;e.top<t.top?this.list.scrollTop-=(t.top-e.top)/n:e.bottom>t.bottom&&(this.list.scrollTop+=(e.bottom-t.bottom)/n)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),o&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=Ee(this.view.state.field(je).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:Fe.of(t)})}static open(e){return new Ke(e)}}function Ge(e){return function(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const et=o.Lz.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:Ge("#d11")},".cm-lintRange-warning":{backgroundImage:Ge("orange")},".cm-lintRange-info":{backgroundImage:Ge("#999")},".cm-lintRange-hint":{backgroundImage:Ge("#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}}});function tt(e){return"error"==e?4:"warning"==e?3:"info"==e?2:1}function nt(e){let t="hint",n=1;for(let o of e){let e=tt(o.severity);e>n&&(n=e,t=o.severity)}return t}o.wJ;const ot=[je,o.Lz.decorations.compute([je],(e=>{let{selected:t,panel:n}=e.field(je);return t&&n&&t.from!=t.to?o.NZ.set([ze.range(t.from,t.to)]):o.NZ.none})),(0,o.Ux)($e,{hideOn:function(e,t){let n=t.pos,o=t.end||n,r=e.state.facet(He).hideOn(e,n,o);if(null!=r)return r;let i=e.startState.doc.lineAt(t.pos);return!(!e.effects.some((e=>e.is(Ne)))&&!e.changes.touchesRange(i.from,Math.max(i.to,o)))}}),et],rt=(()=>[(0,o.$K)(),(0,o.Wu)(),(0,o.N$)(),b(),(0,i.Lv)(),(0,o.VH)(),(0,o.A)(),r.$t.allowMultipleSelections.of(!0),(0,i.WD)(),(0,i.y9)(i.Zt,{fallback:!0}),(0,i.SG)(),(0,Qe.wm)(),(0,Qe.yU)(),(0,o.D4)(),(0,o.HJ)(),(0,o.dz)(),(0,Me.gN)(),o.w4.of([...Qe.Bc,...Be,...Me.Eo,...E,...i.f7,...Qe.OO,...Ve])])()}}]);
|
|
Binary file
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see bundle.84924d3443cdf0ef3a08.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunkaldehyde=self.webpackChunkaldehyde||[]).push([[651],{2935:function(t,e,r){"use strict";function n(t,e){var r=i.get(t,e);return"auto"===r||"scroll"===r}var i={get:r(46892),getScrollParent:function(t){if(!t)return null;for(var e=t.ownerDocument;t&&t!==e.body;){if(n(t,"overflow")||n(t,"overflowY")||n(t,"overflowX"))return t;t=t.parentNode}return e.defaultView||e.parentWindow}};t.exports=i},3136:function(t,e,r){"use strict";var n=r(9404),i=r(56269),o=r(90646),u=n.Repeat;t.exports=function(t,e,r,n){e.isCollapsed()||o(!1);var s=null;if(null!=r&&(s=r.length),null==s||0===s)return t;var a=t.getBlockMap(),c=e.getStartKey(),f=e.getStartOffset(),h=a.get(c),l=h.getText(),p=h.merge({text:l.slice(0,f)+r+l.slice(f,h.getLength()),characterList:i(h.getCharacterList(),u(n,s).toList(),f)}),g=f+s;return t.merge({blockMap:a.set(c,p),selectionAfter:e.merge({anchorOffset:g,focusOffset:g})})}},4909:function(t,e,r){"use strict";var n=r(95423);t.exports=function t(e,r){return!(!e||!r)&&(e===r||!n(e)&&(n(r)?t(e,r.parentNode):"contains"in e?e.contains(r):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(r))))}},5188:function(t,e,r){"use strict";var n=r(49938),i=r(47282)("draft_tree_data_support");t.exports=function(t,e,r){var o=t.getSelection(),u=t.getCurrentContent(),s=o,a=o.getAnchorKey(),c=o.getFocusKey(),f=u.getBlockForKey(a);if(i&&"forward"===r&&a!==c)return u;if(o.isCollapsed()){if("forward"===r){if(t.isSelectionAtEndOfContent())return u;if(i&&o.getAnchorOffset()===u.getBlockForKey(a).getLength()){var h=u.getBlockForKey(f.nextSibling);if(!h||0===h.getLength())return u}}else if(t.isSelectionAtStartOfContent())return u;if((s=e(t))===o)return u}return n.removeRange(u,s,r)}},5462:function(t,e,r){"use strict";var n=r(9404).Map;t.exports=function(t,e,r){var i=e.getStartKey(),o=e.getEndKey(),u=t.getBlockMap(),s=u.toSeq().skipUntil((function(t,e){return e===i})).takeUntil((function(t,e){return e===o})).concat(n([[o,u.get(o)]])).map(r);return t.merge({blockMap:u.merge(s),selectionBefore:e,selectionAfter:e})}},7296:function(t,e,r){"use strict";var n=r(93816);t.exports=function(t){return!(!t||!t.ownerDocument)&&n(t)&&"IMG"===t.nodeName}},8748:function(t){"use strict";var e=/-(.)/g;t.exports=function(t){return t.replace(e,(function(t,e){return e.toUpperCase()}))}},8976:function(t,e,r){"use strict";var n=r(12242);t.exports=function(t,e,r){var i=n.undo(e);if("spellcheck-change"!==e.getLastChangeType())t.preventDefault(),e.getNativelyRenderedContent()?(r(n.set(e,{nativelyRenderedContent:null})),setTimeout((function(){r(i)}),0)):r(i);else{var o=i.getCurrentContent();r(n.set(i,{nativelyRenderedContent:o}))}}},9404:function(t){t.exports=function(){"use strict";var t=Array.prototype.slice;function e(t,e){e&&(t.prototype=Object.create(e.prototype)),t.prototype.constructor=t}function r(t){return u(t)?t:W(t)}function n(t){return s(t)?t:F(t)}function i(t){return a(t)?t:V(t)}function o(t){return u(t)&&!c(t)?t:H(t)}function u(t){return!(!t||!t[h])}function s(t){return!(!t||!t[l])}function a(t){return!(!t||!t[p])}function c(t){return s(t)||a(t)}function f(t){return!(!t||!t[g])}e(n,r),e(i,r),e(o,r),r.isIterable=u,r.isKeyed=s,r.isIndexed=a,r.isAssociative=c,r.isOrdered=f,r.Keyed=n,r.Indexed=i,r.Set=o;var h="@@__IMMUTABLE_ITERABLE__@@",l="@@__IMMUTABLE_KEYED__@@",p="@@__IMMUTABLE_INDEXED__@@",g="@@__IMMUTABLE_ORDERED__@@",v="delete",_=32,d=31,y={},m={value:!1},w={value:!1};function S(t){return t.value=!1,t}function x(t){t&&(t.value=!0)}function b(){}function O(t,e){e=e||0;for(var r=Math.max(0,t.length-e),n=new Array(r),i=0;i<r;i++)n[i]=t[i+e];return n}function E(t){return void 0===t.size&&(t.size=t.__iterate(K)),t.size}function I(t,e){if("number"!=typeof e){var r=e>>>0;if(""+r!==e||4294967295===r)return NaN;e=r}return e<0?E(t)+e:e}function K(){return!0}function D(t,e,r){return(0===t||void 0!==r&&t<=-r)&&(void 0===e||void 0!==r&&e>=r)}function A(t,e){return M(t,e,0)}function z(t,e){return M(t,e,e)}function M(t,e,r){return void 0===t?r:t<0?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}var k="function"==typeof Symbol&&Symbol.iterator,C="@@iterator",T=k||C;function L(t){this.next=t}function N(t,e,r,n){var i=0===t?e:1===t?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function q(){return{value:void 0,done:!0}}function R(t){return!!B(t)}function j(t){return t&&"function"==typeof t.next}function P(t){var e=B(t);return e&&e.call(t)}function B(t){var e=t&&(k&&t[k]||t[C]);if("function"==typeof e)return e}function U(t){return t&&"number"==typeof t.length}function W(t){return null==t?rt():u(t)?t.toSeq():function(t){var e=ot(t)||"object"==typeof t&&new Z(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}(t)}function F(t){return null==t?rt().toKeyedSeq():u(t)?s(t)?t.toSeq():t.fromEntrySeq():nt(t)}function V(t){return null==t?rt():u(t)?s(t)?t.entrySeq():t.toIndexedSeq():it(t)}function H(t){return(null==t?rt():u(t)?s(t)?t.entrySeq():t:it(t)).toSetSeq()}L.prototype.toString=function(){return"[Iterator]"},L.KEYS=0,L.VALUES=1,L.ENTRIES=2,L.prototype.inspect=L.prototype.toSource=function(){return this.toString()},L.prototype[T]=function(){return this},e(W,r),W.of=function(){return W(arguments)},W.prototype.toSeq=function(){return this},W.prototype.toString=function(){return this.__toString("Seq {","}")},W.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},W.prototype.__iterate=function(t,e){return ut(this,t,e,!0)},W.prototype.__iterator=function(t,e){return st(this,t,e,!0)},e(F,W),F.prototype.toKeyedSeq=function(){return this},e(V,W),V.of=function(){return V(arguments)},V.prototype.toIndexedSeq=function(){return this},V.prototype.toString=function(){return this.__toString("Seq [","]")},V.prototype.__iterate=function(t,e){return ut(this,t,e,!1)},V.prototype.__iterator=function(t,e){return st(this,t,e,!1)},e(H,W),H.of=function(){return H(arguments)},H.prototype.toSetSeq=function(){return this},W.isSeq=et,W.Keyed=F,W.Set=H,W.Indexed=V;var J,G,X,$="@@__IMMUTABLE_SEQ__@@";function Y(t){this._array=t,this.size=t.length}function Z(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function Q(t){this._iterable=t,this.size=t.length||t.size}function tt(t){this._iterator=t,this._iteratorCache=[]}function et(t){return!(!t||!t[$])}function rt(){return J||(J=new Y([]))}function nt(t){var e=Array.isArray(t)?new Y(t).fromEntrySeq():j(t)?new tt(t).fromEntrySeq():R(t)?new Q(t).fromEntrySeq():"object"==typeof t?new Z(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function it(t){var e=ot(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function ot(t){return U(t)?new Y(t):j(t)?new tt(t):R(t)?new Q(t):void 0}function ut(t,e,r,n){var i=t._cache;if(i){for(var o=i.length-1,u=0;u<=o;u++){var s=i[r?o-u:u];if(!1===e(s[1],n?s[0]:u,t))return u+1}return u}return t.__iterateUncached(e,r)}function st(t,e,r,n){var i=t._cache;if(i){var o=i.length-1,u=0;return new L((function(){var t=i[r?o-u:u];return u++>o?{value:void 0,done:!0}:N(e,n?t[0]:u-1,t[1])}))}return t.__iteratorUncached(e,r)}function at(t,e){return e?ct(e,t,"",{"":t}):ft(t)}function ct(t,e,r,n){return Array.isArray(e)?t.call(n,r,V(e).map((function(r,n){return ct(t,r,n,e)}))):ht(e)?t.call(n,r,F(e).map((function(r,n){return ct(t,r,n,e)}))):e}function ft(t){return Array.isArray(t)?V(t).map(ft).toList():ht(t)?F(t).map(ft).toMap():t}function ht(t){return t&&(t.constructor===Object||void 0===t.constructor)}function lt(t,e){if(t===e||t!=t&&e!=e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if((t=t.valueOf())===(e=e.valueOf())||t!=t&&e!=e)return!0;if(!t||!e)return!1}return!("function"!=typeof t.equals||"function"!=typeof e.equals||!t.equals(e))}function pt(t,e){if(t===e)return!0;if(!u(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||s(t)!==s(e)||a(t)!==a(e)||f(t)!==f(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!c(t);if(f(t)){var n=t.entries();return e.every((function(t,e){var i=n.next().value;return i&<(i[1],t)&&(r||lt(i[0],e))}))&&n.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var h=!0,l=e.__iterate((function(e,n){if(r?!t.has(e):i?!lt(e,t.get(n,y)):!lt(t.get(n,y),e))return h=!1,!1}));return h&&t.size===l}function gt(t,e){if(!(this instanceof gt))return new gt(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(G)return G;G=this}}function vt(t,e){if(!t)throw new Error(e)}function _t(t,e,r){if(!(this instanceof _t))return new _t(t,e,r);if(vt(0!==r,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),r=void 0===r?1:Math.abs(r),e<t&&(r=-r),this._start=t,this._end=e,this._step=r,this.size=Math.max(0,Math.ceil((e-t)/r-1)+1),0===this.size){if(X)return X;X=this}}function dt(){throw TypeError("Abstract")}function yt(){}function mt(){}function wt(){}W.prototype[$]=!0,e(Y,V),Y.prototype.get=function(t,e){return this.has(t)?this._array[I(this,t)]:e},Y.prototype.__iterate=function(t,e){for(var r=this._array,n=r.length-1,i=0;i<=n;i++)if(!1===t(r[e?n-i:i],i,this))return i+1;return i},Y.prototype.__iterator=function(t,e){var r=this._array,n=r.length-1,i=0;return new L((function(){return i>n?{value:void 0,done:!0}:N(t,i,r[e?n-i++:i++])}))},e(Z,F),Z.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},Z.prototype.has=function(t){return this._object.hasOwnProperty(t)},Z.prototype.__iterate=function(t,e){for(var r=this._object,n=this._keys,i=n.length-1,o=0;o<=i;o++){var u=n[e?i-o:o];if(!1===t(r[u],u,this))return o+1}return o},Z.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,i=n.length-1,o=0;return new L((function(){var u=n[e?i-o:o];return o++>i?{value:void 0,done:!0}:N(t,u,r[u])}))},Z.prototype[g]=!0,e(Q,V),Q.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=P(this._iterable),n=0;if(j(r))for(var i;!(i=r.next()).done&&!1!==t(i.value,n++,this););return n},Q.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=P(this._iterable);if(!j(r))return new L(q);var n=0;return new L((function(){var e=r.next();return e.done?e:N(t,n++,e.value)}))},e(tt,V),tt.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r,n=this._iterator,i=this._iteratorCache,o=0;o<i.length;)if(!1===t(i[o],o++,this))return o;for(;!(r=n.next()).done;){var u=r.value;if(i[o]=u,!1===t(u,o++,this))break}return o},tt.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterator,n=this._iteratorCache,i=0;return new L((function(){if(i>=n.length){var e=r.next();if(e.done)return e;n[i]=e.value}return N(t,i,n[i++])}))},e(gt,V),gt.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},gt.prototype.get=function(t,e){return this.has(t)?this._value:e},gt.prototype.includes=function(t){return lt(this._value,t)},gt.prototype.slice=function(t,e){var r=this.size;return D(t,e,r)?this:new gt(this._value,z(e,r)-A(t,r))},gt.prototype.reverse=function(){return this},gt.prototype.indexOf=function(t){return lt(this._value,t)?0:-1},gt.prototype.lastIndexOf=function(t){return lt(this._value,t)?this.size:-1},gt.prototype.__iterate=function(t,e){for(var r=0;r<this.size;r++)if(!1===t(this._value,r,this))return r+1;return r},gt.prototype.__iterator=function(t,e){var r=this,n=0;return new L((function(){return n<r.size?N(t,n++,r._value):{value:void 0,done:!0}}))},gt.prototype.equals=function(t){return t instanceof gt?lt(this._value,t._value):pt(t)},e(_t,V),_t.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},_t.prototype.get=function(t,e){return this.has(t)?this._start+I(this,t)*this._step:e},_t.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e<this.size&&e===Math.floor(e)},_t.prototype.slice=function(t,e){return D(t,e,this.size)?this:(t=A(t,this.size),(e=z(e,this.size))<=t?new _t(0,0):new _t(this.get(t,this._end),this.get(e,this._end),this._step))},_t.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step==0){var r=e/this._step;if(r>=0&&r<this.size)return r}return-1},_t.prototype.lastIndexOf=function(t){return this.indexOf(t)},_t.prototype.__iterate=function(t,e){for(var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,o=0;o<=r;o++){if(!1===t(i,o,this))return o+1;i+=e?-n:n}return o},_t.prototype.__iterator=function(t,e){var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,o=0;return new L((function(){var u=i;return i+=e?-n:n,o>r?{value:void 0,done:!0}:N(t,o++,u)}))},_t.prototype.equals=function(t){return t instanceof _t?this._start===t._start&&this._end===t._end&&this._step===t._step:pt(this,t)},e(dt,r),e(yt,dt),e(mt,dt),e(wt,dt),dt.Keyed=yt,dt.Indexed=mt,dt.Set=wt;var St="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){var r=65535&(t|=0),n=65535&(e|=0);return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0};function xt(t){return t>>>1&1073741824|3221225471&t}function bt(t){if(!1===t||null==t)return 0;if("function"==typeof t.valueOf&&(!1===(t=t.valueOf())||null==t))return 0;if(!0===t)return 1;var e=typeof t;if("number"===e){var r=0|t;for(r!==t&&(r^=4294967295*t);t>4294967295;)r^=t/=4294967295;return xt(r)}if("string"===e)return t.length>Mt?function(t){var e=Tt[t];return void 0===e&&(e=Ot(t),Ct===kt&&(Ct=0,Tt={}),Ct++,Tt[t]=e),e}(t):Ot(t);if("function"==typeof t.hashCode)return t.hashCode();if("object"===e)return function(t){var e;if(Dt&&void 0!==(e=Kt.get(t)))return e;if(void 0!==(e=t[zt]))return e;if(!It){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[zt]))return e;if(void 0!==(e=function(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}(t)))return e}if(e=++At,1073741824&At&&(At=0),Dt)Kt.set(t,e);else{if(void 0!==Et&&!1===Et(t))throw new Error("Non-extensible objects are not allowed as keys.");if(It)Object.defineProperty(t,zt,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[zt]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[zt]=e}}return e}(t);if("function"==typeof t.toString)return Ot(t.toString());throw new Error("Value type "+e+" cannot be hashed.")}function Ot(t){for(var e=0,r=0;r<t.length;r++)e=31*e+t.charCodeAt(r)|0;return xt(e)}var Et=Object.isExtensible,It=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}();var Kt,Dt="function"==typeof WeakMap;Dt&&(Kt=new WeakMap);var At=0,zt="__immutablehash__";"function"==typeof Symbol&&(zt=Symbol(zt));var Mt=16,kt=255,Ct=0,Tt={};function Lt(t){vt(t!==1/0,"Cannot perform this action with an infinite size.")}function Nt(t){return null==t?$t():qt(t)&&!f(t)?t:$t().withMutations((function(e){var r=n(t);Lt(r.size),r.forEach((function(t,r){return e.set(r,t)}))}))}function qt(t){return!(!t||!t[jt])}e(Nt,yt),Nt.prototype.toString=function(){return this.__toString("Map {","}")},Nt.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},Nt.prototype.set=function(t,e){return Yt(this,t,e)},Nt.prototype.setIn=function(t,e){return this.updateIn(t,y,(function(){return e}))},Nt.prototype.remove=function(t){return Yt(this,t,y)},Nt.prototype.deleteIn=function(t){return this.updateIn(t,(function(){return y}))},Nt.prototype.update=function(t,e,r){return 1===arguments.length?t(this):this.updateIn([t],e,r)},Nt.prototype.updateIn=function(t,e,r){r||(r=e,e=void 0);var n=oe(this,er(t),e,r);return n===y?void 0:n},Nt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):$t()},Nt.prototype.merge=function(){return ee(this,void 0,arguments)},Nt.prototype.mergeWith=function(e){return ee(this,e,t.call(arguments,1))},Nt.prototype.mergeIn=function(e){var r=t.call(arguments,1);return this.updateIn(e,$t(),(function(t){return"function"==typeof t.merge?t.merge.apply(t,r):r[r.length-1]}))},Nt.prototype.mergeDeep=function(){return ee(this,re,arguments)},Nt.prototype.mergeDeepWith=function(e){var r=t.call(arguments,1);return ee(this,ne(e),r)},Nt.prototype.mergeDeepIn=function(e){var r=t.call(arguments,1);return this.updateIn(e,$t(),(function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,r):r[r.length-1]}))},Nt.prototype.sort=function(t){return De(Fe(this,t))},Nt.prototype.sortBy=function(t,e){return De(Fe(this,e,t))},Nt.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},Nt.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new b)},Nt.prototype.asImmutable=function(){return this.__ensureOwner()},Nt.prototype.wasAltered=function(){return this.__altered},Nt.prototype.__iterator=function(t,e){return new Ht(this,t,e)},Nt.prototype.__iterate=function(t,e){var r=this,n=0;return this._root&&this._root.iterate((function(e){return n++,t(e[1],e[0],r)}),e),n},Nt.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Xt(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Nt.isMap=qt;var Rt,jt="@@__IMMUTABLE_MAP__@@",Pt=Nt.prototype;function Bt(t,e){this.ownerID=t,this.entries=e}function Ut(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r}function Wt(t,e,r){this.ownerID=t,this.count=e,this.nodes=r}function Ft(t,e,r){this.ownerID=t,this.keyHash=e,this.entries=r}function Vt(t,e,r){this.ownerID=t,this.keyHash=e,this.entry=r}function Ht(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&Gt(t._root)}function Jt(t,e){return N(t,e[0],e[1])}function Gt(t,e){return{node:t,index:0,__prev:e}}function Xt(t,e,r,n){var i=Object.create(Pt);return i.size=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function $t(){return Rt||(Rt=Xt(0))}function Yt(t,e,r){var n,i;if(t._root){var o=S(m),u=S(w);if(n=Zt(t._root,t.__ownerID,0,void 0,e,r,o,u),!u.value)return t;i=t.size+(o.value?r===y?-1:1:0)}else{if(r===y)return t;i=1,n=new Bt(t.__ownerID,[[e,r]])}return t.__ownerID?(t.size=i,t._root=n,t.__hash=void 0,t.__altered=!0,t):n?Xt(i,n):$t()}function Zt(t,e,r,n,i,o,u,s){return t?t.update(e,r,n,i,o,u,s):o===y?t:(x(s),x(u),new Vt(e,n,[i,o]))}function Qt(t){return t.constructor===Vt||t.constructor===Ft}function te(t,e,r,n,i){if(t.keyHash===n)return new Ft(e,n,[t.entry,i]);var o,u=(0===r?t.keyHash:t.keyHash>>>r)&d,s=(0===r?n:n>>>r)&d;return new Ut(e,1<<u|1<<s,u===s?[te(t,e,r+5,n,i)]:(o=new Vt(e,n,i),u<s?[t,o]:[o,t]))}function ee(t,e,r){for(var i=[],o=0;o<r.length;o++){var s=r[o],a=n(s);u(s)||(a=a.map((function(t){return at(t)}))),i.push(a)}return ie(t,e,i)}function re(t,e,r){return t&&t.mergeDeep&&u(e)?t.mergeDeep(e):lt(t,e)?t:e}function ne(t){return function(e,r,n){if(e&&e.mergeDeepWith&&u(r))return e.mergeDeepWith(t,r);var i=t(e,r,n);return lt(e,i)?e:i}}function ie(t,e,r){return 0===(r=r.filter((function(t){return 0!==t.size}))).length?t:0!==t.size||t.__ownerID||1!==r.length?t.withMutations((function(t){for(var n=e?function(r,n){t.update(n,y,(function(t){return t===y?r:e(t,r,n)}))}:function(e,r){t.set(r,e)},i=0;i<r.length;i++)r[i].forEach(n)})):t.constructor(r[0])}function oe(t,e,r,n){var i=t===y,o=e.next();if(o.done){var u=i?r:t,s=n(u);return s===u?t:s}vt(i||t&&t.set,"invalid keyPath");var a=o.value,c=i?y:t.get(a,y),f=oe(c,e,r,n);return f===c?t:f===y?t.remove(a):(i?$t():t).set(a,f)}function ue(t){return t=(t=(858993459&(t-=t>>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,127&(t+=t>>8)+(t>>16)}function se(t,e,r,n){var i=n?t:O(t);return i[e]=r,i}Pt[jt]=!0,Pt[v]=Pt.remove,Pt.removeIn=Pt.deleteIn,Bt.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;o<u;o++)if(lt(r,i[o][0]))return i[o][1];return n},Bt.prototype.update=function(t,e,r,n,i,o,u){for(var s=i===y,a=this.entries,c=0,f=a.length;c<f&&!lt(n,a[c][0]);c++);var h=c<f;if(h?a[c][1]===i:s)return this;if(x(u),(s||!h)&&x(o),!s||1!==a.length){if(!h&&!s&&a.length>=ae)return function(t,e,r,n){t||(t=new b);for(var i=new Vt(t,bt(r),[r,n]),o=0;o<e.length;o++){var u=e[o];i=i.update(t,0,void 0,u[0],u[1])}return i}(t,a,n,i);var l=t&&t===this.ownerID,p=l?a:O(a);return h?s?c===f-1?p.pop():p[c]=p.pop():p[c]=[n,i]:p.push([n,i]),l?(this.entries=p,this):new Bt(t,p)}},Ut.prototype.get=function(t,e,r,n){void 0===e&&(e=bt(r));var i=1<<((0===t?e:e>>>t)&d),o=this.bitmap;return o&i?this.nodes[ue(o&i-1)].get(t+5,e,r,n):n},Ut.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=bt(n));var s=(0===e?r:r>>>e)&d,a=1<<s,c=this.bitmap,f=!!(c&a);if(!f&&i===y)return this;var h=ue(c&a-1),l=this.nodes,p=f?l[h]:void 0,g=Zt(p,t,e+5,r,n,i,o,u);if(g===p)return this;if(!f&&g&&l.length>=ce)return function(t,e,r,n,i){for(var o=0,u=new Array(_),s=0;0!==r;s++,r>>>=1)u[s]=1&r?e[o++]:void 0;return u[n]=i,new Wt(t,o+1,u)}(t,l,c,s,g);if(f&&!g&&2===l.length&&Qt(l[1^h]))return l[1^h];if(f&&g&&1===l.length&&Qt(g))return g;var v=t&&t===this.ownerID,m=f?g?c:c^a:c|a,w=f?g?se(l,h,g,v):function(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=new Array(n),o=0,u=0;u<n;u++)u===e&&(o=1),i[u]=t[u+o];return i}(l,h,v):function(t,e,r,n){var i=t.length+1;if(n&&e+1===i)return t[e]=r,t;for(var o=new Array(i),u=0,s=0;s<i;s++)s===e?(o[s]=r,u=-1):o[s]=t[s+u];return o}(l,h,g,v);return v?(this.bitmap=m,this.nodes=w,this):new Ut(t,m,w)},Wt.prototype.get=function(t,e,r,n){void 0===e&&(e=bt(r));var i=(0===t?e:e>>>t)&d,o=this.nodes[i];return o?o.get(t+5,e,r,n):n},Wt.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=bt(n));var s=(0===e?r:r>>>e)&d,a=i===y,c=this.nodes,f=c[s];if(a&&!f)return this;var h=Zt(f,t,e+5,r,n,i,o,u);if(h===f)return this;var l=this.count;if(f){if(!h&&--l<fe)return function(t,e,r,n){for(var i=0,o=0,u=new Array(r),s=0,a=1,c=e.length;s<c;s++,a<<=1){var f=e[s];void 0!==f&&s!==n&&(i|=a,u[o++]=f)}return new Ut(t,i,u)}(t,c,l,s)}else l++;var p=t&&t===this.ownerID,g=se(c,s,h,p);return p?(this.count=l,this.nodes=g,this):new Wt(t,l,g)},Ft.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;o<u;o++)if(lt(r,i[o][0]))return i[o][1];return n},Ft.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=bt(n));var s=i===y;if(r!==this.keyHash)return s?this:(x(u),x(o),te(this,t,e,r,[n,i]));for(var a=this.entries,c=0,f=a.length;c<f&&!lt(n,a[c][0]);c++);var h=c<f;if(h?a[c][1]===i:s)return this;if(x(u),(s||!h)&&x(o),s&&2===f)return new Vt(t,this.keyHash,a[1^c]);var l=t&&t===this.ownerID,p=l?a:O(a);return h?s?c===f-1?p.pop():p[c]=p.pop():p[c]=[n,i]:p.push([n,i]),l?(this.entries=p,this):new Ft(t,this.keyHash,p)},Vt.prototype.get=function(t,e,r,n){return lt(r,this.entry[0])?this.entry[1]:n},Vt.prototype.update=function(t,e,r,n,i,o,u){var s=i===y,a=lt(n,this.entry[0]);return(a?i===this.entry[1]:s)?this:(x(u),s?void x(o):a?t&&t===this.ownerID?(this.entry[1]=i,this):new Vt(t,this.keyHash,[n,i]):(x(o),te(this,t,e,bt(n),[n,i])))},Bt.prototype.iterate=Ft.prototype.iterate=function(t,e){for(var r=this.entries,n=0,i=r.length-1;n<=i;n++)if(!1===t(r[e?i-n:n]))return!1},Ut.prototype.iterate=Wt.prototype.iterate=function(t,e){for(var r=this.nodes,n=0,i=r.length-1;n<=i;n++){var o=r[e?i-n:n];if(o&&!1===o.iterate(t,e))return!1}},Vt.prototype.iterate=function(t,e){return t(this.entry)},e(Ht,L),Ht.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var r,n=e.node,i=e.index++;if(n.entry){if(0===i)return Jt(t,n.entry)}else if(n.entries){if(i<=(r=n.entries.length-1))return Jt(t,n.entries[this._reverse?r-i:i])}else if(i<=(r=n.nodes.length-1)){var o=n.nodes[this._reverse?r-i:i];if(o){if(o.entry)return Jt(t,o.entry);e=this._stack=Gt(o,e)}continue}e=this._stack=this._stack.__prev}return{value:void 0,done:!0}};var ae=8,ce=16,fe=8;function he(t){var e=Se();if(null==t)return e;if(le(t))return t;var r=i(t),n=r.size;return 0===n?e:(Lt(n),n>0&&n<_?we(0,n,5,null,new ve(r.toArray())):e.withMutations((function(t){t.setSize(n),r.forEach((function(e,r){return t.set(r,e)}))})))}function le(t){return!(!t||!t[pe])}e(he,mt),he.of=function(){return this(arguments)},he.prototype.toString=function(){return this.__toString("List [","]")},he.prototype.get=function(t,e){if((t=I(this,t))>=0&&t<this.size){var r=Oe(this,t+=this._origin);return r&&r.array[t&d]}return e},he.prototype.set=function(t,e){return function(t,e,r){if((e=I(t,e))!=e)return t;if(e>=t.size||e<0)return t.withMutations((function(t){e<0?Ee(t,e).set(0,r):Ee(t,0,e+1).set(e,r)}));e+=t._origin;var n=t._tail,i=t._root,o=S(w);return e>=Ke(t._capacity)?n=xe(n,t.__ownerID,0,e,r,o):i=xe(i,t.__ownerID,t._level,e,r,o),o.value?t.__ownerID?(t._root=i,t._tail=n,t.__hash=void 0,t.__altered=!0,t):we(t._origin,t._capacity,t._level,i,n):t}(this,t,e)},he.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},he.prototype.insert=function(t,e){return this.splice(t,0,e)},he.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Se()},he.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations((function(r){Ee(r,0,e+t.length);for(var n=0;n<t.length;n++)r.set(e+n,t[n])}))},he.prototype.pop=function(){return Ee(this,0,-1)},he.prototype.unshift=function(){var t=arguments;return this.withMutations((function(e){Ee(e,-t.length);for(var r=0;r<t.length;r++)e.set(r,t[r])}))},he.prototype.shift=function(){return Ee(this,1)},he.prototype.merge=function(){return Ie(this,void 0,arguments)},he.prototype.mergeWith=function(e){return Ie(this,e,t.call(arguments,1))},he.prototype.mergeDeep=function(){return Ie(this,re,arguments)},he.prototype.mergeDeepWith=function(e){var r=t.call(arguments,1);return Ie(this,ne(e),r)},he.prototype.setSize=function(t){return Ee(this,0,t)},he.prototype.slice=function(t,e){var r=this.size;return D(t,e,r)?this:Ee(this,A(t,r),z(e,r))},he.prototype.__iterator=function(t,e){var r=0,n=me(this,e);return new L((function(){var e=n();return e===ye?{value:void 0,done:!0}:N(t,r++,e)}))},he.prototype.__iterate=function(t,e){for(var r,n=0,i=me(this,e);(r=i())!==ye&&!1!==t(r,n++,this););return n},he.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?we(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):(this.__ownerID=t,this)},he.isList=le;var pe="@@__IMMUTABLE_LIST__@@",ge=he.prototype;function ve(t,e){this.array=t,this.ownerID=e}ge[pe]=!0,ge[v]=ge.remove,ge.setIn=Pt.setIn,ge.deleteIn=ge.removeIn=Pt.removeIn,ge.update=Pt.update,ge.updateIn=Pt.updateIn,ge.mergeIn=Pt.mergeIn,ge.mergeDeepIn=Pt.mergeDeepIn,ge.withMutations=Pt.withMutations,ge.asMutable=Pt.asMutable,ge.asImmutable=Pt.asImmutable,ge.wasAltered=Pt.wasAltered,ve.prototype.removeBefore=function(t,e,r){if(r===e?1<<e:0===this.array.length)return this;var n=r>>>e&d;if(n>=this.array.length)return new ve([],t);var i,o=0===n;if(e>0){var u=this.array[n];if((i=u&&u.removeBefore(t,e-5,r))===u&&o)return this}if(o&&!i)return this;var s=be(this,t);if(!o)for(var a=0;a<n;a++)s.array[a]=void 0;return i&&(s.array[n]=i),s},ve.prototype.removeAfter=function(t,e,r){if(r===(e?1<<e:0)||0===this.array.length)return this;var n,i=r-1>>>e&d;if(i>=this.array.length)return this;if(e>0){var o=this.array[i];if((n=o&&o.removeAfter(t,e-5,r))===o&&i===this.array.length-1)return this}var u=be(this,t);return u.array.splice(i+1),n&&(u.array[i]=n),u};var _e,de,ye={};function me(t,e){var r=t._origin,n=t._capacity,i=Ke(n),o=t._tail;return u(t._root,t._level,0);function u(t,s,a){return 0===s?function(t,u){var s=u===i?o&&o.array:t&&t.array,a=u>r?0:r-u,c=n-u;return c>_&&(c=_),function(){if(a===c)return ye;var t=e?--c:a++;return s&&s[t]}}(t,a):function(t,i,o){var s,a=t&&t.array,c=o>r?0:r-o>>i,f=1+(n-o>>i);return f>_&&(f=_),function(){for(;;){if(s){var t=s();if(t!==ye)return t;s=null}if(c===f)return ye;var r=e?--f:c++;s=u(a&&a[r],i-5,o+(r<<i))}}}(t,s,a)}}function we(t,e,r,n,i,o,u){var s=Object.create(ge);return s.size=e-t,s._origin=t,s._capacity=e,s._level=r,s._root=n,s._tail=i,s.__ownerID=o,s.__hash=u,s.__altered=!1,s}function Se(){return _e||(_e=we(0,0,5))}function xe(t,e,r,n,i,o){var u,s=n>>>r&d,a=t&&s<t.array.length;if(!a&&void 0===i)return t;if(r>0){var c=t&&t.array[s],f=xe(c,e,r-5,n,i,o);return f===c?t:((u=be(t,e)).array[s]=f,u)}return a&&t.array[s]===i?t:(x(o),u=be(t,e),void 0===i&&s===u.array.length-1?u.array.pop():u.array[s]=i,u)}function be(t,e){return e&&t&&e===t.ownerID?t:new ve(t?t.array.slice():[],e)}function Oe(t,e){if(e>=Ke(t._capacity))return t._tail;if(e<1<<t._level+5){for(var r=t._root,n=t._level;r&&n>0;)r=r.array[e>>>n&d],n-=5;return r}}function Ee(t,e,r){void 0!==e&&(e|=0),void 0!==r&&(r|=0);var n=t.__ownerID||new b,i=t._origin,o=t._capacity,u=i+e,s=void 0===r?o:r<0?o+r:i+r;if(u===i&&s===o)return t;if(u>=s)return t.clear();for(var a=t._level,c=t._root,f=0;u+f<0;)c=new ve(c&&c.array.length?[void 0,c]:[],n),f+=1<<(a+=5);f&&(u+=f,i+=f,s+=f,o+=f);for(var h=Ke(o),l=Ke(s);l>=1<<a+5;)c=new ve(c&&c.array.length?[c]:[],n),a+=5;var p=t._tail,g=l<h?Oe(t,s-1):l>h?new ve([],n):p;if(p&&l>h&&u<o&&p.array.length){for(var v=c=be(c,n),_=a;_>5;_-=5){var y=h>>>_&d;v=v.array[y]=be(v.array[y],n)}v.array[h>>>5&d]=p}if(s<o&&(g=g&&g.removeAfter(n,0,s)),u>=l)u-=l,s-=l,a=5,c=null,g=g&&g.removeBefore(n,0,u);else if(u>i||l<h){for(f=0;c;){var m=u>>>a&d;if(m!==l>>>a&d)break;m&&(f+=(1<<a)*m),a-=5,c=c.array[m]}c&&u>i&&(c=c.removeBefore(n,a,u-f)),c&&l<h&&(c=c.removeAfter(n,a,l-f)),f&&(u-=f,s-=f)}return t.__ownerID?(t.size=s-u,t._origin=u,t._capacity=s,t._level=a,t._root=c,t._tail=g,t.__hash=void 0,t.__altered=!0,t):we(u,s,a,c,g)}function Ie(t,e,r){for(var n=[],o=0,s=0;s<r.length;s++){var a=r[s],c=i(a);c.size>o&&(o=c.size),u(a)||(c=c.map((function(t){return at(t)}))),n.push(c)}return o>t.size&&(t=t.setSize(o)),ie(t,e,n)}function Ke(t){return t<_?0:t-1>>>5<<5}function De(t){return null==t?Me():Ae(t)?t:Me().withMutations((function(e){var r=n(t);Lt(r.size),r.forEach((function(t,r){return e.set(r,t)}))}))}function Ae(t){return qt(t)&&f(t)}function ze(t,e,r,n){var i=Object.create(De.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=r,i.__hash=n,i}function Me(){return de||(de=ze($t(),Se()))}function ke(t,e,r){var n,i,o=t._map,u=t._list,s=o.get(e),a=void 0!==s;if(r===y){if(!a)return t;u.size>=_&&u.size>=2*o.size?(n=(i=u.filter((function(t,e){return void 0!==t&&s!==e}))).toKeyedSeq().map((function(t){return t[0]})).flip().toMap(),t.__ownerID&&(n.__ownerID=i.__ownerID=t.__ownerID)):(n=o.remove(e),i=s===u.size-1?u.pop():u.set(s,void 0))}else if(a){if(r===u.get(s)[1])return t;n=o,i=u.set(s,[e,r])}else n=o.set(e,u.size),i=u.set(u.size,[e,r]);return t.__ownerID?(t.size=n.size,t._map=n,t._list=i,t.__hash=void 0,t):ze(n,i)}function Ce(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function Te(t){this._iter=t,this.size=t.size}function Le(t){this._iter=t,this.size=t.size}function Ne(t){this._iter=t,this.size=t.size}function qe(t){var e=Ze(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=Qe,e.__iterateUncached=function(e,r){var n=this;return t.__iterate((function(t,r){return!1!==e(r,t,n)}),r)},e.__iteratorUncached=function(e,r){if(2===e){var n=t.__iterator(e,r);return new L((function(){var t=n.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t}))}return t.__iterator(1===e?0:1,r)},e}function Re(t,e,r){var n=Ze(t);return n.size=t.size,n.has=function(e){return t.has(e)},n.get=function(n,i){var o=t.get(n,y);return o===y?i:e.call(r,o,n,t)},n.__iterateUncached=function(n,i){var o=this;return t.__iterate((function(t,i,u){return!1!==n(e.call(r,t,i,u),i,o)}),i)},n.__iteratorUncached=function(n,i){var o=t.__iterator(2,i);return new L((function(){var i=o.next();if(i.done)return i;var u=i.value,s=u[0];return N(n,s,e.call(r,u[1],s,t),i)}))},n}function je(t,e){var r=Ze(t);return r._iter=t,r.size=t.size,r.reverse=function(){return t},t.flip&&(r.flip=function(){var e=qe(t);return e.reverse=function(){return t.flip()},e}),r.get=function(r,n){return t.get(e?r:-1-r,n)},r.has=function(r){return t.has(e?r:-1-r)},r.includes=function(e){return t.includes(e)},r.cacheResult=Qe,r.__iterate=function(e,r){var n=this;return t.__iterate((function(t,r){return e(t,r,n)}),!r)},r.__iterator=function(e,r){return t.__iterator(e,!r)},r}function Pe(t,e,r,n){var i=Ze(t);return n&&(i.has=function(n){var i=t.get(n,y);return i!==y&&!!e.call(r,i,n,t)},i.get=function(n,i){var o=t.get(n,y);return o!==y&&e.call(r,o,n,t)?o:i}),i.__iterateUncached=function(i,o){var u=this,s=0;return t.__iterate((function(t,o,a){if(e.call(r,t,o,a))return s++,i(t,n?o:s-1,u)}),o),s},i.__iteratorUncached=function(i,o){var u=t.__iterator(2,o),s=0;return new L((function(){for(;;){var o=u.next();if(o.done)return o;var a=o.value,c=a[0],f=a[1];if(e.call(r,f,c,t))return N(i,n?c:s++,f,o)}}))},i}function Be(t,e,r,n){var i=t.size;if(void 0!==e&&(e|=0),void 0!==r&&(r|=0),D(e,r,i))return t;var o=A(e,i),u=z(r,i);if(o!=o||u!=u)return Be(t.toSeq().cacheResult(),e,r,n);var s,a=u-o;a==a&&(s=a<0?0:a);var c=Ze(t);return c.size=0===s?s:t.size&&s||void 0,!n&&et(t)&&s>=0&&(c.get=function(e,r){return(e=I(this,e))>=0&&e<s?t.get(e+o,r):r}),c.__iterateUncached=function(e,r){var i=this;if(0===s)return 0;if(r)return this.cacheResult().__iterate(e,r);var u=0,a=!0,c=0;return t.__iterate((function(t,r){if(!a||!(a=u++<o))return c++,!1!==e(t,n?r:c-1,i)&&c!==s})),c},c.__iteratorUncached=function(e,r){if(0!==s&&r)return this.cacheResult().__iterator(e,r);var i=0!==s&&t.__iterator(e,r),u=0,a=0;return new L((function(){for(;u++<o;)i.next();if(++a>s)return{value:void 0,done:!0};var t=i.next();return n||1===e?t:N(e,a-1,0===e?void 0:t.value[1],t)}))},c}function Ue(t,e,r,n){var i=Ze(t);return i.__iterateUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,a=0;return t.__iterate((function(t,o,c){if(!s||!(s=e.call(r,t,o,c)))return a++,i(t,n?o:a-1,u)})),a},i.__iteratorUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterator(i,o);var s=t.__iterator(2,o),a=!0,c=0;return new L((function(){var t,o,f;do{if((t=s.next()).done)return n||1===i?t:N(i,c++,0===i?void 0:t.value[1],t);var h=t.value;o=h[0],f=h[1],a&&(a=e.call(r,f,o,u))}while(a);return 2===i?t:N(i,o,f,t)}))},i}function We(t,e,r){var n=Ze(t);return n.__iterateUncached=function(n,i){var o=0,s=!1;return function t(a,c){var f=this;a.__iterate((function(i,a){return(!e||c<e)&&u(i)?t(i,c+1):!1===n(i,r?a:o++,f)&&(s=!0),!s}),i)}(t,0),o},n.__iteratorUncached=function(n,i){var o=t.__iterator(n,i),s=[],a=0;return new L((function(){for(;o;){var t=o.next();if(!1===t.done){var c=t.value;if(2===n&&(c=c[1]),e&&!(s.length<e)||!u(c))return r?t:N(n,a++,c,t);s.push(o),o=c.__iterator(n,i)}else o=s.pop()}return{value:void 0,done:!0}}))},n}function Fe(t,e,r){e||(e=tr);var n=s(t),i=0,o=t.toSeq().map((function(e,n){return[n,e,i++,r?r(e,n,t):e]})).toArray();return o.sort((function(t,r){return e(t[3],r[3])||t[2]-r[2]})).forEach(n?function(t,e){o[e].length=2}:function(t,e){o[e]=t[1]}),n?F(o):a(t)?V(o):H(o)}function Ve(t,e,r){if(e||(e=tr),r){var n=t.toSeq().map((function(e,n){return[e,r(e,n,t)]})).reduce((function(t,r){return He(e,t[1],r[1])?r:t}));return n&&n[0]}return t.reduce((function(t,r){return He(e,t,r)?r:t}))}function He(t,e,r){var n=t(r,e);return 0===n&&r!==e&&(null==r||r!=r)||n>0}function Je(t,e,n){var i=Ze(t);return i.size=new Y(n).map((function(t){return t.size})).min(),i.__iterate=function(t,e){for(var r,n=this.__iterator(1,e),i=0;!(r=n.next()).done&&!1!==t(r.value,i++,this););return i},i.__iteratorUncached=function(t,i){var o=n.map((function(t){return t=r(t),P(i?t.reverse():t)})),u=0,s=!1;return new L((function(){var r;return s||(r=o.map((function(t){return t.next()})),s=r.some((function(t){return t.done}))),s?{value:void 0,done:!0}:N(t,u++,e.apply(null,r.map((function(t){return t.value}))))}))},i}function Ge(t,e){return et(t)?e:t.constructor(e)}function Xe(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function $e(t){return Lt(t.size),E(t)}function Ye(t){return s(t)?n:a(t)?i:o}function Ze(t){return Object.create((s(t)?F:a(t)?V:H).prototype)}function Qe(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):W.prototype.cacheResult.call(this)}function tr(t,e){return t>e?1:t<e?-1:0}function er(t){var e=P(t);if(!e){if(!U(t))throw new TypeError("Expected iterable or array-like: "+t);e=P(r(t))}return e}function rr(t,e){var r,n=function(o){if(o instanceof n)return o;if(!(this instanceof n))return new n(o);if(!r){r=!0;var u=Object.keys(t);(function(t,e){try{e.forEach(ur.bind(void 0,t))}catch(t){}})(i,u),i.size=u.length,i._name=e,i._keys=u,i._defaultValues=t}this._map=Nt(o)},i=n.prototype=Object.create(nr);return i.constructor=n,n}e(De,Nt),De.of=function(){return this(arguments)},De.prototype.toString=function(){return this.__toString("OrderedMap {","}")},De.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},De.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Me()},De.prototype.set=function(t,e){return ke(this,t,e)},De.prototype.remove=function(t){return ke(this,t,y)},De.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},De.prototype.__iterate=function(t,e){var r=this;return this._list.__iterate((function(e){return e&&t(e[1],e[0],r)}),e)},De.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},De.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?ze(e,r,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=r,this)},De.isOrderedMap=Ae,De.prototype[g]=!0,De.prototype[v]=De.prototype.remove,e(Ce,F),Ce.prototype.get=function(t,e){return this._iter.get(t,e)},Ce.prototype.has=function(t){return this._iter.has(t)},Ce.prototype.valueSeq=function(){return this._iter.valueSeq()},Ce.prototype.reverse=function(){var t=this,e=je(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},Ce.prototype.map=function(t,e){var r=this,n=Re(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},Ce.prototype.__iterate=function(t,e){var r,n=this;return this._iter.__iterate(this._useKeys?function(e,r){return t(e,r,n)}:(r=e?$e(this):0,function(i){return t(i,e?--r:r++,n)}),e)},Ce.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var r=this._iter.__iterator(1,e),n=e?$e(this):0;return new L((function(){var i=r.next();return i.done?i:N(t,e?--n:n++,i.value,i)}))},Ce.prototype[g]=!0,e(Te,V),Te.prototype.includes=function(t){return this._iter.includes(t)},Te.prototype.__iterate=function(t,e){var r=this,n=0;return this._iter.__iterate((function(e){return t(e,n++,r)}),e)},Te.prototype.__iterator=function(t,e){var r=this._iter.__iterator(1,e),n=0;return new L((function(){var e=r.next();return e.done?e:N(t,n++,e.value,e)}))},e(Le,H),Le.prototype.has=function(t){return this._iter.includes(t)},Le.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate((function(e){return t(e,e,r)}),e)},Le.prototype.__iterator=function(t,e){var r=this._iter.__iterator(1,e);return new L((function(){var e=r.next();return e.done?e:N(t,e.value,e.value,e)}))},e(Ne,F),Ne.prototype.entrySeq=function(){return this._iter.toSeq()},Ne.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate((function(e){if(e){Xe(e);var n=u(e);return t(n?e.get(1):e[1],n?e.get(0):e[0],r)}}),e)},Ne.prototype.__iterator=function(t,e){var r=this._iter.__iterator(1,e);return new L((function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n){Xe(n);var i=u(n);return N(t,i?n.get(0):n[0],i?n.get(1):n[1],e)}}}))},Te.prototype.cacheResult=Ce.prototype.cacheResult=Le.prototype.cacheResult=Ne.prototype.cacheResult=Qe,e(rr,yt),rr.prototype.toString=function(){return this.__toString(or(this)+" {","}")},rr.prototype.has=function(t){return this._defaultValues.hasOwnProperty(t)},rr.prototype.get=function(t,e){if(!this.has(t))return e;var r=this._defaultValues[t];return this._map?this._map.get(t,r):r},rr.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var t=this.constructor;return t._empty||(t._empty=ir(this,$t()))},rr.prototype.set=function(t,e){if(!this.has(t))throw new Error('Cannot set unknown key "'+t+'" on '+or(this));var r=this._map&&this._map.set(t,e);return this.__ownerID||r===this._map?this:ir(this,r)},rr.prototype.remove=function(t){if(!this.has(t))return this;var e=this._map&&this._map.remove(t);return this.__ownerID||e===this._map?this:ir(this,e)},rr.prototype.wasAltered=function(){return this._map.wasAltered()},rr.prototype.__iterator=function(t,e){var r=this;return n(this._defaultValues).map((function(t,e){return r.get(e)})).__iterator(t,e)},rr.prototype.__iterate=function(t,e){var r=this;return n(this._defaultValues).map((function(t,e){return r.get(e)})).__iterate(t,e)},rr.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?ir(this,e,t):(this.__ownerID=t,this._map=e,this)};var nr=rr.prototype;function ir(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._map=e,n.__ownerID=r,n}function or(t){return t._name||t.constructor.name||"Record"}function ur(t,e){Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){vt(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}function sr(t){return null==t?gr():ar(t)&&!f(t)?t:gr().withMutations((function(e){var r=o(t);Lt(r.size),r.forEach((function(t){return e.add(t)}))}))}function ar(t){return!(!t||!t[fr])}nr[v]=nr.remove,nr.deleteIn=nr.removeIn=Pt.removeIn,nr.merge=Pt.merge,nr.mergeWith=Pt.mergeWith,nr.mergeIn=Pt.mergeIn,nr.mergeDeep=Pt.mergeDeep,nr.mergeDeepWith=Pt.mergeDeepWith,nr.mergeDeepIn=Pt.mergeDeepIn,nr.setIn=Pt.setIn,nr.update=Pt.update,nr.updateIn=Pt.updateIn,nr.withMutations=Pt.withMutations,nr.asMutable=Pt.asMutable,nr.asImmutable=Pt.asImmutable,e(sr,wt),sr.of=function(){return this(arguments)},sr.fromKeys=function(t){return this(n(t).keySeq())},sr.prototype.toString=function(){return this.__toString("Set {","}")},sr.prototype.has=function(t){return this._map.has(t)},sr.prototype.add=function(t){return lr(this,this._map.set(t,!0))},sr.prototype.remove=function(t){return lr(this,this._map.remove(t))},sr.prototype.clear=function(){return lr(this,this._map.clear())},sr.prototype.union=function(){var e=t.call(arguments,0);return 0===(e=e.filter((function(t){return 0!==t.size}))).length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations((function(t){for(var r=0;r<e.length;r++)o(e[r]).forEach((function(e){return t.add(e)}))})):this.constructor(e[0])},sr.prototype.intersect=function(){var e=t.call(arguments,0);if(0===e.length)return this;e=e.map((function(t){return o(t)}));var r=this;return this.withMutations((function(t){r.forEach((function(r){e.every((function(t){return t.includes(r)}))||t.remove(r)}))}))},sr.prototype.subtract=function(){var e=t.call(arguments,0);if(0===e.length)return this;e=e.map((function(t){return o(t)}));var r=this;return this.withMutations((function(t){r.forEach((function(r){e.some((function(t){return t.includes(r)}))&&t.remove(r)}))}))},sr.prototype.merge=function(){return this.union.apply(this,arguments)},sr.prototype.mergeWith=function(e){var r=t.call(arguments,1);return this.union.apply(this,r)},sr.prototype.sort=function(t){return vr(Fe(this,t))},sr.prototype.sortBy=function(t,e){return vr(Fe(this,e,t))},sr.prototype.wasAltered=function(){return this._map.wasAltered()},sr.prototype.__iterate=function(t,e){var r=this;return this._map.__iterate((function(e,n){return t(n,n,r)}),e)},sr.prototype.__iterator=function(t,e){return this._map.map((function(t,e){return e})).__iterator(t,e)},sr.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):(this.__ownerID=t,this._map=e,this)},sr.isSet=ar;var cr,fr="@@__IMMUTABLE_SET__@@",hr=sr.prototype;function lr(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function pr(t,e){var r=Object.create(hr);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function gr(){return cr||(cr=pr($t()))}function vr(t){return null==t?wr():_r(t)?t:wr().withMutations((function(e){var r=o(t);Lt(r.size),r.forEach((function(t){return e.add(t)}))}))}function _r(t){return ar(t)&&f(t)}hr[fr]=!0,hr[v]=hr.remove,hr.mergeDeep=hr.merge,hr.mergeDeepWith=hr.mergeWith,hr.withMutations=Pt.withMutations,hr.asMutable=Pt.asMutable,hr.asImmutable=Pt.asImmutable,hr.__empty=gr,hr.__make=pr,e(vr,sr),vr.of=function(){return this(arguments)},vr.fromKeys=function(t){return this(n(t).keySeq())},vr.prototype.toString=function(){return this.__toString("OrderedSet {","}")},vr.isOrderedSet=_r;var dr,yr=vr.prototype;function mr(t,e){var r=Object.create(yr);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function wr(){return dr||(dr=mr(Me()))}function Sr(t){return null==t?Kr():xr(t)?t:Kr().unshiftAll(t)}function xr(t){return!(!t||!t[Or])}yr[g]=!0,yr.__empty=wr,yr.__make=mr,e(Sr,mt),Sr.of=function(){return this(arguments)},Sr.prototype.toString=function(){return this.__toString("Stack [","]")},Sr.prototype.get=function(t,e){var r=this._head;for(t=I(this,t);r&&t--;)r=r.next;return r?r.value:e},Sr.prototype.peek=function(){return this._head&&this._head.value},Sr.prototype.push=function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,r=arguments.length-1;r>=0;r--)e={value:arguments[r],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):Ir(t,e)},Sr.prototype.pushAll=function(t){if(0===(t=i(t)).size)return this;Lt(t.size);var e=this.size,r=this._head;return t.reverse().forEach((function(t){e++,r={value:t,next:r}})),this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):Ir(e,r)},Sr.prototype.pop=function(){return this.slice(1)},Sr.prototype.unshift=function(){return this.push.apply(this,arguments)},Sr.prototype.unshiftAll=function(t){return this.pushAll(t)},Sr.prototype.shift=function(){return this.pop.apply(this,arguments)},Sr.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Kr()},Sr.prototype.slice=function(t,e){if(D(t,e,this.size))return this;var r=A(t,this.size);if(z(e,this.size)!==this.size)return mt.prototype.slice.call(this,t,e);for(var n=this.size-r,i=this._head;r--;)i=i.next;return this.__ownerID?(this.size=n,this._head=i,this.__hash=void 0,this.__altered=!0,this):Ir(n,i)},Sr.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Ir(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Sr.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var r=0,n=this._head;n&&!1!==t(n.value,r++,this);)n=n.next;return r},Sr.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var r=0,n=this._head;return new L((function(){if(n){var e=n.value;return n=n.next,N(t,r++,e)}return{value:void 0,done:!0}}))},Sr.isStack=xr;var br,Or="@@__IMMUTABLE_STACK__@@",Er=Sr.prototype;function Ir(t,e,r,n){var i=Object.create(Er);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Kr(){return br||(br=Ir(0))}function Dr(t,e){var r=function(r){t.prototype[r]=e[r]};return Object.keys(e).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r),t}Er[Or]=!0,Er.withMutations=Pt.withMutations,Er.asMutable=Pt.asMutable,Er.asImmutable=Pt.asImmutable,Er.wasAltered=Pt.wasAltered,r.Iterator=L,Dr(r,{toArray:function(){Lt(this.size);var t=new Array(this.size||0);return this.valueSeq().__iterate((function(e,r){t[r]=e})),t},toIndexedSeq:function(){return new Te(this)},toJS:function(){return this.toSeq().map((function(t){return t&&"function"==typeof t.toJS?t.toJS():t})).__toJS()},toJSON:function(){return this.toSeq().map((function(t){return t&&"function"==typeof t.toJSON?t.toJSON():t})).__toJS()},toKeyedSeq:function(){return new Ce(this,!0)},toMap:function(){return Nt(this.toKeyedSeq())},toObject:function(){Lt(this.size);var t={};return this.__iterate((function(e,r){t[r]=e})),t},toOrderedMap:function(){return De(this.toKeyedSeq())},toOrderedSet:function(){return vr(s(this)?this.valueSeq():this)},toSet:function(){return sr(s(this)?this.valueSeq():this)},toSetSeq:function(){return new Le(this)},toSeq:function(){return a(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Sr(s(this)?this.valueSeq():this)},toList:function(){return he(s(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){return Ge(this,function(t,e){var r=s(t),i=[t].concat(e).map((function(t){return u(t)?r&&(t=n(t)):t=r?nt(t):it(Array.isArray(t)?t:[t]),t})).filter((function(t){return 0!==t.size}));if(0===i.length)return t;if(1===i.length){var o=i[0];if(o===t||r&&s(o)||a(t)&&a(o))return o}var c=new Y(i);return r?c=c.toKeyedSeq():a(t)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=i.reduce((function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}}),0),c}(this,t.call(arguments,0)))},includes:function(t){return this.some((function(e){return lt(e,t)}))},entries:function(){return this.__iterator(2)},every:function(t,e){Lt(this.size);var r=!0;return this.__iterate((function(n,i,o){if(!t.call(e,n,i,o))return r=!1,!1})),r},filter:function(t,e){return Ge(this,Pe(this,t,e,!0))},find:function(t,e,r){var n=this.findEntry(t,e);return n?n[1]:r},findEntry:function(t,e){var r;return this.__iterate((function(n,i,o){if(t.call(e,n,i,o))return r=[i,n],!1})),r},findLastEntry:function(t,e){return this.toSeq().reverse().findEntry(t,e)},forEach:function(t,e){return Lt(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){Lt(this.size),t=void 0!==t?""+t:",";var e="",r=!0;return this.__iterate((function(n){r?r=!1:e+=t,e+=null!=n?n.toString():""})),e},keys:function(){return this.__iterator(0)},map:function(t,e){return Ge(this,Re(this,t,e))},reduce:function(t,e,r){var n,i;return Lt(this.size),arguments.length<2?i=!0:n=e,this.__iterate((function(e,o,u){i?(i=!1,n=e):n=t.call(r,n,e,o,u)})),n},reduceRight:function(t,e,r){var n=this.toKeyedSeq().reverse();return n.reduce.apply(n,arguments)},reverse:function(){return Ge(this,je(this,!0))},slice:function(t,e){return Ge(this,Be(this,t,e,!0))},some:function(t,e){return!this.every(Cr(t),e)},sort:function(t){return Ge(this,Fe(this,t))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(t,e){return E(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return function(t,e,r){var n=Nt().asMutable();return t.__iterate((function(i,o){n.update(e.call(r,i,o,t),0,(function(t){return t+1}))})),n.asImmutable()}(this,t,e)},equals:function(t){return pt(this,t)},entrySeq:function(){var t=this;if(t._cache)return new Y(t._cache);var e=t.toSeq().map(kr).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(Cr(t),e)},findLast:function(t,e,r){return this.toKeyedSeq().reverse().find(t,e,r)},first:function(){return this.find(K)},flatMap:function(t,e){return Ge(this,function(t,e,r){var n=Ye(t);return t.toSeq().map((function(i,o){return n(e.call(r,i,o,t))})).flatten(!0)}(this,t,e))},flatten:function(t){return Ge(this,We(this,t,!0))},fromEntrySeq:function(){return new Ne(this)},get:function(t,e){return this.find((function(e,r){return lt(r,t)}),void 0,e)},getIn:function(t,e){for(var r,n=this,i=er(t);!(r=i.next()).done;){var o=r.value;if((n=n&&n.get?n.get(o,y):y)===y)return e}return n},groupBy:function(t,e){return function(t,e,r){var n=s(t),i=(f(t)?De():Nt()).asMutable();t.__iterate((function(o,u){i.update(e.call(r,o,u,t),(function(t){return(t=t||[]).push(n?[u,o]:o),t}))}));var o=Ye(t);return i.map((function(e){return Ge(t,o(e))}))}(this,t,e)},has:function(t){return this.get(t,y)!==y},hasIn:function(t){return this.getIn(t,y)!==y},isSubset:function(t){return t="function"==typeof t.includes?t:r(t),this.every((function(e){return t.includes(e)}))},isSuperset:function(t){return(t="function"==typeof t.isSubset?t:r(t)).isSubset(this)},keySeq:function(){return this.toSeq().map(Mr).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(t){return Ve(this,t)},maxBy:function(t,e){return Ve(this,e,t)},min:function(t){return Ve(this,t?Tr(t):qr)},minBy:function(t,e){return Ve(this,e?Tr(e):qr,t)},rest:function(){return this.slice(1)},skip:function(t){return this.slice(Math.max(0,t))},skipLast:function(t){return Ge(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return Ge(this,Ue(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(Cr(t),e)},sortBy:function(t,e){return Ge(this,Fe(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return Ge(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return Ge(this,function(t,e,r){var n=Ze(t);return n.__iterateUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterate(n,i);var u=0;return t.__iterate((function(t,i,s){return e.call(r,t,i,s)&&++u&&n(t,i,o)})),u},n.__iteratorUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterator(n,i);var u=t.__iterator(2,i),s=!0;return new L((function(){if(!s)return{value:void 0,done:!0};var t=u.next();if(t.done)return t;var i=t.value,a=i[0],c=i[1];return e.call(r,c,a,o)?2===n?t:N(n,a,c,t):(s=!1,{value:void 0,done:!0})}))},n}(this,t,e))},takeUntil:function(t,e){return this.takeWhile(Cr(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(t){if(t.size===1/0)return 0;var e=f(t),r=s(t),n=e?1:0;return function(t,e){return e=St(e,3432918353),e=St(e<<15|e>>>-15,461845907),e=St(e<<13|e>>>-13,5),e=St((e=e+3864292196^t)^e>>>16,2246822507),xt((e=St(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(r?e?function(t,e){n=31*n+Rr(bt(t),bt(e))|0}:function(t,e){n=n+Rr(bt(t),bt(e))|0}:e?function(t){n=31*n+bt(t)|0}:function(t){n=n+bt(t)|0}),n)}(this))}});var Ar=r.prototype;Ar[h]=!0,Ar[T]=Ar.values,Ar.__toJS=Ar.toArray,Ar.__toStringMapper=Lr,Ar.inspect=Ar.toSource=function(){return this.toString()},Ar.chain=Ar.flatMap,Ar.contains=Ar.includes,function(){try{Object.defineProperty(Ar,"length",{get:function(){if(!r.noLengthWarning){var t;try{throw new Error}catch(e){t=e.stack}if(-1===t.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+t),this.size}}})}catch(t){}}(),Dr(n,{flip:function(){return Ge(this,qe(this))},findKey:function(t,e){var r=this.findEntry(t,e);return r&&r[0]},findLastKey:function(t,e){return this.toSeq().reverse().findKey(t,e)},keyOf:function(t){return this.findKey((function(e){return lt(e,t)}))},lastKeyOf:function(t){return this.findLastKey((function(e){return lt(e,t)}))},mapEntries:function(t,e){var r=this,n=0;return Ge(this,this.toSeq().map((function(i,o){return t.call(e,[o,i],n++,r)})).fromEntrySeq())},mapKeys:function(t,e){var r=this;return Ge(this,this.toSeq().flip().map((function(n,i){return t.call(e,n,i,r)})).flip())}});var zr=n.prototype;function Mr(t,e){return e}function kr(t,e){return[e,t]}function Cr(t){return function(){return!t.apply(this,arguments)}}function Tr(t){return function(){return-t.apply(this,arguments)}}function Lr(t){return"string"==typeof t?JSON.stringify(t):t}function Nr(){return O(arguments)}function qr(t,e){return t<e?1:t>e?-1:0}function Rr(t,e){return t^e+2654435769+(t<<6)+(t>>2)}return zr[l]=!0,zr[T]=Ar.entries,zr.__toJS=Ar.toObject,zr.__toStringMapper=function(t,e){return JSON.stringify(e)+": "+Lr(t)},Dr(i,{toKeyedSeq:function(){return new Ce(this,!1)},filter:function(t,e){return Ge(this,Pe(this,t,e,!1))},findIndex:function(t,e){var r=this.findEntry(t,e);return r?r[0]:-1},indexOf:function(t){var e=this.toKeyedSeq().keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.toKeyedSeq().reverse().keyOf(t);return void 0===e?-1:e},reverse:function(){return Ge(this,je(this,!1))},slice:function(t,e){return Ge(this,Be(this,t,e,!1))},splice:function(t,e){var r=arguments.length;if(e=Math.max(0|e,0),0===r||2===r&&!e)return this;t=A(t,t<0?this.count():this.size);var n=this.slice(0,t);return Ge(this,1===r?n:n.concat(O(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.toKeyedSeq().findLastKey(t,e);return void 0===r?-1:r},first:function(){return this.get(0)},flatten:function(t){return Ge(this,We(this,t,!1))},get:function(t,e){return(t=I(this,t))<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find((function(e,r){return r===t}),void 0,e)},has:function(t){return(t=I(this,t))>=0&&(void 0!==this.size?this.size===1/0||t<this.size:-1!==this.indexOf(t))},interpose:function(t){return Ge(this,function(t,e){var r=Ze(t);return r.size=t.size&&2*t.size-1,r.__iterateUncached=function(r,n){var i=this,o=0;return t.__iterate((function(t,n){return(!o||!1!==r(e,o++,i))&&!1!==r(t,o++,i)}),n),o},r.__iteratorUncached=function(r,n){var i,o=t.__iterator(1,n),u=0;return new L((function(){return(!i||u%2)&&(i=o.next()).done?i:u%2?N(r,u++,e):N(r,u++,i.value,i)}))},r}(this,t))},interleave:function(){var t=[this].concat(O(arguments)),e=Je(this.toSeq(),V.of,t),r=e.flatten(!0);return e.size&&(r.size=e.size*t.length),Ge(this,r)},last:function(){return this.get(-1)},skipWhile:function(t,e){return Ge(this,Ue(this,t,e,!1))},zip:function(){return Ge(this,Je(this,Nr,[this].concat(O(arguments))))},zipWith:function(t){var e=O(arguments);return e[0]=this,Ge(this,Je(this,t,e))}}),i.prototype[p]=!0,i.prototype[g]=!0,Dr(o,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),o.prototype.has=Ar.includes,Dr(F,n.prototype),Dr(V,i.prototype),Dr(H,o.prototype),Dr(yt,n.prototype),Dr(mt,i.prototype),Dr(wt,o.prototype),{Iterable:r,Seq:W,Collection:dt,Map:Nt,OrderedMap:De,List:he,Stack:Sr,Set:sr,OrderedSet:vr,Record:rr,Range:_t,Repeat:gt,is:lt,fromJS:at}}()},12623:function(t,e,r){"use strict";var n=r(93816);t.exports=function(t){return!(!t||!t.ownerDocument)&&n(t)&&"BR"===t.nodeName}},13998:function(t){"use strict";var e=/([A-Z])/g;t.exports=function(t){return t.replace(e,"-$1").toLowerCase()}},14134:function(t,e,r){"use strict";var n=r(94534),i=r(50953),o=r(83731),u=r(94793);function s(t,e,r,n){if(t===r)return!0;if(!r.startsWith(t))return!1;var o=r.slice(t.length);return!!e&&(o=n?n(o):o,i.contains(o,e))}function a(t){return"Windows"===n.platformName?t.replace(/^\s*NT/,""):t}var c={isBrowser:function(t){return s(n.browserName,n.browserFullVersion,t)},isBrowserArchitecture:function(t){return s(n.browserArchitecture,null,t)},isDevice:function(t){return s(n.deviceName,null,t)},isEngine:function(t){return s(n.engineName,n.engineVersion,t)},isPlatform:function(t){return s(n.platformName,n.platformFullVersion,t,a)},isPlatformArchitecture:function(t){return s(n.platformArchitecture,null,t)}};t.exports=o(c,u)},14594:function(t,e,r){"use strict";var n=r(59395);t.exports=n},15169:function(t,e,r){"use strict";var n=r(12242);t.exports=function(t){var e=t.getSelection(),r=e.getEndKey(),i=t.getCurrentContent().getBlockForKey(r).getLength();return n.set(t,{selection:e.merge({anchorKey:r,anchorOffset:i,focusKey:r,focusOffset:i,isBackward:!1}),forceSelection:!0})}},15504:function(t){"use strict";t.exports=function(t){var e=(t?t.ownerDocument||t:document).defaultView||window;return!(!t||!("function"==typeof e.Node?t instanceof e.Node:"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName))}},17078:function(t,e,r){"use strict";var n=r(4909);t.exports=function(t){var e=t.ownerDocument.documentElement;if(!("getBoundingClientRect"in t)||!n(e,t))return{left:0,right:0,top:0,bottom:0};var r=t.getBoundingClientRect();return{left:Math.round(r.left)-e.clientLeft,right:Math.round(r.right)-e.clientLeft,top:Math.round(r.top)-e.clientTop,bottom:Math.round(r.bottom)-e.clientTop}}},17759:function(t){"use strict";t.exports=function(t){var e=t.getSelection(),r=e.getAnchorKey(),n=t.getBlockTree(r),i=e.getStartOffset(),o=!1;return n.some((function(t){return i===t.get("start")?(o=!0,!0):i<t.get("end")&&t.get("leaves").some((function(t){var e=t.get("start");return i===e&&(o=!0,!0)}))})),o}},19127:function(t,e,r){"use strict";var n=r(95748),i=r(65224),o=r(9404),u=r(56269),s=r(90646),a=r(53310),c=o.List;t.exports=function(t,e,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA";e.isCollapsed()||s(!1);var f=t.getBlockMap(),h=a(r),l=e.getStartKey(),p=e.getStartOffset(),g=f.get(l);return g instanceof i&&(g.getChildKeys().isEmpty()||s(!1)),1===h.size?function(t,e,r,n,i,o){var s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"REPLACE_WITH_NEW_DATA",a=r.get(i),c=a.getText(),f=a.getCharacterList(),h=i,l=o+n.getText().length,p=null;switch(s){case"MERGE_OLD_DATA_TO_NEW_DATA":p=n.getData().merge(a.getData());break;case"REPLACE_WITH_NEW_DATA":p=n.getData()}var g=a.getType();c&&"unstyled"===g&&(g=n.getType());var v=a.merge({text:c.slice(0,o)+n.getText()+c.slice(o),characterList:u(f,n.getCharacterList(),o),type:g,data:p});return t.merge({blockMap:r.set(i,v),selectionBefore:e,selectionAfter:e.merge({anchorKey:h,anchorOffset:l,focusKey:h,focusOffset:l,isBackward:!1})})}(t,e,f,h.first(),l,p,o):function(t,e,r,o,u,s){var a=r.first()instanceof i,f=[],h=o.size,l=r.get(u),p=o.first(),g=o.last(),v=g.getLength(),_=g.getKey(),d=a&&(!l.getChildKeys().isEmpty()||!p.getChildKeys().isEmpty());r.forEach((function(t,e){e===u?(d?f.push(t):f.push(function(t,e,r){var n=t.getText(),i=t.getCharacterList(),o=n.slice(0,e),u=i.slice(0,e),s=r.first();return t.merge({text:o+s.getText(),characterList:u.concat(s.getCharacterList()),type:o?t.getType():s.getType(),data:s.getData()})}(t,s,o)),o.slice(d?0:1,h-1).forEach((function(t){return f.push(t)})),f.push(function(t,e,r){var n=t.getText(),i=t.getCharacterList(),o=n.length,u=n.slice(e,o),s=i.slice(e,o),a=r.last();return a.merge({text:a.getText()+u,characterList:a.getCharacterList().concat(s),data:a.getData()})}(t,s,o))):f.push(t)}));var y=n.createFromArray(f);return a&&(y=function(t,e,r,n){return t.withMutations((function(e){var i=r.getKey(),o=n.getKey(),u=r.getNextSiblingKey(),s=r.getParentKey(),a=function(t,e){var r=t.getKey(),n=t,i=[];for(e.get(r)&&i.push(r);n&&n.getNextSiblingKey();){var o=n.getNextSiblingKey();if(!o)break;i.push(o),n=e.get(o)}return i}(n,t),f=a[a.length-1];if(e.get(o)?(e.setIn([i,"nextSibling"],o),e.setIn([o,"prevSibling"],i)):(e.setIn([i,"nextSibling"],n.getNextSiblingKey()),e.setIn([n.getNextSiblingKey(),"prevSibling"],i)),e.setIn([f,"nextSibling"],u),u&&e.setIn([u,"prevSibling"],f),a.forEach((function(t){return e.setIn([t,"parent"],s)})),s){var h=t.get(s).getChildKeys(),l=h.indexOf(i)+1,p=h.toArray();p.splice.apply(p,[l,0].concat(a)),e.setIn([s,"children"],c(p))}}))}(y,0,l,p)),t.merge({blockMap:y,selectionBefore:e,selectionAfter:e.merge({anchorKey:_,anchorOffset:v,focusKey:_,focusOffset:v,isBackward:!1})})}(t,e,f,h,l,p)}},19765:function(t,e,r){"use strict";r(42791),t.exports=r.g.setImmediate},20070:function(t,e,r){"use strict";var n=r(12242);t.exports=function(t){var e=t.getSelection(),r=e.getStartKey();return n.set(t,{selection:e.merge({anchorKey:r,anchorOffset:0,focusKey:r,focusOffset:0,isBackward:!1}),forceSelection:!0})}},20316:function(t,e,r){"use strict";var n=r(93816);t.exports=function(t){return!(!t||!t.ownerDocument)&&n(t)&&"A"===t.nodeName}},24764:function(t,e,r){"use strict";var n=r(12242),i=r(50580),o=r(77800),u=r(5188);t.exports=function(t){var e=u(t,(function(t){var e=t.getSelection(),r=t.getCurrentContent(),n=e.getAnchorKey(),u=e.getAnchorOffset(),s=r.getBlockForKey(n).getText()[u];return o(t,s?i.getUTF16Length(s,0):1)}),"forward");if(e===t.getCurrentContent())return t;var r=t.getSelection();return n.push(t,e.set("selectionBefore",r),r.isCollapsed()?"delete-character":"remove-range")}},24809:function(t){"use strict";t.exports=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}},24886:function(t){"use strict";var e={isImage:function(t){return"image"===r(t)[0]},isJpeg:function(t){var n=r(t);return e.isImage(t)&&("jpeg"===n[1]||"pjpeg"===n[1])}};function r(t){return t.split("/")}t.exports=e},25324:function(t){"use strict";var e=function(){function t(t){var e,r;r=void 0,(e="_uri")in this?Object.defineProperty(this,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):this[e]=r,this._uri=t}return t.prototype.toString=function(){return this._uri},t}();t.exports=e},25935:function(t,e,r){"use strict";var n=r(49938),i=r(12242),o=r(30866);t.exports=function(t){var e=t.getSelection();if(!e.isCollapsed())return t;var r=e.getAnchorOffset();if(0===r)return t;var u,s,a=e.getAnchorKey(),c=t.getCurrentContent(),f=c.getBlockForKey(a).getLength();if(f<=1)return t;r===f?(u=e.set("anchorOffset",r-1),s=e):s=(u=e.set("focusOffset",r+1)).set("anchorOffset",r+1);var h=o(c,u),l=n.removeRange(c,u,"backward"),p=l.getSelectionAfter(),g=p.getAnchorOffset()-1,v=p.merge({anchorOffset:g,focusOffset:g}),_=n.replaceWithFragment(l,v,h),d=i.push(t,_,"insert-fragment");return i.acceptSelection(d,s)}},37458:function(t){"use strict";t.exports=function(t){return t.Window&&t instanceof t.Window?{x:t.pageXOffset||t.document.documentElement.scrollLeft,y:t.pageYOffset||t.document.documentElement.scrollTop}:{x:t.scrollLeft,y:t.scrollTop}}},41401:function(t){"use strict";function e(){var t;return document.documentElement&&(t=document.documentElement.clientWidth),!t&&document.body&&(t=document.body.clientWidth),t||0}function r(){var t;return document.documentElement&&(t=document.documentElement.clientHeight),!t&&document.body&&(t=document.body.clientHeight),t||0}function n(){return{width:window.innerWidth||e(),height:window.innerHeight||r()}}n.withoutScrollbars=function(){return{width:e(),height:r()}},t.exports=n},42791:function(t,e,r){!function(t){"use strict";if(!t.setImmediate){var e,r,n,i,o,u=1,s={},a=!1,c=t.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(t);f=f&&f.setTimeout?f:t,"[object process]"==={}.toString.call(t.process)?e=function(t){({env:{}}).nextTick((function(){l(t)}))}:function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?(i="setImmediate$"+Math.random()+"$",o=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(i)&&l(+e.data.slice(i.length))},t.addEventListener?t.addEventListener("message",o,!1):t.attachEvent("onmessage",o),e=function(e){t.postMessage(i+e,"*")}):t.MessageChannel?((n=new MessageChannel).port1.onmessage=function(t){l(t.data)},e=function(t){n.port2.postMessage(t)}):c&&"onreadystatechange"in c.createElement("script")?(r=c.documentElement,e=function(t){var e=c.createElement("script");e.onreadystatechange=function(){l(t),e.onreadystatechange=null,r.removeChild(e),e=null},r.appendChild(e)}):e=function(t){setTimeout(l,0,t)},f.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var r=new Array(arguments.length-1),n=0;n<r.length;n++)r[n]=arguments[n+1];var i={callback:t,args:r};return s[u]=i,e(u),u++},f.clearImmediate=h}function h(t){delete s[t]}function l(t){if(a)setTimeout(l,0,t);else{var e=s[t];if(e){a=!0;try{!function(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(void 0,r)}}(e)}finally{h(t),a=!1}}}}}("undefined"==typeof self?void 0===r.g?this:r.g:self)},45228:function(t){"use strict";var e=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,i){for(var o,u,s=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),a=1;a<arguments.length;a++){for(var c in o=Object(arguments[a]))r.call(o,c)&&(s[c]=o[c]);if(e){u=e(o);for(var f=0;f<u.length;f++)n.call(o,u[f])&&(s[u[f]]=o[u[f]])}}return s}},45852:function(t){"use strict";t.exports={BACKSPACE:8,TAB:9,RETURN:13,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,COMMA:188,PERIOD:190,A:65,Z:90,ZERO:48,NUMPAD_0:96,NUMPAD_9:105}},46059:function(t,e,r){"use strict";var n=r(65224),i=r(7376),o=r(9404),u=r(90646),s=o.OrderedMap,a=o.List,c=function(t,e,r){if(t){var n=e.get(t);n&&e.set(t,r(n))}},f=function(t,e,r,n,i){if(!i)return t;var o="after"===n,u=e.getKey(),s=r.getKey(),f=e.getParentKey(),h=e.getNextSiblingKey(),l=e.getPrevSiblingKey(),p=r.getParentKey(),g=o?r.getNextSiblingKey():s,v=o?s:r.getPrevSiblingKey();return t.withMutations((function(t){c(f,t,(function(t){var e=t.getChildKeys();return t.merge({children:e.delete(e.indexOf(u))})})),c(l,t,(function(t){return t.merge({nextSibling:h})})),c(h,t,(function(t){return t.merge({prevSibling:l})})),c(g,t,(function(t){return t.merge({prevSibling:u})})),c(v,t,(function(t){return t.merge({nextSibling:u})})),c(p,t,(function(t){var e=t.getChildKeys(),r=e.indexOf(s),n=o?r+1:0!==r?r-1:0,i=e.toArray();return i.splice(n,0,u),t.merge({children:a(i)})})),c(u,t,(function(t){return t.merge({nextSibling:g,prevSibling:v,parent:p})}))}))};t.exports=function(t,e,r,o){"replace"===o&&u(!1);var a=r.getKey(),c=e.getKey();c===a&&u(!1);var h=t.getBlockMap(),l=e instanceof n,p=[e],g=h.delete(c);l&&(p=[],g=h.withMutations((function(t){var r=e.getNextSiblingKey(),n=i(e,t);t.toSeq().skipUntil((function(t){return t.getKey()===c})).takeWhile((function(t){var e=t.getKey(),i=e===c,o=r&&e!==r,u=!r&&t.getParentKey()&&(!n||e!==n);return!!(i||o||u)})).forEach((function(e){p.push(e),t.delete(e.getKey())}))})));var v=g.toSeq().takeUntil((function(t){return t===r})),_=g.toSeq().skipUntil((function(t){return t===r})).skip(1),d=p.map((function(t){return[t.getKey(),t]})),y=s();if("before"===o){var m=t.getBlockBefore(a);m&&m.getKey()===e.getKey()&&u(!1),y=v.concat([].concat(d,[[a,r]]),_).toOrderedMap()}else if("after"===o){var w=t.getBlockAfter(a);w&&w.getKey()===c&&u(!1),y=v.concat([[a,r]].concat(d),_).toOrderedMap()}return t.merge({blockMap:f(y,e,r,o,l),selectionBefore:t.getSelectionAfter(),selectionAfter:t.getSelectionAfter().merge({anchorKey:c,focusKey:c})})}},46892:function(t,e,r){"use strict";var n=r(8748),i=r(13998);function o(t){return null==t?t:String(t)}t.exports=function(t,e){var r;if(window.getComputedStyle&&(r=window.getComputedStyle(t,null)))return o(r.getPropertyValue(i(e)));if(document.defaultView&&document.defaultView.getComputedStyle){if(r=document.defaultView.getComputedStyle(t,null))return o(r.getPropertyValue(i(e)));if("display"===e)return"none"}return t.currentStyle?o("float"===e?t.currentStyle.cssFloat||t.currentStyle.styleFloat:t.currentStyle[n(e)]):o(t.style&&t.style[n(e)])}},47381:function(t,e,r){"use strict";var n=r(12242),i=r(50580),o=r(58488),u=r(5188);t.exports=function(t){var e=u(t,(function(t){var e=t.getSelection(),r=t.getCurrentContent(),n=e.getAnchorKey(),u=e.getAnchorOffset(),s=r.getBlockForKey(n).getText()[u-1];return o(t,s?i.getUTF16Length(s,0):1)}),"backward");if(e===t.getCurrentContent())return t;var r=t.getSelection();return n.push(t,e.set("selectionBefore",r),r.isCollapsed()?"backspace-character":"remove-range")}},50580:function(t,e,r){"use strict";var n=r(90646),i=/[\uD800-\uDFFF]/;function o(t){return 55296<=t&&t<=57343}function u(t){return i.test(t)}function s(t,e){return 1+o(t.charCodeAt(e))}function a(t,e,r){if(e=e||0,r=void 0===r?1/0:r||0,!u(t))return t.substr(e,r);var n=t.length;if(n<=0||e>n||r<=0)return"";var i=0;if(e>0){for(;e>0&&i<n;e--)i+=s(t,i);if(i>=n)return""}else if(e<0){for(i=n;e<0&&0<i;e++)i-=s(t,i-1);i<0&&(i=0)}var o=n;if(r<n)for(o=i;r>0&&o<n;r--)o+=s(t,o);return t.substring(i,o)}var c={getCodePoints:function(t){for(var e=[],r=0;r<t.length;r+=s(t,r))e.push(t.codePointAt(r));return e},getUTF16Length:s,hasSurrogateUnit:u,isCodeUnitInSurrogateRange:o,isSurrogatePair:function(t,e){if(0<=e&&e<t.length||n(!1),e+1===t.length)return!1;var r=t.charCodeAt(e),i=t.charCodeAt(e+1);return 55296<=r&&r<=56319&&56320<=i&&i<=57343},strlen:function(t){if(!u(t))return t.length;for(var e=0,r=0;r<t.length;r+=s(t,r))e++;return e},substring:function(t,e,r){(e=e||0)<0&&(e=0),(r=void 0===r?1/0:r||0)<0&&(r=0);var n=Math.abs(r-e);return a(t,e=e<r?e:r,n)},substr:a};t.exports=c},50798:function(t){"use strict";t.exports=function(t){var e=t||"",r=arguments.length;if(r>1)for(var n=1;n<r;n++){var i=arguments[n];i&&(e=(e?e+" ":"")+i)}return e}},50953:function(t,e,r){"use strict";var n=r(90646),i=/\./,o=/\|\|/,u=/\s+\-\s+/,s=/^(<=|<|=|>=|~>|~|>|)?\s*(.+)/,a=/^(\d*)(.*)/;function c(t,e){if(""===(t=t.trim()))return!0;var r,n=e.split(i),o=l(t),u=o.modifier,s=o.rangeComponents;switch(u){case"<":return f(n,s);case"<=":return-1===(r=y(n,s))||0===r;case">=":return h(n,s);case">":return 1===y(n,s);case"~":case"~>":return function(t,e){var r=e.slice(),n=e.slice();n.length>1&&n.pop();var i=n.length-1,o=parseInt(n[i],10);return p(o)&&(n[i]=o+1+""),h(t,r)&&f(t,n)}(n,s);default:return function(t,e){return 0===y(t,e)}(n,s)}}function f(t,e){return-1===y(t,e)}function h(t,e){var r=y(t,e);return 1===r||0===r}function l(t){var e=t.split(i),r=e[0].match(s);return r||n(!1),{modifier:r[1],rangeComponents:[r[2]].concat(e.slice(1))}}function p(t){return!isNaN(t)&&isFinite(t)}function g(t){return!l(t).modifier}function v(t,e){for(var r=t.length;r<e;r++)t[r]="0"}function _(t,e){var r=t.match(a)[1],n=e.match(a)[1],i=parseInt(r,10),o=parseInt(n,10);return p(i)&&p(o)&&i!==o?d(i,o):d(t,e)}function d(t,e){return typeof t!=typeof e&&n(!1),t>e?1:t<e?-1:0}function y(t,e){for(var r=function(t,e){v(t=t.slice(),(e=e.slice()).length);for(var r=0;r<e.length;r++){var n=e[r].match(/^[x*]$/i);if(n&&(e[r]=t[r]="0","*"===n[0]&&r===e.length-1))for(var i=r;i<t.length;i++)t[i]="0"}return v(e,t.length),[t,e]}(t,e),n=r[0],i=r[1],o=0;o<i.length;o++){var u=_(n[o],i[o]);if(u)return u}return 0}var m={contains:function(t,e){return function(t,e){var r=t.split(o);return r.length>1?r.some((function(t){return m.contains(t,e)})):function(t,e){var r=t.split(u);if(r.length>0&&r.length<=2||n(!1),1===r.length)return c(r[0],e);var i=r[0],o=r[1];return g(i)&&g(o)||n(!1),c(">="+i,e)&&c("<="+o,e)}(t=r[0].trim(),e)}(t.trim(),e.trim())}};t.exports=m},53222:function(t,e,r){"use strict";var n=r(65224),i=r(6991),o=r(9404),u=r(90646),s=r(5462),a=o.List,c=o.Map,f=function(t,e,r){if(t){var n=e.get(t);n&&e.set(t,r(n))}};t.exports=function(t,e){e.isCollapsed()||u(!1);var r=e.getAnchorKey(),o=t.getBlockMap(),h=o.get(r),l=h.getText();if(!l){var p=h.getType();if("unordered-list-item"===p||"ordered-list-item"===p)return s(t,e,(function(t){return t.merge({type:"unstyled",depth:0})}))}var g=e.getAnchorOffset(),v=h.getCharacterList(),_=i(),d=h instanceof n,y=h.merge({text:l.slice(0,g),characterList:v.slice(0,g)}),m=y.merge({key:_,text:l.slice(g),characterList:v.slice(g),data:c()}),w=o.toSeq().takeUntil((function(t){return t===h})),S=o.toSeq().skipUntil((function(t){return t===h})).rest(),x=w.concat([[r,y],[_,m]],S).toOrderedMap();return d&&(h.getChildKeys().isEmpty()||u(!1),x=function(t,e,r){return t.withMutations((function(t){var n=e.getKey(),i=r.getKey();f(e.getParentKey(),t,(function(t){var e=t.getChildKeys(),r=e.indexOf(n)+1,o=e.toArray();return o.splice(r,0,i),t.merge({children:a(o)})})),f(e.getNextSiblingKey(),t,(function(t){return t.merge({prevSibling:i})})),f(n,t,(function(t){return t.merge({nextSibling:i})})),f(i,t,(function(t){return t.merge({prevSibling:n})}))}))}(x,y,m)),t.merge({blockMap:x,selectionBefore:e,selectionAfter:e.merge({anchorKey:_,anchorOffset:0,focusKey:_,focusOffset:0,isBackward:!1})})}},53310:function(t,e,r){"use strict";var n=r(65224),i=r(6991),o=r(9404).OrderedMap;t.exports=function(t){return t.first()instanceof n?function(t){var e,r={};return o(t.withMutations((function(t){t.forEach((function(n,o){var u=n.getKey(),s=n.getNextSiblingKey(),a=n.getPrevSiblingKey(),c=n.getChildKeys(),f=n.getParentKey(),h=i();if(r[u]=h,s&&(t.get(s)?t.setIn([s,"prevSibling"],h):t.setIn([u,"nextSibling"],null)),a&&(t.get(a)?t.setIn([a,"nextSibling"],h):t.setIn([u,"prevSibling"],null)),f&&t.get(f)){var l=t.get(f).getChildKeys();t.setIn([f,"children"],l.set(l.indexOf(n.getKey()),h))}else t.setIn([u,"parent"],null),e&&(t.setIn([e.getKey(),"nextSibling"],h),t.setIn([u,"prevSibling"],r[e.getKey()])),e=t.get(u);c.forEach((function(e){t.get(e)?t.setIn([e,"parent"],h):t.setIn([u,"children"],n.getChildKeys().filter((function(t){return t!==e})))}))}))})).toArray().map((function(t){return[r[t.getKey()],t.set("key",r[t.getKey()])]})))}(t):function(t){return o(t.toArray().map((function(t){var e=i();return[e,t.set("key",e)]})))}(t)}},54435:function(t,e,r){"use strict";var n=r(65224),i=r(7376),o=r(9404),u=(o.List,o.Map),s=function(t,e,r){if(t){var n=e.get(t);n&&e.set(t,r(n))}},a=function(t,e){var r=[];if(!t)return r;for(var n=e.get(t);n&&n.getParentKey();){var i=n.getParentKey();i&&r.push(i),n=i?e.get(i):null}return r},c=function(t,e,r){if(!t)return null;for(var n=r.get(t.getKey()).getNextSiblingKey();n&&!e.get(n);)n=r.get(n).getNextSiblingKey()||null;return n},f=function(t,e,r){if(!t)return null;for(var n=r.get(t.getKey()).getPrevSiblingKey();n&&!e.get(n);)n=r.get(n).getPrevSiblingKey()||null;return n};t.exports=function(t,e){if(e.isCollapsed())return t;var r,o=t.getBlockMap(),h=e.getStartKey(),l=e.getStartOffset(),p=e.getEndKey(),g=e.getEndOffset(),v=o.get(h),_=o.get(p),d=v instanceof n,y=[];if(d){var m=_.getChildKeys(),w=a(p,o);_.getNextSiblingKey()&&(y=y.concat(w)),m.isEmpty()||(y=y.concat(w.concat([p]))),y=y.concat(a(i(_,o),o))}r=v===_?function(t,e,r){if(0===e)for(;e<r;)t=t.shift(),e++;else if(r===t.count())for(;r>e;)t=t.pop(),r--;else{var n=t.slice(0,e),i=t.slice(r);t=n.concat(i).toList()}return t}(v.getCharacterList(),l,g):v.getCharacterList().slice(0,l).concat(_.getCharacterList().slice(g));var S=v.merge({text:v.getText().slice(0,l)+_.getText().slice(g),characterList:r}),x=d&&0===l&&0===g&&_.getParentKey()===h&&null==_.getPrevSiblingKey()?u([[h,null]]):o.toSeq().skipUntil((function(t,e){return e===h})).takeUntil((function(t,e){return e===p})).filter((function(t,e){return-1===y.indexOf(e)})).concat(u([[p,null]])).map((function(t,e){return e===h?S:null})),b=o.merge(x).filter((function(t){return!!t}));return d&&v!==_&&(b=function(t,e,r,n){return t.withMutations((function(o){if(s(e.getKey(),o,(function(t){return t.merge({nextSibling:c(t,o,n),prevSibling:f(t,o,n)})})),s(r.getKey(),o,(function(t){return t.merge({nextSibling:c(t,o,n),prevSibling:f(t,o,n)})})),a(e.getKey(),n).forEach((function(t){return s(t,o,(function(t){return t.merge({children:t.getChildKeys().filter((function(t){return o.get(t)})),nextSibling:c(t,o,n),prevSibling:f(t,o,n)})}))})),s(e.getNextSiblingKey(),o,(function(t){return t.merge({prevSibling:e.getPrevSiblingKey()})})),s(e.getPrevSiblingKey(),o,(function(t){return t.merge({nextSibling:c(t,o,n)})})),s(r.getNextSiblingKey(),o,(function(t){return t.merge({prevSibling:f(t,o,n)})})),s(r.getPrevSiblingKey(),o,(function(t){return t.merge({nextSibling:r.getNextSiblingKey()})})),a(r.getKey(),n).forEach((function(t){s(t,o,(function(t){return t.merge({children:t.getChildKeys().filter((function(t){return o.get(t)})),nextSibling:c(t,o,n),prevSibling:f(t,o,n)})}))})),function(t,e){var r=[];if(!t)return r;for(var n=i(t,e);n&&e.get(n);){var o=e.get(n);r.push(n),n=o.getParentKey()?i(o,e):null}return r}(r,n).forEach((function(t){return s(t,o,(function(t){return t.merge({nextSibling:c(t,o,n),prevSibling:f(t,o,n)})}))})),null==t.get(e.getKey())&&null!=t.get(r.getKey())&&r.getParentKey()===e.getKey()&&null==r.getPrevSiblingKey()){var u=e.getPrevSiblingKey();s(r.getKey(),o,(function(t){return t.merge({prevSibling:u})})),s(u,o,(function(t){return t.merge({nextSibling:r.getKey()})}));var h=u?t.get(u):null,l=h?h.getParentKey():null;if(e.getChildKeys().forEach((function(t){s(t,o,(function(t){return t.merge({parent:l})}))})),null!=l){var p=t.get(l);s(l,o,(function(t){return t.merge({children:p.getChildKeys().concat(e.getChildKeys())})}))}s(e.getChildKeys().find((function(e){return null===t.get(e).getNextSiblingKey()})),o,(function(t){return t.merge({nextSibling:e.getNextSiblingKey()})}))}}))}(b,v,_,o)),t.merge({blockMap:b,selectionBefore:e,selectionAfter:e.merge({anchorKey:h,anchorOffset:l,focusKey:h,focusOffset:l,isBackward:!1})})}},55291:function(t){"use strict";t.exports=function(t){return!(!t||!t.ownerDocument)&&(t.ownerDocument.defaultView?t instanceof t.ownerDocument.defaultView.HTMLElement:t instanceof HTMLElement)}},55822:function(t,e,r){"use strict";var n=r(90646),i="LTR",o=null;function u(t){return t===i||"RTL"===t}function s(t){return u(t)||n(!1),t===i?"ltr":"rtl"}function a(t){o=t}var c={NEUTRAL:"NEUTRAL",LTR:i,RTL:"RTL",isStrong:u,getHTMLDir:s,getHTMLDirIfDifferent:function(t,e){return u(t)||n(!1),u(e)||n(!1),t===e?null:s(t)},setGlobalDir:a,initGlobalDir:function(){a(i)},getGlobalDir:function(){return o||this.initGlobalDir(),o||n(!1),o}};t.exports=c},56269:function(t){"use strict";t.exports=function(t,e,r){var n=t;if(r===n.count())e.forEach((function(t){n=n.push(t)}));else if(0===r)e.reverse().forEach((function(t){n=n.unshift(t)}));else{var i=n.slice(0,r),o=n.slice(r);n=i.concat(e,o).toList()}return n}},56408:function(t){"use strict";t.exports=function(t){if(null!=t)return t;throw new Error("Got unexpected null or undefined")}},58488:function(t,e,r){"use strict";r(14594),t.exports=function(t,e){var r=t.getSelection(),n=t.getCurrentContent(),i=r.getStartKey(),o=r.getStartOffset(),u=i,s=0;if(e>o){var a=n.getKeyBefore(i);null==a?u=i:(u=a,s=n.getBlockForKey(a).getText().length)}else s=o-e;return r.merge({focusKey:u,focusOffset:s,isBackward:!0})}},59395:function(t){"use strict";function e(t){return function(){return t}}var r=function(){};r.thatReturns=e,r.thatReturnsFalse=e(!1),r.thatReturnsTrue=e(!0),r.thatReturnsNull=e(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(t){return t},t.exports=r},59824:function(t){"use strict";var e="undefined"!=typeof navigator&&navigator.userAgent.indexOf("AppleWebKit")>-1;t.exports=function(t){return(t=t||document).scrollingElement?t.scrollingElement:e||"CSS1Compat"!==t.compatMode?t.body:t.documentElement}},61708:function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var i=r(68307),o=r(55822),u=r(90646),s=function(){function t(t){n(this,"_defaultDir",void 0),n(this,"_lastDir",void 0),t?o.isStrong(t)||u(!1):t=o.getGlobalDir(),this._defaultDir=t,this.reset()}var e=t.prototype;return e.reset=function(){this._lastDir=this._defaultDir},e.getDirection=function(t){return this._lastDir=i.getDirection(t,this._lastDir),this._lastDir},t}();t.exports=s},64071:function(t,e,r){"use strict";var n=r(49938),i=r(12242);t.exports=function(t){var e=n.splitBlock(t.getCurrentContent(),t.getSelection());return i.push(t,e,"split-block")}},64316:function(t){"use strict";t.exports=function(t){if(!t||!("ownerDocument"in t))return!1;if("ownerDocument"in t){var e=t;if(!e.ownerDocument.defaultView)return e instanceof Node;if(e instanceof e.ownerDocument.defaultView.Node)return!0}return!1}},68307:function(t,e,r){"use strict";var n=r(55822),i=r(90646),o="־׀׃׆-א-ת-ׯװ-ײ׳-״-߀-߉ߊ-ߪߴ-ߵߺ-߿ࠀ-ࠕࠚࠤࠨ-࠰-࠾ࡀ-ࡘ-࡞-࢟יִײַ-ﬨשׁ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﭏ",u="؈؋؍؛؝؞-؟ؠ-ؿـف-ي٭ٮ-ٯٱ-ۓ۔ەۥ-ۦۮ-ۯۺ-ۼ۽-۾ۿ܀-܍ܐܒ-ܯ-ݍ-ޥޱ-ࢠ-ࢲࢳ-ࣣﭐ-ﮱ﮲-﯁﯂-ﯓ-ﴽ﵀-﵏ﵐ-ﶏ-ﶒ-ﷇ-﷏ﷰ-ﷻ﷼﷾-﷿ﹰ-ﹴﹶ-ﻼ-",s=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ƺƻƼ-ƿǀ-ǃDŽ-ʓʔʕ-ʯʰ-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͷͺͻ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҂Ҋ-ԯԱ-Ֆՙ՚-՟ա-և։ःऄ-हऻऽा-ीॉ-ौॎ-ॏॐक़-ॡ।-॥०-९॰ॱॲ-ঀং-ঃঅ-ঌএ-ঐও-নপ-রলশ-হঽা-ীে-ৈো-ৌৎৗড়-ঢ়য়-ৡ০-৯ৰ-ৱ৴-৹৺ਃਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਾ-ੀਖ਼-ੜਫ਼੦-੯ੲ-ੴઃઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હઽા-ીૉો-ૌૐૠ-ૡ૦-૯૰ଂ-ଃଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହଽାୀେ-ୈୋ-ୌୗଡ଼-ଢ଼ୟ-ୡ୦-୯୰ୱ୲-୷ஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹா-ிு-ூெ-ைொ-ௌௐௗ௦-௯௰-௲ఁ-ఃఅ-ఌఎ-ఐఒ-నప-హఽు-ౄౘ-ౙౠ-ౡ౦-౯౿ಂ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽಾಿೀ-ೄೆೇ-ೈೊ-ೋೕ-ೖೞೠ-ೡ೦-೯ೱ-ೲം-ഃഅ-ഌഎ-ഐഒ-ഺഽാ-ീെ-ൈൊ-ൌൎൗൠ-ൡ൦-൯൰-൵൹ൺ-ൿං-ඃඅ-ඖක-නඳ-රලව-ෆා-ෑෘ-ෟ෦-෯ෲ-ෳ෴ก-ะา-ำเ-ๅๆ๏๐-๙๚-๛ກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ະາ-ຳຽເ-ໄໆ໐-໙ໜ-ໟༀ༁-༃༄-༒༓༔༕-༗༚-༟༠-༩༪-༳༴༶༸༾-༿ཀ-ཇཉ-ཬཿ྅ྈ-ྌ྾-࿅࿇-࿌࿎-࿏࿐-࿔࿕-࿘࿙-࿚က-ဪါ-ာေးျ-ြဿ၀-၉၊-၏ၐ-ၕၖ-ၗၚ-ၝၡၢ-ၤၥ-ၦၧ-ၭၮ-ၰၵ-ႁႃ-ႄႇ-ႌႎႏ႐-႙ႚ-ႜ႞-႟Ⴀ-ჅჇჍა-ჺ჻ჼჽ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፠-፨፩-፼ᎀ-ᎏᎠ-Ᏼᐁ-ᙬ᙭-᙮ᙯ-ᙿᚁ-ᚚᚠ-ᛪ᛫-᛭ᛮ-ᛰᛱ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱ᜵-᜶ᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳាើ-ៅះ-ៈ។-៖ៗ៘-៚ៜ០-៩᠐-᠙ᠠ-ᡂᡃᡄ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᤣ-ᤦᤩ-ᤫᤰ-ᤱᤳ-ᤸ᥆-᥏ᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧀᧁ-ᧇᧈ-ᧉ᧐-᧙᧚ᨀ-ᨖᨙ-ᨚ᨞-᨟ᨠ-ᩔᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪉᪐-᪙᪠-᪦ᪧ᪨-᪭ᬄᬅ-ᬳᬵᬻᬽ-ᭁᭃ-᭄ᭅ-ᭋ᭐-᭙᭚-᭠᭡-᭪᭴-᭼ᮂᮃ-ᮠᮡᮦ-ᮧ᮪ᮮ-ᮯ᮰-᮹ᮺ-ᯥᯧᯪ-ᯬᯮ᯲-᯳᯼-᯿ᰀ-ᰣᰤ-ᰫᰴ-ᰵ᰻-᰿᱀-᱉ᱍ-ᱏ᱐-᱙ᱚ-ᱷᱸ-ᱽ᱾-᱿᳀-᳇᳓᳡ᳩ-ᳬᳮ-ᳱᳲ-ᳳᳵ-ᳶᴀ-ᴫᴬ-ᵪᵫ-ᵷᵸᵹ-ᶚᶛ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℴℵ-ℸℹℼ-ℿⅅ-ⅉⅎ⅏Ⅰ-ↂↃ-ↄↅ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-Ⱞⰰ-ⱞⱠ-ⱻⱼ-ⱽⱾ-ⳤⳫ-ⳮⳲ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵰ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々〆〇〡-〩〮-〯〱-〵〸-〺〻〼ぁ-ゖゝ-ゞゟァ-ヺー-ヾヿㄅ-ㄭㄱ-ㆎ㆐-㆑㆒-㆕㆖-㆟ㆠ-ㆺㇰ-ㇿ㈀-㈜㈠-㈩㈪-㉇㉈-㉏㉠-㉻㉿㊀-㊉㊊-㊰㋀-㋋㋐-㋾㌀-㍶㍻-㏝㏠-㏾㐀-䶵一-鿌ꀀ-ꀔꀕꀖ-ꒌꓐ-ꓷꓸ-ꓽ꓾-꓿ꔀ-ꘋꘌꘐ-ꘟ꘠-꘩ꘪ-ꘫꙀ-ꙭꙮꚀ-ꚛꚜ-ꚝꚠ-ꛥꛦ-ꛯ꛲-꛷Ꜣ-ꝯꝰꝱ-ꞇ꞉-꞊Ꞌ-ꞎꞐ-ꞭꞰ-Ʇꟷꟸ-ꟹꟺꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꠣ-ꠤꠧ꠰-꠵꠶-꠷ꡀ-ꡳꢀ-ꢁꢂ-ꢳꢴ-ꣃ꣎-꣏꣐-꣙ꣲ-ꣷ꣸-꣺ꣻ꤀-꤉ꤊ-ꤥ꤮-꤯ꤰ-ꥆꥒ-꥓꥟ꥠ-ꥼꦃꦄ-ꦲꦴ-ꦵꦺ-ꦻꦽ-꧀꧁-꧍ꧏ꧐-꧙꧞-꧟ꧠ-ꧤꧦꧧ-ꧯ꧰-꧹ꧺ-ꧾꨀ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ꩐-꩙꩜-꩟ꩠ-ꩯꩰꩱ-ꩶ꩷-꩹ꩺꩻꩽꩾ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂꫛ-ꫜꫝ꫞-꫟ꫠ-ꫪꫫꫮ-ꫯ꫰-꫱ꫲꫳ-ꫴꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚ꭛ꭜ-ꭟꭤ-ꭥꯀ-ꯢꯣ-ꯤꯦ-ꯧꯩ-ꯪ꯫꯬꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ-豈-舘並-龎ff-stﬓ-ﬗA-Za-zヲ-ッーア-ン゙-゚ᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"+o+u+"]"),a=new RegExp("["+o+u+"]");function c(t){var e=s.exec(t);return null==e?null:e[0]}function f(t){var e=c(t);return null==e?n.NEUTRAL:a.exec(e)?n.RTL:n.LTR}function h(t,e){if(e=e||n.NEUTRAL,!t.length)return e;var r=f(t);return r===n.NEUTRAL?e:r}function l(t,e){return e||(e=n.getGlobalDir()),n.isStrong(e)||i(!1),h(t,e)}var p={firstStrongChar:c,firstStrongCharDir:f,resolveBlockDir:h,getDirection:l,isDirectionLTR:function(t,e){return l(t,e)===n.LTR},isDirectionRTL:function(t,e){return l(t,e)===n.RTL}};t.exports=p},69758:function(t){"use strict";t.exports=function(t){if(void 0===(t=t||("undefined"!=typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}},70525:function(t,e,r){"use strict";var n=r(73998),i=r(12242),o=r(77800),u=r(5188);t.exports=function(t){var e=u(t,(function(t){var e=t.getSelection(),r=e.getStartOffset(),i=e.getStartKey(),u=t.getCurrentContent().getBlockForKey(i).getText().slice(r),s=n.getForward(u);return o(t,s.length||1)}),"forward");return e===t.getCurrentContent()?t:i.push(t,e,"remove-range")}},71864:function(t,e,r){"use strict";var n=r(90646);t.exports=function(t){return function(t){return!!t&&("object"==typeof t||"function"==typeof t)&&"length"in t&&!("setInterval"in t)&&"number"!=typeof t.nodeType&&(Array.isArray(t)||"callee"in t||"item"in t)}(t)?Array.isArray(t)?t.slice():function(t){var e=t.length;if((Array.isArray(t)||"object"!=typeof t&&"function"!=typeof t)&&n(!1),"number"!=typeof e&&n(!1),0===e||e-1 in t||n(!1),"function"==typeof t.callee&&n(!1),t.hasOwnProperty)try{return Array.prototype.slice.call(t)}catch(t){}for(var r=Array(e),i=0;i<e;i++)r[i]=t[i];return r}(t):[t]}},73676:function(t){"use strict";var e=/\r\n?|\n/g;t.exports=function(t){return t.split(e)}},73680:function(t){"use strict";t.exports=function(t){return"handled"===t||!0===t}},77405:function(t){"use strict";t.exports={getPunctuation:function(){return"[.,+*?$|#{}()'\\^\\-\\[\\]\\\\\\/!@%\"~=<>_:;・、。〈-】〔-〟:-?!-/[-`{-・⸮؟٪-٬؛،؍﴾﴿᠁।၊။‐-‧‰-⁞¡-±´-¸º»¿]"}}},77800:function(t,e,r){"use strict";r(14594),t.exports=function(t,e){var r,n=t.getSelection(),i=n.getStartKey(),o=n.getStartOffset(),u=t.getCurrentContent(),s=i;return e>u.getBlockForKey(i).getText().length-o?(s=u.getKeyAfter(i),r=0):r=o+e,n.merge({focusKey:s,focusOffset:r})}},78527:function(t,e,r){"use strict";var n=r(17078);t.exports=function(t){var e=n(t);return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}},83174:function(t,e,r){"use strict";var n=r(45852);t.exports=function(t){return t.which===n.RETURN&&(t.getModifierState("Shift")||t.getModifierState("Alt")||t.getModifierState("Control"))}},83731:function(t){"use strict";var e=Object.prototype.hasOwnProperty;t.exports=function(t,r,n){if(!t)return null;var i={};for(var o in t)e.call(t,o)&&(i[o]=r.call(n,t[o],o,t));return i}},86044:function(t,e,r){"use strict";var n=r(23018),i=r(18227),o=r(90646);function u(t,e,r){var u=e.getCharacterList(),s=r>0?u.get(r-1):void 0,a=r<u.count()?u.get(r):void 0,c=s?s.getEntity():void 0,f=a?a.getEntity():void 0;if(f&&f===c&&"MUTABLE"!==t.__get(f).getMutability()){for(var h,l=function(t,e,r){var n;return i(t,(function(t,e){return t.getEntity()===e.getEntity()}),(function(t){return t.getEntity()===e}),(function(t,e){t<=r&&e>=r&&(n={start:t,end:e})})),"object"!=typeof n&&o(!1),n}(u,f,r),p=l.start,g=l.end;p<g;)h=u.get(p),u=u.set(p,n.applyEntity(h,null)),p++;return e.set("characterList",u)}return e}t.exports=function(t,e){var r=t.getBlockMap(),n=t.getEntityMap(),i={},o=e.getStartKey(),s=e.getStartOffset(),a=r.get(o),c=u(n,a,s);c!==a&&(i[o]=c);var f=e.getEndKey(),h=e.getEndOffset(),l=r.get(f);o===f&&(l=c);var p=u(n,l,h);return p!==l&&(i[f]=p),Object.keys(i).length?t.merge({blockMap:r.merge(i),selectionAfter:e}):t.set("selectionAfter",e)}},88771:function(t,e,r){"use strict";var n=r(12242),i=r(85989),o=r(29215),u=r(58488),s=r(5188);t.exports=function(t,e){var r=s(t,(function(t){var r=t.getSelection();if(r.isCollapsed()&&0===r.getAnchorOffset())return u(t,1);var n=e.currentTarget.ownerDocument.defaultView.getSelection().getRangeAt(0);return n=i(n),o(t,null,n.endContainer,n.endOffset,n.startContainer,n.startOffset).selectionState}),"backward");return r===t.getCurrentContent()?t:n.push(t,r,"remove-range")}},90646:function(t){"use strict";t.exports=function(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];if(!t){var o;if(void 0===e)o=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=0;(o=new Error(e.replace(/%s/g,(function(){return String(n[u++])})))).name="Invariant Violation"}throw o.framesToPop=1,o}}},91721:function(t){"use strict";var e=new RegExp("\r","g");t.exports=function(t){return t.replace(e,"")}},92395:function(t,e,r){"use strict";var n=r(24886),i=r(71864),o=r(59395),u=new RegExp("\r\n","g"),s={"text/rtf":1,"text/html":1};function a(t){if("file"==t.kind)return t.getAsFile()}var c=function(){function t(t){this.data=t,this.types=t.types?i(t.types):[]}var e=t.prototype;return e.isRichText=function(){return!(!this.getHTML()||!this.getText())||!this.isImage()&&this.types.some((function(t){return s[t]}))},e.getText=function(){var t;return this.data.getData&&(this.types.length?-1!=this.types.indexOf("text/plain")&&(t=this.data.getData("text/plain")):t=this.data.getData("Text")),t?t.replace(u,"\n"):null},e.getHTML=function(){if(this.data.getData){if(!this.types.length)return this.data.getData("Text");if(-1!=this.types.indexOf("text/html"))return this.data.getData("text/html")}},e.isLink=function(){return this.types.some((function(t){return-1!=t.indexOf("Url")||-1!=t.indexOf("text/uri-list")||t.indexOf("text/x-moz-url")}))},e.getLink=function(){return this.data.getData?-1!=this.types.indexOf("text/x-moz-url")?this.data.getData("text/x-moz-url").split("\n")[0]:-1!=this.types.indexOf("text/uri-list")?this.data.getData("text/uri-list"):this.data.getData("url"):null},e.isImage=function(){var t=this.types.some((function(t){return-1!=t.indexOf("application/x-moz-file")}));if(t)return!0;for(var e=this.getFiles(),r=0;r<e.length;r++){var i=e[r].type;if(!n.isImage(i))return!1}return!0},e.getCount=function(){return this.data.hasOwnProperty("items")?this.data.items.length:this.data.hasOwnProperty("mozItemCount")?this.data.mozItemCount:this.data.files?this.data.files.length:null},e.getFiles=function(){return this.data.items?Array.prototype.slice.call(this.data.items).map(a).filter(o.thatReturnsArgument):this.data.files?Array.prototype.slice.call(this.data.files):[]},e.hasFiles=function(){return this.getFiles().length>0},t}();t.exports=c},93529:function(t){"use strict";function e(t,e){return!!e&&(t===e.documentElement||t===e.body)}var r={getTop:function(t){var r=t.ownerDocument;return e(t,r)?r.body.scrollTop||r.documentElement.scrollTop:t.scrollTop},setTop:function(t,r){var n=t.ownerDocument;e(t,n)?n.body.scrollTop=n.documentElement.scrollTop=r:t.scrollTop=r},getLeft:function(t){var r=t.ownerDocument;return e(t,r)?r.body.scrollLeft||r.documentElement.scrollLeft:t.scrollLeft},setLeft:function(t,r){var n=t.ownerDocument;e(t,n)?n.body.scrollLeft=n.documentElement.scrollLeft=r:t.scrollLeft=r}};t.exports=r},93816:function(t){"use strict";t.exports=function(t){return!(!t||!t.ownerDocument)&&t.nodeType===Node.ELEMENT_NODE}},94143:function(t,e,r){"use strict";var n=r(73998),i=r(12242),o=r(58488),u=r(5188);t.exports=function(t){var e=u(t,(function(t){var e=t.getSelection(),r=e.getStartOffset();if(0===r)return o(t,1);var i=e.getStartKey(),u=t.getCurrentContent().getBlockForKey(i).getText().slice(0,r),s=n.getBackward(u);return o(t,s.length||1)}),"backward");return e===t.getCurrentContent()?t:i.push(t,e,"remove-range")}},94534:function(t,e,r){"use strict";var n,i="Unknown",o=(new(r(77232))).getResult(),u=function(t){if(!t)return{major:"",minor:""};var e=t.split(".");return{major:e[0],minor:e[1]}}(o.browser.version),s={browserArchitecture:o.cpu.architecture||i,browserFullVersion:o.browser.version||i,browserMinorVersion:u.minor||i,browserName:o.browser.name||i,browserVersion:o.browser.major||i,deviceName:o.device.model||i,engineName:o.engine.name||i,engineVersion:o.engine.version||i,platformArchitecture:o.cpu.architecture||i,platformName:(n=o.os.name,{"Mac OS":"Mac OS X"}[n]||n||i),platformVersion:o.os.version||i,platformFullVersion:o.os.version||i};t.exports=s},94660:function(t,e,r){"use strict";var n=r(953),i=r(67204),o=r(14134),u=r(4909),s=r(69758),a=r(19677),c=r(90646),f=r(93816),h=o.isBrowser("IE");function l(t,e){if(!t)return"[empty]";var r=p(t,e);return r.nodeType===Node.TEXT_NODE?r.textContent:(f(r)||c(!1),r.outerHTML)}function p(t,e){var r=void 0!==e?e(t):[];if(t.nodeType===Node.TEXT_NODE){var n=t.textContent.length;return a(t).createTextNode("[text "+n+(r.length?" | "+r.join(", "):"")+"]")}var i=t.cloneNode();1===i.nodeType&&r.length&&i.setAttribute("data-labels",r.join(", "));for(var o=t.childNodes,u=0;u<o.length;u++)i.appendChild(p(o[u],e));return i}function g(t,e){for(var r=t,n=r;r;){if(f(r)&&n.hasAttribute("contenteditable"))return l(r,e);n=r=r.parentNode}return"Could not find contentEditable parent of node"}function v(t){return null===t.nodeValue?t.childNodes.length:t.nodeValue.length}function _(t,e,r,n){var o=s();if(t.extend&&null!=e&&u(o,e)){r>v(e)&&i.logSelectionStateFailure({anonymizedDom:g(e),extraParams:JSON.stringify({offset:r}),selectionState:JSON.stringify(n.toJS())});var a=e===t.focusNode;try{t.rangeCount>0&&t.extend&&t.extend(e,r)}catch(u){throw i.logSelectionStateFailure({anonymizedDom:g(e,(function(e){var r=[];return e===o&&r.push("active element"),e===t.anchorNode&&r.push("selection anchor node"),e===t.focusNode&&r.push("selection focus node"),r})),extraParams:JSON.stringify({activeElementName:o?o.nodeName:null,nodeIsFocus:e===t.focusNode,nodeWasFocus:a,selectionRangeCount:t.rangeCount,selectionAnchorNodeName:t.anchorNode?t.anchorNode.nodeName:null,selectionAnchorOffset:t.anchorOffset,selectionFocusNodeName:t.focusNode?t.focusNode.nodeName:null,selectionFocusOffset:t.focusOffset,message:u?""+u:null,offset:r},null,2),selectionState:JSON.stringify(n.toJS(),null,2)}),u}}else if(e&&t.rangeCount>0){var c=t.getRangeAt(0);c.setEnd(e,r),t.addRange(c.cloneRange())}}function d(t,e,r,o){var u=a(e).createRange();if(r>v(e)&&(i.logSelectionStateFailure({anonymizedDom:g(e),extraParams:JSON.stringify({offset:r}),selectionState:JSON.stringify(o.toJS())}),n.handleExtensionCausedError()),u.setStart(e,r),h)try{t.addRange(u)}catch(t){}else t.addRange(u)}t.exports={setDraftEditorSelection:function(t,e,r,n,i){var o=a(e);if(u(o.documentElement,e)){var s=o.defaultView.getSelection(),c=t.getAnchorKey(),f=t.getAnchorOffset(),h=t.getFocusKey(),l=t.getFocusOffset(),p=t.getIsBackward();if(!s.extend&&p){var g=c,v=f;c=h,f=l,h=g,l=v,p=!1}var y=c===r&&n<=f&&i>=f,m=h===r&&n<=l&&i>=l;if(y&&m)return s.removeAllRanges(),d(s,e,f-n,t),void _(s,e,l-n,t);if(p){if(m&&(s.removeAllRanges(),d(s,e,l-n,t)),y){var w=s.focusNode,S=s.focusOffset;s.removeAllRanges(),d(s,e,f-n,t),_(s,w,S,t)}}else y&&(s.removeAllRanges(),d(s,e,f-n,t)),m&&_(s,e,l-n,t)}},addFocusToSelection:_}},94793:function(t){"use strict";t.exports=function(t){var e={};return function(r){return e.hasOwnProperty(r)||(e[r]=t.call(this,r)),e[r]}}},95423:function(t,e,r){"use strict";var n=r(15504);t.exports=function(t){return n(t)&&3==t.nodeType}},97392:function(t,e,r){"use strict";var n=r(59824),i=r(37458);t.exports=function(t){var e=n(t.ownerDocument||t.document);t.Window&&t instanceof t.Window&&(t=e);var r=i(t),o=t===e?t.ownerDocument.documentElement:t,u=t.scrollWidth-o.clientWidth,s=t.scrollHeight-o.clientHeight;return r.x=Math.max(0,Math.min(r.x,u)),r.y=Math.max(0,Math.min(r.y,s)),r}},98003:function(t){"use strict";function e(t){return t.replace(/\//g,"-")}t.exports=function(t){return"object"==typeof t?Object.keys(t).filter((function(e){return t[e]})).map(e).join(" "):Array.prototype.map.call(arguments,e).join(" ")}}}]);
|
|
Binary file
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see bundle.866fb447979af51deaf0.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunkaldehyde=self.webpackChunkaldehyde||[]).push([[87],{4764:function(t,e,n){"use strict";function o(t,e,n){this.x=t,this.y=e,this.time=n||(new Date).getTime()}function i(t,e,n,o){this.startPoint=t,this.control1=e,this.control2=n,this.endPoint=o}function r(t,e){var n=this,o=e||{};this.velocityFilterWeight=o.velocityFilterWeight||.7,this.minWidth=o.minWidth||.5,this.maxWidth=o.maxWidth||2.5,this.throttle="throttle"in o?o.throttle:16,this.minDistance="minDistance"in o?o.minDistance:5,this.throttle?this._strokeMoveUpdate=function(t,e,n){var o,i,r,a=null,s=0;n||(n={});var h=function(){s=!1===n.leading?0:Date.now(),a=null,r=t.apply(o,i),a||(o=i=null)};return function(){var c=Date.now();s||!1!==n.leading||(s=c);var u=e-(c-s);return o=this,i=arguments,u<=0||u>e?(a&&(clearTimeout(a),a=null),s=c,r=t.apply(o,i),a||(o=i=null)):a||!1===n.trailing||(a=setTimeout(h,u)),r}}(r.prototype._strokeUpdate,this.throttle):this._strokeMoveUpdate=r.prototype._strokeUpdate,this.dotSize=o.dotSize||function(){return(this.minWidth+this.maxWidth)/2},this.penColor=o.penColor||"black",this.backgroundColor=o.backgroundColor||"rgba(0,0,0,0)",this.onBegin=o.onBegin,this.onEnd=o.onEnd,this._canvas=t,this._ctx=t.getContext("2d"),this.clear(),this._handleMouseDown=function(t){1===t.which&&(n._mouseButtonDown=!0,n._strokeBegin(t))},this._handleMouseMove=function(t){n._mouseButtonDown&&n._strokeMoveUpdate(t)},this._handleMouseUp=function(t){1===t.which&&n._mouseButtonDown&&(n._mouseButtonDown=!1,n._strokeEnd(t))},this._handleTouchStart=function(t){if(1===t.targetTouches.length){var e=t.changedTouches[0];n._strokeBegin(e)}},this._handleTouchMove=function(t){t.preventDefault();var e=t.targetTouches[0];n._strokeMoveUpdate(e)},this._handleTouchEnd=function(t){t.target===n._canvas&&(t.preventDefault(),n._strokeEnd(t))},this.on()}n.r(e),o.prototype.velocityFrom=function(t){return this.time!==t.time?this.distanceTo(t)/(this.time-t.time):1},o.prototype.distanceTo=function(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))},o.prototype.equals=function(t){return this.x===t.x&&this.y===t.y&&this.time===t.time},i.prototype.length=function(){for(var t=0,e=void 0,n=void 0,o=0;o<=10;o+=1){var i=o/10,r=this._point(i,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),a=this._point(i,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(o>0){var s=r-e,h=a-n;t+=Math.sqrt(s*s+h*h)}e=r,n=a}return t},i.prototype._point=function(t,e,n,o,i){return e*(1-t)*(1-t)*(1-t)+3*n*(1-t)*(1-t)*t+3*o*(1-t)*t*t+i*t*t*t},r.prototype.clear=function(){var t=this._ctx,e=this._canvas;t.fillStyle=this.backgroundColor,t.clearRect(0,0,e.width,e.height),t.fillRect(0,0,e.width,e.height),this._data=[],this._reset(),this._isEmpty=!0},r.prototype.fromDataURL=function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=new Image,i=n.ratio||window.devicePixelRatio||1,r=n.width||this._canvas.width/i,a=n.height||this._canvas.height/i;this._reset(),o.src=t,o.onload=function(){e._ctx.drawImage(o,0,0,r,a)},this._isEmpty=!1},r.prototype.toDataURL=function(t){var e;if("image/svg+xml"===t)return this._toSVG();for(var n=arguments.length,o=Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return(e=this._canvas).toDataURL.apply(e,[t].concat(o))},r.prototype.on=function(){this._handleMouseEvents(),this._handleTouchEvents()},r.prototype.off=function(){this._canvas.removeEventListener("mousedown",this._handleMouseDown),this._canvas.removeEventListener("mousemove",this._handleMouseMove),document.removeEventListener("mouseup",this._handleMouseUp),this._canvas.removeEventListener("touchstart",this._handleTouchStart),this._canvas.removeEventListener("touchmove",this._handleTouchMove),this._canvas.removeEventListener("touchend",this._handleTouchEnd)},r.prototype.isEmpty=function(){return this._isEmpty},r.prototype._strokeBegin=function(t){this._data.push([]),this._reset(),this._strokeUpdate(t),"function"==typeof this.onBegin&&this.onBegin(t)},r.prototype._strokeUpdate=function(t){var e=t.clientX,n=t.clientY,o=this._createPoint(e,n),i=this._data[this._data.length-1],r=i&&i[i.length-1],a=r&&o.distanceTo(r)<this.minDistance;if(!r||!a){var s=this._addPoint(o),h=s.curve,c=s.widths;h&&c&&this._drawCurve(h,c.start,c.end),this._data[this._data.length-1].push({x:o.x,y:o.y,time:o.time,color:this.penColor})}},r.prototype._strokeEnd=function(t){var e=this.points.length>2,n=this.points[0];if(!e&&n&&this._drawDot(n),n){var o=this._data[this._data.length-1],i=o[o.length-1];n.equals(i)||o.push({x:n.x,y:n.y,time:n.time,color:this.penColor})}"function"==typeof this.onEnd&&this.onEnd(t)},r.prototype._handleMouseEvents=function(){this._mouseButtonDown=!1,this._canvas.addEventListener("mousedown",this._handleMouseDown),this._canvas.addEventListener("mousemove",this._handleMouseMove),document.addEventListener("mouseup",this._handleMouseUp)},r.prototype._handleTouchEvents=function(){this._canvas.style.msTouchAction="none",this._canvas.style.touchAction="none",this._canvas.addEventListener("touchstart",this._handleTouchStart),this._canvas.addEventListener("touchmove",this._handleTouchMove),this._canvas.addEventListener("touchend",this._handleTouchEnd)},r.prototype._reset=function(){this.points=[],this._lastVelocity=0,this._lastWidth=(this.minWidth+this.maxWidth)/2,this._ctx.fillStyle=this.penColor},r.prototype._createPoint=function(t,e,n){var i=this._canvas.getBoundingClientRect();return new o(t-i.left,e-i.top,n||(new Date).getTime())},r.prototype._addPoint=function(t){var e=this.points;if(e.push(t),e.length>2){3===e.length&&e.unshift(e[0]);var n=this._calculateCurveControlPoints(e[0],e[1],e[2]).c2,o=this._calculateCurveControlPoints(e[1],e[2],e[3]).c1,r=new i(e[1],n,o,e[2]),a=this._calculateCurveWidths(r);return e.shift(),{curve:r,widths:a}}return{}},r.prototype._calculateCurveControlPoints=function(t,e,n){var i=t.x-e.x,r=t.y-e.y,a=e.x-n.x,s=e.y-n.y,h=(t.x+e.x)/2,c=(t.y+e.y)/2,u=(e.x+n.x)/2,l=(e.y+n.y)/2,d=Math.sqrt(i*i+r*r),f=Math.sqrt(a*a+s*s),p=f/(d+f),v=u+(h-u)*p,_=l+(c-l)*p,m=e.x-v,y=e.y-_;return{c1:new o(h+m,c+y),c2:new o(u+m,l+y)}},r.prototype._calculateCurveWidths=function(t){var e=t.startPoint,n=t.endPoint,o={start:null,end:null},i=this.velocityFilterWeight*n.velocityFrom(e)+(1-this.velocityFilterWeight)*this._lastVelocity,r=this._strokeWidth(i);return o.start=this._lastWidth,o.end=r,this._lastVelocity=i,this._lastWidth=r,o},r.prototype._strokeWidth=function(t){return Math.max(this.maxWidth/(t+1),this.minWidth)},r.prototype._drawPoint=function(t,e,n){var o=this._ctx;o.moveTo(t,e),o.arc(t,e,n,0,2*Math.PI,!1),this._isEmpty=!1},r.prototype._drawCurve=function(t,e,n){var o=this._ctx,i=n-e,r=Math.floor(t.length());o.beginPath();for(var a=0;a<r;a+=1){var s=a/r,h=s*s,c=h*s,u=1-s,l=u*u,d=l*u,f=d*t.startPoint.x;f+=3*l*s*t.control1.x,f+=3*u*h*t.control2.x,f+=c*t.endPoint.x;var p=d*t.startPoint.y;p+=3*l*s*t.control1.y,p+=3*u*h*t.control2.y,p+=c*t.endPoint.y;var v=e+c*i;this._drawPoint(f,p,v)}o.closePath(),o.fill()},r.prototype._drawDot=function(t){var e=this._ctx,n="function"==typeof this.dotSize?this.dotSize():this.dotSize;e.beginPath(),this._drawPoint(t.x,t.y,n),e.closePath(),e.fill()},r.prototype._fromData=function(t,e,n){for(var i=0;i<t.length;i+=1){var r=t[i];if(r.length>1)for(var a=0;a<r.length;a+=1){var s=r[a],h=new o(s.x,s.y,s.time),c=s.color;if(0===a)this.penColor=c,this._reset(),this._addPoint(h);else if(a!==r.length-1){var u=this._addPoint(h),l=u.curve,d=u.widths;l&&d&&e(l,d,c)}}else this._reset(),n(r[0])}},r.prototype._toSVG=function(){var t=this,e=this._data,n=this._canvas,o=Math.max(window.devicePixelRatio||1,1),i=n.width/o,r=n.height/o,a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttributeNS(null,"width",n.width),a.setAttributeNS(null,"height",n.height),this._fromData(e,(function(t,e,n){var o=document.createElement("path");if(!(isNaN(t.control1.x)||isNaN(t.control1.y)||isNaN(t.control2.x)||isNaN(t.control2.y))){var i="M "+t.startPoint.x.toFixed(3)+","+t.startPoint.y.toFixed(3)+" C "+t.control1.x.toFixed(3)+","+t.control1.y.toFixed(3)+" "+t.control2.x.toFixed(3)+","+t.control2.y.toFixed(3)+" "+t.endPoint.x.toFixed(3)+","+t.endPoint.y.toFixed(3);o.setAttribute("d",i),o.setAttribute("stroke-width",(2.25*e.end).toFixed(3)),o.setAttribute("stroke",n),o.setAttribute("fill","none"),o.setAttribute("stroke-linecap","round"),a.appendChild(o)}}),(function(e){var n=document.createElement("circle"),o="function"==typeof t.dotSize?t.dotSize():t.dotSize;n.setAttribute("r",o),n.setAttribute("cx",e.x),n.setAttribute("cy",e.y),n.setAttribute("fill",e.color),a.appendChild(n)}));var s='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 '+i+" "+r+'" width="'+i+'" height="'+r+'">',h=a.innerHTML;if(void 0===h){var c=document.createElement("dummy"),u=a.childNodes;c.innerHTML="";for(var l=0;l<u.length;l+=1)c.appendChild(u[l].cloneNode(!0));h=c.innerHTML}return"data:image/svg+xml;base64,"+btoa(s+h+"</svg>")},r.prototype.fromData=function(t){var e=this;this.clear(),this._fromData(t,(function(t,n){return e._drawCurve(t,n.start,n.end)}),(function(t){return e._drawDot(t)})),this._data=t},r.prototype.toData=function(){return this._data},e.default=r},6567:function(t){t.exports=function(t){function e(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return t[o].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e){"use strict";function n(t,e,n,o){return function(t,e,n,o){return{red:o[4*(n*e+t)],green:o[4*(n*e+t)+1],blue:o[4*(n*e+t)+2],alpha:o[4*(n*e+t)+3]}}(t,e,n,o).alpha}function o(t,e,o,i){for(var r=t?1:-1,a=t?0:o-1;t?a<o:a>-1;a+=r)for(var s=0;s<e;s++)if(n(s,a,e,i))return a;return null}function i(t,e,o,i){for(var r=t?1:-1,a=t?0:e-1;t?a<e:a>-1;a+=r)for(var s=0;s<o;s++)if(n(a,s,e,i))return a;return null}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.getContext("2d"),n=t.width,r=t.height,a=e.getImageData(0,0,n,r).data,s=o(!0,n,r,a),h=o(!1,n,r,a),c=i(!0,n,r,a),u=i(!1,n,r,a)-c+1,l=h-s+1,d=e.getImageData(c,s,u,l);return t.width=u,t.height=l,e.clearRect(0,0,u,l),e.putImageData(d,0,0),t}}])},54700:function(t,e,n){"use strict";n.d(e,{A:function(){return h}});var o=n(58168),i=n(96540),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M957.6 507.4L603.2 158.2a7.9 7.9 0 00-11.2 0L353.3 393.4a8.03 8.03 0 00-.1 11.3l.1.1 40 39.4-117.2 115.3a8.03 8.03 0 00-.1 11.3l.1.1 39.5 38.9-189.1 187H72.1c-4.4 0-8.1 3.6-8.1 8V860c0 4.4 3.6 8 8 8h344.9c2.1 0 4.1-.8 5.6-2.3l76.1-75.6 40.4 39.8a7.9 7.9 0 0011.2 0l117.1-115.6 40.1 39.5a7.9 7.9 0 0011.2 0l238.7-235.2c3.4-3 3.4-8 .3-11.2zM389.8 796.2H229.6l134.4-133 80.1 78.9-54.3 54.1zm154.8-62.1L373.2 565.2l68.6-67.6 171.4 168.9-68.6 67.6zM713.1 658L450.3 399.1 597.6 254l262.8 259-147.3 145z"}}]},name:"highlight",theme:"outlined"},a=n(59114),s=function(t,e){return i.createElement(a.A,(0,o.A)({},t,{ref:e,icon:r}))},h=i.forwardRef(s)},84861:function(t,e,n){var o,i,r,a;t.exports=(o=n(5556),i=n(96540),r=n(4764),a=n(6567),function(t){function e(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return t[o].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}Object.defineProperty(e,"__esModule",{value:!0});var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},a=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),s=o(n(1)),h=n(2),c=o(h),u=o(n(3)),l=o(n(4)),d=function(t){function e(){var t,n,o;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=arguments.length,a=Array(r),s=0;s<r;s++)a[s]=arguments[s];return n=o=i(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(a))),o._sigPad=null,o._excludeOurProps=function(){var t=o.props;return t.canvasProps,t.clearOnResize,function(t,e){var n={};for(var o in t)e.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}(t,["canvasProps","clearOnResize"])},o.getCanvas=function(){return o._canvas},o.getTrimmedCanvas=function(){var t=document.createElement("canvas");return t.width=o._canvas.width,t.height=o._canvas.height,t.getContext("2d").drawImage(o._canvas,0,0),(0,l.default)(t)},o.getSignaturePad=function(){return o._sigPad},o._checkClearOnResize=function(){o.props.clearOnResize&&o._resizeCanvas()},o._resizeCanvas=function(){var t=o.props.canvasProps||{},e=t.width,n=t.height;if(!e||!n){var i=o._canvas,r=Math.max(window.devicePixelRatio||1,1);e||(i.width=i.offsetWidth*r),n||(i.height=i.offsetHeight*r),i.getContext("2d").scale(r,r),o.clear()}},o.on=function(){return window.addEventListener("resize",o._checkClearOnResize),o._sigPad.on()},o.off=function(){return window.removeEventListener("resize",o._checkClearOnResize),o._sigPad.off()},o.clear=function(){return o._sigPad.clear()},o.isEmpty=function(){return o._sigPad.isEmpty()},o.fromDataURL=function(t,e){return o._sigPad.fromDataURL(t,e)},o.toDataURL=function(t,e){return o._sigPad.toDataURL(t,e)},o.fromData=function(t){return o._sigPad.fromData(t)},o.toData=function(){return o._sigPad.toData()},i(o,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),a(e,[{key:"componentDidMount",value:function(){this._sigPad=new u.default(this._canvas,this._excludeOurProps()),this._resizeCanvas(),this.on()}},{key:"componentWillUnmount",value:function(){this.off()}},{key:"componentDidUpdate",value:function(){Object.assign(this._sigPad,this._excludeOurProps())}},{key:"render",value:function(){var t=this,e=this.props.canvasProps;return c.default.createElement("canvas",r({ref:function(e){t._canvas=e}},e))}}]),e}(h.Component);d.propTypes={velocityFilterWeight:s.default.number,minWidth:s.default.number,maxWidth:s.default.number,minDistance:s.default.number,dotSize:s.default.oneOfType([s.default.number,s.default.func]),penColor:s.default.string,throttle:s.default.number,onEnd:s.default.func,onBegin:s.default.func,canvasProps:s.default.object,clearOnResize:s.default.bool},d.defaultProps={clearOnResize:!0},e.default=d},function(t,e){t.exports=o},function(t,e){t.exports=i},function(t,e){t.exports=r},function(t,e){t.exports=a}]))}}]);
|