igc-xc-score
Version:
igc-xc-score is a paragliding and hang-gliding XC scoring program in vanilla JS
1 lines • 154 kB
JavaScript
"use strict";const[_version,_year]=["1.8.0","2024"];var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,"default")?x.default:x}var shimFunction,hasRequiredShimFunction,genericCollection,hasRequiredGenericCollection,shim={};function requireShimFunction(){return hasRequiredShimFunction||(hasRequiredShimFunction=1,shimFunction=Function,Function.noop=function(){},Function.identity=function(value){return value},Function.by=function(by,compare){compare=compare||Object.compare,by=by||Function.identity;var compareBy=function(a,b){return compare(by(a),by(b))};return compareBy.compare=compare,compareBy.by=by,compareBy},Function.get=function(key){return function(object){return Object.get(object,key)}}),shimFunction}function requireGenericCollection(){if(hasRequiredGenericCollection)return genericCollection;function GenericCollection(){throw new Error("Can't construct. GenericCollection is a mixin.")}hasRequiredGenericCollection=1,genericCollection=GenericCollection;var DOMTokenList=commonjsGlobal.DOMTokenList||function(){};return GenericCollection.EmptyArray=Object.freeze([]),GenericCollection.prototype.addEach=function(values,mapFn,thisp){if(values&&(values instanceof Array||values instanceof DOMTokenList||values instanceof String))if(mapFn)for(var i=0;i<values.length;i++)this.add(mapFn.call(thisp,values[i]),i);else for(i=0;i<values.length;i++)this.add(values[i],i);else if(values&&Object(values)===values)if("function"==typeof values.forEach)mapFn?values.map(mapFn,thisp).forEach(this.add,this):values.forEach(this.add,this);else if("function"==typeof values.next){var value;i=0;if(mapFn)for(;value=values.next().value;)this.add(mapFn.call(thisp,value),i++);else for(;value=values.next().value;)this.add(value,i++)}else if("number"==typeof values.length)if(mapFn)for(i=0;i<values.length;i++)this.add(mapFn.call(thisp,values[i]),i);else for(i=0;i<values.length;i++)this.add(values[i],i);else mapFn?Object.keys(values).forEach((function(key){this.add(mapFn.call(thisp,values[key]),key)}),this):Object.keys(values).forEach((function(key){this.add(values[key],key)}),this);return this},GenericCollection.prototype.deleteEach=function(values,equals){return values.forEach((function(value){this.delete(value,equals)}),this),this},GenericCollection.prototype.forEach=function(callback){var thisp=arguments[1];return this.reduce((function(undefined$1,value,key,object,depth){callback.call(thisp,value,key,object,depth)}),void 0)},GenericCollection.prototype.map=function(callback){var thisp=arguments[1],result=[];return this.reduce((function(undefined$1,value,key,object,depth){result.push(callback.call(thisp,value,key,object,depth))}),void 0),result},GenericCollection.prototype.enumerate=function(start){null==start&&(start=0);var result=[];return this.reduce((function(undefined$1,value){result.push([start++,value])}),void 0),result},GenericCollection.prototype.group=function(callback,thisp,equals){equals=equals||Object.equals;var groups=[],keys=[];return this.forEach((function(value,key,object){key=callback.call(thisp,value,key,object);var group,index=keys.indexOf(key,equals);-1===index?(group=[],groups.push([key,group]),keys.push(key)):group=groups[index][1],group.push(value)})),groups},GenericCollection.prototype.toArray=function(){return this.map(Function.identity)},GenericCollection.prototype.toObject=function(){var object={};return this.reduce((function(undefined$1,value,key){object[key]=value}),void 0),object},GenericCollection.from=function(){return this.apply(this,arguments)},GenericCollection.prototype.filter=function(callback){var thisp=arguments[1],result=this.constructClone();return this.reduce((function(undefined$1,value,key,object,depth){callback.call(thisp,value,key,object,depth)&&result.add(value,key)}),void 0),result},GenericCollection.prototype.every=function(callback){var thisp=arguments[1];return this.reduce((function(result,value,key,object,depth){return result&&callback.call(thisp,value,key,object,depth)}),!0)},GenericCollection.prototype.some=function(callback){var thisp=arguments[1];return this.reduce((function(result,value,key,object,depth){return result||callback.call(thisp,value,key,object,depth)}),!1)},GenericCollection.prototype.all=function(){return this.every(Boolean)},GenericCollection.prototype.any=function(){return this.some(Boolean)},GenericCollection.prototype.min=function(compare){compare=compare||this.contentCompare||Object.compare;var first=!0;return this.reduce((function(result,value){return first?(first=!1,value):compare(value,result)<0?value:result}),void 0)},GenericCollection.prototype.max=function(compare){compare=compare||this.contentCompare||Object.compare;var first=!0;return this.reduce((function(result,value){return first?(first=!1,value):compare(value,result)>0?value:result}),void 0)},GenericCollection.prototype.sum=function(zero){return zero=void 0===zero?0:zero,this.reduce((function(a,b){return a+b}),zero)},GenericCollection.prototype.average=function(zero){var sum=void 0===zero?0:zero,count=void 0===zero?0:zero;return this.reduce((function(undefined$1,value){sum+=value,count+=1}),void 0),sum/count},GenericCollection.prototype.concat=function(){for(var result=this.constructClone(this),i=0;i<arguments.length;i++)result.addEach(arguments[i]);return result},GenericCollection.prototype.flatten=function(){var self=this;return this.reduce((function(result,array){return array.forEach((function(value){this.push(value)}),result,self),result}),[])},GenericCollection.prototype.zip=function(){var table=Array.prototype.slice.call(arguments);return table.unshift(this),Array.unzip(table)},GenericCollection.prototype.join=function(delimiter){return this.reduce((function(result,string){return void 0===result?string:result+delimiter+string}),void 0)},GenericCollection.prototype.sorted=function(compare,by,order){return(compare=compare||this.contentCompare||Object.compare).by?(by=compare.by,compare=compare.compare||this.contentCompare||Object.compare):by=by||Function.identity,void 0===order&&(order=1),this.map((function(item){return{by:by(item),value:item}})).sort((function(a,b){return compare(a.by,b.by)*order})).map((function(pair){return pair.value}))},GenericCollection.prototype.reversed=function(){return this.constructClone(this).reverse()},GenericCollection.prototype.clone=function(depth,memo){if(void 0===depth)depth=1/0;else if(0===depth)return this;var clone=this.constructClone();return this.forEach((function(value,key){clone.add(Object.clone(value,depth-1,memo),key)}),this),clone},GenericCollection.prototype.only=function(){if(1===this.length)return this.one()},GenericCollection.prototype.iterator=function(){return this.iterate.apply(this,arguments)},GenericCollection._sizePropertyDescriptor={get:function(){return this.length},enumerable:!1,configurable:!0},Object.defineProperty(GenericCollection.prototype,"size",GenericCollection._sizePropertyDescriptor),requireShimArray(),genericCollection}var hasRequiredWeakMap$1,weakMap,hasRequiredWeakMap,shimObject,hasRequiredShimObject,genericOrder,hasRequiredGenericOrder,shimArray,hasRequiredShimArray,weakMap$1={exports:{}};function requireWeakMap(){return hasRequiredWeakMap||(hasRequiredWeakMap=1,weakMap="undefined"!=typeof WeakMap?WeakMap:(hasRequiredWeakMap$1||(hasRequiredWeakMap$1=1,function(){if("undefined"==typeof ses||!ses.ok||ses.ok()){"undefined"!=typeof ses&&(ses.weakMapPermitHostObjects=weakMapPermitHostObjects);var doubleWeakMapCheckSilentFailure=!1;if("function"==typeof WeakMap){var HostWeakMap=WeakMap;if("undefined"!=typeof navigator&&/Firefox/.test(navigator.userAgent));else{var testMap=new HostWeakMap,testObject=Object.freeze({});if(testMap.set(testObject,1),1===testMap.get(testObject))return void(weakMap$1.exports=WeakMap);doubleWeakMapCheckSilentFailure=!0}}var gopn=Object.getOwnPropertyNames,defProp=Object.defineProperty,isExtensible=Object.isExtensible,HIDDEN_NAME="weakmap:ident:"+Math.random()+"___";if("undefined"!=typeof crypto&&"function"==typeof crypto.getRandomValues&&"function"==typeof ArrayBuffer&&"function"==typeof Uint8Array){var ab=new ArrayBuffer(25),u8s=new Uint8Array(ab);crypto.getRandomValues(u8s),HIDDEN_NAME="weakmap:rand:"+Array.prototype.map.call(u8s,(function(u8){return(u8%36).toString(36)})).join("")+"___"}if(defProp(Object,"getOwnPropertyNames",{value:function(obj){return gopn(obj).filter(isNotHiddenName)}}),"getPropertyNames"in Object){var originalGetPropertyNames=Object.getPropertyNames;defProp(Object,"getPropertyNames",{value:function(obj){return originalGetPropertyNames(obj).filter(isNotHiddenName)}})}!function(){var oldFreeze=Object.freeze;defProp(Object,"freeze",{value:function(obj){return getHiddenRecord(obj),oldFreeze(obj)}});var oldSeal=Object.seal;defProp(Object,"seal",{value:function(obj){return getHiddenRecord(obj),oldSeal(obj)}});var oldPreventExtensions=Object.preventExtensions;defProp(Object,"preventExtensions",{value:function(obj){return getHiddenRecord(obj),oldPreventExtensions(obj)}})}();var calledAsFunctionWarningDone=!1,nextId=0,OurWeakMap=function(){this instanceof OurWeakMap||calledAsFunctionWarning();var keys=[],values=[],id=nextId++;return Object.create(OurWeakMap.prototype,{get___:{value:constFunc((function(key,opt_default){var index,hiddenRecord=getHiddenRecord(key);return hiddenRecord?id in hiddenRecord?hiddenRecord[id]:opt_default:(index=keys.indexOf(key))>=0?values[index]:opt_default}))},has___:{value:constFunc((function(key){var hiddenRecord=getHiddenRecord(key);return hiddenRecord?id in hiddenRecord:keys.indexOf(key)>=0}))},set___:{value:constFunc((function(key,value){var index,hiddenRecord=getHiddenRecord(key);return hiddenRecord?hiddenRecord[id]=value:(index=keys.indexOf(key))>=0?values[index]=value:(index=keys.length,values[index]=value,keys[index]=key),this}))},delete___:{value:constFunc((function(key){var index,lastIndex,hiddenRecord=getHiddenRecord(key);return hiddenRecord?id in hiddenRecord&&delete hiddenRecord[id]:!((index=keys.indexOf(key))<0||(lastIndex=keys.length-1,keys[index]=void 0,values[index]=values[lastIndex],keys[index]=keys[lastIndex],keys.length=lastIndex,values.length=lastIndex,0))}))}})};OurWeakMap.prototype=Object.create(Object.prototype,{get:{value:function(key,opt_default){return this.get___(key,opt_default)},writable:!0,configurable:!0},has:{value:function(key){return this.has___(key)},writable:!0,configurable:!0},set:{value:function(key,value){return this.set___(key,value)},writable:!0,configurable:!0},delete:{value:function(key){return this.delete___(key)},writable:!0,configurable:!0}}),"function"==typeof HostWeakMap?function(){function DoubleWeakMap(){this instanceof OurWeakMap||calledAsFunctionWarning();var dset,hmap=new HostWeakMap,omap=void 0,enableSwitching=!1;return dset=doubleWeakMapCheckSilentFailure?function(key,value){return hmap.set(key,value),hmap.has(key)||(omap||(omap=new OurWeakMap),omap.set(key,value)),this}:function(key,value){if(enableSwitching)try{hmap.set(key,value)}catch(e){omap||(omap=new OurWeakMap),omap.set___(key,value)}else hmap.set(key,value);return this},Object.create(OurWeakMap.prototype,{get___:{value:constFunc((function(key,opt_default){return omap?hmap.has(key)?hmap.get(key):omap.get___(key,opt_default):hmap.get(key,opt_default)}))},has___:{value:constFunc((function(key){return hmap.has(key)||!!omap&&omap.has___(key)}))},set___:{value:constFunc(dset)},delete___:{value:constFunc((function(key){var result=!!hmap.delete(key);return omap&&omap.delete___(key)||result}))},permitHostObjects___:{value:constFunc((function(token){if(token!==weakMapPermitHostObjects)throw new Error("bogus call to permitHostObjects___");enableSwitching=!0}))}})}doubleWeakMapCheckSilentFailure&&"undefined"!=typeof Proxy&&(Proxy=void 0),DoubleWeakMap.prototype=OurWeakMap.prototype,weakMap$1.exports=DoubleWeakMap,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!=typeof Proxy&&(Proxy=void 0),weakMap$1.exports=OurWeakMap)}function weakMapPermitHostObjects(map){map.permitHostObjects___&&map.permitHostObjects___(weakMapPermitHostObjects)}function isNotHiddenName(name){return!("weakmap:"==name.substr(0,8)&&"___"===name.substr(name.length-3))}function getHiddenRecord(key){if(key!==Object(key))throw new TypeError("Not an object: "+key);var hiddenRecord=key[HIDDEN_NAME];if(hiddenRecord&&hiddenRecord.key===key)return hiddenRecord;if(isExtensible(key)){hiddenRecord={key:key};try{return defProp(key,HIDDEN_NAME,{value:hiddenRecord,writable:!1,enumerable:!1,configurable:!1}),hiddenRecord}catch(error){return}}}function constFunc(func){return func.prototype=null,Object.freeze(func)}function calledAsFunctionWarning(){calledAsFunctionWarningDone||"undefined"==typeof console||(calledAsFunctionWarningDone=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()),weakMap$1.exports)),weakMap}function requireShimObject(){if(hasRequiredShimObject)return shimObject;hasRequiredShimObject=1;var WeakMap=requireWeakMap();requireShimFunction(),shimObject=Object,Object.empty=Object.freeze(Object.create(null)),Object.isObject=function(object){return Object(object)===object},Object.getValueOf=function(value){return value&&"function"==typeof value.valueOf&&(value=value.valueOf()),value};var hashMap=new WeakMap;Object.hash=function(object){return object&&"function"==typeof object.hash?""+object.hash():Object(object)===object?(hashMap.has(object)||hashMap.set(object,Math.random().toString(36).slice(2)),hashMap.get(object)):""+object};var owns=Object.prototype.hasOwnProperty;return Object.owns=function(object,key){return owns.call(object,key)},Object.has=function(object,key){if("object"!=typeof object)throw new Error("Object.has can't accept non-object: "+typeof object);if(object&&"function"==typeof object.has)return object.has(key);if("string"==typeof key)return key in object&&object[key]!==Object.prototype[key];throw new Error("Key must be a string for Object.has on plain objects")},Object.get=function(object,key,value){if("object"!=typeof object)throw new Error("Object.get can't accept non-object: "+typeof object);return object&&"function"==typeof object.get?object.get(key,value):Object.has(object,key)?object[key]:value},Object.set=function(object,key,value){object&&"function"==typeof object.set?object.set(key,value):object[key]=value},Object.addEach=function(target,source,overrides){var overridesExistingProperty=3!==arguments.length||overrides;if(source)if("function"!=typeof source.forEach||source.hasOwnProperty("forEach"))if("number"==typeof source.length)for(var index=0;index<source.length;index++)target[index]=source[index];else for(var key,keys=Object.keys(source),i=0;key=keys[i];i++)!overridesExistingProperty&&Object.owns(target,key)||(target[key]=source[key]);else!0===source.isMap?source.forEach((function(value,key){target[key]=value})):source.forEach((function(pair){target[pair[0]]=pair[1]}));else;return target},Object.defineEach=function(target,source,overrides,configurable,enumerable,writable){var overridesExistingProperty=3!==arguments.length||overrides;if(source)if("function"!=typeof source.forEach||source.hasOwnProperty("forEach"))if("number"==typeof source.length)for(var index=0;index<source.length;index++)Object.defineProperty(target,index,{value:source[index],writable:writable,configurable:configurable,enumerable:enumerable});else for(var key,keys=Object.keys(source),i=0;key=keys[i];i++)!overridesExistingProperty&&Object.owns(target,key)||Object.defineProperty(target,key,{value:source[key],writable:writable,configurable:configurable,enumerable:enumerable});else!0===source.isMap?source.forEach((function(value,key){Object.defineProperty(target,key,{value:value,writable:writable,configurable:configurable,enumerable:enumerable})})):source.forEach((function(pair){Object.defineProperty(target,pair[0],{value:pair[1],writable:writable,configurable:configurable,enumerable:enumerable})}));else;return target},Object.forEach=function(object,callback,thisp){for(var iKey,keys=Object.keys(object),i=0;iKey=keys[i];i++)callback.call(thisp,object[iKey],iKey,object)},Object.map=function(object,callback,thisp){for(var iKey,keys=Object.keys(object),i=0,result=[];iKey=keys[i];i++)result.push(callback.call(thisp,object[iKey],iKey,object));return result},Object.values=function(object){return Object.map(object,Function.identity)},Object.concat=function(){for(var object={},i=0;i<arguments.length;i++)Object.addEach(object,arguments[i]);return object},Object.from=Object.concat,Object.is=function(x,y){return x===y?0!==x||1/x==1/y:x!=x&&y!=y},Object.equals=function(a,b,equals,memo){if(equals=equals||Object.equals,(a=Object.getValueOf(a))===(b=Object.getValueOf(b)))return!0;if(Object.isObject(a)){if((memo=memo||new WeakMap).has(a))return!0;memo.set(a,!0)}if(Object.isObject(a)&&"function"==typeof a.equals)return a.equals(b,equals,memo);if(Object.isObject(b)&&"function"==typeof b.equals)return b.equals(a,equals,memo);if(Object.isObject(a)&&Object.isObject(b)&&Object.getPrototypeOf(a)===Object.prototype&&Object.getPrototypeOf(b)===Object.prototype){for(var name in a)if(!equals(a[name],b[name],equals,memo))return!1;for(var name in b)if(!(name in a)||!equals(b[name],a[name],equals,memo))return!1;return!0}return a!=a&&b!=b||(!a||!b)&&a===b},Object.compare=function(a,b){if((a=Object.getValueOf(a))===(b=Object.getValueOf(b)))return 0;var aType=typeof a,bType=typeof b;return"number"===aType&&"number"===bType?a-b:"string"===aType&&"string"===bType?a<b?-1/0:1/0:a&&"function"==typeof a.compare?a.compare(b):b&&"function"==typeof b.compare?-b.compare(a):0},Object.clone=function(value,depth,memo){if(value=Object.getValueOf(value),memo=memo||new WeakMap,void 0===depth)depth=1/0;else if(0===depth)return value;if(Object.isObject(value)){if(!memo.has(value))if(value&&"function"==typeof value.clone)memo.set(value,value.clone(depth,memo));else{var prototype=Object.getPrototypeOf(value);if(null!==prototype&&prototype!==Object.prototype)throw new Error("Can't clone "+value);var clone=Object.create(prototype);for(var key in memo.set(value,clone),value)clone[key]=Object.clone(value[key],depth-1,memo)}return memo.get(value)}return value},Object.clear=function(object){if(object&&"function"==typeof object.clear)object.clear();else for(var keys=Object.keys(object),i=keys.length;i;)delete object[keys[--i]];return object},shimObject}function requireGenericOrder(){if(hasRequiredGenericOrder)return genericOrder;hasRequiredGenericOrder=1;var Object=requireShimObject();function GenericOrder(){throw new Error("Can't construct. GenericOrder is a mixin.")}return genericOrder=GenericOrder,GenericOrder.prototype.equals=function(that,equals){return equals=equals||this.contentEquals||Object.equals,this===that||!!that&&(this.length===that.length&&this.zip(that).every((function(pair){return equals(pair[0],pair[1])})))},GenericOrder.prototype.compare=function(that,compare){if(compare=compare||this.contentCompare||Object.compare,this===that)return 0;if(!that)return 1;var length=Math.min(this.length,that.length),comparison=this.zip(that).reduce((function(comparison,pair,index){return 0===comparison?index>=length?comparison:compare(pair[0],pair[1]):comparison}),0);return 0===comparison?this.length-that.length:comparison},GenericOrder.prototype.toJSON=function(){return this.toArray()},genericOrder}function requireShimArray(){if(hasRequiredShimArray)return shimArray;hasRequiredShimArray=1,requireShimFunction();var GenericCollection=requireGenericCollection(),GenericOrder=requireGenericOrder(),WeakMap=requireWeakMap();shimArray=Array;var array_splice=Array.prototype.splice,array_slice=Array.prototype.slice;Array.empty||(Array.empty=[],Object.freeze&&Object.freeze(Array.empty)),Array.nativeFrom||(Array.nativeFrom=Array.from);var isSymbolDefined="undefined"!=typeof Symbol;function define(key,value){Object.defineProperty(Array.prototype,key,{value:value,writable:!0,configurable:!0,enumerable:!1})}Array.from=function(values,mapFn,thisArg){if(isSymbolDefined&&values&&("function"==typeof values[Symbol.iterator]||"function"==typeof mapFn))return Array.nativeFrom(values,mapFn,thisArg);var array=[];return array.addEach(values),array},Array.unzip=function(table){for(var transpose=[],length=1/0,i=0;i<table.length;i++){var row=table[i];table[i]=row.toArray(),row.length<length&&(length=row.length)}for(i=0;i<table.length;i++){row=table[i];for(var j=0;j<row.length;j++)j<length&&j in row&&(transpose[j]=transpose[j]||[],transpose[j][i]=row[j])}return transpose},define("addEach",GenericCollection.prototype.addEach),define("deleteEach",GenericCollection.prototype.deleteEach),define("toArray",GenericCollection.prototype.toArray),define("toObject",GenericCollection.prototype.toObject),define("all",GenericCollection.prototype.all),define("any",GenericCollection.prototype.any),define("min",GenericCollection.prototype.min),define("max",GenericCollection.prototype.max),define("sum",GenericCollection.prototype.sum),define("average",GenericCollection.prototype.average),define("only",GenericCollection.prototype.only),define("flatten",GenericCollection.prototype.flatten),define("zip",GenericCollection.prototype.zip),define("enumerate",GenericCollection.prototype.enumerate),define("group",GenericCollection.prototype.group),define("sorted",GenericCollection.prototype.sorted),define("reversed",GenericCollection.prototype.reversed),define("constructClone",(function(values){var clone=new this.constructor;return clone.addEach(values),clone})),define("has",(function(value,equals){return-1!==this.findValue(value,equals)})),define("get",(function(index,defaultValue){if(+index!==index)throw new Error("Indicies must be numbers");return!index in this?defaultValue:this[index]})),define("set",(function(index,value){return this[index]=value,!0})),define("add",(function(value){return this.push(value),!0})),define("delete",(function(value,equals){var index=this.findValue(value,equals);return-1!==index&&(this.spliceOne(index),!0)})),define("deleteAll",(function(value,equals){equals=equals||this.contentEquals||Object.equals;for(var count=0,index=0;index<this.length;)equals(value,this[index])?(this.swap(index,1),count++):index++;return count})),Array.prototype.find||define("find",(function(predicate){if(null==this)throw new TypeError('"this" is null or not defined');var o=Object(this),len=o.length>>>0;if("function"!=typeof predicate)throw new TypeError("predicate must be a function");for(var thisArg=arguments[1],k=0;k<len;){var kValue=o[k];if(predicate.call(thisArg,kValue,k,o))return kValue;k++}}));var deprecatedWarnNonce={};function deprecatedWarn(msg,notOnce){"undefined"!=typeof console&&"function"==typeof console.warn&&!0!==notOnce&&!1===deprecatedWarnNonce.hasOwnProperty(msg)&&(console.warn(msg),deprecatedWarnNonce[msg]++)}var ArrayFindPrototype=Object.getOwnPropertyDescriptor(Array.prototype,"find").value;function ArrayIterator(array,start,end){this.array=array,this.start=null==start?0:start,this.end=end}return define("find",(function(value,equals,index){return"function"==typeof arguments[0]&&this instanceof Array?ArrayFindPrototype.apply(this,arguments):(deprecatedWarn("Array#find usage is deprecated please use Array#findValue"),this.findValue.apply(this,arguments))})),define("findValue",(function(value,equals,index){if(index)throw new Error("Array#findValue does not support third argument: index");equals=equals||this.contentEquals||Object.equals;for(index=0;index<this.length;index++)if(index in this&&equals(value,this[index]))return index;return-1})),define("findLast",(function(value,equals){return deprecatedWarn("Array#findLast function is deprecated please use Array#findLastValue instead."),this.findLastValue.apply(this,arguments)})),define("findLastValue",(function(value,equals){equals=equals||this.contentEquals||Object.equals;var index=this.length;do{if(--index in this&&equals(this[index],value))return index}while(index>0);return-1})),define("swap",(function(start,length,plus){var args,plusLength,i,j,returnValue;if(start>this.length&&(this.length=start),void 0!==plus){if(args=[start,length],Array.isArray(plus)||(plus=array_slice.call(plus)),i=0,(plusLength=plus.length)<1e3){for(;i<plusLength;i++)args[i+2]=plus[i];return array_splice.apply(this,args)}for(returnValue=array_splice.apply(this,args);i<plusLength;){for(args=[start+i,0],j=2;j<1002&&i<plusLength;j++,i++)args[j]=plus[i];array_splice.apply(this,args)}return returnValue}return void 0!==length?array_splice.call(this,start,length):void 0!==start?array_splice.call(this,start):[]})),define("peek",(function(){return this[0]})),define("poke",(function(value){this.length>0&&(this[0]=value)})),define("peekBack",(function(){if(this.length>0)return this[this.length-1]})),define("pokeBack",(function(value){this.length>0&&(this[this.length-1]=value)})),define("one",(function(){for(var i in this)if(Object.owns(this,i))return this[i]})),Array.prototype.clear||define("clear",(function(){return this.length=0,this})),define("compare",(function(that,compare){var i,length,relative;if(compare=compare||Object.compare,this===that)return 0;if(!that||!Array.isArray(that))return GenericOrder.prototype.compare.call(this,that,compare);for(length=this.length<that.length?this.length:that.length,i=0;i<length;i++)if(i in this){if(!(i in that))return-1;if(relative=compare(this[i],that[i]))return relative}else if(i in that)return 1;return this.length-that.length})),define("equals",(function(that,equals){equals=equals||Object.equals;var i=0,length=this.length;if(this===that)return!0;if(!that||!Array.isArray(that))return GenericOrder.prototype.equals.call(this,that);if(length!==that.length)return!1;for(;i<length;++i)if(i in this){if(!(i in that))return!1;if(!equals(this[i],that[i]))return!1}else if(i in that)return!1;return!0})),define("clone",(function(depth,memo){if(null==depth)depth=1/0;else if(0===depth)return this;if((memo=memo||new WeakMap).has(this))return memo.get(this);var clone=new Array(this.length);for(var i in memo.set(this,clone),this)clone[i]=Object.clone(this[i],depth-1,memo);return clone})),define("iterate",(function(start,end){return new ArrayIterator(this,start,end)})),void 0===Array.prototype.spliceOne&&define("spliceOne",(function(index,itemToAdd){var len=this.length;if(len)if(1===arguments.length){for(;index<len;)this[index]=this[index+1],index++;this.length--}else this[index]=itemToAdd})),define("Iterator",ArrayIterator),ArrayIterator.prototype.__iterationObject=null,Object.defineProperty(ArrayIterator.prototype,"_iterationObject",{get:function(){return this.__iterationObject||(this.__iterationObject={done:!1,value:null})}}),ArrayIterator.prototype.next=function(){return this.start===(null==this.end?this.array.length:this.end)?(this._iterationObject.done=!0,this._iterationObject.value=void 0):this._iterationObject.value=this.array[this.start++],this._iterationObject},shimArray}var hasRequiredShimRegexp,hasRequiredShim,genericSet,hasRequiredGenericSet,shimRegexp={};function requireShim(){return hasRequiredShim||(hasRequiredShim=1,requireShimArray(),requireShimObject(),requireShimFunction(),function(){if(hasRequiredShimRegexp)return shimRegexp;if(hasRequiredShimRegexp=1,!RegExp.escape){var special=/[-[\]{}()*+?.\\^$|,#\s]/g;RegExp.escape=function(string){return string.replace(special,"\\$&")}}}()),shim}function requireGenericSet(){if(hasRequiredGenericSet)return genericSet;function GenericSet(){throw new Error("Can't construct. GenericSet is a mixin.")}hasRequiredGenericSet=1,genericSet=GenericSet,GenericSet.prototype.isSet=!0,GenericSet.prototype.union=function(that){var union=this.constructClone(this);return union.addEach(that),union},GenericSet.prototype.intersection=function(that){return this.constructClone(this.filter((function(value){return that.has(value)})))},GenericSet.prototype.difference=function(that){var union=this.constructClone(this);return union.deleteEach(that),union},GenericSet.prototype.symmetricDifference=function(that){var union=this.union(that),intersection=this.intersection(that);return union.difference(intersection)},GenericSet.prototype.deleteAll=function(value){return+this.delete(value)},GenericSet.prototype.equals=function(that,equals){var self=this;return that&&"function"==typeof that.reduce&&this.length===that.length&&that.reduce((function(equal,value){return equal&&self.has(value,equals)}),!0)},GenericSet.prototype.forEach=function(callback){var thisp=arguments[1];return this.reduce((function(undefined$1,value,key,object,depth){callback.call(thisp,value,value,object,depth)}),void 0)},GenericSet.prototype.toJSON=function(){return this.toArray()},GenericSet.prototype.contains=function(value){return this.has(value)},GenericSet.prototype.remove=function(value){return this.delete(value)},GenericSet.prototype.toggle=function(value){this.has(value)?this.delete(value):this.add(value)};var _valuesArrayFunction=function(value,key){return value};GenericSet.prototype.valuesArray=function(){return this.map(_valuesArrayFunction)};var _entriesArrayFunction=function(value,key){return[key,value]};return GenericSet.prototype.entriesArray=function(){return this.map(_entriesArrayFunction)},genericSet}var _list,hasRequired_list,iterator,hasRequiredIterator,genericMap,hasRequiredGenericMap,_dict,hasRequired_dict,treeLog,hasRequiredTreeLog,_fastSet,hasRequired_fastSet,hasRequired_set,hasRequired_map,_map={exports:{}},_set={exports:{}};function require_list(){if(hasRequired_list)return _list;hasRequired_list=1,_list=List,requireShim();var GenericCollection=requireGenericCollection(),GenericOrder=requireGenericOrder();function List(values,equals,getDefault){return List._init(List,this,values,equals,getDefault)}function ListIterator(head){this.head=head,this.at=head.next}function Node(value){this.value=value,this.prev=null,this.next=null}return List._init=function(constructor,object,values,equals,getDefault){if(!(object instanceof constructor))return new constructor(values,equals,getDefault);var head=object.head=new object.Node;head.next=head,head.prev=head,object.contentEquals=equals||Object.equals,object.getDefault=getDefault||Function.noop,object.length=0,object.addEach(values)},List.List=List,Object.addEach(List.prototype,GenericCollection.prototype),Object.addEach(List.prototype,GenericOrder.prototype),List.from=GenericCollection.from,List.prototype.constructClone=function(values){return new this.constructor(values,this.contentEquals,this.getDefault)},List.prototype.find=function(value,equals,index){equals=equals||this.contentEquals;for(var head=this.head,at=this.scan(index,head.next);at!==head;){if(equals(at.value,value))return at;at=at.next}},List.prototype.findLast=function(value,equals,index){equals=equals||this.contentEquals;for(var head=this.head,at=this.scan(index,head.prev);at!==head;){if(equals(at.value,value))return at;at=at.prev}},List.prototype.has=function(value,equals){return!!this.find(value,equals)},List.prototype.get=function(value,equals){var found=this.find(value,equals);return found?found.value:this.getDefault(value)},List.prototype.delete=function(value,equals){var found=this.findLast(value,equals);return!!found&&(found.delete(),this.length--,!0)},List.prototype.deleteAll=function(value,equals){equals=equals||this.contentEquals;for(var head=this.head,at=head.next,count=0;at!==head;)equals(value,at.value)&&(at.delete(),count++),at=at.next;return this.length-=count,count},List.prototype.clear=function(){this.head.next=this.head.prev=this.head,this.length=0},List.prototype.add=function(value){var node=new this.Node(value);return this._addNode(node)},List.prototype._addNode=function(node){return this.head.addBefore(node),this.length++,!0},List.prototype.push=function(){for(var head=this.head,i=0;i<arguments.length;i++){var value=arguments[i],node=new this.Node(value);head.addBefore(node)}this.length+=arguments.length},List.prototype.unshift=function(){for(var at=this.head,i=0;i<arguments.length;i++){var value=arguments[i],node=new this.Node(value);at.addAfter(node),at=node}this.length+=arguments.length},List.prototype._shouldPop=function(){var value,head=this.head;return head.prev!==head&&(value=head.prev.value),value},List.prototype.pop=function(_before,_after){var value,head=this.head;if(head.prev!==head){value=head.prev.value;var index=this.length-1,popDispatchValueArray=_before?_before.call(this,value,index):void 0;head.prev.delete(),this.length--,_after&&_after.call(this,value,index,popDispatchValueArray)}return value},List.prototype.shift=function(_before,_after){var value,head=this.head;if(head.prev!==head){value=head.next.value;var dispatchValueArray=_before?_before.call(this,value,0):void 0;head.next.delete(),this.length--,_after&&_after.call(this,value,0,dispatchValueArray)}return value},List.prototype.peek=function(){if(this.head!==this.head.next)return this.head.next.value},List.prototype.poke=function(value){this.head!==this.head.next?this.head.next.value=value:this.push(value)},List.prototype.one=function(){return this.peek()},List.prototype.scan=function(at,fallback){var head=this.head;if("number"==typeof at){var count=at;if(count>=0)for(at=head.next;count&&(count--,(at=at.next)!=head););else for(at=head;count<0&&(count++,(at=at.prev)!=head););return at}return at||fallback},List.prototype.slice=function(at,end){var sliced=[],head=this.head;for(at=this.scan(at,head.next),end=this.scan(end,head);at!==end&&at!==head;)sliced.push(at.value),at=at.next;return sliced},List.prototype.splice=function(at,length){return this.swap(at,length,Array.prototype.slice.call(arguments,2))},List.prototype.swap=function(start,length,plus,_before,_after){var initial=start;start=this.scan(start,this.head),null==length&&(length=1/0),plus=Array.from(plus);for(var minus=[],at=start;length--&&length>=0&&at!==this.head;)minus.push(at.value),at=at.next;_before&&_before.call(this,start,plus,minus);at=start;var i=0;for(at=start;i<minus.length;i++,at=at.next)at.delete();null==initial&&at===this.head&&(at=this.head.next);for(i=0;i<plus.length;i++){var node=new this.Node(plus[i]);at.addBefore(node)}return this.length+=plus.length-minus.length,_after&&_after.call(this,start,plus,minus),minus},List.prototype.reverse=function(){var at=this.head;do{var temp=at.next;at.next=at.prev,at.prev=temp,at=at.next}while(at!==this.head);return this},List.prototype.sort=function(){this.swap(0,this.length,this.sorted.apply(this,arguments))},List.prototype.reduce=function(callback,basis){for(var thisp=arguments[2],head=this.head,at=head.next;at!==head;)basis=callback.call(thisp,basis,at.value,at,this),at=at.next;return basis},List.prototype.reduceRight=function(callback,basis){for(var thisp=arguments[2],head=this.head,at=head.prev;at!==head;)basis=callback.call(thisp,basis,at.value,at,this),at=at.prev;return basis},List.prototype.updateIndexes=function(node,index){for(;node!==this.head;)node.index=index++,node=node.next},List.prototype.iterate=function(){return new ListIterator(this.head)},ListIterator.prototype.__iterationObject=null,Object.defineProperty(ListIterator.prototype,"_iterationObject",{get:function(){return this.__iterationObject||(this.__iterationObject={done:!1,value:null})}}),ListIterator.prototype.next=function(){if(this.at===this.head)this._iterationObject.done=!0,this._iterationObject.value=void 0;else{var value=this.at.value;this.at=this.at.next,this._iterationObject.value=value}return this._iterationObject},List.prototype.Node=Node,Node.prototype.delete=function(){this.prev.next=this.next,this.next.prev=this.prev},Node.prototype.addBefore=function(node){var prev=this.prev;this.prev=node,node.prev=prev,prev.next=node,node.next=this},Node.prototype.addAfter=function(node){var next=this.next;this.next=node,node.next=next,next.prev=node,node.prev=this},_list}function requireIterator(){if(hasRequiredIterator)return iterator;hasRequiredIterator=1,iterator=Iterator;var Object=requireShimObject(),GenericCollection=requireGenericCollection();function Iterator(iterable,standardMode){var values=standardMode&&iterable&&iterable.values&&iterable.values();if(values&&"function"==typeof values.next)return values;if(!(this instanceof Iterator))return new Iterator(iterable);if(Array.isArray(iterable)||"string"==typeof iterable)return Iterator.iterate(iterable);if((iterable=Object(iterable))instanceof Iterator)return iterable;if(iterable.next)this.next=function(){return iterable.next()};else if(iterable.iterate){var iterator=iterable.iterate();this.next=function(){return iterator.next()}}else{if("[object Function]"!==Object.prototype.toString.call(iterable))throw new TypeError("Can't iterate "+iterable);this.next=iterable}}return Iterator.prototype.forEach=GenericCollection.prototype.forEach,Iterator.prototype.map=GenericCollection.prototype.map,Iterator.prototype.filter=GenericCollection.prototype.filter,Iterator.prototype.every=GenericCollection.prototype.every,Iterator.prototype.some=GenericCollection.prototype.some,Iterator.prototype.any=GenericCollection.prototype.any,Iterator.prototype.all=GenericCollection.prototype.all,Iterator.prototype.min=GenericCollection.prototype.min,Iterator.prototype.max=GenericCollection.prototype.max,Iterator.prototype.sum=GenericCollection.prototype.sum,Iterator.prototype.average=GenericCollection.prototype.average,Iterator.prototype.flatten=GenericCollection.prototype.flatten,Iterator.prototype.zip=GenericCollection.prototype.zip,Iterator.prototype.enumerate=GenericCollection.prototype.enumerate,Iterator.prototype.sorted=GenericCollection.prototype.sorted,Iterator.prototype.group=GenericCollection.prototype.group,Iterator.prototype.reversed=GenericCollection.prototype.reversed,Iterator.prototype.toArray=GenericCollection.prototype.toArray,Iterator.prototype.toObject=GenericCollection.prototype.toObject,Iterator.prototype.iterator=GenericCollection.prototype.iterator,Iterator.prototype.__iterationObject=null,Object.defineProperty(Iterator.prototype,"_iterationObject",{get:function(){return this.__iterationObject||(this.__iterationObject={done:!1,value:void 0})}}),Iterator.prototype.constructClone=function(values){var clone=[];return clone.addEach(values),clone},Iterator.prototype.mapIterator=function(callback){var self=Iterator(this),thisp=arguments[1],i=0;if("[object Function]"!=Object.prototype.toString.call(callback))throw new TypeError;return new self.constructor((function(){if(!0!==self._iterationObject.done){var callbackValue=callback.call(thisp,self.next().value,i++,self);self._iterationObject.value=callbackValue}return self._iterationObject}))},Iterator.prototype.filterIterator=function(callback){var self=Iterator(this),thisp=arguments[1],i=0;if("[object Function]"!=Object.prototype.toString.call(callback))throw new TypeError;return new self.constructor((function(){for(var nextEntry;;){if(!0===(nextEntry=self.next()).done)return nextEntry;if(callback.call(thisp,nextEntry.value,i++,self))return nextEntry}}))},Iterator.prototype.reduce=function(callback){var nextEntry,self=Iterator(this),result=arguments[1],thisp=arguments[2],i=0;if("[object Function]"!=Object.prototype.toString.call(callback))throw new TypeError;if(!0===(nextEntry=self.next()).done){if(arguments.length>1)return arguments[1];throw TypeError("cannot reduce a value from an empty iterator with no initial value")}for(result=arguments.length>1?callback.call(thisp,result,nextEntry.value,i,self):nextEntry.value,i++;;){if(!0===(nextEntry=self.next()).done)return result;result=callback.call(thisp,result,nextEntry.value,i,self),i++}},Iterator.prototype.concat=function(){return Iterator.concat(Array.prototype.concat.apply(this,arguments))},Iterator.prototype.dropWhile=function(callback){var stopValue,nextEntry,self=Iterator(this),thisp=arguments[1],stopped=!1,i=0;if("[object Function]"!=Object.prototype.toString.call(callback))throw new TypeError;for(;!0!==(nextEntry=self.next()).done;){if(!callback.call(thisp,nextEntry.value,i,self)){stopped=!0,stopValue=nextEntry.value;break}i++}return stopped?self.constructor([stopValue]).concat(self):self.constructor([])},Iterator.prototype.takeWhile=function(callback){var self=Iterator(this),thisp=arguments[1],i=0;if("[object Function]"!=Object.prototype.toString.call(callback))throw new TypeError;return new self.constructor((function(){if(!0!==self._iterationObject.done){var value=self.next().value;callback.call(thisp,value,i++,self)?self._iterationObject.value=value:(self._iterationObject.done=!0,self._iterationObject.value=void 0)}return self._iterationObject}))},Iterator.prototype.zipIterator=function(){return Iterator.unzip(Array.prototype.concat.apply(this,arguments))},Iterator.prototype.enumerateIterator=function(start){return Iterator.count(start).zipIterator(this)},Iterator.iterate=function(iterable){var start;return start=0,new Iterator((function(){if("object"==typeof iterable)for(;!(start in iterable);){if(start>=iterable.length){this._iterationObject.done=!0,this._iterationObject.value=void 0;break}start+=1}else start>=iterable.length&&(this._iterationObject.done=!0,this._iterationObject.value=void 0);return this._iterationObject.done||(this._iterationObject.value=iterable[start],start+=1),this._iterationObject}))},Iterator.cycle=function(cycle,times){var next;return arguments.length<2&&(times=1/0),new Iterator((function(){var iteration,nextEntry;return next&&(nextEntry=next()),next&&!0!==nextEntry.done||(times>0?(times--,iteration=Iterator.iterate(cycle),nextEntry=(next=iteration.next.bind(iteration))()):(this._iterationObject.done=!0,nextEntry=this._iterationObject)),nextEntry}))},Iterator.concat=function(iterators){var next;return iterators=Iterator(iterators),new Iterator((function(){var iteration,nextEntry;return next&&(nextEntry=next()),nextEntry&&!0!==nextEntry.done?nextEntry:!1===(nextEntry=iterators.next()).done?(iteration=Iterator(nextEntry.value),(next=iteration.next.bind(iteration))()):nextEntry}))},Iterator.unzip=function(iterators){return 0===(iterators=Iterator(iterators).map(Iterator)).length?new Iterator([]):new Iterator((function(){var stopped,nextEntry,result=iterators.map((function(iterator){return!0===(nextEntry=iterator.next()).done&&(stopped=!0),nextEntry.value}));return stopped?(this._iterationObject.done=!0,this._iterationObject.value=void 0):this._iterationObject.value=result,this._iterationObject}))},Iterator.zip=function(){return Iterator.unzip(Array.prototype.slice.call(arguments))},Iterator.chain=function(){return Iterator.concat(Array.prototype.slice.call(arguments))},Iterator.range=function(start,stop,step){return arguments.length<3&&(step=1),arguments.length<2&&(stop=start,start=0),start=start||0,step=step||1,new Iterator((function(){start>=stop&&(this._iterationObject.done=!0,this._iterationObject.value=void 0);var result=start;return start+=step,this._iterationObject.value=result,this._iterationObject}))},Iterator.count=function(start,step){return Iterator.range(start,1/0,step)},Iterator.repeat=function(value,times){return new Iterator.range(times).mapIterator((function(){return value}))},iterator}function requireGenericMap(){if(hasRequiredGenericMap)return genericMap;hasRequiredGenericMap=1;var Object=requireShimObject(),Iterator=requireIterator();function GenericMap(){throw new Error("Can't construct. GenericMap is a mixin.")}function Item(key,value){this.key=key,this.value=value}return genericMap=GenericMap,GenericMap.prototype.isMap=!0,GenericMap.prototype.addEach=function(values){var i;if(values&&Object(values)===values)if("function"==typeof values.forEach)!0===values.isMap?values.forEach((function(value,key){this.set(key,value)}),this):values.forEach((function(pair){this.set(pair[0],pair[1])}),this);else if("number"==typeof values.length)for(i=0;i<values.length;i++)this.add(values[i],i);else Object.keys(values).forEach((function(key){this.set(key,values[key])}),this);else if(values&&"number"==typeof values.length)for(i=0;i<values.length;i++)this.add(values[i],i);return this},GenericMap.prototype.get=function(key,defaultValue){var item=this.store.get(new this.Item(key));return item?item.value:arguments.length>1?(console.log("Use of a second argument as default value is deprecated to match standards"),defaultValue):this.getDefault(key)},GenericMap.prototype.set=function(key,value){var item=new this.Item(key,value),found=this.store.get(item);return found?(this.dispatchesMapChanges&&this.dispatchBeforeMapChange(key,found.value),found.value=value,this.dispatchesMapChanges&&this.dispatchMapChange(key,value)):(this.dispatchesMapChanges&&this.dispatchBeforeMapChange(key,void 0),this.store.add(item)&&this.length++,this.dispatchesMapChanges&&this.dispatchMapChange(key,value)),this},GenericMap.prototype.add=function(value,key){return this.set(key,value)},GenericMap.prototype.has=function(key){return this.store.has(new this.Item(key))},GenericMap.prototype.delete=function(key){var item=new this.Item(key);if(this.store.has(item)){var from=this.store.get(item).value;return this.dispatchesMapChanges&&this.dispatchBeforeMapChange(key,from),this.store.delete(item),this.length--,this.dispatchesMapChanges&&this.dispatchMapChange(key,void 0),!0}return!1},GenericMap.prototype.clear=function(){var keys,key;if(this.dispatchesMapChanges&&(this.forEach((function(value,key){this.dispatchBeforeMapChange(key,value)}),this),keys=this.keysArray()),this.store.clear(),this.length=0,this.dispatchesMapChanges)for(var i=0;key=keys[i];i++)this.dispatchMapChange(key)},GenericMap.prototype.reduce=function(callback,basis,thisp){return this.store.reduce((function(basis,item){return callback.call(thisp,basis,item.value,item.key,this)}),basis,this)},GenericMap.prototype.reduceRight=function(callback,basis,thisp){return this.store.reduceRight((function(basis,item){return callback.call(thisp,basis,item.value,item.key,this)}),basis,this)},GenericMap.prototype.keysArray=function(){return this.map((function(value,key){return key}))},GenericMap.prototype.keys=function(){return new Iterator(this.keysArray(),!0)},GenericMap.prototype.valuesArray=function(){return this.map(Function.identity)},GenericMap.prototype.values=function(){return new Iterator(this.valuesArray(),!0)},GenericMap.prototype.entriesArray=function(){return this.map((function(value,key){return[key,value]}))},GenericMap.prototype.entries=function(){return new Iterator(this.entriesArray(),!0)},GenericMap.prototype.items=function(){return this.entriesArray()},GenericMap.prototype.equals=function(that,equals){return equals=equals||Object.equals,this===that||(that&&"function"==typeof that.every?that.length===this.length&&that.every((function(value,key){return equals(this.get(key),value)}),this):Object.keys(that).length===this.length&&Object.keys(that).every((function(key){return equals(this.get(key),that[key])}),this))},GenericMap.prototype.toJSON=function(){return this.entriesArray()},GenericMap.prototype.Item=Item,Item.prototype.equals=function(that){return Object.equals(this.key,that.key)&&Object.equals(this.value,that.value)},Item.prototype.compare=function(that){return Object.compare(this.key,that.key)},genericMap}function requireTreeLog(){if(hasRequiredTreeLog)return treeLog;function TreeLog(){}return hasRequiredTreeLog=1,treeLog=TreeLog,TreeLog.ascii={intersection:"+",through:"-",branchUp:"+",branchDown:"+",fromBelow:".",fromAbove:"'",fromBoth:"+",strafe:"|"},TreeLog.unicodeRound={intersection:"╋",through:"━",branchUp:"┻",branchDown:"┳",fromBelow:"╭",fromAbove:"╰",fromBoth:"┣",strafe:"┃"},TreeLog.unicodeSharp={intersection:"╋",through:"━",branchUp:"┻",branchDown:"┳",fromBelow:"┏",fromAbove:"┗",fromBoth:"┣",strafe:"┃"},treeLog}function require_fastSet(){if(hasRequired_fastSet)return _fastSet;hasRequired_fastSet=1,requireShim();var Dict=function(){if(hasRequired_dict)return _dict;hasRequired_dict=1,requireShim();var GenericCollection=requireGenericCollection(),GenericMap=requireGenericMap();function Dict(values,getDefault){if(!(this instanceof Dict))return new Dict(values,getDefault);getDefault=getDefault||Function.noop,this.getDefault=getDefault,this.store=Object.create(null),this.length=0,this.addEach(values)}return _dict=Dict,Dict.Dict=Dict,Object.addEach(Dict.prototype,GenericCollection.prototype),Object.addEach(Dict.prototype,GenericMap.prototype),Dict.from=GenericCollection.from,Dict.prototype.constructClone=function(values){return new this.constructor(values,this.getDefault)},Dict.prototype.assertString=function(key){if("string"!=typeof key)throw new TypeError("key must be a string but Got "+key)},Object.defineProperty(Dict.prototype,"$__proto__",{writable:!0}),Object.defineProperty(Dict.prototype,"_hasProto",{get:function(){return this.hasOwnProperty("$__proto__")&&void 0!==this._protoValue}}),Object.defineProperty(Dict.prototype,"_protoValue",{get:function(){return this.$__proto__},set:function(value){this.$__proto__=value}}),Object.defineProperty(Dict.prototype,"size",GenericCollection._sizePropertyDescriptor),Dict.prototype.get=function(key,defaultValue){return this.assertString(key),"__proto__"===key?this._hasProto?this._protoValue:arguments.length>1?defaultValue:this.getDefault(key):key in this.store?this.store[key]:arguments.length>1?defaultValue:this.getDefault(key)},Dict.prototype.set=function(key,value){this.assertString(key);var isProtoKey="__proto__"===key;return(isProtoKey?this._hasProto:key in this.store)?(this.dispatchesMapChanges&&this.dispatchBeforeMapChange(key,isProtoKey?this._protoValue:this.store[key]),isProtoKey?this._protoValue=value:this.store[key]=value,this.dispatchesMapChanges&&this.dispatchMapChange(key,value),!1):(this.dispatchesMapChanges&&this.dispatchBeforeMapChange(key,void 0),this.length++,isProtoKey?this._protoValue=value:this.store[key]=value,this.dispatchesMapChanges&&this.dispatchMapChange(key,value),!0)},Dict.prototype.has=function(key){return this.assertString(key),"__proto__"===key?this._hasP