PageSourceSearch

https://static.toss.im/frontend/toss.im/toss-im-career/_next/static/chunks/1124681c-b9f22c8ab0d4aad0.js

js toss.im collected 2026-09-24 08:35:03 UTC 67,299 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7839],{57540:function(t,e,n){function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e,n){return o=g()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&f(i,n.prototype),i},o.apply(null,arguments)}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s(t,e,n){return e&&a(t.prototype,e),n&&a(t,n),t}function u(t,e,n){return u="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n||t):i.value}},u(t,e,n||t)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function l(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}function c(t,e){return!e||"object"!==function(t){return t&&"undefined"!==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t}(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}function v(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t){var e="function"===typeof Map?new Map:void 0;return d=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return o(t,arguments,h(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),f(r,t)},d(t)}function g(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function y(t){var e=g();return function(){var n,r=h(t);if(e){var i=h(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}n.d(e,{q6:function(){return Pt},n0:function(){return q},as:function(){return z},D0:function(){return Dt},jT:function(){return X},yy:function(){return _t},r$:function(){return K},gc:function(){return _},Wl:function(){return ct},Xs:function(){return Ut},f_:function(){return Qt},uU:function(){return zt},Py:function(){return At},QQ:function(){return ot},xv:function(){return p},YW:function(){return Rt},gm:function(){return B},nZ:function(){return J},BO:function(){return qt},IS:function(){return oe},cp:function(){return T},Gz:function(){return ae},bg:function(){return D}});var p=function(){function t(){i(this,t)}return s(t,[{key:"lineAt",value:function(t){if(t<0||t>this.length)throw new RangeError("Invalid position ".concat(t," in document of length ").concat(this.length));return this.lineInner(t,!1,1,0)}},{key:"line",value:function(t){if(t<1||t>this.lines)throw new RangeError("Invalid line number ".concat(t," in ").concat(this.lines,"-line document"));return this.lineInner(t,!0,1,0)}},{key:"replace",value:function(t,e,n){var r=[];return this.decompose(0,t,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(e,this.length,r,1),k.from(r,this.length-(e-t)+n.length)}},{key:"append",value:function(t){return this.replace(this.length,this.length,t)}},{key:"slice",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,n=[];return this.decompose(t,e,n,0),k.from(n,e-t)}},{key:"eq",value:function(t){if(t==this)return!0;
1if(t.length!=this.length||t.lines!=this.lines)return!1;for(var e=this.scanIdentical(t,1),n=this.length-this.scanIdentical(t,-1),r=new b(this),i=new b(t),o=e,a=e;;){if(r.next(o),i.next(o),o=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(a+=r.value.length,r.done||a>=n)return!0}}},{key:"iter",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return new b(this,t)}},{key:"iterRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length;return new I(this,t,e)}},{key:"iterLines",value:function(t,e){var n;if(null==t)n=this.iter();else{null==e&&(e=this.lines+1);var r=this.line(t).from;n=this.iterRange(r,Math.max(r,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new P(n)}},{key:"toString",value:function(){return this.sliceString(0)}},{key:"toJSON",value:function(){var t=[];return this.flatten(t),t}}],[{key:"of",value:function(e){if(0==e.length)throw new RangeError("A document must have at least one line");return 1!=e.length||e[0]?e.length<=32?new m(e):k.from(m.split(e,[])):t.empty}}]),t}(),m=function(t){l(n,t);var e=y(n);function n(t){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:w(t);return i(this,n),(r=e.call(this)).text=t,r.length=o,r}return s(n,[{key:"lines",get:function(){return this.text.length}},{key:"children",get:function(){return null}},{key:"lineInner",value:function(t,e,n,r){for(var i=0;;i++){var o=this.text[i],a=r+o.length;if((e?n:a)>=t)return new E(r,a,n,o);r=a+1,n++}}},{key:"decompose",value:function(t,e,r,i){var o=t<=0&&e>=this.length?this:new n(S(this.text,t,e),Math.min(e,this.length)-Math.max(0,t));if(1&i){var a=r.pop(),s=x(o.text,a.text.slice(),0,o.length);if(s.length<=32)r.push(new n(s,a.length+o.length));else{var u=s.length>>1;r.push(new n(s.slice(0,u)),new n(s.slice(u)))}}else r.push(o)}},{key:"replace",value:function(t,e,r){if(!(r instanceof n))return u(h(n.prototype),"replace",this).call(this,t,e,r);var i=x(this.text,x(r.text,S(this.text,0,t)),e),o=this.length+r.length-(e-t);return i.length<=32?new n(i,o):k.from(n.split(i,[]),o)}},{key:"sliceString",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n",r="",i=0,o=0;i<=e&&o<this.text.length;o++){var a=this.text[o],s=i+a.length;i>t&&o&&(r+=n),t<s&&e>i&&(r+=a.slice(Math.max(0,t-i),e-i)),i=s+1}return r}},{key:"flatten",value:function(t){var e=!0,n=!1,r=void 0;try{for(var i,o=this.text[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value;t.push(a)}}catch(s){n=!0,r=s}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}}},{key:"scanIdentical",value:function(){return 0}}],[{key:"split",value:function(t,e){var r=[],i=-1,o=!0,a=!1,s=void 0;try{for(var u,h=t[Symbol.iterator]();!(o=(u=h.next()).done);o=!0){var l=u.value;r.push(l),i+=l.length+1,32==r.length&&(e.push(new n(r,i)),r=[],i=-1)}}catch(c){a=!0,s=c}finally{try{o||null==h.return||h.return()}finally{if(a)throw s}}return i>-1&&e.push(new n(r,i)),e}}]),n}(d(p)),k=function(t){l(n,t);var e=y(n);function n(t,r){var o;i(this,n),(o=e.call(this)).children=t,o.length=r,o.lines=0;var a=!0,s=!1,u=void 0;try{for(var h,l=t[Symbol.iterator]();!(a=(h=l.next()).done);a=!0){var c=h.value;o.lines+=c.lines}}catch(f){s=!0,u=f}finally{try{a||null==l.return||l.return()}finally{if(s)throw u}}return o}return s(n,[{key:"lineInner",value:function(t,e,n,r){for(var i=0;;i++){var o=this.children[i],a=r+o.length,s=n+o.lines-1;if((e?s:a)>=t)return o.lineInner(t,e,n,r);r=a+1,n=s+1}}},{key:"decompose",value:function(t,e,n,r){for(var i=0,o=0;o<=e&&i<this.children.length;i++){var a=this.children[i],s=o+a.length;if(t<=s&&e>=o){var u=r&((o<=t?1:0)|(s>=e?2:0));o>=t&&s<=e&&!u?n.push(a):a.decompose(t-o,e-o,n,u)}o=s+1}}},{key:"replace",value:function(t,e,r){if(r.lines<this.lines)for(var i=0,o=0;i<this.children.length;i++){var a=this.children[i],s=o+a.length;if(t>=o&&e<=s){var l=a.replace(t-o,e-o,r),c=this.lines-a.lines+l.lines;if(l.lines<c>>4&&l.lines>c>>6){var f=this.children.slice();return f[i]=l,new n(f,this.length-(e-t)+r.length)}return u(h(n.prototype),"replace",this).call(this,o,s,l)}o=s+1}return u(h(n.prototype),"replace",this).call(this,t,e,r)}},{key:"sliceString",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n",r="",i=0,o=0;i<this.children.length&&o<=e;i++){var a=this.children[i],s=o+a.length;o>t&&i&&(r+=n),t<s&&e>o&&(r+=a.sliceString(t-o,e-o,n)),o=s+1}return r}},{key:"flatten",value:function(t){var e=!0,n=!1,r=void 0;try{for(var i,o=this.children[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){i.value.flatten(t)}}catch(a){n=!0,r=a}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}}},{key:"scanIdentical",value:function(t,e){if(!(t instanceof n))return 0;for(var r=0,i=v(e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1],4),o=i[0],a=i[1],s=i[2],u=i[3];;o+=e,a+=e){if(o==s||a==u)return r;var h=this.children[o],l=t.children[a];if(h!=l)return r+h.scanIdentical(l,e);r+=h.length+1}}}],[{key:"from",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.reduce((function(t,e){return t+e.length+1}),-1),r=0,i=!0,o=!1,a=void 0;try{for(var s,u=t[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var h=s.value;r+=h.lines}}catch(j){o=!0,a=j}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}if(r<32){var l=[],c=!0,f=!1,v=void 0;try{for(var d,g=t[Symbol.iterator]();!(c=(d=g.next()).done);c=!0){var y=d.value;y.flatten(l)}}catch(j){f=!0,v=j}finally{try{c||null==g.return||g.return()}finally{if(f)throw v}}return new m(l,e)}var p=Math.max(32,r>>5),k=p<<1,w=p>>1,x=[],S=0,b=-1,I=[];function P(t){var e;if(t.lines>k&&t instanceof n){var r=!0,i=!1,o=void 0;try{for(var a,s=t.children[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){P(a.value)}}catch(j){i=!0,o=j}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}}else t.lines>w&&(S>w||!S)?(E(),x.push(t)):t instanceof m&&S&&(e=I[I.length-1])instanceof m&&t.lines+e.lines<=32?(S+=t.lines,b+=t.length+1,I[I.length-1]=new m(e.text.concat(t.text),e.length+1+t.length)):(S+t.lines>p&&E(),S+=t.lines,b+=t.length+1,I.push(t))}function E(){0!=S&&(x.push(1==I.length?I[0]:n.from(I,b)),b=-1,S=I.length=0)}var O=!0,A=!1,R=void 0;try{for(var M,T=t[Symbol.iterator]();!(O=(M=T.next()).done);O=!0){var C=M.value;P(C)}}catch(j){A=!0,R=j}finally{try{O||null==T.return||T.return()}finally{if(A)throw R}}return E(),1==x.length?x[0]:new n(x,e)}}]),n}(d(p));function w(t){var e=-1,n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);
1n=!0){e+=o.value.length+1}}catch(s){r=!0,i=s}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return e}function x(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e9,i=0,o=0,a=!0;o<t.length&&i<=r;o++){var s=t[o],u=i+s.length;u>=n&&(u>r&&(s=s.slice(0,r-i)),i<n&&(s=s.slice(n-i)),a?(e[e.length-1]+=s,a=!1):e.push(s)),i=u+1}return e}function S(t,e,n){return x(t,[""],e,n)}p.empty=new m([""],0);var b=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;i(this,t),this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[n>0?1:(e instanceof m?e.text.length:e.children.length)<<1]}return s(t,[{key:"nextInner",value:function(t,e){for(this.done=this.lineBreak=!1;;){var n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],o=i>>1,a=r instanceof m?r.text.length:r.children.length;if(o==(e>0?a:0)){if(0==n)return this.done=!0,this.value="",this;e>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&i)==(e>
10?0:1)){if(this.offsets[n]+=e,0==t)return this.lineBreak=!0,this.value="\n",this;t--}else if(r instanceof m){var s=r.text[o+(e<0?-1:0)];if(this.offsets[n]+=e,s.length>Math.max(0,t))return this.value=0==t?s:e>0?s.slice(t):s.slice(0,s.length-t),this;t-=s.length}else{var u=r.children[o+(e<0?-1:0)];t>u.length?(t-=u.length,this.offsets[n]+=e):(e<0&&this.offsets[n]--,this.nodes.push(u),this.offsets.push(e>0?1:(u instanceof m?u.text.length:u.children.length)<<1))}}}},{key:"next",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}]),t}(),I=function(){function t(e,n,r){i(this,t),this.value="",this.done=!1,this.cursor=new b(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}return s(t,[{key:"nextInner",value:function(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);var n=e<0?this.pos-this.from:this.to-this.pos;t>n&&(t=n),n-=t;var r=this.cursor.next(t).value;return this.pos+=(r.length+t)*e,this.value=r.length<=n?r:e<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}},{key:"next",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}},{key:"lineBreak",get:function(){return this.cursor.lineBreak&&""!=this.value}}]),t}(),P=function(){function t(e){i(this,t),this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}return s(t,[{key:"next",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=this.inner.next(t),n=e.done,r=e.lineBreak,i=e.value;return n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}},{key:"lineBreak",get:function(){return!1}}]),t}();"undefined"!=typeof Symbol&&(p.prototype[Symbol.iterator]=function(){return this.iter()},b.prototype[Symbol.iterator]=I.prototype[Symbol.iterator]=P.prototype[Symbol.iterator]=function(){return this});for(var E=function(){function t(e,n,r,o){i(this,t),this.from=e,this.to=n,this.number=r,this.text=o}return s(t,[{key:"length",get:function(){return this.to-this.from}}]),t}(),O="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((function(t){return t?parseInt(t,36):1})),A=1;A<O.length;A++)O[A]+=O[A-1];function R(t){for(var e=1;e<O.length;e+=2)if(O[e]>t)return O[e-1]<=t;return!1}function M(t){return t>=127462&&t<=127487}function T(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return(n?C:j)(t,e,r)}function C(t,e,n){if(e==t.length)return e;e&&N(t.charCodeAt(e))&&F(t.charCodeAt(e-1))&&e--;var r=B(t,e);for(e+=J(r);e<t.length;){var i=B(t,e);if(8205==r||8205==i||n&&R(i))e+=J(i),r=i;else{if(!M(i))break;for(var o=0,a=e-2;a>=0&&M(B(t,a));)o++,a-=2;if(o%2==0)break;e+=2}}return e}function j(t,e,n){for(;e>0;){var r=C(t,e-2,n);if(r<e)return r;e--}return 0}function N(t){return t>=56320&&t<57344}function F(t){return t>=55296&&t<56320}function B(t,e){var n=t.charCodeAt(e);if(!F(n)||e+1==t.length)return n;var r=t.charCodeAt(e+1);return N(r)?r-56320+(n-55296<<10)+65536:n}function D(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function J(t){return t<65536?1:2}var L=/\r\n?|\n/,_=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(_||(_={})),q=function(){function t(e){i(this,t),this.sections=e}return s(t,[{key:"length",get:function(){for(var t=0,e=0;e<this.sections.length;e+=2)t+=this.sections[e];return t}},{key:"newLength",get:function(){for(var t=0,e=0;e<this.sections.length;e+=2){var n=this.sections[e+1];t+=n<0?this.sections[e]:n}return t}},{key:"empty",get:function(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}},{key:"iterGaps",value:function(t){for(var e=0,n=0,r=0;e<this.sections.length;){var i=this.sections[e++],o=this.sections[e++];o<0?(t(n,r,i),r+=i):r+=o,n+=i}}},{key:"iterChangedRanges",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];$(this,t,e)}},{key:"invertedDesc",get:function(){for(var e=[],n=0;n<this.sections.length;){var r=this.sections[n++],i=this.sections[n++];i<0?e.push(r,i):e.push(i,r)}return new t(e)}},{key:"composeDesc",value:function(t){return this.empty?t:t.empty?this:G(this,t)}},{key:"mapDesc",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t.empty?this:U(this,t,e)}},{key:"mapPos",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_.Simple,r=0,i=0,o=0;o<this.sections.length;){var a=this.sections[o++],s=this.sections[o++],u=r+a;if(s<0){if(u>t)return i+(t-r);i+=a}else{if(n!=_.Simple&&u>=t&&(n==_.TrackDel&&r<t&&u>t||n==_.TrackBefore&&r<t||n==_.TrackAfter&&u>t))return null;if(u>t||u==t&&e<0&&!a)return t==r||e<0?i:i+s;i+=s}r=u}if(t>r)throw new RangeError("Position ".concat(t," is out of range for changeset of length ").concat(r));return i}},{key:"touchesRange",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=0,r=0;n<this.sections.length&&r<=e;){var i=this.sections[n++],o=this.sections[n++],a=r+i;if(o>=0&&r<=e&&a>=t)return!(r<t&&a>e)||"cover";r=a}return!1}},{key:"toString",value:function(){for(var t="",e=0;e<this.sections.length;){var n=this.sections[e++],r=this.sections[e++];t+=(t?" ":"")+n+(r>=0?":"+r:"")}return t}},{key:"toJSON",value:function(){return this.sections}}],[{key:"fromJSON",value:function(e){if(!Array.isArray(e)||e.length%2||e.some((function(t){return"number"!=typeof t})))throw new RangeError("Invalid JSON representation of ChangeDesc");return new t(e)}},{key:"create",value:function(e){return new t(e)}}]),t}(),z=function(t){l(n,t);var e=y(n);function n(t,r){var o;return i(this,n),(o=e.call(this,t)).inserted=r,o}return s(n,[{key:"apply",value:function(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return $(this,(function(e,n,r,i,o){return t=t.replace(r,r+(n-e),o)}),!1),t}},{key:"mapDesc",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return U(this,t,e,!0)}},{key:"invert",value:function(t){for(var e=this.sections.slice(),r=[],i=0,o=0;i<e.length;i+=2){var a=e[i],s=e[i+1];if(s>=0){e[i]=s,e[i+1]=a;for(var u=i>>1;r.length<u;)r.push(p.empty);r.push(a?t.slice(o,o+a):p.empty)}o+=a}return new n(e,r)}},{key:"compose",value:function(t){return this.empty?t:t.empty?this:G(this,t,!0)}},{key:"map",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t.empty?this:U(this,t,e,!0)}},{key:"iterChanges",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];$(this,t,e)}},{key:"desc",get:function(){return q.create(this.sections)}},{key:"filter",value:function(t){var e=[],r=[],i=[],o=new Q(this);t:for(var a=0,s=0;;){for(var u=a==t.length?1e9:t[a++];s<u||s==u&&0==o.len;){if(o.done)break t;var h=Math.min(o.len,u-s);V(i,h,-1);var l=-1==o.ins?-1:0==o.off?o.ins:0;V(e,h,l),l>
10&&W(r,e,o.text),o.forward(h),s+=h}for(var c=t[a++];s<c;){if(o.done)break t;var f=Math.min(o.len,c-s);V(e,f,-1),V(i,f,-1==o.ins?-1:0==o.off?o.ins:0),o.forward(f),s+=f}}return{changes:new n(e,r),filtered:q.create(i)}}},{key:"toJSON",value:function(){for(var t=[],e=0;e<this.sections.length;e+=2){var n=this.sections[e],r=this.sections[e+1];r<0?t.push(n):0==r?t.push([n]):t.push([n].concat(this.inserted[e>>1].toJSON()))}return t}}],[{key:"of",value:function(t,e,r){var i=[],o=[],a=0,s=null;function u(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(t||i.length){a<e&&V(i,e-a,-1);var r=new n(i,o);s=s?s.compose(r.map(s)):r,i=[],o=[],a=0}}return function t(h){if(Array.isArray(h)){var l=!0,c=!1,f=void 0;try{for(var v,d=h[Symbol.iterator]();!(l=(v=d.next()).done);l=!0){t(v.value)}}catch(S){c=!0,f=S}finally{try{l||null==d.return||d.return()}finally{if(c)throw f}}}else if(h instanceof n){if(h.length!=e)throw new RangeError("Mismatched change set length (got ".concat(h.length,", expected ").concat(e,")"));u(),s=s?s.compose(h.map(s)):h}else{var g=h.from,y=h.to,m=void 0===y?g:y,k=h.insert;if(g>m||g<0||m>e)throw new RangeError("Invalid change range ".concat(g," to ").concat(m," (in doc of length ").concat(e,")"));var w=k?"string"==typeof k?p.of(k.split(r||L)):k:p.empty,x=w.length;if(g==m&&0==x)return;g<a&&u(),g>a&&V(i,g-a,-1),V(i,m-g,x),W(o,i,w),a=m}}(t),u(!s),s}},{key:"empty",value:function(t){return new n(t?[t,-1]:[],[])}},{key:"fromJSON",value:function(t){var e=function(e){var n=t[e];if("number"==typeof n)r.push(n,-1);else{if(!Array.isArray(n)||"number"!=typeof n[0]||n.some((function(t,e){return e&&"string"!=typeof t})))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==n.length)r.push(n[0],0);else{for(;i.length<e;)i.push(p.empty);i[e]=p.of(n.slice(1)),r.push(n[0],i[e].length)}}};if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");for(var r=[],i=[],o=0;o<t.length;o++)e(o);return new n(r,i)}},{key:"createSet",value:function(t,e){return new n(t,e)}}]),n}(q);function V(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!(0==e&&n<=0)){var i=t.length-2;i>=0&&n<=0&&n==t[i+1]?t[i]+=e:0==e&&0==t[i]?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}}function W(t,e,n){if(0!=n.length){var r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<r;)t.push(p.empty);t.push(n)}}}function $(t,e,n){for(var r=t.inserted,i=0,o=0,a=0;a<t.sections.length;){var s=t.sections[a++],u=t.sections[a++];if(u<0)i+=s,o+=s;else{for(var h=i,l=o,c=p.empty;h+=s,l+=u,u&&r&&(c=c.append(r[a-2>>1])),!(n||a==t.sections.length||t.sections[a+1]<0);)s=t.sections[a++],u=t.sections[a++];e(i,h,o,l,c),i=h,o=l}}}function U(t,e,n){for(var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=[],o=r?[]:null,a=new Q(t),s=new Q(e),u=-1;;)if(-1==a.ins&&-1==s.ins){var h=Math.min(a.len,s.len);V(i,h,-1),a.forward(h),s.forward(h)}else if(s.ins>=0&&(a.ins<0||u==a.i||0==a.off&&(s.len<a.len||s.len==a.len&&!n))){var l=s.len;for(V(i,s.ins,-1);l;){var c=Math.min(a.len,l);a.ins>=0&&u<a.i&&a.len<=c&&(V(i,0,a.ins),o&&W(o,i,a.text),u=a.i),a.forward(c),l-=c}s.next()}else{if(!(a.ins>=0)){if(a.done&&s.done)return o?z.createSet(i,o):q.create(i);throw new Error("Mismatched change set lengths")}for(var f=0,v=a.len;v;)if(-1==s.ins){var d=Math.min(v,s.len);f+=d,v-=d,s.forward(d)}else{if(!(0==s.ins&&s.len<v))break;v-=s.len,s.next()}V(i,f,u<a.i?a.ins:0),o&&u<a.i&&W(o,i,a.text),u=a.i,a.forward(a.len-v)}}function G(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[],i=n?[]:null,o=new Q(t),a=new Q(e),s=!1;;){if(o.done&&a.done)return i?z.createSet(r,i):q.create(r);if(0==o.ins)V(r,o.len,0,s),o.next();else if(0!=a.len||a.done){if(o.done||a.done)throw new Error("Mismatched change set lengths");var u=Math.min(o.len2,a.len),h=r.length;if(-1==o.ins){var l=-1==a.ins?-1:a.off?0:a.ins;V(r,u,l,s),i&&l&&W(i,r,a.text)}else-1==a.ins?(V(r,o.off?0:o.len,u,s),i&&W(i,r,o.textBit(u))):(V(r,o.off?0:o.len,a.off?0:a.ins,s),i&&!a.off&&W(i,r,a.text));s=(o.ins>u||a.ins>=0&&a.len>u)&&(s||r.length>h),o.forward2(u),a.forward(u)}else V(r,0,a.ins,s),i&&W(i,r,a.text),a.next()}}var Q=function(){function t(e){i(this,t),this.set=e,this.i=0,this.next()}return s(t,[{key:"next",value:function(){var t=this.set.sections;this.i<t.length?(this.len=t[this.i++],this.ins=t[this.i++]):(this.len=0,this.ins=-2),this.off=0}},{key:"done",get:function(){return-2==this.ins}},{key:"len2",get:function(){return this.ins<0?this.len:this.ins}},{key:"text",get:function(){var t=this.set.inserted,e=this.i-2>>1;return e>=t.length?p.empty:t[e]}},{key:"textBit",value:function(t){var e=this.set.inserted,n=this.i-2>>1;return n>=e.length&&!t?p.empty:e[n].slice(this.off,null==t?void 0:this.off+t)}},{key:"forward",value:function(t){t==this.len?this.next():(this.len-=t,this.off+=t)}},{key:"forward2",value:function(t){-1==this.ins?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}]),t}(),H=function(){function t(e,n,r){i(this,t),this.from=e,this.to=n,this.flags=r}return s(t,[{key:"anchor",get:function(){return 16&this.flags?this.to:this.from}},{key:"head",get:function(){return 16&this.flags?this.from:this.to}},{key:"empty",get:function(){return this.from==this.to}},{key:"assoc",get:function(){return 4&this.flags?-1:8&this.flags?1:0}},{key:"bidiLevel",get:function(){var t=3&this.flags;return 3==t?null:t}},{key:"goalColumn",get:function(){var t=this.flags>>5;return 33554431==t?void 0:t}},{key:"map",value:function(e){var n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return this.empty?n=r=e.mapPos(this.from,i):(n=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),n==this.from&&r==this.to?this:new t(n,r,this.flags)}},{key:"extend",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;if(t<=this.anchor&&e>=this.anchor)return X.range(t,e);var n=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;
1return X.range(this.anchor,n)}},{key:"eq",value:function(t){return this.anchor==t.anchor&&this.head==t.head}},{key:"toJSON",value:function(){return{anchor:this.anchor,head:this.head}}}],[{key:"fromJSON",value:function(t){if(!t||"number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid JSON representation for SelectionRange");return X.range(t.anchor,t.head)}},{key:"create",value:function(e,n,r){return new t(e,n,r)}}]),t}(),X=function(){function t(e,n){i(this,t),this.ranges=e,this.mainIndex=n}return s(t,[{key:"map",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return e.empty?this:t.create(this.ranges.map((function(t){return t.map(e,n)})),this.mainIndex)}},{key:"eq",value:function(t){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].eq(t.ranges[e]))return!1;return!0}},{key:"main",get:function(){return this.ranges[this.mainIndex]}},{key:"asSingle",value:function(){return 1==this.ranges.length?this:new t([this.main],0)}},{key:"addRange",value:function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t.create([e].concat(this.ranges),n?0:this.mainIndex+1)}},{key:"replaceRange",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.mainIndex,r=this.ranges.slice();return r[n]=e,t.create(r,this.mainIndex)}},{key:"toJSON",value:function(){return{ranges:this.ranges.map((function(t){return t.toJSON()})),main:this.mainIndex}}}],[{key:"fromJSON",value:function(e){if(!e||!Array.isArray(e.ranges)||"number"!=typeof e.main||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new t(e.ranges.map((function(t){return H.fromJSON(t)})),e.main)}},{key:"single",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return new t([t.range(e,n)],0)}},{key:"create",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0==e.length)throw new RangeError("A selection needs at least one range");for(var r=0,i=0;i<e.length;i++){var o=e[i];if(o.empty?o.from<=r:o.from<r)return t.normalized(e.slice(),n);r=o.to}return new t(e,n)}},{key:"cursor",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;return H.create(t,t,(0==e?0:e<0?4:8)|(null==n?3:Math.min(2,n))|(null!==r&&void 0!==r?r:33554431)<<5)}},{key:"range",value:function(t,e,n,r){var i=(null!==n&&void 0!==n?n:33554431)<<5|(null==r?3:Math.min(2,r));return e<t?H.create(e,t,24|i):H.create(t,e,(e>t?4:0)|i)}},{key:"normalized",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=e[n];e.sort((function(t,e){return t.from-e.from})),n=e.indexOf(r);for(var i=1;i<e.length;i++){var o=e[i],a=e[i-1];if(o.empty?o.from<=a.to:o.from<a.to){var s=a.from,u=Math.max(o.to,a.to);i<=n&&n--,e.splice(--i,2,o.anchor>o.head?t.range(u,s):t.range(s,u))}}return new t(e,n)}}]),t}();function Y(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=t.ranges[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){if(o.value.to>e)throw new RangeError("Selection points outside of document")}}catch(s){r=!0,i=s}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}}var Z=0,K=function(){function t(e,n,r,o,a){i(this,t),this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=o,this.id=Z++,this.default=e([]),this.extensions="function"==typeof a?a(this):a}return s(t,[{key:"of",value:function(t){return new et([],this,0,t)}},{key:"compute",value:function(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new et(t,this,1,e)}},{key:"computeN",value:function(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new et(t,this,2,e)}},{key:"from",value:function(t,e){return e||(e=function(t){return t}),this.compute([t],(function(n){return e(n.field(t))}))}}],[{key:"define",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new t(e.combine||function(t){return t},e.compareInput||function(t,e){return t===e},e.compare||(e.combine?function(t,e){return t===e}:tt),!!e.static,e.enables)}}]),t}();function tt(t,e){return t==e||t.length==e.length&&t.every((function(t,n){return t===e[n]}))}var et=function(){function t(e,n,r,o){i(this,t),this.dependencies=e,this.facet=n,this.type=r,this.value=o,this.id=Z++}return s(t,[{key:"dynamicSlot",value:function(t){var e,n=this,r=this.value,i=this.facet.compareInput,o=this.id,a=t[o]>>1,s=2==this.type,u=!1,h=!1,l=[],c=!0,f=!1,v=void 0;try{for(var d,g=this.dependencies[Symbol.iterator]();!(c=(d=g.next()).done);c=!0){var y=d.value;"doc"==y?u=!0:"selection"==y?h=!0:0==(1&(null!==(e=t[y.id])&&void 0!==e?e:1))&&l.push(t[y.id])}}catch(p){f=!0,v=p}finally{try{c||null==g.return||g.return()}finally{if(f)throw v}}return{create:function(t){return t.values[a]=r(t),1},update:function(t,e){if(u&&e.docChanged||h&&(e.docChanged||e.selection)||rt(t,l)){var n=r(t);if(s?!nt(n,t.values[a],i):!i(n,t.values[a]))return t.values[a]=n,1}return 0},reconfigure:function(t,e){var u,h=e.config.address[o];if(null!=h){var l=pt(e,h);if(n.dependencies.every((function(n){return n instanceof K?e.facet(n)===t.facet(n):!(n instanceof ot)||e.field(n,!1)==t.field(n,!1)}))||(s?nt(u=r(t),l,i):i(u=r(t),l)))return t.values[a]=l,0}else u=r(t);return t.values[a]=u,1}}}}]),t}();function nt(t,e,n){if(t.length!=e.length)return!1;for(var r=0;r<t.length;r++)if(!n(t[r],e[r]))return!1;return!0}function rt(t,e){var n=!1,r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){1&yt(t,a.value)&&(n=!0)}}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}var it=K.define({static:!0}),ot=function(){function t(e,n,r,o,a){i(this,t),this.id=e,this.createF=n,this.updateF=r,this.compareF=o,this.spec=a,this.provides=void 0}return s(t,[{key:"create",value:function(t){var e=this,n=t.facet(it).find((function(t){return t.field==e}));return((null===n||void 0===n?void 0:n.create)||this.createF)(t)}},{key:"slot",value:function(t){var e=this,n=t[this.id]>>1;return{create:function(t){return t.values[n]=e.create(t),1},update:function(t,r){var i=t.values[n],o=e.updateF(i,r);
1return e.compareF(i,o)?0:(t.values[n]=o,1)},reconfigure:function(t,r){return null!=r.config.address[e.id]?(t.values[n]=r.field(e),0):(t.values[n]=e.create(t),1)}}}},{key:"init",value:function(t){return[this,it.of({field:this,create:t})]}},{key:"extension",get:function(){return this}}],[{key:"define",value:function(e){var n=new t(Z++,e.create,e.update,e.compare||function(t,e){return t===e},e);return e.provide&&(n.provides=e.provide(n)),n}}]),t}(),at=4,st=3,ut=2,ht=1;function lt(t){return function(e){return new ft(e,t)}}var ct={highest:lt(0),high:lt(ht),default:lt(ut),low:lt(st),lowest:lt(at)},ft=function t(e,n){i(this,t),this.inner=e,this.prec=n},vt=function(){function t(){i(this,t)}return s(t,[{key:"of",value:function(t){return new dt(this,t)}},{key:"reconfigure",value:function(e){return t.reconfigure.of({compartment:this,extension:e})}},{key:"get",value:function(t){return t.config.compartments.get(this)}}]),t}(),dt=function t(e,n){i(this,t),this.compartment=e,this.inner=n},gt=function(){function t(e,n,r,o,a,s){for(i(this,t),this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=o,this.staticValues=a,this.facets=s,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}return s(t,[{key:"staticFacet",value:function(t){var e=this.address[t.id];return null==e?t.default:this.staticValues[e>>1]}}],[{key:"resolve",value:function(e,n,r){var i=function(t){var e=a[t],n=e[0].facet,i=b&&b[t]||[];if(e.every((function(t){return 0==t.type})))if(d[n.id]=g.length<<1|1,tt(i,e))g.push(r.facet(n));else{var o=n.combine(e.map((function(t){return t.value})));g.push(r&&n.compare(o,r.facet(n))?r.facet(n):o)}else{var s=!0,u=!1,h=void 0;try{for(var l,c=function(){var t=l.value;0==t.type?(d[t.id]=g.length<<1|1,g.push(t.value)):(d[t.id]=y.length<<1,y.push((function(e){return t.dynamicSlot(e)})))},f=e[Symbol.iterator]();!(s=(l=f.next()).done);s=!0)c()}catch(v){u=!0,h=v}finally{try{s||null==f.return||f.return()}finally{if(u)throw h}}d[n.id]=y.length<<1,y.push((function(t){return function(t,e,n){var r=n.map((function(e){return t[e.id]})),i=n.map((function(t){return t.type})),o=r.filter((function(t){return!(1&t)})),a=t[e.id]>>1;function s(t){for(var n=[],o=0;o<r.length;o++){var a=pt(t,r[o]),s=!0,u=!1,h=void 0;if(2==i[o])try{for(var l,c=a[Symbol.iterator]();!(s=(l=c.next()).done);s=!0){var f=l.value;n.push(f)}}catch(v){u=!0,h=v}finally{try{s||null==c.return||c.return()}finally{if(u)throw h}}else n.push(a)}return e.combine(n)}return{create:function(t){var e=!0,n=!1,i=void 0;try{for(var o,u=r[Symbol.iterator]();!(e=(o=u.next()).done);e=!0)yt(t,o.value)}catch(v){n=!0,i=v}finally{try{e||null==u.return||u.return()}finally{if(n)throw i}}return t.values[a]=s(t),1},update:function(t,n){if(!rt(t,o))return 0;var r=s(t);return e.compare(r,t.values[a])?0:(t.values[a]=r,1)},reconfigure:function(t,i){var o=rt(t,r),u=i.config.facets[e.id],h=i.facet(e);if(u&&!o&&tt(n,u))return t.values[a]=h,0;var l=s(t);return e.compare(l,h)?(t.values[a]=h,0):(t.values[a]=l,1)}}}(t,n,e)}))}},o=[],a=Object.create(null),s=new Map,u=!0,h=!1,l=void 0;try{for(var c,f=function(t,e,n){var r=[[],[],[],[],[]],i=new Map;function o(t,a){var s=i.get(t);if(null!=s){if(s<=a)return;var u=r[s].indexOf(t);u>-1&&r[s].splice(u,1),t instanceof dt&&n.delete(t.compartment)}if(i.set(t,a),Array.isArray(t)){var h=!0,l=!1,c=void 0;try{for(var f,v=t[Symbol.iterator]();!(h=(f=v.next()).done);h=!0){o(f.value,a)}}catch(y){l=!0,c=y}finally{try{h||null==v.return||v.return()}finally{if(l)throw c}}}else if(t instanceof dt){if(n.has(t.compartment))throw new RangeError("Duplicate use of compartment in extensions");var d=e.get(t.compartment)||t.inner;n.set(t.compartment,d),o(d,a)}else if(t instanceof ft)o(t.inner,t.prec);else if(t instanceof ot)r[a].push(t),t.provides&&o(t.provides,a);else if(t instanceof et)r[a].push(t),t.facet.extensions&&o(t.facet.extensions,ut);else{var g=t.extension;if(!g)throw new Error("Unrecognized extension value in extension set (".concat(t,"). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks."));o(g,a)}}return o(t,ut),r.reduce((function(t,e){return t.concat(e)}))}(e,n,s)[Symbol.iterator]();!(u=(c=f.next()).done);u=!0){var v=c.value;v instanceof ot?o.push(v):(a[v.facet.id]||(a[v.facet.id]=[])).push(v)}}catch(P){h=!0,l=P}finally{try{u||null==f.return||f.return()}finally{if(h)throw l}}var d=Object.create(null),g=[],y=[],p=!0,m=!1,k=void 0;try{for(var w,x=function(){var t=w.value;d[t.id]=y.length<<1,y.push((function(e){return t.slot(e)}))},S=o[Symbol.iterator]();!(p=(w=S.next()).done);p=!0)x()}catch(P){m=!0,k=P}finally{try{p||null==S.return||S.return()}finally{if(m)throw k}}var b=null===r||void 0===r?void 0:r.config.facets;for(var I in a)i(I);return new t(e,s,y.map((function(t){return t(d)})),d,g,a)}}]),t}();function yt(t,e){if(1&e)return 2;var n=e>>1,r=t.status[n];if(4==r)throw new Error("Cyclic dependency between fields and/or facets");if(2&r)return r;t.status[n]=4;var i=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|i}function pt(t,e){return 1&e?t.config.staticValues[e>>1]:t.values[e>>1]}var mt=K.define(),kt=K.define({combine:function(t){return t.some((function(t){return t}))},static:!0}),wt=K.define({combine:function(t){return t.length?t[0]:void 0},static:!0}),xt=K.define(),St=K.define(),bt=K.define(),It=K.define({combine:function(t){return!!t.length&&t[0]}}),Pt=function(){function t(e,n){i(this,t),this.type=e,this.value=n}return s(t,null,[{key:"define",value:function(){return new Et}}]),t}(),Et=function(){function t(){i(this,t)}return s(t,[{key:"of",value:function(t){return new Pt(this,t)}}]),t}(),Ot=function(){function t(e){i(this,t),this.map=e}return s(t,[{key:"of",value:function(t){return new At(this,t)}}]),t}(),At=function(){function t(e,n){i(this,t),this.type=e,this.value=n}return s(t,[{key:"map",value:function(e){var n=this.type.map(this.value,e);return void 0===n?void 0:n==this.value?this:new t(this.type,n)}},{key:"is",value:function(t){return this.type==t}}],[{key:"define",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Ot(t.map||function(t){return t})}},{key:"mapEffects",value:function(t,e){if(!t.length)return t;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value.map(e);u&&n.push(u)}}catch(h){i=!0,o=h}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}]),t}();At.reconfigure=At.define(),At.appendConfig=At.define();var Rt=function(){function t(e,n,r,o,a,s){i(this,t),this.startState=e,this.changes=n,this.selection=r,this.effects=o,this.annotations=a,this.scrollIntoView=s,this._doc=null,this._state=null,r&&Y(r,n.newLength),a.some((function(e){return e.type==t.time}))||(this.annotations=a.concat(t.time.of(Date.now())))}return s(t,[{key:"newDoc",get:function(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}},{key:"newSelection",get:function(){return this.selection||this.startState.selection.map(this.changes)}},{key:"state",get:function(){return this._state||this.startState.applyTransaction(this),this._state}},{key:"annotation",value:function(t){var e=!0,n=!1,r=void 0;try{for(var i,o=this.annotations[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value;if(a.type==t)return a.value}}catch(s){n=!0,r=s}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}}},{key:"docChanged",get:function(){return!this.changes.empty}},{key:"reconfigured",get:function(){return this.startState.config!=this.state.config}},{key:"isUserEvent",value:function(e){var n=this.annotation(t.userEvent);return!(!n||!(n==e||n.length>e.length&&n.slice(0,e.length)==e&&"."==n[e.length]))}}],[{key:"create",value:function(e,n,r,i,o,a){return new t(e,n,r,i,o,a)}}]),t}();function Mt(t,e){for(var n=[],r=0,i=0;;){var o=void 0,a=void 0;if(r<t.length&&(i==e.length||e[i]>=t[r]))o=t[r++],a=t[r++];else{if(!(i<e.length))return n;o=e[i++],a=e[i++]}!n.length||n[n.length-1]<o?n.push(o,a):n[n.length-1]<a&&(n[n.length-1]=a)}}function Tt(t,e,n){var r,i,o,a;return n?(i=e.changes,o=z.empty(e.changes.length),a=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),o=t.changes.mapDesc(e.changes,!0),a=t.changes.compose(i)),{changes:a,selection:e.selection?e.selection.map(o):null===(r=t.selection)||void 0===r?void 0:r.map(i),effects:At.mapEffects(t.effects,i).concat(At.mapEffects(e.effects,o)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function Ct(t,e,n){var r=e.selection,i=Ft(e.annotations);return e.userEvent&&(i=i.concat(Rt.userEvent.of(e.userEvent))),{changes:e.changes instanceof z?e.changes:z.of(e.changes||[],n,t.facet(wt)),selection:r&&(r instanceof X?r:X.single(r.anchor,r.head)),effects:Ft(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function jt(t,e,n){var r=Ct(t,e.length?e[0]:{},t.doc.length);e.length&&!1===e[0].filter&&(n=!1);for(var i=1;i<e.length;i++){!1===e[i].filter&&(n=!1);var o=!!e[i].sequential;r=Tt(r,Ct(t,e[i],o?r.changes.newLength:t.doc.length),o)}var a=Rt.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return function(t){for(var e=t.startState,n=e.facet(bt),r=t,i=n.length-1;i>=0;i--){var o=n[i](t);o&&Object.keys(o).length&&(r=Tt(r,Ct(e,o,t.changes.newLength),!0))}return r==t?t:Rt.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}(n?function(t){var e=t.startState,n=!0,r=!0,i=!1,o=void 0;try{for(var a,s=e.facet(xt)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=(0,a.value)(t);if(!1===u){n=!1;break}Array.isArray(u)&&(n=!0===n?u:Mt(n,u))}}catch(g){i=!0,o=g}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}if(!0!==n){var h,l;if(!1===n)l=t.changes.invertedDesc,h=z.empty(e.doc.length);else{var c=t.changes.filter(n);h=c.changes,l=c.filtered.mapDesc(c.changes).invertedDesc}t=Rt.create(e,h,t.selection&&t.selection.map(l),At.mapEffects(t.effects,l),t.annotations,t.scrollIntoView)}for(var f=e.facet(St),v=f.length-1;v>=0;v--){var d=f[v](t);t=d instanceof Rt?d:Array.isArray(d)&&1==d.length&&d[0]instanceof Rt?d[0]:jt(e,Ft(d),!1)}return t}(a):a)}Rt.time=Pt.define(),Rt.userEvent=Pt.define(),Rt.addToHistory=Pt.define(),Rt.remote=Pt.define();var Nt=[];function Ft(t){return null==t?Nt:Array.isArray(t)?t:[t]}var Bt,Dt=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(Dt||(Dt={})),Jt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{Bt=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(se){}function Lt(t){return function(e){if(!/\S/.test(e))return Dt.Space;if(function(t){if(Bt)return Bt.test(t);for(var e=0;e<t.length;e++){var n=t[e];if(/\w/.test(n)||n>"\x80"&&(n.toUpperCase()!=n.toLowerCase()||Jt.test(n)))return!0}return!1}(e))return Dt.Word;for(var n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return Dt.Word;return Dt.Other}}var _t=function(){function t(e,n,r,o,a,s){i(this,t),this.config=e,this.doc=n,this.selection=r,this.values=o,this.status=e.statusTemplate.slice(),this.computeSlot=a,s&&(s._state=this);for(var u=0;u<this.config.dynamicSlots.length;u++)yt(this,u<<1);this.computeSlot=null}return s(t,[{key:"field",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.config.address[t.id];if(null!=n)return yt(this,n),pt(this,n);if(e)throw new RangeError("Field is not present in this state")}},{key:"update",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return jt(this,e,!0)}},{key:"applyTransaction",value:function(e){var n,r=this,i=this.config,o=i.base,a=i.compartments,s=!0,u=!1,h=void 0;try{for(var l,c=e.effects[Symbol.iterator]();!(s=(l=c.next()).done);s=!0){var f=l.value;
1f.is(vt.reconfigure)?(i&&(a=new Map,i.compartments.forEach((function(t,e){return a.set(e,t)})),i=null),a.set(f.value.compartment,f.value.extension)):f.is(At.reconfigure)?(i=null,o=f.value):f.is(At.appendConfig)&&(i=null,o=Ft(o).concat(f.value))}}catch(v){u=!0,h=v}finally{try{s||null==c.return||c.return()}finally{if(u)throw h}}i?n=e.startState.values.slice():n=new t(i=gt.resolve(o,a,this),this.doc,this.selection,i.dynamicSlots.map((function(){return null})),(function(t,e){return e.reconfigure(t,r)}),null).values;new t(i,e.newDoc,e.newSelection,n,(function(t,n){return n.update(t,e)}),e)}},{key:"replaceSelection",value:function(t){return"string"==typeof t&&(t=this.toText(t)),this.changeByRange((function(e){return{changes:{from:e.from,to:e.to,insert:t},range:X.cursor(e.from+t.length)}}))}},{key:"changeByRange",value:function(t){for(var e=this.selection,n=t(e.ranges[0]),r=this.changes(n.changes),i=[n.range],o=Ft(n.effects),a=1;a<e.ranges.length;a++){for(var s=t(e.ranges[a]),u=this.changes(s.changes),h=u.map(r),l=0;l<a;l++)i[l]=i[l].map(h);var c=r.mapDesc(u,!0);i.push(s.range.map(c)),r=r.compose(h),o=At.mapEffects(o,h).concat(At.mapEffects(Ft(s.effects),c))}return{changes:r,selection:X.create(i,e.mainIndex),effects:o}}},{key:"changes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e instanceof z?e:z.of(e,this.doc.length,this.facet(t.lineSeparator))}},{key:"toText",value:function(e){return p.of(e.split(this.facet(t.lineSeparator)||L))}},{key:"sliceDoc",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.doc.length;return this.doc.sliceString(t,e,this.lineBreak)}},{key:"facet",value:function(t){var e=this.config.address[t.id];return null==e?t.default:(yt(this,e),pt(this,e))}},{key:"toJSON",value:function(t){var e={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(var n in t){var r=t[n];r instanceof ot&&null!=this.config.address[r.id]&&(e[n]=r.spec.toJSON(this.field(t[n]),this))}return e}},{key:"tabSize",get:function(){return this.facet(t.tabSize)}},{key:"lineBreak",get:function(){return this.facet(t.lineSeparator)||"\n"}},{key:"readOnly",get:function(){return this.facet(It)}},{key:"phrase",value:function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=!0,a=!1,s=void 0;try{for(var u,h=this.facet(t.phrases)[Symbol.iterator]();!(o=(u=h.next()).done);o=!0){var l=u.value;if(Object.prototype.hasOwnProperty.call(l,e)){e=l[e];break}}}catch(c){a=!0,s=c}finally{try{o||null==h.return||h.return()}finally{if(a)throw s}}return r.length&&(e=e.replace(/\$(\$|\d*)/g,(function(t,e){if("$"==e)return"$";var n=+(e||1);return!n||n>r.length?t:r[n-1]}))),e}},{key:"languageDataAt",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=[],i=!0,o=!1,a=void 0;try{for(var s,u=this.facet(mt)[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var h=s.value,l=!0,c=!1,f=void 0;try{for(var v,d=h(this,e,n)[Symbol.iterator]();!(l=(v=d.next()).done);l=!0){var g=v.value;Object.prototype.hasOwnProperty.call(g,t)&&r.push(g[t])}}catch(y){c=!0,f=y}finally{try{l||null==d.return||d.return()}finally{if(c)throw f}}}}catch(y){o=!0,a=y}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}return r}},{key:"charCategorizer",value:function(t){return Lt(this.languageDataAt("wordChars",t).join(""))}},{key:"wordAt",value:function(t){for(var e=this.doc.lineAt(t),n=e.text,r=e.from,i=e.length,o=this.charCategorizer(t),a=t-r,s=t-r;a>0;){var u=T(n,a,!1);if(o(n.slice(u,a))!=Dt.Word)break;a=u}for(;s<i;){var h=T(n,s);if(o(n.slice(s,h))!=Dt.Word)break;s=h}return a==s?null:X.range(a+r,s+r)}}],[{key:"fromJSON",value:function(e){var n=function(t){if(Object.prototype.hasOwnProperty.call(e,t)){var n=i[t],r=e[t];o.push(n.init((function(t){return n.spec.fromJSON(r,t)})))}},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;if(!e||"string"!=typeof e.doc)throw new RangeError("Invalid JSON representation for EditorState");var o=[];if(i)for(var a in i)n(a);return t.create({doc:e.doc,selection:X.fromJSON(e.selection),extensions:r.extensions?o.concat([r.extensions]):o})}},{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=gt.resolve(e.extensions||[],new Map),r=e.doc instanceof p?e.doc:p.of((e.doc||"").split(n.staticFacet(t.lineSeparator)||L)),i=e.selection?e.selection instanceof X?e.selection:X.single(e.selection.anchor,e.selection.head):X.single(0);return Y(i,r.length),n.staticFacet(kt)||(i=i.asSingle()),new t(n,r,i,n.dynamicSlots.map((function(){return null})),(function(t,e){return e.create(t)}),null)}}]),t}();function qt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={},i=!0,o=!1,a=void 0,s=!0,u=!1,h=void 0;try{for(var l,c=t[Symbol.iterator]();!(s=(l=c.next()).done);s=!0){var f=l.value;try{for(var v,d=Object.keys(f)[Symbol.iterator]();!(i=(v=d.next()).done);i=!0){var g=v.value,y=f[g],p=r[g];if(void 0===p)r[g]=y;else if(p===y||void 0===y);else{if(!Object.hasOwnProperty.call(n,g))throw new Error("Config merge conflict for field "+g);r[g]=n[g](p,y)}}}catch(k){o=!0,a=k}finally{try{i||null==d.return||d.return()}finally{if(o)throw a}}}}catch(k){u=!0,h=k}finally{try{s||null==c.return||c.return()}finally{if(u)throw h}}for(var m in e)void 0===r[m]&&(r[m]=e[m]);return r}_t.allowMultipleSelections=kt,_t.tabSize=K.define({combine:function(t){return t.length?t[0]:4}}),_t.lineSeparator=wt,_t.readOnly=It,_t.phrases=K.define({compare:function(t,e){var n=Object.keys(t),r=Object.keys(e);return n.length==r.length&&n.every((function(n){return t[n]==e[n]}))}}),_t.languageData=mt,_t.changeFilter=xt,_t.transactionFilter=St,_t.transactionExtender=bt,vt.reconfigure=At.define();var zt=function(){function t(){i(this,t)}return s(t,[{key:"eq",value:function(t){return this==t}},{key:"range",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return Vt.create(t,e,this)}}]),t}();zt.prototype.startSide=zt.prototype.endSide=0,zt.prototype.point=!1,zt.prototype.mapM
1ode=_.TrackDel;var Vt=function(){function t(e,n,r){i(this,t),this.from=e,this.to=n,this.value=r}return s(t,null,[{key:"create",value:function(e,n,r){return new t(e,n,r)}}]),t}();function Wt(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}var $t=function(){function t(e,n,r,o){i(this,t),this.from=e,this.to=n,this.value=r,this.maxPoint=o}return s(t,[{key:"length",get:function(){return this.to[this.to.length-1]}},{key:"findIndex",value:function(t,e,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=n?this.to:this.from,o=r,a=i.length;;){if(o==a)return o;var s=o+a>>1,u=i[s]-t||(n?this.value[s].endSide:this.value[s].startSide)-e;if(s==o)return u>=0?o:a;u>=0?a=s:o=s+1}}},{key:"between",value:function(t,e,n,r){for(var i=this.findIndex(e,-1e9,!0),o=this.findIndex(n,1e9,!1,i);i<o;i++)if(!1===r(this.from[i]+t,this.to[i]+t,this.value[i]))return!1}},{key:"map",value:function(e,n){for(var r=[],i=[],o=[],a=-1,s=-1,u=0;u<this.value.length;u++){var h=this.value[u],l=this.from[u]+e,c=this.to[u]+e,f=void 0,v=void 0;if(l==c){var d=n.mapPos(l,h.startSide,h.mapMode);if(null==d)continue;if(f=v=d,h.startSide!=h.endSide&&(v=n.mapPos(l,h.endSide))<f)continue}else if((f=n.mapPos(l,h.startSide))>(v=n.mapPos(c,h.endSide))||f==v&&h.startSide>0&&h.endSide<=0)continue;(v-f||h.endSide-h.startSide)<0||(a<0&&(a=f),h.point&&(s=Math.max(s,v-f)),r.push(h),i.push(f-a),o.push(v-a))}return{mapped:r.length?new t(i,o,r,s):null,pos:a}}}]),t}(),Ut=function(){function t(e,n,r,o){i(this,t),this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=o}return s(t,[{key:"length",get:function(){var t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}},{key:"size",get:function(){if(this.isEmpty)return 0;var t=this.nextLayer.size,e=!0,n=!1,r=void 0;try{for(var i,o=this.chunk[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){t+=i.value.value.length}}catch(a){n=!0,r=a}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}return t}},{key:"chunkEnd",value:function(t){return this.chunkPos[t]+this.chunk[t].length}},{key:"update",value:function(e){var n=e.add,r=void 0===n?[]:n,i=e.sort,o=void 0!==i&&i,a=e.filterFrom,s=void 0===a?0:a,u=e.filterTo,h=void 0===u?this.length:u,l=e.filter;if(0==r.length&&!l)return this;if(o&&(r=r.slice().sort(Wt)),this.isEmpty)return r.length?t.of(r):this;for(var c=new Xt(this,null,-1).goto(0),f=0,v=[],d=new Qt;c.value||f<r.length;)if(f<r.length&&(c.from-r[f].from||c.startSide-r[f].value.startSide)>=0){var g=r[f++];d.addInner(g.from,g.to,g.value)||v.push(g)}else 1==c.rangeIndex&&c.chunkIndex<this.chunk.length&&(f==r.length||this.chunkEnd(c.chunkIndex)<r[f].from)&&(!l||s>this.chunkEnd(c.chunkIndex)||h<this.chunkPos[c.chunkIndex])&&d.addChunk(this.chunkPos[c.chunkIndex],this.chunk[c.chunkIndex])?c.nextChunk():((!l||s>c.to||h<c.from||l(c.from,c.to,c.value))&&(d.addInner(c.from,c.to,c.value)||v.push(Vt.create(c.from,c.to,c.value))),c.next());return d.finishInner(this.nextLayer.isEmpty&&!v.length?t.empty:this.nextLayer.update({add:v,filter:l,filterFrom:s,filterTo:h}))}},{key:"map",value:function(e){if(e.empty||this.isEmpty)return this;for(var n=[],r=[],i=-1,o=0;o<this.chunk.length;o++){var a=this.chunkPos[o],s=this.chunk[o],u=e.touchesRange(a,a+s.length);if(!1===u)i=Math.max(i,s.maxPoint),n.push(s),r.push(e.mapPos(a));else if(!0===u){var h=s.map(a,e),l=h.mapped,c=h.pos;l&&(i=Math.max(i,l.maxPoint),n.push(l),r.push(c))}}var f=this.nextLayer.map(e);return 0==n.length?f:new t(r,n,f||t.empty,i)}},{key:"between",value:function(t,e,n){if(!this.isEmpty){for(var r=0;r<this.chunk.length;r++){var i=this.chunkPos[r],o=this.chunk[r];if(e>=i&&t<=i+o.length&&!1===o.between(i,t-i,e-i,n))return}this.nextLayer.between(t,e,n)}}},{key:"iter",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return Yt.from([this]).goto(t)}},{key:"isEmpty",get:function(){return this.nextLayer==this}}],[{key:"create",value:function(e,n,r,i){return new t(e,n,r,i)}},{key:"iter",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Yt.from(t).goto(e)}},{key:"compare",value:function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,o=t.filter((function(t){return t.maxPoint>0||!t.isEmpty&&t.maxPoint>=i})),a=e.filter((function(t){return t.maxPoint>0||!t.isEmpty&&t.maxPoint>=i})),s=Ht(o,a,n),u=new Kt(o,s,i),h=new Kt(a,s,i);n.iterGaps((function(t,e,n){return te(u,t,h,e,n,r)})),n.empty&&0==n.length&&te(u,0,h,0,0,r)}},{key:"eq",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;null==r&&(r=999999999);var i=t.filter((function(t){return!t.isEmpty&&e.indexOf(t)<0})),o=e.filter((function(e){return!e.isEmpty&&t.indexOf(e)<0}));if(i.length!=o.length)return!1;if(!i.length)return!0;for(var a=Ht(i,o),s=new Kt(i,a,0).goto(n),u=new Kt(o,a,0).goto(n);;){if(s.to!=u.to||!ee(s.active,u.active)||s.point&&(!u.point||!s.point.eq(u.point)))return!1;if(s.to>r)return!0;s.next(),u.next()}}},{key:"spans",value:function(t,e,n,r){for(var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,o=new Kt(t,null,i).goto(e),a=e,s=o.openStart;;){var u=Math.min(o.to,n);if(o.point){var h=o.activeForPoint(o.to),l=o.pointFrom<e?h.length+1:Math.min(h.length,s);r.point(a,u,o.point,h,l,o.pointRank),s=Math.min(o.openEnd(u),h.length)}else u>a&&(r.span(a,u,o.active,s),s=o.openEnd(u));if(o.to>n)return s+(o.point&&o.to>n?1:0);a=o.to,o.next()}}},{key:"of",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=new Qt,r=!0,i=!1,o=void 0;try{for(var a,s=(t instanceof Vt?[t]:e?Gt(t):t)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value;n.add(u.from,u.to,u.value)}}catch(h){i=!0,o=h}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n.finish()}}]),t}();function Gt(t){if(t.length>1)for(var e=t[0],n=1;n<t.length;n++){var r=t[n];if(Wt(e,r)>0)return t.slice().sort(Wt);e=r}return t}Ut.empty=new Ut([],[],null,-1),Ut.empty.nextLayer=Ut.empty;var Qt=function(){function t(){i(this,t),this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}return s(t,[{key:"finishChunk",value:function(t){this.chunks.push(new $t(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}},{key:"add",value:function(e,n,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new t)).add(e,n,r)}},{key:"addInner",value:function(t,e,n){var r=t-this.lastTo||n.startSide-this.last.endSide;if(r<=0&&(t-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(e-this.chunkStart),this.last=n,this.lastFrom=t,this.lastTo=e,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,e-t)),!0)}},{key:"addChunk",value:function(t,e){if((t-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(t);var n=e.value.length-1;return this.last=e.value[n],this.lastFrom=e.from[n]+t,this.lastTo=e.to[n]+t,!0}},{key:"finish",value:function(){return this.finishInner(Ut.empty)}},{key:"finishInner",value:function(t){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return t;var e=Ut.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,e}}]),t}();function Ht(t,e,n){var r=new Map,i=!0,o=!1,a=void 0;try{for(var s,u=t[Symbol.iterator]();!(i=(s=u.next()).done);i=!0)for(var h=s.value,l=0;l<h.chunk.length;l++)h.chunk[l].maxPoint<=0&&r.set(h.chunk[l],h.chunkPos[l])}catch(w){o=!0,a=w}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}var c=new Set,f=!0,v=!1,d=void 0;try{for(var g,y=e[Symbol.iterator]();!(f=(g=y.next()).done);f=!0)for(var p=g.value,m=0;m<p.chunk.length;m++){var k=r.get(p.chunk[m]);null==k||(n?n.mapPos(k):k)!=p.chunkPos[m]||(null===n||void 0===n?void 0:n.touchesRange(k,k+p.chunk[m].length))||c.add(p.chunk[m])}}catch(w){v=!0,d=w}finally{try{f||null==y.return||y.return()}finally{if(v)throw d}}return c}var Xt=function(){function t(e,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;
1i(this,t),this.layer=e,this.skip=n,this.minPoint=r,this.rank=o}return s(t,[{key:"startSide",get:function(){return this.value?this.value.startSide:0}},{key:"endSide",get:function(){return this.value?this.value.endSide:0}},{key:"goto",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.chunkIndex=this.rangeIndex=0,this.gotoInner(t,e,!1),this}},{key:"gotoInner",value:function(t,e,n){for(;this.chunkIndex<this.layer.chunk.length;){var r=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(r)||this.layer.chunkEnd(this.chunkIndex)<t||r.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){var i=this.layer.chunk[this.chunkIndex].findIndex(t-this.layer.chunkPos[this.chunkIndex],e,!0);(!n||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}},{key:"forward",value:function(t,e){(this.to-t||this.endSide-e)<0&&this.gotoInner(t,e,!0)}},{key:"next",value:function(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}var t=this.layer.chunkPos[this.chunkIndex],e=this.layer.chunk[this.chunkIndex],n=t+e.from[this.rangeIndex];if(this.from=n,this.to=t+e.to[this.rangeIndex],this.value=e.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}},{key:"setRangeIndex",value:function(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=t}},{key:"nextChunk",value:function(){this.chunkIndex++,this.rangeIndex=0,this.next()}},{key:"compare",value:function(t){return this.from-t.from||this.startSide-t.startSide||this.rank-t.rank||this.to-t.to||this.endSide-t.endSide}}]),t}(),Yt=function(){function t(e){i(this,t),this.heap=e}return s(t,[{key:"startSide",get:function(){return this.value?this.value.startSide:0}},{key:"goto",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9,n=!0,r=!1,i=void 0;try{for(var o,a=this.heap[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;s.goto(t,e)}}catch(h){r=!0,i=h}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}for(var u=this.heap.length>>1;u>=0;u--)Zt(this.heap,u);return this.next(),this}},{key:"forward",value:function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=this.heap[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){o.value.forward(t,e)}}catch(u){r=!0,i=u}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}for(var s=this.heap.length>>1;s>=0;s--)Zt(this.heap,s);(this.to-t||this.value.endSide-e)<0&&this.next()}},{key:"next",value:function(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{var t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),Zt(this.heap,0)}}}],[{key:"from",value:function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,i=[],o=0;o<e.length;o++)for(var a=e[o];!a.isEmpty;a=a.nextLayer)a.maxPoint>=r&&i.push(new Xt(a,n,r,o));return 1==i.length?i[0]:new t(i)}}]),t}();function Zt(t,e){for(var n=t[e];;){var r=1+(e<<1);if(r>=t.length)break;var i=t[r];if(r+1<t.length&&i.compare(t[r+1])>=0&&(i=t[r+1],r++),n.compare(i)<0)break;t[r]=n,t[e]=i,e=r}}var Kt=function(){function t(e,n,r){i(this,t),this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Yt.from(e,n,r)}return s(t,[{key:"goto",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.cursor.goto(t,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=e,this.openStart=-1,this.next(),this}},{key:"forward",value:function(t,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(t,e)}},{key:"removeActive",value:function(t){ne(this.active,t),ne(this.activeTo,t),ne(this.activeRank,t),this.minActive=ie(this.active,this.activeTo)}},{key:"addActive",value:function(t){for(var e=0,n=this.cursor,r=n.value,i=n.to,o=n.rank;e<this.activeRank.length&&this.activeRank[e]<=o;)e++;re(this.active,e,r),re(this.activeTo,e,i),re(this.activeRank,e,o),t&&re(t,e,this.cursor.from),this.minActive=ie(this.active,this.activeTo)}},{key:"next",value:function(){var t=this.to,e=this.point;this.point=null;for(var n=this.openStart<0?[]:null;;){var r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>t){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&ne(n,r)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}var i=this.cursor.value;if(i.point){if(!(e&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)){this.point=i,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=i.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(n),this.cursor.next()}}if(n){this.openStart=0;for(var o=n.length-1;o>=0&&n[o]<t;o--)this.openStart++}}},{key:"activeForPoint",value:function(t){if(!this.active.length)return this.active;for(var e=[],n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>t||this.activeTo[n]==t&&this.active[n].endSide>=this.point.endSide)&&e.push(this.active[n]);return e.reverse()}},{key:"openEnd",value:function(t){for(var e=0,n=this.activeTo.length-1;n>=0&&this.activeTo[n]>t;n--)e++;return e}}]),t}();function te(t,e,n,r,i,o){t.goto(e),n.goto(r);for(var a=r+i,s=r,u=r-e;;){var h=t.to+u-n.to||t.endSide-n.endSide,l=h<0?t.to+u:n.to,c=Math.min(l,a);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&ee(t.activeForPoint(t.to+u),n.activeForPoint(n.to))||o.comparePoint(s,c,t.point,n.point):c>s&&!ee(t.active,n.active)&&o.compareRange(s,c,t.active,n.active),l>a)break;s=l,h<=0&&t.next(),h>=0&&n.next()}}function ee(t,e){if(t.length!=e.length)return!1;for(var n=0;n<t.length;
1n++)if(t[n]!=e[n]&&!t[n].eq(e[n]))return!1;return!0}function ne(t,e){for(var n=e,r=t.length-1;n<r;n++)t[n]=t[n+1];t.pop()}function re(t,e,n){for(var r=t.length-1;r>=e;r--)t[r+1]=t[r];t[e]=n}function ie(t,e){for(var n=-1,r=1e9,i=0;i<e.length;i++)(e[i]-r||t[i].endSide-t[n].endSide)<0&&(n=i,r=e[i]);return n}function oe(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,r=0,i=0;i<n;)9==t.charCodeAt(i)?(r+=e-r%e,i++):(r++,i=T(t,i));return r}function ae(t,e,n,r){for(var i=0,o=0;;){if(o>=e)return i;if(i==t.length)break;o+=9==t.charCodeAt(i)?n-o%n:1,i=T(t,i)}return!0===r?-1:t.length}}}]);
2//# sourceMappingURL=1124681c-b9f22c8ab0d4aad0.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.