Sub-Store/backend/sub-store.min.js
Peng-YM 2c4e47166d feat (restful): Add /api/utils/refresh
The API call does the following:
- Fetch GitHub avatar and update artifact store url
- Revoke all cached resources
2022-07-11 23:06:49 +08:00

16 lines
537 KiB
JavaScript

/**
* ███████╗██╗ ██╗██████╗ ███████╗████████╗ ██████╗ ██████╗ ███████╗
* ██╔════╝██║ ██║██╔══██╗ ██╔════╝╚══██╔══╝██╔═══██╗██╔══██╗██╔════╝
* ███████╗██║ ██║██████╔╝█████╗███████╗ ██║ ██║ ██║██████╔╝█████╗
* ╚════██║██║ ██║██╔══██╗╚════╝╚════██║ ██║ ██║ ██║██╔══██╗██╔══╝
* ███████║╚██████╔╝██████╔╝ ███████║ ██║ ╚██████╔╝██║ ██║███████╗
* ╚══════╝ ╚═════╝ ╚═════╝ ╚══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝
* Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket!
* @updated: 2022/7/11 23:06:15
* @version: 2.10.0
* @author: Peng-YM
* @github: https://github.com/Peng-YM/Sub-Store
* @documentation: https://www.notion.so/Sub-Store-6259586994d34c11a4ced5c406264b46
*/
!function(){var createModuleFactory=function(t){var e;return function(r){return e||t(e={exports:{},parent:r},e.exports),e.exports}},_$buffer_2=createModuleFactory((function(t,e){(function(t){(function(){"use strict";e.Buffer=r,e.SlowBuffer=function(t){return+t!=t&&(t=0),r.alloc(+t)},e.INSPECT_MAX_BYTES=50;function t(t){if(t>2147483647)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return e.__proto__=r.prototype,e}function r(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return a(t)}return n(t,e,r)}function n(e,n,o){if("string"==typeof e)return function(e,n){if("string"==typeof n&&""!==n||(n="utf8"),!r.isEncoding(n))throw new TypeError("Unknown encoding: "+n);var o=0|s(e,n),a=t(o),i=a.write(e,n);return i!==o&&(a=a.slice(0,i)),a}(e,n);if(ArrayBuffer.isView(e))return i(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(I(e,ArrayBuffer)||e&&I(e.buffer,ArrayBuffer))return function(t,e,n){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(n||0))throw new RangeError('"length" is outside of buffer bounds');var o;return(o=void 0===e&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,e):new Uint8Array(t,e,n)).__proto__=r.prototype,o}(e,n,o);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var a=e.valueOf&&e.valueOf();if(null!=a&&a!==e)return r.from(a,n,o);var c=function(e){if(r.isBuffer(e)){var n=0|u(e.length),o=t(n);return 0===o.length||e.copy(o,0,0,n),o}return void 0!==e.length?"number"!=typeof e.length||k(e.length)?t(0):i(e):"Buffer"===e.type&&Array.isArray(e.data)?i(e.data):void 0}(e);if(c)return c;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return r.from(e[Symbol.toPrimitive]("string"),n,o);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function o(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function a(e){return o(e),t(e<0?0:0|u(e))}function i(e){for(var r=e.length<0?0:0|u(e.length),n=t(r),o=0;o<r;o+=1)n[o]=255&e[o];return n}function u(t){if(t>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647..toString(16)+" bytes");return 0|t}function s(t,e){if(r.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||I(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var n=t.length,o=arguments.length>2&&!0===arguments[2];if(!o&&0===n)return 0;for(var a=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return R(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return L(t).length;default:if(a)return o?-1:R(t).length;e=(""+e).toLowerCase(),a=!0}}function c(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function l(t,e,n,o,a){if(0===t.length)return-1;if("string"==typeof n?(o=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),k(n=+n)&&(n=a?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(a)return-1;n=t.length-1}else if(n<0){if(!a)return-1;n=0}if("string"==typeof e&&(e=r.from(e,o)),r.isBuffer(e))return 0===e.length?-1:p(t,e,n,o,a);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):p(t,[e],n,o,a);throw new TypeError("val must be string, number or Buffer")}function p(t,e,r,n,o){var a,i=1,u=t.length,s=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;i=2,u/=2,s/=2,r/=2}function c(t,e){return 1===i?t[e]:t.readUInt16BE(e*i)}if(o){var l=-1;for(a=r;a<u;a++)if(c(t,a)===c(e,-1===l?0:a-l)){if(-1===l&&(l=a),a-l+1===s)return l*i}else-1!==l&&(a-=a-l),l=-1}else for(r+s>u&&(r=u-s),a=r;a>=0;a--){for(var p=!0,f=0;f<s;f++)if(c(t,a+f)!==c(e,f)){p=!1;break}if(p)return a}return-1}function f(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;var a=e.length;n>a/2&&(n=a/2);for(var i=0;i<n;++i){var u=parseInt(e.substr(2*i,2),16);if(k(u))return i;t[r+i]=u}return i}function _(t,e,r,n){return T(R(e,t.length-r),t,r,n)}function h(t,e,r,n){return T(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function d(t,e,r,n){return h(t,e,r,n)}function y(t,e,r,n){return T(L(e),t,r,n)}function v(t,e,r,n){return T(function(t,e){for(var r,n,o,a=[],i=0;i<t.length&&!((e-=2)<0);++i)n=(r=t.charCodeAt(i))>>8,o=r%256,a.push(o),a.push(n);return a}(e,t.length-r),t,r,n)}function g(t,e,r){return 0===e&&r===t.length?_$base64Js_1.fromByteArray(t):_$base64Js_1.fromByteArray(t.slice(e,r))}function m(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var a,i,u,s,c=t[o],l=null,p=c>239?4:c>223?3:c>191?2:1;if(o+p<=r)switch(p){case 1:c<128&&(l=c);break;case 2:128==(192&(a=t[o+1]))&&(s=(31&c)<<6|63&a)>127&&(l=s);break;case 3:a=t[o+1],i=t[o+2],128==(192&a)&&128==(192&i)&&(s=(15&c)<<12|(63&a)<<6|63&i)>2047&&(s<55296||s>57343)&&(l=s);break;case 4:a=t[o+1],i=t[o+2],u=t[o+3],128==(192&a)&&128==(192&i)&&128==(192&u)&&(s=(15&c)<<18|(63&a)<<12|(63&i)<<6|63&u)>65535&&s<1114112&&(l=s)}null===l?(l=65533,p=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=p}return function(t){var e=t.length;if(e<=b)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=b));return r}(n)}e.kMaxLength=2147483647,r.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(e){return!1}}(),r.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||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."),Object.defineProperty(r.prototype,"parent",{enumerable:!0,get:function(){if(r.isBuffer(this))return this.buffer}}),Object.defineProperty(r.prototype,"offset",{enumerable:!0,get:function(){if(r.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&r[Symbol.species]===r&&Object.defineProperty(r,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),r.poolSize=8192,r.from=function(t,e,r){return n(t,e,r)},r.prototype.__proto__=Uint8Array.prototype,r.__proto__=Uint8Array,r.alloc=function(e,r,n){return function(e,r,n){return o(e),e<=0?t(e):void 0!==r?"string"==typeof n?t(e).fill(r,n):t(e).fill(r):t(e)}(e,r,n)},r.allocUnsafe=function(t){return a(t)},r.allocUnsafeSlow=function(t){return a(t)},r.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==r.prototype},r.compare=function(t,e){if(I(t,Uint8Array)&&(t=r.from(t,t.offset,t.byteLength)),I(e,Uint8Array)&&(e=r.from(e,e.offset,e.byteLength)),!r.isBuffer(t)||!r.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var n=t.length,o=e.length,a=0,i=Math.min(n,o);a<i;++a)if(t[a]!==e[a]){n=t[a],o=e[a];break}return n<o?-1:o<n?1:0},r.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}},r.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return r.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var o=r.allocUnsafe(e),a=0;for(n=0;n<t.length;++n){var i=t[n];if(I(i,Uint8Array)&&(i=r.from(i)),!r.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(o,a),a+=i.length}return o},r.byteLength=s,r.prototype._isBuffer=!0,r.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 e=0;e<t;e+=2)c(this,e,e+1);return this},r.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 e=0;e<t;e+=4)c(this,e,e+3),c(this,e+1,e+2);return this},r.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 e=0;e<t;e+=8)c(this,e,e+7),c(this,e+1,e+6),c(this,e+2,e+5),c(this,e+3,e+4);return this},r.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?m(this,0,t):function(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return w(this,e,r);case"utf8":case"utf-8":return m(this,e,r);case"ascii":return A(this,e,r);case"latin1":case"binary":return E(this,e,r);case"base64":return g(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},r.prototype.toLocaleString=r.prototype.toString,r.prototype.equals=function(t){if(!r.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===r.compare(this,t)},r.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},r.prototype.compare=function(t,e,n,o,a){if(I(t,Uint8Array)&&(t=r.from(t,t.offset,t.byteLength)),!r.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===o&&(o=0),void 0===a&&(a=this.length),e<0||n>t.length||o<0||a>this.length)throw new RangeError("out of range index");if(o>=a&&e>=n)return 0;if(o>=a)return-1;if(e>=n)return 1;if(this===t)return 0;for(var i=(a>>>=0)-(o>>>=0),u=(n>>>=0)-(e>>>=0),s=Math.min(i,u),c=this.slice(o,a),l=t.slice(e,n),p=0;p<s;++p)if(c[p]!==l[p]){i=c[p],u=l[p];break}return i<u?-1:u<i?1:0},r.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},r.prototype.indexOf=function(t,e,r){return l(this,t,e,r,!0)},r.prototype.lastIndexOf=function(t,e,r){return l(this,t,e,r,!1)},r.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return f(this,t,e,r);case"utf8":case"utf-8":return _(this,t,e,r);case"ascii":return h(this,t,e,r);case"latin1":case"binary":return d(this,t,e,r);case"base64":return y(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var b=4096;function A(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function E(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function w(t,e,r){var n,o=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>o)&&(r=o);for(var a="",i=e;i<r;++i)a+=(n=t[i])<16?"0"+n.toString(16):n.toString(16);return a}function C(t,e,r){for(var n=t.slice(e,r),o="",a=0;a<n.length;a+=2)o+=String.fromCharCode(n[a]+256*n[a+1]);return o}function S(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function x(t,e,n,o,a,i){if(!r.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>a||e<i)throw new RangeError('"value" argument is out of bounds');if(n+o>t.length)throw new RangeError("Index out of range")}function $(t,e,r,n,o,a){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function O(t,e,r,n,o){return e=+e,r>>>=0,o||$(t,0,r,4),_$ieee754_3.write(t,e,r,n,23,4),r+4}function P(t,e,r,n,o){return e=+e,r>>>=0,o||$(t,0,r,8),_$ieee754_3.write(t,e,r,n,52,8),r+8}r.prototype.slice=function(t,e){var n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);var o=this.subarray(t,e);return o.__proto__=r.prototype,o},r.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||S(t,e,this.length);for(var n=this[t],o=1,a=0;++a<e&&(o*=256);)n+=this[t+a]*o;return n},r.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||S(t,e,this.length);for(var n=this[t+--e],o=1;e>0&&(o*=256);)n+=this[t+--e]*o;return n},r.prototype.readUInt8=function(t,e){return t>>>=0,e||S(t,1,this.length),this[t]},r.prototype.readUInt16LE=function(t,e){return t>>>=0,e||S(t,2,this.length),this[t]|this[t+1]<<8},r.prototype.readUInt16BE=function(t,e){return t>>>=0,e||S(t,2,this.length),this[t]<<8|this[t+1]},r.prototype.readUInt32LE=function(t,e){return t>>>=0,e||S(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},r.prototype.readUInt32BE=function(t,e){return t>>>=0,e||S(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},r.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||S(t,e,this.length);for(var n=this[t],o=1,a=0;++a<e&&(o*=256);)n+=this[t+a]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*e)),n},r.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||S(t,e,this.length);for(var n=e,o=1,a=this[t+--n];n>0&&(o*=256);)a+=this[t+--n]*o;return a>=(o*=128)&&(a-=Math.pow(2,8*e)),a},r.prototype.readInt8=function(t,e){return t>>>=0,e||S(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},r.prototype.readInt16LE=function(t,e){t>>>=0,e||S(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},r.prototype.readInt16BE=function(t,e){t>>>=0,e||S(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},r.prototype.readInt32LE=function(t,e){return t>>>=0,e||S(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},r.prototype.readInt32BE=function(t,e){return t>>>=0,e||S(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},r.prototype.readFloatLE=function(t,e){return t>>>=0,e||S(t,4,this.length),_$ieee754_3.read(this,t,!0,23,4)},r.prototype.readFloatBE=function(t,e){return t>>>=0,e||S(t,4,this.length),_$ieee754_3.read(this,t,!1,23,4)},r.prototype.readDoubleLE=function(t,e){return t>>>=0,e||S(t,8,this.length),_$ieee754_3.read(this,t,!0,52,8)},r.prototype.readDoubleBE=function(t,e){return t>>>=0,e||S(t,8,this.length),_$ieee754_3.read(this,t,!1,52,8)},r.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||x(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,a=0;for(this[e]=255&t;++a<r&&(o*=256);)this[e+a]=t/o&255;return e+r},r.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||x(this,t,e,r,Math.pow(2,8*r)-1,0);var o=r-1,a=1;for(this[e+o]=255&t;--o>=0&&(a*=256);)this[e+o]=t/a&255;return e+r},r.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,1,255,0),this[e]=255&t,e+1},r.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},r.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},r.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},r.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},r.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var o=Math.pow(2,8*r-1);x(this,t,e,r,o-1,-o)}var a=0,i=1,u=0;for(this[e]=255&t;++a<r&&(i*=256);)t<0&&0===u&&0!==this[e+a-1]&&(u=1),this[e+a]=(t/i>>0)-u&255;return e+r},r.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var o=Math.pow(2,8*r-1);x(this,t,e,r,o-1,-o)}var a=r-1,i=1,u=0;for(this[e+a]=255&t;--a>=0&&(i*=256);)t<0&&0===u&&0!==this[e+a+1]&&(u=1),this[e+a]=(t/i>>0)-u&255;return e+r},r.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},r.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},r.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},r.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},r.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},r.prototype.writeFloatLE=function(t,e,r){return O(this,t,e,!0,r)},r.prototype.writeFloatBE=function(t,e,r){return O(this,t,e,!1,r)},r.prototype.writeDoubleLE=function(t,e,r){return P(this,t,e,!0,r)},r.prototype.writeDoubleBE=function(t,e,r){return P(this,t,e,!1,r)},r.prototype.copy=function(t,e,n,o){if(!r.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),o||0===o||(o=this.length),e>=t.length&&(e=t.length),e||(e=0),o>0&&o<n&&(o=n),o===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),t.length-e<o-n&&(o=t.length-e+n);var a=o-n;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(e,n,o);else if(this===t&&n<e&&e<o)for(var i=a-1;i>=0;--i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,o),e);return a},r.prototype.fill=function(t,e,n,o){if("string"==typeof t){if("string"==typeof e?(o=e,e=0,n=this.length):"string"==typeof n&&(o=n,n=this.length),void 0!==o&&"string"!=typeof o)throw new TypeError("encoding must be a string");if("string"==typeof o&&!r.isEncoding(o))throw new TypeError("Unknown encoding: "+o);if(1===t.length){var a=t.charCodeAt(0);("utf8"===o&&a<128||"latin1"===o)&&(t=a)}}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var i;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i<n;++i)this[i]=t;else{var u=r.isBuffer(t)?t:r.from(t,o),s=u.length;if(0===s)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<n-e;++i)this[i+e]=u[i%s]}return this};var F=/[^+/0-9A-Za-z-_]/g;function R(t,e){var r;e=e||1/0;for(var n=t.length,o=null,a=[],i=0;i<n;++i){if((r=t.charCodeAt(i))>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(i+1===n){(e-=3)>-1&&a.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&a.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function L(t){return _$base64Js_1.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(F,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function T(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function I(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function k(t){return t!=t}}).call(this)}).call(this,_$buffer_2({}).Buffer)})),_$package_66={name:"sub-store",version:"2.10.0",description:"Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",main:"src/main.js",scripts:{preinstall:"npx only-allow pnpm",test:"gulp peggy && npx cross-env BABEL_ENV=test mocha src/test/**/*.spec.js --require @babel/register --recursive",serve:"node sub-store.min.js",start:"nodemon -w src -w package.json --exec babel-node src/main.js",build:"gulp"},author:"Peng-YM",license:"GPL-3.0",dependencies:{automerge:"1.0.1-preview.7","body-parser":"^1.19.0",express:"^4.17.1","js-base64":"^3.7.2",lodash:"^4.17.21",request:"^2.88.2",semver:"^7.3.7","static-js-yaml":"^1.0.0",uuid:"^8.3.2"},devDependencies:{"@babel/core":"^7.18.0","@babel/node":"^7.17.10","@babel/preset-env":"^7.18.0","@babel/register":"^7.17.7","@types/gulp":"^4.0.9",axios:"^0.20.0","babel-plugin-relative-path-import":"^2.0.1",babelify:"^10.0.0","browser-pack-flat":"^3.4.2",browserify:"^17.0.0",chai:"^4.3.6",eslint:"^8.16.0",gulp:"^4.0.2","gulp-babel":"^8.0.0","gulp-eslint-new":"^1.4.4","gulp-file":"^0.4.0","gulp-header":"^2.0.9","gulp-prettier":"^4.0.0","gulp-tap":"^2.0.0",mocha:"^10.0.0",nodemon:"^2.0.16",peggy:"^2.0.1",prettier:"2.6.2","prettier-plugin-sort-imports":"^1.6.1",tinyify:"^3.0.0"}},_$constants_67={};Object.defineProperty(_$constants_67,"__esModule",{value:!0}),_$constants_67.SUBS_KEY=_$constants_67.SETTINGS_KEY=_$constants_67.SCHEMA_VERSION_KEY=_$constants_67.RULES_KEY=_$constants_67.RESOURCE_CACHE_KEY=_$constants_67.GIST_BACKUP_KEY=_$constants_67.GIST_BACKUP_FILE_NAME=_$constants_67.COLLECTIONS_KEY=_$constants_67.CACHE_EXPIRATION_TIME_MS=_$constants_67.ARTIFACT_REPOSITORY_KEY=_$constants_67.ARTIFACTS_KEY=void 0,_$constants_67.SCHEMA_VERSION_KEY="schemaVersion",_$constants_67.SETTINGS_KEY="settings",_$constants_67.SUBS_KEY="subs",_$constants_67.COLLECTIONS_KEY="collections",_$constants_67.ARTIFACTS_KEY="artifacts",_$constants_67.RULES_KEY="rules",_$constants_67.GIST_BACKUP_KEY="Auto Generated Sub-Store Backup",_$constants_67.GIST_BACKUP_FILE_NAME="Sub-Store",_$constants_67.ARTIFACT_REPOSITORY_KEY="Sub-Store Artifacts Repository",_$constants_67.RESOURCE_CACHE_KEY="#sub-store-cached-resource",_$constants_67.CACHE_EXPIRATION_TIME_MS=36e5;var _$openApi_111={};function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ownKeys(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(r),!0).forEach((function(e){_defineProperty(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function _defineProperty(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _regeneratorRuntime(){_regeneratorRuntime=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(x){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),i=new w(n||[]);return a._invoke=function(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return{value:void 0,done:!0}}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var u=b(i,r);if(u){if(u===l)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=c(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),a}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(x){return{type:"throw",arg:x}}}t.wrap=s;var l={};function p(){}function f(){}function _(){}var h={};u(h,o,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(C([])));y&&y!==e&&r.call(y,o)&&(h=y);var v=_.prototype=p.prototype=Object.create(h);function g(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){var n;this._invoke=function(o,a){function i(){return new e((function(n,i){!function n(o,a,i,u){var s=c(t[o],t,a);if("throw"!==s.type){var l=s.arg,p=l.value;return p&&"object"==_typeof(p)&&r.call(p,"__await")?e.resolve(p.__await).then((function(t){n("next",t,i,u)}),(function(t){n("throw",t,i,u)})):e.resolve(p).then((function(t){l.value=t,i(l)}),(function(t){return n("throw",t,i,u)}))}u(s.arg)}(o,a,n,i)}))}return n=n?n.then(i,i):i()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function C(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=_,u(v,"constructor",_),u(_,"constructor",f),f.displayName=u(_,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,u(t,i,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(m.prototype),u(m.prototype,a,(function(){return this})),t.AsyncIterator=m,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new m(s(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(v),u(v,i,"Generator"),u(v,o,(function(){return this})),u(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=C,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,l):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:C(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function asyncGeneratorStep(t,e,r,n,o,a,i){try{var u=t[a](i),s=u.value}catch(c){return void r(c)}u.done?e(s):Promise.resolve(s).then(n,o)}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){asyncGeneratorStep(a,n,o,i,u,"next",t)}function u(t){asyncGeneratorStep(a,n,o,i,u,"throw",t)}i(void 0)}))}}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function _createClass(t,e,r){return e&&_defineProperties(t.prototype,e),r&&_defineProperties(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}Object.defineProperty(_$openApi_111,"__esModule",{value:!0}),_$openApi_111.ENV=ENV,_$openApi_111.HTTP=HTTP,_$openApi_111.OpenAPI=void 0;var isQX="undefined"!=typeof $task,isLoon="undefined"!=typeof $loon,isSurge="undefined"!=typeof $httpClient&&!isLoon,isNode=eval('typeof process !== "undefined"'),isStash="undefined"!=typeof $environment&&$environment["stash-version"],isShadowRocket="undefined"!=typeof $rocket,OpenAPI=function(){function OpenAPI(){var name=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"untitled",debug=arguments.length>1&&void 0!==arguments[1]&&arguments[1];_classCallCheck(this,OpenAPI),this.name=name,this.debug=debug,this.http=HTTP(),this.env=ENV(),this.node=function(){if(isNode){var fs=eval("require('fs')");return{fs:fs}}return null}(),this.initCache();var delay=function(t,e){return new Promise((function(r){setTimeout(r.bind(null,e),t)}))},_ref;Promise.prototype.delay=(_ref=_asyncToGenerator(_regeneratorRuntime().mark((function t(e){var r;return _regeneratorRuntime().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this;case 2:return r=t.sent,t.next=5,delay(e,r);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t,this)}))),function(t){return _ref.apply(this,arguments)})}return _createClass(OpenAPI,[{key:"initCache",value:function(){if(isQX&&(this.cache=JSON.parse($prefs.valueForKey(this.name)||"{}")),(isLoon||isSurge)&&(this.cache=JSON.parse($persistentStore.read(this.name)||"{}")),isNode){var t="root.json";this.node.fs.existsSync(t)?this.root=JSON.parse(this.node.fs.readFileSync("".concat(t))):(this.node.fs.writeFileSync(t,JSON.stringify({}),{flag:"wx"}),this.root={}),t="".concat(this.name,".json"),this.node.fs.existsSync(t)?this.cache=JSON.parse(this.node.fs.readFileSync("".concat(this.name,".json"))):(this.node.fs.writeFileSync(t,JSON.stringify({}),{flag:"wx"}),this.cache={})}}},{key:"persistCache",value:function(){var t=JSON.stringify(this.cache,null,2);isQX&&$prefs.setValueForKey(t,this.name),(isLoon||isSurge)&&$persistentStore.write(t,this.name),isNode&&(this.node.fs.writeFileSync("".concat(this.name,".json"),t,{flag:"w"},(function(t){return console.log(t)})),this.node.fs.writeFileSync("root.json",JSON.stringify(this.root,null,2),{flag:"w"},(function(t){return console.log(t)})))}},{key:"write",value:function(t,e){if(this.log("SET ".concat(e)),-1!==e.indexOf("#")){if(e=e.substr(1),isSurge||isLoon)return $persistentStore.write(t,e);if(isQX)return $prefs.setValueForKey(t,e);isNode&&(this.root[e]=t)}else this.cache[e]=t;this.persistCache()}},{key:"read",value:function(t){return this.log("READ ".concat(t)),-1===t.indexOf("#")?this.cache[t]:(t=t.substr(1),isSurge||isLoon?$persistentStore.read(t):isQX?$prefs.valueForKey(t):isNode?this.root[t]:void 0)}},{key:"delete",value:function(t){if(this.log("DELETE ".concat(t)),-1!==t.indexOf("#")){if(t=t.substr(1),isSurge||isLoon)return $persistentStore.write(null,t);if(isQX)return $prefs.removeValueForKey(t);isNode&&delete this.root[t]}else delete this.cache[t];this.persistCache()}},{key:"notify",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=n["open-url"],a=n["media-url"];if(isQX&&$notify(t,e,r,n),isSurge&&$notification.post(t,e,r+"".concat(a?"\n\u591a\u5a92\u4f53:"+a:""),{url:o}),isLoon){var i={};o&&(i.openUrl=o),a&&(i.mediaUrl=a),"{}"===JSON.stringify(i)?$notification.post(t,e,r):$notification.post(t,e,r,i)}if(isNode){var u=r+(o?"\n\u70b9\u51fb\u8df3\u8f6c: ".concat(o):"")+(a?"\n\u591a\u5a92\u4f53: ".concat(a):"");console.log("".concat(t,"\n").concat(e,"\n").concat(u,"\n\n"))}}},{key:"log",value:function(t){this.debug&&console.log("[".concat(this.name,"] LOG: ").concat(t))}},{key:"info",value:function(t){console.log("[".concat(this.name,"] INFO: ").concat(t))}},{key:"error",value:function(t){console.log("[".concat(this.name,"] ERROR: ").concat(t))}},{key:"wait",value:function(t){return new Promise((function(e){return setTimeout(e,t)}))}},{key:"done",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};isQX||isLoon||isSurge?$done(t):isNode&&"undefined"!=typeof $context&&($context.headers=t.headers,$context.statusCode=t.statusCode,$context.body=t.body)}}]),OpenAPI}();function ENV(){return{isQX:isQX,isLoon:isLoon,isSurge:isSurge,isNode:isNode,isStash:isStash,isShadowRocket:isShadowRocket}}function HTTP(){var defaultOptions=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{baseURL:""},_ENV=ENV(),isQX=_ENV.isQX,isLoon=_ENV.isLoon,isSurge=_ENV.isSurge,isNode=_ENV.isNode,methods=["GET","POST","PUT","DELETE","HEAD","OPTIONS","PATCH"],URL_REGEX=/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/;function send(method,options){options="string"==typeof options?{url:options}:options;var baseURL=defaultOptions.baseURL;baseURL&&!URL_REGEX.test(options.url||"")&&(options.url=baseURL?baseURL+options.url:options.url),options=_objectSpread(_objectSpread({},defaultOptions),options);var timeout=options.timeout,events=_objectSpread(_objectSpread({},{onRequest:function(){},onResponse:function(t){return t},onTimeout:function(){}}),options.events),worker,timeoutid;events.onRequest(method,options),isQX?worker=$task.fetch({method:method,url:options.url,headers:options.headers,body:options.body}):(isLoon||isSurge||isNode)&&(worker=new Promise((function(resolve,reject){var request=isNode?eval("require('request')"):$httpClient;request[method.toLowerCase()](options,(function(t,e,r){t?reject(t):resolve({statusCode:e.status||e.statusCode,headers:e.headers,body:r})}))})));var timer=timeout?new Promise((function(t,e){timeoutid=setTimeout((function(){return events.onTimeout(),e("".concat(method," URL: ").concat(options.url," exceeds the timeout ").concat(timeout," ms"))}),timeout)})):null;return(timer?Promise.race([timer,worker]).then((function(t){return clearTimeout(timeoutid),t})):worker).then((function(t){return events.onResponse(t)}))}var http={};return methods.forEach((function(t){return http[t.toLowerCase()]=function(e){return send(t,e)}})),http}_$openApi_111.OpenAPI=OpenAPI;var _$app_68={};Object.defineProperty(_$app_68,"__esModule",{value:!0}),_$app_68.default=void 0;var _default=new _$openApi_111.OpenAPI("sub-store");_$app_68.default=_default;var _$migration_106={};Object.defineProperty(_$migration_106,"__esModule",{value:!0}),_$migration_106.default=function(){var t;(t=_app.default.read(_$constants_67.SCHEMA_VERSION_KEY))||function(){_app.default.info("Start migrating...");var t=_app.default.read(_$constants_67.SUBS_KEY)||{},e=Object.values(t).map((function(t){return t.source=t.source||"remote",s(t),c(t),t}));_app.default.write(e,_$constants_67.SUBS_KEY);var r=_app.default.read(_$constants_67.COLLECTIONS_KEY)||{},n=Object.values(r).map((function(t){return delete t.ua,s(t),c(t),t}));_app.default.write(n,_$constants_67.COLLECTIONS_KEY);var o=_app.default.read(_$constants_67.ARTIFACTS_KEY)||{},a=Object.values(o);_app.default.write(a,_$constants_67.ARTIFACTS_KEY);var i=_app.default.read(_$constants_67.RULES_KEY)||{},u=Object.values(i);function s(t){var e=t["display-name"];e&&(t.displayName=e,delete t["display-name"])}function c(t){var e=t.process;if(e&&0!==e.length){var r=[],n={type:"Quick Setting Operator",args:{udp:"DEFAULT",tfo:"DEFAULT",scert:"DEFAULT","vmess aead":"DEFAULT",useless:"DEFAULT"}};e.forEach((function(t){if("Useless Filter"===t.type)n.args.useless="ENABLED";else if("Set Property Operator"===t.type){var e=t.args,o=e.key,a=e.value;switch(o){case"udp":n.args.udp=a?"ENABLED":"DISABLED";break;case"tfo":n.args.tfo=a?"ENABLED":"DISABLED";break;case"skip-cert-verify":n.args.scert=a?"ENABLED":"DISABLED";break;case"aead":n.args["vmess aead"]=a?"ENABLED":"DISABLED"}}else if(-1!==t.type.indexOf("Keyword"));else if("Flag Operator"===t.type){var i=void 0===t.args||t.args;t.args={mode:i?"add":"remove"},r.push(t)}else r.push(t)})),r.unshift(n),t.process=r}}_app.default.write(u,_$constants_67.RULES_KEY),delete _app.default.cache.builtin,_app.default.info("Migration complete!")}(),"2.0"!==t&&_app.default.write("2.0",_$constants_67.SCHEMA_VERSION_KEY)};var obj,_app=(obj=_$app_68)&&obj.__esModule?obj:{default:obj},_$express_109={};function ___classCallCheck_109(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ___defineProperties_109(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ___createClass_109(t,e,r){return e&&___defineProperties_109(t.prototype,e),r&&___defineProperties_109(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function express(_ref){var $=_ref.substore,port=_ref.port;port=port||3e3;var _ENV=(0,_$openApi_111.ENV)(),isNode=_ENV.isNode,DEFAULT_HEADERS={"Content-Type":"text/plain;charset=UTF-8","Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"POST,GET,OPTIONS,PATCH,PUT,DELETE","Access-Control-Allow-Headers":"Origin, X-Requested-With, Content-Type, Accept"};if(isNode){var express_=eval('require("express")'),bodyParser=eval('require("body-parser")'),_app=express_();return _app.use(bodyParser.json({verify:rawBodySaver})),_app.use(bodyParser.urlencoded({verify:rawBodySaver,extended:!0})),_app.use(bodyParser.raw({verify:rawBodySaver,type:"*/*"})),_app.use((function(t,e,r){e.set(DEFAULT_HEADERS),r()})),_app.start=function(){_app.listen(port,(function(){$.info("Express started on port: ".concat(port))}))},_app}var handlers=[],METHODS_NAMES=["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD'","ALL"],dispatch=function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e.method,o=e.url,a=e.headers,i=e.body;a=formatHeaders(a),/json/i.test(a["content-type"])&&(i=JSON.parse(i)),n=n.toUpperCase();var u,s=extractURL(o),c=s.path,l=s.query,p=null,f=0;for(u=r;u<handlers.length;u++)if("ALL"===handlers[u].method||n===handlers[u].method){var _=handlers[u].pattern;patternMatched(_,c)&&_.split("/").length>f&&(p=handlers[u],f=_.split("/").length)}if(p){var h=function(){t(n,o,u)},d={method:n,url:o,path:c,query:l,params:extractPathParams(p.pattern,c),headers:a,body:i},y=Response(),v=p.callback,g=function(t){y.status(500).json({status:"failed",message:"Internal Server Error: ".concat(t)})};if("AsyncFunction"===v.constructor.name)v(d,y,h).catch(g);else try{v(d,y,h)}catch(m){g(m)}}else Response().status(404).json({status:"failed",message:"ERROR: 404 not found"})},app={};return METHODS_NAMES.forEach((function(t){app[t.toLowerCase()]=function(e,r){handlers.push({method:t,pattern:e,callback:r})}})),app.route=function(t){var e={};return METHODS_NAMES.forEach((function(r){e[r.toLowerCase()]=function(n){return handlers.push({method:r,pattern:t,callback:n}),e}})),e},app.start=function(){dispatch($request)},app;function rawBodySaver(t,e,r,n){r&&r.length&&(t.rawBody=r.toString(n||"utf8"))}function Response(){var t=200,e=(0,_$openApi_111.ENV)(),r=e.isQX,n=e.isLoon,o=e.isSurge,a=DEFAULT_HEADERS,i={200:"HTTP/1.1 200 OK",201:"HTTP/1.1 201 Created",302:"HTTP/1.1 302 Found",307:"HTTP/1.1 307 Temporary Redirect",308:"HTTP/1.1 308 Permanent Redirect",404:"HTTP/1.1 404 Not Found",500:"HTTP/1.1 500 Internal Server Error"};return new(function(){function e(){___classCallCheck_109(this,e)}return ___createClass_109(e,[{key:"status",value:function(e){return t=e,this}},{key:"send",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",u={status:r?i[t]:t,body:e,headers:a};r?$done(u):(n||o)&&$done({response:u})}},{key:"end",value:function(){this.send()}},{key:"html",value:function(t){this.set("Content-Type","text/html;charset=UTF-8"),this.send(t)}},{key:"json",value:function(t){this.set("Content-Type","application/json;charset=UTF-8"),this.send(JSON.stringify(t))}},{key:"set",value:function(t,e){return a[t]=e,this}}]),e}())}}function formatHeaders(t){for(var e={},r=0,n=Object.keys(t);r<n.length;r++){var o=n[r];e[o.toLowerCase()]=t[o]}return e}function patternMatched(t,e){if(t instanceof RegExp&&t.test(e))return!0;if("/"===t)return!0;if(-1===t.indexOf(":")){for(var r=e.split("/"),n=t.split("/"),o=0;o<n.length;o++)if(r[o]!==n[o])return!1;return!0}return!!extractPathParams(t,e)}function extractURL(t){var e=(t.match(/https?:\/\/[^/]+(\/[^?]*)/)||[])[1]||"/",r={};if(-1!==t.indexOf("?"))for(var n=t.slice(t.indexOf("?")+1).split("&"),o=0;o<n.length;o++){var a=n[o].split("=");r[a[0]]=a[1]}return{path:e,query:r}}function extractPathParams(t,e){if(-1===t.indexOf(":"))return null;for(var r={},n=0,o=0;n<t.length;n++,o++)if(":"===t[n]){for(var a=[],i=[];"/"!==t[++n]&&n<t.length;)a.push(t[n]);for(;"/"!==e[o]&&o<e.length;)i.push(e[o++]);r[a.join("")]=i.join("")}else if(t[n]!==e[o])return null;return r}Object.defineProperty(_$express_109,"__esModule",{value:!0}),_$express_109.default=express;var _$gist_103={};function ___typeof_103(t){return(___typeof_103="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ___regeneratorRuntime_103(){___regeneratorRuntime_103=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(x){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),i=new w(n||[]);return a._invoke=function(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return{value:void 0,done:!0}}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var u=b(i,r);if(u){if(u===l)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=c(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),a}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(x){return{type:"throw",arg:x}}}t.wrap=s;var l={};function p(){}function f(){}function _(){}var h={};u(h,o,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(C([])));y&&y!==e&&r.call(y,o)&&(h=y);var v=_.prototype=p.prototype=Object.create(h);function g(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){var n;this._invoke=function(o,a){function i(){return new e((function(n,i){!function n(o,a,i,u){var s=c(t[o],t,a);if("throw"!==s.type){var l=s.arg,p=l.value;return p&&"object"==___typeof_103(p)&&r.call(p,"__await")?e.resolve(p.__await).then((function(t){n("next",t,i,u)}),(function(t){n("throw",t,i,u)})):e.resolve(p).then((function(t){l.value=t,i(l)}),(function(t){return n("throw",t,i,u)}))}u(s.arg)}(o,a,n,i)}))}return n=n?n.then(i,i):i()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function C(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=_,u(v,"constructor",_),u(_,"constructor",f),f.displayName=u(_,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,u(t,i,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(m.prototype),u(m.prototype,a,(function(){return this})),t.AsyncIterator=m,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new m(s(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(v),u(v,i,"Generator"),u(v,o,(function(){return this})),u(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=C,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,l):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:C(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function _createForOfIteratorHelper(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(t,void 0):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){u=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(u)throw a}}}}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function __asyncGeneratorStep_103(t,e,r,n,o,a,i){try{var u=t[a](i),s=u.value}catch(c){return void r(c)}u.done?e(s):Promise.resolve(s).then(n,o)}function ___asyncToGenerator_103(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){__asyncGeneratorStep_103(a,n,o,i,u,"next",t)}function u(t){__asyncGeneratorStep_103(a,n,o,i,u,"throw",t)}i(void 0)}))}}function ___defineProperties_103(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}Object.defineProperty(_$gist_103,"__esModule",{value:!0}),_$gist_103.default=void 0;var Gist=function(){function t(e){var r=e.token,n=e.key;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.http=(0,_$openApi_111.HTTP)({baseURL:"https://api.github.com",headers:{Authorization:"token ".concat(r),"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.141 Safari/537.36"},events:{onResponse:function(t){return/^[45]/.test(String(t.statusCode))?Promise.reject("ERROR: ".concat(JSON.parse(t.body).message)):t}}}),this.key=n}var e,r,n,o;return e=t,(r=[{key:"locate",value:(o=___asyncToGenerator_103(___regeneratorRuntime_103().mark((function t(){var e=this;return ___regeneratorRuntime_103().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.http.get("/gists").then((function(t){var r,n=_createForOfIteratorHelper(JSON.parse(t.body));try{for(n.s();!(r=n.n()).done;){var o=r.value;if(o.description===e.key)return o.id}}catch(a){n.e(a)}finally{n.f()}return-1})));case 1:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"upload",value:(n=___asyncToGenerator_103(___regeneratorRuntime_103().mark((function t(e){var r;return ___regeneratorRuntime_103().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.locate();case 2:if(-1!==(r=t.sent)){t.next=7;break}return t.abrupt("return",this.http.post({url:"/gists",body:JSON.stringify({description:this.key,public:!1,files:e})}));case 7:return t.abrupt("return",this.http.patch({url:"/gists/".concat(r),body:JSON.stringify({files:e})}));case 8:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"download",value:function(){var t=___asyncToGenerator_103(___regeneratorRuntime_103().mark((function t(e){var r,n,o,a;return ___regeneratorRuntime_103().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.locate();case 2:if(-1!==(r=t.sent)){t.next=7;break}return t.abrupt("return",Promise.reject("\u672a\u627e\u5230Gist\u5907\u4efd\uff01"));case 7:return t.prev=7,t.next=10,this.http.get("/gists/".concat(r)).then((function(t){return JSON.parse(t.body)}));case 10:return n=t.sent,o=n.files,a=o[e].raw_url,t.next=15,this.http.get(a).then((function(t){return t.body}));case 15:return t.abrupt("return",t.sent);case 18:return t.prev=18,t.t0=t.catch(7),t.abrupt("return",Promise.reject(t.t0));case 21:case"end":return t.stop()}}),t,this,[[7,18]])})));return function(e){return t.apply(this,arguments)}}()}])&&___defineProperties_103(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();_$gist_103.default=Gist;var _$errors_92={};function ___typeof_92(t){return(___typeof_92="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e)}function _setPrototypeOf(t,e){return(_setPrototypeOf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _createSuper(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=_getPrototypeOf(t);if(e){var o=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===___typeof_92(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ___defineProperties_92(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ___createClass_92(t,e,r){return e&&___defineProperties_92(t.prototype,e),r&&___defineProperties_92(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function ___classCallCheck_92(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(_$errors_92,"__esModule",{value:!0}),_$errors_92.ResourceNotFoundError=_$errors_92.RequestInvalidError=_$errors_92.NetworkError=_$errors_92.InternalServerError=void 0;var BaseError=___createClass_92((function t(e,r,n){___classCallCheck_92(this,t),this.code=e,this.message=r,this.details=n})),InternalServerError=function(t){_inherits(r,BaseError);var e=_createSuper(r);function r(t,n,o){var a;return ___classCallCheck_92(this,r),(a=e.call(this,t,n,o)).type="InternalServerError",a}return ___createClass_92(r)}();_$errors_92.InternalServerError=InternalServerError;var RequestInvalidError=function(t){_inherits(r,BaseError);var e=_createSuper(r);function r(t,n,o){var a;return ___classCallCheck_92(this,r),(a=e.call(this,t,n,o)).type="RequestInvalidError",a}return ___createClass_92(r)}();_$errors_92.RequestInvalidError=RequestInvalidError;var ResourceNotFoundError=function(t){_inherits(r,BaseError);var e=_createSuper(r);function r(t,n,o){var a;return ___classCallCheck_92(this,r),(a=e.call(this,t,n,o)).type="ResourceNotFoundError",a}return ___createClass_92(r)}();_$errors_92.ResourceNotFoundError=ResourceNotFoundError;var NetworkError=function(t){_inherits(r,BaseError);var e=_createSuper(r);function r(t,n,o){var a;return ___classCallCheck_92(this,r),(a=e.call(this,t,n,o)).type="NetworkError",a}return ___createClass_92(r)}();_$errors_92.NetworkError=NetworkError;var _$database_99={};function findIndexByName(t,e){return t.findIndex((function(t){return t.name===e}))}Object.defineProperty(_$database_99,"__esModule",{value:!0}),_$database_99.deleteByName=function(t,e){var r=findIndexByName(t,e);t.splice(r,1)},_$database_99.findByName=function(t,e){return t.find((function(t){return t.name===e}))},_$database_99.findIndexByName=findIndexByName,_$database_99.updateByName=function(t,e,r){t[findIndexByName(t,e)]=r};var _$flow_101={};function ___typeof_101(t){return(___typeof_101="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ___regeneratorRuntime_101(){___regeneratorRuntime_101=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(x){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),i=new w(n||[]);return a._invoke=function(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return{value:void 0,done:!0}}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var u=b(i,r);if(u){if(u===l)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=c(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),a}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(x){return{type:"throw",arg:x}}}t.wrap=s;var l={};function p(){}function f(){}function _(){}var h={};u(h,o,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(C([])));y&&y!==e&&r.call(y,o)&&(h=y);var v=_.prototype=p.prototype=Object.create(h);function g(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){var n;this._invoke=function(o,a){function i(){return new e((function(n,i){!function n(o,a,i,u){var s=c(t[o],t,a);if("throw"!==s.type){var l=s.arg,p=l.value;return p&&"object"==___typeof_101(p)&&r.call(p,"__await")?e.resolve(p.__await).then((function(t){n("next",t,i,u)}),(function(t){n("throw",t,i,u)})):e.resolve(p).then((function(t){l.value=t,i(l)}),(function(t){return n("throw",t,i,u)}))}u(s.arg)}(o,a,n,i)}))}return n=n?n.then(i,i):i()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function C(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=_,u(v,"constructor",_),u(_,"constructor",f),f.displayName=u(_,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,u(t,i,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(m.prototype),u(m.prototype,a,(function(){return this})),t.AsyncIterator=m,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new m(s(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(v),u(v,i,"Generator"),u(v,o,(function(){return this})),u(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=C,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,l):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:C(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function __asyncGeneratorStep_101(t,e,r,n,o,a,i){try{var u=t[a](i),s=u.value}catch(c){return void r(c)}u.done?e(s):Promise.resolve(s).then(n,o)}function _getFlowHeaders(){var t;return t=___regeneratorRuntime_101().mark((function t(e){var r,n,o,a;return ___regeneratorRuntime_101().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=(0,_$openApi_111.HTTP)(),t.next=3,r.get({url:e,headers:{"User-Agent":"Quantumult%20X/1.0.30 (iPhone14,2; iOS 15.6)"}});case 3:return n=t.sent,o=n.headers,a=Object.keys(o).filter((function(t){return/SUBSCRIPTION-USERINFO/i.test(t)}))[0],t.abrupt("return",o[a]);case 7:case"end":return t.stop()}}),t)})),(_getFlowHeaders=function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){__asyncGeneratorStep_101(a,n,o,i,u,"next",t)}function u(t){__asyncGeneratorStep_101(a,n,o,i,u,"throw",t)}i(void 0)}))}).apply(this,arguments)}Object.defineProperty(_$flow_101,"__esModule",{value:!0}),_$flow_101.getFlowHeaders=function(t){return _getFlowHeaders.apply(this,arguments)};var _$response_95={};Object.defineProperty(_$response_95,"__esModule",{value:!0}),_$response_95.failed=function(t,e,r){t.status(r||500).json({status:"failed",error:{code:e.code,type:e.type,message:e.message,details:e.details}})},_$response_95.success=function(t,e,r){t.status(r||200).json({status:"success",data:e})};var _$subscriptions_98={};function ___typeof_98(t){return(___typeof_98="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(_$subscriptions_98,"__esModule",{value:!0}),_$subscriptions_98.default=function(t){t.get("/api/sub/flow/:name",getFlowInfo),t.route("/api/sub/:name").get(getSubscription).patch(updateSubscription).delete(deleteSubscription),t.route("/api/subs").get(getAllSubscriptions).post(createSubscription)};var __obj_98,___app_98=(__obj_98=_$app_68)&&__obj_98.__esModule?__obj_98:{default:__obj_98};function ___regeneratorRuntime_98(){___regeneratorRuntime_98=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(x){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),i=new w(n||[]);return a._invoke=function(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return{value:void 0,done:!0}}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var u=b(i,r);if(u){if(u===l)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=c(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),a}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(x){return{type:"throw",arg:x}}}t.wrap=s;var l={};function p(){}function f(){}function _(){}var h={};u(h,o,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(C([])));y&&y!==e&&r.call(y,o)&&(h=y);var v=_.prototype=p.prototype=Object.create(h);function g(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){var n;this._invoke=function(o,a){function i(){return new e((function(n,i){!function n(o,a,i,u){var s=c(t[o],t,a);if("throw"!==s.type){var l=s.arg,p=l.value;return p&&"object"==___typeof_98(p)&&r.call(p,"__await")?e.resolve(p.__await).then((function(t){n("next",t,i,u)}),(function(t){n("throw",t,i,u)})):e.resolve(p).then((function(t){l.value=t,i(l)}),(function(t){return n("throw",t,i,u)}))}u(s.arg)}(o,a,n,i)}))}return n=n?n.then(i,i):i()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function C(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=_,u(v,"constructor",_),u(_,"constructor",f),f.displayName=u(_,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,u(t,i,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(m.prototype),u(m.prototype,a,(function(){return this})),t.AsyncIterator=m,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new m(s(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(v),u(v,i,"Generator"),u(v,o,(function(){return this})),u(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=C,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,l):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:C(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function ___createForOfIteratorHelper_98(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return ___arrayLikeToArray_98(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?___arrayLikeToArray_98(t,void 0):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){u=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(u)throw a}}}}function ___arrayLikeToArray_98(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function __ownKeys_98(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ___objectSpread_98(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?__ownKeys_98(Object(r),!0).forEach((function(e){___defineProperty_98(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):__ownKeys_98(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ___defineProperty_98(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function __asyncGeneratorStep_98(t,e,r,n,o,a,i){try{var u=t[a](i),s=u.value}catch(c){return void r(c)}u.done?e(s):Promise.resolve(s).then(n,o)}function getFlowInfo(t,e){return _getFlowInfo.apply(this,arguments)}function _getFlowInfo(){var t;return t=___regeneratorRuntime_98().mark((function t(e,r){var n,o,a,i,u,s,c,l,p;return ___regeneratorRuntime_98().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.params.name,n=decodeURIComponent(n),o=___app_98.default.read(_$constants_67.SUBS_KEY),a=(0,_$database_99.findByName)(o,n)){t.next=7;break}return(0,_$response_95.failed)(r,new _$errors_92.ResourceNotFoundError("RESOURCE_NOT_FOUND","Subscription ".concat(n," does not exist!")),404),t.abrupt("return");case 7:if("local"!==a.source){t.next=10;break}return(0,_$response_95.failed)(r,new _$errors_92.RequestInvalidError("NO_FLOW_INFO","N/A","Local subscription ".concat(n," has no flow information!"))),t.abrupt("return");case 10:return t.prev=10,t.next=13,(0,_$flow_101.getFlowHeaders)(a.url);case 13:if(i=t.sent){t.next=17;break}return(0,_$response_95.failed)(r,new _$errors_92.InternalServerError("NO_FLOW_INFO","No flow info","Failed to fetch flow headers")),t.abrupt("return");case 17:u=Number(i.match(/upload=(\d+)/)[1]),s=Number(i.match(/download=(\d+)/)[1]),c=Number(i.match(/total=(\d+)/)[1]),l=i.match(/expire=(\d+)/),p=l?Number(l[1]):void 0,(0,_$response_95.success)(r,{expires:p,total:c,usage:{upload:u,download:s}}),t.next=28;break;case 25:t.prev=25,t.t0=t.catch(10),(0,_$response_95.failed)(r,new _$errors_92.NetworkError("URL_NOT_ACCESSIBLE","The URL for subscription ".concat(n," is inaccessible.")));case 28:case"end":return t.stop()}}),t,null,[[10,25]])})),(_getFlowInfo=function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){__asyncGeneratorStep_98(a,n,o,i,u,"next",t)}function u(t){__asyncGeneratorStep_98(a,n,o,i,u,"throw",t)}i(void 0)}))}).apply(this,arguments)}function createSubscription(t,e){var r=t.body;___app_98.default.info("\u6b63\u5728\u521b\u5efa\u8ba2\u9605\uff1a ".concat(r.name));var n=___app_98.default.read(_$constants_67.SUBS_KEY);(0,_$database_99.findByName)(n,r.name)&&(0,_$response_95.failed)(e,new _$errors_92.RequestInvalidError("DUPLICATE_KEY","Subscription ".concat(r.name," already exists."))),n.push(r),___app_98.default.write(n,_$constants_67.SUBS_KEY),(0,_$response_95.success)(e,r,201)}function getSubscription(t,e){var r=t.params.name;r=decodeURIComponent(r);var n=___app_98.default.read(_$constants_67.SUBS_KEY),o=(0,_$database_99.findByName)(n,r);o?(0,_$response_95.success)(e,o):(0,_$response_95.failed)(e,new _$errors_92.ResourceNotFoundError("SUBSCRIPTION_NOT_FOUND","Subscription ".concat(r," does not exist"),404))}function updateSubscription(t,e){var r=t.params.name;r=decodeURIComponent(r);var n=t.body,o=___app_98.default.read(_$constants_67.SUBS_KEY),a=(0,_$database_99.findByName)(o,r);if(a){var i=___objectSpread_98(___objectSpread_98({},a),n);if(___app_98.default.info("\u6b63\u5728\u66f4\u65b0\u8ba2\u9605\uff1a ".concat(r)),r!==n.name){var u,s=___createForOfIteratorHelper_98(___app_98.default.read(_$constants_67.COLLECTIONS_KEY));try{for(s.s();!(u=s.n()).done;){var c=u.value,l=c.subscriptions.indexOf(r);-1!==l&&(c.subscriptions[l]=n.name)}}catch(p){s.e(p)}finally{s.f()}}(0,_$database_99.updateByName)(o,r,i),___app_98.default.write(o,_$constants_67.SUBS_KEY),(0,_$response_95.success)(e,i)}else(0,_$response_95.failed)(e,new _$errors_92.ResourceNotFoundError("RESOURCE_NOT_FOUND","Subscription ".concat(r," does not exist!")),404)}function deleteSubscription(t,e){var r=t.params.name;r=decodeURIComponent(r),___app_98.default.info("\u5220\u9664\u8ba2\u9605\uff1a".concat(r,"..."));var n=___app_98.default.read(_$constants_67.SUBS_KEY);(0,_$database_99.deleteByName)(n,r),___app_98.default.write(n,_$constants_67.SUBS_KEY);var o,a=___app_98.default.read(_$constants_67.COLLECTIONS_KEY),i=___createForOfIteratorHelper_98(a);try{for(i.s();!(o=i.n()).done;){var u=o.value;u.subscriptions=u.subscriptions.filter((function(t){return t!==r}))}}catch(s){i.e(s)}finally{i.f()}___app_98.default.write(a,_$constants_67.COLLECTIONS_KEY),(0,_$response_95.success)(e)}function getAllSubscriptions(t,e){var r=___app_98.default.read(_$constants_67.SUBS_KEY);(0,_$response_95.success)(e,r)}___app_98.default.read(_$constants_67.SUBS_KEY)||___app_98.default.write({},_$constants_67.SUBS_KEY);var _$collections_90={};Object.defineProperty(_$collections_90,"__esModule",{value:!0}),_$collections_90.default=function(t){___app_90.default.read(_$constants_67.COLLECTIONS_KEY)||___app_90.default.write({},_$constants_67.COLLECTIONS_KEY),t.route("/api/collection/:name").get(getCollection).patch(updateCollection).delete(deleteCollection),t.route("/api/collections").get(getAllCollections).post(createCollection)};var __obj_90,___app_90=(__obj_90=_$app_68)&&__obj_90.__esModule?__obj_90:{default:__obj_90};function __ownKeys_90(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ___objectSpread_90(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?__ownKeys_90(Object(r),!0).forEach((function(e){___defineProperty_90(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):__ownKeys_90(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ___defineProperty_90(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function createCollection(t,e){var r=t.body;___app_90.default.info("\u6b63\u5728\u521b\u5efa\u7ec4\u5408\u8ba2\u9605\uff1a".concat(r.name));var n=___app_90.default.read(_$constants_67.COLLECTIONS_KEY);(0,_$database_99.findByName)(n,r.name)&&(0,_$response_95.failed)(e,new _$errors_92.RequestInvalidError("DUPLICATE_KEY","Collection ".concat(r.name," already exists."))),n.push(r),___app_90.default.write(n,_$constants_67.COLLECTIONS_KEY),(0,_$response_95.success)(e,r,201)}function getCollection(t,e){var r=t.params.name;r=decodeURIComponent(r);var n=___app_90.default.read(_$constants_67.COLLECTIONS_KEY),o=(0,_$database_99.findByName)(n,r);o?(0,_$response_95.success)(e,o):(0,_$response_95.failed)(e,new _$errors_92.ResourceNotFoundError("SUBSCRIPTION_NOT_FOUND","Collection ".concat(r," does not exist"),404))}function updateCollection(t,e){var r=t.params.name;r=decodeURIComponent(r);var n=t.body,o=___app_90.default.read(_$constants_67.COLLECTIONS_KEY),a=(0,_$database_99.findByName)(o,r);if(a){var i=___objectSpread_90(___objectSpread_90({},a),n);___app_90.default.info("\u6b63\u5728\u66f4\u65b0\u7ec4\u5408\u8ba2\u9605\uff1a".concat(r,"...")),(0,_$database_99.updateByName)(o,r,i),___app_90.default.write(o,_$constants_67.COLLECTIONS_KEY),(0,_$response_95.success)(e,i)}else(0,_$response_95.failed)(e,new _$errors_92.ResourceNotFoundError("RESOURCE_NOT_FOUND","Collection ".concat(r," does not exist!")),404)}function deleteCollection(t,e){var r=t.params.name;r=decodeURIComponent(r),___app_90.default.info("\u6b63\u5728\u5220\u9664\u7ec4\u5408\u8ba2\u9605\uff1a".concat(r));var n=___app_90.default.read(_$constants_67.COLLECTIONS_KEY);(0,_$database_99.deleteByName)(n,r),___app_90.default.write(n,_$constants_67.COLLECTIONS_KEY),(0,_$response_95.success)(e)}function getAllCollections(t,e){var r=___app_90.default.read(_$constants_67.COLLECTIONS_KEY);(0,_$response_95.success)(e,r)}var _$md5_110={};Object.defineProperty(_$md5_110,"__esModule",{value:!0}),_$md5_110.any_hmac_md5=function(t,e,r){return rstr2any(rstr_hmac_md5(str2rstr_utf8(t),str2rstr_utf8(e)),r)},_$md5_110.any_md5=function(t,e){return rstr2any(rstr_md5(str2rstr_utf8(t)),e)},_$md5_110.b64_hmac_md5=function(t,e){return rstr2b64(rstr_hmac_md5(str2rstr_utf8(t),str2rstr_utf8(e)))},_$md5_110.b64_md5=function(t){return rstr2b64(rstr_md5(str2rstr_utf8(t)))},_$md5_110.hex_hmac_md5=function(t,e){return rstr2hex(rstr_hmac_md5(str2rstr_utf8(t),str2rstr_utf8(e)))},_$md5_110.hex_md5=hex_md5;var hexcase=0,b64pad="";function hex_md5(t){return rstr2hex(rstr_md5(str2rstr_utf8(t)))}function rstr_md5(t){return binl2rstr(binl_md5(rstr2binl(t),8*t.length))}function rstr_hmac_md5(t,e){var r=rstr2binl(t);r.length>16&&(r=binl_md5(r,8*t.length));for(var n=Array(16),o=Array(16),a=0;a<16;a++)n[a]=909522486^r[a],o[a]=1549556828^r[a];var i=binl_md5(n.concat(rstr2binl(e)),512+8*e.length);return binl2rstr(binl_md5(o.concat(i),640))}function rstr2hex(t){for(var e,r=hexcase?"0123456789ABCDEF":"0123456789abcdef",n="",o=0;o<t.length;o++)e=t.charCodeAt(o),n+=r.charAt(e>>>4&15)+r.charAt(15&e);return n}function rstr2b64(t){for(var e="",r=t.length,n=0;n<r;n+=3)for(var o=t.charCodeAt(n)<<16|(n+1<r?t.charCodeAt(n+1)<<8:0)|(n+2<r?t.charCodeAt(n+2):0),a=0;a<4;a++)8*n+6*a>8*t.length?e+=b64pad:e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(o>>>6*(3-a)&63);return e}function rstr2any(t,e){var r,n,o,a,i,u=e.length,s=Array(Math.ceil(t.length/2));for(r=0;r<s.length;r++)s[r]=t.charCodeAt(2*r)<<8|t.charCodeAt(2*r+1);var c=Math.ceil(8*t.length/(Math.log(e.length)/Math.log(2))),l=Array(c);for(n=0;n<c;n++){for(i=Array(),a=0,r=0;r<s.length;r++)a=(a<<16)+s[r],a-=(o=Math.floor(a/u))*u,(i.length>0||o>0)&&(i[i.length]=o);l[n]=a,s=i}var p="";for(r=l.length-1;r>=0;r--)p+=e.charAt(l[r]);return p}function str2rstr_utf8(t){for(var e,r,n="",o=-1;++o<t.length;)e=t.charCodeAt(o),r=o+1<t.length?t.charCodeAt(o+1):0,55296<=e&&e<=56319&&56320<=r&&r<=57343&&(e=65536+((1023&e)<<10)+(1023&r),o++),e<=127?n+=String.fromCharCode(e):e<=2047?n+=String.fromCharCode(192|e>>>6&31,128|63&e):e<=65535?n+=String.fromCharCode(224|e>>>12&15,128|e>>>6&63,128|63&e):e<=2097151&&(n+=String.fromCharCode(240|e>>>18&7,128|e>>>12&63,128|e>>>6&63,128|63&e));return n}function rstr2binl(t){for(var e=Array(t.length>>2),r=0;r<e.length;r++)e[r]=0;for(r=0;r<8*t.length;r+=8)e[r>>5]|=(255&t.charCodeAt(r/8))<<r%32;return e}function binl2rstr(t){for(var e="",r=0;r<32*t.length;r+=8)e+=String.fromCharCode(t[r>>5]>>>r%32&255);return e}function binl_md5(t,e){t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;for(var r=1732584193,n=-271733879,o=-1732584194,a=271733878,i=0;i<t.length;i+=16){var u=r,s=n,c=o,l=a;r=md5_ff(r,n,o,a,t[i+0],7,-680876936),a=md5_ff(a,r,n,o,t[i+1],12,-389564586),o=md5_ff(o,a,r,n,t[i+2],17,606105819),n=md5_ff(n,o,a,r,t[i+3],22,-1044525330),r=md5_ff(r,n,o,a,t[i+4],7,-176418897),a=md5_ff(a,r,n,o,t[i+5],12,1200080426),o=md5_ff(o,a,r,n,t[i+6],17,-1473231341),n=md5_ff(n,o,a,r,t[i+7],22,-45705983),r=md5_ff(r,n,o,a,t[i+8],7,1770035416),a=md5_ff(a,r,n,o,t[i+9],12,-1958414417),o=md5_ff(o,a,r,n,t[i+10],17,-42063),n=md5_ff(n,o,a,r,t[i+11],22,-1990404162),r=md5_ff(r,n,o,a,t[i+12],7,1804603682),a=md5_ff(a,r,n,o,t[i+13],12,-40341101),o=md5_ff(o,a,r,n,t[i+14],17,-1502002290),r=md5_gg(r,n=md5_ff(n,o,a,r,t[i+15],22,1236535329),o,a,t[i+1],5,-165796510),a=md5_gg(a,r,n,o,t[i+6],9,-1069501632),o=md5_gg(o,a,r,n,t[i+11],14,643717713),n=md5_gg(n,o,a,r,t[i+0],20,-373897302),r=md5_gg(r,n,o,a,t[i+5],5,-701558691),a=md5_gg(a,r,n,o,t[i+10],9,38016083),o=md5_gg(o,a,r,n,t[i+15],14,-660478335),n=md5_gg(n,o,a,r,t[i+4],20,-405537848),r=md5_gg(r,n,o,a,t[i+9],5,568446438),a=md5_gg(a,r,n,o,t[i+14],9,-1019803690),o=md5_gg(o,a,r,n,t[i+3],14,-187363961),n=md5_gg(n,o,a,r,t[i+8],20,1163531501),r=md5_gg(r,n,o,a,t[i+13],5,-1444681467),a=md5_gg(a,r,n,o,t[i+2],9,-51403784),o=md5_gg(o,a,r,n,t[i+7],14,1735328473),r=md5_hh(r,n=md5_gg(n,o,a,r,t[i+12],20,-1926607734),o,a,t[i+5],4,-378558),a=md5_hh(a,r,n,o,t[i+8],11,-2022574463),o=md5_hh(o,a,r,n,t[i+11],16,1839030562),n=md5_hh(n,o,a,r,t[i+14],23,-35309556),r=md5_hh(r,n,o,a,t[i+1],4,-1530992060),a=md5_hh(a,r,n,o,t[i+4],11,1272893353),o=md5_hh(o,a,r,n,t[i+7],16,-155497632),n=md5_hh(n,o,a,r,t[i+10],23,-1094730640),r=md5_hh(r,n,o,a,t[i+13],4,681279174),a=md5_hh(a,r,n,o,t[i+0],11,-358537222),o=md5_hh(o,a,r,n,t[i+3],16,-722521979),n=md5_hh(n,o,a,r,t[i+6],23,76029189),r=md5_hh(r,n,o,a,t[i+9],4,-640364487),a=md5_hh(a,r,n,o,t[i+12],11,-421815835),o=md5_hh(o,a,r,n,t[i+15],16,530742520),r=md5_ii(r,n=md5_hh(n,o,a,r,t[i+2],23,-995338651),o,a,t[i+0],6,-198630844),a=md5_ii(a,r,n,o,t[i+7],10,1126891415),o=md5_ii(o,a,r,n,t[i+14],15,-1416354905),n=md5_ii(n,o,a,r,t[i+5],21,-57434055),r=md5_ii(r,n,o,a,t[i+12],6,1700485571),a=md5_ii(a,r,n,o,t[i+3],10,-1894986606),o=md5_ii(o,a,r,n,t[i+10],15,-1051523),n=md5_ii(n,o,a,r,t[i+1],21,-2054922799),r=md5_ii(r,n,o,a,t[i+8],6,1873313359),a=md5_ii(a,r,n,o,t[i+15],10,-30611744),o=md5_ii(o,a,r,n,t[i+6],15,-1560198380),n=md5_ii(n,o,a,r,t[i+13],21,1309151649),r=md5_ii(r,n,o,a,t[i+4],6,-145523070),a=md5_ii(a,r,n,o,t[i+11],10,-1120210379),o=md5_ii(o,a,r,n,t[i+2],15,718787259),n=md5_ii(n,o,a,r,t[i+9],21,-343485551),r=safe_add(r,u),n=safe_add(n,s),o=safe_add(o,c),a=safe_add(a,l)}return Array(r,n,o,a)}function md5_cmn(t,e,r,n,o,a){return safe_add((i=safe_add(safe_add(e,t),safe_add(n,a)))<<(u=o)|i>>>32-u,r);var i,u}function md5_ff(t,e,r,n,o,a,i){return md5_cmn(e&r|~e&n,t,e,o,a,i)}function md5_gg(t,e,r,n,o,a,i){return md5_cmn(e&n|r&~n,t,e,o,a,i)}function md5_hh(t,e,r,n,o,a,i){return md5_cmn(e^r^n,t,e,o,a,i)}function md5_ii(t,e,r,n,o,a,i){return md5_cmn(r^(e|~n),t,e,o,a,i)}function safe_add(t,e){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}var _$resourceCache_108={};Object.defineProperty(_$resourceCache_108,"__esModule",{value:!0}),_$resourceCache_108.default=void 0;var __obj_108,___app_108=(__obj_108=_$app_68)&&__obj_108.__esModule?__obj_108:{default:__obj_108};function _slicedToArray(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a=[],i=!0,u=!1;try{for(r=r.call(t);!(i=(n=r.next()).done)&&(a.push(n.value),!e||a.length!==e);i=!0);}catch(s){u=!0,o=s}finally{try{i||null==r.return||r.return()}finally{if(u)throw o}}return a}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ___arrayLikeToArray_108(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?___arrayLikeToArray_108(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ___arrayLikeToArray_108(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ___defineProperties_108(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var ___default_108=new(function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.expires=e,___app_108.default.read(_$constants_67.RESOURCE_CACHE_KEY)||___app_108.default.write("{}",_$constants_67.RESOURCE_CACHE_KEY),this.resourceCache=JSON.parse(___app_108.default.read(_$constants_67.RESOURCE_CACHE_KEY)),this._cleanup()}var e,r;return e=t,(r=[{key:"_cleanup",value:function(){var t=this,e=!1;Object.entries(this.resourceCache).forEach((function(r){var n=_slicedToArray(r,2),o=n[0],a=n[1];(new Date).getTime()-a>t.expires&&(___app_108.default.delete("#".concat(o)),delete t.resourceCache[o],e=!0)})),e&&this._persist()}},{key:"revokeAll",value:function(){Object.keys(this.resourceCache).forEach((function(t){___app_108.default.delete("#".concat(t))})),this.resourceCache={},this._persist()}},{key:"_persist",value:function(){___app_108.default.write(JSON.stringify(this.resourceCache),_$constants_67.RESOURCE_CACHE_KEY)}},{key:"get",value:function(t){var e=this.resourceCache[t];return e&&(new Date).getTime()-e<=this.expires?___app_108.default.read("#".concat(t)):null}},{key:"set",value:function(t,e){this.resourceCache[t]=(new Date).getTime(),this._persist(),___app_108.default.write(e,"#".concat(t))}}])&&___defineProperties_108(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}())(_$constants_67.CACHE_EXPIRATION_TIME_MS);_$resourceCache_108.default=___default_108;var _$download_100={};Object.defineProperty(_$download_100,"__esModule",{value:!0}),_$download_100.default=function(t,e){return _download.apply(this,arguments)};var __obj_100,_resourceCache=(__obj_100=_$resourceCache_108)&&__obj_100.__esModule?__obj_100:{default:__obj_100};function ___typeof_100(t){return(___typeof_100="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ___regeneratorRuntime_100(){___regeneratorRuntime_100=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(x){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),i=new w(n||[]);return a._invoke=function(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return{value:void 0,done:!0}}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var u=b(i,r);if(u){if(u===l)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=c(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),a}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(x){return{type:"throw",arg:x}}}t.wrap=s;var l={};function p(){}function f(){}function _(){}var h={};u(h,o,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(C([])));y&&y!==e&&r.call(y,o)&&(h=y);var v=_.prototype=p.prototype=Object.create(h);function g(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){var n;this._invoke=function(o,a){function i(){return new e((function(n,i){!function n(o,a,i,u){var s=c(t[o],t,a);if("throw"!==s.type){var l=s.arg,p=l.value;return p&&"object"==___typeof_100(p)&&r.call(p,"__await")?e.resolve(p.__await).then((function(t){n("next",t,i,u)}),(function(t){n("throw",t,i,u)})):e.resolve(p).then((function(t){l.value=t,i(l)}),(function(t){return n("throw",t,i,u)}))}u(s.arg)}(o,a,n,i)}))}return n=n?n.then(i,i):i()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function C(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=_,u(v,"constructor",_),u(_,"constructor",f),f.displayName=u(_,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,u(t,i,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(m.prototype),u(m.prototype,a,(function(){return this})),t.AsyncIterator=m,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new m(s(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(v),u(v,i,"Generator"),u(v,o,(function(){return this})),u(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=C,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,l):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:C(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function __asyncGeneratorStep_100(t,e,r,n,o,a,i){try{var u=t[a](i),s=u.value}catch(c){return void r(c)}u.done?e(s):Promise.resolve(s).then(n,o)}var tasks=new Map;function _download(){var t;return t=___regeneratorRuntime_100().mark((function t(e,r){var n,o,a;return ___regeneratorRuntime_100().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=r||"Quantumult%20X/1.0.29 (iPhone14,5; iOS 15.4.1)",n=(0,_$md5_110.hex_md5)(r+e),!tasks.has(n)){t.next=4;break}return t.abrupt("return",tasks.get(n));case 4:return o=(0,_$openApi_111.HTTP)({headers:{"User-Agent":r}}),a=new Promise((function(t,r){var a=_resourceCache.default.get(n);a?t(a):o.get(e).then((function(e){var o=e.body;0===o.replace(/\s/g,"").length?r(new Error("\u8fdc\u7a0b\u8d44\u6e90\u5185\u5bb9\u4e3a\u7a7a\uff01")):(_resourceCache.default.set(n,o),t(o))})).catch((function(){r(new Error("\u65e0\u6cd5\u4e0b\u8f7d URL\uff1a".concat(e)))}))})),tasks.set(n,a),t.abrupt("return",a);case 8:case"end":return t.stop()}}),t)})),(_download=function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){__asyncGeneratorStep_100(a,n,o,i,u,"next",t)}function u(t){__asyncGeneratorStep_100(a,n,o,i,u,"throw",t)}i(void 0)}))}).apply(this,arguments)}var _$utils_104={};Object.defineProperty(_$utils_104,"__esModule",{value:!0}),_$utils_104.getIfNotBlank=function(t,e){return isNotBlank(t)?t:e},_$utils_104.getIfPresent=function(t,e){return isPresent(t)?t:e},_$utils_104.isIPv4=function(t){return IPV4_REGEX.test(t)},_$utils_104.isIPv6=function(t){return IPV6_REGEX.test(t)},_$utils_104.isNotBlank=isNotBlank,_$utils_104.isPresent=isPresent;var IPV4_REGEX=/^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)(\.(?!$)|$)){4}$/,IPV6_REGEX=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;function isNotBlank(t){return"string"==typeof t&&t.trim().length>0}function isPresent(t){return null!=t}var _$logical_105={};function ___arrayLikeToArray_105(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}Object.defineProperty(_$logical_105,"__esModule",{value:!0}),_$logical_105.AND=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.reduce((function(t,e){return t.map((function(t,r){return e[r]&&t}))}))},_$logical_105.FULL=function(t,e){return(r=Array(t).keys(),function(t){if(Array.isArray(t))return ___arrayLikeToArray_105(t)}(r)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||function(t,e){if(t){if("string"==typeof t)return ___arrayLikeToArray_105(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?___arrayLikeToArray_105(t,void 0):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(){return e}));var r},_$logical_105.NOT=function(t){return t.map((function(t){return!t}))},_$logical_105.OR=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.reduce((function(t,e){return t.map((function(t,r){return e[r]||t}))}))};var _$geo_102={};Object.defineProperty(_$geo_102,"__esModule",{value:!0}),_$geo_102.getFlag=function(t){for(var e,r={"\ud83c\udff3\ufe0f\u200d\ud83c\udf08":["\u6d41\u91cf","\u65f6\u95f4","\u8fc7\u671f","Bandwidth","Expire"],"\ud83c\uddf8\ud83c\uddf1":["\u5e94\u6025","\u6d4b\u8bd5\u8282\u70b9"],"\ud83c\udde6\ud83c\udde9":["Andorra","\u5b89\u9053\u5c14"],"\ud83c\udde6\ud83c\uddea":["United Arab Emirates","\u963f\u8054\u914b","\u8fea\u62dc"],"\ud83c\udde6\ud83c\uddeb":["Afghanistan","\u963f\u5bcc\u6c57"],"\ud83c\udde6\ud83c\uddf1":["Albania","\u963f\u5c14\u5df4\u5c3c\u4e9a","\u963f\u723e\u5df4\u5c3c\u4e9e"],"\ud83c\udde6\ud83c\uddf2":["Armenia","\u4e9a\u7f8e\u5c3c\u4e9a"],"\ud83c\udde6\ud83c\uddf7":["Argentina","\u963f\u6839\u5ef7"],"\ud83c\udde6\ud83c\uddf9":["Austria","\u5965\u5730\u5229","\u5967\u5730\u5229","\u7ef4\u4e5f\u7eb3"],"\ud83c\udde6\ud83c\uddfa":["Australia","\u6fb3\u5927\u5229\u4e9a","\u6fb3\u6d32","\u58a8\u5c14\u672c","\u6089\u5c3c","\u571f\u6fb3","\u4eac\u6fb3","\u5ee3\u6fb3","\u6eec\u6fb3","\u6caa\u6fb3","\u5e7f\u6fb3","Sydney"],"\ud83c\udde6\ud83c\uddff":["Azerbaijan","\u963f\u585e\u62dc\u7586"],"\ud83c\udde7\ud83c\udde6":["Bosnia and Herzegovina","\u6ce2\u9ed1\u5171\u548c\u56fd","\u6ce2\u9ed1"],"\ud83c\udde7\ud83c\udde9":["Bangladesh","\u5b5f\u52a0\u62c9\u56fd","\u5b5f\u52a0\u62c9"],"\ud83c\udde7\ud83c\uddea":["Belgium","\u6bd4\u5229\u65f6","\u6bd4\u5229\u6642"],"\ud83c\udde7\ud83c\uddec":["Bulgaria","\u4fdd\u52a0\u5229\u4e9a","\u4fdd\u52a0\u5229\u4e9e"],"\ud83c\udde7\ud83c\udded":["Bahrain","\u5df4\u6797"],"\ud83c\udde7\ud83c\uddf7":["Brazil","\u5df4\u897f","\u5723\u4fdd\u7f57"],"\ud83c\udde7\ud83c\uddfe":["Belarus","\u767d\u4fc4\u7f57\u65af","\u767d\u4fc4"],"\ud83c\udde8\ud83c\udde6":["Canada","\u52a0\u62ff\u5927","\u8499\u7279\u5229\u5c14","\u6e29\u54e5\u534e","\u6953\u8449","\u67ab\u53f6","\u6ed1\u94c1\u5362","\u591a\u4f26\u591a","Waterloo"],"\ud83c\udde8\ud83c\udded":["Switzerland","\u745e\u58eb","\u82cf\u9ece\u4e16","Zurich"],"\ud83c\udde8\ud83c\uddf1":["Chile","\u667a\u5229"],"\ud83c\udde8\ud83c\uddf4":["Colombia","\u54e5\u4f26\u6bd4\u4e9a"],"\ud83c\udde8\ud83c\uddf7":["Costa Rica","\u54e5\u65af\u8fbe\u9ece\u52a0"],"\ud83c\udde8\ud83c\uddfe":["Cyprus","\u585e\u6d66\u8def\u65af"],"\ud83c\udde8\ud83c\uddff":["Czechia","\u6377\u514b"],"\ud83c\udde9\ud83c\uddea":["German","\u5fb7\u56fd","\u5fb7\u570b","\u4eac\u5fb7","\u6eec\u5fb7","\u5ee3\u5fb7","\u6caa\u5fb7","\u5e7f\u5fb7","\u6cd5\u5170\u514b\u798f","Frankfurt"],"\ud83c\udde9\ud83c\uddf0":["Denmark","\u4e39\u9ea6","\u4e39\u9ea5"],"\ud83c\uddea\ud83c\udde8":["Ecuador","\u5384\u74dc\u591a\u5c14"],"\ud83c\uddea\ud83c\uddea":["Estonia","\u7231\u6c99\u5c3c\u4e9a"],"\ud83c\uddea\ud83c\uddec":["Egypt","\u57c3\u53ca"],"\ud83c\uddea\ud83c\uddf8":["Spain","\u897f\u73ed\u7259"],"\ud83c\uddea\ud83c\uddfa":["European Union","\u6b27\u76df","\u6b27\u7f57\u5df4"],"\ud83c\uddeb\ud83c\uddee":["Finland","\u82ac\u5170","\u82ac\u862d","\u8d6b\u5c14\u8f9b\u57fa"],"\ud83c\uddeb\ud83c\uddf7":["France","\u6cd5\u56fd","\u6cd5\u570b","\u5df4\u9ece"],"\ud83c\uddec\ud83c\udde7":["Great Britain","\u82f1\u56fd","England","United Kingdom","\u4f26\u6566","\u82f1","London"],"\ud83c\uddec\ud83c\uddea":["Georgia","\u683c\u9c81\u5409\u4e9a","\u683c\u9b6f\u5409\u4e9e"],"\ud83c\uddec\ud83c\uddf7":["Greece","\u5e0c\u814a","\u5e0c\u81d8"],"\ud83c\udded\ud83c\uddf0":["Hongkong","\u9999\u6e2f","Hong Kong","HongKong","HONG KONG","\u6df1\u6e2f","\u6caa\u6e2f","\u547c\u6e2f","\u7a57\u6e2f","\u4eac\u6e2f","\u6e2f"],"\ud83c\udded\ud83c\uddf7":["Croatia","\u514b\u7f57\u5730\u4e9a","\u514b\u7f85\u5730\u4e9e"],"\ud83c\udded\ud83c\uddfa":["Hungary","\u5308\u7259\u5229"],"\ud83c\uddef\ud83c\uddf4":["Jordan","\u7ea6\u65e6"],"\ud83c\uddef\ud83c\uddf5":["Japan","\u65e5\u672c","\u4e1c\u4eac","\u5927\u962a","\u57fc\u7389","\u6caa\u65e5","\u7a57\u65e5","\u5ddd\u65e5","\u4e2d\u65e5","\u6cc9\u65e5","\u676d\u65e5","\u6df1\u65e5","\u8fbd\u65e5","\u5e7f\u65e5","\u5927\u5742","Osaka","Tokyo"],"\ud83c\uddf0\ud83c\uddea":["Kenya","\u80af\u5c3c\u4e9a"],"\ud83c\uddf0\ud83c\uddec":["Kyrgyzstan","\u5409\u5c14\u5409\u65af\u65af\u5766"],"\ud83c\uddf0\ud83c\udded":["Cambodia","\u67ec\u57d4\u5be8"],"\ud83c\uddf0\ud83c\uddf5":["North Korea","\u671d\u9c9c"],"\ud83c\uddf0\ud83c\uddf7":["Korea","\u97e9\u56fd","\u97d3\u570b","\u97e9","\u97d3","\u9996\u5c14","\u6625\u5ddd","Chuncheon","Seoul"],"\ud83c\uddf0\ud83c\uddff":["Kazakhstan","\u54c8\u8428\u514b\u65af\u5766","\u54c8\u8428\u514b"],"\ud83c\uddee\ud83c\udde9":["Indonesia","\u5370\u5c3c","\u5370\u5ea6\u5c3c\u897f\u4e9a","\u96c5\u52a0\u8fbe"],"\ud83c\uddee\ud83c\uddea":["Ireland","\u7231\u5c14\u5170","\u611b\u723e\u862d","\u90fd\u67cf\u6797"],"\ud83c\uddee\ud83c\uddf1":["Israel","\u4ee5\u8272\u5217"],"\ud83c\uddee\ud83c\uddf2":["Isle of Man","\u9a6c\u6069\u5c9b","\u99ac\u6069\u5cf6"],"\ud83c\uddee\ud83c\uddf3":["India","\u5370\u5ea6","\u5b5f\u4e70","MFumbai"],"\ud83c\uddee\ud83c\uddf7":["Iran","\u4f0a\u6717"],"\ud83c\uddee\ud83c\uddf8":["Iceland","\u51b0\u5c9b","\u51b0\u5cf6"],"\ud83c\uddee\ud83c\uddf9":["Italy","\u610f\u5927\u5229","\u7fa9\u5927\u5229","\u7c73\u5170","Nachash"],"\ud83c\uddf1\ud83c\uddf9":["Lithuania","\u7acb\u9676\u5b9b"],"\ud83c\uddf1\ud83c\uddfa":["Luxembourg","\u5362\u68ee\u5821"],"\ud83c\uddf1\ud83c\uddfb":["Latvia","\u62c9\u8131\u7ef4\u4e9a","Latvija"],"\ud83c\uddf2\ud83c\udde6":["Morocco","\u6469\u6d1b\u54e5"],"\ud83c\uddf2\ud83c\udde9":["Moldova","\u6469\u5c14\u591a\u74e6","\u6469\u723e\u591a\u74e6"],"\ud83c\uddf3\ud83c\uddec":["Nigeria","\u5c3c\u65e5\u5229\u4e9a","\u5c3c\u65e5\u5229\u4e9e"],"\ud83c\uddf2\ud83c\uddf0":["Macedonia","\u9a6c\u5176\u987f","\u99ac\u5176\u9813"],"\ud83c\uddf2\ud83c\uddf3":["Mongolia","\u8499\u53e4"],"\ud83c\uddf2\ud83c\uddf4":["Macao","\u6fb3\u95e8","\u6fb3\u9580","CTM"],"\ud83c\uddf2\ud83c\uddf9":["Malta","\u9a6c\u8033\u4ed6"],"\ud83c\uddf2\ud83c\uddfd":["Mexico","\u58a8\u897f\u54e5"],"\ud83c\uddf2\ud83c\uddfe":["Malaysia","\u9a6c\u6765\u897f\u4e9a","\u99ac\u4f86\u897f\u4e9e","\u5409\u9686\u5761","\u5927\u99ac"],"\ud83c\uddf3\ud83c\uddf1":["Netherlands","\u8377\u5170","\u8377\u862d","\u5c3c\u5fb7\u862d","\u963f\u59c6\u65af\u7279\u4e39"],"\ud83c\uddf3\ud83c\uddf4":["Norway","\u632a\u5a01"],"\ud83c\uddf3\ud83c\uddf5":["Nepal","\u5c3c\u6cca\u5c14"],"\ud83c\uddf3\ud83c\uddff":["New Zealand","\u65b0\u897f\u5170","\u65b0\u897f\u862d"],"\ud83c\uddf5\ud83c\udde6":["Panama","\u5df4\u62ff\u9a6c"],"\ud83c\uddf5\ud83c\uddea":["Peru","\u79d8\u9c81","\u7955\u9b6f"],"\ud83c\uddf5\ud83c\udded":["Philippines","\u83f2\u5f8b\u5bbe","\u83f2\u5f8b\u8cd3"],"\ud83c\uddf5\ud83c\uddf0":["Pakistan","\u5df4\u57fa\u65af\u5766"],"\ud83c\uddf5\ud83c\uddf1":["Poland","\u6ce2\u5170","\u6ce2\u862d"],"\ud83c\uddf5\ud83c\uddf7":["Puerto Rico","\u6ce2\u591a\u9ece\u5404"],"\ud83c\uddf5\ud83c\uddf9":["Portugal","\u8461\u8404\u7259"],"\ud83c\uddf5\ud83c\uddfe":["Paraguay","\u5df4\u62c9\u572d"],"\ud83c\uddf7\ud83c\uddf4":["Romania","\u7f57\u9a6c\u5c3c\u4e9a"],"\ud83c\uddf7\ud83c\uddf8":["Serbia","\u585e\u5c14\u7ef4\u4e9a"],"\ud83c\uddf7\ud83c\uddea":["R\xe9union","\u7559\u5c3c\u6c6a","\u6cd5\u5c5e\u7559\u5c3c\u6c6a"],"\ud83c\uddf7\ud83c\uddfa":["Russia","\u4fc4\u7f57\u65af","\u4fc4\u56fd","\u4fc4\u7f85\u65af","\u4f2f\u529b","\u83ab\u65af\u79d1","\u5723\u5f7c\u5f97\u5821","\u897f\u4f2f\u5229\u4e9a","\u4eac\u4fc4","\u676d\u4fc4","\u5ee3\u4fc4","\u6eec\u4fc4","\u5e7f\u4fc4","\u6caa\u4fc4","Moscow"],"\ud83c\uddf8\ud83c\udde6":["Saudi","\u6c99\u7279\u963f\u62c9\u4f2f","\u6c99\u7279"],"\ud83c\uddf8\ud83c\uddea":["Sweden","\u745e\u5178"],"\ud83c\uddf8\ud83c\uddec":["Singapore","\u65b0\u52a0\u5761","\u72ee\u57ce","\u6caa\u65b0","\u4eac\u65b0","\u4e2d\u65b0","\u6cc9\u65b0","\u7a57\u65b0","\u6df1\u65b0","\u676d\u65b0","\u5e7f\u65b0","\u5ee3\u65b0","\u6eec\u65b0"],"\ud83c\uddf8\ud83c\uddee":["Slovenia","\u65af\u6d1b\u6587\u5c3c\u4e9a"],"\ud83c\uddf8\ud83c\uddf0":["Slovakia","\u65af\u6d1b\u4f10\u514b"],"\ud83c\uddf9\ud83c\udded":["Thailand","\u6cf0\u56fd","\u6cf0\u570b","\u66fc\u8c37"],"\ud83c\uddf9\ud83c\uddf3":["Tunisia","\u7a81\u5c3c\u65af"],"\ud83c\uddf9\ud83c\uddf7":["Turkey","\u571f\u8033\u5176","\u4f0a\u65af\u5766\u5e03\u5c14"],"\ud83c\uddf9\ud83c\uddfc":["Taiwan","\u53f0\u6e7e","\u53f0\u5317","\u53f0\u4e2d","\u65b0\u5317","\u5f70\u5316","\u53f0","Taipei"],"\ud83c\uddfa\ud83c\udde6":["Ukraine","\u4e4c\u514b\u5170","\u70cf\u514b\u862d"],"\ud83c\uddfa\ud83c\uddf8":["United States","\u7f8e\u56fd","America","\u7f8e","\u4eac\u7f8e","\u6ce2\u7279\u5170","\u8fbe\u62c9\u65af","\u4fc4\u52d2\u5188","\u51e4\u51f0\u57ce","\u8d39\u5229\u8499","\u7845\u8c37","\u77fd\u8c37","\u62c9\u65af\u7ef4\u52a0\u65af","\u6d1b\u6749\u77f6","\u5723\u4f55\u585e","\u5723\u514b\u62c9\u62c9","\u897f\u96c5\u56fe","\u829d\u52a0\u54e5","\u6caa\u7f8e","\u54e5\u4f26\u5e03","\u7ebd\u7ea6","Los Angeles","San Jose","Sillicon Valley","Michigan"],"\ud83c\uddfa\ud83c\uddfe":["Uruguay","\u4e4c\u62c9\u572d"],"\ud83c\uddfb\ud83c\uddea":["Venezuela","\u59d4\u5185\u745e\u62c9"],"\ud83c\uddfb\ud83c\uddf3":["Vietnam","\u8d8a\u5357","\u80e1\u5fd7\u660e"],"\ud83c\uddff\ud83c\udde6":["South Africa","\u5357\u975e"],"\ud83c\udde8\ud83c\uddf3":["China","\u4e2d\u56fd","\u4e2d\u570b","\u56de\u56fd","\u56de\u570b","\u56fd\u5185","\u570b\u5167","\u534e\u4e1c","\u534e\u897f","\u534e\u5357","\u534e\u5317","\u534e\u4e2d","\u6c5f\u82cf","\u5317\u4eac","\u4e0a\u6d77","\u5e7f\u5dde","\u6df1\u5733","\u676d\u5dde","\u5f90\u5dde","\u9752\u5c9b","\u5b81\u6ce2","\u9547\u6c5f"]},n={"\ud83c\udff3\ufe0f\u200d\ud83c\udf08":["EXP","BAND"],"\ud83c\uddf8\ud83c\uddf1":["TEST","SOS"],"\ud83c\udde6\ud83c\udde9":["AD","AND"],"\ud83c\udde6\ud83c\uddea":["AE","ARE"],"\ud83c\udde6\ud83c\uddeb":["AF","AFG"],"\ud83c\udde6\ud83c\uddf1":["AL","ALB"],"\ud83c\udde6\ud83c\uddf2":["AM","ARM"],"\ud83c\udde6\ud83c\uddf7":["AR","ARG"],"\ud83c\udde6\ud83c\uddf9":["AT","AUT"],"\ud83c\udde6\ud83c\uddfa":["AU","AUS"],"\ud83c\udde6\ud83c\uddff":["AZ","AZE"],"\ud83c\udde7\ud83c\udde6":["BA","BIH"],"\ud83c\udde7\ud83c\udde9":["BD","BGD"],"\ud83c\udde7\ud83c\uddea":["BE","BEL"],"\ud83c\udde7\ud83c\uddec":["BG","BGR"],"\ud83c\udde7\ud83c\udded":["BH","BHR"],"\ud83c\udde7\ud83c\uddf7":["BR","BRA"],"\ud83c\udde7\ud83c\uddfe":["BY","BLR"],"\ud83c\udde8\ud83c\udde6":["CA","CAN"],"\ud83c\udde8\ud83c\udded":["CH","CHE"],"\ud83c\udde8\ud83c\uddf1":["CL","CHL"],"\ud83c\udde8\ud83c\uddf4":["CO","COL"],"\ud83c\udde8\ud83c\uddf7":["CR","CRI"],"\ud83c\udde8\ud83c\uddfe":["CY","CYP"],"\ud83c\udde8\ud83c\uddff":["CZ","CZE"],"\ud83c\udde9\ud83c\uddea":["DE","DEU"],"\ud83c\udde9\ud83c\uddf0":["DK","DNK"],"\ud83c\uddea\ud83c\udde8":["EC","ECU"],"\ud83c\uddea\ud83c\uddea":["EE","EST"],"\ud83c\uddea\ud83c\uddec":["EG","EGY"],"\ud83c\uddea\ud83c\uddf8":["ES","ESP"],"\ud83c\uddea\ud83c\uddfa":["EU"],"\ud83c\uddeb\ud83c\uddee":["FI","FIN"],"\ud83c\uddeb\ud83c\uddf7":["FR","FRA"],"\ud83c\uddec\ud83c\udde7":["GB","GBR","UK"],"\ud83c\uddec\ud83c\uddea":["GE","GEO"],"\ud83c\uddec\ud83c\uddf7":["GR","GRC"],"\ud83c\udded\ud83c\uddf0":["HK","HKG","HKT","HKBN","HGC","WTT","CMI"],"\ud83c\udded\ud83c\uddf7":["HR","HRV"],"\ud83c\udded\ud83c\uddfa":["HU","HUN"],"\ud83c\uddef\ud83c\uddf4":["JO","JOR"],"\ud83c\uddef\ud83c\uddf5":["JP","JPN"],"\ud83c\uddf0\ud83c\uddea":["KE","KEN"],"\ud83c\uddf0\ud83c\uddec":["KG","KGZ"],"\ud83c\uddf0\ud83c\udded":["KH","KGZ"],"\ud83c\uddf0\ud83c\uddf5":["KP","PRK"],"\ud83c\uddf0\ud83c\uddf7":["KR","KOR"],"\ud83c\uddf0\ud83c\uddff":["KZ","KAZ"],"\ud83c\uddee\ud83c\udde9":["ID","IDN"],"\ud83c\uddee\ud83c\uddea":["IE","IRL"],"\ud83c\uddee\ud83c\uddf1":["IL","ISR"],"\ud83c\uddee\ud83c\uddf2":["IM","IMN"],"\ud83c\uddee\ud83c\uddf3":["IN","IND"],"\ud83c\uddee\ud83c\uddf7":["IR","IRN"],"\ud83c\uddee\ud83c\uddf8":["IS","ISL"],"\ud83c\uddee\ud83c\uddf9":["IT","ITA"],"\ud83c\uddf1\ud83c\uddf9":["LT","LTU"],"\ud83c\uddf1\ud83c\uddfa":["LU","LUX"],"\ud83c\uddf1\ud83c\uddfb":["LV","LVA"],"\ud83c\uddf2\ud83c\udde6":["MA","MAR"],"\ud83c\uddf2\ud83c\udde9":["MD","MDA"],"\ud83c\uddf3\ud83c\uddec":["NG","NGA"],"\ud83c\uddf2\ud83c\uddf0":["MK","MKD"],"\ud83c\uddf2\ud83c\uddf3":["MN","MNG"],"\ud83c\uddf2\ud83c\uddf4":["MO","MAC","CTM"],"\ud83c\uddf2\ud83c\uddf9":["MT","MLT"],"\ud83c\uddf2\ud83c\uddfd":["MX","MEX"],"\ud83c\uddf2\ud83c\uddfe":["MY","MYS"],"\ud83c\uddf3\ud83c\uddf1":["NL","NLD"],"\ud83c\uddf3\ud83c\uddf4":["NO","NOR"],"\ud83c\uddf3\ud83c\uddf5":["NP","NPL"],"\ud83c\uddf3\ud83c\uddff":["NZ","NZL"],"\ud83c\uddf5\ud83c\udde6":["PA","PAN"],"\ud83c\uddf5\ud83c\uddea":["PE","PER"],"\ud83c\uddf5\ud83c\udded":["PH","PHL"],"\ud83c\uddf5\ud83c\uddf0":["PK","PAK"],"\ud83c\uddf5\ud83c\uddf1":["PL","POL"],"\ud83c\uddf5\ud83c\uddf7":["PR","PRI"],"\ud83c\uddf5\ud83c\uddf9":["PT","PRT"],"\ud83c\uddf5\ud83c\uddfe":["PY","PRY"],"\ud83c\uddf7\ud83c\uddf4":["RO","ROU"],"\ud83c\uddf7\ud83c\uddf8":["RS","SRB"],"\ud83c\uddf7\ud83c\uddea":["RE","REU"],"\ud83c\uddf7\ud83c\uddfa":["RU","RUS"],"\ud83c\uddf8\ud83c\udde6":["SA","SAU"],"\ud83c\uddf8\ud83c\uddea":["SE","SWE"],"\ud83c\uddf8\ud83c\uddec":["SG","SGP"],"\ud83c\uddf8\ud83c\uddee":["SI","SVN"],"\ud83c\uddf8\ud83c\uddf0":["SK","SVK"],"\ud83c\uddf9\ud83c\udded":["TH","THA"],"\ud83c\uddf9\ud83c\uddf3":["TN","TUN"],"\ud83c\uddf9\ud83c\uddf7":["TR","TUR"],"\ud83c\uddf9\ud83c\uddfc":["TW","TWN","CHT","HINET"],"\ud83c\uddfa\ud83c\udde6":["UA","UKR"],"\ud83c\uddfa\ud83c\uddf8":["US","USA","LAX","SFO"],"\ud83c\uddfa\ud83c\uddfe":["UY","URY"],"\ud83c\uddfb\ud83c\uddea":["VE","VEN"],"\ud83c\uddfb\ud83c\uddf3":["VN","VNM"],"\ud83c\uddff\ud83c\udde6":["ZA","ZAF"],"\ud83c\udde8\ud83c\uddf3":["CN","CHN","BACK"]},o=(null===(e=t.match(/[\uD83C][\uDDE6-\uDDFF][\uD83C][\uDDE6-\uDDFF]/))||void 0===e?void 0:e[0])||"\ud83c\udff4\u200d\u2620\ufe0f",a=0,i=Object.keys(r);a<i.length;a++){var u=i[a];if(r[u].some((function(e){return RegExp("".concat(e),"i").test(t)})))return u}for(var s=0,c=Object.keys(n);s<c.length;s++){var l=c[s];if(n[l].some((function(e){return RegExp("(^|[^a-zA-Z])".concat(e,"([^a-zA-Z]|$)")).test(t)})))return l}return o};var _$lodash_35={exports:{}};(function(t){(function(){(function(){var e="Expected a function",r="__lodash_placeholder__",n=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],o="[object Arguments]",a="[object Array]",i="[object Boolean]",u="[object Date]",s="[object Error]",c="[object Function]",l="[object GeneratorFunction]",p="[object Map]",f="[object Number]",_="[object Object]",h="[object RegExp]",d="[object Set]",y="[object String]",v="[object Symbol]",g="[object WeakMap]",m="[object ArrayBuffer]",b="[object DataView]",A="[object Float32Array]",E="[object Float64Array]",w="[object Int8Array]",C="[object Int16Array]",S="[object Int32Array]",x="[object Uint8Array]",$="[object Uint16Array]",O="[object Uint32Array]",P=/\b__p \+= '';/g,F=/\b(__p \+=) '' \+/g,R=/(__e\(.*?\)|\b__t\)) \+\n'';/g,L=/&(?:amp|lt|gt|quot|#39);/g,T=/[&<>"']/g,I=RegExp(L.source),k=RegExp(T.source),j=/<%-([\s\S]+?)%>/g,D=/<%([\s\S]+?)%>/g,N=/<%=([\s\S]+?)%>/g,B=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,M=/^\w*$/,U=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,G=/[\\^$.*+?()[\]{}|]/g,H=RegExp(G.source),q=/^\s+/,Y=/\s/,K=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,z=/\{\n\/\* \[wrapped with (.+)\] \*/,W=/,? & /,V=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,J=/[()=,{}\[\]\/\s]/,X=/\\(\\)?/g,Q=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Z=/\w*$/,tt=/^[-+]0x[0-9a-f]+$/i,et=/^0b[01]+$/i,rt=/^\[object .+?Constructor\]$/,nt=/^0o[0-7]+$/i,ot=/^(?:0|[1-9]\d*)$/,at=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,it=/($^)/,ut=/['\n\r\u2028\u2029\\]/g,st="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ct="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",lt="["+ct+"]",pt="["+st+"]",ft="\\d+",_t="[a-z\\xdf-\\xf6\\xf8-\\xff]",ht="[^\\ud800-\\udfff"+ct+ft+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",dt="\\ud83c[\\udffb-\\udfff]",yt="[^\\ud800-\\udfff]",vt="(?:\\ud83c[\\udde6-\\uddff]){2}",gt="[\\ud800-\\udbff][\\udc00-\\udfff]",mt="[A-Z\\xc0-\\xd6\\xd8-\\xde]",bt="(?:"+_t+"|"+ht+")",At="(?:"+mt+"|"+ht+")",Et="(?:"+pt+"|"+dt+")?",wt="[\\ufe0e\\ufe0f]?"+Et+"(?:\\u200d(?:"+[yt,vt,gt].join("|")+")[\\ufe0e\\ufe0f]?"+Et+")*",Ct="(?:"+["[\\u2700-\\u27bf]",vt,gt].join("|")+")"+wt,St="(?:"+[yt+pt+"?",pt,vt,gt,"[\\ud800-\\udfff]"].join("|")+")",xt=RegExp("['\u2019]","g"),$t=RegExp(pt,"g"),Ot=RegExp(dt+"(?="+dt+")|"+St+wt,"g"),Pt=RegExp([mt+"?"+_t+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?="+[lt,mt,"$"].join("|")+")",At+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?="+[lt,mt+bt,"$"].join("|")+")",mt+"?"+bt+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?",mt+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ft,Ct].join("|"),"g"),Ft=RegExp("[\\u200d\\ud800-\\udfff"+st+"\\ufe0e\\ufe0f]"),Rt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Lt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Tt=-1,It={};It[A]=It[E]=It[w]=It[C]=It[S]=It[x]=It["[object Uint8ClampedArray]"]=It[$]=It[O]=!0,It[o]=It[a]=It[m]=It[i]=It[b]=It[u]=It[s]=It[c]=It[p]=It[f]=It[_]=It[h]=It[d]=It[y]=It[g]=!1;var kt={};kt[o]=kt[a]=kt[m]=kt[b]=kt[i]=kt[u]=kt[A]=kt[E]=kt[w]=kt[C]=kt[S]=kt[p]=kt[f]=kt[_]=kt[h]=kt[d]=kt[y]=kt[v]=kt[x]=kt["[object Uint8ClampedArray]"]=kt[$]=kt[O]=!0,kt[s]=kt[c]=kt[g]=!1;var jt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Dt=parseFloat,Nt=parseInt,Bt="object"==typeof t&&t&&t.Object===Object&&t,Mt="object"==typeof self&&self&&self.Object===Object&&self,Ut=Bt||Mt||Function("return this")(),Gt="object"==typeof _$lodash_35.exports&&_$lodash_35.exports&&!_$lodash_35.exports.nodeType&&_$lodash_35.exports,Ht=Gt&&_$lodash_35&&!_$lodash_35.nodeType&&_$lodash_35,qt=Ht&&Ht.exports===Gt,Yt=qt&&Bt.process,Kt=function(){try{return Ht&&Ht.require&&Ht.require("util").types||Yt&&Yt.binding&&Yt.binding("util")}catch(t){}}(),zt=Kt&&Kt.isArrayBuffer,Wt=Kt&&Kt.isDate,Vt=Kt&&Kt.isMap,Jt=Kt&&Kt.isRegExp,Xt=Kt&&Kt.isSet,Qt=Kt&&Kt.isTypedArray;function Zt(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function te(t,e,r,n){for(var o=-1,a=null==t?0:t.length;++o<a;){var i=t[o];e(n,i,r(i),t)}return n}function ee(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}function re(t,e){for(var r=null==t?0:t.length;r--&&!1!==e(t[r],r,t););return t}function ne(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}function oe(t,e){for(var r=-1,n=null==t?0:t.length,o=0,a=[];++r<n;){var i=t[r];e(i,r,t)&&(a[o++]=i)}return a}function ae(t,e){return!(null==t||!t.length)&&de(t,e,0)>-1}function ie(t,e,r){for(var n=-1,o=null==t?0:t.length;++n<o;)if(r(e,t[n]))return!0;return!1}function ue(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}function se(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}function ce(t,e,r,n){var o=-1,a=null==t?0:t.length;for(n&&a&&(r=t[++o]);++o<a;)r=e(r,t[o],o,t);return r}function le(t,e,r,n){var o=null==t?0:t.length;for(n&&o&&(r=t[--o]);o--;)r=e(r,t[o],o,t);return r}function pe(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var fe=me("length");function _e(t,e,r){var n;return r(t,(function(t,r,o){if(e(t,r,o))return n=r,!1})),n}function he(t,e,r,n){for(var o=t.length,a=r+(n?1:-1);n?a--:++a<o;)if(e(t[a],a,t))return a;return-1}function de(t,e,r){return e==e?function(t,e,r){for(var n=r-1,o=t.length;++n<o;)if(t[n]===e)return n;return-1}(t,e,r):he(t,ve,r)}function ye(t,e,r,n){for(var o=r-1,a=t.length;++o<a;)if(n(t[o],e))return o;return-1}function ve(t){return t!=t}function ge(t,e){var r=null==t?0:t.length;return r?Ee(t,e)/r:NaN}function me(t){return function(e){return null==e?void 0:e[t]}}function be(t){return function(e){return null==t?void 0:t[e]}}function Ae(t,e,r,n,o){return o(t,(function(t,o,a){r=n?(n=!1,t):e(r,t,o,a)})),r}function Ee(t,e){for(var r,n=-1,o=t.length;++n<o;){var a=e(t[n]);void 0!==a&&(r=void 0===r?a:r+a)}return r}function we(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function Ce(t){return t?t.slice(0,Ue(t)+1).replace(q,""):t}function Se(t){return function(e){return t(e)}}function xe(t,e){return ue(e,(function(e){return t[e]}))}function $e(t,e){return t.has(e)}function Oe(t,e){for(var r=-1,n=t.length;++r<n&&de(e,t[r],0)>-1;);return r}function Pe(t,e){for(var r=t.length;r--&&de(e,t[r],0)>-1;);return r}var Fe=be({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),Re=be({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Le(t){return"\\"+jt[t]}function Te(t){return Ft.test(t)}function Ie(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function ke(t,e){return function(r){return t(e(r))}}function je(t,e){for(var n=-1,o=t.length,a=0,i=[];++n<o;){var u=t[n];u!==e&&u!==r||(t[n]=r,i[a++]=n)}return i}function De(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}function Ne(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=[t,t]})),r}function Be(t){return Te(t)?function(t){for(var e=Ot.lastIndex=0;Ot.test(t);)++e;return e}(t):fe(t)}function Me(t){return Te(t)?function(t){return t.match(Ot)||[]}(t):function(t){return t.split("")}(t)}function Ue(t){for(var e=t.length;e--&&Y.test(t.charAt(e)););return e}var Ge=be({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),He=function t(Y){var st,ct=(Y=null==Y?Ut:He.defaults(Ut.Object(),Y,He.pick(Ut,Lt))).Array,lt=Y.Date,pt=Y.Error,ft=Y.Function,_t=Y.Math,ht=Y.Object,dt=Y.RegExp,yt=Y.String,vt=Y.TypeError,gt=ct.prototype,mt=ft.prototype,bt=ht.prototype,At=Y["__core-js_shared__"],Et=mt.toString,wt=bt.hasOwnProperty,Ct=0,St=(st=/[^.]+$/.exec(At&&At.keys&&At.keys.IE_PROTO||""))?"Symbol(src)_1."+st:"",Ot=bt.toString,Ft=Et.call(ht),jt=Ut._,Bt=dt("^"+Et.call(wt).replace(G,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Mt=qt?Y.Buffer:void 0,Gt=Y.Symbol,Ht=Y.Uint8Array,Yt=Mt?Mt.allocUnsafe:void 0,Kt=ke(ht.getPrototypeOf,ht),fe=ht.create,be=bt.propertyIsEnumerable,qe=gt.splice,Ye=Gt?Gt.isConcatSpreadable:void 0,Ke=Gt?Gt.iterator:void 0,ze=Gt?Gt.toStringTag:void 0,We=function(){try{var t=Zo(ht,"defineProperty");return t({},"",{}),t}catch(e){}}(),Ve=Y.clearTimeout!==Ut.clearTimeout&&Y.clearTimeout,Je=lt&&lt.now!==Ut.Date.now&&lt.now,Xe=Y.setTimeout!==Ut.setTimeout&&Y.setTimeout,Qe=_t.ceil,Ze=_t.floor,tr=ht.getOwnPropertySymbols,er=Mt?Mt.isBuffer:void 0,rr=Y.isFinite,nr=gt.join,or=ke(ht.keys,ht),ar=_t.max,ir=_t.min,ur=lt.now,sr=Y.parseInt,cr=_t.random,lr=gt.reverse,pr=Zo(Y,"DataView"),fr=Zo(Y,"Map"),_r=Zo(Y,"Promise"),hr=Zo(Y,"Set"),dr=Zo(Y,"WeakMap"),yr=Zo(ht,"create"),vr=dr&&new dr,gr={},mr=$a(pr),br=$a(fr),Ar=$a(_r),Er=$a(hr),wr=$a(dr),Cr=Gt?Gt.prototype:void 0,Sr=Cr?Cr.valueOf:void 0,xr=Cr?Cr.toString:void 0;function $r(t){if(qi(t)&&!Ti(t)&&!(t instanceof Rr)){if(t instanceof Fr)return t;if(wt.call(t,"__wrapped__"))return Oa(t)}return new Fr(t)}var Or=function(){function t(){}return function(e){if(!Hi(e))return{};if(fe)return fe(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();function Pr(){}function Fr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}function Rr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Lr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Tr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Ir(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function kr(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new Ir;++e<r;)this.add(t[e])}function jr(t){var e=this.__data__=new Tr(t);this.size=e.size}function Dr(t,e){var r=Ti(t),n=!r&&Li(t),o=!r&&!n&&Di(t),a=!r&&!n&&!o&&Qi(t),i=r||n||o||a,u=i?we(t.length,yt):[],s=u.length;for(var c in t)!e&&!wt.call(t,c)||i&&("length"==c||o&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ia(c,s))||u.push(c);return u}function Nr(t){var e=t.length;return e?t[kn(0,e-1)]:void 0}function Br(t,e){return Ea(vo(t),Wr(e,0,t.length))}function Mr(t){return Ea(vo(t))}function Ur(t,e,r){(void 0===r||Pi(t[e],r))&&(void 0!==r||e in t)||Kr(t,e,r)}function Gr(t,e,r){var n=t[e];wt.call(t,e)&&Pi(n,r)&&(void 0!==r||e in t)||Kr(t,e,r)}function Hr(t,e){for(var r=t.length;r--;)if(Pi(t[r][0],e))return r;return-1}function qr(t,e,r,n){return Zr(t,(function(t,o,a){e(n,t,r(t),a)})),n}function Yr(t,e){return t&&go(e,bu(e),t)}function Kr(t,e,r){"__proto__"==e&&We?We(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function zr(t,e){for(var r=-1,n=e.length,o=ct(n),a=null==t;++r<n;)o[r]=a?void 0:du(t,e[r]);return o}function Wr(t,e,r){return t==t&&(void 0!==r&&(t=t<=r?t:r),void 0!==e&&(t=t>=e?t:e)),t}function Vr(t,e,r,n,a,s){var g,P=1&e,F=2&e,R=4&e;if(r&&(g=a?r(t,n,a,s):r(t)),void 0!==g)return g;if(!Hi(t))return t;var L=Ti(t);if(L){if(g=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&wt.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(t),!P)return vo(t,g)}else{var T=ra(t),I=T==c||T==l;if(Di(t))return lo(t,P);if(T==_||T==o||I&&!a){if(g=F||I?{}:oa(t),!P)return F?function(t,e){return go(t,ea(t),e)}(t,function(t,e){return t&&go(e,Au(e),t)}(g,t)):function(t,e){return go(t,ta(t),e)}(t,Yr(g,t))}else{if(!kt[T])return a?t:{};g=function(t,e,r){var n,o,a,s=t.constructor;switch(e){case m:return po(t);case i:case u:return new s(+t);case b:return function(t,e){var r=e?po(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case A:case E:case w:case C:case S:case x:case"[object Uint8ClampedArray]":case $:case O:return fo(t,r);case p:return new s;case f:case y:return new s(t);case h:return(a=new(o=t).constructor(o.source,Z.exec(o))).lastIndex=o.lastIndex,a;case d:return new s;case v:return n=t,Sr?ht(Sr.call(n)):{}}}(t,T,P)}}s||(s=new jr);var k=s.get(t);if(k)return k;s.set(t,g),Vi(t)?t.forEach((function(n){g.add(Vr(n,e,r,n,t,s))})):Yi(t)&&t.forEach((function(n,o){g.set(o,Vr(n,e,r,o,t,s))}));var j=L?void 0:(R?F?Ko:Yo:F?Au:bu)(t);return ee(j||t,(function(n,o){j&&(n=t[o=n]),Gr(g,o,Vr(n,e,r,o,t,s))})),g}function Jr(t,e,r){var n=r.length;if(null==t)return!n;for(t=ht(t);n--;){var o=r[n],a=e[o],i=t[o];if(void 0===i&&!(o in t)||!a(i))return!1}return!0}function Xr(t,r,n){if("function"!=typeof t)throw new vt(e);return ga((function(){t.apply(void 0,n)}),r)}function Qr(t,e,r,n){var o=-1,a=ae,i=!0,u=t.length,s=[],c=e.length;if(!u)return s;r&&(e=ue(e,Se(r))),n?(a=ie,i=!1):e.length>=200&&(a=$e,i=!1,e=new kr(e));t:for(;++o<u;){var l=t[o],p=null==r?l:r(l);if(l=n||0!==l?l:0,i&&p==p){for(var f=c;f--;)if(e[f]===p)continue t;s.push(l)}else a(e,p,n)||s.push(l)}return s}$r.templateSettings={escape:j,evaluate:D,interpolate:N,variable:"",imports:{_:$r}},$r.prototype=Pr.prototype,$r.prototype.constructor=$r,Fr.prototype=Or(Pr.prototype),Fr.prototype.constructor=Fr,Rr.prototype=Or(Pr.prototype),Rr.prototype.constructor=Rr,Lr.prototype.clear=function(){this.__data__=yr?yr(null):{},this.size=0},Lr.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Lr.prototype.get=function(t){var e=this.__data__;if(yr){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return wt.call(e,t)?e[t]:void 0},Lr.prototype.has=function(t){var e=this.__data__;return yr?void 0!==e[t]:wt.call(e,t)},Lr.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=yr&&void 0===e?"__lodash_hash_undefined__":e,this},Tr.prototype.clear=function(){this.__data__=[],this.size=0},Tr.prototype.delete=function(t){var e=this.__data__,r=Hr(e,t);return!(r<0||(r==e.length-1?e.pop():qe.call(e,r,1),--this.size,0))},Tr.prototype.get=function(t){var e=this.__data__,r=Hr(e,t);return r<0?void 0:e[r][1]},Tr.prototype.has=function(t){return Hr(this.__data__,t)>-1},Tr.prototype.set=function(t,e){var r=this.__data__,n=Hr(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},Ir.prototype.clear=function(){this.size=0,this.__data__={hash:new Lr,map:new(fr||Tr),string:new Lr}},Ir.prototype.delete=function(t){var e=Xo(this,t).delete(t);return this.size-=e?1:0,e},Ir.prototype.get=function(t){return Xo(this,t).get(t)},Ir.prototype.has=function(t){return Xo(this,t).has(t)},Ir.prototype.set=function(t,e){var r=Xo(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},kr.prototype.add=kr.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},kr.prototype.has=function(t){return this.__data__.has(t)},jr.prototype.clear=function(){this.__data__=new Tr,this.size=0},jr.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},jr.prototype.get=function(t){return this.__data__.get(t)},jr.prototype.has=function(t){return this.__data__.has(t)},jr.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Tr){var n=r.__data__;if(!fr||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Ir(n)}return r.set(t,e),this.size=r.size,this};var Zr=Ao(sn),tn=Ao(cn,!0);function en(t,e){var r=!0;return Zr(t,(function(t,n,o){return r=!!e(t,n,o)})),r}function rn(t,e,r){for(var n=-1,o=t.length;++n<o;){var a=t[n],i=e(a);if(null!=i&&(void 0===u?i==i&&!Xi(i):r(i,u)))var u=i,s=a}return s}function nn(t,e){var r=[];return Zr(t,(function(t,n,o){e(t,n,o)&&r.push(t)})),r}function on(t,e,r,n,o){var a=-1,i=t.length;for(r||(r=aa),o||(o=[]);++a<i;){var u=t[a];e>0&&r(u)?e>1?on(u,e-1,r,n,o):se(o,u):n||(o[o.length]=u)}return o}var an=Eo(),un=Eo(!0);function sn(t,e){return t&&an(t,e,bu)}function cn(t,e){return t&&un(t,e,bu)}function ln(t,e){return oe(e,(function(e){return Mi(t[e])}))}function pn(t,e){for(var r=0,n=(e=io(e,t)).length;null!=t&&r<n;)t=t[xa(e[r++])];return r&&r==n?t:void 0}function fn(t,e,r){var n=e(t);return Ti(t)?n:se(n,r(t))}function _n(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":ze&&ze in ht(t)?function(t){var e=wt.call(t,ze),r=t[ze];try{t[ze]=void 0;var n=!0}catch(a){}var o=Ot.call(t);return n&&(e?t[ze]=r:delete t[ze]),o}(t):function(t){return Ot.call(t)}(t)}function hn(t,e){return t>e}function dn(t,e){return null!=t&&wt.call(t,e)}function yn(t,e){return null!=t&&e in ht(t)}function vn(t,e,r){for(var n=r?ie:ae,o=t[0].length,a=t.length,i=a,u=ct(a),s=1/0,c=[];i--;){var l=t[i];i&&e&&(l=ue(l,Se(e))),s=ir(l.length,s),u[i]=!r&&(e||o>=120&&l.length>=120)?new kr(i&&l):void 0}l=t[0];var p=-1,f=u[0];t:for(;++p<o&&c.length<s;){var _=l[p],h=e?e(_):_;if(_=r||0!==_?_:0,!(f?$e(f,h):n(c,h,r))){for(i=a;--i;){var d=u[i];if(!(d?$e(d,h):n(t[i],h,r)))continue t}f&&f.push(h),c.push(_)}}return c}function gn(t,e,r){var n=null==(t=da(t,e=io(e,t)))?t:t[xa(Ba(e))];return null==n?void 0:Zt(n,t,r)}function mn(t){return qi(t)&&_n(t)==o}function bn(t,e,r,n,c){return t===e||(null==t||null==e||!qi(t)&&!qi(e)?t!=t&&e!=e:function(t,e,r,n,c,l){var g=Ti(t),A=Ti(e),E=g?a:ra(t),w=A?a:ra(e),C=(E=E==o?_:E)==_,S=(w=w==o?_:w)==_,x=E==w;if(x&&Di(t)){if(!Di(e))return!1;g=!0,C=!1}if(x&&!C)return l||(l=new jr),g||Qi(t)?Ho(t,e,r,n,c,l):function(t,e,r,n,o,a,c){switch(r){case b:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case m:return!(t.byteLength!=e.byteLength||!a(new Ht(t),new Ht(e)));case i:case u:case f:return Pi(+t,+e);case s:return t.name==e.name&&t.message==e.message;case h:case y:return t==e+"";case p:var l=Ie;case d:var _=1&n;if(l||(l=De),t.size!=e.size&&!_)return!1;var g=c.get(t);if(g)return g==e;n|=2,c.set(t,e);var A=Ho(l(t),l(e),n,o,a,c);return c.delete(t),A;case v:if(Sr)return Sr.call(t)==Sr.call(e)}return!1}(t,e,E,r,n,c,l);if(!(1&r)){var $=C&&wt.call(t,"__wrapped__"),O=S&&wt.call(e,"__wrapped__");if($||O){var P=$?t.value():t,F=O?e.value():e;return l||(l=new jr),c(P,F,r,n,l)}}return!!x&&(l||(l=new jr),function(t,e,r,n,o,a){var i=1&r,u=Yo(t),s=u.length;if(s!=Yo(e).length&&!i)return!1;for(var c=s;c--;){var l=u[c];if(!(i?l in e:wt.call(e,l)))return!1}var p=a.get(t),f=a.get(e);if(p&&f)return p==e&&f==t;var _=!0;a.set(t,e),a.set(e,t);for(var h=i;++c<s;){var d=t[l=u[c]],y=e[l];if(n)var v=i?n(y,d,l,e,t,a):n(d,y,l,t,e,a);if(!(void 0===v?d===y||o(d,y,r,n,a):v)){_=!1;break}h||(h="constructor"==l)}if(_&&!h){var g=t.constructor,m=e.constructor;g!=m&&"constructor"in t&&"constructor"in e&&!("function"==typeof g&&g instanceof g&&"function"==typeof m&&m instanceof m)&&(_=!1)}return a.delete(t),a.delete(e),_}(t,e,r,n,c,l))}(t,e,r,n,bn,c))}function An(t,e,r,n){var o=r.length,a=o,i=!n;if(null==t)return!a;for(t=ht(t);o--;){var u=r[o];if(i&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<a;){var s=(u=r[o])[0],c=t[s],l=u[1];if(i&&u[2]){if(void 0===c&&!(s in t))return!1}else{var p=new jr;if(n)var f=n(c,l,s,t,e,p);if(!(void 0===f?bn(l,c,3,n,p):f))return!1}}return!0}function En(t){return!(!Hi(t)||(e=t,St&&St in e))&&(Mi(t)?Bt:rt).test($a(t));var e}function wn(t){return"function"==typeof t?t:null==t?Ku:"object"==typeof t?Ti(t)?On(t[0],t[1]):$n(t):es(t)}function Cn(t){if(!pa(t))return or(t);var e=[];for(var r in ht(t))wt.call(t,r)&&"constructor"!=r&&e.push(r);return e}function Sn(t,e){return t<e}function xn(t,e){var r=-1,n=ki(t)?ct(t.length):[];return Zr(t,(function(t,o,a){n[++r]=e(t,o,a)})),n}function $n(t){var e=Qo(t);return 1==e.length&&e[0][2]?_a(e[0][0],e[0][1]):function(r){return r===t||An(r,t,e)}}function On(t,e){return sa(t)&&fa(e)?_a(xa(t),e):function(r){var n=du(r,t);return void 0===n&&n===e?yu(r,t):bn(e,n,3)}}function Pn(t,e,r,n,o){t!==e&&an(e,(function(a,i){if(o||(o=new jr),Hi(a))!function(t,e,r,n,o,a,i){var u=ya(t,r),s=ya(e,r),c=i.get(s);if(c)Ur(t,r,c);else{var l=a?a(u,s,r+"",t,e,i):void 0,p=void 0===l;if(p){var f=Ti(s),_=!f&&Di(s),h=!f&&!_&&Qi(s);l=s,f||_||h?Ti(u)?l=u:ji(u)?l=vo(u):_?(p=!1,l=lo(s,!0)):h?(p=!1,l=fo(s,!0)):l=[]:zi(s)||Li(s)?(l=u,Li(u)?l=iu(u):Hi(u)&&!Mi(u)||(l=oa(s))):p=!1}p&&(i.set(s,l),o(l,s,n,a,i),i.delete(s)),Ur(t,r,l)}}(t,e,i,r,Pn,n,o);else{var u=n?n(ya(t,i),a,i+"",t,e,o):void 0;void 0===u&&(u=a),Ur(t,i,u)}}),Au)}function Fn(t,e){var r=t.length;if(r)return ia(e+=e<0?r:0,r)?t[e]:void 0}function Rn(t,e,r){e=e.length?ue(e,(function(t){return Ti(t)?function(e){return pn(e,1===t.length?t[0]:t)}:t})):[Ku];var n=-1;return e=ue(e,Se(Jo())),function(t,e){var n=t.length;for(t.sort((function(t,e){return function(t,e,r){for(var n=-1,o=t.criteria,a=e.criteria,i=o.length,u=r.length;++n<i;){var s=_o(o[n],a[n]);if(s)return n>=u?s:s*("desc"==r[n]?-1:1)}return t.index-e.index}(t,e,r)}));n--;)t[n]=t[n].value;return t}(xn(t,(function(t,r,o){return{criteria:ue(e,(function(e){return e(t)})),index:++n,value:t}})))}function Ln(t,e,r){for(var n=-1,o=e.length,a={};++n<o;){var i=e[n],u=pn(t,i);r(u,i)&&Mn(a,io(i,t),u)}return a}function Tn(t,e,r,n){var o=n?ye:de,a=-1,i=e.length,u=t;for(t===e&&(e=vo(e)),r&&(u=ue(t,Se(r)));++a<i;)for(var s=0,c=e[a],l=r?r(c):c;(s=o(u,l,s,n))>-1;)u!==t&&qe.call(u,s,1),qe.call(t,s,1);return t}function In(t,e){for(var r=t?e.length:0,n=r-1;r--;){var o=e[r];if(r==n||o!==a){var a=o;ia(o)?qe.call(t,o,1):Qn(t,o)}}return t}function kn(t,e){return t+Ze(cr()*(e-t+1))}function jn(t,e){var r="";if(!t||e<1||e>9007199254740991)return r;do{e%2&&(r+=t),(e=Ze(e/2))&&(t+=t)}while(e);return r}function Dn(t,e){return ma(ha(t,e,Ku),t+"")}function Nn(t){return Nr(Pu(t))}function Bn(t,e){var r=Pu(t);return Ea(r,Wr(e,0,r.length))}function Mn(t,e,r,n){if(!Hi(t))return t;for(var o=-1,a=(e=io(e,t)).length,i=a-1,u=t;null!=u&&++o<a;){var s=xa(e[o]),c=r;if("__proto__"===s||"constructor"===s||"prototype"===s)return t;if(o!=i){var l=u[s];void 0===(c=n?n(l,s,u):void 0)&&(c=Hi(l)?l:ia(e[o+1])?[]:{})}Gr(u,s,c),u=u[s]}return t}var Un=vr?function(t,e){return vr.set(t,e),t}:Ku,Gn=We?function(t,e){return We(t,"toString",{configurable:!0,enumerable:!1,value:Hu(e),writable:!0})}:Ku;function Hn(t){return Ea(Pu(t))}function qn(t,e,r){var n=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(r=r>o?o:r)<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var a=ct(o);++n<o;)a[n]=t[n+e];return a}function Yn(t,e){var r;return Zr(t,(function(t,n,o){return!(r=e(t,n,o))})),!!r}function Kn(t,e,r){var n=0,o=null==t?n:t.length;if("number"==typeof e&&e==e&&o<=2147483647){for(;n<o;){var a=n+o>>>1,i=t[a];null!==i&&!Xi(i)&&(r?i<=e:i<e)?n=a+1:o=a}return o}return zn(t,e,Ku,r)}function zn(t,e,r,n){var o=0,a=null==t?0:t.length;if(0===a)return 0;for(var i=(e=r(e))!=e,u=null===e,s=Xi(e),c=void 0===e;o<a;){var l=Ze((o+a)/2),p=r(t[l]),f=void 0!==p,_=null===p,h=p==p,d=Xi(p);if(i)var y=n||h;else y=c?h&&(n||f):u?h&&f&&(n||!_):s?h&&f&&!_&&(n||!d):!_&&!d&&(n?p<=e:p<e);y?o=l+1:a=l}return ir(a,4294967294)}function Wn(t,e){for(var r=-1,n=t.length,o=0,a=[];++r<n;){var i=t[r],u=e?e(i):i;if(!r||!Pi(u,s)){var s=u;a[o++]=0===i?0:i}}return a}function Vn(t){return"number"==typeof t?t:Xi(t)?NaN:+t}function Jn(t){if("string"==typeof t)return t;if(Ti(t))return ue(t,Jn)+"";if(Xi(t))return xr?xr.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Xn(t,e,r){var n=-1,o=ae,a=t.length,i=!0,u=[],s=u;if(r)i=!1,o=ie;else if(a>=200){var c=e?null:Do(t);if(c)return De(c);i=!1,o=$e,s=new kr}else s=e?[]:u;t:for(;++n<a;){var l=t[n],p=e?e(l):l;if(l=r||0!==l?l:0,i&&p==p){for(var f=s.length;f--;)if(s[f]===p)continue t;e&&s.push(p),u.push(l)}else o(s,p,r)||(s!==u&&s.push(p),u.push(l))}return u}function Qn(t,e){return null==(t=da(t,e=io(e,t)))||delete t[xa(Ba(e))]}function Zn(t,e,r,n){return Mn(t,e,r(pn(t,e)),n)}function to(t,e,r,n){for(var o=t.length,a=n?o:-1;(n?a--:++a<o)&&e(t[a],a,t););return r?qn(t,n?0:a,n?a+1:o):qn(t,n?a+1:0,n?o:a)}function eo(t,e){var r=t;return r instanceof Rr&&(r=r.value()),ce(e,(function(t,e){return e.func.apply(e.thisArg,se([t],e.args))}),r)}function ro(t,e,r){var n=t.length;if(n<2)return n?Xn(t[0]):[];for(var o=-1,a=ct(n);++o<n;)for(var i=t[o],u=-1;++u<n;)u!=o&&(a[o]=Qr(a[o]||i,t[u],e,r));return Xn(on(a,1),e,r)}function no(t,e,r){for(var n=-1,o=t.length,a=e.length,i={};++n<o;){var u=n<a?e[n]:void 0;r(i,t[n],u)}return i}function oo(t){return ji(t)?t:[]}function ao(t){return"function"==typeof t?t:Ku}function io(t,e){return Ti(t)?t:sa(t,e)?[t]:Sa(uu(t))}var uo=Dn;function so(t,e,r){var n=t.length;return r=void 0===r?n:r,!e&&r>=n?t:qn(t,e,r)}var co=Ve||function(t){return Ut.clearTimeout(t)};function lo(t,e){if(e)return t.slice();var r=t.length,n=Yt?Yt(r):new t.constructor(r);return t.copy(n),n}function po(t){var e=new t.constructor(t.byteLength);return new Ht(e).set(new Ht(t)),e}function fo(t,e){var r=e?po(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function _o(t,e){if(t!==e){var r=void 0!==t,n=null===t,o=t==t,a=Xi(t),i=void 0!==e,u=null===e,s=e==e,c=Xi(e);if(!u&&!c&&!a&&t>e||a&&i&&s&&!u&&!c||n&&i&&s||!r&&s||!o)return 1;if(!n&&!a&&!c&&t<e||c&&r&&o&&!n&&!a||u&&r&&o||!i&&o||!s)return-1}return 0}function ho(t,e,r,n){for(var o=-1,a=t.length,i=r.length,u=-1,s=e.length,c=ar(a-i,0),l=ct(s+c),p=!n;++u<s;)l[u]=e[u];for(;++o<i;)(p||o<a)&&(l[r[o]]=t[o]);for(;c--;)l[u++]=t[o++];return l}function yo(t,e,r,n){for(var o=-1,a=t.length,i=-1,u=r.length,s=-1,c=e.length,l=ar(a-u,0),p=ct(l+c),f=!n;++o<l;)p[o]=t[o];for(var _=o;++s<c;)p[_+s]=e[s];for(;++i<u;)(f||o<a)&&(p[_+r[i]]=t[o++]);return p}function vo(t,e){var r=-1,n=t.length;for(e||(e=ct(n));++r<n;)e[r]=t[r];return e}function go(t,e,r,n){var o=!r;r||(r={});for(var a=-1,i=e.length;++a<i;){var u=e[a],s=n?n(r[u],t[u],u,r,t):void 0;void 0===s&&(s=t[u]),o?Kr(r,u,s):Gr(r,u,s)}return r}function mo(t,e){return function(r,n){var o=Ti(r)?te:qr,a=e?e():{};return o(r,t,Jo(n,2),a)}}function bo(t){return Dn((function(e,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,i=o>2?r[2]:void 0;for(a=t.length>3&&"function"==typeof a?(o--,a):void 0,i&&ua(r[0],r[1],i)&&(a=o<3?void 0:a,o=1),e=ht(e);++n<o;){var u=r[n];u&&t(e,u,n,a)}return e}))}function Ao(t,e){return function(r,n){if(null==r)return r;if(!ki(r))return t(r,n);for(var o=r.length,a=e?o:-1,i=ht(r);(e?a--:++a<o)&&!1!==n(i[a],a,i););return r}}function Eo(t){return function(e,r,n){for(var o=-1,a=ht(e),i=n(e),u=i.length;u--;){var s=i[t?u:++o];if(!1===r(a[s],s,a))break}return e}}function wo(t){return function(e){var r=Te(e=uu(e))?Me(e):void 0,n=r?r[0]:e.charAt(0),o=r?so(r,1).join(""):e.slice(1);return n[t]()+o}}function Co(t){return function(e){return ce(Mu(Lu(e).replace(xt,"")),t,"")}}function So(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=Or(t.prototype),n=t.apply(r,e);return Hi(n)?n:r}}function xo(t){return function(e,r,n){var o=ht(e);if(!ki(e)){var a=Jo(r,3);e=bu(e),r=function(t){return a(o[t],t,o)}}var i=t(e,r,n);return i>-1?o[a?e[i]:i]:void 0}}function $o(t){return qo((function(r){var n=r.length,o=n,a=Fr.prototype.thru;for(t&&r.reverse();o--;){var i=r[o];if("function"!=typeof i)throw new vt(e);if(a&&!u&&"wrapper"==Wo(i))var u=new Fr([],!0)}for(o=u?o:n;++o<n;){var s=Wo(i=r[o]),c="wrapper"==s?zo(i):void 0;u=c&&ca(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[Wo(c[0])].apply(u,c[3]):1==i.length&&ca(i)?u[s]():u.thru(i)}return function(){var t=arguments,e=t[0];if(u&&1==t.length&&Ti(e))return u.plant(e).value();for(var o=0,a=n?r[o].apply(this,t):e;++o<n;)a=r[o].call(this,a);return a}}))}function Oo(t,e,r,n,o,a,i,u,s,c){var l=128&e,p=1&e,f=2&e,_=24&e,h=512&e,d=f?void 0:So(t);return function y(){for(var v=arguments.length,g=ct(v),m=v;m--;)g[m]=arguments[m];if(_)var b=Vo(y),A=function(t,e){for(var r=t.length,n=0;r--;)t[r]===e&&++n;return n}(g,b);if(n&&(g=ho(g,n,o,_)),a&&(g=yo(g,a,i,_)),v-=A,_&&v<c){var E=je(g,b);return ko(t,e,Oo,y.placeholder,r,g,E,u,s,c-v)}var w=p?r:this,C=f?w[t]:t;return v=g.length,u?g=function(t,e){for(var r=t.length,n=ir(e.length,r),o=vo(t);n--;){var a=e[n];t[n]=ia(a,r)?o[a]:void 0}return t}(g,u):h&&v>1&&g.reverse(),l&&s<v&&(g.length=s),this&&this!==Ut&&this instanceof y&&(C=d||So(C)),C.apply(w,g)}}function Po(t,e){return function(r,n){return function(t,e,r,n){return sn(t,(function(t,o,a){e(n,r(t),o,a)})),n}(r,t,e(n),{})}}function Fo(t,e){return function(r,n){var o;if(void 0===r&&void 0===n)return e;if(void 0!==r&&(o=r),void 0!==n){if(void 0===o)return n;"string"==typeof r||"string"==typeof n?(r=Jn(r),n=Jn(n)):(r=Vn(r),n=Vn(n)),o=t(r,n)}return o}}function Ro(t){return qo((function(e){return e=ue(e,Se(Jo())),Dn((function(r){var n=this;return t(e,(function(t){return Zt(t,n,r)}))}))}))}function Lo(t,e){var r=(e=void 0===e?" ":Jn(e)).length;if(r<2)return r?jn(e,t):e;var n=jn(e,Qe(t/Be(e)));return Te(e)?so(Me(n),0,t).join(""):n.slice(0,t)}function To(t){return function(e,r,n){return n&&"number"!=typeof n&&ua(e,r,n)&&(r=n=void 0),e=ru(e),void 0===r?(r=e,e=0):r=ru(r),function(t,e,r,n){for(var o=-1,a=ar(Qe((e-t)/(r||1)),0),i=ct(a);a--;)i[n?a:++o]=t,t+=r;return i}(e,r,n=void 0===n?e<r?1:-1:ru(n),t)}}function Io(t){return function(e,r){return"string"==typeof e&&"string"==typeof r||(e=au(e),r=au(r)),t(e,r)}}function ko(t,e,r,n,o,a,i,u,s,c){var l=8&e;e|=l?32:64,4&(e&=~(l?64:32))||(e&=-4);var p=[t,e,o,l?a:void 0,l?i:void 0,l?void 0:a,l?void 0:i,u,s,c],f=r.apply(void 0,p);return ca(t)&&va(f,p),f.placeholder=n,ba(f,t,e)}function jo(t){var e=_t[t];return function(t,r){if(t=au(t),(r=null==r?0:ir(nu(r),292))&&rr(t)){var n=(uu(t)+"e").split("e");return+((n=(uu(e(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return e(t)}}var Do=hr&&1/De(new hr([,-0]))[1]==1/0?function(t){return new hr(t)}:Xu;function No(t){return function(e){var r=ra(e);return r==p?Ie(e):r==d?Ne(e):function(t,e){return ue(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Bo(t,n,o,a,i,u,s,c){var l=2&n;if(!l&&"function"!=typeof t)throw new vt(e);var p=a?a.length:0;if(p||(n&=-97,a=i=void 0),s=void 0===s?s:ar(nu(s),0),c=void 0===c?c:nu(c),p-=i?i.length:0,64&n){var f=a,_=i;a=i=void 0}var h=l?void 0:zo(t),d=[t,n,o,a,i,f,_,u,s,c];if(h&&function(t,e){var n=t[1],o=e[1],a=n|o,i=a<131,u=128==o&&8==n||128==o&&256==n&&t[7].length<=e[8]||384==o&&e[7].length<=e[8]&&8==n;if(!i&&!u)return t;1&o&&(t[2]=e[2],a|=1&n?0:4);var s=e[3];if(s){var c=t[3];t[3]=c?ho(c,s,e[4]):s,t[4]=c?je(t[3],r):e[4]}(s=e[5])&&(c=t[5],t[5]=c?yo(c,s,e[6]):s,t[6]=c?je(t[5],r):e[6]),(s=e[7])&&(t[7]=s),128&o&&(t[8]=null==t[8]?e[8]:ir(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=a}(d,h),t=d[0],n=d[1],o=d[2],a=d[3],i=d[4],!(c=d[9]=void 0===d[9]?l?0:t.length:ar(d[9]-p,0))&&24&n&&(n&=-25),n&&1!=n)y=8==n||16==n?function(t,e,r){var n=So(t);return function o(){for(var a=arguments.length,i=ct(a),u=a,s=Vo(o);u--;)i[u]=arguments[u];var c=a<3&&i[0]!==s&&i[a-1]!==s?[]:je(i,s);return(a-=c.length)<r?ko(t,e,Oo,o.placeholder,void 0,i,c,void 0,void 0,r-a):Zt(this&&this!==Ut&&this instanceof o?n:t,this,i)}}(t,n,c):32!=n&&33!=n||i.length?Oo.apply(void 0,d):function(t,e,r,n){var o=1&e,a=So(t);return function e(){for(var i=-1,u=arguments.length,s=-1,c=n.length,l=ct(c+u),p=this&&this!==Ut&&this instanceof e?a:t;++s<c;)l[s]=n[s];for(;u--;)l[s++]=arguments[++i];return Zt(p,o?r:this,l)}}(t,n,o,a);else var y=function(t,e,r){var n=1&e,o=So(t);return function e(){return(this&&this!==Ut&&this instanceof e?o:t).apply(n?r:this,arguments)}}(t,n,o);return ba((h?Un:va)(y,d),t,n)}function Mo(t,e,r,n){return void 0===t||Pi(t,bt[r])&&!wt.call(n,r)?e:t}function Uo(t,e,r,n,o,a){return Hi(t)&&Hi(e)&&(a.set(e,t),Pn(t,e,void 0,Uo,a),a.delete(e)),t}function Go(t){return zi(t)?void 0:t}function Ho(t,e,r,n,o,a){var i=1&r,u=t.length,s=e.length;if(u!=s&&!(i&&s>u))return!1;var c=a.get(t),l=a.get(e);if(c&&l)return c==e&&l==t;var p=-1,f=!0,_=2&r?new kr:void 0;for(a.set(t,e),a.set(e,t);++p<u;){var h=t[p],d=e[p];if(n)var y=i?n(d,h,p,e,t,a):n(h,d,p,t,e,a);if(void 0!==y){if(y)continue;f=!1;break}if(_){if(!pe(e,(function(t,e){if(!$e(_,e)&&(h===t||o(h,t,r,n,a)))return _.push(e)}))){f=!1;break}}else if(h!==d&&!o(h,d,r,n,a)){f=!1;break}}return a.delete(t),a.delete(e),f}function qo(t){return ma(ha(t,void 0,Ia),t+"")}function Yo(t){return fn(t,bu,ta)}function Ko(t){return fn(t,Au,ea)}var zo=vr?function(t){return vr.get(t)}:Xu;function Wo(t){for(var e=t.name+"",r=gr[e],n=wt.call(gr,e)?r.length:0;n--;){var o=r[n],a=o.func;if(null==a||a==t)return o.name}return e}function Vo(t){return(wt.call($r,"placeholder")?$r:t).placeholder}function Jo(){var t=$r.iteratee||zu;return t=t===zu?wn:t,arguments.length?t(arguments[0],arguments[1]):t}function Xo(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map}function Qo(t){for(var e=bu(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,fa(o)]}return e}function Zo(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return En(r)?r:void 0}var ta=tr?function(t){return null==t?[]:(t=ht(t),oe(tr(t),(function(e){return be.call(t,e)})))}:os,ea=tr?function(t){for(var e=[];t;)se(e,ta(t)),t=Kt(t);return e}:os,ra=_n;function na(t,e,r){for(var n=-1,o=(e=io(e,t)).length,a=!1;++n<o;){var i=xa(e[n]);if(!(a=null!=t&&r(t,i)))break;t=t[i]}return a||++n!=o?a:!!(o=null==t?0:t.length)&&Gi(o)&&ia(i,o)&&(Ti(t)||Li(t))}function oa(t){return"function"!=typeof t.constructor||pa(t)?{}:Or(Kt(t))}function aa(t){return Ti(t)||Li(t)||!!(Ye&&t&&t[Ye])}function ia(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&ot.test(t))&&t>-1&&t%1==0&&t<e}function ua(t,e,r){if(!Hi(r))return!1;var n=typeof e;return!!("number"==n?ki(r)&&ia(e,r.length):"string"==n&&e in r)&&Pi(r[e],t)}function sa(t,e){if(Ti(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!Xi(t))||M.test(t)||!B.test(t)||null!=e&&t in ht(e)}function ca(t){var e=Wo(t),r=$r[e];if("function"!=typeof r||!(e in Rr.prototype))return!1;if(t===r)return!0;var n=zo(r);return!!n&&t===n[0]}(pr&&ra(new pr(new ArrayBuffer(1)))!=b||fr&&ra(new fr)!=p||_r&&"[object Promise]"!=ra(_r.resolve())||hr&&ra(new hr)!=d||dr&&ra(new dr)!=g)&&(ra=function(t){var e=_n(t),r=e==_?t.constructor:void 0,n=r?$a(r):"";if(n)switch(n){case mr:return b;case br:return p;case Ar:return"[object Promise]";case Er:return d;case wr:return g}return e});var la=At?Mi:as;function pa(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||bt)}function fa(t){return t==t&&!Hi(t)}function _a(t,e){return function(r){return null!=r&&r[t]===e&&(void 0!==e||t in ht(r))}}function ha(t,e,r){return e=ar(void 0===e?t.length-1:e,0),function(){for(var n=arguments,o=-1,a=ar(n.length-e,0),i=ct(a);++o<a;)i[o]=n[e+o];o=-1;for(var u=ct(e+1);++o<e;)u[o]=n[o];return u[e]=r(i),Zt(t,this,u)}}function da(t,e){return e.length<2?t:pn(t,qn(e,0,-1))}function ya(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var va=Aa(Un),ga=Xe||function(t,e){return Ut.setTimeout(t,e)},ma=Aa(Gn);function ba(t,e,r){var o=e+"";return ma(t,function(t,e){var r=e.length;if(!r)return t;var n=r-1;return e[n]=(r>1?"& ":"")+e[n],e=e.join(r>2?", ":" "),t.replace(K,"{\n/* [wrapped with "+e+"] */\n")}(o,function(t,e){return ee(n,(function(r){var n="_."+r[0];e&r[1]&&!ae(t,n)&&t.push(n)})),t.sort()}(function(t){var e=t.match(z);return e?e[1].split(W):[]}(o),r)))}function Aa(t){var e=0,r=0;return function(){var n=ur(),o=16-(n-r);if(r=n,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Ea(t,e){var r=-1,n=t.length,o=n-1;for(e=void 0===e?n:e;++r<e;){var a=kn(r,o),i=t[a];t[a]=t[r],t[r]=i}return t.length=e,t}var wa,Ca,Sa=(wa=wi((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(U,(function(t,r,n,o){e.push(n?o.replace(X,"$1"):r||t)})),e}),(function(t){return 500===Ca.size&&Ca.clear(),t})),Ca=wa.cache,wa);function xa(t){if("string"==typeof t||Xi(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function $a(t){if(null!=t){try{return Et.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function Oa(t){if(t instanceof Rr)return t.clone();var e=new Fr(t.__wrapped__,t.__chain__);return e.__actions__=vo(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Pa=Dn((function(t,e){return ji(t)?Qr(t,on(e,1,ji,!0)):[]})),Fa=Dn((function(t,e){var r=Ba(e);return ji(r)&&(r=void 0),ji(t)?Qr(t,on(e,1,ji,!0),Jo(r,2)):[]})),Ra=Dn((function(t,e){var r=Ba(e);return ji(r)&&(r=void 0),ji(t)?Qr(t,on(e,1,ji,!0),void 0,r):[]}));function La(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=null==r?0:nu(r);return o<0&&(o=ar(n+o,0)),he(t,Jo(e,3),o)}function Ta(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=n-1;return void 0!==r&&(o=nu(r),o=r<0?ar(n+o,0):ir(o,n-1)),he(t,Jo(e,3),o,!0)}function Ia(t){return null!=t&&t.length?on(t,1):[]}function ka(t){return t&&t.length?t[0]:void 0}var ja=Dn((function(t){var e=ue(t,oo);return e.length&&e[0]===t[0]?vn(e):[]})),Da=Dn((function(t){var e=Ba(t),r=ue(t,oo);return e===Ba(r)?e=void 0:r.pop(),r.length&&r[0]===t[0]?vn(r,Jo(e,2)):[]})),Na=Dn((function(t){var e=Ba(t),r=ue(t,oo);return(e="function"==typeof e?e:void 0)&&r.pop(),r.length&&r[0]===t[0]?vn(r,void 0,e):[]}));function Ba(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}var Ma=Dn(Ua);function Ua(t,e){return t&&t.length&&e&&e.length?Tn(t,e):t}var Ga=qo((function(t,e){var r=null==t?0:t.length,n=zr(t,e);return In(t,ue(e,(function(t){return ia(t,r)?+t:t})).sort(_o)),n}));function Ha(t){return null==t?t:lr.call(t)}var qa=Dn((function(t){return Xn(on(t,1,ji,!0))})),Ya=Dn((function(t){var e=Ba(t);return ji(e)&&(e=void 0),Xn(on(t,1,ji,!0),Jo(e,2))})),Ka=Dn((function(t){var e=Ba(t);return e="function"==typeof e?e:void 0,Xn(on(t,1,ji,!0),void 0,e)}));function za(t){if(!t||!t.length)return[];var e=0;return t=oe(t,(function(t){if(ji(t))return e=ar(t.length,e),!0})),we(e,(function(e){return ue(t,me(e))}))}function Wa(t,e){if(!t||!t.length)return[];var r=za(t);return null==e?r:ue(r,(function(t){return Zt(e,void 0,t)}))}var Va=Dn((function(t,e){return ji(t)?Qr(t,e):[]})),Ja=Dn((function(t){return ro(oe(t,ji))})),Xa=Dn((function(t){var e=Ba(t);return ji(e)&&(e=void 0),ro(oe(t,ji),Jo(e,2))})),Qa=Dn((function(t){var e=Ba(t);return e="function"==typeof e?e:void 0,ro(oe(t,ji),void 0,e)})),Za=Dn(za),ti=Dn((function(t){var e=t.length,r=e>1?t[e-1]:void 0;return r="function"==typeof r?(t.pop(),r):void 0,Wa(t,r)}));function ei(t){var e=$r(t);return e.__chain__=!0,e}function ri(t,e){return e(t)}var ni=qo((function(t){var e=t.length,r=e?t[0]:0,n=this.__wrapped__,o=function(e){return zr(e,t)};return!(e>1||this.__actions__.length)&&n instanceof Rr&&ia(r)?((n=n.slice(r,+r+(e?1:0))).__actions__.push({func:ri,args:[o],thisArg:void 0}),new Fr(n,this.__chain__).thru((function(t){return e&&!t.length&&t.push(void 0),t}))):this.thru(o)})),oi=mo((function(t,e,r){wt.call(t,r)?++t[r]:Kr(t,r,1)})),ai=xo(La),ii=xo(Ta);function ui(t,e){return(Ti(t)?ee:Zr)(t,Jo(e,3))}function si(t,e){return(Ti(t)?re:tn)(t,Jo(e,3))}var ci=mo((function(t,e,r){wt.call(t,r)?t[r].push(e):Kr(t,r,[e])})),li=Dn((function(t,e,r){var n=-1,o="function"==typeof e,a=ki(t)?ct(t.length):[];return Zr(t,(function(t){a[++n]=o?Zt(e,t,r):gn(t,e,r)})),a})),pi=mo((function(t,e,r){Kr(t,r,e)}));function fi(t,e){return(Ti(t)?ue:xn)(t,Jo(e,3))}var _i=mo((function(t,e,r){t[r?0:1].push(e)}),(function(){return[[],[]]})),hi=Dn((function(t,e){if(null==t)return[];var r=e.length;return r>1&&ua(t,e[0],e[1])?e=[]:r>2&&ua(e[0],e[1],e[2])&&(e=[e[0]]),Rn(t,on(e,1),[])})),di=Je||function(){return Ut.Date.now()};function yi(t,e,r){return e=r?void 0:e,Bo(t,128,void 0,void 0,void 0,void 0,e=t&&null==e?t.length:e)}function vi(t,r){var n;if("function"!=typeof r)throw new vt(e);return t=nu(t),function(){return--t>0&&(n=r.apply(this,arguments)),t<=1&&(r=void 0),n}}var gi=Dn((function(t,e,r){var n=1;if(r.length){var o=je(r,Vo(gi));n|=32}return Bo(t,n,e,r,o)})),mi=Dn((function(t,e,r){var n=3;if(r.length){var o=je(r,Vo(mi));n|=32}return Bo(e,n,t,r,o)}));function bi(t,r,n){var o,a,i,u,s,c,l=0,p=!1,f=!1,_=!0;if("function"!=typeof t)throw new vt(e);function h(e){var r=o,n=a;return o=a=void 0,l=e,u=t.apply(n,r)}function d(t){var e=t-c;return void 0===c||e>=r||e<0||f&&t-l>=i}function y(){var t=di();if(d(t))return v(t);s=ga(y,function(t){var e=r-(t-c);return f?ir(e,i-(t-l)):e}(t))}function v(t){return s=void 0,_&&o?h(t):(o=a=void 0,u)}function g(){var t=di(),e=d(t);if(o=arguments,a=this,c=t,e){if(void 0===s)return function(t){return l=t,s=ga(y,r),p?h(t):u}(c);if(f)return co(s),s=ga(y,r),h(c)}return void 0===s&&(s=ga(y,r)),u}return r=au(r)||0,Hi(n)&&(p=!!n.leading,i=(f="maxWait"in n)?ar(au(n.maxWait)||0,r):i,_="trailing"in n?!!n.trailing:_),g.cancel=function(){void 0!==s&&co(s),l=0,o=c=a=s=void 0},g.flush=function(){return void 0===s?u:v(di())},g}var Ai=Dn((function(t,e){return Xr(t,1,e)})),Ei=Dn((function(t,e,r){return Xr(t,au(e)||0,r)}));function wi(t,r){if("function"!=typeof t||null!=r&&"function"!=typeof r)throw new vt(e);var n=function(){var e=arguments,o=r?r.apply(this,e):e[0],a=n.cache;if(a.has(o))return a.get(o);var i=t.apply(this,e);return n.cache=a.set(o,i)||a,i};return n.cache=new(wi.Cache||Ir),n}function Ci(t){if("function"!=typeof t)throw new vt(e);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}wi.Cache=Ir;var Si=uo((function(t,e){var r=(e=1==e.length&&Ti(e[0])?ue(e[0],Se(Jo())):ue(on(e,1),Se(Jo()))).length;return Dn((function(n){for(var o=-1,a=ir(n.length,r);++o<a;)n[o]=e[o].call(this,n[o]);return Zt(t,this,n)}))})),xi=Dn((function(t,e){return Bo(t,32,void 0,e,je(e,Vo(xi)))})),$i=Dn((function(t,e){return Bo(t,64,void 0,e,je(e,Vo($i)))})),Oi=qo((function(t,e){return Bo(t,256,void 0,void 0,void 0,e)}));function Pi(t,e){return t===e||t!=t&&e!=e}var Fi=Io(hn),Ri=Io((function(t,e){return t>=e})),Li=mn(function(){return arguments}())?mn:function(t){return qi(t)&&wt.call(t,"callee")&&!be.call(t,"callee")},Ti=ct.isArray,Ii=zt?Se(zt):function(t){return qi(t)&&_n(t)==m};function ki(t){return null!=t&&Gi(t.length)&&!Mi(t)}function ji(t){return qi(t)&&ki(t)}var Di=er||as,Ni=Wt?Se(Wt):function(t){return qi(t)&&_n(t)==u};function Bi(t){if(!qi(t))return!1;var e=_n(t);return e==s||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!zi(t)}function Mi(t){if(!Hi(t))return!1;var e=_n(t);return e==c||e==l||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Ui(t){return"number"==typeof t&&t==nu(t)}function Gi(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Hi(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function qi(t){return null!=t&&"object"==typeof t}var Yi=Vt?Se(Vt):function(t){return qi(t)&&ra(t)==p};function Ki(t){return"number"==typeof t||qi(t)&&_n(t)==f}function zi(t){if(!qi(t)||_n(t)!=_)return!1;var e=Kt(t);if(null===e)return!0;var r=wt.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Et.call(r)==Ft}var Wi=Jt?Se(Jt):function(t){return qi(t)&&_n(t)==h},Vi=Xt?Se(Xt):function(t){return qi(t)&&ra(t)==d};function Ji(t){return"string"==typeof t||!Ti(t)&&qi(t)&&_n(t)==y}function Xi(t){return"symbol"==typeof t||qi(t)&&_n(t)==v}var Qi=Qt?Se(Qt):function(t){return qi(t)&&Gi(t.length)&&!!It[_n(t)]},Zi=Io(Sn),tu=Io((function(t,e){return t<=e}));function eu(t){if(!t)return[];if(ki(t))return Ji(t)?Me(t):vo(t);if(Ke&&t[Ke])return function(t){for(var e,r=[];!(e=t.next()).done;)r.push(e.value);return r}(t[Ke]());var e=ra(t);return(e==p?Ie:e==d?De:Pu)(t)}function ru(t){return t?(t=au(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function nu(t){var e=ru(t),r=e%1;return e==e?r?e-r:e:0}function ou(t){return t?Wr(nu(t),0,4294967295):0}function au(t){if("number"==typeof t)return t;if(Xi(t))return NaN;if(Hi(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Hi(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ce(t);var r=et.test(t);return r||nt.test(t)?Nt(t.slice(2),r?2:8):tt.test(t)?NaN:+t}function iu(t){return go(t,Au(t))}function uu(t){return null==t?"":Jn(t)}var su=bo((function(t,e){if(pa(e)||ki(e))go(e,bu(e),t);else for(var r in e)wt.call(e,r)&&Gr(t,r,e[r])})),cu=bo((function(t,e){go(e,Au(e),t)})),lu=bo((function(t,e,r,n){go(e,Au(e),t,n)})),pu=bo((function(t,e,r,n){go(e,bu(e),t,n)})),fu=qo(zr),_u=Dn((function(t,e){t=ht(t);var r=-1,n=e.length,o=n>2?e[2]:void 0;for(o&&ua(e[0],e[1],o)&&(n=1);++r<n;)for(var a=e[r],i=Au(a),u=-1,s=i.length;++u<s;){var c=i[u],l=t[c];(void 0===l||Pi(l,bt[c])&&!wt.call(t,c))&&(t[c]=a[c])}return t})),hu=Dn((function(t){return t.push(void 0,Uo),Zt(wu,void 0,t)}));function du(t,e,r){var n=null==t?void 0:pn(t,e);return void 0===n?r:n}function yu(t,e){return null!=t&&na(t,e,yn)}var vu=Po((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=Ot.call(e)),t[e]=r}),Hu(Ku)),gu=Po((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=Ot.call(e)),wt.call(t,e)?t[e].push(r):t[e]=[r]}),Jo),mu=Dn(gn);function bu(t){return ki(t)?Dr(t):Cn(t)}function Au(t){return ki(t)?Dr(t,!0):function(t){if(!Hi(t))return function(t){var e=[];if(null!=t)for(var r in ht(t))e.push(r);return e}(t);var e=pa(t),r=[];for(var n in t)("constructor"!=n||!e&&wt.call(t,n))&&r.push(n);return r}(t)}var Eu=bo((function(t,e,r){Pn(t,e,r)})),wu=bo((function(t,e,r,n){Pn(t,e,r,n)})),Cu=qo((function(t,e){var r={};if(null==t)return r;var n=!1;e=ue(e,(function(e){return e=io(e,t),n||(n=e.length>1),e})),go(t,Ko(t),r),n&&(r=Vr(r,7,Go));for(var o=e.length;o--;)Qn(r,e[o]);return r})),Su=qo((function(t,e){return null==t?{}:function(t,e){return Ln(t,e,(function(e,r){return yu(t,r)}))}(t,e)}));function xu(t,e){if(null==t)return{};var r=ue(Ko(t),(function(t){return[t]}));return e=Jo(e),Ln(t,r,(function(t,r){return e(t,r[0])}))}var $u=No(bu),Ou=No(Au);function Pu(t){return null==t?[]:xe(t,bu(t))}var Fu=Co((function(t,e,r){return e=e.toLowerCase(),t+(r?Ru(e):e)}));function Ru(t){return Bu(uu(t).toLowerCase())}function Lu(t){return(t=uu(t))&&t.replace(at,Fe).replace($t,"")}var Tu=Co((function(t,e,r){return t+(r?"-":"")+e.toLowerCase()})),Iu=Co((function(t,e,r){return t+(r?" ":"")+e.toLowerCase()})),ku=wo("toLowerCase"),ju=Co((function(t,e,r){return t+(r?"_":"")+e.toLowerCase()})),Du=Co((function(t,e,r){return t+(r?" ":"")+Bu(e)})),Nu=Co((function(t,e,r){return t+(r?" ":"")+e.toUpperCase()})),Bu=wo("toUpperCase");function Mu(t,e,r){return t=uu(t),void 0===(e=r?void 0:e)?function(t){return Rt.test(t)}(t)?function(t){return t.match(Pt)||[]}(t):function(t){return t.match(V)||[]}(t):t.match(e)||[]}var Uu=Dn((function(t,e){try{return Zt(t,void 0,e)}catch(r){return Bi(r)?r:new pt(r)}})),Gu=qo((function(t,e){return ee(e,(function(e){e=xa(e),Kr(t,e,gi(t[e],t))})),t}));function Hu(t){return function(){return t}}var qu=$o(),Yu=$o(!0);function Ku(t){return t}function zu(t){return wn("function"==typeof t?t:Vr(t,1))}var Wu=Dn((function(t,e){return function(r){return gn(r,t,e)}})),Vu=Dn((function(t,e){return function(r){return gn(t,r,e)}}));function Ju(t,e,r){var n=bu(e),o=ln(e,n);null!=r||Hi(e)&&(o.length||!n.length)||(r=e,e=t,t=this,o=ln(e,bu(e)));var a=!(Hi(r)&&"chain"in r&&!r.chain),i=Mi(t);return ee(o,(function(r){var n=e[r];t[r]=n,i&&(t.prototype[r]=function(){var e=this.__chain__;if(a||e){var r=t(this.__wrapped__);return(r.__actions__=vo(this.__actions__)).push({func:n,args:arguments,thisArg:t}),r.__chain__=e,r}return n.apply(t,se([this.value()],arguments))})})),t}function Xu(){}var Qu=Ro(ue),Zu=Ro(ne),ts=Ro(pe);function es(t){return sa(t)?me(xa(t)):function(t){return function(e){return pn(e,t)}}(t)}var rs=To(),ns=To(!0);function os(){return[]}function as(){return!1}var is,us=Fo((function(t,e){return t+e}),0),ss=jo("ceil"),cs=Fo((function(t,e){return t/e}),1),ls=jo("floor"),ps=Fo((function(t,e){return t*e}),1),fs=jo("round"),_s=Fo((function(t,e){return t-e}),0);return $r.after=function(t,r){if("function"!=typeof r)throw new vt(e);return t=nu(t),function(){if(--t<1)return r.apply(this,arguments)}},$r.ary=yi,$r.assign=su,$r.assignIn=cu,$r.assignInWith=lu,$r.assignWith=pu,$r.at=fu,$r.before=vi,$r.bind=gi,$r.bindAll=Gu,$r.bindKey=mi,$r.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ti(t)?t:[t]},$r.chain=ei,$r.chunk=function(t,e,r){e=(r?ua(t,e,r):void 0===e)?1:ar(nu(e),0);var n=null==t?0:t.length;if(!n||e<1)return[];for(var o=0,a=0,i=ct(Qe(n/e));o<n;)i[a++]=qn(t,o,o+=e);return i},$r.compact=function(t){for(var e=-1,r=null==t?0:t.length,n=0,o=[];++e<r;){var a=t[e];a&&(o[n++]=a)}return o},$r.concat=function(){var t=arguments.length;if(!t)return[];for(var e=ct(t-1),r=arguments[0],n=t;n--;)e[n-1]=arguments[n];return se(Ti(r)?vo(r):[r],on(e,1))},$r.cond=function(t){var r=null==t?0:t.length,n=Jo();return t=r?ue(t,(function(t){if("function"!=typeof t[1])throw new vt(e);return[n(t[0]),t[1]]})):[],Dn((function(e){for(var n=-1;++n<r;){var o=t[n];if(Zt(o[0],this,e))return Zt(o[1],this,e)}}))},$r.conforms=function(t){return function(t){var e=bu(t);return function(r){return Jr(r,t,e)}}(Vr(t,1))},$r.constant=Hu,$r.countBy=oi,$r.create=function(t,e){var r=Or(t);return null==e?r:Yr(r,e)},$r.curry=function t(e,r,n){var o=Bo(e,8,void 0,void 0,void 0,void 0,void 0,r=n?void 0:r);return o.placeholder=t.placeholder,o},$r.curryRight=function t(e,r,n){var o=Bo(e,16,void 0,void 0,void 0,void 0,void 0,r=n?void 0:r);return o.placeholder=t.placeholder,o},$r.debounce=bi,$r.defaults=_u,$r.defaultsDeep=hu,$r.defer=Ai,$r.delay=Ei,$r.difference=Pa,$r.differenceBy=Fa,$r.differenceWith=Ra,$r.drop=function(t,e,r){var n=null==t?0:t.length;return n?qn(t,(e=r||void 0===e?1:nu(e))<0?0:e,n):[]},$r.dropRight=function(t,e,r){var n=null==t?0:t.length;return n?qn(t,0,(e=n-(e=r||void 0===e?1:nu(e)))<0?0:e):[]},$r.dropRightWhile=function(t,e){return t&&t.length?to(t,Jo(e,3),!0,!0):[]},$r.dropWhile=function(t,e){return t&&t.length?to(t,Jo(e,3),!0):[]},$r.fill=function(t,e,r,n){var o=null==t?0:t.length;return o?(r&&"number"!=typeof r&&ua(t,e,r)&&(r=0,n=o),function(t,e,r,n){var o=t.length;for((r=nu(r))<0&&(r=-r>o?0:o+r),(n=void 0===n||n>o?o:nu(n))<0&&(n+=o),n=r>n?0:ou(n);r<n;)t[r++]=e;return t}(t,e,r,n)):[]},$r.filter=function(t,e){return(Ti(t)?oe:nn)(t,Jo(e,3))},$r.flatMap=function(t,e){return on(fi(t,e),1)},$r.flatMapDeep=function(t,e){return on(fi(t,e),1/0)},$r.flatMapDepth=function(t,e,r){return r=void 0===r?1:nu(r),on(fi(t,e),r)},$r.flatten=Ia,$r.flattenDeep=function(t){return null!=t&&t.length?on(t,1/0):[]},$r.flattenDepth=function(t,e){return null!=t&&t.length?on(t,e=void 0===e?1:nu(e)):[]},$r.flip=function(t){return Bo(t,512)},$r.flow=qu,$r.flowRight=Yu,$r.fromPairs=function(t){for(var e=-1,r=null==t?0:t.length,n={};++e<r;){var o=t[e];n[o[0]]=o[1]}return n},$r.functions=function(t){return null==t?[]:ln(t,bu(t))},$r.functionsIn=function(t){return null==t?[]:ln(t,Au(t))},$r.groupBy=ci,$r.initial=function(t){return null!=t&&t.length?qn(t,0,-1):[]},$r.intersection=ja,$r.intersectionBy=Da,$r.intersectionWith=Na,$r.invert=vu,$r.invertBy=gu,$r.invokeMap=li,$r.iteratee=zu,$r.keyBy=pi,$r.keys=bu,$r.keysIn=Au,$r.map=fi,$r.mapKeys=function(t,e){var r={};return e=Jo(e,3),sn(t,(function(t,n,o){Kr(r,e(t,n,o),t)})),r},$r.mapValues=function(t,e){var r={};return e=Jo(e,3),sn(t,(function(t,n,o){Kr(r,n,e(t,n,o))})),r},$r.matches=function(t){return $n(Vr(t,1))},$r.matchesProperty=function(t,e){return On(t,Vr(e,1))},$r.memoize=wi,$r.merge=Eu,$r.mergeWith=wu,$r.method=Wu,$r.methodOf=Vu,$r.mixin=Ju,$r.negate=Ci,$r.nthArg=function(t){return t=nu(t),Dn((function(e){return Fn(e,t)}))},$r.omit=Cu,$r.omitBy=function(t,e){return xu(t,Ci(Jo(e)))},$r.once=function(t){return vi(2,t)},$r.orderBy=function(t,e,r,n){return null==t?[]:(Ti(e)||(e=null==e?[]:[e]),Ti(r=n?void 0:r)||(r=null==r?[]:[r]),Rn(t,e,r))},$r.over=Qu,$r.overArgs=Si,$r.overEvery=Zu,$r.overSome=ts,$r.partial=xi,$r.partialRight=$i,$r.partition=_i,$r.pick=Su,$r.pickBy=xu,$r.property=es,$r.propertyOf=function(t){return function(e){return null==t?void 0:pn(t,e)}},$r.pull=Ma,$r.pullAll=Ua,$r.pullAllBy=function(t,e,r){return t&&t.length&&e&&e.length?Tn(t,e,Jo(r,2)):t},$r.pullAllWith=function(t,e,r){return t&&t.length&&e&&e.length?Tn(t,e,void 0,r):t},$r.pullAt=Ga,$r.range=rs,$r.rangeRight=ns,$r.rearg=Oi,$r.reject=function(t,e){return(Ti(t)?oe:nn)(t,Ci(Jo(e,3)))},$r.remove=function(t,e){var r=[];if(!t||!t.length)return r;var n=-1,o=[],a=t.length;for(e=Jo(e,3);++n<a;){var i=t[n];e(i,n,t)&&(r.push(i),o.push(n))}return In(t,o),r},$r.rest=function(t,r){if("function"!=typeof t)throw new vt(e);return Dn(t,r=void 0===r?r:nu(r))},$r.reverse=Ha,$r.sampleSize=function(t,e,r){return e=(r?ua(t,e,r):void 0===e)?1:nu(e),(Ti(t)?Br:Bn)(t,e)},$r.set=function(t,e,r){return null==t?t:Mn(t,e,r)},$r.setWith=function(t,e,r,n){return n="function"==typeof n?n:void 0,null==t?t:Mn(t,e,r,n)},$r.shuffle=function(t){return(Ti(t)?Mr:Hn)(t)},$r.slice=function(t,e,r){var n=null==t?0:t.length;return n?(r&&"number"!=typeof r&&ua(t,e,r)?(e=0,r=n):(e=null==e?0:nu(e),r=void 0===r?n:nu(r)),qn(t,e,r)):[]},$r.sortBy=hi,$r.sortedUniq=function(t){return t&&t.length?Wn(t):[]},$r.sortedUniqBy=function(t,e){return t&&t.length?Wn(t,Jo(e,2)):[]},$r.split=function(t,e,r){return r&&"number"!=typeof r&&ua(t,e,r)&&(e=r=void 0),(r=void 0===r?4294967295:r>>>0)?(t=uu(t))&&("string"==typeof e||null!=e&&!Wi(e))&&!(e=Jn(e))&&Te(t)?so(Me(t),0,r):t.split(e,r):[]},$r.spread=function(t,r){if("function"!=typeof t)throw new vt(e);return r=null==r?0:ar(nu(r),0),Dn((function(e){var n=e[r],o=so(e,0,r);return n&&se(o,n),Zt(t,this,o)}))},$r.tail=function(t){var e=null==t?0:t.length;return e?qn(t,1,e):[]},$r.take=function(t,e,r){return t&&t.length?qn(t,0,(e=r||void 0===e?1:nu(e))<0?0:e):[]},$r.takeRight=function(t,e,r){var n=null==t?0:t.length;return n?qn(t,(e=n-(e=r||void 0===e?1:nu(e)))<0?0:e,n):[]},$r.takeRightWhile=function(t,e){return t&&t.length?to(t,Jo(e,3),!1,!0):[]},$r.takeWhile=function(t,e){return t&&t.length?to(t,Jo(e,3)):[]},$r.tap=function(t,e){return e(t),t},$r.throttle=function(t,r,n){var o=!0,a=!0;if("function"!=typeof t)throw new vt(e);return Hi(n)&&(o="leading"in n?!!n.leading:o,a="trailing"in n?!!n.trailing:a),bi(t,r,{leading:o,maxWait:r,trailing:a})},$r.thru=ri,$r.toArray=eu,$r.toPairs=$u,$r.toPairsIn=Ou,$r.toPath=function(t){return Ti(t)?ue(t,xa):Xi(t)?[t]:vo(Sa(uu(t)))},$r.toPlainObject=iu,$r.transform=function(t,e,r){var n=Ti(t),o=n||Di(t)||Qi(t);if(e=Jo(e,4),null==r){var a=t&&t.constructor;r=o?n?new a:[]:Hi(t)&&Mi(a)?Or(Kt(t)):{}}return(o?ee:sn)(t,(function(t,n,o){return e(r,t,n,o)})),r},$r.unary=function(t){return yi(t,1)},$r.union=qa,$r.unionBy=Ya,$r.unionWith=Ka,$r.uniq=function(t){return t&&t.length?Xn(t):[]},$r.uniqBy=function(t,e){return t&&t.length?Xn(t,Jo(e,2)):[]},$r.uniqWith=function(t,e){return e="function"==typeof e?e:void 0,t&&t.length?Xn(t,void 0,e):[]},$r.unset=function(t,e){return null==t||Qn(t,e)},$r.unzip=za,$r.unzipWith=Wa,$r.update=function(t,e,r){return null==t?t:Zn(t,e,ao(r))},$r.updateWith=function(t,e,r,n){return n="function"==typeof n?n:void 0,null==t?t:Zn(t,e,ao(r),n)},$r.values=Pu,$r.valuesIn=function(t){return null==t?[]:xe(t,Au(t))},$r.without=Va,$r.words=Mu,$r.wrap=function(t,e){return xi(ao(e),t)},$r.xor=Ja,$r.xorBy=Xa,$r.xorWith=Qa,$r.zip=Za,$r.zipObject=function(t,e){return no(t||[],e||[],Gr)},$r.zipObjectDeep=function(t,e){return no(t||[],e||[],Mn)},$r.zipWith=ti,$r.entries=$u,$r.entriesIn=Ou,$r.extend=cu,$r.extendWith=lu,Ju($r,$r),$r.add=us,$r.attempt=Uu,$r.camelCase=Fu,$r.capitalize=Ru,$r.ceil=ss,$r.clamp=function(t,e,r){return void 0===r&&(r=e,e=void 0),void 0!==r&&(r=(r=au(r))==r?r:0),void 0!==e&&(e=(e=au(e))==e?e:0),Wr(au(t),e,r)},$r.clone=function(t){return Vr(t,4)},$r.cloneDeep=function(t){return Vr(t,5)},$r.cloneDeepWith=function(t,e){return Vr(t,5,e="function"==typeof e?e:void 0)},$r.cloneWith=function(t,e){return Vr(t,4,e="function"==typeof e?e:void 0)},$r.conformsTo=function(t,e){return null==e||Jr(t,e,bu(e))},$r.deburr=Lu,$r.defaultTo=function(t,e){return null==t||t!=t?e:t},$r.divide=cs,$r.endsWith=function(t,e,r){t=uu(t),e=Jn(e);var n=t.length,o=r=void 0===r?n:Wr(nu(r),0,n);return(r-=e.length)>=0&&t.slice(r,o)==e},$r.eq=Pi,$r.escape=function(t){return(t=uu(t))&&k.test(t)?t.replace(T,Re):t},$r.escapeRegExp=function(t){return(t=uu(t))&&H.test(t)?t.replace(G,"\\$&"):t},$r.every=function(t,e,r){var n=Ti(t)?ne:en;return r&&ua(t,e,r)&&(e=void 0),n(t,Jo(e,3))},$r.find=ai,$r.findIndex=La,$r.findKey=function(t,e){return _e(t,Jo(e,3),sn)},$r.findLast=ii,$r.findLastIndex=Ta,$r.findLastKey=function(t,e){return _e(t,Jo(e,3),cn)},$r.floor=ls,$r.forEach=ui,$r.forEachRight=si,$r.forIn=function(t,e){return null==t?t:an(t,Jo(e,3),Au)},$r.forInRight=function(t,e){return null==t?t:un(t,Jo(e,3),Au)},$r.forOwn=function(t,e){return t&&sn(t,Jo(e,3))},$r.forOwnRight=function(t,e){return t&&cn(t,Jo(e,3))},$r.get=du,$r.gt=Fi,$r.gte=Ri,$r.has=function(t,e){return null!=t&&na(t,e,dn)},$r.hasIn=yu,$r.head=ka,$r.identity=Ku,$r.includes=function(t,e,r,n){t=ki(t)?t:Pu(t),r=r&&!n?nu(r):0;var o=t.length;return r<0&&(r=ar(o+r,0)),Ji(t)?r<=o&&t.indexOf(e,r)>-1:!!o&&de(t,e,r)>-1},$r.indexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=null==r?0:nu(r);return o<0&&(o=ar(n+o,0)),de(t,e,o)},$r.inRange=function(t,e,r){return e=ru(e),void 0===r?(r=e,e=0):r=ru(r),function(t,e,r){return t>=ir(e,r)&&t<ar(e,r)}(t=au(t),e,r)},$r.invoke=mu,$r.isArguments=Li,$r.isArray=Ti,$r.isArrayBuffer=Ii,$r.isArrayLike=ki,$r.isArrayLikeObject=ji,$r.isBoolean=function(t){return!0===t||!1===t||qi(t)&&_n(t)==i},$r.isBuffer=Di,$r.isDate=Ni,$r.isElement=function(t){return qi(t)&&1===t.nodeType&&!zi(t)},$r.isEmpty=function(t){if(null==t)return!0;if(ki(t)&&(Ti(t)||"string"==typeof t||"function"==typeof t.splice||Di(t)||Qi(t)||Li(t)))return!t.length;var e=ra(t);if(e==p||e==d)return!t.size;if(pa(t))return!Cn(t).length;for(var r in t)if(wt.call(t,r))return!1;return!0},$r.isEqual=function(t,e){return bn(t,e)},$r.isEqualWith=function(t,e,r){var n=(r="function"==typeof r?r:void 0)?r(t,e):void 0;return void 0===n?bn(t,e,void 0,r):!!n},$r.isError=Bi,$r.isFinite=function(t){return"number"==typeof t&&rr(t)},$r.isFunction=Mi,$r.isInteger=Ui,$r.isLength=Gi,$r.isMap=Yi,$r.isMatch=function(t,e){return t===e||An(t,e,Qo(e))},$r.isMatchWith=function(t,e,r){return r="function"==typeof r?r:void 0,An(t,e,Qo(e),r)},$r.isNaN=function(t){return Ki(t)&&t!=+t},$r.isNative=function(t){if(la(t))throw new pt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return En(t)},$r.isNil=function(t){return null==t},$r.isNull=function(t){return null===t},$r.isNumber=Ki,$r.isObject=Hi,$r.isObjectLike=qi,$r.isPlainObject=zi,$r.isRegExp=Wi,$r.isSafeInteger=function(t){return Ui(t)&&t>=-9007199254740991&&t<=9007199254740991},$r.isSet=Vi,$r.isString=Ji,$r.isSymbol=Xi,$r.isTypedArray=Qi,$r.isUndefined=function(t){return void 0===t},$r.isWeakMap=function(t){return qi(t)&&ra(t)==g},$r.isWeakSet=function(t){return qi(t)&&"[object WeakSet]"==_n(t)},$r.join=function(t,e){return null==t?"":nr.call(t,e)},$r.kebabCase=Tu,$r.last=Ba,$r.lastIndexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=n;return void 0!==r&&(o=(o=nu(r))<0?ar(n+o,0):ir(o,n-1)),e==e?function(t,e,r){for(var n=r+1;n--;)if(t[n]===e)return n;return n}(t,e,o):he(t,ve,o,!0)},$r.lowerCase=Iu,$r.lowerFirst=ku,$r.lt=Zi,$r.lte=tu,$r.max=function(t){return t&&t.length?rn(t,Ku,hn):void 0},$r.maxBy=function(t,e){return t&&t.length?rn(t,Jo(e,2),hn):void 0},$r.mean=function(t){return ge(t,Ku)},$r.meanBy=function(t,e){return ge(t,Jo(e,2))},$r.min=function(t){return t&&t.length?rn(t,Ku,Sn):void 0},$r.minBy=function(t,e){return t&&t.length?rn(t,Jo(e,2),Sn):void 0},$r.stubArray=os,$r.stubFalse=as,$r.stubObject=function(){return{}},$r.stubString=function(){return""},$r.stubTrue=function(){return!0},$r.multiply=ps,$r.nth=function(t,e){return t&&t.length?Fn(t,nu(e)):void 0},$r.noConflict=function(){return Ut._===this&&(Ut._=jt),this},$r.noop=Xu,$r.now=di,$r.pad=function(t,e,r){t=uu(t);var n=(e=nu(e))?Be(t):0;if(!e||n>=e)return t;var o=(e-n)/2;return Lo(Ze(o),r)+t+Lo(Qe(o),r)},$r.padEnd=function(t,e,r){t=uu(t);var n=(e=nu(e))?Be(t):0;return e&&n<e?t+Lo(e-n,r):t},$r.padStart=function(t,e,r){t=uu(t);var n=(e=nu(e))?Be(t):0;return e&&n<e?Lo(e-n,r)+t:t},$r.parseInt=function(t,e,r){return r||null==e?e=0:e&&(e=+e),sr(uu(t).replace(q,""),e||0)},$r.random=function(t,e,r){if(r&&"boolean"!=typeof r&&ua(t,e,r)&&(e=r=void 0),void 0===r&&("boolean"==typeof e?(r=e,e=void 0):"boolean"==typeof t&&(r=t,t=void 0)),void 0===t&&void 0===e?(t=0,e=1):(t=ru(t),void 0===e?(e=t,t=0):e=ru(e)),t>e){var n=t;t=e,e=n}if(r||t%1||e%1){var o=cr();return ir(t+o*(e-t+Dt("1e-"+((o+"").length-1))),e)}return kn(t,e)},$r.reduce=function(t,e,r){var n=Ti(t)?ce:Ae,o=arguments.length<3;return n(t,Jo(e,4),r,o,Zr)},$r.reduceRight=function(t,e,r){var n=Ti(t)?le:Ae,o=arguments.length<3;return n(t,Jo(e,4),r,o,tn)},$r.repeat=function(t,e,r){return e=(r?ua(t,e,r):void 0===e)?1:nu(e),jn(uu(t),e)},$r.replace=function(){var t=arguments,e=uu(t[0]);return t.length<3?e:e.replace(t[1],t[2])},$r.result=function(t,e,r){var n=-1,o=(e=io(e,t)).length;for(o||(o=1,t=void 0);++n<o;){var a=null==t?void 0:t[xa(e[n])];void 0===a&&(n=o,a=r),t=Mi(a)?a.call(t):a}return t},$r.round=fs,$r.runInContext=t,$r.sample=function(t){return(Ti(t)?Nr:Nn)(t)},$r.size=function(t){if(null==t)return 0;if(ki(t))return Ji(t)?Be(t):t.length;var e=ra(t);return e==p||e==d?t.size:Cn(t).length},$r.snakeCase=ju,$r.some=function(t,e,r){var n=Ti(t)?pe:Yn;return r&&ua(t,e,r)&&(e=void 0),n(t,Jo(e,3))},$r.sortedIndex=function(t,e){return Kn(t,e)},$r.sortedIndexBy=function(t,e,r){return zn(t,e,Jo(r,2))},$r.sortedIndexOf=function(t,e){var r=null==t?0:t.length;if(r){var n=Kn(t,e);if(n<r&&Pi(t[n],e))return n}return-1},$r.sortedLastIndex=function(t,e){return Kn(t,e,!0)},$r.sortedLastIndexBy=function(t,e,r){return zn(t,e,Jo(r,2),!0)},$r.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var r=Kn(t,e,!0)-1;if(Pi(t[r],e))return r}return-1},$r.startCase=Du,$r.startsWith=function(t,e,r){return t=uu(t),r=null==r?0:Wr(nu(r),0,t.length),e=Jn(e),t.slice(r,r+e.length)==e},$r.subtract=_s,$r.sum=function(t){return t&&t.length?Ee(t,Ku):0},$r.sumBy=function(t,e){return t&&t.length?Ee(t,Jo(e,2)):0},$r.template=function(t,e,r){var n=$r.templateSettings;r&&ua(t,e,r)&&(e=void 0),t=uu(t),e=lu({},e,n,Mo);var o,a,i=lu({},e.imports,n.imports,Mo),u=bu(i),s=xe(i,u),c=0,l=e.interpolate||it,p="__p += '",f=dt((e.escape||it).source+"|"+l.source+"|"+(l===N?Q:it).source+"|"+(e.evaluate||it).source+"|$","g"),_="//# sourceURL="+(wt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Tt+"]")+"\n";t.replace(f,(function(e,r,n,i,u,s){return n||(n=i),p+=t.slice(c,s).replace(ut,Le),r&&(o=!0,p+="' +\n__e("+r+") +\n'"),u&&(a=!0,p+="';\n"+u+";\n__p += '"),n&&(p+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),c=s+e.length,e})),p+="';\n";var h=wt.call(e,"variable")&&e.variable;if(h){if(J.test(h))throw new pt("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(a?p.replace(P,""):p).replace(F,"$1").replace(R,"$1;"),p="function("+(h||"obj")+") {\n"+(h?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var d=Uu((function(){return ft(u,_+"return "+p).apply(void 0,s)}));if(d.source=p,Bi(d))throw d;return d},$r.times=function(t,e){if((t=nu(t))<1||t>9007199254740991)return[];var r=4294967295,n=ir(t,4294967295);t-=4294967295;for(var o=we(n,e=Jo(e));++r<t;)e(r);return o},$r.toFinite=ru,$r.toInteger=nu,$r.toLength=ou,$r.toLower=function(t){return uu(t).toLowerCase()},$r.toNumber=au,$r.toSafeInteger=function(t){return t?Wr(nu(t),-9007199254740991,9007199254740991):0===t?t:0},$r.toString=uu,$r.toUpper=function(t){return uu(t).toUpperCase()},$r.trim=function(t,e,r){if((t=uu(t))&&(r||void 0===e))return Ce(t);if(!t||!(e=Jn(e)))return t;var n=Me(t),o=Me(e);return so(n,Oe(n,o),Pe(n,o)+1).join("")},$r.trimEnd=function(t,e,r){if((t=uu(t))&&(r||void 0===e))return t.slice(0,Ue(t)+1);if(!t||!(e=Jn(e)))return t;var n=Me(t);return so(n,0,Pe(n,Me(e))+1).join("")},$r.trimStart=function(t,e,r){if((t=uu(t))&&(r||void 0===e))return t.replace(q,"");if(!t||!(e=Jn(e)))return t;var n=Me(t);return so(n,Oe(n,Me(e))).join("")},$r.truncate=function(t,e){var r=30,n="...";if(Hi(e)){var o="separator"in e?e.separator:o;r="length"in e?nu(e.length):r,n="omission"in e?Jn(e.omission):n}var a=(t=uu(t)).length;if(Te(t)){var i=Me(t);a=i.length}if(r>=a)return t;var u=r-Be(n);if(u<1)return n;var s=i?so(i,0,u).join(""):t.slice(0,u);if(void 0===o)return s+n;if(i&&(u+=s.length-u),Wi(o)){if(t.slice(u).search(o)){var c,l=s;for(o.global||(o=dt(o.source,uu(Z.exec(o))+"g")),o.lastIndex=0;c=o.exec(l);)var p=c.index;s=s.slice(0,void 0===p?u:p)}}else if(t.indexOf(Jn(o),u)!=u){var f=s.lastIndexOf(o);f>-1&&(s=s.slice(0,f))}return s+n},$r.unescape=function(t){return(t=uu(t))&&I.test(t)?t.replace(L,Ge):t},$r.uniqueId=function(t){var e=++Ct;return uu(t)+e},$r.upperCase=Nu,$r.upperFirst=Bu,$r.each=ui,$r.eachRight=si,$r.first=ka,Ju($r,(is={},sn($r,(function(t,e){wt.call($r.prototype,e)||(is[e]=t)})),is),{chain:!1}),$r.VERSION="4.17.21",ee(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){$r[t].placeholder=$r})),ee(["drop","take"],(function(t,e){Rr.prototype[t]=function(r){r=void 0===r?1:ar(nu(r),0);var n=this.__filtered__&&!e?new Rr(this):this.clone();return n.__filtered__?n.__takeCount__=ir(r,n.__takeCount__):n.__views__.push({size:ir(r,4294967295),type:t+(n.__dir__<0?"Right":"")}),n},Rr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),ee(["filter","map","takeWhile"],(function(t,e){var r=e+1,n=1==r||3==r;Rr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Jo(t,3),type:r}),e.__filtered__=e.__filtered__||n,e}})),ee(["head","last"],(function(t,e){var r="take"+(e?"Right":"");Rr.prototype[t]=function(){return this[r](1).value()[0]}})),ee(["initial","tail"],(function(t,e){var r="drop"+(e?"":"Right");Rr.prototype[t]=function(){return this.__filtered__?new Rr(this):this[r](1)}})),Rr.prototype.compact=function(){return this.filter(Ku)},Rr.prototype.find=function(t){return this.filter(t).head()},Rr.prototype.findLast=function(t){return this.reverse().find(t)},Rr.prototype.invokeMap=Dn((function(t,e){return"function"==typeof t?new Rr(this):this.map((function(r){return gn(r,t,e)}))})),Rr.prototype.reject=function(t){return this.filter(Ci(Jo(t)))},Rr.prototype.slice=function(t,e){t=nu(t);var r=this;return r.__filtered__&&(t>0||e<0)?new Rr(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),void 0!==e&&(r=(e=nu(e))<0?r.dropRight(-e):r.take(e-t)),r)},Rr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Rr.prototype.toArray=function(){return this.take(4294967295)},sn(Rr.prototype,(function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),n=/^(?:head|last)$/.test(e),o=$r[n?"take"+("last"==e?"Right":""):e],a=n||/^find/.test(e);o&&($r.prototype[e]=function(){var e=this.__wrapped__,i=n?[1]:arguments,u=e instanceof Rr,s=i[0],c=u||Ti(e),l=function(t){var e=o.apply($r,se([t],i));return n&&p?e[0]:e};c&&r&&"function"==typeof s&&1!=s.length&&(u=c=!1);var p=this.__chain__,f=!!this.__actions__.length,_=a&&!p,h=u&&!f;if(!a&&c){e=h?e:new Rr(this);var d=t.apply(e,i);return d.__actions__.push({func:ri,args:[l],thisArg:void 0}),new Fr(d,p)}return _&&h?t.apply(this,i):(d=this.thru(l),_?n?d.value()[0]:d.value():d)})})),ee(["pop","push","shift","sort","splice","unshift"],(function(t){var e=gt[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",n=/^(?:pop|shift)$/.test(t);$r.prototype[t]=function(){var t=arguments;if(n&&!this.__chain__){var o=this.value();return e.apply(Ti(o)?o:[],t)}return this[r]((function(r){return e.apply(Ti(r)?r:[],t)}))}})),sn(Rr.prototype,(function(t,e){var r=$r[e];if(r){var n=r.name+"";wt.call(gr,n)||(gr[n]=[]),gr[n].push({name:e,func:r})}})),gr[Oo(void 0,2).name]=[{name:"wrapper",func:void 0}],Rr.prototype.clone=function(){var t=new Rr(this.__wrapped__);return t.__actions__=vo(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=vo(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=vo(this.__views__),t},Rr.prototype.reverse=function(){if(this.__filtered__){var t=new Rr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Rr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,r=Ti(t),n=e<0,o=r?t.length:0,a=function(t,e,r){for(var n=-1,o=r.length;++n<o;){var a=r[n],i=a.size;switch(a.type){case"drop":t+=i;break;case"dropRight":e-=i;break;case"take":e=ir(e,t+i);break;case"takeRight":t=ar(t,e-i)}}return{start:t,end:e}}(0,o,this.__views__),i=a.start,u=a.end,s=u-i,c=n?u:i-1,l=this.__iteratees__,p=l.length,f=0,_=ir(s,this.__takeCount__);if(!r||!n&&o==s&&_==s)return eo(t,this.__actions__);var h=[];t:for(;s--&&f<_;){for(var d=-1,y=t[c+=e];++d<p;){var v=l[d],g=v.iteratee,m=v.type,b=g(y);if(2==m)y=b;else if(!b){if(1==m)continue t;break t}}h[f++]=y}return h},$r.prototype.at=ni,$r.prototype.chain=function(){return ei(this)},$r.prototype.commit=function(){return new Fr(this.value(),this.__chain__)},$r.prototype.next=function(){void 0===this.__values__&&(this.__values__=eu(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}},$r.prototype.plant=function(t){for(var e,r=this;r instanceof Pr;){var n=Oa(r);n.__index__=0,n.__values__=void 0,e?o.__wrapped__=n:e=n;var o=n;r=r.__wrapped__}return o.__wrapped__=t,e},$r.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Rr){var e=t;return this.__actions__.length&&(e=new Rr(this)),(e=e.reverse()).__actions__.push({func:ri,args:[Ha],thisArg:void 0}),new Fr(e,this.__chain__)}return this.thru(Ha)},$r.prototype.toJSON=$r.prototype.valueOf=$r.prototype.value=function(){return eo(this.__wrapped__,this.__actions__)},$r.prototype.first=$r.prototype.head,Ke&&($r.prototype[Ke]=function(){return this}),$r}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Ut._=He,define((function(){return He}))):Ht?((Ht.exports=He)._=He,Gt._=He):Ut._=He}).call(this)}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{}),_$lodash_35=_$lodash_35.exports;var _$processors_75={};function ___typeof_75(t){return(___typeof_75="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(_$processors_75,"__esModule",{value:!0}),_$processors_75.ApplyProcessor=function(t,e){return _ApplyProcessor.apply(this,arguments)},_$processors_75.default=void 0;var _lodash=_interopRequireDefault(_$lodash_35),___app_75=_interopRequireDefault(_$app_68);function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _toConsumableArray(t){return function(t){if(Array.isArray(t))return ___arrayLikeToArray_75(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ___regeneratorRuntime_75(){___regeneratorRuntime_75=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(x){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),i=new w(n||[]);return a._invoke=function(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return{value:void 0,done:!0}}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var u=b(i,r);if(u){if(u===l)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=c(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),a}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(x){return{type:"throw",arg:x}}}t.wrap=s;var l={};function p(){}function f(){}function _(){}var h={};u(h,o,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(C([])));y&&y!==e&&r.call(y,o)&&(h=y);var v=_.prototype=p.prototype=Object.create(h);function g(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){var n;this._invoke=function(o,a){function i(){return new e((function(n,i){!function n(o,a,i,u){var s=c(t[o],t,a);if("throw"!==s.type){var l=s.arg,p=l.value;return p&&"object"==___typeof_75(p)&&r.call(p,"__await")?e.resolve(p.__await).then((function(t){n("next",t,i,u)}),(function(t){n("throw",t,i,u)})):e.resolve(p).then((function(t){l.value=t,i(l)}),(function(t){return n("throw",t,i,u)}))}u(s.arg)}(o,a,n,i)}))}return n=n?n.then(i,i):i()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function C(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=_,u(v,"constructor",_),u(_,"constructor",f),f.displayName=u(_,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,u(t,i,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(m.prototype),u(m.prototype,a,(function(){return this})),t.AsyncIterator=m,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new m(s(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(v),u(v,i,"Generator"),u(v,o,(function(){return this})),u(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=C,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,l):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:C(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function __asyncGeneratorStep_75(t,e,r,n,o,a,i){try{var u=t[a](i),s=u.value}catch(c){return void r(c)}u.done?e(s):Promise.resolve(s).then(n,o)}function ___asyncToGenerator_75(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){__asyncGeneratorStep_75(a,n,o,i,u,"next",t)}function u(t){__asyncGeneratorStep_75(a,n,o,i,u,"throw",t)}i(void 0)}))}}function ___createForOfIteratorHelper_75(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=_unsupportedIterableToArray(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){u=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(u)throw a}}}}function _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return ___arrayLikeToArray_75(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?___arrayLikeToArray_75(t,e):void 0}}function ___arrayLikeToArray_75(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function __ownKeys_75(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ___objectSpread_75(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?__ownKeys_75(Object(r),!0).forEach((function(e){___defineProperty_75(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):__ownKeys_75(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ___defineProperty_75(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function getRegexOrder(t,e){for(var r=null,n=0;n<t.length;n++)if(t[n].test(e)){r=n+1;break}return r}function RegexRenameOperator(t){return{name:"Regex Rename Operator",func:function(e){return e.map((function(e){var r,n=___createForOfIteratorHelper_75(t);try{for(n.s();!(r=n.n()).done;){var o=r.value,a=o.expr,i=o.now;e.name=e.name.replace(buildRegex(a,"g"),i).trim()}}catch(u){n.e(u)}finally{n.f()}return e}))}}}var DOMAIN_RESOLVERS={Google:(_Google=___asyncToGenerator_75(___regeneratorRuntime_75().mark((function t(e){var r,n,o;return ___regeneratorRuntime_75().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,___app_75.default.http.get({url:"https://8.8.4.4/resolve?name=".concat(encodeURIComponent(e),"&type=A"),headers:{accept:"application/dns-json"}});case 2:if(r=t.sent,0===(n=JSON.parse(r.body)).Status){t.next=6;break}throw new Error("Status is ".concat(n.Status));case 6:if(0!==(o=n.Answer).length){t.next=9;break}throw new Error("No answers");case 9:return t.abrupt("return",o[o.length-1].data);case 10:case"end":return t.stop()}}),t)}))),function(t){return _Google.apply(this,arguments)}),"IP-API":(_IPAPI=___asyncToGenerator_75(___regeneratorRuntime_75().mark((function t(e){var r,n;return ___regeneratorRuntime_75().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,___app_75.default.http.get({url:"http://ip-api.com/json/".concat(encodeURIComponent(e),"?lang=zh-CN")});case 2:if(r=t.sent,"success"===(n=JSON.parse(r.body)).status){t.next=6;break}throw new Error("Status is ".concat(n.status));case 6:return t.abrupt("return",n.query);case 7:case"end":return t.stop()}}),t)}))),function(t){return _IPAPI.apply(this,arguments)}),Cloudflare:(_Cloudflare=___asyncToGenerator_75(___regeneratorRuntime_75().mark((function t(e){var r,n,o;return ___regeneratorRuntime_75().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,___app_75.default.http.get({url:"https://1.0.0.1/dns-query?name=".concat(encodeURIComponent(e),"&type=A"),headers:{accept:"application/dns-json"}});case 2:if(r=t.sent,0===(n=JSON.parse(r.body)).Status){t.next=6;break}throw new Error("Status is ".concat(n.Status));case 6:if(0!==(o=n.Answer).length){t.next=9;break}throw new Error("No answers");case 9:return t.abrupt("return",o[o.length-1].data);case 10:case"end":return t.stop()}}),t)}))),function(t){return _Cloudflare.apply(this,arguments)})},_Cloudflare,_IPAPI,_Google;function ResolveDomainOperator(t){var e,r=t.provider,n=DOMAIN_RESOLVERS[r];if(!n)throw new Error("Cannot find resolver: ".concat(r));return{name:"Resolve Domain Operator",func:(e=___asyncToGenerator_75(___regeneratorRuntime_75().mark((function t(e){var o,a,i,u,s,c,l,p,f;return ___regeneratorRuntime_75().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o={},a=15,i=_toConsumableArray(new Set(e.filter((function(t){return e=t.server,!((0,_$utils_104.isIPv4)(e)||(0,_$utils_104.isIPv6)(e));var e})).map((function(t){return t.server})))),u=Math.ceil(i.length/a),s=0;case 5:if(!(s<u)){t.next=14;break}c=[],l=___createForOfIteratorHelper_75(i.splice(0,a));try{for(f=function(){var t=p.value;c.push(n(t).then((function(e){o[t]=e,___app_75.default.info("Successfully resolved domain: ".concat(t," \u279f ").concat(e))})).catch((function(e){___app_75.default.error("Failed to resolve domain: ".concat(t," with resolver [").concat(r,"]: ").concat(e))})))},l.s();!(p=l.n()).done;)f()}catch(_){l.e(_)}finally{l.f()}return t.next=11,Promise.all(c);case 11:s++,t.next=5;break;case 14:return e.forEach((function(t){t.server=o[t.server]||t.server})),t.abrupt("return",e);case 16:case"end":return t.stop()}}),t)}))),function(t){return e.apply(this,arguments)})}}function UselessFilter(){return{name:"Useless Filter",func:RegexFilter({regex:["\u7f51\u5740","\u6d41\u91cf","\u65f6\u95f4","\u5e94\u6025","\u8fc7\u671f","Bandwidth","expire"],keep:!1}).func}}function RegexFilter(t){var e=t.regex,r=void 0===e?[]:e,n=t.keep,o=void 0===n||n;return{name:"Regex Filter",func:function(t){return t.map((function(t){var e=r.some((function(e){return buildRegex(e).test(t.name)}));return o?e:!e}))}}}function buildRegex(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return r=r.join(""),t.startsWith("(?i)")?(t=t.substring(4),new RegExp(t,"i"+r)):new RegExp(t,r)}ResolveDomainOperator.resolver=DOMAIN_RESOLVERS;var ___default_75={"Useless Filter":UselessFilter,"Region Filter":function(t){var e={HK:"\ud83c\udded\ud83c\uddf0",TW:"\ud83c\uddf9\ud83c\uddfc",US:"\ud83c\uddfa\ud83c\uddf8",SG:"\ud83c\uddf8\ud83c\uddec",JP:"\ud83c\uddef\ud83c\uddf5",UK:"\ud83c\uddec\ud83c\udde7"};return{name:"Region Filter",func:function(r){return r.map((function(r){var n=(0,_$geo_102.getFlag)(r.name);return t.some((function(t){return e[t]===n}))}))}}},"Regex Filter":RegexFilter,"Type Filter":function(t){return{name:"Type Filter",func:function(e){return e.map((function(e){return t.some((function(t){return e.type===t}))}))}}},"Script Filter":function(t,e,r){return{name:"Script Filter",func:(n=___asyncToGenerator_75(___regeneratorRuntime_75().mark((function n(o){var a;return ___regeneratorRuntime_75().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=(0,_$logical_105.FULL)(o.length,!0),n.next=3,___asyncToGenerator_75(___regeneratorRuntime_75().mark((function n(){var i;return ___regeneratorRuntime_75().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:i=createDynamicFunction("filter",t,r),a=i(o,e);case 2:case"end":return n.stop()}}),n)})))();case 3:return n.abrupt("return",a);case 4:case"end":return n.stop()}}),n)}))),function(t){return n.apply(this,arguments)})};var n},"Conditional Filter":function(t){var e=t.rule;return{name:"Conditional Filter",func:function(t){return t.map((function(t){return function t(e,r){if(!e.operator)switch(e.proposition){case"IN":return-1!==e.value.indexOf(r[e.attr]);case"CONTAINS":return"string"==typeof r[e.attr]&&-1!==r[e.attr].indexOf(e.value);case"EQUALS":return r[e.attr]===e.value;case"EXISTS":return null!==r[e.attr]||void 0!==r[e.attr];default:throw new Error("Unknown proposition: ".concat(e.proposition))}switch(e.operator){case"AND":return e.child.every((function(e){return t(e,r)}));case"OR":return e.child.some((function(e){return t(e,r)}));case"NOT":return!t(e.child,r);default:throw new Error("Unknown operator: ".concat(e.operator))}}(e,t)}))}}},"Quick Setting Operator":function(t){return{name:"Quick Setting Operator",func:function(r){if(e(t.useless)){var n=UselessFilter().func(r);r.filter((function(t,e){return n[e]}))}return r.map((function(r){return r.udp=e(t.udp,r.udp),r.tfo=e(t.tfo,r.tfo),r["skip-cert-verify"]=e(t.scert,r["skip-cert-verify"]),"vmess"===r.type&&(r.aead=e(t["vmess aead"],r.aead)),r}))}};function e(t,e){switch(t){case"ENABLED":return!0;case"DISABLED":return!1;default:return e}}},"Flag Operator":function(t){var e=t.mode;return{name:"Flag Operator",func:function(t){return t.map((function(t){if("remove"===e)t.name=removeFlag(t.name);else{var r=(0,_$geo_102.getFlag)(t.name);t.name=removeFlag(t.name),t.name=r+" "+t.name,t.name=t.name.replace(/\ud83c\uddf9\ud83c\uddfc/g,"\ud83c\udde8\ud83c\uddf3")}return t}))}}},"Sort Operator":function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"asc";return{name:"Sort Operator",func:function(e){switch(t){case"asc":case"desc":return e.sort((function(e,r){return(e.name>r.name?1:-1)*("desc"===t?-1:1)}));case"random":return function(t){for(var e,r,n=t.length;0!==n;)r=Math.floor(Math.random()*n),e=t[n-=1],t[n]=t[r],t[r]=e;return t}(e);default:throw new Error("Unknown sort option: "+t)}}}},"Regex Sort Operator":function(t){return{name:"Regex Sort Operator",func:function(e){return t=t.map((function(t){return buildRegex(t)})),e.sort((function(e,r){var n=getRegexOrder(t,e.name),o=getRegexOrder(t,r.name);return n&&!o?-1:o&&!n?1:n&&o?n<o?-1:1:!n&&!o||n&&o&&n===o?e.name<r.name?-1:1:void 0}))}}},"Regex Rename Operator":RegexRenameOperator,"Regex Delete Operator":function(t){return{name:"Regex Delete Operator",func:RegexRenameOperator(t.map((function(t){return{expr:t,now:""}}))).func}},"Script Operator":function(t,e,r){return{name:"Script Operator",func:(n=___asyncToGenerator_75(___regeneratorRuntime_75().mark((function n(o){var a;return ___regeneratorRuntime_75().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=o,n.next=3,___asyncToGenerator_75(___regeneratorRuntime_75().mark((function n(){var i;return ___regeneratorRuntime_75().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:i=createDynamicFunction("operator",t,r),a=i(o,e);case 2:case"end":return n.stop()}}),n)})))();case 3:return n.abrupt("return",a);case 4:case"end":return n.stop()}}),n)}))),function(t){return n.apply(this,arguments)})};var n},"Handle Duplicate Operator":function(t){var e=___objectSpread_75(___objectSpread_75({},{action:"rename",template:"0 1 2 3 4 5 6 7 8 9",link:"-",position:"back"}),t),r=e.action,n=e.template,o=e.link,a=e.position;return{name:"Handle Duplicate Operator",func:function(t){if("delete"===r){var e={};return t.filter((function(t){return!e[t.name]&&(e[t.name]=!0,!0)}))}if("rename"===r){var i=n.split(" "),u={},s=0;t.forEach((function(t){void 0===u[t.name]?u[t.name]=1:u[t.name]++,s=Math.max(u[t.name].toString().length,s)}));var c={};return t.map((function(t){if(u[t.name]>1){void 0===c[t.name]&&(c[t.name]=1);for(var e="",r=c[t.name]++,n=0;r>0;)e=i[r%10]+e,r=parseInt(r/10),n++;for(;n++<s;)e=i[0]+e;"front"===a?t.name=e+o+t.name:"back"===a&&(t.name=t.name+o+e)}return t}))}}}},"Resolve Domain Operator":ResolveDomainOperator};function ApplyFilter(t,e){return _ApplyFilter.apply(this,arguments)}function _ApplyFilter(){return(_ApplyFilter=___asyncToGenerator_75(___regeneratorRuntime_75().mark((function t(e,r){var n;return ___regeneratorRuntime_75().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=(0,_$logical_105.FULL)(r.length,!0),t.prev=1,t.next=4,e.func(r);case 4:n=t.sent,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(1),___app_75.default.log("Cannot apply filter ".concat(e.name,"\n Reason: ").concat(t.t0));case 10:return t.abrupt("return",r.filter((function(t,e){return n[e]})));case 11:case"end":return t.stop()}}),t,null,[[1,7]])})))).apply(this,arguments)}function ApplyOperator(t,e){return _ApplyOperator.apply(this,arguments)}function _ApplyOperator(){return(_ApplyOperator=___asyncToGenerator_75(___regeneratorRuntime_75().mark((function t(e,r){var n,o;return ___regeneratorRuntime_75().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=r,n=JSON.parse(JSON.stringify(a)),t.prev=1,t.next=4,e.func(n);case 4:(o=t.sent)&&(n=o),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(1),___app_75.default.log("Cannot apply operator ".concat(e.name,"! Reason: ").concat(t.t0));case 11:return t.abrupt("return",n);case 12:case"end":return t.stop()}var a}),t,null,[[1,8]])})))).apply(this,arguments)}function _ApplyProcessor(){return(_ApplyProcessor=___asyncToGenerator_75(___regeneratorRuntime_75().mark((function t(e,r){return ___regeneratorRuntime_75().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(-1===e.name.indexOf("Filter")){t.next=4;break}return t.abrupt("return",ApplyFilter(e,r));case 4:if(-1===e.name.indexOf("Operator")){t.next=6;break}return t.abrupt("return",ApplyOperator(e,r));case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function removeFlag(t){return t.replace(/[\uD83C][\uDDE6-\uDDFF][\uD83C][\uDDE6-\uDDFF]/g,"").trim()}function createDynamicFunction(t,e,r){return ___app_75.default.env.isLoon?new Function("$arguments","$substore","lodash","$persistentStore","$httpClient","$notification","".concat(e,"\n return ").concat(t))(r,___app_75.default,_lodash.default,$persistentStore,$httpClient,$notification):new Function("$arguments","$substore","lodash","".concat(e,"\n return ").concat(t))(r,___app_75.default,_lodash.default)}_$processors_75.default=___default_75;var _$common_7={};function isNothing(t){return null==t}_$common_7.isNothing=isNothing,_$common_7.isObject=function(t){return"object"==typeof t&&null!==t},_$common_7.toArray=function(t){return Array.isArray(t)?t:isNothing(t)?[]:[t]},_$common_7.repeat=function(t,e){var r,n="";for(r=0;r<e;r+=1)n+=t;return n},_$common_7.isNegativeZero=function(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t},_$common_7.extend=function(t,e){var r,n,o,a;if(e)for(r=0,n=(a=Object.keys(e)).length;r<n;r+=1)t[o=a[r]]=e[o];return t};var _$exception_9={};function YAMLException(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}YAMLException.prototype=Object.create(Error.prototype),YAMLException.prototype.constructor=YAMLException,YAMLException.prototype.toString=function(t){var e=this.name+": ";return e+=this.reason||"(unknown reason)",!t&&this.mark&&(e+=" "+this.mark.toString()),e},_$exception_9=YAMLException;var _$mark_11={};function Mark(t,e,r,n,o){this.name=t,this.buffer=e,this.position=r,this.line=n,this.column=o}Mark.prototype.getSnippet=function(t,e){var r,n,o,a,i;if(!this.buffer)return null;for(t=t||4,e=e||75,r="",n=this.position;n>0&&-1==="\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(n-1));)if(n-=1,this.position-n>e/2-1){r=" ... ",n+=5;break}for(o="",a=this.position;a<this.buffer.length&&-1==="\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(a));)if((a+=1)-this.position>e/2-1){o=" ... ",a-=5;break}return i=this.buffer.slice(n,a),_$common_7.repeat(" ",t)+r+i+o+"\n"+_$common_7.repeat(" ",t+this.position-n+r.length)+"^"},Mark.prototype.toString=function(t){var e,r="";return this.name&&(r+='in "'+this.name+'" '),r+="at line "+(this.line+1)+", column "+(this.column+1),t||(e=this.getSnippet())&&(r+=":\n"+e),r},_$mark_11=Mark;var TYPE_CONSTRUCTOR_OPTIONS=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],YAML_NODE_KINDS=["scalar","sequence","mapping"],_$type_18=function(t,e){var r,n;if(e=e||{},Object.keys(e).forEach((function(e){if(-1===TYPE_CONSTRUCTOR_OPTIONS.indexOf(e))throw new _$exception_9('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')})),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=(r=e.styleAliases||null,n={},null!==r&&Object.keys(r).forEach((function(t){r[t].forEach((function(e){n[String(e)]=t}))})),n),-1===YAML_NODE_KINDS.indexOf(this.kind))throw new _$exception_9('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')},_$schema_12={};function compileList(t,e,r){var n=[];return t.include.forEach((function(t){r=compileList(t,e,r)})),t[e].forEach((function(t){r.forEach((function(e,r){e.tag===t.tag&&e.kind===t.kind&&n.push(r)})),r.push(t)})),r.filter((function(t,e){return-1===n.indexOf(e)}))}function Schema(t){this.include=t.include||[],this.implicit=t.implicit||[],this.explicit=t.explicit||[],this.implicit.forEach((function(t){if(t.loadKind&&"scalar"!==t.loadKind)throw new _$exception_9("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")})),this.compiledImplicit=compileList(this,"implicit",[]),this.compiledExplicit=compileList(this,"explicit",[]),this.compiledTypeMap=function(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{}};function n(t){r[t.kind][t.tag]=r.fallback[t.tag]=t}for(t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(n);return r}(this.compiledImplicit,this.compiledExplicit)}Schema.DEFAULT=null,Schema.create=function(){var t,e;switch(arguments.length){case 1:t=Schema.DEFAULT,e=arguments[0];break;case 2:t=arguments[0],e=arguments[1];break;default:throw new _$exception_9("Wrong number of arguments for Schema.create function")}if(t=_$common_7.toArray(t),e=_$common_7.toArray(e),!t.every((function(t){return t instanceof Schema})))throw new _$exception_9("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!e.every((function(t){return t instanceof _$type_18})))throw new _$exception_9("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new Schema({include:t,explicit:e})},_$schema_12=Schema;var _$str_33=new _$type_18("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return null!==t?t:""}}),_$seq_31=new _$type_18("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return null!==t?t:[]}}),_$map_26=new _$type_18("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return null!==t?t:{}}}),_$failsafe_16=new _$schema_12({explicit:[_$str_33,_$seq_31,_$map_26]}),_$null_28=new _$type_18("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)},construct:function(){return null},predicate:function(t){return null===t},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"}),_$bool_20=new _$type_18("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)},construct:function(t){return"true"===t||"True"===t||"TRUE"===t},predicate:function(t){return"[object Boolean]"===Object.prototype.toString.call(t)},represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function isOctCode(t){return 48<=t&&t<=55}function isDecCode(t){return 48<=t&&t<=57}var _$int_22=new _$type_18("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e,r,n=t.length,o=0,a=!1;if(!n)return!1;if("-"!==(e=t[o])&&"+"!==e||(e=t[++o]),"0"===e){if(o+1===n)return!0;if("b"===(e=t[++o])){for(o++;o<n;o++)if("_"!==(e=t[o])){if("0"!==e&&"1"!==e)return!1;a=!0}return a&&"_"!==e}if("x"===e){for(o++;o<n;o++)if("_"!==(e=t[o])){if(!(48<=(r=t.charCodeAt(o))&&r<=57||65<=r&&r<=70||97<=r&&r<=102))return!1;a=!0}return a&&"_"!==e}for(;o<n;o++)if("_"!==(e=t[o])){if(!isOctCode(t.charCodeAt(o)))return!1;a=!0}return a&&"_"!==e}if("_"===e)return!1;for(;o<n;o++)if("_"!==(e=t[o])){if(":"===e)break;if(!isDecCode(t.charCodeAt(o)))return!1;a=!0}return!(!a||"_"===e)&&(":"!==e||/^(:[0-5]?[0-9])+$/.test(t.slice(o)))},construct:function(t){var e,r,n=t,o=1,a=[];return-1!==n.indexOf("_")&&(n=n.replace(/_/g,"")),"-"!==(e=n[0])&&"+"!==e||("-"===e&&(o=-1),e=(n=n.slice(1))[0]),"0"===n?0:"0"===e?"b"===n[1]?o*parseInt(n.slice(2),2):"x"===n[1]?o*parseInt(n,16):o*parseInt(n,8):-1!==n.indexOf(":")?(n.split(":").forEach((function(t){a.unshift(parseInt(t,10))})),n=0,r=1,a.forEach((function(t){n+=t*r,r*=60})),o*n):o*parseInt(n,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!_$common_7.isNegativeZero(t)},represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0"+t.toString(8):"-0"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),YAML_FLOAT_PATTERN=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),SCIENTIFIC_WITHOUT_DOT=/^[-+]?[0-9]+e/,_$float_21=new _$type_18("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(t){return null!==t&&!(!YAML_FLOAT_PATTERN.test(t)||"_"===t[t.length-1])},construct:function(t){var e,r,n,o;return r="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,o=[],"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:e.indexOf(":")>=0?(e.split(":").forEach((function(t){o.unshift(parseFloat(t,10))})),e=0,n=1,o.forEach((function(t){e+=t*n,n*=60})),r*e):r*parseFloat(e,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||_$common_7.isNegativeZero(t))},represent:function(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(_$common_7.isNegativeZero(t))return"-0.0";return r=t.toString(10),SCIENTIFIC_WITHOUT_DOT.test(r)?r.replace("e",".e"):r},defaultStyle:"lowercase"}),_$json_17=new _$schema_12({include:[_$failsafe_16],implicit:[_$null_28,_$bool_20,_$int_22,_$float_21]}),_$core_13=new _$schema_12({include:[_$json_17]}),YAML_DATE_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),YAML_TIMESTAMP_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"),_$timestamp_34=new _$type_18("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(t){return null!==t&&(null!==YAML_DATE_REGEXP.exec(t)||null!==YAML_TIMESTAMP_REGEXP.exec(t))},construct:function(t){var e,r,n,o,a,i,u,s,c=0,l=null;if(null===(e=YAML_DATE_REGEXP.exec(t))&&(e=YAML_TIMESTAMP_REGEXP.exec(t)),null===e)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,o=+e[3],!e[4])return new Date(Date.UTC(r,n,o));if(a=+e[4],i=+e[5],u=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+="0";c=+c}return e[9]&&(l=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(l=-l)),s=new Date(Date.UTC(r,n,o,a,i,u,c)),l&&s.setTime(s.getTime()-l),s},instanceOf:Date,represent:function(t){return t.toISOString()}}),_$merge_27=new _$type_18("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(t){return"<<"===t||null===t}}),NodeBuffer;try{var _require=require;NodeBuffer=_require("buffer").Buffer}catch(__){}var BASE64_MAP="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r",_$binary_19=new _$type_18("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e,r,n=0,o=t.length,a=BASE64_MAP;for(r=0;r<o;r++)if(!((e=a.indexOf(t.charAt(r)))>64)){if(e<0)return!1;n+=6}return n%8==0},construct:function(t){var e,r,n=t.replace(/[\r\n=]/g,""),o=n.length,a=BASE64_MAP,i=0,u=[];for(e=0;e<o;e++)e%4==0&&e&&(u.push(i>>16&255),u.push(i>>8&255),u.push(255&i)),i=i<<6|a.indexOf(n.charAt(e));return 0==(r=o%4*6)?(u.push(i>>16&255),u.push(i>>8&255),u.push(255&i)):18===r?(u.push(i>>10&255),u.push(i>>2&255)):12===r&&u.push(i>>4&255),NodeBuffer?NodeBuffer.from?NodeBuffer.from(u):new NodeBuffer(u):u},predicate:function(t){return NodeBuffer&&NodeBuffer.isBuffer(t)},represent:function(t){var e,r,n="",o=0,a=t.length,i=BASE64_MAP;for(e=0;e<a;e++)e%3==0&&e&&(n+=i[o>>18&63],n+=i[o>>12&63],n+=i[o>>6&63],n+=i[63&o]),o=(o<<8)+t[e];return 0==(r=a%3)?(n+=i[o>>18&63],n+=i[o>>12&63],n+=i[o>>6&63],n+=i[63&o]):2===r?(n+=i[o>>10&63],n+=i[o>>4&63],n+=i[o<<2&63],n+=i[64]):1===r&&(n+=i[o>>2&63],n+=i[o<<4&63],n+=i[64],n+=i[64]),n}}),_hasOwnProperty=Object.prototype.hasOwnProperty,_toString=Object.prototype.toString,_$omap_29=new _$type_18("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(t){if(null===t)return!0;var e,r,n,o,a,i=[],u=t;for(e=0,r=u.length;e<r;e+=1){if(n=u[e],a=!1,"[object Object]"!==_toString.call(n))return!1;for(o in n)if(_hasOwnProperty.call(n,o)){if(a)return!1;a=!0}if(!a)return!1;if(-1!==i.indexOf(o))return!1;i.push(o)}return!0},construct:function(t){return null!==t?t:[]}}),___toString_30=Object.prototype.toString,_$pairs_30=new _$type_18("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(t){if(null===t)return!0;var e,r,n,o,a,i=t;for(a=new Array(i.length),e=0,r=i.length;e<r;e+=1){if(n=i[e],"[object Object]"!==___toString_30.call(n))return!1;if(1!==(o=Object.keys(n)).length)return!1;a[e]=[o[0],n[o[0]]]}return!0},construct:function(t){if(null===t)return[];var e,r,n,o,a,i=t;for(a=new Array(i.length),e=0,r=i.length;e<r;e+=1)n=i[e],o=Object.keys(n),a[e]=[o[0],n[o[0]]];return a}}),___hasOwnProperty_32=Object.prototype.hasOwnProperty,_$set_32=new _$type_18("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(t){if(null===t)return!0;var e,r=t;for(e in r)if(___hasOwnProperty_32.call(r,e)&&null!==r[e])return!1;return!0},construct:function(t){return null!==t?t:{}}}),_$default_safe_15=new _$schema_12({include:[_$core_13],implicit:[_$timestamp_34,_$merge_27],explicit:[_$binary_19,_$omap_29,_$pairs_30,_$set_32]}),_$undefined_25=new _$type_18("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:function(){return!0},construct:function(){},predicate:function(t){return void 0===t},represent:function(){return""}}),_$regexp_24=new _$type_18("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:function(t){if(null===t)return!1;if(0===t.length)return!1;var e=t,r=/\/([gim]*)$/.exec(t),n="";if("/"===e[0]){if(r&&(n=r[1]),n.length>3)return!1;if("/"!==e[e.length-n.length-1])return!1}return!0},construct:function(t){var e=t,r=/\/([gim]*)$/.exec(t),n="";return"/"===e[0]&&(r&&(n=r[1]),e=e.slice(1,e.length-n.length-1)),new RegExp(e,n)},predicate:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},represent:function(t){var e="/"+t.source+"/";return t.global&&(e+="g"),t.multiline&&(e+="m"),t.ignoreCase&&(e+="i"),e}}),esprima;try{var ___require_23=require;esprima=___require_23("esprima")}catch(_){"undefined"!=typeof window&&(esprima=window.esprima)}var _$function_23=new _$type_18("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function(t){if(null===t)return!1;try{var e="("+t+")",r=esprima.parse(e,{range:!0});return"Program"===r.type&&1===r.body.length&&"ExpressionStatement"===r.body[0].type&&("ArrowFunctionExpression"===r.body[0].expression.type||"FunctionExpression"===r.body[0].expression.type)}catch(n){return!1}},construct:function(t){var e,r="("+t+")",n=esprima.parse(r,{range:!0}),o=[];if("Program"!==n.type||1!==n.body.length||"ExpressionStatement"!==n.body[0].type||"ArrowFunctionExpression"!==n.body[0].expression.type&&"FunctionExpression"!==n.body[0].expression.type)throw new Error("Failed to resolve function");return n.body[0].expression.params.forEach((function(t){o.push(t.name)})),e=n.body[0].expression.body.range,"BlockStatement"===n.body[0].expression.body.type?new Function(o,r.slice(e[0]+1,e[1]-1)):new Function(o,"return "+r.slice(e[0],e[1]))},predicate:function(t){return"[object Function]"===Object.prototype.toString.call(t)},represent:function(t){return t.toString()}}),_$default_full_14=_$schema_12.DEFAULT=new _$schema_12({include:[_$default_safe_15],explicit:[_$undefined_25,_$regexp_24,_$function_23]}),_$loader_10={},___hasOwnProperty_10=Object.prototype.hasOwnProperty,CONTEXT_FLOW_IN=1,CONTEXT_FLOW_OUT=2,CONTEXT_BLOCK_IN=3,CONTEXT_BLOCK_OUT=4,CHOMPING_CLIP=1,CHOMPING_STRIP=2,CHOMPING_KEEP=3,PATTERN_NON_PRINTABLE=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,PATTERN_NON_ASCII_LINE_BREAKS=/[\x85\u2028\u2029]/,PATTERN_FLOW_INDICATORS=/[,\[\]\{\}]/,PATTERN_TAG_HANDLE=/^(?:!|!!|![a-z\-]+!)$/i,PATTERN_TAG_URI=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _class(t){return Object.prototype.toString.call(t)}function is_EOL(t){return 10===t||13===t}function is_WHITE_SPACE(t){return 9===t||32===t}function is_WS_OR_EOL(t){return 9===t||32===t||10===t||13===t}function is_FLOW_INDICATOR(t){return 44===t||91===t||93===t||123===t||125===t}function fromHexCode(t){var e;return 48<=t&&t<=57?t-48:97<=(e=32|t)&&e<=102?e-97+10:-1}function simpleEscapeSequence(t){return 48===t?"\0":97===t?"\x07":98===t?"\b":116===t||9===t?"\t":110===t?"\n":118===t?"\v":102===t?"\f":114===t?"\r":101===t?"\x1b":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"\x85":95===t?"\xa0":76===t?"\u2028":80===t?"\u2029":""}function charFromCodepoint(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}for(var simpleEscapeCheck=new Array(256),simpleEscapeMap=new Array(256),i=0;i<256;i++)simpleEscapeCheck[i]=simpleEscapeSequence(i)?1:0,simpleEscapeMap[i]=simpleEscapeSequence(i);function State(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||_$default_full_14,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function generateError(t,e){return new _$exception_9(e,new _$mark_11(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function throwError(t,e){throw generateError(t,e)}function throwWarning(t,e){t.onWarning&&t.onWarning.call(null,generateError(t,e))}var directiveHandlers={YAML:function(t,e,r){var n,o,a;null!==t.version&&throwError(t,"duplication of %YAML directive"),1!==r.length&&throwError(t,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&throwError(t,"ill-formed argument of the YAML directive"),o=parseInt(n[1],10),a=parseInt(n[2],10),1!==o&&throwError(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=a<2,1!==a&&2!==a&&throwWarning(t,"unsupported YAML version of the document")},TAG:function(t,e,r){var n,o;2!==r.length&&throwError(t,"TAG directive accepts exactly two arguments"),n=r[0],o=r[1],PATTERN_TAG_HANDLE.test(n)||throwError(t,"ill-formed tag handle (first argument) of the TAG directive"),___hasOwnProperty_10.call(t.tagMap,n)&&throwError(t,'there is a previously declared suffix for "'+n+'" tag handle'),PATTERN_TAG_URI.test(o)||throwError(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[n]=o}};function captureSegment(t,e,r,n){var o,a,i,u;if(e<r){if(u=t.input.slice(e,r),n)for(o=0,a=u.length;o<a;o+=1)9===(i=u.charCodeAt(o))||32<=i&&i<=1114111||throwError(t,"expected valid JSON character");else PATTERN_NON_PRINTABLE.test(u)&&throwError(t,"the stream contains non-printable characters");t.result+=u}}function mergeMappings(t,e,r,n){var o,a,i,u;for(_$common_7.isObject(r)||throwError(t,"cannot merge mappings; the provided source object is unacceptable"),i=0,u=(o=Object.keys(r)).length;i<u;i+=1)a=o[i],___hasOwnProperty_10.call(e,a)||(e[a]=r[a],n[a]=!0)}function storeMappingPair(t,e,r,n,o,a,i,u){var s,c;if(Array.isArray(o))for(s=0,c=(o=Array.prototype.slice.call(o)).length;s<c;s+=1)Array.isArray(o[s])&&throwError(t,"nested arrays are not supported inside keys"),"object"==typeof o&&"[object Object]"===_class(o[s])&&(o[s]="[object Object]");if("object"==typeof o&&"[object Object]"===_class(o)&&(o="[object Object]"),o=String(o),null===e&&(e={}),"tag:yaml.org,2002:merge"===n)if(Array.isArray(a))for(s=0,c=a.length;s<c;s+=1)mergeMappings(t,e,a[s],r);else mergeMappings(t,e,a,r);else t.json||___hasOwnProperty_10.call(r,o)||!___hasOwnProperty_10.call(e,o)||(t.line=i||t.line,t.position=u||t.position,throwError(t,"duplicated mapping key")),e[o]=a,delete r[o];return e}function readLineBreak(t){var e;10===(e=t.input.charCodeAt(t.position))?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):throwError(t,"a line break is expected"),t.line+=1,t.lineStart=t.position}function skipSeparationSpace(t,e,r){for(var n=0,o=t.input.charCodeAt(t.position);0!==o;){for(;is_WHITE_SPACE(o);)o=t.input.charCodeAt(++t.position);if(e&&35===o)do{o=t.input.charCodeAt(++t.position)}while(10!==o&&13!==o&&0!==o);if(!is_EOL(o))break;for(readLineBreak(t),o=t.input.charCodeAt(t.position),n++,t.lineIndent=0;32===o;)t.lineIndent++,o=t.input.charCodeAt(++t.position)}return-1!==r&&0!==n&&t.lineIndent<r&&throwWarning(t,"deficient indentation"),n}function testDocumentSeparator(t){var e,r=t.position;return!(45!==(e=t.input.charCodeAt(r))&&46!==e||e!==t.input.charCodeAt(r+1)||e!==t.input.charCodeAt(r+2)||(r+=3,0!==(e=t.input.charCodeAt(r))&&!is_WS_OR_EOL(e)))}function writeFoldedLines(t,e){1===e?t.result+=" ":e>1&&(t.result+=_$common_7.repeat("\n",e-1))}function readBlockSequence(t,e){var r,n,o=t.tag,a=t.anchor,i=[],u=!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=i),n=t.input.charCodeAt(t.position);0!==n&&45===n&&is_WS_OR_EOL(t.input.charCodeAt(t.position+1));)if(u=!0,t.position++,skipSeparationSpace(t,!0,-1)&&t.lineIndent<=e)i.push(null),n=t.input.charCodeAt(t.position);else if(r=t.line,composeNode(t,e,CONTEXT_BLOCK_IN,!1,!0),i.push(t.result),skipSeparationSpace(t,!0,-1),n=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&0!==n)throwError(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return!!u&&(t.tag=o,t.anchor=a,t.kind="sequence",t.result=i,!0)}function readTagProperty(t){var e,r,n,o,a=!1,i=!1;if(33!==(o=t.input.charCodeAt(t.position)))return!1;if(null!==t.tag&&throwError(t,"duplication of a tag property"),60===(o=t.input.charCodeAt(++t.position))?(a=!0,o=t.input.charCodeAt(++t.position)):33===o?(i=!0,r="!!",o=t.input.charCodeAt(++t.position)):r="!",e=t.position,a){do{o=t.input.charCodeAt(++t.position)}while(0!==o&&62!==o);t.position<t.length?(n=t.input.slice(e,t.position),o=t.input.charCodeAt(++t.position)):throwError(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==o&&!is_WS_OR_EOL(o);)33===o&&(i?throwError(t,"tag suffix cannot contain exclamation marks"):(r=t.input.slice(e-1,t.position+1),PATTERN_TAG_HANDLE.test(r)||throwError(t,"named tag handle cannot contain such characters"),i=!0,e=t.position+1)),o=t.input.charCodeAt(++t.position);n=t.input.slice(e,t.position),PATTERN_FLOW_INDICATORS.test(n)&&throwError(t,"tag suffix cannot contain flow indicator characters")}return n&&!PATTERN_TAG_URI.test(n)&&throwError(t,"tag name cannot contain such characters: "+n),a?t.tag=n:___hasOwnProperty_10.call(t.tagMap,r)?t.tag=t.tagMap[r]+n:"!"===r?t.tag="!"+n:"!!"===r?t.tag="tag:yaml.org,2002:"+n:throwError(t,'undeclared tag handle "'+r+'"'),!0}function readAnchorProperty(t){var e,r;if(38!==(r=t.input.charCodeAt(t.position)))return!1;for(null!==t.anchor&&throwError(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!is_WS_OR_EOL(r)&&!is_FLOW_INDICATOR(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&throwError(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function composeNode(t,e,r,n,o){var a,i,u,s,c,l,p,f,_=1,h=!1,d=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,a=i=u=CONTEXT_BLOCK_OUT===r||CONTEXT_BLOCK_IN===r,n&&skipSeparationSpace(t,!0,-1)&&(h=!0,t.lineIndent>e?_=1:t.lineIndent===e?_=0:t.lineIndent<e&&(_=-1)),1===_)for(;readTagProperty(t)||readAnchorProperty(t);)skipSeparationSpace(t,!0,-1)?(h=!0,u=a,t.lineIndent>e?_=1:t.lineIndent===e?_=0:t.lineIndent<e&&(_=-1)):u=!1;if(u&&(u=h||o),1!==_&&CONTEXT_BLOCK_OUT!==r||(p=CONTEXT_FLOW_IN===r||CONTEXT_FLOW_OUT===r?e:e+1,f=t.position-t.lineStart,1===_?u&&(readBlockSequence(t,f)||function(t,e,r){var n,o,a,i,u,s=t.tag,c=t.anchor,l={},p={},f=null,_=null,h=null,d=!1,y=!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=l),u=t.input.charCodeAt(t.position);0!==u;){if(n=t.input.charCodeAt(t.position+1),a=t.line,i=t.position,63!==u&&58!==u||!is_WS_OR_EOL(n)){if(!composeNode(t,r,CONTEXT_FLOW_OUT,!1,!0))break;if(t.line===a){for(u=t.input.charCodeAt(t.position);is_WHITE_SPACE(u);)u=t.input.charCodeAt(++t.position);if(58===u)is_WS_OR_EOL(u=t.input.charCodeAt(++t.position))||throwError(t,"a whitespace character is expected after the key-value separator within a block mapping"),d&&(storeMappingPair(t,l,p,f,_,null),f=_=h=null),y=!0,d=!1,o=!1,f=t.tag,_=t.result;else{if(!y)return t.tag=s,t.anchor=c,!0;throwError(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!y)return t.tag=s,t.anchor=c,!0;throwError(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===u?(d&&(storeMappingPair(t,l,p,f,_,null),f=_=h=null),y=!0,d=!0,o=!0):d?(d=!1,o=!0):throwError(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,u=n;if((t.line===a||t.lineIndent>e)&&(composeNode(t,e,CONTEXT_BLOCK_OUT,!0,o)&&(d?_=t.result:h=t.result),d||(storeMappingPair(t,l,p,f,_,h,a,i),f=_=h=null),skipSeparationSpace(t,!0,-1),u=t.input.charCodeAt(t.position)),t.lineIndent>e&&0!==u)throwError(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return d&&storeMappingPair(t,l,p,f,_,null),y&&(t.tag=s,t.anchor=c,t.kind="mapping",t.result=l),y}(t,f,p))||function(t,e){var r,n,o,a,i,u,s,c,l,p,f=!0,_=t.tag,h=t.anchor,d={};if(91===(p=t.input.charCodeAt(t.position)))o=93,u=!1,n=[];else{if(123!==p)return!1;o=125,u=!0,n={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=n),p=t.input.charCodeAt(++t.position);0!==p;){if(skipSeparationSpace(t,!0,e),(p=t.input.charCodeAt(t.position))===o)return t.position++,t.tag=_,t.anchor=h,t.kind=u?"mapping":"sequence",t.result=n,!0;f||throwError(t,"missed comma between flow collection entries"),l=null,a=i=!1,63===p&&is_WS_OR_EOL(t.input.charCodeAt(t.position+1))&&(a=i=!0,t.position++,skipSeparationSpace(t,!0,e)),r=t.line,composeNode(t,e,CONTEXT_FLOW_IN,!1,!0),c=t.tag,s=t.result,skipSeparationSpace(t,!0,e),p=t.input.charCodeAt(t.position),!i&&t.line!==r||58!==p||(a=!0,p=t.input.charCodeAt(++t.position),skipSeparationSpace(t,!0,e),composeNode(t,e,CONTEXT_FLOW_IN,!1,!0),l=t.result),u?storeMappingPair(t,n,d,c,s,l):a?n.push(storeMappingPair(t,null,d,c,s,l)):n.push(s),skipSeparationSpace(t,!0,e),44===(p=t.input.charCodeAt(t.position))?(f=!0,p=t.input.charCodeAt(++t.position)):f=!1}throwError(t,"unexpected end of the stream within a flow collection")}(t,p)?d=!0:(i&&function(t,e){var r,n,o,a,i,u=CHOMPING_CLIP,s=!1,c=!1,l=e,p=0,f=!1;if(124===(a=t.input.charCodeAt(t.position)))n=!1;else{if(62!==a)return!1;n=!0}for(t.kind="scalar",t.result="";0!==a;)if(43===(a=t.input.charCodeAt(++t.position))||45===a)CHOMPING_CLIP===u?u=43===a?CHOMPING_KEEP:CHOMPING_STRIP:throwError(t,"repeat of a chomping mode identifier");else{if(!((o=48<=(i=a)&&i<=57?i-48:-1)>=0))break;0===o?throwError(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?throwError(t,"repeat of an indentation width identifier"):(l=e+o-1,c=!0)}if(is_WHITE_SPACE(a)){do{a=t.input.charCodeAt(++t.position)}while(is_WHITE_SPACE(a));if(35===a)do{a=t.input.charCodeAt(++t.position)}while(!is_EOL(a)&&0!==a)}for(;0!==a;){for(readLineBreak(t),t.lineIndent=0,a=t.input.charCodeAt(t.position);(!c||t.lineIndent<l)&&32===a;)t.lineIndent++,a=t.input.charCodeAt(++t.position);if(!c&&t.lineIndent>l&&(l=t.lineIndent),is_EOL(a))p++;else{if(t.lineIndent<l){u===CHOMPING_KEEP?t.result+=_$common_7.repeat("\n",s?1+p:p):u===CHOMPING_CLIP&&s&&(t.result+="\n");break}for(n?is_WHITE_SPACE(a)?(f=!0,t.result+=_$common_7.repeat("\n",s?1+p:p)):f?(f=!1,t.result+=_$common_7.repeat("\n",p+1)):0===p?s&&(t.result+=" "):t.result+=_$common_7.repeat("\n",p):t.result+=_$common_7.repeat("\n",s?1+p:p),s=!0,c=!0,p=0,r=t.position;!is_EOL(a)&&0!==a;)a=t.input.charCodeAt(++t.position);captureSegment(t,r,t.position,!1)}}return!0}(t,p)||function(t,e){var r,n,o;if(39!==(r=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,n=o=t.position;0!==(r=t.input.charCodeAt(t.position));)if(39===r){if(captureSegment(t,n,t.position,!0),39!==(r=t.input.charCodeAt(++t.position)))return!0;n=t.position,t.position++,o=t.position}else is_EOL(r)?(captureSegment(t,n,o,!0),writeFoldedLines(t,skipSeparationSpace(t,!1,e)),n=o=t.position):t.position===t.lineStart&&testDocumentSeparator(t)?throwError(t,"unexpected end of the document within a single quoted scalar"):(t.position++,o=t.position);throwError(t,"unexpected end of the stream within a single quoted scalar")}(t,p)||function(t,e){var r,n,o,a,i,u,s;if(34!==(u=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;0!==(u=t.input.charCodeAt(t.position));){if(34===u)return captureSegment(t,r,t.position,!0),t.position++,!0;if(92===u){if(captureSegment(t,r,t.position,!0),is_EOL(u=t.input.charCodeAt(++t.position)))skipSeparationSpace(t,!1,e);else if(u<256&&simpleEscapeCheck[u])t.result+=simpleEscapeMap[u],t.position++;else if((i=120===(s=u)?2:117===s?4:85===s?8:0)>0){for(o=i,a=0;o>0;o--)(i=fromHexCode(u=t.input.charCodeAt(++t.position)))>=0?a=(a<<4)+i:throwError(t,"expected hexadecimal character");t.result+=charFromCodepoint(a),t.position++}else throwError(t,"unknown escape sequence");r=n=t.position}else is_EOL(u)?(captureSegment(t,r,n,!0),writeFoldedLines(t,skipSeparationSpace(t,!1,e)),r=n=t.position):t.position===t.lineStart&&testDocumentSeparator(t)?throwError(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}throwError(t,"unexpected end of the stream within a double quoted scalar")}(t,p)?d=!0:function(t){var e,r,n;if(42!==(n=t.input.charCodeAt(t.position)))return!1;for(n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!is_WS_OR_EOL(n)&&!is_FLOW_INDICATOR(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&throwError(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),___hasOwnProperty_10.call(t.anchorMap,r)||throwError(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],skipSeparationSpace(t,!0,-1),!0}(t)?(d=!0,null===t.tag&&null===t.anchor||throwError(t,"alias node should not have any properties")):function(t,e,r){var n,o,a,i,u,s,c,l,p=t.kind,f=t.result;if(is_WS_OR_EOL(l=t.input.charCodeAt(t.position))||is_FLOW_INDICATOR(l)||35===l||38===l||42===l||33===l||124===l||62===l||39===l||34===l||37===l||64===l||96===l)return!1;if((63===l||45===l)&&(is_WS_OR_EOL(n=t.input.charCodeAt(t.position+1))||r&&is_FLOW_INDICATOR(n)))return!1;for(t.kind="scalar",t.result="",o=a=t.position,i=!1;0!==l;){if(58===l){if(is_WS_OR_EOL(n=t.input.charCodeAt(t.position+1))||r&&is_FLOW_INDICATOR(n))break}else if(35===l){if(is_WS_OR_EOL(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&testDocumentSeparator(t)||r&&is_FLOW_INDICATOR(l))break;if(is_EOL(l)){if(u=t.line,s=t.lineStart,c=t.lineIndent,skipSeparationSpace(t,!1,-1),t.lineIndent>=e){i=!0,l=t.input.charCodeAt(t.position);continue}t.position=a,t.line=u,t.lineStart=s,t.lineIndent=c;break}}i&&(captureSegment(t,o,a,!1),writeFoldedLines(t,t.line-u),o=a=t.position,i=!1),is_WHITE_SPACE(l)||(a=t.position+1),l=t.input.charCodeAt(++t.position)}return captureSegment(t,o,a,!1),!!t.result||(t.kind=p,t.result=f,!1)}(t,p,CONTEXT_FLOW_IN===r)&&(d=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===_&&(d=u&&readBlockSequence(t,f))),null!==t.tag&&"!"!==t.tag)if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&throwError(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),s=0,c=t.implicitTypes.length;s<c;s+=1)if((l=t.implicitTypes[s]).resolve(t.result)){t.result=l.construct(t.result),t.tag=l.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else ___hasOwnProperty_10.call(t.typeMap[t.kind||"fallback"],t.tag)?(l=t.typeMap[t.kind||"fallback"][t.tag],null!==t.result&&l.kind!==t.kind&&throwError(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+l.kind+'", not "'+t.kind+'"'),l.resolve(t.result)?(t.result=l.construct(t.result),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):throwError(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")):throwError(t,"unknown tag !<"+t.tag+">");return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||d}function readDocument(t){var e,r,n,o,a=t.position,i=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap={},t.anchorMap={};0!==(o=t.input.charCodeAt(t.position))&&(skipSeparationSpace(t,!0,-1),o=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==o));){for(i=!0,o=t.input.charCodeAt(++t.position),e=t.position;0!==o&&!is_WS_OR_EOL(o);)o=t.input.charCodeAt(++t.position);for(n=[],(r=t.input.slice(e,t.position)).length<1&&throwError(t,"directive name must not be less than one character in length");0!==o;){for(;is_WHITE_SPACE(o);)o=t.input.charCodeAt(++t.position);if(35===o){do{o=t.input.charCodeAt(++t.position)}while(0!==o&&!is_EOL(o));break}if(is_EOL(o))break;for(e=t.position;0!==o&&!is_WS_OR_EOL(o);)o=t.input.charCodeAt(++t.position);n.push(t.input.slice(e,t.position))}0!==o&&readLineBreak(t),___hasOwnProperty_10.call(directiveHandlers,r)?directiveHandlers[r](t,r,n):throwWarning(t,'unknown document directive "'+r+'"')}skipSeparationSpace(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,skipSeparationSpace(t,!0,-1)):i&&throwError(t,"directives end mark is expected"),composeNode(t,t.lineIndent-1,CONTEXT_BLOCK_OUT,!1,!0),skipSeparationSpace(t,!0,-1),t.checkLineBreaks&&PATTERN_NON_ASCII_LINE_BREAKS.test(t.input.slice(a,t.position))&&throwWarning(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&testDocumentSeparator(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,skipSeparationSpace(t,!0,-1)):t.position<t.length-1&&throwError(t,"end of the stream or a document separator is expected")}function loadDocuments(t,e){e=e||{},0!==(t=String(t)).length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));var r=new State(t,e),n=t.indexOf("\0");for(-1!==n&&(r.position=n,throwError(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)readDocument(r);return r.documents}function loadAll(t,e,r){null!==e&&"object"==typeof e&&void 0===r&&(r=e,e=null);var n=loadDocuments(t,r);if("function"!=typeof e)return n;for(var o=0,a=n.length;o<a;o+=1)e(n[o])}function load(t,e){var r=loadDocuments(t,e);if(0!==r.length){if(1===r.length)return r[0];throw new _$exception_9("expected a single document in the stream, but found more")}}_$loader_10.loadAll=loadAll,_$loader_10.load=load,_$loader_10.safeLoadAll=function(t,e,r){return"object"==typeof e&&null!==e&&void 0===r&&(r=e,e=null),loadAll(t,e,_$common_7.extend({schema:_$default_safe_15},r))},_$loader_10.safeLoad=function(t,e){return load(t,_$common_7.extend({schema:_$default_safe_15},e))};var _$dumper_8={},___toString_8=Object.prototype.toString,___hasOwnProperty_8=Object.prototype.hasOwnProperty,CHAR_TAB=9,CHAR_LINE_FEED=10,CHAR_CARRIAGE_RETURN=13,CHAR_SPACE=32,CHAR_EXCLAMATION=33,CHAR_DOUBLE_QUOTE=34,CHAR_SHARP=35,CHAR_PERCENT=37,CHAR_AMPERSAND=38,CHAR_SINGLE_QUOTE=39,CHAR_ASTERISK=42,CHAR_COMMA=44,CHAR_MINUS=45,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_GREATER_THAN=62,CHAR_QUESTION=63,CHAR_COMMERCIAL_AT=64,CHAR_LEFT_SQUARE_BRACKET=91,CHAR_RIGHT_SQUARE_BRACKET=93,CHAR_GRAVE_ACCENT=96,CHAR_LEFT_CURLY_BRACKET=123,CHAR_VERTICAL_LINE=124,CHAR_RIGHT_CURLY_BRACKET=125,ESCAPE_SEQUENCES={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},DEPRECATED_BOOLEANS_SYNTAX=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function encodeHex(t){var e,r,n;if(e=t.toString(16).toUpperCase(),t<=255)r="x",n=2;else if(t<=65535)r="u",n=4;else{if(!(t<=4294967295))throw new _$exception_9("code point within a string may not be greater than 0xFFFFFFFF");r="U",n=8}return"\\"+r+_$common_7.repeat("0",n-e.length)+e}function __State_8(t){this.schema=t.schema||_$default_full_14,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=_$common_7.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=function(t,e){var r,n,o,a,i,u,s;if(null===e)return{};for(r={},o=0,a=(n=Object.keys(e)).length;o<a;o+=1)i=n[o],u=String(e[i]),"!!"===i.slice(0,2)&&(i="tag:yaml.org,2002:"+i.slice(2)),(s=t.compiledTypeMap.fallback[i])&&___hasOwnProperty_8.call(s.styleAliases,u)&&(u=s.styleAliases[u]),r[i]=u;return r}(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function indentString(t,e){for(var r,n=_$common_7.repeat(" ",e),o=0,a=-1,i="",u=t.length;o<u;)-1===(a=t.indexOf("\n",o))?(r=t.slice(o),o=u):(r=t.slice(o,a+1),o=a+1),r.length&&"\n"!==r&&(i+=n),i+=r;return i}function generateNextLine(t,e){return"\n"+_$common_7.repeat(" ",t.indent*e)}function isWhitespace(t){return t===CHAR_SPACE||t===CHAR_TAB}function isPrintable(t){return 32<=t&&t<=126||161<=t&&t<=55295&&8232!==t&&8233!==t||57344<=t&&t<=65533&&65279!==t||65536<=t&&t<=1114111}function isPlainSafe(t,e){return isPrintable(t)&&65279!==t&&t!==CHAR_COMMA&&t!==CHAR_LEFT_SQUARE_BRACKET&&t!==CHAR_RIGHT_SQUARE_BRACKET&&t!==CHAR_LEFT_CURLY_BRACKET&&t!==CHAR_RIGHT_CURLY_BRACKET&&t!==CHAR_COLON&&(t!==CHAR_SHARP||e&&function(t){return isPrintable(t)&&!isWhitespace(t)&&65279!==t&&t!==CHAR_CARRIAGE_RETURN&&t!==CHAR_LINE_FEED}(e))}function needIndentIndicator(t){return/^\n* /.test(t)}var STYLE_PLAIN=1,STYLE_SINGLE=2,STYLE_LITERAL=3,STYLE_FOLDED=4,STYLE_DOUBLE=5;function chooseScalarStyle(t,e,r,n,o){var a,i,u,s,c=!1,l=!1,p=-1!==n,f=-1,_=isPrintable(s=t.charCodeAt(0))&&65279!==s&&!isWhitespace(s)&&s!==CHAR_MINUS&&s!==CHAR_QUESTION&&s!==CHAR_COLON&&s!==CHAR_COMMA&&s!==CHAR_LEFT_SQUARE_BRACKET&&s!==CHAR_RIGHT_SQUARE_BRACKET&&s!==CHAR_LEFT_CURLY_BRACKET&&s!==CHAR_RIGHT_CURLY_BRACKET&&s!==CHAR_SHARP&&s!==CHAR_AMPERSAND&&s!==CHAR_ASTERISK&&s!==CHAR_EXCLAMATION&&s!==CHAR_VERTICAL_LINE&&s!==CHAR_EQUALS&&s!==CHAR_GREATER_THAN&&s!==CHAR_SINGLE_QUOTE&&s!==CHAR_DOUBLE_QUOTE&&s!==CHAR_PERCENT&&s!==CHAR_COMMERCIAL_AT&&s!==CHAR_GRAVE_ACCENT&&!isWhitespace(t.charCodeAt(t.length-1));if(e)for(a=0;a<t.length;a++){if(!isPrintable(i=t.charCodeAt(a)))return STYLE_DOUBLE;u=a>0?t.charCodeAt(a-1):null,_=_&&isPlainSafe(i,u)}else{for(a=0;a<t.length;a++){if((i=t.charCodeAt(a))===CHAR_LINE_FEED)c=!0,p&&(l=l||a-f-1>n&&" "!==t[f+1],f=a);else if(!isPrintable(i))return STYLE_DOUBLE;u=a>0?t.charCodeAt(a-1):null,_=_&&isPlainSafe(i,u)}l=l||p&&a-f-1>n&&" "!==t[f+1]}return c||l?r>9&&needIndentIndicator(t)?STYLE_DOUBLE:l?STYLE_FOLDED:STYLE_LITERAL:_&&!o(t)?STYLE_PLAIN:STYLE_SINGLE}function writeScalar(t,e,r,n){t.dump=function(){if(0===e.length)return"''";if(!t.noCompatMode&&-1!==DEPRECATED_BOOLEANS_SYNTAX.indexOf(e))return"'"+e+"'";var o=t.indent*Math.max(1,r),a=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-o),i=n||t.flowLevel>-1&&r>=t.flowLevel;switch(chooseScalarStyle(e,i,t.indent,a,(function(e){return function(t,e){var r,n;for(r=0,n=t.implicitTypes.length;r<n;r+=1)if(t.implicitTypes[r].resolve(e))return!0;return!1}(t,e)}))){case STYLE_PLAIN:return e;case STYLE_SINGLE:return"'"+e.replace(/'/g,"''")+"'";case STYLE_LITERAL:return"|"+blockHeader(e,t.indent)+dropEndingNewline(indentString(e,o));case STYLE_FOLDED:return">"+blockHeader(e,t.indent)+dropEndingNewline(indentString(function(t,e){for(var r,n,o,a=/(\n+)([^\n]*)/g,i=(o=-1!==(o=t.indexOf("\n"))?o:t.length,a.lastIndex=o,foldLine(t.slice(0,o),e)),u="\n"===t[0]||" "===t[0];n=a.exec(t);){var s=n[1],c=n[2];r=" "===c[0],i+=s+(u||r||""===c?"":"\n")+foldLine(c,e),u=r}return i}(e,a),o));case STYLE_DOUBLE:return'"'+function(t){for(var e,r,n,o="",a=0;a<t.length;a++)(e=t.charCodeAt(a))>=55296&&e<=56319&&(r=t.charCodeAt(a+1))>=56320&&r<=57343?(o+=encodeHex(1024*(e-55296)+r-56320+65536),a++):o+=!(n=ESCAPE_SEQUENCES[e])&&isPrintable(e)?t[a]:n||encodeHex(e);return o}(e)+'"';default:throw new _$exception_9("impossible error: invalid scalar style")}}()}function blockHeader(t,e){var r=needIndentIndicator(t)?String(e):"",n="\n"===t[t.length-1];return r+(!n||"\n"!==t[t.length-2]&&"\n"!==t?n?"":"-":"+")+"\n"}function dropEndingNewline(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function foldLine(t,e){if(""===t||" "===t[0])return t;for(var r,n,o=/ [^ ]/g,a=0,i=0,u=0,s="";r=o.exec(t);)(u=r.index)-a>e&&(n=i>a?i:u,s+="\n"+t.slice(a,n),a=n+1),i=u;return s+="\n",t.length-a>e&&i>a?s+=t.slice(a,i)+"\n"+t.slice(i+1):s+=t.slice(a),s.slice(1)}function detectType(t,e,r){var n,o,a,i,u,s;for(a=0,i=(o=r?t.explicitTypes:t.implicitTypes).length;a<i;a+=1)if(((u=o[a]).instanceOf||u.predicate)&&(!u.instanceOf||"object"==typeof e&&e instanceof u.instanceOf)&&(!u.predicate||u.predicate(e))){if(t.tag=r?u.tag:"?",u.represent){if(s=t.styleMap[u.tag]||u.defaultStyle,"[object Function]"===___toString_8.call(u.represent))n=u.represent(e,s);else{if(!___hasOwnProperty_8.call(u.represent,s))throw new _$exception_9("!<"+u.tag+'> tag resolver accepts not "'+s+'" style');n=u.represent[s](e,s)}t.dump=n}return!0}return!1}function writeNode(t,e,r,n,o,a){t.tag=null,t.dump=r,detectType(t,r,!1)||detectType(t,r,!0);var i=___toString_8.call(t.dump);n&&(n=t.flowLevel<0||t.flowLevel>e);var u,s,c="[object Object]"===i||"[object Array]"===i;if(c&&(s=-1!==(u=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||s||2!==t.indent&&e>0)&&(o=!1),s&&t.usedDuplicates[u])t.dump="*ref_"+u;else{if(c&&s&&!t.usedDuplicates[u]&&(t.usedDuplicates[u]=!0),"[object Object]"===i)n&&0!==Object.keys(t.dump).length?(function(t,e,r,n){var o,a,i,u,s,c,l="",p=t.tag,f=Object.keys(r);if(!0===t.sortKeys)f.sort();else if("function"==typeof t.sortKeys)f.sort(t.sortKeys);else if(t.sortKeys)throw new _$exception_9("sortKeys must be a boolean or a function");for(o=0,a=f.length;o<a;o+=1)c="",n&&0===o||(c+=generateNextLine(t,e)),u=r[i=f[o]],writeNode(t,e+1,i,!0,!0,!0)&&((s=null!==t.tag&&"?"!==t.tag||t.dump&&t.dump.length>1024)&&(t.dump&&CHAR_LINE_FEED===t.dump.charCodeAt(0)?c+="?":c+="? "),c+=t.dump,s&&(c+=generateNextLine(t,e)),writeNode(t,e+1,u,!0,s)&&(t.dump&&CHAR_LINE_FEED===t.dump.charCodeAt(0)?c+=":":c+=": ",l+=c+=t.dump));t.tag=p,t.dump=l||"{}"}(t,e,t.dump,o),s&&(t.dump="&ref_"+u+t.dump)):(function(t,e,r){var n,o,a,i,u,s="",c=t.tag,l=Object.keys(r);for(n=0,o=l.length;n<o;n+=1)u="",0!==n&&(u+=", "),t.condenseFlow&&(u+='"'),i=r[a=l[n]],writeNode(t,e,a,!1,!1)&&(t.dump.length>1024&&(u+="? "),u+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),writeNode(t,e,i,!1,!1)&&(s+=u+=t.dump));t.tag=c,t.dump="{"+s+"}"}(t,e,t.dump),s&&(t.dump="&ref_"+u+" "+t.dump));else if("[object Array]"===i){var l=t.noArrayIndent&&e>0?e-1:e;n&&0!==t.dump.length?(function(t,e,r,n){var o,a,i="",u=t.tag;for(o=0,a=r.length;o<a;o+=1)writeNode(t,e+1,r[o],!0,!0)&&(n&&0===o||(i+=generateNextLine(t,e)),t.dump&&CHAR_LINE_FEED===t.dump.charCodeAt(0)?i+="-":i+="- ",i+=t.dump);t.tag=u,t.dump=i||"[]"}(t,l,t.dump,o),s&&(t.dump="&ref_"+u+t.dump)):(function(t,e,r){var n,o,a="",i=t.tag;for(n=0,o=r.length;n<o;n+=1)writeNode(t,e,r[n],!1,!1)&&(0!==n&&(a+=","+(t.condenseFlow?"":" ")),a+=t.dump);t.tag=i,t.dump="["+a+"]"}(t,l,t.dump),s&&(t.dump="&ref_"+u+" "+t.dump))}else{if("[object String]"!==i){if(t.skipInvalid)return!1;throw new _$exception_9("unacceptable kind of an object to dump "+i)}"?"!==t.tag&&writeScalar(t,t.dump,e,a)}null!==t.tag&&"?"!==t.tag&&(t.dump="!<"+t.tag+"> "+t.dump)}return!0}function getDuplicateReferences(t,e){var r,n,o=[],a=[];for(function t(e,r,n){var o,a,i;if(null!==e&&"object"==typeof e)if(-1!==(a=r.indexOf(e)))-1===n.indexOf(a)&&n.push(a);else if(r.push(e),Array.isArray(e))for(a=0,i=e.length;a<i;a+=1)t(e[a],r,n);else for(a=0,i=(o=Object.keys(e)).length;a<i;a+=1)t(e[o[a]],r,n)}(t,o,a),r=0,n=a.length;r<n;r+=1)e.duplicates.push(o[a[r]]);e.usedDuplicates=new Array(n)}function dump(t,e){var r=new __State_8(e=e||{});return r.noRefs||getDuplicateReferences(t,r),writeNode(r,0,t,!0,!0)?r.dump+"\n":""}_$dumper_8.dump=dump,_$dumper_8.safeDump=function(t,e){return dump(t,_$common_7.extend({schema:_$default_safe_15},e))};var _$jsYaml_6={};function deprecated(t){return function(){throw new Error("Function "+t+" is deprecated and cannot be used.")}}_$jsYaml_6.Type=_$type_18,_$jsYaml_6.Schema=_$schema_12,_$jsYaml_6.FAILSAFE_SCHEMA=_$failsafe_16,_$jsYaml_6.JSON_SCHEMA=_$json_17,_$jsYaml_6.CORE_SCHEMA=_$core_13,_$jsYaml_6.DEFAULT_SAFE_SCHEMA=_$default_safe_15,_$jsYaml_6.DEFAULT_FULL_SCHEMA=_$default_full_14,_$jsYaml_6.load=_$loader_10.load,_$jsYaml_6.loadAll=_$loader_10.loadAll,_$jsYaml_6.safeLoad=_$loader_10.safeLoad,_$jsYaml_6.safeLoadAll=_$loader_10.safeLoadAll,_$jsYaml_6.dump=_$dumper_8.dump,_$jsYaml_6.safeDump=_$dumper_8.safeDump,_$jsYaml_6.YAMLException=_$exception_9,_$jsYaml_6.MINIMAL_SCHEMA=_$failsafe_16,_$jsYaml_6.SAFE_SCHEMA=_$default_safe_15,_$jsYaml_6.DEFAULT_SCHEMA=_$default_full_14,_$jsYaml_6.scan=deprecated("scan"),_$jsYaml_6.parse=deprecated("parse"),_$jsYaml_6.compose=deprecated("compose"),_$jsYaml_6.addConstructor=deprecated("addConstructor");for(var _$yaml_5=_$jsYaml_6,_$staticJsYaml_65={safeLoad:_$yaml_5.safeLoad,load:_$yaml_5.load,safeDump:_$yaml_5.safeDump,dump:_$yaml_5.dump},_$base64Js_1={byteLength:function(t){var e=getLens(t),r=e[0],n=e[1];return 3*(r+n)/4-n},toByteArray:function(t){var e,r,n=getLens(t),o=n[0],a=n[1],i=new Arr(function(t,e,r){return 3*(e+r)/4-r}(0,o,a)),u=0,s=a>0?o-4:o;for(r=0;r<s;r+=4)e=revLookup[t.charCodeAt(r)]<<18|revLookup[t.charCodeAt(r+1)]<<12|revLookup[t.charCodeAt(r+2)]<<6|revLookup[t.charCodeAt(r+3)],i[u++]=e>>16&255,i[u++]=e>>8&255,i[u++]=255&e;return 2===a&&(e=revLookup[t.charCodeAt(r)]<<2|revLookup[t.charCodeAt(r+1)]>>4,i[u++]=255&e),1===a&&(e=revLookup[t.charCodeAt(r)]<<10|revLookup[t.charCodeAt(r+1)]<<4|revLookup[t.charCodeAt(r+2)]>>2,i[u++]=e>>8&255,i[u++]=255&e),i},fromByteArray:function(t){for(var e,r=t.length,n=r%3,o=[],a=0,i=r-n;a<i;a+=16383)o.push(encodeChunk(t,a,a+16383>i?i:a+16383));return 1===n?(e=t[r-1],o.push(lookup[e>>2]+lookup[e<<4&63]+"==")):2===n&&(e=(t[r-2]<<8)+t[r-1],o.push(lookup[e>>10]+lookup[e>>4&63]+lookup[e<<2&63]+"=")),o.join("")}},lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",__i_1=0,len=code.length;__i_1<len;++__i_1)lookup[__i_1]=code[__i_1],revLookup[code.charCodeAt(__i_1)]=__i_1;function getLens(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function encodeChunk(t,e,r){for(var n,o,a=[],i=e;i<r;i+=3)n=(t[i]<<16&16711680)+(t[i+1]<<8&65280)+(255&t[i+2]),a.push(lookup[(o=n)>>18&63]+lookup[o>>12&63]+lookup[o>>6&63]+lookup[63&o]);return a.join("")}revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63;var _$ieee754_3={read:function(t,e,r,n,o){var a,i,u=8*o-n-1,s=(1<<u)-1,c=s>>1,l=-7,p=r?o-1:0,f=r?-1:1,_=t[e+p];for(p+=f,a=_&(1<<-l)-1,_>>=-l,l+=u;l>0;a=256*a+t[e+p],p+=f,l-=8);for(i=a&(1<<-l)-1,a>>=-l,l+=n;l>0;i=256*i+t[e+p],p+=f,l-=8);if(0===a)a=1-c;else{if(a===s)return i?NaN:1/0*(_?-1:1);i+=Math.pow(2,n),a-=c}return(_?-1:1)*i*Math.pow(2,a-n)},write:function(t,e,r,n,o,a){var i,u,s,c=8*a-o-1,l=(1<<c)-1,p=l>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,_=n?0:a-1,h=n?1:-1,d=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,i=l):(i=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-i))<1&&(i--,s*=2),(e+=i+p>=1?f/s:f*Math.pow(2,1-p))*s>=2&&(i++,s/=2),i+p>=l?(u=0,i=l):i+p>=1?(u=(e*s-1)*Math.pow(2,o),i+=p):(u=e*Math.pow(2,p-1)*Math.pow(2,o),i=0));o>=8;t[r+_]=255&u,_+=h,u/=256,o-=8);for(i=i<<o|u,c+=o;c>0;t[r+_]=255&i,_+=h,i/=256,c-=8);t[r+_-h]|=128*d}},_$base64_4={exports:{}};(function(t,e){(function(){!function(t,e){var r,n;"object"==typeof _$base64_4.exports?_$base64_4.exports=e():"function"==typeof define&&define.amd?define(e):(r=t.Base64,(n=e()).noConflict=function(){return t.Base64=r,n},t.Meteor&&(Base64=n),t.Base64=n)}("undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:this,(function(){"use strict";var t,r="function"==typeof atob,n="function"==typeof btoa,o="function"==typeof e,a="function"==typeof TextDecoder?new TextDecoder:void 0,i="function"==typeof TextEncoder?new TextEncoder:void 0,u=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),s=(t={},u.forEach((function(e,r){return t[e]=r})),t),c=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,l=String.fromCharCode.bind(String),p="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):function(t,e){return void 0===e&&(e=function(t){return t}),new Uint8Array(Array.prototype.slice.call(t,0).map(e))},f=function(t){return t.replace(/=/g,"").replace(/[+\/]/g,(function(t){return"+"==t?"-":"_"}))},_=function(t){return t.replace(/[^A-Za-z0-9\+\/]/g,"")},h=function(t){for(var e,r,n,o,a="",i=t.length%3,s=0;s<t.length;){if((r=t.charCodeAt(s++))>255||(n=t.charCodeAt(s++))>255||(o=t.charCodeAt(s++))>255)throw new TypeError("invalid character found");a+=u[(e=r<<16|n<<8|o)>>18&63]+u[e>>12&63]+u[e>>6&63]+u[63&e]}return i?a.slice(0,i-3)+"===".substring(i):a},d=n?function(t){return btoa(t)}:o?function(t){return e.from(t,"binary").toString("base64")}:h,y=o?function(t){return e.from(t).toString("base64")}:function(t){for(var e=[],r=0,n=t.length;r<n;r+=4096)e.push(l.apply(null,t.subarray(r,r+4096)));return d(e.join(""))},v=function(t,e){return void 0===e&&(e=!1),e?f(y(t)):y(t)},g=function(t){if(t.length<2)return(e=t.charCodeAt(0))<128?t:e<2048?l(192|e>>>6)+l(128|63&e):l(224|e>>>12&15)+l(128|e>>>6&63)+l(128|63&e);var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return l(240|e>>>18&7)+l(128|e>>>12&63)+l(128|e>>>6&63)+l(128|63&e)},m=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,b=function(t){return t.replace(m,g)},A=o?function(t){return e.from(t,"utf8").toString("base64")}:i?function(t){return y(i.encode(t))}:function(t){return d(b(t))},E=function(t,e){return void 0===e&&(e=!1),e?f(A(t)):A(t)},w=function(t){return E(t,!0)},C=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,S=function(t){switch(t.length){case 4:var e=((7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3))-65536;return l(55296+(e>>>10))+l(56320+(1023&e));case 3:return l((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return l((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},x=function(t){return t.replace(C,S)},$=function(t){if(t=t.replace(/\s+/g,""),!c.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(3&t.length));for(var e,r,n,o="",a=0;a<t.length;)e=s[t.charAt(a++)]<<18|s[t.charAt(a++)]<<12|(r=s[t.charAt(a++)])<<6|(n=s[t.charAt(a++)]),o+=64===r?l(e>>16&255):64===n?l(e>>16&255,e>>8&255):l(e>>16&255,e>>8&255,255&e);return o},O=r?function(t){return atob(_(t))}:o?function(t){return e.from(t,"base64").toString("binary")}:$,P=o?function(t){return p(e.from(t,"base64"))}:function(t){return p(O(t),(function(t){return t.charCodeAt(0)}))},F=function(t){return P(L(t))},R=o?function(t){return e.from(t,"base64").toString("utf8")}:a?function(t){return a.decode(P(t))}:function(t){return x(O(t))},L=function(t){return _(t.replace(/[-_]/g,(function(t){return"-"==t?"+":"/"})))},T=function(t){return R(L(t))},I=function(t){return{value:t,enumerable:!1,writable:!0,configurable:!0}},k=function(){var t=function(t,e){return Object.defineProperty(String.prototype,t,I(e))};t("fromBase64",(function(){return T(this)})),t("toBase64",(function(t){return E(this,t)})),t("toBase64URI",(function(){return E(this,!0)})),t("toBase64URL",(function(){return E(this,!0)})),t("toUint8Array",(function(){return F(this)}))},j=function(){var t=function(t,e){return Object.defineProperty(Uint8Array.prototype,t,I(e))};t("toBase64",(function(t){return v(this,t)})),t("toBase64URI",(function(){return v(this,!0)})),t("toBase64URL",(function(){return v(this,!0)}))},D={version:"3.7.2",VERSION:"3.7.2",atob:O,atobPolyfill:$,btoa:d,btoaPolyfill:h,fromBase64:T,toBase64:E,encode:E,encodeURI:w,encodeURL:w,utob:b,btou:x,decode:T,isValid:function(t){if("string"!=typeof t)return!1;var e=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},fromUint8Array:v,toUint8Array:F,extendString:k,extendUint8Array:j,extendBuiltins:function(){k(),j()},Base64:{}};return Object.keys(D).forEach((function(t){return D.Base64[t]=D[t]})),D}))}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_$buffer_2({}).Buffer),_$base64_4=_$base64_4.exports;var _$preprocessors_74={};function ___createForOfIteratorHelper_74(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return ___arrayLikeToArray_74(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?___arrayLikeToArray_74(t,void 0):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){u=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(u)throw a}}}}function ___arrayLikeToArray_74(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}Object.defineProperty(_$preprocessors_74,"__esModule",{value:!0}),_$preprocessors_74.default=void 0;var keys,___default_74=[{name:"HTML",test:function(t){return/^<!DOCTYPE html>/.test(t)},parse:function(){return""}},(keys=["dm1lc3M","c3NyOi8v","dHJvamFu","c3M6Ly","c3NkOi8v","c2hhZG93","aHR0c"],{name:"Base64 Pre-processor",test:function(t){return keys.some((function(e){return-1!==t.indexOf(e)}))},parse:function(t){return _$base64_4.Base64.decode(t)}}),{name:"Clash Pre-processor",test:function(t){return/proxies/.test(t)},parse:function(t){return(0,_$staticJsYaml_65.safeLoad)(t).proxies.map((function(t){return JSON.stringify(t)})).join("\n")}},{name:"SSD Pre-processor",test:function(t){return 0===t.indexOf("ssd://")},parse:function(t){for(var e=[],r=JSON.parse(_$base64_4.Base64.decode(t.split("ssd://")[1])),n=r.port,o=r.encryption,a=r.password,i=r.servers,u=0;u<i.length;u++){var s=i[u];o=s.encryption?s.encryption:o,a=s.password?s.password:a;var c=_$base64_4.Base64.encode(o+":"+a),l=s.server;n=s.port?s.port:n;var p=s.remarks?s.remarks:u,f=s.plugin_options?"/?plugin="+encodeURIComponent(s.plugin+";"+s.plugin_options):"";e[u]="ss://"+c+"@"+l+":"+n+f+"#"+p}return e.join("\n")}},{name:"Full Config Preprocessor",test:function(t){return/^(\[server_local\]|\[Proxy\])/gm.test(t)},parse:function(t){var e=/^\[server_local]|\[Proxy]/gm.exec(t),r=[],n=!0;if(e){var o,a=___createForOfIteratorHelper_74((t=t.substring(e.index)).split("\n"));try{for(a.s();!(o=a.n()).done;){var i=o.value;n||i.test(/^\s*\[/)||r.push(i),n=!1}}catch(u){a.e(u)}finally{a.f()}return r.join("\n")}}}];_$preprocessors_74.default=___default_74;var _$utils_83={};Object.defineProperty(_$utils_83,"__esModule",{value:!0}),_$utils_83.Result=void 0,_$utils_83.isPresent=__isPresent_83;var __obj_83,___lodash_83=(__obj_83=_$lodash_35)&&__obj_83.__esModule?__obj_83:{default:__obj_83};function ___defineProperties_83(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var Result=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.proxy=e,this.output=[]}var e,r;return e=t,(r=[{key:"append",value:function(t){if(void 0===t)throw new Error("required field is missing");this.output.push(t)}},{key:"appendIfPresent",value:function(t,e){__isPresent_83(this.proxy,e)&&this.append(t)}},{key:"toString",value:function(){return this.output.join("")}}])&&___defineProperties_83(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function __isPresent_83(t,e){return null!=___lodash_83.default.get(t,e)}_$utils_83.Result=Result;var _$surge_81={};Object.defineProperty(_$surge_81,"__esModule",{value:!0}),_$surge_81.default=function(){return{produce:function(t){switch(t.type){case"ss":return function(t){var e=new _$utils_83.Result(t);if(e.append("".concat(t.name,"=").concat(t.type,",").concat(t.server,",").concat(t.port)),e.append(",encrypt-method=".concat(t.cipher)),e.appendIfPresent(",password=".concat(t.password),"password"),(0,_$utils_83.isPresent)(t,"plugin")){if("obfs"!==t.plugin)throw new Error("plugin ".concat(t.plugin," is not supported"));e.append(",obfs=".concat(t["plugin-opts"].mode)),e.appendIfPresent(",obfs-host=".concat(t["plugin-opts"].host),"plugin-opts.host"),e.appendIfPresent(",obfs-uri=".concat(t["plugin-opts"].path),"plugin-opts.path")}return e.appendIfPresent(",tfo=".concat(t.tfo),"tfo"),e.appendIfPresent(",udp-relay=".concat(t.udp),"udp"),e.toString()}(t);case"trojan":return function(t){var e=new _$utils_83.Result(t);return e.append("".concat(t.name,"=").concat(t.type,",").concat(t.server,",").concat(t.port)),e.appendIfPresent(",password=".concat(t.password),"password"),handleTransport(e,t),e.appendIfPresent(",tls=".concat(t.tls),"tls"),e.appendIfPresent(",server-cert-fingerprint-sha256=".concat(t["tls-fingerprint"]),"tls-fingerprint"),e.appendIfPresent(",sni=".concat(t.sni),"sni"),e.appendIfPresent(",skip-cert-verify=".concat(t["skip-cert-verify"]),"skip-cert-verify"),e.appendIfPresent(",tfo=".concat(t.tfo),"tfo"),e.appendIfPresent(",udp-relay=".concat(t.udp),"udp"),e.toString()}(t);case"vmess":return function(t){var e=new _$utils_83.Result(t);return e.append("".concat(t.name,"=").concat(t.type,",").concat(t.server,",").concat(t.port)),e.appendIfPresent(",username=".concat(t.uuid),"uuid"),handleTransport(e,t),(0,_$utils_83.isPresent)(t,"aead")?e.append(",vmess-aead=".concat(t.aead)):e.append(",vmess-aead=".concat(0===t.alterId)),e.appendIfPresent(",server-cert-fingerprint-sha256=".concat(t["tls-fingerprint"]),"tls-fingerprint"),e.appendIfPresent(",tls=".concat(t.tls),"tls"),e.appendIfPresent(",sni=".concat(t.sni),"sni"),e.appendIfPresent(",skip-cert-verify=".concat(t["skip-cert-verify"]),"skip-cert-verify"),e.appendIfPresent(",tfo=".concat(t.tfo),"tfo"),e.appendIfPresent(",udp-relay=".concat(t.udp),"udp"),e.toString()}(t);case"http":return function(t){var e=new _$utils_83.Result(t),r=t.tls?"https":"http";return e.append("".concat(t.name,"=").concat(r,",").concat(t.server,",").concat(t.port)),e.appendIfPresent(",".concat(t.username),"username"),e.appendIfPresent(",".concat(t.password),"password"),e.appendIfPresent(",server-cert-fingerprint-sha256=".concat(t["tls-fingerprint"]),"tls-fingerprint"),e.appendIfPresent(",sni=".concat(t.sni),"sni"),e.appendIfPresent(",skip-cert-verify=".concat(t["skip-cert-verify"]),"skip-cert-verify"),e.appendIfPresent(",tfo=".concat(t.tfo),"tfo"),e.appendIfPresent(",udp-relay=".concat(t.udp),"udp"),e.toString()}(t);case"socks5":return function(t){var e=new _$utils_83.Result(t),r=t.tls?"socks5-tls":"socks5";return e.append("".concat(t.name,"=").concat(r,",").concat(t.server,",").concat(t.port)),e.appendIfPresent(",".concat(t.username),"username"),e.appendIfPresent(",".concat(t.password),"password"),e.appendIfPresent(",server-cert-fingerprint-sha256=".concat(t["tls-fingerprint"]),"tls-fingerprint"),e.appendIfPresent(",sni=".concat(t.sni),"sni"),e.appendIfPresent(",skip-cert-verify=".concat(t["skip-cert-verify"]),"skip-cert-verify"),t.tfo&&___app_81.default.info("Option tfo is not supported by Surge, thus omitted"),e.appendIfPresent(",udp-relay=".concat(t.udp),"udp"),e.toString()}(t);case"snell":return function(t){var e=new _$utils_83.Result(t);return e.append("".concat(t.name,"=").concat(t.type,",").concat(t.server,",").concat(t.port)),e.appendIfPresent(",version=".concat(t.version),"version"),e.appendIfPresent(",psk=".concat(t.psk),"psk"),e.appendIfPresent(",obfs=".concat(t["obfs-opts"].mode),"obfs-opts.mode"),e.appendIfPresent(",obfs-host=".concat(t["obfs-opts"].host),"obfs-opts.host"),e.appendIfPresent(",obfs-uri=".concat(t["obfs-opts"].path),"obfs-opts.path"),e.appendIfPresent(",udp-relay=".concat(t.udp),"udp"),e.toString()}(t)}throw new Error("Platform ".concat(targetPlatform," does not support proxy type: ").concat(t.type))}}};var __obj_81,___app_81=(__obj_81=_$app_68)&&__obj_81.__esModule?__obj_81:{default:__obj_81},targetPlatform="Surge";function handleTransport(t,e){if((0,_$utils_83.isPresent)(e,"network")){if("ws"!==e.network)throw new Error("network ".concat(e.network," is unsupported"));if(t.append(",ws=true"),(0,_$utils_83.isPresent)(e,"ws-opts")&&(t.appendIfPresent(",ws-path=".concat(e["ws-opts"].path),"ws-opts.path"),(0,_$utils_83.isPresent)(e,"ws-opts.headers"))){var r=e["ws-opts"].headers,n=Object.keys(r).map((function(t){return"".concat(t,":").concat(r[t])})).join("|");(0,_$utils_104.isNotBlank)(n)&&t.append(",ws-headers=".concat(n))}}}var _$clash_76={};Object.defineProperty(_$clash_76,"__esModule",{value:!0}),_$clash_76.default=function(){return{type:"ALL",produce:function(t){return t.filter((function(t){return"vless"!==t.type})),"proxies:\n"+t.map((function(t){return delete t["tls-fingerprint"],delete t.aead," - "+JSON.stringify(t)+"\n"})).join("")}}};var _$stash_80={};Object.defineProperty(_$stash_80,"__esModule",{value:!0}),_$stash_80.default=function(){return{type:"ALL",produce:function(t){return"proxies:\n"+t.map((function(t){return delete t["tls-fingerprint"],delete t.aead," - "+JSON.stringify(t)+"\n"})).join("")}}};var _$loon_78={};Object.defineProperty(_$loon_78,"__esModule",{value:!0}),_$loon_78.default=function(){return{produce:function(t){switch(t.type){case"ss":return function(t){var e=new _$utils_83.Result(t);if(e.append("".concat(t.name,"=shadowsocks,").concat(t.server,",").concat(t.port,",").concat(t.cipher,',"').concat(t.password,'"')),(0,_$utils_83.isPresent)(t,"plugin")){if("obfs"!==t.plugin)throw new Error("plugin ".concat(t.plugin," is not supported"));e.append(",obfs-name=".concat(t["plugin-opts"].mode)),e.appendIfPresent(",obfs-host=".concat(t["plugin-opts"].host),"plugin-opts.host"),e.appendIfPresent(",obfs-uri=".concat(t["plugin-opts"].path),"plugin-opts.path")}return e.appendIfPresent(",fast-open=".concat(t.tfo),"tfo"),e.appendIfPresent(",udp=".concat(t.udp),"udp"),e.toString()}(t);case"ssr":return function(t){var e=new _$utils_83.Result(t);return e.append("".concat(t.name,"=shadowsocksr,").concat(t.server,",").concat(t.port,",").concat(t.cipher,',"').concat(t.password,'"')),e.append(",protocol=".concat(t.protocol)),e.appendIfPresent(",protocol-param=".concat(t["protocol-param"]),"protocol-param"),e.appendIfPresent(",obfs=".concat(t.obfs),"obfs"),e.appendIfPresent(",obfs-host=".concat(t["obfs-param"]),"obfs-param"),e.appendIfPresent(",fast-open=".concat(t.tfo),"tfo"),e.appendIfPresent(",udp=".concat(t.udp),"udp"),e.toString()}(t);case"trojan":return function(t){var e=new _$utils_83.Result(t);if(e.append("".concat(t.name,"=trojan,").concat(t.server,",").concat(t.port,',"').concat(t.password,'"')),(0,_$utils_83.isPresent)(t,"network")){if("ws"!==t.network)throw new Error("network ".concat(t.network," is unsupported"));e.append(",transport=ws"),e.appendIfPresent(",path=".concat(t["ws-opts"].path),"ws-opts.path"),e.appendIfPresent(",host=".concat(t["ws-opts"].headers.Host),"ws-opts.headers.Host")}return e.appendIfPresent(",skip-cert-verify=".concat(t["skip-cert-verify"]),"skip-cert-verify"),e.appendIfPresent(",tls-name=".concat(t.sni),"sni"),e.appendIfPresent(",fast-open=".concat(t.tfo),"tfo"),e.appendIfPresent(",udp=".concat(t.udp),"udp"),e.toString()}(t);case"vmess":return function(t){var e=new _$utils_83.Result(t);if(e.append("".concat(t.name,"=vmess,").concat(t.server,",").concat(t.port,",").concat("auto"===t.cipher?"none":t.cipher,',"').concat(t.uuid,'"')),(0,_$utils_83.isPresent)(t,"network"))if("ws"===t.network)e.append(",transport=ws"),e.appendIfPresent(",path=".concat(t["ws-opts"].path),"ws-opts.path"),e.appendIfPresent(",host=".concat(t["ws-opts"].headers.Host),"ws-opts.headers.Host");else{if("http"!==t.network)throw new Error("network ".concat(t.network," is unsupported"));e.append(",transport=http"),e.appendIfPresent(",path=".concat(t["http-opts"].path),"http-opts.path"),e.appendIfPresent(",host=".concat(t["http-opts"].headers.Host),"http-opts.headers.Host")}else e.append(",transport=tcp");return e.appendIfPresent(",over-tls=".concat(t.tls),"tls"),e.appendIfPresent(",skip-cert-verify=".concat(t["skip-cert-verify"]),"skip-cert-verify"),e.appendIfPresent(",tls-name=".concat(t.sni),"sni"),(0,_$utils_83.isPresent)(t,"aead")?e.append(",alterId=0"):e.append(",alterId=".concat(t.alterId)),e.appendIfPresent(",fast-open=".concat(t.tfo),"tfo"),e.appendIfPresent(",udp=".concat(t.udp),"udp"),e.toString()}(t);case"vless":return function(t){var e=new _$utils_83.Result(t);if(e.append("".concat(t.name,"=vless,").concat(t.server,",").concat(t.port,',"').concat(t.uuid,'"')),(0,_$utils_83.isPresent)(t,"network"))if("ws"===t.network)e.append(",transport=ws"),e.appendIfPresent(",path=".concat(t["ws-opts"].path),"ws-opts.path"),e.appendIfPresent(",host=".concat(t["ws-opts"].headers.Host),"ws-opts.headers.Host");else{if("http"!==t.network)throw new Error("network ".concat(t.network," is unsupported"));e.append(",transport=http"),e.appendIfPresent(",path=".concat(t["http-opts"].path),"http-opts.path"),e.appendIfPresent(",host=".concat(t["http-opts"].headers.Host),"http-opts.headers.Host")}else e.append(",transport=tcp");return e.appendIfPresent(",over-tls=".concat(t.tls),"tls"),e.appendIfPresent(",skip-cert-verify=".concat(t["skip-cert-verify"]),"skip-cert-verify"),e.appendIfPresent(",tls-name=".concat(t.sni),"sni"),e.appendIfPresent(",fast-open=".concat(t.tfo),"tfo"),e.appendIfPresent(",udp=".concat(t.udp),"udp"),e.toString()}(t);case"http":return function(t){var e=new _$utils_83.Result(t),r=t.tls?"https":"http";return e.append("".concat(t.name,"=").concat(r,",").concat(t.server,",").concat(t.port)),e.appendIfPresent(",".concat(t.username),"username"),e.appendIfPresent(',"'.concat(t.password,'"'),"password"),e.appendIfPresent(",sni=".concat(t.sni),"sni"),e.appendIfPresent(",skip-cert-verify=".concat(t["skip-cert-verify"]),"skip-cert-verify"),e.appendIfPresent(",tfo=".concat(t.tfo),"tfo"),e.appendIfPresent(",udp-relay=".concat(t.udp),"udp"),e.toString()}(t)}throw new Error("Platform ".concat(__targetPlatform_78," does not support proxy type: ").concat(t.type))}}};var __targetPlatform_78="Loon",_$uri_82={};Object.defineProperty(_$uri_82,"__esModule",{value:!0}),_$uri_82.default=function(){return{type:"SINGLE",produce:function(t){var e="";switch(t.type){case"ss":var r="".concat(t.cipher,":").concat(t.password);if(e="ss://".concat(_$base64_4.Base64.encode(r),"@").concat(t.server,":").concat(t.port,"/"),t.plugin){e+="?plugin=";var n=t["plugin-opts"];switch(t.plugin){case"obfs":e+=encodeURIComponent("simple-obfs;obfs=".concat(n.mode).concat(n.host?";obfs-host="+n.host:""));break;case"v2ray-plugin":e+=encodeURIComponent("v2ray-plugin;obfs=".concat(n.mode).concat(n.host?";obfs-host"+n.host:"").concat(n.tls?";tls":""));break;default:throw new Error("Unsupported plugin option: ".concat(t.plugin))}}e+="#".concat(encodeURIComponent(t.name));break;case"ssr":e="".concat(t.server,":").concat(t.port,":").concat(t.protocol,":").concat(t.cipher,":").concat(t.obfs,":").concat(_$base64_4.Base64.encode(t.password),"/"),e+="?remarks=".concat(_$base64_4.Base64.encode(t.name)).concat(t["obfs-param"]?"&obfsparam="+_$base64_4.Base64.encode(t["obfs-param"]):"").concat(t["protocol-param"]?"&protocolparam="+_$base64_4.Base64.encode(t["protocol-param"]):""),e="ssr://"+_$base64_4.Base64.encode(e);break;case"vmess":e={ps:t.name,add:t.server,port:t.port,id:t.uuid,type:"",aid:0,net:t.network||"tcp",tls:t.tls?"tls":""},"ws"===t.network&&(e.path=t["ws-opts"].path||"/",e.host=t["ws-opts"].headers.Host||t.server),e="vmess://"+_$base64_4.Base64.encode(JSON.stringify(e));break;case"trojan":e="trojan://".concat(t.password,"@").concat(t.server,":").concat(t.port,"#").concat(encodeURIComponent(t.name))}return e}}};var _$qx_79={};Object.defineProperty(_$qx_79,"__esModule",{value:!0}),_$qx_79.default=function(){return{produce:function(t){switch(t.type){case"ss":return function(t){var e=new _$utils_83.Result(t),r=e.append.bind(e),n=e.appendIfPresent.bind(e);if(r("shadowsocks=".concat(t.server,":").concat(t.port)),r(",method=".concat(t.cipher)),r(",password=".concat(t.password)),needTls(t)&&(t.tls=!0),(0,_$utils_83.isPresent)(t,"plugin")){if("obfs"===t.plugin){var o=t["plugin-opts"];r(",obfs=".concat(o.mode))}else{if("v2ray-plugin"!==t.plugin||"websocket"!==t["plugin-opts"].mode)throw new Error("plugin is not supported");t["plugin-opts"].tls?r(",obfs=wss"):r(",obfs=ws")}n(",obfs-host=".concat(t["plugin-opts"].host),"plugin-opts.host"),n(",obfs-uri=".concat(t["plugin-opts"].path),"plugin-opts.path")}return n(",tls-cert-sha256=".concat(t["tls-fingerprint"]),"tls-fingerprint"),n(",tls-verification=".concat(!t["skip-cert-verify"]),"skip-cert-verify"),n(",tls-host=".concat(t.sni),"sni"),n(",fast-open=".concat(t.tfo),"tfo"),n(",udp-relay=".concat(t.udp),"udp"),r(",tag=".concat(t.name)),e.toString()}(t);case"ssr":return function(t){var e=new _$utils_83.Result(t),r=e.append.bind(e),n=e.appendIfPresent.bind(e);return r("shadowsocks=".concat(t.server,":").concat(t.port)),r(",method=".concat(t.cipher)),r(",password=".concat(t.password)),r(",ssr-protocol=".concat(t.protocol)),n(",ssr-protocol-param=".concat(t["protocol-param"]),"protocol-param"),n(",obfs=".concat(t.obfs),"obfs"),n(",obfs-host=".concat(t["obfs-param"]),"obfs-param"),n(",fast-open=".concat(t.tfo),"tfo"),n(",udp-relay=".concat(t.udp),"udp"),r(",tag=".concat(t.name)),e.toString()}(t);case"trojan":return function(t){var e=new _$utils_83.Result(t),r=e.append.bind(e),n=e.appendIfPresent.bind(e);if(r("trojan=".concat(t.server,":").concat(t.port)),r(",password=".concat(t.password)),(0,_$utils_83.isPresent)(t,"network")){if("ws"!==t.network)throw new Error("network ".concat(t.network," is unsupported"));needTls(t)?r(",obfs=wss"):r(",obfs=ws"),n(",obfs-uri=".concat(t["ws-opts"].path),"ws-opts.path"),n(",obfs-host=".concat(t["ws-opts"].headers.Host),"ws-opts.headers.Host")}return"ws"!==t.network&&needTls(t)&&r(",over-tls=true"),n(",tls-cert-sha256=".concat(t["tls-fingerprint"]),"tls-fingerprint"),n(",tls-verification=".concat(!t["skip-cert-verify"]),"skip-cert-verify"),n(",tls-host=".concat(t.sni),"sni"),n(",fast-open=".concat(t.tfo),"tfo"),n(",udp-relay=".concat(t.udp),"udp"),r(",tag=".concat(t.name)),e.toString()}(t);case"vmess":return function(t){var e=new _$utils_83.Result(t),r=e.append.bind(e),n=e.appendIfPresent.bind(e);if(r("vmess=".concat(t.server,":").concat(t.port)),r(",method=".concat("auto"===t.cipher?"none":t.cipher)),r(",password=".concat(t.uuid)),needTls(t)&&(t.tls=!0),(0,_$utils_83.isPresent)(t,"network")){if("ws"===t.network)t.tls?r(",obfs=wss"):r(",obfs=ws");else{if("http"!==t.network)throw new Error("network ".concat(t.network," is unsupported"));r(",obfs=http")}n(",obfs-uri=".concat(t["ws-opts"].path),"ws-opts.path"),n(",obfs-host=".concat(t["".concat(t.network,"-opts")].headers.Host),"".concat(t.network,"-opts.headers.Host"))}else t.tls&&r(",obfs=over-tls");return n(",tls-cert-sha256=".concat(t["tls-fingerprint"]),"tls-fingerprint"),n(",tls-verification=".concat(!t["skip-cert-verify"]),"skip-cert-verify"),n(",tls-host=".concat(t.sni),"sni"),(0,_$utils_83.isPresent)(t,"aead")?r(",aead=".concat(t.aead)):r(",aead=".concat(0===t.alterId)),n(",fast-open=".concat(t.tfo),"tfo"),n(",udp-relay=".concat(t.udp),"udp"),r(",tag=".concat(t.name)),e.toString()}(t);case"http":return function(t){var e=new _$utils_83.Result(t),r=e.append.bind(e),n=e.appendIfPresent.bind(e);return r("http=".concat(t.server,":").concat(t.port)),n(",username=".concat(t.username),"username"),n(",password=".concat(t.password),"password"),needTls(t)&&(t.tls=!0),n(",over-tls=".concat(t.tls),"tls"),n(",tls-cert-sha256=".concat(t["tls-fingerprint"]),"tls-fingerprint"),n(",tls-verification=".concat(!t["skip-cert-verify"]),"skip-cert-verify"),n(",tls-host=".concat(t.sni),"sni"),n(",fast-open=".concat(t.tfo),"tfo"),n(",udp-relay=".concat(t.udp),"udp"),r(",tag=".concat(t.name)),e.toString()}(t);case"socks5":return function(t){var e=new _$utils_83.Result(t),r=e.append.bind(e),n=e.appendIfPresent.bind(e);return r("socks5=".concat(t.server,":").concat(t.port)),n(",username=".concat(t.username),"username"),n(",password=".concat(t.password),"password"),needTls(t)&&(t.tls=!0),n(",over-tls=".concat(t.tls),"tls"),n(",tls-cert-sha256=".concat(t["tls-fingerprint"]),"tls-fingerprint"),n(",tls-verification=".concat(!t["skip-cert-verify"]),"skip-cert-verify"),n(",tls-host=".concat(t.sni),"sni"),n(",fast-open=".concat(t.tfo),"tfo"),n(",udp-relay=".concat(t.udp),"udp"),r(",tag=".concat(t.name)),e.toString()}(t)}throw new Error("Platform ".concat(__targetPlatform_79," does not support proxy type: ").concat(t.type))}}};var __targetPlatform_79="QX";function needTls(t){return t.tls||t.sni||void 0!==t["skip-cert-verify"]||void 0!==t["tls-fingerprint"]||void 0!==t["tls-host"]}var _$producers_77={};Object.defineProperty(_$producers_77,"__esModule",{value:!0}),_$producers_77.default=void 0;var _surge=___interopRequireDefault_77(_$surge_81),_clash=___interopRequireDefault_77(_$clash_76),_stash=___interopRequireDefault_77(_$stash_80),_loon=___interopRequireDefault_77(_$loon_78),_uri=___interopRequireDefault_77(_$uri_82);function ___interopRequireDefault_77(t){return t&&t.__esModule?t:{default:t}}var ___default_77={QX:(0,___interopRequireDefault_77(_$qx_79).default)(),Surge:(0,_surge.default)(),Loon:(0,_loon.default)(),Clash:(0,_clash.default)(),URI:(0,_uri.default)(),JSON:{type:"ALL",produce:function(t){return JSON.stringify(t,null,2)}},Stash:(0,_stash.default)()};_$producers_77.default=___default_77;const setProtoOf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])};class GrammarError extends Error{constructor(t,e,r){super(t),setProtoOf(this,GrammarError.prototype),this.name="GrammarError",this.location=e,void 0===r&&(r=[]),this.diagnostics=r,this.stage=null,this.problems=[["error",t,e,r]]}toString(){let t=super.toString();this.location&&(t+="\n at ",void 0!==this.location.source&&null!==this.location.source&&(t+=this.location.source+":"),t+=`${this.location.start.line}:${this.location.start.column}`);for(const e of this.diagnostics)t+="\n from ",void 0!==e.location.source&&null!==e.location.source&&(t+=e.location.source+":"),t+=`${e.location.start.line}:${e.location.start.column}: ${e.message}`;return t}format(t){const e=t.map(({source:t,text:e})=>({source:t,text:e.split(/\r\n|\n|\r/g)}));function r(t,r,n=""){let o="";const a=e.find(({source:e})=>e===t.source),i=t.start;if(a){const e=t.end,u=a.text[i.line-1],s=(i.line===e.line?e.column:u.length+1)-i.column||1;n&&(o+="\nnote: "+n),o+=`\n --\x3e ${t.source}:${i.line}:${i.column}\n${"".padEnd(r)} |\n${i.line.toString().padStart(r)} | ${u}\n${"".padEnd(r)} | ${"".padEnd(i.column-1)}${"".padEnd(s,"^")}`}else o+=`\n at ${t.source}:${i.line}:${i.column}`,n&&(o+=": "+n);return o}return this.problems.filter(t=>"info"!==t[0]).map(t=>function(t,e,n,o=[]){let a;a=(a=n?o.reduce((t,{location:e})=>Math.max(t,e.start.line),n.start.line):Math.max.apply(null,o.map(t=>t.location.start.line))).toString().length;let i=`${t}: ${e}`;n&&(i+=r(n,a));for(const u of o)i+=r(u.location,a,u.message);return i}(...t)).join("\n\n")}}var _$GrammarError_53=GrammarError;const visitor={build(t){function e(e,...r){return t[e.type](e,...r)}function r(){}function n(t,...r){return e(t.expression,...r)}function o(t){return function(r,...n){r[t].forEach(t=>e(t,...n))}}const a={grammar(t,...r){t.topLevelInitializer&&e(t.topLevelInitializer,...r),t.initializer&&e(t.initializer,...r),t.rules.forEach(t=>e(t,...r))},top_level_initializer:r,initializer:r,rule:n,named:n,choice:o("alternatives"),action:n,sequence:o("elements"),labeled:n,text:n,simple_and:n,simple_not:n,optional:n,zero_or_more:n,one_or_more:n,group:n,semantic_and:r,semantic_not:r,rule_ref:r,literal:r,class:r,any:r};return Object.keys(a).forEach(e=>{Object.prototype.hasOwnProperty.call(t,e)||(t[e]=a[e])}),e}};var _$visitor_52=visitor;const asts={findRule(t,e){for(let r=0;r<t.rules.length;r++)if(t.rules[r].name===e)return t.rules[r]},indexOfRule(t,e){for(let r=0;r<t.rules.length;r++)if(t.rules[r].name===e)return r;return-1},alwaysConsumesOnSuccess(t,e){function r(){return!0}function n(){return!1}const o=_$visitor_52.build({choice:t=>t.alternatives.every(o),sequence:t=>t.elements.some(o),simple_and:n,simple_not:n,optional:n,zero_or_more:n,semantic_and:n,semantic_not:n,rule_ref(e){const r=asts.findRule(t,e.name);return r?o(r):void 0},literal:t=>""!==t.value,class:r,any:r});return o(e)}};var _$asts_36=asts,_$opcodes_38={PUSH:0,PUSH_EMPTY_STRING:35,PUSH_UNDEFINED:1,PUSH_NULL:2,PUSH_FAILED:3,PUSH_EMPTY_ARRAY:4,PUSH_CURR_POS:5,POP:6,POP_CURR_POS:7,POP_N:8,NIP:9,APPEND:10,WRAP:11,TEXT:12,PLUCK:36,IF:13,IF_ERROR:14,IF_NOT_ERROR:15,WHILE_NOT_ERROR:16,MATCH_ANY:17,MATCH_STRING:18,MATCH_STRING_IC:19,MATCH_CHAR_CLASS:20,MATCH_REGEXP:20,ACCEPT_N:21,ACCEPT_STRING:22,FAIL:23,LOAD_SAVED_POS:24,UPDATE_SAVED_POS:25,CALL:26,RULE:27,SILENT_FAILS_ON:28,SILENT_FAILS_OFF:29},_$inferenceMatchResult_41={};const ALWAYS_MATCH=1,SOMETIMES_MATCH=0,NEVER_MATCH=-1;function inferenceMatchResult(t){function e(t){return t.match=SOMETIMES_MATCH}function r(t){return a(t.expression),t.match=ALWAYS_MATCH}function n(t){return t.match=a(t.expression)}function o(t,e){const r=t.length;let n=0,o=0;for(let i=0;i<r;++i){const e=a(t[i]);e===ALWAYS_MATCH&&++n,e===NEVER_MATCH&&++o}return n===r?ALWAYS_MATCH:e?o===r?NEVER_MATCH:SOMETIMES_MATCH:o>0?NEVER_MATCH:SOMETIMES_MATCH}const a=_$visitor_52.build({rule(t){let e,r=0;if(void 0===t.match){t.match=SOMETIMES_MATCH;do{if(e=t.match,t.match=a(t.expression),++r>6)throw new _$GrammarError_53("Infinity cycle detected when trying to evaluate node match result",t.location)}while(e!==t.match)}return t.match},named:n,choice:t=>t.match=o(t.alternatives,!0),action:n,sequence:t=>t.match=o(t.elements,!1),labeled:n,text:n,simple_and:n,simple_not:t=>t.match=-a(t.expression),optional:r,zero_or_more:r,one_or_more:n,group:n,semantic_and:e,semantic_not:e,rule_ref(e){const r=_$asts_36.findRule(t,e.name);return e.match=a(r)},literal(t){const e=0===t.value.length?ALWAYS_MATCH:SOMETIMES_MATCH;return t.match=e},class(t){const e=0===t.parts.length?NEVER_MATCH:SOMETIMES_MATCH;return t.match=e},any:e});a(t)}inferenceMatchResult.ALWAYS_MATCH=ALWAYS_MATCH,inferenceMatchResult.SOMETIMES_MATCH=SOMETIMES_MATCH,inferenceMatchResult.NEVER_MATCH=NEVER_MATCH,_$inferenceMatchResult_41=inferenceMatchResult;const{ALWAYS_MATCH:__ALWAYS_MATCH_39,SOMETIMES_MATCH:__SOMETIMES_MATCH_39,NEVER_MATCH:__NEVER_MATCH_39}=_$inferenceMatchResult_41;var _$generateBytecode_39=function(t){const e=[],r=[],n=[],o=[];function a(t){const e=JSON.stringify(t),r=n.findIndex(t=>JSON.stringify(t)===e);return-1===r?n.push(t)-1:r}function i(t,e,r){const n={predicate:t,params:e,body:r.code,location:r.codeLocation},a=JSON.stringify(n),i=o.findIndex(t=>JSON.stringify(t)===a);return-1===i?o.push(n)-1:i}function u(t){const e={};return Object.keys(t).forEach(r=>{e[r]=t[r]}),e}function s(t,...e){return t.concat(...e)}function c(t,e,r,n){return t===__ALWAYS_MATCH_39?r:t===__NEVER_MATCH_39?n:e.concat([r.length,n.length],r,n)}function l(t,e,r,n){const o=Object.keys(r).map(t=>n-r[t]);return[_$opcodes_38.CALL,t,e,o.length].concat(o)}function p(t,e,r){const n=0|t.match;return s([_$opcodes_38.PUSH_CURR_POS],[_$opcodes_38.SILENT_FAILS_ON],h(t,{sp:r.sp+1,env:u(r.env),action:null}),[_$opcodes_38.SILENT_FAILS_OFF],c(e?-n:n,[e?_$opcodes_38.IF_ERROR:_$opcodes_38.IF_NOT_ERROR],s([_$opcodes_38.POP],[e?_$opcodes_38.POP:_$opcodes_38.POP_CURR_POS],[_$opcodes_38.PUSH_UNDEFINED]),s([_$opcodes_38.POP],[e?_$opcodes_38.POP_CURR_POS:_$opcodes_38.POP],[_$opcodes_38.PUSH_FAILED])))}function f(t,e,r){const n=i(!0,Object.keys(r.env),t);return s([_$opcodes_38.UPDATE_SAVED_POS],l(n,0,r.env,r.sp),c(0|t.match,[_$opcodes_38.IF],s([_$opcodes_38.POP],e?[_$opcodes_38.PUSH_FAILED]:[_$opcodes_38.PUSH_UNDEFINED]),s([_$opcodes_38.POP],e?[_$opcodes_38.PUSH_UNDEFINED]:[_$opcodes_38.PUSH_FAILED])))}function _(t){return e=[_$opcodes_38.WHILE_NOT_ERROR],r=s([_$opcodes_38.APPEND],t),e.concat([r.length],r);var e,r}const h=_$visitor_52.build({grammar(t){t.rules.forEach(h),t.literals=e,t.classes=r,t.expectations=n,t.functions=o},rule(t){t.bytecode=h(t.expression,{sp:-1,env:{},pluck:[],action:null})},named(t,e){const r=0|t.match,n=r===__NEVER_MATCH_39?null:a({type:"rule",value:t.name});return s([_$opcodes_38.SILENT_FAILS_ON],h(t.expression,e),[_$opcodes_38.SILENT_FAILS_OFF],c(r,[_$opcodes_38.IF_ERROR],[_$opcodes_38.FAIL,n],[]))},choice:(t,e)=>function t(e,r){const n=0|e[0].match,o=h(e[0],{sp:r.sp,env:u(r.env),action:null});return n===__ALWAYS_MATCH_39?o:s(o,e.length>1?c(__SOMETIMES_MATCH_39,[_$opcodes_38.IF_ERROR],s([_$opcodes_38.POP],t(e.slice(1),r)),[]):[])}(t.alternatives,e),action(t,e){const r=u(e.env),n="sequence"!==t.expression.type||0===t.expression.elements.length,o=h(t.expression,{sp:e.sp+(n?1:0),env:r,action:t}),a=0|t.expression.match,p=n&&a!==__NEVER_MATCH_39?i(!1,Object.keys(r),t):null;return n?s([_$opcodes_38.PUSH_CURR_POS],o,c(a,[_$opcodes_38.IF_NOT_ERROR],s([_$opcodes_38.LOAD_SAVED_POS,1],l(p,1,r,e.sp+2)),[]),[_$opcodes_38.NIP]):o},sequence:(t,e)=>s([_$opcodes_38.PUSH_CURR_POS],function e(r,n){if(r.length>0){const o=t.elements.length-r.length+1;return s(h(r[0],{sp:n.sp,env:n.env,pluck:n.pluck,action:null}),c(0|r[0].match,[_$opcodes_38.IF_NOT_ERROR],e(r.slice(1),{sp:n.sp+1,env:n.env,pluck:n.pluck,action:n.action}),s(o>1?[_$opcodes_38.POP_N,o]:[_$opcodes_38.POP],[_$opcodes_38.POP_CURR_POS],[_$opcodes_38.PUSH_FAILED])))}if(n.pluck.length>0)return s([_$opcodes_38.PLUCK,t.elements.length+1,n.pluck.length],n.pluck.map(t=>n.sp-t));if(n.action){const e=i(!1,Object.keys(n.env),n.action);return s([_$opcodes_38.LOAD_SAVED_POS,t.elements.length],l(e,t.elements.length+1,n.env,n.sp))}return s([_$opcodes_38.WRAP,t.elements.length],[_$opcodes_38.NIP])}(t.elements,{sp:e.sp+1,env:e.env,pluck:[],action:e.action})),labeled(t,e){let r=e.env;const n=t.label,o=e.sp+1;return n&&(r=u(e.env),e.env[t.label]=o),t.pick&&e.pluck.push(o),h(t.expression,{sp:e.sp,env:r,action:null})},text:(t,e)=>s([_$opcodes_38.PUSH_CURR_POS],h(t.expression,{sp:e.sp+1,env:u(e.env),action:null}),c(0|t.match,[_$opcodes_38.IF_NOT_ERROR],s([_$opcodes_38.POP],[_$opcodes_38.TEXT]),[_$opcodes_38.NIP])),simple_and:(t,e)=>p(t.expression,!1,e),simple_not:(t,e)=>p(t.expression,!0,e),optional:(t,e)=>s(h(t.expression,{sp:e.sp,env:u(e.env),action:null}),c(-(0|t.expression.match),[_$opcodes_38.IF_ERROR],s([_$opcodes_38.POP],[_$opcodes_38.PUSH_NULL]),[])),zero_or_more(t,e){const r=h(t.expression,{sp:e.sp+1,env:u(e.env),action:null});return s([_$opcodes_38.PUSH_EMPTY_ARRAY],r,_(r),[_$opcodes_38.POP])},one_or_more(t,e){const r=h(t.expression,{sp:e.sp+1,env:u(e.env),action:null});return s([_$opcodes_38.PUSH_EMPTY_ARRAY],r,c(0|t.expression.match,[_$opcodes_38.IF_NOT_ERROR],s(_(r),[_$opcodes_38.POP]),s([_$opcodes_38.POP],[_$opcodes_38.POP],[_$opcodes_38.PUSH_FAILED])))},group:(t,e)=>h(t.expression,{sp:e.sp,env:u(e.env),action:null}),semantic_and:(t,e)=>f(t,!1,e),semantic_not:(t,e)=>f(t,!0,e),rule_ref:e=>[_$opcodes_38.RULE,_$asts_36.indexOfRule(t,e.name)],literal(t){if(t.value.length>0){const r=0|t.match,n=r===__SOMETIMES_MATCH_39||r===__ALWAYS_MATCH_39&&!t.ignoreCase?function(t){const r=e.indexOf(t);return-1===r?e.push(t)-1:r}(t.ignoreCase?t.value.toLowerCase():t.value):null,o=r!==__ALWAYS_MATCH_39?a({type:"literal",value:t.value,ignoreCase:t.ignoreCase}):null;return c(r,t.ignoreCase?[_$opcodes_38.MATCH_STRING_IC,n]:[_$opcodes_38.MATCH_STRING,n],t.ignoreCase?[_$opcodes_38.ACCEPT_N,t.value.length]:[_$opcodes_38.ACCEPT_STRING,n],[_$opcodes_38.FAIL,o])}return[_$opcodes_38.PUSH_EMPTY_STRING]},class(t){const e=0|t.match,n=e===__SOMETIMES_MATCH_39?function(t){const e={value:t.parts,inverted:t.inverted,ignoreCase:t.ignoreCase},n=JSON.stringify(e),o=r.findIndex(t=>JSON.stringify(t)===n);return-1===o?r.push(e)-1:o}(t):null,o=e!==__ALWAYS_MATCH_39?a({type:"class",value:t.parts,inverted:t.inverted,ignoreCase:t.ignoreCase}):null;return c(e,[_$opcodes_38.MATCH_CHAR_CLASS,n],[_$opcodes_38.ACCEPT_N,1],[_$opcodes_38.FAIL,o])},any(t){const e=0|t.match,r=e!==__ALWAYS_MATCH_39?a({type:"any"}):null;return c(e,[_$opcodes_38.MATCH_ANY],[_$opcodes_38.ACCEPT_N,1],[_$opcodes_38.FAIL,r])}});h(t)},_$stack_50=class{constructor(t,e,r){this.sp=-1,this.maxSp=-1,this.varName=e,this.ruleName=t,this.type=r}name(t){if(t<0)throw new RangeError(`Rule '${this.ruleName}': The variable stack underflow: attempt to use a variable '${this.varName}<x>' at an index ${t}`);return this.varName+t}push(t){const e=this.name(++this.sp)+" = "+t+";";return this.sp>this.maxSp&&(this.maxSp=this.sp),e}pop(t){return void 0!==t?(this.sp-=t,Array.from({length:t},(t,e)=>this.name(this.sp+1+e))):this.name(this.sp--)}top(){return this.name(this.sp)}index(t){if(t<0)throw new RangeError(`Rule '${this.ruleName}': The variable stack overflow: attempt to get a variable at a negative index ${t}`);return this.name(this.sp-t)}result(){if(this.maxSp<0)throw new RangeError(`Rule '${this.ruleName}': The variable stack is empty, can't get the result'`);return this.name(0)}defines(){return this.maxSp<0?"":this.type+" "+Array.from({length:this.maxSp+1},(t,e)=>this.name(e)).join(", ")+";"}checkedIf(t,e,r){const n=this.sp;if(e(),r){const e=this.sp;if(this.sp=n,r(),e!==this.sp)throw new Error("Rule '"+this.ruleName+"', position "+t+": Branches of a condition can't move the stack pointer differently (before: "+n+", after then: "+e+", after else: "+this.sp+").")}}checkedLoop(t,e){const r=this.sp;if(e(),r!==this.sp)throw new Error("Rule '"+this.ruleName+"', position "+t+": Body of a loop can't move the stack pointer (before: "+r+", after: "+this.sp+").")}},_$version_56="2.0.1",_$utils_51={};function hex(t){return t.charCodeAt(0).toString(16).toUpperCase()}_$utils_51.hex=hex,_$utils_51.stringEscape=function(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\v/g,"\\v").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,t=>"\\x0"+hex(t)).replace(/[\x10-\x1F\x7F-\xFF]/g,t=>"\\x"+hex(t)).replace(/[\u0100-\u0FFF]/g,t=>"\\u0"+hex(t)).replace(/[\u1000-\uFFFF]/g,t=>"\\u"+hex(t))},_$utils_51.regexpClassEscape=function(t){return t.replace(/\\/g,"\\\\").replace(/\//g,"\\/").replace(/]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\v/g,"\\v").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,t=>"\\x0"+hex(t)).replace(/[\x10-\x1F\x7F-\xFF]/g,t=>"\\x"+hex(t)).replace(/[\u0100-\u0FFF]/g,t=>"\\u0"+hex(t)).replace(/[\u1000-\uFFFF]/g,t=>"\\u"+hex(t))};var _$base64_59={};const intToCharMap="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");_$base64_59.encode=function(t){if(0<=t&&t<intToCharMap.length)return intToCharMap[t];throw new TypeError("Must be between 0 and 63: "+t)};var _$base64Vlq_58={encode:function(t){let e,r="",n=function(t){return t<0?1+(-t<<1):0+(t<<1)}(t);do{e=31&n,(n>>>=5)>0&&(e|=32),r+=_$base64_59.encode(e)}while(n>0);return r}},_$util_63={getArg:function(t,e,r){if(e in t)return t[e];if(3===arguments.length)return r;throw new Error('"'+e+'" is a required argument.')}};const supportsNullProto=!("__proto__"in Object.create(null));function identity(t){return t}function isProtoString(t){if(!t)return!1;const e=t.length;if(e<9)return!1;if(95!==t.charCodeAt(e-1)||95!==t.charCodeAt(e-2)||111!==t.charCodeAt(e-3)||116!==t.charCodeAt(e-4)||111!==t.charCodeAt(e-5)||114!==t.charCodeAt(e-6)||112!==t.charCodeAt(e-7)||95!==t.charCodeAt(e-8)||95!==t.charCodeAt(e-9))return!1;for(let r=e-10;r>=0;r--)if(36!==t.charCodeAt(r))return!1;return!0}function strcmp(t,e){return t===e?0:null===t?1:null===e?-1:t>e?1:-1}_$util_63.toSetString=supportsNullProto?identity:function(t){return isProtoString(t)?"$"+t:t},_$util_63.fromSetString=supportsNullProto?identity:function(t){return isProtoString(t)?t.slice(1):t},_$util_63.compareByGeneratedPositionsInflated=function(t,e){let r=t.generatedLine-e.generatedLine;return 0!==r||0!=(r=t.generatedColumn-e.generatedColumn)||0!==(r=strcmp(t.source,e.source))||0!=(r=t.originalLine-e.originalLine)||0!=(r=t.originalColumn-e.originalColumn)?r:strcmp(t.name,e.name)};const PROTOCOL="http:",PROTOCOL_AND_HOST=PROTOCOL+"//host";function createSafeHandler(t){return e=>{const r=getURLType(e),n=buildSafeBase(e),o=new URL(e,n);t(o);const a=o.toString();return"absolute"===r?a:"scheme-relative"===r?a.slice(PROTOCOL.length):"path-absolute"===r?a.slice(PROTOCOL_AND_HOST.length):computeRelativeURL(n,a)}}function withBase(t,e){return new URL(t,e).toString()}function buildSafeBase(t){const e=t.split("..").length-1,r=function(t,e){let r=0;for(;;){const t="p"+r++;if(-1===e.indexOf(t))return t}}(0,t);let n=PROTOCOL_AND_HOST+"/";for(let o=0;o<e;o++)n+=r+"/";return n}const ABSOLUTE_SCHEME=/^[A-Za-z0-9\+\-\.]+:/;function getURLType(t){return"/"===t[0]?"/"===t[1]?"scheme-relative":"path-absolute":ABSOLUTE_SCHEME.test(t)?"absolute":"path-relative"}function computeRelativeURL(t,e){"string"==typeof t&&(t=new URL(t)),"string"==typeof e&&(e=new URL(e));const r=e.pathname.split("/"),n=t.pathname.split("/");for(n.length>0&&!n[n.length-1]&&n.pop();r.length>0&&n.length>0&&r[0]===n[0];)r.shift(),n.shift();return n.map(()=>"..").concat(r).join("/")+e.search+e.hash}const ensureDirectory=createSafeHandler(t=>{t.pathname=t.pathname.replace(/\/?$/,"/")}),normalize=createSafeHandler(t=>{});_$util_63.normalize=normalize,_$util_63.join=function(t,e){const r=getURLType(e),n=getURLType(t);if(t=ensureDirectory(t),"absolute"===r)return withBase(e,void 0);if("absolute"===n)return withBase(e,t);if("scheme-relative"===r)return normalize(e);if("scheme-relative"===n)return withBase(e,withBase(t,PROTOCOL_AND_HOST)).slice(PROTOCOL.length);if("path-absolute"===r)return normalize(e);if("path-absolute"===n)return withBase(e,withBase(t,PROTOCOL_AND_HOST)).slice(PROTOCOL_AND_HOST.length);const o=buildSafeBase(e+t);return computeRelativeURL(o,withBase(e,withBase(t,o)))},_$util_63.relative=function(t,e){const r=function(t,e){if(getURLType(t)!==getURLType(e))return null;const r=buildSafeBase(t+e),n=new URL(t,r),o=new URL(e,r);try{new URL("",o.toString())}catch(a){return null}return o.protocol!==n.protocol||o.user!==n.user||o.password!==n.password||o.hostname!==n.hostname||o.port!==n.port?null:computeRelativeURL(n,o)}(t,e);return"string"==typeof r?r:normalize(e)};var _$arraySet_57={};class ArraySet{constructor(){this._array=[],this._set=new Map}static fromArray(t,e){const r=new ArraySet;for(let n=0,o=t.length;n<o;n++)r.add(t[n],e);return r}size(){return this._set.size}add(t,e){const r=this.has(t),n=this._array.length;r&&!e||this._array.push(t),r||this._set.set(t,n)}has(t){return this._set.has(t)}indexOf(t){const e=this._set.get(t);if(e>=0)return e;throw new Error('"'+t+'" is not in the set.')}at(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)}toArray(){return this._array.slice()}}_$arraySet_57.ArraySet=ArraySet;var _$mappingList_60={MappingList:class{constructor(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}unsortedForEach(t,e){this._array.forEach(t,e)}add(t){!function(t,e){const r=t.generatedLine,n=e.generatedLine,o=t.generatedColumn,a=e.generatedColumn;return n>r||n==r&&a>=o||_$util_63.compareByGeneratedPositionsInflated(t,e)<=0}(this._last,t)?(this._sorted=!1,this._array.push(t)):(this._last=t,this._array.push(t))}toArray(){return this._sorted||(this._array.sort(_$util_63.compareByGeneratedPositionsInflated),this._sorted=!0),this._array}}},_$sourceMapGenerator_61={};const __ArraySet_61=_$arraySet_57.ArraySet,MappingList=_$mappingList_60.MappingList;class SourceMapGenerator{constructor(t){t||(t={}),this._file=_$util_63.getArg(t,"file",null),this._sourceRoot=_$util_63.getArg(t,"sourceRoot",null),this._skipValidation=_$util_63.getArg(t,"skipValidation",!1),this._sources=new __ArraySet_61,this._names=new __ArraySet_61,this._mappings=new MappingList,this._sourcesContents=null}static fromSourceMap(t){const e=t.sourceRoot,r=new SourceMapGenerator({file:t.file,sourceRoot:e});return t.eachMapping((function(t){const n={generated:{line:t.generatedLine,column:t.generatedColumn}};null!=t.source&&(n.source=t.source,null!=e&&(n.source=_$util_63.relative(e,n.source)),n.original={line:t.originalLine,column:t.originalColumn},null!=t.name&&(n.name=t.name)),r.addMapping(n)})),t.sources.forEach((function(n){let o=n;null!=e&&(o=_$util_63.relative(e,n)),r._sources.has(o)||r._sources.add(o);const a=t.sourceContentFor(n);null!=a&&r.setSourceContent(n,a)})),r}addMapping(t){const e=_$util_63.getArg(t,"generated"),r=_$util_63.getArg(t,"original",null);let n=_$util_63.getArg(t,"source",null),o=_$util_63.getArg(t,"name",null);this._skipValidation||this._validateMapping(e,r,n,o),null!=n&&(n=String(n),this._sources.has(n)||this._sources.add(n)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:e.line,generatedColumn:e.column,originalLine:r&&r.line,originalColumn:r&&r.column,source:n,name:o})}setSourceContent(t,e){let r=t;null!=this._sourceRoot&&(r=_$util_63.relative(this._sourceRoot,r)),null!=e?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[_$util_63.toSetString(r)]=e):this._sourcesContents&&(delete this._sourcesContents[_$util_63.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))}applySourceMap(t,e,r){let n=e;if(null==e){if(null==t.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');n=t.file}const o=this._sourceRoot;null!=o&&(n=_$util_63.relative(o,n));const a=this._mappings.toArray().length>0?new __ArraySet_61:this._sources,i=new __ArraySet_61;this._mappings.unsortedForEach((function(e){if(e.source===n&&null!=e.originalLine){const n=t.originalPositionFor({line:e.originalLine,column:e.originalColumn});null!=n.source&&(e.source=n.source,null!=r&&(e.source=_$util_63.join(r,e.source)),null!=o&&(e.source=_$util_63.relative(o,e.source)),e.originalLine=n.line,e.originalColumn=n.column,null!=n.name&&(e.name=n.name))}const u=e.source;null==u||a.has(u)||a.add(u);const s=e.name;null==s||i.has(s)||i.add(s)}),this),this._sources=a,this._names=i,t.sources.forEach((function(e){const n=t.sourceContentFor(e);null!=n&&(null!=r&&(e=_$util_63.join(r,e)),null!=o&&(e=_$util_63.relative(o,e)),this.setSourceContent(e,n))}),this)}_validateMapping(t,e,r,n){if(e&&"number"!=typeof e.line&&"number"!=typeof e.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!e&&!r&&!n);else if(!(t&&"line"in t&&"column"in t&&e&&"line"in e&&"column"in e&&t.line>0&&t.column>=0&&e.line>0&&e.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:r,original:e,name:n}))}_serializeMappings(){let t,e,r,n,o=0,a=1,i=0,u=0,s=0,c=0,l="";const p=this._mappings.toArray();for(let f=0,_=p.length;f<_;f++){if(t="",(e=p[f]).generatedLine!==a)for(o=0;e.generatedLine!==a;)t+=";",a++;else if(f>0){if(!_$util_63.compareByGeneratedPositionsInflated(e,p[f-1]))continue;t+=","}t+=_$base64Vlq_58.encode(e.generatedColumn-o),o=e.generatedColumn,null!=e.source&&(n=this._sources.indexOf(e.source),t+=_$base64Vlq_58.encode(n-c),c=n,t+=_$base64Vlq_58.encode(e.originalLine-1-u),u=e.originalLine-1,t+=_$base64Vlq_58.encode(e.originalColumn-i),i=e.originalColumn,null!=e.name&&(r=this._names.indexOf(e.name),t+=_$base64Vlq_58.encode(r-s),s=r)),l+=t}return l}_generateSourcesContent(t,e){return t.map((function(t){if(!this._sourcesContents)return null;null!=e&&(t=_$util_63.relative(e,t));const r=_$util_63.toSetString(t);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null}),this)}toJSON(){const t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(t.file=this._file),null!=this._sourceRoot&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t}toString(){return JSON.stringify(this.toJSON())}}SourceMapGenerator.prototype._version=3,_$sourceMapGenerator_61.SourceMapGenerator=SourceMapGenerator;var _$sourceNode_62={};const __SourceMapGenerator_62=_$sourceMapGenerator_61.SourceMapGenerator,REGEX_NEWLINE=/(\r?\n)/,NEWLINE_CODE=10,isSourceNode="$$$isSourceNode$$$";class SourceNode{constructor(t,e,r,n,o){this.children=[],this.sourceContents={},this.line=null==t?null:t,this.column=null==e?null:e,this.source=null==r?null:r,this.name=null==o?null:o,this[isSourceNode]=!0,null!=n&&this.add(n)}static fromStringWithSourceMap(t,e,r){const n=new SourceNode,o=t.split(REGEX_NEWLINE);let a=0;const i=function(){return t()+(t()||"");function t(){return a<o.length?o[a++]:void 0}};let u,s=1,c=0,l=null;return e.eachMapping((function(t){if(null!==l){if(!(s<t.generatedLine)){const e=(u=o[a]||"").substr(0,t.generatedColumn-c);return o[a]=u.substr(t.generatedColumn-c),c=t.generatedColumn,p(l,e),void(l=t)}p(l,i()),s++,c=0}for(;s<t.generatedLine;)n.add(i()),s++;c<t.generatedColumn&&(u=o[a]||"",n.add(u.substr(0,t.generatedColumn)),o[a]=u.substr(t.generatedColumn),c=t.generatedColumn),l=t}),this),a<o.length&&(l&&p(l,i()),n.add(o.splice(a).join(""))),e.sources.forEach((function(t){const o=e.sourceContentFor(t);null!=o&&(null!=r&&(t=_$util_63.join(r,t)),n.setSourceContent(t,o))})),n;function p(t,e){if(null===t||void 0===t.source)n.add(e);else{const o=r?_$util_63.join(r,t.source):t.source;n.add(new SourceNode(t.originalLine,t.originalColumn,o,e,t.name))}}}add(t){if(Array.isArray(t))t.forEach((function(t){this.add(t)}),this);else{if(!t[isSourceNode]&&"string"!=typeof t)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);t&&this.children.push(t)}return this}prepend(t){if(Array.isArray(t))for(let e=t.length-1;e>=0;e--)this.prepend(t[e]);else{if(!t[isSourceNode]&&"string"!=typeof t)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);this.children.unshift(t)}return this}walk(t){let e;for(let r=0,n=this.children.length;r<n;r++)(e=this.children[r])[isSourceNode]?e.walk(t):""!==e&&t(e,{source:this.source,line:this.line,column:this.column,name:this.name})}join(t){let e,r;const n=this.children.length;if(n>0){for(e=[],r=0;r<n-1;r++)e.push(this.children[r]),e.push(t);e.push(this.children[r]),this.children=e}return this}replaceRight(t,e){const r=this.children[this.children.length-1];return r[isSourceNode]?r.replaceRight(t,e):"string"==typeof r?this.children[this.children.length-1]=r.replace(t,e):this.children.push("".replace(t,e)),this}setSourceContent(t,e){this.sourceContents[_$util_63.toSetString(t)]=e}walkSourceContents(t){for(let r=0,n=this.children.length;r<n;r++)this.children[r][isSourceNode]&&this.children[r].walkSourceContents(t);const e=Object.keys(this.sourceContents);for(let r=0,n=e.length;r<n;r++)t(_$util_63.fromSetString(e[r]),this.sourceContents[e[r]])}toString(){let t="";return this.walk((function(e){t+=e})),t}toStringWithSourceMap(t){const e={code:"",line:1,column:0},r=new __SourceMapGenerator_62(t);let n=!1,o=null,a=null,i=null,u=null;return this.walk((function(t,s){e.code+=t,null!==s.source&&null!==s.line&&null!==s.column?(o===s.source&&a===s.line&&i===s.column&&u===s.name||r.addMapping({source:s.source,original:{line:s.line,column:s.column},generated:{line:e.line,column:e.column},name:s.name}),o=s.source,a=s.line,i=s.column,u=s.name,n=!0):n&&(r.addMapping({generated:{line:e.line,column:e.column}}),o=null,n=!1);for(let a=0,i=t.length;a<i;a++)t.charCodeAt(a)===NEWLINE_CODE?(e.line++,e.column=0,a+1===i?(o=null,n=!1):n&&r.addMapping({source:s.source,original:{line:s.line,column:s.column},generated:{line:e.line,column:e.column},name:s.name})):e.column++})),this.walkSourceContents((function(t,e){r.setSourceContent(t,e)})),{code:e.code,map:r}}}_$sourceNode_62.SourceNode=SourceNode;var _$sourceMap_64={};_$sourceMap_64.SourceMapGenerator=_$sourceMapGenerator_61.SourceMapGenerator,_$sourceMap_64.SourceNode=_$sourceNode_62.SourceNode;const{stringEscape:stringEscape,regexpClassEscape:regexpClassEscape}=_$utils_51,{SourceNode:__SourceNode_40}=_$sourceMap_64;function toSourceNode(t,e,r){const n=e.start.line,o=e.start.column-1,a=t.split("\n");return 1===a.length?new __SourceNode_40(n,o,e.source,t,r):new __SourceNode_40(null,null,e.source,a.map((t,i)=>new __SourceNode_40(n+i,0===i?o:0,e.source,i===a.length-1?t:[t,"\n"],r)))}function wrapInSourceNode(t,e,r,n,o){return r?new __SourceNode_40(null,null,r.source,[t,toSourceNode(e,r,o),new __SourceNode_40(r.end.line,r.end.column-1,r.source,n)]):new __SourceNode_40(null,null,null,[t,e,n])}var _$generateJs_40=function(t,e){function r(t){return t instanceof __SourceNode_40?t:t.replace(/^(.+)$/gm," $1")}function n(t){return"peg$c"+t}function o(t){return"peg$r"+t}function a(t){return"peg$e"+t}function i(t){return"peg$f"+t}function u(t){return"peg$parse"+t}function s(t){return t.codeLocation?toSourceNode(t.code,t.codeLocation,"$"+t.type):t.code}t.code=function(t){function n(){return[`// Generated by Peggy ${_$version_56}.`,"//","// https://peggyjs.org/"]}function o(){return e.trace?["{"," SyntaxError: peg$SyntaxError,"," DefaultTracer: peg$DefaultTracer,"," parse: peg$parse","}"].join("\n"):["{"," SyntaxError: peg$SyntaxError,"," parse: peg$parse","}"].join("\n")}const a={bare:()=>[...n(),"(function() {",' "use strict";',"",t,"",r("return "+o()+";"),"})()"],commonjs(){const r=Object.keys(e.dependencies),a=n();return a.push("",'"use strict";',""),r.length>0&&(r.forEach(t=>{a.push("var "+t+' = require("'+stringEscape(e.dependencies[t])+'");')}),a.push("")),a.push(t,"","module.exports = "+o()+";"),a},es(){const r=Object.keys(e.dependencies),o=n();return o.push(""),r.length>0&&(r.forEach(t=>{o.push("import "+t+' from "'+stringEscape(e.dependencies[t])+'";')}),o.push("")),o.push(t,"","export {"," peg$SyntaxError as SyntaxError,",e.trace?" peg$DefaultTracer as DefaultTracer,":""," peg$parse as parse","};"),o},amd(){const a=Object.keys(e.dependencies),i="["+a.map(t=>e.dependencies[t]).map(t=>'"'+stringEscape(t)+'"').join(", ")+"]",u=a.join(", ");return[...n(),"define("+i+", function("+u+") {",' "use strict";',"",t,"",r("return "+o()+";"),"});"]},globals:()=>[...n(),"(function(root) {",' "use strict";',"",t,"",r("root."+e.exportVar+" = "+o()+";"),"})(this);"],umd(){const a=Object.keys(e.dependencies),i=a.map(t=>e.dependencies[t]),u="["+i.map(t=>'"'+stringEscape(t)+'"').join(", ")+"]",s=i.map(t=>'require("'+stringEscape(t)+'")').join(", "),c=a.join(", "),l=n();return l.push("(function(root, factory) {",' if (typeof define === "function" && define.amd) {'," define("+u+", factory);",' } else if (typeof module === "object" && module.exports) {'," module.exports = factory("+s+");"),null!==e.exportVar&&l.push(" } else {"," root."+e.exportVar+" = factory();"),l.push(" }","})(this, function("+c+") {",' "use strict";',"",t,"",r("return "+o()+";"),"});"),l}}[e.format]();return new __SourceNode_40(null,null,e.grammarSource,a.map(t=>t instanceof __SourceNode_40?t:t+"\n"))}(function(){const c=[];t.topLevelInitializer&&(c.push(s(t.topLevelInitializer)),c.push("")),c.push("function peg$subclass(child, parent) {"," function C() { this.constructor = child; }"," C.prototype = parent.prototype;"," child.prototype = new C();","}","","function peg$SyntaxError(message, expected, found, location) {"," var self = Error.call(this, message);"," // istanbul ignore next Check is a necessary evil to support older environments"," if (Object.setPrototypeOf) {"," Object.setPrototypeOf(self, peg$SyntaxError.prototype);"," }"," self.expected = expected;"," self.found = found;"," self.location = location;",' self.name = "SyntaxError";'," return self;","}","","peg$subclass(peg$SyntaxError, Error);","","function peg$padEnd(str, targetLength, padString) {",' padString = padString || " ";'," if (str.length > targetLength) { return str; }"," targetLength -= str.length;"," padString += padString.repeat(targetLength);"," return str + padString.slice(0, targetLength);","}","","peg$SyntaxError.prototype.format = function(sources) {",' var str = "Error: " + this.message;'," if (this.location) {"," var src = null;"," var k;"," for (k = 0; k < sources.length; k++) {"," if (sources[k].source === this.location.source) {"," src = sources[k].text.split(/\\r\\n|\\n|\\r/g);"," break;"," }"," }"," var s = this.location.start;",' var loc = this.location.source + ":" + s.line + ":" + s.column;'," if (src) {"," var e = this.location.end;"," var filler = peg$padEnd(\"\", s.line.toString().length, ' ');"," var line = src[s.line - 1];"," var last = s.line === e.line ? e.column : line.length + 1;"," var hatLen = (last - s.column) || 1;",' str += "\\n --\x3e " + loc + "\\n"',' + filler + " |\\n"',' + s.line + " | " + line + "\\n"',' + filler + " | " + peg$padEnd("", s.column - 1, \' \')',' + peg$padEnd("", hatLen, "^");'," } else {",' str += "\\n at " + loc;'," }"," }"," return str;","};","","peg$SyntaxError.buildMessage = function(expected, found) {"," var DESCRIBE_EXPECTATION_FNS = {"," literal: function(expectation) {",' return "\\"" + literalEscape(expectation.text) + "\\"";'," },",""," class: function(expectation) {"," var escapedParts = expectation.parts.map(function(part) {"," return Array.isArray(part)",' ? classEscape(part[0]) + "-" + classEscape(part[1])'," : classEscape(part);"," });","",' return "[" + (expectation.inverted ? "^" : "") + escapedParts.join("") + "]";'," },",""," any: function() {",' return "any character";'," },",""," end: function() {",' return "end of input";'," },",""," other: function(expectation) {"," return expectation.description;"," }"," };",""," function hex(ch) {"," return ch.charCodeAt(0).toString(16).toUpperCase();"," }",""," function literalEscape(s) {"," return s",' .replace(/\\\\/g, "\\\\\\\\")',' .replace(/"/g, "\\\\\\"")',' .replace(/\\0/g, "\\\\0")',' .replace(/\\t/g, "\\\\t")',' .replace(/\\n/g, "\\\\n")',' .replace(/\\r/g, "\\\\r")',' .replace(/[\\x00-\\x0F]/g, function(ch) { return "\\\\x0" + hex(ch); })',' .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return "\\\\x" + hex(ch); });'," }",""," function classEscape(s) {"," return s",' .replace(/\\\\/g, "\\\\\\\\")',' .replace(/\\]/g, "\\\\]")',' .replace(/\\^/g, "\\\\^")',' .replace(/-/g, "\\\\-")',' .replace(/\\0/g, "\\\\0")',' .replace(/\\t/g, "\\\\t")',' .replace(/\\n/g, "\\\\n")',' .replace(/\\r/g, "\\\\r")',' .replace(/[\\x00-\\x0F]/g, function(ch) { return "\\\\x0" + hex(ch); })',' .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return "\\\\x" + hex(ch); });'," }",""," function describeExpectation(expectation) {"," return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);"," }",""," function describeExpected(expected) {"," var descriptions = expected.map(describeExpectation);"," var i, j;",""," descriptions.sort();",""," if (descriptions.length > 0) {"," for (i = 1, j = 1; i < descriptions.length; i++) {"," if (descriptions[i - 1] !== descriptions[i]) {"," descriptions[j] = descriptions[i];"," j++;"," }"," }"," descriptions.length = j;"," }",""," switch (descriptions.length) {"," case 1:"," return descriptions[0];",""," case 2:",' return descriptions[0] + " or " + descriptions[1];',""," default:",' return descriptions.slice(0, -1).join(", ")',' + ", or "'," + descriptions[descriptions.length - 1];"," }"," }",""," function describeFound(found) {",' return found ? "\\"" + literalEscape(found) + "\\"" : "end of input";'," }","",' return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found.";',"};",""),e.trace&&c.push("function peg$DefaultTracer() {"," this.indentLevel = 0;","}","","peg$DefaultTracer.prototype.trace = function(event) {"," var that = this;",""," function log(event) {"," function repeat(string, n) {",' var result = "", i;',""," for (i = 0; i < n; i++) {"," result += string;"," }",""," return result;"," }",""," function pad(string, length) {",' return string + repeat(" ", length - string.length);'," }","",' if (typeof console === "object") {'," console.log(",' event.location.start.line + ":" + event.location.start.column + "-"',' + event.location.end.line + ":" + event.location.end.column + " "',' + pad(event.type, 10) + " "',' + repeat(" ", that.indentLevel) + event.rule'," );"," }"," }",""," switch (event.type) {",' case "rule.enter":'," log(event);"," this.indentLevel++;"," break;","",' case "rule.match":'," this.indentLevel--;"," log(event);"," break;","",' case "rule.fail":'," this.indentLevel--;"," log(event);"," break;",""," default:",' throw new Error("Invalid event type: " + event.type + ".");'," }","};","");const l="{ "+e.allowedStartRules.map(t=>t+": "+u(t)).join(", ")+" }",p=u(e.allowedStartRules[0]);return c.push("function peg$parse(input, options) {"," options = options !== undefined ? options : {};",""," var peg$FAILED = {};"," var peg$source = options.grammarSource;",""," var peg$startRuleFunctions = "+l+";"," var peg$startRuleFunction = "+p+";","",new __SourceNode_40(null,null,e.grammarSource,[t.literals.map((t,e)=>" var "+n(e)+' = "'+stringEscape(t)+'";').concat("",t.classes.map((t,e)=>{return" var "+o(e)+" = /^["+((r=t).inverted?"^":"")+r.value.map(t=>Array.isArray(t)?regexpClassEscape(t[0])+"-"+regexpClassEscape(t[1]):regexpClassEscape(t)).join("")+"]/"+(r.ignoreCase?"i":"")+";";var r})).concat("",t.expectations.map((t,e)=>" var "+a(e)+" = "+function(t){switch(t.type){case"rule":return'peg$otherExpectation("'+stringEscape(t.value)+'")';case"literal":return'peg$literalExpectation("'+stringEscape(t.value)+'", '+t.ignoreCase+")";case"class":return"peg$classExpectation(["+t.value.map(t=>Array.isArray(t)?'["'+stringEscape(t[0])+'", "'+stringEscape(t[1])+'"]':'"'+stringEscape(t)+'"').join(", ")+"], "+t.inverted+", "+t.ignoreCase+")";case"any":return"peg$anyExpectation()";default:throw new Error("Unknown expectation type ("+JSON.stringify(t)+")")}}(t)+";")).concat("").join("\n"),t.functions.map((function(t,e){return wrapInSourceNode(`\n var ${i(e)} = function(${t.params.join(", ")}) {`,t.body,t.location,"};")}))]),""," var peg$currPos = 0;"," var peg$savedPos = 0;"," var peg$posDetailsCache = [{ line: 1, column: 1 }];"," var peg$maxFailPos = 0;"," var peg$maxFailExpected = [];"," var peg$silentFails = 0;",""),e.cache&&c.push(" var peg$resultsCache = {};",""),e.trace&&c.push(' var peg$tracer = "tracer" in options ? options.tracer : new peg$DefaultTracer();',""),c.push(" var peg$result;","",' if ("startRule" in options) {'," if (!(options.startRule in peg$startRuleFunctions)) {",' throw new Error("Can\'t start parsing from rule \\"" + options.startRule + "\\".");'," }",""," peg$startRuleFunction = peg$startRuleFunctions[options.startRule];"," }",""," function text() {"," return input.substring(peg$savedPos, peg$currPos);"," }",""," function offset() {"," return peg$savedPos;"," }",""," function range() {"," return {"," source: peg$source,"," start: peg$savedPos,"," end: peg$currPos"," };"," }",""," function location() {"," return peg$computeLocation(peg$savedPos, peg$currPos);"," }",""," function expected(description, location) {"," location = location !== undefined"," ? location"," : peg$computeLocation(peg$savedPos, peg$currPos);",""," throw peg$buildStructuredError("," [peg$otherExpectation(description)],"," input.substring(peg$savedPos, peg$currPos),"," location"," );"," }",""," function error(message, location) {"," location = location !== undefined"," ? location"," : peg$computeLocation(peg$savedPos, peg$currPos);",""," throw peg$buildSimpleError(message, location);"," }",""," function peg$literalExpectation(text, ignoreCase) {",' return { type: "literal", text: text, ignoreCase: ignoreCase };'," }",""," function peg$classExpectation(parts, inverted, ignoreCase) {",' return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase };'," }",""," function peg$anyExpectation() {",' return { type: "any" };'," }",""," function peg$endExpectation() {",' return { type: "end" };'," }",""," function peg$otherExpectation(description) {",' return { type: "other", description: description };'," }",""," function peg$computePosDetails(pos) {"," var details = peg$posDetailsCache[pos];"," var p;",""," if (details) {"," return details;"," } else {"," p = pos - 1;"," while (!peg$posDetailsCache[p]) {"," p--;"," }",""," details = peg$posDetailsCache[p];"," details = {"," line: details.line,"," column: details.column"," };",""," while (p < pos) {"," if (input.charCodeAt(p) === 10) {"," details.line++;"," details.column = 1;"," } else {"," details.column++;"," }",""," p++;"," }",""," peg$posDetailsCache[pos] = details;",""," return details;"," }"," }",""," function peg$computeLocation(startPos, endPos) {"," var startPosDetails = peg$computePosDetails(startPos);"," var endPosDetails = peg$computePosDetails(endPos);",""," return {"," source: peg$source,"," start: {"," offset: startPos,"," line: startPosDetails.line,"," column: startPosDetails.column"," },"," end: {"," offset: endPos,"," line: endPosDetails.line,"," column: endPosDetails.column"," }"," };"," }",""," function peg$fail(expected) {"," if (peg$currPos < peg$maxFailPos) { return; }",""," if (peg$currPos > peg$maxFailPos) {"," peg$maxFailPos = peg$currPos;"," peg$maxFailExpected = [];"," }",""," peg$maxFailExpected.push(expected);"," }",""," function peg$buildSimpleError(message, location) {"," return new peg$SyntaxError(message, null, null, location);"," }",""," function peg$buildStructuredError(expected, found, location) {"," return new peg$SyntaxError("," peg$SyntaxError.buildMessage(expected, found),"," expected,"," found,"," location"," );"," }",""),t.rules.forEach(s=>{c.push(...function(s){const c=[],l=new _$stack_50(s.name,"s","var"),p=function e(s){let c=0;const p=s.length,f=[];let _;function h(t,n){const o=n+3,a=s[c+o-2],i=s[c+o-1];let u,p;l.checkedIf(c,()=>{c+=o,u=e(s.slice(c,c+a)),c+=a},i>0?()=>{p=e(s.slice(c,c+i)),c+=i}:null),f.push("if ("+t+") {"),f.push(...u.map(r)),i>0&&(f.push("} else {"),f.push(...p.map(r))),f.push("}")}function d(t){const n=s[c+2-1];let o;l.checkedLoop(c,()=>{c+=2,o=e(s.slice(c,c+n)),c+=n}),f.push("while ("+t+") {"),f.push(...o.map(r)),f.push("}")}function y(){const t=s[c+4-1],e=i(s[c+1])+"("+s.slice(c+4,c+4+t).map(t=>l.index(t)).join(", ")+")";l.pop(s[c+2]),f.push(l.push(e)),c+=4+t}for(;c<p;)switch(s[c]){case _$opcodes_38.PUSH_EMPTY_STRING:f.push(l.push("''")),c++;break;case _$opcodes_38.PUSH_CURR_POS:f.push(l.push("peg$currPos")),c++;break;case _$opcodes_38.PUSH_UNDEFINED:f.push(l.push("undefined")),c++;break;case _$opcodes_38.PUSH_NULL:f.push(l.push("null")),c++;break;case _$opcodes_38.PUSH_FAILED:f.push(l.push("peg$FAILED")),c++;break;case _$opcodes_38.PUSH_EMPTY_ARRAY:f.push(l.push("[]")),c++;break;case _$opcodes_38.POP:l.pop(),c++;break;case _$opcodes_38.POP_CURR_POS:f.push("peg$currPos = "+l.pop()+";"),c++;break;case _$opcodes_38.POP_N:l.pop(s[c+1]),c+=2;break;case _$opcodes_38.NIP:_=l.pop(),l.pop(),f.push(l.push(_)),c++;break;case _$opcodes_38.APPEND:_=l.pop(),f.push(l.top()+".push("+_+");"),c++;break;case _$opcodes_38.WRAP:f.push(l.push("["+l.pop(s[c+1]).join(", ")+"]")),c+=2;break;case _$opcodes_38.TEXT:f.push(l.push("input.substring("+l.pop()+", peg$currPos)")),c++;break;case _$opcodes_38.PLUCK:{const t=3,e=s[c+t-1],r=t+e;_=s.slice(c+t,c+r),_=1===e?l.index(_[0]):`[ ${_.map(t=>l.index(t)).join(", ")} ]`,l.pop(s[c+1]),f.push(l.push(_)),c+=r;break}case _$opcodes_38.IF:h(l.top(),0);break;case _$opcodes_38.IF_ERROR:h(l.top()+" === peg$FAILED",0);break;case _$opcodes_38.IF_NOT_ERROR:h(l.top()+" !== peg$FAILED",0);break;case _$opcodes_38.WHILE_NOT_ERROR:d(l.top()+" !== peg$FAILED");break;case _$opcodes_38.MATCH_ANY:h("input.length > peg$currPos",0);break;case _$opcodes_38.MATCH_STRING:h(t.literals[s[c+1]].length>1?"input.substr(peg$currPos, "+t.literals[s[c+1]].length+") === "+n(s[c+1]):"input.charCodeAt(peg$currPos) === "+t.literals[s[c+1]].charCodeAt(0),1);break;case _$opcodes_38.MATCH_STRING_IC:h("input.substr(peg$currPos, "+t.literals[s[c+1]].length+").toLowerCase() === "+n(s[c+1]),1);break;case _$opcodes_38.MATCH_CHAR_CLASS:h(o(s[c+1])+".test(input.charAt(peg$currPos))",1);break;case _$opcodes_38.ACCEPT_N:f.push(l.push(s[c+1]>1?"input.substr(peg$currPos, "+s[c+1]+")":"input.charAt(peg$currPos)")),f.push(s[c+1]>1?"peg$currPos += "+s[c+1]+";":"peg$currPos++;"),c+=2;break;case _$opcodes_38.ACCEPT_STRING:f.push(l.push(n(s[c+1]))),f.push(t.literals[s[c+1]].length>1?"peg$currPos += "+t.literals[s[c+1]].length+";":"peg$currPos++;"),c+=2;break;case _$opcodes_38.FAIL:f.push(l.push("peg$FAILED")),f.push("if (peg$silentFails === 0) { peg$fail("+a(s[c+1])+"); }"),c+=2;break;case _$opcodes_38.LOAD_SAVED_POS:f.push("peg$savedPos = "+l.index(s[c+1])+";"),c+=2;break;case _$opcodes_38.UPDATE_SAVED_POS:f.push("peg$savedPos = peg$currPos;"),c++;break;case _$opcodes_38.CALL:y();break;case _$opcodes_38.RULE:f.push(l.push(u(t.rules[s[c+1]].name)+"()")),c+=2;break;case _$opcodes_38.SILENT_FAILS_ON:f.push("peg$silentFails++;"),c++;break;case _$opcodes_38.SILENT_FAILS_OFF:f.push("peg$silentFails--;"),c++;break;default:throw new Error("Invalid opcode: "+s[c]+".")}return f}(s.bytecode);return c.push(wrapInSourceNode(" function ",u(s.name),s.nameLocation,"() {\n",s.name)),e.trace&&c.push(" var startPos = peg$currPos;"),c.push(r(l.defines())),c.push(...function(r,n){const o=[];return o.push(""),e.trace&&o.push("peg$tracer.trace({",' type: "rule.enter",'," rule: "+r+","," location: peg$computeLocation(startPos, startPos)","});",""),e.cache&&(o.push("var key = peg$currPos * "+t.rules.length+" + "+n+";","var cached = peg$resultsCache[key];","","if (cached) {"," peg$currPos = cached.nextPos;",""),e.trace&&o.push("if (cached.result !== peg$FAILED) {"," peg$tracer.trace({",' type: "rule.match",'," rule: "+r+","," result: cached.result,"," location: peg$computeLocation(startPos, peg$currPos)"," });","} else {"," peg$tracer.trace({",' type: "rule.fail",'," rule: "+r+","," location: peg$computeLocation(startPos, startPos)"," });","}",""),o.push(" return cached.result;","}","")),o}('"'+stringEscape(s.name)+'"',_$asts_36.indexOfRule(t,s.name)).map(r)),c.push(...p.map(r)),c.push(...function(t,r){const n=[];return e.cache&&n.push("","peg$resultsCache[key] = { nextPos: peg$currPos, result: "+r+" };"),e.trace&&n.push("","if ("+r+" !== peg$FAILED) {"," peg$tracer.trace({",' type: "rule.match",'," rule: "+t+","," result: "+r+","," location: peg$computeLocation(startPos, peg$currPos)"," });","} else {"," peg$tracer.trace({",' type: "rule.fail",'," rule: "+t+","," location: peg$computeLocation(startPos, startPos)"," });","}"),n.push("","return "+r+";"),n}('"'+stringEscape(s.name)+'"',l.result()).map(r)),c.push("}"),c}(s).map(r)),c.push("")}),t.initializer&&(c.push(s(t.initializer)),c.push("")),c.push(" peg$result = peg$startRuleFunction();",""," if (peg$result !== peg$FAILED && peg$currPos === input.length) {"," return peg$result;"," } else {"," if (peg$result !== peg$FAILED && peg$currPos < input.length) {"," peg$fail(peg$endExpectation());"," }",""," throw peg$buildStructuredError("," peg$maxFailExpected,"," peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,"," peg$maxFailPos < input.length"," ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)"," : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)"," );"," }","}"),new __SourceNode_40(null,null,e.grammarSource,c.map(t=>t instanceof __SourceNode_40?t:t+"\n"))}())},_$removeProxyRules_42=function(t,e,r){const n=[];t.rules.forEach((o,a)=>{var i;"rule"===(i=o).type&&"rule_ref"===i.expression.type&&(function(t,e,n){_$visitor_52.build({rule_ref(o){o.name===e&&(o.name=n,r.info(`Proxy rule "${e}" replaced by the rule "${n}"`,o.location,[{message:"This rule will be used",location:_$asts_36.findRule(t,n).nameLocation}]))}})(t)}(t,o.name,o.expression.name),-1===e.allowedStartRules.indexOf(o.name)&&n.push(a))}),n.reverse(),n.forEach(e=>{t.rules.splice(e,1)})},_$reportDuplicateLabels_43=function(t,e,r){function n(t){const e={};return Object.keys(t).forEach(r=>{e[r]=t[r]}),e}function o(t,e){a(t.expression,n(e))}const a=_$visitor_52.build({rule(t){a(t.expression,{})},choice(t,e){t.alternatives.forEach(t=>{a(t,n(e))})},action:o,labeled(t,e){const n=t.label;n&&Object.prototype.hasOwnProperty.call(e,n)&&r.error(`Label "${t.label}" is already defined`,t.labelLocation,[{message:"Original label location",location:e[n]}]),a(t.expression,e),e[t.label]=t.labelLocation},text:o,simple_and:o,simple_not:o,optional:o,zero_or_more:o,one_or_more:o,group:o});a(t)},_$reportDuplicateRules_44=function(t,e,r){const n={};_$visitor_52.build({rule(t){Object.prototype.hasOwnProperty.call(n,t.name)?r.error(`Rule "${t.name}" is already defined`,t.nameLocation,[{message:"Original rule location",location:n[t.name]}]):n[t.name]=t.nameLocation}})(t)},_$reportInfiniteRecursion_46=function(t,e,r){const n=[],o=[],a=_$visitor_52.build({rule(t){n.push(t.name),a(t.expression),n.pop()},sequence(e){e.elements.every(e=>(a(e),!_$asts_36.alwaysConsumesOnSuccess(t,e)))},rule_ref(e){o.push(e);const i=_$asts_36.findRule(t,e.name);if(-1!==n.indexOf(e.name))return n.push(e.name),void r.error("Possible infinite loop when parsing (left recursion: "+n.join(" -> ")+")",i.nameLocation,o.map((t,e,r)=>({message:e+1!==r.length?`Step ${e+1}: call of the rule "${t.name}" without input consumption`:`Step ${e+1}: call itself without input consumption - left recursion`,location:t.location})));i&&a(i),o.pop()}});a(t)},_$reportInfiniteRepetition_47=function(t,e,r){_$visitor_52.build({zero_or_more(e){_$asts_36.alwaysConsumesOnSuccess(t,e.expression)||r.error("Possible infinite loop when parsing (repetition used with an expression that may not consume any input)",e.location)},one_or_more(e){_$asts_36.alwaysConsumesOnSuccess(t,e.expression)||r.error("Possible infinite loop when parsing (repetition used with an expression that may not consume any input)",e.location)}})(t)},_$reportUndefinedRules_48=function(t,e,r){_$visitor_52.build({rule_ref(e){_$asts_36.findRule(t,e.name)||r.error(`Rule "${e.name}" is not defined`,e.location)}})(t)},_$reportIncorrectPlucking_45=function(t,e,r){const n=_$visitor_52.build({action(t){n(t.expression,t)},labeled(t,e){t.pick&&e&&r.error('"@" cannot be used with an action block',t.labelLocation,[{message:"Action block location",location:e.codeLocation}]),n(t.expression)}});n(t)};class Defaults{constructor(t){"function"==typeof(t=void 0!==t?t:{}).error&&(this.error=t.error),"function"==typeof t.warning&&(this.warning=t.warning),"function"==typeof t.info&&(this.info=t.info)}error(){}warning(){}info(){}}var _$session_49=class{constructor(t){this._callbacks=new Defaults(t),this._firstError=null,this.errors=0,this.problems=[],this.stage=null}error(...t){++this.errors,null===this._firstError&&(this._firstError=new _$GrammarError_53(...t),this._firstError.stage=this.stage,this._firstError.problems=this.problems),this.problems.push(["error",...t]),this._callbacks.error(this.stage,...t)}warning(...t){this.problems.push(["warning",...t]),this._callbacks.warning(this.stage,...t)}info(...t){this.problems.push(["info",...t]),this._callbacks.info(this.stage,...t)}checkErrors(){if(0!==this.errors)throw this._firstError}};function processOptions(t,e){const r={};return Object.keys(t).forEach(e=>{r[e]=t[e]}),Object.keys(e).forEach(t=>{Object.prototype.hasOwnProperty.call(r,t)||(r[t]=e[t])}),r}const compiler={visitor:_$visitor_52,passes:{check:[_$reportUndefinedRules_48,_$reportDuplicateRules_44,_$reportDuplicateLabels_43,_$reportInfiniteRecursion_46,_$reportInfiniteRepetition_47,_$reportIncorrectPlucking_45],transform:[_$removeProxyRules_42,_$inferenceMatchResult_41],generate:[_$generateBytecode_39,_$generateJs_40]},compile(ast,passes,options){if(options=void 0!==options?options:{},options=processOptions(options,{allowedStartRules:[ast.rules[0].name],cache:!1,dependencies:{},exportVar:null,format:"bare",output:"parser",trace:!1}),!Array.isArray(options.allowedStartRules))throw new Error("allowedStartRules must be an array");if(0===options.allowedStartRules.length)throw new Error("Must have at least one start rule");const allRules=ast.rules.map(t=>t.name);for(const t of options.allowedStartRules)if(-1===allRules.indexOf(t))throw new Error(`Unknown start rule "${t}"`);const session=new _$session_49(options);switch(Object.keys(passes).forEach(t=>{session.stage=t,session.info("Process stage "+t),passes[t].forEach(e=>{session.info(`Process pass ${t}.${e.name}`),e(ast,options,session)}),session.checkErrors()}),options.output){case"parser":return eval(ast.code.toString());case"source":return ast.code.toString();case"source-and-map":return ast.code;default:throw new Error("Invalid output format: "+options.output+".")}}};var _$compiler_37=compiler,_$parser_54={};const OPS_TO_PREFIXED_TYPES={$:"text","&":"simple_and","!":"simple_not"},OPS_TO_SUFFIXED_TYPES={"?":"optional","*":"zero_or_more","+":"one_or_more"},OPS_TO_SEMANTIC_PREDICATE_TYPES={"&":"semantic_and","!":"semantic_not"};function peg$SyntaxError(t,e,r,n){var o=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(o,peg$SyntaxError.prototype),o.expected=e,o.found=r,o.location=n,o.name="SyntaxError",o}function peg$padEnd(t,e,r){return r=r||" ",t.length>e?t:(e-=t.length,t+(r+=r.repeat(e)).slice(0,e))}!function(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}(peg$SyntaxError,Error),peg$SyntaxError.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var r,n=null;for(r=0;r<t.length;r++)if(t[r].source===this.location.source){n=t[r].text.split(/\r\n|\n|\r/g);break}var o=this.location.start,a=this.location.source+":"+o.line+":"+o.column;if(n){var i=this.location.end,u=peg$padEnd("",o.line.toString().length," "),s=n[o.line-1],c=(o.line===i.line?i.column:s.length+1)-o.column||1;e+="\n --\x3e "+a+"\n"+u+" |\n"+o.line+" | "+s+"\n"+u+" | "+peg$padEnd("",o.column-1," ")+peg$padEnd("",c,"^")}else e+="\n at "+a}return e},peg$SyntaxError.buildMessage=function(t,e){var r={literal:function(t){return'"'+o(t.text)+'"'},class:function(t){var e=t.parts.map((function(t){return Array.isArray(t)?a(t[0])+"-"+a(t[1]):a(t)}));return"["+(t.inverted?"^":"")+e.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(t){return t.description}};function n(t){return t.charCodeAt(0).toString(16).toUpperCase()}function o(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(t){return"\\x0"+n(t)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(t){return"\\x"+n(t)}))}function a(t){return t.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(t){return"\\x0"+n(t)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(t){return"\\x"+n(t)}))}function i(t){return r[t.type](t)}return"Expected "+function(t){var e,r,n=t.map(i);if(n.sort(),n.length>0){for(e=1,r=1;e<n.length;e++)n[e-1]!==n[e]&&(n[r]=n[e],r++);n.length=r}switch(n.length){case 1:return n[0];case 2:return n[0]+" or "+n[1];default:return n.slice(0,-1).join(", ")+", or "+n[n.length-1]}}(t)+" but "+function(t){return t?'"'+o(t)+'"':"end of input"}(e)+" found."},_$parser_54={SyntaxError:peg$SyntaxError,parse:function(t,e){var r,n={},o=(e=void 0!==e?e:{}).grammarSource,a={Grammar:re},i=re,u=/^[\n\r\u2028\u2029]/,s=/^[0-9]/,c=/^[0-9a-f]/i,l=/^[{}]/,p=/^[a-z\xB5\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137-\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148-\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C-\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA-\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9-\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC-\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF-\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F-\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0-\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB-\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE-\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0561-\u0587\u13F8-\u13FD\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6-\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FC7\u1FD0-\u1FD3\u1FD6-\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6-\u1FF7\u210A\u210E-\u210F\u2113\u212F\u2134\u2139\u213C-\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5E\u2C61\u2C65-\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73-\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3-\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7B5\uA7B7\uA7FA\uAB30-\uAB5A\uAB60-\uAB65\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A]/,f=/^[\u02B0-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0374\u037A\u0559\u0640\u06E5-\u06E6\u07F4-\u07F5\u07FA\u081A\u0824\u0828\u0971\u0E46\u0EC6\u10FC\u17D7\u1843\u1AA7\u1C78-\u1C7D\u1D2C-\u1D6A\u1D78\u1D9B-\u1DBF\u2071\u207F\u2090-\u209C\u2C7C-\u2C7D\u2D6F\u2E2F\u3005\u3031-\u3035\u303B\u309D-\u309E\u30FC-\u30FE\uA015\uA4F8-\uA4FD\uA60C\uA67F\uA69C-\uA69D\uA717-\uA71F\uA770\uA788\uA7F8-\uA7F9\uA9CF\uA9E6\uAA70\uAADD\uAAF3-\uAAF4\uAB5C-\uAB5F\uFF70\uFF9E-\uFF9F]/,_=/^[\xAA\xBA\u01BB\u01C0-\u01C3\u0294\u05D0-\u05EA\u05F0-\u05F2\u0620-\u063F\u0641-\u064A\u066E-\u066F\u0671-\u06D3\u06D5\u06EE-\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u0800-\u0815\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0972-\u0980\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\u0AF9\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-\u0C39\u0C3D\u0C58-\u0C5A\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\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32-\u0E33\u0E40-\u0E45\u0E81-\u0E82\u0E84\u0E87-\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA-\u0EAB\u0EAD-\u0EB0\u0EB2-\u0EB3\u0EBD\u0EC0-\u0EC4\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065-\u1066\u106E-\u1070\u1075-\u1081\u108E\u10D0-\u10FA\u10FD-\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\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17DC\u1820-\u1842\u1844-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE-\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C77\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5-\u1CF6\u2135-\u2138\u2D30-\u2D67\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3006\u303C\u3041-\u3096\u309F\u30A1-\u30FA\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA014\uA016-\uA48C\uA4D0-\uA4F7\uA500-\uA60B\uA610-\uA61F\uA62A-\uA62B\uA66E\uA6A0-\uA6E5\uA78F\uA7F7\uA7FB-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9E0-\uA9E4\uA9E7-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA6F\uAA71-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADC\uAAE0-\uAAEA\uAAF2\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\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\uFF66-\uFF6F\uFF71-\uFF9D\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,h=/^[\u01C5\u01C8\u01CB\u01F2\u1F88-\u1F8F\u1F98-\u1F9F\u1FA8-\u1FAF\u1FBC\u1FCC\u1FFC]/,d=/^[A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178-\u0179\u017B\u017D\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018B\u018E-\u0191\u0193-\u0194\u0196-\u0198\u019C-\u019D\u019F-\u01A0\u01A2\u01A4\u01A6-\u01A7\u01A9\u01AC\u01AE-\u01AF\u01B1-\u01B3\u01B5\u01B7-\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A-\u023B\u023D-\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E-\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9-\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0-\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E-\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D-\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AD\uA7B0-\uA7B4\uA7B6\uFF21-\uFF3A]/,y=/^[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E-\u094F\u0982-\u0983\u09BE-\u09C0\u09C7-\u09C8\u09CB-\u09CC\u09D7\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB-\u0ACC\u0B02-\u0B03\u0B3E\u0B40\u0B47-\u0B48\u0B4B-\u0B4C\u0B57\u0BBE-\u0BBF\u0BC1-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD7\u0C01-\u0C03\u0C41-\u0C44\u0C82-\u0C83\u0CBE\u0CC0-\u0CC4\u0CC7-\u0CC8\u0CCA-\u0CCB\u0CD5-\u0CD6\u0D02-\u0D03\u0D3E-\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D57\u0D82-\u0D83\u0DCF-\u0DD1\u0DD8-\u0DDF\u0DF2-\u0DF3\u0F3E-\u0F3F\u0F7F\u102B-\u102C\u1031\u1038\u103B-\u103C\u1056-\u1057\u1062-\u1064\u1067-\u106D\u1083-\u1084\u1087-\u108C\u108F\u109A-\u109C\u17B6\u17BE-\u17C5\u17C7-\u17C8\u1923-\u1926\u1929-\u192B\u1930-\u1931\u1933-\u1938\u1A19-\u1A1A\u1A55\u1A57\u1A61\u1A63-\u1A64\u1A6D-\u1A72\u1B04\u1B35\u1B3B\u1B3D-\u1B41\u1B43-\u1B44\u1B82\u1BA1\u1BA6-\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2-\u1BF3\u1C24-\u1C2B\u1C34-\u1C35\u1CE1\u1CF2-\u1CF3\u302E-\u302F\uA823-\uA824\uA827\uA880-\uA881\uA8B4-\uA8C3\uA952-\uA953\uA983\uA9B4-\uA9B5\uA9BA-\uA9BB\uA9BD-\uA9C0\uAA2F-\uAA30\uAA33-\uAA34\uAA4D\uAA7B\uAA7D\uAAEB\uAAEE-\uAAEF\uAAF5\uABE3-\uABE4\uABE6-\uABE7\uABE9-\uABEA\uABEC]/,v=/^[\u0300-\u036F\u0483-\u0487\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7-\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962-\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\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\u0B3F\u0B41-\u0B44\u0B4D\u0B56\u0B62-\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55-\u0C56\u0C62-\u0C63\u0C81\u0CBC\u0CBF\u0CC6\u0CCC-\u0CCD\u0CE2-\u0CE3\u0D01\u0D41-\u0D44\u0D4D\u0D62-\u0D63\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB-\u0EBC\u0EC8-\u0ECD\u0F18-\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86-\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039-\u103A\u103D-\u103E\u1058-\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17B4-\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193B\u1A17-\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ABD\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80-\u1B81\u1BA2-\u1BA5\u1BA8-\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8-\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8-\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099-\u309A\uA66F\uA674-\uA67D\uA69E-\uA69F\uA6F0-\uA6F1\uA802\uA806\uA80B\uA825-\uA826\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9E5\uAA29-\uAA2E\uAA31-\uAA32\uAA35-\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7-\uAAB8\uAABE-\uAABF\uAAC1\uAAEC-\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/,g=/^[0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]/,m=/^[\u16EE-\u16F0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303A\uA6E6-\uA6EF]/,b=/^[_\u203F-\u2040\u2054\uFE33-\uFE34\uFE4D-\uFE4F\uFF3F]/,A=/^[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,E=Jt("{",!1),w=Jt("}",!1),C=Jt("=",!1),S=Jt("/",!1),x=Jt("@",!1),$=Jt(":",!1),O=Jt("$",!1),P=Jt("&",!1),F=Jt("!",!1),R=Jt("?",!1),L=Jt("*",!1),T=Jt("+",!1),I=Jt("(",!1),k=Jt(")",!1),j={type:"any"},D=Qt("whitespace"),N=Jt("\t",!1),B=Jt("\v",!1),M=Jt("\f",!1),U=Jt(" ",!1),G=Jt("\xa0",!1),H=Jt("\ufeff",!1),q=Xt(["\n","\r","\u2028","\u2029"],!1,!1),Y=Qt("end of line"),K=Jt("\n",!1),z=Jt("\r\n",!1),W=Jt("\r",!1),V=Jt("\u2028",!1),J=Jt("\u2029",!1),X=Qt("comment"),Q=Jt("/*",!1),Z=Jt("*/",!1),tt=Jt("//",!1),et=Qt("identifier"),rt=Jt("_",!1),nt=Jt("\\",!1),ot=Jt("\u200c",!1),at=Jt("\u200d",!1),it=Qt("literal"),ut=Jt("i",!1),st=Qt("string"),ct=Jt('"',!1),lt=Jt("'",!1),pt=Qt("character class"),ft=Jt("[",!1),_t=Jt("^",!1),ht=Jt("]",!1),dt=Jt("-",!1),yt=Jt("0",!1),vt=Jt("b",!1),gt=Jt("f",!1),mt=Jt("n",!1),bt=Jt("r",!1),At=Jt("t",!1),Et=Jt("v",!1),wt=Jt("x",!1),Ct=Jt("u",!1),St=Xt([["0","9"]],!1,!1),xt=Xt([["0","9"],["a","f"]],!1,!0),$t=Jt(".",!1),Ot=Qt("code block"),Pt=Xt(["{","}"],!1,!1),Ft=Xt([["a","z"],"\xb5",["\xdf","\xf6"],["\xf8","\xff"],"\u0101","\u0103","\u0105","\u0107","\u0109","\u010b","\u010d","\u010f","\u0111","\u0113","\u0115","\u0117","\u0119","\u011b","\u011d","\u011f","\u0121","\u0123","\u0125","\u0127","\u0129","\u012b","\u012d","\u012f","\u0131","\u0133","\u0135",["\u0137","\u0138"],"\u013a","\u013c","\u013e","\u0140","\u0142","\u0144","\u0146",["\u0148","\u0149"],"\u014b","\u014d","\u014f","\u0151","\u0153","\u0155","\u0157","\u0159","\u015b","\u015d","\u015f","\u0161","\u0163","\u0165","\u0167","\u0169","\u016b","\u016d","\u016f","\u0171","\u0173","\u0175","\u0177","\u017a","\u017c",["\u017e","\u0180"],"\u0183","\u0185","\u0188",["\u018c","\u018d"],"\u0192","\u0195",["\u0199","\u019b"],"\u019e","\u01a1","\u01a3","\u01a5","\u01a8",["\u01aa","\u01ab"],"\u01ad","\u01b0","\u01b4","\u01b6",["\u01b9","\u01ba"],["\u01bd","\u01bf"],"\u01c6","\u01c9","\u01cc","\u01ce","\u01d0","\u01d2","\u01d4","\u01d6","\u01d8","\u01da",["\u01dc","\u01dd"],"\u01df","\u01e1","\u01e3","\u01e5","\u01e7","\u01e9","\u01eb","\u01ed",["\u01ef","\u01f0"],"\u01f3","\u01f5","\u01f9","\u01fb","\u01fd","\u01ff","\u0201","\u0203","\u0205","\u0207","\u0209","\u020b","\u020d","\u020f","\u0211","\u0213","\u0215","\u0217","\u0219","\u021b","\u021d","\u021f","\u0221","\u0223","\u0225","\u0227","\u0229","\u022b","\u022d","\u022f","\u0231",["\u0233","\u0239"],"\u023c",["\u023f","\u0240"],"\u0242","\u0247","\u0249","\u024b","\u024d",["\u024f","\u0293"],["\u0295","\u02af"],"\u0371","\u0373","\u0377",["\u037b","\u037d"],"\u0390",["\u03ac","\u03ce"],["\u03d0","\u03d1"],["\u03d5","\u03d7"],"\u03d9","\u03db","\u03dd","\u03df","\u03e1","\u03e3","\u03e5","\u03e7","\u03e9","\u03eb","\u03ed",["\u03ef","\u03f3"],"\u03f5","\u03f8",["\u03fb","\u03fc"],["\u0430","\u045f"],"\u0461","\u0463","\u0465","\u0467","\u0469","\u046b","\u046d","\u046f","\u0471","\u0473","\u0475","\u0477","\u0479","\u047b","\u047d","\u047f","\u0481","\u048b","\u048d","\u048f","\u0491","\u0493","\u0495","\u0497","\u0499","\u049b","\u049d","\u049f","\u04a1","\u04a3","\u04a5","\u04a7","\u04a9","\u04ab","\u04ad","\u04af","\u04b1","\u04b3","\u04b5","\u04b7","\u04b9","\u04bb","\u04bd","\u04bf","\u04c2","\u04c4","\u04c6","\u04c8","\u04ca","\u04cc",["\u04ce","\u04cf"],"\u04d1","\u04d3","\u04d5","\u04d7","\u04d9","\u04db","\u04dd","\u04df","\u04e1","\u04e3","\u04e5","\u04e7","\u04e9","\u04eb","\u04ed","\u04ef","\u04f1","\u04f3","\u04f5","\u04f7","\u04f9","\u04fb","\u04fd","\u04ff","\u0501","\u0503","\u0505","\u0507","\u0509","\u050b","\u050d","\u050f","\u0511","\u0513","\u0515","\u0517","\u0519","\u051b","\u051d","\u051f","\u0521","\u0523","\u0525","\u0527","\u0529","\u052b","\u052d","\u052f",["\u0561","\u0587"],["\u13f8","\u13fd"],["\u1d00","\u1d2b"],["\u1d6b","\u1d77"],["\u1d79","\u1d9a"],"\u1e01","\u1e03","\u1e05","\u1e07","\u1e09","\u1e0b","\u1e0d","\u1e0f","\u1e11","\u1e13","\u1e15","\u1e17","\u1e19","\u1e1b","\u1e1d","\u1e1f","\u1e21","\u1e23","\u1e25","\u1e27","\u1e29","\u1e2b","\u1e2d","\u1e2f","\u1e31","\u1e33","\u1e35","\u1e37","\u1e39","\u1e3b","\u1e3d","\u1e3f","\u1e41","\u1e43","\u1e45","\u1e47","\u1e49","\u1e4b","\u1e4d","\u1e4f","\u1e51","\u1e53","\u1e55","\u1e57","\u1e59","\u1e5b","\u1e5d","\u1e5f","\u1e61","\u1e63","\u1e65","\u1e67","\u1e69","\u1e6b","\u1e6d","\u1e6f","\u1e71","\u1e73","\u1e75","\u1e77","\u1e79","\u1e7b","\u1e7d","\u1e7f","\u1e81","\u1e83","\u1e85","\u1e87","\u1e89","\u1e8b","\u1e8d","\u1e8f","\u1e91","\u1e93",["\u1e95","\u1e9d"],"\u1e9f","\u1ea1","\u1ea3","\u1ea5","\u1ea7","\u1ea9","\u1eab","\u1ead","\u1eaf","\u1eb1","\u1eb3","\u1eb5","\u1eb7","\u1eb9","\u1ebb","\u1ebd","\u1ebf","\u1ec1","\u1ec3","\u1ec5","\u1ec7","\u1ec9","\u1ecb","\u1ecd","\u1ecf","\u1ed1","\u1ed3","\u1ed5","\u1ed7","\u1ed9","\u1edb","\u1edd","\u1edf","\u1ee1","\u1ee3","\u1ee5","\u1ee7","\u1ee9","\u1eeb","\u1eed","\u1eef","\u1ef1","\u1ef3","\u1ef5","\u1ef7","\u1ef9","\u1efb","\u1efd",["\u1eff","\u1f07"],["\u1f10","\u1f15"],["\u1f20","\u1f27"],["\u1f30","\u1f37"],["\u1f40","\u1f45"],["\u1f50","\u1f57"],["\u1f60","\u1f67"],["\u1f70","\u1f7d"],["\u1f80","\u1f87"],["\u1f90","\u1f97"],["\u1fa0","\u1fa7"],["\u1fb0","\u1fb4"],["\u1fb6","\u1fb7"],"\u1fbe",["\u1fc2","\u1fc4"],["\u1fc6","\u1fc7"],["\u1fd0","\u1fd3"],["\u1fd6","\u1fd7"],["\u1fe0","\u1fe7"],["\u1ff2","\u1ff4"],["\u1ff6","\u1ff7"],"\u210a",["\u210e","\u210f"],"\u2113","\u212f","\u2134","\u2139",["\u213c","\u213d"],["\u2146","\u2149"],"\u214e","\u2184",["\u2c30","\u2c5e"],"\u2c61",["\u2c65","\u2c66"],"\u2c68","\u2c6a","\u2c6c","\u2c71",["\u2c73","\u2c74"],["\u2c76","\u2c7b"],"\u2c81","\u2c83","\u2c85","\u2c87","\u2c89","\u2c8b","\u2c8d","\u2c8f","\u2c91","\u2c93","\u2c95","\u2c97","\u2c99","\u2c9b","\u2c9d","\u2c9f","\u2ca1","\u2ca3","\u2ca5","\u2ca7","\u2ca9","\u2cab","\u2cad","\u2caf","\u2cb1","\u2cb3","\u2cb5","\u2cb7","\u2cb9","\u2cbb","\u2cbd","\u2cbf","\u2cc1","\u2cc3","\u2cc5","\u2cc7","\u2cc9","\u2ccb","\u2ccd","\u2ccf","\u2cd1","\u2cd3","\u2cd5","\u2cd7","\u2cd9","\u2cdb","\u2cdd","\u2cdf","\u2ce1",["\u2ce3","\u2ce4"],"\u2cec","\u2cee","\u2cf3",["\u2d00","\u2d25"],"\u2d27","\u2d2d","\ua641","\ua643","\ua645","\ua647","\ua649","\ua64b","\ua64d","\ua64f","\ua651","\ua653","\ua655","\ua657","\ua659","\ua65b","\ua65d","\ua65f","\ua661","\ua663","\ua665","\ua667","\ua669","\ua66b","\ua66d","\ua681","\ua683","\ua685","\ua687","\ua689","\ua68b","\ua68d","\ua68f","\ua691","\ua693","\ua695","\ua697","\ua699","\ua69b","\ua723","\ua725","\ua727","\ua729","\ua72b","\ua72d",["\ua72f","\ua731"],"\ua733","\ua735","\ua737","\ua739","\ua73b","\ua73d","\ua73f","\ua741","\ua743","\ua745","\ua747","\ua749","\ua74b","\ua74d","\ua74f","\ua751","\ua753","\ua755","\ua757","\ua759","\ua75b","\ua75d","\ua75f","\ua761","\ua763","\ua765","\ua767","\ua769","\ua76b","\ua76d","\ua76f",["\ua771","\ua778"],"\ua77a","\ua77c","\ua77f","\ua781","\ua783","\ua785","\ua787","\ua78c","\ua78e","\ua791",["\ua793","\ua795"],"\ua797","\ua799","\ua79b","\ua79d","\ua79f","\ua7a1","\ua7a3","\ua7a5","\ua7a7","\ua7a9","\ua7b5","\ua7b7","\ua7fa",["\uab30","\uab5a"],["\uab60","\uab65"],["\uab70","\uabbf"],["\ufb00","\ufb06"],["\ufb13","\ufb17"],["\uff41","\uff5a"]],!1,!1),Rt=Xt([["\u02b0","\u02c1"],["\u02c6","\u02d1"],["\u02e0","\u02e4"],"\u02ec","\u02ee","\u0374","\u037a","\u0559","\u0640",["\u06e5","\u06e6"],["\u07f4","\u07f5"],"\u07fa","\u081a","\u0824","\u0828","\u0971","\u0e46","\u0ec6","\u10fc","\u17d7","\u1843","\u1aa7",["\u1c78","\u1c7d"],["\u1d2c","\u1d6a"],"\u1d78",["\u1d9b","\u1dbf"],"\u2071","\u207f",["\u2090","\u209c"],["\u2c7c","\u2c7d"],"\u2d6f","\u2e2f","\u3005",["\u3031","\u3035"],"\u303b",["\u309d","\u309e"],["\u30fc","\u30fe"],"\ua015",["\ua4f8","\ua4fd"],"\ua60c","\ua67f",["\ua69c","\ua69d"],["\ua717","\ua71f"],"\ua770","\ua788",["\ua7f8","\ua7f9"],"\ua9cf","\ua9e6","\uaa70","\uaadd",["\uaaf3","\uaaf4"],["\uab5c","\uab5f"],"\uff70",["\uff9e","\uff9f"]],!1,!1),Lt=Xt(["\xaa","\xba","\u01bb",["\u01c0","\u01c3"],"\u0294",["\u05d0","\u05ea"],["\u05f0","\u05f2"],["\u0620","\u063f"],["\u0641","\u064a"],["\u066e","\u066f"],["\u0671","\u06d3"],"\u06d5",["\u06ee","\u06ef"],["\u06fa","\u06fc"],"\u06ff","\u0710",["\u0712","\u072f"],["\u074d","\u07a5"],"\u07b1",["\u07ca","\u07ea"],["\u0800","\u0815"],["\u0840","\u0858"],["\u08a0","\u08b4"],["\u0904","\u0939"],"\u093d","\u0950",["\u0958","\u0961"],["\u0972","\u0980"],["\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"],"\u0af9",["\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","\u0c39"],"\u0c3d",["\u0c58","\u0c5a"],["\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",["\u0d5f","\u0d61"],["\u0d7a","\u0d7f"],["\u0d85","\u0d96"],["\u0d9a","\u0db1"],["\u0db3","\u0dbb"],"\u0dbd",["\u0dc0","\u0dc6"],["\u0e01","\u0e30"],["\u0e32","\u0e33"],["\u0e40","\u0e45"],["\u0e81","\u0e82"],"\u0e84",["\u0e87","\u0e88"],"\u0e8a","\u0e8d",["\u0e94","\u0e97"],["\u0e99","\u0e9f"],["\u0ea1","\u0ea3"],"\u0ea5","\u0ea7",["\u0eaa","\u0eab"],["\u0ead","\u0eb0"],["\u0eb2","\u0eb3"],"\u0ebd",["\u0ec0","\u0ec4"],["\u0edc","\u0edf"],"\u0f00",["\u0f40","\u0f47"],["\u0f49","\u0f6c"],["\u0f88","\u0f8c"],["\u1000","\u102a"],"\u103f",["\u1050","\u1055"],["\u105a","\u105d"],"\u1061",["\u1065","\u1066"],["\u106e","\u1070"],["\u1075","\u1081"],"\u108e",["\u10d0","\u10fa"],["\u10fd","\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"],["\u1401","\u166c"],["\u166f","\u167f"],["\u1681","\u169a"],["\u16a0","\u16ea"],["\u16f1","\u16f8"],["\u1700","\u170c"],["\u170e","\u1711"],["\u1720","\u1731"],["\u1740","\u1751"],["\u1760","\u176c"],["\u176e","\u1770"],["\u1780","\u17b3"],"\u17dc",["\u1820","\u1842"],["\u1844","\u1877"],["\u1880","\u18a8"],"\u18aa",["\u18b0","\u18f5"],["\u1900","\u191e"],["\u1950","\u196d"],["\u1970","\u1974"],["\u1980","\u19ab"],["\u19b0","\u19c9"],["\u1a00","\u1a16"],["\u1a20","\u1a54"],["\u1b05","\u1b33"],["\u1b45","\u1b4b"],["\u1b83","\u1ba0"],["\u1bae","\u1baf"],["\u1bba","\u1be5"],["\u1c00","\u1c23"],["\u1c4d","\u1c4f"],["\u1c5a","\u1c77"],["\u1ce9","\u1cec"],["\u1cee","\u1cf1"],["\u1cf5","\u1cf6"],["\u2135","\u2138"],["\u2d30","\u2d67"],["\u2d80","\u2d96"],["\u2da0","\u2da6"],["\u2da8","\u2dae"],["\u2db0","\u2db6"],["\u2db8","\u2dbe"],["\u2dc0","\u2dc6"],["\u2dc8","\u2dce"],["\u2dd0","\u2dd6"],["\u2dd8","\u2dde"],"\u3006","\u303c",["\u3041","\u3096"],"\u309f",["\u30a1","\u30fa"],"\u30ff",["\u3105","\u312d"],["\u3131","\u318e"],["\u31a0","\u31ba"],["\u31f0","\u31ff"],["\u3400","\u4db5"],["\u4e00","\u9fd5"],["\ua000","\ua014"],["\ua016","\ua48c"],["\ua4d0","\ua4f7"],["\ua500","\ua60b"],["\ua610","\ua61f"],["\ua62a","\ua62b"],"\ua66e",["\ua6a0","\ua6e5"],"\ua78f","\ua7f7",["\ua7fb","\ua801"],["\ua803","\ua805"],["\ua807","\ua80a"],["\ua80c","\ua822"],["\ua840","\ua873"],["\ua882","\ua8b3"],["\ua8f2","\ua8f7"],"\ua8fb","\ua8fd",["\ua90a","\ua925"],["\ua930","\ua946"],["\ua960","\ua97c"],["\ua984","\ua9b2"],["\ua9e0","\ua9e4"],["\ua9e7","\ua9ef"],["\ua9fa","\ua9fe"],["\uaa00","\uaa28"],["\uaa40","\uaa42"],["\uaa44","\uaa4b"],["\uaa60","\uaa6f"],["\uaa71","\uaa76"],"\uaa7a",["\uaa7e","\uaaaf"],"\uaab1",["\uaab5","\uaab6"],["\uaab9","\uaabd"],"\uaac0","\uaac2",["\uaadb","\uaadc"],["\uaae0","\uaaea"],"\uaaf2",["\uab01","\uab06"],["\uab09","\uab0e"],["\uab11","\uab16"],["\uab20","\uab26"],["\uab28","\uab2e"],["\uabc0","\uabe2"],["\uac00","\ud7a3"],["\ud7b0","\ud7c6"],["\ud7cb","\ud7fb"],["\uf900","\ufa6d"],["\ufa70","\ufad9"],"\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"],["\uff66","\uff6f"],["\uff71","\uff9d"],["\uffa0","\uffbe"],["\uffc2","\uffc7"],["\uffca","\uffcf"],["\uffd2","\uffd7"],["\uffda","\uffdc"]],!1,!1),Tt=Xt(["\u01c5","\u01c8","\u01cb","\u01f2",["\u1f88","\u1f8f"],["\u1f98","\u1f9f"],["\u1fa8","\u1faf"],"\u1fbc","\u1fcc","\u1ffc"],!1,!1),It=Xt([["A","Z"],["\xc0","\xd6"],["\xd8","\xde"],"\u0100","\u0102","\u0104","\u0106","\u0108","\u010a","\u010c","\u010e","\u0110","\u0112","\u0114","\u0116","\u0118","\u011a","\u011c","\u011e","\u0120","\u0122","\u0124","\u0126","\u0128","\u012a","\u012c","\u012e","\u0130","\u0132","\u0134","\u0136","\u0139","\u013b","\u013d","\u013f","\u0141","\u0143","\u0145","\u0147","\u014a","\u014c","\u014e","\u0150","\u0152","\u0154","\u0156","\u0158","\u015a","\u015c","\u015e","\u0160","\u0162","\u0164","\u0166","\u0168","\u016a","\u016c","\u016e","\u0170","\u0172","\u0174","\u0176",["\u0178","\u0179"],"\u017b","\u017d",["\u0181","\u0182"],"\u0184",["\u0186","\u0187"],["\u0189","\u018b"],["\u018e","\u0191"],["\u0193","\u0194"],["\u0196","\u0198"],["\u019c","\u019d"],["\u019f","\u01a0"],"\u01a2","\u01a4",["\u01a6","\u01a7"],"\u01a9","\u01ac",["\u01ae","\u01af"],["\u01b1","\u01b3"],"\u01b5",["\u01b7","\u01b8"],"\u01bc","\u01c4","\u01c7","\u01ca","\u01cd","\u01cf","\u01d1","\u01d3","\u01d5","\u01d7","\u01d9","\u01db","\u01de","\u01e0","\u01e2","\u01e4","\u01e6","\u01e8","\u01ea","\u01ec","\u01ee","\u01f1","\u01f4",["\u01f6","\u01f8"],"\u01fa","\u01fc","\u01fe","\u0200","\u0202","\u0204","\u0206","\u0208","\u020a","\u020c","\u020e","\u0210","\u0212","\u0214","\u0216","\u0218","\u021a","\u021c","\u021e","\u0220","\u0222","\u0224","\u0226","\u0228","\u022a","\u022c","\u022e","\u0230","\u0232",["\u023a","\u023b"],["\u023d","\u023e"],"\u0241",["\u0243","\u0246"],"\u0248","\u024a","\u024c","\u024e","\u0370","\u0372","\u0376","\u037f","\u0386",["\u0388","\u038a"],"\u038c",["\u038e","\u038f"],["\u0391","\u03a1"],["\u03a3","\u03ab"],"\u03cf",["\u03d2","\u03d4"],"\u03d8","\u03da","\u03dc","\u03de","\u03e0","\u03e2","\u03e4","\u03e6","\u03e8","\u03ea","\u03ec","\u03ee","\u03f4","\u03f7",["\u03f9","\u03fa"],["\u03fd","\u042f"],"\u0460","\u0462","\u0464","\u0466","\u0468","\u046a","\u046c","\u046e","\u0470","\u0472","\u0474","\u0476","\u0478","\u047a","\u047c","\u047e","\u0480","\u048a","\u048c","\u048e","\u0490","\u0492","\u0494","\u0496","\u0498","\u049a","\u049c","\u049e","\u04a0","\u04a2","\u04a4","\u04a6","\u04a8","\u04aa","\u04ac","\u04ae","\u04b0","\u04b2","\u04b4","\u04b6","\u04b8","\u04ba","\u04bc","\u04be",["\u04c0","\u04c1"],"\u04c3","\u04c5","\u04c7","\u04c9","\u04cb","\u04cd","\u04d0","\u04d2","\u04d4","\u04d6","\u04d8","\u04da","\u04dc","\u04de","\u04e0","\u04e2","\u04e4","\u04e6","\u04e8","\u04ea","\u04ec","\u04ee","\u04f0","\u04f2","\u04f4","\u04f6","\u04f8","\u04fa","\u04fc","\u04fe","\u0500","\u0502","\u0504","\u0506","\u0508","\u050a","\u050c","\u050e","\u0510","\u0512","\u0514","\u0516","\u0518","\u051a","\u051c","\u051e","\u0520","\u0522","\u0524","\u0526","\u0528","\u052a","\u052c","\u052e",["\u0531","\u0556"],["\u10a0","\u10c5"],"\u10c7","\u10cd",["\u13a0","\u13f5"],"\u1e00","\u1e02","\u1e04","\u1e06","\u1e08","\u1e0a","\u1e0c","\u1e0e","\u1e10","\u1e12","\u1e14","\u1e16","\u1e18","\u1e1a","\u1e1c","\u1e1e","\u1e20","\u1e22","\u1e24","\u1e26","\u1e28","\u1e2a","\u1e2c","\u1e2e","\u1e30","\u1e32","\u1e34","\u1e36","\u1e38","\u1e3a","\u1e3c","\u1e3e","\u1e40","\u1e42","\u1e44","\u1e46","\u1e48","\u1e4a","\u1e4c","\u1e4e","\u1e50","\u1e52","\u1e54","\u1e56","\u1e58","\u1e5a","\u1e5c","\u1e5e","\u1e60","\u1e62","\u1e64","\u1e66","\u1e68","\u1e6a","\u1e6c","\u1e6e","\u1e70","\u1e72","\u1e74","\u1e76","\u1e78","\u1e7a","\u1e7c","\u1e7e","\u1e80","\u1e82","\u1e84","\u1e86","\u1e88","\u1e8a","\u1e8c","\u1e8e","\u1e90","\u1e92","\u1e94","\u1e9e","\u1ea0","\u1ea2","\u1ea4","\u1ea6","\u1ea8","\u1eaa","\u1eac","\u1eae","\u1eb0","\u1eb2","\u1eb4","\u1eb6","\u1eb8","\u1eba","\u1ebc","\u1ebe","\u1ec0","\u1ec2","\u1ec4","\u1ec6","\u1ec8","\u1eca","\u1ecc","\u1ece","\u1ed0","\u1ed2","\u1ed4","\u1ed6","\u1ed8","\u1eda","\u1edc","\u1ede","\u1ee0","\u1ee2","\u1ee4","\u1ee6","\u1ee8","\u1eea","\u1eec","\u1eee","\u1ef0","\u1ef2","\u1ef4","\u1ef6","\u1ef8","\u1efa","\u1efc","\u1efe",["\u1f08","\u1f0f"],["\u1f18","\u1f1d"],["\u1f28","\u1f2f"],["\u1f38","\u1f3f"],["\u1f48","\u1f4d"],"\u1f59","\u1f5b","\u1f5d","\u1f5f",["\u1f68","\u1f6f"],["\u1fb8","\u1fbb"],["\u1fc8","\u1fcb"],["\u1fd8","\u1fdb"],["\u1fe8","\u1fec"],["\u1ff8","\u1ffb"],"\u2102","\u2107",["\u210b","\u210d"],["\u2110","\u2112"],"\u2115",["\u2119","\u211d"],"\u2124","\u2126","\u2128",["\u212a","\u212d"],["\u2130","\u2133"],["\u213e","\u213f"],"\u2145","\u2183",["\u2c00","\u2c2e"],"\u2c60",["\u2c62","\u2c64"],"\u2c67","\u2c69","\u2c6b",["\u2c6d","\u2c70"],"\u2c72","\u2c75",["\u2c7e","\u2c80"],"\u2c82","\u2c84","\u2c86","\u2c88","\u2c8a","\u2c8c","\u2c8e","\u2c90","\u2c92","\u2c94","\u2c96","\u2c98","\u2c9a","\u2c9c","\u2c9e","\u2ca0","\u2ca2","\u2ca4","\u2ca6","\u2ca8","\u2caa","\u2cac","\u2cae","\u2cb0","\u2cb2","\u2cb4","\u2cb6","\u2cb8","\u2cba","\u2cbc","\u2cbe","\u2cc0","\u2cc2","\u2cc4","\u2cc6","\u2cc8","\u2cca","\u2ccc","\u2cce","\u2cd0","\u2cd2","\u2cd4","\u2cd6","\u2cd8","\u2cda","\u2cdc","\u2cde","\u2ce0","\u2ce2","\u2ceb","\u2ced","\u2cf2","\ua640","\ua642","\ua644","\ua646","\ua648","\ua64a","\ua64c","\ua64e","\ua650","\ua652","\ua654","\ua656","\ua658","\ua65a","\ua65c","\ua65e","\ua660","\ua662","\ua664","\ua666","\ua668","\ua66a","\ua66c","\ua680","\ua682","\ua684","\ua686","\ua688","\ua68a","\ua68c","\ua68e","\ua690","\ua692","\ua694","\ua696","\ua698","\ua69a","\ua722","\ua724","\ua726","\ua728","\ua72a","\ua72c","\ua72e","\ua732","\ua734","\ua736","\ua738","\ua73a","\ua73c","\ua73e","\ua740","\ua742","\ua744","\ua746","\ua748","\ua74a","\ua74c","\ua74e","\ua750","\ua752","\ua754","\ua756","\ua758","\ua75a","\ua75c","\ua75e","\ua760","\ua762","\ua764","\ua766","\ua768","\ua76a","\ua76c","\ua76e","\ua779","\ua77b",["\ua77d","\ua77e"],"\ua780","\ua782","\ua784","\ua786","\ua78b","\ua78d","\ua790","\ua792","\ua796","\ua798","\ua79a","\ua79c","\ua79e","\ua7a0","\ua7a2","\ua7a4","\ua7a6","\ua7a8",["\ua7aa","\ua7ad"],["\ua7b0","\ua7b4"],"\ua7b6",["\uff21","\uff3a"]],!1,!1),kt=Xt(["\u0903","\u093b",["\u093e","\u0940"],["\u0949","\u094c"],["\u094e","\u094f"],["\u0982","\u0983"],["\u09be","\u09c0"],["\u09c7","\u09c8"],["\u09cb","\u09cc"],"\u09d7","\u0a03",["\u0a3e","\u0a40"],"\u0a83",["\u0abe","\u0ac0"],"\u0ac9",["\u0acb","\u0acc"],["\u0b02","\u0b03"],"\u0b3e","\u0b40",["\u0b47","\u0b48"],["\u0b4b","\u0b4c"],"\u0b57",["\u0bbe","\u0bbf"],["\u0bc1","\u0bc2"],["\u0bc6","\u0bc8"],["\u0bca","\u0bcc"],"\u0bd7",["\u0c01","\u0c03"],["\u0c41","\u0c44"],["\u0c82","\u0c83"],"\u0cbe",["\u0cc0","\u0cc4"],["\u0cc7","\u0cc8"],["\u0cca","\u0ccb"],["\u0cd5","\u0cd6"],["\u0d02","\u0d03"],["\u0d3e","\u0d40"],["\u0d46","\u0d48"],["\u0d4a","\u0d4c"],"\u0d57",["\u0d82","\u0d83"],["\u0dcf","\u0dd1"],["\u0dd8","\u0ddf"],["\u0df2","\u0df3"],["\u0f3e","\u0f3f"],"\u0f7f",["\u102b","\u102c"],"\u1031","\u1038",["\u103b","\u103c"],["\u1056","\u1057"],["\u1062","\u1064"],["\u1067","\u106d"],["\u1083","\u1084"],["\u1087","\u108c"],"\u108f",["\u109a","\u109c"],"\u17b6",["\u17be","\u17c5"],["\u17c7","\u17c8"],["\u1923","\u1926"],["\u1929","\u192b"],["\u1930","\u1931"],["\u1933","\u1938"],["\u1a19","\u1a1a"],"\u1a55","\u1a57","\u1a61",["\u1a63","\u1a64"],["\u1a6d","\u1a72"],"\u1b04","\u1b35","\u1b3b",["\u1b3d","\u1b41"],["\u1b43","\u1b44"],"\u1b82","\u1ba1",["\u1ba6","\u1ba7"],"\u1baa","\u1be7",["\u1bea","\u1bec"],"\u1bee",["\u1bf2","\u1bf3"],["\u1c24","\u1c2b"],["\u1c34","\u1c35"],"\u1ce1",["\u1cf2","\u1cf3"],["\u302e","\u302f"],["\ua823","\ua824"],"\ua827",["\ua880","\ua881"],["\ua8b4","\ua8c3"],["\ua952","\ua953"],"\ua983",["\ua9b4","\ua9b5"],["\ua9ba","\ua9bb"],["\ua9bd","\ua9c0"],["\uaa2f","\uaa30"],["\uaa33","\uaa34"],"\uaa4d","\uaa7b","\uaa7d","\uaaeb",["\uaaee","\uaaef"],"\uaaf5",["\uabe3","\uabe4"],["\uabe6","\uabe7"],["\uabe9","\uabea"],"\uabec"],!1,!1),jt=Xt([["\u0300","\u036f"],["\u0483","\u0487"],["\u0591","\u05bd"],"\u05bf",["\u05c1","\u05c2"],["\u05c4","\u05c5"],"\u05c7",["\u0610","\u061a"],["\u064b","\u065f"],"\u0670",["\u06d6","\u06dc"],["\u06df","\u06e4"],["\u06e7","\u06e8"],["\u06ea","\u06ed"],"\u0711",["\u0730","\u074a"],["\u07a6","\u07b0"],["\u07eb","\u07f3"],["\u0816","\u0819"],["\u081b","\u0823"],["\u0825","\u0827"],["\u0829","\u082d"],["\u0859","\u085b"],["\u08e3","\u0902"],"\u093a","\u093c",["\u0941","\u0948"],"\u094d",["\u0951","\u0957"],["\u0962","\u0963"],"\u0981","\u09bc",["\u09c1","\u09c4"],"\u09cd",["\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","\u0b3f",["\u0b41","\u0b44"],"\u0b4d","\u0b56",["\u0b62","\u0b63"],"\u0b82","\u0bc0","\u0bcd","\u0c00",["\u0c3e","\u0c40"],["\u0c46","\u0c48"],["\u0c4a","\u0c4d"],["\u0c55","\u0c56"],["\u0c62","\u0c63"],"\u0c81","\u0cbc","\u0cbf","\u0cc6",["\u0ccc","\u0ccd"],["\u0ce2","\u0ce3"],"\u0d01",["\u0d41","\u0d44"],"\u0d4d",["\u0d62","\u0d63"],"\u0dca",["\u0dd2","\u0dd4"],"\u0dd6","\u0e31",["\u0e34","\u0e3a"],["\u0e47","\u0e4e"],"\u0eb1",["\u0eb4","\u0eb9"],["\u0ebb","\u0ebc"],["\u0ec8","\u0ecd"],["\u0f18","\u0f19"],"\u0f35","\u0f37","\u0f39",["\u0f71","\u0f7e"],["\u0f80","\u0f84"],["\u0f86","\u0f87"],["\u0f8d","\u0f97"],["\u0f99","\u0fbc"],"\u0fc6",["\u102d","\u1030"],["\u1032","\u1037"],["\u1039","\u103a"],["\u103d","\u103e"],["\u1058","\u1059"],["\u105e","\u1060"],["\u1071","\u1074"],"\u1082",["\u1085","\u1086"],"\u108d","\u109d",["\u135d","\u135f"],["\u1712","\u1714"],["\u1732","\u1734"],["\u1752","\u1753"],["\u1772","\u1773"],["\u17b4","\u17b5"],["\u17b7","\u17bd"],"\u17c6",["\u17c9","\u17d3"],"\u17dd",["\u180b","\u180d"],"\u18a9",["\u1920","\u1922"],["\u1927","\u1928"],"\u1932",["\u1939","\u193b"],["\u1a17","\u1a18"],"\u1a1b","\u1a56",["\u1a58","\u1a5e"],"\u1a60","\u1a62",["\u1a65","\u1a6c"],["\u1a73","\u1a7c"],"\u1a7f",["\u1ab0","\u1abd"],["\u1b00","\u1b03"],"\u1b34",["\u1b36","\u1b3a"],"\u1b3c","\u1b42",["\u1b6b","\u1b73"],["\u1b80","\u1b81"],["\u1ba2","\u1ba5"],["\u1ba8","\u1ba9"],["\u1bab","\u1bad"],"\u1be6",["\u1be8","\u1be9"],"\u1bed",["\u1bef","\u1bf1"],["\u1c2c","\u1c33"],["\u1c36","\u1c37"],["\u1cd0","\u1cd2"],["\u1cd4","\u1ce0"],["\u1ce2","\u1ce8"],"\u1ced","\u1cf4",["\u1cf8","\u1cf9"],["\u1dc0","\u1df5"],["\u1dfc","\u1dff"],["\u20d0","\u20dc"],"\u20e1",["\u20e5","\u20f0"],["\u2cef","\u2cf1"],"\u2d7f",["\u2de0","\u2dff"],["\u302a","\u302d"],["\u3099","\u309a"],"\ua66f",["\ua674","\ua67d"],["\ua69e","\ua69f"],["\ua6f0","\ua6f1"],"\ua802","\ua806","\ua80b",["\ua825","\ua826"],"\ua8c4",["\ua8e0","\ua8f1"],["\ua926","\ua92d"],["\ua947","\ua951"],["\ua980","\ua982"],"\ua9b3",["\ua9b6","\ua9b9"],"\ua9bc","\ua9e5",["\uaa29","\uaa2e"],["\uaa31","\uaa32"],["\uaa35","\uaa36"],"\uaa43","\uaa4c","\uaa7c","\uaab0",["\uaab2","\uaab4"],["\uaab7","\uaab8"],["\uaabe","\uaabf"],"\uaac1",["\uaaec","\uaaed"],"\uaaf6","\uabe5","\uabe8","\uabed","\ufb1e",["\ufe00","\ufe0f"],["\ufe20","\ufe2f"]],!1,!1),Dt=Xt([["0","9"],["\u0660","\u0669"],["\u06f0","\u06f9"],["\u07c0","\u07c9"],["\u0966","\u096f"],["\u09e6","\u09ef"],["\u0a66","\u0a6f"],["\u0ae6","\u0aef"],["\u0b66","\u0b6f"],["\u0be6","\u0bef"],["\u0c66","\u0c6f"],["\u0ce6","\u0cef"],["\u0d66","\u0d6f"],["\u0de6","\u0def"],["\u0e50","\u0e59"],["\u0ed0","\u0ed9"],["\u0f20","\u0f29"],["\u1040","\u1049"],["\u1090","\u1099"],["\u17e0","\u17e9"],["\u1810","\u1819"],["\u1946","\u194f"],["\u19d0","\u19d9"],["\u1a80","\u1a89"],["\u1a90","\u1a99"],["\u1b50","\u1b59"],["\u1bb0","\u1bb9"],["\u1c40","\u1c49"],["\u1c50","\u1c59"],["\ua620","\ua629"],["\ua8d0","\ua8d9"],["\ua900","\ua909"],["\ua9d0","\ua9d9"],["\ua9f0","\ua9f9"],["\uaa50","\uaa59"],["\uabf0","\uabf9"],["\uff10","\uff19"]],!1,!1),Nt=Xt([["\u16ee","\u16f0"],["\u2160","\u2182"],["\u2185","\u2188"],"\u3007",["\u3021","\u3029"],["\u3038","\u303a"],["\ua6e6","\ua6ef"]],!1,!1),Bt=Xt(["_",["\u203f","\u2040"],"\u2054",["\ufe33","\ufe34"],["\ufe4d","\ufe4f"],"\uff3f"],!1,!1),Mt=Xt([" ","\xa0","\u1680",["\u2000","\u200a"],"\u202f","\u205f","\u3000"],!1,!1),Ut=Jt(";",!1),Gt=0,Ht=0,qt=[{line:1,column:1}],Yt=0,Kt=[],zt=0;if("startRule"in e){if(!(e.startRule in a))throw new Error("Can't start parsing from rule \""+e.startRule+'".');i=a[e.startRule]}function Wt(){return te(Ht,Gt)}function Vt(t,e){throw function(t,e){return new peg$SyntaxError(t,null,null,e)}(t,e=void 0!==e?e:te(Ht,Gt))}function Jt(t,e){return{type:"literal",text:t,ignoreCase:e}}function Xt(t,e,r){return{type:"class",parts:t,inverted:e,ignoreCase:r}}function Qt(t){return{type:"other",description:t}}function Zt(e){var r,n=qt[e];if(n)return n;for(r=e-1;!qt[r];)r--;for(n={line:(n=qt[r]).line,column:n.column};r<e;)10===t.charCodeAt(r)?(n.line++,n.column=1):n.column++,r++;return qt[e]=n,n}function te(t,e){var r=Zt(t),n=Zt(e);return{source:o,start:{offset:t,line:r.line,column:r.column},end:{offset:e,line:n.line,column:n.column}}}function ee(t){Gt<Yt||(Gt>Yt&&(Yt=Gt,Kt=[]),Kt.push(t))}function re(){var e,r,o,a,i,u;if(e=Gt,Te(),r=Gt,(o=function(){var e,r,o,a;return e=Gt,123===t.charCodeAt(Gt)?(r="{",Gt++):(r=n,0===zt&&ee(E)),r!==n&&(o=Le())!==n?(125===t.charCodeAt(Gt)?(a="}",Gt++):(a=n,0===zt&&ee(w)),a!==n&&Ie()!==n?(Ht=e,e=function(t){return{type:"top_level_initializer",code:t[0],codeLocation:t[1],location:Wt()}}(o)):(Gt=e,e=n)):(Gt=e,e=n),e}())!==n?(a=Te(),r=o):(Gt=r,r=n),r===n&&(r=null),o=Gt,(a=function(){var t,e;return t=Gt,(e=Le())!==n&&Ie()!==n?(Ht=t,t=function(t){return{type:"initializer",code:t[0],codeLocation:t[1],location:Wt()}}(e)):(Gt=t,t=n),t}())!==n?(i=Te(),o=a):(Gt=o,o=n),o===n&&(o=null),a=[],i=Gt,(u=ne())!==n?(Te(),i=u):(Gt=i,i=n),i!==n)for(;i!==n;)a.push(i),i=Gt,(u=ne())!==n?(Te(),i=u):(Gt=i,i=n);else a=n;return a!==n?(Ht=e,e={type:"grammar",topLevelInitializer:r,initializer:o,rules:a,location:Wt()}):(Gt=e,e=n),e}function ne(){var e,r,o,a,i,u,s,c;return e=Gt,(r=ge())!==n?(Te(),o=Gt,(a=Ae())!==n?(Te(),o=a):(Gt=o,o=n),o===n&&(o=null),61===t.charCodeAt(Gt)?(a="=",Gt++):(a=n,0===zt&&ee(C)),a!==n?(Te(),(i=oe())!==n&&Ie()!==n?(Ht=e,s=o,c=i,e={type:"rule",name:(u=r)[0],nameLocation:u[1],expression:null!==s?{type:"named",name:s,expression:c,location:Wt()}:c,location:Wt()}):(Gt=e,e=n)):(Gt=e,e=n)):(Gt=e,e=n),e}function oe(){var e,r,o,a,i,u,s,c;if(e=Gt,(r=ae())!==n){for(o=[],a=Gt,Te(),47===t.charCodeAt(Gt)?(i="/",Gt++):(i=n,0===zt&&ee(S)),i!==n?(Te(),(u=ae())!==n?a=u:(Gt=a,a=n)):(Gt=a,a=n);a!==n;)o.push(a),a=Gt,Te(),47===t.charCodeAt(Gt)?(i="/",Gt++):(i=n,0===zt&&ee(S)),i!==n?(Te(),(u=ae())!==n?a=u:(Gt=a,a=n)):(Gt=a,a=n);Ht=e,s=r,e=(c=o).length>0?{type:"choice",alternatives:[s].concat(c),location:Wt()}:s}else Gt=e,e=n;return e}function ae(){var t,e,r,o;return t=Gt,(e=function(){var t,e,r,o,a,i,u;if(t=Gt,(e=ie())!==n){for(r=[],o=Gt,Te(),(a=ie())!==n?o=a:(Gt=o,o=n);o!==n;)r.push(o),o=Gt,Te(),(a=ie())!==n?o=a:(Gt=o,o=n);Ht=t,i=e,t=(u=r).length>0||"labeled"===i.type&&i.pick?{type:"sequence",elements:[i].concat(u),location:Wt()}:i}else Gt=t,t=n;return t}())!==n?(r=Gt,Te(),(o=Le())!==n?r=o:(Gt=r,r=n),r===n&&(r=null),Ht=t,t=function(t,e){return null!==e?{type:"action",expression:t,code:e[0],codeLocation:e[1],location:Wt()}:t}(e,r)):(Gt=t,t=n),t}function ie(){var e,r,o,a,i,u,s;return e=Gt,(r=function(){var e,r;return e=Gt,64===t.charCodeAt(Gt)?(r="@",Gt++):(r=n,0===zt&&ee(x)),r!==n&&(Ht=e,r=Wt()),r}())!==n?((o=ue())===n&&(o=null),(a=se())!==n?(Ht=e,i=r,u=o,(s=a).type.startsWith("semantic_")&&Vt('"@" cannot be used on a semantic predicate',i),e={type:"labeled",label:null!==u?u[0]:null,labelLocation:null!==u?u[1]:i,pick:!0,expression:s,location:Wt()}):(Gt=e,e=n)):(Gt=e,e=n),e===n&&(e=Gt,(r=ue())!==n?(o=Te(),(a=se())!==n?(Ht=e,e=function(t,e){return{type:"labeled",label:t[0],labelLocation:t[1],expression:e,location:Wt()}}(r,a)):(Gt=e,e=n)):(Gt=e,e=n),e===n&&(e=se())),e}function ue(){var e,r,o,a;return e=Gt,(r=ge())!==n?(Te(),58===t.charCodeAt(Gt)?(o=":",Gt++):(o=n,0===zt&&ee($)),o!==n?(Ht=e,a=r,ke.indexOf(a[0])>=0&&Vt(`Label can't be a reserved word "${a[0]}"`,a[1]),e=a):(Gt=e,e=n)):(Gt=e,e=n),e}function se(){var e,r,o,a;return e=Gt,(r=function(){var e;return 36===t.charCodeAt(Gt)?(e="$",Gt++):(e=n,0===zt&&ee(O)),e===n&&(38===t.charCodeAt(Gt)?(e="&",Gt++):(e=n,0===zt&&ee(P)),e===n&&(33===t.charCodeAt(Gt)?(e="!",Gt++):(e=n,0===zt&&ee(F)))),e}())!==n?(Te(),(o=ce())!==n?(Ht=e,a=o,e={type:OPS_TO_PREFIXED_TYPES[r],expression:a,location:Wt()}):(Gt=e,e=n)):(Gt=e,e=n),e===n&&(e=ce()),e}function ce(){var e,r,o,a;return e=Gt,(r=le())!==n?(Te(),(o=function(){var e;return 63===t.charCodeAt(Gt)?(e="?",Gt++):(e=n,0===zt&&ee(R)),e===n&&(42===t.charCodeAt(Gt)?(e="*",Gt++):(e=n,0===zt&&ee(L)),e===n&&(43===t.charCodeAt(Gt)?(e="+",Gt++):(e=n,0===zt&&ee(T)))),e}())!==n?(Ht=e,a=r,e={type:OPS_TO_SUFFIXED_TYPES[o],expression:a,location:Wt()}):(Gt=e,e=n)):(Gt=e,e=n),e===n&&(e=le()),e}function le(){var e,r,o,a,i;return(e=function(){var e,r,o;return zt++,e=Gt,(r=Ae())!==n?(105===t.charCodeAt(Gt)?(o="i",Gt++):(o=n,0===zt&&ee(ut)),o===n&&(o=null),Ht=e,e={type:"literal",value:r,ignoreCase:null!==o,location:Wt()}):(Gt=e,e=n),zt--,e===n&&(r=n,0===zt&&ee(it)),e}())===n&&(e=function(){var e,r,o,a,i,u,s,c;if(zt++,e=Gt,91===t.charCodeAt(Gt)?(r="[",Gt++):(r=n,0===zt&&ee(ft)),r!==n){for(94===t.charCodeAt(Gt)?(o="^",Gt++):(o=n,0===zt&&ee(_t)),o===n&&(o=null),a=[],(i=Ce())===n&&(i=Se());i!==n;)a.push(i),(i=Ce())===n&&(i=Se());93===t.charCodeAt(Gt)?(i="]",Gt++):(i=n,0===zt&&ee(ht)),i!==n?(105===t.charCodeAt(Gt)?(u="i",Gt++):(u=n,0===zt&&ee(ut)),u===n&&(u=null),Ht=e,s=o,c=u,e={type:"class",parts:a.filter(t=>""!==t),inverted:null!==s,ignoreCase:null!==c,location:Wt()}):(Gt=e,e=n)}else Gt=e,e=n;return zt--,e===n&&(r=n,0===zt&&ee(pt)),e}())===n&&(e=function(){var e,r;return e=Gt,46===t.charCodeAt(Gt)?(r=".",Gt++):(r=n,0===zt&&ee($t)),r!==n&&(Ht=e,r={type:"any",location:Wt()}),r}())===n&&(e=function(){var e,r,o,a,i,u,s;return e=Gt,(r=ge())!==n?(o=Gt,zt++,a=Gt,i=Te(),u=Gt,(s=Ae())!==n?u=s=[s,Te()]:(Gt=u,u=n),u===n&&(u=null),61===t.charCodeAt(Gt)?(s="=",Gt++):(s=n,0===zt&&ee(C)),s!==n?a=i=[i,u,s]:(Gt=a,a=n),zt--,a===n?o=void 0:(Gt=o,o=n),o!==n?(Ht=e,e={type:"rule_ref",name:r[0],location:Wt()}):(Gt=e,e=n)):(Gt=e,e=n),e}())===n&&(e=function(){var e,r,o;return e=Gt,(r=function(){var e;return 38===t.charCodeAt(Gt)?(e="&",Gt++):(e=n,0===zt&&ee(P)),e===n&&(33===t.charCodeAt(Gt)?(e="!",Gt++):(e=n,0===zt&&ee(F))),e}())!==n?(Te(),(o=Le())!==n?(Ht=e,e=function(t,e){return{type:OPS_TO_SEMANTIC_PREDICATE_TYPES[t],code:e[0],codeLocation:e[1],location:Wt()}}(r,o)):(Gt=e,e=n)):(Gt=e,e=n),e}())===n&&(e=Gt,40===t.charCodeAt(Gt)?(r="(",Gt++):(r=n,0===zt&&ee(I)),r!==n?(Te(),(o=oe())!==n?(Te(),41===t.charCodeAt(Gt)?(a=")",Gt++):(a=n,0===zt&&ee(k)),a!==n?(Ht=e,e="labeled"===(i=o).type||"sequence"===i.type?{type:"group",expression:i,location:Wt()}:i):(Gt=e,e=n)):(Gt=e,e=n)):(Gt=e,e=n)),e}function pe(){var e;return t.length>Gt?(e=t.charAt(Gt),Gt++):(e=n,0===zt&&ee(j)),e}function fe(){var e;return zt++,9===t.charCodeAt(Gt)?(e="\t",Gt++):(e=n,0===zt&&ee(N)),e===n&&(11===t.charCodeAt(Gt)?(e="\v",Gt++):(e=n,0===zt&&ee(B)),e===n&&(12===t.charCodeAt(Gt)?(e="\f",Gt++):(e=n,0===zt&&ee(M)),e===n&&(32===t.charCodeAt(Gt)?(e=" ",Gt++):(e=n,0===zt&&ee(U)),e===n&&(160===t.charCodeAt(Gt)?(e="\xa0",Gt++):(e=n,0===zt&&ee(G)),e===n&&(65279===t.charCodeAt(Gt)?(e="\ufeff",Gt++):(e=n,0===zt&&ee(H)),e===n&&(e=function(){var e;return A.test(t.charAt(Gt))?(e=t.charAt(Gt),Gt++):(e=n,0===zt&&ee(Mt)),e}())))))),zt--,e===n&&0===zt&&ee(D),e}function _e(){var e;return u.test(t.charAt(Gt))?(e=t.charAt(Gt),Gt++):(e=n,0===zt&&ee(q)),e}function he(){var e;return zt++,10===t.charCodeAt(Gt)?(e="\n",Gt++):(e=n,0===zt&&ee(K)),e===n&&("\r\n"===t.substr(Gt,2)?(e="\r\n",Gt+=2):(e=n,0===zt&&ee(z)),e===n&&(13===t.charCodeAt(Gt)?(e="\r",Gt++):(e=n,0===zt&&ee(W)),e===n&&(8232===t.charCodeAt(Gt)?(e="\u2028",Gt++):(e=n,0===zt&&ee(V)),e===n&&(8233===t.charCodeAt(Gt)?(e="\u2029",Gt++):(e=n,0===zt&&ee(J)))))),zt--,e===n&&0===zt&&ee(Y),e}function de(){var e;return zt++,(e=function(){var e,r,o,a,i,u;if(e=Gt,"/*"===t.substr(Gt,2)?(r="/*",Gt+=2):(r=n,0===zt&&ee(Q)),r!==n){for(o=[],a=Gt,i=Gt,zt++,"*/"===t.substr(Gt,2)?(u="*/",Gt+=2):(u=n,0===zt&&ee(Z)),zt--,u===n?i=void 0:(Gt=i,i=n),i!==n&&(u=pe())!==n?a=i=[i,u]:(Gt=a,a=n);a!==n;)o.push(a),a=Gt,i=Gt,zt++,"*/"===t.substr(Gt,2)?(u="*/",Gt+=2):(u=n,0===zt&&ee(Z)),zt--,u===n?i=void 0:(Gt=i,i=n),i!==n&&(u=pe())!==n?a=i=[i,u]:(Gt=a,a=n);"*/"===t.substr(Gt,2)?(a="*/",Gt+=2):(a=n,0===zt&&ee(Z)),a!==n?e=r=[r,o,a]:(Gt=e,e=n)}else Gt=e,e=n;return e}())===n&&(e=ve()),zt--,e===n&&0===zt&&ee(X),e}function ye(){var e,r,o,a,i,u;if(e=Gt,"/*"===t.substr(Gt,2)?(r="/*",Gt+=2):(r=n,0===zt&&ee(Q)),r!==n){for(o=[],a=Gt,i=Gt,zt++,"*/"===t.substr(Gt,2)?(u="*/",Gt+=2):(u=n,0===zt&&ee(Z)),u===n&&(u=_e()),zt--,u===n?i=void 0:(Gt=i,i=n),i!==n&&(u=pe())!==n?a=i=[i,u]:(Gt=a,a=n);a!==n;)o.push(a),a=Gt,i=Gt,zt++,"*/"===t.substr(Gt,2)?(u="*/",Gt+=2):(u=n,0===zt&&ee(Z)),u===n&&(u=_e()),zt--,u===n?i=void 0:(Gt=i,i=n),i!==n&&(u=pe())!==n?a=i=[i,u]:(Gt=a,a=n);"*/"===t.substr(Gt,2)?(a="*/",Gt+=2):(a=n,0===zt&&ee(Z)),a!==n?e=r=[r,o,a]:(Gt=e,e=n)}else Gt=e,e=n;return e}function ve(){var e,r,o,a,i,u;if(e=Gt,"//"===t.substr(Gt,2)?(r="//",Gt+=2):(r=n,0===zt&&ee(tt)),r!==n){for(o=[],a=Gt,i=Gt,zt++,u=_e(),zt--,u===n?i=void 0:(Gt=i,i=n),i!==n&&(u=pe())!==n?a=i=[i,u]:(Gt=a,a=n);a!==n;)o.push(a),a=Gt,i=Gt,zt++,u=_e(),zt--,u===n?i=void 0:(Gt=i,i=n),i!==n&&(u=pe())!==n?a=i=[i,u]:(Gt=a,a=n);e=r=[r,o]}else Gt=e,e=n;return e}function ge(){var t,e,r,o;if(zt++,t=Gt,(e=me())!==n){for(r=[],o=be();o!==n;)r.push(o),o=be();Ht=t,t=[e+r.join(""),Wt()]}else Gt=t,t=n;return zt--,t===n&&(e=n,0===zt&&ee(et)),t}function me(){var e,r,o;return(e=function(){var e;return(e=function(){var e;return d.test(t.charAt(Gt))?(e=t.charAt(Gt),Gt++):(e=n,0===zt&&ee(It)),e}())===n&&(e=function(){var e;return p.test(t.charAt(Gt))?(e=t.charAt(Gt),Gt++):(e=n,0===zt&&ee(Ft)),e}())===n&&(e=function(){var e;return h.test(t.charAt(Gt))?(e=t.charAt(Gt),Gt++):(e=n,0===zt&&ee(Tt)),e}())===n&&(e=function(){var e;return f.test(t.charAt(Gt))?(e=t.charAt(Gt),Gt++):(e=n,0===zt&&ee(Rt)),e}())===n&&(e=function(){var e;return _.test(t.charAt(Gt))?(e=t.charAt(Gt),Gt++):(e=n,0===zt&&ee(Lt)),e}())===n&&(e=function(){var e;return m.test(t.charAt(Gt))?(e=t.charAt(Gt),Gt++):(e=n,0===zt&&ee(Nt)),e}()),e}())===n&&(36===t.charCodeAt(Gt)?(e="$",Gt++):(e=n,0===zt&&ee(O)),e===n&&(95===t.charCodeAt(Gt)?(e="_",Gt++):(e=n,0===zt&&ee(rt)),e===n&&(e=Gt,92===t.charCodeAt(Gt)?(r="\\",Gt++):(r=n,0===zt&&ee(nt)),r!==n&&(o=Pe())!==n?e=o:(Gt=e,e=n)))),e}function be(){var e;return(e=me())===n&&(e=function(){var e;return(e=function(){var e;return v.test(t.charAt(Gt))?(e=t.charAt(Gt),Gt++):(e=n,0===zt&&ee(jt)),e}())===n&&(e=function(){var e;return y.test(t.charAt(Gt))?(e=t.charAt(Gt),Gt++):(e=n,0===zt&&ee(kt)),e}()),e}())===n&&(e=function(){var e;return g.test(t.charAt(Gt))?(e=t.charAt(Gt),Gt++):(e=n,0===zt&&ee(Dt)),e}())===n&&(e=function(){var e;return b.test(t.charAt(Gt))?(e=t.charAt(Gt),Gt++):(e=n,0===zt&&ee(Bt)),e}())===n&&(8204===t.charCodeAt(Gt)?(e="\u200c",Gt++):(e=n,0===zt&&ee(ot)),e===n&&(8205===t.charCodeAt(Gt)?(e="\u200d",Gt++):(e=n,0===zt&&ee(at)))),e}function Ae(){var e,r,o,a;if(zt++,e=Gt,34===t.charCodeAt(Gt)?(r='"',Gt++):(r=n,0===zt&&ee(ct)),r!==n){for(o=[],a=Ee();a!==n;)o.push(a),a=Ee();34===t.charCodeAt(Gt)?(a='"',Gt++):(a=n,0===zt&&ee(ct)),a!==n?(Ht=e,e=o.join("")):(Gt=e,e=n)}else Gt=e,e=n;if(e===n)if(e=Gt,39===t.charCodeAt(Gt)?(r="'",Gt++):(r=n,0===zt&&ee(lt)),r!==n){for(o=[],a=we();a!==n;)o.push(a),a=we();39===t.charCodeAt(Gt)?(a="'",Gt++):(a=n,0===zt&&ee(lt)),a!==n?(Ht=e,e=function(t){return t.join("")}(o)):(Gt=e,e=n)}else Gt=e,e=n;return zt--,e===n&&(r=n,0===zt&&ee(st)),e}function Ee(){var e,r,o,a;return e=Gt,r=Gt,o=Gt,zt++,34===t.charCodeAt(Gt)?(a='"',Gt++):(a=n,0===zt&&ee(ct)),a===n&&(92===t.charCodeAt(Gt)?(a="\\",Gt++):(a=n,0===zt&&ee(nt)),a===n&&(a=_e())),zt--,a===n?o=void 0:(Gt=o,o=n),o!==n&&(a=pe())!==n?r=o=[o,a]:(Gt=r,r=n),(e=r!==n?t.substring(e,Gt):r)===n&&(e=Gt,92===t.charCodeAt(Gt)?(r="\\",Gt++):(r=n,0===zt&&ee(nt)),r!==n&&(o=$e())!==n?e=o:(Gt=e,e=n),e===n&&(e=xe())),e}function we(){var e,r,o,a;return e=Gt,r=Gt,o=Gt,zt++,39===t.charCodeAt(Gt)?(a="'",Gt++):(a=n,0===zt&&ee(lt)),a===n&&(92===t.charCodeAt(Gt)?(a="\\",Gt++):(a=n,0===zt&&ee(nt)),a===n&&(a=_e())),zt--,a===n?o=void 0:(Gt=o,o=n),o!==n&&(a=pe())!==n?r=o=[o,a]:(Gt=r,r=n),(e=r!==n?t.substring(e,Gt):r)===n&&(e=Gt,92===t.charCodeAt(Gt)?(r="\\",Gt++):(r=n,0===zt&&ee(nt)),r!==n&&(o=$e())!==n?e=o:(Gt=e,e=n),e===n&&(e=xe())),e}function Ce(){var e,r,o,a,i,u;return e=Gt,(r=Se())!==n?(45===t.charCodeAt(Gt)?(o="-",Gt++):(o=n,0===zt&&ee(dt)),o!==n&&(a=Se())!==n?(Ht=e,u=a,(i=r).charCodeAt(0)>u.charCodeAt(0)&&Vt("Invalid character range: "+t.substring(Ht,Gt)+"."),e=[i,u]):(Gt=e,e=n)):(Gt=e,e=n),e}function Se(){var e,r,o,a;return e=Gt,r=Gt,o=Gt,zt++,93===t.charCodeAt(Gt)?(a="]",Gt++):(a=n,0===zt&&ee(ht)),a===n&&(92===t.charCodeAt(Gt)?(a="\\",Gt++):(a=n,0===zt&&ee(nt)),a===n&&(a=_e())),zt--,a===n?o=void 0:(Gt=o,o=n),o!==n&&(a=pe())!==n?r=o=[o,a]:(Gt=r,r=n),(e=r!==n?t.substring(e,Gt):r)===n&&(e=Gt,92===t.charCodeAt(Gt)?(r="\\",Gt++):(r=n,0===zt&&ee(nt)),r!==n&&(o=$e())!==n?e=o:(Gt=e,e=n),e===n&&(e=xe())),e}function xe(){var e,r;return e=Gt,92===t.charCodeAt(Gt)?(r="\\",Gt++):(r=n,0===zt&&ee(nt)),r!==n&&he()!==n?(Ht=e,e=""):(Gt=e,e=n),e}function $e(){var e,r,o,a;return(e=function(){var e;return(e=Oe())===n&&(e=function(){var e,r,o,a;return e=Gt,r=Gt,o=Gt,zt++,(a=function(){var e;return(e=Oe())===n&&(e=Fe())===n&&(120===t.charCodeAt(Gt)?(e="x",Gt++):(e=n,0===zt&&ee(wt)),e===n&&(117===t.charCodeAt(Gt)?(e="u",Gt++):(e=n,0===zt&&ee(Ct)))),e}())===n&&(a=_e()),zt--,a===n?o=void 0:(Gt=o,o=n),o!==n&&(a=pe())!==n?r=o=[o,a]:(Gt=r,r=n),r!==n?t.substring(e,Gt):r}()),e}())===n&&(e=Gt,48===t.charCodeAt(Gt)?(r="0",Gt++):(r=n,0===zt&&ee(yt)),r!==n?(o=Gt,zt++,a=Fe(),zt--,a===n?o=void 0:(Gt=o,o=n),o!==n?(Ht=e,e="\0"):(Gt=e,e=n)):(Gt=e,e=n),e===n&&(e=function(){var e,r,o,a,i,u,s;return e=Gt,120===t.charCodeAt(Gt)?(r="x",Gt++):(r=n,0===zt&&ee(wt)),r!==n?(o=Gt,a=Gt,(i=Re())!==n&&(u=Re())!==n?a=i=[i,u]:(Gt=a,a=n),(o=a!==n?t.substring(o,Gt):a)!==n?(Ht=e,s=o,e=String.fromCharCode(parseInt(s,16))):(Gt=e,e=n)):(Gt=e,e=n),e}())===n&&(e=Pe())),e}function Oe(){var e,r;return 39===t.charCodeAt(Gt)?(e="'",Gt++):(e=n,0===zt&&ee(lt)),e===n&&(34===t.charCodeAt(Gt)?(e='"',Gt++):(e=n,0===zt&&ee(ct)),e===n&&(92===t.charCodeAt(Gt)?(e="\\",Gt++):(e=n,0===zt&&ee(nt)),e===n&&(e=Gt,98===t.charCodeAt(Gt)?(r="b",Gt++):(r=n,0===zt&&ee(vt)),r!==n&&(Ht=e,r="\b"),(e=r)===n&&(e=Gt,102===t.charCodeAt(Gt)?(r="f",Gt++):(r=n,0===zt&&ee(gt)),r!==n&&(Ht=e,r="\f"),(e=r)===n&&(e=Gt,110===t.charCodeAt(Gt)?(r="n",Gt++):(r=n,0===zt&&ee(mt)),r!==n&&(Ht=e,r="\n"),(e=r)===n&&(e=Gt,114===t.charCodeAt(Gt)?(r="r",Gt++):(r=n,0===zt&&ee(bt)),r!==n&&(Ht=e,r="\r"),(e=r)===n&&(e=Gt,116===t.charCodeAt(Gt)?(r="t",Gt++):(r=n,0===zt&&ee(At)),r!==n&&(Ht=e,r="\t"),(e=r)===n&&(e=Gt,118===t.charCodeAt(Gt)?(r="v",Gt++):(r=n,0===zt&&ee(Et)),r!==n&&(Ht=e,r="\v"),e=r)))))))),e}function Pe(){var e,r,o,a,i,u,s,c,l;return e=Gt,117===t.charCodeAt(Gt)?(r="u",Gt++):(r=n,0===zt&&ee(Ct)),r!==n?(o=Gt,a=Gt,(i=Re())!==n&&(u=Re())!==n&&(s=Re())!==n&&(c=Re())!==n?a=i=[i,u,s,c]:(Gt=a,a=n),(o=a!==n?t.substring(o,Gt):a)!==n?(Ht=e,l=o,e=String.fromCharCode(parseInt(l,16))):(Gt=e,e=n)):(Gt=e,e=n),e}function Fe(){var e;return s.test(t.charAt(Gt))?(e=t.charAt(Gt),Gt++):(e=n,0===zt&&ee(St)),e}function Re(){var e;return c.test(t.charAt(Gt))?(e=t.charAt(Gt),Gt++):(e=n,0===zt&&ee(xt)),e}function Le(){var e,r,o,a;return zt++,e=Gt,123===t.charCodeAt(Gt)?(r="{",Gt++):(r=n,0===zt&&ee(E)),r!==n?(o=function(){var e,r;return e=Gt,r=function e(){var r,o,a,i,u,s;if(r=Gt,o=[],a=[],i=Gt,u=Gt,zt++,l.test(t.charAt(Gt))?(s=t.charAt(Gt),Gt++):(s=n,0===zt&&ee(Pt)),zt--,s===n?u=void 0:(Gt=u,u=n),u!==n&&(s=pe())!==n?i=u=[u,s]:(Gt=i,i=n),i!==n)for(;i!==n;)a.push(i),i=Gt,u=Gt,zt++,l.test(t.charAt(Gt))?(s=t.charAt(Gt),Gt++):(s=n,0===zt&&ee(Pt)),zt--,s===n?u=void 0:(Gt=u,u=n),u!==n&&(s=pe())!==n?i=u=[u,s]:(Gt=i,i=n);else a=n;for(a===n&&(a=Gt,123===t.charCodeAt(Gt)?(i="{",Gt++):(i=n,0===zt&&ee(E)),i!==n?(u=e(),125===t.charCodeAt(Gt)?(s="}",Gt++):(s=n,0===zt&&ee(w)),s!==n?a=i=[i,u,s]:(Gt=a,a=n)):(Gt=a,a=n));a!==n;){if(o.push(a),a=[],i=Gt,u=Gt,zt++,l.test(t.charAt(Gt))?(s=t.charAt(Gt),Gt++):(s=n,0===zt&&ee(Pt)),zt--,s===n?u=void 0:(Gt=u,u=n),u!==n&&(s=pe())!==n?i=u=[u,s]:(Gt=i,i=n),i!==n)for(;i!==n;)a.push(i),i=Gt,u=Gt,zt++,l.test(t.charAt(Gt))?(s=t.charAt(Gt),Gt++):(s=n,0===zt&&ee(Pt)),zt--,s===n?u=void 0:(Gt=u,u=n),u!==n&&(s=pe())!==n?i=u=[u,s]:(Gt=i,i=n);else a=n;a===n&&(a=Gt,123===t.charCodeAt(Gt)?(i="{",Gt++):(i=n,0===zt&&ee(E)),i!==n?(u=e(),125===t.charCodeAt(Gt)?(s="}",Gt++):(s=n,0===zt&&ee(w)),s!==n?a=i=[i,u,s]:(Gt=a,a=n)):(Gt=a,a=n))}return t.substring(r,Gt)}(),Ht=e,r=function(t){return[t,Wt()]}(r)}(),125===t.charCodeAt(Gt)?(a="}",Gt++):(a=n,0===zt&&ee(w)),a!==n?e=o:(Gt=e,e=n)):(Gt=e,e=n),zt--,e===n&&(r=n,0===zt&&ee(Ot)),e}function Te(){var t,e;for(t=[],(e=fe())===n&&(e=he())===n&&(e=de());e!==n;)t.push(e),(e=fe())===n&&(e=he())===n&&(e=de());return t}function Ie(){var e,r,o,a;return e=Gt,r=Te(),59===t.charCodeAt(Gt)?(o=";",Gt++):(o=n,0===zt&&ee(Ut)),o!==n?e=r=[r,o]:(Gt=e,e=n),e===n&&(e=Gt,r=function(){var t,e;for(t=[],(e=fe())===n&&(e=ye());e!==n;)t.push(e),(e=fe())===n&&(e=ye());return t}(),(o=ve())===n&&(o=null),(a=he())!==n?e=r=[r,o,a]:(Gt=e,e=n),e===n&&(e=Gt,r=Te(),(o=function(){var e,r;return e=Gt,zt++,t.length>Gt?(r=t.charAt(Gt),Gt++):(r=n,0===zt&&ee(j)),zt--,r===n?e=void 0:(Gt=e,e=n),e}())!==n?e=r=[r,o]:(Gt=e,e=n))),e}const ke=e.reservedWords||[];if((r=i())!==n&&Gt===t.length)return r;throw r!==n&&Gt<t.length&&ee({type:"end"}),function(t,e,r){return new peg$SyntaxError(peg$SyntaxError.buildMessage(t,e),t,e,r)}(Kt,Yt<t.length?t.charAt(Yt):null,Yt<t.length?te(Yt,Yt+1):te(Yt,Yt))}};const peg={VERSION:_$version_56,RESERVED_WORDS:["break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","finally","for","function","if","import","in","instanceof","new","return","super","switch","this","throw","try","typeof","var","void","while","with","null","true","false","enum","implements","interface","let","package","private","protected","public","static","yield","await"],GrammarError:_$GrammarError_53,parser:_$parser_54,compiler:_$compiler_37,generate(t,e){const r="plugins"in(e=void 0!==e?e:{})?e.plugins:[],n={parser:peg.parser,passes:function(t){const e={};return Object.keys(t).forEach(r=>{e[r]=t[r].slice()}),e}(peg.compiler.passes),reservedWords:peg.RESERVED_WORDS.slice()};return r.forEach(t=>{t.use(n,e)}),peg.compiler.compile(n.parser.parse(t,{grammarSource:e.grammarSource,reservedWords:n.reservedWords}),n.passes,e)}};var _$peg_55=peg,_$surge_73={};function ___typeof_73(t){return(___typeof_73="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(_$surge_73,"__esModule",{value:!0}),_$surge_73.default=function(){return __parser_73||(__parser_73=peggy.generate(grammars)),__parser_73};var _templateObject,peggy=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==___typeof_73(t)&&"function"!=typeof t)return{default:t};var r=_getRequireWildcardCache(void 0);if(r&&r.has(t))return r.get(t);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var i=o?Object.getOwnPropertyDescriptor(t,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=t[a]}return n.default=t,r&&r.set(t,n),n}(_$peg_55);function _getRequireWildcardCache(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(_getRequireWildcardCache=function(t){return t?r:e})(t)}var strings,raw,__parser_73,grammars=String.raw(_templateObject||(strings=['\n// global initializer\n{{\n function $set(obj, path, value) {\n if (Object(obj) !== obj) return obj;\n if (!Array.isArray(path)) path = path.toString().match(/[^.[]]+/g) || [];\n path\n .slice(0, -1)\n .reduce((a, c, i) => (Object(a[c]) === a[c] ? a[c] : (a[c] = Math.abs(path[i + 1]) >> 0 === +path[i + 1] ? [] : {})), obj)[\n path[path.length - 1]\n ] = value;\n return obj;\n }\n}}\n\n// per-parser initializer\n{\n const proxy = {};\n const obfs = {};\n const $ = {};\n\n function handleWebsocket() {\n if (obfs.type === "ws") {\n proxy.network = "ws";\n $set(proxy, "ws-opts.path", obfs.path);\n $set(proxy, "ws-opts.headers", obfs[\'ws-headers\']);\n }\n }\n}\n\nstart = (shadowsocks/vmess/trojan/https/http/snell/socks5/socks5_tls) {\n return proxy;\n}\n\nshadowsocks = tag equals "ss" address (method/passwordk/obfs/obfs_host/obfs_uri/fast_open/udp_relay/others)* {\n proxy.type = "ss";\n // handle obfs\n if (obfs.type == "http" || obfs.type === "tls") {\n proxy.plugin = "obfs";\n $set(proxy, "plugin-opts.mode", obfs.type);\n $set(proxy, "plugin-opts.host", obfs.host);\n $set(proxy, "plugin-opts.path", obfs.path);\n }\n}\nvmess = tag equals "vmess" address (vmess_uuid/vmess_aead/ws/ws_path/ws_headers/method/tls/sni/tls_fingerprint/tls_verification/fast_open/udp_relay/others)* {\n proxy.type = "vmess";\n proxy.cipher = proxy.cipher || "auto";\n if (proxy.aead) {\n proxy.alterId = 0;\n } else {\n proxy.alterId = proxy.alterId || 0;\n }\n handleWebsocket();\n}\ntrojan = tag equals "trojan" address (passwordk/ws/ws_path/ws_headers/tls/sni/tls_fingerprint/tls_verification/fast_open/udp_relay/others)* {\n proxy.type = "trojan";\n handleWebsocket();\n}\nhttps = tag equals "https" address (username password)? (sni/tls_fingerprint/tls_verification/fast_open/others)* {\n proxy.type = "http";\n proxy.tls = true;\n}\nhttp = tag equals "http" address (username password)? (fast_open/others)* {\n proxy.type = "http";\n}\nsnell = tag equals "snell" address (snell_version/snell_psk/obfs/obfs_host/obfs_uri/fast_open/udp_relay/others)* {\n proxy.type = "snell";\n // handle obfs\n if (obfs.type == "http" || obfs.type === "tls") {\n $set(proxy, "obfs-opts.mode", obfs.type);\n $set(proxy, "obfs-opts.host", obfs.host);\n $set(proxy, "obfs-opts.path", obfs.path);\n }\n}\nsocks5 = tag equals "socks5" address (username password)? (fast_open/others)* {\n proxy.type = "socks5";\n}\nsocks5_tls = tag equals "socks5-tls" address (username password)? (sni/tls_fingerprint/tls_verification/fast_open/others)* {\n proxy.type = "socks5";\n proxy.tls = true;\n}\n\naddress = comma server:server comma port:port {\n proxy.server = server;\n proxy.port = port;\n}\n\nserver = ip/domain\n\nip = & {\n const start = peg$currPos;\n let j = start;\n while (j < input.length) {\n if (input[j] === ",") break;\n j++;\n }\n peg$currPos = j;\n $.ip = input.substring(start, j).trim();\n return true;\n} { return $.ip; }\n\ndomain = match:[0-9a-zA-z-_.]+ { \n const domain = match.join(""); \n if (/(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]/.test(domain)) {\n return domain;\n }\n}\n\nport = digits:[0-9]+ { \n const port = parseInt(digits.join(""), 10); \n if (port >= 80 && port <= 65535) {\n \treturn port;\n }\n}\n\nusername = & {\n let j = peg$currPos; \n let start, end;\n let first = true;\n while (j < input.length) {\n if (input[j] === \',\') {\n if (first) {\n start = j + 1;\n first = false;\n } else {\n end = j;\n break;\n }\n }\n j++;\n }\n const match = input.substring(start, end);\n if (match.indexOf("=") === -1) {\n $.username = match;\n peg$currPos = end;\n return true;\n }\n} { proxy.username = $.username; }\npassword = comma match:[^,]+ { proxy.password = match.join(""); }\n\ntls = comma "tls" equals flag:bool { proxy.tls = flag; }\nsni = comma "sni" equals sni:domain { proxy.sni = sni; }\ntls_verification = comma "skip-cert-verify" equals flag:bool { proxy["skip-cert-verify"] = flag; }\ntls_fingerprint = comma "server-cert-fingerprint-sha256" equals tls_fingerprint:$[^,]+ { proxy["tls-fingerprint"] = tls_fingerprint.trim(); }\n\nsnell_psk = comma "psk" equals match:[^,]+ { proxy.psk = match.join(""); }\nsnell_version = comma "version" equals match:$[0-9]+ { proxy.version = parseInt(match.trim()); }\n\npasswordk = comma "password" equals match:[^,]+ { proxy.password = match.join(""); }\nvmess_uuid = comma "username" equals match:[^,]+ { proxy.uuid = match.join(""); }\nvmess_aead = comma "vmess-aead" equals flag:bool { proxy.aead = flag; }\n\nmethod = comma "encrypt-method" equals cipher:cipher {\n if (cipher !== \'none\') proxy.cipher = cipher;\n else proxy.cipher = \'auto\';\n}\ncipher = ("aes-128-gcm"/"aes-192-gcm"/"aes-256-gcm"/"aes-128-cfb"/"aes-192-cfb"/"aes-256-cfb"/"aes-128-ctr"/"aes-192-ctr"/"aes-256-ctr"/"rc4-md5"/"chacha20-ietf-poly1305"/"chacha20-ietf"/"chacha20-poly1305"/"chacha20"/"none");\n\nws = comma "ws" equals flag:bool { obfs.type = "ws"; }\nws_headers = comma "ws-headers" equals headers:$[^,]+ {\n const pairs = headers.split("|");\n const result = {};\n pairs.forEach(pair => {\n const [key, value] = pair.trim().split(":");\n result[key.trim()] = value.trim();\n })\n obfs["ws-headers"] = result;\n}\nws_path = comma "ws-path" equals path:uri { obfs.path = path; }\n\nobfs = comma "obfs" equals type:("http"/"tls") { obfs.type = type; }\nobfs_host = comma "obfs-host" equals host:domain { obfs.host = host; };\nobfs_uri = comma "obfs-uri" equals path:uri { obfs.path = path }\nuri = $[^,]+\n\nudp_relay = comma "udp" equals flag:bool { proxy.udp = flag; }\nfast_open = comma "fast-open" equals flag:bool { proxy.tfo = flag; }\n\ntag = match:[^=,]* { proxy.name = match.join("").trim(); }\ncomma = _ "," _\nequals = _ "=" _\n_ = [ \r\t]*\nbool = b:("true"/"false") { return b === "true" }\nothers = comma [^=,]+ equals [^=,]+\n'],(raw=['\n// global initializer\n{{\n function $set(obj, path, value) {\n if (Object(obj) !== obj) return obj;\n if (!Array.isArray(path)) path = path.toString().match(/[^.[\\]]+/g) || [];\n path\n .slice(0, -1)\n .reduce((a, c, i) => (Object(a[c]) === a[c] ? a[c] : (a[c] = Math.abs(path[i + 1]) >> 0 === +path[i + 1] ? [] : {})), obj)[\n path[path.length - 1]\n ] = value;\n return obj;\n }\n}}\n\n// per-parser initializer\n{\n const proxy = {};\n const obfs = {};\n const $ = {};\n\n function handleWebsocket() {\n if (obfs.type === "ws") {\n proxy.network = "ws";\n $set(proxy, "ws-opts.path", obfs.path);\n $set(proxy, "ws-opts.headers", obfs[\'ws-headers\']);\n }\n }\n}\n\nstart = (shadowsocks/vmess/trojan/https/http/snell/socks5/socks5_tls) {\n return proxy;\n}\n\nshadowsocks = tag equals "ss" address (method/passwordk/obfs/obfs_host/obfs_uri/fast_open/udp_relay/others)* {\n proxy.type = "ss";\n // handle obfs\n if (obfs.type == "http" || obfs.type === "tls") {\n proxy.plugin = "obfs";\n $set(proxy, "plugin-opts.mode", obfs.type);\n $set(proxy, "plugin-opts.host", obfs.host);\n $set(proxy, "plugin-opts.path", obfs.path);\n }\n}\nvmess = tag equals "vmess" address (vmess_uuid/vmess_aead/ws/ws_path/ws_headers/method/tls/sni/tls_fingerprint/tls_verification/fast_open/udp_relay/others)* {\n proxy.type = "vmess";\n proxy.cipher = proxy.cipher || "auto";\n if (proxy.aead) {\n proxy.alterId = 0;\n } else {\n proxy.alterId = proxy.alterId || 0;\n }\n handleWebsocket();\n}\ntrojan = tag equals "trojan" address (passwordk/ws/ws_path/ws_headers/tls/sni/tls_fingerprint/tls_verification/fast_open/udp_relay/others)* {\n proxy.type = "trojan";\n handleWebsocket();\n}\nhttps = tag equals "https" address (username password)? (sni/tls_fingerprint/tls_verification/fast_open/others)* {\n proxy.type = "http";\n proxy.tls = true;\n}\nhttp = tag equals "http" address (username password)? (fast_open/others)* {\n proxy.type = "http";\n}\nsnell = tag equals "snell" address (snell_version/snell_psk/obfs/obfs_host/obfs_uri/fast_open/udp_relay/others)* {\n proxy.type = "snell";\n // handle obfs\n if (obfs.type == "http" || obfs.type === "tls") {\n $set(proxy, "obfs-opts.mode", obfs.type);\n $set(proxy, "obfs-opts.host", obfs.host);\n $set(proxy, "obfs-opts.path", obfs.path);\n }\n}\nsocks5 = tag equals "socks5" address (username password)? (fast_open/others)* {\n proxy.type = "socks5";\n}\nsocks5_tls = tag equals "socks5-tls" address (username password)? (sni/tls_fingerprint/tls_verification/fast_open/others)* {\n proxy.type = "socks5";\n proxy.tls = true;\n}\n\naddress = comma server:server comma port:port {\n proxy.server = server;\n proxy.port = port;\n}\n\nserver = ip/domain\n\nip = & {\n const start = peg$currPos;\n let j = start;\n while (j < input.length) {\n if (input[j] === ",") break;\n j++;\n }\n peg$currPos = j;\n $.ip = input.substring(start, j).trim();\n return true;\n} { return $.ip; }\n\ndomain = match:[0-9a-zA-z-_.]+ { \n const domain = match.join(""); \n if (/(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]/.test(domain)) {\n return domain;\n }\n}\n\nport = digits:[0-9]+ { \n const port = parseInt(digits.join(""), 10); \n if (port >= 80 && port <= 65535) {\n \treturn port;\n }\n}\n\nusername = & {\n let j = peg$currPos; \n let start, end;\n let first = true;\n while (j < input.length) {\n if (input[j] === \',\') {\n if (first) {\n start = j + 1;\n first = false;\n } else {\n end = j;\n break;\n }\n }\n j++;\n }\n const match = input.substring(start, end);\n if (match.indexOf("=") === -1) {\n $.username = match;\n peg$currPos = end;\n return true;\n }\n} { proxy.username = $.username; }\npassword = comma match:[^,]+ { proxy.password = match.join(""); }\n\ntls = comma "tls" equals flag:bool { proxy.tls = flag; }\nsni = comma "sni" equals sni:domain { proxy.sni = sni; }\ntls_verification = comma "skip-cert-verify" equals flag:bool { proxy["skip-cert-verify"] = flag; }\ntls_fingerprint = comma "server-cert-fingerprint-sha256" equals tls_fingerprint:$[^,]+ { proxy["tls-fingerprint"] = tls_fingerprint.trim(); }\n\nsnell_psk = comma "psk" equals match:[^,]+ { proxy.psk = match.join(""); }\nsnell_version = comma "version" equals match:$[0-9]+ { proxy.version = parseInt(match.trim()); }\n\npasswordk = comma "password" equals match:[^,]+ { proxy.password = match.join(""); }\nvmess_uuid = comma "username" equals match:[^,]+ { proxy.uuid = match.join(""); }\nvmess_aead = comma "vmess-aead" equals flag:bool { proxy.aead = flag; }\n\nmethod = comma "encrypt-method" equals cipher:cipher {\n if (cipher !== \'none\') proxy.cipher = cipher;\n else proxy.cipher = \'auto\';\n}\ncipher = ("aes-128-gcm"/"aes-192-gcm"/"aes-256-gcm"/"aes-128-cfb"/"aes-192-cfb"/"aes-256-cfb"/"aes-128-ctr"/"aes-192-ctr"/"aes-256-ctr"/"rc4-md5"/"chacha20-ietf-poly1305"/"chacha20-ietf"/"chacha20-poly1305"/"chacha20"/"none");\n\nws = comma "ws" equals flag:bool { obfs.type = "ws"; }\nws_headers = comma "ws-headers" equals headers:$[^,]+ {\n const pairs = headers.split("|");\n const result = {};\n pairs.forEach(pair => {\n const [key, value] = pair.trim().split(":");\n result[key.trim()] = value.trim();\n })\n obfs["ws-headers"] = result;\n}\nws_path = comma "ws-path" equals path:uri { obfs.path = path; }\n\nobfs = comma "obfs" equals type:("http"/"tls") { obfs.type = type; }\nobfs_host = comma "obfs-host" equals host:domain { obfs.host = host; };\nobfs_uri = comma "obfs-uri" equals path:uri { obfs.path = path }\nuri = $[^,]+\n\nudp_relay = comma "udp" equals flag:bool { proxy.udp = flag; }\nfast_open = comma "fast-open" equals flag:bool { proxy.tfo = flag; }\n\ntag = match:[^=,]* { proxy.name = match.join("").trim(); }\ncomma = _ "," _\nequals = _ "=" _\n_ = [ \\r\\t]*\nbool = b:("true"/"false") { return b === "true" }\nothers = comma [^=,]+ equals [^=,]+\n'])||(raw=strings.slice(0)),_templateObject=Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}})))),_$loon_71={};function ___typeof_71(t){return(___typeof_71="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(_$loon_71,"__esModule",{value:!0}),_$loon_71.default=function(){return __parser_71||(__parser_71=__peggy_71.generate(__grammars_71)),__parser_71};var ___templateObject_71,__peggy_71=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==___typeof_71(t)&&"function"!=typeof t)return{default:t};var r=___getRequireWildcardCache_71(void 0);if(r&&r.has(t))return r.get(t);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var i=o?Object.getOwnPropertyDescriptor(t,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=t[a]}return n.default=t,r&&r.set(t,n),n}(_$peg_55);function ___getRequireWildcardCache_71(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(___getRequireWildcardCache_71=function(t){return t?r:e})(t)}var __strings_71,__raw_71,__parser_71,__grammars_71=String.raw(___templateObject_71||(__strings_71=['\n// global initializer\n{{\n function $set(obj, path, value) {\n if (Object(obj) !== obj) return obj;\n if (!Array.isArray(path)) path = path.toString().match(/[^.[]]+/g) || [];\n path\n .slice(0, -1)\n .reduce((a, c, i) => (Object(a[c]) === a[c] ? a[c] : (a[c] = Math.abs(path[i + 1]) >> 0 === +path[i + 1] ? [] : {})), obj)[\n path[path.length - 1]\n ] = value;\n return obj;\n }\n}}\n\n// per-parser initializer\n{\n const proxy = {};\n const obfs = {};\n const transport = {};\n const $ = {};\n\n function handleTransport() {\n if (transport.type === "tcp") { /* do nothing */ }\n else if (transport.type === "ws") {\n proxy.network = "ws";\n $set(proxy, "ws-opts.path", transport.path);\n $set(proxy, "ws-opts.headers.Host", transport.host);\n } else if (transport.type === "http") {\n proxy.network = "http";\n $set(proxy, "http-opts.path", transport.path);\n $set(proxy, "http-opts.headers.Host", transport.host);\n }\n }\n}\n\nstart = (shadowsocksr/shadowsocks/vmess/vless/trojan/https/http) {\n return proxy;\n}\n\nshadowsocksr = tag equals "shadowsocksr"i address method password (ssr_protocol/ssr_protocol_param/obfs_ssr/obfs_ssr_param/obfs_host/obfs_uri/fast_open/udp_relay/others)*{\n proxy.type = "ssr";\n // handle ssr obfs\n proxy.obfs = obfs.type;\n}\nshadowsocks = tag equals "shadowsocks"i address method password (obfs_ss/obfs_host/obfs_uri/fast_open/udp_relay/others)* {\n proxy.type = "ss";\n // handle ss obfs\n if (obfs.type == "http" || obfs.type === "tls") {\n proxy.plugin = "obfs";\n $set(proxy, "plugin-opts.mode", obfs.type);\n $set(proxy, "plugin-opts.host", obfs.host);\n $set(proxy, "plugin-opts.path", obfs.path);\n }\n}\nvmess = tag equals "vmess"i address method uuid (transport/transport_host/transport_path/over_tls/tls_host/tls_verification/vmess_alterId/fast_open/udp_relay/others)* {\n proxy.type = "vmess";\n proxy.cipher = proxy.cipher || "auto";\n proxy.alterId = proxy.alterId || 0;\n handleTransport();\n}\nvless = tag equals "vless"i address uuid (transport/transport_host/transport_path/over_tls/tls_host/tls_verification/fast_open/udp_relay/others)* {\n proxy.type = "vless";\n handleTransport();\n}\ntrojan = tag equals "trojan"i address password (transport/transport_host/transport_path/over_tls/tls_host/tls_verification/fast_open/udp_relay/others)* {\n proxy.type = "trojan";\n handleTransport();\n}\nhttps = tag equals "https"i address (username password)? (tls_host/tls_verification/fast_open/udp_relay/others)* {\n proxy.type = "http";\n proxy.tls = true;\n}\nhttp = tag equals "http"i address (username password)? (fast_open/udp_relay/others)* {\n proxy.type = "http";\n}\n\naddress = comma server:server comma port:port {\n proxy.server = server;\n proxy.port = port;\n}\n\nserver = ip/domain\n\nip = & {\n const start = peg$currPos;\n let j = start;\n while (j < input.length) {\n if (input[j] === ",") break;\n j++;\n }\n peg$currPos = j;\n $.ip = input.substring(start, j).trim();\n return true;\n} { return $.ip; }\n\ndomain = match:[0-9a-zA-z-_.]+ { \n const domain = match.join(""); \n if (/(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]/.test(domain)) {\n return domain;\n }\n throw new Error("Invalid domain: " + domain);\n}\n\nport = digits:[0-9]+ { \n const port = parseInt(digits.join(""), 10); \n if (port >= 80 && port <= 65535) {\n \treturn port;\n }\n throw new Error("Invalid port number: " + port);\n}\n\nmethod = comma cipher:cipher { \n if (cipher !== \'none\') proxy.cipher = cipher;\n else proxy.cipher = \'auto\';\n }\ncipher = ("aes-128-gcm"/"aes-192-gcm"/"aes-256-gcm"/"aes-128-cfb"/"aes-192-cfb"/"aes-256-cfb"/"aes-128-ctr"/"aes-192-ctr"/"aes-256-ctr"/"rc4-md5"/"chacha20-ietf-poly1305"/"chacha20-ietf"/"chacha20-poly1305"/"chacha20"/"none");\n\nusername = & {\n let j = peg$currPos; \n let start, end;\n let first = true;\n while (j < input.length) {\n if (input[j] === \',\') {\n if (first) {\n start = j + 1;\n first = false;\n } else {\n end = j;\n break;\n }\n }\n j++;\n }\n const match = input.substring(start, end);\n if (match.indexOf("=") === -1) {\n $.username = match;\n peg$currPos = end;\n return true;\n }\n} { proxy.username = $.username; }\npassword = comma \'"\' match:[^"]* \'"\' { proxy.password = match.join(""); }\nuuid = comma \'"\' match:[^"]+ \'"\' { proxy.uuid = match.join(""); }\n\nobfs_ss = comma "obfs-name" equals type:("http"/"tls") { obfs.type = type; }\n\nobfs_ssr = comma "obfs" equals type:("plain"/"http_simple"/"http_post"/"random_head"/"tls1.2_ticket_auth"/"tls1.2_ticket_fastauth") { obfs.type = type; }\nobfs_ssr_param = comma "obfs-param" equals match:$[^,]+ { proxy["obfs-param"] = match; }\n\nobfs_host = comma "obfs-host" equals host:domain { obfs.host = host; }\nobfs_uri = comma "obfs-uri" equals uri:uri { obfs.path = uri; }\nuri = $[^,]+\n\ntransport = comma "transport" equals type:("tcp"/"ws"/"http") { transport.type = type; }\ntransport_host = comma "host" equals host:domain { transport.host = host; }\ntransport_path = comma "path" equals path:uri { transport.path = path; }\n\nssr_protocol = comma "protocol" equals protocol:("origin"/"auth_sha1_v4"/"auth_aes128_md5"/"auth_aes128_sha1"/"auth_chain_a"/"auth_chain_b") { proxy.protocol = protocol; }\nssr_protocol_param = comma "protocol-param" equals param:$[^=,]+ { proxy["protocol-param"] = param; }\n\nvmess_alterId = comma "alterId" equals alterId:$[0-9]+ { proxy.alterId = parseInt(alterId); } \n\nover_tls = comma "over-tls" equals flag:bool { proxy.tls = flag; }\ntls_host = comma "tls-name" equals host:domain { proxy.sni = host; }\ntls_verification = comma "skip-cert-verify" equals flag:bool { proxy["skip-cert-verify"] = flag; }\n\nfast_open = comma "fast-open" equals flag:bool { proxy.tfo = flag; }\nudp_relay = comma "udp" equals flag:bool { proxy.udp = flag; }\n\ntag = match:[^=,]* { proxy.name = match.join("").trim(); }\ncomma = _ "," _\nequals = _ "=" _\n_ = [ \r\t]*\nbool = b:("true"/"false") { return b === "true" }\nothers = comma [^=,]+ equals [^=,]+\n'],(__raw_71=['\n// global initializer\n{{\n function $set(obj, path, value) {\n if (Object(obj) !== obj) return obj;\n if (!Array.isArray(path)) path = path.toString().match(/[^.[\\]]+/g) || [];\n path\n .slice(0, -1)\n .reduce((a, c, i) => (Object(a[c]) === a[c] ? a[c] : (a[c] = Math.abs(path[i + 1]) >> 0 === +path[i + 1] ? [] : {})), obj)[\n path[path.length - 1]\n ] = value;\n return obj;\n }\n}}\n\n// per-parser initializer\n{\n const proxy = {};\n const obfs = {};\n const transport = {};\n const $ = {};\n\n function handleTransport() {\n if (transport.type === "tcp") { /* do nothing */ }\n else if (transport.type === "ws") {\n proxy.network = "ws";\n $set(proxy, "ws-opts.path", transport.path);\n $set(proxy, "ws-opts.headers.Host", transport.host);\n } else if (transport.type === "http") {\n proxy.network = "http";\n $set(proxy, "http-opts.path", transport.path);\n $set(proxy, "http-opts.headers.Host", transport.host);\n }\n }\n}\n\nstart = (shadowsocksr/shadowsocks/vmess/vless/trojan/https/http) {\n return proxy;\n}\n\nshadowsocksr = tag equals "shadowsocksr"i address method password (ssr_protocol/ssr_protocol_param/obfs_ssr/obfs_ssr_param/obfs_host/obfs_uri/fast_open/udp_relay/others)*{\n proxy.type = "ssr";\n // handle ssr obfs\n proxy.obfs = obfs.type;\n}\nshadowsocks = tag equals "shadowsocks"i address method password (obfs_ss/obfs_host/obfs_uri/fast_open/udp_relay/others)* {\n proxy.type = "ss";\n // handle ss obfs\n if (obfs.type == "http" || obfs.type === "tls") {\n proxy.plugin = "obfs";\n $set(proxy, "plugin-opts.mode", obfs.type);\n $set(proxy, "plugin-opts.host", obfs.host);\n $set(proxy, "plugin-opts.path", obfs.path);\n }\n}\nvmess = tag equals "vmess"i address method uuid (transport/transport_host/transport_path/over_tls/tls_host/tls_verification/vmess_alterId/fast_open/udp_relay/others)* {\n proxy.type = "vmess";\n proxy.cipher = proxy.cipher || "auto";\n proxy.alterId = proxy.alterId || 0;\n handleTransport();\n}\nvless = tag equals "vless"i address uuid (transport/transport_host/transport_path/over_tls/tls_host/tls_verification/fast_open/udp_relay/others)* {\n proxy.type = "vless";\n handleTransport();\n}\ntrojan = tag equals "trojan"i address password (transport/transport_host/transport_path/over_tls/tls_host/tls_verification/fast_open/udp_relay/others)* {\n proxy.type = "trojan";\n handleTransport();\n}\nhttps = tag equals "https"i address (username password)? (tls_host/tls_verification/fast_open/udp_relay/others)* {\n proxy.type = "http";\n proxy.tls = true;\n}\nhttp = tag equals "http"i address (username password)? (fast_open/udp_relay/others)* {\n proxy.type = "http";\n}\n\naddress = comma server:server comma port:port {\n proxy.server = server;\n proxy.port = port;\n}\n\nserver = ip/domain\n\nip = & {\n const start = peg$currPos;\n let j = start;\n while (j < input.length) {\n if (input[j] === ",") break;\n j++;\n }\n peg$currPos = j;\n $.ip = input.substring(start, j).trim();\n return true;\n} { return $.ip; }\n\ndomain = match:[0-9a-zA-z-_.]+ { \n const domain = match.join(""); \n if (/(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]/.test(domain)) {\n return domain;\n }\n throw new Error("Invalid domain: " + domain);\n}\n\nport = digits:[0-9]+ { \n const port = parseInt(digits.join(""), 10); \n if (port >= 80 && port <= 65535) {\n \treturn port;\n }\n throw new Error("Invalid port number: " + port);\n}\n\nmethod = comma cipher:cipher { \n if (cipher !== \'none\') proxy.cipher = cipher;\n else proxy.cipher = \'auto\';\n }\ncipher = ("aes-128-gcm"/"aes-192-gcm"/"aes-256-gcm"/"aes-128-cfb"/"aes-192-cfb"/"aes-256-cfb"/"aes-128-ctr"/"aes-192-ctr"/"aes-256-ctr"/"rc4-md5"/"chacha20-ietf-poly1305"/"chacha20-ietf"/"chacha20-poly1305"/"chacha20"/"none");\n\nusername = & {\n let j = peg$currPos; \n let start, end;\n let first = true;\n while (j < input.length) {\n if (input[j] === \',\') {\n if (first) {\n start = j + 1;\n first = false;\n } else {\n end = j;\n break;\n }\n }\n j++;\n }\n const match = input.substring(start, end);\n if (match.indexOf("=") === -1) {\n $.username = match;\n peg$currPos = end;\n return true;\n }\n} { proxy.username = $.username; }\npassword = comma \'"\' match:[^"]* \'"\' { proxy.password = match.join(""); }\nuuid = comma \'"\' match:[^"]+ \'"\' { proxy.uuid = match.join(""); }\n\nobfs_ss = comma "obfs-name" equals type:("http"/"tls") { obfs.type = type; }\n\nobfs_ssr = comma "obfs" equals type:("plain"/"http_simple"/"http_post"/"random_head"/"tls1.2_ticket_auth"/"tls1.2_ticket_fastauth") { obfs.type = type; }\nobfs_ssr_param = comma "obfs-param" equals match:$[^,]+ { proxy["obfs-param"] = match; }\n\nobfs_host = comma "obfs-host" equals host:domain { obfs.host = host; }\nobfs_uri = comma "obfs-uri" equals uri:uri { obfs.path = uri; }\nuri = $[^,]+\n\ntransport = comma "transport" equals type:("tcp"/"ws"/"http") { transport.type = type; }\ntransport_host = comma "host" equals host:domain { transport.host = host; }\ntransport_path = comma "path" equals path:uri { transport.path = path; }\n\nssr_protocol = comma "protocol" equals protocol:("origin"/"auth_sha1_v4"/"auth_aes128_md5"/"auth_aes128_sha1"/"auth_chain_a"/"auth_chain_b") { proxy.protocol = protocol; }\nssr_protocol_param = comma "protocol-param" equals param:$[^=,]+ { proxy["protocol-param"] = param; }\n\nvmess_alterId = comma "alterId" equals alterId:$[0-9]+ { proxy.alterId = parseInt(alterId); } \n\nover_tls = comma "over-tls" equals flag:bool { proxy.tls = flag; }\ntls_host = comma "tls-name" equals host:domain { proxy.sni = host; }\ntls_verification = comma "skip-cert-verify" equals flag:bool { proxy["skip-cert-verify"] = flag; }\n\nfast_open = comma "fast-open" equals flag:bool { proxy.tfo = flag; }\nudp_relay = comma "udp" equals flag:bool { proxy.udp = flag; }\n\ntag = match:[^=,]* { proxy.name = match.join("").trim(); }\ncomma = _ "," _\nequals = _ "=" _\n_ = [ \\r\\t]*\nbool = b:("true"/"false") { return b === "true" }\nothers = comma [^=,]+ equals [^=,]+\n'])||(__raw_71=__strings_71.slice(0)),___templateObject_71=Object.freeze(Object.defineProperties(__strings_71,{raw:{value:Object.freeze(__raw_71)}})))),_$qx_72={};function ___typeof_72(t){return(___typeof_72="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(_$qx_72,"__esModule",{value:!0}),_$qx_72.default=function(){return __parser_72||(__parser_72=__peggy_72.generate(__grammars_72)),__parser_72};var ___templateObject_72,__peggy_72=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==___typeof_72(t)&&"function"!=typeof t)return{default:t};var r=___getRequireWildcardCache_72(void 0);if(r&&r.has(t))return r.get(t);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var i=o?Object.getOwnPropertyDescriptor(t,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=t[a]}return n.default=t,r&&r.set(t,n),n}(_$peg_55);function ___getRequireWildcardCache_72(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(___getRequireWildcardCache_72=function(t){return t?r:e})(t)}var __strings_72,__raw_72,__parser_72,__grammars_72=String.raw(___templateObject_72||(__strings_72=['\n// global initializer\n{{\n function $set(obj, path, value) {\n if (Object(obj) !== obj) return obj;\n if (!Array.isArray(path)) path = path.toString().match(/[^.[]]+/g) || [];\n path\n .slice(0, -1)\n .reduce((a, c, i) => (Object(a[c]) === a[c] ? a[c] : (a[c] = Math.abs(path[i + 1]) >> 0 === +path[i + 1] ? [] : {})), obj)[\n path[path.length - 1]\n ] = value;\n return obj;\n }\n}}\n\n// per-parse initializer\n{\n\tconst proxy = {};\n const obfs = {};\n const $ = {};\n\n function handleObfs() {\n if (obfs.type === "ws" || obfs.type === "wss") {\n proxy.network = "ws";\n if (obfs.type === \'wss\') {\n proxy.tls = true;\n }\n $set(proxy, "ws-opts.path", obfs.path);\n $set(proxy, "ws-opts.headers.Host", obfs.host);\n } else if (obfs.type === "over-tls") {\n proxy.tls = true;\n } else if (obfs.type === "http") {\n proxy.network = "http";\n $set(proxy, "http-opts.path", obfs.path);\n $set(proxy, "http-opts.headers.Host", obfs.host);\n }\n }\n}\n\nstart = (trojan/shadowsocks/vmess/http/socks5) {\n return proxy\n}\n\ntrojan = "trojan" equals address\n (password/over_tls/tls_host/tls_fingerprint/tls_verification/obfs/obfs_host/obfs_uri/tag/udp_relay/udp_over_tcp/fast_open/others)* {\n proxy.type = "trojan";\n handleObfs();\n}\n\nshadowsocks = "shadowsocks" equals address\n (password/method/obfs_ssr/obfs_ss/obfs_host/obfs_uri/ssr_protocol/ssr_protocol_param/tls_fingerprint/tls_verification/udp_relay/udp_over_tcp/fast_open/tag/others)* {\n if (proxy.protocol) {\n proxy.type = "ssr";\n // handle ssr obfs\n if (obfs.host) proxy["obfs-param"] = obfs.host;\n if (obfs.type) proxy.obfs = obfs.type;\n } else {\n proxy.type = "ss";\n // handle ss obfs\n if (obfs.type == "http" || obfs.type === "tls") {\n proxy.plugin = "obfs";\n $set(proxy, "plugin-opts", {\n mode: obfs.type\n });\n } else if (obfs.type === "ws" || obfs.type === "wss") {\n proxy.plugin = "v2ray-plugin";\n $set(proxy, "plugin-opts.mode", "websocket");\n if (obfs.type === "wss") {\n $set(proxy, "plugin-opts.tls", true);\n }\n } else if (obfs.type === \'over-tls\') {\n throw new Error(\'ss over-tls is not supported\');\n }\n if (obfs.type) {\n $set(proxy, "plugin-opts.host", obfs.host);\n $set(proxy, "plugin-opts.path", obfs.path);\n }\n }\n}\n\nvmess = "vmess" equals address\n (uuid/method/over_tls/tls_host/tls_fingerprint/tls_verification/tag/obfs/obfs_host/obfs_uri/udp_relay/udp_over_tcp/fast_open/aead/others)* {\n proxy.type = "vmess";\n proxy.cipher = proxy.cipher || "auto";\n if (proxy.aead) {\n proxy.alterId = 0;\n } else {\n proxy.alterId = proxy.alterId || 0;\n }\n handleObfs();\n}\n\nhttp = "http" equals address \n (username/password/over_tls/tls_host/tls_fingerprint/tls_verification/tag/fast_open/udp_relay/udp_over_tcp/others)*{\n proxy.type = "http";\n}\n\nsocks5 = "socks5" equals address\n (username/password/password/over_tls/tls_host/tls_fingerprint/tls_verification/tag/fast_open/udp_relay/udp_over_tcp/others)* {\n proxy.type = "socks5";\n}\n \naddress = server:server ":" port:port {\n proxy.server = server;\n proxy.port = port;\n}\nserver = ip/domain\n\ndomain = match:[0-9a-zA-z-_.]+ { \n const domain = match.join(""); \n if (/(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]/.test(domain)) {\n return domain;\n }\n}\n\nip = & {\n const start = peg$currPos;\n let end;\n let j = start;\n while (j < input.length) {\n if (input[j] === ",") break;\n if (input[j] === ":") end = j;\n j++;\n }\n peg$currPos = end || j;\n $.ip = input.substring(start, end).trim();\n return true;\n} { return $.ip; }\n\nport = digits:[0-9]+ { \n const port = parseInt(digits.join(""), 10); \n if (port >= 80 && port <= 65535) {\n \treturn port;\n }\n}\n\nusername = comma "username" equals username:[^=,]+ { proxy.username = username.join("").trim(); }\npassword = comma "password" equals password:[^=,]+ { proxy.password = password.join("").trim(); }\nuuid = comma "password" equals uuid:[^=,]+ { proxy.uuid = uuid.join("").trim(); }\n\nmethod = comma "method" equals cipher:cipher { \n if (cipher !== \'none\') proxy.cipher = cipher;\n else proxy.cipher = \'auto\';\n};\ncipher = ("aes-128-gcm"/"aes-192-gcm"/"aes-256-gcm"/"aes-128-cfb"/"aes-192-cfb"/"aes-256-cfb"/"aes-128-ctr"/"aes-192-ctr"/"aes-256-ctr"/"rc4-md5"/"chacha20-ietf-poly1305"/"chacha20-ietf"/"chacha20-poly1305"/"chacha20"/"none");\naead = comma "aead" equals flag:bool { proxy.aead = flag; }\n\nudp_relay = comma "udp-relay" equals flag:bool { proxy.udp = flag; }\nudp_over_tcp = comma "udp-over-tcp" equals flag:bool { throw new Error("UDP over TCP is not supported"); }\nfast_open = comma "fast-open" equals flag:bool { proxy.tfo = flag; }\n\nover_tls = comma "over-tls" equals flag:bool { proxy.tls = flag; }\ntls_host = comma "tls-host" equals sni:domain { proxy.sni = sni; }\ntls_verification = comma "tls-verification" equals flag:bool { \n proxy["skip-cert-verify"] = !flag;\n}\ntls_fingerprint = comma "tls-cert-sha256" equals tls_fingerprint:$[^,]+ { proxy["tls-fingerprint"] = tls_fingerprint.trim(); }\n\nobfs_ss = comma "obfs" equals type:("http"/"tls"/"wss"/"ws"/"over-tls") { obfs.type = type; return type; }\nobfs_ssr = comma "obfs" equals type:("plain"/"http_simple"/"http_post"/"random_head"/"tls1.2_ticket_auth"/"tls1.2_ticket_fastauth") { obfs.type = type; return type; }\nobfs = comma "obfs" equals type:("wss"/"ws"/"over-tls"/"http") { obfs.type = type; return type; };\n\nobfs_host = comma "obfs-host" equals host:domain { obfs.host = host; }\nobfs_uri = comma "obfs-uri" equals uri:uri { obfs.path = uri; }\n\nssr_protocol = comma "ssr-protocol" equals protocol:("origin"/"auth_sha1_v4"/"auth_aes128_md5"/"auth_aes128_sha1"/"auth_chain_a"/"auth_chain_b") { proxy.protocol = protocol; return protocol; }\nssr_protocol_param = comma "ssr-protocol-param" equals param:$[^=,]+ { proxy["protocol-param"] = param; }\n\nuri = $[^,]+\n\ntag = comma "tag" equals tag:[^=,]+ { proxy.name = tag.join(""); }\nothers = comma [^=,]+ equals [^=,]+\ncomma = _ "," _\nequals = _ "=" _\n_ = [ \r\t]*\nbool = b:("true"/"false") { return b === "true" }\n'],(__raw_72=['\n// global initializer\n{{\n function $set(obj, path, value) {\n if (Object(obj) !== obj) return obj;\n if (!Array.isArray(path)) path = path.toString().match(/[^.[\\]]+/g) || [];\n path\n .slice(0, -1)\n .reduce((a, c, i) => (Object(a[c]) === a[c] ? a[c] : (a[c] = Math.abs(path[i + 1]) >> 0 === +path[i + 1] ? [] : {})), obj)[\n path[path.length - 1]\n ] = value;\n return obj;\n }\n}}\n\n// per-parse initializer\n{\n\tconst proxy = {};\n const obfs = {};\n const $ = {};\n\n function handleObfs() {\n if (obfs.type === "ws" || obfs.type === "wss") {\n proxy.network = "ws";\n if (obfs.type === \'wss\') {\n proxy.tls = true;\n }\n $set(proxy, "ws-opts.path", obfs.path);\n $set(proxy, "ws-opts.headers.Host", obfs.host);\n } else if (obfs.type === "over-tls") {\n proxy.tls = true;\n } else if (obfs.type === "http") {\n proxy.network = "http";\n $set(proxy, "http-opts.path", obfs.path);\n $set(proxy, "http-opts.headers.Host", obfs.host);\n }\n }\n}\n\nstart = (trojan/shadowsocks/vmess/http/socks5) {\n return proxy\n}\n\ntrojan = "trojan" equals address\n (password/over_tls/tls_host/tls_fingerprint/tls_verification/obfs/obfs_host/obfs_uri/tag/udp_relay/udp_over_tcp/fast_open/others)* {\n proxy.type = "trojan";\n handleObfs();\n}\n\nshadowsocks = "shadowsocks" equals address\n (password/method/obfs_ssr/obfs_ss/obfs_host/obfs_uri/ssr_protocol/ssr_protocol_param/tls_fingerprint/tls_verification/udp_relay/udp_over_tcp/fast_open/tag/others)* {\n if (proxy.protocol) {\n proxy.type = "ssr";\n // handle ssr obfs\n if (obfs.host) proxy["obfs-param"] = obfs.host;\n if (obfs.type) proxy.obfs = obfs.type;\n } else {\n proxy.type = "ss";\n // handle ss obfs\n if (obfs.type == "http" || obfs.type === "tls") {\n proxy.plugin = "obfs";\n $set(proxy, "plugin-opts", {\n mode: obfs.type\n });\n } else if (obfs.type === "ws" || obfs.type === "wss") {\n proxy.plugin = "v2ray-plugin";\n $set(proxy, "plugin-opts.mode", "websocket");\n if (obfs.type === "wss") {\n $set(proxy, "plugin-opts.tls", true);\n }\n } else if (obfs.type === \'over-tls\') {\n throw new Error(\'ss over-tls is not supported\');\n }\n if (obfs.type) {\n $set(proxy, "plugin-opts.host", obfs.host);\n $set(proxy, "plugin-opts.path", obfs.path);\n }\n }\n}\n\nvmess = "vmess" equals address\n (uuid/method/over_tls/tls_host/tls_fingerprint/tls_verification/tag/obfs/obfs_host/obfs_uri/udp_relay/udp_over_tcp/fast_open/aead/others)* {\n proxy.type = "vmess";\n proxy.cipher = proxy.cipher || "auto";\n if (proxy.aead) {\n proxy.alterId = 0;\n } else {\n proxy.alterId = proxy.alterId || 0;\n }\n handleObfs();\n}\n\nhttp = "http" equals address \n (username/password/over_tls/tls_host/tls_fingerprint/tls_verification/tag/fast_open/udp_relay/udp_over_tcp/others)*{\n proxy.type = "http";\n}\n\nsocks5 = "socks5" equals address\n (username/password/password/over_tls/tls_host/tls_fingerprint/tls_verification/tag/fast_open/udp_relay/udp_over_tcp/others)* {\n proxy.type = "socks5";\n}\n \naddress = server:server ":" port:port {\n proxy.server = server;\n proxy.port = port;\n}\nserver = ip/domain\n\ndomain = match:[0-9a-zA-z-_.]+ { \n const domain = match.join(""); \n if (/(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]/.test(domain)) {\n return domain;\n }\n}\n\nip = & {\n const start = peg$currPos;\n let end;\n let j = start;\n while (j < input.length) {\n if (input[j] === ",") break;\n if (input[j] === ":") end = j;\n j++;\n }\n peg$currPos = end || j;\n $.ip = input.substring(start, end).trim();\n return true;\n} { return $.ip; }\n\nport = digits:[0-9]+ { \n const port = parseInt(digits.join(""), 10); \n if (port >= 80 && port <= 65535) {\n \treturn port;\n }\n}\n\nusername = comma "username" equals username:[^=,]+ { proxy.username = username.join("").trim(); }\npassword = comma "password" equals password:[^=,]+ { proxy.password = password.join("").trim(); }\nuuid = comma "password" equals uuid:[^=,]+ { proxy.uuid = uuid.join("").trim(); }\n\nmethod = comma "method" equals cipher:cipher { \n if (cipher !== \'none\') proxy.cipher = cipher;\n else proxy.cipher = \'auto\';\n};\ncipher = ("aes-128-gcm"/"aes-192-gcm"/"aes-256-gcm"/"aes-128-cfb"/"aes-192-cfb"/"aes-256-cfb"/"aes-128-ctr"/"aes-192-ctr"/"aes-256-ctr"/"rc4-md5"/"chacha20-ietf-poly1305"/"chacha20-ietf"/"chacha20-poly1305"/"chacha20"/"none");\naead = comma "aead" equals flag:bool { proxy.aead = flag; }\n\nudp_relay = comma "udp-relay" equals flag:bool { proxy.udp = flag; }\nudp_over_tcp = comma "udp-over-tcp" equals flag:bool { throw new Error("UDP over TCP is not supported"); }\nfast_open = comma "fast-open" equals flag:bool { proxy.tfo = flag; }\n\nover_tls = comma "over-tls" equals flag:bool { proxy.tls = flag; }\ntls_host = comma "tls-host" equals sni:domain { proxy.sni = sni; }\ntls_verification = comma "tls-verification" equals flag:bool { \n proxy["skip-cert-verify"] = !flag;\n}\ntls_fingerprint = comma "tls-cert-sha256" equals tls_fingerprint:$[^,]+ { proxy["tls-fingerprint"] = tls_fingerprint.trim(); }\n\nobfs_ss = comma "obfs" equals type:("http"/"tls"/"wss"/"ws"/"over-tls") { obfs.type = type; return type; }\nobfs_ssr = comma "obfs" equals type:("plain"/"http_simple"/"http_post"/"random_head"/"tls1.2_ticket_auth"/"tls1.2_ticket_fastauth") { obfs.type = type; return type; }\nobfs = comma "obfs" equals type:("wss"/"ws"/"over-tls"/"http") { obfs.type = type; return type; };\n\nobfs_host = comma "obfs-host" equals host:domain { obfs.host = host; }\nobfs_uri = comma "obfs-uri" equals uri:uri { obfs.path = uri; }\n\nssr_protocol = comma "ssr-protocol" equals protocol:("origin"/"auth_sha1_v4"/"auth_aes128_md5"/"auth_aes128_sha1"/"auth_chain_a"/"auth_chain_b") { proxy.protocol = protocol; return protocol; }\nssr_protocol_param = comma "ssr-protocol-param" equals param:$[^=,]+ { proxy["protocol-param"] = param; }\n\nuri = $[^,]+\n\ntag = comma "tag" equals tag:[^=,]+ { proxy.name = tag.join(""); }\nothers = comma [^=,]+ equals [^=,]+\ncomma = _ "," _\nequals = _ "=" _\n_ = [ \\r\\t]*\nbool = b:("true"/"false") { return b === "true" }\n'])||(__raw_72=__strings_72.slice(0)),___templateObject_72=Object.freeze(Object.defineProperties(__strings_72,{raw:{value:Object.freeze(__raw_72)}})))),_$parsers_70={};Object.defineProperty(_$parsers_70,"__esModule",{value:!0}),_$parsers_70.default=void 0;var ___surge_70=___interopRequireDefault_70(_$surge_73),___loon_70=___interopRequireDefault_70(_$loon_71),_qx=___interopRequireDefault_70(_$qx_72);function ___interopRequireDefault_70(t){return t&&t.__esModule?t:{default:t}}function __ownKeys_70(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ___objectSpread_70(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?__ownKeys_70(Object(r),!0).forEach((function(e){___defineProperty_70(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):__ownKeys_70(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ___defineProperty_70(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ___slicedToArray_70(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a=[],i=!0,u=!1;try{for(r=r.call(t);!(i=(n=r.next()).done)&&(a.push(n.value),!e||a.length!==e);i=!0);}catch(s){u=!0,o=s}finally{try{i||null==r.return||r.return()}finally{if(u)throw o}}return a}}(t,e)||___unsupportedIterableToArray_70(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ___createForOfIteratorHelper_70(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=___unsupportedIterableToArray_70(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){u=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(u)throw a}}}}function ___unsupportedIterableToArray_70(t,e){if(t){if("string"==typeof t)return ___arrayLikeToArray_70(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?___arrayLikeToArray_70(t,e):void 0}}function ___arrayLikeToArray_70(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var ___default_70=[{name:"URI SS Parser",test:function(t){return/^ss:\/\//.test(t)},parse:function(t){var e=t.split("ss://")[1],r={name:decodeURIComponent(t.split("#")[1]),type:"ss"},n=(e=e.split("#")[0]).match(/@([^/]*)(\/|$)/)[1],o=n.lastIndexOf(":");r.server=n.substring(0,o),r.port=n.substring(o+1);var a=_$base64_4.Base64.decode(e.split("@")[0]).split(":");if(r.cipher=a[0],r.password=a[1],-1!==e.indexOf("?plugin=")){var i,u={},s=___createForOfIteratorHelper_70(("plugin="+decodeURIComponent(e.split("?plugin=")[1].split("&")[0])).split(";"));try{for(s.s();!(i=s.n()).done;){var c=___slicedToArray_70(i.value.split("="),2),l=c[0],p=c[1];l&&(u[l]=p||!0)}}catch(f){s.e(f)}finally{s.f()}switch(u.plugin){case"obfs-local":case"simple-obfs":r.plugin="obfs",r["plugin-opts"]={mode:u.obfs,host:(0,_$utils_104.getIfNotBlank)(u["obfs-host"])};break;case"v2ray-plugin":r.obfs="v2ray-plugin",r["plugin-opts"]={mode:"websocket",host:(0,_$utils_104.getIfNotBlank)(u["obfs-host"]),path:(0,_$utils_104.getIfNotBlank)(u.path),tls:(0,_$utils_104.getIfPresent)(u.tls)};break;default:throw new Error("Unsupported plugin option: ".concat(u.plugin))}}return r}},{name:"URI SSR Parser",test:function(t){return/^ssr:\/\//.test(t)},parse:function(t){var e=(t=_$base64_4.Base64.decode(t.split("ssr://")[1])).indexOf(":origin");-1===e&&(e=t.indexOf(":auth_"));var r=t.substring(0,e),n=r.substring(0,r.lastIndexOf(":")),o=r.substring(r.lastIndexOf(":")+1),a=t.substring(e+1).split("/?")[0].split(":"),i={type:"ssr",server:n,port:o,protocol:a[0],cipher:a[1],obfs:a[2],password:_$base64_4.Base64.decode(a[3])},u={};if((t=t.split("/?")[1].split("&")).length>1){var s,c=___createForOfIteratorHelper_70(t);try{for(c.s();!(s=c.n()).done;){var l=___slicedToArray_70(s.value.split("="),2),p=l[0],f=l[1];u[p]=f.trim()}}catch(_){c.e(_)}finally{c.f()}}return ___objectSpread_70(___objectSpread_70({},i),{},{name:u.remarks?_$base64_4.Base64.decode(u.remarks):i.server,"protocol-param":(0,_$utils_104.getIfNotBlank)(_$base64_4.Base64.decode(u.protoparam||"").replace(/\s/g,"")),"obfs-param":(0,_$utils_104.getIfNotBlank)(_$base64_4.Base64.decode(u.obfsparam||"").replace(/\s/g,""))})}},{name:"URI VMess Parser",test:function(t){return/^vmess:\/\//.test(t)},parse:function(t){t=t.split("vmess://")[1];var e=_$base64_4.Base64.decode(t);if(/=\s*vmess/.test(e)){var r,n=e.split(",").map((function(t){return t.trim()})),o={},a=___createForOfIteratorHelper_70(n);try{for(a.s();!(r=a.n()).done;){var i=r.value;if(-1!==i.indexOf("=")){var u=___slicedToArray_70(i.split("="),2),s=u[0],c=u[1];o[s.trim()]=c.trim()}}}catch(h){a.e(h)}finally{a.f()}var l={name:n[0].split("=")[0].trim(),type:"vmess",server:n[1],port:n[2],cipher:(0,_$utils_104.getIfNotBlank)(n[3],"auto"),uuid:n[4].match(/^"(.*)"$/)[1],tls:"wss"===o.obfs,udp:(0,_$utils_104.getIfPresent)(o["udp-relay"]),tfo:(0,_$utils_104.getIfPresent)(o["fast-open"]),"skip-cert-verify":(0,_$utils_104.isPresent)(o["tls-verification"])?!o["tls-verification"]:void 0};if((0,_$utils_104.isPresent)(o.obfs)){if("ws"!==o.obfs&&"wss"!==o.obfs)throw new Error("Unsupported obfs: ".concat(o.obfs));l.network="ws",l["ws-opts"].path=((0,_$utils_104.getIfNotBlank)(o["obfs-path"])||'"/"').match(/^"(.*)"$/)[1];var p=o["obfs-header"];p&&-1!==p.indexOf("Host")&&(p=p.match(/Host:\s*([a-zA-Z0-9-.]*)/)[1]),(0,_$utils_104.isNotBlank)(p)&&(l["ws-opts"].headers={Host:p})}return l}var f=JSON.parse(e),_={name:f.ps,type:"vmess",server:f.add,port:f.port,cipher:"auto",uuid:f.id,alterId:(0,_$utils_104.getIfPresent)(f.aid,0),tls:"tls"===f.tls||!0===f.tls,"skip-cert-verify":(0,_$utils_104.isPresent)(f.verify_cert)?!f.verify_cert:void 0};return"ws"===f.net&&(_.network="ws",_["ws-opts"]={path:(0,_$utils_104.getIfNotBlank)(f.path),headers:{Host:(0,_$utils_104.getIfNotBlank)(f.host)}},_.tls&&f.host&&(_.sni=f.host)),_}},{name:"URI Trojan Parser",test:function(t){return/^trojan:\/\//.test(t)},parse:function(t){var e,r=___slicedToArray_70((t=t.split("trojan://")[1]).split("@")[1].split("?")[0].split(":"),2),n=r[0],o=r[1],a=decodeURIComponent(t.split("#")[1].trim()),i=t.split("?"),u=null;return i.length>1&&(i=i[1].split("#")[0].split("&"),"1"!==(e=new Map(i.map((function(t){return t.split("=")})))).get("allowInsecure")&&"true"!==e.get("allowInsecure")||(u=!0)),{name:a||"[Trojan] ".concat(n),type:"trojan",server:n,port:o,password:t.split("@")[0],sni:(0,_$utils_104.getIfPresent)(e.get("sni")),"skip-cert-verify":(0,_$utils_104.getIfPresent)(u)}}},{name:"Clash Parser",test:function(t){try{JSON.parse(t)}catch(e){return!1}return!0},parse:function(t){return JSON.parse(t)}},{name:"Surge SS Parser",test:function(t){return/^.*=\s*ss/.test(t.split(",")[0])},parse:function(t){return(0,___surge_70.default)().parse(t)}},{name:"Surge VMess Parser",test:function(t){return/^.*=\s*vmess/.test(t.split(",")[0])&&-1!==t.indexOf("username")},parse:function(t){return(0,___surge_70.default)().parse(t)}},{name:"Surge Trojan Parser",test:function(t){return/^.*=\s*trojan/.test(t.split(",")[0])},parse:function(t){return(0,___surge_70.default)().parse(t)}},{name:"Surge HTTP Parser",test:function(t){return/^.*=\s*https?/.test(t.split(",")[0])},parse:function(t){return(0,___surge_70.default)().parse(t)}},{name:"Surge Snell Parser",test:function(t){return/^.*=\s*snell?/.test(t.split(",")[0])},parse:function(t){return(0,___surge_70.default)().parse(t)}},{name:"Surge Socks5 Parser",test:function(t){return/^.*=\s*socks5(-tls)?/.test(t.split(",")[0])},parse:function(t){return(0,___surge_70.default)().parse(t)}},{name:"Loon SS Parser",test:function(t){return"shadowsocks"===t.split(",")[0].split("=")[1].trim().toLowerCase()},parse:function(t){return(0,___loon_70.default)().parse(t)}},{name:"Loon SSR Parser",test:function(t){return"shadowsocksr"===t.split(",")[0].split("=")[1].trim().toLowerCase()},parse:function(t){return(0,___loon_70.default)().parse(t)}},{name:"Loon VMess Parser",test:function(t){return/^.*=\s*vmess/i.test(t.split(",")[0])&&-1===t.indexOf("username")},parse:function(t){return(0,___loon_70.default)().parse(t)}},{name:"Loon Vless Parser",test:function(t){return/^.*=\s*vless/i.test(t.split(",")[0])},parse:function(t){return(0,___loon_70.default)().parse(t)}},{name:"Loon Trojan Parser",test:function(t){return/^.*=\s*trojan/i.test(t.split(",")[0])},parse:function(t){return(0,___loon_70.default)().parse(t)}},{name:"Loon HTTP Parser",test:function(t){return/^.*=\s*http/i.test(t.split(",")[0])},parse:function(t){return(0,___loon_70.default)().parse(t)}},{name:"QX SS Parser",test:function(t){return/^shadowsocks\s*=/.test(t.split(",")[0].trim())&&-1===t.indexOf("ssr-protocol")},parse:function(t){return(0,_qx.default)().parse(t)}},{name:"QX SSR Parser",test:function(t){return/^shadowsocks\s*=/.test(t.split(",")[0].trim())&&-1!==t.indexOf("ssr-protocol")},parse:function(t){return(0,_qx.default)().parse(t)}},{name:"QX VMess Parser",test:function(t){return/^vmess\s*=/.test(t.split(",")[0].trim())},parse:function(t){return(0,_qx.default)().parse(t)}},{name:"QX Trojan Parser",test:function(t){return/^trojan\s*=/.test(t.split(",")[0].trim())},parse:function(t){return(0,_qx.default)().parse(t)}},{name:"QX HTTP Parser",test:function(t){return/^http\s*=/.test(t.split(",")[0].trim())},parse:function(t){return(0,_qx.default)().parse(t)}},{name:"QX Socks5 Parser",test:function(t){return/^socks5\s*=/.test(t.split(",")[0].trim())},parse:function(t){return(0,_qx.default)().parse(t)}}];_$parsers_70.default=___default_70;var _$proxyUtils_69={};function ___typeof_69(t){return(___typeof_69="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(_$proxyUtils_69,"__esModule",{value:!0}),_$proxyUtils_69.ProxyUtils=void 0;var ___download_69=___interopRequireDefault_69(_$download_100),_processors=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==___typeof_69(t)&&"function"!=typeof t)return{default:t};var r=___getRequireWildcardCache_69(void 0);if(r&&r.has(t))return r.get(t);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var i=o?Object.getOwnPropertyDescriptor(t,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=t[a]}return n.default=t,r&&r.set(t,n),n}(_$processors_75),_preprocessors=___interopRequireDefault_69(_$preprocessors_74),_producers=___interopRequireDefault_69(_$producers_77),_parsers=___interopRequireDefault_69(_$parsers_70),___app_69=___interopRequireDefault_69(_$app_68);function ___getRequireWildcardCache_69(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(___getRequireWildcardCache_69=function(t){return t?r:e})(t)}function ___interopRequireDefault_69(t){return t&&t.__esModule?t:{default:t}}function ___regeneratorRuntime_69(){___regeneratorRuntime_69=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(x){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),i=new w(n||[]);return a._invoke=function(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return{value:void 0,done:!0}}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var u=b(i,r);if(u){if(u===l)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=c(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),a}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(x){return{type:"throw",arg:x}}}t.wrap=s;var l={};function p(){}function f(){}function _(){}var h={};u(h,o,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(C([])));y&&y!==e&&r.call(y,o)&&(h=y);var v=_.prototype=p.prototype=Object.create(h);function g(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){var n;this._invoke=function(o,a){function i(){return new e((function(n,i){!function n(o,a,i,u){var s=c(t[o],t,a);if("throw"!==s.type){var l=s.arg,p=l.value;return p&&"object"==___typeof_69(p)&&r.call(p,"__await")?e.resolve(p.__await).then((function(t){n("next",t,i,u)}),(function(t){n("throw",t,i,u)})):e.resolve(p).then((function(t){l.value=t,i(l)}),(function(t){return n("throw",t,i,u)}))}u(s.arg)}(o,a,n,i)}))}return n=n?n.then(i,i):i()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function C(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=_,u(v,"constructor",_),u(_,"constructor",f),f.displayName=u(_,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,u(t,i,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(m.prototype),u(m.prototype,a,(function(){return this})),t.AsyncIterator=m,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new m(s(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(v),u(v,i,"Generator"),u(v,o,(function(){return this})),u(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=C,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,l):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:C(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function __asyncGeneratorStep_69(t,e,r,n,o,a,i){try{var u=t[a](i),s=u.value}catch(c){return void r(c)}u.done?e(s):Promise.resolve(s).then(n,o)}function ___slicedToArray_69(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a=[],i=!0,u=!1;try{for(r=r.call(t);!(i=(n=r.next()).done)&&(a.push(n.value),!e||a.length!==e);i=!0);}catch(s){u=!0,o=s}finally{try{i||null==r.return||r.return()}finally{if(u)throw o}}return a}}(t,e)||___unsupportedIterableToArray_69(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ___createForOfIteratorHelper_69(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=___unsupportedIterableToArray_69(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){u=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(u)throw a}}}}function ___unsupportedIterableToArray_69(t,e){if(t){if("string"==typeof t)return ___arrayLikeToArray_69(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?___arrayLikeToArray_69(t,e):void 0}}function ___arrayLikeToArray_69(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function _process(){var t;return t=___regeneratorRuntime_69().mark((function t(e){var r,n,o,a,i,u,s,c,l,p,f,_,h,d,y,v,g,m,b=arguments;return ___regeneratorRuntime_69().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=b.length>1&&void 0!==b[1]?b[1]:[],n=b.length>2?b[2]:void 0,o=___createForOfIteratorHelper_69(r),t.prev=3,o.s();case 5:if((a=o.n()).done){t.next=39;break}if(i=a.value,u=void 0,s={},-1===i.type.indexOf("Script")){t.next=28;break}if(c=i.args,l=c.mode,p=c.content,"link"!==l){t.next=27;break}if((_=(f=p).split("#")).length>1){h=___createForOfIteratorHelper_69(_[1].split("&"));try{for(h.s();!(d=h.n()).done;)y=d.value,v=y.split("=")[0],g=y.split("=")[1]||!0,s[v]=g}catch(A){h.e(A)}finally{h.f()}}return t.prev=15,t.next=18,(0,___download_69.default)(f.split("#")[0]);case 18:u=t.sent,t.next=25;break;case 21:return t.prev=21,t.t0=t.catch(15),___app_69.default.error("Error when downloading remote script: ".concat(i.args.content,".\n Reason: ").concat(t.t0)),t.abrupt("continue",37);case 25:t.next=28;break;case 27:u=p;case 28:if(_processors.default[i.type]){t.next=31;break}return ___app_69.default.error('Unknown operator: "'.concat(i.type,'"')),t.abrupt("continue",37);case 31:return ___app_69.default.info('Applying "'.concat(i.type,'" with arguments:\n >>> ').concat(JSON.stringify(i.args,null,2)||"None")),m=void 0,m=-1!==i.type.indexOf("Script")?_processors.default[i.type](u,n,s):_processors.default[i.type](i.args||{}),t.next=36,(0,_processors.ApplyProcessor)(m,e);case 36:e=t.sent;case 37:t.next=5;break;case 39:t.next=44;break;case 41:t.prev=41,t.t1=t.catch(3),o.e(t.t1);case 44:return t.prev=44,o.f(),t.finish(44);case 47:return t.abrupt("return",e);case 48:case"end":return t.stop()}}),t,null,[[3,41,44,47],[15,21]])})),(_process=function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){__asyncGeneratorStep_69(a,n,o,i,u,"next",t)}function u(t){__asyncGeneratorStep_69(a,n,o,i,u,"throw",t)}i(void 0)}))}).apply(this,arguments)}var ProxyUtils={parse:function(t){t=function(t){var e,r=___createForOfIteratorHelper_69(_preprocessors.default);try{for(r.s();!(e=r.n()).done;){var n=e.value;try{if(n.test(t))return ___app_69.default.info("Pre-processor [".concat(n.name,"] activated")),n.parse(t)}catch(o){___app_69.default.error("Parser [".concat(n.name,"] failed\n Reason: ").concat(o))}}}catch(a){r.e(a)}finally{r.f()}return t}(t);var e,r,n=[],o=___createForOfIteratorHelper_69(t.split("\n"));try{for(o.s();!(r=o.n()).done;){var a=r.value;if(0!==(a=a.trim()).length){var i=!1;if(e){var u=___slicedToArray_69(tryParse(e,a),2),s=u[0];u[1]||(n.push(s),i=!0)}if(!i){var c,l=___createForOfIteratorHelper_69(_parsers.default);try{for(l.s();!(c=l.n()).done;){var p=c.value,f=___slicedToArray_69(tryParse(p,a),2),_=f[0];f[1]||(n.push(_),e=p,i=!0,___app_69.default.info("".concat(p.name," is activated")))}}catch(h){l.e(h)}finally{l.f()}}i||___app_69.default.error("Failed to parse line: ".concat(a))}}}catch(h){o.e(h)}finally{o.f()}return n},process:function(t){return _process.apply(this,arguments)},produce:function(t,e){var r=_producers.default[e];if(!r)throw new Error("Target platform: ".concat(e," is not supported!"));return t=t.filter((function(t){return!(t.supported&&!1===t.supported[e])})),___app_69.default.info("Producing proxies for target: ".concat(e)),void 0===r.type||"SINGLE"===r.type?t.map((function(t){try{return r.produce(t)}catch(e){return ___app_69.default.error("Cannot produce proxy: ".concat(JSON.stringify(t,null,2),"\nReason: ").concat(e)),""}})).filter((function(t){return t.length>0})).join("\n"):"ALL"===r.type?r.produce(t):void 0}};function tryParse(t,e){if(!function(t,e){try{return t.test(e)}catch(r){return!1}}(t,e))return[null,new Error("Parser mismatch")];try{return[t.parse(e),null]}catch(r){return[null,r]}}_$proxyUtils_69.ProxyUtils=ProxyUtils;var _$preprocessors_86={};Object.defineProperty(_$preprocessors_86,"__esModule",{value:!0}),_$preprocessors_86.default=void 0;var ___default_86=[{name:"HTML",test:function(t){return/^<!DOCTYPE html>/.test(t)},parse:function(){return""}},{name:"Clash Provider",test:function(t){return 0===t.indexOf("payload:")},parse:function(t){return t.replace("payload:","").replace(/^\s*-\s*/gm,"")}}];_$preprocessors_86.default=___default_86;var _$producers_87={};Object.defineProperty(_$producers_87,"__esModule",{value:!0}),_$producers_87.default=void 0;var __obj_87,___staticJsYaml_87=(__obj_87=_$staticJsYaml_65)&&__obj_87.__esModule?__obj_87:{default:__obj_87},___default_87={QX:{type:"SINGLE",func:function(t){return-1!==["URL-REGEX","DEST-PORT","SRC-IP","IN-PORT","PROTOCOL"].indexOf(t.type)?null:"".concat({"DOMAIN-KEYWORD":"HOST-KEYWORD","DOMAIN-SUFFIX":"HOST-SUFFIX",DOMAIN:"HOST","IP-CIDR6":"IP6-CIDR"}[t.type]||t.type,",").concat(t.content,",SUB-STORE")}},Surge:{type:"SINGLE",func:function(t){var e="".concat(t.type,",").concat(t.content);return"IP-CIDR"!==t.type&&"IP-CIDR6"!==t.type||(e+=t.options?",".concat(t.options[0]):""),e}},Loon:{type:"SINGLE",func:function(t){return-1!==["DEST-PORT","SRC-IP","IN-PORT","PROTOCOL"].indexOf(t.type)?null:function(t){var e="".concat(t.type,",").concat(t.content);return"IP-CIDR"!==t.type&&"IP-CIDR6"!==t.type||(e+=t.options?",".concat(t.options[0]):""),e}(t)}},Clash:{type:"ALL",func:function(t){var e={"DEST-PORT":"DST-PORT","SRC-IP":"SRC-IP-CIDR","IN-PORT":"SRC-PORT"},r={payload:t.map((function(t){var r="".concat(e[t.type]||t.type,",").concat(t.content);return"IP-CIDR"!==t.type&&"IP-CIDR6"!==t.type||(r+=t.options?",".concat(t.options[0]):""),r}))};return ___staticJsYaml_87.default.dump(r)}}};_$producers_87.default=___default_87;var _$parsers_85={};function ___createForOfIteratorHelper_85(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return ___arrayLikeToArray_85(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?___arrayLikeToArray_85(t,void 0):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){u=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(u)throw a}}}}function ___arrayLikeToArray_85(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}Object.defineProperty(_$parsers_85,"__esModule",{value:!0}),_$parsers_85.default=void 0;var RULE_TYPES_MAPPING=[[/^(DOMAIN|host|HOST)$/,"DOMAIN"],[/^(DOMAIN-KEYWORD|host-keyword|HOST-KEYWORD)$/,"DOMAIN-KEYWORD"],[/^(DOMAIN-SUFFIX|host-suffix|HOST-SUFFIX)$/,"DOMAIN-SUFFIX"],[/^USER-AGENT$/i,"USER-AGENT"],[/^PROCESS-NAME$/,"PROCESS-NAME"],[/^(DEST-PORT|DST-PORT)$/,"DST-PORT"],[/^SRC-IP(-CIDR)?$/,"SRC-IP"],[/^(IN|SRC)-PORT$/,"IN-PORT"],[/^PROTOCOL$/,"PROTOCOL"],[/^IP-CIDR$/i,"IP-CIDR"],[/^(IP-CIDR6|ip6-cidr|IP6-CIDR)$/]],___default_85=[{name:"Universal Rule Parser",test:function(){return!0},parse:function(t){var e,r=[],n=___createForOfIteratorHelper_85(t.split("\n"));try{for(n.s();!(e=n.n()).done;){var o=e.value;if(0!==(o=o.trim()).length&&!/\s*#/.test(o))try{var a,i=o.split(",").map((function(t){return t.trim()})),u=i[0],s=!1,c=___createForOfIteratorHelper_85(RULE_TYPES_MAPPING);try{for(c.s();!(a=c.n()).done;){var l=a.value;if(l[0].test(u)){s=!0;var p={type:l[1],content:i[1]};"IP-CIDR"!==p.type&&"IP-CIDR6"!==p.type||(p.options=i.slice(2)),r.push(p)}}}catch(f){c.e(f)}finally{c.f()}if(!s)throw new Error("Invalid rule type: "+u)}catch(_){console.error("Failed to parse line: ".concat(o,"\n Reason: ").concat(_))}}}catch(f){n.e(f)}finally{n.f()}return r}}];_$parsers_85.default=___default_85;var _$ruleUtils_84={};Object.defineProperty(_$ruleUtils_84,"__esModule",{value:!0}),_$ruleUtils_84.RuleUtils=void 0;var ___preprocessors_84=___interopRequireDefault_84(_$preprocessors_86),___producers_84=___interopRequireDefault_84(_$producers_87),___parsers_84=___interopRequireDefault_84(_$parsers_85),___app_84=___interopRequireDefault_84(_$app_68);function ___interopRequireDefault_84(t){return t&&t.__esModule?t:{default:t}}function ___createForOfIteratorHelper_84(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return ___arrayLikeToArray_84(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?___arrayLikeToArray_84(t,void 0):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){u=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(u)throw a}}}}function ___arrayLikeToArray_84(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var RuleUtils={parse:function(t){t=function(t){var e,r=___createForOfIteratorHelper_84(___preprocessors_84.default);try{for(r.s();!(e=r.n()).done;){var n=e.value;try{if(n.test(t))return ___app_84.default.info("Pre-processor [".concat(n.name,"] activated")),n.parse(t)}catch(o){___app_84.default.error("Parser [".concat(n.name,"] failed\n Reason: ").concat(o))}}}catch(a){r.e(a)}finally{r.f()}return t}(t);var e,r=___createForOfIteratorHelper_84(___parsers_84.default);try{for(r.s();!(e=r.n()).done;){var n=e.value,o=void 0;try{o=n.test(t)}catch(a){o=!1}if(o)return ___app_84.default.info("Rule parser [".concat(n.name,"] is activated!")),n.parse(t)}}catch(a){r.e(a)}finally{r.f()}},produce:function(t,e){var r=___producers_84.default[e];if(!r)throw new Error("Target platform: ".concat(e," is not supported!"));return void 0===r.type||"SINGLE"===r.type?t.map((function(t){try{return r.func(t)}catch(e){return console.log("ERROR: cannot produce rule: ".concat(JSON.stringify(t),"\nReason: ").concat(e)),""}})).filter((function(t){return t.length>0})).join("\n"):"ALL"===r.type?r.func(t):void 0}};_$ruleUtils_84.RuleUtils=RuleUtils;var _$artifacts_89={};function ___typeof_89(t){return(___typeof_89="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(_$artifacts_89,"__esModule",{value:!0}),_$artifacts_89.default=function(t){___app_89.default.read(_$constants_67.ARTIFACTS_KEY)||___app_89.default.write({},_$constants_67.ARTIFACTS_KEY),t.route("/api/artifacts").get(getAllArtifacts).post(createArtifact),t.route("/api/artifact/:name").get(getArtifact).patch(updateArtifact).delete(deleteArtifact),t.get("/api/sync/artifacts",syncAllArtifacts),t.get("/api/sync/artifact/:name",syncArtifact)},_$artifacts_89.produceArtifact=produceArtifact,_$artifacts_89.syncToGist=syncToGist;var ___download_89=___interopRequireDefault_89(_$download_100),_gist=___interopRequireDefault_89(_$gist_103),___app_89=___interopRequireDefault_89(_$app_68);function ___interopRequireDefault_89(t){return t&&t.__esModule?t:{default:t}}function ___createForOfIteratorHelper_89(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return ___arrayLikeToArray_89(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?___arrayLikeToArray_89(t,void 0):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){u=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(u)throw a}}}}function ___arrayLikeToArray_89(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ___regeneratorRuntime_89(){___regeneratorRuntime_89=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(x){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),i=new w(n||[]);return a._invoke=function(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return{value:void 0,done:!0}}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var u=b(i,r);if(u){if(u===l)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=c(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),a}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(x){return{type:"throw",arg:x}}}t.wrap=s;var l={};function p(){}function f(){}function _(){}var h={};u(h,o,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(C([])));y&&y!==e&&r.call(y,o)&&(h=y);var v=_.prototype=p.prototype=Object.create(h);function g(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){var n;this._invoke=function(o,a){function i(){return new e((function(n,i){!function n(o,a,i,u){var s=c(t[o],t,a);if("throw"!==s.type){var l=s.arg,p=l.value;return p&&"object"==___typeof_89(p)&&r.call(p,"__await")?e.resolve(p.__await).then((function(t){n("next",t,i,u)}),(function(t){n("throw",t,i,u)})):e.resolve(p).then((function(t){l.value=t,i(l)}),(function(t){return n("throw",t,i,u)}))}u(s.arg)}(o,a,n,i)}))}return n=n?n.then(i,i):i()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function C(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=_,u(v,"constructor",_),u(_,"constructor",f),f.displayName=u(_,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,u(t,i,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(m.prototype),u(m.prototype,a,(function(){return this})),t.AsyncIterator=m,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new m(s(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(v),u(v,i,"Generator"),u(v,o,(function(){return this})),u(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=C,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,l):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:C(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function __ownKeys_89(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ___objectSpread_89(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?__ownKeys_89(Object(r),!0).forEach((function(e){___defineProperty_89(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):__ownKeys_89(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ___defineProperty_89(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function __asyncGeneratorStep_89(t,e,r,n,o,a,i){try{var u=t[a](i),s=u.value}catch(c){return void r(c)}u.done?e(s):Promise.resolve(s).then(n,o)}function ___asyncToGenerator_89(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){__asyncGeneratorStep_89(a,n,o,i,u,"next",t)}function u(t){__asyncGeneratorStep_89(a,n,o,i,u,"throw",t)}i(void 0)}))}}function getAllArtifacts(t,e){var r=___app_89.default.read(_$constants_67.ARTIFACTS_KEY);(0,_$response_95.success)(e,r)}function getArtifact(t,e){return _getArtifact.apply(this,arguments)}function _getArtifact(){return(_getArtifact=___asyncToGenerator_89(___regeneratorRuntime_89().mark((function t(e,r){var n,o,a;return ___regeneratorRuntime_89().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.params.name,n=decodeURIComponent(n),o=___app_89.default.read(_$constants_67.ARTIFACTS_KEY),(a=(0,_$database_99.findByName)(o,n))?(0,_$response_95.success)(r,a):(0,_$response_95.failed)(r,new _$errors_92.ResourceNotFoundError("RESOURCE_NOT_FOUND","Artifact ".concat(n," does not exist!")),404);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function createArtifact(t,e){var r=t.body;if(validateArtifactName(r.name)){___app_89.default.info("\u6b63\u5728\u521b\u5efa\u8fdc\u7a0b\u914d\u7f6e\uff1a".concat(r.name));var n=___app_89.default.read(_$constants_67.ARTIFACTS_KEY);(0,_$database_99.findByName)(n,r.name)?(0,_$response_95.failed)(e,new _$errors_92.RequestInvalidError("DUPLICATE_KEY","Artifact ".concat(r.name," already exists."))):(n.push(r),___app_89.default.write(n,_$constants_67.ARTIFACTS_KEY),(0,_$response_95.success)(e,r,201))}else(0,_$response_95.failed)(e,new _$errors_92.RequestInvalidError("INVALID_ARTIFACT_NAME","Artifact name ".concat(r.name," is invalid.")))}function updateArtifact(t,e){var r=___app_89.default.read(_$constants_67.ARTIFACTS_KEY),n=t.params.name;n=decodeURIComponent(n);var o=(0,_$database_99.findByName)(r,n);if(o){___app_89.default.info("\u6b63\u5728\u66f4\u65b0\u8fdc\u7a0b\u914d\u7f6e\uff1a".concat(o.name));var a=___objectSpread_89(___objectSpread_89({},o),t.body);if(!validateArtifactName(a.name))return void(0,_$response_95.failed)(e,new _$errors_92.RequestInvalidError("INVALID_ARTIFACT_NAME","Artifact name ".concat(a.name," is invalid.")));(0,_$database_99.updateByName)(r,n,a),___app_89.default.write(r,_$constants_67.ARTIFACTS_KEY),(0,_$response_95.success)(e,a)}else(0,_$response_95.failed)(e,new _$errors_92.RequestInvalidError("DUPLICATE_KEY","Artifact ".concat(n," already exists.")))}function deleteArtifact(t,e){return _deleteArtifact.apply(this,arguments)}function _deleteArtifact(){return(_deleteArtifact=___asyncToGenerator_89(___regeneratorRuntime_89().mark((function t(e,r){var n,o,a,i;return ___regeneratorRuntime_89().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.params.name,n=decodeURIComponent(n),___app_89.default.info("\u6b63\u5728\u5220\u9664\u8fdc\u7a0b\u914d\u7f6e\uff1a".concat(n)),o=___app_89.default.read(_$constants_67.ARTIFACTS_KEY),t.prev=4,a=(0,_$database_99.findByName)(o,n)){t.next=8;break}throw new Error("\u8fdc\u7a0b\u914d\u7f6e\uff1a".concat(n,"\u4e0d\u5b58\u5728\uff01"));case 8:if(!a.updated){t.next=13;break}return(i={})[encodeURIComponent(a.name)]={content:""},t.next=13,syncToGist(i);case 13:(0,_$database_99.deleteByName)(o,n),___app_89.default.write(o,_$constants_67.ARTIFACTS_KEY),(0,_$response_95.success)(r),t.next=22;break;case 18:t.prev=18,t.t0=t.catch(4),___app_89.default.error("\u65e0\u6cd5\u5220\u9664\u8fdc\u7a0b\u914d\u7f6e\uff1a".concat(n,"\uff0c\u539f\u56e0\uff1a").concat(t.t0)),(0,_$response_95.failed)(r,new _$errors_92.InternalServerError("FAILED_TO_DELETE_ARTIFACT","Failed to delete artifact ".concat(n),"Reason: ".concat(t.t0)));case 22:case"end":return t.stop()}}),t,null,[[4,18]])})))).apply(this,arguments)}function syncArtifact(t,e){return _syncArtifact.apply(this,arguments)}function _syncArtifact(){return(_syncArtifact=___asyncToGenerator_89(___regeneratorRuntime_89().mark((function t(e,r){var n,o,a,i,u,s;return ___regeneratorRuntime_89().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.params.name,n=decodeURIComponent(n),o=___app_89.default.read(_$constants_67.ARTIFACTS_KEY),a=(0,_$database_99.findByName)(o,n)){t.next=7;break}return(0,_$response_95.failed)(r,new _$errors_92.ResourceNotFoundError("RESOURCE_NOT_FOUND","Artifact ".concat(n," does not exist!")),404),t.abrupt("return");case 7:return t.next=9,produceArtifact({type:a.type,name:a.source,platform:a.platform});case 9:return i=t.sent,___app_89.default.info("\u6b63\u5728\u4e0a\u4f20\u914d\u7f6e\uff1a".concat(a.name,"\n>>>").concat(JSON.stringify(a,null,2))),t.prev=11,t.next=14,syncToGist(___defineProperty_89({},encodeURIComponent(a.name),{content:i}));case 14:u=t.sent,a.updated=(new Date).getTime(),s=JSON.parse(u.body),a.url=s.files[encodeURIComponent(a.name)].raw_url.replace(/\/raw\/[^/]*\/(.*)/,"/raw/$1"),___app_89.default.write(o,_$constants_67.ARTIFACTS_KEY),(0,_$response_95.success)(r,a),t.next=25;break;case 22:t.prev=22,t.t0=t.catch(11),(0,_$response_95.failed)(r,new _$errors_92.InternalServerError("FAILED_TO_SYNC_ARTIFACT","Failed to sync artifact ".concat(n),"Reason: ".concat(t.t0)));case 25:case"end":return t.stop()}}),t,null,[[11,22]])})))).apply(this,arguments)}function syncAllArtifacts(t,e){return _syncAllArtifacts.apply(this,arguments)}function _syncAllArtifacts(){return(_syncAllArtifacts=___asyncToGenerator_89(___regeneratorRuntime_89().mark((function t(e,r){var n,o,a,i,u,s,c;return ___regeneratorRuntime_89().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return ___app_89.default.info("\u5f00\u59cb\u540c\u6b65\u6240\u6709\u8fdc\u7a0b\u914d\u7f6e..."),n=___app_89.default.read(_$constants_67.ARTIFACTS_KEY),o={},t.prev=3,t.next=6,Promise.all(n.map(function(){var t=___asyncToGenerator_89(___regeneratorRuntime_89().mark((function t(e){var r;return ___regeneratorRuntime_89().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.sync){t.next=6;break}return ___app_89.default.info("\u6b63\u5728\u540c\u6b65\u4e91\u914d\u7f6e\uff1a".concat(e.name,"...")),t.next=4,produceArtifact({type:e.type,name:e.source,platform:e.platform});case 4:r=t.sent,o[e.name]={content:r};case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 6:return t.next=8,syncToGist(o);case 8:a=t.sent,i=JSON.parse(a.body),u=___createForOfIteratorHelper_89(n);try{for(u.s();!(s=u.n()).done;)(c=s.value).updated=(new Date).getTime(),c.url=i.files[c.name].raw_url.replace(/\/raw\/[^/]*\/(.*)/,"/raw/$1")}catch(e){u.e(e)}finally{u.f()}___app_89.default.write(n,_$constants_67.ARTIFACTS_KEY),___app_89.default.info("\u5168\u90e8\u8ba2\u9605\u540c\u6b65\u6210\u529f\uff01"),(0,_$response_95.success)(r),t.next=21;break;case 17:t.prev=17,t.t0=t.catch(3),(0,_$response_95.failed)(r,new _$errors_92.InternalServerError("FAILED_TO_SYNC_ARTIFACTS","Failed to sync all artifacts","Reason: ".concat(t.t0))),___app_89.default.info("\u540c\u6b65\u8ba2\u9605\u5931\u8d25\uff0c\u539f\u56e0\uff1a".concat(t.t0));case 21:case"end":return t.stop()}}),t,null,[[3,17]])})))).apply(this,arguments)}function syncToGist(t){return _syncToGist.apply(this,arguments)}function _syncToGist(){return(_syncToGist=___asyncToGenerator_89(___regeneratorRuntime_89().mark((function t(e){var r,n,o;return ___regeneratorRuntime_89().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=___app_89.default.read(_$constants_67.SETTINGS_KEY),n=r.gistToken){t.next=3;break}return t.abrupt("return",Promise.reject("\u672a\u8bbe\u7f6eGist Token\uff01"));case 3:return o=new _gist.default({token:n,key:_$constants_67.ARTIFACT_REPOSITORY_KEY}),t.abrupt("return",o.upload(e));case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function produceArtifact(t){return _produceArtifact.apply(this,arguments)}function _produceArtifact(){return(_produceArtifact=___asyncToGenerator_89(___regeneratorRuntime_89().mark((function t(e){var r,n,o,a,i,u,s,c,l,p,f,_,h,d,y,v,g,m,b,A,E,w,C,S,x,$,O,P,F,R;return ___regeneratorRuntime_89().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.type,n=e.name,"ShadowRocket"===(o=(o=e.platform)||"JSON")&&(o="Clash"),"subscription"!==r){t.next=40;break}if(a=___app_89.default.read(_$constants_67.SUBS_KEY),"local"!==(i=(0,_$database_99.findByName)(a,n)).source){t.next=10;break}u=i.content,t.next=13;break;case 10:return t.next=12,(0,___download_89.default)(i.url,i.ua);case 12:u=t.sent;case 13:return s=_$proxyUtils_69.ProxyUtils.parse(u),t.next=16,_$proxyUtils_69.ProxyUtils.process(s,i.process||[],o);case 16:s=t.sent,c={},l=___createForOfIteratorHelper_89(s),t.prev=19,l.s();case 21:if((p=l.n()).done){t.next=29;break}if(f=p.value,!c[f.name]){t.next=26;break}return ___app_89.default.notify("\ud83c\udf0d \u300e \ud835\udc7a\ud835\udc96\ud835\udc83-\ud835\udc7a\ud835\udc95\ud835\udc90\ud835\udc93\ud835\udc86 \u300f","\u26a0\ufe0f \u8ba2\u9605\u5305\u542b\u91cd\u590d\u8282\u70b9\uff01","\u8bf7\u4ed4\u7ec6\u68c0\u6d4b\u914d\u7f6e\uff01",{"media-url":"https://cdn3.iconfinder.com/data/icons/seo-outline-1/512/25_code_program_programming_develop_bug_search_developer-512.png"}),t.abrupt("break",29);case 26:c[f.name]=!0;case 27:t.next=21;break;case 29:t.next=34;break;case 31:t.prev=31,t.t0=t.catch(19),l.e(t.t0);case 34:return t.prev=34,l.f(),t.finish(34);case 37:return t.abrupt("return",_$proxyUtils_69.ProxyUtils.produce(s,o));case 40:if("collection"!==r){t.next=78;break}return _=___app_89.default.read(_$constants_67.SUBS_KEY),h=___app_89.default.read(_$constants_67.COLLECTIONS_KEY),d=(0,_$database_99.findByName)(h,n),y=d.subscriptions,v={},g=0,t.next=49,Promise.all(y.map(function(){var t=___asyncToGenerator_89(___regeneratorRuntime_89().mark((function t(e){var r,n,a;return ___regeneratorRuntime_89().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=(0,_$database_99.findByName)(_,e),t.prev=1,___app_89.default.info("\u6b63\u5728\u5904\u7406\u5b50\u8ba2\u9605\uff1a".concat(r.name,"...")),"local"!==r.source){t.next=7;break}n=r.content,t.next=10;break;case 7:return t.next=9,(0,___download_89.default)(r.url,r.ua);case 9:n=t.sent;case 10:return a=_$proxyUtils_69.ProxyUtils.parse(n),t.next=13,_$proxyUtils_69.ProxyUtils.process(a,r.process||[],o);case 13:a=t.sent,v[e]=a,g++,___app_89.default.info("\u2705 \u5b50\u8ba2\u9605\uff1a".concat(r.name,"\u52a0\u8f7d\u6210\u529f\uff0c\u8fdb\u5ea6--").concat(100*(g/y.length).toFixed(1),"% ")),t.next=23;break;case 19:t.prev=19,t.t0=t.catch(1),g++,___app_89.default.error("\u274c \u5904\u7406\u7ec4\u5408\u8ba2\u9605\u4e2d\u7684\u5b50\u8ba2\u9605: ".concat(r.name,"\u65f6\u51fa\u73b0\u9519\u8bef\uff1a").concat(t.t0,"\uff0c\u8be5\u8ba2\u9605\u5df2\u88ab\u8df3\u8fc7\uff01\u8fdb\u5ea6--").concat(100*(g/y.length).toFixed(1),"%"));case 23:case"end":return t.stop()}}),t,null,[[1,19]])})));return function(e){return t.apply(this,arguments)}}()));case 49:return m=Array.prototype.concat.apply([],y.map((function(t){return v[t]}))),t.next=52,_$proxyUtils_69.ProxyUtils.process(m,d.process||[],o);case 52:if(0!==(m=t.sent).length){t.next=55;break}throw new Error("\u7ec4\u5408\u8ba2\u9605\u4e2d\u4e0d\u542b\u6709\u6548\u8282\u70b9\uff01");case 55:b={},A=___createForOfIteratorHelper_89(m),t.prev=57,A.s();case 59:if((E=A.n()).done){t.next=67;break}if(w=E.value,!b[w.name]){t.next=64;break}return ___app_89.default.notify("\ud83c\udf0d \u300e \ud835\udc7a\ud835\udc96\ud835\udc83-\ud835\udc7a\ud835\udc95\ud835\udc90\ud835\udc93\ud835\udc86 \u300f","\u26a0\ufe0f \u8ba2\u9605\u5305\u542b\u91cd\u590d\u8282\u70b9\uff01","\u8bf7\u4ed4\u7ec6\u68c0\u6d4b\u914d\u7f6e\uff01",{"media-url":"https://cdn3.iconfinder.com/data/icons/seo-outline-1/512/25_code_program_programming_develop_bug_search_developer-512.png"}),t.abrupt("break",67);case 64:b[w.name]=!0;case 65:t.next=59;break;case 67:t.next=72;break;case 69:t.prev=69,t.t1=t.catch(57),A.e(t.t1);case 72:return t.prev=72,A.f(),t.finish(72);case 75:return t.abrupt("return",_$proxyUtils_69.ProxyUtils.produce(m,o));case 78:if("rule"!==r){t.next=105;break}C=___app_89.default.read(_$constants_67.RULES_KEY),S=(0,_$database_99.findByName)(C,n),x=[],$=0;case 83:if(!($<S.urls.length)){t.next=101;break}return O=S.urls[$],___app_89.default.info("\u6b63\u5728\u5904\u7406URL\uff1a".concat(O,"\uff0c\u8fdb\u5ea6--").concat(100*(($+1)/S.urls.length).toFixed(1),"% ")),t.prev=86,t.next=89,(0,___download_89.default)(O);case 89:P=t.sent,F=P.body,R=_$ruleUtils_84.RuleUtils.parse(F),x=x.concat(R),t.next=98;break;case 95:t.prev=95,t.t2=t.catch(86),___app_89.default.error("\u5904\u7406\u5206\u6d41\u8ba2\u9605\u4e2d\u7684URL: ".concat(O,"\u65f6\u51fa\u73b0\u9519\u8bef\uff1a").concat(t.t2,"! \u8be5\u8ba2\u9605\u5df2\u88ab\u8df3\u8fc7\u3002"));case 98:$++,t.next=83;break;case 101:return t.next=103,_$ruleUtils_84.RuleUtils.process(x,[{type:"Remove Duplicate Filter"}]);case 103:return x=t.sent,t.abrupt("return",_$ruleUtils_84.RuleUtils.produce(x,o));case 105:case"end":return t.stop()}}),t,null,[[19,31,34,37],[57,69,72,75],[86,95]])})))).apply(this,arguments)}function validateArtifactName(t){return/^[a-zA-Z0-9._-]*$/.test(t)}var _$platform_107={};Object.defineProperty(_$platform_107,"__esModule",{value:!0}),_$platform_107.getPlatformFromHeaders=function(t){for(var e="",r=0,n=Object.keys(t);r<n.length;r++){var o=n[r];if(/USER-AGENT/i.test(o)){e=t[o];break}}return-1!==e.indexOf("Quantumult%20X")?"QX":-1!==e.indexOf("Surge")?"Surge":-1!==e.indexOf("Decar")||-1!==e.indexOf("Loon")?"Loon":-1!==e.indexOf("Shadowrocket")?"ShadowRocket":-1!==e.indexOf("Stash")?"Stash":"JSON"};var _$download_91={};Object.defineProperty(_$download_91,"__esModule",{value:!0}),_$download_91.default=function(t){t.get("/download/collection/:name",downloadCollection),t.get("/download/:name",downloadSubscription)};var __obj_91,___app_91=(__obj_91=_$app_68)&&__obj_91.__esModule?__obj_91:{default:__obj_91};function ___typeof_91(t){return(___typeof_91="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ___regeneratorRuntime_91(){___regeneratorRuntime_91=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(x){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),i=new w(n||[]);return a._invoke=function(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return{value:void 0,done:!0}}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var u=b(i,r);if(u){if(u===l)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=c(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),a}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(x){return{type:"throw",arg:x}}}t.wrap=s;var l={};function p(){}function f(){}function _(){}var h={};u(h,o,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(C([])));y&&y!==e&&r.call(y,o)&&(h=y);var v=_.prototype=p.prototype=Object.create(h);function g(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){var n;this._invoke=function(o,a){function i(){return new e((function(n,i){!function n(o,a,i,u){var s=c(t[o],t,a);if("throw"!==s.type){var l=s.arg,p=l.value;return p&&"object"==___typeof_91(p)&&r.call(p,"__await")?e.resolve(p.__await).then((function(t){n("next",t,i,u)}),(function(t){n("throw",t,i,u)})):e.resolve(p).then((function(t){l.value=t,i(l)}),(function(t){return n("throw",t,i,u)}))}u(s.arg)}(o,a,n,i)}))}return n=n?n.then(i,i):i()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function C(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=_,u(v,"constructor",_),u(_,"constructor",f),f.displayName=u(_,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,u(t,i,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(m.prototype),u(m.prototype,a,(function(){return this})),t.AsyncIterator=m,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new m(s(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(v),u(v,i,"Generator"),u(v,o,(function(){return this})),u(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=C,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,l):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:C(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function __asyncGeneratorStep_91(t,e,r,n,o,a,i){try{var u=t[a](i),s=u.value}catch(c){return void r(c)}u.done?e(s):Promise.resolve(s).then(n,o)}function ___asyncToGenerator_91(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){__asyncGeneratorStep_91(a,n,o,i,u,"next",t)}function u(t){__asyncGeneratorStep_91(a,n,o,i,u,"throw",t)}i(void 0)}))}}function downloadSubscription(t,e){return _downloadSubscription.apply(this,arguments)}function _downloadSubscription(){return(_downloadSubscription=___asyncToGenerator_91(___regeneratorRuntime_91().mark((function t(e,r){var n,o,a,i,u,s;return ___regeneratorRuntime_91().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.params.name,n=decodeURIComponent(n),o=e.query.target||(0,_$platform_107.getPlatformFromHeaders)(e.headers)||"JSON",___app_91.default.info("\u6b63\u5728\u4e0b\u8f7d\u8ba2\u9605\uff1a".concat(n)),a=___app_91.default.read(_$constants_67.SUBS_KEY),!(i=(0,_$database_99.findByName)(a,n))){t.next=26;break}return t.prev=7,t.next=10,(0,_$artifacts_89.produceArtifact)({type:"subscription",name:n,platform:o});case 10:if(u=t.sent,"local"===i.source){t.next=16;break}return t.next=14,(0,_$flow_101.getFlowHeaders)(i.url);case 14:(s=t.sent)&&r.set("subscription-userinfo",s);case 16:"JSON"===o?r.set("Content-Type","application/json;charset=utf-8").send(u):r.send(u),t.next=24;break;case 19:t.prev=19,t.t0=t.catch(7),___app_91.default.notify("\ud83c\udf0d \u300e \ud835\udc7a\ud835\udc96\ud835\udc83-\ud835\udc7a\ud835\udc95\ud835\udc90\ud835\udc93\ud835\udc86 \u300f \u4e0b\u8f7d\u8ba2\u9605\u5931\u8d25","\u274c \u65e0\u6cd5\u4e0b\u8f7d\u8ba2\u9605\uff1a".concat(n,"\uff01"),"\ud83e\udd14 \u539f\u56e0\uff1a".concat(JSON.stringify(t.t0))),___app_91.default.error(JSON.stringify(t.t0)),(0,_$response_95.failed)(r,new _$errors_92.InternalServerError("INTERNAL_SERVER_ERROR","Failed to download subscription: ".concat(n),"Reason: ".concat(JSON.stringify(t.t0))));case 24:t.next=28;break;case 26:___app_91.default.notify("\ud83c\udf0d \u300e \ud835\udc7a\ud835\udc96\ud835\udc83-\ud835\udc7a\ud835\udc95\ud835\udc90\ud835\udc93\ud835\udc86 \u300f \u4e0b\u8f7d\u8ba2\u9605\u5931\u8d25","\u274c \u672a\u627e\u5230\u8ba2\u9605\uff1a".concat(n,"\uff01")),(0,_$response_95.failed)(r,new _$errors_92.ResourceNotFoundError("RESOURCE_NOT_FOUND","Subscription ".concat(n," does not exist!")),404);case 28:case"end":return t.stop()}}),t,null,[[7,19]])})))).apply(this,arguments)}function downloadCollection(t,e){return _downloadCollection.apply(this,arguments)}function _downloadCollection(){return(_downloadCollection=___asyncToGenerator_91(___regeneratorRuntime_91().mark((function t(e,r){var n,o,a,i,u,s,c,l,p;return ___regeneratorRuntime_91().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.params.name,n=decodeURIComponent(n),o=e.query.target||(0,_$platform_107.getPlatformFromHeaders)(e.headers)||"JSON",a=___app_91.default.read(_$constants_67.COLLECTIONS_KEY),i=(0,_$database_99.findByName)(a,n),___app_91.default.info("\u6b63\u5728\u4e0b\u8f7d\u7ec4\u5408\u8ba2\u9605\uff1a".concat(n)),!i){t.next=29;break}return t.prev=7,t.next=10,(0,_$artifacts_89.produceArtifact)({type:"collection",name:n,platform:o});case 10:if(u=t.sent,s=___app_91.default.read(_$constants_67.SUBS_KEY),!((c=i.subscriptions).length>0)){t.next=20;break}if("local"===(l=(0,_$database_99.findByName)(s,c[0])).source){t.next=20;break}return t.next=18,(0,_$flow_101.getFlowHeaders)(l.url);case 18:(p=t.sent)&&r.set("subscription-userinfo",p);case 20:"JSON"===o?r.set("Content-Type","application/json;charset=utf-8").send(u):r.send(u),t.next=27;break;case 23:t.prev=23,t.t0=t.catch(7),___app_91.default.notify("\ud83c\udf0d \u300e \ud835\udc7a\ud835\udc96\ud835\udc83-\ud835\udc7a\ud835\udc95\ud835\udc90\ud835\udc93\ud835\udc86 \u300f \u4e0b\u8f7d\u7ec4\u5408\u8ba2\u9605\u5931\u8d25","\u274c \u4e0b\u8f7d\u7ec4\u5408\u8ba2\u9605\u9519\u8bef\uff1a".concat(n,"\uff01"),"\ud83e\udd14 \u539f\u56e0\uff1a".concat(t.t0)),(0,_$response_95.failed)(r,new _$errors_92.InternalServerError("INTERNAL_SERVER_ERROR","Failed to download collection: ".concat(n),"Reason: ".concat(JSON.stringify(t.t0))));case 27:t.next=31;break;case 29:___app_91.default.notify("\ud83c\udf0d \u300e \ud835\udc7a\ud835\udc96\ud835\udc83-\ud835\udc7a\ud835\udc95\ud835\udc90\ud835\udc93\ud835\udc86 \u300f \u4e0b\u8f7d\u7ec4\u5408\u8ba2\u9605\u5931\u8d25","\u274c \u672a\u627e\u5230\u7ec4\u5408\u8ba2\u9605\uff1a".concat(n,"\uff01")),(0,_$response_95.failed)(r,new _$errors_92.ResourceNotFoundError("RESOURCE_NOT_FOUND","Collection ".concat(n," does not exist!")),404);case 31:case"end":return t.stop()}}),t,null,[[7,23]])})))).apply(this,arguments)}var _$settings_96={};Object.defineProperty(_$settings_96,"__esModule",{value:!0}),_$settings_96.default=function(t){___app_96.default.read(_$constants_67.SETTINGS_KEY)||___app_96.default.write({},_$constants_67.SETTINGS_KEY),t.route("/api/settings").get(getSettings).patch(updateSettings)},_$settings_96.updateArtifactStore=updateArtifactStore,_$settings_96.updateGitHubAvatar=updateGitHubAvatar;var ___app_96=___interopRequireDefault_96(_$app_68),___gist_96=___interopRequireDefault_96(_$gist_103);function ___interopRequireDefault_96(t){return t&&t.__esModule?t:{default:t}}function ___typeof_96(t){return(___typeof_96="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function __ownKeys_96(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ___objectSpread_96(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?__ownKeys_96(Object(r),!0).forEach((function(e){___defineProperty_96(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):__ownKeys_96(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ___defineProperty_96(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ___regeneratorRuntime_96(){___regeneratorRuntime_96=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(x){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),i=new w(n||[]);return a._invoke=function(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return{value:void 0,done:!0}}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var u=b(i,r);if(u){if(u===l)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=c(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),a}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(x){return{type:"throw",arg:x}}}t.wrap=s;var l={};function p(){}function f(){}function _(){}var h={};u(h,o,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(C([])));y&&y!==e&&r.call(y,o)&&(h=y);var v=_.prototype=p.prototype=Object.create(h);function g(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){var n;this._invoke=function(o,a){function i(){return new e((function(n,i){!function n(o,a,i,u){var s=c(t[o],t,a);if("throw"!==s.type){var l=s.arg,p=l.value;return p&&"object"==___typeof_96(p)&&r.call(p,"__await")?e.resolve(p.__await).then((function(t){n("next",t,i,u)}),(function(t){n("throw",t,i,u)})):e.resolve(p).then((function(t){l.value=t,i(l)}),(function(t){return n("throw",t,i,u)}))}u(s.arg)}(o,a,n,i)}))}return n=n?n.then(i,i):i()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function C(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=_,u(v,"constructor",_),u(_,"constructor",f),f.displayName=u(_,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,u(t,i,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(m.prototype),u(m.prototype,a,(function(){return this})),t.AsyncIterator=m,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new m(s(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(v),u(v,i,"Generator"),u(v,o,(function(){return this})),u(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=C,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,l):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:C(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function __asyncGeneratorStep_96(t,e,r,n,o,a,i){try{var u=t[a](i),s=u.value}catch(c){return void r(c)}u.done?e(s):Promise.resolve(s).then(n,o)}function ___asyncToGenerator_96(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){__asyncGeneratorStep_96(a,n,o,i,u,"next",t)}function u(t){__asyncGeneratorStep_96(a,n,o,i,u,"throw",t)}i(void 0)}))}}function getSettings(t,e){return _getSettings.apply(this,arguments)}function _getSettings(){return(_getSettings=___asyncToGenerator_96(___regeneratorRuntime_96().mark((function t(e,r){var n;return ___regeneratorRuntime_96().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=___app_96.default.read(_$constants_67.SETTINGS_KEY)).avatarUrl){t.next=4;break}return t.next=4,updateGitHubAvatar();case 4:if(n.artifactStore){t.next=7;break}return t.next=7,updateArtifactStore();case 7:(0,_$response_95.success)(r,n);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function updateSettings(t,e){return _updateSettings.apply(this,arguments)}function _updateSettings(){return(_updateSettings=___asyncToGenerator_96(___regeneratorRuntime_96().mark((function t(e,r){var n,o;return ___regeneratorRuntime_96().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=___app_96.default.read(_$constants_67.SETTINGS_KEY),o=___objectSpread_96(___objectSpread_96({},n),e.body),___app_96.default.write(o,_$constants_67.SETTINGS_KEY),t.next=5,updateGitHubAvatar();case 5:return t.next=7,updateArtifactStore();case 7:(0,_$response_95.success)(r,o);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function updateGitHubAvatar(){return _updateGitHubAvatar.apply(this,arguments)}function _updateGitHubAvatar(){return(_updateGitHubAvatar=___asyncToGenerator_96(___regeneratorRuntime_96().mark((function t(){var e,r,n;return ___regeneratorRuntime_96().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=___app_96.default.read(_$constants_67.SETTINGS_KEY),!(r=e.githubUser)){t.next=14;break}return t.prev=3,t.next=6,___app_96.default.http.get({url:"https://api.github.com/users/".concat(r),headers:{"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.141 Safari/537.36"}}).then((function(t){return JSON.parse(t.body)}));case 6:n=t.sent,e.avatarUrl=n.avatar_url,___app_96.default.write(e,_$constants_67.SETTINGS_KEY),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(3),___app_96.default.error("Failed to fetch GitHub avatar for User: "+r);case 14:case"end":return t.stop()}}),t,null,[[3,11]])})))).apply(this,arguments)}function updateArtifactStore(){return _updateArtifactStore.apply(this,arguments)}function _updateArtifactStore(){return(_updateArtifactStore=___asyncToGenerator_96(___regeneratorRuntime_96().mark((function t(){var e,r,n,o,a;return ___regeneratorRuntime_96().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(___app_96.default.log("Updating artifact store"),e=___app_96.default.read(_$constants_67.SETTINGS_KEY),r=e.githubUser,n=e.gistToken,!r||!n){t.next=15;break}return o=new ___gist_96.default({token:n,key:_$constants_67.ARTIFACT_REPOSITORY_KEY}),t.prev=5,t.next=8,o.locate();case 8:-1!==(a=t.sent)&&(e.artifactStore="https://gist.github.com/".concat(r,"/").concat(a),___app_96.default.write(e,_$constants_67.SETTINGS_KEY)),t.next=15;break;case 12:t.prev=12,t.t0=t.catch(5),___app_96.default.error("Failed to fetch artifact store for User: "+r);case 15:case"end":return t.stop()}}),t,null,[[5,12]])})))).apply(this,arguments)}var _$preview_94={};Object.defineProperty(_$preview_94,"__esModule",{value:!0}),_$preview_94.default=function(t){t.post("/api/preview/sub",compareSub),t.post("/api/preview/collection",compareCollection)};var ___download_94=___interopRequireDefault_94(_$download_100),___app_94=___interopRequireDefault_94(_$app_68);function ___interopRequireDefault_94(t){return t&&t.__esModule?t:{default:t}}function ___typeof_94(t){return(___typeof_94="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ___regeneratorRuntime_94(){___regeneratorRuntime_94=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(x){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),i=new w(n||[]);return a._invoke=function(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return{value:void 0,done:!0}}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var u=b(i,r);if(u){if(u===l)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=c(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),a}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(x){return{type:"throw",arg:x}}}t.wrap=s;var l={};function p(){}function f(){}function _(){}var h={};u(h,o,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(C([])));y&&y!==e&&r.call(y,o)&&(h=y);var v=_.prototype=p.prototype=Object.create(h);function g(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){var n;this._invoke=function(o,a){function i(){return new e((function(n,i){!function n(o,a,i,u){var s=c(t[o],t,a);if("throw"!==s.type){var l=s.arg,p=l.value;return p&&"object"==___typeof_94(p)&&r.call(p,"__await")?e.resolve(p.__await).then((function(t){n("next",t,i,u)}),(function(t){n("throw",t,i,u)})):e.resolve(p).then((function(t){l.value=t,i(l)}),(function(t){return n("throw",t,i,u)}))}u(s.arg)}(o,a,n,i)}))}return n=n?n.then(i,i):i()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function C(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=_,u(v,"constructor",_),u(_,"constructor",f),f.displayName=u(_,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,u(t,i,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(m.prototype),u(m.prototype,a,(function(){return this})),t.AsyncIterator=m,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new m(s(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(v),u(v,i,"Generator"),u(v,o,(function(){return this})),u(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=C,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,l):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:C(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function __asyncGeneratorStep_94(t,e,r,n,o,a,i){try{var u=t[a](i),s=u.value}catch(c){return void r(c)}u.done?e(s):Promise.resolve(s).then(n,o)}function ___asyncToGenerator_94(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){__asyncGeneratorStep_94(a,n,o,i,u,"next",t)}function u(t){__asyncGeneratorStep_94(a,n,o,i,u,"throw",t)}i(void 0)}))}}function compareSub(t,e){return _compareSub.apply(this,arguments)}function _compareSub(){return(_compareSub=___asyncToGenerator_94(___regeneratorRuntime_94().mark((function t(e,r){var n,o,a,i,u;return ___regeneratorRuntime_94().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.body,o=e.query.target||"JSON","local"!==n.source){t.next=6;break}a=n.content,t.next=16;break;case 6:return t.prev=6,t.next=9,(0,___download_94.default)(n.url,n.ua);case 9:a=t.sent,t.next=16;break;case 12:return t.prev=12,t.t0=t.catch(6),(0,_$response_95.failed)(r,new _$errors_92.NetworkError("FAILED_TO_DOWNLOAD_RESOURCE","\u65e0\u6cd5\u4e0b\u8f7d\u8fdc\u7a0b\u8d44\u6e90","Reason: ".concat(t.t0))),t.abrupt("return");case 16:return(i=_$proxyUtils_69.ProxyUtils.parse(a)).forEach((function(t,e){t.id=e})),t.next=20,_$proxyUtils_69.ProxyUtils.process(i,n.process||[],o);case 20:u=t.sent,(0,_$response_95.success)(r,{original:i,processed:u});case 22:case"end":return t.stop()}}),t,null,[[6,12]])})))).apply(this,arguments)}function compareCollection(t,e){return _compareCollection.apply(this,arguments)}function _compareCollection(){return(_compareCollection=___asyncToGenerator_94(___regeneratorRuntime_94().mark((function t(e,r){var n,o,a,i,u,s;return ___regeneratorRuntime_94().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=___app_94.default.read(_$constants_67.SUBS_KEY),o=e.body,a=o.subscriptions,i={},t.next=6,Promise.all(a.map(function(){var t=___asyncToGenerator_94(___regeneratorRuntime_94().mark((function t(e){var o,a,u;return ___regeneratorRuntime_94().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=(0,_$database_99.findByName)(n,e),t.prev=1,"local"!==o.source){t.next=6;break}a=o.content,t.next=9;break;case 6:return t.next=8,(0,___download_94.default)(o.url,o.ua);case 8:a=t.sent;case 9:return u=_$proxyUtils_69.ProxyUtils.parse(a),t.next=12,_$proxyUtils_69.ProxyUtils.process(u,o.process||[],"JSON");case 12:u=t.sent,i[e]=u,t.next=19;break;case 16:t.prev=16,t.t0=t.catch(1),(0,_$response_95.failed)(r,new _$errors_92.InternalServerError("PROCESS_FAILED","\u5904\u7406\u5b50\u8ba2\u9605 ".concat(e," \u5931\u8d25"),"Reason: ".concat(t.t0)));case 19:case"end":return t.stop()}}),t,null,[[1,16]])})));return function(e){return t.apply(this,arguments)}}()));case 6:return(u=Array.prototype.concat.apply([],a.map((function(t){return i[t]})))).forEach((function(t,e){t.id=e})),t.next=10,_$proxyUtils_69.ProxyUtils.process(u,o.process||[],"JSON");case 10:s=t.sent,(0,_$response_95.success)(r,{original:u,processed:s});case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var _$sort_97={};Object.defineProperty(_$sort_97,"__esModule",{value:!0}),_$sort_97.default=function(t){t.post("/api/sort/subs",sortSubs),t.post("/api/sort/collections",sortCollections),t.post("/api/sort/artifacts",sortArtifacts)};var __obj_97,___app_97=(__obj_97=_$app_68)&&__obj_97.__esModule?__obj_97:{default:__obj_97};function sortSubs(t,e){var r=t.body,n=___app_97.default.read(_$constants_67.SUBS_KEY);n.sort((function(t,e){return r.indexOf(t)-r.indexOf(e)})),___app_97.default.write(n,_$constants_67.SUBS_KEY),(0,_$response_95.success)(e,n)}function sortCollections(t,e){var r=t.body,n=___app_97.default.read(_$constants_67.COLLECTIONS_KEY);n.sort((function(t,e){return r.indexOf(t)-r.indexOf(e)})),___app_97.default.write(n,_$constants_67.COLLECTIONS_KEY),(0,_$response_95.success)(e,n)}function sortArtifacts(t,e){var r=t.body,n=___app_97.default.read(_$constants_67.ARTIFACTS_KEY);n.sort((function(t,e){return r.indexOf(t)-r.indexOf(e)})),___app_97.default.write(n,_$constants_67.ARTIFACTS_KEY),(0,_$response_95.success)(e,n)}var _$restful_93={};function ___typeof_93(t){return(___typeof_93="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(_$restful_93,"__esModule",{value:!0}),_$restful_93.default=function(){var t,e,r=(0,_express.default)({substore:___app_93.default});(0,_collections.default)(r),(0,_subscriptions.default)(r),(0,___download_93.default)(r),(0,_preview.default)(r),(0,_sort.default)(r),(0,_settings.default)(r),(0,___artifacts_93.default)(r),r.get("/api/utils/IP_API/:server",IP_API),r.get("/api/utils/env",getEnv),r.get("/api/utils/backup",gistBackup),r.get("/api/utils/refresh",refresh),r.route("/api/storage").get((function(t,e){e.json(___app_93.default.read("#sub-store"))})).post((function(t,e){var r=t.body;___app_93.default.write(JSON.stringify(r),"#sub-store"),e.end()})),r.get("/",(e=___asyncToGenerator_93(___regeneratorRuntime_93().mark((function t(e,r){return ___regeneratorRuntime_93().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r.set("location","https://sub-store.vercel.app/").status(302).end();case 1:case"end":return t.stop()}}),t)}))),function(t,r){return e.apply(this,arguments)})),(0,_$openApi_111.ENV)().isQX&&r.options("/",(t=___asyncToGenerator_93(___regeneratorRuntime_93().mark((function t(e,r){return ___regeneratorRuntime_93().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r.status(200).end();case 1:case"end":return t.stop()}}),t)}))),function(e,r){return t.apply(this,arguments)})),r.all("/",(function(t,e){e.send("Hello from sub-store, made with \u2764\ufe0f by Peng-YM")})),r.start()};var _express=___interopRequireDefault_93(_$express_109),___gist_93=___interopRequireDefault_93(_$gist_103),_migration=___interopRequireDefault_93(_$migration_106),___app_93=___interopRequireDefault_93(_$app_68),_subscriptions=___interopRequireDefault_93(_$subscriptions_98),_collections=___interopRequireDefault_93(_$collections_90),___artifacts_93=___interopRequireDefault_93(_$artifacts_89),___download_93=___interopRequireDefault_93(_$download_91),_settings=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==___typeof_93(t)&&"function"!=typeof t)return{default:t};var r=___getRequireWildcardCache_93(void 0);if(r&&r.has(t))return r.get(t);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var i=o?Object.getOwnPropertyDescriptor(t,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=t[a]}return n.default=t,r&&r.set(t,n),n}(_$settings_96),_preview=___interopRequireDefault_93(_$preview_94),_sort=___interopRequireDefault_93(_$sort_97),___resourceCache_93=___interopRequireDefault_93(_$resourceCache_108);function ___getRequireWildcardCache_93(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(___getRequireWildcardCache_93=function(t){return t?r:e})(t)}function ___interopRequireDefault_93(t){return t&&t.__esModule?t:{default:t}}function ___regeneratorRuntime_93(){___regeneratorRuntime_93=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(x){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),i=new w(n||[]);return a._invoke=function(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return{value:void 0,done:!0}}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var u=b(i,r);if(u){if(u===l)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=c(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),a}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(x){return{type:"throw",arg:x}}}t.wrap=s;var l={};function p(){}function f(){}function _(){}var h={};u(h,o,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(C([])));y&&y!==e&&r.call(y,o)&&(h=y);var v=_.prototype=p.prototype=Object.create(h);function g(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){var n;this._invoke=function(o,a){function i(){return new e((function(n,i){!function n(o,a,i,u){var s=c(t[o],t,a);if("throw"!==s.type){var l=s.arg,p=l.value;return p&&"object"==___typeof_93(p)&&r.call(p,"__await")?e.resolve(p.__await).then((function(t){n("next",t,i,u)}),(function(t){n("throw",t,i,u)})):e.resolve(p).then((function(t){l.value=t,i(l)}),(function(t){return n("throw",t,i,u)}))}u(s.arg)}(o,a,n,i)}))}return n=n?n.then(i,i):i()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function C(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=_,u(v,"constructor",_),u(_,"constructor",f),f.displayName=u(_,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,u(t,i,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(m.prototype),u(m.prototype,a,(function(){return this})),t.AsyncIterator=m,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new m(s(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(v),u(v,i,"Generator"),u(v,o,(function(){return this})),u(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=C,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,l):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:C(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function __asyncGeneratorStep_93(t,e,r,n,o,a,i){try{var u=t[a](i),s=u.value}catch(c){return void r(c)}u.done?e(s):Promise.resolve(s).then(n,o)}function ___asyncToGenerator_93(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){__asyncGeneratorStep_93(a,n,o,i,u,"next",t)}function u(t){__asyncGeneratorStep_93(a,n,o,i,u,"throw",t)}i(void 0)}))}}function getEnv(t,e){var r=(0,_$openApi_111.ENV)(),n="Node";r.isNode&&(n="Node"),r.isQX&&(n="QX"),r.isLoon&&(n="Loon"),r.isSurge&&(n="Surge"),r.isStash&&(n="Stash"),r.isShadowRocket&&(n="ShadowRocket"),(0,_$response_95.success)(e,{backend:n,version:_$package_66.version})}function refresh(t,e){return _refresh.apply(this,arguments)}function _refresh(){return(_refresh=___asyncToGenerator_93(___regeneratorRuntime_93().mark((function t(e,r){return ___regeneratorRuntime_93().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,_settings.updateGitHubAvatar)();case 2:return t.next=4,(0,_settings.updateArtifactStore)();case 4:___resourceCache_93.default.revokeAll(),(0,_$response_95.success)(r);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function gistBackup(t,e){return _gistBackup.apply(this,arguments)}function _gistBackup(){return(_gistBackup=___asyncToGenerator_93(___regeneratorRuntime_93().mark((function t(e,r){var n,o,a,i,u,s,c;return ___regeneratorRuntime_93().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.query.action,o=___app_93.default.read(_$constants_67.SETTINGS_KEY),a=o.gistToken){t.next=6;break}(0,_$response_95.failed)(r,new _$errors_92.RequestInvalidError("GIST_TOKEN_NOT_FOUND","GitHub Token is required for backup!")),t.next=43;break;case 6:i=new ___gist_93.default({token:a,key:_$constants_67.GIST_BACKUP_KEY}),t.prev=7,s=___app_93.default.read(_$constants_67.SETTINGS_KEY),c=s.syncTime,t.t0=n,t.next="upload"===t.t0?13:"download"===t.t0?29:37;break;case 13:return s.syncTime=(new Date).getTime(),___app_93.default.write(s,_$constants_67.SETTINGS_KEY),u=___app_93.default.read("#sub-store"),___app_93.default.env.isNode&&(u=JSON.stringify(___app_93.default.cache,null," ")),___app_93.default.info("\u4e0a\u4f20\u5907\u4efd\u4e2d..."),t.prev=18,t.next=21,i.upload((l={},p=_$constants_67.GIST_BACKUP_FILE_NAME,f={content:u},p in l?Object.defineProperty(l,p,{value:f,enumerable:!0,configurable:!0,writable:!0}):l[p]=f,l));case 21:t.next=28;break;case 23:throw t.prev=23,t.t1=t.catch(18),s.syncTime=c,___app_93.default.write(s,_$constants_67.SETTINGS_KEY),t.t1;case 28:return t.abrupt("break",37);case 29:return ___app_93.default.info("\u8fd8\u539f\u5907\u4efd\u4e2d..."),t.next=32,i.download(_$constants_67.GIST_BACKUP_FILE_NAME);case 32:return u=t.sent,___app_93.default.write(u,"#sub-store"),___app_93.default.env.isNode&&(u=JSON.parse(u),___app_93.default.cache=u,___app_93.default.persistCache()),(0,_migration.default)(),t.abrupt("break",37);case 37:(0,_$response_95.success)(r),t.next=43;break;case 40:t.prev=40,t.t2=t.catch(7),(0,_$response_95.failed)(r,new _$errors_92.InternalServerError("BACKUP_FAILED","Failed to ".concat(n," data to gist!"),"Reason: ".concat(JSON.stringify(t.t2))));case 43:case"end":return t.stop()}var l,p,f}),t,null,[[7,40],[18,23]])})))).apply(this,arguments)}function IP_API(t,e){return _IP_API.apply(this,arguments)}function _IP_API(){return(_IP_API=___asyncToGenerator_93(___regeneratorRuntime_93().mark((function t(e,r){var n,o,a;return ___regeneratorRuntime_93().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=decodeURIComponent(e.params.server),o=(0,_$openApi_111.HTTP)(),t.next=4,o.get("http://ip-api.com/json/".concat(n,"?lang=zh-CN")).then((function(t){return JSON.parse(t.body)}));case 4:a=t.sent,r.json(a);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var _$main_88={},___migration_88=___interopRequireDefault_88(_$migration_106),_restful=___interopRequireDefault_88(_$restful_93);function ___interopRequireDefault_88(t){return t&&t.__esModule?t:{default:t}}console.log("\n\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\n Sub-Store -- v".concat(_$package_66.version,"\n\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\u2505\n")),(0,___migration_88.default)(),(0,_restful.default)()}();