mirror of
https://github.com/hydra-synth/hydra.git
synced 2025-12-05 14:30:03 +01:00
353 lines
880 KiB
JavaScript
353 lines
880 KiB
JavaScript
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const f of a.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&n(f)}).observe(document,{childList:!0,subtree:!0});function r(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(o){if(o.ep)return;o.ep=!0;const a=r(o);fetch(o.href,a)}})();var gt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Mi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function L_(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){if(this instanceof n){var o=[null];o.push.apply(o,arguments);var a=Function.bind.apply(t,o);return new a}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}var Zc={exports:{}},us=typeof Reflect=="object"?Reflect:null,fd=us&&typeof us.apply=="function"?us.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},ml;us&&typeof us.ownKeys=="function"?ml=us.ownKeys:Object.getOwnPropertySymbols?ml=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:ml=function(t){return Object.getOwnPropertyNames(t)};function U_(e){console&&console.warn&&console.warn(e)}var Ky=Number.isNaN||function(t){return t!==t};function yt(){yt.init.call(this)}Zc.exports=yt;Zc.exports.once=O_;yt.EventEmitter=yt;yt.prototype._events=void 0;yt.prototype._eventsCount=0;yt.prototype._maxListeners=void 0;var cd=10;function Wl(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(yt,"defaultMaxListeners",{enumerable:!0,get:function(){return cd},set:function(e){if(typeof e!="number"||e<0||Ky(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");cd=e}});yt.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};yt.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Ky(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function Vy(e){return e._maxListeners===void 0?yt.defaultMaxListeners:e._maxListeners}yt.prototype.getMaxListeners=function(){return Vy(this)};yt.prototype.emit=function(t){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var o=t==="error",a=this._events;if(a!==void 0)o=o&&a.error===void 0;else if(!o)return!1;if(o){var f;if(r.length>0&&(f=r[0]),f instanceof Error)throw f;var h=new Error("Unhandled error."+(f?" ("+f.message+")":""));throw h.context=f,h}var p=a[t];if(p===void 0)return!1;if(typeof p=="function")fd(p,this,r);else for(var v=p.length,_=Zy(p,v),n=0;n<v;++n)fd(_[n],this,r);return!0};function zy(e,t,r,n){var o,a,f;if(Wl(r),a=e._events,a===void 0?(a=e._events=Object.create(null),e._eventsCount=0):(a.newListener!==void 0&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),f=a[t]),f===void 0)f=a[t]=r,++e._eventsCount;else if(typeof f=="function"?f=a[t]=n?[r,f]:[f,r]:n?f.unshift(r):f.push(r),o=Vy(e),o>0&&f.length>o&&!f.warned){f.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+f.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=e,h.type=t,h.count=f.length,U_(h)}return e}yt.prototype.addListener=function(t,r){return zy(this,t,r,!1)};yt.prototype.on=yt.prototype.addListener;yt.prototype.prependListener=function(t,r){return zy(this,t,r,!0)};function I_(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Qy(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=I_.bind(n);return o.listener=r,n.wrapFn=o,o}yt.prototype.once=function(t,r){return Wl(r),this.on(t,Qy(this,t,r)),this};yt.prototype.prependOnceListener=function(t,r){return Wl(r),this.prependListener(t,Qy(this,t,r)),this};yt.prototype.removeListener=function(t,r){var n,o,a,f,h;if(Wl(r),o=this._events,o===void 0)return this;if(n=o[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete o[t],o.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(a=-1,f=n.length-1;f>=0;f--)if(n[f]===r||n[f].listener===r){h=n[f].listener,a=f;break}if(a<0)return this;a===0?n.shift():J_(n,a),n.length===1&&(o[t]=n[0]),o.removeListener!==void 0&&this.emit("removeListener",t,h||r)}return this};yt.prototype.off=yt.prototype.removeListener;yt.prototype.removeAllListeners=function(t){var r,n,o;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var a=Object.keys(n),f;for(o=0;o<a.length;++o)f=a[o],f!=="removeListener"&&this.removeAllListeners(f);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=n[t],typeof r=="function")this.removeListener(t,r);else if(r!==void 0)for(o=r.length-1;o>=0;o--)this.removeListener(t,r[o]);return this};function Yy(e,t,r){var n=e._events;if(n===void 0)return[];var o=n[t];return o===void 0?[]:typeof o=="function"?r?[o.listener||o]:[o]:r?N_(o):Zy(o,o.length)}yt.prototype.listeners=function(t){return Yy(this,t,!0)};yt.prototype.rawListeners=function(t){return Yy(this,t,!1)};yt.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):Hy.call(e,t)};yt.prototype.listenerCount=Hy;function Hy(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}yt.prototype.eventNames=function(){return this._eventsCount>0?ml(this._events):[]};function Zy(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function J_(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function N_(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}function O_(e,t){return new Promise(function(r,n){function o(f){e.removeListener(t,a),n(f)}function a(){typeof e.removeListener=="function"&&e.removeListener("error",o),r([].slice.call(arguments))}$y(e,t,a,{once:!0}),t!=="error"&&B_(e,o,{once:!0})})}function B_(e,t,r){typeof e.on=="function"&&$y(e,"error",t,r)}function $y(e,t,r,n){if(typeof e.on=="function")n.once?e.once(t,r):e.on(t,r);else if(typeof e.addEventListener=="function")e.addEventListener(t,function o(a){n.once&&e.removeEventListener(t,o),r(a)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}var Kl=Zc.exports;dr.notEqual=D_;dr.notOk=j_;dr.equal=F_;dr.ok=dr;var di=dr;function F_(e,t,r){dr(e==t,r)}function D_(e,t,r){dr(e!=t,r)}function j_(e,t){dr(!e,t)}function dr(e,t){if(!e)throw new Error(t||"AssertionError")}var P_=di,G_=typeof window<"u";function W_(){var e;return G_?(window._nanoScheduler||(window._nanoScheduler=new No(!0)),e=window._nanoScheduler):e=new No,e}function No(e){this.hasWindow=e,this.hasIdle=this.hasWindow&&window.requestIdleCallback,this.method=this.hasIdle?window.requestIdleCallback.bind(window):this.setTimeout,this.scheduled=!1,this.queue=[]}No.prototype.push=function(e){P_.equal(typeof e,"function","nanoscheduler.push: cb should be type function"),this.queue.push(e),this.schedule()};No.prototype.schedule=function(){if(!this.scheduled){this.scheduled=!0;var e=this;this.method(function(t){for(var r;e.queue.length&&t.timeRemaining()>0;)r=e.queue.shift(),r(t);e.scheduled=!1,e.queue.length&&e.schedule()})}};No.prototype.setTimeout=function(e){setTimeout(e,0,{timeRemaining:function(){return 1}})};var ea=W_,Xy={exports:{}};/*
|
||
object-assign
|
||
(c) Sindre Sorhus
|
||
@license MIT
|
||
*/var hd=Object.getOwnPropertySymbols,K_=Object.prototype.hasOwnProperty,V_=Object.prototype.propertyIsEnumerable;function z_(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function Q_(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map(function(a){return t[a]});if(n.join("")!=="0123456789")return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(a){o[a]=a}),Object.keys(Object.assign({},o)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var Y_=Q_()?Object.assign:function(e,t){for(var r,n=z_(e),o,a=1;a<arguments.length;a++){r=Object(arguments[a]);for(var f in r)K_.call(r,f)&&(n[f]=r[f]);if(hd){o=hd(r);for(var h=0;h<o.length;h++)V_.call(r,o[h])&&(n[o[h]]=r[o[h]])}}return n},qy={},H_=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"},ac={exports:{}};typeof Object.create=="function"?ac.exports=function(t,r){t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:ac.exports=function(t,r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t};var Z_=ac.exports;(function(e){var t=/%[sdj%]/g;e.format=function(K){if(!G(K)){for(var X=[],fe=0;fe<arguments.length;fe++)X.push(o(arguments[fe]));return X.join(" ")}for(var fe=1,Me=arguments,we=Me.length,Re=String(K).replace(t,function(Ie){if(Ie==="%%")return"%";if(fe>=we)return Ie;switch(Ie){case"%s":return String(Me[fe++]);case"%d":return Number(Me[fe++]);case"%j":try{return JSON.stringify(Me[fe++])}catch{return"[Circular]"}default:return Ie}}),ke=Me[fe];fe<we;ke=Me[++fe])S(ke)||!V(ke)?Re+=" "+ke:Re+=" "+o(ke);return Re},e.deprecate=function(K,X){if(P(gt.process))return function(){return e.deprecate(K,X).apply(this,arguments)};if(process.noDeprecation===!0)return K;var fe=!1;function Me(){if(!fe){if(process.throwDeprecation)throw new Error(X);process.traceDeprecation?console.trace(X):console.error(X),fe=!0}return K.apply(this,arguments)}return Me};var r={},n;e.debuglog=function(K){if(P(n)&&(n={}.NODE_DEBUG||""),K=K.toUpperCase(),!r[K])if(new RegExp("\\b"+K+"\\b","i").test(n)){var X=process.pid;r[K]=function(){var fe=e.format.apply(e,arguments);console.error("%s %d: %s",K,X,fe)}}else r[K]=function(){};return r[K]};function o(K,X){var fe={seen:[],stylize:f};return arguments.length>=3&&(fe.depth=arguments[2]),arguments.length>=4&&(fe.colors=arguments[3]),R(X)?fe.showHidden=X:X&&e._extend(fe,X),P(fe.showHidden)&&(fe.showHidden=!1),P(fe.depth)&&(fe.depth=2),P(fe.colors)&&(fe.colors=!1),P(fe.customInspect)&&(fe.customInspect=!0),fe.colors&&(fe.stylize=a),p(fe,K,fe.depth)}e.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function a(K,X){var fe=o.styles[X];return fe?"\x1B["+o.colors[fe][0]+"m"+K+"\x1B["+o.colors[fe][1]+"m":K}function f(K,X){return K}function h(K){var X={};return K.forEach(function(fe,Me){X[fe]=!0}),X}function p(K,X,fe){if(K.customInspect&&X&&A(X.inspect)&&X.inspect!==e.inspect&&!(X.constructor&&X.constructor.prototype===X)){var Me=X.inspect(fe,K);return G(Me)||(Me=p(K,Me,fe)),Me}var we=v(K,X);if(we)return we;var Re=Object.keys(X),ke=h(Re);if(K.showHidden&&(Re=Object.getOwnPropertyNames(X)),ee(X)&&(Re.indexOf("message")>=0||Re.indexOf("description")>=0))return _(X);if(Re.length===0){if(A(X)){var Ie=X.name?": "+X.name:"";return K.stylize("[Function"+Ie+"]","special")}if(F(X))return K.stylize(RegExp.prototype.toString.call(X),"regexp");if(D(X))return K.stylize(Date.prototype.toString.call(X),"date");if(ee(X))return _(X)}var ze="",le=!1,ue=["{","}"];if(U(X)&&(le=!0,ue=["[","]"]),A(X)){var xe=X.name?": "+X.name:"";ze=" [Function"+xe+"]"}if(F(X)&&(ze=" "+RegExp.prototype.toString.call(X)),D(X)&&(ze=" "+Date.prototype.toUTCString.call(X)),ee(X)&&(ze=" "+_(X)),Re.length===0&&(!le||X.length==0))return ue[0]+ze+ue[1];if(fe<0)return F(X)?K.stylize(RegExp.prototype.toString.call(X),"regexp"):K.stylize("[Object]","special");K.seen.push(X);var Le;return le?Le=y(K,X,fe,ke,Re):Le=Re.map(function(De){return m(K,X,fe,ke,De,le)}),K.seen.pop(),x(Le,ze,ue)}function v(K,X){if(P(X))return K.stylize("undefined","undefined");if(G(X)){var fe="'"+JSON.stringify(X).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return K.stylize(fe,"string")}if(L(X))return K.stylize(""+X,"number");if(R(X))return K.stylize(""+X,"boolean");if(S(X))return K.stylize("null","null")}function _(K){return"["+Error.prototype.toString.call(K)+"]"}function y(K,X,fe,Me,we){for(var Re=[],ke=0,Ie=X.length;ke<Ie;++ke)ie(X,String(ke))?Re.push(m(K,X,fe,Me,String(ke),!0)):Re.push("");return we.forEach(function(ze){ze.match(/^\d+$/)||Re.push(m(K,X,fe,Me,ze,!0))}),Re}function m(K,X,fe,Me,we,Re){var ke,Ie,ze;if(ze=Object.getOwnPropertyDescriptor(X,we)||{value:X[we]},ze.get?ze.set?Ie=K.stylize("[Getter/Setter]","special"):Ie=K.stylize("[Getter]","special"):ze.set&&(Ie=K.stylize("[Setter]","special")),ie(Me,we)||(ke="["+we+"]"),Ie||(K.seen.indexOf(ze.value)<0?(S(fe)?Ie=p(K,ze.value,null):Ie=p(K,ze.value,fe-1),Ie.indexOf(`
|
||
`)>-1&&(Re?Ie=Ie.split(`
|
||
`).map(function(le){return" "+le}).join(`
|
||
`).substr(2):Ie=`
|
||
`+Ie.split(`
|
||
`).map(function(le){return" "+le}).join(`
|
||
`))):Ie=K.stylize("[Circular]","special")),P(ke)){if(Re&&we.match(/^\d+$/))return Ie;ke=JSON.stringify(""+we),ke.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ke=ke.substr(1,ke.length-2),ke=K.stylize(ke,"name")):(ke=ke.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ke=K.stylize(ke,"string"))}return ke+": "+Ie}function x(K,X,fe){var Me=K.reduce(function(we,Re){return Re.indexOf(`
|
||
`)>=0,we+Re.replace(/\u001b\[\d\d?m/g,"").length+1},0);return Me>60?fe[0]+(X===""?"":X+`
|
||
`)+" "+K.join(`,
|
||
`)+" "+fe[1]:fe[0]+X+" "+K.join(", ")+" "+fe[1]}function U(K){return Array.isArray(K)}e.isArray=U;function R(K){return typeof K=="boolean"}e.isBoolean=R;function S(K){return K===null}e.isNull=S;function g(K){return K==null}e.isNullOrUndefined=g;function L(K){return typeof K=="number"}e.isNumber=L;function G(K){return typeof K=="string"}e.isString=G;function O(K){return typeof K=="symbol"}e.isSymbol=O;function P(K){return K===void 0}e.isUndefined=P;function F(K){return V(K)&&$(K)==="[object RegExp]"}e.isRegExp=F;function V(K){return typeof K=="object"&&K!==null}e.isObject=V;function D(K){return V(K)&&$(K)==="[object Date]"}e.isDate=D;function ee(K){return V(K)&&($(K)==="[object Error]"||K instanceof Error)}e.isError=ee;function A(K){return typeof K=="function"}e.isFunction=A;function q(K){return K===null||typeof K=="boolean"||typeof K=="number"||typeof K=="string"||typeof K=="symbol"||typeof K>"u"}e.isPrimitive=q,e.isBuffer=H_;function $(K){return Object.prototype.toString.call(K)}function ce(K){return K<10?"0"+K.toString(10):K.toString(10)}var ye=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function re(){var K=new Date,X=[ce(K.getHours()),ce(K.getMinutes()),ce(K.getSeconds())].join(":");return[K.getDate(),ye[K.getMonth()],X].join(" ")}e.log=function(){console.log("%s - %s",re(),e.format.apply(e,arguments))},e.inherits=Z_,e._extend=function(K,X){if(!X||!V(X))return K;for(var fe=Object.keys(X),Me=fe.length;Me--;)K[fe[Me]]=X[fe[Me]];return K};function ie(K,X){return Object.prototype.hasOwnProperty.call(K,X)}})(qy);var $_=Y_;/*!
|
||
* The buffer module from node.js, for the browser.
|
||
*
|
||
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
||
* @license MIT
|
||
*/function pd(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,o=0,a=Math.min(r,n);o<a;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0}function Mo(e){return gt.Buffer&&typeof gt.Buffer.isBuffer=="function"?gt.Buffer.isBuffer(e):!!(e!=null&&e._isBuffer)}var Di=qy,X_=Object.prototype.hasOwnProperty,dd=Array.prototype.slice,em=function(){return(function(){}).name==="foo"}();function gd(e){return Object.prototype.toString.call(e)}function yd(e){return Mo(e)||typeof gt.ArrayBuffer!="function"?!1:typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e?!!(e instanceof DataView||e.buffer&&e.buffer instanceof ArrayBuffer):!1}var nt=Xy.exports=im,q_=/\s*function\s+([^\(\s]*)\s*/;function tm(e){if(Di.isFunction(e)){if(em)return e.name;var t=e.toString(),r=t.match(q_);return r&&r[1]}}nt.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=ew(this),this.generatedMessage=!0);var r=t.stackStartFunction||ai;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var n=new Error;if(n.stack){var o=n.stack,a=tm(r),f=o.indexOf(`
|
||
`+a);if(f>=0){var h=o.indexOf(`
|
||
`,f+1);o=o.substring(h+1)}this.stack=o}}};Di.inherits(nt.AssertionError,Error);function md(e,t){return typeof e=="string"?e.length<t?e:e.slice(0,t):e}function vd(e){if(em||!Di.isFunction(e))return Di.inspect(e);var t=tm(e),r=t?": "+t:"";return"[Function"+r+"]"}function ew(e){return md(vd(e.actual),128)+" "+e.operator+" "+md(vd(e.expected),128)}function ai(e,t,r,n,o){throw new nt.AssertionError({message:r,actual:e,expected:t,operator:n,stackStartFunction:o})}nt.fail=ai;function im(e,t){e||ai(e,!0,t,"==",nt.ok)}nt.ok=im;nt.equal=function(t,r,n){t!=r&&ai(t,r,n,"==",nt.equal)};nt.notEqual=function(t,r,n){t==r&&ai(t,r,n,"!=",nt.notEqual)};nt.deepEqual=function(t,r,n){ps(t,r,!1)||ai(t,r,n,"deepEqual",nt.deepEqual)};nt.deepStrictEqual=function(t,r,n){ps(t,r,!0)||ai(t,r,n,"deepStrictEqual",nt.deepStrictEqual)};function ps(e,t,r,n){if(e===t)return!0;if(Mo(e)&&Mo(t))return pd(e,t)===0;if(Di.isDate(e)&&Di.isDate(t))return e.getTime()===t.getTime();if(Di.isRegExp(e)&&Di.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if((e===null||typeof e!="object")&&(t===null||typeof t!="object"))return r?e===t:e==t;if(yd(e)&&yd(t)&&gd(e)===gd(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return pd(new Uint8Array(e.buffer),new Uint8Array(t.buffer))===0;if(Mo(e)!==Mo(t))return!1;n=n||{actual:[],expected:[]};var o=n.actual.indexOf(e);return o!==-1&&o===n.expected.indexOf(t)?!0:(n.actual.push(e),n.expected.push(t),tw(e,t,r,n))}function _d(e){return Object.prototype.toString.call(e)=="[object Arguments]"}function tw(e,t,r,n){if(e==null||t===null||t===void 0)return!1;if(Di.isPrimitive(e)||Di.isPrimitive(t))return e===t;if(r&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var o=_d(e),a=_d(t);if(o&&!a||!o&&a)return!1;if(o)return e=dd.call(e),t=dd.call(t),ps(e,t,r);var f=bd(e),h=bd(t),p,v;if(f.length!==h.length)return!1;for(f.sort(),h.sort(),v=f.length-1;v>=0;v--)if(f[v]!==h[v])return!1;for(v=f.length-1;v>=0;v--)if(p=f[v],!ps(e[p],t[p],r,n))return!1;return!0}nt.notDeepEqual=function(t,r,n){ps(t,r,!1)&&ai(t,r,n,"notDeepEqual",nt.notDeepEqual)};nt.notDeepStrictEqual=rm;function rm(e,t,r){ps(e,t,!0)&&ai(e,t,r,"notDeepStrictEqual",rm)}nt.strictEqual=function(t,r,n){t!==r&&ai(t,r,n,"===",nt.strictEqual)};nt.notStrictEqual=function(t,r,n){t===r&&ai(t,r,n,"!==",nt.notStrictEqual)};function wd(e,t){if(!e||!t)return!1;if(Object.prototype.toString.call(t)=="[object RegExp]")return t.test(e);try{if(e instanceof t)return!0}catch{}return Error.isPrototypeOf(t)?!1:t.call({},e)===!0}function iw(e){var t;try{e()}catch(r){t=r}return t}function nm(e,t,r,n){var o;if(typeof t!="function")throw new TypeError('"block" argument must be a function');typeof r=="string"&&(n=r,r=null),o=iw(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!o&&ai(o,r,"Missing expected exception"+n);var a=typeof n=="string",f=!e&&Di.isError(o),h=!e&&o&&!r;if((f&&a&&wd(o,r)||h)&&ai(o,r,"Got unwanted exception"+n),e&&o&&r&&!wd(o,r)||!e&&o)throw o}nt.throws=function(e,t,r){nm(!0,e,t,r)};nt.doesNotThrow=function(e,t,r){nm(!1,e,t,r)};nt.ifError=function(e){if(e)throw e};function sm(e,t){e||ai(e,!0,t,"==",sm)}nt.strict=$_(sm,nt,{equal:nt.strictEqual,deepEqual:nt.deepStrictEqual,notEqual:nt.notStrictEqual,notDeepEqual:nt.notDeepStrictEqual});nt.strict.strict=nt.strict;var bd=Object.keys||function(e){var t=[];for(var r in e)X_.call(e,r)&&t.push(r);return t},om=Xy.exports,rw=om,nw={trace:"🔍",debug:"🐛",info:"✨",warn:"⚠️",error:"🚨",fatal:"💀"},am={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},sw={foreground:"#d3c0c8",background:"#2d2d2d",black:"#2d2d2d",red:"#f2777a",green:"#99cc99",yellow:"#ffcc66",blue:"#6699cc",magenta:"#cc99cc",cyan:"#66cccc",white:"#d3d0c8",brightBlack:"#747369"},ow=rr;function rr(e,t){if(t=t||{},!(this instanceof rr))return new rr(e,t);rw.equal(typeof t,"object","nanologger: opts should be type object"),this._name=e||"",this._colors=Object.assign({},sw,t.colors||{});try{this.logLevel=window.localStorage.getItem("logLevel")||"info"}catch{this.logLevel="info"}this._logLevel=am[this.logLevel]}rr.prototype.trace=function(){for(var e=["trace"],t=0,r=arguments.length;t<r;t++)e.push(arguments[t]);this._print.apply(this,e)};rr.prototype.debug=function(){for(var e=["debug"],t=0,r=arguments.length;t<r;t++)e.push(arguments[t]);this._print.apply(this,e)};rr.prototype.info=function(){for(var e=["info"],t=0,r=arguments.length;t<r;t++)e.push(arguments[t]);this._print.apply(this,e)};rr.prototype.warn=function(){for(var e=["warn"],t=0,r=arguments.length;t<r;t++)e.push(arguments[t]);this._print.apply(this,e)};rr.prototype.error=function(){for(var e=["error"],t=0,r=arguments.length;t<r;t++)e.push(arguments[t]);this._print.apply(this,e)};rr.prototype.fatal=function(){for(var e=["fatal"],t=0,r=arguments.length;t<r;t++)e.push(arguments[t]);this._print.apply(this,e)};rr.prototype._print=function(e){if(!(am[e]<this._logLevel)){var t=aw(),r=nw[e],n=this._name||"unknown",o=e==="error"||e.fatal?this._colors.red:e==="warn"?this._colors.yellow:this._colors.green,a=[],f=[null],h="%c%s "+r+" %c%s";f.push(Hn(this._colors.brightBlack),t),f.push(Hn(this._colors.magenta),n);for(var p=1,v=arguments.length;p<v;p++){var _=arguments[p];typeof _=="string"?p===1?(h+=" %c%s",f.push(Hn(o)),f.push(_)):/ms$/.test(_)?(h+=" %c%s",f.push(Hn(this._colors.brightBlack)),f.push(_)):(h+=" %c%s",f.push(Hn(this._colors.white)),f.push(_)):typeof _=="number"?(h+=" %c%d",f.push(Hn(this._colors.magenta)),f.push(_)):a.push(_)}f[0]=h,a.forEach(function(y){f.push(y)}),Function.prototype.apply.apply(console.log,[console,f])}};function Hn(e){return"color: "+e+";"}function aw(){var e=new Date,t=Xu(e.getHours().toString()),r=Xu(e.getMinutes().toString()),n=Xu(e.getSeconds().toString());return t+":"+r+":"+n}function Xu(e){return e.length!==2?0+e:e}var lw=ea(),uw=di,fw=["frame","measure","navigation","resource","longtask"],cw=hw;function hw(e){uw.equal(typeof e,"function","on-performance: cb should be type function");var t=typeof window<"u"&&window.PerformanceObserver;if(!t)return;if(window._onperformance)return window._onperformance.push(e),n;window._onperformance=[e];var r=new t(o);return setTimeout(function(){o(window.performance),r.observe({entryTypes:fw})},0),n;function n(){window._onperformance.splice(window._onperformance.indexOf(e),1)}function o(f){f.getEntries().forEach(function(h){lw.push(function(){a(h),window._onperformance.forEach(function(p){p(h)})})})}function a(f){var h=f.entryType;h==="measure"?window.performance.clearMeasures(f.name):h==="resource"&&window.performance.clearResourceTimings()}}var pw=cw,dw=ea(),gw=om;function Oo(e){if(!(this instanceof Oo))return new Oo(e);gw.equal(typeof e,"object"),this.hasWindow=typeof window<"u",this.hasIdleCallback=this.hasWindow&&window.requestIdleCallback,this.hasPerformance=this.hasWindow&&window.performance&&window.performance.getEntriesByName,this.emitter=e,this.listeners={},this.buffer={render:{},events:{}}}Oo.prototype.on=function(e,t){this.listeners[e]=t};Oo.prototype.start=function(){var e=this;this.hasPerformance&&(window.performance.onresourcetimingbufferfull=function(){var t=e.listeners["resource-timing-buffer-full"];t&&t()}),pw(function(t){if(t&&t.entryType==="measure"){var r=t.name;if(/choo\.morph/.test(r))e.buffer.render.morph=t;else if(/choo\.route/.test(r))e.buffer.render.route=t;else if(/choo\.render/.test(r))e.buffer.render.render=t;else if(/choo\.emit/.test(r)&&!/log:/.test(r)){var n=e.listeners.event;if(n){var o=r.match(/choo\.emit\('(.*)'\)/)[1];if(o==="render"||o==="DOMContentLoaded")return;var a=r.match(/\[(\d+)\]/)[1],f=e.buffer.events[a];e.buffer.events[a]=null,n(o,f,t)}}var h=e.buffer.render;if(h.render&&h.route&&h.morph){var p=e.listeners.render;if(!p)return;for(var v={};e.buffer.render.length;){var _=e.buffer.render.pop(),y=_.name;/choo\.render/.test(y)?v.render=_:/choo\.morph/.test(y)?v.morph=_:v.route=_}h.render=h.route=h.morph=void 0,p(v)}}}),this.emitter.on("*",function(t,r,n){var o=/^log:(\w{4,5})/.exec(t);if(!e.hasPerformance&&t==="render"){var a=e.listeners.render;a&&a()}else if(t==="DOMContentLoaded")e._emitLoaded();else if(o){o=o[1];var f=e.listeners["log:"+o];f&&f.apply(null,Array.prototype.slice.call(arguments,0,arguments.length-1))}else if(e.emitter.listeners(t).length)t!=="render"&&e.hasPerformance&&(e.buffer.events[n]=r);else{var h=e.listeners.unhandled;h&&h(t,r)}})};Oo.prototype._emitLoaded=function(){var e=this;dw.push(function(){var r=e.listeners.DOMContentLoaded,n=e.hasWindow&&window.performance&&window.performance.timing;r&&n&&r({interactive:n.domInteractive-n.navigationStart,loaded:n.domContentLoadedEventEnd-n.navigationStart})})};ea();var yw=Bo;Bo.default=Bo;Bo.stable=fm;Bo.stableStringify=fm;var Cl="[...]",lm="[Circular]",xn=[],_n=[];function um(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Bo(e,t,r,n){typeof n>"u"&&(n=um()),lc(e,"",0,[],void 0,0,n);var o;try{_n.length===0?o=JSON.stringify(e,t,r):o=JSON.stringify(e,cm(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;xn.length!==0;){var a=xn.pop();a.length===4?Object.defineProperty(a[0],a[1],a[3]):a[0][a[1]]=a[2]}}return o}function fs(e,t,r,n){var o=Object.getOwnPropertyDescriptor(n,r);o.get!==void 0?o.configurable?(Object.defineProperty(n,r,{value:e}),xn.push([n,r,t,o])):_n.push([t,r,e]):(n[r]=e,xn.push([n,r,t]))}function lc(e,t,r,n,o,a,f){a+=1;var h;if(typeof e=="object"&&e!==null){for(h=0;h<n.length;h++)if(n[h]===e){fs(lm,e,t,o);return}if(typeof f.depthLimit<"u"&&a>f.depthLimit){fs(Cl,e,t,o);return}if(typeof f.edgesLimit<"u"&&r+1>f.edgesLimit){fs(Cl,e,t,o);return}if(n.push(e),Array.isArray(e))for(h=0;h<e.length;h++)lc(e[h],h,h,n,e,a,f);else{var p=Object.keys(e);for(h=0;h<p.length;h++){var v=p[h];lc(e[v],v,h,n,e,a,f)}}n.pop()}}function mw(e,t){return e<t?-1:e>t?1:0}function fm(e,t,r,n){typeof n>"u"&&(n=um());var o=uc(e,"",0,[],void 0,0,n)||e,a;try{_n.length===0?a=JSON.stringify(o,t,r):a=JSON.stringify(o,cm(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;xn.length!==0;){var f=xn.pop();f.length===4?Object.defineProperty(f[0],f[1],f[3]):f[0][f[1]]=f[2]}}return a}function uc(e,t,r,n,o,a,f){a+=1;var h;if(typeof e=="object"&&e!==null){for(h=0;h<n.length;h++)if(n[h]===e){fs(lm,e,t,o);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof f.depthLimit<"u"&&a>f.depthLimit){fs(Cl,e,t,o);return}if(typeof f.edgesLimit<"u"&&r+1>f.edgesLimit){fs(Cl,e,t,o);return}if(n.push(e),Array.isArray(e))for(h=0;h<e.length;h++)uc(e[h],h,h,n,e,a,f);else{var p={},v=Object.keys(e).sort(mw);for(h=0;h<v.length;h++){var _=v[h];uc(e[_],_,h,n,e,a,f),p[_]=e[_]}if(typeof o<"u")xn.push([o,t,e]),o[t]=p;else return p}n.pop()}}function cm(e){return e=typeof e<"u"?e:function(t,r){return r},function(t,r){if(_n.length>0)for(var n=0;n<_n.length;n++){var o=_n[n];if(o[1]===t&&o[0]===r){r=o[2],_n.splice(n,1);break}}return e.call(this,t,r)}}var qu={exports:{}},xd;function vw(){return xd||(xd=1,function(e){var t=function(){function r(m,x){return x!=null&&m instanceof x}var n;try{n=Map}catch{n=function(){}}var o;try{o=Set}catch{o=function(){}}var a;try{a=Promise}catch{a=function(){}}function f(m,x,U,R,S){typeof x=="object"&&(U=x.depth,R=x.prototype,S=x.includeNonEnumerable,x=x.circular);var g=[],L=[],G=typeof Buffer<"u";typeof x>"u"&&(x=!0),typeof U>"u"&&(U=1/0);function O(P,F){if(P===null)return null;if(F===0)return P;var V,D;if(typeof P!="object")return P;if(r(P,n))V=new n;else if(r(P,o))V=new o;else if(r(P,a))V=new a(function(K,X){P.then(function(fe){K(O(fe,F-1))},function(fe){X(O(fe,F-1))})});else if(f.__isArray(P))V=[];else if(f.__isRegExp(P))V=new RegExp(P.source,y(P)),P.lastIndex&&(V.lastIndex=P.lastIndex);else if(f.__isDate(P))V=new Date(P.getTime());else{if(G&&Buffer.isBuffer(P))return Buffer.allocUnsafe?V=Buffer.allocUnsafe(P.length):V=new Buffer(P.length),P.copy(V),V;r(P,Error)?V=Object.create(P):typeof R>"u"?(D=Object.getPrototypeOf(P),V=Object.create(D)):(V=Object.create(R),D=R)}if(x){var ee=g.indexOf(P);if(ee!=-1)return L[ee];g.push(P),L.push(V)}r(P,n)&&P.forEach(function(K,X){var fe=O(X,F-1),Me=O(K,F-1);V.set(fe,Me)}),r(P,o)&&P.forEach(function(K){var X=O(K,F-1);V.add(X)});for(var A in P){var q;D&&(q=Object.getOwnPropertyDescriptor(D,A)),!(q&&q.set==null)&&(V[A]=O(P[A],F-1))}if(Object.getOwnPropertySymbols)for(var $=Object.getOwnPropertySymbols(P),A=0;A<$.length;A++){var ce=$[A],ye=Object.getOwnPropertyDescriptor(P,ce);ye&&!ye.enumerable&&!S||(V[ce]=O(P[ce],F-1),ye.enumerable||Object.defineProperty(V,ce,{enumerable:!1}))}if(S)for(var re=Object.getOwnPropertyNames(P),A=0;A<re.length;A++){var ie=re[A],ye=Object.getOwnPropertyDescriptor(P,ie);ye&&ye.enumerable||(V[ie]=O(P[ie],F-1),Object.defineProperty(V,ie,{enumerable:!1}))}return V}return O(m,U)}f.clonePrototype=function(x){if(x===null)return null;var U=function(){};return U.prototype=x,new U};function h(m){return Object.prototype.toString.call(m)}f.__objToStr=h;function p(m){return typeof m=="object"&&h(m)==="[object Date]"}f.__isDate=p;function v(m){return typeof m=="object"&&h(m)==="[object Array]"}f.__isArray=v;function _(m){return typeof m=="object"&&h(m)==="[object RegExp]"}f.__isRegExp=_;function y(m){var x="";return m.global&&(x+="g"),m.ignoreCase&&(x+="i"),m.multiline&&(x+="m"),x}return f.__getRegExpFlags=y,f}();e.exports&&(e.exports=t)}(qu)),qu.exports}ea();var _w=ow;_w("choo");vw();Kl.EventEmitter;var ww=bw;function bw(e,t){if(e)try{var r=document.querySelector(e);r&&r.scrollIntoView(t)}catch{}}var xw=Sw;function Sw(e){if(typeof document>"u")throw new Error("document-ready only runs in the browser");var t=document.readyState;if(t==="complete"||t==="interactive")return setTimeout(e,0);document.addEventListener("DOMContentLoaded",function(){e()})}var hm=ea(),Mw=di,Or;Vl.disabled=!0;try{Or=window.performance,Vl.disabled=window.localStorage.DISABLE_NANOTIMING==="true"||!Or.mark}catch{}var $c=Vl;function Vl(e){if(Mw.equal(typeof e,"string","nanotiming: name should be type string"),Vl.disabled)return Cw;var t=(Or.now()*1e4).toFixed()%Number.MAX_SAFE_INTEGER,r="start-"+t+"-"+e;Or.mark(r);function n(o){var a="end-"+t+"-"+e;Or.mark(a),hm.push(function(){var f=null;try{var h=e+" ["+t+"]";Or.measure(h,r,a),Or.clearMarks(r),Or.clearMarks(a)}catch(p){f=p}o&&o(f,e)})}return n.uuid=t,n}function Cw(e){e&&hm.push(function(){e(new Error("nanotiming: performance API unavailable"))})}var Tl=di,Tw=ds;function ds(){if(!(this instanceof ds))return new ds;this.trie={nodes:{}}}ds.prototype.create=function(e){Tl.equal(typeof e,"string","route should be a string");var t=e.replace(/^\//,"").split("/");function r(n,o){var a=vl(t,n)&&t[n];if(a===!1)return o;var f=null;return/^:|^\*/.test(a)?(vl(o.nodes,"$$")?f=o.nodes.$$:(f={nodes:{}},o.nodes.$$=f),a[0]==="*"&&(o.wildcard=!0),o.name=a.replace(/^:|^\*/,"")):vl(o.nodes,a)?f=o.nodes[a]:(f={nodes:{}},o.nodes[a]=f),r(n+1,f)}return r(0,this.trie)};ds.prototype.match=function(e){Tl.equal(typeof e,"string","route should be a string");var t=e.replace(/^\//,"").split("/"),r={};function n(a,f){if(f!==void 0){var h=t[a];if(h===void 0)return f;if(vl(f.nodes,h))return n(a+1,f.nodes[h]);if(f.name){try{r[f.name]=decodeURIComponent(h)}catch{return n(a,void 0)}return n(a+1,f.nodes.$$)}else if(f.wildcard){try{r.wildcard=decodeURIComponent(t.slice(a).join("/"))}catch{return n(a,void 0)}return f.nodes.$$}else return n(a+1)}}var o=n(0,this.trie);if(o)return o=Object.assign({},o),o.params=r,o};ds.prototype.mount=function(e,t){Tl.equal(typeof e,"string","route should be a string"),Tl.equal(typeof t,"object","trie should be a object");var r=e.replace(/^\//,"").split("/"),n=null,o=null;if(r.length===1)o=r[0],n=this.create(o);else{var a=r.join("/");o=r[0],n=this.create(a)}Object.assign(n.nodes,t.nodes),t.name&&(n.name=t.name),n.nodes[""]&&(Object.keys(n.nodes[""]).forEach(function(f){f!=="nodes"&&(n[f]=n.nodes[""][f])}),Object.assign(n.nodes,n.nodes[""].nodes),delete n.nodes[""].nodes)};function vl(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var ef=di,Ew=Tw,kw=fc;function fc(e){if(!(this instanceof fc))return new fc(e);var t=(e||"").replace(/^\//,""),r=Ew();return o._trie=r,o.on=n,o.emit=o,o.match=a,o._wayfarer=!0,o;function n(h,p){if(ef.equal(typeof h,"string"),ef.equal(typeof p,"function"),h=h||"/",p._wayfarer&&p._trie)r.mount(h,p._trie.trie);else{var v=r.create(h);v.cb=p,v.route=h}return o}function o(h){var p=a(h),v=new Array(arguments.length);v[0]=p.params;for(var _=1;_<v.length;_++)v[_]=arguments[_];return p.cb.apply(p.cb,v)}function a(h){ef.notEqual(h,void 0,"'route' must be defined");var p=r.match(h);if(p&&p.cb)return new f(p);var v=r.match(t);if(v&&v.cb)return new f(v);throw new Error("route '"+h+"' did not match")}function f(h){this.cb=h.cb,this.route=h.route,this.params=h.params}}var Xc=di,Aw=kw,pm=/file:\/\//.test(typeof window=="object"&&window.location&&window.location.origin),Rw="^(file://|/)(.*.html?/?)?",Lw="^(http(s)?(://))?(www.)?",Uw="[a-zA-Z0-9-_.]+(:[0-9]{1,5})?(/{1})?",Iw="[?].*$",Jw=new RegExp(Rw),Nw=new RegExp(Lw+Uw),Ow=new RegExp("#"),Bw=new RegExp(Iw),Fw=gs;function gs(e){if(!(this instanceof gs))return new gs(e);e=e||{},this.router=Aw(e.default||"/404")}gs.prototype.on=function(e,t){Xc.equal(typeof e,"string"),e=e.replace(/^[#/]/,""),this.router.on(e,t)};gs.prototype.emit=function(e){return Xc.equal(typeof e,"string"),e=dm(e,pm),this.router.emit(e)};gs.prototype.match=function(e){return Xc.equal(typeof e,"string"),e=dm(e,pm),this.router.match(e)};function dm(e,t){return t?e=e.replace(Jw,""):e=e.replace(Nw,""),decodeURI(e.replace(Bw,"").replace(Ow,"/"))}var Dw=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmousemove","onmouseout","onmouseenter","onmouseleave","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ondragstart","ondrag","ondragenter","ondragleave","ondragover","ondrop","ondragend","onkeydown","onkeypress","onkeyup","onunload","onabort","onerror","onresize","onscroll","onselect","onchange","onsubmit","onreset","onfocus","onblur","oninput","onanimationend","onanimationiteration","onanimationstart","oncontextmenu","onfocusin","onfocusout"],gm=Dw,jw=gm.length,Pw=1,Gw=3,Ww=8,Kw=Vw;function Vw(e,t){var r=e.nodeType,n=e.nodeName;r===Pw&&zw(e,t),(r===Gw||r===Ww)&&t.nodeValue!==e.nodeValue&&(t.nodeValue=e.nodeValue),n==="INPUT"?Hw(e,t):n==="OPTION"?Yw(e,t):n==="TEXTAREA"&&Zw(e,t),Qw(e,t)}function zw(e,t){for(var r=t.attributes,n=e.attributes,o=null,a=null,f=null,h=null,p=null,v=n.length-1;v>=0;--v)p=n[v],h=p.name,o=p.namespaceURI,a=p.value,o?(h=p.localName||h,f=t.getAttributeNS(o,h),f!==a&&t.setAttributeNS(o,h,a)):t.hasAttribute(h)?(f=t.getAttribute(h),f!==a&&(a==="null"||a==="undefined"?t.removeAttribute(h):t.setAttribute(h,a))):t.setAttribute(h,a);for(var _=r.length-1;_>=0;--_)p=r[_],p.specified!==!1&&(h=p.name,o=p.namespaceURI,o?(h=p.localName||h,e.hasAttributeNS(o,h)||t.removeAttributeNS(o,h)):e.hasAttributeNS(null,h)||t.removeAttribute(h))}function Qw(e,t){for(var r=0;r<jw;r++){var n=gm[r];e[n]?t[n]=e[n]:t[n]&&(t[n]=void 0)}}function Yw(e,t){cc(e,t,"selected")}function Hw(e,t){var r=e.value,n=t.value;cc(e,t,"checked"),cc(e,t,"disabled"),e.indeterminate!==t.indeterminate&&(t.indeterminate=e.indeterminate),t.type!=="file"&&(r!==n&&(t.setAttribute("value",r),t.value=r),r==="null"&&(t.value="",t.removeAttribute("value")),e.hasAttributeNS(null,"value")?t.type==="range"&&(t.value=r):t.removeAttribute("value"))}function Zw(e,t){var r=e.value;if(r!==t.value&&(t.value=r),t.firstChild&&t.firstChild.nodeValue!==r){if(r===""&&t.firstChild.nodeValue===t.placeholder)return;t.firstChild.nodeValue=r}}function cc(e,t,r){e[r]!==t[r]&&(t[r]=e[r],e[r]?t.setAttribute(r,""):t.removeAttribute(r))}var tf=di,$w=Kw,Xw=3,ym=qw;function qw(e,t,r){return tf.equal(typeof e,"object","nanomorph: oldTree should be an object"),tf.equal(typeof t,"object","nanomorph: newTree should be an object"),r&&r.childrenOnly?(mm(t,e),e):(tf.notEqual(t.nodeType,11,"nanomorph: newTree should have one root node (which is not a DocumentFragment)"),_l(t,e))}function _l(e,t){return t?e?e.isSameNode&&e.isSameNode(t)?t:e.tagName!==t.tagName||Sd(e)!==Sd(t)?e:($w(e,t),mm(e,t),t):null:e}function Sd(e){return e.dataset?e.dataset.nanomorphComponentId:void 0}function mm(e,t){for(var r,n,o,a,f=0,h=0;r=t.childNodes[h],n=e.childNodes[h-f],!(!r&&!n);h++)if(!n)t.removeChild(r),h--;else if(!r)t.appendChild(n),f++;else if(Md(n,r))o=_l(n,r),o!==r&&(t.replaceChild(o,r),f++);else{a=null;for(var p=h;p<t.childNodes.length;p++)if(Md(t.childNodes[p],n)){a=t.childNodes[p];break}a?(o=_l(n,a),o!==a&&f++,t.insertBefore(o,r)):!n.id&&!r.id?(o=_l(n,r),o!==r&&(t.replaceChild(o,r),f++)):(t.insertBefore(n,r),f++)}}function Md(e,t){return e.id?e.id===t.id:e.isSameNode?e.isSameNode(t):e.tagName!==t.tagName?!1:e.type===Xw?e.nodeValue===t.nodeValue:!1}var e1=/([^?=&]+)(=([^&]*))?/g,t1=di,i1=r1;function r1(e){t1.equal(typeof e,"string","nanoquery: url should be type string");var t={};return e.replace(/^.*\?/,"").replace(e1,function(r,n,o,a){var f=decodeURIComponent(a),h=decodeURIComponent(n);t.hasOwnProperty(h)?Array.isArray(t[h])?t[h].push(f):t[h]=[t[h],f]:t[h]=f}),t}var rf=di,n1=/(noopener|noreferrer) (noopener|noreferrer)/,s1=/^[\w-_]+:/,o1=a1;function a1(e,t){rf.notEqual(typeof window,"undefined","nanohref: expected window to exist"),t=t||window.document,rf.equal(typeof e,"function","nanohref: cb should be type function"),rf.equal(typeof t,"object","nanohref: root should be type object"),window.addEventListener("click",function(r){if(!(r.button&&r.button!==0||r.ctrlKey||r.metaKey||r.altKey||r.shiftKey||r.defaultPrevented)){var n=function o(a){if(!(!a||a===t))return a.localName!=="a"||a.href===void 0?o(a.parentNode):a}(r.target);n&&(window.location.protocol!==n.protocol||window.location.hostname!==n.hostname||window.location.port!==n.port||n.hasAttribute("data-nanohref-ignore")||n.hasAttribute("download")||n.getAttribute("target")==="_blank"&&n1.test(n.getAttribute("rel"))||s1.test(n.getAttribute("href"))||(r.preventDefault(),e(n)))}})}var Cd=di,l1=u1;function u1(e,t){Cd.equal(typeof e,"function","nanoraf: render should be a function"),Cd.ok(typeof t=="function"||typeof t>"u","nanoraf: raf should be a function or undefined"),t||(t=window.requestAnimationFrame);var r=!1,n=null;return function(){n===null&&!r&&(r=!0,t(function(){r=!1;for(var f=n.length,h=new Array(f),p=0;p<f;p++)h[p]=n[p];e.apply(e,h),n=null})),n=arguments}}var f1=function(t,r,n){var o,a=t.length;if(!(r>=a||n===0)){n=r+n>a?a-r:n;var f=a-n;for(o=r;o<f;++o)t[o]=t[o+n];t.length=f}},c1=f1,h1=$c,Pi=di,vm=pi;function pi(e){if(!(this instanceof pi))return new pi(e);this._name=e||"nanobus",this._starListeners=[],this._listeners={}}pi.prototype.emit=function(e){Pi.ok(typeof e=="string"||typeof e=="symbol","nanobus.emit: eventName should be type string or symbol");for(var t=[],r=1,n=arguments.length;r<n;r++)t.push(arguments[r]);var o=h1(this._name+"('"+e.toString()+"')"),a=this._listeners[e];return a&&a.length>0&&this._emit(this._listeners[e],t),this._starListeners.length>0&&this._emit(this._starListeners,e,t,o.uuid),o(),this};pi.prototype.on=pi.prototype.addListener=function(e,t){return Pi.ok(typeof e=="string"||typeof e=="symbol","nanobus.on: eventName should be type string or symbol"),Pi.equal(typeof t,"function","nanobus.on: listener should be type function"),e==="*"?this._starListeners.push(t):(this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)),this};pi.prototype.prependListener=function(e,t){return Pi.ok(typeof e=="string"||typeof e=="symbol","nanobus.prependListener: eventName should be type string or symbol"),Pi.equal(typeof t,"function","nanobus.prependListener: listener should be type function"),e==="*"?this._starListeners.unshift(t):(this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].unshift(t)),this};pi.prototype.once=function(e,t){Pi.ok(typeof e=="string"||typeof e=="symbol","nanobus.once: eventName should be type string or symbol"),Pi.equal(typeof t,"function","nanobus.once: listener should be type function");var r=this;this.on(e,n);function n(){t.apply(r,arguments),r.removeListener(e,n)}return this};pi.prototype.prependOnceListener=function(e,t){Pi.ok(typeof e=="string"||typeof e=="symbol","nanobus.prependOnceListener: eventName should be type string or symbol"),Pi.equal(typeof t,"function","nanobus.prependOnceListener: listener should be type function");var r=this;this.prependListener(e,n);function n(){t.apply(r,arguments),r.removeListener(e,n)}return this};pi.prototype.removeListener=function(e,t){if(Pi.ok(typeof e=="string"||typeof e=="symbol","nanobus.removeListener: eventName should be type string or symbol"),Pi.equal(typeof t,"function","nanobus.removeListener: listener should be type function"),e==="*")return this._starListeners=this._starListeners.slice(),r(this._starListeners,t);return typeof this._listeners[e]<"u"&&(this._listeners[e]=this._listeners[e].slice()),r(this._listeners[e],t);function r(n,o){if(n){var a=n.indexOf(o);if(a!==-1)return c1(n,a,1),!0}}};pi.prototype.removeAllListeners=function(e){return e?e==="*"?this._starListeners=[]:this._listeners[e]=[]:(this._starListeners=[],this._listeners={}),this};pi.prototype.listeners=function(e){var t=e!=="*"?this._listeners[e]:this._starListeners,r=[];if(t)for(var n=t.length,o=0;o<n;o++)r.push(t[o]);return r};pi.prototype._emit=function(e,t,r,n){if(!(typeof e>"u")&&e.length!==0){r===void 0&&(r=t,t=null),t&&(n!==void 0?r=[t].concat(r,n):r=[t].concat(r));for(var o=e.length,a=0;a<o;a++){var f=e[a];f.apply(f,r)}}};const p1=Mi(vm);var d1=xi;function xi(e){if(!(this instanceof xi))return new xi(e);typeof e=="number"&&(e={max:e}),e||(e={}),this.cache={},this.head=this.tail=null,this.length=0,this.max=e.max||1e3,this.maxAge=e.maxAge||0}Object.defineProperty(xi.prototype,"keys",{get:function(){return Object.keys(this.cache)}});xi.prototype.clear=function(){this.cache={},this.head=this.tail=null,this.length=0};xi.prototype.remove=function(e){if(typeof e!="string"&&(e=""+e),!!this.cache.hasOwnProperty(e)){var t=this.cache[e];return delete this.cache[e],this._unlink(e,t.prev,t.next),t.value}};xi.prototype._unlink=function(e,t,r){this.length--,this.length===0?this.head=this.tail=null:this.head===e?(this.head=t,this.cache[this.head].next=null):this.tail===e?(this.tail=r,this.cache[this.tail].prev=null):(this.cache[t].next=r,this.cache[r].prev=t)};xi.prototype.peek=function(e){if(this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return t.value}};xi.prototype.set=function(e,t){typeof e!="string"&&(e=""+e);var r;if(this.cache.hasOwnProperty(e)){if(r=this.cache[e],r.value=t,this.maxAge&&(r.modified=Date.now()),e===this.head)return t;this._unlink(e,r.prev,r.next)}else r={value:t,modified:0,next:null,prev:null},this.maxAge&&(r.modified=Date.now()),this.cache[e]=r,this.length===this.max&&this.evict();return this.length++,r.next=null,r.prev=this.head,this.head&&(this.cache[this.head].next=e),this.head=e,this.tail||(this.tail=e),t};xi.prototype._checkAge=function(e,t){return this.maxAge&&Date.now()-t.modified>this.maxAge?(this.remove(e),!1):!0};xi.prototype.get=function(e){if(typeof e!="string"&&(e=""+e),!!this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return this.head!==e&&(e===this.tail?(this.tail=t.next,this.cache[this.tail].prev=null):this.cache[t.prev].next=t.next,this.cache[t.next].prev=t.prev,this.cache[this.head].next=e,t.prev=this.head,t.next=null,this.head=e),t.value}};xi.prototype.evict=function(){this.tail&&this.remove(this.tail)};var Ro=di,Td=d1,g1=qc;function qc(e,t,r){Ro.ok(this instanceof qc,"ChooComponentCache should be created with `new`"),Ro.equal(typeof e,"object","ChooComponentCache: state should be type object"),Ro.equal(typeof t,"function","ChooComponentCache: emit should be type function"),typeof r=="number"?this.cache=new Td(r):this.cache=r||new Td(100),this.state=e,this.emit=t}qc.prototype.render=function(e,t){Ro.equal(typeof e,"function","ChooComponentCache.render: Component should be type function"),Ro.ok(typeof t=="string"||typeof t=="number","ChooComponentCache.render: id should be type string or type number");var r=this.cache.get(t);if(!r){for(var n=[],o=2,a=arguments.length;o<a;o++)n.push(arguments[o]);n.unshift(e,t,this.state,this.emit),r=Ed.apply(Ed,n),this.cache.set(t,r)}return r};function Ed(e){return new(e.bind.apply(e,arguments))}var kd=ww,_m=xw,tr=$c,y1=Fw,wm=ym,m1=i1,v1=o1,_1=l1,w1=vm,kt=di,b1=g1,x1=Gi,Ad={};function Gi(e){var t=tr("choo.constructor");if(!(this instanceof Gi))return new Gi(e);e=e||{},kt.equal(typeof e,"object","choo: opts should be type object");var r=this;this._events={DOMCONTENTLOADED:"DOMContentLoaded",DOMTITLECHANGE:"DOMTitleChange",REPLACESTATE:"replaceState",PUSHSTATE:"pushState",NAVIGATE:"navigate",POPSTATE:"popState",RENDER:"render"},this._historyEnabled=e.history===void 0?!0:e.history,this._hrefEnabled=e.href===void 0?!0:e.href,this._hashEnabled=e.hash===void 0?!1:e.hash,this._hasWindow=typeof window<"u",this._cache=e.cache,this._loaded=!1,this._stores=[o],this._tree=null;var n={events:this._events,components:{}};this._hasWindow?(this.state=window.initialState?Object.assign({},window.initialState,n):n,delete window.initialState):this.state=n,this.router=y1({curry:!0}),this.emitter=w1("choo.emit"),this.emit=this.emitter.emit.bind(this.emitter),this._hasWindow&&(this.state.title=document.title);function o(a){r.emitter.prependListener(r._events.DOMTITLECHANGE,function(f){kt.equal(typeof f,"string","events.DOMTitleChange: title should be type string"),a.title=f,r._hasWindow&&(document.title=f)})}t()}Gi.prototype.route=function(e,t){var r=tr("choo.route('"+e+"')");kt.equal(typeof e,"string","choo.route: route should be type string"),kt.equal(typeof t,"function","choo.handler: route should be type function"),this.router.on(e,t),r()};Gi.prototype.use=function(e){kt.equal(typeof e,"function","choo.use: cb should be type function");var t=this;this._stores.push(function(r){var n="choo.use";n=e.storeName?n+"("+e.storeName+")":n;var o=tr(n);e(r,t.emitter,t),o()})};Gi.prototype.start=function(){kt.equal(typeof window,"object","choo.start: window was not found. .start() must be called in a browser, use .toString() if running in Node");var e=tr("choo.start"),t=this;return this._historyEnabled&&(this.emitter.prependListener(this._events.NAVIGATE,function(){t._matchRoute(t.state),t._loaded&&(t.emitter.emit(t._events.RENDER),setTimeout(kd.bind(null,window.location.hash),0))}),this.emitter.prependListener(this._events.POPSTATE,function(){t.emitter.emit(t._events.NAVIGATE)}),this.emitter.prependListener(this._events.PUSHSTATE,function(r){kt.equal(typeof r,"string","events.pushState: href should be type string"),window.history.pushState(Ad,null,r),t.emitter.emit(t._events.NAVIGATE)}),this.emitter.prependListener(this._events.REPLACESTATE,function(r){kt.equal(typeof r,"string","events.replaceState: href should be type string"),window.history.replaceState(Ad,null,r),t.emitter.emit(t._events.NAVIGATE)}),window.onpopstate=function(){t.emitter.emit(t._events.POPSTATE)},t._hrefEnabled&&v1(function(r){var n=r.href,o=r.hash;if(n===window.location.href){!t._hashEnabled&&o&&kd(o);return}t.emitter.emit(t._events.PUSHSTATE,n)})),this._setCache(this.state),this._matchRoute(this.state),this._stores.forEach(function(r){r(t.state)}),this._tree=this._prerender(this.state),kt.ok(this._tree,"choo.start: no valid DOM node returned for location "+this.state.href),this.emitter.prependListener(t._events.RENDER,_1(function(){var r=tr("choo.render"),n=t._prerender(t.state);kt.ok(n,"choo.render: no valid DOM node returned for location "+t.state.href),kt.equal(t._tree.nodeName,n.nodeName,"choo.render: The target node <"+t._tree.nodeName.toLowerCase()+"> is not the same type as the new node <"+n.nodeName.toLowerCase()+">.");var o=tr("choo.morph");wm(t._tree,n),o(),r()})),_m(function(){t.emitter.emit(t._events.DOMCONTENTLOADED),t._loaded=!0}),e(),this._tree};Gi.prototype.mount=function(t){var r=tr("choo.mount('"+t+"')");if(typeof window!="object")return kt.ok(typeof t=="string","choo.mount: selector should be type String"),this.selector=t,r(),this;kt.ok(typeof t=="string"||typeof t=="object","choo.mount: selector should be type String or HTMLElement");var n=this;_m(function(){var o=tr("choo.render"),a=n.start();typeof t=="string"?n._tree=document.querySelector(t):n._tree=t,kt.ok(n._tree,"choo.mount: could not query selector: "+t),kt.equal(n._tree.nodeName,a.nodeName,"choo.mount: The target node <"+n._tree.nodeName.toLowerCase()+"> is not the same type as the new node <"+a.nodeName.toLowerCase()+">.");var f=tr("choo.morph");wm(n._tree,a),f(),o()}),r()};Gi.prototype.toString=function(e,t){t=t||{},t.components=t.components||{},t.events=Object.assign({},t.events,this._events),kt.notEqual(typeof window,"object","choo.mount: window was found. .toString() must be called in Node, use .start() or .mount() if running in the browser"),kt.equal(typeof e,"string","choo.toString: location should be type string"),kt.equal(typeof t,"object","choo.toString: state should be type object"),this._setCache(t),this._matchRoute(t,e),this.emitter.removeAllListeners(),this._stores.forEach(function(n){n(t)});var r=this._prerender(t);return kt.ok(r,"choo.toString: no valid value returned for the route "+e),kt(!Array.isArray(r),"choo.toString: return value was an array for the route "+e),typeof r.outerHTML=="string"?r.outerHTML:r.toString()};Gi.prototype._matchRoute=function(e,t){var r,n;t?(r=t.replace(/\?.+$/,"").replace(/\/$/,""),this._hashEnabled||(r=r.replace(/#.+$/,"")),n=t):(r=window.location.pathname.replace(/\/$/,""),this._hashEnabled&&(r+=window.location.hash.replace(/^#/,"/")),n=window.location.search);var o=this.router.match(r);this._handler=o.cb,e.href=r,e.query=m1(n),e.route=o.route,e.params=o.params};Gi.prototype._prerender=function(e){var t=tr("choo.prerender('"+e.route+"')"),r=this._handler(e,this.emit);return t(),r};Gi.prototype._setCache=function(e){var t=new b1(e,this.emitter.emit.bind(this.emitter),this._cache);e.cache=r;function r(n,o){kt.equal(typeof n,"function","choo.state.cache: Component should be type function");for(var a=[],f=0,h=arguments.length;f<h;f++)a.push(arguments[f]);return t.render.apply(t,a)}r.toJSON=function(){return null}};const S1=Mi(x1),M1={eval:(e,t=()=>{})=>{const r={isError:!1,codeString:"",errorMessage:""};var n=`(async() => {
|
||
${e}
|
||
})().catch(${o=>{window._reportError(o)}})`;try{window.eval(n)}catch(o){r.errorMessage=o.message}r.codeString=n,r.errorMessage.length>0&&(r.isError=!0),t(r)}};function C1(e,t){e.showInfo=!1,e.showUI=!0,e.showExtensions=!1,e.errorMessage="",e.isError=!1;const r="https://api.hydrasynth.xyz";e.serverURL=r,window._reportError=o=>{e.errorMessage=o.message,e.isError=!0,t.emit("render")},t.on("load and eval code",(o,a=!0)=>{t.emit("editor: load code",o),t.emit("repl: eval",o),a&&t.emit("gallery: save to URL",o)}),t.on("repl: eval",(o="",a)=>{M1.eval(o,f=>{e.errorMessage=f.errorMessage,e.isError=f.isError,a&&a(f.codeString,f.isError),t.emit("render")})}),t.on("screencap",()=>{screencap();const a=e.editor.editor.getValue(),f=new Blob([a],{type:"text/plain"}),h=document.createElement("a");h.style.display="none";let p=new Date;h.download=`hydra-${p.getFullYear()}-${p.getMonth()+1}-${p.getDate()}-${p.getHours()}.${p.getMinutes()}.${p.getSeconds()}.js`,h.href=URL.createObjectURL(f),h.click(),setTimeout(()=>{window.URL.revokeObjectURL(h.href)},300)});function n(){const o=e.editor.editor;hush(),speed=1,t.emit("gallery: clear"),o.clear()}t.on("clear all",()=>{n()}),t.on("ui: hide all",function(){e.showUI=!e.showUI,t.emit("render")}),t.on("ui: toggle info",function(o){e.showInfo?t.emit("ui: hide info"):t.emit("ui: show info")}),t.on("ui: show info",()=>{e.showInfo=!0,t.emit("render")}),t.on("ui: hide info",()=>{e.showInfo=!1,e.showExtensions=!1,t.emit("render")}),t.on("ui: show extensions",()=>{e.showExtensions=!0,e.showInfo=!0,t.emit("extensions: select category"),t.emit("render")}),t.on("ui: hide extensions",()=>{e.showExtensions=!1,t.emit("render")})}function ji(e){"@babel/helpers - typeof";return ji=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ji(e)}function Wi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T1(e,t){if(ji(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ji(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bm(e){var t=T1(e,"string");return ji(t)==="symbol"?t:String(t)}function Rd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,bm(n.key),n)}}function Ki(e,t,r){return t&&Rd(e.prototype,t),r&&Rd(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Vr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hc(e,t){return hc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},hc(e,t)}function zl(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hc(e,t)}function ta(e,t){if(t&&(ji(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Vr(e)}function nr(e){return nr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},nr(e)}function Yr(e,t,r){return t=bm(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E1(e){if(Array.isArray(e))return e}function k1(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ld(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function A1(e,t){if(e){if(typeof e=="string")return Ld(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ld(e,t)}}function R1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function L1(e){return E1(e)||k1(e)||A1(e)||R1()}function Ud(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Id(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ud(Object(r),!0).forEach(function(n){Yr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ud(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var U1={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,r){console&&console[t]&&console[t].apply(console,r)}},I1=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Wi(this,e),this.init(t,r)}return Ki(e,[{key:"init",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=r||U1,this.options=n,this.debug=n.debug}},{key:"setDebug",value:function(r){this.debug=r}},{key:"log",value:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return this.forward(n,"log","",!0)}},{key:"warn",value:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return this.forward(n,"warn","",!0)}},{key:"error",value:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return this.forward(n,"error","")}},{key:"deprecate",value:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(r,n,o,a){return a&&!this.debug?null:(typeof r[0]=="string"&&(r[0]="".concat(o).concat(this.prefix," ").concat(r[0])),this.logger[n](r))}},{key:"create",value:function(r){return new e(this.logger,Id(Id({},{prefix:"".concat(this.prefix,":").concat(r,":")}),this.options))}},{key:"clone",value:function(r){return r=r||this.options,r.prefix=r.prefix||this.prefix,new e(this.logger,r)}}]),e}(),er=new I1,zr=function(){function e(){Wi(this,e),this.observers={}}return Ki(e,[{key:"on",value:function(r,n){var o=this;return r.split(" ").forEach(function(a){o.observers[a]=o.observers[a]||[],o.observers[a].push(n)}),this}},{key:"off",value:function(r,n){if(this.observers[r]){if(!n){delete this.observers[r];return}this.observers[r]=this.observers[r].filter(function(o){return o!==n})}}},{key:"emit",value:function(r){for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];if(this.observers[r]){var f=[].concat(this.observers[r]);f.forEach(function(p){p.apply(void 0,o)})}if(this.observers["*"]){var h=[].concat(this.observers["*"]);h.forEach(function(p){p.apply(p,[r].concat(o))})}}}]),e}();function mo(){var e,t,r=new Promise(function(n,o){e=n,t=o});return r.resolve=e,r.reject=t,r}function Jd(e){return e==null?"":""+e}function J1(e,t,r){e.forEach(function(n){t[n]&&(r[n]=t[n])})}function eh(e,t,r){function n(h){return h&&h.indexOf("###")>-1?h.replace(/###/g,"."):h}function o(){return!e||typeof e=="string"}for(var a=typeof t!="string"?[].concat(t):t.split(".");a.length>1;){if(o())return{};var f=n(a.shift());!e[f]&&r&&(e[f]=new r),Object.prototype.hasOwnProperty.call(e,f)?e=e[f]:e={}}return o()?{}:{obj:e,k:n(a.shift())}}function Nd(e,t,r){var n=eh(e,t,Object),o=n.obj,a=n.k;o[a]=r}function N1(e,t,r,n){var o=eh(e,t,Object),a=o.obj,f=o.k;a[f]=a[f]||[],n&&(a[f]=a[f].concat(r)),n||a[f].push(r)}function El(e,t){var r=eh(e,t),n=r.obj,o=r.k;if(n)return n[o]}function Od(e,t,r){var n=El(e,r);return n!==void 0?n:El(t,r)}function xm(e,t,r){for(var n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?typeof e[n]=="string"||e[n]instanceof String||typeof t[n]=="string"||t[n]instanceof String?r&&(e[n]=t[n]):xm(e[n],t[n],r):e[n]=t[n]);return e}function Zn(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var O1={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function B1(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return O1[t]}):e}var Ql=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,F1=[" ",",","?","!",";"];function D1(e,t,r){t=t||"",r=r||"";var n=F1.filter(function(h){return t.indexOf(h)<0&&r.indexOf(h)<0});if(n.length===0)return!0;var o=new RegExp("(".concat(n.map(function(h){return h==="?"?"\\?":h}).join("|"),")")),a=!o.test(e);if(!a){var f=e.indexOf(r);f>0&&!o.test(e.substring(0,f))&&(a=!0)}return a}function Bd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function za(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bd(Object(r),!0).forEach(function(n){Yr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function j1(e){var t=P1();return function(){var n=nr(e),o;if(t){var a=nr(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return ta(this,o)}}function P1(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Sm(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(e){if(e[t])return e[t];for(var n=t.split(r),o=e,a=0;a<n.length;++a){if(!o||typeof o[n[a]]=="string"&&a+1<n.length)return;if(o[n[a]]===void 0){for(var f=2,h=n.slice(a,a+f).join(r),p=o[h];p===void 0&&n.length>a+f;)f++,h=n.slice(a,a+f).join(r),p=o[h];if(p===void 0)return;if(p===null)return null;if(t.endsWith(h)){if(typeof p=="string")return p;if(h&&typeof p[h]=="string")return p[h]}var v=n.slice(a+f).join(r);return v?Sm(p,v,r):void 0}o=o[n[a]]}return o}}var G1=function(e){zl(r,e);var t=j1(r);function r(n){var o,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Wi(this,r),o=t.call(this),Ql&&zr.call(Vr(o)),o.data=n||{},o.options=a,o.options.keySeparator===void 0&&(o.options.keySeparator="."),o.options.ignoreJSONStructure===void 0&&(o.options.ignoreJSONStructure=!0),o}return Ki(r,[{key:"addNamespaces",value:function(o){this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}},{key:"removeNamespaces",value:function(o){var a=this.options.ns.indexOf(o);a>-1&&this.options.ns.splice(a,1)}},{key:"getResource",value:function(o,a,f){var h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},p=h.keySeparator!==void 0?h.keySeparator:this.options.keySeparator,v=h.ignoreJSONStructure!==void 0?h.ignoreJSONStructure:this.options.ignoreJSONStructure,_=[o,a];f&&typeof f!="string"&&(_=_.concat(f)),f&&typeof f=="string"&&(_=_.concat(p?f.split(p):f)),o.indexOf(".")>-1&&(_=o.split("."));var y=El(this.data,_);return y||!v||typeof f!="string"?y:Sm(this.data&&this.data[o]&&this.data[o][a],f,p)}},{key:"addResource",value:function(o,a,f,h){var p=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},v=this.options.keySeparator;v===void 0&&(v=".");var _=[o,a];f&&(_=_.concat(v?f.split(v):f)),o.indexOf(".")>-1&&(_=o.split("."),h=a,a=_[1]),this.addNamespaces(a),Nd(this.data,_,h),p.silent||this.emit("added",o,a,f,h)}},{key:"addResources",value:function(o,a,f){var h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var p in f)(typeof f[p]=="string"||Object.prototype.toString.apply(f[p])==="[object Array]")&&this.addResource(o,a,p,f[p],{silent:!0});h.silent||this.emit("added",o,a,f)}},{key:"addResourceBundle",value:function(o,a,f,h,p){var v=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},_=[o,a];o.indexOf(".")>-1&&(_=o.split("."),h=f,f=a,a=_[1]),this.addNamespaces(a);var y=El(this.data,_)||{};h?xm(y,f,p):y=za(za({},y),f),Nd(this.data,_,y),v.silent||this.emit("added",o,a,f)}},{key:"removeResourceBundle",value:function(o,a){this.hasResourceBundle(o,a)&&delete this.data[o][a],this.removeNamespaces(a),this.emit("removed",o,a)}},{key:"hasResourceBundle",value:function(o,a){return this.getResource(o,a)!==void 0}},{key:"getResourceBundle",value:function(o,a){return a||(a=this.options.defaultNS),this.options.compatibilityAPI==="v1"?za(za({},{}),this.getResource(o,a)):this.getResource(o,a)}},{key:"getDataByLanguage",value:function(o){return this.data[o]}},{key:"hasLanguageSomeTranslations",value:function(o){var a=this.getDataByLanguage(o),f=a&&Object.keys(a)||[];return!!f.find(function(h){return a[h]&&Object.keys(a[h]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),r}(zr),Mm={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,r,n,o,a){var f=this;return t.forEach(function(h){f.processors[h]&&(r=f.processors[h].process(r,n,o,a))}),r}};function Fd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function qt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fd(Object(r),!0).forEach(function(n){Yr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function W1(e){var t=K1();return function(){var n=nr(e),o;if(t){var a=nr(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return ta(this,o)}}function K1(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Dd={},jd=function(e){zl(r,e);var t=W1(r);function r(n){var o,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Wi(this,r),o=t.call(this),Ql&&zr.call(Vr(o)),J1(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,Vr(o)),o.options=a,o.options.keySeparator===void 0&&(o.options.keySeparator="."),o.logger=er.create("translator"),o}return Ki(r,[{key:"changeLanguage",value:function(o){o&&(this.language=o)}},{key:"exists",value:function(o){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(o==null)return!1;var f=this.resolve(o,a);return f&&f.res!==void 0}},{key:"extractFromKey",value:function(o,a){var f=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;f===void 0&&(f=":");var h=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,p=a.ns||this.options.defaultNS||[],v=f&&o.indexOf(f)>-1,_=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!D1(o,f,h);if(v&&!_){var y=o.match(this.interpolator.nestingRegexp);if(y&&y.length>0)return{key:o,namespaces:p};var m=o.split(f);(f!==h||f===h&&this.options.ns.indexOf(m[0])>-1)&&(p=m.shift()),o=m.join(h)}return typeof p=="string"&&(p=[p]),{key:o,namespaces:p}}},{key:"translate",value:function(o,a,f){var h=this;if(ji(a)!=="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),a||(a={}),o==null)return"";Array.isArray(o)||(o=[String(o)]);var p=a.returnDetails!==void 0?a.returnDetails:this.options.returnDetails,v=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,_=this.extractFromKey(o[o.length-1],a),y=_.key,m=_.namespaces,x=m[m.length-1],U=a.lng||this.language,R=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(U&&U.toLowerCase()==="cimode"){if(R){var S=a.nsSeparator||this.options.nsSeparator;return p?(g.res="".concat(x).concat(S).concat(y),g):"".concat(x).concat(S).concat(y)}return p?(g.res=y,g):y}var g=this.resolve(o,a),L=g&&g.res,G=g&&g.usedKey||y,O=g&&g.exactUsedKey||y,P=Object.prototype.toString.apply(L),F=["[object Number]","[object Function]","[object RegExp]"],V=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,D=!this.i18nFormat||this.i18nFormat.handleAsObject,ee=typeof L!="string"&&typeof L!="boolean"&&typeof L!="number";if(D&&L&&ee&&F.indexOf(P)<0&&!(typeof V=="string"&&P==="[object Array]")){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var A=this.options.returnedObjectHandler?this.options.returnedObjectHandler(G,L,qt(qt({},a),{},{ns:m})):"key '".concat(y," (").concat(this.language,")' returned an object instead of string.");return p?(g.res=A,g):A}if(v){var q=P==="[object Array]",$=q?[]:{},ce=q?O:G;for(var ye in L)if(Object.prototype.hasOwnProperty.call(L,ye)){var re="".concat(ce).concat(v).concat(ye);$[ye]=this.translate(re,qt(qt({},a),{joinArrays:!1,ns:m})),$[ye]===re&&($[ye]=L[ye])}L=$}}else if(D&&typeof V=="string"&&P==="[object Array]")L=L.join(V),L&&(L=this.extendTranslation(L,o,a,f));else{var ie=!1,K=!1,X=a.count!==void 0&&typeof a.count!="string",fe=r.hasDefaultValue(a),Me=X?this.pluralResolver.getSuffix(U,a.count,a):"",we=a["defaultValue".concat(Me)]||a.defaultValue;!this.isValidLookup(L)&&fe&&(ie=!0,L=we),this.isValidLookup(L)||(K=!0,L=y);var Re=a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,ke=Re&&K?void 0:L,Ie=fe&&we!==L&&this.options.updateMissing;if(K||ie||Ie){if(this.logger.log(Ie?"updateKey":"missingKey",U,x,y,Ie?we:L),v){var ze=this.resolve(y,qt(qt({},a),{},{keySeparator:!1}));ze&&ze.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var le=[],ue=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ue&&ue[0])for(var xe=0;xe<ue.length;xe++)le.push(ue[xe]);else this.options.saveMissingTo==="all"?le=this.languageUtils.toResolveHierarchy(a.lng||this.language):le.push(a.lng||this.language);var Le=function(H,Y,ve){var Ce=fe&&ve!==L?ve:ke;h.options.missingKeyHandler?h.options.missingKeyHandler(H,x,Y,Ce,Ie,a):h.backendConnector&&h.backendConnector.saveMissing&&h.backendConnector.saveMissing(H,x,Y,Ce,Ie,a),h.emit("missingKey",H,x,Y,L)};this.options.saveMissing&&(this.options.saveMissingPlurals&&X?le.forEach(function(De){h.pluralResolver.getSuffixes(De,a).forEach(function(H){Le([De],y+H,a["defaultValue".concat(H)]||we)})}):Le(le,y,we))}L=this.extendTranslation(L,o,a,g,f),K&&L===y&&this.options.appendNamespaceToMissingKey&&(L="".concat(x,":").concat(y)),(K||ie)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?L=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(x,":").concat(y):y,ie?L:void 0):L=this.options.parseMissingKeyHandler(L))}return p?(g.res=L,g):L}},{key:"extendTranslation",value:function(o,a,f,h,p){var v=this;if(this.i18nFormat&&this.i18nFormat.parse)o=this.i18nFormat.parse(o,qt(qt({},this.options.interpolation.defaultVariables),f),h.usedLng,h.usedNS,h.usedKey,{resolved:h});else if(!f.skipInterpolation){f.interpolation&&this.interpolator.init(qt(qt({},f),{interpolation:qt(qt({},this.options.interpolation),f.interpolation)}));var _=typeof o=="string"&&(f&&f.interpolation&&f.interpolation.skipOnVariables!==void 0?f.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),y;if(_){var m=o.match(this.interpolator.nestingRegexp);y=m&&m.length}var x=f.replace&&typeof f.replace!="string"?f.replace:f;if(this.options.interpolation.defaultVariables&&(x=qt(qt({},this.options.interpolation.defaultVariables),x)),o=this.interpolator.interpolate(o,x,f.lng||this.language,f),_){var U=o.match(this.interpolator.nestingRegexp),R=U&&U.length;y<R&&(f.nest=!1)}f.nest!==!1&&(o=this.interpolator.nest(o,function(){for(var L=arguments.length,G=new Array(L),O=0;O<L;O++)G[O]=arguments[O];return p&&p[0]===G[0]&&!f.context?(v.logger.warn("It seems you are nesting recursively key: ".concat(G[0]," in key: ").concat(a[0])),null):v.translate.apply(v,G.concat([a]))},f)),f.interpolation&&this.interpolator.reset()}var S=f.postProcess||this.options.postProcess,g=typeof S=="string"?[S]:S;return o!=null&&g&&g.length&&f.applyPostProcessor!==!1&&(o=Mm.handle(g,o,a,this.options&&this.options.postProcessPassResolved?qt({i18nResolved:h},f):f,this)),o}},{key:"resolve",value:function(o){var a=this,f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h,p,v,_,y;return typeof o=="string"&&(o=[o]),o.forEach(function(m){if(!a.isValidLookup(h)){var x=a.extractFromKey(m,f),U=x.key;p=U;var R=x.namespaces;a.options.fallbackNS&&(R=R.concat(a.options.fallbackNS));var S=f.count!==void 0&&typeof f.count!="string",g=S&&!f.ordinal&&f.count===0&&a.pluralResolver.shouldUseIntlApi(),L=f.context!==void 0&&(typeof f.context=="string"||typeof f.context=="number")&&f.context!=="",G=f.lngs?f.lngs:a.languageUtils.toResolveHierarchy(f.lng||a.language,f.fallbackLng);R.forEach(function(O){a.isValidLookup(h)||(y=O,!Dd["".concat(G[0],"-").concat(O)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(y)&&(Dd["".concat(G[0],"-").concat(O)]=!0,a.logger.warn('key "'.concat(p,'" for languages "').concat(G.join(", "),`" won't get resolved as namespace "`).concat(y,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),G.forEach(function(P){if(!a.isValidLookup(h)){_=P;var F=[U];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(F,U,P,O,f);else{var V;S&&(V=a.pluralResolver.getSuffix(P,f.count,f));var D="".concat(a.options.pluralSeparator,"zero");if(S&&(F.push(U+V),g&&F.push(U+D)),L){var ee="".concat(U).concat(a.options.contextSeparator).concat(f.context);F.push(ee),S&&(F.push(ee+V),g&&F.push(ee+D))}}for(var A;A=F.pop();)a.isValidLookup(h)||(v=A,h=a.getResource(P,O,A,f))}}))})}}),{res:h,usedKey:p,exactUsedKey:v,usedLng:_,usedNS:y}}},{key:"isValidLookup",value:function(o){return o!==void 0&&!(!this.options.returnNull&&o===null)&&!(!this.options.returnEmptyString&&o==="")}},{key:"getResource",value:function(o,a,f){var h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(o,a,f,h):this.resourceStore.getResource(o,a,f,h)}}],[{key:"hasDefaultValue",value:function(o){var a="defaultValue";for(var f in o)if(Object.prototype.hasOwnProperty.call(o,f)&&a===f.substring(0,a.length)&&o[f]!==void 0)return!0;return!1}}]),r}(zr);function nf(e){return e.charAt(0).toUpperCase()+e.slice(1)}var V1=function(){function e(t){Wi(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=er.create("languageUtils")}return Ki(e,[{key:"getScriptPartFromCode",value:function(r){if(!r||r.indexOf("-")<0)return null;var n=r.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}},{key:"getLanguagePartFromCode",value:function(r){if(!r||r.indexOf("-")<0)return r;var n=r.split("-");return this.formatLanguageCode(n[0])}},{key:"formatLanguageCode",value:function(r){if(typeof r=="string"&&r.indexOf("-")>-1){var n=["hans","hant","latn","cyrl","cans","mong","arab"],o=r.split("-");return this.options.lowerCaseLng?o=o.map(function(a){return a.toLowerCase()}):o.length===2?(o[0]=o[0].toLowerCase(),o[1]=o[1].toUpperCase(),n.indexOf(o[1].toLowerCase())>-1&&(o[1]=nf(o[1].toLowerCase()))):o.length===3&&(o[0]=o[0].toLowerCase(),o[1].length===2&&(o[1]=o[1].toUpperCase()),o[0]!=="sgn"&&o[2].length===2&&(o[2]=o[2].toUpperCase()),n.indexOf(o[1].toLowerCase())>-1&&(o[1]=nf(o[1].toLowerCase())),n.indexOf(o[2].toLowerCase())>-1&&(o[2]=nf(o[2].toLowerCase()))),o.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?r.toLowerCase():r}},{key:"isSupportedCode",value:function(r){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(r=this.getLanguagePartFromCode(r)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(r)>-1}},{key:"getBestMatchFromCodes",value:function(r){var n=this;if(!r)return null;var o;return r.forEach(function(a){if(!o){var f=n.formatLanguageCode(a);(!n.options.supportedLngs||n.isSupportedCode(f))&&(o=f)}}),!o&&this.options.supportedLngs&&r.forEach(function(a){if(!o){var f=n.getLanguagePartFromCode(a);if(n.isSupportedCode(f))return o=f;o=n.options.supportedLngs.find(function(h){if(h.indexOf(f)===0)return h})}}),o||(o=this.getFallbackCodes(this.options.fallbackLng)[0]),o}},{key:"getFallbackCodes",value:function(r,n){if(!r)return[];if(typeof r=="function"&&(r=r(n)),typeof r=="string"&&(r=[r]),Object.prototype.toString.apply(r)==="[object Array]")return r;if(!n)return r.default||[];var o=r[n];return o||(o=r[this.getScriptPartFromCode(n)]),o||(o=r[this.formatLanguageCode(n)]),o||(o=r[this.getLanguagePartFromCode(n)]),o||(o=r.default),o||[]}},{key:"toResolveHierarchy",value:function(r,n){var o=this,a=this.getFallbackCodes(n||this.options.fallbackLng||[],r),f=[],h=function(v){v&&(o.isSupportedCode(v)?f.push(v):o.logger.warn("rejecting language code not found in supportedLngs: ".concat(v)))};return typeof r=="string"&&r.indexOf("-")>-1?(this.options.load!=="languageOnly"&&h(this.formatLanguageCode(r)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&h(this.getScriptPartFromCode(r)),this.options.load!=="currentOnly"&&h(this.getLanguagePartFromCode(r))):typeof r=="string"&&h(this.formatLanguageCode(r)),a.forEach(function(p){f.indexOf(p)<0&&h(o.formatLanguageCode(p))}),f}}]),e}(),z1=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Q1={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}},Y1=["v1","v2","v3"],Pd={zero:0,one:1,two:2,few:3,many:4,other:5};function H1(){var e={};return z1.forEach(function(t){t.lngs.forEach(function(r){e[r]={numbers:t.nr,plurals:Q1[t.fc]}})}),e}var Z1=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Wi(this,e),this.languageUtils=t,this.options=r,this.logger=er.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=H1()}return Ki(e,[{key:"addRule",value:function(r,n){this.rules[r]=n}},{key:"getRule",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(r,{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[r]||this.rules[this.languageUtils.getLanguagePartFromCode(r)]}},{key:"needsPlural",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(r,n);return this.shouldUseIntlApi()?o&&o.resolvedOptions().pluralCategories.length>1:o&&o.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(r,o).map(function(a){return"".concat(n).concat(a)})}},{key:"getSuffixes",value:function(r){var n=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=this.getRule(r,o);return a?this.shouldUseIntlApi()?a.resolvedOptions().pluralCategories.sort(function(f,h){return Pd[f]-Pd[h]}).map(function(f){return"".concat(n.options.prepend).concat(f)}):a.numbers.map(function(f){return n.getSuffix(r,f,o)}):[]}},{key:"getSuffix",value:function(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=this.getRule(r,o);return a?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(a.select(n)):this.getSuffixRetroCompatible(a,n):(this.logger.warn("no plural rule found for: ".concat(r)),"")}},{key:"getSuffixRetroCompatible",value:function(r,n){var o=this,a=r.noAbs?r.plurals(n):r.plurals(Math.abs(n)),f=r.numbers[a];this.options.simplifyPluralSuffix&&r.numbers.length===2&&r.numbers[0]===1&&(f===2?f="plural":f===1&&(f=""));var h=function(){return o.options.prepend&&f.toString()?o.options.prepend+f.toString():f.toString()};return this.options.compatibilityJSON==="v1"?f===1?"":typeof f=="number"?"_plural_".concat(f.toString()):h():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&r.numbers.length===2&&r.numbers[0]===1?h():this.options.prepend&&a.toString()?this.options.prepend+a.toString():a.toString()}},{key:"shouldUseIntlApi",value:function(){return!Y1.includes(this.options.compatibilityJSON)}}]),e}();function Gd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ii(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Gd(Object(r),!0).forEach(function(n){Yr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var $1=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Wi(this,e),this.logger=er.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(r){return r},this.init(t)}return Ki(e,[{key:"init",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};r.interpolation||(r.interpolation={escapeValue:!0});var n=r.interpolation;this.escape=n.escape!==void 0?n.escape:B1,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?Zn(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?Zn(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?Zn(n.nestingPrefix):n.nestingPrefixEscaped||Zn("$t("),this.nestingSuffix=n.nestingSuffix?Zn(n.nestingSuffix):n.nestingSuffixEscaped||Zn(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var r="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(r,"g");var n="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(n,"g");var o="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(o,"g")}},{key:"interpolate",value:function(r,n,o,a){var f=this,h,p,v,_=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function y(S){return S.replace(/\$/g,"$$$$")}var m=function(g){if(g.indexOf(f.formatSeparator)<0){var L=Od(n,_,g);return f.alwaysFormat?f.format(L,void 0,o,Ii(Ii(Ii({},a),n),{},{interpolationkey:g})):L}var G=g.split(f.formatSeparator),O=G.shift().trim(),P=G.join(f.formatSeparator).trim();return f.format(Od(n,_,O),P,o,Ii(Ii(Ii({},a),n),{},{interpolationkey:O}))};this.resetRegExp();var x=a&&a.missingInterpolationHandler||this.options.missingInterpolationHandler,U=a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,R=[{regex:this.regexpUnescape,safeValue:function(g){return y(g)}},{regex:this.regexp,safeValue:function(g){return f.escapeValue?y(f.escape(g)):y(g)}}];return R.forEach(function(S){for(v=0;h=S.regex.exec(r);){var g=h[1].trim();if(p=m(g),p===void 0)if(typeof x=="function"){var L=x(r,h,a);p=typeof L=="string"?L:""}else if(a&&a.hasOwnProperty(g))p="";else if(U){p=h[0];continue}else f.logger.warn("missed to pass in variable ".concat(g," for interpolating ").concat(r)),p="";else typeof p!="string"&&!f.useRawValueToEscape&&(p=Jd(p));var G=S.safeValue(p);if(r=r.replace(h[0],G),U?(S.regex.lastIndex+=p.length,S.regex.lastIndex-=h[0].length):S.regex.lastIndex=0,v++,v>=f.maxReplaces)break}}),r}},{key:"nest",value:function(r,n){var o=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},f,h,p=Ii({},a);p.applyPostProcessor=!1,delete p.defaultValue;function v(x,U){var R=this.nestingOptionsSeparator;if(x.indexOf(R)<0)return x;var S=x.split(new RegExp("".concat(R,"[ ]*{"))),g="{".concat(S[1]);x=S[0],g=this.interpolate(g,p);var L=g.match(/'/g),G=g.match(/"/g);(L&&L.length%2===0&&!G||G.length%2!==0)&&(g=g.replace(/'/g,'"'));try{p=JSON.parse(g),U&&(p=Ii(Ii({},U),p))}catch(O){return this.logger.warn("failed parsing options string in nesting for key ".concat(x),O),"".concat(x).concat(R).concat(g)}return delete p.defaultValue,x}for(;f=this.nestingRegexp.exec(r);){var _=[],y=!1;if(f[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(f[1])){var m=f[1].split(this.formatSeparator).map(function(x){return x.trim()});f[1]=m.shift(),_=m,y=!0}if(h=n(v.call(this,f[1].trim(),p),p),h&&f[0]===r&&typeof h!="string")return h;typeof h!="string"&&(h=Jd(h)),h||(this.logger.warn("missed to resolve ".concat(f[1]," for nesting ").concat(r)),h=""),y&&(h=_.reduce(function(x,U){return o.format(x,U,a.lng,Ii(Ii({},a),{},{interpolationkey:f[1].trim()}))},h.trim())),r=r.replace(f[0],h),this.regexp.lastIndex=0}return r}}]),e}();function Wd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Jr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wd(Object(r),!0).forEach(function(n){Yr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function X1(e){var t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){var n=e.split("(");t=n[0].toLowerCase().trim();var o=n[1].substring(0,n[1].length-1);if(t==="currency"&&o.indexOf(":")<0)r.currency||(r.currency=o.trim());else if(t==="relativetime"&&o.indexOf(":")<0)r.range||(r.range=o.trim());else{var a=o.split(";");a.forEach(function(f){if(f){var h=f.split(":"),p=L1(h),v=p[0],_=p.slice(1),y=_.join(":").trim().replace(/^'+|'+$/g,"");r[v.trim()]||(r[v.trim()]=y),y==="false"&&(r[v.trim()]=!1),y==="true"&&(r[v.trim()]=!0),isNaN(y)||(r[v.trim()]=parseInt(y,10))}})}}return{formatName:t,formatOptions:r}}function $n(e){var t={};return function(n,o,a){var f=o+JSON.stringify(a),h=t[f];return h||(h=e(o,a),t[f]=h),h(n)}}var q1=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Wi(this,e),this.logger=er.create("formatter"),this.options=t,this.formats={number:$n(function(r,n){var o=new Intl.NumberFormat(r,n);return function(a){return o.format(a)}}),currency:$n(function(r,n){var o=new Intl.NumberFormat(r,Jr(Jr({},n),{},{style:"currency"}));return function(a){return o.format(a)}}),datetime:$n(function(r,n){var o=new Intl.DateTimeFormat(r,Jr({},n));return function(a){return o.format(a)}}),relativetime:$n(function(r,n){var o=new Intl.RelativeTimeFormat(r,Jr({},n));return function(a){return o.format(a,n.range||"day")}}),list:$n(function(r,n){var o=new Intl.ListFormat(r,Jr({},n));return function(a){return o.format(a)}})},this.init(t)}return Ki(e,[{key:"init",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},o=n.interpolation;this.formatSeparator=o.formatSeparator?o.formatSeparator:o.formatSeparator||","}},{key:"add",value:function(r,n){this.formats[r.toLowerCase().trim()]=n}},{key:"addCached",value:function(r,n){this.formats[r.toLowerCase().trim()]=$n(n)}},{key:"format",value:function(r,n,o,a){var f=this,h=n.split(this.formatSeparator),p=h.reduce(function(v,_){var y=X1(_),m=y.formatName,x=y.formatOptions;if(f.formats[m]){var U=v;try{var R=a&&a.formatParams&&a.formatParams[a.interpolationkey]||{},S=R.locale||R.lng||a.locale||a.lng||o;U=f.formats[m](v,S,Jr(Jr(Jr({},x),a),R))}catch(g){f.logger.warn(g)}return U}else f.logger.warn("there was no format function for ".concat(m));return v},r);return p}}]),e}();function Kd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Vd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Kd(Object(r),!0).forEach(function(n){Yr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eb(e){var t=tb();return function(){var n=nr(e),o;if(t){var a=nr(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return ta(this,o)}}function tb(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ib(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var rb=function(e){zl(r,e);var t=eb(r);function r(n,o,a){var f,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return Wi(this,r),f=t.call(this),Ql&&zr.call(Vr(f)),f.backend=n,f.store=o,f.services=a,f.languageUtils=a.languageUtils,f.options=h,f.logger=er.create("backendConnector"),f.waitingReads=[],f.maxParallelReads=h.maxParallelReads||10,f.readingCalls=0,f.maxRetries=h.maxRetries>=0?h.maxRetries:5,f.retryTimeout=h.retryTimeout>=1?h.retryTimeout:350,f.state={},f.queue=[],f.backend&&f.backend.init&&f.backend.init(a,h.backend,h),f}return Ki(r,[{key:"queueLoad",value:function(o,a,f,h){var p=this,v={},_={},y={},m={};return o.forEach(function(x){var U=!0;a.forEach(function(R){var S="".concat(x,"|").concat(R);!f.reload&&p.store.hasResourceBundle(x,R)?p.state[S]=2:p.state[S]<0||(p.state[S]===1?_[S]===void 0&&(_[S]=!0):(p.state[S]=1,U=!1,_[S]===void 0&&(_[S]=!0),v[S]===void 0&&(v[S]=!0),m[R]===void 0&&(m[R]=!0)))}),U||(y[x]=!0)}),(Object.keys(v).length||Object.keys(_).length)&&this.queue.push({pending:_,pendingCount:Object.keys(_).length,loaded:{},errors:[],callback:h}),{toLoad:Object.keys(v),pending:Object.keys(_),toLoadLanguages:Object.keys(y),toLoadNamespaces:Object.keys(m)}}},{key:"loaded",value:function(o,a,f){var h=o.split("|"),p=h[0],v=h[1];a&&this.emit("failedLoading",p,v,a),f&&this.store.addResourceBundle(p,v,f),this.state[o]=a?-1:2;var _={};this.queue.forEach(function(y){N1(y.loaded,[p],v),ib(y,o),a&&y.errors.push(a),y.pendingCount===0&&!y.done&&(Object.keys(y.loaded).forEach(function(m){_[m]||(_[m]={});var x=y.loaded[m];x.length&&x.forEach(function(U){_[m][U]===void 0&&(_[m][U]=!0)})}),y.done=!0,y.errors.length?y.callback(y.errors):y.callback())}),this.emit("loaded",_),this.queue=this.queue.filter(function(y){return!y.done})}},{key:"read",value:function(o,a,f){var h=this,p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,v=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,_=arguments.length>5?arguments[5]:void 0;if(!o.length)return _(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:o,ns:a,fcName:f,tried:p,wait:v,callback:_});return}return this.readingCalls++,this.backend[f](o,a,function(y,m){if(h.readingCalls--,h.waitingReads.length>0){var x=h.waitingReads.shift();h.read(x.lng,x.ns,x.fcName,x.tried,x.wait,x.callback)}if(y&&m&&p<h.maxRetries){setTimeout(function(){h.read.call(h,o,a,f,p+1,v*2,_)},v);return}_(y,m)})}},{key:"prepareLoading",value:function(o,a){var f=this,h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),p&&p();typeof o=="string"&&(o=this.languageUtils.toResolveHierarchy(o)),typeof a=="string"&&(a=[a]);var v=this.queueLoad(o,a,h,p);if(!v.toLoad.length)return v.pending.length||p(),null;v.toLoad.forEach(function(_){f.loadOne(_)})}},{key:"load",value:function(o,a,f){this.prepareLoading(o,a,{},f)}},{key:"reload",value:function(o,a,f){this.prepareLoading(o,a,{reload:!0},f)}},{key:"loadOne",value:function(o){var a=this,f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",h=o.split("|"),p=h[0],v=h[1];this.read(p,v,"read",void 0,void 0,function(_,y){_&&a.logger.warn("".concat(f,"loading namespace ").concat(v," for language ").concat(p," failed"),_),!_&&y&&a.logger.log("".concat(f,"loaded namespace ").concat(v," for language ").concat(p),y),a.loaded(o,_,y)})}},{key:"saveMissing",value:function(o,a,f,h,p){var v=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(a)){this.logger.warn('did not save key "'.concat(f,'" as the namespace "').concat(a,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}f==null||f===""||(this.backend&&this.backend.create&&this.backend.create(o,a,f,h,null,Vd(Vd({},v),{},{isUpdate:p})),!(!o||!o[0])&&this.store.addResource(o[0],a,f,h))}}]),r}(zr);function nb(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var r={};if(ji(t[1])==="object"&&(r=t[1]),typeof t[1]=="string"&&(r.defaultValue=t[1]),typeof t[2]=="string"&&(r.tDescription=t[2]),ji(t[2])==="object"||ji(t[3])==="object"){var n=t[3]||t[2];Object.keys(n).forEach(function(o){r[o]=n[o]})}return r},interpolation:{escapeValue:!0,format:function(t,r,n,o){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function zd(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function Qd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Hi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qd(Object(r),!0).forEach(function(n){Yr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sb(e){var t=ob();return function(){var n=nr(e),o;if(t){var a=nr(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return ta(this,o)}}function ob(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Qa(){}function ab(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(r){typeof e[r]=="function"&&(e[r]=e[r].bind(e))})}var kl=function(e){zl(r,e);var t=sb(r);function r(){var n,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;if(Wi(this,r),n=t.call(this),Ql&&zr.call(Vr(n)),n.options=zd(o),n.services={},n.logger=er,n.modules={external:[]},ab(Vr(n)),a&&!n.isInitialized&&!o.isClone){if(!n.options.initImmediate)return n.init(o,a),ta(n,Vr(n));setTimeout(function(){n.init(o,a)},0)}return n}return Ki(r,[{key:"init",value:function(){var o=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f=arguments.length>1?arguments[1]:void 0;typeof a=="function"&&(f=a,a={}),!a.defaultNS&&a.defaultNS!==!1&&a.ns&&(typeof a.ns=="string"?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));var h=nb();this.options=Hi(Hi(Hi({},h),this.options),zd(a)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=Hi(Hi({},h.interpolation),this.options.interpolation)),a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator);function p(g){return g?typeof g=="function"?new g:g:null}if(!this.options.isClone){this.modules.logger?er.init(p(this.modules.logger),this.options):er.init(null,this.options);var v;this.modules.formatter?v=this.modules.formatter:typeof Intl<"u"&&(v=q1);var _=new V1(this.options);this.store=new G1(this.options.resources,this.options);var y=this.services;y.logger=er,y.resourceStore=this.store,y.languageUtils=_,y.pluralResolver=new Z1(_,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),v&&(!this.options.interpolation.format||this.options.interpolation.format===h.interpolation.format)&&(y.formatter=p(v),y.formatter.init(y,this.options),this.options.interpolation.format=y.formatter.format.bind(y.formatter)),y.interpolator=new $1(this.options),y.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},y.backendConnector=new rb(p(this.modules.backend),y.resourceStore,y,this.options),y.backendConnector.on("*",function(g){for(var L=arguments.length,G=new Array(L>1?L-1:0),O=1;O<L;O++)G[O-1]=arguments[O];o.emit.apply(o,[g].concat(G))}),this.modules.languageDetector&&(y.languageDetector=p(this.modules.languageDetector),y.languageDetector.init(y,this.options.detection,this.options)),this.modules.i18nFormat&&(y.i18nFormat=p(this.modules.i18nFormat),y.i18nFormat.init&&y.i18nFormat.init(this)),this.translator=new jd(this.services,this.options),this.translator.on("*",function(g){for(var L=arguments.length,G=new Array(L>1?L-1:0),O=1;O<L;O++)G[O-1]=arguments[O];o.emit.apply(o,[g].concat(G))}),this.modules.external.forEach(function(g){g.init&&g.init(o)})}if(this.format=this.options.interpolation.format,f||(f=Qa),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var x=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];x.forEach(function(g){o[g]=function(){var L;return(L=o.store)[g].apply(L,arguments)}});var U=["addResource","addResources","addResourceBundle","removeResourceBundle"];U.forEach(function(g){o[g]=function(){var L;return(L=o.store)[g].apply(L,arguments),o}});var R=mo(),S=function(){var L=function(O,P){o.isInitialized&&!o.initializedStoreOnce&&o.logger.warn("init: i18next is already initialized. You should call init just once!"),o.isInitialized=!0,o.options.isClone||o.logger.log("initialized",o.options),o.emit("initialized",o.options),R.resolve(P),f(O,P)};if(o.languages&&o.options.compatibilityAPI!=="v1"&&!o.isInitialized)return L(null,o.t.bind(o));o.changeLanguage(o.options.lng,L)};return this.options.resources||!this.options.initImmediate?S():setTimeout(S,0),R}},{key:"loadResources",value:function(o){var a=this,f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Qa,h=f,p=typeof o=="string"?o:this.language;if(typeof o=="function"&&(h=o),!this.options.resources||this.options.partialBundledLanguages){if(p&&p.toLowerCase()==="cimode")return h();var v=[],_=function(x){if(x){var U=a.services.languageUtils.toResolveHierarchy(x);U.forEach(function(R){v.indexOf(R)<0&&v.push(R)})}};if(p)_(p);else{var y=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);y.forEach(function(m){return _(m)})}this.options.preload&&this.options.preload.forEach(function(m){return _(m)}),this.services.backendConnector.load(v,this.options.ns,function(m){!m&&!a.resolvedLanguage&&a.language&&a.setResolvedLanguage(a.language),h(m)})}else h(null)}},{key:"reloadResources",value:function(o,a,f){var h=mo();return o||(o=this.languages),a||(a=this.options.ns),f||(f=Qa),this.services.backendConnector.reload(o,a,function(p){h.resolve(),f(p)}),h}},{key:"use",value:function(o){if(!o)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!o.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return o.type==="backend"&&(this.modules.backend=o),(o.type==="logger"||o.log&&o.warn&&o.error)&&(this.modules.logger=o),o.type==="languageDetector"&&(this.modules.languageDetector=o),o.type==="i18nFormat"&&(this.modules.i18nFormat=o),o.type==="postProcessor"&&Mm.addPostProcessor(o),o.type==="formatter"&&(this.modules.formatter=o),o.type==="3rdParty"&&this.modules.external.push(o),this}},{key:"setResolvedLanguage",value:function(o){if(!(!o||!this.languages)&&!(["cimode","dev"].indexOf(o)>-1))for(var a=0;a<this.languages.length;a++){var f=this.languages[a];if(!(["cimode","dev"].indexOf(f)>-1)&&this.store.hasLanguageSomeTranslations(f)){this.resolvedLanguage=f;break}}}},{key:"changeLanguage",value:function(o,a){var f=this;this.isLanguageChangingTo=o;var h=mo();this.emit("languageChanging",o);var p=function(m){f.language=m,f.languages=f.services.languageUtils.toResolveHierarchy(m),f.resolvedLanguage=void 0,f.setResolvedLanguage(m)},v=function(m,x){x?(p(x),f.translator.changeLanguage(x),f.isLanguageChangingTo=void 0,f.emit("languageChanged",x),f.logger.log("languageChanged",x)):f.isLanguageChangingTo=void 0,h.resolve(function(){return f.t.apply(f,arguments)}),a&&a(m,function(){return f.t.apply(f,arguments)})},_=function(m){!o&&!m&&f.services.languageDetector&&(m=[]);var x=typeof m=="string"?m:f.services.languageUtils.getBestMatchFromCodes(m);x&&(f.language||p(x),f.translator.language||f.translator.changeLanguage(x),f.services.languageDetector&&f.services.languageDetector.cacheUserLanguage(x)),f.loadResources(x,function(U){v(U,x)})};return!o&&this.services.languageDetector&&!this.services.languageDetector.async?_(this.services.languageDetector.detect()):!o&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(_):_(o),h}},{key:"getFixedT",value:function(o,a,f){var h=this,p=function v(_,y){var m;if(ji(y)!=="object"){for(var x=arguments.length,U=new Array(x>2?x-2:0),R=2;R<x;R++)U[R-2]=arguments[R];m=h.options.overloadTranslationOptionHandler([_,y].concat(U))}else m=Hi({},y);m.lng=m.lng||v.lng,m.lngs=m.lngs||v.lngs,m.ns=m.ns||v.ns,m.keyPrefix=m.keyPrefix||f||v.keyPrefix;var S=h.options.keySeparator||".",g=m.keyPrefix?"".concat(m.keyPrefix).concat(S).concat(_):_;return h.t(g,m)};return typeof o=="string"?p.lng=o:p.lngs=o,p.ns=a,p.keyPrefix=f,p}},{key:"t",value:function(){var o;return this.translator&&(o=this.translator).translate.apply(o,arguments)}},{key:"exists",value:function(){var o;return this.translator&&(o=this.translator).exists.apply(o,arguments)}},{key:"setDefaultNamespace",value:function(o){this.options.defaultNS=o}},{key:"hasLoadedNamespace",value:function(o){var a=this,f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var h=this.resolvedLanguage||this.languages[0],p=this.options?this.options.fallbackLng:!1,v=this.languages[this.languages.length-1];if(h.toLowerCase()==="cimode")return!0;var _=function(x,U){var R=a.services.backendConnector.state["".concat(x,"|").concat(U)];return R===-1||R===2};if(f.precheck){var y=f.precheck(this,_);if(y!==void 0)return y}return!!(this.hasResourceBundle(h,o)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||_(h,o)&&(!p||_(v,o)))}},{key:"loadNamespaces",value:function(o,a){var f=this,h=mo();return this.options.ns?(typeof o=="string"&&(o=[o]),o.forEach(function(p){f.options.ns.indexOf(p)<0&&f.options.ns.push(p)}),this.loadResources(function(p){h.resolve(),a&&a(p)}),h):(a&&a(),Promise.resolve())}},{key:"loadLanguages",value:function(o,a){var f=mo();typeof o=="string"&&(o=[o]);var h=this.options.preload||[],p=o.filter(function(v){return h.indexOf(v)<0});return p.length?(this.options.preload=h.concat(p),this.loadResources(function(v){f.resolve(),a&&a(v)}),f):(a&&a(),Promise.resolve())}},{key:"dir",value:function(o){if(o||(o=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!o)return"rtl";var a=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"];return a.indexOf(this.services.languageUtils.getLanguagePartFromCode(o))>-1||o.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var o=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Qa,h=Hi(Hi(Hi({},this.options),a),{isClone:!0}),p=new r(h);(a.debug!==void 0||a.prefix!==void 0)&&(p.logger=p.logger.clone(a));var v=["store","services","language"];return v.forEach(function(_){p[_]=o[_]}),p.services=Hi({},this.services),p.services.utils={hasLoadedNamespace:p.hasLoadedNamespace.bind(p)},p.translator=new jd(p.services,p.options),p.translator.on("*",function(_){for(var y=arguments.length,m=new Array(y>1?y-1:0),x=1;x<y;x++)m[x-1]=arguments[x];p.emit.apply(p,[_].concat(m))}),p.init(h,f),p.translator.options=p.options,p.translator.backendConnector.services.utils={hasLoadedNamespace:p.hasLoadedNamespace.bind(p)},p}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),r}(zr);Yr(kl,"createInstance",function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new kl(e,t)});var Ct=kl.createInstance();Ct.createInstance=kl.createInstance;Ct.createInstance;Ct.init;Ct.loadResources;Ct.reloadResources;Ct.use;Ct.changeLanguage;Ct.getFixedT;Ct.t;Ct.exists;Ct.setDefaultNamespace;Ct.hasLoadedNamespace;Ct.loadNamespaces;Ct.loadLanguages;var Cm=[],lb=Cm.forEach,ub=Cm.slice;function fb(e){return lb.call(ub.call(arguments,1),function(t){if(t)for(var r in t)e[r]===void 0&&(e[r]=t[r])}),e}var Yd=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,cb=function(t,r,n){var o=n||{};o.path=o.path||"/";var a=encodeURIComponent(r),f="".concat(t,"=").concat(a);if(o.maxAge>0){var h=o.maxAge-0;if(Number.isNaN(h))throw new Error("maxAge should be a Number");f+="; Max-Age=".concat(Math.floor(h))}if(o.domain){if(!Yd.test(o.domain))throw new TypeError("option domain is invalid");f+="; Domain=".concat(o.domain)}if(o.path){if(!Yd.test(o.path))throw new TypeError("option path is invalid");f+="; Path=".concat(o.path)}if(o.expires){if(typeof o.expires.toUTCString!="function")throw new TypeError("option expires is invalid");f+="; Expires=".concat(o.expires.toUTCString())}if(o.httpOnly&&(f+="; HttpOnly"),o.secure&&(f+="; Secure"),o.sameSite){var p=typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite;switch(p){case!0:f+="; SameSite=Strict";break;case"lax":f+="; SameSite=Lax";break;case"strict":f+="; SameSite=Strict";break;case"none":f+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return f},Hd={create:function(t,r,n,o){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(a.expires=new Date,a.expires.setTime(a.expires.getTime()+n*60*1e3)),o&&(a.domain=o),document.cookie=cb(t,encodeURIComponent(r),a)},read:function(t){for(var r="".concat(t,"="),n=document.cookie.split(";"),o=0;o<n.length;o++){for(var a=n[o];a.charAt(0)===" ";)a=a.substring(1,a.length);if(a.indexOf(r)===0)return a.substring(r.length,a.length)}return null},remove:function(t){this.create(t,"",-1)}},hb={name:"cookie",lookup:function(t){var r;if(t.lookupCookie&&typeof document<"u"){var n=Hd.read(t.lookupCookie);n&&(r=n)}return r},cacheUserLanguage:function(t,r){r.lookupCookie&&typeof document<"u"&&Hd.create(r.lookupCookie,t,r.cookieMinutes,r.cookieDomain,r.cookieOptions)}},pb={name:"querystring",lookup:function(t){var r;if(typeof window<"u"){var n=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));for(var o=n.substring(1),a=o.split("&"),f=0;f<a.length;f++){var h=a[f].indexOf("=");if(h>0){var p=a[f].substring(0,h);p===t.lookupQuerystring&&(r=a[f].substring(h+1))}}}return r}},vo=null,Zd=function(){if(vo!==null)return vo;try{vo=window!=="undefined"&&window.localStorage!==null;var t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{vo=!1}return vo},db={name:"localStorage",lookup:function(t){var r;if(t.lookupLocalStorage&&Zd()){var n=window.localStorage.getItem(t.lookupLocalStorage);n&&(r=n)}return r},cacheUserLanguage:function(t,r){r.lookupLocalStorage&&Zd()&&window.localStorage.setItem(r.lookupLocalStorage,t)}},_o=null,$d=function(){if(_o!==null)return _o;try{_o=window!=="undefined"&&window.sessionStorage!==null;var t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{_o=!1}return _o},gb={name:"sessionStorage",lookup:function(t){var r;if(t.lookupSessionStorage&&$d()){var n=window.sessionStorage.getItem(t.lookupSessionStorage);n&&(r=n)}return r},cacheUserLanguage:function(t,r){r.lookupSessionStorage&&$d()&&window.sessionStorage.setItem(r.lookupSessionStorage,t)}},yb={name:"navigator",lookup:function(t){var r=[];if(typeof navigator<"u"){if(navigator.languages)for(var n=0;n<navigator.languages.length;n++)r.push(navigator.languages[n]);navigator.userLanguage&&r.push(navigator.userLanguage),navigator.language&&r.push(navigator.language)}return r.length>0?r:void 0}},mb={name:"htmlTag",lookup:function(t){var r,n=t.htmlTag||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(r=n.getAttribute("lang")),r}},vb={name:"path",lookup:function(t){var r;if(typeof window<"u"){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(n instanceof Array)if(typeof t.lookupFromPathIndex=="number"){if(typeof n[t.lookupFromPathIndex]!="string")return;r=n[t.lookupFromPathIndex].replace("/","")}else r=n[0].replace("/","")}return r}},_b={name:"subdomain",lookup:function(t){var r=typeof t.lookupFromSubdomainIndex=="number"?t.lookupFromSubdomainIndex+1:1,n=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[r]}};function wb(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}}var Tm=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Wi(this,e),this.type="languageDetector",this.detectors={},this.init(t,r)}return Ki(e,[{key:"init",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=r,this.options=fb(n,this.options||{},wb()),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=o,this.addDetector(hb),this.addDetector(pb),this.addDetector(db),this.addDetector(gb),this.addDetector(yb),this.addDetector(mb),this.addDetector(vb),this.addDetector(_b)}},{key:"addDetector",value:function(r){this.detectors[r.name]=r}},{key:"detect",value:function(r){var n=this;r||(r=this.options.order);var o=[];return r.forEach(function(a){if(n.detectors[a]){var f=n.detectors[a].lookup(n.options);f&&typeof f=="string"&&(f=[f]),f&&(o=o.concat(f))}}),this.services.languageUtils.getBestMatchFromCodes?o:o.length>0?o[0]:null}},{key:"cacheUserLanguage",value:function(r,n){var o=this;n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(r)>-1||n.forEach(function(a){o.detectors[a]&&o.detectors[a].cacheUserLanguage(r,o.options)}))}}]),e}();Tm.type="languageDetector";const Em={en:{translation:{"language-name":"english",toolbar:{run:"Run all code (ctrl+shift+enter)",upload:"upload to gallery",clear:"clear all",shuffle:"show random sketch",random:"make random change","load-extension":"load library or extension","show-info":"show info window","hide-info":"hide info window"},info:{title:"hydra",subtitle:"live coding video synth",description:"Hydra is live code-able video synth and coding environment that runs directly in the browser. It is free and open-source and made for beginners and experts alike.","get-started-title":"To get started:","get-started-list":["Close this window","Change some numbers","Type Ctrl + Shift + Enter"],"description-detailed":"Hydra is written in JavaScript and compiles to WebGL under the hood. The syntax is inspired by analog modular synthesis, in which chaining or patching a set of transformations together generates a visual result.",uses:"Hydra can be used:","uses-list":["to mix and add effects to camera feeds, screenshares, live streams, and videos","to create generative and audio-reactive visuals, and share them online with others","in combination with other javascript libraries such as P5.js, Tone.js, THREE.js, or gibber","to add interactive video effects to a website","to experiment with and learn about video feedback, fractals, and pixel operations","to stream video between browsers and live-jam with others online"],author:"Created by <a {{author}}>olivia.</a>","more-info":"For more information and instructions, see: <a {{docs}}>the interactive documentation</a>, <a {{functions}}>a list of hydra functions</a>, <a {{garden}}>the community database of projects and tutorials</a>, <a {{gallery}}>a gallery of user-generated sketches</a>, and <a {{repo}}>the source code on github</a>,","more-info-forums":"There is also an active <a {{discord}}>Discord server</a> and <a {{facebook}}>facebook group</a> for hydra users+contributors.",support:"If you enjoy using Hydra, please consider <a {{open-collective}} >supporting continued development <3 </a>."},extensions:{"about-extensions":"Show community extensions for hydra-synth.","show-example":"Load and run {{extension-name}} example.","show-library":"Add code for loading {{extension-name}} to the top of the current sketch.","show-docs":"Documentation of usage for {{extension-name}}"}}}},bb=["ja","es","ar","id","pt-br","ch","ko","fr","de"],xb=e=>`https://raw.githubusercontent.com/hydra-synth/l10n/main/${e}/editor.json`;Ct.use(Tm).init({debug:!0,fallbackLng:"en",partialBundledLanguages:!0,resources:Em});function Sb(e,t){const r={};let n=new URLSearchParams(window.location.search),o=n.get("l10n-lang"),a=n.get("l10n-url");bb.forEach(p=>{h(p,xb(p))}),o!==null&&a!==null&&h(o,a),f(),t.on("set language",p=>{Ct.changeLanguage(p,(v,_)=>{e.translation.selectedLanguage=p,t.emit("render")})});function f(){Object.keys(Em).forEach(p=>{const v=p.split("-")[0];r[v]=Ct.getFixedT(v)("language-name")}),e.translation={t:Ct.t,languages:r,selectedLanguage:Ct.language,textDirection:Ct.language==="ar"?"rtl":"ltr"}}function h(p="es",v){const _="color: purple; background: orange; font-size: 14px;padding:10px";console.log(`%cloading translation for ${p} from ${v}`,_),fetch(v).then(y=>y.ok?y.json():y.text().then(m=>{throw new Error(m)})).then(y=>{window.i18n=Ct,console.log("adding language",p,y);const m=p.split("-")[0];Ct.addResourceBundle(m,"translation",y),f(),t.emit("render")})}}const Mb="https://raw.githubusercontent.com/hydra-synth/hydra-extensions/main/";async function Cb(e,t){e.extensions={baseURL:Mb,selectedCategoryIndex:0,categories:[{name:"extensions",slug:"extensions",entries:[],hasLoaded:!1},{name:"external libraries",slug:"external-libraries",entries:[],hasLoaded:!1},{name:"examples",slug:"examples",entries:[],hasLoaded:!1}]},t.on("extensions: select category",(r=e.extensions.selectedCategoryIndex)=>{e.extensions.selectedCategoryIndex=r,t.emit("render");const n=e.extensions.categories[r];if(!n.hasLoaded){const o=e.extensions.baseURL+n.slug+".json?laskd";fetch(o).then(a=>a.json()).then(a=>{console.log("loaded d",a),a.forEach(f=>{f.thumbnail=e.extensions.baseURL+"thumbnails/"+f.thumbnail}),n.entries=a,t.emit("render")})}}),t.on("extensions: add to editor",r=>{const{categories:n,selectedCategoryIndex:o}=e.extensions,a=n[o].entries[r].load;t.emit("editor: add code to top",a)}),t.on("extensions: load example",(r,n)=>{const{categories:o,selectedCategoryIndex:a}=e.extensions,f=o[a].entries[r].examples[n],h=new URL(f);console.log(h,e.gallery),e.gallery.setSketchFromURL(h.search,p=>{t.emit("load and eval code",p)})})}function Tb(e,t){t.on("editor: randomize",function(r){const n=e.editor.editor;r.shiftKey?n.mutator.doUndo():(n.mutator.mutate({reroll:!1,changeTransform:r.metaKey}),n.formatCode(),t.emit("gallery: save to URL",n.getValue()))}),t.on("editor: add code to top",r=>{e.editor.editor.addCodeToTop(r)}),t.on("editor: format code",()=>{e.editor.editor.formatCode()}),t.on("editor: load code",r=>{e.editor.editor.setValue(r)}),t.on("editor: eval all",function(){const r=e.editor.editor,n=r.getValue();t.emit("repl: eval",n,(o,a)=>{r.flashCode(),a||t.emit("gallery: save to URL",n)})})}var pc={exports:{}},km={exports:{}};(function(e){e.exports=t;function t(n){if(n)return r(n)}function r(n){for(var o in t.prototype)n[o]=t.prototype[o];return n}t.prototype.on=t.prototype.addEventListener=function(n,o){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(o),this},t.prototype.once=function(n,o){function a(){this.off(n,a),o.apply(this,arguments)}return a.fn=o,this.on(n,a),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(n,o){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var a=this._callbacks["$"+n];if(!a)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var f,h=0;h<a.length;h++)if(f=a[h],f===o||f.fn===o){a.splice(h,1);break}return a.length===0&&delete this._callbacks["$"+n],this},t.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var o=new Array(arguments.length-1),a=this._callbacks["$"+n],f=1;f<arguments.length;f++)o[f-1]=arguments[f];if(a){a=a.slice(0);for(var f=0,h=a.length;f<h;++f)a[f].apply(this,o)}return this},t.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]},t.prototype.hasListeners=function(n){return!!this.listeners(n).length}})(km);var Cn=km.exports,Eb=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;t[r]=o;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var f=Object.getOwnPropertyDescriptor(t,r);if(f.value!==o||f.enumerable!==!0)return!1}return!0},Xd=typeof Symbol<"u"&&Symbol,kb=Eb,Ab=function(){return typeof Xd!="function"||typeof Symbol!="function"||typeof Xd("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:kb()},qd={foo:{}},Rb=Object,Lb=function(){return{__proto__:qd}.foo===qd.foo&&!({__proto__:null}instanceof Rb)},Ub="Function.prototype.bind called on incompatible ",sf=Array.prototype.slice,Ib=Object.prototype.toString,Jb="[object Function]",Nb=function(t){var r=this;if(typeof r!="function"||Ib.call(r)!==Jb)throw new TypeError(Ub+r);for(var n=sf.call(arguments,1),o,a=function(){if(this instanceof o){var _=r.apply(this,n.concat(sf.call(arguments)));return Object(_)===_?_:this}else return r.apply(t,n.concat(sf.call(arguments)))},f=Math.max(0,r.length-n.length),h=[],p=0;p<f;p++)h.push("$"+p);if(o=Function("binder","return function ("+h.join(",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var v=function(){};v.prototype=r.prototype,o.prototype=new v,v.prototype=null}return o},Ob=Nb,th=Function.prototype.bind||Ob,Bb=th,Fb=Bb.call(Function.call,Object.prototype.hasOwnProperty),Qe,ys=SyntaxError,Am=Function,cs=TypeError,of=function(e){try{return Am('"use strict"; return ('+e+").constructor;")()}catch{}},wn=Object.getOwnPropertyDescriptor;if(wn)try{wn({},"")}catch{wn=null}var af=function(){throw new cs},Db=wn?function(){try{return arguments.callee,af}catch{try{return wn(arguments,"callee").get}catch{return af}}}():af,Xn=Ab(),jb=Lb(),Dt=Object.getPrototypeOf||(jb?function(e){return e.__proto__}:null),os={},Pb=typeof Uint8Array>"u"||!Dt?Qe:Dt(Uint8Array),bn={"%AggregateError%":typeof AggregateError>"u"?Qe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Qe:ArrayBuffer,"%ArrayIteratorPrototype%":Xn&&Dt?Dt([][Symbol.iterator]()):Qe,"%AsyncFromSyncIteratorPrototype%":Qe,"%AsyncFunction%":os,"%AsyncGenerator%":os,"%AsyncGeneratorFunction%":os,"%AsyncIteratorPrototype%":os,"%Atomics%":typeof Atomics>"u"?Qe:Atomics,"%BigInt%":typeof BigInt>"u"?Qe:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Qe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Qe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Qe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?Qe:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Qe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Qe:FinalizationRegistry,"%Function%":Am,"%GeneratorFunction%":os,"%Int8Array%":typeof Int8Array>"u"?Qe:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Qe:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Qe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Xn&&Dt?Dt(Dt([][Symbol.iterator]())):Qe,"%JSON%":typeof JSON=="object"?JSON:Qe,"%Map%":typeof Map>"u"?Qe:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Xn||!Dt?Qe:Dt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Qe:Promise,"%Proxy%":typeof Proxy>"u"?Qe:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?Qe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Qe:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Xn||!Dt?Qe:Dt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Qe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Xn&&Dt?Dt(""[Symbol.iterator]()):Qe,"%Symbol%":Xn?Symbol:Qe,"%SyntaxError%":ys,"%ThrowTypeError%":Db,"%TypedArray%":Pb,"%TypeError%":cs,"%Uint8Array%":typeof Uint8Array>"u"?Qe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Qe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Qe:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Qe:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?Qe:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Qe:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Qe:WeakSet};if(Dt)try{null.error}catch(e){var Gb=Dt(Dt(e));bn["%Error.prototype%"]=Gb}var Wb=function e(t){var r;if(t==="%AsyncFunction%")r=of("async function () {}");else if(t==="%GeneratorFunction%")r=of("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=of("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&Dt&&(r=Dt(o.prototype))}return bn[t]=r,r},eg={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ia=th,Al=Fb,Kb=ia.call(Function.call,Array.prototype.concat),Vb=ia.call(Function.apply,Array.prototype.splice),tg=ia.call(Function.call,String.prototype.replace),Rl=ia.call(Function.call,String.prototype.slice),zb=ia.call(Function.call,RegExp.prototype.exec),Qb=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Yb=/\\(\\)?/g,Hb=function(t){var r=Rl(t,0,1),n=Rl(t,-1);if(r==="%"&&n!=="%")throw new ys("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new ys("invalid intrinsic syntax, expected opening `%`");var o=[];return tg(t,Qb,function(a,f,h,p){o[o.length]=h?tg(p,Yb,"$1"):f||a}),o},Zb=function(t,r){var n=t,o;if(Al(eg,n)&&(o=eg[n],n="%"+o[0]+"%"),Al(bn,n)){var a=bn[n];if(a===os&&(a=Wb(n)),typeof a>"u"&&!r)throw new cs("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:a}}throw new ys("intrinsic "+t+" does not exist!")},ih=function(t,r){if(typeof t!="string"||t.length===0)throw new cs("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new cs('"allowMissing" argument must be a boolean');if(zb(/^%?[^%]*%?$/,t)===null)throw new ys("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Hb(t),o=n.length>0?n[0]:"",a=Zb("%"+o+"%",r),f=a.name,h=a.value,p=!1,v=a.alias;v&&(o=v[0],Vb(n,Kb([0,1],v)));for(var _=1,y=!0;_<n.length;_+=1){var m=n[_],x=Rl(m,0,1),U=Rl(m,-1);if((x==='"'||x==="'"||x==="`"||U==='"'||U==="'"||U==="`")&&x!==U)throw new ys("property names with quotes must have matching quotes");if((m==="constructor"||!y)&&(p=!0),o+="."+m,f="%"+o+"%",Al(bn,f))h=bn[f];else if(h!=null){if(!(m in h)){if(!r)throw new cs("base intrinsic for "+t+" exists, but the property is not available.");return}if(wn&&_+1>=n.length){var R=wn(h,m);y=!!R,y&&"get"in R&&!("originalValue"in R.get)?h=R.get:h=h[m]}else y=Al(h,m),h=h[m];y&&!p&&(bn[f]=h)}}return h},Rm={exports:{}};(function(e){var t=th,r=ih,n=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),a=r("%Reflect.apply%",!0)||t.call(o,n),f=r("%Object.getOwnPropertyDescriptor%",!0),h=r("%Object.defineProperty%",!0),p=r("%Math.max%");if(h)try{h({},"a",{value:1})}catch{h=null}e.exports=function(y){var m=a(t,o,arguments);if(f&&h){var x=f(m,"length");x.configurable&&h(m,"length",{value:1+p(0,y.length-(arguments.length-1))})}return m};var v=function(){return a(t,n,arguments)};h?h(e.exports,"apply",{value:v}):e.exports.apply=v})(Rm);var $b=Rm.exports,Lm=ih,Um=$b,Xb=Um(Lm("String.prototype.indexOf")),qb=function(t,r){var n=Lm(t,!!r);return typeof n=="function"&&Xb(t,".prototype.")>-1?Um(n):n};const ex={},tx=Object.freeze(Object.defineProperty({__proto__:null,default:ex},Symbol.toStringTag,{value:"Module"})),bs=L_(tx);var rh=typeof Map=="function"&&Map.prototype,lf=Object.getOwnPropertyDescriptor&&rh?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ll=rh&&lf&&typeof lf.get=="function"?lf.get:null,ig=rh&&Map.prototype.forEach,nh=typeof Set=="function"&&Set.prototype,uf=Object.getOwnPropertyDescriptor&&nh?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Ul=nh&&uf&&typeof uf.get=="function"?uf.get:null,rg=nh&&Set.prototype.forEach,ix=typeof WeakMap=="function"&&WeakMap.prototype,Lo=ix?WeakMap.prototype.has:null,rx=typeof WeakSet=="function"&&WeakSet.prototype,Uo=rx?WeakSet.prototype.has:null,nx=typeof WeakRef=="function"&&WeakRef.prototype,ng=nx?WeakRef.prototype.deref:null,sx=Boolean.prototype.valueOf,ox=Object.prototype.toString,ax=Function.prototype.toString,lx=String.prototype.match,sh=String.prototype.slice,jr=String.prototype.replace,ux=String.prototype.toUpperCase,sg=String.prototype.toLowerCase,Im=RegExp.prototype.test,og=Array.prototype.concat,Xi=Array.prototype.join,fx=Array.prototype.slice,ag=Math.floor,dc=typeof BigInt=="function"?BigInt.prototype.valueOf:null,ff=Object.getOwnPropertySymbols,gc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ms=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Yt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ms||"symbol")?Symbol.toStringTag:null,Jm=Object.prototype.propertyIsEnumerable,lg=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function ug(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Im.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-ag(-e):ag(e);if(n!==e){var o=String(n),a=sh.call(t,o.length+1);return jr.call(o,r,"$&_")+"."+jr.call(jr.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return jr.call(t,r,"$&_")}var yc=bs,fg=yc.custom,cg=Om(fg)?fg:null,cx=function e(t,r,n,o){var a=r||{};if(Br(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Br(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var f=Br(a,"customInspect")?a.customInspect:!0;if(typeof f!="boolean"&&f!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Br(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Br(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var h=a.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Fm(t,a);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var p=String(t);return h?ug(t,p):p}if(typeof t=="bigint"){var v=String(t)+"n";return h?ug(t,v):v}var _=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=_&&_>0&&typeof t=="object")return mc(t)?"[Array]":"[Object]";var y=Ax(a,n);if(typeof o>"u")o=[];else if(Bm(o,t)>=0)return"[Circular]";function m(ce,ye,re){if(ye&&(o=fx.call(o),o.push(ye)),re){var ie={depth:a.depth};return Br(a,"quoteStyle")&&(ie.quoteStyle=a.quoteStyle),e(ce,ie,n+1,o)}return e(ce,a,n+1,o)}if(typeof t=="function"&&!hg(t)){var x=wx(t),U=Ya(t,m);return"[Function"+(x?": "+x:" (anonymous)")+"]"+(U.length>0?" { "+Xi.call(U,", ")+" }":"")}if(Om(t)){var R=ms?jr.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):gc.call(t);return typeof t=="object"&&!ms?wo(R):R}if(Tx(t)){for(var S="<"+sg.call(String(t.nodeName)),g=t.attributes||[],L=0;L<g.length;L++)S+=" "+g[L].name+"="+Nm(hx(g[L].value),"double",a);return S+=">",t.childNodes&&t.childNodes.length&&(S+="..."),S+="</"+sg.call(String(t.nodeName))+">",S}if(mc(t)){if(t.length===0)return"[]";var G=Ya(t,m);return y&&!kx(G)?"["+vc(G,y)+"]":"[ "+Xi.call(G,", ")+" ]"}if(dx(t)){var O=Ya(t,m);return!("cause"in Error.prototype)&&"cause"in t&&!Jm.call(t,"cause")?"{ ["+String(t)+"] "+Xi.call(og.call("[cause]: "+m(t.cause),O),", ")+" }":O.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Xi.call(O,", ")+" }"}if(typeof t=="object"&&f){if(cg&&typeof t[cg]=="function"&&yc)return yc(t,{depth:_-n});if(f!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(bx(t)){var P=[];return ig&&ig.call(t,function(ce,ye){P.push(m(ye,t,!0)+" => "+m(ce,t))}),pg("Map",Ll.call(t),P,y)}if(Mx(t)){var F=[];return rg&&rg.call(t,function(ce){F.push(m(ce,t))}),pg("Set",Ul.call(t),F,y)}if(xx(t))return cf("WeakMap");if(Cx(t))return cf("WeakSet");if(Sx(t))return cf("WeakRef");if(yx(t))return wo(m(Number(t)));if(vx(t))return wo(m(dc.call(t)));if(mx(t))return wo(sx.call(t));if(gx(t))return wo(m(String(t)));if(!px(t)&&!hg(t)){var V=Ya(t,m),D=lg?lg(t)===Object.prototype:t instanceof Object||t.constructor===Object,ee=t instanceof Object?"":"null prototype",A=!D&&Yt&&Object(t)===t&&Yt in t?sh.call(Hr(t),8,-1):ee?"Object":"",q=D||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",$=q+(A||ee?"["+Xi.call(og.call([],A||[],ee||[]),": ")+"] ":"");return V.length===0?$+"{}":y?$+"{"+vc(V,y)+"}":$+"{ "+Xi.call(V,", ")+" }"}return String(t)};function Nm(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function hx(e){return jr.call(String(e),/"/g,""")}function mc(e){return Hr(e)==="[object Array]"&&(!Yt||!(typeof e=="object"&&Yt in e))}function px(e){return Hr(e)==="[object Date]"&&(!Yt||!(typeof e=="object"&&Yt in e))}function hg(e){return Hr(e)==="[object RegExp]"&&(!Yt||!(typeof e=="object"&&Yt in e))}function dx(e){return Hr(e)==="[object Error]"&&(!Yt||!(typeof e=="object"&&Yt in e))}function gx(e){return Hr(e)==="[object String]"&&(!Yt||!(typeof e=="object"&&Yt in e))}function yx(e){return Hr(e)==="[object Number]"&&(!Yt||!(typeof e=="object"&&Yt in e))}function mx(e){return Hr(e)==="[object Boolean]"&&(!Yt||!(typeof e=="object"&&Yt in e))}function Om(e){if(ms)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!gc)return!1;try{return gc.call(e),!0}catch{}return!1}function vx(e){if(!e||typeof e!="object"||!dc)return!1;try{return dc.call(e),!0}catch{}return!1}var _x=Object.prototype.hasOwnProperty||function(e){return e in this};function Br(e,t){return _x.call(e,t)}function Hr(e){return ox.call(e)}function wx(e){if(e.name)return e.name;var t=lx.call(ax.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Bm(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function bx(e){if(!Ll||!e||typeof e!="object")return!1;try{Ll.call(e);try{Ul.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function xx(e){if(!Lo||!e||typeof e!="object")return!1;try{Lo.call(e,Lo);try{Uo.call(e,Uo)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function Sx(e){if(!ng||!e||typeof e!="object")return!1;try{return ng.call(e),!0}catch{}return!1}function Mx(e){if(!Ul||!e||typeof e!="object")return!1;try{Ul.call(e);try{Ll.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function Cx(e){if(!Uo||!e||typeof e!="object")return!1;try{Uo.call(e,Uo);try{Lo.call(e,Lo)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function Tx(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Fm(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Fm(sh.call(e,0,t.maxStringLength),t)+n}var o=jr.call(jr.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Ex);return Nm(o,"single",t)}function Ex(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+ux.call(t.toString(16))}function wo(e){return"Object("+e+")"}function cf(e){return e+" { ? }"}function pg(e,t,r,n){var o=n?vc(r,n):Xi.call(r,", ");return e+" ("+t+") {"+o+"}"}function kx(e){for(var t=0;t<e.length;t++)if(Bm(e[t],`
|
||
`)>=0)return!1;return!0}function Ax(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=Xi.call(Array(e.indent+1)," ");else return null;return{base:r,prev:Xi.call(Array(t+1),r)}}function vc(e,t){if(e.length===0)return"";var r=`
|
||
`+t.prev+t.base;return r+Xi.call(e,","+r)+`
|
||
`+t.prev}function Ya(e,t){var r=mc(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=Br(e,o)?t(e[o],e):""}var a=typeof ff=="function"?ff(e):[],f;if(ms){f={};for(var h=0;h<a.length;h++)f["$"+a[h]]=a[h]}for(var p in e)Br(e,p)&&(r&&String(Number(p))===p&&p<e.length||ms&&f["$"+p]instanceof Symbol||(Im.call(/[^\w$]/,p)?n.push(t(p,e)+": "+t(e[p],e)):n.push(p+": "+t(e[p],e))));if(typeof ff=="function")for(var v=0;v<a.length;v++)Jm.call(e,a[v])&&n.push("["+t(a[v])+"]: "+t(e[a[v]],e));return n}var oh=ih,xs=qb,Rx=cx,Lx=oh("%TypeError%"),Ha=oh("%WeakMap%",!0),Za=oh("%Map%",!0),Ux=xs("WeakMap.prototype.get",!0),Ix=xs("WeakMap.prototype.set",!0),Jx=xs("WeakMap.prototype.has",!0),Nx=xs("Map.prototype.get",!0),Ox=xs("Map.prototype.set",!0),Bx=xs("Map.prototype.has",!0),ah=function(e,t){for(var r=e,n;(n=r.next)!==null;r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n},Fx=function(e,t){var r=ah(e,t);return r&&r.value},Dx=function(e,t,r){var n=ah(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},jx=function(e,t){return!!ah(e,t)},Px=function(){var t,r,n,o={assert:function(a){if(!o.has(a))throw new Lx("Side channel does not contain "+Rx(a))},get:function(a){if(Ha&&a&&(typeof a=="object"||typeof a=="function")){if(t)return Ux(t,a)}else if(Za){if(r)return Nx(r,a)}else if(n)return Fx(n,a)},has:function(a){if(Ha&&a&&(typeof a=="object"||typeof a=="function")){if(t)return Jx(t,a)}else if(Za){if(r)return Bx(r,a)}else if(n)return jx(n,a);return!1},set:function(a,f){Ha&&a&&(typeof a=="object"||typeof a=="function")?(t||(t=new Ha),Ix(t,a,f)):Za?(r||(r=new Za),Ox(r,a,f)):(n||(n={key:{},next:null}),Dx(n,a,f))}};return o},Gx=String.prototype.replace,Wx=/%20/g,hf={RFC1738:"RFC1738",RFC3986:"RFC3986"},lh={default:hf.RFC3986,formatters:{RFC1738:function(e){return Gx.call(e,Wx,"+")},RFC3986:function(e){return String(e)}},RFC1738:hf.RFC1738,RFC3986:hf.RFC3986},Kx=lh,pf=Object.prototype.hasOwnProperty,mn=Array.isArray,Zi=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Vx=function(t){for(;t.length>1;){var r=t.pop(),n=r.obj[r.prop];if(mn(n)){for(var o=[],a=0;a<n.length;++a)typeof n[a]<"u"&&o.push(n[a]);r.obj[r.prop]=o}}},Dm=function(t,r){for(var n=r&&r.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(n[o]=t[o]);return n},zx=function e(t,r,n){if(!r)return t;if(typeof r!="object"){if(mn(t))t.push(r);else if(t&&typeof t=="object")(n&&(n.plainObjects||n.allowPrototypes)||!pf.call(Object.prototype,r))&&(t[r]=!0);else return[t,r];return t}if(!t||typeof t!="object")return[t].concat(r);var o=t;return mn(t)&&!mn(r)&&(o=Dm(t,n)),mn(t)&&mn(r)?(r.forEach(function(a,f){if(pf.call(t,f)){var h=t[f];h&&typeof h=="object"&&a&&typeof a=="object"?t[f]=e(h,a,n):t.push(a)}else t[f]=a}),t):Object.keys(r).reduce(function(a,f){var h=r[f];return pf.call(a,f)?a[f]=e(a[f],h,n):a[f]=h,a},o)},Qx=function(t,r){return Object.keys(r).reduce(function(n,o){return n[o]=r[o],n},t)},Yx=function(e,t,r){var n=e.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},Hx=function(t,r,n,o,a){if(t.length===0)return t;var f=t;if(typeof t=="symbol"?f=Symbol.prototype.toString.call(t):typeof t!="string"&&(f=String(t)),n==="iso-8859-1")return escape(f).replace(/%u[0-9a-f]{4}/gi,function(_){return"%26%23"+parseInt(_.slice(2),16)+"%3B"});for(var h="",p=0;p<f.length;++p){var v=f.charCodeAt(p);if(v===45||v===46||v===95||v===126||v>=48&&v<=57||v>=65&&v<=90||v>=97&&v<=122||a===Kx.RFC1738&&(v===40||v===41)){h+=f.charAt(p);continue}if(v<128){h=h+Zi[v];continue}if(v<2048){h=h+(Zi[192|v>>6]+Zi[128|v&63]);continue}if(v<55296||v>=57344){h=h+(Zi[224|v>>12]+Zi[128|v>>6&63]+Zi[128|v&63]);continue}p+=1,v=65536+((v&1023)<<10|f.charCodeAt(p)&1023),h+=Zi[240|v>>18]+Zi[128|v>>12&63]+Zi[128|v>>6&63]+Zi[128|v&63]}return h},Zx=function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],o=0;o<r.length;++o)for(var a=r[o],f=a.obj[a.prop],h=Object.keys(f),p=0;p<h.length;++p){var v=h[p],_=f[v];typeof _=="object"&&_!==null&&n.indexOf(_)===-1&&(r.push({obj:f,prop:v}),n.push(_))}return Vx(r),t},$x=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},Xx=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},qx=function(t,r){return[].concat(t,r)},eS=function(t,r){if(mn(t)){for(var n=[],o=0;o<t.length;o+=1)n.push(r(t[o]));return n}return r(t)},jm={arrayToObject:Dm,assign:Qx,combine:qx,compact:Zx,decode:Yx,encode:Hx,isBuffer:Xx,isRegExp:$x,maybeMap:eS,merge:zx},Pm=Px,wl=jm,Io=lh,tS=Object.prototype.hasOwnProperty,dg={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,r){return t+"["+r+"]"},repeat:function(t){return t}},pr=Array.isArray,iS=Array.prototype.push,Gm=function(e,t){iS.apply(e,pr(t)?t:[t])},rS=Date.prototype.toISOString,gg=Io.default,zt={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:wl.encode,encodeValuesOnly:!1,format:gg,formatter:Io.formatters[gg],indices:!1,serializeDate:function(t){return rS.call(t)},skipNulls:!1,strictNullHandling:!1},nS=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},df={},sS=function e(t,r,n,o,a,f,h,p,v,_,y,m,x,U,R,S){for(var g=t,L=S,G=0,O=!1;(L=L.get(df))!==void 0&&!O;){var P=L.get(t);if(G+=1,typeof P<"u"){if(P===G)throw new RangeError("Cyclic object value");O=!0}typeof L.get(df)>"u"&&(G=0)}if(typeof p=="function"?g=p(r,g):g instanceof Date?g=y(g):n==="comma"&&pr(g)&&(g=wl.maybeMap(g,function(ie){return ie instanceof Date?y(ie):ie})),g===null){if(a)return h&&!U?h(r,zt.encoder,R,"key",m):r;g=""}if(nS(g)||wl.isBuffer(g)){if(h){var F=U?r:h(r,zt.encoder,R,"key",m);return[x(F)+"="+x(h(g,zt.encoder,R,"value",m))]}return[x(r)+"="+x(String(g))]}var V=[];if(typeof g>"u")return V;var D;if(n==="comma"&&pr(g))U&&h&&(g=wl.maybeMap(g,h)),D=[{value:g.length>0?g.join(",")||null:void 0}];else if(pr(p))D=p;else{var ee=Object.keys(g);D=v?ee.sort(v):ee}for(var A=o&&pr(g)&&g.length===1?r+"[]":r,q=0;q<D.length;++q){var $=D[q],ce=typeof $=="object"&&typeof $.value<"u"?$.value:g[$];if(!(f&&ce===null)){var ye=pr(g)?typeof n=="function"?n(A,$):A:A+(_?"."+$:"["+$+"]");S.set(t,G);var re=Pm();re.set(df,S),Gm(V,e(ce,ye,n,o,a,f,n==="comma"&&U&&pr(g)?null:h,p,v,_,y,m,x,U,R,re))}}return V},oS=function(t){if(!t)return zt;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=t.charset||zt.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=Io.default;if(typeof t.format<"u"){if(!tS.call(Io.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var o=Io.formatters[n],a=zt.filter;return(typeof t.filter=="function"||pr(t.filter))&&(a=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:zt.addQueryPrefix,allowDots:typeof t.allowDots>"u"?zt.allowDots:!!t.allowDots,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:zt.charsetSentinel,delimiter:typeof t.delimiter>"u"?zt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:zt.encode,encoder:typeof t.encoder=="function"?t.encoder:zt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:zt.encodeValuesOnly,filter:a,format:n,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:zt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:zt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:zt.strictNullHandling}},aS=function(e,t){var r=e,n=oS(t),o,a;typeof n.filter=="function"?(a=n.filter,r=a("",r)):pr(n.filter)&&(a=n.filter,o=a);var f=[];if(typeof r!="object"||r===null)return"";var h;t&&t.arrayFormat in dg?h=t.arrayFormat:t&&"indices"in t?h=t.indices?"indices":"repeat":h="indices";var p=dg[h];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var v=p==="comma"&&t&&t.commaRoundTrip;o||(o=Object.keys(r)),n.sort&&o.sort(n.sort);for(var _=Pm(),y=0;y<o.length;++y){var m=o[y];n.skipNulls&&r[m]===null||Gm(f,sS(r[m],m,p,v,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,_))}var x=f.join(n.delimiter),U=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?U+="utf8=%26%2310003%3B&":U+="utf8=%E2%9C%93&"),x.length>0?U+x:""},vs=jm,_c=Object.prototype.hasOwnProperty,lS=Array.isArray,Ft={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:vs.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},uS=function(e){return e.replace(/&#(\d+);/g,function(t,r){return String.fromCharCode(parseInt(r,10))})},Wm=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},fS="utf8=%26%2310003%3B",cS="utf8=%E2%9C%93",hS=function(t,r){var n={__proto__:null},o=r.ignoreQueryPrefix?t.replace(/^\?/,""):t,a=r.parameterLimit===1/0?void 0:r.parameterLimit,f=o.split(r.delimiter,a),h=-1,p,v=r.charset;if(r.charsetSentinel)for(p=0;p<f.length;++p)f[p].indexOf("utf8=")===0&&(f[p]===cS?v="utf-8":f[p]===fS&&(v="iso-8859-1"),h=p,p=f.length);for(p=0;p<f.length;++p)if(p!==h){var _=f[p],y=_.indexOf("]="),m=y===-1?_.indexOf("="):y+1,x,U;m===-1?(x=r.decoder(_,Ft.decoder,v,"key"),U=r.strictNullHandling?null:""):(x=r.decoder(_.slice(0,m),Ft.decoder,v,"key"),U=vs.maybeMap(Wm(_.slice(m+1),r),function(R){return r.decoder(R,Ft.decoder,v,"value")})),U&&r.interpretNumericEntities&&v==="iso-8859-1"&&(U=uS(U)),_.indexOf("[]=")>-1&&(U=lS(U)?[U]:U),_c.call(n,x)?n[x]=vs.combine(n[x],U):n[x]=U}return n},pS=function(e,t,r,n){for(var o=n?t:Wm(t,r),a=e.length-1;a>=0;--a){var f,h=e[a];if(h==="[]"&&r.parseArrays)f=[].concat(o);else{f=r.plainObjects?Object.create(null):{};var p=h.charAt(0)==="["&&h.charAt(h.length-1)==="]"?h.slice(1,-1):h,v=parseInt(p,10);!r.parseArrays&&p===""?f={0:o}:!isNaN(v)&&h!==p&&String(v)===p&&v>=0&&r.parseArrays&&v<=r.arrayLimit?(f=[],f[v]=o):p!=="__proto__"&&(f[p]=o)}o=f}return o},dS=function(t,r,n,o){if(t){var a=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,f=/(\[[^[\]]*])/,h=/(\[[^[\]]*])/g,p=n.depth>0&&f.exec(a),v=p?a.slice(0,p.index):a,_=[];if(v){if(!n.plainObjects&&_c.call(Object.prototype,v)&&!n.allowPrototypes)return;_.push(v)}for(var y=0;n.depth>0&&(p=h.exec(a))!==null&&y<n.depth;){if(y+=1,!n.plainObjects&&_c.call(Object.prototype,p[1].slice(1,-1))&&!n.allowPrototypes)return;_.push(p[1])}return p&&_.push("["+a.slice(p.index)+"]"),pS(_,r,n,o)}},gS=function(t){if(!t)return Ft;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof t.charset>"u"?Ft.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Ft.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Ft.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Ft.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Ft.arrayLimit,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ft.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Ft.comma,decoder:typeof t.decoder=="function"?t.decoder:Ft.decoder,delimiter:typeof t.delimiter=="string"||vs.isRegExp(t.delimiter)?t.delimiter:Ft.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Ft.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Ft.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Ft.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Ft.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ft.strictNullHandling}},yS=function(e,t){var r=gS(t);if(e===""||e===null||typeof e>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof e=="string"?hS(e,r):e,o=r.plainObjects?Object.create(null):{},a=Object.keys(n),f=0;f<a.length;++f){var h=a[f],p=dS(h,n[h],r,typeof e=="string");o=vs.merge(o,p,r)}return r.allowSparse===!0?o:vs.compact(o)},mS=aS,vS=yS,_S=lh,wS={formats:_S,parse:vS,stringify:mS},Yl={};(function(e){function t(a){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},t(a)}function r(a,f){var h=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(!h){if(Array.isArray(a)||(h=n(a))||f&&a&&typeof a.length=="number"){h&&(a=h);var p=0,v=function(){};return{s:v,n:function(){return p>=a.length?{done:!0}:{done:!1,value:a[p++]}},e:function(U){throw U},f:v}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var _=!0,y=!1,m;return{s:function(){h=h.call(a)},n:function(){var U=h.next();return _=U.done,U},e:function(U){y=!0,m=U},f:function(){try{!_&&h.return!=null&&h.return()}finally{if(y)throw m}}}}function n(a,f){if(a){if(typeof a=="string")return o(a,f);var h=Object.prototype.toString.call(a).slice(8,-1);if(h==="Object"&&a.constructor&&(h=a.constructor.name),h==="Map"||h==="Set")return Array.from(a);if(h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h))return o(a,f)}}function o(a,f){(f==null||f>a.length)&&(f=a.length);for(var h=0,p=new Array(f);h<f;h++)p[h]=a[h];return p}e.type=function(a){return a.split(/ *; */).shift()},e.params=function(a){var f={},h=r(a.split(/ *; */)),p;try{for(h.s();!(p=h.n()).done;){var v=p.value,_=v.split(/ *= */),y=_.shift(),m=_.shift();y&&m&&(f[y]=m)}}catch(x){h.e(x)}finally{h.f()}return f},e.parseLinks=function(a){var f={},h=r(a.split(/ *, */)),p;try{for(h.s();!(p=h.n()).done;){var v=p.value,_=v.split(/ *; */),y=_[0].slice(1,-1),m=_[1].split(/ *= */)[1].slice(1,-1);f[m]=y}}catch(x){h.e(x)}finally{h.f()}return f},e.cleanHeader=function(a,f){return delete a["content-type"],delete a["content-length"],delete a["transfer-encoding"],delete a.host,f&&(delete a.authorization,delete a.cookie),a},e.isObject=function(a){return a!==null&&t(a)==="object"},e.hasOwn=Object.hasOwn||function(a,f){if(a==null)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(new Object(a),f)},e.mixin=function(a,f){for(var h in f)e.hasOwn(f,h)&&(a[h]=f[h])}})(Yl);function wc(e){"@babel/helpers - typeof";return wc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wc(e)}var gf=bs,Km=Yl,Il=Km.isObject,Fo=Km.hasOwn,bS=st;function st(){}st.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this};st.prototype.parse=function(e){return this._parser=e,this};st.prototype.responseType=function(e){return this._responseType=e,this};st.prototype.serialize=function(e){return this._serializer=e,this};st.prototype.timeout=function(e){if(!e||wc(e)!=="object")return this._timeout=e,this._responseTimeout=0,this._uploadTimeout=0,this;for(var t in e)if(Fo(e,t))switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;case"upload":this._uploadTimeout=e.upload;break;default:console.warn("Unknown timeout option",t)}return this};st.prototype.retry=function(e,t){return(arguments.length===0||e===!0)&&(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};var xS=new Set(["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"]),SS=new Set([408,413,429,500,502,503,504,521,522,524]);st.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var r=this._retryCallback(e,t);if(r===!0)return!0;if(r===!1)return!1}catch(n){console.error(n)}return!!(t&&t.status&&SS.has(t.status)||e&&(e.code&&xS.has(e.code)||e.timeout&&e.code==="ECONNABORTED"||e.crossDomain))};st.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()};st.prototype.then=function(e,t){var r=this;if(!this._fullfilledPromise){var n=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(o,a){n.on("abort",function(){if(!(r._maxRetries&&r._maxRetries>r._retries)){if(r.timedout&&r.timedoutError){a(r.timedoutError);return}var f=new Error("Aborted");f.code="ABORTED",f.status=r.status,f.method=r.method,f.url=r.url,a(f)}}),n.end(function(f,h){f?a(f):o(h)})})}return this._fullfilledPromise.then(e,t)};st.prototype.catch=function(e){return this.then(void 0,e)};st.prototype.use=function(e){return e(this),this};st.prototype.ok=function(e){if(typeof e!="function")throw new Error("Callback required");return this._okCallback=e,this};st.prototype._isResponseOK=function(e){return e?this._okCallback?this._okCallback(e):e.status>=200&&e.status<300:!1};st.prototype.get=function(e){return this._header[e.toLowerCase()]};st.prototype.getHeader=st.prototype.get;st.prototype.set=function(e,t){if(Il(e)){for(var r in e)Fo(e,r)&&this.set(r,e[r]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this};st.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this};st.prototype.field=function(e,t,r){if(e==null)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(Il(e)){for(var n in e)Fo(e,n)&&this.field(n,e[n]);return this}if(Array.isArray(t)){for(var o in t)Fo(t,o)&&this.field(e,t[o]);return this}if(t==null)throw new Error(".field(name, val) val can not be empty");return typeof t=="boolean"&&(t=String(t)),r?this._getFormData().append(e,t,r):this._getFormData().append(e,t),this};st.prototype.abort=function(){if(this._aborted)return this;if(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req){if(gf.gte(process.version,"v13.0.0")&&gf.lt(process.version,"v14.0.0"))throw new Error("Superagent does not work in v13 properly with abort() due to Node.js core changes");gf.gte(process.version,"v14.0.0")&&(this.req.destroyed=!0),this.req.abort()}return this.clearTimeout(),this.emit("abort"),this};st.prototype._auth=function(e,t,r,n){switch(r.type){case"basic":this.set("Authorization","Basic ".concat(n("".concat(e,":").concat(t))));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer ".concat(e));break}return this};st.prototype.withCredentials=function(e){return e===void 0&&(e=!0),this._withCredentials=e,this};st.prototype.redirects=function(e){return this._maxRedirects=e,this};st.prototype.maxResponseSize=function(e){if(typeof e!="number")throw new TypeError("Invalid argument");return this._maxResponseSize=e,this};st.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}};st.prototype.send=function(e){var t=Il(e),r=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(t&&Il(this._data))for(var n in e)Fo(e,n)&&(this._data[n]=e[n]);else typeof e=="string"?(r||this.type("form"),r=this._header["content-type"],r&&(r=r.toLowerCase().trim()),r==="application/x-www-form-urlencoded"?this._data=this._data?"".concat(this._data,"&").concat(e):e:this._data=(this._data||"")+e):this._data=e;return!t||this._isHost(e)?this:(r||this.type("json"),this)};st.prototype.sortQuery=function(e){return this._sort=typeof e>"u"?!0:e,this};st.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.includes("?")?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var r=this.url.slice(t+1).split("&");typeof this._sort=="function"?r.sort(this._sort):r.sort(),this.url=this.url.slice(0,t)+"?"+r.join("&")}}};st.prototype._appendQueryString=function(){console.warn("Unsupported")};st.prototype._timeoutError=function(e,t,r){if(!this._aborted){var n=new Error("".concat(e+t,"ms exceeded"));n.timeout=t,n.code="ECONNABORTED",n.errno=r,this.timedout=!0,this.timedoutError=n,this.abort(),this.callback(n)}};st.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")},this._responseTimeout))};var yf=Yl,MS=Hl;function Hl(){}Hl.prototype.get=function(e){return this.header[e.toLowerCase()]};Hl.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=yf.type(t);var r=yf.params(t);for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(this[n]=r[n]);this.links={};try{e.link&&(this.links=yf.parseLinks(e.link))}catch{}};Hl.prototype._setStatusProperties=function(e){var t=Math.trunc(e/100);this.statusCode=e,this.status=this.statusCode,this.statusType=t,this.info=t===1,this.ok=t===2,this.redirect=t===3,this.clientError=t===4,this.serverError=t===5,this.error=t===4||t===5?this.toError():!1,this.created=e===201,this.accepted=e===202,this.noContent=e===204,this.badRequest=e===400,this.unauthorized=e===401,this.notAcceptable=e===406,this.forbidden=e===403,this.notFound=e===404,this.unprocessableEntity=e===422};function CS(e){return kS(e)||ES(e)||Vm(e)||TS()}function TS(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ES(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kS(e){if(Array.isArray(e))return bc(e)}function AS(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Vm(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(v){throw v},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,f=!1,h;return{s:function(){r=r.call(e)},n:function(){var v=r.next();return a=v.done,v},e:function(v){f=!0,h=v},f:function(){try{!a&&r.return!=null&&r.return()}finally{if(f)throw h}}}}function Vm(e,t){if(e){if(typeof e=="string")return bc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bc(e,t)}}function bc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function uh(){this._defaults=[]}var RS=function(){var t=zm[xc];uh.prototype[t]=function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return this._defaults.push({fn:t,args:n}),this}};for(var xc=0,zm=["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"];xc<zm.length;xc++)RS();uh.prototype._setDefaults=function(e){var t=AS(this._defaults),r;try{for(t.s();!(r=t.n()).done;){var n=r.value;e[n.fn].apply(e,CS(n.args))}}catch(o){t.e(o)}finally{t.f()}};var LS=uh;(function(e,t){function r(re){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ie){return typeof ie}:function(ie){return ie&&typeof Symbol=="function"&&ie.constructor===Symbol&&ie!==Symbol.prototype?"symbol":typeof ie},r(re)}function n(re,ie){var K=typeof Symbol<"u"&&re[Symbol.iterator]||re["@@iterator"];if(!K){if(Array.isArray(re)||(K=o(re))||ie&&re&&typeof re.length=="number"){K&&(re=K);var X=0,fe=function(){};return{s:fe,n:function(){return X>=re.length?{done:!0}:{done:!1,value:re[X++]}},e:function(Ie){throw Ie},f:fe}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Me=!0,we=!1,Re;return{s:function(){K=K.call(re)},n:function(){var Ie=K.next();return Me=Ie.done,Ie},e:function(Ie){we=!0,Re=Ie},f:function(){try{!Me&&K.return!=null&&K.return()}finally{if(we)throw Re}}}}function o(re,ie){if(re){if(typeof re=="string")return a(re,ie);var K=Object.prototype.toString.call(re).slice(8,-1);if(K==="Object"&&re.constructor&&(K=re.constructor.name),K==="Map"||K==="Set")return Array.from(re);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return a(re,ie)}}function a(re,ie){(ie==null||ie>re.length)&&(ie=re.length);for(var K=0,X=new Array(ie);K<ie;K++)X[K]=re[K];return X}var f;typeof window<"u"?f=window:typeof self>"u"?(console.warn("Using browser-only version of superagent in non-browser environment"),f=void 0):f=self;var h=Cn,p=yw,v=wS,_=bS,y=Yl,m=y.isObject,x=y.mixin,U=y.hasOwn,R=MS,S=LS;function g(){}e.exports=function(re,ie){return typeof ie=="function"?new t.Request("GET",re).end(ie):arguments.length===1?new t.Request("GET",re):new t.Request(re,ie)},t=e.exports;var L=t;t.Request=A,L.getXHR=function(){if(f.XMLHttpRequest&&(!f.location||f.location.protocol!=="file:"||!f.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch{}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch{}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch{}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch{}throw new Error("Browser-only version of superagent could not find XHR")};var G="".trim?function(re){return re.trim()}:function(re){return re.replace(/(^\s*|\s*$)/g,"")};function O(re){if(!m(re))return re;var ie=[];for(var K in re)U(re,K)&&P(ie,K,re[K]);return ie.join("&")}function P(re,ie,K){if(K!==void 0){if(K===null){re.push(encodeURI(ie));return}if(Array.isArray(K)){var X=n(K),fe;try{for(X.s();!(fe=X.n()).done;){var Me=fe.value;P(re,ie,Me)}}catch(Re){X.e(Re)}finally{X.f()}}else if(m(K))for(var we in K)U(K,we)&&P(re,"".concat(ie,"[").concat(we,"]"),K[we]);else re.push(encodeURI(ie)+"="+encodeURIComponent(K))}}L.serializeObject=O;function F(re){for(var ie={},K=re.split("&"),X,fe,Me=0,we=K.length;Me<we;++Me)X=K[Me],fe=X.indexOf("="),fe===-1?ie[decodeURIComponent(X)]="":ie[decodeURIComponent(X.slice(0,fe))]=decodeURIComponent(X.slice(fe+1));return ie}L.parseString=F,L.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},L.serialize={"application/x-www-form-urlencoded":v.stringify,"application/json":p},L.parse={"application/x-www-form-urlencoded":F,"application/json":JSON.parse};function V(re){for(var ie=re.split(/\r?\n/),K={},X,fe,Me,we,Re=0,ke=ie.length;Re<ke;++Re)fe=ie[Re],X=fe.indexOf(":"),X!==-1&&(Me=fe.slice(0,X).toLowerCase(),we=G(fe.slice(X+1)),K[Me]=we);return K}function D(re){return/[/+]json($|[^-\w])/i.test(re)}function ee(re){this.req=re,this.xhr=this.req.xhr,this.text=this.req.method!=="HEAD"&&(this.xhr.responseType===""||this.xhr.responseType==="text")||typeof this.xhr.responseType>"u"?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var ie=this.xhr.status;ie===1223&&(ie=204),this._setStatusProperties(ie),this.headers=V(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),this.text===null&&re._responseType?this.body=this.xhr.response:this.body=this.req.method==="HEAD"?null:this._parseBody(this.text?this.text:this.xhr.response)}x(ee.prototype,R.prototype),ee.prototype._parseBody=function(re){var ie=L.parse[this.type];return this.req._parser?this.req._parser(this,re):(!ie&&D(this.type)&&(ie=L.parse["application/json"]),ie&&re&&(re.length>0||re instanceof Object)?ie(re):null)},ee.prototype.toError=function(){var re=this.req,ie=re.method,K=re.url,X="cannot ".concat(ie," ").concat(K," (").concat(this.status,")"),fe=new Error(X);return fe.status=this.status,fe.method=ie,fe.url=K,fe},L.Response=ee;function A(re,ie){var K=this;this._query=this._query||[],this.method=re,this.url=ie,this.header={},this._header={},this.on("end",function(){var X=null,fe=null;try{fe=new ee(K)}catch(we){return X=new Error("Parser is unable to parse the response"),X.parse=!0,X.original=we,K.xhr?(X.rawResponse=typeof K.xhr.responseType>"u"?K.xhr.responseText:K.xhr.response,X.status=K.xhr.status?K.xhr.status:null,X.statusCode=X.status):(X.rawResponse=null,X.status=null),K.callback(X)}K.emit("response",fe);var Me;try{K._isResponseOK(fe)||(Me=new Error(fe.statusText||fe.text||"Unsuccessful HTTP response"))}catch(we){Me=we}Me?(Me.original=X,Me.response=fe,Me.status=fe.status,K.callback(Me,fe)):K.callback(null,fe)})}h(A.prototype),x(A.prototype,_.prototype),A.prototype.type=function(re){return this.set("Content-Type",L.types[re]||re),this},A.prototype.accept=function(re){return this.set("Accept",L.types[re]||re),this},A.prototype.auth=function(re,ie,K){arguments.length===1&&(ie=""),r(ie)==="object"&&ie!==null&&(K=ie,ie=""),K||(K={type:typeof btoa=="function"?"basic":"auto"});var X=K.encoder?K.encoder:function(fe){if(typeof btoa=="function")return btoa(fe);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(re,ie,K,X)},A.prototype.query=function(re){return typeof re!="string"&&(re=O(re)),re&&this._query.push(re),this},A.prototype.attach=function(re,ie,K){if(ie){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(re,ie,K||ie.name)}return this},A.prototype._getFormData=function(){return this._formData||(this._formData=new f.FormData),this._formData},A.prototype.callback=function(re,ie){if(this._shouldRetry(re,ie))return this._retry();var K=this._callback;this.clearTimeout(),re&&(this._maxRetries&&(re.retries=this._retries-1),this.emit("error",re)),K(re,ie)},A.prototype.crossDomainError=function(){var re=new Error(`Request has been terminated
|
||
Possible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.`);re.crossDomain=!0,re.status=this.status,re.method=this.method,re.url=this.url,this.callback(re)},A.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},A.prototype.ca=A.prototype.agent,A.prototype.buffer=A.prototype.ca,A.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},A.prototype.pipe=A.prototype.write,A.prototype._isHost=function(re){return re&&r(re)==="object"&&!Array.isArray(re)&&Object.prototype.toString.call(re)!=="[object Object]"},A.prototype.end=function(re){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=re||g,this._finalizeQueryString(),this._end()},A.prototype._setUploadTimeout=function(){var re=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout(function(){re._timeoutError("Upload timeout of ",re._uploadTimeout,"ETIMEDOUT")},this._uploadTimeout))},A.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var re=this;this.xhr=L.getXHR();var ie=this.xhr,K=this._formData||this._data;this._setTimeouts(),ie.addEventListener("readystatechange",function(){var Re=ie.readyState;if(Re>=2&&re._responseTimeoutTimer&&clearTimeout(re._responseTimeoutTimer),Re===4){var ke;try{ke=ie.status}catch{ke=0}if(!ke)return re.timedout||re._aborted?void 0:re.crossDomainError();re.emit("end")}});var X=function(ke,Ie){Ie.total>0&&(Ie.percent=Ie.loaded/Ie.total*100,Ie.percent===100&&clearTimeout(re._uploadTimeoutTimer)),Ie.direction=ke,re.emit("progress",Ie)};if(this.hasListeners("progress"))try{ie.addEventListener("progress",X.bind(null,"download")),ie.upload&&ie.upload.addEventListener("progress",X.bind(null,"upload"))}catch{}ie.upload&&this._setUploadTimeout();try{this.username&&this.password?ie.open(this.method,this.url,!0,this.username,this.password):ie.open(this.method,this.url,!0)}catch(Re){return this.callback(Re)}if(this._withCredentials&&(ie.withCredentials=!0),!this._formData&&this.method!=="GET"&&this.method!=="HEAD"&&typeof K!="string"&&!this._isHost(K)){var fe=this._header["content-type"],Me=this._serializer||L.serialize[fe?fe.split(";")[0]:""];!Me&&D(fe)&&(Me=L.serialize["application/json"]),Me&&(K=Me(K))}for(var we in this.header)this.header[we]!==null&&U(this.header,we)&&ie.setRequestHeader(we,this.header[we]);this._responseType&&(ie.responseType=this._responseType),this.emit("request",this),ie.send(typeof K>"u"?null:K)},L.agent=function(){return new S};for(var q=function(){var ie=ce[$];S.prototype[ie.toLowerCase()]=function(K,X){var fe=new L.Request(ie,K);return this._setDefaults(fe),X&&fe.end(X),fe}},$=0,ce=["GET","POST","OPTIONS","PATCH","PUT","DELETE"];$<ce.length;$++)q();S.prototype.del=S.prototype.delete,L.get=function(re,ie,K){var X=L("GET",re);return typeof ie=="function"&&(K=ie,ie=null),ie&&X.query(ie),K&&X.end(K),X},L.head=function(re,ie,K){var X=L("HEAD",re);return typeof ie=="function"&&(K=ie,ie=null),ie&&X.query(ie),K&&X.end(K),X},L.options=function(re,ie,K){var X=L("OPTIONS",re);return typeof ie=="function"&&(K=ie,ie=null),ie&&X.send(ie),K&&X.end(K),X};function ye(re,ie,K){var X=L("DELETE",re);return typeof ie=="function"&&(K=ie,ie=null),ie&&X.send(ie),K&&X.end(K),X}L.del=ye,L.delete=ye,L.patch=function(re,ie,K){var X=L("PATCH",re);return typeof ie=="function"&&(K=ie,ie=null),ie&&X.send(ie),K&&X.end(K),X},L.post=function(re,ie,K){var X=L("POST",re);return typeof ie=="function"&&(K=ie,ie=null),ie&&X.send(ie),K&&X.end(K),X},L.put=function(re,ie,K){var X=L("PUT",re);return typeof ie=="function"&&(K=ie,ie=null),ie&&X.send(ie),K&&X.end(K),X}})(pc,pc.exports);var US=pc.exports;const mf=Mi(US),IS=[{sketch_id:"example_0",code:"JTJGJTJGRmxvciUyMGRlJTIwRnVlZ28lMEElMEFzaGFwZSgyMDAlMkMwLjUlMkMxLjUpJTBBLnNjYWxlKDAuNSUyQzAuNSklMEEuY29sb3IoJTVCMC41JTJDMiU1RC5zbW9vdGgoMSklMkMwLjMlMkMwKSUwQS5yZXBlYXQoMiUyQzIpJTBBLm1vZHVsYXRlU2NhbGUob3NjKDMlMkMwLjUpJTJDLTAuNiklMEEuYWRkKG8wJTJDMC41KSUwQS5zY2FsZSgwLjkpJTBBLm91dCgp"},{sketch_id:"example_3",code:"JTJGJTJGJTIwYnklMjBPbGl2aWElMjBKYWNrJTBBJTBBb3NjKDIwJTJDJTIwMC4wMyUyQyUyMDEuNykua2FsZWlkKCkubXVsdChvc2MoMjAlMkMlMjAwLjAwMSUyQyUyMDApLnJvdGF0ZSgxLjU4KSkuYmxlbmQobzAlMkMlMjAwLjk0KS5tb2R1bGF0ZVNjYWxlKG9zYygxMCUyQyUyMDApJTJDLTAuMDMpLnNjYWxlKDAuOCUyQyUyMCgpJTIwJTNEJTNFJTIwKDEuMDUlMjAlMkIlMjAwLjElMjAqJTIwTWF0aC5zaW4oMC4wNSp0aW1lKSkpLm91dChvMCk="},{sketch_id:"example_4",code:"JTJGJTJGJTIwYnklMjBOZWxzb24lMjBWZXJhJTBBJTJGJTJGJTIwdHdpdHRlciUzQSUyMCU0MG5lbF9zb25vbG9naWElMEElMEFvc2MoOCUyQy0wLjUlMkMlMjAxKS5jb2xvcigtMS41JTJDJTIwLTEuNSUyQyUyMC0xLjUpLmJsZW5kKG8wKS5yb3RhdGUoLTAuNSUyQyUyMC0wLjUpLm1vZHVsYXRlKHNoYXBlKDQpLnJvdGF0ZSgwLjUlMkMlMjAwLjUpLnNjYWxlKDIpLnJlcGVhdFgoMiUyQyUyMDIpLm1vZHVsYXRlKG8wJTJDJTIwKCklMjAlM0QlM0UlMjBtb3VzZS54JTIwKiUyMDAuMDAwNSkucmVwZWF0WSgyJTJDJTIwMikpLm91dChvMCklMEElMEElMEElMEElMEElMEE="},{sketch_id:"example_6",code:"JTJGJTJGJTIwYnklMjBEJUMzJUE5Ym9yYSUyMEZhbGxlaXJvcyUyMEdvbnphbGVzJTBBJTJGJTJGJTIwaHR0cHMlM0ElMkYlMkZ3d3cuZ29uemFsZXNkZWJvcmEuY29tJTJGJTBBJTBBb3NjKDUpLmFkZChub2lzZSg1JTJDJTIwMikpLmNvbG9yKDAlMkMlMjAwJTJDJTIwMykuY29sb3JhbWEoMC40KS5vdXQoKSUwQSUwQSUwQSUwQQ=="},{sketch_id:"example_8",code:"JTJGJTJGJTIwYnklMjBSb2RyaWdvJTIwVmVsYXNjbyUwQSUyRiUyRiUyMGh0dHBzJTNBJTJGJTJGeWVjdG8uZ2l0aHViLmlvJTJGJTBBJTBBb3NjKDEwNyUyQyUyMDAlMkMlMjAwLjcpLmNvbG9yKDElMkMlMjAwJTJDJTIwMSkucm90YXRlKDAlMkMlMjAtMC4wOCkubW9kdWxhdGVSb3RhdGUobzElMkMlMjAwLjQpLm91dChvMCklMEFvc2MoMzMpLnJvdGF0ZSgyJTJDJTIwMC44KS5tb2R1bGF0ZVJvdGF0ZShvMCUyQyUyMCgpJTIwJTNEJTNFJTIwKGEuZmZ0JTVCMCU1RCoyKSkub3V0KG8xKSUwQQ=="},{sketch_id:"example_9",code:"JTJGJTJGJTIwYnklMjBSb2RyaWdvJTIwVmVsYXNjbyUwQSUyRiUyRiUyMGh0dHBzJTNBJTJGJTJGeWVjdG8uZ2l0aHViLmlvJTJGJTBBJTBBb3NjKDE4JTJDJTIwMC4xJTJDJTIwMCkuY29sb3IoMiUyQyUyMDAuMSUyQyUyMDIpJTBBLm11bHQob3NjKDIwJTJDJTIwMC4wMSUyQyUyMDApKS5yZXBlYXQoMiUyQyUyMDIwKS5yb3RhdGUoMC41KS5tb2R1bGF0ZShvMSklMEEuc2NhbGUoMSUyQyUyMCgpJTIwJTNEJTNFJTIwJTIwKGEuZmZ0JTVCMCU1RCowLjklMjAlMkIlMjAyKSkuZGlmZihvMSkub3V0KG8wKSUwQW9zYygyMCUyQyUyMDAuMiUyQyUyMDApLmNvbG9yKDIlMkMlMjAwLjclMkMlMjAwLjEpLm11bHQob3NjKDQwKSkubW9kdWxhdGVSb3RhdGUobzAlMkMlMjAwLjIpJTBBLnJvdGF0ZSgwLjIpLm91dChvMSk="},{sketch_id:"example_10",code:"JTJGJTJGJTIwYnklMjBaYWNoJTIwS3JhbGwlMEElMkYlMkYlMjBodHRwJTNBJTJGJTJGemFjaGtyYWxsLm9ubGluZSUyRiUwQSUwQW9zYyglMjAyMTUlMkMlMjAwLjElMkMlMjAyJTIwKSUwQS5tb2R1bGF0ZSglMEElMjAlMjBvc2MoJTIwMiUyQyUyMC0wLjMlMkMlMjAxMDAlMjApJTBBJTIwJTIwLnJvdGF0ZSgxNSklMEEpJTBBLm11bHQoJTBBJTIwJTIwb3NjKCUyMDIxNSUyQyUyMC0wLjElMkMlMjAyKSUwQSUyMCUyMC5waXhlbGF0ZSglMjA1MCUyQyUyMDUwJTIwKSUwQSklMEEuY29sb3IoJTIwMC45JTJDJTIwMC4wJTJDJTIwMC45JTIwKSUwQS5tb2R1bGF0ZSglMEElMjAlMjBvc2MoJTIwNiUyQyUyMC0wLjElMjApJTBBJTIwJTIwLnJvdGF0ZSglMjA5JTIwKSUwQSklMEEuYWRkKCUwQSUyMCUyMG9zYyglMjAxMCUyQyUyMC0wLjklMkMlMjA5MDAlMjApJTBBJTIwJTIwLmNvbG9yKDElMkMwJTJDMSklMEEpJTBBLm11bHQoJTBBJTIwJTIwc2hhcGUoOTAwJTJDJTIwMC4yJTJDJTIwMSklMEElMjAlMjAubHVtYSgpJTBBJTIwJTIwLnJlcGVhdFgoMiklMEElMjAlMjAucmVwZWF0WSgyKSUwQSUyMCUyMC5jb2xvcmFtYSgxMCklMEEpJTBBLm1vZHVsYXRlKCUwQSUyMCUyMG9zYyglMjA5JTJDJTIwLTAuMyUyQyUyMDkwMCUyMCklMEElMjAlMjAucm90YXRlKCUyMDYlMjApJTBBKSUwQS5hZGQoJTBBJTIwJTIwb3NjKDQlMkMlMjAxJTJDJTIwOTApJTBBJTIwJTIwLmNvbG9yKDAuMiUyQzAlMkMxKSUwQSklMEEub3V0KCklMEE="},{sketch_id:"example_11",code:"JTJGJTJGJTIwYnklMjBaYWNoJTIwS3JhbGwlMEElMkYlMkYlMjBodHRwJTNBJTJGJTJGemFjaGtyYWxsLm9ubGluZSUyRiUwQSUwQW9zYygxMCUyQyUyMDAuOSUyQyUyMDMwMCklMEEuY29sb3IoMC45JTJDJTIwMC43JTJDJTIwMC44KSUwQS5kaWZmKCUwQSUyMCUyMG9zYyg0NSUyQyUyMDAuMyUyQyUyMDEwMCklMEElMjAlMjAuY29sb3IoMC45JTJDJTIwMC45JTJDJTIwMC45KSUwQSUyMCUyMC5yb3RhdGUoMC4xOCklMEElMjAlMjAucGl4ZWxhdGUoMTIpJTBBJTIwJTIwLmthbGVpZCgpJTBBKSUwQS5zY3JvbGxYKDEwKSUwQS5jb2xvcmFtYSgpJTBBLmx1bWEoKSUwQS5yZXBlYXRYKDQpJTBBLnJlcGVhdFkoNCklMEEubW9kdWxhdGUoJTBBJTIwJTIwb3NjKDElMkMlMjAtMC45JTJDJTIwMzAwKSUwQSklMEEuc2NhbGUoMiklMEEub3V0KCklMEE="},{sketch_id:"example_13",code:"JTJGJTJGJTIwYWNpZCUyMGJ1cyUyMHNlYXQlMEElMkYlMkYlMjBieSUyMFdpbGwlMjBIdW1waHJleXMlMEElMkYlMkYlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZUaGVXaXNweSUwQSUwQW9zYygxMDUpLmNvbG9yKDAuNSUyQzAuMSUyQzAuOCkucm90YXRlKDAuMTElMkMlMjAwLjEpLm1vZHVsYXRlKG9zYygxMCkucm90YXRlKDAuMykuYWRkKG8wJTJDJTIwMC4xKSkuYWRkKG9zYygyMCUyQzAuMDElMkMxKS5jb2xvcigwJTJDMC44JTJDMSkpLm91dChvMCklMEFvc2MoNTAlMkMwLjA1JTJDJTIwMC43KS5jb2xvcigxJTJDMC43JTJDMC41KS5kaWZmKG8wKS5tb2R1bGF0ZShvMSUyQzAuMDUpLm91dChvMSklMEFyZW5kZXIobzEp"},{sketch_id:"example_14",code:"JTJGJTJGJTIwYnklMjBPbGl2aWElMjBKYWNrJTBBJTJGJTJGJTIwJTQwX29qYWNrXyUwQSUwQW9zYygyMCUyQyUyMDAuMDElMkMlMjAxLjEpJTBBJTA5LmthbGVpZCg1KSUwQSUwOS5jb2xvcigyLjgzJTJDMC45MSUyQzAuMzkpJTBBJTA5LnJvdGF0ZSgwJTJDJTIwMC4xKSUwQSUwOS5tb2R1bGF0ZShvMCUyQyUyMCgpJTIwJTNEJTNFJTIwbW91c2UueCUyMColMjAwLjAwMDMpJTBBJTA5LnNjYWxlKDEuMDEpJTBBJTIwJTIwJTA5Lm91dChvMCk="},{sketch_id:"example_15",code:"JTJGJTJGJTIwYnklMjBPbGl2aWElMjBKYWNrJTBBJTJGJTJGJTIwaHR0cHMlM0ElMkYlMkZvamFjay5naXRodWIuaW8lMEElMEFvc2MoMTAwJTJDJTIwMC4wMSUyQyUyMDEuNCklMEElMDkucm90YXRlKDAlMkMlMjAwLjEpJTBBJTA5Lm11bHQob3NjKDEwJTJDJTIwMC4xKS5tb2R1bGF0ZShvc2MoMTApLnJvdGF0ZSgwJTJDJTIwLTAuMSklMkMlMjAxKSklMEElMDkuY29sb3IoMi44MyUyQzAuOTElMkMwLjM5KSUwQSUyMCUyMC5vdXQobzAp"},{sketch_id:"example_16",code:"JTJGJTJGJTIwYnklMjBPbGl2aWElMjBKYWNrJTBBJTJGJTJGJTIwaHR0cHMlM0ElMkYlMkZvamFjay5naXRodWIuaW8lMEElMEFvc2MoNCUyQyUyMDAuMSUyQyUyMDAuOCkuY29sb3IoMS4wNCUyQzAlMkMlMjAtMS4xKS5yb3RhdGUoMC4zMCUyQyUyMDAuMSkucGl4ZWxhdGUoMiUyQyUyMDIwKS5tb2R1bGF0ZShub2lzZSgyLjUpJTJDJTIwKCklMjAlM0QlM0UlMjAxLjUlMjAqJTIwTWF0aC5zaW4oMC4wOCUyMColMjB0aW1lKSkub3V0KG8wKQ=="},{sketch_id:"example_17",code:"JTJGJTJGJTIwbW9pcmUlMEElMkYlMkYlMjBieSUyME9saXZpYSUyMEphY2slMEElMkYlMkYlMjB0d2l0dGVyJTNBJTIwJTQwX29qYWNrXyUwQSUwQXBhdHRlcm4lMjAlM0QlMjAoKSUyMCUzRCUzRSUyMG9zYygyMDAlMkMlMjAwKS5rYWxlaWQoMjAwKS5zY2FsZSgxJTJDJTIwMC40KSUwQSUyRiUyRiUwQXBhdHRlcm4oKSUwQSUyMCUyMC5zY3JvbGxYKDAuMSUyQyUyMDAuMDEpJTBBJTIwJTIwLm11bHQocGF0dGVybigpKSUwQSUyMCUyMC5vdXQoKQ=="},{sketch_id:"example_18",code:"JTJGJTJGJTIwYnklMjBPbGl2aWElMjBKYWNrJTBBJTJGJTJGJTIwaHR0cHMlM0ElMkYlMkZvamFjay5naXRodWIuaW8lMEElMEFvc2MoNiUyQyUyMDAlMkMlMjAwLjgpJTBBJTIwJTIwLmNvbG9yKDEuMTQlMkMlMjAwLjYlMkMuODApJTBBJTIwJTIwLnJvdGF0ZSgwLjkyJTJDJTIwMC4zKSUwQSUyMCUyMC5waXhlbGF0ZSgyMCUyQyUyMDEwKSUwQSUyMCUyMC5tdWx0KG9zYyg0MCUyQyUyMDAuMDMpLnRocmVzaCgwLjQpLnJvdGF0ZSgwJTJDJTIwLTAuMDIpKSUwQSUyMCUyMC5tb2R1bGF0ZVJvdGF0ZShvc2MoMjAlMkMlMjAwKS50aHJlc2goMC4zJTJDJTIwMC42KSUyQyUyMCgpJTIwJTNEJTNFJTIwMC4xJTIwJTJCJTIwbW91c2UueCUyMColMjAwLjAwMiklMEElMjAlMjAub3V0KG8wKQ=="},{sketch_id:"rangga_0",code:"JTJGJTJGJTIwRHJlYW15JTIwRGlhbW9uZCUwQSUyRiUyRiUyMGJ5JTIwUmFuZ2dhJTIwUHVybmFtYSUyMEFqaSUwQSUyRiUyRiUyMGh0dHBzJTNBJTJGJTJGcmFuZ2dhcHVybmFtYWFqaTEud2l4c2l0ZS5jb20lMkZwb3J0Zm9saW8lMEElMEFvc2MoNyUyQy0wLjEyNSkubW9kdWxhdGUodm9yb25vaSgxKSkuZGlmZih2b3Jvbm9pKDEpLm11bHQoZ3JhZGllbnQoLTEpLmx1bWEoMC4xMjUpKSklMEElMjAlMjAubHVtYSgwLjEyNSklMEElMjAlMjAuYWRkKHNoYXBlKDclMkMlMjAwLjUpJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwLm11bHQodm9yb25vaSgxMCUyQzIpLmJsZW5kKG8wKS5kaWZmKGdyYWRpZW50KDEpKS5tb2R1bGF0ZSh2b3Jvbm9pKCkpKSklMEElMjAlMjAuc2Nyb2xsWSgtMC4xKSUwQSUyMCUyMC5zY3JvbGxYKDAuMTI1KSUwQSUyMCUyMC5ibGVuZChvMCklMEElMjAlMjAuYmxlbmQobzApJTBBJTIwJTIwLm91dCgpJTBB"},{sketch_id:"rangga_1",code:"JTJGJTJGJTIwVGFnJTIwJTI2JTIwU3dlZXAlMEElMkYlMkYlMjBieSUyMFJhbmdnYSUyMFB1cm5hbWElMjBBamklMEElMkYlMkYlMjBodHRwcyUzQSUyRiUyRnJhbmdnYXB1cm5hbWFhamkxLndpeHNpdGUuY29tJTJGcG9ydGZvbGlvJTBBJTBBb3NjKDUlMkMwLjEyNSkuY29sb3JhbWEoMSklMEElMjAlMjAubHVtYSgwLjEyNSkuYWRkKHNoYXBlKDElMkMwLjUpLmx1bWEoMikuZGlmZihncmFkaWVudCgxKSkpJTBBJTIwJTIwLmRpZmYob3NjKC0xJTJDLTAuMjUpKS5ibGVuZChvMCkuY29sb3IoMCUyQzIuNSUyQzEuNzUpJTBBJTIwJTIwLm91dCgp"},{sketch_id:"rangga_2",code:"JTJGJTJGJTIwTW9ub2Nocm9tZSUyME1lbW9hciUwQSUyRiUyRiUyMGJ5JTIwUmFuZ2dhJTIwUHVybmFtYSUyMEFqaSUwQSUyRiUyRiUyMGh0dHBzJTNBJTJGJTJGcmFuZ2dhcHVybmFtYWFqaTEud2l4c2l0ZS5jb20lMkZwb3J0Zm9saW8lMEElMEF2b3Jvbm9pKDUwJTJDMSklMEElMjAlMjAubHVtYSgwLjUpLmFkZChzaGFwZSgxJTJDMSkubHVtYSgxKSklMEElMjAlMjAubW9kdWxhdGUob3NjKC0xMDAwJTJDLTEpJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwLm1vZHVsYXRlKG9zYygpLmx1bWEoKSkpJTBBJTIwJTIwLmJsZW5kKG8wKSUwQSUyMCUyMC5ibGVuZChvMCklMEElMjAlMjAuYmxlbmQobzApJTBBJTIwJTIwLmJsZW5kKG8wKSUwQSUyMCUyMC5vdXQoKQ=="},{sketch_id:"rangga_3",code:"JTJGJTJGJTIwR2FsYXh5JTIwVHJpcCUwQSUyRiUyRiUyMGJ5JTIwUmFuZ2dhJTIwUHVybmFtYSUyMEFqaSUwQSUyRiUyRiUyMGh0dHBzJTNBJTJGJTJGcmFuZ2dhcHVybmFtYWFqaTEud2l4c2l0ZS5jb20lMkZwb3J0Zm9saW8lMEElMEFzaGFwZSgxJTJDMSklMEElMjAlMjAubXVsdCh2b3Jvbm9pKDEwMDAlMkMyKSUwQSUyMCUyMC5ibGVuZChvMCkubHVtYSgpKSUwQSUyMCUyMC5hZGQoc2hhcGUoMyUyQzAuMTI1KSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMC5yb3RhdGUoMSUyQzEpLm11bHQodm9yb25vaSgxMDAwJTJDMSkubHVtYSgpKSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMC5yb3RhdGUoMS41KSkuc2Nyb2xsWCglNUIwLjElMkMtMC4wNjI1JTJDMC4wMDUlMkMwLjAwMDAxJTVEJTJDMCklMEElMjAlMjAuc2Nyb2xsWSglNUIwLjElMkMtMC4wNjI1JTJDMC4wMDUlMkMwLjAwMDAxJTVEJTJDMCklMEElMjAlMjAub3V0KCk="},{sketch_id:"rangga_4",code:"JTJGJTJGJTIwU3VtZXQlMEElMkYlMkYlMjBieSUyMFJhbmdnYSUyMFB1cm5hbWElMjBBamklMEElMkYlMkYlMjBodHRwcyUzQSUyRiUyRnJhbmdnYXB1cm5hbWFhamkxLndpeHNpdGUuY29tJTJGcG9ydGZvbGlvJTBBJTBBb3NjKDAuNSUyQzEuMjUpLm11bHQoc2hhcGUoMSUyQzAuMDkpLnJvdGF0ZSgxLjUpKSUwQSUyMCUyMC5kaWZmKGdyYWRpZW50KCkpJTBBJTIwJTIwLmFkZChzaGFwZSgyJTJDMikuYmxlbmQoZ3JhZGllbnQoMSkpKSUwQSUyMCUyMC5tb2R1bGF0ZShub2lzZSgpJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwLm1vZHVsYXRlKG5vaXNlKCkuc2Nyb2xsWSgxJTJDMC4wNjI1KSkpJTBBJTIwJTIwLmJsZW5kKG8wKSUwQSUyMCUyMC5jb2xvcigxJTJDLTAuNSUyQy0wLjc1KSUwQSUyMCUyMC5vdXQoKQ=="},{sketch_id:"marianne_0",code:"JTJGJTJGcG9ydCUwQSUyRiUyRmJ5JTIwTWFyaWFubmUlMjBUZWl4aWRvJTBBJTJGJTJGaHR0cHMlM0ElMkYlMkZtYXJpYW5uZXRlaXhpZG8uZ2l0aHViLmlvJTJGJTBBJTBBb3NjKDUlMkMlMjAwLjklMkMlMjAwLjAwMSklMEElMjAlMjAlMjAlMjAua2FsZWlkKCU1QjMlMkM0JTJDNSUyQzclMkM4JTJDOSUyQzEwJTVELmZhc3QoMC4xKSklMEElMjAlMjAlMjAlMjAuY29sb3IoMC41JTJDJTIwMC4zKSUwQSUyMCUyMCUyMCUyMC5jb2xvcmFtYSgwLjQpJTBBJTIwJTIwJTIwJTIwLnJvdGF0ZSgwLjAwOSUyQygpJTNEJTNFTWF0aC5zaW4odGltZSkqJTIwLTAuMDAxJTIwKSUwQSUyMCUyMCUyMCUyMC5tb2R1bGF0ZVJvdGF0ZShvMCUyQygpJTNEJTNFTWF0aC5zaW4odGltZSklMjAqJTIwMC4wMDMpJTBBJTIwJTIwJTIwJTIwLm1vZHVsYXRlKG8wJTJDJTIwMC45KSUwQSUyMCUyMCUyMCUyMC5zY2FsZSgwLjkpJTBBJTIwJTIwJTIwJTIwLm91dChvMCklMEElMEE="},{sketch_id:"marianne_1",code:"JTJGJTJGUGl4ZWxzY2FwZSUwQSUyRiUyRk1hcmlhbm5lJTIwVGVpeGlkbyUwQSUyRiUyRmh0dHBzJTNBJTJGJTJGZ2l0aHViLmNvbSUyRk1hcmlhbm5lVGVpeGlkbyUwQSUwQXNyYyhvMCklMEElMjAuc2F0dXJhdGUoMS4wMSklMEElMjAuc2NhbGUoLjk5OSklMEElMjAuY29sb3IoMS4wMSUyQzEuMDElMkMxLjAxKSUwQSUyMC5odWUoLjAxKSUwQSUyMC5tb2R1bGF0ZUh1ZShzcmMobzEpLmh1ZSguMykucG9zdGVyaXplKC0xKS5jb250cmFzdCguNyklMkMyKSUwQSUyMCUyMC5sYXllcihzcmMobzEpJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwLmx1bWEoKSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMC5tdWx0KGdyYWRpZW50KDEpJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwLnNhdHVyYXRlKC45KSkpJTBBJTIwJTIwLm91dChvMCklMEElMEFub2lzZSgxJTJDJTIwLjIpJTBBJTIwJTIwLnJvdGF0ZSgyJTJDLjUpJTBBJTIwJTIwLmxheWVyKHNyYyhvMCklMEElMjAlMjAuc2Nyb2xsWCguMikpJTBBJTIwJTIwLm91dChvMSklMEElMEFyZW5kZXIobzAp"},{sketch_id:"naoto_0",code:"JTJGJTJGJTIwJTQwbmFvdG9faGllZGElMEFvc2MoMjAlMkMlMjAwLjElMkMlMjAwKS5jb2xvcigwJTJDJTIwMSUyQyUyMDIpLnJvdGF0ZSgxLjU3JTJGMikub3V0KG8xKSUwQW9zYygzMCUyQyUyMDAuMDElMkMlMjAwKS5jb2xvcigyJTJDJTIwMC43JTJDJTIwMSkubW9kdWxhdGUobzElMkMlMjAwKS5hZGQobzElMkMxKS5tb2R1bGF0ZVBpeGVsYXRlKG8xJTJDMSUyQzEwKS5vdXQobzAp"},{sketch_id:"naoto_1",code:"JTJGJTJGJTIwJTQwbmFvdG9faGllZGElMEFzb2xpZCgwLjIlMkMwLjYlMkMwLjkpLmxheWVyKG9zYygzMS40JTJDMCkudGhyZXNoKDAuNykubHVtYSgpLm1vZHVsYXRlKG9zYyg0JTJDMSkucm90YXRlKDEpJTJDMC4wNSkuY29sb3IoMCUyQzAlMkMwKSkubGF5ZXIob3NjKDMxLjQlMkMwKS50aHJlc2goMC43KS5sdW1hKCkubW9kdWxhdGUob3NjKDQlMkMxKS5yb3RhdGUoMSklMkMwLjEpKS5vdXQoKQ=="},{sketch_id:"ritchse_0",code:"JTJGJTJGcmFuZG9tJTIwdHJ5cG9waG9iaWElMjAtJTIwY2hhbmdlcyUyMGV2ZXJ5dGltZSUyMHlvdSUyMGxvYWQlMjBpdCElMEElMkYlMkZieSUyMFJpdGNoc2UlMEElMkYlMkZpbnN0YWdyYW0uY29tJTJGcml0Y2hzZSUwQSUyMCUwQWZ1bmN0aW9uJTIwcihtaW4lM0QwJTJDbWF4JTNEMSklMjAlN0IlMjByZXR1cm4lMjBNYXRoLnJhbmRvbSgpKihtYXgtbWluKSUyQm1pbiUzQiUyMCU3RCUwQSUyMCUwQXNvbGlkKDElMkMxJTJDMSklMEElMjAlMjAlMDkuZGlmZihzaGFwZSglNUI0JTJDNCUyQzQlMkMyNCU1RC5zbW9vdGgoKS5mYXN0KC41KSUyQ3IoMC42JTJDMC45MyklMkMuMDkpLnJlcGVhdCgyMCUyQzEwKSklMEElMDkubW9kdWxhdGVTY2FsZShvc2MoOCkucm90YXRlKHIoLS41JTJDLjUpKSUyQy41MiklMEElMDkuYWRkKCUwQSUyMCUyMCUwOSUwOXNyYyhvMCkuc2NhbGUoMC45NjUpLnJvdGF0ZSguMDEyKihNYXRoLnJvdW5kKHIoLTIlMkMxKSkpKSUwQSUyMCUyMCUwOSUwOS5jb2xvcihyKCklMkNyKCklMkNyKCkpJTBBJTIwJTIwJTIwJTIwJTA5Lm1vZHVsYXRlUm90YXRlKG8wJTJDcigwJTJDMC41KSklMEElMjAlMjAlMDklMDkuYnJpZ2h0bmVzcyguMTUpJTBBJTIwJTIwJTA5JTA5JTJDLjcpJTBBJTA5Lm91dCgp"},{sketch_id:"ritchse_1",code:"JTJGJTJGY29ycnVwdGVkJTIwc2NyZWVuc2F2ZXIlMEElMkYlMkZieSUyMFJpdGNoc2UlMEElMkYlMkZpbnN0YWdyYW0uY29tJTJGcml0Y2hzZSUwQSUyMCUwQXZvcm9ub2koMzUwJTJDMC4xNSklMEElMjAlMjAlMDkubW9kdWxhdGVTY2FsZShvc2MoOCkucm90YXRlKE1hdGguc2luKHRpbWUpKSUyQy41KSUwQSUyMCUyMCUwOS50aHJlc2goLjgpJTBBJTA5Lm1vZHVsYXRlUm90YXRlKG9zYyg3KSUyQy40KSUwQSUwOS50aHJlc2goLjcpJTBBJTIwJTIwJTA5LmRpZmYoc3JjKG8wKS5zY2FsZSgxLjgpKSUwQSUwOS5tb2R1bGF0ZVNjYWxlKG9zYygyKS5tb2R1bGF0ZVJvdGF0ZShvMCUyQy43NCkpJTBBJTA5LmRpZmYoc3JjKG8wKS5yb3RhdGUoJTVCLS4wMTIlMkMuMDElMkMtLjAwMiUyQzAlNUQpLnNjcm9sbFkoMCUyQyU1Qi0xJTJGMTk5ODAwJTJDMCU1RC5mYXN0KDAuNykpKSUwQSUwOS5icmlnaHRuZXNzKCU1Qi0uMDIlMkMtLjE3JTVELnNtb290aCgpLmZhc3QoLjUpKSUwQSUwOS5vdXQoKQ=="},{sketch_id:"ritchse_2",code:"JTJGJTJGdHJvcGljYWwlMjBqdWljZSUwQSUyRiUyRmJ5JTIwUml0Y2hzZSUwQSUyRiUyRmluc3RhZ3JhbS5jb20lMkZyaXRjaHNlJTBBJTIwJTBBdm9yb25vaSgyJTJDMC4zJTJDMC4yKS5zaGlmdCgwLjUpJTBBLm1vZHVsYXRlUGl4ZWxhdGUodm9yb25vaSg0JTJDMC4yKSUyQzMyJTJDMiklMEEuc2NhbGUoKCklM0QlM0UxJTJCKE1hdGguc2luKHRpbWUqMi41KSowLjA1KSklMEEuZGlmZih2b3Jvbm9pKDMpLnNoaWZ0KDAuNikpJTBBLmRpZmYob3NjKDIlMkMwLjE1JTJDMS4xKS5yb3RhdGUoKSklMEEuYnJpZ2h0bmVzcygwLjEpLmNvbnRyYXN0KDEuMikuc2F0dXJhdGUoMS4yKSUwQSUwOS5vdXQoKSUwQXNwZWVkJTIwJTNEJTIwMC44"},{sketch_id:"ritchse_3",code:"JTJGJTJGdHJ5aW5nJTIwdG8lMjBnZXQlMjBjbG9zZXIlMEElMkYlMkZieSUyMFJpdGNoc2UlMEElMkYlMkZpbnN0YWdyYW0uY29tJTJGcml0Y2hzZSUwQSUyMCUwQW9zYyg2MCUyQy0wLjAxNSUyQzAuMykuZGlmZihvc2MoNjAlMkMwLjA4KS5yb3RhdGUoTWF0aC5QSSUyRjIpKSUwQSUwOS5tb2R1bGF0ZVNjYWxlKG5vaXNlKDMuNSUyQzAuMjUpLm1vZHVsYXRlU2NhbGUob3NjKDE1KS5yb3RhdGUoKCklM0QlM0VNYXRoLnNpbih0aW1lJTJGMikpKSUyQzAuNiklMEElMDkuY29sb3IoMSUyQzAuNSUyQzAuNCkuY29udHJhc3QoMS40KSUwQSUwOS5hZGQoc3JjKG8wKS5tb2R1bGF0ZShvMCUyQy4wNCklMkMuNiklMEElMDkuaW52ZXJ0KCkuYnJpZ2h0bmVzcygwLjEpLmNvbnRyYXN0KDEuMiklMEElMDkubW9kdWxhdGVTY2FsZShvc2MoMiklMkMtMC4yKSUwQSUyMCUyMC5vdXQoKQ=="},{sketch_id:"ritchse_4",code:"JTJGJTJGJTIwZGlzaW50ZWdyYXRpb24lMEElMkYlMkYlMjBieSUyMFJpdGNoc2UlMEElMkYlMkYlMjBpbnN0YWdyYW0uY29tJTJGcml0Y2hzZSUwQSUyMCUwQW9zYyg1JTJDLjEpLm1vZHVsYXRlKG5vaXNlKDYpJTJDLjIyKS5kaWZmKG8wKSUwQSUyMCUyMCUwOS5tb2R1bGF0ZVNjcm9sbFkob3NjKDIpLm1vZHVsYXRlKG9zYygpLnJvdGF0ZSgpJTJDLjExKSklMEElMDkuc2NhbGUoLjcyKS5jb2xvcigwLjk5JTJDMS4wMTQlMkMxKSUwQSUyMCUyMCUwOS5vdXQoKQ== "},{sketch_id:"flor_0",code:"JTJGJTJGRmxvciUyMGRlJTIwRnVlZ28lMEElMkYlMkZodHRwcyUzQSUyRiUyRmZsb3JkZWZ1ZWdvLmdpdGh1Yi5pbyUyRiUwQW9zYygzMCUyQzAuMDElMkMxKSUwQS5tdWx0KG9zYygyMCUyQy0wLjElMkMxKS5tb2R1bGF0ZShub2lzZSgzJTJDMSkpLnJvdGF0ZSgwLjcpKSUwQS5wb3N0ZXJpemUoJTVCMyUyQzEwJTJDMiU1RC5mYXN0KDAuNSkuc21vb3RoKDEpKSUwQS5tb2R1bGF0ZVJvdGF0ZShvMCUyQygpJTNEJTNFbW91c2UueCowLjAwMyklMEEub3V0KCk= "},{sketch_id:"mahalia_0",code:"JTJGJTJGJTIwTWFoYWxpYSUyMEgtUiUwQSUyRiUyRiUyMElHJTNBJTIwJTQwbW1faHJfJTBBJTBBc2hhcGUoMjAlMkMwLjElMkMwLjAxKSUwQSUyMCUyMC5zY2FsZSgoKSUyMCUzRCUzRSUyME1hdGguc2luKHRpbWUpKjMpJTBBJTIwJTIwLnJlcGVhdCgoKSUyMCUzRCUzRSUyME1hdGguc2luKHRpbWUpKjEwKSUwQSUyMCUyMC5tb2R1bGF0ZVJvdGF0ZShvMCklMEElMjAlMjAuc2NhbGUoKCklMjAlM0QlM0UlMjBNYXRoLnNpbih0aW1lKSoyKSUwQSUyMCUyMC5tb2R1bGF0ZShub2lzZSgyJTJDMCkpJTBBJTIwJTIwLnJvdGF0ZSgwLjElMkMlMjAwLjkpJTBBLm91dChvMCklMEElMEFzcmMobzApJTBBLm1vZHVsYXRlKG9zYyg1MDAlMkMwJTJDMCkpJTBBLm91dChvMSklMEElMEFzcmMobzEpJTBBLm1vZHVsYXRlS2FsZWlkKHZvcm9ub2koKCklMjAlM0QlM0UlMjBNYXRoLnNpbih0aW1lKSozJTJDMC4xJTJDMC4wMSklMkMoKSUyMCUzRCUzRSUyME1hdGguc2luKHRpbWUpKjMpJTBBLnNjYWxlKCgpJTIwJTNEJTNFJTIwTWF0aC5zaW4odGltZSkqMyklMEEub3V0KG8yKSUwQSUwQXJlbmRlcihvMik="},{sketch_id:"mahalia_1",code:"JTJGJTJGJTIwTWFoYWxpYSUyMEgtUiUwQSUyRiUyRiUyMElHJTNBJTIwJTQwbW1faHJfJTBBJTBBc2hhcGUoKCklMjAlM0QlM0UlMjBNYXRoLnNpbih0aW1lKSUyQjEqMiklMEEucm90YXRlKCgpJTIwJTNEJTNFJTIwTWF0aC5QSSUyMColMjBtb3VzZS54JTIwJTJGMTgwKSUwQS5yZXBlYXRYKDMpJTBBLnJlcGVhdFkoKCklM0QlM0VNYXRoLnNpbih0aW1lKSo1KSUwQS5zY2FsZSgoKSUyMCUzRCUzRSUyME1hdGguUEklMkY0KSUwQS5ibGVuZChzcmMobzApLmNvbG9yKDElMkMwJTJDMCkpJTBBLm1vZHVsYXRlKG9zYygyMCUyQyUyMDAlMkMuNCkpJTBBLmthbGVpZCgyKSUwQSUyMC5vdXQobzApJTBBJTBBcmVuZGVyKG8wKQ=="},{sketch_id:"mahalia_2",code:"JTJGJTJGJTIwVmVsdmV0JTIwUG9vbCUwQSUyRiUyRiUyMGJ5JTIwTWFoYWxpYSUyMEgtUiUwQSUyRiUyRiUyMElHJTNBJTIwbW1faHJfJTBBJTBBJTBBbm9pc2UoKSUwQS5jb2xvcigoKSUyMCUzRCUzRSUyMGEuZmZ0JTVCMiU1RCoyJTJDMCUyQy42KSUwQS5tb2R1bGF0ZShub2lzZSgoKSUyMCUzRCUzRSUyMGEuZmZ0JTVCMCU1RCoxMCkpJTBBLnNjYWxlKCgpJTNEJTNFJTIwYS5mZnQlNUIyJTVEKjUpJTBBLmxheWVyKCUwQSUyMCUyMHNyYyhvMCklMEElMjAlMjAubWFzayhvc2MoMTApLm1vZHVsYXRlUm90YXRlKG9zYygpJTJDOTAlMkMwKSklMEElMjAlMjAuc2NhbGUoKCklMjAlM0QlM0UlMjBhLmZmdCU1QjAlNUQqMiklMEElMjAlMjAubHVtYSgwLjIlMkMwLjMpJTBBKSUwQS5ibGVuZChvMCklMEEub3V0KG8wKSUwQSUwQW9zYygpJTBBLm1vZHVsYXRlKG5vaXNlKCgpJTIwJTNEJTNFJTIwYS5mZnQlNUIxJTVEJTJCNSkpJTBBLmNvbG9yKDElMkMwJTJDMCklMEEub3V0KG8xKSUwQSUwQXNyYyhvMCklMEEubW9kdWxhdGUobzEpJTBBLmxheWVyKCUwQSUyMCUyMHNyYyhvMSklMEElMjAlMjAubWFzayhvMSklMEElMjAlMjAuc2F0dXJhdGUoNyklMEEpJTBBLm1vZHVsYXRlUm90YXRlKG8xKSUwQS5yb3RhdGUoKCU3QnRpbWUlN0QpJTIwJTNEJTNFJTIwdGltZSUyNTM2MCowLjA1KSUwQS5vdXQobzIpJTBBJTBBcmVuZGVyKG8yKQ=="},{sketch_id:"mahalia_3",code:"JTJGJTJGJTIwYnklMjBNYWhhbGlhJTIwSC1SJTBBJTJGJTJGJTIwSUclM0ElMjBtbV9ocl8lMEElMEFzaGFwZSgoKSUzRCUzRU1hdGguc2luKHRpbWUpJTJCMSozJTJDJTIwLjUlMkMuMDEpJTBBLnJlcGVhdCg1JTJDMyUyQyUyMCgpJTNEJTNFYS5mZnQlNUIwJTVEKjIlMkMlMjAoKSUzRCUzRWEuZmZ0JTVCMSU1RCoyKSUwQS5zY3JvbGxZKC41JTJDMC4xKSUwQS5sYXllciglMEElMjAlMjBzcmMobzEpJTBBJTIwJTIwLm1hc2sobzApJTBBJTIwJTIwLmx1bWEoLjAxJTJDJTIwLjEpJTBBJTIwJTIwLmludmVydCguMiklMEEpJTBBLm1vZHVsYXRlKG8xJTJDLjAyKSUwQS5vdXQobzApJTBBJTBBb3NjKDQwJTJDJTIwMC4wOSUyQyUyMDAuOSklMEEuY29sb3IoLjklMkMwJTJDNSklMEEubW9kdWxhdGUob3NjKDEwKS5yb3RhdGUoMSUyQyUyMDAuNSkpJTBBLnJvdGF0ZSgxJTJDJTIwMC4yKSUwQS5vdXQobzEpJTBBJTBBcmVuZGVyKG8wKSUwQSUwQQ=="},{sketch_id:"mahalia_4",code:"JTJGJTJGJTIwQ2VsbHVsYXIlMjAlMjYlMjBCbG9idWxhciUwQSUyRiUyRiUyMGJ5JTIwTWFoYWxpYSUyMEgtUiUwQSUyRiUyRiUyMElHJTNBJTIwbW1faHJfJTBBJTBBc3BlZWQlMjAlM0QlMjAwLjMlMEElMEFzaGFwZSgyMCUyQzAuMiUyQzAuMyklMEEuY29sb3IoMC41JTJDMC44JTJDNTApJTBBJTIwJTIwLnNjYWxlKCgpJTIwJTNEJTNFJTIwTWF0aC5zaW4odGltZSklMkIxKjIpJTBBJTIwJTIwLnJlcGVhdCgoKSUyMCUzRCUzRSUyME1hdGguc2luKHRpbWUpKjEwKSUwQSUyMCUyMC5tb2R1bGF0ZVJvdGF0ZShvMCklMEElMjAlMjAuc2NhbGUoKCklMjAlM0QlM0UlMjBNYXRoLnNpbih0aW1lKSUyQjElMjAqMS41KSUwQSUyMCUyMC5tb2R1bGF0ZShub2lzZSgyJTJDMikpJTBBJTIwJTIwLnJvdGF0ZSgxJTJDJTIwLjIpJTBBJTIwJTIwJTJGJTJGJTIwLmludmVydCgyLjQpJTBBLm91dChvMCklMEE="},{sketch_id:"andromeda_0",code:"JTJGJTJGJTIwMy4wJTBBJTJGJTJGJTIwYnklMjAlQ0UlOTRORFIwTTNEJUNFJTk0JTBBJTJGJTJGJTIwaHR0cHMlM0ElMkYlMkZ3d3cuaW5zdGFncmFtLmNvbSUyRmFuZHJvbTNfZGElMkYlMEElMEElMEFub2lzZSgzJTJDMC4zJTJDMykudGhyZXNoKDAuMyUyQzAuMDMpLmRpZmYobzMlMkMwLjMpLm91dChvMSklMEFncmFkaWVudCglNUIwLjMlMkMwLjMlMkMzJTVEKS5kaWZmKG8wKS5ibGVuZChvMSkub3V0KG8zKSUwQXZvcm9ub2koMzMlMkMzJTJDMzApLnJvdGF0ZSgzJTJDMC4zJTJDMCkubW9kdWxhdGVTY2FsZShvMiUyQzAuMykuY29sb3IoLTMlMkMzJTJDMCkuYnJpZ2h0bmVzcygzKS5vdXQobzApJTBBc2hhcGUoMzAlMkMwLjMlMkMxKS5pbnZlcnQoKCU3QnRpbWUlN0QpJTNEJTNFTWF0aC5zaW4odGltZSkqMykub3V0KG8yKSUwQSUwQXJlbmRlcihvMyklMEE="},{sketch_id:"andromeda_1",code:"JTJGJTJGJTIwMy4zJTBBJTJGJTJGJTIwYnklMjAlQ0UlOTRORFIwTTNEJUNFJTk0JTBBJTJGJTJGJTIwaHR0cHMlM0ElMkYlMkZ3d3cuaW5zdGFncmFtLmNvbSUyRmFuZHJvbTNfZGElMkYlMEElMEFvc2MoKS5tb2R1bGF0ZVJvdGF0ZShvMCUyQzAuMykub3V0KCklMEFvc2MoMzMlMkMwLjMlMkMwLjMpLmRpZmYobzMlMkMzKS5vdXQobzEpJTBBb3NjKDMlMkMwLjMlMkMzMykubW9kdWxhdGVLYWxlaWQobzMlMkMzKS5kaWZmKG8wKS5vdXQobzIpJTBBc3JjKG8wJTJDMykubXVsdChvMSUyQzMpLmthbGVpZCgzKS5vdXQobzMpJTBBcmVuZGVyKG8yKQ=="},{sketch_id:"asdrubal_0",code:"JTJGJTJGQXNkciVDMyVCQWJhbCUyMEdvbWV6JTBBJTBBbm9pc2UoMyUyQzAuMSUyQzcpJTBBLnJvdGF0ZSgxJTJDLTElMkMtMikubWFzayhzaGFwZSgyMCkpJTBBLmNvbG9yYW1hKDAuNSklMEEubW9kdWxhdGVTY2FsZShvMCklMEEubW9kdWxhdGVTY2FsZShvMCUyQzElMkMpJTBBLmJsZW5kKG8wKSUwQS5ibGVuZChvMCklMEEuYmxlbmQobzApJTBBLmJsZW5kKG8wKSUwQS5vdXQobzApJTBB"},{sketch_id:"flor_1",code:"JTJGJTJGSHlkcmElMjBHbGl0Y2h5JTIwU2xpdCUyMFNjYW4lMEElMkYlMkZGbG9yJTIwZGUlMjBGdWVnbyUwQSUyRiUyRmh0dHBzJTNBJTJGJTJGZmxvcmRlZnVlZ28uZ2l0aHViLmlvJTJGJTIwJTBBczAuaW5pdENhbSgpJTBBc3JjKHMwKS5zYXR1cmF0ZSgyKS5jb250cmFzdCgxLjMpLmxheWVyKHNyYyhvMCkubWFzayhzaGFwZSg0JTJDMikuc2NhbGUoMC41JTJDMC43KS5zY3JvbGxYKDAuMjUpKS5zY3JvbGxYKDAuMDAxKSkubW9kdWxhdGUobzAlMkMwLjAwMSkub3V0KG8wKSUwQSUwQQ=="},{sketch_id:"flor_2",code:"JTJGJTJGR2xpdGNoJTIwUml2ZXIlMEElMkYlMkZGbG9yJTIwZGUlMjBGdWVnbyUwQSUyRiUyRmh0dHBzJTNBJTJGJTJGZmxvcmRlZnVlZ28uZ2l0aHViLmlvJTJGJTBBdm9yb25vaSg4JTJDMSklMEEubXVsdChvc2MoMTAlMkMwLjElMkMoKSUzRCUzRU1hdGguc2luKHRpbWUpKjMpLnNhdHVyYXRlKDMpLmthbGVpZCgyMDApKSUwQS5tb2R1bGF0ZShvMCUyQzAuNSklMEEuYWRkKG8wJTJDMC44KSUwQS5zY3JvbGxZKC0wLjAxKSUwQS5zY2FsZSgwLjk5KSUwQS5tb2R1bGF0ZSh2b3Jvbm9pKDglMkMxKSUyQzAuMDA4KSUwQS5sdW1hKDAuMyklMEEub3V0KCklMEElMEElMEFzcGVlZCUyMCUzRCUyMDAuMSUwQSUwQSUwQSUwQQ=="},{sketch_id:"nesso_0",code:"JTBBJTJGJTJGY2xvdWRzJTIwb2YlMjBwYXNzYWdlJTBBJTJGJTJGYnklMjBOZXNzbyUwQSUyRiUyRnd3dy5uZXNzby54eXolMEElMEFzaGFwZSglNUI0JTJDNSUyQzYlNUQuZmFzdCgwLjEpLnNtb290aCgxKSUyQzAuMDAwMDAxJTJDJTVCMC4yJTJDMC43JTVELnNtb290aCgxKSklMEEuY29sb3IoMC4yJTJDMC40JTJDMC4zKSUwQS5zY3JvbGxYKCgpJTNEJTNFTWF0aC5zaW4odGltZSowLjI3KSklMEEuYWRkKCUwQSUyMCUyMHNoYXBlKCU1QjQlMkM1JTJDNiU1RC5mYXN0KDAuMSkuc21vb3RoKDEpJTJDMC4wMDAwMDElMkMlNUIwLjIlMkMwLjclMkMwLjUlMkMwLjMlNUQuc21vb3RoKDEpKSUwQSUyMCUyMC5jb2xvcigwLjYlMkMwLjIlMkMwLjUpJTBBJTIwJTIwLnNjcm9sbFkoMC4zNSklMEElMjAlMjAuc2Nyb2xsWCgoKSUzRCUzRU1hdGguc2luKHRpbWUqMC4zMykpKSUwQS5hZGQoJTBBJTIwJTIwc2hhcGUoJTVCNCUyQzUlMkM2JTVELmZhc3QoMC4xKS5zbW9vdGgoMSklMkMwLjAwMDAwMSUyQyU1QjAuMiUyQzAuNyUyQzAuMyU1RC5zbW9vdGgoMSkpJTBBJTIwJTIwLmNvbG9yKDAuMiUyQzAuNCUyQzAuNiklMEElMjAlMjAuc2Nyb2xsWSgtMC4zNSklMEElMjAlMjAuc2Nyb2xsWCgoKSUzRCUzRU1hdGguc2luKHRpbWUqMC40MSkqLTEpKSUwQS5hZGQoJTBBJTIwJTIwJTIwJTIwJTIwJTIwc3JjKG8wKS5zaGlmdCgwLjAwMSUyQzAuMDElMkMwLjAwMSklMEElMjAlMjAlMjAlMjAlMjAlMjAuc2Nyb2xsWCglNUIwLjA1JTJDLTAuMDUlNUQuZmFzdCgwLjEpLnNtb290aCgxKSklMEElMjAlMjAlMjAlMjAlMjAlMjAuc2NhbGUoJTVCMS4wNSUyQzAuOSU1RC5mYXN0KDAuMykuc21vb3RoKDEpJTJDJTVCMS4wNSUyQzAuOSUyQzElNUQuZmFzdCgwLjI5KS5zbW9vdGgoMSkpJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTJDMC44NSklMEEubW9kdWxhdGUodm9yb25vaSgxMCUyQzIlMkMyKSklMEEub3V0KCk="},{sketch_id:"malitzin_0",code:"JTJGJTJGQ05EU0QlMEElMkYlMkZodHRwJTNBJTJGJTJGbWFsaXR6aW5jb3J0ZXMubmV0JTJGJTBBJTJGJTJGJTIwc2FuZCUyMHNwaXJhbHMlMEElMEFvc2MoMyUyQyUyMDAuMDElMkMlMjAwLjQpJTBBLmNvbG9yKDEuMiUyQzEuMiUyQzEuMyklMEEuc2F0dXJhdGUoMC40KSUwQS5tb2R1bGF0ZVJlcGVhdChvc2MoMiklMkMxJTJDJTIwMiUyQyUyMDQlMkMlMjAzKSUwQS5tb2R1bGF0ZUthbGVpZChvc2MoMTIlMkMwLjA1JTJDMCklMkMxKSUwQS5sdW1hJTIwKDAuNCklMEEucm90YXRlKDQlMkMlMjAwLjElMkMwKSUwQS5tb2R1bGF0ZShvMCUyQyUyMCgpJTIwJTNEJTNFJTIwbW91c2UueSUyMCowLjAwMDIlMjApJTBBLnNjYWxlKDEpLmRpZmYobzEpJTBBLm91dChvMCk="},{sketch_id:"malitzin_1",code:"JTJGJTJGQ05EU0QlMEElMkYlMkZodHRwJTNBJTJGJTJGbWFsaXR6aW5jb3J0ZXMubmV0JTJGJTBBJTJGJTJGYW1lYmElMEElMEFvc2MoMTUlMkMlMjAwLjAxJTJDJTIwMC4xKS5tdWx0KG9zYygxJTJDJTIwLTAuMSkubW9kdWxhdGUob3NjKDIpLnJvdGF0ZSg0JTJDMSklMkMlMjAyMCkpJTBBLmNvbG9yKDAlMkMyLjQlMkM1KSUwQS5zYXR1cmF0ZSgwLjQpJTBBLmx1bWEoMSUyQzAuMSUyQyUyMCg2JTJDJTIwKCklM0QlM0UlMjAxJTIwJTJCJTIwYS5mZnQlNUIzJTVEKSklMEEuc2NhbGUoMC43JTJDJTIwKCklM0QlM0UlMjAwLjclMjAlMkIlMjBhLmZmdCU1QjMlNUQpJTBBLmRpZmYobzApJTJGJTJGJTIwbzAlMEEub3V0KG8wKSUyRiUyRiUyMG8x"},{sketch_id:"malitzin_2",code:"JTJGJTJGQ05EU0QlMEElMkYlMkZodHRwJTNBJTJGJTJGbWFsaXR6aW5jb3J0ZXMubmV0JTJGJTBBJTJGJTJGY3JhenklMjBzcXVhcmVzJTBBJTBBc2hhcGUoNCUyQyUyMCgwLjAxJTJDJTIwKCklM0QlM0UlMjAwLjIlMjAlMkIlMjBhLmZmdCU1QjIlNUQpJTJDMSklMEEubXVsdChvc2MoMSUyQyUyMDEpLm1vZHVsYXRlKG9zYyg1KS5yb3RhdGUoMS40JTJDMSklMkMzKSklMEEuY29sb3IoMSUyQzIlMkM0KSUwQS5zYXR1cmF0ZSgwLjIpJTBBLmx1bWEoMS4yJTJDMC4wNSUyQyUyMCg1JTJDJTIwKCklM0QlM0UlMjAyJTIwJTJCJTIwYS5mZnQlNUIzJTVEKSklMEEuc2NhbGUoMC42JTJDJTIwKCklM0QlM0UlMjAwLjklMjAlMkIlMjBhLmZmdCU1QjMlNUQpJTBBLmRpZmYobzApJTJGJTJGJTIwbzAlMEEub3V0KG8wKSUyRiUyRiUyMG8x"},{sketch_id:"khoparzi_0",code:"JTJGJTJGJTIwSGFwcHklMjBNYW5kYWxhJTBBJTJGJTJGJTIwQnklMjBBYmhpbmF5JTIwS2hvcGFyemklMEElMkYlMkYlMjB0d2l0dGVyJTJGZ2l0aHViJTJGaW5zdGFncmFtJTNBJTIwJTQwa2hvcGFyemklMEF2b3Jvbm9pKDUlMkMtMC4xJTJDNSklMEEuYWRkKG9zYygxJTJDMCUyQzEpKS5rYWxlaWQoMjEpJTBBLnNjYWxlKDElMkMxJTJDMikuY29sb3JhbWEoKS5vdXQobzEpJTBBc3JjKG8xKS5tdWx0KHNyYyhzMCkubW9kdWxhdGVSb3RhdGUobzElMkMxMDApJTJDJTIwLTAuNSklMEElMjAlMjAub3V0KG8wKSUwQSUwQQ=="},{sketch_id:"khoparzi_1",code:"JTJGJTJGJTIwUGVycGV0dWFsJTIwZWxldmF0b3IlMjBidXR0b25zJTBBJTJGJTJGJTIwQnklMjBLaG9wYXJ6aSUwQSUyRiUyRiUyMGh0dHAlM0ElMkYlMkZraG9wYXJ6aS5jb20lMEElMEFzaGFwZSgzKS5hZGQob3NjKDElMkMwLjUlMkMxKSUyQyUyMDEpJTBBJTA5LmFkZChvMSUyQyUyMCgpJTIwJTNEJTNFJTIwKE1hdGguc2luKHRpbWUlMkY0KSUyMColMjAwLjclMjAlMkIlMjAwLjEpKSUwQSUwOSUyRiUyRi5yZXBlYXQoNSklMEElMjAlMjAlMDkuc2NhbGUoKCklM0QlM0VNYXRoLnNpbih0aW1lJTIwJTJGJTIwMTYpKS5yb3RhdGUoMCUyQyUyMC0wLjEpJTBBJTA5Lm91dChvMSklMEElMEFzcmMobzEpJTBBJTIwJTIwLnJvdGF0ZSgwJTJDMC4xKSUwQSUyMCUyMC5vdXQoKQ=="},{sketch_id:"khoparzi_2",code:"JTJGJTJGJTIwUmVhbGx5JTIwTG92ZSUwQSUyRiUyRiUyMGJ5JTIwQWJoaW5heSUyMEtob3BhcnppJTBBJTJGJTJGJTIwaHR0cCUzQSUyRiUyRmtob3BhcnppLmNvbSUwQW9zYygxMDAlMkMtMC4wMTI0NSUyQzEpLnBpeGVsYXRlKDUwKS5rYWxlaWQoKCklM0QlM0UoTWF0aC5zaW4odGltZSUyRjgpKjklMkIzKSkucm90YXRlKDAlMkMwLjEyNSklMEEubW9kdWxhdGVSb3RhdGUoc2hhcGUoMykuc2NhbGUoKCklM0QlM0UoTWF0aC5jb3ModGltZSkqMikpLnJvdGF0ZSgwJTJDLTAuMjUpKS5kaWZmKHNyYyhvMCkuYnJpZ2h0bmVzcygwLjMpKSUwQSUyMCUyMC5vdXQoKQ=="},{sketch_id:"khoparzi_3",code:"JTJGJTJGJTIwQXFhdXRpYyUyMGJsdWJzJTBBJTJGJTJGJTIwQnklMjBLaG9wYXJ6aSUwQSUyRiUyRiUyMGh0dHBzJTNBJTJGJTJGa2hvcGFyemkuY29tJTBBJTBBZ3JhZGllbnQoMC4yNSklMEEuYWRkKG5vaXNlKCklMkMlMjAoKSUzRCUzRU1hdGguY29zKHRpbWUpKSUwQS5tb2R1bGF0ZVJvdGF0ZShzcmMobzApLnJvdGF0ZSgwJTJDJTIwLTAuNTIpJTJDJTIwMC4yKS5tdWx0KHNoYXBlKDM2MCklMkMlMjAwLjgpJTBBLnJlcGVhdCgxMCUyQzUpLm11bHQoc2hhcGUoMzYwKS5zY2FsZSgoKSUzRCUzRU1hdGguc2luKHRpbWUpKSUyQyUyMDAuOCkucm90YXRlKDAlMkMlMjAwLjIpJTBBLmRpZmYoc3JjKG8wKS5yb3RhdGUoMCUyQyUyMC0wLjIpJTJDJTIwMC4yKSUwQS5vdXQoKQ=="},{sketch_id:"celeste_0",code:"JTBBJTIwJTJGJTJGJTIwUHVlcnRhcyUyMElJJTBBJTJGJTJGJTIwcG9yJTIwQ2VsZXN0ZSUyMEJldGFuY3VyJTBBJTJGJTJGJTIwaHR0cHMlM0ElMkYlMkZnaXRodWIuY29tJTJGZXNzdGViYW4lMEElMEFvc2MoMTMlMkMwJTJDMSklMEElMjAlMjAua2FsZWlkKCklMEElMjAlMjAubWFzayhzaGFwZSg0JTJDMC4zJTJDMSkpJTBBJTIwJTIwLm1vZHVsYXRlUm90YXRlKHNoYXBlKDQlMkMwLjElMkMxKSklMEElMjAlMjAubW9kdWxhdGVSb3RhdGUoc2hhcGUoNCUyQzAuMSUyQzAuOSkpJTBBJTIwJTIwLm1vZHVsYXRlUm90YXRlKHNoYXBlKDQlMkMwLjElMkMwLjgpKSUwQSUyMCUyMC5zY2FsZSgwLjMpJTBBJTIwJTIwLmFkZChzaGFwZSg0JTJDMC4yJTJDMSkuY29sb3IoMC4zJTJDMSUyQzElMkMwLjUpKSUwQSUyMCUyMC5yb3RhdGUoKCklM0QlM0V0aW1lKSUwQSUyMCUyMC5vdXQoKQ=="},{sketch_id:"celeste_1",code:"JTJGJTJGJTIwUHVlcnRhcyUyMElJSSUwQSUyRiUyRiUyMHBvciUyMENlbGVzdGUlMjBCZXRhbmN1ciUwQSUyRiUyRiUyMGh0dHBzJTNBJTJGJTJGZ2l0aHViLmNvbSUyRmVzc3RlYmFuJTBBJTIwJTBBb3NjKDQwJTJDMC4yJTJDMSklMEElMjAlMjAubW9kdWxhdGVTY2FsZShvc2MoNDAlMkMwJTJDMSkua2FsZWlkKDgpKSUwQSUyMCUyMC5yZXBlYXQoMiUyQzQpJTBBJTIwJTIwLm1vZHVsYXRlKG8wJTJDMC4wNSklMEElMjAlMjAubW9kdWxhdGVLYWxlaWQoc2hhcGUoNCUyQzAuMSUyQzEpKSUwQSUyMCUyMC5vdXQobzAp"},{sketch_id:"celeste_2",code:"JTBBJTIwJTJGJTJGJTIwUHVlcnRhcyUwQSUyRiUyRiUyMHBvciUyMENlbGVzdGUlMjBCZXRhbmN1ciUwQSUyRiUyRiUyMGh0dHBzJTNBJTJGJTJGZ2l0aHViLmNvbSUyRmVzc3RlYmFuJTBBJTBBb3NjKDEzJTJDMCUyQzEpJTBBJTIwJTIwLm1vZHVsYXRlKG9zYygyMSUyQzAuMjUlMkMwKSklMEElMjAlMjAubW9kdWxhdGVTY2FsZShvc2MoMzQpKSUwQSUyMCUyMC5tb2R1bGF0ZUthbGVpZChvc2MoNTUpJTJDMC4xJTJDMSklMEElMjAlMjAub3V0KCk="},{sketch_id:"alexandre_0",code:"JTJGJTJGJTIwJTIydGhlLXdhbGwlMjIlMEElMkYlMkYlMjBBbGV4YW5kcmUlMjBSYW5nZWwlMEElMkYlMkYlMjB3d3cuYWxleGFuZHJlcmFuZ2VsLmFydC5iciUyRmh5ZHJhLmh0bWwlMEElMEFzcGVlZCUzRC4wMjIyJTBBb3NjKDQ4JTJDLS4xJTJDMCkudGhyZXNoKCU1Qi4zJTJDLjclNUQuZmFzdCguNzUpJTJDMCkuY29sb3IoMCUyQzAlMkMxKSUwQSUwQS5hZGQoJTBBJTIwJTIwJTIwJTIwb3NjKDI4JTJDLjElMkMwKS50aHJlc2goJTVCLjMlMkMuNyU1RC5mYXN0KC43NSklMkMwKS5yb3RhdGUoMy4xNCUyRjQpJTBBJTIwJTIwJTIwJTIwLmNvbG9yKDElMkMwJTJDMCklMEElMjAlMjAlMjAlMjAubW9kdWxhdGVTY2FsZSglMjBvc2MoNjQlMkMtLjAxJTJDMCkudGhyZXNoKCU1Qi4zJTJDLjclNUQuZmFzdCguNzUpJTJDMCklMjApJTBBKSUwQS5kaWZmKCUwQSUyMCUyMCUyMCUyMG9zYygyOCUyQy4xJTJDMCkudGhyZXNoKCU1Qi4zJTJDLjclNUQuZmFzdCguNSklMkMwKS5yb3RhdGUoMy4xNCUyRjIpJTBBJTIwJTIwJTIwJTIwLmNvbG9yKDElMkMwJTJDMSklMEElMjAlMjAlMjAlMjAubW9kdWxhdGVTY2FsZSglMjBvc2MoNjQlMkMtLjAxNSUyQzApLnRocmVzaCglNUIuMyUyQy43JTVELmZhc3QoLjUpJTJDMCklMjApJTBBKSUwQS5tb2R1bGF0ZVJvdGF0ZSglMjBvc2MoNTQlMkMtLjAwNSUyQzApLnRocmVzaCglNUIuMyUyQy43JTVELmZhc3QoLjI1KSUyQzApJTIwKSUwQS5tb2R1bGF0ZVNjYWxlKCUyMG9zYyg0NCUyQy0uMDIwJTJDMCkudGhyZXNoKCU1Qi4zJTJDLjclNUQuZmFzdCguMjUpJTJDMCklMjApJTBBLmNvbG9yYW1hKCUyMCgpJTNEJTNFTWF0aC5zaW4odGltZSUyRjI3KSouMDEyMjIlMkI5Ljg5KSUwQS5zY2FsZSgyLjEyMiklMEElMEEub3V0KCk="},{sketch_id:"alexandre_1",code:"JTBBJTIwJTJGJTJGJTIwJTIyZXllJTIwb2YlMjB0aGUlMjBiZWhvbGRlciUyMiUwQSUyRiUyRiUyMEFsZXhhbmRyZSUyMFJhbmdlbCUwQSUyRiUyRiUyMHd3dy5hbGV4YW5kcmVyYW5nZWwuYXJ0LmJyJTJGaHlkcmEuaHRtbCUwQSUwQW5vaXNlKDYlMkMuMDUpJTBBLm11bHQoJTIwb3NjKDklMkMwJTJDJTIwKCklM0QlM0VNYXRoLnNpbih0aW1lJTJGMS41KSUyQjIlMjApJTIwKSUwQS5tdWx0KCUwQSUyMCUyMCUyMCUyMG5vaXNlKDklMkMuMDMpLmJyaWdodG5lc3MoMS4yKS5jb250cmFzdCgyKSUwQSUyMCUyMCUyMCUyMC5tdWx0KCUyMG9zYyg5JTJDMCUyQyUyMCgpJTNEJTNFTWF0aC5zaW4odGltZSUyRjMpJTJCMTMlMjApJTIwKSUwQSklMEEuZGlmZiglMEElMjAlMjAlMjAlMjBub2lzZSgxNSUyQy4wNCkuYnJpZ2h0bmVzcyguMikuY29udHJhc3QoMS4zKSUwQSUyMCUyMCUyMCUyMC5tdWx0KCUyMG9zYyg5JTJDMCUyQyUyMCgpJTNEJTNFTWF0aC5zaW4odGltZSUyRjUpJTJCMTMlMjApJTIwKSUwQSUyMCUyMCUyMCUyMC5yb3RhdGUoJTIwKCklM0QlM0V0aW1lJTJGMzMlMjApJTBBKSUwQS5zY2FsZSglMjAoKSUzRCUzRU1hdGguc2luKHRpbWUlMkY2LjIpKi4xMiUyQi4xNSUyMCklMEEubW9kdWxhdGVTY2FsZSglMEElMjAlMjAlMjAlMjBvc2MoMyUyQzAlMkMwKS5tdWx0KCUyMG9zYygzJTJDMCUyQzApLnJvdGF0ZSgzLjE0JTJGMiklMjApJTBBJTIwJTIwJTIwJTIwLnJvdGF0ZSglMjAoKSUzRCUzRXRpbWUlMkYyNSUyMCkuc2NhbGUoLjM5KS5zY2FsZSgxJTJDLjYlMkMxKS5pbnZlcnQoKSUwQSUyMCUyMCUyMCUyMCUyQyUyMCgpJTNEJTNFTWF0aC5zaW4odGltZSUyRjUuMykqMS41JTJCMyUyMCUyMCklMEEucm90YXRlKCUyMCgpJTNEJTNFdGltZSUyRjIyJTIwKSUwQS5tdWx0KCUyMHNoYXBlKDEwMCUyQy45JTJDLjAxKS5zY2FsZSgxJTJDLjYlMkMxKSUyMCklMEEub3V0KCk="},{sketch_id:"alexandre_2",code:"JTJGJTJGJTIwJTIyZWdnJTIwb2YlMjB0aGUlMjBwaG9lbml4JTIyJTBBJTJGJTJGJTIwQWxleGFuZHJlJTIwUmFuZ2VsJTBBJTJGJTJGJTIwd3d3LmFsZXhhbmRyZXJhbmdlbC5hcnQuYnIlMkZoeWRyYS5odG1sJTBBJTBBc3BlZWQlM0QxLjIlMEFzaGFwZSg5OSUyQy4xNSUyQy41KS5jb2xvcigwJTJDMSUyQzIpJTBBJTBBLmRpZmYoJTIwc2hhcGUoMjQwJTJDLjUlMkMwKS5zY3JvbGxYKC4wNSkucm90YXRlKCUyMCgpJTNEJTNFdGltZSUyRjEwJTIwKS5jb2xvcigxJTJDMCUyQy43NSklMjApJTBBLmRpZmYoJTIwc2hhcGUoOTklMkMuNCUyQy4wMDIpLnNjcm9sbFgoLjEwKS5yb3RhdGUoJTIwKCklM0QlM0V0aW1lJTJGMjAlMjApLmNvbG9yKDElMkMwJTJDLjc1KSUyMCklMEEuZGlmZiglMjBzaGFwZSg5OSUyQy4zJTJDLjAwMikuc2Nyb2xsWCguMTUpLnJvdGF0ZSglMjAoKSUzRCUzRXRpbWUlMkYzMCUyMCkuY29sb3IoMSUyQzAlMkMuNzUpJTIwKSUwQS5kaWZmKCUyMHNoYXBlKDk5JTJDLjIlMkMuMDAyKS5zY3JvbGxYKC4yMCkucm90YXRlKCUyMCgpJTNEJTNFdGltZSUyRjQwJTIwKS5jb2xvcigxJTJDMCUyQy43NSklMjApJTBBLmRpZmYoJTIwc2hhcGUoOTklMkMuMSUyQy4wMDIpLnNjcm9sbFgoLjI1KS5yb3RhdGUoJTIwKCklM0QlM0V0aW1lJTJGNTAlMjApLmNvbG9yKDElMkMwJTJDLjc1KSUyMCklMEElMEEubW9kdWxhdGVTY2FsZSglMEElMjAlMjBzaGFwZSgyNDAlMkMuNSUyQzApLnNjcm9sbFgoLjA1KS5yb3RhdGUoJTIwKCklM0QlM0V0aW1lJTJGMTAlMjApJTBBJTIwJTIwJTJDJTIwKCklM0QlM0UoTWF0aC5zaW4odGltZSUyRjMpKi4yKSUyQi4yJTIwKSUwQSUwQS5zY2FsZSgxLjYlMkMuNiUyQzEpJTBBLm91dCgp"},{sketch_id:"afalfl_0",code:"JTJGJTJGZmlsZXQlMjBtaWdub24lMEElMkYlMkYlMjBBRkFMRkwlMEElMkYlMkYlMjBpbnN0YWdyYW0lMkZhX2ZfYWxmbCUyMCUwQSUwQW9zYygxMDAlMkMtMC4wMDE4JTJDMC4xNykuZGlmZihvc2MoMjAlMkMwLjAwMDA4KS5yb3RhdGUoTWF0aC5QSSUyRjAuMDAwMDMpKSUwQS5tb2R1bGF0ZVNjYWxlKG5vaXNlKDEuNSUyQzAuMTgpLm1vZHVsYXRlU2NhbGUob3NjKDEzKS5yb3RhdGUoKCklM0QlM0VNYXRoLnNpbih0aW1lJTJGMjIpKSklMkMzKSUwQS5jb2xvcigxMSUyQzAuNSUyQzAuNCUyQyUyMDAuOSUyQyUyMDAuMiUyQyUyMDAuMDExJTJDJTIwNSUyQyUyMDIyJTJDJTIwJTIwMC41JTJDJTIwLTEpLmNvbnRyYXN0KDEuNCklMEEuYWRkKHNyYyhvMCkubW9kdWxhdGUobzAlMkMuMDQpJTJDLjYlMkMlMjAuOSklMEElMjAlMjAlMkYlMkYucGl4ZWxhdGUoMC40JTJDJTIwMC4yJTJDJTIwMC4xKSUwQS5pbnZlcnQoKS5icmlnaHRuZXNzKDAuMDAwMyUyQyUyMDIpLmNvbnRyYXN0KCUyMDAuNSUyQyUyMDIlMkMlMjAwLjElMkMlMjAyKS5jb2xvcig0JTJDJTIwLTIlMkMlMjAwLjEpJTBBLm1vZHVsYXRlU2NhbGUob3NjKDIpJTJDLTAuMiUyQyUyMDIlMkMlMjAxJTJDJTIwMC4zKSUwQSUyMC5wb3N0ZXJpemUoMjAwKSUyMC5yb3RhdGUoMSUyQyUyMDAuMiUyQyUyMDAuMDElMkMlMjAwLjAwMSklMEElMjAuY29sb3IoMjIlMkMlMjAtMiUyQyUyMDAuNSUyQyUyMDAuNSUyQyUyMDAuMDAwMSUyQyUyMCUyMDAuMSUyQyUyMDAuMiUyQyUyMDgpLmNvbnRyYXN0KDAuMTglMkMlMjAwLjMlMkMlMjAwLjElMkMlMjAwLjIlMkMlMjAwLjAzJTJDJTIwMSklMjAuJTIwYnJpZ2h0bmVzcygwLjAwMDElMkMlMjAtMSUyQyUyMDEwKSUwQSUwOS5vdXQoKQ=="},{sketch_id:"eerie_ear_0",code:"JTJGJTJGJTIwZWVfMiUyMC4lMjBNVUxUSVZFUlNFJTIwLiUyMHRpbWUlMjBhbmQlMjBmZWVkYmFjayUwQSUyRiUyRiUyMGVfZSUyMCUyRiUyRiUyMCU0MGVlcmllX2VhciUwQXBhdCUyMCUzRCUyMCgpJTNEJTNFJTBBc29saWQoKSUwQS5sYXllcihzb2xpZCgpLmRpZmYoJTBBJTIwJTIwb3NjKCh0aW1lJTJGMTYpJTIwKiUyMDElMkMlMjAodGltZSUyRjEwMDApJTIwKiUyMDAuMiUyMCUyMCklMEElMjAlMjAlMjAlMjAubXVsdChvc2MoKHRpbWUlMkY4KSUyMColMjAxJTJDJTIwKHRpbWUlMkYxMDA2KSUyMColMjAwLjIlMjAlMjApLnJvdGF0ZSgxLjU3KSklMEElMjAlMjAlMjAlMjAubW9kdWxhdGUoKHNoYXBlKDEwNiUyQzElMkMwLjA1KSkpJTBBJTIwJTIwJTIwJTIwLm11bHQoc2hhcGUoMTA2JTJDMSUyQzAuMDUpKSUwQSUyMCUyMCkpJTBBJTIwJTIwLm1vZHVsYXRlU2NhbGUob3NjKDIlMkMwLjEyNSklMkMwLjEyNSklMEElMkYlMkYlMEFzb2xpZCgpJTBBLmxheWVyKHNvbGlkKDElMkMxJTJDMSklMEElMjAlMjAubXVsdChwYXQoKSUwQSUyMCUyMC5kaWZmKHNyYyhvMCkuc2NhbGUoMC4yKS5tdWx0KHNvbGlkKCklMkMlNUIwLjclMkMwLjYlMkMwLjQlMkMwLjYlNUQpLmthbGVpZCgxLjAxKS5zYXR1cmF0ZSgwLjMpKSUwQSklMEEubGF5ZXIoc29saWQoMSUyQzElMkMxKSUwQSUyMCUyMCUyMCUyMC5tYXNrKCUwQSUyMCUyMCUyMCUyMCUyMCUyMG5vaXNlKDIlMkMwLjA1KSUwQSUyMCUyMCUyMCUyMCUyMCUyMC5pbnZlcnQoKS5jb2xvcmFtYSgyKS5wb3N0ZXJpemUoOCUyQzQpLmx1bWEoMC4yNSkudGhyZXNoKDAuNSklMEElMjAlMjAlMjAlMjAlMjAlMjAubW9kdWxhdGVSb3RhdGUob3NjKDElMkMwLjUpKSUwQSUyMCUyMCUyMCUyMCklMEElMjAlMjAlMjAlMjAubXVsdChncmFkaWVudCgwLjUpLmthbGVpZCgxKS5jb2xvcmFtYSgyKS5zYXR1cmF0ZSgxLjEpLmNvbnRyYXN0KDEuNikubXVsdChzb2xpZCgpJTJDMC40NSkpJTBBJTIwJTIwKSklMEElMjAlMjAub3V0KCklMEElMkYlMkYlMEFzcGVlZCUzRCUyMDAuNSUwQQ=="},{sketch_id:"eerie_ear_1",code:"JTJGJTJGJTIwZWVfMyUyMCUyRiUyRkxJTkVTJTBBJTJGJTJGJTIwZV9lJTIwJTJGJTJGJTIwJTQwZWVyaWVfZWFyJTBBJTJGJTJGJTBBJTJGJTJGYmFzZWQlMjBvbiUwQSUyRiUyRiU0MG5hb3RvX2hpZWRhJTBBJTJGJTJGaHR0cHMlM0ElMkYlMkZuYW90b2hpZWRhLmNvbSUyRmJsb2clMkZoeWRyYS1ib29rJTJGJTBBJTJGJTJGJTBBbiUyMCUzRCUyMDglMEFhJTIwJTNEJTIwKCklMjAlM0QlM0UlMjBzaGFwZSg0JTJDMC4yNSUyQzAuMDA5KS5yb3RhdGUoKCklM0QlM0V0aW1lJTJGLTQwKS5yZXBlYXQobiUyQ24pJTBBYSgpLmFkZChhKCkuc2Nyb2xsWCgwLjUlMkZuKS5zY3JvbGxZKDAuNSUyRm4pJTJDMSkubW9kdWxhdGUobzElMkMwLjEpLm1vZHVsYXRlKHNyYyhvMSkuY29sb3IoMTAlMkMxMCkuYWRkKHNvbGlkKC0xNCUyQy0xNCkpLnJvdGF0ZSgoKSUzRCUzRXRpbWUlMkY0MCklMkMwLjAwNSkuYWRkKHNyYyhvMSkuc2Nyb2xsWSgwLjAxMiUyQzAuMDIpJTJDMC41KS5vdXQobzEpJTBBc3JjKG8xKS5jb2xvcmFtYSgxLjIpLnBvc3Rlcml6ZSg0KS5zYXR1cmF0ZSgwLjcpLmNvbnRyYXN0KDYpLm11bHQoc29saWQoKSUyQzAuMTUpLm91dChvMCklMEElMEElMEE="},{sketch_id:"eerie_ear_2",code:"JTJGJTJGZWVfNSUyMC4lMjBGVUdJVElWRSUyMEdFT01FVFJZJTIwVkhTJTIwLiUyMGF1ZGlvcmVhY3RpdmUlMjBzaGFwZXMlMjBhbmQlMjBncmFkaWVudHMlMEElMkYlMkYlMjBlX2UlMjAlMkYlMkYlMjAlNDBlZXJpZV9lYXIlMEElMkYlMkYlMEFzJTNEJTIwKCklM0QlM0UlMEElMjAlMjBzaGFwZSg0KSUwQS5zY3JvbGxYKCU1Qi0wLjUlMkMtMC4yJTJDMC4zJTJDLTAuMSUyQy0wLjElNUQuc21vb3RoKDAuMSkuZmFzdCgwLjMpKSUwQS5zY3JvbGxZKCU1QjAuMjUlMkMtMC4yJTJDMC4zJTJDLTAuMSUyQzAuMiU1RC5zbW9vdGgoMC45KS5mYXN0KDAuMTUpKSUwQSUyRiUyRiUwQXNvbGlkKCklMEEuYWRkKGdyYWRpZW50KDMlMkMwLjA1KS5yb3RhdGUoMC4wNSUyQy0wLjIpLnBvc3Rlcml6ZSgyKS5jb250cmFzdCgwLjYpJTJDJTVCMSUyQzAlMkMxJTJDMC41JTJDMCUyQzAuNiU1RC5zbW9vdGgoMC45KSklMEEuYWRkKHMoKSklMEEubXVsdChzKCkuc2NhbGUoMC44KS5zY3JvbGxYKDAuMDEpLnNjcm9sbFkoLTAuMDEpLnJvdGF0ZSgwLjIlMkMwLjA2KS5hZGQoZ3JhZGllbnQoMykuY29udHJhc3QoMC42KSUyQyU1QjElMkMwJTJDMSUyQzAuNSU1RC5zbW9vdGgoMC45KSUyQzAuNSkubXVsdChzcmMobzApLnNjYWxlKDAuOTgpJTJDKCklM0QlM0VhLmZmdCU1QjAlNUQqOSklMEElMjAlMjAlMjAlMjAlMjApJTBBLmRpZmYocygpLm1vZHVsYXRlKHNoYXBlKDUwMCkpLnNjYWxlKCU1QjEuNyUyQzEuMiU1RC5zbW9vdGgoMC45KS5mYXN0KDAuMDUpKSklMEEuYWRkKGdyYWRpZW50KDIpLmludmVydCgpJTJDKCklM0QlM0VhLmZmdCU1QjIlNUQpJTBBLm11bHQoZ3JhZGllbnQoKCklM0QlM0VhLmZmdCU1QjMlNUQqOCkpJTBBLmJsZW5kKHNyYygobzApJTJDKCklM0QlM0VhLmZmdCU1QjElNUQqNDApKSUwQS5hZGQodm9yb25vaSgoKSUzRCUzRWEuZmZ0JTVCMSU1RCUyQygpJTNEJTNFYS5mZnQlNUIzJTVEJTJDKCklM0QlM0VhLmZmdCU1QjAlNUQpLnRocmVzaCgwLjcpLnBvc3Rlcml6ZSgyJTJDNCkubHVtYSgwLjkpLnNjcm9sbFkoMSUyQygpJTNEJTNFYS5mZnQlNUIwJTVEJTJGMzApLmNvbG9yYW1hKDMpLnRocmVzaCgoKSUzRCUzRWEuZmZ0JTVCMSU1RCkuc2NhbGUoKCklM0QlM0VhLmZmdCU1QjMlNUQqMiklMkMoKSUzRCUzRWEuZmZ0JTVCMCU1RCUyRjIpJTBBJTIwJTIwLm91dCgpJTBBJTJGJTJGJTBBc3BlZWQlM0QlMjAxJTBBJTBBYS5zZXRTbW9vdGgoMC45Nik="},{sketch_id:"eerie_ear_3",code:"JTJGJTJGJTIwZWVfMSUyMC4lMjBFWUUlMjBJTiUyMFRIRSUyMFNLWSUwQSUyRiUyRmV4YW1wbGUlMjBvZiUyMG1hc2slMjBhbmQlMjBmdW5jdGlvbiUyMG1vZHVsYXRpb24lMEElMkYlMkYlMjBlX2UlMjAlMkYlMkYlMjAlNDBlZXJpZV9lYXIlMEFub2lzZSgxOCklMEElMjAlMjAuY29sb3JhbWEoMSklMEElMjAlMjAucG9zdGVyaXplKDIpJTBBJTIwJTIwLmthbGVpZCg1MCklMEElMjAlMjAubWFzayglMEElMjAlMjAlMjAlMjBzaGFwZSgyNSUyQyUyMDAuMjUpLm1vZHVsYXRlU2NhbGUoJTBBJTIwJTIwJTIwJTIwJTIwJTIwbm9pc2UoNDAwLjUlMkMlMjAwLjUpJTBBJTIwJTIwJTIwJTIwKSUwQSUyMCUyMCklMEElMjAlMjAubWFzayhzaGFwZSg0MDAlMkMlMjAxJTJDJTIwMi4xMjUpKSUwQSUyMCUyMC5tb2R1bGF0ZVNjYWxlKG9zYyg2JTJDJTIwMC4xMjUlMkMlMjAwLjA1KS5rYWxlaWQoNTApKSUwQSUyMCUyMC5tdWx0KG9zYygyMCUyQyUyMDAuMDUlMkMlMjAyLjQpLmthbGVpZCg1MCklMkMlMjAwLjI1KSUwQSUyMCUyMC5zY2FsZSgxLjc1JTJDJTIwMC42NSUyQyUyMDAuNSklMEElMjAlMjAubW9kdWxhdGUobm9pc2UoMC41KSklMEElMjAlMjAuc2F0dXJhdGUoNiklMEElMjAlMjAucG9zdGVyaXplKDQlMkMlMjAwLjIpJTBBJTIwJTIwLnNjYWxlKDEuNSklMEElMjAlMjAub3V0KCklM0IlMEE="}],yg="// licensed with CC BY-NC-SA 4.0 https://creativecommons.org/licenses/by-nc-sa/4.0/";class JS{constructor(t,r,n){this.sketches=[],this.examples=[],this.current=null,this.code=null,this.exampleIndex=null,this.state=r,this.emitter=n,this.serverURL=this.state.serverURL===null?"":this.state.serverURL,this.examples=IS,this.setSketchFromURL(window.location.search,t),window.addEventListener("popstate",o=>{this.setSketchFromURL(window.location.search,t)}),this.setRandomSketch=this.setRandomSketch.bind(this)}clear(){this.current=null,this.code=null;let t=window.location.protocol+"//"+window.location.host+window.location.pathname;window.history.pushState({path:t},"",t),this.url=t}setSketchFromURL(t=window.location.search,r){hush(),render(o0);let n=new URLSearchParams(t);this.searchParams=n;let o=n.get("code"),a=n.get("sketch_id"),f=n.get("showCode");if(console.log("code is",o),this.foundSketch=!1,a){var h=this.getExampleById(a);h?(this.setSketch(h),r(this.code,!1)):mf.get(`${this.state.serverURL}/sketchById`).query({sketch_id:a}).end((p,v)=>{p?(console.log("err getting sketches",p),this.setSketchFromCode(o,r)):(this.sketches=JSON.parse(v.text),this.sketches.length>0?(this.setSketch(this.sketches[0]),this.foundSketch=!0,r(this.code,this.foundSketch)):this.setSketchFromCode(o,r))})}else this.setSketchFromCode(o,r);f==="false"&&(this.emitter.emit("ui: hide all"),this.emitter.emit("hide info"))}setSketchFromCode(t,r){t?(this.code=this.decodeBase64(t),this.foundSketch=!0):this.setRandomSketch(),r(this.code,this.foundSketch)}saveImage(){}setToURL(t){this.searchParams.delete("sketch_id"),this.searchParams.delete("code"),t.sketch_id?(`${t.sketch_id}`,this.searchParams.append("sketch_id",t.sketch_id)):(`${t.sketch_id}${t.code}`,this.searchParams.append("sketch_id",t.sketch_id),this.searchParams.append("code",t.code));let r=window.location.protocol+"//"+window.location.host+window.location.pathname+"?"+this.searchParams.toString();window.history.replaceState({path:r},"",r),this.url=r}encodeBase64(t){return btoa(encodeURIComponent(t))}decodeBase64(t){return decodeURIComponent(atob(t))}setSketch(t){let r=this.decodeBase64(t.code);r.indexOf(yg)<0&&(r=`${yg}
|
||
${r}
|
||
`),this.code=r,this.current=t,this.setToURL(t)}setRandomSketch(){if(this.examples.length>0){let r;for(r=Math.floor(Math.random()*this.examples.length);r===this.exampleIndex;)r=Math.floor(Math.random()*this.examples.length);this.exampleIndex=r,this.setSketch(this.examples[r])}else{var t="osc(2"+Math.floor(Math.pow(10,Math.random()*2))+")";t+=".color("+Math.random().toFixed(2)+","+Math.random().toFixed(2)+","+Math.random().toFixed(2)+")",t+=".rotate("+Math.random().toFixed(2)+")",t+=".out(o0)",this.code=t}}shareSketch(t,r,n){this.saveSketch(t,()=>{console.log("URL is",this.url,"sketch is",this.current),r.getScreenImage(o=>{mf.post(`${this.state.serverURL}/image`).attach("previewImage",o).query({url:this.url,sketch_id:this.current.sketch_id,name:n}).end((a,f)=>{a?console.log("error postingimage",a):console.log("image response",f.text)})})})}saveSketch(t,r){let n=this,o=this.encodeBase64(t),a={code:o,parent:this.current?this.current.sketch_id:null};console.log("saving in gallery",a),mf.post(`${this.state.serverURL}/sketch`).query(a).end((f,h)=>{f?(console.log("error posting sketch",f),r&&r(f)):(console.log("response",h.text),n.setSketch({sketch_id:h.text,code:o}),r&&r(null))})}saveLocally(t){let r=this.encodeBase64(t);this.searchParams.delete("sketch_id"),this.searchParams.delete("code"),this.searchParams.append("code",r);var n=this.searchParams.toString();let o=window.location.protocol+"//"+window.location.host+window.location.pathname+"?"+n;window.history.pushState({path:o},"",o),this.url=o}getExampleById(t){var r=this.examples.filter(n=>n.sketch_id===t);return r.length<=0&&(r=this.sketches.filter(n=>n.sketch_id===t)),r[0]}}let Nr;function NS(e,t){t.on("DOMContentLoaded",function(){Nr=new JS((r,n)=>{t.emit("load and eval code",r,!1),n?t.emit("ui: hide info"):t.emit("ui: show info"),t.emit("render")},e,t),e.gallery=Nr}),t.on("gallery: save to URL",function(r){Nr.saveLocally(r)}),t.on("gallery: clear",()=>{Nr.clear()}),t.on("gallery:shareSketch",function(){const n=e.editor.editor.getValue();t.emit("repl: eval",n,(o,a)=>{a?console.warn(a):OS(f=>{Nr.shareSketch(n,e.hydra.hydra,f)},()=>{})})}),t.on("gallery:showExample",()=>{const r=e.editor.editor;t.emit("clear all"),Nr.setRandomSketch(),t.emit("repl: eval",Nr.code),r.setValue(Nr.code)})}function OS(e,t){var r=prompt(`
|
||
|
||
HYDRA SKETCH GALLERY
|
||
///////////////////////////////////////
|
||
|
||
🎨 Add your sketch to the gallery of hydra sketches at https://botsin.space/@hydra.
|
||
|
||
✍️ Type your name, mastodon handle, or a short description below, and then press 'OK' to share.
|
||
|
||
‼️ Make sure you are ready to share - there is no undo button!
|
||
|
||
💖 Thank you for sharing! You are also warmly invited to join the the live coding server on the fediverse at https://social.toplap.org/.
|
||
`,"");r!==null?e(r):t()}var BS=FS,mg={class:"className",for:"htmlFor","http-equiv":"httpEquiv"};function FS(e){return function(t,r,n){for(var o in r)o in mg&&(r[mg[o]]=r[o],delete r[o]);return e(t,r,n)}}var DS=BS,qn=0,$i=1,si=2,$a=3,Ji=4,Mt=5,vf=6,gn=7,Bt=8,as=9,ls=10,bo=11,yn=12,es=13,jS=function(e,t){t||(t={});var r=t.concat||function(o,a){return String(o)+String(a)};return t.attrToProp!==!1&&(e=DS(e)),function(o){for(var a=$i,f="",h=arguments.length,p=[],v=0;v<o.length;v++)if(v<h-1){var _=arguments[v+1],y=F(o[v]),m=a;m===ls&&(m=Bt),m===as&&(m=Bt),m===gn&&(m=Bt),m===Ji&&(m=Mt),m===si?f==="/"?(y.push([si,"/",_]),f=""):y.push([si,_]):m===es&&t.comments?f+=String(_):m!==es&&y.push([qn,m,_]),p.push.apply(p,y)}else p.push.apply(p,F(o[v]));for(var x=[null,{},[]],U=[[x,-1]],v=0;v<p.length;v++){var R=U[U.length-1][0],y=p[v],S=y[0];if(S===si&&/^\//.test(y[1])){var g=U[U.length-1][1];U.length>1&&(U.pop(),U[U.length-1][0][2][g]=e(R[0],R[1],R[2].length?R[2]:void 0))}else if(S===si){var L=[y[1],{},[]];R[2].push(L),U.push([L,R[2].length-1])}else if(S===Mt||S===qn&&y[1]===Mt){for(var G="",O;v<p.length;v++)if(p[v][0]===Mt)G=r(G,p[v][1]);else if(p[v][0]===qn&&p[v][1]===Mt)if(typeof p[v][2]=="object"&&!G)for(O in p[v][2])p[v][2].hasOwnProperty(O)&&!R[1][O]&&(R[1][O]=p[v][2][O]);else G=r(G,p[v][2]);else break;p[v][0]===bo&&v++;for(var P=v;v<p.length;v++)if(p[v][0]===Bt||p[v][0]===Mt)R[1][G]?p[v][1]===""||(R[1][G]=r(R[1][G],p[v][1])):R[1][G]=n(p[v][1]);else if(p[v][0]===qn&&(p[v][1]===Bt||p[v][1]===Mt))R[1][G]?p[v][2]===""||(R[1][G]=r(R[1][G],p[v][2])):R[1][G]=n(p[v][2]);else{G.length&&!R[1][G]&&v===P&&(p[v][0]===$a||p[v][0]===yn)&&(R[1][G]=G.toLowerCase()),p[v][0]===$a&&v--;break}}else if(S===Mt)R[1][y[1]]=!0;else if(S===qn&&y[1]===Mt)R[1][y[2]]=!0;else if(S===$a){if(WS(R[0])&&U.length){var g=U[U.length-1][1];U.pop(),U[U.length-1][0][2][g]=e(R[0],R[1],R[2].length?R[2]:void 0)}}else if(S===qn&&y[1]===$i)y[2]===void 0||y[2]===null?y[2]="":y[2]||(y[2]=r("",y[2])),Array.isArray(y[2][0])?R[2].push.apply(R[2],y[2]):R[2].push(y[2]);else if(S===$i)R[2].push(y[1]);else if(!(S===bo||S===yn))throw new Error("unhandled: "+S)}if(x[2].length>1&&/^\s*$/.test(x[2][0])&&x[2].shift(),x[2].length>2||x[2].length===2&&/\S/.test(x[2][1])){if(t.createFragment)return t.createFragment(x[2]);throw new Error("multiple root elements must be wrapped in an enclosing tag")}return Array.isArray(x[2][0])&&typeof x[2][0][0]=="string"&&Array.isArray(x[2][0][2])&&(x[2][0]=e(x[2][0][0],x[2][0][1],x[2][0][2])),x[2][0];function F(V){var D=[];a===gn&&(a=Ji);for(var ee=0;ee<V.length;ee++){var A=V.charAt(ee);a===$i&&A==="<"?(f.length&&D.push([$i,f]),f="",a=si):A===">"&&!PS(a)&&a!==es?(a===si&&f.length?D.push([si,f]):a===Mt?D.push([Mt,f]):a===Bt&&f.length&&D.push([Bt,f]),D.push([$a]),f="",a=$i):a===es&&/-$/.test(f)&&A==="-"?(t.comments&&D.push([Bt,f.substr(0,f.length-1)]),f="",a=$i):a===si&&/^!--$/.test(f)?(t.comments&&D.push([si,f],[Mt,"comment"],[bo]),f=A,a=es):a===$i||a===es?f+=A:a===si&&A==="/"&&f.length||(a===si&&/\s/.test(A)?(f.length&&D.push([si,f]),f="",a=Ji):a===si?f+=A:a===Ji&&/[^\s"'=/]/.test(A)?(a=Mt,f=A):a===Ji&&/\s/.test(A)?(f.length&&D.push([Mt,f]),D.push([yn])):a===Mt&&/\s/.test(A)?(D.push([Mt,f]),f="",a=vf):a===Mt&&A==="="?(D.push([Mt,f],[bo]),f="",a=gn):a===Mt?f+=A:(a===vf||a===Ji)&&A==="="?(D.push([bo]),a=gn):(a===vf||a===Ji)&&!/\s/.test(A)?(D.push([yn]),/[\w-]/.test(A)?(f+=A,a=Mt):a=Ji):a===gn&&A==='"'?a=ls:a===gn&&A==="'"?a=as:a===ls&&A==='"'?(D.push([Bt,f],[yn]),f="",a=Ji):a===as&&A==="'"?(D.push([Bt,f],[yn]),f="",a=Ji):a===gn&&!/\s/.test(A)?(a=Bt,ee--):a===Bt&&/\s/.test(A)?(D.push([Bt,f],[yn]),f="",a=Ji):(a===Bt||a===as||a===ls)&&(f+=A))}return a===$i&&f.length?(D.push([$i,f]),f=""):a===Bt&&f.length?(D.push([Bt,f]),f=""):a===ls&&f.length?(D.push([Bt,f]),f=""):a===as&&f.length?(D.push([Bt,f]),f=""):a===Mt&&(D.push([Mt,f]),f=""),D}};function n(o){return typeof o=="function"||typeof o=="string"||o&&typeof o=="object"||o==null?o:r("",o)}};function PS(e){return e===as||e===ls}var GS=RegExp("^("+["area","base","basefont","bgsound","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr","!--","animate","animateTransform","circle","cursor","desc","ellipse","feBlend","feColorMatrix","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","font-face-format","font-face-name","font-face-uri","glyph","glyphRef","hkern","image","line","missing-glyph","mpath","path","polygon","polyline","rect","set","stop","tref","use","view","vkern"].join("|")+")(?:[.#][a-zA-Z0-9-_:-]+)*$");function WS(e){return GS.test(e)}var Xa=/\n[\s]+$/,qa=/^\n[\s]+/,vg=/[\s]+$/,_g=/^[\s]+/,el=/[\n\s]+/g,wg=["a","abbr","b","bdi","bdo","br","cite","data","dfn","em","i","kbd","mark","q","rp","rt","rtc","ruby","s","amp","small","span","strong","sub","sup","time","u","var","wbr"],tl=["code","pre","textarea"],KS=function e(t,r){if(Array.isArray(r))for(var n=t.nodeName.toLowerCase(),o=!1,a,f,h=0,p=r.length;h<p;h++){var v=r[h];if(Array.isArray(v)){e(t,v);continue}(typeof v=="number"||typeof v=="boolean"||typeof v=="function"||v instanceof Date||v instanceof RegExp)&&(v=v.toString());var _=t.childNodes[t.childNodes.length-1];if(typeof v=="string")o=!0,_&&_.nodeName==="#text"?_.nodeValue+=v:(v=t.ownerDocument.createTextNode(v),t.appendChild(v),_=v),h===p-1&&(o=!1,wg.indexOf(n)===-1&&tl.indexOf(n)===-1?(a=_.nodeValue.replace(qa,"").replace(vg,"").replace(Xa,"").replace(el," "),a===""?t.removeChild(_):_.nodeValue=a):tl.indexOf(n)===-1&&(f=h===0?"":" ",a=_.nodeValue.replace(qa,f).replace(_g," ").replace(vg,"").replace(Xa,"").replace(el," "),_.nodeValue=a));else if(v&&v.nodeType){o&&(o=!1,wg.indexOf(n)===-1&&tl.indexOf(n)===-1?(a=_.nodeValue.replace(qa,"").replace(Xa," ").replace(el," "),a===""?t.removeChild(_):_.nodeValue=a):tl.indexOf(n)===-1&&(a=_.nodeValue.replace(_g," ").replace(qa,"").replace(Xa," ").replace(el," "),_.nodeValue=a));var y=v.nodeName;y&&(n=y.toLowerCase()),t.appendChild(v)}}},VS=["svg","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],zS=["async","autofocus","autoplay","checked","controls","default","defaultchecked","defer","disabled","formnovalidate","hidden","ismap","loop","multiple","muted","novalidate","open","playsinline","readonly","required","reversed","selected"],QS=["indeterminate"],YS=jS,HS=KS,ZS=VS,$S=zS,XS=QS,qS="http://www.w3.org/2000/svg",eM="http://www.w3.org/1999/xlink",tM="!--",iM=function(e){function t(o,a,f){var h;ZS.indexOf(o)!==-1&&(a.namespace=qS);var p=!1;a.namespace&&(p=a.namespace,delete a.namespace);var v=!1;if(a.is&&(v=a.is,delete a.is),p)v?h=e.createElementNS(p,o,{is:v}):h=e.createElementNS(p,o);else{if(o===tM)return e.createComment(a.comment);v?h=e.createElement(o,{is:v}):h=e.createElement(o)}for(var _ in a)if(a.hasOwnProperty(_)){var y=_.toLowerCase(),m=a[_];if(y==="classname"&&(y="class",_="class"),_==="htmlFor"&&(_="for"),$S.indexOf(y)!==-1){if(String(m)==="true")m=y;else if(String(m)==="false")continue}y.slice(0,2)==="on"||XS.indexOf(y)!==-1?h[_]=m:p?_==="xlink:href"?h.setAttributeNS(eM,_,m):/^xmlns($|:)/i.test(_)||h.setAttributeNS(null,_,m):h.setAttribute(_,m)}return HS(h,f),h}function r(o){for(var a=e.createDocumentFragment(),f=0;f<o.length;f++)o[f]!=null&&(Array.isArray(o[f])?a.appendChild(r(o[f])):(typeof o[f]=="string"&&(o[f]=e.createTextNode(o[f])),a.appendChild(o[f])));return a}var n=YS(t,{comments:!0,createFragment:r});return n.default=n,n.createComment=t,n},rM=iM(document),nM=rM;const At=Mi(nM);function sM(e){var t=document.createElement("div");return t.innerHTML=e,oM(t.childNodes)}function oM(e){return Array.isArray(e)?e:[].slice.call(e)}var aM=sM,lM=aM;const Co=Mi(lM);function uM(e,t){const r=e.showInfo?"hidden":"",{t:n}=e.translation,o=p=>v=>t(p,v),a=(p,v,_,y)=>At`
|
||
<i id="${p}-icon" class="fas icon ${v}" title="${_}" onclick=${o(y)} aria-hidden="true"></i>`,f=e.showInfo?a("close","fa-times",n("toolbar.hide-info"),"ui: toggle info"):a("close","fa-question-circle",n("toolbar.show-info"),"ui: toggle info"),h=e.showExtensions?a("close","fa-question-circle",n("toolbar.show-info"),"ui: hide extensions"):a("add","fa-solid fa-puzzle-piece",n("toolbar.load-extension"),"ui: show extensions");return At`<div id="toolbar-container">
|
||
${a("run",`fa-play-circle ${r}`,n("toolbar.run"),"editor: eval all")}
|
||
${a("clear",`fa fa-trash ${r}`,n("toolbar.clear"),"clear all")}
|
||
${h}
|
||
${a("shuffle","fa-random",n("toolbar.shuffle"),"gallery:showExample")}
|
||
${a("mutator",`fa-dice ${r}`,n("toolbar.random"),"editor: randomize")}
|
||
${e.serverURL===null?"":a("share",`fa-upload ${r}`,n("toolbar.upload"),"gallery:shareSketch")}
|
||
${f}
|
||
</div>`}const fM=({content:e,header:t},r,n)=>{r.translation;const o=r.translation.selectedLanguage==="ar"&&r.showInfo===!0?"rtl":"ltr";return At`
|
||
<div id="info-container" class="${r.showInfo?"":"hidden"}" style="direction:${o}">
|
||
<div id="modal">
|
||
<div id="modal-header" style="opacity:${r.showUI===!0?1:0}">
|
||
${t}
|
||
${uM(r,n)}
|
||
</div>
|
||
<div id="modal-body">
|
||
${e}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
`},cM=(e,t,r)=>()=>r(e,t),bg=(e,t,r,n)=>At`
|
||
<i id="${e}-icon" class="fas ${t} extension-icon" title="${r}" onclick=${n} aria-hidden="true"></i>`,hM=(e,t,r,n)=>At`<div
|
||
class="extension-list-item selected" style="display:flex;justify-content:space-between" >
|
||
<img src="${e.thumbnail}" width="60px" height="60px"/>
|
||
|
||
<div style="flex:1;padding-left:8px">
|
||
<div title="${n("extensions.show-example",{"extension-name":e.name})}" onclick=${()=>{r("extensions: load example",t,0)}} style="cursor:pointer"><span style="font-weight:900">${e.name} - </span> <span style="text-overflow:ellipses;overflow:hidden"> ${e.author} </span></div>
|
||
<div> <span style="">${e.description}</span></div>
|
||
</div>
|
||
<div class="extension-buttons">
|
||
<div>
|
||
${bg("add-extension","fa-solid fa-plus",n("extensions.show-library",{"extension-name":e.name}),cM("extensions: add to editor",t,r))}
|
||
${bg("show-documentation","fa-book-open",n("extensions.show-docs",{"extension-name":e.name}),()=>{window.open(e.documentation,"_blank")})}
|
||
</div>
|
||
<div style="font-size: 0.8rem;/*font-family: monospace*/">
|
||
${e.examples.map((o,a)=>At`<div class="extension-icon example-icon" title="${n("extensions.show-example",{"extension-name":e.name})}" onclick=${()=>{r("extensions: load example",t,a)}}>${a+1}</div>`)}
|
||
</div>
|
||
</div>`,pM=(e,t)=>{const{categories:r,selectedCategoryIndex:n}=e.extensions,o=r[n].entries,{t:a}=e.translation,f=At`<div class="modal-content extensions">
|
||
${Co(a("extensions.about-extensions"))}
|
||
<div class="extension-list">
|
||
${o.map((p,v)=>hM(p,v,t,a))}
|
||
</div>
|
||
</div>
|
||
`,h=At`<div style="display:flex;flex-wrap:wrap">
|
||
${r.map((p,v)=>At`<div
|
||
class="language-select ${v===n?"selected":""}"
|
||
onclick=${()=>t("extensions: select category",v)}
|
||
>${p.name}</div>`)}
|
||
</div>`;return{content:f,header:h}},Ni=e=>`href=${e} target=_blank`,dM=e=>At`
|
||
<div class="modal-content">
|
||
<h1>${e("info.title")}</h1>
|
||
<h3>${e("info.subtitle")}</h3>
|
||
<br> ///////////////////////////////////////////////////////////<br>
|
||
<h4>${e("info.description")}</h4>
|
||
<h4>${e("info.get-started-title")}<ol>
|
||
<li>${e("info.get-started-list.0")}</li>
|
||
<li>${e("info.get-started-list.1")}</li>
|
||
<li>${e("info.get-started-list.2")}</li>
|
||
</ol>
|
||
</h4>
|
||
|
||
<p> ///////////////////////////////////////////////////////////<br><br><br>
|
||
${e("info.description-detailed")}
|
||
</p>
|
||
<p>${e("info.uses")}<ul>
|
||
${e("info.uses-list",{returnObjects:!0}).map(t=>At`<li>${t}</li>`)}
|
||
</ul></p>
|
||
|
||
<p class="align-right">${Co(e("info.author",{author:"href=https://ojack.xyz class=olivia target=_blank"}))}</p>
|
||
<p>${Co(e("info.more-info",{docs:Ni("https://hydra.ojack.xyz/docs"),functions:Ni("https://hydra.ojack.xyz/api"),gallery:Ni("https://twitter.com/hydra_patterns"),repo:Ni("https://github.com/hydra-synth/hydra"),pixeljam:Ni("http://pixeljam.glitch.me/"),garden:Ni("https://hydra.ojack.xyz/garden"),"hydra-book":Ni("https://hydra-book.glitch.me/"),tutorials:Ni("https://github.com/ojack/hydra/blob/master/examples/README.md")}))}</p>
|
||
<p>${Co(e("info.more-info-forums",{discord:Ni("https://discord.gg/ZQjfHkNHXC"),facebook:Ni("https://www.facebook.com/groups/1084288351771117/")}))}</p>
|
||
|
||
<p>${Co(e("info.support",{"open-collective":Ni("https://opencollective.com/hydra-synth")}))}</p>
|
||
</div>`;function gM(e,t){const{t:r,languages:n}=e.translation,o=Object.entries(n),a=At`<div></div>`,f=At`
|
||
${e.showInfo&&o.length>1?At`<div style="display:flex;flex-wrap:wrap">${o.map(([p,v])=>At`
|
||
<div class="language-select" onclick=${()=>t("set language",p)}>${v}</div>
|
||
`)}</div>`:At`<div></div>`}
|
||
${dM(r)}
|
||
`,h=e.showExtensions?pM(e,t):{content:f,header:a};return fM(h,e,t)}var xg=typeof gt<"u"?gt:typeof window<"u"?window:{},yM=bs,To;typeof document<"u"?To=document:(To=xg["__GLOBAL_DOCUMENT_CACHE@4"],To||(To=xg["__GLOBAL_DOCUMENT_CACHE@4"]=yM));var Qm=To,Zl={exports:{}},Eo;typeof window<"u"?Eo=window:typeof gt<"u"?Eo=gt:typeof self<"u"?Eo=self:Eo={};var mM=Eo,_f=Qm,Sg=mM,jt=Object.create(null),Ym="onloadid"+Math.random().toString(36).slice(2),Sn="data-"+Ym,wf=0;if(Sg&&Sg.MutationObserver){var vM=new MutationObserver(function(e){if(!(Object.keys(jt).length<1))for(var t=0;t<e.length;t++){if(e[t].attributeName===Sn){_M(e[t],Mg,Cg);continue}Sc(e[t].removedNodes,function(r,n){_f.documentElement.contains(n)||Cg(r,n)}),Sc(e[t].addedNodes,function(r,n){_f.documentElement.contains(n)&&Mg(r,n)})}});vM.observe(_f.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeOldValue:!0,attributeFilter:[Sn]})}Zl.exports=function e(t,r,n,o){return r=r||function(){},n=n||function(){},t.setAttribute(Sn,"o"+wf),jt["o"+wf]=[r,n,0,o||e.caller],wf+=1,t};Zl.exports.KEY_ATTR=Sn;Zl.exports.KEY_ID=Ym;function Mg(e,t){jt[e][0]&&jt[e][2]===0&&(jt[e][0](t),jt[e][2]=1)}function Cg(e,t){jt[e][1]&&jt[e][2]===1&&(jt[e][1](t),jt[e][2]=0)}function _M(e,t,r){var n=e.target.getAttribute(Sn);if(wM(e.oldValue,n)){jt[n]=jt[e.oldValue];return}jt[e.oldValue]&&r(e.oldValue,e.target),jt[n]&&t(n,e.target)}function wM(e,t){return!e||!t?!1:jt[e][3]===jt[t][3]}function Sc(e,t){for(var r=Object.keys(jt),n=0;n<e.length;n++){if(e[n]&&e[n].getAttribute&&e[n].getAttribute(Sn)){var o=e[n].getAttribute(Sn);r.forEach(function(a){o===a&&t(a,e[n])})}e[n]&&e[n].childNodes.length>0&&Sc(e[n].childNodes,t)}}var bM=Zl.exports,xM=Zm;class Hm extends Error{}Hm.prototype.name="AssertionError";function Zm(e,t){if(!e){var r=new Hm(t);throw Error.captureStackTrace&&Error.captureStackTrace(r,Zm),r}}const $m=Qm,ko=$c,SM=ym,fh=bM,Mc=xM,MM=fh.KEY_ID,CM=fh.KEY_ATTR;var TM=li;function EM(){return"ncid-"+Math.floor((1+Math.random())*65536).toString(16).substring(1)}li.makeID=EM;function li(e){this._hasWindow=typeof window<"u",this._id=null,this._ncID=null,this._olID=null,this._proxy=null,this._loaded=!1,this._rootNodeName=null,this._name=e||"nanocomponent",this._rerender=!1,this._handleLoad=this._handleLoad.bind(this),this._handleUnload=this._handleUnload.bind(this),this._arguments=[];const t=this;Object.defineProperty(this,"element",{get:function(){const r=$m.getElementById(t._id);if(r)return r.dataset.nanocomponent===t._ncID?r:void 0}})}li.prototype.render=function(){const e=ko(this._name+".render"),t=this,r=new Array(arguments.length);let n;for(let o=0;o<arguments.length;o++)r[o]=arguments[o];if(this._hasWindow)if(this.element){n=this.element;const o=ko(this._name+".update"),a=this._rerender||this.update.apply(this,r);if(o(),this._rerender&&(this._rerender=!1),a){const f=this._handleRender(r),h=ko(this._name+".morph");SM(n,f),h(),this.afterupdate&&this.afterupdate(n)}return this._proxy||(this._proxy=this._createProxy()),e(),this._proxy}else return this._reset(),n=this._handleRender(r),this.beforerender&&this.beforerender(n),(this.load||this.unload||this.afterreorder)&&(fh(n,t._handleLoad,t._handleUnload,t._ncID),this._olID=n.dataset[MM]),e(),n;else{const o=ko(this._name+".create");return n=this.createElement.apply(this,r),o(),e(),n}};li.prototype.rerender=function(){Mc(this.element,"nanocomponent: cant rerender on an unmounted dom node"),this._rerender=!0,this.render.apply(this,this._arguments)};li.prototype._handleRender=function(e){const t=ko(this._name+".createElement"),r=this.createElement.apply(this,e);return t(),this._rootNodeName||(this._rootNodeName=r.nodeName),Mc(r instanceof window.Element,"nanocomponent: createElement should return a single DOM node"),Mc(this._rootNodeName===r.nodeName,"nanocomponent: root node types cannot differ between re-renders"),this._arguments=e,this._brandNode(this._ensureID(r))};li.prototype._createProxy=function(){const e=$m.createElement(this._rootNodeName),t=this;return this._brandNode(e),e.id=this._id,e.setAttribute("data-proxy",""),e.isSameNode=function(r){return r&&r.dataset.nanocomponent===t._ncID},e};li.prototype._reset=function(){this._ncID=li.makeID(),this._olID=null,this._id=null,this._proxy=null,this._rootNodeName=null};li.prototype._brandNode=function(e){return e.setAttribute("data-nanocomponent",this._ncID),this._olID&&e.setAttribute(CM,this._olID),e};li.prototype._ensureID=function(e){return e.id?this._id=e.id:e.id=this._id=this._ncID,this._proxy&&this._proxy.id!==this._id&&(this._proxy.id=this._id),e};li.prototype._handleLoad=function(e){if(this._loaded){this.afterreorder&&this.afterreorder(e);return}this._loaded=!0,this.load&&this.load(e)};li.prototype._handleUnload=function(e){this.element||(this._loaded=!1,this.unload&&this.unload(e))};li.prototype.createElement=function(){throw new Error("nanocomponent: createElement should be implemented!")};li.prototype.update=function(){throw new Error("nanocomponent: update should be implemented!")};var kM=TM;const Xm=Mi(kM);class AM extends p5{constructor({width:t=window.innerWidth,height:r=window.innerHeight,mode:n="P2D"}={}){super(o=>{o.setup=()=>{o.createCanvas(t,r,o[n])},o.draw=()=>{}},"hydra-ui"),this.width=t,this.height=r,this.mode=n,this.canvas.style.position="absolute",this.canvas.style.top="0px",this.canvas.style.left="0px",this.canvas.style.zIndex=-1}show(){this.canvas.style.visibility="visible"}hide(){this.canvas.style.visibility="hidden"}clear(){this.drawingContext.clearRect(0,0,this.canvas.width,this.canvas.height)}}var Cc={exports:{}},RM=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,LM=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],qm=function(t){var r=t,n=t.indexOf("["),o=t.indexOf("]");n!=-1&&o!=-1&&(t=t.substring(0,n)+t.substring(n,o).replace(/:/g,";")+t.substring(o,t.length));for(var a=RM.exec(t||""),f={},h=14;h--;)f[LM[h]]=a[h]||"";return n!=-1&&o!=-1&&(f.source=r,f.host=f.host.substring(1,f.host.length-1).replace(/;/g,":"),f.authority=f.authority.replace("[","").replace("]","").replace(/;/g,":"),f.ipv6uri=!0),f.pathNames=UM(f,f.path),f.queryKey=IM(f,f.query),f};function UM(e,t){var r=/\/{2,9}/g,n=t.replace(r,"/").split("/");return(t.substr(0,1)=="/"||t.length===0)&&n.splice(0,1),t.substr(t.length-1,1)=="/"&&n.splice(n.length-1,1),n}function IM(e,t){var r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,o,a){o&&(r[o]=a)}),r}var Tc={exports:{}},Ec={exports:{}},Do=1e3,jo=Do*60,Po=jo*60,Go=Po*24,JM=Go*365.25,NM=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return OM(e);if(r==="number"&&isNaN(e)===!1)return t.long?FM(e):BM(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function OM(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*JM;case"days":case"day":case"d":return r*Go;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Po;case"minutes":case"minute":case"mins":case"min":case"m":return r*jo;case"seconds":case"second":case"secs":case"sec":case"s":return r*Do;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function BM(e){return e>=Go?Math.round(e/Go)+"d":e>=Po?Math.round(e/Po)+"h":e>=jo?Math.round(e/jo)+"m":e>=Do?Math.round(e/Do)+"s":e+"ms"}function FM(e){return il(e,Go,"day")||il(e,Po,"hour")||il(e,jo,"minute")||il(e,Do,"second")||e+" ms"}function il(e,t,r){if(!(e<t))return e<t*1.5?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}(function(e,t){t=e.exports=n.debug=n.default=n,t.coerce=p,t.disable=f,t.enable=a,t.enabled=h,t.humanize=NM,t.instances=[],t.names=[],t.skips=[],t.formatters={};function r(v){var _=0,y;for(y in v)_=(_<<5)-_+v.charCodeAt(y),_|=0;return t.colors[Math.abs(_)%t.colors.length]}function n(v){var _;function y(){if(y.enabled){var m=y,x=+new Date,U=x-(_||x);m.diff=U,m.prev=_,m.curr=x,_=x;for(var R=new Array(arguments.length),S=0;S<R.length;S++)R[S]=arguments[S];R[0]=t.coerce(R[0]),typeof R[0]!="string"&&R.unshift("%O");var g=0;R[0]=R[0].replace(/%([a-zA-Z%])/g,function(G,O){if(G==="%%")return G;g++;var P=t.formatters[O];if(typeof P=="function"){var F=R[g];G=P.call(m,F),R.splice(g,1),g--}return G}),t.formatArgs.call(m,R);var L=y.log||t.log||console.log.bind(console);L.apply(m,R)}}return y.namespace=v,y.enabled=t.enabled(v),y.useColors=t.useColors(),y.color=r(v),y.destroy=o,typeof t.init=="function"&&t.init(y),t.instances.push(y),y}function o(){var v=t.instances.indexOf(this);return v!==-1?(t.instances.splice(v,1),!0):!1}function a(v){t.save(v),t.names=[],t.skips=[];var _,y=(typeof v=="string"?v:"").split(/[\s,]+/),m=y.length;for(_=0;_<m;_++)y[_]&&(v=y[_].replace(/\*/g,".*?"),v[0]==="-"?t.skips.push(new RegExp("^"+v.substr(1)+"$")):t.names.push(new RegExp("^"+v+"$")));for(_=0;_<t.instances.length;_++){var x=t.instances[_];x.enabled=t.enabled(x.namespace)}}function f(){t.enable("")}function h(v){if(v[v.length-1]==="*")return!0;var _,y;for(_=0,y=t.skips.length;_<y;_++)if(t.skips[_].test(v))return!1;for(_=0,y=t.names.length;_<y;_++)if(t.names[_].test(v))return!0;return!1}function p(v){return v instanceof Error?v.stack||v.message:v}})(Ec,Ec.exports);var DM=Ec.exports;(function(e,t){t=e.exports=DM,t.log=o,t.formatArgs=n,t.save=a,t.load=f,t.useColors=r,t.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:h(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}t.formatters.j=function(p){try{return JSON.stringify(p)}catch(v){return"[UnexpectedJSONParseError]: "+v.message}};function n(p){var v=this.useColors;if(p[0]=(v?"%c":"")+this.namespace+(v?" %c":" ")+p[0]+(v?"%c ":" ")+"+"+t.humanize(this.diff),!!v){var _="color: "+this.color;p.splice(1,0,_,"color: inherit");var y=0,m=0;p[0].replace(/%[a-zA-Z%]/g,function(x){x!=="%%"&&(y++,x==="%c"&&(m=y))}),p.splice(m,0,_)}}function o(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(p){try{p==null?t.storage.removeItem("debug"):t.storage.debug=p}catch{}}function f(){var p;try{p=t.storage.debug}catch{}return!p&&typeof process<"u"&&"env"in process&&(p={}.DEBUG),p}t.enable(f());function h(){try{return window.localStorage}catch{}}})(Tc,Tc.exports);var $l=Tc.exports,jM=qm,Tg=$l("socket.io-client:url"),PM=GM;function GM(e,t){var r=e;t=t||typeof location<"u"&&location,e==null&&(e=t.protocol+"//"+t.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=t.protocol+e:e=t.host+e),/^(https?|wss?):\/\//.test(e)||(Tg("protocol-less url %s",e),typeof t<"u"?e=t.protocol+"//"+e:e="https://"+e),Tg("parse %s",e),r=jM(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";var n=r.host.indexOf(":")!==-1,o=n?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port,r.href=r.protocol+"://"+o+(t&&t.port===r.port?"":":"+r.port),r}var Xl={},kc={exports:{}},Ac={exports:{}},Wo=1e3,Ko=Wo*60,Vo=Ko*60,zo=Vo*24,WM=zo*365.25,KM=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return VM(e);if(r==="number"&&isNaN(e)===!1)return t.long?QM(e):zM(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function VM(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*WM;case"days":case"day":case"d":return r*zo;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Vo;case"minutes":case"minute":case"mins":case"min":case"m":return r*Ko;case"seconds":case"second":case"secs":case"sec":case"s":return r*Wo;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function zM(e){return e>=zo?Math.round(e/zo)+"d":e>=Vo?Math.round(e/Vo)+"h":e>=Ko?Math.round(e/Ko)+"m":e>=Wo?Math.round(e/Wo)+"s":e+"ms"}function QM(e){return rl(e,zo,"day")||rl(e,Vo,"hour")||rl(e,Ko,"minute")||rl(e,Wo,"second")||e+" ms"}function rl(e,t,r){if(!(e<t))return e<t*1.5?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}(function(e,t){t=e.exports=n.debug=n.default=n,t.coerce=p,t.disable=f,t.enable=a,t.enabled=h,t.humanize=KM,t.instances=[],t.names=[],t.skips=[],t.formatters={};function r(v){var _=0,y;for(y in v)_=(_<<5)-_+v.charCodeAt(y),_|=0;return t.colors[Math.abs(_)%t.colors.length]}function n(v){var _;function y(){if(y.enabled){var m=y,x=+new Date,U=x-(_||x);m.diff=U,m.prev=_,m.curr=x,_=x;for(var R=new Array(arguments.length),S=0;S<R.length;S++)R[S]=arguments[S];R[0]=t.coerce(R[0]),typeof R[0]!="string"&&R.unshift("%O");var g=0;R[0]=R[0].replace(/%([a-zA-Z%])/g,function(G,O){if(G==="%%")return G;g++;var P=t.formatters[O];if(typeof P=="function"){var F=R[g];G=P.call(m,F),R.splice(g,1),g--}return G}),t.formatArgs.call(m,R);var L=y.log||t.log||console.log.bind(console);L.apply(m,R)}}return y.namespace=v,y.enabled=t.enabled(v),y.useColors=t.useColors(),y.color=r(v),y.destroy=o,typeof t.init=="function"&&t.init(y),t.instances.push(y),y}function o(){var v=t.instances.indexOf(this);return v!==-1?(t.instances.splice(v,1),!0):!1}function a(v){t.save(v),t.names=[],t.skips=[];var _,y=(typeof v=="string"?v:"").split(/[\s,]+/),m=y.length;for(_=0;_<m;_++)y[_]&&(v=y[_].replace(/\*/g,".*?"),v[0]==="-"?t.skips.push(new RegExp("^"+v.substr(1)+"$")):t.names.push(new RegExp("^"+v+"$")));for(_=0;_<t.instances.length;_++){var x=t.instances[_];x.enabled=t.enabled(x.namespace)}}function f(){t.enable("")}function h(v){if(v[v.length-1]==="*")return!0;var _,y;for(_=0,y=t.skips.length;_<y;_++)if(t.skips[_].test(v))return!1;for(_=0,y=t.names.length;_<y;_++)if(t.names[_].test(v))return!0;return!1}function p(v){return v instanceof Error?v.stack||v.message:v}})(Ac,Ac.exports);var YM=Ac.exports;(function(e,t){t=e.exports=YM,t.log=o,t.formatArgs=n,t.save=a,t.load=f,t.useColors=r,t.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:h(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}t.formatters.j=function(p){try{return JSON.stringify(p)}catch(v){return"[UnexpectedJSONParseError]: "+v.message}};function n(p){var v=this.useColors;if(p[0]=(v?"%c":"")+this.namespace+(v?" %c":" ")+p[0]+(v?"%c ":" ")+"+"+t.humanize(this.diff),!!v){var _="color: "+this.color;p.splice(1,0,_,"color: inherit");var y=0,m=0;p[0].replace(/%[a-zA-Z%]/g,function(x){x!=="%%"&&(y++,x==="%c"&&(m=y))}),p.splice(m,0,_)}}function o(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(p){try{p==null?t.storage.removeItem("debug"):t.storage.debug=p}catch{}}function f(){var p;try{p=t.storage.debug}catch{}return!p&&typeof process<"u"&&"env"in process&&(p={}.DEBUG),p}t.enable(f());function h(){try{return window.localStorage}catch{}}})(kc,kc.exports);var HM=kc.exports,ql={},ZM={}.toString,e0=Array.isArray||function(e){return ZM.call(e)=="[object Array]"},t0=eC,$M=typeof Buffer=="function"&&typeof Buffer.isBuffer=="function",XM=typeof ArrayBuffer=="function",qM=function(e){return typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer};function eC(e){return $M&&Buffer.isBuffer(e)||XM&&(e instanceof ArrayBuffer||qM(e))}var ch=e0,i0=t0,r0=Object.prototype.toString,tC=typeof Blob=="function"||typeof Blob<"u"&&r0.call(Blob)==="[object BlobConstructor]",iC=typeof File=="function"||typeof File<"u"&&r0.call(File)==="[object FileConstructor]";ql.deconstructPacket=function(e){var t=[],r=e.data,n=e;return n.data=Rc(r,t),n.attachments=t.length,{packet:n,buffers:t}};function Rc(e,t){if(!e)return e;if(i0(e)){var r={_placeholder:!0,num:t.length};return t.push(e),r}else if(ch(e)){for(var n=new Array(e.length),o=0;o<e.length;o++)n[o]=Rc(e[o],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){var n={};for(var a in e)n[a]=Rc(e[a],t);return n}return e}ql.reconstructPacket=function(e,t){return e.data=Lc(e.data,t),e.attachments=void 0,e};function Lc(e,t){if(!e)return e;if(e&&e._placeholder===!0){var r=typeof e.num=="number"&&e.num>=0&&e.num<t.length;if(r)return t[e.num];throw new Error("illegal attachments")}else if(ch(e))for(var n=0;n<e.length;n++)e[n]=Lc(e[n],t);else if(typeof e=="object")for(var o in e)e[o]=Lc(e[o],t);return e}ql.removeBlobs=function(e,t){function r(a,f,h){if(!a)return a;if(tC&&a instanceof Blob||iC&&a instanceof File){n++;var p=new FileReader;p.onload=function(){h?h[f]=this.result:o=this.result,--n||t(o)},p.readAsArrayBuffer(a)}else if(ch(a))for(var v=0;v<a.length;v++)r(a[v],v,a);else if(typeof a=="object"&&!i0(a))for(var _ in a)r(a[_],_,a)}var n=0,o=e;r(o),n||t(o)};(function(e){var t=HM("socket.io-parser"),r=Cn,n=ql,o=e0,a=t0;e.protocol=4,e.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],e.CONNECT=0,e.DISCONNECT=1,e.EVENT=2,e.ACK=3,e.ERROR=4,e.BINARY_EVENT=5,e.BINARY_ACK=6,e.Encoder=f,e.Decoder=y;function f(){}var h=e.ERROR+'"encode error"';f.prototype.encode=function(S,g){if(t("encoding packet %j",S),e.BINARY_EVENT===S.type||e.BINARY_ACK===S.type)_(S,g);else{var L=p(S);g([L])}};function p(S){var g=""+S.type;if((e.BINARY_EVENT===S.type||e.BINARY_ACK===S.type)&&(g+=S.attachments+"-"),S.nsp&&S.nsp!=="/"&&(g+=S.nsp+","),S.id!=null&&(g+=S.id),S.data!=null){var L=v(S.data);if(L!==!1)g+=L;else return h}return t("encoded %j as %s",S,g),g}function v(S){try{return JSON.stringify(S)}catch{return!1}}function _(S,g){function L(G){var O=n.deconstructPacket(G),P=p(O.packet),F=O.buffers;F.unshift(P),g(F)}n.removeBlobs(S,L)}function y(){this.reconstructor=null}r(y.prototype),y.prototype.add=function(S){var g;if(typeof S=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");g=m(S),e.BINARY_EVENT===g.type||e.BINARY_ACK===g.type?(this.reconstructor=new U(g),this.reconstructor.reconPack.attachments===0&&this.emit("decoded",g)):this.emit("decoded",g)}else if(a(S)||S.base64)if(this.reconstructor)g=this.reconstructor.takeBinaryData(S),g&&(this.reconstructor=null,this.emit("decoded",g));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+S)};function m(S){var g=0,L={type:Number(S.charAt(0))};if(e.types[L.type]==null)return R("unknown packet type "+L.type);if(e.BINARY_EVENT===L.type||e.BINARY_ACK===L.type){for(var G=g+1;S.charAt(++g)!=="-"&&g!=S.length;);var O=S.substring(G,g);if(O!=Number(O)||S.charAt(g)!=="-")throw new Error("Illegal attachments");L.attachments=Number(O)}if(S.charAt(g+1)==="/"){for(var G=g+1;++g;){var P=S.charAt(g);if(P===","||g===S.length)break}L.nsp=S.substring(G,g)}else L.nsp="/";var F=S.charAt(g+1);if(F!==""&&Number(F)==F){for(var G=g+1;++g;){var P=S.charAt(g);if(P==null||Number(P)!=P){--g;break}if(g===S.length)break}L.id=Number(S.substring(G,g+1))}if(S.charAt(++g)){var V=x(S.substr(g)),D=V!==!1&&(L.type===e.ERROR||o(V));if(D)L.data=V;else return R("invalid payload")}return t("decoded %s as %j",S,L),L}function x(S){try{return JSON.parse(S)}catch{return!1}}y.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()};function U(S){this.reconPack=S,this.buffers=[]}U.prototype.takeBinaryData=function(S){if(this.buffers.push(S),this.buffers.length===this.reconPack.attachments){var g=n.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),g}return null},U.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]};function R(S){return{type:e.ERROR,data:"parser error: "+S}}})(Xl);var hh={exports:{}},eu={},Uc={exports:{}};try{Uc.exports=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{Uc.exports=!1}var rC=Uc.exports,ph=function(){return typeof self<"u"?self:typeof window<"u"?window:Function("return this")()}(),nC=rC,sC=ph,dh=function(e){var t=e.xdomain,r=e.xscheme,n=e.enablesXDR;try{if(typeof XMLHttpRequest<"u"&&(!t||nC))return new XMLHttpRequest}catch{}try{if(typeof XDomainRequest<"u"&&!r&&n)return new XDomainRequest}catch{}if(!t)try{return new sC[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}},gh={exports:{}},Tn={},oC=Object.keys||function(t){var r=[],n=Object.prototype.hasOwnProperty;for(var o in t)n.call(t,o)&&r.push(o);return r},aC={}.toString,lC=Array.isArray||function(e){return aC.call(e)=="[object Array]"},uC=lC,n0=Object.prototype.toString,fC=typeof Blob=="function"||typeof Blob<"u"&&n0.call(Blob)==="[object BlobConstructor]",cC=typeof File=="function"||typeof File<"u"&&n0.call(File)==="[object FileConstructor]",s0=bl;function bl(e){if(!e||typeof e!="object")return!1;if(uC(e)){for(var t=0,r=e.length;t<r;t++)if(bl(e[t]))return!0;return!1}if(typeof Buffer=="function"&&Buffer.isBuffer&&Buffer.isBuffer(e)||typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||fC&&e instanceof Blob||cC&&e instanceof File)return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return bl(e.toJSON(),!0);for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&bl(e[n]))return!0;return!1}var hC=function(e,t,r){var n=e.byteLength;if(t=t||0,r=r||n,e.slice)return e.slice(t,r);if(t<0&&(t+=n),r<0&&(r+=n),r>n&&(r=n),t>=n||t>=r||n===0)return new ArrayBuffer(0);for(var o=new Uint8Array(e),a=new Uint8Array(r-t),f=t,h=0;f<r;f++,h++)a[h]=o[f];return a.buffer},pC=dC;function dC(e,t,r){var n=!1;return r=r||gC,o.count=e,e===0?t():o;function o(a,f){if(o.count<=0)throw new Error("after called too many times");--o.count,a?(n=!0,t(a),t=r):o.count===0&&!n&&t(null,f)}}function gC(){}/*! https://mths.be/utf8js v2.1.2 by @mathias */var Dr=String.fromCharCode;function a0(e){for(var t=[],r=0,n=e.length,o,a;r<n;)o=e.charCodeAt(r++),o>=55296&&o<=56319&&r<n?(a=e.charCodeAt(r++),(a&64512)==56320?t.push(((o&1023)<<10)+(a&1023)+65536):(t.push(o),r--)):t.push(o);return t}function yC(e){for(var t=e.length,r=-1,n,o="";++r<t;)n=e[r],n>65535&&(n-=65536,o+=Dr(n>>>10&1023|55296),n=56320|n&1023),o+=Dr(n);return o}function l0(e,t){if(e>=55296&&e<=57343){if(t)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function bf(e,t){return Dr(e>>t&63|128)}function mC(e,t){if(!(e&4294967168))return Dr(e);var r="";return e&4294965248?e&4294901760?e&4292870144||(r=Dr(e>>18&7|240),r+=bf(e,12),r+=bf(e,6)):(l0(e,t)||(e=65533),r=Dr(e>>12&15|224),r+=bf(e,6)):r=Dr(e>>6&31|192),r+=Dr(e&63|128),r}function vC(e,t){t=t||{};for(var r=t.strict!==!1,n=a0(e),o=n.length,a=-1,f,h="";++a<o;)f=n[a],h+=mC(f,r);return h}function ts(){if(Pr>=Nl)throw Error("Invalid byte index");var e=Jl[Pr]&255;if(Pr++,(e&192)==128)return e&63;throw Error("Invalid continuation byte")}function _C(e){var t,r,n,o,a;if(Pr>Nl)throw Error("Invalid byte index");if(Pr==Nl)return!1;if(t=Jl[Pr]&255,Pr++,!(t&128))return t;if((t&224)==192){if(r=ts(),a=(t&31)<<6|r,a>=128)return a;throw Error("Invalid continuation byte")}if((t&240)==224){if(r=ts(),n=ts(),a=(t&15)<<12|r<<6|n,a>=2048)return l0(a,e)?a:65533;throw Error("Invalid continuation byte")}if((t&248)==240&&(r=ts(),n=ts(),o=ts(),a=(t&7)<<18|r<<12|n<<6|o,a>=65536&&a<=1114111))return a;throw Error("Invalid UTF-8 detected")}var Jl,Nl,Pr;function wC(e,t){t=t||{};var r=t.strict!==!1;Jl=a0(e),Nl=Jl.length,Pr=0;for(var n=[],o;(o=_C(r))!==!1;)n.push(o);return yC(n)}var bC={version:"2.1.2",encode:vC,decode:wC},nl={},Eg;function xC(){return Eg||(Eg=1,function(e){nl.encode=function(t){var r=new Uint8Array(t),n,o=r.length,a="";for(n=0;n<o;n+=3)a+=e[r[n]>>2],a+=e[(r[n]&3)<<4|r[n+1]>>4],a+=e[(r[n+1]&15)<<2|r[n+2]>>6],a+=e[r[n+2]&63];return o%3===2?a=a.substring(0,a.length-1)+"=":o%3===1&&(a=a.substring(0,a.length-2)+"=="),a},nl.decode=function(t){var r=t.length*.75,n=t.length,o,a=0,f,h,p,v;t[t.length-1]==="="&&(r--,t[t.length-2]==="="&&r--);var _=new ArrayBuffer(r),y=new Uint8Array(_);for(o=0;o<n;o+=4)f=e.indexOf(t[o]),h=e.indexOf(t[o+1]),p=e.indexOf(t[o+2]),v=e.indexOf(t[o+3]),y[a++]=f<<2|h>>4,y[a++]=(h&15)<<4|p>>2,y[a++]=(p&3)<<6|v&63;return _}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")),nl}var xf,kg;function SC(){if(kg)return xf;kg=1;var e=typeof e<"u"?e:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:!1,t=function(){try{var h=new Blob(["hi"]);return h.size===2}catch{return!1}}(),r=t&&function(){try{var h=new Blob([new Uint8Array([1,2])]);return h.size===2}catch{return!1}}(),n=e&&e.prototype.append&&e.prototype.getBlob;function o(h){return h.map(function(p){if(p.buffer instanceof ArrayBuffer){var v=p.buffer;if(p.byteLength!==v.byteLength){var _=new Uint8Array(p.byteLength);_.set(new Uint8Array(v,p.byteOffset,p.byteLength)),v=_.buffer}return v}return p})}function a(h,p){p=p||{};var v=new e;return o(h).forEach(function(_){v.append(_)}),p.type?v.getBlob(p.type):v.getBlob()}function f(h,p){return new Blob(o(h),p||{})}return typeof Blob<"u"&&(a.prototype=Blob.prototype,f.prototype=Blob.prototype),xf=function(){return t?r?Blob:f:n?a:void 0}(),xf}(function(e){var t=oC,r=s0,n=hC,o=pC,a=bC,f;typeof ArrayBuffer<"u"&&(f=xC());var h=typeof navigator<"u"&&/Android/i.test(navigator.userAgent),p=typeof navigator<"u"&&/PhantomJS/i.test(navigator.userAgent),v=h||p;e.protocol=3;var _=e.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},y=t(_),m={type:"error",data:"parser error"},x=SC();e.encodePacket=function(O,P,F,V){typeof P=="function"&&(V=P,P=!1),typeof F=="function"&&(V=F,F=null);var D=O.data===void 0?void 0:O.data.buffer||O.data;if(typeof ArrayBuffer<"u"&&D instanceof ArrayBuffer)return R(O,P,V);if(typeof x<"u"&&D instanceof x)return g(O,P,V);if(D&&D.base64)return U(O,V);var ee=_[O.type];return O.data!==void 0&&(ee+=F?a.encode(String(O.data),{strict:!1}):String(O.data)),V(""+ee)};function U(O,P){var F="b"+e.packets[O.type]+O.data.data;return P(F)}function R(O,P,F){if(!P)return e.encodeBase64Packet(O,F);var V=O.data,D=new Uint8Array(V),ee=new Uint8Array(1+V.byteLength);ee[0]=_[O.type];for(var A=0;A<D.length;A++)ee[A+1]=D[A];return F(ee.buffer)}function S(O,P,F){if(!P)return e.encodeBase64Packet(O,F);var V=new FileReader;return V.onload=function(){e.encodePacket({type:O.type,data:V.result},P,!0,F)},V.readAsArrayBuffer(O.data)}function g(O,P,F){if(!P)return e.encodeBase64Packet(O,F);if(v)return S(O,P,F);var V=new Uint8Array(1);V[0]=_[O.type];var D=new x([V.buffer,O.data]);return F(D)}e.encodeBase64Packet=function(O,P){var F="b"+e.packets[O.type];if(typeof x<"u"&&O.data instanceof x){var V=new FileReader;return V.onload=function(){var $=V.result.split(",")[1];P(F+$)},V.readAsDataURL(O.data)}var D;try{D=String.fromCharCode.apply(null,new Uint8Array(O.data))}catch{for(var ee=new Uint8Array(O.data),A=new Array(ee.length),q=0;q<ee.length;q++)A[q]=ee[q];D=String.fromCharCode.apply(null,A)}return F+=btoa(D),P(F)},e.decodePacket=function(O,P,F){if(O===void 0)return m;if(typeof O=="string"){if(O.charAt(0)==="b")return e.decodeBase64Packet(O.substr(1),P);if(F&&(O=L(O),O===!1))return m;var D=O.charAt(0);return Number(D)!=D||!y[D]?m:O.length>1?{type:y[D],data:O.substring(1)}:{type:y[D]}}var V=new Uint8Array(O),D=V[0],ee=n(O,1);return x&&P==="blob"&&(ee=new x([ee])),{type:y[D],data:ee}};function L(O){try{O=a.decode(O,{strict:!1})}catch{return!1}return O}e.decodeBase64Packet=function(O,P){var F=y[O.charAt(0)];if(!f)return{type:F,data:{base64:!0,data:O.substr(1)}};var V=f.decode(O.substr(1));return P==="blob"&&x&&(V=new x([V])),{type:F,data:V}},e.encodePayload=function(O,P,F){typeof P=="function"&&(F=P,P=null);var V=r(O);if(P&&V)return x&&!v?e.encodePayloadAsBlob(O,F):e.encodePayloadAsArrayBuffer(O,F);if(!O.length)return F("0:");function D(A){return A.length+":"+A}function ee(A,q){e.encodePacket(A,V?P:!1,!1,function($){q(null,D($))})}G(O,ee,function(A,q){return F(q.join(""))})};function G(O,P,F){for(var V=new Array(O.length),D=o(O.length,F),ee=function(q,$,ce){P($,function(ye,re){V[q]=re,ce(ye,V)})},A=0;A<O.length;A++)ee(A,O[A],D)}e.decodePayload=function(O,P,F){if(typeof O!="string")return e.decodePayloadAsBinary(O,P,F);typeof P=="function"&&(F=P,P=null);var V;if(O==="")return F(m,0,1);for(var D="",ee,A,q=0,$=O.length;q<$;q++){var ce=O.charAt(q);if(ce!==":"){D+=ce;continue}if(D===""||D!=(ee=Number(D))||(A=O.substr(q+1,ee),D!=A.length))return F(m,0,1);if(A.length){if(V=e.decodePacket(A,P,!1),m.type===V.type&&m.data===V.data)return F(m,0,1);var ye=F(V,q+ee,$);if(ye===!1)return}q+=ee,D=""}if(D!=="")return F(m,0,1)},e.encodePayloadAsArrayBuffer=function(O,P){if(!O.length)return P(new ArrayBuffer(0));function F(V,D){e.encodePacket(V,!0,!0,function(ee){return D(null,ee)})}G(O,F,function(V,D){var ee=D.reduce(function($,ce){var ye;return typeof ce=="string"?ye=ce.length:ye=ce.byteLength,$+ye.toString().length+ye+2},0),A=new Uint8Array(ee),q=0;return D.forEach(function($){var ce=typeof $=="string",ye=$;if(ce){for(var K=new Uint8Array($.length),re=0;re<$.length;re++)K[re]=$.charCodeAt(re);ye=K.buffer}ce?A[q++]=0:A[q++]=1;for(var ie=ye.byteLength.toString(),re=0;re<ie.length;re++)A[q++]=parseInt(ie[re]);A[q++]=255;for(var K=new Uint8Array(ye),re=0;re<K.length;re++)A[q++]=K[re]}),P(A.buffer)})},e.encodePayloadAsBlob=function(O,P){function F(V,D){e.encodePacket(V,!0,!0,function(ee){var A=new Uint8Array(1);if(A[0]=1,typeof ee=="string"){for(var q=new Uint8Array(ee.length),$=0;$<ee.length;$++)q[$]=ee.charCodeAt($);ee=q.buffer,A[0]=0}for(var ce=ee instanceof ArrayBuffer?ee.byteLength:ee.size,ye=ce.toString(),re=new Uint8Array(ye.length+1),$=0;$<ye.length;$++)re[$]=parseInt(ye[$]);if(re[ye.length]=255,x){var ie=new x([A.buffer,re.buffer,ee]);D(null,ie)}})}G(O,F,function(V,D){return P(new x(D))})},e.decodePayloadAsBinary=function(O,P,F){typeof P=="function"&&(F=P,P=null);for(var V=O,D=[];V.byteLength>0;){for(var ee=new Uint8Array(V),A=ee[0]===0,q="",$=1;ee[$]!==255;$++){if(q.length>310)return F(m,0,1);q+=ee[$]}V=n(V,2+q.length),q=parseInt(q);var ce=n(V,0,q);if(A)try{ce=String.fromCharCode.apply(null,new Uint8Array(ce))}catch{var ye=new Uint8Array(ce);ce="";for(var $=0;$<ye.length;$++)ce+=String.fromCharCode(ye[$])}D.push(ce),V=n(V,q)}var re=D.length;D.forEach(function(ie,K){F(e.decodePacket(ie,P,!0),K,re)})}})(Tn);var Sf,Ag;function yh(){if(Ag)return Sf;Ag=1;var e=Tn,t=Cn;Sf=r;function r(n){this.path=n.path,this.hostname=n.hostname,this.port=n.port,this.secure=n.secure,this.query=n.query,this.timestampParam=n.timestampParam,this.timestampRequests=n.timestampRequests,this.readyState="",this.agent=n.agent||!1,this.socket=n.socket,this.enablesXDR=n.enablesXDR,this.withCredentials=n.withCredentials,this.pfx=n.pfx,this.key=n.key,this.passphrase=n.passphrase,this.cert=n.cert,this.ca=n.ca,this.ciphers=n.ciphers,this.rejectUnauthorized=n.rejectUnauthorized,this.forceNode=n.forceNode,this.isReactNative=n.isReactNative,this.extraHeaders=n.extraHeaders,this.localAddress=n.localAddress}return t(r.prototype),r.prototype.onError=function(n,o){var a=new Error(n);return a.type="TransportError",a.description=o,this.emit("error",a),this},r.prototype.open=function(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this},r.prototype.close=function(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this},r.prototype.send=function(n){if(this.readyState==="open")this.write(n);else throw new Error("Transport not open")},r.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},r.prototype.onData=function(n){var o=e.decodePacket(n,this.socket.binaryType);this.onPacket(o)},r.prototype.onPacket=function(n){this.emit("packet",n)},r.prototype.onClose=function(){this.readyState="closed",this.emit("close")},Sf}var Ss={};Ss.encode=function(e){var t="";for(var r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t};Ss.decode=function(e){for(var t={},r=e.split("&"),n=0,o=r.length;n<o;n++){var a=r[n].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t};var tu=function(e,t){var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e},u0="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Ol=64,f0={},Rg=0,Gr=0,Lg;function Ic(e){var t="";do t=u0[e%Ol]+t,e=Math.floor(e/Ol);while(e>0);return t}function MC(e){var t=0;for(Gr=0;Gr<e.length;Gr++)t=t*Ol+f0[e.charAt(Gr)];return t}function mh(){var e=Ic(+new Date);return e!==Lg?(Rg=0,Lg=e):e+"."+Ic(Rg++)}for(;Gr<Ol;Gr++)f0[u0[Gr]]=Gr;mh.encode=Ic;mh.decode=MC;var c0=mh,Jc={exports:{}},Nc={exports:{}},Qo=1e3,Yo=Qo*60,Ho=Yo*60,Zo=Ho*24,CC=Zo*365.25,TC=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return EC(e);if(r==="number"&&isNaN(e)===!1)return t.long?AC(e):kC(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function EC(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*CC;case"days":case"day":case"d":return r*Zo;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Ho;case"minutes":case"minute":case"mins":case"min":case"m":return r*Yo;case"seconds":case"second":case"secs":case"sec":case"s":return r*Qo;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function kC(e){return e>=Zo?Math.round(e/Zo)+"d":e>=Ho?Math.round(e/Ho)+"h":e>=Yo?Math.round(e/Yo)+"m":e>=Qo?Math.round(e/Qo)+"s":e+"ms"}function AC(e){return sl(e,Zo,"day")||sl(e,Ho,"hour")||sl(e,Yo,"minute")||sl(e,Qo,"second")||e+" ms"}function sl(e,t,r){if(!(e<t))return e<t*1.5?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}(function(e,t){t=e.exports=n.debug=n.default=n,t.coerce=p,t.disable=f,t.enable=a,t.enabled=h,t.humanize=TC,t.instances=[],t.names=[],t.skips=[],t.formatters={};function r(v){var _=0,y;for(y in v)_=(_<<5)-_+v.charCodeAt(y),_|=0;return t.colors[Math.abs(_)%t.colors.length]}function n(v){var _;function y(){if(y.enabled){var m=y,x=+new Date,U=x-(_||x);m.diff=U,m.prev=_,m.curr=x,_=x;for(var R=new Array(arguments.length),S=0;S<R.length;S++)R[S]=arguments[S];R[0]=t.coerce(R[0]),typeof R[0]!="string"&&R.unshift("%O");var g=0;R[0]=R[0].replace(/%([a-zA-Z%])/g,function(G,O){if(G==="%%")return G;g++;var P=t.formatters[O];if(typeof P=="function"){var F=R[g];G=P.call(m,F),R.splice(g,1),g--}return G}),t.formatArgs.call(m,R);var L=y.log||t.log||console.log.bind(console);L.apply(m,R)}}return y.namespace=v,y.enabled=t.enabled(v),y.useColors=t.useColors(),y.color=r(v),y.destroy=o,typeof t.init=="function"&&t.init(y),t.instances.push(y),y}function o(){var v=t.instances.indexOf(this);return v!==-1?(t.instances.splice(v,1),!0):!1}function a(v){t.save(v),t.names=[],t.skips=[];var _,y=(typeof v=="string"?v:"").split(/[\s,]+/),m=y.length;for(_=0;_<m;_++)y[_]&&(v=y[_].replace(/\*/g,".*?"),v[0]==="-"?t.skips.push(new RegExp("^"+v.substr(1)+"$")):t.names.push(new RegExp("^"+v+"$")));for(_=0;_<t.instances.length;_++){var x=t.instances[_];x.enabled=t.enabled(x.namespace)}}function f(){t.enable("")}function h(v){if(v[v.length-1]==="*")return!0;var _,y;for(_=0,y=t.skips.length;_<y;_++)if(t.skips[_].test(v))return!1;for(_=0,y=t.names.length;_<y;_++)if(t.names[_].test(v))return!0;return!1}function p(v){return v instanceof Error?v.stack||v.message:v}})(Nc,Nc.exports);var RC=Nc.exports;(function(e,t){t=e.exports=RC,t.log=o,t.formatArgs=n,t.save=a,t.load=f,t.useColors=r,t.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:h(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}t.formatters.j=function(p){try{return JSON.stringify(p)}catch(v){return"[UnexpectedJSONParseError]: "+v.message}};function n(p){var v=this.useColors;if(p[0]=(v?"%c":"")+this.namespace+(v?" %c":" ")+p[0]+(v?"%c ":" ")+"+"+t.humanize(this.diff),!!v){var _="color: "+this.color;p.splice(1,0,_,"color: inherit");var y=0,m=0;p[0].replace(/%[a-zA-Z%]/g,function(x){x!=="%%"&&(y++,x==="%c"&&(m=y))}),p.splice(m,0,_)}}function o(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(p){try{p==null?t.storage.removeItem("debug"):t.storage.debug=p}catch{}}function f(){var p;try{p=t.storage.debug}catch{}return!p&&typeof process<"u"&&"env"in process&&(p={}.DEBUG),p}t.enable(f());function h(){try{return window.localStorage}catch{}}})(Jc,Jc.exports);var iu=Jc.exports,h0=yh(),LC=Ss,p0=Tn,UC=tu,IC=c0,Fi=iu("engine.io-client:polling"),d0=sr,JC=function(){var e=dh,t=new e({xdomain:!1});return t.responseType!=null}();function sr(e){var t=e&&e.forceBase64;(!JC||t)&&(this.supportsBinary=!1),h0.call(this,e)}UC(sr,h0);sr.prototype.name="polling";sr.prototype.doOpen=function(){this.poll()};sr.prototype.pause=function(e){var t=this;this.readyState="pausing";function r(){Fi("paused"),t.readyState="paused",e()}if(this.polling||!this.writable){var n=0;this.polling&&(Fi("we are currently polling - waiting to pause"),n++,this.once("pollComplete",function(){Fi("pre-pause polling complete"),--n||r()})),this.writable||(Fi("we are currently writing - waiting to pause"),n++,this.once("drain",function(){Fi("pre-pause writing complete"),--n||r()}))}else r()};sr.prototype.poll=function(){Fi("polling"),this.polling=!0,this.doPoll(),this.emit("poll")};sr.prototype.onData=function(e){var t=this;Fi("polling got data %s",e);var r=function(n,o,a){if(t.readyState==="opening"&&n.type==="open"&&t.onOpen(),n.type==="close")return t.onClose(),!1;t.onPacket(n)};p0.decodePayload(e,this.socket.binaryType,r),this.readyState!=="closed"&&(this.polling=!1,this.emit("pollComplete"),this.readyState==="open"?this.poll():Fi('ignoring poll - transport state "%s"',this.readyState))};sr.prototype.doClose=function(){var e=this;function t(){Fi("writing close packet"),e.write([{type:"close"}])}this.readyState==="open"?(Fi("transport open - closing"),t()):(Fi("transport not open - deferring close"),this.once("open",t))};sr.prototype.write=function(e){var t=this;this.writable=!1;var r=function(){t.writable=!0,t.emit("drain")};p0.encodePayload(e,this.supportsBinary,function(n){t.doWrite(n,r)})};sr.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",r="";this.timestampRequests!==!1&&(e[this.timestampParam]=IC()),!this.supportsBinary&&!e.sid&&(e.b64=1),e=LC.encode(e),this.port&&(t==="https"&&Number(this.port)!==443||t==="http"&&Number(this.port)!==80)&&(r=":"+this.port),e.length&&(e="?"+e);var n=this.hostname.indexOf(":")!==-1;return t+"://"+(n?"["+this.hostname+"]":this.hostname)+r+this.path+e};var NC=dh,g0=d0,OC=Cn,BC=tu,Oc=iu("engine.io-client:polling-xhr"),FC=ph;gh.exports=Ms;gh.exports.Request=Jt;function Ug(){}function Ms(e){if(g0.call(this,e),this.requestTimeout=e.requestTimeout,this.extraHeaders=e.extraHeaders,typeof location<"u"){var t=location.protocol==="https:",r=location.port;r||(r=t?443:80),this.xd=typeof location<"u"&&e.hostname!==location.hostname||r!==e.port,this.xs=e.secure!==t}}BC(Ms,g0);Ms.prototype.supportsBinary=!0;Ms.prototype.request=function(e){return e=e||{},e.uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.withCredentials=this.withCredentials,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,e.requestTimeout=this.requestTimeout,e.extraHeaders=this.extraHeaders,new Jt(e)};Ms.prototype.doWrite=function(e,t){var r=typeof e!="string"&&e!==void 0,n=this.request({method:"POST",data:e,isBinary:r}),o=this;n.on("success",t),n.on("error",function(a){o.onError("xhr post error",a)}),this.sendXhr=n};Ms.prototype.doPoll=function(){Oc("xhr poll");var e=this.request(),t=this;e.on("data",function(r){t.onData(r)}),e.on("error",function(r){t.onError("xhr poll error",r)}),this.pollXhr=e};function Jt(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=e.async!==!1,this.data=e.data!==void 0?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.withCredentials=e.withCredentials,this.requestTimeout=e.requestTimeout,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders,this.create()}OC(Jt.prototype);Jt.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var t=this.xhr=new NC(e),r=this;try{Oc("xhr open %s: %s",this.method,this.uri),t.open(this.method,this.uri,this.async);try{if(this.extraHeaders){t.setDisableHeaderCheck&&t.setDisableHeaderCheck(!0);for(var n in this.extraHeaders)this.extraHeaders.hasOwnProperty(n)&&t.setRequestHeader(n,this.extraHeaders[n])}}catch{}if(this.method==="POST")try{this.isBinary?t.setRequestHeader("Content-type","application/octet-stream"):t.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{t.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in t&&(t.withCredentials=this.withCredentials),this.requestTimeout&&(t.timeout=this.requestTimeout),this.hasXDR()?(t.onload=function(){r.onLoad()},t.onerror=function(){r.onError(t.responseText)}):t.onreadystatechange=function(){if(t.readyState===2)try{var o=t.getResponseHeader("Content-Type");(r.supportsBinary&&o==="application/octet-stream"||o==="application/octet-stream; charset=UTF-8")&&(t.responseType="arraybuffer")}catch{}t.readyState===4&&(t.status===200||t.status===1223?r.onLoad():setTimeout(function(){r.onError(typeof t.status=="number"?t.status:0)},0))},Oc("xhr data %s",this.data),t.send(this.data)}catch(o){setTimeout(function(){r.onError(o)},0);return}typeof document<"u"&&(this.index=Jt.requestsCount++,Jt.requests[this.index]=this)};Jt.prototype.onSuccess=function(){this.emit("success"),this.cleanup()};Jt.prototype.onData=function(e){this.emit("data",e),this.onSuccess()};Jt.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)};Jt.prototype.cleanup=function(e){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=Ug:this.xhr.onreadystatechange=Ug,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Jt.requests[this.index],this.xhr=null}};Jt.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type")}catch{}t==="application/octet-stream"||t==="application/octet-stream; charset=UTF-8"?e=this.xhr.response||this.xhr.responseText:e=this.xhr.responseText}catch(r){this.onError(r)}e!=null&&this.onData(e)};Jt.prototype.hasXDR=function(){return typeof XDomainRequest<"u"&&!this.xs&&this.enablesXDR};Jt.prototype.abort=function(){this.cleanup()};Jt.requestsCount=0;Jt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Ig);else if(typeof addEventListener=="function"){var DC="onpagehide"in FC?"pagehide":"unload";addEventListener(DC,Ig,!1)}}function Ig(){for(var e in Jt.requests)Jt.requests.hasOwnProperty(e)&&Jt.requests[e].abort()}var jC=gh.exports,vh=d0,PC=tu,Jg=ph,GC=Cs,WC=/\n/g,KC=/\\n/g,ol;function VC(){}function Cs(e){vh.call(this,e),this.query=this.query||{},ol||(ol=Jg.___eio=Jg.___eio||[]),this.index=ol.length;var t=this;ol.push(function(r){t.onData(r)}),this.query.j=this.index,typeof addEventListener=="function"&&addEventListener("beforeunload",function(){t.script&&(t.script.onerror=VC)},!1)}PC(Cs,vh);Cs.prototype.supportsBinary=!1;Cs.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),vh.prototype.doClose.call(this)};Cs.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(o){e.onError("jsonp poll error",o)};var r=document.getElementsByTagName("script")[0];r?r.parentNode.insertBefore(t,r):(document.head||document.body).appendChild(t),this.script=t;var n=typeof navigator<"u"&&/gecko/i.test(navigator.userAgent);n&&setTimeout(function(){var o=document.createElement("iframe");document.body.appendChild(o),document.body.removeChild(o)},100)};Cs.prototype.doWrite=function(e,t){var r=this;if(!this.form){var n=document.createElement("form"),o=document.createElement("textarea"),a=this.iframeId="eio_iframe_"+this.index,f;n.className="socketio",n.style.position="absolute",n.style.top="-1000px",n.style.left="-1000px",n.target=a,n.method="POST",n.setAttribute("accept-charset","utf-8"),o.name="d",n.appendChild(o),document.body.appendChild(n),this.form=n,this.area=o}this.form.action=this.uri();function h(){p(),t()}function p(){if(r.iframe)try{r.form.removeChild(r.iframe)}catch(_){r.onError("jsonp polling iframe removal error",_)}try{var v='<iframe src="javascript:0" name="'+r.iframeId+'">';f=document.createElement(v)}catch{f=document.createElement("iframe"),f.name=r.iframeId,f.src="javascript:0"}f.id=r.iframeId,r.form.appendChild(f),r.iframe=f}p(),e=e.replace(KC,`\\
|
||
`),this.area.value=e.replace(WC,"\\n");try{this.form.submit()}catch{}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){r.iframe.readyState==="complete"&&h()}:this.iframe.onload=h};var _h=yh(),zC=Tn,QC=Ss,YC=tu,HC=c0,ZC=iu("engine.io-client:websocket"),Bl,wh;typeof WebSocket<"u"?Bl=WebSocket:typeof self<"u"&&(Bl=self.WebSocket||self.MozWebSocket);if(typeof window>"u")try{wh=bs}catch{}var hs=Bl||wh,$C=Si;function Si(e){var t=e&&e.forceBase64;t&&(this.supportsBinary=!1),this.perMessageDeflate=e.perMessageDeflate,this.usingBrowserWebSocket=Bl&&!e.forceNode,this.protocols=e.protocols,this.usingBrowserWebSocket||(hs=wh),_h.call(this,e)}YC(Si,_h);Si.prototype.name="websocket";Si.prototype.supportsBinary=!0;Si.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=this.protocols,r={};this.isReactNative||(r.agent=this.agent,r.perMessageDeflate=this.perMessageDeflate,r.pfx=this.pfx,r.key=this.key,r.passphrase=this.passphrase,r.cert=this.cert,r.ca=this.ca,r.ciphers=this.ciphers,r.rejectUnauthorized=this.rejectUnauthorized),this.extraHeaders&&(r.headers=this.extraHeaders),this.localAddress&&(r.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket&&!this.isReactNative?t?new hs(e,t):new hs(e):new hs(e,t,r)}catch(n){return this.emit("error",n)}this.ws.binaryType===void 0&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}};Si.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(t){e.onData(t.data)},this.ws.onerror=function(t){e.onError("websocket error",t)}};Si.prototype.write=function(e){var t=this;this.writable=!1;for(var r=e.length,n=0,o=r;n<o;n++)(function(f){zC.encodePacket(f,t.supportsBinary,function(h){if(!t.usingBrowserWebSocket){var p={};if(f.options&&(p.compress=f.options.compress),t.perMessageDeflate){var v=typeof h=="string"?Buffer.byteLength(h):h.length;v<t.perMessageDeflate.threshold&&(p.compress=!1)}}try{t.usingBrowserWebSocket?t.ws.send(h):t.ws.send(h,p)}catch{ZC("websocket closed before onclose event")}--r||a()})})(e[n]);function a(){t.emit("flush"),setTimeout(function(){t.writable=!0,t.emit("drain")},0)}};Si.prototype.onClose=function(){_h.prototype.onClose.call(this)};Si.prototype.doClose=function(){typeof this.ws<"u"&&this.ws.close()};Si.prototype.uri=function(){var e=this.query||{},t=this.secure?"wss":"ws",r="";this.port&&(t==="wss"&&Number(this.port)!==443||t==="ws"&&Number(this.port)!==80)&&(r=":"+this.port),this.timestampRequests&&(e[this.timestampParam]=HC()),this.supportsBinary||(e.b64=1),e=QC.encode(e),e.length&&(e="?"+e);var n=this.hostname.indexOf(":")!==-1;return t+"://"+(n?"["+this.hostname+"]":this.hostname)+r+this.path+e};Si.prototype.check=function(){return!!hs&&!("__initialize"in hs&&this.name===Si.prototype.name)};var XC=dh,qC=jC,eT=GC,tT=$C;eu.polling=iT;eu.websocket=tT;function iT(e){var t,r=!1,n=!1,o=e.jsonp!==!1;if(typeof location<"u"){var a=location.protocol==="https:",f=location.port;f||(f=a?443:80),r=e.hostname!==location.hostname||f!==e.port,n=e.secure!==a}if(e.xdomain=r,e.xscheme=n,t=new XC(e),"open"in t&&!e.forceJSONP)return new qC(e);if(!o)throw new Error("JSONP disabled");return new eT(e)}var rT=[].indexOf,y0=function(e,t){if(rT)return e.indexOf(t);for(var r=0;r<e.length;++r)if(e[r]===t)return r;return-1},nT=eu,sT=Cn,Lt=iu("engine.io-client:socket"),oT=y0,m0=Tn,Ng=qm,aT=Ss,lT=$e;function $e(e,t){if(!(this instanceof $e))return new $e(e,t);t=t||{},e&&typeof e=="object"&&(t=e,e=null),e?(e=Ng(e),t.hostname=e.host,t.secure=e.protocol==="https"||e.protocol==="wss",t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=Ng(t.host).host),this.secure=t.secure!=null?t.secure:typeof location<"u"&&location.protocol==="https:",t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.agent=t.agent||!1,this.hostname=t.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=t.port||(typeof location<"u"&&location.port?location.port:this.secure?443:80),this.query=t.query||{},typeof this.query=="string"&&(this.query=aT.decode(this.query)),this.upgrade=t.upgrade!==!1,this.path=(t.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!t.forceJSONP,this.jsonp=t.jsonp!==!1,this.forceBase64=!!t.forceBase64,this.enablesXDR=!!t.enablesXDR,this.withCredentials=t.withCredentials!==!1,this.timestampParam=t.timestampParam||"t",this.timestampRequests=t.timestampRequests,this.transports=t.transports||["polling","websocket"],this.transportOptions=t.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=t.policyPort||843,this.rememberUpgrade=t.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=t.onlyBinaryUpgrades,this.perMessageDeflate=t.perMessageDeflate!==!1?t.perMessageDeflate||{}:!1,this.perMessageDeflate===!0&&(this.perMessageDeflate={}),this.perMessageDeflate&&this.perMessageDeflate.threshold==null&&(this.perMessageDeflate.threshold=1024),this.pfx=t.pfx||void 0,this.key=t.key||void 0,this.passphrase=t.passphrase||void 0,this.cert=t.cert||void 0,this.ca=t.ca||void 0,this.ciphers=t.ciphers||void 0,this.rejectUnauthorized=t.rejectUnauthorized===void 0?!0:t.rejectUnauthorized,this.forceNode=!!t.forceNode,this.isReactNative=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",(typeof self>"u"||this.isReactNative)&&(t.extraHeaders&&Object.keys(t.extraHeaders).length>0&&(this.extraHeaders=t.extraHeaders),t.localAddress&&(this.localAddress=t.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}$e.priorWebsocketSuccess=!1;sT($e.prototype);$e.protocol=m0.protocol;$e.Socket=$e;$e.Transport=yh();$e.transports=eu;$e.parser=Tn;$e.prototype.createTransport=function(e){Lt('creating transport "%s"',e);var t=uT(this.query);t.EIO=m0.protocol,t.transport=e;var r=this.transportOptions[e]||{};this.id&&(t.sid=this.id);var n=new nT[e]({query:t,socket:this,agent:r.agent||this.agent,hostname:r.hostname||this.hostname,port:r.port||this.port,secure:r.secure||this.secure,path:r.path||this.path,forceJSONP:r.forceJSONP||this.forceJSONP,jsonp:r.jsonp||this.jsonp,forceBase64:r.forceBase64||this.forceBase64,enablesXDR:r.enablesXDR||this.enablesXDR,withCredentials:r.withCredentials||this.withCredentials,timestampRequests:r.timestampRequests||this.timestampRequests,timestampParam:r.timestampParam||this.timestampParam,policyPort:r.policyPort||this.policyPort,pfx:r.pfx||this.pfx,key:r.key||this.key,passphrase:r.passphrase||this.passphrase,cert:r.cert||this.cert,ca:r.ca||this.ca,ciphers:r.ciphers||this.ciphers,rejectUnauthorized:r.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:r.perMessageDeflate||this.perMessageDeflate,extraHeaders:r.extraHeaders||this.extraHeaders,forceNode:r.forceNode||this.forceNode,localAddress:r.localAddress||this.localAddress,requestTimeout:r.requestTimeout||this.requestTimeout,protocols:r.protocols||void 0,isReactNative:this.isReactNative});return n};function uT(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}$e.prototype.open=function(){var e;if(this.rememberUpgrade&&$e.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)e="websocket";else if(this.transports.length===0){var t=this;setTimeout(function(){t.emit("error","No transports available")},0);return}else e=this.transports[0];this.readyState="opening";try{e=this.createTransport(e)}catch{this.transports.shift(),this.open();return}e.open(),this.setTransport(e)};$e.prototype.setTransport=function(e){Lt("setting transport %s",e.name);var t=this;this.transport&&(Lt("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",function(){t.onDrain()}).on("packet",function(r){t.onPacket(r)}).on("error",function(r){t.onError(r)}).on("close",function(){t.onClose("transport close")})};$e.prototype.probe=function(e){Lt('probing transport "%s"',e);var t=this.createTransport(e,{probe:1}),r=!1,n=this;$e.priorWebsocketSuccess=!1;function o(){if(n.onlyBinaryUpgrades){var y=!this.supportsBinary&&n.transport.supportsBinary;r=r||y}r||(Lt('probe transport "%s" opened',e),t.send([{type:"ping",data:"probe"}]),t.once("packet",function(m){if(!r)if(m.type==="pong"&&m.data==="probe"){if(Lt('probe transport "%s" pong',e),n.upgrading=!0,n.emit("upgrading",t),!t)return;$e.priorWebsocketSuccess=t.name==="websocket",Lt('pausing current transport "%s"',n.transport.name),n.transport.pause(function(){r||n.readyState!=="closed"&&(Lt("changing transport and sending upgrade packet"),_(),n.setTransport(t),t.send([{type:"upgrade"}]),n.emit("upgrade",t),t=null,n.upgrading=!1,n.flush())})}else{Lt('probe transport "%s" failed',e);var x=new Error("probe error");x.transport=t.name,n.emit("upgradeError",x)}}))}function a(){r||(r=!0,_(),t.close(),t=null)}function f(y){var m=new Error("probe error: "+y);m.transport=t.name,a(),Lt('probe transport "%s" failed because of error: %s',e,y),n.emit("upgradeError",m)}function h(){f("transport closed")}function p(){f("socket closed")}function v(y){t&&y.name!==t.name&&(Lt('"%s" works - aborting "%s"',y.name,t.name),a())}function _(){t.removeListener("open",o),t.removeListener("error",f),t.removeListener("close",h),n.removeListener("close",p),n.removeListener("upgrading",v)}t.once("open",o),t.once("error",f),t.once("close",h),this.once("close",p),this.once("upgrading",v),t.open()};$e.prototype.onOpen=function(){if(Lt("socket open"),this.readyState="open",$e.priorWebsocketSuccess=this.transport.name==="websocket",this.emit("open"),this.flush(),this.readyState==="open"&&this.upgrade&&this.transport.pause){Lt("starting upgrade probes");for(var e=0,t=this.upgrades.length;e<t;e++)this.probe(this.upgrades[e])}};$e.prototype.onPacket=function(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(Lt('socket receive: type "%s", data "%s"',e.type,e.data),this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emit("data",e.data),this.emit("message",e.data);break}else Lt('packet received with socket readyState "%s"',this.readyState)};$e.prototype.onHandshake=function(e){this.emit("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.onOpen(),this.readyState!=="closed"&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))};$e.prototype.onHeartbeat=function(e){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout(function(){t.readyState!=="closed"&&t.onClose("ping timeout")},e||t.pingInterval+t.pingTimeout)};$e.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer),e.pingIntervalTimer=setTimeout(function(){Lt("writing ping packet - expecting pong within %sms",e.pingTimeout),e.ping(),e.onHeartbeat(e.pingTimeout)},e.pingInterval)};$e.prototype.ping=function(){var e=this;this.sendPacket("ping",function(){e.emit("ping")})};$e.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emit("drain"):this.flush()};$e.prototype.flush=function(){this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(Lt("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))};$e.prototype.write=$e.prototype.send=function(e,t,r){return this.sendPacket("message",e,t,r),this};$e.prototype.sendPacket=function(e,t,r,n){if(typeof t=="function"&&(n=t,t=void 0),typeof r=="function"&&(n=r,r=null),!(this.readyState==="closing"||this.readyState==="closed")){r=r||{},r.compress=r.compress!==!1;var o={type:e,data:t,options:r};this.emit("packetCreate",o),this.writeBuffer.push(o),n&&this.once("flush",n),this.flush()}};$e.prototype.close=function(){if(this.readyState==="opening"||this.readyState==="open"){this.readyState="closing";var e=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?n():t()}):this.upgrading?n():t()}function t(){e.onClose("forced close"),Lt("socket closing - telling transport to close"),e.transport.close()}function r(){e.removeListener("upgrade",r),e.removeListener("upgradeError",r),t()}function n(){e.once("upgrade",r),e.once("upgradeError",r)}return this};$e.prototype.onError=function(e){Lt("socket error %j",e),$e.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)};$e.prototype.onClose=function(e,t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){Lt('socket close with reason: "%s"',e);var r=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",e,t),r.writeBuffer=[],r.prevBufferLen=0}};$e.prototype.filterUpgrades=function(e){for(var t=[],r=0,n=e.length;r<n;r++)~oT(this.transports,e[r])&&t.push(e[r]);return t};hh.exports=lT;hh.exports.parser=Tn;var fT=hh.exports,v0={exports:{}},cT=hT;function hT(e,t){var r=[];t=t||0;for(var n=t||0;n<e.length;n++)r[n-t]=e[n];return r}var _0=pT;function pT(e,t,r){return e.on(t,r),{destroy:function(){e.removeListener(t,r)}}}var Og=[].slice,w0=function(e,t){if(typeof t=="string"&&(t=e[t]),typeof t!="function")throw new Error("bind() requires a function");var r=Og.call(arguments,2);return function(){return t.apply(e,r.concat(Og.call(arguments)))}};(function(e,t){var r=Xl,n=Cn,o=cT,a=_0,f=w0,h=$l("socket.io-client:socket"),p=Ss,v=s0;e.exports=m;var _={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},y=n.prototype.emit;function m(x,U,R){this.io=x,this.nsp=U,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},R&&R.query&&(this.query=R.query),this.io.autoConnect&&this.open()}n(m.prototype),m.prototype.subEvents=function(){if(!this.subs){var x=this.io;this.subs=[a(x,"open",f(this,"onopen")),a(x,"packet",f(this,"onpacket")),a(x,"close",f(this,"onclose"))]}},m.prototype.open=m.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.reconnecting||this.io.open(),this.io.readyState==="open"&&this.onopen(),this.emit("connecting"),this)},m.prototype.send=function(){var x=o(arguments);return x.unshift("message"),this.emit.apply(this,x),this},m.prototype.emit=function(x){if(_.hasOwnProperty(x))return y.apply(this,arguments),this;var U=o(arguments),R={type:(this.flags.binary!==void 0?this.flags.binary:v(U))?r.BINARY_EVENT:r.EVENT,data:U};return R.options={},R.options.compress=!this.flags||this.flags.compress!==!1,typeof U[U.length-1]=="function"&&(h("emitting packet with ack id %d",this.ids),this.acks[this.ids]=U.pop(),R.id=this.ids++),this.connected?this.packet(R):this.sendBuffer.push(R),this.flags={},this},m.prototype.packet=function(x){x.nsp=this.nsp,this.io.packet(x)},m.prototype.onopen=function(){if(h("transport is open - connecting"),this.nsp!=="/")if(this.query){var x=typeof this.query=="object"?p.encode(this.query):this.query;h("sending connect packet with query %s",x),this.packet({type:r.CONNECT,query:x})}else this.packet({type:r.CONNECT})},m.prototype.onclose=function(x){h("close (%s)",x),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",x)},m.prototype.onpacket=function(x){var U=x.nsp===this.nsp,R=x.type===r.ERROR&&x.nsp==="/";if(!(!U&&!R))switch(x.type){case r.CONNECT:this.onconnect();break;case r.EVENT:this.onevent(x);break;case r.BINARY_EVENT:this.onevent(x);break;case r.ACK:this.onack(x);break;case r.BINARY_ACK:this.onack(x);break;case r.DISCONNECT:this.ondisconnect();break;case r.ERROR:this.emit("error",x.data);break}},m.prototype.onevent=function(x){var U=x.data||[];h("emitting event %j",U),x.id!=null&&(h("attaching ack callback to event"),U.push(this.ack(x.id))),this.connected?y.apply(this,U):this.receiveBuffer.push(U)},m.prototype.ack=function(x){var U=this,R=!1;return function(){if(!R){R=!0;var S=o(arguments);h("sending ack %j",S),U.packet({type:v(S)?r.BINARY_ACK:r.ACK,id:x,data:S})}}},m.prototype.onack=function(x){var U=this.acks[x.id];typeof U=="function"?(h("calling ack %s with %j",x.id,x.data),U.apply(this,x.data),delete this.acks[x.id]):h("bad ack %s",x.id)},m.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emitBuffered(),this.emit("connect")},m.prototype.emitBuffered=function(){var x;for(x=0;x<this.receiveBuffer.length;x++)y.apply(this,this.receiveBuffer[x]);for(this.receiveBuffer=[],x=0;x<this.sendBuffer.length;x++)this.packet(this.sendBuffer[x]);this.sendBuffer=[]},m.prototype.ondisconnect=function(){h("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},m.prototype.destroy=function(){if(this.subs){for(var x=0;x<this.subs.length;x++)this.subs[x].destroy();this.subs=null}this.io.destroy(this)},m.prototype.close=m.prototype.disconnect=function(){return this.connected&&(h("performing disconnect (%s)",this.nsp),this.packet({type:r.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},m.prototype.compress=function(x){return this.flags.compress=x,this},m.prototype.binary=function(x){return this.flags.binary=x,this}})(v0);var b0=v0.exports,dT=Ts;function Ts(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Ts.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+r:e-r}return Math.min(e,this.max)|0};Ts.prototype.reset=function(){this.attempts=0};Ts.prototype.setMin=function(e){this.ms=e};Ts.prototype.setMax=function(e){this.max=e};Ts.prototype.setJitter=function(e){this.jitter=e};var gT=fT,yT=b0,mT=Cn,vT=Xl,Fr=_0,is=w0,Qt=$l("socket.io-client:manager"),x0=y0,_T=dT,S0=Object.prototype.hasOwnProperty,Bg=ot;function ot(e,t){if(!(this instanceof ot))return new ot(e,t);e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.nsps={},this.subs=[],this.opts=t,this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor||.5),this.backoff=new _T({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this.readyState="closed",this.uri=e,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var r=t.parser||vT;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this.autoConnect=t.autoConnect!==!1,this.autoConnect&&this.open()}ot.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var e in this.nsps)S0.call(this.nsps,e)&&this.nsps[e].emit.apply(this.nsps[e],arguments)};ot.prototype.updateSocketIds=function(){for(var e in this.nsps)S0.call(this.nsps,e)&&(this.nsps[e].id=this.generateId(e))};ot.prototype.generateId=function(e){return(e==="/"?"":e+"#")+this.engine.id};mT(ot.prototype);ot.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection};ot.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts};ot.prototype.reconnectionDelay=function(e){return arguments.length?(this._reconnectionDelay=e,this.backoff&&this.backoff.setMin(e),this):this._reconnectionDelay};ot.prototype.randomizationFactor=function(e){return arguments.length?(this._randomizationFactor=e,this.backoff&&this.backoff.setJitter(e),this):this._randomizationFactor};ot.prototype.reconnectionDelayMax=function(e){return arguments.length?(this._reconnectionDelayMax=e,this.backoff&&this.backoff.setMax(e),this):this._reconnectionDelayMax};ot.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout};ot.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()};ot.prototype.open=ot.prototype.connect=function(e,t){if(Qt("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;Qt("opening %s",this.uri),this.engine=gT(this.uri,this.opts);var r=this.engine,n=this;this.readyState="opening",this.skipReconnect=!1;var o=Fr(r,"open",function(){n.onopen(),e&&e()}),a=Fr(r,"error",function(p){if(Qt("connect_error"),n.cleanup(),n.readyState="closed",n.emitAll("connect_error",p),e){var v=new Error("Connection error");v.data=p,e(v)}else n.maybeReconnectOnOpen()});if(this._timeout!==!1){var f=this._timeout;Qt("connect attempt will timeout after %d",f),f===0&&o.destroy();var h=setTimeout(function(){Qt("connect attempt timed out after %d",f),o.destroy(),r.close(),r.emit("error","timeout"),n.emitAll("connect_timeout",f)},f);this.subs.push({destroy:function(){clearTimeout(h)}})}return this.subs.push(o),this.subs.push(a),this};ot.prototype.onopen=function(){Qt("open"),this.cleanup(),this.readyState="open",this.emit("open");var e=this.engine;this.subs.push(Fr(e,"data",is(this,"ondata"))),this.subs.push(Fr(e,"ping",is(this,"onping"))),this.subs.push(Fr(e,"pong",is(this,"onpong"))),this.subs.push(Fr(e,"error",is(this,"onerror"))),this.subs.push(Fr(e,"close",is(this,"onclose"))),this.subs.push(Fr(this.decoder,"decoded",is(this,"ondecoded")))};ot.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")};ot.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)};ot.prototype.ondata=function(e){this.decoder.add(e)};ot.prototype.ondecoded=function(e){this.emit("packet",e)};ot.prototype.onerror=function(e){Qt("error",e),this.emitAll("error",e)};ot.prototype.socket=function(e,t){var r=this.nsps[e];if(!r){r=new yT(this,e,t),this.nsps[e]=r;var n=this;r.on("connecting",o),r.on("connect",function(){r.id=n.generateId(e)}),this.autoConnect&&o()}function o(){~x0(n.connecting,r)||n.connecting.push(r)}return r};ot.prototype.destroy=function(e){var t=x0(this.connecting,e);~t&&this.connecting.splice(t,1),!this.connecting.length&&this.close()};ot.prototype.packet=function(e){Qt("writing packet %j",e);var t=this;e.query&&e.type===0&&(e.nsp+="?"+e.query),t.encoding?t.packetBuffer.push(e):(t.encoding=!0,this.encoder.encode(e,function(r){for(var n=0;n<r.length;n++)t.engine.write(r[n],e.options);t.encoding=!1,t.processPacketQueue()}))};ot.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}};ot.prototype.cleanup=function(){Qt("cleanup");for(var e=this.subs.length,t=0;t<e;t++){var r=this.subs.shift();r.destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()};ot.prototype.close=ot.prototype.disconnect=function(){Qt("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,this.readyState==="opening"&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()};ot.prototype.onclose=function(e){Qt("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",e),this._reconnection&&!this.skipReconnect&&this.reconnect()};ot.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attempts>=this._reconnectionAttempts)Qt("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();Qt("will wait %dms before reconnect attempt",t),this.reconnecting=!0;var r=setTimeout(function(){e.skipReconnect||(Qt("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),!e.skipReconnect&&e.open(function(n){n?(Qt("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",n.data)):(Qt("reconnect success"),e.onreconnect())}))},t);this.subs.push({destroy:function(){clearTimeout(r)}})}};ot.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)};(function(e,t){var r=PM,n=Xl,o=Bg,a=$l("socket.io-client");e.exports=t=h;var f=t.managers={};function h(p,v){typeof p=="object"&&(v=p,p=void 0),v=v||{};var _=r(p),y=_.source,m=_.id,x=_.path,U=f[m]&&x in f[m].nsps,R=v.forceNew||v["force new connection"]||v.multiplex===!1||U,S;return R?(a("ignoring socket cache for %s",y),S=o(y,v)):(f[m]||(a("new io instance for %s",y),f[m]=o(y,v)),S=f[m]),_.query&&!v.query&&(v.query=_.query),S.socket(_.path,v)}t.protocol=n.protocol,t.connect=h,t.Manager=Bg,t.Socket=b0})(Cc,Cc.exports);var wT=Cc.exports;const bT=Mi(wT);var Bc={exports:{}},Mf,Fg;function xT(){if(Fg)return Mf;Fg=1;var e=1e3,t=e*60,r=t*60,n=r*24,o=n*7,a=n*365.25;Mf=function(_,y){y=y||{};var m=typeof _;if(m==="string"&&_.length>0)return f(_);if(m==="number"&&isFinite(_))return y.long?p(_):h(_);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(_))};function f(_){if(_=String(_),!(_.length>100)){var y=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(_);if(y){var m=parseFloat(y[1]),x=(y[2]||"ms").toLowerCase();switch(x){case"years":case"year":case"yrs":case"yr":case"y":return m*a;case"weeks":case"week":case"w":return m*o;case"days":case"day":case"d":return m*n;case"hours":case"hour":case"hrs":case"hr":case"h":return m*r;case"minutes":case"minute":case"mins":case"min":case"m":return m*t;case"seconds":case"second":case"secs":case"sec":case"s":return m*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return m;default:return}}}}function h(_){var y=Math.abs(_);return y>=n?Math.round(_/n)+"d":y>=r?Math.round(_/r)+"h":y>=t?Math.round(_/t)+"m":y>=e?Math.round(_/e)+"s":_+"ms"}function p(_){var y=Math.abs(_);return y>=n?v(_,y,n,"day"):y>=r?v(_,y,r,"hour"):y>=t?v(_,y,t,"minute"):y>=e?v(_,y,e,"second"):_+" ms"}function v(_,y,m,x){var U=y>=m*1.5;return Math.round(_/m)+" "+x+(U?"s":"")}return Mf}function ST(e){r.debug=r,r.default=r,r.coerce=p,r.disable=a,r.enable=o,r.enabled=f,r.humanize=xT(),r.destroy=v,Object.keys(e).forEach(_=>{r[_]=e[_]}),r.names=[],r.skips=[],r.formatters={};function t(_){let y=0;for(let m=0;m<_.length;m++)y=(y<<5)-y+_.charCodeAt(m),y|=0;return r.colors[Math.abs(y)%r.colors.length]}r.selectColor=t;function r(_){let y,m=null,x,U;function R(...S){if(!R.enabled)return;const g=R,L=Number(new Date),G=L-(y||L);g.diff=G,g.prev=y,g.curr=L,y=L,S[0]=r.coerce(S[0]),typeof S[0]!="string"&&S.unshift("%O");let O=0;S[0]=S[0].replace(/%([a-zA-Z%])/g,(F,V)=>{if(F==="%%")return"%";O++;const D=r.formatters[V];if(typeof D=="function"){const ee=S[O];F=D.call(g,ee),S.splice(O,1),O--}return F}),r.formatArgs.call(g,S),(g.log||r.log).apply(g,S)}return R.namespace=_,R.useColors=r.useColors(),R.color=r.selectColor(_),R.extend=n,R.destroy=r.destroy,Object.defineProperty(R,"enabled",{enumerable:!0,configurable:!1,get:()=>m!==null?m:(x!==r.namespaces&&(x=r.namespaces,U=r.enabled(_)),U),set:S=>{m=S}}),typeof r.init=="function"&&r.init(R),R}function n(_,y){const m=r(this.namespace+(typeof y>"u"?":":y)+_);return m.log=this.log,m}function o(_){r.save(_),r.namespaces=_,r.names=[],r.skips=[];let y;const m=(typeof _=="string"?_:"").split(/[\s,]+/),x=m.length;for(y=0;y<x;y++)m[y]&&(_=m[y].replace(/\*/g,".*?"),_[0]==="-"?r.skips.push(new RegExp("^"+_.slice(1)+"$")):r.names.push(new RegExp("^"+_+"$")))}function a(){const _=[...r.names.map(h),...r.skips.map(h).map(y=>"-"+y)].join(",");return r.enable(""),_}function f(_){if(_[_.length-1]==="*")return!0;let y,m;for(y=0,m=r.skips.length;y<m;y++)if(r.skips[y].test(_))return!1;for(y=0,m=r.names.length;y<m;y++)if(r.names[y].test(_))return!0;return!1}function h(_){return _.toString().substring(2,_.toString().length-2).replace(/\.\*\?$/,"*")}function p(_){return _ instanceof Error?_.stack||_.message:_}function v(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}var MT=ST;(function(e,t){t.formatArgs=n,t.save=o,t.load=a,t.useColors=r,t.storage=f(),t.destroy=(()=>{let p=!1;return()=>{p||(p=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function n(p){if(p[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+p[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const v="color: "+this.color;p.splice(1,0,v,"color: inherit");let _=0,y=0;p[0].replace(/%[a-zA-Z%]/g,m=>{m!=="%%"&&(_++,m==="%c"&&(y=_))}),p.splice(y,0,v)}t.log=console.debug||console.log||(()=>{});function o(p){try{p?t.storage.setItem("debug",p):t.storage.removeItem("debug")}catch{}}function a(){let p;try{p=t.storage.getItem("debug")}catch{}return!p&&typeof process<"u"&&"env"in process&&(p={}.DEBUG),p}function f(){try{return localStorage}catch{}}e.exports=MT(t);const{formatters:h}=e.exports;h.j=function(p){try{return JSON.stringify(p)}catch(v){return"[UnexpectedJSONParseError]: "+v.message}}})(Bc,Bc.exports);var CT=Bc.exports,TT=function(){if(typeof globalThis>"u")return null;var t={RTCPeerConnection:globalThis.RTCPeerConnection||globalThis.mozRTCPeerConnection||globalThis.webkitRTCPeerConnection,RTCSessionDescription:globalThis.RTCSessionDescription||globalThis.mozRTCSessionDescription||globalThis.webkitRTCSessionDescription,RTCIceCandidate:globalThis.RTCIceCandidate||globalThis.mozRTCIceCandidate||globalThis.webkitRTCIceCandidate};return t.RTCPeerConnection?t:null},Fc={exports:{}},Dc={exports:{}},M0={},ra={};ra.byteLength=AT;ra.toByteArray=LT;ra.fromByteArray=JT;var qi=[],_i=[],ET=typeof Uint8Array<"u"?Uint8Array:Array,Cf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var rs=0,kT=Cf.length;rs<kT;++rs)qi[rs]=Cf[rs],_i[Cf.charCodeAt(rs)]=rs;_i["-".charCodeAt(0)]=62;_i["_".charCodeAt(0)]=63;function C0(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function AT(e){var t=C0(e),r=t[0],n=t[1];return(r+n)*3/4-n}function RT(e,t,r){return(t+r)*3/4-r}function LT(e){var t,r=C0(e),n=r[0],o=r[1],a=new ET(RT(e,n,o)),f=0,h=o>0?n-4:n,p;for(p=0;p<h;p+=4)t=_i[e.charCodeAt(p)]<<18|_i[e.charCodeAt(p+1)]<<12|_i[e.charCodeAt(p+2)]<<6|_i[e.charCodeAt(p+3)],a[f++]=t>>16&255,a[f++]=t>>8&255,a[f++]=t&255;return o===2&&(t=_i[e.charCodeAt(p)]<<2|_i[e.charCodeAt(p+1)]>>4,a[f++]=t&255),o===1&&(t=_i[e.charCodeAt(p)]<<10|_i[e.charCodeAt(p+1)]<<4|_i[e.charCodeAt(p+2)]>>2,a[f++]=t>>8&255,a[f++]=t&255),a}function UT(e){return qi[e>>18&63]+qi[e>>12&63]+qi[e>>6&63]+qi[e&63]}function IT(e,t,r){for(var n,o=[],a=t;a<r;a+=3)n=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),o.push(UT(n));return o.join("")}function JT(e){for(var t,r=e.length,n=r%3,o=[],a=16383,f=0,h=r-n;f<h;f+=a)o.push(IT(e,f,f+a>h?h:f+a));return n===1?(t=e[r-1],o.push(qi[t>>2]+qi[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],o.push(qi[t>>10]+qi[t>>4&63]+qi[t<<2&63]+"=")),o.join("")}var ru={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ru.read=function(e,t,r,n,o){var a,f,h=o*8-n-1,p=(1<<h)-1,v=p>>1,_=-7,y=r?o-1:0,m=r?-1:1,x=e[t+y];for(y+=m,a=x&(1<<-_)-1,x>>=-_,_+=h;_>0;a=a*256+e[t+y],y+=m,_-=8);for(f=a&(1<<-_)-1,a>>=-_,_+=n;_>0;f=f*256+e[t+y],y+=m,_-=8);if(a===0)a=1-v;else{if(a===p)return f?NaN:(x?-1:1)*(1/0);f=f+Math.pow(2,n),a=a-v}return(x?-1:1)*f*Math.pow(2,a-n)};ru.write=function(e,t,r,n,o,a){var f,h,p,v=a*8-o-1,_=(1<<v)-1,y=_>>1,m=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,x=n?0:a-1,U=n?1:-1,R=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(h=isNaN(t)?1:0,f=_):(f=Math.floor(Math.log(t)/Math.LN2),t*(p=Math.pow(2,-f))<1&&(f--,p*=2),f+y>=1?t+=m/p:t+=m*Math.pow(2,1-y),t*p>=2&&(f++,p/=2),f+y>=_?(h=0,f=_):f+y>=1?(h=(t*p-1)*Math.pow(2,o),f=f+y):(h=t*Math.pow(2,y-1)*Math.pow(2,o),f=0));o>=8;e[r+x]=h&255,x+=U,h/=256,o-=8);for(f=f<<o|h,v+=o;v>0;e[r+x]=f&255,x+=U,f/=256,v-=8);e[r+x-U]|=R*128};/*!
|
||
* The buffer module from node.js, for the browser.
|
||
*
|
||
* @author Feross Aboukhadijeh <https://feross.org>
|
||
* @license MIT
|
||
*/(function(e){var t=ra,r=ru;e.Buffer=f,e.SlowBuffer=S,e.INSPECT_MAX_BYTES=50;var n=2147483647;e.kMaxLength=n,f.TYPED_ARRAY_SUPPORT=o(),!f.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{var N=new Uint8Array(1);return N.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},N.foo()===42}catch{return!1}}Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}});function a(N){if(N>n)throw new RangeError('The value "'+N+'" is invalid for option "size"');var T=new Uint8Array(N);return T.__proto__=f.prototype,T}function f(N,T,k){if(typeof N=="number"){if(typeof T=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return _(N)}return h(N,T,k)}typeof Symbol<"u"&&Symbol.species!=null&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),f.poolSize=8192;function h(N,T,k){if(typeof N=="string")return y(N,T);if(ArrayBuffer.isView(N))return m(N);if(N==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof N);if(ve(N,ArrayBuffer)||N&&ve(N.buffer,ArrayBuffer))return x(N,T,k);if(typeof N=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var z=N.valueOf&&N.valueOf();if(z!=null&&z!==N)return f.from(z,T,k);var oe=U(N);if(oe)return oe;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof N[Symbol.toPrimitive]=="function")return f.from(N[Symbol.toPrimitive]("string"),T,k);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof N)}f.from=function(N,T,k){return h(N,T,k)},f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array;function p(N){if(typeof N!="number")throw new TypeError('"size" argument must be of type number');if(N<0)throw new RangeError('The value "'+N+'" is invalid for option "size"')}function v(N,T,k){return p(N),N<=0?a(N):T!==void 0?typeof k=="string"?a(N).fill(T,k):a(N).fill(T):a(N)}f.alloc=function(N,T,k){return v(N,T,k)};function _(N){return p(N),a(N<0?0:R(N)|0)}f.allocUnsafe=function(N){return _(N)},f.allocUnsafeSlow=function(N){return _(N)};function y(N,T){if((typeof T!="string"||T==="")&&(T="utf8"),!f.isEncoding(T))throw new TypeError("Unknown encoding: "+T);var k=g(N,T)|0,z=a(k),oe=z.write(N,T);return oe!==k&&(z=z.slice(0,oe)),z}function m(N){for(var T=N.length<0?0:R(N.length)|0,k=a(T),z=0;z<T;z+=1)k[z]=N[z]&255;return k}function x(N,T,k){if(T<0||N.byteLength<T)throw new RangeError('"offset" is outside of buffer bounds');if(N.byteLength<T+(k||0))throw new RangeError('"length" is outside of buffer bounds');var z;return T===void 0&&k===void 0?z=new Uint8Array(N):k===void 0?z=new Uint8Array(N,T):z=new Uint8Array(N,T,k),z.__proto__=f.prototype,z}function U(N){if(f.isBuffer(N)){var T=R(N.length)|0,k=a(T);return k.length===0||N.copy(k,0,0,T),k}if(N.length!==void 0)return typeof N.length!="number"||Ce(N.length)?a(0):m(N);if(N.type==="Buffer"&&Array.isArray(N.data))return m(N.data)}function R(N){if(N>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return N|0}function S(N){return+N!=N&&(N=0),f.alloc(+N)}f.isBuffer=function(T){return T!=null&&T._isBuffer===!0&&T!==f.prototype},f.compare=function(T,k){if(ve(T,Uint8Array)&&(T=f.from(T,T.offset,T.byteLength)),ve(k,Uint8Array)&&(k=f.from(k,k.offset,k.byteLength)),!f.isBuffer(T)||!f.isBuffer(k))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(T===k)return 0;for(var z=T.length,oe=k.length,_e=0,be=Math.min(z,oe);_e<be;++_e)if(T[_e]!==k[_e]){z=T[_e],oe=k[_e];break}return z<oe?-1:oe<z?1:0},f.isEncoding=function(T){switch(String(T).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(T,k){if(!Array.isArray(T))throw new TypeError('"list" argument must be an Array of Buffers');if(T.length===0)return f.alloc(0);var z;if(k===void 0)for(k=0,z=0;z<T.length;++z)k+=T[z].length;var oe=f.allocUnsafe(k),_e=0;for(z=0;z<T.length;++z){var be=T[z];if(ve(be,Uint8Array)&&(be=f.from(be)),!f.isBuffer(be))throw new TypeError('"list" argument must be an Array of Buffers');be.copy(oe,_e),_e+=be.length}return oe};function g(N,T){if(f.isBuffer(N))return N.length;if(ArrayBuffer.isView(N)||ve(N,ArrayBuffer))return N.byteLength;if(typeof N!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof N);var k=N.length,z=arguments.length>2&&arguments[2]===!0;if(!z&&k===0)return 0;for(var oe=!1;;)switch(T){case"ascii":case"latin1":case"binary":return k;case"utf8":case"utf-8":return xe(N).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k*2;case"hex":return k>>>1;case"base64":return H(N).length;default:if(oe)return z?-1:xe(N).length;T=(""+T).toLowerCase(),oe=!0}}f.byteLength=g;function L(N,T,k){var z=!1;if((T===void 0||T<0)&&(T=0),T>this.length||((k===void 0||k>this.length)&&(k=this.length),k<=0)||(k>>>=0,T>>>=0,k<=T))return"";for(N||(N="utf8");;)switch(N){case"hex":return X(this,T,k);case"utf8":case"utf-8":return ce(this,T,k);case"ascii":return ie(this,T,k);case"latin1":case"binary":return K(this,T,k);case"base64":return $(this,T,k);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fe(this,T,k);default:if(z)throw new TypeError("Unknown encoding: "+N);N=(N+"").toLowerCase(),z=!0}}f.prototype._isBuffer=!0;function G(N,T,k){var z=N[T];N[T]=N[k],N[k]=z}f.prototype.swap16=function(){var T=this.length;if(T%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var k=0;k<T;k+=2)G(this,k,k+1);return this},f.prototype.swap32=function(){var T=this.length;if(T%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var k=0;k<T;k+=4)G(this,k,k+3),G(this,k+1,k+2);return this},f.prototype.swap64=function(){var T=this.length;if(T%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var k=0;k<T;k+=8)G(this,k,k+7),G(this,k+1,k+6),G(this,k+2,k+5),G(this,k+3,k+4);return this},f.prototype.toString=function(){var T=this.length;return T===0?"":arguments.length===0?ce(this,0,T):L.apply(this,arguments)},f.prototype.toLocaleString=f.prototype.toString,f.prototype.equals=function(T){if(!f.isBuffer(T))throw new TypeError("Argument must be a Buffer");return this===T?!0:f.compare(this,T)===0},f.prototype.inspect=function(){var T="",k=e.INSPECT_MAX_BYTES;return T=this.toString("hex",0,k).replace(/(.{2})/g,"$1 ").trim(),this.length>k&&(T+=" ... "),"<Buffer "+T+">"},f.prototype.compare=function(T,k,z,oe,_e){if(ve(T,Uint8Array)&&(T=f.from(T,T.offset,T.byteLength)),!f.isBuffer(T))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof T);if(k===void 0&&(k=0),z===void 0&&(z=T?T.length:0),oe===void 0&&(oe=0),_e===void 0&&(_e=this.length),k<0||z>T.length||oe<0||_e>this.length)throw new RangeError("out of range index");if(oe>=_e&&k>=z)return 0;if(oe>=_e)return-1;if(k>=z)return 1;if(k>>>=0,z>>>=0,oe>>>=0,_e>>>=0,this===T)return 0;for(var be=_e-oe,Ae=z-k,pe=Math.min(be,Ae),Te=this.slice(oe,_e),Ke=T.slice(k,z),Ve=0;Ve<pe;++Ve)if(Te[Ve]!==Ke[Ve]){be=Te[Ve],Ae=Ke[Ve];break}return be<Ae?-1:Ae<be?1:0};function O(N,T,k,z,oe){if(N.length===0)return-1;if(typeof k=="string"?(z=k,k=0):k>2147483647?k=2147483647:k<-2147483648&&(k=-2147483648),k=+k,Ce(k)&&(k=oe?0:N.length-1),k<0&&(k=N.length+k),k>=N.length){if(oe)return-1;k=N.length-1}else if(k<0)if(oe)k=0;else return-1;if(typeof T=="string"&&(T=f.from(T,z)),f.isBuffer(T))return T.length===0?-1:P(N,T,k,z,oe);if(typeof T=="number")return T=T&255,typeof Uint8Array.prototype.indexOf=="function"?oe?Uint8Array.prototype.indexOf.call(N,T,k):Uint8Array.prototype.lastIndexOf.call(N,T,k):P(N,[T],k,z,oe);throw new TypeError("val must be string, number or Buffer")}function P(N,T,k,z,oe){var _e=1,be=N.length,Ae=T.length;if(z!==void 0&&(z=String(z).toLowerCase(),z==="ucs2"||z==="ucs-2"||z==="utf16le"||z==="utf-16le")){if(N.length<2||T.length<2)return-1;_e=2,be/=2,Ae/=2,k/=2}function pe(M,C){return _e===1?M[C]:M.readUInt16BE(C*_e)}var Te;if(oe){var Ke=-1;for(Te=k;Te<be;Te++)if(pe(N,Te)===pe(T,Ke===-1?0:Te-Ke)){if(Ke===-1&&(Ke=Te),Te-Ke+1===Ae)return Ke*_e}else Ke!==-1&&(Te-=Te-Ke),Ke=-1}else for(k+Ae>be&&(k=be-Ae),Te=k;Te>=0;Te--){for(var Ve=!0,B=0;B<Ae;B++)if(pe(N,Te+B)!==pe(T,B)){Ve=!1;break}if(Ve)return Te}return-1}f.prototype.includes=function(T,k,z){return this.indexOf(T,k,z)!==-1},f.prototype.indexOf=function(T,k,z){return O(this,T,k,z,!0)},f.prototype.lastIndexOf=function(T,k,z){return O(this,T,k,z,!1)};function F(N,T,k,z){k=Number(k)||0;var oe=N.length-k;z?(z=Number(z),z>oe&&(z=oe)):z=oe;var _e=T.length;z>_e/2&&(z=_e/2);for(var be=0;be<z;++be){var Ae=parseInt(T.substr(be*2,2),16);if(Ce(Ae))return be;N[k+be]=Ae}return be}function V(N,T,k,z){return Y(xe(T,N.length-k),N,k,z)}function D(N,T,k,z){return Y(Le(T),N,k,z)}function ee(N,T,k,z){return D(N,T,k,z)}function A(N,T,k,z){return Y(H(T),N,k,z)}function q(N,T,k,z){return Y(De(T,N.length-k),N,k,z)}f.prototype.write=function(T,k,z,oe){if(k===void 0)oe="utf8",z=this.length,k=0;else if(z===void 0&&typeof k=="string")oe=k,z=this.length,k=0;else if(isFinite(k))k=k>>>0,isFinite(z)?(z=z>>>0,oe===void 0&&(oe="utf8")):(oe=z,z=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var _e=this.length-k;if((z===void 0||z>_e)&&(z=_e),T.length>0&&(z<0||k<0)||k>this.length)throw new RangeError("Attempt to write outside buffer bounds");oe||(oe="utf8");for(var be=!1;;)switch(oe){case"hex":return F(this,T,k,z);case"utf8":case"utf-8":return V(this,T,k,z);case"ascii":return D(this,T,k,z);case"latin1":case"binary":return ee(this,T,k,z);case"base64":return A(this,T,k,z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return q(this,T,k,z);default:if(be)throw new TypeError("Unknown encoding: "+oe);oe=(""+oe).toLowerCase(),be=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function $(N,T,k){return T===0&&k===N.length?t.fromByteArray(N):t.fromByteArray(N.slice(T,k))}function ce(N,T,k){k=Math.min(N.length,k);for(var z=[],oe=T;oe<k;){var _e=N[oe],be=null,Ae=_e>239?4:_e>223?3:_e>191?2:1;if(oe+Ae<=k){var pe,Te,Ke,Ve;switch(Ae){case 1:_e<128&&(be=_e);break;case 2:pe=N[oe+1],(pe&192)===128&&(Ve=(_e&31)<<6|pe&63,Ve>127&&(be=Ve));break;case 3:pe=N[oe+1],Te=N[oe+2],(pe&192)===128&&(Te&192)===128&&(Ve=(_e&15)<<12|(pe&63)<<6|Te&63,Ve>2047&&(Ve<55296||Ve>57343)&&(be=Ve));break;case 4:pe=N[oe+1],Te=N[oe+2],Ke=N[oe+3],(pe&192)===128&&(Te&192)===128&&(Ke&192)===128&&(Ve=(_e&15)<<18|(pe&63)<<12|(Te&63)<<6|Ke&63,Ve>65535&&Ve<1114112&&(be=Ve))}}be===null?(be=65533,Ae=1):be>65535&&(be-=65536,z.push(be>>>10&1023|55296),be=56320|be&1023),z.push(be),oe+=Ae}return re(z)}var ye=4096;function re(N){var T=N.length;if(T<=ye)return String.fromCharCode.apply(String,N);for(var k="",z=0;z<T;)k+=String.fromCharCode.apply(String,N.slice(z,z+=ye));return k}function ie(N,T,k){var z="";k=Math.min(N.length,k);for(var oe=T;oe<k;++oe)z+=String.fromCharCode(N[oe]&127);return z}function K(N,T,k){var z="";k=Math.min(N.length,k);for(var oe=T;oe<k;++oe)z+=String.fromCharCode(N[oe]);return z}function X(N,T,k){var z=N.length;(!T||T<0)&&(T=0),(!k||k<0||k>z)&&(k=z);for(var oe="",_e=T;_e<k;++_e)oe+=ue(N[_e]);return oe}function fe(N,T,k){for(var z=N.slice(T,k),oe="",_e=0;_e<z.length;_e+=2)oe+=String.fromCharCode(z[_e]+z[_e+1]*256);return oe}f.prototype.slice=function(T,k){var z=this.length;T=~~T,k=k===void 0?z:~~k,T<0?(T+=z,T<0&&(T=0)):T>z&&(T=z),k<0?(k+=z,k<0&&(k=0)):k>z&&(k=z),k<T&&(k=T);var oe=this.subarray(T,k);return oe.__proto__=f.prototype,oe};function Me(N,T,k){if(N%1!==0||N<0)throw new RangeError("offset is not uint");if(N+T>k)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUIntLE=function(T,k,z){T=T>>>0,k=k>>>0,z||Me(T,k,this.length);for(var oe=this[T],_e=1,be=0;++be<k&&(_e*=256);)oe+=this[T+be]*_e;return oe},f.prototype.readUIntBE=function(T,k,z){T=T>>>0,k=k>>>0,z||Me(T,k,this.length);for(var oe=this[T+--k],_e=1;k>0&&(_e*=256);)oe+=this[T+--k]*_e;return oe},f.prototype.readUInt8=function(T,k){return T=T>>>0,k||Me(T,1,this.length),this[T]},f.prototype.readUInt16LE=function(T,k){return T=T>>>0,k||Me(T,2,this.length),this[T]|this[T+1]<<8},f.prototype.readUInt16BE=function(T,k){return T=T>>>0,k||Me(T,2,this.length),this[T]<<8|this[T+1]},f.prototype.readUInt32LE=function(T,k){return T=T>>>0,k||Me(T,4,this.length),(this[T]|this[T+1]<<8|this[T+2]<<16)+this[T+3]*16777216},f.prototype.readUInt32BE=function(T,k){return T=T>>>0,k||Me(T,4,this.length),this[T]*16777216+(this[T+1]<<16|this[T+2]<<8|this[T+3])},f.prototype.readIntLE=function(T,k,z){T=T>>>0,k=k>>>0,z||Me(T,k,this.length);for(var oe=this[T],_e=1,be=0;++be<k&&(_e*=256);)oe+=this[T+be]*_e;return _e*=128,oe>=_e&&(oe-=Math.pow(2,8*k)),oe},f.prototype.readIntBE=function(T,k,z){T=T>>>0,k=k>>>0,z||Me(T,k,this.length);for(var oe=k,_e=1,be=this[T+--oe];oe>0&&(_e*=256);)be+=this[T+--oe]*_e;return _e*=128,be>=_e&&(be-=Math.pow(2,8*k)),be},f.prototype.readInt8=function(T,k){return T=T>>>0,k||Me(T,1,this.length),this[T]&128?(255-this[T]+1)*-1:this[T]},f.prototype.readInt16LE=function(T,k){T=T>>>0,k||Me(T,2,this.length);var z=this[T]|this[T+1]<<8;return z&32768?z|4294901760:z},f.prototype.readInt16BE=function(T,k){T=T>>>0,k||Me(T,2,this.length);var z=this[T+1]|this[T]<<8;return z&32768?z|4294901760:z},f.prototype.readInt32LE=function(T,k){return T=T>>>0,k||Me(T,4,this.length),this[T]|this[T+1]<<8|this[T+2]<<16|this[T+3]<<24},f.prototype.readInt32BE=function(T,k){return T=T>>>0,k||Me(T,4,this.length),this[T]<<24|this[T+1]<<16|this[T+2]<<8|this[T+3]},f.prototype.readFloatLE=function(T,k){return T=T>>>0,k||Me(T,4,this.length),r.read(this,T,!0,23,4)},f.prototype.readFloatBE=function(T,k){return T=T>>>0,k||Me(T,4,this.length),r.read(this,T,!1,23,4)},f.prototype.readDoubleLE=function(T,k){return T=T>>>0,k||Me(T,8,this.length),r.read(this,T,!0,52,8)},f.prototype.readDoubleBE=function(T,k){return T=T>>>0,k||Me(T,8,this.length),r.read(this,T,!1,52,8)};function we(N,T,k,z,oe,_e){if(!f.isBuffer(N))throw new TypeError('"buffer" argument must be a Buffer instance');if(T>oe||T<_e)throw new RangeError('"value" argument is out of bounds');if(k+z>N.length)throw new RangeError("Index out of range")}f.prototype.writeUIntLE=function(T,k,z,oe){if(T=+T,k=k>>>0,z=z>>>0,!oe){var _e=Math.pow(2,8*z)-1;we(this,T,k,z,_e,0)}var be=1,Ae=0;for(this[k]=T&255;++Ae<z&&(be*=256);)this[k+Ae]=T/be&255;return k+z},f.prototype.writeUIntBE=function(T,k,z,oe){if(T=+T,k=k>>>0,z=z>>>0,!oe){var _e=Math.pow(2,8*z)-1;we(this,T,k,z,_e,0)}var be=z-1,Ae=1;for(this[k+be]=T&255;--be>=0&&(Ae*=256);)this[k+be]=T/Ae&255;return k+z},f.prototype.writeUInt8=function(T,k,z){return T=+T,k=k>>>0,z||we(this,T,k,1,255,0),this[k]=T&255,k+1},f.prototype.writeUInt16LE=function(T,k,z){return T=+T,k=k>>>0,z||we(this,T,k,2,65535,0),this[k]=T&255,this[k+1]=T>>>8,k+2},f.prototype.writeUInt16BE=function(T,k,z){return T=+T,k=k>>>0,z||we(this,T,k,2,65535,0),this[k]=T>>>8,this[k+1]=T&255,k+2},f.prototype.writeUInt32LE=function(T,k,z){return T=+T,k=k>>>0,z||we(this,T,k,4,4294967295,0),this[k+3]=T>>>24,this[k+2]=T>>>16,this[k+1]=T>>>8,this[k]=T&255,k+4},f.prototype.writeUInt32BE=function(T,k,z){return T=+T,k=k>>>0,z||we(this,T,k,4,4294967295,0),this[k]=T>>>24,this[k+1]=T>>>16,this[k+2]=T>>>8,this[k+3]=T&255,k+4},f.prototype.writeIntLE=function(T,k,z,oe){if(T=+T,k=k>>>0,!oe){var _e=Math.pow(2,8*z-1);we(this,T,k,z,_e-1,-_e)}var be=0,Ae=1,pe=0;for(this[k]=T&255;++be<z&&(Ae*=256);)T<0&&pe===0&&this[k+be-1]!==0&&(pe=1),this[k+be]=(T/Ae>>0)-pe&255;return k+z},f.prototype.writeIntBE=function(T,k,z,oe){if(T=+T,k=k>>>0,!oe){var _e=Math.pow(2,8*z-1);we(this,T,k,z,_e-1,-_e)}var be=z-1,Ae=1,pe=0;for(this[k+be]=T&255;--be>=0&&(Ae*=256);)T<0&&pe===0&&this[k+be+1]!==0&&(pe=1),this[k+be]=(T/Ae>>0)-pe&255;return k+z},f.prototype.writeInt8=function(T,k,z){return T=+T,k=k>>>0,z||we(this,T,k,1,127,-128),T<0&&(T=255+T+1),this[k]=T&255,k+1},f.prototype.writeInt16LE=function(T,k,z){return T=+T,k=k>>>0,z||we(this,T,k,2,32767,-32768),this[k]=T&255,this[k+1]=T>>>8,k+2},f.prototype.writeInt16BE=function(T,k,z){return T=+T,k=k>>>0,z||we(this,T,k,2,32767,-32768),this[k]=T>>>8,this[k+1]=T&255,k+2},f.prototype.writeInt32LE=function(T,k,z){return T=+T,k=k>>>0,z||we(this,T,k,4,2147483647,-2147483648),this[k]=T&255,this[k+1]=T>>>8,this[k+2]=T>>>16,this[k+3]=T>>>24,k+4},f.prototype.writeInt32BE=function(T,k,z){return T=+T,k=k>>>0,z||we(this,T,k,4,2147483647,-2147483648),T<0&&(T=4294967295+T+1),this[k]=T>>>24,this[k+1]=T>>>16,this[k+2]=T>>>8,this[k+3]=T&255,k+4};function Re(N,T,k,z,oe,_e){if(k+z>N.length)throw new RangeError("Index out of range");if(k<0)throw new RangeError("Index out of range")}function ke(N,T,k,z,oe){return T=+T,k=k>>>0,oe||Re(N,T,k,4),r.write(N,T,k,z,23,4),k+4}f.prototype.writeFloatLE=function(T,k,z){return ke(this,T,k,!0,z)},f.prototype.writeFloatBE=function(T,k,z){return ke(this,T,k,!1,z)};function Ie(N,T,k,z,oe){return T=+T,k=k>>>0,oe||Re(N,T,k,8),r.write(N,T,k,z,52,8),k+8}f.prototype.writeDoubleLE=function(T,k,z){return Ie(this,T,k,!0,z)},f.prototype.writeDoubleBE=function(T,k,z){return Ie(this,T,k,!1,z)},f.prototype.copy=function(T,k,z,oe){if(!f.isBuffer(T))throw new TypeError("argument should be a Buffer");if(z||(z=0),!oe&&oe!==0&&(oe=this.length),k>=T.length&&(k=T.length),k||(k=0),oe>0&&oe<z&&(oe=z),oe===z||T.length===0||this.length===0)return 0;if(k<0)throw new RangeError("targetStart out of bounds");if(z<0||z>=this.length)throw new RangeError("Index out of range");if(oe<0)throw new RangeError("sourceEnd out of bounds");oe>this.length&&(oe=this.length),T.length-k<oe-z&&(oe=T.length-k+z);var _e=oe-z;if(this===T&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(k,z,oe);else if(this===T&&z<k&&k<oe)for(var be=_e-1;be>=0;--be)T[be+k]=this[be+z];else Uint8Array.prototype.set.call(T,this.subarray(z,oe),k);return _e},f.prototype.fill=function(T,k,z,oe){if(typeof T=="string"){if(typeof k=="string"?(oe=k,k=0,z=this.length):typeof z=="string"&&(oe=z,z=this.length),oe!==void 0&&typeof oe!="string")throw new TypeError("encoding must be a string");if(typeof oe=="string"&&!f.isEncoding(oe))throw new TypeError("Unknown encoding: "+oe);if(T.length===1){var _e=T.charCodeAt(0);(oe==="utf8"&&_e<128||oe==="latin1")&&(T=_e)}}else typeof T=="number"&&(T=T&255);if(k<0||this.length<k||this.length<z)throw new RangeError("Out of range index");if(z<=k)return this;k=k>>>0,z=z===void 0?this.length:z>>>0,T||(T=0);var be;if(typeof T=="number")for(be=k;be<z;++be)this[be]=T;else{var Ae=f.isBuffer(T)?T:f.from(T,oe),pe=Ae.length;if(pe===0)throw new TypeError('The value "'+T+'" is invalid for argument "value"');for(be=0;be<z-k;++be)this[be+k]=Ae[be%pe]}return this};var ze=/[^+/0-9A-Za-z-_]/g;function le(N){if(N=N.split("=")[0],N=N.trim().replace(ze,""),N.length<2)return"";for(;N.length%4!==0;)N=N+"=";return N}function ue(N){return N<16?"0"+N.toString(16):N.toString(16)}function xe(N,T){T=T||1/0;for(var k,z=N.length,oe=null,_e=[],be=0;be<z;++be){if(k=N.charCodeAt(be),k>55295&&k<57344){if(!oe){if(k>56319){(T-=3)>-1&&_e.push(239,191,189);continue}else if(be+1===z){(T-=3)>-1&&_e.push(239,191,189);continue}oe=k;continue}if(k<56320){(T-=3)>-1&&_e.push(239,191,189),oe=k;continue}k=(oe-55296<<10|k-56320)+65536}else oe&&(T-=3)>-1&&_e.push(239,191,189);if(oe=null,k<128){if((T-=1)<0)break;_e.push(k)}else if(k<2048){if((T-=2)<0)break;_e.push(k>>6|192,k&63|128)}else if(k<65536){if((T-=3)<0)break;_e.push(k>>12|224,k>>6&63|128,k&63|128)}else if(k<1114112){if((T-=4)<0)break;_e.push(k>>18|240,k>>12&63|128,k>>6&63|128,k&63|128)}else throw new Error("Invalid code point")}return _e}function Le(N){for(var T=[],k=0;k<N.length;++k)T.push(N.charCodeAt(k)&255);return T}function De(N,T){for(var k,z,oe,_e=[],be=0;be<N.length&&!((T-=2)<0);++be)k=N.charCodeAt(be),z=k>>8,oe=k%256,_e.push(oe),_e.push(z);return _e}function H(N){return t.toByteArray(le(N))}function Y(N,T,k,z){for(var oe=0;oe<z&&!(oe+k>=T.length||oe>=N.length);++oe)T[oe+k]=N[oe];return oe}function ve(N,T){return N instanceof T||N!=null&&N.constructor!=null&&N.constructor.name!=null&&N.constructor.name===T.name}function Ce(N){return N!==N}})(M0);/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(e,t){var r=M0,n=r.Buffer;function o(f,h){for(var p in f)h[p]=f[p]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=a);function a(f,h,p){return n(f,h,p)}a.prototype=Object.create(n.prototype),o(n,a),a.from=function(f,h,p){if(typeof f=="number")throw new TypeError("Argument must not be a number");return n(f,h,p)},a.alloc=function(f,h,p){if(typeof f!="number")throw new TypeError("Argument must be a number");var v=n(f);return h!==void 0?typeof p=="string"?v.fill(h,p):v.fill(h):v.fill(0),v},a.allocUnsafe=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return n(f)},a.allocUnsafeSlow=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(f)}})(Dc,Dc.exports);var T0=Dc.exports,Tf=65536,NT=4294967295;function OT(){throw new Error(`Secure random number generation is not supported by this browser.
|
||
Use Chrome, Firefox or Internet Explorer 11`)}var BT=T0.Buffer,Fl=gt.crypto||gt.msCrypto;Fl&&Fl.getRandomValues?Fc.exports=FT:Fc.exports=OT;function FT(e,t){if(e>NT)throw new RangeError("requested too many random bytes");var r=BT.allocUnsafe(e);if(e>0)if(e>Tf)for(var n=0;n<e;n+=Tf)Fl.getRandomValues(r.slice(n,n+Tf));else Fl.getRandomValues(r);return typeof t=="function"?process.nextTick(function(){t(null,r)}):r}var DT=Fc.exports,jc={exports:{}},E0=Kl.EventEmitter,na={};/*!
|
||
* The buffer module from node.js, for the browser.
|
||
*
|
||
* @author Feross Aboukhadijeh <https://feross.org>
|
||
* @license MIT
|
||
*/(function(e){const t=ra,r=ru,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=h,e.SlowBuffer=L,e.INSPECT_MAX_BYTES=50;const o=2147483647;e.kMaxLength=o,h.TYPED_ARRAY_SUPPORT=a(),!h.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function a(){try{const B=new Uint8Array(1),M={foo:function(){return 42}};return Object.setPrototypeOf(M,Uint8Array.prototype),Object.setPrototypeOf(B,M),B.foo()===42}catch{return!1}}Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}});function f(B){if(B>o)throw new RangeError('The value "'+B+'" is invalid for option "size"');const M=new Uint8Array(B);return Object.setPrototypeOf(M,h.prototype),M}function h(B,M,C){if(typeof B=="number"){if(typeof M=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return y(B)}return p(B,M,C)}h.poolSize=8192;function p(B,M,C){if(typeof B=="string")return m(B,M);if(ArrayBuffer.isView(B))return U(B);if(B==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof B);if(Ae(B,ArrayBuffer)||B&&Ae(B.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ae(B,SharedArrayBuffer)||B&&Ae(B.buffer,SharedArrayBuffer)))return R(B,M,C);if(typeof B=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Q=B.valueOf&&B.valueOf();if(Q!=null&&Q!==B)return h.from(Q,M,C);const ae=S(B);if(ae)return ae;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof B[Symbol.toPrimitive]=="function")return h.from(B[Symbol.toPrimitive]("string"),M,C);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof B)}h.from=function(B,M,C){return p(B,M,C)},Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array);function v(B){if(typeof B!="number")throw new TypeError('"size" argument must be of type number');if(B<0)throw new RangeError('The value "'+B+'" is invalid for option "size"')}function _(B,M,C){return v(B),B<=0?f(B):M!==void 0?typeof C=="string"?f(B).fill(M,C):f(B).fill(M):f(B)}h.alloc=function(B,M,C){return _(B,M,C)};function y(B){return v(B),f(B<0?0:g(B)|0)}h.allocUnsafe=function(B){return y(B)},h.allocUnsafeSlow=function(B){return y(B)};function m(B,M){if((typeof M!="string"||M==="")&&(M="utf8"),!h.isEncoding(M))throw new TypeError("Unknown encoding: "+M);const C=G(B,M)|0;let Q=f(C);const ae=Q.write(B,M);return ae!==C&&(Q=Q.slice(0,ae)),Q}function x(B){const M=B.length<0?0:g(B.length)|0,C=f(M);for(let Q=0;Q<M;Q+=1)C[Q]=B[Q]&255;return C}function U(B){if(Ae(B,Uint8Array)){const M=new Uint8Array(B);return R(M.buffer,M.byteOffset,M.byteLength)}return x(B)}function R(B,M,C){if(M<0||B.byteLength<M)throw new RangeError('"offset" is outside of buffer bounds');if(B.byteLength<M+(C||0))throw new RangeError('"length" is outside of buffer bounds');let Q;return M===void 0&&C===void 0?Q=new Uint8Array(B):C===void 0?Q=new Uint8Array(B,M):Q=new Uint8Array(B,M,C),Object.setPrototypeOf(Q,h.prototype),Q}function S(B){if(h.isBuffer(B)){const M=g(B.length)|0,C=f(M);return C.length===0||B.copy(C,0,0,M),C}if(B.length!==void 0)return typeof B.length!="number"||pe(B.length)?f(0):x(B);if(B.type==="Buffer"&&Array.isArray(B.data))return x(B.data)}function g(B){if(B>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return B|0}function L(B){return+B!=B&&(B=0),h.alloc(+B)}h.isBuffer=function(M){return M!=null&&M._isBuffer===!0&&M!==h.prototype},h.compare=function(M,C){if(Ae(M,Uint8Array)&&(M=h.from(M,M.offset,M.byteLength)),Ae(C,Uint8Array)&&(C=h.from(C,C.offset,C.byteLength)),!h.isBuffer(M)||!h.isBuffer(C))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(M===C)return 0;let Q=M.length,ae=C.length;for(let he=0,me=Math.min(Q,ae);he<me;++he)if(M[he]!==C[he]){Q=M[he],ae=C[he];break}return Q<ae?-1:ae<Q?1:0},h.isEncoding=function(M){switch(String(M).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.concat=function(M,C){if(!Array.isArray(M))throw new TypeError('"list" argument must be an Array of Buffers');if(M.length===0)return h.alloc(0);let Q;if(C===void 0)for(C=0,Q=0;Q<M.length;++Q)C+=M[Q].length;const ae=h.allocUnsafe(C);let he=0;for(Q=0;Q<M.length;++Q){let me=M[Q];if(Ae(me,Uint8Array))he+me.length>ae.length?(h.isBuffer(me)||(me=h.from(me)),me.copy(ae,he)):Uint8Array.prototype.set.call(ae,me,he);else if(h.isBuffer(me))me.copy(ae,he);else throw new TypeError('"list" argument must be an Array of Buffers');he+=me.length}return ae};function G(B,M){if(h.isBuffer(B))return B.length;if(ArrayBuffer.isView(B)||Ae(B,ArrayBuffer))return B.byteLength;if(typeof B!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof B);const C=B.length,Q=arguments.length>2&&arguments[2]===!0;if(!Q&&C===0)return 0;let ae=!1;for(;;)switch(M){case"ascii":case"latin1":case"binary":return C;case"utf8":case"utf-8":return k(B).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C*2;case"hex":return C>>>1;case"base64":return _e(B).length;default:if(ae)return Q?-1:k(B).length;M=(""+M).toLowerCase(),ae=!0}}h.byteLength=G;function O(B,M,C){let Q=!1;if((M===void 0||M<0)&&(M=0),M>this.length||((C===void 0||C>this.length)&&(C=this.length),C<=0)||(C>>>=0,M>>>=0,C<=M))return"";for(B||(B="utf8");;)switch(B){case"hex":return fe(this,M,C);case"utf8":case"utf-8":return ye(this,M,C);case"ascii":return K(this,M,C);case"latin1":case"binary":return X(this,M,C);case"base64":return ce(this,M,C);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Me(this,M,C);default:if(Q)throw new TypeError("Unknown encoding: "+B);B=(B+"").toLowerCase(),Q=!0}}h.prototype._isBuffer=!0;function P(B,M,C){const Q=B[M];B[M]=B[C],B[C]=Q}h.prototype.swap16=function(){const M=this.length;if(M%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let C=0;C<M;C+=2)P(this,C,C+1);return this},h.prototype.swap32=function(){const M=this.length;if(M%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let C=0;C<M;C+=4)P(this,C,C+3),P(this,C+1,C+2);return this},h.prototype.swap64=function(){const M=this.length;if(M%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let C=0;C<M;C+=8)P(this,C,C+7),P(this,C+1,C+6),P(this,C+2,C+5),P(this,C+3,C+4);return this},h.prototype.toString=function(){const M=this.length;return M===0?"":arguments.length===0?ye(this,0,M):O.apply(this,arguments)},h.prototype.toLocaleString=h.prototype.toString,h.prototype.equals=function(M){if(!h.isBuffer(M))throw new TypeError("Argument must be a Buffer");return this===M?!0:h.compare(this,M)===0},h.prototype.inspect=function(){let M="";const C=e.INSPECT_MAX_BYTES;return M=this.toString("hex",0,C).replace(/(.{2})/g,"$1 ").trim(),this.length>C&&(M+=" ... "),"<Buffer "+M+">"},n&&(h.prototype[n]=h.prototype.inspect),h.prototype.compare=function(M,C,Q,ae,he){if(Ae(M,Uint8Array)&&(M=h.from(M,M.offset,M.byteLength)),!h.isBuffer(M))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof M);if(C===void 0&&(C=0),Q===void 0&&(Q=M?M.length:0),ae===void 0&&(ae=0),he===void 0&&(he=this.length),C<0||Q>M.length||ae<0||he>this.length)throw new RangeError("out of range index");if(ae>=he&&C>=Q)return 0;if(ae>=he)return-1;if(C>=Q)return 1;if(C>>>=0,Q>>>=0,ae>>>=0,he>>>=0,this===M)return 0;let me=he-ae,Be=Q-C;const ht=Math.min(me,Be),ut=this.slice(ae,he),Xe=M.slice(C,Q);for(let it=0;it<ht;++it)if(ut[it]!==Xe[it]){me=ut[it],Be=Xe[it];break}return me<Be?-1:Be<me?1:0};function F(B,M,C,Q,ae){if(B.length===0)return-1;if(typeof C=="string"?(Q=C,C=0):C>2147483647?C=2147483647:C<-2147483648&&(C=-2147483648),C=+C,pe(C)&&(C=ae?0:B.length-1),C<0&&(C=B.length+C),C>=B.length){if(ae)return-1;C=B.length-1}else if(C<0)if(ae)C=0;else return-1;if(typeof M=="string"&&(M=h.from(M,Q)),h.isBuffer(M))return M.length===0?-1:V(B,M,C,Q,ae);if(typeof M=="number")return M=M&255,typeof Uint8Array.prototype.indexOf=="function"?ae?Uint8Array.prototype.indexOf.call(B,M,C):Uint8Array.prototype.lastIndexOf.call(B,M,C):V(B,[M],C,Q,ae);throw new TypeError("val must be string, number or Buffer")}function V(B,M,C,Q,ae){let he=1,me=B.length,Be=M.length;if(Q!==void 0&&(Q=String(Q).toLowerCase(),Q==="ucs2"||Q==="ucs-2"||Q==="utf16le"||Q==="utf-16le")){if(B.length<2||M.length<2)return-1;he=2,me/=2,Be/=2,C/=2}function ht(Xe,it){return he===1?Xe[it]:Xe.readUInt16BE(it*he)}let ut;if(ae){let Xe=-1;for(ut=C;ut<me;ut++)if(ht(B,ut)===ht(M,Xe===-1?0:ut-Xe)){if(Xe===-1&&(Xe=ut),ut-Xe+1===Be)return Xe*he}else Xe!==-1&&(ut-=ut-Xe),Xe=-1}else for(C+Be>me&&(C=me-Be),ut=C;ut>=0;ut--){let Xe=!0;for(let it=0;it<Be;it++)if(ht(B,ut+it)!==ht(M,it)){Xe=!1;break}if(Xe)return ut}return-1}h.prototype.includes=function(M,C,Q){return this.indexOf(M,C,Q)!==-1},h.prototype.indexOf=function(M,C,Q){return F(this,M,C,Q,!0)},h.prototype.lastIndexOf=function(M,C,Q){return F(this,M,C,Q,!1)};function D(B,M,C,Q){C=Number(C)||0;const ae=B.length-C;Q?(Q=Number(Q),Q>ae&&(Q=ae)):Q=ae;const he=M.length;Q>he/2&&(Q=he/2);let me;for(me=0;me<Q;++me){const Be=parseInt(M.substr(me*2,2),16);if(pe(Be))return me;B[C+me]=Be}return me}function ee(B,M,C,Q){return be(k(M,B.length-C),B,C,Q)}function A(B,M,C,Q){return be(z(M),B,C,Q)}function q(B,M,C,Q){return be(_e(M),B,C,Q)}function $(B,M,C,Q){return be(oe(M,B.length-C),B,C,Q)}h.prototype.write=function(M,C,Q,ae){if(C===void 0)ae="utf8",Q=this.length,C=0;else if(Q===void 0&&typeof C=="string")ae=C,Q=this.length,C=0;else if(isFinite(C))C=C>>>0,isFinite(Q)?(Q=Q>>>0,ae===void 0&&(ae="utf8")):(ae=Q,Q=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const he=this.length-C;if((Q===void 0||Q>he)&&(Q=he),M.length>0&&(Q<0||C<0)||C>this.length)throw new RangeError("Attempt to write outside buffer bounds");ae||(ae="utf8");let me=!1;for(;;)switch(ae){case"hex":return D(this,M,C,Q);case"utf8":case"utf-8":return ee(this,M,C,Q);case"ascii":case"latin1":case"binary":return A(this,M,C,Q);case"base64":return q(this,M,C,Q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,M,C,Q);default:if(me)throw new TypeError("Unknown encoding: "+ae);ae=(""+ae).toLowerCase(),me=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ce(B,M,C){return M===0&&C===B.length?t.fromByteArray(B):t.fromByteArray(B.slice(M,C))}function ye(B,M,C){C=Math.min(B.length,C);const Q=[];let ae=M;for(;ae<C;){const he=B[ae];let me=null,Be=he>239?4:he>223?3:he>191?2:1;if(ae+Be<=C){let ht,ut,Xe,it;switch(Be){case 1:he<128&&(me=he);break;case 2:ht=B[ae+1],(ht&192)===128&&(it=(he&31)<<6|ht&63,it>127&&(me=it));break;case 3:ht=B[ae+1],ut=B[ae+2],(ht&192)===128&&(ut&192)===128&&(it=(he&15)<<12|(ht&63)<<6|ut&63,it>2047&&(it<55296||it>57343)&&(me=it));break;case 4:ht=B[ae+1],ut=B[ae+2],Xe=B[ae+3],(ht&192)===128&&(ut&192)===128&&(Xe&192)===128&&(it=(he&15)<<18|(ht&63)<<12|(ut&63)<<6|Xe&63,it>65535&&it<1114112&&(me=it))}}me===null?(me=65533,Be=1):me>65535&&(me-=65536,Q.push(me>>>10&1023|55296),me=56320|me&1023),Q.push(me),ae+=Be}return ie(Q)}const re=4096;function ie(B){const M=B.length;if(M<=re)return String.fromCharCode.apply(String,B);let C="",Q=0;for(;Q<M;)C+=String.fromCharCode.apply(String,B.slice(Q,Q+=re));return C}function K(B,M,C){let Q="";C=Math.min(B.length,C);for(let ae=M;ae<C;++ae)Q+=String.fromCharCode(B[ae]&127);return Q}function X(B,M,C){let Q="";C=Math.min(B.length,C);for(let ae=M;ae<C;++ae)Q+=String.fromCharCode(B[ae]);return Q}function fe(B,M,C){const Q=B.length;(!M||M<0)&&(M=0),(!C||C<0||C>Q)&&(C=Q);let ae="";for(let he=M;he<C;++he)ae+=Te[B[he]];return ae}function Me(B,M,C){const Q=B.slice(M,C);let ae="";for(let he=0;he<Q.length-1;he+=2)ae+=String.fromCharCode(Q[he]+Q[he+1]*256);return ae}h.prototype.slice=function(M,C){const Q=this.length;M=~~M,C=C===void 0?Q:~~C,M<0?(M+=Q,M<0&&(M=0)):M>Q&&(M=Q),C<0?(C+=Q,C<0&&(C=0)):C>Q&&(C=Q),C<M&&(C=M);const ae=this.subarray(M,C);return Object.setPrototypeOf(ae,h.prototype),ae};function we(B,M,C){if(B%1!==0||B<0)throw new RangeError("offset is not uint");if(B+M>C)throw new RangeError("Trying to access beyond buffer length")}h.prototype.readUintLE=h.prototype.readUIntLE=function(M,C,Q){M=M>>>0,C=C>>>0,Q||we(M,C,this.length);let ae=this[M],he=1,me=0;for(;++me<C&&(he*=256);)ae+=this[M+me]*he;return ae},h.prototype.readUintBE=h.prototype.readUIntBE=function(M,C,Q){M=M>>>0,C=C>>>0,Q||we(M,C,this.length);let ae=this[M+--C],he=1;for(;C>0&&(he*=256);)ae+=this[M+--C]*he;return ae},h.prototype.readUint8=h.prototype.readUInt8=function(M,C){return M=M>>>0,C||we(M,1,this.length),this[M]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(M,C){return M=M>>>0,C||we(M,2,this.length),this[M]|this[M+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(M,C){return M=M>>>0,C||we(M,2,this.length),this[M]<<8|this[M+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(M,C){return M=M>>>0,C||we(M,4,this.length),(this[M]|this[M+1]<<8|this[M+2]<<16)+this[M+3]*16777216},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(M,C){return M=M>>>0,C||we(M,4,this.length),this[M]*16777216+(this[M+1]<<16|this[M+2]<<8|this[M+3])},h.prototype.readBigUInt64LE=Ke(function(M){M=M>>>0,ve(M,"offset");const C=this[M],Q=this[M+7];(C===void 0||Q===void 0)&&Ce(M,this.length-8);const ae=C+this[++M]*2**8+this[++M]*2**16+this[++M]*2**24,he=this[++M]+this[++M]*2**8+this[++M]*2**16+Q*2**24;return BigInt(ae)+(BigInt(he)<<BigInt(32))}),h.prototype.readBigUInt64BE=Ke(function(M){M=M>>>0,ve(M,"offset");const C=this[M],Q=this[M+7];(C===void 0||Q===void 0)&&Ce(M,this.length-8);const ae=C*2**24+this[++M]*2**16+this[++M]*2**8+this[++M],he=this[++M]*2**24+this[++M]*2**16+this[++M]*2**8+Q;return(BigInt(ae)<<BigInt(32))+BigInt(he)}),h.prototype.readIntLE=function(M,C,Q){M=M>>>0,C=C>>>0,Q||we(M,C,this.length);let ae=this[M],he=1,me=0;for(;++me<C&&(he*=256);)ae+=this[M+me]*he;return he*=128,ae>=he&&(ae-=Math.pow(2,8*C)),ae},h.prototype.readIntBE=function(M,C,Q){M=M>>>0,C=C>>>0,Q||we(M,C,this.length);let ae=C,he=1,me=this[M+--ae];for(;ae>0&&(he*=256);)me+=this[M+--ae]*he;return he*=128,me>=he&&(me-=Math.pow(2,8*C)),me},h.prototype.readInt8=function(M,C){return M=M>>>0,C||we(M,1,this.length),this[M]&128?(255-this[M]+1)*-1:this[M]},h.prototype.readInt16LE=function(M,C){M=M>>>0,C||we(M,2,this.length);const Q=this[M]|this[M+1]<<8;return Q&32768?Q|4294901760:Q},h.prototype.readInt16BE=function(M,C){M=M>>>0,C||we(M,2,this.length);const Q=this[M+1]|this[M]<<8;return Q&32768?Q|4294901760:Q},h.prototype.readInt32LE=function(M,C){return M=M>>>0,C||we(M,4,this.length),this[M]|this[M+1]<<8|this[M+2]<<16|this[M+3]<<24},h.prototype.readInt32BE=function(M,C){return M=M>>>0,C||we(M,4,this.length),this[M]<<24|this[M+1]<<16|this[M+2]<<8|this[M+3]},h.prototype.readBigInt64LE=Ke(function(M){M=M>>>0,ve(M,"offset");const C=this[M],Q=this[M+7];(C===void 0||Q===void 0)&&Ce(M,this.length-8);const ae=this[M+4]+this[M+5]*2**8+this[M+6]*2**16+(Q<<24);return(BigInt(ae)<<BigInt(32))+BigInt(C+this[++M]*2**8+this[++M]*2**16+this[++M]*2**24)}),h.prototype.readBigInt64BE=Ke(function(M){M=M>>>0,ve(M,"offset");const C=this[M],Q=this[M+7];(C===void 0||Q===void 0)&&Ce(M,this.length-8);const ae=(C<<24)+this[++M]*2**16+this[++M]*2**8+this[++M];return(BigInt(ae)<<BigInt(32))+BigInt(this[++M]*2**24+this[++M]*2**16+this[++M]*2**8+Q)}),h.prototype.readFloatLE=function(M,C){return M=M>>>0,C||we(M,4,this.length),r.read(this,M,!0,23,4)},h.prototype.readFloatBE=function(M,C){return M=M>>>0,C||we(M,4,this.length),r.read(this,M,!1,23,4)},h.prototype.readDoubleLE=function(M,C){return M=M>>>0,C||we(M,8,this.length),r.read(this,M,!0,52,8)},h.prototype.readDoubleBE=function(M,C){return M=M>>>0,C||we(M,8,this.length),r.read(this,M,!1,52,8)};function Re(B,M,C,Q,ae,he){if(!h.isBuffer(B))throw new TypeError('"buffer" argument must be a Buffer instance');if(M>ae||M<he)throw new RangeError('"value" argument is out of bounds');if(C+Q>B.length)throw new RangeError("Index out of range")}h.prototype.writeUintLE=h.prototype.writeUIntLE=function(M,C,Q,ae){if(M=+M,C=C>>>0,Q=Q>>>0,!ae){const Be=Math.pow(2,8*Q)-1;Re(this,M,C,Q,Be,0)}let he=1,me=0;for(this[C]=M&255;++me<Q&&(he*=256);)this[C+me]=M/he&255;return C+Q},h.prototype.writeUintBE=h.prototype.writeUIntBE=function(M,C,Q,ae){if(M=+M,C=C>>>0,Q=Q>>>0,!ae){const Be=Math.pow(2,8*Q)-1;Re(this,M,C,Q,Be,0)}let he=Q-1,me=1;for(this[C+he]=M&255;--he>=0&&(me*=256);)this[C+he]=M/me&255;return C+Q},h.prototype.writeUint8=h.prototype.writeUInt8=function(M,C,Q){return M=+M,C=C>>>0,Q||Re(this,M,C,1,255,0),this[C]=M&255,C+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(M,C,Q){return M=+M,C=C>>>0,Q||Re(this,M,C,2,65535,0),this[C]=M&255,this[C+1]=M>>>8,C+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(M,C,Q){return M=+M,C=C>>>0,Q||Re(this,M,C,2,65535,0),this[C]=M>>>8,this[C+1]=M&255,C+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(M,C,Q){return M=+M,C=C>>>0,Q||Re(this,M,C,4,4294967295,0),this[C+3]=M>>>24,this[C+2]=M>>>16,this[C+1]=M>>>8,this[C]=M&255,C+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(M,C,Q){return M=+M,C=C>>>0,Q||Re(this,M,C,4,4294967295,0),this[C]=M>>>24,this[C+1]=M>>>16,this[C+2]=M>>>8,this[C+3]=M&255,C+4};function ke(B,M,C,Q,ae){Y(M,Q,ae,B,C,7);let he=Number(M&BigInt(4294967295));B[C++]=he,he=he>>8,B[C++]=he,he=he>>8,B[C++]=he,he=he>>8,B[C++]=he;let me=Number(M>>BigInt(32)&BigInt(4294967295));return B[C++]=me,me=me>>8,B[C++]=me,me=me>>8,B[C++]=me,me=me>>8,B[C++]=me,C}function Ie(B,M,C,Q,ae){Y(M,Q,ae,B,C,7);let he=Number(M&BigInt(4294967295));B[C+7]=he,he=he>>8,B[C+6]=he,he=he>>8,B[C+5]=he,he=he>>8,B[C+4]=he;let me=Number(M>>BigInt(32)&BigInt(4294967295));return B[C+3]=me,me=me>>8,B[C+2]=me,me=me>>8,B[C+1]=me,me=me>>8,B[C]=me,C+8}h.prototype.writeBigUInt64LE=Ke(function(M,C=0){return ke(this,M,C,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeBigUInt64BE=Ke(function(M,C=0){return Ie(this,M,C,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeIntLE=function(M,C,Q,ae){if(M=+M,C=C>>>0,!ae){const ht=Math.pow(2,8*Q-1);Re(this,M,C,Q,ht-1,-ht)}let he=0,me=1,Be=0;for(this[C]=M&255;++he<Q&&(me*=256);)M<0&&Be===0&&this[C+he-1]!==0&&(Be=1),this[C+he]=(M/me>>0)-Be&255;return C+Q},h.prototype.writeIntBE=function(M,C,Q,ae){if(M=+M,C=C>>>0,!ae){const ht=Math.pow(2,8*Q-1);Re(this,M,C,Q,ht-1,-ht)}let he=Q-1,me=1,Be=0;for(this[C+he]=M&255;--he>=0&&(me*=256);)M<0&&Be===0&&this[C+he+1]!==0&&(Be=1),this[C+he]=(M/me>>0)-Be&255;return C+Q},h.prototype.writeInt8=function(M,C,Q){return M=+M,C=C>>>0,Q||Re(this,M,C,1,127,-128),M<0&&(M=255+M+1),this[C]=M&255,C+1},h.prototype.writeInt16LE=function(M,C,Q){return M=+M,C=C>>>0,Q||Re(this,M,C,2,32767,-32768),this[C]=M&255,this[C+1]=M>>>8,C+2},h.prototype.writeInt16BE=function(M,C,Q){return M=+M,C=C>>>0,Q||Re(this,M,C,2,32767,-32768),this[C]=M>>>8,this[C+1]=M&255,C+2},h.prototype.writeInt32LE=function(M,C,Q){return M=+M,C=C>>>0,Q||Re(this,M,C,4,2147483647,-2147483648),this[C]=M&255,this[C+1]=M>>>8,this[C+2]=M>>>16,this[C+3]=M>>>24,C+4},h.prototype.writeInt32BE=function(M,C,Q){return M=+M,C=C>>>0,Q||Re(this,M,C,4,2147483647,-2147483648),M<0&&(M=4294967295+M+1),this[C]=M>>>24,this[C+1]=M>>>16,this[C+2]=M>>>8,this[C+3]=M&255,C+4},h.prototype.writeBigInt64LE=Ke(function(M,C=0){return ke(this,M,C,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeBigInt64BE=Ke(function(M,C=0){return Ie(this,M,C,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ze(B,M,C,Q,ae,he){if(C+Q>B.length)throw new RangeError("Index out of range");if(C<0)throw new RangeError("Index out of range")}function le(B,M,C,Q,ae){return M=+M,C=C>>>0,ae||ze(B,M,C,4),r.write(B,M,C,Q,23,4),C+4}h.prototype.writeFloatLE=function(M,C,Q){return le(this,M,C,!0,Q)},h.prototype.writeFloatBE=function(M,C,Q){return le(this,M,C,!1,Q)};function ue(B,M,C,Q,ae){return M=+M,C=C>>>0,ae||ze(B,M,C,8),r.write(B,M,C,Q,52,8),C+8}h.prototype.writeDoubleLE=function(M,C,Q){return ue(this,M,C,!0,Q)},h.prototype.writeDoubleBE=function(M,C,Q){return ue(this,M,C,!1,Q)},h.prototype.copy=function(M,C,Q,ae){if(!h.isBuffer(M))throw new TypeError("argument should be a Buffer");if(Q||(Q=0),!ae&&ae!==0&&(ae=this.length),C>=M.length&&(C=M.length),C||(C=0),ae>0&&ae<Q&&(ae=Q),ae===Q||M.length===0||this.length===0)return 0;if(C<0)throw new RangeError("targetStart out of bounds");if(Q<0||Q>=this.length)throw new RangeError("Index out of range");if(ae<0)throw new RangeError("sourceEnd out of bounds");ae>this.length&&(ae=this.length),M.length-C<ae-Q&&(ae=M.length-C+Q);const he=ae-Q;return this===M&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(C,Q,ae):Uint8Array.prototype.set.call(M,this.subarray(Q,ae),C),he},h.prototype.fill=function(M,C,Q,ae){if(typeof M=="string"){if(typeof C=="string"?(ae=C,C=0,Q=this.length):typeof Q=="string"&&(ae=Q,Q=this.length),ae!==void 0&&typeof ae!="string")throw new TypeError("encoding must be a string");if(typeof ae=="string"&&!h.isEncoding(ae))throw new TypeError("Unknown encoding: "+ae);if(M.length===1){const me=M.charCodeAt(0);(ae==="utf8"&&me<128||ae==="latin1")&&(M=me)}}else typeof M=="number"?M=M&255:typeof M=="boolean"&&(M=Number(M));if(C<0||this.length<C||this.length<Q)throw new RangeError("Out of range index");if(Q<=C)return this;C=C>>>0,Q=Q===void 0?this.length:Q>>>0,M||(M=0);let he;if(typeof M=="number")for(he=C;he<Q;++he)this[he]=M;else{const me=h.isBuffer(M)?M:h.from(M,ae),Be=me.length;if(Be===0)throw new TypeError('The value "'+M+'" is invalid for argument "value"');for(he=0;he<Q-C;++he)this[he+C]=me[he%Be]}return this};const xe={};function Le(B,M,C){xe[B]=class extends C{constructor(){super(),Object.defineProperty(this,"message",{value:M.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${B}]`,this.stack,delete this.name}get code(){return B}set code(ae){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:ae,writable:!0})}toString(){return`${this.name} [${B}]: ${this.message}`}}}Le("ERR_BUFFER_OUT_OF_BOUNDS",function(B){return B?`${B} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Le("ERR_INVALID_ARG_TYPE",function(B,M){return`The "${B}" argument must be of type number. Received type ${typeof M}`},TypeError),Le("ERR_OUT_OF_RANGE",function(B,M,C){let Q=`The value of "${B}" is out of range.`,ae=C;return Number.isInteger(C)&&Math.abs(C)>2**32?ae=De(String(C)):typeof C=="bigint"&&(ae=String(C),(C>BigInt(2)**BigInt(32)||C<-(BigInt(2)**BigInt(32)))&&(ae=De(ae)),ae+="n"),Q+=` It must be ${M}. Received ${ae}`,Q},RangeError);function De(B){let M="",C=B.length;const Q=B[0]==="-"?1:0;for(;C>=Q+4;C-=3)M=`_${B.slice(C-3,C)}${M}`;return`${B.slice(0,C)}${M}`}function H(B,M,C){ve(M,"offset"),(B[M]===void 0||B[M+C]===void 0)&&Ce(M,B.length-(C+1))}function Y(B,M,C,Q,ae,he){if(B>C||B<M){const me=typeof M=="bigint"?"n":"";let Be;throw he>3?M===0||M===BigInt(0)?Be=`>= 0${me} and < 2${me} ** ${(he+1)*8}${me}`:Be=`>= -(2${me} ** ${(he+1)*8-1}${me}) and < 2 ** ${(he+1)*8-1}${me}`:Be=`>= ${M}${me} and <= ${C}${me}`,new xe.ERR_OUT_OF_RANGE("value",Be,B)}H(Q,ae,he)}function ve(B,M){if(typeof B!="number")throw new xe.ERR_INVALID_ARG_TYPE(M,"number",B)}function Ce(B,M,C){throw Math.floor(B)!==B?(ve(B,C),new xe.ERR_OUT_OF_RANGE(C||"offset","an integer",B)):M<0?new xe.ERR_BUFFER_OUT_OF_BOUNDS:new xe.ERR_OUT_OF_RANGE(C||"offset",`>= ${C?1:0} and <= ${M}`,B)}const N=/[^+/0-9A-Za-z-_]/g;function T(B){if(B=B.split("=")[0],B=B.trim().replace(N,""),B.length<2)return"";for(;B.length%4!==0;)B=B+"=";return B}function k(B,M){M=M||1/0;let C;const Q=B.length;let ae=null;const he=[];for(let me=0;me<Q;++me){if(C=B.charCodeAt(me),C>55295&&C<57344){if(!ae){if(C>56319){(M-=3)>-1&&he.push(239,191,189);continue}else if(me+1===Q){(M-=3)>-1&&he.push(239,191,189);continue}ae=C;continue}if(C<56320){(M-=3)>-1&&he.push(239,191,189),ae=C;continue}C=(ae-55296<<10|C-56320)+65536}else ae&&(M-=3)>-1&&he.push(239,191,189);if(ae=null,C<128){if((M-=1)<0)break;he.push(C)}else if(C<2048){if((M-=2)<0)break;he.push(C>>6|192,C&63|128)}else if(C<65536){if((M-=3)<0)break;he.push(C>>12|224,C>>6&63|128,C&63|128)}else if(C<1114112){if((M-=4)<0)break;he.push(C>>18|240,C>>12&63|128,C>>6&63|128,C&63|128)}else throw new Error("Invalid code point")}return he}function z(B){const M=[];for(let C=0;C<B.length;++C)M.push(B.charCodeAt(C)&255);return M}function oe(B,M){let C,Q,ae;const he=[];for(let me=0;me<B.length&&!((M-=2)<0);++me)C=B.charCodeAt(me),Q=C>>8,ae=C%256,he.push(ae),he.push(Q);return he}function _e(B){return t.toByteArray(T(B))}function be(B,M,C,Q){let ae;for(ae=0;ae<Q&&!(ae+C>=M.length||ae>=B.length);++ae)M[ae+C]=B[ae];return ae}function Ae(B,M){return B instanceof M||B!=null&&B.constructor!=null&&B.constructor.name!=null&&B.constructor.name===M.name}function pe(B){return B!==B}const Te=function(){const B="0123456789abcdef",M=new Array(256);for(let C=0;C<16;++C){const Q=C*16;for(let ae=0;ae<16;++ae)M[Q+ae]=B[C]+B[ae]}return M}();function Ke(B){return typeof BigInt>"u"?Ve:B}function Ve(){throw new Error("BigInt not supported")}})(na);var Ef,Dg;function jT(){if(Dg)return Ef;Dg=1;function e(U,R){var S=Object.keys(U);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(U);R&&(g=g.filter(function(L){return Object.getOwnPropertyDescriptor(U,L).enumerable})),S.push.apply(S,g)}return S}function t(U){for(var R=1;R<arguments.length;R++){var S=arguments[R]!=null?arguments[R]:{};R%2?e(Object(S),!0).forEach(function(g){r(U,g,S[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(U,Object.getOwnPropertyDescriptors(S)):e(Object(S)).forEach(function(g){Object.defineProperty(U,g,Object.getOwnPropertyDescriptor(S,g))})}return U}function r(U,R,S){return R=f(R),R in U?Object.defineProperty(U,R,{value:S,enumerable:!0,configurable:!0,writable:!0}):U[R]=S,U}function n(U,R){if(!(U instanceof R))throw new TypeError("Cannot call a class as a function")}function o(U,R){for(var S=0;S<R.length;S++){var g=R[S];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(U,f(g.key),g)}}function a(U,R,S){return R&&o(U.prototype,R),S&&o(U,S),Object.defineProperty(U,"prototype",{writable:!1}),U}function f(U){var R=h(U,"string");return typeof R=="symbol"?R:String(R)}function h(U,R){if(typeof U!="object"||U===null)return U;var S=U[Symbol.toPrimitive];if(S!==void 0){var g=S.call(U,R||"default");if(typeof g!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.")}return(R==="string"?String:Number)(U)}var p=na,v=p.Buffer,_=bs,y=_.inspect,m=y&&y.custom||"inspect";function x(U,R,S){v.prototype.copy.call(U,R,S)}return Ef=function(){function U(){n(this,U),this.head=null,this.tail=null,this.length=0}return a(U,[{key:"push",value:function(S){var g={data:S,next:null};this.length>0?this.tail.next=g:this.head=g,this.tail=g,++this.length}},{key:"unshift",value:function(S){var g={data:S,next:this.head};this.length===0&&(this.tail=g),this.head=g,++this.length}},{key:"shift",value:function(){if(this.length!==0){var S=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,S}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(S){if(this.length===0)return"";for(var g=this.head,L=""+g.data;g=g.next;)L+=S+g.data;return L}},{key:"concat",value:function(S){if(this.length===0)return v.alloc(0);for(var g=v.allocUnsafe(S>>>0),L=this.head,G=0;L;)x(L.data,g,G),G+=L.data.length,L=L.next;return g}},{key:"consume",value:function(S,g){var L;return S<this.head.data.length?(L=this.head.data.slice(0,S),this.head.data=this.head.data.slice(S)):S===this.head.data.length?L=this.shift():L=g?this._getString(S):this._getBuffer(S),L}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(S){var g=this.head,L=1,G=g.data;for(S-=G.length;g=g.next;){var O=g.data,P=S>O.length?O.length:S;if(P===O.length?G+=O:G+=O.slice(0,S),S-=P,S===0){P===O.length?(++L,g.next?this.head=g.next:this.head=this.tail=null):(this.head=g,g.data=O.slice(P));break}++L}return this.length-=L,G}},{key:"_getBuffer",value:function(S){var g=v.allocUnsafe(S),L=this.head,G=1;for(L.data.copy(g),S-=L.data.length;L=L.next;){var O=L.data,P=S>O.length?O.length:S;if(O.copy(g,g.length-S,0,P),S-=P,S===0){P===O.length?(++G,L.next?this.head=L.next:this.head=this.tail=null):(this.head=L,L.data=O.slice(P));break}++G}return this.length-=G,g}},{key:m,value:function(S,g){return y(this,t(t({},g),{},{depth:0,customInspect:!1}))}}]),U}(),Ef}function PT(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return n||o?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Pc,this,e)):process.nextTick(Pc,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!t&&a?r._writableState?r._writableState.errorEmitted?process.nextTick(xl,r):(r._writableState.errorEmitted=!0,process.nextTick(jg,r,a)):process.nextTick(jg,r,a):t?(process.nextTick(xl,r),t(a)):process.nextTick(xl,r)}),this)}function jg(e,t){Pc(e,t),xl(e)}function xl(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function GT(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Pc(e,t){e.emit("error",t)}function WT(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}var k0={destroy:PT,undestroy:GT,errorOrDestroy:WT},En={};function KT(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var A0={};function Ci(e,t,r){r||(r=Error);function n(a,f,h){return typeof t=="string"?t:t(a,f,h)}var o=function(a){KT(f,a);function f(h,p,v){return a.call(this,n(h,p,v))||this}return f}(r);o.prototype.name=r.name,o.prototype.code=e,A0[e]=o}function Pg(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function VT(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function zT(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function QT(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}Ci("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);Ci("ERR_INVALID_ARG_TYPE",function(e,t,r){var n;typeof t=="string"&&VT(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var o;if(zT(e," argument"))o="The ".concat(e," ").concat(n," ").concat(Pg(t,"type"));else{var a=QT(e,".")?"property":"argument";o='The "'.concat(e,'" ').concat(a," ").concat(n," ").concat(Pg(t,"type"))}return o+=". Received type ".concat(typeof r),o},TypeError);Ci("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Ci("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});Ci("ERR_STREAM_PREMATURE_CLOSE","Premature close");Ci("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});Ci("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Ci("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Ci("ERR_STREAM_WRITE_AFTER_END","write after end");Ci("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Ci("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);Ci("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");En.codes=A0;var YT=En.codes.ERR_INVALID_OPT_VALUE;function HT(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function ZT(e,t,r,n){var o=HT(t,n,r);if(o!=null){if(!(isFinite(o)&&Math.floor(o)===o)||o<0){var a=n?r:"highWaterMark";throw new YT(a,o)}return Math.floor(o)}return e.objectMode?16:16*1024}var R0={getHighWaterMark:ZT},Gc={exports:{}};typeof Object.create=="function"?Gc.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Gc.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}};var Es=Gc.exports;const L0=Mi(Es);var $T=XT;function XT(e,t){if(kf("noDeprecation"))return e;var r=!1;function n(){if(!r){if(kf("throwDeprecation"))throw new Error(t);kf("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return n}function kf(e){try{if(!gt.localStorage)return!1}catch{return!1}var t=gt.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}var Af,Gg;function U0(){if(Gg)return Af;Gg=1,Af=D;function e(le){var ue=this;this.next=null,this.entry=null,this.finish=function(){ze(ue,le)}}var t;D.WritableState=F;var r={deprecate:$T},n=E0,o=na.Buffer,a=(typeof gt<"u"?gt:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function f(le){return o.from(le)}function h(le){return o.isBuffer(le)||le instanceof a}var p=k0,v=R0,_=v.getHighWaterMark,y=En.codes,m=y.ERR_INVALID_ARG_TYPE,x=y.ERR_METHOD_NOT_IMPLEMENTED,U=y.ERR_MULTIPLE_CALLBACK,R=y.ERR_STREAM_CANNOT_PIPE,S=y.ERR_STREAM_DESTROYED,g=y.ERR_STREAM_NULL_VALUES,L=y.ERR_STREAM_WRITE_AFTER_END,G=y.ERR_UNKNOWN_ENCODING,O=p.errorOrDestroy;Es(D,n);function P(){}function F(le,ue,xe){t=t||_s(),le=le||{},typeof xe!="boolean"&&(xe=ue instanceof t),this.objectMode=!!le.objectMode,xe&&(this.objectMode=this.objectMode||!!le.writableObjectMode),this.highWaterMark=_(this,le,"writableHighWaterMark",xe),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Le=le.decodeStrings===!1;this.decodeStrings=!Le,this.defaultEncoding=le.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(De){ie(ue,De)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=le.emitClose!==!1,this.autoDestroy=!!le.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}F.prototype.getBuffer=function(){for(var ue=this.bufferedRequest,xe=[];ue;)xe.push(ue),ue=ue.next;return xe},function(){try{Object.defineProperty(F.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var V;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(V=Function.prototype[Symbol.hasInstance],Object.defineProperty(D,Symbol.hasInstance,{value:function(ue){return V.call(this,ue)?!0:this!==D?!1:ue&&ue._writableState instanceof F}})):V=function(ue){return ue instanceof this};function D(le){t=t||_s();var ue=this instanceof t;if(!ue&&!V.call(D,this))return new D(le);this._writableState=new F(le,this,ue),this.writable=!0,le&&(typeof le.write=="function"&&(this._write=le.write),typeof le.writev=="function"&&(this._writev=le.writev),typeof le.destroy=="function"&&(this._destroy=le.destroy),typeof le.final=="function"&&(this._final=le.final)),n.call(this)}D.prototype.pipe=function(){O(this,new R)};function ee(le,ue){var xe=new L;O(le,xe),process.nextTick(ue,xe)}function A(le,ue,xe,Le){var De;return xe===null?De=new g:typeof xe!="string"&&!ue.objectMode&&(De=new m("chunk",["string","Buffer"],xe)),De?(O(le,De),process.nextTick(Le,De),!1):!0}D.prototype.write=function(le,ue,xe){var Le=this._writableState,De=!1,H=!Le.objectMode&&h(le);return H&&!o.isBuffer(le)&&(le=f(le)),typeof ue=="function"&&(xe=ue,ue=null),H?ue="buffer":ue||(ue=Le.defaultEncoding),typeof xe!="function"&&(xe=P),Le.ending?ee(this,xe):(H||A(this,Le,le,xe))&&(Le.pendingcb++,De=$(this,Le,H,le,ue,xe)),De},D.prototype.cork=function(){this._writableState.corked++},D.prototype.uncork=function(){var le=this._writableState;le.corked&&(le.corked--,!le.writing&&!le.corked&&!le.bufferProcessing&&le.bufferedRequest&&fe(this,le))},D.prototype.setDefaultEncoding=function(ue){if(typeof ue=="string"&&(ue=ue.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((ue+"").toLowerCase())>-1))throw new G(ue);return this._writableState.defaultEncoding=ue,this},Object.defineProperty(D.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function q(le,ue,xe){return!le.objectMode&&le.decodeStrings!==!1&&typeof ue=="string"&&(ue=o.from(ue,xe)),ue}Object.defineProperty(D.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function $(le,ue,xe,Le,De,H){if(!xe){var Y=q(ue,Le,De);Le!==Y&&(xe=!0,De="buffer",Le=Y)}var ve=ue.objectMode?1:Le.length;ue.length+=ve;var Ce=ue.length<ue.highWaterMark;if(Ce||(ue.needDrain=!0),ue.writing||ue.corked){var N=ue.lastBufferedRequest;ue.lastBufferedRequest={chunk:Le,encoding:De,isBuf:xe,callback:H,next:null},N?N.next=ue.lastBufferedRequest:ue.bufferedRequest=ue.lastBufferedRequest,ue.bufferedRequestCount+=1}else ce(le,ue,!1,ve,Le,De,H);return Ce}function ce(le,ue,xe,Le,De,H,Y){ue.writelen=Le,ue.writecb=Y,ue.writing=!0,ue.sync=!0,ue.destroyed?ue.onwrite(new S("write")):xe?le._writev(De,ue.onwrite):le._write(De,H,ue.onwrite),ue.sync=!1}function ye(le,ue,xe,Le,De){--ue.pendingcb,xe?(process.nextTick(De,Le),process.nextTick(ke,le,ue),le._writableState.errorEmitted=!0,O(le,Le)):(De(Le),le._writableState.errorEmitted=!0,O(le,Le),ke(le,ue))}function re(le){le.writing=!1,le.writecb=null,le.length-=le.writelen,le.writelen=0}function ie(le,ue){var xe=le._writableState,Le=xe.sync,De=xe.writecb;if(typeof De!="function")throw new U;if(re(xe),ue)ye(le,xe,Le,ue,De);else{var H=Me(xe)||le.destroyed;!H&&!xe.corked&&!xe.bufferProcessing&&xe.bufferedRequest&&fe(le,xe),Le?process.nextTick(K,le,xe,H,De):K(le,xe,H,De)}}function K(le,ue,xe,Le){xe||X(le,ue),ue.pendingcb--,Le(),ke(le,ue)}function X(le,ue){ue.length===0&&ue.needDrain&&(ue.needDrain=!1,le.emit("drain"))}function fe(le,ue){ue.bufferProcessing=!0;var xe=ue.bufferedRequest;if(le._writev&&xe&&xe.next){var Le=ue.bufferedRequestCount,De=new Array(Le),H=ue.corkedRequestsFree;H.entry=xe;for(var Y=0,ve=!0;xe;)De[Y]=xe,xe.isBuf||(ve=!1),xe=xe.next,Y+=1;De.allBuffers=ve,ce(le,ue,!0,ue.length,De,"",H.finish),ue.pendingcb++,ue.lastBufferedRequest=null,H.next?(ue.corkedRequestsFree=H.next,H.next=null):ue.corkedRequestsFree=new e(ue),ue.bufferedRequestCount=0}else{for(;xe;){var Ce=xe.chunk,N=xe.encoding,T=xe.callback,k=ue.objectMode?1:Ce.length;if(ce(le,ue,!1,k,Ce,N,T),xe=xe.next,ue.bufferedRequestCount--,ue.writing)break}xe===null&&(ue.lastBufferedRequest=null)}ue.bufferedRequest=xe,ue.bufferProcessing=!1}D.prototype._write=function(le,ue,xe){xe(new x("_write()"))},D.prototype._writev=null,D.prototype.end=function(le,ue,xe){var Le=this._writableState;return typeof le=="function"?(xe=le,le=null,ue=null):typeof ue=="function"&&(xe=ue,ue=null),le!=null&&this.write(le,ue),Le.corked&&(Le.corked=1,this.uncork()),Le.ending||Ie(this,Le,xe),this},Object.defineProperty(D.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Me(le){return le.ending&&le.length===0&&le.bufferedRequest===null&&!le.finished&&!le.writing}function we(le,ue){le._final(function(xe){ue.pendingcb--,xe&&O(le,xe),ue.prefinished=!0,le.emit("prefinish"),ke(le,ue)})}function Re(le,ue){!ue.prefinished&&!ue.finalCalled&&(typeof le._final=="function"&&!ue.destroyed?(ue.pendingcb++,ue.finalCalled=!0,process.nextTick(we,le,ue)):(ue.prefinished=!0,le.emit("prefinish")))}function ke(le,ue){var xe=Me(ue);if(xe&&(Re(le,ue),ue.pendingcb===0&&(ue.finished=!0,le.emit("finish"),ue.autoDestroy))){var Le=le._readableState;(!Le||Le.autoDestroy&&Le.endEmitted)&&le.destroy()}return xe}function Ie(le,ue,xe){ue.ending=!0,ke(le,ue),xe&&(ue.finished?process.nextTick(xe):le.once("finish",xe)),ue.ended=!0,le.writable=!1}function ze(le,ue,xe){var Le=le.entry;for(le.entry=null;Le;){var De=Le.callback;ue.pendingcb--,De(xe),Le=Le.next}ue.corkedRequestsFree.next=le}return Object.defineProperty(D.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(ue){this._writableState&&(this._writableState.destroyed=ue)}}),D.prototype.destroy=p.destroy,D.prototype._undestroy=p.undestroy,D.prototype._destroy=function(le,ue){ue(le)},Af}var Rf,Wg;function _s(){if(Wg)return Rf;Wg=1;var e=Object.keys||function(v){var _=[];for(var y in v)_.push(y);return _};Rf=f;var t=J0(),r=U0();Es(f,t);for(var n=e(r.prototype),o=0;o<n.length;o++){var a=n[o];f.prototype[a]||(f.prototype[a]=r.prototype[a])}function f(v){if(!(this instanceof f))return new f(v);t.call(this,v),r.call(this,v),this.allowHalfOpen=!0,v&&(v.readable===!1&&(this.readable=!1),v.writable===!1&&(this.writable=!1),v.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",h)))}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function h(){this._writableState.ended||process.nextTick(p,this)}function p(v){v.end()}return Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(_){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=_,this._writableState.destroyed=_)}}),Rf}var Lf={},Kg;function Vg(){if(Kg)return Lf;Kg=1;var e=T0.Buffer,t=e.isEncoding||function(g){switch(g=""+g,g&&g.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(g){if(!g)return"utf8";for(var L;;)switch(g){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return g;default:if(L)return;g=(""+g).toLowerCase(),L=!0}}function n(g){var L=r(g);if(typeof L!="string"&&(e.isEncoding===t||!t(g)))throw new Error("Unknown encoding: "+g);return L||g}Lf.StringDecoder=o;function o(g){this.encoding=n(g);var L;switch(this.encoding){case"utf16le":this.text=y,this.end=m,L=4;break;case"utf8":this.fillLast=p,L=4;break;case"base64":this.text=x,this.end=U,L=3;break;default:this.write=R,this.end=S;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(L)}o.prototype.write=function(g){if(g.length===0)return"";var L,G;if(this.lastNeed){if(L=this.fillLast(g),L===void 0)return"";G=this.lastNeed,this.lastNeed=0}else G=0;return G<g.length?L?L+this.text(g,G):this.text(g,G):L||""},o.prototype.end=_,o.prototype.text=v,o.prototype.fillLast=function(g){if(this.lastNeed<=g.length)return g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,g.length),this.lastNeed-=g.length};function a(g){return g<=127?0:g>>5===6?2:g>>4===14?3:g>>3===30?4:g>>6===2?-1:-2}function f(g,L,G){var O=L.length-1;if(O<G)return 0;var P=a(L[O]);return P>=0?(P>0&&(g.lastNeed=P-1),P):--O<G||P===-2?0:(P=a(L[O]),P>=0?(P>0&&(g.lastNeed=P-2),P):--O<G||P===-2?0:(P=a(L[O]),P>=0?(P>0&&(P===2?P=0:g.lastNeed=P-3),P):0))}function h(g,L,G){if((L[0]&192)!==128)return g.lastNeed=0,"<22>";if(g.lastNeed>1&&L.length>1){if((L[1]&192)!==128)return g.lastNeed=1,"<22>";if(g.lastNeed>2&&L.length>2&&(L[2]&192)!==128)return g.lastNeed=2,"<22>"}}function p(g){var L=this.lastTotal-this.lastNeed,G=h(this,g);if(G!==void 0)return G;if(this.lastNeed<=g.length)return g.copy(this.lastChar,L,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,L,0,g.length),this.lastNeed-=g.length}function v(g,L){var G=f(this,g,L);if(!this.lastNeed)return g.toString("utf8",L);this.lastTotal=G;var O=g.length-(G-this.lastNeed);return g.copy(this.lastChar,0,O),g.toString("utf8",L,O)}function _(g){var L=g&&g.length?this.write(g):"";return this.lastNeed?L+"<22>":L}function y(g,L){if((g.length-L)%2===0){var G=g.toString("utf16le",L);if(G){var O=G.charCodeAt(G.length-1);if(O>=55296&&O<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1],G.slice(0,-1)}return G}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=g[g.length-1],g.toString("utf16le",L,g.length-1)}function m(g){var L=g&&g.length?this.write(g):"";if(this.lastNeed){var G=this.lastTotal-this.lastNeed;return L+this.lastChar.toString("utf16le",0,G)}return L}function x(g,L){var G=(g.length-L)%3;return G===0?g.toString("base64",L):(this.lastNeed=3-G,this.lastTotal=3,G===1?this.lastChar[0]=g[g.length-1]:(this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1]),g.toString("base64",L,g.length-G))}function U(g){var L=g&&g.length?this.write(g):"";return this.lastNeed?L+this.lastChar.toString("base64",0,3-this.lastNeed):L}function R(g){return g.toString(this.encoding)}function S(g){return g&&g.length?this.write(g):""}return Lf}var zg=En.codes.ERR_STREAM_PREMATURE_CLOSE;function qT(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];e.apply(this,n)}}}function eE(){}function tE(e){return e.setHeader&&typeof e.abort=="function"}function I0(e,t,r){if(typeof t=="function")return I0(e,null,t);t||(t={}),r=qT(r||eE);var n=t.readable||t.readable!==!1&&e.readable,o=t.writable||t.writable!==!1&&e.writable,a=function(){e.writable||h()},f=e._writableState&&e._writableState.finished,h=function(){o=!1,f=!0,n||r.call(e)},p=e._readableState&&e._readableState.endEmitted,v=function(){n=!1,p=!0,o||r.call(e)},_=function(U){r.call(e,U)},y=function(){var U;if(n&&!p)return(!e._readableState||!e._readableState.ended)&&(U=new zg),r.call(e,U);if(o&&!f)return(!e._writableState||!e._writableState.ended)&&(U=new zg),r.call(e,U)},m=function(){e.req.on("finish",h)};return tE(e)?(e.on("complete",h),e.on("abort",y),e.req?m():e.on("request",m)):o&&!e._writableState&&(e.on("end",a),e.on("close",a)),e.on("end",v),e.on("finish",h),t.error!==!1&&e.on("error",_),e.on("close",y),function(){e.removeListener("complete",h),e.removeListener("abort",y),e.removeListener("request",m),e.req&&e.req.removeListener("finish",h),e.removeListener("end",a),e.removeListener("close",a),e.removeListener("finish",h),e.removeListener("end",v),e.removeListener("error",_),e.removeListener("close",y)}}var bh=I0,Uf,Qg;function iE(){if(Qg)return Uf;Qg=1;var e;function t(G,O,P){return O=r(O),O in G?Object.defineProperty(G,O,{value:P,enumerable:!0,configurable:!0,writable:!0}):G[O]=P,G}function r(G){var O=n(G,"string");return typeof O=="symbol"?O:String(O)}function n(G,O){if(typeof G!="object"||G===null)return G;var P=G[Symbol.toPrimitive];if(P!==void 0){var F=P.call(G,O||"default");if(typeof F!="object")return F;throw new TypeError("@@toPrimitive must return a primitive value.")}return(O==="string"?String:Number)(G)}var o=bh,a=Symbol("lastResolve"),f=Symbol("lastReject"),h=Symbol("error"),p=Symbol("ended"),v=Symbol("lastPromise"),_=Symbol("handlePromise"),y=Symbol("stream");function m(G,O){return{value:G,done:O}}function x(G){var O=G[a];if(O!==null){var P=G[y].read();P!==null&&(G[v]=null,G[a]=null,G[f]=null,O(m(P,!1)))}}function U(G){process.nextTick(x,G)}function R(G,O){return function(P,F){G.then(function(){if(O[p]){P(m(void 0,!0));return}O[_](P,F)},F)}}var S=Object.getPrototypeOf(function(){}),g=Object.setPrototypeOf((e={get stream(){return this[y]},next:function(){var O=this,P=this[h];if(P!==null)return Promise.reject(P);if(this[p])return Promise.resolve(m(void 0,!0));if(this[y].destroyed)return new Promise(function(ee,A){process.nextTick(function(){O[h]?A(O[h]):ee(m(void 0,!0))})});var F=this[v],V;if(F)V=new Promise(R(F,this));else{var D=this[y].read();if(D!==null)return Promise.resolve(m(D,!1));V=new Promise(this[_])}return this[v]=V,V}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var O=this;return new Promise(function(P,F){O[y].destroy(null,function(V){if(V){F(V);return}P(m(void 0,!0))})})}),e),S),L=function(O){var P,F=Object.create(g,(P={},t(P,y,{value:O,writable:!0}),t(P,a,{value:null,writable:!0}),t(P,f,{value:null,writable:!0}),t(P,h,{value:null,writable:!0}),t(P,p,{value:O._readableState.endEmitted,writable:!0}),t(P,_,{value:function(D,ee){var A=F[y].read();A?(F[v]=null,F[a]=null,F[f]=null,D(m(A,!1))):(F[a]=D,F[f]=ee)},writable:!0}),P));return F[v]=null,o(O,function(V){if(V&&V.code!=="ERR_STREAM_PREMATURE_CLOSE"){var D=F[f];D!==null&&(F[v]=null,F[a]=null,F[f]=null,D(V)),F[h]=V;return}var ee=F[a];ee!==null&&(F[v]=null,F[a]=null,F[f]=null,ee(m(void 0,!0))),F[p]=!0}),O.on("readable",U.bind(null,F)),F};return Uf=L,Uf}var If,Yg;function rE(){return Yg||(Yg=1,If=function(){throw new Error("Readable.from is not available in the browser")}),If}var Jf,Hg;function J0(){if(Hg)return Jf;Hg=1,Jf=ee;var e;ee.ReadableState=D,Kl.EventEmitter;var t=function(Y,ve){return Y.listeners(ve).length},r=E0,n=na.Buffer,o=(typeof gt<"u"?gt:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(H){return n.from(H)}function f(H){return n.isBuffer(H)||H instanceof o}var h=bs,p;h&&h.debuglog?p=h.debuglog("stream"):p=function(){};var v=jT(),_=k0,y=R0,m=y.getHighWaterMark,x=En.codes,U=x.ERR_INVALID_ARG_TYPE,R=x.ERR_STREAM_PUSH_AFTER_EOF,S=x.ERR_METHOD_NOT_IMPLEMENTED,g=x.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,L,G,O;Es(ee,r);var P=_.errorOrDestroy,F=["error","close","destroy","pause","resume"];function V(H,Y,ve){if(typeof H.prependListener=="function")return H.prependListener(Y,ve);!H._events||!H._events[Y]?H.on(Y,ve):Array.isArray(H._events[Y])?H._events[Y].unshift(ve):H._events[Y]=[ve,H._events[Y]]}function D(H,Y,ve){e=e||_s(),H=H||{},typeof ve!="boolean"&&(ve=Y instanceof e),this.objectMode=!!H.objectMode,ve&&(this.objectMode=this.objectMode||!!H.readableObjectMode),this.highWaterMark=m(this,H,"readableHighWaterMark",ve),this.buffer=new v,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=H.emitClose!==!1,this.autoDestroy=!!H.autoDestroy,this.destroyed=!1,this.defaultEncoding=H.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,H.encoding&&(L||(L=Vg().StringDecoder),this.decoder=new L(H.encoding),this.encoding=H.encoding)}function ee(H){if(e=e||_s(),!(this instanceof ee))return new ee(H);var Y=this instanceof e;this._readableState=new D(H,this,Y),this.readable=!0,H&&(typeof H.read=="function"&&(this._read=H.read),typeof H.destroy=="function"&&(this._destroy=H.destroy)),r.call(this)}Object.defineProperty(ee.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(Y){this._readableState&&(this._readableState.destroyed=Y)}}),ee.prototype.destroy=_.destroy,ee.prototype._undestroy=_.undestroy,ee.prototype._destroy=function(H,Y){Y(H)},ee.prototype.push=function(H,Y){var ve=this._readableState,Ce;return ve.objectMode?Ce=!0:typeof H=="string"&&(Y=Y||ve.defaultEncoding,Y!==ve.encoding&&(H=n.from(H,Y),Y=""),Ce=!0),A(this,H,Y,!1,Ce)},ee.prototype.unshift=function(H){return A(this,H,null,!0,!1)};function A(H,Y,ve,Ce,N){p("readableAddChunk",Y);var T=H._readableState;if(Y===null)T.reading=!1,ie(H,T);else{var k;if(N||(k=$(T,Y)),k)P(H,k);else if(T.objectMode||Y&&Y.length>0)if(typeof Y!="string"&&!T.objectMode&&Object.getPrototypeOf(Y)!==n.prototype&&(Y=a(Y)),Ce)T.endEmitted?P(H,new g):q(H,T,Y,!0);else if(T.ended)P(H,new R);else{if(T.destroyed)return!1;T.reading=!1,T.decoder&&!ve?(Y=T.decoder.write(Y),T.objectMode||Y.length!==0?q(H,T,Y,!1):fe(H,T)):q(H,T,Y,!1)}else Ce||(T.reading=!1,fe(H,T))}return!T.ended&&(T.length<T.highWaterMark||T.length===0)}function q(H,Y,ve,Ce){Y.flowing&&Y.length===0&&!Y.sync?(Y.awaitDrain=0,H.emit("data",ve)):(Y.length+=Y.objectMode?1:ve.length,Ce?Y.buffer.unshift(ve):Y.buffer.push(ve),Y.needReadable&&K(H)),fe(H,Y)}function $(H,Y){var ve;return!f(Y)&&typeof Y!="string"&&Y!==void 0&&!H.objectMode&&(ve=new U("chunk",["string","Buffer","Uint8Array"],Y)),ve}ee.prototype.isPaused=function(){return this._readableState.flowing===!1},ee.prototype.setEncoding=function(H){L||(L=Vg().StringDecoder);var Y=new L(H);this._readableState.decoder=Y,this._readableState.encoding=this._readableState.decoder.encoding;for(var ve=this._readableState.buffer.head,Ce="";ve!==null;)Ce+=Y.write(ve.data),ve=ve.next;return this._readableState.buffer.clear(),Ce!==""&&this._readableState.buffer.push(Ce),this._readableState.length=Ce.length,this};var ce=1073741824;function ye(H){return H>=ce?H=ce:(H--,H|=H>>>1,H|=H>>>2,H|=H>>>4,H|=H>>>8,H|=H>>>16,H++),H}function re(H,Y){return H<=0||Y.length===0&&Y.ended?0:Y.objectMode?1:H!==H?Y.flowing&&Y.length?Y.buffer.head.data.length:Y.length:(H>Y.highWaterMark&&(Y.highWaterMark=ye(H)),H<=Y.length?H:Y.ended?Y.length:(Y.needReadable=!0,0))}ee.prototype.read=function(H){p("read",H),H=parseInt(H,10);var Y=this._readableState,ve=H;if(H!==0&&(Y.emittedReadable=!1),H===0&&Y.needReadable&&((Y.highWaterMark!==0?Y.length>=Y.highWaterMark:Y.length>0)||Y.ended))return p("read: emitReadable",Y.length,Y.ended),Y.length===0&&Y.ended?xe(this):K(this),null;if(H=re(H,Y),H===0&&Y.ended)return Y.length===0&&xe(this),null;var Ce=Y.needReadable;p("need readable",Ce),(Y.length===0||Y.length-H<Y.highWaterMark)&&(Ce=!0,p("length less than watermark",Ce)),Y.ended||Y.reading?(Ce=!1,p("reading or ended",Ce)):Ce&&(p("do read"),Y.reading=!0,Y.sync=!0,Y.length===0&&(Y.needReadable=!0),this._read(Y.highWaterMark),Y.sync=!1,Y.reading||(H=re(ve,Y)));var N;return H>0?N=ue(H,Y):N=null,N===null?(Y.needReadable=Y.length<=Y.highWaterMark,H=0):(Y.length-=H,Y.awaitDrain=0),Y.length===0&&(Y.ended||(Y.needReadable=!0),ve!==H&&Y.ended&&xe(this)),N!==null&&this.emit("data",N),N};function ie(H,Y){if(p("onEofChunk"),!Y.ended){if(Y.decoder){var ve=Y.decoder.end();ve&&ve.length&&(Y.buffer.push(ve),Y.length+=Y.objectMode?1:ve.length)}Y.ended=!0,Y.sync?K(H):(Y.needReadable=!1,Y.emittedReadable||(Y.emittedReadable=!0,X(H)))}}function K(H){var Y=H._readableState;p("emitReadable",Y.needReadable,Y.emittedReadable),Y.needReadable=!1,Y.emittedReadable||(p("emitReadable",Y.flowing),Y.emittedReadable=!0,process.nextTick(X,H))}function X(H){var Y=H._readableState;p("emitReadable_",Y.destroyed,Y.length,Y.ended),!Y.destroyed&&(Y.length||Y.ended)&&(H.emit("readable"),Y.emittedReadable=!1),Y.needReadable=!Y.flowing&&!Y.ended&&Y.length<=Y.highWaterMark,le(H)}function fe(H,Y){Y.readingMore||(Y.readingMore=!0,process.nextTick(Me,H,Y))}function Me(H,Y){for(;!Y.reading&&!Y.ended&&(Y.length<Y.highWaterMark||Y.flowing&&Y.length===0);){var ve=Y.length;if(p("maybeReadMore read 0"),H.read(0),ve===Y.length)break}Y.readingMore=!1}ee.prototype._read=function(H){P(this,new S("_read()"))},ee.prototype.pipe=function(H,Y){var ve=this,Ce=this._readableState;switch(Ce.pipesCount){case 0:Ce.pipes=H;break;case 1:Ce.pipes=[Ce.pipes,H];break;default:Ce.pipes.push(H);break}Ce.pipesCount+=1,p("pipe count=%d opts=%j",Ce.pipesCount,Y);var N=(!Y||Y.end!==!1)&&H!==process.stdout&&H!==process.stderr,T=N?z:Ve;Ce.endEmitted?process.nextTick(T):ve.once("end",T),H.on("unpipe",k);function k(B,M){p("onunpipe"),B===ve&&M&&M.hasUnpiped===!1&&(M.hasUnpiped=!0,be())}function z(){p("onend"),H.end()}var oe=we(ve);H.on("drain",oe);var _e=!1;function be(){p("cleanup"),H.removeListener("close",Te),H.removeListener("finish",Ke),H.removeListener("drain",oe),H.removeListener("error",pe),H.removeListener("unpipe",k),ve.removeListener("end",z),ve.removeListener("end",Ve),ve.removeListener("data",Ae),_e=!0,Ce.awaitDrain&&(!H._writableState||H._writableState.needDrain)&&oe()}ve.on("data",Ae);function Ae(B){p("ondata");var M=H.write(B);p("dest.write",M),M===!1&&((Ce.pipesCount===1&&Ce.pipes===H||Ce.pipesCount>1&&De(Ce.pipes,H)!==-1)&&!_e&&(p("false write response, pause",Ce.awaitDrain),Ce.awaitDrain++),ve.pause())}function pe(B){p("onerror",B),Ve(),H.removeListener("error",pe),t(H,"error")===0&&P(H,B)}V(H,"error",pe);function Te(){H.removeListener("finish",Ke),Ve()}H.once("close",Te);function Ke(){p("onfinish"),H.removeListener("close",Te),Ve()}H.once("finish",Ke);function Ve(){p("unpipe"),ve.unpipe(H)}return H.emit("pipe",ve),Ce.flowing||(p("pipe resume"),ve.resume()),H};function we(H){return function(){var ve=H._readableState;p("pipeOnDrain",ve.awaitDrain),ve.awaitDrain&&ve.awaitDrain--,ve.awaitDrain===0&&t(H,"data")&&(ve.flowing=!0,le(H))}}ee.prototype.unpipe=function(H){var Y=this._readableState,ve={hasUnpiped:!1};if(Y.pipesCount===0)return this;if(Y.pipesCount===1)return H&&H!==Y.pipes?this:(H||(H=Y.pipes),Y.pipes=null,Y.pipesCount=0,Y.flowing=!1,H&&H.emit("unpipe",this,ve),this);if(!H){var Ce=Y.pipes,N=Y.pipesCount;Y.pipes=null,Y.pipesCount=0,Y.flowing=!1;for(var T=0;T<N;T++)Ce[T].emit("unpipe",this,{hasUnpiped:!1});return this}var k=De(Y.pipes,H);return k===-1?this:(Y.pipes.splice(k,1),Y.pipesCount-=1,Y.pipesCount===1&&(Y.pipes=Y.pipes[0]),H.emit("unpipe",this,ve),this)},ee.prototype.on=function(H,Y){var ve=r.prototype.on.call(this,H,Y),Ce=this._readableState;return H==="data"?(Ce.readableListening=this.listenerCount("readable")>0,Ce.flowing!==!1&&this.resume()):H==="readable"&&!Ce.endEmitted&&!Ce.readableListening&&(Ce.readableListening=Ce.needReadable=!0,Ce.flowing=!1,Ce.emittedReadable=!1,p("on readable",Ce.length,Ce.reading),Ce.length?K(this):Ce.reading||process.nextTick(ke,this)),ve},ee.prototype.addListener=ee.prototype.on,ee.prototype.removeListener=function(H,Y){var ve=r.prototype.removeListener.call(this,H,Y);return H==="readable"&&process.nextTick(Re,this),ve},ee.prototype.removeAllListeners=function(H){var Y=r.prototype.removeAllListeners.apply(this,arguments);return(H==="readable"||H===void 0)&&process.nextTick(Re,this),Y};function Re(H){var Y=H._readableState;Y.readableListening=H.listenerCount("readable")>0,Y.resumeScheduled&&!Y.paused?Y.flowing=!0:H.listenerCount("data")>0&&H.resume()}function ke(H){p("readable nexttick read 0"),H.read(0)}ee.prototype.resume=function(){var H=this._readableState;return H.flowing||(p("resume"),H.flowing=!H.readableListening,Ie(this,H)),H.paused=!1,this};function Ie(H,Y){Y.resumeScheduled||(Y.resumeScheduled=!0,process.nextTick(ze,H,Y))}function ze(H,Y){p("resume",Y.reading),Y.reading||H.read(0),Y.resumeScheduled=!1,H.emit("resume"),le(H),Y.flowing&&!Y.reading&&H.read(0)}ee.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function le(H){var Y=H._readableState;for(p("flow",Y.flowing);Y.flowing&&H.read()!==null;);}ee.prototype.wrap=function(H){var Y=this,ve=this._readableState,Ce=!1;H.on("end",function(){if(p("wrapped end"),ve.decoder&&!ve.ended){var k=ve.decoder.end();k&&k.length&&Y.push(k)}Y.push(null)}),H.on("data",function(k){if(p("wrapped data"),ve.decoder&&(k=ve.decoder.write(k)),!(ve.objectMode&&k==null)&&!(!ve.objectMode&&(!k||!k.length))){var z=Y.push(k);z||(Ce=!0,H.pause())}});for(var N in H)this[N]===void 0&&typeof H[N]=="function"&&(this[N]=function(z){return function(){return H[z].apply(H,arguments)}}(N));for(var T=0;T<F.length;T++)H.on(F[T],this.emit.bind(this,F[T]));return this._read=function(k){p("wrapped _read",k),Ce&&(Ce=!1,H.resume())},this},typeof Symbol=="function"&&(ee.prototype[Symbol.asyncIterator]=function(){return G===void 0&&(G=iE()),G(this)}),Object.defineProperty(ee.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(ee.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(ee.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(Y){this._readableState&&(this._readableState.flowing=Y)}}),ee._fromList=ue,Object.defineProperty(ee.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function ue(H,Y){if(Y.length===0)return null;var ve;return Y.objectMode?ve=Y.buffer.shift():!H||H>=Y.length?(Y.decoder?ve=Y.buffer.join(""):Y.buffer.length===1?ve=Y.buffer.first():ve=Y.buffer.concat(Y.length),Y.buffer.clear()):ve=Y.buffer.consume(H,Y.decoder),ve}function xe(H){var Y=H._readableState;p("endReadable",Y.endEmitted),Y.endEmitted||(Y.ended=!0,process.nextTick(Le,Y,H))}function Le(H,Y){if(p("endReadableNT",H.endEmitted,H.length),!H.endEmitted&&H.length===0&&(H.endEmitted=!0,Y.readable=!1,Y.emit("end"),H.autoDestroy)){var ve=Y._writableState;(!ve||ve.autoDestroy&&ve.finished)&&Y.destroy()}}typeof Symbol=="function"&&(ee.from=function(H,Y){return O===void 0&&(O=rE()),O(ee,H,Y)});function De(H,Y){for(var ve=0,Ce=H.length;ve<Ce;ve++)if(H[ve]===Y)return ve;return-1}return Jf}var N0=gr,nu=En.codes,nE=nu.ERR_METHOD_NOT_IMPLEMENTED,sE=nu.ERR_MULTIPLE_CALLBACK,oE=nu.ERR_TRANSFORM_ALREADY_TRANSFORMING,aE=nu.ERR_TRANSFORM_WITH_LENGTH_0,su=_s();Es(gr,su);function lE(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new sE);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function gr(e){if(!(this instanceof gr))return new gr(e);su.call(this,e),this._transformState={afterTransform:lE.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",uE)}function uE(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){Zg(e,t,r)}):Zg(this,null,null)}gr.prototype.push=function(e,t){return this._transformState.needTransform=!1,su.prototype.push.call(this,e,t)};gr.prototype._transform=function(e,t,r){r(new nE("_transform()"))};gr.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var o=this._readableState;(n.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}};gr.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};gr.prototype._destroy=function(e,t){su.prototype._destroy.call(this,e,function(r){t(r)})};function Zg(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new aE;if(e._transformState.transforming)throw new oE;return e.push(null)}var fE=$o,O0=N0;Es($o,O0);function $o(e){if(!(this instanceof $o))return new $o(e);O0.call(this,e)}$o.prototype._transform=function(e,t,r){r(null,e)};var Nf;function cE(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var B0=En.codes,hE=B0.ERR_MISSING_ARGS,pE=B0.ERR_STREAM_DESTROYED;function $g(e){if(e)throw e}function dE(e){return e.setHeader&&typeof e.abort=="function"}function gE(e,t,r,n){n=cE(n);var o=!1;e.on("close",function(){o=!0}),Nf===void 0&&(Nf=bh),Nf(e,{readable:t,writable:r},function(f){if(f)return n(f);o=!0,n()});var a=!1;return function(f){if(!o&&!a){if(a=!0,dE(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(f||new pE("pipe"))}}}function Xg(e){e()}function yE(e,t){return e.pipe(t)}function mE(e){return!e.length||typeof e[e.length-1]!="function"?$g:e.pop()}function vE(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=mE(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new hE("streams");var o,a=t.map(function(f,h){var p=h<t.length-1,v=h>0;return gE(f,p,v,function(_){o||(o=_),_&&a.forEach(Xg),!p&&(a.forEach(Xg),n(o))})});return t.reduce(yE)}var _E=vE;(function(e,t){t=e.exports=J0(),t.Stream=t,t.Readable=t,t.Writable=U0(),t.Duplex=_s(),t.Transform=N0,t.PassThrough=fE,t.finished=bh,t.pipeline=_E})(jc,jc.exports);var wE=jc.exports;/*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */let qg;var bE=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:gt):e=>(qg||(qg=Promise.resolve())).then(e).catch(t=>setTimeout(()=>{throw t},0));function ey(e,t){for(const r in t)Object.defineProperty(e,r,{value:t[r],enumerable:!0,configurable:!0});return e}function xE(e,t,r){if(!e||typeof e=="string")throw new TypeError("Please pass an Error to err-code");r||(r={}),typeof t=="object"&&(r=t,t=""),t&&(r.code=t);try{return ey(e,r)}catch{r.message=e.message,r.stack=e.stack;const o=function(){};return o.prototype=Object.create(Object.getPrototypeOf(e)),ey(new o,r)}}var SE=xE;/*! simple-peer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */const ME=CT("simple-peer"),F0=TT,ty=DT,CE=wE,Of=bE,He=SE,{Buffer:TE}=na,Bf=64*1024,EE=5*1e3,kE=5*1e3;function iy(e){return e.replace(/a=ice-options:trickle\s\n/g,"")}function AE(e){console.warn(e)}class Mn extends CE.Duplex{constructor(t){if(t=Object.assign({allowHalfOpen:!1},t),super(t),this._id=ty(4).toString("hex").slice(0,7),this._debug("new peer %o",t),this.channelName=t.initiator?t.channelName||ty(20).toString("hex"):null,this.initiator=t.initiator||!1,this.channelConfig=t.channelConfig||Mn.channelConfig,this.channelNegotiated=this.channelConfig.negotiated,this.config=Object.assign({},Mn.config,t.config),this.offerOptions=t.offerOptions||{},this.answerOptions=t.answerOptions||{},this.sdpTransform=t.sdpTransform||(r=>r),this.streams=t.streams||(t.stream?[t.stream]:[]),this.trickle=t.trickle!==void 0?t.trickle:!0,this.allowHalfTrickle=t.allowHalfTrickle!==void 0?t.allowHalfTrickle:!1,this.iceCompleteTimeout=t.iceCompleteTimeout||EE,this.destroyed=!1,this.destroying=!1,this._connected=!1,this.remoteAddress=void 0,this.remoteFamily=void 0,this.remotePort=void 0,this.localAddress=void 0,this.localFamily=void 0,this.localPort=void 0,this._wrtc=t.wrtc&&typeof t.wrtc=="object"?t.wrtc:F0(),!this._wrtc)throw He(typeof window>"u"?new Error("No WebRTC support: Specify `opts.wrtc` option in this environment"):new Error("No WebRTC support: Not a supported browser"),"ERR_WEBRTC_SUPPORT");this._pcReady=!1,this._channelReady=!1,this._iceComplete=!1,this._iceCompleteTimer=null,this._channel=null,this._pendingCandidates=[],this._isNegotiating=!1,this._firstNegotiation=!0,this._batchedNegotiation=!1,this._queuedNegotiation=!1,this._sendersAwaitingStable=[],this._senderMap=new Map,this._closingInterval=null,this._remoteTracks=[],this._remoteStreams=[],this._chunk=null,this._cb=null,this._interval=null;try{this._pc=new this._wrtc.RTCPeerConnection(this.config)}catch(r){this.destroy(He(r,"ERR_PC_CONSTRUCTOR"));return}this._isReactNativeWebrtc=typeof this._pc._peerConnectionId=="number",this._pc.oniceconnectionstatechange=()=>{this._onIceStateChange()},this._pc.onicegatheringstatechange=()=>{this._onIceStateChange()},this._pc.onconnectionstatechange=()=>{this._onConnectionStateChange()},this._pc.onsignalingstatechange=()=>{this._onSignalingStateChange()},this._pc.onicecandidate=r=>{this._onIceCandidate(r)},typeof this._pc.peerIdentity=="object"&&this._pc.peerIdentity.catch(r=>{this.destroy(He(r,"ERR_PC_PEER_IDENTITY"))}),this.initiator||this.channelNegotiated?this._setupData({channel:this._pc.createDataChannel(this.channelName,this.channelConfig)}):this._pc.ondatachannel=r=>{this._setupData(r)},this.streams&&this.streams.forEach(r=>{this.addStream(r)}),this._pc.ontrack=r=>{this._onTrack(r)},this._debug("initial negotiation"),this._needsNegotiation(),this._onFinishBound=()=>{this._onFinish()},this.once("finish",this._onFinishBound)}get bufferSize(){return this._channel&&this._channel.bufferedAmount||0}get connected(){return this._connected&&this._channel.readyState==="open"}address(){return{port:this.localPort,family:this.localFamily,address:this.localAddress}}signal(t){if(!this.destroying){if(this.destroyed)throw He(new Error("cannot signal after peer is destroyed"),"ERR_DESTROYED");if(typeof t=="string")try{t=JSON.parse(t)}catch{t={}}this._debug("signal()"),t.renegotiate&&this.initiator&&(this._debug("got request to renegotiate"),this._needsNegotiation()),t.transceiverRequest&&this.initiator&&(this._debug("got request for transceiver"),this.addTransceiver(t.transceiverRequest.kind,t.transceiverRequest.init)),t.candidate&&(this._pc.remoteDescription&&this._pc.remoteDescription.type?this._addIceCandidate(t.candidate):this._pendingCandidates.push(t.candidate)),t.sdp&&this._pc.setRemoteDescription(new this._wrtc.RTCSessionDescription(t)).then(()=>{this.destroyed||(this._pendingCandidates.forEach(r=>{this._addIceCandidate(r)}),this._pendingCandidates=[],this._pc.remoteDescription.type==="offer"&&this._createAnswer())}).catch(r=>{this.destroy(He(r,"ERR_SET_REMOTE_DESCRIPTION"))}),!t.sdp&&!t.candidate&&!t.renegotiate&&!t.transceiverRequest&&this.destroy(He(new Error("signal() called with invalid signal data"),"ERR_SIGNALING"))}}_addIceCandidate(t){const r=new this._wrtc.RTCIceCandidate(t);this._pc.addIceCandidate(r).catch(n=>{!r.address||r.address.endsWith(".local")?AE("Ignoring unsupported ICE candidate."):this.destroy(He(n,"ERR_ADD_ICE_CANDIDATE"))})}send(t){if(!this.destroying){if(this.destroyed)throw He(new Error("cannot send after peer is destroyed"),"ERR_DESTROYED");this._channel.send(t)}}addTransceiver(t,r){if(!this.destroying){if(this.destroyed)throw He(new Error("cannot addTransceiver after peer is destroyed"),"ERR_DESTROYED");if(this._debug("addTransceiver()"),this.initiator)try{this._pc.addTransceiver(t,r),this._needsNegotiation()}catch(n){this.destroy(He(n,"ERR_ADD_TRANSCEIVER"))}else this.emit("signal",{type:"transceiverRequest",transceiverRequest:{kind:t,init:r}})}}addStream(t){if(!this.destroying){if(this.destroyed)throw He(new Error("cannot addStream after peer is destroyed"),"ERR_DESTROYED");this._debug("addStream()"),t.getTracks().forEach(r=>{this.addTrack(r,t)})}}addTrack(t,r){if(this.destroying)return;if(this.destroyed)throw He(new Error("cannot addTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("addTrack()");const n=this._senderMap.get(t)||new Map;let o=n.get(r);if(!o)o=this._pc.addTrack(t,r),n.set(r,o),this._senderMap.set(t,n),this._needsNegotiation();else throw o.removed?He(new Error("Track has been removed. You should enable/disable tracks that you want to re-add."),"ERR_SENDER_REMOVED"):He(new Error("Track has already been added to that stream."),"ERR_SENDER_ALREADY_ADDED")}replaceTrack(t,r,n){if(this.destroying)return;if(this.destroyed)throw He(new Error("cannot replaceTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("replaceTrack()");const o=this._senderMap.get(t),a=o?o.get(n):null;if(!a)throw He(new Error("Cannot replace track that was never added."),"ERR_TRACK_NOT_ADDED");r&&this._senderMap.set(r,o),a.replaceTrack!=null?a.replaceTrack(r):this.destroy(He(new Error("replaceTrack is not supported in this browser"),"ERR_UNSUPPORTED_REPLACETRACK"))}removeTrack(t,r){if(this.destroying)return;if(this.destroyed)throw He(new Error("cannot removeTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSender()");const n=this._senderMap.get(t),o=n?n.get(r):null;if(!o)throw He(new Error("Cannot remove track that was never added."),"ERR_TRACK_NOT_ADDED");try{o.removed=!0,this._pc.removeTrack(o)}catch(a){a.name==="NS_ERROR_UNEXPECTED"?this._sendersAwaitingStable.push(o):this.destroy(He(a,"ERR_REMOVE_TRACK"))}this._needsNegotiation()}removeStream(t){if(!this.destroying){if(this.destroyed)throw He(new Error("cannot removeStream after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSenders()"),t.getTracks().forEach(r=>{this.removeTrack(r,t)})}}_needsNegotiation(){this._debug("_needsNegotiation"),!this._batchedNegotiation&&(this._batchedNegotiation=!0,Of(()=>{this._batchedNegotiation=!1,this.initiator||!this._firstNegotiation?(this._debug("starting batched negotiation"),this.negotiate()):this._debug("non-initiator initial negotiation request discarded"),this._firstNegotiation=!1}))}negotiate(){if(!this.destroying){if(this.destroyed)throw He(new Error("cannot negotiate after peer is destroyed"),"ERR_DESTROYED");this.initiator?this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("start negotiation"),setTimeout(()=>{this._createOffer()},0)):this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("requesting negotiation from initiator"),this.emit("signal",{type:"renegotiate",renegotiate:!0})),this._isNegotiating=!0}}destroy(t){this._destroy(t,()=>{})}_destroy(t,r){this.destroyed||this.destroying||(this.destroying=!0,this._debug("destroying (error: %s)",t&&(t.message||t)),Of(()=>{if(this.destroyed=!0,this.destroying=!1,this._debug("destroy (error: %s)",t&&(t.message||t)),this.readable=this.writable=!1,this._readableState.ended||this.push(null),this._writableState.finished||this.end(),this._connected=!1,this._pcReady=!1,this._channelReady=!1,this._remoteTracks=null,this._remoteStreams=null,this._senderMap=null,clearInterval(this._closingInterval),this._closingInterval=null,clearInterval(this._interval),this._interval=null,this._chunk=null,this._cb=null,this._onFinishBound&&this.removeListener("finish",this._onFinishBound),this._onFinishBound=null,this._channel){try{this._channel.close()}catch{}this._channel.onmessage=null,this._channel.onopen=null,this._channel.onclose=null,this._channel.onerror=null}if(this._pc){try{this._pc.close()}catch{}this._pc.oniceconnectionstatechange=null,this._pc.onicegatheringstatechange=null,this._pc.onsignalingstatechange=null,this._pc.onicecandidate=null,this._pc.ontrack=null,this._pc.ondatachannel=null}this._pc=null,this._channel=null,t&&this.emit("error",t),this.emit("close"),r()}))}_setupData(t){if(!t.channel)return this.destroy(He(new Error("Data channel event is missing `channel` property"),"ERR_DATA_CHANNEL"));this._channel=t.channel,this._channel.binaryType="arraybuffer",typeof this._channel.bufferedAmountLowThreshold=="number"&&(this._channel.bufferedAmountLowThreshold=Bf),this.channelName=this._channel.label,this._channel.onmessage=n=>{this._onChannelMessage(n)},this._channel.onbufferedamountlow=()=>{this._onChannelBufferedAmountLow()},this._channel.onopen=()=>{this._onChannelOpen()},this._channel.onclose=()=>{this._onChannelClose()},this._channel.onerror=n=>{const o=n.error instanceof Error?n.error:new Error(`Datachannel error: ${n.message} ${n.filename}:${n.lineno}:${n.colno}`);this.destroy(He(o,"ERR_DATA_CHANNEL"))};let r=!1;this._closingInterval=setInterval(()=>{this._channel&&this._channel.readyState==="closing"?(r&&this._onChannelClose(),r=!0):r=!1},kE)}_read(){}_write(t,r,n){if(this.destroyed)return n(He(new Error("cannot write after peer is destroyed"),"ERR_DATA_CHANNEL"));if(this._connected){try{this.send(t)}catch(o){return this.destroy(He(o,"ERR_DATA_CHANNEL"))}this._channel.bufferedAmount>Bf?(this._debug("start backpressure: bufferedAmount %d",this._channel.bufferedAmount),this._cb=n):n(null)}else this._debug("write before connect"),this._chunk=t,this._cb=n}_onFinish(){if(this.destroyed)return;const t=()=>{setTimeout(()=>this.destroy(),1e3)};this._connected?t():this.once("connect",t)}_startIceCompleteTimeout(){this.destroyed||this._iceCompleteTimer||(this._debug("started iceComplete timeout"),this._iceCompleteTimer=setTimeout(()=>{this._iceComplete||(this._iceComplete=!0,this._debug("iceComplete timeout completed"),this.emit("iceTimeout"),this.emit("_iceComplete"))},this.iceCompleteTimeout))}_createOffer(){this.destroyed||this._pc.createOffer(this.offerOptions).then(t=>{if(this.destroyed)return;!this.trickle&&!this.allowHalfTrickle&&(t.sdp=iy(t.sdp)),t.sdp=this.sdpTransform(t.sdp);const r=()=>{if(this.destroyed)return;const a=this._pc.localDescription||t;this._debug("signal"),this.emit("signal",{type:a.type,sdp:a.sdp})},n=()=>{this._debug("createOffer success"),!this.destroyed&&(this.trickle||this._iceComplete?r():this.once("_iceComplete",r))},o=a=>{this.destroy(He(a,"ERR_SET_LOCAL_DESCRIPTION"))};this._pc.setLocalDescription(t).then(n).catch(o)}).catch(t=>{this.destroy(He(t,"ERR_CREATE_OFFER"))})}_requestMissingTransceivers(){this._pc.getTransceivers&&this._pc.getTransceivers().forEach(t=>{!t.mid&&t.sender.track&&!t.requested&&(t.requested=!0,this.addTransceiver(t.sender.track.kind))})}_createAnswer(){this.destroyed||this._pc.createAnswer(this.answerOptions).then(t=>{if(this.destroyed)return;!this.trickle&&!this.allowHalfTrickle&&(t.sdp=iy(t.sdp)),t.sdp=this.sdpTransform(t.sdp);const r=()=>{if(this.destroyed)return;const a=this._pc.localDescription||t;this._debug("signal"),this.emit("signal",{type:a.type,sdp:a.sdp}),this.initiator||this._requestMissingTransceivers()},n=()=>{this.destroyed||(this.trickle||this._iceComplete?r():this.once("_iceComplete",r))},o=a=>{this.destroy(He(a,"ERR_SET_LOCAL_DESCRIPTION"))};this._pc.setLocalDescription(t).then(n).catch(o)}).catch(t=>{this.destroy(He(t,"ERR_CREATE_ANSWER"))})}_onConnectionStateChange(){this.destroyed||this._pc.connectionState==="failed"&&this.destroy(He(new Error("Connection failed."),"ERR_CONNECTION_FAILURE"))}_onIceStateChange(){if(this.destroyed)return;const t=this._pc.iceConnectionState,r=this._pc.iceGatheringState;this._debug("iceStateChange (connection: %s) (gathering: %s)",t,r),this.emit("iceStateChange",t,r),(t==="connected"||t==="completed")&&(this._pcReady=!0,this._maybeReady()),t==="failed"&&this.destroy(He(new Error("Ice connection failed."),"ERR_ICE_CONNECTION_FAILURE")),t==="closed"&&this.destroy(He(new Error("Ice connection closed."),"ERR_ICE_CONNECTION_CLOSED"))}getStats(t){const r=n=>(Object.prototype.toString.call(n.values)==="[object Array]"&&n.values.forEach(o=>{Object.assign(n,o)}),n);this._pc.getStats.length===0||this._isReactNativeWebrtc?this._pc.getStats().then(n=>{const o=[];n.forEach(a=>{o.push(r(a))}),t(null,o)},n=>t(n)):this._pc.getStats.length>0?this._pc.getStats(n=>{if(this.destroyed)return;const o=[];n.result().forEach(a=>{const f={};a.names().forEach(h=>{f[h]=a.stat(h)}),f.id=a.id,f.type=a.type,f.timestamp=a.timestamp,o.push(r(f))}),t(null,o)},n=>t(n)):t(null,[])}_maybeReady(){if(this._debug("maybeReady pc %s channel %s",this._pcReady,this._channelReady),this._connected||this._connecting||!this._pcReady||!this._channelReady)return;this._connecting=!0;const t=()=>{this.destroyed||this.getStats((r,n)=>{if(this.destroyed)return;r&&(n=[]);const o={},a={},f={};let h=!1;n.forEach(v=>{(v.type==="remotecandidate"||v.type==="remote-candidate")&&(o[v.id]=v),(v.type==="localcandidate"||v.type==="local-candidate")&&(a[v.id]=v),(v.type==="candidatepair"||v.type==="candidate-pair")&&(f[v.id]=v)});const p=v=>{h=!0;let _=a[v.localCandidateId];_&&(_.ip||_.address)?(this.localAddress=_.ip||_.address,this.localPort=Number(_.port)):_&&_.ipAddress?(this.localAddress=_.ipAddress,this.localPort=Number(_.portNumber)):typeof v.googLocalAddress=="string"&&(_=v.googLocalAddress.split(":"),this.localAddress=_[0],this.localPort=Number(_[1])),this.localAddress&&(this.localFamily=this.localAddress.includes(":")?"IPv6":"IPv4");let y=o[v.remoteCandidateId];y&&(y.ip||y.address)?(this.remoteAddress=y.ip||y.address,this.remotePort=Number(y.port)):y&&y.ipAddress?(this.remoteAddress=y.ipAddress,this.remotePort=Number(y.portNumber)):typeof v.googRemoteAddress=="string"&&(y=v.googRemoteAddress.split(":"),this.remoteAddress=y[0],this.remotePort=Number(y[1])),this.remoteAddress&&(this.remoteFamily=this.remoteAddress.includes(":")?"IPv6":"IPv4"),this._debug("connect local: %s:%s remote: %s:%s",this.localAddress,this.localPort,this.remoteAddress,this.remotePort)};if(n.forEach(v=>{v.type==="transport"&&v.selectedCandidatePairId&&p(f[v.selectedCandidatePairId]),(v.type==="googCandidatePair"&&v.googActiveConnection==="true"||(v.type==="candidatepair"||v.type==="candidate-pair")&&v.selected)&&p(v)}),!h&&(!Object.keys(f).length||Object.keys(a).length)){setTimeout(t,100);return}else this._connecting=!1,this._connected=!0;if(this._chunk){try{this.send(this._chunk)}catch(_){return this.destroy(He(_,"ERR_DATA_CHANNEL"))}this._chunk=null,this._debug('sent chunk from "write before connect"');const v=this._cb;this._cb=null,v(null)}typeof this._channel.bufferedAmountLowThreshold!="number"&&(this._interval=setInterval(()=>this._onInterval(),150),this._interval.unref&&this._interval.unref()),this._debug("connect"),this.emit("connect")})};t()}_onInterval(){!this._cb||!this._channel||this._channel.bufferedAmount>Bf||this._onChannelBufferedAmountLow()}_onSignalingStateChange(){this.destroyed||(this._pc.signalingState==="stable"&&(this._isNegotiating=!1,this._debug("flushing sender queue",this._sendersAwaitingStable),this._sendersAwaitingStable.forEach(t=>{this._pc.removeTrack(t),this._queuedNegotiation=!0}),this._sendersAwaitingStable=[],this._queuedNegotiation?(this._debug("flushing negotiation queue"),this._queuedNegotiation=!1,this._needsNegotiation()):(this._debug("negotiated"),this.emit("negotiated"))),this._debug("signalingStateChange %s",this._pc.signalingState),this.emit("signalingStateChange",this._pc.signalingState))}_onIceCandidate(t){this.destroyed||(t.candidate&&this.trickle?this.emit("signal",{type:"candidate",candidate:{candidate:t.candidate.candidate,sdpMLineIndex:t.candidate.sdpMLineIndex,sdpMid:t.candidate.sdpMid}}):!t.candidate&&!this._iceComplete&&(this._iceComplete=!0,this.emit("_iceComplete")),t.candidate&&this._startIceCompleteTimeout())}_onChannelMessage(t){if(this.destroyed)return;let r=t.data;r instanceof ArrayBuffer&&(r=TE.from(r)),this.push(r)}_onChannelBufferedAmountLow(){if(this.destroyed||!this._cb)return;this._debug("ending backpressure: bufferedAmount %d",this._channel.bufferedAmount);const t=this._cb;this._cb=null,t(null)}_onChannelOpen(){this._connected||this.destroyed||(this._debug("on channel open"),this._channelReady=!0,this._maybeReady())}_onChannelClose(){this.destroyed||(this._debug("on channel close"),this.destroy())}_onTrack(t){this.destroyed||t.streams.forEach(r=>{this._debug("on track"),this.emit("track",t.track,r),this._remoteTracks.push({track:t.track,stream:r}),!this._remoteStreams.some(n=>n.id===r.id)&&(this._remoteStreams.push(r),Of(()=>{this._debug("on stream"),this.emit("stream",r)}))})}_debug(){const t=[].slice.call(arguments);t[0]="["+this._id+"] "+t[0],ME.apply(null,t)}}Mn.WEBRTC_SUPPORT=!!F0();Mn.config={iceServers:[{urls:["stun:stun.l.google.com:19302","stun:global.stun.twilio.com:3478"]}],sdpSemantics:"unified-plan"};Mn.channelConfig={};var RE=Mn;const LE=Mi(RE);var D0={exports:{}},Sl=1;function UE(){return Sl=(Sl*9301+49297)%233280,Sl/233280}function IE(e){Sl=e}var JE={nextValue:UE,seed:IE},Wc=JE,vn="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-",Wr,ry,Ao;function Kc(){Ao=!1}function j0(e){if(!e){Wr!==vn&&(Wr=vn,Kc());return}if(e!==Wr){if(e.length!==vn.length)throw new Error("Custom alphabet for shortid must be "+vn.length+" unique characters. You submitted "+e.length+" characters: "+e);var t=e.split("").filter(function(r,n,o){return n!==o.lastIndexOf(r)});if(t.length)throw new Error("Custom alphabet for shortid must be "+vn.length+" unique characters. These characters were not unique: "+t.join(", "));Wr=e,Kc()}}function NE(e){return j0(e),Wr}function OE(e){Wc.seed(e),ry!==e&&(Kc(),ry=e)}function BE(){Wr||j0(vn);for(var e=Wr.split(""),t=[],r=Wc.nextValue(),n;e.length>0;)r=Wc.nextValue(),n=Math.floor(r*e.length),t.push(e.splice(n,1)[0]);return t.join("")}function P0(){return Ao||(Ao=BE(),Ao)}function FE(e){var t=P0();return t[e]}function DE(){return Wr||vn}var xh={get:DE,characters:NE,seed:OE,lookup:FE,shuffled:P0},Ff=typeof window=="object"&&(window.crypto||window.msCrypto),Vc;!Ff||!Ff.getRandomValues?Vc=function(e){for(var t=[],r=0;r<e;r++)t.push(Math.floor(Math.random()*256));return t}:Vc=function(e){return Ff.getRandomValues(new Uint8Array(e))};var jE=Vc,PE=function(e,t,r){for(var n=(2<<Math.log(t.length-1)/Math.LN2)-1,o=-~(1.6*n*r/t.length),a="";;)for(var f=e(o),h=o;h--;)if(a+=t[f[h]&n]||"",a.length===+r)return a},GE=xh,WE=jE,KE=PE;function VE(e){for(var t=0,r,n="";!r;)n=n+KE(WE,GE.get(),1),r=e<Math.pow(16,t+1),t++;return n}var zE=VE,al=zE,QE=1567752802062,YE=7,ll,ny;function HE(e){var t="",r=Math.floor((Date.now()-QE)*.001);return r===ny?ll++:(ll=0,ny=r),t=t+al(YE),t=t+al(e),ll>0&&(t=t+al(ll)),t=t+al(r),t}var ZE=HE,$E=xh;function XE(e){if(!e||typeof e!="string"||e.length<6)return!1;var t=new RegExp("[^"+$E.get().replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&")+"]");return!t.test(e)}var qE=XE;(function(e){var t=xh,r=ZE,n=qE,o=0;function a(v){return t.seed(v),e.exports}function f(v){return o=v,e.exports}function h(v){return v!==void 0&&t.characters(v),t.shuffled()}function p(){return r(o)}e.exports=p,e.exports.generate=p,e.exports.seed=a,e.exports.worker=f,e.exports.characters=h,e.exports.isValid=n})(D0);var ek=D0.exports,tk=ek;const ik=Mi(tk),rk=Object.assign;var Pt=function(e){this.signaller=bT(e.server),this.id=e.id||ik.generate(),this.stream=e.stream||null,this._peerOptions=e.peerOptions||{},this._room=e.room,this.settings.shareMediaWhenRequested=!0,this.settings.shareMediaWhenInitiating=!1,this.settings.requestMediaWhenInitiating=!0,this.settings.autoconnect=!1,this.peers={},this.rtcPeers={},this.signaller.on("ready",this._readyForSignalling.bind(this)),this.signaller.on("message",this._handleMessage.bind(this)),this.signaller.on("broadcast",this._receivedBroadcast.bind(this)),this.signaller.emit("join",this._room,{uuid:this.id}),this.signaller.on("new peer",this._newPeer.bind(this))};L0(Pt,Kl.EventEmitter);Pt.prototype.sendToAll=function(e){Object.keys(this.rtcPeers).forEach(function(t){this.rtcPeers[t].send(e)},this)};Pt.prototype.sendToPeer=function(e,t){e in this.rtcPeers&&this.rtcPeers[e].send(t)};Pt.prototype.reinitAll=function(){Object.keys(this.rtcPeers).forEach((function(e){this.reinitPeer(e)}).bind(this))};Pt.prototype.initRtcPeer=function(e,t){this.emit("new peer",{id:e});var r=t;this.iceServers&&(t.config={iceServers:this.iceServers}),t.initiator===!0?(this.stream!=null&&this.settings.shareMediaWhenInitiating===!0&&(r.stream=this.stream),this.settings.requestMediaWhenInitiating===!0&&(r.offerConstraints={offerToReceiveVideo:!0,offerToReceiveAudio:!0})):this.settings.shareMediaWhenRequested===!0&&this.stream!=null&&(r.stream=this.stream);var n=rk(this._peerOptions,r);this.rtcPeers[e]=new LE(n),this._attachPeerEvents(this.rtcPeers[e],e)};Pt.prototype.reinitRtcConnection=function(e,t){this.rtcPeers[e]._destroy(null,(function(r){this.initRtcPeer(e,{stream:this.stream,initiator:!0})}).bind(this))};Pt.prototype._newPeer=function(e){this.peers[e]={rtcPeer:null},this.emit("new peer",e)};Pt.prototype._readyForSignalling=function({peers:e,servers:t}){e.forEach(r=>{this._newPeer(r)}),t&&(this.iceServers=t),this.emit("ready")};Pt.prototype.initConnectionFromId=function(e,t){e in this.rtcPeers?(console.log("Already connected to..",e,this.rtcPeers),this.rtcPeers[e].initiator===!1&&this.reinitRtcConnection(e)):this.initRtcPeer(e,{initiator:!0})};Pt.prototype._handleMessage=function(e){e.type==="signal"?this._handleSignal(e):this.emit("message",e)};Pt.prototype._handleSignal=function(e){this.rtcPeers[e.id]||this.initRtcPeer(e.id,{initiator:!1}),this.rtcPeers[e.id].signal(e.message)};Pt.prototype._receivedBroadcast=function(e){this.emit("broadcast",e)};Pt.prototype.broadcast=function(e){this.signaller.emit("broadcast",e)};Pt.prototype._attachPeerEvents=function(e,t){e.on("signal",(function(r,n){this.signaller.emit("message",{id:r,message:n,type:"signal"})}).bind(this,t)),e.on("stream",(function(r,n){this.rtcPeers[r].stream=n,this.emit("stream",r,n)}).bind(this,t)),e.on("connect",(function(r){this.emit("connect",r)}).bind(this,t)),e.on("data",(function(r,n){this.emit("data",{id:r,data:JSON.parse(n)})}).bind(this,t)),e.on("close",(function(r){delete this.rtcPeers[r],this.emit("close",r)}).bind(this,t)),e.on("error",function(r){console.warn("simple peer error",r)})};Pt.prototype._destroy=function(){Object.values(this.rtcPeers).forEach(function(e){e.destroy()}),this.signaller.close()};var vr=function(){this.session={},this.nickFromId={},this.idFromNick={},this.loadFromStorage()};L0(vr,Pt);vr.prototype.init=function(e,t){this.settings={server:t.server||"https://patch-bay.glitch.me/",room:t.room||"patch-bay",stream:e},this.makeGlobal=t.makeGlobal||!0,this.setPageTitle=t.setTitle||!0,this.session.id&&(this.settings.id=this.session.id),Pt.call(this,this.settings),this.makeGlobal&&(window.pb=this),this.on("ready",()=>{this.nick||(this.session.nick?this.setName(this.session.nick):(this.session.id=this.id,this.setName(this.session.id)))}),this.on("broadcast",this._processBroadcast.bind(this)),this.on("new peer",this.handleNewPeer.bind(this)),window.onbeforeunload=()=>{this.session.id=window.pb.id,this.session.nick=this.nick,sessionStorage.setItem("pb",JSON.stringify(this.session))};var r=this;this.on("stream",function(n,o){console.log("got stream!",n,o);const a=document.createElement("video");"srcObject"in a?a.srcObject=o:a.src=window.URL.createObjectURL(o),a.addEventListener("loadedmetadata",()=>{a.play(),r.video=a,r.emit("got video",r.nickFromId[n],a)})})};vr.prototype.loadFromStorage=function(){sessionStorage.getItem("pb")!==null&&(this.session=JSON.parse(sessionStorage.getItem("pb")))};vr.prototype.initSource=function(e,t){this.initConnectionFromId(this.idFromNick[e],t)};vr.prototype.handleNewPeer=function(e){this.nickFromId[e]=e,this.idFromNick[e]=e,this.nick&&this.broadcast({type:"update-nick",id:this.id,nick:this.nick})};vr.prototype.list=function(){var e=Object.keys(this.idFromNick);return console.log(e),Object.keys(this.idFromNick)};vr.prototype.setName=function(e){this.broadcast({type:"update-nick",id:this.id,nick:e,previous:this.nick}),this.nick=e,this.setPageTitle&&(document.title=e)};vr.prototype._processBroadcast=function(e){e.type==="update-nick"&&e.previous!==e.nick&&(delete this.idFromNick[this.nickFromId[e.id]],this.nickFromId[e.id]=e.nick,this.idFromNick[e.nick]=e.id,e.previous)};class nk extends Xm{constructor(t,r,n){super(t),this.local=r.components[t]={},r.hydra=this,this.state=r,this.emit=n}load(t){let n=(/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!window.MSStream?"highp":"mediump";const o={detectAudio:!0,canvas:t.querySelector("canvas"),precision:n};this.state.serverURL===null?(console.log("LOCAL ONLY, WILL NOT INIT webRTC and gallery"),this.hydra=new Hydra(o)):(this.pb=new vr,o.pb=this.pb,this.hydra=new Hydra(o),this.pb.init(this.hydra.captureStream,{server:this.state.serverURL,room:"iclc"}),window.pb=this.pb),window.hydraSynth=this.hydra,window.P5=AM,this.emit("hydra loaded")}update(t){return!1}createElement({width:t=window.innerWidth,height:r=window.innerHeight}={}){return At`<div style="width:100%;height:100%;">
|
||
<canvas id="hydra-canvas" class="bg-black" style="image-rendering:pixelated; width:100%;height:100%" width="${t}" height="${r}"></canvas></div>`}}var Df={exports:{}},sy;function ks(){return sy||(sy=1,function(e,t){var r=r||{};r.scope={},r.findInternal=function(n,o,a){n instanceof String&&(n=String(n));for(var f=n.length,h=0;h<f;h++){var p=n[h];if(o.call(a,p,h,n))return{i:h,v:p}}return{i:-1,v:void 0}},r.ASSUME_ES5=!1,r.ASSUME_NO_NATIVE_MAP=!1,r.ASSUME_NO_NATIVE_SET=!1,r.SIMPLE_FROUND_POLYFILL=!1,r.ISOLATE_POLYFILLS=!1,r.FORCE_POLYFILL_PROMISE=!1,r.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1,r.defineProperty=r.ASSUME_ES5||typeof Object.defineProperties=="function"?Object.defineProperty:function(n,o,a){return n==Array.prototype||n==Object.prototype||(n[o]=a.value),n},r.getGlobal=function(n){n=[typeof globalThis=="object"&&globalThis,n,typeof window=="object"&&window,typeof self=="object"&&self,typeof gt=="object"&>];for(var o=0;o<n.length;++o){var a=n[o];if(a&&a.Math==Math)return a}throw Error("Cannot find global object")},r.global=r.getGlobal(gt),r.IS_SYMBOL_NATIVE=typeof Symbol=="function"&&typeof Symbol("x")=="symbol",r.TRUST_ES6_POLYFILLS=!r.ISOLATE_POLYFILLS||r.IS_SYMBOL_NATIVE,r.polyfills={},r.propertyToPolyfillSymbol={},r.POLYFILL_PREFIX="$jscp$",r.polyfill=function(n,o,a,f){o&&(r.ISOLATE_POLYFILLS?r.polyfillIsolated(n,o,a,f):r.polyfillUnisolated(n,o,a,f))},r.polyfillUnisolated=function(n,o,a,f){for(a=r.global,n=n.split("."),f=0;f<n.length-1;f++){var h=n[f];if(!(h in a))return;a=a[h]}n=n[n.length-1],f=a[n],o=o(f),o!=f&&o!=null&&r.defineProperty(a,n,{configurable:!0,writable:!0,value:o})},r.polyfillIsolated=function(n,o,a,f){var h=n.split(".");n=h.length===1,f=h[0],f=!n&&f in r.polyfills?r.polyfills:r.global;for(var p=0;p<h.length-1;p++){var v=h[p];if(!(v in f))return;f=f[v]}h=h[h.length-1],a=r.IS_SYMBOL_NATIVE&&a==="es6"?f[h]:null,o=o(a),o!=null&&(n?r.defineProperty(r.polyfills,h,{configurable:!0,writable:!0,value:o}):o!==a&&(r.propertyToPolyfillSymbol[h]===void 0&&(a=1e9*Math.random()>>>0,r.propertyToPolyfillSymbol[h]=r.IS_SYMBOL_NATIVE?r.global.Symbol(h):r.POLYFILL_PREFIX+a+"$"+h),r.defineProperty(f,r.propertyToPolyfillSymbol[h],{configurable:!0,writable:!0,value:o})))},r.polyfill("Array.prototype.find",function(n){return n||function(o,a){return r.findInternal(this,o,a).v}},"es6","es3"),function(n,o){e.exports=o()}(gt,function(){function n(i){return new RegExp("(^|\\s)"+i+"(?:$|\\s)\\s*")}function o(i){for(var s=i.childNodes.length;0<s;--s)i.removeChild(i.firstChild);return i}function a(i,s){return o(i).appendChild(s)}function f(i,s,u,l){if(i=document.createElement(i),u&&(i.className=u),l&&(i.style.cssText=l),typeof s=="string")i.appendChild(document.createTextNode(s));else if(s)for(u=0;u<s.length;++u)i.appendChild(s[u]);return i}function h(i,s,u,l){return i=f(i,s,u,l),i.setAttribute("role","presentation"),i}function p(i,s){if(s.nodeType==3&&(s=s.parentNode),i.contains)return i.contains(s);do if(s.nodeType==11&&(s=s.host),s==i)return!0;while(s=s.parentNode)}function v(i){try{var s=i.activeElement}catch{s=i.body||null}for(;s&&s.shadowRoot&&s.shadowRoot.activeElement;)s=s.shadowRoot.activeElement;return s}function _(i,s){var u=i.className;n(s).test(u)||(i.className+=(u?" ":"")+s)}function y(i,s){i=i.split(" ");for(var u=0;u<i.length;u++)i[u]&&!n(i[u]).test(s)&&(s+=" "+i[u]);return s}function m(i){return i.display.wrapper.ownerDocument}function x(i){var s=Array.prototype.slice.call(arguments,1);return function(){return i.apply(null,s)}}function U(i,s,u){s||(s={});for(var l in i)!i.hasOwnProperty(l)||u===!1&&s.hasOwnProperty(l)||(s[l]=i[l]);return s}function R(i,s,u,l,c){for(s==null&&(s=i.search(/[^\s\u00a0]/),s==-1&&(s=i.length)),l=l||0,c=c||0;;){var d=i.indexOf(" ",l);if(0>d||d>=s)return c+(s-l);c+=d-l,c+=u-c%u,l=d+1}}function S(i,s){for(var u=0;u<i.length;++u)if(i[u]==s)return u;return-1}function g(i,s,u){for(var l=0,c=0;;){var d=i.indexOf(" ",l);d==-1&&(d=i.length);var w=d-l;if(d==i.length||c+w>=s)return l+Math.min(w,s-c);if(c+=d-l,c+=u-c%u,l=d+1,c>=s)return l}}function L(i){for(;Da.length<=i;)Da.push(G(Da)+" ");return Da[i]}function G(i){return i[i.length-1]}function O(i,s){for(var u=[],l=0;l<i.length;l++)u[l]=s(i[l],l);return u}function P(i,s,u){for(var l=0,c=u(s);l<i.length&&u(i[l])<=c;)l++;i.splice(l,0,s)}function F(){}function V(i,s){return Object.create?i=Object.create(i):(F.prototype=i,i=new F),s&&U(s,i),i}function D(i){return/\w/.test(i)||""<i&&(i.toUpperCase()!=i.toLowerCase()||__.test(i))}function ee(i,s){return s?-1<s.source.indexOf("\\w")&&D(i)?!0:s.test(i):D(i)}function A(i){for(var s in i)if(i.hasOwnProperty(s)&&i[s])return!1;return!0}function q(i){return 768<=i.charCodeAt(0)&&w_.test(i)}function $(i,s,u){for(;(0>u?0<s:s<i.length)&&q(i.charAt(s));)s+=u;return s}function ce(i,s,u){for(var l=s>u?-1:1;;){if(s==u)return s;var c=(s+u)/2;if(c=0>l?Math.ceil(c):Math.floor(c),c==s)return i(c)?s:u;i(c)?u=c:s=c+l}}function ye(i,s,u,l){if(!i)return l(s,u,"ltr",0);for(var c=!1,d=0;d<i.length;++d){var w=i[d];(w.from<u&&w.to>s||s==u&&w.to==s)&&(l(Math.max(w.from,s),Math.min(w.to,u),w.level==1?"rtl":"ltr",d),c=!0)}c||l(s,u,"ltr")}function re(i,s,u){var l;no=null;for(var c=0;c<i.length;++c){var d=i[c];if(d.from<s&&d.to>s)return c;d.to==s&&(d.from!=d.to&&u=="before"?l=c:no=c),d.from==s&&(d.from!=d.to&&u!="before"?l=c:no=c)}return l??no}function ie(i,s){var u=i.order;return u==null&&(u=i.order=b_(i.text,s)),u}function K(i,s,u){if(i.removeEventListener)i.removeEventListener(s,u,!1);else if(i.detachEvent)i.detachEvent("on"+s,u);else{var l=(i=i._handlers)&&i[s];l&&(u=S(l,u),-1<u&&(i[s]=l.slice(0,u).concat(l.slice(u+1))))}}function X(i,s){var u=i._handlers&&i._handlers[s]||ja;if(u.length)for(var l=Array.prototype.slice.call(arguments,2),c=0;c<u.length;++c)u[c].apply(null,l)}function fe(i,s,u){return typeof s=="string"&&(s={type:s,preventDefault:function(){this.defaultPrevented=!0}}),X(i,u||s.type,i,s),ze(s)||s.codemirrorIgnore}function Me(i){var s=i._handlers&&i._handlers.cursorActivity;if(s){i=i.curOp.cursorActivityHandlers||(i.curOp.cursorActivityHandlers=[]);for(var u=0;u<s.length;++u)S(i,s[u])==-1&&i.push(s[u])}}function we(i,s){return 0<(i._handlers&&i._handlers[s]||ja).length}function Re(i){i.prototype.on=function(s,u){Fe(this,s,u)},i.prototype.off=function(s,u){K(this,s,u)}}function ke(i){i.preventDefault?i.preventDefault():i.returnValue=!1}function Ie(i){i.stopPropagation?i.stopPropagation():i.cancelBubble=!0}function ze(i){return i.defaultPrevented!=null?i.defaultPrevented:i.returnValue==0}function le(i){ke(i),Ie(i)}function ue(i){var s=i.which;return s==null&&(i.button&1?s=1:i.button&2?s=3:i.button&4&&(s=2)),yi&&i.ctrlKey&&s==1&&(s=3),s}function xe(i,s){2<arguments.length&&(s.dependencies=Array.prototype.slice.call(arguments,2)),Qu[i]=s}function Le(i){if(typeof i=="string"&&Kn.hasOwnProperty(i))i=Kn[i];else if(i&&typeof i.name=="string"&&Kn.hasOwnProperty(i.name)){var s=Kn[i.name];typeof s=="string"&&(s={name:s}),i=V(s,i),i.name=s.name}else{if(typeof i=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(i))return Le("application/xml");if(typeof i=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(i))return Le("application/json")}return typeof i=="string"?{name:i}:i||{name:"null"}}function De(i,s){s=Le(s);var u=Qu[s.name];if(!u)return De(i,"text/plain");if(i=u(i,s),Vn.hasOwnProperty(s.name)){u=Vn[s.name];for(var l in u)u.hasOwnProperty(l)&&(i.hasOwnProperty(l)&&(i["_"+l]=i[l]),i[l]=u[l])}if(i.name=s.name,s.helperType&&(i.helperType=s.helperType),s.modeProps)for(var c in s.modeProps)i[c]=s.modeProps[c];return i}function H(i,s){i=Vn.hasOwnProperty(i)?Vn[i]:Vn[i]={},U(s,i)}function Y(i,s){if(s===!0)return s;if(i.copyState)return i.copyState(s);i={};for(var u in s){var l=s[u];l instanceof Array&&(l=l.concat([])),i[u]=l}return i}function ve(i,s){for(var u;i.innerMode&&(u=i.innerMode(s),!(!u||u.mode==i));)s=u.state,i=u.mode;return u||{mode:i,state:s}}function Ce(i,s,u){return i.startState?i.startState(s,u):!0}function N(i,s){if(s-=i.first,0>s||s>=i.size)throw Error("There is no line "+(s+i.first)+" in the document.");for(;!i.lines;)for(var u=0;;++u){var l=i.children[u],c=l.chunkSize();if(s<c){i=l;break}s-=c}return i.lines[s]}function T(i,s,u){var l=[],c=s.line;return i.iter(s.line,u.line+1,function(d){d=d.text,c==u.line&&(d=d.slice(0,u.ch)),c==s.line&&(d=d.slice(s.ch)),l.push(d),++c}),l}function k(i,s,u){var l=[];return i.iter(s,u,function(c){l.push(c.text)}),l}function z(i,s){if(s-=i.height)for(;i;i=i.parent)i.height+=s}function oe(i){if(i.parent==null)return null;var s=i.parent;i=S(s.lines,i);for(var u=s.parent;u;s=u,u=u.parent)for(var l=0;u.children[l]!=s;++l)i+=u.children[l].chunkSize();return i+s.first}function _e(i,s){var u=i.first;e:do{for(var l=0;l<i.children.length;++l){var c=i.children[l],d=c.height;if(s<d){i=c;continue e}s-=d,u+=c.chunkSize()}return u}while(!i.lines);for(l=0;l<i.lines.length&&(c=i.lines[l].height,!(s<c));++l)s-=c;return u+l}function be(i,s){return s>=i.first&&s<i.first+i.size}function Ae(i,s){return String(i.lineNumberFormatter(s+i.firstLineNumber))}function pe(i,s,u){if(u===void 0&&(u=null),!(this instanceof pe))return new pe(i,s,u);this.line=i,this.ch=s,this.sticky=u}function Te(i,s){return i.line-s.line||i.ch-s.ch}function Ke(i,s){return i.sticky==s.sticky&&Te(i,s)==0}function Ve(i){return pe(i.line,i.ch)}function B(i,s){return 0>Te(i,s)?s:i}function M(i,s){return 0>Te(i,s)?i:s}function C(i,s){if(s.line<i.first)return pe(i.first,0);var u=i.first+i.size-1;return s.line>u?pe(u,N(i,u).text.length):(i=N(i,s.line).text.length,u=s.ch,s=u==null||u>i?pe(s.line,i):0>u?pe(s.line,0):s,s)}function Q(i,s){for(var u=[],l=0;l<s.length;l++)u[l]=C(i,s[l]);return u}function ae(i,s,u,l){var c=[i.state.modeGen],d={};Us(i,s.text,i.doc.mode,u,function(E,J){return c.push(E,J)},d,l);var w=u.state;l=function(E){u.baseTokens=c;var J=i.state.overlays[E],W=1,te=0;u.state=!0,Us(i,s.text,J.mode,u,function(ne,se){for(var ge=W;te<ne;){var Ee=c[W];Ee>ne&&c.splice(W,1,ne,c[W+1],Ee),W+=2,te=Math.min(ne,Ee)}if(se)if(J.opaque)c.splice(ge,W-ge,ne,"overlay "+se),W=ge+2;else for(;ge<W;ge+=2)ne=c[ge+1],c[ge+1]=(ne?ne+" ":"")+"overlay "+se},d),u.state=w,u.baseTokens=null,u.baseTokenPos=1};for(var b=0;b<i.state.overlays.length;++b)l(b);return{styles:c,classes:d.bgClass||d.textClass?d:null}}function he(i,s,u){if(!s.styles||s.styles[0]!=i.state.modeGen){var l=me(i,oe(s)),c=s.text.length>i.options.maxHighlightLength&&Y(i.doc.mode,l.state),d=ae(i,s,l);c&&(l.state=c),s.stateAfter=l.save(!c),s.styles=d.styles,d.classes?s.styleClasses=d.classes:s.styleClasses&&(s.styleClasses=null),u===i.doc.highlightFrontier&&(i.doc.modeFrontier=Math.max(i.doc.modeFrontier,++i.doc.highlightFrontier))}return s.styles}function me(i,s,u){var l=i.doc,c=i.display;if(!l.mode.startState)return new Yi(l,!0,s);var d=la(i,s,u),w=d>l.first&&N(l,d-1).stateAfter,b=w?Yi.fromSaved(l,w,d):new Yi(l,Ce(l.mode),d);return l.iter(d,s,function(E){Be(i,E.text,b);var J=b.line;E.stateAfter=J==s-1||J%5==0||J>=c.viewFrom&&J<c.viewTo?b.save():null,b.nextLine()}),u&&(l.modeFrontier=b.line),b}function Be(i,s,u,l){var c=i.doc.mode;for(i=new Et(s,i.options.tabSize,u),i.start=i.pos=l||0,s==""&&ht(c,u.state);!i.eol();)ut(c,i,u.state),i.start=i.pos}function ht(i,s){if(i.blankLine)return i.blankLine(s);if(i.innerMode&&(i=ve(i,s),i.mode.blankLine))return i.mode.blankLine(i.state)}function ut(i,s,u,l){for(var c=0;10>c;c++){l&&(l[0]=ve(i,u).mode);var d=i.token(s,u);if(s.pos>s.start)return d}throw Error("Mode "+i.name+" failed to advance stream.")}function Xe(i,s,u,l){var c=i.doc,d=c.mode;s=C(c,s);var w=N(c,s.line);u=me(i,s.line,u),i=new Et(w.text,i.options.tabSize,u);var b;for(l&&(b=[]);(l||i.pos<s.ch)&&!i.eol();){i.start=i.pos;var E=ut(d,i,u.state);l&&b.push(new id(i,E,Y(c.mode,u.state)))}return l?b:new id(i,E,u.state)}function it(i,s){if(i)for(;;){var u=i.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!u)break;i=i.slice(0,u.index)+i.slice(u.index+u[0].length);var l=u[1]?"bgClass":"textClass";s[l]==null?s[l]=u[2]:new RegExp("(?:^|\\s)"+u[2]+"(?:$|\\s)").test(s[l])||(s[l]+=" "+u[2])}return i}function Us(i,s,u,l,c,d,w){var b=u.flattenSpans;b==null&&(b=i.options.flattenSpans);var E=0,J=null,W=new Et(s,i.options.tabSize,l),te=i.options.addModeClass&&[null];for(s==""&&it(ht(u,l.state),d);!W.eol();){if(W.pos>i.options.maxHighlightLength){b=!1,w&&Be(i,s,l,W.pos),W.pos=s.length;var ne=null}else ne=it(ut(u,W,l.state,te),d);if(te){var se=te[0].name;se&&(ne="m-"+(ne?se+" "+ne:se))}if(!b||J!=ne){for(;E<W.start;)E=Math.min(W.start,E+5e3),c(E,J);J=ne}W.start=W.pos}for(;E<W.pos;)i=Math.min(W.pos,E+5e3),c(i,J),E=i}function la(i,s,u){for(var l,c,d=i.doc,w=u?-1:s-(i.doc.mode.innerMode?1e3:100);s>w;--s){if(s<=d.first)return d.first;var b=N(d,s-1),E=b.stateAfter;if(E&&(!u||s+(E instanceof Pa?E.lookAhead:0)<=d.modeFrontier))return s;b=R(b.text,null,i.options.tabSize),(c==null||l>b)&&(c=s-1,l=b)}return c}function cu(i,s){if(i.modeFrontier=Math.min(i.modeFrontier,s),!(i.highlightFrontier<s-10)){for(var u=i.first,l=s-1;l>u;l--){var c=N(i,l).stateAfter;if(c&&(!(c instanceof Pa)||l+c.lookAhead<s)){u=l+1;break}}i.highlightFrontier=Math.min(i.highlightFrontier,u)}}function ki(i,s,u){this.marker=i,this.from=s,this.to=u}function ii(i,s){if(i)for(var u=0;u<i.length;++u){var l=i[u];if(l.marker==s)return l}}function Vi(i,s){if(s.full)return null;var u=be(i,s.from.line)&&N(i,s.from.line).markedSpans,l=be(i,s.to.line)&&N(i,s.to.line).markedSpans;if(!u&&!l)return null;i=s.from.ch;var c=s.to.ch,d=Te(s.from,s.to)==0,w;if(u)for(var b=0;b<u.length;++b){var E=u[b],J=E.marker;if(E.from==null||(J.inclusiveLeft?E.from<=i:E.from<i)||!(E.from!=i||J.type!="bookmark"||d&&E.marker.insertLeft)){var W=E.to==null||(J.inclusiveRight?E.to>=i:E.to>i);(w||(w=[])).push(new ki(J,E.from,W?null:E.to))}}u=w;var te;if(l)for(w=0;w<l.length;++w)b=l[w],E=b.marker,(b.to==null||(E.inclusiveRight?b.to>=c:b.to>c)||b.from==c&&E.type=="bookmark"&&(!d||b.marker.insertLeft))&&(J=b.from==null||(E.inclusiveLeft?b.from<=c:b.from<c),(te||(te=[])).push(new ki(E,J?null:b.from-c,b.to==null?null:b.to-c)));if(l=s.text.length==1,c=G(s.text).length+(l?i:0),u)for(d=0;d<u.length;++d)w=u[d],w.to==null&&(b=ii(te,w.marker),b?l&&(w.to=b.to==null?null:b.to+c):w.to=i);if(te)for(i=0;i<te.length;++i)d=te[i],d.to!=null&&(d.to+=c),d.from==null?ii(u,d.marker)||(d.from=c,l&&(u||(u=[])).push(d)):(d.from+=c,l&&(u||(u=[])).push(d));if(u&&(u=Is(u)),te&&te!=u&&(te=Is(te)),i=[u],!l){s=s.text.length-2;var ne;if(0<s&&u)for(l=0;l<u.length;++l)u[l].to==null&&(ne||(ne=[])).push(new ki(u[l].marker,null,null));for(u=0;u<s;++u)i.push(ne);i.push(te)}return i}function Is(i){for(var s=0;s<i.length;++s){var u=i[s];u.from!=null&&u.from==u.to&&u.marker.clearWhenEmpty!==!1&&i.splice(s--,1)}return i.length?i:null}function lr(i,s,u){var l=null;if(i.iter(s.line,u.line+1,function(W){if(W.markedSpans)for(var te=0;te<W.markedSpans.length;++te){var ne=W.markedSpans[te].marker;!ne.readOnly||l&&S(l,ne)!=-1||(l||(l=[])).push(ne)}}),!l)return null;for(i=[{from:s,to:u}],s=0;s<l.length;++s){u=l[s];for(var c=u.find(0),d=0;d<i.length;++d){var w=i[d];if(!(0>Te(w.to,c.from)||0<Te(w.from,c.to))){var b=[d,1],E=Te(w.from,c.from),J=Te(w.to,c.to);(0>E||!u.inclusiveLeft&&!E)&&b.push({from:w.from,to:c.from}),(0<J||!u.inclusiveRight&&!J)&&b.push({from:c.to,to:w.to}),i.splice.apply(i,b),d+=b.length-3}}}return i}function ua(i){var s=i.markedSpans;if(s){for(var u=0;u<s.length;++u)s[u].marker.detachLine(i);i.markedSpans=null}}function Js(i,s){if(s){for(var u=0;u<s.length;++u)s[u].marker.attachLine(i);i.markedSpans=s}}function wr(i,s){var u=i.lines.length-s.lines.length;if(u!=0)return u;u=i.find();var l=s.find(),c=Te(u.from,l.from)||(i.inclusiveLeft?-1:0)-(s.inclusiveLeft?-1:0);return c?-c:(u=Te(u.to,l.to)||(i.inclusiveRight?1:0)-(s.inclusiveRight?1:0))?u:s.id-i.id}function Gt(i,s){if(i=cr&&i.markedSpans,i){for(var u,l=0;l<i.length;++l)if(u=i[l],u.marker.collapsed&&(s?u.from:u.to)==null&&(!c||0>wr(c,u.marker)))var c=u.marker}return c}function Xr(i,s,u,l,c){if(i=N(i,s),i=cr&&i.markedSpans)for(s=0;s<i.length;++s){var d=i[s];if(d.marker.collapsed){var w=d.marker.find(0),b=Te(w.from,u)||(d.marker.inclusiveLeft?-1:0)-(c.inclusiveLeft?-1:0),E=Te(w.to,l)||(d.marker.inclusiveRight?1:0)-(c.inclusiveRight?1:0);if(!(0<=b&&0>=E||0>=b&&0<=E)&&(0>=b&&(d.marker.inclusiveRight&&c.inclusiveLeft?0<=Te(w.to,u):0<Te(w.to,u))||0<=b&&(d.marker.inclusiveRight&&c.inclusiveLeft?0>=Te(w.from,l):0>Te(w.from,l))))return!0}}}function ui(i){for(var s;s=Gt(i,!0);)i=s.find(-1,!0).line;return i}function kn(i,s){i=N(i,s);var u=ui(i);return i==u?s:oe(u)}function fa(i,s){if(s>i.lastLine())return s;var u=N(i,s);if(!fi(i,u))return s;for(;i=Gt(u,!1);)u=i.find(1,!0).line;return oe(u)+1}function fi(i,s){var u=cr&&s.markedSpans;if(u){for(var l,c=0;c<u.length;++c)if(l=u[c],l.marker.collapsed&&(l.from==null||!l.marker.widgetNode&&l.from==0&&l.marker.inclusiveLeft&&An(i,s,l)))return!0}}function An(i,s,u){if(u.to==null)return s=u.marker.find(1,!0),An(i,s.line,ii(s.line.markedSpans,u.marker));if(u.marker.inclusiveRight&&u.to==s.text.length)return!0;for(var l,c=0;c<s.markedSpans.length;++c)if(l=s.markedSpans[c],l.marker.collapsed&&!l.marker.widgetNode&&l.from==u.to&&(l.to==null||l.to!=u.from)&&(l.marker.inclusiveLeft||u.marker.inclusiveRight)&&An(i,s,l))return!0}function gi(i){i=ui(i);for(var s=0,u=i.parent,l=0;l<u.lines.length;++l){var c=u.lines[l];if(c==i)break;s+=c.height}for(i=u.parent;i;u=i,i=u.parent)for(l=0;l<i.children.length&&(c=i.children[l],c!=u);++l)s+=c.height;return s}function br(i){if(i.height==0)return 0;for(var s=i.text.length,u,l=i;u=Gt(l,!0);)u=u.find(0,!0),l=u.from.line,s+=u.from.ch-u.to.ch;for(l=i;u=Gt(l,!1);)i=u.find(0,!0),s-=l.text.length-i.from.ch,l=i.to.line,s+=l.text.length-i.to.ch;return s}function Ns(i){var s=i.display;i=i.doc,s.maxLine=N(i,i.first),s.maxLineLength=br(s.maxLine),s.maxLineChanged=!0,i.iter(function(u){var l=br(u);l>s.maxLineLength&&(s.maxLineLength=l,s.maxLine=u)})}function Os(i,s){return!i||/^\s*$/.test(i)?null:(s=s.addModeClass?T_:C_,s[i]||(s[i]=i.replace(/\S+/g,"cm-$&")))}function ca(i,s){var u=h("span",null,null,Kt?"padding-right: .1px":null);u={pre:h("pre",[u],"CodeMirror-line"),content:u,col:0,pos:0,cm:i,trailingSpace:!1,splitSpaces:i.getOption("lineWrapping")},s.measure={};for(var l=0;l<=(s.rest?s.rest.length:0);l++){var c=l?s.rest[l-1]:s.line,d=void 0;u.pos=0,u.addToken=xr;var w=i.display.measure;if(Ku!=null)w=Ku;else{var b=a(w,document.createTextNode("AخA")),E=to(b,0,1).getBoundingClientRect();b=to(b,1,2).getBoundingClientRect(),o(w),w=E&&E.left!=E.right?Ku=3>b.right-E.right:!1}w&&(d=ie(c,i.doc.direction))&&(u.addToken=pa(u.addToken,d)),u.map=[];var J=s!=i.display.externalMeasured&&oe(c);e:{var W=b=E=w=void 0,te=void 0,ne=void 0,se=void 0;d=u,J=he(i,c,J);var ge=c.markedSpans,Ee=c.text,je=0;if(ge)for(var Rt=Ee.length,Je=0,ct=1,at="",pt=0;;){if(pt==Je){te=W=b=ne="",E=w=null,pt=1/0;for(var vt=[],We=void 0,dt=0;dt<ge.length;++dt){var et=ge[dt],lt=et.marker;if(lt.type=="bookmark"&&et.from==Je&<.widgetNode)vt.push(lt);else if(et.from<=Je&&(et.to==null||et.to>Je||lt.collapsed&&et.to==Je&&et.from==Je)){if(et.to!=null&&et.to!=Je&&pt>et.to&&(pt=et.to,W=""),lt.className&&(te+=" "+lt.className),lt.css&&(ne=(ne?ne+";":"")+lt.css),lt.startStyle&&et.from==Je&&(b+=" "+lt.startStyle),lt.endStyle&&et.to==pt&&(We||(We=[])).push(lt.endStyle,et.to),lt.title&&((w||(w={})).title=lt.title),lt.attributes)for(var Vt in lt.attributes)(w||(w={}))[Vt]=lt.attributes[Vt];lt.collapsed&&(!E||0>wr(E.marker,lt))&&(E=et)}else et.from>Je&&pt>et.from&&(pt=et.from)}if(We)for(dt=0;dt<We.length;dt+=2)We[dt+1]==pt&&(W+=" "+We[dt]);if(!E||E.from==Je)for(We=0;We<vt.length;++We)qr(d,0,vt[We]);if(E&&(E.from||0)==Je){if(qr(d,(E.to==null?Rt+1:E.to)-Je,E.marker,E.from==null),E.to==null)break e;E.to==Je&&(E=!1)}}if(Je>=Rt)break;for(vt=Math.min(Rt,pt);;){if(at){if(We=Je+at.length,E||(dt=We>vt?at.slice(0,vt-Je):at,d.addToken(d,dt,se?se+te:te,b,Je+dt.length==pt?W:"",ne,w)),We>=vt){at=at.slice(vt-Je),Je=vt;break}Je=We,b=""}at=Ee.slice(je,je=J[ct++]),se=Os(J[ct++],d.cm.options)}}else for(w=1;w<J.length;w+=2)d.addToken(d,Ee.slice(je,je=J[w]),Os(J[w+1],d.cm.options))}c.styleClasses&&(c.styleClasses.bgClass&&(u.bgClass=y(c.styleClasses.bgClass,u.bgClass||"")),c.styleClasses.textClass&&(u.textClass=y(c.styleClasses.textClass,u.textClass||""))),u.map.length==0&&(c=u.map,d=c.push,w=u.content,E=w.appendChild,b=i.display.measure,Wu==null&&(W=f("span",""),a(b,f("span",[W,document.createTextNode("x")])),b.firstChild.offsetHeight!=0&&(Wu=1>=W.offsetWidth&&2<W.offsetHeight&&!(qe&&8>_t))),b=Wu?f("span",""):f("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px"),b.setAttribute("cm-text",""),d.call(c,0,0,E.call(w,b))),l==0?(s.measure.map=u.map,s.measure.cache={}):((s.measure.maps||(s.measure.maps=[])).push(u.map),(s.measure.caches||(s.measure.caches=[])).push({}))}return Kt&&(Vt=u.content.lastChild,/\bcm-tab\b/.test(Vt.className)||Vt.querySelector&&Vt.querySelector(".cm-tab"))&&(u.content.className="cm-tab-wrap-hack"),X(i,"renderLine",i,s.line,u.pre),u.pre.className&&(u.textClass=y(u.pre.className,u.textClass||"")),u}function ha(i){var s=f("span","•","cm-invalidchar");return s.title="\\u"+i.charCodeAt(0).toString(16),s.setAttribute("aria-label",s.title),s}function xr(i,s,u,l,c,d,w){if(s){if(i.splitSpaces){var b=i.trailingSpace;if(1<s.length&&!/ /.test(s))b=s;else{for(var E="",J=0;J<s.length;J++){var W=s.charAt(J);W!=" "||!b||J!=s.length-1&&s.charCodeAt(J+1)!=32||(W=" "),E+=W,b=W==" "}b=E}}else b=s;if(E=b,J=i.cm.state.specialChars,W=!1,J.test(s)){b=document.createDocumentFragment();for(var te=0;;){J.lastIndex=te;var ne=J.exec(s),se=ne?ne.index-te:s.length-te;if(se){var ge=document.createTextNode(E.slice(te,te+se));qe&&9>_t?b.appendChild(f("span",[ge])):b.appendChild(ge),i.map.push(i.pos,i.pos+se,ge),i.col+=se,i.pos+=se}if(!ne)break;te+=se+1,ne[0]==" "?(ne=i.cm.options.tabSize,ne-=i.col%ne,se=b.appendChild(f("span",L(ne),"cm-tab")),se.setAttribute("role","presentation"),se.setAttribute("cm-text"," "),i.col+=ne):(ne[0]=="\r"||ne[0]==`
|
||
`?(se=b.appendChild(f("span",ne[0]=="\r"?"␍":"","cm-invalidchar")),se.setAttribute("cm-text",ne[0])):(se=i.cm.options.specialCharPlaceholder(ne[0]),se.setAttribute("cm-text",ne[0]),qe&&9>_t?b.appendChild(f("span",[se])):b.appendChild(se)),i.col+=1),i.map.push(i.pos,i.pos+1,se),i.pos++}}else i.col+=s.length,b=document.createTextNode(E),i.map.push(i.pos,i.pos+s.length,b),qe&&9>_t&&(W=!0),i.pos+=s.length;if(i.trailingSpace=E.charCodeAt(s.length-1)==32,u||l||c||W||d||w){if(s=u||"",l&&(s+=l),c&&(s+=c),l=f("span",[b],s,d),w)for(var Ee in w)w.hasOwnProperty(Ee)&&Ee!="style"&&Ee!="class"&&l.setAttribute(Ee,w[Ee]);return i.content.appendChild(l)}i.content.appendChild(b)}}function pa(i,s){return function(u,l,c,d,w,b,E){c=c?c+" cm-force-border":"cm-force-border";for(var J=u.pos,W=J+l.length;;){for(var te=void 0,ne=0;ne<s.length&&(te=s[ne],!(te.to>J&&te.from<=J));ne++);if(te.to>=W)return i(u,l,c,d,w,b,E);i(u,l.slice(0,te.to-J),c,d,null,b,E),d=null,l=l.slice(te.to-J),J=te.to}}}function qr(i,s,u,l){var c=!l&&u.widgetNode;c&&i.map.push(i.pos,i.pos+s,c),!l&&i.cm.display.input.needsContentAttribute&&(c||(c=i.content.appendChild(document.createElement("span"))),c.setAttribute("cm-marker",u.id)),c&&(i.cm.display.input.setUneditable(c),i.content.appendChild(c)),i.pos+=s,i.trailingSpace=!1}function zi(i,s,u){for(var l=this.line=s,c;l=Gt(l,!1);)l=l.find(1,!0).line,(c||(c=[])).push(l);this.size=(this.rest=c)?oe(G(this.rest))-u+1:1,this.node=this.text=null,this.hidden=fi(i,s)}function en(i,s,u){var l=[],c;for(c=s;c<u;)s=new zi(i.doc,N(i.doc,c),c),c+=s.size,l.push(s);return l}function mt(i,s){if(i=i.ownsGroup)try{var u=i.delayedCallbacks,l=0;do{for(;l<u.length;l++)u[l].call(null);for(var c=0;c<i.ops.length;c++){var d=i.ops[c];if(d.cursorActivityHandlers)for(;d.cursorActivityCalled<d.cursorActivityHandlers.length;)d.cursorActivityHandlers[d.cursorActivityCalled++].call(null,d.cm)}}while(l<u.length)}finally{Qn=null,s(i)}}function bt(i,s){var u=i._handlers&&i._handlers[s]||ja;if(u.length){var l=Array.prototype.slice.call(arguments,2);if(Qn)var c=Qn.delayedCallbacks;else so?c=so:(c=so=[],setTimeout(da,0));for(var d=function(b){c.push(function(){return u[b].apply(null,l)})},w=0;w<u.length;++w)d(w)}}function da(){var i=so;so=null;for(var s=0;s<i.length;++s)i[s]()}function Bs(i,s,u,l){for(var c=0;c<s.changes.length;c++){var d=s.changes[c];if(d=="text"){d=i;var w=s,b=w.text.className,E=Sr(d,w);w.text==w.node&&(w.node=E.pre),w.text.parentNode.replaceChild(E.pre,w.text),w.text=E.pre,E.bgClass!=w.bgClass||E.textClass!=w.textClass?(w.bgClass=E.bgClass,w.textClass=E.textClass,Mr(d,w)):b&&(w.text.className=b)}else if(d=="gutter")ga(i,s,u,l);else if(d=="class")Mr(i,s);else if(d=="widget"){d=i,w=s,b=l,w.alignable&&(w.alignable=null),E=n("CodeMirror-linewidget");for(var J=w.node.firstChild,W;J;J=W)W=J.nextSibling,E.test(J.className)&&w.node.removeChild(J);Cr(d,w,b)}}s.changes=null}function tn(i){return i.node==i.text&&(i.node=f("div",null,null,"position: relative"),i.text.parentNode&&i.text.parentNode.replaceChild(i.node,i.text),i.node.appendChild(i.text),qe&&8>_t&&(i.node.style.zIndex=2)),i.node}function Sr(i,s){var u=i.display.externalMeasured;return u&&u.line==s.line?(i.display.externalMeasured=null,s.measure=u.measure,u.built):ca(i,s)}function Mr(i,s){var u=s.bgClass?s.bgClass+" "+(s.line.bgClass||""):s.line.bgClass;if(u&&(u+=" CodeMirror-linebackground"),s.background)u?s.background.className=u:(s.background.parentNode.removeChild(s.background),s.background=null);else if(u){var l=tn(s);s.background=l.insertBefore(f("div",null,u),l.firstChild),i.display.input.setUneditable(s.background)}s.line.wrapClass?tn(s).className=s.line.wrapClass:s.node!=s.text&&(s.node.className=""),s.text.className=(s.textClass?s.textClass+" "+(s.line.textClass||""):s.line.textClass)||""}function ga(i,s,u,l){if(s.gutter&&(s.node.removeChild(s.gutter),s.gutter=null),s.gutterBackground&&(s.node.removeChild(s.gutterBackground),s.gutterBackground=null),s.line.gutterClass){var c=tn(s);s.gutterBackground=f("div",null,"CodeMirror-gutter-background "+s.line.gutterClass,"left: "+(i.options.fixedGutter?l.fixedPos:-l.gutterTotalWidth)+"px; width: "+l.gutterTotalWidth+"px"),i.display.input.setUneditable(s.gutterBackground),c.insertBefore(s.gutterBackground,s.text)}if(c=s.line.gutterMarkers,i.options.lineNumbers||c){var d=tn(s),w=s.gutter=f("div",null,"CodeMirror-gutter-wrapper","left: "+(i.options.fixedGutter?l.fixedPos:-l.gutterTotalWidth)+"px");if(w.setAttribute("aria-hidden","true"),i.display.input.setUneditable(w),d.insertBefore(w,s.text),s.line.gutterClass&&(w.className+=" "+s.line.gutterClass),!i.options.lineNumbers||c&&c["CodeMirror-linenumbers"]||(s.lineNumber=w.appendChild(f("div",Ae(i.options,u),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+l.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+i.display.lineNumInnerWidth+"px"))),c)for(s=0;s<i.display.gutterSpecs.length;++s)u=i.display.gutterSpecs[s].className,(d=c.hasOwnProperty(u)&&c[u])&&w.appendChild(f("div",[d],"CodeMirror-gutter-elt","left: "+l.gutterLeft[u]+"px; width: "+l.gutterWidth[u]+"px"))}}function Fs(i,s,u,l){var c=Sr(i,s);return s.text=s.node=c.pre,c.bgClass&&(s.bgClass=c.bgClass),c.textClass&&(s.textClass=c.textClass),Mr(i,s),ga(i,s,u,l),Cr(i,s,l),s.node}function Cr(i,s,u){if(ya(i,s.line,s,u,!0),s.rest)for(var l=0;l<s.rest.length;l++)ya(i,s.rest[l],s,u,!1)}function ya(i,s,u,l,c){if(s.widgets){var d=tn(u),w=0;for(s=s.widgets;w<s.length;++w){var b=s[w],E=f("div",[b.node],"CodeMirror-linewidget"+(b.className?" "+b.className:""));b.handleMouseEvents||E.setAttribute("cm-ignore-events","true");var J=b,W=E,te=l;if(J.noHScroll){(u.alignable||(u.alignable=[])).push(W);var ne=te.wrapperWidth;W.style.left=te.fixedPos+"px",J.coverGutter||(ne-=te.gutterTotalWidth,W.style.paddingLeft=te.gutterTotalWidth+"px"),W.style.width=ne+"px"}J.coverGutter&&(W.style.zIndex=5,W.style.position="relative",J.noHScroll||(W.style.marginLeft=-te.gutterTotalWidth+"px")),i.display.input.setUneditable(E),c&&b.above?d.insertBefore(E,u.gutter||u.text):d.appendChild(E),bt(b,"redraw")}}}function I(i){if(i.height!=null)return i.height;var s=i.doc.cm;if(!s)return 0;if(!p(document.body,i.node)){var u="position: relative;";i.coverGutter&&(u+="margin-left: -"+s.display.gutters.offsetWidth+"px;"),i.noHScroll&&(u+="width: "+s.display.wrapper.clientWidth+"px;"),a(s.display.measure,f("div",[i.node],null,u))}return i.height=i.node.parentNode.offsetHeight}function Z(i,s){for(s=s.target||s.srcElement;s!=i.wrapper;s=s.parentNode)if(!s||s.nodeType==1&&s.getAttribute("cm-ignore-events")=="true"||s.parentNode==i.sizer&&s!=i.mover)return!0}function de(i){return i.mover.offsetHeight-i.lineSpace.offsetHeight}function Se(i){if(i.cachedPaddingH)return i.cachedPaddingH;var s=a(i.measure,f("pre","x","CodeMirror-line-like"));return s=window.getComputedStyle?window.getComputedStyle(s):s.currentStyle,s={left:parseInt(s.paddingLeft),right:parseInt(s.paddingRight)},isNaN(s.left)||isNaN(s.right)||(i.cachedPaddingH=s),s}function Oe(i){return 50-i.display.nativeBarWidth}function Pe(i){return i.display.scroller.clientWidth-Oe(i)-i.display.barWidth}function Tt(i){return i.display.scroller.clientHeight-Oe(i)-i.display.barHeight}function Rn(i,s,u){if(i.line==s)return{map:i.measure.map,cache:i.measure.cache};if(i.rest){for(var l=0;l<i.rest.length;l++)if(i.rest[l]==s)return{map:i.measure.maps[l],cache:i.measure.caches[l]};for(s=0;s<i.rest.length;s++)if(oe(i.rest[s])>u)return{map:i.measure.maps[s],cache:i.measure.caches[s],before:!0}}}function hu(i,s){if(s>=i.display.viewFrom&&s<i.display.viewTo)return i.display.view[sn(i,s)];if((i=i.display.externalMeasured)&&s>=i.lineN&&s<i.lineN+i.size)return i}function rn(i,s){var u=oe(s),l=hu(i,u);if(l&&!l.text?l=null:l&&l.changes&&(Bs(i,l,u,mu(i)),i.curOp.forceUpdate=!0),!l){var c=ui(s);l=oe(c),c=i.display.externalMeasured=new zi(i.doc,c,l),c.lineN=l,l=c.built=ca(i,c),c.text=l.pre,a(i.display.lineMeasure,l.pre),l=c}return i=Rn(l,s,u),{line:s,view:l,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Ai(i,s,u,l,c){s.before&&(u=-1);var d=u+(l||"");if(s.cache.hasOwnProperty(d))i=s.cache[d];else{if(s.rect||(s.rect=s.view.text.getBoundingClientRect()),!s.hasHeights){var w=s.view,b=s.rect,E=i.options.lineWrapping,J=E&&Pe(i);if(!w.measure.heights||E&&w.measure.width!=J){var W=w.measure.heights=[];if(E)for(w.measure.width=J,w=w.text.firstChild.getClientRects(),E=0;E<w.length-1;E++){J=w[E];var te=w[E+1];2<Math.abs(J.bottom-te.bottom)&&W.push((J.bottom+te.top)/2-b.top)}W.push(b.bottom-b.top)}s.hasHeights=!0}if(W=l,w=Nh(s.map,u,W),l=w.node,b=w.start,E=w.end,u=w.collapse,l.nodeType==3){for(var ne=0;4>ne;ne++){for(;b&&q(s.line.text.charAt(w.coverStart+b));)--b;for(;w.coverStart+E<w.coverEnd&&q(s.line.text.charAt(w.coverStart+E));)++E;if(qe&&9>_t&&b==0&&E==w.coverEnd-w.coverStart)var se=l.parentNode.getBoundingClientRect();else{if(se=to(l,b,E).getClientRects(),E=nd,W=="left")for(J=0;J<se.length&&(E=se[J]).left==E.right;J++);else for(J=se.length-1;0<=J&&(E=se[J]).left==E.right;J--);se=E}if(se.left||se.right||b==0)break;E=b,--b,u="right"}qe&&11>_t&&((ne=!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI)||(zu!=null?ne=zu:(W=a(i.display.measure,f("span","x")),ne=W.getBoundingClientRect(),W=to(W,0,1).getBoundingClientRect(),ne=zu=1<Math.abs(ne.left-W.left)),ne=!ne),ne||(ne=screen.logicalXDPI/screen.deviceXDPI,W=screen.logicalYDPI/screen.deviceYDPI,se={left:se.left*ne,right:se.right*ne,top:se.top*W,bottom:se.bottom*W}))}else 0<b&&(u=W="right"),se=i.options.lineWrapping&&1<(ne=l.getClientRects()).length?ne[W=="right"?ne.length-1:0]:l.getBoundingClientRect();for(!(qe&&9>_t)||b||se&&(se.left||se.right)||(se=(se=l.parentNode.getClientRects()[0])?{left:se.left,right:se.left+Un(i.display),top:se.top,bottom:se.bottom}:nd),l=se.top-s.rect.top,b=se.bottom-s.rect.top,ne=(l+b)/2,W=s.view.measure.heights,w=0;w<W.length-1&&!(ne<W[w]);w++);u={left:(u=="right"?se.right:se.left)-s.rect.left,right:(u=="left"?se.left:se.right)-s.rect.left,top:w?W[w-1]:0,bottom:W[w]},se.left||se.right||(u.bogus=!0),i.options.singleCursorHeightPerLine||(u.rtop=l,u.rbottom=b),i=u,i.bogus||(s.cache[d]=i)}return{left:i.left,right:i.right,top:c?i.rtop:i.top,bottom:c?i.rbottom:i.bottom}}function Nh(i,s,u){for(var l,c,d,w,b,E,J=0;J<i.length;J+=3)if(b=i[J],E=i[J+1],s<b?(c=0,d=1,w="left"):s<E?(c=s-b,d=c+1):(J==i.length-3||s==E&&i[J+3]>s)&&(d=E-b,c=d-1,s>=E&&(w="right")),c!=null){if(l=i[J+2],b==E&&u==(l.insertLeft?"left":"right")&&(w=u),u=="left"&&c==0)for(;J&&i[J-2]==i[J-3]&&i[J-1].insertLeft;)l=i[(J-=3)+2],w="left";if(u=="right"&&c==E-b)for(;J<i.length-3&&i[J+3]==i[J+4]&&!i[J+5].insertLeft;)l=i[(J+=3)+2],w="right";break}return{node:l,start:c,end:d,collapse:w,coverStart:b,coverEnd:E}}function Oh(i){if(i.measure&&(i.measure.cache={},i.measure.heights=null,i.rest))for(var s=0;s<i.rest.length;s++)i.measure.caches[s]={}}function Bh(i){i.display.externalMeasure=null,o(i.display.lineMeasure);for(var s=0;s<i.display.view.length;s++)Oh(i.display.view[s])}function Ds(i){Bh(i),i.display.cachedCharWidth=i.display.cachedTextHeight=i.display.cachedPaddingH=null,i.options.lineWrapping||(i.display.maxLineChanged=!0),i.display.lineNumChars=null}function Fh(i){return Rr&&Ba?-(i.body.getBoundingClientRect().left-parseInt(getComputedStyle(i.body).marginLeft)):i.defaultView.pageXOffset||(i.documentElement||i.body).scrollLeft}function Dh(i){return Rr&&Ba?-(i.body.getBoundingClientRect().top-parseInt(getComputedStyle(i.body).marginTop)):i.defaultView.pageYOffset||(i.documentElement||i.body).scrollTop}function pu(i){i=ui(i).widgets;var s=0;if(i)for(var u=0;u<i.length;++u)i[u].above&&(s+=I(i[u]));return s}function ma(i,s,u,l,c){return c||(c=pu(s),u.top+=c,u.bottom+=c),l=="line"||(l||(l="local"),s=gi(s),s=l=="local"?s+i.display.lineSpace.offsetTop:s-i.display.viewOffset,(l=="page"||l=="window")&&(c=i.display.lineSpace.getBoundingClientRect(),s+=c.top+(l=="window"?0:Dh(m(i))),i=c.left+(l=="window"?0:Fh(m(i))),u.left+=i,u.right+=i),u.top+=s,u.bottom+=s),u}function jh(i,s,u){if(u=="div")return s;var l=s.left;return s=s.top,u=="page"?(l-=Fh(m(i)),s-=Dh(m(i))):u!="local"&&u||(u=i.display.sizer.getBoundingClientRect(),l+=u.left,s+=u.top),i=i.display.lineSpace.getBoundingClientRect(),{left:l-i.left,top:s-i.top}}function va(i,s,u,l,c){l||(l=N(i.doc,s.line));var d=l;return s=s.ch,l=Ai(i,rn(i,l),s,c),ma(i,d,l,u)}function Ri(i,s,u,l,c,d){function w(ne,se){return ne=Ai(i,c,ne,se?"right":"left",d),se?ne.left=ne.right:ne.right=ne.left,ma(i,l,ne,u)}function b(ne,se,ge){return w(ge?ne-1:ne,E[se].level==1!=ge)}l=l||N(i.doc,s.line),c||(c=rn(i,l));var E=ie(l,i.doc.direction),J=s.ch;if(s=s.sticky,J>=l.text.length?(J=l.text.length,s="before"):0>=J&&(J=0,s="after"),!E)return w(s=="before"?J-1:J,s=="before");var W=re(E,J,s),te=no;return W=b(J,W,s=="before"),te!=null&&(W.other=b(J,te,s!="before")),W}function Ph(i,s){var u=0;return s=C(i.doc,s),i.options.lineWrapping||(u=Un(i.display)*s.ch),s=N(i.doc,s.line),i=gi(s)+i.display.lineSpace.offsetTop,{left:u,right:u,top:i,bottom:i+s.height}}function du(i,s,u,l,c){return i=pe(i,s,u),i.xRel=c,l&&(i.outside=l),i}function gu(i,s,u){var l=i.doc;if(u+=i.display.viewOffset,0>u)return du(l.first,0,null,-1,-1);var c=_e(l,u),d=l.first+l.size-1;if(c>d)return du(l.first+l.size-1,N(l,d).text.length,null,1,1);0>s&&(s=0);for(var w=N(l,c);;){d=Jv(i,w,c,s,u);var b=void 0,E=d.ch+(0<d.xRel||0<d.outside?1:0);if(w=cr&&w.markedSpans)for(var J=0;J<w.length;++J){var W=w[J];W.marker.collapsed&&(W.from==null||W.from<E)&&(W.to==null||W.to>E)&&(!b||0>wr(b,W.marker))&&(b=W.marker)}if(!b||(d=b.find(1),d.line==c))return d;w=N(l,c=d.line)}}function Gh(i,s,u,l){l-=pu(s),s=s.text.length;var c=ce(function(d){return Ai(i,u,d-1).bottom<=l},s,0);return s=ce(function(d){return Ai(i,u,d).top>l},c,s),{begin:c,end:s}}function Wh(i,s,u,l){return u||(u=rn(i,s)),l=ma(i,s,Ai(i,u,l),"line").top,Gh(i,s,u,l)}function yu(i,s,u,l){return i.bottom<=u?!1:i.top>u?!0:(l?i.left:i.right)>s}function Jv(i,s,u,l,c){c-=gi(s);var d=rn(i,s),w=pu(s),b=0,E=s.text.length,J=!0,W=ie(s,i.doc.direction);W&&(W=(i.options.lineWrapping?Ov:Nv)(i,s,u,d,W,l,c),b=(J=W.level!=1)?W.from:W.to-1,E=J?W.to:W.from-1);var te=null,ne=null;W=ce(function(ge){var Ee=Ai(i,d,ge);return Ee.top+=w,Ee.bottom+=w,yu(Ee,l,c,!1)?(Ee.top<=c&&Ee.left<=l&&(te=ge,ne=Ee),!0):!1},b,E);var se=!1;return ne?(b=l-ne.left<ne.right-l,J=b==J,W=te+(J?0:1),J=J?"after":"before",b=b?ne.left:ne.right):(J||W!=E&&W!=b||W++,J=W==0?"after":W==s.text.length?"before":Ai(i,d,W-(J?1:0)).bottom+w<=c==J?"after":"before",se=Ri(i,pe(u,W,J),"line",s,d),b=se.left,se=c<se.top?-1:c>=se.bottom?1:0),W=$(s.text,W,1),du(u,W,J,se,l-b)}function Nv(i,s,u,l,c,d,w){var b=ce(function(W){W=c[W];var te=W.level!=1;return yu(Ri(i,pe(u,te?W.to:W.from,te?"before":"after"),"line",s,l),d,w,!0)},0,c.length-1),E=c[b];if(0<b){var J=E.level!=1;J=Ri(i,pe(u,J?E.from:E.to,J?"after":"before"),"line",s,l),yu(J,d,w,!0)&&J.top>w&&(E=c[b-1])}return E}function Ov(i,s,u,l,c,d,w){w=Gh(i,s,l,w),u=w.begin,w=w.end,/\s/.test(s.text.charAt(w-1))&&w--;for(var b=s=null,E=0;E<c.length;E++){var J=c[E];if(!(J.from>=w||J.to<=u)){var W=Ai(i,l,J.level!=1?Math.min(w,J.to)-1:Math.max(u,J.from)).right;W=W<d?d-W+1e9:W-d,(!s||b>W)&&(s=J,b=W)}}return s||(s=c[c.length-1]),s.from<u&&(s={from:u,to:s.to,level:s.level}),s.to>w&&(s={from:s.from,to:w,level:s.level}),s}function Ln(i){if(i.cachedTextHeight!=null)return i.cachedTextHeight;if(cn==null){cn=f("pre",null,"CodeMirror-line-like");for(var s=0;49>s;++s)cn.appendChild(document.createTextNode("x")),cn.appendChild(f("br"));cn.appendChild(document.createTextNode("x"))}return a(i.measure,cn),s=cn.offsetHeight/50,3<s&&(i.cachedTextHeight=s),o(i.measure),s||1}function Un(i){if(i.cachedCharWidth!=null)return i.cachedCharWidth;var s=f("span","xxxxxxxxxx"),u=f("pre",[s],"CodeMirror-line-like");return a(i.measure,u),s=s.getBoundingClientRect(),s=(s.right-s.left)/10,2<s&&(i.cachedCharWidth=s),s||10}function mu(i){for(var s=i.display,u={},l={},c=s.gutters.clientLeft,d=s.gutters.firstChild,w=0;d;d=d.nextSibling,++w){var b=i.display.gutterSpecs[w].className;u[b]=d.offsetLeft+d.clientLeft+c,l[b]=d.clientWidth}return{fixedPos:vu(s),gutterTotalWidth:s.gutters.offsetWidth,gutterLeft:u,gutterWidth:l,wrapperWidth:s.wrapper.clientWidth}}function vu(i){return i.scroller.getBoundingClientRect().left-i.sizer.getBoundingClientRect().left}function Kh(i){var s=Ln(i.display),u=i.options.lineWrapping,l=u&&Math.max(5,i.display.scroller.clientWidth/Un(i.display)-3);return function(c){if(fi(i.doc,c))return 0;var d=0;if(c.widgets)for(var w=0;w<c.widgets.length;w++)c.widgets[w].height&&(d+=c.widgets[w].height);return u?d+(Math.ceil(c.text.length/l)||1)*s:d+s}}function _u(i){var s=i.doc,u=Kh(i);s.iter(function(l){var c=u(l);c!=l.height&&z(l,c)})}function nn(i,s,u,l){var c=i.display;if(!u&&(s.target||s.srcElement).getAttribute("cm-not-content")=="true")return null;u=c.lineSpace.getBoundingClientRect();try{var d=s.clientX-u.left,w=s.clientY-u.top}catch{return null}s=gu(i,d,w);var b;return l&&0<s.xRel&&(b=N(i.doc,s.line).text).length==s.ch&&(l=R(b,b.length,i.options.tabSize)-b.length,s=pe(s.line,Math.max(0,Math.round((d-Se(i.display).left)/Un(i.display))-l))),s}function sn(i,s){if(s>=i.display.viewTo||(s-=i.display.viewFrom,0>s))return null;i=i.display.view;for(var u=0;u<i.length;u++)if(s-=i[u].size,0>s)return u}function Ht(i,s,u,l){s==null&&(s=i.doc.first),u==null&&(u=i.doc.first+i.doc.size),l||(l=0);var c=i.display;if(l&&u<c.viewTo&&(c.updateLineNumbers==null||c.updateLineNumbers>s)&&(c.updateLineNumbers=s),i.curOp.viewChanged=!0,s>=c.viewTo)cr&&kn(i.doc,s)<c.viewTo&&Er(i);else if(u<=c.viewFrom)cr&&fa(i.doc,u+l)>c.viewFrom?Er(i):(c.viewFrom+=l,c.viewTo+=l);else if(s<=c.viewFrom&&u>=c.viewTo)Er(i);else if(s<=c.viewFrom){var d=_a(i,u,u+l,1);d?(c.view=c.view.slice(d.index),c.viewFrom=d.lineN,c.viewTo+=l):Er(i)}else if(u>=c.viewTo)(d=_a(i,s,s,-1))?(c.view=c.view.slice(0,d.index),c.viewTo=d.lineN):Er(i);else{d=_a(i,s,s,-1);var w=_a(i,u,u+l,1);d&&w?(c.view=c.view.slice(0,d.index).concat(en(i,d.lineN,w.lineN)).concat(c.view.slice(w.index)),c.viewTo+=l):Er(i)}(i=c.externalMeasured)&&(u<i.lineN?i.lineN+=l:s<i.lineN+i.size&&(c.externalMeasured=null))}function Tr(i,s,u){i.curOp.viewChanged=!0;var l=i.display,c=i.display.externalMeasured;c&&s>=c.lineN&&s<c.lineN+c.size&&(l.externalMeasured=null),s<l.viewFrom||s>=l.viewTo||(i=l.view[sn(i,s)],i.node!=null&&(i=i.changes||(i.changes=[]),S(i,u)==-1&&i.push(u)))}function Er(i){i.display.viewFrom=i.display.viewTo=i.doc.first,i.display.view=[],i.display.viewOffset=0}function _a(i,s,u,l){var c=sn(i,s),d=i.display.view;if(!cr||u==i.doc.first+i.doc.size)return{index:c,lineN:u};for(var w=i.display.viewFrom,b=0;b<c;b++)w+=d[b].size;if(w!=s){if(0<l){if(c==d.length-1)return null;s=w+d[c].size-s,c++}else s=w-s;u+=s}for(;kn(i.doc,u)!=u;){if(c==(0>l?0:d.length-1))return null;u+=l*d[c-(0>l?1:0)].size,c+=l}return{index:c,lineN:u}}function Vh(i){i=i.display.view;for(var s=0,u=0;u<i.length;u++){var l=i[u];l.hidden||l.node&&!l.changes||++s}return s}function js(i){i.display.input.showSelection(i.display.input.prepareSelection())}function zh(i,s){s===void 0&&(s=!0);var u=i.doc,l={},c=l.cursors=document.createDocumentFragment(),d=l.selection=document.createDocumentFragment(),w=i.options.$customCursor;w&&(s=!0);for(var b=0;b<u.sel.ranges.length;b++)if(s||b!=u.sel.primIndex){var E=u.sel.ranges[b];if(!(E.from().line>=i.display.viewTo||E.to().line<i.display.viewFrom)){var J=E.empty();if(w){var W=w(i,E);W&&wu(i,W,c)}else(J||i.options.showCursorWhenSelecting)&&wu(i,E.head,c);J||Bv(i,E,d)}}return l}function wu(i,s,u){var l=Ri(i,s,"div",null,null,!i.options.singleCursorHeightPerLine),c=u.appendChild(f("div"," ","CodeMirror-cursor"));c.style.left=l.left+"px",c.style.top=l.top+"px",c.style.height=Math.max(0,l.bottom-l.top)*i.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(i.getWrapperElement().className)&&(s=va(i,s,"div",null,null),s=s.right-s.left,c.style.width=(0<s?s:i.defaultCharWidth())+"px"),l.other&&(i=u.appendChild(f("div"," ","CodeMirror-cursor CodeMirror-secondarycursor")),i.style.display="",i.style.left=l.other.left+"px",i.style.top=l.other.top+"px",i.style.height=.85*(l.other.bottom-l.other.top)+"px")}function wa(i,s){return i.top-s.top||i.left-s.left}function Bv(i,s,u){function l(se,ge,Ee,je){0>ge&&(ge=0),ge=Math.round(ge),je=Math.round(je),b.appendChild(f("div",null,"CodeMirror-selected","position: absolute; left: "+se+`px;
|
||
top: `+ge+"px; width: "+(Ee??W-se)+`px;
|
||
height: `+(je-ge)+"px"))}function c(se,ge,Ee){function je(We,dt){return va(i,pe(se,We),"div",Je,dt)}function Rt(We,dt,et){return We=Wh(i,Je,null,We),dt=dt=="ltr"==(et=="after")?"left":"right",et=et=="after"?We.begin:We.end-(/\s/.test(Je.text.charAt(We.end-1))?2:1),je(et,dt)[dt]}var Je=N(w,se),ct=Je.text.length,at,pt,vt=ie(Je,w.direction);return ye(vt,ge||0,Ee??ct,function(We,dt,et,lt){var Vt=et=="ltr",Xt=je(We,Vt?"left":"right"),hi=je(dt-1,Vt?"right":"left"),pn=ge==null&&We==0,dn=Ee==null&&dt==ct,$u=lt==0;lt=!vt||lt==vt.length-1,3>=hi.top-Xt.top?(dt=(te?pn:dn)&&$u?J:(Vt?Xt:hi).left,l(dt,Xt.top,((te?dn:pn)&<?W:(Vt?hi:Xt).right)-dt,Xt.bottom)):(Vt?(Vt=te&&pn&&$u?J:Xt.left,pn=te?W:Rt(We,et,"before"),We=te?J:Rt(dt,et,"after"),dn=te&&dn&<?W:hi.right):(Vt=te?Rt(We,et,"before"):J,pn=!te&&pn&&$u?W:Xt.right,We=!te&&dn&<?J:hi.left,dn=te?Rt(dt,et,"after"):W),l(Vt,Xt.top,pn-Vt,Xt.bottom),Xt.bottom<hi.top&&l(J,Xt.bottom,null,hi.top),l(We,hi.top,dn-We,hi.bottom)),(!at||0>wa(Xt,at))&&(at=Xt),0>wa(hi,at)&&(at=hi),(!pt||0>wa(Xt,pt))&&(pt=Xt),0>wa(hi,pt)&&(pt=hi)}),{start:at,end:pt}}var d=i.display,w=i.doc,b=document.createDocumentFragment(),E=Se(i.display),J=E.left,W=Math.max(d.sizerWidth,Pe(i)-d.sizer.offsetLeft)-E.right,te=w.direction=="ltr";if(d=s.from(),s=s.to(),d.line==s.line)c(d.line,d.ch,s.ch);else{var ne=N(w,d.line);E=N(w,s.line),E=ui(ne)==ui(E),d=c(d.line,d.ch,E?ne.text.length+1:null).end,s=c(s.line,E?0:null,s.ch).start,E&&(d.top<s.top-2?(l(d.right,d.top,null,d.bottom),l(J,s.top,s.left,s.bottom)):l(d.right,d.top,s.left-d.right,d.bottom)),d.bottom<s.top&&l(J,d.bottom,null,s.top)}u.appendChild(b)}function bu(i){if(i.state.focused){var s=i.display;clearInterval(s.blinker);var u=!0;s.cursorDiv.style.visibility="",0<i.options.cursorBlinkRate?s.blinker=setInterval(function(){i.hasFocus()||In(i),s.cursorDiv.style.visibility=(u=!u)?"":"hidden"},i.options.cursorBlinkRate):0>i.options.cursorBlinkRate&&(s.cursorDiv.style.visibility="hidden")}}function Qh(i){i.hasFocus()||(i.display.input.focus(),i.state.focused||Su(i))}function xu(i){i.state.delayingBlurEvent=!0,setTimeout(function(){i.state.delayingBlurEvent&&(i.state.delayingBlurEvent=!1,i.state.focused&&In(i))},100)}function Su(i,s){i.state.delayingBlurEvent&&!i.state.draggingText&&(i.state.delayingBlurEvent=!1),i.options.readOnly!="nocursor"&&(i.state.focused||(X(i,"focus",i,s),i.state.focused=!0,_(i.display.wrapper,"CodeMirror-focused"),i.curOp||i.display.selForContextMenu==i.doc.sel||(i.display.input.reset(),Kt&&setTimeout(function(){return i.display.input.reset(!0)},20)),i.display.input.receivedFocus()),bu(i))}function In(i,s){i.state.delayingBlurEvent||(i.state.focused&&(X(i,"blur",i,s),i.state.focused=!1,fn(i.display.wrapper,"CodeMirror-focused")),clearInterval(i.display.blinker),setTimeout(function(){i.state.focused||(i.display.shift=!1)},150))}function ba(i){for(var s=i.display,u=s.lineDiv.offsetTop,l=Math.max(0,s.scroller.getBoundingClientRect().top),c=s.lineDiv.getBoundingClientRect().top,d=0,w=0;w<s.view.length;w++){var b=s.view[w],E=i.options.lineWrapping,J=0;if(!b.hidden){if(c+=b.line.height,qe&&8>_t){E=b.node.offsetTop+b.node.offsetHeight;var W=E-u;u=E}else{var te=b.node.getBoundingClientRect();W=te.bottom-te.top,!E&&b.text.firstChild&&(J=b.text.firstChild.getBoundingClientRect().right-te.left-1)}if(E=b.line.height-W,(.005<E||-.005>E)&&(c<l&&(d-=E),z(b.line,W),Yh(b.line),b.rest))for(W=0;W<b.rest.length;W++)Yh(b.rest[W]);J>i.display.sizerWidth&&(J=Math.ceil(J/Un(i.display)),J>i.display.maxLineLength&&(i.display.maxLineLength=J,i.display.maxLine=b.line,i.display.maxLineChanged=!0))}}2<Math.abs(d)&&(s.scroller.scrollTop+=d)}function Yh(i){if(i.widgets)for(var s=0;s<i.widgets.length;++s){var u=i.widgets[s],l=u.node.parentNode;l&&(u.height=l.offsetHeight)}}function xa(i,s,u){var l=u&&u.top!=null?Math.max(0,u.top):i.scroller.scrollTop;l=Math.floor(l-i.lineSpace.offsetTop);var c=u&&u.bottom!=null?u.bottom:l+i.wrapper.clientHeight;if(l=_e(s,l),c=_e(s,c),u&&u.ensure){var d=u.ensure.from.line;u=u.ensure.to.line,d<l?(l=d,c=_e(s,gi(N(s,d))+i.wrapper.clientHeight)):Math.min(u,s.lastLine())>=c&&(l=_e(s,gi(N(s,u))-i.wrapper.clientHeight),c=u)}return{from:l,to:Math.max(c,l+1)}}function Mu(i,s){var u=i.display,l=Ln(i.display);0>s.top&&(s.top=0);var c=i.curOp&&i.curOp.scrollTop!=null?i.curOp.scrollTop:u.scroller.scrollTop,d=Tt(i),w={};s.bottom-s.top>d&&(s.bottom=s.top+d);var b=i.doc.height+de(u),E=s.top<l;return l=s.bottom>b-l,s.top<c?w.scrollTop=E?0:s.top:s.bottom>c+d&&(d=Math.min(s.top,(l?b:s.bottom)-d),d!=c&&(w.scrollTop=d)),c=i.options.fixedGutter?0:u.gutters.offsetWidth,d=i.curOp&&i.curOp.scrollLeft!=null?i.curOp.scrollLeft:u.scroller.scrollLeft-c,i=Pe(i)-u.gutters.offsetWidth,(u=s.right-s.left>i)&&(s.right=s.left+i),10>s.left?w.scrollLeft=0:s.left<d?w.scrollLeft=Math.max(0,s.left+c-(u?0:10)):s.right>i+d-3&&(w.scrollLeft=s.right+(u?0:10)-i),w}function Sa(i,s){s!=null&&(Ma(i),i.curOp.scrollTop=(i.curOp.scrollTop==null?i.doc.scrollTop:i.curOp.scrollTop)+s)}function Jn(i){Ma(i);var s=i.getCursor();i.curOp.scrollToPos={from:s,to:s,margin:i.options.cursorScrollMargin}}function Ps(i,s,u){s==null&&u==null||Ma(i),s!=null&&(i.curOp.scrollLeft=s),u!=null&&(i.curOp.scrollTop=u)}function Ma(i){var s=i.curOp.scrollToPos;if(s){i.curOp.scrollToPos=null;var u=Ph(i,s.from),l=Ph(i,s.to);Hh(i,u,l,s.margin)}}function Hh(i,s,u,l){s=Mu(i,{left:Math.min(s.left,u.left),top:Math.min(s.top,u.top)-l,right:Math.max(s.right,u.right),bottom:Math.max(s.bottom,u.bottom)+l}),Ps(i,s.scrollLeft,s.scrollTop)}function Gs(i,s){2>Math.abs(i.doc.scrollTop-s)||(fr||Tu(i,{top:s}),Zh(i,s,!0),fr&&Tu(i),Ks(i,100))}function Zh(i,s,u){s=Math.max(0,Math.min(i.display.scroller.scrollHeight-i.display.scroller.clientHeight,s)),(i.display.scroller.scrollTop!=s||u)&&(i.doc.scrollTop=s,i.display.scrollbars.setScrollTop(s),i.display.scroller.scrollTop!=s&&(i.display.scroller.scrollTop=s))}function on(i,s,u,l){s=Math.max(0,Math.min(s,i.display.scroller.scrollWidth-i.display.scroller.clientWidth)),(u?s==i.doc.scrollLeft:2>Math.abs(i.doc.scrollLeft-s))&&!l||(i.doc.scrollLeft=s,ep(i),i.display.scroller.scrollLeft!=s&&(i.display.scroller.scrollLeft=s),i.display.scrollbars.setScrollLeft(s))}function Ws(i){var s=i.display,u=s.gutters.offsetWidth,l=Math.round(i.doc.height+de(i.display));return{clientHeight:s.scroller.clientHeight,viewHeight:s.wrapper.clientHeight,scrollWidth:s.scroller.scrollWidth,clientWidth:s.scroller.clientWidth,viewWidth:s.wrapper.clientWidth,barLeft:i.options.fixedGutter?u:0,docHeight:l,scrollHeight:l+Oe(i)+s.barHeight,nativeBarWidth:s.nativeBarWidth,gutterWidth:u}}function Nn(i,s){s||(s=Ws(i));var u=i.display.barWidth,l=i.display.barHeight;for($h(i,s),s=0;4>s&&u!=i.display.barWidth||l!=i.display.barHeight;s++)u!=i.display.barWidth&&i.options.lineWrapping&&ba(i),$h(i,Ws(i)),u=i.display.barWidth,l=i.display.barHeight}function $h(i,s){var u=i.display,l=u.scrollbars.update(s);u.sizer.style.paddingRight=(u.barWidth=l.right)+"px",u.sizer.style.paddingBottom=(u.barHeight=l.bottom)+"px",u.heightForcer.style.borderBottom=l.bottom+"px solid transparent",l.right&&l.bottom?(u.scrollbarFiller.style.display="block",u.scrollbarFiller.style.height=l.bottom+"px",u.scrollbarFiller.style.width=l.right+"px"):u.scrollbarFiller.style.display="",l.bottom&&i.options.coverGutterNextToScrollbar&&i.options.fixedGutter?(u.gutterFiller.style.display="block",u.gutterFiller.style.height=l.bottom+"px",u.gutterFiller.style.width=s.gutterWidth+"px"):u.gutterFiller.style.display=""}function Xh(i){i.display.scrollbars&&(i.display.scrollbars.clear(),i.display.scrollbars.addClass&&fn(i.display.wrapper,i.display.scrollbars.addClass)),i.display.scrollbars=new sd[i.options.scrollbarStyle](function(s){i.display.wrapper.insertBefore(s,i.display.scrollbarFiller),Fe(s,"mousedown",function(){i.state.focused&&setTimeout(function(){return i.display.input.focus()},0)}),s.setAttribute("cm-not-content","true")},function(s,u){u=="horizontal"?on(i,s):Gs(i,s)},i),i.display.scrollbars.addClass&&_(i.display.wrapper,i.display.scrollbars.addClass)}function an(i){i.curOp={cm:i,viewChanged:!1,startHeight:i.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++E_,markArrays:null},i=i.curOp,Qn?Qn.ops.push(i):i.ownsGroup=Qn={ops:[i],delayedCallbacks:[]}}function ln(i){(i=i.curOp)&&mt(i,function(s){for(var u=0;u<s.ops.length;u++)s.ops[u].cm.curOp=null;for(s=s.ops,u=0;u<s.length;u++){var l=s[u],c=l.cm,d=c.display,w=c.display;!w.scrollbarsClipped&&w.scroller.offsetWidth&&(w.nativeBarWidth=w.scroller.offsetWidth-w.scroller.clientWidth,w.heightForcer.style.height=Oe(c)+"px",w.sizer.style.marginBottom=-w.nativeBarWidth+"px",w.sizer.style.borderRightWidth=Oe(c)+"px",w.scrollbarsClipped=!0),l.updateMaxLine&&Ns(c),l.mustUpdate=l.viewChanged||l.forceUpdate||l.scrollTop!=null||l.scrollToPos&&(l.scrollToPos.from.line<d.viewFrom||l.scrollToPos.to.line>=d.viewTo)||d.maxLineChanged&&c.options.lineWrapping,l.update=l.mustUpdate&&new Ga(c,l.mustUpdate&&{top:l.scrollTop,ensure:l.scrollToPos},l.forceUpdate)}for(u=0;u<s.length;u++)l=s[u],l.updatedDisplay=l.mustUpdate&&Cu(l.cm,l.update);for(u=0;u<s.length;u++)l=s[u],c=l.cm,d=c.display,l.updatedDisplay&&ba(c),l.barMeasure=Ws(c),d.maxLineChanged&&!c.options.lineWrapping&&(w=d.maxLine.text.length,w=Ai(c,rn(c,d.maxLine),w,void 0),l.adjustWidthTo=w.left+3,c.display.sizerWidth=l.adjustWidthTo,l.barMeasure.scrollWidth=Math.max(d.scroller.clientWidth,d.sizer.offsetLeft+l.adjustWidthTo+Oe(c)+c.display.barWidth),l.maxScrollLeft=Math.max(0,d.sizer.offsetLeft+l.adjustWidthTo-Pe(c))),(l.updatedDisplay||l.selectionChanged)&&(l.preparedSelection=d.input.prepareSelection());for(u=0;u<s.length;u++)l=s[u],c=l.cm,l.adjustWidthTo!=null&&(c.display.sizer.style.minWidth=l.adjustWidthTo+"px",l.maxScrollLeft<c.doc.scrollLeft&&on(c,Math.min(c.display.scroller.scrollLeft,l.maxScrollLeft),!0),c.display.maxLineChanged=!1),d=l.focus&&l.focus==v(m(c)),l.preparedSelection&&c.display.input.showSelection(l.preparedSelection,d),(l.updatedDisplay||l.startHeight!=c.doc.height)&&Nn(c,l.barMeasure),l.updatedDisplay&&ku(c,l.barMeasure),l.selectionChanged&&bu(c),c.state.focused&&l.updateInput&&c.display.input.reset(l.typing),d&&Qh(l.cm);for(u=0;u<s.length;u++){var b=void 0;if(l=s[u],c=l.cm,d=c.display,w=c.doc,l.updatedDisplay&&qh(c,l.update),d.wheelStartX==null||l.scrollTop==null&&l.scrollLeft==null&&!l.scrollToPos||(d.wheelStartX=d.wheelStartY=null),l.scrollTop!=null&&Zh(c,l.scrollTop,l.forceScroll),l.scrollLeft!=null&&on(c,l.scrollLeft,!0,!0),l.scrollToPos){var E=C(w,l.scrollToPos.from),J=C(w,l.scrollToPos.to),W=l.scrollToPos.margin;W==null&&(W=0),c.options.lineWrapping||E!=J||(J=E.sticky=="before"?pe(E.line,E.ch+1,"before"):E,E=E.ch?pe(E.line,E.sticky=="before"?E.ch-1:E.ch,"after"):E);for(var te=0;5>te;te++){var ne=!1;b=Ri(c,E);var se=J&&J!=E?Ri(c,J):b;b={left:Math.min(b.left,se.left),top:Math.min(b.top,se.top)-W,right:Math.max(b.left,se.left),bottom:Math.max(b.bottom,se.bottom)+W},se=Mu(c,b);var ge=c.doc.scrollTop,Ee=c.doc.scrollLeft;if(se.scrollTop!=null&&(Gs(c,se.scrollTop),1<Math.abs(c.doc.scrollTop-ge)&&(ne=!0)),se.scrollLeft!=null&&(on(c,se.scrollLeft),1<Math.abs(c.doc.scrollLeft-Ee)&&(ne=!0)),!ne)break}J=b,fe(c,"scrollCursorIntoView")||(W=c.display,te=W.sizer.getBoundingClientRect(),E=null,ne=W.wrapper.ownerDocument,0>J.top+te.top?E=!0:J.bottom+te.top>(ne.defaultView.innerHeight||ne.documentElement.clientHeight)&&(E=!1),E==null||y_||(J=f("div","",null,`position: absolute;
|
||
top: `+(J.top-W.viewOffset-c.display.lineSpace.offsetTop)+`px;
|
||
height: `+(J.bottom-J.top+Oe(c)+W.barHeight)+`px;
|
||
left: `+J.left+"px; width: "+Math.max(2,J.right-J.left)+"px;"),c.display.lineSpace.appendChild(J),J.scrollIntoView(E),c.display.lineSpace.removeChild(J)))}if(J=l.maybeHiddenMarkers,E=l.maybeUnhiddenMarkers,J)for(W=0;W<J.length;++W)J[W].lines.length||X(J[W],"hide");if(E)for(J=0;J<E.length;++J)E[J].lines.length&&X(E[J],"unhide");d.wrapper.offsetHeight&&(w.scrollTop=c.display.scroller.scrollTop),l.changeObjs&&X(c,"changes",c,l.changeObjs),l.update&&l.update.finish()}})}function ri(i,s){if(i.curOp)return s();an(i);try{return s()}finally{ln(i)}}function Ut(i,s){return function(){if(i.curOp)return s.apply(i,arguments);an(i);try{return s.apply(i,arguments)}finally{ln(i)}}}function Wt(i){return function(){if(this.curOp)return i.apply(this,arguments);an(this);try{return i.apply(this,arguments)}finally{ln(this)}}}function It(i){return function(){var s=this.cm;if(!s||s.curOp)return i.apply(this,arguments);an(s);try{return i.apply(this,arguments)}finally{ln(s)}}}function Ks(i,s){i.doc.highlightFrontier<i.display.viewTo&&i.state.highlight.set(s,x(Fv,i))}function Fv(i){var s=i.doc;if(!(s.highlightFrontier>=i.display.viewTo)){var u=+new Date+i.options.workTime,l=me(i,s.highlightFrontier),c=[];s.iter(l.line,Math.min(s.first+s.size,i.display.viewTo+500),function(d){if(l.line>=i.display.viewFrom){var w=d.styles,b=d.text.length>i.options.maxHighlightLength?Y(s.mode,l.state):null,E=ae(i,d,l,!0);for(b&&(l.state=b),d.styles=E.styles,b=d.styleClasses,(E=E.classes)?d.styleClasses=E:b&&(d.styleClasses=null),E=!w||w.length!=d.styles.length||b!=E&&(!b||!E||b.bgClass!=E.bgClass||b.textClass!=E.textClass),b=0;!E&&b<w.length;++b)E=w[b]!=d.styles[b];E&&c.push(l.line),d.stateAfter=l.save()}else d.text.length<=i.options.maxHighlightLength&&Be(i,d.text,l),d.stateAfter=l.line%5==0?l.save():null;if(l.nextLine(),+new Date>u)return Ks(i,i.options.workDelay),!0}),s.highlightFrontier=l.line,s.modeFrontier=Math.max(s.modeFrontier,l.line),c.length&&ri(i,function(){for(var d=0;d<c.length;d++)Tr(i,c[d],"text")})}}function Cu(i,s){var u=i.display,l=i.doc;if(s.editorIsHidden)return Er(i),!1;if(!s.force&&s.visible.from>=u.viewFrom&&s.visible.to<=u.viewTo&&(u.updateLineNumbers==null||u.updateLineNumbers>=u.viewTo)&&u.renderedView==u.view&&Vh(i)==0)return!1;tp(i)&&(Er(i),s.dims=mu(i));var c=l.first+l.size,d=Math.max(s.visible.from-i.options.viewportMargin,l.first),w=Math.min(c,s.visible.to+i.options.viewportMargin);return u.viewFrom<d&&20>d-u.viewFrom&&(d=Math.max(l.first,u.viewFrom)),u.viewTo>w&&20>u.viewTo-w&&(w=Math.min(c,u.viewTo)),cr&&(d=kn(i.doc,d),w=fa(i.doc,w)),l=d!=u.viewFrom||w!=u.viewTo||u.lastWrapHeight!=s.wrapperHeight||u.lastWrapWidth!=s.wrapperWidth,c=i.display,c.view.length==0||d>=c.viewTo||w<=c.viewFrom?(c.view=en(i,d,w),c.viewFrom=d):(c.viewFrom>d?c.view=en(i,d,c.viewFrom).concat(c.view):c.viewFrom<d&&(c.view=c.view.slice(sn(i,d))),c.viewFrom=d,c.viewTo<w?c.view=c.view.concat(en(i,c.viewTo,w)):c.viewTo>w&&(c.view=c.view.slice(0,sn(i,w)))),c.viewTo=w,u.viewOffset=gi(N(i.doc,u.viewFrom)),i.display.mover.style.top=u.viewOffset+"px",w=Vh(i),!l&&w==0&&!s.force&&u.renderedView==u.view&&(u.updateLineNumbers==null||u.updateLineNumbers>=u.viewTo)?!1:(i.hasFocus()?d=null:(d=v(m(i)))&&p(i.display.lineDiv,d)?(d={activeElt:d},window.getSelection&&(c=m(i).defaultView.getSelection(),c.anchorNode&&c.extend&&p(i.display.lineDiv,c.anchorNode)&&(d.anchorNode=c.anchorNode,d.anchorOffset=c.anchorOffset,d.focusNode=c.focusNode,d.focusOffset=c.focusOffset))):d=null,4<w&&(u.lineDiv.style.display="none"),Dv(i,u.updateLineNumbers,s.dims),4<w&&(u.lineDiv.style.display=""),u.renderedView=u.view,(w=d)&&w.activeElt&&w.activeElt!=v(w.activeElt.ownerDocument)&&(w.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(w.activeElt.nodeName)&&w.anchorNode&&p(document.body,w.anchorNode)&&p(document.body,w.focusNode)&&(c=w.activeElt.ownerDocument,d=c.defaultView.getSelection(),c=c.createRange(),c.setEnd(w.anchorNode,w.anchorOffset),c.collapse(!1),d.removeAllRanges(),d.addRange(c),d.extend(w.focusNode,w.focusOffset))),o(u.cursorDiv),o(u.selectionDiv),u.gutters.style.height=u.sizer.style.minHeight=0,l&&(u.lastWrapHeight=s.wrapperHeight,u.lastWrapWidth=s.wrapperWidth,Ks(i,400)),u.updateLineNumbers=null,!0)}function qh(i,s){for(var u=s.viewport,l=!0;;l=!1){if(l&&i.options.lineWrapping&&s.oldDisplayWidth!=Pe(i))l&&(s.visible=xa(i.display,i.doc,u));else if(u&&u.top!=null&&(u={top:Math.min(i.doc.height+de(i.display)-Tt(i),u.top)}),s.visible=xa(i.display,i.doc,u),s.visible.from>=i.display.viewFrom&&s.visible.to<=i.display.viewTo)break;if(!Cu(i,s))break;ba(i),l=Ws(i),js(i),Nn(i,l),ku(i,l),s.force=!1}s.signal(i,"update",i),(i.display.viewFrom!=i.display.reportedViewFrom||i.display.viewTo!=i.display.reportedViewTo)&&(s.signal(i,"viewportChange",i,i.display.viewFrom,i.display.viewTo),i.display.reportedViewFrom=i.display.viewFrom,i.display.reportedViewTo=i.display.viewTo)}function Tu(i,s){if(s=new Ga(i,s),Cu(i,s)){ba(i),qh(i,s);var u=Ws(i);js(i),Nn(i,u),ku(i,u),s.finish()}}function Dv(i,s,u){function l(ne){var se=ne.nextSibling;return Kt&&yi&&i.display.currentWheelTarget==ne?ne.style.display="none":ne.parentNode.removeChild(ne),se}var c=i.display,d=i.options.lineNumbers,w=c.lineDiv,b=w.firstChild,E=c.view;c=c.viewFrom;for(var J=0;J<E.length;J++){var W=E[J];if(!W.hidden)if(W.node&&W.node.parentNode==w){for(;b!=W.node;)b=l(b);b=d&&s!=null&&s<=c&&W.lineNumber,W.changes&&(-1<S(W.changes,"gutter")&&(b=!1),Bs(i,W,c,u)),b&&(o(W.lineNumber),W.lineNumber.appendChild(document.createTextNode(Ae(i.options,c)))),b=W.node.nextSibling}else{var te=Fs(i,W,c,u);w.insertBefore(te,b)}c+=W.size}for(;b;)b=l(b)}function Eu(i){i.sizer.style.marginLeft=i.gutters.offsetWidth+"px",bt(i,"gutterChanged",i)}function ku(i,s){i.display.sizer.style.minHeight=s.docHeight+"px",i.display.heightForcer.style.top=s.docHeight+"px",i.display.gutters.style.height=s.docHeight+i.display.barHeight+Oe(i)+"px"}function ep(i){var s=i.display,u=s.view;if(s.alignWidgets||s.gutters.firstChild&&i.options.fixedGutter){for(var l=vu(s)-s.scroller.scrollLeft+i.doc.scrollLeft,c=s.gutters.offsetWidth,d=l+"px",w=0;w<u.length;w++)if(!u[w].hidden){i.options.fixedGutter&&(u[w].gutter&&(u[w].gutter.style.left=d),u[w].gutterBackground&&(u[w].gutterBackground.style.left=d));var b=u[w].alignable;if(b)for(var E=0;E<b.length;E++)b[E].style.left=d}i.options.fixedGutter&&(s.gutters.style.left=l+c+"px")}}function tp(i){if(!i.options.lineNumbers)return!1;var s=i.doc;s=Ae(i.options,s.first+s.size-1);var u=i.display;if(s.length!=u.lineNumChars){var l=u.measure.appendChild(f("div",[f("div",s)],"CodeMirror-linenumber CodeMirror-gutter-elt")),c=l.firstChild.offsetWidth;return l=l.offsetWidth-c,u.lineGutter.style.width="",u.lineNumInnerWidth=Math.max(c,u.lineGutter.offsetWidth-l)+1,u.lineNumWidth=u.lineNumInnerWidth+l,u.lineNumChars=u.lineNumInnerWidth?s.length:-1,u.lineGutter.style.width=u.lineNumWidth+"px",Eu(i.display),!0}return!1}function Au(i,s){for(var u=[],l=!1,c=0;c<i.length;c++){var d=i[c],w=null;if(typeof d!="string"&&(w=d.style,d=d.className),d=="CodeMirror-linenumbers")if(s)l=!0;else continue;u.push({className:d,style:w})}return s&&!l&&u.push({className:"CodeMirror-linenumbers",style:null}),u}function ip(i){var s=i.gutters,u=i.gutterSpecs;o(s),i.lineGutter=null;for(var l=0;l<u.length;++l){var c=u[l],d=c.className;c=c.style;var w=s.appendChild(f("div",null,"CodeMirror-gutter "+d));c&&(w.style.cssText=c),d=="CodeMirror-linenumbers"&&(i.lineGutter=w,w.style.width=(i.lineNumWidth||1)+"px")}s.style.display=u.length?"":"none",Eu(i)}function Vs(i){ip(i.display),Ht(i),ep(i)}function jv(i,s,u,l){this.input=u,this.scrollbarFiller=f("div",null,"CodeMirror-scrollbar-filler"),this.scrollbarFiller.setAttribute("cm-not-content","true"),this.gutterFiller=f("div",null,"CodeMirror-gutter-filler"),this.gutterFiller.setAttribute("cm-not-content","true"),this.lineDiv=h("div",null,"CodeMirror-code"),this.selectionDiv=f("div",null,null,"position: relative; z-index: 1"),this.cursorDiv=f("div",null,"CodeMirror-cursors"),this.measure=f("div",null,"CodeMirror-measure"),this.lineMeasure=f("div",null,"CodeMirror-measure"),this.lineSpace=h("div",[this.measure,this.lineMeasure,this.selectionDiv,this.cursorDiv,this.lineDiv],null,"position: relative; outline: none");var c=h("div",[this.lineSpace],"CodeMirror-lines");this.mover=f("div",[c],null,"position: relative"),this.sizer=f("div",[this.mover],"CodeMirror-sizer"),this.sizerWidth=null,this.heightForcer=f("div",null,null,"position: absolute; height: 50px; width: 1px;"),this.gutters=f("div",null,"CodeMirror-gutters"),this.lineGutter=null,this.scroller=f("div",[this.sizer,this.heightForcer,this.gutters],"CodeMirror-scroll"),this.scroller.setAttribute("tabIndex","-1"),this.wrapper=f("div",[this.scrollbarFiller,this.gutterFiller,this.scroller],"CodeMirror"),Rr&&105<=ed&&(this.wrapper.style.clipPath="inset(0px)"),this.wrapper.setAttribute("translate","no"),qe&&8>_t&&(this.gutters.style.zIndex=-1,this.scroller.style.paddingRight=0),Kt||fr&&eo||(this.scroller.draggable=!0),i&&(i.appendChild?i.appendChild(this.wrapper):i(this.wrapper)),this.reportedViewFrom=this.reportedViewTo=this.viewFrom=this.viewTo=s.first,this.view=[],this.externalMeasured=this.renderedView=null,this.lastWrapHeight=this.lastWrapWidth=this.viewOffset=0,this.updateLineNumbers=null,this.nativeBarWidth=this.barHeight=this.barWidth=0,this.scrollbarsClipped=!1,this.lineNumWidth=this.lineNumInnerWidth=this.lineNumChars=null,this.alignWidgets=!1,this.maxLine=this.cachedCharWidth=this.cachedTextHeight=this.cachedPaddingH=null,this.maxLineLength=0,this.maxLineChanged=!1,this.wheelDX=this.wheelDY=this.wheelStartX=this.wheelStartY=null,this.shift=!1,this.activeTouch=this.selForContextMenu=null,this.gutterSpecs=Au(l.gutters,l.lineNumbers),ip(this),u.init(this)}function rp(i){var s=i.wheelDeltaX,u=i.wheelDeltaY;return s==null&&i.detail&&i.axis==i.HORIZONTAL_AXIS&&(s=i.detail),u==null&&i.detail&&i.axis==i.VERTICAL_AXIS?u=i.detail:u==null&&(u=i.wheelDelta),{x:s,y:u}}function Pv(i){return i=rp(i),i.x*=hr,i.y*=hr,i}function np(i,s){Rr&&ed==102&&(i.display.chromeScrollHack==null?i.display.sizer.style.pointerEvents="none":clearTimeout(i.display.chromeScrollHack),i.display.chromeScrollHack=setTimeout(function(){i.display.chromeScrollHack=null,i.display.sizer.style.pointerEvents=""},100));var u=rp(s),l=u.x;u=u.y;var c=hr;s.deltaMode===0&&(l=s.deltaX,u=s.deltaY,c=1);var d=i.display,w=d.scroller,b=w.scrollWidth>w.clientWidth,E=w.scrollHeight>w.clientHeight;if(l&&b||u&&E){if(u&&yi&&Kt){b=s.target;var J=d.view;e:for(;b!=w;b=b.parentNode)for(var W=0;W<J.length;W++)if(J[W].node==b){i.display.currentWheelTarget=b;break e}}!l||fr||Ui||c==null?(u&&c!=null&&(c*=u,E=i.doc.scrollTop,b=E+d.wrapper.clientHeight,0>c?E=Math.max(0,E+c-50):b=Math.min(i.doc.height,b+c+50),Tu(i,{top:E,bottom:b})),20>Wa&&s.deltaMode!==0&&(d.wheelStartX==null?(d.wheelStartX=w.scrollLeft,d.wheelStartY=w.scrollTop,d.wheelDX=l,d.wheelDY=u,setTimeout(function(){if(d.wheelStartX!=null){var te=w.scrollLeft-d.wheelStartX,ne=w.scrollTop-d.wheelStartY;te=ne&&d.wheelDY&&ne/d.wheelDY||te&&d.wheelDX&&te/d.wheelDX,d.wheelStartX=d.wheelStartY=null,te&&(hr=(hr*Wa+te)/(Wa+1),++Wa)}},200)):(d.wheelDX+=l,d.wheelDY+=u))):(u&&E&&Gs(i,Math.max(0,w.scrollTop+u*c)),on(i,Math.max(0,w.scrollLeft+l*c)),(!u||u&&E)&&ke(s),d.wheelStartX=null)}}function Li(i,s,u){i=i&&i.options.selectionsMayTouch,u=s[u],s.sort(function(E,J){return Te(E.from(),J.from())}),u=S(s,u);for(var l=1;l<s.length;l++){var c=s[l],d=s[l-1],w=Te(d.to(),c.from());if(i&&!c.empty()?0<w:0<=w){w=M(d.from(),c.from());var b=B(d.to(),c.to());c=d.empty()?c.from()==c.head:d.from()==d.head,l<=u&&--u,s.splice(--l,2,new rt(c?b:w,c?w:b))}}return new ci(s,u)}function ur(i,s){return new ci([new rt(i,s||i)],0)}function kr(i){return i.text?pe(i.from.line+i.text.length-1,G(i.text).length+(i.text.length==1?i.from.ch:0)):i.to}function sp(i,s){if(0>Te(i,s.from))return i;if(0>=Te(i,s.to))return kr(s);var u=i.line+s.text.length-(s.to.line-s.from.line)-1,l=i.ch;return i.line==s.to.line&&(l+=kr(s).ch-s.to.ch),pe(u,l)}function Ru(i,s){for(var u=[],l=0;l<i.sel.ranges.length;l++){var c=i.sel.ranges[l];u.push(new rt(sp(c.anchor,s),sp(c.head,s)))}return Li(i.cm,u,i.sel.primIndex)}function op(i,s,u){return i.line==s.line?pe(u.line,i.ch-s.ch+u.ch):pe(u.line+(i.line-s.line),i.ch)}function Lu(i){i.doc.mode=De(i.options,i.doc.modeOption),zs(i)}function zs(i){i.doc.iter(function(s){s.stateAfter&&(s.stateAfter=null),s.styles&&(s.styles=null)}),i.doc.modeFrontier=i.doc.highlightFrontier=i.doc.first,Ks(i,100),i.state.modeGen++,i.curOp&&Ht(i)}function ap(i,s){return s.from.ch==0&&s.to.ch==0&&G(s.text)==""&&(!i.cm||i.cm.options.wholeLineUpdateBefore)}function Uu(i,s,u,l){function c(ge,Ee,je){ge.text=Ee,ge.stateAfter&&(ge.stateAfter=null),ge.styles&&(ge.styles=null),ge.order!=null&&(ge.order=null),ua(ge),Js(ge,je),Ee=l?l(ge):1,Ee!=ge.height&&z(ge,Ee),bt(ge,"change",ge,s)}function d(ge,Ee){for(var je=[];ge<Ee;++ge)je.push(new zn(E[ge],u?u[ge]:null,l));return je}var w=s.from,b=s.to,E=s.text,J=N(i,w.line),W=N(i,b.line),te=G(E),ne=u?u[E.length-1]:null,se=b.line-w.line;s.full?(i.insert(0,d(0,E.length)),i.remove(E.length,i.size-E.length)):ap(i,s)?(b=d(0,E.length-1),c(W,W.text,ne),se&&i.remove(w.line,se),b.length&&i.insert(w.line,b)):J==W?E.length==1?c(J,J.text.slice(0,w.ch)+te+J.text.slice(b.ch),ne):(se=d(1,E.length-1),se.push(new zn(te+J.text.slice(b.ch),ne,l)),c(J,J.text.slice(0,w.ch)+E[0],u?u[0]:null),i.insert(w.line+1,se)):E.length==1?(c(J,J.text.slice(0,w.ch)+E[0]+W.text.slice(b.ch),u?u[0]:null),i.remove(w.line+1,se)):(c(J,J.text.slice(0,w.ch)+E[0],u?u[0]:null),c(W,te+W.text.slice(b.ch),ne),ne=d(1,E.length-1),1<se&&i.remove(w.line+1,se-1),i.insert(w.line+1,ne)),bt(i,"change",i,s)}function Ar(i,s,u){function l(c,d,w){if(c.linked)for(var b=0;b<c.linked.length;++b){var E=c.linked[b];if(E.doc!=d){var J=w&&E.sharedHist;(!u||J)&&(s(E.doc,J),l(E.doc,c,J))}}}l(i,null,!0)}function lp(i,s){if(s.cm)throw Error("This document is already in use.");i.doc=s,s.cm=i,_u(i),Lu(i),up(i),i.options.direction=s.direction,i.options.lineWrapping||Ns(i),i.options.mode=s.modeOption,Ht(i)}function up(i){(i.doc.direction=="rtl"?_:fn)(i.display.lineDiv,"CodeMirror-rtl")}function Gv(i){ri(i,function(){up(i),Ht(i)})}function Ca(i){this.done=[],this.undone=[],this.undoDepth=i?i.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOrigin=this.lastSelOrigin=this.lastOp=this.lastSelOp=null,this.generation=this.maxGeneration=i?i.maxGeneration:1}function Iu(i,s){var u={from:Ve(s.from),to:kr(s),text:T(i,s.from,s.to)};return hp(i,u,s.from.line,s.to.line+1),Ar(i,function(l){return hp(l,u,s.from.line,s.to.line+1)},!0),u}function fp(i){for(;i.length&&G(i).ranges;)i.pop()}function cp(i,s,u,l){var c=i.history;c.undone.length=0;var d=+new Date,w;if(w=c.lastOp==l||c.lastOrigin==s.origin&&s.origin&&(s.origin.charAt(0)=="+"&&c.lastModTime>d-(i.cm?i.cm.options.historyEventDelay:500)||s.origin.charAt(0)=="*")){if(c.lastOp==l){fp(c.done);var b=G(c.done)}else c.done.length&&!G(c.done).ranges?b=G(c.done):1<c.done.length&&!c.done[c.done.length-2].ranges?(c.done.pop(),b=G(c.done)):b=void 0;w=b}if(w){var E=G(b.changes);Te(s.from,s.to)==0&&Te(s.from,E.to)==0?E.to=kr(s):b.changes.push(Iu(i,s))}else for((b=G(c.done))&&b.ranges||Ta(i.sel,c.done),b={changes:[Iu(i,s)],generation:c.generation},c.done.push(b);c.done.length>c.undoDepth;)c.done.shift(),c.done[0].ranges||c.done.shift();c.done.push(u),c.generation=++c.maxGeneration,c.lastModTime=c.lastSelTime=d,c.lastOp=c.lastSelOp=l,c.lastOrigin=c.lastSelOrigin=s.origin,E||X(i,"historyAdded")}function Ta(i,s){var u=G(s);u&&u.ranges&&u.equals(i)||s.push(i)}function hp(i,s,u,l){var c=s["spans_"+i.id],d=0;i.iter(Math.max(i.first,u),Math.min(i.first+i.size,l),function(w){w.markedSpans&&((c||(c=s["spans_"+i.id]={}))[d]=w.markedSpans),++d})}function pp(i,s){var u;if(u=s["spans_"+i.id]){for(var l=[],c=0;c<s.text.length;++c){var d=l,w=d.push,b=void 0,E=u[c];if(E){for(var J=0;J<E.length;++J)E[J].marker.explicitlyCleared?b||(b=E.slice(0,J)):b&&b.push(E[J]);b=b?b.length?b:null:E}else b=null;w.call(d,b)}u=l}else u=null;if(i=Vi(i,s),!u)return i;if(!i)return u;for(s=0;s<u.length;++s)if(l=u[s],c=i[s],l&&c)e:for(d=0;d<c.length;++d){for(w=c[d],b=0;b<l.length;++b)if(l[b].marker==w.marker)continue e;l.push(w)}else c&&(u[s]=c);return u}function On(i,s,u){for(var l=[],c=0;c<i.length;++c){var d=i[c];if(d.ranges)l.push(u?ci.prototype.deepCopy.call(d):d);else{d=d.changes;var w=[];l.push({changes:w});for(var b=0;b<d.length;++b){var E=d[b],J;if(w.push({from:E.from,to:E.to,text:E.text}),s)for(var W in E)(J=W.match(/^spans_(\d+)$/))&&-1<S(s,Number(J[1]))&&(G(w)[W]=E[W],delete E[W])}}}return l}function Ju(i,s,u,l){return l?(i=i.anchor,u&&(l=0>Te(s,i),l!=0>Te(u,i)?(i=s,s=u):l!=0>Te(s,u)&&(s=u)),new rt(i,s)):new rt(u||s,s)}function Ea(i,s,u,l,c){c==null&&(c=i.cm&&(i.cm.display.shift||i.extend)),Ot(i,new ci([Ju(i.sel.primary(),s,u,c)],0),l)}function dp(i,s,u){for(var l=[],c=i.cm&&(i.cm.display.shift||i.extend),d=0;d<i.sel.ranges.length;d++)l[d]=Ju(i.sel.ranges[d],s[d],null,c);s=Li(i.cm,l,i.sel.primIndex),Ot(i,s,u)}function Nu(i,s,u,l){var c=i.sel.ranges.slice(0);c[s]=u,Ot(i,Li(i.cm,c,i.sel.primIndex),l)}function Wv(i,s,u){return u={ranges:s.ranges,update:function(l){this.ranges=[];for(var c=0;c<l.length;c++)this.ranges[c]=new rt(C(i,l[c].anchor),C(i,l[c].head))},origin:u&&u.origin},X(i,"beforeSelectionChange",i,u),i.cm&&X(i.cm,"beforeSelectionChange",i.cm,u),u.ranges!=s.ranges?Li(i.cm,u.ranges,u.ranges.length-1):s}function gp(i,s,u){var l=i.history.done,c=G(l);c&&c.ranges?(l[l.length-1]=s,ka(i,s,u)):Ot(i,s,u)}function Ot(i,s,u){ka(i,s,u),s=i.sel;var l=i.cm?i.cm.curOp.id:NaN,c=i.history,d=u&&u.origin,w;if(!(w=l==c.lastSelOp)&&(w=d&&c.lastSelOrigin==d)&&!(w=c.lastModTime==c.lastSelTime&&c.lastOrigin==d)){w=G(c.done);var b=d.charAt(0);w=b=="*"||b=="+"&&w.ranges.length==s.ranges.length&&w.somethingSelected()==s.somethingSelected()&&new Date-i.history.lastSelTime<=(i.cm?i.cm.options.historyEventDelay:500)}w?c.done[c.done.length-1]=s:Ta(s,c.done),c.lastSelTime=+new Date,c.lastSelOrigin=d,c.lastSelOp=l,u&&u.clearRedo!==!1&&fp(c.undone)}function ka(i,s,u){(we(i,"beforeSelectionChange")||i.cm&&we(i.cm,"beforeSelectionChange"))&&(s=Wv(i,s,u));var l=u&&u.bias||(0>Te(s.primary().head,i.sel.primary().head)?-1:1);yp(i,vp(i,s,l,!0)),u&&u.scroll===!1||!i.cm||i.cm.getOption("readOnly")=="nocursor"||Jn(i.cm)}function yp(i,s){s.equals(i.sel)||(i.sel=s,i.cm&&(i.cm.curOp.updateInput=1,i.cm.curOp.selectionChanged=!0,Me(i.cm)),bt(i,"cursorActivity",i))}function mp(i){yp(i,vp(i,i.sel,null,!1))}function vp(i,s,u,l){for(var c,d=0;d<s.ranges.length;d++){var w=s.ranges[d],b=s.ranges.length==i.sel.ranges.length&&i.sel.ranges[d],E=Aa(i,w.anchor,b&&b.anchor,u,l);b=w.head==w.anchor?E:Aa(i,w.head,b&&b.head,u,l),(c||E!=w.anchor||b!=w.head)&&(c||(c=s.ranges.slice(0,d)),c[d]=new rt(E,b))}return c?Li(i.cm,c,s.primIndex):s}function Bn(i,s,u,l,c){var d=N(i,s.line);if(d.markedSpans)for(var w=0;w<d.markedSpans.length;++w){var b=d.markedSpans[w],E=b.marker,J="selectLeft"in E?!E.selectLeft:E.inclusiveLeft,W="selectRight"in E?!E.selectRight:E.inclusiveRight;if((b.from==null||(J?b.from<=s.ch:b.from<s.ch))&&(b.to==null||(W?b.to>=s.ch:b.to>s.ch))){if(c&&(X(E,"beforeCursorEnter"),E.explicitlyCleared))if(d.markedSpans){--w;continue}else break;if(E.atomic)return u&&(w=E.find(0>l?1:-1),b=void 0,(0>l?W:J)&&(w=_p(i,w,-l,w&&w.line==s.line?d:null)),w&&w.line==s.line&&(b=Te(w,u))&&(0>l?0>b:0<b))?Bn(i,w,s,l,c):(u=E.find(0>l?-1:1),(0>l?J:W)&&(u=_p(i,u,l,u.line==s.line?d:null)),u?Bn(i,u,s,l,c):null)}}return s}function Aa(i,s,u,l,c){return l=l||1,s=Bn(i,s,u,l,c)||!c&&Bn(i,s,u,l,!0)||Bn(i,s,u,-l,c)||!c&&Bn(i,s,u,-l,!0),s||(i.cantEdit=!0,pe(i.first,0))}function _p(i,s,u,l){return 0>u&&s.ch==0?s.line>i.first?C(i,pe(s.line-1)):null:0<u&&s.ch==(l||N(i,s.line)).text.length?s.line<i.first+i.size-1?pe(s.line+1,0):null:new pe(s.line,s.ch+u)}function wp(i){i.setSelection(pe(i.firstLine(),0),pe(i.lastLine()),Qi)}function bp(i,s,u){var l={canceled:!1,from:s.from,to:s.to,text:s.text,origin:s.origin,cancel:function(){return l.canceled=!0}};return u&&(l.update=function(c,d,w,b){c&&(l.from=C(i,c)),d&&(l.to=C(i,d)),w&&(l.text=w),b!==void 0&&(l.origin=b)}),X(i,"beforeChange",i,l),i.cm&&X(i.cm,"beforeChange",i.cm,l),l.canceled?(i.cm&&(i.cm.curOp.updateInput=2),null):{from:l.from,to:l.to,text:l.text,origin:l.origin}}function Fn(i,s,u){if(i.cm){if(!i.cm.curOp)return Ut(i.cm,Fn)(i,s,u);if(i.cm.state.suppressEdits)return}if(!((we(i,"beforeChange")||i.cm&&we(i.cm,"beforeChange"))&&(s=bp(i,s,!0),!s)))if(u=rd&&!u&&lr(i,s.from,s.to))for(var l=u.length-1;0<=l;--l)xp(i,{from:u[l].from,to:u[l].to,text:l?[""]:s.text,origin:s.origin});else xp(i,s)}function xp(i,s){if(s.text.length!=1||s.text[0]!=""||Te(s.from,s.to)!=0){var u=Ru(i,s);cp(i,s,u,i.cm?i.cm.curOp.id:NaN),Qs(i,s,u,Vi(i,s));var l=[];Ar(i,function(c,d){d||S(l,c.history)!=-1||(Tp(c.history,s),l.push(c.history)),Qs(c,s,null,Vi(c,s))})}}function Ra(i,s,u){var l=i.cm&&i.cm.state.suppressEdits;if(!l||u){for(var c=i.history,d,w=i.sel,b=s=="undo"?c.done:c.undone,E=s=="undo"?c.undone:c.done,J=0;J<b.length&&(d=b[J],u?!d.ranges||d.equals(i.sel):d.ranges);J++);if(J!=b.length){for(c.lastOrigin=c.lastSelOrigin=null;;)if(d=b.pop(),d.ranges){if(Ta(d,E),u&&!d.equals(i.sel)){Ot(i,d,{clearRedo:!1});return}w=d}else{if(l){b.push(d);return}break}var W=[];Ta(w,E),E.push({changes:W,generation:c.generation}),c.generation=d.generation||++c.maxGeneration;var te=we(i,"beforeChange")||i.cm&&we(i.cm,"beforeChange");for(u=function(ne){var se=d.changes[ne];if(se.origin=s,te&&!bp(i,se,!1))return b.length=0,{};W.push(Iu(i,se));var ge=ne?Ru(i,se):G(b);Qs(i,se,ge,pp(i,se)),!ne&&i.cm&&i.cm.scrollIntoView({from:se.from,to:kr(se)});var Ee=[];Ar(i,function(je,Rt){Rt||S(Ee,je.history)!=-1||(Tp(je.history,se),Ee.push(je.history)),Qs(je,se,null,pp(je,se))})},l=d.changes.length-1;0<=l;--l)if(c=u(l))return c.v}}}function Sp(i,s){if(s!=0&&(i.first+=s,i.sel=new ci(O(i.sel.ranges,function(c){return new rt(pe(c.anchor.line+s,c.anchor.ch),pe(c.head.line+s,c.head.ch))}),i.sel.primIndex),i.cm)){Ht(i.cm,i.first,i.first-s,s);for(var u=i.cm.display,l=u.viewFrom;l<u.viewTo;l++)Tr(i.cm,l,"gutter")}}function Qs(i,s,u,l){if(i.cm&&!i.cm.curOp)return Ut(i.cm,Qs)(i,s,u,l);if(s.to.line<i.first)Sp(i,s.text.length-1-(s.to.line-s.from.line));else if(!(s.from.line>i.lastLine())){if(s.from.line<i.first){var c=s.text.length-1-(i.first-s.from.line);Sp(i,c),s={from:pe(i.first,0),to:pe(s.to.line+c,s.to.ch),text:[G(s.text)],origin:s.origin}}c=i.lastLine(),s.to.line>c&&(s={from:s.from,to:pe(c,N(i,c).text.length),text:[s.text[0]],origin:s.origin}),s.removed=T(i,s.from,s.to),u||(u=Ru(i,s)),i.cm?Kv(i.cm,s,l):Uu(i,s,l),ka(i,u,Qi),i.cantEdit&&Aa(i,pe(i.firstLine(),0))&&(i.cantEdit=!1)}}function Kv(i,s,u){var l=i.doc,c=i.display,d=s.from,w=s.to,b=!1,E=d.line;i.options.lineWrapping||(E=oe(ui(N(l,d.line))),l.iter(E,w.line+1,function(J){if(J==c.maxLine)return b=!0})),-1<l.sel.contains(s.from,s.to)&&Me(i),Uu(l,s,u,Kh(i)),i.options.lineWrapping||(l.iter(E,d.line+s.text.length,function(J){var W=br(J);W>c.maxLineLength&&(c.maxLine=J,c.maxLineLength=W,c.maxLineChanged=!0,b=!1)}),b&&(i.curOp.updateMaxLine=!0)),cu(l,d.line),Ks(i,400),u=s.text.length-(w.line-d.line)-1,s.full?Ht(i):d.line!=w.line||s.text.length!=1||ap(i.doc,s)?Ht(i,d.line,w.line+1,u):Tr(i,d.line,"text"),u=we(i,"changes"),((l=we(i,"change"))||u)&&(s={from:d,to:w,text:s.text,removed:s.removed,origin:s.origin},l&&bt(i,"change",i,s),u&&(i.curOp.changeObjs||(i.curOp.changeObjs=[])).push(s)),i.display.selForContextMenu=null}function Dn(i,s,u,l,c){l||(l=u),0>Te(l,u)&&(l=[l,u],u=l[0],l=l[1]),typeof s=="string"&&(s=i.splitLines(s)),Fn(i,{from:u,to:l,text:s,origin:c})}function Mp(i,s,u,l){u<i.line?i.line+=l:s<i.line&&(i.line=s,i.ch=0)}function Cp(i,s,u,l){for(var c=0;c<i.length;++c){var d=i[c],w=!0;if(d.ranges)for(d.copied||(d=i[c]=d.deepCopy(),d.copied=!0),w=0;w<d.ranges.length;w++)Mp(d.ranges[w].anchor,s,u,l),Mp(d.ranges[w].head,s,u,l);else{for(var b=0;b<d.changes.length;++b){var E=d.changes[b];if(u<E.from.line)E.from=pe(E.from.line+l,E.from.ch),E.to=pe(E.to.line+l,E.to.ch);else if(s<=E.to.line){w=!1;break}}w||(i.splice(0,c+1),c=0)}}}function Tp(i,s){var u=s.from.line,l=s.to.line;s=s.text.length-(l-u)-1,Cp(i.done,u,l,s),Cp(i.undone,u,l,s)}function Ys(i,s,u,l){var c=s,d=s;return typeof s=="number"?d=N(i,Math.max(i.first,Math.min(s,i.first+i.size-1))):c=oe(s),c==null?null:(l(d,c)&&i.cm&&Tr(i.cm,c,u),d)}function Hs(i){this.lines=i,this.parent=null;for(var s=0,u=0;u<i.length;++u)i[u].parent=this,s+=i[u].height;this.height=s}function Zs(i){this.children=i;for(var s=0,u=0,l=0;l<i.length;++l){var c=i[l];s+=c.chunkSize(),u+=c.height,c.parent=this}this.size=s,this.height=u,this.parent=null}function Vv(i,s,u,l){var c=new ao(i,u,l),d=i.cm;return d&&c.noHScroll&&(d.display.alignWidgets=!0),Ys(i,s,"widget",function(w){var b=w.widgets||(w.widgets=[]);return c.insertAt==null?b.push(c):b.splice(Math.min(b.length,Math.max(0,c.insertAt)),0,c),c.line=w,d&&!fi(i,w)&&(b=gi(w)<i.scrollTop,z(w,w.height+I(c)),b&&Sa(d,c.height),d.curOp.forceUpdate=!0),!0}),d&&bt(d,"lineWidgetAdded",d,c,typeof s=="number"?s:oe(s)),c}function jn(i,s,u,l,c){if(l&&l.shared)return zv(i,s,u,l,c);if(i.cm&&!i.cm.curOp)return Ut(i.cm,jn)(i,s,u,l,c);var d=new Ur(i,c);if(c=Te(s,u),l&&U(l,d,!1),0<c||c==0&&d.clearWhenEmpty!==!1)return d;if(d.replacedWith&&(d.collapsed=!0,d.widgetNode=h("span",[d.replacedWith],"CodeMirror-widget"),l.handleMouseEvents||d.widgetNode.setAttribute("cm-ignore-events","true"),l.insertLeft&&(d.widgetNode.insertLeft=!0)),d.collapsed){if(Xr(i,s.line,s,u,d)||s.line!=u.line&&Xr(i,u.line,s,u,d))throw Error("Inserting collapsed marker partially overlapping an existing one");cr=!0}d.addToHistory&&cp(i,{from:s,to:u,origin:"markText"},i.sel,NaN);var w=s.line,b=i.cm,E;if(i.iter(w,u.line+1,function(J){b&&d.collapsed&&!b.options.lineWrapping&&ui(J)==b.display.maxLine&&(E=!0),d.collapsed&&w!=s.line&&z(J,0);var W=new ki(d,w==s.line?s.ch:null,w==u.line?u.ch:null),te=i.cm&&i.cm.curOp;(te=te&&window.WeakSet&&(te.markedSpans||(te.markedSpans=new WeakSet)))&&J.markedSpans&&te.has(J.markedSpans)?J.markedSpans.push(W):(J.markedSpans=J.markedSpans?J.markedSpans.concat([W]):[W],te&&te.add(J.markedSpans)),W.marker.attachLine(J),++w}),d.collapsed&&i.iter(s.line,u.line+1,function(J){fi(i,J)&&z(J,0)}),d.clearOnEnter&&Fe(d,"beforeCursorEnter",function(){return d.clear()}),d.readOnly&&(rd=!0,(i.history.done.length||i.history.undone.length)&&i.clearHistory()),d.collapsed&&(d.id=++od,d.atomic=!0),b){if(E&&(b.curOp.updateMaxLine=!0),d.collapsed)Ht(b,s.line,u.line+1);else if(d.className||d.startStyle||d.endStyle||d.css||d.attributes||d.title)for(l=s.line;l<=u.line;l++)Tr(b,l,"text");d.atomic&&mp(b.doc),bt(b,"markerAdded",b,d)}return d}function zv(i,s,u,l,c){l=U(l),l.shared=!1;var d=[jn(i,s,u,l,c)],w=d[0],b=l.widgetNode;return Ar(i,function(E){b&&(l.widgetNode=b.cloneNode(!0)),d.push(jn(E,C(E,s),C(E,u),l,c));for(var J=0;J<E.linked.length;++J)if(E.linked[J].isParent)return;w=G(d)}),new lo(d,w)}function Ep(i){return i.findMarks(pe(i.first,0),i.clipPos(pe(i.lastLine())),function(s){return s.parent})}function Qv(i){for(var s=function(l){l=i[l];var c=[l.primary.doc];Ar(l.primary.doc,function(b){return c.push(b)});for(var d=0;d<l.markers.length;d++){var w=l.markers[d];S(c,w.doc)==-1&&(w.parent=null,l.markers.splice(d--,1))}},u=0;u<i.length;u++)s(u)}function Yv(i){var s=this;if(kp(s),!fe(s,i)&&!Z(s.display,i)){ke(i),qe&&(ad=+new Date);var u=nn(s,i,!0),l=i.dataTransfer.files;if(u&&!s.isReadOnly())if(l&&l.length&&window.FileReader&&window.File)for(var c=l.length,d=Array(c),w=0,b=function(){++w==c&&Ut(s,function(){u=C(s.doc,u);var W={from:u,to:u,text:s.doc.splitLines(d.filter(function(te){return te!=null}).join(s.doc.lineSeparator())),origin:"paste"};Fn(s.doc,W),gp(s.doc,ur(C(s.doc,u),C(s.doc,kr(W))))})()},E=function(W,te){if(s.options.allowDropFileTypes&&S(s.options.allowDropFileTypes,W.type)==-1)b();else{var ne=new FileReader;ne.onerror=function(){return b()},ne.onload=function(){var se=ne.result;/[\x00-\x08\x0e-\x1f]{2}/.test(se)||(d[te]=se),b()},ne.readAsText(W)}},J=0;J<l.length;J++)E(l[J],J);else if(s.state.draggingText&&-1<s.doc.sel.contains(u))s.state.draggingText(i),setTimeout(function(){return s.display.input.focus()},20);else try{if(E=i.dataTransfer.getData("Text")){if(s.state.draggingText&&!s.state.draggingText.copy&&(J=s.listSelections()),ka(s.doc,ur(u,u)),J)for(l=0;l<J.length;++l)Dn(s.doc,"",J[l].anchor,J[l].head,"drag");s.replaceSelection(E,"around","paste"),s.display.input.focus()}}catch{}}}function kp(i){i.display.dragCursor&&(i.display.lineSpace.removeChild(i.display.dragCursor),i.display.dragCursor=null)}function Ap(i){if(document.getElementsByClassName){for(var s=document.getElementsByClassName("CodeMirror"),u=[],l=0;l<s.length;l++){var c=s[l].CodeMirror;c&&u.push(c)}u.length&&u[0].operation(function(){for(var d=0;d<u.length;d++)i(u[d])})}}function Hv(){var i;Fe(window,"resize",function(){i==null&&(i=setTimeout(function(){i=null,Ap(Zv)},100))}),Fe(window,"blur",function(){return Ap(In)})}function Zv(i){var s=i.display;s.cachedCharWidth=s.cachedTextHeight=s.cachedPaddingH=null,s.scrollbarsClipped=!1,i.setSize()}function $v(i){var s=i.split(/-(?!$)/);i=s[s.length-1];for(var u,l,c,d,w=0;w<s.length-1;w++){var b=s[w];if(/^(cmd|meta|m)$/i.test(b))d=!0;else if(/^a(lt)?$/i.test(b))u=!0;else if(/^(c|ctrl|control)$/i.test(b))l=!0;else if(/^s(hift)?$/i.test(b))c=!0;else throw Error("Unrecognized modifier name: "+b)}return u&&(i="Alt-"+i),l&&(i="Ctrl-"+i),d&&(i="Cmd-"+i),c&&(i="Shift-"+i),i}function Xv(i){var s={},u;for(u in i)if(i.hasOwnProperty(u)){var l=i[u];if(!/^(name|fallthrough|(de|at)tach)$/.test(u)){if(l!="...")for(var c=O(u.split(" "),$v),d=0;d<c.length;d++){if(d==c.length-1)var w=c.join(" "),b=l;else w=c.slice(0,d+1).join(" "),b="...";var E=s[w];if(!E)s[w]=b;else if(E!=b)throw Error("Inconsistent bindings for "+w)}delete i[u]}}for(var J in s)i[J]=s[J];return i}function Pn(i,s,u,l){s=La(s);var c=s.call?s.call(i,l):s[i];if(c===!1)return"nothing";if(c==="...")return"multi";if(c!=null&&u(c))return"handled";if(s.fallthrough){if(Object.prototype.toString.call(s.fallthrough)!="[object Array]")return Pn(i,s.fallthrough,u,l);for(c=0;c<s.fallthrough.length;c++){var d=Pn(i,s.fallthrough[c],u,l);if(d)return d}}}function Rp(i){return i=typeof i=="string"?i:Ir[i.keyCode],i=="Ctrl"||i=="Alt"||i=="Shift"||i=="Mod"}function Lp(i,s,u){var l=i;return s.altKey&&l!="Alt"&&(i="Alt-"+i),(td?s.metaKey:s.ctrlKey)&&l!="Ctrl"&&(i="Ctrl-"+i),(td?s.ctrlKey:s.metaKey)&&l!="Mod"&&(i="Cmd-"+i),!u&&s.shiftKey&&l!="Shift"&&(i="Shift-"+i),i}function Up(i,s){if(Ui&&i.keyCode==34&&i.char)return!1;var u=Ir[i.keyCode];return u==null||i.altGraphKey?!1:(i.keyCode==3&&i.code&&(u=i.code),Lp(u,i,s))}function La(i){return typeof i=="string"?co[i]:i}function Gn(i,s){for(var u=i.doc.sel.ranges,l=[],c=0;c<u.length;c++){for(var d=s(u[c]);l.length&&0>=Te(d.from,G(l).to);){var w=l.pop();if(0>Te(w.from,d.from)){d.from=w.from;break}}l.push(d)}ri(i,function(){for(var b=l.length-1;0<=b;b--)Dn(i.doc,"",l[b].from,l[b].to,"+delete");Jn(i)})}function Ou(i,s,u){return s=$(i.text,s+u,u),0>s||s>i.text.length?null:s}function Bu(i,s,u){return i=Ou(i,s.ch,u),i==null?null:new pe(s.line,i,0>u?"after":"before")}function Fu(i,s,u,l,c){if(i&&(s.doc.direction=="rtl"&&(c=-c),i=ie(u,s.doc.direction))){i=0>c?G(i):i[0];var d=0>c==(i.level==1)?"after":"before";if(0<i.level||s.doc.direction=="rtl"){var w=rn(s,u),b=0>c?u.text.length-1:0,E=Ai(s,w,b).top;b=ce(function(J){return Ai(s,w,J).top==E},0>c==(i.level==1)?i.from:i.to-1,b),d=="before"&&(b=Ou(u,b,1))}else b=0>c?i.to:i.from;return new pe(l,b,d)}return new pe(l,0>c?u.text.length:0,0>c?"before":"after")}function qv(i,s,u,l){var c=ie(s,i.doc.direction);if(!c)return Bu(s,u,l);u.ch>=s.text.length?(u.ch=s.text.length,u.sticky="before"):0>=u.ch&&(u.ch=0,u.sticky="after");var d=re(c,u.ch,u.sticky),w=c[d];if(i.doc.direction=="ltr"&&w.level%2==0&&(0<l?w.to>u.ch:w.from<u.ch))return Bu(s,u,l);var b=function(se,ge){return Ou(s,se instanceof pe?se.ch:se,ge)},E,J=function(se){return i.options.lineWrapping?(E=E||rn(i,s),Wh(i,s,E,se)):{begin:0,end:s.text.length}},W=J(u.sticky=="before"?b(u,-1):u.ch);if(i.doc.direction=="rtl"||w.level==1){var te=w.level==1==0>l,ne=b(u,te?1:-1);if(ne!=null&&(te?ne<=w.to&&ne<=W.end:ne>=w.from&&ne>=W.begin))return new pe(u.line,ne,te?"before":"after")}return w=function(se,ge,Ee){for(var je=function(at,pt){return pt?new pe(u.line,b(at,1),"before"):new pe(u.line,at,"after")};0<=se&&se<c.length;se+=ge){var Rt=c[se],Je=0<ge==(Rt.level!=1),ct=Je?Ee.begin:b(Ee.end,-1);if(Rt.from<=ct&&ct<Rt.to||(ct=Je?Rt.from:b(Rt.to,-1),Ee.begin<=ct&&ct<Ee.end))return je(ct,Je)}},(d=w(d+l,l,W))?d:(W=0<l?W.end:b(W.begin,-1),W==null||0<l&&W==s.text.length||!(d=w(0<l?0:c.length-1,l,J(W)))?null:d)}function Ip(i,s){var u=N(i.doc,s),l=ui(u);return l!=u&&(s=oe(l)),Fu(!0,i,l,s,1)}function Jp(i,s){var u=Ip(i,s.line),l=N(i.doc,u.line);return i=ie(l,i.doc.direction),i&&i[0].level!=0?u:(l=Math.max(u.ch,l.text.search(/\S/)),pe(u.line,s.line==u.line&&s.ch<=l&&s.ch?0:l,u.sticky))}function Ua(i,s,u){if(typeof s=="string"&&(s=ho[s],!s))return!1;i.display.input.ensurePolled();var l=i.display.shift,c=!1;try{i.isReadOnly()&&(i.state.suppressEdits=!0),u&&(i.display.shift=!1),c=s(i)!=Fa}finally{i.display.shift=l,i.state.suppressEdits=!1}return c}function $s(i,s,u,l){var c=i.state.keySeq;if(c){if(Rp(s))return"handled";if(/'$/.test(s)?i.state.keySeq=null:A_.set(50,function(){i.state.keySeq==c&&(i.state.keySeq=null,i.display.input.reset())}),Np(i,c+" "+s,u,l))return!0}return Np(i,s,u,l)}function Np(i,s,u,l){e:{for(var c=0;c<i.state.keyMaps.length;c++){var d=Pn(s,i.state.keyMaps[c],l,i);if(d){l=d;break e}}l=i.options.extraKeys&&Pn(s,i.options.extraKeys,l,i)||Pn(s,i.options.keyMap,l,i)}return l=="multi"&&(i.state.keySeq=s),l=="handled"&&bt(i,"keyHandled",i,s,u),(l=="handled"||l=="multi")&&(ke(u),bu(i)),!!l}function Op(i,s){var u=Up(s,!0);return u?s.shiftKey&&!i.state.keySeq?$s(i,"Shift-"+u,s,function(l){return Ua(i,l,!0)})||$s(i,u,s,function(l){if(typeof l=="string"?/^go[A-Z]/.test(l):l.motion)return Ua(i,l)}):$s(i,u,s,function(l){return Ua(i,l)}):!1}function e_(i,s,u){return $s(i,"'"+u+"'",s,function(l){return Ua(i,l,!0)})}function Bp(i){if((!i.target||i.target==this.display.input.getField())&&(this.curOp.focus=v(m(this)),!fe(this,i))){qe&&11>_t&&i.keyCode==27&&(i.returnValue=!1);var s=i.keyCode;this.display.shift=s==16||i.shiftKey;var u=Op(this,i);Ui&&(Yu=u?s:null,!u&&s==88&&!M_&&(yi?i.metaKey:i.ctrlKey)&&this.replaceSelection("",null,"cut")),fr&&!yi&&!u&&s==46&&i.shiftKey&&!i.ctrlKey&&document.execCommand&&document.execCommand("cut"),s!=18||/\bCodeMirror-crosshair\b/.test(this.display.lineDiv.className)||t_(this)}}function t_(i){function s(l){l.keyCode!=18&&l.altKey||(fn(u,"CodeMirror-crosshair"),K(document,"keyup",s),K(document,"mouseover",s))}var u=i.display.lineDiv;_(u,"CodeMirror-crosshair"),Fe(document,"keyup",s),Fe(document,"mouseover",s)}function Fp(i){i.keyCode==16&&(this.doc.sel.shift=!1),fe(this,i)}function Dp(i){if(!(i.target&&i.target!=this.display.input.getField()||Z(this.display,i)||fe(this,i)||i.ctrlKey&&!i.altKey||yi&&i.metaKey)){var s=i.keyCode,u=i.charCode;Ui&&s==Yu?(Yu=null,ke(i)):(!Ui||i.which&&!(10>i.which)||!Op(this,i))&&(s=String.fromCharCode(u??s),s!="\b"&&!e_(this,i,s)&&this.display.input.onKeyPress(i))}}function i_(i,s){var u=+new Date;return go&&go.compare(u,i,s)?(po=go=null,"triple"):po&&po.compare(u,i,s)?(go=new Hu(u,i,s),po=null,"double"):(po=new Hu(u,i,s),go=null,"single")}function jp(i){var s=this.display;if(!(fe(this,i)||s.activeTouch&&s.input.supportsTouch())){if(s.input.ensurePolled(),s.shift=i.shiftKey,Z(s,i))Kt||(s.scroller.draggable=!1,setTimeout(function(){return s.scroller.draggable=!0},100));else if(!Ia(this,i,"gutterClick",!0)){var u=nn(this,i),l=ue(i),c=u?i_(u,l):"single";m(this).defaultView.focus(),l==1&&this.state.selectingText&&this.state.selectingText(i),(!u||!r_(this,l,u,c,i))&&(l==1?u?n_(this,u,c,i):(i.target||i.srcElement)==s.scroller&&ke(i):l==2?(u&&Ea(this.doc,u),setTimeout(function(){return s.input.focus()},20)):l==3&&(Pu?this.display.input.onContextMenu(i):xu(this)))}}}function r_(i,s,u,l,c){var d="Click";return l=="double"?d="Double"+d:l=="triple"&&(d="Triple"+d),$s(i,Lp((s==1?"Left":s==2?"Middle":"Right")+d,c),c,function(w){if(typeof w=="string"&&(w=ho[w]),!w)return!1;var b=!1;try{i.isReadOnly()&&(i.state.suppressEdits=!0),b=w(i,u)!=Fa}finally{i.state.suppressEdits=!1}return b})}function n_(i,s,u,l){qe?setTimeout(x(Qh,i),0):i.curOp.focus=v(m(i));var c=i.getOption("configureMouse");c=c?c(i,u,l):{},c.unit==null&&(c.unit=(m_?l.shiftKey&&l.metaKey:l.altKey)?"rectangle":u=="single"?"char":u=="double"?"word":"line"),(c.extend==null||i.doc.extend)&&(c.extend=i.doc.extend||l.shiftKey),c.addNew==null&&(c.addNew=yi?l.metaKey:l.ctrlKey),c.moveOnDrag==null&&(c.moveOnDrag=!(yi?l.altKey:l.ctrlKey));var d=i.doc.sel,w;i.options.dragDrop&&x_&&!i.isReadOnly()&&u=="single"&&-1<(w=d.contains(s))&&(0>Te((w=d.ranges[w]).from(),s)||0<s.xRel)&&(0<Te(w.to(),s)||0>s.xRel)?s_(i,l,s,c):o_(i,l,s,c)}function s_(i,s,u,l){var c=i.display,d=!1,w=Ut(i,function(J){Kt&&(c.scroller.draggable=!1),i.state.draggingText=!1,i.state.delayingBlurEvent&&(i.hasFocus()?i.state.delayingBlurEvent=!1:xu(i)),K(c.wrapper.ownerDocument,"mouseup",w),K(c.wrapper.ownerDocument,"mousemove",b),K(c.scroller,"dragstart",E),K(c.scroller,"drop",w),d||(ke(J),l.addNew||Ea(i.doc,u,null,null,l.extend),Kt&&!Oa||qe&&_t==9?setTimeout(function(){c.wrapper.ownerDocument.body.focus({preventScroll:!0}),c.input.focus()},20):c.input.focus())}),b=function(J){d=d||10<=Math.abs(s.clientX-J.clientX)+Math.abs(s.clientY-J.clientY)},E=function(){return d=!0};Kt&&(c.scroller.draggable=!0),i.state.draggingText=w,w.copy=!l.moveOnDrag,Fe(c.wrapper.ownerDocument,"mouseup",w),Fe(c.wrapper.ownerDocument,"mousemove",b),Fe(c.scroller,"dragstart",E),Fe(c.scroller,"drop",w),i.state.delayingBlurEvent=!0,setTimeout(function(){return c.input.focus()},20),c.scroller.dragDrop&&c.scroller.dragDrop()}function Pp(i,s,u){return u=="char"?new rt(s,s):u=="word"?i.findWordAt(s):u=="line"?new rt(pe(s.line,0),C(i.doc,pe(s.line+1,0))):(i=u(i,s),new rt(i.from,i.to))}function o_(i,s,u,l){function c(Je){if(Te(se,Je)!=0)if(se=Je,l.unit=="rectangle"){var ct=[],at=i.options.tabSize,pt=R(N(E,u.line).text,u.ch,at),vt=R(N(E,Je.line).text,Je.ch,at),We=Math.min(pt,vt);pt=Math.max(pt,vt),vt=Math.min(u.line,Je.line);for(var dt=Math.min(i.lastLine(),Math.max(u.line,Je.line));vt<=dt;vt++){var et=N(E,vt).text,lt=g(et,We,at);We==pt?ct.push(new rt(pe(vt,lt),pe(vt,lt))):et.length>lt&&ct.push(new rt(pe(vt,lt),pe(vt,g(et,pt,at))))}ct.length||ct.push(new rt(u,u)),Ot(E,Li(i,J.ranges.slice(0,te).concat(ct),te),{origin:"*mouse",scroll:!1}),i.scrollIntoView(Je)}else ct=ne,We=Pp(i,Je,l.unit),Je=ct.anchor,0<Te(We.anchor,Je)?(at=We.head,Je=M(ct.from(),We.anchor)):(at=We.anchor,Je=B(ct.to(),We.head)),ct=J.ranges.slice(0),ct[te]=a_(i,new rt(C(E,Je),at)),Ot(E,Li(i,ct,te),Gu)}function d(Je){var ct=++Ee,at=nn(i,Je,!0,l.unit=="rectangle");if(at)if(Te(at,se)!=0){i.curOp.focus=v(m(i)),c(at);var pt=xa(b,E);(at.line>=pt.to||at.line<pt.from)&&setTimeout(Ut(i,function(){Ee==ct&&d(Je)}),150)}else{var vt=Je.clientY<ge.top?-20:Je.clientY>ge.bottom?20:0;vt&&setTimeout(Ut(i,function(){Ee==ct&&(b.scroller.scrollTop+=vt,d(Je))}),50)}}function w(Je){i.state.selectingText=!1,Ee=1/0,Je&&(ke(Je),b.input.focus()),K(b.wrapper.ownerDocument,"mousemove",je),K(b.wrapper.ownerDocument,"mouseup",Rt),E.history.lastSelOrigin=null}qe&&xu(i);var b=i.display,E=i.doc;ke(s);var J=E.sel,W=J.ranges;if(l.addNew&&!l.extend)var te=E.sel.contains(u),ne=-1<te?W[te]:new rt(u,u);else ne=E.sel.primary(),te=E.sel.primIndex;l.unit=="rectangle"?(l.addNew||(ne=new rt(u,u)),u=nn(i,s,!0,!0),te=-1):(s=Pp(i,u,l.unit),ne=l.extend?Ju(ne,s.anchor,s.head,l.extend):s),l.addNew?te==-1?(te=W.length,Ot(E,Li(i,W.concat([ne]),te),{scroll:!1,origin:"*mouse"})):1<W.length&&W[te].empty()&&l.unit=="char"&&!l.extend?(Ot(E,Li(i,W.slice(0,te).concat(W.slice(te+1)),0),{scroll:!1,origin:"*mouse"}),J=E.sel):Nu(E,te,ne,Gu):(te=0,Ot(E,new ci([ne],0),Gu),J=E.sel);var se=u,ge=b.wrapper.getBoundingClientRect(),Ee=0,je=Ut(i,function(Je){Je.buttons!==0&&ue(Je)?d(Je):w(Je)}),Rt=Ut(i,w);i.state.selectingText=Rt,Fe(b.wrapper.ownerDocument,"mousemove",je),Fe(b.wrapper.ownerDocument,"mouseup",Rt)}function a_(i,s){var u=s.anchor,l=s.head,c=N(i.doc,u.line);if(Te(u,l)==0&&u.sticky==l.sticky||(c=ie(c),!c))return s;var d=re(c,u.ch,u.sticky),w=c[d];if(w.from!=u.ch&&w.to!=u.ch)return s;var b=d+(w.from==u.ch==(w.level!=1)?0:1);return b==0||b==c.length?s:(l.line!=u.line?i=0<(l.line-u.line)*(i.doc.direction=="ltr"?1:-1):(i=re(c,l.ch,l.sticky),d=i-d||(l.ch-u.ch)*(w.level==1?-1:1),i=i==b-1||i==b?0>d:0<d),c=c[b+(i?-1:0)],c=(b=i==(c.level==1))?c.from:c.to,b=b?"after":"before",u.ch==c&&u.sticky==b?s:new rt(new pe(u.line,c,b),l))}function Ia(i,s,u,l){if(s.touches)var c=s.touches[0].clientX,d=s.touches[0].clientY;else try{c=s.clientX,d=s.clientY}catch{return!1}if(c>=Math.floor(i.display.gutters.getBoundingClientRect().right))return!1;l&&ke(s),l=i.display;var w=l.lineDiv.getBoundingClientRect();if(d>w.bottom||!we(i,u))return ze(s);for(d-=w.top-l.viewOffset,w=0;w<i.display.gutterSpecs.length;++w){var b=l.gutters.childNodes[w];if(b&&b.getBoundingClientRect().right>=c)return c=_e(i.doc,d),X(i,u,i,c,i.display.gutterSpecs[w].className,s),ze(s)}}function Gp(i,s){var u;(u=Z(i.display,s))||(u=we(i,"gutterContextMenu")?Ia(i,s,"gutterContextMenu",!1):!1),!u&&!fe(i,s,"contextmenu")&&!Pu&&i.display.input.onContextMenu(s)}function Wp(i){i.display.wrapper.className=i.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+i.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ds(i)}function l_(i,s,u){!s!=!(u&&u!=Yn)&&(u=i.display.dragFunctions,s=s?Fe:K,s(i.display.scroller,"dragstart",u.start),s(i.display.scroller,"dragenter",u.enter),s(i.display.scroller,"dragover",u.over),s(i.display.scroller,"dragleave",u.leave),s(i.display.scroller,"drop",u.drop))}function u_(i){i.options.lineWrapping?(_(i.display.wrapper,"CodeMirror-wrap"),i.display.sizer.style.minWidth="",i.display.sizerWidth=null):(fn(i.display.wrapper,"CodeMirror-wrap"),Ns(i)),_u(i),Ht(i),Ds(i),setTimeout(function(){return Nn(i)},100)}function wt(i,s){var u=this;if(!(this instanceof wt))return new wt(i,s);this.options=s=s?U(s):{},U(ud,s,!1);var l=s.value;typeof l=="string"?l=new $t(l,s.mode,null,s.lineSeparator,s.direction):s.mode&&(l.modeOption=s.mode),this.doc=l;var c=new wt.inputStyles[s.inputStyle](this);i=this.display=new jv(i,l,c,s),i.wrapper.CodeMirror=this,Wp(this),s.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Xh(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Lr,keySeq:null,specialChars:null},s.autofocus&&!eo&&i.input.focus(),qe&&11>_t&&setTimeout(function(){return u.display.input.reset(!0)},20),f_(this),ld||(Hv(),ld=!0),an(this),this.curOp.forceUpdate=!0,lp(this,l),s.autofocus&&!eo||this.hasFocus()?setTimeout(function(){u.hasFocus()&&!u.state.focused&&Su(u)},20):In(this);for(var d in Va)Va.hasOwnProperty(d)&&Va[d](this,s[d],Yn);for(tp(this),s.finishInit&&s.finishInit(this),l=0;l<Zu.length;++l)Zu[l](this);ln(this),Kt&&s.lineWrapping&&getComputedStyle(i.lineDiv).textRendering=="optimizelegibility"&&(i.lineDiv.style.textRendering="auto")}function f_(i){function s(){l.activeTouch&&(c=setTimeout(function(){return l.activeTouch=null},1e3),d=l.activeTouch,d.end=+new Date)}function u(b,E){if(E.left==null)return!0;var J=E.left-b.left;return b=E.top-b.top,400<J*J+b*b}var l=i.display;Fe(l.scroller,"mousedown",Ut(i,jp)),qe&&11>_t?Fe(l.scroller,"dblclick",Ut(i,function(b){if(!fe(i,b)){var E=nn(i,b);!E||Ia(i,b,"gutterClick",!0)||Z(i.display,b)||(ke(b),b=i.findWordAt(E),Ea(i.doc,b.anchor,b.head))}})):Fe(l.scroller,"dblclick",function(b){return fe(i,b)||ke(b)}),Fe(l.scroller,"contextmenu",function(b){return Gp(i,b)}),Fe(l.input.getField(),"contextmenu",function(b){l.scroller.contains(b.target)||Gp(i,b)});var c,d={end:0};Fe(l.scroller,"touchstart",function(b){var E;(E=!fe(i,b))&&(b.touches.length!=1?E=!1:(E=b.touches[0],E=1>=E.radiusX&&1>=E.radiusY),E=!E),E&&!Ia(i,b,"gutterClick",!0)&&(l.input.ensurePolled(),clearTimeout(c),E=+new Date,l.activeTouch={start:E,moved:!1,prev:300>=E-d.end?d:null},b.touches.length==1&&(l.activeTouch.left=b.touches[0].pageX,l.activeTouch.top=b.touches[0].pageY))}),Fe(l.scroller,"touchmove",function(){l.activeTouch&&(l.activeTouch.moved=!0)}),Fe(l.scroller,"touchend",function(b){var E=l.activeTouch;if(E&&!Z(l,b)&&E.left!=null&&!E.moved&&300>new Date-E.start){var J=i.coordsChar(l.activeTouch,"page");E=!E.prev||u(E,E.prev)?new rt(J,J):!E.prev.prev||u(E,E.prev.prev)?i.findWordAt(J):new rt(pe(J.line,0),C(i.doc,pe(J.line+1,0))),i.setSelection(E.anchor,E.head),i.focus(),ke(b)}s()}),Fe(l.scroller,"touchcancel",s),Fe(l.scroller,"scroll",function(){l.scroller.clientHeight&&(Gs(i,l.scroller.scrollTop),on(i,l.scroller.scrollLeft,!0),X(i,"scroll",i))}),Fe(l.scroller,"mousewheel",function(b){return np(i,b)}),Fe(l.scroller,"DOMMouseScroll",function(b){return np(i,b)}),Fe(l.wrapper,"scroll",function(){return l.wrapper.scrollTop=l.wrapper.scrollLeft=0}),l.dragFunctions={enter:function(b){fe(i,b)||le(b)},over:function(b){if(!fe(i,b)){var E=nn(i,b);if(E){var J=document.createDocumentFragment();wu(i,E,J),i.display.dragCursor||(i.display.dragCursor=f("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),i.display.lineSpace.insertBefore(i.display.dragCursor,i.display.cursorDiv)),a(i.display.dragCursor,J)}le(b)}},start:function(b){if(qe&&(!i.state.draggingText||100>+new Date-ad))le(b);else if(!fe(i,b)&&!Z(i.display,b)&&(b.dataTransfer.setData("Text",i.getSelection()),b.dataTransfer.effectAllowed="copyMove",b.dataTransfer.setDragImage&&!Oa)){var E=f("img",null,null,"position: fixed; left: 0; top: 0;");E.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Ui&&(E.width=E.height=1,i.display.wrapper.appendChild(E),E._top=E.offsetTop),b.dataTransfer.setDragImage(E,0,0),Ui&&E.parentNode.removeChild(E)}},drop:Ut(i,Yv),leave:function(b){fe(i,b)||kp(i)}};var w=l.input.getField();Fe(w,"keyup",function(b){return Fp.call(i,b)}),Fe(w,"keydown",Ut(i,Bp)),Fe(w,"keypress",Ut(i,Dp)),Fe(w,"focus",function(b){return Su(i,b)}),Fe(w,"blur",function(b){return In(i,b)})}function Xs(i,s,u,l){var c=i.doc,d;u==null&&(u="add"),u=="smart"&&(c.mode.indent?d=me(i,s).state:u="prev");var w=i.options.tabSize,b=N(c,s),E=R(b.text,null,w);b.stateAfter&&(b.stateAfter=null);var J=b.text.match(/^\s*/)[0];if(!l&&!/\S/.test(b.text)){var W=0;u="not"}else if(u=="smart"&&(W=c.mode.indent(d,b.text.slice(J.length),b.text),W==Fa||150<W)){if(!l)return;u="prev"}if(u=="prev"?W=s>c.first?R(N(c,s-1).text,null,w):0:u=="add"?W=E+i.options.indentUnit:u=="subtract"?W=E-i.options.indentUnit:typeof u=="number"&&(W=E+u),W=Math.max(0,W),u="",l=0,i.options.indentWithTabs)for(i=Math.floor(W/w);i;--i)l+=w,u+=" ";if(l<W&&(u+=L(W-l)),u!=J)return Dn(c,u,pe(s,0),pe(s,J.length),"+input"),b.stateAfter=null,!0;for(w=0;w<c.sel.ranges.length;w++)if(b=c.sel.ranges[w],b.head.line==s&&b.head.ch<J.length){s=pe(s,J.length),Nu(c,w,new rt(s,s));break}}function Du(i,s,u,l,c){var d=i.doc;i.display.shift=!1,l||(l=d.sel);var w=+new Date-200,b=c=="paste"||i.state.pasteIncoming>w,E=Vu(s),J=null;if(b&&1<l.ranges.length)if(ni&&ni.text.join(`
|
||
`)==s){if(l.ranges.length%ni.text.length==0){J=[];for(var W=0;W<ni.text.length;W++)J.push(d.splitLines(ni.text[W]))}}else E.length==l.ranges.length&&i.options.pasteLinesPerSelection&&(J=O(E,function(Ee){return[Ee]}));W=i.curOp.updateInput;for(var te=l.ranges.length-1;0<=te;te--){var ne=l.ranges[te],se=ne.from(),ge=ne.to();ne.empty()&&(u&&0<u?se=pe(se.line,se.ch-u):i.state.overwrite&&!b?ge=pe(ge.line,Math.min(N(d,ge.line).text.length,ge.ch+G(E).length)):b&&ni&&ni.lineWise&&ni.text.join(`
|
||
`)==E.join(`
|
||
`)&&(se=ge=pe(se.line,0))),ne={from:se,to:ge,text:J?J[te%J.length]:E,origin:c||(b?"paste":i.state.cutIncoming>w?"cut":"+input")},Fn(i.doc,ne),bt(i,"inputRead",i,ne)}s&&!b&&Vp(i,s),Jn(i),2>i.curOp.updateInput&&(i.curOp.updateInput=W),i.curOp.typing=!0,i.state.pasteIncoming=i.state.cutIncoming=-1}function Kp(i,s){var u=i.clipboardData&&i.clipboardData.getData("Text");if(u)return i.preventDefault(),s.isReadOnly()||s.options.disableInput||!s.hasFocus()||ri(s,function(){return Du(s,u,0,null,"paste")}),!0}function Vp(i,s){if(i.options.electricChars&&i.options.smartIndent)for(var u=i.doc.sel,l=u.ranges.length-1;0<=l;l--){var c=u.ranges[l];if(!(100<c.head.ch||l&&u.ranges[l-1].head.line==c.head.line)){var d=i.getModeAt(c.head),w=!1;if(d.electricChars){for(var b=0;b<d.electricChars.length;b++)if(-1<s.indexOf(d.electricChars.charAt(b))){w=Xs(i,c.head.line,"smart");break}}else d.electricInput&&d.electricInput.test(N(i.doc,c.head.line).text.slice(0,c.head.ch))&&(w=Xs(i,c.head.line,"smart"));w&&bt(i,"electricInput",i,c.head.line)}}}function zp(i){for(var s=[],u=[],l=0;l<i.doc.sel.ranges.length;l++){var c=i.doc.sel.ranges[l].head.line;c={anchor:pe(c,0),head:pe(c+1,0)},u.push(c),s.push(i.getRange(c.anchor,c.head))}return{text:s,ranges:u}}function Qp(i,s,u,l){i.setAttribute("autocorrect",u?"":"off"),i.setAttribute("autocapitalize",l?"":"off"),i.setAttribute("spellcheck",!!s)}function Yp(){var i=f("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),s=f("div",[i],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Kt?i.style.width="1000px":i.setAttribute("wrap","off"),qs&&(i.style.border="1px solid black"),Qp(i),s}function ju(i,s,u,l,c){function d(Ee){if(l=="codepoint"){var je=E.text.charCodeAt(s.ch+(0<u?0:-1));je=isNaN(je)?null:new pe(s.line,Math.max(0,Math.min(E.text.length,s.ch+u*((0<u?55296<=je&&56320>je:56320<=je&&57343>je)?2:1))),-u)}else je=c?qv(i.cm,E,s,u):Bu(E,s,u);if(je==null)if((Ee=!Ee)&&(Ee=s.line+J,Ee<i.first||Ee>=i.first+i.size?Ee=!1:(s=new pe(Ee,s.ch,s.sticky),Ee=E=N(i,Ee))),Ee)s=Fu(c,i.cm,E,s.line,J);else return!1;else s=je;return!0}var w=s,b=u,E=N(i,s.line),J=c&&i.direction=="rtl"?-u:u;if(l=="char"||l=="codepoint")d();else if(l=="column")d(!0);else if(l=="word"||l=="group")for(var W=null,te=l=="group",ne=i.cm&&i.cm.getHelper(s,"wordChars"),se=!0;!(0>u)||d(!se);se=!1){var ge=E.text.charAt(s.ch)||`
|
||
`;if(ge=ee(ge,ne)?"w":te&&ge==`
|
||
`?"n":!te||/\s/.test(ge)?null:"p",!te||se||ge||(ge="s"),W&&W!=ge){0>u&&(u=1,d(),s.sticky="after");break}if(ge&&(W=ge),0<u&&!d(!se))break}return b=Aa(i,s,w,b,!0),Ke(w,b)&&(b.hitSide=!0),b}function Hp(i,s,u,l){var c=i.doc,d=s.left;if(l=="page"){var w=Math.min(i.display.wrapper.clientHeight,m(i).defaultView.innerHeight||c(i).documentElement.clientHeight);w=Math.max(w-.5*Ln(i.display),3),w=(0<u?s.bottom:s.top)+u*w}else l=="line"&&(w=0<u?s.bottom+3:s.top-3);for(;s=gu(i,d,w),!!s.outside;){if(0>u?0>=w:w>=c.height){s.hitSide=!0;break}w+=5*u}return s}function Zp(i,s){var u=hu(i,s.line);if(!u||u.hidden)return null;var l=N(i.doc,s.line);return u=Rn(u,l,s.line),i=ie(l,i.doc.direction),l="left",i&&(l=re(i,s.ch)%2?"right":"left"),s=Nh(u.map,s.ch,l),s.offset=s.collapse=="right"?s.end:s.start,s}function c_(i){for(;i;i=i.parentNode)if(/CodeMirror-gutter-wrapper/.test(i.className))return!0;return!1}function Wn(i,s){return s&&(i.bad=!0),i}function h_(i,s,u,l,c){function d(se){return function(ge){return ge.id==se}}function w(){W&&(J+=te,ne&&(J+=te),W=ne=!1)}function b(se){se&&(w(),J+=se)}function E(se){if(se.nodeType==1){var ge=se.getAttribute("cm-text");if(ge)b(ge);else{ge=se.getAttribute("cm-marker");var Ee;if(ge)se=i.findMarks(pe(l,0),pe(c+1,0),d(+ge)),se.length&&(Ee=se[0].find(0))&&b(T(i.doc,Ee.from,Ee.to).join(te));else if(se.getAttribute("contenteditable")!="false"&&(Ee=/^(pre|div|p|li|table|br)$/i.test(se.nodeName),/^br$/i.test(se.nodeName)||se.textContent.length!=0)){for(Ee&&w(),ge=0;ge<se.childNodes.length;ge++)E(se.childNodes[ge]);/^(pre|p)$/i.test(se.nodeName)&&(ne=!0),Ee&&(W=!0)}}}else se.nodeType==3&&b(se.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(var J="",W=!1,te=i.doc.lineSeparator(),ne=!1;E(s),s!=u;)s=s.nextSibling,ne=!1;return J}function Ja(i,s,u){if(s==i.display.lineDiv){var l=i.display.lineDiv.childNodes[u];if(!l)return Wn(i.clipPos(pe(i.display.viewTo-1)),!0);s=null,u=0}else for(l=s;;l=l.parentNode){if(!l||l==i.display.lineDiv)return null;if(l.parentNode&&l.parentNode==i.display.lineDiv)break}for(var c=0;c<i.display.view.length;c++){var d=i.display.view[c];if(d.node==l)return p_(d,s,u)}}function p_(i,s,u){function l(W,te,ne){for(var se=-1;se<(J?J.length:0);se++)for(var ge=0>se?E.map:J[se],Ee=0;Ee<ge.length;Ee+=3){var je=ge[Ee+2];if(je==W||je==te)return te=oe(0>se?i.line:i.rest[se]),se=ge[Ee]+ne,(0>ne||je!=W)&&(se=ge[Ee+(ne?1:0)]),pe(te,se)}}var c=i.text.firstChild,d=!1;if(!s||!p(c,s))return Wn(pe(oe(i.line),0),!0);if(s==c&&(d=!0,s=c.childNodes[u],u=0,!s))return u=i.rest?G(i.rest):i.line,Wn(pe(oe(u),u.text.length),d);var w=s.nodeType==3?s:null,b=s;for(w||s.childNodes.length!=1||s.firstChild.nodeType!=3||(w=s.firstChild,u&&(u=w.nodeValue.length));b.parentNode!=c;)b=b.parentNode;var E=i.measure,J=E.maps;if(s=l(w,b,u))return Wn(s,d);for(c=b.nextSibling,w=w?w.nodeValue.length-u:0;c;c=c.nextSibling){if(s=l(c,c.firstChild,0))return Wn(pe(s.line,s.ch-w),d);w+=c.textContent.length}for(b=b.previousSibling;b;b=b.previousSibling){if(s=l(b,b.firstChild,-1))return Wn(pe(s.line,s.ch+u),d);u+=b.textContent.length}}var Zt=navigator.userAgent,$p=navigator.platform,fr=/gecko\/\d/i.test(Zt),Xp=/MSIE \d/.test(Zt),qp=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Zt),Na=/Edge\/(\d+)/.exec(Zt),qe=Xp||qp||Na,_t=qe&&(Xp?document.documentMode||6:+(Na||qp)[1]),Kt=!Na&&/WebKit\//.test(Zt),d_=Kt&&/Qt\/\d+\.\d+/.test(Zt),Rr=!Na&&/Chrome\/(\d+)/.exec(Zt),ed=Rr&&+Rr[1],Ui=/Opera\//.test(Zt),Oa=/Apple Computer/.test(navigator.vendor),g_=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Zt),y_=/PhantomJS/.test(Zt),qs=Oa&&(/Mobile\/\w+/.test(Zt)||2<navigator.maxTouchPoints),Ba=/Android/.test(Zt),eo=qs||Ba||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Zt),yi=qs||/Mac/.test($p),m_=/\bCrOS\b/.test(Zt),v_=/win/i.test($p),un=Ui&&Zt.match(/Version\/(\d*\.\d*)/);un&&(un=Number(un[1])),un&&15<=un&&(Ui=!1,Kt=!0);var td=yi&&(d_||Ui&&(un==null||12.11>un)),Pu=fr||qe&&9<=_t,fn=function(i,s){var u=i.className;if(s=n(s).exec(u)){var l=u.slice(s.index+s[0].length);i.className=u.slice(0,s.index)+(l?s[1]+l:"")}},to=document.createRange?function(i,s,u,l){var c=document.createRange();return c.setEnd(l||i,u),c.setStart(i,s),c}:function(i,s,u){var l=document.body.createTextRange();try{l.moveToElementText(i.parentNode)}catch{return l}return l.collapse(!0),l.moveEnd("character",u),l.moveStart("character",s),l},io=function(i){i.select()};qs?io=function(i){i.selectionStart=0,i.selectionEnd=i.value.length}:qe&&(io=function(i){try{i.select()}catch{}});var Lr=function(){this.f=this.id=null,this.time=0,this.handler=x(this.onTimeout,this)};Lr.prototype.onTimeout=function(i){i.id=0,i.time<=+new Date?i.f():setTimeout(i.handler,i.time-+new Date)},Lr.prototype.set=function(i,s){this.f=s,s=+new Date+i,(!this.id||s<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,i),this.time=s)};var Fa={toString:function(){return"CodeMirror.Pass"}},Qi={scroll:!1},Gu={origin:"*mouse"},ro={origin:"+move"},Da=[""],__=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,w_=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/,no=null,b_=function(){function i(w,b,E){this.level=w,this.from=b,this.to=E}var s=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,u=/[stwN]/,l=/[LRr]/,c=/[Lb1n]/,d=/[1n]/;return function(w,b){var E=b=="ltr"?"L":"R";if(w.length==0||b=="ltr"&&!s.test(w))return!1;for(var J=w.length,W=[],te=0;te<J;++te){var ne=W,se=ne.push,ge=w.charCodeAt(te);ge=247>=ge?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(ge):1424<=ge&&1524>=ge?"R":1536<=ge&&1785>=ge?"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111".charAt(ge-1536):1774<=ge&&2220>=ge?"r":8192<=ge&&8203>=ge?"w":ge==8204?"b":"L",se.call(ne,ge)}for(te=0,ne=E;te<J;++te)se=W[te],se=="m"?W[te]=ne:ne=se;for(te=0,ne=E;te<J;++te)se=W[te],se=="1"&&ne=="r"?W[te]="n":l.test(se)&&(ne=se,se=="r"&&(W[te]="R"));for(te=1,ne=W[0];te<J-1;++te)se=W[te],se=="+"&&ne=="1"&&W[te+1]=="1"?W[te]="1":se!=","||ne!=W[te+1]||ne!="1"&&ne!="n"||(W[te]=ne),ne=se;for(te=0;te<J;++te)if(ne=W[te],ne==",")W[te]="N";else if(ne=="%"){for(ne=te+1;ne<J&&W[ne]=="%";++ne);for(se=te&&W[te-1]=="!"||ne<J&&W[ne]=="1"?"1":"N";te<ne;++te)W[te]=se;te=ne-1}for(te=0,ne=E;te<J;++te)se=W[te],ne=="L"&&se=="1"?W[te]="L":l.test(se)&&(ne=se);for(ne=0;ne<J;++ne)if(u.test(W[ne])){for(te=ne+1;te<J&&u.test(W[te]);++te);for(se=(ne?W[ne-1]:E)=="L",se=se==((te<J?W[te]:E)=="L")?se?"L":"R":E;ne<te;++ne)W[ne]=se;ne=te-1}E=[];var Ee;for(te=0;te<J;)if(c.test(W[te])){for(ne=te,++te;te<J&&c.test(W[te]);++te);E.push(new i(0,ne,te))}else{var je=te;for(ne=E.length,se=b=="rtl"?1:0,++te;te<J&&W[te]!="L";++te);for(ge=je;ge<te;)if(d.test(W[ge])){for(je<ge&&(E.splice(ne,0,new i(1,je,ge)),ne+=se),je=ge,++ge;ge<te&&d.test(W[ge]);++ge);E.splice(ne,0,new i(2,je,ge)),ne+=se,je=ge}else++ge;je<te&&E.splice(ne,0,new i(1,je,te))}return b=="ltr"&&(E[0].level==1&&(Ee=w.match(/^\s+/))&&(E[0].from=Ee[0].length,E.unshift(new i(0,0,Ee[0].length))),G(E).level==1&&(Ee=w.match(/\s+$/))&&(G(E).to-=Ee[0].length,E.push(new i(0,J-Ee[0].length,J)))),b=="rtl"?E.reverse():E}}(),ja=[],Fe=function(i,s,u){i.addEventListener?i.addEventListener(s,u,!1):i.attachEvent?i.attachEvent("on"+s,u):(i=i._handlers||(i._handlers={}),i[s]=(i[s]||ja).concat(u))},x_=function(){if(qe&&9>_t)return!1;var i=f("div");return"draggable"in i||"dragDrop"in i}(),Wu,Ku,Vu=`
|
||
|
||
b`.split(/\n/).length!=3?function(i){for(var s=0,u=[],l=i.length;s<=l;){var c=i.indexOf(`
|
||
`,s);c==-1&&(c=i.length);var d=i.slice(s,i.charAt(c-1)=="\r"?c-1:c),w=d.indexOf("\r");w!=-1?(u.push(d.slice(0,w)),s+=w+1):(u.push(d),s=c+1)}return u}:function(i){return i.split(/\r\n?|\n/)},S_=window.getSelection?function(i){try{return i.selectionStart!=i.selectionEnd}catch{return!1}}:function(i){try{var s=i.ownerDocument.selection.createRange()}catch{}return s&&s.parentElement()==i?s.compareEndPoints("StartToEnd",s)!=0:!1},M_=function(){var i=f("div");return"oncopy"in i?!0:(i.setAttribute("oncopy","return;"),typeof i.oncopy=="function")}(),zu=null,Qu={},Kn={},Vn={},Et=function(i,s,u){this.pos=this.start=0,this.string=i,this.tabSize=s||8,this.lineStart=this.lastColumnPos=this.lastColumnValue=0,this.lineOracle=u};Et.prototype.eol=function(){return this.pos>=this.string.length},Et.prototype.sol=function(){return this.pos==this.lineStart},Et.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Et.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Et.prototype.eat=function(i){var s=this.string.charAt(this.pos);if(typeof i=="string"?s==i:s&&(i.test?i.test(s):i(s)))return++this.pos,s},Et.prototype.eatWhile=function(i){for(var s=this.pos;this.eat(i););return this.pos>s},Et.prototype.eatSpace=function(){for(var i=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>i},Et.prototype.skipToEnd=function(){this.pos=this.string.length},Et.prototype.skipTo=function(i){if(i=this.string.indexOf(i,this.pos),-1<i)return this.pos=i,!0},Et.prototype.backUp=function(i){this.pos-=i},Et.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=R(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?R(this.string,this.lineStart,this.tabSize):0)},Et.prototype.indentation=function(){return R(this.string,null,this.tabSize)-(this.lineStart?R(this.string,this.lineStart,this.tabSize):0)},Et.prototype.match=function(i,s,u){if(typeof i=="string"){var l=function(d){return u?d.toLowerCase():d},c=this.string.substr(this.pos,i.length);if(l(c)==l(i))return s!==!1&&(this.pos+=i.length),!0}else return(i=this.string.slice(this.pos).match(i))&&0<i.index?null:(i&&s!==!1&&(this.pos+=i[0].length),i)},Et.prototype.current=function(){return this.string.slice(this.start,this.pos)},Et.prototype.hideFirstChars=function(i,s){this.lineStart+=i;try{return s()}finally{this.lineStart-=i}},Et.prototype.lookAhead=function(i){var s=this.lineOracle;return s&&s.lookAhead(i)},Et.prototype.baseToken=function(){var i=this.lineOracle;return i&&i.baseToken(this.pos)};var Pa=function(i,s){this.state=i,this.lookAhead=s},Yi=function(i,s,u,l){this.state=s,this.doc=i,this.line=u,this.maxLookAhead=l||0,this.baseTokens=null,this.baseTokenPos=1};Yi.prototype.lookAhead=function(i){var s=this.doc.getLine(this.line+i);return s!=null&&i>this.maxLookAhead&&(this.maxLookAhead=i),s},Yi.prototype.baseToken=function(i){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=i;)this.baseTokenPos+=2;var s=this.baseTokens[this.baseTokenPos+1];return{type:s&&s.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-i}},Yi.prototype.nextLine=function(){this.line++,0<this.maxLookAhead&&this.maxLookAhead--},Yi.fromSaved=function(i,s,u){return s instanceof Pa?new Yi(i,Y(i.mode,s.state),u,s.lookAhead):new Yi(i,Y(i.mode,s),u)},Yi.prototype.save=function(i){return i=i!==!1?Y(this.doc.mode,this.state):this.state,0<this.maxLookAhead?new Pa(i,this.maxLookAhead):i};var id=function(i,s,u){this.start=i.start,this.end=i.pos,this.string=i.current(),this.type=s||null,this.state=u},rd=!1,cr=!1,zn=function(i,s,u){this.text=i,Js(this,s),this.height=u?u(this):1};zn.prototype.lineNo=function(){return oe(this)},Re(zn);var C_={},T_={},Qn=null,so=null,nd={left:0,right:0,top:0,bottom:0},cn,hn=function(i,s,u){this.cm=u;var l=this.vert=f("div",[f("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),c=this.horiz=f("div",[f("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");l.tabIndex=c.tabIndex=-1,i(l),i(c),Fe(l,"scroll",function(){l.clientHeight&&s(l.scrollTop,"vertical")}),Fe(c,"scroll",function(){c.clientWidth&&s(c.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,qe&&8>_t&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};hn.prototype.update=function(i){var s=i.scrollWidth>i.clientWidth+1,u=i.scrollHeight>i.clientHeight+1,l=i.nativeBarWidth;return u?(this.vert.style.display="block",this.vert.style.bottom=s?l+"px":"0",this.vert.firstChild.style.height=Math.max(0,i.scrollHeight-i.clientHeight+(i.viewHeight-(s?l:0)))+"px"):(this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0"),s?(this.horiz.style.display="block",this.horiz.style.right=u?l+"px":"0",this.horiz.style.left=i.barLeft+"px",this.horiz.firstChild.style.width=Math.max(0,i.scrollWidth-i.clientWidth+(i.viewWidth-i.barLeft-(u?l:0)))+"px"):(this.horiz.style.display="",this.horiz.firstChild.style.width="0"),!this.checkedZeroWidth&&0<i.clientHeight&&(l==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:u?l:0,bottom:s?l:0}},hn.prototype.setScrollLeft=function(i){this.horiz.scrollLeft!=i&&(this.horiz.scrollLeft=i),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},hn.prototype.setScrollTop=function(i){this.vert.scrollTop!=i&&(this.vert.scrollTop=i),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},hn.prototype.zeroWidthHack=function(){this.horiz.style.height=this.vert.style.width=yi&&!g_?"12px":"18px",this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new Lr,this.disableVert=new Lr},hn.prototype.enableZeroWidthBar=function(i,s,u){function l(){var c=i.getBoundingClientRect();(u=="vert"?document.elementFromPoint(c.right-1,(c.top+c.bottom)/2):document.elementFromPoint((c.right+c.left)/2,c.bottom-1))!=i?i.style.visibility="hidden":s.set(1e3,l)}i.style.visibility="",s.set(1e3,l)},hn.prototype.clear=function(){var i=this.horiz.parentNode;i.removeChild(this.horiz),i.removeChild(this.vert)};var oo=function(){};oo.prototype.update=function(){return{bottom:0,right:0}},oo.prototype.setScrollLeft=function(){},oo.prototype.setScrollTop=function(){},oo.prototype.clear=function(){};var sd={native:hn,null:oo},E_=0,Ga=function(i,s,u){var l=i.display;this.viewport=s,this.visible=xa(l,i.doc,s),this.editorIsHidden=!l.wrapper.offsetWidth,this.wrapperHeight=l.wrapper.clientHeight,this.wrapperWidth=l.wrapper.clientWidth,this.oldDisplayWidth=Pe(i),this.force=u,this.dims=mu(i),this.events=[]};Ga.prototype.signal=function(i,s){we(i,s)&&this.events.push(arguments)},Ga.prototype.finish=function(){for(var i=0;i<this.events.length;i++)X.apply(null,this.events[i])};var Wa=0,hr=null;qe?hr=-.53:fr?hr=15:Rr?hr=-.7:Oa&&(hr=-1/3);var ci=function(i,s){this.ranges=i,this.primIndex=s};ci.prototype.primary=function(){return this.ranges[this.primIndex]},ci.prototype.equals=function(i){if(i==this)return!0;if(i.primIndex!=this.primIndex||i.ranges.length!=this.ranges.length)return!1;for(var s=0;s<this.ranges.length;s++){var u=this.ranges[s],l=i.ranges[s];if(!Ke(u.anchor,l.anchor)||!Ke(u.head,l.head))return!1}return!0},ci.prototype.deepCopy=function(){for(var i=[],s=0;s<this.ranges.length;s++)i[s]=new rt(Ve(this.ranges[s].anchor),Ve(this.ranges[s].head));return new ci(i,this.primIndex)},ci.prototype.somethingSelected=function(){for(var i=0;i<this.ranges.length;i++)if(!this.ranges[i].empty())return!0;return!1},ci.prototype.contains=function(i,s){s||(s=i);for(var u=0;u<this.ranges.length;u++){var l=this.ranges[u];if(0<=Te(s,l.from())&&0>=Te(i,l.to()))return u}return-1};var rt=function(i,s){this.anchor=i,this.head=s};rt.prototype.from=function(){return M(this.anchor,this.head)},rt.prototype.to=function(){return B(this.anchor,this.head)},rt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Hs.prototype={chunkSize:function(){return this.lines.length},removeInner:function(i,s){for(var u=i,l=i+s;u<l;++u){var c=this.lines[u];this.height-=c.height;var d=c;d.parent=null,ua(d),bt(c,"delete")}this.lines.splice(i,s)},collapse:function(i){i.push.apply(i,this.lines)},insertInner:function(i,s,u){for(this.height+=u,this.lines=this.lines.slice(0,i).concat(s).concat(this.lines.slice(i)),i=0;i<s.length;++i)s[i].parent=this},iterN:function(i,s,u){for(s=i+s;i<s;++i)if(u(this.lines[i]))return!0}},Zs.prototype={chunkSize:function(){return this.size},removeInner:function(i,s){this.size-=s;for(var u=0;u<this.children.length;++u){var l=this.children[u],c=l.chunkSize();if(i<c){var d=Math.min(s,c-i),w=l.height;if(l.removeInner(i,d),this.height-=w-l.height,c==d&&(this.children.splice(u--,1),l.parent=null),(s-=d)==0)break;i=0}else i-=c}25>this.size-s&&(1<this.children.length||!(this.children[0]instanceof Hs))&&(i=[],this.collapse(i),this.children=[new Hs(i)],this.children[0].parent=this)},collapse:function(i){for(var s=0;s<this.children.length;++s)this.children[s].collapse(i)},insertInner:function(i,s,u){this.size+=s.length,this.height+=u;for(var l=0;l<this.children.length;++l){var c=this.children[l],d=c.chunkSize();if(i<=d){if(c.insertInner(i,s,u),c.lines&&50<c.lines.length){for(s=i=c.lines.length%25+25;s<c.lines.length;)u=new Hs(c.lines.slice(s,s+=25)),c.height-=u.height,this.children.splice(++l,0,u),u.parent=this;c.lines=c.lines.slice(0,i),this.maybeSpill()}break}i-=d}},maybeSpill:function(){if(!(10>=this.children.length)){var i=this;do{var s=i.children.splice(i.children.length-5,5);if(s=new Zs(s),i.parent){i.size-=s.size,i.height-=s.height;var u=S(i.parent.children,i);i.parent.children.splice(u+1,0,s)}else u=new Zs(i.children),u.parent=i,i.children=[u,s],i=u;s.parent=i.parent}while(10<i.children.length);i.parent.maybeSpill()}},iterN:function(i,s,u){for(var l=0;l<this.children.length;++l){var c=this.children[l],d=c.chunkSize();if(i<d){if(d=Math.min(s,d-i),c.iterN(i,d,u))return!0;if((s-=d)==0)break;i=0}else i-=d}}};var ao=function(i,s,u){if(u)for(var l in u)u.hasOwnProperty(l)&&(this[l]=u[l]);this.doc=i,this.node=s};ao.prototype.clear=function(){var i=this.doc.cm,s=this.line.widgets,u=this.line,l=oe(u);if(l!=null&&s){for(var c=0;c<s.length;++c)s[c]==this&&s.splice(c--,1);s.length||(u.widgets=null);var d=I(this);z(u,Math.max(0,u.height-d)),i&&(ri(i,function(){var w=-d;gi(u)<(i.curOp&&i.curOp.scrollTop||i.doc.scrollTop)&&Sa(i,w),Tr(i,l,"widget")}),bt(i,"lineWidgetCleared",i,this,l))}},ao.prototype.changed=function(){var i=this,s=this.height,u=this.doc.cm,l=this.line;this.height=null;var c=I(this)-s;c&&(fi(this.doc,l)||z(l,l.height+c),u&&ri(u,function(){u.curOp.forceUpdate=!0,gi(l)<(u.curOp&&u.curOp.scrollTop||u.doc.scrollTop)&&Sa(u,c),bt(u,"lineWidgetChanged",u,i,oe(l))}))},Re(ao);var od=0,Ur=function(i,s){this.lines=[],this.type=s,this.doc=i,this.id=++od};Ur.prototype.clear=function(){if(!this.explicitlyCleared){var i=this.doc.cm,s=i&&!i.curOp;if(s&&an(i),we(this,"clear")){var u=this.find();u&&bt(this,"clear",u.from,u.to)}for(var l=u=null,c=0;c<this.lines.length;++c){var d=this.lines[c],w=ii(d.markedSpans,this);i&&!this.collapsed?Tr(i,oe(d),"text"):i&&(w.to!=null&&(l=oe(d)),w.from!=null&&(u=oe(d)));for(var b=d,E=void 0,J=d.markedSpans,W=w,te=0;te<J.length;++te)J[te]!=W&&(E||(E=[])).push(J[te]);b.markedSpans=E,w.from==null&&this.collapsed&&!fi(this.doc,d)&&i&&z(d,Ln(i.display))}if(i&&this.collapsed&&!i.options.lineWrapping)for(c=0;c<this.lines.length;++c)d=ui(this.lines[c]),w=br(d),w>i.display.maxLineLength&&(i.display.maxLine=d,i.display.maxLineLength=w,i.display.maxLineChanged=!0);u!=null&&i&&this.collapsed&&Ht(i,u,l+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,i&&mp(i.doc)),i&&bt(i,"markerCleared",i,this,u,l),s&&ln(i),this.parent&&this.parent.clear()}},Ur.prototype.find=function(i,s){i==null&&this.type=="bookmark"&&(i=1);for(var u,l,c=0;c<this.lines.length;++c){var d=this.lines[c],w=ii(d.markedSpans,this);if(w.from!=null&&(u=pe(s?d:oe(d),w.from),i==-1))return u;if(w.to!=null&&(l=pe(s?d:oe(d),w.to),i==1))return l}return u&&{from:u,to:l}},Ur.prototype.changed=function(){var i=this,s=this.find(-1,!0),u=this,l=this.doc.cm;s&&l&&ri(l,function(){var c=s.line,d=oe(s.line);(d=hu(l,d))&&(Oh(d),l.curOp.selectionChanged=l.curOp.forceUpdate=!0),l.curOp.updateMaxLine=!0,fi(u.doc,c)||u.height==null||(d=u.height,u.height=null,(d=I(u)-d)&&z(c,c.height+d)),bt(l,"markerChanged",l,i)})},Ur.prototype.attachLine=function(i){if(!this.lines.length&&this.doc.cm){var s=this.doc.cm.curOp;s.maybeHiddenMarkers&&S(s.maybeHiddenMarkers,this)!=-1||(s.maybeUnhiddenMarkers||(s.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(i)},Ur.prototype.detachLine=function(i){this.lines.splice(S(this.lines,i),1),!this.lines.length&&this.doc.cm&&(i=this.doc.cm.curOp,(i.maybeHiddenMarkers||(i.maybeHiddenMarkers=[])).push(this))},Re(Ur);var lo=function(i,s){for(this.markers=i,this.primary=s,s=0;s<i.length;++s)i[s].parent=this};lo.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var i=0;i<this.markers.length;++i)this.markers[i].clear();bt(this,"clear")}},lo.prototype.find=function(i,s){return this.primary.find(i,s)},Re(lo);var k_=0,$t=function(i,s,u,l,c){if(!(this instanceof $t))return new $t(i,s,u,l,c);u==null&&(u=0),Zs.call(this,[new Hs([new zn("",null)])]),this.first=u,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=u,u=pe(u,0),this.sel=ur(u),this.history=new Ca(null),this.id=++k_,this.modeOption=s,this.lineSep=l,this.direction=c=="rtl"?"rtl":"ltr",this.extend=!1,typeof i=="string"&&(i=this.splitLines(i)),Uu(this,{from:u,to:u,text:i}),Ot(this,ur(u),Qi)};$t.prototype=V(Zs.prototype,{constructor:$t,iter:function(i,s,u){u?this.iterN(i-this.first,s-i,u):this.iterN(this.first,this.first+this.size,i)},insert:function(i,s){for(var u=0,l=0;l<s.length;++l)u+=s[l].height;this.insertInner(i-this.first,s,u)},remove:function(i,s){this.removeInner(i-this.first,s)},getValue:function(i){var s=k(this,this.first,this.first+this.size);return i===!1?s:s.join(i||this.lineSeparator())},setValue:It(function(i){var s=pe(this.first,0),u=this.first+this.size-1;Fn(this,{from:s,to:pe(u,N(this,u).text.length),text:this.splitLines(i),origin:"setValue",full:!0},!0),this.cm&&Ps(this.cm,0,0),Ot(this,ur(s),Qi)}),replaceRange:function(i,s,u,l){s=C(this,s),u=u?C(this,u):s,Dn(this,i,s,u,l)},getRange:function(i,s,u){return i=T(this,C(this,i),C(this,s)),u===!1?i:u===""?i.join(""):i.join(u||this.lineSeparator())},getLine:function(i){return(i=this.getLineHandle(i))&&i.text},getLineHandle:function(i){if(be(this,i))return N(this,i)},getLineNumber:function(i){return oe(i)},getLineHandleVisualStart:function(i){return typeof i=="number"&&(i=N(this,i)),ui(i)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(i){return C(this,i)},getCursor:function(i){var s=this.sel.primary();return i==null||i=="head"?s.head:i=="anchor"?s.anchor:i=="end"||i=="to"||i===!1?s.to():s.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:It(function(i,s,u){i=C(this,typeof i=="number"?pe(i,s||0):i),Ot(this,ur(i,null),u)}),setSelection:It(function(i,s,u){var l=C(this,i);i=C(this,s||i),Ot(this,ur(l,i),u)}),extendSelection:It(function(i,s,u){Ea(this,C(this,i),s&&C(this,s),u)}),extendSelections:It(function(i,s){dp(this,Q(this,i),s)}),extendSelectionsBy:It(function(i,s){i=O(this.sel.ranges,i),dp(this,Q(this,i),s)}),setSelections:It(function(i,s,u){if(i.length){for(var l=[],c=0;c<i.length;c++)l[c]=new rt(C(this,i[c].anchor),C(this,i[c].head||i[c].anchor));s==null&&(s=Math.min(i.length-1,this.sel.primIndex)),Ot(this,Li(this.cm,l,s),u)}}),addSelection:It(function(i,s,u){var l=this.sel.ranges.slice(0);l.push(new rt(C(this,i),C(this,s||i))),Ot(this,Li(this.cm,l,l.length-1),u)}),getSelection:function(i){for(var s=this.sel.ranges,u,l=0;l<s.length;l++){var c=T(this,s[l].from(),s[l].to());u=u?u.concat(c):c}return i===!1?u:u.join(i||this.lineSeparator())},getSelections:function(i){for(var s=[],u=this.sel.ranges,l=0;l<u.length;l++){var c=T(this,u[l].from(),u[l].to());i!==!1&&(c=c.join(i||this.lineSeparator())),s[l]=c}return s},replaceSelection:function(i,s,u){for(var l=[],c=0;c<this.sel.ranges.length;c++)l[c]=i;this.replaceSelections(l,s,u||"+input")},replaceSelections:It(function(i,s,u){for(var l=[],c=this.sel,d=0;d<c.ranges.length;d++){var w=c.ranges[d];l[d]={from:w.from(),to:w.to(),text:this.splitLines(i[d]),origin:u}}if(i=s&&s!="end"){for(i=[],c=u=pe(this.first,0),d=0;d<l.length;d++){var b=l[d];w=op(b.from,u,c);var E=op(kr(b),u,c);u=b.to,c=E,s=="around"?(b=this.sel.ranges[d],b=0>Te(b.head,b.anchor),i[d]=new rt(b?E:w,b?w:E)):i[d]=new rt(w,w)}i=new ci(i,this.sel.primIndex)}for(s=i,i=l.length-1;0<=i;i--)Fn(this,l[i]);s?gp(this,s):this.cm&&Jn(this.cm)}),undo:It(function(){Ra(this,"undo")}),redo:It(function(){Ra(this,"redo")}),undoSelection:It(function(){Ra(this,"undo",!0)}),redoSelection:It(function(){Ra(this,"redo",!0)}),setExtending:function(i){this.extend=i},getExtending:function(){return this.extend},historySize:function(){for(var i=this.history,s=0,u=0,l=0;l<i.done.length;l++)i.done[l].ranges||++s;for(l=0;l<i.undone.length;l++)i.undone[l].ranges||++u;return{undo:s,redo:u}},clearHistory:function(){var i=this;this.history=new Ca(this.history),Ar(this,function(s){return s.history=i.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(i){return i&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(i){return this.history.generation==(i||this.cleanGeneration)},getHistory:function(){return{done:On(this.history.done),undone:On(this.history.undone)}},setHistory:function(i){var s=this.history=new Ca(this.history);s.done=On(i.done.slice(0),null,!0),s.undone=On(i.undone.slice(0),null,!0)},setGutterMarker:It(function(i,s,u){return Ys(this,i,"gutter",function(l){var c=l.gutterMarkers||(l.gutterMarkers={});return c[s]=u,!u&&A(c)&&(l.gutterMarkers=null),!0})}),clearGutter:It(function(i){var s=this;this.iter(function(u){u.gutterMarkers&&u.gutterMarkers[i]&&Ys(s,u,"gutter",function(){return u.gutterMarkers[i]=null,A(u.gutterMarkers)&&(u.gutterMarkers=null),!0})})}),lineInfo:function(i){if(typeof i=="number"){if(!be(this,i))return null;var s=i;if(i=N(this,i),!i)return null}else if(s=oe(i),s==null)return null;return{line:s,handle:i,text:i.text,gutterMarkers:i.gutterMarkers,textClass:i.textClass,bgClass:i.bgClass,wrapClass:i.wrapClass,widgets:i.widgets}},addLineClass:It(function(i,s,u){return Ys(this,i,s=="gutter"?"gutter":"class",function(l){var c=s=="text"?"textClass":s=="background"?"bgClass":s=="gutter"?"gutterClass":"wrapClass";if(l[c]){if(n(u).test(l[c]))return!1;l[c]+=" "+u}else l[c]=u;return!0})}),removeLineClass:It(function(i,s,u){return Ys(this,i,s=="gutter"?"gutter":"class",function(l){var c=s=="text"?"textClass":s=="background"?"bgClass":s=="gutter"?"gutterClass":"wrapClass",d=l[c];if(d)if(u==null)l[c]=null;else{var w=d.match(n(u));if(!w)return!1;var b=w.index+w[0].length;l[c]=d.slice(0,w.index)+(w.index&&b!=d.length?" ":"")+d.slice(b)||null}else return!1;return!0})}),addLineWidget:It(function(i,s,u){return Vv(this,i,s,u)}),removeLineWidget:function(i){i.clear()},markText:function(i,s,u){return jn(this,C(this,i),C(this,s),u,u&&u.type||"range")},setBookmark:function(i,s){return s={replacedWith:s&&(s.nodeType==null?s.widget:s),insertLeft:s&&s.insertLeft,clearWhenEmpty:!1,shared:s&&s.shared,handleMouseEvents:s&&s.handleMouseEvents},i=C(this,i),jn(this,i,i,s,"bookmark")},findMarksAt:function(i){i=C(this,i);var s=[],u=N(this,i.line).markedSpans;if(u)for(var l=0;l<u.length;++l){var c=u[l];(c.from==null||c.from<=i.ch)&&(c.to==null||c.to>=i.ch)&&s.push(c.marker.parent||c.marker)}return s},findMarks:function(i,s,u){i=C(this,i),s=C(this,s);var l=[],c=i.line;return this.iter(i.line,s.line+1,function(d){if(d=d.markedSpans)for(var w=0;w<d.length;w++){var b=d[w];b.to!=null&&c==i.line&&i.ch>=b.to||b.from==null&&c!=i.line||b.from!=null&&c==s.line&&b.from>=s.ch||u&&!u(b.marker)||l.push(b.marker.parent||b.marker)}++c}),l},getAllMarks:function(){var i=[];return this.iter(function(s){if(s=s.markedSpans)for(var u=0;u<s.length;++u)s[u].from!=null&&i.push(s[u].marker)}),i},posFromIndex:function(i){var s,u=this.first,l=this.lineSeparator().length;return this.iter(function(c){if(c=c.text.length+l,c>i)return s=i,!0;i-=c,++u}),C(this,pe(u,s))},indexFromPos:function(i){i=C(this,i);var s=i.ch;if(i.line<this.first||0>i.ch)return 0;var u=this.lineSeparator().length;return this.iter(this.first,i.line,function(l){s+=l.text.length+u}),s},copy:function(i){var s=new $t(k(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return s.scrollTop=this.scrollTop,s.scrollLeft=this.scrollLeft,s.sel=this.sel,s.extend=!1,i&&(s.history.undoDepth=this.history.undoDepth,s.setHistory(this.getHistory())),s},linkedDoc:function(i){i||(i={});var s=this.first,u=this.first+this.size;for(i.from!=null&&i.from>s&&(s=i.from),i.to!=null&&i.to<u&&(u=i.to),s=new $t(k(this,s,u),i.mode||this.modeOption,s,this.lineSep,this.direction),i.sharedHist&&(s.history=this.history),(this.linked||(this.linked=[])).push({doc:s,sharedHist:i.sharedHist}),s.linked=[{doc:this,isParent:!0,sharedHist:i.sharedHist}],i=Ep(this),u=0;u<i.length;u++){var l=i[u],c=l.find(),d=s.clipPos(c.from);c=s.clipPos(c.to),Te(d,c)&&(d=jn(s,d,c,l.primary,l.primary.type),l.markers.push(d),d.parent=l)}return s},unlinkDoc:function(i){if(i instanceof wt&&(i=i.doc),this.linked){for(var s=0;s<this.linked.length;++s)if(this.linked[s].doc==i){this.linked.splice(s,1),i.unlinkDoc(this),Qv(Ep(this));break}}if(i.history==this.history){var u=[i.id];Ar(i,function(l){return u.push(l.id)},!0),i.history=new Ca(null),i.history.done=On(this.history.done,u),i.history.undone=On(this.history.undone,u)}},iterLinkedDocs:function(i){Ar(this,i)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(i){return this.lineSep?i.split(this.lineSep):Vu(i)},lineSeparator:function(){return this.lineSep||`
|
||
`},setDirection:It(function(i){i!="rtl"&&(i="ltr"),i!=this.direction&&(this.direction=i,this.iter(function(s){return s.order=null}),this.cm&&Gv(this.cm))})}),$t.prototype.eachLine=$t.prototype.iter;for(var ad=0,ld=!1,Ir={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},uo=0;10>uo;uo++)Ir[uo+48]=Ir[uo+96]=String(uo);for(var Ka=65;90>=Ka;Ka++)Ir[Ka]=String.fromCharCode(Ka);for(var fo=1;12>=fo;fo++)Ir[fo+111]=Ir[fo+63235]="F"+fo;var co={basic:{Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},pcDefault:{"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},emacsy:{"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},macDefault:{"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]}};co.default=yi?co.macDefault:co.pcDefault;var ho={selectAll:wp,singleSelection:function(i){return i.setSelection(i.getCursor("anchor"),i.getCursor("head"),Qi)},killLine:function(i){return Gn(i,function(s){if(s.empty()){var u=N(i.doc,s.head.line).text.length;return s.head.ch==u&&s.head.line<i.lastLine()?{from:s.head,to:pe(s.head.line+1,0)}:{from:s.head,to:pe(s.head.line,u)}}return{from:s.from(),to:s.to()}})},deleteLine:function(i){return Gn(i,function(s){return{from:pe(s.from().line,0),to:C(i.doc,pe(s.to().line+1,0))}})},delLineLeft:function(i){return Gn(i,function(s){return{from:pe(s.from().line,0),to:s.from()}})},delWrappedLineLeft:function(i){return Gn(i,function(s){var u=i.charCoords(s.head,"div").top+5;return{from:i.coordsChar({left:0,top:u},"div"),to:s.from()}})},delWrappedLineRight:function(i){return Gn(i,function(s){var u=i.charCoords(s.head,"div").top+5;return u=i.coordsChar({left:i.display.lineDiv.offsetWidth+100,top:u},"div"),{from:s.from(),to:u}})},undo:function(i){return i.undo()},redo:function(i){return i.redo()},undoSelection:function(i){return i.undoSelection()},redoSelection:function(i){return i.redoSelection()},goDocStart:function(i){return i.extendSelection(pe(i.firstLine(),0))},goDocEnd:function(i){return i.extendSelection(pe(i.lastLine()))},goLineStart:function(i){return i.extendSelectionsBy(function(s){return Ip(i,s.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(i){return i.extendSelectionsBy(function(s){return Jp(i,s.head)},{origin:"+move",bias:1})},goLineEnd:function(i){return i.extendSelectionsBy(function(s){s=s.head.line;for(var u=N(i.doc,s),l=u,c;c=Gt(l,!1);)l=c.find(1,!0).line;return l!=u&&(s=oe(l)),Fu(!0,i,u,s,-1)},{origin:"+move",bias:-1})},goLineRight:function(i){return i.extendSelectionsBy(function(s){return s=i.cursorCoords(s.head,"div").top+5,i.coordsChar({left:i.display.lineDiv.offsetWidth+100,top:s},"div")},ro)},goLineLeft:function(i){return i.extendSelectionsBy(function(s){return s=i.cursorCoords(s.head,"div").top+5,i.coordsChar({left:0,top:s},"div")},ro)},goLineLeftSmart:function(i){return i.extendSelectionsBy(function(s){var u=i.cursorCoords(s.head,"div").top+5;return u=i.coordsChar({left:0,top:u},"div"),u.ch<i.getLine(u.line).search(/\S/)?Jp(i,s.head):u},ro)},goLineUp:function(i){return i.moveV(-1,"line")},goLineDown:function(i){return i.moveV(1,"line")},goPageUp:function(i){return i.moveV(-1,"page")},goPageDown:function(i){return i.moveV(1,"page")},goCharLeft:function(i){return i.moveH(-1,"char")},goCharRight:function(i){return i.moveH(1,"char")},goColumnLeft:function(i){return i.moveH(-1,"column")},goColumnRight:function(i){return i.moveH(1,"column")},goWordLeft:function(i){return i.moveH(-1,"word")},goGroupRight:function(i){return i.moveH(1,"group")},goGroupLeft:function(i){return i.moveH(-1,"group")},goWordRight:function(i){return i.moveH(1,"word")},delCharBefore:function(i){return i.deleteH(-1,"codepoint")},delCharAfter:function(i){return i.deleteH(1,"char")},delWordBefore:function(i){return i.deleteH(-1,"word")},delWordAfter:function(i){return i.deleteH(1,"word")},delGroupBefore:function(i){return i.deleteH(-1,"group")},delGroupAfter:function(i){return i.deleteH(1,"group")},indentAuto:function(i){return i.indentSelection("smart")},indentMore:function(i){return i.indentSelection("add")},indentLess:function(i){return i.indentSelection("subtract")},insertTab:function(i){return i.replaceSelection(" ")},insertSoftTab:function(i){for(var s=[],u=i.listSelections(),l=i.options.tabSize,c=0;c<u.length;c++){var d=u[c].from();d=R(i.getLine(d.line),d.ch,l),s.push(L(l-d%l))}i.replaceSelections(s)},defaultTab:function(i){i.somethingSelected()?i.indentSelection("add"):i.execCommand("insertTab")},transposeChars:function(i){return ri(i,function(){for(var s=i.listSelections(),u=[],l=0;l<s.length;l++)if(s[l].empty()){var c=s[l].head,d=N(i.doc,c.line).text;if(d){if(c.ch==d.length&&(c=new pe(c.line,c.ch-1)),0<c.ch)c=new pe(c.line,c.ch+1),i.replaceRange(d.charAt(c.ch-1)+d.charAt(c.ch-2),pe(c.line,c.ch-2),c,"+transpose");else if(c.line>i.doc.first){var w=N(i.doc,c.line-1).text;w&&(c=new pe(c.line,1),i.replaceRange(d.charAt(0)+i.doc.lineSeparator()+w.charAt(w.length-1),pe(c.line-1,w.length-1),c,"+transpose"))}}u.push(new rt(c,c))}i.setSelections(u)})},newlineAndIndent:function(i){return ri(i,function(){for(var s=i.listSelections(),u=s.length-1;0<=u;u--)i.replaceRange(i.doc.lineSeparator(),s[u].anchor,s[u].head,"+input");for(s=i.listSelections(),u=0;u<s.length;u++)i.indentLine(s[u].from().line,null,!0);Jn(i)})},openLine:function(i){return i.replaceSelection(`
|
||
`,"start")},toggleOverwrite:function(i){return i.toggleOverwrite()}},A_=new Lr,Yu=null,Hu=function(i,s,u){this.time=i,this.pos=s,this.button=u};Hu.prototype.compare=function(i,s,u){return this.time+400>i&&Te(s,this.pos)==0&&u==this.button};var po,go,Yn={toString:function(){return"CodeMirror.Init"}},ud={},Va={};wt.defaults=ud,wt.optionHandlers=Va;var Zu=[];wt.defineInitHook=function(i){return Zu.push(i)};var ni=null,ft=function(i){this.cm=i,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Lr,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ft.prototype.init=function(i){function s(b){for(b=b.target;b;b=b.parentNode){if(b==w)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(b.className))break}return!1}function u(b){if(s(b)&&!fe(d,b)){if(d.somethingSelected())ni={lineWise:!1,text:d.getSelections()},b.type=="cut"&&d.replaceSelection("",null,"cut");else if(d.options.lineWiseCopyCut){var E=zp(d);ni={lineWise:!0,text:E.text},b.type=="cut"&&d.operation(function(){d.setSelections(E.ranges,0,Qi),d.replaceSelection("",null,"cut")})}else return;if(b.clipboardData){b.clipboardData.clearData();var J=ni.text.join(`
|
||
`);if(b.clipboardData.setData("Text",J),b.clipboardData.getData("Text")==J){b.preventDefault();return}}var W=Yp();b=W.firstChild,d.display.lineSpace.insertBefore(W,d.display.lineSpace.firstChild),b.value=ni.text.join(`
|
||
`);var te=v(w.ownerDocument);io(b),setTimeout(function(){d.display.lineSpace.removeChild(W),te.focus(),te==w&&c.showPrimarySelection()},50)}}var l=this,c=this,d=c.cm,w=c.div=i.lineDiv;w.contentEditable=!0,Qp(w,d.options.spellcheck,d.options.autocorrect,d.options.autocapitalize),Fe(w,"paste",function(b){!s(b)||fe(d,b)||Kp(b,d)||11>=_t&&setTimeout(Ut(d,function(){return l.updateFromDOM()}),20)}),Fe(w,"compositionstart",function(b){l.composing={data:b.data,done:!1}}),Fe(w,"compositionupdate",function(b){l.composing||(l.composing={data:b.data,done:!1})}),Fe(w,"compositionend",function(b){l.composing&&(b.data!=l.composing.data&&l.readFromDOMSoon(),l.composing.done=!0)}),Fe(w,"touchstart",function(){return c.forceCompositionEnd()}),Fe(w,"input",function(){l.composing||l.readFromDOMSoon()}),Fe(w,"copy",u),Fe(w,"cut",u)},ft.prototype.screenReaderLabelChanged=function(i){i?this.div.setAttribute("aria-label",i):this.div.removeAttribute("aria-label")},ft.prototype.prepareSelection=function(){var i=zh(this.cm,!1);return i.focus=v(this.div.ownerDocument)==this.div,i},ft.prototype.showSelection=function(i,s){i&&this.cm.display.view.length&&((i.focus||s)&&this.showPrimarySelection(),this.showMultipleSelections(i))},ft.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ft.prototype.showPrimarySelection=function(){var i=this.getSelection(),s=this.cm,u=s.doc.sel.primary(),l=u.from();if(u=u.to(),s.display.viewTo==s.display.viewFrom||l.line>=s.display.viewTo||u.line<s.display.viewFrom)i.removeAllRanges();else{var c=Ja(s,i.anchorNode,i.anchorOffset),d=Ja(s,i.focusNode,i.focusOffset);if(!c||c.bad||!d||d.bad||Te(M(c,d),l)!=0||Te(B(c,d),u)!=0)if(c=s.display.view,l=l.line>=s.display.viewFrom&&Zp(s,l)||{node:c[0].measure.map[2],offset:0},u=u.line<s.display.viewTo&&Zp(s,u),u||(u=c[c.length-1].measure,u=u.maps?u.maps[u.maps.length-1]:u.map,u={node:u[u.length-1],offset:u[u.length-2]-u[u.length-3]}),l&&u){c=i.rangeCount&&i.getRangeAt(0);try{var w=to(l.node,l.offset,u.offset,u.node)}catch{}w&&(!fr&&s.state.focused?(i.collapse(l.node,l.offset),w.collapsed||(i.removeAllRanges(),i.addRange(w))):(i.removeAllRanges(),i.addRange(w)),c&&i.anchorNode==null?i.addRange(c):fr&&this.startGracePeriod()),this.rememberSelection()}else i.removeAllRanges()}},ft.prototype.startGracePeriod=function(){var i=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){i.gracePeriod=!1,i.selectionChanged()&&i.cm.operation(function(){return i.cm.curOp.selectionChanged=!0})},20)},ft.prototype.showMultipleSelections=function(i){a(this.cm.display.cursorDiv,i.cursors),a(this.cm.display.selectionDiv,i.selection)},ft.prototype.rememberSelection=function(){var i=this.getSelection();this.lastAnchorNode=i.anchorNode,this.lastAnchorOffset=i.anchorOffset,this.lastFocusNode=i.focusNode,this.lastFocusOffset=i.focusOffset},ft.prototype.selectionInEditor=function(){var i=this.getSelection();return i.rangeCount?(i=i.getRangeAt(0).commonAncestorContainer,p(this.div,i)):!1},ft.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&(this.selectionInEditor()&&v(this.div.ownerDocument)==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},ft.prototype.blur=function(){this.div.blur()},ft.prototype.getField=function(){return this.div},ft.prototype.supportsTouch=function(){return!0},ft.prototype.receivedFocus=function(){function i(){u.cm.state.focused&&(u.pollSelection(),u.polling.set(u.cm.options.pollInterval,i))}var s=this,u=this;this.selectionInEditor()?setTimeout(function(){return s.pollSelection()},20):ri(this.cm,function(){return u.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,i)},ft.prototype.selectionChanged=function(){var i=this.getSelection();return i.anchorNode!=this.lastAnchorNode||i.anchorOffset!=this.lastAnchorOffset||i.focusNode!=this.lastFocusNode||i.focusOffset!=this.lastFocusOffset},ft.prototype.pollSelection=function(){if(this.readDOMTimeout==null&&!this.gracePeriod&&this.selectionChanged()){var i=this.getSelection(),s=this.cm;if(Ba&&Rr&&this.cm.display.gutterSpecs.length&&c_(i.anchorNode))this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();else if(!this.composing){this.rememberSelection();var u=Ja(s,i.anchorNode,i.anchorOffset),l=Ja(s,i.focusNode,i.focusOffset);u&&l&&ri(s,function(){Ot(s.doc,ur(u,l),Qi),(u.bad||l.bad)&&(s.curOp.selectionChanged=!0)})}}},ft.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var i=this.cm,s=i.display,u=i.doc.sel.primary(),l=u.from(),c=u.to();if(l.ch==0&&l.line>i.firstLine()&&(l=pe(l.line-1,N(i.doc,l.line-1).length)),c.ch==N(i.doc,c.line).text.length&&c.line<i.lastLine()&&(c=pe(c.line+1,0)),l.line<s.viewFrom||c.line>s.viewTo-1)return!1;var d;l.line==s.viewFrom||(d=sn(i,l.line))==0?(u=oe(s.view[0].line),d=s.view[0].node):(u=oe(s.view[d].line),d=s.view[d-1].node.nextSibling);var w=sn(i,c.line);if(w==s.view.length-1?(c=s.viewTo-1,s=s.lineDiv.lastChild):(c=oe(s.view[w+1].line)-1,s=s.view[w+1].node.previousSibling),!d)return!1;for(s=i.doc.splitLines(h_(i,d,s,u,c)),d=T(i.doc,pe(u,0),pe(c,N(i.doc,c).text.length));1<s.length&&1<d.length;)if(G(s)==G(d))s.pop(),d.pop(),c--;else if(s[0]==d[0])s.shift(),d.shift(),u++;else break;var b=0;w=0;for(var E=s[0],J=d[0],W=Math.min(E.length,J.length);b<W&&E.charCodeAt(b)==J.charCodeAt(b);)++b;for(E=G(s),J=G(d),W=Math.min(E.length-(s.length==1?b:0),J.length-(d.length==1?b:0));w<W&&E.charCodeAt(E.length-w-1)==J.charCodeAt(J.length-w-1);)++w;if(s.length==1&&d.length==1&&u==l.line)for(;b&&b>l.ch&&E.charCodeAt(E.length-w-1)==J.charCodeAt(J.length-w-1);)b--,w++;if(s[s.length-1]=E.slice(0,E.length-w).replace(/^\u200b+/,""),s[0]=s[0].slice(b).replace(/\u200b+$/,""),l=pe(u,b),u=pe(c,d.length?G(d).length-w:0),1<s.length||s[0]||Te(l,u))return Dn(i.doc,s,l,u,"+input"),!0},ft.prototype.ensurePolled=function(){this.forceCompositionEnd()},ft.prototype.reset=function(){this.forceCompositionEnd()},ft.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ft.prototype.readFromDOMSoon=function(){var i=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(i.readDOMTimeout=null,i.composing)if(i.composing.done)i.composing=null;else return;i.updateFromDOM()},80))},ft.prototype.updateFromDOM=function(){var i=this;!this.cm.isReadOnly()&&this.pollContent()||ri(this.cm,function(){return Ht(i.cm)})},ft.prototype.setUneditable=function(i){i.contentEditable="false"},ft.prototype.onKeyPress=function(i){i.charCode==0||this.composing||(i.preventDefault(),this.cm.isReadOnly()||Ut(this.cm,Du)(this.cm,String.fromCharCode(i.charCode==null?i.keyCode:i.charCode),0))},ft.prototype.readOnlyChanged=function(i){this.div.contentEditable=String(i!="nocursor")},ft.prototype.onContextMenu=function(){},ft.prototype.resetPosition=function(){},ft.prototype.needsContentAttribute=!0;var St=function(i){this.cm=i,this.prevInput="",this.pollingFast=!1,this.polling=new Lr,this.hasSelection=!1,this.composing=null,this.resetting=!1};St.prototype.init=function(i){function s(w){if(!fe(c,w)){if(c.somethingSelected())ni={lineWise:!1,text:c.getSelections()};else if(c.options.lineWiseCopyCut){var b=zp(c);ni={lineWise:!0,text:b.text},w.type=="cut"?c.setSelections(b.ranges,null,Qi):(l.prevInput="",d.value=b.text.join(`
|
||
`),io(d))}else return;w.type=="cut"&&(c.state.cutIncoming=+new Date)}}var u=this,l=this,c=this.cm;this.createField(i);var d=this.textarea;i.wrapper.insertBefore(this.wrapper,i.wrapper.firstChild),qs&&(d.style.width="0px"),Fe(d,"input",function(){qe&&9<=_t&&u.hasSelection&&(u.hasSelection=null),l.poll()}),Fe(d,"paste",function(w){fe(c,w)||Kp(w,c)||(c.state.pasteIncoming=+new Date,l.fastPoll())}),Fe(d,"cut",s),Fe(d,"copy",s),Fe(i.scroller,"paste",function(w){if(!Z(i,w)&&!fe(c,w))if(d.dispatchEvent){var b=new Event("paste");b.clipboardData=w.clipboardData,d.dispatchEvent(b)}else c.state.pasteIncoming=+new Date,l.focus()}),Fe(i.lineSpace,"selectstart",function(w){Z(i,w)||ke(w)}),Fe(d,"compositionstart",function(){var w=c.getCursor("from");l.composing&&l.composing.range.clear(),l.composing={start:w,range:c.markText(w,c.getCursor("to"),{className:"CodeMirror-composing"})}}),Fe(d,"compositionend",function(){l.composing&&(l.poll(),l.composing.range.clear(),l.composing=null)})},St.prototype.createField=function(i){this.wrapper=Yp(),this.textarea=this.wrapper.firstChild},St.prototype.screenReaderLabelChanged=function(i){i?this.textarea.setAttribute("aria-label",i):this.textarea.removeAttribute("aria-label")},St.prototype.prepareSelection=function(){var i=this.cm,s=i.display,u=i.doc,l=zh(i);if(i.options.moveInputWithCursor){i=Ri(i,u.sel.primary().head,"div"),u=s.wrapper.getBoundingClientRect();var c=s.lineDiv.getBoundingClientRect();l.teTop=Math.max(0,Math.min(s.wrapper.clientHeight-10,i.top+c.top-u.top)),l.teLeft=Math.max(0,Math.min(s.wrapper.clientWidth-10,i.left+c.left-u.left))}return l},St.prototype.showSelection=function(i){var s=this.cm.display;a(s.cursorDiv,i.cursors),a(s.selectionDiv,i.selection),i.teTop!=null&&(this.wrapper.style.top=i.teTop+"px",this.wrapper.style.left=i.teLeft+"px")},St.prototype.reset=function(i){if(!(this.contextMenuPending||this.composing&&i)){var s=this.cm;this.resetting=!0,s.somethingSelected()?(this.prevInput="",i=s.getSelection(),this.textarea.value=i,s.state.focused&&io(this.textarea),qe&&9<=_t&&(this.hasSelection=i)):i||(this.prevInput=this.textarea.value="",qe&&9<=_t&&(this.hasSelection=null)),this.resetting=!1}},St.prototype.getField=function(){return this.textarea},St.prototype.supportsTouch=function(){return!1},St.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!eo||v(this.textarea.ownerDocument)!=this.textarea))try{this.textarea.focus()}catch{}},St.prototype.blur=function(){this.textarea.blur()},St.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},St.prototype.receivedFocus=function(){this.slowPoll()},St.prototype.slowPoll=function(){var i=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){i.poll(),i.cm.state.focused&&i.slowPoll()})},St.prototype.fastPoll=function(){function i(){u.poll()||s?(u.pollingFast=!1,u.slowPoll()):(s=!0,u.polling.set(60,i))}var s=!1,u=this;u.pollingFast=!0,u.polling.set(20,i)},St.prototype.poll=function(){var i=this,s=this.cm,u=this.textarea,l=this.prevInput;if(this.contextMenuPending||this.resetting||!s.state.focused||S_(u)&&!l&&!this.composing||s.isReadOnly()||s.options.disableInput||s.state.keySeq)return!1;var c=u.value;if(c==l&&!s.somethingSelected())return!1;if(qe&&9<=_t&&this.hasSelection===c||yi&&/[\uf700-\uf7ff]/.test(c))return s.display.input.reset(),!1;if(s.doc.sel==s.display.selForContextMenu){var d=c.charCodeAt(0);if(d!=8203||l||(l=""),d==8666)return this.reset(),this.cm.execCommand("undo")}var w=0;for(d=Math.min(l.length,c.length);w<d&&l.charCodeAt(w)==c.charCodeAt(w);)++w;return ri(s,function(){Du(s,c.slice(w),l.length-w,null,i.composing?"*compose":null),1e3<c.length||-1<c.indexOf(`
|
||
`)?u.value=i.prevInput="":i.prevInput=c,i.composing&&(i.composing.range.clear(),i.composing.range=s.markText(i.composing.start,s.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},St.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},St.prototype.onKeyPress=function(){qe&&9<=_t&&(this.hasSelection=null),this.fastPoll()},St.prototype.onContextMenu=function(i){function s(){if(w.selectionStart!=null){var se=c.somethingSelected(),ge=""+(se?w.value:"");w.value="⇚",w.value=ge,l.prevInput=se?"":"",w.selectionStart=1,w.selectionEnd=ge.length,d.selForContextMenu=c.doc.sel}}function u(){if(l.contextMenuPending==u&&(l.contextMenuPending=!1,l.wrapper.style.cssText=W,w.style.cssText=J,qe&&9>_t&&d.scrollbars.setScrollTop(d.scroller.scrollTop=E),w.selectionStart!=null)){(!qe||qe&&9>_t)&&s();var se=0,ge=function(){d.selForContextMenu==c.doc.sel&&w.selectionStart==0&&0<w.selectionEnd&&l.prevInput==""?Ut(c,wp)(c):10>se++?d.detectingSelectAll=setTimeout(ge,500):(d.selForContextMenu=null,d.input.reset())};d.detectingSelectAll=setTimeout(ge,200)}}var l=this,c=l.cm,d=c.display,w=l.textarea;l.contextMenuPending&&l.contextMenuPending();var b=nn(c,i),E=d.scroller.scrollTop;if(b&&!Ui){c.options.resetSelectionOnContextMenu&&c.doc.sel.contains(b)==-1&&Ut(c,Ot)(c.doc,ur(b),Qi);var J=w.style.cssText,W=l.wrapper.style.cssText;if(b=l.wrapper.offsetParent.getBoundingClientRect(),l.wrapper.style.cssText="position: static",w.style.cssText=`position: absolute; width: 30px; height: 30px;
|
||
top: `+(i.clientY-b.top-5)+"px; left: "+(i.clientX-b.left-5)+`px;
|
||
z-index: 1000; background: `+(qe?"rgba(255, 255, 255, .05)":"transparent")+`;
|
||
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`,Kt)var te=w.ownerDocument.defaultView.scrollY;if(d.input.focus(),Kt&&w.ownerDocument.defaultView.scrollTo(null,te),d.input.reset(),c.somethingSelected()||(w.value=l.prevInput=" "),l.contextMenuPending=u,d.selForContextMenu=c.doc.sel,clearTimeout(d.detectingSelectAll),qe&&9<=_t&&s(),Pu){le(i);var ne=function(){K(window,"mouseup",ne),setTimeout(u,20)};Fe(window,"mouseup",ne)}else setTimeout(u,50)}},St.prototype.readOnlyChanged=function(i){i||this.reset(),this.textarea.disabled=i=="nocursor",this.textarea.readOnly=!!i},St.prototype.setUneditable=function(){},St.prototype.needsContentAttribute=!1,function(i){function s(l,c,d,w){i.defaults[l]=c,d&&(u[l]=w?function(b,E,J){J!=Yn&&d(b,E,J)}:d)}var u=i.optionHandlers;i.defineOption=s,i.Init=Yn,s("value","",function(l,c){return l.setValue(c)},!0),s("mode",null,function(l,c){l.doc.modeOption=c,Lu(l)},!0),s("indentUnit",2,Lu,!0),s("indentWithTabs",!1),s("smartIndent",!0),s("tabSize",4,function(l){zs(l),Ds(l),Ht(l)},!0),s("lineSeparator",null,function(l,c){if(l.doc.lineSep=c){var d=[],w=l.doc.first;l.doc.iter(function(E){for(var J=0;;){var W=E.text.indexOf(c,J);if(W==-1)break;J=W+c.length,d.push(pe(w,W))}w++});for(var b=d.length-1;0<=b;b--)Dn(l.doc,c,d[b],pe(d[b].line,d[b].ch+c.length))}}),s("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(l,c,d){l.state.specialChars=new RegExp(c.source+(c.test(" ")?"":"| "),"g"),d!=Yn&&l.refresh()}),s("specialCharPlaceholder",ha,function(l){return l.refresh()},!0),s("electricChars",!0),s("inputStyle",eo?"contenteditable":"textarea",function(){throw Error("inputStyle can not (yet) be changed in a running editor")},!0),s("spellcheck",!1,function(l,c){return l.getInputField().spellcheck=c},!0),s("autocorrect",!1,function(l,c){return l.getInputField().autocorrect=c},!0),s("autocapitalize",!1,function(l,c){return l.getInputField().autocapitalize=c},!0),s("rtlMoveVisually",!v_),s("wholeLineUpdateBefore",!0),s("theme","default",function(l){Wp(l),Vs(l)},!0),s("keyMap","default",function(l,c,d){c=La(c),(d=d!=Yn&&La(d))&&d.detach&&d.detach(l,c),c.attach&&c.attach(l,d||null)}),s("extraKeys",null),s("configureMouse",null),s("lineWrapping",!1,u_,!0),s("gutters",[],function(l,c){l.display.gutterSpecs=Au(c,l.options.lineNumbers),Vs(l)},!0),s("fixedGutter",!0,function(l,c){l.display.gutters.style.left=c?vu(l.display)+"px":"0",l.refresh()},!0),s("coverGutterNextToScrollbar",!1,function(l){return Nn(l)},!0),s("scrollbarStyle","native",function(l){Xh(l),Nn(l),l.display.scrollbars.setScrollTop(l.doc.scrollTop),l.display.scrollbars.setScrollLeft(l.doc.scrollLeft)},!0),s("lineNumbers",!1,function(l,c){l.display.gutterSpecs=Au(l.options.gutters,c),Vs(l)},!0),s("firstLineNumber",1,Vs,!0),s("lineNumberFormatter",function(l){return l},Vs,!0),s("showCursorWhenSelecting",!1,js,!0),s("resetSelectionOnContextMenu",!0),s("lineWiseCopyCut",!0),s("pasteLinesPerSelection",!0),s("selectionsMayTouch",!1),s("readOnly",!1,function(l,c){c=="nocursor"&&(In(l),l.display.input.blur()),l.display.input.readOnlyChanged(c)}),s("screenReaderLabel",null,function(l,c){l.display.input.screenReaderLabelChanged(c===""?null:c)}),s("disableInput",!1,function(l,c){c||l.display.input.reset()},!0),s("dragDrop",!0,l_),s("allowDropFileTypes",null),s("cursorBlinkRate",530),s("cursorScrollMargin",0),s("cursorHeight",1,js,!0),s("singleCursorHeightPerLine",!0,js,!0),s("workTime",100),s("workDelay",100),s("flattenSpans",!0,zs,!0),s("addModeClass",!1,zs,!0),s("pollInterval",100),s("undoDepth",200,function(l,c){return l.doc.history.undoDepth=c}),s("historyEventDelay",1250),s("viewportMargin",10,function(l){return l.refresh()},!0),s("maxHighlightLength",1e4,zs,!0),s("moveInputWithCursor",!0,function(l,c){c||l.display.input.resetPosition()}),s("tabindex",null,function(l,c){return l.display.input.getField().tabIndex=c||""}),s("autofocus",null),s("direction","ltr",function(l,c){return l.doc.setDirection(c)},!0),s("phrases",null)}(wt),function(i){var s=i.optionHandlers,u=i.helpers={};i.prototype={constructor:i,focus:function(){m(this).defaultView.focus(),this.display.input.focus()},setOption:function(l,c){var d=this.options,w=d[l];(d[l]!=c||l=="mode")&&(d[l]=c,s.hasOwnProperty(l)&&Ut(this,s[l])(this,c,w),X(this,"optionChange",this,l))},getOption:function(l){return this.options[l]},getDoc:function(){return this.doc},addKeyMap:function(l,c){this.state.keyMaps[c?"push":"unshift"](La(l))},removeKeyMap:function(l){for(var c=this.state.keyMaps,d=0;d<c.length;++d)if(c[d]==l||c[d].name==l)return c.splice(d,1),!0},addOverlay:Wt(function(l,c){var d=l.token?l:i.getMode(this.options,l);if(d.startState)throw Error("Overlays may not be stateful.");P(this.state.overlays,{mode:d,modeSpec:l,opaque:c&&c.opaque,priority:c&&c.priority||0},function(w){return w.priority}),this.state.modeGen++,Ht(this)}),removeOverlay:Wt(function(l){for(var c=this.state.overlays,d=0;d<c.length;++d){var w=c[d].modeSpec;if(w==l||typeof l=="string"&&w.name==l){c.splice(d,1),this.state.modeGen++,Ht(this);break}}}),indentLine:Wt(function(l,c,d){typeof c!="string"&&typeof c!="number"&&(c=c==null?this.options.smartIndent?"smart":"prev":c?"add":"subtract"),be(this.doc,l)&&Xs(this,l,c,d)}),indentSelection:Wt(function(l){for(var c=this.doc.sel.ranges,d=-1,w=0;w<c.length;w++){var b=c[w];if(b.empty())b.head.line>d&&(Xs(this,b.head.line,l,!0),d=b.head.line,w==this.doc.sel.primIndex&&Jn(this));else{var E=b.from();b=b.to();var J=Math.max(d,E.line);for(d=Math.min(this.lastLine(),b.line-(b.ch?0:1))+1,b=J;b<d;++b)Xs(this,b,l);b=this.doc.sel.ranges,E.ch==0&&c.length==b.length&&0<b[w].from().ch&&Nu(this.doc,w,new rt(E,b[w].to()),Qi)}}}),getTokenAt:function(l,c){return Xe(this,l,c)},getLineTokens:function(l,c){return Xe(this,pe(l),c,!0)},getTokenTypeAt:function(l){l=C(this.doc,l);var c=he(this,N(this.doc,l.line)),d=0,w=(c.length-1)/2;if(l=l.ch,l==0)c=c[2];else for(;;){var b=d+w>>1;if((b?c[2*b-1]:0)>=l)w=b;else if(c[2*b+1]<l)d=b+1;else{c=c[2*b+2];break}}return d=c?c.indexOf("overlay "):-1,0>d?c:d==0?null:c.slice(0,d-1)},getModeAt:function(l){var c=this.doc.mode;return c.innerMode?i.innerMode(c,this.getTokenAt(l).state).mode:c},getHelper:function(l,c){return this.getHelpers(l,c)[0]},getHelpers:function(l,c){var d=[];if(!u.hasOwnProperty(c))return d;var w=u[c];if(l=this.getModeAt(l),typeof l[c]=="string")w[l[c]]&&d.push(w[l[c]]);else if(l[c])for(var b=0;b<l[c].length;b++){var E=w[l[c][b]];E&&d.push(E)}else l.helperType&&w[l.helperType]?d.push(w[l.helperType]):w[l.name]&&d.push(w[l.name]);for(c=0;c<w._global.length;c++)b=w._global[c],b.pred(l,this)&&S(d,b.val)==-1&&d.push(b.val);return d},getStateAfter:function(l,c){var d=this.doc;return l=Math.max(d.first,Math.min(l??d.first+d.size-1,d.first+d.size-1)),me(this,l+1,c).state},cursorCoords:function(l,c){var d=this.doc.sel.primary();return l=l==null?d.head:typeof l=="object"?C(this.doc,l):l?d.from():d.to(),Ri(this,l,c||"page")},charCoords:function(l,c){return va(this,C(this.doc,l),c||"page")},coordsChar:function(l,c){return l=jh(this,l,c||"page"),gu(this,l.left,l.top)},lineAtHeight:function(l,c){return l=jh(this,{top:l,left:0},c||"page").top,_e(this.doc,l+this.display.viewOffset)},heightAtLine:function(l,c,d){var w=!1;if(typeof l=="number"){var b=this.doc.first+this.doc.size-1;l<this.doc.first?l=this.doc.first:l>b&&(l=b,w=!0),l=N(this.doc,l)}return ma(this,l,{top:0,left:0},c||"page",d||w).top+(w?this.doc.height-gi(l):0)},defaultTextHeight:function(){return Ln(this.display)},defaultCharWidth:function(){return Un(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(l,c,d,w,b){var E=this.display;l=Ri(this,C(this.doc,l));var J=l.bottom,W=l.left;if(c.style.position="absolute",c.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(c),E.sizer.appendChild(c),w=="over")J=l.top;else if(w=="above"||w=="near"){var te=Math.max(E.wrapper.clientHeight,this.doc.height),ne=Math.max(E.sizer.clientWidth,E.lineSpace.clientWidth);(w=="above"||l.bottom+c.offsetHeight>te)&&l.top>c.offsetHeight?J=l.top-c.offsetHeight:l.bottom+c.offsetHeight<=te&&(J=l.bottom),W+c.offsetWidth>ne&&(W=ne-c.offsetWidth)}c.style.top=J+"px",c.style.left=c.style.right="",b=="right"?(W=E.sizer.clientWidth-c.offsetWidth,c.style.right="0px"):(b=="left"?W=0:b=="middle"&&(W=(E.sizer.clientWidth-c.offsetWidth)/2),c.style.left=W+"px"),d&&(l=Mu(this,{left:W,top:J,right:W+c.offsetWidth,bottom:J+c.offsetHeight}),l.scrollTop!=null&&Gs(this,l.scrollTop),l.scrollLeft!=null&&on(this,l.scrollLeft))},triggerOnKeyDown:Wt(Bp),triggerOnKeyPress:Wt(Dp),triggerOnKeyUp:Fp,triggerOnMouseDown:Wt(jp),execCommand:function(l){if(ho.hasOwnProperty(l))return ho[l].call(null,this)},triggerElectric:Wt(function(l){Vp(this,l)}),findPosH:function(l,c,d,w){var b=1;0>c&&(b=-1,c=-c),l=C(this.doc,l);for(var E=0;E<c&&(l=ju(this.doc,l,b,d,w),!l.hitSide);++E);return l},moveH:Wt(function(l,c){var d=this;this.extendSelectionsBy(function(w){return d.display.shift||d.doc.extend||w.empty()?ju(d.doc,w.head,l,c,d.options.rtlMoveVisually):0>l?w.from():w.to()},ro)}),deleteH:Wt(function(l,c){var d=this.doc;this.doc.sel.somethingSelected()?d.replaceSelection("",null,"+delete"):Gn(this,function(w){var b=ju(d,w.head,l,c,!1);return 0>l?{from:b,to:w.head}:{from:w.head,to:b}})}),findPosV:function(l,c,d,w){var b=1;0>c&&(b=-1,c=-c);var E=C(this.doc,l);for(l=0;l<c&&(E=Ri(this,E,"div"),w==null?w=E.left:E.left=w,E=Hp(this,E,b,d),!E.hitSide);++l);return E},moveV:Wt(function(l,c){var d=this,w=this.doc,b=[],E=!this.display.shift&&!w.extend&&w.sel.somethingSelected();if(w.extendSelectionsBy(function(W){if(E)return 0>l?W.from():W.to();var te=Ri(d,W.head,"div");W.goalColumn!=null&&(te.left=W.goalColumn),b.push(te.left);var ne=Hp(d,te,l,c);return c=="page"&&W==w.sel.primary()&&Sa(d,va(d,ne,"div").top-te.top),ne},ro),b.length)for(var J=0;J<w.sel.ranges.length;J++)w.sel.ranges[J].goalColumn=b[J]}),findWordAt:function(l){var c=N(this.doc,l.line).text,d=l.ch,w=l.ch;if(c){var b=this.getHelper(l,"wordChars");l.sticky!="before"&&w!=c.length||!d?++w:--d;var E=c.charAt(d);for(E=ee(E,b)?function(J){return ee(J,b)}:/\s/.test(E)?function(J){return/\s/.test(J)}:function(J){return!/\s/.test(J)&&!ee(J)};0<d&&E(c.charAt(d-1));)--d;for(;w<c.length&&E(c.charAt(w));)++w}return new rt(pe(l.line,d),pe(l.line,w))},toggleOverwrite:function(l){(l==null||l!=this.state.overwrite)&&((this.state.overwrite=!this.state.overwrite)?_(this.display.cursorDiv,"CodeMirror-overwrite"):fn(this.display.cursorDiv,"CodeMirror-overwrite"),X(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==v(m(this))},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Wt(function(l,c){Ps(this,l,c)}),getScrollInfo:function(){var l=this.display.scroller;return{left:l.scrollLeft,top:l.scrollTop,height:l.scrollHeight-Oe(this)-this.display.barHeight,width:l.scrollWidth-Oe(this)-this.display.barWidth,clientHeight:Tt(this),clientWidth:Pe(this)}},scrollIntoView:Wt(function(l,c){l==null?(l={from:this.doc.sel.primary().head,to:null},c==null&&(c=this.options.cursorScrollMargin)):typeof l=="number"?l={from:pe(l,0),to:null}:l.from==null&&(l={from:l,to:null}),l.to||(l.to=l.from),l.margin=c||0,l.from.line!=null?(Ma(this),this.curOp.scrollToPos=l):Hh(this,l.from,l.to,l.margin)}),setSize:Wt(function(l,c){var d=this,w=function(E){return typeof E=="number"||/^\d+$/.test(String(E))?E+"px":E};l!=null&&(this.display.wrapper.style.width=w(l)),c!=null&&(this.display.wrapper.style.height=w(c)),this.options.lineWrapping&&Bh(this);var b=this.display.viewFrom;this.doc.iter(b,this.display.viewTo,function(E){if(E.widgets){for(var J=0;J<E.widgets.length;J++)if(E.widgets[J].noHScroll){Tr(d,b,"widget");break}}++b}),this.curOp.forceUpdate=!0,X(this,"refresh",this)}),operation:function(l){return ri(this,l)},startOperation:function(){return an(this)},endOperation:function(){return ln(this)},refresh:Wt(function(){var l=this.display.cachedTextHeight;Ht(this),this.curOp.forceUpdate=!0,Ds(this),Ps(this,this.doc.scrollLeft,this.doc.scrollTop),Eu(this.display),(l==null||.5<Math.abs(l-Ln(this.display))||this.options.lineWrapping)&&_u(this),X(this,"refresh",this)}),swapDoc:Wt(function(l){var c=this.doc;return c.cm=null,this.state.selectingText&&this.state.selectingText(),lp(this,l),Ds(this),this.display.input.reset(),Ps(this,l.scrollLeft,l.scrollTop),this.curOp.forceScroll=!0,bt(this,"swapDoc",this,c),c}),phrase:function(l){var c=this.options.phrases;return c&&Object.prototype.hasOwnProperty.call(c,l)?c[l]:l},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Re(i),i.registerHelper=function(l,c,d){u.hasOwnProperty(l)||(u[l]=i[l]={_global:[]}),u[l][c]=d},i.registerGlobalHelper=function(l,c,d,w){i.registerHelper(l,c,w),u[l]._global.push({pred:d,val:w})}}(wt);var R_="iter insert remove copy getEditor constructor".split(" "),yo;for(yo in $t.prototype)$t.prototype.hasOwnProperty(yo)&&0>S(R_,yo)&&(wt.prototype[yo]=function(i){return function(){return i.apply(this.doc,arguments)}}($t.prototype[yo]));return Re($t),wt.inputStyles={textarea:St,contenteditable:ft},wt.defineMode=function(i){wt.defaults.mode||i=="null"||(wt.defaults.mode=i),xe.apply(this,arguments)},wt.defineMIME=function(i,s){Kn[i]=s},wt.defineMode("null",function(){return{token:function(i){return i.skipToEnd()}}}),wt.defineMIME("text/plain","null"),wt.defineExtension=function(i,s){wt.prototype[i]=s},wt.defineDocExtension=function(i,s){$t.prototype[i]=s},wt.fromTextArea=function(i,s){function u(){i.value=b.getValue()}if(s=s?U(s):{},s.value=i.value,!s.tabindex&&i.tabIndex&&(s.tabindex=i.tabIndex),!s.placeholder&&i.placeholder&&(s.placeholder=i.placeholder),s.autofocus==null){var l=v(i.ownerDocument);s.autofocus=l==i||i.getAttribute("autofocus")!=null&&l==document.body}if(i.form&&(Fe(i.form,"submit",u),!s.leaveSubmitMethodAlone)){var c=i.form,d=c.submit;try{var w=c.submit=function(){u(),c.submit=d,c.submit(),c.submit=w}}catch{}}s.finishInit=function(E){E.save=u,E.getTextArea=function(){return i},E.toTextArea=function(){E.toTextArea=isNaN,u(),i.parentNode.removeChild(E.getWrapperElement()),i.style.display="",i.form&&(K(i.form,"submit",u),s.leaveSubmitMethodAlone||typeof i.form.submit!="function"||(i.form.submit=d))}},i.style.display="none";var b=wt(function(E){return i.parentNode.insertBefore(E,i.nextSibling)},s);return b},function(i){i.off=K,i.on=Fe,i.wheelEventPixels=Pv,i.Doc=$t,i.splitLines=Vu,i.countColumn=R,i.findColumn=g,i.isWordChar=D,i.Pass=Fa,i.signal=X,i.Line=zn,i.changeEnd=kr,i.scrollbarModel=sd,i.Pos=pe,i.cmpPos=Te,i.modes=Qu,i.mimeModes=Kn,i.resolveMode=Le,i.getMode=De,i.modeExtensions=Vn,i.extendMode=H,i.copyState=Y,i.startState=Ce,i.innerMode=ve,i.commands=ho,i.keyMap=co,i.keyName=Up,i.isModifierKey=Rp,i.lookupKey=Pn,i.normalizeKeyMap=Xv,i.StringStream=Et,i.SharedTextMarker=lo,i.TextMarker=Ur,i.LineWidget=ao,i.e_preventDefault=ke,i.e_stopPropagation=Ie,i.e_stop=le,i.addClass=_,i.contains=p,i.rmClass=fn,i.keyNames=Ir}(wt),wt.version="5.65.9",wt})}(Df)),Df.exports}var sk=ks();const ok=Mi(sk);(function(e,t){(function(r){r(ks())})(function(r){r.defineMode("javascript",function(n,o){var a,f,h;function p(I,Z,de){return Sr=I,Mr=de,Z}function v(I,Z){var de=I.next();if(de=='"'||de=="'")return Z.tokenize=_(de),Z.tokenize(I,Z);if(de=="."&&I.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return p("number","number");if(de=="."&&I.match(".."))return p("spread","meta");if(/[\[\]{}\(\),;:\.]/.test(de))return p(de);if(de=="="&&I.eat(">"))return p("=>","operator");if(de=="0"&&I.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return p("number","number");if(/\d/.test(de))return I.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),p("number","number");if(de=="/"){if(I.eat("*"))return Z.tokenize=y,y(I,Z);if(I.eat("/"))return I.skipToEnd(),p("comment","comment");if(ha(I,Z,1)){e:for(var Se=Z=!1;(de=I.next())!=null;){if(!Z){if(de=="/"&&!Se)break e;de=="["?Se=!0:Se&&de=="]"&&(Se=!1)}Z=!Z&&de=="\\"}return I.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),p("regexp","string-2")}return I.eat("="),p("operator","operator",I.current())}if(de=="`")return Z.tokenize=m,m(I,Z);if(de=="#"&&I.peek()=="!")return I.skipToEnd(),p("meta","meta");if(de=="#"&&I.eatWhile(bt))return p("variable","property");if(de=="<"&&I.match("!--")||de=="-"&&I.match("->")&&!/\S/.test(I.string.slice(0,I.start)))return I.skipToEnd(),p("comment","comment");if(Bs.test(de))return de==">"&&Z.lexical&&Z.lexical.type==">"||(I.eat("=")?de!="!"&&de!="="||I.eat("="):/[<>*+\-|&?]/.test(de)&&(I.eat(de),de==">"&&I.eat(de))),de=="?"&&I.eat(".")?p("."):p("operator","operator",I.current());if(bt.test(de)){if(I.eatWhile(bt),de=I.current(),Z.lastType!="."){if(da.propertyIsEnumerable(de))return I=da[de],p(I.type,I.style,de);if(de=="async"&&I.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return p("async","keyword",de)}return p("variable","variable",de)}}function _(I){return function(Z,de){var Se=!1,Oe;if(qr&&Z.peek()=="@"&&Z.match(tn))return de.tokenize=v,p("jsonld-keyword","meta");for(;(Oe=Z.next())!=null&&(Oe!=I||Se);)Se=!Se&&Oe=="\\";return Se||(de.tokenize=v),p("string","string")}}function y(I,Z){for(var de=!1,Se;Se=I.next();){if(Se=="/"&&de){Z.tokenize=v;break}de=Se=="*"}return p("comment","comment")}function m(I,Z){for(var de=!1,Se;(Se=I.next())!=null;){if(!de&&(Se=="`"||Se=="$"&&I.eat("{"))){Z.tokenize=v;break}de=!de&&Se=="\\"}return p("quasi","string-2",I.current())}function x(I,Z){Z.fatArrowAt&&(Z.fatArrowAt=null);var de=I.string.indexOf("=>",I.start);if(!(0>de)){if(mt){var Se=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(I.string.slice(I.start,de));Se&&(de=Se.index)}Se=0;var Oe=!1;for(--de;0<=de;--de){var Pe=I.string.charAt(de),Tt="([{}])".indexOf(Pe);if(0<=Tt&&3>Tt){if(!Se){++de;break}if(--Se==0){Pe=="("&&(Oe=!0);break}}else if(3<=Tt&&6>Tt)++Se;else if(bt.test(Pe))Oe=!0;else if(/["'\/`]/.test(Pe))for(;;--de){if(de==0)return;if(I.string.charAt(de-1)==Pe&&I.string.charAt(de-2)!="\\"){de--;break}}else if(Oe&&!Se){++de;break}}Oe&&!Se&&(Z.fatArrowAt=de)}}function U(I,Z,de,Se,Oe,Pe){this.indented=I,this.column=Z,this.type=de,this.prev=Oe,this.info=Pe,Se!=null&&(this.align=Se)}function R(I,Z,de,Se,Oe){var Pe=I.cc;for(a=I,f=Oe,h=null,Fs=Pe,Cr=Z,I.lexical.hasOwnProperty("align")||(I.lexical.align=!0);;)if((Pe.length?Pe.pop():zi?ie:ye)(de,Se)){for(;Pe.length&&Pe[Pe.length-1].lex;)Pe.pop()();if(h)return h;if(de=de=="variable")e:if(en){for(de=I.localVars;de;de=de.next)if(de.name==Se){de=!0;break e}for(I=I.context;I;I=I.prev)for(de=I.vars;de;de=de.next)if(de.name==Se){de=!0;break e}de=void 0}else de=!1;return de?"variable-2":Z}}function S(){for(var I=arguments.length-1;0<=I;I--)Fs.push(arguments[I])}function g(){return S.apply(null,arguments),!0}function L(I,Z){for(;Z;Z=Z.next)if(Z.name==I)return!0;return!1}function G(I){var Z=a;if(h="def",en){if(Z.context){if(Z.lexical.info=="var"&&Z.context&&Z.context.block){var de=O(I,Z.context);if(de!=null){Z.context=de;return}}else if(!L(I,Z.localVars)){Z.localVars=new V(I,Z.localVars);return}}o.globalVars&&!L(I,Z.globalVars)&&(Z.globalVars=new V(I,Z.globalVars))}}function O(I,Z){return Z?Z.block?(I=O(I,Z.prev))?I==Z.prev?Z:new F(I,Z.vars,!0):null:L(I,Z.vars)?Z:new F(Z.prev,new V(I,Z.vars),!1):null}function P(I){return I=="public"||I=="private"||I=="protected"||I=="abstract"||I=="readonly"}function F(I,Z,de){this.prev=I,this.vars=Z,this.block=de}function V(I,Z){this.name=I,this.next=Z}function D(){a.context=new F(a.context,a.localVars,!1),a.localVars=ya}function ee(){a.context=new F(a.context,a.localVars,!0),a.localVars=null}function A(){a.localVars=a.context.vars,a.context=a.context.prev}function q(I,Z){var de=function(){var Se=a,Oe=Se.indented;if(Se.lexical.type=="stat")Oe=Se.lexical.indented;else for(var Pe=Se.lexical;Pe&&Pe.type==")"&&Pe.align;Pe=Pe.prev)Oe=Pe.indented;Se.lexical=new U(Oe,f.column(),I,null,Se.lexical,Z)};return de.lex=!0,de}function $(){var I=a;I.lexical.prev&&(I.lexical.type==")"&&(I.indented=I.lexical.indented),I.lexical=I.lexical.prev)}function ce(I){function Z(de){return de==I?g():I==";"||de=="}"||de==")"||de=="]"?S():g(Z)}return Z}function ye(I,Z){return I=="var"?g(q("vardef",Z),me,ce(";"),$):I=="keyword a"?g(q("form"),X,ye,$):I=="keyword b"?g(q("form"),ye,$):I=="keyword d"?f.match(/^\s*$/,!1)?g():g(q("stat"),Me,ce(";"),$):I=="debugger"?g(ce(";")):I=="{"?g(q("}"),ee,k,$,A):I==";"?g():I=="if"?(a.lexical.info=="else"&&a.cc[a.cc.length-1]==$&&a.cc.pop()(),g(q("form"),X,ye,$,Us)):I=="function"?g(ii):I=="for"?g(q("form"),ee,la,ye,A,$):I=="class"||mt&&Z=="interface"?(h="keyword",g(q("form",I=="class"?I:Z),Js,$)):I=="variable"?mt&&Z=="declare"?(h="keyword",g(ye)):mt&&(Z=="module"||Z=="enum"||Z=="type")&&f.match(/^\s*\w/,!1)?(h="keyword",Z=="enum"?g(Os):Z=="type"?g(Is,ce("operator"),Ae,ce(";")):g(q("form"),Be,ce("{"),q("}"),k,$,$)):mt&&Z=="namespace"?(h="keyword",g(q("form"),ie,ye,$)):mt&&Z=="abstract"?(h="keyword",g(ye)):g(q("stat"),De):I=="switch"?g(q("form"),X,ce("{"),q("}","switch"),ee,k,$,$,A):I=="case"?g(ie,ce(":")):I=="default"?g(ce(":")):I=="catch"?g(q("form"),D,re,ye,$,A):I=="export"?g(q("stat"),ui,$):I=="import"?g(q("stat"),fa,$):I=="async"?g(ye):Z=="@"?g(ie,ye):S(q("stat"),ie,ce(";"),$)}function re(I){if(I=="(")return g(lr,ce(")"))}function ie(I,Z){return fe(I,Z,!1)}function K(I,Z){return fe(I,Z,!0)}function X(I){return I!="("?S():g(q(")"),Me,ce(")"),$)}function fe(I,Z,de){if(a.fatArrowAt==f.start){var Se=de?le:ze;if(I=="(")return g(D,q(")"),N(lr,")"),$,ce("=>"),Se,A);if(I=="variable")return S(D,Be,ce("=>"),Se,A)}return Se=de?Re:we,ga.hasOwnProperty(I)?g(Se):I=="function"?g(ii,Se):I=="class"||mt&&Z=="interface"?(h="keyword",g(q("form"),ua,$)):I=="keyword c"||I=="async"?g(de?K:ie):I=="("?g(q(")"),Me,ce(")"),$,Se):I=="operator"||I=="spread"?g(de?K:ie):I=="["?g(q("]"),Ns,$,Se):I=="{"?T(Y,"}",null,Se):I=="quasi"?S(ke,Se):I=="new"?g(ue(de)):g()}function Me(I){return I.match(/[;\}\)\],]/)?S():S(ie)}function we(I,Z){return I==","?g(Me):Re(I,Z,!1)}function Re(I,Z,de){var Se=de==0?we:Re,Oe=de==0?ie:K;if(I=="=>")return g(D,de?le:ze,A);if(I=="operator")return/\+\+|--/.test(Z)||mt&&Z=="!"?g(Se):mt&&Z=="<"&&f.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?g(q(">"),N(Ae,">"),$,Se):Z=="?"?g(ie,ce(":"),Oe):g(Oe);if(I=="quasi")return S(ke,Se);if(I!=";"){if(I=="(")return T(K,")","call",Se);if(I==".")return g(H,Se);if(I=="[")return g(q("]"),Me,ce("]"),$,Se);if(mt&&Z=="as")return h="keyword",g(Ae,Se);if(I=="regexp")return a.lastType=h="operator",f.backUp(f.pos-f.start-1),g(Oe)}}function ke(I,Z){return I!="quasi"?S():Z.slice(Z.length-2)!="${"?g(ke):g(Me,Ie)}function Ie(I){if(I=="}")return h="string-2",a.tokenize=m,g(ke)}function ze(I){return x(f,a),S(I=="{"?ye:ie)}function le(I){return x(f,a),S(I=="{"?ye:K)}function ue(I){return function(Z){return Z=="."?g(I?Le:xe):Z=="variable"&&mt?g(Q,I?Re:we):S(I?K:ie)}}function xe(I,Z){if(Z=="target")return h="keyword",g(we)}function Le(I,Z){if(Z=="target")return h="keyword",g(Re)}function De(I){return I==":"?g($,ye):S(we,ce(";"),$)}function H(I){if(I=="variable")return h="property",g()}function Y(I,Z){if(I=="async")return h="property",g(Y);if(I=="variable"||Cr=="keyword"){if(h="property",Z=="get"||Z=="set")return g(ve);var de;return mt&&a.fatArrowAt==f.start&&(de=f.match(/^\s*:\s*/,!1))&&(a.fatArrowAt=f.pos+de[0].length),g(Ce)}if(I=="number"||I=="string")return h=qr?"property":Cr+" property",g(Ce);if(I=="jsonld-keyword")return g(Ce);if(mt&&P(Z))return h="keyword",g(Y);if(I=="[")return g(ie,z,ce("]"),Ce);if(I=="spread")return g(K,Ce);if(Z=="*")return h="keyword",g(Y);if(I==":")return S(Ce)}function ve(I){return I!="variable"?S(Ce):(h="property",g(ii))}function Ce(I){if(I==":")return g(K);if(I=="(")return S(ii)}function N(I,Z,de){function Se(Oe,Pe){return(de?-1<de.indexOf(Oe):Oe==",")?(Oe=a.lexical,Oe.info=="call"&&(Oe.pos=(Oe.pos||0)+1),g(function(Tt,Rn){return Tt==Z||Rn==Z?S():S(I)},Se)):Oe==Z||Pe==Z?g():de&&-1<de.indexOf(";")?S(I):g(ce(Z))}return function(Oe,Pe){return Oe==Z||Pe==Z?g():S(I,Se)}}function T(I,Z,de){for(var Se=3;Se<arguments.length;Se++)Fs.push(arguments[Se]);return g(q(Z,de),N(I,Z),$)}function k(I){return I=="}"?g():S(ye,k)}function z(I,Z){if(mt){if(I==":")return g(Ae);if(Z=="?")return g(z)}}function oe(I,Z){if(mt&&(I==":"||Z=="in"))return g(Ae)}function _e(I){if(mt&&I==":")return f.match(/^\s*\w+\s+is\b/,!1)?g(ie,be,Ae):g(Ae)}function be(I,Z){if(Z=="is")return h="keyword",g()}function Ae(I,Z){if(Z=="keyof"||Z=="typeof"||Z=="infer"||Z=="readonly")return h="keyword",g(Z=="typeof"?K:Ae);if(I=="variable"||Z=="void")return h="type",g(C);if(Z=="|"||Z=="&")return g(Ae);if(I=="string"||I=="number"||I=="atom")return g(C);if(I=="[")return g(q("]"),N(Ae,"]",","),$,C);if(I=="{")return g(q("}"),Te,$,C);if(I=="(")return g(N(M,")"),pe,C);if(I=="<")return g(N(Ae,">"),Ae);if(I=="quasi")return S(Ve,C)}function pe(I){if(I=="=>")return g(Ae)}function Te(I){return I.match(/[\}\)\]]/)?g():I==","||I==";"?g(Te):S(Ke,Te)}function Ke(I,Z){if(I=="variable"||Cr=="keyword")return h="property",g(Ke);if(Z=="?"||I=="number"||I=="string")return g(Ke);if(I==":")return g(Ae);if(I=="[")return g(ce("variable"),oe,ce("]"),Ke);if(I=="(")return S(Vi,Ke);if(!I.match(/[;\}\)\],]/))return g()}function Ve(I,Z){return I!="quasi"?S():Z.slice(Z.length-2)!="${"?g(Ve):g(Ae,B)}function B(I){if(I=="}")return h="string-2",a.tokenize=m,g(Ve)}function M(I,Z){return I=="variable"&&f.match(/^\s*[?:]/,!1)||Z=="?"?g(M):I==":"?g(Ae):I=="spread"?g(M):S(Ae)}function C(I,Z){if(Z=="<")return g(q(">"),N(Ae,">"),$,C);if(Z=="|"||I=="."||Z=="&")return g(Ae);if(I=="[")return g(Ae,ce("]"),C);if(Z=="extends"||Z=="implements")return h="keyword",g(Ae);if(Z=="?")return g(Ae,ce(":"),Ae)}function Q(I,Z){if(Z=="<")return g(q(">"),N(Ae,">"),$,C)}function ae(){return S(Ae,he)}function he(I,Z){if(Z=="=")return g(Ae)}function me(I,Z){return Z=="enum"?(h="keyword",g(Os)):S(Be,z,Xe,it)}function Be(I,Z){if(mt&&P(Z))return h="keyword",g(Be);if(I=="variable")return G(Z),g();if(I=="spread")return g(Be);if(I=="[")return T(ut,"]");if(I=="{")return T(ht,"}")}function ht(I,Z){return I=="variable"&&!f.match(/^\s*:/,!1)?(G(Z),g(Xe)):(I=="variable"&&(h="property"),I=="spread"?g(Be):I=="}"?S():I=="["?g(ie,ce("]"),ce(":"),ht):g(ce(":"),Be,Xe))}function ut(){return S(Be,Xe)}function Xe(I,Z){if(Z=="=")return g(K)}function it(I){if(I==",")return g(me)}function Us(I,Z){if(I=="keyword b"&&Z=="else")return g(q("form","else"),ye,$)}function la(I,Z){if(Z=="await")return g(la);if(I=="(")return g(q(")"),cu,$)}function cu(I){return I=="var"?g(me,ki):I=="variable"?g(ki):S(ki)}function ki(I,Z){return I==")"?g():I==";"?g(ki):Z=="in"||Z=="of"?(h="keyword",g(ie,ki)):S(ie,ki)}function ii(I,Z){if(Z=="*")return h="keyword",g(ii);if(I=="variable")return G(Z),g(ii);if(I=="(")return g(D,q(")"),N(lr,")"),$,_e,ye,A);if(mt&&Z=="<")return g(q(">"),N(ae,">"),$,ii)}function Vi(I,Z){if(Z=="*")return h="keyword",g(Vi);if(I=="variable")return G(Z),g(Vi);if(I=="(")return g(D,q(")"),N(lr,")"),$,_e,A);if(mt&&Z=="<")return g(q(">"),N(ae,">"),$,Vi)}function Is(I,Z){if(I=="keyword"||I=="variable")return h="type",g(Is);if(Z=="<")return g(q(">"),N(ae,">"),$)}function lr(I,Z){return Z=="@"&&g(ie,lr),I=="spread"?g(lr):mt&&P(Z)?(h="keyword",g(lr)):mt&&I=="this"?g(z,Xe):S(Be,z,Xe)}function ua(I,Z){return I=="variable"?Js(I,Z):wr(I,Z)}function Js(I,Z){if(I=="variable")return G(Z),g(wr)}function wr(I,Z){if(Z=="<")return g(q(">"),N(ae,">"),$,wr);if(Z=="extends"||Z=="implements"||mt&&I==",")return Z=="implements"&&(h="keyword"),g(mt?Ae:ie,wr);if(I=="{")return g(q("}"),Gt,$)}function Gt(I,Z){if(I=="async"||I=="variable"&&(Z=="static"||Z=="get"||Z=="set"||mt&&P(Z))&&f.match(/^\s+[\w$\xa1-\uffff]/,!1))return h="keyword",g(Gt);if(I=="variable"||Cr=="keyword")return h="property",g(Xr,Gt);if(I=="number"||I=="string")return g(Xr,Gt);if(I=="[")return g(ie,z,ce("]"),Xr,Gt);if(Z=="*")return h="keyword",g(Gt);if(mt&&I=="(")return S(Vi,Gt);if(I==";"||I==",")return g(Gt);if(I=="}")return g();if(Z=="@")return g(ie,Gt)}function Xr(I,Z){return Z=="!"||Z=="?"?g(Xr):I==":"?g(Ae,Xe):Z=="="?g(K):(I=a.lexical.prev,S(I&&I.info=="interface"?Vi:ii))}function ui(I,Z){return Z=="*"?(h="keyword",g(br,ce(";"))):Z=="default"?(h="keyword",g(ie,ce(";"))):I=="{"?g(N(kn,"}"),br,ce(";")):S(ye)}function kn(I,Z){if(Z=="as")return h="keyword",g(ce("variable"));if(I=="variable")return S(K,kn)}function fa(I){return I=="string"?g():I=="("?S(ie):I=="."?S(we):S(fi,An,br)}function fi(I,Z){return I=="{"?T(fi,"}"):(I=="variable"&&G(Z),Z=="*"&&(h="keyword"),g(gi))}function An(I){if(I==",")return g(fi,An)}function gi(I,Z){if(Z=="as")return h="keyword",g(fi)}function br(I,Z){if(Z=="from")return h="keyword",g(ie)}function Ns(I){return I=="]"?g():S(N(K,"]"))}function Os(){return S(q("form"),Be,ce("{"),q("}"),N(ca,"}"),$,$)}function ca(){return S(Be,Xe)}function ha(I,Z,de){return Z.tokenize==v&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(Z.lastType)||Z.lastType=="quasi"&&/\{\s*$/.test(I.string.slice(0,I.pos-(de||0)))}var xr=n.indentUnit,pa=o.statementIndent,qr=o.jsonld,zi=o.json||qr,en=o.trackScope!==!1,mt=o.typescript,bt=o.wordCharacters||/[\w$\xa1-\uffff]/,da=function(){function I(Rn){return{type:Rn,style:"keyword"}}var Z=I("keyword a"),de=I("keyword b"),Se=I("keyword c"),Oe=I("keyword d"),Pe=I("operator"),Tt={type:"atom",style:"atom"};return{if:I("if"),while:Z,with:Z,else:de,do:de,try:de,finally:de,return:Oe,break:Oe,continue:Oe,new:I("new"),delete:Se,void:Se,throw:Se,debugger:I("debugger"),var:I("var"),const:I("var"),let:I("var"),function:I("function"),catch:I("catch"),for:I("for"),switch:I("switch"),case:I("case"),default:I("default"),in:Pe,typeof:Pe,instanceof:Pe,true:Tt,false:Tt,null:Tt,undefined:Tt,NaN:Tt,Infinity:Tt,this:I("this"),class:I("class"),super:I("atom"),yield:Se,export:I("export"),import:I("import"),extends:Se,await:Se}}(),Bs=/[+\-*&%=<>!?|~^@]/,tn=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Sr,Mr,ga={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0},Fs=h=a=null,Cr=f=void 0,ya=new V("this",new V("arguments",null));return D.lex=ee.lex=!0,A.lex=!0,$.lex=!0,{startState:function(I){return I={tokenize:v,lastType:"sof",cc:[],lexical:new U((I||0)-xr,0,"block",!1),localVars:o.localVars,context:o.localVars&&new F(null,null,!1),indented:I||0},o.globalVars&&typeof o.globalVars=="object"&&(I.globalVars=o.globalVars),I},token:function(I,Z){if(I.sol()&&(Z.lexical.hasOwnProperty("align")||(Z.lexical.align=!1),Z.indented=I.indentation(),x(I,Z)),Z.tokenize!=y&&I.eatSpace())return null;var de=Z.tokenize(I,Z);return Sr=="comment"?de:(Z.lastType=Sr!="operator"||Mr!="++"&&Mr!="--"?Sr:"incdec",R(Z,de,Sr,Mr,I))},indent:function(I,Z){if(I.tokenize==y||I.tokenize==m)return r.Pass;if(I.tokenize!=v)return 0;var de=Z&&Z.charAt(0),Se=I.lexical,Oe;if(!/^\s*else\b/.test(Z))for(var Pe=I.cc.length-1;0<=Pe;--Pe){var Tt=I.cc[Pe];if(Tt==$)Se=Se.prev;else if(Tt!=Us&&Tt!=A)break}for(;!(Se.type!="stat"&&Se.type!="form"||de!="}"&&(!(Oe=I.cc[I.cc.length-1])||Oe!=we&&Oe!=Re||/^[,\.=+\-*:?[\(]/.test(Z)));)Se=Se.prev;return pa&&Se.type==")"&&Se.prev.type=="stat"&&(Se=Se.prev),Oe=Se.type,Pe=de==Oe,Oe=="vardef"?Se.indented+(I.lastType=="operator"||I.lastType==","?Se.info.length+1:0):Oe=="form"&&de=="{"?Se.indented:Oe=="form"?Se.indented+xr:Oe=="stat"?(de=Se.indented,I=I.lastType=="operator"||I.lastType==","||Bs.test(Z.charAt(0))||/[,.]/.test(Z.charAt(0)),de+(I?pa||xr:0)):Se.info!="switch"||Pe||o.doubleIndentSwitch==0?Se.align?Se.column+(Pe?0:1):Se.indented+(Pe?0:xr):Se.indented+(/^(?:case|default)\b/.test(Z)?xr:2*xr)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:zi?null:"/*",blockCommentEnd:zi?null:"*/",blockCommentContinue:zi?null:" * ",lineComment:zi?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:zi?"json":"javascript",jsonldMode:qr,jsonMode:zi,expressionAllowed:ha,skipExpression:function(I){R(I,"atom","atom","true",new r.StringStream("",2,null))}}}),r.registerHelper("wordChars","javascript",/[\w$]/),r.defineMIME("text/javascript","javascript"),r.defineMIME("text/ecmascript","javascript"),r.defineMIME("application/javascript","javascript"),r.defineMIME("application/x-javascript","javascript"),r.defineMIME("application/ecmascript","javascript"),r.defineMIME("application/json",{name:"javascript",json:!0}),r.defineMIME("application/x-json",{name:"javascript",json:!0}),r.defineMIME("application/manifest+json",{name:"javascript",json:!0}),r.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),r.defineMIME("text/typescript",{name:"javascript",typescript:!0}),r.defineMIME("application/typescript",{name:"javascript",typescript:!0})})})();(function(e,t){(function(r){r(ks())})(function(r){function n(x,U){for(var R=0,S=x.length;R<S;++R)U(x[R])}function o(x,U,R,S){var g=x.getCursor(),L=R(x,g);if(!/\b(?:string|comment)\b/.test(L.type)){var G=r.innerMode(x.getMode(),L.state);if(G.mode.helperType!=="json"){for(L.state=G.state,/^[\w$_]*$/.test(L.string)?L.end>g.ch&&(L.end=g.ch,L.string=L.string.slice(0,g.ch-L.start)):L={start:g.ch,end:g.ch,string:"",state:L.state,type:L.string=="."?"property":null},G=L;G.type=="property";){if(G=R(x,h(g.line,G.start)),G.string!=".")return;if(G=R(x,h(g.line,G.start)),!O)var O=[];O.push(G)}return{list:f(L,O,U,S),from:h(g.line,L.start),to:h(g.line,L.end)}}}}function a(x,U){return x=x.getTokenAt(U),U.ch==x.start+1&&x.string.charAt(0)=="."?(x.end=x.start,x.string=".",x.type="property"):/^\.[\w$_]*$/.test(x.string)&&(x.type="property",x.start++,x.string=x.string.replace(/\./,"")),x}function f(x,U,R,S){function g(D){var ee;if(ee=D.lastIndexOf(O,0)==0){e:if(Array.prototype.indexOf)ee=G.indexOf(D)!=-1;else{for(ee=G.length;ee--;)if(G[ee]===D){ee=!0;break e}ee=!1}ee=!ee}ee&&G.push(D)}function L(D){if(typeof D=="string"?n(p,g):D instanceof Array?n(v,g):D instanceof Function&&n(_,g),Object.getOwnPropertyNames&&Object.getPrototypeOf)for(;D;D=Object.getPrototypeOf(D))Object.getOwnPropertyNames(D).forEach(g);else for(var ee in D)g(ee)}var G=[],O=x.string,P=S&&S.globalScope||window;if(U&&U.length){x=U.pop();var F;for(x.type&&x.type.indexOf("variable")===0?(S&&S.additionalContext&&(F=S.additionalContext[x.string]),S&&S.useGlobalScope===!1||(F=F||P[x.string])):x.type=="string"?F="":x.type=="atom"?F=1:x.type=="function"&&(P.jQuery==null||x.string!="$"&&x.string!="jQuery"||typeof P.jQuery!="function"?P._!=null&&x.string=="_"&&typeof P._=="function"&&(F=P._()):F=P.jQuery());F!=null&&U.length;)F=F[U.pop().string];F!=null&&L(F)}else{for(U=x.state.localVars;U;U=U.next)g(U.name);for(F=x.state.context;F;F=F.prev)for(U=F.vars;U;U=U.next)g(U.name);for(U=x.state.globalVars;U;U=U.next)g(U.name);if(S&&S.additionalContext!=null)for(var V in S.additionalContext)g(V);S&&S.useGlobalScope===!1||L(P),n(R,g)}return G}var h=r.Pos;r.registerHelper("hint","javascript",function(x,U){return o(x,y,function(R,S){return R.getTokenAt(S)},U)}),r.registerHelper("hint","coffeescript",function(x,U){return o(x,m,a,U)});var p="charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight toUpperCase toLowerCase split concat match replace search".split(" "),v="length concat join splice push pop shift unshift slice reverse sort indexOf lastIndexOf every some filter forEach map reduce reduceRight ".split(" "),_=["prototype","apply","call","bind"],y="break case catch class const continue debugger default delete do else export extends false finally for function if in import instanceof new null return super switch this throw true try typeof var void while with yield".split(" "),m="and break catch class continue delete do else extends false finally for if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes".split(" ")})})();(function(e,t){(function(r){r(ks())})(function(r){function n(m,x){if(this.cm=m,this.options=x,this.widget=null,this.tick=this.debounce=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var U=this;m.on("cursorActivity",this.activityFunc=function(){U.cursorActivity()})}}function o(m,x){function U(G,O){var P=typeof O!="string"?function(F){return O(F,x)}:R.hasOwnProperty(O)?R[O]:O;g[G]=P}var R={Up:function(){x.moveFocus(-1)},Down:function(){x.moveFocus(1)},PageUp:function(){x.moveFocus(-x.menuSize()+1,!0)},PageDown:function(){x.moveFocus(x.menuSize()-1,!0)},Home:function(){x.setFocus(0)},End:function(){x.setFocus(x.length-1)},Enter:x.pick,Tab:x.pick,Esc:x.close};/Mac/.test(navigator.platform)&&(R["Ctrl-P"]=function(){x.moveFocus(-1)},R["Ctrl-N"]=function(){x.moveFocus(1)});var S=m.options.customKeys,g=S?{}:R;if(S)for(var L in S)S.hasOwnProperty(L)&&U(L,S[L]);if(m=m.options.extraKeys)for(L in m)m.hasOwnProperty(L)&&U(L,m[L]);return g}function a(m,x){for(;x&&x!=m;){if(x.nodeName.toUpperCase()==="LI"&&x.parentNode==m)return x;x=x.parentNode}}function f(m,x){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=m,this.data=x,this.picked=!1;var U=this,R=m.cm,S=R.getInputField().ownerDocument,g=S.defaultView||S.parentWindow,L=this.hints=S.createElement("ul");L.setAttribute("role","listbox"),L.setAttribute("aria-expanded","true"),L.id=this.id,L.className="CodeMirror-hints "+m.cm.options.theme,this.selectedHint=x.selectedHint||0;for(var G=x.list,O=0;O<G.length;++O){var P=L.appendChild(S.createElement("li")),F=G[O],V="CodeMirror-hint"+(O!=this.selectedHint?"":" CodeMirror-hint-active");F.className!=null&&(V=F.className+" "+V),P.className=V,O==this.selectedHint&&P.setAttribute("aria-selected","true"),P.id=this.id+"-"+O,P.setAttribute("role","option"),F.render?F.render(P,x,F):P.appendChild(S.createTextNode(F.displayText||(typeof F=="string"?F:F.text))),P.hintId=O}var D=m.options.container||S.body;O=R.cursorCoords(m.options.alignWithWord?x.from:null);var ee=O.left,A=O.bottom,q=!0;if(V=P=0,D!==S.body){F=["absolute","relative","fixed"].indexOf(g.getComputedStyle(D).position)!==-1?D:D.offsetParent,V=F.getBoundingClientRect();var $=S.body.getBoundingClientRect();P=V.left-$.left-F.scrollLeft,V=V.top-$.top-F.scrollTop}L.style.left=ee-P+"px",L.style.top=A-V+"px",F=g.innerWidth||Math.max(S.body.offsetWidth,S.documentElement.offsetWidth),$=g.innerHeight||Math.max(S.body.offsetHeight,S.documentElement.offsetHeight),D.appendChild(L),R.getInputField().setAttribute("aria-autocomplete","list"),R.getInputField().setAttribute("aria-owns",this.id),R.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint),D=m.options.moveOnOverlap?L.getBoundingClientRect():new DOMRect;var ce=m.options.paddingForScrollbar?L.scrollHeight>L.clientHeight+1:!1,ye;if(setTimeout(function(){ye=R.getScrollInfo()}),0<D.bottom-$){var re=D.bottom-D.top,ie=D.top-(O.bottom-O.top)-2;$-D.top<ie?(re>ie&&(L.style.height=(re=ie)+"px"),L.style.top=(A=O.top-re)+V+"px",q=!1):L.style.height=$-D.top-2+"px"}if(V=D.right-F,ce&&(V+=R.display.nativeBarWidth),0<V&&(D.right-D.left>F&&(L.style.width=F-5+"px",V-=D.right-D.left-F),L.style.left=(ee=Math.max(O.left-V-P,0))+"px"),ce)for(O=L.firstChild;O;O=O.nextSibling)O.style.paddingRight=R.display.nativeBarWidth+"px";if(R.addKeyMap(this.keyMap=o(m,{moveFocus:function(X,fe){U.changeActive(U.selectedHint+X,fe)},setFocus:function(X){U.changeActive(X)},menuSize:function(){return U.screenAmount()},length:G.length,close:function(){m.close()},pick:function(){U.pick()},data:x})),m.options.closeOnUnfocus){var K;R.on("blur",this.onBlur=function(){K=setTimeout(function(){m.close()},100)}),R.on("focus",this.onFocus=function(){clearTimeout(K)})}return R.on("scroll",this.onScroll=function(){var X=R.getScrollInfo(),fe=R.getWrapperElement().getBoundingClientRect();ye||(ye=R.getScrollInfo());var Me=A+ye.top-X.top,we=Me-(g.pageYOffset||(S.documentElement||S.body).scrollTop);if(q||(we+=L.offsetHeight),we<=fe.top||we>=fe.bottom)return m.close();L.style.top=Me+"px",L.style.left=ee+ye.left-X.left+"px"}),r.on(L,"dblclick",function(X){(X=a(L,X.target||X.srcElement))&&X.hintId!=null&&(U.changeActive(X.hintId),U.pick())}),r.on(L,"click",function(X){(X=a(L,X.target||X.srcElement))&&X.hintId!=null&&(U.changeActive(X.hintId),m.options.completeOnSingleClick&&U.pick())}),r.on(L,"mousedown",function(){setTimeout(function(){R.focus()},20)}),O=this.getSelectedHintRange(),O.from===0&&O.to===0||this.scrollToActive(),r.signal(x,"select",G[this.selectedHint],L.childNodes[this.selectedHint]),!0}function h(m,x){if(!m.somethingSelected())return x;m=[];for(var U=0;U<x.length;U++)x[U].supportsSelection&&m.push(x[U]);return m}function p(m,x,U,R){m.async?m(x,R,U):(m=m(x,U))&&m.then?m.then(R):R(m)}r.showHint=function(m,x,U){if(!x)return m.showHint(U);if(U&&U.async&&(x.async=!0),x={hint:x},U)for(var R in U)x[R]=U[R];return m.showHint(x)},r.defineExtension("showHint",function(m){var x=this.getCursor("start"),U=this.options.hintOptions,R={},S;for(S in y)R[S]=y[S];if(U)for(S in U)U[S]!==void 0&&(R[S]=U[S]);if(m)for(S in m)m[S]!==void 0&&(R[S]=m[S]);if(R.hint.resolve&&(R.hint=R.hint.resolve(this,x)),m=R,x=this.listSelections(),!(1<x.length)){if(this.somethingSelected()){if(!m.hint.supportsSelection)return;for(S=0;S<x.length;S++)if(x[S].head.line!=x[S].anchor.line)return}this.state.completionActive&&this.state.completionActive.close(),x=this.state.completionActive=new n(this,m),x.options.hint&&(r.signal(this,"startCompletion",this),x.update(!0))}}),r.defineExtension("closeHint",function(){this.state.completionActive&&this.state.completionActive.close()});var v=window.requestAnimationFrame||function(m){return setTimeout(m,1e3/60)},_=window.cancelAnimationFrame||clearTimeout;n.prototype={close:function(){this.active()&&(this.tick=this.cm.state.completionActive=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&r.signal(this.data,"close"),this.widget&&this.widget.close(),r.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(m,x){var U=m.list[x],R=this;this.cm.operation(function(){U.hint?U.hint(R.cm,m,U):R.cm.replaceRange(typeof U=="string"?U:U.text,U.from||m.from,U.to||m.to,"complete"),r.signal(m,"pick",U),R.cm.scrollIntoView()}),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(_(this.debounce),this.debounce=0);var m=this.startPos;this.data&&(m=this.data.from);var x=this.cm.getCursor(),U=this.cm.getLine(x.line);if(x.line!=this.startPos.line||U.length-x.ch!=this.startLen-this.startPos.ch||x.ch<m.ch||this.cm.somethingSelected()||!x.ch||this.options.closeCharacters.test(U.charAt(x.ch-1)))this.close();else{var R=this;this.debounce=v(function(){R.update()}),this.widget&&this.widget.disable()}},update:function(m){if(this.tick!=null){var x=this,U=++this.tick;p(this.options.hint,this.cm,this.options,function(R){x.tick==U&&x.finishUpdate(R,m)})}},finishUpdate:function(m,x){this.data&&r.signal(this.data,"update"),x=this.widget&&this.widget.picked||x&&this.options.completeSingle,this.widget&&this.widget.close(),(this.data=m)&&m.list.length&&(x&&m.list.length==1?this.pick(m,0):(this.widget=new f(this,m),r.signal(m,"shown")))}},f.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var m=this.completion.cm.getInputField();m.removeAttribute("aria-activedescendant"),m.removeAttribute("aria-owns"),m=this.completion.cm,this.completion.options.closeOnUnfocus&&(m.off("blur",this.onBlur),m.off("focus",this.onFocus)),m.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var m=this;this.keyMap={Enter:function(){m.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(m,x){m>=this.data.list.length?m=x?this.data.list.length-1:0:0>m&&(m=x?0:this.data.list.length-1),this.selectedHint!=m&&((x=this.hints.childNodes[this.selectedHint])&&(x.className=x.className.replace(" CodeMirror-hint-active",""),x.removeAttribute("aria-selected")),x=this.hints.childNodes[this.selectedHint=m],x.className+=" CodeMirror-hint-active",x.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",x.id),this.scrollToActive(),r.signal(this.data,"select",this.data.list[this.selectedHint],x))},scrollToActive:function(){var m=this.getSelectedHintRange(),x=this.hints.childNodes[m.from];m=this.hints.childNodes[m.to];var U=this.hints.firstChild;x.offsetTop<this.hints.scrollTop?this.hints.scrollTop=x.offsetTop-U.offsetTop:m.offsetTop+m.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=m.offsetTop+m.offsetHeight-this.hints.clientHeight+U.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var m=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-m),to:Math.min(this.data.list.length-1,this.selectedHint+m)}}},r.registerHelper("hint","auto",{resolve:function(m,x){var U=m.getHelpers(x,"hint"),R;return U.length?(m=function(S,g,L){function G(P){if(P==O.length)return g(null);p(O[P],S,L,function(F){F&&0<F.list.length?g(F):G(P+1)})}var O=h(S,U);G(0)},m.async=!0,m.supportsSelection=!0,m):(R=m.getHelper(m.getCursor(),"hintWords"))?function(S){return r.hint.fromList(S,{words:R})}:r.hint.anyword?function(S,g){return r.hint.anyword(S,g)}:function(){}}}),r.registerHelper("hint","fromList",function(m,x){var U=m.getCursor(),R=m.getTokenAt(U);m=r.Pos(U.line,R.start),R.start<U.ch&&/\w/.test(R.string.charAt(U.ch-R.start-1))?R=R.string.substr(0,U.ch-R.start):(R="",m=U);for(var S=[],g=0;g<x.words.length;g++){var L=x.words[g];L.slice(0,R.length)==R&&S.push(L)}if(S.length)return{list:S,from:m,to:U}}),r.commands.autocomplete=r.showHint;var y={hint:r.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};r.defineOption("hintOptions",null)})})();(function(e,t){var r=r||{};r.scope={},r.findInternal=function(n,o,a){n instanceof String&&(n=String(n));for(var f=n.length,h=0;h<f;h++){var p=n[h];if(o.call(a,p,h,n))return{i:h,v:p}}return{i:-1,v:void 0}},r.ASSUME_ES5=!1,r.ASSUME_NO_NATIVE_MAP=!1,r.ASSUME_NO_NATIVE_SET=!1,r.SIMPLE_FROUND_POLYFILL=!1,r.ISOLATE_POLYFILLS=!1,r.FORCE_POLYFILL_PROMISE=!1,r.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1,r.defineProperty=r.ASSUME_ES5||typeof Object.defineProperties=="function"?Object.defineProperty:function(n,o,a){return n==Array.prototype||n==Object.prototype||(n[o]=a.value),n},r.getGlobal=function(n){n=[typeof globalThis=="object"&&globalThis,n,typeof window=="object"&&window,typeof self=="object"&&self,typeof gt=="object"&>];for(var o=0;o<n.length;++o){var a=n[o];if(a&&a.Math==Math)return a}throw Error("Cannot find global object")},r.global=r.getGlobal(gt),r.IS_SYMBOL_NATIVE=typeof Symbol=="function"&&typeof Symbol("x")=="symbol",r.TRUST_ES6_POLYFILLS=!r.ISOLATE_POLYFILLS||r.IS_SYMBOL_NATIVE,r.polyfills={},r.propertyToPolyfillSymbol={},r.POLYFILL_PREFIX="$jscp$",r.polyfill=function(n,o,a,f){o&&(r.ISOLATE_POLYFILLS?r.polyfillIsolated(n,o,a,f):r.polyfillUnisolated(n,o,a,f))},r.polyfillUnisolated=function(n,o,a,f){for(a=r.global,n=n.split("."),f=0;f<n.length-1;f++){var h=n[f];if(!(h in a))return;a=a[h]}n=n[n.length-1],f=a[n],o=o(f),o!=f&&o!=null&&r.defineProperty(a,n,{configurable:!0,writable:!0,value:o})},r.polyfillIsolated=function(n,o,a,f){var h=n.split(".");n=h.length===1,f=h[0],f=!n&&f in r.polyfills?r.polyfills:r.global;for(var p=0;p<h.length-1;p++){var v=h[p];if(!(v in f))return;f=f[v]}h=h[h.length-1],a=r.IS_SYMBOL_NATIVE&&a==="es6"?f[h]:null,o=o(a),o!=null&&(n?r.defineProperty(r.polyfills,h,{configurable:!0,writable:!0,value:o}):o!==a&&(r.propertyToPolyfillSymbol[h]===void 0&&(a=1e9*Math.random()>>>0,r.propertyToPolyfillSymbol[h]=r.IS_SYMBOL_NATIVE?r.global.Symbol(h):r.POLYFILL_PREFIX+a+"$"+h),r.defineProperty(f,r.propertyToPolyfillSymbol[h],{configurable:!0,writable:!0,value:o})))},r.polyfill("Array.prototype.find",function(n){return n||function(o,a){return r.findInternal(this,o,a).v}},"es6","es3"),function(n){n(ks())}(function(n){function o(x){x.state.markedSelection&&x.operation(function(){v(x)})}function a(x){x.state.markedSelection&&x.state.markedSelection.length&&x.operation(function(){h(x)})}function f(x,U,R,S){if(m(U,R)!=0)for(var g=x.state.markedSelection,L=x.state.markedSelectionStyle,G=U.line;;){var O=G==U.line?U:y(G,0);G+=_;var P=G>=R.line,F=P?R:y(G,0);if(O=x.markText(O,F,{className:L}),S==null?g.push(O):g.splice(S++,0,O),P)break}}function h(x){x=x.state.markedSelection;for(var U=0;U<x.length;++U)x[U].clear();x.length=0}function p(x){h(x);for(var U=x.listSelections(),R=0;R<U.length;R++)f(x,U[R].from(),U[R].to())}function v(x){if(!x.somethingSelected())return h(x);if(1<x.listSelections().length)return p(x);var U=x.getCursor("start"),R=x.getCursor("end"),S=x.state.markedSelection;if(!S.length)return f(x,U,R);var g=S[0].find(),L=S[S.length-1].find();if(!g||!L||R.line-U.line<=_||0<=m(U,L.to)||0>=m(R,g.from))return p(x);for(;0<m(U,g.from);)S.shift().clear(),g=S[0].find();for(0>m(U,g.from)&&(g.to.line-U.line<_?(S.shift().clear(),f(x,U,g.to,0)):f(x,U,g.from,0));0>m(R,L.to);)S.pop().clear(),L=S[S.length-1].find();0<m(R,L.to)&&(R.line-L.from.line<_?(S.pop().clear(),f(x,L.from,R)):f(x,L.to,R))}n.defineOption("styleSelectedText",!1,function(x,U,R){R=R&&R!=n.Init,U&&!R?(x.state.markedSelection=[],x.state.markedSelectionStyle=typeof U=="string"?U:"CodeMirror-selectedtext",p(x),x.on("cursorActivity",o),x.on("change",a)):!U&&R&&(x.off("cursorActivity",o),x.off("change",a),h(x),x.state.markedSelection=x.state.markedSelectionStyle=null)});var _=8,y=n.Pos,m=n.cmpPos})})();(function(e,t){(function(r){r(ks())})(function(r){function n(_){return _=_.search(h),_==-1?0:_}function o(_,y,m){return/\bstring\b/.test(_.getTokenTypeAt(p(y.line,0)))&&!/^['"`]/.test(m)}function a(_,y){var m=_.getMode();return m.useInnerComments!==!1&&m.innerMode?_.getModeAt(y):m}var f={},h=/[^\s\u00a0]/,p=r.Pos,v=r.cmpPos;r.commands.toggleComment=function(_){_.toggleComment()},r.defineExtension("toggleComment",function(_){_||(_=f);for(var y=1/0,m=this.listSelections(),x=null,U=m.length-1;0<=U;U--){var R=m[U].from(),S=m[U].to();R.line>=y||(S.line>=y&&(S=p(y,0)),y=R.line,x==null?this.uncomment(R,S,_)?x="un":(this.lineComment(R,S,_),x="line"):x=="un"?this.uncomment(R,S,_):this.lineComment(R,S,_))}}),r.defineExtension("lineComment",function(_,y,m){m||(m=f);var x=this,U=a(x,_),R=x.getLine(_.line);if(R!=null&&!o(x,_,R)){var S=m.lineComment||U.lineComment;if(S){var g=Math.min(y.ch!=0||y.line==_.line?y.line+1:y.line,x.lastLine()+1),L=m.padding==null?" ":m.padding,G=m.commentBlankLines||_.line==y.line;x.operation(function(){if(m.indent){for(var O=null,P=_.line;P<g;++P){var F=x.getLine(P);F=F.search(h)===-1?F:F.slice(0,n(F)),(O==null||O.length>F.length)&&(O=F)}for(P=_.line;P<g;++P){F=x.getLine(P);var V=O.length;(G||h.test(F))&&(F.slice(0,V)!=O&&(V=n(F)),x.replaceRange(O+S+L,p(P,0),p(P,V)))}}else for(P=_.line;P<g;++P)(G||h.test(x.getLine(P)))&&x.replaceRange(S+L,p(P,0))})}else(m.blockCommentStart||U.blockCommentStart)&&(m.fullLines=!0,x.blockComment(_,y,m))}}),r.defineExtension("blockComment",function(_,y,m){m||(m=f);var x=this,U=a(x,_),R=m.blockCommentStart||U.blockCommentStart,S=m.blockCommentEnd||U.blockCommentEnd;if(!R||!S)(m.lineComment||U.lineComment)&&m.fullLines!=0&&x.lineComment(_,y,m);else if(!/\bcomment\b/.test(x.getTokenTypeAt(p(_.line,0)))){var g=Math.min(y.line,x.lastLine());g!=_.line&&y.ch==0&&h.test(x.getLine(g))&&--g;var L=m.padding==null?" ":m.padding;_.line>g||x.operation(function(){if(m.fullLines!=0){var G=h.test(x.getLine(g));x.replaceRange(L+S,p(g)),x.replaceRange(R+L,p(_.line,0));var O=m.blockCommentLead||U.blockCommentLead;if(O!=null)for(var P=_.line+1;P<=g;++P)(P!=g||G)&&x.replaceRange(O+L,p(P,0))}else G=v(x.getCursor("to"),y)==0,O=!x.somethingSelected(),x.replaceRange(S,y),G&&x.setSelection(O?y:x.getCursor("from"),y),x.replaceRange(R,_)})}}),r.defineExtension("uncomment",function(_,y,m){m||(m=f);var x=this,U=a(x,_),R=Math.min(y.ch!=0||y.line==_.line?y.line:y.line-1,x.lastLine()),S=Math.min(_.line,R),g=m.lineComment||U.lineComment,L=[],G=m.padding==null?" ":m.padding,O;e:if(g){for(var P=S;P<=R;++P){var F=x.getLine(P),V=F.indexOf(g);if(-1<V&&!/comment/.test(x.getTokenTypeAt(p(P,V+1)))&&(V=-1),V==-1&&h.test(F)||-1<V&&h.test(F.slice(0,V)))break e;L.push(F)}if(x.operation(function(){for(var re=S;re<=R;++re){var ie=L[re-S],K=ie.indexOf(g),X=K+g.length;0>K||(ie.slice(X,X+G.length)==G&&(X+=G.length),O=!0,x.replaceRange("",p(re,K),p(re,X)))}}),O)return!0}var D=m.blockCommentStart||U.blockCommentStart,ee=m.blockCommentEnd||U.blockCommentEnd;if(!D||!ee)return!1;var A=m.blockCommentLead||U.blockCommentLead,q=x.getLine(S),$=q.indexOf(D);if($==-1)return!1;var ce=R==S?q:x.getLine(R),ye=ce.indexOf(ee,R==S?$+D.length:0);return m=p(S,$+1),U=p(R,ye+1),ye==-1||!/comment/.test(x.getTokenTypeAt(m))||!/comment/.test(x.getTokenTypeAt(U))||-1<x.getRange(m,U,`
|
||
`).indexOf(ee)||(U=q.lastIndexOf(D,_.ch),m=U==-1?-1:q.slice(0,_.ch).indexOf(ee,U+D.length),U!=-1&&m!=-1&&m+ee.length!=_.ch)||(m=ce.indexOf(ee,y.ch),_=ce.slice(y.ch).lastIndexOf(D,m-y.ch),U=m==-1||_==-1?-1:y.ch+_,m!=-1&&U!=-1&&U!=y.ch)?!1:(x.operation(function(){x.replaceRange("",p(R,ye-(G&&ce.slice(ye-G.length,ye)==G?G.length:0)),p(R,ye+ee.length));var re=$+D.length;if(G&&q.slice(re,re+G.length)==G&&(re+=G.length),x.replaceRange("",p(S,$),p(S,re)),A)for(re=S+1;re<=R;++re){var ie=x.getLine(re),K=ie.indexOf(A);if(K!=-1&&!h.test(ie.slice(0,K))){var X=K+A.length;G&&ie.slice(X,X+G.length)==G&&(X+=G.length),x.replaceRange("",p(re,K),p(re,X))}}}),!0)})})})();const ak={"Ctrl-Enter":"editor: eval line","Ctrl-/":"editor:toggleComment","Alt-Enter":"editor: eval block","Shift-Ctrl-Enter":"editor: eval all","Shift-Ctrl-G":"gallery:shareSketch","Shift-Ctrl-F":"editor: format code","Shift-Ctrl-L":"gallery:saveToURL","Shift-Ctrl-H":"ui: hide all","Shift-Ctrl-S":"screencap"};var lk=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239],G0=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,3104,541,1507,4938,6,4191],uk="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",W0="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",jf={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},Pf="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",fk={5:Pf,"5module":Pf+" export import",6:Pf+" const class extends export import super"},ck=/^in(stanceof)?$/,hk=new RegExp("["+W0+"]"),pk=new RegExp("["+W0+uk+"]");function zc(e,t){for(var r=65536,n=0;n<t.length;n+=2){if(r+=t[n],r>e)return!1;if(r+=t[n+1],r>=e)return!0}return!1}function yr(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&hk.test(String.fromCharCode(e)):t===!1?!1:zc(e,G0)}function ws(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&pk.test(String.fromCharCode(e)):t===!1?!1:zc(e,G0)||zc(e,lk)}var tt=function(t,r){r===void 0&&(r={}),this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop||null,this.updateContext=null};function mi(e,t){return new tt(e,{beforeExpr:!0,binop:t})}var vi={beforeExpr:!0},oi={startsExpr:!0},Sh={};function Ze(e,t){return t===void 0&&(t={}),t.keyword=e,Sh[e]=new tt(e,t)}var j={num:new tt("num",oi),regexp:new tt("regexp",oi),string:new tt("string",oi),name:new tt("name",oi),privateId:new tt("privateId",oi),eof:new tt("eof"),bracketL:new tt("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new tt("]"),braceL:new tt("{",{beforeExpr:!0,startsExpr:!0}),braceR:new tt("}"),parenL:new tt("(",{beforeExpr:!0,startsExpr:!0}),parenR:new tt(")"),comma:new tt(",",vi),semi:new tt(";",vi),colon:new tt(":",vi),dot:new tt("."),question:new tt("?",vi),questionDot:new tt("?."),arrow:new tt("=>",vi),template:new tt("template"),invalidTemplate:new tt("invalidTemplate"),ellipsis:new tt("...",vi),backQuote:new tt("`",oi),dollarBraceL:new tt("${",{beforeExpr:!0,startsExpr:!0}),eq:new tt("=",{beforeExpr:!0,isAssign:!0}),assign:new tt("_=",{beforeExpr:!0,isAssign:!0}),incDec:new tt("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new tt("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:mi("||",1),logicalAND:mi("&&",2),bitwiseOR:mi("|",3),bitwiseXOR:mi("^",4),bitwiseAND:mi("&",5),equality:mi("==/!=/===/!==",6),relational:mi("</>/<=/>=",7),bitShift:mi("<</>>/>>>",8),plusMin:new tt("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:mi("%",10),star:mi("*",10),slash:mi("/",10),starstar:new tt("**",{beforeExpr:!0}),coalesce:mi("??",1),_break:Ze("break"),_case:Ze("case",vi),_catch:Ze("catch"),_continue:Ze("continue"),_debugger:Ze("debugger"),_default:Ze("default",vi),_do:Ze("do",{isLoop:!0,beforeExpr:!0}),_else:Ze("else",vi),_finally:Ze("finally"),_for:Ze("for",{isLoop:!0}),_function:Ze("function",oi),_if:Ze("if"),_return:Ze("return",vi),_switch:Ze("switch"),_throw:Ze("throw",vi),_try:Ze("try"),_var:Ze("var"),_const:Ze("const"),_while:Ze("while",{isLoop:!0}),_with:Ze("with"),_new:Ze("new",{beforeExpr:!0,startsExpr:!0}),_this:Ze("this",oi),_super:Ze("super",oi),_class:Ze("class",oi),_extends:Ze("extends",vi),_export:Ze("export"),_import:Ze("import",oi),_null:Ze("null",oi),_true:Ze("true",oi),_false:Ze("false",oi),_in:Ze("in",{beforeExpr:!0,binop:7}),_instanceof:Ze("instanceof",{beforeExpr:!0,binop:7}),_typeof:Ze("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:Ze("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:Ze("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Ti=/\r\n?|\n|\u2028|\u2029/,dk=new RegExp(Ti.source,"g");function As(e){return e===10||e===13||e===8232||e===8233}function K0(e,t,r){r===void 0&&(r=e.length);for(var n=t;n<r;n++){var o=e.charCodeAt(n);if(As(o))return n<r-1&&o===13&&e.charCodeAt(n+1)===10?n+2:n+1}return-1}var V0=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,wi=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,z0=Object.prototype,gk=z0.hasOwnProperty,yk=z0.toString,sa=Object.hasOwn||function(e,t){return gk.call(e,t)},oy=Array.isArray||function(e){return yk.call(e)==="[object Array]"};function Kr(e){return new RegExp("^(?:"+e.replace(/ /g,"|")+")$")}function Qr(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var mk=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Xo=function(t,r){this.line=t,this.column=r};Xo.prototype.offset=function(t){return new Xo(this.line,this.column+t)};var ou=function(t,r,n){this.start=r,this.end=n,t.sourceFile!==null&&(this.source=t.sourceFile)};function Q0(e,t){for(var r=1,n=0;;){var o=K0(e,n,t);if(o<0)return new Xo(r,t-n);++r,n=o}}var Qc={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},ay=!1;function vk(e){var t={};for(var r in Qc)t[r]=e&&sa(e,r)?e[r]:Qc[r];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!ay&&typeof console=="object"&&console.warn&&(ay=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
||
Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),oy(t.onToken)){var n=t.onToken;t.onToken=function(o){return n.push(o)}}return oy(t.onComment)&&(t.onComment=_k(t,t.onComment)),t}function _k(e,t){return function(r,n,o,a,f,h){var p={type:r?"Block":"Line",value:n,start:o,end:a};e.locations&&(p.loc=new ou(this,f,h)),e.ranges&&(p.range=[o,a]),t.push(p)}}var qo=1,Rs=2,Mh=4,Y0=8,H0=16,Z0=32,Ch=64,$0=128,oa=256,Th=qo|Rs|oa;function Eh(e,t){return Rs|(e?Mh:0)|(t?Y0:0)}var Dl=0,kh=1,_r=2,X0=3,q0=4,ev=5,Nt=function(t,r,n){this.options=t=vk(t),this.sourceFile=t.sourceFile,this.keywords=Kr(fk[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var o="";t.allowReserved!==!0&&(o=jf[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(o+=" await")),this.reservedWords=Kr(o);var a=(o?o+" ":"")+jf.strict;this.reservedWordsStrict=Kr(a),this.reservedWordsStrictBind=Kr(a+" "+jf.strictBind),this.input=String(r),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf(`
|
||
`,n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(Ti).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=j.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(qo),this.regexpState=null,this.privateNameStack=[]},or={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};Nt.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};or.inFunction.get=function(){return(this.currentVarScope().flags&Rs)>0};or.inGenerator.get=function(){return(this.currentVarScope().flags&Y0)>0&&!this.currentVarScope().inClassFieldInit};or.inAsync.get=function(){return(this.currentVarScope().flags&Mh)>0&&!this.currentVarScope().inClassFieldInit};or.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&oa)return!1;if(t.flags&Rs)return(t.flags&Mh)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};or.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,r=e.inClassFieldInit;return(t&Ch)>0||r||this.options.allowSuperOutsideMethod};or.allowDirectSuper.get=function(){return(this.currentThisScope().flags&$0)>0};or.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};or.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,r=e.inClassFieldInit;return(t&(Rs|oa))>0||r};or.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&oa)>0};Nt.extend=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];for(var n=this,o=0;o<t.length;o++)n=t[o](n);return n};Nt.parse=function(t,r){return new this(r,t).parse()};Nt.parseExpressionAt=function(t,r,n){var o=new this(n,t,r);return o.nextToken(),o.parseExpression()};Nt.tokenizer=function(t,r){return new this(r,t)};Object.defineProperties(Nt.prototype,or);var ti=Nt.prototype,wk=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;ti.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){wi.lastIndex=e,e+=wi.exec(this.input)[0].length;var t=wk.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){wi.lastIndex=e+t[0].length;var r=wi.exec(this.input),n=r.index+r[0].length,o=this.input.charAt(n);return o===";"||o==="}"||Ti.test(r[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(o)||o==="!"&&this.input.charAt(n+1)==="=")}e+=t[0].length,wi.lastIndex=e,e+=wi.exec(this.input)[0].length,this.input[e]===";"&&e++}};ti.eat=function(e){return this.type===e?(this.next(),!0):!1};ti.isContextual=function(e){return this.type===j.name&&this.value===e&&!this.containsEsc};ti.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};ti.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};ti.canInsertSemicolon=function(){return this.type===j.eof||this.type===j.braceR||Ti.test(this.input.slice(this.lastTokEnd,this.start))};ti.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};ti.semicolon=function(){!this.eat(j.semi)&&!this.insertSemicolon()&&this.unexpected()};ti.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};ti.expect=function(e){this.eat(e)||this.unexpected()};ti.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var au=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};ti.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var r=t?e.parenthesizedAssign:e.parenthesizedBind;r>-1&&this.raiseRecoverable(r,t?"Assigning to rvalue":"Parenthesized pattern")}};ti.checkExpressionErrors=function(e,t){if(!e)return!1;var r=e.shorthandAssign,n=e.doubleProto;if(!t)return r>=0||n>=0;r>=0&&this.raise(r,"Shorthand property assignments are valid only in destructuring patterns"),n>=0&&this.raiseRecoverable(n,"Redefinition of __proto__ property")};ti.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")};ti.isSimpleAssignTarget=function(e){return e.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(e.expression):e.type==="Identifier"||e.type==="MemberExpression"};var Ne=Nt.prototype;Ne.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==j.eof;){var r=this.parseStatement(null,!0,t);e.body.push(r)}if(this.inModule)for(var n=0,o=Object.keys(this.undefinedExports);n<o.length;n+=1){var a=o[n];this.raiseRecoverable(this.undefinedExports[a].start,"Export '"+a+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var Ah={kind:"loop"},bk={kind:"switch"};Ne.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;wi.lastIndex=this.pos;var t=wi.exec(this.input),r=this.pos+t[0].length,n=this.input.charCodeAt(r);if(n===91||n===92)return!0;if(e)return!1;if(n===123||n>55295&&n<56320)return!0;if(yr(n,!0)){for(var o=r+1;ws(n=this.input.charCodeAt(o),!0);)++o;if(n===92||n>55295&&n<56320)return!0;var a=this.input.slice(r,o);if(!ck.test(a))return!0}return!1};Ne.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;wi.lastIndex=this.pos;var e=wi.exec(this.input),t=this.pos+e[0].length,r;return!Ti.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(ws(r=this.input.charCodeAt(t+8))||r>55295&&r<56320))};Ne.parseStatement=function(e,t,r){var n=this.type,o=this.startNode(),a;switch(this.isLet(e)&&(n=j._var,a="let"),n){case j._break:case j._continue:return this.parseBreakContinueStatement(o,n.keyword);case j._debugger:return this.parseDebuggerStatement(o);case j._do:return this.parseDoStatement(o);case j._for:return this.parseForStatement(o);case j._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(o,!1,!e);case j._class:return e&&this.unexpected(),this.parseClass(o,!0);case j._if:return this.parseIfStatement(o);case j._return:return this.parseReturnStatement(o);case j._switch:return this.parseSwitchStatement(o);case j._throw:return this.parseThrowStatement(o);case j._try:return this.parseTryStatement(o);case j._const:case j._var:return a=a||this.value,e&&a!=="var"&&this.unexpected(),this.parseVarStatement(o,a);case j._while:return this.parseWhileStatement(o);case j._with:return this.parseWithStatement(o);case j.braceL:return this.parseBlock(!0,o);case j.semi:return this.parseEmptyStatement(o);case j._export:case j._import:if(this.options.ecmaVersion>10&&n===j._import){wi.lastIndex=this.pos;var f=wi.exec(this.input),h=this.pos+f[0].length,p=this.input.charCodeAt(h);if(p===40||p===46)return this.parseExpressionStatement(o,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),n===j._import?this.parseImport(o):this.parseExport(o,r);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(o,!0,!e);var v=this.value,_=this.parseExpression();return n===j.name&&_.type==="Identifier"&&this.eat(j.colon)?this.parseLabeledStatement(o,v,_,e):this.parseExpressionStatement(o,_)}};Ne.parseBreakContinueStatement=function(e,t){var r=t==="break";this.next(),this.eat(j.semi)||this.insertSemicolon()?e.label=null:this.type!==j.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var n=0;n<this.labels.length;++n){var o=this.labels[n];if((e.label==null||o.name===e.label.name)&&(o.kind!=null&&(r||o.kind==="loop")||e.label&&r))break}return n===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,r?"BreakStatement":"ContinueStatement")};Ne.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};Ne.parseDoStatement=function(e){return this.next(),this.labels.push(Ah),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(j._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(j.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};Ne.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Ah),this.enterScope(0),this.expect(j.parenL),this.type===j.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var r=this.isLet();if(this.type===j._var||this.type===j._const||r){var n=this.startNode(),o=r?"let":this.value;return this.next(),this.parseVar(n,!0,o),this.finishNode(n,"VariableDeclaration"),(this.type===j._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&n.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===j._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,n)):(t>-1&&this.unexpected(t),this.parseFor(e,n))}var a=this.isContextual("let"),f=!1,h=new au,p=this.parseExpression(t>-1?"await":!0,h);return this.type===j._in||(f=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===j._in?t>-1&&this.unexpected(t):e.await=t>-1),a&&f&&this.raise(p.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(p,!1,h),this.checkLValPattern(p),this.parseForIn(e,p)):(this.checkExpressionErrors(h,!0),t>-1&&this.unexpected(t),this.parseFor(e,p))};Ne.parseFunctionStatement=function(e,t,r){return this.next(),this.parseFunction(e,Jo|(r?0:Yc),!1,t)};Ne.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(j._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};Ne.parseReturnStatement=function(e){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(j.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};Ne.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(j.braceL),this.labels.push(bk),this.enterScope(0);for(var t,r=!1;this.type!==j.braceR;)if(this.type===j._case||this.type===j._default){var n=this.type===j._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),n?t.test=this.parseExpression():(r&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),r=!0,t.test=null),this.expect(j.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};Ne.parseThrowStatement=function(e){return this.next(),Ti.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var xk=[];Ne.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?Z0:0),this.checkLValPattern(e,t?q0:_r),this.expect(j.parenR),e};Ne.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===j._catch){var t=this.startNode();this.next(),this.eat(j.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(j._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};Ne.parseVarStatement=function(e,t,r){return this.next(),this.parseVar(e,!1,t,r),this.semicolon(),this.finishNode(e,"VariableDeclaration")};Ne.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Ah),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};Ne.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};Ne.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};Ne.parseLabeledStatement=function(e,t,r,n){for(var o=0,a=this.labels;o<a.length;o+=1){var f=a[o];f.name===t&&this.raise(r.start,"Label '"+t+"' is already declared")}for(var h=this.type.isLoop?"loop":this.type===j._switch?"switch":null,p=this.labels.length-1;p>=0;p--){var v=this.labels[p];if(v.statementStart===e.start)v.statementStart=this.start,v.kind=h;else break}return this.labels.push({name:t,kind:h,statementStart:this.start}),e.body=this.parseStatement(n?n.indexOf("label")===-1?n+"label":n:"label"),this.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")};Ne.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};Ne.parseBlock=function(e,t,r){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(j.braceL),e&&this.enterScope(0);this.type!==j.braceR;){var n=this.parseStatement(null);t.body.push(n)}return r&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};Ne.parseFor=function(e,t){return e.init=t,this.expect(j.semi),e.test=this.type===j.semi?null:this.parseExpression(),this.expect(j.semi),e.update=this.type===j.parenR?null:this.parseExpression(),this.expect(j.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};Ne.parseForIn=function(e,t){var r=this.type===j._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!r||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(r?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=r?this.parseExpression():this.parseMaybeAssign(),this.expect(j.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,r?"ForInStatement":"ForOfStatement")};Ne.parseVar=function(e,t,r,n){for(e.declarations=[],e.kind=r;;){var o=this.startNode();if(this.parseVarId(o,r),this.eat(j.eq)?o.init=this.parseMaybeAssign(t):!n&&r==="const"&&!(this.type===j._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!n&&o.id.type!=="Identifier"&&!(t&&(this.type===j._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):o.init=null,e.declarations.push(this.finishNode(o,"VariableDeclarator")),!this.eat(j.comma))break}return e};Ne.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?kh:_r,!1)};var Jo=1,Yc=2,tv=4;Ne.parseFunction=function(e,t,r,n,o){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!n)&&(this.type===j.star&&t&Yc&&this.unexpected(),e.generator=this.eat(j.star)),this.options.ecmaVersion>=8&&(e.async=!!n),t&Jo&&(e.id=t&tv&&this.type!==j.name?null:this.parseIdent(),e.id&&!(t&Yc)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?kh:_r:X0));var a=this.yieldPos,f=this.awaitPos,h=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Eh(e.async,e.generator)),t&Jo||(e.id=this.type===j.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,r,!1,o),this.yieldPos=a,this.awaitPos=f,this.awaitIdentPos=h,this.finishNode(e,t&Jo?"FunctionDeclaration":"FunctionExpression")};Ne.parseFunctionParams=function(e){this.expect(j.parenL),e.params=this.parseBindingList(j.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};Ne.parseClass=function(e,t){this.next();var r=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var n=this.enterClassBody(),o=this.startNode(),a=!1;for(o.body=[],this.expect(j.braceL);this.type!==j.braceR;){var f=this.parseClassElement(e.superClass!==null);f&&(o.body.push(f),f.type==="MethodDefinition"&&f.kind==="constructor"?(a&&this.raiseRecoverable(f.start,"Duplicate constructor in the same class"),a=!0):f.key&&f.key.type==="PrivateIdentifier"&&Sk(n,f)&&this.raiseRecoverable(f.key.start,"Identifier '#"+f.key.name+"' has already been declared"))}return this.strict=r,this.next(),e.body=this.finishNode(o,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};Ne.parseClassElement=function(e){if(this.eat(j.semi))return null;var t=this.options.ecmaVersion,r=this.startNode(),n="",o=!1,a=!1,f="method",h=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(j.braceL))return this.parseClassStaticBlock(r),r;this.isClassElementNameStart()||this.type===j.star?h=!0:n="static"}if(r.static=h,!n&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===j.star)&&!this.canInsertSemicolon()?a=!0:n="async"),!n&&(t>=9||!a)&&this.eat(j.star)&&(o=!0),!n&&!a&&!o){var p=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?f=p:n=p)}if(n?(r.computed=!1,r.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),r.key.name=n,this.finishNode(r.key,"Identifier")):this.parseClassElementName(r),t<13||this.type===j.parenL||f!=="method"||o||a){var v=!r.static&&jl(r,"constructor"),_=v&&e;v&&f!=="method"&&this.raise(r.key.start,"Constructor can't have get/set modifier"),r.kind=v?"constructor":f,this.parseClassMethod(r,o,a,_)}else this.parseClassField(r);return r};Ne.isClassElementNameStart=function(){return this.type===j.name||this.type===j.privateId||this.type===j.num||this.type===j.string||this.type===j.bracketL||this.type.keyword};Ne.parseClassElementName=function(e){this.type===j.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};Ne.parseClassMethod=function(e,t,r,n){var o=e.key;e.kind==="constructor"?(t&&this.raise(o.start,"Constructor can't be a generator"),r&&this.raise(o.start,"Constructor can't be an async method")):e.static&&jl(e,"prototype")&&this.raise(o.start,"Classes may not have a static property named prototype");var a=e.value=this.parseMethod(t,r,n);return e.kind==="get"&&a.params.length!==0&&this.raiseRecoverable(a.start,"getter should have no params"),e.kind==="set"&&a.params.length!==1&&this.raiseRecoverable(a.start,"setter should have exactly one param"),e.kind==="set"&&a.params[0].type==="RestElement"&&this.raiseRecoverable(a.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};Ne.parseClassField=function(e){if(jl(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&jl(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(j.eq)){var t=this.currentThisScope(),r=t.inClassFieldInit;t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=r}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")};Ne.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(oa|Ch);this.type!==j.braceR;){var r=this.parseStatement(null);e.body.push(r)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};Ne.parseClassId=function(e,t){this.type===j.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,_r,!1)):(t===!0&&this.unexpected(),e.id=null)};Ne.parseClassSuper=function(e){e.superClass=this.eat(j._extends)?this.parseExprSubscripts(null,!1):null};Ne.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};Ne.exitClassBody=function(){for(var e=this.privateNameStack.pop(),t=e.declared,r=e.used,n=this.privateNameStack.length,o=n===0?null:this.privateNameStack[n-1],a=0;a<r.length;++a){var f=r[a];sa(t,f.name)||(o?o.used.push(f):this.raiseRecoverable(f.start,"Private field '#"+f.name+"' must be declared in an enclosing class"))}};function Sk(e,t){var r=t.key.name,n=e[r],o="true";return t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set")&&(o=(t.static?"s":"i")+t.kind),n==="iget"&&o==="iset"||n==="iset"&&o==="iget"||n==="sget"&&o==="sset"||n==="sset"&&o==="sget"?(e[r]="true",!1):n?!0:(e[r]=o,!1)}function jl(e,t){var r=e.computed,n=e.key;return!r&&(n.type==="Identifier"&&n.name===t||n.type==="Literal"&&n.value===t)}Ne.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==j.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};Ne.parseExport=function(e,t){if(this.next(),this.eat(j.star))return this.parseExportAllDeclaration(e,t);if(this.eat(j._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==j.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var r=0,n=e.specifiers;r<n.length;r+=1){var o=n[r];this.checkUnreserved(o.local),this.checkLocalExport(o.local),o.local.type==="Literal"&&this.raise(o.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};Ne.parseExportDeclaration=function(e){return this.parseStatement(null)};Ne.parseExportDefaultDeclaration=function(){var e;if(this.type===j._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,Jo|tv,!1,e)}else if(this.type===j._class){var r=this.startNode();return this.parseClass(r,"nullableID")}else{var n=this.parseMaybeAssign();return this.semicolon(),n}};Ne.checkExport=function(e,t,r){e&&(typeof t!="string"&&(t=t.type==="Identifier"?t.name:t.value),sa(e,t)&&this.raiseRecoverable(r,"Duplicate export '"+t+"'"),e[t]=!0)};Ne.checkPatternExport=function(e,t){var r=t.type;if(r==="Identifier")this.checkExport(e,t,t.start);else if(r==="ObjectPattern")for(var n=0,o=t.properties;n<o.length;n+=1){var a=o[n];this.checkPatternExport(e,a)}else if(r==="ArrayPattern")for(var f=0,h=t.elements;f<h.length;f+=1){var p=h[f];p&&this.checkPatternExport(e,p)}else r==="Property"?this.checkPatternExport(e,t.value):r==="AssignmentPattern"?this.checkPatternExport(e,t.left):r==="RestElement"?this.checkPatternExport(e,t.argument):r==="ParenthesizedExpression"&&this.checkPatternExport(e,t.expression)};Ne.checkVariableExport=function(e,t){if(e)for(var r=0,n=t;r<n.length;r+=1){var o=n[r];this.checkPatternExport(e,o.id)}};Ne.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};Ne.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")};Ne.parseExportSpecifiers=function(e){var t=[],r=!0;for(this.expect(j.braceL);!this.eat(j.braceR);){if(r)r=!1;else if(this.expect(j.comma),this.afterTrailingComma(j.braceR))break;t.push(this.parseExportSpecifier(e))}return t};Ne.parseImport=function(e){return this.next(),this.type===j.string?(e.specifiers=xk,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===j.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")};Ne.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,_r),this.finishNode(e,"ImportSpecifier")};Ne.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,_r),this.finishNode(e,"ImportDefaultSpecifier")};Ne.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,_r),this.finishNode(e,"ImportNamespaceSpecifier")};Ne.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===j.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(j.comma)))return e;if(this.type===j.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(j.braceL);!this.eat(j.braceR);){if(t)t=!1;else if(this.expect(j.comma),this.afterTrailingComma(j.braceR))break;e.push(this.parseImportSpecifier())}return e};Ne.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===j.string){var e=this.parseLiteral(this.value);return mk.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};Ne.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)};Ne.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var Ei=Nt.prototype;Ei.toAssignable=function(e,t,r){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",r&&this.checkPatternErrors(r,!0);for(var n=0,o=e.properties;n<o.length;n+=1){var a=o[n];this.toAssignable(a,t),a.type==="RestElement"&&(a.argument.type==="ArrayPattern"||a.argument.type==="ObjectPattern")&&this.raise(a.argument.start,"Unexpected token")}break;case"Property":e.kind!=="init"&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",r&&this.checkPatternErrors(r,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern"&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":e.operator!=="="&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,r);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else r&&this.checkPatternErrors(r,!0);return e};Ei.toAssignableList=function(e,t){for(var r=e.length,n=0;n<r;n++){var o=e[n];o&&this.toAssignable(o,t)}if(r){var a=e[r-1];this.options.ecmaVersion===6&&t&&a&&a.type==="RestElement"&&a.argument.type!=="Identifier"&&this.unexpected(a.argument.start)}return e};Ei.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};Ei.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==j.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")};Ei.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case j.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(j.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case j.braceL:return this.parseObj(!0)}return this.parseIdent()};Ei.parseBindingList=function(e,t,r,n){for(var o=[],a=!0;!this.eat(e);)if(a?a=!1:this.expect(j.comma),t&&this.type===j.comma)o.push(null);else{if(r&&this.afterTrailingComma(e))break;if(this.type===j.ellipsis){var f=this.parseRestBinding();this.parseBindingListItem(f),o.push(f),this.type===j.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}else o.push(this.parseAssignableListItem(n))}return o};Ei.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};Ei.parseBindingListItem=function(e){return e};Ei.parseMaybeDefault=function(e,t,r){if(r=r||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(j.eq))return r;var n=this.startNodeAt(e,t);return n.left=r,n.right=this.parseMaybeAssign(),this.finishNode(n,"AssignmentPattern")};Ei.checkLValSimple=function(e,t,r){t===void 0&&(t=Dl);var n=t!==Dl;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(n?"Binding ":"Assigning to ")+e.name+" in strict mode"),n&&(t===_r&&e.name==="let"&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),r&&(sa(r,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),r[e.name]=!0),t!==ev&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":n&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return n&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,r);default:this.raise(e.start,(n?"Binding":"Assigning to")+" rvalue")}};Ei.checkLValPattern=function(e,t,r){switch(t===void 0&&(t=Dl),e.type){case"ObjectPattern":for(var n=0,o=e.properties;n<o.length;n+=1){var a=o[n];this.checkLValInnerPattern(a,t,r)}break;case"ArrayPattern":for(var f=0,h=e.elements;f<h.length;f+=1){var p=h[f];p&&this.checkLValInnerPattern(p,t,r)}break;default:this.checkLValSimple(e,t,r)}};Ei.checkLValInnerPattern=function(e,t,r){switch(t===void 0&&(t=Dl),e.type){case"Property":this.checkLValInnerPattern(e.value,t,r);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,r);break;case"RestElement":this.checkLValPattern(e.argument,t,r);break;default:this.checkLValPattern(e,t,r)}};var Oi=function(t,r,n,o,a){this.token=t,this.isExpr=!!r,this.preserveSpace=!!n,this.override=o,this.generator=!!a},xt={b_stat:new Oi("{",!1),b_expr:new Oi("{",!0),b_tmpl:new Oi("${",!1),p_stat:new Oi("(",!1),p_expr:new Oi("(",!0),q_tmpl:new Oi("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new Oi("function",!1),f_expr:new Oi("function",!0),f_expr_gen:new Oi("function",!0,!1,null,!0),f_gen:new Oi("function",!1,!1,null,!0)},Ls=Nt.prototype;Ls.initialContext=function(){return[xt.b_stat]};Ls.curContext=function(){return this.context[this.context.length-1]};Ls.braceIsBlock=function(e){var t=this.curContext();return t===xt.f_expr||t===xt.f_stat?!0:e===j.colon&&(t===xt.b_stat||t===xt.b_expr)?!t.isExpr:e===j._return||e===j.name&&this.exprAllowed?Ti.test(this.input.slice(this.lastTokEnd,this.start)):e===j._else||e===j.semi||e===j.eof||e===j.parenR||e===j.arrow?!0:e===j.braceL?t===xt.b_stat:e===j._var||e===j._const||e===j.name?!1:!this.exprAllowed};Ls.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return!1};Ls.updateContext=function(e){var t,r=this.type;r.keyword&&e===j.dot?this.exprAllowed=!1:(t=r.updateContext)?t.call(this,e):this.exprAllowed=r.beforeExpr};Ls.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)};j.parenR.updateContext=j.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();e===xt.b_stat&&this.curContext().token==="function"&&(e=this.context.pop()),this.exprAllowed=!e.isExpr};j.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?xt.b_stat:xt.b_expr),this.exprAllowed=!0};j.dollarBraceL.updateContext=function(){this.context.push(xt.b_tmpl),this.exprAllowed=!0};j.parenL.updateContext=function(e){var t=e===j._if||e===j._for||e===j._with||e===j._while;this.context.push(t?xt.p_stat:xt.p_expr),this.exprAllowed=!0};j.incDec.updateContext=function(){};j._function.updateContext=j._class.updateContext=function(e){e.beforeExpr&&e!==j._else&&!(e===j.semi&&this.curContext()!==xt.p_stat)&&!(e===j._return&&Ti.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===j.colon||e===j.braceL)&&this.curContext()===xt.b_stat)?this.context.push(xt.f_expr):this.context.push(xt.f_stat),this.exprAllowed=!1};j.backQuote.updateContext=function(){this.curContext()===xt.q_tmpl?this.context.pop():this.context.push(xt.q_tmpl),this.exprAllowed=!1};j.star.updateContext=function(e){if(e===j._function){var t=this.context.length-1;this.context[t]===xt.f_expr?this.context[t]=xt.f_expr_gen:this.context[t]=xt.f_gen}this.exprAllowed=!0};j.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==j.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var Ge=Nt.prototype;Ge.checkPropClash=function(e,t,r){if(!(this.options.ecmaVersion>=9&&e.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var n=e.key,o;switch(n.type){case"Identifier":o=n.name;break;case"Literal":o=String(n.value);break;default:return}var a=e.kind;if(this.options.ecmaVersion>=6){o==="__proto__"&&a==="init"&&(t.proto&&(r?r.doubleProto<0&&(r.doubleProto=n.start):this.raiseRecoverable(n.start,"Redefinition of __proto__ property")),t.proto=!0);return}o="$"+o;var f=t[o];if(f){var h;a==="init"?h=this.strict&&f.init||f.get||f.set:h=f.init||f[a],h&&this.raiseRecoverable(n.start,"Redefinition of property")}else f=t[o]={init:!1,get:!1,set:!1};f[a]=!0}};Ge.parseExpression=function(e,t){var r=this.start,n=this.startLoc,o=this.parseMaybeAssign(e,t);if(this.type===j.comma){var a=this.startNodeAt(r,n);for(a.expressions=[o];this.eat(j.comma);)a.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(a,"SequenceExpression")}return o};Ge.parseMaybeAssign=function(e,t,r){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var n=!1,o=-1,a=-1,f=-1;t?(o=t.parenthesizedAssign,a=t.trailingComma,f=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new au,n=!0);var h=this.start,p=this.startLoc;(this.type===j.parenL||this.type===j.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await");var v=this.parseMaybeConditional(e,t);if(r&&(v=r.call(this,v,h,p)),this.type.isAssign){var _=this.startNodeAt(h,p);return _.operator=this.value,this.type===j.eq&&(v=this.toAssignable(v,!1,t)),n||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=v.start&&(t.shorthandAssign=-1),this.type===j.eq?this.checkLValPattern(v):this.checkLValSimple(v),_.left=v,this.next(),_.right=this.parseMaybeAssign(e),f>-1&&(t.doubleProto=f),this.finishNode(_,"AssignmentExpression")}else n&&this.checkExpressionErrors(t,!0);return o>-1&&(t.parenthesizedAssign=o),a>-1&&(t.trailingComma=a),v};Ge.parseMaybeConditional=function(e,t){var r=this.start,n=this.startLoc,o=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return o;if(this.eat(j.question)){var a=this.startNodeAt(r,n);return a.test=o,a.consequent=this.parseMaybeAssign(),this.expect(j.colon),a.alternate=this.parseMaybeAssign(e),this.finishNode(a,"ConditionalExpression")}return o};Ge.parseExprOps=function(e,t){var r=this.start,n=this.startLoc,o=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||o.start===r&&o.type==="ArrowFunctionExpression"?o:this.parseExprOp(o,r,n,-1,e)};Ge.parseExprOp=function(e,t,r,n,o){var a=this.type.binop;if(a!=null&&(!o||this.type!==j._in)&&a>n){var f=this.type===j.logicalOR||this.type===j.logicalAND,h=this.type===j.coalesce;h&&(a=j.logicalAND.binop);var p=this.value;this.next();var v=this.start,_=this.startLoc,y=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,o),v,_,a,o),m=this.buildBinary(t,r,e,y,p,f||h);return(f&&this.type===j.coalesce||h&&(this.type===j.logicalOR||this.type===j.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(m,t,r,n,o)}return e};Ge.buildBinary=function(e,t,r,n,o,a){n.type==="PrivateIdentifier"&&this.raise(n.start,"Private identifier can only be left side of binary expression");var f=this.startNodeAt(e,t);return f.left=r,f.operator=o,f.right=n,this.finishNode(f,a?"LogicalExpression":"BinaryExpression")};Ge.parseMaybeUnary=function(e,t,r,n){var o=this.start,a=this.startLoc,f;if(this.isContextual("await")&&this.canAwait)f=this.parseAwait(n),t=!0;else if(this.type.prefix){var h=this.startNode(),p=this.type===j.incDec;h.operator=this.value,h.prefix=!0,this.next(),h.argument=this.parseMaybeUnary(null,!0,p,n),this.checkExpressionErrors(e,!0),p?this.checkLValSimple(h.argument):this.strict&&h.operator==="delete"&&h.argument.type==="Identifier"?this.raiseRecoverable(h.start,"Deleting local variable in strict mode"):h.operator==="delete"&&iv(h.argument)?this.raiseRecoverable(h.start,"Private fields can not be deleted"):t=!0,f=this.finishNode(h,p?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===j.privateId)(n||this.privateNameStack.length===0)&&this.unexpected(),f=this.parsePrivateIdent(),this.type!==j._in&&this.unexpected();else{if(f=this.parseExprSubscripts(e,n),this.checkExpressionErrors(e))return f;for(;this.type.postfix&&!this.canInsertSemicolon();){var v=this.startNodeAt(o,a);v.operator=this.value,v.prefix=!1,v.argument=f,this.checkLValSimple(f),this.next(),f=this.finishNode(v,"UpdateExpression")}}if(!r&&this.eat(j.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(o,a,f,this.parseMaybeUnary(null,!1,!1,n),"**",!1);else return f};function iv(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&iv(e.expression)}Ge.parseExprSubscripts=function(e,t){var r=this.start,n=this.startLoc,o=this.parseExprAtom(e,t);if(o.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return o;var a=this.parseSubscripts(o,r,n,!1,t);return e&&a.type==="MemberExpression"&&(e.parenthesizedAssign>=a.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=a.start&&(e.parenthesizedBind=-1),e.trailingComma>=a.start&&(e.trailingComma=-1)),a};Ge.parseSubscripts=function(e,t,r,n,o){for(var a=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,f=!1;;){var h=this.parseSubscript(e,t,r,n,a,f,o);if(h.optional&&(f=!0),h===e||h.type==="ArrowFunctionExpression"){if(f){var p=this.startNodeAt(t,r);p.expression=h,h=this.finishNode(p,"ChainExpression")}return h}e=h}};Ge.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(j.arrow)};Ge.parseSubscriptAsyncArrow=function(e,t,r,n){return this.parseArrowExpression(this.startNodeAt(e,t),r,!0,n)};Ge.parseSubscript=function(e,t,r,n,o,a,f){var h=this.options.ecmaVersion>=11,p=h&&this.eat(j.questionDot);n&&p&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var v=this.eat(j.bracketL);if(v||p&&this.type!==j.parenL&&this.type!==j.backQuote||this.eat(j.dot)){var _=this.startNodeAt(t,r);_.object=e,v?(_.property=this.parseExpression(),this.expect(j.bracketR)):this.type===j.privateId&&e.type!=="Super"?_.property=this.parsePrivateIdent():_.property=this.parseIdent(this.options.allowReserved!=="never"),_.computed=!!v,h&&(_.optional=p),e=this.finishNode(_,"MemberExpression")}else if(!n&&this.eat(j.parenL)){var y=new au,m=this.yieldPos,x=this.awaitPos,U=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var R=this.parseExprList(j.parenR,this.options.ecmaVersion>=8,!1,y);if(o&&!p&&this.shouldParseAsyncArrow())return this.checkPatternErrors(y,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=m,this.awaitPos=x,this.awaitIdentPos=U,this.parseSubscriptAsyncArrow(t,r,R,f);this.checkExpressionErrors(y,!0),this.yieldPos=m||this.yieldPos,this.awaitPos=x||this.awaitPos,this.awaitIdentPos=U||this.awaitIdentPos;var S=this.startNodeAt(t,r);S.callee=e,S.arguments=R,h&&(S.optional=p),e=this.finishNode(S,"CallExpression")}else if(this.type===j.backQuote){(p||a)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var g=this.startNodeAt(t,r);g.tag=e,g.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(g,"TaggedTemplateExpression")}return e};Ge.parseExprAtom=function(e,t,r){this.type===j.slash&&this.readRegexp();var n,o=this.potentialArrowAt===this.start;switch(this.type){case j._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),n=this.startNode(),this.next(),this.type===j.parenL&&!this.allowDirectSuper&&this.raise(n.start,"super() call outside constructor of a subclass"),this.type!==j.dot&&this.type!==j.bracketL&&this.type!==j.parenL&&this.unexpected(),this.finishNode(n,"Super");case j._this:return n=this.startNode(),this.next(),this.finishNode(n,"ThisExpression");case j.name:var a=this.start,f=this.startLoc,h=this.containsEsc,p=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!h&&p.name==="async"&&!this.canInsertSemicolon()&&this.eat(j._function))return this.overrideContext(xt.f_expr),this.parseFunction(this.startNodeAt(a,f),0,!1,!0,t);if(o&&!this.canInsertSemicolon()){if(this.eat(j.arrow))return this.parseArrowExpression(this.startNodeAt(a,f),[p],!1,t);if(this.options.ecmaVersion>=8&&p.name==="async"&&this.type===j.name&&!h&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return p=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(j.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,f),[p],!0,t)}return p;case j.regexp:var v=this.value;return n=this.parseLiteral(v.value),n.regex={pattern:v.pattern,flags:v.flags},n;case j.num:case j.string:return this.parseLiteral(this.value);case j._null:case j._true:case j._false:return n=this.startNode(),n.value=this.type===j._null?null:this.type===j._true,n.raw=this.type.keyword,this.next(),this.finishNode(n,"Literal");case j.parenL:var _=this.start,y=this.parseParenAndDistinguishExpression(o,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(y)&&(e.parenthesizedAssign=_),e.parenthesizedBind<0&&(e.parenthesizedBind=_)),y;case j.bracketL:return n=this.startNode(),this.next(),n.elements=this.parseExprList(j.bracketR,!0,!0,e),this.finishNode(n,"ArrayExpression");case j.braceL:return this.overrideContext(xt.b_expr),this.parseObj(!1,e);case j._function:return n=this.startNode(),this.next(),this.parseFunction(n,0);case j._class:return this.parseClass(this.startNode(),!1);case j._new:return this.parseNew();case j.backQuote:return this.parseTemplate();case j._import:return this.options.ecmaVersion>=11?this.parseExprImport(r):this.unexpected();default:return this.parseExprAtomDefault()}};Ge.parseExprAtomDefault=function(){this.unexpected()};Ge.parseExprImport=function(e){var t=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");var r=this.parseIdent(!0);if(this.type===j.parenL&&!e)return this.parseDynamicImport(t);if(this.type===j.dot)return t.meta=r,this.parseImportMeta(t);this.unexpected()};Ge.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(j.parenR)){var t=this.start;this.eat(j.comma)&&this.eat(j.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")};Ge.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};Ge.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")};Ge.parseParenExpression=function(){this.expect(j.parenL);var e=this.parseExpression();return this.expect(j.parenR),e};Ge.shouldParseArrow=function(e){return!this.canInsertSemicolon()};Ge.parseParenAndDistinguishExpression=function(e,t){var r=this.start,n=this.startLoc,o,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var f=this.start,h=this.startLoc,p=[],v=!0,_=!1,y=new au,m=this.yieldPos,x=this.awaitPos,U;for(this.yieldPos=0,this.awaitPos=0;this.type!==j.parenR;)if(v?v=!1:this.expect(j.comma),a&&this.afterTrailingComma(j.parenR,!0)){_=!0;break}else if(this.type===j.ellipsis){U=this.start,p.push(this.parseParenItem(this.parseRestBinding())),this.type===j.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else p.push(this.parseMaybeAssign(!1,y,this.parseParenItem));var R=this.lastTokEnd,S=this.lastTokEndLoc;if(this.expect(j.parenR),e&&this.shouldParseArrow(p)&&this.eat(j.arrow))return this.checkPatternErrors(y,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=m,this.awaitPos=x,this.parseParenArrowList(r,n,p,t);(!p.length||_)&&this.unexpected(this.lastTokStart),U&&this.unexpected(U),this.checkExpressionErrors(y,!0),this.yieldPos=m||this.yieldPos,this.awaitPos=x||this.awaitPos,p.length>1?(o=this.startNodeAt(f,h),o.expressions=p,this.finishNodeAt(o,"SequenceExpression",R,S)):o=p[0]}else o=this.parseParenExpression();if(this.options.preserveParens){var g=this.startNodeAt(r,n);return g.expression=o,this.finishNode(g,"ParenthesizedExpression")}else return o};Ge.parseParenItem=function(e){return e};Ge.parseParenArrowList=function(e,t,r,n){return this.parseArrowExpression(this.startNodeAt(e,t),r,!1,n)};var Mk=[];Ge.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(j.dot)){e.meta=t;var r=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),r&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var n=this.start,o=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),n,o,!0,!1),this.eat(j.parenL)?e.arguments=this.parseExprList(j.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Mk,this.finishNode(e,"NewExpression")};Ge.parseTemplateElement=function(e){var t=e.isTagged,r=this.startNode();return this.type===j.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),r.value={raw:this.value,cooked:null}):r.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
|
||
`),cooked:this.value},this.next(),r.tail=this.type===j.backQuote,this.finishNode(r,"TemplateElement")};Ge.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var r=this.startNode();this.next(),r.expressions=[];var n=this.parseTemplateElement({isTagged:t});for(r.quasis=[n];!n.tail;)this.type===j.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(j.dollarBraceL),r.expressions.push(this.parseExpression()),this.expect(j.braceR),r.quasis.push(n=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(r,"TemplateLiteral")};Ge.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===j.name||this.type===j.num||this.type===j.string||this.type===j.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===j.star)&&!Ti.test(this.input.slice(this.lastTokEnd,this.start))};Ge.parseObj=function(e,t){var r=this.startNode(),n=!0,o={};for(r.properties=[],this.next();!this.eat(j.braceR);){if(n)n=!1;else if(this.expect(j.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(j.braceR))break;var a=this.parseProperty(e,t);e||this.checkPropClash(a,o,t),r.properties.push(a)}return this.finishNode(r,e?"ObjectPattern":"ObjectExpression")};Ge.parseProperty=function(e,t){var r=this.startNode(),n,o,a,f;if(this.options.ecmaVersion>=9&&this.eat(j.ellipsis))return e?(r.argument=this.parseIdent(!1),this.type===j.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(r,"RestElement")):(r.argument=this.parseMaybeAssign(!1,t),this.type===j.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(r,"SpreadElement"));this.options.ecmaVersion>=6&&(r.method=!1,r.shorthand=!1,(e||t)&&(a=this.start,f=this.startLoc),e||(n=this.eat(j.star)));var h=this.containsEsc;return this.parsePropertyName(r),!e&&!h&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(r)?(o=!0,n=this.options.ecmaVersion>=9&&this.eat(j.star),this.parsePropertyName(r)):o=!1,this.parsePropertyValue(r,e,n,o,a,f,t,h),this.finishNode(r,"Property")};Ge.parseGetterSetter=function(e){e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var t=e.kind==="get"?0:1;if(e.value.params.length!==t){var r=e.value.start;e.kind==="get"?this.raiseRecoverable(r,"getter should have no params"):this.raiseRecoverable(r,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};Ge.parsePropertyValue=function(e,t,r,n,o,a,f,h){(r||n)&&this.type===j.colon&&this.unexpected(),this.eat(j.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,f),e.kind="init"):this.options.ecmaVersion>=6&&this.type===j.parenL?(t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(r,n)):!t&&!h&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==j.comma&&this.type!==j.braceR&&this.type!==j.eq?((r||n)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((r||n)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=o),e.kind="init",t?e.value=this.parseMaybeDefault(o,a,this.copyNode(e.key)):this.type===j.eq&&f?(f.shorthandAssign<0&&(f.shorthandAssign=this.start),e.value=this.parseMaybeDefault(o,a,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected()};Ge.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(j.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(j.bracketR),e.key;e.computed=!1}return e.key=this.type===j.num||this.type===j.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};Ge.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};Ge.parseMethod=function(e,t,r){var n=this.startNode(),o=this.yieldPos,a=this.awaitPos,f=this.awaitIdentPos;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=e),this.options.ecmaVersion>=8&&(n.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Eh(t,n.generator)|Ch|(r?$0:0)),this.expect(j.parenL),n.params=this.parseBindingList(j.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1,!0,!1),this.yieldPos=o,this.awaitPos=a,this.awaitIdentPos=f,this.finishNode(n,"FunctionExpression")};Ge.parseArrowExpression=function(e,t,r,n){var o=this.yieldPos,a=this.awaitPos,f=this.awaitIdentPos;return this.enterScope(Eh(r,!1)|H0),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!r),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,n),this.yieldPos=o,this.awaitPos=a,this.awaitIdentPos=f,this.finishNode(e,"ArrowFunctionExpression")};Ge.parseFunctionBody=function(e,t,r,n){var o=t&&this.type!==j.braceL,a=this.strict,f=!1;if(o)e.body=this.parseMaybeAssign(n),e.expression=!0,this.checkParams(e,!1);else{var h=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!a||h)&&(f=this.strictDirective(this.end),f&&h&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var p=this.labels;this.labels=[],f&&(this.strict=!0),this.checkParams(e,!a&&!f&&!t&&!r&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,ev),e.body=this.parseBlock(!1,void 0,f&&!a),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=p}this.exitScope()};Ge.isSimpleParamList=function(e){for(var t=0,r=e;t<r.length;t+=1){var n=r[t];if(n.type!=="Identifier")return!1}return!0};Ge.checkParams=function(e,t){for(var r=Object.create(null),n=0,o=e.params;n<o.length;n+=1){var a=o[n];this.checkLValInnerPattern(a,kh,t?null:r)}};Ge.parseExprList=function(e,t,r,n){for(var o=[],a=!0;!this.eat(e);){if(a)a=!1;else if(this.expect(j.comma),t&&this.afterTrailingComma(e))break;var f=void 0;r&&this.type===j.comma?f=null:this.type===j.ellipsis?(f=this.parseSpread(n),n&&this.type===j.comma&&n.trailingComma<0&&(n.trailingComma=this.start)):f=this.parseMaybeAssign(!1,n),o.push(f)}return o};Ge.checkUnreserved=function(e){var t=e.start,r=e.end,n=e.name;if(this.inGenerator&&n==="yield"&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&n==="await"&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().inClassFieldInit&&n==="arguments"&&this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(n==="arguments"||n==="await")&&this.raise(t,"Cannot use "+n+" in class static initialization block"),this.keywords.test(n)&&this.raise(t,"Unexpected keyword '"+n+"'"),!(this.options.ecmaVersion<6&&this.input.slice(t,r).indexOf("\\")!==-1)){var o=this.strict?this.reservedWordsStrict:this.reservedWords;o.test(n)&&(!this.inAsync&&n==="await"&&this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+n+"' is reserved"))}};Ge.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,"Identifier"),e||(this.checkUnreserved(t),t.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=t.start)),t};Ge.parseIdentNode=function(){var e=this.startNode();return this.type===j.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,(e.name==="class"||e.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop()):this.unexpected(),e};Ge.parsePrivateIdent=function(){var e=this.startNode();return this.type===j.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),this.privateNameStack.length===0?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(e),e};Ge.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===j.semi||this.canInsertSemicolon()||this.type!==j.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(j.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")};Ge.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var Pl=Nt.prototype;Pl.raise=function(e,t){var r=Q0(this.input,e);t+=" ("+r.line+":"+r.column+")";var n=new SyntaxError(t);throw n.pos=e,n.loc=r,n.raisedAt=this.pos,n};Pl.raiseRecoverable=Pl.raise;Pl.curPosition=function(){if(this.options.locations)return new Xo(this.curLine,this.pos-this.lineStart)};var Zr=Nt.prototype,Ck=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[],this.inClassFieldInit=!1};Zr.enterScope=function(e){this.scopeStack.push(new Ck(e))};Zr.exitScope=function(){this.scopeStack.pop()};Zr.treatFunctionsAsVarInScope=function(e){return e.flags&Rs||!this.inModule&&e.flags&qo};Zr.declareName=function(e,t,r){var n=!1;if(t===_r){var o=this.currentScope();n=o.lexical.indexOf(e)>-1||o.functions.indexOf(e)>-1||o.var.indexOf(e)>-1,o.lexical.push(e),this.inModule&&o.flags&qo&&delete this.undefinedExports[e]}else if(t===q0){var a=this.currentScope();a.lexical.push(e)}else if(t===X0){var f=this.currentScope();this.treatFunctionsAsVar?n=f.lexical.indexOf(e)>-1:n=f.lexical.indexOf(e)>-1||f.var.indexOf(e)>-1,f.functions.push(e)}else for(var h=this.scopeStack.length-1;h>=0;--h){var p=this.scopeStack[h];if(p.lexical.indexOf(e)>-1&&!(p.flags&Z0&&p.lexical[0]===e)||!this.treatFunctionsAsVarInScope(p)&&p.functions.indexOf(e)>-1){n=!0;break}if(p.var.push(e),this.inModule&&p.flags&qo&&delete this.undefinedExports[e],p.flags&Th)break}n&&this.raiseRecoverable(r,"Identifier '"+e+"' has already been declared")};Zr.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)};Zr.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};Zr.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&Th)return t}};Zr.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&Th&&!(t.flags&H0))return t}};var lu=function(t,r,n){this.type="",this.start=r,this.end=0,t.options.locations&&(this.loc=new ou(t,n)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[r,0])},aa=Nt.prototype;aa.startNode=function(){return new lu(this,this.start,this.startLoc)};aa.startNodeAt=function(e,t){return new lu(this,e,t)};function rv(e,t,r,n){return e.type=t,e.end=r,this.options.locations&&(e.loc.end=n),this.options.ranges&&(e.range[1]=r),e}aa.finishNode=function(e,t){return rv.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};aa.finishNodeAt=function(e,t,r,n){return rv.call(this,e,t,r,n)};aa.copyNode=function(e){var t=new lu(this,e.start,this.startLoc);for(var r in e)t[r]=e[r];return t};var nv="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",sv=nv+" Extended_Pictographic",ov=sv,av=ov+" EBase EComp EMod EPres ExtPict",lv=av,Tk=lv,Ek={9:nv,10:sv,11:ov,12:av,13:lv,14:Tk},kk="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",Ak={9:"",10:"",11:"",12:"",13:"",14:kk},ly="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",uv="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",fv=uv+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",cv=fv+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",hv=cv+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",pv=hv+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Rk=pv+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz",Lk={9:uv,10:fv,11:cv,12:hv,13:pv,14:Rk},dv={};function Uk(e){var t=dv[e]={binary:Kr(Ek[e]+" "+ly),binaryOfStrings:Kr(Ak[e]),nonBinary:{General_Category:Kr(ly),Script:Kr(Lk[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var Gf=0,uy=[9,10,11,12,13,14];Gf<uy.length;Gf+=1){var Ik=uy[Gf];Uk(Ik)}var Ue=Nt.prototype,ar=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=dv[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};ar.prototype.reset=function(t,r,n){var o=n.indexOf("v")!==-1,a=n.indexOf("u")!==-1;this.start=t|0,this.source=r+"",this.flags=n,o&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=a&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=a&&this.parser.options.ecmaVersion>=9)};ar.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};ar.prototype.at=function(t,r){r===void 0&&(r=!1);var n=this.source,o=n.length;if(t>=o)return-1;var a=n.charCodeAt(t);if(!(r||this.switchU)||a<=55295||a>=57344||t+1>=o)return a;var f=n.charCodeAt(t+1);return f>=56320&&f<=57343?(a<<10)+f-56613888:a};ar.prototype.nextIndex=function(t,r){r===void 0&&(r=!1);var n=this.source,o=n.length;if(t>=o)return o;var a=n.charCodeAt(t),f;return!(r||this.switchU)||a<=55295||a>=57344||t+1>=o||(f=n.charCodeAt(t+1))<56320||f>57343?t+1:t+2};ar.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)};ar.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)};ar.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)};ar.prototype.eat=function(t,r){return r===void 0&&(r=!1),this.current(r)===t?(this.advance(r),!0):!1};ar.prototype.eatChars=function(t,r){r===void 0&&(r=!1);for(var n=this.pos,o=0,a=t;o<a.length;o+=1){var f=a[o],h=this.at(n,r);if(h===-1||h!==f)return!1;n=this.nextIndex(n,r)}return this.pos=n,!0};Ue.validateRegExpFlags=function(e){for(var t=e.validFlags,r=e.flags,n=!1,o=!1,a=0;a<r.length;a++){var f=r.charAt(a);t.indexOf(f)===-1&&this.raise(e.start,"Invalid regular expression flag"),r.indexOf(f,a+1)>-1&&this.raise(e.start,"Duplicate regular expression flag"),f==="u"&&(n=!0),f==="v"&&(o=!0)}this.options.ecmaVersion>=15&&n&&o&&this.raise(e.start,"Invalid regular expression flag")};Ue.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))};Ue.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,r=e.backReferenceNames;t<r.length;t+=1){var n=r[t];e.groupNames.indexOf(n)===-1&&e.raise("Invalid named capture referenced")}};Ue.regexp_disjunction=function(e){for(this.regexp_alternative(e);e.eat(124);)this.regexp_alternative(e);this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")};Ue.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););};Ue.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))?(this.regexp_eatQuantifier(e),!0):!1};Ue.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var r=!1;if(this.options.ecmaVersion>=9&&(r=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!r,!0}return e.pos=t,!1};Ue.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1};Ue.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};Ue.regexp_eatBracedQuantifier=function(e,t){var r=e.pos;if(e.eat(123)){var n=0,o=-1;if(this.regexp_eatDecimalDigits(e)&&(n=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(o=e.lastIntValue),e.eat(125)))return o!==-1&&o<n&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=r}return!1};Ue.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)};Ue.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1};Ue.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)&&e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}e.pos=t}return!1};Ue.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};Ue.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};Ue.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};Ue.regexp_eatSyntaxCharacter=function(e){var t=e.current();return gv(t)?(e.lastIntValue=t,e.advance(),!0):!1};function gv(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}Ue.regexp_eatPatternCharacters=function(e){for(var t=e.pos,r=0;(r=e.current())!==-1&&!gv(r);)e.advance();return e.pos!==t};Ue.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1};Ue.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e)){e.groupNames.indexOf(e.lastStringValue)!==-1&&e.raise("Duplicate capture group name"),e.groupNames.push(e.lastStringValue);return}e.raise("Invalid group")}};Ue.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1};Ue.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=Qr(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=Qr(e.lastIntValue);return!0}return!1};Ue.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,n=e.current(r);return e.advance(r),n===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(n=e.lastIntValue),Jk(n)?(e.lastIntValue=n,!0):(e.pos=t,!1)};function Jk(e){return yr(e,!0)||e===36||e===95}Ue.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,n=e.current(r);return e.advance(r),n===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(n=e.lastIntValue),Nk(n)?(e.lastIntValue=n,!0):(e.pos=t,!1)};function Nk(e){return ws(e,!0)||e===36||e===95||e===8204||e===8205}Ue.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)};Ue.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var r=e.lastIntValue;if(e.switchU)return r>e.maxBackReference&&(e.maxBackReference=r),!0;if(r<=e.numCapturingParens)return!0;e.pos=t}return!1};Ue.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};Ue.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};Ue.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};Ue.regexp_eatZero=function(e){return e.current()===48&&!uu(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};Ue.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1};Ue.regexp_eatControlLetter=function(e){var t=e.current();return yv(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function yv(e){return e>=65&&e<=90||e>=97&&e<=122}Ue.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var r=e.pos,n=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(n&&o>=55296&&o<=56319){var a=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var f=e.lastIntValue;if(f>=56320&&f<=57343)return e.lastIntValue=(o-55296)*1024+(f-56320)+65536,!0}e.pos=a,e.lastIntValue=o}return!0}if(n&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&Ok(e.lastIntValue))return!0;n&&e.raise("Invalid unicode escape"),e.pos=r}return!1};function Ok(e){return e>=0&&e<=1114111}Ue.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1};Ue.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var mv=0,mr=1,bi=2;Ue.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(Bk(t))return e.lastIntValue=-1,e.advance(),mr;var r=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((r=t===80)||t===112)){e.lastIntValue=-1,e.advance();var n;if(e.eat(123)&&(n=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return r&&n===bi&&e.raise("Invalid property name"),n;e.raise("Invalid property name")}return mv};function Bk(e){return e===100||e===68||e===115||e===83||e===119||e===87}Ue.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var r=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var n=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,r,n),mr}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var o=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,o)}return mv};Ue.regexp_validateUnicodePropertyNameAndValue=function(e,t,r){sa(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(r)||e.raise("Invalid property value")};Ue.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return mr;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return bi;e.raise("Invalid property name")};Ue.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";vv(t=e.current());)e.lastStringValue+=Qr(t),e.advance();return e.lastStringValue!==""};function vv(e){return yv(e)||e===95}Ue.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";Fk(t=e.current());)e.lastStringValue+=Qr(t),e.advance();return e.lastStringValue!==""};function Fk(e){return vv(e)||uu(e)}Ue.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};Ue.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),r=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&r===bi&&e.raise("Negated character class may contain strings"),!0}return!1};Ue.regexp_classContents=function(e){return e.current()===93?mr:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),mr)};Ue.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var r=e.lastIntValue;e.switchU&&(t===-1||r===-1)&&e.raise("Invalid character class"),t!==-1&&r!==-1&&t>r&&e.raise("Range out of order in character class")}}};Ue.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var r=e.current();(r===99||bv(r))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var n=e.current();return n!==93?(e.lastIntValue=n,e.advance(),!0):!1};Ue.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};Ue.regexp_classSetExpression=function(e){var t=mr,r;if(!this.regexp_eatClassSetRange(e))if(r=this.regexp_eatClassSetOperand(e)){r===bi&&(t=bi);for(var n=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(r=this.regexp_eatClassSetOperand(e))){r!==bi&&(t=mr);continue}e.raise("Invalid character in character class")}if(n!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(n!==e.pos)return t}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(r=this.regexp_eatClassSetOperand(e),!r)return t;r===bi&&(t=bi)}};Ue.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;return r!==-1&&n!==-1&&r>n&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1};Ue.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?mr:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};Ue.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var r=e.eat(94),n=this.regexp_classContents(e);if(e.eat(93))return r&&n===bi&&e.raise("Negated character class may contain strings"),n;e.pos=t}if(e.eat(92)){var o=this.regexp_eatCharacterClassEscape(e);if(o)return o;e.pos=t}return null};Ue.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var r=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return r}else e.raise("Invalid escape");e.pos=t}return null};Ue.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===bi&&(t=bi);return t};Ue.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?mr:bi};Ue.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var r=e.current();return r<0||r===e.lookahead()&&Dk(r)||jk(r)?!1:(e.advance(),e.lastIntValue=r,!0)};function Dk(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function jk(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}Ue.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return Pk(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Pk(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}Ue.regexp_eatClassControlLetter=function(e){var t=e.current();return uu(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1};Ue.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1};Ue.regexp_eatDecimalDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;uu(r=e.current());)e.lastIntValue=10*e.lastIntValue+(r-48),e.advance();return e.pos!==t};function uu(e){return e>=48&&e<=57}Ue.regexp_eatHexDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;_v(r=e.current());)e.lastIntValue=16*e.lastIntValue+wv(r),e.advance();return e.pos!==t};function _v(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function wv(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}Ue.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var r=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+r*8+e.lastIntValue:e.lastIntValue=t*8+r}else e.lastIntValue=t;return!0}return!1};Ue.regexp_eatOctalDigit=function(e){var t=e.current();return bv(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function bv(e){return e>=48&&e<=55}Ue.regexp_eatFixedHexDigits=function(e,t){var r=e.pos;e.lastIntValue=0;for(var n=0;n<t;++n){var o=e.current();if(!_v(o))return e.pos=r,!1;e.lastIntValue=16*e.lastIntValue+wv(o),e.advance()}return!0};var Rh=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new ou(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},Ye=Nt.prototype;Ye.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Rh(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};Ye.getToken=function(){return this.next(),new Rh(this)};typeof Symbol<"u"&&(Ye[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===j.eof,value:t}}}});Ye.nextToken=function(){var e=this.curContext();if((!e||!e.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(j.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};Ye.readToken=function(e){return yr(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};Ye.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888};Ye.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,r=this.input.indexOf("*/",this.pos+=2);if(r===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=r+2,this.options.locations)for(var n=void 0,o=t;(n=K0(this.input,o,this.pos))>-1;)++this.curLine,o=this.lineStart=n;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,r),t,this.pos,e,this.curPosition())};Ye.skipLineComment=function(e){for(var t=this.pos,r=this.options.onComment&&this.curPosition(),n=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!As(n);)n=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,r,this.curPosition())};Ye.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(e>8&&e<14||e>=5760&&V0.test(String.fromCharCode(e)))++this.pos;else break e}}};Ye.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var r=this.type;this.type=e,this.value=t,this.updateContext(r)};Ye.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(j.ellipsis)):(++this.pos,this.finishToken(j.dot))};Ye.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(j.assign,2):this.finishOp(j.slash,1)};Ye.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),r=1,n=e===42?j.star:j.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++r,n=j.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(j.assign,r+1):this.finishOp(n,r)};Ye.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(j.assign,3)}return this.finishOp(e===124?j.logicalOR:j.logicalAND,2)}return t===61?this.finishOp(j.assign,2):this.finishOp(e===124?j.bitwiseOR:j.bitwiseAND,1)};Ye.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(j.assign,2):this.finishOp(j.bitwiseXOR,1)};Ye.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||Ti.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(j.incDec,2):t===61?this.finishOp(j.assign,2):this.finishOp(j.plusMin,1)};Ye.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),r=1;return t===e?(r=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+r)===61?this.finishOp(j.assign,r+1):this.finishOp(j.bitShift,r)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(r=2),this.finishOp(j.relational,r))};Ye.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(j.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(j.arrow)):this.finishOp(e===61?j.eq:j.prefix,1)};Ye.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var r=this.input.charCodeAt(this.pos+2);if(r<48||r>57)return this.finishOp(j.questionDot,2)}if(t===63){if(e>=12){var n=this.input.charCodeAt(this.pos+2);if(n===61)return this.finishOp(j.assign,3)}return this.finishOp(j.coalesce,2)}}return this.finishOp(j.question,1)};Ye.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),yr(t,!0)||t===92))return this.finishToken(j.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+Qr(t)+"'")};Ye.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(j.parenL);case 41:return++this.pos,this.finishToken(j.parenR);case 59:return++this.pos,this.finishToken(j.semi);case 44:return++this.pos,this.finishToken(j.comma);case 91:return++this.pos,this.finishToken(j.bracketL);case 93:return++this.pos,this.finishToken(j.bracketR);case 123:return++this.pos,this.finishToken(j.braceL);case 125:return++this.pos,this.finishToken(j.braceR);case 58:return++this.pos,this.finishToken(j.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(j.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(j.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Qr(e)+"'")};Ye.finishOp=function(e,t){var r=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,r)};Ye.readRegexp=function(){for(var e,t,r=this.pos;;){this.pos>=this.input.length&&this.raise(r,"Unterminated regular expression");var n=this.input.charAt(this.pos);if(Ti.test(n)&&this.raise(r,"Unterminated regular expression"),e)e=!1;else{if(n==="[")t=!0;else if(n==="]"&&t)t=!1;else if(n==="/"&&!t)break;e=n==="\\"}++this.pos}var o=this.input.slice(r,this.pos);++this.pos;var a=this.pos,f=this.readWord1();this.containsEsc&&this.unexpected(a);var h=this.regexpState||(this.regexpState=new ar(this));h.reset(r,o,f),this.validateRegExpFlags(h),this.validateRegExpPattern(h);var p=null;try{p=new RegExp(o,f)}catch{}return this.finishToken(j.regexp,{pattern:o,flags:f,value:p})};Ye.readInt=function(e,t,r){for(var n=this.options.ecmaVersion>=12&&t===void 0,o=r&&this.input.charCodeAt(this.pos)===48,a=this.pos,f=0,h=0,p=0,v=t??1/0;p<v;++p,++this.pos){var _=this.input.charCodeAt(this.pos),y=void 0;if(n&&_===95){o&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),h===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),p===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),h=_;continue}if(_>=97?y=_-97+10:_>=65?y=_-65+10:_>=48&&_<=57?y=_-48:y=1/0,y>=e)break;h=_,f=f*e+y}return n&&h===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===a||t!=null&&this.pos-a!==t?null:f};function Gk(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function xv(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}Ye.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var r=this.readInt(e);return r==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(r=xv(this.input.slice(t,this.pos)),++this.pos):yr(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(j.num,r)};Ye.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,"Invalid number");var r=this.pos-t>=2&&this.input.charCodeAt(t)===48;r&&this.strict&&this.raise(t,"Invalid number");var n=this.input.charCodeAt(this.pos);if(!r&&!e&&this.options.ecmaVersion>=11&&n===110){var o=xv(this.input.slice(t,this.pos));return++this.pos,yr(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(j.num,o)}r&&/[89]/.test(this.input.slice(t,this.pos))&&(r=!1),n===46&&!r&&(++this.pos,this.readInt(10),n=this.input.charCodeAt(this.pos)),(n===69||n===101)&&!r&&(n=this.input.charCodeAt(++this.pos),(n===43||n===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),yr(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var a=Gk(this.input.slice(t,this.pos),r);return this.finishToken(j.num,a)};Ye.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var r=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(r,"Code point out of bounds")}else t=this.readHexChar(4);return t};Ye.readString=function(e){for(var t="",r=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var n=this.input.charCodeAt(this.pos);if(n===e)break;n===92?(t+=this.input.slice(r,this.pos),t+=this.readEscapedChar(!1),r=this.pos):n===8232||n===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(As(n)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(r,this.pos++),this.finishToken(j.string,t)};var Sv={};Ye.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===Sv)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};Ye.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Sv;this.raise(e,t)};Ye.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var r=this.input.charCodeAt(this.pos);if(r===96||r===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===j.template||this.type===j.invalidTemplate)?r===36?(this.pos+=2,this.finishToken(j.dollarBraceL)):(++this.pos,this.finishToken(j.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(j.template,e));if(r===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(As(r)){switch(e+=this.input.slice(t,this.pos),++this.pos,r){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=`
|
||
`;break;default:e+=String.fromCharCode(r);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};Ye.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(j.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")};Ye.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
|
||
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Qr(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var r=this.pos-1;this.invalidStringToken(r,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],o=parseInt(n,8);return o>255&&(n=n.slice(0,-1),o=parseInt(n,8)),this.pos+=n.length-1,t=this.input.charCodeAt(this.pos),(n!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-n.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(o)}return As(t)?"":String.fromCharCode(t)}};Ye.readHexChar=function(e){var t=this.pos,r=this.readInt(16,e);return r===null&&this.invalidStringToken(t,"Bad character escape sequence"),r};Ye.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,r=this.pos,n=this.options.ecmaVersion>=6;this.pos<this.input.length;){var o=this.fullCharCodeAtPos();if(ws(o,n))this.pos+=o<=65535?1:2;else if(o===92){this.containsEsc=!0,e+=this.input.slice(r,this.pos);var a=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var f=this.readCodePoint();(t?yr:ws)(f,n)||this.invalidStringToken(a,"Invalid Unicode escape"),e+=Qr(f),r=this.pos}else break;t=!1}return e+this.input.slice(r,this.pos)};Ye.readWord=function(){var e=this.readWord1(),t=j.name;return this.keywords.test(e)&&(t=Sh[e]),this.finishToken(t,e)};var Wk="8.9.0";Nt.acorn={Parser:Nt,version:Wk,defaultOptions:Qc,Position:Xo,SourceLocation:ou,getLineInfo:Q0,Node:lu,TokenType:tt,tokTypes:j,keywordTypes:Sh,TokContext:Oi,tokContexts:xt,isIdentifierChar:ws,isIdentifierStart:yr,Token:Rh,isNewLine:As,lineBreak:Ti,lineBreakG:dk,nonASCIIwhitespace:V0};const{stringify:Kk}=JSON;if(!String.prototype.repeat)throw new Error("String.prototype.repeat is undefined, see https://github.com/davidbonnet/astring#installation");if(!String.prototype.endsWith)throw new Error("String.prototype.endsWith is undefined, see https://github.com/davidbonnet/astring#installation");const ul={"||":2,"??":3,"&&":4,"|":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,instanceof:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"%":12,"/":12,"**":13},Bi=17,Vk={ArrayExpression:20,TaggedTemplateExpression:20,ThisExpression:20,Identifier:20,PrivateIdentifier:20,Literal:18,TemplateLiteral:20,Super:20,SequenceExpression:20,MemberExpression:19,ChainExpression:19,CallExpression:19,NewExpression:19,ArrowFunctionExpression:Bi,ClassExpression:Bi,FunctionExpression:Bi,ObjectExpression:Bi,UpdateExpression:16,UnaryExpression:15,AwaitExpression:15,BinaryExpression:14,LogicalExpression:13,ConditionalExpression:4,AssignmentExpression:3,YieldExpression:2,RestElement:1};function ns(e,t){const{generator:r}=e;if(e.write("("),t!=null&&t.length>0){r[t[0].type](t[0],e);const{length:n}=t;for(let o=1;o<n;o++){const a=t[o];e.write(", "),r[a.type](a,e)}}e.write(")")}function Mv(e,t,r,n){const o=e.expressionsPrecedence[t.type];if(o===Bi)return!0;const a=e.expressionsPrecedence[r.type];return o!==a?!n&&o===15&&a===14&&r.operator==="**"||o<a:o!==13&&o!==14?!1:t.operator==="**"&&r.operator==="**"?!n:o===13&&a===13&&(t.operator==="??"||r.operator==="??")?!0:n?ul[t.operator]<=ul[r.operator]:ul[t.operator]<ul[r.operator]}function fl(e,t,r,n){const{generator:o}=e;Mv(e,t,r,n)?(e.write("("),o[t.type](t,e),e.write(")")):o[t.type](t,e)}function zk(e,t,r,n){const o=t.split(`
|
||
`),a=o.length-1;if(e.write(o[0].trim()),a>0){e.write(n);for(let f=1;f<a;f++)e.write(r+o[f].trim()+n);e.write(r+o[a].trim())}}function ei(e,t,r,n){const{length:o}=t;for(let a=0;a<o;a++){const f=t[a];e.write(r),f.type[0]==="L"?e.write("// "+f.value.trim()+`
|
||
`,f):(e.write("/*"),zk(e,f.value,r,n),e.write("*/"+n))}}function Qk(e){let t=e;for(;t!=null;){const{type:r}=t;if(r[0]==="C"&&r[1]==="a")return!0;if(r[0]==="M"&&r[1]==="e"&&r[2]==="m")t=t.object;else return!1}}function Wf(e,t){const{generator:r}=e,{declarations:n}=t;e.write(t.kind+" ");const{length:o}=n;if(o>0){r.VariableDeclarator(n[0],e);for(let a=1;a<o;a++)e.write(", "),r.VariableDeclarator(n[a],e)}}let fy,cy,hy,py,dy,gy;const Yk={Program(e,t){const r=t.indent.repeat(t.indentLevel),{lineEnd:n,writeComments:o}=t;o&&e.comments!=null&&ei(t,e.comments,r,n);const a=e.body,{length:f}=a;for(let h=0;h<f;h++){const p=a[h];o&&p.comments!=null&&ei(t,p.comments,r,n),t.write(r),this[p.type](p,t),t.write(n)}o&&e.trailingComments!=null&&ei(t,e.trailingComments,r,n)},BlockStatement:gy=function(e,t){const r=t.indent.repeat(t.indentLevel++),{lineEnd:n,writeComments:o}=t,a=r+t.indent;t.write("{");const f=e.body;if(f!=null&&f.length>0){t.write(n),o&&e.comments!=null&&ei(t,e.comments,a,n);const{length:h}=f;for(let p=0;p<h;p++){const v=f[p];o&&v.comments!=null&&ei(t,v.comments,a,n),t.write(a),this[v.type](v,t),t.write(n)}t.write(r)}else o&&e.comments!=null&&(t.write(n),ei(t,e.comments,a,n),t.write(r));o&&e.trailingComments!=null&&ei(t,e.trailingComments,a,n),t.write("}"),t.indentLevel--},ClassBody:gy,StaticBlock(e,t){t.write("static "),this.BlockStatement(e,t)},EmptyStatement(e,t){t.write(";")},ExpressionStatement(e,t){const r=t.expressionsPrecedence[e.expression.type];r===Bi||r===3&&e.expression.left.type[0]==="O"?(t.write("("),this[e.expression.type](e.expression,t),t.write(")")):this[e.expression.type](e.expression,t),t.write(";")},IfStatement(e,t){t.write("if ("),this[e.test.type](e.test,t),t.write(") "),this[e.consequent.type](e.consequent,t),e.alternate!=null&&(t.write(" else "),this[e.alternate.type](e.alternate,t))},LabeledStatement(e,t){this[e.label.type](e.label,t),t.write(": "),this[e.body.type](e.body,t)},BreakStatement(e,t){t.write("break"),e.label!=null&&(t.write(" "),this[e.label.type](e.label,t)),t.write(";")},ContinueStatement(e,t){t.write("continue"),e.label!=null&&(t.write(" "),this[e.label.type](e.label,t)),t.write(";")},WithStatement(e,t){t.write("with ("),this[e.object.type](e.object,t),t.write(") "),this[e.body.type](e.body,t)},SwitchStatement(e,t){const r=t.indent.repeat(t.indentLevel++),{lineEnd:n,writeComments:o}=t;t.indentLevel++;const a=r+t.indent,f=a+t.indent;t.write("switch ("),this[e.discriminant.type](e.discriminant,t),t.write(") {"+n);const{cases:h}=e,{length:p}=h;for(let v=0;v<p;v++){const _=h[v];o&&_.comments!=null&&ei(t,_.comments,a,n),_.test?(t.write(a+"case "),this[_.test.type](_.test,t),t.write(":"+n)):t.write(a+"default:"+n);const{consequent:y}=_,{length:m}=y;for(let x=0;x<m;x++){const U=y[x];o&&U.comments!=null&&ei(t,U.comments,f,n),t.write(f),this[U.type](U,t),t.write(n)}}t.indentLevel-=2,t.write(r+"}")},ReturnStatement(e,t){t.write("return"),e.argument&&(t.write(" "),this[e.argument.type](e.argument,t)),t.write(";")},ThrowStatement(e,t){t.write("throw "),this[e.argument.type](e.argument,t),t.write(";")},TryStatement(e,t){if(t.write("try "),this[e.block.type](e.block,t),e.handler){const{handler:r}=e;r.param==null?t.write(" catch "):(t.write(" catch ("),this[r.param.type](r.param,t),t.write(") ")),this[r.body.type](r.body,t)}e.finalizer&&(t.write(" finally "),this[e.finalizer.type](e.finalizer,t))},WhileStatement(e,t){t.write("while ("),this[e.test.type](e.test,t),t.write(") "),this[e.body.type](e.body,t)},DoWhileStatement(e,t){t.write("do "),this[e.body.type](e.body,t),t.write(" while ("),this[e.test.type](e.test,t),t.write(");")},ForStatement(e,t){if(t.write("for ("),e.init!=null){const{init:r}=e;r.type[0]==="V"?Wf(t,r):this[r.type](r,t)}t.write("; "),e.test&&this[e.test.type](e.test,t),t.write("; "),e.update&&this[e.update.type](e.update,t),t.write(") "),this[e.body.type](e.body,t)},ForInStatement:fy=function(e,t){t.write(`for ${e.await?"await ":""}(`);const{left:r}=e;r.type[0]==="V"?Wf(t,r):this[r.type](r,t),t.write(e.type[3]==="I"?" in ":" of "),this[e.right.type](e.right,t),t.write(") "),this[e.body.type](e.body,t)},ForOfStatement:fy,DebuggerStatement(e,t){t.write("debugger;",e)},FunctionDeclaration:cy=function(e,t){t.write((e.async?"async ":"")+(e.generator?"function* ":"function ")+(e.id?e.id.name:""),e),ns(t,e.params),t.write(" "),this[e.body.type](e.body,t)},FunctionExpression:cy,VariableDeclaration(e,t){Wf(t,e),t.write(";")},VariableDeclarator(e,t){this[e.id.type](e.id,t),e.init!=null&&(t.write(" = "),this[e.init.type](e.init,t))},ClassDeclaration(e,t){if(t.write("class "+(e.id?`${e.id.name} `:""),e),e.superClass){t.write("extends ");const{superClass:r}=e,{type:n}=r,o=t.expressionsPrecedence[n];(n[0]!=="C"||n[1]!=="l"||n[5]!=="E")&&(o===Bi||o<t.expressionsPrecedence.ClassExpression)?(t.write("("),this[e.superClass.type](r,t),t.write(")")):this[r.type](r,t),t.write(" ")}this.ClassBody(e.body,t)},ImportDeclaration(e,t){t.write("import ");const{specifiers:r}=e,{length:n}=r;let o=0;if(n>0){for(;o<n;){o>0&&t.write(", ");const a=r[o],f=a.type[6];if(f==="D")t.write(a.local.name,a),o++;else if(f==="N")t.write("* as "+a.local.name,a),o++;else break}if(o<n){for(t.write("{");;){const a=r[o],{name:f}=a.imported;if(t.write(f,a),f!==a.local.name&&t.write(" as "+a.local.name),++o<n)t.write(", ");else break}t.write("}")}t.write(" from ")}this.Literal(e.source,t),t.write(";")},ImportExpression(e,t){t.write("import("),this[e.source.type](e.source,t),t.write(")")},ExportDefaultDeclaration(e,t){t.write("export default "),this[e.declaration.type](e.declaration,t),t.expressionsPrecedence[e.declaration.type]!=null&&e.declaration.type[0]!=="F"&&t.write(";")},ExportNamedDeclaration(e,t){if(t.write("export "),e.declaration)this[e.declaration.type](e.declaration,t);else{t.write("{");const{specifiers:r}=e,{length:n}=r;if(n>0)for(let o=0;;){const a=r[o],{name:f}=a.local;if(t.write(f,a),f!==a.exported.name&&t.write(" as "+a.exported.name),++o<n)t.write(", ");else break}t.write("}"),e.source&&(t.write(" from "),this.Literal(e.source,t)),t.write(";")}},ExportAllDeclaration(e,t){e.exported!=null?t.write("export * as "+e.exported.name+" from "):t.write("export * from "),this.Literal(e.source,t),t.write(";")},MethodDefinition(e,t){e.static&&t.write("static ");const r=e.kind[0];(r==="g"||r==="s")&&t.write(e.kind+" "),e.value.async&&t.write("async "),e.value.generator&&t.write("*"),e.computed?(t.write("["),this[e.key.type](e.key,t),t.write("]")):this[e.key.type](e.key,t),ns(t,e.value.params),t.write(" "),this[e.value.body.type](e.value.body,t)},ClassExpression(e,t){this.ClassDeclaration(e,t)},ArrowFunctionExpression(e,t){t.write(e.async?"async ":"",e);const{params:r}=e;r!=null&&(r.length===1&&r[0].type[0]==="I"?t.write(r[0].name,r[0]):ns(t,e.params)),t.write(" => "),e.body.type[0]==="O"?(t.write("("),this.ObjectExpression(e.body,t),t.write(")")):this[e.body.type](e.body,t)},ThisExpression(e,t){t.write("this",e)},Super(e,t){t.write("super",e)},RestElement:hy=function(e,t){t.write("..."),this[e.argument.type](e.argument,t)},SpreadElement:hy,YieldExpression(e,t){t.write(e.delegate?"yield*":"yield"),e.argument&&(t.write(" "),this[e.argument.type](e.argument,t))},AwaitExpression(e,t){t.write("await ",e),fl(t,e.argument,e)},TemplateLiteral(e,t){const{quasis:r,expressions:n}=e;t.write("`");const{length:o}=n;for(let f=0;f<o;f++){const h=n[f],p=r[f];t.write(p.value.raw,p),t.write("${"),this[h.type](h,t),t.write("}")}const a=r[r.length-1];t.write(a.value.raw,a),t.write("`")},TemplateElement(e,t){t.write(e.value.raw,e)},TaggedTemplateExpression(e,t){fl(t,e.tag,e),this[e.quasi.type](e.quasi,t)},ArrayExpression:dy=function(e,t){if(t.write("["),e.elements.length>0){const{elements:r}=e,{length:n}=r;for(let o=0;;){const a=r[o];if(a!=null&&this[a.type](a,t),++o<n)t.write(", ");else{a==null&&t.write(", ");break}}}t.write("]")},ArrayPattern:dy,ObjectExpression(e,t){const r=t.indent.repeat(t.indentLevel++),{lineEnd:n,writeComments:o}=t,a=r+t.indent;if(t.write("{"),e.properties.length>0){t.write(n),o&&e.comments!=null&&ei(t,e.comments,a,n);const f=","+n,{properties:h}=e,{length:p}=h;for(let v=0;;){const _=h[v];if(o&&_.comments!=null&&ei(t,_.comments,a,n),t.write(a),this[_.type](_,t),++v<p)t.write(f);else break}t.write(n),o&&e.trailingComments!=null&&ei(t,e.trailingComments,a,n),t.write(r+"}")}else o?e.comments!=null?(t.write(n),ei(t,e.comments,a,n),e.trailingComments!=null&&ei(t,e.trailingComments,a,n),t.write(r+"}")):e.trailingComments!=null?(t.write(n),ei(t,e.trailingComments,a,n),t.write(r+"}")):t.write("}"):t.write("}");t.indentLevel--},Property(e,t){e.method||e.kind[0]!=="i"?this.MethodDefinition(e,t):(e.shorthand||(e.computed?(t.write("["),this[e.key.type](e.key,t),t.write("]")):this[e.key.type](e.key,t),t.write(": ")),this[e.value.type](e.value,t))},PropertyDefinition(e,t){if(e.static&&t.write("static "),e.computed&&t.write("["),this[e.key.type](e.key,t),e.computed&&t.write("]"),e.value==null){e.key.type[0]!=="F"&&t.write(";");return}t.write(" = "),this[e.value.type](e.value,t),t.write(";")},ObjectPattern(e,t){if(t.write("{"),e.properties.length>0){const{properties:r}=e,{length:n}=r;for(let o=0;this[r[o].type](r[o],t),++o<n;)t.write(", ")}t.write("}")},SequenceExpression(e,t){ns(t,e.expressions)},UnaryExpression(e,t){if(e.prefix){const{operator:r,argument:n,argument:{type:o}}=e;t.write(r);const a=Mv(t,n,e);!a&&(r.length>1||o[0]==="U"&&(o[1]==="n"||o[1]==="p")&&n.prefix&&n.operator[0]===r&&(r==="+"||r==="-"))&&t.write(" "),a?(t.write(r.length>1?" (":"("),this[o](n,t),t.write(")")):this[o](n,t)}else this[e.argument.type](e.argument,t),t.write(e.operator)},UpdateExpression(e,t){e.prefix?(t.write(e.operator),this[e.argument.type](e.argument,t)):(this[e.argument.type](e.argument,t),t.write(e.operator))},AssignmentExpression(e,t){this[e.left.type](e.left,t),t.write(" "+e.operator+" "),this[e.right.type](e.right,t)},AssignmentPattern(e,t){this[e.left.type](e.left,t),t.write(" = "),this[e.right.type](e.right,t)},BinaryExpression:py=function(e,t){const r=e.operator==="in";r&&t.write("("),fl(t,e.left,e,!1),t.write(" "+e.operator+" "),fl(t,e.right,e,!0),r&&t.write(")")},LogicalExpression:py,ConditionalExpression(e,t){const{test:r}=e,n=t.expressionsPrecedence[r.type];n===Bi||n<=t.expressionsPrecedence.ConditionalExpression?(t.write("("),this[r.type](r,t),t.write(")")):this[r.type](r,t),t.write(" ? "),this[e.consequent.type](e.consequent,t),t.write(" : "),this[e.alternate.type](e.alternate,t)},NewExpression(e,t){t.write("new ");const r=t.expressionsPrecedence[e.callee.type];r===Bi||r<t.expressionsPrecedence.CallExpression||Qk(e.callee)?(t.write("("),this[e.callee.type](e.callee,t),t.write(")")):this[e.callee.type](e.callee,t),ns(t,e.arguments)},CallExpression(e,t){const r=t.expressionsPrecedence[e.callee.type];r===Bi||r<t.expressionsPrecedence.CallExpression?(t.write("("),this[e.callee.type](e.callee,t),t.write(")")):this[e.callee.type](e.callee,t),e.optional&&t.write("?."),ns(t,e.arguments)},ChainExpression(e,t){this[e.expression.type](e.expression,t)},MemberExpression(e,t){const r=t.expressionsPrecedence[e.object.type];r===Bi||r<t.expressionsPrecedence.MemberExpression?(t.write("("),this[e.object.type](e.object,t),t.write(")")):this[e.object.type](e.object,t),e.computed?(e.optional&&t.write("?."),t.write("["),this[e.property.type](e.property,t),t.write("]")):(e.optional?t.write("?."):t.write("."),this[e.property.type](e.property,t))},MetaProperty(e,t){t.write(e.meta.name+"."+e.property.name,e)},Identifier(e,t){t.write(e.name,e)},PrivateIdentifier(e,t){t.write(`#${e.name}`,e)},Literal(e,t){e.raw!=null?t.write(e.raw,e):e.regex!=null?this.RegExpLiteral(e,t):e.bigint!=null?t.write(e.bigint+"n",e):t.write(Kk(e.value),e)},RegExpLiteral(e,t){const{regex:r}=e;t.write(`/${r.pattern}/${r.flags}`,e)}},Hk={};class Zk{constructor(t){const r=t??Hk;this.output="",r.output!=null?(this.output=r.output,this.write=this.writeToStream):this.output="",this.generator=r.generator!=null?r.generator:Yk,this.expressionsPrecedence=r.expressionsPrecedence!=null?r.expressionsPrecedence:Vk,this.indent=r.indent!=null?r.indent:" ",this.lineEnd=r.lineEnd!=null?r.lineEnd:`
|
||
`,this.indentLevel=r.startingIndentLevel!=null?r.startingIndentLevel:0,this.writeComments=r.comments?r.comments:!1,r.sourceMap!=null&&(this.write=r.output==null?this.writeAndMap:this.writeToStreamAndMap,this.sourceMap=r.sourceMap,this.line=1,this.column=0,this.lineEndSize=this.lineEnd.split(`
|
||
`).length-1,this.mapping={original:null,generated:this,name:void 0,source:r.sourceMap.file||r.sourceMap._file})}write(t){this.output+=t}writeToStream(t){this.output.write(t)}writeAndMap(t,r){this.output+=t,this.map(t,r)}writeToStreamAndMap(t,r){this.output.write(t),this.map(t,r)}map(t,r){if(r!=null){const{type:a}=r;if(a[0]==="L"&&a[2]==="n"){this.column=0,this.line++;return}if(r.loc!=null){const{mapping:f}=this;f.original=r.loc.start,f.name=r.name,this.sourceMap.addMapping(f)}if(a[0]==="T"&&a[8]==="E"||a[0]==="L"&&a[1]==="i"&&typeof r.value=="string"){const{length:f}=t;let{column:h,line:p}=this;for(let v=0;v<f;v++)t[v]===`
|
||
`?(h=0,p++):h++;this.column=h,this.line=p;return}}const{length:n}=t,{lineEnd:o}=this;n>0&&(this.lineEndSize>0&&(o.length===1?t[n-1]===o:t.endsWith(o))?(this.line+=this.lineEndSize,this.column=0):this.column+=n)}toString(){return this.output}}function $k(e,t){const r=new Zk(t);return r.generator[e.type](e,r),r.output}var Hc={},Kf={},yy;function Cv(){return yy||(yy=1,function(e){(function(t,r){r(e)})(gt,function(t){t.__esModule=!0;function r(_,y){if(!(_ instanceof y))throw new TypeError("Cannot call a class as a function")}var n=void 0,o=void 0,a=void 0,f=void 0,h=void 0,p=Function.prototype,v=function _(y,m){r(this,_),this.node=y,this.state=m};t.default={go:function(y,m){this[y.type](y,m)},find:function(y,m,x){var U=Object.create(this);U.go=function(R,S){if(y(R,S))throw new v(R,S);this[R.type](R,S)};try{U.go(m,x)}catch(R){if(R instanceof v)return R;throw R}},makeChild:function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},m=Object.create(this);m.super=this;for(var x in y)m[x]=y[x];return m},Program:function(y,m){for(var x=y.body,U=x.length,R=0;R<U;R++)this.go(x[R],m)},BlockStatement:function(y,m){var x=y.body;if(x!=null)for(var U=0,R=x.length;U<R;U++)this.go(x[U],m)},EmptyStatement:p,ExpressionStatement:function(y,m){this.go(y.expression,m)},IfStatement:function(y,m){this.go(y.test,m),this.go(y.consequent,m),y.alternate!=null&&this.go(y.alternate,m)},LabeledStatement:function(y,m){this.go(y.label,m),this.go(y.body,m)},BreakStatement:function(y,m){y.label&&this.go(y.label,m)},ContinueStatement:function(y,m){y.label&&this.go(y.label,m)},WithStatement:function(y,m){this.go(y.object,m),this.go(y.body,m)},SwitchStatement:function(y,m){this.go(y.discriminant,m);for(var x=y.cases,U=x.length,R=0;R<U;R++)this.go(x[R],m)},SwitchCase:function(y,m){y.test!=null&&this.go(y.test,m);for(var x=y.consequent,U=x.length,R=0;R<U;R++)this.go(x[R],m)},ReturnStatement:function(y,m){y.argument&&this.go(y.argument,m)},ThrowStatement:function(y,m){this.go(y.argument,m)},TryStatement:function(y,m){this.go(y.block,m),y.handler!=null&&this.go(y.handler,m),y.finalizer!=null&&this.go(y.finalizer,m)},CatchClause:function(y,m){y.param!=null&&this.go(y.param,m),this.go(y.body,m)},WhileStatement:function(y,m){this.go(y.test,m),this.go(y.body,m)},DoWhileStatement:function(y,m){this.go(y.body,m),this.go(y.test,m)},ForStatement:function(y,m){y.init!=null&&this.go(y.init,m),y.test!=null&&this.go(y.test,m),y.update!=null&&this.go(y.update,m),this.go(y.body,m)},ForInStatement:n=function(y,m){this.go(y.left,m),this.go(y.right,m),this.go(y.body,m)},DebuggerStatement:p,FunctionDeclaration:o=function(y,m){y.id!=null&&this.go(y.id,m);var x=y.params;if(x!=null)for(var U=0,R=x.length;U<R;U++)this.go(x[U],m);this.go(y.body,m)},VariableDeclaration:function(y,m){for(var x=y.declarations,U=x.length,R=0;R<U;R++)this.go(x[R],m)},VariableDeclarator:function(y,m){this.go(y.id,m),y.init!=null&&this.go(y.init,m)},ArrowFunctionExpression:function(y,m){var x=y.params;if(x!=null)for(var U=0,R=x.length;U<R;U++)this.go(x[U],m);this.go(y.body,m)},ThisExpression:p,ArrayExpression:h=function(y,m){for(var x=y.elements,U=x.length,R=0;R<U;R++){var S=x[R];S!=null&&this.go(x[R],m)}},ObjectExpression:function(y,m){for(var x=y.properties,U=x.length,R=0;R<U;R++)this.go(x[R],m)},Property:function(y,m){this.go(y.key,m),y.shorthand||this.go(y.value,m)},FunctionExpression:o,SequenceExpression:function(y,m){for(var x=y.expressions,U=x.length,R=0;R<U;R++)this.go(x[R],m)},UnaryExpression:function(y,m){this.go(y.argument,m)},UpdateExpression:function(y,m){this.go(y.argument,m)},AssignmentExpression:function(y,m){this.go(y.left,m),this.go(y.right,m)},BinaryExpression:f=function(y,m){this.go(y.left,m),this.go(y.right,m)},LogicalExpression:f,ConditionalExpression:function(y,m){this.go(y.test,m),this.go(y.consequent,m),this.go(y.alternate,m)},NewExpression:function(y,m){this.CallExpression(y,m)},CallExpression:function(y,m){this.go(y.callee,m);for(var x=y.arguments,U=x.length,R=0;R<U;R++)this.go(x[R],m)},MemberExpression:function(y,m){this.go(y.object,m),this.go(y.property,m)},Identifier:p,Literal:p,ForOfStatement:n,ClassDeclaration:function(y,m){y.id&&this.go(y.id,m),y.superClass&&this.go(y.superClass,m),this.go(y.body,m)},ClassBody:function(y,m){for(var x=y.body,U=x.length,R=0;R<U;R++)this.go(x[R],m)},ImportDeclaration:function(y,m){for(var x=y.specifiers,U=x.length,R=0;R<U;R++)this.go(x[R],m);this.go(y.source,m)},ImportNamespaceSpecifier:function(y,m){this.go(y.local,m)},ImportDefaultSpecifier:function(y,m){this.go(y.local,m)},ImportSpecifier:function(y,m){this.go(y.imported,m),this.go(y.local,m)},ExportDefaultDeclaration:function(y,m){this.go(y.declaration,m)},ExportNamedDeclaration:function(y,m){y.declaration&&this.go(y.declaration,m);for(var x=y.specifiers,U=x.length,R=0;R<U;R++)this.go(x[R],m);y.source&&this.go(y.source,m)},ExportSpecifier:function(y,m){this.go(y.local,m),this.go(y.exported,m)},ExportAllDeclaration:function(y,m){this.go(y.source,m)},MethodDefinition:function(y,m){this.go(y.key,m),this.go(y.value,m)},ClassExpression:function(y,m){this.ClassDeclaration(y,m)},Super:p,RestElement:a=function(y,m){this.go(y.argument,m)},SpreadElement:a,YieldExpression:function(y,m){y.argument&&this.go(y.argument,m)},TaggedTemplateExpression:function(y,m){this.go(y.tag,m),this.go(y.quasi,m)},TemplateLiteral:function(y,m){for(var x=y.quasis,U=y.expressions,R=0,S=U.length;R<S;R++)this.go(U[R],m);for(var g=0,L=x.length;g<L;g++)this.go(x[g],m)},TemplateElement:p,ObjectPattern:function(y,m){for(var x=y.properties,U=x.length,R=0;R<U;R++)this.go(x[R],m)},ArrayPattern:h,AssignmentPattern:function(y,m){this.go(y.left,m),this.go(y.right,m)},MetaProperty:function(y,m){this.go(y.meta,m),this.go(y.property,m)},AwaitExpression:function(y,m){this.go(y.argument,m)}}})}(Kf)),Kf}var Vf={},my;function Xk(){return my||(my=1,function(e){(function(t,r){r(e,Cv())})(gt,function(t,r){t.__esModule=!0,t.default=function(p,v){return h[p.type](p,{comments:v,index:0}),p};var n=o(r);function o(p){return p&&p.__esModule?p:{default:p}}function a(p,v,_,y,m){var x=y.index,U=y.comments,R=U[x],S=void 0,g=void 0;if(R!=null)if(v==null||v.length===0){for(S=p.comments!=null?p.comments:[];R!=null&&R.end<p.end;)S.push(R),R=U[++x];y.index=x,S.length!==0&&p.comments==null&&(p.comments=S)}else{if(_){S=p.comments!=null?p.comments:[];for(var L=v[0].start;R!=null&&R.type[0]==="B"&&R.end<L;)S.push(R),R=U[++x];S.length!==0&&p.comments==null&&(p.comments=S)}for(var G=0,O=v.length;R!=null&&G<O;G++){var P=v[G];for(S=[];R!=null&&R.end<P.start;)S.push(R),R=U[++x];R!=null&&R.type[0]==="L"&&R.loc.start.line===P.loc.end.line&&(S.push(R),R=U[++x]),S.length!==0&&(P.comments=S),y.index=x,m[P.type](P,y),x=y.index,R=U[x]}for(g=[];R!=null&&R.end<p.end;)g.push(R),R=U[++x];g.length!==0&&(p.trailingComments=g),y.index=x}}var f=void 0,h=n.default.makeChild({Program:f=function(v,_){a(v,v.body,!0,_,this)},BlockStatement:f,ObjectExpression:function(v,_){a(v,v.properties,!0,_,this)},ArrayExpression:function(v,_){a(v,v.elements,!0,_,this)},SwitchStatement:function(v,_){a(v,v.cases,!1,_,this)},SwitchCase:function(v,_){a(v,v.consequent,!1,_,this)}})})}(Vf)),Vf}(function(e){(function(t,r){r(e,Cv(),Xk())})(gt,function(t,r,n){t.__esModule=!0,t.makeTraveler=t.attachComments=t.defaultTraveler=void 0;var o=f(r),a=f(n);function f(p){return p&&p.__esModule?p:{default:p}}function h(p){return o.default.makeChild(p)}t.defaultTraveler=o.default,t.attachComments=a.default,t.makeTraveler=h})})(Hc);class qk{constructor(t){this.stack=[],this.index=-1,this.limit=t}atTop(){return this.index===-1}canUndo(){return this.stack.length===0?!1:this.index===-1||this.index>0}canRedo(){return this.stack.length===0||this.index===-1?!1:this.index<this.stack.length-1}push(t){if(this.index>=0){for(;this.index<this.stack.length;)this.stack.pop();this.index=-1}this.limit&&this.stack.length>this.limit&&this.stack.shift(),this.stack.push(t)}undo(){return this.stack.length===0?void 0:(this.index===-1&&(this.index=this.stack.length-1),this.index>0&&this.index--,this.stack[this.index])}redo(){if(this.stack.length===0||this.index===-1)return;let t=this.index+1;if(!(t>=this.stack.length))return this.index=t,this.stack[this.index]}}var ir;const eA=e=>{ir=e},Ml=(e,t="")=>{console.log("logging",e,t),ir&&(ir.innerHTML=` >> <span class=${t}> ${e} </span> `)},tA=()=>{ir&&(ir.style.display="none")},iA=()=>{ir&&(ir.style.display="block")},rA=()=>{ir.style.display=="none"?ir.style.display="block":ir.style.display="none"},nA={init:eA,log:Ml,hide:tA,show:iA,toggle:rA},vy={eval:(e,t)=>{var r=`(async() => {
|
||
${e}
|
||
})().catch(${o=>Ml(o.message,"log-error")})`,n=!1;try{window.eval(r),Ml("")}catch(o){n=!0,console.log("logging",o),Ml(o.message,"log-error")}t&&t(r,n)}},_y=[{name:"noise",type:"src",inputs:[{type:"float",name:"scale",default:10},{type:"float",name:"offset",default:.1}],glsl:" return vec4(vec3(_noise(vec3(_st*scale, offset*time))), 1.0);"},{name:"voronoi",type:"src",inputs:[{type:"float",name:"scale",default:5},{type:"float",name:"speed",default:.3},{type:"float",name:"blending",default:.3}],glsl:` vec3 color = vec3(.0);
|
||
// Scale
|
||
_st *= scale;
|
||
// Tile the space
|
||
vec2 i_st = floor(_st);
|
||
vec2 f_st = fract(_st);
|
||
float m_dist = 10.; // minimun distance
|
||
vec2 m_point; // minimum point
|
||
for (int j=-1; j<=1; j++ ) {
|
||
for (int i=-1; i<=1; i++ ) {
|
||
vec2 neighbor = vec2(float(i),float(j));
|
||
vec2 p = i_st + neighbor;
|
||
vec2 point = fract(sin(vec2(dot(p,vec2(127.1,311.7)),dot(p,vec2(269.5,183.3))))*43758.5453);
|
||
point = 0.5 + 0.5*sin(time*speed + 6.2831*point);
|
||
vec2 diff = neighbor + point - f_st;
|
||
float dist = length(diff);
|
||
if( dist < m_dist ) {
|
||
m_dist = dist;
|
||
m_point = point;
|
||
}
|
||
}
|
||
}
|
||
// Assign a color using the closest point position
|
||
color += dot(m_point,vec2(.3,.6));
|
||
color *= 1.0 - blending*m_dist;
|
||
return vec4(color, 1.0);`},{name:"osc",type:"src",inputs:[{type:"float",name:"frequency",default:60},{type:"float",name:"sync",default:.1},{type:"float",name:"offset",default:0}],glsl:` vec2 st = _st;
|
||
float r = sin((st.x-offset/frequency+time*sync)*frequency)*0.5 + 0.5;
|
||
float g = sin((st.x+time*sync)*frequency)*0.5 + 0.5;
|
||
float b = sin((st.x+offset/frequency+time*sync)*frequency)*0.5 + 0.5;
|
||
return vec4(r, g, b, 1.0);`},{name:"shape",type:"src",inputs:[{type:"float",name:"sides",default:3},{type:"float",name:"radius",default:.3},{type:"float",name:"smoothing",default:.01}],glsl:` vec2 st = _st * 2. - 1.;
|
||
// Angle and radius from the current pixel
|
||
float a = atan(st.x,st.y)+3.1416;
|
||
float r = (2.*3.1416)/sides;
|
||
float d = cos(floor(.5+a/r)*r-a)*length(st);
|
||
return vec4(vec3(1.0-smoothstep(radius,radius + smoothing + 0.0000001,d)), 1.0);`},{name:"gradient",type:"src",inputs:[{type:"float",name:"speed",default:0}],glsl:" return vec4(_st, sin(time*speed), 1.0);"},{name:"src",type:"src",inputs:[{type:"sampler2D",name:"tex",default:NaN}],glsl:` // vec2 uv = gl_FragCoord.xy/vec2(1280., 720.);
|
||
return texture2D(tex, fract(_st));`},{name:"solid",type:"src",inputs:[{type:"float",name:"r",default:0},{type:"float",name:"g",default:0},{type:"float",name:"b",default:0},{type:"float",name:"a",default:1}],glsl:" return vec4(r, g, b, a);"},{name:"rotate",type:"coord",inputs:[{type:"float",name:"angle",default:10},{type:"float",name:"speed",default:0}],glsl:` vec2 xy = _st - vec2(0.5);
|
||
float ang = angle + speed *time;
|
||
xy = mat2(cos(ang),-sin(ang), sin(ang),cos(ang))*xy;
|
||
xy += 0.5;
|
||
return xy;`},{name:"scale",type:"coord",inputs:[{type:"float",name:"amount",default:1.5},{type:"float",name:"xMult",default:1},{type:"float",name:"yMult",default:1},{type:"float",name:"offsetX",default:.5},{type:"float",name:"offsetY",default:.5}],glsl:` vec2 xy = _st - vec2(offsetX, offsetY);
|
||
xy*=(1.0/vec2(amount*xMult, amount*yMult));
|
||
xy+=vec2(offsetX, offsetY);
|
||
return xy;
|
||
`},{name:"pixelate",type:"coord",inputs:[{type:"float",name:"pixelX",default:20},{type:"float",name:"pixelY",default:20}],glsl:` vec2 xy = vec2(pixelX, pixelY);
|
||
return (floor(_st * xy) + 0.5)/xy;`},{name:"posterize",type:"color",inputs:[{type:"float",name:"bins",default:3},{type:"float",name:"gamma",default:.6}],glsl:` vec4 c2 = pow(_c0, vec4(gamma));
|
||
c2 *= vec4(bins);
|
||
c2 = floor(c2);
|
||
c2/= vec4(bins);
|
||
c2 = pow(c2, vec4(1.0/gamma));
|
||
return vec4(c2.xyz, _c0.a);`},{name:"shift",type:"color",inputs:[{type:"float",name:"r",default:.5},{type:"float",name:"g",default:0},{type:"float",name:"b",default:0},{type:"float",name:"a",default:0}],glsl:` vec4 c2 = vec4(_c0);
|
||
c2.r = fract(c2.r + r);
|
||
c2.g = fract(c2.g + g);
|
||
c2.b = fract(c2.b + b);
|
||
c2.a = fract(c2.a + a);
|
||
return vec4(c2.rgba);`},{name:"repeat",type:"coord",inputs:[{type:"float",name:"repeatX",default:3},{type:"float",name:"repeatY",default:3},{type:"float",name:"offsetX",default:0},{type:"float",name:"offsetY",default:0}],glsl:` vec2 st = _st * vec2(repeatX, repeatY);
|
||
st.x += step(1., mod(st.y,2.0)) * offsetX;
|
||
st.y += step(1., mod(st.x,2.0)) * offsetY;
|
||
return fract(st);`},{name:"modulateRepeat",type:"combineCoord",inputs:[{type:"float",name:"repeatX",default:3},{type:"float",name:"repeatY",default:3},{type:"float",name:"offsetX",default:.5},{type:"float",name:"offsetY",default:.5}],glsl:` vec2 st = _st * vec2(repeatX, repeatY);
|
||
st.x += step(1., mod(st.y,2.0)) + _c0.r * offsetX;
|
||
st.y += step(1., mod(st.x,2.0)) + _c0.g * offsetY;
|
||
return fract(st);`},{name:"repeatX",type:"coord",inputs:[{type:"float",name:"reps",default:3},{type:"float",name:"offset",default:0}],glsl:` vec2 st = _st * vec2(reps, 1.0);
|
||
// float f = mod(_st.y,2.0);
|
||
st.y += step(1., mod(st.x,2.0))* offset;
|
||
return fract(st);`},{name:"modulateRepeatX",type:"combineCoord",inputs:[{type:"float",name:"reps",default:3},{type:"float",name:"offset",default:.5}],glsl:` vec2 st = _st * vec2(reps, 1.0);
|
||
// float f = mod(_st.y,2.0);
|
||
st.y += step(1., mod(st.x,2.0)) + _c0.r * offset;
|
||
return fract(st);`},{name:"repeatY",type:"coord",inputs:[{type:"float",name:"reps",default:3},{type:"float",name:"offset",default:0}],glsl:` vec2 st = _st * vec2(1.0, reps);
|
||
// float f = mod(_st.y,2.0);
|
||
st.x += step(1., mod(st.y,2.0))* offset;
|
||
return fract(st);`},{name:"modulateRepeatY",type:"combineCoord",inputs:[{type:"float",name:"reps",default:3},{type:"float",name:"offset",default:.5}],glsl:` vec2 st = _st * vec2(reps, 1.0);
|
||
// float f = mod(_st.y,2.0);
|
||
st.x += step(1., mod(st.y,2.0)) + _c0.r * offset;
|
||
return fract(st);`},{name:"kaleid",type:"coord",inputs:[{type:"float",name:"nSides",default:4}],glsl:` vec2 st = _st;
|
||
st -= 0.5;
|
||
float r = length(st);
|
||
float a = atan(st.y, st.x);
|
||
float pi = 2.*3.1416;
|
||
a = mod(a,pi/nSides);
|
||
a = abs(a-pi/nSides/2.);
|
||
return r*vec2(cos(a), sin(a));`},{name:"modulateKaleid",type:"combineCoord",inputs:[{type:"float",name:"nSides",default:4}],glsl:` vec2 st = _st - 0.5;
|
||
float r = length(st);
|
||
float a = atan(st.y, st.x);
|
||
float pi = 2.*3.1416;
|
||
a = mod(a,pi/nSides);
|
||
a = abs(a-pi/nSides/2.);
|
||
return (_c0.r+r)*vec2(cos(a), sin(a));`},{name:"scroll",type:"coord",inputs:[{type:"float",name:"scrollX",default:.5},{type:"float",name:"scrollY",default:.5},{type:"float",name:"speedX",default:0},{type:"float",name:"speedY",default:0}],glsl:`
|
||
_st.x += scrollX + time*speedX;
|
||
_st.y += scrollY + time*speedY;
|
||
return fract(_st);`},{name:"scrollX",type:"coord",inputs:[{type:"float",name:"scrollX",default:.5},{type:"float",name:"speed",default:0}],glsl:` _st.x += scrollX + time*speed;
|
||
return fract(_st);`},{name:"modulateScrollX",type:"combineCoord",inputs:[{type:"float",name:"scrollX",default:.5},{type:"float",name:"speed",default:0}],glsl:` _st.x += _c0.r*scrollX + time*speed;
|
||
return fract(_st);`},{name:"scrollY",type:"coord",inputs:[{type:"float",name:"scrollY",default:.5},{type:"float",name:"speed",default:0}],glsl:` _st.y += scrollY + time*speed;
|
||
return fract(_st);`},{name:"modulateScrollY",type:"combineCoord",inputs:[{type:"float",name:"scrollY",default:.5},{type:"float",name:"speed",default:0}],glsl:` _st.y += _c0.r*scrollY + time*speed;
|
||
return fract(_st);`},{name:"add",type:"combine",inputs:[{type:"float",name:"amount",default:1}],glsl:" return (_c0+_c1)*amount + _c0*(1.0-amount);"},{name:"sub",type:"combine",inputs:[{type:"float",name:"amount",default:1}],glsl:" return (_c0-_c1)*amount + _c0*(1.0-amount);"},{name:"layer",type:"combine",inputs:[],glsl:" return vec4(mix(_c0.rgb, _c1.rgb, _c1.a), clamp(_c0.a + _c1.a, 0.0, 1.0));"},{name:"blend",type:"combine",inputs:[{type:"float",name:"amount",default:.5}],glsl:" return _c0*(1.0-amount)+_c1*amount;"},{name:"mult",type:"combine",inputs:[{type:"float",name:"amount",default:1}],glsl:" return _c0*(1.0-amount)+(_c0*_c1)*amount;"},{name:"diff",type:"combine",inputs:[],glsl:" return vec4(abs(_c0.rgb-_c1.rgb), max(_c0.a, _c1.a));"},{name:"modulate",type:"combineCoord",inputs:[{type:"float",name:"amount",default:.1}],glsl:` // return fract(st+(_c0.xy-0.5)*amount);
|
||
return _st + _c0.xy*amount;`},{name:"modulateScale",type:"combineCoord",inputs:[{type:"float",name:"multiple",default:1},{type:"float",name:"offset",default:1}],glsl:` vec2 xy = _st - vec2(0.5);
|
||
xy*=(1.0/vec2(offset + multiple*_c0.r, offset + multiple*_c0.g));
|
||
xy+=vec2(0.5);
|
||
return xy;`},{name:"modulatePixelate",type:"combineCoord",inputs:[{type:"float",name:"multiple",default:10},{type:"float",name:"offset",default:3}],glsl:` vec2 xy = vec2(offset + _c0.x*multiple, offset + _c0.y*multiple);
|
||
return (floor(_st * xy) + 0.5)/xy;`},{name:"modulateRotate",type:"combineCoord",inputs:[{type:"float",name:"multiple",default:1},{type:"float",name:"offset",default:0}],glsl:` vec2 xy = _st - vec2(0.5);
|
||
float angle = offset + _c0.x * multiple;
|
||
xy = mat2(cos(angle),-sin(angle), sin(angle),cos(angle))*xy;
|
||
xy += 0.5;
|
||
return xy;`},{name:"modulateHue",type:"combineCoord",inputs:[{type:"float",name:"amount",default:1}],glsl:" return _st + (vec2(_c0.g - _c0.r, _c0.b - _c0.g) * amount * 1.0/resolution);"},{name:"invert",type:"color",inputs:[{type:"float",name:"amount",default:1}],glsl:" return vec4((1.0-_c0.rgb)*amount + _c0.rgb*(1.0-amount), _c0.a);"},{name:"contrast",type:"color",inputs:[{type:"float",name:"amount",default:1.6}],glsl:` vec4 c = (_c0-vec4(0.5))*vec4(amount) + vec4(0.5);
|
||
return vec4(c.rgb, _c0.a);`},{name:"brightness",type:"color",inputs:[{type:"float",name:"amount",default:.4}],glsl:" return vec4(_c0.rgb + vec3(amount), _c0.a);"},{name:"mask",type:"combine",inputs:[],glsl:` float a = _luminance(_c1.rgb);
|
||
return vec4(_c0.rgb*a, a*_c0.a);`},{name:"luma",type:"color",inputs:[{type:"float",name:"threshold",default:.5},{type:"float",name:"tolerance",default:.1}],glsl:` float a = smoothstep(threshold-(tolerance+0.0000001), threshold+(tolerance+0.0000001), _luminance(_c0.rgb));
|
||
return vec4(_c0.rgb*a, a);`},{name:"thresh",type:"color",inputs:[{type:"float",name:"threshold",default:.5},{type:"float",name:"tolerance",default:.04}],glsl:" return vec4(vec3(smoothstep(threshold-(tolerance+0.0000001), threshold+(tolerance+0.0000001), _luminance(_c0.rgb))), _c0.a);"},{name:"color",type:"color",inputs:[{type:"float",name:"r",default:1},{type:"float",name:"g",default:1},{type:"float",name:"b",default:1},{type:"float",name:"a",default:1}],glsl:` vec4 c = vec4(r, g, b, a);
|
||
vec4 pos = step(0.0, c); // detect whether negative
|
||
// if > 0, return r * _c0
|
||
// if < 0 return (1.0-r) * _c0
|
||
return vec4(mix((1.0-_c0)*abs(c), c*_c0, pos));`},{name:"saturate",type:"color",inputs:[{type:"float",name:"amount",default:2}],glsl:` const vec3 W = vec3(0.2125, 0.7154, 0.0721);
|
||
vec3 intensity = vec3(dot(_c0.rgb, W));
|
||
return vec4(mix(intensity, _c0.rgb, amount), _c0.a);`},{name:"hue",type:"color",inputs:[{type:"float",name:"hue",default:.4}],glsl:` vec3 c = _rgbToHsv(_c0.rgb);
|
||
c.r += hue;
|
||
// c.r = fract(c.r);
|
||
return vec4(_hsvToRgb(c), _c0.a);`},{name:"colorama",type:"color",inputs:[{type:"float",name:"amount",default:.005}],glsl:` vec3 c = _rgbToHsv(_c0.rgb);
|
||
c += vec3(amount);
|
||
c = _hsvToRgb(c);
|
||
c = fract(c);
|
||
return vec4(c, _c0.a);`},{name:"prev",type:"src",inputs:[],glsl:" return texture2D(prevBuffer, fract(_st));"},{name:"sum",type:"color",inputs:[{type:"vec4",name:"scale",default:1}],glsl:` vec4 v = _c0 * s;
|
||
return v.r + v.g + v.b + v.a;
|
||
}
|
||
float sum(vec2 _st, vec4 s) { // vec4 is not a typo, because argument type is not overloaded
|
||
vec2 v = _st.xy * s.xy;
|
||
return v.x + v.y;`},{name:"r",type:"color",inputs:[{type:"float",name:"scale",default:1},{type:"float",name:"offset",default:0}],glsl:" return vec4(_c0.r * scale + offset);"},{name:"g",type:"color",inputs:[{type:"float",name:"scale",default:1},{type:"float",name:"offset",default:0}],glsl:" return vec4(_c0.g * scale + offset);"},{name:"b",type:"color",inputs:[{type:"float",name:"scale",default:1},{type:"float",name:"offset",default:0}],glsl:" return vec4(_c0.b * scale + offset);"},{name:"a",type:"color",inputs:[{type:"float",name:"scale",default:1},{type:"float",name:"offset",default:0}],glsl:" return vec4(_c0.a * scale + offset);"}];class sA{constructor(t){this.editor=t,this.undoStack=new qk,this.initialVector=[],this.funcTab={},this.transMap={},this.scanFuncs(),this.dumpDict()}dumpList(){_y.forEach(r=>{r.inputs.forEach(n=>{n.name+""+n.type+n.default})})}scanFuncs(){_y.forEach(r=>{this.transMap[r.name]=r,this.funcTab[r.type]===void 0&&(this.funcTab[r.type]=[]),this.funcTab[r.type].push(r)})}dumpDict(){for(let t in this.funcTab)this.funcTab[t].forEach(r=>{r.inputs.forEach(n=>{n.name+""+n.type+n.default})})}mutate(t){let r=this.editor.cm.getValue();this.undoStack.push({text:r,lastLitX:this.lastLitX});let n=!0,o=5;for(;n&&o-->=0;){var a=[];let f=Nt.parse(r,{locations:!0,onComment:a});this.transform(f,t),Hc.attachComments(f,a);let h=$k(f,{comments:!0});this.editor.cm.setValue(h);try{vy.eval(h,(p,v)=>{v&&console.log("Eval error: "+h),n=v})}catch(p){console.log("Exception caught: "+p),n=p}}}doUndo(){if(this.undoStack.atTop()){let t=this.editor.cm.getValue();this.undoStack.push({text:t,lastLitX:this.lastLitX})}if(this.undoStack.canUndo()){let{text:t,lastLitX:r}=this.undoStack.undo();this.setText(t),this.lastLitX=r}}doRedo(){if(this.undoStack.canRedo()){let{text:t,lastLitX:r}=this.undoStack.redo();this.setText(t),this.lastLitX=r}}setText(t){this.editor.cm.setValue(t),vy.eval(t,(r,n)=>{})}transform(t,r){let n=Hc.makeTraveler({go:function(a,f){if(a.type==="Literal")f.literalTab.push(a);else if(a.type==="MemberExpression"){if(a.property&&a.property.type==="Literal")return}else a.type==="CallExpression"&&a.callee&&a.callee.property&&a.callee.property.name&&a.callee.property.name!=="out"&&f.functionTab.push(a);this.super.go.call(this,a,f)}}),o={};if(o.literalTab=[],o.functionTab=[],n.go(t,o),this.litCount=o.literalTab.length,this.funCount=o.functionTab.length,this.litCount!==this.initialVector.length){let a=[];for(let f=0;f<this.litCount;++f)a.push(o.literalTab[f].value);this.initialVector=a}r.changeTransform?this.glitchTrans(o,r):this.glitchLiteral(o,r)}glitchLiteral(t,r){let n=0;r.reroll?this.lastLitX!==void 0&&(n=this.lastLitX):(n=Math.floor(Math.random()*this.litCount),this.lastLitX=n);let o=t.literalTab[n];if(o){let a=this.glitchRelToInit(o.value,this.initialVector[n]),f=o.raw;o.value=a,o.raw=""+a,console.log("Literal: "+n+" changed from: "+f+" to: "+a)}}glitchNumber(t){t===0&&(t=1);let r=t*2;return Math.round(Math.random()*r*1e3)/1e3}glitchRelToInit(t,r){return r===void 0?glitchNumber(t):(r===0&&(r=.5),Math.round(Math.random()*r*2*1e3)/1e3)}glitchTrans(t,r){let n=Math.floor(Math.random()*this.funCount);if(t.functionTab[n]===void 0||t.functionTab[n].callee===void 0||t.functionTab[n].callee.property===void 0){console.log("No valid functionTab for index: "+n);return}let o=t.functionTab[n].callee.property.name;if(o==null){console.log("No name for callee");return}let a=this.transMap[o].type;if(a==null){console.log("ftype undefined for: "+o);return}let f=this.funcTab[a];if(f==null){console.log("no funcTab entry for: "+a);return}let h=Math.floor(Math.random()*f.length),p=f[h].name;if(o==="modulate"&&p==="modulateScrollX"){console.log("Function: "+n+" changing from: "+o+" can't change to: "+p);return}t.functionTab[n].callee.property.name=p,console.log("Function: "+n+" changed from: "+o+" to: "+p)}}var Tv={exports:{}},xo={},cl={exports:{}},zf={},Qf={},wy;function Lh(){if(wy)return Qf;wy=1;function e(n){this.__parent=n,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}e.prototype.clone_empty=function(){var n=new e(this.__parent);return n.set_indent(this.__indent_count,this.__alignment_count),n},e.prototype.item=function(n){return n<0?this.__items[this.__items.length+n]:this.__items[n]},e.prototype.has_match=function(n){for(var o=this.__items.length-1;o>=0;o--)if(this.__items[o].match(n))return!0;return!1},e.prototype.set_indent=function(n,o){this.is_empty()&&(this.__indent_count=n||0,this.__alignment_count=o||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},e.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},e.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},e.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var n=this.__parent.current_line;return n.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),n.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),n.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,n.__items[0]===" "&&(n.__items.splice(0,1),n.__character_count-=1),!0}return!1},e.prototype.is_empty=function(){return this.__items.length===0},e.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},e.prototype.push=function(n){this.__items.push(n);var o=n.lastIndexOf(`
|
||
`);o!==-1?this.__character_count=n.length-o:this.__character_count+=n.length},e.prototype.pop=function(){var n=null;return this.is_empty()||(n=this.__items.pop(),this.__character_count-=n.length),n},e.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},e.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},e.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},e.prototype.toString=function(){var n="";return this.is_empty()?this.__parent.indent_empty_lines&&(n=this.__parent.get_indent_string(this.__indent_count)):(n=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),n+=this.__items.join("")),n};function t(n,o){this.__cache=[""],this.__indent_size=n.indent_size,this.__indent_string=n.indent_char,n.indent_with_tabs||(this.__indent_string=new Array(n.indent_size+1).join(n.indent_char)),o=o||"",n.indent_level>0&&(o=new Array(n.indent_level+1).join(this.__indent_string)),this.__base_string=o,this.__base_string_length=o.length}t.prototype.get_indent_size=function(n,o){var a=this.__base_string_length;return o=o||0,n<0&&(a=0),a+=n*this.__indent_size,a+=o,a},t.prototype.get_indent_string=function(n,o){var a=this.__base_string;return o=o||0,n<0&&(n=0,a=""),o+=n*this.__indent_size,this.__ensure_cache(o),a+=this.__cache[o],a},t.prototype.__ensure_cache=function(n){for(;n>=this.__cache.length;)this.__add_column()},t.prototype.__add_column=function(){var n=this.__cache.length,o=0,a="";this.__indent_size&&n>=this.__indent_size&&(o=Math.floor(n/this.__indent_size),n-=o*this.__indent_size,a=new Array(o+1).join(this.__indent_string)),n&&(a+=new Array(n+1).join(" ")),this.__cache.push(a)};function r(n,o){this.__indent_cache=new t(n,o),this.raw=!1,this._end_with_newline=n.end_with_newline,this.indent_size=n.indent_size,this.wrap_line_length=n.wrap_line_length,this.indent_empty_lines=n.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new e(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}return r.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},r.prototype.get_line_number=function(){return this.__lines.length},r.prototype.get_indent_string=function(n,o){return this.__indent_cache.get_indent_string(n,o)},r.prototype.get_indent_size=function(n,o){return this.__indent_cache.get_indent_size(n,o)},r.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},r.prototype.add_new_line=function(n){return this.is_empty()||!n&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},r.prototype.get_code=function(n){this.trim(!0);var o=this.current_line.pop();o&&(o[o.length-1]===`
|
||
`&&(o=o.replace(/\n+$/g,"")),this.current_line.push(o)),this._end_with_newline&&this.__add_outputline();var a=this.__lines.join(`
|
||
`);return n!==`
|
||
`&&(a=a.replace(/[\n]/g,n)),a},r.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},r.prototype.set_indent=function(n,o){return n=n||0,o=o||0,this.next_line.set_indent(n,o),this.__lines.length>1?(this.current_line.set_indent(n,o),!0):(this.current_line.set_indent(),!1)},r.prototype.add_raw_token=function(n){for(var o=0;o<n.newlines;o++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(n.whitespace_before),this.current_line.push(n.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},r.prototype.add_token=function(n){this.__add_space_before_token(),this.current_line.push(n),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},r.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},r.prototype.remove_indent=function(n){for(var o=this.__lines.length;n<o;)this.__lines[n]._remove_indent(),n++;this.current_line._remove_wrap_indent()},r.prototype.trim=function(n){for(n=n===void 0?!1:n,this.current_line.trim();n&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},r.prototype.just_added_newline=function(){return this.current_line.is_empty()},r.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},r.prototype.ensure_empty_line_above=function(n,o){for(var a=this.__lines.length-2;a>=0;){var f=this.__lines[a];if(f.is_empty())break;if(f.item(0).indexOf(n)!==0&&f.item(-1)!==o){this.__lines.splice(a+1,0,new e(this)),this.previous_line=this.__lines[this.__lines.length-2];break}a--}},Qf.Output=r,Qf}var Yf={},by;function Ev(){if(by)return Yf;by=1;function e(t,r,n,o){this.type=t,this.text=r,this.comments_before=null,this.newlines=n||0,this.whitespace_before=o||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}return Yf.Token=e,Yf}var Hf={},xy;function kv(){return xy||(xy=1,function(e){var t="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",r="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",n="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",o="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",a="(?:\\\\u[0-9a-fA-F]{4}|["+t+n+"])",f="(?:\\\\u[0-9a-fA-F]{4}|["+r+n+o+"])*";e.identifier=new RegExp(a+f,"g"),e.identifierStart=new RegExp(a),e.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+r+n+o+"])+"),e.newline=/[\n\r\u2028\u2029]/,e.lineBreak=new RegExp(`\r
|
||
|`+e.newline.source),e.allLineBreaks=new RegExp(e.lineBreak.source,"g")}(Hf)),Hf}var Zf={},So={},Sy;function Uh(){if(Sy)return So;Sy=1;function e(n,o){this.raw_options=t(n,o),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}e.prototype._get_array=function(n,o){var a=this.raw_options[n],f=o||[];return typeof a=="object"?a!==null&&typeof a.concat=="function"&&(f=a.concat()):typeof a=="string"&&(f=a.split(/[^a-zA-Z0-9_\/\-]+/)),f},e.prototype._get_boolean=function(n,o){var a=this.raw_options[n],f=a===void 0?!!o:!!a;return f},e.prototype._get_characters=function(n,o){var a=this.raw_options[n],f=o||"";return typeof a=="string"&&(f=a.replace(/\\r/,"\r").replace(/\\n/,`
|
||
`).replace(/\\t/," ")),f},e.prototype._get_number=function(n,o){var a=this.raw_options[n];o=parseInt(o,10),isNaN(o)&&(o=0);var f=parseInt(a,10);return isNaN(f)&&(f=o),f},e.prototype._get_selection=function(n,o,a){var f=this._get_selection_list(n,o,a);if(f.length!==1)throw new Error("Invalid Option Value: The option '"+n+`' can only be one of the following values:
|
||
`+o+`
|
||
You passed in: '`+this.raw_options[n]+"'");return f[0]},e.prototype._get_selection_list=function(n,o,a){if(!o||o.length===0)throw new Error("Selection list cannot be empty.");if(a=a||[o[0]],!this._is_valid_selection(a,o))throw new Error("Invalid Default Value!");var f=this._get_array(n,a);if(!this._is_valid_selection(f,o))throw new Error("Invalid Option Value: The option '"+n+`' can contain only the following values:
|
||
`+o+`
|
||
You passed in: '`+this.raw_options[n]+"'");return f},e.prototype._is_valid_selection=function(n,o){return n.length&&o.length&&!n.some(function(a){return o.indexOf(a)===-1})};function t(n,o){var a={};n=r(n);var f;for(f in n)f!==o&&(a[f]=n[f]);if(o&&n[o])for(f in n[o])a[f]=n[o][f];return a}function r(n){var o={},a;for(a in n){var f=a.replace(/-/g,"_");o[f]=n[a]}return o}return So.Options=e,So.normalizeOpts=r,So.mergeOpts=t,So}var My;function Av(){if(My)return Zf;My=1;var e=Uh().Options,t=["before-newline","after-newline","preserve-newline"];function r(n){e.call(this,n,"js");var o=this.raw_options.brace_style||null;o==="expand-strict"?this.raw_options.brace_style="expand":o==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var a=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var f=0;f<a.length;f++)a[f]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=a[f];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",t),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}return r.prototype=new e,Zf.Options=r,Zf}var ss={},$f={},Cy;function Ih(){if(Cy)return $f;Cy=1;var e=RegExp.prototype.hasOwnProperty("sticky");function t(r){this.__input=r||"",this.__input_length=this.__input.length,this.__position=0}return t.prototype.restart=function(){this.__position=0},t.prototype.back=function(){this.__position>0&&(this.__position-=1)},t.prototype.hasNext=function(){return this.__position<this.__input_length},t.prototype.next=function(){var r=null;return this.hasNext()&&(r=this.__input.charAt(this.__position),this.__position+=1),r},t.prototype.peek=function(r){var n=null;return r=r||0,r+=this.__position,r>=0&&r<this.__input_length&&(n=this.__input.charAt(r)),n},t.prototype.__match=function(r,n){r.lastIndex=n;var o=r.exec(this.__input);return o&&!(e&&r.sticky)&&o.index!==n&&(o=null),o},t.prototype.test=function(r,n){return n=n||0,n+=this.__position,n>=0&&n<this.__input_length?!!this.__match(r,n):!1},t.prototype.testChar=function(r,n){var o=this.peek(n);return r.lastIndex=0,o!==null&&r.test(o)},t.prototype.match=function(r){var n=this.__match(r,this.__position);return n?this.__position+=n[0].length:n=null,n},t.prototype.read=function(r,n,o){var a="",f;return r&&(f=this.match(r),f&&(a+=f[0])),n&&(f||!r)&&(a+=this.readUntil(n,o)),a},t.prototype.readUntil=function(r,n){var o="",a=this.__position;r.lastIndex=this.__position;var f=r.exec(this.__input);return f?(a=f.index,n&&(a+=f[0].length)):a=this.__input_length,o=this.__input.substring(this.__position,a),this.__position=a,o},t.prototype.readUntilAfter=function(r){return this.readUntil(r,!0)},t.prototype.get_regexp=function(r,n){var o=null,a="g";return n&&e&&(a="y"),typeof r=="string"&&r!==""?o=new RegExp(r,a):r&&(o=new RegExp(r.source,a)),o},t.prototype.get_literal_regexp=function(r){return RegExp(r.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},t.prototype.peekUntilAfter=function(r){var n=this.__position,o=this.readUntilAfter(r);return this.__position=n,o},t.prototype.lookBack=function(r){var n=this.__position-1;return n>=r.length&&this.__input.substring(n-r.length,n).toLowerCase()===r},$f.InputScanner=t,$f}var hl={},Xf={},Ty;function oA(){if(Ty)return Xf;Ty=1;function e(t){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=t}return e.prototype.restart=function(){this.__position=0},e.prototype.isEmpty=function(){return this.__tokens_length===0},e.prototype.hasNext=function(){return this.__position<this.__tokens_length},e.prototype.next=function(){var t=null;return this.hasNext()&&(t=this.__tokens[this.__position],this.__position+=1),t},e.prototype.peek=function(t){var r=null;return t=t||0,t+=this.__position,t>=0&&t<this.__tokens_length&&(r=this.__tokens[t]),r},e.prototype.add=function(t){this.__parent_token&&(t.parent=this.__parent_token),this.__tokens.push(t),this.__tokens_length+=1},Xf.TokenStream=e,Xf}var qf={},ec={},Ey;function fu(){if(Ey)return ec;Ey=1;function e(t,r){this._input=t,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,r&&(this._starting_pattern=this._input.get_regexp(r._starting_pattern,!0),this._match_pattern=this._input.get_regexp(r._match_pattern,!0),this._until_pattern=this._input.get_regexp(r._until_pattern),this._until_after=r._until_after)}return e.prototype.read=function(){var t=this._input.read(this._starting_pattern);return(!this._starting_pattern||t)&&(t+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),t},e.prototype.read_match=function(){return this._input.match(this._match_pattern)},e.prototype.until_after=function(t){var r=this._create();return r._until_after=!0,r._until_pattern=this._input.get_regexp(t),r._update(),r},e.prototype.until=function(t){var r=this._create();return r._until_after=!1,r._until_pattern=this._input.get_regexp(t),r._update(),r},e.prototype.starting_with=function(t){var r=this._create();return r._starting_pattern=this._input.get_regexp(t,!0),r._update(),r},e.prototype.matching=function(t){var r=this._create();return r._match_pattern=this._input.get_regexp(t,!0),r._update(),r},e.prototype._create=function(){return new e(this._input,this)},e.prototype._update=function(){},ec.Pattern=e,ec}var ky;function aA(){if(ky)return qf;ky=1;var e=fu().Pattern;function t(r,n){e.call(this,r,n),n?this._line_regexp=this._input.get_regexp(n._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}return t.prototype=new e,t.prototype.__set_whitespace_patterns=function(r,n){r+="\\t ",n+="\\n\\r",this._match_pattern=this._input.get_regexp("["+r+n+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+n+"]")},t.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var r=this._input.read(this._match_pattern);if(r===" ")this.whitespace_before_token=" ";else if(r){var n=this.__split(this._newline_regexp,r);this.newline_count=n.length-1,this.whitespace_before_token=n[this.newline_count]}return r},t.prototype.matching=function(r,n){var o=this._create();return o.__set_whitespace_patterns(r,n),o._update(),o},t.prototype._create=function(){return new t(this._input,this)},t.prototype.__split=function(r,n){r.lastIndex=0;for(var o=0,a=[],f=r.exec(n);f;)a.push(n.substring(o,f.index)),o=f.index+f[0].length,f=r.exec(n);return o<n.length?a.push(n.substring(o,n.length)):a.push(""),a},qf.WhitespacePattern=t,qf}var Ay;function Gl(){if(Ay)return hl;Ay=1;var e=Ih().InputScanner,t=Ev().Token,r=oA().TokenStream,n=aA().WhitespacePattern,o={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},a=function(f,h){this._input=new e(f),this._options=h||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new n(this._input)};return a.prototype.tokenize=function(){this._input.restart(),this.__tokens=new r,this._reset();for(var f,h=new t(o.START,""),p=null,v=[],_=new r;h.type!==o.EOF;){for(f=this._get_next_token(h,p);this._is_comment(f);)_.add(f),f=this._get_next_token(h,p);_.isEmpty()||(f.comments_before=_,_=new r),f.parent=p,this._is_opening(f)?(v.push(p),p=f):p&&this._is_closing(f,p)&&(f.opened=p,p.closed=f,p=v.pop(),f.parent=p),f.previous=h,h.next=f,this.__tokens.add(f),h=f}return this.__tokens},a.prototype._is_first_token=function(){return this.__tokens.isEmpty()},a.prototype._reset=function(){},a.prototype._get_next_token=function(f,h){this._readWhitespace();var p=this._input.read(/.+/g);return p?this._create_token(o.RAW,p):this._create_token(o.EOF,"")},a.prototype._is_comment=function(f){return!1},a.prototype._is_opening=function(f){return!1},a.prototype._is_closing=function(f,h){return!1},a.prototype._create_token=function(f,h){var p=new t(f,h,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return p},a.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},hl.Tokenizer=a,hl.TOKEN=o,hl}var tc={},Ry;function Jh(){if(Ry)return tc;Ry=1;function e(t,r){t=typeof t=="string"?t:t.source,r=typeof r=="string"?r:r.source,this.__directives_block_pattern=new RegExp(t+/ beautify( \w+[:]\w+)+ /.source+r,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(t+/\sbeautify\signore:end\s/.source+r,"g")}return e.prototype.get_directives=function(t){if(!t.match(this.__directives_block_pattern))return null;var r={};this.__directive_pattern.lastIndex=0;for(var n=this.__directive_pattern.exec(t);n;)r[n[1]]=n[2],n=this.__directive_pattern.exec(t);return r},e.prototype.readIgnored=function(t){return t.readUntilAfter(this.__directives_end_ignore_pattern)},tc.Directives=e,tc}var ic={},Ly;function Rv(){if(Ly)return ic;Ly=1;var e=fu().Pattern,t={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function r(n,o){e.call(this,n,o),this.__template_pattern=null,this._disabled=Object.assign({},t),this._excluded=Object.assign({},t),o&&(this.__template_pattern=this._input.get_regexp(o.__template_pattern),this._excluded=Object.assign(this._excluded,o._excluded),this._disabled=Object.assign(this._disabled,o._disabled));var a=new e(n);this.__patterns={handlebars_comment:a.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:a.starting_with(/{{{/).until_after(/}}}/),handlebars:a.starting_with(/{{/).until_after(/}}/),php:a.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:a.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:a.starting_with(/{%/).until_after(/%}/),django_value:a.starting_with(/{{/).until_after(/}}/),django_comment:a.starting_with(/{#/).until_after(/#}/),smarty:a.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:a.starting_with(/{\*/).until_after(/\*}/),smarty_literal:a.starting_with(/{literal}/).until_after(/{\/literal}/)}}return r.prototype=new e,r.prototype._create=function(){return new r(this._input,this)},r.prototype._update=function(){this.__set_templated_pattern()},r.prototype.disable=function(n){var o=this._create();return o._disabled[n]=!0,o._update(),o},r.prototype.read_options=function(n){var o=this._create();for(var a in t)o._disabled[a]=n.templating.indexOf(a)===-1;return o._update(),o},r.prototype.exclude=function(n){var o=this._create();return o._excluded[n]=!0,o._update(),o},r.prototype.read=function(){var n="";this._match_pattern?n=this._input.read(this._starting_pattern):n=this._input.read(this._starting_pattern,this.__template_pattern);for(var o=this._read_template();o;)this._match_pattern?o+=this._input.read(this._match_pattern):o+=this._input.readUntil(this.__template_pattern),n+=o,o=this._read_template();return this._until_after&&(n+=this._input.readUntilAfter(this._until_pattern)),n},r.prototype.__set_templated_pattern=function(){var n=[];this._disabled.php||n.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||n.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||n.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(n.push(this.__patterns.django._starting_pattern.source),n.push(this.__patterns.django_value._starting_pattern.source),n.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||n.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&n.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+n.join("|")+")")},r.prototype._read_template=function(){var n="",o=this._input.peek();if(o==="<"){var a=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&a==="?"&&(n=n||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&a==="%"&&(n=n||this.__patterns.erb.read())}else o==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(n=n||this.__patterns.handlebars_comment.read(),n=n||this.__patterns.handlebars_unescaped.read(),n=n||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(n=n||this.__patterns.django_value.read()),this._excluded.django||(n=n||this.__patterns.django_comment.read(),n=n||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(n=n||this.__patterns.smarty_comment.read(),n=n||this.__patterns.smarty_literal.read(),n=n||this.__patterns.smarty.read()));return n},ic.TemplatablePattern=r,ic}var Uy;function pl(){if(Uy)return ss;Uy=1;var e=Ih().InputScanner,t=Gl().Tokenizer,r=Gl().TOKEN,n=Jh().Directives,o=kv(),a=fu().Pattern,f=Rv().TemplatablePattern;function h(F,V){return V.indexOf(F)!==-1}var p={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:r.START,RAW:r.RAW,EOF:r.EOF},v=new n(/\/\*/,/\*\//),_=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,y=/[0-9]/,m=/[^\d\.]/,x=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),U=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";U=U.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),U="\\?\\.(?!\\d) "+U,U=U.replace(/ /g,"|");var R=new RegExp(U),S="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),g=S.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),L=new RegExp("^(?:"+g.join("|")+")$"),G,O=function(F,V){t.call(this,F,V),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var D=new a(this._input),ee=new f(this._input).read_options(this._options);this.__patterns={template:ee,identifier:ee.starting_with(o.identifier).matching(o.identifierMatch),number:D.matching(_),punct:D.matching(R),comment:D.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:D.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:D.matching(/<!--/),html_comment_end:D.matching(/-->/),include:D.starting_with(/#include/).until_after(o.lineBreak),shebang:D.starting_with(/#!/).until_after(o.lineBreak),xml:D.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:ee.until(/['\\\n\r\u2028\u2029]/),double_quote:ee.until(/["\\\n\r\u2028\u2029]/),template_text:ee.until(/[`\\$]/),template_expression:ee.until(/[`}\\]/)}};O.prototype=new t,O.prototype._is_comment=function(F){return F.type===p.COMMENT||F.type===p.BLOCK_COMMENT||F.type===p.UNKNOWN},O.prototype._is_opening=function(F){return F.type===p.START_BLOCK||F.type===p.START_EXPR},O.prototype._is_closing=function(F,V){return(F.type===p.END_BLOCK||F.type===p.END_EXPR)&&V&&(F.text==="]"&&V.text==="["||F.text===")"&&V.text==="("||F.text==="}"&&V.text==="{")},O.prototype._reset=function(){G=!1},O.prototype._get_next_token=function(F,V){var D=null;this._readWhitespace();var ee=this._input.peek();return ee===null?this._create_token(p.EOF,""):(D=D||this._read_non_javascript(ee),D=D||this._read_string(ee),D=D||this._read_pair(ee,this._input.peek(1)),D=D||this._read_word(F),D=D||this._read_singles(ee),D=D||this._read_comment(ee),D=D||this._read_regexp(ee,F),D=D||this._read_xml(ee,F),D=D||this._read_punctuation(),D=D||this._create_token(p.UNKNOWN,this._input.next()),D)},O.prototype._read_word=function(F){var V;if(V=this.__patterns.identifier.read(),V!=="")return V=V.replace(o.allLineBreaks,`
|
||
`),!(F.type===p.DOT||F.type===p.RESERVED&&(F.text==="set"||F.text==="get"))&&L.test(V)?(V==="in"||V==="of")&&(F.type===p.WORD||F.type===p.STRING)?this._create_token(p.OPERATOR,V):this._create_token(p.RESERVED,V):this._create_token(p.WORD,V);if(V=this.__patterns.number.read(),V!=="")return this._create_token(p.WORD,V)},O.prototype._read_singles=function(F){var V=null;return F==="("||F==="["?V=this._create_token(p.START_EXPR,F):F===")"||F==="]"?V=this._create_token(p.END_EXPR,F):F==="{"?V=this._create_token(p.START_BLOCK,F):F==="}"?V=this._create_token(p.END_BLOCK,F):F===";"?V=this._create_token(p.SEMICOLON,F):F==="."&&m.test(this._input.peek(1))?V=this._create_token(p.DOT,F):F===","&&(V=this._create_token(p.COMMA,F)),V&&this._input.next(),V},O.prototype._read_pair=function(F,V){var D=null;return F==="#"&&V==="{"&&(D=this._create_token(p.START_BLOCK,F+V)),D&&(this._input.next(),this._input.next()),D},O.prototype._read_punctuation=function(){var F=this.__patterns.punct.read();if(F!=="")return F==="="?this._create_token(p.EQUALS,F):F==="?."?this._create_token(p.DOT,F):this._create_token(p.OPERATOR,F)},O.prototype._read_non_javascript=function(F){var V="";if(F==="#"){if(this._is_first_token()&&(V=this.__patterns.shebang.read(),V))return this._create_token(p.UNKNOWN,V.trim()+`
|
||
`);if(V=this.__patterns.include.read(),V)return this._create_token(p.UNKNOWN,V.trim()+`
|
||
`);F=this._input.next();var D="#";if(this._input.hasNext()&&this._input.testChar(y)){do F=this._input.next(),D+=F;while(this._input.hasNext()&&F!=="#"&&F!=="=");return F==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(D+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(D+="{}",this._input.next(),this._input.next())),this._create_token(p.WORD,D)}this._input.back()}else if(F==="<"&&this._is_first_token()){if(V=this.__patterns.html_comment_start.read(),V){for(;this._input.hasNext()&&!this._input.testChar(o.newline);)V+=this._input.next();return G=!0,this._create_token(p.COMMENT,V)}}else if(G&&F==="-"&&(V=this.__patterns.html_comment_end.read(),V))return G=!1,this._create_token(p.COMMENT,V);return null},O.prototype._read_comment=function(F){var V=null;if(F==="/"){var D="";if(this._input.peek(1)==="*"){D=this.__patterns.block_comment.read();var ee=v.get_directives(D);ee&&ee.ignore==="start"&&(D+=v.readIgnored(this._input)),D=D.replace(o.allLineBreaks,`
|
||
`),V=this._create_token(p.BLOCK_COMMENT,D),V.directives=ee}else this._input.peek(1)==="/"&&(D=this.__patterns.comment.read(),V=this._create_token(p.COMMENT,D))}return V},O.prototype._read_string=function(F){if(F==="`"||F==="'"||F==='"'){var V=this._input.next();return this.has_char_escapes=!1,F==="`"?V+=this._read_string_recursive("`",!0,"${"):V+=this._read_string_recursive(F),this.has_char_escapes&&this._options.unescape_strings&&(V=P(V)),this._input.peek()===F&&(V+=this._input.next()),V=V.replace(o.allLineBreaks,`
|
||
`),this._create_token(p.STRING,V)}return null},O.prototype._allow_regexp_or_xml=function(F){return F.type===p.RESERVED&&h(F.text,["return","case","throw","else","do","typeof","yield"])||F.type===p.END_EXPR&&F.text===")"&&F.opened.previous.type===p.RESERVED&&h(F.opened.previous.text,["if","while","for"])||h(F.type,[p.COMMENT,p.START_EXPR,p.START_BLOCK,p.START,p.END_BLOCK,p.OPERATOR,p.EQUALS,p.EOF,p.SEMICOLON,p.COMMA])},O.prototype._read_regexp=function(F,V){if(F==="/"&&this._allow_regexp_or_xml(V)){for(var D=this._input.next(),ee=!1,A=!1;this._input.hasNext()&&(ee||A||this._input.peek()!==F)&&!this._input.testChar(o.newline);)D+=this._input.peek(),ee?ee=!1:(ee=this._input.peek()==="\\",this._input.peek()==="["?A=!0:this._input.peek()==="]"&&(A=!1)),this._input.next();return this._input.peek()===F&&(D+=this._input.next(),D+=this._input.read(o.identifier)),this._create_token(p.STRING,D)}return null},O.prototype._read_xml=function(F,V){if(this._options.e4x&&F==="<"&&this._allow_regexp_or_xml(V)){var D="",ee=this.__patterns.xml.read_match();if(ee){for(var A=ee[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),q=A.indexOf("{")===0,$=0;ee;){var ce=!!ee[1],ye=ee[2],re=!!ee[ee.length-1]||ye.slice(0,8)==="![CDATA[";if(!re&&(ye===A||q&&ye.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(ce?--$:++$),D+=ee[0],$<=0)break;ee=this.__patterns.xml.read_match()}return ee||(D+=this._input.match(/[\s\S]*/g)[0]),D=D.replace(o.allLineBreaks,`
|
||
`),this._create_token(p.STRING,D)}}return null};function P(F){for(var V="",D=0,ee=new e(F),A=null;ee.hasNext();)if(A=ee.match(/([\s]|[^\\]|\\\\)+/g),A&&(V+=A[0]),ee.peek()==="\\"){if(ee.next(),ee.peek()==="x")A=ee.match(/x([0-9A-Fa-f]{2})/g);else if(ee.peek()==="u")A=ee.match(/u([0-9A-Fa-f]{4})/g);else{V+="\\",ee.hasNext()&&(V+=ee.next());continue}if(!A||(D=parseInt(A[1],16),D>126&&D<=255&&A[0].indexOf("x")===0))return F;if(D>=0&&D<32){V+="\\"+A[0];continue}else D===34||D===39||D===92?V+="\\"+String.fromCharCode(D):V+=String.fromCharCode(D)}return V}return O.prototype._read_string_recursive=function(F,V,D){var ee,A;F==="'"?A=this.__patterns.single_quote:F==='"'?A=this.__patterns.double_quote:F==="`"?A=this.__patterns.template_text:F==="}"&&(A=this.__patterns.template_expression);for(var q=A.read(),$="";this._input.hasNext();){if($=this._input.next(),$===F||!V&&o.newline.test($)){this._input.back();break}else $==="\\"&&this._input.hasNext()?(ee=this._input.peek(),ee==="x"||ee==="u"?this.has_char_escapes=!0:ee==="\r"&&this._input.peek(1)===`
|
||
`&&this._input.next(),$+=this._input.next()):D&&(D==="${"&&$==="$"&&this._input.peek()==="{"&&($+=this._input.next()),D===$&&(F==="`"?$+=this._read_string_recursive("}",V,"`"):$+=this._read_string_recursive("`",V,"${"),this._input.hasNext()&&($+=this._input.next())));$+=A.read(),q+=$}return q},ss.Tokenizer=O,ss.TOKEN=p,ss.positionable_operators=x.slice(),ss.line_starters=S.slice(),ss}var Iy;function lA(){if(Iy)return zf;Iy=1;var e=Lh().Output,t=Ev().Token,r=kv(),n=Av().Options,o=pl().Tokenizer,a=pl().line_starters,f=pl().positionable_operators,h=pl().TOKEN;function p(A,q){return q.indexOf(A)!==-1}function v(A){return A.replace(/^\s+/g,"")}function _(A){for(var q={},$=0;$<A.length;$++)q[A[$].replace(/-/g,"_")]=A[$];return q}function y(A,q){return A&&A.type===h.RESERVED&&A.text===q}function m(A,q){return A&&A.type===h.RESERVED&&p(A.text,q)}var x=["case","return","do","if","throw","else","await","break","continue","async"],U=["before-newline","after-newline","preserve-newline"],R=_(U),S=[R.before_newline,R.preserve_newline],g={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function L(A,q){q.multiline_frame||q.mode===g.ForInitializer||q.mode===g.Conditional||A.remove_indent(q.start_line_index)}function G(A){A=A.replace(r.allLineBreaks,`
|
||
`);for(var q=[],$=A.indexOf(`
|
||
`);$!==-1;)q.push(A.substring(0,$)),A=A.substring($+1),$=A.indexOf(`
|
||
`);return A.length&&q.push(A),q}function O(A){return A===g.ArrayLiteral}function P(A){return p(A,[g.Expression,g.ForInitializer,g.Conditional])}function F(A,q){for(var $=0;$<A.length;$++){var ce=A[$].trim();if(ce.charAt(0)!==q)return!1}return!0}function V(A,q){for(var $=0,ce=A.length,ye;$<ce;$++)if(ye=A[$],ye&&ye.indexOf(q)!==0)return!1;return!0}function D(A,q){q=q||{},this._source_text=A||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new n(q)}D.prototype.create_flags=function(A,q){var $=0;A&&($=A.indentation_level,!this._output.just_added_newline()&&A.line_indent_level>$&&($=A.line_indent_level));var ce={mode:q,parent:A,last_token:A?A.last_token:new t(h.START_BLOCK,""),last_word:A?A.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:$,alignment:0,line_indent_level:A?A.line_indent_level:$,start_line_index:this._output.get_line_number(),ternary_depth:0};return ce},D.prototype._reset=function(A){var q=A.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new e(this._options,q),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(g.BlockStatement);var $=new o(A,this._options);return this._tokens=$.tokenize(),A},D.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var A,q=this._reset(this._source_text),$=this._options.eol;this._options.eol==="auto"&&($=`
|
||
`,q&&r.lineBreak.test(q||"")&&($=q.match(r.lineBreak)[0]));for(var ce=this._tokens.next();ce;)this.handle_token(ce),this._last_last_text=this._flags.last_token.text,this._flags.last_token=ce,ce=this._tokens.next();return A=this._output.get_code($),A},D.prototype.handle_token=function(A,q){A.type===h.START_EXPR?this.handle_start_expr(A):A.type===h.END_EXPR?this.handle_end_expr(A):A.type===h.START_BLOCK?this.handle_start_block(A):A.type===h.END_BLOCK?this.handle_end_block(A):A.type===h.WORD?this.handle_word(A):A.type===h.RESERVED?this.handle_word(A):A.type===h.SEMICOLON?this.handle_semicolon(A):A.type===h.STRING?this.handle_string(A):A.type===h.EQUALS?this.handle_equals(A):A.type===h.OPERATOR?this.handle_operator(A):A.type===h.COMMA?this.handle_comma(A):A.type===h.BLOCK_COMMENT?this.handle_block_comment(A,q):A.type===h.COMMENT?this.handle_comment(A,q):A.type===h.DOT?this.handle_dot(A):A.type===h.EOF?this.handle_eof(A):A.type===h.UNKNOWN?this.handle_unknown(A,q):this.handle_unknown(A,q)},D.prototype.handle_whitespace_and_comments=function(A,q){var $=A.newlines,ce=this._options.keep_array_indentation&&O(this._flags.mode);if(A.comments_before)for(var ye=A.comments_before.next();ye;)this.handle_whitespace_and_comments(ye,q),this.handle_token(ye,q),ye=A.comments_before.next();if(ce)for(var re=0;re<$;re+=1)this.print_newline(re>0,q);else if(this._options.max_preserve_newlines&&$>this._options.max_preserve_newlines&&($=this._options.max_preserve_newlines),this._options.preserve_newlines&&$>1){this.print_newline(!1,q);for(var ie=1;ie<$;ie+=1)this.print_newline(!0,q)}};var ee=["async","break","continue","return","throw","yield"];return D.prototype.allow_wrap_or_preserved_newline=function(A,q){if(q=q===void 0?!1:q,!this._output.just_added_newline()){var $=this._options.preserve_newlines&&A.newlines||q,ce=p(this._flags.last_token.text,f)||p(A.text,f);if(ce){var ye=p(this._flags.last_token.text,f)&&p(this._options.operator_position,S)||p(A.text,f);$=$&&ye}if($)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(m(this._flags.last_token,ee))return;this._output.set_wrap_point()}}},D.prototype.print_newline=function(A,q){if(!q&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==h.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var $=this._tokens.peek();this._flags.mode===g.Statement&&!(this._flags.if_block&&y($,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(A)&&(this._flags.multiline_frame=!0)},D.prototype.print_token_line_indentation=function(A){this._output.just_added_newline()&&(this._options.keep_array_indentation&&A.newlines&&(A.text==="["||O(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(A.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},D.prototype.print_token=function(A){if(this._output.raw){this._output.add_raw_token(A);return}if(this._options.comma_first&&A.previous&&A.previous.type===h.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var q=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(q),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(A),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(A),this._output.non_breaking_space=!0,this._output.add_token(A.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},D.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},D.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},D.prototype.set_mode=function(A){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,A),this._flags=this.create_flags(this._previous_flags,A),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},D.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===g.Statement&&L(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},D.prototype.start_of_object_property=function(){return this._flags.parent.mode===g.ObjectLiteral&&this._flags.mode===g.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||m(this._flags.last_token,["get","set"]))},D.prototype.start_of_statement=function(A){var q=!1;return q=q||m(this._flags.last_token,["var","let","const"])&&A.type===h.WORD,q=q||y(this._flags.last_token,"do"),q=q||!(this._flags.parent.mode===g.ObjectLiteral&&this._flags.mode===g.Statement)&&m(this._flags.last_token,ee)&&!A.newlines,q=q||y(this._flags.last_token,"else")&&!(y(A,"if")&&!A.comments_before),q=q||this._flags.last_token.type===h.END_EXPR&&(this._previous_flags.mode===g.ForInitializer||this._previous_flags.mode===g.Conditional),q=q||this._flags.last_token.type===h.WORD&&this._flags.mode===g.BlockStatement&&!this._flags.in_case&&!(A.text==="--"||A.text==="++")&&this._last_last_text!=="function"&&A.type!==h.WORD&&A.type!==h.RESERVED,q=q||this._flags.mode===g.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||m(this._flags.last_token,["get","set"])),q?(this.set_mode(g.Statement),this.indent(),this.handle_whitespace_and_comments(A,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(A,m(A,["do","for","if","while"])),!0):!1},D.prototype.handle_start_expr=function(A){this.start_of_statement(A)||this.handle_whitespace_and_comments(A);var q=g.Expression;if(A.text==="["){if(this._flags.last_token.type===h.WORD||this._flags.last_token.text===")"){m(this._flags.last_token,a)&&(this._output.space_before_token=!0),this.print_token(A),this.set_mode(q),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}q=g.ArrayLiteral,O(this._flags.mode)&&(this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline()),p(this._flags.last_token.type,[h.START_EXPR,h.END_EXPR,h.WORD,h.OPERATOR,h.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===h.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,q=g.ForInitializer):p(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,q=g.Conditional):p(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&A.whitespace_before===""?this._output.space_before_token=!1:(p(this._flags.last_token.text,a)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===h.EQUALS||this._flags.last_token.type===h.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(A);else if(this._flags.last_token.type===h.WORD){this._output.space_before_token=!1;var $=this._tokens.peek(-3);if(this._options.space_after_named_function&&$){var ce=this._tokens.peek(-4);m($,["async","function"])||$.text==="*"&&m(ce,["async","function"])?this._output.space_before_token=!0:this._flags.mode===g.ObjectLiteral?($.text==="{"||$.text===","||$.text==="*"&&(ce.text==="{"||ce.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(A);(this._flags.last_token.type===h.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(p(this._last_last_text,["function","yield"])||this._flags.mode===g.ObjectLiteral&&p(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===h.START_BLOCK?this.print_newline():(this._flags.last_token.type===h.END_EXPR||this._flags.last_token.type===h.START_EXPR||this._flags.last_token.type===h.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===h.COMMA)&&this.allow_wrap_or_preserved_newline(A,A.newlines),this.print_token(A),this.set_mode(q),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},D.prototype.handle_end_expr=function(A){for(;this._flags.mode===g.Statement;)this.restore_mode();this.handle_whitespace_and_comments(A),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(A,A.text==="]"&&O(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===h.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(A),this.restore_mode(),L(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===g.Conditional&&(this._previous_flags.mode=g.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},D.prototype.handle_start_block=function(A){this.handle_whitespace_and_comments(A);var q=this._tokens.peek(),$=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===h.END_EXPR?(this.set_mode(g.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(g.BlockStatement):$&&(p($.text,[":",","])&&p(q.type,[h.STRING,h.WORD,h.RESERVED])||p(q.text,["get","set","..."])&&p($.type,[h.WORD,h.RESERVED]))?p(this._last_last_text,["class","interface"])&&!p($.text,[":",","])?this.set_mode(g.BlockStatement):this.set_mode(g.ObjectLiteral):this._flags.last_token.type===h.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(g.BlockStatement):p(this._flags.last_token.type,[h.EQUALS,h.START_EXPR,h.COMMA,h.OPERATOR])||m(this._flags.last_token,["return","throw","import","default"])?this.set_mode(g.ObjectLiteral):this.set_mode(g.BlockStatement),this._flags.last_token&&m(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var ce=!q.comments_before&&q.text==="}",ye=ce&&this._flags.last_word==="function"&&this._flags.last_token.type===h.END_EXPR;if(this._options.brace_preserve_inline){var re=0,ie=null;this._flags.inline_frame=!0;do if(re+=1,ie=this._tokens.peek(re-1),ie.newlines){this._flags.inline_frame=!1;break}while(ie.type!==h.EOF&&!(ie.type===h.END_BLOCK&&ie.opened===A))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&A.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==h.OPERATOR&&(ye||this._flags.last_token.type===h.EQUALS||m(this._flags.last_token,x)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(O(this._previous_flags.mode)&&(this._flags.last_token.type===h.START_EXPR||this._flags.last_token.type===h.COMMA)&&((this._flags.last_token.type===h.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===h.COMMA||this._flags.last_token.type===h.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(A),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==h.OPERATOR&&this._flags.last_token.type!==h.START_EXPR&&(p(this._flags.last_token.type,[h.START_BLOCK,h.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(A),this.indent(),!ce&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},D.prototype.handle_end_block=function(A){for(this.handle_whitespace_and_comments(A);this._flags.mode===g.Statement;)this.restore_mode();var q=this._flags.last_token.type===h.START_BLOCK;this._flags.inline_frame&&!q?this._output.space_before_token=!0:this._options.brace_style==="expand"?q||this.print_newline():q||(O(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(A)},D.prototype.handle_word=function(A){if(A.type===h.RESERVED){if(p(A.text,["set","get"])&&this._flags.mode!==g.ObjectLiteral)A.type=h.WORD;else if(A.text==="import"&&p(this._tokens.peek().text,["(","."]))A.type=h.WORD;else if(p(A.text,["as","from"])&&!this._flags.import_block)A.type=h.WORD;else if(this._flags.mode===g.ObjectLiteral){var q=this._tokens.peek();q.text===":"&&(A.type=h.WORD)}}if(this.start_of_statement(A)?m(this._flags.last_token,["var","let","const"])&&A.type===h.WORD&&(this._flags.declaration_statement=!0):A.newlines&&!P(this._flags.mode)&&(this._flags.last_token.type!==h.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==h.EQUALS&&(this._options.preserve_newlines||!m(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(A),this.print_newline()):this.handle_whitespace_and_comments(A),this._flags.do_block&&!this._flags.do_while)if(y(A,"while")){this._output.space_before_token=!0,this.print_token(A),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&y(A,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===g.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&m(A,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(A),this._flags.in_case=!0;return}if((this._flags.last_token.type===h.COMMA||this._flags.last_token.type===h.START_EXPR||this._flags.last_token.type===h.EQUALS||this._flags.last_token.type===h.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(A)),y(A,"function")){(p(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(p(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===h.OPERATOR))&&!this._output.just_added_blankline()&&!A.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===h.RESERVED||this._flags.last_token.type===h.WORD?m(this._flags.last_token,["get","set","new","export"])||m(this._flags.last_token,ee)?this._output.space_before_token=!0:y(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===h.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(P(this._flags.mode)||O(this._flags.mode))||this.print_newline(),this.print_token(A),this._flags.last_word=A.text;return}var $="NONE";if(this._flags.last_token.type===h.END_BLOCK?this._previous_flags.inline_frame?$="SPACE":m(A,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&A.newlines?$="NEWLINE":($="SPACE",this._output.space_before_token=!0):$="NEWLINE":this._flags.last_token.type===h.SEMICOLON&&this._flags.mode===g.BlockStatement?$="NEWLINE":this._flags.last_token.type===h.SEMICOLON&&P(this._flags.mode)?$="SPACE":this._flags.last_token.type===h.STRING?$="NEWLINE":this._flags.last_token.type===h.RESERVED||this._flags.last_token.type===h.WORD||this._flags.last_token.text==="*"&&(p(this._last_last_text,["function","yield"])||this._flags.mode===g.ObjectLiteral&&p(this._last_last_text,["{",","]))?$="SPACE":this._flags.last_token.type===h.START_BLOCK?this._flags.inline_frame?$="SPACE":$="NEWLINE":this._flags.last_token.type===h.END_EXPR&&(this._output.space_before_token=!0,$="NEWLINE"),m(A,a)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?$="SPACE":$="NEWLINE"),m(A,["else","catch","finally"]))if((!(this._flags.last_token.type===h.END_BLOCK&&this._previous_flags.mode===g.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&A.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var ce=this._output.current_line;ce.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else $==="NEWLINE"?m(this._flags.last_token,x)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&m(A,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==h.END_EXPR?(this._flags.last_token.type!==h.START_EXPR||!m(A,["var","let","const"]))&&this._flags.last_token.text!==":"&&(y(A,"if")&&y(A.previous,"else")?this._output.space_before_token=!0:this.print_newline()):m(A,a)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&O(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():$==="SPACE"&&(this._output.space_before_token=!0);A.previous&&(A.previous.type===h.WORD||A.previous.type===h.RESERVED)&&(this._output.space_before_token=!0),this.print_token(A),this._flags.last_word=A.text,A.type===h.RESERVED&&(A.text==="do"?this._flags.do_block=!0:A.text==="if"?this._flags.if_block=!0:A.text==="import"?this._flags.import_block=!0:this._flags.import_block&&y(A,"from")&&(this._flags.import_block=!1))},D.prototype.handle_semicolon=function(A){this.start_of_statement(A)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(A);for(var q=this._tokens.peek();this._flags.mode===g.Statement&&!(this._flags.if_block&&y(q,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(A)},D.prototype.handle_string=function(A){A.text.startsWith("`")&&A.newlines===0&&A.whitespace_before===""&&(A.previous.text===")"||this._flags.last_token.type===h.WORD)||(this.start_of_statement(A)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(A),this._flags.last_token.type===h.RESERVED||this._flags.last_token.type===h.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===h.COMMA||this._flags.last_token.type===h.START_EXPR||this._flags.last_token.type===h.EQUALS||this._flags.last_token.type===h.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(A):A.text.startsWith("`")&&this._flags.last_token.type===h.END_EXPR&&(A.previous.text==="]"||A.previous.text===")")&&A.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(A)},D.prototype.handle_equals=function(A){this.start_of_statement(A)||this.handle_whitespace_and_comments(A),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(A),this._output.space_before_token=!0},D.prototype.handle_comma=function(A){this.handle_whitespace_and_comments(A,!0),this.print_token(A),this._output.space_before_token=!0,this._flags.declaration_statement?(P(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(A)):this._flags.mode===g.ObjectLiteral||this._flags.mode===g.Statement&&this._flags.parent.mode===g.ObjectLiteral?(this._flags.mode===g.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(A)},D.prototype.handle_operator=function(A){var q=A.text==="*"&&(m(this._flags.last_token,["function","yield"])||p(this._flags.last_token.type,[h.START_BLOCK,h.COMMA,h.END_BLOCK,h.SEMICOLON])),$=p(A.text,["-","+"])&&(p(this._flags.last_token.type,[h.START_BLOCK,h.START_EXPR,h.EQUALS,h.OPERATOR])||p(this._flags.last_token.text,a)||this._flags.last_token.text===",");if(!this.start_of_statement(A)){var ce=!q;this.handle_whitespace_and_comments(A,ce)}if(A.text==="*"&&this._flags.last_token.type===h.DOT){this.print_token(A);return}if(A.text==="::"){this.print_token(A);return}if(this._flags.last_token.type===h.OPERATOR&&p(this._options.operator_position,S)&&this.allow_wrap_or_preserved_newline(A),A.text===":"&&this._flags.in_case){this.print_token(A),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==h.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var ye=!0,re=!0,ie=!1;if(A.text===":"?this._flags.ternary_depth===0?ye=!1:(this._flags.ternary_depth-=1,ie=!0):A.text==="?"&&(this._flags.ternary_depth+=1),!$&&!q&&this._options.preserve_newlines&&p(A.text,f)){var K=A.text===":",X=K&&ie,fe=K&&!ie;switch(this._options.operator_position){case R.before_newline:this._output.space_before_token=!fe,this.print_token(A),(!K||X)&&this.allow_wrap_or_preserved_newline(A),this._output.space_before_token=!0;return;case R.after_newline:this._output.space_before_token=!0,!K||X?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(A):this._output.space_before_token=!1,this.print_token(A),this._output.space_before_token=!0;return;case R.preserve_newline:fe||this.allow_wrap_or_preserved_newline(A),ye=!(this._output.just_added_newline()||fe),this._output.space_before_token=ye,this.print_token(A),this._output.space_before_token=!0;return}}if(q){this.allow_wrap_or_preserved_newline(A),ye=!1;var Me=this._tokens.peek();re=Me&&p(Me.type,[h.WORD,h.RESERVED])}else if(A.text==="...")this.allow_wrap_or_preserved_newline(A),ye=this._flags.last_token.type===h.START_BLOCK,re=!1;else if(p(A.text,["--","++","!","~"])||$){if((this._flags.last_token.type===h.COMMA||this._flags.last_token.type===h.START_EXPR)&&this.allow_wrap_or_preserved_newline(A),ye=!1,re=!1,A.newlines&&(A.text==="--"||A.text==="++"||A.text==="~")){var we=m(this._flags.last_token,x)&&A.newlines;we&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(we,!0)}this._flags.last_token.text===";"&&P(this._flags.mode)&&(ye=!0),this._flags.last_token.type===h.RESERVED?ye=!0:this._flags.last_token.type===h.END_EXPR?ye=!(this._flags.last_token.text==="]"&&(A.text==="--"||A.text==="++")):this._flags.last_token.type===h.OPERATOR&&(ye=p(A.text,["--","-","++","+"])&&p(this._flags.last_token.text,["--","-","++","+"]),p(A.text,["+","-"])&&p(this._flags.last_token.text,["--","++"])&&(re=!0)),(this._flags.mode===g.BlockStatement&&!this._flags.inline_frame||this._flags.mode===g.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||ye,this.print_token(A),this._output.space_before_token=re},D.prototype.handle_block_comment=function(A,q){if(this._output.raw){this._output.add_raw_token(A),A.directives&&A.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(A.directives){this.print_newline(!1,q),this.print_token(A),A.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!r.newline.test(A.text)&&!A.newlines){this._output.space_before_token=!0,this.print_token(A),this._output.space_before_token=!0;return}else this.print_block_commment(A,q)},D.prototype.print_block_commment=function(A,q){var $=G(A.text),ce,ye=!1,re=!1,ie=A.whitespace_before,K=ie.length;if(this.print_newline(!1,q),this.print_token_line_indentation(A),this._output.add_token($[0]),this.print_newline(!1,q),$.length>1){for($=$.slice(1),ye=F($,"*"),re=V($,ie),ye&&(this._flags.alignment=1),ce=0;ce<$.length;ce++)ye?(this.print_token_line_indentation(A),this._output.add_token(v($[ce]))):re&&$[ce]?(this.print_token_line_indentation(A),this._output.add_token($[ce].substring(K))):(this._output.current_line.set_indent(-1),this._output.add_token($[ce])),this.print_newline(!1,q);this._flags.alignment=0}},D.prototype.handle_comment=function(A,q){A.newlines?this.print_newline(!1,q):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(A),this.print_newline(!1,q)},D.prototype.handle_dot=function(A){this.start_of_statement(A)||this.handle_whitespace_and_comments(A,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),m(this._flags.last_token,x)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(A,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(A)},D.prototype.handle_unknown=function(A,q){this.print_token(A),A.text[A.text.length-1]===`
|
||
`&&this.print_newline(!1,q)},D.prototype.handle_eof=function(A){for(;this._flags.mode===g.Statement;)this.restore_mode();this.handle_whitespace_and_comments(A)},zf.Beautifier=D,zf}var Jy;function uA(){if(Jy)return cl.exports;Jy=1;var e=lA().Beautifier,t=Av().Options;function r(n,o){var a=new e(n,o);return a.beautify()}return cl.exports=r,cl.exports.defaultOptions=function(){return new t},cl.exports}var dl={exports:{}},rc={},nc={},Ny;function Lv(){if(Ny)return nc;Ny=1;var e=Uh().Options;function t(r){e.call(this,r,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var n=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||n;var o=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var a=0;a<o.length;a++)o[a]!=="expand"?this.brace_style="collapse":this.brace_style=o[a]}return t.prototype=new e,nc.Options=t,nc}var Oy;function fA(){if(Oy)return rc;Oy=1;var e=Lv().Options,t=Lh().Output,r=Ih().InputScanner,n=Jh().Directives,o=new n(/\/\*/,/\*\//),a=/\r\n|[\r\n]/,f=/\r\n|[\r\n]/g,h=/\s/,p=/(?:\s|\n)+/g,v=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,_=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function y(m,x){this._source_text=m||"",this._options=new e(x),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}return y.prototype.eatString=function(m){var x="";for(this._ch=this._input.next();this._ch;){if(x+=this._ch,this._ch==="\\")x+=this._input.next();else if(m.indexOf(this._ch)!==-1||this._ch===`
|
||
`)break;this._ch=this._input.next()}return x},y.prototype.eatWhitespace=function(m){for(var x=h.test(this._input.peek()),U=0;h.test(this._input.peek());)this._ch=this._input.next(),m&&this._ch===`
|
||
`&&(U===0||U<this._options.max_preserve_newlines)&&(U++,this._output.add_new_line(!0));return x},y.prototype.foundNestedPseudoClass=function(){for(var m=0,x=1,U=this._input.peek(x);U;){if(U==="{")return!0;if(U==="(")m+=1;else if(U===")"){if(m===0)return!1;m-=1}else if(U===";"||U==="}")return!1;x++,U=this._input.peek(x)}return!1},y.prototype.print_string=function(m){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(m)},y.prototype.preserveSingleSpace=function(m){m&&(this._output.space_before_token=!0)},y.prototype.indent=function(){this._indentLevel++},y.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},y.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var m=this._source_text,x=this._options.eol;x==="auto"&&(x=`
|
||
`,m&&a.test(m||"")&&(x=m.match(a)[0])),m=m.replace(f,`
|
||
`);var U=m.match(/^[\t ]*/)[0];this._output=new t(this._options,U),this._input=new r(m),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var R=0,S=!1,g=!1,L=!1,G=!1,O=!1,P=this._ch,F=!1,V,D,ee;V=this._input.read(p),D=V!=="",ee=P,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),P=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var A=this._input.read(v),q=o.get_directives(A);q&&q.ignore==="start"&&(A+=o.readIgnored(this._input)),this.print_string(A),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(_)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(D),this.print_string(this._ch);var $=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);$.match(/[ :]$/)&&($=this.eatString(": ").replace(/\s$/,""),this.print_string($),this._output.space_before_token=!0),$=$.replace(/\s$/,""),R===0&&$.indexOf(":")!==-1&&(g=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(D),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var ce=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ce.match(/[ :]$/)&&(ce=this.eatString(": ").replace(/\s$/,""),this.print_string(ce),this._output.space_before_token=!0),ce=ce.replace(/\s$/,""),R===0&&ce.indexOf(":")!==-1?(g=!0,this.indent()):ce in this.NESTED_AT_RULE?(this._nestedLevel+=1,ce in this.CONDITIONAL_GROUP_RULE&&(L=!0)):R===0&&!g&&(G=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(D),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")g&&(g=!1,this.outdent()),G=!1,L?(L=!1,S=this._indentLevel>=this._nestedLevel):S=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&S&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(ee==="("?this._output.space_before_token=!1:ee!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),ee==="{"&&this._output.trim(!0),g&&(this.outdent(),g=!1),this.print_string(this._ch),S=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var ye=0;ye<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;ye++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[ye])){F=!0;break}(S||L)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!G&&R===0?(this.print_string(":"),g||(g=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var re=ee==='"'||ee==="'";this.preserveSingleSpace(re||D),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")F=!1,R===0?(g&&(this.outdent(),g=!1),G=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),R++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),R&&(R--,this.outdent()));else{var ie=!1;this._input.lookBack("with")&&(ie=!0),this.preserveSingleSpace(D||ie),this.print_string(this._ch),g&&ee==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),O=!0):(this.eatWhitespace(),R++,this.indent())}else if(this._ch===")")R&&(R--,this.outdent()),O&&this._input.peek()===";"&&this._options.selector_separator_newline&&(O=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!g||O)&&R===0&&!G?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!g&&R===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&h.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(D),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),h.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var K=ee==='"'||ee==="'";this.preserveSingleSpace(K||D),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
||
`&&F&&this._output.add_new_line()}var X=this._output.get_code(x);return X},rc.Beautifier=y,rc}var By;function cA(){if(By)return dl.exports;By=1;var e=fA().Beautifier,t=Lv().Options;function r(n,o){var a=new e(n,o);return a.beautify()}return dl.exports=r,dl.exports.defaultOptions=function(){return new t},dl.exports}var gl={exports:{}},sc={},oc={},Fy;function Uv(){if(Fy)return oc;Fy=1;var e=Uh().Options;function t(r){e.call(this,r,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_min_attrs=this._get_number("wrap_attributes_min_attrs",2),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}return t.prototype=new e,oc.Options=t,oc}var yl={},Dy;function jy(){if(Dy)return yl;Dy=1;var e=Gl().Tokenizer,t=Gl().TOKEN,r=Jh().Directives,n=Rv().TemplatablePattern,o=fu().Pattern,a={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:t.START,RAW:t.RAW,EOF:t.EOF},f=new r(/<\!--/,/-->/),h=function(p,v){e.call(this,p,v),this._current_tag_name="";var _=new n(this._input).read_options(this._options),y=new o(this._input);if(this.__patterns={word:_.until(/[\n\r\t <]/),single_quote:_.until_after(/'/),double_quote:_.until_after(/"/),attribute:_.until(/[\n\r\t =>]|\/>/),element_name:_.until(/[\n\r\t >\/]/),handlebars_comment:y.starting_with(/{{!--/).until_after(/--}}/),handlebars:y.starting_with(/{{/).until_after(/}}/),handlebars_open:y.until(/[\n\r\t }]/),handlebars_raw_close:y.until(/}}/),comment:y.starting_with(/<!--/).until_after(/-->/),cdata:y.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:y.starting_with(/<!\[/).until_after(/]>/),processing:y.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var m=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=y.matching(m).until_after(m)}};return h.prototype=new e,h.prototype._is_comment=function(p){return!1},h.prototype._is_opening=function(p){return p.type===a.TAG_OPEN},h.prototype._is_closing=function(p,v){return p.type===a.TAG_CLOSE&&v&&((p.text===">"||p.text==="/>")&&v.text[0]==="<"||p.text==="}}"&&v.text[0]==="{"&&v.text[1]==="{")},h.prototype._reset=function(){this._current_tag_name=""},h.prototype._get_next_token=function(p,v){var _=null;this._readWhitespace();var y=this._input.peek();return y===null?this._create_token(a.EOF,""):(_=_||this._read_open_handlebars(y,v),_=_||this._read_attribute(y,p,v),_=_||this._read_close(y,v),_=_||this._read_raw_content(y,p,v),_=_||this._read_content_word(y),_=_||this._read_comment_or_cdata(y),_=_||this._read_processing(y),_=_||this._read_open(y,v),_=_||this._create_token(a.UNKNOWN,this._input.next()),_)},h.prototype._read_comment_or_cdata=function(p){var v=null,_=null,y=null;if(p==="<"){var m=this._input.peek(1);m==="!"&&(_=this.__patterns.comment.read(),_?(y=f.get_directives(_),y&&y.ignore==="start"&&(_+=f.readIgnored(this._input))):_=this.__patterns.cdata.read()),_&&(v=this._create_token(a.COMMENT,_),v.directives=y)}return v},h.prototype._read_processing=function(p){var v=null,_=null,y=null;if(p==="<"){var m=this._input.peek(1);(m==="!"||m==="?")&&(_=this.__patterns.conditional_comment.read(),_=_||this.__patterns.processing.read()),_&&(v=this._create_token(a.COMMENT,_),v.directives=y)}return v},h.prototype._read_open=function(p,v){var _=null,y=null;return v||p==="<"&&(_=this._input.next(),this._input.peek()==="/"&&(_+=this._input.next()),_+=this.__patterns.element_name.read(),y=this._create_token(a.TAG_OPEN,_)),y},h.prototype._read_open_handlebars=function(p,v){var _=null,y=null;return v||this._options.indent_handlebars&&p==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(_=this.__patterns.handlebars_comment.read(),_=_||this.__patterns.handlebars.read(),y=this._create_token(a.COMMENT,_)):(_=this.__patterns.handlebars_open.read(),y=this._create_token(a.TAG_OPEN,_))),y},h.prototype._read_close=function(p,v){var _=null,y=null;return v&&(v.text[0]==="<"&&(p===">"||p==="/"&&this._input.peek(1)===">")?(_=this._input.next(),p==="/"&&(_+=this._input.next()),y=this._create_token(a.TAG_CLOSE,_)):v.text[0]==="{"&&p==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),y=this._create_token(a.TAG_CLOSE,"}}"))),y},h.prototype._read_attribute=function(p,v,_){var y=null,m="";if(_&&_.text[0]==="<")if(p==="=")y=this._create_token(a.EQUALS,this._input.next());else if(p==='"'||p==="'"){var x=this._input.next();p==='"'?x+=this.__patterns.double_quote.read():x+=this.__patterns.single_quote.read(),y=this._create_token(a.VALUE,x)}else m=this.__patterns.attribute.read(),m&&(v.type===a.EQUALS?y=this._create_token(a.VALUE,m):y=this._create_token(a.ATTRIBUTE,m));return y},h.prototype._is_content_unformatted=function(p){return this._options.void_elements.indexOf(p)===-1&&(this._options.content_unformatted.indexOf(p)!==-1||this._options.unformatted.indexOf(p)!==-1)},h.prototype._read_raw_content=function(p,v,_){var y="";if(_&&_.text[0]==="{")y=this.__patterns.handlebars_raw_close.read();else if(v.type===a.TAG_CLOSE&&v.opened.text[0]==="<"&&v.text[0]!=="/"){var m=v.opened.text.substr(1).toLowerCase();if(m==="script"||m==="style"){var x=this._read_comment_or_cdata(p);if(x)return x.type=a.TEXT,x;y=this._input.readUntil(new RegExp("</"+m+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(m)&&(y=this._input.readUntil(new RegExp("</"+m+"[\\n\\r\\t ]*?>","ig")))}return y?this._create_token(a.TEXT,y):null},h.prototype._read_content_word=function(p){var v="";if(this._options.unformatted_content_delimiter&&p===this._options.unformatted_content_delimiter[0]&&(v=this.__patterns.unformatted_content_delimiter.read()),v||(v=this.__patterns.word.read()),v)return this._create_token(a.TEXT,v)},yl.Tokenizer=h,yl.TOKEN=a,yl}var Py;function hA(){if(Py)return sc;Py=1;var e=Uv().Options,t=Lh().Output,r=jy().Tokenizer,n=jy().TOKEN,o=/\r\n|[\r\n]/,a=/\r\n|[\r\n]/g,f=function(S,g){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=S.max_preserve_newlines,this.preserve_newlines=S.preserve_newlines,this._output=new t(S,g)};f.prototype.current_line_has_match=function(S){return this._output.current_line.has_match(S)},f.prototype.set_space_before_token=function(S,g){this._output.space_before_token=S,this._output.non_breaking_space=g},f.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},f.prototype.add_raw_token=function(S){this._output.add_raw_token(S)},f.prototype.print_preserved_newlines=function(S){var g=0;S.type!==n.TEXT&&S.previous.type!==n.TEXT&&(g=S.newlines?1:0),this.preserve_newlines&&(g=S.newlines<this.max_preserve_newlines+1?S.newlines:this.max_preserve_newlines+1);for(var L=0;L<g;L++)this.print_newline(L>0);return g!==0},f.prototype.traverse_whitespace=function(S){return S.whitespace_before||S.newlines?(this.print_preserved_newlines(S)||(this._output.space_before_token=!0),!0):!1},f.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},f.prototype.print_newline=function(S){this._output.add_new_line(S)},f.prototype.print_token=function(S){S.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(S.text))},f.prototype.indent=function(){this.indent_level++},f.prototype.get_full_indent=function(S){return S=this.indent_level+(S||0),S<1?"":this._output.get_indent_string(S)};var h=function(S){for(var g=null,L=S.next;L.type!==n.EOF&&S.closed!==L;){if(L.type===n.ATTRIBUTE&&L.text==="type"){L.next&&L.next.type===n.EQUALS&&L.next.next&&L.next.next.type===n.VALUE&&(g=L.next.next.text);break}L=L.next}return g},p=function(S,g){var L=null,G=null;return g.closed?(S==="script"?L="text/javascript":S==="style"&&(L="text/css"),L=h(g)||L,L.search("text/css")>-1?G="css":L.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?G="javascript":L.search(/(text|application|dojo)\/(x-)?(html)/)>-1?G="html":L.search(/test\/null/)>-1&&(G="null"),G):null};function v(S,g){return g.indexOf(S)!==-1}function _(S,g,L){this.parent=S||null,this.tag=g?g.tag_name:"",this.indent_level=L||0,this.parser_token=g||null}function y(S){this._printer=S,this._current_frame=null}y.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},y.prototype.record_tag=function(S){var g=new _(this._current_frame,S,this._printer.indent_level);this._current_frame=g},y.prototype._try_pop_frame=function(S){var g=null;return S&&(g=S.parser_token,this._printer.indent_level=S.indent_level,this._current_frame=S.parent),g},y.prototype._get_frame=function(S,g){for(var L=this._current_frame;L&&S.indexOf(L.tag)===-1;){if(g&&g.indexOf(L.tag)!==-1){L=null;break}L=L.parent}return L},y.prototype.try_pop=function(S,g){var L=this._get_frame([S],g);return this._try_pop_frame(L)},y.prototype.indent_to_tag=function(S){var g=this._get_frame(S);g&&(this._printer.indent_level=g.indent_level)};function m(S,g,L,G){this._source_text=S||"",g=g||{},this._js_beautify=L,this._css_beautify=G,this._tag_stack=null;var O=new e(g,"html");this._options=O,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,5)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,8)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}m.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var S=this._source_text,g=this._options.eol;this._options.eol==="auto"&&(g=`
|
||
`,S&&o.test(S)&&(g=S.match(o)[0])),S=S.replace(a,`
|
||
`);var L=S.match(/^[\t ]*/)[0],G={text:"",type:""},O=new x,P=new f(this._options,L),F=new r(S,this._options).tokenize();this._tag_stack=new y(P);for(var V=null,D=F.next();D.type!==n.EOF;)D.type===n.TAG_OPEN||D.type===n.COMMENT?(V=this._handle_tag_open(P,D,O,G,F),O=V):D.type===n.ATTRIBUTE||D.type===n.EQUALS||D.type===n.VALUE||D.type===n.TEXT&&!O.tag_complete?V=this._handle_inside_tag(P,D,O,G):D.type===n.TAG_CLOSE?V=this._handle_tag_close(P,D,O):D.type===n.TEXT?V=this._handle_text(P,D,O):P.add_raw_token(D),G=V,D=F.next();var ee=P._output.get_code(g);return ee},m.prototype._handle_tag_close=function(S,g,L){var G={text:g.text,type:g.type};return S.alignment_size=0,L.tag_complete=!0,S.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),L.is_unformatted?S.add_raw_token(g):(L.tag_start_char==="<"&&(S.set_space_before_token(g.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&L.has_wrapped_attrs&&S.print_newline(!1)),S.print_token(g)),L.indent_content&&!(L.is_unformatted||L.is_content_unformatted)&&(S.indent(),L.indent_content=!1),!L.is_inline_element&&!(L.is_unformatted||L.is_content_unformatted)&&S.set_wrap_point(),G},m.prototype._handle_inside_tag=function(S,g,L,G){var O=L.has_wrapped_attrs,P={text:g.text,type:g.type};return S.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),L.is_unformatted?S.add_raw_token(g):L.tag_start_char==="{"&&g.type===n.TEXT?S.print_preserved_newlines(g)?(g.newlines=0,S.add_raw_token(g)):S.print_token(g):(g.type===n.ATTRIBUTE?S.set_space_before_token(!0):(g.type===n.EQUALS||g.type===n.VALUE&&g.previous.type===n.EQUALS)&&S.set_space_before_token(!1),g.type===n.ATTRIBUTE&&L.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(S.traverse_whitespace(g),O=O||g.newlines!==0),this._is_wrap_attributes_force&&L.attr_count>=this._options.wrap_attributes_min_attrs&&(G.type!==n.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(S.print_newline(!1),O=!0)),S.print_token(g),O=O||S.previous_token_wrapped(),L.has_wrapped_attrs=O),P},m.prototype._handle_text=function(S,g,L){var G={text:g.text,type:"TK_CONTENT"};return L.custom_beautifier_name?this._print_custom_beatifier_text(S,g,L):L.is_unformatted||L.is_content_unformatted?S.add_raw_token(g):(S.traverse_whitespace(g),S.print_token(g)),G},m.prototype._print_custom_beatifier_text=function(S,g,L){var G=this;if(g.text!==""){var O=g.text,P,F=1,V="",D="";L.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?P=this._js_beautify:L.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?P=this._css_beautify:L.custom_beautifier_name==="html"&&(P=function(ye,re){var ie=new m(ye,re,G._js_beautify,G._css_beautify);return ie.beautify()}),this._options.indent_scripts==="keep"?F=0:this._options.indent_scripts==="separate"&&(F=-S.indent_level);var ee=S.get_full_indent(F);if(O=O.replace(/\n[ \t]*$/,""),L.custom_beautifier_name!=="html"&&O[0]==="<"&&O.match(/^(<!--|<!\[CDATA\[)/)){var A=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(O);if(!A){S.add_raw_token(g);return}V=ee+A[1]+`
|
||
`,O=A[4],A[5]&&(D=ee+A[5]),O=O.replace(/\n[ \t]*$/,""),(A[2]||A[3].indexOf(`
|
||
`)!==-1)&&(A=A[3].match(/[ \t]+$/),A&&(g.whitespace_before=A[0]))}if(O)if(P){var q=function(){this.eol=`
|
||
`};q.prototype=this._options.raw_options;var $=new q;O=P(ee+O,$)}else{var ce=g.whitespace_before;ce&&(O=O.replace(new RegExp(`
|
||
(`+ce+")?","g"),`
|
||
`)),O=ee+O.replace(/\n/g,`
|
||
`+ee)}V&&(O?O=V+O+`
|
||
`+D:O=V+D),S.print_newline(!1),O&&(g.text=O,g.whitespace_before="",g.newlines=0,S.add_raw_token(g),S.print_newline(!0))}},m.prototype._handle_tag_open=function(S,g,L,G,O){var P=this._get_tag_open_token(g);if((L.is_unformatted||L.is_content_unformatted)&&!L.is_empty_element&&g.type===n.TAG_OPEN&&!P.is_start_tag?(S.add_raw_token(g),P.start_tag_token=this._tag_stack.try_pop(P.tag_name)):(S.traverse_whitespace(g),this._set_tag_position(S,g,P,L,G),P.is_inline_element||S.set_wrap_point(),S.print_token(g)),P.is_start_tag&&this._is_wrap_attributes_force){var F=0,V;do V=O.peek(F),V.type===n.ATTRIBUTE&&(P.attr_count+=1),F+=1;while(V.type!==n.EOF&&V.type!==n.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(P.alignment_size=g.text.length+1),!P.tag_complete&&!P.is_unformatted&&(S.alignment_size=P.alignment_size),P};var x=function(S,g){if(this.parent=S||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!g)this.tag_complete=!0;else{var L;this.tag_start_char=g.text[0],this.text=g.text,this.tag_start_char==="<"?(L=g.text.match(/^<([^\s>]*)/),this.tag_check=L?L[1]:""):(L=g.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=L?L[1]:"",(g.text.startsWith("{{#>")||g.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&g.next!==null?this.tag_check=g.next.text.split(" ")[0]:this.tag_check=g.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),g.type===n.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||g.closed&&g.closed.text==="/>";var G=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(G=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(G)))}};m.prototype._get_tag_open_token=function(S){var g=new x(this._tag_stack.get_parser_token(),S);return g.alignment_size=this._options.wrap_attributes_indent_size,g.is_end_tag=g.is_end_tag||v(g.tag_check,this._options.void_elements),g.is_empty_element=g.tag_complete||g.is_start_tag&&g.is_end_tag,g.is_unformatted=!g.tag_complete&&v(g.tag_check,this._options.unformatted),g.is_content_unformatted=!g.is_empty_element&&v(g.tag_check,this._options.content_unformatted),g.is_inline_element=v(g.tag_name,this._options.inline)||g.tag_name.includes("-")||g.tag_start_char==="{",g},m.prototype._set_tag_position=function(S,g,L,G,O){if(L.is_empty_element||(L.is_end_tag?L.start_tag_token=this._tag_stack.try_pop(L.tag_name):(this._do_optional_end_element(L)&&(L.is_inline_element||S.print_newline(!1)),this._tag_stack.record_tag(L),(L.tag_name==="script"||L.tag_name==="style")&&!(L.is_unformatted||L.is_content_unformatted)&&(L.custom_beautifier_name=p(L.tag_check,g)))),v(L.tag_check,this._options.extra_liners)&&(S.print_newline(!1),S._output.just_added_blankline()||S.print_newline(!0)),L.is_empty_element){if(L.tag_start_char==="{"&&L.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),L.indent_content=!0;var P=S.current_line_has_match(/{{#if/);P||S.print_newline(!1)}L.tag_name==="!--"&&O.type===n.TAG_CLOSE&&G.is_end_tag&&L.text.indexOf(`
|
||
`)===-1||(L.is_inline_element||L.is_unformatted||S.print_newline(!1),this._calcluate_parent_multiline(S,L))}else if(L.is_end_tag){var F=!1;F=L.start_tag_token&&L.start_tag_token.multiline_content,F=F||!L.is_inline_element&&!(G.is_inline_element||G.is_unformatted)&&!(O.type===n.TAG_CLOSE&&L.start_tag_token===G)&&O.type!=="TK_CONTENT",(L.is_content_unformatted||L.is_unformatted)&&(F=!1),F&&S.print_newline(!1)}else L.indent_content=!L.custom_beautifier_name,L.tag_start_char==="<"&&(L.tag_name==="html"?L.indent_content=this._options.indent_inner_html:L.tag_name==="head"?L.indent_content=this._options.indent_head_inner_html:L.tag_name==="body"&&(L.indent_content=this._options.indent_body_inner_html)),!(L.is_inline_element||L.is_unformatted)&&(O.type!=="TK_CONTENT"||L.is_content_unformatted)&&S.print_newline(!1),this._calcluate_parent_multiline(S,L)},m.prototype._calcluate_parent_multiline=function(S,g){g.parent&&S._output.just_added_newline()&&!((g.is_inline_element||g.is_unformatted)&&g.parent.is_inline_element)&&(g.parent.multiline_content=!0)};var U=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],R=["a","audio","del","ins","map","noscript","video"];return m.prototype._do_optional_end_element=function(S){var g=null;if(!(S.is_empty_element||!S.is_start_tag||!S.parent)){if(S.tag_name==="body")g=g||this._tag_stack.try_pop("head");else if(S.tag_name==="li")g=g||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(S.tag_name==="dd"||S.tag_name==="dt")g=g||this._tag_stack.try_pop("dt",["dl"]),g=g||this._tag_stack.try_pop("dd",["dl"]);else if(S.parent.tag_name==="p"&&U.indexOf(S.tag_name)!==-1){var L=S.parent.parent;(!L||R.indexOf(L.tag_name)===-1)&&(g=g||this._tag_stack.try_pop("p"))}else S.tag_name==="rp"||S.tag_name==="rt"?(g=g||this._tag_stack.try_pop("rt",["ruby","rtc"]),g=g||this._tag_stack.try_pop("rp",["ruby","rtc"])):S.tag_name==="optgroup"?g=g||this._tag_stack.try_pop("optgroup",["select"]):S.tag_name==="option"?g=g||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):S.tag_name==="colgroup"?g=g||this._tag_stack.try_pop("caption",["table"]):S.tag_name==="thead"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"])):S.tag_name==="tbody"||S.tag_name==="tfoot"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"]),g=g||this._tag_stack.try_pop("thead",["table"]),g=g||this._tag_stack.try_pop("tbody",["table"])):S.tag_name==="tr"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"]),g=g||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(S.tag_name==="th"||S.tag_name==="td")&&(g=g||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),g=g||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return S.parent=this._tag_stack.get_parser_token(),g}},sc.Beautifier=m,sc}var Gy;function pA(){if(Gy)return gl.exports;Gy=1;var e=hA().Beautifier,t=Uv().Options;function r(n,o,a,f){var h=new e(n,o,a,f);return h.beautify()}return gl.exports=r,gl.exports.defaultOptions=function(){return new t},gl.exports}var Wy;function dA(){if(Wy)return xo;Wy=1;var e=uA(),t=cA(),r=pA();function n(o,a,f,h){return f=f||e,h=h||t,r(o,a,f,h)}return n.defaultOptions=r.defaultOptions,xo.js=e,xo.css=t,xo.html=n,xo}(function(e){function t(r,n,o){var a=function(f,h){return r.js_beautify(f,h)};return a.js=r.js_beautify,a.css=n.css_beautify,a.html=o.html_beautify,a.js_beautify=r.js_beautify,a.css_beautify=n.css_beautify,a.html_beautify=o.html_beautify,a}(function(r){var n=dA();n.js_beautify=n.js,n.css_beautify=n.css,n.html_beautify=n.html,r.exports=t(n,n,n)})(e)})(Tv);var gA=Tv.exports;const yA=Mi(gA);let mA=class extends p1{constructor(t){super(),console.log("*** Editor class created"),this.mutator=new sA(this);const r={};Object.entries(ak).forEach(([o,a])=>r[o]=()=>{a=="editor: eval block"?this.emit("repl: eval",this.getCurrentBlock().text):a=="editor: eval line"?this.emit("repl: eval",this.getLine()):a=="editor:toggleComment"?(this.cm.toggleComment(),this.emit(a,this)):a==="editor:formatCode"?this.formatCode():a=="gallery:saveToURL"?this.emit("editor: save to URL",this.cm.getValue()):this.emit(a,this)});const n={theme:"tomorrow-night-eighties",value:"hello",mode:{name:"javascript",globalVars:!0},lineWrapping:!0,styleSelectedText:!0,extraKeys:r};this.cm=ok.fromTextArea(t,n),window.cm=this.cm,this.cm.refresh()}clear(){this.cm.setValue(`
|
||
|
||
// Type some code on a new line (such as "osc().out()"), and press CTRL+shift+enter`)}setValue(t){this.cm.setValue(t)}getValue(){return this.cm.getValue()}formatCode(){const t=yA(this.cm.getValue(),{indent_size:2,break_chained_methods:!0,indent_with_tabs:!0});this.cm.setValue(t)}addCodeToTop(t=""){const r=this.cm.getValue(),n=`
|
||
${t}
|
||
|
||
${r}
|
||
`;this.cm.setValue(n)}toggle(){this.isShowing?this.hide():this.show()}getLine(){var t=this.cm.getCursor(),r=this.cm.getLine(t.line);return this.flashCode({line:t.line,ch:0},{line:t.line+1,ch:0}),r}flashCode(t,r){t||(t={line:this.cm.firstLine(),ch:0}),r||(r={line:this.cm.lastLine()+1,ch:0});var n=this.cm.markText(t,r,{className:"styled-background"});setTimeout(()=>n.clear(),300)}getCurrentBlock(){for(var t=this.cm,r=t.getCursor(),n=r.line,o=r.line;n>0&&t.getLine(n)!=="";)n--;for(;o<t.lineCount()&&t.getLine(o)!=="";)o++;var a={line:n,ch:0},f={line:o,ch:0},h=t.getRange(a,f);return this.flashCode(a,f),{start:a,end:f,text:h}}};class vA extends Xm{constructor(t,r,n){super(t),this.local=r.components[t]={},r.editor=this,this.emit=n}load(t){nA.init(this.logElement),this.editor=new mA(this.textEl),this.editor.on("*",(r,n)=>{this.emit(r,n)}),this.innerText=document.getElementsByClassName("CodeMirror")[0],this.innerText.style.transition="opacity 0.5s"}hide(){this.innerText.style.opacity=0,this.logElement.style.opacity=0}show(){this.innerText.style.opacity=1,this.innerText.style.pointerEvents="all",this.logElement.style.opacity=1}update(t){t.showInfo===!0&&t.showExtensions===!1||t.showUI===!1?this.hide():this.show();const r=t.errorMessage,n=t.isError?"log-error":"";return this.logElement.innerHTML=` >> <span class=${n}> ${r} </span> `,!1}createElement({width:t=window.innerWidth,height:r=window.innerHeight}={}){return this.textEl=At` <textarea></textarea>`,this.logElement=At`<div class="console cm-s-tomorrow-night-eighties"></div>`,At`<div id="editor-container" style="display:flex;flex-direction:column;">
|
||
<div style="position:relative;flex:auto;padding:15px">${this.textEl}</div>
|
||
${this.logElement}
|
||
</div>`}}function Iv(e,t){return At`
|
||
<body>
|
||
<div id="hydra-ui">
|
||
${e.cache(nk,"hydra-canvas").render(e,t)}
|
||
<!---<canvas id="audio-canvas">
|
||
</canvas>--->
|
||
</div>
|
||
${gM(e,t)}
|
||
${e.cache(vA,"editor").render(e,t)}
|
||
</body>
|
||
`}const $r=S1();$r.use(C1);$r.use(Tb);$r.use(NS);$r.use(Sb);$r.use(Cb);$r.route("/",Iv);$r.route("/dev",Iv);$r.mount("body");
|