UNPKG

gojs

Version:

Interactive diagrams, charts, and graphs, such as trees, flowcharts, orgcharts, UML, BPMN, or business diagrams

121 lines 837 kB
/* * GoJS v1.6.10 JavaScript Library for HTML Diagrams * Northwoods Software, https://www.nwoods.com/ * GoJS and Northwoods Software are registered trademarks of Northwoods Software Corporation. * Copyright (C) 1998-2016 by Northwoods Software Corporation. All Rights Reserved. * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/1.6.10/doc/license.html. */ (function(window) { var g,ea={};if(!window.document||void 0===window.document.createElement("canvas").getContext)throw window.console&&window.console.log("The HTML Canvas element is not supported in this browser,or this browser is in Compatibility mode."),Error("The HTML Canvas element is not supported in this browser,or this browser is in Compatibility mode.");if(!Object.defineProperty)throw Error("GoJS requires a newer version of JavaScript"); Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return f.apply(a,e.concat(d.call(arguments)))}function c(){}var d=Array.prototype.slice,e=d.call(arguments,1),f=this;c.prototype=this.prototype;b.prototype=new c;return b}); (function(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c<b.length&&!window.requestAnimationFrame;++c)window.requestAnimationFrame=window[b[c]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[b[c]+"CancelAnimationFrame"]||window[b[c]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(b){var c=(new Date).getTime(),f=Math.max(8,16-(c-a)),h=window.setTimeout(function(){b(c+f)},f);a=c+f;return h});window.cancelAnimationFrame||(window.cancelAnimationFrame= function(a){window.clearTimeout(a)})})();ea.Debug=null; var v={gd:1,Nc:2,Xc:4,Wc:8,an:void 0!==window.navigator&&0<window.navigator.userAgent.indexOf("534.30")&&0<window.navigator.userAgent.indexOf("Android"),eI:void 0!==window.navigator&&0<window.navigator.userAgent.indexOf("MSIE 10.0"),fI:void 0!==window.navigator&&0<window.navigator.userAgent.indexOf("Trident/7"),JK:void 0!==window.navigator&&0<window.navigator.userAgent.indexOf("Edge/"),fk:void 0!==window.navigator&&void 0!==window.navigator.platform&&0<=window.navigator.platform.toUpperCase().indexOf("MAC"), FE:void 0!==window.navigator&&void 0!==window.navigator.platform&&null!==window.navigator.platform.match(/(iPhone|iPod|iPad)/i),YD:function(a,b,c){var d=-1;return function(){var e=this,f=arguments;-1!==d&&v.clearTimeout(d);d=v.setTimeout(function(){d=-1;c||a.apply(e,f)},b);c&&!d&&a.apply(e,f)}},setTimeout:function(a,b){return window.setTimeout(a,b)},clearTimeout:function(a){window.clearTimeout(a)},createElement:function(a){return window.document.createElement(a)},k:function(a){throw Error(a);},la:function(a, b){var c="The object is frozen, so its properties cannot be set: "+a.toString();void 0!==b&&(c+=" to value: "+b);v.k(c)},A:function(a,b,c,d){a instanceof b||(c=v.getTypeName(c),void 0!==d&&(c+="."+d),v.Ed(a,b,c))},j:function(a,b,c,d){typeof a!==b&&(c=v.getTypeName(c),void 0!==d&&(c+="."+d),v.Ed(a,b,c))},Ye:function(a,b,c){"number"===typeof a&&isFinite(a)||(b=v.getTypeName(b),void 0!==c&&(b+="."+c),v.k(b+" must be a real number type, and not NaN or Infinity: "+a))},rb:function(a,b,c,d){a instanceof fa&&a.qe===b||(c=v.getTypeName(c),void 0!==d&&(c+="."+d),v.Ed(a,"a constant of class "+v.df(b),c))},jK:function(a,b){"string"===typeof a?ga(a)||v.k('Color "'+a+'" is not a valid color string for '+b):a instanceof ha||v.k("Value for "+b+" must be a color string or a Brush, not "+a)},Ed:function(a,b,c,d){b=v.getTypeName(b);c=v.getTypeName(c);void 0!==d&&(c+="."+d);"string"===typeof a?v.k(c+" value is not an instance of "+b+': "'+a+'"'):v.k(c+" value is not an instance of "+b+": "+a)},wa:function(a, b,c,d){c=v.getTypeName(c);void 0!==d&&(c+="."+d);v.k(c+" is not in the range "+b+": "+a)},fd:function(a){v.k(v.df(a)+" constructor cannot take any arguments.")},La:function(a){v.k("Collection was modified during iteration: "+a.toString()+"\n Perhaps you should iterate over a copy of the collection,\n or you could collect items to be removed from the collection after the iteration.")},trace:function(a){window.console&&window.console.log(a)},Va:function(a){return"object"===typeof a&&null!==a},isArray:function(a){return Array.isArray(a)|| a instanceof NodeList||a instanceof HTMLCollection},gI:function(a){return Array.isArray(a)},Az:function(a,b,c){v.isArray(a)||v.Ed(a,"Array or NodeList or HTMLCollection",b,c)},Xa:function(a){return a.length},il:function(a){return Array.prototype.slice.call(a)},Pa:function(a,b){Array.isArray(a);return a[b]},HD:function(a,b,c){Array.isArray(a)?a[b]=c:v.k("Cannot replace an object in an HTMLCollection or NodeList at "+b)},zz:function(a,b){if(Array.isArray(a))return a.indexOf(b);for(var c=a.length,d= 0;d<c;d++)if(a[d]===b)return d;return-1},Si:function(a,b,c){Array.isArray(a)?b>=a.length?a.push(c):a.splice(b,0,c):v.k("Cannot insert an object into an HTMLCollection or NodeList: "+c+" at "+b)},Xh:function(a,b){Array.isArray(a)?b>=a.length?a.pop():a.splice(b,1):v.k("Cannot remove an object from an HTMLCollection or NodeList at "+b)},Zx:[],M:function(){var a=v.Zx.pop();return void 0===a?new w:a},Ob:function(a,b){var c=v.Zx.pop();if(void 0===c)return new w(a,b);c.x=a;c.y=b;return c},v:function(a){v.Zx.push(a)}, jB:[],Pl:function(){var a=v.jB.pop();return void 0===a?new ia:a},ck:function(a){v.jB.push(a)},$x:[],ag:function(){var a=v.$x.pop();return void 0===a?new z:a},lk:function(a,b,c,d){var e=v.$x.pop();if(void 0===e)return new z(a,b,c,d);e.x=a;e.y=b;e.width=c;e.height=d;return e},ic:function(a){v.$x.push(a)},kB:[],sh:function(){var a=v.kB.pop();return void 0===a?new la:a},cf:function(a){v.kB.push(a)},ay:null,q:function(){var a=v.ay;return null!==a?(v.ay=null,a):new na},s:function(a){a.reset();v.ay=a},iB:[], lb:function(){var a=v.iB.pop();return void 0===a?[]:a},ta:function(a){a.length=0;v.iB.push(a)},vh:Object.freeze([]),Tl:1,ec:function(a){a.__gohashid=v.Tl++},zt:function(a){var b=a.__gohashid;void 0===b&&(b=v.Tl++,a.__gohashid=b);return b},pd:function(a){return a.__gohashid},ea:function(a,b){b.ky=a;ea[a]=b},Ja:function(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},Yh:function(a){a.wG=!0},defineProperty:function(a,b,c,d,e){v.j(a,"function","Util.defineProperty:classfunc"); v.j(b,"object","Util.defineProperty:propobj");v.j(c,"function","Util.defineProperty:getter");v.j(d,"function","Util.defineProperty:setter");for(var f in b){b=b[f];c={get:c,set:d,enumerable:!0};if(void 0!==e)for(var h in e)c[h]=e[h];Object.defineProperty(a.prototype,f,c);e=Object.getOwnPropertyDescriptor(a.prototype,f);b&&e&&Object.defineProperty(a.prototype,b,e);break}},LJ:!1,u:function(a,b,c,d){v.j(a,"function","Util.defineReadOnlyProperty:classfunc");v.j(b,"object","Util.defineReadOnlyProperty:propobj"); v.j(c,"function","Util.defineReadOnlyProperty:getter");for(var e in b){var f=b[e];b={get:c,set:function(a){v.k('The property "'+f+'" is read-only and cannot be set to '+a)},enumerable:!0};if(void 0!==d)for(var h in d)b[h]=d[h];Object.defineProperty(a.prototype,e,b);d=Object.getOwnPropertyDescriptor(a.prototype,e);f&&d&&Object.defineProperty(a.prototype,f,d);break}},Nd:function(a,b){for(var c in b)b[c]=!0;a.prototype.sG=b},getTypeName:function(a){return void 0===a?"":"string"===typeof a?a:"function"=== typeof a?v.df(a):null===a?"*":""},df:function(a){if("function"===typeof a){if(a.ky)return a.ky;if(a.name)return a.name;var b=a.toString(),c=b.indexOf("("),b=b.substring(9,c).trim();if(""!==b)return a.ky=b}else if("object"===typeof a&&a.constructor)return v.df(a.constructor);return typeof a},p:function(a,b,c){v.j(a,"function","Util.defineEnumValue:classfunc");v.j(b,"string","Util.defineEnumValue:name");v.j(c,"number","Util.defineEnumValue:num");c=new fa(a,b,c);Object.freeze(c);a[b]=c;var d=a.vu;d instanceof pa||(d=new pa("string",fa),a.vu=d);d.add(b,c);return c},sb:function(a,b){if(!a||!b)return null;var c=void 0;try{"function"===typeof b?c=b(a):"function"===typeof a.getAttribute?(c=a.getAttribute(b),null===c&&(c=void 0)):c=a[b]}catch(d){}return c},Ka:function(a,b,c){if(a&&b)try{"function"===typeof b?b(a,c):"function"===typeof a.setAttribute?a.setAttribute(b,c):a[b]=c}catch(d){}},hu:function(a,b){v.j(a,"object","Setting properties requires Objects as arguments");v.j(b,"object","Setting properties requires Objects as arguments"); var c=a instanceof C,d=a instanceof E,e;for(e in b){""===e&&v.k("Setting properties requires non-empty property names");var f=a,h=e;if(c||d){var k=e.indexOf(".");if(0<k){var l=e.substring(0,k);if(c)f=a.ae(l);else if(f=a[l],void 0===f||null===f)f=a.cb[l];v.Va(f)?h=e.substr(k+1):v.k("Unable to find object named: "+l+" in "+a.toString()+" when trying to set property: "+e)}}if("_"!==h[0]&&!v.vE(f,h))if(d&&"ModelChanged"===h){a.KG(b[h]);continue}else if(d&&"Changed"===h){a.Gm(b[h]);continue}else if(d&& v.vE(a.cb,h))f=a.cb;else if(d&&qa(a,h)){a.uz(h,b[h]);continue}else if(a instanceof F&&"Changed"===h){a.Gm(b[h]);continue}else v.k('Trying to set undefined property "'+h+'" on object: '+f.toString());f[h]=b[e];"_"===h[0]&&f instanceof G&&f.HG(h)}},vE:function(a,b){if(a.hasOwnProperty(b))return!0;for(var c=Object.getPrototypeOf(a);c&&c!==Function;){if(c.hasOwnProperty(b))return!0;var d=c.sG;if(d&&d[b])return!0;c=Object.getPrototypeOf(c)}return!1},UI:function(a){for(var b=[],c=0;256>c;c++)b[c]=c;for(var d= 0,e=0,c=0;256>c;c++)d=(d+b[c]+119)%256,e=b[c],b[c]=b[d],b[d]=e;for(var d=c=0,f="",h=0;h<a.length;h++)c=(c+1)%256,d=(d+b[c])%256,e=b[c],b[c]=b[d],b[d]=e,f+=String.fromCharCode(a.charCodeAt(h)^b[(b[c]+b[d])%256]);return f},TH:function(a){for(var b=[],c=0;256>c;c++)b["0123456789abcdef".charAt(c>>4)+"0123456789abcdef".charAt(c&15)]=String.fromCharCode(c);a.length%2&&(a="0"+a);for(var d=[],e=0,c=0;c<a.length;c+=2)d[e++]=b[a.substr(c,2)];a=d.join("");return""===a?"0":a},sg:function(a){return v.UI(v.TH(a))}, Rl:null,adym:"7da71ca0ad381e90",YG:"@COLOR1",ZG:"@COLOR2"}; v.Rl=function(){var a=window.document.createElement("canvas"),b=a.getContext("2d");b[v.sg("7ca11abfd022028846")]=v.sg("398c3597c01238");for(var c=["5da73c80a3330d854f9e5e671d6633","32ab5ff3b26f42dc0ed90f22422913b54ae6247590da4bb21c324ba3a84e385776","54a702f3e53909c447824c6706603faf4cfb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387","74bf19bce72555874c86"],d=1;5>d;d++)b[v.sg("7ca11abfd7330390")](v.sg(c[d-1]),10,15*d+0);b[v.sg("7ca11abfd022028846")]=v.sg("39f046ebb36e4b");for(d=1;5>d;d++)b[v.sg("7ca11abfd7330390")](v.sg(c[d- 1]),10,15*d+0);if(4!==c.length||"5"!==c[0][0]||"7"!==c[3][0])v.p=function(a,b){var c=new fa(a,b,2);Object.freeze(c);a[b]=c;var d=a.vu;d instanceof pa||(d=new pa("string",fa),a.vu=d);d.add(b,c);return c};return a}();function fa(a,b,c){v.ec(this);this.yB=a;this.Qb=b;this.BG=c}v.ea("EnumValue",fa);fa.prototype.toString=function(){return v.df(this.yB)+"."+this.Qb};v.u(fa,{qe:"classType"},function(){return this.yB});v.u(fa,{name:"name"},function(){return this.Qb});v.u(fa,{value:"value"},function(){return this.BG}); var ra;fa.findName=ra=function(a,b){if(void 0===b||null===b||""===b)return null;v.j(a,"function","findName:classfunc");v.j(b,"string","EnumValue.findName:name");var c=a.vu;return c instanceof pa?c.ka(b):null};function sa(){this.wB=[]}sa.prototype.toString=function(){return this.wB.join("")};sa.prototype.add=function(a){""!==a&&this.wB.push(a)};function ua(){} function va(a){void 0===a&&(a=42);this.seed=a;this.Rx=48271;this.uu=2147483647;this.gB=this.uu/this.Rx;this.aG=this.uu%this.Rx;this.WF=1/this.uu;this.random()}va.prototype.random=function(){var a=this.seed%this.gB*this.Rx-this.seed/this.gB*this.aG;this.seed=0<a?a:a+this.uu;return this.seed*this.WF};function wa(){}v.u(wa,{i:"iterator"},function(){return this});wa.prototype.reset=wa.prototype.reset=function(){};wa.prototype.next=wa.prototype.hasNext=wa.prototype.next=function(){return!1}; wa.prototype.first=wa.prototype.first=function(){return null};wa.prototype.any=function(){return!1};wa.prototype.all=function(){return!0};wa.prototype.each=function(){return this};wa.prototype.map=function(){return this};wa.prototype.filter=function(){return this};wa.prototype.concat=function(a){return a.i};v.u(wa,{count:"count"},function(){return 0});wa.prototype.Df=function(){};wa.prototype.toString=function(){return"EmptyIterator"};var xa=new wa;function ya(a){this.key=-1;this.value=a} v.Nd(ya,{key:!0,value:!0});v.u(ya,{i:"iterator"},function(){return this});ya.prototype.reset=ya.prototype.reset=function(){this.key=-1};ya.prototype.next=ya.prototype.hasNext=ya.prototype.next=function(){return-1===this.key?(this.key=0,!0):!1};ya.prototype.first=ya.prototype.first=function(){this.key=0;return this.value};ya.prototype.any=function(a){this.key=-1;return a(this.value)};ya.prototype.all=function(a){this.key=-1;return a(this.value)}; ya.prototype.each=function(a){this.key=-1;a(this.value);return this};ya.prototype.map=function(a){return new ya(a(this.value))};ya.prototype.filter=function(a){return a(this.value)?new ya(this.value):xa};ya.prototype.concat=function(a){return new za(this,a.i)};v.u(ya,{count:"count"},function(){return 1});ya.prototype.Df=function(){this.value=null};ya.prototype.toString=function(){return"SingletonIterator("+this.value+")"};function za(a,b){this.Lk=a;this.Mk=b;this.yu=!1}v.Nd(za,{key:!0,value:!0}); v.u(za,{i:"iterator"},function(){return this});za.prototype.reset=za.prototype.reset=function(){this.Lk.reset();this.Mk.reset();this.yu=!1};za.prototype.next=za.prototype.hasNext=za.prototype.next=function(){if(!this.yu){var a=this.Lk;if(a.next())return this.key=a.key,this.value=a.value,!0;this.yu=!0}return this.yu&&(a=this.Mk,a.next())?(this.key=a.key,this.value=a.value,!0):!1};za.prototype.first=za.prototype.first=function(){this.reset();return this.next()?this.value:null}; za.prototype.any=function(a){return this.Lk.any(a)||this.Mk.any(a)?!0:!1};za.prototype.all=function(a){return this.Lk.all(a)&&this.Mk.all(a)?!0:!1};za.prototype.each=function(a){this.Lk.each(a);this.Mk.each(a);return this};za.prototype.map=function(a){return new za(this.Lk.map(a),this.Mk.map(a))};za.prototype.filter=function(a){return new za(this.Lk.filter(a),this.Mk.filter(a))};za.prototype.concat=function(a){return new za(this,a.i)};v.u(za,{count:"count"},function(){return this.Lk.count+this.Mk.count}); za.prototype.Df=function(){this.value=this.key=null};za.prototype.toString=function(){return"ConcatIterator()"};function Aa(a){this.tc=a;this.Lh=null;this.reset()}v.Nd(Aa,{key:!0,value:!0});v.u(Aa,{i:"iterator"},function(){return this});v.defineProperty(Aa,{hn:"predicate"},function(){return this.Lh},function(a){this.Lh=a});Aa.prototype.reset=Aa.prototype.reset=function(){var a=this.tc;a.Xb=null;this.gb=a.F;this.Oc=-1}; Aa.prototype.next=Aa.prototype.hasNext=Aa.prototype.next=function(){var a=this.tc;if(a.F!==this.gb){if(0>this.key)return!1;v.La(a)}var a=a.n,b=a.length,c=++this.Oc,d=this.Lh;if(null!==d)for(;c<b;){var e=a[c];if(d(e))return this.key=this.Oc=c,this.value=e,!0;c++}else{if(c<b)return this.key=c,this.value=a[c],!0;this.Df()}return!1}; Aa.prototype.first=Aa.prototype.first=function(){var a=this.tc;this.gb=a.F;this.Oc=0;var a=a.n,b=a.length,c=this.Lh;if(null!==c){for(var d=0;d<b;){var e=a[d];if(c(e))return this.key=this.Oc=d,this.value=e;d++}return null}return 0<b?(e=a[0],this.key=0,this.value=e):null};Aa.prototype.any=function(a){var b=this.tc;b.Xb=null;var c=b.F;this.Oc=-1;for(var d=b.n,e=d.length,f=this.Lh,h=0;h<e;h++){var k=d[h];if(null===f||f(k)){if(a(k))return!0;b.F!==c&&v.La(b)}}return!1}; Aa.prototype.all=function(a){var b=this.tc;b.Xb=null;var c=b.F;this.Oc=-1;for(var d=b.n,e=d.length,f=this.Lh,h=0;h<e;h++){var k=d[h];if(null===f||f(k)){if(!a(k))return!1;b.F!==c&&v.La(b)}}return!0};Aa.prototype.each=function(a){var b=this.tc;b.Xb=null;var c=b.F;this.Oc=-1;for(var d=b.n,e=d.length,f=this.Lh,h=0;h<e;h++){var k=d[h];if(null===f||f(k))a(k),b.F!==c&&v.La(b)}return this}; Aa.prototype.map=function(a){var b=this.tc;b.Xb=null;var c=b.F;this.Oc=-1;for(var d=[],e=b.n,f=e.length,h=this.Lh,k=0;k<f;k++){var l=e[k];if(null===h||h(l))d.push(a(l)),b.F!==c&&v.La(b)}a=new H;a.n=d;a.Bc();return a.i};Aa.prototype.filter=function(a){var b=this.tc;b.Xb=null;var c=b.F;this.Oc=-1;for(var d=[],e=b.n,f=e.length,h=this.Lh,k=0;k<f;k++){var l=e[k];if(null===h||h(l))a(l)&&d.push(l),b.F!==c&&v.La(b)}a=new H(b.ja);a.n=d;a.Bc();return a.i}; Aa.prototype.concat=function(a){this.tc.Xb=null;return new za(this,a.i)};v.u(Aa,{count:"count"},function(){var a=this.Lh;if(null!==a){for(var b=0,c=this.tc.n,d=c.length,e=0;e<d;e++)a(c[e])&&b++;return b}return this.tc.n.length});Aa.prototype.Df=function(){this.key=-1;this.value=null;this.gb=-1;this.Lh=null;this.tc.Xb=this};Aa.prototype.toString=function(){return"ListIterator@"+this.Oc+"/"+this.tc.count};function Ca(a){this.tc=a;this.reset()}v.Nd(Ca,{key:!0,value:!0});v.u(Ca,{i:"iterator"},function(){return this}); Ca.prototype.reset=Ca.prototype.reset=function(){var a=this.tc;a.xj=null;this.gb=a.F;this.Oc=a.n.length};Ca.prototype.next=Ca.prototype.hasNext=Ca.prototype.next=function(){var a=this.tc;if(a.F!==this.gb){if(0>this.key)return!1;v.La(a)}var b=--this.Oc;if(0<=b)return this.key=b,this.value=a.n[b],!0;this.Df();return!1};Ca.prototype.first=Ca.prototype.first=function(){var a=this.tc;this.gb=a.F;var b=a.n;this.Oc=a=b.length-1;return 0<=a?(b=b[a],this.key=a,this.value=b):null}; Ca.prototype.any=function(a){var b=this.tc;b.xj=null;var c=b.F,d=b.n,e=d.length;this.Oc=e;for(e-=1;0<=e;e--){if(a(d[e]))return!0;b.F!==c&&v.La(b)}return!1};Ca.prototype.all=function(a){var b=this.tc;b.xj=null;var c=b.F,d=b.n,e=d.length;this.Oc=e;for(e-=1;0<=e;e--){if(!a(d[e]))return!1;b.F!==c&&v.La(b)}return!0};Ca.prototype.each=function(a){var b=this.tc;b.xj=null;var c=b.F,d=b.n,e=d.length;this.Oc=e;for(e-=1;0<=e;e--)a(d[e]),b.F!==c&&v.La(b);return this}; Ca.prototype.map=function(a){var b=this.tc;b.xj=null;var c=b.F,d=[],e=b.n,f=e.length;this.Oc=f;for(f-=1;0<=f;f--)d.push(a(e[f])),b.F!==c&&v.La(b);a=new H;a.n=d;a.Bc();return a.i};Ca.prototype.filter=function(a){var b=this.tc;b.xj=null;var c=b.F,d=[],e=b.n,f=e.length;this.Oc=f;for(f-=1;0<=f;f--){var h=e[f];a(h)&&d.push(h);b.F!==c&&v.La(b)}a=new H(b.ja);a.n=d;a.Bc();return a.i};Ca.prototype.concat=function(a){this.tc.xj=null;return new za(this,a.i)};v.u(Ca,{count:"count"},function(){return this.tc.n.length}); Ca.prototype.Df=function(){this.key=-1;this.value=null;this.gb=-1;this.tc.xj=this};Ca.prototype.toString=function(){return"ListIteratorBackwards("+this.Oc+"/"+this.tc.count+")"}; function H(a){v.ec(this);this.D=!1;this.n=[];this.F=0;this.xj=this.Xb=null;void 0===a||null===a?this.ja=null:"string"===typeof a?"object"===a||"string"===a||"number"===a||"boolean"===a||"function"===a?this.ja=a:v.wa(a,"the string 'object', 'number', 'string', 'boolean', or 'function'","List constructor: type"):"function"===typeof a?this.ja=a===Object?"object":a===String?"string":a===Number?"number":a===Boolean?"boolean":a===Function?"function":a:v.wa(a,"null, a primitive type name, or a class type", "List constructor: type")}v.ea("List",H);H.prototype.Bc=function(){var a=this.F;a++;999999999<a&&(a=0);this.F=a};H.prototype.freeze=H.prototype.freeze=function(){this.D=!0;return this};H.prototype.thaw=H.prototype.Oa=function(){this.D=!1;return this};H.prototype.toString=function(){return"List("+v.getTypeName(this.ja)+")#"+v.pd(this)};H.prototype.add=H.prototype.push=H.prototype.add=function(a){null!==a&&(this.D&&v.la(this,a),this.n.push(a),this.Bc())}; H.prototype.addAll=H.prototype.Tc=function(a){if(null===a)return this;this.D&&v.la(this);var b=this.n;if(v.isArray(a))for(var c=v.Xa(a),d=0;d<c;d++){var e=v.Pa(a,d);b.push(e)}else for(a=a.i;a.next();)e=a.value,b.push(e);this.Bc();return this};H.prototype.clear=H.prototype.clear=function(){this.D&&v.la(this);this.n.length=0;this.Bc()};H.prototype.contains=H.prototype.has=H.prototype.contains=function(a){return null===a?!1:-1!==this.n.indexOf(a)}; H.prototype.indexOf=H.prototype.indexOf=function(a){return null===a?-1:this.n.indexOf(a)};H.prototype.elt=H.prototype.get=H.prototype.ha=function(a){var b=this.n;(0>a||a>=b.length)&&v.wa(a,"0 <= i < length",H,"elt:i");return b[a]};H.prototype.setElt=H.prototype.set=H.prototype.Dg=function(a,b){var c=this.n;(0>a||a>=c.length)&&v.wa(a,"0 <= i < length",H,"setElt:i");this.D&&v.la(this,a);c[a]=b};H.prototype.first=H.prototype.first=function(){var a=this.n;return 0===a.length?null:a[0]}; H.prototype.last=H.prototype.Rd=function(){var a=this.n,b=a.length;return 0<b?a[b-1]:null};H.prototype.pop=H.prototype.pop=function(){this.D&&v.la(this);var a=this.n;return 0<a.length?a.pop():null};H.prototype.any=function(a){for(var b=this.n,c=this.F,d=b.length,e=0;e<d;e++){if(a(b[e]))return!0;this.F!==c&&v.La(this)}return!1};H.prototype.all=function(a){for(var b=this.n,c=this.F,d=b.length,e=0;e<d;e++){if(!a(b[e]))return!1;this.F!==c&&v.La(this)}return!0}; H.prototype.each=function(a){for(var b=this.n,c=this.F,d=b.length,e=0;e<d;e++)a(b[e]),this.F!==c&&v.La(this);return this};H.prototype.map=function(a){for(var b=new H,c=[],d=this.n,e=this.F,f=d.length,h=0;h<f;h++)c.push(a(d[h])),this.F!==e&&v.La(this);b.n=c;b.Bc();return b};H.prototype.filter=function(a){for(var b=new H(this.ja),c=[],d=this.n,e=this.F,f=d.length,h=0;h<f;h++){var k=d[h];a(k)&&c.push(k);this.F!==e&&v.La(this)}b.n=c;b.Bc();return b};H.prototype.concat=function(a){return this.copy().Tc(a)}; H.prototype.insertAt=H.prototype.Cd=function(a,b){0>a&&v.wa(a,">= 0",H,"insertAt:i");this.D&&v.la(this,a);var c=this.n;a>=c.length?c.push(b):c.splice(a,0,b);this.Bc();return!0};H.prototype.remove=H.prototype["delete"]=H.prototype.remove=function(a){if(null===a)return!1;this.D&&v.la(this,a);var b=this.n;a=b.indexOf(a);if(-1===a)return!1;a===b.length-1?b.pop():b.splice(a,1);this.Bc();return!0}; H.prototype.removeAt=H.prototype.Vc=function(a){var b=this.n;(0>a||a>=b.length)&&v.wa(a,"0 <= i < length",H,"removeAt:i");this.D&&v.la(this,a);a===b.length-1?b.pop():b.splice(a,1);this.Bc()};H.prototype.removeRange=H.prototype.removeRange=function(a,b){var c=this.n;(0>a||a>=c.length)&&v.wa(a,"0 <= from < length",H,"elt:from");(0>b||b>=c.length)&&v.wa(b,"0 <= to < length",H,"elt:to");this.D&&v.la(this,a);var d=c.slice((b||a)+1||c.length);c.length=0>a?c.length+a:a;c.push.apply(c,d);this.Bc()}; H.prototype.copy=function(){var a=new H(this.ja),b=this.n;0<b.length&&(a.n=Array.prototype.slice.call(b));return a};H.prototype.toArray=H.prototype.dc=function(){for(var a=this.n,b=this.count,c=Array(b),d=0;d<b;d++)c[d]=a[d];return c};H.prototype.toSet=H.prototype.GF=function(){for(var a=new J(this.ja),b=this.n,c=this.count,d=0;d<c;d++)a.add(b[d]);return a};H.prototype.sort=H.prototype.sort=function(a){this.D&&v.la(this);this.n.sort(a);this.Bc();return this}; H.prototype.sortRange=H.prototype.Rp=function(a,b,c){var d=this.n,e=d.length;void 0===b&&(b=0);void 0===c&&(c=e);this.D&&v.la(this);var f=c-b;if(1>=f)return this;(0>b||b>=e-1)&&v.wa(b,"0 <= from < length",H,"sortRange:from");if(2===f)return c=d[b],e=d[b+1],0<a(c,e)&&(d[b]=e,d[b+1]=c,this.Bc()),this;if(0===b)if(c>=e)d.sort(a);else for(f=d.slice(0,c),f.sort(a),a=0;a<c;a++)d[a]=f[a];else if(c>=e)for(f=d.slice(b),f.sort(a),a=b;a<e;a++)d[a]=f[a-b];else for(f=d.slice(b,c),f.sort(a),a=b;a<c;a++)d[a]=f[a- b];this.Bc();return this};H.prototype.reverse=H.prototype.reverse=function(){this.D&&v.la(this);this.n.reverse();this.Bc();return this};v.u(H,{count:"count"},function(){return this.n.length});v.u(H,{size:"size"},function(){return this.n.length});v.u(H,{length:"length"},function(){return this.n.length});v.u(H,{i:"iterator"},function(){if(0>=this.n.length)return xa;var a=this.Xb;return null!==a?(a.reset(),a):new Aa(this)}); v.u(H,{cn:"iteratorBackwards"},function(){if(0>=this.n.length)return xa;var a=this.xj;return null!==a?(a.reset(),a):new Ca(this)});function Da(a){this.Nh=a;this.reset()}v.Nd(Da,{key:!0,value:!0});v.u(Da,{i:"iterator"},function(){return this});Da.prototype.reset=Da.prototype.reset=function(){var a=this.Nh;a.Xb=null;this.gb=a.F;this.fb=null}; Da.prototype.next=Da.prototype.hasNext=Da.prototype.next=function(){var a=this.Nh;if(a.F!==this.gb){if(null===this.key)return!1;v.La(a)}var b=this.fb,b=null===b?a.Ea:b.Wa;if(null!==b)return this.fb=b,this.value=b.value,this.key=b.key,!0;this.Df();return!1};Da.prototype.first=Da.prototype.first=function(){var a=this.Nh;this.gb=a.F;a=a.Ea;if(null!==a){this.fb=a;var b=a.value;this.key=a.key;return this.value=b}return null}; Da.prototype.any=function(a){var b=this.Nh;b.Xb=null;var c=b.F;this.fb=null;for(var d=b.Ea;null!==d;){if(a(d.value))return!0;b.F!==c&&v.La(b);d=d.Wa}return!1};Da.prototype.all=function(a){var b=this.Nh;b.Xb=null;var c=b.F;this.fb=null;for(var d=b.Ea;null!==d;){if(!a(d.value))return!1;b.F!==c&&v.La(b);d=d.Wa}return!0};Da.prototype.each=function(a){var b=this.Nh;b.Xb=null;var c=b.F;this.fb=null;for(var d=b.Ea;null!==d;)a(d.value),b.F!==c&&v.La(b),d=d.Wa;return this}; Da.prototype.map=function(a){var b=this.Nh;b.Xb=null;for(var c=new H,d=b.F,e=b.Ea;null!==e;)c.add(a(e.value)),b.F!==d&&v.La(b),e=e.Wa;return c.i};Da.prototype.filter=function(a){var b=this.Nh;b.Xb=null;for(var c=new H(b.ja),d=b.F,e=b.Ea;null!==e;){var f=e.value;a(f)&&c.add(f);b.F!==d&&v.La(b);e=e.Wa}return c.i};Da.prototype.concat=function(a){this.Nh.Xb=null;return new za(this,a.i)};v.u(Da,{count:"count"},function(){return this.Nh.jd}); Da.prototype.Df=function(){this.value=this.key=null;this.gb=-1;this.Nh.Xb=this};Da.prototype.toString=function(){return null!==this.fb?"SetIterator@"+this.fb.value:"SetIterator"}; function J(a){v.ec(this);this.D=!1;void 0===a||null===a?this.ja=null:"string"===typeof a?"object"===a||"string"===a||"number"===a?this.ja=a:v.wa(a,"the string 'object', 'number' or 'string'","Set constructor: type"):"function"===typeof a?this.ja=a===Object?"object":a===String?"string":a===Number?"number":a:v.wa(a,"null, a primitive type name, or a class type","Set constructor: type");this.kd={};this.jd=0;this.Xb=null;this.F=0;this.Ih=this.Ea=null}v.ea("Set",J); J.prototype.Bc=function(){var a=this.F;a++;999999999<a&&(a=0);this.F=a};J.prototype.freeze=J.prototype.freeze=function(){this.D=!0;return this};J.prototype.thaw=J.prototype.Oa=function(){this.D=!1;return this};J.prototype.toString=function(){return"Set("+v.getTypeName(this.ja)+")#"+v.pd(this)}; J.prototype.add=J.prototype.add=function(a){if(null===a)return!1;this.D&&v.la(this,a);var b=a;v.Va(a)&&(b=v.zt(a));return void 0===this.kd[b]?(this.jd++,a=new Ga(a,a),this.kd[b]=a,b=this.Ih,null===b?this.Ea=a:(a.to=b,b.Wa=a),this.Ih=a,this.Bc(),!0):!1};J.prototype.addAll=J.prototype.Tc=function(a){if(null===a)return this;this.D&&v.la(this);if(v.isArray(a))for(var b=v.Xa(a),c=0;c<b;c++)this.add(v.Pa(a,c));else for(a=a.i;a.next();)this.add(a.value);return this}; J.prototype.contains=J.prototype.has=J.prototype.contains=function(a){if(null===a)return!1;var b=a;return v.Va(a)&&(b=v.pd(a),void 0===b)?!1:void 0!==this.kd[b]};J.prototype.containsAll=function(a){if(null===a)return!0;for(a=a.i;a.next();)if(!this.contains(a.value))return!1;return!0};J.prototype.containsAny=function(a){if(null===a)return!0;for(a=a.i;a.next();)if(this.contains(a.value))return!0;return!1};J.prototype.first=J.prototype.first=function(){var a=this.Ea;return null===a?null:a.value}; J.prototype.any=function(a){for(var b=this.F,c=this.Ea;null!==c;){if(a(c.value))return!0;this.F!==b&&v.La(this);c=c.Wa}return!1};J.prototype.all=function(a){for(var b=this.F,c=this.Ea;null!==c;){if(!a(c.value))return!1;this.F!==b&&v.La(this);c=c.Wa}return!0};J.prototype.each=function(a){for(var b=this.F,c=this.Ea;null!==c;)a(c.value),this.F!==b&&v.La(this),c=c.Wa;return this};J.prototype.map=function(a){for(var b=new J,c=this.F,d=this.Ea;null!==d;)b.add(a(d.value)),this.F!==c&&v.La(this),d=d.Wa;return b}; J.prototype.filter=function(a){for(var b=new J(this.ja),c=this.F,d=this.Ea;null!==d;){var e=d.value;a(e)&&b.add(e);this.F!==c&&v.La(this);d=d.Wa}return b};J.prototype.concat=function(a){return this.copy().Tc(a)}; J.prototype.remove=J.prototype["delete"]=J.prototype.remove=function(a){if(null===a)return!1;this.D&&v.la(this,a);var b=a;if(v.Va(a)&&(b=v.pd(a),void 0===b))return!1;a=this.kd[b];if(void 0===a)return!1;var c=a.Wa,d=a.to;null!==c&&(c.to=d);null!==d&&(d.Wa=c);this.Ea===a&&(this.Ea=c);this.Ih===a&&(this.Ih=d);delete this.kd[b];this.jd--;this.Bc();return!0}; J.prototype.removeAll=J.prototype.CA=function(a){if(null===a)return this;this.D&&v.la(this);if(v.isArray(a))for(var b=v.Xa(a),c=0;c<b;c++)this.remove(v.Pa(a,c));else for(a=a.i;a.next();)this.remove(a.value);return this};J.prototype.retainAll=function(a){if(null===a||0===this.count)return this;this.D&&v.la(this);var b=new J(this.ja);b.Tc(a);a=[];for(var c=this.i;c.next();){var d=c.value;b.contains(d)||a.push(d)}this.CA(a);return this}; J.prototype.clear=J.prototype.clear=function(){this.D&&v.la(this);this.kd={};this.jd=0;this.Ih=this.Ea=null;this.Bc()};J.prototype.copy=function(){var a=new J(this.ja),b=this.kd,c;for(c in b)a.add(b[c].value);return a};J.prototype.toArray=J.prototype.dc=function(){var a=Array(this.jd),b=this.kd,c=0,d;for(d in b)a[c]=b[d].value,c++;return a};J.prototype.toList=function(){var a=new H(this.ja),b=this.kd,c;for(c in b)a.add(b[c].value);return a};v.u(J,{count:"count"},function(){return this.jd}); v.u(J,{size:"size"},function(){return this.jd});v.u(J,{i:"iterator"},function(){if(0>=this.jd)return xa;var a=this.Xb;return null!==a?(a.reset(),a):new Da(this)});function Ia(a){this.Ha=a;this.reset()}v.Nd(Ia,{key:!0,value:!0});v.u(Ia,{i:"iterator"},function(){return this});Ia.prototype.reset=Ia.prototype.reset=function(){this.gb=this.Ha.F;this.fb=null}; Ia.prototype.next=Ia.prototype.hasNext=Ia.prototype.next=function(){var a=this.Ha;if(a.F!==this.gb){if(null===this.key)return!1;v.La(a)}var b=this.fb,b=null===b?a.Ea:b.Wa;if(null!==b)return this.fb=b,this.value=this.key=a=b.key,!0;this.Df();return!1};Ia.prototype.first=Ia.prototype.first=function(){var a=this.Ha;this.gb=a.F;a=a.Ea;return null!==a?(this.fb=a,this.value=this.key=a=a.key):null}; Ia.prototype.any=function(a){var b=this.Ha,c=b.F;this.fb=null;for(var d=b.Ea;null!==d;){if(a(d.key))return!0;b.F!==c&&v.La(b);d=d.Wa}return!1};Ia.prototype.all=function(a){var b=this.Ha,c=b.F;this.fb=null;for(var d=b.Ea;null!==d;){if(!a(d.key))return!1;b.F!==c&&v.La(b);d=d.Wa}return!0};Ia.prototype.each=function(a){var b=this.Ha,c=b.F;this.fb=null;for(var d=b.Ea;null!==d;)a(d.key),b.F!==c&&v.La(b),d=d.Wa;return this}; Ia.prototype.map=function(a){var b=this.Ha,c=b.F;this.fb=null;for(var d=new H,e=b.Ea;null!==e;)d.add(a(e.key)),b.F!==c&&v.La(b),e=e.Wa;return d.i};Ia.prototype.filter=function(a){var b=this.Ha,c=b.F;this.fb=null;for(var d=new H(b.yi),e=b.Ea;null!==e;){var f=e.key;a(f)&&d.add(f);b.F!==c&&v.La(b);e=e.Wa}return d.i};Ia.prototype.concat=function(a){return new za(this,a.i)};v.u(Ia,{count:"count"},function(){return this.Ha.jd});Ia.prototype.Df=function(){this.value=this.key=null;this.gb=-1}; Ia.prototype.toString=function(){return null!==this.fb?"MapKeySetIterator@"+this.fb.value:"MapKeySetIterator"};function Ka(a){v.ec(this);this.D=!0;this.Ha=a}v.Ja(Ka,J);Ka.prototype.freeze=function(){return this};Ka.prototype.Oa=function(){return this};Ka.prototype.toString=function(){return"MapKeySet("+this.Ha.toString()+")"};Ka.prototype.add=Ka.prototype.set=Ka.prototype.add=function(){v.k("This Set is read-only: "+this.toString());return!1}; Ka.prototype.contains=Ka.prototype.has=Ka.prototype.contains=function(a){return this.Ha.contains(a)};Ka.prototype.remove=Ka.prototype["delete"]=Ka.prototype.remove=function(){v.k("This Set is read-only: "+this.toString());return!1};Ka.prototype.clear=Ka.prototype.clear=function(){v.k("This Set is read-only: "+this.toString())};Ka.prototype.first=Ka.prototype.first=function(){var a=this.Ha.Ea;return null!==a?a.key:null}; Ka.prototype.any=function(a){for(var b=this.Ha.Ea;null!==b;){if(a(b.key))return!0;b=b.Wa}return!1};Ka.prototype.all=function(a){for(var b=this.Ha.Ea;null!==b;){if(!a(b.key))return!1;b=b.Wa}return!0};Ka.prototype.each=function(a){for(var b=this.Ha.Ea;null!==b;)a(b.key),b=b.Wa;return this};Ka.prototype.map=function(a){for(var b=new J,c=this.Ha.Ea;null!==c;)b.add(a(c.key)),c=c.Wa;return b}; Ka.prototype.filter=function(a){for(var b=new J(this.Ha.yi),c=this.Ha.Ea;null!==c;){var d=c.key;a(d)&&b.add(d);c=c.Wa}return b};Ka.prototype.concat=function(a){return this.GF().Tc(a)};Ka.prototype.copy=function(){return new Ka(this.Ha)};Ka.prototype.toSet=Ka.prototype.GF=function(){var a=new J(this.Ha.yi),b=this.Ha.kd,c;for(c in b)a.add(b[c].key);return a};Ka.prototype.toArray=Ka.prototype.dc=function(){var a=this.Ha.kd,b=Array(this.Ha.jd),c=0,d;for(d in a)b[c]=a[d].key,c++;return b}; Ka.prototype.toList=function(){var a=new H(this.ja),b=this.Ha.kd,c;for(c in b)a.add(b[c].key);return a};v.u(Ka,{count:"count"},function(){return this.Ha.jd});v.u(Ka,{size:"size"},function(){return this.Ha.jd});v.u(Ka,{i:"iterator"},function(){return 0>=this.Ha.jd?xa:new Ia(this.Ha)});function La(a){this.Ha=a;this.reset()}v.Nd(La,{key:!0,value:!0});v.u(La,{i:"iterator"},function(){return this});La.prototype.reset=La.prototype.reset=function(){var a=this.Ha;a.yj=null;this.gb=a.F;this.fb=null}; La.prototype.next=La.prototype.hasNext=La.prototype.next=function(){var a=this.Ha;if(a.F!==this.gb){if(null===this.key)return!1;v.La(a)}var b=this.fb,b=null===b?a.Ea:b.Wa;if(null!==b)return this.fb=b,this.value=b.value,this.key=b.key,!0;this.Df();return!1};La.prototype.first=La.prototype.first=function(){var a=this.Ha;this.gb=a.F;a=a.Ea;if(null!==a){this.fb=a;var b=a.value;this.key=a.key;return this.value=b}return null}; La.prototype.any=function(a){var b=this.Ha;b.yj=null;var c=b.F;this.fb=null;for(var d=b.Ea;null!==d;){if(a(d.value))return!0;b.F!==c&&v.La(b);d=d.Wa}return!1};La.prototype.all=function(a){var b=this.Ha;b.yj=null;var c=b.F;this.fb=null;for(var d=b.Ea;null!==d;){if(!a(d.value))return!1;b.F!==c&&v.La(b);d=d.Wa}return!0};La.prototype.each=function(a){var b=this.Ha;b.yj=null;var c=b.F;this.fb=null;for(var d=b.Ea;null!==d;)a(d.value),b.F!==c&&v.La(b),d=d.Wa;return this}; La.prototype.map=function(a){var b=this.Ha;b.yj=null;var c=b.F;this.fb=null;for(var d=new H,e=b.Ea;null!==e;)d.add(a(e.value)),b.F!==c&&v.La(b),e=e.Wa;return d.i};La.prototype.filter=function(a){var b=this.Ha;b.yj=null;var c=b.F;this.fb=null;for(var d=new H(b.yi),e=b.Ea;null!==e;){var f=e.value;a(f)&&d.add(f);b.F!==c&&v.La(b);e=e.Wa}return d.i};La.prototype.concat=function(a){this.Ha.yj=null;return new za(this,a.i)};v.u(La,{count:"count"},function(){return this.Ha.jd}); La.prototype.Df=function(){this.value=this.key=null;this.gb=-1;this.Ha.yj=this};La.prototype.toString=function(){return null!==this.fb?"MapValueSetIterator@"+this.fb.value:"MapValueSetIterator"};function Ga(a,b){this.key=a;this.value=b;this.to=this.Wa=null}v.Nd(Ga,{key:!0,value:!0});Ga.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"};function Ma(a){this.Ha=a;this.reset()}v.Nd(Ma,{key:!0,value:!0});v.u(Ma,{i:"iterator"},function(){return this}); Ma.prototype.reset=Ma.prototype.reset=function(){var a=this.Ha;a.Xb=null;this.gb=a.F;this.fb=null};Ma.prototype.next=Ma.prototype.hasNext=Ma.prototype.next=function(){var a=this.Ha;if(a.F!==this.gb){if(null===this.key)return!1;v.La(a)}var b=this.fb,b=null===b?a.Ea:b.Wa;if(null!==b)return this.fb=b,this.key=b.key,this.value=b.value,!0;this.Df();return!1}; Ma.prototype.first=Ma.prototype.first=function(){var a=this.Ha;this.gb=a.F;a=a.Ea;return null!==a?(this.fb=a,this.key=a.key,this.value=a.value,a):null};Ma.prototype.any=function(a){var b=this.Ha;b.Xb=null;var c=b.F;this.fb=null;for(var d=b.Ea;null!==d;){if(a(d))return!0;b.F!==c&&v.La(b);d=d.Wa}return!1};Ma.prototype.all=function(a){var b=this.Ha;b.Xb=null;var c=b.F;this.fb=null;for(var d=b.Ea;null!==d;){if(!a(d))return!1;b.F!==c&&v.La(b);d=d.Wa}return!0}; Ma.prototype.each=function(a){var b=this.Ha;b.Xb=null;var c=b.F;this.fb=null;for(var d=b.Ea;null!==d;)a(d),b.F!==c&&v.La(b),d=d.Wa;return this};Ma.prototype.map=function(a){var b=this.Ha;b.Xb=null;var c=b.F;this.fb=null;for(var d=new H,e=b.Ea;null!==e;)d.add(a(e)),b.F!==c&&v.La(b),e=e.Wa;return d.i};Ma.prototype.filter=function(a){var b=this.Ha;b.Xb=null;var c=b.F;this.fb=null;for(var d=new H,e=b.Ea;null!==e;)a(e)&&d.add(e),b.F!==c&&v.La(b),e=e.Wa;return d.i}; Ma.prototype.concat=function(a){this.Ha.Xb=null;return new za(this,a.i)};v.u(Ma,{count:"count"},function(){return this.Ha.jd});Ma.prototype.Df=function(){this.value=this.key=null;this.gb=-1;this.Ha.Xb=this};Ma.prototype.toString=function(){return null!==this.fb?"MapIterator@"+this.fb:"MapIterator"}; function pa(a,b){v.ec(this);this.D=!1;void 0===a||null===a?this.yi=null:"string"===typeof a?"object"===a||"string"===a||"number"===a?this.yi=a:v.wa(a,"the string 'object', 'number' or 'string'","Map constructor: keytype"):"function"===typeof a?this.yi=a===Object?"object":a===String?"string":a===Number?"number":a:v.wa(a,"null, a primitive type name, or a class type","Map constructor: keytype");void 0===b||null===b?this.Ps=null:"string"===typeof b?"object"===b||"string"===b||"boolean"===b||"number"=== b||"function"===b?this.Ps=b:v.wa(b,"the string 'object', 'number', 'string', 'boolean', or 'function'","Map constructor: valtype"):"function"===typeof b?this.Ps=b===Object?"object":b===String?"string":b===Number?"number":b===Boolean?"boolean":b===Function?"function":b:v.wa(b,"null, a primitive type name, or a class type","Map constructor: valtype");this.kd={};this.jd=0;this.yj=this.Xb=null;this.F=0;this.Ih=this.Ea=null}v.ea("Map",pa); pa.prototype.Bc=function(){var a=this.F;a++;999999999<a&&(a=0);this.F=a};pa.prototype.freeze=pa.prototype.freeze=function(){this.D=!0;return this};pa.prototype.thaw=pa.prototype.Oa=function(){this.D=!1;return this};pa.prototype.toString=function(){return"Map("+v.getTypeName(this.yi)+","+v.getTypeName(this.Ps)+")#"+v.pd(this)}; pa.prototype.add=pa.prototype.set=pa.prototype.add=function(a,b){this.D&&v.la(this,a);var c=a;v.Va(a)&&(c=v.zt(a));var d=this.kd[c];if(void 0===d)return this.jd++,d=new Ga(a,b),this.kd[c]=d,c=this.Ih,null===c?this.Ea=d:(d.to=c,c.Wa=d),this.Ih=d,this.Bc(),!0;d.value=b;return!1};pa.prototype.addAll=pa.prototype.Tc=function(a){if(null===a)return this;if(v.isArray(a))for(var b=v.Xa(a),c=0;c<b;c++){var d=v.Pa(a,c);this.add(d.key,d.value)}else for(a=a.i;a.next();)this.add(a.key,a.value);return this}; pa.prototype.first=pa.prototype.first=function(){return this.Ea};pa.prototype.any=function(a){for(var b=this.F,c=this.Ea;null!==c;){if(a(c))return!0;this.F!==b&&v.La(this);c=c.Wa}return!1};pa.prototype.all=function(a){for(var b=this.F,c=this.Ea;null!==c;){if(!a(c))return!1;this.F!==b&&v.La(this);c=c.Wa}return!0};pa.prototype.each=function(a){for(var b=this.F,c=this.Ea;null!==c;)a(c),this.F!==b&&v.La(this),c=c.Wa;return this}; pa.prototype.map=function(a){for(var b=new pa(this.yi),c=this.F,d=this.Ea;null!==d;)b.add(d.key,a(d)),this.F!==c&&v.La(this),d=d.Wa;return b};pa.prototype.filter=function(a){for(var b=new pa(this.yi,this.Ps),c=this.F,d=this.Ea;null!==d;)a(d)&&b.add(d.key,d.value),this.F!==c&&v.La(this),d=d.Wa;return b};pa.prototype.concat=function(a){return this.copy().Tc(a)};pa.prototype.contains=pa.prototype.has=pa.prototype.contains=function(a){var b=a;return v.Va(a)&&(b=v.pd(a),void 0===b)?!1:void 0!==this.kd[b]}; pa.prototype.getValue=pa.prototype.get=pa.prototype.ka=function(a){var b=a;if(v.Va(a)&&(b=v.pd(a),void 0===b))return null;a=this.kd[b];return void 0===a?null:a.value}; pa.prototype.remove=pa.prototype["delete"]=pa.prototype.remove=function(a){if(null===a)return!1;this.D&&v.la(this,a);var b=a;if(v.Va(a)&&(b=v.pd(a),void 0===b))return!1;a=this.kd[b];if(void 0===a)return!1;var c=a.Wa,d=a.to;null!==c&&(c.to=d);null!==d&&(d.Wa=c);this.Ea===a&&(this.Ea=c);this.Ih===a&&(this.Ih=d);delete this.kd[b];this.jd--;this.Bc();return!0};pa.prototype.clear=pa.prototype.clear=function(){this.D&&v.la(this);this.kd={};this.jd=0;this.Ih=this.Ea=null;this.Bc()}; pa.prototype.copy=function(){var a=new pa(this.yi,this.Ps),b=this.kd,c;for(c in b){var d=b[c];a.add(d.key,d.value)}return a};pa.prototype.toArray=pa.prototype.dc=function(){var a=this.kd,b=Array(this.jd),c=0,d;for(d in a){var e=a[d];b[c]=new Ga(e.key,e.value);c++}return b};pa.prototype.toKeySet=pa.prototype.fj=function(){return new Ka(this)};v.u(pa,{count:"count"},function(){return this.jd});v.u(pa,{size:"size"},function(){return this.jd}); v.u(pa,{i:"iterator"},function(){if(0>=this.count)return xa;var a=this.Xb;return null!==a?(a.reset(),a):new Ma(this)});v.u(pa,{ME:"iteratorKeys"},function(){return 0>=this.count?xa:new Ia(this)});v.u(pa,{NE:"iteratorValues"},function(){if(0>=this.count)return xa;var a=this.yj;return null!==a?(a.reset(),a):new La(this)});function w(a,b){void 0===a?this.y=this.x=0:(this.x=a,this.y=b);this.D=!1}v.ea("Point",w);v.Yh(w);v.Nd(w,{x:!0,y:!0});w.prototype.assign=function(a){this.x=a.x;this.y=a.y}; w.prototype.setTo=w.prototype.m=function(a,b){this.x=a;this.y=b;return this};w.prototype.set=w.prototype.set=function(a){this.Eb();this.x=a.x;this.y=a.y;return this};w.prototype.copy=function(){var a=new w;a.x=this.x;a.y=this.y;return a};g=w.prototype;g.Fa=function(){this.D=!0;Object.freeze(this);return this};g.S=function(){return Object.isFrozen(this)?this:this.copy().freeze()};g.freeze=function(){this.D=!0;return this}; g.Oa=function(){Object.isFrozen(this)&&v.k("cannot thaw constant: "+this);this.D=!1;return this};g.Eb=function(a){if(this.D){var b="The Point is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v.k(b)}};w.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new w(c,e)}return new w}; w.stringify=function(a){return a instanceof w?a.x.toString()+" "+a.y.toString():a.toString()};w.prototype.toString=function(){return"Point("+this.x+","+this.y+")"};w.prototype.equals=w.prototype.L=function(a){return a instanceof w?this.x===a.x&&this.y===a.y:!1};w.prototype.equalTo=w.prototype.Pw=function(a,b){return this.x===a&&this.y===b};w.prototype.equalsApprox=w.prototype.od=function(a){return K.G(this.x,a.x)&&K.G(this.y,a.y)}; w.prototype.add=w.prototype.add=function(a){this.Eb();this.x+=a.x;this.y+=a.y;return this};w.prototype.subtract=w.prototype.ou=function(a){this.Eb();this.x-=a.x;this.y-=a.y;return this};w.prototype.offset=w.prototype.offset=function(a,b){this.Eb();this.x+=a;this.y+=b;return this}; w.prototype.rotate=w.prototype.rotate=function(a){this.Eb();if(0===a)return this;var b=this.x,c=this.y;if(0===b&&0===c)return this;var d=0,e=0;360<=a?a-=360:0>a&&(a+=360);90===a?(d=0,e=1):180===a?(d=-1,e=0):270===a?(d=0,e=-1):(a=a*Math.PI/180,d=Math.cos(a),e=Math.sin(a));this.x=d*b-e*c;this.y=e*b+d*c;return this};w.prototype.scale=w.prototype.scale=function(a,b){this.x*=a;this.y*=b;return this}; w.prototype.distanceSquaredPoint=w.prototype.$j=function(a){var b=a.x-this.x;a=a.y-this.y;return b*b+a*a};w.prototype.distanceSquared=w.prototype.ap=function(a,b){var c=a-this.x,d=b-this.y;return c*c+d*d};w.prototype.normalize=w.prototype.normalize=function(){this.Eb();var a=this.x,b=this.y,c=Math.sqrt(a*a+b*b);0<c&&(this.x=a/c,this.y=b/c);return this};w.prototype.directionPoint=w.prototype.ah=function(a){return Na(a.x-this.x,a.y-this.y)}; w.prototype.direction=w.prototype.direction=function(a,b){return Na(a-this.x,b-this.y)};function Na(a,b){if(0===a)return 0<b?90:0>b?270:0;if(0===b)return 0<a?0:180;if(isNaN(a)||isNaN(b))return 0;var c=180*Math.atan(Math.abs(b/a))/Math.PI;0>a?c=0>b?c+180:180-c:0>b&&(c=360-c);return c}w.prototype.projectOntoLineSegment=function(a,b,c,d){K.fn(a,b,c,d,this.x,this.y,this);return this};w.prototype.projectOntoLineSegmentPoint=function(a,b){K.fn(a.x,a.y,b.x,b.y,this.x,this.y,this);return this}; w.prototype.snapToGrid=function(a,b,c,d){K.pt(this.x,this.y,a,b,c,d,this);return this};w.prototype.snapToGridPoint=function(a,b){K.pt(this.x,this.y,a.x,a.y,b.width,b.height,this);return this};w.prototype.setRectSpot=w.prototype.iu=function(a,b){this.Eb();this.x=a.x+b.x*a.width+b.offsetX;this.y=a.y+b.y*a.height+b.offsetY;return this};w.prototype.setSpot=w.prototype.ku=function(a,b,c,d,e){this.Eb();this.x=a+e.x*c+e.offsetX;this.y=b+e.y*d+e.offsetY;return this}; w.prototype.transform=function(a){a.xb(this);return this};function Oa(a,b){b.$h(a);return a}var Qa;w.distanceLineSegmentSquared=Qa=function(a,b,c,d,e,f){var h=e-c,k=f-d,l=h*h+k*k;c-=a;d-=b;var m=-c*h-d*k;if(0>=m||m>=l)return h=e-a,k=f-b,Math.min(c*c+d*d,h*h+k*k);a=h*d-k*c;return a*a/l};var Ra;w.distanceSquared=Ra=function(a,b,c,d){a=c-a;b=d-b;return a*a+b*b};var Ta; w.direction=Ta=function(a,b,c,d){a=c-a;b=d-b;if(0===a)return 0<b?90:0>b?270:0;if(0===b)return 0<a?0:180;if(isNaN(a)||isNaN(b))return 0;d=180*Math.atan(Math.abs(b/a))/Math.PI;0>a?d=0>b?d+180:180-d:0>b&&(d=360-d);return d};w.prototype.isReal=w.prototype.K=function(){return isFinite(this.x)&&isFinite(this.y)};function ia(a,b){void 0===a?this.height=this.width=0:(this.width=a,this.height=b);this.D=!1}v.ea("Size",ia);v.Yh(ia);v.Nd(ia,{width:!0,height:!0}); ia.prototype.assign=function(a){this.width=a.width;this.height=a.height};ia.prototype.setTo=ia.prototype.m=function(a,b){this.width=a;this.height=b;return this};ia.prototype.set=ia.prototype.set=function(a){this.Eb();this.width=a.width;this.height=a.height;return this};ia.prototype.copy=function(){var a=new ia;a.width=this.width;a.height=this.height;return a};g=ia.prototype;g.Fa=function(){this.D=!0;Object.freeze(this);return this};g.S=function(){return Object.isFrozen(this)?this:this.copy().freeze()}; g.freeze=function(){this.D=!0;return this};g.Oa=function(){Object.isFrozen(this)&&v.k("cannot thaw constant: "+this);this.D=!1;return this};g.Eb=function(a){if(this.D){var b="The Size is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v.k(b)}};ia.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new ia(c,e)}return new ia}; ia.stringify=function(a){return a instanceof ia?a.width.toString()+" "+a.height.toString():a.toString()};ia.prototype.toString=function(){return"Size("+this.width+","+this.height+")"};ia.prototype.equals=ia.prototype.L=function(a){return a instanceof ia?this.width===a.width&&this.height===a.height:!1};ia.prototype.equalTo=ia.prototype.Pw=function(a,b){return this.width===a&&this.height===b};ia.prototype.equalsApprox=ia.prototype.od=function(a){return K.G(this.width,a.width)&&K.G(this.height,a.height)}; ia.prototype.isReal=ia.prototype.K=function(){return isFinite(this.width)&&isFinite(this.height)}; function z(a,b,c,d){void 0===a?this.height=this.width=this.y=this.x=0:a instanceof w?b instanceof w?(this.x=Math.min(a.x,b.x),this.y=Math.min(a.y,b.y),this.width=Math.abs(a.x-b.x),this.height=Math.abs(a.y-b.y)):b instanceof ia?(this.x=a.x,this.y=a.y,this.width=b.width,this.height=b.height):v.k("Incorrect arguments supplied to Rect constructor"):(this.x=a,this.y=b,this.width=c,this.height=d);this.D=!1}v.ea("Rect",z);v.Yh(z);v.Nd(z,{x:!0,y:!0,width:!0,height:!0}); z.prototype.assign=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height};function Ua(a,b,c){a.width=b;a.height=c}z.prototype.setTo=z.prototype.m=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d;return this};z.prototype.set=z.prototype.set=function(a){this.Eb();this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;return this};z.prototype.setPoint=z.prototype.Af=function(a){this.Eb();this.x=a.x;this.y=a.y;return this}; z.prototype.setSize=function(a){this.Eb();this.width=a.width;this.height=a.height;return this};z.prototype.copy=function(){var a=new z;a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;return a};g=z.prototype;g.Fa=function(){this.D=!0;Object.freeze(this);return this};g.S=function(){return Object.isFrozen(this)?this:this.copy().freeze()};g.freeze=function(){this.D=!0;return this};g.Oa=function(){Object.isFrozen(this)&&v.k("cannot thaw constant: "+this);this.D=!1;return this}; g.Eb=function(a){if(this.D){var b="The Rect is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v.k(b)}};z.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));for(var f=0;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));for(var h=0;""===a[b];)b++;(d=a[b++])&&(h=parseFloat(d));return new z(c,e,f,h)}return new z}; z.stringify=function(a){return a instanceof z?a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString():a.toString()};z.prototype.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};z.prototype.equals=z.prototype.L=function(a){return a instanceof z?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1};z.prototype.equalTo=z.prototype.Pw=function(a,b,c,d){return this.x===a&&this.y===b&&this.width===c&&this.height===d}; z.prototype.equalsApprox=z.prototype.od=function(a){return K.G(this.x,a.x)&&K.G(this.y,a.y)&&K.G(this.width,a.width)&&K.G(this.height,a.height)};z.prototype.containsPoint=z.prototype.Ga=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y};z.prototype.containsRect=z.prototype.Zj=function(a){return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height}; z.prototype.contains=z.prototype.contains=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return this.x<=a&&a+c<=this.x+this.width&&this.y<=b&&b+d<=this.y+this.height};z.prototype.reset=function(){this.Eb();this.height=this.width=this.y=this.x=0};z.prototype.offset=z.prototype.offset=function(a,b){this.Eb();this.x+=a;this.y+=b;return this};z.prototype.inflate=z.prototype.Qf=function(a,b){return Va(this,b,a,b,a)}; z.prototype.addMargin=z.prot