/*!@license
* Infragistics.Web.ClientUI infragistics.undo.js 21.2.20212.99
*
* Copyright (c) 2011-2022 Infragistics Inc.
*
* http://www.infragistics.com/
*
* Depends:
*     jquery-1.4.4.js
*     jquery.ui.core.js
*     jquery.ui.widget.js
*     infragistics.util.js
*     infragistics.ext_core.js
*     infragistics.ext_collections.js
*/
(function(factory){if(typeof define==="function"&&define.amd){define(["./infragistics.util","./infragistics.ext_core","./infragistics.ext_collections"],factory)}else{factory(igRoot)}})(function($){/*!@license
* Infragistics.Web.ClientUI infragistics.undo.js resources 21.2.20212.99
*
* Copyright (c) 2011-2022 Infragistics Inc.
*
* http://www.infragistics.com/
*
*/
(function(){$=$||{};$.ig=$.ig||{};$.ig.locale=$.ig.locale||{};$.ig.locale.en=$.ig.locale.en||{};$.ig.locale.en.undo=$.ig.locale.en.undo||{};var l=$.ig.locale.en.undo;l["AddItemDescription"]="Add '{1}'";l["AddItemDescriptionDetailed"]="Add '{1}'";l["AddRangeDescription"]="Add {1} {2}(s)";l["AddRangeDescriptionDetailed"]="Add {1} {2}(s)";l["FallbackTransactionDescription"]="";l["LE_AddOpenTransaction"]="Cannot add an UndoTransaction that has not been opened or is still open.";l["LE_AddTransactionDirect"]="UndoTransaction cannot be added. The RootTransaction is automatically added upon Commit.";l["LE_AddUnitWhileTransactionOpen"]="Cannot add an UndoUnit while the transaction contains a nested open transaction '{0}'.";l["LE_ArgumentIsNegative"]="The '{0}' must be 0 or greater. Actual value: '{1}'";l["LE_CannotExecuteOpenTransaction"]="Cannot invoke Execute while the transaction '{0}' is open.";l["LE_ChangeHistoryInMerge"]="Cannot alter the Undo/Redo history while a Merge is being invoked";l["LE_ChangeHistoryInRemoveAll"]="Cannot alter the Undo/Redo history while the RemoveAll is being invoked.";l["LE_ChildTransactionNotInUnits"]="The specified child transaction '{0}' is not part of the Units of this transaction.";l["LE_ClosingOtherTransaction"]="The specified transaction '{0}' is not the currently open transaction '{1}'.";l["LE_EndTransactionWhileSuspended"]="Cannot close a transaction while the UndoManager is suspended.";l["LE_EnumEnded"]="The enumerator was completed.";l["LE_EnumFailedVersion"]="The collection was modified after the enumerator was started.";l["LE_EnumNotStarted"]="The enumerator was not started. Call MoveNext.";l["LE_FactoryNullTransaction"]="The UndoUnitFactory returned a null UndoTransaction.";l["LE_HasOpenTransaction"]="A transaction has already been opened.";l["LE_HistoryItemNotInCurrentHistory"]="The UndoHistoryItem does not exist within the associated Undo or Redo history in the UndoManager.";l["LE_InvalidTransactionOwner"]="The specified transaction's Owner is not this object.";l["LE_NeedAddRemoveAction"]="The specified action must be 'Add' or 'Remove'.";l["LE_NewTransactionWhileSuspended"]="A transaction cannot be started while the UndoManager is suspended.";l["LE_RangeCollectionAction"]="Range actions are not supported.";l["LE_ReferenceNotRegistered"]="The specified reference '{0}' has not been registered with an UndoManager instance. Use the RegisterReference method to register the reference with an UndoManager or pass null as the 'reference' to use the UndoManager.Current thread static/shared instance.";l["LE_ReferenceRegisteredToOther"]="The specified reference '{0}' is registered with a different UndoManager instance.";l["LE_RemoveAllFailedVersion"]="The collection was modified during the call to RemoveAll.";l["LE_ResetCollectionAction"]="Reset action is not supported.";l["LE_TargetCollectionIsReadOnly"]="The specified collection '{0}' cannot be read-only.";l["LE_TransactionAlreadyOpened"]="The transaction has already been opened.";l["LE_TransactionClosed"]="The transaction cannot be modified once it has been closed.";l["LE_TransactionNotOpened"]="The specified transaction '{0}' is not open.";l["LE_TransactionNotStarted"]="The transaction cannot be modified until it has been started.";l["LE_UndoManagerAsReference"]="An 'UndoManager' instance cannot be a reference.";l["LE_UndoRedoInRollback"]="Cannot perform an Undo/Redo while a Rollback is in progress.";l["LE_UndoRedoInTransaction"]="Cannot perform an undo/redo while a transaction is opened.";l["LE_UndoRedoInUndoRedo"]="Cannot perform an Undo/Redo while an Undo/Redo is in progress.";l["LE_UndoRedoWhileSuspended"]="Cannot perform an Undo/Redo while the UndoManager has been suspended.";l["MoveItemDescription"]="Move '{1}'";l["MoveItemDescriptionDetailed"]="Move '{1}' from '{2}' to '{3}'";l["PropertyChangeDescription"]="Change '{0}' on '{1}'";l["PropertyChangeDescriptionDetailed"]="Change '{0}' on '{1}' to '{3}'";l["ReinitializeCollectionDescription"]="Batch '{2}' Change";l["ReinitializeCollectionDescriptionDetailed"]="Batch '{2}' Change";l["RemoveItemDescription"]="Remove '{1}'";l["RemoveItemDescriptionDetailed"]="Remove '{1}'";l["RemoveRangeDescription"]="Remove {1} {2}(s)";l["RemoveRangeDescriptionDetailed"]="Remove {1} {2}(s)";l["ReplaceItemDescription"]="Replace '{1}'";l["ReplaceItemDescriptionDetailed"]="Replace '{1}' with '{2}'";$.ig.undo=$.ig.undo||{};$.ig.undo.locale=$.ig.undo.locale||l;return l})($);$.ig=$.ig||{};var $$t={};$.ig.globalDefs=$.ig.globalDefs||{};$.ig.globalDefs.$$ak=$$t;var $$0=$.ig.globalDefs.$$0;var $$4=$.ig.globalDefs.$$4;var $$6=$.ig.globalDefs.$$6;$.ig.$currDefinitions=$$t;$.ig.util.bulkDefine(["ITypedPropertyChangeListener$2:f","IPropertyChangeListener:g","ITypedSupportPropertyChangeNotifications$2:h","ISupportPropertyChangeNotifications:i","IValueChangeListener$1:j","TypedPropertyChangeListenerList$2:l","PropertyChangeListenerList:m","IUndoTransactionOwner:ad","UndoExecuteContext:ae","UndoHistoryItem:af","UndoManager:ag","UndoMergeContext:ai","CustomUndoUnit:aj","UndoTransaction:ak","UndoUnit:al"]);var $a=$.ig.intDivide,$b=$.ig.util.cast,$c=$.ig.util.defType,$d=$.ig.util.defEnum,$e=$.ig.util.getBoxIfEnum,$f=$.ig.util.getDefaultValue,$g=$.ig.util.getEnumValue,$h=$.ig.util.getValue,$i=$.ig.util.intSToU,$j=$.ig.util.nullableEquals,$k=$.ig.util.nullableIsNull,$l=$.ig.util.nullableNotEquals,$m=$.ig.util.toNullable,$n=$.ig.util.toString$1,$o=$.ig.util.u32BitwiseAnd,$p=$.ig.util.u32BitwiseOr,$q=$.ig.util.u32BitwiseXor,$r=$.ig.util.u32LS,$s=$.ig.util.unwrapNullable,$t=$.ig.util.wrapNullable,$u=String.fromCharCode,$v=$.ig.util.castObjTo$t,$w=$.ig.util.compareSimple,$x=$.ig.util.compare,$y=$.ig.util.replace,$z=$.ig.util.stringFormat,$0=$.ig.util.stringFormat1,$1=$.ig.util.stringFormat2,$2=$.ig.util.stringCompare1,$3=$.ig.util.stringCompare2,$4=$.ig.util.stringCompare3;$d("UndoManager_BoolProperties:ah",true,false,{CanUndo:1,CanRedo:2,IsPerformingRedo:4,IsPerformingUndo:8,ShouldPreventMerge:16,AllowMerging:32,IsMerging:64,IsPerformingRollback:128,IsPerformingRemoveAll:256});$d("UndoMergeAction:aa",false,false,{NotMerged:0,Merged:1,MergedRemoveUnit:2});$d("UndoTransactionCloseAction:z",false,false,{Commit:0,Rollback:1,Cancel:2});$d("UndoExecuteReason:y",false,false,{Undo:0,Redo:1,Rollback:2});$d("UndoHistoryItemType:x",false,false,{Undo:0,Redo:1});$c("AssemblyRef:a","Object",{init:function(){$.ig.$op.init.call(this)},$type:new $.ig.Type("AssemblyRef",$.ig.$ot)},true);$c("SR:b","Object",{init:function(){$.ig.$op.init.call(this)},a:function(a){return a},b:function(a,b){return a},$type:new $.ig.Type("SR",$.ig.$ot)},true);$c("CoreUtilities:c","Object",{init:function(){$.ig.$op.init.call(this)},j:function($t,a){return new $$t.e($t,a)},c:function(a,b){if(a==b){return true}return Math.abs(a-b)<1e-10},h:function(a,b){return a<b&&!$$t.$c.c(a,b)},e:function(a,b){return a>b&&!$$t.$c.c(a,b)},i:function(a,b){return a<=b||$$t.$c.c(a,b)},f:function(a,b){return a>=b||$$t.$c.c(a,b)},d:function($t,a,b,c){if(a==b){return true}if(a==null||b==null){return false}if(a.count()!=b.count()){return false}if(c==null){c=$$4.$m.defaultEqualityComparerValue($t)}for(var d=0,e=a.count();d<e;d++){if(!c.equalsC(a.item(d),b.item(d))){return false}}return true},m:function($t,a,b,c,d){if(c==null){c=$$6.$ab.defaultComparerValue($t)}var e=0,f=a.count()-1;var g=0;var h=!d?null:$$4.$m.defaultEqualityComparerValue($t);while(e<=f){g=$a(e+f,2);var i=a.item(g);if(null!=h&&h.equalsC(b,i)){if(g>e){i=a.item(--g)}else if(g<f){i=a.item(++g)}else{return g}}var j=c.compare(i,b);if(j>0){f=g-1}else if(j<0){e=g+1}else{return g}}if(null!=h&&e<a.count()-1&&h.equalsC(b,a.item(e))){return e}return~e},n:function($tItem,$tComparison,a,b,c){var d=0,e=a.count()-1;var f=0;while(d<=e){f=$a(d+e,2);var g=a.item(f);var h=b(g,c);if(h>0){e=f-1}else if(h<0){d=f+1}else{return f}}return~d},l:function(a,b,c){if(a<b){return b}else if(a>c){return c}return a},s:function($t,a,b,c){var d=$b($$0.$bv.$type.specialize($t),a);if(null!=d){d.copyTo(b,c)}else{var f=a.getEnumerator();while(f.moveNext()){var e=f.current();b[c++]=e}}},r:function(a,b,c){var e=a.getEnumerator();while(e.moveNext()){var d=e.current();b[c++]=d}},a:function($t,a){if(null!=a){var c=a.getEnumerator();while(c.moveNext()){var b=c.current();return b}}return $f($t)},b:function($t,a,b){if(null!=a){if(b){var c=$b($$0.$bz.$type.specialize($t),a);if(null!=c){return c.count()>0?c.item(0):$f($t)}var d=$b($$0.$bm.$type,a);if(null!=d){return d.count()>0?$v($t,d.item(0)):$f($t)}}var f=a.getEnumerator();while(f.moveNext()){var e=f.current();return e}}return $f($t)},k:function($t){var a=$t;var b=$.ig.$ep.getNames(a);var c=new $$4.x($t,0);for(var e=0;e<b.length;e++){var d=b[e];c.add($v($t,$.ig.$ep.parse(a,d,false)))}return c},q:function(a){if(a==null){return null}var b=$$0.$aj.getUnderlyingType(a);if(b!=null){a=b}return a},p:function(a){if(null!=a){try{return a.c()}catch(b){}}return null},g:function(a){if(null!=a){if($b($$0.$bk.$type,a)!==null){return a.count()>0}if(null!=a){var c=a.getEnumerator();while(c.moveNext()){var b=c.current();return true}}}return false},t:function(){throw new $$0.r(1,"Collection is read-only.")},v:function($t,a,b){var c=$$t.$c.o($t,a,b);a.removeRange(c,a.count()-c)},u:function($t,a,b){var c=$$t.$c.o($t,a,b);for(var d=a.count()-1;d>=c;d--){a.removeAt(d)}},o:function($t,a,b){var c=0;var d=a.count();var e=$$4.$m.defaultEqualityComparerValue($t);for(var f=0;f<d;f++){if(e.equalsC(a.item(f),b)){c++}else if(0!=c){a.item(f-c,a.item(f))}}return d-c},w:function(a){if(a<0){throw new $$6.d(1,$$t.$b.a("LE_ValueCannotBeNegative"))}},x:function(a,b){if(a<0){throw new $$6.d(2,b,$$t.$b.a("LE_ValueCannotBeNegative"))}},y:function(a){if(null==a){throw new $$6.e(1)}},z:function(a,b){if(null==a){throw new $$6.e(0,b)}},$type:new $.ig.Type("CoreUtilities",$.ig.$ot)},true);$c("CoreUtilities_TypedList$1:d","Object",{$t:null,a:null,init:function($t,a){this.$t=$t;if(!this.hasOwnProperty("$type")){this.$type=this.$type.specialize(this.$t)}$.ig.$op.init.call(this);$$t.$c.y(a);this.a=a},b:function(){return this.a},indexOf:function(a){return this.a.indexOf($e(this.$t,a))},insert:function(a,b){this.a.insert(a,$e(this.$t,b))},removeAt:function(a){this.a.removeAt(a)},item:function(a,b){if(arguments.length===2){this.a.item(a,$e(this.$t,b));return b}else{return $v(this.$t,this.a.item(a))}},add:function(a){this.a.add($e(this.$t,a))},clear:function(){this.a.clear()},contains:function(a){return this.a.contains($e(this.$t,a))},copyTo:function(a,b){$$t.$c.s(this.$t,new $$t.v(this.$t,this.a),a,b)},count:function(){return this.a.count()},isReadOnly:function(){return this.a.isReadOnly()},remove:function(a){var b=this.a.indexOf($e(this.$t,a));if(b>=0){this.a.removeAt(b)}return b>=0},getEnumerator:function(){return new $$t.w(this.$t,this.a.getEnumerator())},$type:new $.ig.Type("CoreUtilities_TypedList$1",$.ig.$ot,[$$0.$bz.$type.specialize(0)])},true);$c("CoreUtilities_ObservableTypedList$1:e","CoreUtilities_TypedList$1",{$t:null,init:function($t,a){this.$t=$t;if(!this.hasOwnProperty("$type")){this.$type=this.$type.specialize(this.$t)}$$t.$d.init.call(this,this.$t,a);var b=$b($$4.$ac.$type,a);if(b!=null){b.collectionChanged=$.ig.Delegate.prototype.combine(b.collectionChanged,this.c.runOn(this))}var c=$b($$0.$b6.$type,a);if(c!=null){c.propertyChanged=$.ig.Delegate.prototype.combine(c.propertyChanged,this.d.runOn(this))}},d:function(a,b){var c=this.propertyChanged;if(null!=c){c(this,b)}},c:function(a,b){var c=this.collectionChanged;if(null!=c){c(this,b)}},propertyChanged:null,collectionChanged:null,$type:new $.ig.Type("CoreUtilities_ObservableTypedList$1",$$t.$d.$type.specialize(0),[$$4.$ac.$type,$$0.$b6.$type])},true);$c("ITypedPropertyChangeListener$2:f","Object",{$type:new $.ig.Type("ITypedPropertyChangeListener$2",null)},true);$c("IPropertyChangeListener:g","Object",{$type:new $.ig.Type("IPropertyChangeListener",null,[$$t.$f.$type.specialize($.ig.$op.$type,String)])},true);$c("ITypedSupportPropertyChangeNotifications$2:h","Object",{$type:new $.ig.Type("ITypedSupportPropertyChangeNotifications$2",null)},true);$c("ISupportPropertyChangeNotifications:i","Object",{$type:new $.ig.Type("ISupportPropertyChangeNotifications",null,[$$t.$h.$type.specialize($.ig.$op.$type,String)])},true);$c("IValueChangeListener$1:j","Object",{$type:new $.ig.Type("IValueChangeListener$1",null)},true);$c("ListenerList:k","List$1",{ad:0,init:function(a){$$4.$x.init2.call(this,$.ig.$op.$type,2,a)},af:function(a){var b=$b($$6.$z.$type,a);if(null==b){b=new $$6.z(a)}return b},ag:function(a){var b=$b($$6.$z.$type,a);if(null!=b){return $$t.$c.p(b)}return a},add2:function(a,b,c){$$t.$c.y(b);var d=c?$$t.$k.af(b):b;if(null==a){return d}else{var e=$b($$t.$k.$type,a);if(null!=e){e.add1(d)}else{e=new $$t.k(2);e.add1(a);e.add1(d)}return e}},remove2:function(a,b){var c=$b($$t.$k.$type,a);if(null!=c){for(var d=c.count()-1;d>=0;d--){if(b==$$t.$k.ag(c.__inner[d])){if(0!=c.ad){var e=new $$t.k(c.count());e.addRange(c);c=e}c.removeAt(d);break}}return 1==c.count()?c.__inner[0]:c}else if($$t.$k.ag(a)==b){return null}else{return a}},getListeners:function(a){var b=$b($$t.$k.$type,a);if(null!=b){return new $$t.q(b)}else if(null!=a){return[a]}else{return new Array(0)}},getListeners1:function(a,b,c){c=null;b=null;var d=$b($$t.$k.$type,a);if(null!=d){b=new $$t.q(d)}else{var e=$$t.$k.ag(a);if(null!=e){c=e}}return{p1:b,p2:c}},aj:function($tItem,$tProperty,a,b,c,d){var e=$b($$t.$k.$type,a);if(null!=e){e.ad++;try{for(var f=0,g=e.count();f<g;f++){var h=$$t.$k.ag(e.__inner[f]);if(null!=h){h.onPropertyValueChanged(b,c,d)}}}finally{e.ad--}}else if(null!=a){var i=$$t.$k.ag(a);if(null!=i){i.onPropertyValueChanged(b,c,d)}}},ak:function($tItem,a,b){var c=$b($$t.$k.$type,a);if(null!=c){c.ad++;try{for(var d=0,e=c.count();d<e;d++){var f=$$t.$k.ag(c.__inner[d]);if(null!=f){f.onValueChanged(b)}}}finally{c.ad--}}else if(null!=a){var g=$$t.$k.ag(a);if(null!=g){g.onValueChanged(b)}}},$type:new $.ig.Type("ListenerList",$$4.$x.$type.specialize($.ig.$op.$type))},true);$c("ListenerList_Enumerable:q","Object",{a:null,init:function(a){$.ig.$op.init.call(this);this.a=a},getEnumerator:function(){return new $$t.p(this.a)},$type:new $.ig.Type("ListenerList_Enumerable",$.ig.$ot,[$$0.$bw.$type.specialize($.ig.$op.$type)])},true);$c("ListenerList_Enumerable_Enumerator:p","Object",{a:null,b:0,c:null,init:function(a){$.ig.$op.init.call(this);this.a=a;this.reset()},current:function(){return this.c},dispose:function(){},moveNext:function(){this.c=null;while(null==this.c&&++this.b<this.a.count()){this.c=$$t.$k.ag(this.a.item(this.b))}return null!=this.c},reset:function(){this.b=-1;this.c=null},$type:new $.ig.Type("ListenerList_Enumerable_Enumerator",$.ig.$ot,[$$0.$bx.$type.specialize($.ig.$op.$type)])},true);$c("TypedPropertyChangeListenerList$2:l","Object",{$tItem:null,$tProperty:null,a:null,init:function($tItem,$tProperty){this.$tItem=$tItem;this.$tProperty=$tProperty;if(!this.hasOwnProperty("$type")){this.$type=this.$type.specialize(this.$tItem,this.$tProperty)}$.ig.$op.init.call(this)},b:function(a,b){this.a=$$t.$k.add2(this.a,a,b)},d:function(a){this.a=$$t.$k.remove2(this.a,a)},onPropertyValueChanged:function(a,b,c){if(null!=this.a){$$t.$k.aj(this.$tItem,this.$tProperty,this.a,a,b,c)}},compact:function(){var a=$b($$6.$z.$type,this.a);var b=a==null?$b($$0.$bm.$type,this.a):null;var c=b==null?$b($$t.$m.$type,this.a):null;if(c!=null){c.compact();return}if(b!=null){for(var d=b.count()-1;d>=0;d-=1){var e=b.item(d);var f=false;if(f==false){a=$b($$6.$z.$type,e);if(a!=null){if(a.c()==null){f=true}}}if(f==false){var g=$b($$t.$o.$type,e);if(g!=null){var h=g.a();if(f==false){a=$b($$6.$z.$type,h);if(a!=null){if(a.c()==null){f=true}}}}}if(f){b.removeAt(d)}}}else if(a!=null){var i=a.c()}},$type:new $.ig.Type("TypedPropertyChangeListenerList$2",$.ig.$ot,[$$t.$f.$type.specialize(0,1)])},true);$c("PropertyChangeListenerList:m","TypedPropertyChangeListenerList$2",{init:function(){$$t.$l.init.call(this,$.ig.$op.$type,String)},e:function($t,a,b,c,d){if($e($t,a)!=null){a.removeListener(c)}a=b;if($e($t,a)!=null){a.addListener(c,d)}return{p0:a}},f:function($t,a,b,c,d){var e=$b($$t.$i.$type,a);if(e!=null){e.removeListener(c)}a=b;e=$b($$t.$i.$type,b);if(e!=null){e.addListener(c,d)}return{p0:a}},g:function(a,b){this.onPropertyValueChanged(a,$$4.$af.$getName(b.action()),b)},h:function(a,b,c,d){$$t.$k.aj($.ig.$op.$type,String,a,b,c,d)},$type:new $.ig.Type("PropertyChangeListenerList",$$t.$l.$type.specialize($.ig.$op.$type,String),[$$t.$g.$type])},true);$c("PropertyChangeListenerBase:o","Object",{init:function(){$.ig.$op.init.call(this)},a:function(){},$type:new $.ig.Type("PropertyChangeListenerBase",$.ig.$ot)},true);$c("PropertyChangeListener$1:n","PropertyChangeListenerBase",{$tOwner:null,d:null,c:null,init:function($tOwner,a,b,c){this.$tOwner=$tOwner;if(!this.hasOwnProperty("$type")){this.$type=this.$type.specialize(this.$tOwner)}$$t.$o.init.call(this);$$t.$c.y(a);this.d=c?new $$6.z(a):a;this.c=b},owner:function(){return $v(this.$tOwner,$$t.$k.ag(this.d))},onPropertyValueChanged:function(a,b,c){var d=this.owner();if(null!=d&&null!=this.c){this.c(d,a,b,c)}},a:function(){return this.owner()},$type:new $.ig.Type("PropertyChangeListener$1",$$t.$o.$type,[$$t.$g.$type])},true);$c("PropertyChangeNotifier:r","Object",{init:function(){$.ig.$op.init.call(this)},propertyChanged:null,a:function(a){var b=this.propertyChanged;if(b!=null){b(this,new $$0.b7(a))}},$type:new $.ig.Type("PropertyChangeNotifier",$.ig.$ot,[$$0.$b6.$type])},true);$c("PropertyChangeNotifierExtended:s","PropertyChangeNotifier",{b:null,init:function(){$$t.$r.init.call(this)},a:function(a){$$t.$r.a.call(this,a);this.d(this,a,null)},addListener:function(a,b){this.b=$$t.$k.add2(this.b,a,b)},d:function(a,b,c){this.e(a,b,c)},e:function(a,b,c){if(null!=this.b){$$t.$k.aj($.ig.$op.$type,String,this.b,a,b,c)}},removeListener:function(a){this.b=$$t.$k.remove2(this.b,a)},onPropertyValueChanged:function(a,b,c){this.d(a,b,c)},$type:new $.ig.Type("PropertyChangeNotifierExtended",$$t.$r.$type,[$$t.$i.$type,$$t.$g.$type])},true);$c("AssemblyVersion:t","Object",{init:function(){$.ig.$op.init.call(this)},$type:new $.ig.Type("AssemblyVersion",$.ig.$ot)},true);$c("StackList$1:ab","Object",{$t:null,g:0,e:null,h:0,init:function($t,a){this.$t=$t;if(!this.hasOwnProperty("$type")){this.$type=this.$type.specialize(this.$t)}$.ig.$op.init.call(this);this.maxCapacity(a);this.e=new $$4.x(this.$t,0)},count:function(){return this.e.count()},maxCapacity:function(a){if(arguments.length===1){if(a!=this.g){$$t.$c.x(a,"value");this.g=a>0?a:2147483647;if(null!=this.e&&this.e.count()>this.g){this.e.removeRange(0,this.e.count()-this.g);this.h++;this.m()}}return a}else{return this.g}},clear:function(){if(this.count()==0){return}this.e.clear();this.h++;this.m()},contains:function(a){return this.e.indexOf(a)>=0},getEnumerator:function(){return new $$t.ac(this.$t,this)},b:function(a){return this.e.__inner[this.e.count()-++a]},l:function(a,b,c){var d=this.propertyChanged;if(null!=d){d(this,new $$0.b7("Count"));d(this,new $$0.b7("Item[]"))}var e=this.collectionChanged;if(null!=e){var f=new $$4.ae(1,c?0:1,$e(this.$t,a),b);e(this,f)}},m:function(){var a=this.propertyChanged;if(null!=a){a(this,new $$0.b7("Count"));a(this,new $$0.b7("Item[]"))}var b=this.collectionChanged;if(null!=b){b(this,this.$type.getStaticFields($$t.$ab.$type).f)}},peek:function(){if(this.count()==0){throw new $$6.p(0)}return this.e.__inner[this.count()-1]},pop:function(){var a=this.peek();this.e.removeAt(this.count()-1);this.h++;this.l(a,0,false);return a},push:function(a){this.h++;if(this.g>0&&this.count()==this.g){var b=this.e.__inner[0];this.e.removeAt(0);this.l(b,this.g-1,false)}this.e.add(a);this.l(a,0,true)},o:function(a){$$t.$c.z(a,"match");var b=this.h;for(var c=this.e.count()-1;c>=0;c--){var d=this.e.__inner[c];if(a(d)){this.e.removeAt(c);this.l(d,this.e.count()-c,false);if(b!=this.h){throw new $$6.p(1,$$t.$am.a("LE_RemoveAllFailedVersion"))}}}},toArray:function(){return this.e.toArray()},indexOf:function(a){var b=this.e.indexOf(a);if(b>=0){b=this.e.count()-++b}return b},insert:function(a,b){throw new $$0.r(0)},removeAt:function(a){throw new $$0.r(0)},item:function(a,b){if(arguments.length===2){throw new $$0.r(0);return b}else{return this.b(a)}},add:function(a){this.push(a)},copyTo1:function(a,b){var c=this.e;for(var d=c.count()-1;d>=0;d--){a[b++]=c.__inner[d]}},isReadOnly:function(){return false},remove:function(a){throw new $$0.r(0)},copyTo:function(a,b){this.e.copyTo(a,b)},isSynchronized:function(){return false},syncRoot:function(){return this.e.syncRoot()},collectionChanged:null,propertyChanged:null,$type:new $.ig.Type("StackList$1",$.ig.$ot,[$$0.$bw.$type.specialize(0),$$0.$bk.$type,$$4.$ac.$type,$$0.$bz.$type.specialize(0),$$0.$b6.$type],function(){this.f=new $$4.ae(0,4)})},true);$c("StackList_Enumerator$1:ac","Object",{$t:null,a:null,d:0,c:0,b:null,init:function($t,a){this.$t=$t;if(!this.hasOwnProperty("$type")){this.$type=this.$type.specialize(this.$t)}$.ig.$op.init.call(this);this.a=a;this.reset()},moveNext:function(){if(this.d!=this.a.h){throw new $$6.p(1,$$t.$am.a("LE_EnumFailedVersion"))}if(this.c==-1){return false}if(this.c==-2){this.c=this.a.count()}this.c--;if(this.c>=0){this.b=this.a.e.__inner[this.c];return true}this.b=$f(this.$t);return false},current:function(){if(this.c==-2){throw new $$6.p(1,$$t.$am.a("LE_EnumNotStarted"))}else if(this.c==-1){throw new $$6.p(1,$$t.$am.a("LE_EnumEnded"))}return this.b},reset:function(){this.d=this.a.h;this.c=-2;this.b=$f(this.$t)},dispose:function(){this.c=-1},$type:new $.ig.Type("StackList_Enumerator$1",$.ig.$ot,[$$0.$bx.$type.specialize(0)])},true);$c("IUndoTransactionOwner:ad","Object",{$type:new $.ig.Type("IUndoTransactionOwner",null)},true);$c("UndoExecuteContext:ae","Object",{e:null,b:0,a:null,init:function(a,b){this.a=new $$t.ab($$t.$al.$type,0);$.ig.$op.init.call(this);$$t.$c.z(a,"undoManager");this.e=a;this.b=b},d:function(){switch(this.b){case 0:{return 0}case 1:{return 1}case 2:{if(this.e.isPerformingUndo()){return 1}return 0}default:{return 0}}},c:function(){return this.b},i:function(){return this.a.count()},f:function(){return this.e},g:function(a){if(a<0||a>this.i()){return null}return this.a.b(a)},h:function(a){$$t.$c.z(a,"unit");this.a.push(a);try{return a.b(this)}finally{this.a.pop()}},$type:new $.ig.Type("UndoExecuteContext",$.ig.$ot)},true);$c("UndoHistoryItem:af","PropertyChangeNotifier",{f:null,b:0,d:null,j:null,i:null,init:function(a,b,c){$$t.$r.init.call(this);$$t.$c.z(a,"unit");$$t.$c.z(c,"undoManager");this.f=a;this.b=b;this.d=c},itemType:function(){return this.b},longDescription:function(){if(null==this.i){this.i=function(a){return a!=null?a:String.empty()}(this.f.e(this.b,true))}return this.i},shortDescription:function(){if(null==this.j){this.j=function(a){return a!=null?a:String.empty()}(this.f.e(this.b,false))}return this.j},undoManager:function(){return this.d},unit:function(){return this.f},execute:function(){this.n(true)},h:function(){var a=this.itemType()==1?this.d.redoHistory():this.d.undoHistory();return a.indexOf(this)>=0},n:function(a){var b=this.b==1;var c=b?this.d.redoHistory():this.d.undoHistory();var d=c.indexOf(this);if(d>=0){this.d.a5(d+1,!b)}else if(a){throw new $$6.p(1,$$t.$am.a("LE_HistoryItemNotInCurrentHistory"))}},o:function(){if(this.j!=null){this.j=null;this.a("ShortDescription")}if(this.i!=null){this.i=null;this.a("LongDescription")}},$type:new $.ig.Type("UndoHistoryItem",$$t.$r.$type)},true);$c("UndoManager:ag","PropertyChangeNotifier",{aq:0,d:null,c:null,al:null,ak:null,at:null,ap:new Date,ao:null,k:0,n:null,m:null,g:null,f:null,e:null,staticInit:function(){var a=new $$4.x(String,0);var c=$.ig.$ep.getValues($$t.$ah.$type).getEnumerator();while(c.moveNext()){var b=c.current();a.add($$t.$ah.$getName($g(b)))}$$t.$ag.b=a.toArray()},init:function(){this.at=0;this.ap=$$0.$s.minValue();this.k=32;$$t.$r.init.call(this);this.d=new $$t.ab($$t.$af.$type,0);this.c=new $$t.ab($$t.$af.$type,0);this.al=new $$t.u($$t.$af.$type,this.d);this.ak=new $$t.u($$t.$af.$type,this.c);var a=this.d;a.collectionChanged=$.ig.Delegate.prototype.combine(a.collectionChanged,this.a3.runOn(this));var b=this.c;b.collectionChanged=$.ig.Delegate.prototype.combine(b.collectionChanged,this.a3.runOn(this))},allowMerging:function(a){if(arguments.length===1){this.ai(32,a,true);return a}else{return this.ab(32)}},canRedo:function(a){if(arguments.length===1){this.ai(2,a,true);return a}else{return this.ab(2)}},canUndo:function(a){if(arguments.length===1){this.ai(1,a,true);return a}else{return this.ab(1)}},currentHistoryItem:function(a){if(arguments.length===1){if(a!=this.e){this.e=a;this.a("CurrentHistoryItem")}return a}else{return this.e}},currentTransaction:function(){if(this.m==null){if(this.n!=null){this.m=$$t.$ak.l(this.n)}}return this.m},isPerformingRedo:function(){return this.ab(4)},isPerformingRollback:function(a){if(arguments.length===1){this.ai(128,a,true);return a}else{return this.ab(128)}},isPerformingUndo:function(){return this.ab(8)},isSuspended:function(){return this.aq>0},mergeTimeout:function(a){if(arguments.length===1){$$t.$c.x($.ig.util.timeSpanTicks(a),"value");if(this.at!=a){this.at=a;this.a("MergeTimeout")}return a}else{return this.at}},redoHistory:function(){return this.ak},rootTransaction:function(a){if(arguments.length===1){if(a!=this.n){this.n=a;this.a("RootTransaction")}return a}else{return this.n}},topRedoHistoryItem:function(a){if(arguments.length===1){if(this.f!=a){this.f=a;this.a("TopRedoHistoryItem")}return a}else{return this.f}},topUndoHistoryItem:function(a){if(arguments.length===1){if(this.g!=a){this.g=a;this.a("TopUndoHistoryItem")}return a}else{return this.g}},undoLimit:function(a){if(arguments.length===1){if(a!=this.undoLimit()){this.d.maxCapacity(this.c.maxCapacity(a));this.a("UndoLimit")}return a}else{return this.d.maxCapacity()}},undoHistory:function(){return this.al},y:function(){return this.allowMerging()&&!this.aj()},ac:function(a){if(arguments.length===1){this.ai(64,a,false);return a}else{return this.ab(64)}},ae:function(a){if(arguments.length===1){this.ai(256,a,false);return a}else{return this.ab(256)}},aj:function(a){if(arguments.length===1){if(this.ai(16,a,false)&&a){this.ax()}return a}else{return this.ab(16)}},addChange3:function(a){$$t.$c.z(a,"unit");this.v(a,false)},addChange1:function(a,b,c,d,e){if(this.isSuspended()){return null}$$t.$c.z(c,"undoMethod");$$t.$c.z(d,"redoMethod");var f=$$t.$ag.w(a,b,c,d,e);return this.v(f,false)},addChange2:function(a,b,c,d,e){if(this.isSuspended()){return null}$$t.$c.z(c,"undoMethod");$$t.$c.z(d,"redoMethod");return this.addChange1(a,b,function(f){return c()},function(f){return d()},e)},addChange:function(a,b,c,d,e){if(this.isSuspended()){return null}$$t.$c.z(c,"undoMethod");$$t.$c.z(d,"redoMethod");return this.addChange1(a,b,function(f){c();return true},function(f){d();return true},e)},clearHistory:function(){this.bg();this.ax();this.d.clear();this.c.clear()},executeInTransaction1:function(a,b,c){$$t.$c.z(c,"action");var d=false;var e=this.startTransaction(a,b);try{c();d=true;e.commit()}finally{if(!d&&!e.isClosed()){e.rollback()}}},executeInTransaction:function(a,b){$$t.$c.z(b,"action");$$t.$c.z(a,"transaction");var c=false;this.startTransaction1(a);try{b();c=true;a.commit()}finally{if(!c&&!a.isClosed()){a.rollback()}}},forEach:function(a){$$t.$c.z(a,"action");$$t.$ag.a2(a,this.undoHistory());$$t.$ag.a2(a,this.redoHistory());if(null!=this.ao){$$t.$ag.a2(a,this.ao)}var b=this.n;if(null!=b){a(b);b.f(a)}},a2:function(a,b){var d=b.getEnumerator();while(d.moveNext()){var c=d.current();var e=c.unit();a(e);e.f(a)}},preventMerge:function(){this.aj(true)},redo:function(a){this.a5(a,false)},removeAll:function(a,b){$$t.$c.z(a,"match");this.bg();var c=null;c=function(d){if(a(d)){return true}return d.c(c)};var d=function(e){return c(e.unit())};var e=this.ae();this.ae(true);try{if(b&&this.n!=null){c(this.n)}var f=this.d.count()==0?null:this.d.peek();this.d.o(d);if(f!=null&&(this.d.count()==0||this.d.peek()!=f)){this.ax()}var g=this.ao;if(g!=null){var h=g.toArray();var i=0;for(var j=h.length-1;j>=0;j--){if(c(h[j].unit())){h[j]=null;i++}}if(this.ao==g){if(i==h.length){this.ax()}else if(i>0){g=new $$4.aa($$t.$af.$type);for(var k=h.length-1;k>=0;k--){var l=h[k];if(l!=null){g.push(l)}}this.ao=g}}}this.c.o(d)}finally{this.ae(e)}},resume:function(){this.aq--;if(this.aq==0){this.a("IsSuspended")}},startTransaction:function(a,b){if(this.isSuspended()){throw new $$6.p(1,$$t.$am.a("LE_NewTransactionWhileSuspended"))}var c=this.o(a,b);if(c==null){throw new $$6.p(1,$$t.$am.a("LE_FactoryNullTransaction"))}this.startTransaction1(c);return c},startTransaction1:function(a){$$t.$c.z(a,"group");if($l(a.u(),null)){throw new $$6.p(1,$$t.$am.a("LE_TransactionAlreadyOpened"))}var b=this.currentTransaction();if(b!=null){b.aa(a)}var c=b==null?this:b;a.ae(c)},suspend:function(){this.aq++;if(this.aq==1){this.a("IsSuspended")}},undo:function(a){this.a5(a,true)},w:function(a,b,c,d,e){var f=function(g){var h=g.d()==1?d:c;if(null==h||!h(g)){return false}g.f().addChange3(g.g(0));return true};return new $$t.aj(a,b,f,e)},o:function(a,b){return new $$t.ak(a,b)},as:function($tProperty,a,b,c,d,e,f){var g=null;if(!String.isNullOrEmpty(d)){var h=f?"PropertyChangeDescriptionDetailed":"PropertyChangeDescription";var i=e==1?c:b;var j=e==1?b:c;g=$$t.$am.b(h,[d,a,$e($tProperty,i),$e($tProperty,j)])}return g},a4:function(a){this.m=null;this.a("CurrentTransaction")},a5:function(a,b){if(a<=0){throw new $$6.f(2,"count",$$t.$am.b("LE_ArgumentIsNegative",["count",a]))}if(this.isPerformingRedo()||this.isPerformingUndo()){throw new $$6.p(1,$$t.$am.a("LE_UndoRedoInUndoRedo"))}if(this.isPerformingRollback()){throw new $$6.p(1,$$t.$am.a("LE_UndoRedoInRollback"))}if(this.isSuspended()){throw new $$6.p(1,$$t.$am.a("LE_UndoRedoWhileSuspended"))}if(this.n!=null){throw new $$6.p(1,$$t.$am.a("LE_UndoRedoInTransaction"))}this.bg();if(!this.ab(b?1:2)){return}var c=b?8:4;var d=b?0:1;try{this.ai(c,true,true);this.ax();var e=b?this.d:this.c;var f=new $$t.ae(this,d);if(e.count()>0){this.aj(true)}for(var g=0,h=Math.min(a,e.count());g<h;g++){var i=e.pop();this.currentHistoryItem(i);f.h(i.unit())}}finally{this.currentHistoryItem(null);this.ai(c,false,true)}},bc:function(a){var b=this.isPerformingRollback();try{this.isPerformingRollback(true);var c=new $$t.ae(this,2);c.h(a)}finally{this.isPerformingRollback(b)}},bh:function(a){if(this.isSuspended()){throw new $$6.p(1,$$t.$am.a("LE_EndTransactionWhileSuspended"))}},v:function(a,b){if(a==null){return null}if(this.isPerformingRollback()){return null}if(this.isSuspended()){return null}this.bg();var c=$b($$t.$ak.$type,a);if(c!=null){if($l(c.u(),false)){throw new $$6.d(1,$$t.$am.a("LE_AddOpenTransaction"))}if(!b){throw new $$6.d(1,$$t.$am.a("LE_AddTransactionDirect"))}}if(this.n!=null){var d=this.currentTransaction();var e=this.isPerformingRedo()||this.isPerformingUndo();if(!e){var f=this.l(d,a);if(f!=0){if(f==2){d.ab()}return null}this.aj(false)}d.aa(a);if(!e){this.a9()}}else{if(this.isPerformingUndo()){this.ax();this.c.push(new $$t.af(a,1,this))}else{var g=true;var h=this.isPerformingRedo();if(!h&&this.d.count()>0){var i=this.d.peek();var j=this.l(i.unit(),a);if(j!=0){this.a9();g=false;if(j==1){i.o()}else{var k=this.d.pop();this.ba();this.preventMerge()}}}this.ax();if(g){if(!h){this.aw();this.c.clear();this.aj(false)}var l=new $$t.af(a,0,this);this.d.push(l);if(!h){this.a9()}}}}return a},aw:function(){this.ao=new $$4.aa($$t.$af.$type);var b=this.c.getEnumerator();while(b.moveNext()){var a=b.current();this.ao.push(a)}},ax:function(){this.ao=null},ab:function(a){return(this.k&a)==a},l:function(a,b){var c=0;if(this.y()){var d=this.at==0;if(!d){var e=$$0.$s.now();d=e-this.ap<=this.at}if(d){try{this.ac(true);var f=new $$t.ai(this,b);c=a.a(f)}finally{this.ac(false)}if(c!=0){this.a9()}}}return c},a3:function(a,b){this.canUndo(this.d.count()>0);this.canRedo(this.c.count()>0);this.topUndoHistoryItem(this.canUndo()?this.d.peek():null);this.topRedoHistoryItem(this.canRedo()?this.c.peek():null);
},a9:function(){this.ap=$$0.$s.now()},ba:function(){if(this.ao==null){return}var a=this.ao;this.ax();var c=a.getEnumerator();while(c.moveNext()){var b=c.current();this.c.push(b)}},ai:function(a,b,c){if(b==this.ab(a)){return false}this.k^=a;if(c){this.a($$t.$ag.b[$.ig.truncate(Math.logBase(a,2))])}return true},bg:function(){if(this.ac()){throw new $$6.p(1,$$t.$am.a("LE_ChangeHistoryInMerge"))}if(this.ae()){throw new $$6.p(1,$$t.$am.a("LE_ChangeHistoryInRemoveAll"))}},undoManager:function(){return this},onChildOpened:function(a){$$t.$c.z(a,"child");if(this.n!=null){throw new $$6.p(1,$$t.$am.a("LE_HasOpenTransaction"))}if($l(a.u(),true)){throw new $$6.d(1,$$t.$am.b("LE_TransactionNotOpened",[a]))}if(a.h()!=this){throw new $$6.d(1,$$t.$am.a("LE_InvalidTransactionOwner"))}this.rootTransaction(a);return true},onChildClosed:function(a,b){$$t.$c.z(a,"child");if(a!=this.n){throw new $$6.d(1,$$t.$am.b("LE_ClosingOtherTransaction",[a,this.n]))}this.rootTransaction(null);if(b==0&&a.p()){this.v(a,true)}},$type:new $.ig.Type("UndoManager",$$t.$r.$type,[$$t.$ad.$type])},true);$c("UndoMergeContext:ai","Object",{c:null,a:null,init:function(a,b){$.ig.$op.init.call(this);$$t.$c.z(a,"undoManager");$$t.$c.z(b,"unitBeingAdded");this.a=a;this.c=b},b:function(){return this.a},d:function(){return this.c},$type:new $.ig.Type("UndoMergeContext",$.ig.$ot)},true);$c("UndoUnit:al","Object",{init:function(){$.ig.$op.init.call(this)},d:function(){},b:function(a){},f:function(a){},e:function(a,b){},a:function(a){return 0},c:function(a){return false},$type:new $.ig.Type("UndoUnit",$.ig.$ot)},true);$c("CustomUndoUnit:aj","UndoUnit",{h:null,i:null,j:null,g:null,init:function(a,b,c,d){$$t.$al.init.call(this);$$t.$c.z(c,"executeMethod");this.g=c;this.i=a;this.j=b;this.h=d},b:function(a){return this.g(a)},e:function(a,b){return b?this.j:this.i},d:function(){return this.h},$type:new $.ig.Type("CustomUndoUnit",$$t.$al.$type)},true);$c("UndoTransaction:ak","UndoUnit",{i:null,s:null,g:null,t:$m($$0.$aq.$type,null),j:null,v:null,w:null,init:function(a,b){$$t.$al.init.call(this);this.v=a;this.w=b;this.i=new $$t.ab($$t.$al.$type,0);this.s=new $$4.g($$t.$al.$type,1,this.i)},b:function(a){if(this.j!=null){throw new $$6.p(1,$$t.$am.b("LE_CannotExecuteOpenTransaction",[this.j]))}var b=false;var c=this.o(a);try{var e=this.i.getEnumerator();while(e.moveNext()){var d=e.current();if(a.h(d)){b=true}}}finally{if(c!=null&&!c.isClosed()){c.commit()}}return b},f:function(a){$$t.$al.f.call(this,a);var c=this.s.getEnumerator();while(c.moveNext()){var b=c.current();a(b);b.f(a)}},e:function(a,b){var c=b?this.w:this.v;if(c==null){if(this.i.count()>0){var e=this.i.getEnumerator();while(e.moveNext()){var d=e.current();c=this.i.peek().e(a,b);if(c!=null){break}}}if(c==null){c=$$t.$am.a("FallbackTransactionDescription")}}return c},a:function(a){var b=0;if($j(this.t,true)&&this.i.count()>0){var c=this.i.peek();b=c.a(a);if(b==2){this.i.pop();b=1}}return b},c:function(a){this.i.o(a);return this.i.count()==0},d:function(){return null},isClosed:function(){return $j(this.t,false)},openTransaction:function(){return this.j},parent:function(){return $b($$t.$ak.$type,this.g)},units:function(){return this.s},u:function(){return this.t},h:function(){return this.g},x:function(){return $z("{1}: {0} items",this.s.count(),this.getType().typeName())},y:function(){return this.v},z:function(){return this.w},ac:function(a){this.ag();var b=this.g.undoManager();b.bh(this);if(this.j!=null){this.j.ac(a)}this.t=$m($$0.$aq.$type,false);if(a==1){b.bc(this)}this.g.onChildClosed(this,a);b.a4(this)},o:function(a){switch(a.c()){case 2:return null;case 0:case 1:var b=this.k(a);if(b!=null){a.f().startTransaction1(b)}return b;default:return null}},ag:function(){if($j(this.t,null)){throw new $$6.p(1,$$t.$am.a("LE_TransactionNotStarted"))}if($j(this.t,false)){throw new $$6.p(1,$$t.$am.a("LE_TransactionClosed"))}},aa:function(a){$$t.$c.z(a,"unit");this.ag();if(this.j!=null){throw new $$6.p(1,$$t.$am.b("LE_AddUnitWhileOpenTransaction",[this.j]))}this.i.push(a)},ab:function(){this.ac(2)},p:function(){var b=this.i.getEnumerator();while(b.moveNext()){var a=b.current();var c=$b($$t.$ak.$type,a);if(null!=c){if(c.p()){return true}}else{return true}}return false},l:function(a){$$t.$c.z(a,"group");if($l(a.u(),true)){throw new $$6.d(1,$$t.$am.b("LE_TransactionNotOpened",[a]))}while(a.openTransaction()!=null){a=a.openTransaction()}return a},ae:function(a){$$t.$c.z(a,"parent");if($l(this.t,null)){throw new $$6.p(1,$$t.$am.a("LE_TransactionAlreadyOpened"))}this.g=a;this.t=$m($$0.$aq.$type,true);if(!a.onChildOpened(this)){this.t=$m($$0.$aq.$type,null);this.g=null}else{a.undoManager().a4(this)}},commit:function(){this.ac(0)},rollback:function(){this.ac(1)},k:function(a){return a.f().o(this.v,this.w)},undoManager:function(){return this.g.undoManager()},onChildOpened:function(a){$$t.$c.z(a,"child");this.ag();if(this.j!=null){throw new $$6.p(1,$$t.$am.a("LE_HasOpenTransaction"))}if(!this.i.contains(a)){throw new $$6.d(1,$$t.$am.b("LE_ChildTransactionNotInUnits",[a]))}if($l(a.u(),true)){throw new $$6.d(1,$$t.$am.b("LE_TransactionNotOpened",[a]))}if(a.h()!=this){throw new $$6.d(1,$$t.$am.a("LE_InvalidTransactionOwner"))}this.j=a;return true},onChildClosed:function(a,b){$$t.$c.z(a,"child");this.ag();if(a!=this.j){throw new $$6.d(1,$$t.$am.b("LE_ClosingOtherTransaction",[a,this.j]))}this.j=null;if(b!=0||!a.p()){this.i.pop()}},$type:new $.ig.Type("UndoTransaction",$$t.$al.$type,[$$t.$ad.$type])},true);$c("UndoUtils:am","Object",{init:function(){$.ig.$op.init.call(this)},a:function(a){return $$6.$ak.getString("undo",a,[])},b:function(a,b){return $$6.$ak.getString("undo",a,b)},$type:new $.ig.Type("UndoUtils",$.ig.$ot)},true);$c("ReadOnlyNotifyCollection$1:u","Object",{$t:null,c:null,a:null,init:function($t,a){this.$t=$t;if(!this.hasOwnProperty("$type")){this.$type=this.$type.specialize(this.$t)}$.ig.$op.init.call(this);this.m(a)},collectionChanged:null,item:function(a,b){if(arguments.length===2){$$t.$c.t();return b}else{return this.c.item(a)}},contains:function(a){return this.c.contains(a)},copyTo:function(a,b){$$t.$c.s(this.$t,this.c,a,b)},getEnumerator:function(){return this.c.getEnumerator()},indexOf:function(a){return this.c.indexOf(a)},h:function(a,b){this.j(b,true)},i:function(a,b){this.l(b,true)},j:function(a,b){var c=this.collectionChanged;if(c!=null){c(this,a)}if(b&&null!=this.a){this.a.g(this,a)}},k:function(){this.l(new $$0.b7("Count"),true);this.l(new $$0.b7("Item[]"),true);this.j(new $$4.ae(0,4),true)},l:function(a,b){var c=this.propertyChanged;if(c!=null){c(this,a)}if(b&&null!=this.a){this.a.onPropertyValueChanged(this,a.propertyName(),a)}},m:function(a){$$t.$c.y(a);if(this.c!=a){this.f(this.c,false);this.c=a;this.f(this.c,true);this.k()}},f:function(a,b){if(null!=a){var c=$b($$t.$i.$type,a);if(null!=c){if(b){c.addListener(this.b(),false)}else{c.removeListener(this.b())}}else{var d=$b($$4.$ac.$type,this.c);if(null!=d){if(b){d.collectionChanged=$.ig.Delegate.prototype.combine(d.collectionChanged,this.h.runOn(this))}else{d.collectionChanged=$.ig.Delegate.prototype.remove(d.collectionChanged,this.h.runOn(this))}}else{}var e=$b($$0.$b6.$type,this.c);if(null!=e){if(b){e.propertyChanged=$.ig.Delegate.prototype.combine(e.propertyChanged,this.i.runOn(this))}else{e.propertyChanged=$.ig.Delegate.prototype.remove(e.propertyChanged,this.i.runOn(this))}}}}},e:function(){if(this.a!=null){this.a.compact()}},count:function(){return this.c.count()},isReadOnly:function(){return true},d:function(){return this.c},b:function(){if(null==this.a){this.a=new $$t.m;this.a.b(new $$t.n($$t.$u.$type.specialize(this.$t),this,this.g.runOn(this),true),false)}return this.a},g:function(a,b,c,d){if(b==this.c){var e=$b($$4.$ae.$type,d);if(null!=e){this.j(e,true)}else{var f=$b($$0.$b7.$type,d);if(null!=f){this.l(f,true)}}}},insert:function(a,b){$$t.$c.t()},removeAt:function(a){$$t.$c.t()},add:function(a){$$t.$c.t()},clear:function(){$$t.$c.t()},remove:function(a){$$t.$c.t();return false},addListener:function(a,b){this.b().b(a,b)},removeListener:function(a){this.b().d(a)},propertyChanged:null,$type:new $.ig.Type("ReadOnlyNotifyCollection$1",$.ig.$ot,[$$0.$bz.$type.specialize(0),$$4.$ac.$type,$$t.$i.$type,$$0.$b6.$type])},true);$c("TypedEnumerable$1:v","Object",{$t:null,a:null,init:function($t,a){this.$t=$t;if(!this.hasOwnProperty("$type")){this.$type=this.$type.specialize(this.$t)}$.ig.$op.init.call(this);this.a=a||new Array(0)},b:function(a){this.a=a||new Array(0)},getEnumerator:function(){return new $$t.w(this.$t,this.a.getEnumerator())},$type:new $.ig.Type("TypedEnumerable$1",$.ig.$ot,[$$0.$bw.$type.specialize(0)])},true);$c("TypedEnumerable_Enumerator$1:w","Object",{$t:null,a:null,init:function($t,a){this.$t=$t;if(!this.hasOwnProperty("$type")){this.$type=this.$type.specialize(this.$t)}$.ig.$op.init.call(this);this.a=a},reset:function(){this.a.reset()},moveNext:function(){return this.a.moveNext()},current:function(){return $v(this.$t,this.a.current())},dispose:function(){},$type:new $.ig.Type("TypedEnumerable_Enumerator$1",$.ig.$ot,[$$0.$bx.$type.specialize(0)])},true);$$t.$ag.b=null;if($$t.$ag.staticInit&&!$$t.$ag.undoManagerStaticInitCalled){$$t.$ag.staticInit();$$t.$ag.undoManagerStaticInitCalled=true}});