Nickolay - Task.Joose.Stable-3.01

Documentation | Source

POD ERRORS

Hey! The above document had some coding errors, which are explained below:

Around line 2:

=cut found outside a pod block. Skipping to next block.

Joose=function(){throw"Modules may not be instantiated."};Joose.top=this;Joose.A={each:function(D,C,B){for(var A=0;A<D.length;A++){C.call(B||this,D[A],A)}},exists:function(C,B){for(var A=0;A<C.length;A++){if(C[A]==B){return true}}return false},concat:function(A,B){A.push.apply(A,B);return A},grep:function(C,B){var A=[];Joose.A.each(C,function(D){if(B(D)){A.push(D)}});return A},remove:function(C,B){var A=[];Joose.A.each(C,function(D){if(D!==B){A.push(D)}});return A}};Joose.S={saneSplit:function(C,A){var B=(C||"").split(A);if(B.length==1&&!B[0]){B.shift()}return B},uppercaseFirst:function(A){return A.substr(0,1).toUpperCase()+A.substr(1,A.length-1)}};Joose.O={each:function(A,D,C){for(var B in A){D.call(C||this,A[B],B)}if(Joose.is_IE){Joose.A.each(["toString","constructor","hasOwnProperty"],function(E){if(A.hasOwnProperty(E)){D.call(C||this,A[E],E)}})}},eachSafe:function(A,C,B){Joose.O.each(A,function(E,D){if(A.hasOwnProperty(D)){C.call(B||this,E,D)}},B)},copy:function(A,B){Joose.O.each(A,function(D,C){B[C]=D});return B},copySafe:function(A,B){Joose.O.eachSafe(A,function(D,C){B[C]=D});return B},getMutableCopy:function(A){var B=function(){};B.prototype=A;return new B()},extend:function(B,A){return Joose.O.copy(A,B)},isEmpty:function(A){for(var B in A){if(A.hasOwnProperty(B)){return false}}return true},isInstance:function(A){return A.constructor==A.meta.c}};try{Joose.is_IE=/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent)}catch(e){Joose.is_IE=false}(function(){Joose.Proto=function(){throw"Modules may not be instantiated."};Joose.Proto.Object=function(){throw"Joose.Proto.Object can't be instantiated"};var C=function(F){var E=F.caller;if(!E.SUPER){throw"Invalid call to SUPER"}return E._original||E.SUPER[E.methodName]};var A=function(){return C(A).apply(this,arguments)};var D=function(){return C(D).apply(this,arguments[0])};var B=function(){var E=B.caller.caller;if(E.SUPER||E.AROUND){E=E.caller}var G=E.__INNER_STACK__;if(!G){throw"Invalid call to INNER"}var F=function(){var H=G.pop();return H?H.apply(this,arguments):undefined};F.__INNER_STACK__=G;return F.apply(this,arguments)};Joose.Proto.Object.prototype={SUPERARG:D,SUPER:A,INNER:B,initialize:function(){},toString:function(){return"a "+this.meta.name},detach:function(){if(this.meta instanceof Joose.Meta.Class.Detached){return}var E=new Joose.Meta.Class.Detached("",{isa:this.constructor}).c;E.meta.stem.open();E.prototype=this;this.meta=E.meta;this.meta.originalClass=this.constructor;this.constructor=E;E.meta.stem.close()},attach:function(){if(!(this.meta instanceof Joose.Meta.Class.Detached)){return}this.meta.stem.open();this.constructor.prototype={};delete this.constructor;delete this.meta}};Joose.Proto.Object.meta={constructor:Joose.Proto.Object,methods:Joose.Proto.Object.prototype,attributes:{}};Joose.Proto.Object.prototype.meta=Joose.Proto.Object.meta;Joose.Proto.Empty=function(){throw"Joose.Proto.Empty can't be instantiated"};Joose.Proto.Empty.meta={methods:{},attributes:{}}})();(function(){Joose.Proto.Class=function(){this.initialize.apply(this,arguments)};var A={constructor:Joose.Proto.Class,superClass:null,name:null,attributes:null,methods:null,meta:null,c:null,defaultSuperClass:Joose.Proto.Object,initialize:function(B,C){this.name=B;C=C||{};this.preprocessExtend(C);this.finalizeExtend(C);this.processStem(C);this.extend(C)},preprocessExtend:function(B){this.c=B.hasOwnProperty("constructor")?B.constructor:this.defaultConstructor();delete B.constructor;this.superClass=B.isa||this.defaultSuperClass;delete B.isa},finalizeExtend:function(B){this.processSuperClass();this.adoptConstructor()},processStem:function(){var B=this.superClass.meta;this.methods=Joose.O.getMutableCopy(B.methods);this.attributes=Joose.O.getMutableCopy(B.attributes)},defaultConstructor:function(){return function B(){this.initialize.apply(this,arguments)}},processSuperClass:function(){this.c.prototype=Joose.O.getMutableCopy(this.superClass.prototype);this.c.superClass=this.superClass.prototype},adoptConstructor:function(){var B=this.c;B.prototype.constructor=B;B.prototype.meta=this;B.meta=this;if(!B.hasOwnProperty("toString")){B.toString=function(){return this.meta.name}}},addMethod:function(B,C){C.SUPER=this.superClass.prototype;C.methodName=B;this.methods[B]=C;this.c.prototype[B]=C},addAttribute:function(B,C){this.attributes[B]=C;this.c.prototype[B]=C},removeMethod:function(B){delete this.methods[B];delete this.c.prototype[B]},removeAttribute:function(B){delete this.attributes[B];delete this.c.prototype[B]},hasMethod:function(B){return Boolean(this.methods[B])},hasAttribute:function(B){return typeof this.attributes[B]!="undefined"},hasOwnMethod:function(B){return this.hasMethod(B)&&this.methods.hasOwnProperty(B)},hasOwnAttribute:function(B){return this.hasAttribute(B)&&this.attributes.hasOwnProperty(B)},extend:function(B){Joose.O.eachSafe(B,function(D,C){if(C!="meta"&&C!="constructor"){if(typeof D=="function"&&!D.meta){this.addMethod(C,D)}else{this.addAttribute(C,D)}}},this)},subClassOf:function(B,C){C=C||{};C.isa=B||this.c;return new this.constructor(null,C).c}};Joose.Proto.Class.prototype=Joose.O.getMutableCopy(Joose.Proto.Object.prototype);Joose.O.extend(Joose.Proto.Class.prototype,A);Joose.Proto.Class.prototype.meta=new Joose.Proto.Class("Joose.Proto.Class",A)})();Joose.Managed=function(){throw"Modules may not be instantiated."};Joose.Managed.Property=new Joose.Proto.Class("Joose.Managed.Property",{name:null,props:null,value:null,definedIn:null,initialize:function(A,B){this.name=A;this.props=B;this.definedIn=B.definedIn;this.computeValue(B)},computeValue:function(A){this.value=A.init},prepareApply:function(A){},apply:function(A){A[this.name]=this.value},isAppliedTo:function(A){return A[this.name]==this.value},unapply:function(A){if(!this.isAppliedTo(A)){throw"Unapply of property ["+this.name+"] from ["+A+"] failed"}delete A[this.name]},clone:function(A){return new this.constructor(A||this.name,this.props)}}).c;Joose.Managed.Property.ConflictMarker=new Joose.Proto.Class("Joose.Managed.Property.ConflictMarker",{isa:Joose.Managed.Property,apply:function(A){throw"Attempt to apply ConflictMarker ["+this.name+"] to ["+A+"]"},unapply:function(A){throw"Attempt to unapply ConflictMarker ["+this.name+"] from ["+A+"]"}}).c;Joose.Managed.Property.Requirement=new Joose.Proto.Class("Joose.Managed.Property.Requirement",{isa:Joose.Managed.Property,apply:function(A){if(!A.meta.hasMethod(this.name)){throw"Requirement ["+this.name+"], defined in ["+this.definedIn.definedIn.name+"] is not satisfied for class ["+A+"]"}},unapply:function(A){}}).c;Joose.Managed.Property.Attribute=new Joose.Proto.Class("Joose.Managed.Property.Attribute",{isa:Joose.Managed.Property,apply:function(A){Joose.Managed.Property.Attribute.superClass.apply.call(this,A.prototype)},unapply:function(A){Joose.Managed.Property.Attribute.superClass.unapply.call(this,A.prototype)}}).c;Joose.Managed.Property.MethodModifier=new Joose.Proto.Class("Joose.Managed.Property.MethodModifier",{isa:Joose.Managed.Property,prepareWrapper:function(B,F,A,D,E,C){throw"Abstract method [prepareWrapper] of "+this+" was called"},apply:function(F){var B=this.name;var A=F.prototype;var I=A.hasOwnProperty(B);var C=A[B];var J=F.meta.superClass.prototype;var H=J.meta.constructor==Joose.Proto.Class||J.meta.constructor==Joose.Proto.Object;var E,D;if(I){E=function(){return C.apply(this,arguments)};D=function(){return C.apply(this,arguments[0])}}else{if(H){E=function(){var K=this.SUPER;var M=this.SUPERARG;this.SUPER=J.SUPER;this.SUPERARG=J.SUPERARG;var L=J[B].apply(this,arguments);this.SUPER=K;this.SUPERARG=M;return L};D=function(){var K=this.SUPER;var M=this.SUPERARG;this.SUPER=J.SUPER;this.SUPERARG=J.SUPERARG;var L=J[B].apply(this,arguments[0]);this.SUPER=K;this.SUPERARG=M;return L}}else{E=function(){return J[B].apply(this,arguments)};D=function(){return J[B].apply(this,arguments[0])}}}var G=this.prepareWrapper(B,this.value,E,D,J);if(I){G._original=C}G._contain=this.value;A[B]=G},isAppliedTo:function(B){var A=B.prototype[this.name];return A&&A._contain==this.value},unapply:function(D){var A=this.name;var C=D.prototype;var B=C[A]._original;if(!this.isAppliedTo(D)){throw"Unapply of method ["+A+"] from class ["+D+"] failed"}if(B){C[A]=B}else{delete C[A]}}}).c;Joose.Managed.Property.MethodModifier.Override=new Joose.Proto.Class("Joose.Managed.Property.MethodModifier.Override",{isa:Joose.Managed.Property.MethodModifier,prepareWrapper:function(C,B,E,F,D){var A=function(){var G=this.SUPER;var I=this.SUPERARG;this.SUPER=E;this.SUPERARG=F;var H=B.apply(this,arguments);this.SUPER=G;this.SUPERARG=I;return H};A.methodName=C;A.SUPER=D;return A}}).c;Joose.Managed.Property.MethodModifier.Put=new Joose.Proto.Class("Joose.Managed.Property.MethodModifier.Put",{isa:Joose.Managed.Property.MethodModifier.Override,prepareWrapper:function(B,A,D,E,C){return Joose.Managed.Property.MethodModifier.Put.superClass.prepareWrapper.apply(this,arguments)}}).c;Joose.Managed.Property.MethodModifier.After=new Joose.Proto.Class("Joose.Managed.Property.MethodModifier.After",{isa:Joose.Managed.Property.MethodModifier,prepareWrapper:function(B,A,D,E,C){var F=function(){var G=D.apply(this,arguments);A.apply(this,arguments);return G};return F}}).c;Joose.Managed.Property.MethodModifier.Before=new Joose.Proto.Class("Joose.Managed.Property.MethodModifier.Before",{isa:Joose.Managed.Property.MethodModifier,prepareWrapper:function(B,A,E,F,D){var C=function(){A.apply(this,arguments);return E.apply(this,arguments)};return C}}).c;Joose.Managed.Property.MethodModifier.Around=new Joose.Proto.Class("Joose.Managed.Property.MethodModifier.Around",{isa:Joose.Managed.Property.MethodModifier,prepareWrapper:function(C,A,E,F,D){var B=function(){var H=this;var G=function(){return E.apply(H,arguments)};return A.apply(this,Joose.A.concat([G],arguments))};B.AROUND=true;return B}}).c;Joose.Managed.Property.MethodModifier.Augment=new Joose.Proto.Class("Joose.Managed.Property.MethodModifier.Augment",{isa:Joose.Managed.Property.MethodModifier,prepareWrapper:function(C,A,E,F,D){var B=function(){var I=[];var G=B;do{I.push(G.OUTER?G._contain:G);G=G.OUTER&&(G._original||G.OUTER[G.methodName])}while(G);var H=function(){return I.pop().apply(this,arguments)};H.__INNER_STACK__=I;return H.apply(this,arguments)};B.methodName=C;B.OUTER=D;return B}}).c;Joose.Managed.PropertySet=new Joose.Proto.Class("Joose.Managed.PropertySet",{isa:Joose.Managed.Property,properties:null,propertyMetaClass:Joose.Managed.Property,initialize:function(A,B){B=B||{};Joose.Managed.PropertySet.superClass.initialize.call(this,A,B);this.properties=B.properties||{}},addProperty:function(A,B){B.definedIn=this;return this.properties[A]=new (B.meta||this.propertyMetaClass)(A,B)},addPropertyObject:function(A){return this.properties[A.name]=A},removeProperty:function(A){var B=this.properties[A];delete this.properties[A];return B},haveProperty:function(A){return typeof this.properties[A]!="undefined"},haveOwnProperty:function(A){return this.haveProperty(A)},getProperty:function(A){return this.properties[A]},each:function(B,A){Joose.O.each(this.properties,function(D,C){if(typeof D!="undefined"){B.call(A||this,D,C)}})},clone:function(B){var A=Joose.O.copy(this.props,{});A.properties=Joose.O.getMutableCopy(this.properties);return new this.constructor(B||this.name,A)},cleanClone:function(B){var A=Joose.O.copy(this.props,{});A.properties={};return new this.constructor(B||this.name,A)},alias:function(B){var A=this.properties;Joose.O.each(B,function(D,C){var E=A[C];if(E){this.addPropertyObject(E.clone(D))}},this)},exclude:function(A){Joose.A.each(A,function(B){if(this.properties[B]){this.properties[B]=undefined}},this)},flattenTo:function(B){var A=B.properties;this.each(function(E,D){var C=A[D];if(C instanceof Joose.Managed.Property.ConflictMarker){return}if(typeof C=="undefined"){B.addPropertyObject(E);return}if(C==E){return}B.removeProperty(D);B.addProperty(D,{meta:Joose.Managed.Property.ConflictMarker})},this)},composeTo:function(A){this.each(function(C,B){if(!A.haveOwnProperty(B)){A.addPropertyObject(C)}})},composeFrom:function(){if(!arguments.length){return}var A=this.cleanClone();Joose.A.each(arguments,function(B){var C=B;if(!(B instanceof Joose.Managed.PropertySet)){C=B.propertySet;if(B.alias||B.exclude){C=C.clone()}if(B.alias){C.alias(B.alias)}if(B.exclude){C.exclude(B.exclude)}}C.flattenTo(A)});A.composeTo(this)},prepareApply:function(A){this.each(function(B){B.prepareApply(A)})},apply:function(A){this.each(function(B){B.apply(A)})},unapply:function(A){this.each(function(B){B.unapply(A)})}}).c;(function(){var A=1;Joose.Managed.PropertySet.Mutable=new Joose.Proto.Class("Joose.Managed.PropertySet.Mutable",{isa:Joose.Managed.PropertySet,ID:null,derivatives:null,opened:1,composedFrom:null,initialize:function(B,C){Joose.Managed.PropertySet.Mutable.superClass.initialize.call(this,B,C);this.derivatives={};this.ID=A++;this.composedFrom=[]},setComposeInfo:function(){this.ensureOpen();Joose.A.each(this.composedFrom,function(B){var C=B instanceof Joose.Managed.PropertySet?B:B.propertySet;delete C.derivatives[this.ID]},this);this.composedFrom=[];this.addComposeInfo.apply(this,arguments)},addComposeInfo:function(){this.ensureOpen();Joose.A.each(arguments,function(B){this.composedFrom.push(B);var C=B instanceof Joose.Managed.PropertySet?B:B.propertySet;C.derivatives[this.ID]=this},this)},removeComposeInfo:function(){this.ensureOpen();Joose.A.each(arguments,function(B){var D=0;while(D<this.composedFrom.length){var C=this.composedFrom[D];C=C instanceof Joose.Managed.PropertySet?C:C.propertySet;if(B==C){delete C.derivatives[this.ID];this.composedFrom.splice(D,1)}else{D++}}},this)},ensureOpen:function(){if(!this.opened){throw"Mutation of closed property set: ["+this.name+"]"}},addProperty:function(B,C){this.ensureOpen();return Joose.Managed.PropertySet.Mutable.superClass.addProperty.call(this,B,C)},addPropertyObject:function(B){this.ensureOpen();return Joose.Managed.PropertySet.Mutable.superClass.addPropertyObject.call(this,B)},removeProperty:function(B){this.ensureOpen();return Joose.Managed.PropertySet.Mutable.superClass.removeProperty.call(this,B)},composeFrom:function(){this.ensureOpen();return Joose.Managed.PropertySet.Mutable.superClass.composeFrom.apply(this,this.composedFrom)},open:function(){this.opened++;if(this.opened==1){Joose.O.each(this.derivatives,function(B){B.open()});this.deCompose()}},close:function(){if(!this.opened){throw"Unmatched 'close' operation on property set: ["+this.name+"]"}if(this.opened==1){this.reCompose();Joose.O.each(this.derivatives,function(B){B.close()})}this.opened--},reCompose:function(){this.composeFrom()},deCompose:function(){this.each(function(C,B){if(C.definedIn!=this){this.removeProperty(B)}},this)}}).c})();Joose.Managed.PropertySet.Containable=new Joose.Proto.Class("Joose.Managed.PropertySet.Containable",{isa:Joose.Managed.PropertySet.Mutable,targetMeta:null,container:null,initialize:function(A,B){Joose.Managed.PropertySet.Containable.superClass.initialize.call(this,A,B);this.targetMeta=B.targetMeta;this.computeContainer()},computeContainer:function(){throw"Abstract method [computeContainer] of "+this+" was called"},addProperty:function(A,B){return this.container[A]=Joose.Managed.PropertySet.Containable.superClass.addProperty.call(this,A,B)},addPropertyObject:function(A){return this.container[A.name]=Joose.Managed.PropertySet.Containable.superClass.addPropertyObject.call(this,A)},removeProperty:function(A){try{delete this.container[A]}catch(B){this.container[A]=undefined}return Joose.Managed.PropertySet.Containable.superClass.removeProperty.call(this,A)},haveProperty:function(A){return typeof this.container[A]!="undefined"},haveOwnProperty:function(A){return this.haveProperty(A)&&this.container.hasOwnProperty(A)},getProperty:function(A){return this.container[A]},cleanClone:function(A){var B=Joose.Managed.PropertySet.Containable.superClass.cleanClone.call(this,A);B.container={};return B}}).c;Joose.Managed.StemElement=function(){throw"Modules may not be instantiated."};Joose.Managed.StemElement.Attributes=new Joose.Proto.Class("Joose.Managed.StemElement.Attributes",{isa:Joose.Managed.PropertySet.Containable,propertyMetaClass:Joose.Managed.Property.Attribute,computeContainer:function(A){this.container=this.targetMeta.attributes}}).c;Joose.Managed.StemElement.Methods=new Joose.Proto.Class("Joose.Managed.StemElement.Methods",{isa:Joose.Managed.PropertySet.Containable,propertyMetaClass:Joose.Managed.Property.MethodModifier.Put,computeContainer:function(A){this.container=this.targetMeta.methods},prepareApply:function(){}}).c;Joose.Managed.StemElement.Requirements=new Joose.Proto.Class("Joose.Managed.StemElement.Requirements",{isa:Joose.Managed.PropertySet.Mutable,targetMeta:null,propertyMetaClass:Joose.Managed.Property.Requirement,initialize:function(A,B){Joose.Managed.StemElement.Requirements.superClass.initialize.call(this,A,B);this.targetMeta=B.targetMeta},alias:function(){},exclude:function(){},flattenTo:function(A){this.each(function(C,B){if(!A.haveProperty(B)){A.addPropertyObject(C)}},this)},composeTo:function(A){this.flattenTo(A)},prepareApply:function(A){}}).c;Joose.Managed.StemElement.MethodModifiers=new Joose.Proto.Class("Joose.Managed.StemElement.MethodModifiers",{isa:Joose.Managed.PropertySet.Mutable,targetMeta:null,propertyMetaClass:null,initialize:function(A,B){Joose.Managed.StemElement.MethodModifiers.superClass.initialize.call(this,A,B);this.targetMeta=B.targetMeta},addProperty:function(B,C){C.definedIn=this;var A=new C.meta(B,C);if(!this.properties[B]){this.properties[B]=[]}this.properties[B].push(A);return A},addPropertyObject:function(B){var A=B.name;if(!this.properties[A]){this.properties[A]=[]}this.properties[A].push(B);return B},removeProperty:function(B){if(!this.haveProperty(B)){return undefined}var A=this.properties[B].pop();if(!this.properties[B].length){Joose.Managed.StemElement.MethodModifiers.superClass.removeProperty.call(this,B)}return A},alias:function(){},exclude:function(){},flattenTo:function(B){var A=B.properties;this.each(function(C,D){var E=A[D];if(typeof E=="undefined"){E=A[D]=[]}Joose.A.each(C,function(F){if(!Joose.A.exists(E,F)){E.push(F)}})},this);return this},composeTo:function(A){this.flattenTo(A);return this},deCompose:function(){this.each(function(A,B){var C=0;while(C<A.length){if(A[C].definedIn!=this){A.splice(C,1)}else{C++}}},this)},prepareApply:function(A){},apply:function(A){this.each(function(B,C){Joose.A.each(B,function(D){D.apply(A)})},this)},unapply:function(A){this.each(function(B,C){for(var D=B.length-1;D>=0;D--){B[D].unapply(A)}},this)}}).c;Joose.Managed.PropertySet.Composition=new Joose.Proto.Class("Joose.Managed.PropertySet.Composition",{isa:Joose.Managed.PropertySet.Mutable,propertyMetaClass:Joose.Managed.PropertySet.Mutable,processOrder:null,each:function(C,B){var A=this.properties;Joose.A.each(this.processOrder,function(D){C.call(B||this,A[D],D)},this)},eachR:function(D,C){var B=this.properties;for(var A=this.processOrder.length-1;A>=0;A--){D.call(C||this,B[this.processOrder[A]],this.processOrder[A])}},clone:function(){var A=this.cleanClone();this.each(function(B){A.addPropertyObject(B.clone())});return A},alias:function(A){this.each(function(B){B.alias(A)})},exclude:function(A){this.each(function(B){B.exclude(A)})},flattenTo:function(B){var A=B.properties;this.each(function(E,C){var D=A[C]||B.addProperty(C,{meta:E.constructor});E.flattenTo(D)})},composeTo:function(B){var A=B.properties;this.each(function(E,C){var D=A[C]||B.addProperty(C,{meta:E.constructor});E.composeTo(D)})},deCompose:function(){this.eachR(function(A){A.open()});Joose.Managed.PropertySet.Composition.superClass.deCompose.call(this)},reCompose:function(){Joose.Managed.PropertySet.Composition.superClass.reCompose.call(this);this.each(function(A){A.close()})},unapply:function(A){this.eachR(function(B){B.unapply(A)})}}).c;Joose.Managed.Stem=new Joose.Proto.Class("Joose.Managed.Stem",{isa:Joose.Managed.PropertySet.Composition,targetMeta:null,attributesMC:Joose.Managed.StemElement.Attributes,methodsMC:Joose.Managed.StemElement.Methods,requirementsMC:Joose.Managed.StemElement.Requirements,methodsModifiersMC:Joose.Managed.StemElement.MethodModifiers,processOrder:["attributes","methods","requirements","methodsModifiers"],initialize:function(A,B){var C=this.targetMeta=B.targetMeta;Joose.Managed.Stem.superClass.initialize.call(this,A,B);this.addProperty("attributes",{meta:this.attributesMC,targetMeta:C});this.addProperty("methods",{meta:this.methodsMC,targetMeta:C});this.addProperty("requirements",{meta:this.requirementsMC,targetMeta:C});this.addProperty("methodsModifiers",{meta:this.methodsModifiersMC,targetMeta:C})},cleanClone:function(B){var A=new this.meta.constructor(null,{isa:Joose.Proto.Empty}).c;return new this.constructor(B||this.name,{targetMeta:A.meta})},reCompose:function(){this.prepareApply(this.targetMeta.c);Joose.Managed.Stem.superClass.reCompose.call(this);this.apply(this.targetMeta.c)},deCompose:function(){this.unapply(this.targetMeta.c);Joose.Managed.Stem.superClass.deCompose.call(this)}}).c;Joose.Managed.Builder=new Joose.Proto.Class("Joose.Managed.Builder",{targetMeta:null,initialize:function(A){this.targetMeta=A.targetMeta},_buildStart:function(B,A){B.stem.open()},_extend:function(A){var B=this.targetMeta;this._buildStart(B,A);Joose.O.eachSafe(A,function(E,C){var D=this[C];if(!D){throw"Unknow builder ["+C+"] was used during extending of ["+B.c+"]"}D.call(this,B,E)},this);this._buildComplete(B,A)},_buildComplete:function(B,A){B.stem.close()},methods:function(A,B){Joose.O.eachSafe(B,function(D,C){A.addMethod(C,D)},this)},removeMethods:function(A,B){Joose.A.each(B,function(C){A.removeMethod(C)},this)},have:function(A,B){Joose.O.eachSafe(B,function(D,C){A.addAttribute(C,D)},this)},havenot:function(A,B){Joose.A.each(B,function(C){A.removeAttribute(C)},this)},havent:function(A,B){this.havenot(A,B)},after:function(A,B){Joose.O.each(B,function(D,C){A.addMethodModifier(C,D,Joose.Managed.Property.MethodModifier.After)},this)},before:function(A,B){Joose.O.each(B,function(D,C){A.addMethodModifier(C,D,Joose.Managed.Property.MethodModifier.Before)},this)},override:function(A,B){Joose.O.each(B,function(D,C){A.addMethodModifier(C,D,Joose.Managed.Property.MethodModifier.Override)},this)},around:function(A,B){Joose.O.each(B,function(D,C){A.addMethodModifier(C,D,Joose.Managed.Property.MethodModifier.Around)},this)},augment:function(A,B){Joose.O.each(B,function(D,C){A.addMethodModifier(C,D,Joose.Managed.Property.MethodModifier.Augment)},this)},removeModifier:function(A,B){Joose.A.each(B,function(C){A.removeMethodModifier(C)},this)},does:function(A,B){Joose.A.each(B,function(C){A.addRole(C)},this)},doesnot:function(A,B){Joose.A.each(B,function(C){A.removeRole(C)},this)},doesnt:function(A,B){this.doesnot(A,B)}}).c;Joose.Managed.Class=new Joose.Proto.Class("Joose.Managed.Class",{isa:Joose.Proto.Class,stem:null,stemClass:Joose.Managed.Stem,builder:null,builderClass:Joose.Managed.Builder,initialize:function(A,B){Joose.Managed.Class.superClass.initialize.call(this,A,B);this.stem.close()},processStem:function(){Joose.Managed.Class.superClass.processStem.call(this);this.builder=new this.builderClass({targetMeta:this});this.stem=new this.stemClass(this.name,{targetMeta:this});var B=this.getAttributedClass("builderClass");if(B){this.addAttribute("builderClass",this.subClassOf(B))}var A=this.getAttributedClass("stemClass");if(A){this.addAttribute("stemClass",this.subClassOf(A))}},extend:function(A){if(Joose.O.isEmpty(A)){return}if(A.builder){this.getBuilderTarget().meta.extend(A.builder);delete A.builder}if(A.stem){this.getStemTarget().meta.extend(A.stem);delete A.stem}this.builder._extend(A)},getBuilderTarget:function(){var A=this.getAttributedClass("builderClass");if(!A){throw"Attempt to extend a builder on non-meta class"}return A},getStemTarget:function(){var A=this.getAttributedClass("stemClass");if(!A){throw"Attempt to extend a stem on non-meta class"}return A},getAttributedClass:function(A){var B=this.getAttribute(A);if(B instanceof Joose.Managed.Property.Attribute){B=B.value}return B},addMethodModifier:function(A,D,C){var B={};B.init=D;B.meta=C;return this.stem.properties.methodsModifiers.addProperty(A,B)},removeMethodModifier:function(A){return this.stem.properties.methodsModifiers.removeProperty(A)},addMethod:function(A,C,B){B=B||{};B.init=C;return this.stem.properties.methods.addProperty(A,B)},addAttribute:function(A,C,B){B=B||{};B.init=C;return this.stem.properties.attributes.addProperty(A,B)},removeMethod:function(A){return this.stem.properties.methods.removeProperty(A)},removeAttribute:function(A){return this.stem.properties.attributes.removeProperty(A)},hasMethod:function(A){return this.stem.properties.methods.haveProperty(A)},hasAttribute:function(A){return this.stem.properties.attributes.haveProperty(A)},hasOwnMethod:function(A){return this.stem.properties.methods.haveOwnProperty(A)},hasOwnAttribute:function(A){return this.stem.properties.attributes.haveOwnProperty(A)},getMethod:function(A){return this.stem.properties.methods.getProperty(A)},getAttribute:function(A){return this.stem.properties.attributes.getProperty(A)},addRole:function(){Joose.A.each(arguments,function(A){var C=(A.meta instanceof Joose.Managed.Role)?A:A.role;if(C.meta.builderRole){this.getBuilderTarget().meta.extend({does:[C.meta.builderRole]})}if(C.meta.stemRole){this.getStemTarget().meta.extend({does:[C.meta.stemRole]})}var B=A;if(!(B.meta instanceof Joose.Managed.Role)){B.propertySet=B.role.meta.stem;delete B.role}else{B=B.meta.stem}this.stem.addComposeInfo(B)},this)},removeRole:function(){Joose.A.each(arguments,function(A){if(A.meta.builderRole){this.getBuilderTarget().meta.extend({doesnt:[A.meta.builderRole]})}if(A.meta.stemRole){this.getStemTarget().meta.extend({doesnt:[A.meta.stemRole]})}this.stem.removeComposeInfo(A.meta.stem)},this)}}).c;Joose.Managed.Role=new Joose.Managed.Class("Joose.Managed.Role",{isa:Joose.Managed.Class,have:{defaultSuperClass:Joose.Proto.Empty,builderRole:null,stemRole:null},methods:{defaultConstructor:function(){return function(){throw"Roles cant be instantiated"}},processSuperClass:function(){if(this.superClass!=this.defaultSuperClass){throw"Roles cant inherit from anything"}},getBuilderTarget:function(){if(!this.builderRole){this.builderRole=new this.constructor().c}return this.builderRole},getStemTarget:function(){if(!this.stemRole){this.stemRole=new this.constructor().c}return this.stemRole},hasOwnMethod:function(A){return this.hasMethod(A)},hasOwnAttribute:function(A){return this.hasAttribute(A)},addRequirement:function(A){this.stem.properties.requirements.addProperty(A,{})}},stem:{methods:{prepareApply:function(){},apply:function(){},unapply:function(){}}},builder:{methods:{requires:function(A,B){Joose.A.each(B,function(C){A.addRequirement(C)},this)}}}}).c;Joose.Meta=function(){throw"Modules may not be instantiated."};Joose.Meta.Object=new Joose.Proto.Class("Joose.Meta.Object",{isa:Joose.Proto.Object,initialize:function(A){A=A||{};Joose.O.each(this.meta.attributes,function(D,B){if(D instanceof Joose.Managed.Attribute){var E,C=false;if(A.hasOwnProperty(B)){E=A[B];C=true}else{if(typeof D.props.init=="function"){E=D.props.init.call(this,B,A);C=true}}if(C){if(this.meta.hasMethod(D.setterName)){this[D.setterName].call(this,E)}else{this[B]=E}}else{if(D.props.required){throw"Required attribute ["+B+"] is missed during initialization of "+this}}}else{if(A.hasOwnProperty(B)){this[B]=A[B]}}},this)}}).c;Joose.Meta.Class=new Joose.Managed.Class("Joose.Meta.Class",{isa:Joose.Managed.Class,have:{defaultSuperClass:Joose.Meta.Object}}).c;Joose.Meta.Role=new Joose.Meta.Class("Joose.Meta.Role",{isa:Joose.Managed.Role,methods:{apply:function(A){if(!Joose.O.isInstance(A)){throw"Role can be applied only to Joose instance"}if(!A.meta.hasMethod("detach")){throw"Apply failed: Instance ["+A+"] has no 'detach' method"}A.detach();A.meta.extend({does:[this.c]})},unapply:function(A){if(!Joose.O.isInstance(A)){throw"Role can be unapplied only from Joose instance"}if(!(A.meta instanceof Joose.Meta.Class.Detached)){throw"Instance ["+A+"] is not detached"}A.meta.extend({doesnt:[this.c]})}}}).c;Joose.Meta.Class.Detached=new Joose.Meta.Class("Joose.Meta.Class.Detached",{isa:Joose.Meta.Class,have:{originalClass:null},stem:{have:{woAttributes:["methods","requirements","methodsModifiers"]},override:{prepareApply:function(A){this.processOrder=this.woAttributes;this.SUPER(A);delete this.processOrder},apply:function(A){this.processOrder=this.woAttributes;this.SUPER(A);delete this.processOrder},unapply:function(A){this.processOrder=this.woAttributes;this.SUPER(A);delete this.processOrder}}}}).c;Joose.Managed.Attribute=new Joose.Managed.Class("Joose.Managed.Attribute",{isa:Joose.Managed.Property.Attribute,have:{role:null,publicName:null,setterName:null,getterName:null},override:{computeValue:function(B){if(typeof B.init!="function"){this.SUPER(B)}this.publicName=this.name.replace(/^_+/,"");this.setterName="set"+Joose.S.uppercaseFirst(this.publicName);this.getterName="get"+Joose.S.uppercaseFirst(this.publicName);if(B.is){var A={};if(B.is=="rw"){A[this.setterName]=this.getSetter()}if(B.is=="rw"||B.is=="ro"){A[this.getterName]=this.getGetter()}this.role=new Joose.Managed.Role("attribute:"+this.name,{methods:A}).c}},prepareApply:function(A){if(this.role){A.meta.extend({does:[this.role]})}},apply:function(A){this.SUPER(A)},unapply:function(A){if(this.role){A.meta.extend({doesnt:[this.role]})}this.SUPER(A)}},methods:{isPrivate:function(){return/^_/.test(this.name)},getSetter:function(){var A=this.name;return function(B){this[A]=B;return this}},getGetter:function(){var A=this.name;return function(){return this[A]}}}}).c;Joose.Managed.PropertySet.Namespace=new Joose.Proto.Class("Joose.Managed.PropertySet.Namespace",{isa:Joose.Managed.PropertySet.Containable,propertyMetaClass:null,computeContainer:function(A){this.container=this.targetMeta.c},apply:function(A){this.each(function(C,B){this.container[B]=C},this)},unapply:function(){this.each(function(B,A){try{delete this.container[A]}catch(C){this.container[A]=undefined}},this)},prepareApply:function(){},addProperty:function(A,B){if(B&&B.meta&&B.meta.meta.hasAttribute("ns")){B.meta.parent=this.targetMeta.ns}return this.container[A]=this.properties[A]=B},haveOwnProperty:function(A){return this.haveProperty(A)},addPropertyObject:function(A){}}).c;Joose.Managed.Attribute.Builder=new Joose.Managed.Role("Joose.Managed.Attribute.Builder",{have:{defaultAttributeClass:Joose.Managed.Attribute},builder:{methods:{has:function(A,B){Joose.O.eachSafe(B,function(D,C){if(typeof D!="object"||D==null){D={init:D}}D.meta=D.meta||A.defaultAttributeClass;A.addAttribute(C,D.init,D)},this)},hasnot:function(A,B){this.havenot(A,B)},hasnt:function(A,B){this.hasnot(A,B)}}}}).c;Joose.Managed.My=new Joose.Managed.Role("Joose.Managed.My",{have:{myClass:null},methods:{createMy:function(E){var D=this.meta;var A=this instanceof Joose.Managed.Role;var B=E.my||{};delete E.my;var C=this.myClass=A?new D.superClass(null,B).c:D.subClassOf(this.superClass.meta.myClass||D.defaultSuperClass.meta.myClass||D.defaultSuperClass,B);this.c.my=A?C.meta:new C({targetMeta:this})}},override:{extend:function(A){if(!Joose.O.isEmpty(A)&&!this.myClass&&this.superClass.meta.myClass){this.createMy(A)}if(A.my){if(!this.myClass){this.createMy(A)}else{this.myClass.meta.extend(A.my);delete A.my}}this.SUPER(A)}},before:{addRole:function(){if(!this.myClass){return}var A=this.myClass.meta.stem;A.open();Joose.A.each(arguments,function(B){var C=(B.meta instanceof Joose.Managed.Role)?B:B.role;if(C.meta.meta.hasAttribute("myClass")&&C.meta.myClass){A.addComposeInfo(C.my.stem)}},this);A.close()},removeRole:function(){if(!this.myClass){return}var A=this.myClass.meta.stem;A.open();Joose.A.each(arguments,function(B){if(B.meta.meta.hasAttribute("myClass")&&B.meta.myClass){A.removeComposeInfo(B.my.stem)}},this);A.close()}}}).c;Joose.Namespace=function(){throw"Modules may not be instantiated."};Joose.Namespace.Able=new Joose.Meta.Role("Joose.Namespace.Able",{have:{parent:null,localName:null,ns:null},after:{processStem:function(){this.localName=(this.name||"").split(".").pop();this.ns=new Joose.Managed.PropertySet.Namespace(this.name,{targetMeta:this})}},methods:{copyNamespaceState:function(A){var B=A.meta;if(!B.meta.hasAttribute("ns")){throw"No ns"}this.ns.unapply();B.parent=this.parent;B.localName=this.localName;B.ns=this.ns;B.ns.targetMeta=B;B.ns.computeContainer();B.ns.apply()}},builder:{override:{_extend:function(B){var C=this.targetMeta;this._buildStart(C,B);B=B||{};var A=B.body;delete B.body;this.SUPER(B);this.body(C,A);this._buildComplete(C,B)}},methods:{body:function(B,A){if(A){Joose.Namespace.Manager.my.executeIn(B.c,A,B.ns.container,[B.c])}},version:function(){throw"Probably you need to include Depended Role into your deployment"},use:function(){throw"Probably you need to include Depended Role into your deployment"}}}}).c;Joose.Meta.Class.meta.extend({does:[Joose.Managed.My,Joose.Managed.Attribute.Builder,Joose.Namespace.Able]});Joose.Meta.Role.meta.extend({does:[Joose.Managed.My,Joose.Managed.Attribute.Builder,Joose.Namespace.Able]});Joose.Namespace.Keeper=new Joose.Meta.Class("Joose.Namespace.Keeper",{isa:Joose.Meta.Class,have:{externalConstructor:null},methods:{defaultConstructor:function(){return function(){if(this.meta instanceof Joose.Namespace.Keeper){throw new Error("Module ["+this.constructor+"] may not be instantiated.")}if(typeof this.meta.externalConstructor=="function"){this.meta.externalConstructor.apply(this,arguments);return}throw new Error("NamespaceKeeper was planted incorrectly.")}},plant:function(B){var A=this.c;B.meta.stem.open();A.meta=B.meta;A.prototype=B.prototype;B.prototype={};A.prototype.constructor=A;A.meta.c=A;this.copyNamespaceState(A);A.meta.externalConstructor=B;if(B.meta.meta.hasAttribute("myClass")){A.my=B.my;delete B.my}delete B.meta;A.meta.stem.close();return A}}}).c;Joose.Namespace.Manager=new Joose.Meta.Class("Joose.Namespace.Manager",{my:{have:{global:null,virtual:null},methods:{initialize:function(){this.virtual={};var A=this.global=new Joose.Namespace.Keeper().c;A.meta.ns.container=Joose.top;A.meta.parent=A;A.meta.ns.addProperty("__global__",A.meta.ns);__global__.addProperty("Joose",new Joose.Namespace.Keeper("Joose",{constructor:Joose}).c);Joose.meta.ns.addProperty("Namespace",new Joose.Namespace.Keeper("Joose.Namespace",{constructor:Joose.Namespace}).c)},getCurrent:function(){var A=50;var D="getCurrent() failed with limit="+A;var C=arguments.callee.caller;while(C&&A){if(C.__JOOSE_MODULE__){return C.__JOOSE_MODULE__}try{C=C.caller}catch(B){C=null}A--}if(A){return this.global}throw D},earlyCreate:function(B,A,D){var C={};if(D.hasOwnProperty("constructor")){C.constructor=D.constructor}delete D.constructor;if(D.hasOwnProperty("isa")){C.isa=D.isa}delete D.isa;return new A(B,C).c},create:function(C,M,L,E){L=L||{};var G=Joose.S.saneSplit(C,".");if(!G.length){throw"Cant prepare namespace with empty name = ["+C+"]"}var F=E||this.getCurrent();var J=Joose.S.saneSplit(F.meta.name,".");for(var I=0;I<G.length;I++){var B=G[I];var H=I==G.length-1;if(B=="meta"||B=="my"||!B){throw"Module name ["+C+"] may not include a part called 'meta' or 'my' or empty part."}var N=(F==this.global?this.global.meta.ns.container:F)[B];J.push(B);var A=J.join(".");var D=false;var K;if(typeof N=="undefined"){if(H){K=this.earlyCreate(A,M,L);D=true}else{K=new Joose.Namespace.Keeper(A).c}if(F.meta){F.meta.ns.addProperty(K.meta.localName,K)}else{F[K.meta.localName]=K}N=K}else{if(H&&N&&N.meta){if(N.meta.constructor==M){N.meta.extend(L)}else{if(N.meta instanceof Joose.Namespace.Keeper){N.meta.plant(this.earlyCreate(A,M,L));D=true}else{if(M!=Joose.Namespace.Keeper){throw"Re-declaration of class "+A+"with different meta is not allowed"}}}}else{if(H&&!(N&&N.meta&&N.meta.meta&&N.meta.meta.hasAttribute("ns"))){throw"Trying to setup module "+A+" failed. There is already something: "+N}}}if(D){N.meta.extend(L)}F=N}return F},executeIn:function(C,D,B,E){var A=function(G,F){arguments.callee.__JOOSE_MODULE__=F;return G.apply(B||this,E||[])};return A(D,C)}}}}).c;Joose.Helper=new Joose.Meta.Class("Joose.Helper",{my:{methods:{registerHelper:function(B,A,C){if(!C){C=function(E,F){var D;if(F&&F.meta){D=F.meta;delete F.meta}Joose.Namespace.Manager.my.create(E,D||A,F,Joose.Namespace.Manager.my.getCurrent())}}__global__.addProperty(B,C)}}}}).c;Joose.Helper.my.registerHelper("Class",Joose.Meta.Class,function(B,C){var A;if(C&&C.meta){A=C.meta;delete C.meta}else{if(C&&C.isa){A=C.isa.meta.constructor}else{A=Joose.Meta.Class}}return Joose.Namespace.Manager.my.create(B,A,C,Joose.Namespace.Manager.my.getCurrent())});Joose.Helper.my.registerHelper("Role",Joose.Meta.Role);Joose.Helper.my.registerHelper("Module",Joose.Namespace.Keeper,function(A,B){if(typeof B=="function"){B={body:B}}return Joose.Namespace.Manager.my.create(A,Joose.Namespace.Keeper,B,Joose.Namespace.Manager.my.getCurrent())});