D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
usr
/
share
/
grafana
/
public
/
lib
/
monaco
/
min
/
vs
/
language
/
kusto
/
Filename :
bridge.min.js
back
Copy
/** * @version : 17.10.1 - Bridge.NET * @author : Object.NET, Inc. http://bridge.net/ * @copyright : Copyright 2008-2019 Object.NET, Inc. http://object.net/ * @license : See license.txt and https://github.com/bridgedotnet/Bridge/blob/master/LICENSE.md */(function(re){"use strict";var Ye,nt,de,Be,st,Le,ot,_;typeof module<"u"&&module.exports&&(re=global),Ye={global:re,isNode:Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]",emptyFn:function(){},identity:function(e){return e},Deconstruct:function(e){for(var t=Array.prototype.slice.call(arguments,1),i=0;i<t.length;i++)t[i].v=i==7?e.Rest:e["Item"+(i+1)]},toString:function(e){var t,i;if(e==null)throw new System.ArgumentNullException;return t=Bridge.$toStringGuard[Bridge.$toStringGuard.length-1],e.toString===Object.prototype.toString||t&&t===e?Bridge.Reflection.getTypeFullName(e):(Bridge.$toStringGuard.push(e),i=e.toString(),Bridge.$toStringGuard.pop(),i)},geti:function(e,t,i){if(e[t]!==void 0)return t;if(i&&e[i]!=null)return i;var r=i||t,n=r.lastIndexOf("$");return/\$\d+$/g.test(r)&&(n=r.lastIndexOf("$",n-1)),r.substr(n+1)},box:function(e,t,i,r){return e&&e.$boxed||e==null?e:(e.$clone&&(e=e.$clone()),{$boxed:!0,fn:{toString:i,getHashCode:r},v:e,type:t,constructor:t,getHashCode:function(){return this.fn.getHashCode?this.fn.getHashCode(this.v):Bridge.getHashCode(this.v)},equals:function(n){var s,o;return this===n?!0:(s=this.equals,this.equals=null,o=Bridge.equals(this.v,n),this.equals=s,o)},valueOf:function(){return this.v},toString:function(){return this.fn.toString?this.fn.toString(this.v):this.v.toString()}})},unbox:function(e,t){var i,r,n,s,o;if(t&&Bridge.isFunction(t)&&(i=t,t=!1),e&&e.$boxed){if(r=e.v,n=e.type,i&&i.$nullable&&(i=i.$nullableType),i&&i.$kind==="enum"&&(i=System.Enum.getUnderlyingType(i)),n.$nullable&&(n=n.$nullableType),n.$kind==="enum"&&(n=System.Enum.getUnderlyingType(n)),i&&i!==n&&!Bridge.isObject(i))throw new System.InvalidCastException.$ctor1("Specified cast is not valid.");return!t&&r&&r.$clone&&(r=r.$clone()),r}if(Bridge.isArray(e))for(s=0;s<e.length;s++)o=e[s],o&&o.$boxed?(o=o.v,o.$clone&&(o=o.$clone())):!t&&o&&o.$clone&&(o=o.$clone()),e[s]=o;return e&&!t&&e.$clone&&(e=e.$clone()),e},virtualc:function(e){return Bridge.virtual(e,!0)},virtual:function(e,t){var i=Bridge.unroll(e),r;return i&&Bridge.isFunction(i)||(r=Bridge.Class.staticInitAllow,i=t?Bridge.define(e):Bridge.definei(e),Bridge.Class.staticInitAllow=!0,i.$staticInit&&i.$staticInit(),Bridge.Class.staticInitAllow=r),i},safe:function(e){try{return e()}catch{}return!1},literal:function(e,t){return t.$getType=function(){return e},t},isJSObject:function(e){return Object.prototype.toString.call(e)==="[object Object]"},isPlainObject:function(e){if(typeof e=="object"&&e!==null){if(typeof Object.getPrototypeOf=="function"){var t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}return Object.prototype.toString.call(e)==="[object Object]"}return!1},toPlain:function(e){var t,i,r,n,s;if(!e||Bridge.isPlainObject(e)||typeof e!="object")return e;if(typeof e.toJSON=="function")return e.toJSON();if(Bridge.isArray(e)){for(t=[],i=0;i<e.length;i++)t.push(Bridge.toPlain(e[i]));return t}r={};for(s in e)n=e[s],Bridge.isFunction(n)||(r[s]=n);return r},ref:function(e,t){Bridge.isArray(t)&&(t=System.Array.toIndex(e,t));var i={};return Object.defineProperty(i,"v",{get:function(){return t==null?e:e[t]},set:function(r){t==null&&(r&&r.$clone?r.$clone(e):e=r),e[t]=r}}),i},ensureBaseProperty:function(e,t,i){var r=Bridge.getType(e),n=r.$descriptors||[],s,o,a,l;if(e.$propMap=e.$propMap||{},e.$propMap[t])return e;if((!r.$descriptors||r.$descriptors.length===0)&&i)a={},l="$"+i+"$"+t,a.get=function(){return e[t]},a.set=function(u){e[t]=u},Bridge.property(e,l,a,!1,r,!0);else for(s=0;s<n.length;s++)o=n[s],o.name===t&&(a={},l="$"+Bridge.getTypeAlias(o.cls)+"$"+t,o.get&&(a.get=o.get),o.set&&(a.set=o.set),Bridge.property(e,l,a,!1,r,!0));return e.$propMap[t]=!0,e},property:function(e,t,i,r,n,s){var o={enumerable:!s,configurable:!0},a;return i&&i.get&&(o.get=i.get),i&&i.set&&(o.set=i.set),i&&(i.get||i.set)||(a=Bridge.getTypeAlias(n)+"$"+t,n.$init=n.$init||{},r&&(n.$init[a]=i),function(l,u,d,f){l.get=function(){var C=this.$init[d];return C===void 0?f:C},l.set=function(C){this.$init[d]=C}}(o,e,a,i)),Object.defineProperty(e,t,o),o},event:function(e,t,i,r){e[t]=i;var n=t.charAt(0)==="$",s=n?t.slice(1):t,o="add"+s,a="remove"+s,l=t.lastIndexOf("$"),u=l>0&&t.length-l-1>0&&!isNaN(parseInt(t.substr(l+1)));u&&(l=t.substring(0,l-1).lastIndexOf("$")),l>0&&l!==t.length-1&&(o=t.substring(0,l)+"add"+t.substr(l+1),a=t.substring(0,l)+"remove"+t.substr(l+1)),e[o]=function(d,f,C){return C?function(E){f[d]=Bridge.fn.combine(f[d],E)}:function(E){this[d]=Bridge.fn.combine(this[d],E)}}(t,e,r),e[a]=function(d,f,C){return C?function(E){f[d]=Bridge.fn.remove(f[d],E)}:function(E){this[d]=Bridge.fn.remove(this[d],E)}}(t,e,r)},createInstance:function(e,t,i){var r,n,s,o,a;if(Bridge.isArray(t)&&(i=t,t=!1),e===System.Decimal)return System.Decimal.Zero;if(e===System.Int64)return System.Int64.Zero;if(e===System.UInt64)return System.UInt64.Zero;if(e===System.Double||e===System.Single||e===System.Byte||e===System.SByte||e===System.Int16||e===System.UInt16||e===System.Int32||e===System.UInt32||e===Bridge.Int)return 0;if(typeof e.createInstance=="function")return e.createInstance();if(typeof e.getDefaultValue=="function")return e.getDefaultValue();if(e===Boolean||e===System.Boolean)return!1;if(e===System.DateTime)return System.DateTime.getDefaultValue();if(e===Date)return new Date;if(e===Number)return 0;if(e===String||e===System.String)return"";if(e&&e.$literal)return e.ctor();if(i&&i.length>0)return Bridge.Reflection.applyConstructor(e,i);if(e.$kind==="interface")throw new System.MissingMethodException.$ctor1("Default constructor not found for type "+Bridge.getTypeName(e));if(r=Bridge.Reflection.getMembers(e,1,54),r.length>0){for(n=r.filter(function(l){return!l.isSynthetic&&!l.sm}),s=0;s<n.length;s++)if(o=n[s],a=(o.pi||[]).length===0,a){if(t||o.a===2)return Bridge.Reflection.invokeCI(o,[]);throw new System.MissingMethodException.$ctor1("Default constructor not found for type "+Bridge.getTypeName(e))}if(e.$$name&&!(r.length==1&&r[0].isSynthetic))throw new System.MissingMethodException.$ctor1("Default constructor not found for type "+Bridge.getTypeName(e))}return new e},clone:function(e){if(e==null)return e;if(Bridge.isArray(e))return System.Array.clone(e);if(Bridge.isString(e))return e;var t;return Bridge.isFunction(Bridge.getProperty(e,t="System$ICloneable$clone"))?e[t]():Bridge.is(e,System.ICloneable)?e.clone():Bridge.isFunction(e.$clone)?e.$clone():null},copy:function(e,t,i,r){typeof i=="string"&&(i=i.split(/[,;\s]+/));for(var n,s=0,o=i?i.length:0;s<o;s++)n=i[s],(r!==!0||e[n]==null)&&(e[n]=Bridge.is(t[n],System.ICloneable)?Bridge.clone(t[n]):t[n]);return e},get:function(e){return e&&e.$staticInit!==null&&e.$staticInit(),e},ns:function(e,t){var i=e.split("."),r=0;for(t||(t=Bridge.global),r=0;r<i.length;r++)typeof t[i[r]]>"u"&&(t[i[r]]={}),t=t[i[r]];return t},ready:function(e,t){var i=function(){t?e.apply(t):e()};typeof Bridge.global.jQuery<"u"?Bridge.global.jQuery(i):typeof Bridge.global.document>"u"||Bridge.global.document.readyState==="complete"||Bridge.global.document.readyState==="loaded"||Bridge.global.document.readyState==="interactive"?i():Bridge.on("DOMContentLoaded",Bridge.global.document,i)},on:function(e,t,i,r){var n=function(o){var a=i.apply(r||this,arguments);return a===!1&&(o.stopPropagation(),o.preventDefault()),a},s=function(){var o=i.call(r||t,Bridge.global.event);return o===!1&&(Bridge.global.event.returnValue=!1,Bridge.global.event.cancelBubble=!0),o};t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,s)},addHash:function(e,t,i){if(isNaN(t)&&(t=17),isNaN(i)&&(i=23),Bridge.isArray(e)){for(var r=0;r<e.length;r++)t=t+((t*i|0)+(e[r]==null?0:Bridge.getHashCode(e[r])))|0;return t}return t+((t*i|0)+(e==null?0:Bridge.getHashCode(e)))|0},getHashCode:function(e,t,i){var r,n,s,o,a,l,u;if(e&&e.$boxed&&e.type.getHashCode)return e.type.getHashCode(Bridge.unbox(e,!0));if(e=Bridge.unbox(e,!0),Bridge.isEmpty(e,!0)){if(t)return 0;throw new System.InvalidOperationException.$ctor1("HashCode cannot be calculated for empty value")}if(e.getHashCode&&Bridge.isFunction(e.getHashCode)&&!e.__insideHashCode&&e.getHashCode.length===0)return e.__insideHashCode=!0,r=e.getHashCode(),delete e.__insideHashCode,r;if(Bridge.isBoolean(e))return e?1:0;if(Bridge.isDate(e))return n=e.ticks!==void 0?e.ticks:System.DateTime.getTicks(e),n.toNumber()&4294967295;if(e===Number.POSITIVE_INFINITY)return 2146435072;if(e===Number.NEGATIVE_INFINITY)return 4293918720;if(Bridge.isNumber(e)){if(Math.floor(e)===e)return e;e=e.toExponential()}if(Bridge.isString(e))if(Math.imul){for(s=0,o=0;s<e.length;s++)o=Math.imul(31,o)+e.charCodeAt(s)|0;return o}else{var o=0,d=e.length,s=0;if(d>0)for(;s<d;)o=(o<<5)-o+e.charCodeAt(s++)|0;return o}if(e.$$hashCode)return e.$$hashCode;if(i!==!1&&e.hasOwnProperty("Item1")&&Bridge.isPlainObject(e)&&(i=!0),i&&typeof e=="object"){a=0;for(u in e)e.hasOwnProperty(u)&&(l=Bridge.isEmpty(e[u],!0)?0:Bridge.getHashCode(e[u]),a=29*a+l);if(a!==0)return e.$$hashCode=a,a}return e.$$hashCode=Math.random()*4294967296|0,e.$$hashCode},getDefaultValue:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("type");return e.getDefaultValue&&e.getDefaultValue.length===0?e.getDefaultValue():Bridge.Reflection.isEnum(e)?System.Enum.parse(e,0):e===Boolean||e===System.Boolean?!1:e===System.DateTime?System.DateTime.getDefaultValue():e===Date?new Date:e===Number?0:null},$$aliasCache:[],getTypeAlias:function(e){var t,i,r,n,s,o;if(e.$$alias)return e.$$alias;if(t=e.$$name||typeof e=="function"?e:Bridge.getType(e),t.$$alias)return t.$$alias;if(i=Bridge.$$aliasCache[t],i)return i;if(t.$isArray)return r=Bridge.getTypeAlias(t.$elementType),i=r+"$Array"+(t.$rank>1?"$"+t.$rank:""),t.$$name?t.$$alias=i:Bridge.$$aliasCache[t]=i,i;if(n=e.$$name||Bridge.getTypeName(e),t.$typeArguments&&!t.$isGenericTypeDefinition)for(n=t.$genericTypeDefinition.$$name,s=0;s<t.$typeArguments.length;s++)o=t.$typeArguments[s],n+="$"+Bridge.getTypeAlias(o);return i=n.replace(/[\.\(\)\,\+]/g,"$"),t.$module&&(i=t.$module+"$"+i),t.$$name?t.$$alias=i:Bridge.$$aliasCache[t]=i,i},getTypeName:function(e){return Bridge.Reflection.getTypeFullName(e)},hasValue:function(e){return Bridge.unbox(e,!0)!=null},hasValue$1:function(){if(arguments.length===0)return!1;var e=0;for(e;e<arguments.length;e++)if(Bridge.unbox(arguments[e],!0)==null)return!1;return!0},isObject:function(e){return e===Object||e===System.Object},is:function(e,t,i,r){var n,s,o,a,l;if(e==null)return!!r;if(t===System.Object&&(t=Object),n=typeof t,n==="boolean")return t;if(e.$boxed){if(e.type.$kind==="enum"&&(e.type.prototype.$utype===t||t===System.Enum||t===System.IFormattable||t===System.IComparable))return!0;if(!Bridge.Reflection.isInterface(t)&&!t.$nullable)return e.type===t||Bridge.isObject(t)||t===System.ValueType&&Bridge.Reflection.isValueType(e.type);if(i!==!0&&t.$is)return t.$is(Bridge.unbox(e,!0));if(Bridge.Reflection.isAssignableFrom(t,e.type))return!0;e=Bridge.unbox(e,!0)}if(s=e.constructor===Object&&e.$getType?e.$getType():Bridge.Reflection.convertType(e.constructor),t.constructor===Function&&e instanceof t||s===t||Bridge.isObject(t))return!0;if(o=s.$kind||s.$$inherits,a=t.$kind,o||a){if(l=t.$isInterface,l){if(o)return s.$isArrayEnumerator?System.Array.is(e,t):t.isAssignableFrom?t.isAssignableFrom(s):Bridge.Reflection.getInterfaces(s).indexOf(t)>=0;if(Bridge.isArray(e,s))return System.Array.is(e,t)}return i!==!0&&t.$is?t.$is(e):t.$literal&&Bridge.isPlainObject(e)?e.$getType?Bridge.Reflection.isAssignableFrom(t,e.$getType()):!0:!1}if(n==="string"&&(t=Bridge.unroll(t)),n==="function"&&Bridge.getType(e).prototype instanceof t)return!0;if(i!==!0){if(typeof t.$is=="function")return t.$is(e);if(typeof t.isAssignableFrom=="function")return t.isAssignableFrom(Bridge.getType(e))}return Bridge.isArray(e)?System.Array.is(e,t):n==="object"&&(s===t||e instanceof t)},as:function(e,t,i){return Bridge.is(e,t,!1,i)?e!=null&&e.$boxed&&t!==Object&&t!==System.Object?e.v:e:null},cast:function(e,t,i){if(e==null)return e;var r=Bridge.is(e,t,!1,i)?e:null;if(r===null)throw new System.InvalidCastException.$ctor1("Unable to cast type "+(e?Bridge.getTypeName(e):"'null'")+" to type "+Bridge.getTypeName(t));return e.$boxed&&t!==Object&&t!==System.Object?e.v:r},apply:function(e,t,i){for(var r=Bridge.getPropertyNames(t,!0),n,s=0;s<r.length;s++)n=r[s],typeof e[n]=="function"&&typeof t[n]!="function"?e[n](t[n]):e[n]=t[n];return i&&i.call(e,e),e},copyProperties:function(e,t){for(var i=Bridge.getPropertyNames(t,!1),r=0;r<i.length;r++){var n=i[r],s=t.hasOwnProperty(n),o=n.split("$").length;s&&(o===1||o===2&&n.match("$d+$"))&&(e[n]=t[n])}return e},merge:function(e,t,i,r){var n,s,o,a,l,u,d,f,C,E,T,w,k;if(e==null)return t;if(e instanceof System.Decimal&&typeof t=="number")return new System.Decimal(t);if(e instanceof System.Int64&&Bridge.isNumber(t))return new System.Int64(t);if(e instanceof System.UInt64&&Bridge.isNumber(t))return new System.UInt64(t);if(e instanceof Boolean||Bridge.isBoolean(e)||typeof e=="number"||e instanceof String||Bridge.isString(e)||e instanceof Function||Bridge.isFunction(e)||e instanceof Date||Bridge.isDate(e)||Bridge.getType(e).$number)return t;if(Bridge.isArray(t)&&Bridge.isFunction(e.add||e.push))for(a=Bridge.isArray(e)?e.push:e.add,C=0;C<t.length;C++)l=t[C],Bridge.isArray(l)||(l=[typeof r>"u"?l:Bridge.merge(r(),l)]),a.apply(e,l);else if(u=Bridge.getType(e),d=u&&u.$descriptors,t)for(n in t){if(s=t[n],f=null,d){for(C=d.length-1;C>=0;C--)if(d[C].name===n){f=d[C];break}}if(f!=null)f.set?e[n]=Bridge.merge(e[n],s):Bridge.merge(e[n],s);else if(typeof e[n]=="function")n.match(/^\s*get[A-Z]/)?Bridge.merge(e[n](),s):e[n](s);else if(E="set"+n.charAt(0).toUpperCase()+n.slice(1),T="set"+n,typeof e[E]=="function"&&typeof s!="function")w="g"+E.slice(1),typeof e[w]=="function"?e[E](Bridge.merge(e[w](),s)):e[E](s);else if(typeof e[T]=="function"&&typeof s!="function")w="g"+T.slice(1),typeof e[w]=="function"?e[T](Bridge.merge(e[w](),s)):e[T](s);else if(s&&s.constructor===Object&&e[n])o=e[n],Bridge.merge(o,s);else{if(k=Bridge.isNumber(t),e[n]instanceof System.Decimal&&k)return new System.Decimal(t);if(e[n]instanceof System.Int64&&k)return new System.Int64(t);if(e[n]instanceof System.UInt64&&k)return new System.UInt64(t);e[n]=s}}else return i&&i.call(e,e),t;return i&&i.call(e,e),e},getEnumerator:function(e,t,i){if(typeof e=="string"&&(e=System.String.toCharArray(e)),arguments.length===2&&Bridge.isFunction(t)&&(i=t,t=null),t&&e&&e[t])return e[t].call(e);if(!i&&e&&e.GetEnumerator)return e.GetEnumerator();var r;if(i&&Bridge.isFunction(Bridge.getProperty(e,r="System$Collections$Generic$IEnumerable$1$"+Bridge.getTypeAlias(i)+"$GetEnumerator"))||i&&Bridge.isFunction(Bridge.getProperty(e,r="System$Collections$Generic$IEnumerable$1$GetEnumerator"))||Bridge.isFunction(Bridge.getProperty(e,r="System$Collections$IEnumerable$GetEnumerator")))return e[r]();if(i&&e&&e.GetEnumerator)return e.GetEnumerator();if(Object.prototype.toString.call(e)==="[object Array]"||e&&Bridge.isDefined(e.length))return new Bridge.ArrayEnumerator(e,i);throw new System.InvalidOperationException.$ctor1("Cannot create Enumerator.")},getPropertyNames:function(e,t){var i=[];for(var r in e)(t||typeof e[r]!="function")&&i.push(r);return i},getProperty:function(e,t){return Bridge.isHtmlAttributeCollection(e)&&!this.isValidHtmlAttributeName(t)?void 0:e[t]},isValidHtmlAttributeName:function(e){if(!e||!e.length)return!1;var t=/^[a-zA-Z_][\w\-]*$/;return t.test(e)},isHtmlAttributeCollection:function(e){return typeof e<"u"&&Object.prototype.toString.call(e)==="[object NamedNodeMap]"},isDefined:function(e,t){return typeof e<"u"&&(t?e!==null:!0)},isEmpty:function(e,t){return typeof e>"u"||e===null||(t?!1:e==="")||(!t&&Bridge.isArray(e)?e.length===0:!1)},toArray:function(e){var t,i,r,n=[];if(Bridge.isArray(e))for(t=0,r=e.length;t<r;++t)n.push(e[t]);else for(t=Bridge.getEnumerator(e);t.moveNext();)i=t.Current,n.push(i);return n},toList:function(e,t){return new(System.Collections.Generic.List$1(t||System.Object)).$ctor1(e)},arrayTypes:[re.Array,re.Uint8Array,re.Int8Array,re.Int16Array,re.Uint16Array,re.Int32Array,re.Uint32Array,re.Float32Array,re.Float64Array,re.Uint8ClampedArray],isArray:function(e,t){var i=t||(e!=null?e.constructor:null);return i?Bridge.arrayTypes.indexOf(i)>=0||i.$isArray||Array.isArray(e):!1},isFunction:function(e){return typeof e=="function"},isDate:function(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"},isNull:function(e){return e==null},isBoolean:function(e){return typeof e=="boolean"},isNumber:function(e){return typeof e=="number"&&isFinite(e)},isString:function(e){return typeof e=="string"},unroll:function(e,t){var s,i;if(Bridge.isArray(e)){for(s=0;s<e.length;s++)i=e[s],Bridge.isString(i)&&(e[s]=Bridge.unroll(i,t));return}var r=e.split("."),n=(t||Bridge.global)[r[0]],s=1;for(s;s<r.length;s++){if(!n)return null;n=n[r[s]]}return n},referenceEquals:function(e,t){return Bridge.hasValue(e)?e===t:!Bridge.hasValue(t)},staticEquals:function(e,t){return Bridge.hasValue(e)?Bridge.hasValue(t)?Bridge.equals(e,t):!1:!Bridge.hasValue(t)},equals:function(e,t){var i,r,n;return e==null&&t==null?!0:(i=Bridge.$equalsGuard[Bridge.$equalsGuard.length-1],i&&i.a===e&&i.b===t?e===t:(Bridge.$equalsGuard.push({a:e,b:t}),r=function(s,o){if(s&&s.$boxed&&s.type.equals&&s.type.equals.length===2)return s.type.equals(s,o);if(o&&o.$boxed&&o.type.equals&&o.type.equals.length===2)return o.type.equals(o,s);if(s&&Bridge.isFunction(s.equals)&&s.equals.length===1)return s.equals(o);if(o&&Bridge.isFunction(o.equals)&&o.equals.length===1)return o.equals(s);if(Bridge.isFunction(s)&&Bridge.isFunction(o))return Bridge.fn.equals.call(s,o);if(Bridge.isDate(s)&&Bridge.isDate(o))return s.kind!==void 0&&s.ticks!==void 0&&o.kind!==void 0&&o.ticks!==void 0?s.ticks.equals(o.ticks):s.valueOf()===o.valueOf();if(Bridge.isNull(s)&&Bridge.isNull(o))return!0;if(Bridge.isNull(s)!==Bridge.isNull(o))return!1;var a=s===o;return!a&&typeof s=="object"&&typeof o=="object"&&s!==null&&o!==null&&s.$kind==="struct"&&o.$kind==="struct"&&s.$$name===o.$$name?Bridge.getHashCode(s)===Bridge.getHashCode(o)&&Bridge.objectEquals(s,o):!a&&s&&o&&s.hasOwnProperty("Item1")&&Bridge.isPlainObject(s)&&o.hasOwnProperty("Item1")&&Bridge.isPlainObject(o)?Bridge.objectEquals(s,o,!0):a},n=r(e,t),Bridge.$equalsGuard.pop(),n))},objectEquals:function(e,t,i){Bridge.$$leftChain=[],Bridge.$$rightChain=[];var r=Bridge.deepEquals(e,t,i);return delete Bridge.$$leftChain,delete Bridge.$$rightChain,r},deepEquals:function(e,t,i){if(typeof e=="object"&&typeof t=="object"){if(e===t)return!0;if(Bridge.$$leftChain.indexOf(e)>-1||Bridge.$$rightChain.indexOf(t)>-1)return!1;for(var r in t){if(t.hasOwnProperty(r)!==e.hasOwnProperty(r))return!1;if(typeof t[r]!=typeof e[r])return!1}for(r in e){if(t.hasOwnProperty(r)!==e.hasOwnProperty(r))return!1;if(typeof e[r]!=typeof t[r])return!1;if(e[r]!==t[r])if(typeof e[r]!="object"||i){if(!Bridge.equals(e[r],t[r]))return!1}else{if(Bridge.$$leftChain.push(e),Bridge.$$rightChain.push(t),!Bridge.deepEquals(e[r],t[r]))return!1;Bridge.$$leftChain.pop(),Bridge.$$rightChain.pop()}}return!0}else return Bridge.equals(e,t)},numberCompare:function(e,t){return e<t?-1:e>t?1:e==t?0:isNaN(e)?isNaN(t)?0:-1:1},compare:function(e,t,i,r){if(e&&e.$boxed&&(e=Bridge.unbox(e,!0)),t&&t.$boxed&&(t=Bridge.unbox(t,!0)),typeof e=="number"&&typeof t=="number")return Bridge.numberCompare(e,t);if(Bridge.isDefined(e,!0)){if(Bridge.isString(e))return System.String.compare(e,t);if(Bridge.isNumber(e)||Bridge.isBoolean(e))return e<t?-1:e>t?1:0;if(Bridge.isDate(e))return e.kind!==void 0&&e.ticks!==void 0?Bridge.compare(System.DateTime.getTicks(e),System.DateTime.getTicks(t)):Bridge.compare(e.valueOf(),t.valueOf())}else{if(i)return 0;throw new System.NullReferenceException}var n;if(r&&Bridge.isFunction(Bridge.getProperty(e,n="System$IComparable$1$"+Bridge.getTypeAlias(r)+"$compareTo"))||r&&Bridge.isFunction(Bridge.getProperty(e,n="System$IComparable$1$compareTo"))||Bridge.isFunction(Bridge.getProperty(e,n="System$IComparable$compareTo")))return e[n](t);if(Bridge.isFunction(e.compareTo))return e.compareTo(t);if(r&&Bridge.isFunction(Bridge.getProperty(t,n="System$IComparable$1$"+Bridge.getTypeAlias(r)+"$compareTo"))||r&&Bridge.isFunction(Bridge.getProperty(t,n="System$IComparable$1$compareTo"))||Bridge.isFunction(Bridge.getProperty(t,n="System$IComparable$compareTo")))return-t[n](e);if(Bridge.isFunction(t.compareTo))return-t.compareTo(e);if(i)return 0;throw new System.Exception("Cannot compare items")},equalsT:function(e,t,i){if(e&&e.$boxed&&e.type.equalsT&&e.type.equalsT.length===2)return e.type.equalsT(e,t);if(t&&t.$boxed&&t.type.equalsT&&t.type.equalsT.length===2)return t.type.equalsT(t,e);if(Bridge.isDefined(e,!0)){if(Bridge.isNumber(e)||Bridge.isString(e)||Bridge.isBoolean(e))return e===t;if(Bridge.isDate(e))return e.kind!==void 0&&e.ticks!==void 0?System.DateTime.getTicks(e).equals(System.DateTime.getTicks(t)):e.valueOf()===t.valueOf()}else throw new System.NullReferenceException;var r;return i&&e!=null&&Bridge.isFunction(Bridge.getProperty(e,r="System$IEquatable$1$"+Bridge.getTypeAlias(i)+"$equalsT"))?e[r](t):i&&t!=null&&Bridge.isFunction(Bridge.getProperty(t,r="System$IEquatable$1$"+Bridge.getTypeAlias(i)+"$equalsT"))?t[r](e):Bridge.isFunction(e)&&Bridge.isFunction(t)?Bridge.fn.equals.call(e,t):e.equalsT?e.equalsT(t):t.equalsT(e)},format:function(e,t,i){if(e&&e.$boxed){if(e.type.$kind==="enum")return System.Enum.format(e.type,e.v,t);if(e.type===System.Char)return System.Char.format(Bridge.unbox(e,!0),t,i);if(e.type.format)return e.type.format(Bridge.unbox(e,!0),t,i)}if(Bridge.isNumber(e))return Bridge.Int.format(e,t,i);if(Bridge.isDate(e))return System.DateTime.format(e,t,i);var r;return Bridge.isFunction(Bridge.getProperty(e,r="System$IFormattable$format"))?e[r](t,i):e.format(t,i)},getType:function(e,t){var i,r;if(e&&e.$boxed)return e.type;if(e==null)throw new System.NullReferenceException.$ctor1("instance is null");if(t)return i=Bridge.getType(e),Bridge.Reflection.isAssignableFrom(t,i)?i:t;if(typeof e=="number")return!isNaN(e)&&isFinite(e)&&Math.floor(e,0)===e?System.Int32:System.Double;if(e.$type)return e.$type;if(e.$getType)return e.$getType();r=null;try{r=e.constructor}catch{r=Object}if(r===Object){var n=e.toString(),s=/\[object (.{1,})\]/.exec(n),o=s&&s.length>1?s[1]:"Object";o!="Object"&&(r=e)}return Bridge.Reflection.convertType(r)},isLower:function(e){var t=String.fromCharCode(e);return t===t.toLowerCase()&&t!==t.toUpperCase()},isUpper:function(e){var t=String.fromCharCode(e);return t!==t.toLowerCase()&&t===t.toUpperCase()},coalesce:function(e,t){return Bridge.hasValue(e)?e:t},fn:{equals:function(e){if(this===e)return!0;if(e==null||this.constructor!==e.constructor)return!1;if(this.$invocationList&&e.$invocationList){if(this.$invocationList.length!==e.$invocationList.length)return!1;for(var t=0;t<this.$invocationList.length;t++)if(this.$invocationList[t]!==e.$invocationList[t])return!1;return!0}return this.equals&&this.equals===e.equals&&this.$method&&this.$method===e.$method&&this.$scope&&this.$scope===e.$scope},call:function(e,t){var i=Array.prototype.slice.call(arguments,2);return e=e||Bridge.global,e[t].apply(e,i)},makeFn:function(e,t){switch(t){case 0:return function(){return e.apply(this,arguments)};case 1:return function(i){return e.apply(this,arguments)};case 2:return function(i,r){return e.apply(this,arguments)};case 3:return function(i,r,n){return e.apply(this,arguments)};case 4:return function(i,r,n,s){return e.apply(this,arguments)};case 5:return function(i,r,n,s,o){return e.apply(this,arguments)};case 6:return function(i,r,n,s,o,a){return e.apply(this,arguments)};case 7:return function(i,r,n,s,o,a,l){return e.apply(this,arguments)};case 8:return function(i,r,n,s,o,a,l,u){return e.apply(this,arguments)};case 9:return function(i,r,n,s,o,a,l,u,d){return e.apply(this,arguments)};case 10:return function(i,r,n,s,o,a,l,u,d,f){return e.apply(this,arguments)};case 11:return function(i,r,n,s,o,a,l,u,d,f,C){return e.apply(this,arguments)};case 12:return function(i,r,n,s,o,a,l,u,d,f,C,E){return e.apply(this,arguments)};case 13:return function(i,r,n,s,o,a,l,u,d,f,C,E,T){return e.apply(this,arguments)};case 14:return function(i,r,n,s,o,a,l,u,d,f,C,E,T,w){return e.apply(this,arguments)};case 15:return function(i,r,n,s,o,a,l,u,d,f,C,E,T,w,k){return e.apply(this,arguments)};case 16:return function(i,r,n,s,o,a,l,u,d,f,C,E,T,w,k,O){return e.apply(this,arguments)};case 17:return function(i,r,n,s,o,a,l,u,d,f,C,E,T,w,k,O,M){return e.apply(this,arguments)};case 18:return function(i,r,n,s,o,a,l,u,d,f,C,E,T,w,k,O,M,P){return e.apply(this,arguments)};case 19:return function(i,r,n,s,o,a,l,u,d,f,C,E,T,w,k,O,M,P,y){return e.apply(this,arguments)};default:return function(i,r,n,s,o,a,l,u,d,f,C,E,T,w,k,O,M,P,y,m){return e.apply(this,arguments)}}},cacheBind:function(e,t,i,r){return Bridge.fn.bind(e,t,i,r,!0)},bind:function(e,t,i,r,n){var s,o;if(t&&t.$method===t&&t.$scope===e)return t;if(e&&n&&e.$$bind){for(s=0;s<e.$$bind.length;s++)if(e.$$bind[s].$method===t)return e.$$bind[s]}return o=arguments.length===2?Bridge.fn.makeFn(function(){Bridge.caller.unshift(this);var a=null;try{a=t.apply(e,arguments)}finally{Bridge.caller.shift(this)}return a},t.length):Bridge.fn.makeFn(function(){var a=i||arguments,l;r===!0?(a=Array.prototype.slice.call(arguments,0),a=a.concat(i)):typeof r=="number"&&(a=Array.prototype.slice.call(arguments,0),r===0?a.unshift.apply(a,i):r<a.length?a.splice.apply(a,[r,0].concat(i)):a.push.apply(a,i)),Bridge.caller.unshift(this),l=null;try{l=t.apply(e,a)}finally{Bridge.caller.shift(this)}return l},t.length),e&&n&&(e.$$bind=e.$$bind||[],e.$$bind.push(o)),o.$method=t,o.$scope=e,o.equals=Bridge.fn.equals,o},bindScope:function(e,t){var i=Bridge.fn.makeFn(function(){var r=Array.prototype.slice.call(arguments,0),n;r.unshift.apply(r,[e]),Bridge.caller.unshift(this),n=null;try{n=t.apply(e,r)}finally{Bridge.caller.shift(this)}return n},t.length);return i.$method=t,i.$scope=e,i.equals=Bridge.fn.equals,i},$build:function(e){if(!e||e.length===0)return null;var t=function(){for(var i=null,r,n=0;n<e.length;n++)r=e[n],i=r.apply(null,arguments);return i};return t.$invocationList=e?Array.prototype.slice.call(e,0):[],e=t.$invocationList.slice(),t},combine:function(e,t){var i,r,n;return!e||!t?(i=e||t,i&&Bridge.fn.$build([i])):(r=e.$invocationList?e.$invocationList:[e],n=t.$invocationList?t.$invocationList:[t],Bridge.fn.$build(r.concat(n)))},getInvocationList:function(e){if(e==null)throw new System.ArgumentNullException;return e.$invocationList||(e.$invocationList=[e]),e.$invocationList},remove:function(e,t){if(!e||!t)return e||null;for(var i=e.$invocationList?e.$invocationList.slice(0):[e],r=t.$invocationList?t.$invocationList:[t],n=[],s,o=-1,a=i.length-r.length;a>=0;a--)if(Bridge.fn.equalInvocationLists(i,r,a,r.length))return i.length-r.length==0?null:i.length-r.length==1?i[a!=0?0:i.length-1]:(i.splice(a,r.length),Bridge.fn.$build(i));return e},equalInvocationLists:function(e,t,i,r){for(var n=0;n<r;n=n+1|0)if(!Bridge.equals(e[System.Array.index(i+n|0,e)],t[System.Array.index(n,t)]))return!1;return!0}},sleep:function(e,t){if(Bridge.hasValue(t)&&(e=t.getTotalMilliseconds()),isNaN(e)||e<-1||e>2147483647)throw new System.ArgumentOutOfRangeException.$ctor4("timeout","Number must be either non-negative and less than or equal to Int32.MaxValue or -1");e==-1&&(e=2147483647);for(var i=new Date().getTime();new Date().getTime()-i<e&&!(new Date().getTime()-i>2147483647););},getMetadata:function(e){return e.$getMetadata?e.$getMetadata():e.$metadata},loadModule:function(e,t){var i=e.amd,r=e.cjs,n=e.fn,s=new System.Threading.Tasks.TaskCompletionSource,o=Bridge.global[n||"require"],a,l,u;if(i&&i.length>0)o(i,function(){var d=Array.prototype.slice.call(arguments,0),f;if(r&&r.length>0)for(f=0;f<r.length;f++)d.push(o(r[f]));t.apply(Bridge.global,d),s.setResult()});else if(r&&r.length>0){for(u=new System.Threading.Tasks.Task,u.status=System.Threading.Tasks.TaskStatus.ranToCompletion,a=[],l=0;l<r.length;l++)a.push(o(r[l]));return t.apply(Bridge.global,a),u}else return u=new System.Threading.Tasks.Task,u.status=System.Threading.Tasks.TaskStatus.ranToCompletion,u;return s.task}},Ye.setImmediate=re.setImmediate?re.setImmediate.bind(re):function(){function e(n){if(n.data==r){t=t.next;var s=t.func;delete t.func,s()}}var t={},i=t,r=Math.random();return typeof window<"u"&&(window.addEventListener?window.addEventListener("message",e):window.attachEvent("onmessage",e)),function(n){i=i.next={func:n},typeof window<"u"&&window.postMessage(r,"*")}}(),re.Bridge=Ye,re.Bridge.caller=[],re.Bridge.$equalsGuard=[],re.Bridge.$toStringGuard=[],re.console&&(re.Bridge.Console=re.console),re.System={},re.System.Diagnostics={},re.System.Diagnostics.Contracts={},re.System.Threading={};var Q=function(e){return Bridge.global.navigator&&e.test(Bridge.global.navigator.userAgent.toLowerCase())},at=Bridge.global.document&&Bridge.global.document.compatMode==="CSS1Compat",Ne=function(e,t){var i;return Bridge.global.navigator&&e&&(i=t.exec(navigator.userAgent.toLowerCase()))?parseFloat(i[1]):0},ue=Bridge.global.document?Bridge.global.document.documentMode:null,Me=Q(/opera/),xt=Me&&Q(/version\/10\.5/),ut=Q(/\bchrome\b/),Je=Q(/webkit/),De=!ut&&Q(/safari/),At=De&&Q(/applewebkit\/4/),Bt=De&&Q(/version\/3/),_t=De&&Q(/version\/4/),wt=De&&Q(/version\/5\.0/),vt=De&&Q(/version\/5/),fe=!Me&&(Q(/msie/)||Q(/trident/)),Ce=fe&&(Q(/msie 7/)&&ue!==8&&ue!==9&&ue!==10||ue===7),_e=fe&&(Q(/msie 8/)&&ue!==7&&ue!==9&&ue!==10||ue===8),Re=fe&&(Q(/msie 9/)&&ue!==7&&ue!==8&&ue!==10||ue===9),qe=fe&&(Q(/msie 10/)&&ue!==7&&ue!==8&&ue!==9||ue===10),lt=fe&&(Q(/trident\/7\.0/)&&ue!==7&&ue!==8&&ue!==9&&ue!==10||ue===11),Se=fe&&Q(/msie 6/),Fe=!Je&&!fe&&Q(/gecko/),Pe=Fe&&Q(/rv:1\.9/),Tt=Fe&&Q(/rv:2\.0/),bt=Fe&&Q(/rv:5\./),Dt=Fe&&Q(/rv:10\./),Rt=Pe&&Q(/rv:1\.9\.0/),Ot=Pe&&Q(/rv:1\.9\.1/),Gt=Pe&&Q(/rv:1\.9\.2/),ct=Q(/windows|win32/),mt=Q(/macintosh|mac os x/),yt=Q(/linux/),$i=null,Nt=Ne(!0,/\bchrome\/(\d+\.\d+)/),Oe=Ne(!0,/\bfirefox\/(\d+\.\d+)/),kt=Ne(fe,/msie (\d+\.\d+)/),Ft=Ne(Me,/version\/(\d+\.\d+)/),Vt=Ne(De,/version\/(\d+\.\d+)/),Lt=Ne(Je,/webkit\/(\d+\.\d+)/),Mt=Bridge.global.location?/^https/i.test(Bridge.global.location.protocol):!1,ht=Bridge.global.navigator&&/iPhone/i.test(Bridge.global.navigator.platform),dt=Bridge.global.navigator&&/iPod/i.test(Bridge.global.navigator.platform),Xe=Bridge.global.navigator&&/iPad/i.test(Bridge.global.navigator.userAgent),qt=Bridge.global.navigator&&/Blackberry/i.test(Bridge.global.navigator.userAgent),ft=Bridge.global.navigator&&/Android/i.test(Bridge.global.navigator.userAgent),gt=mt||ct||yt&&!ft,St=Xe,Pt=!gt&&!St,zt={isStrict:at,isIEQuirks:fe&&!at&&(Se||Ce||_e||Re),isOpera:Me,isOpera10_5:xt,isWebKit:Je,isChrome:ut,isSafari:De,isSafari3:Bt,isSafari4:_t,isSafari5:vt,isSafari5_0:wt,isSafari2:At,isIE:fe,isIE6:Se,isIE7:Ce,isIE7m:Se||Ce,isIE7p:fe&&!Se,isIE8:_e,isIE8m:Se||Ce||_e,isIE8p:fe&&!(Se||Ce),isIE9:Re,isIE9m:Se||Ce||_e||Re,isIE9p:fe&&!(Se||Ce||_e),isIE10:qe,isIE10m:Se||Ce||_e||Re||qe,isIE10p:fe&&!(Se||Ce||_e||Re),isIE11:lt,isIE11m:Se||Ce||_e||Re||qe||lt,isIE11p:fe&&!(Se||Ce||_e||Re||qe),isGecko:Fe,isGecko3:Pe,isGecko4:Tt,isGecko5:bt,isGecko10:Dt,isFF3_0:Rt,isFF3_5:Ot,isFF3_6:Gt,isFF4:4<=Oe&&Oe<5,isFF5:5<=Oe&&Oe<6,isFF10:10<=Oe&&Oe<11,isLinux:yt,isWindows:ct,isMac:mt,chromeVersion:Nt,firefoxVersion:Oe,ieVersion:kt,operaVersion:Ft,safariVersion:Vt,webKitVersion:Lt,isSecure:Mt,isiPhone:ht,isiPod:dt,isiPad:Xe,isBlackberry:qt,isAndroid:ft,isDesktop:gt,isTablet:St,isPhone:Pt,iOS:ht||Xe||dt,standalone:Bridge.global.navigator?!!Bridge.global.navigator.standalone:!1};Bridge.Browser=zt,nt={_initialize:function(){this.$init||(this.$init={},this.$staticInit&&this.$staticInit(),this.$initMembers&&this.$initMembers())},initConfig:function(e,t,i,r,n,s){var o,a,l=r?n:n.ctor,u=l.$descriptors,d=l.$aliases,f,C,E,T,w,k;if(i.fields)for(a in i.fields)n[a]=i.fields[a];if(f=i.properties,f)for(a in f){if(C=f[a],C!=null&&Bridge.isPlainObject(C)&&(!C.get||!C.set)){for(w=0;w<u.length;w++)u[w].name===a&&(E=u[w]);E&&E.get&&!C.get&&(C.get=E.get),E&&E.set&&!C.set&&(C.set=E.set)}T=Bridge.property(r?n:s,a,C,r,l),T.name=a,T.cls=l,u.push(T)}if(i.events)for(a in i.events)Bridge.event(n,a,i.events[a],r);if(i.alias)for(k=0;k<i.alias.length;k++)(function(O,M,P,y){for(var m,c,$,x=null,D=u.length-1;D>=0;D--)if(u[D].name===M){x=u[D];break}for(m=Array.isArray(P)?P:[P],c=0;c<m.length;c++)P=m[c],x!=null?(Object.defineProperty(O,P,x),d.push({alias:P,descriptor:x})):(n.hasOwnProperty(M)||!s?($=n[M],$===void 0&&s&&($=s[M])):($=s[M],$===void 0&&($=n[M])),Bridge.isFunction($)?(O[P]=$,d.push({fn:M,alias:P})):(x={get:function(){return this[M]},set:function(G){this[M]=G}},Object.defineProperty(O,P,x),d.push({alias:P,descriptor:x})))})(r?n:s,i.alias[k],i.alias[k+1],l),k++;i.init&&(o=i.init),(o||e&&!r&&t.$initMembers)&&(n.$initMembers=function(){e&&!r&&t.$initMembers&&t.$initMembers.call(this),o&&o.call(this)})},convertScheme:function(e){var t={},i=function(r,n){for(var s,o,a,l=["fields","methods","events","props","properties","alias","ctors"],u=Object.keys(r),d=0;d<u.length;d++)s=u[d],l.indexOf(s)===-1&&(n[s]=r[s]);r.fields&&Bridge.apply(n,r.fields),r.methods&&Bridge.apply(n,r.methods),o={},a=!1,r.props?(o.properties=r.props,a=!0):r.properties&&(o.properties=r.properties,a=!0),r.events&&(o.events=r.events,a=!0),r.alias&&(o.alias=r.alias,a=!0),r.ctors&&(r.ctors.init&&(o.init=r.ctors.init,a=!0,delete r.ctors.init),Bridge.apply(n,r.ctors)),a&&(n.$config=o)};return e.main&&(t.$main=e.main,delete e.main),i(e,t),(e.statics||e.$statics)&&(t.$statics={},i(e.statics||e.$statics,t.$statics)),t},definei:function(e,t,i){(i===!0||!i)&&t?t.$kind="interface":i?i.$kind="interface":t={$kind:"interface"};var r=Bridge.define(e,t,i);return r.$kind="interface",r.$isInterface=!0,r},define:function(e,t,i,r){var n=!1,s,o,a,l,u,d,f,C,E,T,w,k,O;if(i===!0?(n=!0,i=t,t=Bridge.global):i||(i=t,t=Bridge.global),Bridge.isFunction(i))return s=function(){var K,ae,pe,ve;return ae=Bridge.Class.getCachedType(s,arguments),ae?ae.type:(K=Array.prototype.slice.call(arguments),pe=i.apply(null,K),ve=Bridge.define(Bridge.Class.genericName(e,K),pe,!0,{fn:s,args:K}),Bridge.Class.staticInitAllow||Bridge.Class.queueIsBlocked||Bridge.Class.$queue.push(ve),Bridge.get(ve))},s.$cache=[],Bridge.Class.generic(e,t,s,i);n||(Bridge.Class.staticInitAllow=!1),i=i||{},i.$kind=i.$kind||"class",o=!1,i.$kind.match("^nested ")!==null&&(o=!0,i.$kind=i.$kind.substr(7)),i.$kind!=="enum"||i.inherits||(i.inherits=[System.IComparable,System.IFormattable]);var M=["fields","events","props","ctors","methods"],P=Bridge.isFunction(i.main)?0:1,y=function(K){if(K.config&&Bridge.isPlainObject(K.config)||K.$main&&Bridge.isFunction(K.$main)||K.hasOwnProperty("ctor")&&Bridge.isFunction(K.ctor))return P=1,!1;if(K.alias&&Bridge.isArray(K.alias)&&K.alias.length>0&&K.alias.length%2==0)return!0;for(var ae=0;ae<M.length;ae++)if(K[M[ae]]&&Bridge.isPlainObject(K[M[ae]]))return!0;return!1},m=y(i);!m&&i.statics&&(m=y(i.statics)),m||(m=P==0),m&&(i=Bridge.Class.convertScheme(i));var c=i.$inherits||i.inherits,$=i.$statics||i.statics,x=i.$entryPoint,D,G,q=i.$scope||t||Bridge.global,z=Bridge.global.System&&Bridge.global.System.Object||Object,Z,te,oe,J,W,le=!0;if(i.$kind==="enum"&&(c=[System.Enum]),i.$noRegister===!0&&(le=!1,delete i.$noRegister),i.$inherits?delete i.$inherits:delete i.inherits,x&&delete i.$entryPoint,Bridge.isFunction($)?$=null:i.$statics?delete i.$statics:delete i.statics,f=i.hasOwnProperty("ctor")&&i.ctor,f?a=f:(a=i.$literal?function(K){return K=K||{},K.$getType=function(){return a},K}:function(){this.$initialize(),a.$base&&(a.$$inherits&&a.$$inherits.length>0&&a.$$inherits[0].$staticInit&&a.$$inherits[0].$staticInit(),a.$base.ctor?a.$base.ctor.call(this):Bridge.isFunction(a.$base.constructor)&&a.$base.constructor.call(this))},i.ctor=a),i.$literal&&($&&$.createInstance||(a.createInstance=function(){var K={};return K.$getType=function(){return a},K}),a.$literal=!0,delete i.$literal),!n&&le&&(q=Bridge.Class.set(q,e,a)),r&&r.fn.$cache.push({type:a,args:r.args}),a.$$name=e,o&&(l=a.$$name.lastIndexOf("."),a.$$name=a.$$name.substr(0,l)+"+"+a.$$name.substr(l+1)),a.$kind=i.$kind,i.$module&&(a.$module=i.$module),i.$metadata&&(a.$metadata=i.$metadata),r&&n){for(a.$genericTypeDefinition=r.fn,a.$typeArguments=r.args,a.$assembly=r.fn.$assembly||Bridge.$currentAssembly,u=Bridge.Reflection.getTypeFullName(r.fn),Z=0;Z<r.args.length;Z++)u+=(Z===0?"[":",")+"["+Bridge.Reflection.getTypeQName(r.args[Z])+"]";u+="]",a.$$fullname=u}else a.$$fullname=a.$$name;c&&Bridge.isFunction(c)&&(c=c()),Bridge.Class.createInheritors(a,c),d=c?c[0].$kind==="interface":!0,d&&(c=null),D=c?c[0].prototype:this.prototype,a.$base=D,c&&!c[0].$$initCtor?(f=c[0],C=function(){},C.prototype=f.prototype,C.prototype.constructor=f,C.prototype.$$fullname=Bridge.Reflection.getTypeFullName(f),G=new C):G=c?new c[0].$$initCtor:z.$$initCtor?new z.$$initCtor:new z,a.$$initCtor=function(){},a.$$initCtor.prototype=G,a.$$initCtor.prototype.constructor=a,a.$$initCtor.prototype.$$fullname=r&&n?a.$$fullname:a.$$name,$&&(E=$.$config||$.config,E&&!Bridge.isFunction(E)&&(Bridge.Class.initConfig(c,D,E,!0,a),$.$config?delete $.$config:delete $.config)),T=i.$config||i.config,T&&!Bridge.isFunction(T)?(Bridge.Class.initConfig(c,D,T,!1,i,G),i.$config?delete i.$config:delete i.config):c&&D.$initMembers&&(i.$initMembers=function(){D.$initMembers.call(this)}),i.$initialize=Bridge.Class._initialize,w=[];for(W in i)w.push(W);for(Z=0;Z<w.length;Z++)W=w[Z],te=i[W],oe=W==="ctor",J=W,Bridge.isFunction(te)&&(oe||W.match("^\\$ctor")!==null)&&(oe=!0),k=i[W],oe&&(a[J]=k,a[J].prototype=G,a[J].prototype.constructor=a),G[J]=k;if(G.$$name=e,G.toJSON||(G.toJSON=Bridge.Class.toJSON),$){for(W in $)k=$[W],W==="ctor"?a.$ctor=k:(i.$kind!=="enum"||Bridge.isFunction(k)||W.charAt(0)==="$"||(a.$names=a.$names||[],a.$names.push({name:W,value:k})),a[W]=k);i.$kind==="enum"&&a.$names&&(a.$names=a.$names.sort(function(K,ae){return Bridge.isFunction(K.value.eq)?K.value.sub(ae.value).sign():K.value-ae.value}).map(function(K){return K.name}))}return c||(c=[z].concat(a.$interfaces)),Bridge.Class.setInheritors(a,c),s=function(){Bridge.Class.staticInitAllow&&!a.$isGenericTypeDefinition&&(a.$staticInit=null,a.$initMembers&&a.$initMembers(),a.$ctor&&a.$ctor())},(x||Bridge.isFunction(G.$main))&&(G.$main&&(O=G.$main.name||"Main",a[O]||(a[O]=G.$main)),Bridge.Class.$queueEntry.push(a)),a.$staticInit=s,!n&&le&&Bridge.Class.registerType(e,a),Bridge.Reflection&&(a.$getMetadata=Bridge.Reflection.getMetadata),a.$kind==="enum"&&(a.prototype.$utype||(a.prototype.$utype=System.Int32),a.$is=function(K){var ae=a.prototype.$utype;return ae===String?typeof K=="string":ae&&ae.$is?ae.$is(K):typeof K=="number"},a.getDefaultValue=function(){var K=a.prototype.$utype;return K===String||K===System.String?null:0}),a.$kind==="interface"&&(a.prototype.$variance&&(a.isAssignableFrom=Bridge.Class.varianceAssignable),a.$isInterface=!0),a},toCtorString:function(){return Bridge.Reflection.getTypeName(this)},createInheritors:function(e,t){var i=[],r=[],n=[],s=[],o,a,l;if(t)for(o=0;o<t.length;o++){var u=t[o],d=(u.$interfaces||[]).concat(u.$baseInterfaces||[]),f=u.$descriptors,C=u.$aliases;if(f&&f.length>0)for(a=0;a<f.length;a++)n.push(f[a]);if(C&&C.length>0)for(a=0;a<C.length;a++)s.push(C[a]);if(d.length>0)for(l=0;l<d.length;l++)r.indexOf(d[l])<0&&r.push(d[l]);u.$kind==="interface"&&i.push(u)}e.$descriptors=n,e.$aliases=s,e.$baseInterfaces=r,e.$interfaces=i,e.$allInterfaces=i.concat(r)},toJSON:function(){var e={},t=Bridge.getType(this),i=t.$descriptors||[],r,n,s,o,a;for(r in this){if(n=this.hasOwnProperty(r),s=null,!n){for(o=i.length-1;o>=0;o--)if(i[o].name===r){s=i[o];break}}a=r.split("$").length,(n||s!=null)&&(a===1||a===2&&r.match("$d+$"))&&(e[r]=this[r])}return e},setInheritors:function(e,t){var i,r;for(e.$$inherits=t,i=0;i<t.length;i++)r=t[i],r.$$inheritors||(r.$$inheritors=[]),r.$$inheritors.push(e)},varianceAssignable:function(e){var t=function(n,s){var o;if(s.$genericTypeDefinition===n.$genericTypeDefinition&&s.$typeArguments.length===n.$typeArguments.length){for(o=0;o<n.$typeArguments.length;o++){var a=n.prototype.$variance[o],l=n.$typeArguments[o],u=s.$typeArguments[o];switch(a){case 1:if(!Bridge.Reflection.isAssignableFrom(l,u))return!1;break;case 2:if(!Bridge.Reflection.isAssignableFrom(u,l))return!1;break;default:if(u!==l)return!1}}return!0}return!1},i,r;if(e.$kind==="interface"&&t(this,e))return!0;for(i=Bridge.Reflection.getInterfaces(e),r=0;r<i.length;r++)if(i[r]===this||t(this,i[r]))return!0;return!1},registerType:function(e,t){Bridge.$currentAssembly&&(Bridge.$currentAssembly.$types[e]=t,t.$assembly=Bridge.$currentAssembly)},addExtend:function(e,t){var i,r,n,s;for(Array.prototype.push.apply(e.$$inherits,t),e.$interfaces=e.$interfaces||[],e.$baseInterfaces=e.$baseInterfaces||[],i=0;i<t.length;i++){if(r=t[i],r.$$inheritors||(r.$$inheritors=[]),r.$$inheritors.push(e),n=(r.$interfaces||[]).concat(r.$baseInterfaces||[]),n.length>0)for(s=0;s<n.length;s++)e.$baseInterfaces.indexOf(n[s])<0&&e.$baseInterfaces.push(n[s]);r.$kind==="interface"&&e.$interfaces.push(r)}e.$allInterfaces=e.$interfaces.concat(e.$baseInterfaces)},set:function(e,t,i,r){for(var n=t.split("."),s,o,a,l,u=0;u<n.length-1;u++)typeof e[n[u]]>"u"&&(e[n[u]]={}),e=e[n[u]];if(s=n[n.length-1],a=e[s],a){if(a.$$name===t)throw"Class '"+t+"' is already defined";for(o in a)l=a[o],typeof l=="function"&&l.$$name&&function(d,f,C){Object.defineProperty(d,f,{get:function(){return Bridge.Class.staticInitAllow&&(C.$staticInit&&C.$staticInit(),Bridge.Class.defineProperty(d,f,C)),C},set:function(E){C=E},enumerable:!0,configurable:!0})}(i,o,l)}return r!==!0?function(d,f,C){Object.defineProperty(d,f,{get:function(){return Bridge.Class.staticInitAllow&&(C.$staticInit&&C.$staticInit(),Bridge.Class.defineProperty(d,f,C)),C},set:function(E){C=E},enumerable:!0,configurable:!0})}(e,s,i):e[s]=i,e},defineProperty:function(e,t,i){Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0})},genericName:function(e,t){for(var i,r=e,n=0;n<t.length;n++)i=t[n],r+="$"+(i.$$name||Bridge.getTypeName(i));return r},getCachedType:function(e,t){for(var i=e.$cache,r=i.length,n,s,o,a=0;a<r;a++)if(n=i[a],n.args.length===t.length){for(s=!0,o=0;o<n.args.length;o++)if(n.args[o]!==t[o]){s=!1;break}if(s)return n}return null},generic:function(e,t,i,r){return i.$$name=e,i.$kind="class",Bridge.Class.set(t,e,i,!0),Bridge.Class.registerType(e,i),i.$typeArgumentCount=r.length,i.$isGenericTypeDefinition=!0,i.$getMetadata=Bridge.Reflection.getMetadata,i.$staticInit=function(){var n,s,o,a,l,u;i.$typeArguments=Bridge.Reflection.createTypeParams(r),n=Bridge.Class.staticInitAllow,s=Bridge.Class.queueIsBlocked,Bridge.Class.staticInitAllow=!1,Bridge.Class.queueIsBlocked=!0,o=r.apply(null,i.$typeArguments),a=o.$inherits||o.inherits,Bridge.Class.staticInitAllow=n,Bridge.Class.queueIsBlocked=s,a&&Bridge.isFunction(a)&&(a=a()),Bridge.Class.createInheritors(i,a),l=Bridge.global.System&&Bridge.global.System.Object||Object,a||(a=[l].concat(i.$interfaces)),Bridge.Class.setInheritors(i,a),u=a?a[0].$$initCtor?new a[0].$$initCtor:new a[0]:new l,i.prototype=u,i.prototype.constructor=i,i.$kind=o.$kind||"class",o.$module&&(i.$module=o.$module)},Bridge.Class.$queue.push(i),i},init:function(e){var t,i,r,n,s,o,a;if(Bridge.Reflection&&(t=Bridge.Reflection.deferredMeta,i=t.length,i>0))for(Bridge.Reflection.deferredMeta=[],o=0;o<i;o++)r=t[o],Bridge.setMetadata(r.typeName,r.metadata,r.ns);if(e){n=Bridge.Class.staticInitAllow,Bridge.Class.staticInitAllow=!0,e(),Bridge.Class.staticInitAllow=n;return}for(Bridge.Class.staticInitAllow=!0,s=Bridge.Class.$queue.concat(Bridge.Class.$queueEntry),Bridge.Class.$queue.length=0,Bridge.Class.$queueEntry.length=0,o=0;o<s.length;o++)a=s[o],a.$staticInit&&a.$staticInit(),a.prototype.$main&&(function(l,u){Bridge.ready(function(){var d=l[u]();d&&d.continueWith&&d.continueWith(function(){setTimeout(function(){d.getAwaitedResult()},0)})})}(a,a.prototype.$main.name||"Main"),a.prototype.$main=null)}},Bridge.Class=nt,Bridge.Class.$queue=[],Bridge.Class.$queueEntry=[],Bridge.define=Bridge.Class.define,Bridge.definei=Bridge.Class.definei,Bridge.init=Bridge.Class.init,Bridge.assembly=function(e,t,i,r){var n,s,o;i||(i=t,t={}),e=e||"Bridge.$Unknown",n=System.Reflection.Assembly.assemblies[e],n?Bridge.apply(n.res,t||{}):n=new System.Reflection.Assembly(e,t),s=Bridge.$currentAssembly,Bridge.$currentAssembly=n,i&&(o=Bridge.Class.staticInitAllow,Bridge.Class.staticInitAllow=!1,i.call(Bridge.global,n,Bridge.global),Bridge.Class.staticInitAllow=o),Bridge.init(),r&&(Bridge.$currentAssembly=s)},Bridge.define("System.Reflection.Assembly",{statics:{assemblies:{}},ctor:function(e,t){this.$initialize(),this.name=e,this.res=t||{},this.$types={},this.$={},System.Reflection.Assembly.assemblies[e]=this},toString:function(){return this.name},getManifestResourceNames:function(){return Object.keys(this.res)},getManifestResourceDataAsBase64:function(e,t){return arguments.length===1&&(t=e,e=null),e&&(t=Bridge.Reflection.getTypeNamespace(e)+"."+t),this.res[t]||null},getManifestResourceData:function(e,t){arguments.length===1&&(t=e,e=null),e&&(t=Bridge.Reflection.getTypeNamespace(e)+"."+t);var i=this.res[t];return i?System.Convert.fromBase64String(i):null},getCustomAttributes:function(e){return this.attr&&e&&!Bridge.isBoolean(e)?this.attr.filter(function(t){return Bridge.is(t,e)}):this.attr||[]}}),Bridge.$currentAssembly=new System.Reflection.Assembly("mscorlib"),Bridge.SystemAssembly=Bridge.$currentAssembly,Bridge.SystemAssembly.$types["System.Reflection.Assembly"]=System.Reflection.Assembly,System.Reflection.Assembly.$assembly=Bridge.SystemAssembly,de=Bridge.$currentAssembly,Bridge.define("System.Object",{}),Bridge.define("System.Void",{$kind:"struct",statics:{methods:{getDefaultValue:function(){return new System.Void}}},methods:{$clone:function(e){return this}}}),Bridge.init(function(){Bridge.SystemAssembly.version="17.10.1",Bridge.SystemAssembly.compiler="17.10.1"}),Bridge.define("Bridge.Utils.SystemAssemblyVersion"),Bridge.Reflection={deferredMeta:[],setMetadata:function(e,t,i){if(Bridge.isString(e)){var r=e;if(e=Bridge.unroll(r),e==null){Bridge.Reflection.deferredMeta.push({typeName:r,metadata:t,ns:i});return}}i=Bridge.unroll(i),e.$getMetadata=Bridge.Reflection.getMetadata,e.$metadata=t},initMetaData:function(e,t){var i,r,n;if(t.m){for(i=0;i<t.m.length;i++)if(r=t.m[i],r.td=e,r.ad&&(r.ad.td=e),r.r&&(r.r.td=e),r.g&&(r.g.td=e),r.s&&(r.s.td=e),r.tprm&&Bridge.isArray(r.tprm))for(n=0;n<r.tprm.length;n++)r.tprm[n]=Bridge.Reflection.createTypeParam(r.tprm[n],e,r,n)}e.$metadata=t,e.$initMetaData=!0},getMetadata:function(){var e,t;return!this.$metadata&&this.$genericTypeDefinition&&(this.$metadata=this.$genericTypeDefinition.$factoryMetadata||this.$genericTypeDefinition.$metadata),e=this.$metadata,typeof e=="function"&&(this.$isGenericTypeDefinition&&!this.$factoryMetadata&&(this.$factoryMetadata=this.$metadata),this.$typeArguments?e=this.$metadata.apply(null,this.$typeArguments):this.$isGenericTypeDefinition?(t=Bridge.Reflection.createTypeParams(this.$metadata),this.$typeArguments=t,e=this.$metadata.apply(null,t)):e=this.$metadata()),!this.$initMetaData&&e&&Bridge.Reflection.initMetaData(this,e),e},createTypeParams:function(e,t){for(var i=[],r=e.toString(),n=r.slice(r.indexOf("(")+1,r.indexOf(")")).match(/([^\s,]+)/g)||[],s=0;s<n.length;s++)i.push(Bridge.Reflection.createTypeParam(n[s],t,null,s));return i},createTypeParam:function(e,t,i,r){var n=function(){};return n.$$name=e,n.$isTypeParameter=!0,t&&(n.td=t),i&&(n.md=i),r!=null&&(n.gPrmPos=r),n},load:function(e){return System.Reflection.Assembly.assemblies[e]||require(e)},getGenericTypeDefinition:function(e){if(e.$isGenericTypeDefinition)return e;if(!e.$genericTypeDefinition)throw new System.InvalidOperationException.$ctor1("This operation is only valid on generic types.");return e.$genericTypeDefinition},getGenericParameterCount:function(e){return e.$typeArgumentCount||0},getGenericArguments:function(e){return e.$typeArguments||[]},getMethodGenericArguments:function(e){return e.tprm||[]},isGenericTypeDefinition:function(e){return e.$isGenericTypeDefinition||!1},isGenericType:function(e){return e.$genericTypeDefinition!=null||Bridge.Reflection.isGenericTypeDefinition(e)},convertType:function(e){return e===Boolean?System.Boolean:e===String?System.String:e===Object?System.Object:e===Date?System.DateTime:e},getBaseType:function(e){var t,i;if(Bridge.isObject(e)||Bridge.Reflection.isInterface(e)||e.prototype==null)return null;if(Object.getPrototypeOf)return Bridge.Reflection.convertType(Object.getPrototypeOf(e.prototype).constructor);if(t=e.prototype,Object.prototype.hasOwnProperty.call(t,"constructor"))try{return i=t.constructor,delete t.constructor,Bridge.Reflection.convertType(t.constructor)}finally{t.constructor=i}return Bridge.Reflection.convertType(t.constructor)},getTypeFullName:function(e){var t,i,r,n,s,o;return e.$$fullname?t=e.$$fullname:e.$$name&&(t=e.$$name),t?(i=Bridge.Reflection.getTypeNamespace(e,t),i&&(r=t.indexOf("["),s=t.substring(i.length+1,r===-1?t.length:r),new RegExp(/[\.\$]/).test(s)&&(t=i+"."+s.replace(/\.|\$/g,function(a){return a==="."?"+":"`"})+(r===-1?"":t.substring(r)))),t):e.constructor===Object?(t=e.toString(),n=/\[object (.{1,})\]/.exec(t),s=n&&n.length>1?n[1]:"Object",s=="Object"?"System.Object":s):(t=e.constructor===Function?e.toString():e.constructor.toString(),o=/function (.{1,})\(/.exec(t),o&&o.length>1?o[1]:"System.Object")},_makeQName:function(e,t){return e+(t?", "+t.name:"")},getTypeQName:function(e){return Bridge.Reflection._makeQName(Bridge.Reflection.getTypeFullName(e),e.$assembly)},getTypeName:function(e){var t=Bridge.Reflection.getTypeFullName(e),i=t.indexOf("["),r=t.lastIndexOf("+",i>=0?i:t.length),n=r>-1?r:t.lastIndexOf(".",i>=0?i:t.length),s=n>0?i>=0?t.substring(n+1,i):t.substr(n+1):t;return e.$isArray?s+"[]":s},getTypeNamespace:function(e,t){var i=t||Bridge.Reflection.getTypeFullName(e),r=i.indexOf("["),n=i.lastIndexOf(".",r>=0?r:i.length),s=n>0?i.substr(0,n):"",o;return e.$assembly&&(o=Bridge.Reflection._getAssemblyType(e.$assembly,s),o&&(s=Bridge.Reflection.getTypeNamespace(o))),s},getTypeAssembly:function(e){return e.$isArray?Bridge.Reflection.getTypeAssembly(e.$elementType):System.Array.contains([Date,Number,Boolean,String,Function,Array],e)?Bridge.SystemAssembly:e.$assembly||Bridge.SystemAssembly},_extractArrayRank:function(e){var t=-1,i=/<(\d+)>$/g.exec(e);return i&&(e=e.substring(0,i.index),t=parseInt(i[1])),i=/\[(,*)\]$/g.exec(e),i&&(e=e.substring(0,i.index),t=i[1].length+1),{rank:t,name:e}},_getAssemblyType:function(e,t){var i=!1,r=-1,n,s,o,a,l;if(new RegExp(/[\+\`]/).test(t)&&(t=t.replace(/\+|\`/g,function(u){return u==="+"?".":"$"})),e||(e=Bridge.SystemAssembly,i=!0),n=Bridge.Reflection._extractArrayRank(t),r=n.rank,t=n.name,e.$types){if(s=e.$types[t]||null,s)return r>-1?System.Array.type(s,r):s;if(e.name==="mscorlib")e=Bridge.global;else return null}for(o=t.split("."),a=e,l=0;l<o.length;l++)if(a=a[o[l]],!a)return null;return typeof a!="function"||!i&&a.$assembly&&e.name!==a.$assembly.name?null:r>-1?System.Array.type(a,r):a},getAssemblyTypes:function(e){var t=[],i,r;if(e.$types)for(i in e.$types)e.$types.hasOwnProperty(i)&&t.push(e.$types[i]);else r=function(n,s){for(var o in n)n.hasOwnProperty(o)&&r(n[o],o);typeof n=="function"&&Bridge.isUpper(s.charCodeAt(0))&&t.push(n)},r(e,"");return t},createAssemblyInstance:function(e,t){var i=Bridge.Reflection.getType(t,e);return i?Bridge.createInstance(i):null},getInterfaces:function(e){var t;return e.$allInterfaces?e.$allInterfaces:e===Date?[System.IComparable$1(Date),System.IEquatable$1(Date),System.IComparable,System.IFormattable]:e===Number?[System.IComparable$1(Bridge.Int),System.IEquatable$1(Bridge.Int),System.IComparable,System.IFormattable]:e===Boolean?[System.IComparable$1(Boolean),System.IEquatable$1(Boolean),System.IComparable]:e===String?[System.IComparable$1(String),System.IEquatable$1(String),System.IComparable,System.ICloneable,System.Collections.IEnumerable,System.Collections.Generic.IEnumerable$1(System.Char)]:e===Array||e.$isArray||(t=System.Array._typedArrays[Bridge.getTypeName(e)])?(t=t||e.$elementType||System.Object,[System.Collections.IEnumerable,System.Collections.ICollection,System.ICloneable,System.Collections.IList,System.Collections.Generic.IEnumerable$1(t),System.Collections.Generic.ICollection$1(t),System.Collections.Generic.IList$1(t)]):[]},isInstanceOfType:function(e,t){return Bridge.is(e,t)},isAssignableFrom:function(e,t){if(e==null)throw new System.NullReferenceException;if(t==null)return!1;if(e===t||Bridge.isObject(e))return!0;if(Bridge.isFunction(e.isAssignableFrom))return e.isAssignableFrom(t);if(t===Array)return System.Array.is([],e);if(Bridge.Reflection.isInterface(e)&&System.Array.contains(Bridge.Reflection.getInterfaces(t),e))return!0;if(e.$elementType&&e.$isArray&&t.$elementType&&t.$isArray)return Bridge.Reflection.isValueType(e.$elementType)!==Bridge.Reflection.isValueType(t.$elementType)?!1:e.$rank===t.$rank&&Bridge.Reflection.isAssignableFrom(e.$elementType,t.$elementType);var i=t.$$inherits,r,n;if(i){for(r=0;r<i.length;r++)if(n=Bridge.Reflection.isAssignableFrom(e,i[r]),n)return!0}else return e.isPrototypeOf(t);return!1},isClass:function(e){return e.$kind==="class"||e.$kind==="nested class"||e===Array||e===Function||e===RegExp||e===String||e===Error||e===Object},isEnum:function(e){return e.$kind==="enum"},isFlags:function(e){return!!(e.prototype&&e.prototype.$flags)},isInterface:function(e){return e.$kind==="interface"||e.$kind==="nested interface"},isAbstract:function(e){return e===Function||e===System.Type?!0:(Bridge.Reflection.getMetaValue(e,"att",0)&128)!=0},_getType:function(e,t,i,r){var n=!i,s,o,a,l,u;n&&(e=e.replace(/\[(,*)\]/g,function(k,O){return"<"+(O.length+1)+">"})),s=function(){for(;;){var k=i.exec(e);if((!k||k[0]!="["||e[k.index+1]!=="]"&&e[k.index+1]!==",")&&(!k||k[0]!="]"||e[k.index-1]!=="["&&e[k.index-1]!==",")&&(!k||k[0]!=","||e[k.index+1]!=="]"&&e[k.index+1]!==","))return k}},i=i||/[[,\]]/g;var d=i.lastIndex,f=s(),C,E=[],T,w=!t;if(f)switch(C=e.substring(d,f.index),f[0]){case"[":if(e[f.index+1]!=="[")return null;for(;;){if(s(),T=Bridge.Reflection._getType(e,null,i),!T)return null;if(E.push(T),f=s(),f[0]==="]")break;if(f[0]!==",")return null}if(o=/^\s*<(\d+)>/g.exec(e.substring(f.index+1)),o&&(C=C+"<"+parseInt(o[1])+">"),f=s(),f&&f[0]===","&&(s(),!(t=System.Reflection.Assembly.assemblies[(i.lastIndex>0?e.substring(f.index+1,i.lastIndex-1):e.substring(f.index+1)).trim()])))return null;break;case"]":break;case",":if(s(),!(t=System.Reflection.Assembly.assemblies[(i.lastIndex>0?e.substring(f.index+1,i.lastIndex-1):e.substring(f.index+1)).trim()]))return null;break}else C=e.substring(d);if(n&&i.lastIndex)return null;if(C=C.trim(),a=Bridge.Reflection._extractArrayRank(C),l=a.rank,C=a.name,T=Bridge.Reflection._getAssemblyType(t,C),r)return T;if(!T&&w){for(u in System.Reflection.Assembly.assemblies)if(System.Reflection.Assembly.assemblies.hasOwnProperty(u)&&System.Reflection.Assembly.assemblies[u]!==t&&(T=Bridge.Reflection._getType(e,System.Reflection.Assembly.assemblies[u],null,!0),T))break}return T=E.length?T.apply(null,E):T,T&&T.$staticInit&&T.$staticInit(),l>-1&&(T=System.Array.type(T,l)),T},getType:function(e,t){if(e==null)throw new System.ArgumentNullException.$ctor1("typeName");return e?Bridge.Reflection._getType(e,t):null},isPrimitive:function(e){return e===System.Int64||e===System.UInt64||e===System.Double||e===System.Single||e===System.Byte||e===System.SByte||e===System.Int16||e===System.UInt16||e===System.Int32||e===System.UInt32||e===System.Boolean||e===Boolean||e===System.Char||e===Number},canAcceptNull:function(e){return!(e.$kind==="struct"||e.$kind==="enum"||e===System.Decimal||e===System.Int64||e===System.UInt64||e===System.Double||e===System.Single||e===System.Byte||e===System.SByte||e===System.Int16||e===System.UInt16||e===System.Int32||e===System.UInt32||e===Bridge.Int||e===System.Boolean||e===System.DateTime||e===Boolean||e===Date||e===Number)},applyConstructor:function(e,t){var i,r,n,s,o,a,l,u,d,f,C;if(!t||t.length===0)return new e;if(e.$$initCtor&&e.$kind!=="anonymous"){if(i=Bridge.getMetadata(e),r=0,i){for(n=Bridge.Reflection.getMembers(e,1,28),o=0;o<n.length;o++)if(a=n[o],a.p&&a.p.length===t.length){for(s=!0,l=0;l<a.p.length;l++)if(u=a.p[l],!Bridge.is(t[l],u)||t[l]==null&&!Bridge.Reflection.canAcceptNull(u)){s=!1;break}s&&(e=e[a.sn],r++)}}else if(Bridge.isFunction(e.ctor)&&e.ctor.length===t.length)e=e.ctor;else for(d="$ctor",f=1;Bridge.isFunction(e[d+f]);)e[d+f].length===t.length&&(e=e[d+f],r++),f++;if(r>1)throw new System.Exception("The ambiguous constructor call")}return C=function(){e.apply(this,t)},C.prototype=e.prototype,new C},getAttributes:function(e,t,i){var r=[],n,s,o,a,l,u,d;if(i&&(u=Bridge.Reflection.getBaseType(e),u))for(o=Bridge.Reflection.getAttributes(u,t,!0),n=0;n<o.length;n++)s=Bridge.getType(o[n]),a=Bridge.getMetadata(s),a&&a.ni||r.push(o[n]);if(l=Bridge.getMetadata(e),l&&l.at){for(n=0;n<l.at.length;n++)if(o=l.at[n],t==null||Bridge.Reflection.isInstanceOfType(o,t)){if(s=Bridge.getType(o),a=Bridge.getMetadata(s),!a||!a.am)for(d=r.length-1;d>=0;d--)Bridge.Reflection.isInstanceOfType(r[d],s)&&r.splice(d,1);r.push(o)}}return r},getMembers:function(e,t,i,r,n){var s=[],o,a,l,u,d,f,C;((i&72)==72||(i&6)==4)&&(o=Bridge.Reflection.getBaseType(e),o&&(s=Bridge.Reflection.getMembers(o,t&-2,i&(i&64?255:247)&(i&2?251:255),r,n)));var E=0,T=function(k){if(t&k.t&&(i&4&&!k.is||i&8&&k.is)&&(!r||((i&1)==1?k.n.toUpperCase()===r.toUpperCase():k.n===r))&&((i&16)==16&&k.a===2||(i&32)==32&&k.a!==2)){if(n){if((k.p||[]).length!==n.length)return;for(var O=0;O<n.length;O++)if(n[O]!==k.p[O])return}(k.ov||k.v)&&(s=s.filter(function(M){return!(M.n==k.n&&M.t==k.t)})),s.splice(E++,0,k)}},w=Bridge.getMetadata(e);if(w&&w.m)for(a=["g","s","ad","r"],C=0;C<w.m.length;C++)for(l=w.m[C],T(l),u=0;u<4;u++)d=a[u],l[d]&&T(l[d]);if(i&256){for(;e;){for(f=[],C=0;C<s.length;C++)s[C].td===e&&f.push(s[C]);if(f.length>1)throw new System.Reflection.AmbiguousMatchException.$ctor1("Ambiguous match");if(f.length===1)return f[0];e=Bridge.Reflection.getBaseType(e)}return null}return s},createDelegate:function(e,t){var i=e.is||e.sm,r=t!=null&&!i,n=Bridge.Reflection.midel(e,t,null,r);return r?n:i?function(){var s=t!=null?[t]:[];return n.apply(e.td,s.concat(Array.prototype.slice.call(arguments,0)))}:function(s){return n.apply(s,Array.prototype.slice.call(arguments,1))}},midel:function(e,t,i,r){var n,s,o,a,l;if(r!==!1){if(e.is&&t)throw new System.ArgumentException.$ctor1("Cannot specify target for static method");if(!e.is&&!t)throw new System.ArgumentException.$ctor1("Must specify target for instance method")}if(e.fg)n=function(){return(e.is?e.td:this)[e.fg]};else if(e.fs)n=function(u){(e.is?e.td:this)[e.fs]=u};else{if(n=e.def||(e.is||e.sm?e.td[e.sn]:t?t[e.sn]:e.td.prototype[e.sn]),e.tpc){if(e.constructed&&(!i||i.length==0)&&(i=e.tprm),!i||i.length!==e.tpc)throw new System.ArgumentException.$ctor1("Wrong number of type arguments");s=n,n=function(){return s.apply(this,i.concat(Array.prototype.slice.call(arguments)))}}else if(i&&i.length)throw new System.ArgumentException.$ctor1("Cannot specify type arguments for non-generic method");e.exp&&(o=n,n=function(){return o.apply(this,Array.prototype.slice.call(arguments,0,arguments.length-1).concat(arguments[arguments.length-1]))}),e.sm&&(a=n,n=function(){return a.apply(null,[this].concat(Array.prototype.slice.call(arguments)))})}return l=n,n=function(){var u=[],d=e.pi||[],f,C,E;for(!d.length&&e.p&&e.p.length&&(d=e.p.map(function(T){return{pt:T}})),C=0;C<arguments.length;C++)f=d[C]||d[d.length-1],E=arguments[C],u[C]=f&&f.pt===System.Object?E:Bridge.unbox(arguments[C]),E==null&&f&&Bridge.Reflection.isValueType(f.pt)&&(u[C]=Bridge.getDefaultValue(f.pt));return E=l.apply(this,u),E!=null&&e.box?e.box(E):E},r!==!1?Bridge.fn.bind(t,n):n},invokeCI:function(e,t){return e.exp&&(t=t.slice(0,t.length-1).concat(t[t.length-1])),e.def?e.def.apply(null,t):e.sm?e.td[e.sn].apply(null,t):e.td.$literal?(e.sn?e.td[e.sn]:e.td).apply(e.td,t):Bridge.Reflection.applyConstructor(e.sn?e.td[e.sn]:e.td,t)},fieldAccess:function(e,t){if(e.is&&t)throw new System.ArgumentException.$ctor1("Cannot specify target for static field");if(!e.is&&!t)throw new System.ArgumentException.$ctor1("Must specify target for instance field");if(t=e.is?e.td:t,arguments.length===3){var i=arguments[2];i==null&&Bridge.Reflection.isValueType(e.rt)&&(i=Bridge.getDefaultValue(e.rt)),t[e.sn]=i}else return e.box?e.box(t[e.sn]):t[e.sn]},getMetaValue:function(e,t,i){var r=e.$isTypeParameter?e:Bridge.getMetadata(e);return r&&r[t]||i},isArray:function(e){return Bridge.arrayTypes.indexOf(e)>=0},isValueType:function(e){return!Bridge.Reflection.canAcceptNull(e)},getNestedTypes:function(e,t){var i=Bridge.Reflection.getMetaValue(e,"nested",[]),r,n;if(t){for(r=[],n=0;n<i.length;n++){var s=i[n],o=Bridge.Reflection.getMetaValue(s,"att",0),a=o&7,l=a===1||a===2;((t&16)==16&&l||(t&32)==32&&!l)&&r.push(s)}i=r}return i},getNestedType:function(e,t,i){for(var r=Bridge.Reflection.getNestedTypes(e,i),n=0;n<r.length;n++)if(Bridge.Reflection.getTypeName(r[n])===t)return r[n];return null},isGenericMethodDefinition:function(e){return Bridge.Reflection.isGenericMethod(e)&&!e.constructed},isGenericMethod:function(e){return!!e.tpc},containsGenericParameters:function(e){var t,i;if(e.$typeArguments){for(i=0;i<e.$typeArguments.length;i++)if(e.$typeArguments[i].$isTypeParameter)return!0}for(t=e.tprm||[],i=0;i<t.length;i++)if(t[i].$isTypeParameter)return!0;return!1},genericParameterPosition:function(e){if(!e.$isTypeParameter)throw new System.InvalidOperationException.$ctor1("The current type does not represent a type parameter.");return e.gPrmPos||0},makeGenericMethod:function(e,t){var i=Bridge.apply({},e);return i.tprm=t,i.p=t,i.gd=e,i.constructed=!0,i},getGenericMethodDefinition:function(e){if(!e.tpc)throw new System.InvalidOperationException.$ctor1("The current method is not a generic method. ");return e.gd||e}},Bridge.setMetadata=Bridge.Reflection.setMetadata,System.Reflection.ConstructorInfo={$is:function(e){return e!=null&&e.t===1}},System.Reflection.EventInfo={$is:function(e){return e!=null&&e.t===2}},System.Reflection.FieldInfo={$is:function(e){return e!=null&&e.t===4}},System.Reflection.MethodBase={$is:function(e){return e!=null&&(e.t===1||e.t===8)}},System.Reflection.MethodInfo={$is:function(e){return e!=null&&e.t===8}},System.Reflection.PropertyInfo={$is:function(e){return e!=null&&e.t===16}},System.AppDomain={getAssemblies:function(){return Object.keys(System.Reflection.Assembly.assemblies).map(function(e){return System.Reflection.Assembly.assemblies[e]})}},Bridge.define("System.IFormattable",{$kind:"interface",statics:{$is:function(e){return Bridge.isNumber(e)||Bridge.isDate(e)?!0:Bridge.is(e,System.IFormattable,!0)}}}),Bridge.define("System.IComparable",{$kind:"interface",statics:{$is:function(e){return Bridge.isNumber(e)||Bridge.isDate(e)||Bridge.isBoolean(e)||Bridge.isString(e)?!0:Bridge.is(e,System.IComparable,!0)}}}),Bridge.define("System.IFormatProvider",{$kind:"interface"}),Bridge.define("System.ICloneable",{$kind:"interface"}),Bridge.define("System.IComparable$1",function(e){return{$kind:"interface",statics:{$is:function(t){return Bridge.isNumber(t)&&e.$number&&e.$is(t)||Bridge.isDate(t)&&(e===Date||e===System.DateTime)||Bridge.isBoolean(t)&&(e===Boolean||e===System.Boolean)||Bridge.isString(t)&&(e===String||e===System.String)?!0:Bridge.is(t,System.IComparable$1(e),!0)},isAssignableFrom:function(t){return t===System.DateTime&&e===Date?!0:Bridge.Reflection.getInterfaces(t).indexOf(System.IComparable$1(e))>=0}}}}),Bridge.define("System.IEquatable$1",function(e){return{$kind:"interface",statics:{$is:function(t){return Bridge.isNumber(t)&&e.$number&&e.$is(t)||Bridge.isDate(t)&&(e===Date||e===System.DateTime)||Bridge.isBoolean(t)&&(e===Boolean||e===System.Boolean)||Bridge.isString(t)&&(e===String||e===System.String)?!0:Bridge.is(t,System.IEquatable$1(e),!0)},isAssignableFrom:function(t){return t===System.DateTime&&e===Date?!0:Bridge.Reflection.getInterfaces(t).indexOf(System.IEquatable$1(e))>=0}}}}),Bridge.define("Bridge.IPromise",{$kind:"interface"}),Bridge.define("System.IDisposable",{$kind:"interface"}),Bridge.define("System.IAsyncResult",{$kind:"interface"}),Bridge.define("System.ValueType",{statics:{methods:{$is:function(e){return Bridge.Reflection.isValueType(Bridge.getType(e))}}}}),Be={nameEquals:function(e,t,i){return i?e.toLowerCase()===t.toLowerCase():e.charAt(0).toLowerCase()+e.slice(1)===t.charAt(0).toLowerCase()+t.slice(1)},checkEnumType:function(e){if(!e)throw new System.ArgumentNullException.$ctor1("enumType");if(e.prototype&&e.$kind!=="enum")throw new System.ArgumentException.$ctor1("","enumType")},getUnderlyingType:function(e){return System.Enum.checkEnumType(e),e.prototype.$utype||System.Int32},toName:function(e){return e},toObject:function(e,t){return t=Bridge.unbox(t,!0),t==null?null:Be.parse(e,t.toString(),!1,!0)},parse:function(e,t,i,r){var n,s,o,a,l,u,d,f;if(System.Enum.checkEnumType(e),t!=null){if(e===Number||e===System.String||e.$number)return t;if(n={},System.Int32.tryParse(t,n))return Bridge.box(n.v,e,function(w){return System.Enum.toString(e,w)});if(s=System.Enum.getNames(e),o=e,e.prototype&&e.prototype.$flags){var C=t.split(","),E=0,T=!0;for(a=C.length-1;a>=0;a--){for(l=C[a].trim(),u=!1,d=0;d<s.length;d++)if(f=s[d],Be.nameEquals(f,l,i)){E|=o[f],u=!0;break}if(!u){T=!1;break}}if(T)return Bridge.box(E,e,function(w){return System.Enum.toString(e,w)})}else for(a=0;a<s.length;a++)if(f=s[a],Be.nameEquals(f,t,i))return Bridge.box(o[f],e,function(w){return System.Enum.toString(e,w)})}if(r!==!0)throw new System.ArgumentException.$ctor3("silent","Invalid Enumeration Value");return null},toStringFn:function(e){return function(t){return System.Enum.toString(e,t)}},toString:function(e,t,i){var r,n,s,o;if(arguments.length===0)return"System.Enum";if(t&&t.$boxed&&e===System.Enum&&(e=t.type),t=Bridge.unbox(t,!0),e===Number||e===System.String||e.$number)return t.toString();System.Enum.checkEnumType(e);var a=e,l=System.Enum.getNames(e),u=System.Int64.is64Bit(t);if((e.prototype&&e.prototype.$flags||i===!0)&&t!==0){for(var d=[],f=System.Enum.getValuesAndNames(e),C=f.length-1,E=t;C>=0&&(o=f[C],s=u&&System.Int64.is64Bit(o.value),!(C==0&&(s?o.value.isZero():o.value==0)));)(s?t.and(o.value).eq(o.value):(t&o.value)==o.value)&&(s?t=t.sub(o.value):t-=o.value,d.unshift(o.name)),C--;return(u?!t.isZero():t!==0)?E.toString():(u?E.isZero():E===0)?(o=f[0],o&&(System.Int64.is64Bit(o.value)?o.value.isZero():o.value==0)?o.name:"0"):d.join(", ")}else{for(r=0;r<l.length;r++)if(n=l[r],u&&System.Int64.is64Bit(a[n])?a[n].eq(t):a[n]===t)return Be.toName(n);return t.toString()}},getValuesAndNames:function(e){var t;System.Enum.checkEnumType(e);var i=[],r=System.Enum.getNames(e),n=e;for(t=0;t<r.length;t++)i.push({name:r[t],value:n[r[t]]});return i.sort(function(s,o){return System.Int64.is64Bit(s.value)?s.value.sub(o.value).sign():s.value-o.value})},getValues:function(e){var t;System.Enum.checkEnumType(e);var i=[],r=System.Enum.getNames(e),n=e;for(t=0;t<r.length;t++)i.push(n[r[t]]);return i.sort(function(s,o){return System.Int64.is64Bit(s)?s.sub(o).sign():s-o})},format:function(e,t,i){System.Enum.checkEnumType(e);var r;if(!Bridge.hasValue(t)&&(r="value")||!Bridge.hasValue(i)&&(r="format"))throw new System.ArgumentNullException.$ctor1(r);switch(t=Bridge.unbox(t,!0),i){case"G":case"g":return System.Enum.toString(e,t);case"x":case"X":return t.toString(16);case"d":case"D":return t.toString();case"f":case"F":return System.Enum.toString(e,t,!0);default:throw new System.FormatException}},getNames:function(e){var t,i,r;if(System.Enum.checkEnumType(e),t=[],i=e,e.$names)return e.$names.slice(0);for(r in i)i.hasOwnProperty(r)&&r.indexOf("$")<0&&typeof i[r]!="function"&&t.push([Be.toName(r),i[r]]);return t.sort(function(n,s){return System.Int64.is64Bit(n[1])?n[1].sub(s[1]).sign():n[1]-s[1]}).map(function(n){return n[0]})},getName:function(e,t){var i,r,n,s,o;if(t=Bridge.unbox(t,!0),t==null)throw new System.ArgumentNullException.$ctor1("value");if(i=System.Int64.is64Bit(t),!i&&!(typeof t=="number"&&Math.floor(t,0)===t))throw new System.ArgumentException.$ctor1("Argument must be integer","value");for(System.Enum.checkEnumType(e),r=System.Enum.getNames(e),n=e,s=0;s<r.length;s++)if(o=r[s],i?t.eq(n[o]):n[o]===t)return o;return null},hasFlag:function(e,t){t=Bridge.unbox(t,!0);var i=System.Int64.is64Bit(e);return t===0||(i?!e.and(t).isZero():!!(e&t))},isDefined:function(e,t){var i,r;t=Bridge.unbox(t,!0),System.Enum.checkEnumType(e);var n=e,s=System.Enum.getNames(e),o=Bridge.isString(t),a=System.Int64.is64Bit(t);for(i=0;i<s.length;i++)if(r=s[i],o?Be.nameEquals(r,t,!1):a?t.eq(n[r]):n[r]===t)return!0;return!1},tryParse:function(e,t,i,r){return i.v=Bridge.unbox(Be.parse(e,t,r,!0),!0),i.v==null?(i.v=0,!1):!0},equals:function(e,t,i){return t&&t.$boxed&&(e&&e.$boxed||i)&&t.type!==(e.type||i)?!1:System.Enum.equalsT(e,t)},equalsT:function(e,t){return Bridge.equals(Bridge.unbox(e,!0),Bridge.unbox(t,!0))}},Bridge.define("System.Enum",{inherits:[System.IComparable,System.IFormattable],statics:{methods:Be}}),st={hasValue:Bridge.hasValue,getValue:function(e){if(e=Bridge.unbox(e,!0),!Bridge.hasValue(e))throw new System.InvalidOperationException.$ctor1("Nullable instance doesn't have a value.");return e},getValueOrDefault:function(e,t){return Bridge.hasValue(e)?e:t},add:function(e,t){return Bridge.hasValue$1(e,t)?e+t:null},band:function(e,t){return Bridge.hasValue$1(e,t)?e&t:null},bor:function(e,t){return Bridge.hasValue$1(e,t)?e|t:null},and:function(e,t){return e===!0&&t===!0?!0:e===!1||t===!1?!1:null},or:function(e,t){return e===!0||t===!0?!0:e===!1&&t===!1?!1:null},div:function(e,t){return Bridge.hasValue$1(e,t)?e/t:null},eq:function(e,t){return Bridge.hasValue(e)?e===t:!Bridge.hasValue(t)},equals:function(e,t,i){return Bridge.hasValue(e)?i?i(e,t):Bridge.equals(e,t):!Bridge.hasValue(t)},toString:function(e,t){return Bridge.hasValue(e)?t?t(e):e.toString():""},toStringFn:function(e){return function(t){return System.Nullable.toString(t,e)}},getHashCode:function(e,t){return Bridge.hasValue(e)?t?t(e):Bridge.getHashCode(e):0},getHashCodeFn:function(e){return function(t){return System.Nullable.getHashCode(t,e)}},xor:function(e,t){return Bridge.hasValue$1(e,t)?Bridge.isBoolean(e)&&Bridge.isBoolean(t)?e!=t:e^t:null},gt:function(e,t){return Bridge.hasValue$1(e,t)&&e>t},gte:function(e,t){return Bridge.hasValue$1(e,t)&&e>=t},neq:function(e,t){return Bridge.hasValue(e)?e!==t:Bridge.hasValue(t)},lt:function(e,t){return Bridge.hasValue$1(e,t)&&e<t},lte:function(e,t){return Bridge.hasValue$1(e,t)&&e<=t},mod:function(e,t){return Bridge.hasValue$1(e,t)?e%t:null},mul:function(e,t){return Bridge.hasValue$1(e,t)?e*t:null},imul:function(e,t){return Bridge.hasValue$1(e,t)?Bridge.Int.mul(e,t):null},sl:function(e,t){return Bridge.hasValue$1(e,t)?e<<t:null},sr:function(e,t){return Bridge.hasValue$1(e,t)?e>>t:null},srr:function(e,t){return Bridge.hasValue$1(e,t)?e>>>t:null},sub:function(e,t){return Bridge.hasValue$1(e,t)?e-t:null},bnot:function(e){return Bridge.hasValue(e)?~e:null},neg:function(e){return Bridge.hasValue(e)?-e:null},not:function(e){return Bridge.hasValue(e)?!e:null},pos:function(e){return Bridge.hasValue(e)?+e:null},lift:function(){for(var e=1;e<arguments.length;e++)if(!Bridge.hasValue(arguments[e]))return null;return arguments[0]==null?null:arguments[0].apply==null?arguments[0]:arguments[0].apply(null,Array.prototype.slice.call(arguments,1))},lift1:function(e,t){return Bridge.hasValue(t)?typeof e=="function"?e.apply(null,Array.prototype.slice.call(arguments,1)):t[e].apply(t,Array.prototype.slice.call(arguments,2)):null},lift2:function(e,t,i){return Bridge.hasValue$1(t,i)?typeof e=="function"?e.apply(null,Array.prototype.slice.call(arguments,1)):t[e].apply(t,Array.prototype.slice.call(arguments,2)):null},liftcmp:function(e,t,i){return Bridge.hasValue$1(t,i)?typeof e=="function"?e.apply(null,Array.prototype.slice.call(arguments,1)):t[e].apply(t,Array.prototype.slice.call(arguments,2)):!1},lifteq:function(e,t,i){var r=Bridge.hasValue(t),n=Bridge.hasValue(i);return!r&&!n||r&&n&&(typeof e=="function"?e.apply(null,Array.prototype.slice.call(arguments,1)):t[e].apply(t,Array.prototype.slice.call(arguments,2)))},liftne:function(e,t,i){var r=Bridge.hasValue(t),n=Bridge.hasValue(i);return r!==n||r&&(typeof e=="function"?e.apply(null,Array.prototype.slice.call(arguments,1)):t[e].apply(t,Array.prototype.slice.call(arguments,2)))},getUnderlyingType:function(e){if(!e)throw new System.ArgumentNullException.$ctor1("nullableType");if(Bridge.Reflection.isGenericType(e)&&!Bridge.Reflection.isGenericTypeDefinition(e)){var t=Bridge.Reflection.getGenericTypeDefinition(e);if(t===System.Nullable$1)return Bridge.Reflection.getGenericArguments(e)[0]}return null},compare:function(e,t){return System.Collections.Generic.Comparer$1.$default.compare(e,t)}},System.Nullable=st,Bridge.define("System.Nullable$1",function(e){return{$kind:"struct",statics:{$nullable:!0,$nullableType:e,getDefaultValue:function(){return null},$is:function(t){return Bridge.is(t,e)}}}}),Bridge.define("System.Char",{inherits:[System.IComparable,System.IFormattable],$kind:"struct",statics:{min:0,max:65535,$is:function(e){return typeof e=="number"&&Math.round(e,0)==e&&e>=System.Char.min&&e<=System.Char.max},getDefaultValue:function(){return 0},parse:function(e){if(!Bridge.hasValue(e))throw new System.ArgumentNullException.$ctor1("s");if(e.length!==1)throw new System.FormatException;return e.charCodeAt(0)},tryParse:function(e,t){var i=e&&e.length===1;return t.v=i?e.charCodeAt(0):0,i},format:function(e,t,i){return Bridge.Int.format(e,t,i)},charCodeAt:function(e,t){if(e==null)throw new System.ArgumentNullException;if(e.length!=1)throw new System.FormatException.$ctor1("String must be exactly one character long");return e.charCodeAt(t)},_isWhiteSpaceMatch:/[^\s\x09-\x0D\x85\xA0]/,isWhiteSpace:function(e){return!System.Char._isWhiteSpaceMatch.test(e)},_isDigitMatch:new RegExp(/[0-9\u0030-\u0039\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\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\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]/),isDigit:function(e){return e<256?e>=48&&e<=57:System.Char._isDigitMatch.test(String.fromCharCode(e))},_isLetterMatch:new RegExp(/[A-Za-z\u0061-\u007A\u00B5\u00DF-\u00F6\u00F8-\u00FF\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\u0561-\u0587\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\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\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7FA\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A\u0041-\u005A\u00C0-\u00D6\u00D8-\u00DE\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\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\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\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\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\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA\uFF21-\uFF3A\u01C5\u01C8\u01CB\u01F2\u1F88-\u1F8F\u1F98-\u1F9F\u1FA8-\u1FAF\u1FBC\u1FCC\u1FFC\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\uA717-\uA71F\uA770\uA788\uA7F8\uA7F9\uA9CF\uAA70\uAADD\uAAF3\uAAF4\uFF70\uFF9E\uFF9F\u00AA\u00BA\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\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0972-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\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\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\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-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\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-\u9FCC\uA000-\uA014\uA016-\uA48C\uA4D0-\uA4F7\uA500-\uA60B\uA610-\uA61F\uA62A\uA62B\uA66E\uA6A0-\uA6E5\uA7FB-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA6F\uAA71-\uAA76\uAA7A\uAA80-\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]/),isLetter:function(e){return e<256?e>=65&&e<=90||e>=97&&e<=122:System.Char._isLetterMatch.test(String.fromCharCode(e))},_isHighSurrogateMatch:new RegExp(/[\uD800-\uDBFF]/),isHighSurrogate:function(e){return System.Char._isHighSurrogateMatch.test(String.fromCharCode(e))},_isLowSurrogateMatch:new RegExp(/[\uDC00-\uDFFF]/),isLowSurrogate:function(e){return System.Char._isLowSurrogateMatch.test(String.fromCharCode(e))},_isSurrogateMatch:new RegExp(/[\uD800-\uDFFF]/),isSurrogate:function(e){return System.Char._isSurrogateMatch.test(String.fromCharCode(e))},_isNullMatch:new RegExp("\0"),isNull:function(e){return System.Char._isNullMatch.test(String.fromCharCode(e))},_isSymbolMatch:new RegExp(/[\u20A0-\u20CF\u20D0-\u20FF\u2100-\u214F\u2150-\u218F\u2190-\u21FF\u2200-\u22FF\u2300-\u23FF\u25A0-\u25FF\u2600-\u26FF\u2700-\u27BF\u27C0-\u27EF\u27F0-\u27FF\u2800-\u28FF\u2900-\u297F\u2980-\u29FF\u2A00-\u2AFF\u2B00-\u2BFF]/),isSymbol:function(e){return e<256?[36,43,60,61,62,94,96,124,126,162,163,164,165,166,167,168,169,172,174,175,176,177,180,182,184,215,247].indexOf(e)!=-1:System.Char._isSymbolMatch.test(String.fromCharCode(e))},_isSeparatorMatch:new RegExp(/[\u2028\u2029\u0020\u00A0\u1680\u180E\u2000-\u200A\u202F\u205F\u3000]/),isSeparator:function(e){return e<256?e==32||e==160:System.Char._isSeparatorMatch.test(String.fromCharCode(e))},_isPunctuationMatch:new RegExp(/[\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65\u002D\u058A\u05BE\u1400\u1806\u2010-\u2015\u2E17\u2E1A\u2E3A\u2E3B\u301C\u3030\u30A0\uFE31\uFE32\uFE58\uFE63\uFF0D\u0028\u005B\u007B\u0F3A\u0F3C\u169B\u201A\u201E\u2045\u207D\u208D\u2329\u2768\u276A\u276C\u276E\u2770\u2772\u2774\u27C5\u27E6\u27E8\u27EA\u27EC\u27EE\u2983\u2985\u2987\u2989\u298B\u298D\u298F\u2991\u2993\u2995\u2997\u29D8\u29DA\u29FC\u2E22\u2E24\u2E26\u2E28\u3008\u300A\u300C\u300E\u3010\u3014\u3016\u3018\u301A\u301D\uFD3E\uFE17\uFE35\uFE37\uFE39\uFE3B\uFE3D\uFE3F\uFE41\uFE43\uFE47\uFE59\uFE5B\uFE5D\uFF08\uFF3B\uFF5B\uFF5F\uFF62\u0029\u005D\u007D\u0F3B\u0F3D\u169C\u2046\u207E\u208E\u232A\u2769\u276B\u276D\u276F\u2771\u2773\u2775\u27C6\u27E7\u27E9\u27EB\u27ED\u27EF\u2984\u2986\u2988\u298A\u298C\u298E\u2990\u2992\u2994\u2996\u2998\u29D9\u29DB\u29FD\u2E23\u2E25\u2E27\u2E29\u3009\u300B\u300D\u300F\u3011\u3015\u3017\u3019\u301B\u301E\u301F\uFD3F\uFE18\uFE36\uFE38\uFE3A\uFE3C\uFE3E\uFE40\uFE42\uFE44\uFE48\uFE5A\uFE5C\uFE5E\uFF09\uFF3D\uFF5D\uFF60\uFF63\u00AB\u2018\u201B\u201C\u201F\u2039\u2E02\u2E04\u2E09\u2E0C\u2E1C\u2E20\u00BB\u2019\u201D\u203A\u2E03\u2E05\u2E0A\u2E0D\u2E1D\u2E21\u005F\u203F\u2040\u2054\uFE33\uFE34\uFE4D-\uFE4F\uFF3F\u0021-\u0023\u0025-\u0027\u002A\u002C\u002E\u002F\u003A\u003B\u003F\u0040\u005C\u00A1\u00A7\u00B6\u00B7\u00BF\u037E\u0387\u055A-\u055F\u0589\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u166D\u166E\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u1805\u1807-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2016\u2017\u2020-\u2027\u2030-\u2038\u203B-\u203E\u2041-\u2043\u2047-\u2051\u2053\u2055-\u205E\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00\u2E01\u2E06-\u2E08\u2E0B\u2E0E-\u2E16\u2E18\u2E19\u2E1B\u2E1E\u2E1F\u2E2A-\u2E2E\u2E30-\u2E39\u3001-\u3003\u303D\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFE10-\uFE16\uFE19\uFE30\uFE45\uFE46\uFE49-\uFE4C\uFE50-\uFE52\uFE54-\uFE57\uFE5F-\uFE61\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF07\uFF0A\uFF0C\uFF0E\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3C\uFF61\uFF64\uFF65]/),isPunctuation:function(e){return e<256?[33,34,35,37,38,39,40,41,42,44,45,46,47,58,59,63,64,91,92,93,95,123,125,161,171,173,183,187,191].indexOf(e)!=-1:System.Char._isPunctuationMatch.test(String.fromCharCode(e))},_isNumberMatch:new RegExp(/[\u0030-\u0039\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19\u0030-\u0039\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\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\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19\u16EE-\u16F0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303A\uA6E6-\uA6EF\u00B2\u00B3\u00B9\u00BC-\u00BE\u09F4-\u09F9\u0B72-\u0B77\u0BF0-\u0BF2\u0C78-\u0C7E\u0D70-\u0D75\u0F2A-\u0F33\u1369-\u137C\u17F0-\u17F9\u19DA\u2070\u2074-\u2079\u2080-\u2089\u2150-\u215F\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA830-\uA835]/),isNumber:function(e){return e<256?[48,49,50,51,52,53,54,55,56,57,178,179,185,188,189,190].indexOf(e)!=-1:System.Char._isNumberMatch.test(String.fromCharCode(e))},_isControlMatch:new RegExp(/[\u0000-\u001F\u007F\u0080-\u009F]/),isControl:function(e){return e<256?e>=0&&e<=31||e>=127&&e<=159:System.Char._isControlMatch.test(String.fromCharCode(e))},isLatin1:function(e){return e<=255},isAscii:function(e){return e<=127},isUpper:function(e,t){if(e==null)throw new System.ArgumentNullException.$ctor1("s");if(t>>>0>=e.length>>>0)throw new System.ArgumentOutOfRangeException.$ctor1("index");var i=e.charCodeAt(t);return System.Char.isLatin1(i)&&System.Char.isAscii(i)?i>=65&&i<=90:Bridge.isUpper(i)},equals:function(e,t){return Bridge.is(e,System.Char)&&Bridge.is(t,System.Char)?Bridge.unbox(e,!0)===Bridge.unbox(t,!0):!1},equalsT:function(e,t){return Bridge.unbox(e,!0)===Bridge.unbox(t,!0)},getHashCode:function(e){return e|e<<16}}}),Bridge.Class.addExtend(System.Char,[System.IComparable$1(System.Char),System.IEquatable$1(System.Char)]),Bridge.define("Bridge.Ref$1",function(e){return{statics:{methods:{op_Implicit:function(t){return t.Value}}},fields:{getter:null,setter:null},props:{Value:{get:function(){return this.getter()},set:function(t){this.setter(t)}},v:{get:function(){return this.Value},set:function(t){this.Value=t}}},ctors:{ctor:function(t,i){this.$initialize(),this.getter=t,this.setter=i}},methods:{toString:function(){return Bridge.toString(this.Value)},valueOf:function(){return this.Value}}}}),Bridge.define("System.IConvertible",{$kind:"interface"}),Bridge.define("System.HResults"),Bridge.define("System.Exception",{config:{properties:{Message:{get:function(){return this.message}},InnerException:{get:function(){return this.innerException}},StackTrace:{get:function(){return this.errorStack.stack}},Data:{get:function(){return this.data}},HResult:{get:function(){return this._HResult},set:function(e){this._HResult=e}}}},ctor:function(e,t){this.$initialize(),this.message=e||"Exception of type '"+Bridge.getTypeName(this)+"' was thrown.",this.innerException=t||null,this.errorStack=new Error(this.message),this.data=new(System.Collections.Generic.Dictionary$2(System.Object,System.Object))},getBaseException:function(){for(var e=this.innerException,t=this;e!=null;)t=e,e=e.innerException;return t},toString:function(){var e=Bridge.getTypeName(this);return e+=this.Message!=null?": "+this.Message+` `:` `,this.StackTrace!=null&&(e+=this.StackTrace+` `),e},statics:{create:function(e){if(Bridge.is(e,System.Exception))return e;var t;if(e instanceof TypeError)t=new System.NullReferenceException.$ctor1(e.message);else if(e instanceof RangeError)t=new System.ArgumentOutOfRangeException.$ctor1(e.message);else{if(e instanceof Error)return new System.SystemException.$ctor1(e);t=e&&e.error&&e.error.stack?new System.Exception(e.error.stack):new System.Exception(e?e.message?e.message:e.toString():null)}return t.errorStack=e,t}}}),Bridge.define("System.SystemException",{inherits:[System.Exception],ctors:{ctor:function(){this.$initialize(),System.Exception.ctor.call(this,"System error."),this.HResult=-2146233087},$ctor1:function(e){this.$initialize(),System.Exception.ctor.call(this,e),this.HResult=-2146233087},$ctor2:function(e,t){this.$initialize(),System.Exception.ctor.call(this,e,t),this.HResult=-2146233087}}}),Bridge.define("System.OutOfMemoryException",{inherits:[System.SystemException],ctors:{ctor:function(){this.$initialize(),System.SystemException.$ctor1.call(this,"Insufficient memory to continue the execution of the program."),this.HResult=-2147024362},$ctor1:function(e){this.$initialize(),System.SystemException.$ctor1.call(this,e),this.HResult=-2147024362},$ctor2:function(e,t){this.$initialize(),System.SystemException.$ctor2.call(this,e,t),this.HResult=-2147024362}}}),Bridge.define("System.ArrayTypeMismatchException",{inherits:[System.SystemException],ctors:{ctor:function(){this.$initialize(),System.SystemException.$ctor1.call(this,"Attempted to access an element as a type incompatible with the array."),this.HResult=-2146233085},$ctor1:function(e){this.$initialize(),System.SystemException.$ctor1.call(this,e),this.HResult=-2146233085},$ctor2:function(e,t){this.$initialize(),System.SystemException.$ctor2.call(this,e,t),this.HResult=-2146233085}}}),Bridge.define("System.Resources.MissingManifestResourceException",{inherits:[System.SystemException],ctors:{ctor:function(){this.$initialize(),System.SystemException.$ctor1.call(this,"Unable to find manifest resource."),this.HResult=-2146233038},$ctor1:function(e){this.$initialize(),System.SystemException.$ctor1.call(this,e),this.HResult=-2146233038},$ctor2:function(e,t){this.$initialize(),System.SystemException.$ctor2.call(this,e,t),this.HResult=-2146233038}}}),Bridge.define("System.Globalization.TextInfo",{inherits:[System.ICloneable],fields:{listSeparator:null},props:{ANSICodePage:0,CultureName:null,EBCDICCodePage:0,IsReadOnly:!1,IsRightToLeft:!1,LCID:0,ListSeparator:{get:function(){return this.listSeparator},set:function(e){this.VerifyWritable(),this.listSeparator=e}},MacCodePage:0,OEMCodePage:0},alias:["clone","System$ICloneable$clone"],methods:{clone:function(){return Bridge.copy(new System.Globalization.TextInfo,this,System.Array.init(["ANSICodePage","CultureName","EBCDICCodePage","IsRightToLeft","LCID","listSeparator","MacCodePage","OEMCodePage","IsReadOnly"],System.String))},VerifyWritable:function(){if(this.IsReadOnly)throw new System.InvalidOperationException.$ctor1("Instance is read-only.")}}}),Bridge.define("System.Globalization.BidiCategory",{$kind:"enum",statics:{fields:{LeftToRight:0,LeftToRightEmbedding:1,LeftToRightOverride:2,RightToLeft:3,RightToLeftArabic:4,RightToLeftEmbedding:5,RightToLeftOverride:6,PopDirectionalFormat:7,EuropeanNumber:8,EuropeanNumberSeparator:9,EuropeanNumberTerminator:10,ArabicNumber:11,CommonNumberSeparator:12,NonSpacingMark:13,BoundaryNeutral:14,ParagraphSeparator:15,SegmentSeparator:16,Whitespace:17,OtherNeutrals:18,LeftToRightIsolate:19,RightToLeftIsolate:20,FirstStrongIsolate:21,PopDirectionIsolate:22}}}),Bridge.define("System.Globalization.SortVersion",{inherits:function(){return[System.IEquatable$1(System.Globalization.SortVersion)]},statics:{methods:{op_Equality:function(e,t){return e!=null?e.equalsT(t):t!=null?t.equalsT(e):!0},op_Inequality:function(e,t){return!System.Globalization.SortVersion.op_Equality(e,t)}}},fields:{m_NlsVersion:0,m_SortId:null},props:{FullVersion:{get:function(){return this.m_NlsVersion}},SortId:{get:function(){return this.m_SortId}}},alias:["equalsT","System$IEquatable$1$System$Globalization$SortVersion$equalsT"],ctors:{init:function(){this.m_SortId=new System.Guid},ctor:function(e,t){this.$initialize(),this.m_SortId=t,this.m_NlsVersion=e},$ctor1:function(e,t,i){if(this.$initialize(),this.m_NlsVersion=e,System.Guid.op_Equality(i,System.Guid.Empty)){var r=t>>24&255,n=(t&16711680)>>16&255,s=(t&65280)>>8&255,o=t&255;i=new System.Guid.$ctor2(0,0,0,0,0,0,0,r,n,s,o)}this.m_SortId=i}},methods:{equals:function(e){var t=Bridge.as(e,System.Globalization.SortVersion);return System.Globalization.SortVersion.op_Inequality(t,null)?this.equalsT(t):!1},equalsT:function(e){return System.Globalization.SortVersion.op_Equality(e,null)?!1:this.m_NlsVersion===e.m_NlsVersion&&System.Guid.op_Equality(this.m_SortId,e.m_SortId)},getHashCode:function(){return Bridge.Int.mul(this.m_NlsVersion,7)|this.m_SortId.getHashCode()}}}),Bridge.define("System.Globalization.UnicodeCategory",{$kind:"enum",statics:{fields:{UppercaseLetter:0,LowercaseLetter:1,TitlecaseLetter:2,ModifierLetter:3,OtherLetter:4,NonSpacingMark:5,SpacingCombiningMark:6,EnclosingMark:7,DecimalDigitNumber:8,LetterNumber:9,OtherNumber:10,SpaceSeparator:11,LineSeparator:12,ParagraphSeparator:13,Control:14,Format:15,Surrogate:16,PrivateUse:17,ConnectorPunctuation:18,DashPunctuation:19,OpenPunctuation:20,ClosePunctuation:21,InitialQuotePunctuation:22,FinalQuotePunctuation:23,OtherPunctuation:24,MathSymbol:25,CurrencySymbol:26,ModifierSymbol:27,OtherSymbol:28,OtherNotAssigned:29}}}),Bridge.define("System.Globalization.DaylightTimeStruct",{$kind:"struct",statics:{methods:{getDefaultValue:function(){return new System.Globalization.DaylightTimeStruct}}},fields:{Start:null,End:null,Delta:null},ctors:{init:function(){this.Start=System.DateTime.getDefaultValue(),this.End=System.DateTime.getDefaultValue(),this.Delta=new System.TimeSpan},$ctor1:function(e,t,i){this.$initialize(),this.Start=e,this.End=t,this.Delta=i},ctor:function(){this.$initialize()}},methods:{getHashCode:function(){return Bridge.addHash([7445027511,this.Start,this.End,this.Delta])},equals:function(e){return Bridge.is(e,System.Globalization.DaylightTimeStruct)?Bridge.equals(this.Start,e.Start)&&Bridge.equals(this.End,e.End)&&Bridge.equals(this.Delta,e.Delta):!1},$clone:function(e){var t=e||new System.Globalization.DaylightTimeStruct;return t.Start=this.Start,t.End=this.End,t.Delta=this.Delta,t}}}),Bridge.define("System.Globalization.DaylightTime",{fields:{_start:null,_end:null,_delta:null},props:{Start:{get:function(){return this._start}},End:{get:function(){return this._end}},Delta:{get:function(){return this._delta}}},ctors:{init:function(){this._start=System.DateTime.getDefaultValue(),this._end=System.DateTime.getDefaultValue(),this._delta=new System.TimeSpan},ctor:function(){this.$initialize()},$ctor1:function(e,t,i){this.$initialize(),this._start=e,this._end=t,this._delta=i}}}),Bridge.define("System.Globalization.DateTimeFormatInfo",{inherits:[System.IFormatProvider,System.ICloneable],config:{alias:["getFormat","System$IFormatProvider$getFormat"]},statics:{$allStandardFormats:{d:"shortDatePattern",D:"longDatePattern",f:"longDatePattern shortTimePattern",F:"longDatePattern longTimePattern",g:"shortDatePattern shortTimePattern",G:"shortDatePattern longTimePattern",m:"monthDayPattern",M:"monthDayPattern",o:"roundtripFormat",O:"roundtripFormat",r:"rfc1123",R:"rfc1123",s:"sortableDateTimePattern",S:"sortableDateTimePattern1",t:"shortTimePattern",T:"longTimePattern",u:"universalSortableDateTimePattern",U:"longDatePattern longTimePattern",y:"yearMonthPattern",Y:"yearMonthPattern"},ctor:function(){this.invariantInfo=Bridge.merge(new System.Globalization.DateTimeFormatInfo,{abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],abbreviatedMonthGenitiveNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],amDesignator:"AM",dateSeparator:"/",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],firstDayOfWeek:0,fullDateTimePattern:"dddd, dd MMMM yyyy HH:mm:ss",longDatePattern:"dddd, dd MMMM yyyy",longTimePattern:"HH:mm:ss",monthDayPattern:"MMMM dd",monthGenitiveNames:["January","February","March","April","May","June","July","August","September","October","November","December",""],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December",""],pmDesignator:"PM",rfc1123:"ddd, dd MMM yyyy HH':'mm':'ss 'GMT'",shortDatePattern:"MM/dd/yyyy",shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],shortTimePattern:"HH:mm",sortableDateTimePattern:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",sortableDateTimePattern1:"yyyy'-'MM'-'dd",timeSeparator:":",universalSortableDateTimePattern:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",yearMonthPattern:"yyyy MMMM",roundtripFormat:"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffzzz"})}},getFormat:function(e){switch(e){case System.Globalization.DateTimeFormatInfo:return this;default:return null}},getAbbreviatedDayName:function(e){if(e<0||e>6)throw new System.ArgumentOutOfRangeException$ctor1("dayofweek");return this.abbreviatedDayNames[e]},getAbbreviatedMonthName:function(e){if(e<1||e>13)throw new System.ArgumentOutOfRangeException.$ctor1("month");return this.abbreviatedMonthNames[e-1]},getAllDateTimePatterns:function(e,t){var i=System.Globalization.DateTimeFormatInfo.$allStandardFormats,r,n,s,o,a=[];if(e){if(!i[e]){if(t)return null;throw new System.ArgumentException.$ctor3("","format")}r={},r[e]=i[e]}else r=i;for(i in r){for(n=r[i].split(" "),s="",o=0;o<n.length;o++)s=(o===0?"":s+" ")+this[n[o]];a.push(s)}return a},getDayName:function(e){if(e<0||e>6)throw new System.ArgumentOutOfRangeException.$ctor1("dayofweek");return this.dayNames[e]},getMonthName:function(e){if(e<1||e>13)throw new System.ArgumentOutOfRangeException.$ctor1("month");return this.monthNames[e-1]},getShortestDayName:function(e){if(e<0||e>6)throw new System.ArgumentOutOfRangeException.$ctor1("dayOfWeek");return this.shortestDayNames[e]},clone:function(){return Bridge.copy(new System.Globalization.DateTimeFormatInfo,this,["abbreviatedDayNames","abbreviatedMonthGenitiveNames","abbreviatedMonthNames","amDesignator","dateSeparator","dayNames","firstDayOfWeek","fullDateTimePattern","longDatePattern","longTimePattern","monthDayPattern","monthGenitiveNames","monthNames","pmDesignator","rfc1123","shortDatePattern","shortestDayNames","shortTimePattern","sortableDateTimePattern","timeSeparator","universalSortableDateTimePattern","yearMonthPattern","roundtripFormat"])}}),Bridge.define("System.Globalization.NumberFormatInfo",{inherits:[System.IFormatProvider,System.ICloneable],config:{alias:["getFormat","System$IFormatProvider$getFormat"]},statics:{ctor:function(){this.numberNegativePatterns=["(n)","-n","- n","n-","n -"],this.currencyNegativePatterns=["($n)","-$n","$-n","$n-","(n$)","-n$","n-$","n$-","-n $","-$ n","n $-","$ n-","$ -n","n- $","($ n)","(n $)"],this.currencyPositivePatterns=["$n","n$","$ n","n $"],this.percentNegativePatterns=["-n %","-n%","-%n","%-n","%n-","n-%","n%-","-% n","n %-","% n-","% -n","n- %"],this.percentPositivePatterns=["n %","n%","%n","% n"],this.invariantInfo=Bridge.merge(new System.Globalization.NumberFormatInfo,{nanSymbol:"NaN",negativeSign:"-",positiveSign:"+",negativeInfinitySymbol:"-Infinity",positiveInfinitySymbol:"Infinity",percentSymbol:"%",percentGroupSizes:[3],percentDecimalDigits:2,percentDecimalSeparator:".",percentGroupSeparator:",",percentPositivePattern:0,percentNegativePattern:0,currencySymbol:"\xA4",currencyGroupSizes:[3],currencyDecimalDigits:2,currencyDecimalSeparator:".",currencyGroupSeparator:",",currencyNegativePattern:0,currencyPositivePattern:0,numberGroupSizes:[3],numberDecimalDigits:2,numberDecimalSeparator:".",numberGroupSeparator:",",numberNegativePattern:1})}},getFormat:function(e){switch(e){case System.Globalization.NumberFormatInfo:return this;default:return null}},clone:function(){return Bridge.copy(new System.Globalization.NumberFormatInfo,this,["nanSymbol","negativeSign","positiveSign","negativeInfinitySymbol","positiveInfinitySymbol","percentSymbol","percentGroupSizes","percentDecimalDigits","percentDecimalSeparator","percentGroupSeparator","percentPositivePattern","percentNegativePattern","currencySymbol","currencyGroupSizes","currencyDecimalDigits","currencyDecimalSeparator","currencyGroupSeparator","currencyNegativePattern","currencyPositivePattern","numberGroupSizes","numberDecimalDigits","numberDecimalSeparator","numberGroupSeparator","numberNegativePattern"])}}),Bridge.define("System.Globalization.CultureInfo",{inherits:[System.IFormatProvider,System.ICloneable],config:{alias:["getFormat","System$IFormatProvider$getFormat"]},$entryPoint:!0,statics:{ctor:function(){this.cultures=this.cultures||{},this.invariantCulture=Bridge.merge(new System.Globalization.CultureInfo("iv",!0),{englishName:"Invariant Language (Invariant Country)",nativeName:"Invariant Language (Invariant Country)",numberFormat:System.Globalization.NumberFormatInfo.invariantInfo,dateTimeFormat:System.Globalization.DateTimeFormatInfo.invariantInfo,TextInfo:Bridge.merge(new System.Globalization.TextInfo,{ANSICodePage:1252,CultureName:"",EBCDICCodePage:37,listSeparator:",",IsRightToLeft:!1,LCID:127,MacCodePage:1e4,OEMCodePage:437,IsReadOnly:!0})}),this.setCurrentCulture(System.Globalization.CultureInfo.invariantCulture)},getCurrentCulture:function(){return this.currentCulture},setCurrentCulture:function(e){this.currentCulture=e,System.Globalization.DateTimeFormatInfo.currentInfo=e.dateTimeFormat,System.Globalization.NumberFormatInfo.currentInfo=e.numberFormat},getCultureInfo:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("name");if(e==="")return System.Globalization.CultureInfo.invariantCulture;var t=this.cultures[e];if(t==null)throw new System.Globalization.CultureNotFoundException.$ctor5("name",e);return t},getCultures:function(){for(var e=Bridge.getPropertyNames(this.cultures),t=[],i=0;i<e.length;i++)t.push(this.cultures[e[i]]);return t}},ctor:function(e,t){if(this.$initialize(),this.name=e,System.Globalization.CultureInfo.cultures||(System.Globalization.CultureInfo.cultures={}),e==null)throw new System.ArgumentNullException.$ctor1("name");var i;if(i=e===""?System.Globalization.CultureInfo.invariantCulture:System.Globalization.CultureInfo.cultures[e],i==null){if(!t)throw new System.Globalization.CultureNotFoundException.$ctor5("name",e);System.Globalization.CultureInfo.cultures[e]=this}else Bridge.copy(this,i,["englishName","nativeName","numberFormat","dateTimeFormat","TextInfo"]),this.TextInfo.IsReadOnly=!1},getFormat:function(e){switch(e){case System.Globalization.NumberFormatInfo:return this.numberFormat;case System.Globalization.DateTimeFormatInfo:return this.dateTimeFormat;default:return null}},clone:function(){return new System.Globalization.CultureInfo(this.name)}}),Bridge.define("System.Environment",{statics:{fields:{Variables:null},props:{Location:{get:function(){var e=Bridge.global;return e&&e.location?e.location:null}},CommandLine:{get:function(){return System.Environment.GetCommandLineArgs().join(" ")}},CurrentDirectory:{get:function(){var e=System.Environment.Location;return e?e.pathname:""},set:function(e){var t=System.Environment.Location;t&&(t.pathname=e)}},ExitCode:0,Is64BitOperatingSystem:{get:function(){var e=Bridge.global?Bridge.global.navigator:null;return!!(e&&(!Bridge.referenceEquals(e.userAgent.indexOf("WOW64"),-1)||!Bridge.referenceEquals(e.userAgent.indexOf("Win64"),-1)))}},ProcessorCount:{get:function(){var e=Bridge.global?Bridge.global.navigator:null;return e&&e.hardwareConcurrency?e.hardwareConcurrency:1}},StackTrace:{get:function(){var e=new Error,t=e.stack;return!System.String.isNullOrEmpty(t)&&System.String.indexOf(t,"at")>=0?t.substr(System.String.indexOf(t,"at")):""}},Version:{get:function(){var e=Bridge.SystemAssembly.compiler,t={};return System.Version.tryParse(e,t)?t.v:new System.Version.ctor}}},ctors:{init:function(){this.ExitCode=0},ctor:function(){System.Environment.Variables=new(System.Collections.Generic.Dictionary$2(System.String,System.String)).ctor,System.Environment.PatchDictionary(System.Environment.Variables)}},methods:{GetResourceString:function(e){return e},GetResourceString$1:function(e,t){t===void 0&&(t=[]);var i=System.Environment.GetResourceString(e);return System.String.formatProvider.apply(System.String,[System.Globalization.CultureInfo.getCurrentCulture(),i].concat(t))},PatchDictionary:function(e){return e.noKeyCheck=!0,e},Exit:function(e){System.Environment.ExitCode=e},ExpandEnvironmentVariables:function(e){var t,i;if(e==null)throw new System.ArgumentNullException.$ctor1(e);t=Bridge.getEnumerator(System.Environment.Variables);try{for(;t.moveNext();)i=t.Current,e=System.String.replaceAll(e,"%"+(i.key||"")+"%",i.value)}finally{Bridge.is(t,System.IDisposable)&&t.System$IDisposable$Dispose()}return e},FailFast:function(e){throw new System.Exception(e)},FailFast$1:function(e,t){throw new System.Exception(e,t)},GetCommandLineArgs:function(){var e=System.Environment.Location,t,i,r,n,s,o,a;if(e){if(t=new(System.Collections.Generic.List$1(System.String)).ctor,i=e.pathname,System.String.isNullOrEmpty(i)||t.add(i),r=e.search,!System.String.isNullOrEmpty(r)&&r.length>1)for(n=System.String.split(r.substr(1),[38].map(function(l){return String.fromCharCode(l)})),s=0;s<n.length;s=s+1|0)for(o=System.String.split(n[System.Array.index(s,n)],[61].map(function(l){return String.fromCharCode(l)})),a=0;a<o.length;a=a+1|0)t.add(o[System.Array.index(a,o)]);return t.ToArray()}return System.Array.init(0,null,System.String)},GetEnvironmentVariable:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("variable");var t={};return System.Environment.Variables.tryGetValue(e.toLowerCase(),t)?t.v:null},GetEnvironmentVariable$1:function(e,t){return System.Environment.GetEnvironmentVariable(e)},GetEnvironmentVariables:function(){return System.Environment.PatchDictionary(new(System.Collections.Generic.Dictionary$2(System.String,System.String)).$ctor1(System.Environment.Variables))},GetEnvironmentVariables$1:function(e){return System.Environment.GetEnvironmentVariables()},GetLogicalDrives:function(){return System.Array.init(0,null,System.String)},SetEnvironmentVariable:function(e,t){if(e==null)throw new System.ArgumentNullException.$ctor1("variable");if(System.String.isNullOrEmpty(e)||System.String.startsWith(e,String.fromCharCode(0))||System.String.contains(e,"=")||e.length>32767)throw new System.ArgumentException.$ctor1("Incorrect variable (cannot be empty, contain zero character nor equal sign, be longer than 32767).");e=e.toLowerCase(),System.String.isNullOrEmpty(t)?System.Environment.Variables.containsKey(e)&&System.Environment.Variables.remove(e):System.Environment.Variables.setItem(e,t)},SetEnvironmentVariable$1:function(e,t,i){System.Environment.SetEnvironmentVariable(e,t)}}}}),Bridge.define("System.StringSplitOptions",{$kind:"enum",statics:{fields:{None:0,RemoveEmptyEntries:1}},$flags:!0}),Bridge.define("System.TypeCode",{$kind:"enum",statics:{fields:{Empty:0,Object:1,DBNull:2,Boolean:3,Char:4,SByte:5,Byte:6,Int16:7,UInt16:8,Int32:9,UInt32:10,Int64:11,UInt64:12,Single:13,Double:14,Decimal:15,DateTime:16,String:18}}}),Bridge.define("System.TypeCodeValues",{statics:{fields:{Empty:null,Object:null,DBNull:null,Boolean:null,Char:null,SByte:null,Byte:null,Int16:null,UInt16:null,Int32:null,UInt32:null,Int64:null,UInt64:null,Single:null,Double:null,Decimal:null,DateTime:null,String:null},ctors:{init:function(){this.Empty="0",this.Object="1",this.DBNull="2",this.Boolean="3",this.Char="4",this.SByte="5",this.Byte="6",this.Int16="7",this.UInt16="8",this.Int32="9",this.UInt32="10",this.Int64="11",this.UInt64="12",this.Single="13",this.Double="14",this.Decimal="15",this.DateTime="16",this.String="18"}}}}),Bridge.define("System.Type",{statics:{$is:function(e){return e&&e.constructor===Function},getTypeCode:function(e){return e==null?System.TypeCode.Empty:e===System.Double?System.TypeCode.Double:e===System.Single?System.TypeCode.Single:e===System.Decimal?System.TypeCode.Decimal:e===System.Byte?System.TypeCode.Byte:e===System.SByte?System.TypeCode.SByte:e===System.UInt16?System.TypeCode.UInt16:e===System.Int16?System.TypeCode.Int16:e===System.UInt32?System.TypeCode.UInt32:e===System.Int32?System.TypeCode.Int32:e===System.UInt64?System.TypeCode.UInt64:e===System.Int64?System.TypeCode.Int64:e===System.Boolean?System.TypeCode.Boolean:e===System.Char?System.TypeCode.Char:e===System.DateTime?System.TypeCode.DateTime:e===System.String?System.TypeCode.String:System.TypeCode.Object}}}),Bridge.Math={divRem:function(e,t,i){var r=e%t;return i.v=r,(e-r)/t},round:function(e,t,i){var r=Math.pow(10,t||0),n,s;return e*=r,n=e>0|-(e<0),e%1==.5*n?(s=Math.floor(e),(s+(i===4?n>0:s%2*n))/r):Math.round(e)/r},log10:Math.log10||function(e){return Math.log(e)/Math.LN10},logWithBase:function(e,t){return isNaN(e)?e:isNaN(t)?t:t===1?NaN:e!==1&&(t===0||t===Number.POSITIVE_INFINITY)?NaN:Bridge.Math.log10(e)/Bridge.Math.log10(t)},log:function(e){return e===0?Number.NEGATIVE_INFINITY:e<0||isNaN(e)?NaN:e===Number.POSITIVE_INFINITY?Number.POSITIVE_INFINITY:e===Number.NEGATIVE_INFINITY?NaN:Math.log(e)},sinh:Math.sinh||function(e){return(Math.exp(e)-Math.exp(-e))/2},cosh:Math.cosh||function(e){return(Math.exp(e)+Math.exp(-e))/2},tanh:Math.tanh||function(e){if(e===1/0)return 1;if(e===-1/0)return-1;var t=Math.exp(2*e);return(t-1)/(t+1)},IEEERemainder:function(e,t){var i=e%t,r,n,s;return isNaN(i)?Number.NaN:i===0&&e<0?-0:(r=i-Math.abs(t)*Bridge.Int.sign(e),Math.abs(r)===Math.abs(i)?(n=e/t,s=Bridge.Math.round(n,0,6),Math.abs(s)>Math.abs(n)?r:i):Math.abs(r)<Math.abs(i)?r:i)}},Bridge.define("System.Boolean",{inherits:[System.IComparable],statics:{trueString:"True",falseString:"False",$is:function(e){return typeof e=="boolean"},getDefaultValue:function(){return!1},createInstance:function(){return!1},toString:function(e){return e?System.Boolean.trueString:System.Boolean.falseString},parse:function(e){if(!Bridge.hasValue(e))throw new System.ArgumentNullException.$ctor1("value");var t={v:!1};if(!System.Boolean.tryParse(e,t))throw new System.FormatException.$ctor1("Bad format for Boolean value");return t.v},tryParse:function(e,t){if(t.v=!1,!Bridge.hasValue(e))return!1;if(System.String.equals(System.Boolean.trueString,e,5))return t.v=!0,!0;if(System.String.equals(System.Boolean.falseString,e,5))return t.v=!1,!0;for(var i=0,r=e.length-1;i<e.length&&!(!System.Char.isWhiteSpace(e[i])&&!System.Char.isNull(e.charCodeAt(i)));)i++;for(;r>=i&&!(!System.Char.isWhiteSpace(e[r])&&!System.Char.isNull(e.charCodeAt(r)));)r--;return e=e.substr(i,r-i+1),System.String.equals(System.Boolean.trueString,e,5)?(t.v=!0,!0):System.String.equals(System.Boolean.falseString,e,5)?(t.v=!1,!0):!1}}}),System.Boolean.$kind="",Bridge.Class.addExtend(System.Boolean,[System.IComparable$1(System.Boolean),System.IEquatable$1(System.Boolean)]),Bridge.define("Bridge.Int",{inherits:[System.IComparable,System.IFormattable],statics:{$number:!0,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-(Math.pow(2,53)-1),$is:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e,0)===e},getDefaultValue:function(){return 0},format:function(e,t,i,r,n){var s=(i||System.Globalization.CultureInfo.getCurrentCulture()).getFormat(System.Globalization.NumberFormatInfo),o=s.numberDecimalSeparator,a=s.numberGroupSeparator,l=e instanceof System.Decimal,u=e instanceof System.Int64||e instanceof System.UInt64,d=l||u?e.isZero()?!1:e.isNegative():e<0,f,C,E,T,w,k,O,M,P,y;if(!u&&(l?!e.isFinite():!isFinite(e)))return Number.NEGATIVE_INFINITY===e||l&&d?s.negativeInfinitySymbol:isNaN(e)?s.nanSymbol:s.positiveInfinitySymbol;if(t||(t="G"),f=t.match(/^([a-zA-Z])(\d*)$/),f)switch(T=f[1].toUpperCase(),C=parseInt(f[2],10),T){case"D":return this.defaultFormat(e,isNaN(C)?1:C,0,0,s,!0);case"F":case"N":return isNaN(C)&&(C=s.numberDecimalDigits),this.defaultFormat(e,1,C,C,s,T==="F");case"G":case"E":for(var m=0,c=l||u?u&&e.eq(System.Int64.MinValue)?System.Int64(e.value.toUnsigned()):e.abs():Math.abs(e),$=f[1],x=3,D,G;l||u?c.gte(10):c>=10;)l||u?c=c.div(10):c/=10,m++;for(;l||u?c.ne(0)&&c.lt(1):c!==0&&c<1;)l||u?c=c.mul(10):c*=10,m--;if(T==="G"){if(w=isNaN(C),w&&(C=l?29:u?e instanceof System.Int64?19:20:r&&r.precision?r.precision:15),m>-5&&m<C||l&&w)return D=0,G=C-(m>0?m+1:1),this.defaultFormat(e,1,l?Math.min(27,Math.max(D,e.$precision)):D,G,s,!0);$=$==="G"?"E":"e",x=2,D=0,G=(C||15)-1}else D=G=isNaN(C)?6:C;return m>=0?$+=s.positiveSign:($+=s.negativeSign,m=-m),d&&(l||u?c=c.mul(-1):c*=-1),this.defaultFormat(c,1,l?Math.min(27,Math.max(D,e.$precision)):D,G,s)+$+this.defaultFormat(m,x,0,0,s,!0);case"P":return isNaN(C)&&(C=s.percentDecimalDigits),this.defaultFormat(e*100,1,C,C,s,!1,"percent");case"X":for(l?k=e.round().value.toHex().substr(2):u?(O=n?n(e):e,k=O.toString(16)):(O=n?n(Math.round(e)):Math.round(e)>>>0,k=O.toString(16)),f[1]==="X"&&(k=k.toUpperCase()),C-=k.length;C-- >0;)k="0"+k;return k;case"C":return isNaN(C)&&(C=s.currencyDecimalDigits),this.defaultFormat(e,1,C,C,s,!1,"currency");case"R":return M=l||u?e.toString():""+e,o!=="."&&(M=M.replace(".",o)),M.replace("e","E")}if(t.indexOf(",.")!==-1||System.String.endsWith(t,",")){for(P=0,y=t.indexOf(",."),y===-1&&(y=t.length-1);y>-1&&t.charAt(y)===",";)P++,y--;l||u?e=e.div(Math.pow(1e3,P)):e/=Math.pow(1e3,P)}return t.indexOf("%")!==-1&&(l||u?e=e.mul(100):e*=100),t.indexOf("\u2030")!==-1&&(l||u?e=e.mul(1e3):e*=1e3),E=t.split(";"),(l||u?e.lt(0):e<0)&&E.length>1?(l||u?e=e.mul(-1):e*=-1,t=E[1]):t=E[(l||u?e.ne(0):!e)&&E.length>2?2:0],this.customFormat(e,t,s,!t.match(/^[^\.]*[0#],[0#]/))},defaultFormat:function(e,t,i,r,n,s,o){o=o||"number";var a=(n||System.Globalization.CultureInfo.getCurrentCulture()).getFormat(System.Globalization.NumberFormatInfo),l,u,d,f,C,E,T=a[o+"GroupSizes"],w,k,O,M,P,y,m,c="",$=e instanceof System.Decimal,x=e instanceof System.Int64||e instanceof System.UInt64,D=$||x?e.isZero()?!1:e.isNegative():e<0,G=!1;if(f=Math.pow(10,r),l=$?e.abs().toDecimalPlaces(r).toFixed():x?e.eq(System.Int64.MinValue)?e.value.toUnsigned().toString():e.abs().toString():""+ +Math.abs(e).toFixed(r),G=l.split("").every(function(q){return q==="0"||q==="."}),u=l.indexOf("."),u>0&&(w=a[o+"DecimalSeparator"]+l.substr(u+1),l=l.substr(0,u)),l.length<t&&(l=Array(t-l.length+1).join("0")+l),w?(w.length-1<i&&(w+=Array(i-w.length+2).join("0")),r===0?w=null:w.length-1>r&&(w=w.substr(0,r+1))):i>0&&(w=a[o+"DecimalSeparator"]+Array(i+1).join("0")),C=0,E=T[C],l.length<E)c=l,w&&(c+=w);else{for(k=l.length,O=!1,m=s?"":a[o+"GroupSeparator"];!O&&(P=E,M=k-P,M<0&&(E+=M,P+=M,M=0,O=!0),!!P);)y=l.substr(M,P),c=c.length?y+m+c:y,k-=P,C<T.length-1&&(C++,E=T[C]);w&&(c+=w)}return D&&!G?(d=System.Globalization.NumberFormatInfo[o+"NegativePatterns"][a[o+"NegativePattern"]],d.replace("-",a.negativeSign).replace("%",a.percentSymbol).replace("$",a.currencySymbol).replace("n",c)):System.Globalization.NumberFormatInfo[o+"PositivePatterns"]?(d=System.Globalization.NumberFormatInfo[o+"PositivePatterns"][a[o+"PositivePattern"]],d.replace("%",a.percentSymbol).replace("$",a.currencySymbol).replace("n",c)):c},customFormat:function(e,t,i,r){var n=0,s=-1,o=-1,a=0,l=-1,u=0,d=1,f,C,E,T,w,k,O=!1,M=!1,P,y,m="",c=!1,$=!1,x=!1,D=e instanceof System.Decimal,G=e instanceof System.Int64||e instanceof System.UInt64,q=D||G?e.isZero()?!1:e.isNegative():e<0;for(P="number",t.indexOf("%")!==-1?P="percent":t.indexOf("$")!==-1&&(P="currency"),C=0;C<t.length;C++)if(f=t.charAt(C),f==="'"||f==='"'){if(C=t.indexOf(f,C+1),C<0)break}else f==="\\"?C++:((f==="0"||f==="#")&&(a+=u,f==="0"&&(u?l=a:s<0&&(s=n)),n+=!u),u=u||f===".");for(s=s<0?1:n-s,q&&(O=!0),w=Math.pow(10,a),e=D?System.Decimal.round(e.abs().mul(w),4).div(w).toString():G?(e.eq(System.Int64.MinValue)?System.Int64(e.value.toUnsigned()):e.abs()).mul(w).div(w).toString():""+Math.round(Math.abs(e)*w)/w,M=e.split("").every(function(z){return z==="0"||z==="."}),k=e.indexOf("."),o=k<0?e.length:k,C=o-n,y={groupIndex:Math.max(o,s),sep:r?"":i[P+"GroupSeparator"]},o===1&&e.charAt(0)==="0"&&(c=!0),E=0;E<t.length;E++)if(f=t.charAt(E),f==="'"||f==='"'){if(T=t.indexOf(f,E+1),m+=t.substring(E+1,T<0?t.length:T),T<0)break;E=T}else f==="\\"?(m+=t.charAt(E+1),E++):f==="#"||f==="0"?(x=!0,!$&&c&&f==="#"||(y.buffer=m,C<o?(C>=0?(d&&this.addGroup(e.substr(0,C),y),this.addGroup(e.charAt(C),y)):C>=o-s&&this.addGroup("0",y),d=0):(l-- >0||C<e.length)&&this.addGroup(C>=e.length?"0":e.charAt(C),y),m=y.buffer),C++):f==="."?(x||c||(m+=e.substr(0,o),x=!0),(e.length>++C||l>0)&&($=!0,m+=i[P+"DecimalSeparator"])):f!==","&&(m+=f);return O&&!M&&(m="-"+m),m},addGroup:function(e,t){for(var i=t.buffer,r=t.sep,n=t.groupIndex,s=0,o=e.length;s<o;s++)i+=e.charAt(s),r&&n>1&&n--%3==1&&(i+=r);t.buffer=i,t.groupIndex=n},parseFloat:function(e,t){var i={};return Bridge.Int.tryParseFloat(e,t,i,!1),i.v},tryParseFloat:function(e,t,i,r){var n,s,o,a,l;if(i.v=0,r==null&&(r=!0),e==null){if(r)return!1;throw new System.ArgumentNullException.$ctor1("s")}e=e.trim();var u=(t||System.Globalization.CultureInfo.getCurrentCulture()).getFormat(System.Globalization.NumberFormatInfo),d=u.numberDecimalSeparator,f=u.numberGroupSeparator,C="Input string was not in a correct format.",E=e.indexOf(d),T=f?e.indexOf(f):-1;if(E>-1&&(E<T||T>-1&&E<e.indexOf(f,E)||e.indexOf(d,E+1)>-1)){if(r)return!1;throw new System.FormatException.$ctor1(C)}if(d!=="."&&f!=="."&&e.indexOf(".")>-1){if(r)return!1;throw new System.FormatException.$ctor1(C)}if(T>-1){for(n="",a=0;a<e.length;a++)e[a]!==f&&(n+=e[a]);e=n}if(e===u.negativeInfinitySymbol)return i.v=Number.NEGATIVE_INFINITY,!0;if(e===u.positiveInfinitySymbol)return i.v=Number.POSITIVE_INFINITY,!0;if(e===u.nanSymbol)return i.v=Number.NaN,!0;for(s=0,o=!1,a=0;a<e.length;a++)if(System.Char.isNumber(e[a].charCodeAt(0))||e[a]==="."||e[a]===","||e[a]===u.positiveSign&&(a===0||o)||e[a]===u.negativeSign&&(a===0||o)||e[a]===d||e[a]===f)o=!1;else if(e[a].toLowerCase()==="e"){if(o=!0,s++,s>1){if(r)return!1;throw new System.FormatException.$ctor1(C)}}else{if(o=!1,r)return!1;throw new System.FormatException.$ctor1(C)}if(l=parseFloat(e.replace(d,".")),isNaN(l)){if(r)return!1;throw new System.FormatException.$ctor1(C)}return i.v=l,!0},parseInt:function(e,t,i,r){if(r=r||10,e==null)throw new System.ArgumentNullException.$ctor1("str");if(e=e.trim(),r<=10&&!/^[+-]?[0-9]+$/.test(e)||r==16&&!/^[+-]?[0-9A-F]+$/gi.test(e))throw new System.FormatException.$ctor1("Input string was not in a correct format.");var n=parseInt(e,r);if(isNaN(n))throw new System.FormatException.$ctor1("Input string was not in a correct format.");if(n<t||n>i)throw new System.OverflowException;return n},tryParseInt:function(e,t,i,r,n){return t.v=0,n=n||10,e!=null&&e.trim==="".trim&&(e=e.trim()),n<=10&&!/^[+-]?[0-9]+$/.test(e)||n==16&&!/^[+-]?[0-9A-F]+$/gi.test(e)?!1:(t.v=parseInt(e,n),t.v<i||t.v>r?(t.v=0,!1):!0)},isInfinite:function(e){return e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY},trunc:function(e){return Bridge.isNumber(e)?e>0?Math.floor(e):Math.ceil(e):Bridge.Int.isInfinite(e)?e:null},div:function(e,t){if(e==null||t==null)return null;if(t===0)throw new System.DivideByZeroException;return this.trunc(e/t)},mod:function(e,t){if(e==null||t==null)return null;if(t===0)throw new System.DivideByZeroException;return e%t},check:function(e,t){if(System.Int64.is64Bit(e))return System.Int64.check(e,t);if(e instanceof System.Decimal)return System.Decimal.toInt(e,t);if(Bridge.isNumber(e)){if(System.Int64.is64BitType(t)){if(t===System.UInt64&&e<0)throw new System.OverflowException;return t===System.Int64?System.Int64(e):System.UInt64(e)}else if(!t.$is(e))throw new System.OverflowException}return Bridge.Int.isInfinite(e)||isNaN(e)?System.Int64.is64BitType(t)?t.MinValue:t.min:e},sxb:function(e){return Bridge.isNumber(e)?e|(e&128?4294967040:0):Bridge.Int.isInfinite(e)||isNaN(e)?System.SByte.min:null},sxs:function(e){return Bridge.isNumber(e)?e|(e&32768?4294901760:0):Bridge.Int.isInfinite(e)||isNaN(e)?System.Int16.min:null},clip8:function(e){return Bridge.isNumber(e)?Bridge.Int.sxb(e&255):Bridge.Int.isInfinite(e)||isNaN(e)?System.SByte.min:null},clipu8:function(e){return Bridge.isNumber(e)?e&255:Bridge.Int.isInfinite(e)||isNaN(e)?System.Byte.min:null},clip16:function(e){return Bridge.isNumber(e)?Bridge.Int.sxs(e&65535):Bridge.Int.isInfinite(e)||isNaN(e)?System.Int16.min:null},clipu16:function(e){return Bridge.isNumber(e)?e&65535:Bridge.Int.isInfinite(e)||isNaN(e)?System.UInt16.min:null},clip32:function(e){return Bridge.isNumber(e)?e|0:Bridge.Int.isInfinite(e)||isNaN(e)?System.Int32.min:null},clipu32:function(e){return Bridge.isNumber(e)?e>>>0:Bridge.Int.isInfinite(e)||isNaN(e)?System.UInt32.min:null},clip64:function(e){return Bridge.isNumber(e)?System.Int64(Bridge.Int.trunc(e)):Bridge.Int.isInfinite(e)||isNaN(e)?System.Int64.MinValue:null},clipu64:function(e){return Bridge.isNumber(e)?System.UInt64(Bridge.Int.trunc(e)):Bridge.Int.isInfinite(e)||isNaN(e)?System.UInt64.MinValue:null},sign:function(e){return e===Number.POSITIVE_INFINITY?1:e===Number.NEGATIVE_INFINITY?-1:Bridge.isNumber(e)?e===0?0:e<0?-1:1:null},$mul:Math.imul||function(e,t){var i=e>>>16&65535,r=e&65535,n=t>>>16&65535,s=t&65535;return r*s+(i*s+r*n<<16>>>0)|0},mul:function(e,t,i){return e==null||t==null?null:(i&&Bridge.Int.check(e*t,System.Int32),Bridge.Int.$mul(e,t))},umul:function(e,t,i){return e==null||t==null?null:(i&&Bridge.Int.check(e*t,System.UInt32),Bridge.Int.$mul(e,t)>>>0)}}}),Bridge.Int.$kind="",Bridge.Class.addExtend(Bridge.Int,[System.IComparable$1(Bridge.Int),System.IEquatable$1(Bridge.Int)]),function(){var e=function(t,i,r,n,s){var o=Bridge.define(t,{inherits:[System.IComparable,System.IFormattable],statics:{$number:!0,toUnsign:s,min:i,max:r,precision:n,$is:function(a){return typeof a=="number"&&Math.floor(a,0)===a&&a>=i&&a<=r},getDefaultValue:function(){return 0},parse:function(a,l){return Bridge.Int.parseInt(a,i,r,l)},tryParse:function(a,l,u){return Bridge.Int.tryParseInt(a,l,i,r,u)},format:function(a,l,u){return Bridge.Int.format(a,l,u,o,s)},equals:function(a,l){return Bridge.is(a,o)&&Bridge.is(l,o)?Bridge.unbox(a,!0)===Bridge.unbox(l,!0):!1},equalsT:function(a,l){return Bridge.unbox(a,!0)===Bridge.unbox(l,!0)}}});o.$kind="",Bridge.Class.addExtend(o,[System.IComparable$1(o),System.IEquatable$1(o)])};e("System.Byte",0,255,3),e("System.SByte",-128,127,3,Bridge.Int.clipu8),e("System.Int16",-32768,32767,5,Bridge.Int.clipu16),e("System.UInt16",0,65535,5),e("System.Int32",-2147483648,2147483647,10,Bridge.Int.clipu32),e("System.UInt32",0,4294967295,10)}(),Bridge.define("System.Double",{inherits:[System.IComparable,System.IFormattable],statics:{min:-Number.MAX_VALUE,max:Number.MAX_VALUE,precision:15,$number:!0,$is:function(e){return typeof e=="number"},getDefaultValue:function(){return 0},parse:function(e,t){return Bridge.Int.parseFloat(e,t)},tryParse:function(e,t,i){return Bridge.Int.tryParseFloat(e,t,i)},format:function(e,t,i){return Bridge.Int.format(e,t||"G",i,System.Double)},equals:function(e,t){return Bridge.is(e,System.Double)&&Bridge.is(t,System.Double)?(e=Bridge.unbox(e,!0),t=Bridge.unbox(t,!0),isNaN(e)&&isNaN(t)?!0:e===t):!1},equalsT:function(e,t){return Bridge.unbox(e,!0)===Bridge.unbox(t,!0)},getHashCode:function(e){var t=Bridge.unbox(e,!0);return t===0?0:t===Number.POSITIVE_INFINITY?2146435072:t===Number.NEGATIVE_INFINITY?4293918720:Bridge.getHashCode(t.toExponential())}}}),System.Double.$kind="",Bridge.Class.addExtend(System.Double,[System.IComparable$1(System.Double),System.IEquatable$1(System.Double)]),Bridge.define("System.Single",{inherits:[System.IComparable,System.IFormattable],statics:{min:-34028234663852886e22,max:34028234663852886e22,precision:7,$number:!0,$is:System.Double.$is,getDefaultValue:System.Double.getDefaultValue,parse:System.Double.parse,tryParse:System.Double.tryParse,format:function(e,t,i){return Bridge.Int.format(e,t||"G",i,System.Single)},equals:function(e,t){return Bridge.is(e,System.Single)&&Bridge.is(t,System.Single)?(e=Bridge.unbox(e,!0),t=Bridge.unbox(t,!0),isNaN(e)&&isNaN(t)?!0:e===t):!1},equalsT:function(e,t){return Bridge.unbox(e,!0)===Bridge.unbox(t,!0)},getHashCode:System.Double.getHashCode}}),System.Single.$kind="",Bridge.Class.addExtend(System.Single,[System.IComparable$1(System.Single),System.IEquatable$1(System.Single)]),function(e){function t(c,$,x){this.low=c|0,this.high=$|0,this.unsigned=!!x}function i(c){return(c&&c.__isLong__)===!0}function r(c,$){var x,D;if($){if(c>>>=0,(D=0<=c&&256>c)&&(x=u[c]))return x;x=s(c,0>(c|0)?-1:0,!0),D&&(u[c]=x)}else{if(c|=0,(D=-128<=c&&128>c)&&(x=l[c]))return x;x=s(c,0>c?-1:0,!1),D&&(l[c]=x)}return x}function n(c,$){if(isNaN(c)||!isFinite(c))return $?f:m;if($){if(0>c)return f;if(c>=M)return k}else{if(c<=-P)return O;if(c+1>=P)return w}return 0>c?n(-c,$).neg():s(c%4294967296|0,c/4294967296|0,$)}function s(c,$,x){return new t(c,$,x)}function o(c,$,x){var D,G,q,z,Z;if(c.length===0)throw Error("empty string");if(c==="NaN"||c==="Infinity"||c==="+Infinity"||c==="-Infinity")return m;if(typeof $=="number"?(x=$,$=!1):$=!!$,x=x||10,2>x||36<x)throw RangeError("radix");if(0<(D=c.indexOf("-")))throw Error("interior hyphen");if(D===0)return o(c.substring(1),$,x).neg();for(D=n(d(x,8)),G=m,q=0;q<c.length;q+=8)z=Math.min(8,c.length-q),Z=parseInt(c.substring(q,q+z),x),8>z?(z=n(d(x,z)),G=G.mul(z).add(n(Z))):(G=G.mul(D),G=G.add(n(Z)));return G.unsigned=$,G}function a(c){return c instanceof t?c:typeof c=="number"?n(c):typeof c=="string"?o(c):s(c.low,c.high,c.unsigned)}var l,u,d,f,C,E,T,w,k,O;e.Bridge.$Long=t,t.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),t.isLong=i,l={},u={},t.fromInt=r,t.fromNumber=n,t.fromBits=s,d=Math.pow,t.fromString=o,t.fromValue=a;var M=4294967296*4294967296,P=M/2,y=r(16777216),m=r(0);t.ZERO=m,f=r(0,!0),t.UZERO=f,C=r(1),t.ONE=C,E=r(1,!0),t.UONE=E,T=r(-1),t.NEG_ONE=T,w=s(-1,2147483647,!1),t.MAX_VALUE=w,k=s(-1,-1,!0),t.MAX_UNSIGNED_VALUE=k,O=s(0,-2147483648,!1),t.MIN_VALUE=O,e=t.prototype,e.toInt=function(){return this.unsigned?this.low>>>0:this.low},e.toNumber=function(){return this.unsigned?4294967296*(this.high>>>0)+(this.low>>>0):4294967296*this.high+(this.low>>>0)},e.toString=function(c){if(c=c||10,2>c||36<c)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(O)){var x=n(c),$=this.div(x),x=$.mul(x).sub(this);return $.toString(c)+x.toInt().toString(c)}return(typeof c>"u"||c===10?"-":"")+this.neg().toString(c)}for(var $=n(d(c,6),this.unsigned),x=this,D="";;){var G=x.div($),q=(x.sub(G.mul($)).toInt()>>>0).toString(c),x=G;if(x.isZero())return q+D;for(;6>q.length;)q="0"+q;D=""+q+D}},e.getHighBits=function(){return this.high},e.getHighBitsUnsigned=function(){return this.high>>>0},e.getLowBits=function(){return this.low},e.getLowBitsUnsigned=function(){return this.low>>>0},e.getNumBitsAbs=function(){if(this.isNegative())return this.eq(O)?64:this.neg().getNumBitsAbs();for(var c=this.high!=0?this.high:this.low,$=31;0<$&&!(c&1<<$);$--);return this.high!=0?$+33:$+1},e.isZero=function(){return this.high===0&&this.low===0},e.isNegative=function(){return!this.unsigned&&0>this.high},e.isPositive=function(){return this.unsigned||0<=this.high},e.isOdd=function(){return(this.low&1)==1},e.isEven=function(){return(this.low&1)==0},e.equals=function(c){return i(c)||(c=a(c)),this.unsigned!==c.unsigned&&this.high>>>31==1&&c.high>>>31==1?!1:this.high===c.high&&this.low===c.low},e.eq=e.equals,e.notEquals=function(c){return!this.eq(c)},e.neq=e.notEquals,e.lessThan=function(c){return 0>this.comp(c)},e.lt=e.lessThan,e.lessThanOrEqual=function(c){return 0>=this.comp(c)},e.lte=e.lessThanOrEqual,e.greaterThan=function(c){return 0<this.comp(c)},e.gt=e.greaterThan,e.greaterThanOrEqual=function(c){return 0<=this.comp(c)},e.gte=e.greaterThanOrEqual,e.compare=function(c){if(i(c)||(c=a(c)),this.eq(c))return 0;var $=this.isNegative(),x=c.isNegative();return $&&!x?-1:!$&&x?1:this.unsigned?c.high>>>0>this.high>>>0||c.high===this.high&&c.low>>>0>this.low>>>0?-1:1:this.sub(c).isNegative()?-1:1},e.comp=e.compare,e.negate=function(){return!this.unsigned&&this.eq(O)?O:this.not().add(C)},e.neg=e.negate,e.add=function(c){i(c)||(c=a(c));var $=this.high>>>16,x=this.high&65535,D=this.low>>>16,G=c.high>>>16,q=c.high&65535,z=c.low>>>16,Z;return Z=0+((this.low&65535)+(c.low&65535)),c=0+(Z>>>16),c+=D+z,D=0+(c>>>16),D+=x+q,x=0+(D>>>16),x=x+($+G)&65535,s((c&65535)<<16|Z&65535,x<<16|D&65535,this.unsigned)},e.subtract=function(c){return i(c)||(c=a(c)),this.add(c.neg())},e.sub=e.subtract,e.multiply=function(c){var $,x,D,G;if(this.isZero()||(i(c)||(c=a(c)),c.isZero()))return m;if(this.eq(O))return c.isOdd()?O:m;if(c.eq(O))return this.isOdd()?O:m;if(this.isNegative())return c.isNegative()?this.neg().mul(c.neg()):this.neg().mul(c).neg();if(c.isNegative())return this.mul(c.neg()).neg();if(this.lt(y)&&c.lt(y))return n(this.toNumber()*c.toNumber(),this.unsigned);var q=this.high>>>16,z=this.high&65535,Z=this.low>>>16,te=this.low&65535,oe=c.high>>>16,J=c.high&65535,W=c.low>>>16;return c=c.low&65535,G=0+te*c,D=0+(G>>>16),D+=Z*c,x=0+(D>>>16),D=(D&65535)+te*W,x+=D>>>16,D&=65535,x+=z*c,$=0+(x>>>16),x=(x&65535)+Z*W,$+=x>>>16,x&=65535,x+=te*J,$+=x>>>16,x&=65535,$=$+(q*c+z*W+Z*J+te*oe)&65535,s(D<<16|G&65535,$<<16|x,this.unsigned)},e.mul=e.multiply,e.divide=function(c){var $,x,D;if(i(c)||(c=a(c)),c.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?f:m;if(this.unsigned)c.unsigned||(c=c.toUnsigned());else{if(this.eq(O))return c.eq(C)||c.eq(T)?O:c.eq(O)?C:($=this.shr(1).div(c).shl(1),$.eq(m)?c.isNegative()?C:T:(x=this.sub(c.mul($)),$.add(x.div(c))));if(c.eq(O))return this.unsigned?f:m;if(this.isNegative())return c.isNegative()?this.neg().div(c.neg()):this.neg().div(c).neg();if(c.isNegative())return this.div(c.neg()).neg()}if(this.unsigned){if(c.gt(this))return f;if(c.gt(this.shru(1)))return E;D=f}else D=m;for(x=this;x.gte(c);){$=Math.max(1,Math.floor(x.toNumber()/c.toNumber()));for(var G=Math.ceil(Math.log($)/Math.LN2),G=48>=G?1:d(2,G-48),q=n($),z=q.mul(c);z.isNegative()||z.gt(x);)$-=G,q=n($,this.unsigned),z=q.mul(c);q.isZero()&&(q=C),D=D.add(q),x=x.sub(z)}return D},e.div=e.divide,e.modulo=function(c){return i(c)||(c=a(c)),this.sub(this.div(c).mul(c))},e.mod=e.modulo,e.not=function(){return s(~this.low,~this.high,this.unsigned)},e.and=function(c){return i(c)||(c=a(c)),s(this.low&c.low,this.high&c.high,this.unsigned)},e.or=function(c){return i(c)||(c=a(c)),s(this.low|c.low,this.high|c.high,this.unsigned)},e.xor=function(c){return i(c)||(c=a(c)),s(this.low^c.low,this.high^c.high,this.unsigned)},e.shiftLeft=function(c){return i(c)&&(c=c.toInt()),(c&=63)==0?this:32>c?s(this.low<<c,this.high<<c|this.low>>>32-c,this.unsigned):s(0,this.low<<c-32,this.unsigned)},e.shl=e.shiftLeft,e.shiftRight=function(c){return i(c)&&(c=c.toInt()),(c&=63)==0?this:32>c?s(this.low>>>c|this.high<<32-c,this.high>>c,this.unsigned):s(this.high>>c-32,0<=this.high?0:-1,this.unsigned)},e.shr=e.shiftRight,e.shiftRightUnsigned=function(c){if(i(c)&&(c=c.toInt()),c&=63,c===0)return this;var $=this.high;return 32>c?s(this.low>>>c|$<<32-c,$>>>c,this.unsigned):c===32?s($,0,this.unsigned):s($>>>c-32,0,this.unsigned)},e.shru=e.shiftRightUnsigned,e.toSigned=function(){return this.unsigned?s(this.low,this.high,!1):this},e.toUnsigned=function(){return this.unsigned?this:s(this.low,this.high,!0)}}(Bridge.global),System.Int64=function(e){if(this.constructor!==System.Int64)return new System.Int64(e);Bridge.hasValue(e)||(e=0),this.T=System.Int64,this.unsigned=!1,this.value=System.Int64.getValue(e)},System.Int64.$number=!0,System.Int64.TWO_PWR_16_DBL=65536,System.Int64.TWO_PWR_32_DBL=System.Int64.TWO_PWR_16_DBL*System.Int64.TWO_PWR_16_DBL,System.Int64.TWO_PWR_64_DBL=System.Int64.TWO_PWR_32_DBL*System.Int64.TWO_PWR_32_DBL,System.Int64.TWO_PWR_63_DBL=System.Int64.TWO_PWR_64_DBL/2,System.Int64.$$name="System.Int64",System.Int64.prototype.$$name="System.Int64",System.Int64.$kind="struct",System.Int64.prototype.$kind="struct",System.Int64.$$inherits=[],Bridge.Class.addExtend(System.Int64,[System.IComparable,System.IFormattable,System.IComparable$1(System.Int64),System.IEquatable$1(System.Int64)]),System.Int64.$is=function(e){return e instanceof System.Int64},System.Int64.is64Bit=function(e){return e instanceof System.Int64||e instanceof System.UInt64},System.Int64.is64BitType=function(e){return e===System.Int64||e===System.UInt64},System.Int64.getDefaultValue=function(){return System.Int64.Zero},System.Int64.getValue=function(e){return Bridge.hasValue(e)?e instanceof Bridge.$Long?e:e instanceof System.Int64?e.value:e instanceof System.UInt64?e.value.toSigned():Bridge.isArray(e)?new Bridge.$Long(e[0],e[1]):Bridge.isString(e)?Bridge.$Long.fromString(e):Bridge.isNumber(e)?e+1>=System.Int64.TWO_PWR_63_DBL?new System.UInt64(e).value.toSigned():Bridge.$Long.fromNumber(e):e instanceof System.Decimal?Bridge.$Long.fromString(e.toString()):Bridge.$Long.fromValue(e):null},System.Int64.create=function(e){return Bridge.hasValue(e)?e instanceof System.Int64?e:new System.Int64(e):null},System.Int64.lift=function(e){return Bridge.hasValue(e)?System.Int64.create(e):null},System.Int64.toNumber=function(e){return e?e.toNumber():null},System.Int64.prototype.toNumberDivided=function(e){var t=this.div(e),i=this.mod(e),r=i.toNumber()/e;return t.toNumber()+r},System.Int64.prototype.toJSON=function(){return this.gt(Bridge.Int.MAX_SAFE_INTEGER)||this.lt(Bridge.Int.MIN_SAFE_INTEGER)?this.toString():this.toNumber()},System.Int64.prototype.toString=function(e,t){return!e&&!t?this.value.toString():Bridge.isNumber(e)&&!t?this.value.toString(e):Bridge.Int.format(this,e,t,System.Int64,System.Int64.clipu64)},System.Int64.prototype.format=function(e,t){return Bridge.Int.format(this,e,t,System.Int64,System.Int64.clipu64)},System.Int64.prototype.isNegative=function(){return this.value.isNegative()},System.Int64.prototype.abs=function(){if(this.T===System.Int64&&this.eq(System.Int64.MinValue))throw new System.OverflowException;return new this.T(this.value.isNegative()?this.value.neg():this.value)},System.Int64.prototype.compareTo=function(e){return this.value.compare(this.T.getValue(e))},System.Int64.prototype.add=function(e,t){var i=this.T.getValue(e),r=new this.T(this.value.add(i));if(t){var n=this.value.isNegative(),s=i.isNegative(),o=r.value.isNegative();if(n&&s&&!o||!n&&!s&&o||this.T===System.UInt64&&r.lt(System.UInt64.max(this,i)))throw new System.OverflowException}return r},System.Int64.prototype.sub=function(e,t){var i=this.T.getValue(e),r=new this.T(this.value.sub(i));if(t){var n=this.value.isNegative(),s=i.isNegative(),o=r.value.isNegative();if(n&&!s&&!o||!n&&s&&o||this.T===System.UInt64&&this.value.lt(i))throw new System.OverflowException}return r},System.Int64.prototype.isZero=function(){return this.value.isZero()},System.Int64.prototype.mul=function(e,t){var i=this.T.getValue(e),r=new this.T(this.value.mul(i)),n;if(t){var s=this.sign(),o=i.isZero()?0:i.isNegative()?-1:1,a=r.sign();if(this.T===System.Int64){if(this.eq(System.Int64.MinValue)||this.eq(System.Int64.MaxValue)){if(i.neq(1)&&i.neq(0))throw new System.OverflowException;return r}if(i.eq(Bridge.$Long.MIN_VALUE)||i.eq(Bridge.$Long.MAX_VALUE)){if(this.neq(1)&&this.neq(0))throw new System.OverflowException;return r}if(s===-1&&o===-1&&a!==1||s===1&&o===1&&a!==1||s===-1&&o===1&&a!==-1||s===1&&o===-1&&a!==-1)throw new System.OverflowException;if(n=r.abs(),n.lt(this.abs())||n.lt(System.Int64(i).abs()))throw new System.OverflowException}else{if(this.eq(System.UInt64.MaxValue)){if(i.neq(1)&&i.neq(0))throw new System.OverflowException;return r}if(i.eq(Bridge.$Long.MAX_UNSIGNED_VALUE)){if(this.neq(1)&&this.neq(0))throw new System.OverflowException;return r}if(n=r.abs(),n.lt(this.abs())||n.lt(System.Int64(i).abs()))throw new System.OverflowException}}return r},System.Int64.prototype.div=function(e){return new this.T(this.value.div(this.T.getValue(e)))},System.Int64.prototype.mod=function(e){return new this.T(this.value.mod(this.T.getValue(e)))},System.Int64.prototype.neg=function(e){if(e&&this.T===System.Int64&&this.eq(System.Int64.MinValue))throw new System.OverflowException;return new this.T(this.value.neg())},System.Int64.prototype.inc=function(e){return this.add(1,e)},System.Int64.prototype.dec=function(e){return this.sub(1,e)},System.Int64.prototype.sign=function(){return this.value.isZero()?0:this.value.isNegative()?-1:1},System.Int64.prototype.clone=function(){return new this.T(this)},System.Int64.prototype.ne=function(e){return this.value.neq(this.T.getValue(e))},System.Int64.prototype.neq=function(e){return this.value.neq(this.T.getValue(e))},System.Int64.prototype.eq=function(e){return this.value.eq(this.T.getValue(e))},System.Int64.prototype.lt=function(e){return this.value.lt(this.T.getValue(e))},System.Int64.prototype.lte=function(e){return this.value.lte(this.T.getValue(e))},System.Int64.prototype.gt=function(e){return this.value.gt(this.T.getValue(e))},System.Int64.prototype.gte=function(e){return this.value.gte(this.T.getValue(e))},System.Int64.prototype.equals=function(e){return this.value.eq(this.T.getValue(e))},System.Int64.prototype.equalsT=function(e){return this.equals(e)},System.Int64.prototype.getHashCode=function(){var e=this.sign()*397+this.value.high|0;return e*397+this.value.low|0},System.Int64.prototype.toNumber=function(){return this.value.toNumber()},System.Int64.parse=function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("str");if(!/^[+-]?[0-9]+$/.test(e))throw new System.FormatException.$ctor1("Input string was not in a correct format.");var t=new System.Int64(e);if(System.String.trimStartZeros(e)!==t.toString())throw new System.OverflowException;return t},System.Int64.tryParse=function(e,t){try{return e==null||!/^[+-]?[0-9]+$/.test(e)?(t.v=System.Int64(Bridge.$Long.ZERO),!1):(t.v=new System.Int64(e),System.String.trimStartZeros(e)!==t.v.toString()?(t.v=System.Int64(Bridge.$Long.ZERO),!1):!0)}catch{return t.v=System.Int64(Bridge.$Long.ZERO),!1}},System.Int64.divRem=function(e,t,i){e=System.Int64(e),t=System.Int64(t);var r=e.mod(t);return i.v=r,e.sub(r).div(t)},System.Int64.min=function(){for(var e=[],t,i=0,r=arguments.length;i<r;i++)e.push(System.Int64.getValue(arguments[i]));for(i=0,t=e[0];++i<e.length;)e[i].lt(t)&&(t=e[i]);return new System.Int64(t)},System.Int64.max=function(){for(var e=[],t,i=0,r=arguments.length;i<r;i++)e.push(System.Int64.getValue(arguments[i]));for(i=0,t=e[0];++i<e.length;)e[i].gt(t)&&(t=e[i]);return new System.Int64(t)},System.Int64.prototype.and=function(e){return new this.T(this.value.and(this.T.getValue(e)))},System.Int64.prototype.not=function(){return new this.T(this.value.not())},System.Int64.prototype.or=function(e){return new this.T(this.value.or(this.T.getValue(e)))},System.Int64.prototype.shl=function(e){return new this.T(this.value.shl(e))},System.Int64.prototype.shr=function(e){return new this.T(this.value.shr(e))},System.Int64.prototype.shru=function(e){return new this.T(this.value.shru(e))},System.Int64.prototype.xor=function(e){return new this.T(this.value.xor(this.T.getValue(e)))},System.Int64.check=function(e,t){if(Bridge.Int.isInfinite(e))return t===System.Int64||t===System.UInt64?t.MinValue:t.min;if(!e)return null;var i,r;if(t===System.Int64){if(e instanceof System.Int64)return e;if(i=e.value.toString(),r=new System.Int64(i),i!==r.value.toString())throw new System.OverflowException;return r}if(t===System.UInt64){if(e instanceof System.UInt64)return e;if(e.value.isNegative())throw new System.OverflowException;if(i=e.value.toString(),r=new System.UInt64(i),i!==r.value.toString())throw new System.OverflowException;return r}return Bridge.Int.check(e.toNumber(),t)},System.Int64.clip8=function(e){return e=e==null||System.Int64.is64Bit(e)?e:new System.Int64(e),e?Bridge.Int.sxb(e.value.low&255):Bridge.Int.isInfinite(e)?System.SByte.min:null},System.Int64.clipu8=function(e){return e=e==null||System.Int64.is64Bit(e)?e:new System.Int64(e),e?e.value.low&255:Bridge.Int.isInfinite(e)?System.Byte.min:null},System.Int64.clip16=function(e){return e=e==null||System.Int64.is64Bit(e)?e:new System.Int64(e),e?Bridge.Int.sxs(e.value.low&65535):Bridge.Int.isInfinite(e)?System.Int16.min:null},System.Int64.clipu16=function(e){return e=e==null||System.Int64.is64Bit(e)?e:new System.Int64(e),e?e.value.low&65535:Bridge.Int.isInfinite(e)?System.UInt16.min:null},System.Int64.clip32=function(e){return e=e==null||System.Int64.is64Bit(e)?e:new System.Int64(e),e?e.value.low|0:Bridge.Int.isInfinite(e)?System.Int32.min:null},System.Int64.clipu32=function(e){return e=e==null||System.Int64.is64Bit(e)?e:new System.Int64(e),e?e.value.low>>>0:Bridge.Int.isInfinite(e)?System.UInt32.min:null},System.Int64.clip64=function(e){return e=e==null||System.Int64.is64Bit(e)?e:new System.UInt64(e),e?new System.Int64(e.value.toSigned()):Bridge.Int.isInfinite(e)?System.Int64.MinValue:null},System.Int64.clipu64=function(e){return e=e==null||System.Int64.is64Bit(e)?e:new System.Int64(e),e?new System.UInt64(e.value.toUnsigned()):Bridge.Int.isInfinite(e)?System.UInt64.MinValue:null},System.Int64.Zero=System.Int64(Bridge.$Long.ZERO),System.Int64.MinValue=System.Int64(Bridge.$Long.MIN_VALUE),System.Int64.MaxValue=System.Int64(Bridge.$Long.MAX_VALUE),System.Int64.precision=19,System.UInt64=function(e){if(this.constructor!==System.UInt64)return new System.UInt64(e);Bridge.hasValue(e)||(e=0),this.T=System.UInt64,this.unsigned=!0,this.value=System.UInt64.getValue(e,!0)},System.UInt64.$number=!0,System.UInt64.$$name="System.UInt64",System.UInt64.prototype.$$name="System.UInt64",System.UInt64.$kind="struct",System.UInt64.prototype.$kind="struct",System.UInt64.$$inherits=[],Bridge.Class.addExtend(System.UInt64,[System.IComparable,System.IFormattable,System.IComparable$1(System.UInt64),System.IEquatable$1(System.UInt64)]),System.UInt64.$is=function(e){return e instanceof System.UInt64},System.UInt64.getDefaultValue=function(){return System.UInt64.Zero},System.UInt64.getValue=function(e){return Bridge.hasValue(e)?e instanceof Bridge.$Long?e:e instanceof System.UInt64?e.value:e instanceof System.Int64?e.value.toUnsigned():Bridge.isArray(e)?new Bridge.$Long(e[0],e[1],!0):Bridge.isString(e)?Bridge.$Long.fromString(e,!0):Bridge.isNumber(e)?e<0?new System.Int64(e).value.toUnsigned():Bridge.$Long.fromNumber(e,!0):e instanceof System.Decimal?Bridge.$Long.fromString(e.toString(),!0):Bridge.$Long.fromValue(e):null},System.UInt64.create=function(e){return Bridge.hasValue(e)?e instanceof System.UInt64?e:new System.UInt64(e):null},System.UInt64.lift=function(e){return Bridge.hasValue(e)?System.UInt64.create(e):null},System.UInt64.prototype.toString=System.Int64.prototype.toString,System.UInt64.prototype.format=System.Int64.prototype.format,System.UInt64.prototype.isNegative=System.Int64.prototype.isNegative,System.UInt64.prototype.abs=System.Int64.prototype.abs,System.UInt64.prototype.compareTo=System.Int64.prototype.compareTo,System.UInt64.prototype.add=System.Int64.prototype.add,System.UInt64.prototype.sub=System.Int64.prototype.sub,System.UInt64.prototype.isZero=System.Int64.prototype.isZero,System.UInt64.prototype.mul=System.Int64.prototype.mul,System.UInt64.prototype.div=System.Int64.prototype.div,System.UInt64.prototype.toNumberDivided=System.Int64.prototype.toNumberDivided,System.UInt64.prototype.mod=System.Int64.prototype.mod,System.UInt64.prototype.neg=System.Int64.prototype.neg,System.UInt64.prototype.inc=System.Int64.prototype.inc,System.UInt64.prototype.dec=System.Int64.prototype.dec,System.UInt64.prototype.sign=System.Int64.prototype.sign,System.UInt64.prototype.clone=System.Int64.prototype.clone,System.UInt64.prototype.ne=System.Int64.prototype.ne,System.UInt64.prototype.neq=System.Int64.prototype.neq,System.UInt64.prototype.eq=System.Int64.prototype.eq,System.UInt64.prototype.lt=System.Int64.prototype.lt,System.UInt64.prototype.lte=System.Int64.prototype.lte,System.UInt64.prototype.gt=System.Int64.prototype.gt,System.UInt64.prototype.gte=System.Int64.prototype.gte,System.UInt64.prototype.equals=System.Int64.prototype.equals,System.UInt64.prototype.equalsT=System.Int64.prototype.equalsT,System.UInt64.prototype.getHashCode=System.Int64.prototype.getHashCode,System.UInt64.prototype.toNumber=System.Int64.prototype.toNumber,System.UInt64.parse=function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("str");if(!/^[+-]?[0-9]+$/.test(e))throw new System.FormatException.$ctor1("Input string was not in a correct format.");var t=new System.UInt64(e);if(t.value.isNegative())throw new System.OverflowException;if(System.String.trimStartZeros(e)!==t.toString())throw new System.OverflowException;return t},System.UInt64.tryParse=function(e,t){try{return e==null||!/^[+-]?[0-9]+$/.test(e)?(t.v=System.UInt64(Bridge.$Long.UZERO),!1):(t.v=new System.UInt64(e),t.v.isNegative()||System.String.trimStartZeros(e)!==t.v.toString()?(t.v=System.UInt64(Bridge.$Long.UZERO),!1):!0)}catch{return t.v=System.UInt64(Bridge.$Long.UZERO),!1}},System.UInt64.min=function(){for(var e=[],t,i=0,r=arguments.length;i<r;i++)e.push(System.UInt64.getValue(arguments[i]));for(i=0,t=e[0];++i<e.length;)e[i].lt(t)&&(t=e[i]);return new System.UInt64(t)},System.UInt64.max=function(){for(var e=[],t,i=0,r=arguments.length;i<r;i++)e.push(System.UInt64.getValue(arguments[i]));for(i=0,t=e[0];++i<e.length;)e[i].gt(t)&&(t=e[i]);return new System.UInt64(t)},System.UInt64.divRem=function(e,t,i){e=System.UInt64(e),t=System.UInt64(t);var r=e.mod(t);return i.v=r,e.sub(r).div(t)},System.UInt64.prototype.toJSON=function(){return this.gt(Bridge.Int.MAX_SAFE_INTEGER)?this.toString():this.toNumber()},System.UInt64.prototype.and=System.Int64.prototype.and,System.UInt64.prototype.not=System.Int64.prototype.not,System.UInt64.prototype.or=System.Int64.prototype.or,System.UInt64.prototype.shl=System.Int64.prototype.shl,System.UInt64.prototype.shr=System.Int64.prototype.shr,System.UInt64.prototype.shru=System.Int64.prototype.shru,System.UInt64.prototype.xor=System.Int64.prototype.xor,System.UInt64.Zero=System.UInt64(Bridge.$Long.UZERO),System.UInt64.MinValue=System.UInt64.Zero,System.UInt64.MaxValue=System.UInt64(Bridge.$Long.MAX_UNSIGNED_VALUE),System.UInt64.precision=20,function(e){function t(h){var g,S,p,A=h.length-1,I="",B=h[0];if(A>0){for(I+=B,g=1;A>g;g++)p=h[g]+"",S=U-p.length,S&&(I+=C(S)),I+=p;B=h[g],p=B+"",S=U-p.length,S&&(I+=C(S))}else if(B===0)return"0";for(;B%10==0;)B/=10;return I+B}function i(h,g,S){if(h!==~~h||g>h||h>S)throw Error(Ge+h)}function r(h,g,S,p){for(var A,I,B,R=h[0];R>=10;R/=10)--g;return--g<0?(g+=U,A=0):(A=Math.ceil((g+1)/U),g%=U),R=me(10,U-g),B=h[A]%R|0,p==null?3>g?(g==0?B=B/100|0:g==1&&(B=B/10|0),I=4>S&&B==99999||S>3&&B==49999||B==5e4||B==0):I=(4>S&&B+1==R||S>3&&B+1==R/2)&&(h[A+1]/R/100|0)==me(10,g-2)-1||(B==R/2||B==0)&&(h[A+1]/R/100|0)==0:4>g?(g==0?B=B/1e3|0:g==1?B=B/100|0:g==2&&(B=B/10|0),I=(p||4>S)&&B==9999||!p&&S>3&&B==4999):I=((p||4>S)&&B+1==R||!p&&S>3&&B+1==R/2)&&(h[A+1]/R/1e3|0)==me(10,g-3)-1,I}function n(h,g,S){for(var p,A,I=[0],B=0,R=h.length;R>B;){for(A=I.length;A--;)I[A]*=g;for(I[0]+=Qe.indexOf(h.charAt(B++)),p=0;p<I.length;p++)I[p]>S-1&&(I[p+1]===void 0&&(I[p+1]=0),I[p+1]+=I[p]/S|0,I[p]%=S)}return I.reverse()}function s(h,g){var S,p,A=g.d.length,I,B;for(32>A?(S=Math.ceil(A/3),p=Math.pow(4,-S).toString()):(S=16,p="2.3283064365386962890625e-10"),h.precision+=S,g=c(h,1,g.times(p),new h(1)),I=S;I--;)B=g.times(g),g=B.times(B).minus(B).times(8).plus(1);return h.precision-=S,g}function o(h,g,S,p){var A,I,B,R,b,v,N,F,V,H=h.constructor;e:if(g!=null){if(F=h.d,!F)return h;for(A=1,R=F[0];R>=10;R/=10)A++;if(I=g-A,0>I)I+=U,B=g,N=F[V=0],b=N/me(10,A-B-1)%10|0;else if(V=Math.ceil((I+1)/U),R=F.length,V>=R){if(!p)break e;for(;R++<=V;)F.push(0);N=b=0,A=1,I%=U,B=I-U+1}else{for(N=R=F[V],A=1;R>=10;R/=10)A++;I%=U,B=I-U+A,b=0>B?0:N/me(10,A-B-1)%10|0}if(p=p||0>g||F[V+1]!==void 0||(0>B?N:N%me(10,A-B-1)),v=4>S?(b||p)&&(S==0||S==(h.s<0?3:2)):b>5||b==5&&(S==4||p||S==6&&(I>0?B>0?N/me(10,A-B):0:F[V-1])%10&1||S==(h.s<0?8:7)),1>g||!F[0])return F.length=0,v?(g-=h.e+1,F[0]=me(10,(U-g%U)%U),h.e=-g||0):F[0]=h.e=0,h;if(I==0?(F.length=V,R=1,V--):(F.length=V+1,R=me(10,U-I),F[V]=B>0?(N/me(10,A-B)%me(10,B)|0)*R:0),v)for(;;){if(V==0){for(I=1,B=F[0];B>=10;B/=10)I++;for(B=F[0]+=R,R=1;B>=10;B/=10)R++;I!=R&&(h.e++,F[0]==Ie&&(F[0]=1));break}if(F[V]+=R,F[V]!=Ie)break;F[V--]=0,R=1}for(I=F.length;F[--I]===0;)F.pop()}return Y&&(h.e>H.maxE?(h.d=null,h.e=NaN):h.e<H.minE&&(h.e=0,h.d=[0])),h}function a(h,g,S){if(!h.isFinite())return M(h);var p,A=h.e,I=t(h.d),B=I.length;return g?(S&&(p=S-B)>0?I=I.charAt(0)+"."+I.slice(1)+C(p):B>1&&(I=I.charAt(0)+"."+I.slice(1)),I=I+(h.e<0?"e":"e+")+h.e):0>A?(I="0."+C(-A-1)+I,S&&(p=S-B)>0&&(I+=C(p))):A>=B?(I+=C(A+1-B),S&&(p=S-A-1)>0&&(I=I+"."+C(p))):((p=A+1)<B&&(I=I.slice(0,p)+"."+I.slice(p)),S&&(p=S-B)>0&&(A+1===B&&(I+="."),I+=C(p))),I}function l(h,g){for(var S=1,p=h[0];p>=10;p/=10)S++;return S+g*U-1}function u(h,g,S){if(g>pi)throw Y=!0,S&&(h.precision=S),Error(It);return o(new h(ze),g,1,!0)}function d(h,g,S){if(g>et)throw Error(It);return o(new h(He),g,S,!0)}function f(h){var g=h.length-1,S=g*U+1;if(g=h[g]){for(;g%10==0;g/=10)S--;for(g=h[0];g>=10;g/=10)S++}return S}function C(h){for(var g="";h--;)g+="0";return g}function E(h,g,S,p){var A,I=new h(1),B=Math.ceil(p/U+4);for(Y=!1;;){if(S%2&&(I=I.times(g),D(I.d,B)&&(A=!0)),S=ce(S/2),S===0){S=I.d.length-1,A&&I.d[S]===0&&++I.d[S];break}g=g.times(g),D(g.d,B)}return Y=!0,I}function T(h){return 1&h.d[h.d.length-1]}function w(h,g,S){for(var p,A=new h(g[0]),I=0;++I<g.length;){if(p=new h(g[I]),!p.s){A=p;break}A[S](p)&&(A=p)}return A}function k(h,g){var S,p,A,I,B,R,b,v=0,N=0,F=0,V=h.constructor,H=V.rounding,X=V.precision;if(!h.d||!h.d[0]||h.e>17)return new V(h.d?h.d[0]?h.s<0?0:1/0:1:h.s?h.s<0?0:h:NaN);for(g==null?(Y=!1,b=X):b=g,R=new V(.03125);h.e>-2;)h=h.times(R),F+=5;for(p=Math.log(me(2,F))/Math.LN10*2+5|0,b+=p,S=I=B=new V(1),V.precision=b;;){if(I=o(I.times(h),b,1),S=S.times(++N),R=B.plus(ee(I,S,b,1)),t(R.d).slice(0,b)===t(B.d).slice(0,b)){for(A=F;A--;)B=o(B.times(B),b,1);if(g!=null)return V.precision=X,B;if(!(3>v&&r(B.d,b-p,H,v)))return o(B,V.precision=X,H,Y=!0);V.precision=b+=10,S=I=R=new V(1),N=0,v++}B=R}}function O(h,g){var S,p,A,I,B,R,b,v,N,F,V,H=1,X=10,j=h,ge=j.d,se=j.constructor,Ee=se.rounding,ie=se.precision;if(j.s<0||!ge||!ge[0]||!j.e&&ge[0]==1&&ge.length==1)return new se(ge&&!ge[0]?-1/0:j.s!=1?NaN:ge?0:j);if(g==null?(Y=!1,N=ie):N=g,se.precision=N+=X,S=t(ge),p=S.charAt(0),!(Math.abs(I=j.e)<15e14))return v=u(se,N+2,ie).times(I+""),j=O(new se(p+"."+S.slice(1)),N-X).plus(v),se.precision=ie,g==null?o(j,ie,Ee,Y=!0):j;for(;7>p&&p!=1||p==1&&S.charAt(1)>3;)j=j.times(h),S=t(j.d),p=S.charAt(0),H++;for(I=j.e,p>1?(j=new se("0."+S),I++):j=new se(p+"."+S.slice(1)),F=j,b=B=j=ee(j.minus(1),j.plus(1),N,1),V=o(j.times(j),N,1),A=3;;){if(B=o(B.times(V),N,1),v=b.plus(ee(B,new se(A),N,1)),t(v.d).slice(0,N)===t(b.d).slice(0,N)){if(b=b.times(2),I!==0&&(b=b.plus(u(se,N+2,ie).times(I+""))),b=ee(b,new se(H),N,1),g!=null)return se.precision=ie,b;if(!r(b.d,N-X,Ee,R))return o(b,se.precision=ie,Ee,Y=!0);se.precision=N+=X,v=B=j=ee(F.minus(1),F.plus(1),N,1),V=o(j.times(j),N,1),A=R=1}b=v,A+=2}}function M(h){return String(h.s*h.s/0)}function P(h,g){var S,p,A;for((S=g.indexOf("."))>-1&&(g=g.replace(".","")),(p=g.search(/e/i))>0?(0>S&&(S=p),S+=+g.slice(p+1),g=g.substring(0,p)):0>S&&(S=g.length),p=0;g.charCodeAt(p)===48;p++);for(A=g.length;g.charCodeAt(A-1)===48;--A);if(g=g.slice(p,A)){if(A-=p,h.e=S=S-p-1,h.d=[],p=(S+1)%U,0>S&&(p+=U),A>p){for(p&&h.d.push(+g.slice(0,p)),A-=U;A>p;)h.d.push(+g.slice(p,p+=U));g=g.slice(p),p=U-g.length}else p-=A;for(;p--;)g+="0";h.d.push(+g),Y&&(h.e>h.constructor.maxE?(h.d=null,h.e=NaN):h.e<h.constructor.minE&&(h.e=0,h.d=[0]))}else h.e=0,h.d=[0];return h}function y(h,g){var S,p,A,I,B,R,b,v,N;if(g==="Infinity"||g==="NaN")return+g||(h.s=NaN),h.e=NaN,h.d=null,h;if(di.test(g))S=16,g=g.toLowerCase();else if(hi.test(g))S=2;else{if(!fi.test(g))throw Error(Ge+g);S=8}for(I=g.search(/p/i),I>0?(b=+g.slice(I+1),g=g.substring(2,I)):g=g.slice(2),I=g.indexOf("."),B=I>=0,p=h.constructor,B&&(g=g.replace(".",""),R=g.length,I=R-I,A=E(p,new p(S),I,2*I)),v=n(g,S,Ie),N=v.length-1,I=N;v[I]===0;--I)v.pop();return 0>I?new p(0*h.s):(h.e=l(v,N),h.d=v,Y=!1,B&&(h=ee(h,A,4*R)),b&&(h=h.times(Math.abs(b)<54?Math.pow(2,b):$e.pow(2,b))),Y=!0,h)}function m(h,g){var S,p=g.d.length;if(3>p)return c(h,2,g,g);S=1.4*Math.sqrt(p),S=S>16?16:0|S,g=g.times(Math.pow(5,-S)),g=c(h,2,g,g);for(var A,I=new h(5),B=new h(16),R=new h(20);S--;)A=g.times(g),g=g.times(I.plus(A.times(B.times(A).minus(R))));return g}function c(h,g,S,p,A){var I,B,R,b,v=1,N=h.precision,F=Math.ceil(N/U);for(Y=!1,b=S.times(S),R=new h(p);;){if(B=ee(R.times(b),new h(g++*g++),N,1),R=A?p.plus(B):p.minus(B),p=ee(B.times(b),new h(g++*g++),N,1),B=R.plus(p),B.d[F]!==void 0){for(I=F;B.d[I]===R.d[I]&&I--;);if(I==-1)break}I=R,R=p,p=B,B=I,v++}return Y=!0,B.d.length=F+1,B}function $(h,g){var S,p=g.s<0,A=d(h,h.precision,1),I=A.times(.5);if(g=g.abs(),g.lte(I))return we=p?4:1,g;if(S=g.divToInt(A),S.isZero())we=p?3:2;else{if(g=g.minus(S.times(A)),g.lte(I))return we=T(S)?p?2:3:p?4:1,g;we=T(S)?p?1:4:p?3:2}return g.minus(A).abs()}function x(h,g,S,p){var A,I,B,R,b,v,N,F,V,H=h.constructor,X=S!==void 0;if(X?(i(S,1,Te),p===void 0?p=H.rounding:i(p,0,8)):(S=H.precision,p=H.rounding),h.isFinite()){for(N=a(h),B=N.indexOf("."),X?(A=2,g==16?S=4*S-3:g==8&&(S=3*S-2)):A=g,B>=0&&(N=N.replace(".",""),V=new H(1),V.e=N.length-B,V.d=n(a(V),10,A),V.e=V.d.length),F=n(N,10,A),I=b=F.length;F[--b]==0;)F.pop();if(F[0]){if(0>B?I--:(h=new H(h),h.d=F,h.e=I,h=ee(h,V,S,p,0,A),F=h.d,I=h.e,v=$t),B=F[S],R=A/2,v=v||F[S+1]!==void 0,v=4>p?(B!==void 0||v)&&(p===0||p===(h.s<0?3:2)):B>R||B===R&&(p===4||v||p===6&&1&F[S-1]||p===(h.s<0?8:7)),F.length=S,v)for(;++F[--S]>A-1;)F[S]=0,S||(++I,F.unshift(1));for(b=F.length;!F[b-1];--b);for(B=0,N="";b>B;B++)N+=Qe.charAt(F[B]);if(X){if(b>1)if(g==16||g==8){for(B=g==16?4:3,--b;b%B;b++)N+="0";for(F=n(N,A,g),b=F.length;!F[b-1];--b);for(B=1,N="1.";b>B;B++)N+=Qe.charAt(F[B])}else N=N.charAt(0)+"."+N.slice(1);N=N+(0>I?"p":"p+")+I}else if(0>I){for(;++I;)N="0"+N;N="0."+N}else if(++I>b)for(I-=b;I--;)N+="0";else b>I&&(N=N.slice(0,I)+"."+N.slice(I))}else N=X?"0p+0":"0";N=(g==16?"0x":g==2?"0b":g==8?"0o":"")+N}else N=M(h);return h.s<0?"-"+N:N}function D(h,g){if(h.length>g)return h.length=g,!0}function G(h){return new this(h).abs()}function q(h){return new this(h).acos()}function z(h){return new this(h).acosh()}function Z(h,g){return new this(h).plus(g)}function te(h){return new this(h).asin()}function oe(h){return new this(h).asinh()}function J(h){return new this(h).atan()}function W(h){return new this(h).atanh()}function le(h,g){h=new this(h),g=new this(g);var S,p=this.precision,A=this.rounding,I=p+4;return h.s&&g.s?h.d||g.d?!g.d||h.isZero()?(S=g.s<0?d(this,p,A):new this(0),S.s=h.s):!h.d||g.isZero()?(S=d(this,I,1).times(.5),S.s=h.s):g.s<0?(this.precision=I,this.rounding=1,S=this.atan(ee(h,g,I,1)),g=d(this,I,1),this.precision=p,this.rounding=A,S=h.s<0?S.minus(g):S.plus(g)):S=this.atan(ee(h,g,I,1)):(S=d(this,I,1).times(g.s>0?.25:.75),S.s=h.s):S=new this(NaN),S}function K(h){return new this(h).cbrt()}function ae(h){return o(h=new this(h),h.e+1,2)}function pe(h){if(!h||typeof h!="object")throw Error(Ue+"Object expected");for(var g,S,p=["precision",1,Te,"rounding",0,8,"toExpNeg",-ke,0,"toExpPos",0,ke,"maxE",0,ke,"minE",-ke,0,"modulo",0,9],A=0;A<p.length;A+=3)if((S=h[g=p[A]])!==void 0){if(!(ce(S)===S&&S>=p[A+1]&&S<=p[A+2]))throw Error(Ge+g+": "+S);this[g]=S}if((S=h[g="crypto"])!==void 0){if(S!==!0&&S!==!1&&S!==0&&S!==1)throw Error(Ge+g+": "+S);if(S){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(Et);this[g]=!0}else this[g]=!1}return this}function ve(h){return new this(h).cos()}function Ae(h){return new this(h).cosh()}function pt(h){function g(I){var B,R,b,v=this;if(!(v instanceof g))return new g(I);if(v.constructor=g,I instanceof g)return v.s=I.s,v.e=I.e,void(v.d=(I=I.d)?I.slice():I);if(b=typeof I,b==="number"){if(I===0)return v.s=0>1/I?-1:1,v.e=0,void(v.d=[0]);if(0>I?(I=-I,v.s=-1):v.s=1,I===~~I&&1e7>I){for(B=0,R=I;R>=10;R/=10)B++;return v.e=B,void(v.d=[I])}return 0*I!=0?(I||(v.s=NaN),v.e=NaN,void(v.d=null)):P(v,I.toString())}if(b!=="string")throw Error(Ge+I);return I.charCodeAt(0)===45?(I=I.slice(1),v.s=-1):v.s=1,gi.test(I)?P(v,I):y(v,I)}var S,p,A;if(g.prototype=L,g.ROUND_UP=0,g.ROUND_DOWN=1,g.ROUND_CEIL=2,g.ROUND_FLOOR=3,g.ROUND_HALF_UP=4,g.ROUND_HALF_DOWN=5,g.ROUND_HALF_EVEN=6,g.ROUND_HALF_CEIL=7,g.ROUND_HALF_FLOOR=8,g.EUCLID=9,g.config=g.set=pe,g.clone=pt,g.abs=G,g.acos=q,g.acosh=z,g.add=Z,g.asin=te,g.asinh=oe,g.atan=J,g.atanh=W,g.atan2=le,g.cbrt=K,g.ceil=ae,g.cos=ve,g.cosh=Ae,g.div=Ht,g.exp=Ut,g.floor=Wt,g.hypot=Kt,g.ln=jt,g.log=Zt,g.log10=Jt,g.log2=Yt,g.max=Xt,g.min=Qt,g.mod=ei,g.mul=ti,g.pow=ii,g.random=ri,g.round=ni,g.sign=si,g.sin=oi,g.sinh=ai,g.sqrt=ui,g.sub=li,g.tan=ci,g.tanh=mi,g.trunc=yi,h===void 0&&(h={}),h)for(A=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],S=0;S<A.length;)h.hasOwnProperty(p=A[S++])||(h[p]=this[p]);return g.config(h),g}function Ht(h,g){return new this(h).div(g)}function Ut(h){return new this(h).exp()}function Wt(h){return o(h=new this(h),h.e+1,3)}function Kt(){var h,g,S=new this(0);for(Y=!1,h=0;h<arguments.length;)if(g=new this(arguments[h++]),g.d)S.d&&(S=S.plus(g.times(g)));else{if(g.s)return Y=!0,new this(1/0);S=g}return Y=!0,S.sqrt()}function jt(h){return new this(h).ln()}function Zt(h,g){return new this(h).log(g)}function Yt(h){return new this(h).log(2)}function Jt(h){return new this(h).log(10)}function Xt(){return w(this,arguments,"lt")}function Qt(){return w(this,arguments,"gt")}function ei(h,g){return new this(h).mod(g)}function ti(h,g){return new this(h).mul(g)}function ii(h,g){return new this(h).pow(g)}function ri(h){var g,S,p,A,I=0,B=new this(1),R=[];if(h===void 0?h=this.precision:i(h,1,Te),p=Math.ceil(h/U),this.crypto)if(crypto.getRandomValues)for(g=crypto.getRandomValues(new Uint32Array(p));p>I;)A=g[I],A>=429e7?g[I]=crypto.getRandomValues(new Uint32Array(1))[0]:R[I++]=A%1e7;else{if(!crypto.randomBytes)throw Error(Et);for(g=crypto.randomBytes(p*=4);p>I;)A=g[I]+(g[I+1]<<8)+(g[I+2]<<16)+((127&g[I+3])<<24),A>=214e7?crypto.randomBytes(4).copy(g,I):(R.push(A%1e7),I+=4);I=p/4}else for(;p>I;)R[I++]=1e7*Math.random()|0;for(p=R[--I],h%=U,p&&h&&(A=me(10,U-h),R[I]=(p/A|0)*A);R[I]===0;I--)R.pop();if(0>I)S=0,R=[0];else{for(S=-1;R[0]===0;S-=U)R.shift();for(p=1,A=R[0];A>=10;A/=10)p++;U>p&&(S-=U-p)}return B.e=S,B.d=R,B}function ni(h){return o(h=new this(h),h.e+1,this.rounding)}function si(h){return h=new this(h),h.d?h.d[0]?h.s:0*h.s:h.s||NaN}function oi(h){return new this(h).sin()}function ai(h){return new this(h).sinh()}function ui(h){return new this(h).sqrt()}function li(h,g){return new this(h).sub(g)}function ci(h){return new this(h).tan()}function mi(h){return new this(h).tanh()}function yi(h){return o(h=new this(h),h.e+1,1)}var $t,Ct,we,ke=9e15,Te=1e9,Qe="0123456789abcdef",ze="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",He="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",$e={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-ke,maxE:ke,crypto:!1},Y=!0,Ue="[DecimalError] ",Ge=Ue+"Invalid argument: ",It=Ue+"Precision limit exceeded",Et=Ue+"crypto unavailable",ce=Math.floor,me=Math.pow,hi=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,di=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,fi=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,gi=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ie=1e7,U=7,Si=9007199254740991,pi=ze.length-1,et=He.length-1,L={},ee;L.absoluteValue=L.abs=function(){var h=new this.constructor(this);return h.s<0&&(h.s=1),o(h)},L.ceil=function(){return o(new this.constructor(this),this.e+1,2)},L.comparedTo=L.cmp=function(h){var g,S,p,A,I=this,B=I.d,R=(h=new I.constructor(h)).d,b=I.s,v=h.s;if(!B||!R)return b&&v?b!==v?b:B===R?0:!B^0>b?1:-1:NaN;if(!B[0]||!R[0])return B[0]?b:R[0]?-v:0;if(b!==v)return b;if(I.e!==h.e)return I.e>h.e^0>b?1:-1;for(p=B.length,A=R.length,g=0,S=A>p?p:A;S>g;++g)if(B[g]!==R[g])return B[g]>R[g]^0>b?1:-1;return p===A?0:p>A^0>b?1:-1},L.cosine=L.cos=function(){var h,g,S=this,p=S.constructor;return S.d?S.d[0]?(h=p.precision,g=p.rounding,p.precision=h+Math.max(S.e,S.sd())+U,p.rounding=1,S=s(p,$(p,S)),p.precision=h,p.rounding=g,o(we==2||we==3?S.neg():S,h,g,!0)):new p(1):new p(NaN)},L.cubeRoot=L.cbrt=function(){var h,g,S,p,A,I,B,R,b,v,N=this,F=N.constructor;if(!N.isFinite()||N.isZero())return new F(N);for(Y=!1,I=N.s*Math.pow(N.s*N,1/3),I&&Math.abs(I)!=1/0?p=new F(I.toString()):(S=t(N.d),h=N.e,(I=(h-S.length+1)%3)&&(S+=I==1||I==-2?"0":"00"),I=Math.pow(S,1/3),h=ce((h+1)/3)-(h%3==(0>h?-1:2)),I==1/0?S="5e"+h:(S=I.toExponential(),S=S.slice(0,S.indexOf("e")+1)+h),p=new F(S),p.s=N.s),B=(h=F.precision)+3;;)if(R=p,b=R.times(R).times(R),v=b.plus(N),p=ee(v.plus(N).times(R),v.plus(b),B+2,1),t(R.d).slice(0,B)===(S=t(p.d)).slice(0,B)){if(S=S.slice(B-3,B+1),S!="9999"&&(A||S!="4999")){+S&&(+S.slice(1)||S.charAt(0)!="5")||(o(p,h+1,1),g=!p.times(p).times(p).eq(N));break}if(!A&&(o(R,h+1,0),R.times(R).times(R).eq(N))){p=R;break}B+=4,A=1}return Y=!0,o(p,h,F.rounding,g)},L.decimalPlaces=L.dp=function(){var h,g=this.d,S=NaN;if(g){if(h=g.length-1,S=(h-ce(this.e/U))*U,h=g[h])for(;h%10==0;h/=10)S--;0>S&&(S=0)}return S},L.dividedBy=L.div=function(h){return ee(this,new this.constructor(h))},L.dividedToIntegerBy=L.divToInt=function(h){var g=this,S=g.constructor;return o(ee(g,new S(h),0,1,1),S.precision,S.rounding)},L.equals=L.eq=function(h){return this.cmp(h)===0},L.floor=function(){return o(new this.constructor(this),this.e+1,3)},L.greaterThan=L.gt=function(h){return this.cmp(h)>0},L.greaterThanOrEqualTo=L.gte=function(h){var g=this.cmp(h);return g==1||g===0},L.hyperbolicCosine=L.cosh=function(){var h,g,S,p,A,I=this,B=I.constructor,R=new B(1),b,v,N;if(!I.isFinite())return new B(I.s?1/0:NaN);if(I.isZero())return R;for(S=B.precision,p=B.rounding,B.precision=S+Math.max(I.e,I.sd())+4,B.rounding=1,A=I.d.length,32>A?(h=Math.ceil(A/3),g=Math.pow(4,-h).toString()):(h=16,g="2.3283064365386962890625e-10"),I=c(B,1,I.times(g),new B(1),!0),v=h,N=new B(8);v--;)b=I.times(I),I=R.minus(b.times(N.minus(b.times(N))));return o(I,B.precision=S,B.rounding=p,!0)},L.hyperbolicSine=L.sinh=function(){var h,g,S,p,A=this,I=A.constructor;if(!A.isFinite()||A.isZero())return new I(A);if(g=I.precision,S=I.rounding,I.precision=g+Math.max(A.e,A.sd())+4,I.rounding=1,p=A.d.length,3>p)A=c(I,2,A,A,!0);else{h=1.4*Math.sqrt(p),h=h>16?16:0|h,A=A.times(Math.pow(5,-h)),A=c(I,2,A,A,!0);for(var B,R=new I(5),b=new I(16),v=new I(20);h--;)B=A.times(A),A=A.times(R.plus(B.times(b.times(B).plus(v))))}return I.precision=g,I.rounding=S,o(A,g,S,!0)},L.hyperbolicTangent=L.tanh=function(){var h,g,S=this,p=S.constructor;return S.isFinite()?S.isZero()?new p(S):(h=p.precision,g=p.rounding,p.precision=h+7,p.rounding=1,ee(S.sinh(),S.cosh(),p.precision=h,p.rounding=g)):new p(S.s)},L.inverseCosine=L.acos=function(){var h,g=this,S=g.constructor,p=g.abs().cmp(1),A=S.precision,I=S.rounding;return p!==-1?p===0?g.isNeg()?d(S,A,I):new S(0):new S(NaN):g.isZero()?d(S,A+4,I).times(.5):(S.precision=A+6,S.rounding=1,g=g.asin(),h=d(S,A+4,I).times(.5),S.precision=A,S.rounding=I,h.minus(g))},L.inverseHyperbolicCosine=L.acosh=function(){var h,g,S=this,p=S.constructor;return S.lte(1)?new p(S.eq(1)?0:NaN):S.isFinite()?(h=p.precision,g=p.rounding,p.precision=h+Math.max(Math.abs(S.e),S.sd())+4,p.rounding=1,Y=!1,S=S.times(S).minus(1).sqrt().plus(S),Y=!0,p.precision=h,p.rounding=g,S.ln()):new p(S)},L.inverseHyperbolicSine=L.asinh=function(){var h,g,S=this,p=S.constructor;return!S.isFinite()||S.isZero()?new p(S):(h=p.precision,g=p.rounding,p.precision=h+2*Math.max(Math.abs(S.e),S.sd())+6,p.rounding=1,Y=!1,S=S.times(S).plus(1).sqrt().plus(S),Y=!0,p.precision=h,p.rounding=g,S.ln())},L.inverseHyperbolicTangent=L.atanh=function(){var h,g,S,p,A=this,I=A.constructor;return A.isFinite()?A.e>=0?new I(A.abs().eq(1)?A.s/0:A.isZero()?A:NaN):(h=I.precision,g=I.rounding,p=A.sd(),Math.max(p,h)<2*-A.e-1?o(new I(A),h,g,!0):(I.precision=S=p-A.e,A=ee(A.plus(1),new I(1).minus(A),S+h,1),I.precision=h+4,I.rounding=1,A=A.ln(),I.precision=h,I.rounding=g,A.times(.5))):new I(NaN)},L.inverseSine=L.asin=function(){var h,g,S,p,A=this,I=A.constructor;return A.isZero()?new I(A):(g=A.abs().cmp(1),S=I.precision,p=I.rounding,g!==-1?g===0?(h=d(I,S+4,p).times(.5),h.s=A.s,h):new I(NaN):(I.precision=S+6,I.rounding=1,A=A.div(new I(1).minus(A.times(A)).sqrt().plus(1)).atan(),I.precision=S,I.rounding=p,A.times(2)))},L.inverseTangent=L.atan=function(){var h,g,S,p,A,I,B,R,b,v=this,N=v.constructor,F=N.precision,V=N.rounding;if(v.isFinite()){if(v.isZero())return new N(v);if(v.abs().eq(1)&&et>=F+4)return B=d(N,F+4,V).times(.25),B.s=v.s,B}else{if(!v.s)return new N(NaN);if(et>=F+4)return B=d(N,F+4,V).times(.5),B.s=v.s,B}for(N.precision=R=F+10,N.rounding=1,S=Math.min(28,R/U+2|0),h=S;h;--h)v=v.div(v.times(v).plus(1).sqrt().plus(1));for(Y=!1,g=Math.ceil(R/U),p=1,b=v.times(v),B=new N(v),A=v;h!==-1;)if(A=A.times(b),I=B.minus(A.div(p+=2)),A=A.times(b),B=I.plus(A.div(p+=2)),B.d[g]!==void 0)for(h=g;B.d[h]===I.d[h]&&h--;);return S&&(B=B.times(2<<S-1)),Y=!0,o(B,N.precision=F,N.rounding=V,!0)},L.isFinite=function(){return!!this.d},L.isInteger=L.isInt=function(){return!!this.d&&ce(this.e/U)>this.d.length-2},L.isNaN=function(){return!this.s},L.isNegative=L.isNeg=function(){return this.s<0},L.isPositive=L.isPos=function(){return this.s>0},L.isZero=function(){return!!this.d&&this.d[0]===0},L.lessThan=L.lt=function(h){return this.cmp(h)<0},L.lessThanOrEqualTo=L.lte=function(h){return this.cmp(h)<1},L.logarithm=L.log=function(h){var g,S,p,A,I,B,R,b,v=this,N=v.constructor,F=N.precision,V=N.rounding,H=5;if(h==null)h=new N(10),g=!0;else{if(h=new N(h),S=h.d,h.s<0||!S||!S[0]||h.eq(1))return new N(NaN);g=h.eq(10)}if(S=v.d,v.s<0||!S||!S[0]||v.eq(1))return new N(S&&!S[0]?-1/0:v.s!=1?NaN:S?0:1/0);if(g)if(S.length>1)I=!0;else{for(A=S[0];A%10==0;)A/=10;I=A!==1}if(Y=!1,R=F+H,B=O(v,R),p=g?u(N,R+10):O(h,R),b=ee(B,p,R,1),r(b.d,A=F,V))do if(R+=10,B=O(v,R),p=g?u(N,R+10):O(h,R),b=ee(B,p,R,1),!I){+t(b.d).slice(A+1,A+15)+1==1e14&&(b=o(b,F+1,0));break}while(r(b.d,A+=10,V));return Y=!0,o(b,F,V)},L.minus=L.sub=function(h){var g,S,p,A,I,B,R,b,v,N,F,V,H=this,X=H.constructor;if(h=new X(h),!H.d||!h.d)return H.s&&h.s?H.d?h.s=-h.s:h=new X(h.d||H.s!==h.s?H:NaN):h=new X(NaN),h;if(H.s!=h.s)return h.s=-h.s,H.plus(h);if(v=H.d,V=h.d,R=X.precision,b=X.rounding,!v[0]||!V[0]){if(V[0])h.s=-h.s;else{if(!v[0])return new X(b===3?-0:0);h=new X(H)}return Y?o(h,R,b):h}if(S=ce(h.e/U),N=ce(H.e/U),v=v.slice(),I=N-S){for(F=0>I,F?(g=v,I=-I,B=V.length):(g=V,S=N,B=v.length),p=Math.max(Math.ceil(R/U),B)+2,I>p&&(I=p,g.length=1),g.reverse(),p=I;p--;)g.push(0);g.reverse()}else{for(p=v.length,B=V.length,F=B>p,F&&(B=p),p=0;B>p;p++)if(v[p]!=V[p]){F=v[p]<V[p];break}I=0}for(F&&(g=v,v=V,V=g,h.s=-h.s),B=v.length,p=V.length-B;p>0;--p)v[B++]=0;for(p=V.length;p>I;){if(v[--p]<V[p]){for(A=p;A&&v[--A]===0;)v[A]=Ie-1;--v[A],v[p]+=Ie}v[p]-=V[p]}for(;v[--B]===0;)v.pop();for(;v[0]===0;v.shift())--S;return v[0]?(h.d=v,h.e=l(v,S),Y?o(h,R,b):h):new X(b===3?-0:0)},L.modulo=L.mod=function(h){var g,S=this,p=S.constructor;return h=new p(h),!S.d||!h.s||h.d&&!h.d[0]?new p(NaN):!h.d||S.d&&!S.d[0]?o(new p(S),p.precision,p.rounding):(Y=!1,p.modulo==9?(g=ee(S,h.abs(),0,3,1),g.s*=h.s):g=ee(S,h,0,p.modulo,1),g=g.times(h),Y=!0,S.minus(g))},L.naturalExponential=L.exp=function(){return k(this)},L.naturalLogarithm=L.ln=function(){return O(this)},L.negated=L.neg=function(){var h=new this.constructor(this);return h.s=-h.s,o(h)},L.plus=L.add=function(h){var g,S,p,A,I,B,R,b,v,N,F=this,V=F.constructor;if(h=new V(h),!F.d||!h.d)return F.s&&h.s?F.d||(h=new V(h.d||F.s===h.s?F:NaN)):h=new V(NaN),h;if(F.s!=h.s)return h.s=-h.s,F.minus(h);if(v=F.d,N=h.d,R=V.precision,b=V.rounding,!v[0]||!N[0])return N[0]||(h=new V(F)),Y?o(h,R,b):h;if(I=ce(F.e/U),p=ce(h.e/U),v=v.slice(),A=I-p){for(0>A?(S=v,A=-A,B=N.length):(S=N,p=I,B=v.length),I=Math.ceil(R/U),B=I>B?I+1:B+1,A>B&&(A=B,S.length=1),S.reverse();A--;)S.push(0);S.reverse()}for(B=v.length,A=N.length,0>B-A&&(A=B,S=N,N=v,v=S),g=0;A;)g=(v[--A]=v[A]+N[A]+g)/Ie|0,v[A]%=Ie;for(g&&(v.unshift(g),++p),B=v.length;v[--B]==0;)v.pop();return h.d=v,h.e=l(v,p),Y?o(h,R,b):h},L.precision=L.sd=function(h){var g,S=this;if(h!==void 0&&h!==!!h&&h!==1&&h!==0)throw Error(Ge+h);return S.d?(g=f(S.d),h&&S.e+1>g&&(g=S.e+1)):g=NaN,g},L.round=function(){var h=this,g=h.constructor;return o(new g(h),h.e+1,g.rounding)},L.sine=L.sin=function(){var h,g,S=this,p=S.constructor;return S.isFinite()?S.isZero()?new p(S):(h=p.precision,g=p.rounding,p.precision=h+Math.max(S.e,S.sd())+U,p.rounding=1,S=m(p,$(p,S)),p.precision=h,p.rounding=g,o(we>2?S.neg():S,h,g,!0)):new p(NaN)},L.squareRoot=L.sqrt=function(){var h,g,S,p,A,I,B=this,R=B.d,b=B.e,v=B.s,N=B.constructor;if(v!==1||!R||!R[0])return new N(!v||0>v&&(!R||R[0])?NaN:R?B:1/0);for(Y=!1,v=Math.sqrt(+B),v==0||v==1/0?(g=t(R),(g.length+b)%2==0&&(g+="0"),v=Math.sqrt(g),b=ce((b+1)/2)-(0>b||b%2),v==1/0?g="1e"+b:(g=v.toExponential(),g=g.slice(0,g.indexOf("e")+1)+b),p=new N(g)):p=new N(v.toString()),S=(b=N.precision)+3;;)if(I=p,p=I.plus(ee(B,I,S+2,1)).times(.5),t(I.d).slice(0,S)===(g=t(p.d)).slice(0,S)){if(g=g.slice(S-3,S+1),g!="9999"&&(A||g!="4999")){+g&&(+g.slice(1)||g.charAt(0)!="5")||(o(p,b+1,1),h=!p.times(p).eq(B));break}if(!A&&(o(I,b+1,0),I.times(I).eq(B))){p=I;break}S+=4,A=1}return Y=!0,o(p,b,N.rounding,h)},L.tangent=L.tan=function(){var h,g,S=this,p=S.constructor;return S.isFinite()?S.isZero()?new p(S):(h=p.precision,g=p.rounding,p.precision=h+10,p.rounding=1,S=S.sin(),S.s=1,S=ee(S,new p(1).minus(S.times(S)).sqrt(),h+10,0),p.precision=h,p.rounding=g,o(we==2||we==4?S.neg():S,h,g,!0)):new p(NaN)},L.times=L.mul=function(h){var g,S,p,A,I,B,R,b,v,N=this,F=N.constructor,V=N.d,H=(h=new F(h)).d;if(h.s*=N.s,!(V&&V[0]&&H&&H[0]))return new F(!h.s||V&&!V[0]&&!H||H&&!H[0]&&!V?NaN:V&&H?0*h.s:h.s/0);for(S=ce(N.e/U)+ce(h.e/U),b=V.length,v=H.length,v>b&&(I=V,V=H,H=I,B=b,b=v,v=B),I=[],B=b+v,p=B;p--;)I.push(0);for(p=v;--p>=0;){for(g=0,A=b+p;A>p;)R=I[A]+H[p]*V[A-p-1]+g,I[A--]=R%Ie|0,g=R/Ie|0;I[A]=(I[A]+g)%Ie|0}for(;!I[--B];)I.pop();for(g?++S:I.shift(),p=I.length;!I[--p];)I.pop();return h.d=I,h.e=l(I,S),Y?o(h,F.precision,F.rounding):h},L.toBinary=function(h,g){return x(this,2,h,g)},L.toDecimalPlaces=L.toDP=function(h,g){var S=this,p=S.constructor;return S=new p(S),h===void 0?S:(i(h,0,Te),g===void 0?g=p.rounding:i(g,0,8),o(S,h+S.e+1,g))},L.toExponential=function(h,g){var S,p=this,A=p.constructor;return h===void 0?S=a(p,!0):(i(h,0,Te),g===void 0?g=A.rounding:i(g,0,8),p=o(new A(p),h+1,g),S=a(p,!0,h+1)),p.isNeg()&&!p.isZero()?"-"+S:S},L.toFixed=function(h,g){var S,p,A=this,I=A.constructor;return h===void 0?S=a(A):(i(h,0,Te),g===void 0?g=I.rounding:i(g,0,8),p=o(new I(A),h+A.e+1,g),S=a(p,!1,h+p.e+1)),A.isNeg()&&!A.isZero()?"-"+S:S},L.toFraction=function(h){var g,S,p,A,I,B,R,b,v,N,F,V,H=this,X=H.d,j=H.constructor;if(!X)return new j(H);if(v=S=new j(1),p=b=new j(0),g=new j(p),I=g.e=f(X)-H.e-1,B=I%U,g.d[0]=me(10,0>B?U+B:B),h==null)h=I>0?g:v;else{if(R=new j(h),!R.isInt()||R.lt(v))throw Error(Ge+R);h=R.gt(g)?I>0?g:v:R}for(Y=!1,R=new j(t(X)),N=j.precision,j.precision=I=X.length*U*2;F=ee(R,g,0,1,1),A=S.plus(F.times(p)),A.cmp(h)!=1;)S=p,p=A,A=v,v=b.plus(F.times(A)),b=A,A=g,g=R.minus(F.times(A)),R=A;return A=ee(h.minus(S),p,0,1,1),b=b.plus(A.times(v)),S=S.plus(A.times(p)),b.s=v.s=H.s,V=ee(v,p,I,1).minus(H).abs().cmp(ee(b,S,I,1).minus(H).abs())<1?[v,p]:[b,S],j.precision=N,Y=!0,V},L.toHexadecimal=L.toHex=function(h,g){return x(this,16,h,g)},L.toNearest=function(h,g){var S=this,p=S.constructor;if(S=new p(S),h==null){if(!S.d)return S;h=new p(1),g=p.rounding}else{if(h=new p(h),g!==void 0&&i(g,0,8),!S.d)return h.s?S:h;if(!h.d)return h.s&&(h.s=S.s),h}return h.d[0]?(Y=!1,4>g&&(g=[4,5,7,8][g]),S=ee(S,h,0,g,1).times(h),Y=!0,o(S)):(h.s=S.s,S=h),S},L.toNumber=function(){return+this},L.toOctal=function(h,g){return x(this,8,h,g)},L.toPower=L.pow=function(h){var g,S,p,A,I,B,R,b=this,v=b.constructor,N=+(h=new v(h));if(!(b.d&&h.d&&b.d[0]&&h.d[0]))return new v(me(+b,N));if(b=new v(b),b.eq(1))return b;if(p=v.precision,I=v.rounding,h.eq(1))return o(b,p,I);if(g=ce(h.e/U),S=h.d.length-1,R=g>=S,B=b.s,R){if((S=0>N?-N:N)<=Si)return A=E(v,b,S,p),h.s<0?new v(1).div(A):o(A,p,I)}else if(0>B)return new v(NaN);return B=0>B&&1&h.d[Math.max(g,S)]?-1:1,S=me(+b,N),g=S!=0&&isFinite(S)?new v(S+"").e:ce(N*(Math.log("0."+t(b.d))/Math.LN10+b.e+1)),g>v.maxE+1||g<v.minE-1?new v(g>0?B/0:0):(Y=!1,v.rounding=b.s=1,S=Math.min(12,(g+"").length),A=k(h.times(O(b,p+S)),p),A=o(A,p+5,1),r(A.d,p,I)&&(g=p+10,A=o(k(h.times(O(b,g+S)),g),g+5,1),+t(A.d).slice(p+1,p+15)+1==1e14&&(A=o(A,p+1,0))),A.s=B,Y=!0,v.rounding=I,o(A,p,I))},L.toPrecision=function(h,g){var S,p=this,A=p.constructor;return h===void 0?S=a(p,p.e<=A.toExpNeg||p.e>=A.toExpPos):(i(h,1,Te),g===void 0?g=A.rounding:i(g,0,8),p=o(new A(p),h,g),S=a(p,h<=p.e||p.e<=A.toExpNeg,h)),p.isNeg()&&!p.isZero()?"-"+S:S},L.toSignificantDigits=L.toSD=function(h,g){var S=this,p=S.constructor;return h===void 0?(h=p.precision,g=p.rounding):(i(h,1,Te),g===void 0?g=p.rounding:i(g,0,8)),o(new p(S),h,g)},L.toString=function(){var h=this,g=h.constructor,S=a(h,h.e<=g.toExpNeg||h.e>=g.toExpPos);return h.isNeg()&&!h.isZero()?"-"+S:S},L.truncated=L.trunc=function(){return o(new this.constructor(this),this.e+1,1)},L.valueOf=L.toJSON=function(){var h=this,g=h.constructor,S=a(h,h.e<=g.toExpNeg||h.e>=g.toExpPos);return h.isNeg()?"-"+S:S},ee=function(){function h(p,A,I){var B,R=0,b=p.length;for(p=p.slice();b--;)B=p[b]*A+R,p[b]=B%I|0,R=B/I|0;return R&&p.unshift(R),p}function g(p,A,I,B){var R,b;if(I!=B)b=I>B?1:-1;else for(R=b=0;I>R;R++)if(p[R]!=A[R]){b=p[R]>A[R]?1:-1;break}return b}function S(p,A,I,B){for(var R=0;I--;)p[I]-=R,R=p[I]<A[I]?1:0,p[I]=R*B+p[I]-A[I];for(;!p[0]&&p.length>1;)p.shift()}return function(p,A,I,B,R,b){var v,N,F,V,H,X,j,ge,se,Ee,ie,ye,We,be,tt,Ke,Ve,it,xe,je,Ze=p.constructor,rt=p.s==A.s?1:-1,he=p.d,ne=A.d;if(!(he&&he[0]&&ne&&ne[0]))return new Ze(p.s&&A.s&&(he?!ne||he[0]!=ne[0]:ne)?he&&he[0]==0||!ne?0*rt:rt/0:NaN);for(b?(H=1,N=p.e-A.e):(b=Ie,H=U,N=ce(p.e/H)-ce(A.e/H)),xe=ne.length,Ve=he.length,se=new Ze(rt),Ee=se.d=[],F=0;ne[F]==(he[F]||0);F++);if(ne[F]>(he[F]||0)&&N--,I==null?(be=I=Ze.precision,B=Ze.rounding):be=R?I+(p.e-A.e)+1:I,0>be)Ee.push(1),X=!0;else{if(be=be/H+2|0,F=0,xe==1){for(V=0,ne=ne[0],be++;(Ve>F||V)&&be--;F++)tt=V*b+(he[F]||0),Ee[F]=tt/ne|0,V=tt%ne|0;X=V||Ve>F}else{for(V=b/(ne[0]+1)|0,V>1&&(ne=h(ne,V,b),he=h(he,V,b),xe=ne.length,Ve=he.length),Ke=xe,ie=he.slice(0,xe),ye=ie.length;xe>ye;)ie[ye++]=0;je=ne.slice(),je.unshift(0),it=ne[0],ne[1]>=b/2&&++it;do V=0,v=g(ne,ie,xe,ye),0>v?(We=ie[0],xe!=ye&&(We=We*b+(ie[1]||0)),V=We/it|0,V>1?(V>=b&&(V=b-1),j=h(ne,V,b),ge=j.length,ye=ie.length,v=g(j,ie,ge,ye),v==1&&(V--,S(j,ge>xe?je:ne,ge,b))):(V==0&&(v=V=1),j=ne.slice()),ge=j.length,ye>ge&&j.unshift(0),S(ie,j,ye,b),v==-1&&(ye=ie.length,v=g(ne,ie,xe,ye),1>v&&(V++,S(ie,ye>xe?je:ne,ye,b))),ye=ie.length):v===0&&(V++,ie=[0]),Ee[F++]=V,v&&ie[0]?ie[ye++]=he[Ke]||0:(ie=[he[Ke]],ye=1);while((Ke++<Ve||ie[0]!==void 0)&&be--);X=ie[0]!==void 0}Ee[0]||Ee.shift()}if(H==1)se.e=N,$t=X;else{for(F=1,V=Ee[0];V>=10;V/=10)F++;se.e=F+N*H-1,o(se,R?I+se.e+1:I,B,X)}return se}}(),$e=pt($e),ze=new $e(ze),He=new $e(He),Bridge.$Decimal=$e,typeof define=="function"&&define.amd?define("decimal.js",function(){return $e}):typeof module<"u"&&module.exports?module.exports=$e.default=$e.Decimal=$e:(e||(e=typeof self<"u"&&self&&self.self==self?self:Function("return this")()),Ct=e.Decimal,$e.noConflict=function(){return e.Decimal=Ct,$e})}(Bridge.global),System.Decimal=function(e,t,i){var r,n,s;if(this.constructor!==System.Decimal)return new System.Decimal(e,t,i);if(e==null&&(e=0),Bridge.isNumber(t)?(this.$precision=t,t=void 0):this.$precision=0,typeof e=="string"){if(t=t||System.Globalization.CultureInfo.getCurrentCulture(),r=t&&t.getFormat(System.Globalization.NumberFormatInfo),r&&r.numberDecimalSeparator!=="."&&(e=e.replace(r.numberDecimalSeparator,".")),!/^\s*[+-]?(\d+|\d+\.|\d*\.\d+)((e|E)[+-]?\d+)?\s*$/.test(e)&&!/^\s*(\d+|\d+\.|\d*\.\d+)((e|E)[+-]?\d+)?[+-]\s*$/.test(e))throw new System.FormatException;e=e.replace(/\s/g,""),/[+-]$/.test(e)?(s=e.length-1,e=e.indexOf("-",s)===s?e.replace(/(.*)(-)$/,"$2$1"):e.substr(0,s)):e.lastIndexOf("+",0)===0&&(e=e.substr(1)),!this.$precision&&(n=e.indexOf("."))>=0&&(this.$precision=e.length-n-1)}if(isNaN(e)||System.Decimal.MaxValue&&typeof e=="number"&&(System.Decimal.MinValue.gt(e)||System.Decimal.MaxValue.lt(e)))throw new System.OverflowException;if(i&&i.precision&&typeof e=="number"&&Number.isFinite(e)){var o=Bridge.Int.trunc(e),a=(o+"").length,l=i.precision-a;l<0&&(l=0),e=e.toFixed(l)}e instanceof System.Decimal&&(this.$precision=e.$precision),this.value=System.Decimal.getValue(e)},System.Decimal.$number=!0,System.Decimal.$$name="System.Decimal",System.Decimal.prototype.$$name="System.Decimal",System.Decimal.$kind="struct",System.Decimal.prototype.$kind="struct",System.Decimal.$$inherits=[],Bridge.Class.addExtend(System.Decimal,[System.IComparable,System.IFormattable,System.IComparable$1(System.Decimal),System.IEquatable$1(System.Decimal)]),System.Decimal.$is=function(e){return e instanceof System.Decimal},System.Decimal.getDefaultValue=function(){return new System.Decimal(0)},System.Decimal.getValue=function(e){return Bridge.hasValue(e)?e instanceof System.Decimal?e.value:e instanceof System.Int64||e instanceof System.UInt64?new Bridge.$Decimal(e.toString()):new Bridge.$Decimal(e):this.getDefaultValue()},System.Decimal.create=function(e){return Bridge.hasValue(e)?e instanceof System.Decimal?e:new System.Decimal(e):null},System.Decimal.lift=function(e){return e==null?null:System.Decimal.create(e)},System.Decimal.prototype.toString=function(e,t){return Bridge.Int.format(this,e||"G",t)},System.Decimal.prototype.toFloat=function(){return this.value.toNumber()},System.Decimal.prototype.toJSON=function(){return this.value.toNumber()},System.Decimal.prototype.format=function(e,t){return Bridge.Int.format(this,e,t)},System.Decimal.prototype.decimalPlaces=function(){return this.value.decimalPlaces()},System.Decimal.prototype.dividedToIntegerBy=function(t){var t=new System.Decimal(this.value.dividedToIntegerBy(System.Decimal.getValue(t)),this.$precision);return t.$precision=Math.max(t.value.decimalPlaces(),this.$precision),t},System.Decimal.prototype.exponential=function(){return new System.Decimal(this.value.exponential(),this.$precision)},System.Decimal.prototype.abs=function(){return new System.Decimal(this.value.abs(),this.$precision)},System.Decimal.prototype.floor=function(){return new System.Decimal(this.value.floor())},System.Decimal.prototype.ceil=function(){return new System.Decimal(this.value.ceil())},System.Decimal.prototype.trunc=function(){return new System.Decimal(this.value.trunc())},System.Decimal.round=function(e,t){var i,r;return e=System.Decimal.create(e),i=Bridge.$Decimal.rounding,Bridge.$Decimal.rounding=t,r=new System.Decimal(e.value.round()),Bridge.$Decimal.rounding=i,r},System.Decimal.toDecimalPlaces=function(e,t,i){return e=System.Decimal.create(e),new System.Decimal(e.value.toDecimalPlaces(t,i))},System.Decimal.prototype.compareTo=function(e){return this.value.comparedTo(System.Decimal.getValue(e))},System.Decimal.prototype.add=function(e){var t=new System.Decimal(this.value.plus(System.Decimal.getValue(e)));return t.$precision=Math.max(t.value.decimalPlaces(),Math.max(e.$precision||0,this.$precision)),t},System.Decimal.prototype.sub=function(e){var t=new System.Decimal(this.value.minus(System.Decimal.getValue(e)));return t.$precision=Math.max(t.value.decimalPlaces(),Math.max(e.$precision||0,this.$precision)),t},System.Decimal.prototype.isZero=function(){return this.value.isZero},System.Decimal.prototype.mul=function(e){var t=new System.Decimal(this.value.times(System.Decimal.getValue(e)));return t.$precision=Math.max(t.value.decimalPlaces(),Math.max(e.$precision||0,this.$precision)),t},System.Decimal.prototype.div=function(e){var t=new System.Decimal(this.value.dividedBy(System.Decimal.getValue(e)));return t.$precision=Math.max(t.value.decimalPlaces(),Math.max(e.$precision||0,this.$precision)),t},System.Decimal.prototype.mod=function(e){var t=new System.Decimal(this.value.modulo(System.Decimal.getValue(e)));return t.$precision=Math.max(t.value.decimalPlaces(),Math.max(e.$precision||0,this.$precision)),t},System.Decimal.prototype.neg=function(){return new System.Decimal(this.value.negated(),this.$precision)},System.Decimal.prototype.inc=function(){return new System.Decimal(this.value.plus(System.Decimal.getValue(1)),this.$precision)},System.Decimal.prototype.dec=function(){return new System.Decimal(this.value.minus(System.Decimal.getValue(1)),this.$precision)},System.Decimal.prototype.sign=function(){return this.value.isZero()?0:this.value.isNegative()?-1:1},System.Decimal.prototype.clone=function(){return new System.Decimal(this,this.$precision)},System.Decimal.prototype.ne=function(e){return!!this.compareTo(e)},System.Decimal.prototype.lt=function(e){return this.compareTo(e)<0},System.Decimal.prototype.lte=function(e){return this.compareTo(e)<=0},System.Decimal.prototype.gt=function(e){return this.compareTo(e)>0},System.Decimal.prototype.gte=function(e){return this.compareTo(e)>=0},System.Decimal.prototype.equals=function(e){return e instanceof System.Decimal||typeof e=="number"?!this.compareTo(e):!1},System.Decimal.prototype.equalsT=function(e){return!this.compareTo(e)},System.Decimal.prototype.getHashCode=function(){for(var e=this.sign()*397+this.value.e|0,t=0;t<this.value.d.length;t++)e=e*397+this.value.d[t]|0;return e},System.Decimal.toInt=function(e,t){var i,r,n;if(!e)return null;if(t){if(t===System.Int64){if(i=e.value.trunc().toString(),r=new System.Int64(i),i!==r.value.toString())throw new System.OverflowException;return r}if(t===System.UInt64){if(e.value.isNegative())throw new System.OverflowException;if(i=e.value.trunc().toString(),r=new System.UInt64(i),i!==r.value.toString())throw new System.OverflowException;return r}return Bridge.Int.check(Bridge.Int.trunc(e.value.toNumber()),t)}if(n=Bridge.Int.trunc(System.Decimal.getValue(e).toNumber()),!Bridge.Int.$is(n))throw new System.OverflowException;return n},System.Decimal.tryParse=function(e,t,i){try{return i.v=new System.Decimal(e,t),!0}catch{return i.v=new System.Decimal(0),!1}},System.Decimal.toFloat=function(e){return e?System.Decimal.getValue(e).toNumber():null},System.Decimal.setConfig=function(e){Bridge.$Decimal.config(e)},System.Decimal.min=function(){for(var e=[],t,i,r=0,n=arguments.length;r<n;r++)e.push(System.Decimal.getValue(arguments[r]));for(t=Bridge.$Decimal.min.apply(Bridge.$Decimal,e),r=0;r<arguments.length;r++)t.eq(e[r])&&(i=arguments[r].$precision);return new System.Decimal(t,i)},System.Decimal.max=function(){for(var e=[],t,i,r=0,n=arguments.length;r<n;r++)e.push(System.Decimal.getValue(arguments[r]));for(t=Bridge.$Decimal.max.apply(Bridge.$Decimal,e),r=0;r<arguments.length;r++)t.eq(e[r])&&(i=arguments[r].$precision);return new System.Decimal(t,i)},System.Decimal.random=function(e){return new System.Decimal(Bridge.$Decimal.random(e))},System.Decimal.exp=function(e){return new System.Decimal(System.Decimal.getValue(e).exp())},System.Decimal.exp=function(e){return new System.Decimal(System.Decimal.getValue(e).exp())},System.Decimal.ln=function(e){return new System.Decimal(System.Decimal.getValue(e).ln())},System.Decimal.log=function(e,t){return new System.Decimal(System.Decimal.getValue(e).log(t))},System.Decimal.pow=function(e,t){return new System.Decimal(System.Decimal.getValue(e).pow(t))},System.Decimal.sqrt=function(e){return new System.Decimal(System.Decimal.getValue(e).sqrt())},System.Decimal.prototype.isFinite=function(){return this.value.isFinite()},System.Decimal.prototype.isInteger=function(){return this.value.isInteger()},System.Decimal.prototype.isNaN=function(){return this.value.isNaN()},System.Decimal.prototype.isNegative=function(){return this.value.isNegative()},System.Decimal.prototype.isZero=function(){return this.value.isZero()},System.Decimal.prototype.log=function(e){var t=new System.Decimal(this.value.log(e));return t.$precision=Math.max(t.value.decimalPlaces(),this.$precision),t},System.Decimal.prototype.ln=function(){var e=new System.Decimal(this.value.ln());return e.$precision=Math.max(e.value.decimalPlaces(),this.$precision),e},System.Decimal.prototype.precision=function(){return this.value.precision()},System.Decimal.prototype.round=function(){var e=Bridge.$Decimal.rounding,t;return Bridge.$Decimal.rounding=6,t=new System.Decimal(this.value.round()),Bridge.$Decimal.rounding=e,t},System.Decimal.prototype.sqrt=function(){var e=new System.Decimal(this.value.sqrt());return e.$precision=Math.max(e.value.decimalPlaces(),this.$precision),e},System.Decimal.prototype.toDecimalPlaces=function(e,t){return new System.Decimal(this.value.toDecimalPlaces(e,t))},System.Decimal.prototype.toExponential=function(e,t){return this.value.toExponential(e,t)},System.Decimal.prototype.toFixed=function(e,t){return this.value.toFixed(e,t)},System.Decimal.prototype.pow=function(e){var t=new System.Decimal(this.value.pow(e));return t.$precision=Math.max(t.value.decimalPlaces(),this.$precision),t},System.Decimal.prototype.toPrecision=function(e,t){return this.value.toPrecision(e,t)},System.Decimal.prototype.toSignificantDigits=function(e,t){var i=new System.Decimal(this.value.toSignificantDigits(e,t));return i.$precision=Math.max(i.value.decimalPlaces(),this.$precision),i},System.Decimal.prototype.valueOf=function(){return this.value.valueOf()},System.Decimal.prototype._toFormat=function(e,t,i){var r=this.value;if(!r.isFinite())return r.toString();var n,s=r.isNeg(),o=i.groupSeparator,a=+i.groupSize,l=+i.secondaryGroupSize,u=r.toFixed(e,t).split("."),d=u[0],f=u[1],C=s?d.slice(1):d,E=C.length;if(l&&(E-=(n=a,a=l,l=n)),a>0&&E>0){for(n=E%a||a,d=C.substr(0,n);n<E;n+=a)d+=o+C.substr(n,a);l>0&&(d+=o+C.slice(n)),s&&(d="-"+d)}return f?d+i.decimalSeparator+((l=+i.fractionGroupSize)?f.replace(new RegExp("\\d{"+l+"}\\B","g"),"$&"+i.fractionGroupSeparator):f):d},System.Decimal.prototype.toFormat=function(e,t,i){var r={decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:"\xA0",fractionGroupSize:0},n,s;return i&&!i.getFormat?(r=Bridge.merge(r,i),n=this._toFormat(e,t,r)):(i=i||System.Globalization.CultureInfo.getCurrentCulture(),s=i&&i.getFormat(System.Globalization.NumberFormatInfo),s&&(r.decimalSeparator=s.numberDecimalSeparator,r.groupSeparator=s.numberGroupSeparator,r.groupSize=s.numberGroupSizes[0]),n=this._toFormat(e,t,r)),n},System.Decimal.prototype.getBytes=function(){var e=this.value.s,t=this.value.e,i=this.value.d,r=System.Array.init(23,0,System.Byte),n;if(r[0]=e&255,r[1]=t,i&&i.length>0)for(r[2]=i.length*4,n=0;n<i.length;n++)r[n*4+3]=i[n]&255,r[n*4+4]=i[n]>>8&255,r[n*4+5]=i[n]>>16&255,r[n*4+6]=i[n]>>24&255;else r[2]=0;return r},System.Decimal.fromBytes=function(e){var t=new System.Decimal(0),i=Bridge.Int.sxb(e[0]&255),r=e[1],n=e[2],s=[],o;if(t.value.s=i,t.value.e=r,n>0)for(o=3;o<n+3;)s.push(e[o]|e[o+1]<<8|e[o+2]<<16|e[o+3]<<24),o=o+4;return t.value.d=s,t},Bridge.$Decimal.config({precision:29}),System.Decimal.Zero=System.Decimal(0),System.Decimal.One=System.Decimal(1),System.Decimal.MinusOne=System.Decimal(-1),System.Decimal.MinValue=System.Decimal("-79228162514264337593543950335"),System.Decimal.MaxValue=System.Decimal("79228162514264337593543950335"),System.Decimal.precision=29,Bridge.define("System.DateTime",{inherits:function(){return[System.IComparable,System.IComparable$1(System.DateTime),System.IEquatable$1(System.DateTime),System.IFormattable]},$kind:"struct",fields:{kind:0},methods:{$clone:function(e){return this}},statics:{$minTicks:null,$maxTicks:null,$minOffset:null,$maxOffset:null,$default:null,$min:null,$max:null,TicksPerDay:System.Int64(864e9),DaysTo1970:719162,YearDaysByMonth:[0,31,59,90,120,151,181,212,243,273,304,334],getMinTicks:function(){return this.$minTicks===null&&(this.$minTicks=System.Int64(0)),this.$minTicks},getMaxTicks:function(){return this.$maxTicks===null&&(this.$maxTicks=System.Int64("3652059").mul(this.TicksPerDay).sub(1)),this.$maxTicks},$getMinOffset:function(){return this.$minOffset===null&&(this.$minOffset=System.Int64(621355968e9)),this.$minOffset},$getMaxOffset:function(){return this.$maxOffset===null&&(this.$maxOffset=this.getMaxTicks().sub(this.$getMinOffset())),this.$maxOffset},$is:function(e){return Bridge.isDate(e)},getDefaultValue:function(){return this.$default===null&&(this.$default=this.getMinValue()),this.$default},getMinValue:function(){if(this.$min===null){var e=new Date(1,0,1,0,0,0,0);e.setFullYear(1),e.setSeconds(0),e.kind=0,e.ticks=this.getMinTicks(),this.$min=e}return this.$min},getMaxValue:function(){if(this.$max===null){var e=new Date(9999,11,31,23,59,59,999);e.kind=0,e.ticks=this.getMaxTicks(),this.$max=e}return this.$max},$getTzOffset:function(e){return System.Int64(e.getTimezoneOffset()).mul(6e8)},toLocalTime:function(e,t){var i=e.kind!==void 0?e.kind:0,r=this.getTicks(e),n;if(i===2)return n=new Date(e.getTime()),n.kind=2,n.ticks=r,n;if(n=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())),n.kind=2,n.ticks=r,n.ticks.gt(this.getMaxTicks())||n.ticks.lt(0)){if(t&&t===!0)throw new System.ArgumentException.$ctor1("Specified argument was out of the range of valid values.");n=this.create$2(r.add(this.$getTzOffset(n)),2)}return n},toUniversalTime:function(e){var t=e.kind!==void 0?e.kind:0,i=this.getTicks(e),r;return t===1?(r=new Date(e.getTime()),r.kind=1,r.ticks=i,r):(r=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())),r.kind=1,r.ticks=i,(r.ticks.gt(this.getMaxTicks())||r.ticks.lt(0))&&(r=this.create$2(i.add(this.$getTzOffset(r)),1)),r)},getTicks:function(e){if(e.ticks)return e.ticks;var t=e.kind!==void 0?e.kind:0;return e.ticks=t===1?System.Int64(e.getTime()).mul(1e4).add(this.$getMinOffset()):System.Int64(e.getTime()).mul(1e4).add(this.$getMinOffset()).sub(this.$getTzOffset(e)),e.ticks},create:function(e,t,i,r,n,s,o,a){e=e!==void 0?e:new Date().getFullYear(),t=t!==void 0?t:new Date().getMonth()+1,i=i!==void 0?i:1,r=r!==void 0?r:0,n=n!==void 0?n:0,s=s!==void 0?s:0,o=o!==void 0?o:0,a=a!==void 0?a:0;var l;return a===1?(l=new Date(Date.UTC(e,t-1,i,r,n,s,o)),l.setUTCFullYear(e)):(l=new Date(e,t-1,i,r,n,s,o),l.setFullYear(e)),l.kind=a,l.ticks=this.getTicks(l),l},create$2:function(e,t){e=System.Int64.is64Bit(e)?e:System.Int64(e);var i;return e.lt(this.TicksPerDay)?(i=new Date(0),i.setMilliseconds(i.getMilliseconds()+this.$getTzOffset(i).div(1e4).toNumber()),i.setFullYear(1)):(i=new Date(e.sub(this.$getMinOffset()).div(1e4).toNumber()),t!==1&&i.setTime(i.getTime()+i.getTimezoneOffset()*6e4)),i.kind=t!==void 0?t:0,i.ticks=e,i},getToday:function(){var e=this.getNow();return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),e},getNow:function(){var e=new Date;return e.kind=2,e},getUtcNow:function(){var e=new Date;return e.kind=1,e},getTimeOfDay:function(e){var t=this.getDate(e);return new System.TimeSpan((e-t)*1e4)},getKind:function(e){return e.kind=e.kind!==void 0?e.kind:0,e.kind},specifyKind:function(e,t){var i=new Date(e.getTime());return i.kind=t,i.ticks=e.ticks!==void 0?e.ticks:this.getTicks(i),i},$FileTimeOffset:System.Int64("584388").mul(System.Int64(864e9)),FromFileTime:function(e){return this.toLocalTime(this.FromFileTimeUtc(e))},FromFileTimeUtc:function(e){return e=System.Int64.is64Bit(e)?e:System.Int64(e),this.create$2(e.add(this.$FileTimeOffset),1)},ToFileTime:function(e){return this.ToFileTimeUtc(this.toUniversalTime(e))},ToFileTimeUtc:function(e){return this.getKind(e)!==0?this.getTicks(this.toUniversalTime(e)):this.getTicks(e)},isUseGenitiveForm:function(e,t,i,r){for(var n=0,s=t-1;s>=0&&e[s]!==r;s--);if(s>=0){for(;--s>=0&&e[s]===r;)n++;if(n<=1)return!0}for(s=t+i;s<e.length&&e[s]!==r;s++);if(s<e.length){for(n=0;++s<e.length&&e[s]===r;)n++;if(n<=1)return!0}return!1},format:function(e,t,i){var r=this,n=e.kind||0,s=n===1||["u","r","R"].indexOf(t)>-1,o=(i||System.Globalization.CultureInfo.getCurrentCulture()).getFormat(System.Globalization.DateTimeFormatInfo),a=s?e.getUTCFullYear():e.getFullYear(),l=s?e.getUTCMonth():e.getMonth(),u=s?e.getUTCDate():e.getDate(),d=s?e.getUTCDay():e.getDay(),f=s?e.getUTCHours():e.getHours(),C=s?e.getUTCMinutes():e.getMinutes(),E=s?e.getUTCSeconds():e.getSeconds(),T=s?e.getUTCMilliseconds():e.getMilliseconds(),w=e.getTimezoneOffset(),k,O;return t=t||"G",t.length===1?(k=o.getAllDateTimePatterns(t,!0),t=k?k[0]:t):t.length===2&&t.charAt(0)==="%"&&(t=t.charAt(1)),O=!1,t=t.replace(/(\\.|'[^']*'|"[^"]*"|d{1,4}|M{1,4}|yyyy|yy|y|HH?|hh?|mm?|ss?|tt?|u|f{1,7}|F{1,7}|K|z{1,3}|\:|\/)/g,function(M,P,y){var m=M,c,$,x;switch(M){case"dddd":m=o.dayNames[d];break;case"ddd":m=o.abbreviatedDayNames[d];break;case"dd":m=u<10?"0"+u:u;break;case"d":m=u;break;case"MMMM":m=r.isUseGenitiveForm(t,y,4,"d")?o.monthGenitiveNames[l]:o.monthNames[l];break;case"MMM":m=r.isUseGenitiveForm(t,y,3,"d")?o.abbreviatedMonthGenitiveNames[l]:o.abbreviatedMonthNames[l];break;case"MM":m=l+1<10?"0"+(l+1):l+1;break;case"M":m=l+1;break;case"yyyy":m=("0000"+a).substring(a.toString().length);break;case"yy":m=(a%100).toString(),m.length===1&&(m="0"+m);break;case"y":m=a%100;break;case"h":case"hh":m=f%12,m?M==="hh"&&m.length===1&&(m="0"+m):m="12";break;case"HH":m=f.toString(),m.length===1&&(m="0"+m);break;case"H":m=f;break;case"mm":m=C.toString(),m.length===1&&(m="0"+m);break;case"m":m=C;break;case"ss":m=E.toString(),m.length===1&&(m="0"+m);break;case"s":m=E;break;case"t":case"tt":m=f<12?o.amDesignator:o.pmDesignator,M==="t"&&(m=m.charAt(0));break;case"F":case"FF":case"FFF":case"FFFF":case"FFFFF":case"FFFFFF":case"FFFFFFF":for(m=T.toString(),m.length<3&&(m=Array(4-m.length).join("0")+m),m=m.substr(0,M.length),c="0",$=m.length-1;$>=0&&m.charAt($)===c;$--);m=m.substring(0,$+1),O=m.length==0;break;case"f":case"ff":case"fff":case"ffff":case"fffff":case"ffffff":case"fffffff":m=T.toString(),m.length<3&&(m=Array(4-m.length).join("0")+m),x=M==="u"?7:M.length,m.length<x&&(m=m+Array(8-m.length).join("0")),m=m.substr(0,x);break;case"z":m=w/60,m=(m>=0?"-":"+")+Math.floor(Math.abs(m));break;case"K":case"zz":case"zzz":n===0?m="":n===1?m="Z":(m=w/60,m=(m>0?"-":"+")+System.String.alignString(Math.floor(Math.abs(m)).toString(),2,"0",2),(M==="zzz"||M==="K")&&(m+=o.timeSeparator+System.String.alignString(Math.floor(Math.abs(w%60)).toString(),2,"0",2)));break;case":":m=o.timeSeparator;break;case"/":m=o.dateSeparator;break;default:m=M.substr(1,M.length-1-(M.charAt(0)!=="\\"));break}return m}),O&&(System.String.endsWith(t,".")?t=t.substring(0,t.length-1):System.String.endsWith(t,".Z")?t=t.substring(0,t.length-2)+"Z":n===2&&t.match(/\.([+-])/g)!==null&&(t=t.replace(/\.([+-])/g,"$1"))),t},parse:function(e,t,i,r){var n=this.parseExact(e,null,t,i,!0);if(n!==null)return n;if(n=Date.parse(e),isNaN(n)){if(!r)throw new System.FormatException.$ctor1("String does not contain a valid string representation of a date and time.")}else return new Date(n)},parseExact:function(e,t,i,r,n){var s,o,a,l;if(t||(t=["G","g","F","f","D","d","R","r","s","S","U","u","O","o","Y","y","M","m","T","t"]),Bridge.isArray(t)){for(s=0,s;s<t.length;s++)if(l=this.parseExact(e,t[s],i,r,!0),l!=null)return l;if(n)return null;throw new System.FormatException.$ctor1("String does not contain a valid string representation of a date and time.")}else t=t.replace("'Z'","Z");var u=new Date,d=(i||System.Globalization.CultureInfo.getCurrentCulture()).getFormat(System.Globalization.DateTimeFormatInfo),f=d.amDesignator,C=d.pmDesignator,E=0,T=0,w=0,k,O,M=u.getFullYear(),P=u.getMonth()+1,y=u.getDate(),m=0,c=0,$=0,x=0,D="",G=0,q=0,z,Z,te,oe,J,W=!1,le=!1,K,ae,pe=0,ve=!1,Ae=0;if(e==null)throw new System.ArgumentNullException.$ctor1("str");for(t=t||"G",t.length===1?(ae=d.getAllDateTimePatterns(t,!0),t=ae?ae[0]:t):t.length===2&&t.charAt(0)==="%"&&(t=t.charAt(1));T<t.length;){if(k=t.charAt(T),O="",le==="\\")O+=k,T++;else for(o=t.charAt(T+1),k==="."&&e.charAt(E)!==k&&(o==="F"||o==="f")&&(T++,k=o);t.charAt(T)===k&&T<t.length;)O+=k,T++;if(K=!0,!le)if(O==="yyyy"||O==="yy"||O==="y"){if(O==="yyyy"?M=this.subparseInt(e,E,4,4):O==="yy"?M=this.subparseInt(e,E,2,2):O==="y"&&(M=this.subparseInt(e,E,2,4)),M==null){W=!0;break}E+=M.length,M.length===2&&(M=~~M,M=(M>30?1900:2e3)+M)}else if(O==="MMM"||O==="MMMM"){for(P=0,oe=O==="MMM"?this.isUseGenitiveForm(t,T,3,"d")?d.abbreviatedMonthGenitiveNames:d.abbreviatedMonthNames:this.isUseGenitiveForm(t,T,4,"d")?d.monthGenitiveNames:d.monthNames,w=0;w<oe.length;w++)if(J=oe[w],e.substring(E,E+J.length).toLowerCase()===J.toLowerCase()){P=w%12+1,E+=J.length;break}if(P<1||P>12){W=!0;break}}else if(O==="MM"||O==="M"){if(P=this.subparseInt(e,E,O.length,2),P==null||P<1||P>12){W=!0;break}E+=P.length}else if(O==="dddd"||O==="ddd"){for(oe=O==="ddd"?d.abbreviatedDayNames:d.dayNames,w=0;w<oe.length;w++)if(J=oe[w],e.substring(E,E+J.length).toLowerCase()===J.toLowerCase()){E+=J.length;break}}else if(O==="dd"||O==="d"){if(y=this.subparseInt(e,E,O.length,2),y==null||y<1||y>31){W=!0;break}E+=y.length}else if(O==="hh"||O==="h"){if(m=this.subparseInt(e,E,O.length,2),m==null||m<1||m>12){W=!0;break}E+=m.length}else if(O==="HH"||O==="H"){if(m=this.subparseInt(e,E,O.length,2),m==null||m<0||m>23){W=!0;break}E+=m.length}else if(O==="mm"||O==="m"){if(c=this.subparseInt(e,E,O.length,2),c==null||c<0||c>59)return null;E+=c.length}else if(O==="ss"||O==="s"){if($=this.subparseInt(e,E,O.length,2),$==null||$<0||$>59){W=!0;break}E+=$.length}else if(O==="u"){if(x=this.subparseInt(e,E,1,7),x==null){W=!0;break}E+=x.length,x.length>3&&(x=x.substring(0,3))}else if(O.match(/f{1,7}/)!==null){if(x=this.subparseInt(e,E,O.length,7),x==null){W=!0;break}E+=x.length,x.length>3&&(x=x.substring(0,3))}else if(O.match(/F{1,7}/)!==null)x=this.subparseInt(e,E,0,7),x!==null&&(E+=x.length,x.length>3&&(x=x.substring(0,3)));else if(O==="t"){if(e.substring(E,E+1).toLowerCase()===f.charAt(0).toLowerCase())D=f;else if(e.substring(E,E+1).toLowerCase()===C.charAt(0).toLowerCase())D=C;else{W=!0;break}E+=1}else if(O==="tt"){if(e.substring(E,E+2).toLowerCase()===f.toLowerCase())D=f;else if(e.substring(E,E+2).toLowerCase()===C.toLowerCase())D=C;else{W=!0;break}E+=2}else if(O==="z"||O==="zz"){if(Z=e.charAt(E),Z==="-")te=!0;else if(Z==="+")te=!1;else{W=!0;break}if(E++,G=this.subparseInt(e,E,1,2),G==null||G>14){W=!0;break}E+=G.length,Ae=G*36e5,te&&(Ae=-Ae)}else if(O==="Z"){a=e.substring(E,E+1),a==="Z"||a==="z"?(pe=1,E+=1):W=!0;break}else if(O==="zzz"||O==="K"){if(e.substring(E,E+1)==="Z"){pe=2,ve=!0,E+=1;break}if(J=e.substring(E,E+6),J===""){pe=0;break}if(E+=J.length,J.length!==6&&J.length!==5){W=!0;break}if(Z=J.charAt(0),Z==="-")te=!0;else if(Z==="+")te=!1;else{W=!0;break}if(z=1,G=this.subparseInt(J,z,1,J.length===6?2:1),G==null||G>14){W=!0;break}if(z+=G.length,J.charAt(z)!==d.timeSeparator){W=!0;break}if(z++,q=this.subparseInt(J,z,1,2),q==null||G>59){W=!0;break}Ae=G*36e5+q*6e4,te&&(Ae=-Ae),pe=2}else K=!1;if(le||!K){if(J=e.substring(E,E+O.length),(le||J!==":"||O!==d.timeSeparator&&O!==":")&&(!le&&(O===":"&&J!==d.timeSeparator||O==="/"&&J!==d.dateSeparator)||J!==O&&O!=="'"&&O!=='"'&&O!=="\\")){W=!0;break}if(le==="\\"&&(le=!1),O!=="'"&&O!=='"'&&O!=="\\")E+=O.length;else if(le===!1)le=O;else{if(le!==O){W=!0;break}le=!1}}}if(le&&(W=!0),W||(E!==e.length?W=!0:P===2?M%4==0&&M%100!=0||M%400==0?y>29&&(W=!0):y>28&&(W=!0):(P===4||P===6||P===9||P===11)&&y>30&&(W=!0)),W){if(n)return null;throw new System.FormatException.$ctor1("String does not contain a valid string representation of a date and time.")}return D&&(m<12&&D===C?m=+m+12:m>11&&D===f&&(m-=12)),l=this.create(M,P,y,m,c,$,x,pe),pe===2&&(ve===!0?l=new Date(l.getTime()-l.getTimezoneOffset()*6e4):Ae!==0&&(l=new Date(l.getTime()-l.getTimezoneOffset()*6e4),l=this.addMilliseconds(l,-Ae)),l.kind=pe),l},subparseInt:function(e,t,i,r){for(var n,s=r;s>=i;s--){if(n=e.substring(t,t+s),n.length<i)return null;if(/^\d+$/.test(n))return n}return null},tryParse:function(e,t,i,r){return i.v=this.parse(e,t,r,!0),i.v==null?(i.v=this.getMinValue(),!1):!0},tryParseExact:function(e,t,i,r,n){return r.v=this.parseExact(e,t,i,n,!0),r.v==null?(r.v=this.getMinValue(),!1):!0},isDaylightSavingTime:function(e){if(e.kind!==void 0&&e.kind===1)return!1;var t=new Date(e.getTime());return t.setMonth(0),t.setDate(1),t.getTimezoneOffset()!==e.getTimezoneOffset()},dateAddSubTimeSpan:function(e,t,i){var r=t.getTicks().mul(i),n=new Date(e.getTime()+r.div(1e4).toNumber());return n.kind=e.kind,n.ticks=this.getTicks(n),n},subdt:function(e,t){return this.dateAddSubTimeSpan(e,t,-1)},adddt:function(e,t){return this.dateAddSubTimeSpan(e,t,1)},subdd:function(e,t){var i=0,r=this.getTicks(e),n=this.getTicks(t),s=r.toNumber(),o=n.toNumber(),a=r.sub(n);return(s===0&&o!==0||o===0&&s!==0)&&(i=Math.round((a.toNumberDivided(6e8)-Math.round(a.toNumberDivided(9e9))*15)*6e8)),new System.TimeSpan(a.sub(i))},addYears:function(e,t){return this.addMonths(e,t*12)},addMonths:function(e,t){var i=new Date(e.getTime()),r=e.getDate();return i.setDate(1),i.setMonth(i.getMonth()+t),i.setDate(Math.min(r,this.getDaysInMonth(i.getFullYear(),i.getMonth()+1))),i.kind=e.kind!==void 0?e.kind:0,i.ticks=this.getTicks(i),i},addDays:function(e,t){var i=e.kind!==void 0?e.kind:0,r=new Date(e.getTime());return i===1?(r.setUTCDate(r.getUTCDate()+Math.floor(t)*1),t%1!=0&&r.setUTCMilliseconds(r.getUTCMilliseconds()+Math.round(t%1*864e5))):(r.setDate(r.getDate()+Math.floor(t)*1),t%1!=0&&r.setMilliseconds(r.getMilliseconds()+Math.round(t%1*864e5))),r.kind=i,r.ticks=this.getTicks(r),r},addHours:function(e,t){return this.addMilliseconds(e,t*36e5)},addMinutes:function(e,t){return this.addMilliseconds(e,t*6e4)},addSeconds:function(e,t){return this.addMilliseconds(e,t*1e3)},addMilliseconds:function(e,t){var i=new Date(e.getTime());return i.setMilliseconds(i.getMilliseconds()+t),i.kind=e.kind!==void 0?e.kind:0,i.ticks=this.getTicks(i),i},addTicks:function(e,t){t=System.Int64.is64Bit(t)?t:System.Int64(t);var i=new Date(e.getTime()),r=this.getTicks(e).add(t);return i.setMilliseconds(i.getMilliseconds()+t.div(1e4).toNumber()),i.ticks=r,i.kind=e.kind!==void 0?e.kind:0,i},add:function(e,t){return this.addTicks(e,t.getTicks())},subtract:function(e,t){return this.addTicks(e,t.getTicks().mul(-1))},getIsLeapYear:function(e){return e&3?!1:e%100!=0||e%400==0},getDaysInMonth:function(e,t){return[31,this.getIsLeapYear(e)?29:28,31,30,31,30,31,31,30,31,30,31][t-1]},getDayOfYear:function(e){var t=this.getDate(e),i=t.getMonth(),r=t.getDate(),n=this.YearDaysByMonth[i]+r;return i>1&&this.getIsLeapYear(t.getFullYear())&&n++,n},getDate:function(e){var t=e.kind!==void 0?e.kind:0,i=new Date(e.getTime());return t===1?(i.setUTCHours(0),i.setUTCMinutes(0),i.setUTCSeconds(0),i.setUTCMilliseconds(0)):(i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0)),i.ticks=this.getTicks(i),i.kind=t,i},getDayOfWeek:function(e){return e.getDay()},getYear:function(e){var t=e.kind!==void 0?e.kind:0,i=this.getTicks(e);return i.lt(this.TicksPerDay)?1:t===1?e.getUTCFullYear():e.getFullYear()},getMonth:function(e){var t=e.kind!==void 0?e.kind:0,i=this.getTicks(e);return i.lt(this.TicksPerDay)?1:t===1?e.getUTCMonth()+1:e.getMonth()+1},getDay:function(e){var t=e.kind!==void 0?e.kind:0,i=this.getTicks(e);return i.lt(this.TicksPerDay)?1:t===1?e.getUTCDate():e.getDate()},getHour:function(e){var t=e.kind!==void 0?e.kind:0;return t===1?e.getUTCHours():e.getHours()},getMinute:function(e){var t=e.kind!==void 0?e.kind:0;return t===1?e.getUTCMinutes():e.getMinutes()},getSecond:function(e){return e.getSeconds()},getMillisecond:function(e){return e.getMilliseconds()},gt:function(e,t){return e!=null&&t!=null?this.getTicks(e).gt(this.getTicks(t)):!1},gte:function(e,t){return e!=null&&t!=null?this.getTicks(e).gte(this.getTicks(t)):!1},lt:function(e,t){return e!=null&&t!=null?this.getTicks(e).lt(this.getTicks(t)):!1},lte:function(e,t){return e!=null&&t!=null?this.getTicks(e).lte(this.getTicks(t)):!1}}}),Bridge.define("System.TimeSpan",{inherits:[System.IComparable],config:{alias:["compareTo",["System$IComparable$compareTo","System$IComparable$1$compareTo","System$IComparable$1System$TimeSpan$compareTo"]]},$kind:"struct",statics:{fromDays:function(e){return new System.TimeSpan(e*864e9)},fromHours:function(e){return new System.TimeSpan(e*36e9)},fromMilliseconds:function(e){return new System.TimeSpan(e*1e4)},fromMinutes:function(e){return new System.TimeSpan(e*6e8)},fromSeconds:function(e){return new System.TimeSpan(e*1e7)},fromTicks:function(e){return new System.TimeSpan(e)},ctor:function(){this.zero=new System.TimeSpan(System.Int64.Zero),this.maxValue=new System.TimeSpan(System.Int64.MaxValue),this.minValue=new System.TimeSpan(System.Int64.MinValue)},getDefaultValue:function(){return new System.TimeSpan(System.Int64.Zero)},neg:function(e){return Bridge.hasValue(e)?new System.TimeSpan(e.ticks.neg()):null},sub:function(e,t){return Bridge.hasValue$1(e,t)?new System.TimeSpan(e.ticks.sub(t.ticks)):null},eq:function(e,t){return e===null&&t===null?!0:Bridge.hasValue$1(e,t)?e.ticks.eq(t.ticks):!1},neq:function(e,t){return e===null&&t===null?!1:Bridge.hasValue$1(e,t)?e.ticks.ne(t.ticks):!0},plus:function(e){return Bridge.hasValue(e)?new System.TimeSpan(e.ticks):null},add:function(e,t){return Bridge.hasValue$1(e,t)?new System.TimeSpan(e.ticks.add(t.ticks)):null},gt:function(e,t){return Bridge.hasValue$1(e,t)?e.ticks.gt(t.ticks):!1},gte:function(e,t){return Bridge.hasValue$1(e,t)?e.ticks.gte(t.ticks):!1},lt:function(e,t){return Bridge.hasValue$1(e,t)?e.ticks.lt(t.ticks):!1},lte:function(e,t){return Bridge.hasValue$1(e,t)?e.ticks.lte(t.ticks):!1},timeSpanWithDays:/^(\-)?(\d+)[\.|:](\d+):(\d+):(\d+)(\.\d+)?/,timeSpanNoDays:/^(\-)?(\d+):(\d+):(\d+)(\.\d+)?/,parse:function(e){function t(s){return s?parseFloat("0"+s)*1e3:0}var i,r,n;return(i=e.match(System.TimeSpan.timeSpanWithDays))?(n=new System.TimeSpan(i[2],i[3],i[4],i[5],t(i[6])),i[1]?new System.TimeSpan(n.ticks.neg()):n):(i=e.match(System.TimeSpan.timeSpanNoDays))?(n=new System.TimeSpan(0,i[2],i[3],i[4],t(i[5])),i[1]?new System.TimeSpan(n.ticks.neg()):n):null},tryParse:function(e,t,i){return i.v=this.parse(e),i.v==null?(i.v=this.minValue,!1):!0}},ctor:function(){this.$initialize(),this.ticks=System.Int64.Zero,arguments.length===1?this.ticks=arguments[0]instanceof System.Int64?arguments[0]:new System.Int64(arguments[0]):arguments.length===3?this.ticks=new System.Int64(arguments[0]).mul(60).add(arguments[1]).mul(60).add(arguments[2]).mul(1e7):arguments.length===4?this.ticks=new System.Int64(arguments[0]).mul(24).add(arguments[1]).mul(60).add(arguments[2]).mul(60).add(arguments[3]).mul(1e7):arguments.length===5&&(this.ticks=new System.Int64(arguments[0]).mul(24).add(arguments[1]).mul(60).add(arguments[2]).mul(60).add(arguments[3]).mul(1e3).add(arguments[4]).mul(1e4))},TimeToTicks:function(e,t,i){var r=System.Int64(e).mul("3600").add(System.Int64(t).mul("60")).add(System.Int64(i));return r.mul("10000000")},getTicks:function(){return this.ticks},getDays:function(){return this.ticks.div(864e9).toNumber()},getHours:function(){return this.ticks.div(36e9).mod(24).toNumber()},getMilliseconds:function(){return this.ticks.div(1e4).mod(1e3).toNumber()},getMinutes:function(){return this.ticks.div(6e8).mod(60).toNumber()},getSeconds:function(){return this.ticks.div(1e7).mod(60).toNumber()},getTotalDays:function(){return this.ticks.toNumberDivided(864e9)},getTotalHours:function(){return this.ticks.toNumberDivided(36e9)},getTotalMilliseconds:function(){return this.ticks.toNumberDivided(1e4)},getTotalMinutes:function(){return this.ticks.toNumberDivided(6e8)},getTotalSeconds:function(){return this.ticks.toNumberDivided(1e7)},get12HourHour:function(){return this.getHours()>12?this.getHours()-12:this.getHours()===0?12:this.getHours()},add:function(e){return new System.TimeSpan(this.ticks.add(e.ticks))},subtract:function(e){return new System.TimeSpan(this.ticks.sub(e.ticks))},duration:function(){return new System.TimeSpan(this.ticks.abs())},negate:function(){return new System.TimeSpan(this.ticks.neg())},compareTo:function(e){return this.ticks.compareTo(e.ticks)},equals:function(e){return Bridge.is(e,System.TimeSpan)?e.ticks.eq(this.ticks):!1},equalsT:function(e){return e.ticks.eq(this.ticks)},format:function(e,t){return this.toString(e,t)},getHashCode:function(){return this.ticks.getHashCode()},toString:function(e,t){var i=this.ticks,r="",n=this,s=(t||System.Globalization.CultureInfo.getCurrentCulture()).getFormat(System.Globalization.DateTimeFormatInfo),o=function(l,u,d,f){return System.String.alignString(Math.abs(l|0).toString(),u||2,"0",d||2,f||!1)},a=i<0;return e?e.replace(/(\\.|'[^']*'|"[^"]*"|dd?|HH?|hh?|mm?|ss?|tt?|f{1,7}|\:|\/)/g,function(l,u,d){var f=l;switch(l){case"d":return n.getDays();case"dd":return o(n.getDays());case"H":return n.getHours();case"HH":return o(n.getHours());case"h":return n.get12HourHour();case"hh":return o(n.get12HourHour());case"m":return n.getMinutes();case"mm":return o(n.getMinutes());case"s":return n.getSeconds();case"ss":return o(n.getSeconds());case"t":return(n.getHours()<12?s.amDesignator:s.pmDesignator).substring(0,1);case"tt":return n.getHours()<12?s.amDesignator:s.pmDesignator;case"f":case"ff":case"fff":case"ffff":case"fffff":case"ffffff":case"fffffff":return o(n.getMilliseconds(),l.length,1,!0);default:return l.substr(1,l.length-1-(l.charAt(0)!=="\\"))}}):(i.abs().gte(864e9)&&(r+=o(i.toNumberDivided(864e9),1)+".",i=i.mod(864e9)),r+=o(i.toNumberDivided(36e9))+":",i=i.mod(36e9),r+=o(i.toNumberDivided(6e8)|0)+":",i=i.mod(6e8),r+=o(i.toNumberDivided(1e7)),i=i.mod(1e7),i.gt(0)&&(r+="."+o(i.toNumber(),7)),(a?"-":"")+r)}}),Bridge.Class.addExtend(System.TimeSpan,[System.IComparable$1(System.TimeSpan),System.IEquatable$1(System.TimeSpan)]),Bridge.define("System.Text.StringBuilder",{ctor:function(){this.$initialize(),this.buffer=[],this.capacity=16,arguments.length===1?this.append(arguments[0]):arguments.length===2?(this.append(arguments[0]),this.setCapacity(arguments[1])):arguments.length>=3&&(this.append(arguments[0],arguments[1],arguments[2]),arguments.length===4&&this.setCapacity(arguments[3]))},getLength:function(){if(this.buffer.length<2)return this.buffer[0]?this.buffer[0].length:0;var e=this.getString();return e.length},setLength:function(e){var t,i;if(e===0)this.clear();else{if(e<0)throw new System.ArgumentOutOfRangeException.$ctor4("value","Length cannot be less than zero");if(t=this.getLength(),e===t)return;i=e-t,i>0?this.append("\0",i):this.remove(t+i,-i)}},getCapacity:function(){var e=this.getLength();return this.capacity>e?this.capacity:e},setCapacity:function(e){var t=this.getLength();e>t&&(this.capacity=e)},toString:function(){var e=this.getString(),t,i;return arguments.length===2?(t=arguments[0],i=arguments[1],this.checkLimits(e,t,i),e.substr(t,i)):e},append:function(e){var t,i;if(e==null)return this;if(arguments.length===2){if(i=arguments[1],i===0)return this;if(i<0)throw new System.ArgumentOutOfRangeException.$ctor4("count","cannot be less than zero");e=Array(i+1).join(e).toString()}else if(arguments.length===3){if(t=arguments[1],i=arguments[2],i===0)return this;this.checkLimits(e,t,i),e=e.substr(t,i)}return this.buffer[this.buffer.length]=e,this.clearString(),this},appendFormat:function(e){return this.append(System.String.format.apply(System.String,arguments))},clear:function(){return this.buffer=[],this.clearString(),this},appendLine:function(){return arguments.length===1&&this.append(arguments[0]),this.append(`\r `)},equals:function(e){return e==null?!1:e===this?!0:this.toString()===e.toString()},remove:function(e,t){var i=this.getString();return this.checkLimits(i,e,t),i.length===t&&e===0?this.clear():(t>0&&(this.buffer=[],this.buffer[0]=i.substring(0,e),this.buffer[1]=i.substring(e+t,i.length),this.clearString()),this)},insert:function(e,t){var i,r;if(t==null)return this;if(arguments.length===3){if(i=arguments[2],i===0)return this;if(i<0)throw new System.ArgumentOutOfRangeException.$ctor4("count","cannot be less than zero");t=Array(i+1).join(t).toString()}return r=this.getString(),this.buffer=[],e<1?(this.buffer[0]=t,this.buffer[1]=r):e>=r.length?(this.buffer[0]=r,this.buffer[1]=t):(this.buffer[0]=r.substring(0,e),this.buffer[1]=t,this.buffer[2]=r.substring(e,r.length)),this.clearString(),this},replace:function(e,t){var i=new RegExp(e,"g"),r=this.buffer.join("");if(this.buffer=[],arguments.length===4){var n=arguments[2],s=arguments[3],o=r.substr(n,s);this.checkLimits(r,n,s),this.buffer[0]=r.substring(0,n),this.buffer[1]=o.replace(i,t),this.buffer[2]=r.substring(n+s,r.length)}else this.buffer[0]=r.replace(i,t);return this.clearString(),this},checkLimits:function(e,t,i){if(i<0)throw new System.ArgumentOutOfRangeException.$ctor4("length","must be non-negative");if(t<0)throw new System.ArgumentOutOfRangeException.$ctor4("startIndex","startIndex cannot be less than zero");if(i>e.length-t)throw new System.ArgumentOutOfRangeException.$ctor4("Index and length must refer to a location within the string")},clearString:function(){this.$str=null},getString:function(){return this.$str||(this.$str=this.buffer.join(""),this.buffer=[],this.buffer[0]=this.$str),this.$str},getChar:function(e){var t=this.getString();if(e<0||e>=t.length)throw new System.IndexOutOfRangeException;return t.charCodeAt(e)},setChar:function(e,t){var i=this.getString();if(e<0||e>=i.length)throw new System.ArgumentOutOfRangeException;t=String.fromCharCode(t),this.buffer=[],this.buffer[0]=i.substring(0,e),this.buffer[1]=t,this.buffer[2]=i.substring(e+1,i.length),this.clearString()}}),function(){var e=["-","[","]","/","{","}","(",")","*","+","?",".","\\","^","$","|"],t=RegExp("["+e.join("\\")+"]","g"),i=function(r){return r.replace(t,"\\$&")};Bridge.regexpEscape=i}(),Bridge.define("System.Diagnostics.Debug.DebugAssertException",{inherits:[System.Exception],$kind:"nested class",ctors:{ctor:function(e,t,i){this.$initialize(),System.Exception.ctor.call(this,(e||"")+` `+(t||"")+` `+(i||""))}}}),Bridge.define("System.Diagnostics.Debug",{statics:{fields:{s_lock:null,s_indentLevel:0,s_indentSize:0,s_needIndent:!1,s_indentString:null,s_ShowAssertDialog:null,s_WriteCore:null,s_shouldWriteToStdErr:!1},props:{AutoFlush:{get:function(){return!0},set:function(e){}},IndentLevel:{get:function(){return System.Diagnostics.Debug.s_indentLevel},set:function(e){System.Diagnostics.Debug.s_indentLevel=e<0?0:e}},IndentSize:{get:function(){return System.Diagnostics.Debug.s_indentSize},set:function(e){System.Diagnostics.Debug.s_indentSize=e<0?0:e}}},ctors:{init:function(){this.s_lock={},this.s_indentSize=4,this.s_ShowAssertDialog=System.Diagnostics.Debug.ShowAssertDialog,this.s_WriteCore=System.Diagnostics.Debug.WriteCore,this.s_shouldWriteToStdErr=Bridge.referenceEquals(System.Environment.GetEnvironmentVariable("COMPlus_DebugWriteToStdErr"),"1")}},methods:{Close:function(){},Flush:function(){},Indent:function(){System.Diagnostics.Debug.IndentLevel=System.Diagnostics.Debug.IndentLevel+1|0},Unindent:function(){System.Diagnostics.Debug.IndentLevel=System.Diagnostics.Debug.IndentLevel-1|0},Print:function(e){System.Diagnostics.Debug.Write$2(e)},Print$1:function(e,t){t===void 0&&(t=[]),System.Diagnostics.Debug.Write$2(System.String.formatProvider.apply(System.String,[null,e].concat(t)))},Assert:function(e){System.Diagnostics.Debug.Assert$2(e,"","")},Assert$1:function(e,t){System.Diagnostics.Debug.Assert$2(e,t,"")},Assert$2:function(e,t,i){if(!e){var r;try{throw System.NotImplemented.ByDesign}catch(n){n=System.Exception.create(n),r=""}System.Diagnostics.Debug.WriteLine$2(System.Diagnostics.Debug.FormatAssert(r,t,i)),System.Diagnostics.Debug.s_ShowAssertDialog(r,t,i)}},Assert$3:function(e,t,i,r){r===void 0&&(r=[]),System.Diagnostics.Debug.Assert$2(e,t,System.String.format.apply(System.String,[i].concat(r)))},Fail:function(e){System.Diagnostics.Debug.Assert$2(!1,e,"")},Fail$1:function(e,t){System.Diagnostics.Debug.Assert$2(!1,e,t)},FormatAssert:function(e,t,i){var r=(System.Diagnostics.Debug.GetIndentString()||"")+` `;return"---- DEBUG ASSERTION FAILED ----"+(r||"")+"---- Assert Short Message ----"+(r||"")+(t||"")+(r||"")+"---- Assert Long Message ----"+(r||"")+(i||"")+(r||"")+(e||"")},WriteLine$2:function(e){System.Diagnostics.Debug.Write$2((e||"")+` `)},WriteLine:function(e){System.Diagnostics.Debug.WriteLine$2(e!=null?Bridge.toString(e):null)},WriteLine$1:function(e,t){System.Diagnostics.Debug.WriteLine$4(e!=null?Bridge.toString(e):null,t)},WriteLine$3:function(e,t){t===void 0&&(t=[]),System.Diagnostics.Debug.WriteLine$2(System.String.formatProvider.apply(System.String,[null,e].concat(t)))},WriteLine$4:function(e,t){t==null?System.Diagnostics.Debug.WriteLine$2(e):System.Diagnostics.Debug.WriteLine$2((t||"")+":"+(e||""))},Write$2:function(e){if(System.Diagnostics.Debug.s_lock,e==null){System.Diagnostics.Debug.s_WriteCore("");return}System.Diagnostics.Debug.s_needIndent&&(e=(System.Diagnostics.Debug.GetIndentString()||"")+(e||""),System.Diagnostics.Debug.s_needIndent=!1),System.Diagnostics.Debug.s_WriteCore(e),System.String.endsWith(e,` `)&&(System.Diagnostics.Debug.s_needIndent=!0)},Write:function(e){System.Diagnostics.Debug.Write$2(e!=null?Bridge.toString(e):null)},Write$3:function(e,t){t==null?System.Diagnostics.Debug.Write$2(e):System.Diagnostics.Debug.Write$2((t||"")+":"+(e||""))},Write$1:function(e,t){System.Diagnostics.Debug.Write$3(e!=null?Bridge.toString(e):null,t)},WriteIf$2:function(e,t){e&&System.Diagnostics.Debug.Write$2(t)},WriteIf:function(e,t){e&&System.Diagnostics.Debug.Write(t)},WriteIf$3:function(e,t,i){e&&System.Diagnostics.Debug.Write$3(t,i)},WriteIf$1:function(e,t,i){e&&System.Diagnostics.Debug.Write$1(t,i)},WriteLineIf:function(e,t){e&&System.Diagnostics.Debug.WriteLine(t)},WriteLineIf$1:function(e,t,i){e&&System.Diagnostics.Debug.WriteLine$1(t,i)},WriteLineIf$2:function(e,t){e&&System.Diagnostics.Debug.WriteLine$2(t)},WriteLineIf$3:function(e,t,i){e&&System.Diagnostics.Debug.WriteLine$4(t,i)},GetIndentString:function(){var e,t=Bridge.Int.mul(System.Diagnostics.Debug.IndentSize,System.Diagnostics.Debug.IndentLevel);return System.Nullable.eq(System.Diagnostics.Debug.s_indentString!=null?System.Diagnostics.Debug.s_indentString.length:null,t)?System.Diagnostics.Debug.s_indentString:(e=System.String.fromCharCount(32,t),System.Diagnostics.Debug.s_indentString=e,e)},ShowAssertDialog:function(e,t,i){if(!System.Diagnostics.Debugger.IsAttached){var r=new System.Diagnostics.Debug.DebugAssertException(t,i,e);System.Environment.FailFast$1(r.Message,r)}},WriteCore:function(e){System.Diagnostics.Debug.WriteToDebugger(e),System.Diagnostics.Debug.s_shouldWriteToStdErr&&System.Diagnostics.Debug.WriteToStderr(e)},WriteToDebugger:function(e){System.Diagnostics.Debugger.IsLogging()?System.Diagnostics.Debugger.Log(0,null,e):System.Console.WriteLine(e)},WriteToStderr:function(e){System.Console.WriteLine(e)}}}}),Bridge.define("System.Diagnostics.Debugger",{statics:{fields:{DefaultCategory:null},props:{IsAttached:{get:function(){return!0}}},methods:{IsLogging:function(){return!0},Launch:function(){return!0},Log:function(e,t,i){},NotifyOfCrossThreadDependency:function(){}}}}),Bridge.define("System.Diagnostics.Stopwatch",{ctor:function(){this.$initialize(),this.reset()},start:function(){this.isRunning||(this._startTime=System.Diagnostics.Stopwatch.getTimestamp(),this.isRunning=!0)},stop:function(){if(this.isRunning){var e=System.Diagnostics.Stopwatch.getTimestamp(),t=e.sub(this._startTime);this._elapsed=this._elapsed.add(t),this.isRunning=!1}},reset:function(){this._startTime=System.Int64.Zero,this._elapsed=System.Int64.Zero,this.isRunning=!1},restart:function(){this.isRunning=!1,this._elapsed=System.Int64.Zero,this._startTime=System.Diagnostics.Stopwatch.getTimestamp(),this.start()},ticks:function(){var e=this._elapsed,t,i;return this.isRunning&&(t=System.Diagnostics.Stopwatch.getTimestamp(),i=t.sub(this._startTime),e=e.add(i)),e},milliseconds:function(){return this.ticks().mul(1e3).div(System.Diagnostics.Stopwatch.frequency)},timeSpan:function(){return new System.TimeSpan(this.milliseconds().mul(1e4))},statics:{startNew:function(){var e=new System.Diagnostics.Stopwatch;return e.start(),e}}}),typeof window<"u"&&window.performance&&window.performance.now?(System.Diagnostics.Stopwatch.frequency=new System.Int64(1e6),System.Diagnostics.Stopwatch.isHighResolution=!0,System.Diagnostics.Stopwatch.getTimestamp=function(){return new System.Int64(Math.round(window.performance.now()*1e3))}):typeof process<"u"&&process.hrtime?(System.Diagnostics.Stopwatch.frequency=new System.Int64(1e9),System.Diagnostics.Stopwatch.isHighResolution=!0,System.Diagnostics.Stopwatch.getTimestamp=function(){var e=process.hrtime();return new System.Int64(e[0]).mul(1e9).add(e[1])}):(System.Diagnostics.Stopwatch.frequency=new System.Int64(1e3),System.Diagnostics.Stopwatch.isHighResolution=!1,System.Diagnostics.Stopwatch.getTimestamp=function(){return new System.Int64(new Date().valueOf())}),System.Diagnostics.Contracts.Contract={reportFailure:function(e,t,i,r,n){var s=i.toString(),o,a;throw s=s.substring(s.indexOf("return")+7),s=s.substr(0,s.lastIndexOf(";")),o=s?"Contract '"+s+"' failed":"Contract failed",a=t?o+": "+t:o,n?new n(s,t):new System.Diagnostics.Contracts.ContractException(e,a,t,s,r)},assert:function(e,t,i,r){i.call(t)||System.Diagnostics.Contracts.Contract.reportFailure(e,r,i,null)},requires:function(e,t,i,r){i.call(t)||System.Diagnostics.Contracts.Contract.reportFailure(0,r,i,null,e)},forAll:function(e,t,i){if(!i)throw new System.ArgumentNullException.$ctor1("predicate");for(;e<t;e++)if(!i(e))return!1;return!0},forAll$1:function(e,t){if(!e)throw new System.ArgumentNullException.$ctor1("collection");if(!t)throw new System.ArgumentNullException.$ctor1("predicate");var i=Bridge.getEnumerator(e);try{for(;i.moveNext();)if(!t(i.Current))return!1;return!0}finally{i.Dispose()}},exists:function(e,t,i){if(!i)throw new System.ArgumentNullException.$ctor1("predicate");for(;e<t;e++)if(i(e))return!0;return!1},exists$1:function(e,t){if(!e)throw new System.ArgumentNullException.$ctor1("collection");if(!t)throw new System.ArgumentNullException.$ctor1("predicate");var i=Bridge.getEnumerator(e);try{for(;i.moveNext();)if(t(i.Current))return!0;return!1}finally{i.Dispose()}}},Bridge.define("System.Diagnostics.Contracts.ContractFailureKind",{$kind:"enum",$statics:{precondition:0,postcondition:1,postconditionOnException:2,invarian:3,assert:4,assume:5}}),Bridge.define("System.Diagnostics.Contracts.ContractException",{inherits:[System.Exception],config:{properties:{Kind:{get:function(){return this._kind}},Failure:{get:function(){return this._failureMessage}},UserMessage:{get:function(){return this._userMessage}},Condition:{get:function(){return this._condition}}}},ctor:function(e,t,i,r,n){this.$initialize(),System.Exception.ctor.call(this,t,n),this._kind=e,this._failureMessage=t||null,this._userMessage=i||null,this._condition=r||null}}),Le={toIndex:function(e,t){if(t.length!==(e.$s?e.$s.length:1))throw new System.ArgumentException.$ctor1("Invalid number of indices");if(t[0]<0||t[0]>=(e.$s?e.$s[0]:e.length))throw new System.IndexOutOfRangeException.$ctor1("Index 0 out of range");var i=t[0],r;if(e.$s)for(r=1;r<e.$s.length;r++){if(t[r]<0||t[r]>=e.$s[r])throw new System.IndexOutOfRangeException.$ctor1("Index "+r+" out of range");i=i*e.$s[r]+t[r]}return i},index:function(e,t){if(e<0||e>=t.length)throw new System.IndexOutOfRangeException;return e},$get:function(e){var t=this[System.Array.toIndex(this,e)];return typeof t<"u"?t:this.$v},get:function(e){var t,i,r;if(arguments.length<2)throw new System.ArgumentNullException.$ctor1("indices");for(t=Array.prototype.slice.call(arguments,1),i=0;i<t.length;i++)if(!Bridge.hasValue(t[i]))throw new System.ArgumentNullException.$ctor1("indices");return r=e[System.Array.toIndex(e,t)],typeof r<"u"?r:e.$v},$set:function(e,t){this[System.Array.toIndex(this,e)]=t},set:function(e,t){var i=Array.prototype.slice.call(arguments,2);e[System.Array.toIndex(e,i)]=t},getLength:function(e,t){if(t<0||t>=(e.$s?e.$s.length:1))throw new System.IndexOutOfRangeException;return e.$s?e.$s[t]:e.length},getRank:function(e){return e.$type?e.$type.$rank:e.$s?e.$s.length:1},getLower:function(e,t){return System.Array.getLength(e,t),0},create:function(e,t,i,r){var n,s,o,a,l,u,d,f,C,E,T;if(r===null)throw new System.ArgumentNullException.$ctor1("length");if(n=[],s=arguments.length>3?1:0,n.$v=e,n.$s=[],n.get=System.Array.$get,n.set=System.Array.$set,r&&Bridge.isArray(r))for(o=0;o<r.length;o++){if(l=r[o],isNaN(l)||l<0)throw new System.ArgumentOutOfRangeException.$ctor1("length");s*=l,n.$s[o]=l}else for(o=3;o<arguments.length;o++){if(l=arguments[o],isNaN(l)||l<0)throw new System.ArgumentOutOfRangeException.$ctor1("length");s*=l,n.$s[o-3]=l}for(n.length=s,C=Bridge.isFunction(e),C&&(E=e(),E&&(E.$kind||typeof E=="object")||(C=!1,e=E)),T=0;T<s;T++)n[T]=C?e():e;if(t)for(o=0;o<n.length;o++){for(d=[],f=o,a=n.$s.length-1;a>=0;a--)u=f%n.$s[a],d.unshift(u),f=Bridge.Int.div(f-u,n.$s[a]);for(E=t,u=0;u<d.length;u++)E=E[d[u]];n[o]=E}return System.Array.init(n,i,n.$s.length),n},init:function(e,t,i,r){var n,s,o,a,l,u;if(e==null)throw new System.ArgumentNullException.$ctor1("length");if(Bridge.isArray(e))return n=t,s=i||1,System.Array.type(n,s,e),e;if(isNaN(e)||e<0)throw new System.ArgumentOutOfRangeException.$ctor1("length");for(o=new Array(e),a=r!==!0&&Bridge.isFunction(t),a&&(l=t(),l&&(l.$kind||typeof l=="object")||(a=!1,t=l)),u=0;u<e;u++)o[u]=a?t():t;return System.Array.init(o,i,1)},toEnumerable:function(e){return new Bridge.ArrayEnumerable(e)},toEnumerator:function(e,t){return new Bridge.ArrayEnumerator(e,t)},_typedArrays:{Float32Array:System.Single,Float64Array:System.Double,Int8Array:System.SByte,Int16Array:System.Int16,Int32Array:System.Int32,Uint8Array:System.Byte,Uint8ClampedArray:System.Byte,Uint16Array:System.UInt16,Uint32Array:System.UInt32},is:function(e,t){var i,r;if(e instanceof Bridge.ArrayEnumerator)return!!(e.constructor===t||e instanceof t||t===Bridge.ArrayEnumerator||t.$$name&&System.String.startsWith(t.$$name,"System.Collections.IEnumerator")||t.$$name&&System.String.startsWith(t.$$name,"System.Collections.Generic.IEnumerator"));if(!Bridge.isArray(e))return!1;if(t.$elementType&&t.$isArray){if(i=Bridge.getType(e).$elementType,i)return Bridge.Reflection.isValueType(i)!==Bridge.Reflection.isValueType(t.$elementType)?!1:System.Array.getRank(e)===t.$rank&&Bridge.Reflection.isAssignableFrom(t.$elementType,i);t=Array}return e.constructor===t||e instanceof t||t===System.Collections.IEnumerable||t===System.Collections.ICollection||t===System.ICloneable||t===System.Collections.IList||t.$$name&&System.String.startsWith(t.$$name,"System.Collections.Generic.IEnumerable$1")||t.$$name&&System.String.startsWith(t.$$name,"System.Collections.Generic.ICollection$1")||t.$$name&&System.String.startsWith(t.$$name,"System.Collections.Generic.IList$1")||t.$$name&&System.String.startsWith(t.$$name,"System.Collections.Generic.IReadOnlyCollection$1")||t.$$name&&System.String.startsWith(t.$$name,"System.Collections.Generic.IReadOnlyList$1")?!0:(r=!!System.Array._typedArrays[String.prototype.slice.call(Object.prototype.toString.call(e),8,-1)],r&&!!System.Array._typedArrays[t.name]?e instanceof t:r)},clone:function(e){var t;return t=e.length===1?[e[0]]:e.slice(0),t.$type=e.$type,t.$v=e.$v,t.$s=e.$s,t.get=System.Array.$get,t.set=System.Array.$set,t},getCount:function(e,t){var i,r;return Bridge.isArray(e)?e.length:t&&Bridge.isFunction(e[i="System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(t)+"$getCount"])||Bridge.isFunction(e[i="System$Collections$ICollection$getCount"])?e[i]():t&&(r=e["System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(t)+"$Count"])!==void 0||(r=e.System$Collections$ICollection$Count)!==void 0||(r=e.Count)!==void 0?r:Bridge.isFunction(e.getCount)?e.getCount():0},getIsReadOnly:function(e,t){var i,r;return Bridge.isArray(e)?!!t:t&&Bridge.isFunction(e[i="System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(t)+"$getIsReadOnly"])?e[i]():t&&(r=e["System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(t)+"$IsReadOnly"])!==void 0?r:Bridge.isFunction(e[i="System$Collections$IList$getIsReadOnly"])?e[i]():(r=e.System$Collections$IList$IsReadOnly)!==void 0||(r=e.IsReadOnly)!==void 0?r:Bridge.isFunction(e.getIsReadOnly)?e.getIsReadOnly():!1},checkReadOnly:function(e,t,i){if(Bridge.isArray(e)){if(t)throw new System.NotSupportedException.$ctor1(i||"Collection was of a fixed size.")}else if(System.Array.getIsReadOnly(e,t))throw new System.NotSupportedException.$ctor1(i||"Collection is read-only.")},add:function(e,t,i){var r;return System.Array.checkReadOnly(e,i),i&&(t=System.Array.checkNewElementType(t,i)),i&&Bridge.isFunction(e[r="System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(i)+"$add"])||Bridge.isFunction(e[r="System$Collections$IList$add"])?e[r](t):Bridge.isFunction(e.add)?e.add(t):-1},checkNewElementType:function(e,t){var i=Bridge.unbox(e,!0),r;if(Bridge.isNumber(i)){if(t===System.Decimal)return new System.Decimal(i);if(t===System.Int64)return new System.Int64(i);if(t===System.UInt64)return new System.UInt64(i)}if(r=Bridge.is(e,t),!r){if(e==null&&Bridge.getDefaultValue(t)==null)return null;throw new System.ArgumentException.$ctor1("The value "+i+"is not of type "+Bridge.getTypeName(t)+" and cannot be used in this generic collection.")}return i},clear:function(e,t){var i;System.Array.checkReadOnly(e,t,"Collection is read-only."),Bridge.isArray(e)?System.Array.fill(e,t?t.getDefaultValue||Bridge.getDefaultValue(t):null,0,e.length):t&&Bridge.isFunction(e[i="System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(t)+"$clear"])||Bridge.isFunction(e[i="System$Collections$IList$clear"])?e[i]():Bridge.isFunction(e.clear)&&e.clear()},fill:function(e,t,i,r){var n,s;if(!Bridge.hasValue(e))throw new System.ArgumentNullException.$ctor1("dst");if(i<0||r<0||i+r>e.length)throw new System.IndexOutOfRangeException;for(n=Bridge.isFunction(t),n&&(s=t(),s&&(s.$kind||typeof s=="object")||(n=!1,t=s));--r>=0;)e[i+r]=n?t():t},copy:function(e,t,i,r,n){if(!i)throw new System.ArgumentNullException.$ctor3("dest","Value cannot be null");if(!e)throw new System.ArgumentNullException.$ctor3("src","Value cannot be null");if(t<0||r<0||n<0)throw new System.ArgumentOutOfRangeException.$ctor1("bound","Number was less than the array's lower bound in the first dimension");if(n>e.length-t||n>i.length-r)throw new System.ArgumentException.$ctor1("Destination array was not long enough. Check destIndex and length, and the array's lower bounds");if(t<r&&e===i)for(;--n>=0;)i[r+n]=e[t+n];else for(var s=0;s<n;s++)i[r+s]=e[t+s]},copyTo:function(e,t,i,r){var n;if(Bridge.isArray(e))System.Array.copy(e,0,t,i,e?e.length:0);else if(Bridge.isFunction(e.copyTo))e.copyTo(t,i);else if(r&&Bridge.isFunction(e[n="System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(r)+"$copyTo"]))e[n](t,i);else if(Bridge.isFunction(e[n="System$Collections$ICollection$copyTo"]))e[n](t,i);else throw new System.NotImplementedException.$ctor1("copyTo")},indexOf:function(e,t,i,r,n){var s,o,a,l;if(Bridge.isArray(e)){for(i=i||0,r=Bridge.isNumber(r)?r:e.length,l=i+r,o=i;o<l;o++)if(a=e[o],a===t||System.Collections.Generic.EqualityComparer$1.$default.equals2(a,t))return o}else{if(n&&Bridge.isFunction(e[s="System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(n)+"$indexOf"]))return e[s](t);if(Bridge.isFunction(e[s="System$Collections$IList$indexOf"]))return e[s](t);if(Bridge.isFunction(e.indexOf))return e.indexOf(t)}return-1},contains:function(e,t,i){var r;return Bridge.isArray(e)?System.Array.indexOf(e,t)>-1:i&&Bridge.isFunction(e[r="System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(i)+"$contains"])||Bridge.isFunction(e[r="System$Collections$IList$contains"])?e[r](t):Bridge.isFunction(e.contains)?e.contains(t):!1},remove:function(e,t,i){var r,n;if(System.Array.checkReadOnly(e,i),Bridge.isArray(e)){if(n=System.Array.indexOf(e,t),n>-1)return e.splice(n,1),!0}else{if(i&&Bridge.isFunction(e[r="System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(i)+"$remove"]))return e[r](t);if(Bridge.isFunction(e[r="System$Collections$IList$remove"]))return e[r](t);if(Bridge.isFunction(e.remove))return e.remove(t)}return!1},insert:function(e,t,i,r){var n;System.Array.checkReadOnly(e,r),r&&(i=System.Array.checkNewElementType(i,r)),r&&Bridge.isFunction(e[n="System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(r)+"$insert"])||Bridge.isFunction(e[n="System$Collections$IList$insert"])?e[n](t,i):Bridge.isFunction(e.insert)&&e.insert(t,i)},removeAt:function(e,t,i){var r;System.Array.checkReadOnly(e,i),Bridge.isArray(e)?e.splice(t,1):i&&Bridge.isFunction(e[r="System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(i)+"$removeAt"])||Bridge.isFunction(e[r="System$Collections$IList$removeAt"])?e[r](t):Bridge.isFunction(e.removeAt)&&e.removeAt(t)},getItem:function(e,t,i){var r,n;return Bridge.isArray(e)?(n=e[t],i?n:e.$type&&(Bridge.isNumber(n)||Bridge.isBoolean(n)||Bridge.isDate(n))?Bridge.box(n,e.$type.$elementType):n):i&&Bridge.isFunction(e[r="System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(i)+"$getItem"])?e[r](t):(Bridge.isFunction(e.get)?n=e.get(t):Bridge.isFunction(e.getItem)?n=e.getItem(t):Bridge.isFunction(e[r="System$Collections$IList$$getItem"])?n=e[r](t):Bridge.isFunction(e.get_Item)&&(n=e.get_Item(t)),i&&Bridge.getDefaultValue(i)!=null?Bridge.box(n,i):n)},setItem:function(e,t,i,r){var n;if(Bridge.isArray(e))e.$type&&(i=System.Array.checkElementType(i,e.$type.$elementType)),e[t]=i;else if(r&&(i=System.Array.checkElementType(i,r)),Bridge.isFunction(e.set))e.set(t,i);else if(Bridge.isFunction(e.setItem))e.setItem(t,i);else{if(r&&Bridge.isFunction(e[n="System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(r)+"$setItem"]))return e[n](t,i);if(r&&Bridge.isFunction(e[n="System$Collections$IList$setItem"]))return e[n](t,i);Bridge.isFunction(e.set_Item)&&e.set_Item(t,i)}},checkElementType:function(e,t){var i=Bridge.unbox(e,!0),r;if(Bridge.isNumber(i)){if(t===System.Decimal)return new System.Decimal(i);if(t===System.Int64)return new System.Int64(i);if(t===System.UInt64)return new System.UInt64(i)}if(r=Bridge.is(e,t),!r){if(e==null)return Bridge.getDefaultValue(t);throw new System.ArgumentException.$ctor1("Cannot widen from source type to target type either because the source type is a not a primitive type or the conversion cannot be accomplished.")}return i},resize:function(e,t,i,r){var n,s;if(t<0)throw new System.ArgumentOutOfRangeException.$ctor3("newSize",t,"newSize cannot be less than 0.");var o=0,a=Bridge.isFunction(i),l=e.v;for(a&&(n=i(),n&&(n.$kind||typeof n=="object")||(a=!1,i=n)),l?(o=l.length,l.length=t):l=System.Array.init(new Array(t),r),s=o;s<t;s++)l[s]=a?i():i;l.$s=[l.length],e.v=l},reverse:function(e,t,i){var r,n,s;if(!Le)throw new System.ArgumentNullException.$ctor1("arr");if(t||t===0||(t=0,i=e.length),t<0||i<0)throw new System.ArgumentOutOfRangeException.$ctor4(t<0?"index":"length","Non-negative number required.");if(Le.length-t<i)throw new System.ArgumentException.$ctor1("Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.");if(System.Array.getRank(e)!==1)throw new System.Exception("Only single dimension arrays are supported here.");for(r=t,n=t+i-1;r<n;)s=e[r],e[r]=e[n],e[n]=s,r++,n--},binarySearch:function(e,t,i,r,n){var s,o,a,l,u;if(!e)throw new System.ArgumentNullException.$ctor1("array");if(s=0,t<s||i<0)throw new System.ArgumentOutOfRangeException.$ctor4(t<s?"index":"length","Non-negative number required.");if(e.length-(t-s)<i)throw new System.ArgumentException.$ctor1("Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.");if(System.Array.getRank(e)!==1)throw new System.RankException.$ctor1("Only single dimensional arrays are supported for the requested action.");for(n||(n=System.Collections.Generic.Comparer$1.$default),o=t,a=t+i-1;o<=a;){l=o+(a-o>>1);try{u=System.Collections.Generic.Comparer$1.get(n)(e[l],r)}catch(d){throw new System.InvalidOperationException.$ctor2("Failed to compare two elements in the array.",d)}if(u===0)return l;u<0?o=l+1:a=l-1}return~o},sortDict:function(e,t,i,r,n){var s,o,a,l,u,d;for(n||(n=System.Collections.Generic.Comparer$1.$default),s=[],o=Bridge.fn.bind(n,System.Collections.Generic.Comparer$1.get(n)),r==null&&(r=e.length),a=0;a<e.length;a++)s.push({key:e[a],value:t[a]});if(i===0&&r===s.length)s.sort(function(f,C){return o(f.key,C.key)});else for(l=s.slice(i,i+r),l.sort(function(f,C){return o(f.key,C.key)}),u=i;u<i+r;u++)s[u]=l[u-i];for(d=0;d<s.length;d++)e[d]=s[d].key,t[d]=s[d].value},sort:function(e,t,i,r){var n,s;if(!e)throw new System.ArgumentNullException.$ctor1("array");if(arguments.length===2&&typeof t=="function"){e.sort(t);return}if(arguments.length===2&&typeof t=="object"&&(r=t,t=null),Bridge.isNumber(t)||(t=0),Bridge.isNumber(i)||(i=e.length),r||(r=System.Collections.Generic.Comparer$1.$default),t===0&&i===e.length)e.sort(Bridge.fn.bind(r,System.Collections.Generic.Comparer$1.get(r)));else for(n=e.slice(t,t+i),n.sort(Bridge.fn.bind(r,System.Collections.Generic.Comparer$1.get(r))),s=t;s<t+i;s++)e[s]=n[s-t]},min:function(e,t){for(var i=e[0],r=e.length,n=0;n<r;n++)!(e[n]<i||i<t)||e[n]<t||(i=e[n]);return i},max:function(e,t){for(var i=e[0],r=e.length,n=0;n<r;n++)!(e[n]>i||i>t)||e[n]>t||(i=e[n]);return i},addRange:function(e,t){if(Bridge.isArray(t))e.push.apply(e,t);else{var i=Bridge.getEnumerator(t);try{for(;i.moveNext();)e.push(i.Current)}finally{Bridge.is(i,System.IDisposable)&&i.Dispose()}}},convertAll:function(e,t){if(!Bridge.hasValue(e))throw new System.ArgumentNullException.$ctor1("array");if(!Bridge.hasValue(t))throw new System.ArgumentNullException.$ctor1("converter");return e.map(t)},find:function(e,t,i){if(!Bridge.hasValue(t))throw new System.ArgumentNullException.$ctor1("array");if(!Bridge.hasValue(i))throw new System.ArgumentNullException.$ctor1("match");for(var r=0;r<t.length;r++)if(i(t[r]))return t[r];return Bridge.getDefaultValue(e)},findAll:function(e,t){var i,r;if(!Bridge.hasValue(e))throw new System.ArgumentNullException.$ctor1("array");if(!Bridge.hasValue(t))throw new System.ArgumentNullException.$ctor1("match");for(i=[],r=0;r<e.length;r++)t(e[r])&&i.push(e[r]);return i},findIndex:function(e,t,i,r){var n,s;if(!Bridge.hasValue(e))throw new System.ArgumentNullException.$ctor1("array");if(arguments.length===2?(r=t,t=0,i=e.length):arguments.length===3&&(r=i,i=e.length-t),t<0||t>e.length)throw new System.ArgumentOutOfRangeException.$ctor1("startIndex");if(i<0||t>e.length-i)throw new System.ArgumentOutOfRangeException.$ctor1("count");if(!Bridge.hasValue(r))throw new System.ArgumentNullException.$ctor1("match");for(n=t+i,s=t;s<n;s++)if(r(e[s]))return s;return-1},findLast:function(e,t,i){if(!Bridge.hasValue(t))throw new System.ArgumentNullException.$ctor1("array");if(!Bridge.hasValue(i))throw new System.ArgumentNullException.$ctor1("match");for(var r=t.length-1;r>=0;r--)if(i(t[r]))return t[r];return Bridge.getDefaultValue(e)},findLastIndex:function(e,t,i,r){var n,s;if(!Bridge.hasValue(e))throw new System.ArgumentNullException.$ctor1("array");if(arguments.length===2?(r=t,t=e.length-1,i=e.length):arguments.length===3&&(r=i,i=t+1),!Bridge.hasValue(r))throw new System.ArgumentNullException.$ctor1("match");if(e.length===0){if(t!==-1)throw new System.ArgumentOutOfRangeException.$ctor1("startIndex")}else if(t<0||t>=e.length)throw new System.ArgumentOutOfRangeException.$ctor1("startIndex");if(i<0||t-i+1<0)throw new System.ArgumentOutOfRangeException.$ctor1("count");for(n=t-i,s=t;s>n;s--)if(r(e[s]))return s;return-1},forEach:function(e,t){if(!Bridge.hasValue(e))throw new System.ArgumentNullException.$ctor1("array");if(!Bridge.hasValue(t))throw new System.ArgumentNullException.$ctor1("action");for(var i=0;i<e.length;i++)t(e[i],i,e)},indexOfT:function(e,t,i,r){if(!Bridge.hasValue(e))throw new System.ArgumentNullException.$ctor1("array");if(arguments.length===2?(i=0,r=e.length):arguments.length===3&&(r=e.length-i),i<0||i>=e.length&&e.length>0)throw new System.ArgumentOutOfRangeException.$ctor4("startIndex","out of range");if(r<0||r>e.length-i)throw new System.ArgumentOutOfRangeException.$ctor4("count","out of range");return System.Array.indexOf(e,t,i,r)},isFixedSize:function(e){return Bridge.isArray(e)?!0:e.System$Collections$IList$isFixedSize!=null?e.System$Collections$IList$isFixedSize:e.System$Collections$IList$IsFixedSize!=null?e.System$Collections$IList$IsFixedSize:e.isFixedSize!=null?e.isFixedSize:e.IsFixedSize!=null?e.IsFixedSize:!0},isSynchronized:function(e){return!1},lastIndexOfT:function(e,t,i,r){var n,s,o;if(!Bridge.hasValue(e))throw new System.ArgumentNullException.$ctor1("array");if(arguments.length===2?(i=e.length-1,r=e.length):arguments.length===3&&(r=e.length===0?0:i+1),i<0||i>=e.length&&e.length>0)throw new System.ArgumentOutOfRangeException.$ctor4("startIndex","out of range");if(r<0||i-r+1<0)throw new System.ArgumentOutOfRangeException.$ctor4("count","out of range");for(n=i-r+1,s=i;s>=n;s--)if(o=e[s],o===t||System.Collections.Generic.EqualityComparer$1.$default.equals2(o,t))return s;return-1},syncRoot:function(e){return e},trueForAll:function(e,t){if(!Bridge.hasValue(e))throw new System.ArgumentNullException.$ctor1("array");if(!Bridge.hasValue(t))throw new System.ArgumentNullException.$ctor1("match");for(var i=0;i<e.length;i++)if(!t(e[i]))return!1;return!0},type:function(e,t,i){var r,n,s,o,a;for(t=t||1,r=System.Array.$cache[t],r||(r=[],System.Array.$cache[t]=r),o=0;o<r.length;o++)if(r[o].$elementType===e){n=r[o];break}return n||(s=Bridge.getTypeName(e)+"["+System.String.fromCharCount(",".charCodeAt(0),t-1)+"]",a=Bridge.Class.staticInitAllow,n=Bridge.define(s,{$inherits:[System.Array,System.Collections.ICollection,System.ICloneable,System.Collections.Generic.IList$1(e),System.Collections.Generic.IReadOnlyCollection$1(e)],$noRegister:!0,statics:{$elementType:e,$rank:t,$isArray:!0,$is:function(l){return System.Array.is(l,this)},getDefaultValue:function(){return null},createInstance:function(){var l,u,d;if(this.$rank===1)l=[];else{for(u=[Bridge.getDefaultValue(this.$elementType),null,this.$elementType],d=0;d<this.$rank;d++)u.push(0);l=System.Array.create.apply(System.Array,u)}return l.$type=this,l}}}),r.push(n),Bridge.Class.staticInitAllow=!0,n.$staticInit&&n.$staticInit(),Bridge.Class.staticInitAllow=a),i&&(i.$type=n),i||n},getLongLength:function(e){return System.Int64(e.length)}},Bridge.define("System.Array",{statics:Le}),System.Array.$cache={},Bridge.define("System.ArraySegment",{$kind:"struct",statics:{getDefaultValue:function(){return new System.ArraySegment}},ctor:function(e,t,i){if(this.$initialize(),arguments.length===0){this.array=null,this.offset=0,this.count=0;return}if(e==null)throw new System.ArgumentNullException.$ctor1("array");if(this.array=e,Bridge.isNumber(t)){if(t<0)throw new System.ArgumentOutOfRangeException.$ctor1("offset");this.offset=t}else this.offset=0;if(Bridge.isNumber(i)){if(i<0)throw new System.ArgumentOutOfRangeException.$ctor1("count");this.count=i}else this.count=e.length;if(e.length-this.offset<this.count)throw new ArgumentException},getArray:function(){return this.array},getCount:function(){return this.count},getOffset:function(){return this.offset},getHashCode:function(){return Bridge.addHash([5322976039,this.array,this.count,this.offset])},equals:function(e){return Bridge.is(e,System.ArraySegment)?Bridge.equals(this.array,e.array)&&Bridge.equals(this.count,e.count)&&Bridge.equals(this.offset,e.offset):!1},$clone:function(e){return this}}),Bridge.define("System.Collections.IEnumerable",{$kind:"interface"}),Bridge.define("System.Collections.ICollection",{inherits:[System.Collections.IEnumerable],$kind:"interface"}),Bridge.define("System.Collections.IList",{inherits:[System.Collections.ICollection],$kind:"interface"}),Bridge.define("System.Collections.IDictionary",{inherits:[System.Collections.ICollection],$kind:"interface"}),Bridge.define("System.Collections.Generic.IEnumerable$1",function(e){return{inherits:[System.Collections.IEnumerable],$kind:"interface",$variance:[1]}}),Bridge.define("System.Collections.Generic.ICollection$1",function(e){return{inherits:[System.Collections.Generic.IEnumerable$1(e)],$kind:"interface"}}),Bridge.define("System.Collections.Generic.IEqualityComparer$1",function(e){return{$kind:"interface",$variance:[2]}}),Bridge.define("System.Collections.Generic.IDictionary$2",function(e,t){return{inherits:[System.Collections.Generic.ICollection$1(System.Collections.Generic.KeyValuePair$2(e,t))],$kind:"interface"}}),Bridge.define("System.Collections.Generic.IList$1",function(e){return{inherits:[System.Collections.Generic.ICollection$1(e)],$kind:"interface"}}),Bridge.define("System.Collections.Generic.ISet$1",function(e){return{inherits:[System.Collections.Generic.ICollection$1(e)],$kind:"interface"}}),Bridge.define("System.Collections.Generic.IReadOnlyCollection$1",function(e){return{inherits:[System.Collections.Generic.IEnumerable$1(e)],$kind:"interface"}}),Bridge.define("System.Collections.Generic.IReadOnlyList$1",function(e){return{inherits:[System.Collections.Generic.IReadOnlyCollection$1(e)],$kind:"interface",$variance:[1]}}),Bridge.define("System.Collections.Generic.IReadOnlyDictionary$2",function(e,t){return{inherits:[System.Collections.Generic.IReadOnlyCollection$1(System.Collections.Generic.KeyValuePair$2(e,t))],$kind:"interface"}}),Bridge.define("System.String",{inherits:[System.IComparable,System.ICloneable,System.Collections.IEnumerable,System.Collections.Generic.IEnumerable$1(System.Char)],statics:{$is:function(e){return typeof e=="string"},charCodeAt:function(e,t){t=t||0;var i=e.charCodeAt(t),r,n;if(55296<=i&&i<=56319){if(r=i,n=e.charCodeAt(t+1),isNaN(n))throw new System.Exception("High surrogate not followed by low surrogate");return(r-55296)*1024+(n-56320)+65536}return 56320<=i&&i<=57343?!1:i},fromCharCode:function(e){return e>65535?(e-=65536,String.fromCharCode(55296+(e>>10),56320+(e&1023))):String.fromCharCode(e)},fromCharArray:function(e,t,i){var r,n,s;if(e==null)throw new System.ArgumentNullException.$ctor1("chars");if(t<0)throw new System.ArgumentOutOfRangeException.$ctor1("startIndex");if(i<0)throw new System.ArgumentOutOfRangeException.$ctor1("length");if(e.length-t<i)throw new System.ArgumentOutOfRangeException.$ctor1("startIndex");for(r="",t=t||0,i=Bridge.isNumber(i)?i:e.length,t+i>e.length&&(i=e.length-t),n=0;n<i;n++)s=e[n+t]|0,r+=String.fromCharCode(s);return r},lastIndexOf:function(e,t,i,r){var n=e.lastIndexOf(t,i);return n<i-r+1?-1:n},lastIndexOfAny:function(e,t,i,r){var n=e.length,s,o;if(!n)return-1;for(t=String.fromCharCode.apply(null,t),i=i||n-1,r=r||n,s=i-r+1,s<0&&(s=0),o=i;o>=s;o--)if(t.indexOf(e.charAt(o))>=0)return o;return-1},isNullOrWhiteSpace:function(e){return e?System.Char.isWhiteSpace(e):!0},isNullOrEmpty:function(e){return!e},fromCharCount:function(e,t){if(t>=0)return String(Array(t+1).join(String.fromCharCode(e)));throw new System.ArgumentOutOfRangeException.$ctor4("count","cannot be less than zero")},format:function(e,t){return System.String._format(System.Globalization.CultureInfo.getCurrentCulture(),e,Array.isArray(t)&&arguments.length==2?t:Array.prototype.slice.call(arguments,1))},formatProvider:function(e,t,i){return System.String._format(e,t,Array.isArray(i)&&arguments.length==3?i:Array.prototype.slice.call(arguments,2))},_format:function(e,t,i){var r;if(t==null)throw new System.ArgumentNullException.$ctor1("format");r=function(a){return a.split("").reverse().join("")},t=r(r(t.replace(/\{\{/g,function(a){return String.fromCharCode(1,1)})).replace(/\}\}/g,function(a){return String.fromCharCode(2,2)}));var n=this,s=/(\{+)((\d+|[a-zA-Z_$]\w+(?:\.[a-zA-Z_$]\w+|\[\d+\])*)(?:\,(-?\d*))?(?:\:([^\}]*))?)(\}+)|(\{+)|(\}+)/g,o=this.decodeBraceSequence;return t=t.replace(s,function(a,l,u,d,f,C,E,T,w){return T?o(T):w?o(w):l.length%2==0||E.length%2==0?o(l)+u+o(E):o(l,!0)+n.handleElement(e,d,f,C,i)+o(E,!0)}),t.replace(/(\x01\x01)|(\x02\x02)/g,function(a){return a==String.fromCharCode(1,1)?"{":a==String.fromCharCode(2,2)?"}":void 0})},handleElement:function(e,t,i,r,n){var s;if(t=parseInt(t,10),t>n.length-1)throw new System.FormatException.$ctor1("Input string was not in a correct format.");return s=n[t],s==null&&(s=""),r&&s.$boxed&&s.type.$kind==="enum"?s=System.Enum.format(s.type,s.v,r):r&&s.$boxed&&s.type.format?s=s.type.format(Bridge.unbox(s,!0),r,e):r&&Bridge.is(s,System.IFormattable)&&(s=Bridge.format(Bridge.unbox(s,!0),r,e)),s=Bridge.isNumber(s)?Bridge.Int.format(s,r,e):Bridge.isDate(s)?System.DateTime.format(s,r,e):""+Bridge.toString(s),i&&(i=parseInt(i,10),Bridge.isNumber(i)||(i=null)),System.String.alignString(Bridge.toString(s),i)},decodeBraceSequence:function(e,t){return e.substr(0,(e.length+(t?0:1))/2)},alignString:function(e,t,i,r,n){if(e==null||!t)return e;if(i||(i=" "),Bridge.isNumber(i)&&(i=String.fromCharCode(i)),r||(r=t<0?1:2),t=Math.abs(t),n&&e.length>t&&(e=e.substring(0,t)),t+1>=e.length)switch(r){case 2:e=Array(t+1-e.length).join(i)+e;break;case 3:var s=t-e.length,o=Math.ceil(s/2),a=s-o;e=Array(a+1).join(i)+e+Array(o+1).join(i);break;case 1:default:e=e+Array(t+1-e.length).join(i);break}return e},startsWith:function(e,t){return t.length?t.length>e.length?!1:System.String.equals(e.slice(0,t.length),t,arguments[2]):!0},endsWith:function(e,t){return t.length?t.length>e.length?!1:System.String.equals(e.slice(e.length-t.length,e.length),t,arguments[2]):!0},contains:function(e,t){if(t==null)throw new System.ArgumentNullException;return e==null?!1:e.indexOf(t)>-1},indexOfAny:function(e,t){var i,r,n;if(t==null)throw new System.ArgumentNullException;if(e==null||e==="")return-1;if(i=arguments.length>2?arguments[2]:0,i<0)throw new System.ArgumentOutOfRangeException.$ctor4("startIndex","startIndex cannot be less than zero");if(r=e.length-i,arguments.length>3&&arguments[3]!=null&&(r=arguments[3]),r<0)throw new System.ArgumentOutOfRangeException.$ctor4("length","must be non-negative");if(r>e.length-i)throw new System.ArgumentOutOfRangeException.$ctor4("length","Index and length must refer to a location within the string");for(r=i+r,t=String.fromCharCode.apply(null,t),n=i;n<r;n++)if(t.indexOf(e.charAt(n))>=0)return n;return-1},indexOf:function(e,t){var i,r,n,s;if(t==null)throw new System.ArgumentNullException;if(e==null||e==="")return-1;if(i=arguments.length>2?arguments[2]:0,i<0||i>e.length)throw new System.ArgumentOutOfRangeException.$ctor4("startIndex","startIndex cannot be less than zero and must refer to a location within the string");if(t==="")return arguments.length>2?i:0;if(r=e.length-i,arguments.length>3&&arguments[3]!=null&&(r=arguments[3]),r<0)throw new System.ArgumentOutOfRangeException.$ctor4("length","must be non-negative");if(r>e.length-i)throw new System.ArgumentOutOfRangeException.$ctor4("length","Index and length must refer to a location within the string");return n=e.substr(i,r),s=arguments.length===5&&arguments[4]%2!=0?n.toLocaleUpperCase().indexOf(t.toLocaleUpperCase()):n.indexOf(t),s>-1?arguments.length===5?System.String.compare(t,n.substr(s,t.length),arguments[4])===0?s+i:-1:s+i:-1},equals:function(){return System.String.compare.apply(this,arguments)===0},swapCase:function(e){return e.replace(/\w/g,function(t){return t===t.toLowerCase()?t.toUpperCase():t.toLowerCase()})},compare:function(e,t){if(e==null)return t==null?0:-1;if(t==null)return 1;if(arguments.length>=3)if(Bridge.isBoolean(arguments[2])){if(arguments[2]&&(e=e.toLocaleUpperCase(),t=t.toLocaleUpperCase()),arguments.length===4)return e.localeCompare(t,arguments[3].name)}else switch(arguments[2]){case 1:return e.localeCompare(t,System.Globalization.CultureInfo.getCurrentCulture().name,{sensitivity:"accent"});case 2:return e.localeCompare(t,System.Globalization.CultureInfo.invariantCulture.name);case 3:return e.localeCompare(t,System.Globalization.CultureInfo.invariantCulture.name,{sensitivity:"accent"});case 4:return e===t?0:e>t?1:-1;case 5:return e.toUpperCase()===t.toUpperCase()?0:e.toUpperCase()>t.toUpperCase()?1:-1;case 0:default:break}return e.localeCompare(t)},toCharArray:function(e,t,i){var r,n;if(t<0||t>e.length||t>e.length-i)throw new System.ArgumentOutOfRangeException.$ctor4("startIndex","startIndex cannot be less than zero and must refer to a location within the string");if(i<0)throw new System.ArgumentOutOfRangeException.$ctor4("length","must be non-negative");for(Bridge.hasValue(t)||(t=0),Bridge.hasValue(i)||(i=e.length),r=[],n=t;n<t+i;n++)r.push(e.charCodeAt(n));return r},escape:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},replaceAll:function(e,t,i){var r=new RegExp(System.String.escape(t),"g");return e.replace(r,i)},insert:function(e,t,i){return e>0?t.substring(0,e)+i+t.substring(e,t.length):i+t},remove:function(e,t,i){if(e==null)throw new System.NullReferenceException;if(t<0)throw new System.ArgumentOutOfRangeException.$ctor4("startIndex","StartIndex cannot be less than zero");if(i!=null){if(i<0)throw new System.ArgumentOutOfRangeException.$ctor4("count","Count cannot be less than zero");if(i>e.length-t)throw new System.ArgumentOutOfRangeException.$ctor4("count","Index and count must refer to a location within the string")}else if(t>=e.length)throw new System.ArgumentOutOfRangeException.$ctor4("startIndex","startIndex must be less than length of string");return i==null||t+i>e.length?e.substr(0,t):e.substr(0,t)+e.substr(t+i)},split:function(e,t,i,r){for(var n=!Bridge.hasValue(t)||t.length===0?new RegExp("\\s","g"):new RegExp(t.map(System.String.escape).join("|"),"g"),s=[],o,a=0;;a=n.lastIndex)if(o=n.exec(e)){if(r!==1||o.index>a){if(s.length===i-1)return s.push(e.substr(a)),s;s.push(e.substring(a,o.index))}}else return(r!==1||a!==e.length)&&s.push(e.substr(a)),s},trimEnd:function(e,t){return e.replace(t?new RegExp("["+System.String.escape(String.fromCharCode.apply(null,t))+"]+$"):/\s*$/,"")},trimStart:function(e,t){return e.replace(t?new RegExp("^["+System.String.escape(String.fromCharCode.apply(null,t))+"]+"):/^\s*/,"")},trim:function(e,t){return System.String.trimStart(System.String.trimEnd(e,t),t)},trimStartZeros:function(e){return e.replace(new RegExp("^[ 0+]+(?=.)"),"")},concat:function(e){for(var t=arguments.length==1&&Array.isArray(e)?e:[].slice.call(arguments),i="",r=0;r<t.length;r++)i+=t[r]==null?"":Bridge.toString(t[r]);return i},copyTo:function(e,t,i,r,n){if(i==null)throw new System.ArgumentNullException.$ctor1("destination");if(e==null)throw new System.ArgumentNullException.$ctor1("str");if(n<0)throw new System.ArgumentOutOfRangeException.$ctor1("count");if(t<0)throw new System.ArgumentOutOfRangeException.$ctor1("sourceIndex");if(n>e.length-t)throw new System.ArgumentOutOfRangeException.$ctor1("sourceIndex");if(r>i.length-n||r<0)throw new System.ArgumentOutOfRangeException.$ctor1("destinationIndex");if(n>0)for(var s=0;s<n;s++)i[r+s]=e.charCodeAt(t+s)}}}),Bridge.Class.addExtend(System.String,[System.IComparable$1(System.String),System.IEquatable$1(System.String)]),Bridge.define("System.Collections.Generic.KeyValuePair$2",function(e,t){return{$kind:"struct",statics:{methods:{getDefaultValue:function(){return new(System.Collections.Generic.KeyValuePair$2(e,t))}}},fields:{key$1:Bridge.getDefaultValue(e),value$1:Bridge.getDefaultValue(t)},props:{key:{get:function(){return this.key$1}},value:{get:function(){return this.value$1}}},ctors:{$ctor1:function(i,r){this.$initialize(),this.key$1=i,this.value$1=r},ctor:function(){this.$initialize()}},methods:{toString:function(){var i=System.Text.StringBuilderCache.Acquire();return i.append(String.fromCharCode(91)),this.key!=null&&i.append(Bridge.toString(this.key)),i.append(", "),this.value!=null&&i.append(Bridge.toString(this.value)),i.append(String.fromCharCode(93)),System.Text.StringBuilderCache.GetStringAndRelease(i)},Deconstruct:function(i,r){i.v=this.key,r.v=this.value},getHashCode:function(){return Bridge.addHash([5072499452,this.key$1,this.value$1])},equals:function(i){return Bridge.is(i,System.Collections.Generic.KeyValuePair$2(e,t))?Bridge.equals(this.key$1,i.key$1)&&Bridge.equals(this.value$1,i.value$1):!1},$clone:function(i){return this}}}}),Bridge.define("System.Collections.IEnumerator",{$kind:"interface"}),Bridge.define("System.Collections.IComparer",{$kind:"interface"}),Bridge.define("System.Collections.IDictionaryEnumerator",{inherits:[System.Collections.IEnumerator],$kind:"interface"}),Bridge.define("System.Collections.IEqualityComparer",{$kind:"interface"}),Bridge.define("System.Collections.IStructuralComparable",{$kind:"interface"}),Bridge.define("System.Collections.IStructuralEquatable",{$kind:"interface"}),Bridge.definei("System.Collections.Generic.IEnumerator$1",function(e){return{inherits:[System.IDisposable,System.Collections.IEnumerator],$kind:"interface",$variance:[1]}}),Bridge.definei("System.Collections.Generic.IComparer$1",function(e){return{$kind:"interface",$variance:[2]}}),Bridge.define("System.Collections.KeyValuePairs",{fields:{key:null,value:null},props:{Key:{get:function(){return this.key}},Value:{get:function(){return this.value}}},ctors:{ctor:function(e,t){this.$initialize(),this.value=t,this.key=e}}}),Bridge.define("System.Collections.SortedList",{inherits:[System.Collections.IDictionary,System.ICloneable],statics:{fields:{emptyArray:null},ctors:{init:function(){this.emptyArray=System.Array.init(0,null,System.Object)}},methods:{Synchronized:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("list");return new System.Collections.SortedList.SyncSortedList(e)}}},fields:{keys:null,values:null,_size:0,version:0,comparer:null,keyList:null,valueList:null},props:{Capacity:{get:function(){return this.keys.length},set:function(e){if(e<this.Count)throw new System.ArgumentOutOfRangeException.$ctor1("value");if(e!==this.keys.length)if(e>0){var t=System.Array.init(e,null,System.Object),i=System.Array.init(e,null,System.Object);this._size>0&&(System.Array.copy(this.keys,0,t,0,this._size),System.Array.copy(this.values,0,i,0,this._size)),this.keys=t,this.values=i}else this.keys=System.Collections.SortedList.emptyArray,this.values=System.Collections.SortedList.emptyArray}},Count:{get:function(){return this._size}},Keys:{get:function(){return this.GetKeyList()}},Values:{get:function(){return this.GetValueList()}},IsReadOnly:{get:function(){return!1}},IsFixedSize:{get:function(){return!1}},IsSynchronized:{get:function(){return!1}},SyncRoot:{get:function(){return null}}},alias:["add","System$Collections$IDictionary$add","Count","System$Collections$ICollection$Count","Keys","System$Collections$IDictionary$Keys","Values","System$Collections$IDictionary$Values","IsReadOnly","System$Collections$IDictionary$IsReadOnly","IsFixedSize","System$Collections$IDictionary$IsFixedSize","IsSynchronized","System$Collections$ICollection$IsSynchronized","SyncRoot","System$Collections$ICollection$SyncRoot","clear","System$Collections$IDictionary$clear","clone","System$ICloneable$clone","contains","System$Collections$IDictionary$contains","copyTo","System$Collections$ICollection$copyTo","GetEnumerator","System$Collections$IDictionary$GetEnumerator","getItem","System$Collections$IDictionary$getItem","setItem","System$Collections$IDictionary$setItem","remove","System$Collections$IDictionary$remove"],ctors:{ctor:function(){this.$initialize(),this.Init()},$ctor5:function(e){if(this.$initialize(),e<0)throw new System.ArgumentOutOfRangeException.$ctor1("initialCapacity");this.keys=System.Array.init(e,null,System.Object),this.values=System.Array.init(e,null,System.Object),this.comparer=new(System.Collections.Generic.Comparer$1(Object))(System.Collections.Generic.Comparer$1.$default.fn)},$ctor1:function(e){System.Collections.SortedList.ctor.call(this),e!=null&&(this.comparer=e)},$ctor2:function(e,t){System.Collections.SortedList.$ctor1.call(this,e),this.Capacity=t},$ctor3:function(e){System.Collections.SortedList.$ctor4.call(this,e,null)},$ctor4:function(e,t){if(System.Collections.SortedList.$ctor2.call(this,t,e!=null?System.Array.getCount(e):0),e==null)throw new System.ArgumentNullException.$ctor1("d");System.Array.copyTo(e.System$Collections$IDictionary$Keys,this.keys,0),System.Array.copyTo(e.System$Collections$IDictionary$Values,this.values,0),System.Array.sortDict(this.keys,this.values,0,null,t),this._size=System.Array.getCount(e)}},methods:{getItem:function(e){var t=this.IndexOfKey(e);return t>=0?this.values[System.Array.index(t,this.values)]:null},setItem:function(e,t){if(e==null)throw new System.ArgumentNullException.$ctor1("key");var i=System.Array.binarySearch(this.keys,0,this._size,e,this.comparer);if(i>=0){this.values[System.Array.index(i,this.values)]=t,this.version=this.version+1|0;return}this.Insert(~i,e,t)},Init:function(){this.keys=System.Collections.SortedList.emptyArray,this.values=System.Collections.SortedList.emptyArray,this._size=0,this.comparer=new(System.Collections.Generic.Comparer$1(Object))(System.Collections.Generic.Comparer$1.$default.fn)},add:function(e,t){if(e==null)throw new System.ArgumentNullException.$ctor1("key");var i=System.Array.binarySearch(this.keys,0,this._size,e,this.comparer);if(i>=0)throw new System.ArgumentException.ctor;this.Insert(~i,e,t)},clear:function(){this.version=this.version+1|0,System.Array.fill(this.keys,null,0,this._size),System.Array.fill(this.values,null,0,this._size),this._size=0},clone:function(){var e=new System.Collections.SortedList.$ctor5(this._size);return System.Array.copy(this.keys,0,e.keys,0,this._size),System.Array.copy(this.values,0,e.values,0,this._size),e._size=this._size,e.version=this.version,e.comparer=this.comparer,e},contains:function(e){return this.IndexOfKey(e)>=0},ContainsKey:function(e){return this.IndexOfKey(e)>=0},ContainsValue:function(e){return this.IndexOfValue(e)>=0},copyTo:function(e,t){var i,r;if(e==null)throw new System.ArgumentNullException.$ctor1("array");if(System.Array.getRank(e)!==1)throw new System.ArgumentException.ctor;if(t<0)throw new System.ArgumentOutOfRangeException.$ctor1("arrayIndex");if((e.length-t|0)<this.Count)throw new System.ArgumentException.ctor;for(i=0;i<this.Count;i=i+1|0)r=new System.Collections.DictionaryEntry.$ctor1(this.keys[System.Array.index(i,this.keys)],this.values[System.Array.index(i,this.values)]),System.Array.set(e,r.$clone(),i+t|0)},ToKeyValuePairsArray:function(){for(var e=System.Array.init(this.Count,null,System.Collections.KeyValuePairs),t=0;t<this.Count;t=t+1|0)e[System.Array.index(t,e)]=new System.Collections.KeyValuePairs(this.keys[System.Array.index(t,this.keys)],this.values[System.Array.index(t,this.values)]);return e},EnsureCapacity:function(e){var t=this.keys.length===0?16:Bridge.Int.mul(this.keys.length,2);t>>>0>2146435071&&(t=2146435071),t<e&&(t=e),this.Capacity=t},GetByIndex:function(e){if(e<0||e>=this.Count)throw new System.ArgumentOutOfRangeException.$ctor1("index");return this.values[System.Array.index(e,this.values)]},System$Collections$IEnumerable$GetEnumerator:function(){return new System.Collections.SortedList.SortedListEnumerator(this,0,this._size,System.Collections.SortedList.SortedListEnumerator.DictEntry)},GetEnumerator:function(){return new System.Collections.SortedList.SortedListEnumerator(this,0,this._size,System.Collections.SortedList.SortedListEnumerator.DictEntry)},GetKey:function(e){if(e<0||e>=this.Count)throw new System.ArgumentOutOfRangeException.$ctor1("index");return this.keys[System.Array.index(e,this.keys)]},GetKeyList:function(){return this.keyList==null&&(this.keyList=new System.Collections.SortedList.KeyList(this)),this.keyList},GetValueList:function(){return this.valueList==null&&(this.valueList=new System.Collections.SortedList.ValueList(this)),this.valueList},IndexOfKey:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("key");var t=System.Array.binarySearch(this.keys,0,this._size,e,this.comparer);return t>=0?t:-1},IndexOfValue:function(e){return System.Array.indexOfT(this.values,e,0,this._size)},Insert:function(e,t,i){this._size===this.keys.length&&this.EnsureCapacity(this._size+1|0),e<this._size&&(System.Array.copy(this.keys,e,this.keys,e+1|0,this._size-e|0),System.Array.copy(this.values,e,this.values,e+1|0,this._size-e|0)),this.keys[System.Array.index(e,this.keys)]=t,this.values[System.Array.index(e,this.values)]=i,this._size=this._size+1|0,this.version=this.version+1|0},RemoveAt:function(e){if(e<0||e>=this.Count)throw new System.ArgumentOutOfRangeException.$ctor1("index");this._size=this._size-1|0,e<this._size&&(System.Array.copy(this.keys,e+1|0,this.keys,e,this._size-e|0),System.Array.copy(this.values,e+1|0,this.values,e,this._size-e|0)),this.keys[System.Array.index(this._size,this.keys)]=null,this.values[System.Array.index(this._size,this.values)]=null,this.version=this.version+1|0},remove:function(e){var t=this.IndexOfKey(e);t>=0&&this.RemoveAt(t)},SetByIndex:function(e,t){if(e<0||e>=this.Count)throw new System.ArgumentOutOfRangeException.$ctor1("index");this.values[System.Array.index(e,this.values)]=t,this.version=this.version+1|0},TrimToSize:function(){this.Capacity=this._size}}}),Bridge.define("System.Collections.SortedList.KeyList",{inherits:[System.Collections.IList],$kind:"nested class",fields:{sortedList:null},props:{Count:{get:function(){return this.sortedList._size}},IsReadOnly:{get:function(){return!0}},IsFixedSize:{get:function(){return!0}},IsSynchronized:{get:function(){return this.sortedList.IsSynchronized}},SyncRoot:{get:function(){return this.sortedList.SyncRoot}}},alias:["Count","System$Collections$ICollection$Count","IsReadOnly","System$Collections$IList$IsReadOnly","IsFixedSize","System$Collections$IList$IsFixedSize","IsSynchronized","System$Collections$ICollection$IsSynchronized","SyncRoot","System$Collections$ICollection$SyncRoot","add","System$Collections$IList$add","clear","System$Collections$IList$clear","contains","System$Collections$IList$contains","copyTo","System$Collections$ICollection$copyTo","insert","System$Collections$IList$insert","getItem","System$Collections$IList$getItem","setItem","System$Collections$IList$setItem","GetEnumerator","System$Collections$IEnumerable$GetEnumerator","indexOf","System$Collections$IList$indexOf","remove","System$Collections$IList$remove","removeAt","System$Collections$IList$removeAt"],ctors:{ctor:function(e){this.$initialize(),this.sortedList=e}},methods:{getItem:function(e){return this.sortedList.GetKey(e)},setItem:function(e,t){throw new System.NotSupportedException.ctor},add:function(e){throw new System.NotSupportedException.ctor},clear:function(){throw new System.NotSupportedException.ctor},contains:function(e){return this.sortedList.contains(e)},copyTo:function(e,t){if(e!=null&&System.Array.getRank(e)!==1)throw new System.ArgumentException.ctor;System.Array.copy(this.sortedList.keys,0,e,t,this.sortedList.Count)},insert:function(e,t){throw new System.NotSupportedException.ctor},GetEnumerator:function(){return new System.Collections.SortedList.SortedListEnumerator(this.sortedList,0,this.sortedList.Count,System.Collections.SortedList.SortedListEnumerator.Keys)},indexOf:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("key");var t=System.Array.binarySearch(this.sortedList.keys,0,this.sortedList.Count,e,this.sortedList.comparer);return t>=0?t:-1},remove:function(e){throw new System.NotSupportedException.ctor},removeAt:function(e){throw new System.NotSupportedException.ctor}}}),Bridge.define("System.Collections.SortedList.SortedListDebugView",{$kind:"nested class",fields:{sortedList:null},props:{Items:{get:function(){return this.sortedList.ToKeyValuePairsArray()}}},ctors:{ctor:function(e){if(this.$initialize(),e==null)throw new System.ArgumentNullException.$ctor1("sortedList");this.sortedList=e}}}),Bridge.define("System.Collections.SortedList.SortedListEnumerator",{inherits:[System.Collections.IDictionaryEnumerator,System.ICloneable],$kind:"nested class",statics:{fields:{Keys:0,Values:0,DictEntry:0},ctors:{init:function(){this.Keys=1,this.Values=2,this.DictEntry=3}}},fields:{sortedList:null,key:null,value:null,index:0,startIndex:0,endIndex:0,version:0,current:!1,getObjectRetType:0},props:{Key:{get:function(){if(this.version!==this.sortedList.version)throw new System.InvalidOperationException.ctor;if(this.current===!1)throw new System.InvalidOperationException.ctor;return this.key}},Entry:{get:function(){if(this.version!==this.sortedList.version)throw new System.InvalidOperationException.ctor;if(this.current===!1)throw new System.InvalidOperationException.ctor;return new System.Collections.DictionaryEntry.$ctor1(this.key,this.value)}},Current:{get:function(){if(this.current===!1)throw new System.InvalidOperationException.ctor;return this.getObjectRetType===System.Collections.SortedList.SortedListEnumerator.Keys?this.key:this.getObjectRetType===System.Collections.SortedList.SortedListEnumerator.Values?this.value:new System.Collections.DictionaryEntry.$ctor1(this.key,this.value).$clone()}},Value:{get:function(){if(this.version!==this.sortedList.version)throw new System.InvalidOperationException.ctor;if(this.current===!1)throw new System.InvalidOperationException.ctor;return this.value}}},alias:["clone","System$ICloneable$clone","Key","System$Collections$IDictionaryEnumerator$Key","moveNext","System$Collections$IEnumerator$moveNext","Entry","System$Collections$IDictionaryEnumerator$Entry","Current","System$Collections$IEnumerator$Current","Value","System$Collections$IDictionaryEnumerator$Value","reset","System$Collections$IEnumerator$reset"],ctors:{ctor:function(e,t,i,r){this.$initialize(),this.sortedList=e,this.index=t,this.startIndex=t,this.endIndex=t+i|0,this.version=e.version,this.getObjectRetType=r,this.current=!1}},methods:{clone:function(){return Bridge.clone(this)},moveNext:function(){var e,t;if(this.version!==this.sortedList.version)throw new System.InvalidOperationException.ctor;return this.index<this.endIndex?(this.key=(e=this.sortedList.keys)[System.Array.index(this.index,e)],this.value=(t=this.sortedList.values)[System.Array.index(this.index,t)],this.index=this.index+1|0,this.current=!0,!0):(this.key=null,this.value=null,this.current=!1,!1)},reset:function(){if(this.version!==this.sortedList.version)throw new System.InvalidOperationException.ctor;this.index=this.startIndex,this.current=!1,this.key=null,this.value=null}}}),Bridge.define("System.Collections.SortedList.SyncSortedList",{inherits:[System.Collections.SortedList],$kind:"nested class",fields:{_list:null,_root:null},props:{Count:{get:function(){return this._root,this._list.Count}},SyncRoot:{get:function(){return this._root}},IsReadOnly:{get:function(){return this._list.IsReadOnly}},IsFixedSize:{get:function(){return this._list.IsFixedSize}},IsSynchronized:{get:function(){return!0}},Capacity:{get:function(){return this._root,this._list.Capacity}}},alias:["Count","System$Collections$ICollection$Count","SyncRoot","System$Collections$ICollection$SyncRoot","IsReadOnly","System$Collections$IDictionary$IsReadOnly","IsFixedSize","System$Collections$IDictionary$IsFixedSize","IsSynchronized","System$Collections$ICollection$IsSynchronized","getItem","System$Collections$IDictionary$getItem","setItem","System$Collections$IDictionary$setItem","add","System$Collections$IDictionary$add","clear","System$Collections$IDictionary$clear","clone","System$ICloneable$clone","contains","System$Collections$IDictionary$contains","copyTo","System$Collections$ICollection$copyTo","GetEnumerator","System$Collections$IDictionary$GetEnumerator","GetEnumerator","System$Collections$IEnumerable$GetEnumerator","remove","System$Collections$IDictionary$remove"],ctors:{ctor:function(e){this.$initialize(),System.Collections.SortedList.ctor.call(this),this._list=e,this._root=e.SyncRoot}},methods:{getItem:function(e){return this._root,this._list.getItem(e)},setItem:function(e,t){this._root,this._list.setItem(e,t)},add:function(e,t){this._root,this._list.add(e,t)},clear:function(){this._root,this._list.clear()},clone:function(){return this._root,this._list.clone()},contains:function(e){return this._root,this._list.contains(e)},ContainsKey:function(e){return this._root,this._list.ContainsKey(e)},ContainsValue:function(e){return this._root,this._list.ContainsValue(e)},copyTo:function(e,t){this._root,this._list.copyTo(e,t)},GetByIndex:function(e){return this._root,this._list.GetByIndex(e)},GetEnumerator:function(){return this._root,this._list.GetEnumerator()},GetKey:function(e){return this._root,this._list.GetKey(e)},GetKeyList:function(){return this._root,this._list.GetKeyList()},GetValueList:function(){return this._root,this._list.GetValueList()},IndexOfKey:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("key");return this._list.IndexOfKey(e)},IndexOfValue:function(e){return this._root,this._list.IndexOfValue(e)},RemoveAt:function(e){this._root,this._list.RemoveAt(e)},remove:function(e){this._root,this._list.remove(e)},SetByIndex:function(e,t){this._root,this._list.SetByIndex(e,t)},ToKeyValuePairsArray:function(){return this._list.ToKeyValuePairsArray()},TrimToSize:function(){this._root,this._list.TrimToSize()}}}),Bridge.define("System.Collections.SortedList.ValueList",{inherits:[System.Collections.IList],$kind:"nested class",fields:{sortedList:null},props:{Count:{get:function(){return this.sortedList._size}},IsReadOnly:{get:function(){return!0}},IsFixedSize:{get:function(){return!0}},IsSynchronized:{get:function(){return this.sortedList.IsSynchronized}},SyncRoot:{get:function(){return this.sortedList.SyncRoot}}},alias:["Count","System$Collections$ICollection$Count","IsReadOnly","System$Collections$IList$IsReadOnly","IsFixedSize","System$Collections$IList$IsFixedSize","IsSynchronized","System$Collections$ICollection$IsSynchronized","SyncRoot","System$Collections$ICollection$SyncRoot","add","System$Collections$IList$add","clear","System$Collections$IList$clear","contains","System$Collections$IList$contains","copyTo","System$Collections$ICollection$copyTo","insert","System$Collections$IList$insert","getItem","System$Collections$IList$getItem","setItem","System$Collections$IList$setItem","GetEnumerator","System$Collections$IEnumerable$GetEnumerator","indexOf","System$Collections$IList$indexOf","remove","System$Collections$IList$remove","removeAt","System$Collections$IList$removeAt"],ctors:{ctor:function(e){this.$initialize(),this.sortedList=e}},methods:{getItem:function(e){return this.sortedList.GetByIndex(e)},setItem:function(e,t){throw new System.NotSupportedException.ctor},add:function(e){throw new System.NotSupportedException.ctor},clear:function(){throw new System.NotSupportedException.ctor},contains:function(e){return this.sortedList.ContainsValue(e)},copyTo:function(e,t){if(e!=null&&System.Array.getRank(e)!==1)throw new System.ArgumentException.ctor;System.Array.copy(this.sortedList.values,0,e,t,this.sortedList.Count)},insert:function(e,t){throw new System.NotSupportedException.ctor},GetEnumerator:function(){return new System.Collections.SortedList.SortedListEnumerator(this.sortedList,0,this.sortedList.Count,System.Collections.SortedList.SortedListEnumerator.Values)},indexOf:function(e){return System.Array.indexOfT(this.sortedList.values,e,0,this.sortedList.Count)},remove:function(e){throw new System.NotSupportedException.ctor},removeAt:function(e){throw new System.NotSupportedException.ctor}}}),Bridge.define("System.Collections.Generic.SortedList$2",function(e,t){return{inherits:[System.Collections.Generic.IDictionary$2(e,t),System.Collections.IDictionary,System.Collections.Generic.IReadOnlyDictionary$2(e,t)],statics:{fields:{_defaultCapacity:0,MaxArrayLength:0,emptyKeys:null,emptyValues:null},ctors:{init:function(){this._defaultCapacity=4,this.MaxArrayLength=2146435071,this.emptyKeys=System.Array.init(0,function(){return Bridge.getDefaultValue(e)},e),this.emptyValues=System.Array.init(0,function(){return Bridge.getDefaultValue(t)},t)}},methods:{IsCompatibleKey:function(i){return i==null&&System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.key),Bridge.is(i,e)}}},fields:{keys:null,values:null,_size:0,version:0,comparer:null,keyList:null,valueList:null},props:{Capacity:{get:function(){return this.keys.length},set:function(i){if(i!==this.keys.length)if(i<this._size&&System.ThrowHelper.ThrowArgumentOutOfRangeException$2(System.ExceptionArgument.value,System.ExceptionResource.ArgumentOutOfRange_SmallCapacity),i>0){var r=System.Array.init(i,function(){return Bridge.getDefaultValue(e)},e),n=System.Array.init(i,function(){return Bridge.getDefaultValue(t)},t);this._size>0&&(System.Array.copy(this.keys,0,r,0,this._size),System.Array.copy(this.values,0,n,0,this._size)),this.keys=r,this.values=n}else this.keys=System.Collections.Generic.SortedList$2(e,t).emptyKeys,this.values=System.Collections.Generic.SortedList$2(e,t).emptyValues}},Comparer:{get:function(){return this.comparer}},Count:{get:function(){return this._size}},Keys:{get:function(){return this.GetKeyListHelper()}},System$Collections$Generic$IDictionary$2$Keys:{get:function(){return this.GetKeyListHelper()}},System$Collections$IDictionary$Keys:{get:function(){return this.GetKeyListHelper()}},System$Collections$Generic$IReadOnlyDictionary$2$Keys:{get:function(){return this.GetKeyListHelper()}},Values:{get:function(){return this.GetValueListHelper()}},System$Collections$Generic$IDictionary$2$Values:{get:function(){return this.GetValueListHelper()}},System$Collections$IDictionary$Values:{get:function(){return this.GetValueListHelper()}},System$Collections$Generic$IReadOnlyDictionary$2$Values:{get:function(){return this.GetValueListHelper()}},System$Collections$Generic$ICollection$1$IsReadOnly:{get:function(){return!1}},System$Collections$IDictionary$IsReadOnly:{get:function(){return!1}},System$Collections$IDictionary$IsFixedSize:{get:function(){return!1}},System$Collections$ICollection$IsSynchronized:{get:function(){return!1}},System$Collections$ICollection$SyncRoot:{get:function(){return null}}},alias:["add","System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$add","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$add","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$add","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$contains","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$contains","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$remove","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$remove","Count",["System$Collections$Generic$IReadOnlyCollection$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$Count","System$Collections$Generic$IReadOnlyCollection$1$Count"],"Count","System$Collections$ICollection$Count","Count","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$Count","System$Collections$Generic$IDictionary$2$Keys","System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$Keys","System$Collections$Generic$IReadOnlyDictionary$2$Keys","System$Collections$Generic$IReadOnlyDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$Keys","System$Collections$Generic$IDictionary$2$Values","System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$Values","System$Collections$Generic$IReadOnlyDictionary$2$Values","System$Collections$Generic$IReadOnlyDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$Values","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$IsReadOnly","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$IsReadOnly","clear","System$Collections$IDictionary$clear","clear","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$clear","containsKey","System$Collections$Generic$IReadOnlyDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$containsKey","containsKey","System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$containsKey","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$copyTo","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$copyTo","System$Collections$Generic$IEnumerable$1$System$Collections$Generic$KeyValuePair$2$GetEnumerator","System$Collections$Generic$IEnumerable$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$GetEnumerator","getItem","System$Collections$Generic$IReadOnlyDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$getItem","setItem","System$Collections$Generic$IReadOnlyDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$setItem","getItem","System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$getItem","setItem","System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$setItem","getItem$1","System$Collections$IDictionary$getItem","setItem$1","System$Collections$IDictionary$setItem","tryGetValue","System$Collections$Generic$IReadOnlyDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$tryGetValue","tryGetValue","System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$tryGetValue","remove","System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$remove"],ctors:{ctor:function(){this.$initialize(),this.keys=System.Collections.Generic.SortedList$2(e,t).emptyKeys,this.values=System.Collections.Generic.SortedList$2(e,t).emptyValues,this._size=0,this.comparer=new(System.Collections.Generic.Comparer$1(e))(System.Collections.Generic.Comparer$1.$default.fn)},$ctor4:function(i){this.$initialize(),i<0&&System.ThrowHelper.ThrowArgumentOutOfRangeException$1(System.ExceptionArgument.capacity),this.keys=System.Array.init(i,function(){return Bridge.getDefaultValue(e)},e),this.values=System.Array.init(i,function(){return Bridge.getDefaultValue(t)},t),this.comparer=new(System.Collections.Generic.Comparer$1(e))(System.Collections.Generic.Comparer$1.$default.fn)},$ctor1:function(i){System.Collections.Generic.SortedList$2(e,t).ctor.call(this),i!=null&&(this.comparer=i)},$ctor5:function(i,r){System.Collections.Generic.SortedList$2(e,t).$ctor1.call(this,r),this.Capacity=i},$ctor2:function(i){System.Collections.Generic.SortedList$2(e,t).$ctor3.call(this,i,null)},$ctor3:function(i,r){System.Collections.Generic.SortedList$2(e,t).$ctor5.call(this,i!=null?System.Array.getCount(i,System.Collections.Generic.KeyValuePair$2(e,t)):0,r),i==null&&System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.dictionary),System.Array.copyTo(i["System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$Keys"],this.keys,0,e),System.Array.copyTo(i["System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$Values"],this.values,0,t),System.Array.sortDict(this.keys,this.values,0,null,this.comparer),this._size=System.Array.getCount(i,System.Collections.Generic.KeyValuePair$2(e,t))}},methods:{getItem:function(i){var r=this.IndexOfKey(i);if(r>=0)return this.values[System.Array.index(r,this.values)];throw new System.Collections.Generic.KeyNotFoundException.ctor},setItem:function(i,r){i==null&&System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.key);var n=System.Array.binarySearch(this.keys,0,this._size,i,this.comparer);if(n>=0){this.values[System.Array.index(n,this.values)]=r,this.version=this.version+1|0;return}this.Insert(~n,i,r)},getItem$1:function(i){if(System.Collections.Generic.SortedList$2(e,t).IsCompatibleKey(i)){var r=this.IndexOfKey(Bridge.cast(Bridge.unbox(i,e),e));if(r>=0)return this.values[System.Array.index(r,this.values)]}return null},setItem$1:function(i,r){System.Collections.Generic.SortedList$2(e,t).IsCompatibleKey(i)||System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.key),System.ThrowHelper.IfNullAndNullsAreIllegalThenThrow(t,r,System.ExceptionArgument.value);try{var n=Bridge.cast(Bridge.unbox(i,e),e);try{this.setItem(n,Bridge.cast(Bridge.unbox(r,t),t))}catch(s){if(s=System.Exception.create(s),Bridge.is(s,System.InvalidCastException))System.ThrowHelper.ThrowWrongValueTypeArgumentException(System.Object,r,t);else throw s}}catch(s){if(s=System.Exception.create(s),Bridge.is(s,System.InvalidCastException))System.ThrowHelper.ThrowWrongKeyTypeArgumentException(System.Object,i,e);else throw s}},add:function(i,r){i==null&&System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.key);var n=System.Array.binarySearch(this.keys,0,this._size,i,this.comparer);n>=0&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Argument_AddingDuplicate),this.Insert(~n,i,r)},System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$add:function(i){this.add(i.key,i.value)},System$Collections$IDictionary$add:function(i,r){i==null&&System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.key),System.ThrowHelper.IfNullAndNullsAreIllegalThenThrow(t,r,System.ExceptionArgument.value);try{var n=Bridge.cast(Bridge.unbox(i,e),e);try{this.add(n,Bridge.cast(Bridge.unbox(r,t),t))}catch(s){if(s=System.Exception.create(s),Bridge.is(s,System.InvalidCastException))System.ThrowHelper.ThrowWrongValueTypeArgumentException(System.Object,r,t);else throw s}}catch(s){if(s=System.Exception.create(s),Bridge.is(s,System.InvalidCastException))System.ThrowHelper.ThrowWrongKeyTypeArgumentException(System.Object,i,e);else throw s}},System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$contains:function(i){var r=this.IndexOfKey(i.key);return!!(r>=0&&System.Collections.Generic.EqualityComparer$1(t).def.equals2(this.values[System.Array.index(r,this.values)],i.value))},System$Collections$IDictionary$contains:function(i){return System.Collections.Generic.SortedList$2(e,t).IsCompatibleKey(i)?this.containsKey(Bridge.cast(Bridge.unbox(i,e),e)):!1},System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$remove:function(i){var r=this.IndexOfKey(i.key);return r>=0&&System.Collections.Generic.EqualityComparer$1(t).def.equals2(this.values[System.Array.index(r,this.values)],i.value)?(this.RemoveAt(r),!0):!1},remove:function(i){var r=this.IndexOfKey(i);return r>=0&&this.RemoveAt(r),r>=0},System$Collections$IDictionary$remove:function(i){System.Collections.Generic.SortedList$2(e,t).IsCompatibleKey(i)&&this.remove(Bridge.cast(Bridge.unbox(i,e),e))},GetKeyListHelper:function(){return this.keyList==null&&(this.keyList=new(System.Collections.Generic.SortedList$2.KeyList(e,t))(this)),this.keyList},GetValueListHelper:function(){return this.valueList==null&&(this.valueList=new(System.Collections.Generic.SortedList$2.ValueList(e,t))(this)),this.valueList},clear:function(){this.version=this.version+1|0,System.Array.fill(this.keys,function(){return Bridge.getDefaultValue(e)},0,this._size),System.Array.fill(this.values,function(){return Bridge.getDefaultValue(t)},0,this._size),this._size=0},containsKey:function(i){return this.IndexOfKey(i)>=0},ContainsValue:function(i){return this.IndexOfValue(i)>=0},System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$copyTo:function(i,r){var n,s;for(i==null&&System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.array),(r<0||r>i.length)&&System.ThrowHelper.ThrowArgumentOutOfRangeException$2(System.ExceptionArgument.arrayIndex,System.ExceptionResource.ArgumentOutOfRange_NeedNonNegNum),(i.length-r|0)<this.Count&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_ArrayPlusOffTooSmall),n=0;n<this.Count;n=n+1|0)s=new(System.Collections.Generic.KeyValuePair$2(e,t)).$ctor1(this.keys[System.Array.index(n,this.keys)],this.values[System.Array.index(n,this.values)]),i[System.Array.index(r+n|0,i)]=s},System$Collections$ICollection$copyTo:function(i,r){var n,s,o,a;if(i==null&&System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.array),System.Array.getRank(i)!==1&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_RankMultiDimNotSupported),System.Array.getLower(i,0)!==0&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_NonZeroLowerBound),(r<0||r>i.length)&&System.ThrowHelper.ThrowArgumentOutOfRangeException$2(System.ExceptionArgument.arrayIndex,System.ExceptionResource.ArgumentOutOfRange_NeedNonNegNum),(i.length-r|0)<this.Count&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_ArrayPlusOffTooSmall),n=Bridge.as(i,System.Array.type(System.Collections.Generic.KeyValuePair$2(e,t))),n!=null)for(s=0;s<this.Count;s=s+1|0)n[System.Array.index(s+r|0,n)]=new(System.Collections.Generic.KeyValuePair$2(e,t)).$ctor1(this.keys[System.Array.index(s,this.keys)],this.values[System.Array.index(s,this.values)]);else{o=Bridge.as(i,System.Array.type(System.Object)),o==null&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Argument_InvalidArrayType);try{for(a=0;a<this.Count;a=a+1|0)o[System.Array.index(a+r|0,o)]=new(System.Collections.Generic.KeyValuePair$2(e,t)).$ctor1(this.keys[System.Array.index(a,this.keys)],this.values[System.Array.index(a,this.values)])}catch(l){if(l=System.Exception.create(l),Bridge.is(l,System.ArrayTypeMismatchException))System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Argument_InvalidArrayType);else throw l}}},EnsureCapacity:function(i){var r=this.keys.length===0?System.Collections.Generic.SortedList$2(e,t)._defaultCapacity:Bridge.Int.mul(this.keys.length,2);r>>>0>System.Collections.Generic.SortedList$2(e,t).MaxArrayLength&&(r=System.Collections.Generic.SortedList$2(e,t).MaxArrayLength),r<i&&(r=i),this.Capacity=r},GetByIndex:function(i){return(i<0||i>=this._size)&&System.ThrowHelper.ThrowArgumentOutOfRangeException$2(System.ExceptionArgument.index,System.ExceptionResource.ArgumentOutOfRange_Index),this.values[System.Array.index(i,this.values)]},GetEnumerator:function(){return new(System.Collections.Generic.SortedList$2.Enumerator(e,t)).$ctor1(this,System.Collections.Generic.SortedList$2.Enumerator(e,t).KeyValuePair).$clone()},System$Collections$Generic$IEnumerable$1$System$Collections$Generic$KeyValuePair$2$GetEnumerator:function(){return new(System.Collections.Generic.SortedList$2.Enumerator(e,t)).$ctor1(this,System.Collections.Generic.SortedList$2.Enumerator(e,t).KeyValuePair).$clone()},System$Collections$IDictionary$GetEnumerator:function(){return new(System.Collections.Generic.SortedList$2.Enumerator(e,t)).$ctor1(this,System.Collections.Generic.SortedList$2.Enumerator(e,t).DictEntry).$clone()},System$Collections$IEnumerable$GetEnumerator:function(){return new(System.Collections.Generic.SortedList$2.Enumerator(e,t)).$ctor1(this,System.Collections.Generic.SortedList$2.Enumerator(e,t).KeyValuePair).$clone()},GetKey:function(i){return(i<0||i>=this._size)&&System.ThrowHelper.ThrowArgumentOutOfRangeException$2(System.ExceptionArgument.index,System.ExceptionResource.ArgumentOutOfRange_Index),this.keys[System.Array.index(i,this.keys)]},IndexOfKey:function(i){i==null&&System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.key);var r=System.Array.binarySearch(this.keys,0,this._size,i,this.comparer);return r>=0?r:-1},IndexOfValue:function(i){return System.Array.indexOfT(this.values,i,0,this._size)},Insert:function(i,r,n){this._size===this.keys.length&&this.EnsureCapacity(this._size+1|0),i<this._size&&(System.Array.copy(this.keys,i,this.keys,i+1|0,this._size-i|0),System.Array.copy(this.values,i,this.values,i+1|0,this._size-i|0)),this.keys[System.Array.index(i,this.keys)]=r,this.values[System.Array.index(i,this.values)]=n,this._size=this._size+1|0,this.version=this.version+1|0},tryGetValue:function(i,r){var n=this.IndexOfKey(i);return n>=0?(r.v=this.values[System.Array.index(n,this.values)],!0):(r.v=Bridge.getDefaultValue(t),!1)},RemoveAt:function(i){(i<0||i>=this._size)&&System.ThrowHelper.ThrowArgumentOutOfRangeException$2(System.ExceptionArgument.index,System.ExceptionResource.ArgumentOutOfRange_Index),this._size=this._size-1|0,i<this._size&&(System.Array.copy(this.keys,i+1|0,this.keys,i,this._size-i|0),System.Array.copy(this.values,i+1|0,this.values,i,this._size-i|0)),this.keys[System.Array.index(this._size,this.keys)]=Bridge.getDefaultValue(e),this.values[System.Array.index(this._size,this.values)]=Bridge.getDefaultValue(t),this.version=this.version+1|0},TrimExcess:function(){var i=Bridge.Int.clip32(this.keys.length*.9);this._size<i&&(this.Capacity=this._size)}}}}),Bridge.define("System.Collections.Generic.SortedList$2.Enumerator",function(e,t){return{inherits:[System.Collections.Generic.IEnumerator$1(System.Collections.Generic.KeyValuePair$2(e,t)),System.Collections.IDictionaryEnumerator],$kind:"nested struct",statics:{fields:{KeyValuePair:0,DictEntry:0},ctors:{init:function(){this.KeyValuePair=1,this.DictEntry=2}},methods:{getDefaultValue:function(){return new(System.Collections.Generic.SortedList$2.Enumerator(e,t))}}},fields:{_sortedList:null,key:Bridge.getDefaultValue(e),value:Bridge.getDefaultValue(t),index:0,version:0,getEnumeratorRetType:0},props:{System$Collections$IDictionaryEnumerator$Key:{get:function(){return(this.index===0||this.index===(this._sortedList.Count+1|0))&&System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumOpCantHappen),this.key}},System$Collections$IDictionaryEnumerator$Entry:{get:function(){return(this.index===0||this.index===(this._sortedList.Count+1|0))&&System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumOpCantHappen),new System.Collections.DictionaryEntry.$ctor1(this.key,this.value)}},Current:{get:function(){return new(System.Collections.Generic.KeyValuePair$2(e,t)).$ctor1(this.key,this.value)}},System$Collections$IEnumerator$Current:{get:function(){return(this.index===0||this.index===(this._sortedList.Count+1|0))&&System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumOpCantHappen),this.getEnumeratorRetType===System.Collections.Generic.SortedList$2.Enumerator(e,t).DictEntry?new System.Collections.DictionaryEntry.$ctor1(this.key,this.value).$clone():new(System.Collections.Generic.KeyValuePair$2(e,t)).$ctor1(this.key,this.value)}},System$Collections$IDictionaryEnumerator$Value:{get:function(){return(this.index===0||this.index===(this._sortedList.Count+1|0))&&System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumOpCantHappen),this.value}}},alias:["Dispose","System$IDisposable$Dispose","moveNext","System$Collections$IEnumerator$moveNext","Current",["System$Collections$Generic$IEnumerator$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$Current$1","System$Collections$Generic$IEnumerator$1$Current$1"]],ctors:{$ctor1:function(i,r){this.$initialize(),this._sortedList=i,this.index=0,this.version=this._sortedList.version,this.getEnumeratorRetType=r,this.key=Bridge.getDefaultValue(e),this.value=Bridge.getDefaultValue(t)},ctor:function(){this.$initialize()}},methods:{Dispose:function(){this.index=0,this.key=Bridge.getDefaultValue(e),this.value=Bridge.getDefaultValue(t)},moveNext:function(){var i,r;return this.version!==this._sortedList.version&&System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumFailedVersion),this.index>>>0<this._sortedList.Count>>>0?(this.key=(i=this._sortedList.keys)[System.Array.index(this.index,i)],this.value=(r=this._sortedList.values)[System.Array.index(this.index,r)],this.index=this.index+1|0,!0):(this.index=this._sortedList.Count+1|0,this.key=Bridge.getDefaultValue(e),this.value=Bridge.getDefaultValue(t),!1)},System$Collections$IEnumerator$reset:function(){this.version!==this._sortedList.version&&System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumFailedVersion),this.index=0,this.key=Bridge.getDefaultValue(e),this.value=Bridge.getDefaultValue(t)},getHashCode:function(){return Bridge.addHash([3788985113,this._sortedList,this.key,this.value,this.index,this.version,this.getEnumeratorRetType])},equals:function(i){return Bridge.is(i,System.Collections.Generic.SortedList$2.Enumerator(e,t))?Bridge.equals(this._sortedList,i._sortedList)&&Bridge.equals(this.key,i.key)&&Bridge.equals(this.value,i.value)&&Bridge.equals(this.index,i.index)&&Bridge.equals(this.version,i.version)&&Bridge.equals(this.getEnumeratorRetType,i.getEnumeratorRetType):!1},$clone:function(i){var r=i||new(System.Collections.Generic.SortedList$2.Enumerator(e,t));return r._sortedList=this._sortedList,r.key=this.key,r.value=this.value,r.index=this.index,r.version=this.version,r.getEnumeratorRetType=this.getEnumeratorRetType,r}}}}),Bridge.define("System.Collections.Generic.SortedList$2.KeyList",function(e,t){return{inherits:[System.Collections.Generic.IList$1(e),System.Collections.ICollection],$kind:"nested class",fields:{_dict:null},props:{Count:{get:function(){return this._dict._size}},IsReadOnly:{get:function(){return!0}},System$Collections$ICollection$IsSynchronized:{get:function(){return!1}},System$Collections$ICollection$SyncRoot:{get:function(){return Bridge.cast(this._dict,System.Collections.ICollection).System$Collections$ICollection$SyncRoot}}},alias:["Count","System$Collections$ICollection$Count","Count","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$Count","IsReadOnly","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$IsReadOnly","add","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$add","clear","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$clear","contains","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$contains","copyTo","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$copyTo","insert","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(e)+"$insert","getItem","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(e)+"$getItem","setItem","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(e)+"$setItem","GetEnumerator",["System$Collections$Generic$IEnumerable$1$"+Bridge.getTypeAlias(e)+"$GetEnumerator","System$Collections$Generic$IEnumerable$1$GetEnumerator"],"indexOf","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(e)+"$indexOf","remove","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$remove","removeAt","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(e)+"$removeAt"],ctors:{ctor:function(i){this.$initialize(),this._dict=i}},methods:{getItem:function(i){return this._dict.GetKey(i)},setItem:function(i,r){System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_KeyCollectionSet)},add:function(i){System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_SortedListNestedWrite)},clear:function(){System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_SortedListNestedWrite)},contains:function(i){return this._dict.containsKey(i)},copyTo:function(i,r){System.Array.copy(this._dict.keys,0,i,r,this._dict.Count)},System$Collections$ICollection$copyTo:function(i,r){i!=null&&System.Array.getRank(i)!==1&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_RankMultiDimNotSupported);try{System.Array.copy(this._dict.keys,0,i,r,this._dict.Count)}catch(n){if(n=System.Exception.create(n),Bridge.is(n,System.ArrayTypeMismatchException))System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Argument_InvalidArrayType);else throw n}},insert:function(i,r){System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_SortedListNestedWrite)},GetEnumerator:function(){return new(System.Collections.Generic.SortedList$2.SortedListKeyEnumerator(e,t))(this._dict)},System$Collections$IEnumerable$GetEnumerator:function(){return new(System.Collections.Generic.SortedList$2.SortedListKeyEnumerator(e,t))(this._dict)},indexOf:function(i){i==null&&System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.key);var r=System.Array.binarySearch(this._dict.keys,0,this._dict.Count,i,this._dict.comparer);return r>=0?r:-1},remove:function(i){return System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_SortedListNestedWrite),!1},removeAt:function(i){System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_SortedListNestedWrite)}}}}),Bridge.define("System.Collections.Generic.SortedList$2.SortedListKeyEnumerator",function(e,t){return{inherits:[System.Collections.Generic.IEnumerator$1(e),System.Collections.IEnumerator],$kind:"nested class",fields:{_sortedList:null,index:0,version:0,currentKey:Bridge.getDefaultValue(e)},props:{Current:{get:function(){return this.currentKey}},System$Collections$IEnumerator$Current:{get:function(){return(this.index===0||this.index===(this._sortedList.Count+1|0))&&System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumOpCantHappen),this.currentKey}}},alias:["Dispose","System$IDisposable$Dispose","moveNext","System$Collections$IEnumerator$moveNext","Current",["System$Collections$Generic$IEnumerator$1$"+Bridge.getTypeAlias(e)+"$Current$1","System$Collections$Generic$IEnumerator$1$Current$1"]],ctors:{ctor:function(i){this.$initialize(),this._sortedList=i,this.version=i.version}},methods:{Dispose:function(){this.index=0,this.currentKey=Bridge.getDefaultValue(e)},moveNext:function(){var i;return this.version!==this._sortedList.version&&System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumFailedVersion),this.index>>>0<this._sortedList.Count>>>0?(this.currentKey=(i=this._sortedList.keys)[System.Array.index(this.index,i)],this.index=this.index+1|0,!0):(this.index=this._sortedList.Count+1|0,this.currentKey=Bridge.getDefaultValue(e),!1)},System$Collections$IEnumerator$reset:function(){this.version!==this._sortedList.version&&System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumFailedVersion),this.index=0,this.currentKey=Bridge.getDefaultValue(e)}}}}),Bridge.define("System.Collections.Generic.SortedList$2.SortedListValueEnumerator",function(e,t){return{inherits:[System.Collections.Generic.IEnumerator$1(t),System.Collections.IEnumerator],$kind:"nested class",fields:{_sortedList:null,index:0,version:0,currentValue:Bridge.getDefaultValue(t)},props:{Current:{get:function(){return this.currentValue}},System$Collections$IEnumerator$Current:{get:function(){return(this.index===0||this.index===(this._sortedList.Count+1|0))&&System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumOpCantHappen),this.currentValue}}},alias:["Dispose","System$IDisposable$Dispose","moveNext","System$Collections$IEnumerator$moveNext","Current",["System$Collections$Generic$IEnumerator$1$"+Bridge.getTypeAlias(t)+"$Current$1","System$Collections$Generic$IEnumerator$1$Current$1"]],ctors:{ctor:function(i){this.$initialize(),this._sortedList=i,this.version=i.version}},methods:{Dispose:function(){this.index=0,this.currentValue=Bridge.getDefaultValue(t)},moveNext:function(){var i;return this.version!==this._sortedList.version&&System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumFailedVersion),this.index>>>0<this._sortedList.Count>>>0?(this.currentValue=(i=this._sortedList.values)[System.Array.index(this.index,i)],this.index=this.index+1|0,!0):(this.index=this._sortedList.Count+1|0,this.currentValue=Bridge.getDefaultValue(t),!1)},System$Collections$IEnumerator$reset:function(){this.version!==this._sortedList.version&&System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumFailedVersion),this.index=0,this.currentValue=Bridge.getDefaultValue(t)}}}}),Bridge.define("System.Collections.Generic.SortedList$2.ValueList",function(e,t){return{inherits:[System.Collections.Generic.IList$1(t),System.Collections.ICollection],$kind:"nested class",fields:{_dict:null},props:{Count:{get:function(){return this._dict._size}},IsReadOnly:{get:function(){return!0}},System$Collections$ICollection$IsSynchronized:{get:function(){return!1}},System$Collections$ICollection$SyncRoot:{get:function(){return Bridge.cast(this._dict,System.Collections.ICollection).System$Collections$ICollection$SyncRoot}}},alias:["Count","System$Collections$ICollection$Count","Count","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(t)+"$Count","IsReadOnly","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(t)+"$IsReadOnly","add","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(t)+"$add","clear","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(t)+"$clear","contains","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(t)+"$contains","copyTo","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(t)+"$copyTo","insert","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(t)+"$insert","getItem","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(t)+"$getItem","setItem","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(t)+"$setItem","GetEnumerator",["System$Collections$Generic$IEnumerable$1$"+Bridge.getTypeAlias(t)+"$GetEnumerator","System$Collections$Generic$IEnumerable$1$GetEnumerator"],"indexOf","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(t)+"$indexOf","remove","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(t)+"$remove","removeAt","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(t)+"$removeAt"],ctors:{ctor:function(i){this.$initialize(),this._dict=i}},methods:{getItem:function(i){return this._dict.GetByIndex(i)},setItem:function(i,r){System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_SortedListNestedWrite)},add:function(i){System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_SortedListNestedWrite)},clear:function(){System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_SortedListNestedWrite)},contains:function(i){return this._dict.ContainsValue(i)},copyTo:function(i,r){System.Array.copy(this._dict.values,0,i,r,this._dict.Count)},System$Collections$ICollection$copyTo:function(i,r){i!=null&&System.Array.getRank(i)!==1&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_RankMultiDimNotSupported);try{System.Array.copy(this._dict.values,0,i,r,this._dict.Count)}catch(n){if(n=System.Exception.create(n),Bridge.is(n,System.ArrayTypeMismatchException))System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Argument_InvalidArrayType);else throw n}},insert:function(i,r){System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_SortedListNestedWrite)},GetEnumerator:function(){return new(System.Collections.Generic.SortedList$2.SortedListValueEnumerator(e,t))(this._dict)},System$Collections$IEnumerable$GetEnumerator:function(){return new(System.Collections.Generic.SortedList$2.SortedListValueEnumerator(e,t))(this._dict)},indexOf:function(i){return System.Array.indexOfT(this._dict.values,i,0,this._dict.Count)},remove:function(i){return System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_SortedListNestedWrite),!1},removeAt:function(i){System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_SortedListNestedWrite)}}}}),Bridge.define("System.Collections.Generic.SortedSet$1",function(e){return{inherits:[System.Collections.Generic.ISet$1(e),System.Collections.Generic.ICollection$1(e),System.Collections.ICollection,System.Collections.Generic.IReadOnlyCollection$1(e)],statics:{fields:{ComparerName:null,CountName:null,ItemsName:null,VersionName:null,TreeName:null,NodeValueName:null,EnumStartName:null,ReverseName:null,EnumVersionName:null,minName:null,maxName:null,lBoundActiveName:null,uBoundActiveName:null,StackAllocThreshold:0},ctors:{init:function(){this.ComparerName="Comparer",this.CountName="Count",this.ItemsName="Items",this.VersionName="Version",this.TreeName="Tree",this.NodeValueName="Item",this.EnumStartName="EnumStarted",this.ReverseName="Reverse",this.EnumVersionName="EnumVersion",this.minName="Min",this.maxName="Max",this.lBoundActiveName="lBoundActive",this.uBoundActiveName="uBoundActive",this.StackAllocThreshold=100}},methods:{GetSibling:function(t,i){return Bridge.referenceEquals(i.Left,t)?i.Right:i.Left},Is2Node:function(t){return System.Collections.Generic.SortedSet$1(e).IsBlack(t)&&System.Collections.Generic.SortedSet$1(e).IsNullOrBlack(t.Left)&&System.Collections.Generic.SortedSet$1(e).IsNullOrBlack(t.Right)},Is4Node:function(t){return System.Collections.Generic.SortedSet$1(e).IsRed(t.Left)&&System.Collections.Generic.SortedSet$1(e).IsRed(t.Right)},IsBlack:function(t){return t!=null&&!t.IsRed},IsNullOrBlack:function(t){return t==null||!t.IsRed},IsRed:function(t){return t!=null&&t.IsRed},Merge2Nodes:function(t,i,r){t.IsRed=!1,i.IsRed=!0,r.IsRed=!0},RotateLeft:function(t){var i=t.Right;return t.Right=i.Left,i.Left=t,i},RotateLeftRight:function(t){var i=t.Left,r=i.Right;return t.Left=r.Right,r.Right=t,i.Right=r.Left,r.Left=i,r},RotateRight:function(t){var i=t.Left;return t.Left=i.Right,i.Right=t,i},RotateRightLeft:function(t){var i=t.Right,r=i.Left;return t.Right=r.Left,r.Left=t,i.Left=r.Right,r.Right=i,r},RotationNeeded:function(t,i,r){return System.Collections.Generic.SortedSet$1(e).IsRed(r.Left)?Bridge.referenceEquals(t.Left,i)?System.Collections.Generic.TreeRotation.RightLeftRotation:System.Collections.Generic.TreeRotation.RightRotation:Bridge.referenceEquals(t.Left,i)?System.Collections.Generic.TreeRotation.LeftRotation:System.Collections.Generic.TreeRotation.LeftRightRotation},CreateSetComparer:function(){return new(System.Collections.Generic.SortedSetEqualityComparer$1(e)).ctor},CreateSetComparer$1:function(t){return new(System.Collections.Generic.SortedSetEqualityComparer$1(e)).$ctor3(t)},SortedSetEquals:function(t,i,r){var n,s,o,a,l;if(t==null)return i==null;if(i==null)return!1;if(System.Collections.Generic.SortedSet$1(e).AreComparersEqual(t,i))return t.Count!==i.Count?!1:t.setEquals(i);o=!1,n=Bridge.getEnumerator(t);try{for(;n.moveNext();){a=n.Current,o=!1,s=Bridge.getEnumerator(i);try{for(;s.moveNext();)if(l=s.Current,r[Bridge.geti(r,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](a,l)===0){o=!0;break}}finally{Bridge.is(s,System.IDisposable)&&s.System$IDisposable$Dispose()}if(!o)return!1}}finally{Bridge.is(n,System.IDisposable)&&n.System$IDisposable$Dispose()}return!0},AreComparersEqual:function(t,i){return Bridge.equals(t.Comparer,i.Comparer)},Split4Node:function(t){t.IsRed=!0,t.Left.IsRed=!1,t.Right.IsRed=!1},ConstructRootFromSortedArray:function(t,i,r,n){var s=(r-i|0)+1|0,o,a;return s===0?null:(o=null,s===1?(o=new(System.Collections.Generic.SortedSet$1.Node(e)).$ctor1(t[System.Array.index(i,t)],!1),n!=null&&(o.Left=n)):s===2?(o=new(System.Collections.Generic.SortedSet$1.Node(e)).$ctor1(t[System.Array.index(i,t)],!1),o.Right=new(System.Collections.Generic.SortedSet$1.Node(e)).$ctor1(t[System.Array.index(r,t)],!1),o.Right.IsRed=!0,n!=null&&(o.Left=n)):s===3?(o=new(System.Collections.Generic.SortedSet$1.Node(e)).$ctor1(t[System.Array.index(i+1|0,t)],!1),o.Left=new(System.Collections.Generic.SortedSet$1.Node(e)).$ctor1(t[System.Array.index(i,t)],!1),o.Right=new(System.Collections.Generic.SortedSet$1.Node(e)).$ctor1(t[System.Array.index(r,t)],!1),n!=null&&(o.Left.Left=n)):(a=Bridge.Int.div(i+r|0,2)|0,o=new(System.Collections.Generic.SortedSet$1.Node(e)).$ctor1(t[System.Array.index(a,t)],!1),o.Left=System.Collections.Generic.SortedSet$1(e).ConstructRootFromSortedArray(t,i,a-1|0,n),o.Right=s%2==0?System.Collections.Generic.SortedSet$1(e).ConstructRootFromSortedArray(t,a+2|0,r,new(System.Collections.Generic.SortedSet$1.Node(e)).$ctor1(t[System.Array.index(a+1|0,t)],!0)):System.Collections.Generic.SortedSet$1(e).ConstructRootFromSortedArray(t,a+1|0,r,null)),o)},log2:function(t){for(var i=0;t>0;)i=i+1|0,t=t>>1;return i}}},fields:{root:null,comparer:null,count:0,version:0},props:{Count:{get:function(){return this.VersionCheck(),this.count}},Comparer:{get:function(){return this.comparer}},System$Collections$Generic$ICollection$1$IsReadOnly:{get:function(){return!1}},System$Collections$ICollection$IsSynchronized:{get:function(){return!1}},System$Collections$ICollection$SyncRoot:{get:function(){return null}},Min:{get:function(){var t=Bridge.getDefaultValue(e);return this.InOrderTreeWalk(function(i){return t=i.Item,!1}),t}},Max:{get:function(){var t=Bridge.getDefaultValue(e);return this.InOrderTreeWalk$1(function(i){return t=i.Item,!1},!0),t}}},alias:["Count",["System$Collections$Generic$IReadOnlyCollection$1$"+Bridge.getTypeAlias(e)+"$Count","System$Collections$Generic$IReadOnlyCollection$1$Count"],"Count","System$Collections$ICollection$Count","Count","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$Count","System$Collections$Generic$ICollection$1$IsReadOnly","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$IsReadOnly","add","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$add","System$Collections$Generic$ICollection$1$add","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$add","remove","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$remove","clear","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$clear","contains","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$contains","copyTo","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$copyTo","System$Collections$Generic$IEnumerable$1$GetEnumerator","System$Collections$Generic$IEnumerable$1$"+Bridge.getTypeAlias(e)+"$GetEnumerator","unionWith","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$unionWith","intersectWith","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$intersectWith","exceptWith","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$exceptWith","symmetricExceptWith","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$symmetricExceptWith","isSubsetOf","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$isSubsetOf","isProperSubsetOf","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$isProperSubsetOf","isSupersetOf","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$isSupersetOf","isProperSupersetOf","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$isProperSupersetOf","setEquals","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$setEquals","overlaps","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$overlaps"],ctors:{ctor:function(){this.$initialize(),this.comparer=new(System.Collections.Generic.Comparer$1(e))(System.Collections.Generic.Comparer$1.$default.fn)},$ctor1:function(t){this.$initialize(),this.comparer=t??new(System.Collections.Generic.Comparer$1(e))(System.Collections.Generic.Comparer$1.$default.fn)},$ctor2:function(t){System.Collections.Generic.SortedSet$1(e).$ctor3.call(this,t,new(System.Collections.Generic.Comparer$1(e))(System.Collections.Generic.Comparer$1.$default.fn))},$ctor3:function(t,i){var r,n,s,o,a,l;if(System.Collections.Generic.SortedSet$1(e).$ctor1.call(this,i),t==null)throw new System.ArgumentNullException.$ctor1("collection");if(r=Bridge.as(t,System.Collections.Generic.SortedSet$1(e)),n=Bridge.as(t,System.Collections.Generic.SortedSet$1.TreeSubSet(e)),r!=null&&n==null&&System.Collections.Generic.SortedSet$1(e).AreComparersEqual(this,r)){if(r.Count===0){this.count=0,this.version=0,this.root=null;return}var u=new(System.Collections.Generic.Stack$1(System.Collections.Generic.SortedSet$1.Node(e))).$ctor2(Bridge.Int.mul(2,System.Collections.Generic.SortedSet$1(e).log2(r.Count))+2|0),d=new(System.Collections.Generic.Stack$1(System.Collections.Generic.SortedSet$1.Node(e))).$ctor2(Bridge.Int.mul(2,System.Collections.Generic.SortedSet$1(e).log2(r.Count))+2|0),f=r.root,C=f!=null?new(System.Collections.Generic.SortedSet$1.Node(e)).$ctor1(f.Item,f.IsRed):null;for(this.root=C;f!=null;)u.Push(f),d.Push(C),C.Left=f.Left!=null?new(System.Collections.Generic.SortedSet$1.Node(e)).$ctor1(f.Left.Item,f.Left.IsRed):null,f=f.Left,C=C.Left;for(;u.Count!==0;)for(f=u.Pop(),C=d.Pop(),s=f.Right,o=null,s!=null&&(o=new(System.Collections.Generic.SortedSet$1.Node(e)).$ctor1(s.Item,s.IsRed)),C.Right=o;s!=null;)u.Push(s),d.Push(o),o.Left=s.Left!=null?new(System.Collections.Generic.SortedSet$1.Node(e)).$ctor1(s.Left.Item,s.Left.IsRed):null,s=s.Left,o=o.Left;this.count=r.count,this.version=0}else{for(a=new(System.Collections.Generic.List$1(e)).$ctor1(t),a.Sort$1(this.comparer),l=1;l<a.Count;l=l+1|0)this.comparer[Bridge.geti(this.comparer,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](a.getItem(l),a.getItem(l-1|0))===0&&(a.removeAt(l),l=l-1|0);this.root=System.Collections.Generic.SortedSet$1(e).ConstructRootFromSortedArray(a.ToArray(),0,a.Count-1|0,null),this.count=a.Count,this.version=0}}},methods:{AddAllElements:function(t){var i,r;i=Bridge.getEnumerator(t,e);try{for(;i.moveNext();)r=i.Current,this.contains(r)||this.add(r)}finally{Bridge.is(i,System.IDisposable)&&i.System$IDisposable$Dispose()}},RemoveAllElements:function(t){var i,r=this.Min,n=this.Max,s;i=Bridge.getEnumerator(t,e);try{for(;i.moveNext();)s=i.Current,this.comparer[Bridge.geti(this.comparer,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](s,r)<0||this.comparer[Bridge.geti(this.comparer,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](s,n)>0||!this.contains(s)||this.remove(s)}finally{Bridge.is(i,System.IDisposable)&&i.System$IDisposable$Dispose()}},ContainsAllElements:function(t){var i,r;i=Bridge.getEnumerator(t,e);try{for(;i.moveNext();)if(r=i.Current,!this.contains(r))return!1}finally{Bridge.is(i,System.IDisposable)&&i.System$IDisposable$Dispose()}return!0},InOrderTreeWalk:function(t){return this.InOrderTreeWalk$1(t,!1)},InOrderTreeWalk$1:function(t,i){var r,n,s;if(this.root==null)return!0;for(r=new(System.Collections.Generic.Stack$1(System.Collections.Generic.SortedSet$1.Node(e))).$ctor2(Bridge.Int.mul(2,System.Collections.Generic.SortedSet$1(e).log2(this.Count+1|0))),n=this.root;n!=null;)r.Push(n),n=i?n.Right:n.Left;for(;r.Count!==0;){if(n=r.Pop(),!t(n))return!1;for(s=i?n.Left:n.Right;s!=null;)r.Push(s),s=i?s.Right:s.Left}return!0},BreadthFirstTreeWalk:function(t){var i,r;if(this.root==null)return!0;for(i=new(System.Collections.Generic.List$1(System.Collections.Generic.SortedSet$1.Node(e))).ctor,i.add(this.root);i.Count!==0;){if(r=i.getItem(0),i.removeAt(0),!t(r))return!1;r.Left!=null&&i.add(r.Left),r.Right!=null&&i.add(r.Right)}return!0},VersionCheck:function(){},IsWithinRange:function(t){return!0},add:function(t){return this.AddIfNotPresent(t)},System$Collections$Generic$ICollection$1$add:function(t){this.AddIfNotPresent(t)},AddIfNotPresent:function(t){var i,r;if(this.root==null)return this.root=new(System.Collections.Generic.SortedSet$1.Node(e)).$ctor1(t,!1),this.count=1,this.version=this.version+1|0,!0;var n=this.root,s={v:null},o=null,a=null;for(this.version=this.version+1|0,i=0;n!=null;){if(i=this.comparer[Bridge.geti(this.comparer,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](t,n.Item),i===0)return this.root.IsRed=!1,!1;System.Collections.Generic.SortedSet$1(e).Is4Node(n)&&(System.Collections.Generic.SortedSet$1(e).Split4Node(n),System.Collections.Generic.SortedSet$1(e).IsRed(s.v)&&this.InsertionBalance(n,s,o,a)),a=o,o=s.v,s.v=n,n=i<0?n.Left:n.Right}return r=new(System.Collections.Generic.SortedSet$1.Node(e)).ctor(t),i>0?s.v.Right=r:s.v.Left=r,s.v.IsRed&&this.InsertionBalance(r,s,o,a),this.root.IsRed=!1,this.count=this.count+1|0,!0},remove:function(t){return this.DoRemove(t)},DoRemove:function(t){var i,r,n,s;if(this.root==null)return!1;this.version=this.version+1|0;for(var o=this.root,a=null,l=null,u=null,d=null,f=!1;o!=null;){if(System.Collections.Generic.SortedSet$1(e).Is2Node(o))if(a==null)o.IsRed=!0;else if(i=System.Collections.Generic.SortedSet$1(e).GetSibling(o,a),i.IsRed&&(Bridge.referenceEquals(a.Right,i)?System.Collections.Generic.SortedSet$1(e).RotateLeft(a):System.Collections.Generic.SortedSet$1(e).RotateRight(a),a.IsRed=!0,i.IsRed=!1,this.ReplaceChildOfNodeOrRoot(l,a,i),l=i,Bridge.referenceEquals(a,u)&&(d=i),i=Bridge.referenceEquals(a.Left,o)?a.Right:a.Left),System.Collections.Generic.SortedSet$1(e).Is2Node(i))System.Collections.Generic.SortedSet$1(e).Merge2Nodes(a,o,i);else{switch(r=System.Collections.Generic.SortedSet$1(e).RotationNeeded(a,o,i),n=null,r){case System.Collections.Generic.TreeRotation.RightRotation:i.Left.IsRed=!1,n=System.Collections.Generic.SortedSet$1(e).RotateRight(a);break;case System.Collections.Generic.TreeRotation.LeftRotation:i.Right.IsRed=!1,n=System.Collections.Generic.SortedSet$1(e).RotateLeft(a);break;case System.Collections.Generic.TreeRotation.RightLeftRotation:n=System.Collections.Generic.SortedSet$1(e).RotateRightLeft(a);break;case System.Collections.Generic.TreeRotation.LeftRightRotation:n=System.Collections.Generic.SortedSet$1(e).RotateLeftRight(a);break}n.IsRed=a.IsRed,a.IsRed=!1,o.IsRed=!0,this.ReplaceChildOfNodeOrRoot(l,a,n),Bridge.referenceEquals(a,u)&&(d=n),l=n}s=f?-1:this.comparer[Bridge.geti(this.comparer,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](t,o.Item),s===0&&(f=!0,u=o,d=a),l=a,a=o,o=s<0?o.Left:o.Right}return u!=null&&(this.ReplaceNode(u,d,a,l),this.count=this.count-1|0),this.root!=null&&(this.root.IsRed=!1),f},clear:function(){this.root=null,this.count=0,this.version=this.version+1|0},contains:function(t){return this.FindNode(t)!=null},CopyTo:function(t){this.CopyTo$1(t,0,this.Count)},copyTo:function(t,i){this.CopyTo$1(t,i,this.Count)},CopyTo$1:function(t,i,r){if(t==null&&System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.array),i<0&&System.ThrowHelper.ThrowArgumentOutOfRangeException$1(System.ExceptionArgument.index),r<0)throw new System.ArgumentOutOfRangeException.$ctor1("count");if(i>t.length||r>(t.length-i|0))throw new System.ArgumentException.ctor;r=r+i|0,this.InOrderTreeWalk(function(n){return i>=r?!1:(t[System.Array.index(Bridge.identity(i,i=i+1|0),t)]=n.Item,!0)})},System$Collections$ICollection$copyTo:function(t,i){var r,n;if(t==null&&System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.array),System.Array.getRank(t)!==1&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_RankMultiDimNotSupported),System.Array.getLower(t,0)!==0&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_NonZeroLowerBound),i<0&&System.ThrowHelper.ThrowArgumentOutOfRangeException$2(System.ExceptionArgument.arrayIndex,System.ExceptionResource.ArgumentOutOfRange_NeedNonNegNum),(t.length-i|0)<this.Count&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_ArrayPlusOffTooSmall),r=Bridge.as(t,System.Array.type(e)),r!=null)this.copyTo(r,i);else{n=Bridge.as(t,System.Array.type(System.Object)),n==null&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Argument_InvalidArrayType);try{this.InOrderTreeWalk(function(s){return n[System.Array.index(Bridge.identity(i,i=i+1|0),n)]=s.Item,!0})}catch(s){if(s=System.Exception.create(s),Bridge.is(s,System.ArrayTypeMismatchException))System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Argument_InvalidArrayType);else throw s}}},GetEnumerator:function(){return new(System.Collections.Generic.SortedSet$1.Enumerator(e)).$ctor1(this)},System$Collections$Generic$IEnumerable$1$GetEnumerator:function(){return new(System.Collections.Generic.SortedSet$1.Enumerator(e)).$ctor1(this).$clone()},System$Collections$IEnumerable$GetEnumerator:function(){return new(System.Collections.Generic.SortedSet$1.Enumerator(e)).$ctor1(this).$clone()},InsertionBalance:function(t,i,r,n){var s=Bridge.referenceEquals(r.Right,i.v),o=Bridge.referenceEquals(i.v.Right,t),a;s===o?a=o?System.Collections.Generic.SortedSet$1(e).RotateLeft(r):System.Collections.Generic.SortedSet$1(e).RotateRight(r):(a=o?System.Collections.Generic.SortedSet$1(e).RotateLeftRight(r):System.Collections.Generic.SortedSet$1(e).RotateRightLeft(r),i.v=n),r.IsRed=!0,a.IsRed=!1,this.ReplaceChildOfNodeOrRoot(n,r,a)},ReplaceChildOfNodeOrRoot:function(t,i,r){t!=null?Bridge.referenceEquals(t.Left,i)?t.Left=r:t.Right=r:this.root=r},ReplaceNode:function(t,i,r,n){Bridge.referenceEquals(r,t)?r=t.Left:(r.Right!=null&&(r.Right.IsRed=!1),Bridge.referenceEquals(n,t)||(n.Left=r.Right,r.Right=t.Right),r.Left=t.Left),r!=null&&(r.IsRed=t.IsRed),this.ReplaceChildOfNodeOrRoot(i,t,r)},FindNode:function(t){for(var i=this.root,r;i!=null;){if(r=this.comparer[Bridge.geti(this.comparer,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](t,i.Item),r===0)return i;i=r<0?i.Left:i.Right}return null},InternalIndexOf:function(t){for(var i=this.root,r=0,n;i!=null;){if(n=this.comparer[Bridge.geti(this.comparer,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](t,i.Item),n===0)return r;i=n<0?i.Left:i.Right,r=n<0?Bridge.Int.mul(2,r)+1|0:Bridge.Int.mul(2,r)+2|0}return-1},FindRange:function(t,i){return this.FindRange$1(t,i,!0,!0)},FindRange$1:function(t,i,r,n){for(var s=this.root;s!=null;)if(r&&this.comparer[Bridge.geti(this.comparer,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](t,s.Item)>0)s=s.Right;else if(n&&this.comparer[Bridge.geti(this.comparer,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](i,s.Item)<0)s=s.Left;else return s;return null},UpdateVersion:function(){this.version=this.version+1|0},ToArray:function(){var t=System.Array.init(this.Count,function(){return Bridge.getDefaultValue(e)},e);return this.CopyTo(t),t},unionWith:function(t){var i,r,n,s,o,a;if(t==null)throw new System.ArgumentNullException.$ctor1("other");if(r=Bridge.as(t,System.Collections.Generic.SortedSet$1(e)),n=Bridge.as(this,System.Collections.Generic.SortedSet$1.TreeSubSet(e)),n!=null&&this.VersionCheck(),r!=null&&n==null&&this.count===0){s=new(System.Collections.Generic.SortedSet$1(e)).$ctor3(r,this.comparer),this.root=s.root,this.count=s.count,this.version=this.version+1|0;return}if(r!=null&&n==null&&System.Collections.Generic.SortedSet$1(e).AreComparersEqual(this,r)&&r.Count>(Bridge.Int.div(this.Count,2)|0)){for(var l=System.Array.init(r.Count+this.Count|0,function(){return Bridge.getDefaultValue(e)},e),u=0,d=this.GetEnumerator(),f=r.GetEnumerator(),C=!d.moveNext(),E=!f.moveNext();!C&&!E;)o=(i=this.Comparer)[Bridge.geti(i,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](d.Current,f.Current),o<0?(l[System.Array.index(Bridge.identity(u,u=u+1|0),l)]=d.Current,C=!d.moveNext()):o===0?(l[System.Array.index(Bridge.identity(u,u=u+1|0),l)]=f.Current,C=!d.moveNext(),E=!f.moveNext()):(l[System.Array.index(Bridge.identity(u,u=u+1|0),l)]=f.Current,E=!f.moveNext());if(!C||!E){a=C?f:d;do l[System.Array.index(Bridge.identity(u,u=u+1|0),l)]=a.Current;while(a.moveNext())}this.root=null,this.root=System.Collections.Generic.SortedSet$1(e).ConstructRootFromSortedArray(l,0,u-1|0,null),this.count=u,this.version=this.version+1|0}else this.AddAllElements(t)},intersectWith:function(t){var i,r,n,s,o;if(t==null)throw new System.ArgumentNullException.$ctor1("other");if(this.Count!==0)if(n=Bridge.as(t,System.Collections.Generic.SortedSet$1(e)),s=Bridge.as(this,System.Collections.Generic.SortedSet$1.TreeSubSet(e)),s!=null&&this.VersionCheck(),n!=null&&s==null&&System.Collections.Generic.SortedSet$1(e).AreComparersEqual(this,n)){for(var a=System.Array.init(this.Count,function(){return Bridge.getDefaultValue(e)},e),l=0,u=this.GetEnumerator(),d=n.GetEnumerator(),f=!u.moveNext(),C=!d.moveNext(),E=this.Max,T=this.Min;!f&&!C&&(i=this.Comparer)[Bridge.geti(i,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](d.Current,E)<=0;)o=(r=this.Comparer)[Bridge.geti(r,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](u.Current,d.Current),o<0?f=!u.moveNext():(o===0&&(a[System.Array.index(Bridge.identity(l,l=l+1|0),a)]=d.Current,f=!u.moveNext()),C=!d.moveNext());this.root=null,this.root=System.Collections.Generic.SortedSet$1(e).ConstructRootFromSortedArray(a,0,l-1|0,null),this.count=l,this.version=this.version+1|0}else this.IntersectWithEnumerable(t)},IntersectWithEnumerable:function(t){var i,r=new(System.Collections.Generic.List$1(e)).$ctor2(this.Count),n;i=Bridge.getEnumerator(t,e);try{for(;i.moveNext();)n=i.Current,this.contains(n)&&(r.add(n),this.remove(n))}finally{Bridge.is(i,System.IDisposable)&&i.System$IDisposable$Dispose()}this.clear(),this.AddAllElements(r)},exceptWith:function(t){var i,r,n,s,o;if(t==null)throw new System.ArgumentNullException.$ctor1("other");if(this.count!==0){if(Bridge.referenceEquals(t,this)){this.clear();return}if(r=Bridge.as(t,System.Collections.Generic.SortedSet$1(e)),r!=null&&System.Collections.Generic.SortedSet$1(e).AreComparersEqual(this,r)){if(!(this.comparer[Bridge.geti(this.comparer,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](r.Max,this.Min)<0||this.comparer[Bridge.geti(this.comparer,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](r.Min,this.Max)>0)){n=this.Min,s=this.Max,i=Bridge.getEnumerator(t,e);try{for(;i.moveNext();)if(o=i.Current,!(this.comparer[Bridge.geti(this.comparer,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](o,n)<0)){if(this.comparer[Bridge.geti(this.comparer,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](o,s)>0)break;this.remove(o)}}finally{Bridge.is(i,System.IDisposable)&&i.System$IDisposable$Dispose()}}}else this.RemoveAllElements(t)}},symmetricExceptWith:function(t){var i,r,n;if(t==null)throw new System.ArgumentNullException.$ctor1("other");if(this.Count===0){this.unionWith(t);return}if(Bridge.referenceEquals(t,this)){this.clear();return}i=Bridge.as(t,System.Collections.Generic.SortedSet$1(e)),r=Bridge.as(t,System.Collections.Generic.HashSet$1(e)),i!=null&&System.Collections.Generic.SortedSet$1(e).AreComparersEqual(this,i)?this.SymmetricExceptWithSameEC$1(i):r!=null&&Bridge.equals(this.comparer,new(System.Collections.Generic.Comparer$1(e))(System.Collections.Generic.Comparer$1.$default.fn))&&Bridge.equals(r.Comparer,System.Collections.Generic.EqualityComparer$1(e).def)?this.SymmetricExceptWithSameEC$1(r):(n=new(System.Collections.Generic.List$1(e)).$ctor1(t).ToArray(),System.Array.sort(n,this.Comparer),this.SymmetricExceptWithSameEC(n))},SymmetricExceptWithSameEC$1:function(t){var i,r;i=Bridge.getEnumerator(t,e);try{for(;i.moveNext();)r=i.Current,this.contains(r)?this.remove(r):this.add(r)}finally{Bridge.is(i,System.IDisposable)&&i.System$IDisposable$Dispose()}},SymmetricExceptWithSameEC:function(t){var i,r;if(t.length!==0)for(i=t[System.Array.index(0,t)],r=0;r<t.length;r=r+1|0){for(;r<t.length&&r!==0&&this.comparer[Bridge.geti(this.comparer,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](t[System.Array.index(r,t)],i)===0;)r=r+1|0;if(r>=t.length)break;this.contains(t[System.Array.index(r,t)])?this.remove(t[System.Array.index(r,t)]):this.add(t[System.Array.index(r,t)]),i=t[System.Array.index(r,t)]}},isSubsetOf:function(t){var i,r;if(t==null)throw new System.ArgumentNullException.$ctor1("other");return this.Count===0?!0:(i=Bridge.as(t,System.Collections.Generic.SortedSet$1(e)),i!=null&&System.Collections.Generic.SortedSet$1(e).AreComparersEqual(this,i)?this.Count>i.Count?!1:this.IsSubsetOfSortedSetWithSameEC(i):(r=this.CheckUniqueAndUnfoundElements(t,!1),r.uniqueCount===this.Count&&r.unfoundCount>=0))},IsSubsetOfSortedSetWithSameEC:function(t){var i,r=t.GetViewBetween(this.Min,this.Max),n;i=Bridge.getEnumerator(this);try{for(;i.moveNext();)if(n=i.Current,!r.contains(n))return!1}finally{Bridge.is(i,System.IDisposable)&&i.System$IDisposable$Dispose()}return!0},isProperSubsetOf:function(t){var i,r,n;if(t==null)throw new System.ArgumentNullException.$ctor1("other");return Bridge.as(t,System.Collections.ICollection)!=null&&this.Count===0?System.Array.getCount(Bridge.as(t,System.Collections.ICollection))>0:(i=Bridge.as(t,System.Collections.Generic.HashSet$1(e)),i!=null&&Bridge.equals(this.comparer,new(System.Collections.Generic.Comparer$1(e))(System.Collections.Generic.Comparer$1.$default.fn))&&Bridge.equals(i.Comparer,System.Collections.Generic.EqualityComparer$1(e).def)?i.isProperSupersetOf(this):(r=Bridge.as(t,System.Collections.Generic.SortedSet$1(e)),r!=null&&System.Collections.Generic.SortedSet$1(e).AreComparersEqual(this,r)?this.Count>=r.Count?!1:this.IsSubsetOfSortedSetWithSameEC(r):(n=this.CheckUniqueAndUnfoundElements(t,!1),n.uniqueCount===this.Count&&n.unfoundCount>0)))},isSupersetOf:function(t){var i,r,n,s,o;if(t==null)throw new System.ArgumentNullException.$ctor1("other");if(Bridge.as(t,System.Collections.ICollection)!=null&&System.Array.getCount(Bridge.as(t,System.Collections.ICollection))===0)return!0;if(r=Bridge.as(t,System.Collections.Generic.HashSet$1(e)),r!=null&&Bridge.equals(this.comparer,new(System.Collections.Generic.Comparer$1(e))(System.Collections.Generic.Comparer$1.$default.fn))&&Bridge.equals(r.Comparer,System.Collections.Generic.EqualityComparer$1(e).def))return r.isSubsetOf(this);if(n=Bridge.as(t,System.Collections.Generic.SortedSet$1(e)),n!=null&&System.Collections.Generic.SortedSet$1(e).AreComparersEqual(this,n)){if(this.Count<n.Count)return!1;s=this.GetViewBetween(n.Min,n.Max),i=Bridge.getEnumerator(n);try{for(;i.moveNext();)if(o=i.Current,!s.contains(o))return!1}finally{Bridge.is(i,System.IDisposable)&&i.System$IDisposable$Dispose()}return!0}return this.ContainsAllElements(t)},isProperSupersetOf:function(t){var i,r,n,s,o,a;if(t==null)throw new System.ArgumentNullException.$ctor1("other");if(this.Count===0)return!1;if(Bridge.as(t,System.Collections.ICollection)!=null&&System.Array.getCount(Bridge.as(t,System.Collections.ICollection))===0)return!0;if(r=Bridge.as(t,System.Collections.Generic.HashSet$1(e)),r!=null&&Bridge.equals(this.comparer,new(System.Collections.Generic.Comparer$1(e))(System.Collections.Generic.Comparer$1.$default.fn))&&Bridge.equals(r.Comparer,System.Collections.Generic.EqualityComparer$1(e).def))return r.isProperSubsetOf(this);if(n=Bridge.as(t,System.Collections.Generic.SortedSet$1(e)),n!=null&&System.Collections.Generic.SortedSet$1(e).AreComparersEqual(n,this)){if(n.Count>=this.Count)return!1;s=this.GetViewBetween(n.Min,n.Max),i=Bridge.getEnumerator(n);try{for(;i.moveNext();)if(o=i.Current,!s.contains(o))return!1}finally{Bridge.is(i,System.IDisposable)&&i.System$IDisposable$Dispose()}return!0}return a=this.CheckUniqueAndUnfoundElements(t,!0),a.uniqueCount<this.Count&&a.unfoundCount===0},setEquals:function(t){var i,r,n,s;if(t==null)throw new System.ArgumentNullException.$ctor1("other");if(r=Bridge.as(t,System.Collections.Generic.HashSet$1(e)),r!=null&&Bridge.equals(this.comparer,new(System.Collections.Generic.Comparer$1(e))(System.Collections.Generic.Comparer$1.$default.fn))&&Bridge.equals(r.Comparer,System.Collections.Generic.EqualityComparer$1(e).def))return r.setEquals(this);if(n=Bridge.as(t,System.Collections.Generic.SortedSet$1(e)),n!=null&&System.Collections.Generic.SortedSet$1(e).AreComparersEqual(this,n)){for(var o=this.GetEnumerator().$clone(),a=n.GetEnumerator().$clone(),l=!o.System$Collections$IEnumerator$moveNext(),u=!a.System$Collections$IEnumerator$moveNext();!l&&!u;){if((i=this.Comparer)[Bridge.geti(i,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](o[Bridge.geti(o,"System$Collections$Generic$IEnumerator$1$"+Bridge.getTypeAlias(e)+"$Current$1","System$Collections$Generic$IEnumerator$1$Current$1")],a[Bridge.geti(a,"System$Collections$Generic$IEnumerator$1$"+Bridge.getTypeAlias(e)+"$Current$1","System$Collections$Generic$IEnumerator$1$Current$1")])!==0)return!1;l=!o.System$Collections$IEnumerator$moveNext(),u=!a.System$Collections$IEnumerator$moveNext()}return l&&u}return s=this.CheckUniqueAndUnfoundElements(t,!0),s.uniqueCount===this.Count&&s.unfoundCount===0},overlaps:function(t){var i,r,n,s;if(t==null)throw new System.ArgumentNullException.$ctor1("other");if(this.Count===0||Bridge.as(t,System.Collections.Generic.ICollection$1(e))!=null&&System.Array.getCount(Bridge.as(t,System.Collections.Generic.ICollection$1(e)),e)===0||(r=Bridge.as(t,System.Collections.Generic.SortedSet$1(e)),r!=null&&System.Collections.Generic.SortedSet$1(e).AreComparersEqual(this,r)&&(this.comparer[Bridge.geti(this.comparer,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](this.Min,r.Max)>0||this.comparer[Bridge.geti(this.comparer,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](this.Max,r.Min)<0)))return!1;if(n=Bridge.as(t,System.Collections.Generic.HashSet$1(e)),n!=null&&Bridge.equals(this.comparer,new(System.Collections.Generic.Comparer$1(e))(System.Collections.Generic.Comparer$1.$default.fn))&&Bridge.equals(n.Comparer,System.Collections.Generic.EqualityComparer$1(e).def))return n.overlaps(this);i=Bridge.getEnumerator(t,e);try{for(;i.moveNext();)if(s=i.Current,this.contains(s))return!0}finally{Bridge.is(i,System.IDisposable)&&i.System$IDisposable$Dispose()}return!1},CheckUniqueAndUnfoundElements:function(t,i){var r,n,s=new(System.Collections.Generic.SortedSet$1.ElementCount(e)),o,a,l,u,d,f;if(this.Count===0){o=0,r=Bridge.getEnumerator(t,e);try{for(;r.moveNext();){a=r.Current,o=o+1|0;break}}finally{Bridge.is(r,System.IDisposable)&&r.System$IDisposable$Dispose()}return s.uniqueCount=0,s.unfoundCount=o,s.$clone()}var C=this.Count,E=System.Collections.Generic.BitHelper.ToIntArrayLength(C),T,w=System.Array.init(E,0,System.Int32);T=new System.Collections.Generic.BitHelper(w,E),l=0,u=0,n=Bridge.getEnumerator(t,e);try{for(;n.moveNext();)if(d=n.Current,f=this.InternalIndexOf(d),f>=0)T.IsMarked(f)||(T.MarkBit(f),u=u+1|0);else if(l=l+1|0,i)break}finally{Bridge.is(n,System.IDisposable)&&n.System$IDisposable$Dispose()}return s.uniqueCount=u,s.unfoundCount=l,s.$clone()},RemoveWhere:function(t){var i,r,n;if(Bridge.staticEquals(t,null))throw new System.ArgumentNullException.$ctor1("match");for(i=new(System.Collections.Generic.List$1(e)).$ctor2(this.Count),this.BreadthFirstTreeWalk(function(s){return t(s.Item)&&i.add(s.Item),!0}),r=0,n=i.Count-1|0;n>=0;n=n-1|0)this.remove(i.getItem(n))&&(r=r+1|0);return r},Reverse:function(){return new(Bridge.GeneratorEnumerable$1(e))(Bridge.fn.bind(this,function(){var t=0,i,r,n,s,o=new(Bridge.GeneratorEnumerator$1(e))(Bridge.fn.bind(this,function(){try{for(;;)switch(t){case 0:n=new(System.Collections.Generic.SortedSet$1.Enumerator(e)).$ctor2(this,!0),t=1;continue;case 1:if(n.moveNext()){t=2;continue}t=4;continue;case 2:return o.current=n.Current,t=3,!0;case 3:t=1;continue;case 4:default:return!1}}catch(a){throw s=System.Exception.create(a),s}}));return o}))},GetViewBetween:function(t,i){var r;if((r=this.Comparer)[Bridge.geti(r,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](t,i)>0)throw new System.ArgumentException.$ctor1("lowerBound is greater than upperBound");return new(System.Collections.Generic.SortedSet$1.TreeSubSet(e)).$ctor1(this,t,i,!0,!0)},TryGetValue:function(t,i){var r=this.FindNode(t);return r!=null?(i.v=r.Item,!0):(i.v=Bridge.getDefaultValue(e),!1)}}}}),Bridge.define("System.Collections.Generic.SortedSetEqualityComparer$1",function(e){return{inherits:[System.Collections.Generic.IEqualityComparer$1(System.Collections.Generic.SortedSet$1(e))],fields:{comparer:null,e_comparer:null},alias:["equals2",["System$Collections$Generic$IEqualityComparer$1$System$Collections$Generic$SortedSet$1$"+Bridge.getTypeAlias(e)+"$equals2","System$Collections$Generic$IEqualityComparer$1$equals2"],"getHashCode2",["System$Collections$Generic$IEqualityComparer$1$System$Collections$Generic$SortedSet$1$"+Bridge.getTypeAlias(e)+"$getHashCode2","System$Collections$Generic$IEqualityComparer$1$getHashCode2"]],ctors:{ctor:function(){System.Collections.Generic.SortedSetEqualityComparer$1(e).$ctor2.call(this,null,null)},$ctor1:function(t){System.Collections.Generic.SortedSetEqualityComparer$1(e).$ctor2.call(this,t,null)},$ctor3:function(t){System.Collections.Generic.SortedSetEqualityComparer$1(e).$ctor2.call(this,null,t)},$ctor2:function(t,i){this.$initialize(),this.comparer=t??new(System.Collections.Generic.Comparer$1(e))(System.Collections.Generic.Comparer$1.$default.fn),this.e_comparer=i??System.Collections.Generic.EqualityComparer$1(e).def}},methods:{equals2:function(t,i){return System.Collections.Generic.SortedSet$1(e).SortedSetEquals(t,i,this.comparer)},equals:function(t){var i=Bridge.as(t,System.Collections.Generic.SortedSetEqualityComparer$1(e));return i==null?!1:Bridge.referenceEquals(this.comparer,i.comparer)},getHashCode2:function(t){var i,r=0,n;if(t!=null){i=Bridge.getEnumerator(t);try{for(;i.moveNext();)n=i.Current,r=r^this.e_comparer[Bridge.geti(this.e_comparer,"System$Collections$Generic$IEqualityComparer$1$"+Bridge.getTypeAlias(e)+"$getHashCode2","System$Collections$Generic$IEqualityComparer$1$getHashCode2")](n)&2147483647}finally{Bridge.is(i,System.IDisposable)&&i.System$IDisposable$Dispose()}}return r},getHashCode:function(){return Bridge.getHashCode(this.comparer)^Bridge.getHashCode(this.e_comparer)}}}}),Bridge.define("System.Collections.Generic.SortedSet$1.ElementCount",function(e){return{$kind:"nested struct",statics:{methods:{getDefaultValue:function(){return new(System.Collections.Generic.SortedSet$1.ElementCount(e))}}},fields:{uniqueCount:0,unfoundCount:0},ctors:{ctor:function(){this.$initialize()}},methods:{getHashCode:function(){return Bridge.addHash([4920463385,this.uniqueCount,this.unfoundCount])},equals:function(t){return Bridge.is(t,System.Collections.Generic.SortedSet$1.ElementCount(e))?Bridge.equals(this.uniqueCount,t.uniqueCount)&&Bridge.equals(this.unfoundCount,t.unfoundCount):!1},$clone:function(t){var i=t||new(System.Collections.Generic.SortedSet$1.ElementCount(e));return i.uniqueCount=this.uniqueCount,i.unfoundCount=this.unfoundCount,i}}}}),Bridge.define("System.Collections.Generic.SortedSet$1.Enumerator",function(e){return{inherits:[System.Collections.Generic.IEnumerator$1(e),System.Collections.IEnumerator],$kind:"nested struct",statics:{fields:{dummyNode:null},ctors:{init:function(){this.dummyNode=new(System.Collections.Generic.SortedSet$1.Node(e)).ctor(Bridge.getDefaultValue(e))}},methods:{getDefaultValue:function(){return new(System.Collections.Generic.SortedSet$1.Enumerator(e))}}},fields:{tree:null,version:0,stack:null,current:null,reverse:!1},props:{Current:{get:function(){return this.current!=null?this.current.Item:Bridge.getDefaultValue(e)}},System$Collections$IEnumerator$Current:{get:function(){return this.current==null&&System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumOpCantHappen),this.current.Item}},NotStartedOrEnded:{get:function(){return this.current==null}}},alias:["moveNext","System$Collections$IEnumerator$moveNext","Dispose","System$IDisposable$Dispose","Current",["System$Collections$Generic$IEnumerator$1$"+Bridge.getTypeAlias(e)+"$Current$1","System$Collections$Generic$IEnumerator$1$Current$1"]],ctors:{$ctor1:function(t){this.$initialize(),this.tree=t,this.tree.VersionCheck(),this.version=this.tree.version,this.stack=new(System.Collections.Generic.Stack$1(System.Collections.Generic.SortedSet$1.Node(e))).$ctor2(Bridge.Int.mul(2,System.Collections.Generic.SortedSet$1(e).log2(t.Count+1|0))),this.current=null,this.reverse=!1,this.Intialize()},$ctor2:function(t,i){this.$initialize(),this.tree=t,this.tree.VersionCheck(),this.version=this.tree.version,this.stack=new(System.Collections.Generic.Stack$1(System.Collections.Generic.SortedSet$1.Node(e))).$ctor2(Bridge.Int.mul(2,System.Collections.Generic.SortedSet$1(e).log2(t.Count+1|0))),this.current=null,this.reverse=i,this.Intialize()},ctor:function(){this.$initialize()}},methods:{Intialize:function(){this.current=null;for(var t=this.tree.root,i=null,r=null;t!=null;)i=this.reverse?t.Right:t.Left,r=this.reverse?t.Left:t.Right,this.tree.IsWithinRange(t.Item)?(this.stack.Push(t),t=i):t=i!=null&&this.tree.IsWithinRange(i.Item)?i:r},moveNext:function(){if(this.tree.VersionCheck(),this.version!==this.tree.version&&System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumFailedVersion),this.stack.Count===0)return this.current=null,!1;this.current=this.stack.Pop();for(var t=this.reverse?this.current.Left:this.current.Right,i=null,r=null;t!=null;)i=this.reverse?t.Right:t.Left,r=this.reverse?t.Left:t.Right,this.tree.IsWithinRange(t.Item)?(this.stack.Push(t),t=i):t=r!=null&&this.tree.IsWithinRange(r.Item)?r:i;return!0},Dispose:function(){},Reset:function(){this.version!==this.tree.version&&System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumFailedVersion),this.stack.Clear(),this.Intialize()},System$Collections$IEnumerator$reset:function(){this.Reset()},getHashCode:function(){return Bridge.addHash([3788985113,this.tree,this.version,this.stack,this.current,this.reverse])},equals:function(t){return Bridge.is(t,System.Collections.Generic.SortedSet$1.Enumerator(e))?Bridge.equals(this.tree,t.tree)&&Bridge.equals(this.version,t.version)&&Bridge.equals(this.stack,t.stack)&&Bridge.equals(this.current,t.current)&&Bridge.equals(this.reverse,t.reverse):!1},$clone:function(t){var i=t||new(System.Collections.Generic.SortedSet$1.Enumerator(e));return i.tree=this.tree,i.version=this.version,i.stack=this.stack,i.current=this.current,i.reverse=this.reverse,i}}}}),Bridge.define("System.Collections.Generic.SortedSet$1.Node",function(e){return{$kind:"nested class",fields:{IsRed:!1,Item:Bridge.getDefaultValue(e),Left:null,Right:null},ctors:{ctor:function(t){this.$initialize(),this.Item=t,this.IsRed=!0},$ctor1:function(t,i){this.$initialize(),this.Item=t,this.IsRed=i}}}}),Bridge.define("System.Collections.Generic.SortedSet$1.TreeSubSet",function(e){return{inherits:[System.Collections.Generic.SortedSet$1(e)],$kind:"nested class",fields:{underlying:null,min:Bridge.getDefaultValue(e),max:Bridge.getDefaultValue(e),lBoundActive:!1,uBoundActive:!1},alias:["contains","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$contains","clear","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$clear"],ctors:{$ctor1:function(t,i,r,n,s){this.$initialize(),System.Collections.Generic.SortedSet$1(e).$ctor1.call(this,t.Comparer),this.underlying=t,this.min=i,this.max=r,this.lBoundActive=n,this.uBoundActive=s,this.root=this.underlying.FindRange$1(this.min,this.max,this.lBoundActive,this.uBoundActive),this.count=0,this.version=-1,this.VersionCheckImpl()},ctor:function(){this.$initialize(),System.Collections.Generic.SortedSet$1(e).ctor.call(this),this.comparer=null}},methods:{AddIfNotPresent:function(t){this.IsWithinRange(t)||System.ThrowHelper.ThrowArgumentOutOfRangeException$1(System.ExceptionArgument.collection);var i=this.underlying.AddIfNotPresent(t);return this.VersionCheck(),i},contains:function(t){return this.VersionCheck(),System.Collections.Generic.SortedSet$1(e).prototype.contains.call(this,t)},DoRemove:function(t){if(!this.IsWithinRange(t))return!1;var i=this.underlying.remove(t);return this.VersionCheck(),i},clear:function(){if(this.count!==0){var t=new(System.Collections.Generic.List$1(e)).ctor;for(this.BreadthFirstTreeWalk(function(i){return t.add(i.Item),!0});t.Count!==0;)this.underlying.remove(t.getItem(t.Count-1|0)),t.removeAt(t.Count-1|0);this.root=null,this.count=0,this.version=this.underlying.version}},IsWithinRange:function(t){var i,r,n=this.lBoundActive?(i=this.Comparer)[Bridge.geti(i,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](this.min,t):-1;return n>0?!1:(n=this.uBoundActive?(r=this.Comparer)[Bridge.geti(r,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](this.max,t):1,!(n<0))},InOrderTreeWalk$1:function(t,i){var r,n,s,o,a;if(this.VersionCheck(),this.root==null)return!0;for(s=new(System.Collections.Generic.Stack$1(System.Collections.Generic.SortedSet$1.Node(e))).$ctor2(Bridge.Int.mul(2,System.Collections.Generic.SortedSet$1(e).log2(this.count+1|0))),o=this.root;o!=null;)this.IsWithinRange(o.Item)?(s.Push(o),o=i?o.Right:o.Left):o=this.lBoundActive&&(r=this.Comparer)[Bridge.geti(r,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](this.min,o.Item)>0?o.Right:o.Left;for(;s.Count!==0;){if(o=s.Pop(),!t(o))return!1;for(a=i?o.Left:o.Right;a!=null;)this.IsWithinRange(a.Item)?(s.Push(a),a=i?a.Right:a.Left):a=this.lBoundActive&&(n=this.Comparer)[Bridge.geti(n,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](this.min,a.Item)>0?a.Right:a.Left}return!0},BreadthFirstTreeWalk:function(t){var i,r,n,s;if(this.VersionCheck(),this.root==null)return!0;for(n=new(System.Collections.Generic.List$1(System.Collections.Generic.SortedSet$1.Node(e))).ctor,n.add(this.root);n.Count!==0;){if(s=n.getItem(0),n.removeAt(0),this.IsWithinRange(s.Item)&&!t(s))return!1;s.Left!=null&&(!this.lBoundActive||(i=this.Comparer)[Bridge.geti(i,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](this.min,s.Item)<0)&&n.add(s.Left),s.Right!=null&&(!this.uBoundActive||(r=this.Comparer)[Bridge.geti(r,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](this.max,s.Item)>0)&&n.add(s.Right)}return!0},FindNode:function(t){return this.IsWithinRange(t)?(this.VersionCheck(),System.Collections.Generic.SortedSet$1(e).prototype.FindNode.call(this,t)):null},InternalIndexOf:function(t){var i,r,n=-1,s;i=Bridge.getEnumerator(this);try{for(;i.moveNext();)if(s=i.Current,n=n+1|0,(r=this.Comparer)[Bridge.geti(r,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](t,s)===0)return n}finally{Bridge.is(i,System.IDisposable)&&i.System$IDisposable$Dispose()}return-1},VersionCheck:function(){this.VersionCheckImpl()},VersionCheckImpl:function(){this.version!==this.underlying.version&&(this.root=this.underlying.FindRange$1(this.min,this.max,this.lBoundActive,this.uBoundActive),this.version=this.underlying.version,this.count=0,this.InOrderTreeWalk(Bridge.fn.bind(this,de.$.System.Collections.Generic.SortedSet$1.TreeSubSet.f1)))},GetViewBetween:function(t,i){var r,n;if(this.lBoundActive&&(r=this.Comparer)[Bridge.geti(r,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](this.min,t)>0)throw new System.ArgumentOutOfRangeException.$ctor1("lowerValue");if(this.uBoundActive&&(n=this.Comparer)[Bridge.geti(n,"System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare","System$Collections$Generic$IComparer$1$compare")](this.max,i)<0)throw new System.ArgumentOutOfRangeException.$ctor1("upperValue");return Bridge.cast(this.underlying.GetViewBetween(t,i),System.Collections.Generic.SortedSet$1.TreeSubSet(e))},IntersectWithEnumerable:function(t){var i,r=new(System.Collections.Generic.List$1(e)).$ctor2(this.Count),n;i=Bridge.getEnumerator(t,e);try{for(;i.moveNext();)n=i.Current,this.contains(n)&&(r.add(n),this.remove(n))}finally{Bridge.is(i,System.IDisposable)&&i.System$IDisposable$Dispose()}this.clear(),this.AddAllElements(r)}}}}),Bridge.ns("System.Collections.Generic.SortedSet$1.TreeSubSet",de.$),Bridge.apply(de.$.System.Collections.Generic.SortedSet$1.TreeSubSet,{f1:function(e){return this.count=this.count+1|0,!0}}),Bridge.define("System.Collections.Generic.LinkedList$1",function(e){return{inherits:[System.Collections.Generic.ICollection$1(e),System.Collections.ICollection,System.Collections.Generic.IReadOnlyCollection$1(e)],statics:{fields:{VersionName:null,CountName:null,ValuesName:null},ctors:{init:function(){this.VersionName="Version",this.CountName="Count",this.ValuesName="Data"}}},fields:{head:null,count:0,version:0},props:{Count:{get:function(){return this.count}},First:{get:function(){return this.head}},Last:{get:function(){return this.head==null?null:this.head.prev}},System$Collections$Generic$ICollection$1$IsReadOnly:{get:function(){return!1}},System$Collections$ICollection$IsSynchronized:{get:function(){return!1}},System$Collections$ICollection$SyncRoot:{get:function(){return null}}},alias:["Count",["System$Collections$Generic$IReadOnlyCollection$1$"+Bridge.getTypeAlias(e)+"$Count","System$Collections$Generic$IReadOnlyCollection$1$Count"],"Count","System$Collections$ICollection$Count","Count","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$Count","System$Collections$Generic$ICollection$1$IsReadOnly","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$IsReadOnly","System$Collections$Generic$ICollection$1$add","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$add","clear","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$clear","contains","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$contains","copyTo","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$copyTo","System$Collections$Generic$IEnumerable$1$GetEnumerator","System$Collections$Generic$IEnumerable$1$"+Bridge.getTypeAlias(e)+"$GetEnumerator","remove","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$remove"],ctors:{ctor:function(){this.$initialize()},$ctor1:function(t){var i,r;if(this.$initialize(),t==null)throw new System.ArgumentNullException.$ctor1("collection");i=Bridge.getEnumerator(t,e);try{for(;i.moveNext();)r=i.Current,this.AddLast(r)}finally{Bridge.is(i,System.IDisposable)&&i.System$IDisposable$Dispose()}}},methods:{System$Collections$Generic$ICollection$1$add:function(t){this.AddLast(t)},AddAfter:function(t,i){this.ValidateNode(t);var r=new(System.Collections.Generic.LinkedListNode$1(e)).$ctor1(t.list,i);return this.InternalInsertNodeBefore(t.next,r),r},AddAfter$1:function(t,i){this.ValidateNode(t),this.ValidateNewNode(i),this.InternalInsertNodeBefore(t.next,i),i.list=this},AddBefore:function(t,i){this.ValidateNode(t);var r=new(System.Collections.Generic.LinkedListNode$1(e)).$ctor1(t.list,i);return this.InternalInsertNodeBefore(t,r),Bridge.referenceEquals(t,this.head)&&(this.head=r),r},AddBefore$1:function(t,i){this.ValidateNode(t),this.ValidateNewNode(i),this.InternalInsertNodeBefore(t,i),i.list=this,Bridge.referenceEquals(t,this.head)&&(this.head=i)},AddFirst:function(t){var i=new(System.Collections.Generic.LinkedListNode$1(e)).$ctor1(this,t);return this.head==null?this.InternalInsertNodeToEmptyList(i):(this.InternalInsertNodeBefore(this.head,i),this.head=i),i},AddFirst$1:function(t){this.ValidateNewNode(t),this.head==null?this.InternalInsertNodeToEmptyList(t):(this.InternalInsertNodeBefore(this.head,t),this.head=t),t.list=this},AddLast:function(t){var i=new(System.Collections.Generic.LinkedListNode$1(e)).$ctor1(this,t);return this.head==null?this.InternalInsertNodeToEmptyList(i):this.InternalInsertNodeBefore(this.head,i),i},AddLast$1:function(t){this.ValidateNewNode(t),this.head==null?this.InternalInsertNodeToEmptyList(t):this.InternalInsertNodeBefore(this.head,t),t.list=this},clear:function(){for(var t=this.head,i;t!=null;)i=t,t=t.Next,i.Invalidate();this.head=null,this.count=0,this.version=this.version+1|0},contains:function(t){return this.Find(t)!=null},copyTo:function(t,i){if(t==null)throw new System.ArgumentNullException.$ctor1("array");if(i<0||i>t.length)throw new System.ArgumentOutOfRangeException.$ctor1("index");if((t.length-i|0)<this.Count)throw new System.ArgumentException.ctor;var r=this.head;if(r!=null)do t[System.Array.index(Bridge.identity(i,i=i+1|0),t)]=r.item,r=r.next;while(!Bridge.referenceEquals(r,this.head))},System$Collections$ICollection$copyTo:function(t,i){var r,n,s,o,a;if(t==null)throw new System.ArgumentNullException.$ctor1("array");if(System.Array.getRank(t)!==1)throw new System.ArgumentException.ctor;if(System.Array.getLower(t,0)!==0)throw new System.ArgumentException.ctor;if(i<0)throw new System.ArgumentOutOfRangeException.$ctor1("index");if((t.length-i|0)<this.Count)throw new System.ArgumentException.ctor;if(r=Bridge.as(t,System.Array.type(e)),r!=null)this.copyTo(r,i);else{if(n=Bridge.getType(t).$elementType||null,s=e,!(Bridge.Reflection.isAssignableFrom(n,s)||Bridge.Reflection.isAssignableFrom(s,n)))throw new System.ArgumentException.ctor;if(o=Bridge.as(t,System.Array.type(System.Object)),o==null)throw new System.ArgumentException.ctor;a=this.head;try{if(a!=null)do o[System.Array.index(Bridge.identity(i,i=i+1|0),o)]=a.item,a=a.next;while(!Bridge.referenceEquals(a,this.head))}catch(l){throw l=System.Exception.create(l),Bridge.is(l,System.ArrayTypeMismatchException)?new System.ArgumentException.ctor:l}}},Find:function(t){var i=this.head,r=System.Collections.Generic.EqualityComparer$1(e).def;if(i!=null)if(t!=null)do{if(r.equals2(i.item,t))return i;i=i.next}while(!Bridge.referenceEquals(i,this.head));else do{if(i.item==null)return i;i=i.next}while(!Bridge.referenceEquals(i,this.head));return null},FindLast:function(t){if(this.head==null)return null;var i=this.head.prev,r=i,n=System.Collections.Generic.EqualityComparer$1(e).def;if(r!=null)if(t!=null)do{if(n.equals2(r.item,t))return r;r=r.prev}while(!Bridge.referenceEquals(r,i));else do{if(r.item==null)return r;r=r.prev}while(!Bridge.referenceEquals(r,i));return null},GetEnumerator:function(){return new(System.Collections.Generic.LinkedList$1.Enumerator(e)).$ctor1(this)},System$Collections$Generic$IEnumerable$1$GetEnumerator:function(){return this.GetEnumerator().$clone()},System$Collections$IEnumerable$GetEnumerator:function(){return this.GetEnumerator().$clone()},remove:function(t){var i=this.Find(t);return i!=null?(this.InternalRemoveNode(i),!0):!1},Remove:function(t){this.ValidateNode(t),this.InternalRemoveNode(t)},RemoveFirst:function(){if(this.head==null)throw new System.InvalidOperationException.ctor;this.InternalRemoveNode(this.head)},RemoveLast:function(){if(this.head==null)throw new System.InvalidOperationException.ctor;this.InternalRemoveNode(this.head.prev)},InternalInsertNodeBefore:function(t,i){i.next=t,i.prev=t.prev,t.prev.next=i,t.prev=i,this.version=this.version+1|0,this.count=this.count+1|0},InternalInsertNodeToEmptyList:function(t){t.next=t,t.prev=t,this.head=t,this.version=this.version+1|0,this.count=this.count+1|0},InternalRemoveNode:function(t){Bridge.referenceEquals(t.next,t)?this.head=null:(t.next.prev=t.prev,t.prev.next=t.next,Bridge.referenceEquals(this.head,t)&&(this.head=t.next)),t.Invalidate(),this.count=this.count-1|0,this.version=this.version+1|0},ValidateNewNode:function(t){if(t==null)throw new System.ArgumentNullException.$ctor1("node");if(t.list!=null)throw new System.InvalidOperationException.ctor},ValidateNode:function(t){if(t==null)throw new System.ArgumentNullException.$ctor1("node");if(!Bridge.referenceEquals(t.list,this))throw new System.InvalidOperationException.ctor}}}}),Bridge.define("System.Collections.Generic.LinkedListNode$1",function(e){return{fields:{list:null,next:null,prev:null,item:Bridge.getDefaultValue(e)},props:{List:{get:function(){return this.list}},Next:{get:function(){return this.next==null||Bridge.referenceEquals(this.next,this.list.head)?null:this.next}},Previous:{get:function(){return this.prev==null||Bridge.referenceEquals(this,this.list.head)?null:this.prev}},Value:{get:function(){return this.item},set:function(t){this.item=t}}},ctors:{ctor:function(t){this.$initialize(),this.item=t},$ctor1:function(t,i){this.$initialize(),this.list=t,this.item=i}},methods:{Invalidate:function(){this.list=null,this.next=null,this.prev=null}}}}),Bridge.define("System.Collections.Generic.LinkedList$1.Enumerator",function(e){return{inherits:[System.Collections.Generic.IEnumerator$1(e),System.Collections.IEnumerator],$kind:"nested struct",statics:{fields:{LinkedListName:null,CurrentValueName:null,VersionName:null,IndexName:null},ctors:{init:function(){this.LinkedListName="LinkedList",this.CurrentValueName="Current",this.VersionName="Version",this.IndexName="Index"}},methods:{getDefaultValue:function(){return new(System.Collections.Generic.LinkedList$1.Enumerator(e))}}},fields:{list:null,node:null,version:0,current:Bridge.getDefaultValue(e),index:0},props:{Current:{get:function(){return this.current}},System$Collections$IEnumerator$Current:{get:function(){return(this.index===0||this.index===(this.list.Count+1|0))&&System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumOpCantHappen),this.current}}},alias:["Current",["System$Collections$Generic$IEnumerator$1$"+Bridge.getTypeAlias(e)+"$Current$1","System$Collections$Generic$IEnumerator$1$Current$1"],"moveNext","System$Collections$IEnumerator$moveNext","Dispose","System$IDisposable$Dispose"],ctors:{$ctor1:function(t){this.$initialize(),this.list=t,this.version=t.version,this.node=t.head,this.current=Bridge.getDefaultValue(e),this.index=0},ctor:function(){this.$initialize()}},methods:{moveNext:function(){if(this.version!==this.list.version)throw new System.InvalidOperationException.ctor;return this.node==null?(this.index=this.list.Count+1|0,!1):(this.index=this.index+1|0,this.current=this.node.item,this.node=this.node.next,Bridge.referenceEquals(this.node,this.list.head)&&(this.node=null),!0)},System$Collections$IEnumerator$reset:function(){if(this.version!==this.list.version)throw new System.InvalidOperationException.ctor;this.current=Bridge.getDefaultValue(e),this.node=this.list.head,this.index=0},Dispose:function(){},getHashCode:function(){return Bridge.addHash([3788985113,this.list,this.node,this.version,this.current,this.index])},equals:function(t){return Bridge.is(t,System.Collections.Generic.LinkedList$1.Enumerator(e))?Bridge.equals(this.list,t.list)&&Bridge.equals(this.node,t.node)&&Bridge.equals(this.version,t.version)&&Bridge.equals(this.current,t.current)&&Bridge.equals(this.index,t.index):!1},$clone:function(t){var i=t||new(System.Collections.Generic.LinkedList$1.Enumerator(e));return i.list=this.list,i.node=this.node,i.version=this.version,i.current=this.current,i.index=this.index,i}}}}),Bridge.define("System.Collections.Generic.TreeRotation",{$kind:"enum",statics:{fields:{LeftRotation:1,RightRotation:2,RightLeftRotation:3,LeftRightRotation:4}}}),Bridge.define("System.Collections.Generic.Dictionary$2",function(e,t){return{inherits:[System.Collections.Generic.IDictionary$2(e,t),System.Collections.IDictionary,System.Collections.Generic.IReadOnlyDictionary$2(e,t)],statics:{fields:{VersionName:null,HashSizeName:null,KeyValuePairsName:null,ComparerName:null},ctors:{init:function(){this.VersionName="Version",this.HashSizeName="HashSize",this.KeyValuePairsName="KeyValuePairs",this.ComparerName="Comparer"}},methods:{IsCompatibleKey:function(i){return i==null&&System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.key),Bridge.is(i,e)}}},fields:{buckets:null,simpleBuckets:null,entries:null,count:0,version:0,freeList:0,freeCount:0,comparer:null,keys:null,values:null,isSimpleKey:!1},props:{Comparer:{get:function(){return this.comparer}},Count:{get:function(){return this.count-this.freeCount|0}},Keys:{get:function(){return this.keys==null&&(this.keys=new(System.Collections.Generic.Dictionary$2.KeyCollection(e,t))(this)),this.keys}},System$Collections$Generic$IDictionary$2$Keys:{get:function(){return this.keys==null&&(this.keys=new(System.Collections.Generic.Dictionary$2.KeyCollection(e,t))(this)),this.keys}},System$Collections$Generic$IReadOnlyDictionary$2$Keys:{get:function(){return this.keys==null&&(this.keys=new(System.Collections.Generic.Dictionary$2.KeyCollection(e,t))(this)),this.keys}},Values:{get:function(){return this.values==null&&(this.values=new(System.Collections.Generic.Dictionary$2.ValueCollection(e,t))(this)),this.values}},System$Collections$Generic$IDictionary$2$Values:{get:function(){return this.values==null&&(this.values=new(System.Collections.Generic.Dictionary$2.ValueCollection(e,t))(this)),this.values}},System$Collections$Generic$IReadOnlyDictionary$2$Values:{get:function(){return this.values==null&&(this.values=new(System.Collections.Generic.Dictionary$2.ValueCollection(e,t))(this)),this.values}},System$Collections$Generic$ICollection$1$IsReadOnly:{get:function(){return!1}},System$Collections$ICollection$IsSynchronized:{get:function(){return!1}},System$Collections$ICollection$SyncRoot:{get:function(){return null}},System$Collections$IDictionary$IsFixedSize:{get:function(){return!1}},System$Collections$IDictionary$IsReadOnly:{get:function(){return!1}},System$Collections$IDictionary$Keys:{get:function(){return Bridge.cast(this.Keys,System.Collections.ICollection)}},System$Collections$IDictionary$Values:{get:function(){return Bridge.cast(this.Values,System.Collections.ICollection)}}},alias:["Count",["System$Collections$Generic$IReadOnlyCollection$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$Count","System$Collections$Generic$IReadOnlyCollection$1$Count"],"Count","System$Collections$ICollection$Count","Count","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$Count","System$Collections$Generic$IDictionary$2$Keys","System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$Keys","System$Collections$Generic$IReadOnlyDictionary$2$Keys","System$Collections$Generic$IReadOnlyDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$Keys","System$Collections$Generic$IDictionary$2$Values","System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$Values","System$Collections$Generic$IReadOnlyDictionary$2$Values","System$Collections$Generic$IReadOnlyDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$Values","getItem","System$Collections$Generic$IReadOnlyDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$getItem","setItem","System$Collections$Generic$IReadOnlyDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$setItem","getItem","System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$getItem","setItem","System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$setItem","add","System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$add","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$add","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$add","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$contains","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$contains","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$remove","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$remove","clear","System$Collections$IDictionary$clear","clear","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$clear","containsKey","System$Collections$Generic$IReadOnlyDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$containsKey","containsKey","System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$containsKey","System$Collections$Generic$IEnumerable$1$System$Collections$Generic$KeyValuePair$2$GetEnumerator","System$Collections$Generic$IEnumerable$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$GetEnumerator","remove","System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$remove","tryGetValue","System$Collections$Generic$IReadOnlyDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$tryGetValue","tryGetValue","System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$tryGetValue","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$IsReadOnly","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$IsReadOnly","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$copyTo","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$copyTo"],ctors:{ctor:function(){System.Collections.Generic.Dictionary$2(e,t).$ctor5.call(this,0,null)},$ctor4:function(i){System.Collections.Generic.Dictionary$2(e,t).$ctor5.call(this,i,null)},$ctor3:function(i){System.Collections.Generic.Dictionary$2(e,t).$ctor5.call(this,0,i)},$ctor5:function(i,r){this.$initialize(),i<0&&System.ThrowHelper.ThrowArgumentOutOfRangeException$1(System.ExceptionArgument.capacity),i>0&&this.Initialize(i),this.comparer=r||System.Collections.Generic.EqualityComparer$1(e).def,this.isSimpleKey=(Bridge.referenceEquals(e,System.String)||e.$number===!0&&!Bridge.referenceEquals(e,System.Int64)&&!Bridge.referenceEquals(e,System.UInt64)||Bridge.referenceEquals(e,System.Char))&&Bridge.referenceEquals(this.comparer,System.Collections.Generic.EqualityComparer$1(e).def)},$ctor1:function(i){System.Collections.Generic.Dictionary$2(e,t).$ctor2.call(this,i,null)},$ctor2:function(i,r){var n,s;System.Collections.Generic.Dictionary$2(e,t).$ctor5.call(this,i!=null?System.Array.getCount(i,System.Collections.Generic.KeyValuePair$2(e,t)):0,r),i==null&&System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.dictionary),n=Bridge.getEnumerator(i,System.Collections.Generic.KeyValuePair$2(e,t));try{for(;n.moveNext();)s=n.Current,this.add(s.key,s.value)}finally{Bridge.is(n,System.IDisposable)&&n.System$IDisposable$Dispose()}}},methods:{getItem:function(i){var r=this.FindEntry(i);if(r>=0)return this.entries[System.Array.index(r,this.entries)].value;throw new System.Collections.Generic.KeyNotFoundException.ctor},setItem:function(i,r){this.Insert(i,r,!1)},System$Collections$IDictionary$getItem:function(i){if(System.Collections.Generic.Dictionary$2(e,t).IsCompatibleKey(i)){var r=this.FindEntry(Bridge.cast(Bridge.unbox(i,e),e));if(r>=0)return this.entries[System.Array.index(r,this.entries)].value}return null},System$Collections$IDictionary$setItem:function(i,r){i==null&&System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.key),System.ThrowHelper.IfNullAndNullsAreIllegalThenThrow(t,r,System.ExceptionArgument.value);try{var n=Bridge.cast(Bridge.unbox(i,e),e);try{this.setItem(n,Bridge.cast(Bridge.unbox(r,t),t))}catch(s){if(s=System.Exception.create(s),Bridge.is(s,System.InvalidCastException))System.ThrowHelper.ThrowWrongValueTypeArgumentException(System.Object,r,t);else throw s}}catch(s){if(s=System.Exception.create(s),Bridge.is(s,System.InvalidCastException))System.ThrowHelper.ThrowWrongKeyTypeArgumentException(System.Object,i,e);else throw s}},add:function(i,r){this.Insert(i,r,!0)},System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$add:function(i){this.add(i.key,i.value)},System$Collections$IDictionary$add:function(i,r){i==null&&System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.key),System.ThrowHelper.IfNullAndNullsAreIllegalThenThrow(t,r,System.ExceptionArgument.value);try{var n=Bridge.cast(Bridge.unbox(i,e),e);try{this.add(n,Bridge.cast(Bridge.unbox(r,t),t))}catch(s){if(s=System.Exception.create(s),Bridge.is(s,System.InvalidCastException))System.ThrowHelper.ThrowWrongValueTypeArgumentException(System.Object,r,t);else throw s}}catch(s){if(s=System.Exception.create(s),Bridge.is(s,System.InvalidCastException))System.ThrowHelper.ThrowWrongKeyTypeArgumentException(System.Object,i,e);else throw s}},System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$contains:function(i){var r=this.FindEntry(i.key);return!!(r>=0&&System.Collections.Generic.EqualityComparer$1(t).def.equals2(this.entries[System.Array.index(r,this.entries)].value,i.value))},System$Collections$IDictionary$contains:function(i){return System.Collections.Generic.Dictionary$2(e,t).IsCompatibleKey(i)?this.containsKey(Bridge.cast(Bridge.unbox(i,e),e)):!1},System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$remove:function(i){var r=this.FindEntry(i.key);return r>=0&&System.Collections.Generic.EqualityComparer$1(t).def.equals2(this.entries[System.Array.index(r,this.entries)].value,i.value)?(this.remove(i.key),!0):!1},remove:function(i){var r,n;if(i==null&&System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.key),this.isSimpleKey){if(this.simpleBuckets!=null&&this.simpleBuckets.hasOwnProperty(i))return r=this.simpleBuckets[i],delete this.simpleBuckets[i],this.entries[System.Array.index(r,this.entries)].hashCode=-1,this.entries[System.Array.index(r,this.entries)].next=this.freeList,this.entries[System.Array.index(r,this.entries)].key=Bridge.getDefaultValue(e),this.entries[System.Array.index(r,this.entries)].value=Bridge.getDefaultValue(t),this.freeList=r,this.freeCount=this.freeCount+1|0,this.version=this.version+1|0,!0}else if(this.buckets!=null){var s=this.comparer[Bridge.geti(this.comparer,"System$Collections$Generic$IEqualityComparer$1$"+Bridge.getTypeAlias(e)+"$getHashCode2","System$Collections$Generic$IEqualityComparer$1$getHashCode2")](i)&2147483647,o=s%this.buckets.length,a=-1;for(n=this.buckets[System.Array.index(o,this.buckets)];n>=0;a=n,n=this.entries[System.Array.index(n,this.entries)].next)if(this.entries[System.Array.index(n,this.entries)].hashCode===s&&this.comparer[Bridge.geti(this.comparer,"System$Collections$Generic$IEqualityComparer$1$"+Bridge.getTypeAlias(e)+"$equals2","System$Collections$Generic$IEqualityComparer$1$equals2")](this.entries[System.Array.index(n,this.entries)].key,i))return a<0?this.buckets[System.Array.index(o,this.buckets)]=this.entries[System.Array.index(n,this.entries)].next:this.entries[System.Array.index(a,this.entries)].next=this.entries[System.Array.index(n,this.entries)].next,this.entries[System.Array.index(n,this.entries)].hashCode=-1,this.entries[System.Array.index(n,this.entries)].next=this.freeList,this.entries[System.Array.index(n,this.entries)].key=Bridge.getDefaultValue(e),this.entries[System.Array.index(n,this.entries)].value=Bridge.getDefaultValue(t),this.freeList=n,this.freeCount=this.freeCount+1|0,this.version=this.version+1|0,!0}return!1},System$Collections$IDictionary$remove:function(i){System.Collections.Generic.Dictionary$2(e,t).IsCompatibleKey(i)&&this.remove(Bridge.cast(Bridge.unbox(i,e),e))},clear:function(){if(this.count>0){for(var i=0;i<this.buckets.length;i=i+1|0)this.buckets[System.Array.index(i,this.buckets)]=-1;this.isSimpleKey&&(this.simpleBuckets={}),System.Array.fill(this.entries,function(){return Bridge.getDefaultValue(System.Collections.Generic.Dictionary$2.Entry(e,t))},0,this.count),this.freeList=-1,this.count=0,this.freeCount=0,this.version=this.version+1|0}},containsKey:function(i){return this.FindEntry(i)>=0},ContainsValue:function(i){var r,n,s;if(i==null){for(r=0;r<this.count;r=r+1|0)if(this.entries[System.Array.index(r,this.entries)].hashCode>=0&&this.entries[System.Array.index(r,this.entries)].value==null)return!0}else for(n=System.Collections.Generic.EqualityComparer$1(t).def,s=0;s<this.count;s=s+1|0)if(this.entries[System.Array.index(s,this.entries)].hashCode>=0&&n.equals2(this.entries[System.Array.index(s,this.entries)].value,i))return!0;return!1},CopyTo:function(i,r){var n,s,o;for(i==null&&System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.array),(r<0||r>i.length)&&System.ThrowHelper.ThrowArgumentOutOfRangeException$2(System.ExceptionArgument.index,System.ExceptionResource.ArgumentOutOfRange_NeedNonNegNum),(i.length-r|0)<this.Count&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_ArrayPlusOffTooSmall),n=this.count,s=this.entries,o=0;o<n;o=o+1|0)s[System.Array.index(o,s)].hashCode>=0&&(i[System.Array.index(Bridge.identity(r,r=r+1|0),i)]=new(System.Collections.Generic.KeyValuePair$2(e,t)).$ctor1(s[System.Array.index(o,s)].key,s[System.Array.index(o,s)].value))},System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$copyTo:function(i,r){this.CopyTo(i,r)},System$Collections$ICollection$copyTo:function(i,r){var n,s,o,a,l,u,d,f;if(i==null&&System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.array),System.Array.getRank(i)!==1&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_RankMultiDimNotSupported),System.Array.getLower(i,0)!==0&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_NonZeroLowerBound),(r<0||r>i.length)&&System.ThrowHelper.ThrowArgumentOutOfRangeException$2(System.ExceptionArgument.index,System.ExceptionResource.ArgumentOutOfRange_NeedNonNegNum),(i.length-r|0)<this.Count&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_ArrayPlusOffTooSmall),n=Bridge.as(i,System.Array.type(System.Collections.Generic.KeyValuePair$2(e,t))),n!=null)this.CopyTo(n,r);else if(Bridge.is(i,System.Array.type(System.Collections.DictionaryEntry)))for(s=Bridge.as(i,System.Array.type(System.Collections.DictionaryEntry)),o=this.entries,a=0;a<this.count;a=a+1|0)o[System.Array.index(a,o)].hashCode>=0&&(s[System.Array.index(Bridge.identity(r,r=r+1|0),s)]=new System.Collections.DictionaryEntry.$ctor1(o[System.Array.index(a,o)].key,o[System.Array.index(a,o)].value));else{l=Bridge.as(i,System.Array.type(System.Object)),l==null&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Argument_InvalidArrayType);try{for(u=this.count,d=this.entries,f=0;f<u;f=f+1|0)d[System.Array.index(f,d)].hashCode>=0&&(l[System.Array.index(Bridge.identity(r,r=r+1|0),l)]=new(System.Collections.Generic.KeyValuePair$2(e,t)).$ctor1(d[System.Array.index(f,d)].key,d[System.Array.index(f,d)].value))}catch(C){if(C=System.Exception.create(C),Bridge.is(C,System.ArrayTypeMismatchException))System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Argument_InvalidArrayType);else throw C}}},GetEnumerator:function(){return new(System.Collections.Generic.Dictionary$2.Enumerator(e,t)).$ctor1(this,System.Collections.Generic.Dictionary$2.Enumerator(e,t).KeyValuePair)},System$Collections$Generic$IEnumerable$1$System$Collections$Generic$KeyValuePair$2$GetEnumerator:function(){return new(System.Collections.Generic.Dictionary$2.Enumerator(e,t)).$ctor1(this,System.Collections.Generic.Dictionary$2.Enumerator(e,t).KeyValuePair).$clone()},System$Collections$IEnumerable$GetEnumerator:function(){return new(System.Collections.Generic.Dictionary$2.Enumerator(e,t)).$ctor1(this,System.Collections.Generic.Dictionary$2.Enumerator(e,t).KeyValuePair).$clone()},System$Collections$IDictionary$GetEnumerator:function(){return new(System.Collections.Generic.Dictionary$2.Enumerator(e,t)).$ctor1(this,System.Collections.Generic.Dictionary$2.Enumerator(e,t).DictEntry).$clone()},FindEntry:function(i){var r,n;if(i==null&&System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.key),this.isSimpleKey){if(this.simpleBuckets!=null&&this.simpleBuckets.hasOwnProperty(i))return this.simpleBuckets[i]}else if(this.buckets!=null){for(r=this.comparer[Bridge.geti(this.comparer,"System$Collections$Generic$IEqualityComparer$1$"+Bridge.getTypeAlias(e)+"$getHashCode2","System$Collections$Generic$IEqualityComparer$1$getHashCode2")](i)&2147483647,n=this.buckets[System.Array.index(r%this.buckets.length,this.buckets)];n>=0;n=this.entries[System.Array.index(n,this.entries)].next)if(this.entries[System.Array.index(n,this.entries)].hashCode===r&&this.comparer[Bridge.geti(this.comparer,"System$Collections$Generic$IEqualityComparer$1$"+Bridge.getTypeAlias(e)+"$equals2","System$Collections$Generic$IEqualityComparer$1$equals2")](this.entries[System.Array.index(n,this.entries)].key,i))return n}return-1},Initialize:function(i){var r=System.Collections.HashHelpers.GetPrime(i),n;for(this.buckets=System.Array.init(r,0,System.Int32),n=0;n<this.buckets.length;n=n+1|0)this.buckets[System.Array.index(n,this.buckets)]=-1;this.entries=System.Array.init(r,function(){return new(System.Collections.Generic.Dictionary$2.Entry(e,t))},System.Collections.Generic.Dictionary$2.Entry(e,t)),this.freeList=-1,this.simpleBuckets={}},Insert:function(i,r,n){var s,o,a,l,u;if(i==null&&System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.key),this.buckets==null&&this.Initialize(0),this.isSimpleKey){if(this.simpleBuckets.hasOwnProperty(i)){n&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Argument_AddingDuplicate),this.entries[System.Array.index(this.simpleBuckets[i],this.entries)].value=r,this.version=this.version+1|0;return}this.freeCount>0?(s=this.freeList,this.freeList=this.entries[System.Array.index(s,this.entries)].next,this.freeCount=this.freeCount-1|0):(this.count===this.entries.length&&this.Resize(),s=this.count,this.count=this.count+1|0),this.entries[System.Array.index(s,this.entries)].hashCode=1,this.entries[System.Array.index(s,this.entries)].next=-1,this.entries[System.Array.index(s,this.entries)].key=i,this.entries[System.Array.index(s,this.entries)].value=r,this.simpleBuckets[i]=s,this.version=this.version+1|0;return}for(o=this.comparer[Bridge.geti(this.comparer,"System$Collections$Generic$IEqualityComparer$1$"+Bridge.getTypeAlias(e)+"$getHashCode2","System$Collections$Generic$IEqualityComparer$1$getHashCode2")](i)&2147483647,a=o%this.buckets.length,l=this.buckets[System.Array.index(a,this.buckets)];l>=0;l=this.entries[System.Array.index(l,this.entries)].next)if(this.entries[System.Array.index(l,this.entries)].hashCode===o&&this.comparer[Bridge.geti(this.comparer,"System$Collections$Generic$IEqualityComparer$1$"+Bridge.getTypeAlias(e)+"$equals2","System$Collections$Generic$IEqualityComparer$1$equals2")](this.entries[System.Array.index(l,this.entries)].key,i)){n&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Argument_AddingDuplicate),this.entries[System.Array.index(l,this.entries)].value=r,this.version=this.version+1|0;return}this.freeCount>0?(u=this.freeList,this.freeList=this.entries[System.Array.index(u,this.entries)].next,this.freeCount=this.freeCount-1|0):(this.count===this.entries.length&&(this.Resize(),a=o%this.buckets.length),u=this.count,this.count=this.count+1|0),this.entries[System.Array.index(u,this.entries)].hashCode=o,this.entries[System.Array.index(u,this.entries)].next=this.buckets[System.Array.index(a,this.buckets)],this.entries[System.Array.index(u,this.entries)].key=i,this.entries[System.Array.index(u,this.entries)].value=r,this.buckets[System.Array.index(a,this.buckets)]=u,this.version=this.version+1|0},Resize:function(){this.Resize$1(System.Collections.HashHelpers.ExpandPrime(this.count),!1)},Resize$1:function(i,r){for(var n,s,o,a,l=System.Array.init(i,0,System.Int32),u=0;u<l.length;u=u+1|0)l[System.Array.index(u,l)]=-1;if(this.isSimpleKey&&(this.simpleBuckets={}),n=System.Array.init(i,function(){return new(System.Collections.Generic.Dictionary$2.Entry(e,t))},System.Collections.Generic.Dictionary$2.Entry(e,t)),System.Array.copy(this.entries,0,n,0,this.count),r)for(s=0;s<this.count;s=s+1|0)n[System.Array.index(s,n)].hashCode!==-1&&(n[System.Array.index(s,n)].hashCode=this.comparer[Bridge.geti(this.comparer,"System$Collections$Generic$IEqualityComparer$1$"+Bridge.getTypeAlias(e)+"$getHashCode2","System$Collections$Generic$IEqualityComparer$1$getHashCode2")](n[System.Array.index(s,n)].key)&2147483647);for(o=0;o<this.count;o=o+1|0)n[System.Array.index(o,n)].hashCode>=0&&(this.isSimpleKey?(n[System.Array.index(o,n)].next=-1,this.simpleBuckets[n[System.Array.index(o,n)].key]=o):(a=n[System.Array.index(o,n)].hashCode%i,n[System.Array.index(o,n)].next=l[System.Array.index(a,l)],l[System.Array.index(a,l)]=o));this.buckets=l,this.entries=n},tryGetValue:function(i,r){var n=this.FindEntry(i);return n>=0?(r.v=this.entries[System.Array.index(n,this.entries)].value,!0):(r.v=Bridge.getDefaultValue(t),!1)},GetValueOrDefault:function(i){var r=this.FindEntry(i);return r>=0?this.entries[System.Array.index(r,this.entries)].value:Bridge.getDefaultValue(t)}}}}),Bridge.define("System.Collections.Generic.Dictionary$2.Entry",function(e,t){return{$kind:"nested struct",statics:{methods:{getDefaultValue:function(){return new(System.Collections.Generic.Dictionary$2.Entry(e,t))}}},fields:{hashCode:0,next:0,key:Bridge.getDefaultValue(e),value:Bridge.getDefaultValue(t)},ctors:{ctor:function(){this.$initialize()}},methods:{getHashCode:function(){return Bridge.addHash([1920233150,this.hashCode,this.next,this.key,this.value])},equals:function(i){return Bridge.is(i,System.Collections.Generic.Dictionary$2.Entry(e,t))?Bridge.equals(this.hashCode,i.hashCode)&&Bridge.equals(this.next,i.next)&&Bridge.equals(this.key,i.key)&&Bridge.equals(this.value,i.value):!1},$clone:function(i){var r=i||new(System.Collections.Generic.Dictionary$2.Entry(e,t));return r.hashCode=this.hashCode,r.next=this.next,r.key=this.key,r.value=this.value,r}}}}),Bridge.define("System.Collections.Generic.Dictionary$2.Enumerator",function(e,t){return{inherits:[System.Collections.Generic.IEnumerator$1(System.Collections.Generic.KeyValuePair$2(e,t)),System.Collections.IDictionaryEnumerator],$kind:"nested struct",statics:{fields:{DictEntry:0,KeyValuePair:0},ctors:{init:function(){this.DictEntry=1,this.KeyValuePair=2}},methods:{getDefaultValue:function(){return new(System.Collections.Generic.Dictionary$2.Enumerator(e,t))}}},fields:{dictionary:null,version:0,index:0,current:null,getEnumeratorRetType:0},props:{Current:{get:function(){return this.current}},System$Collections$IEnumerator$Current:{get:function(){return(this.index===0||this.index===(this.dictionary.count+1|0))&&System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumOpCantHappen),this.getEnumeratorRetType===System.Collections.Generic.Dictionary$2.Enumerator(e,t).DictEntry?new System.Collections.DictionaryEntry.$ctor1(this.current.key,this.current.value).$clone():new(System.Collections.Generic.KeyValuePair$2(e,t)).$ctor1(this.current.key,this.current.value)}},System$Collections$IDictionaryEnumerator$Entry:{get:function(){return(this.index===0||this.index===(this.dictionary.count+1|0))&&System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumOpCantHappen),new System.Collections.DictionaryEntry.$ctor1(this.current.key,this.current.value)}},System$Collections$IDictionaryEnumerator$Key:{get:function(){return(this.index===0||this.index===(this.dictionary.count+1|0))&&System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumOpCantHappen),this.current.key}},System$Collections$IDictionaryEnumerator$Value:{get:function(){return(this.index===0||this.index===(this.dictionary.count+1|0))&&System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumOpCantHappen),this.current.value}}},alias:["moveNext","System$Collections$IEnumerator$moveNext","Current",["System$Collections$Generic$IEnumerator$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$Current$1","System$Collections$Generic$IEnumerator$1$Current$1"],"Dispose","System$IDisposable$Dispose"],ctors:{init:function(){this.current=new(System.Collections.Generic.KeyValuePair$2(e,t))},$ctor1:function(i,r){this.$initialize(),this.dictionary=i,this.version=i.version,this.index=0,this.getEnumeratorRetType=r,this.current=new(System.Collections.Generic.KeyValuePair$2(e,t)).ctor},ctor:function(){this.$initialize()}},methods:{moveNext:function(){var i,r,n;for(this.version!==this.dictionary.version&&System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumFailedVersion);this.index>>>0<this.dictionary.count>>>0;){if((i=this.dictionary.entries)[System.Array.index(this.index,i)].hashCode>=0)return this.current=new(System.Collections.Generic.KeyValuePair$2(e,t)).$ctor1((r=this.dictionary.entries)[System.Array.index(this.index,r)].key,(n=this.dictionary.entries)[System.Array.index(this.index,n)].value),this.index=this.index+1|0,!0;this.index=this.index+1|0}return this.index=this.dictionary.count+1|0,this.current=new(System.Collections.Generic.KeyValuePair$2(e,t)).ctor,!1},Dispose:function(){},System$Collections$IEnumerator$reset:function(){this.version!==this.dictionary.version&&System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumFailedVersion),this.index=0,this.current=new(System.Collections.Generic.KeyValuePair$2(e,t)).ctor},getHashCode:function(){return Bridge.addHash([3788985113,this.dictionary,this.version,this.index,this.current,this.getEnumeratorRetType])},equals:function(i){return Bridge.is(i,System.Collections.Generic.Dictionary$2.Enumerator(e,t))?Bridge.equals(this.dictionary,i.dictionary)&&Bridge.equals(this.version,i.version)&&Bridge.equals(this.index,i.index)&&Bridge.equals(this.current,i.current)&&Bridge.equals(this.getEnumeratorRetType,i.getEnumeratorRetType):!1},$clone:function(i){var r=i||new(System.Collections.Generic.Dictionary$2.Enumerator(e,t));return r.dictionary=this.dictionary,r.version=this.version,r.index=this.index,r.current=this.current,r.getEnumeratorRetType=this.getEnumeratorRetType,r}}}}),Bridge.define("System.Collections.Generic.Dictionary$2.KeyCollection",function(e,t){return{inherits:[System.Collections.Generic.ICollection$1(e),System.Collections.ICollection,System.Collections.Generic.IReadOnlyCollection$1(e)],$kind:"nested class",fields:{dictionary:null},props:{Count:{get:function(){return this.dictionary.Count}},System$Collections$Generic$ICollection$1$IsReadOnly:{get:function(){return!0}},System$Collections$ICollection$IsSynchronized:{get:function(){return!1}},System$Collections$ICollection$SyncRoot:{get:function(){return Bridge.cast(this.dictionary,System.Collections.ICollection).System$Collections$ICollection$SyncRoot}}},alias:["copyTo","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$copyTo","Count",["System$Collections$Generic$IReadOnlyCollection$1$"+Bridge.getTypeAlias(e)+"$Count","System$Collections$Generic$IReadOnlyCollection$1$Count"],"Count","System$Collections$ICollection$Count","Count","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$Count","System$Collections$Generic$ICollection$1$IsReadOnly","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$IsReadOnly","System$Collections$Generic$ICollection$1$add","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$add","System$Collections$Generic$ICollection$1$clear","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$clear","System$Collections$Generic$ICollection$1$contains","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$contains","System$Collections$Generic$ICollection$1$remove","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$remove","System$Collections$Generic$IEnumerable$1$GetEnumerator","System$Collections$Generic$IEnumerable$1$"+Bridge.getTypeAlias(e)+"$GetEnumerator"],ctors:{ctor:function(i){this.$initialize(),i==null&&System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.dictionary),this.dictionary=i}},methods:{GetEnumerator:function(){return new(System.Collections.Generic.Dictionary$2.KeyCollection.Enumerator(e,t)).$ctor1(this.dictionary)},System$Collections$Generic$IEnumerable$1$GetEnumerator:function(){return new(System.Collections.Generic.Dictionary$2.KeyCollection.Enumerator(e,t)).$ctor1(this.dictionary).$clone()},System$Collections$IEnumerable$GetEnumerator:function(){return new(System.Collections.Generic.Dictionary$2.KeyCollection.Enumerator(e,t)).$ctor1(this.dictionary).$clone()},copyTo:function(i,r){var n,s,o;for(i==null&&System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.array),(r<0||r>i.length)&&System.ThrowHelper.ThrowArgumentOutOfRangeException$2(System.ExceptionArgument.index,System.ExceptionResource.ArgumentOutOfRange_NeedNonNegNum),(i.length-r|0)<this.dictionary.Count&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_ArrayPlusOffTooSmall),n=this.dictionary.count,s=this.dictionary.entries,o=0;o<n;o=o+1|0)s[System.Array.index(o,s)].hashCode>=0&&(i[System.Array.index(Bridge.identity(r,r=r+1|0),i)]=s[System.Array.index(o,s)].key)},System$Collections$ICollection$copyTo:function(i,r){var n,s,o,a,l;if(i==null&&System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.array),System.Array.getRank(i)!==1&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_RankMultiDimNotSupported),System.Array.getLower(i,0)!==0&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_NonZeroLowerBound),(r<0||r>i.length)&&System.ThrowHelper.ThrowArgumentOutOfRangeException$2(System.ExceptionArgument.index,System.ExceptionResource.ArgumentOutOfRange_NeedNonNegNum),(i.length-r|0)<this.dictionary.Count&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_ArrayPlusOffTooSmall),n=Bridge.as(i,System.Array.type(e)),n!=null)this.copyTo(n,r);else{s=Bridge.as(i,System.Array.type(System.Object)),s==null&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Argument_InvalidArrayType),o=this.dictionary.count,a=this.dictionary.entries;try{for(l=0;l<o;l=l+1|0)a[System.Array.index(l,a)].hashCode>=0&&(s[System.Array.index(Bridge.identity(r,r=r+1|0),s)]=a[System.Array.index(l,a)].key)}catch(u){if(u=System.Exception.create(u),Bridge.is(u,System.ArrayTypeMismatchException))System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Argument_InvalidArrayType);else throw u}}},System$Collections$Generic$ICollection$1$add:function(i){System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_KeyCollectionSet)},System$Collections$Generic$ICollection$1$clear:function(){System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_KeyCollectionSet)},System$Collections$Generic$ICollection$1$contains:function(i){return this.dictionary.containsKey(i)},System$Collections$Generic$ICollection$1$remove:function(i){return System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_KeyCollectionSet),!1}}}}),Bridge.define("System.Collections.Generic.Dictionary$2.KeyCollection.Enumerator",function(e,t){return{inherits:[System.Collections.Generic.IEnumerator$1(e),System.Collections.IEnumerator],$kind:"nested struct",statics:{methods:{getDefaultValue:function(){return new(System.Collections.Generic.Dictionary$2.KeyCollection.Enumerator(e,t))}}},fields:{dictionary:null,index:0,version:0,currentKey:Bridge.getDefaultValue(e)},props:{Current:{get:function(){return this.currentKey}},System$Collections$IEnumerator$Current:{get:function(){return(this.index===0||this.index===(this.dictionary.count+1|0))&&System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumOpCantHappen),this.currentKey}}},alias:["Dispose","System$IDisposable$Dispose","moveNext","System$Collections$IEnumerator$moveNext","Current",["System$Collections$Generic$IEnumerator$1$"+Bridge.getTypeAlias(e)+"$Current$1","System$Collections$Generic$IEnumerator$1$Current$1"]],ctors:{$ctor1:function(i){this.$initialize(),this.dictionary=i,this.version=i.version,this.index=0,this.currentKey=Bridge.getDefaultValue(e)},ctor:function(){this.$initialize()}},methods:{Dispose:function(){},moveNext:function(){var i,r;for(this.version!==this.dictionary.version&&System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumFailedVersion);this.index>>>0<this.dictionary.count>>>0;){if((i=this.dictionary.entries)[System.Array.index(this.index,i)].hashCode>=0)return this.currentKey=(r=this.dictionary.entries)[System.Array.index(this.index,r)].key,this.index=this.index+1|0,!0;this.index=this.index+1|0}return this.index=this.dictionary.count+1|0,this.currentKey=Bridge.getDefaultValue(e),!1},System$Collections$IEnumerator$reset:function(){this.version!==this.dictionary.version&&System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumFailedVersion),this.index=0,this.currentKey=Bridge.getDefaultValue(e)},getHashCode:function(){return Bridge.addHash([3788985113,this.dictionary,this.index,this.version,this.currentKey])},equals:function(i){return Bridge.is(i,System.Collections.Generic.Dictionary$2.KeyCollection.Enumerator(e,t))?Bridge.equals(this.dictionary,i.dictionary)&&Bridge.equals(this.index,i.index)&&Bridge.equals(this.version,i.version)&&Bridge.equals(this.currentKey,i.currentKey):!1},$clone:function(i){var r=i||new(System.Collections.Generic.Dictionary$2.KeyCollection.Enumerator(e,t));return r.dictionary=this.dictionary,r.index=this.index,r.version=this.version,r.currentKey=this.currentKey,r}}}}),Bridge.define("System.Collections.Generic.Dictionary$2.ValueCollection",function(e,t){return{inherits:[System.Collections.Generic.ICollection$1(t),System.Collections.ICollection,System.Collections.Generic.IReadOnlyCollection$1(t)],$kind:"nested class",fields:{dictionary:null},props:{Count:{get:function(){return this.dictionary.Count}},System$Collections$Generic$ICollection$1$IsReadOnly:{get:function(){return!0}},System$Collections$ICollection$IsSynchronized:{get:function(){return!1}},System$Collections$ICollection$SyncRoot:{get:function(){return Bridge.cast(this.dictionary,System.Collections.ICollection).System$Collections$ICollection$SyncRoot}}},alias:["copyTo","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(t)+"$copyTo","Count",["System$Collections$Generic$IReadOnlyCollection$1$"+Bridge.getTypeAlias(t)+"$Count","System$Collections$Generic$IReadOnlyCollection$1$Count"],"Count","System$Collections$ICollection$Count","Count","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(t)+"$Count","System$Collections$Generic$ICollection$1$IsReadOnly","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(t)+"$IsReadOnly","System$Collections$Generic$ICollection$1$add","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(t)+"$add","System$Collections$Generic$ICollection$1$remove","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(t)+"$remove","System$Collections$Generic$ICollection$1$clear","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(t)+"$clear","System$Collections$Generic$ICollection$1$contains","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(t)+"$contains","System$Collections$Generic$IEnumerable$1$GetEnumerator","System$Collections$Generic$IEnumerable$1$"+Bridge.getTypeAlias(t)+"$GetEnumerator"],ctors:{ctor:function(i){this.$initialize(),i==null&&System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.dictionary),this.dictionary=i}},methods:{GetEnumerator:function(){return new(System.Collections.Generic.Dictionary$2.ValueCollection.Enumerator(e,t)).$ctor1(this.dictionary)},System$Collections$Generic$IEnumerable$1$GetEnumerator:function(){return new(System.Collections.Generic.Dictionary$2.ValueCollection.Enumerator(e,t)).$ctor1(this.dictionary).$clone()},System$Collections$IEnumerable$GetEnumerator:function(){return new(System.Collections.Generic.Dictionary$2.ValueCollection.Enumerator(e,t)).$ctor1(this.dictionary).$clone()},copyTo:function(i,r){var n,s,o;for(i==null&&System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.array),(r<0||r>i.length)&&System.ThrowHelper.ThrowArgumentOutOfRangeException$2(System.ExceptionArgument.index,System.ExceptionResource.ArgumentOutOfRange_NeedNonNegNum),(i.length-r|0)<this.dictionary.Count&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_ArrayPlusOffTooSmall),n=this.dictionary.count,s=this.dictionary.entries,o=0;o<n;o=o+1|0)s[System.Array.index(o,s)].hashCode>=0&&(i[System.Array.index(Bridge.identity(r,r=r+1|0),i)]=s[System.Array.index(o,s)].value)},System$Collections$ICollection$copyTo:function(i,r){var n,s,o,a,l;if(i==null&&System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.array),System.Array.getRank(i)!==1&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_RankMultiDimNotSupported),System.Array.getLower(i,0)!==0&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_NonZeroLowerBound),(r<0||r>i.length)&&System.ThrowHelper.ThrowArgumentOutOfRangeException$2(System.ExceptionArgument.index,System.ExceptionResource.ArgumentOutOfRange_NeedNonNegNum),(i.length-r|0)<this.dictionary.Count&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_ArrayPlusOffTooSmall),n=Bridge.as(i,System.Array.type(t)),n!=null)this.copyTo(n,r);else{s=Bridge.as(i,System.Array.type(System.Object)),s==null&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Argument_InvalidArrayType),o=this.dictionary.count,a=this.dictionary.entries;try{for(l=0;l<o;l=l+1|0)a[System.Array.index(l,a)].hashCode>=0&&(s[System.Array.index(Bridge.identity(r,r=r+1|0),s)]=a[System.Array.index(l,a)].value)}catch(u){if(u=System.Exception.create(u),Bridge.is(u,System.ArrayTypeMismatchException))System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Argument_InvalidArrayType);else throw u}}},System$Collections$Generic$ICollection$1$add:function(i){System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_ValueCollectionSet)},System$Collections$Generic$ICollection$1$remove:function(i){return System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_ValueCollectionSet),!1},System$Collections$Generic$ICollection$1$clear:function(){System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_ValueCollectionSet)},System$Collections$Generic$ICollection$1$contains:function(i){return this.dictionary.ContainsValue(i)}}}}),Bridge.define("System.Collections.Generic.Dictionary$2.ValueCollection.Enumerator",function(e,t){return{inherits:[System.Collections.Generic.IEnumerator$1(t),System.Collections.IEnumerator],$kind:"nested struct",statics:{methods:{getDefaultValue:function(){return new(System.Collections.Generic.Dictionary$2.ValueCollection.Enumerator(e,t))}}},fields:{dictionary:null,index:0,version:0,currentValue:Bridge.getDefaultValue(t)},props:{Current:{get:function(){return this.currentValue}},System$Collections$IEnumerator$Current:{get:function(){return(this.index===0||this.index===(this.dictionary.count+1|0))&&System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumOpCantHappen),this.currentValue}}},alias:["Dispose","System$IDisposable$Dispose","moveNext","System$Collections$IEnumerator$moveNext","Current",["System$Collections$Generic$IEnumerator$1$"+Bridge.getTypeAlias(t)+"$Current$1","System$Collections$Generic$IEnumerator$1$Current$1"]],ctors:{$ctor1:function(i){this.$initialize(),this.dictionary=i,this.version=i.version,this.index=0,this.currentValue=Bridge.getDefaultValue(t)},ctor:function(){this.$initialize()}},methods:{Dispose:function(){},moveNext:function(){var i,r;for(this.version!==this.dictionary.version&&System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumFailedVersion);this.index>>>0<this.dictionary.count>>>0;){if((i=this.dictionary.entries)[System.Array.index(this.index,i)].hashCode>=0)return this.currentValue=(r=this.dictionary.entries)[System.Array.index(this.index,r)].value,this.index=this.index+1|0,!0;this.index=this.index+1|0}return this.index=this.dictionary.count+1|0,this.currentValue=Bridge.getDefaultValue(t),!1},System$Collections$IEnumerator$reset:function(){this.version!==this.dictionary.version&&System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumFailedVersion),this.index=0,this.currentValue=Bridge.getDefaultValue(t)},getHashCode:function(){return Bridge.addHash([3788985113,this.dictionary,this.index,this.version,this.currentValue])},equals:function(i){return Bridge.is(i,System.Collections.Generic.Dictionary$2.ValueCollection.Enumerator(e,t))?Bridge.equals(this.dictionary,i.dictionary)&&Bridge.equals(this.index,i.index)&&Bridge.equals(this.version,i.version)&&Bridge.equals(this.currentValue,i.currentValue):!1},$clone:function(i){var r=i||new(System.Collections.Generic.Dictionary$2.ValueCollection.Enumerator(e,t));return r.dictionary=this.dictionary,r.index=this.index,r.version=this.version,r.currentValue=this.currentValue,r}}}}),Bridge.define("System.Collections.ObjectModel.ReadOnlyDictionary$2",function(e,t){return{inherits:[System.Collections.Generic.IDictionary$2(e,t),System.Collections.IDictionary,System.Collections.Generic.IReadOnlyDictionary$2(e,t)],statics:{fields:{NotSupported_ReadOnlyCollection:null},ctors:{init:function(){this.NotSupported_ReadOnlyCollection="Collection is read-only."}},methods:{IsCompatibleKey:function(i){if(i==null)throw new System.ArgumentNullException.$ctor1("key");return Bridge.is(i,e)}}},fields:{m_dictionary:null,_keys:null,_values:null},props:{Dictionary:{get:function(){return this.m_dictionary}},Keys:{get:function(){return this._keys==null&&(this._keys=new(System.Collections.ObjectModel.ReadOnlyDictionary$2.KeyCollection(e,t))(this.m_dictionary["System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$Keys"])),this._keys}},Values:{get:function(){return this._values==null&&(this._values=new(System.Collections.ObjectModel.ReadOnlyDictionary$2.ValueCollection(e,t))(this.m_dictionary["System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$Values"])),this._values}},System$Collections$Generic$IDictionary$2$Keys:{get:function(){return this.Keys}},System$Collections$Generic$IDictionary$2$Values:{get:function(){return this.Values}},Count:{get:function(){return System.Array.getCount(this.m_dictionary,System.Collections.Generic.KeyValuePair$2(e,t))}},System$Collections$Generic$ICollection$1$IsReadOnly:{get:function(){return!0}},System$Collections$IDictionary$IsFixedSize:{get:function(){return!0}},System$Collections$IDictionary$IsReadOnly:{get:function(){return!0}},System$Collections$IDictionary$Keys:{get:function(){return this.Keys}},System$Collections$IDictionary$Values:{get:function(){return this.Values}},System$Collections$ICollection$IsSynchronized:{get:function(){return!1}},System$Collections$ICollection$SyncRoot:{get:function(){return null}},System$Collections$Generic$IReadOnlyDictionary$2$Keys:{get:function(){return this.Keys}},System$Collections$Generic$IReadOnlyDictionary$2$Values:{get:function(){return this.Values}}},alias:["containsKey","System$Collections$Generic$IReadOnlyDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$containsKey","containsKey","System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$containsKey","System$Collections$Generic$IDictionary$2$Keys","System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$Keys","tryGetValue","System$Collections$Generic$IReadOnlyDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$tryGetValue","tryGetValue","System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$tryGetValue","System$Collections$Generic$IDictionary$2$Values","System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$Values","getItem","System$Collections$Generic$IReadOnlyDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$getItem","System$Collections$Generic$IDictionary$2$add","System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$add","System$Collections$Generic$IDictionary$2$remove","System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$remove","System$Collections$Generic$IDictionary$2$getItem","System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$getItem","System$Collections$Generic$IDictionary$2$setItem","System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$setItem","Count",["System$Collections$Generic$IReadOnlyCollection$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$Count","System$Collections$Generic$IReadOnlyCollection$1$Count"],"Count","System$Collections$ICollection$Count","Count","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$Count","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$contains","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$contains","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$copyTo","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$copyTo","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$IsReadOnly","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$IsReadOnly","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$add","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$add","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$clear","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$clear","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$remove","System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$remove","GetEnumerator",["System$Collections$Generic$IEnumerable$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$GetEnumerator","System$Collections$Generic$IEnumerable$1$GetEnumerator"],"System$Collections$Generic$IReadOnlyDictionary$2$Keys","System$Collections$Generic$IReadOnlyDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$Keys","System$Collections$Generic$IReadOnlyDictionary$2$Values","System$Collections$Generic$IReadOnlyDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$Values"],ctors:{ctor:function(i){if(this.$initialize(),i==null)throw new System.ArgumentNullException.$ctor1("dictionary");this.m_dictionary=i}},methods:{getItem:function(i){return this.m_dictionary["System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$getItem"](i)},System$Collections$Generic$IDictionary$2$getItem:function(i){return this.m_dictionary["System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$getItem"](i)},System$Collections$Generic$IDictionary$2$setItem:function(i,r){throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(e,t).NotSupported_ReadOnlyCollection)},System$Collections$IDictionary$getItem:function(i){return System.Collections.ObjectModel.ReadOnlyDictionary$2(e,t).IsCompatibleKey(i)?this.getItem(Bridge.cast(Bridge.unbox(i,e),e)):null},System$Collections$IDictionary$setItem:function(i,r){throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(e,t).NotSupported_ReadOnlyCollection)},containsKey:function(i){return this.m_dictionary["System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$containsKey"](i)},tryGetValue:function(i,r){return this.m_dictionary["System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$tryGetValue"](i,r)},System$Collections$Generic$IDictionary$2$add:function(i,r){throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(e,t).NotSupported_ReadOnlyCollection)},System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$add:function(i){throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(e,t).NotSupported_ReadOnlyCollection)},System$Collections$IDictionary$add:function(i,r){throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(e,t).NotSupported_ReadOnlyCollection)},System$Collections$Generic$IDictionary$2$remove:function(i){throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(e,t).NotSupported_ReadOnlyCollection)},System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$remove:function(i){throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(e,t).NotSupported_ReadOnlyCollection)},System$Collections$IDictionary$remove:function(i){throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(e,t).NotSupported_ReadOnlyCollection)},System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$contains:function(i){return System.Array.contains(this.m_dictionary,i,System.Collections.Generic.KeyValuePair$2(e,t))},System$Collections$IDictionary$contains:function(i){return System.Collections.ObjectModel.ReadOnlyDictionary$2(e,t).IsCompatibleKey(i)&&this.containsKey(Bridge.cast(Bridge.unbox(i,e),e))},System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$copyTo:function(i,r){System.Array.copyTo(this.m_dictionary,i,r,System.Collections.Generic.KeyValuePair$2(e,t))},System$Collections$ICollection$copyTo:function(i,r){var n,s,o,a,l,u,d;if(i==null)throw new System.ArgumentNullException.$ctor1("array");if(System.Array.getRank(i)!==1)throw new System.ArgumentException.$ctor1("Only single dimensional arrays are supported for the requested action.");if(System.Array.getLower(i,0)!==0)throw new System.ArgumentException.$ctor1("The lower bound of target array must be zero.");if(r<0||r>i.length)throw new System.ArgumentOutOfRangeException.$ctor4("index","Non-negative number required.");if((i.length-r|0)<this.Count)throw new System.ArgumentException.$ctor1("Destination array is not long enough to copy all the items in the collection. Check array index and length.");if(o=Bridge.as(i,System.Array.type(System.Collections.Generic.KeyValuePair$2(e,t))),o!=null)System.Array.copyTo(this.m_dictionary,o,r,System.Collections.Generic.KeyValuePair$2(e,t));else if(a=Bridge.as(i,System.Array.type(System.Collections.DictionaryEntry)),a!=null){n=Bridge.getEnumerator(this.m_dictionary,System.Collections.Generic.KeyValuePair$2(e,t));try{for(;n.moveNext();)l=n.Current,a[System.Array.index(Bridge.identity(r,r=r+1|0),a)]=new System.Collections.DictionaryEntry.$ctor1(l.key,l.value)}finally{Bridge.is(n,System.IDisposable)&&n.System$IDisposable$Dispose()}}else{if(u=Bridge.as(i,System.Array.type(System.Object)),u==null)throw new System.ArgumentException.$ctor1("Target array type is not compatible with the type of items in the collection.");try{s=Bridge.getEnumerator(this.m_dictionary,System.Collections.Generic.KeyValuePair$2(e,t));try{for(;s.moveNext();)d=s.Current,u[System.Array.index(Bridge.identity(r,r=r+1|0),u)]=new(System.Collections.Generic.KeyValuePair$2(e,t)).$ctor1(d.key,d.value)}finally{Bridge.is(s,System.IDisposable)&&s.System$IDisposable$Dispose()}}catch(f){throw f=System.Exception.create(f),Bridge.is(f,System.ArrayTypeMismatchException)?new System.ArgumentException.$ctor1("Target array type is not compatible with the type of items in the collection."):f}}},System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$clear:function(){throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(e,t).NotSupported_ReadOnlyCollection)},System$Collections$IDictionary$clear:function(){throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(e,t).NotSupported_ReadOnlyCollection)},GetEnumerator:function(){return Bridge.getEnumerator(this.m_dictionary,System.Collections.Generic.KeyValuePair$2(e,t))},System$Collections$IEnumerable$GetEnumerator:function(){return Bridge.getEnumerator(Bridge.cast(this.m_dictionary,System.Collections.IEnumerable))},System$Collections$IDictionary$GetEnumerator:function(){var i=Bridge.as(this.m_dictionary,System.Collections.IDictionary);return i!=null?i.System$Collections$IDictionary$GetEnumerator():new(System.Collections.ObjectModel.ReadOnlyDictionary$2.DictionaryEnumerator(e,t)).$ctor1(this.m_dictionary).$clone()}}}}),Bridge.define("System.Collections.ObjectModel.ReadOnlyDictionary$2.DictionaryEnumerator",function(e,t){return{inherits:[System.Collections.IDictionaryEnumerator],$kind:"nested struct",statics:{methods:{getDefaultValue:function(){return new(System.Collections.ObjectModel.ReadOnlyDictionary$2.DictionaryEnumerator(e,t))}}},fields:{_dictionary:null,_enumerator:null},props:{Entry:{get:function(){return new System.Collections.DictionaryEntry.$ctor1(this._enumerator[Bridge.geti(this._enumerator,"System$Collections$Generic$IEnumerator$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$Current$1","System$Collections$Generic$IEnumerator$1$Current$1")].key,this._enumerator[Bridge.geti(this._enumerator,"System$Collections$Generic$IEnumerator$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$Current$1","System$Collections$Generic$IEnumerator$1$Current$1")].value)}},Key:{get:function(){return this._enumerator[Bridge.geti(this._enumerator,"System$Collections$Generic$IEnumerator$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$Current$1","System$Collections$Generic$IEnumerator$1$Current$1")].key}},Value:{get:function(){return this._enumerator[Bridge.geti(this._enumerator,"System$Collections$Generic$IEnumerator$1$System$Collections$Generic$KeyValuePair$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$Current$1","System$Collections$Generic$IEnumerator$1$Current$1")].value}},Current:{get:function(){return this.Entry.$clone()}}},alias:["Entry","System$Collections$IDictionaryEnumerator$Entry","Key","System$Collections$IDictionaryEnumerator$Key","Value","System$Collections$IDictionaryEnumerator$Value","Current","System$Collections$IEnumerator$Current","moveNext","System$Collections$IEnumerator$moveNext","reset","System$Collections$IEnumerator$reset"],ctors:{$ctor1:function(i){this.$initialize(),this._dictionary=i,this._enumerator=Bridge.getEnumerator(this._dictionary,System.Collections.Generic.KeyValuePair$2(e,t))},ctor:function(){this.$initialize()}},methods:{moveNext:function(){return this._enumerator.System$Collections$IEnumerator$moveNext()},reset:function(){this._enumerator.System$Collections$IEnumerator$reset()},getHashCode:function(){return Bridge.addHash([9276503029,this._dictionary,this._enumerator])},equals:function(i){return Bridge.is(i,System.Collections.ObjectModel.ReadOnlyDictionary$2.DictionaryEnumerator(e,t))?Bridge.equals(this._dictionary,i._dictionary)&&Bridge.equals(this._enumerator,i._enumerator):!1},$clone:function(i){var r=i||new(System.Collections.ObjectModel.ReadOnlyDictionary$2.DictionaryEnumerator(e,t));return r._dictionary=this._dictionary,r._enumerator=this._enumerator,r}}}}),Bridge.define("System.Collections.ObjectModel.ReadOnlyDictionary$2.KeyCollection",function(e,t){return{inherits:[System.Collections.Generic.ICollection$1(e),System.Collections.ICollection,System.Collections.Generic.IReadOnlyCollection$1(e)],$kind:"nested class",fields:{_collection:null},props:{Count:{get:function(){return System.Array.getCount(this._collection,e)}},System$Collections$Generic$ICollection$1$IsReadOnly:{get:function(){return!0}},System$Collections$ICollection$IsSynchronized:{get:function(){return!1}},System$Collections$ICollection$SyncRoot:{get:function(){return null}}},alias:["System$Collections$Generic$ICollection$1$add","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$add","System$Collections$Generic$ICollection$1$clear","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$clear","System$Collections$Generic$ICollection$1$contains","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$contains","copyTo","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$copyTo","Count",["System$Collections$Generic$IReadOnlyCollection$1$"+Bridge.getTypeAlias(e)+"$Count","System$Collections$Generic$IReadOnlyCollection$1$Count"],"Count","System$Collections$ICollection$Count","Count","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$Count","System$Collections$Generic$ICollection$1$IsReadOnly","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$IsReadOnly","System$Collections$Generic$ICollection$1$remove","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$remove","GetEnumerator",["System$Collections$Generic$IEnumerable$1$"+Bridge.getTypeAlias(e)+"$GetEnumerator","System$Collections$Generic$IEnumerable$1$GetEnumerator"]],ctors:{ctor:function(i){if(this.$initialize(),i==null)throw new System.ArgumentNullException.$ctor1("collection");this._collection=i}},methods:{System$Collections$Generic$ICollection$1$add:function(i){throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(e,t).NotSupported_ReadOnlyCollection)},System$Collections$Generic$ICollection$1$clear:function(){throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(e,t).NotSupported_ReadOnlyCollection)},System$Collections$Generic$ICollection$1$contains:function(i){return System.Array.contains(this._collection,i,e)},copyTo:function(i,r){System.Array.copyTo(this._collection,i,r,e)},System$Collections$ICollection$copyTo:function(i,r){System.Collections.ObjectModel.ReadOnlyDictionaryHelpers.CopyToNonGenericICollectionHelper(e,this._collection,i,r)},System$Collections$Generic$ICollection$1$remove:function(i){throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(e,t).NotSupported_ReadOnlyCollection)},GetEnumerator:function(){return Bridge.getEnumerator(this._collection,e)},System$Collections$IEnumerable$GetEnumerator:function(){return Bridge.getEnumerator(Bridge.cast(this._collection,System.Collections.IEnumerable))}}}}),Bridge.define("System.Collections.ObjectModel.ReadOnlyDictionary$2.ValueCollection",function(e,t){return{inherits:[System.Collections.Generic.ICollection$1(t),System.Collections.ICollection,System.Collections.Generic.IReadOnlyCollection$1(t)],$kind:"nested class",fields:{_collection:null},props:{Count:{get:function(){return System.Array.getCount(this._collection,t)}},System$Collections$Generic$ICollection$1$IsReadOnly:{get:function(){return!0}},System$Collections$ICollection$IsSynchronized:{get:function(){return!1}},System$Collections$ICollection$SyncRoot:{get:function(){return null}}},alias:["System$Collections$Generic$ICollection$1$add","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(t)+"$add","System$Collections$Generic$ICollection$1$clear","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(t)+"$clear","System$Collections$Generic$ICollection$1$contains","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(t)+"$contains","copyTo","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(t)+"$copyTo","Count",["System$Collections$Generic$IReadOnlyCollection$1$"+Bridge.getTypeAlias(t)+"$Count","System$Collections$Generic$IReadOnlyCollection$1$Count"],"Count","System$Collections$ICollection$Count","Count","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(t)+"$Count","System$Collections$Generic$ICollection$1$IsReadOnly","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(t)+"$IsReadOnly","System$Collections$Generic$ICollection$1$remove","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(t)+"$remove","GetEnumerator",["System$Collections$Generic$IEnumerable$1$"+Bridge.getTypeAlias(t)+"$GetEnumerator","System$Collections$Generic$IEnumerable$1$GetEnumerator"]],ctors:{ctor:function(i){if(this.$initialize(),i==null)throw new System.ArgumentNullException.$ctor1("collection");this._collection=i}},methods:{System$Collections$Generic$ICollection$1$add:function(i){throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(e,t).NotSupported_ReadOnlyCollection)},System$Collections$Generic$ICollection$1$clear:function(){throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(e,t).NotSupported_ReadOnlyCollection)},System$Collections$Generic$ICollection$1$contains:function(i){return System.Array.contains(this._collection,i,t)},copyTo:function(i,r){System.Array.copyTo(this._collection,i,r,t)},System$Collections$ICollection$copyTo:function(i,r){System.Collections.ObjectModel.ReadOnlyDictionaryHelpers.CopyToNonGenericICollectionHelper(t,this._collection,i,r)},System$Collections$Generic$ICollection$1$remove:function(i){throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(e,t).NotSupported_ReadOnlyCollection)},GetEnumerator:function(){return Bridge.getEnumerator(this._collection,t)},System$Collections$IEnumerable$GetEnumerator:function(){return Bridge.getEnumerator(Bridge.cast(this._collection,System.Collections.IEnumerable))}}}}),Bridge.define("System.Collections.ObjectModel.ReadOnlyDictionaryHelpers",{statics:{methods:{CopyToNonGenericICollectionHelper:function(e,t,i,r){var n,s,o,a,l;if(i==null)throw new System.ArgumentNullException.$ctor1("array");if(System.Array.getRank(i)!==1)throw new System.ArgumentException.$ctor1("Only single dimensional arrays are supported for the requested action.");if(System.Array.getLower(i,0)!==0)throw new System.ArgumentException.$ctor1("The lower bound of target array must be zero.");if(r<0)throw new System.ArgumentOutOfRangeException.$ctor4("index","Index is less than zero.");if((i.length-r|0)<System.Array.getCount(t,e))throw new System.ArgumentException.$ctor1("Destination array is not long enough to copy all the items in the collection. Check array index and length.");if(s=Bridge.as(t,System.Collections.ICollection),s!=null){System.Array.copyTo(s,i,r);return}if(o=Bridge.as(i,System.Array.type(e)),o!=null)System.Array.copyTo(t,o,r,e);else{if(a=Bridge.as(i,System.Array.type(System.Object)),a==null)throw new System.ArgumentException.$ctor1("Target array type is not compatible with the type of items in the collection.");try{n=Bridge.getEnumerator(t,e);try{for(;n.moveNext();)l=n.Current,a[System.Array.index(Bridge.identity(r,r=r+1|0),a)]=l}finally{Bridge.is(n,System.IDisposable)&&n.System$IDisposable$Dispose()}}catch(u){throw u=System.Exception.create(u),Bridge.is(u,System.ArrayTypeMismatchException)?new System.ArgumentException.$ctor1("Target array type is not compatible with the type of items in the collection."):u}}}}}}),Bridge.define("System.Collections.Generic.CollectionExtensions",{statics:{methods:{GetValueOrDefault:function(e,t,i,r){return System.Collections.Generic.CollectionExtensions.GetValueOrDefault$1(e,t,i,r,Bridge.getDefaultValue(t))},GetValueOrDefault$1:function(e,t,i,r,n){if(i==null)throw new System.ArgumentNullException.$ctor1("dictionary");var s={};return i["System$Collections$Generic$IReadOnlyDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$tryGetValue"](r,s)?s.v:n},TryAdd:function(e,t,i,r,n){if(i==null)throw new System.ArgumentNullException.$ctor1("dictionary");return i["System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$containsKey"](r)?!1:(i["System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$add"](r,n),!0)},Remove:function(e,t,i,r,n){if(i==null)throw new System.ArgumentNullException.$ctor1("dictionary");return i["System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$tryGetValue"](r,n)?(i["System$Collections$Generic$IDictionary$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$remove"](r),!0):(n.v=Bridge.getDefaultValue(t),!1)}}}}),Bridge.define("System.StringComparer",{inherits:[System.Collections.Generic.IComparer$1(System.String),System.Collections.Generic.IEqualityComparer$1(System.String)],statics:{fields:{_ordinal:null,_ordinalIgnoreCase:null},props:{Ordinal:{get:function(){return System.StringComparer._ordinal}},OrdinalIgnoreCase:{get:function(){return System.StringComparer._ordinalIgnoreCase}}},ctors:{init:function(){this._ordinal=new System.OrdinalComparer(!1),this._ordinalIgnoreCase=new System.OrdinalComparer(!0)}}},methods:{Compare:function(e,t){var i,r,n;if(Bridge.referenceEquals(e,t))return 0;if(e==null)return-1;if(t==null)return 1;if(i=Bridge.as(e,System.String),i!=null&&(r=Bridge.as(t,System.String),r!=null))return this.compare(i,r);if(n=Bridge.as(e,System.IComparable),n!=null)return Bridge.compare(n,t);throw new System.ArgumentException.$ctor1("At least one object must implement IComparable.")},Equals:function(e,t){var i,r;return Bridge.referenceEquals(e,t)?!0:e==null||t==null?!1:(i=Bridge.as(e,System.String),i!=null&&(r=Bridge.as(t,System.String),r!=null)?this.equals2(i,r):Bridge.equals(e,t))},GetHashCode:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("obj");var t=Bridge.as(e,System.String);return t!=null?this.getHashCode2(t):Bridge.getHashCode(e)}}}),Bridge.define("System.OrdinalComparer",{inherits:[System.StringComparer],fields:{_ignoreCase:!1},alias:["compare",["System$Collections$Generic$IComparer$1$System$String$compare","System$Collections$Generic$IComparer$1$compare"],"equals2",["System$Collections$Generic$IEqualityComparer$1$System$String$equals2","System$Collections$Generic$IEqualityComparer$1$equals2"],"getHashCode2",["System$Collections$Generic$IEqualityComparer$1$System$String$getHashCode2","System$Collections$Generic$IEqualityComparer$1$getHashCode2"]],ctors:{ctor:function(e){this.$initialize(),System.StringComparer.ctor.call(this),this._ignoreCase=e}},methods:{compare:function(e,t){return Bridge.referenceEquals(e,t)?0:e==null?-1:t==null?1:this._ignoreCase?System.String.compare(e,t,5):System.String.compare(e,t,!1)},equals2:function(e,t){return Bridge.referenceEquals(e,t)?!0:e==null||t==null?!1:this._ignoreCase?e.length!==t.length?!1:System.String.compare(e,t,5)===0:System.String.equals(e,t)},equals:function(e){var t=Bridge.as(e,System.OrdinalComparer);return t==null?!1:this._ignoreCase===t._ignoreCase},getHashCode2:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("obj");return this._ignoreCase&&e!=null?Bridge.getHashCode(e.toLowerCase()):Bridge.getHashCode(e)},getHashCode:function(){var e="OrdinalComparer",t=Bridge.getHashCode(e);return this._ignoreCase?~t:t}}}),Bridge.define("Bridge.CustomEnumerator",{inherits:[System.Collections.IEnumerator,System.IDisposable],config:{properties:{Current:{get:function(){return this.getCurrent()}},Current$1:{get:function(){return this.getCurrent()}}},alias:["getCurrent","System$Collections$IEnumerator$getCurrent","moveNext","System$Collections$IEnumerator$moveNext","reset","System$Collections$IEnumerator$reset","Dispose","System$IDisposable$Dispose","Current","System$Collections$IEnumerator$Current"]},ctor:function(e,t,i,r,n,s){this.$initialize(),this.$moveNext=e,this.$getCurrent=t,this.$Dispose=r,this.$reset=i,this.scope=n,s&&(this["System$Collections$Generic$IEnumerator$1$"+Bridge.getTypeAlias(s)+"$getCurrent$1"]=this.getCurrent,this.System$Collections$Generic$IEnumerator$1$getCurrent$1=this.getCurrent,Object.defineProperty(this,"System$Collections$Generic$IEnumerator$1$"+Bridge.getTypeAlias(s)+"$Current$1",{get:this.getCurrent,enumerable:!0}),Object.defineProperty(this,"System$Collections$Generic$IEnumerator$1$Current$1",{get:this.getCurrent,enumerable:!0}))},moveNext:function(){try{return this.$moveNext.call(this.scope)}catch(e){throw this.Dispose.call(this.scope),e}},getCurrent:function(){return this.$getCurrent.call(this.scope)},getCurrent$1:function(){return this.$getCurrent.call(this.scope)},reset:function(){this.$reset&&this.$reset.call(this.scope)},Dispose:function(){this.$Dispose&&this.$Dispose.call(this.scope)}}),Bridge.define("Bridge.ArrayEnumerator",{inherits:[System.Collections.IEnumerator,System.IDisposable],statics:{$isArrayEnumerator:!0},config:{properties:{Current:{get:function(){return this.getCurrent()}},Current$1:{get:function(){return this.getCurrent()}}},alias:["getCurrent","System$Collections$IEnumerator$getCurrent","moveNext","System$Collections$IEnumerator$moveNext","reset","System$Collections$IEnumerator$reset","Dispose","System$IDisposable$Dispose","Current","System$Collections$IEnumerator$Current"]},ctor:function(e,t){this.$initialize(),this.array=e,this.reset(),t&&(this["System$Collections$Generic$IEnumerator$1$"+Bridge.getTypeAlias(t)+"$getCurrent$1"]=this.getCurrent,this.System$Collections$Generic$IEnumerator$1$getCurrent$1=this.getCurrent,Object.defineProperty(this,"System$Collections$Generic$IEnumerator$1$"+Bridge.getTypeAlias(t)+"$Current$1",{get:this.getCurrent,enumerable:!0}),Object.defineProperty(this,"System$Collections$Generic$IEnumerator$1$Current$1",{get:this.getCurrent,enumerable:!0}))},moveNext:function(){return this.index++,this.index<this.array.length},getCurrent:function(){return this.array[this.index]},getCurrent$1:function(){return this.array[this.index]},reset:function(){this.index=-1},Dispose:Bridge.emptyFn}),Bridge.define("Bridge.ArrayEnumerable",{inherits:[System.Collections.IEnumerable],config:{alias:["GetEnumerator","System$Collections$IEnumerable$GetEnumerator"]},ctor:function(e){this.$initialize(),this.array=e},GetEnumerator:function(){return new Bridge.ArrayEnumerator(this.array)}}),Bridge.define("System.Collections.Generic.EqualityComparer$1",function(e){return{inherits:[System.Collections.Generic.IEqualityComparer$1(e)],statics:{config:{init:function(){this.def=new(System.Collections.Generic.EqualityComparer$1(e))}}},config:{alias:["equals2",["System$Collections$Generic$IEqualityComparer$1$"+Bridge.getTypeAlias(e)+"$equals2","System$Collections$Generic$IEqualityComparer$1$equals2"],"getHashCode2",["System$Collections$Generic$IEqualityComparer$1$"+Bridge.getTypeAlias(e)+"$getHashCode2","System$Collections$Generic$IEqualityComparer$1$getHashCode2"]]},equals2:function(t,i){if(Bridge.isDefined(t,!0)){if(Bridge.isDefined(i,!0)){var r=t&&t.$$name;return Bridge.isFunction(t)&&Bridge.isFunction(i)?Bridge.fn.equals.call(t,i):!r||t&&t.$boxed||i&&i.$boxed?Bridge.equals(t,i):Bridge.isFunction(t.equalsT)?Bridge.equalsT(t,i):Bridge.isFunction(t.equals)?Bridge.equals(t,i):t===i}}else return!Bridge.isDefined(i,!0);return!1},getHashCode2:function(t){return Bridge.isDefined(t,!0)?Bridge.getHashCode(t):0}}}),System.Collections.Generic.EqualityComparer$1.$default=new(System.Collections.Generic.EqualityComparer$1(System.Object)),Bridge.define("System.Collections.Generic.Comparer$1",function(e){return{inherits:[System.Collections.Generic.IComparer$1(e)],ctor:function(t){this.$initialize(),this.fn=t,this.compare=t,this["System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(e)+"$compare"]=t,this.System$Collections$Generic$IComparer$1$compare=t}}}),System.Collections.Generic.Comparer$1.$default=new(System.Collections.Generic.Comparer$1(System.Object))(function(e,t){if(Bridge.hasValue(e)){if(!Bridge.hasValue(t))return 1}else return Bridge.hasValue(t)?-1:0;return Bridge.compare(e,t)}),System.Collections.Generic.Comparer$1.get=function(e,t){var i;return t&&(i=e["System$Collections$Generic$IComparer$1$"+Bridge.getTypeAlias(t)+"$compare"])||(i=e.System$Collections$Generic$IComparer$1$compare)?i.bind(e):e.compare.bind(e)},System.Collections.Generic.Dictionary$2.getTypeParameters=function(e){var t,i,r;if(System.String.startsWith(e.$$name,"System.Collections.Generic.IDictionary"))t=e;else for(i=Bridge.Reflection.getInterfaces(e),r=0;r<i.length;r++)if(System.String.startsWith(i[r].$$name,"System.Collections.Generic.IDictionary")){t=i[r];break}var n=t?Bridge.Reflection.getGenericArguments(t):null,s=n?n[0]:null,o=n?n[1]:null;return[s,o]},Bridge.define("System.Collections.Generic.List$1",function(e){return{inherits:[System.Collections.Generic.IList$1(e),System.Collections.IList,System.Collections.Generic.IReadOnlyList$1(e)],statics:{fields:{_defaultCapacity:0,_emptyArray:null},ctors:{init:function(){this._defaultCapacity=4,this._emptyArray=System.Array.init(0,function(){return Bridge.getDefaultValue(e)},e)}},methods:{IsCompatibleObject:function(t){return Bridge.is(t,e)||t==null&&Bridge.getDefaultValue(e)==null}}},fields:{_items:null,_size:0,_version:0},props:{Capacity:{get:function(){return this._items.length},set:function(t){if(t<this._size)throw new System.ArgumentOutOfRangeException.$ctor1("value");if(t!==this._items.length)if(t>0){var i=System.Array.init(t,function(){return Bridge.getDefaultValue(e)},e);this._size>0&&System.Array.copy(this._items,0,i,0,this._size),this._items=i}else this._items=System.Collections.Generic.List$1(e)._emptyArray}},Count:{get:function(){return this._size}},System$Collections$IList$IsFixedSize:{get:function(){return!1}},System$Collections$Generic$ICollection$1$IsReadOnly:{get:function(){return!1}},System$Collections$IList$IsReadOnly:{get:function(){return!1}},System$Collections$ICollection$IsSynchronized:{get:function(){return!1}},System$Collections$ICollection$SyncRoot:{get:function(){return this}}},alias:["Count",["System$Collections$Generic$IReadOnlyCollection$1$"+Bridge.getTypeAlias(e)+"$Count","System$Collections$Generic$IReadOnlyCollection$1$Count"],"Count","System$Collections$ICollection$Count","Count","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$Count","System$Collections$Generic$ICollection$1$IsReadOnly","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$IsReadOnly","getItem",["System$Collections$Generic$IReadOnlyList$1$"+Bridge.getTypeAlias(e)+"$getItem","System$Collections$Generic$IReadOnlyList$1$getItem"],"setItem",["System$Collections$Generic$IReadOnlyList$1$"+Bridge.getTypeAlias(e)+"$setItem","System$Collections$Generic$IReadOnlyList$1$setItem"],"getItem","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(e)+"$getItem","setItem","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(e)+"$setItem","add","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$add","clear","System$Collections$IList$clear","clear","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$clear","contains","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$contains","copyTo","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$copyTo","System$Collections$Generic$IEnumerable$1$GetEnumerator","System$Collections$Generic$IEnumerable$1$"+Bridge.getTypeAlias(e)+"$GetEnumerator","indexOf","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(e)+"$indexOf","insert","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(e)+"$insert","remove","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$remove","removeAt","System$Collections$IList$removeAt","removeAt","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(e)+"$removeAt"],ctors:{ctor:function(){this.$initialize(),this._items=System.Collections.Generic.List$1(e)._emptyArray},$ctor2:function(t){if(this.$initialize(),t<0)throw new System.ArgumentOutOfRangeException.$ctor1("capacity");this._items=t===0?System.Collections.Generic.List$1(e)._emptyArray:System.Array.init(t,function(){return Bridge.getDefaultValue(e)},e)},$ctor1:function(t){var i,r,n;if(this.$initialize(),t==null)throw new System.ArgumentNullException.$ctor1("collection");if(i=Bridge.as(t,System.Collections.Generic.ICollection$1(e)),i!=null)r=System.Array.getCount(i,e),r===0?this._items=System.Collections.Generic.List$1(e)._emptyArray:(this._items=System.Array.init(r,function(){return Bridge.getDefaultValue(e)},e),System.Array.copyTo(i,this._items,0,e),this._size=r);else{this._size=0,this._items=System.Collections.Generic.List$1(e)._emptyArray,n=Bridge.getEnumerator(t,e);try{for(;n.System$Collections$IEnumerator$moveNext();)this.add(n[Bridge.geti(n,"System$Collections$Generic$IEnumerator$1$"+Bridge.getTypeAlias(e)+"$Current$1","System$Collections$Generic$IEnumerator$1$Current$1")])}finally{Bridge.hasValue(n)&&n.System$IDisposable$Dispose()}}}},methods:{getItem:function(t){if(t>>>0>=this._size>>>0)throw new System.ArgumentOutOfRangeException.ctor;return this._items[System.Array.index(t,this._items)]},setItem:function(t,i){if(t>>>0>=this._size>>>0)throw new System.ArgumentOutOfRangeException.ctor;this._items[System.Array.index(t,this._items)]=i,this._version=this._version+1|0},System$Collections$IList$getItem:function(t){return this.getItem(t)},System$Collections$IList$setItem:function(t,i){if(i==null&&Bridge.getDefaultValue(e)!=null)throw new System.ArgumentNullException.$ctor1("value");try{this.setItem(t,Bridge.cast(Bridge.unbox(i,e),e))}catch(r){throw r=System.Exception.create(r),Bridge.is(r,System.InvalidCastException)?new System.ArgumentException.$ctor1("value"):r}},add:function(t){this._size===this._items.length&&this.EnsureCapacity(this._size+1|0),this._items[System.Array.index(Bridge.identity(this._size,this._size=this._size+1|0),this._items)]=t,this._version=this._version+1|0},System$Collections$IList$add:function(t){if(t==null&&Bridge.getDefaultValue(e)!=null)throw new System.ArgumentNullException.$ctor1("item");try{this.add(Bridge.cast(Bridge.unbox(t,e),e))}catch(i){throw i=System.Exception.create(i),Bridge.is(i,System.InvalidCastException)?new System.ArgumentException.$ctor1("item"):i}return this.Count-1|0},AddRange:function(t){this.InsertRange(this._size,t)},AsReadOnly:function(){return new(System.Collections.ObjectModel.ReadOnlyCollection$1(e))(this)},BinarySearch$2:function(t,i,r,n){if(t<0)throw new System.ArgumentOutOfRangeException.$ctor1("index");if(i<0)throw new System.ArgumentOutOfRangeException.$ctor1("count");if((this._size-t|0)<i)throw new System.ArgumentException.ctor;return System.Array.binarySearch(this._items,t,i,r,n)},BinarySearch:function(t){return this.BinarySearch$2(0,this.Count,t,null)},BinarySearch$1:function(t,i){return this.BinarySearch$2(0,this.Count,t,i)},clear:function(){this._size>0&&(System.Array.fill(this._items,function(){return Bridge.getDefaultValue(e)},0,this._size),this._size=0),this._version=this._version+1|0},contains:function(t){var i,r,n;if(t==null){for(i=0;i<this._size;i=i+1|0)if(this._items[System.Array.index(i,this._items)]==null)return!0;return!1}else{for(r=System.Collections.Generic.EqualityComparer$1(e).def,n=0;n<this._size;n=n+1|0)if(r.equals2(this._items[System.Array.index(n,this._items)],t))return!0;return!1}},System$Collections$IList$contains:function(t){return System.Collections.Generic.List$1(e).IsCompatibleObject(t)?this.contains(Bridge.cast(Bridge.unbox(t,e),e)):!1},ConvertAll:function(t,i){var r,n;if(Bridge.staticEquals(i,null))throw new System.ArgumentNullException.$ctor1("converter");for(r=new(System.Collections.Generic.List$1(t)).$ctor2(this._size),n=0;n<this._size;n=n+1|0)r._items[System.Array.index(n,r._items)]=i(this._items[System.Array.index(n,this._items)]);return r._size=this._size,r},CopyTo:function(t){this.copyTo(t,0)},System$Collections$ICollection$copyTo:function(t,i){if(t!=null&&System.Array.getRank(t)!==1)throw new System.ArgumentException.$ctor1("array");System.Array.copy(this._items,0,t,i,this._size)},CopyTo$1:function(t,i,r,n){if((this._size-t|0)<n)throw new System.ArgumentException.ctor;System.Array.copy(this._items,t,i,r,n)},copyTo:function(t,i){System.Array.copy(this._items,0,t,i,this._size)},EnsureCapacity:function(t){if(this._items.length<t){var i=this._items.length===0?System.Collections.Generic.List$1(e)._defaultCapacity:Bridge.Int.mul(this._items.length,2);i>>>0>2146435071&&(i=2146435071),i<t&&(i=t),this.Capacity=i}},Exists:function(t){return this.FindIndex$2(t)!==-1},Find:function(t){if(Bridge.staticEquals(t,null))throw new System.ArgumentNullException.$ctor1("match");for(var i=0;i<this._size;i=i+1|0)if(t(this._items[System.Array.index(i,this._items)]))return this._items[System.Array.index(i,this._items)];return Bridge.getDefaultValue(e)},FindAll:function(t){var i,r;if(Bridge.staticEquals(t,null))throw new System.ArgumentNullException.$ctor1("match");for(i=new(System.Collections.Generic.List$1(e)).ctor,r=0;r<this._size;r=r+1|0)t(this._items[System.Array.index(r,this._items)])&&i.add(this._items[System.Array.index(r,this._items)]);return i},FindIndex$2:function(t){return this.FindIndex(0,this._size,t)},FindIndex$1:function(t,i){return this.FindIndex(t,this._size-t|0,i)},FindIndex:function(t,i,r){var n,s;if(t>>>0>this._size>>>0)throw new System.ArgumentOutOfRangeException.$ctor1("startIndex");if(i<0||t>(this._size-i|0))throw new System.ArgumentOutOfRangeException.$ctor1("count");if(Bridge.staticEquals(r,null))throw new System.ArgumentNullException.$ctor1("match");for(n=t+i|0,s=t;s<n;s=s+1|0)if(r(this._items[System.Array.index(s,this._items)]))return s;return-1},FindLast:function(t){if(Bridge.staticEquals(t,null))throw new System.ArgumentNullException.$ctor1("match");for(var i=this._size-1|0;i>=0;i=i-1|0)if(t(this._items[System.Array.index(i,this._items)]))return this._items[System.Array.index(i,this._items)];return Bridge.getDefaultValue(e)},FindLastIndex$2:function(t){return this.FindLastIndex(this._size-1|0,this._size,t)},FindLastIndex$1:function(t,i){return this.FindLastIndex(t,t+1|0,i)},FindLastIndex:function(t,i,r){var n,s;if(Bridge.staticEquals(r,null))throw new System.ArgumentNullException.$ctor1("match");if(this._size===0){if(t!==-1)throw new System.ArgumentOutOfRangeException.$ctor1("startIndex")}else if(t>>>0>=this._size>>>0)throw new System.ArgumentOutOfRangeException.$ctor1("startIndex");if(i<0||((t-i|0)+1|0)<0)throw new System.ArgumentOutOfRangeException.$ctor1("count");for(n=t-i|0,s=t;s>n;s=s-1|0)if(r(this._items[System.Array.index(s,this._items)]))return s;return-1},ForEach:function(t){var i,r;if(Bridge.staticEquals(t,null))throw new System.ArgumentNullException.$ctor1("match");for(i=this._version,r=0;r<this._size&&i===this._version;r=r+1|0)t(this._items[System.Array.index(r,this._items)]);if(i!==this._version)throw new System.InvalidOperationException.ctor},GetEnumerator:function(){return new(System.Collections.Generic.List$1.Enumerator(e)).$ctor1(this)},System$Collections$Generic$IEnumerable$1$GetEnumerator:function(){return new(System.Collections.Generic.List$1.Enumerator(e)).$ctor1(this).$clone()},System$Collections$IEnumerable$GetEnumerator:function(){return new(System.Collections.Generic.List$1.Enumerator(e)).$ctor1(this).$clone()},GetRange:function(t,i){if(t<0)throw new System.ArgumentOutOfRangeException.$ctor1("index");if(i<0)throw new System.ArgumentOutOfRangeException.$ctor1("count");if((this._size-t|0)<i)throw new System.ArgumentException.ctor;var r=new(System.Collections.Generic.List$1(e)).$ctor2(i);return System.Array.copy(this._items,t,r._items,0,i),r._size=i,r},indexOf:function(t){return System.Array.indexOfT(this._items,t,0,this._size)},System$Collections$IList$indexOf:function(t){return System.Collections.Generic.List$1(e).IsCompatibleObject(t)?this.indexOf(Bridge.cast(Bridge.unbox(t,e),e)):-1},IndexOf:function(t,i){if(i>this._size)throw new System.ArgumentOutOfRangeException.$ctor1("index");return System.Array.indexOfT(this._items,t,i,this._size-i|0)},IndexOf$1:function(t,i,r){if(i>this._size)throw new System.ArgumentOutOfRangeException.$ctor1("index");if(r<0||i>(this._size-r|0))throw new System.ArgumentOutOfRangeException.$ctor1("count");return System.Array.indexOfT(this._items,t,i,r)},insert:function(t,i){if(t>>>0>this._size>>>0)throw new System.ArgumentOutOfRangeException.$ctor1("index");this._size===this._items.length&&this.EnsureCapacity(this._size+1|0),t<this._size&&System.Array.copy(this._items,t,this._items,t+1|0,this._size-t|0),this._items[System.Array.index(t,this._items)]=i,this._size=this._size+1|0,this._version=this._version+1|0},System$Collections$IList$insert:function(t,i){if(i==null&&Bridge.getDefaultValue(e)!=null)throw new System.ArgumentNullException.$ctor1("item");try{this.insert(t,Bridge.cast(Bridge.unbox(i,e),e))}catch(r){throw r=System.Exception.create(r),Bridge.is(r,System.InvalidCastException)?new System.ArgumentException.$ctor1("item"):r}},InsertRange:function(t,i){var r,n,s,o;if(i==null)throw new System.ArgumentNullException.$ctor1("collection");if(t>>>0>this._size>>>0)throw new System.ArgumentOutOfRangeException.$ctor1("index");if(r=Bridge.as(i,System.Collections.Generic.ICollection$1(e)),r!=null)n=System.Array.getCount(r,e),n>0&&(this.EnsureCapacity(this._size+n|0),t<this._size&&System.Array.copy(this._items,t,this._items,t+n|0,this._size-t|0),Bridge.referenceEquals(this,r)?(System.Array.copy(this._items,0,this._items,t,t),System.Array.copy(this._items,t+n|0,this._items,Bridge.Int.mul(t,2),this._size-t|0)):(s=System.Array.init(n,function(){return Bridge.getDefaultValue(e)},e),System.Array.copyTo(r,s,0,e),System.Array.copy(s,0,this._items,t,s.length)),this._size=this._size+n|0);else{o=Bridge.getEnumerator(i,e);try{for(;o.System$Collections$IEnumerator$moveNext();)this.insert(Bridge.identity(t,t=t+1|0),o[Bridge.geti(o,"System$Collections$Generic$IEnumerator$1$"+Bridge.getTypeAlias(e)+"$Current$1","System$Collections$Generic$IEnumerator$1$Current$1")])}finally{Bridge.hasValue(o)&&o.System$IDisposable$Dispose()}}this._version=this._version+1|0},LastIndexOf:function(t){return this._size===0?-1:this.LastIndexOf$2(t,this._size-1|0,this._size)},LastIndexOf$1:function(t,i){if(i>=this._size)throw new System.ArgumentOutOfRangeException.$ctor1("index");return this.LastIndexOf$2(t,i,i+1|0)},LastIndexOf$2:function(t,i,r){if(this.Count!==0&&i<0)throw new System.ArgumentOutOfRangeException.$ctor1("index");if(this.Count!==0&&r<0)throw new System.ArgumentOutOfRangeException.$ctor1("count");if(this._size===0)return-1;if(i>=this._size)throw new System.ArgumentOutOfRangeException.$ctor1("index");if(r>(i+1|0))throw new System.ArgumentOutOfRangeException.$ctor1("count");return System.Array.lastIndexOfT(this._items,t,i,r)},remove:function(t){var i=this.indexOf(t);return i>=0?(this.removeAt(i),!0):!1},System$Collections$IList$remove:function(t){System.Collections.Generic.List$1(e).IsCompatibleObject(t)&&this.remove(Bridge.cast(Bridge.unbox(t,e),e))},RemoveAll:function(t){var i,r,n;if(Bridge.staticEquals(t,null))throw new System.ArgumentNullException.$ctor1("match");for(i=0;i<this._size&&!t(this._items[System.Array.index(i,this._items)]);)i=i+1|0;if(i>=this._size)return 0;for(r=i+1|0;r<this._size;){for(;r<this._size&&t(this._items[System.Array.index(r,this._items)]);)r=r+1|0;r<this._size&&(this._items[System.Array.index(Bridge.identity(i,i=i+1|0),this._items)]=this._items[System.Array.index(Bridge.identity(r,r=r+1|0),this._items)])}return System.Array.fill(this._items,function(){return Bridge.getDefaultValue(e)},i,this._size-i|0),n=this._size-i|0,this._size=i,this._version=this._version+1|0,n},removeAt:function(t){if(t>>>0>=this._size>>>0)throw new System.ArgumentOutOfRangeException.ctor;this._size=this._size-1|0,t<this._size&&System.Array.copy(this._items,t+1|0,this._items,t,this._size-t|0),this._items[System.Array.index(this._size,this._items)]=Bridge.getDefaultValue(e),this._version=this._version+1|0},RemoveRange:function(t,i){if(t<0)throw new System.ArgumentOutOfRangeException.$ctor1("index");if(i<0)throw new System.ArgumentOutOfRangeException.$ctor1("count");if((this._size-t|0)<i)throw new System.ArgumentException.ctor;if(i>0){var r=this._size;this._size=this._size-i|0,t<this._size&&System.Array.copy(this._items,t+i|0,this._items,t,this._size-t|0),System.Array.fill(this._items,function(){return Bridge.getDefaultValue(e)},this._size,i),this._version=this._version+1|0}},Reverse:function(){this.Reverse$1(0,this.Count)},Reverse$1:function(t,i){if(t<0)throw new System.ArgumentOutOfRangeException.$ctor1("index");if(i<0)throw new System.ArgumentOutOfRangeException.$ctor1("count");if((this._size-t|0)<i)throw new System.ArgumentException.ctor;System.Array.reverse(this._items,t,i),this._version=this._version+1|0},Sort:function(){this.Sort$3(0,this.Count,null)},Sort$1:function(t){this.Sort$3(0,this.Count,t)},Sort$3:function(t,i,r){if(t<0)throw new System.ArgumentOutOfRangeException.$ctor1("index");if(i<0)throw new System.ArgumentOutOfRangeException.$ctor1("count");if((this._size-t|0)<i)throw new System.ArgumentException.ctor;System.Array.sort(this._items,t,i,r),this._version=this._version+1|0},Sort$2:function(t){if(Bridge.staticEquals(t,null))throw new System.ArgumentNullException.$ctor1("comparison");if(this._size>0)if(this._items.length===this._size)System.Array.sort(this._items,t);else{var i=System.Array.init(this._size,function(){return Bridge.getDefaultValue(e)},e);System.Array.copy(this._items,0,i,0,this._size),System.Array.sort(i,t),System.Array.copy(i,0,this._items,0,this._size)}},ToArray:function(){var t=System.Array.init(this._size,function(){return Bridge.getDefaultValue(e)},e);return System.Array.copy(this._items,0,t,0,this._size),t},TrimExcess:function(){var t=Bridge.Int.clip32(this._items.length*.9);this._size<t&&(this.Capacity=this._size)},TrueForAll:function(t){if(Bridge.staticEquals(t,null))throw new System.ArgumentNullException.$ctor1("match");for(var i=0;i<this._size;i=i+1|0)if(!t(this._items[System.Array.index(i,this._items)]))return!1;return!0},toJSON:function(){var t=System.Array.init(this._size,function(){return Bridge.getDefaultValue(e)},e);return this._size>0&&System.Array.copy(this._items,0,t,0,this._size),t}}}}),Bridge.define("System.Collections.Generic.KeyNotFoundException",{inherits:[System.SystemException],ctors:{ctor:function(){this.$initialize(),System.SystemException.$ctor1.call(this,"The given key was not present in the dictionary."),this.HResult=-2146232969},$ctor1:function(e){this.$initialize(),System.SystemException.$ctor1.call(this,e),this.HResult=-2146232969},$ctor2:function(e,t){this.$initialize(),System.SystemException.$ctor2.call(this,e,t),this.HResult=-2146232969}}}),System.Collections.Generic.List$1.getElementType=function(e){var t,i,r;if(System.String.startsWith(e.$$name,"System.Collections.Generic.IList"))t=e;else for(i=Bridge.Reflection.getInterfaces(e),r=0;r<i.length;r++)if(System.String.startsWith(i[r].$$name,"System.Collections.Generic.IList")){t=i[r];break}return t?Bridge.Reflection.getGenericArguments(t)[0]:null},Bridge.define("System.CharEnumerator",{inherits:[System.Collections.IEnumerator,System.Collections.Generic.IEnumerator$1(System.Char),System.IDisposable,System.ICloneable],fields:{_str:null,_index:0,_currentElement:0},props:{System$Collections$IEnumerator$Current:{get:function(){return Bridge.box(this.Current,System.Char,String.fromCharCode,System.Char.getHashCode)}},Current:{get:function(){if(this._index===-1)throw new System.InvalidOperationException.$ctor1("Enumeration has not started. Call MoveNext.");if(this._index>=this._str.length)throw new System.InvalidOperationException.$ctor1("Enumeration already finished.");return this._currentElement}}},alias:["clone","System$ICloneable$clone","moveNext","System$Collections$IEnumerator$moveNext","Dispose","System$IDisposable$Dispose","Current",["System$Collections$Generic$IEnumerator$1$System$Char$Current$1","System$Collections$Generic$IEnumerator$1$Current$1"],"reset","System$Collections$IEnumerator$reset"],ctors:{ctor:function(e){this.$initialize(),this._str=e,this._index=-1}},methods:{clone:function(){return Bridge.clone(this)},moveNext:function(){return this._index<(this._str.length-1|0)?(this._index=this._index+1|0,this._currentElement=this._str.charCodeAt(this._index),!0):(this._index=this._str.length,!1)},Dispose:function(){this._str!=null&&(this._index=this._str.length),this._str=null},reset:function(){this._currentElement=0,this._index=-1}}}),Bridge.define("System.Threading.Tasks.Task",{inherits:[System.IDisposable,System.IAsyncResult],config:{alias:["dispose","System$IDisposable$Dispose","AsyncState","System$IAsyncResult$AsyncState","CompletedSynchronously","System$IAsyncResult$CompletedSynchronously","IsCompleted","System$IAsyncResult$IsCompleted"],properties:{IsCompleted:{get:function(){return this.isCompleted()}}}},ctor:function(e,t){this.$initialize(),this.action=e,this.state=t,this.AsyncState=t,this.CompletedSynchronously=!1,this.exception=null,this.status=System.Threading.Tasks.TaskStatus.created,this.callbacks=[],this.result=null},statics:{queue:[],runQueue:function(){var e=System.Threading.Tasks.Task.queue.slice(0),t;for(System.Threading.Tasks.Task.queue=[],t=0;t<e.length;t++)e[t]()},schedule:function(e){System.Threading.Tasks.Task.queue.push(e),Bridge.setImmediate(System.Threading.Tasks.Task.runQueue)},delay:function(e,t){var i=new System.Threading.Tasks.TaskCompletionSource,r,n=!1,s,o;return Bridge.is(t,System.Threading.CancellationToken)&&(r=t,t=void 0),r&&(r.cancelWasRequested=function(){n||(n=!0,clearTimeout(o),i.setCanceled())}),s=e,Bridge.is(e,System.TimeSpan)&&(s=e.getTotalMilliseconds()),o=setTimeout(function(){n||(n=!0,i.setResult(t))},s),r&&r.getIsCancellationRequested()&&Bridge.setImmediate(r.cancelWasRequested),i.task},fromResult:function(e,t){var i=new(System.Threading.Tasks.Task$1(t||System.Object));return i.status=System.Threading.Tasks.TaskStatus.ranToCompletion,i.result=e,i},run:function(e){var t=new System.Threading.Tasks.TaskCompletionSource;return System.Threading.Tasks.Task.schedule(function(){try{var i=e();Bridge.is(i,System.Threading.Tasks.Task)?i.continueWith(function(){i.isFaulted()||i.isCanceled()?t.setException(i.exception.innerExceptions.Count>0?i.exception.innerExceptions.getItem(0):i.exception):t.setResult(i.getAwaitedResult())}):t.setResult(i)}catch(r){t.setException(System.Exception.create(r))}}),t.task},whenAll:function(e){var t=new System.Threading.Tasks.TaskCompletionSource,i,r,n=!1,s=[],o;if(Bridge.is(e,System.Collections.IEnumerable)?e=Bridge.toArray(e):Bridge.isArray(e)||(e=Array.prototype.slice.call(arguments,0)),e.length===0)return t.setResult([]),t.task;for(r=e.length,i=new Array(e.length),o=0;o<e.length;o++)(function(a){e[a].continueWith(function(l){switch(l.status){case System.Threading.Tasks.TaskStatus.ranToCompletion:i[a]=l.getResult();break;case System.Threading.Tasks.TaskStatus.canceled:n=!0;break;case System.Threading.Tasks.TaskStatus.faulted:System.Array.addRange(s,l.exception.innerExceptions);break;default:throw new System.InvalidOperationException.$ctor1("Invalid task status: "+l.status)}--r==0&&(s.length>0?t.setException(s):n?t.setCanceled():t.setResult(i))})})(o);return t.task},whenAny:function(e){if(Bridge.is(e,System.Collections.IEnumerable)?e=Bridge.toArray(e):Bridge.isArray(e)||(e=Array.prototype.slice.call(arguments,0)),!e.length)throw new System.ArgumentException.$ctor1("At least one task is required");for(var t=new System.Threading.Tasks.TaskCompletionSource,i=0;i<e.length;i++)e[i].continueWith(function(r){switch(r.status){case System.Threading.Tasks.TaskStatus.ranToCompletion:t.trySetResult(r);break;case System.Threading.Tasks.TaskStatus.canceled:case System.Threading.Tasks.TaskStatus.faulted:t.trySetException(r.exception.innerExceptions);break;default:throw new System.InvalidOperationException.$ctor1("Invalid task status: "+r.status)}});return t.task},fromCallback:function(e,t){var i=new System.Threading.Tasks.TaskCompletionSource,r=Array.prototype.slice.call(arguments,2),n;return n=function(s){i.setResult(s)},r.push(n),e[t].apply(e,r),i.task},fromCallbackResult:function(e,t,i){var r=new System.Threading.Tasks.TaskCompletionSource,n=Array.prototype.slice.call(arguments,3),s;return s=function(o){r.setResult(o)},i(n,s),e[t].apply(e,n),r.task},fromCallbackOptions:function(e,t,i){var r=new System.Threading.Tasks.TaskCompletionSource,n=Array.prototype.slice.call(arguments,3),s;return s=function(o){r.setResult(o)},n[0]=n[0]||{},n[0][i]=s,e[t].apply(e,n),r.task},fromPromise:function(e,t,i,r){var n=new System.Threading.Tasks.TaskCompletionSource;return e.then||(e=e.promise()),typeof t=="number"?t=function(s){return function(){return arguments[s>=0?s:arguments.length+s]}}(t):typeof t!="function"&&(t=function(){return Array.prototype.slice.call(arguments,0)}),e.then(function(){n.setResult(t?t.apply(null,arguments):Array.prototype.slice.call(arguments,0))},function(){n.setException(i?i.apply(null,arguments):new Bridge.PromiseException(Array.prototype.slice.call(arguments,0)))},r),n.task}},getException:function(){return this.isCanceled()?null:this.exception},waitt:function(e,t){var i=e,r=new System.Threading.Tasks.TaskCompletionSource,n=!1,s;return t&&(t.cancelWasRequested=function(){n||(n=!0,clearTimeout(s),r.setException(new System.OperationCanceledException.$ctor1(t)))}),Bridge.is(e,System.TimeSpan)&&(i=e.getTotalMilliseconds()),s=setTimeout(function(){n=!0,r.setResult(!1)},i),this.continueWith(function(){clearTimeout(s),n||(n=!0,r.setResult(!0))}),r.task},wait:function(e){var t=this,i=new System.Threading.Tasks.TaskCompletionSource,r=!1;return e&&(e.cancelWasRequested=function(){r||(r=!0,i.setException(new System.OperationCanceledException.$ctor1(e)))}),this.continueWith(function(){r||(r=!0,t.isFaulted()||t.isCanceled()?i.setException(t.exception):i.setResult())}),i.task},continue:function(e){this.isCompleted()?(System.Threading.Tasks.Task.queue.push(e),System.Threading.Tasks.Task.runQueue()):this.callbacks.push(e)},continueWith:function(e,t){var i=new System.Threading.Tasks.TaskCompletionSource,r=this,n=t?function(){i.setResult(e(r))}:function(){try{i.setResult(e(r))}catch(s){i.setException(System.Exception.create(s))}};return this.isCompleted()?(System.Threading.Tasks.Task.queue.push(n),System.Threading.Tasks.Task.runQueue()):this.callbacks.push(n),i.task},start:function(){if(this.status!==System.Threading.Tasks.TaskStatus.created)throw new System.InvalidOperationException.$ctor1("Task was already started.");var e=this;this.status=System.Threading.Tasks.TaskStatus.running,System.Threading.Tasks.Task.schedule(function(){try{var t=e.action(e.state);delete e.action,delete e.state,e.complete(t)}catch(i){e.fail(new System.AggregateException(null,[System.Exception.create(i)]))}})},runCallbacks:function(){for(var e=this,t=0;t<e.callbacks.length;t++)e.callbacks[t](e);delete e.callbacks},complete:function(e){return this.isCompleted()?!1:(this.result=e,this.status=System.Threading.Tasks.TaskStatus.ranToCompletion,this.runCallbacks(),!0)},fail:function(e){return this.isCompleted()?!1:(this.exception=e,this.status=this.exception.hasTaskCanceledException&&this.exception.hasTaskCanceledException()?System.Threading.Tasks.TaskStatus.canceled:System.Threading.Tasks.TaskStatus.faulted,this.runCallbacks(),!0)},cancel:function(e){return this.isCompleted()?!1:(this.exception=e||new System.AggregateException(null,[new System.Threading.Tasks.TaskCanceledException.$ctor3(this)]),this.status=System.Threading.Tasks.TaskStatus.canceled,this.runCallbacks(),!0)},isCanceled:function(){return this.status===System.Threading.Tasks.TaskStatus.canceled},isCompleted:function(){return this.status===System.Threading.Tasks.TaskStatus.ranToCompletion||this.status===System.Threading.Tasks.TaskStatus.canceled||this.status===System.Threading.Tasks.TaskStatus.faulted},isFaulted:function(){return this.status===System.Threading.Tasks.TaskStatus.faulted},_getResult:function(e){switch(this.status){case System.Threading.Tasks.TaskStatus.ranToCompletion:return this.result;case System.Threading.Tasks.TaskStatus.canceled:if(this.exception&&this.exception.innerExceptions)throw e?this.exception.innerExceptions.Count>0?this.exception.innerExceptions.getItem(0):null:this.exception;var t=new System.Threading.Tasks.TaskCanceledException.$ctor3(this);throw e?t:new System.AggregateException(null,[t]);case System.Threading.Tasks.TaskStatus.faulted:throw e?this.exception.innerExceptions.Count>0?this.exception.innerExceptions.getItem(0):null:this.exception;default:throw new System.InvalidOperationException.$ctor1("Task is not yet completed.")}},getResult:function(){return this._getResult(!1)},dispose:function(){},getAwaiter:function(){return this},getAwaitedResult:function(){return this._getResult(!0)}}),Bridge.define("System.Threading.Tasks.Task$1",function(e){return{inherits:[System.Threading.Tasks.Task],ctor:function(t,i){this.$initialize(),System.Threading.Tasks.Task.ctor.call(this,t,i)}}}),Bridge.define("System.Threading.Tasks.TaskStatus",{$kind:"enum",$statics:{created:0,waitingForActivation:1,waitingToRun:2,running:3,waitingForChildrenToComplete:4,ranToCompletion:5,canceled:6,faulted:7}}),Bridge.define("System.Threading.Tasks.TaskCompletionSource",{ctor:function(e){this.$initialize(),this.task=new System.Threading.Tasks.Task(null,e),this.task.status=System.Threading.Tasks.TaskStatus.running},setCanceled:function(){if(!this.task.cancel())throw new System.InvalidOperationException.$ctor1("Task was already completed.")},setResult:function(e){if(!this.task.complete(e))throw new System.InvalidOperationException.$ctor1("Task was already completed.")},setException:function(e){if(!this.trySetException(e))throw new System.InvalidOperationException.$ctor1("Task was already completed.")},trySetCanceled:function(){return this.task.cancel()},trySetResult:function(e){return this.task.complete(e)},trySetException:function(e){return Bridge.is(e,System.Exception)&&(e=[e]),e=new System.AggregateException(null,e),e.hasTaskCanceledException()?this.task.cancel(e):this.task.fail(e)}}),Bridge.define("System.Threading.CancellationTokenSource",{inherits:[System.IDisposable],config:{alias:["dispose","System$IDisposable$Dispose"]},ctor:function(e){this.$initialize(),this.timeout=typeof e=="number"&&e>=0?setTimeout(Bridge.fn.bind(this,this.cancel),e,-1):null,this.isCancellationRequested=!1,this.token=new System.Threading.CancellationToken(this),this.handlers=[]},cancel:function(e){var t,i,r;if(!this.isCancellationRequested){for(this.isCancellationRequested=!0,t=[],i=this.handlers,this.clean(),this.token.cancelWasRequested(),r=0;r<i.length;r++)try{i[r].f(i[r].s)}catch(n){if(e&&e!==-1)throw n;t.push(n)}if(t.length>0&&e!==-1)throw new System.AggregateException(null,t)}},cancelAfter:function(e){this.isCancellationRequested||(this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(Bridge.fn.bind(this,this.cancel),e,-1))},register:function(e,t){if(this.isCancellationRequested)return e(t),new System.Threading.CancellationTokenRegistration;var i={f:e,s:t};return this.handlers.push(i),new System.Threading.CancellationTokenRegistration(this,i)},deregister:function(e){var t=this.handlers.indexOf(e);t>=0&&this.handlers.splice(t,1)},dispose:function(){this.clean()},clean:function(){if(this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.handlers=[],this.links){for(var e=0;e<this.links.length;e++)this.links[e].dispose();this.links=null}},statics:{createLinked:function(){var e=new System.Threading.CancellationTokenSource,t,i;for(e.links=[],t=Bridge.fn.bind(e,e.cancel),i=0;i<arguments.length;i++)e.links.push(arguments[i].register(t));return e}}}),Bridge.define("System.Threading.CancellationToken",{$kind:"struct",ctor:function(e){this.$initialize(),Bridge.is(e,System.Threading.CancellationTokenSource)||(e=e?System.Threading.CancellationToken.sourceTrue:System.Threading.CancellationToken.sourceFalse),this.source=e},cancelWasRequested:function(){},getCanBeCanceled:function(){return!this.source.uncancellable},getIsCancellationRequested:function(){return this.source.isCancellationRequested},throwIfCancellationRequested:function(){if(this.source.isCancellationRequested)throw new System.OperationCanceledException.$ctor1(this)},register:function(e,t){return this.source.register(e,t)},getHashCode:function(){return Bridge.getHashCode(this.source)},equals:function(e){return e.source===this.source},equalsT:function(e){return e.source===this.source},statics:{sourceTrue:{isCancellationRequested:!0,register:function(e,t){return e(t),new System.Threading.CancellationTokenRegistration}},sourceFalse:{uncancellable:!0,isCancellationRequested:!1,register:function(){return new System.Threading.CancellationTokenRegistration}},getDefaultValue:function(){return new System.Threading.CancellationToken}}}),System.Threading.CancellationToken.none=new System.Threading.CancellationToken,Bridge.define("System.Threading.CancellationTokenRegistration",{inherits:function(){return[System.IDisposable,System.IEquatable$1(System.Threading.CancellationTokenRegistration)]},$kind:"struct",config:{alias:["dispose","System$IDisposable$Dispose"]},ctor:function(e,t){this.$initialize(),this.cts=e,this.o=t},dispose:function(){this.cts&&(this.cts.deregister(this.o),this.cts=this.o=null)},equalsT:function(e){return this===e},equals:function(e){return this===e},statics:{getDefaultValue:function(){return new System.Threading.CancellationTokenRegistration}}}),ot={isNull:function(e){return!Bridge.isDefined(e,!0)},isEmpty:function(e){return e==null||e.length===0||Bridge.is(e,System.Collections.ICollection)?e.getCount()===0:!1},isNotEmptyOrWhitespace:function(e){return Bridge.isDefined(e,!0)&&!/^$|\s+/.test(e)},isNotNull:function(e){return Bridge.isDefined(e,!0)},isNotEmpty:function(e){return!Bridge.Validation.isEmpty(e)},email:function(e){var t=/^(")?(?:[^\."])(?:(?:[\.])?(?:[\w\-!#$%&'*+/=?^_`{|}~]))*\1@(\w[\-\w]*\.){1,5}([A-Za-z]){2,6}$/;return t.test(e)},url:function(e){var t=/(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:\.\d{1,3}){3})(?!(?:\.\d{1,3}){2})(?!\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,}))\.?)(?::\d{2,5})?(?:[/?#]\S*)?$/;return t.test(e)},alpha:function(e){var t=/^[a-zA-Z_]+$/;return t.test(e)},alphaNum:function(e){var t=/^[a-zA-Z_]+$/;return t.test(e)},creditCard:function(e,t){var i,r,n,s,o=!1;if(t==="Visa")i=/^4\d{3}[- ]?\d{4}[- ]?\d{4}[- ]?\d{4}$/;else if(t==="MasterCard")i=/^5[1-5]\d{2}[- ]?\d{4}[- ]?\d{4}[- ]?\d{4}$/;else if(t==="Discover")i=/^6011[- ]?\d{4}[- ]?\d{4}[- ]?\d{4}$/;else if(t==="AmericanExpress")i=/^3[4,7]\d{13}$/;else if(t==="DinersClub")i=/^(3[0,6,8]\d{12})|(5[45]\d{14})$/;else{if(!e||e.length<13||e.length>19)return!1;i=/[^0-9 \-]+/,o=!0}if(!i.test(e))return!1;for(e=e.split(o?"-":/[- ]/).join(""),r=0,n=2-e.length%2;n<=e.length;n+=2)r+=parseInt(e.charAt(n-1));for(n=e.length%2+1;n<e.length;n+=2)s=parseInt(e.charAt(n-1))*2,r+=s<10?s:s-9;return r%10==0}},Bridge.Validation=ot,Bridge.define("System.Attribute",{statics:{getCustomAttributes:function(e,t,i){var r,n,s;if(e==null)throw new System.ArgumentNullException.$ctor1("element");if(t==null)throw new System.ArgumentNullException.$ctor1("attributeType");if(r=e.at||[],e.ov===!0){for(var o=Bridge.Reflection.getBaseType(e.td),a=[],l=null;o!=null&&l==null;)l=Bridge.Reflection.getMembers(o,31,28,e.n),l.length==0?(n=Bridge.Reflection.getBaseType(o),n!=o&&(o=n),l=null):l=l[0];for(l!=null&&(a=System.Attribute.getCustomAttributes(l,t)),s=0;s<a.length;s++){var u=a[s],d=Bridge.getType(u),f=Bridge.getMetadata(d);(f&&f.am||!r.some(function(C){return Bridge.is(C,t)}))&&r.push(u)}}return t?r.filter(function(C){return Bridge.is(C,t)}):r},getCustomAttributes$1:function(e,t,i){if(e==null)throw new System.ArgumentNullException.$ctor1("element");if(t==null)throw new System.ArgumentNullException.$ctor1("attributeType");return e.getCustomAttributes(t||i)},isDefined:function(e,t,i){var r=System.Attribute.getCustomAttributes(e,t,i);return r.length>0}}}),Bridge.define("System.SerializableAttribute",{inherits:[System.Attribute],ctors:{ctor:function(){this.$initialize(),System.Attribute.ctor.call(this)}}}),Bridge.define("System.ComponentModel.INotifyPropertyChanged",{$kind:"interface"}),Bridge.define("System.ComponentModel.PropertyChangedEventArgs",{ctor:function(e,t,i){this.$initialize(),this.propertyName=e,this.newValue=t,this.oldValue=i}}),_={},_.convert={typeCodes:{Empty:0,Object:1,DBNull:2,Boolean:3,Char:4,SByte:5,Byte:6,Int16:7,UInt16:8,Int32:9,UInt32:10,Int64:11,UInt64:12,Single:13,Double:14,Decimal:15,DateTime:16,String:18},convertTypes:[null,System.Object,null,System.Boolean,System.Char,System.SByte,System.Byte,System.Int16,System.UInt16,System.Int32,System.UInt32,System.Int64,System.UInt64,System.Single,System.Double,System.Decimal,System.DateTime,System.Object,System.String],toBoolean:function(e,t){var i,r;switch(e=Bridge.unbox(e,!0),typeof e){case"boolean":return e;case"number":return e!==0;case"string":if(i=e.toLowerCase().trim(),i==="true")return!0;if(i==="false")return!1;throw new System.FormatException.$ctor1("String was not recognized as a valid Boolean.");case"object":if(e==null)return!1;if(e instanceof System.Decimal)return!e.isZero();if(System.Int64.is64Bit(e))return e.ne(0);break}return r=_.internal.suggestTypeCode(e),_.internal.throwInvalidCastEx(r,_.convert.typeCodes.Boolean),_.convert.convertToType(_.convert.typeCodes.Boolean,e,t||null)},toChar:function(e,t,i){var r=_.convert.typeCodes,n=Bridge.is(e,System.Char),s,o;if(e=Bridge.unbox(e,!0),e instanceof System.Decimal&&(e=e.toFloat()),(e instanceof System.Int64||e instanceof System.UInt64)&&(e=e.toNumber()),s=typeof e,i=i||_.internal.suggestTypeCode(e),i===r.String&&e==null&&(s="string"),i!==r.Object||n)switch(s){case"boolean":_.internal.throwInvalidCastEx(r.Boolean,r.Char);case"number":return o=_.internal.isFloatingType(i),(o||e%1!=0)&&_.internal.throwInvalidCastEx(i,r.Char),_.internal.validateNumberRange(e,r.Char,!0),e;case"string":if(e==null)throw new System.ArgumentNullException.$ctor1("value");if(e.length!==1)throw new System.FormatException.$ctor1("String must be exactly one character long.");return e.charCodeAt(0)}if(i===r.Object||s==="object"){if(e==null)return 0;Bridge.isDate(e)&&_.internal.throwInvalidCastEx(r.DateTime,r.Char)}return _.internal.throwInvalidCastEx(i,_.convert.typeCodes.Char),_.convert.convertToType(r.Char,e,t||null)},toSByte:function(e,t,i){return _.internal.toNumber(e,t||null,_.convert.typeCodes.SByte,i||null)},toByte:function(e,t){return _.internal.toNumber(e,t||null,_.convert.typeCodes.Byte)},toInt16:function(e,t){return _.internal.toNumber(e,t||null,_.convert.typeCodes.Int16)},toUInt16:function(e,t){return _.internal.toNumber(e,t||null,_.convert.typeCodes.UInt16)},toInt32:function(e,t){return _.internal.toNumber(e,t||null,_.convert.typeCodes.Int32)},toUInt32:function(e,t){return _.internal.toNumber(e,t||null,_.convert.typeCodes.UInt32)},toInt64:function(e,t){var i=_.internal.toNumber(e,t||null,_.convert.typeCodes.Int64);return new System.Int64(i)},toUInt64:function(e,t){var i=_.internal.toNumber(e,t||null,_.convert.typeCodes.UInt64);return new System.UInt64(i)},toSingle:function(e,t){return _.internal.toNumber(e,t||null,_.convert.typeCodes.Single)},toDouble:function(e,t){return _.internal.toNumber(e,t||null,_.convert.typeCodes.Double)},toDecimal:function(e,t){return e instanceof System.Decimal?e:new System.Decimal(_.internal.toNumber(e,t||null,_.convert.typeCodes.Decimal))},toDateTime:function(e,t){var i=_.convert.typeCodes,r,n;switch(e=Bridge.unbox(e,!0),typeof e){case"boolean":_.internal.throwInvalidCastEx(i.Boolean,i.DateTime);case"number":r=_.internal.suggestTypeCode(e),_.internal.throwInvalidCastEx(r,i.DateTime);case"string":return System.DateTime.parse(e,t||null);case"object":if(e==null)return _.internal.getMinValue(i.DateTime);if(Bridge.isDate(e))return e;e instanceof System.Decimal&&_.internal.throwInvalidCastEx(i.Decimal,i.DateTime),e instanceof System.Int64&&_.internal.throwInvalidCastEx(i.Int64,i.DateTime),e instanceof System.UInt64&&_.internal.throwInvalidCastEx(i.UInt64,i.DateTime);break}return n=_.internal.suggestTypeCode(e),_.internal.throwInvalidCastEx(n,_.convert.typeCodes.DateTime),_.convert.convertToType(i.DateTime,e,t||null)},toString:function(e,t,i){var r,n;if(e&&e.$boxed)return e.toString();switch(r=_.convert.typeCodes,n=typeof e,n){case"boolean":return e?"True":"False";case"number":return(i||null)===r.Char?String.fromCharCode(e):isNaN(e)?"NaN":(e%1!=0&&(e=parseFloat(e.toPrecision(15))),e.toString());case"string":return e;case"object":return e==null?"":e.toString!==Object.prototype.toString?e.toString():Bridge.isDate(e)?System.DateTime.format(e,null,t||null):e instanceof System.Decimal?e.isInteger()?e.toFixed(0,4):e.toPrecision(e.precision()):System.Int64.is64Bit(e)?e.toString():e.format?e.format(null,t||null):Bridge.getTypeName(e)}return _.convert.convertToType(_.convert.typeCodes.String,e,t||null)},toNumberInBase:function(e,t,i){var r,n,s,o,a,l,u,d,f,C,E,T;if(t!==2&&t!==8&&t!==10&&t!==16)throw new System.ArgumentException.$ctor1("Invalid Base.");if(r=_.convert.typeCodes,e==null)return i===r.Int64?System.Int64.Zero:i===r.UInt64?System.UInt64.Zero:0;if(e.length===0)throw new System.ArgumentOutOfRangeException.$ctor4("length","Index was out of range. Must be non-negative and less than the size of the collection.");e=e.toLowerCase();var w=_.internal.getMinValue(i),k=_.internal.getMaxValue(i),O=!1,M=0;if(e[M]==="-"){if(t!==10)throw new System.ArgumentException.$ctor1("String cannot contain a minus sign if the base is not 10.");if(w>=0)throw new System.OverflowException.$ctor1("The string was being parsed as an unsigned number and could not have a negative sign.");O=!0,++M}else e[M]==="+"&&++M;if(t===16&&e.length>=2&&e[M]==="0"&&e[M+1]==="x"&&(M+=2),t===2)n=_.internal.charsToCodes("01");else if(t===8)n=_.internal.charsToCodes("01234567");else if(t===10)n=_.internal.charsToCodes("0123456789");else if(t===16)n=_.internal.charsToCodes("0123456789abcdef");else throw new System.ArgumentException.$ctor1("Invalid Base.");for(s={},o=0;o<n.length;o++)a=n[o],s[a]=o;if(l=n[0],u=n[n.length-1],i===r.Int64||i===r.UInt64){for(E=M;E<e.length;E++)if(C=e[E].charCodeAt(0),!(C>=l&&C<=u))throw E===M?new System.FormatException.$ctor1("Could not find any recognizable digits."):new System.FormatException.$ctor1("Additional non-parsable characters are at the end of the string.");if(T=i===r.Int64,d=T?new System.Int64(Bridge.$Long.fromString(e,!1,t)):new System.UInt64(Bridge.$Long.fromString(e,!0,t)),d.toString(t)!==System.String.trimStartZeros(e))throw new System.OverflowException.$ctor1("Value was either too large or too small.");return d}else{for(d=0,f=k-w+1,E=M;E<e.length;E++)if(C=e[E].charCodeAt(0),C>=l&&C<=u){if(d*=t,d+=s[C],d>_.internal.typeRanges.Int64_MaxValue)throw new System.OverflowException.$ctor1("Value was either too large or too small.")}else throw E===M?new System.FormatException.$ctor1("Could not find any recognizable digits."):new System.FormatException.$ctor1("Additional non-parsable characters are at the end of the string.");if(O&&(d*=-1),d>k&&t!==10&&w<0&&(d=d-f),d<w||d>k)throw new System.OverflowException.$ctor1("Value was either too large or too small.");return d}},toStringInBase:function(e,t,i){var r=_.convert.typeCodes,n,s,o,a,l,u,d,f,C;if(e=Bridge.unbox(e,!0),t!==2&&t!==8&&t!==10&&t!==16)throw new System.ArgumentException.$ctor1("Invalid Base.");var E=_.internal.getMinValue(i),T=_.internal.getMaxValue(i),w=System.Int64.is64Bit(e);if(w){if(e.lt(E)||e.gt(T))throw new System.OverflowException.$ctor1("Value was either too large or too small for an unsigned byte.")}else if(e<E||e>T)throw new System.OverflowException.$ctor1("Value was either too large or too small for an unsigned byte.");if(n=!1,w)return t===10?e.toString():e.value.toUnsigned().toString(t);if(e<0&&(t===10?(n=!0,e*=-1):e=T+1-E+e),t===2)s="01";else if(t===8)s="01234567";else if(t===10)s="0123456789";else if(t===16)s="0123456789abcdef";else throw new System.ArgumentException.$ctor1("Invalid Base.");for(o={},a=s.split(""),u=0;u<a.length;u++)l=a[u],o[u]=l;if(d="",e===0||w&&e.eq(0))d="0";else if(w)for(;e.gt(0);)f=e.mod(t),e=e.sub(f).div(t),C=o[f.toNumber()],d+=C;else for(;e>0;)f=e%t,e=(e-f)/t,C=o[f],d+=C;return n&&(d+="-"),d.split("").reverse().join("")},toBase64String:function(e,t,i,r){var n;if(e==null)throw new System.ArgumentNullException.$ctor1("inArray");if(t=t||0,i=i??e.length,r=r||0,i<0)throw new System.ArgumentOutOfRangeException.$ctor4("length","Index was out of range. Must be non-negative and less than the size of the collection.");if(t<0)throw new System.ArgumentOutOfRangeException.$ctor4("offset","Value must be positive.");if(r<0||r>1)throw new System.ArgumentException.$ctor1("Illegal enum value.");if(n=e.length,t>n-i)throw new System.ArgumentOutOfRangeException.$ctor4("offset","Offset and length must refer to a position in the string.");if(n===0)return"";var s=r===1,o=_.internal.toBase64_CalculateAndValidateOutputLength(i,s),a=[];return a.length=o,_.internal.convertToBase64Array(a,e,t,i,s),a.join("")},toBase64CharArray:function(e,t,i,r,n,s){var o,a,l;if(e==null)throw new System.ArgumentNullException.$ctor1("inArray");if(r==null)throw new System.ArgumentNullException.$ctor1("outArray");if(i<0)throw new System.ArgumentOutOfRangeException.$ctor4("length","Index was out of range. Must be non-negative and less than the size of the collection.");if(t<0)throw new System.ArgumentOutOfRangeException.$ctor4("offsetIn","Value must be positive.");if(n<0)throw new System.ArgumentOutOfRangeException.$ctor4("offsetOut","Value must be positive.");if(s=s||0,s<0||s>1)throw new System.ArgumentException.$ctor1("Illegal enum value.");if(o=e.length,t>o-i)throw new System.ArgumentOutOfRangeException.$ctor4("offsetIn","Offset and length must refer to a position in the string.");if(o===0)return 0;var u=s===1,d=r.length,f=_.internal.toBase64_CalculateAndValidateOutputLength(i,u);if(n>d-f)throw new System.ArgumentOutOfRangeException.$ctor4("offsetOut","Either offset did not refer to a position in the string, or there is an insufficient length of destination character array.");return a=[],l=_.internal.convertToBase64Array(a,e,t,i,u),_.internal.charsToCodes(a,r,n),l},fromBase64String:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("s");var t=e.split("");return _.internal.fromBase64CharPtr(t,0,t.length)},fromBase64CharArray:function(e,t,i){if(e==null)throw new System.ArgumentNullException.$ctor1("inArray");if(i<0)throw new System.ArgumentOutOfRangeException.$ctor4("length","Index was out of range. Must be non-negative and less than the size of the collection.");if(t<0)throw new System.ArgumentOutOfRangeException.$ctor4("offset","Value must be positive.");if(t>e.length-i)throw new System.ArgumentOutOfRangeException.$ctor4("offset","Offset and length must refer to a position in the string.");var r=_.internal.codesToChars(e);return _.internal.fromBase64CharPtr(r,t,i)},getTypeCode:function(e){return e==null?System.TypeCode.Object:e===System.Double?System.TypeCode.Double:e===System.Single?System.TypeCode.Single:e===System.Decimal?System.TypeCode.Decimal:e===System.Byte?System.TypeCode.Byte:e===System.SByte?System.TypeCode.SByte:e===System.UInt16?System.TypeCode.UInt16:e===System.Int16?System.TypeCode.Int16:e===System.UInt32?System.TypeCode.UInt32:e===System.Int32?System.TypeCode.Int32:e===System.UInt64?System.TypeCode.UInt64:e===System.Int64?System.TypeCode.Int64:e===System.Boolean?System.TypeCode.Boolean:e===System.Char?System.TypeCode.Char:e===System.DateTime?System.TypeCode.DateTime:e===System.String?System.TypeCode.String:System.TypeCode.Object},changeConversionType:function(e,t,i){if(t==null)throw new System.ArgumentNullException.$ctor1("conversionType");if(e==null){if(Bridge.Reflection.isValueType(t))throw new System.InvalidCastException.$ctor1("Null object cannot be converted to a value type.");return null}var r=_.convert.getTypeCode(Bridge.getType(e)),n=Bridge.as(e,System.IConvertible);if(n==null&&r==System.TypeCode.Object){if(Bridge.referenceEquals(Bridge.getType(e),t))return e;throw new System.InvalidCastException.$ctor1("Cannot convert to IConvertible")}if(Bridge.referenceEquals(t,_.convert.convertTypes[System.Array.index(System.TypeCode.Boolean,_.convert.convertTypes)]))return n==null?_.convert.toBoolean(e,i):n.System$IConvertible$ToBoolean(i);if(Bridge.referenceEquals(t,_.convert.convertTypes[System.Array.index(System.TypeCode.Char,_.convert.convertTypes)]))return n==null?_.convert.toChar(e,i,r):n.System$IConvertible$ToChar(i);if(Bridge.referenceEquals(t,_.convert.convertTypes[System.Array.index(System.TypeCode.SByte,_.convert.convertTypes)]))return n==null?_.convert.toSByte(e,i,r):n.System$IConvertible$ToSByte(i);if(Bridge.referenceEquals(t,_.convert.convertTypes[System.Array.index(System.TypeCode.Byte,_.convert.convertTypes)]))return n==null?_.convert.toByte(e,i):n.System$IConvertible$ToByte(i);if(Bridge.referenceEquals(t,_.convert.convertTypes[System.Array.index(System.TypeCode.Int16,_.convert.convertTypes)]))return n==null?_.convert.toInt16(e,i):n.System$IConvertible$ToInt16(i);if(Bridge.referenceEquals(t,_.convert.convertTypes[System.Array.index(System.TypeCode.UInt16,_.convert.convertTypes)]))return n==null?_.convert.toUInt16(e,i):n.System$IConvertible$ToUInt16(i);if(Bridge.referenceEquals(t,_.convert.convertTypes[System.Array.index(System.TypeCode.Int32,_.convert.convertTypes)]))return n==null?_.convert.toInt32(e,i):n.System$IConvertible$ToInt32(i);if(Bridge.referenceEquals(t,_.convert.convertTypes[System.Array.index(System.TypeCode.UInt32,_.convert.convertTypes)]))return n==null?_.convert.toUInt32(e,i):n.System$IConvertible$ToUInt32(i);if(Bridge.referenceEquals(t,_.convert.convertTypes[System.Array.index(System.TypeCode.Int64,_.convert.convertTypes)]))return n==null?_.convert.toInt64(e,i):n.System$IConvertible$ToInt64(i);if(Bridge.referenceEquals(t,_.convert.convertTypes[System.Array.index(System.TypeCode.UInt64,_.convert.convertTypes)]))return n==null?_.convert.toUInt64(e,i):n.System$IConvertible$ToUInt64(i);if(Bridge.referenceEquals(t,_.convert.convertTypes[System.Array.index(System.TypeCode.Single,_.convert.convertTypes)]))return n==null?_.convert.toSingle(e,i):n.System$IConvertible$ToSingle(i);if(Bridge.referenceEquals(t,_.convert.convertTypes[System.Array.index(System.TypeCode.Double,_.convert.convertTypes)]))return n==null?_.convert.toDouble(e,i):n.System$IConvertible$ToDouble(i);if(Bridge.referenceEquals(t,_.convert.convertTypes[System.Array.index(System.TypeCode.Decimal,_.convert.convertTypes)]))return n==null?_.convert.toDecimal(e,i):n.System$IConvertible$ToDecimal(i);if(Bridge.referenceEquals(t,_.convert.convertTypes[System.Array.index(System.TypeCode.DateTime,_.convert.convertTypes)]))return n==null?_.convert.toDateTime(e,i):n.System$IConvertible$ToDateTime(i);if(Bridge.referenceEquals(t,_.convert.convertTypes[System.Array.index(System.TypeCode.String,_.convert.convertTypes)]))return n==null?_.convert.toString(e,i,r):n.System$IConvertible$ToString(i);if(Bridge.referenceEquals(t,_.convert.convertTypes[System.Array.index(System.TypeCode.Object,_.convert.convertTypes)]))return e;if(n==null)throw new System.InvalidCastException.$ctor1("Cannot convert to IConvertible");return n.System$IConvertible$ToType(t,i)},changeType:function(e,t,i){if(Bridge.isFunction(t))return _.convert.changeConversionType(e,t,i);if(e==null&&(t===System.TypeCode.Empty||t===System.TypeCode.String||t===System.TypeCode.Object))return null;var r=_.convert.getTypeCode(Bridge.getType(e)),n=Bridge.as(e,System.IConvertible);if(n==null&&r==System.TypeCode.Object)throw new System.InvalidCastException.$ctor1("Cannot convert to IConvertible");switch(t){case System.TypeCode.Boolean:return n==null?_.convert.toBoolean(e,i):n.System$IConvertible$ToBoolean(provider);case System.TypeCode.Char:return n==null?_.convert.toChar(e,i,r):n.System$IConvertible$ToChar(provider);case System.TypeCode.SByte:return n==null?_.convert.toSByte(e,i,r):n.System$IConvertible$ToSByte(provider);case System.TypeCode.Byte:return n==null?_.convert.toByte(e,i,r):n.System$IConvertible$ToByte(provider);case System.TypeCode.Int16:return n==null?_.convert.toInt16(e,i):n.System$IConvertible$ToInt16(provider);case System.TypeCode.UInt16:return n==null?_.convert.toUInt16(e,i):n.System$IConvertible$ToUInt16(provider);case System.TypeCode.Int32:return n==null?_.convert.toInt32(e,i):n.System$IConvertible$ToInt32(provider);case System.TypeCode.UInt32:return n==null?_.convert.toUInt32(e,i):n.System$IConvertible$ToUInt32(provider);case System.TypeCode.Int64:return n==null?_.convert.toInt64(e,i):n.System$IConvertible$ToInt64(provider);case System.TypeCode.UInt64:return n==null?_.convert.toUInt64(e,i):n.System$IConvertible$ToUInt64(provider);case System.TypeCode.Single:return n==null?_.convert.toSingle(e,i):n.System$IConvertible$ToSingle(provider);case System.TypeCode.Double:return n==null?_.convert.toDouble(e,i):n.System$IConvertible$ToDouble(provider);case System.TypeCode.Decimal:return n==null?_.convert.toDecimal(e,i):n.System$IConvertible$ToDecimal(provider);case System.TypeCode.DateTime:return n==null?_.convert.toDateTime(e,i):n.System$IConvertible$ToDateTime(provider);case System.TypeCode.String:return n==null?_.convert.toString(e,i,r):n.System$IConvertible$ToString(provider);case System.TypeCode.Object:return e;case System.TypeCode.DBNull:throw new System.InvalidCastException.$ctor1("Cannot convert DBNull values");case System.TypeCode.Empty:throw new System.InvalidCastException.$ctor1("Cannot convert Empty values");default:throw new System.ArgumentException.$ctor1("Unknown type code")}}},_.internal={base64Table:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/","="],typeRanges:{Char_MinValue:0,Char_MaxValue:65535,Byte_MinValue:0,Byte_MaxValue:255,SByte_MinValue:-128,SByte_MaxValue:127,Int16_MinValue:-32768,Int16_MaxValue:32767,UInt16_MinValue:0,UInt16_MaxValue:65535,Int32_MinValue:-2147483648,Int32_MaxValue:2147483647,UInt32_MinValue:0,UInt32_MaxValue:4294967295,Int64_MinValue:System.Int64.MinValue,Int64_MaxValue:System.Int64.MaxValue,UInt64_MinValue:System.UInt64.MinValue,UInt64_MaxValue:System.UInt64.MaxValue,Single_MinValue:-340282347e30,Single_MaxValue:340282347e30,Double_MinValue:-17976931348623157e292,Double_MaxValue:17976931348623157e292,Decimal_MinValue:System.Decimal.MinValue,Decimal_MaxValue:System.Decimal.MaxValue},base64LineBreakPosition:76,getTypeCodeName:function(e){var t=_.convert.typeCodes,i,r,n,s;if(_.internal.typeCodeNames==null){i={};for(r in t)t.hasOwnProperty(r)&&(n=t[r],i[n]=r);_.internal.typeCodeNames=i}if(s=_.internal.typeCodeNames[e],s==null)throw System.ArgumentOutOfRangeException("typeCode","The specified typeCode is undefined.");return s},suggestTypeCode:function(e){var t=_.convert.typeCodes,i=typeof e;switch(i){case"boolean":return t.Boolean;case"number":return e%1!=0?t.Double:t.Int32;case"string":return t.String;case"object":if(Bridge.isDate(e))return t.DateTime;if(e!=null)return t.Object;break}return null},getMinValue:function(e){var t=_.convert.typeCodes;switch(e){case t.Char:return _.internal.typeRanges.Char_MinValue;case t.SByte:return _.internal.typeRanges.SByte_MinValue;case t.Byte:return _.internal.typeRanges.Byte_MinValue;case t.Int16:return _.internal.typeRanges.Int16_MinValue;case t.UInt16:return _.internal.typeRanges.UInt16_MinValue;case t.Int32:return _.internal.typeRanges.Int32_MinValue;case t.UInt32:return _.internal.typeRanges.UInt32_MinValue;case t.Int64:return _.internal.typeRanges.Int64_MinValue;case t.UInt64:return _.internal.typeRanges.UInt64_MinValue;case t.Single:return _.internal.typeRanges.Single_MinValue;case t.Double:return _.internal.typeRanges.Double_MinValue;case t.Decimal:return _.internal.typeRanges.Decimal_MinValue;case t.DateTime:return System.DateTime.getMinValue();default:return null}},getMaxValue:function(e){var t=_.convert.typeCodes;switch(e){case t.Char:return _.internal.typeRanges.Char_MaxValue;case t.SByte:return _.internal.typeRanges.SByte_MaxValue;case t.Byte:return _.internal.typeRanges.Byte_MaxValue;case t.Int16:return _.internal.typeRanges.Int16_MaxValue;case t.UInt16:return _.internal.typeRanges.UInt16_MaxValue;case t.Int32:return _.internal.typeRanges.Int32_MaxValue;case t.UInt32:return _.internal.typeRanges.UInt32_MaxValue;case t.Int64:return _.internal.typeRanges.Int64_MaxValue;case t.UInt64:return _.internal.typeRanges.UInt64_MaxValue;case t.Single:return _.internal.typeRanges.Single_MaxValue;case t.Double:return _.internal.typeRanges.Double_MaxValue;case t.Decimal:return _.internal.typeRanges.Decimal_MaxValue;case t.DateTime:return System.DateTime.getMaxValue();default:throw new System.ArgumentOutOfRangeException.$ctor4("typeCode","The specified typeCode is undefined.")}},isFloatingType:function(e){var t=_.convert.typeCodes;return e===t.Single||e===t.Double||e===t.Decimal},toNumber:function(e,t,i,r){var n,s,o,a,l;e=Bridge.unbox(e,!0);var u=_.convert.typeCodes,d=typeof e,f=_.internal.isFloatingType(i);switch(r===u.String&&(d="string"),(System.Int64.is64Bit(e)||e instanceof System.Decimal)&&(d="number"),d){case"boolean":return e?1:0;case"number":return i===u.Decimal?(_.internal.validateNumberRange(e,i,!0),new System.Decimal(e,t)):i===u.Int64?(_.internal.validateNumberRange(e,i,!0),new System.Int64(e)):i===u.UInt64?(_.internal.validateNumberRange(e,i,!0),new System.UInt64(e)):(System.Int64.is64Bit(e)?e=e.toNumber():e instanceof System.Decimal&&(e=e.toFloat()),f||e%1==0||(e=_.internal.roundToInt(e,i)),f&&(n=_.internal.getMinValue(i),s=_.internal.getMaxValue(i),e>s?e=1/0:e<n&&(e=-1/0)),_.internal.validateNumberRange(e,i,!1),e);case"string":if(e==null){if(t!=null)throw new System.ArgumentNullException.$ctor3("String","Value cannot be null.");return 0}if(f)if(o=(t||System.Globalization.CultureInfo.getCurrentCulture()).getFormat(System.Globalization.NumberFormatInfo),a=o.numberDecimalSeparator,i===u.Decimal){if(!new RegExp("^[+-]?(\\d+|\\d+.|\\d*\\"+a+"\\d+)$").test(e)&&!/^[+-]?[0-9]+$/.test(e))throw new System.FormatException.$ctor1("Input string was not in a correct format.");e=new System.Decimal(e,t)}else{if(!new RegExp("^[-+]?[0-9]*\\"+a+"?[0-9]+([eE][-+]?[0-9]+)?$").test(e))throw new System.FormatException.$ctor1("Input string was not in a correct format.");e=Bridge.Int.parseFloat(e,t)}else{if(!/^[+-]?[0-9]+$/.test(e))throw new System.FormatException.$ctor1("Input string was not in a correct format.");l=e,i===u.Int64?(e=new System.Int64(e),System.String.trimStartZeros(l)!==e.toString()&&this.throwOverflow(_.internal.getTypeCodeName(i))):i===u.UInt64?(e=new System.UInt64(e),System.String.trimStartZeros(l)!==e.toString()&&this.throwOverflow(_.internal.getTypeCodeName(i))):e=parseInt(e,10)}if(isNaN(e))throw new System.FormatException.$ctor1("Input string was not in a correct format.");return _.internal.validateNumberRange(e,i,!0),e;case"object":if(e==null)return 0;Bridge.isDate(e)&&_.internal.throwInvalidCastEx(_.convert.typeCodes.DateTime,i);break}return r=r||_.internal.suggestTypeCode(e),_.internal.throwInvalidCastEx(r,i),_.convert.convertToType(i,e,t)},validateNumberRange:function(e,t,i){var r=_.convert.typeCodes,n=_.internal.getMinValue(t),s=_.internal.getMaxValue(t),o=_.internal.getTypeCodeName(t);(t!==r.Single&&t!==r.Double||i||e!==1/0&&e!==-1/0)&&(t===r.Decimal||t===r.Int64||t===r.UInt64?t===r.Decimal?(System.Int64.is64Bit(e)||(n.gt(e)||s.lt(e))&&this.throwOverflow(o),e=new System.Decimal(e)):t===r.Int64?(e instanceof System.UInt64?e.gt(System.Int64.MaxValue)&&this.throwOverflow(o):e instanceof System.Decimal?(e.gt(new System.Decimal(s))||e.lt(new System.Decimal(n)))&&this.throwOverflow(o):e instanceof System.Int64||(n.toNumber()>e||s.toNumber()<e)&&this.throwOverflow(o),e=new System.Int64(e)):t===r.UInt64&&(e instanceof System.Int64?e.isNegative()&&this.throwOverflow(o):e instanceof System.Decimal?(e.gt(new System.Decimal(s))||e.lt(new System.Decimal(n)))&&this.throwOverflow(o):e instanceof System.UInt64||(n.toNumber()>e||s.toNumber()<e)&&this.throwOverflow(o),e=new System.UInt64(e)):(e<n||e>s)&&this.throwOverflow(o))},throwOverflow:function(e){throw new System.OverflowException.$ctor1("Value was either too large or too small for '"+e+"'.")},roundToInt:function(e,t){var i,r;if(e%1==0)return e;i=e>=0?Math.floor(e):-1*Math.floor(-e);var n=e-i,s=_.internal.getMinValue(t),o=_.internal.getMaxValue(t);if(e>=0){if(e<o+.5)return(n>.5||n===.5&&i&1)&&++i,i}else if(e>=s-.5)return(n<-.5||n===-.5&&i&1)&&--i,i;throw r=_.internal.getTypeCodeName(t),new System.OverflowException.$ctor1("Value was either too large or too small for an '"+r+"'.")},toBase64_CalculateAndValidateOutputLength:function(e,t){var i=_.internal.base64LineBreakPosition,r=~~(e/3)*4,n;if(r+=e%3!=0?4:0,r===0)return 0;if(t&&(n=~~(r/i),r%i==0&&--n,r+=n*2),r>2147483647)throw new System.OutOfMemoryException;return r},convertToBase64Array:function(e,t,i,r,n){for(var s=_.internal.base64Table,o=_.internal.base64LineBreakPosition,a=r%3,l=i+(r-a),u=0,d=0,f=i;f<l;f+=3)n&&(u===o&&(e[d++]="\r",e[d++]=` `,u=0),u+=4),e[d]=s[(t[f]&252)>>2],e[d+1]=s[(t[f]&3)<<4|(t[f+1]&240)>>4],e[d+2]=s[(t[f+1]&15)<<2|(t[f+2]&192)>>6],e[d+3]=s[t[f+2]&63],d+=4;switch(f=l,n&&a!==0&&u===_.internal.base64LineBreakPosition&&(e[d++]="\r",e[d++]=` `),a){case 2:e[d]=s[(t[f]&252)>>2],e[d+1]=s[(t[f]&3)<<4|(t[f+1]&240)>>4],e[d+2]=s[(t[f+1]&15)<<2],e[d+3]=s[64],d+=4;break;case 1:e[d]=s[(t[f]&252)>>2],e[d+1]=s[(t[f]&3)<<4],e[d+2]=s[64],e[d+3]=s[64],d+=4;break}return d},fromBase64CharPtr:function(e,t,i){var r,n,s;if(i<0)throw new System.ArgumentOutOfRangeException.$ctor4("inputLength","Index was out of range. Must be non-negative and less than the size of the collection.");if(t<0)throw new System.ArgumentOutOfRangeException.$ctor4("offset","Value must be positive.");for(;i>0&&(r=e[t+i-1],!(r!==" "&&r!==` `&&r!=="\r"&&r!==" "));)i--;if(n=_.internal.fromBase64_ComputeResultLength(e,t,i),0>n)throw new System.InvalidOperationException.$ctor1("Contract voilation: 0 <= resultLength.");return s=[],s.length=n,_.internal.fromBase64_Decode(e,t,i,s,0,n),s},fromBase64_Decode:function(e,t,i,r,n,s){for(var o=n,a="A".charCodeAt(0),l="a".charCodeAt(0),u="0".charCodeAt(0),d="=".charCodeAt(0),f="+".charCodeAt(0),C="/".charCodeAt(0),E=" ".charCodeAt(0),T=" ".charCodeAt(0),w=` `.charCodeAt(0),k="\r".charCodeAt(0),O="Z".charCodeAt(0)-"A".charCodeAt(0),M="9".charCodeAt(0)-"0".charCodeAt(0),P=t+i,y=n+s,m,c=255,$=!1,x=!1,D;;){if(t>=P){$=!0;break}if(m=e[t].charCodeAt(0),t++,m-a>>>0<=O)m-=a;else if(m-l>>>0<=O)m-=l-26;else if(m-u>>>0<=M)m-=u-52;else switch(m){case f:m=62;break;case C:m=63;break;case k:case w:case E:case T:continue;case d:x=!0;break;default:throw new System.FormatException.$ctor1("The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.")}if(x)break;if(c=c<<6|m,(c&2147483648)!=0){if(y-n<3)return-1;r[n]=255&c>>16,r[n+1]=255&c>>8,r[n+2]=255&c,n+=3,c=255}}if(!$&&!x)throw new System.InvalidOperationException.$ctor1("Contract violation: should never get here.");if(x){if(m!==d)throw new System.InvalidOperationException.$ctor1("Contract violation: currCode == intEq.");if(t===P){if(c<<=6,(c&2147483648)==0)throw new System.FormatException.$ctor1("Invalid length for a Base-64 char array or string.");if(y-n<2)return-1;r[n]=255&c>>16,r[n+1]=255&c>>8,n+=2,c=255}else{for(;t<P-1&&(D=e[t],!(D!==" "&&D!==` `&&D!=="\r"&&D!==" "));)t++;if(t===P-1&&e[t]==="="){if(c<<=12,(c&2147483648)==0)throw new System.FormatException.$ctor1("Invalid length for a Base-64 char array or string.");if(y-n<1)return-1;r[n]=255&c>>16,n++,c=255}else throw new System.FormatException.$ctor1("The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.")}}if(c!==255)throw new System.FormatException.$ctor1("Invalid length for a Base-64 char array or string.");return n-o},fromBase64_ComputeResultLength:function(e,t,i){var r="=",n=" ",s;if(i<0)throw new System.ArgumentOutOfRangeException.$ctor4("inputLength","Index was out of range. Must be non-negative and less than the size of the collection.");for(var o=t+i,a=i,l=0;t<o;)s=e[t],t++,s<=n?a--:s===r&&(a--,l++);if(0>a)throw new System.InvalidOperationException.$ctor1("Contract violation: 0 <= usefulInputLength.");if(0>l)throw new System.InvalidOperationException.$ctor1("Contract violation: 0 <= padding.");if(l!==0)if(l===1)l=2;else if(l===2)l=1;else throw new System.FormatException.$ctor1("The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.");return~~(a/4)*3+l},charsToCodes:function(e,t,i){if(e==null)return null;i=i||0,t==null&&(t=[],t.length=e.length);for(var r=0;r<e.length;r++)t[r+i]=e[r].charCodeAt(0);return t},codesToChars:function(e,t){var i,r;if(e==null)return null;for(t=t||[],i=0;i<e.length;i++)r=e[i],t[i]=String.fromCharCode(r);return t},throwInvalidCastEx:function(e,t){var i=_.internal.getTypeCodeName(e),r=_.internal.getTypeCodeName(t);throw new System.InvalidCastException.$ctor1("Invalid cast from '"+i+"' to '"+r+"'.")}},System.Convert=_.convert,Bridge.define("System.Net.WebSockets.ClientWebSocket",{inherits:[System.IDisposable],ctor:function(){this.$initialize(),this.messageBuffer=[],this.state="none",this.options=new System.Net.WebSockets.ClientWebSocketOptions,this.disposed=!1,this.closeStatus=null,this.closeStatusDescription=null},getCloseStatus:function(){return this.closeStatus},getState:function(){return this.state},getCloseStatusDescription:function(){return this.closeStatusDescription},getSubProtocol:function(){return this.socket?this.socket.protocol:null},onCloseHandler:function(e){var t,i=!1;return e.code==1e3?(t="Status code: "+e.code+". Normal closure, meaning that the purpose for which the connection was established has been fulfilled.",i=!0):t=e.code==1001?"Status code: "+e.code+'. An endpoint is "going away", such as a server going down or a browser having navigated away from a page.':e.code==1002?"Status code: "+e.code+". An endpoint is terminating the connection due to a protocol error":e.code==1003?"Status code: "+e.code+". An endpoint is terminating the connection because it has received a type of data it cannot accept (e.g., an endpoint that understands only text data MAY send this if it receives a binary message).":e.code==1004?"Status code: "+e.code+". Reserved. The specific meaning might be defined in the future.":e.code==1005?"Status code: "+e.code+". No status code was actually present.":e.code==1006?"Status code: "+e.code+". The connection was closed abnormally, e.g., without sending or receiving a Close control frame":e.code==1007?"Status code: "+e.code+". An endpoint is terminating the connection because it has received data within a message that was not consistent with the type of the message (e.g., non-UTF-8 [http://tools.ietf.org/html/rfc3629] data within a text message).":e.code==1008?"Status code: "+e.code+'. An endpoint is terminating the connection because it has received a message that "violates its policy". This reason is given either if there is no other sutible reason, or if there is a need to hide specific details about the policy.':e.code==1009?"Status code: "+e.code+". An endpoint is terminating the connection because it has received a message that is too big for it to process.":e.code==1010?"Status code: "+e.code+". An endpoint (client) is terminating the connection because it has expected the server to negotiate one or more extension, but the server didn't return them in the response message of the WebSocket handshake. <br /> Specifically, the extensions that are needed are: "+e.reason:e.code==1011?"Status code: "+e.code+". A server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request.":e.code==1015?"Status code: "+e.code+". The connection was closed due to a failure to perform a TLS handshake (e.g., the server certificate can't be verified).":"Unknown reason",{code:e.code,reason:t}},connectAsync:function(e,t){if(this.state!=="none")throw new System.InvalidOperationException.$ctor1("Socket is not in initial state");this.options.setToReadOnly(),this.state="connecting";var i=new System.Threading.Tasks.TaskCompletionSource,r=this;try{this.socket=new WebSocket(e.getAbsoluteUri(),this.options.requestedSubProtocols),this.socket.onerror=function(n){setTimeout(function(){r.closeInfo&&!r.closeInfo.success&&(n.message=r.closeInfo.reason),i.setException(System.Exception.create(n))},10)},this.socket.binaryType="arraybuffer",this.socket.onopen=function(){r.state="open",i.setResult(null)},this.socket.onmessage=function(n){var s=n.data,o={},a,l;if(o.bytes=[],typeof s=="string"){for(a=0;a<s.length;++a)o.bytes.push(s.charCodeAt(a));o.messageType="text",r.messageBuffer.push(o);return}if(s instanceof ArrayBuffer){for(l=new Uint8Array(s),a=0;a<l.length;a++)o.bytes.push(l[a]);o.messageType="binary",r.messageBuffer.push(o);return}throw new System.ArgumentException.$ctor1("Invalid message type.")},this.socket.onclose=function(n){r.state="closed",r.closeStatus=n.code,r.closeStatusDescription=n.reason,r.closeInfo=r.onCloseHandler(n)}}catch(n){i.setException(System.Exception.create(n))}return i.task},sendAsync:function(e,t,i,r){var n,s;this.throwIfNotConnected(),n=new System.Threading.Tasks.TaskCompletionSource;try{if(t==="close")this.socket.close();else{var o=e.getArray(),a=e.getCount(),l=e.getOffset(),u=new Uint8Array(a);for(s=0;s<a;s++)u[s]=o[s+l];t==="text"&&(u=String.fromCharCode.apply(null,u)),this.socket.send(u)}n.setResult(null)}catch(d){n.setException(System.Exception.create(d))}return n.task},receiveAsync:function(e,t){this.throwIfNotConnected();var i,r=new System.Threading.Tasks.TaskCompletionSource,n=this,s=Bridge.fn.bind(this,function(){var o,a,l,u,d;try{if(t.getIsCancellationRequested()){r.setException(new System.Threading.Tasks.TaskCanceledException("Receive has been cancelled.",r.task));return}if(n.messageBuffer.length===0){i=System.Threading.Tasks.Task.delay(0),i.continueWith(s);return}for(o=n.messageBuffer[0],a=e.getArray(),o.bytes.length<=a.length?(n.messageBuffer.shift(),l=o.bytes,u=!0):(l=o.bytes.slice(0,a.length),o.bytes=o.bytes.slice(a.length,o.bytes.length),u=!1),d=0;d<l.length;d++)a[d]=l[d];r.setResult(new System.Net.WebSockets.WebSocketReceiveResult(l.length,o.messageType,u))}catch(f){r.setException(System.Exception.create(f))}},arguments);return s(),r.task},closeAsync:function(e,t,i){if(this.throwIfNotConnected(),this.state!=="open")throw new System.InvalidOperationException.$ctor1("Socket is not in connected state");var r=new System.Threading.Tasks.TaskCompletionSource,n=this,s,o=function(){if(n.state==="closed"){r.setResult(null);return}if(i.getIsCancellationRequested()){r.setException(new System.Threading.Tasks.TaskCanceledException("Closing has been cancelled.",r.task));return}s=System.Threading.Tasks.Task.delay(0),s.continueWith(o)};try{this.state="closesent",this.socket.close(e,t)}catch(a){r.setException(System.Exception.create(a))}return o(),r.task},closeOutputAsync:function(e,t,i){if(this.throwIfNotConnected(),this.state!=="open")throw new System.InvalidOperationException.$ctor1("Socket is not in connected state");var r=new System.Threading.Tasks.TaskCompletionSource;try{this.state="closesent",this.socket.close(e,t),r.setResult(null)}catch(n){r.setException(System.Exception.create(n))}return r.task},abort:function(){this.Dispose()},Dispose:function(){this.disposed||(this.disposed=!0,this.messageBuffer=[],state==="open"&&(this.state="closesent",this.socket.close()))},throwIfNotConnected:function(){if(this.disposed)throw new System.InvalidOperationException.$ctor1("Socket is disposed.");if(this.socket.readyState!==1)throw new System.InvalidOperationException.$ctor1("Socket is not connected.")}}),Bridge.define("System.Net.WebSockets.ClientWebSocketOptions",{ctor:function(){this.$initialize(),this.isReadOnly=!1,this.requestedSubProtocols=[]},setToReadOnly:function(){if(this.isReadOnly)throw new System.InvalidOperationException.$ctor1("Options are already readonly.");this.isReadOnly=!0},addSubProtocol:function(e){if(this.isReadOnly)throw new System.InvalidOperationException.$ctor1("Socket already started.");if(this.requestedSubProtocols.indexOf(e)>-1)throw new System.ArgumentException.$ctor1("Socket cannot have duplicate sub-protocols.","subProtocol");this.requestedSubProtocols.push(e)}}),Bridge.define("System.Net.WebSockets.WebSocketReceiveResult",{ctor:function(e,t,i,r,n){this.$initialize(),this.count=e,this.messageType=t,this.endOfMessage=i,this.closeStatus=r,this.closeStatusDescription=n},getCount:function(){return this.count},getMessageType:function(){return this.messageType},getEndOfMessage:function(){return this.endOfMessage},getCloseStatus:function(){return this.closeStatus},getCloseStatusDescription:function(){return this.closeStatusDescription}}),Bridge.assembly("System",{},function(e,t){Bridge.define("System.Uri",{statics:{methods:{equals:function(i,r){return i==r?!0:i==null||r==null?!1:r.equals(i)},notEquals:function(i,r){return!System.Uri.equals(i,r)}}},ctor:function(i){this.$initialize(),this.absoluteUri=i},getAbsoluteUri:function(){return this.absoluteUri},toJSON:function(){return this.absoluteUri},toString:function(){return this.absoluteUri},equals:function(i){return i==null||!Bridge.is(i,System.Uri)?!1:this.absoluteUri===i.absoluteUri}})},!0),Bridge.define("Bridge.GeneratorEnumerable",{inherits:[System.Collections.IEnumerable],config:{alias:["GetEnumerator","System$Collections$IEnumerable$GetEnumerator"]},ctor:function(e){this.$initialize(),this.GetEnumerator=e,this.System$Collections$IEnumerable$GetEnumerator=e}}),Bridge.define("Bridge.GeneratorEnumerable$1",function(e){return{inherits:[System.Collections.Generic.IEnumerable$1(e)],config:{alias:["GetEnumerator",["System$Collections$Generic$IEnumerable$1$"+Bridge.getTypeAlias(e)+"$GetEnumerator","System$Collections$Generic$IEnumerable$1$GetEnumerator"]]},ctor:function(t){this.$initialize(),this.GetEnumerator=t,this["System$Collections$Generic$IEnumerable$1$"+Bridge.getTypeAlias(e)+"$GetEnumerator"]=t,this.System$Collections$Generic$IEnumerable$1$GetEnumerator=t}}}),Bridge.define("Bridge.GeneratorEnumerator",{inherits:[System.Collections.IEnumerator],current:null,config:{properties:{Current:{get:function(){return this.getCurrent()}}},alias:["getCurrent","System$Collections$IEnumerator$getCurrent","moveNext","System$Collections$IEnumerator$moveNext","reset","System$Collections$IEnumerator$reset","Current","System$Collections$IEnumerator$Current"]},ctor:function(e){this.$initialize(),this.moveNext=e,this.System$Collections$IEnumerator$moveNext=e},getCurrent:function(){return this.current},getCurrent$1:function(){return this.current},reset:function(){throw new System.NotSupportedException}}),Bridge.define("Bridge.GeneratorEnumerator$1",function(e){return{inherits:[System.Collections.Generic.IEnumerator$1(e),System.IDisposable],current:null,config:{properties:{Current:{get:function(){return this.getCurrent()}},Current$1:{get:function(){return this.getCurrent()}}},alias:["getCurrent",["System$Collections$Generic$IEnumerator$1$"+Bridge.getTypeAlias(e)+"$getCurrent$1","System$Collections$Generic$IEnumerator$1$getCurrent$1"],"Current",["System$Collections$Generic$IEnumerator$1$"+Bridge.getTypeAlias(e)+"$Current$1","System$Collections$Generic$IEnumerator$1$Current$1"],"Current","System$Collections$IEnumerator$Current","Dispose","System$IDisposable$Dispose","moveNext","System$Collections$IEnumerator$moveNext","reset","System$Collections$IEnumerator$reset"]},ctor:function(t,i){this.$initialize(),this.moveNext=t,this.System$Collections$IEnumerator$moveNext=t,this.final=i},getCurrent:function(){return this.current},getCurrent$1:function(){return this.current},System$Collections$IEnumerator$getCurrent:function(){return this.current},Dispose:function(){this.final&&this.final()},reset:function(){throw new System.NotSupportedException}}}),function(e,t){var i={Identity:function(y){return y},True:function(){return!0},Blank:function(){}},r={Boolean:"boolean",Number:"number",String:"string",Object:"object",Undefined:typeof t,Function:"function"},n={"":i.Identity},s={createLambda:function(y){var m,c,$,x,D,G,q,z,Z,te,oe;if(y==null)return i.Identity;if(typeof y===r.String){if(m=n[y],m!=null)return m;if(y.indexOf("=>")===-1){for(c=new RegExp("[$]+","g"),$=0;(x=c.exec(y))!=null;)D=x[0].length,D>$&&($=D);for(G=[],q=1;q<=$;q++){for(z="",Z=0;Z<q;Z++)z+="$";G.push(z)}return te=Array.prototype.join.call(G,","),m=new Function(te,"return "+y),n[y]=m,m}else return oe=y.match(/^[(\s]*([^()]*?)[)\s]*=>(.*)/),m=new Function(oe[1],"return "+oe[2]),n[y]=m,m}return y},isIEnumerable:function(y){if(typeof Enumerator!==r.Undefined)try{return new Enumerator(y),!0}catch{}return!1},defineProperty:Object.defineProperties!=null?function(y,m,c){Object.defineProperty(y,m,{enumerable:!1,configurable:!0,writable:!0,value:c})}:function(y,m,c){y[m]=c},compare:function(y,m){return y===m?0:y>m?1:-1},Dispose:function(y){y?.Dispose()}},o={Before:0,Running:1,After:2},a=function(y,m,c){var $=new l,x=o.Before;this.getCurrent=$.getCurrent,this.reset=function(){throw new Error("Reset is not supported")},this.moveNext=function(){try{switch(x){case o.Before:x=o.Running,y();case o.Running:return m.apply($)?!0:(this.Dispose(),!1);case o.After:return!1}}catch(D){throw this.Dispose(),D}},this.Dispose=function(){if(x==o.Running)try{c()}finally{x=o.After}},this.System$IDisposable$Dispose=this.Dispose,this.getCurrent$1=this.getCurrent,this.System$Collections$IEnumerator$getCurrent=this.getCurrent,this.System$Collections$IEnumerator$moveNext=this.moveNext,this.System$Collections$IEnumerator$reset=this.reset,Object.defineProperties(this,{Current$1:{get:this.getCurrent,enumerable:!0},Current:{get:this.getCurrent,enumerable:!0},System$Collections$IEnumerator$Current:{get:this.getCurrent,enumerable:!0}})},l,u,d,f,C,E,T,w,k,O,M,P;a.$$inherits=[],Bridge.Class.addExtend(a,[System.IDisposable,System.Collections.IEnumerator]),l=function(){var y=null;this.getCurrent=function(){return y},this.yieldReturn=function(m){return y=m,!0},this.yieldBreak=function(){return!1}},u=function(y){this.GetEnumerator=y},u.$$inherits=[],Bridge.Class.addExtend(u,[System.Collections.IEnumerable]),u.Utils={},u.Utils.createLambda=function(y){return s.createLambda(y)},u.Utils.createEnumerable=function(y){return new u(y)},u.Utils.createEnumerator=function(y,m,c){return new a(y,m,c)},u.Utils.extendTo=function(y){var m=y.prototype,c,$,x;y===Array?(c=w.prototype,s.defineProperty(m,"getSource",function(){return this})):(c=u.prototype,s.defineProperty(m,"GetEnumerator",function(){return u.from(this).GetEnumerator()}));for($ in c)x=c[$],m[$]!=x&&(m[$]==null||($=$+"ByLinq",m[$]!=x))&&x instanceof Function&&s.defineProperty(m,$,x)},u.choice=function(){var y=arguments;return new u(function(){return new a(function(){y=y[0]instanceof Array?y[0]:y[0].GetEnumerator!=null?y[0].ToArray():y},function(){return this.yieldReturn(y[Math.floor(Math.random()*y.length)])},i.Blank)})},u.cycle=function(){var y=arguments;return new u(function(){var m=0;return new a(function(){y=y[0]instanceof Array?y[0]:y[0].GetEnumerator!=null?y[0].ToArray():y},function(){return m>=y.length&&(m=0),this.yieldReturn(y[m++])},i.Blank)})},d=new u(function(){return new a(i.Blank,function(){return!1},i.Blank)}),u.empty=function(){return d},u.from=function(y,m){if(y==null)return null;if(y instanceof u)return y;if(typeof y==r.Number||typeof y==r.Boolean)return u.repeat(y,1);if(typeof y==r.String)return new u(function(){var $=0;return new a(i.Blank,function(){return $<y.length?this.yieldReturn(y.charCodeAt($++)):!1},i.Blank)});var c=Bridge.as(y,System.Collections.IEnumerable);if(c)return new u(function(){var $;return new a(function(){$=Bridge.getEnumerator(c,m)},function(){var x=$.moveNext();return x?this.yieldReturn($.Current):!1},function(){var x=Bridge.as($,System.IDisposable);x&&x.Dispose()})});if(typeof y!=r.Function){if(typeof y.length==r.Number)return new w(y);if(!(y instanceof Object)&&s.isIEnumerable(y))return new u(function(){var $=!0,x;return new a(function(){x=new Enumerator(y)},function(){return $?$=!1:x.moveNext(),x.atEnd()?!1:this.yieldReturn(x.item())},i.Blank)});if(typeof Windows===r.Object&&typeof y.first===r.Function)return new u(function(){var $=!0,x;return new a(function(){x=y.first()},function(){return $?$=!1:x.moveNext(),x.hasCurrent?this.yieldReturn(x.current):this.yieldBreak()},i.Blank)})}return new u(function(){var $=[],x=0;return new a(function(){var D,G;for(D in y)G=y[D],G instanceof Function||!Object.prototype.hasOwnProperty.call(y,D)||$.push({key:D,value:G})},function(){return x<$.length?this.yieldReturn($[x++]):!1},i.Blank)})},u.make=function(y){return u.repeat(y,1)},u.matches=function(y,m,c){return c==null&&(c=""),m instanceof RegExp&&(c+=m.ignoreCase?"i":"",c+=m.multiline?"m":"",m=m.source),c.indexOf("g")===-1&&(c+="g"),new u(function(){var $;return new a(function(){$=new RegExp(m,c)},function(){var x=$.exec(y);return x?this.yieldReturn(x):!1},i.Blank)})},u.range=function(y,m,c){return c==null&&(c=1),new u(function(){var $,x=0;return new a(function(){$=y-c},function(){return x++<m?this.yieldReturn($+=c):this.yieldBreak()},i.Blank)})},u.rangeDown=function(y,m,c){return c==null&&(c=1),new u(function(){var $,x=0;return new a(function(){$=y+c},function(){return x++<m?this.yieldReturn($-=c):this.yieldBreak()},i.Blank)})},u.rangeTo=function(y,m,c){return c==null&&(c=1),y<m?new u(function(){var $;return new a(function(){$=y-c},function(){var x=$+=c;return x<=m?this.yieldReturn(x):this.yieldBreak()},i.Blank)}):new u(function(){var $;return new a(function(){$=y+c},function(){var x=$-=c;return x>=m?this.yieldReturn(x):this.yieldBreak()},i.Blank)})},u.repeat=function(y,m){return m!=null?u.repeat(y).take(m):new u(function(){return new a(i.Blank,function(){return this.yieldReturn(y)},i.Blank)})},u.repeatWithFinalize=function(y,m){return y=s.createLambda(y),m=s.createLambda(m),new u(function(){var c;return new a(function(){c=y()},function(){return this.yieldReturn(c)},function(){c!=null&&(m(c),c=null)})})},u.generate=function(y,m){return m!=null?u.generate(y).take(m):(y=s.createLambda(y),new u(function(){return new a(i.Blank,function(){return this.yieldReturn(y())},i.Blank)}))},u.toInfinity=function(y,m){return y==null&&(y=0),m==null&&(m=1),new u(function(){var c;return new a(function(){c=y-m},function(){return this.yieldReturn(c+=m)},i.Blank)})},u.toNegativeInfinity=function(y,m){return y==null&&(y=0),m==null&&(m=1),new u(function(){var c;return new a(function(){c=y+m},function(){return this.yieldReturn(c-=m)},i.Blank)})},u.unfold=function(y,m){return m=s.createLambda(m),new u(function(){var c=!0,$;return new a(i.Blank,function(){return c?(c=!1,$=y,this.yieldReturn($)):($=m($),this.yieldReturn($))},i.Blank)})},u.defer=function(y){return new u(function(){var m;return new a(function(){m=u.from(y()).GetEnumerator()},function(){return m.moveNext()?this.yieldReturn(m.Current):this.yieldBreak()},function(){s.Dispose(m)})})},u.prototype.traverseBreadthFirst=function(y,m){var c=this;return y=s.createLambda(y),m=s.createLambda(m),new u(function(){var $,x=0,D=[];return new a(function(){$=c.GetEnumerator()},function(){for(;;){if($.moveNext())return D.push($.Current),this.yieldReturn(m($.Current,x));var G=u.from(D).selectMany(function(q){return y(q)});if(G.any())x++,D=[],s.Dispose($),$=G.GetEnumerator();else return!1}},function(){s.Dispose($)})})},u.prototype.traverseDepthFirst=function(y,m){var c=this;return y=s.createLambda(y),m=s.createLambda(m),new u(function(){var $=[],x;return new a(function(){x=c.GetEnumerator()},function(){for(;;){if(x.moveNext()){var D=m(x.Current,$.length);return $.push(x),x=u.from(y(x.Current)).GetEnumerator(),this.yieldReturn(D)}if($.length<=0)return!1;s.Dispose(x),x=$.pop()}},function(){try{s.Dispose(x)}finally{u.from($).forEach(function(D){D.Dispose()})}})})},u.prototype.flatten=function(){var y=this;return new u(function(){var m,c=null;return new a(function(){m=y.GetEnumerator()},function(){for(;;){if(c!=null){if(c.moveNext())return this.yieldReturn(c.Current);c=null}if(m.moveNext())if(m.Current instanceof Array){s.Dispose(c),c=u.from(m.Current).selectMany(i.Identity).flatten().GetEnumerator();continue}else return this.yieldReturn(m.Current);return!1}},function(){try{s.Dispose(m)}finally{s.Dispose(c)}})})},u.prototype.pairwise=function(y){var m=this;return y=s.createLambda(y),new u(function(){var c;return new a(function(){c=m.GetEnumerator(),c.moveNext()},function(){var $=c.Current;return c.moveNext()?this.yieldReturn(y($,c.Current)):!1},function(){s.Dispose(c)})})},u.prototype.scan=function(y,m){var c,$;return m==null?(m=s.createLambda(y),c=!1):(m=s.createLambda(m),c=!0),$=this,new u(function(){var x,D,G=!0;return new a(function(){x=$.GetEnumerator()},function(){if(G){if(G=!1,c)return this.yieldReturn(D=y);if(x.moveNext())return this.yieldReturn(D=x.Current)}return x.moveNext()?this.yieldReturn(D=m(D,x.Current)):!1},function(){s.Dispose(x)})})},u.prototype.select=function(y){if(y=s.createLambda(y),y.length<=1)return new O(this,null,y);var m=this;return new u(function(){var c,$=0;return new a(function(){c=m.GetEnumerator()},function(){return c.moveNext()?this.yieldReturn(y(c.Current,$++)):!1},function(){s.Dispose(c)})})},u.prototype.selectMany=function(y,m){var c=this;return y=s.createLambda(y),m==null&&(m=function($,x){return x}),m=s.createLambda(m),new u(function(){var $,x=t,D=0;return new a(function(){$=c.GetEnumerator()},function(){if(x===t&&!$.moveNext())return!1;do{if(x==null){var G=y($.Current,D++);x=u.from(G).GetEnumerator()}if(x.moveNext())return this.yieldReturn(m($.Current,x.Current));s.Dispose(x),x=null}while($.moveNext());return!1},function(){try{s.Dispose($)}finally{s.Dispose(x)}})})},u.prototype.where=function(y){if(y=s.createLambda(y),y.length<=1)return new k(this,y);var m=this;return new u(function(){var c,$=0;return new a(function(){c=m.GetEnumerator()},function(){for(;c.moveNext();)if(y(c.Current,$++))return this.yieldReturn(c.Current);return!1},function(){s.Dispose(c)})})},u.prototype.choose=function(y){y=s.createLambda(y);var m=this;return new u(function(){var c,$=0;return new a(function(){c=m.GetEnumerator()},function(){for(;c.moveNext();){var x=y(c.Current,$++);if(x!=null)return this.yieldReturn(x)}return this.yieldBreak()},function(){s.Dispose(c)})})},u.prototype.ofType=function(y){var m=this;return new u(function(){var c;return new a(function(){c=Bridge.getEnumerator(m)},function(){for(;c.moveNext();){var $=Bridge.as(c.Current,y);if(Bridge.hasValue($))return this.yieldReturn($)}return!1},function(){s.Dispose(c)})})},u.prototype.zip=function(){var y=arguments,m=s.createLambda(arguments[arguments.length-1]),c=this,$;if(arguments.length==2){if($=arguments[0],$==null)throw new System.ArgumentNullException;return new u(function(){var x,D,G=0;return new a(function(){x=c.GetEnumerator(),D=u.from($).GetEnumerator()},function(){return x.moveNext()&&D.moveNext()?this.yieldReturn(m(x.Current,D.Current,G++)):!1},function(){try{s.Dispose(x)}finally{s.Dispose(D)}})})}else return new u(function(){var x,D=0;return new a(function(){var G=u.make(c).concat(u.from(y).takeExceptLast().select(u.from)).select(function(q){return q.GetEnumerator()}).ToArray();x=u.from(G)},function(){if(x.all(function(q){return q.moveNext()})){var G=x.select(function(q){return q.Current}).ToArray();return G.push(D++),this.yieldReturn(m.apply(null,G))}else return this.yieldBreak()},function(){u.from(x).forEach(s.Dispose)})})},u.prototype.merge=function(){var y=arguments,m=this;return new u(function(){var c,$=-1;return new a(function(){c=u.make(m).concat(u.from(y).select(u.from)).select(function(x){return x.GetEnumerator()}).ToArray()},function(){for(;c.length>0;){$=$>=c.length-1?0:$+1;var x=c[$];if(x.moveNext())return this.yieldReturn(x.Current);x.Dispose(),c.splice($--,1)}return this.yieldBreak()},function(){u.from(c).forEach(s.Dispose)})})},u.prototype.join=function(y,m,c,$,x){if(m=s.createLambda(m),c=s.createLambda(c),$=s.createLambda($),y==null)throw new System.ArgumentNullException;var D=this;return new u(function(){var G,q,z=null,Z=0;return new a(function(){G=D.GetEnumerator(),q=u.from(y).toLookup(c,i.Identity,x)},function(){for(var te,oe;;){if(z!=null){if(te=z[Z++],te!==t)return this.yieldReturn($(G.Current,te));te=null,Z=0}if(G.moveNext())oe=m(G.Current),z=q.get(oe).ToArray();else return!1}},function(){s.Dispose(G)})})},u.prototype.groupJoin=function(y,m,c,$,x){m=s.createLambda(m),c=s.createLambda(c),$=s.createLambda($);var D=this;if(y==null)throw new System.ArgumentNullException;return new u(function(){var G=D.GetEnumerator(),q=null;return new a(function(){G=D.GetEnumerator(),q=u.from(y).toLookup(c,i.Identity,x)},function(){if(G.moveNext()){var z=q.get(m(G.Current));return this.yieldReturn($(G.Current,z))}return!1},function(){s.Dispose(G)})})},u.prototype.all=function(y){y=s.createLambda(y);var m=!0;return this.forEach(function(c){if(!y(c))return m=!1,!1}),m},u.prototype.any=function(y){y=s.createLambda(y);var m=this.GetEnumerator();try{if(arguments.length==0)return m.moveNext();for(;m.moveNext();)if(y(m.Current))return!0;return!1}finally{s.Dispose(m)}},u.prototype.isEmpty=function(){return!this.any()},u.prototype.concat=function(){var y=this,m,c;if(arguments.length==1){if(m=arguments[0],m==null)throw new System.ArgumentNullException;return new u(function(){var $,x;return new a(function(){$=y.GetEnumerator()},function(){if(x==null){if($.moveNext())return this.yieldReturn($.Current);x=u.from(m).GetEnumerator()}return x.moveNext()?this.yieldReturn(x.Current):!1},function(){try{s.Dispose($)}finally{s.Dispose(x)}})})}else return c=arguments,new u(function(){var $;return new a(function(){$=u.make(y).concat(u.from(c).select(u.from)).select(function(x){return x.GetEnumerator()}).ToArray()},function(){for(;$.length>0;){var x=$[0];if(x.moveNext())return this.yieldReturn(x.Current);x.Dispose(),$.splice(0,1)}return this.yieldBreak()},function(){u.from($).forEach(s.Dispose)})})},u.prototype.insert=function(y,m){var c=this;return new u(function(){var $,x,D=0,G=!1;return new a(function(){$=c.GetEnumerator(),x=u.from(m).GetEnumerator()},function(){return D==y&&x.moveNext()?(G=!0,this.yieldReturn(x.Current)):$.moveNext()?(D++,this.yieldReturn($.Current)):!G&&x.moveNext()?this.yieldReturn(x.Current):!1},function(){try{s.Dispose($)}finally{s.Dispose(x)}})})},u.prototype.alternate=function(y){var m=this;return new u(function(){var c,$,x,D;return new a(function(){x=y instanceof Array||y.GetEnumerator!=null?u.from(u.from(y).ToArray()):u.make(y),$=m.GetEnumerator(),$.moveNext()&&(c=$.Current)},function(){for(;;){if(D!=null){if(D.moveNext())return this.yieldReturn(D.Current);D=null}if(c==null&&$.moveNext()){c=$.Current,D=x.GetEnumerator();continue}else if(c!=null){var G=c;return c=null,this.yieldReturn(G)}return this.yieldBreak()}},function(){try{s.Dispose($)}finally{s.Dispose(D)}})})},u.prototype.contains=function(y,m){m=m||System.Collections.Generic.EqualityComparer$1.$default;var c=this.GetEnumerator();try{for(;c.moveNext();)if(m.equals2(c.Current,y))return!0;return!1}finally{s.Dispose(c)}},u.prototype.defaultIfEmpty=function(y){var m=this;return y===t&&(y=null),new u(function(){var c,$=!0;return new a(function(){c=m.GetEnumerator()},function(){return c.moveNext()?($=!1,this.yieldReturn(c.Current)):$?($=!1,this.yieldReturn(y)):!1},function(){s.Dispose(c)})})},u.prototype.distinct=function(y){return this.except(u.empty(),y)},u.prototype.distinctUntilChanged=function(y){y=s.createLambda(y);var m=this;return new u(function(){var c,$,x;return new a(function(){c=m.GetEnumerator()},function(){for(;c.moveNext();){var D=y(c.Current);if(x)return x=!1,$=D,this.yieldReturn(c.Current);if($!==D)return $=D,this.yieldReturn(c.Current)}return this.yieldBreak()},function(){s.Dispose(c)})})},u.prototype.except=function(y,m){var c=this;if(y==null)throw new System.ArgumentNullException;return new u(function(){var $,x,D=!1;return new a(function(){$=c.GetEnumerator(),x=new(System.Collections.Generic.Dictionary$2(System.Object,System.Object)).$ctor3(m),u.from(y).forEach(function(G){G==null?D=!0:x.containsKey(G)||x.add(G)})},function(){for(;$.moveNext();){var G=$.Current;if(G==null){if(!D)return D=!0,this.yieldReturn(G)}else if(!x.containsKey(G))return x.add(G),this.yieldReturn(G)}return!1},function(){s.Dispose($)})})},u.prototype.intersect=function(y,m){var c=this;if(y==null)throw new System.ArgumentNullException;return new u(function(){var $,x,D,G=!1,q=!1;return new a(function(){$=c.GetEnumerator(),x=new(System.Collections.Generic.Dictionary$2(System.Object,System.Object)).$ctor3(m),u.from(y).forEach(function(z){z==null?G=!0:x.containsKey(z)||x.add(z)}),D=new(System.Collections.Generic.Dictionary$2(System.Object,System.Object)).$ctor3(m)},function(){for(;$.moveNext();){var z=$.Current;if(z==null){if(!q&&G)return q=!0,this.yieldReturn(z)}else if(!D.containsKey(z)&&x.containsKey(z))return D.add(z),this.yieldReturn(z)}return!1},function(){s.Dispose($)})})},u.prototype.sequenceEqual=function(y,m){var c,$;if(m=m||System.Collections.Generic.EqualityComparer$1.$default,y==null)throw new System.ArgumentNullException;c=this.GetEnumerator();try{$=u.from(y).GetEnumerator();try{for(;c.moveNext();)if(!$.moveNext()||!m.equals2(c.Current,$.Current))return!1;return!$.moveNext()}finally{s.Dispose($)}}finally{s.Dispose(c)}},u.prototype.union=function(y,m){var c=this;if(y==null)throw new System.ArgumentNullException;return new u(function(){var $,x,D,G=!1;return new a(function(){$=c.GetEnumerator(),D=new(System.Collections.Generic.Dictionary$2(System.Object,System.Object)).$ctor3(m)},function(){var q;if(x===t){for(;$.moveNext();)if(q=$.Current,q==null){if(!G)return G=!0,this.yieldReturn(q)}else if(!D.containsKey(q))return D.add(q),this.yieldReturn(q);x=u.from(y).GetEnumerator()}for(;x.moveNext();)if(q=x.Current,q==null){if(!G)return G=!0,this.yieldReturn(q)}else if(!D.containsKey(q))return D.add(q),this.yieldReturn(q);return!1},function(){try{s.Dispose($)}finally{s.Dispose(x)}})})},u.prototype.orderBy=function(y,m){return new C(this,y,m,!1)},u.prototype.orderByDescending=function(y,m){return new C(this,y,m,!0)},u.prototype.reverse=function(){var y=this;return new u(function(){var m,c;return new a(function(){m=y.ToArray(),c=m.length},function(){return c>0?this.yieldReturn(m[--c]):!1},i.Blank)})},u.prototype.shuffle=function(){var y=this;return new u(function(){var m;return new a(function(){m=y.ToArray()},function(){if(m.length>0){var c=Math.floor(Math.random()*m.length);return this.yieldReturn(m.splice(c,1)[0])}return!1},i.Blank)})},u.prototype.weightedSample=function(y){y=s.createLambda(y);var m=this;return new u(function(){var c,$=0;return new a(function(){c=m.choose(function(x){var D=y(x);return D<=0?null:($+=D,{value:x,bound:$})}).ToArray()},function(){var x;if(c.length>0){for(var D=Math.floor(Math.random()*$)+1,G=-1,q=c.length;q-G>1;)x=Math.floor((G+q)/2),c[x].bound>=D?q=x:G=x;return this.yieldReturn(c[q].value)}return this.yieldBreak()},i.Blank)})},u.prototype.groupBy=function(y,m,c,$){var x=this;return y=s.createLambda(y),m=s.createLambda(m),c!=null&&(c=s.createLambda(c)),new u(function(){var D;return new a(function(){D=x.toLookup(y,m,$).toEnumerable().GetEnumerator()},function(){for(;D.moveNext();)return c==null?this.yieldReturn(D.Current):this.yieldReturn(c(D.Current.key(),D.Current));return!1},function(){s.Dispose(D)})})},u.prototype.partitionBy=function(y,m,c,$){var x=this,D;return y=s.createLambda(y),m=s.createLambda(m),$=$||System.Collections.Generic.EqualityComparer$1.$default,c==null?(D=!1,c=function(G,q){return new P(G,q)}):(D=!0,c=s.createLambda(c)),new u(function(){var G,q,z=[];return new a(function(){G=x.GetEnumerator(),G.moveNext()&&(q=y(G.Current),z.push(m(G.Current)))},function(){for(var Z,te;(Z=G.moveNext())==!0&&$.equals2(q,y(G.Current));)z.push(m(G.Current));return z.length>0?(te=D?c(q,u.from(z)):c(q,z),Z?(q=y(G.Current),z=[m(G.Current)]):z=[],this.yieldReturn(te)):!1},function(){s.Dispose(G)})})},u.prototype.buffer=function(y){var m=this;return new u(function(){var c;return new a(function(){c=m.GetEnumerator()},function(){for(var $=[],x=0;c.moveNext();)if($.push(c.Current),++x>=y)return this.yieldReturn($);return $.length>0?this.yieldReturn($):!1},function(){s.Dispose(c)})})},u.prototype.aggregate=function(y,m,c){return c=s.createLambda(c),c(this.scan(y,m,c).last())},u.prototype.average=function(y,m){!y||m||Bridge.isFunction(y)||(m=y,y=null),y=s.createLambda(y);var c=m||0,$=0;if(this.forEach(function(x){x=y(x),x instanceof System.Decimal||System.Int64.is64Bit(x)?c=x.add(c):c instanceof System.Decimal||System.Int64.is64Bit(c)?c=c.add(x):c+=x,++$}),$===0)throw new System.InvalidOperationException.$ctor1("Sequence contains no elements");return c instanceof System.Decimal||System.Int64.is64Bit(c)?c.div($):c/$},u.prototype.nullableAverage=function(y,m){return this.any(Bridge.isNull)?null:this.average(y,m)},u.prototype.count=function(y){y=y==null?i.True:s.createLambda(y);var m=0;return this.forEach(function(c,$){y(c,$)&&++m}),m},u.prototype.max=function(y){return y==null&&(y=i.Identity),this.select(y).aggregate(function(m,c){return Bridge.compare(m,c,!0)===1?m:c})},u.prototype.nullableMax=function(y){return this.any(Bridge.isNull)?null:this.max(y)},u.prototype.min=function(y){return y==null&&(y=i.Identity),this.select(y).aggregate(function(m,c){return Bridge.compare(m,c,!0)===-1?m:c})},u.prototype.nullableMin=function(y){return this.any(Bridge.isNull)?null:this.min(y)},u.prototype.maxBy=function(y){return y=s.createLambda(y),this.aggregate(function(m,c){return Bridge.compare(y(m),y(c),!0)===1?m:c})},u.prototype.minBy=function(y){return y=s.createLambda(y),this.aggregate(function(m,c){return Bridge.compare(y(m),y(c),!0)===-1?m:c})},u.prototype.sum=function(y,m){!y||m||Bridge.isFunction(y)||(m=y,y=null),y==null&&(y=i.Identity);var c=this.select(y).aggregate(0,function($,x){return $ instanceof System.Decimal||System.Int64.is64Bit($)?$.add(x):x instanceof System.Decimal||System.Int64.is64Bit(x)?x.add($):$+x});return c===0&&m?m:c},u.prototype.nullableSum=function(y,m){return this.any(Bridge.isNull)?null:this.sum(y,m)},u.prototype.elementAt=function(y){var m,c=!1;if(this.forEach(function($,x){if(x==y)return m=$,c=!0,!1}),!c)throw new Error("index is less than 0 or greater than or equal to the number of elements in source.");return m},u.prototype.elementAtOrDefault=function(y,m){m===t&&(m=null);var c,$=!1;return this.forEach(function(x,D){if(D==y)return c=x,$=!0,!1}),$?c:m},u.prototype.first=function(y){if(y!=null)return this.where(y).first();var m,c=!1;if(this.forEach(function($){return m=$,c=!0,!1}),!c)throw new Error("first:No element satisfies the condition.");return m},u.prototype.firstOrDefault=function(y,m){if(m===t&&(m=null),y!=null)return this.where(y).firstOrDefault(null,m);var c,$=!1;return this.forEach(function(x){return c=x,$=!0,!1}),$?c:m},u.prototype.last=function(y){if(y!=null)return this.where(y).last();var m,c=!1;if(this.forEach(function($){c=!0,m=$}),!c)throw new Error("last:No element satisfies the condition.");return m},u.prototype.lastOrDefault=function(y,m){if(m===t&&(m=null),y!=null)return this.where(y).lastOrDefault(null,m);var c,$=!1;return this.forEach(function(x){$=!0,c=x}),$?c:m},u.prototype.single=function(y){if(y!=null)return this.where(y).single();var m,c=!1;if(this.forEach(function($){if(c)throw new Error("single:sequence contains more than one element.");c=!0,m=$}),!c)throw new Error("single:No element satisfies the condition.");return m},u.prototype.singleOrDefault=function(y,m){if(m===t&&(m=null),y!=null)return this.where(y).singleOrDefault(null,m);var c,$=!1;return this.forEach(function(x){if($)throw new Error("single:sequence contains more than one element.");$=!0,c=x}),$?c:m},u.prototype.skip=function(y){var m=this;return new u(function(){var c,$=0;return new a(function(){for(c=m.GetEnumerator();$++<y&&c.moveNext(););},function(){return c.moveNext()?this.yieldReturn(c.Current):!1},function(){s.Dispose(c)})})},u.prototype.skipWhile=function(y){y=s.createLambda(y);var m=this;return new u(function(){var c,$=0,x=!1;return new a(function(){c=m.GetEnumerator()},function(){for(;!x;)if(c.moveNext()){if(!y(c.Current,$++))return x=!0,this.yieldReturn(c.Current);continue}else return!1;return c.moveNext()?this.yieldReturn(c.Current):!1},function(){s.Dispose(c)})})},u.prototype.take=function(y){var m=this;return new u(function(){var c,$=0;return new a(function(){c=m.GetEnumerator()},function(){return $++<y&&c.moveNext()?this.yieldReturn(c.Current):!1},function(){s.Dispose(c)})})},u.prototype.takeWhile=function(y){y=s.createLambda(y);var m=this;return new u(function(){var c,$=0;return new a(function(){c=m.GetEnumerator()},function(){return c.moveNext()&&y(c.Current,$++)?this.yieldReturn(c.Current):!1},function(){s.Dispose(c)})})},u.prototype.takeExceptLast=function(y){y==null&&(y=1);var m=this;return new u(function(){if(y<=0)return m.GetEnumerator();var c,$=[];return new a(function(){c=m.GetEnumerator()},function(){for(;c.moveNext();){if($.length==y)return $.push(c.Current),this.yieldReturn($.shift());$.push(c.Current)}return!1},function(){s.Dispose(c)})})},u.prototype.takeFromLast=function(y){if(y<=0||y==null)return u.empty();var m=this;return new u(function(){var c,$,x=[];return new a(function(){c=m.GetEnumerator()},function(){if($==null){for(;c.moveNext();)x.length==y&&x.shift(),x.push(c.Current);$=u.from(x).GetEnumerator()}return $.moveNext()?this.yieldReturn($.Current):!1},function(){s.Dispose($)})})},u.prototype.indexOf=function(y,m){var c=null;return typeof y===r.Function?this.forEach(function($,x){if(y($,x))return c=x,!1}):(m=m||System.Collections.Generic.EqualityComparer$1.$default,this.forEach(function($,x){if(m.equals2($,y))return c=x,!1})),c!==null?c:-1},u.prototype.lastIndexOf=function(y,m){var c=-1;return typeof y===r.Function?this.forEach(function($,x){y($,x)&&(c=x)}):(m=m||System.Collections.Generic.EqualityComparer$1.$default,this.forEach(function($,x){m.equals2($,y)&&(c=x)})),c},u.prototype.asEnumerable=function(){return u.from(this)},u.prototype.ToArray=function(y){var m=System.Array.init([],y||System.Object);return this.forEach(function(c){m.push(c)}),m},u.prototype.toList=function(y){var m=[];return this.forEach(function(c){m.push(c)}),new(System.Collections.Generic.List$1(y||System.Object)).$ctor1(m)},u.prototype.toLookup=function(y,m,c){y=s.createLambda(y),m=s.createLambda(m);var $=new(System.Collections.Generic.Dictionary$2(System.Object,System.Object)).$ctor3(c),x=[],D;return this.forEach(function(G){var q=y(G),z=m(G),Z={v:null};q==null?(D||(D=[],x.push(q)),D.push(z)):$.tryGetValue(q,Z)?Z.v.push(z):(x.push(q),$.add(q,[z]))}),new M($,x,D)},u.prototype.toObject=function(y,m){y=s.createLambda(y),m=s.createLambda(m);var c={};return this.forEach(function($){c[y($)]=m($)}),c},u.prototype.toDictionary=function(y,m,c,$,x){y=s.createLambda(y),m=s.createLambda(m);var D=new(System.Collections.Generic.Dictionary$2(c,$)).$ctor3(x);return this.forEach(function(G){D.add(y(G),m(G))}),D},u.prototype.toJSONString=function(y,m){if(typeof JSON===r.Undefined||JSON.stringify==null)throw new Error("toJSONString can't find JSON.stringify. This works native JSON support Browser or include json2.js");return JSON.stringify(this.ToArray(),y,m)},u.prototype.toJoinedString=function(y,m){return y==null&&(y=""),m==null&&(m=i.Identity),this.select(m).ToArray().join(y)},u.prototype.doAction=function(y){var m=this;return y=s.createLambda(y),new u(function(){var c,$=0;return new a(function(){c=m.GetEnumerator()},function(){return c.moveNext()?(y(c.Current,$++),this.yieldReturn(c.Current)):!1},function(){s.Dispose(c)})})},u.prototype.forEach=function(y){y=s.createLambda(y);var m=0,c=this.GetEnumerator();try{for(;c.moveNext()&&y(c.Current,m++)!==!1;);}finally{s.Dispose(c)}},u.prototype.write=function(y,m){y==null&&(y=""),m=s.createLambda(m);var c=!0;this.forEach(function($){c?c=!1:document.write(y),document.write(m($))})},u.prototype.writeLine=function(y){y=s.createLambda(y),this.forEach(function(m){document.writeln(y(m)+"<br />")})},u.prototype.force=function(){var y=this.GetEnumerator();try{for(;y.moveNext(););}finally{s.Dispose(y)}},u.prototype.letBind=function(y){y=s.createLambda(y);var m=this;return new u(function(){var c;return new a(function(){c=u.from(y(m)).GetEnumerator()},function(){return c.moveNext()?this.yieldReturn(c.Current):!1},function(){s.Dispose(c)})})},u.prototype.share=function(){var y=this,m,c=!1;return new T(function(){return new a(function(){m==null&&(m=y.GetEnumerator())},function(){if(c)throw new Error("enumerator is disposed");return m.moveNext()?this.yieldReturn(m.Current):!1},i.Blank)},function(){c=!0,s.Dispose(m)})},u.prototype.memoize=function(){var y=this,m,c,$=!1;return new T(function(){var x=-1;return new a(function(){c==null&&(c=y.GetEnumerator(),m=[])},function(){if($)throw new Error("enumerator is disposed");return x++,m.length<=x?c.moveNext()?this.yieldReturn(m[x]=c.Current):!1:this.yieldReturn(m[x])},i.Blank)},function(){$=!0,s.Dispose(c),m=null})},u.prototype.catchError=function(y){y=s.createLambda(y);var m=this;return new u(function(){var c;return new a(function(){c=m.GetEnumerator()},function(){try{return c.moveNext()?this.yieldReturn(c.Current):!1}catch($){return y($),!1}},function(){s.Dispose(c)})})},u.prototype.finallyAction=function(y){y=s.createLambda(y);var m=this;return new u(function(){var c;return new a(function(){c=m.GetEnumerator()},function(){return c.moveNext()?this.yieldReturn(c.Current):!1},function(){try{s.Dispose(c)}finally{y()}})})},u.prototype.log=function(y){return y=s.createLambda(y),this.doAction(function(m){typeof console!==r.Undefined&&console.log(y(m))})},u.prototype.trace=function(y,m){return y==null&&(y="Trace"),m=s.createLambda(m),this.doAction(function(c){typeof console!==r.Undefined&&console.log(y,m(c))})},f={compare:function(y,m){if(Bridge.hasValue(y)){if(!Bridge.hasValue(m))return 1}else return Bridge.hasValue(m)?-1:0;if(typeof y=="string"&&typeof m=="string"){var c=System.String.compare(y,m,!0);if(c!==0)return c}return Bridge.compare(y,m)}},C=function(y,m,c,$,x){this.source=y,this.keySelector=s.createLambda(m),this.comparer=c||f,this.descending=$,this.parent=x},C.prototype=new u,C.prototype.constructor=C,Bridge.definei("System.Linq.IOrderedEnumerable$1"),C.$$inherits=[],Bridge.Class.addExtend(C,[System.Collections.IEnumerable,System.Linq.IOrderedEnumerable$1]),C.prototype.createOrderedEnumerable=function(y,m,c){return new C(this.source,y,m,c,this)},C.prototype.thenBy=function(y,m){return this.createOrderedEnumerable(y,m,!1)},C.prototype.thenByDescending=function(y,m){return this.createOrderedEnumerable(y,m,!0)},C.prototype.GetEnumerator=function(){var y=this,m,c,$=0;return new a(function(){m=[],c=[],y.source.forEach(function(D,G){m.push(D),c.push(G)});var x=E.create(y,null);x.GenerateKeys(m),c.sort(function(D,G){return x.compare(D,G)})},function(){return $<c.length?this.yieldReturn(m[c[$++]]):!1},i.Blank)},E=function(y,m,c,$){this.keySelector=y,this.comparer=m,this.descending=c,this.child=$,this.keys=null},E.create=function(y,m){var c=new E(y.keySelector,y.comparer,y.descending,m);return y.parent!=null?E.create(y.parent,c):c},E.prototype.GenerateKeys=function(y){for(var m=y.length,c=this.keySelector,$=new Array(m),x=0;x<m;x++)$[x]=c(y[x]);this.keys=$,this.child!=null&&this.child.GenerateKeys(y)},E.prototype.compare=function(y,m){var c=this.comparer.compare(this.keys[y],this.keys[m]);return c==0?this.child!=null?this.child.compare(y,m):s.compare(y,m):this.descending?-c:c},T=function(y,m){this.Dispose=m,u.call(this,y)},T.prototype=new u,w=function(y){this.getSource=function(){return y}},w.prototype=new u,w.prototype.any=function(y){return y==null?this.getSource().length>0:u.prototype.any.apply(this,arguments)},w.prototype.count=function(y){return y==null?this.getSource().length:u.prototype.count.apply(this,arguments)},w.prototype.elementAt=function(y){var m=this.getSource();return 0<=y&&y<m.length?m[y]:u.prototype.elementAt.apply(this,arguments)},w.prototype.elementAtOrDefault=function(y,m){m===t&&(m=null);var c=this.getSource();return 0<=y&&y<c.length?c[y]:m},w.prototype.first=function(y){var m=this.getSource();return y==null&&m.length>0?m[0]:u.prototype.first.apply(this,arguments)},w.prototype.firstOrDefault=function(y,m){if(m===t&&(m=null),y!=null)return u.prototype.firstOrDefault.apply(this,arguments);var c=this.getSource();return c.length>0?c[0]:m},w.prototype.last=function(y){var m=this.getSource();return y==null&&m.length>0?m[m.length-1]:u.prototype.last.apply(this,arguments)},w.prototype.lastOrDefault=function(y,m){if(m===t&&(m=null),y!=null)return u.prototype.lastOrDefault.apply(this,arguments);var c=this.getSource();return c.length>0?c[c.length-1]:m},w.prototype.skip=function(y){var m=this.getSource();return new u(function(){var c;return new a(function(){c=y<0?0:y},function(){return c<m.length?this.yieldReturn(m[c++]):!1},i.Blank)})},w.prototype.takeExceptLast=function(y){return y==null&&(y=1),this.take(this.getSource().length-y)},w.prototype.takeFromLast=function(y){return this.skip(this.getSource().length-y)},w.prototype.reverse=function(){var y=this.getSource();return new u(function(){var m;return new a(function(){m=y.length},function(){return m>0?this.yieldReturn(y[--m]):!1},i.Blank)})},w.prototype.sequenceEqual=function(y,m){return(y instanceof w||y instanceof Array)&&m==null&&u.from(y).count()!=this.count()?!1:u.prototype.sequenceEqual.apply(this,arguments)},w.prototype.toJoinedString=function(y,m){var c=this.getSource();return m!=null||!(c instanceof Array)?u.prototype.toJoinedString.apply(this,arguments):(y==null&&(y=""),c.join(y))},w.prototype.GetEnumerator=function(){return new Bridge.ArrayEnumerator(this.getSource())},k=function(y,m){this.prevSource=y,this.prevPredicate=m},k.prototype=new u,k.prototype.where=function(y){if(y=s.createLambda(y),y.length<=1){var m=this.prevPredicate,c=function($){return m($)&&y($)};return new k(this.prevSource,c)}else return u.prototype.where.call(this,y)},k.prototype.select=function(y){return y=s.createLambda(y),y.length<=1?new O(this.prevSource,this.prevPredicate,y):u.prototype.select.call(this,y)},k.prototype.GetEnumerator=function(){var y=this.prevPredicate,m=this.prevSource,c;return new a(function(){c=m.GetEnumerator()},function(){for(;c.moveNext();)if(y(c.Current))return this.yieldReturn(c.Current);return!1},function(){s.Dispose(c)})},O=function(y,m,c){this.prevSource=y,this.prevPredicate=m,this.prevSelector=c},O.prototype=new u,O.prototype.where=function(y){return y=s.createLambda(y),y.length<=1?new k(this,y):u.prototype.where.call(this,y)},O.prototype.select=function(y){if(y=s.createLambda(y),y.length<=1){var m=this.prevSelector,c=function($){return y(m($))};return new O(this.prevSource,this.prevPredicate,c)}else return u.prototype.select.call(this,y)},O.prototype.GetEnumerator=function(){var y=this.prevPredicate,m=this.prevSelector,c=this.prevSource,$;return new a(function(){$=c.GetEnumerator()},function(){for(;$.moveNext();)if(y==null||y($.Current))return this.yieldReturn(m($.Current));return!1},function(){s.Dispose($)})},M=function(y,m,c){this.count=function(){return y.Count},this.get=function($){if($==null)return u.from(c||[]);var x={v:null},D=y.tryGetValue($,x);return u.from(D?x.v:[])},this.contains=function($){return $==null?!!c:y.containsKey($)},this.toEnumerable=function(){return u.from(m).select(function($){return $==null?new P($,c):new P($,y.getItem($))})},this.GetEnumerator=function(){return this.toEnumerable().GetEnumerator()}},Bridge.definei("System.Linq.ILookup$2"),M.$$inherits=[],Bridge.Class.addExtend(M,[System.Collections.IEnumerable,System.Linq.ILookup$2]),P=function(y,m){this.key=function(){return y},w.call(this,m)},P.prototype=new w,Bridge.definei("System.Linq.IGrouping$2"),P.prototype.constructor=P,P.$$inherits=[],Bridge.Class.addExtend(P,[System.Collections.IEnumerable,System.Linq.IGrouping$2]),Bridge.Linq={},Bridge.Linq.Enumerable=u,System.Linq=System.Linq||{},System.Linq.Enumerable=u,System.Linq.Grouping$2=P,System.Linq.Lookup$2=M,System.Linq.OrderedEnumerable$1=C}(Bridge.global),Bridge.define("System.Runtime.Serialization.CollectionDataContractAttribute",{inherits:[System.Attribute],fields:{_name:null,_ns:null,_itemName:null,_keyName:null,_valueName:null,_isReference:!1,_isNameSetExplicitly:!1,_isNamespaceSetExplicitly:!1,_isReferenceSetExplicitly:!1,_isItemNameSetExplicitly:!1,_isKeyNameSetExplicitly:!1,_isValueNameSetExplicitly:!1},props:{Namespace:{get:function(){return this._ns},set:function(e){this._ns=e,this._isNamespaceSetExplicitly=!0}},IsNamespaceSetExplicitly:{get:function(){return this._isNamespaceSetExplicitly}},Name:{get:function(){return this._name},set:function(e){this._name=e,this._isNameSetExplicitly=!0}},IsNameSetExplicitly:{get:function(){return this._isNameSetExplicitly}},ItemName:{get:function(){return this._itemName},set:function(e){this._itemName=e,this._isItemNameSetExplicitly=!0}},IsItemNameSetExplicitly:{get:function(){return this._isItemNameSetExplicitly}},KeyName:{get:function(){return this._keyName},set:function(e){this._keyName=e,this._isKeyNameSetExplicitly=!0}},IsReference:{get:function(){return this._isReference},set:function(e){this._isReference=e,this._isReferenceSetExplicitly=!0}},IsReferenceSetExplicitly:{get:function(){return this._isReferenceSetExplicitly}},IsKeyNameSetExplicitly:{get:function(){return this._isKeyNameSetExplicitly}},ValueName:{get:function(){return this._valueName},set:function(e){this._valueName=e,this._isValueNameSetExplicitly=!0}},IsValueNameSetExplicitly:{get:function(){return this._isValueNameSetExplicitly}}},ctors:{ctor:function(){this.$initialize(),System.Attribute.ctor.call(this)}}}),Bridge.define("System.Runtime.Serialization.ContractNamespaceAttribute",{inherits:[System.Attribute],fields:{_clrNamespace:null,_contractNamespace:null},props:{ClrNamespace:{get:function(){return this._clrNamespace},set:function(e){this._clrNamespace=e}},ContractNamespace:{get:function(){return this._contractNamespace}}},ctors:{ctor:function(e){this.$initialize(),System.Attribute.ctor.call(this),this._contractNamespace=e}}}),Bridge.define("System.Runtime.Serialization.DataContractAttribute",{inherits:[System.Attribute],fields:{_name:null,_ns:null,_isNameSetExplicitly:!1,_isNamespaceSetExplicitly:!1,_isReference:!1,_isReferenceSetExplicitly:!1},props:{IsReference:{get:function(){return this._isReference},set:function(e){this._isReference=e,this._isReferenceSetExplicitly=!0}},IsReferenceSetExplicitly:{get:function(){return this._isReferenceSetExplicitly}},Namespace:{get:function(){return this._ns},set:function(e){this._ns=e,this._isNamespaceSetExplicitly=!0}},IsNamespaceSetExplicitly:{get:function(){return this._isNamespaceSetExplicitly}},Name:{get:function(){return this._name},set:function(e){this._name=e,this._isNameSetExplicitly=!0}},IsNameSetExplicitly:{get:function(){return this._isNameSetExplicitly}}},ctors:{ctor:function(){this.$initialize(),System.Attribute.ctor.call(this)}}}),Bridge.define("System.Runtime.Serialization.DataMemberAttribute",{inherits:[System.Attribute],fields:{_name:null,_isNameSetExplicitly:!1,_order:0,_isRequired:!1,_emitDefaultValue:!1},props:{Name:{get:function(){return this._name},set:function(e){this._name=e,this._isNameSetExplicitly=!0}},IsNameSetExplicitly:{get:function(){return this._isNameSetExplicitly}},Order:{get:function(){return this._order},set:function(e){if(e<0)throw new System.Runtime.Serialization.InvalidDataContractException.$ctor1("Property 'Order' in DataMemberAttribute attribute cannot be a negative number.");this._order=e}},IsRequired:{get:function(){return this._isRequired},set:function(e){this._isRequired=e}},EmitDefaultValue:{get:function(){return this._emitDefaultValue},set:function(e){this._emitDefaultValue=e}}},ctors:{init:function(){this._order=-1,this._emitDefaultValue=!0},ctor:function(){this.$initialize(),System.Attribute.ctor.call(this)}}}),Bridge.define("System.Runtime.Serialization.EnumMemberAttribute",{inherits:[System.Attribute],fields:{_value:null,_isValueSetExplicitly:!1},props:{Value:{get:function(){return this._value},set:function(e){this._value=e,this._isValueSetExplicitly=!0}},IsValueSetExplicitly:{get:function(){return this._isValueSetExplicitly}}},ctors:{ctor:function(){this.$initialize(),System.Attribute.ctor.call(this)}}}),Bridge.define("System.Runtime.Serialization.IDeserializationCallback",{$kind:"interface"}),Bridge.define("System.Runtime.Serialization.IFormatterConverter",{$kind:"interface"}),Bridge.define("System.Runtime.Serialization.IgnoreDataMemberAttribute",{inherits:[System.Attribute],ctors:{ctor:function(){this.$initialize(),System.Attribute.ctor.call(this)}}}),Bridge.define("System.Runtime.Serialization.InvalidDataContractException",{inherits:[System.Exception],ctors:{ctor:function(){this.$initialize(),System.Exception.ctor.call(this)},$ctor1:function(e){this.$initialize(),System.Exception.ctor.call(this,e)},$ctor2:function(e,t){this.$initialize(),System.Exception.ctor.call(this,e,t)}}}),Bridge.define("System.Runtime.Serialization.IObjectReference",{$kind:"interface"}),Bridge.define("System.Runtime.Serialization.ISafeSerializationData",{$kind:"interface"}),Bridge.define("System.Runtime.Serialization.ISerializable",{$kind:"interface"}),Bridge.define("System.Runtime.Serialization.ISerializationSurrogateProvider",{$kind:"interface"}),Bridge.define("System.Runtime.Serialization.KnownTypeAttribute",{inherits:[System.Attribute],fields:{_methodName:null,_type:null},props:{MethodName:{get:function(){return this._methodName}},Type:{get:function(){return this._type}}},ctors:{ctor:function(){this.$initialize(),System.Attribute.ctor.call(this)},$ctor2:function(e){this.$initialize(),System.Attribute.ctor.call(this),this._type=e},$ctor1:function(e){this.$initialize(),System.Attribute.ctor.call(this),this._methodName=e}}}),Bridge.define("System.Runtime.Serialization.SerializationEntry",{$kind:"struct",statics:{methods:{getDefaultValue:function(){return new System.Runtime.Serialization.SerializationEntry}}},fields:{_name:null,_value:null,_type:null},props:{Value:{get:function(){return this._value}},Name:{get:function(){return this._name}},ObjectType:{get:function(){return this._type}}},ctors:{$ctor1:function(e,t,i){this.$initialize(),this._name=e,this._value=t,this._type=i},ctor:function(){this.$initialize()}},methods:{getHashCode:function(){return Bridge.addHash([7645431029,this._name,this._value,this._type])},equals:function(e){return Bridge.is(e,System.Runtime.Serialization.SerializationEntry)?Bridge.equals(this._name,e._name)&&Bridge.equals(this._value,e._value)&&Bridge.equals(this._type,e._type):!1},$clone:function(e){var t=e||new System.Runtime.Serialization.SerializationEntry;return t._name=this._name,t._value=this._value,t._type=this._type,t}}}),Bridge.define("System.Runtime.Serialization.SerializationException",{inherits:[System.SystemException],statics:{fields:{s_nullMessage:null},ctors:{init:function(){this.s_nullMessage="Serialization error."}}},ctors:{ctor:function(){this.$initialize(),System.SystemException.$ctor1.call(this,System.Runtime.Serialization.SerializationException.s_nullMessage),this.HResult=-2146233076},$ctor1:function(e){this.$initialize(),System.SystemException.$ctor1.call(this,e),this.HResult=-2146233076},$ctor2:function(e,t){this.$initialize(),System.SystemException.$ctor2.call(this,e,t),this.HResult=-2146233076}}}),Bridge.define("System.Runtime.Serialization.SerializationInfoEnumerator",{inherits:[System.Collections.IEnumerator],fields:{_members:null,_data:null,_types:null,_numItems:0,_currItem:0,_current:!1},props:{System$Collections$IEnumerator$Current:{get:function(){return this.Current.$clone()}},Current:{get:function(){if(this._current===!1)throw new System.InvalidOperationException.$ctor1("Enumeration has either not started or has already finished.");return new System.Runtime.Serialization.SerializationEntry.$ctor1(this._members[System.Array.index(this._currItem,this._members)],this._data[System.Array.index(this._currItem,this._data)],this._types[System.Array.index(this._currItem,this._types)])}},Name:{get:function(){if(this._current===!1)throw new System.InvalidOperationException.$ctor1("Enumeration has either not started or has already finished.");return this._members[System.Array.index(this._currItem,this._members)]}},Value:{get:function(){if(this._current===!1)throw new System.InvalidOperationException.$ctor1("Enumeration has either not started or has already finished.");return this._data[System.Array.index(this._currItem,this._data)]}},ObjectType:{get:function(){if(this._current===!1)throw new System.InvalidOperationException.$ctor1("Enumeration has either not started or has already finished.");return this._types[System.Array.index(this._currItem,this._types)]}}},alias:["moveNext","System$Collections$IEnumerator$moveNext","reset","System$Collections$IEnumerator$reset"],ctors:{ctor:function(e,t,i,r){this.$initialize(),this._members=e,this._data=t,this._types=i,this._numItems=r-1|0,this._currItem=-1,this._current=!1}},methods:{moveNext:function(){return this._currItem<this._numItems?(this._currItem=this._currItem+1|0,this._current=!0):this._current=!1,this._current},reset:function(){this._currItem=-1,this._current=!1}}}),Bridge.define("System.Runtime.Serialization.StreamingContext",{$kind:"struct",statics:{methods:{getDefaultValue:function(){return new System.Runtime.Serialization.StreamingContext}}},fields:{_additionalContext:null,_state:0},props:{State:{get:function(){return this._state}},Context:{get:function(){return this._additionalContext}}},ctors:{$ctor1:function(e){System.Runtime.Serialization.StreamingContext.$ctor2.call(this,e,null)},$ctor2:function(e,t){this.$initialize(),this._state=e,this._additionalContext=t},ctor:function(){this.$initialize()}},methods:{equals:function(e){if(!Bridge.is(e,System.Runtime.Serialization.StreamingContext))return!1;var t=System.Nullable.getValue(Bridge.cast(Bridge.unbox(e,System.Runtime.Serialization.StreamingContext),System.Runtime.Serialization.StreamingContext));return Bridge.referenceEquals(t._additionalContext,this._additionalContext)&&t._state===this._state},getHashCode:function(){return this._state},$clone:function(e){var t=e||new System.Runtime.Serialization.StreamingContext;return t._additionalContext=this._additionalContext,t._state=this._state,t}}}),Bridge.define("System.Runtime.Serialization.StreamingContextStates",{$kind:"enum",statics:{fields:{CrossProcess:1,CrossMachine:2,File:4,Persistence:8,Remoting:16,Other:32,Clone:64,CrossAppDomain:128,All:255}},$flags:!0}),Bridge.define("System.Runtime.Serialization.OnSerializingAttribute",{inherits:[System.Attribute]}),Bridge.define("System.Runtime.Serialization.OnSerializedAttribute",{inherits:[System.Attribute]}),Bridge.define("System.Runtime.Serialization.OnDeserializingAttribute",{inherits:[System.Attribute]}),Bridge.define("System.Runtime.Serialization.OnDeserializedAttribute",{inherits:[System.Attribute]}),Bridge.define("System.Security.SecurityException",{inherits:[System.SystemException],statics:{fields:{DemandedName:null,GrantedSetName:null,RefusedSetName:null,DeniedName:null,PermitOnlyName:null,UrlName:null},ctors:{init:function(){this.DemandedName="Demanded",this.GrantedSetName="GrantedSet",this.RefusedSetName="RefusedSet",this.DeniedName="Denied",this.PermitOnlyName="PermitOnly",this.UrlName="Url"}}},props:{Demanded:null,DenySetInstance:null,GrantedSet:null,Method:null,PermissionState:null,PermissionType:null,PermitOnlySetInstance:null,RefusedSet:null,Url:null},ctors:{ctor:function(){this.$initialize(),System.SystemException.$ctor1.call(this,"Security error."),this.HResult=-2146233078},$ctor1:function(e){this.$initialize(),System.SystemException.$ctor1.call(this,e),this.HResult=-2146233078},$ctor2:function(e,t){this.$initialize(),System.SystemException.$ctor2.call(this,e,t),this.HResult=-2146233078},$ctor3:function(e,t){this.$initialize(),System.SystemException.$ctor1.call(this,e),this.HResult=-2146233078,this.PermissionType=t},$ctor4:function(e,t,i){this.$initialize(),System.SystemException.$ctor1.call(this,e),this.HResult=-2146233078,this.PermissionType=t,this.PermissionState=i}},methods:{toString:function(){return Bridge.toString(this)}}}),Bridge.define("System.UnauthorizedAccessException",{inherits:[System.SystemException],ctors:{ctor:function(){this.$initialize(),System.SystemException.$ctor1.call(this,"Attempted to perform an unauthorized operation."),this.HResult=-2147024891},$ctor1:function(e){this.$initialize(),System.SystemException.$ctor1.call(this,e),this.HResult=-2147024891},$ctor2:function(e,t){this.$initialize(),System.SystemException.$ctor2.call(this,e,t),this.HResult=-2147024891}}}),Bridge.define("System.UnhandledExceptionEventArgs",{fields:{_exception:null,_isTerminating:!1},props:{ExceptionObject:{get:function(){return this._exception}},IsTerminating:{get:function(){return this._isTerminating}}},ctors:{ctor:function(e,t){this.$initialize(),System.Object.call(this),this._exception=e,this._isTerminating=t}}}),Bridge.define("System.Text.RegularExpressions.Regex",{statics:{_cacheSize:15,_defaultMatchTimeout:System.TimeSpan.fromMilliseconds(-1),getCacheSize:function(){return System.Text.RegularExpressions.Regex._cacheSize},setCacheSize:function(e){if(e<0)throw new System.ArgumentOutOfRangeException.$ctor1("value");System.Text.RegularExpressions.Regex._cacheSize=e},escape:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("str");return System.Text.RegularExpressions.RegexParser.escape(e)},unescape:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("str");return System.Text.RegularExpressions.RegexParser.unescape(e)},isMatch:function(e,t,i,r){var n=System.Text.RegularExpressions,s;return Bridge.isDefined(i)||(i=n.RegexOptions.None),Bridge.isDefined(r)||(r=n.Regex._defaultMatchTimeout),s=new System.Text.RegularExpressions.Regex.ctor(t,i,r,!0),s.isMatch(e)},match:function(e,t,i,r){var n=System.Text.RegularExpressions,s;return Bridge.isDefined(i)||(i=n.RegexOptions.None),Bridge.isDefined(r)||(r=n.Regex._defaultMatchTimeout),s=new System.Text.RegularExpressions.Regex.ctor(t,i,r,!0),s.match(e)},matches:function(e,t,i,r){var n=System.Text.RegularExpressions,s;return Bridge.isDefined(i)||(i=n.RegexOptions.None),Bridge.isDefined(r)||(r=n.Regex._defaultMatchTimeout),s=new System.Text.RegularExpressions.Regex.ctor(t,i,r,!0),s.matches(e)},replace:function(e,t,i,r,n){var s=System.Text.RegularExpressions,o;return Bridge.isDefined(r)||(r=s.RegexOptions.None),Bridge.isDefined(n)||(n=s.Regex._defaultMatchTimeout),o=new System.Text.RegularExpressions.Regex.ctor(t,r,n,!0),o.replace(e,i)},split:function(e,t,i,r){var n=System.Text.RegularExpressions,s;return Bridge.isDefined(i)||(i=n.RegexOptions.None),Bridge.isDefined(r)||(r=n.Regex._defaultMatchTimeout),s=new System.Text.RegularExpressions.Regex.ctor(t,i,r,!0),s.split(e)}},_pattern:"",_matchTimeout:System.TimeSpan.fromMilliseconds(-1),_runner:null,_caps:null,_capsize:0,_capnames:null,_capslist:null,config:{init:function(){this._options=System.Text.RegularExpressions.RegexOptions.None}},ctor:function(e,t,i,r){var n,s,o;if(this.$initialize(),Bridge.isDefined(t)||(t=System.Text.RegularExpressions.RegexOptions.None),Bridge.isDefined(i)||(i=System.TimeSpan.fromMilliseconds(-1)),Bridge.isDefined(r)||(r=!1),n=System.Text.RegularExpressions,e==null)throw new System.ArgumentNullException.$ctor1("pattern");if(t<n.RegexOptions.None||t>>10)throw new System.ArgumentOutOfRangeException.$ctor1("options");if(t&n.RegexOptions.ECMAScript&&t&~(n.RegexOptions.ECMAScript|n.RegexOptions.IgnoreCase|n.RegexOptions.Multiline|n.RegexOptions.CultureInvariant))throw new System.ArgumentOutOfRangeException.$ctor1("options");if(s=System.Text.RegularExpressions.RegexOptions.IgnoreCase|System.Text.RegularExpressions.RegexOptions.Multiline|System.Text.RegularExpressions.RegexOptions.Singleline|System.Text.RegularExpressions.RegexOptions.IgnorePatternWhitespace|System.Text.RegularExpressions.RegexOptions.ExplicitCapture,(t|s)!==s)throw new System.NotSupportedException.$ctor1("Specified Regex options are not supported.");this._validateMatchTimeout(i),this._pattern=e,this._options=t,this._matchTimeout=i,this._runner=new n.RegexRunner(this),o=this._runner.parsePattern(),this._capnames=o.sparseSettings.sparseSlotNameMap,this._capslist=o.sparseSettings.sparseSlotNameMap.keys,this._capsize=this._capslist.length},getMatchTimeout:function(){return this._matchTimeout},getOptions:function(){return this._options},getRightToLeft:function(){return(this._options&System.Text.RegularExpressions.RegexOptions.RightToLeft)!=0},isMatch:function(e,t){if(e==null)throw new System.ArgumentNullException.$ctor1("input");Bridge.isDefined(t)||(t=this.getRightToLeft()?e.length:0);var i=this._runner.run(!0,-1,e,0,e.length,t);return i==null},match:function(e,t,i){if(e==null)throw new System.ArgumentNullException.$ctor1("input");var r=e.length,n=0;return arguments.length===3?(n=t,r=i,t=this.getRightToLeft()?n+r:n):Bridge.isDefined(t)||(t=this.getRightToLeft()?r:0),this._runner.run(!1,-1,e,n,r,t)},matches:function(e,t){if(e==null)throw new System.ArgumentNullException.$ctor1("input");return Bridge.isDefined(t)||(t=this.getRightToLeft()?e.length:0),new System.Text.RegularExpressions.MatchCollection(this,e,0,e.length,t)},getGroupNames:function(){if(this._capslist==null){for(var e=System.Globalization.CultureInfo.invariantCulture,t=[],i=this._capsize,r=0;r<i;r++)t[r]=System.Convert.toString(r,e,System.Convert.typeCodes.Int32);return t}else return this._capslist.slice()},getGroupNumbers:function(){var e=this._caps,t,i,r,n;if(e==null)for(t=[],r=this._capsize,n=0;n<r;n++)t.push(n);else{t=[];for(i in e)e.hasOwnProperty(i)&&(t[e[i]]=i)}return t},groupNameFromNumber:function(e){var t,i;return this._capslist==null?e>=0&&e<this._capsize?(t=System.Globalization.CultureInfo.invariantCulture,System.Convert.toString(e,t,System.Convert.typeCodes.Int32)):"":this._caps!=null?(i=this._caps[e],i==null?"":parseInt(i)):e>=0&&e<this._capslist.length?this._capslist[e]:""},groupNumberFromName:function(e){var t,i,r,n;if(e==null)throw new System.ArgumentNullException.$ctor1("name");if(this._capnames!=null)return t=this._capnames[e],t==null?-1:parseInt(t);for(i=0,n=0;n<e.Length;n++){if(r=e[n],r>"9"||r<"0")return-1;i*=10,i+=r-"0"}return i>=0&&i<this._capsize?i:-1},replace:function(e,t,i,r){if(e==null)throw new System.ArgumentNullException.$ctor1("input");if(Bridge.isDefined(i)||(i=-1),Bridge.isDefined(r)||(r=this.getRightToLeft()?e.length:0),t==null)throw new System.ArgumentNullException.$ctor1("evaluator");if(Bridge.isFunction(t))return System.Text.RegularExpressions.RegexReplacement.replace(t,this,e,i,r);var n=System.Text.RegularExpressions.RegexParser.parseReplacement(t,this._caps,this._capsize,this._capnames,this._options);return n.replace(this,e,i,r)},split:function(e,t,i){if(e==null)throw new System.ArgumentNullException.$ctor1("input");return Bridge.isDefined(t)||(t=0),Bridge.isDefined(i)||(i=this.getRightToLeft()?e.length:0),System.Text.RegularExpressions.RegexReplacement.split(this,e,t,i)},_validateMatchTimeout:function(e){var t=e.getTotalMilliseconds();if(t!==-1&&(!(t>0)||!(t<=2147483646)))throw new System.ArgumentOutOfRangeException.$ctor1("matchTimeout")}}),Bridge.define("System.Text.RegularExpressions.Capture",{_text:"",_index:0,_length:0,ctor:function(e,t,i){this.$initialize(),this._text=e,this._index=t,this._length=i},getIndex:function(){return this._index},getLength:function(){return this._length},getValue:function(){return this._text.substr(this._index,this._length)},toString:function(){return this.getValue()},_getOriginalString:function(){return this._text},_getLeftSubstring:function(){return this._text.slice(0,_index)},_getRightSubstring:function(){return this._text.slice(this._index+this._length,this._text.length)}}),Bridge.define("System.Text.RegularExpressions.CaptureCollection",{inherits:function(){return[System.Collections.ICollection]},config:{properties:{Count:{get:function(){return this._capcount}}},alias:["GetEnumerator","System$Collections$IEnumerable$GetEnumerator","getCount","System$Collections$ICollection$getCount","Count","System$Collections$ICollection$Count","copyTo","System$Collections$ICollection$copyTo"]},_group:null,_capcount:0,_captures:null,ctor:function(e){this.$initialize(),this._group=e,this._capcount=e._capcount},getSyncRoot:function(){return this._group},getIsSynchronized:function(){return!1},getIsReadOnly:function(){return!0},getCount:function(){return this._capcount},get:function(e){if(e===this._capcount-1&&e>=0)return this._group;if(e>=this._capcount||e<0)throw new System.ArgumentOutOfRangeException.$ctor1("i");return this._ensureCapturesInited(),this._captures[e]},copyTo:function(e,t){if(e==null)throw new System.ArgumentNullException.$ctor1("array");if(e.length<t+this._capcount)throw new System.IndexOutOfRangeException;for(var i,r=t,n=0;n<this._capcount;r++,n++)i=this.get(n),System.Array.set(e,i,[r])},GetEnumerator:function(){return new System.Text.RegularExpressions.CaptureEnumerator(this)},_ensureCapturesInited:function(){var e,t,i,r;if(this._captures==null){for(e=[],e.length=this._capcount,t=0;t<this._capcount-1;t++)i=this._group._caps[t*2],r=this._group._caps[t*2+1],e[t]=new System.Text.RegularExpressions.Capture(this._group._text,i,r);this._capcount>0&&(e[this._capcount-1]=this._group),this._captures=e}}}),Bridge.define("System.Text.RegularExpressions.CaptureEnumerator",{inherits:function(){return[System.Collections.IEnumerator]},config:{properties:{Current:{get:function(){return this.getCurrent()}}},alias:["getCurrent","System$Collections$IEnumerator$getCurrent","moveNext","System$Collections$IEnumerator$moveNext","reset","System$Collections$IEnumerator$reset","Current","System$Collections$IEnumerator$Current"]},_captureColl:null,_curindex:0,ctor:function(e){this.$initialize(),this._curindex=-1,this._captureColl=e},moveNext:function(){var e=this._captureColl.getCount();return this._curindex>=e?!1:(this._curindex++,this._curindex<e)},getCurrent:function(){return this.getCapture()},getCapture:function(){if(this._curindex<0||this._curindex>=this._captureColl.getCount())throw new System.InvalidOperationException.$ctor1("Enumeration has either not started or has already finished.");return this._captureColl.get(this._curindex)},reset:function(){this._curindex=-1}}),Bridge.define("System.Text.RegularExpressions.Group",{inherits:function(){return[System.Text.RegularExpressions.Capture]},statics:{config:{init:function(){var e=new System.Text.RegularExpressions.Group("",[],0);this.getEmpty=function(){return e}}},synchronized:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("group");var t=e.getCaptures();return t.getCount()>0&&t.get(0),e}},_caps:null,_capcount:0,_capColl:null,ctor:function(e,t,i){this.$initialize();var r=System.Text.RegularExpressions,n=i===0?0:t[(i-1)*2],s=i===0?0:t[i*2-1];r.Capture.ctor.call(this,e,n,s),this._caps=t,this._capcount=i},getSuccess:function(){return this._capcount!==0},getCaptures:function(){return this._capColl==null&&(this._capColl=new System.Text.RegularExpressions.CaptureCollection(this)),this._capColl}}),Bridge.define("System.Text.RegularExpressions.GroupCollection",{inherits:function(){return[System.Collections.ICollection]},config:{properties:{Count:{get:function(){return this._match._matchcount.length}}},alias:["GetEnumerator","System$Collections$IEnumerable$GetEnumerator","getCount","System$Collections$ICollection$getCount","Count","System$Collections$ICollection$Count","copyTo","System$Collections$ICollection$copyTo"]},_match:null,_captureMap:null,_groups:null,ctor:function(e,t){this.$initialize(),this._match=e,this._captureMap=t},getSyncRoot:function(){return this._match},getIsSynchronized:function(){return!1},getIsReadOnly:function(){return!0},getCount:function(){return this._match._matchcount.length},get:function(e){return this._getGroup(e)},getByName:function(e){if(this._match._regex==null)return System.Text.RegularExpressions.Group.getEmpty();var t=this._match._regex.groupNumberFromName(e);return this._getGroup(t)},copyTo:function(e,t){var i,r,n,s;if(e==null)throw new System.ArgumentNullException.$ctor1("array");if(i=this.getCount(),e.length<t+i)throw new System.IndexOutOfRangeException;for(n=t,s=0;s<i;n++,s++)r=this._getGroup(s),System.Array.set(e,r,[n])},GetEnumerator:function(){return new System.Text.RegularExpressions.GroupEnumerator(this)},_getGroup:function(e){var t,i;return this._captureMap!=null?(i=this._captureMap[e],t=i==null?System.Text.RegularExpressions.Group.getEmpty():this._getGroupImpl(i)):t=e>=this._match._matchcount.length||e<0?System.Text.RegularExpressions.Group.getEmpty():this._getGroupImpl(e),t},_getGroupImpl:function(e){return e===0?this._match:(this._ensureGroupsInited(),this._groups[e])},_ensureGroupsInited:function(){var e,t,i,r,n;if(this._groups==null){for(e=[],e.length=this._match._matchcount.length,e.length>0&&(e[0]=this._match),n=0;n<e.length-1;n++)t=this._match._text,i=this._match._matches[n+1],r=this._match._matchcount[n+1],e[n+1]=new System.Text.RegularExpressions.Group(t,i,r);this._groups=e}}}),Bridge.define("System.Text.RegularExpressions.GroupEnumerator",{inherits:function(){return[System.Collections.IEnumerator]},config:{properties:{Current:{get:function(){return this.getCurrent()}}},alias:["getCurrent","System$Collections$IEnumerator$getCurrent","moveNext","System$Collections$IEnumerator$moveNext","reset","System$Collections$IEnumerator$reset","Current","System$Collections$IEnumerator$Current"]},_groupColl:null,_curindex:0,ctor:function(e){this.$initialize(),this._curindex=-1,this._groupColl=e},moveNext:function(){var e=this._groupColl.getCount();return this._curindex>=e?!1:(this._curindex++,this._curindex<e)},getCurrent:function(){return this.getCapture()},getCapture:function(){if(this._curindex<0||this._curindex>=this._groupColl.getCount())throw new System.InvalidOperationException.$ctor1("Enumeration has either not started or has already finished.");return this._groupColl.get(this._curindex)},reset:function(){this._curindex=-1}}),Bridge.define("System.Text.RegularExpressions.Match",{inherits:function(){return[System.Text.RegularExpressions.Group]},statics:{config:{init:function(){var e=new System.Text.RegularExpressions.Match(null,1,"",0,0,0);this.getEmpty=function(){return e}}},synchronized:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("match");for(var t=e.getGroups(),i=t.getCount(),r,n=0;n<i;n++)r=t.get(n),System.Text.RegularExpressions.Group.synchronized(r);return e}},_regex:null,_matchcount:null,_matches:null,_textbeg:0,_textend:0,_textstart:0,_groupColl:null,_textpos:0,ctor:function(e,t,i,r,n,s){var o,a,l;for(this.$initialize(),o=System.Text.RegularExpressions,a=[0,0],o.Group.ctor.call(this,i,a,0),this._regex=e,this._matchcount=[],this._matchcount.length=t,l=0;l<t;l++)this._matchcount[l]=0;this._matches=[],this._matches.length=t,this._matches[0]=a,this._textbeg=r,this._textend=r+n,this._textstart=s},getGroups:function(){return this._groupColl==null&&(this._groupColl=new System.Text.RegularExpressions.GroupCollection(this,null)),this._groupColl},nextMatch:function(){return this._regex==null?this:this._regex._runner.run(!1,this._length,this._text,this._textbeg,this._textend-this._textbeg,this._textpos)},result:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("replacement");if(this._regex==null)throw new System.NotSupportedException.$ctor1("Result cannot be called on a failed Match.");var t=System.Text.RegularExpressions.RegexParser.parseReplacement(e,this._regex._caps,this._regex._capsize,this._regex._capnames,this._regex._options);return t.replacement(this)},_isMatched:function(e){return e<this._matchcount.length&&this._matchcount[e]>0&&this._matches[e][this._matchcount[e]*2-1]!==-2},_addMatch:function(e,t,i){var r,n,s,o;if(this._matches[e]==null&&(this._matches[e]=new Array(2)),r=this._matchcount[e],r*2+2>this._matches[e].length){for(n=this._matches[e],s=new Array(r*8),o=0;o<r*2;o++)s[o]=n[o];this._matches[e]=s}this._matches[e][r*2]=t,this._matches[e][r*2+1]=i,this._matchcount[e]=r+1},_tidy:function(e){var t=this._matches[0];this._index=t[0],this._length=t[1],this._textpos=e,this._capcount=this._matchcount[0]},_groupToStringImpl:function(e){var t=this._matchcount[e];if(t===0)return"";var i=this._matches[e],r=i[(t-1)*2],n=i[t*2-1];return this._text.slice(r,r+n)},_lastGroupToStringImpl:function(){return this._groupToStringImpl(this._matchcount.length-1)}}),Bridge.define("System.Text.RegularExpressions.MatchSparse",{inherits:function(){return[System.Text.RegularExpressions.Match]},_caps:null,ctor:function(e,t,i,r,n,s,o){this.$initialize();var a=System.Text.RegularExpressions;a.Match.ctor.call(this,e,i,r,n,s,o),this._caps=t},getGroups:function(){return this._groupColl==null&&(this._groupColl=new System.Text.RegularExpressions.GroupCollection(this,this._caps)),this._groupColl}}),Bridge.define("System.Text.RegularExpressions.MatchCollection",{inherits:function(){return[System.Collections.ICollection]},config:{properties:{Count:{get:function(){return this.getCount()}}},alias:["GetEnumerator","System$Collections$IEnumerable$GetEnumerator","getCount","System$Collections$ICollection$getCount","Count","System$Collections$ICollection$Count","copyTo","System$Collections$ICollection$copyTo"]},_regex:null,_input:null,_beginning:0,_length:0,_startat:0,_prevlen:0,_matches:null,_done:!1,ctor:function(e,t,i,r,n){if(this.$initialize(),n<0||n>t.Length)throw new System.ArgumentOutOfRangeException.$ctor1("startat");this._regex=e,this._input=t,this._beginning=i,this._length=r,this._startat=n,this._prevlen=-1,this._matches=[]},getCount:function(){return this._done||this._getMatch(2147483647),this._matches.length},getSyncRoot:function(){return this},getIsSynchronized:function(){return!1},getIsReadOnly:function(){return!0},get:function(e){var t=this._getMatch(e);if(t==null)throw new System.ArgumentOutOfRangeException.$ctor1("i");return t},copyTo:function(e,t){var i,r,n,s;if(e==null)throw new System.ArgumentNullException.$ctor1("array");if(i=this.getCount(),e.length<t+i)throw new System.IndexOutOfRangeException;for(n=t,s=0;s<i;n++,s++)r=this._getMatch(s),System.Array.set(e,r,[n])},GetEnumerator:function(){return new System.Text.RegularExpressions.MatchEnumerator(this)},_getMatch:function(e){if(e<0)return null;if(this._matches.length>e)return this._matches[e];if(this._done)return null;var t;do{if(t=this._regex._runner.run(!1,this._prevLen,this._input,this._beginning,this._length,this._startat),!t.getSuccess())return this._done=!0,null;this._matches.push(t),this._prevLen=t._length,this._startat=t._textpos}while(this._matches.length<=e);return t}}),Bridge.define("System.Text.RegularExpressions.MatchEnumerator",{inherits:function(){return[System.Collections.IEnumerator]},config:{properties:{Current:{get:function(){return this.getCurrent()}}},alias:["getCurrent","System$Collections$IEnumerator$getCurrent","moveNext","System$Collections$IEnumerator$moveNext","reset","System$Collections$IEnumerator$reset","Current","System$Collections$IEnumerator$Current"]},_matchcoll:null,_match:null,_curindex:0,_done:!1,ctor:function(e){this.$initialize(),this._matchcoll=e},moveNext:function(){return this._done?!1:(this._match=this._matchcoll._getMatch(this._curindex),this._curindex++,this._match==null?(this._done=!0,!1):!0)},getCurrent:function(){if(this._match==null)throw new System.InvalidOperationException.$ctor1("Enumeration has either not started or has already finished.");return this._match},reset:function(){this._curindex=0,this._done=!1,this._match=null}}),Bridge.define("System.Text.RegularExpressions.RegexOptions",{statics:{None:0,IgnoreCase:1,Multiline:2,ExplicitCapture:4,Compiled:8,Singleline:16,IgnorePatternWhitespace:32,RightToLeft:64,ECMAScript:256,CultureInvariant:512},$kind:"enum",$flags:!0}),Bridge.define("System.Text.RegularExpressions.RegexRunner",{statics:{},_runregex:null,_netEngine:null,_runtext:"",_runtextpos:0,_runtextbeg:0,_runtextend:0,_runtextstart:0,_quick:!1,_prevlen:0,ctor:function(e){if(this.$initialize(),e==null)throw new System.ArgumentNullException.$ctor1("regex");this._runregex=e;var t=e.getOptions(),i=System.Text.RegularExpressions.RegexOptions,r=(t&i.IgnoreCase)===i.IgnoreCase,n=(t&i.Multiline)===i.Multiline,s=(t&i.Singleline)===i.Singleline,o=(t&i.IgnorePatternWhitespace)===i.IgnorePatternWhitespace,a=(t&i.ExplicitCapture)===i.ExplicitCapture,l=e._matchTimeout.getTotalMilliseconds();this._netEngine=new System.Text.RegularExpressions.RegexEngine(e._pattern,r,n,s,o,a,l)},run:function(e,t,i,r,n,s){var o,a,l,u;if(s<0||s>i.Length)throw new System.ArgumentOutOfRangeException.$ctor4("start","Start index cannot be less than 0 or greater than input length.");if(n<0||n>i.Length)throw new ArgumentOutOfRangeException("length","Length cannot be less than 0 or exceed input length.");if(this._runtext=i,this._runtextbeg=r,this._runtextend=r+n,this._runtextstart=s,this._quick=e,this._prevlen=t,this._runregex.getRightToLeft()?(o=this._runtextbeg,a=-1):(o=this._runtextend,a=1),this._prevlen===0){if(this._runtextstart===o)return System.Text.RegularExpressions.Match.getEmpty();this._runtextstart+=a}return l=this._netEngine.match(this._runtext,this._runtextstart),u=this._convertNetEngineResults(l),u},parsePattern:function(){return this._netEngine.parsePattern()},_convertNetEngineResults:function(e){var t,i,r,n,s,o,a,l;if(e.success&&this._quick)return null;if(!e.success)return System.Text.RegularExpressions.Match.getEmpty();for(t=this.parsePattern(),i=t.sparseSettings.isSparse?new System.Text.RegularExpressions.MatchSparse(this._runregex,t.sparseSettings.sparseSlotMap,e.groups.length,this._runtext,0,this._runtext.length,this._runtextstart):new System.Text.RegularExpressions.Match(this._runregex,e.groups.length,this._runtext,0,this._runtext.length,this._runtextstart),o=0;o<e.groups.length;o++)for(r=e.groups[o],s=0,r.descriptor!=null&&(s=this._runregex.groupNumberFromName(r.descriptor.name)),a=0;a<r.captures.length;a++)n=r.captures[a],i._addMatch(s,n.capIndex,n.capLength);return l=e.capIndex+e.capLength,i._tidy(l),i}}),Bridge.define("System.Text.RegularExpressions.RegexParser",{statics:{_Q:5,_S:4,_Z:3,_X:2,_E:1,_category:[0,0,0,0,0,0,0,0,0,2,2,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,3,4,0,0,0,4,4,5,5,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,4,0,0,0],escape:function(e){for(var t,i,r,n=0;n<e.length;n++)if(System.Text.RegularExpressions.RegexParser._isMetachar(e[n])){t="",i=e[n],t+=e.slice(0,n);do{switch(t+="\\",i){case` `:i="n";break;case"\r":i="r";break;case" ":i="t";break;case"\f":i="f";break}for(t+=i,n++,r=n;n<e.length&&(i=e[n],!System.Text.RegularExpressions.RegexParser._isMetachar(i));)n++;t+=e.slice(r,n)}while(n<e.length);return t}return e},unescape:function(e){for(var t=System.Globalization.CultureInfo.invariantCulture,i,r,n,s=0;s<e.length;s++)if(e[s]==="\\"){i="",n=new System.Text.RegularExpressions.RegexParser(t),n._setPattern(e),i+=e.slice(0,s);do{for(s++,n._textto(s),s<e.length&&(i+=n._scanCharEscape()),s=n._textpos(),r=s;s<e.length&&e[s]!=="\\";)s++;i+=e.slice(r,s)}while(s<e.length);return i}return e},parseReplacement:function(e,t,i,r,n){var s=System.Globalization.CultureInfo.getCurrentCulture(),o=new System.Text.RegularExpressions.RegexParser(s),a;return o._options=n,o._noteCaptures(t,i,r),o._setPattern(e),a=o._scanReplacement(),new System.Text.RegularExpressions.RegexReplacement(e,a,t)},_isMetachar:function(e){var t=e.charCodeAt(0);return t<="|".charCodeAt(0)&&System.Text.RegularExpressions.RegexParser._category[t]>=System.Text.RegularExpressions.RegexParser._E}},_caps:null,_capsize:0,_capnames:null,_pattern:"",_currentPos:0,_concatenation:null,_culture:null,config:{init:function(){this._options=System.Text.RegularExpressions.RegexOptions.None}},ctor:function(e){this.$initialize(),this._culture=e,this._caps={}},_noteCaptures:function(e,t,i){this._caps=e,this._capsize=t,this._capnames=i},_setPattern:function(e){e==null&&(e=""),this._pattern=e||"",this._currentPos=0},_scanReplacement:function(){this._concatenation=new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.Concatenate,this._options);for(var e,t,i;e=this._charsRight(),e!==0;){for(t=this._textpos();e>0&&this._rightChar()!=="$";)this._moveRight(),e--;this._addConcatenate(t,this._textpos()-t),e>0&&this._moveRightGetChar()==="$"&&(i=this._scanDollar(),this._concatenation.addChild(i))}return this._concatenation},_addConcatenate:function(e,t){var i,r,n;t!==0&&(t>1?(r=this._pattern.slice(e,e+t),i=new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.Multi,this._options,r)):(n=this._pattern[e],i=new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.One,this._options,n)),this._concatenation.addChild(i))},_useOptionE:function(){return(this._options&System.Text.RegularExpressions.RegexOptions.ECMAScript)!=0},_makeException:function(e){return new System.ArgumentException("Incorrect pattern. "+e)},_scanDollar:function(){var e=214748364,t=7,i,r,n,s,o;if(this._charsRight()===0)return new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.One,this._options,"$");var a=this._rightChar(),l,u=this._textpos(),d=u;if(a==="{"&&this._charsRight()>1?(l=!0,this._moveRight(),a=this._rightChar()):l=!1,a>="0"&&a<="9"){if(!l&&this._useOptionE()){for(i=-1,n=a-"0",this._moveRight(),this._isCaptureSlot(n)&&(i=n,d=this._textpos());this._charsRight()>0&&(a=this._rightChar())>="0"&&a<="9";){if(r=a-"0",n>e||n===e&&r>t)throw this._makeException("Capture group is out of range.");n=n*10+r,this._moveRight(),this._isCaptureSlot(n)&&(i=n,d=this._textpos())}if(this._textto(d),i>=0)return new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.Ref,this._options,i)}else if(i=this._scanDecimal(),(!l||this._charsRight()>0&&this._moveRightGetChar()==="}")&&this._isCaptureSlot(i))return new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.Ref,this._options,i)}else if(l&&this._isWordChar(a)){if(s=this._scanCapname(),this._charsRight()>0&&this._moveRightGetChar()==="}"&&this._isCaptureName(s))return o=this._captureSlotFromName(s),new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.Ref,this._options,o)}else if(!l){switch(i=1,a){case"$":return this._moveRight(),new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.One,this._options,"$");case"&":i=0;break;case"`":i=System.Text.RegularExpressions.RegexReplacement.LeftPortion;break;case"'":i=System.Text.RegularExpressions.RegexReplacement.RightPortion;break;case"+":i=System.Text.RegularExpressions.RegexReplacement.LastGroup;break;case"_":i=System.Text.RegularExpressions.RegexReplacement.WholeString;break}if(i!==1)return this._moveRight(),new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.Ref,this._options,i)}return this._textto(u),new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.One,this._options,"$")},_scanDecimal:function(){for(var e=214748364,t=7,i=0,r,n;this._charsRight()>0&&(r=this._rightChar(),!(r<"0"||r>"9"));){if(n=r-"0",this._moveRight(),i>e||i===e&&n>t)throw this._makeException("Capture group is out of range.");i*=10,i+=n}return i},_scanOctal:function(){var e,t,i;for(i=3,i>this._charsRight()&&(i=this._charsRight()),t=0;i>0&&(e=this._rightChar()-"0")<=7&&(this._moveRight(),t*=8,t+=e,!(this._useOptionE()&&t>=32));i-=1);return t&=255,String.fromCharCode(t)},_scanHex:function(e){var t,i;if(t=0,this._charsRight()>=e)for(;e>0&&(i=this._hexDigit(this._moveRightGetChar()))>=0;e-=1)t*=16,t+=i;if(e>0)throw this._makeException("Insufficient hexadecimal digits.");return t},_hexDigit:function(e){var t,i=e.charCodeAt(0);return(t=i-"0".charCodeAt(0))<=9?t:(t=i-"a".charCodeAt(0))<=5||(t=i-"A".charCodeAt(0))<=5?t+10:-1},_scanControl:function(){if(this._charsRight()<=0)throw this._makeException("Missing control character.");var e=this._moveRightGetChar(),t=e.charCodeAt(0);if(t>="a".charCodeAt(0)&&t<="z".charCodeAt(0)&&(t=t-("a".charCodeAt(0)-"A".charCodeAt(0))),(t=t-"@".charCodeAt(0))<" ".charCodeAt(0))return String.fromCharCode(t);throw this._makeException("Unrecognized control character.")},_scanCapname:function(){for(var e=this._textpos();this._charsRight()>0;)if(!this._isWordChar(this._moveRightGetChar())){this._moveLeft();break}return _pattern.slice(e,this._textpos())},_scanCharEscape:function(){var e=this._moveRightGetChar(),t;if(e>="0"&&e<="7")return this._moveLeft(),this._scanOctal();switch(e){case"x":return this._scanHex(2);case"u":return this._scanHex(4);case"a":return"\x07";case"b":return"\b";case"e":return"\x1B";case"f":return"\f";case"n":return` `;case"r":return"\r";case"t":return" ";case"v":return"\v";case"c":return this._scanControl();default:if(t=e==="8"||e==="9"||e==="_",t||!this._useOptionE()&&this._isWordChar(e))throw this._makeException("Unrecognized escape sequence \\"+e+".");return e}},_captureSlotFromName:function(e){return this._capnames[e]},_isCaptureSlot:function(e){return this._caps!=null?this._caps[e]!=null:e>=0&&e<this._capsize},_isCaptureName:function(e){return this._capnames==null?!1:_capnames[e]!=null},_isWordChar:function(e){return System.Char.isLetter(e.charCodeAt(0))},_charsRight:function(){return this._pattern.length-this._currentPos},_rightChar:function(){return this._pattern[this._currentPos]},_moveRightGetChar:function(){return this._pattern[this._currentPos++]},_moveRight:function(){this._currentPos++},_textpos:function(){return this._currentPos},_textto:function(e){this._currentPos=e},_moveLeft:function(){this._currentPos--}}),Bridge.define("System.Text.RegularExpressions.RegexNode",{statics:{One:9,Multi:12,Ref:13,Empty:23,Concatenate:25},_type:0,_str:null,_children:null,_next:null,_m:0,config:{init:function(){this._options=System.Text.RegularExpressions.RegexOptions.None}},ctor:function(e,t,i){this.$initialize(),this._type=e,this._options=t,e===System.Text.RegularExpressions.RegexNode.Ref?this._m=i:this._str=i||null},addChild:function(e){this._children==null&&(this._children=[]);var t=e._reduce();this._children.push(t),t._next=this},childCount:function(){return this._children==null?0:this._children.length},child:function(e){return this._children[e]},_reduce:function(){var e;switch(this._type){case System.Text.RegularExpressions.RegexNode.Concatenate:e=this._reduceConcatenation();break;default:e=this;break}return e},_reduceConcatenation:function(){var e=!1,t=0,i,r,n,s,o,a;if(this._children==null)return new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.Empty,this._options);for(s=0,o=0;s<this._children.length;s++,o++)if(r=this._children[s],o<s&&(this._children[o]=r),r._type===System.Text.RegularExpressions.RegexNode.Concatenate&&r._isRightToLeft()){for(a=0;a<r._children.length;a++)r._children[a]._next=this;this._children.splice.apply(this._children,[s+1,0].concat(r._children)),o--}else if(r._type===System.Text.RegularExpressions.RegexNode.Multi||r._type===System.Text.RegularExpressions.RegexNode.One){if(i=r._options&(System.Text.RegularExpressions.RegexOptions.RightToLeft|System.Text.RegularExpressions.RegexOptions.IgnoreCase),!e||t!==i){e=!0,t=i;continue}n=this._children[--o],n._type===System.Text.RegularExpressions.RegexNode.One&&(n._type=System.Text.RegularExpressions.RegexNode.Multi,n._str=n._str),i&System.Text.RegularExpressions.RegexOptions.RightToLeft?n._str=r._str+n._str:n._str+=r._str}else r._type===System.Text.RegularExpressions.RegexNode.Empty?o--:e=!1;return o<s&&this._children.splice(o,s-o),this._stripEnation(System.Text.RegularExpressions.RegexNode.Empty)},_stripEnation:function(e){switch(this.childCount()){case 0:return new _.RegexNode(e,this._options);case 1:return this.child(0);default:return this}},_isRightToLeft:function(){return(this._options&System.Text.RegularExpressions.RegexOptions.RightToLeft)>0}}),Bridge.define("System.Text.RegularExpressions.RegexReplacement",{statics:{replace:function(e,t,i,r,n){var s,o,a,l,u,d,f;if(e==null)throw new System.ArgumentNullException.$ctor1("evaluator");if(r<-1)throw new System.ArgumentOutOfRangeException.$ctor4("count","Count cannot be less than -1.");if(n<0||n>i.length)throw new System.ArgumentOutOfRangeException.$ctor4("startat","Start index cannot be less than 0 or greater than input length.");if(r===0)return i;if(s=t.match(i,n),s.getSuccess()){if(o="",t.getRightToLeft()){d=[],a=i.length;do{if(l=s.getIndex(),u=s.getLength(),l+u!==a&&d.push(i.slice(l+u,a)),a=l,d.push(e(s)),--r==0)break;s=s.nextMatch()}while(s.getSuccess());for(o=new StringBuilder,a>0&&(o+=o.slice(0,a)),f=d.length-1;f>=0;f--)o+=d[f]}else{a=0;do{if(l=s.getIndex(),u=s.getLength(),l!==a&&(o+=i.slice(a,l)),a=l+u,o+=e(s),--r==0)break;s=s.nextMatch()}while(s.getSuccess());a<i.length&&(o+=i.slice(a,i.length))}return o}else return i},split:function(e,t,i,r){var n,s,o,a,l,u,d,f;if(i<0)throw new System.ArgumentOutOfRangeException.$ctor4("count","Count can't be less than 0.");if(r<0||r>t.length)throw new System.ArgumentOutOfRangeException.$ctor4("startat","Start index cannot be less than 0 or greater than input length.");if(n=[],i===1)return n.push(t),n;if(--i,s=e.match(t,r),s.getSuccess())if(e.getRightToLeft()){for(a=t.length;;){for(l=s.getIndex(),u=s.getLength(),d=s.getGroups(),f=d.getCount(),n.push(t.slice(l+u,a)),a=l,o=1;o<f;o++)s._isMatched(o)&&n.push(d.get(o).toString());if(--i,i===0||(s=s.nextMatch(),!s.getSuccess()))break}n.push(t.slice(0,a)),n.reverse()}else{for(a=0;;){for(l=s.getIndex(),u=s.getLength(),d=s.getGroups(),f=d.getCount(),n.push(t.slice(a,l)),a=l+u,o=1;o<f;o++)s._isMatched(o)&&n.push(d.get(o).toString());if(--i,i===0||(s=s.nextMatch(),!s.getSuccess()))break}n.push(t.slice(a,t.length))}else n.push(t);return n},Specials:4,LeftPortion:-1,RightPortion:-2,LastGroup:-3,WholeString:-4},_rep:"",_strings:[],_rules:[],ctor:function(e,t,i){if(this.$initialize(),this._rep=e,t._type!==System.Text.RegularExpressions.RegexNode.Concatenate)throw new System.ArgumentException.$ctor1("Replacement error.");for(var r="",n=[],s=[],o,a,l=0;l<t.childCount();l++)switch(a=t.child(l),a._type){case System.Text.RegularExpressions.RegexNode.Multi:case System.Text.RegularExpressions.RegexNode.One:r+=a._str;break;case System.Text.RegularExpressions.RegexNode.Ref:r.length>0&&(s.push(n.length),n.push(r),r=""),o=a._m,i!=null&&o>=0&&(o=i[o]),s.push(-System.Text.RegularExpressions.RegexReplacement.Specials-1-o);break;default:throw new System.ArgumentException.$ctor1("Replacement error.")}r.length>0&&(s.push(n.length),n.push(r)),this._strings=n,this._rules=s},getPattern:function(){return _rep},replacement:function(e){return this._replacementImpl("",e)},replace:function(e,t,i,r){var n,s,o,a,l,u,d;if(i<-1)throw new System.ArgumentOutOfRangeException.$ctor4("count","Count cannot be less than -1.");if(r<0||r>t.length)throw new System.ArgumentOutOfRangeException.$ctor4("startat","Start index cannot be less than 0 or greater than input length.");if(i===0)return t;if(n=e.match(t,r),n.getSuccess()){if(s="",e.getRightToLeft()){u=[],o=t.length;do{if(a=n.getIndex(),l=n.getLength(),a+l!==o&&u.push(t.slice(a+l,o)),o=a,this._replacementImplRTL(u,n),--i==0)break;n=n.nextMatch()}while(n.getSuccess());for(o>0&&(s+=s.slice(0,o)),d=u.length-1;d>=0;d--)s+=u[d]}else{o=0;do{if(a=n.getIndex(),l=n.getLength(),a!==o&&(s+=t.slice(o,a)),o=a+l,s=this._replacementImpl(s,n),--i==0)break;n=n.nextMatch()}while(n.getSuccess());o<t.length&&(s+=t.slice(o,t.length))}return s}else return t},_replacementImpl:function(e,t){for(var i=System.Text.RegularExpressions.RegexReplacement.Specials,r,n=0;n<this._rules.length;n++)if(r=this._rules[n],r>=0)e+=this._strings[r];else if(r<-i)e+=t._groupToStringImpl(-i-1-r);else switch(-i-1-r){case System.Text.RegularExpressions.RegexReplacement.LeftPortion:e+=t._getLeftSubstring();break;case System.Text.RegularExpressions.RegexReplacement.RightPortion:e+=t._getRightSubstring();break;case System.Text.RegularExpressions.RegexReplacement.LastGroup:e+=t._lastGroupToStringImpl();break;case System.Text.RegularExpressions.RegexReplacement.WholeString:e+=t._getOriginalString();break}return e},_replacementImplRTL:function(e,t){for(var i=System.Text.RegularExpressions.RegexReplacement.Specials,r,n=_rules.length-1;n>=0;n--)if(r=this._rules[n],r>=0)e.push(this._strings[r]);else if(r<-i)e.push(t._groupToStringImpl(-i-1-r));else switch(-i-1-r){case System.Text.RegularExpressions.RegexReplacement.LeftPortion:e.push(t._getLeftSubstring());break;case System.Text.RegularExpressions.RegexReplacement.RightPortion:e.push(t._getRightSubstring());break;case System.Text.RegularExpressions.RegexReplacement.LastGroup:e.push(t._lastGroupToStringImpl());break;case System.Text.RegularExpressions.RegexReplacement.WholeString:e.push(t._getOriginalString());break}}}),Bridge.define("System.Text.RegularExpressions.RegexEngine",{_pattern:"",_patternInfo:null,_text:"",_textStart:0,_timeoutMs:-1,_timeoutTime:-1,_settings:null,_branchType:{base:0,offset:1,lazy:2,greedy:3,or:4},_branchResultKind:{ok:1,endPass:2,nextPass:3,nextBranch:4},ctor:function(e,t,i,r,n,s,o){if(this.$initialize(),e==null)throw new System.ArgumentNullException.$ctor1("pattern");this._pattern=e,this._timeoutMs=o,this._settings={ignoreCase:t,multiline:i,singleline:r,ignoreWhitespace:n,explicitCapture:s}},match:function(e,t){var i;if(e==null)throw new System.ArgumentNullException.$ctor1("text");if(t!=null&&(t<0||t>e.length))throw new System.ArgumentOutOfRangeException.$ctor4("textStart","Start index cannot be less than 0 or greater than input length.");return this._text=e,this._textStart=t,this._timeoutTime=this._timeoutMs>0?new Date().getTime()+System.Convert.toInt32(this._timeoutMs+.5):-1,i=this.parsePattern(),i.shouldFail?this._getEmptyMatch():(this._checkTimeout(),this._scanAndTransformResult(t,i.tokens,!1,null))},parsePattern:function(){if(this._patternInfo==null){var e=System.Text.RegularExpressions.RegexEngineParser,t=e.parsePattern(this._pattern,this._cloneSettings(this._settings));this._patternInfo=t}return this._patternInfo},_scanAndTransformResult:function(e,t,i,r){var n=this._scan(e,this._text.length,t,i,r);return this._collectScanResults(n,e)},_scan:function(e,t,i,r,n){var s=this._branchResultKind,o=[],a,l,u;if(o.grCaptureCache={},a=null,l=null,i.length===0)return u=new System.Text.RegularExpressions.RegexEngineState,u.capIndex=e,u.txtIndex=e,u.capLength=0,u;var d=r?this._branchType.base:this._branchType.offset,f=this._patternInfo.isContiguous?e:t,C=new System.Text.RegularExpressions.RegexEngineBranch(d,e,e,f);for(C.pushPass(0,i,this._cloneSettings(this._settings)),C.started=!0,C.state.txtIndex=e,o.push(C);o.length;){if(a=o[o.length-1],l=this._scanBranch(t,o,a),l===s.ok&&(n==null||a.state.capLength===n))return a.state;this._advanceToNextBranch(o,a),this._checkTimeout()}return null},_scanBranch:function(e,t,i){var r=this._branchResultKind,n,s;if(i.mustFail)return i.mustFail=!1,r.nextBranch;for(;i.hasPass();){if(n=i.peekPass(),n.tokens==null||n.tokens.length===0)s=r.endPass;else{if(this._addAlternationBranches(t,i,n)===r.nextBranch)return r.nextBranch;s=this._scanPass(e,t,i,n)}switch(s){case r.nextBranch:return s;case r.nextPass:continue;case r.endPass:case r.ok:i.popPass();break;default:throw new System.InvalidOperationException.$ctor1("Unexpected branch result.")}}return r.ok},_scanPass:function(e,t,i,r){for(var n=this._branchResultKind,s=r.tokens.length,o,a,l;r.index<s;){if(o=r.tokens[r.index],a=r.probe,a==null){if(this._addBranchBeforeProbing(t,i,r,o))return n.nextBranch}else{if(a.value<a.min||a.forced){if(l=this._scanToken(e,t,i,r,o),l!==n.ok)return l;a.value+=1,a.forced=!1;continue}if(this._addBranchAfterProbing(t,i,r,a),a.forced)continue;r.probe=null,r.index++;continue}switch(l=this._scanToken(e,t,i,r,o),l){case n.nextBranch:case n.nextPass:case n.endPass:return l;case n.ok:r.index++;break;default:throw new System.InvalidOperationException.$ctor1("Unexpected branch-pass result.")}}return n.ok},_addAlternationBranches:function(e,t,i){var r=System.Text.RegularExpressions.RegexEngineParser.tokenTypes,n=this._branchType,s=i.tokens.length,o=this._branchResultKind,a,l,u,d,f;if(!i.alternationHandled&&!i.tokens.noAlternation){for(a=[-1],f=0;f<s;f++)d=i.tokens[f],d.type===r.alternation&&a.push(f);if(a.length>1){for(f=0;f<a.length;f++)l=new System.Text.RegularExpressions.RegexEngineBranch(n.or,f,0,a.length,t.state),l.isNotFailing=!0,u=l.peekPass(),u.alternationHandled=!0,u.index=a[f]+1,e.splice(e.length-f,0,l);return e[e.length-a.length].isNotFailing=!1,t.mustFail=!0,i.alternationHandled=!0,o.nextBranch}else i.tokens.noAlternation=!0}return o.ok},_addBranchBeforeProbing:function(e,t,i,r){var n=this._tryGetTokenProbe(r),s,o;return n==null?!1:(i.probe=n,s=n.isLazy?this._branchType.lazy:this._branchType.greedy,o=new System.Text.RegularExpressions.RegexEngineBranch(s,n.value,n.min,n.max,t.state),e.push(o),!0)},_addBranchAfterProbing:function(e,t,i,r){var n,s,o;r.isLazy?r.value+1<=r.max&&(n=t.clone(),s=n.peekPass().probe,n.value+=1,s.forced=!0,e.splice(e.length-1,0,n),t.isNotFailing=!0):r.value+1<=r.max&&(o=t.clone(),o.started=!0,o.peekPass().probe=null,o.peekPass().index++,e.splice(e.length-1,0,o),r.forced=!0,t.value+=1,t.isNotFailing=!0)},_tryGetTokenProbe:function(e){var t=e.qtoken,i,r,n;if(t==null)return null;if(i=System.Text.RegularExpressions.RegexEngineParser.tokenTypes,t.type===i.quantifier)switch(t.value){case"*":case"*?":r=0,n=2147483647;break;case"+":case"+?":r=1,n=2147483647;break;case"?":case"??":r=0,n=1;break;default:throw new System.InvalidOperationException.$ctor1("Unexpected quantifier value.")}else if(t.type===i.quantifierN)r=t.data.n,n=t.data.n;else if(t.type===i.quantifierNM)r=t.data.n,n=t.data.m!=null?t.data.m:2147483647;else return null;return new System.Text.RegularExpressions.RegexEngineProbe(r,n,0,t.data.isLazy)},_advanceToNextBranch:function(e,t){if(e.length!==0){var i=e[e.length-1];if(!i.started){i.started=!0;return}if(t!==i)throw new System.InvalidOperationException.$ctor1("Current branch is supposed to be the last one.");if(e.length===1&&t.type===this._branchType.offset)t.value++,t.state.txtIndex=t.value,t.mustFail=!1,t.state.capIndex=null,t.state.capLength=0,t.state.groups.length=0,t.state.passes.length=1,t.state.passes[0].clearState(this._cloneSettings(this._settings)),t.value>t.max&&e.pop();else if(e.pop(),!t.isNotFailing){i=e[e.length-1],this._advanceToNextBranch(e,i);return}}},_collectScanResults:function(e,t){var i=this._patternInfo.groups,r=this._text,n={},s,o,a={},l,u,d,f,C=this._getEmptyMatch();if(e!=null){for(s=e.groups,this._fillMatch(C,e.capIndex,e.capLength,t),f=0;f<s.length;f++)o=s[f],l=i[o.rawIndex-1],l.constructs.skipCapture||(u={capIndex:o.capIndex,capLength:o.capLength,value:r.slice(o.capIndex,o.capIndex+o.capLength)},d=a[l.name],d==null?(d={capIndex:0,capLength:0,value:"",success:!1,captures:[u]},a[l.name]=d):d.captures.push(u));for(f=0;f<i.length;f++)l=i[f],l.constructs.skipCapture||n[l.name]!==!0&&(d=a[l.name],d==null?d={capIndex:0,capLength:0,value:"",success:!1,captures:[]}:d.captures.length>0&&(u=d.captures[d.captures.length-1],d.capIndex=u.capIndex,d.capLength=u.capLength,d.value=u.value,d.success=!0),n[l.name]=!0,d.descriptor=l,C.groups.push(d))}return C},_scanToken:function(e,t,i,r,n){var s=System.Text.RegularExpressions.RegexEngineParser.tokenTypes,o=this._branchResultKind;switch(n.type){case s.group:case s.groupImnsx:case s.alternationGroup:return this._scanGroupToken(e,t,i,r,n);case s.groupImnsxMisc:return this._scanGroupImnsxToken(n.group.constructs,r.settings);case s.charGroup:return this._scanCharGroupToken(t,i,r,n,!1);case s.charNegativeGroup:return this._scanCharNegativeGroupToken(t,i,r,n,!1);case s.escChar:case s.escCharOctal:case s.escCharHex:case s.escCharUnicode:case s.escCharCtrl:return this._scanLiteral(e,t,i,r,n.data.ch);case s.escCharOther:case s.escCharClass:return this._scanEscapeToken(t,i,r,n);case s.escCharClassCategory:throw new System.NotSupportedException.$ctor1("Unicode Category constructions are not supported.");case s.escCharClassBlock:throw new System.NotSupportedException.$ctor1("Unicode Named block constructions are not supported.");case s.escCharClassDot:return this._scanDotToken(e,t,i,r);case s.escBackrefNumber:return this._scanBackrefNumberToken(e,t,i,r,n);case s.escBackrefName:return this._scanBackrefNameToken(e,t,i,r,n);case s.anchor:case s.escAnchor:return this._scanAnchorToken(e,t,i,r,n);case s.groupConstruct:case s.groupConstructName:case s.groupConstructImnsx:case s.groupConstructImnsxMisc:return o.ok;case s.alternationGroupCondition:case s.alternationGroupRefNameCondition:case s.alternationGroupRefNumberCondition:return this._scanAlternationConditionToken(e,t,i,r,n);case s.alternation:return o.endPass;case s.commentInline:case s.commentXMode:return o.ok;default:return this._scanLiteral(e,t,i,r,n.value)}},_scanGroupToken:function(e,t,i,r,n){var s=System.Text.RegularExpressions.RegexEngineParser.tokenTypes,o=this._branchResultKind,a=i.state.txtIndex,l,u;if(r.onHold){if(n.type===s.group){var d=n.group.rawIndex,f=r.onHoldTextIndex,C=a-f,E=t.grCaptureCache[d];if(E==null&&(E={},t.grCaptureCache[d]=E),l=f.toString()+"_"+C.toString(),E[l]==null)E[l]=!0;else return o.nextBranch;n.group.constructs.emptyCapture||(n.group.isBalancing?i.state.logCaptureGroupBalancing(n.group,f):i.state.logCaptureGroup(n.group,f,C))}return r.onHold=!1,r.onHoldTextIndex=-1,o.ok}if(n.type===s.group||n.type===s.groupImnsx){if(u=n.group.constructs,this._scanGroupImnsxToken(u,r.settings),u.isPositiveLookahead||u.isNegativeLookahead||u.isPositiveLookbehind||u.isNegativeLookbehind)return this._scanLook(i,a,e,n);if(u.isNonbacktracking)return this._scanNonBacktracking(i,a,e,n)}return r.onHoldTextIndex=a,r.onHold=!0,i.pushPass(0,n.children,this._cloneSettings(r.settings)),o.nextPass},_scanGroupImnsxToken:function(e,t){var i=this._branchResultKind;return e.isIgnoreCase!=null&&(t.ignoreCase=e.isIgnoreCase),e.isMultiline!=null&&(t.multiline=e.isMultiline),e.isSingleLine!=null&&(t.singleline=e.isSingleLine),e.isIgnoreWhitespace!=null&&(t.ignoreWhitespace=e.isIgnoreWhitespace),e.isExplicitCapture!=null&&(t.explicitCapture=e.isExplicitCapture),i.ok},_scanAlternationConditionToken:function(e,t,i,r,n){var s=System.Text.RegularExpressions.RegexEngineParser.tokenTypes,o=this._branchResultKind,a=n.children,l=i.state.txtIndex,u=o.nextBranch,d,f;return n.type===s.alternationGroupRefNameCondition||n.type===s.alternationGroupRefNumberCondition?(d=i.state.resolveBackref(n.data.packedSlotId),u=d!=null?o.ok:o.nextBranch):(f=this._scan(l,e,a,!0,null),this._combineScanResults(i,f)&&(u=o.ok)),u===o.nextBranch&&r.tokens.noAlternation&&(u=o.endPass),u},_scanLook:function(e,t,i,r){var n=r.group.constructs,s=this._branchResultKind,o=r.children,a,l,u=n.isPositiveLookahead||n.isNegativeLookahead,d=n.isPositiveLookbehind||n.isNegativeLookbehind;return u||d?(o=o.slice(1,o.length),a=n.isPositiveLookahead||n.isPositiveLookbehind,l=u?this._scanLookAhead(e,t,i,o):this._scanLookBehind(e,t,i,o),a===l?s.ok:s.nextBranch):null},_scanLookAhead:function(e,t,i,r){var n=this._scan(t,i,r,!0,null);return this._combineScanResults(e,n)},_scanLookBehind:function(e,t,i,r){for(var n=t,s,o;n>=0;){if(s=t-n,o=this._scan(n,i,r,!0,s),this._combineScanResults(e,o))return!0;--n}return!1},_scanNonBacktracking:function(e,t,i,r){var n=this._branchResultKind,s=r.children,o;return s=s.slice(1,s.length),o=this._scan(t,i,s,!0,null),o?(e.state.logCapture(o.capLength),n.ok):n.nextBranch},_scanLiteral:function(e,t,i,r,n){var s=this._branchResultKind,o=i.state.txtIndex,a;if(o+n.length>e)return s.nextBranch;if(r.settings.ignoreCase){for(a=0;a<n.length;a++)if(this._text[o+a].toLowerCase()!==n[a].toLowerCase())return s.nextBranch}else for(a=0;a<n.length;a++)if(this._text[o+a]!==n[a])return s.nextBranch;return i.state.logCapture(n.length),s.ok},_scanWithJsRegex:function(e,t,i,r,n){var s=this._branchResultKind,o=t.state.txtIndex,a=this._text[o],l,u;return a==null&&(a=""),l=i.settings.ignoreCase?"i":"",u=r.rgx,u==null&&(n==null&&(n=r.value),u=new RegExp(n,l),r.rgx=u),u.test(a)?(t.state.logCapture(a.length),s.ok):s.nextBranch},_scanWithJsRegex2:function(e,t){var i=this._branchResultKind,r=this._text[e],n;return r==null&&(r=""),n=new RegExp(t,""),n.test(r)?i.ok:i.nextBranch},_scanCharGroupToken:function(e,t,i,r,n){var s=System.Text.RegularExpressions.RegexEngineParser.tokenTypes,o=this._branchResultKind,a=t.state.txtIndex,l=this._text[a],u,d,f,C,E,T,w,k;if(l==null)return o.nextBranch;if(f=l.charCodeAt(0),C=r.data.ranges,r.data.substractToken!=null){if(r.data.substractToken.type===s.charGroup)w=this._scanCharGroupToken(e,t,i,r.data.substractToken,!0);else if(r.data.substractToken.type===s.charNegativeGroup)w=this._scanCharNegativeGroupToken(e,t,i,r.data.substractToken,!0);else throw new System.InvalidOperationException.$ctor1("Unexpected substuct group token.");if(w===o.ok)return r.type===s.charGroup?o.nextBranch:o.ok}if(C.charClassToken!=null&&(k=this._scanWithJsRegex(e,t,i,C.charClassToken),k===o.ok))return o.ok;for(d=0;d<2;d++){for(u=0;u<C.length&&(E=C[u],!(E.n>f));u++)if(f<=E.m)return n||t.state.logCapture(1),o.ok;T==null&&i.settings.ignoreCase&&(T=l.toUpperCase(),l=l===T?l.toLowerCase():T,f=l.charCodeAt(0))}return o.nextBranch},_scanCharNegativeGroupToken:function(e,t,i,r,n){var s=this._branchResultKind,o=t.state.txtIndex,a=this._text[o],l;return a==null?s.nextBranch:(l=this._scanCharGroupToken(e,t,i,r,!0),l===s.ok?s.nextBranch:(n||t.state.logCapture(1),s.ok))},_scanEscapeToken:function(e,t,i,r){return this._scanWithJsRegex(e,t,i,r)},_scanDotToken:function(e,t,i,r){var n=this._branchResultKind,s=i.state.txtIndex;if(r.settings.singleline){if(s<e)return i.state.logCapture(1),n.ok}else if(s<e&&this._text[s]!==` `)return i.state.logCapture(1),n.ok;return n.nextBranch},_scanBackrefNumberToken:function(e,t,i,r,n){var s=this._branchResultKind,o=i.state.resolveBackref(n.data.slotId),a;return o==null?s.nextBranch:(a=this._text.slice(o.capIndex,o.capIndex+o.capLength),this._scanLiteral(e,t,i,r,a))},_scanBackrefNameToken:function(e,t,i,r,n){var s=this._branchResultKind,o=i.state.resolveBackref(n.data.slotId),a;return o==null?s.nextBranch:(a=this._text.slice(o.capIndex,o.capIndex+o.capLength),this._scanLiteral(e,t,i,r,a))},_scanAnchorToken:function(e,t,i,r,n){var s=this._branchResultKind,o=i.state.txtIndex,a,l;if(n.value==="\\b"||n.value==="\\B"){if(a=o>0&&this._scanWithJsRegex2(o-1,"\\w")===s.ok,l=this._scanWithJsRegex2(o,"\\w")===s.ok,a===l==(n.value==="\\B"))return s.ok}else if(n.value==="^"){if(o===0||r.settings.multiline&&this._text[o-1]===` `)return s.ok}else if(n.value==="$"){if(o===e||r.settings.multiline&&this._text[o]===` `)return s.ok}else if(n.value==="\\A"){if(o===0)return s.ok}else if(n.value==="\\z"){if(o===e)return s.ok}else if(n.value==="\\Z"){if(o===e||o===e-1&&this._text[o]===` `)return s.ok}else if(n.value==="\\G")return s.ok;return s.nextBranch},_cloneSettings:function(e){return{ignoreCase:e.ignoreCase,multiline:e.multiline,singleline:e.singleline,ignoreWhitespace:e.ignoreWhitespace,explicitCapture:e.explicitCapture}},_combineScanResults:function(e,t){if(t!=null){for(var i=e.state.groups,r=t.groups,n=r.length,s=0;s<n;++s)i.push(r[s]);return!0}return!1},_getEmptyMatch:function(){return{capIndex:0,capLength:0,success:!1,value:"",groups:[],captures:[]}},_fillMatch:function(e,t,i,r){t==null&&(t=r),e.capIndex=t,e.capLength=i,e.success=!0,e.value=this._text.slice(t,t+i),e.groups.push({capIndex:t,capLength:i,value:e.value,success:!0,captures:[{capIndex:t,capLength:i,value:e.value}]}),e.captures.push(e.groups[0].captures[0])},_checkTimeout:function(){if(!(this._timeoutTime<0)){var e=new Date().getTime();if(e>=this._timeoutTime)throw new System.RegexMatchTimeoutException(this._text,this._pattern,System.TimeSpan.fromMilliseconds(this._timeoutMs))}}}),Bridge.define("System.Text.RegularExpressions.RegexEngineBranch",{type:0,value:0,min:0,max:0,isStarted:!1,isNotFailing:!1,state:null,ctor:function(e,t,i,r,n){this.$initialize(),this.type=e,this.value=t,this.min=i,this.max=r,this.state=n!=null?n.clone():new System.Text.RegularExpressions.RegexEngineState},pushPass:function(e,t,i){var r=new System.Text.RegularExpressions.RegexEnginePass(e,t,i);this.state.passes.push(r)},peekPass:function(){return this.state.passes[this.state.passes.length-1]},popPass:function(){return this.state.passes.pop()},hasPass:function(){return this.state.passes.length>0},clone:function(){var e=new System.Text.RegularExpressions.RegexEngineBranch(this.type,this.value,this.min,this.max,this.state);return e.isNotFailing=this.isNotFailing,e}}),Bridge.define("System.Text.RegularExpressions.RegexEngineState",{txtIndex:0,capIndex:null,capLength:0,passes:null,groups:null,ctor:function(){this.$initialize(),this.passes=[],this.groups=[]},logCapture:function(e){this.capIndex==null&&(this.capIndex=this.txtIndex),this.txtIndex+=e,this.capLength+=e},logCaptureGroup:function(e,t,i){this.groups.push({rawIndex:e.rawIndex,slotId:e.packedSlotId,capIndex:t,capLength:i})},logCaptureGroupBalancing:function(e,t){for(var i=e.balancingSlotId,r=this.groups,n=r.length-1,s,o,a,l;n>=0;){if(r[n].slotId===i){s=r[n],o=n;break}--n}return s!=null&&o!=null?(r.splice(o,1),e.constructs.name1!=null&&(a=s.capIndex+s.capLength,l=t-a,this.logCaptureGroup(e,a,l)),!0):!1},resolveBackref:function(e){for(var t=this.groups,i=t.length-1;i>=0;){if(t[i].slotId===e)return t[i];--i}return null},clone:function(){var e=new System.Text.RegularExpressions.RegexEngineState,t,i;e.txtIndex=this.txtIndex,e.capIndex=this.capIndex,e.capLength=this.capLength;for(var r=e.passes,n=this.passes,s=n.length,o,a=0;a<s;a++)o=n[a].clone(),r.push(o);for(t=e.groups,i=this.groups,s=i.length,a=0;a<s;a++)o=i[a],t.push(o);return e}}),Bridge.define("System.Text.RegularExpressions.RegexEnginePass",{index:0,tokens:null,probe:null,onHold:!1,onHoldTextIndex:-1,alternationHandled:!1,settings:null,ctor:function(e,t,i){this.$initialize(),this.index=e,this.tokens=t,this.settings=i},clearState:function(e){this.index=0,this.probe=null,this.onHold=!1,this.onHoldTextIndex=-1,this.alternationHandled=!1,this.settings=e},clone:function(){var e=new System.Text.RegularExpressions.RegexEnginePass(this.index,this.tokens,this.settings);return e.onHold=this.onHold,e.onHoldTextIndex=this.onHoldTextIndex,e.alternationHandled=this.alternationHandled,e.probe=this.probe!=null?this.probe.clone():null,e}}),Bridge.define("System.Text.RegularExpressions.RegexEngineProbe",{min:0,max:0,value:0,isLazy:!1,forced:!1,ctor:function(e,t,i,r){this.$initialize(),this.min=e,this.max=t,this.value=i,this.isLazy=r,this.forced=!1},clone:function(){var e=new System.Text.RegularExpressions.RegexEngineProbe(this.min,this.max,this.value,this.isLazy);return e.forced=this.forced,e}}),Bridge.define("System.Text.RegularExpressions.RegexEngineParser",{statics:{_hexSymbols:"0123456789abcdefABCDEF",_octSymbols:"01234567",_decSymbols:"0123456789",_escapedChars:"abtrvfnexcu",_escapedCharClasses:"pPwWsSdD",_escapedAnchors:"AZzGbB",_escapedSpecialSymbols:` .,$^{}[]()|*+-=?\\|/"':;~!@#%&`,_whiteSpaceChars:` \r \v\f\xA0\uFEFF`,_unicodeCategories:["Lu","Ll","Lt","Lm","Lo","L","Mn","Mc","Me","M","Nd","Nl","No","N","Pc","Pd","Ps","Pe","Pi","Pf","Po","P","Sm","Sc","Sk","So","S","Zs","Zl","Zp","Z","Cc","Cf","Cs","Co","Cn","C"],_namedCharBlocks:["IsBasicLatin","IsLatin-1Supplement","IsLatinExtended-A","IsLatinExtended-B","IsIPAExtensions","IsSpacingModifierLetters","IsCombiningDiacriticalMarks","IsGreek","IsGreekandCoptic","IsCyrillic","IsCyrillicSupplement","IsArmenian","IsHebrew","IsArabic","IsSyriac","IsThaana","IsDevanagari","IsBengali","IsGurmukhi","IsGujarati","IsOriya","IsTamil","IsTelugu","IsKannada","IsMalayalam","IsSinhala","IsThai","IsLao","IsTibetan","IsMyanmar","IsGeorgian","IsHangulJamo","IsEthiopic","IsCherokee","IsUnifiedCanadianAboriginalSyllabics","IsOgham","IsRunic","IsTagalog","IsHanunoo","IsBuhid","IsTagbanwa","IsKhmer","IsMongolian","IsLimbu","IsTaiLe","IsKhmerSymbols","IsPhoneticExtensions","IsLatinExtendedAdditional","IsGreekExtended","IsGeneralPunctuation","IsSuperscriptsandSubscripts","IsCurrencySymbols","IsCombiningDiacriticalMarksforSymbols","IsCombiningMarksforSymbols","IsLetterlikeSymbols","IsNumberForms","IsArrows","IsMathematicalOperators","IsMiscellaneousTechnical","IsControlPictures","IsOpticalCharacterRecognition","IsEnclosedAlphanumerics","IsBoxDrawing","IsBlockElements","IsGeometricShapes","IsMiscellaneousSymbols","IsDingbats","IsMiscellaneousMathematicalSymbols-A","IsSupplementalArrows-A","IsBraillePatterns","IsSupplementalArrows-B","IsMiscellaneousMathematicalSymbols-B","IsSupplementalMathematicalOperators","IsMiscellaneousSymbolsandArrows","IsCJKRadicalsSupplement","IsKangxiRadicals","IsIdeographicDescriptionCharacters","IsCJKSymbolsandPunctuation","IsHiragana","IsKatakana","IsBopomofo","IsHangulCompatibilityJamo","IsKanbun","IsBopomofoExtended","IsKatakanaPhoneticExtensions","IsEnclosedCJKLettersandMonths","IsCJKCompatibility","IsCJKUnifiedIdeographsExtensionA","IsYijingHexagramSymbols","IsCJKUnifiedIdeographs","IsYiSyllables","IsYiRadicals","IsHangulSyllables","IsHighSurrogates","IsHighPrivateUseSurrogates","IsLowSurrogates","IsPrivateUse or IsPrivateUseArea","IsCJKCompatibilityIdeographs","IsAlphabeticPresentationForms","IsArabicPresentationForms-A","IsVariationSelectors","IsCombiningHalfMarks","IsCJKCompatibilityForms","IsSmallFormVariants","IsArabicPresentationForms-B","IsHalfwidthandFullwidthForms","IsSpecials"],_controlChars:["@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","\\","]","^","_"],tokenTypes:{literal:0,escChar:110,escCharOctal:111,escCharHex:112,escCharCtrl:113,escCharUnicode:114,escCharOther:115,escCharClass:120,escCharClassCategory:121,escCharClassBlock:122,escCharClassDot:123,escAnchor:130,escBackrefNumber:140,escBackrefName:141,charGroup:200,charNegativeGroup:201,charInterval:202,anchor:300,group:400,groupImnsx:401,groupImnsxMisc:402,groupConstruct:403,groupConstructName:404,groupConstructImnsx:405,groupConstructImnsxMisc:406,quantifier:500,quantifierN:501,quantifierNM:502,alternation:600,alternationGroup:601,alternationGroupCondition:602,alternationGroupRefNumberCondition:603,alternationGroupRefNameCondition:604,commentInline:700,commentXMode:701},parsePattern:function(e,t){var i=System.Text.RegularExpressions.RegexEngineParser,r=i._parsePatternImpl(e,t,0,e.length),n=[],s;return i._fillGroupDescriptors(r,n),s=i._getGroupSparseInfo(n),i._fillBalancingGroupInfo(n,s),i._preTransformBackrefTokens(e,r,s),i._transformRawTokens(t,r,s,[],[],0),i._updateGroupDescriptors(r),{groups:n,sparseSettings:s,isContiguous:t.isContiguous||!1,shouldFail:t.shouldFail||!1,tokens:r}},_transformRawTokens:function(e,t,i,r,n,s){for(var o=System.Text.RegularExpressions.RegexEngineParser,a=o.tokenTypes,l,u,d,f,C,E,T,w,k,O=0;O<t.length;O++){if(u=t[O],O<t.length-1)switch(k=t[O+1],k.type){case a.quantifier:case a.quantifierN:case a.quantifierNM:u.qtoken=k,t.splice(O+1,1),--O}if(u.type===a.escBackrefNumber){if(C=u.data.number,f=i.getPackedSlotIdBySlotNumber(C),f==null)throw new System.ArgumentException.$ctor1("Reference to undefined group number "+C.toString()+".");if(r.indexOf(f)<0){e.shouldFail=!0;continue}u.data.slotId=f}else if(u.type===a.escBackrefName){if(d=u.data.name,f=i.getPackedSlotIdBySlotName(d),f==null){if(E=o._matchChars(d,0,d.length,o._decSymbols),E.matchLength===d.length){d="\\"+d,o._updatePatternToken(u,a.escBackrefNumber,u.index,d.length,d),--O;continue}throw new System.ArgumentException.$ctor1("Reference to undefined group name '"+d+"'.")}if(r.indexOf(f)<0){e.shouldFail=!0;continue}u.data.slotId=f}else if(u.type===a.anchor||u.type===a.escAnchor){if(u.value==="\\G"){s===0&&O===0?e.isContiguous=!0:e.shouldFail=!0,t.splice(O,1),--O;continue}}else if(u.type===a.commentInline||u.type===a.commentXMode){t.splice(O,1),--O;continue}else if(u.type===a.literal){if(O>0&&!u.qtoken&&(l=t[O-1],l.type===a.literal&&!l.qtoken)){l.value+=u.value,l.length+=u.length,t.splice(O,1),--O;continue}}else if(u.type===a.alternationGroupCondition&&u.data!=null)if(u.data.number!=null){if(f=i.getPackedSlotIdBySlotNumber(u.data.number),f==null)throw new System.ArgumentException.$ctor1("Reference to undefined group number "+d+".");u.data.packedSlotId=f,o._updatePatternToken(u,a.alternationGroupRefNumberCondition,u.index,u.length,u.value)}else f=i.getPackedSlotIdBySlotName(u.data.name),f!=null?(u.data.packedSlotId=f,o._updatePatternToken(u,a.alternationGroupRefNameCondition,u.index,u.length,u.value)):delete u.data;u.children&&u.children.length&&(T=u.type===a.group?[u.group.rawIndex]:[],T=T.concat(n),w=u.localSettings||e,o._transformRawTokens(w,u.children,i,r,T,s+1),e.shouldFail=e.shouldFail||w.shouldFail,e.isContiguous=e.isContiguous||w.isContiguous),u.type===a.group&&r.push(u.group.packedSlotId)}},_fillGroupDescriptors:function(e,t){var i=System.Text.RegularExpressions.RegexEngineParser,r,n,s;for(i._fillGroupStructure(t,e,null),s=1,n=0;n<t.length;n++)r=t[n],r.constructs.name1!=null?(r.name=r.constructs.name1,r.hasName=!0):(r.hasName=!1,r.name=s.toString(),++s)},_fillGroupStructure:function(e,t,i){for(var r=System.Text.RegularExpressions.RegexEngineParser,n=r.tokenTypes,s,o,a,l,u,d=0;d<t.length;d++)o=t[d],u=o.children&&o.children.length,(o.type===n.group||o.type===n.groupImnsx||o.type===n.groupImnsxMisc)&&(s={rawIndex:e.length+1,number:-1,parentGroup:null,innerGroups:[],name:null,hasName:!1,constructs:null,quantifier:null,exprIndex:-1,exprLength:0,expr:null,exprFull:null},o.group=s,o.type===n.group&&(e.push(s),i!=null&&(o.group.parentGroup=i,i.innerGroups.push(s))),l=u?o.children[0]:null,s.constructs=r._fillGroupConstructs(l),a=s.constructs,o.isNonCapturingExplicit&&(delete o.isNonCapturingExplicit,a.isNonCapturingExplicit=!0),o.isEmptyCapturing&&(delete o.isEmptyCapturing,a.emptyCapture=!0),a.skipCapture=a.isNonCapturing||a.isNonCapturingExplicit||a.isNonbacktracking||a.isPositiveLookahead||a.isNegativeLookahead||a.isPositiveLookbehind||a.isNegativeLookbehind||a.name1==null&&a.name2!=null),u&&r._fillGroupStructure(e,o.children,o.group)},_getGroupSparseInfo:function(e){var t=System.Text.RegularExpressions.RegexEngineParser,i={},r=[],n={},s,o,a,l,u,d,f,C={0:0},E,T,w;for(C.lastSlot=0,E={0:0},E.keys=["0"],d=0;d<e.length;d++)u=e[d],u.constructs.skipCapture||(u.constructs.isNumberName1?(a=parseInt(u.constructs.name1),r.push(a),i[a]?i[a].push(u):i[a]=[u]):(l=u.constructs.name1,n[l]?n[l].push(u):n[l]=[u]));for(T=function(k,O){return k-O},r.sort(T),w=!1,f=0;f<2;f++){for(d=0;d<e.length;d++)u=e[d],u.constructs.skipCapture||u.constructs.emptyCapture===!0===w&&(a=E.keys.length,u.hasName||(o=[u],s=i[a],s!=null&&(o=o.concat(s),i[a]=null),t._addSparseSlotForSameNamedGroups(o,a,C,E)));w=!0}for(d=0;d<e.length;d++)if(u=e[d],!u.constructs.skipCapture&&u.hasName&&!u.constructs.isNumberName1){for(a=E.keys.length,s=i[a];s!=null;)t._addSparseSlotForSameNamedGroups(s,a,C,E),i[a]=null,a=E.keys.length,s=i[a];if(!u.constructs.isNumberName1)for(a=E.keys.length,s=i[a];s!=null;)t._addSparseSlotForSameNamedGroups(s,a,C,E),i[a]=null,a=E.keys.length,s=i[a];l=u.constructs.name1,s=n[l],s!=null&&(t._addSparseSlotForSameNamedGroups(s,a,C,E),n[l]=null)}for(d=0;d<r.length;d++)a=r[d],s=i[a],s!=null&&(t._addSparseSlotForSameNamedGroups(s,a,C,E),i[a]=null);return{isSparse:C.isSparse||!1,sparseSlotMap:C,sparseSlotNameMap:E,getPackedSlotIdBySlotNumber:function(k){return this.sparseSlotMap[k]},getPackedSlotIdBySlotName:function(k){return this.sparseSlotNameMap[k]}}},_addSparseSlot:function(e,t,i,r){var n=r.keys.length;e.packedSlotId=n,i[t]=n,r[e.name]=n,r.keys.push(e.name),!i.isSparse&&t-i.lastSlot>1&&(i.isSparse=!0),i.lastSlot=t},_addSparseSlotForSameNamedGroups:function(e,t,i,r){var n=System.Text.RegularExpressions.RegexEngineParser,s,o,a;if(n._addSparseSlot(e[0],t,i,r),o=e[0].sparseSlotId,a=e[0].packedSlotId,e.length>1)for(s=1;s<e.length;s++)e[s].sparseSlotId=o,e[s].packedSlotId=a},_fillGroupConstructs:function(e){var t=System.Text.RegularExpressions.RegexEngineParser,i=t.tokenTypes,r={name1:null,name2:null,isNumberName1:!1,isNumberName2:!1,isNonCapturing:!1,isNonCapturingExplicit:!1,isIgnoreCase:null,isMultiline:null,isExplicitCapture:null,isSingleLine:null,isIgnoreWhitespace:null,isPositiveLookahead:!1,isNegativeLookahead:!1,isPositiveLookbehind:!1,isNegativeLookbehind:!1,isNonbacktracking:!1},n,s,o,a;if(e==null)return r;if(e.type===i.groupConstruct)switch(e.value){case"?:":r.isNonCapturing=!0;break;case"?=":r.isPositiveLookahead=!0;break;case"?!":r.isNegativeLookahead=!0;break;case"?>":r.isNonbacktracking=!0;break;case"?<=":r.isPositiveLookbehind=!0;break;case"?<!":r.isNegativeLookbehind=!0;break;default:throw new System.ArgumentException.$ctor1("Unrecognized grouping construct.")}else if(e.type===i.groupConstructName){if(n=e.value.slice(2,e.length-1),s=n.split("-"),s.length===0||s.length>2)throw new System.ArgumentException.$ctor1("Invalid group name.");s[0].length&&(r.name1=s[0],o=t._validateGroupName(s[0]),r.isNumberName1=o.isNumberName),s.length===2&&(r.name2=s[1],a=t._validateGroupName(s[1]),r.isNumberName2=a.isNumberName)}else if(e.type===i.groupConstructImnsx||e.type===i.groupConstructImnsxMisc)for(var l=e.type===i.groupConstructImnsx?1:0,u=e.length-1-l,d=!0,f,C=1;C<=u;C++)f=e.value[C],f==="-"?d=!1:f==="i"?r.isIgnoreCase=d:f==="m"?r.isMultiline=d:f==="n"?r.isExplicitCapture=d:f==="s"?r.isSingleLine=d:f==="x"&&(r.isIgnoreWhitespace=d);return r},_validateGroupName:function(e){var t,i,r;if(!e||!e.length)throw new System.ArgumentException.$ctor1("Invalid group name: Group names must begin with a word character.");if(t=e[0]>="0"&&e[0]<="9",t&&(i=System.Text.RegularExpressions.RegexEngineParser,r=i._matchChars(e,0,e.length,i._decSymbols),r.matchLength!==e.length))throw new System.ArgumentException.$ctor1("Invalid group name: Group names must begin with a word character.");return{isNumberName:t}},_fillBalancingGroupInfo:function(e,t){for(var i,r=0;r<e.length;r++)if(i=e[r],i.constructs.name2!=null&&(i.isBalancing=!0,i.balancingSlotId=t.getPackedSlotIdBySlotName(i.constructs.name2),i.balancingSlotId==null))throw new System.ArgumentException.$ctor1("Reference to undefined group name '"+i.constructs.name2+"'.")},_preTransformBackrefTokens:function(e,t,i){for(var r=System.Text.RegularExpressions.RegexEngineParser,n=r.tokenTypes,s,o,a,l,u,d=0;d<t.length;d++){if(u=t[d],u.type===n.escBackrefNumber){if(s=u.data.number,s>=1&&i.getPackedSlotIdBySlotNumber(s)!=null)continue;if(s<=9)throw new System.ArgumentException.$ctor1("Reference to undefined group number "+s.toString()+".");if(o=r._parseOctalCharToken(u.value,0,u.length),o==null)throw new System.ArgumentException.$ctor1("Unrecognized escape sequence "+u.value.slice(0,2)+".");a=u.length-o.length,r._modifyPatternToken(u,e,n.escCharOctal,null,o.length),u.data=o.data,a>0&&(l=r._createPatternToken(e,n.literal,u.index+u.length,a),t.splice(d+1,0,l))}u.children&&u.children.length&&r._preTransformBackrefTokens(e,u.children,i)}},_updateGroupDescriptors:function(e,t){for(var i=System.Text.RegularExpressions.RegexEngineParser,r=i.tokenTypes,n,s,o,a,l,u=t||0,d=0;d<e.length;d++)s=e[d],s.index=u,s.children&&(l=s.childrenPostfix.length,i._updateGroupDescriptors(s.children,u+l),a=i._constructPattern(s.children),s.value=s.childrenPrefix+a+s.childrenPostfix,s.length=s.value.length),s.type===r.group&&s.group&&(n=s.group,n.exprIndex=s.index,n.exprLength=s.length,d+1<e.length&&(o=e[d+1],(o.type===r.quantifier||o.type===r.quantifierN||o.type===r.quantifierNM)&&(n.quantifier=o.value)),n.expr=s.value,n.exprFull=n.expr+(n.quantifier!=null?n.quantifier:"")),u+=s.length},_constructPattern:function(e){for(var t="",i,r=0;r<e.length;r++)i=e[r],t+=i.value;return t},_parsePatternImpl:function(e,t,i,r){if(e==null)throw new System.ArgumentNullException.$ctor1("pattern");if(i<0||i>e.length)throw new System.ArgumentOutOfRangeException.$ctor1("startIndex");if(r<i||r>e.length)throw new System.ArgumentOutOfRangeException.$ctor1("endIndex");for(var n=System.Text.RegularExpressions.RegexEngineParser,s=n.tokenTypes,o=[],a,l,u=i;u<r;){if(l=e[u],t.ignoreWhitespace&&n._whiteSpaceChars.indexOf(l)>=0){++u;continue}a=l==="."?n._parseDotToken(e,u,r):l==="\\"?n._parseEscapeToken(e,u,r):l==="["?n._parseCharRangeToken(e,u,r):l==="^"||l==="$"?n._parseAnchorToken(e,u):l==="("?n._parseGroupToken(e,t,u,r):l==="|"?n._parseAlternationToken(e,u):l==="#"&&t.ignoreWhitespace?n._parseXModeCommentToken(e,u,r):n._parseQuantifierToken(e,u,r),a==null&&(a=n._createPatternToken(e,s.literal,u,1)),a!=null&&(o.push(a),u+=a.length)}return o},_parseEscapeToken:function(e,t,i){var r=System.Text.RegularExpressions.RegexEngineParser,n=r.tokenTypes,s=e[t],o,a,l,u,d,f,C,E,T;if(s!=="\\")return null;if(t+1>=i)throw new System.ArgumentException.$ctor1("Illegal \\ at end of pattern.");if(s=e[t+1],s>="1"&&s<="9")return o=r._matchChars(e,t+1,i,r._decSymbols,3),a=r._createPatternToken(e,n.escBackrefNumber,t,1+o.matchLength),a.data={number:parseInt(o.match,10)},a;if(r._escapedAnchors.indexOf(s)>=0)return r._createPatternToken(e,n.escAnchor,t,2);if(l=r._parseEscapedChar(e,t,i),l!=null)return l;if(s==="k"){if(t+2<i&&(u=e[t+2],(u==="'"||u==="<")&&(d=u==="<"?">":"'",f=r._matchUntil(e,t+3,i,d),f.unmatchLength===1&&f.matchLength>0)))return C=r._createPatternToken(e,n.escBackrefName,t,3+f.matchLength+1),C.data={name:f.match},C;throw new System.ArgumentException.$ctor1("Malformed \\k<...> named back reference.")}if(E=s.charCodeAt(0),E>=0&&E<48||E>57&&E<65||E>90&&E<95||E===96||E>122&&E<128)return T=r._createPatternToken(e,n.escChar,t,2),T.data={n:E,ch:s},T;throw new System.ArgumentException.$ctor1("Unrecognized escape sequence \\"+s+".")},_parseOctalCharToken:function(e,t,i){var r=System.Text.RegularExpressions.RegexEngineParser,n=r.tokenTypes,s=e[t];if(s==="\\"&&t+1<i&&(s=e[t+1],s>="0"&&s<="7")){var o=r._matchChars(e,t+1,i,r._octSymbols,3),a=parseInt(o.match,8),l=r._createPatternToken(e,n.escCharOctal,t,1+o.matchLength);return l.data={n:a,ch:String.fromCharCode(a)},l}return null},_parseEscapedChar:function(e,t,i){var r=System.Text.RegularExpressions.RegexEngineParser,n=r.tokenTypes,s,o=e[t],a,l,u,d,f,C,E,T,w;if(o!=="\\"||t+1>=i)return null;if(o=e[t+1],r._escapedChars.indexOf(o)>=0){if(o==="x"){if(a=r._matchChars(e,t+2,i,r._hexSymbols,2),a.matchLength!==2)throw new System.ArgumentException.$ctor1("Insufficient hexadecimal digits.");return l=parseInt(a.match,16),s=r._createPatternToken(e,n.escCharHex,t,4),s.data={n:l,ch:String.fromCharCode(l)},s}else if(o==="c"){if(t+2>=i)throw new System.ArgumentException.$ctor1("Missing control character.");if(u=e[t+2],u=u.toUpperCase(),d=this._controlChars.indexOf(u),d>=0)return s=r._createPatternToken(e,n.escCharCtrl,t,3),s.data={n:d,ch:String.fromCharCode(d)},s;throw new System.ArgumentException.$ctor1("Unrecognized control character.")}else if(o==="u"){if(f=r._matchChars(e,t+2,i,r._hexSymbols,4),f.matchLength!==4)throw new System.ArgumentException.$ctor1("Insufficient hexadecimal digits.");return C=parseInt(f.match,16),s=r._createPatternToken(e,n.escCharUnicode,t,6),s.data={n:C,ch:String.fromCharCode(C)},s}switch(s=r._createPatternToken(e,n.escChar,t,2),o){case"a":E=7;break;case"b":E=8;break;case"t":E=9;break;case"r":E=13;break;case"v":E=11;break;case"f":E=12;break;case"n":E=10;break;case"e":E=27;break;default:throw new System.ArgumentException.$ctor1("Unexpected escaped char: '"+o+"'.")}return s.data={n:E,ch:String.fromCharCode(E)},s}if(o>="0"&&o<="7")return r._parseOctalCharToken(e,t,i);if(r._escapedCharClasses.indexOf(o)>=0){if(o==="p"||o==="P"){if(T=r._matchUntil(e,t+2,i,"}"),T.matchLength<2||T.match[0]!=="{"||T.unmatchLength!==1)throw new System.ArgumentException.$ctor1("Incomplete p{X} character escape.");if(w=T.match.slice(1),r._unicodeCategories.indexOf(w)>=0)return r._createPatternToken(e,n.escCharClassCategory,t,2+T.matchLength+1);if(r._namedCharBlocks.indexOf(w)>=0)return r._createPatternToken(e,n.escCharClassBlock,t,2+T.matchLength+1);throw new System.ArgumentException.$ctor1("Unknown property '"+w+"'.")}return r._createPatternToken(e,n.escCharClass,t,2)}return r._escapedSpecialSymbols.indexOf(o)>=0?(s=r._createPatternToken(e,n.escCharOther,t,2),s.data={n:o.charCodeAt(0),ch:o},s):null},_parseCharRangeToken:function(e,t,i){var r=System.Text.RegularExpressions.RegexEngineParser,n=r.tokenTypes,s=[],o,a,l,u=!1,d=!1,f=!1,C=e[t],E,T,w,k,O,M;if(C!=="[")return null;for(E=t+1,T=-1,E<i&&e[E]==="^"&&(u=!0,E++),k=E;E<i;){if(C=e[E],d=f,C==="-"&&E+1<i&&e[E+1]==="[")a=r._parseCharRangeToken(e,E+1,i),a.childrenPrefix="-"+a.childrenPrefix,a.length++,l=a,w=a.length,f=!0;else if(C==="\\"){if(l=r._parseEscapedChar(e,E,i),l==null)throw new System.ArgumentException.$ctor1("Unrecognized escape sequence \\"+C+".");w=l.length}else if(C==="]"&&E>k){T=E;break}else l=r._createPatternToken(e,n.literal,E,1),w=1;if(d)throw new System.ArgumentException.$ctor1("A subtraction must be the last element in a character class.");s.length>1&&(o=r._parseCharIntervalToken(e,s[s.length-2],s[s.length-1],l),o!=null&&(s.pop(),s.pop(),l=o)),l!=null&&(s.push(l),E+=w)}if(T<0||s.length<1)throw new System.ArgumentException.$ctor1("Unterminated [] set.");return O=u?r._createPatternToken(e,n.charNegativeGroup,t,1+T-t,s,"[^","]"):r._createPatternToken(e,n.charGroup,t,1+T-t,s,"[","]"),M=r._tidyCharRange(s),O.data={ranges:M},a!=null&&(O.data.substractToken=a),O},_parseCharIntervalToken:function(e,t,i,r){var n=System.Text.RegularExpressions.RegexEngineParser,s=n.tokenTypes,o,a,l,u;if(i.type!==s.literal||i.value!=="-"||t.type!==s.literal&&t.type!==s.escChar&&t.type!==s.escCharOctal&&t.type!==s.escCharHex&&t.type!==s.escCharCtrl&&t.type!==s.escCharUnicode&&t.type!==s.escCharOther||r.type!==s.literal&&r.type!==s.escChar&&r.type!==s.escCharOctal&&r.type!==s.escCharHex&&r.type!==s.escCharCtrl&&r.type!==s.escCharUnicode&&r.type!==s.escCharOther)return null;if(t.type===s.literal?(o=t.value.charCodeAt(0),a=t.value):(o=t.data.n,a=t.data.ch),r.type===s.literal?(l=r.value.charCodeAt(0),u=r.value):(l=r.data.n,u=r.data.ch),o>l)throw new System.NotSupportedException.$ctor1("[x-y] range in reverse order.");var d=t.index,f=t.length+i.length+r.length,C=n._createPatternToken(e,s.charInterval,d,f,[t,i,r],"","");return C.data={startN:o,startCh:a,endN:l,endCh:u},C},_tidyCharRange:function(e){for(var t=System.Text.RegularExpressions.RegexEngineParser,i=t.tokenTypes,r,n,s,o,a=[],l=[],u,d,f,C,E=0;E<e.length;E++){if(o=e[E],o.type===i.literal)n=o.value.charCodeAt(0),s=n;else if(o.type===i.charInterval)n=o.data.startN,s=o.data.endN;else if(o.type===i.literal||o.type===i.escChar||o.type===i.escCharOctal||o.type===i.escCharHex||o.type===i.escCharCtrl||o.type===i.escCharUnicode||o.type===i.escCharOther)n=o.data.n,s=n;else{if(o.type===i.charGroup||o.type===i.charNegativeGroup)continue;l.push(o);continue}if(a.length===0){a.push({n,m:s});continue}for(r=0;r<a.length&&!(a[r].n>n);r++);a.splice(r,0,{n,m:s})}for(E=0;E<a.length;E++){for(u=a[E],f=0,r=E+1;r<a.length&&(d=a[r],!(d.n>1+u.m));r++)f++,d.m>u.m&&(u.m=d.m);f>0&&a.splice(E+1,f)}return l.length>0&&(C="["+t._constructPattern(l)+"]",a.charClassToken=t._createPatternToken(C,i.charGroup,0,C.length,e,"[","]")),a},_parseDotToken:function(e,t){var i=System.Text.RegularExpressions.RegexEngineParser,r=i.tokenTypes,n=e[t];return n!=="."?null:i._createPatternToken(e,r.escCharClassDot,t,1)},_parseAnchorToken:function(e,t){var i=System.Text.RegularExpressions.RegexEngineParser,r=i.tokenTypes,n=e[t];return n!=="^"&&n!=="$"?null:i._createPatternToken(e,r.anchor,t,1)},_updateSettingsFromConstructs:function(e,t){t.isIgnoreWhitespace!=null&&(e.ignoreWhitespace=t.isIgnoreWhitespace),t.isExplicitCapture!=null&&(e.explicitCapture=t.isExplicitCapture)},_parseGroupToken:function(e,t,i,r){var n=System.Text.RegularExpressions.RegexEngineParser,s=n.tokenTypes,o={ignoreWhitespace:t.ignoreWhitespace,explicitCapture:t.explicitCapture},a=e[i],l,u,d,f,C,E,T,w,k,O;if(a!=="(")return null;var M=1,P=!1,y=i+1,m=-1,c=!1,$=!1,x=!1,D=!1,G=!1,q=null,z=n._parseGroupConstructToken(e,o,i+1,r);for(z!=null&&(q=this._fillGroupConstructs(z),y+=z.length,z.type===s.commentInline?c=!0:z.type===s.alternationGroupCondition?$=!0:z.type===s.groupConstructImnsx?(this._updateSettingsFromConstructs(o,q),D=!0):z.type===s.groupConstructImnsxMisc&&(this._updateSettingsFromConstructs(t,q),x=!0)),o.explicitCapture&&(q==null||q.name1==null)&&(G=!0),l=y;l<r;){if(a=e[l],a==="\\")l++;else if(a==="[")P=!0;else if(a==="]"&&P)P=!1;else if(!P)if(a!=="("||c){if(a===")"&&(--M,M===0)){m=l;break}}else++M;++l}if(u=null,c){if(m<0)throw new System.ArgumentException.$ctor1("Unterminated (?#...) comment.");u=n._createPatternToken(e,s.commentInline,i,1+m-i)}else{if(m<0)throw new System.ArgumentException.$ctor1("Not enough )'s.");if(d=n._parsePatternImpl(e,o,y,m),z!=null&&d.splice(0,0,z),$){for(f=d.length,T=0,E=0;E<f;E++)if(C=d[E],C.type===s.alternation&&(++T,T>1))throw new System.ArgumentException.$ctor1("Too many | in (?()|).");if(T===0)throw new System.NotSupportedException.$ctor1("Alternation group without | is not supported.");w=n._createPatternToken(e,s.alternationGroup,i,1+m-i,d,"(",")"),u=w}else k=s.group,x?k=s.groupImnsxMisc:D&&(k=s.groupImnsx),O=n._createPatternToken(e,k,i,1+m-i,d,"(",")"),O.localSettings=o,u=O}return G&&(u.isNonCapturingExplicit=!0),u},_parseGroupConstructToken:function(e,t,i,r){var n=System.Text.RegularExpressions.RegexEngineParser,s=n.tokenTypes,o=e[i],a,l,u,d,f,C,E;if(o!=="?"||i+1>=r)return null;if(o=e[i+1],o===":"||o==="="||o==="!"||o===">")return n._createPatternToken(e,s.groupConstruct,i,2);if(o==="#")return n._createPatternToken(e,s.commentInline,i,2);if(o==="(")return n._parseAlternationGroupConditionToken(e,t,i,r);if(o==="<"&&i+2<r&&(a=e[i+2],a==="="||a==="!"))return n._createPatternToken(e,s.groupConstruct,i,3);if(o==="<"||o==="'"){if(l=o==="<"?">":o,u=n._matchUntil(e,i+2,r,l),u.unmatchLength!==1||u.matchLength===0)throw new System.ArgumentException.$ctor1("Unrecognized grouping construct.");if(d=u.match.slice(0,1),"`~@#$%^&*()+{}[]|\\/|'\";:,.?".indexOf(d)>=0)throw new System.ArgumentException.$ctor1("Invalid group name: Group names must begin with a word character.");return n._createPatternToken(e,s.groupConstructName,i,2+u.matchLength+1)}if(f=n._matchChars(e,i+1,r,"imnsx-"),f.matchLength>0&&(f.unmatchCh===":"||f.unmatchCh===")"))return C=f.unmatchCh===":"?s.groupConstructImnsx:s.groupConstructImnsxMisc,E=f.unmatchCh===":"?1:0,n._createPatternToken(e,C,i,1+f.matchLength+E);throw new System.ArgumentException.$ctor1("Unrecognized grouping construct.")},_parseQuantifierToken:function(e,t,i){var r=System.Text.RegularExpressions.RegexEngineParser,n=r.tokenTypes,s=null,o=e[t],a,l,u,d;if(o==="*"||o==="+"||o==="?")s=r._createPatternToken(e,n.quantifier,t,1),s.data={val:o};else if(o==="{"&&(a=r._matchChars(e,t+1,i,r._decSymbols),a.matchLength!==0)){if(a.unmatchCh==="}")s=r._createPatternToken(e,n.quantifierN,t,1+a.matchLength+1),s.data={n:parseInt(a.match,10)};else if(a.unmatchCh===","&&(l=r._matchChars(e,a.unmatchIndex+1,i,r._decSymbols),l.unmatchCh==="}"&&(s=r._createPatternToken(e,n.quantifierNM,t,1+a.matchLength+1+l.matchLength+1),s.data={n:parseInt(a.match,10),m:null},l.matchLength!==0&&(s.data.m=parseInt(l.match,10),s.data.n>s.data.m))))throw new System.ArgumentException.$ctor1("Illegal {x,y} with x > y.")}return s!=null&&(u=t+s.length,u<i&&(d=e[u],d==="?"&&(this._modifyPatternToken(s,e,s.type,s.index,s.length+1),s.data.isLazy=!0))),s},_parseAlternationToken:function(e,t){var i=System.Text.RegularExpressions.RegexEngineParser,r=i.tokenTypes,n=e[t];return n!=="|"?null:i._createPatternToken(e,r.alternation,t,1)},_parseAlternationGroupConditionToken:function(e,t,i,r){var n=System.Text.RegularExpressions.RegexEngineParser,s=n.tokenTypes,o,a,l=null,u=e[i],d,f,C,E,T,w,k;if(u!=="?"||i+1>=r||e[i+1]!=="("||(d=n._parseGroupToken(e,t,i+1,r),d==null))return null;if(d.type===s.commentInline)throw new System.ArgumentException.$ctor1("Alternation conditions cannot be comments.");if(f=d.children,f&&f.length){if(o=f[0],o.type===s.groupConstructName)throw new System.ArgumentException.$ctor1("Alternation conditions do not capture and cannot be named.");if((o.type===s.groupConstruct||o.type===s.groupConstructImnsx)&&(a=n._findFirstGroupWithoutConstructs(f),a!=null&&(a.isEmptyCapturing=!0)),o.type===s.literal)if(C=d.value.slice(1,d.value.length-1),E=C[0]>="0"&&C[0]<="9",E){if(T=n._matchChars(C,0,C.length,n._decSymbols),T.matchLength!==C.length)throw new System.ArgumentException.$ctor1("Malformed Alternation group number: "+C+".");w=parseInt(C,10),l={number:w}}else l={name:C}}return f.length&&(f[0].type===s.groupConstruct||f[0].type===s.groupConstructImnsx)||(o=n._createPatternToken("?:",s.groupConstruct,0,2),f.splice(0,0,o)),k=n._createPatternToken(e,s.alternationGroupCondition,d.index-1,1+d.length,[d],"?",""),l!=null&&(k.data=l),k},_findFirstGroupWithoutConstructs:function(e){for(var t=System.Text.RegularExpressions.RegexEngineParser,i=t.tokenTypes,r=null,n,s=0;s<e.length;++s)if(n=e[s],n.type===i.group&&n.children&&n.children.length){if(n.children[0].type!==i.groupConstruct&&n.children[0].type!==i.groupConstructImnsx){r=n;break}if(n.children&&n.children.length&&(r=t._findFirstGroupWithoutConstructs(n.children),r!=null))break}return r},_parseXModeCommentToken:function(e,t,i){var r=System.Text.RegularExpressions.RegexEngineParser,n=r.tokenTypes,s=e[t],o;if(s!=="#")return null;for(o=t+1;o<i&&(s=e[o],++o,s!==` `););return r._createPatternToken(e,n.commentXMode,t,o-t)},_createLiteralToken:function(e){var t=System.Text.RegularExpressions.RegexEngineParser;return t._createPatternToken(e,t.tokenTypes.literal,0,e.length)},_createPositiveLookaheadToken:function(e,t){var i=System.Text.RegularExpressions.RegexEngineParser,r="(?="+e+")";return i._parseGroupToken(r,t,0,r.length)},_createPatternToken:function(e,t,i,r,n,s,o){var a={type:t,index:i,length:r,value:e.slice(i,i+r)};return n!=null&&n.length>0&&(a.children=n,a.childrenPrefix=s,a.childrenPostfix=o),a},_modifyPatternToken:function(e,t,i,r,n){i!=null&&(e.type=i),(r!=null||n!=null)&&(r!=null&&(e.index=r),n!=null&&(e.length=n),e.value=t.slice(e.index,e.index+e.length))},_updatePatternToken:function(e,t,i,r,n){e.type=t,e.index=i,e.length=r,e.value=n},_matchChars:function(e,t,i,r,n){var s={match:"",matchIndex:-1,matchLength:0,unmatchCh:"",unmatchIndex:-1,unmatchLength:0},o=t,a;for(n!=null&&n>=0&&(i=t+n);o<i;){if(a=e[o],r.indexOf(a)<0){s.unmatchCh=a,s.unmatchIndex=o,s.unmatchLength=1;break}o++}return o>t&&(s.match=e.slice(t,o),s.matchIndex=t,s.matchLength=o-t),s},_matchUntil:function(e,t,i,r,n){var s={match:"",matchIndex:-1,matchLength:0,unmatchCh:"",unmatchIndex:-1,unmatchLength:0},o=t,a;for(n!=null&&n>=0&&(i=t+n);o<i;){if(a=e[o],r.indexOf(a)>=0){s.unmatchCh=a,s.unmatchIndex=o,s.unmatchLength=1;break}o++}return o>t&&(s.match=e.slice(t,o),s.matchIndex=t,s.matchLength=o-t),s}}}),Bridge.define("System.BitConverter",{statics:{fields:{isLittleEndian:!1,arg_ArrayPlusOffTooSmall:null},ctors:{init:function(){this.isLittleEndian=System.BitConverter.getIsLittleEndian(),this.arg_ArrayPlusOffTooSmall="Destination array is not long enough to copy all the items in the collection. Check array index and length."}},methods:{getBytes:function(e){return e?System.Array.init([1],System.Byte):System.Array.init([0],System.Byte)},getBytes$1:function(e){return System.BitConverter.getBytes$3(Bridge.Int.sxs(e&65535))},getBytes$3:function(e){var t=System.BitConverter.view(2);return t.setInt16(0,e),System.BitConverter.getViewBytes(t)},getBytes$4:function(e){var t=System.BitConverter.view(4);return t.setInt32(0,e),System.BitConverter.getViewBytes(t)},getBytes$5:function(e){var t=System.BitConverter.getView(e);return System.BitConverter.getViewBytes(t)},getBytes$7:function(e){var t=System.BitConverter.view(2);return t.setUint16(0,e),System.BitConverter.getViewBytes(t)},getBytes$8:function(e){var t=System.BitConverter.view(4);return t.setUint32(0,e),System.BitConverter.getViewBytes(t)},getBytes$9:function(e){var t=System.BitConverter.getView(System.Int64.clip64(e));return System.BitConverter.getViewBytes(t)},getBytes$6:function(e){var t=System.BitConverter.view(4);return t.setFloat32(0,e),System.BitConverter.getViewBytes(t)},getBytes$2:function(e){if(isNaN(e))return System.BitConverter.isLittleEndian?System.Array.init([0,0,0,0,0,0,248,255],System.Byte):System.Array.init([255,248,0,0,0,0,0,0],System.Byte);var t=System.BitConverter.view(8);return t.setFloat64(0,e),System.BitConverter.getViewBytes(t)},toChar:function(e,t){return System.BitConverter.toInt16(e,t)&65535},toInt16:function(e,t){System.BitConverter.checkArguments(e,t,2);var i=System.BitConverter.view(2);return System.BitConverter.setViewBytes(i,e,-1,t),i.getInt16(0)},toInt32:function(e,t){System.BitConverter.checkArguments(e,t,4);var i=System.BitConverter.view(4);return System.BitConverter.setViewBytes(i,e,-1,t),i.getInt32(0)},toInt64:function(e,t){System.BitConverter.checkArguments(e,t,8);var i=System.BitConverter.toInt32(e,t),r=System.BitConverter.toInt32(e,t+4|0);return System.BitConverter.isLittleEndian?System.Int64([i,r]):System.Int64([r,i])},toUInt16:function(e,t){return System.BitConverter.toInt16(e,t)&65535},toUInt32:function(e,t){return System.BitConverter.toInt32(e,t)>>>0},toUInt64:function(e,t){var i=System.BitConverter.toInt64(e,t);return System.UInt64([i.value.low,i.value.high])},toSingle:function(e,t){System.BitConverter.checkArguments(e,t,4);var i=System.BitConverter.view(4);return System.BitConverter.setViewBytes(i,e,-1,t),i.getFloat32(0)},toDouble:function(e,t){System.BitConverter.checkArguments(e,t,8);var i=System.BitConverter.view(8);return System.BitConverter.setViewBytes(i,e,-1,t),i.getFloat64(0)},toString$2:function(e,t,i){var r;if(e==null)throw new System.ArgumentNullException.$ctor1("value");if(t<0||t>=e.length&&t>0)throw new System.ArgumentOutOfRangeException.$ctor1("startIndex");if(i<0)throw new System.ArgumentOutOfRangeException.$ctor1("length");if(t>(e.length-i|0))throw new System.ArgumentException.$ctor1(System.BitConverter.arg_ArrayPlusOffTooSmall);if(i===0)return"";if(i>715827882)throw new System.ArgumentOutOfRangeException.$ctor4("length",Bridge.toString(715827882));for(var n=Bridge.Int.mul(i,3),s=System.Array.init(n,0,System.Char),a=0,o=t,a=0;a<n;a=a+3|0)r=e[System.Array.index(Bridge.identity(o,o=o+1|0),e)],s[System.Array.index(a,s)]=System.BitConverter.getHexValue(Bridge.Int.div(r,16)|0),s[System.Array.index(a+1|0,s)]=System.BitConverter.getHexValue(r%16),s[System.Array.index(a+2|0,s)]=45;return System.String.fromCharArray(s,0,s.length-1|0)},toString:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("value");return System.BitConverter.toString$2(e,0,e.length)},toString$1:function(e,t){if(e==null)throw new System.ArgumentNullException.$ctor1("value");return System.BitConverter.toString$2(e,t,e.length-t|0)},toBoolean:function(e,t){return System.BitConverter.checkArguments(e,t,1),e[System.Array.index(t,e)]!==0},doubleToInt64Bits:function(e){var t=System.BitConverter.view(8);return t.setFloat64(0,e),System.Int64([t.getInt32(4),t.getInt32(0)])},int64BitsToDouble:function(e){var t=System.BitConverter.getView(e);return t.getFloat64(0)},getHexValue:function(e){return e<10?(e+48|0)&65535:((e-10|0)+65|0)&65535},getViewBytes:function(e,t,i){var r,n,s;if(t===void 0&&(t=-1),i===void 0&&(i=0),t===-1&&(t=e.byteLength),r=System.Array.init(t,0,System.Byte),System.BitConverter.isLittleEndian)for(n=t-1|0;n>=0;n=n-1|0)r[System.Array.index(n,r)]=e.getUint8(Bridge.identity(i,i=i+1|0));else for(s=0;s<t;s=s+1|0)r[System.Array.index(s,r)]=e.getUint8(Bridge.identity(i,i=i+1|0));return r},setViewBytes:function(e,t,i,r){var n,s;if(i===void 0&&(i=-1),r===void 0&&(r=0),i===-1&&(i=e.byteLength),System.BitConverter.isLittleEndian)for(n=i-1|0;n>=0;n=n-1|0)e.setUint8(n,t[System.Array.index(Bridge.identity(r,r=r+1|0),t)]);else for(s=0;s<i;s=s+1|0)e.setUint8(s,t[System.Array.index(Bridge.identity(r,r=r+1|0),t)])},view:function(e){var t=new ArrayBuffer(e);return new DataView(t)},getView:function(e){var t=System.BitConverter.view(8);return t.setInt32(4,e.value.low),t.setInt32(0,e.value.high),t},getIsLittleEndian:function(){var e=System.BitConverter.view(2);return e.setUint8(0,170),e.setUint8(1,187),e.getUint16(0)===43707},checkArguments:function(e,t,i){if(e==null)throw new System.ArgumentNullException.$ctor1("null");if(System.Int64(t>>>0).gte(System.Int64(e.length)))throw new System.ArgumentOutOfRangeException.$ctor1("startIndex");if(t>(e.length-i|0))throw new System.ArgumentException.$ctor1(System.BitConverter.arg_ArrayPlusOffTooSmall)}}}}),Bridge.define("System.Collections.BitArray",{inherits:[System.Collections.ICollection,System.ICloneable],statics:{fields:{BitsPerInt32:0,BytesPerInt32:0,BitsPerByte:0,_ShrinkThreshold:0},ctors:{init:function(){this.BitsPerInt32=32,this.BytesPerInt32=4,this.BitsPerByte=8,this._ShrinkThreshold=256}},methods:{GetArrayLength:function(e,t){return e>0?(Bridge.Int.div(e-1|0,t)|0)+1|0:0}}},fields:{m_array:null,m_length:0,_version:0},props:{Length:{get:function(){return this.m_length},set:function(e){var t,i,r,n;if(e<0)throw new System.ArgumentOutOfRangeException.$ctor4("value","Non-negative number required.");t=System.Collections.BitArray.GetArrayLength(e,System.Collections.BitArray.BitsPerInt32),(t>this.m_array.length||(t+System.Collections.BitArray._ShrinkThreshold|0)<this.m_array.length)&&(i=System.Array.init(t,0,System.Int32),System.Array.copy(this.m_array,0,i,0,t>this.m_array.length?this.m_array.length:t),this.m_array=i),e>this.m_length&&(r=System.Collections.BitArray.GetArrayLength(this.m_length,System.Collections.BitArray.BitsPerInt32)-1|0,n=this.m_length%32,n>0&&(this.m_array[System.Array.index(r,this.m_array)]=this.m_array[System.Array.index(r,this.m_array)]&((1<<n)-1|0)),System.Array.fill(this.m_array,0,r+1|0,(t-r|0)-1|0)),this.m_length=e,this._version=this._version+1|0}},Count:{get:function(){return this.m_length}},System$Collections$ICollection$IsSynchronized:{get:function(){return!1}},System$Collections$ICollection$SyncRoot:{get:function(){return this}},IsReadOnly:{get:function(){return!1}}},alias:["copyTo","System$Collections$ICollection$copyTo","Count","System$Collections$ICollection$Count","clone","System$ICloneable$clone","GetEnumerator","System$Collections$IEnumerable$GetEnumerator"],ctors:{$ctor3:function(e){System.Collections.BitArray.$ctor4.call(this,e,!1)},$ctor4:function(e,t){var i,r;if(this.$initialize(),e<0)throw new System.ArgumentOutOfRangeException.$ctor4("length","Index is less than zero.");for(this.m_array=System.Array.init(System.Collections.BitArray.GetArrayLength(e,System.Collections.BitArray.BitsPerInt32),0,System.Int32),this.m_length=e,i=t?-1:0,r=0;r<this.m_array.length;r=r+1|0)this.m_array[System.Array.index(r,this.m_array)]=i;this._version=0},$ctor1:function(e){var t,i,r;if(this.$initialize(),e==null)throw new System.ArgumentNullException.$ctor1("bytes");if(e.length>268435455)throw new System.ArgumentException.$ctor3(System.String.format("The input array length must not exceed Int32.MaxValue / {0}. Otherwise BitArray.Length would exceed Int32.MaxValue.",[Bridge.box(System.Collections.BitArray.BitsPerByte,System.Int32)]),"bytes");for(this.m_array=System.Array.init(System.Collections.BitArray.GetArrayLength(e.length,System.Collections.BitArray.BytesPerInt32),0,System.Int32),this.m_length=Bridge.Int.mul(e.length,System.Collections.BitArray.BitsPerByte),t=0,i=0;(e.length-i|0)>=4;)this.m_array[System.Array.index(Bridge.identity(t,t=t+1|0),this.m_array)]=e[System.Array.index(i,e)]&255|(e[System.Array.index(i+1|0,e)]&255)<<8|(e[System.Array.index(i+2|0,e)]&255)<<16|(e[System.Array.index(i+3|0,e)]&255)<<24,i=i+4|0;r=e.length-i|0,r===3&&(this.m_array[System.Array.index(t,this.m_array)]=(e[System.Array.index(i+2|0,e)]&255)<<16,r=2),r===2&&(this.m_array[System.Array.index(t,this.m_array)]=this.m_array[System.Array.index(t,this.m_array)]|(e[System.Array.index(i+1|0,e)]&255)<<8,r=1),r===1&&(this.m_array[System.Array.index(t,this.m_array)]=this.m_array[System.Array.index(t,this.m_array)]|e[System.Array.index(i,e)]&255),this._version=0},ctor:function(e){var t,i;if(this.$initialize(),e==null)throw new System.ArgumentNullException.$ctor1("values");for(this.m_array=System.Array.init(System.Collections.BitArray.GetArrayLength(e.length,System.Collections.BitArray.BitsPerInt32),0,System.Int32),this.m_length=e.length,i=0;i<e.length;i=i+1|0)e[System.Array.index(i,e)]&&(this.m_array[System.Array.index(t=Bridge.Int.div(i,32)|0,this.m_array)]=this.m_array[System.Array.index(t,this.m_array)]|1<<i%32);this._version=0},$ctor5:function(e){if(this.$initialize(),e==null)throw new System.ArgumentNullException.$ctor1("values");if(e.length>67108863)throw new System.ArgumentException.$ctor3(System.String.format("The input array length must not exceed Int32.MaxValue / {0}. Otherwise BitArray.Length would exceed Int32.MaxValue.",[Bridge.box(System.Collections.BitArray.BitsPerInt32,System.Int32)]),"values");this.m_array=System.Array.init(e.length,0,System.Int32),this.m_length=Bridge.Int.mul(e.length,System.Collections.BitArray.BitsPerInt32),System.Array.copy(e,0,this.m_array,0,e.length),this._version=0},$ctor2:function(e){if(this.$initialize(),e==null)throw new System.ArgumentNullException.$ctor1("bits");var t=System.Collections.BitArray.GetArrayLength(e.m_length,System.Collections.BitArray.BitsPerInt32);this.m_array=System.Array.init(t,0,System.Int32),this.m_length=e.m_length,System.Array.copy(e.m_array,0,this.m_array,0,t),this._version=e._version}},methods:{getItem:function(e){return this.Get(e)},setItem:function(e,t){this.Set(e,t)},copyTo:function(e,t){var i,r,n,s,o;if(e==null)throw new System.ArgumentNullException.$ctor1("array");if(t<0)throw new System.ArgumentOutOfRangeException.$ctor1("index");if(System.Array.getRank(e)!==1)throw new System.ArgumentException.$ctor1("Only single dimensional arrays are supported for the requested action.");if(Bridge.is(e,System.Array.type(System.Int32)))System.Array.copy(this.m_array,0,e,t,System.Collections.BitArray.GetArrayLength(this.m_length,System.Collections.BitArray.BitsPerInt32));else if(Bridge.is(e,System.Array.type(System.Byte))){if(i=System.Collections.BitArray.GetArrayLength(this.m_length,System.Collections.BitArray.BitsPerByte),(e.length-t|0)<i)throw new System.ArgumentException.$ctor1("Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.");for(r=Bridge.cast(e,System.Array.type(System.Byte)),n=0;n<i;n=n+1|0)r[System.Array.index(t+n|0,r)]=this.m_array[System.Array.index(Bridge.Int.div(n,4)|0,this.m_array)]>>Bridge.Int.mul(n%4,8)&255}else if(Bridge.is(e,System.Array.type(System.Boolean))){if((e.length-t|0)<this.m_length)throw new System.ArgumentException.$ctor1("Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.");for(s=Bridge.cast(e,System.Array.type(System.Boolean)),o=0;o<this.m_length;o=o+1|0)s[System.Array.index(t+o|0,s)]=(this.m_array[System.Array.index(Bridge.Int.div(o,32)|0,this.m_array)]>>o%32&1)!=0}else throw new System.ArgumentException.$ctor1("Only supported array types for CopyTo on BitArrays are Boolean[], Int32[] and Byte[].")},Get:function(e){if(e<0||e>=this.Length)throw new System.ArgumentOutOfRangeException.$ctor4("index","Index was out of range. Must be non-negative and less than the size of the collection.");return(this.m_array[System.Array.index(Bridge.Int.div(e,32)|0,this.m_array)]&1<<e%32)!=0},Set:function(e,t){var i,r;if(e<0||e>=this.Length)throw new System.ArgumentOutOfRangeException.$ctor4("index","Index was out of range. Must be non-negative and less than the size of the collection.");t?this.m_array[System.Array.index(i=Bridge.Int.div(e,32)|0,this.m_array)]=this.m_array[System.Array.index(i,this.m_array)]|1<<e%32:this.m_array[System.Array.index(r=Bridge.Int.div(e,32)|0,this.m_array)]=this.m_array[System.Array.index(r,this.m_array)]&~(1<<e%32),this._version=this._version+1|0},SetAll:function(e){for(var t=e?-1:0,i=System.Collections.BitArray.GetArrayLength(this.m_length,System.Collections.BitArray.BitsPerInt32),r=0;r<i;r=r+1|0)this.m_array[System.Array.index(r,this.m_array)]=t;this._version=this._version+1|0},And:function(e){var t,i;if(e==null)throw new System.ArgumentNullException.$ctor1("value");if(this.Length!==e.Length)throw new System.ArgumentException.$ctor1("Array lengths must be the same.");for(t=System.Collections.BitArray.GetArrayLength(this.m_length,System.Collections.BitArray.BitsPerInt32),i=0;i<t;i=i+1|0)this.m_array[System.Array.index(i,this.m_array)]=this.m_array[System.Array.index(i,this.m_array)]&e.m_array[System.Array.index(i,e.m_array)];return this._version=this._version+1|0,this},Or:function(e){var t,i;if(e==null)throw new System.ArgumentNullException.$ctor1("value");if(this.Length!==e.Length)throw new System.ArgumentException.$ctor1("Array lengths must be the same.");for(t=System.Collections.BitArray.GetArrayLength(this.m_length,System.Collections.BitArray.BitsPerInt32),i=0;i<t;i=i+1|0)this.m_array[System.Array.index(i,this.m_array)]=this.m_array[System.Array.index(i,this.m_array)]|e.m_array[System.Array.index(i,e.m_array)];return this._version=this._version+1|0,this},Xor:function(e){var t,i;if(e==null)throw new System.ArgumentNullException.$ctor1("value");if(this.Length!==e.Length)throw new System.ArgumentException.$ctor1("Array lengths must be the same.");for(t=System.Collections.BitArray.GetArrayLength(this.m_length,System.Collections.BitArray.BitsPerInt32),i=0;i<t;i=i+1|0)this.m_array[System.Array.index(i,this.m_array)]=this.m_array[System.Array.index(i,this.m_array)]^e.m_array[System.Array.index(i,e.m_array)];return this._version=this._version+1|0,this},Not:function(){for(var e=System.Collections.BitArray.GetArrayLength(this.m_length,System.Collections.BitArray.BitsPerInt32),t=0;t<e;t=t+1|0)this.m_array[System.Array.index(t,this.m_array)]=~this.m_array[System.Array.index(t,this.m_array)];return this._version=this._version+1|0,this},clone:function(){var e=new System.Collections.BitArray.$ctor5(this.m_array);return e._version=this._version,e.m_length=this.m_length,e},GetEnumerator:function(){return new System.Collections.BitArray.BitArrayEnumeratorSimple(this)}}}),Bridge.define("System.Collections.BitArray.BitArrayEnumeratorSimple",{inherits:[System.Collections.IEnumerator],$kind:"nested class",fields:{bitarray:null,index:0,version:0,currentElement:!1},props:{Current:{get:function(){if(this.index===-1)throw new System.InvalidOperationException.$ctor1("Enumeration has not started. Call MoveNext.");if(this.index>=this.bitarray.Count)throw new System.InvalidOperationException.$ctor1("Enumeration already finished.");return Bridge.box(this.currentElement,System.Boolean,System.Boolean.toString)}}},alias:["moveNext","System$Collections$IEnumerator$moveNext","Current","System$Collections$IEnumerator$Current","reset","System$Collections$IEnumerator$reset"],ctors:{ctor:function(e){this.$initialize(),this.bitarray=e,this.index=-1,this.version=e._version}},methods:{moveNext:function(){if(this.version!==this.bitarray._version)throw new System.InvalidOperationException.$ctor1("Collection was modified; enumeration operation may not execute.");return this.index<(this.bitarray.Count-1|0)?(this.index=this.index+1|0,this.currentElement=this.bitarray.Get(this.index),!0):(this.index=this.bitarray.Count,!1)},reset:function(){if(this.version!==this.bitarray._version)throw new System.InvalidOperationException.$ctor1("Collection was modified; enumeration operation may not execute.");this.index=-1}}}),Bridge.define("System.Collections.Generic.BitHelper",{statics:{fields:{MarkedBitFlag:0,IntSize:0},ctors:{init:function(){this.MarkedBitFlag=1,this.IntSize=32}},methods:{ToIntArrayLength:function(e){return e>0?(Bridge.Int.div(e-1|0,System.Collections.Generic.BitHelper.IntSize)|0)+1|0:0}}},fields:{_length:0,_array:null},ctors:{ctor:function(e,t){this.$initialize(),this._array=e,this._length=t}},methods:{MarkBit:function(e){var t=Bridge.Int.div(e,System.Collections.Generic.BitHelper.IntSize)|0,i;t<this._length&&t>=0&&(i=System.Collections.Generic.BitHelper.MarkedBitFlag<<e%System.Collections.Generic.BitHelper.IntSize,this._array[System.Array.index(t,this._array)]=this._array[System.Array.index(t,this._array)]|i)},IsMarked:function(e){var t=Bridge.Int.div(e,System.Collections.Generic.BitHelper.IntSize)|0,i;return t<this._length&&t>=0?(i=System.Collections.Generic.BitHelper.MarkedBitFlag<<e%System.Collections.Generic.BitHelper.IntSize,(this._array[System.Array.index(t,this._array)]&i)!=0):!1}}}),Bridge.define("System.Collections.Generic.DictionaryKeyCollectionDebugView$2",function(e,t){return{fields:{_collection:null},props:{Items:{get:function(){var i=System.Array.init(System.Array.getCount(this._collection,e),function(){return Bridge.getDefaultValue(e)},e);return System.Array.copyTo(this._collection,i,0,e),i}}},ctors:{ctor:function(i){if(this.$initialize(),i==null)throw new System.ArgumentNullException.$ctor1("collection");this._collection=i}}}}),Bridge.define("System.Collections.Generic.DictionaryValueCollectionDebugView$2",function(e,t){return{fields:{_collection:null},props:{Items:{get:function(){var i=System.Array.init(System.Array.getCount(this._collection,t),function(){return Bridge.getDefaultValue(t)},t);return System.Array.copyTo(this._collection,i,0,t),i}}},ctors:{ctor:function(i){if(this.$initialize(),i==null)throw new System.ArgumentNullException.$ctor1("collection");this._collection=i}}}}),Bridge.define("Bridge.Collections.EnumerableHelpers",{statics:{methods:{ToArray:function(e,t){var i={},r={v:Bridge.Collections.EnumerableHelpers.ToArray$1(e,t,i)};return System.Array.resize(r,i.v,function(){return Bridge.getDefaultValue(e)},e),r.v},ToArray$1:function(e,t,i){var r=Bridge.getEnumerator(t,e),n,s,o,a,l;try{if(r.System$Collections$IEnumerator$moveNext()){for(n=4,s={v:System.Array.init(n,function(){return Bridge.getDefaultValue(e)},e)},s.v[System.Array.index(0,s.v)]=r[Bridge.geti(r,"System$Collections$Generic$IEnumerator$1$"+Bridge.getTypeAlias(e)+"$Current$1","System$Collections$Generic$IEnumerator$1$Current$1")],o=1;r.System$Collections$IEnumerator$moveNext();)o===s.v.length&&(a=2146435071,l=o<<1,l>>>0>a&&(l=a<=o?o+1|0:a),System.Array.resize(s,l,function(){return Bridge.getDefaultValue(e)},e)),s.v[System.Array.index(Bridge.identity(o,o=o+1|0),s.v)]=r[Bridge.geti(r,"System$Collections$Generic$IEnumerator$1$"+Bridge.getTypeAlias(e)+"$Current$1","System$Collections$Generic$IEnumerator$1$Current$1")];return i.v=o,s.v}}finally{Bridge.hasValue(r)&&r.System$IDisposable$Dispose()}return i.v=0,System.Array.init(0,function(){return Bridge.getDefaultValue(e)},e)}}}}),Bridge.define("System.Collections.Generic.HashSet$1",function(e){return{inherits:[System.Collections.Generic.ICollection$1(e),System.Collections.Generic.ISet$1(e),System.Collections.Generic.IReadOnlyCollection$1(e)],statics:{fields:{Lower31BitMask:0,ShrinkThreshold:0},ctors:{init:function(){this.Lower31BitMask=2147483647,this.ShrinkThreshold=3}},methods:{HashSetEquals:function(t,i,r){var n,s,o,a,l,u,d;if(t==null)return i==null;if(i==null)return!1;if(System.Collections.Generic.HashSet$1(e).AreEqualityComparersEqual(t,i)){if(t.Count!==i.Count)return!1;n=Bridge.getEnumerator(i);try{for(;n.moveNext();)if(a=n.Current,!t.contains(a))return!1}finally{Bridge.is(n,System.IDisposable)&&n.System$IDisposable$Dispose()}return!0}else{s=Bridge.getEnumerator(i);try{for(;s.moveNext();){l=s.Current,u=!1,o=Bridge.getEnumerator(t);try{for(;o.moveNext();)if(d=o.Current,r[Bridge.geti(r,"System$Collections$Generic$IEqualityComparer$1$"+Bridge.getTypeAlias(e)+"$equals2","System$Collections$Generic$IEqualityComparer$1$equals2")](l,d)){u=!0;break}}finally{Bridge.is(o,System.IDisposable)&&o.System$IDisposable$Dispose()}if(!u)return!1}}finally{Bridge.is(s,System.IDisposable)&&s.System$IDisposable$Dispose()}return!0}},AreEqualityComparersEqual:function(t,i){return Bridge.equals(t.Comparer,i.Comparer)}}},fields:{_buckets:null,_slots:null,_count:0,_lastIndex:0,_freeList:0,_comparer:null,_version:0},props:{Count:{get:function(){return this._count}},IsReadOnly:{get:function(){return!1}},Comparer:{get:function(){return this._comparer}}},alias:["System$Collections$Generic$ICollection$1$add","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$add","clear","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$clear","contains","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$contains","copyTo","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$copyTo","remove","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$remove","Count",["System$Collections$Generic$IReadOnlyCollection$1$"+Bridge.getTypeAlias(e)+"$Count","System$Collections$Generic$IReadOnlyCollection$1$Count"],"Count","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$Count","IsReadOnly","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$IsReadOnly","System$Collections$Generic$IEnumerable$1$GetEnumerator","System$Collections$Generic$IEnumerable$1$"+Bridge.getTypeAlias(e)+"$GetEnumerator","add","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$add","unionWith","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$unionWith","intersectWith","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$intersectWith","exceptWith","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$exceptWith","symmetricExceptWith","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$symmetricExceptWith","isSubsetOf","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$isSubsetOf","isProperSubsetOf","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$isProperSubsetOf","isSupersetOf","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$isSupersetOf","isProperSupersetOf","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$isProperSupersetOf","overlaps","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$overlaps","setEquals","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$setEquals"],ctors:{ctor:function(){System.Collections.Generic.HashSet$1(e).$ctor3.call(this,System.Collections.Generic.EqualityComparer$1(e).def)},$ctor3:function(t){this.$initialize(),t==null&&(t=System.Collections.Generic.EqualityComparer$1(e).def),this._comparer=t,this._lastIndex=0,this._count=0,this._freeList=-1,this._version=0},$ctor1:function(t){System.Collections.Generic.HashSet$1(e).$ctor2.call(this,t,System.Collections.Generic.EqualityComparer$1(e).def)},$ctor2:function(t,i){if(System.Collections.Generic.HashSet$1(e).$ctor3.call(this,i),t==null)throw new System.ArgumentNullException.$ctor1("collection");var r=0,n=Bridge.as(t,System.Collections.Generic.ICollection$1(e));n!=null&&(r=System.Array.getCount(n,e)),this.Initialize(r),this.unionWith(t),(this._count===0&&this._slots.length>System.Collections.HashHelpers.GetMinPrime()||this._count>0&&(Bridge.Int.div(this._slots.length,this._count)|0)>System.Collections.Generic.HashSet$1(e).ShrinkThreshold)&&this.TrimExcess()}},methods:{System$Collections$Generic$ICollection$1$add:function(t){this.AddIfNotPresent(t)},add:function(t){return this.AddIfNotPresent(t)},clear:function(){var t,i;if(this._lastIndex>0){for(t=0;t<this._lastIndex;t=t+1|0)this._slots[System.Array.index(t,this._slots)]=new(System.Collections.Generic.HashSet$1.Slot(e));for(i=0;i<this._buckets.length;i=i+1|0)this._buckets[System.Array.index(i,this._buckets)]=0;this._lastIndex=0,this._count=0,this._freeList=-1}this._version=this._version+1|0},ArrayClear:function(t,i,r){},contains:function(t){var i,r;if(this._buckets!=null){for(i=this.InternalGetHashCode(t),r=this._buckets[System.Array.index(i%this._buckets.length,this._buckets)]-1|0;r>=0;r=this._slots[System.Array.index(r,this._slots)].next)if(this._slots[System.Array.index(r,this._slots)].hashCode===i&&this._comparer[Bridge.geti(this._comparer,"System$Collections$Generic$IEqualityComparer$1$"+Bridge.getTypeAlias(e)+"$equals2","System$Collections$Generic$IEqualityComparer$1$equals2")](this._slots[System.Array.index(r,this._slots)].value,t))return!0}return!1},copyTo:function(t,i){this.CopyTo$1(t,i,this._count)},CopyTo:function(t){this.CopyTo$1(t,0,this._count)},CopyTo$1:function(t,i,r){var n,s;if(t==null)throw new System.ArgumentNullException.$ctor1("array");if(i<0)throw new System.ArgumentOutOfRangeException.$ctor1("arrayIndex");if(r<0)throw new System.ArgumentOutOfRangeException.$ctor1("count");if(i>t.length||r>(t.length-i|0))throw new System.ArgumentException.$ctor1("Destination array is not long enough to copy all the items in the collection. Check array index and length.");for(n=0,s=0;s<this._lastIndex&&n<r;s=s+1|0)this._slots[System.Array.index(s,this._slots)].hashCode>=0&&(t[System.Array.index(i+n|0,t)]=this._slots[System.Array.index(s,this._slots)].value,n=n+1|0)},remove:function(t){var i;if(this._buckets!=null){var r=this.InternalGetHashCode(t),n=r%this._buckets.length,s=-1;for(i=this._buckets[System.Array.index(n,this._buckets)]-1|0;i>=0;s=i,i=this._slots[System.Array.index(i,this._slots)].next)if(this._slots[System.Array.index(i,this._slots)].hashCode===r&&this._comparer[Bridge.geti(this._comparer,"System$Collections$Generic$IEqualityComparer$1$"+Bridge.getTypeAlias(e)+"$equals2","System$Collections$Generic$IEqualityComparer$1$equals2")](this._slots[System.Array.index(i,this._slots)].value,t))return s<0?this._buckets[System.Array.index(n,this._buckets)]=this._slots[System.Array.index(i,this._slots)].next+1|0:this._slots[System.Array.index(s,this._slots)].next=this._slots[System.Array.index(i,this._slots)].next,this._slots[System.Array.index(i,this._slots)].hashCode=-1,this._slots[System.Array.index(i,this._slots)].value=Bridge.getDefaultValue(e),this._slots[System.Array.index(i,this._slots)].next=this._freeList,this._count=this._count-1|0,this._version=this._version+1|0,this._count===0?(this._lastIndex=0,this._freeList=-1):this._freeList=i,!0}return!1},GetEnumerator:function(){return new(System.Collections.Generic.HashSet$1.Enumerator(e)).$ctor1(this)},System$Collections$Generic$IEnumerable$1$GetEnumerator:function(){return new(System.Collections.Generic.HashSet$1.Enumerator(e)).$ctor1(this).$clone()},System$Collections$IEnumerable$GetEnumerator:function(){return new(System.Collections.Generic.HashSet$1.Enumerator(e)).$ctor1(this).$clone()},unionWith:function(t){var i,r;if(t==null)throw new System.ArgumentNullException.$ctor1("other");i=Bridge.getEnumerator(t,e);try{for(;i.moveNext();)r=i.Current,this.AddIfNotPresent(r)}finally{Bridge.is(i,System.IDisposable)&&i.System$IDisposable$Dispose()}},intersectWith:function(t){var i,r;if(t==null)throw new System.ArgumentNullException.$ctor1("other");if(this._count!==0){if(i=Bridge.as(t,System.Collections.Generic.ICollection$1(e)),i!=null){if(System.Array.getCount(i,e)===0){this.clear();return}if(r=Bridge.as(t,System.Collections.Generic.HashSet$1(e)),r!=null&&System.Collections.Generic.HashSet$1(e).AreEqualityComparersEqual(this,r)){this.IntersectWithHashSetWithSameEC(r);return}}this.IntersectWithEnumerable(t)}},exceptWith:function(t){var i,r;if(t==null)throw new System.ArgumentNullException.$ctor1("other");if(this._count!==0){if(Bridge.referenceEquals(t,this)){this.clear();return}i=Bridge.getEnumerator(t,e);try{for(;i.moveNext();)r=i.Current,this.remove(r)}finally{Bridge.is(i,System.IDisposable)&&i.System$IDisposable$Dispose()}}},symmetricExceptWith:function(t){if(t==null)throw new System.ArgumentNullException.$ctor1("other");if(this._count===0){this.unionWith(t);return}if(Bridge.referenceEquals(t,this)){this.clear();return}var i=Bridge.as(t,System.Collections.Generic.HashSet$1(e));i!=null&&System.Collections.Generic.HashSet$1(e).AreEqualityComparersEqual(this,i)?this.SymmetricExceptWithUniqueHashSet(i):this.SymmetricExceptWithEnumerable(t)},isSubsetOf:function(t){var i,r;if(t==null)throw new System.ArgumentNullException.$ctor1("other");return this._count===0?!0:(i=Bridge.as(t,System.Collections.Generic.HashSet$1(e)),i!=null&&System.Collections.Generic.HashSet$1(e).AreEqualityComparersEqual(this,i)?this._count>i.Count?!1:this.IsSubsetOfHashSetWithSameEC(i):(r=this.CheckUniqueAndUnfoundElements(t,!1),r.uniqueCount===this._count&&r.unfoundCount>=0))},isProperSubsetOf:function(t){var i,r,n;if(t==null)throw new System.ArgumentNullException.$ctor1("other");if(i=Bridge.as(t,System.Collections.Generic.ICollection$1(e)),i!=null){if(this._count===0)return System.Array.getCount(i,e)>0;if(r=Bridge.as(t,System.Collections.Generic.HashSet$1(e)),r!=null&&System.Collections.Generic.HashSet$1(e).AreEqualityComparersEqual(this,r))return this._count>=r.Count?!1:this.IsSubsetOfHashSetWithSameEC(r)}return n=this.CheckUniqueAndUnfoundElements(t,!1),n.uniqueCount===this._count&&n.unfoundCount>0},isSupersetOf:function(t){var i,r;if(t==null)throw new System.ArgumentNullException.$ctor1("other");if(i=Bridge.as(t,System.Collections.Generic.ICollection$1(e)),i!=null){if(System.Array.getCount(i,e)===0)return!0;if(r=Bridge.as(t,System.Collections.Generic.HashSet$1(e)),r!=null&&System.Collections.Generic.HashSet$1(e).AreEqualityComparersEqual(this,r)&&r.Count>this._count)return!1}return this.ContainsAllElements(t)},isProperSupersetOf:function(t){var i,r,n;if(t==null)throw new System.ArgumentNullException.$ctor1("other");if(this._count===0)return!1;if(i=Bridge.as(t,System.Collections.Generic.ICollection$1(e)),i!=null){if(System.Array.getCount(i,e)===0)return!0;if(r=Bridge.as(t,System.Collections.Generic.HashSet$1(e)),r!=null&&System.Collections.Generic.HashSet$1(e).AreEqualityComparersEqual(this,r))return r.Count>=this._count?!1:this.ContainsAllElements(r)}return n=this.CheckUniqueAndUnfoundElements(t,!0),n.uniqueCount<this._count&&n.unfoundCount===0},overlaps:function(t){var i,r;if(t==null)throw new System.ArgumentNullException.$ctor1("other");if(this._count===0)return!1;i=Bridge.getEnumerator(t,e);try{for(;i.moveNext();)if(r=i.Current,this.contains(r))return!0}finally{Bridge.is(i,System.IDisposable)&&i.System$IDisposable$Dispose()}return!1},setEquals:function(t){var i,r,n;if(t==null)throw new System.ArgumentNullException.$ctor1("other");return i=Bridge.as(t,System.Collections.Generic.HashSet$1(e)),i!=null&&System.Collections.Generic.HashSet$1(e).AreEqualityComparersEqual(this,i)?this._count!==i.Count?!1:this.ContainsAllElements(i):(r=Bridge.as(t,System.Collections.Generic.ICollection$1(e)),r!=null&&this._count===0&&System.Array.getCount(r,e)>0?!1:(n=this.CheckUniqueAndUnfoundElements(t,!0),n.uniqueCount===this._count&&n.unfoundCount===0))},RemoveWhere:function(t){var i,r,n;if(Bridge.staticEquals(t,null))throw new System.ArgumentNullException.$ctor1("match");for(i=0,r=0;r<this._lastIndex;r=r+1|0)this._slots[System.Array.index(r,this._slots)].hashCode>=0&&(n=this._slots[System.Array.index(r,this._slots)].value,t(n)&&this.remove(n)&&(i=i+1|0));return i},TrimExcess:function(){var t,i;if(this._count===0)this._buckets=null,this._slots=null,this._version=this._version+1|0;else{var r=System.Collections.HashHelpers.GetPrime(this._count),n=System.Array.init(r,function(){return new(System.Collections.Generic.HashSet$1.Slot(e))},System.Collections.Generic.HashSet$1.Slot(e)),s=System.Array.init(r,0,System.Int32),o=0;for(t=0;t<this._lastIndex;t=t+1|0)this._slots[System.Array.index(t,this._slots)].hashCode>=0&&(n[System.Array.index(o,n)]=this._slots[System.Array.index(t,this._slots)].$clone(),i=n[System.Array.index(o,n)].hashCode%r,n[System.Array.index(o,n)].next=s[System.Array.index(i,s)]-1|0,s[System.Array.index(i,s)]=o+1|0,o=o+1|0);this._lastIndex=o,this._slots=n,this._buckets=s,this._freeList=-1}},Initialize:function(t){var i=System.Collections.HashHelpers.GetPrime(t);this._buckets=System.Array.init(i,0,System.Int32),this._slots=System.Array.init(i,function(){return new(System.Collections.Generic.HashSet$1.Slot(e))},System.Collections.Generic.HashSet$1.Slot(e))},IncreaseCapacity:function(){var t=System.Collections.HashHelpers.ExpandPrime(this._count);if(t<=this._count)throw new System.ArgumentException.$ctor1("HashSet capacity is too big.");this.SetCapacity(t,!1)},SetCapacity:function(t,i){var r=System.Array.init(t,function(){return new(System.Collections.Generic.HashSet$1.Slot(e))},System.Collections.Generic.HashSet$1.Slot(e)),n,s,o,a,l;if(this._slots!=null)for(n=0;n<this._lastIndex;n=n+1|0)r[System.Array.index(n,r)]=this._slots[System.Array.index(n,this._slots)].$clone();if(i)for(s=0;s<this._lastIndex;s=s+1|0)r[System.Array.index(s,r)].hashCode!==-1&&(r[System.Array.index(s,r)].hashCode=this.InternalGetHashCode(r[System.Array.index(s,r)].value));for(o=System.Array.init(t,0,System.Int32),a=0;a<this._lastIndex;a=a+1|0)l=r[System.Array.index(a,r)].hashCode%t,r[System.Array.index(a,r)].next=o[System.Array.index(l,o)]-1|0,o[System.Array.index(l,o)]=a+1|0;this._slots=r,this._buckets=o},AddIfNotPresent:function(t){var i,r,n,s;for(this._buckets==null&&this.Initialize(0),i=this.InternalGetHashCode(t),r=i%this._buckets.length,n=this._buckets[System.Array.index(r,this._buckets)]-1|0;n>=0;n=this._slots[System.Array.index(n,this._slots)].next)if(this._slots[System.Array.index(n,this._slots)].hashCode===i&&this._comparer[Bridge.geti(this._comparer,"System$Collections$Generic$IEqualityComparer$1$"+Bridge.getTypeAlias(e)+"$equals2","System$Collections$Generic$IEqualityComparer$1$equals2")](this._slots[System.Array.index(n,this._slots)].value,t))return!1;return this._freeList>=0?(s=this._freeList,this._freeList=this._slots[System.Array.index(s,this._slots)].next):(this._lastIndex===this._slots.length&&(this.IncreaseCapacity(),r=i%this._buckets.length),s=this._lastIndex,this._lastIndex=this._lastIndex+1|0),this._slots[System.Array.index(s,this._slots)].hashCode=i,this._slots[System.Array.index(s,this._slots)].value=t,this._slots[System.Array.index(s,this._slots)].next=this._buckets[System.Array.index(r,this._buckets)]-1|0,this._buckets[System.Array.index(r,this._buckets)]=s+1|0,this._count=this._count+1|0,this._version=this._version+1|0,!0},ContainsAllElements:function(t){var i,r;i=Bridge.getEnumerator(t,e);try{for(;i.moveNext();)if(r=i.Current,!this.contains(r))return!1}finally{Bridge.is(i,System.IDisposable)&&i.System$IDisposable$Dispose()}return!0},IsSubsetOfHashSetWithSameEC:function(t){var i,r;i=Bridge.getEnumerator(this);try{for(;i.moveNext();)if(r=i.Current,!t.contains(r))return!1}finally{Bridge.is(i,System.IDisposable)&&i.System$IDisposable$Dispose()}return!0},IntersectWithHashSetWithSameEC:function(t){for(var i,r=0;r<this._lastIndex;r=r+1|0)this._slots[System.Array.index(r,this._slots)].hashCode>=0&&(i=this._slots[System.Array.index(r,this._slots)].value,t.contains(i)||this.remove(i))},IntersectWithEnumerable:function(t){var i,r=this._lastIndex,n=System.Collections.Generic.BitHelper.ToIntArrayLength(r),s,o=System.Array.init(n,0,System.Int32),a,l,u;s=new System.Collections.Generic.BitHelper(o,n),i=Bridge.getEnumerator(t,e);try{for(;i.moveNext();)a=i.Current,l=this.InternalIndexOf(a),l>=0&&s.MarkBit(l)}finally{Bridge.is(i,System.IDisposable)&&i.System$IDisposable$Dispose()}for(u=0;u<r;u=u+1|0)this._slots[System.Array.index(u,this._slots)].hashCode>=0&&!s.IsMarked(u)&&this.remove(this._slots[System.Array.index(u,this._slots)].value)},InternalIndexOf:function(t){for(var i=this.InternalGetHashCode(t),r=this._buckets[System.Array.index(i%this._buckets.length,this._buckets)]-1|0;r>=0;r=this._slots[System.Array.index(r,this._slots)].next)if(this._slots[System.Array.index(r,this._slots)].hashCode===i&&this._comparer[Bridge.geti(this._comparer,"System$Collections$Generic$IEqualityComparer$1$"+Bridge.getTypeAlias(e)+"$equals2","System$Collections$Generic$IEqualityComparer$1$equals2")](this._slots[System.Array.index(r,this._slots)].value,t))return r;return-1},SymmetricExceptWithUniqueHashSet:function(t){var i,r;i=Bridge.getEnumerator(t);try{for(;i.moveNext();)r=i.Current,this.remove(r)||this.AddIfNotPresent(r)}finally{Bridge.is(i,System.IDisposable)&&i.System$IDisposable$Dispose()}},SymmetricExceptWithEnumerable:function(t){var i,r=this._lastIndex,n=System.Collections.Generic.BitHelper.ToIntArrayLength(r),s,o,a=System.Array.init(n,0,System.Int32),l,u;s=new System.Collections.Generic.BitHelper(a,n),l=System.Array.init(n,0,System.Int32),o=new System.Collections.Generic.BitHelper(l,n),i=Bridge.getEnumerator(t,e);try{for(;i.moveNext();){var d=i.Current,f={v:0},C=this.AddOrGetLocation(d,f);C?o.MarkBit(f.v):f.v<r&&!o.IsMarked(f.v)&&s.MarkBit(f.v)}}finally{Bridge.is(i,System.IDisposable)&&i.System$IDisposable$Dispose()}for(u=0;u<r;u=u+1|0)s.IsMarked(u)&&this.remove(this._slots[System.Array.index(u,this._slots)].value)},AddOrGetLocation:function(t,i){for(var r,n=this.InternalGetHashCode(t),s=n%this._buckets.length,o=this._buckets[System.Array.index(s,this._buckets)]-1|0;o>=0;o=this._slots[System.Array.index(o,this._slots)].next)if(this._slots[System.Array.index(o,this._slots)].hashCode===n&&this._comparer[Bridge.geti(this._comparer,"System$Collections$Generic$IEqualityComparer$1$"+Bridge.getTypeAlias(e)+"$equals2","System$Collections$Generic$IEqualityComparer$1$equals2")](this._slots[System.Array.index(o,this._slots)].value,t))return i.v=o,!1;return this._freeList>=0?(r=this._freeList,this._freeList=this._slots[System.Array.index(r,this._slots)].next):(this._lastIndex===this._slots.length&&(this.IncreaseCapacity(),s=n%this._buckets.length),r=this._lastIndex,this._lastIndex=this._lastIndex+1|0),this._slots[System.Array.index(r,this._slots)].hashCode=n,this._slots[System.Array.index(r,this._slots)].value=t,this._slots[System.Array.index(r,this._slots)].next=this._buckets[System.Array.index(s,this._buckets)]-1|0,this._buckets[System.Array.index(s,this._buckets)]=r+1|0,this._count=this._count+1|0,this._version=this._version+1|0,i.v=r,!0},CheckUniqueAndUnfoundElements:function(t,i){var r,n,s=new(System.Collections.Generic.HashSet$1.ElementCount(e)),o,a,l,u,d,f;if(this._count===0){o=0,r=Bridge.getEnumerator(t,e);try{for(;r.moveNext();){a=r.Current,o=o+1|0;break}}finally{Bridge.is(r,System.IDisposable)&&r.System$IDisposable$Dispose()}return s.uniqueCount=0,s.unfoundCount=o,s.$clone()}var C=this._lastIndex,E=System.Collections.Generic.BitHelper.ToIntArrayLength(C),T,w=System.Array.init(E,0,System.Int32);T=new System.Collections.Generic.BitHelper(w,E),l=0,u=0,n=Bridge.getEnumerator(t,e);try{for(;n.moveNext();)if(d=n.Current,f=this.InternalIndexOf(d),f>=0)T.IsMarked(f)||(T.MarkBit(f),u=u+1|0);else if(l=l+1|0,i)break}finally{Bridge.is(n,System.IDisposable)&&n.System$IDisposable$Dispose()}return s.uniqueCount=u,s.unfoundCount=l,s.$clone()},ToArray:function(){var t=System.Array.init(this.Count,function(){return Bridge.getDefaultValue(e)},e);return this.CopyTo(t),t},InternalGetHashCode:function(t){return t==null?0:this._comparer[Bridge.geti(this._comparer,"System$Collections$Generic$IEqualityComparer$1$"+Bridge.getTypeAlias(e)+"$getHashCode2","System$Collections$Generic$IEqualityComparer$1$getHashCode2")](t)&System.Collections.Generic.HashSet$1(e).Lower31BitMask}}}}),Bridge.define("System.Collections.Generic.HashSet$1.ElementCount",function(e){return{$kind:"nested struct",statics:{methods:{getDefaultValue:function(){return new(System.Collections.Generic.HashSet$1.ElementCount(e))}}},fields:{uniqueCount:0,unfoundCount:0},ctors:{ctor:function(){this.$initialize()}},methods:{getHashCode:function(){return Bridge.addHash([4920463385,this.uniqueCount,this.unfoundCount])},equals:function(t){return Bridge.is(t,System.Collections.Generic.HashSet$1.ElementCount(e))?Bridge.equals(this.uniqueCount,t.uniqueCount)&&Bridge.equals(this.unfoundCount,t.unfoundCount):!1},$clone:function(t){var i=t||new(System.Collections.Generic.HashSet$1.ElementCount(e));return i.uniqueCount=this.uniqueCount,i.unfoundCount=this.unfoundCount,i}}}}),Bridge.define("System.Collections.Generic.HashSet$1.Enumerator",function(e){return{inherits:[System.Collections.Generic.IEnumerator$1(e)],$kind:"nested struct",statics:{methods:{getDefaultValue:function(){return new(System.Collections.Generic.HashSet$1.Enumerator(e))}}},fields:{_set:null,_index:0,_version:0,_current:Bridge.getDefaultValue(e)},props:{Current:{get:function(){return this._current}},System$Collections$IEnumerator$Current:{get:function(){if(this._index===0||this._index===(this._set._lastIndex+1|0))throw new System.InvalidOperationException.$ctor1("Enumeration has either not started or has already finished.");return this.Current}}},alias:["Dispose","System$IDisposable$Dispose","moveNext","System$Collections$IEnumerator$moveNext","Current",["System$Collections$Generic$IEnumerator$1$"+Bridge.getTypeAlias(e)+"$Current$1","System$Collections$Generic$IEnumerator$1$Current$1"]],ctors:{$ctor1:function(t){this.$initialize(),this._set=t,this._index=0,this._version=t._version,this._current=Bridge.getDefaultValue(e)},ctor:function(){this.$initialize()}},methods:{Dispose:function(){},moveNext:function(){var t,i;if(this._version!==this._set._version)throw new System.InvalidOperationException.$ctor1("Collection was modified; enumeration operation may not execute.");for(;this._index<this._set._lastIndex;){if((t=this._set._slots)[System.Array.index(this._index,t)].hashCode>=0)return this._current=(i=this._set._slots)[System.Array.index(this._index,i)].value,this._index=this._index+1|0,!0;this._index=this._index+1|0}return this._index=this._set._lastIndex+1|0,this._current=Bridge.getDefaultValue(e),!1},System$Collections$IEnumerator$reset:function(){if(this._version!==this._set._version)throw new System.InvalidOperationException.$ctor1("Collection was modified; enumeration operation may not execute.");this._index=0,this._current=Bridge.getDefaultValue(e)},getHashCode:function(){return Bridge.addHash([3788985113,this._set,this._index,this._version,this._current])},equals:function(t){return Bridge.is(t,System.Collections.Generic.HashSet$1.Enumerator(e))?Bridge.equals(this._set,t._set)&&Bridge.equals(this._index,t._index)&&Bridge.equals(this._version,t._version)&&Bridge.equals(this._current,t._current):!1},$clone:function(t){var i=t||new(System.Collections.Generic.HashSet$1.Enumerator(e));return i._set=this._set,i._index=this._index,i._version=this._version,i._current=this._current,i}}}}),Bridge.define("System.Collections.Generic.HashSet$1.Slot",function(e){return{$kind:"nested struct",statics:{methods:{getDefaultValue:function(){return new(System.Collections.Generic.HashSet$1.Slot(e))}}},fields:{hashCode:0,value:Bridge.getDefaultValue(e),next:0},ctors:{ctor:function(){this.$initialize()}},methods:{getHashCode:function(){return Bridge.addHash([1953459283,this.hashCode,this.value,this.next])},equals:function(t){return Bridge.is(t,System.Collections.Generic.HashSet$1.Slot(e))?Bridge.equals(this.hashCode,t.hashCode)&&Bridge.equals(this.value,t.value)&&Bridge.equals(this.next,t.next):!1},$clone:function(t){var i=t||new(System.Collections.Generic.HashSet$1.Slot(e));return i.hashCode=this.hashCode,i.value=this.value,i.next=this.next,i}}}}),Bridge.define("System.Collections.Generic.List$1.Enumerator",function(e){return{inherits:[System.Collections.Generic.IEnumerator$1(e),System.Collections.IEnumerator],$kind:"nested struct",statics:{methods:{getDefaultValue:function(){return new(System.Collections.Generic.List$1.Enumerator(e))}}},fields:{list:null,index:0,version:0,current:Bridge.getDefaultValue(e)},props:{Current:{get:function(){return this.current}},System$Collections$IEnumerator$Current:{get:function(){if(this.index===0||this.index===(this.list._size+1|0))throw new System.InvalidOperationException.ctor;return this.Current}}},alias:["Dispose","System$IDisposable$Dispose","moveNext","System$Collections$IEnumerator$moveNext","Current",["System$Collections$Generic$IEnumerator$1$"+Bridge.getTypeAlias(e)+"$Current$1","System$Collections$Generic$IEnumerator$1$Current$1"]],ctors:{$ctor1:function(t){this.$initialize(),this.list=t,this.index=0,this.version=t._version,this.current=Bridge.getDefaultValue(e)},ctor:function(){this.$initialize()}},methods:{Dispose:function(){},moveNext:function(){var t=this.list;return this.version===t._version&&this.index>>>0<t._size>>>0?(this.current=t._items[System.Array.index(this.index,t._items)],this.index=this.index+1|0,!0):this.MoveNextRare()},MoveNextRare:function(){if(this.version!==this.list._version)throw new System.InvalidOperationException.ctor;return this.index=this.list._size+1|0,this.current=Bridge.getDefaultValue(e),!1},System$Collections$IEnumerator$reset:function(){if(this.version!==this.list._version)throw new System.InvalidOperationException.ctor;this.index=0,this.current=Bridge.getDefaultValue(e)},getHashCode:function(){return Bridge.addHash([3788985113,this.list,this.index,this.version,this.current])},equals:function(t){return Bridge.is(t,System.Collections.Generic.List$1.Enumerator(e))?Bridge.equals(this.list,t.list)&&Bridge.equals(this.index,t.index)&&Bridge.equals(this.version,t.version)&&Bridge.equals(this.current,t.current):!1},$clone:function(t){var i=t||new(System.Collections.Generic.List$1.Enumerator(e));return i.list=this.list,i.index=this.index,i.version=this.version,i.current=this.current,i}}}}),Bridge.define("System.Collections.Generic.Queue$1",function(e){return{inherits:[System.Collections.Generic.IEnumerable$1(e),System.Collections.ICollection,System.Collections.Generic.IReadOnlyCollection$1(e)],statics:{fields:{MinimumGrow:0,GrowFactor:0,DefaultCapacity:0},ctors:{init:function(){this.MinimumGrow=4,this.GrowFactor=200,this.DefaultCapacity=4}}},fields:{_array:null,_head:0,_tail:0,_size:0,_version:0},props:{Count:{get:function(){return this._size}},System$Collections$ICollection$IsSynchronized:{get:function(){return!1}},System$Collections$ICollection$SyncRoot:{get:function(){return this}},IsReadOnly:{get:function(){return!1}}},alias:["Count",["System$Collections$Generic$IReadOnlyCollection$1$"+Bridge.getTypeAlias(e)+"$Count","System$Collections$Generic$IReadOnlyCollection$1$Count"],"Count","System$Collections$ICollection$Count","copyTo","System$Collections$ICollection$copyTo","System$Collections$Generic$IEnumerable$1$GetEnumerator","System$Collections$Generic$IEnumerable$1$"+Bridge.getTypeAlias(e)+"$GetEnumerator"],ctors:{ctor:function(){this.$initialize(),this._array=System.Array.init(0,function(){return Bridge.getDefaultValue(e)},e)},$ctor2:function(t){if(this.$initialize(),t<0)throw new System.ArgumentOutOfRangeException.$ctor4("capacity","Non-negative number required.");this._array=System.Array.init(t,function(){return Bridge.getDefaultValue(e)},e)},$ctor1:function(t){if(this.$initialize(),t==null)throw new System.ArgumentNullException.$ctor1("collection");this._array=System.Array.init(System.Collections.Generic.Queue$1(e).DefaultCapacity,function(){return Bridge.getDefaultValue(e)},e);var i=Bridge.getEnumerator(t,e);try{for(;i.System$Collections$IEnumerator$moveNext();)this.Enqueue(i[Bridge.geti(i,"System$Collections$Generic$IEnumerator$1$"+Bridge.getTypeAlias(e)+"$Current$1","System$Collections$Generic$IEnumerator$1$Current$1")])}finally{Bridge.hasValue(i)&&i.System$IDisposable$Dispose()}}},methods:{copyTo:function(t,i){var r,n,s;if(t==null)throw new System.ArgumentNullException.$ctor1("array");if(System.Array.getRank(t)!==1)throw new System.ArgumentException.$ctor1("Only single dimensional arrays are supported for the requested action.");if(i<0)throw new System.ArgumentOutOfRangeException.$ctor1("index");if(r=t.length,(r-i|0)<this._size)throw new System.ArgumentException.$ctor1("Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.");n=this._size,n!==0&&(s=(this._array.length-this._head|0)<n?this._array.length-this._head|0:n,System.Array.copy(this._array,this._head,t,i,s),n=n-s|0,n>0&&System.Array.copy(this._array,0,t,(i+this._array.length|0)-this._head|0,n))},CopyTo:function(t,i){var r,n,s;if(t==null)throw new System.ArgumentNullException.$ctor1("array");if(i<0||i>t.length)throw new System.ArgumentOutOfRangeException.$ctor4("arrayIndex","Index was out of range. Must be non-negative and less than the size of the collection.");if(r=t.length,(r-i|0)<this._size)throw new System.ArgumentException.$ctor1("Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.");n=(r-i|0)<this._size?r-i|0:this._size,n!==0&&(s=(this._array.length-this._head|0)<n?this._array.length-this._head|0:n,System.Array.copy(this._array,this._head,t,i,s),n=n-s|0,n>0&&System.Array.copy(this._array,0,t,(i+this._array.length|0)-this._head|0,n))},Clear:function(){this._head<this._tail?System.Array.fill(this._array,function(){return Bridge.getDefaultValue(e)},this._head,this._size):(System.Array.fill(this._array,function(){return Bridge.getDefaultValue(e)},this._head,this._array.length-this._head|0),System.Array.fill(this._array,function(){return Bridge.getDefaultValue(e)},0,this._tail)),this._head=0,this._tail=0,this._size=0,this._version=this._version+1|0},Enqueue:function(t){if(this._size===this._array.length){var i=Bridge.Int.div(Bridge.Int.mul(this._array.length,System.Collections.Generic.Queue$1(e).GrowFactor),100)|0;i<(this._array.length+System.Collections.Generic.Queue$1(e).MinimumGrow|0)&&(i=this._array.length+System.Collections.Generic.Queue$1(e).MinimumGrow|0),this.SetCapacity(i)}this._array[System.Array.index(this._tail,this._array)]=t,this._tail=this.MoveNext(this._tail),this._size=this._size+1|0,this._version=this._version+1|0},GetEnumerator:function(){return new(System.Collections.Generic.Queue$1.Enumerator(e)).$ctor1(this)},System$Collections$Generic$IEnumerable$1$GetEnumerator:function(){return new(System.Collections.Generic.Queue$1.Enumerator(e)).$ctor1(this).$clone()},System$Collections$IEnumerable$GetEnumerator:function(){return new(System.Collections.Generic.Queue$1.Enumerator(e)).$ctor1(this).$clone()},Dequeue:function(){if(this._size===0)throw new System.InvalidOperationException.$ctor1("Queue empty.");var t=this._array[System.Array.index(this._head,this._array)];return this._array[System.Array.index(this._head,this._array)]=Bridge.getDefaultValue(e),this._head=this.MoveNext(this._head),this._size=this._size-1|0,this._version=this._version+1|0,t},Peek:function(){if(this._size===0)throw new System.InvalidOperationException.$ctor1("Queue empty.");return this._array[System.Array.index(this._head,this._array)]},Contains:function(t){for(var i=this._head,r=this._size,n=System.Collections.Generic.EqualityComparer$1(e).def;Bridge.identity(r,r=r-1|0)>0;){if(t==null){if(this._array[System.Array.index(i,this._array)]==null)return!0}else if(this._array[System.Array.index(i,this._array)]!=null&&n.equals2(this._array[System.Array.index(i,this._array)],t))return!0;i=this.MoveNext(i)}return!1},GetElement:function(t){return this._array[System.Array.index((this._head+t|0)%this._array.length,this._array)]},ToArray:function(){var t=System.Array.init(this._size,function(){return Bridge.getDefaultValue(e)},e);return this._size===0||(this._head<this._tail?System.Array.copy(this._array,this._head,t,0,this._size):(System.Array.copy(this._array,this._head,t,0,this._array.length-this._head|0),System.Array.copy(this._array,0,t,this._array.length-this._head|0,this._tail))),t},SetCapacity:function(t){var i=System.Array.init(t,function(){return Bridge.getDefaultValue(e)},e);this._size>0&&(this._head<this._tail?System.Array.copy(this._array,this._head,i,0,this._size):(System.Array.copy(this._array,this._head,i,0,this._array.length-this._head|0),System.Array.copy(this._array,0,i,this._array.length-this._head|0,this._tail))),this._array=i,this._head=0,this._tail=this._size===t?0:this._size,this._version=this._version+1|0},MoveNext:function(t){var i=t+1|0;return i===this._array.length?0:i},TrimExcess:function(){var t=Bridge.Int.clip32(this._array.length*.9);this._size<t&&this.SetCapacity(this._size)}}}}),Bridge.define("System.Collections.Generic.ICollectionDebugView$1",function(e){return{fields:{_collection:null},props:{Items:{get:function(){var t=System.Array.init(System.Array.getCount(this._collection,e),function(){return Bridge.getDefaultValue(e)},e);return System.Array.copyTo(this._collection,t,0,e),t}}},ctors:{ctor:function(t){if(this.$initialize(),t==null)throw new System.ArgumentNullException.$ctor1("collection");this._collection=t}}}}),Bridge.define("System.Collections.Generic.IDictionaryDebugView$2",function(e,t){return{fields:{_dict:null},props:{Items:{get:function(){var i=System.Array.init(System.Array.getCount(this._dict,System.Collections.Generic.KeyValuePair$2(e,t)),function(){return new(System.Collections.Generic.KeyValuePair$2(e,t))},System.Collections.Generic.KeyValuePair$2(e,t));return System.Array.copyTo(this._dict,i,0,System.Collections.Generic.KeyValuePair$2(e,t)),i}}},ctors:{ctor:function(i){if(this.$initialize(),i==null)throw new System.ArgumentNullException.$ctor1("dictionary");this._dict=i}}}}),Bridge.define("System.Collections.Generic.Queue$1.Enumerator",function(e){return{inherits:[System.Collections.Generic.IEnumerator$1(e),System.Collections.IEnumerator],$kind:"nested struct",statics:{methods:{getDefaultValue:function(){return new(System.Collections.Generic.Queue$1.Enumerator(e))}}},fields:{_q:null,_index:0,_version:0,_currentElement:Bridge.getDefaultValue(e)},props:{Current:{get:function(){if(this._index<0)throw this._index===-1?new System.InvalidOperationException.$ctor1("Enumeration has not started. Call MoveNext."):new System.InvalidOperationException.$ctor1("Enumeration already finished.");return this._currentElement}},System$Collections$IEnumerator$Current:{get:function(){return this.Current}}},alias:["Dispose","System$IDisposable$Dispose","moveNext","System$Collections$IEnumerator$moveNext","Current",["System$Collections$Generic$IEnumerator$1$"+Bridge.getTypeAlias(e)+"$Current$1","System$Collections$Generic$IEnumerator$1$Current$1"]],ctors:{$ctor1:function(t){this.$initialize(),this._q=t,this._version=this._q._version,this._index=-1,this._currentElement=Bridge.getDefaultValue(e)},ctor:function(){this.$initialize()}},methods:{Dispose:function(){this._index=-2,this._currentElement=Bridge.getDefaultValue(e)},moveNext:function(){if(this._version!==this._q._version)throw new System.InvalidOperationException.$ctor1("Collection was modified; enumeration operation may not execute.");return this._index===-2?!1:(this._index=this._index+1|0,this._index===this._q._size?(this._index=-2,this._currentElement=Bridge.getDefaultValue(e),!1):(this._currentElement=this._q.GetElement(this._index),!0))},System$Collections$IEnumerator$reset:function(){if(this._version!==this._q._version)throw new System.InvalidOperationException.$ctor1("Collection was modified; enumeration operation may not execute.");this._index=-1,this._currentElement=Bridge.getDefaultValue(e)},getHashCode:function(){return Bridge.addHash([3788985113,this._q,this._index,this._version,this._currentElement])},equals:function(t){return Bridge.is(t,System.Collections.Generic.Queue$1.Enumerator(e))?Bridge.equals(this._q,t._q)&&Bridge.equals(this._index,t._index)&&Bridge.equals(this._version,t._version)&&Bridge.equals(this._currentElement,t._currentElement):!1},$clone:function(t){var i=t||new(System.Collections.Generic.Queue$1.Enumerator(e));return i._q=this._q,i._index=this._index,i._version=this._version,i._currentElement=this._currentElement,i}}}}),Bridge.define("System.Collections.Generic.Stack$1",function(e){return{inherits:[System.Collections.Generic.IEnumerable$1(e),System.Collections.ICollection,System.Collections.Generic.IReadOnlyCollection$1(e)],statics:{fields:{DefaultCapacity:0},ctors:{init:function(){this.DefaultCapacity=4}}},fields:{_array:null,_size:0,_version:0},props:{Count:{get:function(){return this._size}},System$Collections$ICollection$IsSynchronized:{get:function(){return!1}},System$Collections$ICollection$SyncRoot:{get:function(){return this}},IsReadOnly:{get:function(){return!1}}},alias:["Count",["System$Collections$Generic$IReadOnlyCollection$1$"+Bridge.getTypeAlias(e)+"$Count","System$Collections$Generic$IReadOnlyCollection$1$Count"],"Count","System$Collections$ICollection$Count","copyTo","System$Collections$ICollection$copyTo","System$Collections$Generic$IEnumerable$1$GetEnumerator","System$Collections$Generic$IEnumerable$1$"+Bridge.getTypeAlias(e)+"$GetEnumerator"],ctors:{ctor:function(){this.$initialize(),this._array=System.Array.init(0,function(){return Bridge.getDefaultValue(e)},e)},$ctor2:function(t){if(this.$initialize(),t<0)throw new System.ArgumentOutOfRangeException.$ctor4("capacity","Non-negative number required.");this._array=System.Array.init(t,function(){return Bridge.getDefaultValue(e)},e)},$ctor1:function(t){if(this.$initialize(),t==null)throw new System.ArgumentNullException.$ctor1("collection");var i={};this._array=Bridge.Collections.EnumerableHelpers.ToArray$1(e,t,i),this._size=i.v}},methods:{Clear:function(){System.Array.fill(this._array,function(){return Bridge.getDefaultValue(e)},0,this._size),this._size=0,this._version=this._version+1|0},Contains:function(t){for(var i=this._size,r=System.Collections.Generic.EqualityComparer$1(e).def;Bridge.identity(i,i=i-1|0)>0;)if(t==null){if(this._array[System.Array.index(i,this._array)]==null)return!0}else if(this._array[System.Array.index(i,this._array)]!=null&&r.equals2(this._array[System.Array.index(i,this._array)],t))return!0;return!1},CopyTo:function(t,i){var r,n,s;if(t==null)throw new System.ArgumentNullException.$ctor1("array");if(i<0||i>t.length)throw new System.ArgumentOutOfRangeException.$ctor4("arrayIndex","Non-negative number required.");if((t.length-i|0)<this._size)throw new System.ArgumentException.$ctor1("Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.");if(Bridge.referenceEquals(t,this._array))System.Array.copy(this._array,0,t,i,this._size),System.Array.reverse(t,i,this._size);else for(r=0,n=i+this._size|0,s=0;s<this._size;s=s+1|0)t[System.Array.index(n=n-1|0,t)]=this._array[System.Array.index(Bridge.identity(r,r=r+1|0),this._array)]},copyTo:function(t,i){if(t==null)throw new System.ArgumentNullException.$ctor1("array");if(System.Array.getRank(t)!==1)throw new System.ArgumentException.$ctor1("Only single dimensional arrays are supported for the requested action.");if(System.Array.getLower(t,0)!==0)throw new System.ArgumentException.$ctor1("The lower bound of target array must be zero.");if(i<0||i>t.length)throw new System.ArgumentOutOfRangeException.$ctor4("arrayIndex","Non-negative number required.");if((t.length-i|0)<this._size)throw new System.ArgumentException.$ctor1("Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.");try{System.Array.copy(this._array,0,t,i,this._size),System.Array.reverse(t,i,this._size)}catch(r){throw r=System.Exception.create(r),new System.ArgumentException.$ctor1("Target array type is not compatible with the type of items in the collection.")}},GetEnumerator:function(){return new(System.Collections.Generic.Stack$1.Enumerator(e)).$ctor1(this)},System$Collections$Generic$IEnumerable$1$GetEnumerator:function(){return new(System.Collections.Generic.Stack$1.Enumerator(e)).$ctor1(this).$clone()},System$Collections$IEnumerable$GetEnumerator:function(){return new(System.Collections.Generic.Stack$1.Enumerator(e)).$ctor1(this).$clone()},TrimExcess:function(){var t=Bridge.Int.clip32(this._array.length*.9),i;this._size<t&&(i={v:this._array},System.Array.resize(i,this._size,function(){return Bridge.getDefaultValue(e)},e),this._array=i.v,this._version=this._version+1|0)},Peek:function(){if(this._size===0)throw new System.InvalidOperationException.$ctor1("Stack empty.");return this._array[System.Array.index(this._size-1|0,this._array)]},Pop:function(){if(this._size===0)throw new System.InvalidOperationException.$ctor1("Stack empty.");this._version=this._version+1|0;var t=this._array[System.Array.index(this._size=this._size-1|0,this._array)];return this._array[System.Array.index(this._size,this._array)]=Bridge.getDefaultValue(e),t},Push:function(t){if(this._size===this._array.length){var i={v:this._array};System.Array.resize(i,this._array.length===0?System.Collections.Generic.Stack$1(e).DefaultCapacity:Bridge.Int.mul(2,this._array.length),function(){return Bridge.getDefaultValue(e)},e),this._array=i.v}this._array[System.Array.index(Bridge.identity(this._size,this._size=this._size+1|0),this._array)]=t,this._version=this._version+1|0},ToArray:function(){for(var t=System.Array.init(this._size,function(){return Bridge.getDefaultValue(e)},e),i=0;i<this._size;)t[System.Array.index(i,t)]=this._array[System.Array.index((this._size-i|0)-1|0,this._array)],i=i+1|0;return t}}}}),Bridge.define("System.Collections.Generic.Stack$1.Enumerator",function(e){return{inherits:[System.Collections.Generic.IEnumerator$1(e),System.Collections.IEnumerator],$kind:"nested struct",statics:{methods:{getDefaultValue:function(){return new(System.Collections.Generic.Stack$1.Enumerator(e))}}},fields:{_stack:null,_index:0,_version:0,_currentElement:Bridge.getDefaultValue(e)},props:{Current:{get:function(){if(this._index===-2)throw new System.InvalidOperationException.$ctor1("Enumeration has not started. Call MoveNext.");if(this._index===-1)throw new System.InvalidOperationException.$ctor1("Enumeration already finished.");return this._currentElement}},System$Collections$IEnumerator$Current:{get:function(){if(this._index===-2)throw new System.InvalidOperationException.$ctor1("Enumeration has not started. Call MoveNext.");if(this._index===-1)throw new System.InvalidOperationException.$ctor1("Enumeration already finished.");return this._currentElement}}},alias:["Dispose","System$IDisposable$Dispose","moveNext","System$Collections$IEnumerator$moveNext","Current",["System$Collections$Generic$IEnumerator$1$"+Bridge.getTypeAlias(e)+"$Current$1","System$Collections$Generic$IEnumerator$1$Current$1"]],ctors:{$ctor1:function(t){this.$initialize(),this._stack=t,this._version=this._stack._version,this._index=-2,this._currentElement=Bridge.getDefaultValue(e)},ctor:function(){this.$initialize()}},methods:{Dispose:function(){this._index=-1},moveNext:function(){var t,i,r;if(this._version!==this._stack._version)throw new System.InvalidOperationException.$ctor1("Collection was modified; enumeration operation may not execute.");return this._index===-2?(this._index=this._stack._size-1|0,r=this._index>=0,r&&(this._currentElement=(t=this._stack._array)[System.Array.index(this._index,t)]),r):this._index===-1?!1:(r=(this._index=this._index-1|0)>=0,this._currentElement=r?(i=this._stack._array)[System.Array.index(this._index,i)]:Bridge.getDefaultValue(e),r)},System$Collections$IEnumerator$reset:function(){if(this._version!==this._stack._version)throw new System.InvalidOperationException.$ctor1("Collection was modified; enumeration operation may not execute.");this._index=-2,this._currentElement=Bridge.getDefaultValue(e)},getHashCode:function(){return Bridge.addHash([3788985113,this._stack,this._index,this._version,this._currentElement])},equals:function(t){return Bridge.is(t,System.Collections.Generic.Stack$1.Enumerator(e))?Bridge.equals(this._stack,t._stack)&&Bridge.equals(this._index,t._index)&&Bridge.equals(this._version,t._version)&&Bridge.equals(this._currentElement,t._currentElement):!1},$clone:function(t){var i=t||new(System.Collections.Generic.Stack$1.Enumerator(e));return i._stack=this._stack,i._index=this._index,i._version=this._version,i._currentElement=this._currentElement,i}}}}),Bridge.define("System.Collections.HashHelpers",{statics:{fields:{HashPrime:0,MaxPrimeArrayLength:0,RandomSeed:0,primes:null},ctors:{init:function(){this.HashPrime=101,this.MaxPrimeArrayLength=2146435069,this.RandomSeed=System.Guid.NewGuid().getHashCode(),this.primes=System.Array.init([3,7,11,17,23,29,37,47,59,71,89,107,131,163,197,239,293,353,431,521,631,761,919,1103,1327,1597,1931,2333,2801,3371,4049,4861,5839,7013,8419,10103,12143,14591,17519,21023,25229,30293,36353,43627,52361,62851,75431,90523,108631,130363,156437,187751,225307,270371,324449,389357,467237,560689,672827,807403,968897,1162687,1395263,1674319,2009191,2411033,2893249,3471899,4166287,4999559,5999471,7199369],System.Int32)}},methods:{Combine:function(e,t){var i=(e>>>0<<5>>>0|e>>>0>>>27)>>>0;return((i|0)+e|0)^t},IsPrime:function(e){var t,i;if(e&1){for(t=Bridge.Int.clip32(Math.sqrt(e)),i=3;i<=t;i=i+2|0)if(e%i==0)return!1;return!0}return e===2},GetPrime:function(e){var t,i,r;if(e<0)throw new System.ArgumentException.$ctor1("Hashtable's capacity overflowed and went negative. Check load factor, capacity and the current size of the table.");for(t=0;t<System.Collections.HashHelpers.primes.length;t=t+1|0)if(i=System.Collections.HashHelpers.primes[System.Array.index(t,System.Collections.HashHelpers.primes)],i>=e)return i;for(r=e|1;r<2147483647;r=r+2|0)if(System.Collections.HashHelpers.IsPrime(r)&&(r-1|0)%System.Collections.HashHelpers.HashPrime!=0)return r;return e},GetMinPrime:function(){return System.Collections.HashHelpers.primes[System.Array.index(0,System.Collections.HashHelpers.primes)]},ExpandPrime:function(e){var t=Bridge.Int.mul(2,e);return t>>>0>System.Collections.HashHelpers.MaxPrimeArrayLength&&System.Collections.HashHelpers.MaxPrimeArrayLength>e?System.Collections.HashHelpers.MaxPrimeArrayLength:System.Collections.HashHelpers.GetPrime(t)}}}}),Bridge.define("System.Collections.ObjectModel.Collection$1",function(e){return{inherits:[System.Collections.Generic.IList$1(e),System.Collections.IList,System.Collections.Generic.IReadOnlyList$1(e)],statics:{methods:{IsCompatibleObject:function(t){return Bridge.is(t,e)||t==null&&Bridge.getDefaultValue(e)==null}}},fields:{items:null,_syncRoot:null},props:{Count:{get:function(){return System.Array.getCount(this.items,e)}},Items:{get:function(){return this.items}},System$Collections$Generic$ICollection$1$IsReadOnly:{get:function(){return System.Array.getIsReadOnly(this.items,e)}},System$Collections$ICollection$IsSynchronized:{get:function(){return!1}},System$Collections$ICollection$SyncRoot:{get:function(){if(this._syncRoot==null){var t=Bridge.as(this.items,System.Collections.ICollection);if(t!=null)this._syncRoot=t.System$Collections$ICollection$SyncRoot;else throw System.NotImplemented.ByDesign}return this._syncRoot}},System$Collections$IList$IsReadOnly:{get:function(){return System.Array.getIsReadOnly(this.items,e)}},System$Collections$IList$IsFixedSize:{get:function(){var t=Bridge.as(this.items,System.Collections.IList);return t!=null?System.Array.isFixedSize(t):System.Array.getIsReadOnly(this.items,e)}}},alias:["Count",["System$Collections$Generic$IReadOnlyCollection$1$"+Bridge.getTypeAlias(e)+"$Count","System$Collections$Generic$IReadOnlyCollection$1$Count"],"Count","System$Collections$ICollection$Count","Count","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$Count","getItem",["System$Collections$Generic$IReadOnlyList$1$"+Bridge.getTypeAlias(e)+"$getItem","System$Collections$Generic$IReadOnlyList$1$getItem"],"setItem",["System$Collections$Generic$IReadOnlyList$1$"+Bridge.getTypeAlias(e)+"$setItem","System$Collections$Generic$IReadOnlyList$1$setItem"],"getItem","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(e)+"$getItem","setItem","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(e)+"$setItem","add","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$add","clear","System$Collections$IList$clear","clear","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$clear","copyTo","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$copyTo","contains","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$contains","GetEnumerator",["System$Collections$Generic$IEnumerable$1$"+Bridge.getTypeAlias(e)+"$GetEnumerator","System$Collections$Generic$IEnumerable$1$GetEnumerator"],"indexOf","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(e)+"$indexOf","insert","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(e)+"$insert","remove","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$remove","removeAt","System$Collections$IList$removeAt","removeAt","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(e)+"$removeAt","System$Collections$Generic$ICollection$1$IsReadOnly","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$IsReadOnly"],ctors:{ctor:function(){this.$initialize(),this.items=new(System.Collections.Generic.List$1(e)).ctor},$ctor1:function(t){this.$initialize(),t==null&&System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.list),this.items=t}},methods:{getItem:function(t){return System.Array.getItem(this.items,t,e)},setItem:function(t,i){System.Array.getIsReadOnly(this.items,e)&&System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_ReadOnlyCollection),(t<0||t>=System.Array.getCount(this.items,e))&&System.ThrowHelper.ThrowArgumentOutOfRange_IndexException(),this.SetItem(t,i)},System$Collections$IList$getItem:function(t){return System.Array.getItem(this.items,t,e)},System$Collections$IList$setItem:function(t,i){System.ThrowHelper.IfNullAndNullsAreIllegalThenThrow(e,i,System.ExceptionArgument.value);try{this.setItem(t,Bridge.cast(Bridge.unbox(i,e),e))}catch(r){if(r=System.Exception.create(r),Bridge.is(r,System.InvalidCastException))System.ThrowHelper.ThrowWrongValueTypeArgumentException(System.Object,i,e);else throw r}},add:function(t){System.Array.getIsReadOnly(this.items,e)&&System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_ReadOnlyCollection);var i=System.Array.getCount(this.items,e);this.InsertItem(i,t)},System$Collections$IList$add:function(t){System.Array.getIsReadOnly(this.items,e)&&System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_ReadOnlyCollection),System.ThrowHelper.IfNullAndNullsAreIllegalThenThrow(e,t,System.ExceptionArgument.value);try{this.add(Bridge.cast(Bridge.unbox(t,e),e))}catch(i){if(i=System.Exception.create(i),Bridge.is(i,System.InvalidCastException))System.ThrowHelper.ThrowWrongValueTypeArgumentException(System.Object,t,e);else throw i}return this.Count-1|0},clear:function(){System.Array.getIsReadOnly(this.items,e)&&System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_ReadOnlyCollection),this.ClearItems()},copyTo:function(t,i){System.Array.copyTo(this.items,t,i,e)},System$Collections$ICollection$copyTo:function(t,i){var r,n,s,o,a,l;if(t==null&&System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.array),System.Array.getRank(t)!==1&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_RankMultiDimNotSupported),System.Array.getLower(t,0)!==0&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_NonZeroLowerBound),i<0&&System.ThrowHelper.ThrowIndexArgumentOutOfRange_NeedNonNegNumException(),(t.length-i|0)<this.Count&&System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_ArrayPlusOffTooSmall),r=Bridge.as(t,System.Array.type(e)),r!=null)System.Array.copyTo(this.items,r,i,e);else{n=Bridge.getType(t).$elementType||null,s=e,Bridge.Reflection.isAssignableFrom(n,s)||Bridge.Reflection.isAssignableFrom(s,n)||System.ThrowHelper.ThrowArgumentException_Argument_InvalidArrayType(),o=Bridge.as(t,System.Array.type(System.Object)),o==null&&System.ThrowHelper.ThrowArgumentException_Argument_InvalidArrayType(),a=System.Array.getCount(this.items,e);try{for(l=0;l<a;l=l+1|0)o[System.Array.index(Bridge.identity(i,i=i+1|0),o)]=System.Array.getItem(this.items,l,e)}catch(u){if(u=System.Exception.create(u),Bridge.is(u,System.ArrayTypeMismatchException))System.ThrowHelper.ThrowArgumentException_Argument_InvalidArrayType();else throw u}}},contains:function(t){return System.Array.contains(this.items,t,e)},System$Collections$IList$contains:function(t){return System.Collections.ObjectModel.Collection$1(e).IsCompatibleObject(t)?this.contains(Bridge.cast(Bridge.unbox(t,e),e)):!1},GetEnumerator:function(){return Bridge.getEnumerator(this.items,e)},System$Collections$IEnumerable$GetEnumerator:function(){return Bridge.getEnumerator(Bridge.cast(this.items,System.Collections.IEnumerable))},indexOf:function(t){return System.Array.indexOf(this.items,t,0,null,e)},System$Collections$IList$indexOf:function(t){return System.Collections.ObjectModel.Collection$1(e).IsCompatibleObject(t)?this.indexOf(Bridge.cast(Bridge.unbox(t,e),e)):-1},insert:function(t,i){System.Array.getIsReadOnly(this.items,e)&&System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_ReadOnlyCollection),(t<0||t>System.Array.getCount(this.items,e))&&System.ThrowHelper.ThrowArgumentOutOfRangeException$2(System.ExceptionArgument.index,System.ExceptionResource.ArgumentOutOfRange_ListInsert),this.InsertItem(t,i)},System$Collections$IList$insert:function(t,i){System.Array.getIsReadOnly(this.items,e)&&System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_ReadOnlyCollection),System.ThrowHelper.IfNullAndNullsAreIllegalThenThrow(e,i,System.ExceptionArgument.value);try{this.insert(t,Bridge.cast(Bridge.unbox(i,e),e))}catch(r){if(r=System.Exception.create(r),Bridge.is(r,System.InvalidCastException))System.ThrowHelper.ThrowWrongValueTypeArgumentException(System.Object,i,e);else throw r}},remove:function(t){System.Array.getIsReadOnly(this.items,e)&&System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_ReadOnlyCollection);var i=System.Array.indexOf(this.items,t,0,null,e);return i<0?!1:(this.RemoveItem(i),!0)},System$Collections$IList$remove:function(t){System.Array.getIsReadOnly(this.items,e)&&System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_ReadOnlyCollection),System.Collections.ObjectModel.Collection$1(e).IsCompatibleObject(t)&&this.remove(Bridge.cast(Bridge.unbox(t,e),e))},removeAt:function(t){System.Array.getIsReadOnly(this.items,e)&&System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_ReadOnlyCollection),(t<0||t>=System.Array.getCount(this.items,e))&&System.ThrowHelper.ThrowArgumentOutOfRange_IndexException(),this.RemoveItem(t)},ClearItems:function(){System.Array.clear(this.items,e)},InsertItem:function(t,i){System.Array.insert(this.items,t,i,e)},RemoveItem:function(t){System.Array.removeAt(this.items,t,e)},SetItem:function(t,i){System.Array.setItem(this.items,t,i,e)}}}}),Bridge.define("System.Collections.ObjectModel.ReadOnlyCollection$1",function(e){return{inherits:[System.Collections.Generic.IList$1(e),System.Collections.IList,System.Collections.Generic.IReadOnlyList$1(e)],statics:{methods:{IsCompatibleObject:function(t){return Bridge.is(t,e)||t==null&&Bridge.getDefaultValue(e)==null}}},fields:{list:null},props:{Count:{get:function(){return System.Array.getCount(this.list,e)}},System$Collections$ICollection$IsSynchronized:{get:function(){return!1}},System$Collections$ICollection$SyncRoot:{get:function(){return this}},Items:{get:function(){return this.list}},System$Collections$IList$IsFixedSize:{get:function(){return!0}},System$Collections$Generic$ICollection$1$IsReadOnly:{get:function(){return!0}},System$Collections$IList$IsReadOnly:{get:function(){return!0}}},alias:["Count",["System$Collections$Generic$IReadOnlyCollection$1$"+Bridge.getTypeAlias(e)+"$Count","System$Collections$Generic$IReadOnlyCollection$1$Count"],"Count","System$Collections$ICollection$Count","Count","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$Count","getItem",["System$Collections$Generic$IReadOnlyList$1$"+Bridge.getTypeAlias(e)+"$getItem","System$Collections$Generic$IReadOnlyList$1$getItem"],"contains","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$contains","copyTo","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$copyTo","GetEnumerator",["System$Collections$Generic$IEnumerable$1$"+Bridge.getTypeAlias(e)+"$GetEnumerator","System$Collections$Generic$IEnumerable$1$GetEnumerator"],"indexOf","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(e)+"$indexOf","System$Collections$Generic$ICollection$1$IsReadOnly","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$IsReadOnly","System$Collections$Generic$IList$1$getItem","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(e)+"$getItem","System$Collections$Generic$IList$1$setItem","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(e)+"$setItem","System$Collections$Generic$ICollection$1$add","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$add","System$Collections$Generic$ICollection$1$clear","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$clear","System$Collections$Generic$IList$1$insert","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(e)+"$insert","System$Collections$Generic$ICollection$1$remove","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$remove","System$Collections$Generic$IList$1$removeAt","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(e)+"$removeAt"],ctors:{ctor:function(t){if(this.$initialize(),t==null)throw new System.ArgumentNullException.$ctor1("list");this.list=t}},methods:{getItem:function(t){return System.Array.getItem(this.list,t,e)},System$Collections$Generic$IList$1$getItem:function(t){return System.Array.getItem(this.list,t,e)},System$Collections$Generic$IList$1$setItem:function(t,i){throw new System.NotSupportedException.ctor},System$Collections$IList$getItem:function(t){return System.Array.getItem(this.list,t,e)},System$Collections$IList$setItem:function(t,i){throw new System.NotSupportedException.ctor},contains:function(t){return System.Array.contains(this.list,t,e)},System$Collections$IList$contains:function(t){return System.Collections.ObjectModel.ReadOnlyCollection$1(e).IsCompatibleObject(t)?this.contains(Bridge.cast(Bridge.unbox(t,e),e)):!1},copyTo:function(t,i){System.Array.copyTo(this.list,t,i,e)},System$Collections$ICollection$copyTo:function(t,i){var r,n,s,o,a,l;if(t==null)throw new System.ArgumentNullException.$ctor1("array");if(System.Array.getRank(t)!==1)throw new System.ArgumentException.$ctor1("array");if(System.Array.getLower(t,0)!==0)throw new System.ArgumentException.$ctor1("array");if(i<0)throw new System.ArgumentOutOfRangeException.$ctor1("index");if((t.length-i|0)<this.Count)throw new System.ArgumentException.ctor;if(r=Bridge.as(t,System.Array.type(e)),r!=null)System.Array.copyTo(this.list,r,i,e);else{if(n=Bridge.getType(t).$elementType||null,s=e,!(Bridge.Reflection.isAssignableFrom(n,s)||Bridge.Reflection.isAssignableFrom(s,n)))throw new System.ArgumentException.ctor;if(o=Bridge.as(t,System.Array.type(System.Object)),o==null)throw new System.ArgumentException.ctor;for(a=System.Array.getCount(this.list,e),l=0;l<a;l=l+1|0)o[System.Array.index(Bridge.identity(i,i=i+1|0),o)]=System.Array.getItem(this.list,l,e)}},GetEnumerator:function(){return Bridge.getEnumerator(this.list,e)},System$Collections$IEnumerable$GetEnumerator:function(){return Bridge.getEnumerator(Bridge.cast(this.list,System.Collections.IEnumerable))},indexOf:function(t){return System.Array.indexOf(this.list,t,0,null,e)},System$Collections$IList$indexOf:function(t){return System.Collections.ObjectModel.ReadOnlyCollection$1(e).IsCompatibleObject(t)?this.indexOf(Bridge.cast(Bridge.unbox(t,e),e)):-1},System$Collections$Generic$ICollection$1$add:function(t){throw new System.NotSupportedException.ctor},System$Collections$IList$add:function(t){throw new System.NotSupportedException.ctor},System$Collections$Generic$ICollection$1$clear:function(){throw new System.NotSupportedException.ctor},System$Collections$IList$clear:function(){throw new System.NotSupportedException.ctor},System$Collections$Generic$IList$1$insert:function(t,i){throw new System.NotSupportedException.ctor},System$Collections$IList$insert:function(t,i){throw new System.NotSupportedException.ctor},System$Collections$Generic$ICollection$1$remove:function(t){throw new System.NotSupportedException.ctor},System$Collections$IList$remove:function(t){throw new System.NotSupportedException.ctor},System$Collections$Generic$IList$1$removeAt:function(t){throw new System.NotSupportedException.ctor},System$Collections$IList$removeAt:function(t){throw new System.NotSupportedException.ctor}}}}),Bridge.define("System.ComponentModel.BrowsableAttribute",{inherits:[System.Attribute],statics:{fields:{yes:null,no:null,default:null},ctors:{init:function(){this.yes=new System.ComponentModel.BrowsableAttribute(!0),this.no=new System.ComponentModel.BrowsableAttribute(!1),this.default=System.ComponentModel.BrowsableAttribute.yes}}},fields:{browsable:!1},props:{Browsable:{get:function(){return this.browsable}}},ctors:{init:function(){this.browsable=!0},ctor:function(e){this.$initialize(),System.Attribute.ctor.call(this),this.browsable=e}},methods:{equals:function(e){if(Bridge.referenceEquals(e,this))return!0;var t=Bridge.as(e,System.ComponentModel.BrowsableAttribute);return t!=null&&t.Browsable===this.browsable},getHashCode:function(){return Bridge.getHashCode(this.browsable)}}}),Bridge.define("System.ComponentModel.DefaultValueAttribute",{inherits:[System.Attribute],fields:{_value:null},props:{Value:{get:function(){return this._value}}},ctors:{$ctor11:function(e,t){this.$initialize(),System.Attribute.ctor.call(this);try{if(e.prototype instanceof System.Enum)this._value=System.Enum.parse(e,t,!0);else throw Bridge.referenceEquals(e,System.TimeSpan),System.NotImplemented.ByDesign}catch(i){i=System.Exception.create(i)}},$ctor2:function(e){this.$initialize(),System.Attribute.ctor.call(this),this._value=Bridge.box(e,System.Char,String.fromCharCode,System.Char.getHashCode)},$ctor1:function(e){this.$initialize(),System.Attribute.ctor.call(this),this._value=Bridge.box(e,System.Byte)},$ctor4:function(e){this.$initialize(),System.Attribute.ctor.call(this),this._value=Bridge.box(e,System.Int16)},$ctor5:function(e){this.$initialize(),System.Attribute.ctor.call(this),this._value=Bridge.box(e,System.Int32)},$ctor6:function(e){this.$initialize(),System.Attribute.ctor.call(this),this._value=e},$ctor9:function(e){this.$initialize(),System.Attribute.ctor.call(this),this._value=Bridge.box(e,System.Single,System.Single.format,System.Single.getHashCode)},$ctor3:function(e){this.$initialize(),System.Attribute.ctor.call(this),this._value=Bridge.box(e,System.Double,System.Double.format,System.Double.getHashCode)},ctor:function(e){this.$initialize(),System.Attribute.ctor.call(this),this._value=Bridge.box(e,System.Boolean,System.Boolean.toString)},$ctor10:function(e){this.$initialize(),System.Attribute.ctor.call(this),this._value=e},$ctor7:function(e){this.$initialize(),System.Attribute.ctor.call(this),this._value=e},$ctor8:function(e){this.$initialize(),System.Attribute.ctor.call(this),this._value=Bridge.box(e,System.SByte)},$ctor12:function(e){this.$initialize(),System.Attribute.ctor.call(this),this._value=Bridge.box(e,System.UInt16)},$ctor13:function(e){this.$initialize(),System.Attribute.ctor.call(this),this._value=Bridge.box(e,System.UInt32)},$ctor14:function(e){this.$initialize(),System.Attribute.ctor.call(this),this._value=e}},methods:{equals:function(e){if(Bridge.referenceEquals(e,this))return!0;var t=Bridge.as(e,System.ComponentModel.DefaultValueAttribute);return t!=null?this.Value!=null?Bridge.equals(this.Value,t.Value):t.Value==null:!1},getHashCode:function(){return Bridge.getHashCode(this)},setValue:function(e){this._value=e}}}),Bridge.define("System.Console",{statics:{methods:{Write:function(e){var t=Bridge.global.console;t&&t.log&&t.log(Bridge.isDefined(Bridge.unbox(e))?Bridge.unbox(e):"")},WriteLine:function(e){var t=Bridge.global.console;t&&t.log&&t.log(Bridge.isDefined(Bridge.unbox(e))?Bridge.unbox(e):"")},TransformChars:function(e,t,i,r){var n,s;if(t!==1){if(e==null)throw new System.ArgumentNullException.$ctor1("buffer");if(i<0)throw new System.ArgumentOutOfRangeException.$ctor4("index","less than zero");if(r<0)throw new System.ArgumentOutOfRangeException.$ctor4("count","less than zero");if((i+r|0)>e.length)throw new System.ArgumentException.$ctor1("index plus count specify a position that is not within buffer.")}if(n="",e!=null)for(t===1&&(i=0,r=e.length),s=i;s<(i+r|0);s=s+1|0)n=(n||"")+String.fromCharCode(e[System.Array.index(s,e)]);return n},Clear:function(){var e=Bridge.global.console;e&&e.clear&&e.clear()}}}}),Bridge.define("System.TokenType",{$kind:"enum",statics:{fields:{NumberToken:1,YearNumberToken:2,Am:3,Pm:4,MonthToken:5,EndOfString:6,DayOfWeekToken:7,TimeZoneToken:8,EraToken:9,DateWordToken:10,UnknownToken:11,HebrewNumber:12,JapaneseEraToken:13,TEraToken:14,IgnorableSymbol:15,SEP_Unk:256,SEP_End:512,SEP_Space:768,SEP_Am:1024,SEP_Pm:1280,SEP_Date:1536,SEP_Time:1792,SEP_YearSuff:2048,SEP_MonthSuff:2304,SEP_DaySuff:2560,SEP_HourSuff:2816,SEP_MinuteSuff:3072,SEP_SecondSuff:3328,SEP_LocalTimeMark:3584,SEP_DateOrOffset:3840,RegularTokenMask:255,SeparatorTokenMask:65280}}}),Bridge.define("System.UnitySerializationHolder",{inherits:[System.Runtime.Serialization.ISerializable,System.Runtime.Serialization.IObjectReference],statics:{fields:{NullUnity:0},ctors:{init:function(){this.NullUnity=2}}},alias:["GetRealObject","System$Runtime$Serialization$IObjectReference$GetRealObject"],methods:{GetRealObject:function(e){throw System.NotImplemented.ByDesign}}}),Bridge.define("System.DateTimeKind",{$kind:"enum",statics:{fields:{Unspecified:0,Utc:1,Local:2}}}),Bridge.define("System.DateTimeOffset",{inherits:function(){return[System.IComparable,System.IFormattable,System.Runtime.Serialization.ISerializable,System.Runtime.Serialization.IDeserializationCallback,System.IComparable$1(System.DateTimeOffset),System.IEquatable$1(System.DateTimeOffset)]},$kind:"struct",statics:{fields:{MaxOffset:System.Int64(0),MinOffset:System.Int64(0),UnixEpochTicks:System.Int64(0),UnixEpochSeconds:System.Int64(0),UnixEpochMilliseconds:System.Int64(0),MinValue:null,MaxValue:null},props:{Now:{get:function(){return new System.DateTimeOffset.$ctor1(System.DateTime.getNow())}},UtcNow:{get:function(){return new System.DateTimeOffset.$ctor1(System.DateTime.getUtcNow())}}},ctors:{init:function(){this.MinValue=new System.DateTimeOffset,this.MaxValue=new System.DateTimeOffset,this.MaxOffset=System.Int64([1488826368,117]),this.MinOffset=System.Int64([-1488826368,-118]),this.UnixEpochTicks=System.Int64([-139100160,144670709]),this.UnixEpochSeconds=System.Int64([2006054656,14]),this.UnixEpochMilliseconds=System.Int64([304928768,14467]),this.MinValue=new System.DateTimeOffset.$ctor5(System.DateTime.getMinTicks(),System.TimeSpan.zero),this.MaxValue=new System.DateTimeOffset.$ctor5(System.DateTime.getMaxTicks(),System.TimeSpan.zero)}},methods:{Compare:function(e,t){return Bridge.compare(e.UtcDateTime,t.UtcDateTime)},Equals:function(e,t){return Bridge.equalsT(e.UtcDateTime,t.UtcDateTime)},FromFileTime:function(e){return new System.DateTimeOffset.$ctor1(System.DateTime.FromFileTime(e))},FromUnixTimeSeconds:function(e){var t=System.Int64([-2006054656,-15]),i=System.Int64([-769665,58]),r;if(e.lt(t)||e.gt(i))throw new System.ArgumentOutOfRangeException.$ctor4("seconds",System.String.format(System.Environment.GetResourceString("ArgumentOutOfRange_Range"),t,i));return r=e.mul(System.Int64(1e7)).add(System.DateTimeOffset.UnixEpochTicks),new System.DateTimeOffset.$ctor5(r,System.TimeSpan.zero)},FromUnixTimeMilliseconds:function(e){var t=System.Int64([-304928768,-14468]),i=System.Int64([-769664001,58999]),r;if(e.lt(t)||e.gt(i))throw new System.ArgumentOutOfRangeException.$ctor4("milliseconds",System.String.format(System.Environment.GetResourceString("ArgumentOutOfRange_Range"),t,i));return r=e.mul(System.Int64(1e4)).add(System.DateTimeOffset.UnixEpochTicks),new System.DateTimeOffset.$ctor5(r,System.TimeSpan.zero)},Parse:function(e){var t={},i=System.DateTimeParse.Parse$1(e,System.Globalization.DateTimeFormatInfo.currentInfo,0,t);return new System.DateTimeOffset.$ctor5(System.DateTime.getTicks(i),t.v)},Parse$1:function(e,t){return System.DateTimeOffset.Parse$2(e,t,0)},Parse$2:function(e,t,i){throw System.NotImplemented.ByDesign},ParseExact:function(e,t,i){return System.DateTimeOffset.ParseExact$1(e,t,i,0)},ParseExact$1:function(e,t,i,r){throw System.NotImplemented.ByDesign},TryParse:function(e,t){var i={},r={},n=System.DateTimeParse.TryParse$1(e,System.Globalization.DateTimeFormatInfo.currentInfo,0,r,i);return t.v=new System.DateTimeOffset.$ctor5(System.DateTime.getTicks(r.v),i.v),n},ValidateOffset:function(e){var t=e.getTicks();if(t.mod(System.Int64(6e8)).ne(System.Int64(0)))throw new System.ArgumentException.$ctor3(System.Environment.GetResourceString("Argument_OffsetPrecision"),"offset");if(t.lt(System.DateTimeOffset.MinOffset)||t.gt(System.DateTimeOffset.MaxOffset))throw new System.ArgumentOutOfRangeException.$ctor4("offset",System.Environment.GetResourceString("Argument_OffsetOutOfRange"));return System.Int64.clip16(e.getTicks().div(System.Int64(6e8)))},ValidateDate:function(e,t){var i=System.DateTime.getTicks(e).sub(t.getTicks());if(i.lt(System.DateTime.getMinTicks())||i.gt(System.DateTime.getMaxTicks()))throw new System.ArgumentOutOfRangeException.$ctor4("offset",System.Environment.GetResourceString("Argument_UTCOutOfRange"));return System.DateTime.create$2(i,0)},op_Implicit:function(e){return new System.DateTimeOffset.$ctor1(e)},op_Addition:function(e,t){return new System.DateTimeOffset.$ctor2(System.DateTime.adddt(e.ClockDateTime,t),e.Offset)},op_Subtraction:function(e,t){return new System.DateTimeOffset.$ctor2(System.DateTime.subdt(e.ClockDateTime,t),e.Offset)},op_Subtraction$1:function(e,t){return System.DateTime.subdd(e.UtcDateTime,t.UtcDateTime)},op_Equality:function(e,t){return Bridge.equals(e.UtcDateTime,t.UtcDateTime)},op_Inequality:function(e,t){return!Bridge.equals(e.UtcDateTime,t.UtcDateTime)},op_LessThan:function(e,t){return System.DateTime.lt(e.UtcDateTime,t.UtcDateTime)},op_LessThanOrEqual:function(e,t){return System.DateTime.lte(e.UtcDateTime,t.UtcDateTime)},op_GreaterThan:function(e,t){return System.DateTime.gt(e.UtcDateTime,t.UtcDateTime)},op_GreaterThanOrEqual:function(e,t){return System.DateTime.gte(e.UtcDateTime,t.UtcDateTime)},getDefaultValue:function(){return new System.DateTimeOffset}}},fields:{m_dateTime:null,m_offsetMinutes:0},props:{DateTime:{get:function(){return this.ClockDateTime}},UtcDateTime:{get:function(){return System.DateTime.specifyKind(this.m_dateTime,1)}},LocalDateTime:{get:function(){return System.DateTime.toLocalTime(this.UtcDateTime)}},ClockDateTime:{get:function(){return System.DateTime.create$2(System.DateTime.getTicks(System.DateTime.adddt(this.m_dateTime,this.Offset)),0)}},Date:{get:function(){return System.DateTime.getDate(this.ClockDateTime)}},Day:{get:function(){return System.DateTime.getDay(this.ClockDateTime)}},DayOfWeek:{get:function(){return System.DateTime.getDayOfWeek(this.ClockDateTime)}},DayOfYear:{get:function(){return System.DateTime.getDayOfYear(this.ClockDateTime)}},Hour:{get:function(){return System.DateTime.getHour(this.ClockDateTime)}},Millisecond:{get:function(){return System.DateTime.getMillisecond(this.ClockDateTime)}},Minute:{get:function(){return System.DateTime.getMinute(this.ClockDateTime)}},Month:{get:function(){return System.DateTime.getMonth(this.ClockDateTime)}},Offset:{get:function(){return new System.TimeSpan(0,this.m_offsetMinutes,0)}},Second:{get:function(){return System.DateTime.getSecond(this.ClockDateTime)}},Ticks:{get:function(){return System.DateTime.getTicks(this.ClockDateTime)}},UtcTicks:{get:function(){return System.DateTime.getTicks(this.UtcDateTime)}},TimeOfDay:{get:function(){return System.DateTime.getTimeOfDay(this.ClockDateTime)}},Year:{get:function(){return System.DateTime.getYear(this.ClockDateTime)}}},alias:["compareTo",["System$IComparable$1$System$DateTimeOffset$compareTo","System$IComparable$1$compareTo"],"equalsT","System$IEquatable$1$System$DateTimeOffset$equalsT","format","System$IFormattable$format"],ctors:{init:function(){this.m_dateTime=System.DateTime.getDefaultValue()},$ctor5:function(e,t){this.$initialize(),this.m_offsetMinutes=System.DateTimeOffset.ValidateOffset(t);var i=System.DateTime.create$2(e);this.m_dateTime=System.DateTimeOffset.ValidateDate(i,t)},$ctor1:function(e){this.$initialize();var t;t=new System.TimeSpan(System.Int64(0)),this.m_offsetMinutes=System.DateTimeOffset.ValidateOffset(t),this.m_dateTime=System.DateTimeOffset.ValidateDate(e,t)},$ctor2:function(e,t){this.$initialize(),this.m_offsetMinutes=System.DateTimeOffset.ValidateOffset(t),this.m_dateTime=System.DateTimeOffset.ValidateDate(e,t)},$ctor4:function(e,t,i,r,n,s,o){this.$initialize(),this.m_offsetMinutes=System.DateTimeOffset.ValidateOffset(o),this.m_dateTime=System.DateTimeOffset.ValidateDate(System.DateTime.create(e,t,i,r,n,s),o)},$ctor3:function(e,t,i,r,n,s,o,a){this.$initialize(),this.m_offsetMinutes=System.DateTimeOffset.ValidateOffset(a),this.m_dateTime=System.DateTimeOffset.ValidateDate(System.DateTime.create(e,t,i,r,n,s,o),a)},ctor:function(){this.$initialize()}},methods:{ToOffset:function(e){return new System.DateTimeOffset.$ctor5(System.DateTime.getTicks(System.DateTime.adddt(this.m_dateTime,e)),e)},Add:function(e){return new System.DateTimeOffset.$ctor2(System.DateTime.add(this.ClockDateTime,e),this.Offset)},AddDays:function(e){return new System.DateTimeOffset.$ctor2(System.DateTime.addDays(this.ClockDateTime,e),this.Offset)},AddHours:function(e){return new System.DateTimeOffset.$ctor2(System.DateTime.addHours(this.ClockDateTime,e),this.Offset)},AddMilliseconds:function(e){return new System.DateTimeOffset.$ctor2(System.DateTime.addMilliseconds(this.ClockDateTime,e),this.Offset)},AddMinutes:function(e){return new System.DateTimeOffset.$ctor2(System.DateTime.addMinutes(this.ClockDateTime,e),this.Offset)},AddMonths:function(e){return new System.DateTimeOffset.$ctor2(System.DateTime.addMonths(this.ClockDateTime,e),this.Offset)},AddSeconds:function(e){return new System.DateTimeOffset.$ctor2(System.DateTime.addSeconds(this.ClockDateTime,e),this.Offset)},AddTicks:function(e){return new System.DateTimeOffset.$ctor2(System.DateTime.addTicks(this.ClockDateTime,e),this.Offset)},AddYears:function(e){return new System.DateTimeOffset.$ctor2(System.DateTime.addYears(this.ClockDateTime,e),this.Offset)},System$IComparable$compareTo:function(e){if(e==null)return 1;if(!Bridge.is(e,System.DateTimeOffset))throw new System.ArgumentException.$ctor1(System.Environment.GetResourceString("Arg_MustBeDateTimeOffset"));var t=System.Nullable.getValue(Bridge.cast(Bridge.unbox(e,System.DateTimeOffset),System.DateTimeOffset)).UtcDateTime,i=this.UtcDateTime;return System.DateTime.gt(i,t)?1:System.DateTime.lt(i,t)?-1:0},compareTo:function(e){var t=e.UtcDateTime,i=this.UtcDateTime;return System.DateTime.gt(i,t)?1:System.DateTime.lt(i,t)?-1:0},equals:function(e){return Bridge.is(e,System.DateTimeOffset)?Bridge.equalsT(this.UtcDateTime,System.Nullable.getValue(Bridge.cast(Bridge.unbox(e,System.DateTimeOffset),System.DateTimeOffset)).UtcDateTime):!1},equalsT:function(e){return Bridge.equalsT(this.UtcDateTime,e.UtcDateTime)},EqualsExact:function(e){return Bridge.equals(this.ClockDateTime,e.ClockDateTime)&&System.TimeSpan.eq(this.Offset,e.Offset)&&System.DateTime.getKind(this.ClockDateTime)===System.DateTime.getKind(e.ClockDateTime)},System$Runtime$Serialization$IDeserializationCallback$OnDeserialization:function(e){try{this.m_offsetMinutes=System.DateTimeOffset.ValidateOffset(this.Offset),this.m_dateTime=System.DateTimeOffset.ValidateDate(this.ClockDateTime,this.Offset)}catch(i){i=System.Exception.create(i);var t;throw Bridge.is(i,System.ArgumentException)?(t=i,new System.Runtime.Serialization.SerializationException.$ctor2(System.Environment.GetResourceString("Serialization_InvalidData"),t)):i}},getHashCode:function(){return Bridge.getHashCode(this.UtcDateTime)},Subtract$1:function(e){return System.DateTime.subdd(this.UtcDateTime,e.UtcDateTime)},Subtract:function(e){return new System.DateTimeOffset.$ctor2(System.DateTime.subtract(this.ClockDateTime,e),this.Offset)},ToFileTime:function(){return System.DateTime.ToFileTime(this.UtcDateTime)},ToUnixTimeSeconds:function(){var e=System.DateTime.getTicks(this.UtcDateTime).div(System.Int64(1e7));return e.sub(System.DateTimeOffset.UnixEpochSeconds)},ToUnixTimeMilliseconds:function(){var e=System.DateTime.getTicks(this.UtcDateTime).div(System.Int64(1e4));return e.sub(System.DateTimeOffset.UnixEpochMilliseconds)},ToLocalTime:function(){return this.ToLocalTime$1(!1)},ToLocalTime$1:function(e){return new System.DateTimeOffset.$ctor1(System.DateTime.toLocalTime(this.UtcDateTime,e))},toString:function(){return System.DateTime.format(System.DateTime.specifyKind(this.ClockDateTime,2))},ToString$1:function(e){return System.DateTime.format(System.DateTime.specifyKind(this.ClockDateTime,2),e)},ToString:function(e){return System.DateTime.format(System.DateTime.specifyKind(this.ClockDateTime,2),null,e)},format:function(e,t){return System.DateTime.format(System.DateTime.specifyKind(this.ClockDateTime,2),e,t)},ToUniversalTime:function(){return new System.DateTimeOffset.$ctor1(this.UtcDateTime)},$clone:function(e){var t=e||new System.DateTimeOffset;return t.m_dateTime=this.m_dateTime,t.m_offsetMinutes=this.m_offsetMinutes,t}}}),Bridge.define("System.DateTimeParse",{statics:{methods:{TryParseExact:function(e,t,i,r,n){return System.DateTime.tryParseExact(e,t,null,n)},Parse:function(e,t,i){return System.DateTime.parse(e,t)},Parse$1:function(e,t,i,r){throw System.NotImplemented.ByDesign},TryParse:function(e,t,i,r){return System.DateTime.tryParse(e,null,r)},TryParse$1:function(e,t,i,r,n){throw System.NotImplemented.ByDesign}}}}),Bridge.define("System.DateTimeResult",{$kind:"struct",statics:{methods:{getDefaultValue:function(){return new System.DateTimeResult}}},fields:{Year:0,Month:0,Day:0,Hour:0,Minute:0,Second:0,fraction:0,era:0,flags:0,timeZoneOffset:null,calendar:null,parsedDate:null,failure:0,failureMessageID:null,failureMessageFormatArgument:null,failureArgumentName:null},ctors:{init:function(){this.timeZoneOffset=new System.TimeSpan,this.parsedDate=System.DateTime.getDefaultValue()},ctor:function(){this.$initialize()}},methods:{Init:function(){this.Year=-1,this.Month=-1,this.Day=-1,this.fraction=-1,this.era=-1},SetDate:function(e,t,i){this.Year=e,this.Month=t,this.Day=i},SetFailure:function(e,t,i){this.failure=e,this.failureMessageID=t,this.failureMessageFormatArgument=i},SetFailure$1:function(e,t,i,r){this.failure=e,this.failureMessageID=t,this.failureMessageFormatArgument=i,this.failureArgumentName=r},getHashCode:function(){return Bridge.addHash([5374321750,this.Year,this.Month,this.Day,this.Hour,this.Minute,this.Second,this.fraction,this.era,this.flags,this.timeZoneOffset,this.calendar,this.parsedDate,this.failure,this.failureMessageID,this.failureMessageFormatArgument,this.failureArgumentName])},equals:function(e){return Bridge.is(e,System.DateTimeResult)?Bridge.equals(this.Year,e.Year)&&Bridge.equals(this.Month,e.Month)&&Bridge.equals(this.Day,e.Day)&&Bridge.equals(this.Hour,e.Hour)&&Bridge.equals(this.Minute,e.Minute)&&Bridge.equals(this.Second,e.Second)&&Bridge.equals(this.fraction,e.fraction)&&Bridge.equals(this.era,e.era)&&Bridge.equals(this.flags,e.flags)&&Bridge.equals(this.timeZoneOffset,e.timeZoneOffset)&&Bridge.equals(this.calendar,e.calendar)&&Bridge.equals(this.parsedDate,e.parsedDate)&&Bridge.equals(this.failure,e.failure)&&Bridge.equals(this.failureMessageID,e.failureMessageID)&&Bridge.equals(this.failureMessageFormatArgument,e.failureMessageFormatArgument)&&Bridge.equals(this.failureArgumentName,e.failureArgumentName):!1},$clone:function(e){var t=e||new System.DateTimeResult;return t.Year=this.Year,t.Month=this.Month,t.Day=this.Day,t.Hour=this.Hour,t.Minute=this.Minute,t.Second=this.Second,t.fraction=this.fraction,t.era=this.era,t.flags=this.flags,t.timeZoneOffset=this.timeZoneOffset,t.calendar=this.calendar,t.parsedDate=this.parsedDate,t.failure=this.failure,t.failureMessageID=this.failureMessageID,t.failureMessageFormatArgument=this.failureMessageFormatArgument,t.failureArgumentName=this.failureArgumentName,t}}}),Bridge.define("System.DayOfWeek",{$kind:"enum",statics:{fields:{Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6}}}),Bridge.define("System.DBNull",{inherits:[System.Runtime.Serialization.ISerializable,System.IConvertible],statics:{fields:{Value:null},ctors:{init:function(){this.Value=new System.DBNull}}},alias:["ToString","System$IConvertible$ToString","GetTypeCode","System$IConvertible$GetTypeCode"],ctors:{ctor:function(){this.$initialize()}},methods:{toString:function(){return""},ToString:function(e){return""},GetTypeCode:function(){return System.TypeCode.DBNull},System$IConvertible$ToBoolean:function(e){throw new System.InvalidCastException.$ctor1("Object cannot be cast from DBNull to other types.")},System$IConvertible$ToChar:function(e){throw new System.InvalidCastException.$ctor1("Object cannot be cast from DBNull to other types.")},System$IConvertible$ToSByte:function(e){throw new System.InvalidCastException.$ctor1("Object cannot be cast from DBNull to other types.")},System$IConvertible$ToByte:function(e){throw new System.InvalidCastException.$ctor1("Object cannot be cast from DBNull to other types.")},System$IConvertible$ToInt16:function(e){throw new System.InvalidCastException.$ctor1("Object cannot be cast from DBNull to other types.")},System$IConvertible$ToUInt16:function(e){throw new System.InvalidCastException.$ctor1("Object cannot be cast from DBNull to other types.")},System$IConvertible$ToInt32:function(e){throw new System.InvalidCastException.$ctor1("Object cannot be cast from DBNull to other types.")},System$IConvertible$ToUInt32:function(e){throw new System.InvalidCastException.$ctor1("Object cannot be cast from DBNull to other types.")},System$IConvertible$ToInt64:function(e){throw new System.InvalidCastException.$ctor1("Object cannot be cast from DBNull to other types.")},System$IConvertible$ToUInt64:function(e){throw new System.InvalidCastException.$ctor1("Object cannot be cast from DBNull to other types.")},System$IConvertible$ToSingle:function(e){throw new System.InvalidCastException.$ctor1("Object cannot be cast from DBNull to other types.")},System$IConvertible$ToDouble:function(e){throw new System.InvalidCastException.$ctor1("Object cannot be cast from DBNull to other types.")},System$IConvertible$ToDecimal:function(e){throw new System.InvalidCastException.$ctor1("Object cannot be cast from DBNull to other types.")},System$IConvertible$ToDateTime:function(e){throw new System.InvalidCastException.$ctor1("Object cannot be cast from DBNull to other types.")},System$IConvertible$ToType:function(e,t){return System.Convert.defaultToType(Bridge.cast(this,System.IConvertible),e,t)}}}),Bridge.define("System.Empty",{statics:{fields:{Value:null},ctors:{init:function(){this.Value=new System.Empty}}},ctors:{ctor:function(){this.$initialize()}},methods:{toString:function(){return""}}}),Bridge.define("System.ApplicationException",{inherits:[System.Exception],ctors:{ctor:function(){this.$initialize(),System.Exception.ctor.call(this,"Error in the application."),this.HResult=-2146232832},$ctor1:function(e){this.$initialize(),System.Exception.ctor.call(this,e),this.HResult=-2146232832},$ctor2:function(e,t){this.$initialize(),System.Exception.ctor.call(this,e,t),this.HResult=-2146232832}}}),Bridge.define("System.ArgumentException",{inherits:[System.SystemException],fields:{_paramName:null},props:{Message:{get:function(){var e=Bridge.ensureBaseProperty(this,"Message").$System$Exception$Message,t;return System.String.isNullOrEmpty(this._paramName)?e:(t=System.SR.Format("Parameter name: {0}",this._paramName),(e||"")+` `+(t||""))}},ParamName:{get:function(){return this._paramName}}},ctors:{ctor:function(){this.$initialize(),System.SystemException.$ctor1.call(this,"Value does not fall within the expected range."),this.HResult=-2147024809},$ctor1:function(e){this.$initialize(),System.SystemException.$ctor1.call(this,e),this.HResult=-2147024809},$ctor2:function(e,t){this.$initialize(),System.SystemException.$ctor2.call(this,e,t),this.HResult=-2147024809},$ctor4:function(e,t,i){this.$initialize(),System.SystemException.$ctor2.call(this,e,i),this._paramName=t,this.HResult=-2147024809},$ctor3:function(e,t){this.$initialize(),System.SystemException.$ctor1.call(this,e),this._paramName=t,this.HResult=-2147024809}}}),Bridge.define("System.ArgumentNullException",{inherits:[System.ArgumentException],ctors:{ctor:function(){this.$initialize(),System.ArgumentException.$ctor1.call(this,"Value cannot be null."),this.HResult=-2147467261},$ctor1:function(e){this.$initialize(),System.ArgumentException.$ctor3.call(this,"Value cannot be null.",e),this.HResult=-2147467261},$ctor2:function(e,t){this.$initialize(),System.ArgumentException.$ctor2.call(this,e,t),this.HResult=-2147467261},$ctor3:function(e,t){this.$initialize(),System.ArgumentException.$ctor3.call(this,t,e),this.HResult=-2147467261}}}),Bridge.define("System.ArgumentOutOfRangeException",{inherits:[System.ArgumentException],fields:{_actualValue:null},props:{Message:{get:function(){var e=Bridge.ensureBaseProperty(this,"Message").$System$ArgumentException$Message,t;return this._actualValue!=null?(t=System.SR.Format("Actual value was {0}.",Bridge.toString(this._actualValue)),e==null?t:(e||"")+` `+(t||"")):e}},ActualValue:{get:function(){return this._actualValue}}},ctors:{ctor:function(){this.$initialize(),System.ArgumentException.$ctor1.call(this,"Specified argument was out of the range of valid values."),this.HResult=-2146233086},$ctor1:function(e){this.$initialize(),System.ArgumentException.$ctor3.call(this,"Specified argument was out of the range of valid values.",e),this.HResult=-2146233086},$ctor4:function(e,t){this.$initialize(),System.ArgumentException.$ctor3.call(this,t,e),this.HResult=-2146233086},$ctor2:function(e,t){this.$initialize(),System.ArgumentException.$ctor2.call(this,e,t),this.HResult=-2146233086},$ctor3:function(e,t,i){this.$initialize(),System.ArgumentException.$ctor3.call(this,i,e),this._actualValue=t,this.HResult=-2146233086}}}),Bridge.define("System.ArithmeticException",{inherits:[System.SystemException],ctors:{ctor:function(){this.$initialize(),System.SystemException.$ctor1.call(this,"Overflow or underflow in the arithmetic operation."),this.HResult=-2147024362},$ctor1:function(e){this.$initialize(),System.SystemException.$ctor1.call(this,e),this.HResult=-2147024362},$ctor2:function(e,t){this.$initialize(),System.SystemException.$ctor2.call(this,e,t),this.HResult=-2147024362}}}),Bridge.define("System.Base64FormattingOptions",{$kind:"enum",statics:{fields:{None:0,InsertLineBreaks:1}},$flags:!0}),Bridge.define("System.DivideByZeroException",{inherits:[System.ArithmeticException],ctors:{ctor:function(){this.$initialize(),System.ArithmeticException.$ctor1.call(this,"Attempted to divide by zero."),this.HResult=-2147352558},$ctor1:function(e){this.$initialize(),System.ArithmeticException.$ctor1.call(this,e),this.HResult=-2147352558},$ctor2:function(e,t){this.$initialize(),System.ArithmeticException.$ctor2.call(this,e,t),this.HResult=-2147352558}}}),Bridge.define("System.ExceptionArgument",{$kind:"enum",statics:{fields:{obj:0,dictionary:1,array:2,info:3,key:4,collection:5,list:6,match:7,converter:8,capacity:9,index:10,startIndex:11,value:12,count:13,arrayIndex:14,$name:15,item:16,options:17,view:18,sourceBytesToCopy:19,action:20,comparison:21,offset:22,newSize:23,elementType:24,$length:25,length1:26,length2:27,length3:28,lengths:29,len:30,lowerBounds:31,sourceArray:32,destinationArray:33,sourceIndex:34,destinationIndex:35,indices:36,index1:37,index2:38,index3:39,other:40,comparer:41,endIndex:42,keys:43,creationOptions:44,timeout:45,tasks:46,scheduler:47,continuationFunction:48,millisecondsTimeout:49,millisecondsDelay:50,function:51,exceptions:52,exception:53,cancellationToken:54,delay:55,asyncResult:56,endMethod:57,endFunction:58,beginMethod:59,continuationOptions:60,continuationAction:61,concurrencyLevel:62,text:63,callBack:64,type:65,stateMachine:66,pHandle:67,values:68,task:69,s:70,keyValuePair:71,input:72,ownedMemory:73,pointer:74,start:75,format:76,culture:77,comparable:78,source:79,state:80}}}),Bridge.define("System.ExceptionResource",{$kind:"enum",statics:{fields:{Argument_ImplementIComparable:0,Argument_InvalidType:1,Argument_InvalidArgumentForComparison:2,Argument_InvalidRegistryKeyPermissionCheck:3,ArgumentOutOfRange_NeedNonNegNum:4,Arg_ArrayPlusOffTooSmall:5,Arg_NonZeroLowerBound:6,Arg_RankMultiDimNotSupported:7,Arg_RegKeyDelHive:8,Arg_RegKeyStrLenBug:9,Arg_RegSetStrArrNull:10,Arg_RegSetMismatchedKind:11,Arg_RegSubKeyAbsent:12,Arg_RegSubKeyValueAbsent:13,Argument_AddingDuplicate:14,Serialization_InvalidOnDeser:15,Serialization_MissingKeys:16,Serialization_NullKey:17,Argument_InvalidArrayType:18,NotSupported_KeyCollectionSet:19,NotSupported_ValueCollectionSet:20,ArgumentOutOfRange_SmallCapacity:21,ArgumentOutOfRange_Index:22,Argument_InvalidOffLen:23,Argument_ItemNotExist:24,ArgumentOutOfRange_Count:25,ArgumentOutOfRange_InvalidThreshold:26,ArgumentOutOfRange_ListInsert:27,NotSupported_ReadOnlyCollection:28,InvalidOperation_CannotRemoveFromStackOrQueue:29,InvalidOperation_EmptyQueue:30,InvalidOperation_EnumOpCantHappen:31,InvalidOperation_EnumFailedVersion:32,InvalidOperation_EmptyStack:33,ArgumentOutOfRange_BiggerThanCollection:34,InvalidOperation_EnumNotStarted:35,InvalidOperation_EnumEnded:36,NotSupported_SortedListNestedWrite:37,InvalidOperation_NoValue:38,InvalidOperation_RegRemoveSubKey:39,Security_RegistryPermission:40,UnauthorizedAccess_RegistryNoWrite:41,ObjectDisposed_RegKeyClosed:42,NotSupported_InComparableType:43,Argument_InvalidRegistryOptionsCheck:44,Argument_InvalidRegistryViewCheck:45,InvalidOperation_NullArray:46,Arg_MustBeType:47,Arg_NeedAtLeast1Rank:48,ArgumentOutOfRange_HugeArrayNotSupported:49,Arg_RanksAndBounds:50,Arg_RankIndices:51,Arg_Need1DArray:52,Arg_Need2DArray:53,Arg_Need3DArray:54,NotSupported_FixedSizeCollection:55,ArgumentException_OtherNotArrayOfCorrectLength:56,Rank_MultiDimNotSupported:57,InvalidOperation_IComparerFailed:58,ArgumentOutOfRange_EndIndexStartIndex:59,Arg_LowerBoundsMustMatch:60,Arg_BogusIComparer:61,Task_WaitMulti_NullTask:62,Task_ThrowIfDisposed:63,Task_Start_TaskCompleted:64,Task_Start_Promise:65,Task_Start_ContinuationTask:66,Task_Start_AlreadyStarted:67,Task_RunSynchronously_TaskCompleted:68,Task_RunSynchronously_Continuation:69,Task_RunSynchronously_Promise:70,Task_RunSynchronously_AlreadyStarted:71,Task_MultiTaskContinuation_NullTask:72,Task_MultiTaskContinuation_EmptyTaskList:73,Task_Dispose_NotCompleted:74,Task_Delay_InvalidMillisecondsDelay:75,Task_Delay_InvalidDelay:76,Task_ctor_LRandSR:77,Task_ContinueWith_NotOnAnything:78,Task_ContinueWith_ESandLR:79,TaskT_TransitionToFinal_AlreadyCompleted:80,TaskCompletionSourceT_TrySetException_NullException:81,TaskCompletionSourceT_TrySetException_NoExceptions:82,MemoryDisposed:83,Memory_OutstandingReferences:84,InvalidOperation_WrongAsyncResultOrEndCalledMultiple:85,ConcurrentDictionary_ConcurrencyLevelMustBePositive:86,ConcurrentDictionary_CapacityMustNotBeNegative:87,ConcurrentDictionary_TypeOfValueIncorrect:88,ConcurrentDictionary_TypeOfKeyIncorrect:89,ConcurrentDictionary_KeyAlreadyExisted:90,ConcurrentDictionary_ItemKeyIsNull:91,ConcurrentDictionary_IndexIsNegative:92,ConcurrentDictionary_ArrayNotLargeEnough:93,ConcurrentDictionary_ArrayIncorrectType:94,ConcurrentCollection_SyncRoot_NotSupported:95,ArgumentOutOfRange_Enum:96,InvalidOperation_HandleIsNotInitialized:97,AsyncMethodBuilder_InstanceNotInitialized:98,ArgumentNull_SafeHandle:99}}}),Bridge.define("System.FormatException",{inherits:[System.SystemException],ctors:{ctor:function(){this.$initialize(),System.SystemException.$ctor1.call(this,"One of the identified items was in an invalid format."),this.HResult=-2146233033},$ctor1:function(e){this.$initialize(),System.SystemException.$ctor1.call(this,e),this.HResult=-2146233033},$ctor2:function(e,t){this.$initialize(),System.SystemException.$ctor2.call(this,e,t),this.HResult=-2146233033}}}),Bridge.define("System.FormattableString",{inherits:[System.IFormattable],statics:{methods:{Invariant:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("formattable");return e.ToString(System.Globalization.CultureInfo.invariantCulture)}}},methods:{System$IFormattable$format:function(e,t){return this.ToString(t)},toString:function(){return this.ToString(System.Globalization.CultureInfo.getCurrentCulture())}}}),Bridge.define("System.Runtime.CompilerServices.FormattableStringFactory.ConcreteFormattableString",{inherits:[System.FormattableString],$kind:"nested class",fields:{_format:null,_arguments:null},props:{Format:{get:function(){return this._format}},ArgumentCount:{get:function(){return this._arguments.length}}},ctors:{ctor:function(e,t){this.$initialize(),System.FormattableString.ctor.call(this),this._format=e,this._arguments=t}},methods:{GetArguments:function(){return this._arguments},GetArgument:function(e){return this._arguments[System.Array.index(e,this._arguments)]},ToString:function(e){return System.String.formatProvider.apply(System.String,[e,this._format].concat(this._arguments))}}}),Bridge.define("System.Runtime.CompilerServices.FormattableStringFactory",{statics:{methods:{Create:function(e,t){if(t===void 0&&(t=[]),e==null)throw new System.ArgumentNullException.$ctor1("format");if(t==null)throw new System.ArgumentNullException.$ctor1("arguments");return new System.Runtime.CompilerServices.FormattableStringFactory.ConcreteFormattableString(e,t)}}}}),Bridge.define("System.Guid",{inherits:function(){return[System.IEquatable$1(System.Guid),System.IComparable$1(System.Guid),System.IFormattable]},$kind:"struct",statics:{fields:{error1:null,Valid:null,Split:null,NonFormat:null,Replace:null,Rnd:null,Empty:null},ctors:{init:function(){this.Empty=new System.Guid,this.error1="Byte array for GUID must be exactly {0} bytes long",this.Valid=new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","i"),this.Split=new RegExp("^(.{8})(.{4})(.{4})(.{4})(.{12})$"),this.NonFormat=new RegExp("^[{(]?([0-9a-f]{8})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{12})[)}]?$","i"),this.Replace=new RegExp("-","g"),this.Rnd=new System.Random.ctor}},methods:{Parse:function(e){return System.Guid.ParseExact(e,null)},ParseExact:function(e,t){var i=new System.Guid.ctor;return i.ParseInternal(e,t,!0),i},TryParse:function(e,t){return System.Guid.TryParseExact(e,null,t)},TryParseExact:function(e,t,i){return i.v=new System.Guid.ctor,i.v.ParseInternal(e,t,!1)},NewGuid:function(){var e=System.Array.init(16,0,System.Byte);return System.Guid.Rnd.NextBytes(e),e[System.Array.index(7,e)]=(e[System.Array.index(7,e)]&15|64)&255,e[System.Array.index(8,e)]=(e[System.Array.index(8,e)]&191|128)&255,new System.Guid.$ctor1(e)},ToHex$1:function(e,t){var i=e.toString(16),r;for(t=t-i.length|0,r=0;r<t;r=r+1|0)i="0"+(i||"");return i},ToHex:function(e){var t=e.toString(16);return t.length===1&&(t="0"+(t||"")),t},op_Equality:function(e,t){return Bridge.referenceEquals(e,null)?Bridge.referenceEquals(t,null):e.equalsT(t)},op_Inequality:function(e,t){return!System.Guid.op_Equality(e,t)},getDefaultValue:function(){return new System.Guid}}},fields:{_a:0,_b:0,_c:0,_d:0,_e:0,_f:0,_g:0,_h:0,_i:0,_j:0,_k:0},alias:["equalsT","System$IEquatable$1$System$Guid$equalsT","compareTo",["System$IComparable$1$System$Guid$compareTo","System$IComparable$1$compareTo"],"format","System$IFormattable$format"],ctors:{$ctor4:function(e){this.$initialize(),new System.Guid.ctor().$clone(this),this.ParseInternal(e,null,!0)},$ctor1:function(e){if(this.$initialize(),e==null)throw new System.ArgumentNullException.$ctor1("b");if(e.length!==16)throw new System.ArgumentException.$ctor1(System.String.format(System.Guid.error1,[Bridge.box(16,System.Int32)]));this._a=e[System.Array.index(3,e)]<<24|e[System.Array.index(2,e)]<<16|e[System.Array.index(1,e)]<<8|e[System.Array.index(0,e)],this._b=Bridge.Int.sxs((e[System.Array.index(5,e)]<<8|e[System.Array.index(4,e)])&65535),this._c=Bridge.Int.sxs((e[System.Array.index(7,e)]<<8|e[System.Array.index(6,e)])&65535),this._d=e[System.Array.index(8,e)],this._e=e[System.Array.index(9,e)],this._f=e[System.Array.index(10,e)],this._g=e[System.Array.index(11,e)],this._h=e[System.Array.index(12,e)],this._i=e[System.Array.index(13,e)],this._j=e[System.Array.index(14,e)],this._k=e[System.Array.index(15,e)]},$ctor5:function(e,t,i,r,n,s,o,a,l,u,d){this.$initialize(),this._a=e|0,this._b=Bridge.Int.sxs(t&65535),this._c=Bridge.Int.sxs(i&65535),this._d=r,this._e=n,this._f=s,this._g=o,this._h=a,this._i=l,this._j=u,this._k=d},$ctor3:function(e,t,i,r){if(this.$initialize(),r==null)throw new System.ArgumentNullException.$ctor1("d");if(r.length!==8)throw new System.ArgumentException.$ctor1(System.String.format(System.Guid.error1,[Bridge.box(8,System.Int32)]));this._a=e,this._b=t,this._c=i,this._d=r[System.Array.index(0,r)],this._e=r[System.Array.index(1,r)],this._f=r[System.Array.index(2,r)],this._g=r[System.Array.index(3,r)],this._h=r[System.Array.index(4,r)],this._i=r[System.Array.index(5,r)],this._j=r[System.Array.index(6,r)],this._k=r[System.Array.index(7,r)]},$ctor2:function(e,t,i,r,n,s,o,a,l,u,d){this.$initialize(),this._a=e,this._b=t,this._c=i,this._d=r,this._e=n,this._f=s,this._g=o,this._h=a,this._i=l,this._j=u,this._k=d},ctor:function(){this.$initialize()}},methods:{getHashCode:function(){return this._a^(this._b<<16|this._c&65535)^(this._f<<24|this._k)},equals:function(e){return Bridge.is(e,System.Guid)?this.equalsT(System.Nullable.getValue(Bridge.cast(Bridge.unbox(e,System.Guid),System.Guid))):!1},equalsT:function(e){return!(this._a!==e._a||this._b!==e._b||this._c!==e._c||this._d!==e._d||this._e!==e._e||this._f!==e._f||this._g!==e._g||this._h!==e._h||this._i!==e._i||this._j!==e._j||this._k!==e._k)},compareTo:function(e){return System.String.compare(this.toString(),e.toString())},toString:function(){return this.Format(null)},ToString:function(e){return this.Format(e)},format:function(e,t){return this.Format(e)},ToByteArray:function(){var e=System.Array.init(16,0,System.Byte);return e[System.Array.index(0,e)]=this._a&255,e[System.Array.index(1,e)]=this._a>>8&255,e[System.Array.index(2,e)]=this._a>>16&255,e[System.Array.index(3,e)]=this._a>>24&255,e[System.Array.index(4,e)]=this._b&255,e[System.Array.index(5,e)]=this._b>>8&255,e[System.Array.index(6,e)]=this._c&255,e[System.Array.index(7,e)]=this._c>>8&255,e[System.Array.index(8,e)]=this._d,e[System.Array.index(9,e)]=this._e,e[System.Array.index(10,e)]=this._f,e[System.Array.index(11,e)]=this._g,e[System.Array.index(12,e)]=this._h,e[System.Array.index(13,e)]=this._i,e[System.Array.index(14,e)]=this._j,e[System.Array.index(15,e)]=this._k,e},ParseInternal:function(e,t,i){var r=null,n,s,o,a,l,u,d,f;if(System.String.isNullOrEmpty(e)){if(i)throw new System.ArgumentNullException.$ctor1("input");return!1}if(System.String.isNullOrEmpty(t)){if(n=System.Guid.NonFormat.exec(e),n!=null){for(s=new(System.Collections.Generic.List$1(System.String)).ctor,o=1;o<=n.length;o=o+1|0)n[o]!=null&&s.add(n[o]);r=s.ToArray().join("-").toLowerCase()}}else{if(t=t.toUpperCase(),a=!1,Bridge.referenceEquals(t,"N")){if(l=System.Guid.Split.exec(e),l!=null){for(u=new(System.Collections.Generic.List$1(System.String)).ctor,d=1;d<=l.length;d=d+1|0)l[d]!=null&&u.add(l[d]);a=!0,e=u.ToArray().join("-")}}else Bridge.referenceEquals(t,"B")||Bridge.referenceEquals(t,"P")?(f=Bridge.referenceEquals(t,"B")?System.Array.init([123,125],System.Char):System.Array.init([40,41],System.Char),e.charCodeAt(0)===f[System.Array.index(0,f)]&&e.charCodeAt(e.length-1|0)===f[System.Array.index(1,f)]&&(a=!0,e=e.substr(1,e.length-2|0))):a=!0;a&&System.Guid.Valid.test(e)&&(r=e.toLowerCase())}if(r!=null)return this.FromString(r),!0;if(i)throw new System.FormatException.$ctor1("input is not in a recognized format");return!1},Format:function(e){var t=(System.Guid.ToHex$1(this._a>>>0,8)||"")+(System.Guid.ToHex$1(this._b&65535,4)||"")+(System.Guid.ToHex$1(this._c&65535,4)||""),i,r,n;for(t=(t||"")+(System.Array.init([this._d,this._e,this._f,this._g,this._h,this._i,this._j,this._k],System.Byte).map(System.Guid.ToHex).join("")||""),i=/^(.{8})(.{4})(.{4})(.{4})(.{12})$/.exec(t),r=System.Array.init(0,null,System.String),n=1;n<i.length;n=n+1|0)i[System.Array.index(n,i)]!=null&&r.push(i[System.Array.index(n,i)]);switch(t=r.join("-"),e){case"n":case"N":return t.replace(System.Guid.Replace,"");case"b":case"B":return String.fromCharCode(123)+(t||"")+String.fromCharCode(125);case"p":case"P":return String.fromCharCode(40)+(t||"")+String.fromCharCode(41);default:return t}},FromString:function(e){var t,i;if(!System.String.isNullOrEmpty(e)){for(e=e.replace(System.Guid.Replace,""),t=System.Array.init(8,0,System.Byte),this._a=System.UInt32.parse(e.substr(0,8),16)|0,this._b=Bridge.Int.sxs(System.UInt16.parse(e.substr(8,4),16)&65535),this._c=Bridge.Int.sxs(System.UInt16.parse(e.substr(12,4),16)&65535),i=8;i<16;i=i+1|0)t[System.Array.index(i-8|0,t)]=System.Byte.parse(e.substr(Bridge.Int.mul(i,2),2),16);this._d=t[System.Array.index(0,t)],this._e=t[System.Array.index(1,t)],this._f=t[System.Array.index(2,t)],this._g=t[System.Array.index(3,t)],this._h=t[System.Array.index(4,t)],this._i=t[System.Array.index(5,t)],this._j=t[System.Array.index(6,t)],this._k=t[System.Array.index(7,t)]}},toJSON:function(){return this.toString()},$clone:function(e){return this}}}),Bridge.define("System.ITupleInternal",{$kind:"interface"}),Bridge.define("System.Tuple"),Bridge.define("System.Tuple$1",function(e){return{}}),Bridge.define("System.Tuple$2",function(e,t){return{}}),Bridge.define("System.Tuple$3",function(e,t,i){return{}}),Bridge.define("System.Tuple$4",function(e,t,i,r){return{}}),Bridge.define("System.Tuple$5",function(e,t,i,r,n){return{}}),Bridge.define("System.Tuple$6",function(e,t,i,r,n,s){return{}}),Bridge.define("System.Tuple$7",function(e,t,i,r,n,s,o){return{}}),Bridge.define("System.Tuple$8",function(e,t,i,r,n,s,o,a){return{}}),Bridge.define("System.ValueTuple",{inherits:function(){return[System.IEquatable$1(System.ValueTuple),System.Collections.IStructuralEquatable,System.Collections.IStructuralComparable,System.IComparable,System.IComparable$1(System.ValueTuple)]},$kind:"struct",statics:{methods:{Create:function(){return new System.ValueTuple},Create$1:function(e,t){return new(System.ValueTuple$1(e)).$ctor1(t)},Create$2:function(e,t,i,r){return new(System.ValueTuple$2(e,t)).$ctor1(i,r)},Create$3:function(e,t,i,r,n,s){return new(System.ValueTuple$3(e,t,i)).$ctor1(r,n,s)},Create$4:function(e,t,i,r,n,s,o,a){return new(System.ValueTuple$4(e,t,i,r)).$ctor1(n,s,o,a)},Create$5:function(e,t,i,r,n,s,o,a,l,u){return new(System.ValueTuple$5(e,t,i,r,n)).$ctor1(s,o,a,l,u)},Create$6:function(e,t,i,r,n,s,o,a,l,u,d,f){return new(System.ValueTuple$6(e,t,i,r,n,s)).$ctor1(o,a,l,u,d,f)},Create$7:function(e,t,i,r,n,s,o,a,l,u,d,f,C,E){return new(System.ValueTuple$7(e,t,i,r,n,s,o)).$ctor1(a,l,u,d,f,C,E)},Create$8:function(e,t,i,r,n,s,o,a,l,u,d,f,C,E,T,w){return new(System.ValueTuple$8(e,t,i,r,n,s,o,System.ValueTuple$1(a))).$ctor1(l,u,d,f,C,E,T,System.ValueTuple.Create$1(a,w))},CombineHashCodes:function(e,t){return System.Collections.HashHelpers.Combine(System.Collections.HashHelpers.Combine(System.Collections.HashHelpers.RandomSeed,e),t)},CombineHashCodes$1:function(e,t,i){return System.Collections.HashHelpers.Combine(System.ValueTuple.CombineHashCodes(e,t),i)},CombineHashCodes$2:function(e,t,i,r){return System.Collections.HashHelpers.Combine(System.ValueTuple.CombineHashCodes$1(e,t,i),r)},CombineHashCodes$3:function(e,t,i,r,n){return System.Collections.HashHelpers.Combine(System.ValueTuple.CombineHashCodes$2(e,t,i,r),n)},CombineHashCodes$4:function(e,t,i,r,n,s){return System.Collections.HashHelpers.Combine(System.ValueTuple.CombineHashCodes$3(e,t,i,r,n),s)},CombineHashCodes$5:function(e,t,i,r,n,s,o){return System.Collections.HashHelpers.Combine(System.ValueTuple.CombineHashCodes$4(e,t,i,r,n,s),o)},CombineHashCodes$6:function(e,t,i,r,n,s,o,a){return System.Collections.HashHelpers.Combine(System.ValueTuple.CombineHashCodes$5(e,t,i,r,n,s,o),a)},getDefaultValue:function(){return new System.ValueTuple}}},alias:["equalsT","System$IEquatable$1$System$ValueTuple$equalsT","compareTo",["System$IComparable$1$System$ValueTuple$compareTo","System$IComparable$1$compareTo"]],ctors:{ctor:function(){this.$initialize()}},methods:{equals:function(e){return Bridge.is(e,System.ValueTuple)},equalsT:function(e){return!0},System$Collections$IStructuralEquatable$Equals:function(e,t){return Bridge.is(e,System.ValueTuple)},System$IComparable$compareTo:function(e){if(e==null)return 1;if(!Bridge.is(e,System.ValueTuple))throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType,"other");return 0},compareTo:function(e){return 0},System$Collections$IStructuralComparable$CompareTo:function(e,t){if(e==null)return 1;if(!Bridge.is(e,System.ValueTuple))throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType,"other");return 0},getHashCode:function(){return 0},System$Collections$IStructuralEquatable$GetHashCode:function(e){return 0},toString:function(){return"()"},$clone:function(e){return this}}}),Bridge.define("System.ValueTuple$1",function(e){return{inherits:function(){return[System.IEquatable$1(System.ValueTuple$1(e)),System.Collections.IStructuralEquatable,System.Collections.IStructuralComparable,System.IComparable,System.IComparable$1(System.ValueTuple$1(e)),System.ITupleInternal]},$kind:"struct",statics:{fields:{s_t1Comparer:null},ctors:{init:function(){this.s_t1Comparer=System.Collections.Generic.EqualityComparer$1(e).def}},methods:{getDefaultValue:function(){return new(System.ValueTuple$1(e))}}},fields:{Item1:Bridge.getDefaultValue(e)},props:{System$ITupleInternal$Size:{get:function(){return 1}}},alias:["equalsT","System$IEquatable$1$System$ValueTuple$1$"+Bridge.getTypeAlias(e)+"$equalsT","compareTo",["System$IComparable$1$System$ValueTuple$1$"+Bridge.getTypeAlias(e)+"$compareTo","System$IComparable$1$compareTo"]],ctors:{$ctor1:function(t){this.$initialize(),this.Item1=t},ctor:function(){this.$initialize()}},methods:{equals:function(t){return Bridge.is(t,System.ValueTuple$1(e))&&this.equalsT(System.Nullable.getValue(Bridge.cast(Bridge.unbox(t,System.ValueTuple$1(e)),System.ValueTuple$1(e))))},equalsT:function(t){return System.ValueTuple$1(e).s_t1Comparer.equals2(this.Item1,t.Item1)},System$Collections$IStructuralEquatable$Equals:function(t,i){if(t==null||!Bridge.is(t,System.ValueTuple$1(e)))return!1;var r=System.Nullable.getValue(Bridge.cast(Bridge.unbox(t,System.ValueTuple$1(e)),System.ValueTuple$1(e)));return i.System$Collections$IEqualityComparer$equals(this.Item1,r.Item1)},System$IComparable$compareTo:function(t){if(t==null)return 1;if(!Bridge.is(t,System.ValueTuple$1(e)))throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType,"other");var i=System.Nullable.getValue(Bridge.cast(Bridge.unbox(t,System.ValueTuple$1(e)),System.ValueTuple$1(e)));return new(System.Collections.Generic.Comparer$1(e))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item1,i.Item1)},compareTo:function(t){return new(System.Collections.Generic.Comparer$1(e))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item1,t.Item1)},System$Collections$IStructuralComparable$CompareTo:function(t,i){if(t==null)return 1;if(!Bridge.is(t,System.ValueTuple$1(e)))throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType,"other");var r=System.Nullable.getValue(Bridge.cast(Bridge.unbox(t,System.ValueTuple$1(e)),System.ValueTuple$1(e)));return i.System$Collections$IComparer$compare(this.Item1,r.Item1)},getHashCode:function(){return System.ValueTuple$1(e).s_t1Comparer.getHashCode2(this.Item1)},System$Collections$IStructuralEquatable$GetHashCode:function(t){return t.System$Collections$IEqualityComparer$getHashCode(this.Item1)},System$ITupleInternal$GetHashCode:function(t){return t.System$Collections$IEqualityComparer$getHashCode(this.Item1)},toString:function(){return"("+((this.Item1!=null?Bridge.toString(this.Item1):null)||"")+")"},System$ITupleInternal$ToStringEnd:function(){return((this.Item1!=null?Bridge.toString(this.Item1):null)||"")+")"},$clone:function(t){var i=t||new(System.ValueTuple$1(e));return i.Item1=this.Item1,i}}}}),Bridge.define("System.ValueTuple$2",function(e,t){return{inherits:function(){return[System.IEquatable$1(System.ValueTuple$2(e,t)),System.Collections.IStructuralEquatable,System.Collections.IStructuralComparable,System.IComparable,System.IComparable$1(System.ValueTuple$2(e,t)),System.ITupleInternal]},$kind:"struct",statics:{fields:{s_t1Comparer:null,s_t2Comparer:null},ctors:{init:function(){this.s_t1Comparer=System.Collections.Generic.EqualityComparer$1(e).def,this.s_t2Comparer=System.Collections.Generic.EqualityComparer$1(t).def}},methods:{getDefaultValue:function(){return new(System.ValueTuple$2(e,t))}}},fields:{Item1:Bridge.getDefaultValue(e),Item2:Bridge.getDefaultValue(t)},props:{System$ITupleInternal$Size:{get:function(){return 2}}},alias:["equalsT","System$IEquatable$1$System$ValueTuple$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$equalsT","compareTo",["System$IComparable$1$System$ValueTuple$2$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$compareTo","System$IComparable$1$compareTo"]],ctors:{$ctor1:function(i,r){this.$initialize(),this.Item1=i,this.Item2=r},ctor:function(){this.$initialize()}},methods:{equals:function(i){return Bridge.is(i,System.ValueTuple$2(e,t))&&this.equalsT(System.Nullable.getValue(Bridge.cast(Bridge.unbox(i,System.ValueTuple$2(e,t)),System.ValueTuple$2(e,t))))},equalsT:function(i){return System.ValueTuple$2(e,t).s_t1Comparer.equals2(this.Item1,i.Item1)&&System.ValueTuple$2(e,t).s_t2Comparer.equals2(this.Item2,i.Item2)},System$Collections$IStructuralEquatable$Equals:function(i,r){if(i==null||!Bridge.is(i,System.ValueTuple$2(e,t)))return!1;var n=System.Nullable.getValue(Bridge.cast(Bridge.unbox(i,System.ValueTuple$2(e,t)),System.ValueTuple$2(e,t)));return r.System$Collections$IEqualityComparer$equals(this.Item1,n.Item1)&&r.System$Collections$IEqualityComparer$equals(this.Item2,n.Item2)},System$IComparable$compareTo:function(i){if(i==null)return 1;if(!Bridge.is(i,System.ValueTuple$2(e,t)))throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType,"other");return this.compareTo(System.Nullable.getValue(Bridge.cast(Bridge.unbox(i,System.ValueTuple$2(e,t)),System.ValueTuple$2(e,t))))},compareTo:function(i){var r=new(System.Collections.Generic.Comparer$1(e))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item1,i.Item1);return r!==0?r:new(System.Collections.Generic.Comparer$1(t))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item2,i.Item2)},System$Collections$IStructuralComparable$CompareTo:function(i,r){if(i==null)return 1;if(!Bridge.is(i,System.ValueTuple$2(e,t)))throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType,"other");var n=System.Nullable.getValue(Bridge.cast(Bridge.unbox(i,System.ValueTuple$2(e,t)),System.ValueTuple$2(e,t))),s=r.System$Collections$IComparer$compare(this.Item1,n.Item1);return s!==0?s:r.System$Collections$IComparer$compare(this.Item2,n.Item2)},getHashCode:function(){return System.ValueTuple.CombineHashCodes(System.ValueTuple$2(e,t).s_t1Comparer.getHashCode2(this.Item1),System.ValueTuple$2(e,t).s_t2Comparer.getHashCode2(this.Item2))},System$Collections$IStructuralEquatable$GetHashCode:function(i){return this.GetHashCodeCore(i)},System$ITupleInternal$GetHashCode:function(i){return this.GetHashCodeCore(i)},GetHashCodeCore:function(i){return System.ValueTuple.CombineHashCodes(i.System$Collections$IEqualityComparer$getHashCode(this.Item1),i.System$Collections$IEqualityComparer$getHashCode(this.Item2))},toString:function(){return"("+((this.Item1!=null?Bridge.toString(this.Item1):null)||"")+", "+((this.Item2!=null?Bridge.toString(this.Item2):null)||"")+")"},System$ITupleInternal$ToStringEnd:function(){return((this.Item1!=null?Bridge.toString(this.Item1):null)||"")+", "+((this.Item2!=null?Bridge.toString(this.Item2):null)||"")+")"},$clone:function(i){var r=i||new(System.ValueTuple$2(e,t));return r.Item1=this.Item1,r.Item2=this.Item2,r}}}}),Bridge.define("System.ValueTuple$3",function(e,t,i){return{inherits:function(){return[System.IEquatable$1(System.ValueTuple$3(e,t,i)),System.Collections.IStructuralEquatable,System.Collections.IStructuralComparable,System.IComparable,System.IComparable$1(System.ValueTuple$3(e,t,i)),System.ITupleInternal]},$kind:"struct",statics:{fields:{s_t1Comparer:null,s_t2Comparer:null,s_t3Comparer:null},ctors:{init:function(){this.s_t1Comparer=System.Collections.Generic.EqualityComparer$1(e).def,this.s_t2Comparer=System.Collections.Generic.EqualityComparer$1(t).def,this.s_t3Comparer=System.Collections.Generic.EqualityComparer$1(i).def}},methods:{getDefaultValue:function(){return new(System.ValueTuple$3(e,t,i))}}},fields:{Item1:Bridge.getDefaultValue(e),Item2:Bridge.getDefaultValue(t),Item3:Bridge.getDefaultValue(i)},props:{System$ITupleInternal$Size:{get:function(){return 3}}},alias:["equalsT","System$IEquatable$1$System$ValueTuple$3$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$"+Bridge.getTypeAlias(i)+"$equalsT","compareTo",["System$IComparable$1$System$ValueTuple$3$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$"+Bridge.getTypeAlias(i)+"$compareTo","System$IComparable$1$compareTo"]],ctors:{$ctor1:function(r,n,s){this.$initialize(),this.Item1=r,this.Item2=n,this.Item3=s},ctor:function(){this.$initialize()}},methods:{equals:function(r){return Bridge.is(r,System.ValueTuple$3(e,t,i))&&this.equalsT(System.Nullable.getValue(Bridge.cast(Bridge.unbox(r,System.ValueTuple$3(e,t,i)),System.ValueTuple$3(e,t,i))))},equalsT:function(r){return System.ValueTuple$3(e,t,i).s_t1Comparer.equals2(this.Item1,r.Item1)&&System.ValueTuple$3(e,t,i).s_t2Comparer.equals2(this.Item2,r.Item2)&&System.ValueTuple$3(e,t,i).s_t3Comparer.equals2(this.Item3,r.Item3)},System$Collections$IStructuralEquatable$Equals:function(r,n){if(r==null||!Bridge.is(r,System.ValueTuple$3(e,t,i)))return!1;var s=System.Nullable.getValue(Bridge.cast(Bridge.unbox(r,System.ValueTuple$3(e,t,i)),System.ValueTuple$3(e,t,i)));return n.System$Collections$IEqualityComparer$equals(this.Item1,s.Item1)&&n.System$Collections$IEqualityComparer$equals(this.Item2,s.Item2)&&n.System$Collections$IEqualityComparer$equals(this.Item3,s.Item3)},System$IComparable$compareTo:function(r){if(r==null)return 1;if(!Bridge.is(r,System.ValueTuple$3(e,t,i)))throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType,"other");return this.compareTo(System.Nullable.getValue(Bridge.cast(Bridge.unbox(r,System.ValueTuple$3(e,t,i)),System.ValueTuple$3(e,t,i))))},compareTo:function(r){var n=new(System.Collections.Generic.Comparer$1(e))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item1,r.Item1);return n!==0?n:(n=new(System.Collections.Generic.Comparer$1(t))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item2,r.Item2),n!==0?n:new(System.Collections.Generic.Comparer$1(i))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item3,r.Item3))},System$Collections$IStructuralComparable$CompareTo:function(r,n){if(r==null)return 1;if(!Bridge.is(r,System.ValueTuple$3(e,t,i)))throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType,"other");var s=System.Nullable.getValue(Bridge.cast(Bridge.unbox(r,System.ValueTuple$3(e,t,i)),System.ValueTuple$3(e,t,i))),o=n.System$Collections$IComparer$compare(this.Item1,s.Item1);return o!==0?o:(o=n.System$Collections$IComparer$compare(this.Item2,s.Item2),o!==0?o:n.System$Collections$IComparer$compare(this.Item3,s.Item3))},getHashCode:function(){return System.ValueTuple.CombineHashCodes$1(System.ValueTuple$3(e,t,i).s_t1Comparer.getHashCode2(this.Item1),System.ValueTuple$3(e,t,i).s_t2Comparer.getHashCode2(this.Item2),System.ValueTuple$3(e,t,i).s_t3Comparer.getHashCode2(this.Item3))},System$Collections$IStructuralEquatable$GetHashCode:function(r){return this.GetHashCodeCore(r)},System$ITupleInternal$GetHashCode:function(r){return this.GetHashCodeCore(r)},GetHashCodeCore:function(r){return System.ValueTuple.CombineHashCodes$1(r.System$Collections$IEqualityComparer$getHashCode(this.Item1),r.System$Collections$IEqualityComparer$getHashCode(this.Item2),r.System$Collections$IEqualityComparer$getHashCode(this.Item3))},toString:function(){return"("+((this.Item1!=null?Bridge.toString(this.Item1):null)||"")+", "+((this.Item2!=null?Bridge.toString(this.Item2):null)||"")+", "+((this.Item3!=null?Bridge.toString(this.Item3):null)||"")+")"},System$ITupleInternal$ToStringEnd:function(){return((this.Item1!=null?Bridge.toString(this.Item1):null)||"")+", "+((this.Item2!=null?Bridge.toString(this.Item2):null)||"")+", "+((this.Item3!=null?Bridge.toString(this.Item3):null)||"")+")"},$clone:function(r){var n=r||new(System.ValueTuple$3(e,t,i));return n.Item1=this.Item1,n.Item2=this.Item2,n.Item3=this.Item3,n}}}}),Bridge.define("System.ValueTuple$4",function(e,t,i,r){return{inherits:function(){return[System.IEquatable$1(System.ValueTuple$4(e,t,i,r)),System.Collections.IStructuralEquatable,System.Collections.IStructuralComparable,System.IComparable,System.IComparable$1(System.ValueTuple$4(e,t,i,r)),System.ITupleInternal]},$kind:"struct",statics:{fields:{s_t1Comparer:null,s_t2Comparer:null,s_t3Comparer:null,s_t4Comparer:null},ctors:{init:function(){this.s_t1Comparer=System.Collections.Generic.EqualityComparer$1(e).def,this.s_t2Comparer=System.Collections.Generic.EqualityComparer$1(t).def,this.s_t3Comparer=System.Collections.Generic.EqualityComparer$1(i).def,this.s_t4Comparer=System.Collections.Generic.EqualityComparer$1(r).def}},methods:{getDefaultValue:function(){return new(System.ValueTuple$4(e,t,i,r))}}},fields:{Item1:Bridge.getDefaultValue(e),Item2:Bridge.getDefaultValue(t),Item3:Bridge.getDefaultValue(i),Item4:Bridge.getDefaultValue(r)},props:{System$ITupleInternal$Size:{get:function(){return 4}}},alias:["equalsT","System$IEquatable$1$System$ValueTuple$4$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$"+Bridge.getTypeAlias(i)+"$"+Bridge.getTypeAlias(r)+"$equalsT","compareTo",["System$IComparable$1$System$ValueTuple$4$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$"+Bridge.getTypeAlias(i)+"$"+Bridge.getTypeAlias(r)+"$compareTo","System$IComparable$1$compareTo"]],ctors:{$ctor1:function(n,s,o,a){this.$initialize(),this.Item1=n,this.Item2=s,this.Item3=o,this.Item4=a},ctor:function(){this.$initialize()}},methods:{equals:function(n){return Bridge.is(n,System.ValueTuple$4(e,t,i,r))&&this.equalsT(System.Nullable.getValue(Bridge.cast(Bridge.unbox(n,System.ValueTuple$4(e,t,i,r)),System.ValueTuple$4(e,t,i,r))))},equalsT:function(n){return System.ValueTuple$4(e,t,i,r).s_t1Comparer.equals2(this.Item1,n.Item1)&&System.ValueTuple$4(e,t,i,r).s_t2Comparer.equals2(this.Item2,n.Item2)&&System.ValueTuple$4(e,t,i,r).s_t3Comparer.equals2(this.Item3,n.Item3)&&System.ValueTuple$4(e,t,i,r).s_t4Comparer.equals2(this.Item4,n.Item4)},System$Collections$IStructuralEquatable$Equals:function(n,s){if(n==null||!Bridge.is(n,System.ValueTuple$4(e,t,i,r)))return!1;var o=System.Nullable.getValue(Bridge.cast(Bridge.unbox(n,System.ValueTuple$4(e,t,i,r)),System.ValueTuple$4(e,t,i,r)));return s.System$Collections$IEqualityComparer$equals(this.Item1,o.Item1)&&s.System$Collections$IEqualityComparer$equals(this.Item2,o.Item2)&&s.System$Collections$IEqualityComparer$equals(this.Item3,o.Item3)&&s.System$Collections$IEqualityComparer$equals(this.Item4,o.Item4)},System$IComparable$compareTo:function(n){if(n==null)return 1;if(!Bridge.is(n,System.ValueTuple$4(e,t,i,r)))throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType,"other");return this.compareTo(System.Nullable.getValue(Bridge.cast(Bridge.unbox(n,System.ValueTuple$4(e,t,i,r)),System.ValueTuple$4(e,t,i,r))))},compareTo:function(n){var s=new(System.Collections.Generic.Comparer$1(e))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item1,n.Item1);return s!==0?s:(s=new(System.Collections.Generic.Comparer$1(t))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item2,n.Item2),s!==0?s:(s=new(System.Collections.Generic.Comparer$1(i))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item3,n.Item3),s!==0?s:new(System.Collections.Generic.Comparer$1(r))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item4,n.Item4)))},System$Collections$IStructuralComparable$CompareTo:function(n,s){if(n==null)return 1;if(!Bridge.is(n,System.ValueTuple$4(e,t,i,r)))throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType,"other");var o=System.Nullable.getValue(Bridge.cast(Bridge.unbox(n,System.ValueTuple$4(e,t,i,r)),System.ValueTuple$4(e,t,i,r))),a=s.System$Collections$IComparer$compare(this.Item1,o.Item1);return a!==0?a:(a=s.System$Collections$IComparer$compare(this.Item2,o.Item2),a!==0?a:(a=s.System$Collections$IComparer$compare(this.Item3,o.Item3),a!==0?a:s.System$Collections$IComparer$compare(this.Item4,o.Item4)))},getHashCode:function(){return System.ValueTuple.CombineHashCodes$2(System.ValueTuple$4(e,t,i,r).s_t1Comparer.getHashCode2(this.Item1),System.ValueTuple$4(e,t,i,r).s_t2Comparer.getHashCode2(this.Item2),System.ValueTuple$4(e,t,i,r).s_t3Comparer.getHashCode2(this.Item3),System.ValueTuple$4(e,t,i,r).s_t4Comparer.getHashCode2(this.Item4))},System$Collections$IStructuralEquatable$GetHashCode:function(n){return this.GetHashCodeCore(n)},System$ITupleInternal$GetHashCode:function(n){return this.GetHashCodeCore(n)},GetHashCodeCore:function(n){return System.ValueTuple.CombineHashCodes$2(n.System$Collections$IEqualityComparer$getHashCode(this.Item1),n.System$Collections$IEqualityComparer$getHashCode(this.Item2),n.System$Collections$IEqualityComparer$getHashCode(this.Item3),n.System$Collections$IEqualityComparer$getHashCode(this.Item4))},toString:function(){return"("+((this.Item1!=null?Bridge.toString(this.Item1):null)||"")+", "+((this.Item2!=null?Bridge.toString(this.Item2):null)||"")+", "+((this.Item3!=null?Bridge.toString(this.Item3):null)||"")+", "+((this.Item4!=null?Bridge.toString(this.Item4):null)||"")+")"},System$ITupleInternal$ToStringEnd:function(){return((this.Item1!=null?Bridge.toString(this.Item1):null)||"")+", "+((this.Item2!=null?Bridge.toString(this.Item2):null)||"")+", "+((this.Item3!=null?Bridge.toString(this.Item3):null)||"")+", "+((this.Item4!=null?Bridge.toString(this.Item4):null)||"")+")"},$clone:function(n){var s=n||new(System.ValueTuple$4(e,t,i,r));return s.Item1=this.Item1,s.Item2=this.Item2,s.Item3=this.Item3,s.Item4=this.Item4,s}}}}),Bridge.define("System.ValueTuple$5",function(e,t,i,r,n){return{inherits:function(){return[System.IEquatable$1(System.ValueTuple$5(e,t,i,r,n)),System.Collections.IStructuralEquatable,System.Collections.IStructuralComparable,System.IComparable,System.IComparable$1(System.ValueTuple$5(e,t,i,r,n)),System.ITupleInternal]},$kind:"struct",statics:{fields:{s_t1Comparer:null,s_t2Comparer:null,s_t3Comparer:null,s_t4Comparer:null,s_t5Comparer:null},ctors:{init:function(){this.s_t1Comparer=System.Collections.Generic.EqualityComparer$1(e).def,this.s_t2Comparer=System.Collections.Generic.EqualityComparer$1(t).def,this.s_t3Comparer=System.Collections.Generic.EqualityComparer$1(i).def,this.s_t4Comparer=System.Collections.Generic.EqualityComparer$1(r).def,this.s_t5Comparer=System.Collections.Generic.EqualityComparer$1(n).def}},methods:{getDefaultValue:function(){return new(System.ValueTuple$5(e,t,i,r,n))}}},fields:{Item1:Bridge.getDefaultValue(e),Item2:Bridge.getDefaultValue(t),Item3:Bridge.getDefaultValue(i),Item4:Bridge.getDefaultValue(r),Item5:Bridge.getDefaultValue(n)},props:{System$ITupleInternal$Size:{get:function(){return 5}}},alias:["equalsT","System$IEquatable$1$System$ValueTuple$5$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$"+Bridge.getTypeAlias(i)+"$"+Bridge.getTypeAlias(r)+"$"+Bridge.getTypeAlias(n)+"$equalsT","compareTo",["System$IComparable$1$System$ValueTuple$5$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$"+Bridge.getTypeAlias(i)+"$"+Bridge.getTypeAlias(r)+"$"+Bridge.getTypeAlias(n)+"$compareTo","System$IComparable$1$compareTo"]],ctors:{$ctor1:function(s,o,a,l,u){this.$initialize(),this.Item1=s,this.Item2=o,this.Item3=a,this.Item4=l,this.Item5=u},ctor:function(){this.$initialize()}},methods:{equals:function(s){return Bridge.is(s,System.ValueTuple$5(e,t,i,r,n))&&this.equalsT(System.Nullable.getValue(Bridge.cast(Bridge.unbox(s,System.ValueTuple$5(e,t,i,r,n)),System.ValueTuple$5(e,t,i,r,n))))},equalsT:function(s){return System.ValueTuple$5(e,t,i,r,n).s_t1Comparer.equals2(this.Item1,s.Item1)&&System.ValueTuple$5(e,t,i,r,n).s_t2Comparer.equals2(this.Item2,s.Item2)&&System.ValueTuple$5(e,t,i,r,n).s_t3Comparer.equals2(this.Item3,s.Item3)&&System.ValueTuple$5(e,t,i,r,n).s_t4Comparer.equals2(this.Item4,s.Item4)&&System.ValueTuple$5(e,t,i,r,n).s_t5Comparer.equals2(this.Item5,s.Item5)},System$Collections$IStructuralEquatable$Equals:function(s,o){if(s==null||!Bridge.is(s,System.ValueTuple$5(e,t,i,r,n)))return!1;var a=System.Nullable.getValue(Bridge.cast(Bridge.unbox(s,System.ValueTuple$5(e,t,i,r,n)),System.ValueTuple$5(e,t,i,r,n)));return o.System$Collections$IEqualityComparer$equals(this.Item1,a.Item1)&&o.System$Collections$IEqualityComparer$equals(this.Item2,a.Item2)&&o.System$Collections$IEqualityComparer$equals(this.Item3,a.Item3)&&o.System$Collections$IEqualityComparer$equals(this.Item4,a.Item4)&&o.System$Collections$IEqualityComparer$equals(this.Item5,a.Item5)},System$IComparable$compareTo:function(s){if(s==null)return 1;if(!Bridge.is(s,System.ValueTuple$5(e,t,i,r,n)))throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType,"other");return this.compareTo(System.Nullable.getValue(Bridge.cast(Bridge.unbox(s,System.ValueTuple$5(e,t,i,r,n)),System.ValueTuple$5(e,t,i,r,n))))},compareTo:function(s){var o=new(System.Collections.Generic.Comparer$1(e))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item1,s.Item1);return o!==0?o:(o=new(System.Collections.Generic.Comparer$1(t))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item2,s.Item2),o!==0?o:(o=new(System.Collections.Generic.Comparer$1(i))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item3,s.Item3),o!==0?o:(o=new(System.Collections.Generic.Comparer$1(r))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item4,s.Item4),o!==0?o:new(System.Collections.Generic.Comparer$1(n))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item5,s.Item5))))},System$Collections$IStructuralComparable$CompareTo:function(s,o){if(s==null)return 1;if(!Bridge.is(s,System.ValueTuple$5(e,t,i,r,n)))throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType,"other");var a=System.Nullable.getValue(Bridge.cast(Bridge.unbox(s,System.ValueTuple$5(e,t,i,r,n)),System.ValueTuple$5(e,t,i,r,n))),l=o.System$Collections$IComparer$compare(this.Item1,a.Item1);return l!==0?l:(l=o.System$Collections$IComparer$compare(this.Item2,a.Item2),l!==0?l:(l=o.System$Collections$IComparer$compare(this.Item3,a.Item3),l!==0?l:(l=o.System$Collections$IComparer$compare(this.Item4,a.Item4),l!==0?l:o.System$Collections$IComparer$compare(this.Item5,a.Item5))))},getHashCode:function(){return System.ValueTuple.CombineHashCodes$3(System.ValueTuple$5(e,t,i,r,n).s_t1Comparer.getHashCode2(this.Item1),System.ValueTuple$5(e,t,i,r,n).s_t2Comparer.getHashCode2(this.Item2),System.ValueTuple$5(e,t,i,r,n).s_t3Comparer.getHashCode2(this.Item3),System.ValueTuple$5(e,t,i,r,n).s_t4Comparer.getHashCode2(this.Item4),System.ValueTuple$5(e,t,i,r,n).s_t5Comparer.getHashCode2(this.Item5))},System$Collections$IStructuralEquatable$GetHashCode:function(s){return this.GetHashCodeCore(s)},System$ITupleInternal$GetHashCode:function(s){return this.GetHashCodeCore(s)},GetHashCodeCore:function(s){return System.ValueTuple.CombineHashCodes$3(s.System$Collections$IEqualityComparer$getHashCode(this.Item1),s.System$Collections$IEqualityComparer$getHashCode(this.Item2),s.System$Collections$IEqualityComparer$getHashCode(this.Item3),s.System$Collections$IEqualityComparer$getHashCode(this.Item4),s.System$Collections$IEqualityComparer$getHashCode(this.Item5))},toString:function(){return"("+((this.Item1!=null?Bridge.toString(this.Item1):null)||"")+", "+((this.Item2!=null?Bridge.toString(this.Item2):null)||"")+", "+((this.Item3!=null?Bridge.toString(this.Item3):null)||"")+", "+((this.Item4!=null?Bridge.toString(this.Item4):null)||"")+", "+((this.Item5!=null?Bridge.toString(this.Item5):null)||"")+")"},System$ITupleInternal$ToStringEnd:function(){return((this.Item1!=null?Bridge.toString(this.Item1):null)||"")+", "+((this.Item2!=null?Bridge.toString(this.Item2):null)||"")+", "+((this.Item3!=null?Bridge.toString(this.Item3):null)||"")+", "+((this.Item4!=null?Bridge.toString(this.Item4):null)||"")+", "+((this.Item5!=null?Bridge.toString(this.Item5):null)||"")+")"},$clone:function(s){var o=s||new(System.ValueTuple$5(e,t,i,r,n));return o.Item1=this.Item1,o.Item2=this.Item2,o.Item3=this.Item3,o.Item4=this.Item4,o.Item5=this.Item5,o}}}}),Bridge.define("System.ValueTuple$6",function(e,t,i,r,n,s){return{inherits:function(){return[System.IEquatable$1(System.ValueTuple$6(e,t,i,r,n,s)),System.Collections.IStructuralEquatable,System.Collections.IStructuralComparable,System.IComparable,System.IComparable$1(System.ValueTuple$6(e,t,i,r,n,s)),System.ITupleInternal]},$kind:"struct",statics:{fields:{s_t1Comparer:null,s_t2Comparer:null,s_t3Comparer:null,s_t4Comparer:null,s_t5Comparer:null,s_t6Comparer:null},ctors:{init:function(){this.s_t1Comparer=System.Collections.Generic.EqualityComparer$1(e).def,this.s_t2Comparer=System.Collections.Generic.EqualityComparer$1(t).def,this.s_t3Comparer=System.Collections.Generic.EqualityComparer$1(i).def,this.s_t4Comparer=System.Collections.Generic.EqualityComparer$1(r).def,this.s_t5Comparer=System.Collections.Generic.EqualityComparer$1(n).def,this.s_t6Comparer=System.Collections.Generic.EqualityComparer$1(s).def}},methods:{getDefaultValue:function(){return new(System.ValueTuple$6(e,t,i,r,n,s))}}},fields:{Item1:Bridge.getDefaultValue(e),Item2:Bridge.getDefaultValue(t),Item3:Bridge.getDefaultValue(i),Item4:Bridge.getDefaultValue(r),Item5:Bridge.getDefaultValue(n),Item6:Bridge.getDefaultValue(s)},props:{System$ITupleInternal$Size:{get:function(){return 6}}},alias:["equalsT","System$IEquatable$1$System$ValueTuple$6$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$"+Bridge.getTypeAlias(i)+"$"+Bridge.getTypeAlias(r)+"$"+Bridge.getTypeAlias(n)+"$"+Bridge.getTypeAlias(s)+"$equalsT","compareTo",["System$IComparable$1$System$ValueTuple$6$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$"+Bridge.getTypeAlias(i)+"$"+Bridge.getTypeAlias(r)+"$"+Bridge.getTypeAlias(n)+"$"+Bridge.getTypeAlias(s)+"$compareTo","System$IComparable$1$compareTo"]],ctors:{$ctor1:function(o,a,l,u,d,f){this.$initialize(),this.Item1=o,this.Item2=a,this.Item3=l,this.Item4=u,this.Item5=d,this.Item6=f},ctor:function(){this.$initialize()}},methods:{equals:function(o){return Bridge.is(o,System.ValueTuple$6(e,t,i,r,n,s))&&this.equalsT(System.Nullable.getValue(Bridge.cast(Bridge.unbox(o,System.ValueTuple$6(e,t,i,r,n,s)),System.ValueTuple$6(e,t,i,r,n,s))))},equalsT:function(o){return System.ValueTuple$6(e,t,i,r,n,s).s_t1Comparer.equals2(this.Item1,o.Item1)&&System.ValueTuple$6(e,t,i,r,n,s).s_t2Comparer.equals2(this.Item2,o.Item2)&&System.ValueTuple$6(e,t,i,r,n,s).s_t3Comparer.equals2(this.Item3,o.Item3)&&System.ValueTuple$6(e,t,i,r,n,s).s_t4Comparer.equals2(this.Item4,o.Item4)&&System.ValueTuple$6(e,t,i,r,n,s).s_t5Comparer.equals2(this.Item5,o.Item5)&&System.ValueTuple$6(e,t,i,r,n,s).s_t6Comparer.equals2(this.Item6,o.Item6)},System$Collections$IStructuralEquatable$Equals:function(o,a){if(o==null||!Bridge.is(o,System.ValueTuple$6(e,t,i,r,n,s)))return!1;var l=System.Nullable.getValue(Bridge.cast(Bridge.unbox(o,System.ValueTuple$6(e,t,i,r,n,s)),System.ValueTuple$6(e,t,i,r,n,s)));return a.System$Collections$IEqualityComparer$equals(this.Item1,l.Item1)&&a.System$Collections$IEqualityComparer$equals(this.Item2,l.Item2)&&a.System$Collections$IEqualityComparer$equals(this.Item3,l.Item3)&&a.System$Collections$IEqualityComparer$equals(this.Item4,l.Item4)&&a.System$Collections$IEqualityComparer$equals(this.Item5,l.Item5)&&a.System$Collections$IEqualityComparer$equals(this.Item6,l.Item6)},System$IComparable$compareTo:function(o){if(o==null)return 1;if(!Bridge.is(o,System.ValueTuple$6(e,t,i,r,n,s)))throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType,"other");return this.compareTo(System.Nullable.getValue(Bridge.cast(Bridge.unbox(o,System.ValueTuple$6(e,t,i,r,n,s)),System.ValueTuple$6(e,t,i,r,n,s))))},compareTo:function(o){var a=new(System.Collections.Generic.Comparer$1(e))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item1,o.Item1);return a!==0?a:(a=new(System.Collections.Generic.Comparer$1(t))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item2,o.Item2),a!==0?a:(a=new(System.Collections.Generic.Comparer$1(i))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item3,o.Item3),a!==0?a:(a=new(System.Collections.Generic.Comparer$1(r))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item4,o.Item4),a!==0?a:(a=new(System.Collections.Generic.Comparer$1(n))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item5,o.Item5),a!==0?a:new(System.Collections.Generic.Comparer$1(s))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item6,o.Item6)))))},System$Collections$IStructuralComparable$CompareTo:function(o,a){if(o==null)return 1;if(!Bridge.is(o,System.ValueTuple$6(e,t,i,r,n,s)))throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType,"other");var l=System.Nullable.getValue(Bridge.cast(Bridge.unbox(o,System.ValueTuple$6(e,t,i,r,n,s)),System.ValueTuple$6(e,t,i,r,n,s))),u=a.System$Collections$IComparer$compare(this.Item1,l.Item1);return u!==0?u:(u=a.System$Collections$IComparer$compare(this.Item2,l.Item2),u!==0?u:(u=a.System$Collections$IComparer$compare(this.Item3,l.Item3),u!==0?u:(u=a.System$Collections$IComparer$compare(this.Item4,l.Item4),u!==0?u:(u=a.System$Collections$IComparer$compare(this.Item5,l.Item5),u!==0?u:a.System$Collections$IComparer$compare(this.Item6,l.Item6)))))},getHashCode:function(){return System.ValueTuple.CombineHashCodes$4(System.ValueTuple$6(e,t,i,r,n,s).s_t1Comparer.getHashCode2(this.Item1),System.ValueTuple$6(e,t,i,r,n,s).s_t2Comparer.getHashCode2(this.Item2),System.ValueTuple$6(e,t,i,r,n,s).s_t3Comparer.getHashCode2(this.Item3),System.ValueTuple$6(e,t,i,r,n,s).s_t4Comparer.getHashCode2(this.Item4),System.ValueTuple$6(e,t,i,r,n,s).s_t5Comparer.getHashCode2(this.Item5),System.ValueTuple$6(e,t,i,r,n,s).s_t6Comparer.getHashCode2(this.Item6))},System$Collections$IStructuralEquatable$GetHashCode:function(o){return this.GetHashCodeCore(o)},System$ITupleInternal$GetHashCode:function(o){return this.GetHashCodeCore(o)},GetHashCodeCore:function(o){return System.ValueTuple.CombineHashCodes$4(o.System$Collections$IEqualityComparer$getHashCode(this.Item1),o.System$Collections$IEqualityComparer$getHashCode(this.Item2),o.System$Collections$IEqualityComparer$getHashCode(this.Item3),o.System$Collections$IEqualityComparer$getHashCode(this.Item4),o.System$Collections$IEqualityComparer$getHashCode(this.Item5),o.System$Collections$IEqualityComparer$getHashCode(this.Item6))},toString:function(){return"("+((this.Item1!=null?Bridge.toString(this.Item1):null)||"")+", "+((this.Item2!=null?Bridge.toString(this.Item2):null)||"")+", "+((this.Item3!=null?Bridge.toString(this.Item3):null)||"")+", "+((this.Item4!=null?Bridge.toString(this.Item4):null)||"")+", "+((this.Item5!=null?Bridge.toString(this.Item5):null)||"")+", "+((this.Item6!=null?Bridge.toString(this.Item6):null)||"")+")"},System$ITupleInternal$ToStringEnd:function(){return((this.Item1!=null?Bridge.toString(this.Item1):null)||"")+", "+((this.Item2!=null?Bridge.toString(this.Item2):null)||"")+", "+((this.Item3!=null?Bridge.toString(this.Item3):null)||"")+", "+((this.Item4!=null?Bridge.toString(this.Item4):null)||"")+", "+((this.Item5!=null?Bridge.toString(this.Item5):null)||"")+", "+((this.Item6!=null?Bridge.toString(this.Item6):null)||"")+")"},$clone:function(o){var a=o||new(System.ValueTuple$6(e,t,i,r,n,s));return a.Item1=this.Item1,a.Item2=this.Item2,a.Item3=this.Item3,a.Item4=this.Item4,a.Item5=this.Item5,a.Item6=this.Item6,a}}}}),Bridge.define("System.ValueTuple$7",function(e,t,i,r,n,s,o){return{inherits:function(){return[System.IEquatable$1(System.ValueTuple$7(e,t,i,r,n,s,o)),System.Collections.IStructuralEquatable,System.Collections.IStructuralComparable,System.IComparable,System.IComparable$1(System.ValueTuple$7(e,t,i,r,n,s,o)),System.ITupleInternal]},$kind:"struct",statics:{fields:{s_t1Comparer:null,s_t2Comparer:null,s_t3Comparer:null,s_t4Comparer:null,s_t5Comparer:null,s_t6Comparer:null,s_t7Comparer:null},ctors:{init:function(){this.s_t1Comparer=System.Collections.Generic.EqualityComparer$1(e).def,this.s_t2Comparer=System.Collections.Generic.EqualityComparer$1(t).def,this.s_t3Comparer=System.Collections.Generic.EqualityComparer$1(i).def,this.s_t4Comparer=System.Collections.Generic.EqualityComparer$1(r).def,this.s_t5Comparer=System.Collections.Generic.EqualityComparer$1(n).def,this.s_t6Comparer=System.Collections.Generic.EqualityComparer$1(s).def,this.s_t7Comparer=System.Collections.Generic.EqualityComparer$1(o).def}},methods:{getDefaultValue:function(){return new(System.ValueTuple$7(e,t,i,r,n,s,o))}}},fields:{Item1:Bridge.getDefaultValue(e),Item2:Bridge.getDefaultValue(t),Item3:Bridge.getDefaultValue(i),Item4:Bridge.getDefaultValue(r),Item5:Bridge.getDefaultValue(n),Item6:Bridge.getDefaultValue(s),Item7:Bridge.getDefaultValue(o)},props:{System$ITupleInternal$Size:{get:function(){return 7}}},alias:["equalsT","System$IEquatable$1$System$ValueTuple$7$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$"+Bridge.getTypeAlias(i)+"$"+Bridge.getTypeAlias(r)+"$"+Bridge.getTypeAlias(n)+"$"+Bridge.getTypeAlias(s)+"$"+Bridge.getTypeAlias(o)+"$equalsT","compareTo",["System$IComparable$1$System$ValueTuple$7$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$"+Bridge.getTypeAlias(i)+"$"+Bridge.getTypeAlias(r)+"$"+Bridge.getTypeAlias(n)+"$"+Bridge.getTypeAlias(s)+"$"+Bridge.getTypeAlias(o)+"$compareTo","System$IComparable$1$compareTo"]],ctors:{$ctor1:function(a,l,u,d,f,C,E){this.$initialize(),this.Item1=a,this.Item2=l,this.Item3=u,this.Item4=d,this.Item5=f,this.Item6=C,this.Item7=E},ctor:function(){this.$initialize()}},methods:{equals:function(a){return Bridge.is(a,System.ValueTuple$7(e,t,i,r,n,s,o))&&this.equalsT(System.Nullable.getValue(Bridge.cast(Bridge.unbox(a,System.ValueTuple$7(e,t,i,r,n,s,o)),System.ValueTuple$7(e,t,i,r,n,s,o))))},equalsT:function(a){return System.ValueTuple$7(e,t,i,r,n,s,o).s_t1Comparer.equals2(this.Item1,a.Item1)&&System.ValueTuple$7(e,t,i,r,n,s,o).s_t2Comparer.equals2(this.Item2,a.Item2)&&System.ValueTuple$7(e,t,i,r,n,s,o).s_t3Comparer.equals2(this.Item3,a.Item3)&&System.ValueTuple$7(e,t,i,r,n,s,o).s_t4Comparer.equals2(this.Item4,a.Item4)&&System.ValueTuple$7(e,t,i,r,n,s,o).s_t5Comparer.equals2(this.Item5,a.Item5)&&System.ValueTuple$7(e,t,i,r,n,s,o).s_t6Comparer.equals2(this.Item6,a.Item6)&&System.ValueTuple$7(e,t,i,r,n,s,o).s_t7Comparer.equals2(this.Item7,a.Item7)},System$Collections$IStructuralEquatable$Equals:function(a,l){if(a==null||!Bridge.is(a,System.ValueTuple$7(e,t,i,r,n,s,o)))return!1;var u=System.Nullable.getValue(Bridge.cast(Bridge.unbox(a,System.ValueTuple$7(e,t,i,r,n,s,o)),System.ValueTuple$7(e,t,i,r,n,s,o)));return l.System$Collections$IEqualityComparer$equals(this.Item1,u.Item1)&&l.System$Collections$IEqualityComparer$equals(this.Item2,u.Item2)&&l.System$Collections$IEqualityComparer$equals(this.Item3,u.Item3)&&l.System$Collections$IEqualityComparer$equals(this.Item4,u.Item4)&&l.System$Collections$IEqualityComparer$equals(this.Item5,u.Item5)&&l.System$Collections$IEqualityComparer$equals(this.Item6,u.Item6)&&l.System$Collections$IEqualityComparer$equals(this.Item7,u.Item7)},System$IComparable$compareTo:function(a){if(a==null)return 1;if(!Bridge.is(a,System.ValueTuple$7(e,t,i,r,n,s,o)))throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType,"other");return this.compareTo(System.Nullable.getValue(Bridge.cast(Bridge.unbox(a,System.ValueTuple$7(e,t,i,r,n,s,o)),System.ValueTuple$7(e,t,i,r,n,s,o))))},compareTo:function(a){var l=new(System.Collections.Generic.Comparer$1(e))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item1,a.Item1);return l!==0?l:(l=new(System.Collections.Generic.Comparer$1(t))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item2,a.Item2),l!==0?l:(l=new(System.Collections.Generic.Comparer$1(i))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item3,a.Item3),l!==0?l:(l=new(System.Collections.Generic.Comparer$1(r))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item4,a.Item4),l!==0?l:(l=new(System.Collections.Generic.Comparer$1(n))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item5,a.Item5),l!==0?l:(l=new(System.Collections.Generic.Comparer$1(s))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item6,a.Item6),l!==0?l:new(System.Collections.Generic.Comparer$1(o))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item7,a.Item7))))))},System$Collections$IStructuralComparable$CompareTo:function(a,l){if(a==null)return 1;if(!Bridge.is(a,System.ValueTuple$7(e,t,i,r,n,s,o)))throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType,"other");var u=System.Nullable.getValue(Bridge.cast(Bridge.unbox(a,System.ValueTuple$7(e,t,i,r,n,s,o)),System.ValueTuple$7(e,t,i,r,n,s,o))),d=l.System$Collections$IComparer$compare(this.Item1,u.Item1);return d!==0?d:(d=l.System$Collections$IComparer$compare(this.Item2,u.Item2),d!==0?d:(d=l.System$Collections$IComparer$compare(this.Item3,u.Item3),d!==0?d:(d=l.System$Collections$IComparer$compare(this.Item4,u.Item4),d!==0?d:(d=l.System$Collections$IComparer$compare(this.Item5,u.Item5),d!==0?d:(d=l.System$Collections$IComparer$compare(this.Item6,u.Item6),d!==0?d:l.System$Collections$IComparer$compare(this.Item7,u.Item7))))))},getHashCode:function(){return System.ValueTuple.CombineHashCodes$5(System.ValueTuple$7(e,t,i,r,n,s,o).s_t1Comparer.getHashCode2(this.Item1),System.ValueTuple$7(e,t,i,r,n,s,o).s_t2Comparer.getHashCode2(this.Item2),System.ValueTuple$7(e,t,i,r,n,s,o).s_t3Comparer.getHashCode2(this.Item3),System.ValueTuple$7(e,t,i,r,n,s,o).s_t4Comparer.getHashCode2(this.Item4),System.ValueTuple$7(e,t,i,r,n,s,o).s_t5Comparer.getHashCode2(this.Item5),System.ValueTuple$7(e,t,i,r,n,s,o).s_t6Comparer.getHashCode2(this.Item6),System.ValueTuple$7(e,t,i,r,n,s,o).s_t7Comparer.getHashCode2(this.Item7))},System$Collections$IStructuralEquatable$GetHashCode:function(a){return this.GetHashCodeCore(a)},System$ITupleInternal$GetHashCode:function(a){return this.GetHashCodeCore(a)},GetHashCodeCore:function(a){return System.ValueTuple.CombineHashCodes$5(a.System$Collections$IEqualityComparer$getHashCode(this.Item1),a.System$Collections$IEqualityComparer$getHashCode(this.Item2),a.System$Collections$IEqualityComparer$getHashCode(this.Item3),a.System$Collections$IEqualityComparer$getHashCode(this.Item4),a.System$Collections$IEqualityComparer$getHashCode(this.Item5),a.System$Collections$IEqualityComparer$getHashCode(this.Item6),a.System$Collections$IEqualityComparer$getHashCode(this.Item7))},toString:function(){return"("+((this.Item1!=null?Bridge.toString(this.Item1):null)||"")+", "+((this.Item2!=null?Bridge.toString(this.Item2):null)||"")+", "+((this.Item3!=null?Bridge.toString(this.Item3):null)||"")+", "+((this.Item4!=null?Bridge.toString(this.Item4):null)||"")+", "+((this.Item5!=null?Bridge.toString(this.Item5):null)||"")+", "+((this.Item6!=null?Bridge.toString(this.Item6):null)||"")+", "+((this.Item7!=null?Bridge.toString(this.Item7):null)||"")+")"},System$ITupleInternal$ToStringEnd:function(){return((this.Item1!=null?Bridge.toString(this.Item1):null)||"")+", "+((this.Item2!=null?Bridge.toString(this.Item2):null)||"")+", "+((this.Item3!=null?Bridge.toString(this.Item3):null)||"")+", "+((this.Item4!=null?Bridge.toString(this.Item4):null)||"")+", "+((this.Item5!=null?Bridge.toString(this.Item5):null)||"")+", "+((this.Item6!=null?Bridge.toString(this.Item6):null)||"")+", "+((this.Item7!=null?Bridge.toString(this.Item7):null)||"")+")"},$clone:function(a){var l=a||new(System.ValueTuple$7(e,t,i,r,n,s,o));return l.Item1=this.Item1,l.Item2=this.Item2,l.Item3=this.Item3,l.Item4=this.Item4,l.Item5=this.Item5,l.Item6=this.Item6,l.Item7=this.Item7,l}}}}),Bridge.define("System.ValueTuple$8",function(e,t,i,r,n,s,o,a){return{inherits:function(){return[System.IEquatable$1(System.ValueTuple$8(e,t,i,r,n,s,o,a)),System.Collections.IStructuralEquatable,System.Collections.IStructuralComparable,System.IComparable,System.IComparable$1(System.ValueTuple$8(e,t,i,r,n,s,o,a)),System.ITupleInternal]},$kind:"struct",statics:{fields:{s_t1Comparer:null,s_t2Comparer:null,s_t3Comparer:null,s_t4Comparer:null,s_t5Comparer:null,s_t6Comparer:null,s_t7Comparer:null,s_tRestComparer:null},ctors:{init:function(){this.s_t1Comparer=System.Collections.Generic.EqualityComparer$1(e).def,this.s_t2Comparer=System.Collections.Generic.EqualityComparer$1(t).def,this.s_t3Comparer=System.Collections.Generic.EqualityComparer$1(i).def,this.s_t4Comparer=System.Collections.Generic.EqualityComparer$1(r).def,this.s_t5Comparer=System.Collections.Generic.EqualityComparer$1(n).def,this.s_t6Comparer=System.Collections.Generic.EqualityComparer$1(s).def,this.s_t7Comparer=System.Collections.Generic.EqualityComparer$1(o).def,this.s_tRestComparer=System.Collections.Generic.EqualityComparer$1(a).def}},methods:{getDefaultValue:function(){return new(System.ValueTuple$8(e,t,i,r,n,s,o,a))}}},fields:{Item1:Bridge.getDefaultValue(e),Item2:Bridge.getDefaultValue(t),Item3:Bridge.getDefaultValue(i),Item4:Bridge.getDefaultValue(r),Item5:Bridge.getDefaultValue(n),Item6:Bridge.getDefaultValue(s),Item7:Bridge.getDefaultValue(o),Rest:Bridge.getDefaultValue(a)},props:{System$ITupleInternal$Size:{get:function(){var l=Bridge.as(this.Rest,System.ITupleInternal);return l==null?8:7+l.System$ITupleInternal$Size|0}}},alias:["equalsT","System$IEquatable$1$System$ValueTuple$8$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$"+Bridge.getTypeAlias(i)+"$"+Bridge.getTypeAlias(r)+"$"+Bridge.getTypeAlias(n)+"$"+Bridge.getTypeAlias(s)+"$"+Bridge.getTypeAlias(o)+"$"+Bridge.getTypeAlias(a)+"$equalsT","compareTo",["System$IComparable$1$System$ValueTuple$8$"+Bridge.getTypeAlias(e)+"$"+Bridge.getTypeAlias(t)+"$"+Bridge.getTypeAlias(i)+"$"+Bridge.getTypeAlias(r)+"$"+Bridge.getTypeAlias(n)+"$"+Bridge.getTypeAlias(s)+"$"+Bridge.getTypeAlias(o)+"$"+Bridge.getTypeAlias(a)+"$compareTo","System$IComparable$1$compareTo"]],ctors:{$ctor1:function(l,u,d,f,C,E,T,w){if(this.$initialize(),!Bridge.is(w,System.ITupleInternal))throw new System.ArgumentException.$ctor1(System.SR.ArgumentException_ValueTupleLastArgumentNotAValueTuple);this.Item1=l,this.Item2=u,this.Item3=d,this.Item4=f,this.Item5=C,this.Item6=E,this.Item7=T,this.Rest=w},ctor:function(){this.$initialize()}},methods:{equals:function(l){return Bridge.is(l,System.ValueTuple$8(e,t,i,r,n,s,o,a))&&this.equalsT(System.Nullable.getValue(Bridge.cast(Bridge.unbox(l,System.ValueTuple$8(e,t,i,r,n,s,o,a)),System.ValueTuple$8(e,t,i,r,n,s,o,a))))},equalsT:function(l){return System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t1Comparer.equals2(this.Item1,l.Item1)&&System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t2Comparer.equals2(this.Item2,l.Item2)&&System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t3Comparer.equals2(this.Item3,l.Item3)&&System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t4Comparer.equals2(this.Item4,l.Item4)&&System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t5Comparer.equals2(this.Item5,l.Item5)&&System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t6Comparer.equals2(this.Item6,l.Item6)&&System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t7Comparer.equals2(this.Item7,l.Item7)&&System.ValueTuple$8(e,t,i,r,n,s,o,a).s_tRestComparer.equals2(this.Rest,l.Rest)},System$Collections$IStructuralEquatable$Equals:function(l,u){if(l==null||!Bridge.is(l,System.ValueTuple$8(e,t,i,r,n,s,o,a)))return!1;var d=System.Nullable.getValue(Bridge.cast(Bridge.unbox(l,System.ValueTuple$8(e,t,i,r,n,s,o,a)),System.ValueTuple$8(e,t,i,r,n,s,o,a)));return u.System$Collections$IEqualityComparer$equals(this.Item1,d.Item1)&&u.System$Collections$IEqualityComparer$equals(this.Item2,d.Item2)&&u.System$Collections$IEqualityComparer$equals(this.Item3,d.Item3)&&u.System$Collections$IEqualityComparer$equals(this.Item4,d.Item4)&&u.System$Collections$IEqualityComparer$equals(this.Item5,d.Item5)&&u.System$Collections$IEqualityComparer$equals(this.Item6,d.Item6)&&u.System$Collections$IEqualityComparer$equals(this.Item7,d.Item7)&&u.System$Collections$IEqualityComparer$equals(this.Rest,d.Rest)},System$IComparable$compareTo:function(l){if(l==null)return 1;if(!Bridge.is(l,System.ValueTuple$8(e,t,i,r,n,s,o,a)))throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType,"other");return this.compareTo(System.Nullable.getValue(Bridge.cast(Bridge.unbox(l,System.ValueTuple$8(e,t,i,r,n,s,o,a)),System.ValueTuple$8(e,t,i,r,n,s,o,a))))},compareTo:function(l){var u=new(System.Collections.Generic.Comparer$1(e))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item1,l.Item1);return u!==0?u:(u=new(System.Collections.Generic.Comparer$1(t))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item2,l.Item2),u!==0?u:(u=new(System.Collections.Generic.Comparer$1(i))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item3,l.Item3),u!==0?u:(u=new(System.Collections.Generic.Comparer$1(r))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item4,l.Item4),u!==0?u:(u=new(System.Collections.Generic.Comparer$1(n))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item5,l.Item5),u!==0?u:(u=new(System.Collections.Generic.Comparer$1(s))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item6,l.Item6),u!==0?u:(u=new(System.Collections.Generic.Comparer$1(o))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item7,l.Item7),u!==0?u:new(System.Collections.Generic.Comparer$1(a))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Rest,l.Rest)))))))},System$Collections$IStructuralComparable$CompareTo:function(l,u){if(l==null)return 1;if(!Bridge.is(l,System.ValueTuple$8(e,t,i,r,n,s,o,a)))throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType,"other");var d=System.Nullable.getValue(Bridge.cast(Bridge.unbox(l,System.ValueTuple$8(e,t,i,r,n,s,o,a)),System.ValueTuple$8(e,t,i,r,n,s,o,a))),f=u.System$Collections$IComparer$compare(this.Item1,d.Item1);return f!==0?f:(f=u.System$Collections$IComparer$compare(this.Item2,d.Item2),f!==0?f:(f=u.System$Collections$IComparer$compare(this.Item3,d.Item3),f!==0?f:(f=u.System$Collections$IComparer$compare(this.Item4,d.Item4),f!==0?f:(f=u.System$Collections$IComparer$compare(this.Item5,d.Item5),f!==0?f:(f=u.System$Collections$IComparer$compare(this.Item6,d.Item6),f!==0?f:(f=u.System$Collections$IComparer$compare(this.Item7,d.Item7),f!==0?f:u.System$Collections$IComparer$compare(this.Rest,d.Rest)))))))},getHashCode:function(){var l=Bridge.as(this.Rest,System.ITupleInternal),u,d;if(l==null)return System.ValueTuple.CombineHashCodes$5(System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t1Comparer.getHashCode2(this.Item1),System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t2Comparer.getHashCode2(this.Item2),System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t3Comparer.getHashCode2(this.Item3),System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t4Comparer.getHashCode2(this.Item4),System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t5Comparer.getHashCode2(this.Item5),System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t6Comparer.getHashCode2(this.Item6),System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t7Comparer.getHashCode2(this.Item7));if(u=l.System$ITupleInternal$Size,u>=8)return Bridge.getHashCode(l);switch(d=8-u|0,d){case 1:return System.ValueTuple.CombineHashCodes(System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t7Comparer.getHashCode2(this.Item7),Bridge.getHashCode(l));case 2:return System.ValueTuple.CombineHashCodes$1(System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t6Comparer.getHashCode2(this.Item6),System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t7Comparer.getHashCode2(this.Item7),Bridge.getHashCode(l));case 3:return System.ValueTuple.CombineHashCodes$2(System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t5Comparer.getHashCode2(this.Item5),System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t6Comparer.getHashCode2(this.Item6),System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t7Comparer.getHashCode2(this.Item7),Bridge.getHashCode(l));case 4:return System.ValueTuple.CombineHashCodes$3(System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t4Comparer.getHashCode2(this.Item4),System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t5Comparer.getHashCode2(this.Item5),System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t6Comparer.getHashCode2(this.Item6),System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t7Comparer.getHashCode2(this.Item7),Bridge.getHashCode(l));case 5:return System.ValueTuple.CombineHashCodes$4(System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t3Comparer.getHashCode2(this.Item3),System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t4Comparer.getHashCode2(this.Item4),System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t5Comparer.getHashCode2(this.Item5),System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t6Comparer.getHashCode2(this.Item6),System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t7Comparer.getHashCode2(this.Item7),Bridge.getHashCode(l));case 6:return System.ValueTuple.CombineHashCodes$5(System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t2Comparer.getHashCode2(this.Item2),System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t3Comparer.getHashCode2(this.Item3),System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t4Comparer.getHashCode2(this.Item4),System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t5Comparer.getHashCode2(this.Item5),System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t6Comparer.getHashCode2(this.Item6),System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t7Comparer.getHashCode2(this.Item7),Bridge.getHashCode(l));case 7:case 8:return System.ValueTuple.CombineHashCodes$6(System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t1Comparer.getHashCode2(this.Item1),System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t2Comparer.getHashCode2(this.Item2),System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t3Comparer.getHashCode2(this.Item3),System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t4Comparer.getHashCode2(this.Item4),System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t5Comparer.getHashCode2(this.Item5),System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t6Comparer.getHashCode2(this.Item6),System.ValueTuple$8(e,t,i,r,n,s,o,a).s_t7Comparer.getHashCode2(this.Item7),Bridge.getHashCode(l))}return-1},System$Collections$IStructuralEquatable$GetHashCode:function(l){return this.GetHashCodeCore(l)},System$ITupleInternal$GetHashCode:function(l){return this.GetHashCodeCore(l)},GetHashCodeCore:function(l){var u=Bridge.as(this.Rest,System.ITupleInternal),d,f;if(u==null)return System.ValueTuple.CombineHashCodes$5(l.System$Collections$IEqualityComparer$getHashCode(this.Item1),l.System$Collections$IEqualityComparer$getHashCode(this.Item2),l.System$Collections$IEqualityComparer$getHashCode(this.Item3),l.System$Collections$IEqualityComparer$getHashCode(this.Item4),l.System$Collections$IEqualityComparer$getHashCode(this.Item5),l.System$Collections$IEqualityComparer$getHashCode(this.Item6),l.System$Collections$IEqualityComparer$getHashCode(this.Item7));if(d=u.System$ITupleInternal$Size,d>=8)return u.System$ITupleInternal$GetHashCode(l);switch(f=8-d|0,f){case 1:return System.ValueTuple.CombineHashCodes(l.System$Collections$IEqualityComparer$getHashCode(this.Item7),u.System$ITupleInternal$GetHashCode(l));case 2:return System.ValueTuple.CombineHashCodes$1(l.System$Collections$IEqualityComparer$getHashCode(this.Item6),l.System$Collections$IEqualityComparer$getHashCode(this.Item7),u.System$ITupleInternal$GetHashCode(l));case 3:return System.ValueTuple.CombineHashCodes$2(l.System$Collections$IEqualityComparer$getHashCode(this.Item5),l.System$Collections$IEqualityComparer$getHashCode(this.Item6),l.System$Collections$IEqualityComparer$getHashCode(this.Item7),u.System$ITupleInternal$GetHashCode(l));case 4:return System.ValueTuple.CombineHashCodes$3(l.System$Collections$IEqualityComparer$getHashCode(this.Item4),l.System$Collections$IEqualityComparer$getHashCode(this.Item5),l.System$Collections$IEqualityComparer$getHashCode(this.Item6),l.System$Collections$IEqualityComparer$getHashCode(this.Item7),u.System$ITupleInternal$GetHashCode(l));case 5:return System.ValueTuple.CombineHashCodes$4(l.System$Collections$IEqualityComparer$getHashCode(this.Item3),l.System$Collections$IEqualityComparer$getHashCode(this.Item4),l.System$Collections$IEqualityComparer$getHashCode(this.Item5),l.System$Collections$IEqualityComparer$getHashCode(this.Item6),l.System$Collections$IEqualityComparer$getHashCode(this.Item7),u.System$ITupleInternal$GetHashCode(l));case 6:return System.ValueTuple.CombineHashCodes$5(l.System$Collections$IEqualityComparer$getHashCode(this.Item2),l.System$Collections$IEqualityComparer$getHashCode(this.Item3),l.System$Collections$IEqualityComparer$getHashCode(this.Item4),l.System$Collections$IEqualityComparer$getHashCode(this.Item5),l.System$Collections$IEqualityComparer$getHashCode(this.Item6),l.System$Collections$IEqualityComparer$getHashCode(this.Item7),u.System$ITupleInternal$GetHashCode(l));case 7:case 8:return System.ValueTuple.CombineHashCodes$6(l.System$Collections$IEqualityComparer$getHashCode(this.Item1),l.System$Collections$IEqualityComparer$getHashCode(this.Item2),l.System$Collections$IEqualityComparer$getHashCode(this.Item3),l.System$Collections$IEqualityComparer$getHashCode(this.Item4),l.System$Collections$IEqualityComparer$getHashCode(this.Item5),l.System$Collections$IEqualityComparer$getHashCode(this.Item6),l.System$Collections$IEqualityComparer$getHashCode(this.Item7),u.System$ITupleInternal$GetHashCode(l))}return-1},toString:function(){var l=Bridge.as(this.Rest,System.ITupleInternal);return l==null?"("+((this.Item1!=null?Bridge.toString(this.Item1):null)||"")+", "+((this.Item2!=null?Bridge.toString(this.Item2):null)||"")+", "+((this.Item3!=null?Bridge.toString(this.Item3):null)||"")+", "+((this.Item4!=null?Bridge.toString(this.Item4):null)||"")+", "+((this.Item5!=null?Bridge.toString(this.Item5):null)||"")+", "+((this.Item6!=null?Bridge.toString(this.Item6):null)||"")+", "+((this.Item7!=null?Bridge.toString(this.Item7):null)||"")+", "+(Bridge.toString(this.Rest)||"")+")":"("+((this.Item1!=null?Bridge.toString(this.Item1):null)||"")+", "+((this.Item2!=null?Bridge.toString(this.Item2):null)||"")+", "+((this.Item3!=null?Bridge.toString(this.Item3):null)||"")+", "+((this.Item4!=null?Bridge.toString(this.Item4):null)||"")+", "+((this.Item5!=null?Bridge.toString(this.Item5):null)||"")+", "+((this.Item6!=null?Bridge.toString(this.Item6):null)||"")+", "+((this.Item7!=null?Bridge.toString(this.Item7):null)||"")+", "+(l.System$ITupleInternal$ToStringEnd()||"")},System$ITupleInternal$ToStringEnd:function(){var l=Bridge.as(this.Rest,System.ITupleInternal);return l==null?((this.Item1!=null?Bridge.toString(this.Item1):null)||"")+", "+((this.Item2!=null?Bridge.toString(this.Item2):null)||"")+", "+((this.Item3!=null?Bridge.toString(this.Item3):null)||"")+", "+((this.Item4!=null?Bridge.toString(this.Item4):null)||"")+", "+((this.Item5!=null?Bridge.toString(this.Item5):null)||"")+", "+((this.Item6!=null?Bridge.toString(this.Item6):null)||"")+", "+((this.Item7!=null?Bridge.toString(this.Item7):null)||"")+", "+(Bridge.toString(this.Rest)||"")+")":((this.Item1!=null?Bridge.toString(this.Item1):null)||"")+", "+((this.Item2!=null?Bridge.toString(this.Item2):null)||"")+", "+((this.Item3!=null?Bridge.toString(this.Item3):null)||"")+", "+((this.Item4!=null?Bridge.toString(this.Item4):null)||"")+", "+((this.Item5!=null?Bridge.toString(this.Item5):null)||"")+", "+((this.Item6!=null?Bridge.toString(this.Item6):null)||"")+", "+((this.Item7!=null?Bridge.toString(this.Item7):null)||"")+", "+(l.System$ITupleInternal$ToStringEnd()||"")},$clone:function(l){var u=l||new(System.ValueTuple$8(e,t,i,r,n,s,o,a));return u.Item1=this.Item1,u.Item2=this.Item2,u.Item3=this.Item3,u.Item4=this.Item4,u.Item5=this.Item5,u.Item6=this.Item6,u.Item7=this.Item7,u.Rest=this.Rest,u}}}}),Bridge.define("System.IndexOutOfRangeException",{inherits:[System.SystemException],ctors:{ctor:function(){this.$initialize(),System.SystemException.$ctor1.call(this,"Index was outside the bounds of the array."),this.HResult=-2146233080},$ctor1:function(e){this.$initialize(),System.SystemException.$ctor1.call(this,e),this.HResult=-2146233080},$ctor2:function(e,t){this.$initialize(),System.SystemException.$ctor2.call(this,e,t),this.HResult=-2146233080}}}),Bridge.define("System.InvalidCastException",{inherits:[System.SystemException],ctors:{ctor:function(){this.$initialize(),System.SystemException.$ctor1.call(this,"Specified cast is not valid."),this.HResult=-2147467262},$ctor1:function(e){this.$initialize(),System.SystemException.$ctor1.call(this,e),this.HResult=-2147467262},$ctor2:function(e,t){this.$initialize(),System.SystemException.$ctor2.call(this,e,t),this.HResult=-2147467262},$ctor3:function(e,t){this.$initialize(),System.SystemException.$ctor1.call(this,e),this.HResult=t}}}),Bridge.define("System.InvalidOperationException",{inherits:[System.SystemException],ctors:{ctor:function(){this.$initialize(),System.SystemException.$ctor1.call(this,"Operation is not valid due to the current state of the object."),this.HResult=-2146233079},$ctor1:function(e){this.$initialize(),System.SystemException.$ctor1.call(this,e),this.HResult=-2146233079},$ctor2:function(e,t){this.$initialize(),System.SystemException.$ctor2.call(this,e,t),this.HResult=-2146233079}}}),Bridge.define("System.ObjectDisposedException",{inherits:[System.InvalidOperationException],fields:{_objectName:null},props:{Message:{get:function(){var e=this.ObjectName,t;return e==null||e.length===0?Bridge.ensureBaseProperty(this,"Message").$System$Exception$Message:(t=System.SR.Format("Object name: '{0}'.",e),(Bridge.ensureBaseProperty(this,"Message").$System$Exception$Message||"")+` `+(t||""))}},ObjectName:{get:function(){return this._objectName==null?"":this._objectName}}},ctors:{ctor:function(){System.ObjectDisposedException.$ctor3.call(this,null,"Cannot access a disposed object.")},$ctor1:function(e){System.ObjectDisposedException.$ctor3.call(this,e,"Cannot access a disposed object.")},$ctor3:function(e,t){this.$initialize(),System.InvalidOperationException.$ctor1.call(this,t),this.HResult=-2146232798,this._objectName=e},$ctor2:function(e,t){this.$initialize(),System.InvalidOperationException.$ctor2.call(this,e,t),this.HResult=-2146232798}}}),Bridge.define("System.InvalidProgramException",{inherits:[System.SystemException],ctors:{ctor:function(){this.$initialize(),System.SystemException.$ctor1.call(this,"Common Language Runtime detected an invalid program."),this.HResult=-2146233030},$ctor1:function(e){this.$initialize(),System.SystemException.$ctor1.call(this,e),this.HResult=-2146233030},$ctor2:function(e,t){this.$initialize(),System.SystemException.$ctor2.call(this,e,t),this.HResult=-2146233030}}}),Bridge.define("System.MissingMethodException",{inherits:[System.Exception],ctors:{ctor:function(){this.$initialize(),System.Exception.ctor.call(this,"Attempted to access a missing method.")},$ctor1:function(e){this.$initialize(),System.Exception.ctor.call(this,e)},$ctor2:function(e,t){this.$initialize(),System.Exception.ctor.call(this,e,t)},$ctor3:function(e,t){this.$initialize(),System.Exception.ctor.call(this,(e||"")+"."+(t||"")+" Due to: Attempted to access a missing member.")}}}),Bridge.define("System.Globalization.Calendar",{inherits:[System.ICloneable],statics:{fields:{TicksPerMillisecond:System.Int64(0),TicksPerSecond:System.Int64(0),TicksPerMinute:System.Int64(0),TicksPerHour:System.Int64(0),TicksPerDay:System.Int64(0),MillisPerSecond:0,MillisPerMinute:0,MillisPerHour:0,MillisPerDay:0,DaysPerYear:0,DaysPer4Years:0,DaysPer100Years:0,DaysPer400Years:0,DaysTo10000:0,MaxMillis:System.Int64(0),CurrentEra:0},ctors:{init:function(){this.TicksPerMillisecond=System.Int64(1e4),this.TicksPerSecond=System.Int64(1e7),this.TicksPerMinute=System.Int64(6e8),this.TicksPerHour=System.Int64([1640261632,8]),this.TicksPerDay=System.Int64([711573504,201]),this.MillisPerSecond=1e3,this.MillisPerMinute=6e4,this.MillisPerHour=36e5,this.MillisPerDay=864e5,this.DaysPerYear=365,this.DaysPer4Years=1461,this.DaysPer100Years=36524,this.DaysPer400Years=146097,this.DaysTo10000=3652059,this.MaxMillis=System.Int64([-464735232,73466]),this.CurrentEra=0}},methods:{ReadOnly:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("calendar");if(e.IsReadOnly)return e;var t=Bridge.cast(Bridge.clone(e),System.Globalization.Calendar);return t.SetReadOnlyState(!0),t},CheckAddResult:function(e,t,i){if(e.lt(System.DateTime.getTicks(t))||e.gt(System.DateTime.getTicks(i)))throw new System.ArgumentException.$ctor1(System.String.formatProvider(System.Globalization.CultureInfo.invariantCulture,System.SR.Format$1("The result is out of the supported range for this calendar. The result should be between {0} (Gregorian date) and {1} (Gregorian date), inclusive.",Bridge.box(t,System.DateTime,System.DateTime.format),Bridge.box(i,System.DateTime,System.DateTime.format)),null))},GetSystemTwoDigitYearSetting:function(e,t){var i=2029;return i<0&&(i=t),i}}},fields:{_isReadOnly:!1,twoDigitYearMax:0},props:{MinSupportedDateTime:{get:function(){return System.DateTime.getMinValue()}},MaxSupportedDateTime:{get:function(){return System.DateTime.getMaxValue()}},AlgorithmType:{get:function(){return 0}},ID:{get:function(){return 0}},BaseCalendarID:{get:function(){return this.ID}},IsReadOnly:{get:function(){return this._isReadOnly}},CurrentEraValue:{get:function(){throw System.NotImplemented.ByDesign}},DaysInYearBeforeMinSupportedYear:{get:function(){return 365}},TwoDigitYearMax:{get:function(){return this.twoDigitYearMax},set:function(e){this.VerifyWritable(),this.twoDigitYearMax=e}}},alias:["clone","System$ICloneable$clone"],ctors:{init:function(){this._isReadOnly=!1,this.twoDigitYearMax=-1},ctor:function(){this.$initialize()}},methods:{clone:function(){var e=Bridge.clone(this);return Bridge.cast(e,System.Globalization.Calendar).SetReadOnlyState(!1),e},VerifyWritable:function(){if(this._isReadOnly)throw new System.InvalidOperationException.$ctor1("Instance is read-only.")},SetReadOnlyState:function(e){this._isReadOnly=e},Add:function(e,t,i){var r=t*i+(t>=0?.5:-.5),n,s;if(!(r>-3155378976e5&&r<3155378976e5))throw new System.ArgumentOutOfRangeException.$ctor4("value","Value to add was out of range.");return n=Bridge.Int.clip64(r),s=System.DateTime.getTicks(e).add(n.mul(System.Globalization.Calendar.TicksPerMillisecond)),System.Globalization.Calendar.CheckAddResult(s,this.MinSupportedDateTime,this.MaxSupportedDateTime),System.DateTime.create$2(s)},AddMilliseconds:function(e,t){return this.Add(e,t,1)},AddDays:function(e,t){return this.Add(e,t,System.Globalization.Calendar.MillisPerDay)},AddHours:function(e,t){return this.Add(e,t,System.Globalization.Calendar.MillisPerHour)},AddMinutes:function(e,t){return this.Add(e,t,System.Globalization.Calendar.MillisPerMinute)},AddSeconds:function(e,t){return this.Add(e,t,System.Globalization.Calendar.MillisPerSecond)},AddWeeks:function(e,t){return this.AddDays(e,Bridge.Int.mul(t,7))},GetDaysInMonth:function(e,t){return this.GetDaysInMonth$1(e,t,System.Globalization.Calendar.CurrentEra)},GetDaysInYear:function(e){return this.GetDaysInYear$1(e,System.Globalization.Calendar.CurrentEra)},GetHour:function(e){return System.Int64.clip32(System.DateTime.getTicks(e).div(System.Globalization.Calendar.TicksPerHour).mod(System.Int64(24)))},GetMilliseconds:function(e){return System.Int64.toNumber(System.DateTime.getTicks(e).div(System.Globalization.Calendar.TicksPerMillisecond).mod(System.Int64(1e3)))},GetMinute:function(e){return System.Int64.clip32(System.DateTime.getTicks(e).div(System.Globalization.Calendar.TicksPerMinute).mod(System.Int64(60)))},GetMonthsInYear:function(e){return this.GetMonthsInYear$1(e,System.Globalization.Calendar.CurrentEra)},GetSecond:function(e){return System.Int64.clip32(System.DateTime.getTicks(e).div(System.Globalization.Calendar.TicksPerSecond).mod(System.Int64(60)))},GetFirstDayWeekOfYear:function(e,t){var i=this.GetDayOfYear(e)-1|0,r=this.GetDayOfWeek(e)-i%7|0,n=((r-t|0)+14|0)%7;return(Bridge.Int.div(i+n|0,7)|0)+1|0},GetWeekOfYearFullDays:function(e,t,i){var r,n,s,o=this.GetDayOfYear(e)-1|0;return r=this.GetDayOfWeek(e)-o%7|0,n=((t-r|0)+14|0)%7,n!==0&&n>=i&&(n=n-7|0),s=o-n|0,s>=0?(Bridge.Int.div(s,7)|0)+1|0:System.DateTime.lte(e,System.DateTime.addDays(this.MinSupportedDateTime,o))?this.GetWeekOfYearOfMinSupportedDateTime(t,i):this.GetWeekOfYearFullDays(System.DateTime.addDays(e,-(o+1|0)|0),t,i)},GetWeekOfYearOfMinSupportedDateTime:function(e,t){var i=this.GetDayOfYear(this.MinSupportedDateTime)-1|0,r=this.GetDayOfWeek(this.MinSupportedDateTime)-i%7|0,n=((e+7|0)-r|0)%7;if(n===0||n>=t)return 1;var s=this.DaysInYearBeforeMinSupportedYear-1|0,o=(r-1|0)-s%7|0,a=((e-o|0)+14|0)%7,l=s-a|0;return a>=t&&(l=l+7|0),(Bridge.Int.div(l,7)|0)+1|0},GetWeekOfYear:function(e,t,i){if(i<0||i>6)throw new System.ArgumentOutOfRangeException.$ctor4("firstDayOfWeek",System.SR.Format$1("Valid values are between {0} and {1}, inclusive.",Bridge.box(System.DayOfWeek.Sunday,System.DayOfWeek,System.Enum.toStringFn(System.DayOfWeek)),Bridge.box(System.DayOfWeek.Saturday,System.DayOfWeek,System.Enum.toStringFn(System.DayOfWeek))));switch(t){case 0:return this.GetFirstDayWeekOfYear(e,i);case 1:return this.GetWeekOfYearFullDays(e,i,7);case 2:return this.GetWeekOfYearFullDays(e,i,4)}throw new System.ArgumentOutOfRangeException.$ctor4("rule",System.SR.Format$1("Valid values are between {0} and {1}, inclusive.",Bridge.box(0,System.Globalization.CalendarWeekRule,System.Enum.toStringFn(System.Globalization.CalendarWeekRule)),Bridge.box(2,System.Globalization.CalendarWeekRule,System.Enum.toStringFn(System.Globalization.CalendarWeekRule))))},IsLeapDay:function(e,t,i){return this.IsLeapDay$1(e,t,i,System.Globalization.Calendar.CurrentEra)},IsLeapMonth:function(e,t){return this.IsLeapMonth$1(e,t,System.Globalization.Calendar.CurrentEra)},GetLeapMonth:function(e){return this.GetLeapMonth$1(e,System.Globalization.Calendar.CurrentEra)},GetLeapMonth$1:function(e,t){var i,r;if(!this.IsLeapYear$1(e,t))return 0;for(i=this.GetMonthsInYear$1(e,t),r=1;r<=i;r=r+1|0)if(this.IsLeapMonth$1(e,r,t))return r;return 0},IsLeapYear:function(e){return this.IsLeapYear$1(e,System.Globalization.Calendar.CurrentEra)},ToDateTime:function(e,t,i,r,n,s,o){return this.ToDateTime$1(e,t,i,r,n,s,o,System.Globalization.Calendar.CurrentEra)},TryToDateTime:function(e,t,i,r,n,s,o,a,l){l.v=System.DateTime.getMinValue();try{return l.v=this.ToDateTime$1(e,t,i,r,n,s,o,a),!0}catch(u){if(u=System.Exception.create(u),Bridge.is(u,System.ArgumentException))return!1;throw u}},IsValidYear:function(e,t){return e>=this.GetYear(this.MinSupportedDateTime)&&e<=this.GetYear(this.MaxSupportedDateTime)},IsValidMonth:function(e,t,i){return this.IsValidYear(e,i)&&t>=1&&t<=this.GetMonthsInYear$1(e,i)},IsValidDay:function(e,t,i,r){return this.IsValidMonth(e,t,r)&&i>=1&&i<=this.GetDaysInMonth$1(e,t,r)},ToFourDigitYear:function(e){if(e<0)throw new System.ArgumentOutOfRangeException.$ctor4("year","Non-negative number required.");return e<100?Bridge.Int.mul((Bridge.Int.div(this.TwoDigitYearMax,100)|0)-(e>this.TwoDigitYearMax%100?1:0)|0,100)+e|0:e}}}),Bridge.define("System.Globalization.CalendarAlgorithmType",{$kind:"enum",statics:{fields:{Unknown:0,SolarCalendar:1,LunarCalendar:2,LunisolarCalendar:3}}}),Bridge.define("System.Globalization.CalendarId",{$kind:"enum",statics:{fields:{UNINITIALIZED_VALUE:0,GREGORIAN:1,GREGORIAN_US:2,JAPAN:3,TAIWAN:4,KOREA:5,HIJRI:6,THAI:7,HEBREW:8,GREGORIAN_ME_FRENCH:9,GREGORIAN_ARABIC:10,GREGORIAN_XLIT_ENGLISH:11,GREGORIAN_XLIT_FRENCH:12,JULIAN:13,JAPANESELUNISOLAR:14,CHINESELUNISOLAR:15,SAKA:16,LUNAR_ETO_CHN:17,LUNAR_ETO_KOR:18,LUNAR_ETO_ROKUYOU:19,KOREANLUNISOLAR:20,TAIWANLUNISOLAR:21,PERSIAN:22,UMALQURA:23,LAST_CALENDAR:23}},$utype:System.UInt16}),Bridge.define("System.Globalization.CalendarWeekRule",{$kind:"enum",statics:{fields:{FirstDay:0,FirstFullWeek:1,FirstFourDayWeek:2}}}),Bridge.define("System.Globalization.CultureNotFoundException",{inherits:[System.ArgumentException],statics:{props:{DefaultMessage:{get:function(){return"Culture is not supported."}}}},fields:{_invalidCultureName:null,_invalidCultureId:null},props:{InvalidCultureId:{get:function(){return this._invalidCultureId}},InvalidCultureName:{get:function(){return this._invalidCultureName}},FormatedInvalidCultureId:{get:function(){return this.InvalidCultureId!=null?System.String.formatProvider(System.Globalization.CultureInfo.invariantCulture,"{0} (0x{0:x4})",[Bridge.box(System.Nullable.getValue(this.InvalidCultureId),System.Int32)]):this.InvalidCultureName}},Message:{get:function(){var e=Bridge.ensureBaseProperty(this,"Message").$System$ArgumentException$Message,t;return this._invalidCultureId!=null||this._invalidCultureName!=null?(t=System.SR.Format("{0} is an invalid culture identifier.",this.FormatedInvalidCultureId),e==null?t:(e||"")+` `+(t||"")):e}}},ctors:{ctor:function(){this.$initialize(),System.ArgumentException.$ctor1.call(this,System.Globalization.CultureNotFoundException.DefaultMessage)},$ctor1:function(e){this.$initialize(),System.ArgumentException.$ctor1.call(this,e)},$ctor5:function(e,t){this.$initialize(),System.ArgumentException.$ctor3.call(this,t,e)},$ctor2:function(e,t){this.$initialize(),System.ArgumentException.$ctor2.call(this,e,t)},$ctor7:function(e,t,i){this.$initialize(),System.ArgumentException.$ctor3.call(this,i,e),this._invalidCultureName=t},$ctor6:function(e,t,i){this.$initialize(),System.ArgumentException.$ctor2.call(this,e,i),this._invalidCultureName=t},$ctor3:function(e,t,i){this.$initialize(),System.ArgumentException.$ctor2.call(this,e,i),this._invalidCultureId=t},$ctor4:function(e,t,i){this.$initialize(),System.ArgumentException.$ctor3.call(this,i,e),this._invalidCultureId=t}}}),Bridge.define("System.Globalization.DateTimeFormatInfoScanner",{statics:{fields:{MonthPostfixChar:0,IgnorableSymbolChar:0,CJKYearSuff:null,CJKMonthSuff:null,CJKDaySuff:null,KoreanYearSuff:null,KoreanMonthSuff:null,KoreanDaySuff:null,KoreanHourSuff:null,KoreanMinuteSuff:null,KoreanSecondSuff:null,CJKHourSuff:null,ChineseHourSuff:null,CJKMinuteSuff:null,CJKSecondSuff:null,s_knownWords:null},props:{KnownWords:{get:function(){if(System.Globalization.DateTimeFormatInfoScanner.s_knownWords==null){var e=new(System.Collections.Generic.Dictionary$2(System.String,System.String)).ctor;e.add("/",""),e.add("-",""),e.add(".",""),e.add(System.Globalization.DateTimeFormatInfoScanner.CJKYearSuff,""),e.add(System.Globalization.DateTimeFormatInfoScanner.CJKMonthSuff,""),e.add(System.Globalization.DateTimeFormatInfoScanner.CJKDaySuff,""),e.add(System.Globalization.DateTimeFormatInfoScanner.KoreanYearSuff,""),e.add(System.Globalization.DateTimeFormatInfoScanner.KoreanMonthSuff,""),e.add(System.Globalization.DateTimeFormatInfoScanner.KoreanDaySuff,""),e.add(System.Globalization.DateTimeFormatInfoScanner.KoreanHourSuff,""),e.add(System.Globalization.DateTimeFormatInfoScanner.KoreanMinuteSuff,""),e.add(System.Globalization.DateTimeFormatInfoScanner.KoreanSecondSuff,""),e.add(System.Globalization.DateTimeFormatInfoScanner.CJKHourSuff,""),e.add(System.Globalization.DateTimeFormatInfoScanner.ChineseHourSuff,""),e.add(System.Globalization.DateTimeFormatInfoScanner.CJKMinuteSuff,""),e.add(System.Globalization.DateTimeFormatInfoScanner.CJKSecondSuff,""),System.Globalization.DateTimeFormatInfoScanner.s_knownWords=e}return System.Globalization.DateTimeFormatInfoScanner.s_knownWords}}},ctors:{init:function(){this.MonthPostfixChar=57344,this.IgnorableSymbolChar=57345,this.CJKYearSuff="\u5E74",this.CJKMonthSuff="\u6708",this.CJKDaySuff="\u65E5",this.KoreanYearSuff="\uB144",this.KoreanMonthSuff="\uC6D4",this.KoreanDaySuff="\uC77C",this.KoreanHourSuff="\uC2DC",this.KoreanMinuteSuff="\uBD84",this.KoreanSecondSuff="\uCD08",this.CJKHourSuff="\u6642",this.ChineseHourSuff="\u65F6",this.CJKMinuteSuff="\u5206",this.CJKSecondSuff="\u79D2"}},methods:{SkipWhiteSpacesAndNonLetter:function(e,t){for(;t<e.length;){var i=e.charCodeAt(t);if(i===92)if(t=t+1|0,t<e.length){if(i=e.charCodeAt(t),i===39)continue}else break;if(System.Char.isLetter(i)||i===39||i===46)break;t=t+1|0}return t},ScanRepeatChar:function(e,t,i,r){for(r.v=1;(i=i+1|0)<e.length&&e.charCodeAt(i)===t;)r.v=r.v+1|0;return i},GetFormatFlagGenitiveMonth:function(e,t,i,r){return!System.Globalization.DateTimeFormatInfoScanner.EqualStringArrays(e,t)||!System.Globalization.DateTimeFormatInfoScanner.EqualStringArrays(i,r)?1:0},GetFormatFlagUseSpaceInMonthNames:function(e,t,i,r){var n=0;return n|=System.Globalization.DateTimeFormatInfoScanner.ArrayElementsBeginWithDigit(e)||System.Globalization.DateTimeFormatInfoScanner.ArrayElementsBeginWithDigit(t)||System.Globalization.DateTimeFormatInfoScanner.ArrayElementsBeginWithDigit(i)||System.Globalization.DateTimeFormatInfoScanner.ArrayElementsBeginWithDigit(r)?32:0,n|(System.Globalization.DateTimeFormatInfoScanner.ArrayElementsHaveSpace(e)||System.Globalization.DateTimeFormatInfoScanner.ArrayElementsHaveSpace(t)||System.Globalization.DateTimeFormatInfoScanner.ArrayElementsHaveSpace(i)||System.Globalization.DateTimeFormatInfoScanner.ArrayElementsHaveSpace(r)?4:0)},GetFormatFlagUseSpaceInDayNames:function(e,t){return System.Globalization.DateTimeFormatInfoScanner.ArrayElementsHaveSpace(e)||System.Globalization.DateTimeFormatInfoScanner.ArrayElementsHaveSpace(t)?16:0},GetFormatFlagUseHebrewCalendar:function(e){return e===8?10:0},EqualStringArrays:function(e,t){if(Bridge.referenceEquals(e,t))return!0;if(e.length!==t.length)return!1;for(var i=0;i<e.length;i=i+1|0)if(!System.String.equals(e[System.Array.index(i,e)],t[System.Array.index(i,t)]))return!1;return!0},ArrayElementsHaveSpace:function(e){for(var t,i=0;i<e.length;i=i+1|0)for(t=0;t<e[System.Array.index(i,e)].length;t=t+1|0)if(System.Char.isWhiteSpace(String.fromCharCode(e[System.Array.index(i,e)].charCodeAt(t))))return!0;return!1},ArrayElementsBeginWithDigit:function(e){for(var t,i=0;i<e.length;i=i+1|0)if(e[System.Array.index(i,e)].length>0&&e[System.Array.index(i,e)].charCodeAt(0)>=48&&e[System.Array.index(i,e)].charCodeAt(0)<=57){for(t=1;t<e[System.Array.index(i,e)].length&&e[System.Array.index(i,e)].charCodeAt(t)>=48&&e[System.Array.index(i,e)].charCodeAt(t)<=57;)t=t+1|0;if(t===e[System.Array.index(i,e)].length)return!1;if(t===(e[System.Array.index(i,e)].length-1|0))switch(e[System.Array.index(i,e)].charCodeAt(t)){case 26376:case 50900:return!1}return!(t===(e[System.Array.index(i,e)].length-4|0)&&e[System.Array.index(i,e)].charCodeAt(t)===39&&e[System.Array.index(i,e)].charCodeAt(t+1|0)===32&&e[System.Array.index(i,e)].charCodeAt(t+2|0)===26376&&e[System.Array.index(i,e)].charCodeAt(t+3|0)===39)}return!1}}},fields:{m_dateWords:null,_ymdFlags:0},ctors:{init:function(){this.m_dateWords=new(System.Collections.Generic.List$1(System.String)).ctor,this._ymdFlags=System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern.None}},methods:{AddDateWordOrPostfix:function(e,t){var i,r,n;if(t.length>0){if(System.String.equals(t,".")){this.AddIgnorableSymbols(".");return}i={},System.Globalization.DateTimeFormatInfoScanner.KnownWords.tryGetValue(t,i)===!1&&(this.m_dateWords==null&&(this.m_dateWords=new(System.Collections.Generic.List$1(System.String)).ctor),Bridge.referenceEquals(e,"MMMM")?(r=String.fromCharCode(System.Globalization.DateTimeFormatInfoScanner.MonthPostfixChar)+(t||""),this.m_dateWords.contains(r)||this.m_dateWords.add(r)):(this.m_dateWords.contains(t)||this.m_dateWords.add(t),t.charCodeAt(t.length-1|0)===46&&(n=t.substr(0,t.length-1|0),this.m_dateWords.contains(n)||this.m_dateWords.add(n))))}},AddDateWords:function(e,t,i){var r=System.Globalization.DateTimeFormatInfoScanner.SkipWhiteSpacesAndNonLetter(e,t),n,s;for(r!==t&&i!=null&&(i=null),t=r,n=new System.Text.StringBuilder;t<e.length;)if(s=e.charCodeAt(t),s===39){this.AddDateWordOrPostfix(i,n.toString()),t=t+1|0;break}else s===92?(t=t+1|0,t<e.length&&(n.append(String.fromCharCode(e.charCodeAt(t))),t=t+1|0)):System.Char.isWhiteSpace(String.fromCharCode(s))?(this.AddDateWordOrPostfix(i,n.toString()),i!=null&&(i=null),n.setLength(0),t=t+1|0):(n.append(String.fromCharCode(s)),t=t+1|0);return t},AddIgnorableSymbols:function(e){this.m_dateWords==null&&(this.m_dateWords=new(System.Collections.Generic.List$1(System.String)).ctor);var t=String.fromCharCode(System.Globalization.DateTimeFormatInfoScanner.IgnorableSymbolChar)+(e||"");this.m_dateWords.contains(t)||this.m_dateWords.add(t)},ScanDateWord:function(e){var t,i,r;for(this._ymdFlags=System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern.None,t=0;t<e.length;)switch(i=e.charCodeAt(t),r={},i){case 39:t=this.AddDateWords(e,t+1|0,null);break;case 77:t=System.Globalization.DateTimeFormatInfoScanner.ScanRepeatChar(e,77,t,r),r.v>=4&&t<e.length&&e.charCodeAt(t)===39&&(t=this.AddDateWords(e,t+1|0,"MMMM")),this._ymdFlags|=System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern.FoundMonthPatternFlag;break;case 121:t=System.Globalization.DateTimeFormatInfoScanner.ScanRepeatChar(e,121,t,r),this._ymdFlags|=System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern.FoundYearPatternFlag;break;case 100:t=System.Globalization.DateTimeFormatInfoScanner.ScanRepeatChar(e,100,t,r),r.v<=2&&(this._ymdFlags|=System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern.FoundDayPatternFlag);break;case 92:t=t+2|0;break;case 46:this._ymdFlags===System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern.FoundYMDPatternFlag&&(this.AddIgnorableSymbols("."),this._ymdFlags=System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern.None),t=t+1|0;break;default:this._ymdFlags!==System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern.FoundYMDPatternFlag||System.Char.isWhiteSpace(String.fromCharCode(i))||(this._ymdFlags=System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern.None),t=t+1|0;break}},GetDateWordsOfDTFI:function(e){for(var t=e.getAllDateTimePatterns(68),i,r=0;r<t.length;r=r+1|0)this.ScanDateWord(t[System.Array.index(r,t)]);for(t=e.getAllDateTimePatterns(100),r=0;r<t.length;r=r+1|0)this.ScanDateWord(t[System.Array.index(r,t)]);for(t=e.getAllDateTimePatterns(121),r=0;r<t.length;r=r+1|0)this.ScanDateWord(t[System.Array.index(r,t)]);for(this.ScanDateWord(e.monthDayPattern),t=e.getAllDateTimePatterns(84),r=0;r<t.length;r=r+1|0)this.ScanDateWord(t[System.Array.index(r,t)]);for(t=e.getAllDateTimePatterns(116),r=0;r<t.length;r=r+1|0)this.ScanDateWord(t[System.Array.index(r,t)]);if(i=null,this.m_dateWords!=null&&this.m_dateWords.Count>0)for(i=System.Array.init(this.m_dateWords.Count,null,System.String),r=0;r<this.m_dateWords.Count;r=r+1|0)i[System.Array.index(r,i)]=this.m_dateWords.getItem(r);return i}}}),Bridge.define("System.Globalization.DateTimeStyles",{$kind:"enum",statics:{fields:{None:0,AllowLeadingWhite:1,AllowTrailingWhite:2,AllowInnerWhite:4,AllowWhiteSpaces:7,NoCurrentDateDefault:8,AdjustToUniversal:16,AssumeLocal:32,AssumeUniversal:64,RoundtripKind:128}},$flags:!0}),Bridge.define("System.Globalization.FORMATFLAGS",{$kind:"enum",statics:{fields:{None:0,UseGenitiveMonth:1,UseLeapYearMonth:2,UseSpacesInMonthNames:4,UseHebrewParsing:8,UseSpacesInDayNames:16,UseDigitPrefixInTokens:32}}}),Bridge.define("System.Globalization.GlobalizationMode",{statics:{props:{Invariant:!1},ctors:{init:function(){this.Invariant=System.Globalization.GlobalizationMode.GetGlobalizationInvariantMode()}},methods:{GetInvariantSwitchValue:function(){return!0},GetGlobalizationInvariantMode:function(){return System.Globalization.GlobalizationMode.GetInvariantSwitchValue()}}}}),Bridge.define("System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern",{$kind:"nested enum",statics:{fields:{None:0,FoundYearPatternFlag:1,FoundMonthPatternFlag:2,FoundDayPatternFlag:4,FoundYMDPatternFlag:7}}}),Bridge.define("System.NotImplemented",{statics:{props:{ByDesign:{get:function(){return new System.NotImplementedException.ctor}}},methods:{ByDesignWithMessage:function(e){return new System.NotImplementedException.$ctor1(e)}}}}),Bridge.define("System.NotImplementedException",{inherits:[System.SystemException],ctors:{ctor:function(){this.$initialize(),System.SystemException.$ctor1.call(this,"The method or operation is not implemented."),this.HResult=-2147467263},$ctor1:function(e){this.$initialize(),System.SystemException.$ctor1.call(this,e),this.HResult=-2147467263},$ctor2:function(e,t){this.$initialize(),System.SystemException.$ctor2.call(this,e,t),this.HResult=-2147467263}}}),Bridge.define("System.NotSupportedException",{inherits:[System.SystemException],ctors:{ctor:function(){this.$initialize(),System.SystemException.$ctor1.call(this,"Specified method is not supported."),this.HResult=-2146233067},$ctor1:function(e){this.$initialize(),System.SystemException.$ctor1.call(this,e),this.HResult=-2146233067},$ctor2:function(e,t){this.$initialize(),System.SystemException.$ctor2.call(this,e,t),this.HResult=-2146233067}}}),Bridge.define("System.NullReferenceException",{inherits:[System.SystemException],ctors:{ctor:function(){this.$initialize(),System.SystemException.$ctor1.call(this,"Object reference not set to an instance of an object."),this.HResult=-2147467261},$ctor1:function(e){this.$initialize(),System.SystemException.$ctor1.call(this,e),this.HResult=-2147467261},$ctor2:function(e,t){this.$initialize(),System.SystemException.$ctor2.call(this,e,t),this.HResult=-2147467261}}}),Bridge.define("System.OperationCanceledException",{inherits:[System.SystemException],fields:{_cancellationToken:null},props:{CancellationToken:{get:function(){return this._cancellationToken},set:function(e){this._cancellationToken=e}}},ctors:{init:function(){this._cancellationToken=new System.Threading.CancellationToken},ctor:function(){this.$initialize(),System.SystemException.$ctor1.call(this,"The operation was canceled."),this.HResult=-2146233029},$ctor1:function(e){this.$initialize(),System.SystemException.$ctor1.call(this,e),this.HResult=-2146233029},$ctor2:function(e,t){this.$initialize(),System.SystemException.$ctor2.call(this,e,t),this.HResult=-2146233029},$ctor5:function(e){System.OperationCanceledException.ctor.call(this),this.CancellationToken=e},$ctor4:function(e,t){System.OperationCanceledException.$ctor1.call(this,e),this.CancellationToken=t},$ctor3:function(e,t,i){System.OperationCanceledException.$ctor2.call(this,e,t),this.CancellationToken=i}}}),Bridge.define("System.OverflowException",{inherits:[System.ArithmeticException],ctors:{ctor:function(){this.$initialize(),System.ArithmeticException.$ctor1.call(this,"Arithmetic operation resulted in an overflow."),this.HResult=-2146233066},$ctor1:function(e){this.$initialize(),System.ArithmeticException.$ctor1.call(this,e),this.HResult=-2146233066},$ctor2:function(e,t){this.$initialize(),System.ArithmeticException.$ctor2.call(this,e,t),this.HResult=-2146233066}}}),Bridge.define("System.ParseFailureKind",{$kind:"enum",statics:{fields:{None:0,ArgumentNull:1,Format:2,FormatWithParameter:3,FormatBadDateTimeCalendar:4}}}),Bridge.define("System.ParseFlags",{$kind:"enum",statics:{fields:{HaveYear:1,HaveMonth:2,HaveDay:4,HaveHour:8,HaveMinute:16,HaveSecond:32,HaveTime:64,HaveDate:128,TimeZoneUsed:256,TimeZoneUtc:512,ParsedMonthName:1024,CaptureOffset:2048,YearDefault:4096,Rfc1123Pattern:8192,UtcSortPattern:16384}},$flags:!0}),Bridge.define("System.Text.StringBuilderCache",{statics:{fields:{MAX_BUILDER_SIZE:0,DEFAULT_CAPACITY:0,t_cachedInstance:null},ctors:{init:function(){this.MAX_BUILDER_SIZE=260,this.DEFAULT_CAPACITY=16}},methods:{Acquire:function(e){if(e===void 0&&(e=16),e<=System.Text.StringBuilderCache.MAX_BUILDER_SIZE){var t=System.Text.StringBuilderCache.t_cachedInstance;if(t!=null&&e<=t.getCapacity())return System.Text.StringBuilderCache.t_cachedInstance=null,t.clear(),t}return new System.Text.StringBuilder("",e)},Release:function(e){e.getCapacity()<=System.Text.StringBuilderCache.MAX_BUILDER_SIZE&&(System.Text.StringBuilderCache.t_cachedInstance=e)},GetStringAndRelease:function(e){var t=e.toString();return System.Text.StringBuilderCache.Release(e),t}}}}),Bridge.define("System.IO.BinaryReader",{inherits:[System.IDisposable],statics:{fields:{MaxCharBytesSize:0},ctors:{init:function(){this.MaxCharBytesSize=128}}},fields:{m_stream:null,m_buffer:null,m_encoding:null,m_charBytes:null,m_singleChar:null,m_charBuffer:null,m_maxCharsSize:0,m_2BytesPerChar:!1,m_isMemoryStream:!1,m_leaveOpen:!1,lastCharsRead:0},props:{BaseStream:{get:function(){return this.m_stream}}},alias:["Dispose","System$IDisposable$Dispose"],ctors:{init:function(){this.lastCharsRead=0},ctor:function(e){System.IO.BinaryReader.$ctor2.call(this,e,new System.Text.UTF8Encoding.ctor,!1)},$ctor1:function(e,t){System.IO.BinaryReader.$ctor2.call(this,e,t,!1)},$ctor2:function(e,t,i){if(this.$initialize(),e==null)throw new System.ArgumentNullException.$ctor1("input");if(t==null)throw new System.ArgumentNullException.$ctor1("encoding");if(!e.CanRead)throw new System.ArgumentException.$ctor1("Argument_StreamNotReadable");this.m_stream=e,this.m_encoding=t,this.m_maxCharsSize=t.GetMaxCharCount(System.IO.BinaryReader.MaxCharBytesSize);var r=t.GetMaxByteCount(1);r<23&&(r=23),this.m_buffer=System.Array.init(r,0,System.Byte),this.m_2BytesPerChar=Bridge.is(t,System.Text.UnicodeEncoding),this.m_isMemoryStream=Bridge.referenceEquals(Bridge.getType(this.m_stream),System.IO.MemoryStream),this.m_leaveOpen=i}},methods:{Close:function(){this.Dispose$1(!0)},Dispose$1:function(e){if(e){var t=this.m_stream;this.m_stream=null,t==null||this.m_leaveOpen||t.Close()}this.m_stream=null,this.m_buffer=null,this.m_encoding=null,this.m_charBytes=null,this.m_singleChar=null,this.m_charBuffer=null},Dispose:function(){this.Dispose$1(!0)},PeekChar:function(){if(this.m_stream==null&&System.IO.__Error.FileNotOpen(),!this.m_stream.CanSeek)return-1;var e=this.m_stream.Position,t=this.Read();return this.m_stream.Position=e,t},Read:function(){return this.m_stream==null&&System.IO.__Error.FileNotOpen(),this.InternalReadOneChar()},Read$2:function(e,t,i){if(e==null)throw new System.ArgumentNullException.$ctor3("buffer","ArgumentNull_Buffer");if(t<0)throw new System.ArgumentOutOfRangeException.$ctor4("index","ArgumentOutOfRange_NeedNonNegNum");if(i<0)throw new System.ArgumentOutOfRangeException.$ctor4("count","ArgumentOutOfRange_NeedNonNegNum");if((e.length-t|0)<i)throw new System.ArgumentException.$ctor1("Argument_InvalidOffLen");return this.m_stream==null&&System.IO.__Error.FileNotOpen(),this.InternalReadChars(e,t,i)},Read$1:function(e,t,i){if(e==null)throw new System.ArgumentNullException.$ctor3("buffer","ArgumentNull_Buffer");if(t<0)throw new System.ArgumentOutOfRangeException.$ctor4("index","ArgumentOutOfRange_NeedNonNegNum");if(i<0)throw new System.ArgumentOutOfRangeException.$ctor4("count","ArgumentOutOfRange_NeedNonNegNum");if((e.length-t|0)<i)throw new System.ArgumentException.$ctor1("Argument_InvalidOffLen");return this.m_stream==null&&System.IO.__Error.FileNotOpen(),this.m_stream.Read(e,t,i)},ReadBoolean:function(){return this.FillBuffer(1),this.m_buffer[System.Array.index(0,this.m_buffer)]!==0},ReadByte:function(){this.m_stream==null&&System.IO.__Error.FileNotOpen();var e=this.m_stream.ReadByte();return e===-1&&System.IO.__Error.EndOfFile(),e&255},ReadSByte:function(){return this.FillBuffer(1),Bridge.Int.sxb(this.m_buffer[System.Array.index(0,this.m_buffer)]&255)},ReadChar:function(){var e=this.Read();return e===-1&&System.IO.__Error.EndOfFile(),e&65535},ReadInt16:function(){return this.FillBuffer(2),Bridge.Int.sxs((this.m_buffer[System.Array.index(0,this.m_buffer)]|this.m_buffer[System.Array.index(1,this.m_buffer)]<<8)&65535)},ReadUInt16:function(){return this.FillBuffer(2),(this.m_buffer[System.Array.index(0,this.m_buffer)]|this.m_buffer[System.Array.index(1,this.m_buffer)]<<8)&65535},ReadInt32:function(){if(this.m_isMemoryStream){this.m_stream==null&&System.IO.__Error.FileNotOpen();var e=Bridge.as(this.m_stream,System.IO.MemoryStream);return e.InternalReadInt32()}else return this.FillBuffer(4),this.m_buffer[System.Array.index(0,this.m_buffer)]|this.m_buffer[System.Array.index(1,this.m_buffer)]<<8|this.m_buffer[System.Array.index(2,this.m_buffer)]<<16|this.m_buffer[System.Array.index(3,this.m_buffer)]<<24},ReadUInt32:function(){return this.FillBuffer(4),(this.m_buffer[System.Array.index(0,this.m_buffer)]|this.m_buffer[System.Array.index(1,this.m_buffer)]<<8|this.m_buffer[System.Array.index(2,this.m_buffer)]<<16|this.m_buffer[System.Array.index(3,this.m_buffer)]<<24)>>>0},ReadInt64:function(){this.FillBuffer(8);var e=(this.m_buffer[System.Array.index(0,this.m_buffer)]|this.m_buffer[System.Array.index(1,this.m_buffer)]<<8|this.m_buffer[System.Array.index(2,this.m_buffer)]<<16|this.m_buffer[System.Array.index(3,this.m_buffer)]<<24)>>>0,t=(this.m_buffer[System.Array.index(4,this.m_buffer)]|this.m_buffer[System.Array.index(5,this.m_buffer)]<<8|this.m_buffer[System.Array.index(6,this.m_buffer)]<<16|this.m_buffer[System.Array.index(7,this.m_buffer)]<<24)>>>0;return System.Int64.clip64(System.UInt64(t)).shl(32).or(System.Int64(e))},ReadUInt64:function(){this.FillBuffer(8);var e=(this.m_buffer[System.Array.index(0,this.m_buffer)]|this.m_buffer[System.Array.index(1,this.m_buffer)]<<8|this.m_buffer[System.Array.index(2,this.m_buffer)]<<16|this.m_buffer[System.Array.index(3,this.m_buffer)]<<24)>>>0,t=(this.m_buffer[System.Array.index(4,this.m_buffer)]|this.m_buffer[System.Array.index(5,this.m_buffer)]<<8|this.m_buffer[System.Array.index(6,this.m_buffer)]<<16|this.m_buffer[System.Array.index(7,this.m_buffer)]<<24)>>>0;return System.UInt64(t).shl(32).or(System.UInt64(e))},ReadSingle:function(){this.FillBuffer(4);var e=(this.m_buffer[System.Array.index(0,this.m_buffer)]|this.m_buffer[System.Array.index(1,this.m_buffer)]<<8|this.m_buffer[System.Array.index(2,this.m_buffer)]<<16|this.m_buffer[System.Array.index(3,this.m_buffer)]<<24)>>>0;return System.BitConverter.toSingle(System.BitConverter.getBytes$8(e),0)},ReadDouble:function(){this.FillBuffer(8);var e=(this.m_buffer[System.Array.index(0,this.m_buffer)]|this.m_buffer[System.Array.index(1,this.m_buffer)]<<8|this.m_buffer[System.Array.index(2,this.m_buffer)]<<16|this.m_buffer[System.Array.index(3,this.m_buffer)]<<24)>>>0,t=(this.m_buffer[System.Array.index(4,this.m_buffer)]|this.m_buffer[System.Array.index(5,this.m_buffer)]<<8|this.m_buffer[System.Array.index(6,this.m_buffer)]<<16|this.m_buffer[System.Array.index(7,this.m_buffer)]<<24)>>>0,i=System.UInt64(t).shl(32).or(System.UInt64(e));return System.BitConverter.toDouble(System.BitConverter.getBytes$9(i),0)},ReadDecimal:function(){this.FillBuffer(23);try{return System.Decimal.fromBytes(this.m_buffer)}catch(t){t=System.Exception.create(t);var e;throw Bridge.is(t,System.ArgumentException)?(e=t,new System.IO.IOException.$ctor2("Arg_DecBitCtor",e)):t}},ReadString:function(){var e,t,i,r,n,s,o;if(this.m_stream==null&&System.IO.__Error.FileNotOpen(),e=0,i=this.Read7BitEncodedInt(),i<0)throw new System.IO.IOException.$ctor1("IO.IO_InvalidStringLen_Len");if(i===0)return"";this.m_charBytes==null&&(this.m_charBytes=System.Array.init(System.IO.BinaryReader.MaxCharBytesSize,0,System.Byte)),this.m_charBuffer==null&&(this.m_charBuffer=System.Array.init(this.m_maxCharsSize,0,System.Char)),s=null;do{if(r=(i-e|0)>System.IO.BinaryReader.MaxCharBytesSize?System.IO.BinaryReader.MaxCharBytesSize:i-e|0,t=this.m_stream.Read(this.m_charBytes,0,r),t===0&&System.IO.__Error.EndOfFile(),n=this.m_encoding.GetChars$2(this.m_charBytes,0,t,this.m_charBuffer,0),e===0&&t===i)return System.String.fromCharArray(this.m_charBuffer,0,n);for(s==null&&(s=new System.Text.StringBuilder("",i)),o=0;o<n;o=o+1|0)s.append(String.fromCharCode(this.m_charBuffer[System.Array.index(o,this.m_charBuffer)]));e=e+t|0}while(e<i);return s.toString()},InternalReadChars:function(e,t,i){var r=i,n;if(this.m_charBytes==null&&(this.m_charBytes=System.Array.init(System.IO.BinaryReader.MaxCharBytesSize,0,System.Byte)),t<0||r<0||(t+r|0)>e.length)throw new System.ArgumentOutOfRangeException.$ctor1("charsRemaining");for(;r>0&&(n=this.InternalReadOneChar(!0),n!==-1);)e[System.Array.index(t,e)]=n&65535,this.lastCharsRead===2&&(e[System.Array.index(t=t+1|0,e)]=this.m_singleChar[System.Array.index(1,this.m_singleChar)],r=r-1|0),r=r-1|0,t=t+1|0;return i-r|0},InternalReadOneChar:function(e){var t,i,r,n;e===void 0&&(e=!1);var s=0,o=0,a=System.Int64(0);for(this.m_stream.CanSeek&&(a=this.m_stream.Position),this.m_charBytes==null&&(this.m_charBytes=System.Array.init(System.IO.BinaryReader.MaxCharBytesSize,0,System.Byte)),this.m_singleChar==null&&(this.m_singleChar=System.Array.init(2,0,System.Char)),t=!1,i=0;s===0;){if(o=this.m_2BytesPerChar?2:1,Bridge.is(this.m_encoding,System.Text.UTF32Encoding)&&(o=4),t)r=this.m_stream.ReadByte(),this.m_charBytes[System.Array.index(i=i+1|0,this.m_charBytes)]=r&255,r===-1&&(o=0),o===2&&(r=this.m_stream.ReadByte(),this.m_charBytes[System.Array.index(i=i+1|0,this.m_charBytes)]=r&255,r===-1&&(o=1));else if(n=this.m_stream.ReadByte(),this.m_charBytes[System.Array.index(0,this.m_charBytes)]=n&255,i=0,n===-1&&(o=0),o===2)n=this.m_stream.ReadByte(),this.m_charBytes[System.Array.index(1,this.m_charBytes)]=n&255,n===-1&&(o=1),i=1;else if(o===4){if(n=this.m_stream.ReadByte(),this.m_charBytes[System.Array.index(1,this.m_charBytes)]=n&255,n===-1||(n=this.m_stream.ReadByte(),this.m_charBytes[System.Array.index(2,this.m_charBytes)]=n&255,n===-1)||(n=this.m_stream.ReadByte(),this.m_charBytes[System.Array.index(3,this.m_charBytes)]=n&255,n===-1))return-1;i=3}if(o===0)return-1;t=!1;try{if(s=this.m_encoding.GetChars$2(this.m_charBytes,0,i+1|0,this.m_singleChar,0),!e&&s===2)throw new System.ArgumentException.ctor}catch(l){throw l=System.Exception.create(l),this.m_stream.CanSeek&&this.m_stream.Seek(a.sub(this.m_stream.Position),1),l}this.m_encoding._hasError&&(s=0,t=!0)}return this.lastCharsRead=s,s===0?-1:this.m_singleChar[System.Array.index(0,this.m_singleChar)]},ReadChars:function(e){var t,i,r;if(e<0)throw new System.ArgumentOutOfRangeException.$ctor4("count","ArgumentOutOfRange_NeedNonNegNum");return this.m_stream==null&&System.IO.__Error.FileNotOpen(),e===0?System.Array.init(0,0,System.Char):(t=System.Array.init(e,0,System.Char),i=this.InternalReadChars(t,0,e),i!==e&&(r=System.Array.init(i,0,System.Char),System.Array.copy(t,0,r,0,Bridge.Int.mul(2,i)),t=r),t)},ReadBytes:function(e){var t,i,r,n;if(e<0)throw new System.ArgumentOutOfRangeException.$ctor4("count","ArgumentOutOfRange_NeedNonNegNum");if(this.m_stream==null&&System.IO.__Error.FileNotOpen(),e===0)return System.Array.init(0,0,System.Byte);t=System.Array.init(e,0,System.Byte),i=0;do{if(r=this.m_stream.Read(t,i,e),r===0)break;i=i+r|0,e=e-r|0}while(e>0);return i!==t.length&&(n=System.Array.init(i,0,System.Byte),System.Array.copy(t,0,n,0,i),t=n),t},FillBuffer:function(e){if(this.m_buffer!=null&&(e<0||e>this.m_buffer.length))throw new System.ArgumentOutOfRangeException.$ctor4("numBytes","ArgumentOutOfRange_BinaryReaderFillBuffer");var t=0,i=0;if(this.m_stream==null&&System.IO.__Error.FileNotOpen(),e===1){i=this.m_stream.ReadByte(),i===-1&&System.IO.__Error.EndOfFile(),this.m_buffer[System.Array.index(0,this.m_buffer)]=i&255;return}do i=this.m_stream.Read(this.m_buffer,t,e-t|0),i===0&&System.IO.__Error.EndOfFile(),t=t+i|0;while(t<e)},Read7BitEncodedInt:function(){var e=0,t=0,i;do{if(t===35)throw new System.FormatException.$ctor1("Format_Bad7BitInt32");i=this.ReadByte(),e=e|(i&127)<<t,t=t+7|0}while(i&128);return e}}}),Bridge.define("System.IO.BinaryWriter",{inherits:[System.IDisposable],statics:{fields:{LargeByteBufferSize:0,Null:null},ctors:{init:function(){this.LargeByteBufferSize=256,this.Null=new System.IO.BinaryWriter.ctor}}},fields:{OutStream:null,_buffer:null,_encoding:null,_leaveOpen:!1,_tmpOneCharBuffer:null},props:{BaseStream:{get:function(){return this.Flush(),this.OutStream}}},alias:["Dispose","System$IDisposable$Dispose"],ctors:{ctor:function(){this.$initialize(),this.OutStream=System.IO.Stream.Null,this._buffer=System.Array.init(16,0,System.Byte),this._encoding=new System.Text.UTF8Encoding.$ctor2(!1,!0)},$ctor1:function(e){System.IO.BinaryWriter.$ctor3.call(this,e,new System.Text.UTF8Encoding.$ctor2(!1,!0),!1)},$ctor2:function(e,t){System.IO.BinaryWriter.$ctor3.call(this,e,t,!1)},$ctor3:function(e,t,i){if(this.$initialize(),e==null)throw new System.ArgumentNullException.$ctor1("output");if(t==null)throw new System.ArgumentNullException.$ctor1("encoding");if(!e.CanWrite)throw new System.ArgumentException.$ctor1("Argument_StreamNotWritable");this.OutStream=e,this._buffer=System.Array.init(16,0,System.Byte),this._encoding=t,this._leaveOpen=i}},methods:{Close:function(){this.Dispose$1(!0)},Dispose$1:function(e){e&&(this._leaveOpen?this.OutStream.Flush():this.OutStream.Close())},Dispose:function(){this.Dispose$1(!0)},Flush:function(){this.OutStream.Flush()},Seek:function(e,t){return this.OutStream.Seek(System.Int64(e),t)},Write:function(e){this._buffer[System.Array.index(0,this._buffer)]=(e?1:0)&255,this.OutStream.Write(this._buffer,0,1)},Write$1:function(e){this.OutStream.WriteByte(e)},Write$12:function(e){this.OutStream.WriteByte(e&255)},Write$2:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("buffer");this.OutStream.Write(e,0,e.length)},Write$3:function(e,t,i){this.OutStream.Write(e,t,i)},Write$4:function(e){if(System.Char.isSurrogate(e))throw new System.ArgumentException.$ctor1("Arg_SurrogatesNotAllowedAsSingleChar");var t=0;t=this._encoding.GetBytes$3(System.Array.init([e],System.Char),0,1,this._buffer,0),this.OutStream.Write(this._buffer,0,t)},Write$5:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("chars");var t=this._encoding.GetBytes$1(e,0,e.length);this.OutStream.Write(t,0,t.length)},Write$6:function(e,t,i){var r=this._encoding.GetBytes$1(e,t,i);this.OutStream.Write(r,0,r.length)},Write$8:function(e){var t=System.Int64.clipu64(System.BitConverter.doubleToInt64Bits(e));this._buffer[System.Array.index(0,this._buffer)]=System.Int64.clipu8(t),this._buffer[System.Array.index(1,this._buffer)]=System.Int64.clipu8(t.shru(8)),this._buffer[System.Array.index(2,this._buffer)]=System.Int64.clipu8(t.shru(16)),this._buffer[System.Array.index(3,this._buffer)]=System.Int64.clipu8(t.shru(24)),this._buffer[System.Array.index(4,this._buffer)]=System.Int64.clipu8(t.shru(32)),this._buffer[System.Array.index(5,this._buffer)]=System.Int64.clipu8(t.shru(40)),this._buffer[System.Array.index(6,this._buffer)]=System.Int64.clipu8(t.shru(48)),this._buffer[System.Array.index(7,this._buffer)]=System.Int64.clipu8(t.shru(56)),this.OutStream.Write(this._buffer,0,8)},Write$7:function(e){var t=e.getBytes();this.OutStream.Write(t,0,23)},Write$9:function(e){this._buffer[System.Array.index(0,this._buffer)]=e&255,this._buffer[System.Array.index(1,this._buffer)]=e>>8&255,this.OutStream.Write(this._buffer,0,2)},Write$15:function(e){this._buffer[System.Array.index(0,this._buffer)]=e&255,this._buffer[System.Array.index(1,this._buffer)]=e>>8&255,this.OutStream.Write(this._buffer,0,2)},Write$10:function(e){this._buffer[System.Array.index(0,this._buffer)]=e&255,this._buffer[System.Array.index(1,this._buffer)]=e>>8&255,this._buffer[System.Array.index(2,this._buffer)]=e>>16&255,this._buffer[System.Array.index(3,this._buffer)]=e>>24&255,this.OutStream.Write(this._buffer,0,4)},Write$16:function(e){this._buffer[System.Array.index(0,this._buffer)]=e&255,this._buffer[System.Array.index(1,this._buffer)]=e>>>8&255,this._buffer[System.Array.index(2,this._buffer)]=e>>>16&255,this._buffer[System.Array.index(3,this._buffer)]=e>>>24&255,this.OutStream.Write(this._buffer,0,4)},Write$11:function(e){this._buffer[System.Array.index(0,this._buffer)]=System.Int64.clipu8(e),this._buffer[System.Array.index(1,this._buffer)]=System.Int64.clipu8(e.shr(8)),this._buffer[System.Array.index(2,this._buffer)]=System.Int64.clipu8(e.shr(16)),this._buffer[System.Array.index(3,this._buffer)]=System.Int64.clipu8(e.shr(24)),this._buffer[System.Array.index(4,this._buffer)]=System.Int64.clipu8(e.shr(32)),this._buffer[System.Array.index(5,this._buffer)]=System.Int64.clipu8(e.shr(40)),this._buffer[System.Array.index(6,this._buffer)]=System.Int64.clipu8(e.shr(48)),this._buffer[System.Array.index(7,this._buffer)]=System.Int64.clipu8(e.shr(56)),this.OutStream.Write(this._buffer,0,8)},Write$17:function(e){this._buffer[System.Array.index(0,this._buffer)]=System.Int64.clipu8(e),this._buffer[System.Array.index(1,this._buffer)]=System.Int64.clipu8(e.shru(8)),this._buffer[System.Array.index(2,this._buffer)]=System.Int64.clipu8(e.shru(16)),this._buffer[System.Array.index(3,this._buffer)]=System.Int64.clipu8(e.shru(24)),this._buffer[System.Array.index(4,this._buffer)]=System.Int64.clipu8(e.shru(32)),this._buffer[System.Array.index(5,this._buffer)]=System.Int64.clipu8(e.shru(40)),this._buffer[System.Array.index(6,this._buffer)]=System.Int64.clipu8(e.shru(48)),this._buffer[System.Array.index(7,this._buffer)]=System.Int64.clipu8(e.shru(56)),this.OutStream.Write(this._buffer,0,8)},Write$13:function(e){var t=System.BitConverter.toUInt32(System.BitConverter.getBytes$6(e),0);this._buffer[System.Array.index(0,this._buffer)]=t&255,this._buffer[System.Array.index(1,this._buffer)]=t>>>8&255,this._buffer[System.Array.index(2,this._buffer)]=t>>>16&255,this._buffer[System.Array.index(3,this._buffer)]=t>>>24&255,this.OutStream.Write(this._buffer,0,4)},Write$14:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("value");var t=this._encoding.GetBytes$2(e),i=t.length;this.Write7BitEncodedInt(i),this.OutStream.Write(t,0,i)},Write7BitEncodedInt:function(e){for(var t=e>>>0;t>=128;)this.Write$1((t|128)>>>0&255),t=t>>>7;this.Write$1(t&255)}}}),Bridge.define("System.IO.Stream",{inherits:[System.IDisposable],statics:{fields:{_DefaultCopyBufferSize:0,Null:null},ctors:{init:function(){this._DefaultCopyBufferSize=81920,this.Null=new System.IO.Stream.NullStream}},methods:{Synchronized:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("stream");return e},BlockingEndRead:function(e){return System.IO.Stream.SynchronousAsyncResult.EndRead(e)},BlockingEndWrite:function(e){System.IO.Stream.SynchronousAsyncResult.EndWrite(e)}}},props:{CanTimeout:{get:function(){return!1}},ReadTimeout:{get:function(){throw new System.InvalidOperationException.ctor},set:function(e){throw new System.InvalidOperationException.ctor}},WriteTimeout:{get:function(){throw new System.InvalidOperationException.ctor},set:function(e){throw new System.InvalidOperationException.ctor}}},alias:["Dispose","System$IDisposable$Dispose"],methods:{CopyTo:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("destination");if(!this.CanRead&&!this.CanWrite)throw new System.Exception;if(!e.CanRead&&!e.CanWrite)throw new System.Exception("destination");if(!this.CanRead)throw new System.NotSupportedException.ctor;if(!e.CanWrite)throw new System.NotSupportedException.ctor;this.InternalCopyTo(e,System.IO.Stream._DefaultCopyBufferSize)},CopyTo$1:function(e,t){if(e==null)throw new System.ArgumentNullException.$ctor1("destination");if(t<=0)throw new System.ArgumentOutOfRangeException.$ctor1("bufferSize");if(!this.CanRead&&!this.CanWrite)throw new System.Exception;if(!e.CanRead&&!e.CanWrite)throw new System.Exception("destination");if(!this.CanRead)throw new System.NotSupportedException.ctor;if(!e.CanWrite)throw new System.NotSupportedException.ctor;this.InternalCopyTo(e,t)},InternalCopyTo:function(e,t){for(var i=System.Array.init(t,0,System.Byte),r;(r=this.Read(i,0,i.length))!==0;)e.Write(i,0,r)},Close:function(){this.Dispose$1(!0)},Dispose:function(){this.Close()},Dispose$1:function(e){},BeginRead:function(e,t,i,r,n){return this.BeginReadInternal(e,t,i,r,n,!1)},BeginReadInternal:function(e,t,i,r,n,s){return this.CanRead||System.IO.__Error.ReadNotSupported(),this.BlockingBeginRead(e,t,i,r,n)},EndRead:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("asyncResult");return System.IO.Stream.BlockingEndRead(e)},BeginWrite:function(e,t,i,r,n){return this.BeginWriteInternal(e,t,i,r,n,!1)},BeginWriteInternal:function(e,t,i,r,n,s){return this.CanWrite||System.IO.__Error.WriteNotSupported(),this.BlockingBeginWrite(e,t,i,r,n)},EndWrite:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("asyncResult");System.IO.Stream.BlockingEndWrite(e)},ReadByte:function(){var e=System.Array.init(1,0,System.Byte),t=this.Read(e,0,1);return t===0?-1:e[System.Array.index(0,e)]},WriteByte:function(e){var t=System.Array.init(1,0,System.Byte);t[System.Array.index(0,t)]=e,this.Write(t,0,1)},BlockingBeginRead:function(e,t,i,r,n){var s,o,a;try{o=this.Read(e,t,i),s=new System.IO.Stream.SynchronousAsyncResult.$ctor1(o,n)}catch(l){if(l=System.Exception.create(l),Bridge.is(l,System.IO.IOException))a=l,s=new System.IO.Stream.SynchronousAsyncResult.ctor(a,n,!1);else throw l}return Bridge.staticEquals(r,null)||r(s),s},BlockingBeginWrite:function(e,t,i,r,n){var s,o;try{this.Write(e,t,i),s=new System.IO.Stream.SynchronousAsyncResult.$ctor2(n)}catch(a){if(a=System.Exception.create(a),Bridge.is(a,System.IO.IOException))o=a,s=new System.IO.Stream.SynchronousAsyncResult.ctor(o,n,!0);else throw a}return Bridge.staticEquals(r,null)||r(s),s}}}),Bridge.define("System.IO.BufferedStream",{inherits:[System.IO.Stream],statics:{fields:{_DefaultBufferSize:0,MaxShadowBufferSize:0},ctors:{init:function(){this._DefaultBufferSize=4096,this.MaxShadowBufferSize=81920}}},fields:{_stream:null,_buffer:null,_bufferSize:0,_readPos:0,_readLen:0,_writePos:0},props:{UnderlyingStream:{get:function(){return this._stream}},BufferSize:{get:function(){return this._bufferSize}},CanRead:{get:function(){return this._stream!=null&&this._stream.CanRead}},CanWrite:{get:function(){return this._stream!=null&&this._stream.CanWrite}},CanSeek:{get:function(){return this._stream!=null&&this._stream.CanSeek}},Length:{get:function(){return this.EnsureNotClosed(),this._writePos>0&&this.FlushWrite(),this._stream.Length}},Position:{get:function(){return this.EnsureNotClosed(),this.EnsureCanSeek(),this._stream.Position.add(System.Int64((this._readPos-this._readLen|0)+this._writePos|0))},set:function(e){if(e.lt(System.Int64(0)))throw new System.ArgumentOutOfRangeException.$ctor1("value");this.EnsureNotClosed(),this.EnsureCanSeek(),this._writePos>0&&this.FlushWrite(),this._readPos=0,this._readLen=0,this._stream.Seek(e,0)}}},ctors:{ctor:function(){this.$initialize(),System.IO.Stream.ctor.call(this)},$ctor1:function(e){System.IO.BufferedStream.$ctor2.call(this,e,System.IO.BufferedStream._DefaultBufferSize)},$ctor2:function(e,t){if(this.$initialize(),System.IO.Stream.ctor.call(this),e==null)throw new System.ArgumentNullException.$ctor1("stream");if(t<=0)throw new System.ArgumentOutOfRangeException.$ctor1("bufferSize");this._stream=e,this._bufferSize=t,this._stream.CanRead||this._stream.CanWrite||System.IO.__Error.StreamIsClosed()}},methods:{EnsureNotClosed:function(){this._stream==null&&System.IO.__Error.StreamIsClosed()},EnsureCanSeek:function(){this._stream.CanSeek||System.IO.__Error.SeekNotSupported()},EnsureCanRead:function(){this._stream.CanRead||System.IO.__Error.ReadNotSupported()},EnsureCanWrite:function(){this._stream.CanWrite||System.IO.__Error.WriteNotSupported()},EnsureShadowBufferAllocated:function(){if(this._buffer.length===this._bufferSize&&!(this._bufferSize>=System.IO.BufferedStream.MaxShadowBufferSize)){var e=System.Array.init(Math.min(this._bufferSize+this._bufferSize|0,System.IO.BufferedStream.MaxShadowBufferSize),0,System.Byte);System.Array.copy(this._buffer,0,e,0,this._writePos),this._buffer=e}},EnsureBufferAllocated:function(){this._buffer==null&&(this._buffer=System.Array.init(this._bufferSize,0,System.Byte))},Dispose$1:function(e){try{if(e&&this._stream!=null)try{this.Flush()}finally{this._stream.Close()}}finally{this._stream=null,this._buffer=null,System.IO.Stream.prototype.Dispose$1.call(this,e)}},Flush:function(){if(this.EnsureNotClosed(),this._writePos>0){this.FlushWrite();return}if(this._readPos<this._readLen){if(!this._stream.CanSeek)return;this.FlushRead(),(this._stream.CanWrite||Bridge.is(this._stream,System.IO.BufferedStream))&&this._stream.Flush();return}(this._stream.CanWrite||Bridge.is(this._stream,System.IO.BufferedStream))&&this._stream.Flush(),this._writePos=this._readPos=this._readLen=0},FlushRead:function(){this._readPos-this._readLen|0&&this._stream.Seek(System.Int64(this._readPos-this._readLen),1),this._readPos=0,this._readLen=0},ClearReadBufferBeforeWrite:function(){if(this._readPos===this._readLen){this._readPos=this._readLen=0;return}if(!this._stream.CanSeek)throw new System.NotSupportedException.ctor;this.FlushRead()},FlushWrite:function(){this._stream.Write(this._buffer,0,this._writePos),this._writePos=0,this._stream.Flush()},ReadFromBuffer:function(e,t,i){var r=this._readLen-this._readPos|0;return r===0?0:(r>i&&(r=i),System.Array.copy(this._buffer,this._readPos,e,t,r),this._readPos=this._readPos+r|0,r)},ReadFromBuffer$1:function(e,t,i,r){try{return r.v=null,this.ReadFromBuffer(e,t,i)}catch(n){return n=System.Exception.create(n),r.v=n,0}},Read:function(e,t,i){var r,n;if(e==null)throw new System.ArgumentNullException.$ctor1("array");if(t<0)throw new System.ArgumentOutOfRangeException.$ctor1("offset");if(i<0)throw new System.ArgumentOutOfRangeException.$ctor1("count");if((e.length-t|0)<i)throw new System.ArgumentException.ctor;return this.EnsureNotClosed(),this.EnsureCanRead(),r=this.ReadFromBuffer(e,t,i),r===i?r:(n=r,r>0&&(i=i-r|0,t=t+r|0),this._readPos=this._readLen=0,this._writePos>0&&this.FlushWrite(),i>=this._bufferSize?this._stream.Read(e,t,i)+n|0:(this.EnsureBufferAllocated(),this._readLen=this._stream.Read(this._buffer,0,this._bufferSize),r=this.ReadFromBuffer(e,t,i),r+n|0))},ReadByte:function(){return this.EnsureNotClosed(),this.EnsureCanRead(),this._readPos===this._readLen&&(this._writePos>0&&this.FlushWrite(),this.EnsureBufferAllocated(),this._readLen=this._stream.Read(this._buffer,0,this._bufferSize),this._readPos=0),this._readPos===this._readLen?-1:this._buffer[System.Array.index(Bridge.identity(this._readPos,this._readPos=this._readPos+1|0),this._buffer)]},WriteToBuffer:function(e,t,i){var r=Math.min(this._bufferSize-this._writePos|0,i.v);r<=0||(this.EnsureBufferAllocated(),System.Array.copy(e,t.v,this._buffer,this._writePos,r),this._writePos=this._writePos+r|0,i.v=i.v-r|0,t.v=t.v+r|0)},WriteToBuffer$1:function(e,t,i,r){try{r.v=null,this.WriteToBuffer(e,t,i)}catch(n){n=System.Exception.create(n),r.v=n}},Write:function(e,t,i){if(t={v:t},i={v:i},e==null)throw new System.ArgumentNullException.$ctor1("array");if(t.v<0)throw new System.ArgumentOutOfRangeException.$ctor1("offset");if(i.v<0)throw new System.ArgumentOutOfRangeException.$ctor1("count");if((e.length-t.v|0)<i.v)throw new System.ArgumentException.ctor;this.EnsureNotClosed(),this.EnsureCanWrite(),this._writePos===0&&this.ClearReadBufferBeforeWrite();var r,n;if(r=Bridge.Int.check(this._writePos+i.v,System.Int32),n=Bridge.Int.check(r+i.v,System.Int32)<Bridge.Int.check(this._bufferSize+this._bufferSize,System.Int32),n){if(this.WriteToBuffer(e,t,i),this._writePos<this._bufferSize)return;this._stream.Write(this._buffer,0,this._writePos),this._writePos=0,this.WriteToBuffer(e,t,i)}else{if(this._writePos>0){if(r<=(this._bufferSize+this._bufferSize|0)&&r<=System.IO.BufferedStream.MaxShadowBufferSize){this.EnsureShadowBufferAllocated(),System.Array.copy(e,t.v,this._buffer,this._writePos,i.v),this._stream.Write(this._buffer,0,r),this._writePos=0;return}this._stream.Write(this._buffer,0,this._writePos),this._writePos=0}this._stream.Write(e,t.v,i.v)}},WriteByte:function(e){this.EnsureNotClosed(),this._writePos===0&&(this.EnsureCanWrite(),this.ClearReadBufferBeforeWrite(),this.EnsureBufferAllocated()),this._writePos>=(this._bufferSize-1|0)&&this.FlushWrite(),this._buffer[System.Array.index(Bridge.identity(this._writePos,this._writePos=this._writePos+1|0),this._buffer)]=e},Seek:function(e,t){if(this.EnsureNotClosed(),this.EnsureCanSeek(),this._writePos>0)return this.FlushWrite(),this._stream.Seek(e,t);(this._readLen-this._readPos|0)>0&&t===1&&(e=e.sub(System.Int64(this._readLen-this._readPos|0)));var i=this.Position,r=this._stream.Seek(e,t);return this._readPos=System.Int64.clip32(r.sub(i.sub(System.Int64(this._readPos)))),0<=this._readPos&&this._readPos<this._readLen?this._stream.Seek(System.Int64(this._readLen-this._readPos),1):this._readPos=this._readLen=0,r},SetLength:function(e){if(e.lt(System.Int64(0)))throw new System.ArgumentOutOfRangeException.$ctor1("value");this.EnsureNotClosed(),this.EnsureCanSeek(),this.EnsureCanWrite(),this.Flush(),this._stream.SetLength(e)}}}),Bridge.define("System.IO.IOException",{inherits:[System.SystemException],ctors:{ctor:function(){this.$initialize(),System.SystemException.$ctor1.call(this,"I/O error occurred."),this.HResult=-2146232800},$ctor1:function(e){this.$initialize(),System.SystemException.$ctor1.call(this,e),this.HResult=-2146232800},$ctor3:function(e,t){this.$initialize(),System.SystemException.$ctor1.call(this,e),this.HResult=t},$ctor2:function(e,t){this.$initialize(),System.SystemException.$ctor2.call(this,e,t),this.HResult=-2146232800}}}),Bridge.define("System.IO.EndOfStreamException",{inherits:[System.IO.IOException],ctors:{ctor:function(){this.$initialize(),System.IO.IOException.$ctor1.call(this,"Arg_EndOfStreamException")},$ctor1:function(e){this.$initialize(),System.IO.IOException.$ctor1.call(this,e)},$ctor2:function(e,t){this.$initialize(),System.IO.IOException.$ctor2.call(this,e,t)}}}),Bridge.define("System.IO.File",{statics:{methods:{OpenText:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("path");return new System.IO.StreamReader.$ctor7(e)},OpenRead:function(e){return new System.IO.FileStream.$ctor1(e,3)},ReadAllText:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("path");if(e.length===0)throw new System.ArgumentException.$ctor1("Argument_EmptyPath");return System.IO.File.InternalReadAllText(e,System.Text.Encoding.UTF8,!0)},ReadAllText$1:function(e,t){if(e==null)throw new System.ArgumentNullException.$ctor1("path");if(t==null)throw new System.ArgumentNullException.$ctor1("encoding");if(e.length===0)throw new System.ArgumentException.$ctor1("Argument_EmptyPath");return System.IO.File.InternalReadAllText(e,t,!0)},InternalReadAllText:function(e,t,i){var r=new System.IO.StreamReader.$ctor12(e,t,!0,System.IO.StreamReader.DefaultBufferSize,i);try{return r.ReadToEnd()}finally{Bridge.hasValue(r)&&r.System$IDisposable$Dispose()}},ReadAllBytes:function(e){return System.IO.File.InternalReadAllBytes(e,!0)},InternalReadAllBytes:function(e,t){var i,r=new System.IO.FileStream.$ctor1(e,3),n,s,o,a;try{if(n=0,s=r.Length,s.gt(System.Int64(2147483647)))throw new System.IO.IOException.$ctor1("IO.IO_FileTooLong2GB");for(o=System.Int64.clip32(s),i=System.Array.init(o,0,System.Byte);o>0;)a=r.Read(i,n,o),a===0&&System.IO.__Error.EndOfFile(),n=n+a|0,o=o-a|0}finally{Bridge.hasValue(r)&&r.System$IDisposable$Dispose()}return i},ReadAllLines:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("path");if(e.length===0)throw new System.ArgumentException.$ctor1("Argument_EmptyPath");return System.IO.File.InternalReadAllLines(e,System.Text.Encoding.UTF8)},ReadAllLines$1:function(e,t){if(e==null)throw new System.ArgumentNullException.$ctor1("path");if(t==null)throw new System.ArgumentNullException.$ctor1("encoding");if(e.length===0)throw new System.ArgumentException.$ctor1("Argument_EmptyPath");return System.IO.File.InternalReadAllLines(e,t)},InternalReadAllLines:function(e,t){var i,r=new(System.Collections.Generic.List$1(System.String)).ctor,n=new System.IO.StreamReader.$ctor9(e,t);try{for(;(i=n.ReadLine())!=null;)r.add(i)}finally{Bridge.hasValue(n)&&n.System$IDisposable$Dispose()}return r.ToArray()},ReadLines:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("path");if(e.length===0)throw new System.ArgumentException.$ctor3("Argument_EmptyPath","path");return System.IO.ReadLinesIterator.CreateIterator(e,System.Text.Encoding.UTF8)},ReadLines$1:function(e,t){if(e==null)throw new System.ArgumentNullException.$ctor1("path");if(t==null)throw new System.ArgumentNullException.$ctor1("encoding");if(e.length===0)throw new System.ArgumentException.$ctor3("Argument_EmptyPath","path");return System.IO.ReadLinesIterator.CreateIterator(e,t)}}}}),Bridge.define("System.IO.FileMode",{$kind:"enum",statics:{fields:{CreateNew:1,Create:2,Open:3,OpenOrCreate:4,Truncate:5,Append:6}}}),Bridge.define("System.IO.FileOptions",{$kind:"enum",statics:{fields:{None:0,WriteThrough:-2147483648,Asynchronous:1073741824,RandomAccess:268435456,DeleteOnClose:67108864,SequentialScan:134217728,Encrypted:16384}},$flags:!0}),Bridge.define("System.IO.FileShare",{$kind:"enum",statics:{fields:{None:0,Read:1,Write:2,ReadWrite:3,Delete:4,Inheritable:16}},$flags:!0}),Bridge.define("System.IO.FileStream",{inherits:[System.IO.Stream],statics:{methods:{FromFile:function(e){var t=new System.Threading.Tasks.TaskCompletionSource,i=new FileReader;return i.onload=function(){t.setResult(new System.IO.FileStream.ctor(i.result,e.name))},i.onerror=function(r){t.setException(new System.SystemException.$ctor1(Bridge.unbox(r).target.error.As()))},i.readAsArrayBuffer(e),t.task},ReadBytes:function(e){var t,i,r,n;if(Bridge.isNode)return t=require("fs"),Bridge.cast(t.readFileSync(e),ArrayBuffer);if(i=new XMLHttpRequest,i.open("GET",e,!1),i.overrideMimeType("text/plain; charset=x-user-defined"),i.send(null),i.status!==200)throw new System.IO.IOException.$ctor1(System.String.concat("Status of request to "+(e||"")+" returned status: ",i.status));return r=i.responseText,n=new Uint8Array(r.length),System.String.toCharArray(r,0,r.length).forEach(function(s,o,a){var l;return l=s&255,n[o]=l,l}),n.buffer},ReadBytesAsync:function(e){var t=new System.Threading.Tasks.TaskCompletionSource,i,r;return Bridge.isNode?(i=require("fs"),i.readFile(e,Bridge.fn.$build([function(n,s){if(n!=null)throw new System.IO.IOException.ctor;t.setResult(s)}]))):(r=new XMLHttpRequest,r.open("GET",e,!0),r.overrideMimeType("text/plain; charset=binary-data"),r.send(null),r.onreadystatechange=function(){if(r.readyState===4){if(r.status!==200)throw new System.IO.IOException.$ctor1(System.String.concat("Status of request to "+(e||"")+" returned status: ",r.status));var n=r.responseText,s=new Uint8Array(n.length);System.String.toCharArray(n,0,n.length).forEach(function(o,a,l){var u;return u=o&255,s[a]=u,u}),t.setResult(s.buffer)}}),t.task}}},fields:{name:null,_buffer:null},props:{CanRead:{get:function(){return!0}},CanWrite:{get:function(){return!1}},CanSeek:{get:function(){return!1}},IsAsync:{get:function(){return!1}},Name:{get:function(){return this.name}},Length:{get:function(){return System.Int64(this.GetInternalBuffer().byteLength)}},Position:System.Int64(0)},ctors:{$ctor1:function(e,t){this.$initialize(),System.IO.Stream.ctor.call(this),this.name=e},ctor:function(e,t){this.$initialize(),System.IO.Stream.ctor.call(this),this._buffer=e,this.name=t}},methods:{Flush:function(){},Seek:function(e,t){throw new System.NotImplementedException.ctor},SetLength:function(e){throw new System.NotImplementedException.ctor},Write:function(e,t,i){throw new System.NotImplementedException.ctor},GetInternalBuffer:function(){return this._buffer==null&&(this._buffer=System.IO.FileStream.ReadBytes(this.name)),this._buffer},EnsureBufferAsync:function(){var e=0,t,i,r,n=new System.Threading.Tasks.TaskCompletionSource,s,o,a=Bridge.fn.bind(this,function(){try{for(;;)switch(e=System.Array.min([0,1,2,3],e),e){case 0:if(this._buffer==null){e=1;continue}e=3;continue;case 1:if(t=System.IO.FileStream.ReadBytesAsync(this.name),e=2,t.isCompleted())continue;t.continue(a);return;case 2:i=t.getAwaitedResult(),this._buffer=i,e=3;continue;case 3:n.setResult(null);return;default:n.setResult(null);return}}catch(l){o=System.Exception.create(l),n.setException(o)}},arguments);return a(),n.task},Read:function(e,t,i){var r,n,s,o,a;if(e==null)throw new System.ArgumentNullException.$ctor1("buffer");if(t<0)throw new System.ArgumentOutOfRangeException.$ctor1("offset");if(i<0)throw new System.ArgumentOutOfRangeException.$ctor1("count");if((e.length-t|0)<i)throw new System.ArgumentException.ctor;if(r=this.Length.sub(this.Position),r.gt(System.Int64(i))&&(r=System.Int64(i)),r.lte(System.Int64(0)))return 0;if(n=new Uint8Array(this.GetInternalBuffer()),r.gt(System.Int64(8)))for(s=0;System.Int64(s).lt(r);s=s+1|0)e[System.Array.index(s+t|0,e)]=n[this.Position.add(System.Int64(s))];else for(o=r;a=o.sub(System.Int64(1)),o=a,!a.lt(System.Int64(0));)e[System.Array.index(System.Int64.toNumber(System.Int64(t).add(o)),e)]=n[this.Position.add(o)];return this.Position=this.Position.add(r),System.Int64.clip32(r)}}}),Bridge.define("System.IO.Iterator$1",function(e){return{inherits:[System.Collections.Generic.IEnumerable$1(e),System.Collections.Generic.IEnumerator$1(e)],fields:{state:0,current:Bridge.getDefaultValue(e)},props:{Current:{get:function(){return this.current}},System$Collections$IEnumerator$Current:{get:function(){return this.Current}}},alias:["Current",["System$Collections$Generic$IEnumerator$1$"+Bridge.getTypeAlias(e)+"$Current$1","System$Collections$Generic$IEnumerator$1$Current$1"],"Dispose","System$IDisposable$Dispose","GetEnumerator",["System$Collections$Generic$IEnumerable$1$"+Bridge.getTypeAlias(e)+"$GetEnumerator","System$Collections$Generic$IEnumerable$1$GetEnumerator"]],ctors:{ctor:function(){this.$initialize()}},methods:{Dispose:function(){this.Dispose$1(!0)},Dispose$1:function(t){this.current=Bridge.getDefaultValue(e),this.state=-1},GetEnumerator:function(){if(this.state===0)return this.state=1,this;var t=this.Clone();return t.state=1,t},System$Collections$IEnumerable$GetEnumerator:function(){return this.GetEnumerator()},System$Collections$IEnumerator$reset:function(){throw new System.NotSupportedException.ctor}}}}),Bridge.define("System.IO.MemoryStream",{inherits:[System.IO.Stream],statics:{fields:{MemStreamMaxLength:0},ctors:{init:function(){this.MemStreamMaxLength=2147483647}}},fields:{_buffer:null,_origin:0,_position:0,_length:0,_capacity:0,_expandable:!1,_writable:!1,_exposable:!1,_isOpen:!1},props:{CanRead:{get:function(){return this._isOpen}},CanSeek:{get:function(){return this._isOpen}},CanWrite:{get:function(){return this._writable}},Capacity:{get:function(){return this._isOpen||System.IO.__Error.StreamIsClosed(),this._capacity-this._origin|0},set:function(e){if(System.Int64(e).lt(this.Length))throw new System.ArgumentOutOfRangeException.$ctor4("value","ArgumentOutOfRange_SmallCapacity");if(this._isOpen||System.IO.__Error.StreamIsClosed(),this._expandable||e===this.Capacity||System.IO.__Error.MemoryStreamNotExpandable(),this._expandable&&e!==this._capacity){if(e>0){var t=System.Array.init(e,0,System.Byte);this._length>0&&System.Array.copy(this._buffer,0,t,0,this._length),this._buffer=t}else this._buffer=null;this._capacity=e}}},Length:{get:function(){return this._isOpen||System.IO.__Error.StreamIsClosed(),System.Int64(this._length-this._origin)}},Position:{get:function(){return this._isOpen||System.IO.__Error.StreamIsClosed(),System.Int64(this._position-this._origin)},set:function(e){if(e.lt(System.Int64(0)))throw new System.ArgumentOutOfRangeException.$ctor4("value","ArgumentOutOfRange_NeedNonNegNum");if(this._isOpen||System.IO.__Error.StreamIsClosed(),e.gt(System.Int64(System.IO.MemoryStream.MemStreamMaxLength)))throw new System.ArgumentOutOfRangeException.$ctor4("value","ArgumentOutOfRange_StreamLength");this._position=this._origin+System.Int64.clip32(e)|0}}},ctors:{ctor:function(){System.IO.MemoryStream.$ctor6.call(this,0)},$ctor6:function(e){if(this.$initialize(),System.IO.Stream.ctor.call(this),e<0)throw new System.ArgumentOutOfRangeException.$ctor4("capacity","ArgumentOutOfRange_NegativeCapacity");this._buffer=System.Array.init(e,0,System.Byte),this._capacity=e,this._expandable=!0,this._writable=!0,this._exposable=!0,this._origin=0,this._isOpen=!0},$ctor1:function(e){System.IO.MemoryStream.$ctor2.call(this,e,!0)},$ctor2:function(e,t){if(this.$initialize(),System.IO.Stream.ctor.call(this),e==null)throw new System.ArgumentNullException.$ctor3("buffer","ArgumentNull_Buffer");this._buffer=e,this._length=this._capacity=e.length,this._writable=t,this._exposable=!1,this._origin=0,this._isOpen=!0},$ctor3:function(e,t,i){System.IO.MemoryStream.$ctor5.call(this,e,t,i,!0,!1)},$ctor4:function(e,t,i,r){System.IO.MemoryStream.$ctor5.call(this,e,t,i,r,!1)},$ctor5:function(e,t,i,r,n){if(this.$initialize(),System.IO.Stream.ctor.call(this),e==null)throw new System.ArgumentNullException.$ctor3("buffer","ArgumentNull_Buffer");if(t<0)throw new System.ArgumentOutOfRangeException.$ctor4("index","ArgumentOutOfRange_NeedNonNegNum");if(i<0)throw new System.ArgumentOutOfRangeException.$ctor4("count","ArgumentOutOfRange_NeedNonNegNum");if((e.length-t|0)<i)throw new System.ArgumentException.$ctor1("Argument_InvalidOffLen");this._buffer=e,this._origin=this._position=t,this._length=this._capacity=t+i|0,this._writable=r,this._exposable=n,this._expandable=!1,this._isOpen=!0}},methods:{EnsureWriteable:function(){this.CanWrite||System.IO.__Error.WriteNotSupported()},Dispose$1:function(e){try{e&&(this._isOpen=!1,this._writable=!1,this._expandable=!1)}finally{System.IO.Stream.prototype.Dispose$1.call(this,e)}},EnsureCapacity:function(e){if(e<0)throw new System.IO.IOException.$ctor1("IO.IO_StreamTooLong");if(e>this._capacity){var t=e;return t<256&&(t=256),t<Bridge.Int.mul(this._capacity,2)&&(t=Bridge.Int.mul(this._capacity,2)),Bridge.Int.mul(this._capacity,2)>>>0>2147483591&&(t=e>2147483591?e:2147483591),this.Capacity=t,!0}return!1},Flush:function(){},GetBuffer:function(){if(!this._exposable)throw new System.Exception("UnauthorizedAccess_MemStreamBuffer");return this._buffer},TryGetBuffer:function(e){return this._exposable?(e.v=new System.ArraySegment(this._buffer,this._origin,this._length-this._origin|0),!0):(e.v=Bridge.getDefaultValue(System.ArraySegment),!1)},InternalGetBuffer:function(){return this._buffer},InternalGetPosition:function(){return this._isOpen||System.IO.__Error.StreamIsClosed(),this._position},InternalReadInt32:function(){this._isOpen||System.IO.__Error.StreamIsClosed();var e=this._position=this._position+4|0;return e>this._length&&(this._position=this._length,System.IO.__Error.EndOfFile()),this._buffer[System.Array.index(e-4|0,this._buffer)]|this._buffer[System.Array.index(e-3|0,this._buffer)]<<8|this._buffer[System.Array.index(e-2|0,this._buffer)]<<16|this._buffer[System.Array.index(e-1|0,this._buffer)]<<24},InternalEmulateRead:function(e){this._isOpen||System.IO.__Error.StreamIsClosed();var t=this._length-this._position|0;return t>e&&(t=e),t<0&&(t=0),this._position=this._position+t|0,t},Read:function(e,t,i){var r,n;if(e==null)throw new System.ArgumentNullException.$ctor3("buffer","ArgumentNull_Buffer");if(t<0)throw new System.ArgumentOutOfRangeException.$ctor4("offset","ArgumentOutOfRange_NeedNonNegNum");if(i<0)throw new System.ArgumentOutOfRangeException.$ctor4("count","ArgumentOutOfRange_NeedNonNegNum");if((e.length-t|0)<i)throw new System.ArgumentException.$ctor1("Argument_InvalidOffLen");if(this._isOpen||System.IO.__Error.StreamIsClosed(),r=this._length-this._position|0,r>i&&(r=i),r<=0)return 0;if(r<=8)for(n=r;(n=n-1|0)>=0;)e[System.Array.index(t+n|0,e)]=this._buffer[System.Array.index(this._position+n|0,this._buffer)];else System.Array.copy(this._buffer,this._position,e,t,r);return this._position=this._position+r|0,r},ReadByte:function(){return this._isOpen||System.IO.__Error.StreamIsClosed(),this._position>=this._length?-1:this._buffer[System.Array.index(Bridge.identity(this._position,this._position=this._position+1|0),this._buffer)]},Seek:function(e,t){var i,r,n;if(this._isOpen||System.IO.__Error.StreamIsClosed(),e.gt(System.Int64(System.IO.MemoryStream.MemStreamMaxLength)))throw new System.ArgumentOutOfRangeException.$ctor4("offset","ArgumentOutOfRange_StreamLength");switch(t){case 0:if(i=this._origin+System.Int64.clip32(e)|0,e.lt(System.Int64(0))||i<this._origin)throw new System.IO.IOException.$ctor1("IO.IO_SeekBeforeBegin");this._position=i;break;case 1:if(r=this._position+System.Int64.clip32(e)|0,System.Int64(this._position).add(e).lt(System.Int64(this._origin))||r<this._origin)throw new System.IO.IOException.$ctor1("IO.IO_SeekBeforeBegin");this._position=r;break;case 2:if(n=this._length+System.Int64.clip32(e)|0,System.Int64(this._length).add(e).lt(System.Int64(this._origin))||n<this._origin)throw new System.IO.IOException.$ctor1("IO.IO_SeekBeforeBegin");this._position=n;break;default:throw new System.ArgumentException.$ctor1("Argument_InvalidSeekOrigin")}return System.Int64(this._position)},SetLength:function(e){if(e.lt(System.Int64(0))||e.gt(System.Int64(2147483647)))throw new System.ArgumentOutOfRangeException.$ctor4("value","ArgumentOutOfRange_StreamLength");if(this.EnsureWriteable(),e.gt(System.Int64(2147483647-this._origin|0)))throw new System.ArgumentOutOfRangeException.$ctor4("value","ArgumentOutOfRange_StreamLength");var t=this._origin+System.Int64.clip32(e)|0,i=this.EnsureCapacity(t);!i&&t>this._length&&System.Array.fill(this._buffer,0,this._length,t-this._length|0),this._length=t,this._position>t&&(this._position=t)},ToArray:function(){var e=System.Array.init(this._length-this._origin|0,0,System.Byte);return System.Array.copy(this._buffer,this._origin,e,0,this._length-this._origin|0),e},Write:function(e,t,i){var r,n,s,o;if(e==null)throw new System.ArgumentNullException.$ctor3("buffer","ArgumentNull_Buffer");if(t<0)throw new System.ArgumentOutOfRangeException.$ctor4("offset","ArgumentOutOfRange_NeedNonNegNum");if(i<0)throw new System.ArgumentOutOfRangeException.$ctor4("count","ArgumentOutOfRange_NeedNonNegNum");if((e.length-t|0)<i)throw new System.ArgumentException.$ctor1("Argument_InvalidOffLen");if(this._isOpen||System.IO.__Error.StreamIsClosed(),this.EnsureWriteable(),r=this._position+i|0,r<0)throw new System.IO.IOException.$ctor1("IO.IO_StreamTooLong");if(r>this._length&&(n=this._position>this._length,r>this._capacity&&(s=this.EnsureCapacity(r),s&&(n=!1)),n&&System.Array.fill(this._buffer,0,this._length,r-this._length|0),this._length=r),i<=8&&!Bridge.referenceEquals(e,this._buffer))for(o=i;(o=o-1|0)>=0;)this._buffer[System.Array.index(this._position+o|0,this._buffer)]=e[System.Array.index(t+o|0,e)];else System.Array.copy(e,t,this._buffer,this._position,i);this._position=r},WriteByte:function(e){var t,i,r;this._isOpen||System.IO.__Error.StreamIsClosed(),this.EnsureWriteable(),this._position>=this._length&&(t=this._position+1|0,i=this._position>this._length,t>=this._capacity&&(r=this.EnsureCapacity(t),r&&(i=!1)),i&&System.Array.fill(this._buffer,0,this._length,this._position-this._length|0),this._length=t),this._buffer[System.Array.index(Bridge.identity(this._position,this._position=this._position+1|0),this._buffer)]=e},WriteTo:function(e){if(e==null)throw new System.ArgumentNullException.$ctor3("stream","ArgumentNull_Stream");this._isOpen||System.IO.__Error.StreamIsClosed(),e.Write(this._buffer,this._origin,this._length-this._origin|0)}}}),Bridge.define("System.IO.ReadLinesIterator",{inherits:[System.IO.Iterator$1(System.String)],statics:{methods:{CreateIterator:function(e,t){return System.IO.ReadLinesIterator.CreateIterator$1(e,t,null)},CreateIterator$1:function(e,t,i){return new System.IO.ReadLinesIterator(e,t,i||new System.IO.StreamReader.$ctor9(e,t))}}},fields:{_path:null,_encoding:null,_reader:null},alias:["moveNext","System$Collections$IEnumerator$moveNext"],ctors:{ctor:function(e,t,i){this.$initialize(),System.IO.Iterator$1(System.String).ctor.call(this),this._path=e,this._encoding=t,this._reader=i}},methods:{moveNext:function(){if(this._reader!=null){if(this.current=this._reader.ReadLine(),this.current!=null)return!0;this.Dispose()}return!1},Clone:function(){return System.IO.ReadLinesIterator.CreateIterator$1(this._path,this._encoding,this._reader)},Dispose$1:function(e){try{e&&this._reader!=null&&this._reader.Dispose()}finally{this._reader=null,System.IO.Iterator$1(System.String).prototype.Dispose$1.call(this,e)}}}}),Bridge.define("System.IO.SeekOrigin",{$kind:"enum",statics:{fields:{Begin:0,Current:1,End:2}}}),Bridge.define("System.IO.Stream.NullStream",{inherits:[System.IO.Stream],$kind:"nested class",props:{CanRead:{get:function(){return!0}},CanWrite:{get:function(){return!0}},CanSeek:{get:function(){return!0}},Length:{get:function(){return System.Int64(0)}},Position:{get:function(){return System.Int64(0)},set:function(e){}}},ctors:{ctor:function(){this.$initialize(),System.IO.Stream.ctor.call(this)}},methods:{Dispose$1:function(e){},Flush:function(){},BeginRead:function(e,t,i,r,n){return this.CanRead||System.IO.__Error.ReadNotSupported(),this.BlockingBeginRead(e,t,i,r,n)},EndRead:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("asyncResult");return System.IO.Stream.BlockingEndRead(e)},BeginWrite:function(e,t,i,r,n){return this.CanWrite||System.IO.__Error.WriteNotSupported(),this.BlockingBeginWrite(e,t,i,r,n)},EndWrite:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("asyncResult");System.IO.Stream.BlockingEndWrite(e)},Read:function(e,t,i){return 0},ReadByte:function(){return-1},Write:function(e,t,i){},WriteByte:function(e){},Seek:function(e,t){return System.Int64(0)},SetLength:function(e){}}}),Bridge.define("System.IO.Stream.SynchronousAsyncResult",{inherits:[System.IAsyncResult],$kind:"nested class",statics:{methods:{EndRead:function(e){var t=Bridge.as(e,System.IO.Stream.SynchronousAsyncResult);return(t==null||t._isWrite)&&System.IO.__Error.WrongAsyncResult(),t._endXxxCalled&&System.IO.__Error.EndReadCalledTwice(),t._endXxxCalled=!0,t.ThrowIfError(),t._bytesRead},EndWrite:function(e){var t=Bridge.as(e,System.IO.Stream.SynchronousAsyncResult);t!=null&&t._isWrite||System.IO.__Error.WrongAsyncResult(),t._endXxxCalled&&System.IO.__Error.EndWriteCalledTwice(),t._endXxxCalled=!0,t.ThrowIfError()}}},fields:{_stateObject:null,_isWrite:!1,_exceptionInfo:null,_endXxxCalled:!1,_bytesRead:0},props:{IsCompleted:{get:function(){return!0}},AsyncState:{get:function(){return this._stateObject}},CompletedSynchronously:{get:function(){return!0}}},alias:["IsCompleted","System$IAsyncResult$IsCompleted","AsyncState","System$IAsyncResult$AsyncState","CompletedSynchronously","System$IAsyncResult$CompletedSynchronously"],ctors:{$ctor1:function(e,t){this.$initialize(),this._bytesRead=e,this._stateObject=t},$ctor2:function(e){this.$initialize(),this._stateObject=e,this._isWrite=!0},ctor:function(e,t,i){this.$initialize(),this._exceptionInfo=e,this._stateObject=t,this._isWrite=i}},methods:{ThrowIfError:function(){if(this._exceptionInfo!=null)throw this._exceptionInfo}}}),Bridge.define("System.IO.TextReader",{inherits:[System.IDisposable],statics:{fields:{Null:null},ctors:{init:function(){this.Null=new System.IO.TextReader.NullTextReader}},methods:{Synchronized:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("reader");return e}}},alias:["Dispose","System$IDisposable$Dispose"],ctors:{ctor:function(){this.$initialize()}},methods:{Close:function(){this.Dispose$1(!0)},Dispose:function(){this.Dispose$1(!0)},Dispose$1:function(e){},Peek:function(){return-1},Read:function(){return-1},Read$1:function(e,t,i){var r,n;if(e==null)throw new System.ArgumentNullException.$ctor1("buffer");if(t<0)throw new System.ArgumentOutOfRangeException.$ctor1("index");if(i<0)throw new System.ArgumentOutOfRangeException.$ctor1("count");if((e.length-t|0)<i)throw new System.ArgumentException.ctor;r=0;do{if(n=this.Read(),n===-1)break;e[System.Array.index(t+Bridge.identity(r,r=r+1|0)|0,e)]=n&65535}while(r<i);return r},ReadToEndAsync:function(){return System.Threading.Tasks.Task.fromResult(this.ReadToEnd(),System.String)},ReadToEnd:function(){for(var e=System.Array.init(4096,0,System.Char),t,i=new System.Text.StringBuilder("",4096);(t=this.Read$1(e,0,e.length))!==0;)i.append(System.String.fromCharArray(e,0,t));return i.toString()},ReadBlock:function(e,t,i){var r,n=0;do n=n+(r=this.Read$1(e,t+n|0,i-n|0))|0;while(r>0&&n<i);return n},ReadLine:function(){for(var e=new System.Text.StringBuilder,t;t=this.Read(),t!==-1;){if(t===13||t===10)return t===13&&this.Peek()===10&&this.Read(),e.toString();e.append(String.fromCharCode(t&65535))}return e.getLength()>0?e.toString():null}}}),Bridge.define("System.IO.StreamReader",{inherits:[System.IO.TextReader],statics:{fields:{DefaultFileStreamBufferSize:0,MinBufferSize:0,Null:null},props:{DefaultBufferSize:{get:function(){return 1024}}},ctors:{init:function(){this.DefaultFileStreamBufferSize=4096,this.MinBufferSize=128,this.Null=new System.IO.StreamReader.NullStreamReader}}},fields:{stream:null,encoding:null,byteBuffer:null,charBuffer:null,charPos:0,charLen:0,byteLen:0,bytePos:0,_maxCharsPerBuffer:0,_detectEncoding:!1,_isBlocked:!1,_closable:!1},props:{CurrentEncoding:{get:function(){return this.encoding}},BaseStream:{get:function(){return this.stream}},LeaveOpen:{get:function(){return!this._closable}},EndOfStream:{get:function(){if(this.stream==null&&System.IO.__Error.ReaderClosed(),this.charPos<this.charLen)return!1;var e=this.ReadBuffer();return e===0}}},ctors:{ctor:function(){this.$initialize(),System.IO.TextReader.ctor.call(this)},$ctor1:function(e){System.IO.StreamReader.$ctor2.call(this,e,!0)},$ctor2:function(e,t){System.IO.StreamReader.$ctor6.call(this,e,System.Text.Encoding.UTF8,t,System.IO.StreamReader.DefaultBufferSize,!1)},$ctor3:function(e,t){System.IO.StreamReader.$ctor6.call(this,e,t,!0,System.IO.StreamReader.DefaultBufferSize,!1)},$ctor4:function(e,t,i){System.IO.StreamReader.$ctor6.call(this,e,t,i,System.IO.StreamReader.DefaultBufferSize,!1)},$ctor5:function(e,t,i,r){System.IO.StreamReader.$ctor6.call(this,e,t,i,r,!1)},$ctor6:function(e,t,i,r,n){if(this.$initialize(),System.IO.TextReader.ctor.call(this),e==null||t==null)throw new System.ArgumentNullException.$ctor1(e==null?"stream":"encoding");if(!e.CanRead)throw new System.ArgumentException.ctor;if(r<=0)throw new System.ArgumentOutOfRangeException.$ctor1("bufferSize");this.Init$1(e,t,i,r,n)},$ctor7:function(e){System.IO.StreamReader.$ctor8.call(this,e,!0)},$ctor8:function(e,t){System.IO.StreamReader.$ctor11.call(this,e,System.Text.Encoding.UTF8,t,System.IO.StreamReader.DefaultBufferSize)},$ctor9:function(e,t){System.IO.StreamReader.$ctor11.call(this,e,t,!0,System.IO.StreamReader.DefaultBufferSize)},$ctor10:function(e,t,i){System.IO.StreamReader.$ctor11.call(this,e,t,i,System.IO.StreamReader.DefaultBufferSize)},$ctor11:function(e,t,i,r){System.IO.StreamReader.$ctor12.call(this,e,t,i,r,!0)},$ctor12:function(e,t,i,r,n){if(this.$initialize(),System.IO.TextReader.ctor.call(this),e==null||t==null)throw new System.ArgumentNullException.$ctor1(e==null?"path":"encoding");if(e.length===0)throw new System.ArgumentException.ctor;if(r<=0)throw new System.ArgumentOutOfRangeException.$ctor1("bufferSize");var s=new System.IO.FileStream.$ctor1(e,3);this.Init$1(s,t,i,r,!1)}},methods:{Init$1:function(e,t,i,r,n){this.stream=e,this.encoding=t,r<System.IO.StreamReader.MinBufferSize&&(r=System.IO.StreamReader.MinBufferSize),this.byteBuffer=System.Array.init(r,0,System.Byte),this._maxCharsPerBuffer=t.GetMaxCharCount(r),this.charBuffer=System.Array.init(this._maxCharsPerBuffer,0,System.Char),this.byteLen=0,this.bytePos=0,this._detectEncoding=i,this._isBlocked=!1,this._closable=!n},Init:function(e){this.stream=e,this._closable=!0},Close:function(){this.Dispose$1(!0)},Dispose$1:function(e){try{!this.LeaveOpen&&e&&this.stream!=null&&this.stream.Close()}finally{this.LeaveOpen||this.stream==null||(this.stream=null,this.encoding=null,this.byteBuffer=null,this.charBuffer=null,this.charPos=0,this.charLen=0,System.IO.TextReader.prototype.Dispose$1.call(this,e))}},DiscardBufferedData:function(){this.byteLen=0,this.charLen=0,this.charPos=0,this._isBlocked=!1},Peek:function(){return this.stream==null&&System.IO.__Error.ReaderClosed(),this.charPos===this.charLen&&(this._isBlocked||this.ReadBuffer()===0)?-1:this.charBuffer[System.Array.index(this.charPos,this.charBuffer)]},Read:function(){if(this.stream==null&&System.IO.__Error.ReaderClosed(),this.charPos===this.charLen&&this.ReadBuffer()===0)return-1;var e=this.charBuffer[System.Array.index(this.charPos,this.charBuffer)];return this.charPos=this.charPos+1|0,e},Read$1:function(e,t,i){var r,n,s;if(e==null)throw new System.ArgumentNullException.$ctor1("buffer");if(t<0||i<0)throw new System.ArgumentOutOfRangeException.$ctor1(t<0?"index":"count");if((e.length-t|0)<i)throw new System.ArgumentException.ctor;for(this.stream==null&&System.IO.__Error.ReaderClosed(),r=0,n={v:!1};i>0&&(s=this.charLen-this.charPos|0,s===0&&(s=this.ReadBuffer$1(e,t+r|0,i,n)),!(s===0||(s>i&&(s=i),n.v||(System.Array.copy(this.charBuffer,this.charPos,e,t+r|0,s),this.charPos=this.charPos+s|0),r=r+s|0,i=i-s|0,this._isBlocked))););return r},ReadToEndAsync:function(){var e=0,t,i,r,n,s=new System.Threading.Tasks.TaskCompletionSource,o,a,l=Bridge.fn.bind(this,function(){try{for(;;)switch(e=System.Array.min([0,1,2,3,4],e),e){case 0:if(Bridge.is(this.stream,System.IO.FileStream)){e=1;continue}e=3;continue;case 1:if(t=this.stream.EnsureBufferAsync(),e=2,t.isCompleted())continue;t.continue(l);return;case 2:t.getAwaitedResult(),e=3;continue;case 3:if(i=System.IO.TextReader.prototype.ReadToEndAsync.call(this),e=4,i.isCompleted())continue;i.continue(l);return;case 4:r=i.getAwaitedResult(),s.setResult(r);return;default:s.setResult(null);return}}catch(u){a=System.Exception.create(u),s.setException(a)}},arguments);return l(),s.task},ReadToEnd:function(){this.stream==null&&System.IO.__Error.ReaderClosed();var e=new System.Text.StringBuilder("",this.charLen-this.charPos|0);do e.append(System.String.fromCharArray(this.charBuffer,this.charPos,this.charLen-this.charPos|0)),this.charPos=this.charLen,this.ReadBuffer();while(this.charLen>0);return e.toString()},ReadBlock:function(e,t,i){if(e==null)throw new System.ArgumentNullException.$ctor1("buffer");if(t<0||i<0)throw new System.ArgumentOutOfRangeException.$ctor1(t<0?"index":"count");if((e.length-t|0)<i)throw new System.ArgumentException.ctor;return this.stream==null&&System.IO.__Error.ReaderClosed(),System.IO.TextReader.prototype.ReadBlock.call(this,e,t,i)},CompressBuffer:function(e){System.Array.copy(this.byteBuffer,e,this.byteBuffer,0,this.byteLen-e|0),this.byteLen=this.byteLen-e|0},DetectEncoding:function(){if(!(this.byteLen<2)){this._detectEncoding=!1;var e=!1;this.byteBuffer[System.Array.index(0,this.byteBuffer)]===254&&this.byteBuffer[System.Array.index(1,this.byteBuffer)]===255?(this.encoding=new System.Text.UnicodeEncoding.$ctor1(!0,!0),this.CompressBuffer(2),e=!0):this.byteBuffer[System.Array.index(0,this.byteBuffer)]===255&&this.byteBuffer[System.Array.index(1,this.byteBuffer)]===254?this.byteLen<4||this.byteBuffer[System.Array.index(2,this.byteBuffer)]!==0||this.byteBuffer[System.Array.index(3,this.byteBuffer)]!==0?(this.encoding=new System.Text.UnicodeEncoding.$ctor1(!1,!0),this.CompressBuffer(2),e=!0):(this.encoding=new System.Text.UTF32Encoding.$ctor1(!1,!0),this.CompressBuffer(4),e=!0):this.byteLen>=3&&this.byteBuffer[System.Array.index(0,this.byteBuffer)]===239&&this.byteBuffer[System.Array.index(1,this.byteBuffer)]===187&&this.byteBuffer[System.Array.index(2,this.byteBuffer)]===191?(this.encoding=System.Text.Encoding.UTF8,this.CompressBuffer(3),e=!0):this.byteLen>=4&&this.byteBuffer[System.Array.index(0,this.byteBuffer)]===0&&this.byteBuffer[System.Array.index(1,this.byteBuffer)]===0&&this.byteBuffer[System.Array.index(2,this.byteBuffer)]===254&&this.byteBuffer[System.Array.index(3,this.byteBuffer)]===255?(this.encoding=new System.Text.UTF32Encoding.$ctor1(!0,!0),this.CompressBuffer(4),e=!0):this.byteLen===2&&(this._detectEncoding=!0),e&&(this._maxCharsPerBuffer=this.encoding.GetMaxCharCount(this.byteBuffer.length),this.charBuffer=System.Array.init(this._maxCharsPerBuffer,0,System.Char))}},IsPreamble:function(){return!1},ReadBuffer:function(){this.charLen=0,this.charPos=0,this.byteLen=0;do{if(this.byteLen=this.stream.Read(this.byteBuffer,0,this.byteBuffer.length),this.byteLen===0)return this.charLen;this._isBlocked=this.byteLen<this.byteBuffer.length,this.IsPreamble()||(this._detectEncoding&&this.byteLen>=2&&this.DetectEncoding(),this.charLen=this.charLen+this.encoding.GetChars$2(this.byteBuffer,0,this.byteLen,this.charBuffer,this.charLen)|0)}while(this.charLen===0);return this.charLen},ReadBuffer$1:function(e,t,i,r){this.charLen=0,this.charPos=0,this.byteLen=0;var n=0;r.v=i>=this._maxCharsPerBuffer;do{if(this.byteLen=this.stream.Read(this.byteBuffer,0,this.byteBuffer.length),this.byteLen===0)break;this._isBlocked=this.byteLen<this.byteBuffer.length,this.IsPreamble()||(this._detectEncoding&&this.byteLen>=2&&(this.DetectEncoding(),r.v=i>=this._maxCharsPerBuffer),this.charPos=0,r.v?(n=n+this.encoding.GetChars$2(this.byteBuffer,0,this.byteLen,e,t+n|0)|0,this.charLen=0):(n=this.encoding.GetChars$2(this.byteBuffer,0,this.byteLen,this.charBuffer,n),this.charLen=this.charLen+n|0))}while(n===0);return this._isBlocked=!!(this._isBlocked&n<i),n},ReadLine:function(){var e,t,i,r;if(this.stream==null&&System.IO.__Error.ReaderClosed(),this.charPos===this.charLen&&this.ReadBuffer()===0)return null;e=null;do{t=this.charPos;do{if(i=this.charBuffer[System.Array.index(t,this.charBuffer)],i===13||i===10)return e!=null?(e.append(System.String.fromCharArray(this.charBuffer,this.charPos,t-this.charPos|0)),r=e.toString()):r=System.String.fromCharArray(this.charBuffer,this.charPos,t-this.charPos|0),this.charPos=t+1|0,i===13&&(this.charPos<this.charLen||this.ReadBuffer()>0)&&this.charBuffer[System.Array.index(this.charPos,this.charBuffer)]===10&&(this.charPos=this.charPos+1|0),r;t=t+1|0}while(t<this.charLen);t=this.charLen-this.charPos|0,e==null&&(e=new System.Text.StringBuilder("",t+80|0)),e.append(System.String.fromCharArray(this.charBuffer,this.charPos,t))}while(this.ReadBuffer()>0);return e.toString()}}}),Bridge.define("System.IO.StreamReader.NullStreamReader",{inherits:[System.IO.StreamReader],$kind:"nested class",props:{BaseStream:{get:function(){return System.IO.Stream.Null}},CurrentEncoding:{get:function(){return System.Text.Encoding.Unicode}}},ctors:{ctor:function(){this.$initialize(),System.IO.StreamReader.ctor.call(this),this.Init(System.IO.Stream.Null)}},methods:{Dispose$1:function(e){},Peek:function(){return-1},Read:function(){return-1},Read$1:function(e,t,i){return 0},ReadLine:function(){return null},ReadToEnd:function(){return""},ReadBuffer:function(){return 0}}}),Bridge.define("System.IO.TextWriter",{inherits:[System.IDisposable],statics:{fields:{InitialNewLine:null,Null:null},ctors:{init:function(){this.InitialNewLine=`\r `,this.Null=new System.IO.TextWriter.NullTextWriter}},methods:{Synchronized:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("writer");return e}}},fields:{CoreNewLine:null,InternalFormatProvider:null},props:{FormatProvider:{get:function(){return this.InternalFormatProvider==null?System.Globalization.CultureInfo.getCurrentCulture():this.InternalFormatProvider}},NewLine:{get:function(){return System.String.fromCharArray(this.CoreNewLine)},set:function(e){e==null&&(e=System.IO.TextWriter.InitialNewLine),this.CoreNewLine=System.String.toCharArray(e,0,e.length)}}},alias:["Dispose","System$IDisposable$Dispose"],ctors:{init:function(){this.CoreNewLine=System.Array.init([13,10],System.Char)},ctor:function(){this.$initialize(),this.InternalFormatProvider=null},$ctor1:function(e){this.$initialize(),this.InternalFormatProvider=e}},methods:{Close:function(){this.Dispose$1(!0)},Dispose$1:function(e){},Dispose:function(){this.Dispose$1(!0)},Flush:function(){},Write$1:function(e){},Write$2:function(e){e!=null&&this.Write$3(e,0,e.length)},Write$3:function(e,t,i){if(e==null)throw new System.ArgumentNullException.$ctor1("buffer");if(t<0)throw new System.ArgumentOutOfRangeException.$ctor1("index");if(i<0)throw new System.ArgumentOutOfRangeException.$ctor1("count");if((e.length-t|0)<i)throw new System.ArgumentException.ctor;for(var r=0;r<i;r=r+1|0)this.Write$1(e[System.Array.index(t+r|0,e)])},Write:function(e){this.Write$10(e?System.Boolean.trueString:System.Boolean.falseString)},Write$6:function(e){this.Write$10(System.Int32.format(e,"G",this.FormatProvider))},Write$15:function(e){this.Write$10(System.UInt32.format(e,"G",this.FormatProvider))},Write$7:function(e){this.Write$10(e.format("G",this.FormatProvider))},Write$16:function(e){this.Write$10(e.format("G",this.FormatProvider))},Write$9:function(e){this.Write$10(System.Single.format(e,"G",this.FormatProvider))},Write$5:function(e){this.Write$10(System.Double.format(e,"G",this.FormatProvider))},Write$4:function(e){this.Write$10(Bridge.Int.format(e,"G",this.FormatProvider))},Write$10:function(e){e!=null&&this.Write$2(System.String.toCharArray(e,0,e.length))},Write$8:function(e){if(e!=null){var t=Bridge.as(e,System.IFormattable);t!=null?this.Write$10(Bridge.format(t,null,this.FormatProvider)):this.Write$10(Bridge.toString(e))}},Write$11:function(e,t){this.Write$10(System.String.formatProvider(this.FormatProvider,e,[t]))},Write$12:function(e,t,i){this.Write$10(System.String.formatProvider(this.FormatProvider,e,t,i))},Write$13:function(e,t,i,r){this.Write$10(System.String.formatProvider(this.FormatProvider,e,t,i,r))},Write$14:function(e,t){t===void 0&&(t=[]),this.Write$10(System.String.formatProvider.apply(System.String,[this.FormatProvider,e].concat(t)))},WriteLine:function(){this.Write$2(this.CoreNewLine)},WriteLine$2:function(e){this.Write$1(e),this.WriteLine()},WriteLine$3:function(e){this.Write$2(e),this.WriteLine()},WriteLine$4:function(e,t,i){this.Write$3(e,t,i),this.WriteLine()},WriteLine$1:function(e){this.Write(e),this.WriteLine()},WriteLine$7:function(e){this.Write$6(e),this.WriteLine()},WriteLine$16:function(e){this.Write$15(e),this.WriteLine()},WriteLine$8:function(e){this.Write$7(e),this.WriteLine()},WriteLine$17:function(e){this.Write$16(e),this.WriteLine()},WriteLine$10:function(e){this.Write$9(e),this.WriteLine()},WriteLine$6:function(e){this.Write$5(e),this.WriteLine()},WriteLine$5:function(e){this.Write$4(e),this.WriteLine()},WriteLine$11:function(e){if(e==null)this.WriteLine();else{var t=e.length,i=this.CoreNewLine.length,r=System.Array.init(t+i|0,0,System.Char);System.String.copyTo(e,0,r,0,t),i===2?(r[System.Array.index(t,r)]=this.CoreNewLine[System.Array.index(0,this.CoreNewLine)],r[System.Array.index(t+1|0,r)]=this.CoreNewLine[System.Array.index(1,this.CoreNewLine)]):i===1?r[System.Array.index(t,r)]=this.CoreNewLine[System.Array.index(0,this.CoreNewLine)]:System.Array.copy(this.CoreNewLine,0,r,Bridge.Int.mul(t,2),Bridge.Int.mul(i,2)),this.Write$3(r,0,t+i|0)}},WriteLine$9:function(e){if(e==null)this.WriteLine();else{var t=Bridge.as(e,System.IFormattable);t!=null?this.WriteLine$11(Bridge.format(t,null,this.FormatProvider)):this.WriteLine$11(Bridge.toString(e))}},WriteLine$12:function(e,t){this.WriteLine$11(System.String.formatProvider(this.FormatProvider,e,[t]))},WriteLine$13:function(e,t,i){this.WriteLine$11(System.String.formatProvider(this.FormatProvider,e,t,i))},WriteLine$14:function(e,t,i,r){this.WriteLine$11(System.String.formatProvider(this.FormatProvider,e,t,i,r))},WriteLine$15:function(e,t){t===void 0&&(t=[]),this.WriteLine$11(System.String.formatProvider.apply(System.String,[this.FormatProvider,e].concat(t)))}}}),Bridge.define("System.IO.StreamWriter",{inherits:[System.IO.TextWriter],statics:{fields:{DefaultBufferSize:0,DefaultFileStreamBufferSize:0,MinBufferSize:0,Null:null,_UTF8NoBOM:null},props:{UTF8NoBOM:{get:function(){if(System.IO.StreamWriter._UTF8NoBOM==null){var e=new System.Text.UTF8Encoding.$ctor2(!1,!0);System.IO.StreamWriter._UTF8NoBOM=e}return System.IO.StreamWriter._UTF8NoBOM}}},ctors:{init:function(){this.DefaultBufferSize=1024,this.DefaultFileStreamBufferSize=4096,this.MinBufferSize=128,this.Null=new System.IO.StreamWriter.$ctor4(System.IO.Stream.Null,new System.Text.UTF8Encoding.$ctor2(!1,!0),System.IO.StreamWriter.MinBufferSize,!0)}}},fields:{stream:null,encoding:null,byteBuffer:null,charBuffer:null,charPos:0,charLen:0,autoFlush:!1,haveWrittenPreamble:!1,closable:!1},props:{AutoFlush:{get:function(){return this.autoFlush},set:function(e){this.autoFlush=e,e&&this.Flush$1(!0,!1)}},BaseStream:{get:function(){return this.stream}},LeaveOpen:{get:function(){return!this.closable}},HaveWrittenPreamble:{set:function(e){this.haveWrittenPreamble=e}},Encoding:{get:function(){return this.encoding}}},ctors:{ctor:function(){this.$initialize(),System.IO.TextWriter.$ctor1.call(this,null)},$ctor1:function(e){System.IO.StreamWriter.$ctor4.call(this,e,System.IO.StreamWriter.UTF8NoBOM,System.IO.StreamWriter.DefaultBufferSize,!1)},$ctor2:function(e,t){System.IO.StreamWriter.$ctor4.call(this,e,t,System.IO.StreamWriter.DefaultBufferSize,!1)},$ctor3:function(e,t,i){System.IO.StreamWriter.$ctor4.call(this,e,t,i,!1)},$ctor4:function(e,t,i,r){if(this.$initialize(),System.IO.TextWriter.$ctor1.call(this,null),e==null||t==null)throw new System.ArgumentNullException.$ctor1(e==null?"stream":"encoding");if(!e.CanWrite)throw new System.ArgumentException.$ctor1("Argument_StreamNotWritable");if(i<=0)throw new System.ArgumentOutOfRangeException.$ctor4("bufferSize","ArgumentOutOfRange_NeedPosNum");this.Init(e,t,i,r)},$ctor5:function(e){System.IO.StreamWriter.$ctor8.call(this,e,!1,System.IO.StreamWriter.UTF8NoBOM,System.IO.StreamWriter.DefaultBufferSize)},$ctor6:function(e,t){System.IO.StreamWriter.$ctor8.call(this,e,t,System.IO.StreamWriter.UTF8NoBOM,System.IO.StreamWriter.DefaultBufferSize)},$ctor7:function(e,t,i){System.IO.StreamWriter.$ctor8.call(this,e,t,i,System.IO.StreamWriter.DefaultBufferSize)},$ctor8:function(e,t,i,r){System.IO.StreamWriter.$ctor9.call(this,e,t,i,r,!0)},$ctor9:function(e,t,i,r,n){throw this.$initialize(),System.IO.TextWriter.$ctor1.call(this,null),new System.NotSupportedException.ctor}},methods:{Init:function(e,t,i,r){this.stream=e,this.encoding=t,i<System.IO.StreamWriter.MinBufferSize&&(i=System.IO.StreamWriter.MinBufferSize),this.charBuffer=System.Array.init(i,0,System.Char),this.byteBuffer=System.Array.init(this.encoding.GetMaxByteCount(i),0,System.Byte),this.charLen=i,this.stream.CanSeek&&this.stream.Position.gt(System.Int64(0))&&(this.haveWrittenPreamble=!0),this.closable=!r},Close:function(){this.Dispose$1(!0)},Dispose$1:function(e){try{this.stream!=null&&e&&this.Flush$1(!0,!0)}finally{if(!this.LeaveOpen&&this.stream!=null)try{e&&this.stream.Close()}finally{this.stream=null,this.byteBuffer=null,this.charBuffer=null,this.encoding=null,this.charLen=0,System.IO.TextWriter.prototype.Dispose$1.call(this,e)}}},Flush:function(){this.Flush$1(!0,!0)},Flush$1:function(e,t){if(this.stream==null&&System.IO.__Error.WriterClosed(),this.charPos!==0||e||t){var i=this.encoding.GetBytes$3(this.charBuffer,0,this.charPos,this.byteBuffer,0);this.charPos=0,i>0&&this.stream.Write(this.byteBuffer,0,i),e&&this.stream.Flush()}},Write$1:function(e){this.charPos===this.charLen&&this.Flush$1(!1,!1),this.charBuffer[System.Array.index(this.charPos,this.charBuffer)]=e,this.charPos=this.charPos+1|0,this.autoFlush&&this.Flush$1(!0,!1)},Write$2:function(e){var t,i,r;if(e!=null){for(t=0,i=e.length;i>0;)this.charPos===this.charLen&&this.Flush$1(!1,!1),r=this.charLen-this.charPos|0,r>i&&(r=i),System.Array.copy(e,t,this.charBuffer,this.charPos,r),this.charPos=this.charPos+r|0,t=t+r|0,i=i-r|0;this.autoFlush&&this.Flush$1(!0,!1)}},Write$3:function(e,t,i){if(e==null)throw new System.ArgumentNullException.$ctor3("buffer","ArgumentNull_Buffer");if(t<0)throw new System.ArgumentOutOfRangeException.$ctor4("index","ArgumentOutOfRange_NeedNonNegNum");if(i<0)throw new System.ArgumentOutOfRangeException.$ctor4("count","ArgumentOutOfRange_NeedNonNegNum");if((e.length-t|0)<i)throw new System.ArgumentException.$ctor1("Argument_InvalidOffLen");for(;i>0;){this.charPos===this.charLen&&this.Flush$1(!1,!1);var r=this.charLen-this.charPos|0;r>i&&(r=i),System.Array.copy(e,t,this.charBuffer,this.charPos,r),this.charPos=this.charPos+r|0,t=t+r|0,i=i-r|0}this.autoFlush&&this.Flush$1(!0,!1)},Write$10:function(e){var t,i,r;if(e!=null){for(t=e.length,i=0;t>0;)this.charPos===this.charLen&&this.Flush$1(!1,!1),r=this.charLen-this.charPos|0,r>t&&(r=t),System.String.copyTo(e,i,this.charBuffer,this.charPos,r),this.charPos=this.charPos+r|0,i=i+r|0,t=t-r|0;this.autoFlush&&this.Flush$1(!0,!1)}}}}),Bridge.define("System.IO.StringReader",{inherits:[System.IO.TextReader],fields:{_s:null,_pos:0,_length:0},ctors:{ctor:function(e){if(this.$initialize(),System.IO.TextReader.ctor.call(this),e==null)throw new System.ArgumentNullException.$ctor1("s");this._s=e,this._length=e==null?0:e.length}},methods:{Close:function(){this.Dispose$1(!0)},Dispose$1:function(e){this._s=null,this._pos=0,this._length=0,System.IO.TextReader.prototype.Dispose$1.call(this,e)},Peek:function(){return this._s==null&&System.IO.__Error.ReaderClosed(),this._pos===this._length?-1:this._s.charCodeAt(this._pos)},Read:function(){return this._s==null&&System.IO.__Error.ReaderClosed(),this._pos===this._length?-1:this._s.charCodeAt(Bridge.identity(this._pos,this._pos=this._pos+1|0))},Read$1:function(e,t,i){if(e==null)throw new System.ArgumentNullException.$ctor1("buffer");if(t<0)throw new System.ArgumentOutOfRangeException.$ctor1("index");if(i<0)throw new System.ArgumentOutOfRangeException.$ctor1("count");if((e.length-t|0)<i)throw new System.ArgumentException.ctor;this._s==null&&System.IO.__Error.ReaderClosed();var r=this._length-this._pos|0;return r>0&&(r>i&&(r=i),System.String.copyTo(this._s,this._pos,e,t,r),this._pos=this._pos+r|0),r},ReadToEnd:function(){this._s==null&&System.IO.__Error.ReaderClosed();var e;return e=this._pos===0?this._s:this._s.substr(this._pos,this._length-this._pos|0),this._pos=this._length,e},ReadLine:function(){var e,t,i,r;for(this._s==null&&System.IO.__Error.ReaderClosed(),e=this._pos;e<this._length;){if(t=this._s.charCodeAt(e),t===13||t===10)return i=this._s.substr(this._pos,e-this._pos|0),this._pos=e+1|0,t===13&&this._pos<this._length&&this._s.charCodeAt(this._pos)===10&&(this._pos=this._pos+1|0),i;e=e+1|0}return e>this._pos?(r=this._s.substr(this._pos,e-this._pos|0),this._pos=e,r):null}}}),Bridge.define("System.IO.StringWriter",{inherits:[System.IO.TextWriter],statics:{fields:{m_encoding:null}},fields:{_sb:null,_isOpen:!1},props:{Encoding:{get:function(){return System.IO.StringWriter.m_encoding==null&&(System.IO.StringWriter.m_encoding=new System.Text.UnicodeEncoding.$ctor1(!1,!1)),System.IO.StringWriter.m_encoding}}},ctors:{ctor:function(){System.IO.StringWriter.$ctor3.call(this,new System.Text.StringBuilder,System.Globalization.CultureInfo.getCurrentCulture())},$ctor1:function(e){System.IO.StringWriter.$ctor3.call(this,new System.Text.StringBuilder,e)},$ctor2:function(e){System.IO.StringWriter.$ctor3.call(this,e,System.Globalization.CultureInfo.getCurrentCulture())},$ctor3:function(e,t){if(this.$initialize(),System.IO.TextWriter.$ctor1.call(this,t),e==null)throw new System.ArgumentNullException.$ctor1("sb");this._sb=e,this._isOpen=!0}},methods:{Close:function(){this.Dispose$1(!0)},Dispose$1:function(e){this._isOpen=!1,System.IO.TextWriter.prototype.Dispose$1.call(this,e)},GetStringBuilder:function(){return this._sb},Write$1:function(e){this._isOpen||System.IO.__Error.WriterClosed(),this._sb.append(String.fromCharCode(e))},Write$3:function(e,t,i){if(e==null)throw new System.ArgumentNullException.$ctor1("buffer");if(t<0)throw new System.ArgumentOutOfRangeException.$ctor1("index");if(i<0)throw new System.ArgumentOutOfRangeException.$ctor1("count");if((e.length-t|0)<i)throw new System.ArgumentException.ctor;this._isOpen||System.IO.__Error.WriterClosed(),this._sb.append(System.String.fromCharArray(e,t,i))},Write$10:function(e){this._isOpen||System.IO.__Error.WriterClosed(),e!=null&&this._sb.append(e)},toString:function(){return this._sb.toString()}}}),Bridge.define("System.IO.TextReader.NullTextReader",{inherits:[System.IO.TextReader],$kind:"nested class",ctors:{ctor:function(){this.$initialize(),System.IO.TextReader.ctor.call(this)}},methods:{Read$1:function(e,t,i){return 0},ReadLine:function(){return null}}}),Bridge.define("System.IO.TextWriter.NullTextWriter",{inherits:[System.IO.TextWriter],$kind:"nested class",props:{Encoding:{get:function(){return System.Text.Encoding.Default}}},ctors:{ctor:function(){this.$initialize(),System.IO.TextWriter.$ctor1.call(this,System.Globalization.CultureInfo.invariantCulture)}},methods:{Write$3:function(e,t,i){},Write$10:function(e){},WriteLine:function(){},WriteLine$11:function(e){},WriteLine$9:function(e){}}}),Bridge.define("System.IO.__Error",{statics:{methods:{EndOfFile:function(){throw new System.IO.EndOfStreamException.$ctor1("IO.EOF_ReadBeyondEOF")},FileNotOpen:function(){throw new System.Exception("ObjectDisposed_FileClosed")},StreamIsClosed:function(){throw new System.Exception("ObjectDisposed_StreamClosed")},MemoryStreamNotExpandable:function(){throw new System.NotSupportedException.$ctor1("NotSupported_MemStreamNotExpandable")},ReaderClosed:function(){throw new System.Exception("ObjectDisposed_ReaderClosed")},ReadNotSupported:function(){throw new System.NotSupportedException.$ctor1("NotSupported_UnreadableStream")},SeekNotSupported:function(){throw new System.NotSupportedException.$ctor1("NotSupported_UnseekableStream")},WrongAsyncResult:function(){throw new System.ArgumentException.$ctor1("Arg_WrongAsyncResult")},EndReadCalledTwice:function(){throw new System.ArgumentException.$ctor1("InvalidOperation_EndReadCalledMultiple")},EndWriteCalledTwice:function(){throw new System.ArgumentException.$ctor1("InvalidOperation_EndWriteCalledMultiple")},WriteNotSupported:function(){throw new System.NotSupportedException.$ctor1("NotSupported_UnwritableStream")},WriterClosed:function(){throw new System.Exception("ObjectDisposed_WriterClosed")}}}}),Bridge.define("System.Reflection.AmbiguousMatchException",{inherits:[System.SystemException],ctors:{ctor:function(){this.$initialize(),System.SystemException.$ctor1.call(this,"Ambiguous match found."),this.HResult=-2147475171},$ctor1:function(e){this.$initialize(),System.SystemException.$ctor1.call(this,e),this.HResult=-2147475171},$ctor2:function(e,t){this.$initialize(),System.SystemException.$ctor2.call(this,e,t),this.HResult=-2147475171}}}),Bridge.define("System.Reflection.Binder",{ctors:{ctor:function(){this.$initialize()}}}),Bridge.define("System.Reflection.BindingFlags",{$kind:"enum",statics:{fields:{Default:0,IgnoreCase:1,DeclaredOnly:2,Instance:4,Static:8,Public:16,NonPublic:32,FlattenHierarchy:64,InvokeMethod:256,CreateInstance:512,GetField:1024,SetField:2048,GetProperty:4096,SetProperty:8192,PutDispProperty:16384,PutRefDispProperty:32768,ExactBinding:65536,SuppressChangeType:131072,OptionalParamBinding:262144,IgnoreReturn:16777216,DoNotWrapExceptions:33554432}},$flags:!0}),Bridge.define("System.Reflection.CallingConventions",{$kind:"enum",statics:{fields:{Standard:1,VarArgs:2,Any:3,HasThis:32,ExplicitThis:64}},$flags:!0}),Bridge.define("System.Reflection.ICustomAttributeProvider",{$kind:"interface"}),Bridge.define("System.Reflection.InvalidFilterCriteriaException",{inherits:[System.ApplicationException],ctors:{ctor:function(){System.Reflection.InvalidFilterCriteriaException.$ctor1.call(this,"Specified filter criteria was invalid.")},$ctor1:function(e){System.Reflection.InvalidFilterCriteriaException.$ctor2.call(this,e,null)},$ctor2:function(e,t){this.$initialize(),System.ApplicationException.$ctor2.call(this,e,t),this.HResult=-2146232831}}}),Bridge.define("System.Reflection.IReflect",{$kind:"interface"}),Bridge.define("System.Reflection.MemberTypes",{$kind:"enum",statics:{fields:{Constructor:1,Event:2,Field:4,Method:8,Property:16,TypeInfo:32,Custom:64,NestedType:128,All:191}},$flags:!0}),Bridge.define("System.Reflection.Module",{inherits:[System.Reflection.ICustomAttributeProvider,System.Runtime.Serialization.ISerializable],statics:{fields:{DefaultLookup:0,FilterTypeName:null,FilterTypeNameIgnoreCase:null},ctors:{init:function(){this.DefaultLookup=28,this.FilterTypeName=System.Reflection.Module.FilterTypeNameImpl,this.FilterTypeNameIgnoreCase=System.Reflection.Module.FilterTypeNameIgnoreCaseImpl}},methods:{FilterTypeNameImpl:function(e,t){if(t==null||!Bridge.is(t,System.String))throw new System.Reflection.InvalidFilterCriteriaException.$ctor1("A String must be provided for the filter criteria.");var i=Bridge.cast(t,System.String);return i.length>0&&i.charCodeAt(i.length-1|0)===42?(i=i.substr(0,i.length-1|0),System.String.startsWith(Bridge.Reflection.getTypeName(e),i,4)):System.String.equals(Bridge.Reflection.getTypeName(e),i)},FilterTypeNameIgnoreCaseImpl:function(e,t){var i,r,n;if(t==null||!Bridge.is(t,System.String))throw new System.Reflection.InvalidFilterCriteriaException.$ctor1("A String must be provided for the filter criteria.");return r=Bridge.cast(t,System.String),r.length>0&&r.charCodeAt(r.length-1|0)===42?(r=r.substr(0,r.length-1|0),n=Bridge.Reflection.getTypeName(e),n.length>=r.length?(i=r.length,System.String.compare(n.substr(0,i),r.substr(0,i),5)===0):!1):System.String.compare(r,Bridge.Reflection.getTypeName(e),5)===0},op_Equality:function(e,t){return Bridge.referenceEquals(e,t)?!0:e==null||t==null?!1:e.equals(t)},op_Inequality:function(e,t){return!System.Reflection.Module.op_Equality(e,t)}}},props:{Assembly:{get:function(){throw System.NotImplemented.ByDesign}},FullyQualifiedName:{get:function(){throw System.NotImplemented.ByDesign}},Name:{get:function(){throw System.NotImplemented.ByDesign}},MDStreamVersion:{get:function(){throw System.NotImplemented.ByDesign}},ModuleVersionId:{get:function(){throw System.NotImplemented.ByDesign}},ScopeName:{get:function(){throw System.NotImplemented.ByDesign}},MetadataToken:{get:function(){throw System.NotImplemented.ByDesign}}},alias:["IsDefined","System$Reflection$ICustomAttributeProvider$IsDefined","GetCustomAttributes","System$Reflection$ICustomAttributeProvider$GetCustomAttributes","GetCustomAttributes$1","System$Reflection$ICustomAttributeProvider$GetCustomAttributes$1"],ctors:{ctor:function(){this.$initialize()}},methods:{IsResource:function(){throw System.NotImplemented.ByDesign},IsDefined:function(e,t){throw System.NotImplemented.ByDesign},GetCustomAttributes:function(e){throw System.NotImplemented.ByDesign},GetCustomAttributes$1:function(e,t){throw System.NotImplemented.ByDesign},GetMethod:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("name");return this.GetMethodImpl(e,System.Reflection.Module.DefaultLookup,null,3,null,null)},GetMethod$2:function(e,t){return this.GetMethod$1(e,System.Reflection.Module.DefaultLookup,null,3,t,null)},GetMethod$1:function(e,t,i,r,n,s){if(e==null)throw new System.ArgumentNullException.$ctor1("name");if(n==null)throw new System.ArgumentNullException.$ctor1("types");for(var o=0;o<n.length;o=o+1|0)if(n[System.Array.index(o,n)]==null)throw new System.ArgumentNullException.$ctor1("types");return this.GetMethodImpl(e,t,i,r,n,s)},GetMethodImpl:function(e,t,i,r,n,s){throw System.NotImplemented.ByDesign},GetMethods:function(){return this.GetMethods$1(System.Reflection.Module.DefaultLookup)},GetMethods$1:function(e){throw System.NotImplemented.ByDesign},GetField:function(e){return this.GetField$1(e,System.Reflection.Module.DefaultLookup)},GetField$1:function(e,t){throw System.NotImplemented.ByDesign},GetFields:function(){return this.GetFields$1(System.Reflection.Module.DefaultLookup)},GetFields$1:function(e){throw System.NotImplemented.ByDesign},GetTypes:function(){throw System.NotImplemented.ByDesign},GetType:function(e){return this.GetType$2(e,!1,!1)},GetType$1:function(e,t){return this.GetType$2(e,!1,t)},GetType$2:function(e,t,i){throw System.NotImplemented.ByDesign},FindTypes:function(e,t){for(var i,r,n=this.GetTypes(),s=0,o=0;o<n.length;o=o+1|0)Bridge.staticEquals(e,null)||e(n[System.Array.index(o,n)],t)?s=s+1|0:n[System.Array.index(o,n)]=null;if(s===n.length)return n;for(i=System.Array.init(s,null,System.Type),s=0,r=0;r<n.length;r=r+1|0)n[System.Array.index(r,n)]!=null&&(i[System.Array.index(Bridge.identity(s,s=s+1|0),i)]=n[System.Array.index(r,n)]);return i},ResolveField:function(e){return this.ResolveField$1(e,null,null)},ResolveField$1:function(e,t,i){throw System.NotImplemented.ByDesign},ResolveMember:function(e){return this.ResolveMember$1(e,null,null)},ResolveMember$1:function(e,t,i){throw System.NotImplemented.ByDesign},ResolveMethod:function(e){return this.ResolveMethod$1(e,null,null)},ResolveMethod$1:function(e,t,i){throw System.NotImplemented.ByDesign},ResolveSignature:function(e){throw System.NotImplemented.ByDesign},ResolveString:function(e){throw System.NotImplemented.ByDesign},ResolveType:function(e){return this.ResolveType$1(e,null,null)},ResolveType$1:function(e,t,i){throw System.NotImplemented.ByDesign},equals:function(e){return Bridge.equals(this,e)},getHashCode:function(){return Bridge.getHashCode(this)},toString:function(){return this.ScopeName}}}),Bridge.define("System.Reflection.ParameterModifier",{$kind:"struct",statics:{methods:{getDefaultValue:function(){return new System.Reflection.ParameterModifier}}},fields:{_byRef:null},ctors:{$ctor1:function(e){if(this.$initialize(),e<=0)throw new System.ArgumentException.$ctor1("Must specify one or more parameters.");this._byRef=System.Array.init(e,!1,System.Boolean)},ctor:function(){this.$initialize()}},methods:{getItem:function(e){return this._byRef[System.Array.index(e,this._byRef)]},setItem:function(e,t){this._byRef[System.Array.index(e,this._byRef)]=t},getHashCode:function(){return Bridge.addHash([6723435274,this._byRef])},equals:function(e){return Bridge.is(e,System.Reflection.ParameterModifier)?Bridge.equals(this._byRef,e._byRef):!1},$clone:function(e){var t=e||new System.Reflection.ParameterModifier;return t._byRef=this._byRef,t}}}),Bridge.define("System.Reflection.TypeAttributes",{$kind:"enum",statics:{fields:{VisibilityMask:7,NotPublic:0,Public:1,NestedPublic:2,NestedPrivate:3,NestedFamily:4,NestedAssembly:5,NestedFamANDAssem:6,NestedFamORAssem:7,LayoutMask:24,AutoLayout:0,SequentialLayout:8,ExplicitLayout:16,ClassSemanticsMask:32,Class:0,Interface:32,Abstract:128,Sealed:256,SpecialName:1024,Import:4096,Serializable:8192,WindowsRuntime:16384,StringFormatMask:196608,AnsiClass:0,UnicodeClass:65536,AutoClass:131072,CustomFormatClass:196608,CustomFormatMask:12582912,BeforeFieldInit:1048576,RTSpecialName:2048,HasSecurity:262144,ReservedMask:264192}},$flags:!0}),Bridge.define("System.Random",{statics:{fields:{MBIG:0,MSEED:0,MZ:0},ctors:{init:function(){this.MBIG=2147483647,this.MSEED=161803398,this.MZ=0}}},fields:{inext:0,inextp:0,SeedArray:null},ctors:{init:function(){this.SeedArray=System.Array.init(56,0,System.Int32)},ctor:function(){System.Random.$ctor1.call(this,System.Int64.clip32(System.DateTime.getTicks(System.DateTime.getNow())))},$ctor1:function(e){var t,i,r,n,s,o,a;for(this.$initialize(),n=e===-2147483648?2147483647:Math.abs(e),i=System.Random.MSEED-n|0,this.SeedArray[System.Array.index(55,this.SeedArray)]=i,r=1,s=1;s<55;s=s+1|0)t=Bridge.Int.mul(21,s)%55,this.SeedArray[System.Array.index(t,this.SeedArray)]=r,r=i-r|0,r<0&&(r=r+System.Random.MBIG|0),i=this.SeedArray[System.Array.index(t,this.SeedArray)];for(o=1;o<5;o=o+1|0)for(a=1;a<56;a=a+1|0)this.SeedArray[System.Array.index(a,this.SeedArray)]=this.SeedArray[System.Array.index(a,this.SeedArray)]-this.SeedArray[System.Array.index(1+(a+30|0)%55|0,this.SeedArray)]|0,this.SeedArray[System.Array.index(a,this.SeedArray)]<0&&(this.SeedArray[System.Array.index(a,this.SeedArray)]=this.SeedArray[System.Array.index(a,this.SeedArray)]+System.Random.MBIG|0);this.inext=0,this.inextp=21,e=1}},methods:{Sample:function(){return this.InternalSample()*4656612875245797e-25},InternalSample:function(){var e,t=this.inext,i=this.inextp;return(t=t+1|0)>=56&&(t=1),(i=i+1|0)>=56&&(i=1),e=this.SeedArray[System.Array.index(t,this.SeedArray)]-this.SeedArray[System.Array.index(i,this.SeedArray)]|0,e===System.Random.MBIG&&(e=e-1|0),e<0&&(e=e+System.Random.MBIG|0),this.SeedArray[System.Array.index(t,this.SeedArray)]=e,this.inext=t,this.inextp=i,e},Next:function(){return this.InternalSample()},Next$2:function(e,t){if(e>t)throw new System.ArgumentOutOfRangeException.$ctor4("minValue","'minValue' cannot be greater than maxValue.");var i=System.Int64(t).sub(System.Int64(e));return i.lte(System.Int64(2147483647))?Bridge.Int.clip32(this.Sample()*System.Int64.toNumber(i))+e|0:System.Int64.clip32(Bridge.Int.clip64(this.GetSampleForLargeRange()*System.Int64.toNumber(i)).add(System.Int64(e)))},Next$1:function(e){if(e<0)throw new System.ArgumentOutOfRangeException.$ctor4("maxValue","'maxValue' must be greater than zero.");return Bridge.Int.clip32(this.Sample()*e)},GetSampleForLargeRange:function(){var e=this.InternalSample(),t=this.InternalSample()%2==0,i;return t&&(e=-e|0),i=e,i+=2147483646,i/4294967293},NextDouble:function(){return this.Sample()},NextBytes:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("buffer");for(var t=0;t<e.length;t=t+1|0)e[System.Array.index(t,e)]=this.InternalSample()%256&255}}}),Bridge.define("System.RankException",{inherits:[System.SystemException],ctors:{ctor:function(){this.$initialize(),System.SystemException.$ctor1.call(this,"Attempted to operate on an array with the incorrect number of dimensions."),this.HResult=-2146233065},$ctor1:function(e){this.$initialize(),System.SystemException.$ctor1.call(this,e),this.HResult=-2146233065},$ctor2:function(e,t){this.$initialize(),System.SystemException.$ctor2.call(this,e,t),this.HResult=-2146233065}}}),Bridge.define("System.SR",{statics:{fields:{ArgumentException_ValueTupleIncorrectType:null,ArgumentException_ValueTupleLastArgumentNotAValueTuple:null,_lock:null},props:{ResourceManager:null},ctors:{init:function(){this.ArgumentException_ValueTupleIncorrectType="Argument must be of type {0}.",this.ArgumentException_ValueTupleLastArgumentNotAValueTuple="The last element of an eight element ValueTuple must be a ValueTuple.",this._lock={}}},methods:{UsingResourceKeys:function(){return!1},GetResourceString:function(e){return System.SR.GetResourceString$1(e,"")},GetResourceString$1:function(e,t){var i=null;try{i=System.SR.InternalGetResourceString(e)}catch(r){if(r=System.Exception.create(r),!Bridge.is(r,System.Resources.MissingManifestResourceException))throw r}return t!=null&&System.String.equals(e,i,4)?t:i},InternalGetResourceString:function(e){return e?.length,e},Format$3:function(e,t){return t===void 0&&(t=[]),t!=null?System.SR.UsingResourceKeys()?(e||"")+(t.join(", ")||""):System.String.format.apply(System.String,[e].concat(t)):e},Format:function(e,t){return System.SR.UsingResourceKeys()?[e,t].join(", "):System.String.format(e,[t])},Format$1:function(e,t,i){return System.SR.UsingResourceKeys()?[e,t,i].join(", "):System.String.format(e,t,i)},Format$2:function(e,t,i,r){return System.SR.UsingResourceKeys()?[e,t,i,r].join(", "):System.String.format(e,t,i,r)}}}}),Bridge.define("System.StringComparison",{$kind:"enum",statics:{fields:{CurrentCulture:0,CurrentCultureIgnoreCase:1,InvariantCulture:2,InvariantCultureIgnoreCase:3,Ordinal:4,OrdinalIgnoreCase:5}}}),Bridge.define("System.AggregateException",{inherits:[System.Exception],ctor:function(e,t){this.$initialize(),this.innerExceptions=new(System.Collections.ObjectModel.ReadOnlyCollection$1(System.Exception))(Bridge.hasValue(t)?Bridge.toArray(t):[]),System.Exception.ctor.call(this,e||"One or more errors occurred.",this.innerExceptions.Count>0?this.innerExceptions.getItem(0):null)},handle:function(e){var t,i,r;if(!Bridge.hasValue(e))throw new System.ArgumentNullException.$ctor1("predicate");for(t=this.innerExceptions.Count,i=[],r=0;r<t;r++)e(this.innerExceptions.get(r))||i.push(this.innerExceptions.getItem(r));if(i.length>0)throw new System.AggregateException(this.Message,i)},getBaseException:function(){for(var e=this,t=this;t!=null&&t.innerExceptions.Count===1;)e=e.InnerException,t=Bridge.as(e,System.AggregateException);return e},hasTaskCanceledException:function(){for(var e,t=0;t<this.innerExceptions.Count;t++)if(e=this.innerExceptions.getItem(t),Bridge.is(e,System.Threading.Tasks.TaskCanceledException)||Bridge.is(e,System.AggregateException)&&e.hasTaskCanceledException())return!0;return!1},flatten:function(){var e=new(System.Collections.Generic.List$1(System.Exception)),t=new(System.Collections.Generic.List$1(System.AggregateException)),i,r,n,s,o,a;for(t.add(this),i=0;t.Count>i;)for(r=t.getItem(i++).innerExceptions,n=r.Count,s=0;s<n;s++)o=r.getItem(s),Bridge.hasValue(o)&&(a=Bridge.as(o,System.AggregateException),Bridge.hasValue(a)?t.add(a):e.add(o));return new System.AggregateException(this.Message,e)}}),Bridge.define("Bridge.PromiseException",{inherits:[System.Exception],ctor:function(e,t,i){this.$initialize(),this.arguments=System.Array.clone(e),t==null&&(t="Promise exception: [",t+=this.arguments.map(function(r){return r==null?"null":r.toString()}).join(", "),t+="]"),System.Exception.ctor.call(this,t,i)},getArguments:function(){return this.arguments}}),Bridge.define("System.ThrowHelper",{statics:{methods:{ThrowArrayTypeMismatchException:function(){throw new System.ArrayTypeMismatchException.ctor},ThrowInvalidTypeWithPointersNotSupported:function(e){throw new System.ArgumentException.$ctor1(System.SR.Format("Cannot use type '{0}'. Only value types without pointers or references are supported.",e))},ThrowIndexOutOfRangeException:function(){throw new System.IndexOutOfRangeException.ctor},ThrowArgumentOutOfRangeException:function(){throw new System.ArgumentOutOfRangeException.ctor},ThrowArgumentOutOfRangeException$1:function(e){throw new System.ArgumentOutOfRangeException.$ctor1(System.ThrowHelper.GetArgumentName(e))},ThrowArgumentOutOfRangeException$2:function(e,t){throw System.ThrowHelper.GetArgumentOutOfRangeException(e,t)},ThrowArgumentOutOfRangeException$3:function(e,t,i){throw System.ThrowHelper.GetArgumentOutOfRangeException$1(e,t,i)},ThrowArgumentException_DestinationTooShort:function(){throw new System.ArgumentException.$ctor1("Destination is too short.")},ThrowArgumentException_OverlapAlignmentMismatch:function(){throw new System.ArgumentException.$ctor1("Overlapping spans have mismatching alignment.")},ThrowArgumentOutOfRange_IndexException:function(){throw System.ThrowHelper.GetArgumentOutOfRangeException(System.ExceptionArgument.index,System.ExceptionResource.ArgumentOutOfRange_Index)},ThrowIndexArgumentOutOfRange_NeedNonNegNumException:function(){throw System.ThrowHelper.GetArgumentOutOfRangeException(System.ExceptionArgument.index,System.ExceptionResource.ArgumentOutOfRange_NeedNonNegNum)},ThrowLengthArgumentOutOfRange_ArgumentOutOfRange_NeedNonNegNum:function(){throw System.ThrowHelper.GetArgumentOutOfRangeException(System.ExceptionArgument.$length,System.ExceptionResource.ArgumentOutOfRange_NeedNonNegNum)},ThrowStartIndexArgumentOutOfRange_ArgumentOutOfRange_Index:function(){throw System.ThrowHelper.GetArgumentOutOfRangeException(System.ExceptionArgument.startIndex,System.ExceptionResource.ArgumentOutOfRange_Index)},ThrowCountArgumentOutOfRange_ArgumentOutOfRange_Count:function(){throw System.ThrowHelper.GetArgumentOutOfRangeException(System.ExceptionArgument.count,System.ExceptionResource.ArgumentOutOfRange_Count)},ThrowWrongKeyTypeArgumentException:function(e,t,i){throw System.ThrowHelper.GetWrongKeyTypeArgumentException(t,i)},ThrowWrongValueTypeArgumentException:function(e,t,i){throw System.ThrowHelper.GetWrongValueTypeArgumentException(t,i)},GetAddingDuplicateWithKeyArgumentException:function(e){return new System.ArgumentException.$ctor1(System.SR.Format("An item with the same key has already been added. Key: {0}",e))},ThrowAddingDuplicateWithKeyArgumentException:function(e,t){throw System.ThrowHelper.GetAddingDuplicateWithKeyArgumentException(t)},ThrowKeyNotFoundException:function(e,t){throw System.ThrowHelper.GetKeyNotFoundException(t)},ThrowArgumentException:function(e){throw System.ThrowHelper.GetArgumentException(e)},ThrowArgumentException$1:function(e,t){throw System.ThrowHelper.GetArgumentException$1(e,t)},GetArgumentNullException:function(e){return new System.ArgumentNullException.$ctor1(System.ThrowHelper.GetArgumentName(e))},ThrowArgumentNullException:function(e){throw System.ThrowHelper.GetArgumentNullException(e)},ThrowArgumentNullException$2:function(e){throw new System.ArgumentNullException.$ctor1(System.ThrowHelper.GetResourceString(e))},ThrowArgumentNullException$1:function(e,t){throw new System.ArgumentNullException.$ctor3(System.ThrowHelper.GetArgumentName(e),System.ThrowHelper.GetResourceString(t))},ThrowInvalidOperationException:function(e){throw System.ThrowHelper.GetInvalidOperationException(e)},ThrowInvalidOperationException$1:function(e,t){throw new System.InvalidOperationException.$ctor2(System.ThrowHelper.GetResourceString(e),t)},ThrowInvalidOperationException_OutstandingReferences:function(){System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.Memory_OutstandingReferences)},ThrowSerializationException:function(e){throw new System.Runtime.Serialization.SerializationException.$ctor1(System.ThrowHelper.GetResourceString(e))},ThrowSecurityException:function(e){throw new System.Security.SecurityException.$ctor1(System.ThrowHelper.GetResourceString(e))},ThrowRankException:function(e){throw new System.RankException.$ctor1(System.ThrowHelper.GetResourceString(e))},ThrowNotSupportedException$1:function(e){throw new System.NotSupportedException.$ctor1(System.ThrowHelper.GetResourceString(e))},ThrowNotSupportedException:function(){throw new System.NotSupportedException.ctor},ThrowUnauthorizedAccessException:function(e){throw new System.UnauthorizedAccessException.$ctor1(System.ThrowHelper.GetResourceString(e))},ThrowObjectDisposedException$1:function(e,t){throw new System.ObjectDisposedException.$ctor3(e,System.ThrowHelper.GetResourceString(t))},ThrowObjectDisposedException:function(e){throw new System.ObjectDisposedException.$ctor3(null,System.ThrowHelper.GetResourceString(e))},ThrowObjectDisposedException_MemoryDisposed:function(){throw new System.ObjectDisposedException.$ctor3("OwnedMemory<T>",System.ThrowHelper.GetResourceString(System.ExceptionResource.MemoryDisposed))},ThrowAggregateException:function(e){throw new System.AggregateException(null,e)},ThrowOutOfMemoryException:function(){throw new System.OutOfMemoryException.ctor},ThrowArgumentException_Argument_InvalidArrayType:function(){throw System.ThrowHelper.GetArgumentException(System.ExceptionResource.Argument_InvalidArrayType)},ThrowInvalidOperationException_InvalidOperation_EnumNotStarted:function(){throw System.ThrowHelper.GetInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumNotStarted)},ThrowInvalidOperationException_InvalidOperation_EnumEnded:function(){throw System.ThrowHelper.GetInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumEnded)},ThrowInvalidOperationException_EnumCurrent:function(e){throw System.ThrowHelper.GetInvalidOperationException_EnumCurrent(e)},ThrowInvalidOperationException_InvalidOperation_EnumFailedVersion:function(){throw System.ThrowHelper.GetInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumFailedVersion)},ThrowInvalidOperationException_InvalidOperation_EnumOpCantHappen:function(){throw System.ThrowHelper.GetInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumOpCantHappen)},ThrowInvalidOperationException_InvalidOperation_NoValue:function(){throw System.ThrowHelper.GetInvalidOperationException(System.ExceptionResource.InvalidOperation_NoValue)},ThrowArraySegmentCtorValidationFailedExceptions:function(e,t,i){throw System.ThrowHelper.GetArraySegmentCtorValidationFailedException(e,t,i)},GetArraySegmentCtorValidationFailedException:function(e,t,i){return e==null?System.ThrowHelper.GetArgumentNullException(System.ExceptionArgument.array):t<0?System.ThrowHelper.GetArgumentOutOfRangeException(System.ExceptionArgument.offset,System.ExceptionResource.ArgumentOutOfRange_NeedNonNegNum):i<0?System.ThrowHelper.GetArgumentOutOfRangeException(System.ExceptionArgument.count,System.ExceptionResource.ArgumentOutOfRange_NeedNonNegNum):System.ThrowHelper.GetArgumentException(System.ExceptionResource.Argument_InvalidOffLen)},GetArgumentException:function(e){return new System.ArgumentException.$ctor1(System.ThrowHelper.GetResourceString(e))},GetArgumentException$1:function(e,t){return new System.ArgumentException.$ctor3(System.ThrowHelper.GetResourceString(e),System.ThrowHelper.GetArgumentName(t))},GetInvalidOperationException:function(e){return new System.InvalidOperationException.$ctor1(System.ThrowHelper.GetResourceString(e))},GetWrongKeyTypeArgumentException:function(e,t){return new System.ArgumentException.$ctor3(System.SR.Format$1('The value "{0}" is not of type "{1}" and cannot be used in this generic collection.',e,t),"key")},GetWrongValueTypeArgumentException:function(e,t){return new System.ArgumentException.$ctor3(System.SR.Format$1('The value "{0}" is not of type "{1}" and cannot be used in this generic collection.',e,t),"value")},GetKeyNotFoundException:function(e){return new System.Collections.Generic.KeyNotFoundException.$ctor1(System.SR.Format("The given key '{0}' was not present in the dictionary.",Bridge.toString(e)))},GetArgumentOutOfRangeException:function(e,t){return new System.ArgumentOutOfRangeException.$ctor4(System.ThrowHelper.GetArgumentName(e),System.ThrowHelper.GetResourceString(t))},GetArgumentOutOfRangeException$1:function(e,t,i){return new System.ArgumentOutOfRangeException.$ctor4((System.ThrowHelper.GetArgumentName(e)||"")+"["+(Bridge.toString(t)||"")+"]",System.ThrowHelper.GetResourceString(i))},GetInvalidOperationException_EnumCurrent:function(e){return System.ThrowHelper.GetInvalidOperationException(e<0?System.ExceptionResource.InvalidOperation_EnumNotStarted:System.ExceptionResource.InvalidOperation_EnumEnded)},IfNullAndNullsAreIllegalThenThrow:function(e,t,i){Bridge.getDefaultValue(e)==null||t!=null||System.ThrowHelper.ThrowArgumentNullException(i)},GetArgumentName:function(e){return System.Enum.toString(System.ExceptionArgument,e)},GetResourceString:function(e){return System.SR.GetResourceString(System.Enum.toString(System.ExceptionResource,e))},ThrowNotSupportedExceptionIfNonNumericType:function(e){if(!Bridge.referenceEquals(e,System.Byte)&&!Bridge.referenceEquals(e,System.SByte)&&!Bridge.referenceEquals(e,System.Int16)&&!Bridge.referenceEquals(e,System.UInt16)&&!Bridge.referenceEquals(e,System.Int32)&&!Bridge.referenceEquals(e,System.UInt32)&&!Bridge.referenceEquals(e,System.Int64)&&!Bridge.referenceEquals(e,System.UInt64)&&!Bridge.referenceEquals(e,System.Single)&&!Bridge.referenceEquals(e,System.Double))throw new System.NotSupportedException.$ctor1("Specified type is not supported")}}}}),Bridge.define("System.TimeoutException",{inherits:[System.SystemException],ctors:{ctor:function(){this.$initialize(),System.SystemException.$ctor1.call(this,"The operation has timed out."),this.HResult=-2146233083},$ctor1:function(e){this.$initialize(),System.SystemException.$ctor1.call(this,e),this.HResult=-2146233083},$ctor2:function(e,t){this.$initialize(),System.SystemException.$ctor2.call(this,e,t),this.HResult=-2146233083}}}),Bridge.define("System.RegexMatchTimeoutException",{inherits:[System.TimeoutException],_regexInput:"",_regexPattern:"",_matchTimeout:null,config:{init:function(){this._matchTimeout=System.TimeSpan.fromTicks(-1)}},ctor:function(e,t,i){this.$initialize(),arguments.length==3&&(this._regexInput=e,this._regexPattern=t,this._matchTimeout=i,e="The RegEx engine has timed out while trying to match a pattern to an input string. This can occur for many reasons, including very large inputs or excessive backtracking caused by nested quantifiers, back-references and other factors.",t=null),System.TimeoutException.ctor.call(this,e,t)},getPattern:function(){return this._regexPattern},getInput:function(){return this._regexInput},getMatchTimeout:function(){return this._matchTimeout}}),Bridge.define("System.Text.Encoding",{statics:{fields:{_encodings:null},props:{Default:null,Unicode:null,ASCII:null,BigEndianUnicode:null,UTF7:null,UTF8:null,UTF32:null},ctors:{init:function(){this.Default=new System.Text.UnicodeEncoding.$ctor1(!1,!0),this.Unicode=new System.Text.UnicodeEncoding.$ctor1(!1,!0),this.ASCII=new System.Text.ASCIIEncoding,this.BigEndianUnicode=new System.Text.UnicodeEncoding.$ctor1(!0,!0),this.UTF7=new System.Text.UTF7Encoding.ctor,this.UTF8=new System.Text.UTF8Encoding.ctor,this.UTF32=new System.Text.UTF32Encoding.$ctor1(!1,!0)}},methods:{Convert:function(e,t,i){return System.Text.Encoding.Convert$1(e,t,i,0,i.length)},Convert$1:function(e,t,i,r,n){if(e==null||t==null)throw new System.ArgumentNullException.$ctor1(e==null?"srcEncoding":"dstEncoding");if(i==null)throw new System.ArgumentNullException.$ctor1("bytes");return t.GetBytes(e.GetChars$1(i,r,n))},GetEncoding:function(e){switch(e){case 1200:return System.Text.Encoding.Unicode;case 20127:return System.Text.Encoding.ASCII;case 1201:return System.Text.Encoding.BigEndianUnicode;case 65e3:return System.Text.Encoding.UTF7;case 65001:return System.Text.Encoding.UTF8;case 12e3:return System.Text.Encoding.UTF32}throw new System.NotSupportedException.ctor},GetEncoding$1:function(e){switch(e){case"utf-16":return System.Text.Encoding.Unicode;case"us-ascii":return System.Text.Encoding.ASCII;case"utf-16BE":return System.Text.Encoding.BigEndianUnicode;case"utf-7":return System.Text.Encoding.UTF7;case"utf-8":return System.Text.Encoding.UTF8;case"utf-32":return System.Text.Encoding.UTF32}throw new System.NotSupportedException.ctor},GetEncodings:function(){if(System.Text.Encoding._encodings!=null)return System.Text.Encoding._encodings;System.Text.Encoding._encodings=System.Array.init(6,null,System.Text.EncodingInfo);var e=System.Text.Encoding._encodings;return e[System.Array.index(0,e)]=new System.Text.EncodingInfo(20127,"us-ascii","US-ASCII"),e[System.Array.index(1,e)]=new System.Text.EncodingInfo(1200,"utf-16","Unicode"),e[System.Array.index(2,e)]=new System.Text.EncodingInfo(1201,"utf-16BE","Unicode (Big-Endian)"),e[System.Array.index(3,e)]=new System.Text.EncodingInfo(65e3,"utf-7","Unicode (UTF-7)"),e[System.Array.index(4,e)]=new System.Text.EncodingInfo(65001,"utf-8","Unicode (UTF-8)"),e[System.Array.index(5,e)]=new System.Text.EncodingInfo(1200,"utf-32","Unicode (UTF-32)"),e}}},fields:{_hasError:!1,fallbackCharacter:0},props:{CodePage:{get:function(){return 0}},EncodingName:{get:function(){return null}}},ctors:{init:function(){this.fallbackCharacter=63}},methods:{Encode$1:function(e,t,i){var r={};return this.Encode$3(System.String.fromCharArray(e,t,i),null,0,r)},Encode$5:function(e,t,i,r,n){var s={};return this.Encode$3(e.substr(t,i),r,n,s),s.v},Encode$4:function(e,t,i,r,n){var s={};return this.Encode$3(System.String.fromCharArray(e,t,i),r,n,s),s.v},Encode:function(e){var t={};return this.Encode$3(System.String.fromCharArray(e),null,0,t)},Encode$2:function(e){var t={};return this.Encode$3(e,null,0,t)},Decode$1:function(e,t,i){return this.Decode$2(e,t,i,null,0)},Decode:function(e){return this.Decode$2(e,0,e.length,null,0)},GetByteCount:function(e){return this.GetByteCount$1(e,0,e.length)},GetByteCount$2:function(e){return this.Encode$2(e).length},GetByteCount$1:function(e,t,i){return this.Encode$1(e,t,i).length},GetBytes:function(e){return this.GetBytes$1(e,0,e.length)},GetBytes$1:function(e,t,i){return this.Encode$2(System.String.fromCharArray(e,t,i))},GetBytes$3:function(e,t,i,r,n){return this.Encode$4(e,t,i,r,n)},GetBytes$2:function(e){return this.Encode$2(e)},GetBytes$4:function(e,t,i,r,n){return this.Encode$5(e,t,i,r,n)},GetCharCount:function(e){return this.Decode(e).length},GetCharCount$1:function(e,t,i){return this.Decode$1(e,t,i).length},GetChars:function(e){var t;return t=this.Decode(e),System.String.toCharArray(t,0,t.length)},GetChars$1:function(e,t,i){var r;return r=this.Decode$1(e,t,i),System.String.toCharArray(r,0,r.length)},GetChars$2:function(e,t,i,r,n){var s=this.Decode$1(e,t,i),o=System.String.toCharArray(s,0,s.length),a;if(r.length<(o.length+n|0))throw new System.ArgumentException.$ctor3(null,"chars");for(a=0;a<o.length;a=a+1|0)r[System.Array.index(n+a|0,r)]=o[System.Array.index(a,o)];return o.length},GetString:function(e){return this.Decode(e)},GetString$1:function(e,t,i){return this.Decode$1(e,t,i)}}}),Bridge.define("System.Text.ASCIIEncoding",{inherits:[System.Text.Encoding],props:{CodePage:{get:function(){return 20127}},EncodingName:{get:function(){return"US-ASCII"}}},methods:{Encode$3:function(e,t,i,r){var n=t!=null,s,o,a,l;for(n||(t=System.Array.init(0,0,System.Byte)),s=0,o=0;o<e.length;o=o+1|0){if(a=e.charCodeAt(o),l=(a<=127?a:this.fallbackCharacter)&255,n){if((o+i|0)>=t.length)throw new System.ArgumentException.$ctor1("bytes");t[System.Array.index(o+i|0,t)]=l}else t.push(l);s=s+1|0}return r.v=s,n?null:t},Decode$2:function(e,t,i,r,n){for(var s=t,o="",a=s+i|0,l;s<a;s=s+1|0)l=e[System.Array.index(s,e)],o=l>127?(o||"")+String.fromCharCode(this.fallbackCharacter):(o||"")+(String.fromCharCode(l)||"");return o},GetMaxByteCount:function(e){if(e<0)throw new System.ArgumentOutOfRangeException.$ctor1("charCount");var t=System.Int64(e).add(System.Int64(1));if(t.gt(System.Int64(2147483647)))throw new System.ArgumentOutOfRangeException.$ctor1("charCount");return System.Int64.clip32(t)},GetMaxCharCount:function(e){if(e<0)throw new System.ArgumentOutOfRangeException.$ctor1("byteCount");var t=System.Int64(e);if(t.gt(System.Int64(2147483647)))throw new System.ArgumentOutOfRangeException.$ctor1("byteCount");return System.Int64.clip32(t)}}}),Bridge.define("System.Text.EncodingInfo",{props:{CodePage:0,Name:null,DisplayName:null},ctors:{ctor:function(e,t,i){var r;this.$initialize(),this.CodePage=e,this.Name=t,this.DisplayName=(r=i,r??t)}},methods:{GetEncoding:function(){return System.Text.Encoding.GetEncoding(this.CodePage)},getHashCode:function(){return this.CodePage},equals:function(e){var t=Bridge.as(e,System.Text.EncodingInfo);return System.Nullable.eq(this.CodePage,t!=null?t.CodePage:null)}}}),Bridge.define("System.Text.UnicodeEncoding",{inherits:[System.Text.Encoding],fields:{bigEndian:!1,byteOrderMark:!1,throwOnInvalid:!1},props:{CodePage:{get:function(){return this.bigEndian?1201:1200}},EncodingName:{get:function(){return this.bigEndian?"Unicode (Big-Endian)":"Unicode"}}},ctors:{ctor:function(){System.Text.UnicodeEncoding.$ctor1.call(this,!1,!0)},$ctor1:function(e,t){System.Text.UnicodeEncoding.$ctor2.call(this,e,t,!1)},$ctor2:function(e,t,i){this.$initialize(),System.Text.Encoding.ctor.call(this),this.bigEndian=e,this.byteOrderMark=t,this.throwOnInvalid=i,this.fallbackCharacter=65533}},methods:{Encode$3:function(e,t,i,r){var n=t!=null,s=0,o=0,a=this.fallbackCharacter,l=function(k){if(n){if(i>=t.length)throw new System.ArgumentException.$ctor1("bytes");t[System.Array.index(Bridge.identity(i,i=i+1|0),t)]=k}else t.push(k);s=s+1|0},u=function(k,O){l(k),l(O)},d=de.$.System.Text.UnicodeEncoding.f1,f=Bridge.fn.bind(this,function(){if(this.throwOnInvalid)throw new System.Exception("Invalid character in UTF16 text");u(a&255,a>>8&255)}),C,E,T,w;for(n||(t=System.Array.init(0,0,System.Byte)),this.bigEndian&&(a=d(a)),C=0;C<e.length;C=C+1|0){if(E=e.charCodeAt(C),o!==0){if(E>=56320&&E<=57343){this.bigEndian&&(o=d(o),E=d(E)),u(o&255,o>>8&255),u(E&255,E>>8&255),o=0;continue}f(),o=0}if(55296<=E&&E<=56319){o=E;continue}else if(56320<=E&&E<=57343){f(),o=0;continue}E<65536?(this.bigEndian&&(E=d(E)),u(E&255,E>>8&255)):E<=1114111?(E=E-65536,T=(E&1023|56320)&65535,w=(E>>10&1023|55296)&65535,this.bigEndian&&(w=d(w),T=d(T)),u(w&255,w>>8&255),u(T&255,T>>8&255)):f()}return o!==0&&f(),r.v=s,n?null:t},Decode$2:function(e,t,i,r,n){var s=t,o="",a=s+i|0,l,u,d;this._hasError=!1;for(var f=Bridge.fn.bind(this,function(){if(this.throwOnInvalid)throw new System.Exception("Invalid character in UTF16 text");o=(o||"")+String.fromCharCode(this.fallbackCharacter)}),C=de.$.System.Text.UnicodeEncoding.f2,E=Bridge.fn.bind(this,function(){if((s+2|0)>a)return s=s+2|0,null;var O=e[System.Array.index(Bridge.identity(s,s=s+1|0),e)],M=e[System.Array.index(Bridge.identity(s,s=s+1|0),e)],P=(O<<8|M)&65535;return this.bigEndian||(P=C(P)),P});s<a;)if(l=E(),System.Nullable.hasValue(l))if(System.Nullable.lt(l,55296)||System.Nullable.gt(l,57343))o=(o||"")+(System.String.fromCharCode(System.Nullable.getValue(l))||"");else if(System.Nullable.gte(l,55296)&&System.Nullable.lte(l,56319))if(u=s>=a,d=E(),u)f(),this._hasError=!0;else if(System.Nullable.hasValue(d))if(System.Nullable.gte(d,56320)&&System.Nullable.lte(d,57343)){var T=System.Nullable.band(l,1023),w=System.Nullable.band(d,1023),k=Bridge.Int.clip32(System.Nullable.add(System.Nullable.bor(System.Nullable.sl(T,10),w),65536));o=(o||"")+(System.String.fromCharCode(System.Nullable.getValue(k))||"")}else f(),s=s-2|0;else f(),f();else f();else f(),this._hasError=!0;return o},GetMaxByteCount:function(e){if(e<0)throw new System.ArgumentOutOfRangeException.$ctor1("charCount");var t=System.Int64(e).add(System.Int64(1));if(t=t.shl(1),t.gt(System.Int64(2147483647)))throw new System.ArgumentOutOfRangeException.$ctor1("charCount");return System.Int64.clip32(t)},GetMaxCharCount:function(e){if(e<0)throw new System.ArgumentOutOfRangeException.$ctor1("byteCount");var t=System.Int64(e>>1).add(System.Int64(e&1)).add(System.Int64(1));if(t.gt(System.Int64(2147483647)))throw new System.ArgumentOutOfRangeException.$ctor1("byteCount");return System.Int64.clip32(t)}}}),Bridge.ns("System.Text.UnicodeEncoding",de.$),Bridge.apply(de.$.System.Text.UnicodeEncoding,{f1:function(e){return((e&255)<<8|e>>8&255)&65535},f2:function(e){return((e&255)<<8|e>>8&255)&65535}}),Bridge.define("System.Text.UTF32Encoding",{inherits:[System.Text.Encoding],fields:{bigEndian:!1,byteOrderMark:!1,throwOnInvalid:!1},props:{CodePage:{get:function(){return this.bigEndian?1201:1200}},EncodingName:{get:function(){return this.bigEndian?"Unicode (UTF-32 Big-Endian)":"Unicode (UTF-32)"}}},ctors:{ctor:function(){System.Text.UTF32Encoding.$ctor2.call(this,!1,!0,!1)},$ctor1:function(e,t){System.Text.UTF32Encoding.$ctor2.call(this,e,t,!1)},$ctor2:function(e,t,i){this.$initialize(),System.Text.Encoding.ctor.call(this),this.bigEndian=e,this.byteOrderMark=t,this.throwOnInvalid=i,this.fallbackCharacter=65533}},methods:{ToCodePoints:function(e){for(var t,i,r,n=0,s=System.Array.init(0,0,System.Char),o=Bridge.fn.bind(this,function(){if(this.throwOnInvalid)throw new System.Exception("Invalid character in UTF32 text");s.push(this.fallbackCharacter)}),a=0;a<e.length;a=a+1|0)t=e.charCodeAt(a),n!==0?(t>=56320&&t<=57343?(i=t,r=(Bridge.Int.mul(n-55296|0,1024)+65536|0)+(i-56320|0)|0,s.push(r)):(o(),a=a-1|0),n=0):t>=55296&&t<=56319?n=t:t>=56320&&t<=57343?o():s.push(t);return n!==0&&o(),s},Encode$3:function(e,t,i,r){var n=t!=null,s=0,o=function(d){if(n){if(i>=t.length)throw new System.ArgumentException.$ctor1("bytes");t[System.Array.index(Bridge.identity(i,i=i+1|0),t)]=d}else t.push(d);s=s+1|0},a=Bridge.fn.bind(this,function(d){var f=System.Array.init(4,0,System.Byte);f[System.Array.index(0,f)]=(d&255)>>>0,f[System.Array.index(1,f)]=(d&65280)>>>0>>>8,f[System.Array.index(2,f)]=(d&16711680)>>>0>>>16,f[System.Array.index(3,f)]=(d&4278190080)>>>0>>>24,this.bigEndian&&f.reverse(),o(f[System.Array.index(0,f)]),o(f[System.Array.index(1,f)]),o(f[System.Array.index(2,f)]),o(f[System.Array.index(3,f)])}),l,u;for(n||(t=System.Array.init(0,0,System.Byte)),l=this.ToCodePoints(e),u=0;u<l.length;u=u+1|0)a(l[System.Array.index(u,l)]);return r.v=s,n?null:t},Decode$2:function(e,t,i,r,n){var s=t,o="",a=s+i|0,l,u,d;for(this._hasError=!1,l=Bridge.fn.bind(this,function(){if(this.throwOnInvalid)throw new System.Exception("Invalid character in UTF32 text");o=(o||"")+(String.fromCharCode(this.fallbackCharacter)||"")}),u=Bridge.fn.bind(this,function(){var f;if((s+4|0)>a)return s=s+4|0,null;var C=e[System.Array.index(Bridge.identity(s,s=s+1|0),e)],E=e[System.Array.index(Bridge.identity(s,s=s+1|0),e)],T=e[System.Array.index(Bridge.identity(s,s=s+1|0),e)],w=e[System.Array.index(Bridge.identity(s,s=s+1|0),e)];return this.bigEndian&&(f=E,E=T,T=f,f=C,C=w,w=f),w<<24|T<<16|E<<8|C});s<a;){if(d=u(),d==null){l(),this._hasError=!0;continue}System.Nullable.lt(d,65536)||System.Nullable.gt(d,1114111)?System.Nullable.lt(d,0)||System.Nullable.gt(d,1114111)||System.Nullable.gte(d,55296)&&System.Nullable.lte(d,57343)?l():o=(o||"")+(String.fromCharCode(d)||""):(o=(o||"")+(String.fromCharCode(Bridge.Int.clipu32(System.Nullable.add(Bridge.Int.clipu32(Bridge.Int.div(Bridge.Int.clipu32(System.Nullable.sub(d,65536)),1024)),55296)))||""),o=(o||"")+(String.fromCharCode(Bridge.Int.clipu32(System.Nullable.add(System.Nullable.mod(d,1024),56320)))||""))}return o},GetMaxByteCount:function(e){if(e<0)throw new System.ArgumentOutOfRangeException.$ctor1("charCount");var t=System.Int64(e).add(System.Int64(1));if(t=t.mul(System.Int64(4)),t.gt(System.Int64(2147483647)))throw new System.ArgumentOutOfRangeException.$ctor1("charCount");return System.Int64.clip32(t)},GetMaxCharCount:function(e){if(e<0)throw new System.ArgumentOutOfRangeException.$ctor1("byteCount");var t=(Bridge.Int.div(e,2)|0)+2|0;if(t>2147483647)throw new System.ArgumentOutOfRangeException.$ctor1("byteCount");return t}}}),Bridge.define("System.Text.UTF7Encoding",{inherits:[System.Text.Encoding],statics:{methods:{Escape:function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}}},fields:{allowOptionals:!1},props:{CodePage:{get:function(){return 65e3}},EncodingName:{get:function(){return"Unicode (UTF-7)"}}},ctors:{ctor:function(){System.Text.UTF7Encoding.$ctor1.call(this,!1)},$ctor1:function(e){this.$initialize(),System.Text.Encoding.ctor.call(this),this.allowOptionals=e,this.fallbackCharacter=65533}},methods:{Encode$3:function(e,t,i,r){var n="A-Za-z0-9"+(System.Text.UTF7Encoding.Escape("'(),-./:?")||""),s=de.$.System.Text.UTF7Encoding.f1,o=System.Text.UTF7Encoding.Escape('!"#$%&*;<=>@[]^_`{|}'),a=System.Text.UTF7Encoding.Escape(` \r `),l,u,d;if(e=e.replace(new RegExp("[^"+a+n+(this.allowOptionals?o:"")+"]+","g"),function(f){return"+"+(f==="+"?"":s(f))+"-"}),l=System.String.toCharArray(e,0,e.length),t!=null){if(u=0,l.length>(t.length-i|0))throw new System.ArgumentException.$ctor1("bytes");for(d=0;d<l.length;d=d+1|0)t[System.Array.index(d+i|0,t)]=l[System.Array.index(d,l)],u=u+1|0;return r.v=u,null}return r.v=l.length,l},Decode$2:function(e,t,i,r,n){var s=de.$.System.Text.UTF7Encoding.f2,o=function(l){for(var u=s(l),d=System.Array.init(0,0,System.Char),f=0;f<u.length;)d.push((u[System.Array.index(Bridge.identity(f,f=f+1|0),u)]<<8|u[System.Array.index(Bridge.identity(f,f=f+1|0),u)])&65535);return System.String.fromCharArray(d)},a=System.String.fromCharArray(e,t,i);return a.replace(/\+([A-Za-z0-9\/]*)-?/gi,function(l,u){return u===""?l=="+-"?"+":"":o(u)})},GetMaxByteCount:function(e){if(e<0)throw new System.ArgumentOutOfRangeException.$ctor1("charCount");var t=System.Int64(e).mul(System.Int64(3)).add(System.Int64(2));if(t.gt(System.Int64(2147483647)))throw new System.ArgumentOutOfRangeException.$ctor1("charCount");return System.Int64.clip32(t)},GetMaxCharCount:function(e){if(e<0)throw new System.ArgumentOutOfRangeException.$ctor1("byteCount");var t=e;return t===0&&(t=1),t|0}}}),Bridge.ns("System.Text.UTF7Encoding",de.$),Bridge.apply(de.$.System.Text.UTF7Encoding,{f1:function(e){for(var t,i,r=System.Array.init(Bridge.Int.mul(e.length,2),0,System.Byte),n=0,s=0;s<e.length;s=s+1|0)t=e.charCodeAt(s),r[System.Array.index(Bridge.identity(n,n=n+1|0),r)]=t>>8,r[System.Array.index(Bridge.identity(n,n=n+1|0),r)]=t&255;return i=System.Convert.toBase64String(r,null,null,null),i.replace(/=+$/,"")},f2:function(e){var t;try{if(typeof window>"u")throw new System.Exception;var i=window.atob(e),r=i.length,n=System.Array.init(r,0,System.Char);if(r===1&&i.charCodeAt(0)===0)return System.Array.init(0,0,System.Char);for(t=0;t<r;t=t+1|0)n[System.Array.index(t,n)]=i.charCodeAt(t);return n}catch(s){return s=System.Exception.create(s),System.Array.init(0,0,System.Char)}}}),Bridge.define("System.Text.UTF8Encoding",{inherits:[System.Text.Encoding],fields:{encoderShouldEmitUTF8Identifier:!1,throwOnInvalid:!1},props:{CodePage:{get:function(){return 65001}},EncodingName:{get:function(){return"Unicode (UTF-8)"}}},ctors:{ctor:function(){System.Text.UTF8Encoding.$ctor1.call(this,!1)},$ctor1:function(e){System.Text.UTF8Encoding.$ctor2.call(this,e,!1)},$ctor2:function(e,t){this.$initialize(),System.Text.Encoding.ctor.call(this),this.encoderShouldEmitUTF8Identifier=e,this.throwOnInvalid=t,this.fallbackCharacter=65533}},methods:{Encode$3:function(e,t,i,r){var n=t!=null,s=0,o=function(C){for(var E,T=C.length,w=0;w<T;w=w+1|0){if(E=C[System.Array.index(w,C)],n){if(i>=t.length)throw new System.ArgumentException.$ctor1("bytes");t[System.Array.index(Bridge.identity(i,i=i+1|0),t)]=E}else t.push(E);s=s+1|0}},a=Bridge.fn.bind(this,de.$.System.Text.UTF8Encoding.f1),l,u,d,f;for(n||(t=System.Array.init(0,0,System.Byte)),l=0;l<e.length;l=l+1|0)u=e.charCodeAt(l),u>=55296&&u<=56319?(d=e.charCodeAt(l+1|0),d>=56320&&d<=57343||(u=a())):u>=56320&&u<=57343&&(u=a()),u<128?o(System.Array.init([u],System.Byte)):u<2048?o(System.Array.init([192|u>>6,128|u&63],System.Byte)):u<55296||u>=57344?o(System.Array.init([224|u>>12,128|u>>6&63,128|u&63],System.Byte)):(l=l+1|0,f=65536+((u&1023)<<10|e.charCodeAt(l)&1023)|0,o(System.Array.init([240|f>>18,128|f>>12&63,128|f>>6&63,128|f&63],System.Byte)));return r.v=s,n?null:t},Decode$2:function(e,t,i,r,n){var s,o;this._hasError=!1;for(var a=t,l="",u=0,d=!1,f=a+i|0;a<f;a=a+1|0){var C=0,E=0,T=!1,w=e[System.Array.index(a,e)];for(w<=127?C=w:w&64?(w&224)==192?(C=w&31,E=1):(w&240)==224?(C=w&15,E=2):(w&248)==240?(C=w&7,E=3):(w&252)==248?(C=w&3,E=4,T=!0):(w&254)==252?(C=w&3,E=5,T=!0):(C=w,T=!1):T=!0;E>0;){if(a=a+1|0,a>=f){T=!0;break}if(s=e[System.Array.index(a,e)],E=E-1|0,(s&192)!=128){a=a-1|0,T=!0;break}C=C<<6|s&63}if(o=null,d=!1,T||(u>0&&!(C>=56320&&C<=57343)?(T=!0,u=0):C>=55296&&C<=56319?u=C&65535:C>=56320&&C<=57343?(T=!0,d=!0,u=0):(o=System.String.fromCharCode(C),u=0)),T){if(this.throwOnInvalid)throw new System.Exception("Invalid character in UTF8 text");l=(l||"")+String.fromCharCode(this.fallbackCharacter),this._hasError=!0}else u===0&&(l=(l||"")+(o||""))}if(u>0||d){if(this.throwOnInvalid)throw new System.Exception("Invalid character in UTF8 text");l=l.length>0&&l.charCodeAt(l.length-1|0)===this.fallbackCharacter?(l||"")+String.fromCharCode(this.fallbackCharacter):(l||"")+(this.fallbackCharacter+this.fallbackCharacter|0),this._hasError=!0}return l},GetMaxByteCount:function(e){if(e<0)throw new System.ArgumentOutOfRangeException.$ctor1("charCount");var t=System.Int64(e).add(System.Int64(1));if(t=t.mul(System.Int64(3)),t.gt(System.Int64(2147483647)))throw new System.ArgumentOutOfRangeException.$ctor1("charCount");return System.Int64.clip32(t)},GetMaxCharCount:function(e){if(e<0)throw new System.ArgumentOutOfRangeException.$ctor1("byteCount");var t=System.Int64(e).add(System.Int64(1));if(t.gt(System.Int64(2147483647)))throw new System.ArgumentOutOfRangeException.$ctor1("byteCount");return System.Int64.clip32(t)}}}),Bridge.ns("System.Text.UTF8Encoding",de.$),Bridge.apply(de.$.System.Text.UTF8Encoding,{f1:function(){if(this.throwOnInvalid)throw new System.Exception("Invalid character in UTF8 text");return this.fallbackCharacter}}),Bridge.define("System.Threading.Timer",{inherits:[System.IDisposable],statics:{fields:{MAX_SUPPORTED_TIMEOUT:0,EXC_LESS:null,EXC_MORE:null,EXC_DISPOSED:null},ctors:{init:function(){this.MAX_SUPPORTED_TIMEOUT=4294967294,this.EXC_LESS="Number must be either non-negative and less than or equal to Int32.MaxValue or -1.",this.EXC_MORE="Time-out interval must be less than 2^32-2.",this.EXC_DISPOSED="The timer has been already disposed."}}},fields:{dueTime:System.Int64(0),period:System.Int64(0),timerCallback:null,state:null,id:null,disposed:!1},alias:["Dispose","System$IDisposable$Dispose"],ctors:{$ctor1:function(e,t,i,r){this.$initialize(),this.TimerSetup(e,t,System.Int64(i),System.Int64(r))},$ctor3:function(e,t,i,r){this.$initialize();var n=Bridge.Int.clip64(i.getTotalMilliseconds()),s=Bridge.Int.clip64(r.getTotalMilliseconds());this.TimerSetup(e,t,n,s)},$ctor4:function(e,t,i,r){this.$initialize(),this.TimerSetup(e,t,System.Int64(i),System.Int64(r))},$ctor2:function(e,t,i,r){this.$initialize(),this.TimerSetup(e,t,i,r)},ctor:function(e){this.$initialize();var t=-1,i=-1;this.TimerSetup(e,this,System.Int64(t),System.Int64(i))}},methods:{TimerSetup:function(e,t,i,r){if(this.disposed)throw new System.InvalidOperationException.$ctor1(System.Threading.Timer.EXC_DISPOSED);if(Bridge.staticEquals(e,null))throw new System.ArgumentNullException.$ctor1("TimerCallback");if(i.lt(System.Int64(-1)))throw new System.ArgumentOutOfRangeException.$ctor4("dueTime",System.Threading.Timer.EXC_LESS);if(r.lt(System.Int64(-1)))throw new System.ArgumentOutOfRangeException.$ctor4("period",System.Threading.Timer.EXC_LESS);if(i.gt(System.Int64(System.Threading.Timer.MAX_SUPPORTED_TIMEOUT)))throw new System.ArgumentOutOfRangeException.$ctor4("dueTime",System.Threading.Timer.EXC_MORE);if(r.gt(System.Int64(System.Threading.Timer.MAX_SUPPORTED_TIMEOUT)))throw new System.ArgumentOutOfRangeException.$ctor4("period",System.Threading.Timer.EXC_MORE);return this.dueTime=i,this.period=r,this.state=t,this.timerCallback=e,this.RunTimer(this.dueTime)},HandleCallback:function(){if(!this.disposed&&!Bridge.staticEquals(this.timerCallback,null)){var e=this.id;this.timerCallback(this.state),System.Nullable.eq(this.id,e)&&this.RunTimer(this.period,!1)}},RunTimer:function(e,t){if(t===void 0&&(t=!0),t&&this.disposed)throw new System.InvalidOperationException.$ctor1(System.Threading.Timer.EXC_DISPOSED);if(e.ne(System.Int64(-1))&&!this.disposed){var i=e.toNumber();return this.id=Bridge.global.setTimeout(Bridge.fn.cacheBind(this,this.HandleCallback),i),!0}return!1},Change:function(e,t){return this.ChangeTimer(System.Int64(e),System.Int64(t))},Change$2:function(e,t){return this.ChangeTimer(Bridge.Int.clip64(e.getTotalMilliseconds()),Bridge.Int.clip64(t.getTotalMilliseconds()))},Change$3:function(e,t){return this.ChangeTimer(System.Int64(e),System.Int64(t))},Change$1:function(e,t){return this.ChangeTimer(e,t)},ChangeTimer:function(e,t){return this.ClearTimeout(),this.TimerSetup(this.timerCallback,this.state,e,t)},ClearTimeout:function(){System.Nullable.hasValue(this.id)&&(Bridge.global.clearTimeout(System.Nullable.getValue(this.id)),this.id=null)},Dispose:function(){this.ClearTimeout(),this.disposed=!0}}}),Bridge.define("System.Threading.Tasks.TaskCanceledException",{inherits:[System.OperationCanceledException],fields:{_canceledTask:null},props:{Task:{get:function(){return this._canceledTask}}},ctors:{ctor:function(){this.$initialize(),System.OperationCanceledException.$ctor1.call(this,"A task was canceled.")},$ctor1:function(e){this.$initialize(),System.OperationCanceledException.$ctor1.call(this,e)},$ctor2:function(e,t){this.$initialize(),System.OperationCanceledException.$ctor2.call(this,e,t)},$ctor3:function(e){this.$initialize(),System.OperationCanceledException.$ctor4.call(this,"A task was canceled.",e!=null?new System.Threading.CancellationToken:new System.Threading.CancellationToken),this._canceledTask=e}}}),Bridge.define("System.Threading.Tasks.TaskSchedulerException",{inherits:[System.Exception],ctors:{ctor:function(){this.$initialize(),System.Exception.ctor.call(this,"An exception was thrown by a TaskScheduler.")},$ctor2:function(e){this.$initialize(),System.Exception.ctor.call(this,e)},$ctor1:function(e){this.$initialize(),System.Exception.ctor.call(this,"An exception was thrown by a TaskScheduler.",e)},$ctor3:function(e,t){this.$initialize(),System.Exception.ctor.call(this,e,t)}}}),Bridge.define("System.Version",{inherits:function(){return[System.ICloneable,System.IComparable$1(System.Version),System.IEquatable$1(System.Version)]},statics:{fields:{ZERO_CHAR_VALUE:0,separatorsArray:0},ctors:{init:function(){this.ZERO_CHAR_VALUE=48,this.separatorsArray=46}},methods:{appendPositiveNumber:function(e,t){var i=t.getLength(),r;do r=e%10,e=Bridge.Int.div(e,10)|0,t.insert(i,String.fromCharCode((System.Version.ZERO_CHAR_VALUE+r|0)&65535));while(e>0)},parse:function(e){if(e==null)throw new System.ArgumentNullException.$ctor1("input");var t={v:new System.Version.VersionResult};if(t.v.init("input",!0),!System.Version.tryParseVersion(e,t))throw t.v.getVersionParseException();return t.v.m_parsedVersion},tryParse:function(e,t){var i={v:new System.Version.VersionResult},r;return i.v.init("input",!1),r=System.Version.tryParseVersion(e,i),t.v=i.v.m_parsedVersion,r},tryParseVersion:function(e,t){var i={},r={},n={},s={},o,a;if(e==null)return t.v.setFailure(System.Version.ParseFailureKind.ArgumentNullException),!1;if(o=System.String.split(e,[System.Version.separatorsArray].map(function(l){return String.fromCharCode(l)})),a=o.length,a<2||a>4)return t.v.setFailure(System.Version.ParseFailureKind.ArgumentException),!1;if(!System.Version.tryParseComponent(o[System.Array.index(0,o)],"version",t,i)||!System.Version.tryParseComponent(o[System.Array.index(1,o)],"version",t,r))return!1;if(a=a-2|0,a>0){if(!System.Version.tryParseComponent(o[System.Array.index(2,o)],"build",t,n))return!1;if(a=a-1|0,a>0)if(System.Version.tryParseComponent(o[System.Array.index(3,o)],"revision",t,s))t.v.m_parsedVersion=new System.Version.$ctor3(i.v,r.v,n.v,s.v);else return!1;else t.v.m_parsedVersion=new System.Version.$ctor2(i.v,r.v,n.v)}else t.v.m_parsedVersion=new System.Version.$ctor1(i.v,r.v);return!0},tryParseComponent:function(e,t,i,r){return System.Int32.tryParse(e,r)?r.v<0?(i.v.setFailure$1(System.Version.ParseFailureKind.ArgumentOutOfRangeException,t),!1):!0:(i.v.setFailure$1(System.Version.ParseFailureKind.FormatException,e),!1)},op_Equality:function(e,t){return Bridge.referenceEquals(e,null)?Bridge.referenceEquals(t,null):e.equalsT(t)},op_Inequality:function(e,t){return!System.Version.op_Equality(e,t)},op_LessThan:function(e,t){if(e==null)throw new System.ArgumentNullException.$ctor1("v1");return e.compareTo(t)<0},op_LessThanOrEqual:function(e,t){if(e==null)throw new System.ArgumentNullException.$ctor1("v1");return e.compareTo(t)<=0},op_GreaterThan:function(e,t){return System.Version.op_LessThan(t,e)},op_GreaterThanOrEqual:function(e,t){return System.Version.op_LessThanOrEqual(t,e)}}},fields:{_Major:0,_Minor:0,_Build:0,_Revision:0},props:{Major:{get:function(){return this._Major}},Minor:{get:function(){return this._Minor}},Build:{get:function(){return this._Build}},Revision:{get:function(){return this._Revision}},MajorRevision:{get:function(){return Bridge.Int.sxs(this._Revision>>16&65535)}},MinorRevision:{get:function(){return Bridge.Int.sxs(this._Revision&65535)}}},alias:["clone","System$ICloneable$clone","compareTo",["System$IComparable$1$System$Version$compareTo","System$IComparable$1$compareTo"],"equalsT","System$IEquatable$1$System$Version$equalsT"],ctors:{init:function(){this._Build=-1,this._Revision=-1},$ctor3:function(e,t,i,r){if(this.$initialize(),e<0)throw new System.ArgumentOutOfRangeException.$ctor4("major","Cannot be < 0");if(t<0)throw new System.ArgumentOutOfRangeException.$ctor4("minor","Cannot be < 0");if(i<0)throw new System.ArgumentOutOfRangeException.$ctor4("build","Cannot be < 0");if(r<0)throw new System.ArgumentOutOfRangeException.$ctor4("revision","Cannot be < 0");this._Major=e,this._Minor=t,this._Build=i,this._Revision=r},$ctor2:function(e,t,i){if(this.$initialize(),e<0)throw new System.ArgumentOutOfRangeException.$ctor4("major","Cannot be < 0");if(t<0)throw new System.ArgumentOutOfRangeException.$ctor4("minor","Cannot be < 0");if(i<0)throw new System.ArgumentOutOfRangeException.$ctor4("build","Cannot be < 0");this._Major=e,this._Minor=t,this._Build=i},$ctor1:function(e,t){if(this.$initialize(),e<0)throw new System.ArgumentOutOfRangeException.$ctor4("major","Cannot be < 0");if(t<0)throw new System.ArgumentOutOfRangeException.$ctor4("minor","Cannot be < 0");this._Major=e,this._Minor=t},$ctor4:function(e){this.$initialize();var t=System.Version.parse(e);this._Major=t.Major,this._Minor=t.Minor,this._Build=t.Build,this._Revision=t.Revision},ctor:function(){this.$initialize(),this._Major=0,this._Minor=0}},methods:{clone:function(){var e=new System.Version.ctor;return e._Major=this._Major,e._Minor=this._Minor,e._Build=this._Build,e._Revision=this._Revision,e},compareTo$1:function(e){if(e==null)return 1;var t=Bridge.as(e,System.Version);if(System.Version.op_Equality(t,null))throw new System.ArgumentException.$ctor1("version should be of System.Version type");return this._Major!==t._Major?this._Major>t._Major?1:-1:this._Minor!==t._Minor?this._Minor>t._Minor?1:-1:this._Build!==t._Build?this._Build>t._Build?1:-1:this._Revision!==t._Revision?this._Revision>t._Revision?1:-1:0},compareTo:function(e){return System.Version.op_Equality(e,null)?1:this._Major!==e._Major?this._Major>e._Major?1:-1:this._Minor!==e._Minor?this._Minor>e._Minor?1:-1:this._Build!==e._Build?this._Build>e._Build?1:-1:this._Revision!==e._Revision?this._Revision>e._Revision?1:-1:0},equals:function(e){return this.equalsT(Bridge.as(e,System.Version))},equalsT:function(e){return System.Version.op_Equality(e,null)?!1:!(this._Major!==e._Major||this._Minor!==e._Minor||this._Build!==e._Build||this._Revision!==e._Revision)},getHashCode:function(){var e=0;return e=e|(this._Major&15)<<28,e=e|(this._Minor&255)<<20,e=e|(this._Build&255)<<12,e|this._Revision&4095},toString:function(){return this._Build===-1?this.toString$1(2):this._Revision===-1?this.toString$1(3):this.toString$1(4)},toString$1:function(e){var t;switch(e){case 0:return"";case 1:return Bridge.toString(this._Major);case 2:return t=new System.Text.StringBuilder,System.Version.appendPositiveNumber(this._Major,t),t.append(String.fromCharCode(46)),System.Version.appendPositiveNumber(this._Minor,t),t.toString();default:if(this._Build===-1)throw new System.ArgumentException.$ctor3("Build should be > 0 if fieldCount > 2","fieldCount");if(e===3)return t=new System.Text.StringBuilder,System.Version.appendPositiveNumber(this._Major,t),t.append(String.fromCharCode(46)),System.Version.appendPositiveNumber(this._Minor,t),t.append(String.fromCharCode(46)),System.Version.appendPositiveNumber(this._Build,t),t.toString();if(this._Revision===-1)throw new System.ArgumentException.$ctor3("Revision should be > 0 if fieldCount > 3","fieldCount");if(e===4)return t=new System.Text.StringBuilder,System.Version.appendPositiveNumber(this._Major,t),t.append(String.fromCharCode(46)),System.Version.appendPositiveNumber(this._Minor,t),t.append(String.fromCharCode(46)),System.Version.appendPositiveNumber(this._Build,t),t.append(String.fromCharCode(46)),System.Version.appendPositiveNumber(this._Revision,t),t.toString();throw new System.ArgumentException.$ctor3("Should be < 5","fieldCount")}}}}),Bridge.define("System.Version.ParseFailureKind",{$kind:"nested enum",statics:{fields:{ArgumentNullException:0,ArgumentException:1,ArgumentOutOfRangeException:2,FormatException:3}}}),Bridge.define("System.Version.VersionResult",{$kind:"nested struct",statics:{methods:{getDefaultValue:function(){return new System.Version.VersionResult}}},fields:{m_parsedVersion:null,m_failure:0,m_exceptionArgument:null,m_argumentName:null,m_canThrow:!1},ctors:{ctor:function(){this.$initialize()}},methods:{init:function(e,t){this.m_canThrow=t,this.m_argumentName=e},setFailure:function(e){this.setFailure$1(e,"")},setFailure$1:function(e,t){if(this.m_failure=e,this.m_exceptionArgument=t,this.m_canThrow)throw this.getVersionParseException()},getVersionParseException:function(){switch(this.m_failure){case System.Version.ParseFailureKind.ArgumentNullException:return new System.ArgumentNullException.$ctor1(this.m_argumentName);case System.Version.ParseFailureKind.ArgumentException:return new System.ArgumentException.$ctor1("VersionString");case System.Version.ParseFailureKind.ArgumentOutOfRangeException:return new System.ArgumentOutOfRangeException.$ctor4(this.m_exceptionArgument,"Cannot be < 0");case System.Version.ParseFailureKind.FormatException:try{System.Int32.parse(this.m_exceptionArgument)}catch(t){t=System.Exception.create(t);var e;if(Bridge.is(t,System.FormatException))return e=t;if(Bridge.is(t,System.OverflowException))return e=t;throw t}return new System.FormatException.$ctor1("InvalidString");default:return new System.ArgumentException.$ctor1("VersionString")}},getHashCode:function(){return Bridge.addHash([5139482776,this.m_parsedVersion,this.m_failure,this.m_exceptionArgument,this.m_argumentName,this.m_canThrow])},equals:function(e){return Bridge.is(e,System.Version.VersionResult)?Bridge.equals(this.m_parsedVersion,e.m_parsedVersion)&&Bridge.equals(this.m_failure,e.m_failure)&&Bridge.equals(this.m_exceptionArgument,e.m_exceptionArgument)&&Bridge.equals(this.m_argumentName,e.m_argumentName)&&Bridge.equals(this.m_canThrow,e.m_canThrow):!1},$clone:function(e){var t=e||new System.Version.VersionResult;return t.m_parsedVersion=this.m_parsedVersion,t.m_failure=this.m_failure,t.m_exceptionArgument=this.m_exceptionArgument,t.m_argumentName=this.m_argumentName,t.m_canThrow=this.m_canThrow,t}}}),typeof define=="function"&&define.amd?define("bridge",[],function(){return Bridge}):typeof module<"u"&&module.exports&&(module.exports=Bridge)})(this); //# sourceMappingURL=bridge.min.js.map